Giter VIP home page Giter VIP logo

svelte-toolbox's Issues

Shadows could animate

If the elevation changes the shadow should animate. This could be disabled by setting transitionElevation to false.

There could also be a prop that gives the elevation on hover. This would be useful for making the card elevate on hover.

eslint-plugin-svelte3 is missing

npm run lint fails with this error:

Error: Failed to load plugin 'svelte3' declared in '.eslintrc': Could not find ESLint Linter in require cache
    at Object.<anonymous> (/workspace/svelte-toolbox/node_modules/eslint-plugin-svelte3/index.js:295:8)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at ConfigArrayFactory._loadPlugin (/workspace/svelte-toolbox/node_modules/eslint/lib/cli-engine/config-array-factory.js:859:49)
    at names.reduce (/workspace/svelte-toolbox/node_modules/eslint/lib/cli-engine/config-array-factory.js:730:33)

hideOverflow does not work

hideOverflow="false" does not work.

<script>
	import { Ripple } from 'svelte-toolbox'
</script>

<Ripple hideOverflow="false">
	<p>
		text
	</p>
</Ripple>

Demo here

Install components, not whole package

From svelte-toolbox I want only Ripple component, but there is no possibility to run:

npm install --save-dev svelte-toolbox/ripple

and import the Ripple by default:

import Ripple from 'svelte-toolbox/ripple'

This would be just great to add in future versions!

Button looks a bit top heavy

It looks like there is either some extra space on the bottom of the button, or the text somehow jumped too high.

2019-07-18t07-07-24

Conditional inline styling

It will be better to put --css-vars in conditional styles like style={someprop is defined ? "--css-var: ${someprop}" : ""} insted of style="--css-var: {someprop}"`

this way you doesnt need to put !important if you do

.some-component{
  color: #fff:
}

Add a style theme

I am not sure exactly what to call this, but I think that "Style Theme" sounds good.

It's just a set of CSS vars in global.css that look like this:

:root {
	--back: #ffffff;
	--back-light: #f6fafd;
	--back-api: #eff8ff;
	--prime: #98603d;
	--second: #434346;
	--flash: #40b3ff;
	--heading: var(--second);
	--text: #444;
	--sidebar-text: rgba(255, 255, 255, 0.75);
	--border-w: 0.3rem;
	--border-r: 0.4rem;
}

Then all the other vars would be set to those variables.

Yeah, more vars such as --prime-t-10 (--prime transparent 10%) would probably be needed, but for the most part I think this would work.

Notice any problems with this idea? Have a comment?

Drop it below.

Border variations

There should be a prop on Card to adjust the border-radius, with options something like the following:

  • rounded (default)
  • extra-rounded
  • sleek-right
    Screenshot from 2019-08-06 17-40-53
  • sleek-left

There should be colors for card

We need some more props for colors in card. Here are some suggestions:

  • backgroundColor
  • backgroundColorHover
  • outlineColor
  • outlineColorHover

The last two are obviously waiting on #79.

Improve `Ripple`

Here are some ways that Ripple can be improved upon:

  • Ripple could have a block prop which should default to false. If true the ripple should have display: block, else inline-block.
  • Ripple could have a disabled prop, which, as can be guessed, disables the ripple.
  • The default span should be higher, and the default time might even need to be shorter. This is requested, so that the animation does not have such a tired and slow look to it.

Request: LoadingBar Component

This would be a group of svg based loading bars.

The usage would probably look like this:

<LoadingBar
	value={50}
	preset="line"

	backgroundWidth={10}
	backgroundCorners={0}
	foregroundWidth={20}
	foregroundCorners={0}
	backgroundColor="var(--loading-bar-background)"
	foregroundColor="var(--loading-bar-foreground)"

	showLabel={true}
	showUnits={true}
	units="%"
	labelColor="var(--loading-bar-label)"
	unitsColor="var(--loading-bar-units)"

	borderWidth={20}
	borderColor="var(--loading-bar-border)"
/>
<!-- preset values: `line`, `circle`, `fan`, `bubble` -->

Style bug with UIInput

As seen in this REPL, the input has an extra margin on the bottom.

As this is just the default Svelte REPL styles, it can be overridden with the following css:

input, button, select, textarea {
    margin: 0;
}

But that is just a pain to do every time.

Request: Item component

This would normally be used inside List, but it could also be used inside card, or anything else really.

Screenshot from 2019-08-06 21-08-23
Screenshot from 2019-08-06 21-11-04
Screenshot from 2019-08-06 21-11-24
Screenshot from 2019-08-06 21-11-58

IconButton transitions

It would be nice if there was a way to have transitions when an icon changes in IconButton.

This would be key to doing that: https://svelte.dev/examples#transition-events.

We could just add another prop:

<IconButton
    icon={[
        { name: 'favorite' },
        { name: 'favorite_outline' }
    ]}
    transition="scale"
    bind:on
/>

Then, every time on is toggled, the old icon will animate out with a scale transition, and the new one will animate it with a scale.

wrapped-styles.js is missing

Show error on build.

src/components/components.module.js โ†’ dist/index.min.mjs, dist/index.min.js...
[!] Error: Could not resolve '../styles/internal/wrapped-styles.js' from src\components\Style.svelte
Error: Could not resolve '../styles/internal/wrapped-styles.js' from src\components\Style.svelte
    at error (D:\work\svelte3\svelte-toolbox\node_modules\rollup\dist\rollup.js:9365:30)
    at ModuleLoader.handleMissingImports (D:\work\svelte3\svelte-toolbox\node_modules\rollup\dist\rollup.js:16317:17)
    at ModuleLoader.<anonymous> (D:\work\svelte3\svelte-toolbox\node_modules\rollup\dist\rollup.js:16368:26)
    at Generator.next (<anonymous>)
    at fulfilled (D:\work\svelte3\svelte-toolbox\node_modules\rollup\dist\rollup.js:15368:28)

Add a text prop to IconButton

A text prop on button might be nice.

Take a look at this code:

<IconButton
    icon="build",
    text="Build"
/>
<!--
    I am still not sure if 'text' should be a prop,
    or if it should be in IconObject.
-->

Wouldn't it be nice if it were to show a label under the icon on a touchscreen, and a tooltip on the icon on desktop?

I think so.

Update the page used for manual testing

The page that is used for manual testing should be updated.

This will keep every developer who looks at the page from going into heartache when he has made changes that need visual approval.

Something like the Roberto font, maybe some dummy text, and a hash system such that the url looks like this: localhost:5000/#some-component. This will keep us from having to scroll to just the right place when the page gets really long.

Take the MDC out of UIInput

The MDC component just has to go. It would greatly improve the quality of UIInput if the MD component wasn't there.

Add a label prop for Switch

If the label prop is specified, then Switch would become a block element that gets no shorter than 48px, and just as tall as the label forces it to.

There could also be a left prop of type boolean (default should be false) that puts the switch on the left side of the element.

Example:

Without left:

<Switch on={true} label="Allow notfications"/>

Screen Shot 2019-07-08 at 4 10 14 PM

With left:

<Switch on={true} label="Allow notfications" left={true}/>

Screen Shot 2019-07-08 at 4 10 41 PM

`scrollToTop` prop on UIButton

This would just scroll the page to the top when the button is clicked.

Very useful for SPA applications when the route is changed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.