@flightlesslabs/dodo-ui 0.1.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.js +4 -0
  3. package/dist/stories/Home.mdx +57 -7
  4. package/dist/stories/assets/dark-theme-toggle.png +0 -0
  5. package/dist/stories/components/Form/Button/Button.stories.svelte +10 -5
  6. package/dist/stories/components/Form/Button/Button.svelte +213 -211
  7. package/dist/stories/components/Form/Button/Button.svelte.d.ts +4 -1
  8. package/dist/stories/components/Form/Button/Events/Events.stories.svelte +40 -0
  9. package/dist/stories/components/Form/Button/Events/Events.stories.svelte.d.ts +18 -0
  10. package/dist/stories/components/Form/Button/Roundness/Roundness.stories.svelte +14 -11
  11. package/dist/stories/components/Form/Button/utils/scss/mixins.scss +21 -21
  12. package/dist/stories/components/Form/PasswordInput/Events/Events.stories.svelte +168 -0
  13. package/dist/stories/components/Form/PasswordInput/Events/Events.stories.svelte.d.ts +18 -0
  14. package/dist/stories/components/Form/PasswordInput/PasswordInput.stories.svelte +37 -0
  15. package/dist/stories/components/Form/PasswordInput/PasswordInput.stories.svelte.d.ts +21 -0
  16. package/dist/stories/components/Form/PasswordInput/PasswordInput.svelte +219 -0
  17. package/dist/stories/components/Form/PasswordInput/PasswordInput.svelte.d.ts +59 -0
  18. package/dist/stories/components/Form/PasswordInput/Roundness/Roundness.stories.svelte +20 -0
  19. package/dist/stories/components/Form/{ExampleButton/ExampleButton.stories.svelte.d.ts → PasswordInput/Roundness/Roundness.stories.svelte.d.ts} +3 -4
  20. package/dist/stories/components/Form/PasswordInput/Size/Size.stories.svelte +16 -0
  21. package/dist/stories/components/Form/PasswordInput/Size/Size.stories.svelte.d.ts +26 -0
  22. package/dist/stories/components/Form/PasswordInput/WithIcon/WithIcon.stories.svelte +31 -0
  23. package/dist/stories/components/Form/PasswordInput/WithIcon/WithIcon.stories.svelte.d.ts +26 -0
  24. package/dist/stories/components/Form/TextInput/Events/Events.stories.svelte +148 -0
  25. package/dist/stories/components/Form/TextInput/Events/Events.stories.svelte.d.ts +18 -0
  26. package/dist/stories/components/Form/TextInput/Roundness/Roundness.stories.svelte +21 -0
  27. package/dist/stories/components/Form/TextInput/Roundness/Roundness.stories.svelte.d.ts +26 -0
  28. package/dist/stories/components/Form/TextInput/Size/Size.stories.svelte +17 -0
  29. package/dist/stories/components/Form/TextInput/Size/Size.stories.svelte.d.ts +26 -0
  30. package/dist/stories/components/Form/TextInput/TextInput.stories.svelte +35 -0
  31. package/dist/stories/components/Form/TextInput/TextInput.stories.svelte.d.ts +21 -0
  32. package/dist/stories/components/Form/TextInput/TextInput.svelte +166 -0
  33. package/dist/stories/components/Form/TextInput/TextInput.svelte.d.ts +56 -0
  34. package/dist/stories/components/Form/TextInput/WithIcon/WithIcon.stories.svelte +47 -0
  35. package/dist/stories/components/Form/TextInput/WithIcon/WithIcon.stories.svelte.d.ts +26 -0
  36. package/dist/stories/philosophy/Colors/Colors.mdx +43 -0
  37. package/dist/stories/philosophy/Colors/Colors.stories.svelte +20 -0
  38. package/dist/stories/philosophy/Colors/Colors.stories.svelte.d.ts +19 -0
  39. package/dist/stories/philosophy/Colors/Colors.svelte +33 -0
  40. package/dist/stories/philosophy/Colors/Colors.svelte.d.ts +6 -0
  41. package/dist/stories/philosophy/Colors/Opacity.stories.svelte +9 -0
  42. package/dist/stories/philosophy/Colors/Opacity.stories.svelte.d.ts +19 -0
  43. package/dist/stories/philosophy/Colors/Opacity.svelte +20 -0
  44. package/dist/stories/philosophy/Colors/Opacity.svelte.d.ts +18 -0
  45. package/dist/stories/philosophy/Colors/Swatches/Palette.svelte +15 -0
  46. package/dist/stories/philosophy/Colors/Swatches/Palette.svelte.d.ts +6 -0
  47. package/dist/stories/philosophy/Colors/Swatches/Swatch.svelte +18 -0
  48. package/dist/stories/philosophy/Colors/Swatches/Swatch.svelte.d.ts +8 -0
  49. package/dist/stories/philosophy/Colors/Swatches/Swatches.svelte +39 -0
  50. package/dist/stories/philosophy/Colors/Swatches/Swatches.svelte.d.ts +8 -0
  51. package/dist/stories/philosophy/Colors/utils/color.d.ts +4 -0
  52. package/dist/stories/philosophy/Colors/utils/color.js +38 -0
  53. package/dist/stories/philosophy/Themes.mdx +23 -0
  54. package/dist/styles/_colors.css +2 -2
  55. package/dist/styles/_components.css +7 -6
  56. package/dist/styles/_minimal-reset.css +3 -0
  57. package/dist/styles/global.css +1 -0
  58. package/dist/types.d.ts +1 -1
  59. package/package.json +3 -2
  60. package/src/lib/index.ts +13 -0
  61. package/src/lib/stories/components/Form/Button/Button.stories.svelte +10 -5
  62. package/src/lib/stories/components/Form/Button/Button.svelte +36 -30
  63. package/src/lib/stories/components/Form/Button/Events/Events.stories.svelte +42 -0
  64. package/src/lib/stories/components/Form/Button/Roundness/Roundness.stories.svelte +14 -11
  65. package/src/lib/stories/components/Form/Button/utils/scss/mixins.scss +21 -21
  66. package/src/lib/stories/components/Form/PasswordInput/Events/Events.stories.svelte +174 -0
  67. package/src/lib/stories/components/Form/PasswordInput/PasswordInput.stories.svelte +41 -0
  68. package/src/lib/stories/components/Form/PasswordInput/PasswordInput.svelte +361 -0
  69. package/src/lib/stories/components/Form/PasswordInput/Roundness/Roundness.stories.svelte +20 -0
  70. package/src/lib/stories/components/Form/PasswordInput/Size/Size.stories.svelte +16 -0
  71. package/src/lib/stories/components/Form/PasswordInput/WithIcon/WithIcon.stories.svelte +31 -0
  72. package/src/lib/stories/components/Form/TextInput/Events/Events.stories.svelte +153 -0
  73. package/src/lib/stories/components/Form/TextInput/Roundness/Roundness.stories.svelte +21 -0
  74. package/src/lib/stories/components/Form/TextInput/Size/Size.stories.svelte +17 -0
  75. package/src/lib/stories/components/Form/TextInput/TextInput.stories.svelte +39 -0
  76. package/src/lib/stories/components/Form/TextInput/TextInput.svelte +293 -0
  77. package/src/lib/stories/components/Form/TextInput/WithIcon/WithIcon.stories.svelte +47 -0
  78. package/src/lib/styles/_colors.css +2 -2
  79. package/src/lib/styles/_components.css +7 -6
  80. package/src/lib/styles/_minimal-reset.css +3 -0
  81. package/src/lib/styles/global.css +1 -0
  82. package/src/lib/types.ts +1 -1
  83. package/dist/stories/Getting Started.mdx +0 -13
  84. package/dist/stories/components/Form/ExampleButton/ExampleButton.stories.svelte +0 -30
  85. package/dist/stories/components/Form/ExampleButton/ExampleButton.svelte +0 -14
  86. package/dist/stories/components/Form/ExampleButton/ExampleButton.svelte.d.ts +0 -16
  87. package/dist/stories/components/Form/ExampleButton/button.css +0 -30
  88. package/src/lib/stories/components/Form/ExampleButton/ExampleButton.stories.svelte +0 -30
  89. package/src/lib/stories/components/Form/ExampleButton/ExampleButton.svelte +0 -29
  90. package/src/lib/stories/components/Form/ExampleButton/button.css +0 -30
package/dist/index.d.ts CHANGED
@@ -3,3 +3,9 @@ export type { ComponentSize, ComponentRoundness, ComponentRoundnessFull } from '
3
3
  /** Form: Button */
4
4
  export { default as Button } from './stories/components/Form/Button/Button.svelte';
5
5
  export type { ButtonColor, ButtonRoundness, ButtonLinkTarget, ButtonLinkReferrerpolicy, } from './stories/components/Form/Button/Button.svelte';
6
+ /** Form: TextInput */
7
+ export { default as TextInput } from './stories/components/Form/TextInput/TextInput.svelte';
8
+ export type { TextInputRoundness, TextInputType, TextInputFocusEvent, TextInputClipboardEvent, } from './stories/components/Form/TextInput/TextInput.svelte';
9
+ /** Form: PasswordInput */
10
+ export { default as PasswordInput } from './stories/components/Form/PasswordInput/PasswordInput.svelte';
11
+ export type { PasswordInputToggleEvent } from './stories/components/Form/PasswordInput/PasswordInput.svelte';
package/dist/index.js CHANGED
@@ -1,3 +1,7 @@
1
1
  import './styles/global.css';
2
2
  /** Form: Button */
3
3
  export { default as Button } from './stories/components/Form/Button/Button.svelte';
4
+ /** Form: TextInput */
5
+ export { default as TextInput } from './stories/components/Form/TextInput/TextInput.svelte';
6
+ /** Form: PasswordInput */
7
+ export { default as PasswordInput } from './stories/components/Form/PasswordInput/PasswordInput.svelte';
@@ -1,10 +1,60 @@
1
- <img
2
- src="dodo-circle-6.png"
3
- style={{ width: 200, height: 'auto', display: 'flex', justifySelf: 'center' }}
1
+ import { Source } from '@storybook/blocks';
2
+ import item from '../../../package.json?raw';
3
+
4
+ <main style={{ textAlign: 'center' }}>
5
+
6
+ <img src="dodo-circle-6.png" style={{ width: 200, height: 'auto' }} />
7
+
8
+ # Dodo UI
9
+
10
+ <h3 style={{ fontWeight: 500 }}>v{JSON.parse(item)?.version}</h3>
11
+
12
+ <h3 style={{ fontWeight: 400 }}>An open-source, opinionated UI framework for Svelte.</h3>
13
+ </main>
14
+
15
+ <br />
16
+ <br />
17
+
18
+ ## Install
19
+
20
+ pnpm
21
+
22
+ <Source
23
+ dark
24
+ language="bash"
25
+ code={`
26
+ pnpm add @flightlesslabs/dodo-ui
27
+ `}
4
28
  />
5
29
 
6
- <h1 style={{ textAlign: 'center' }}>Dodo UI</h1>
30
+ npm
31
+
32
+ <Source
33
+ dark
34
+ language="bash"
35
+ code={`
36
+ npm i @flightlesslabs/dodo-ui
37
+ `}
38
+ />
39
+
40
+ ## Use it!
41
+
42
+ Lets import [Button](?path=/docs/components-form-button--docs) component
43
+
44
+ <Source
45
+ dark
46
+ language="js"
47
+ code={`
48
+ import { Button } '@flightlesslabs/dodo-ui';
49
+ `}
50
+ />
51
+
52
+ Checkout documentation for [Button](?path=/docs/components-form-button--docs)
53
+
54
+ ## Explore more
7
55
 
8
- <div style={{ textAlign: 'center', fontSize: '1rem', fontWeight: 400 }}>
9
- An open-source, opinionated UI framework for Svelte.
10
- </div>
56
+ - [Themes](?path=/docs/philosophy-themes--docs)
57
+ - [Colors](?path=/docs/philosophy-colors--docs)
58
+ - [Adjust Color Opacity](?path=/docs/philosophy-colors--docs#adjusting-opacity)
59
+ - [Github](https://github.com/flightlesslabs/dodo-ui)
60
+ - [NPM](https://www.npmjs.com/package/@flightlesslabs/dodo-ui)
@@ -16,7 +16,7 @@ export const storyButtonArgTypes = {
16
16
  },
17
17
  roundness: {
18
18
  control: { type: 'select' },
19
- options: [false, 1, 2, 3, 'full'],
19
+ options: [false, '1x', '2x', '3x', 'full'],
20
20
  },
21
21
  size: {
22
22
  control: { type: 'select' },
@@ -50,20 +50,25 @@ const { Story } = defineMeta({
50
50
  <Button>Click me!</Button>
51
51
  </Story>
52
52
 
53
- <Story name="Disabled" args={{ disabled: true }}>
54
- <Button disabled>Click me!</Button>
55
- </Story>
56
-
57
53
  <!-- Button with border around it -->
58
54
  <Story name="Outline" args={{ outline: true }}>
59
55
  <Button outline>Click me!</Button>
60
56
  </Story>
61
57
 
58
+ <Story name="Disabled" args={{ disabled: true }}>
59
+ <Button disabled>Click me!</Button>
60
+ </Story>
61
+
62
62
  <!-- Form submit button -->
63
63
  <Story name="Sumbit Button" args={{ type: 'submit' }}>
64
64
  <Button type="submit">Submit Form</Button>
65
65
  </Story>
66
66
 
67
+ <!-- Form submit button -->
68
+ <Story name="Full width Button" args={{ fullWidth: true }}>
69
+ <Button fullWidth>Click me!</Button>
70
+ </Story>
71
+
67
72
  <!-- Anchor Link styled like a Button -->
68
73
  <Story
69
74
  name="Link Button"