@flightlesslabs/dodo-ui 0.22.2 → 0.24.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 (118) hide show
  1. package/README.md +1 -9
  2. package/dist/index.d.ts +4 -10
  3. package/dist/index.js +5 -10
  4. package/dist/styles/components.css +0 -154
  5. package/dist/styles/components.css.map +1 -1
  6. package/dist/styles/components.scss +0 -2
  7. package/package.json +27 -41
  8. package/src/lib/index.ts +6 -19
  9. package/src/lib/styles/components.scss +0 -2
  10. package/src/lib/utils/time/date-creator/createDate/createDate.test.ts +109 -0
  11. package/src/lib/utils/time/date-creator/createDateFactory/createDateFactory.test.ts +146 -0
  12. package/dist/Home.mdx +0 -69
  13. package/dist/components/Form/Button/Button.stories.svelte +0 -178
  14. package/dist/components/Form/Button/Button.stories.svelte.d.ts +0 -22
  15. package/dist/components/Form/Checkbox/Checkbox.stories.svelte +0 -132
  16. package/dist/components/Form/Checkbox/Checkbox.stories.svelte.d.ts +0 -25
  17. package/dist/components/Form/DatePicker/DatePicker.scss +0 -55
  18. package/dist/components/Form/DatePicker/DatePicker.stories.svelte +0 -139
  19. package/dist/components/Form/DatePicker/DatePicker.stories.svelte.d.ts +0 -22
  20. package/dist/components/Form/DatePicker/DatePicker.svelte +0 -136
  21. package/dist/components/Form/DatePicker/DatePicker.svelte.d.ts +0 -64
  22. package/dist/components/Form/DatePicker/DatePickerInput/DatePickerInput.svelte +0 -96
  23. package/dist/components/Form/DatePicker/DatePickerInput/DatePickerInput.svelte.d.ts +0 -23
  24. package/dist/components/Form/DatePicker/DatePickerInput/Segments.svelte +0 -17
  25. package/dist/components/Form/DatePicker/DatePickerInput/Segments.svelte.d.ts +0 -8
  26. package/dist/components/Form/DatePicker/DatePickerInput/utils.d.ts +0 -10
  27. package/dist/components/Form/DatePicker/DatePickerInput/utils.js +0 -26
  28. package/dist/components/Form/DatePicker/DatePickerPopup/CalendarGrid.svelte +0 -35
  29. package/dist/components/Form/DatePicker/DatePickerPopup/CalendarGrid.svelte.d.ts +0 -4
  30. package/dist/components/Form/DatePicker/DatePickerPopup/DatePickerPopup.svelte +0 -52
  31. package/dist/components/Form/DatePicker/DatePickerPopup/DatePickerPopup.svelte.d.ts +0 -6
  32. package/dist/components/Form/DatePicker/DatePickerPopup/Header.svelte +0 -25
  33. package/dist/components/Form/DatePicker/DatePickerPopup/Header.svelte.d.ts +0 -3
  34. package/dist/components/Form/FormField/FormField.stories.svelte +0 -48
  35. package/dist/components/Form/FormField/FormField.stories.svelte.d.ts +0 -25
  36. package/dist/components/Form/InputEnclosure/InputEnclosure.stories.svelte +0 -166
  37. package/dist/components/Form/InputEnclosure/InputEnclosure.stories.svelte.d.ts +0 -22
  38. package/dist/components/Form/Label/Label.stories.svelte +0 -31
  39. package/dist/components/Form/Label/Label.stories.svelte.d.ts +0 -25
  40. package/dist/components/Form/RadioGroup/Radio/Radio.stories.svelte +0 -78
  41. package/dist/components/Form/RadioGroup/Radio/Radio.stories.svelte.d.ts +0 -25
  42. package/dist/components/Form/RadioGroup/RadioGroup.stories.svelte +0 -172
  43. package/dist/components/Form/RadioGroup/RadioGroup.stories.svelte.d.ts +0 -25
  44. package/dist/components/Form/Select/Select.stories.svelte +0 -175
  45. package/dist/components/Form/Select/Select.stories.svelte.d.ts +0 -22
  46. package/dist/components/Form/Switch/Switch.stories.svelte +0 -128
  47. package/dist/components/Form/Switch/Switch.stories.svelte.d.ts +0 -25
  48. package/dist/components/Form/TextInput/TextInput.stories.svelte +0 -162
  49. package/dist/components/Form/TextInput/TextInput.stories.svelte.d.ts +0 -22
  50. package/dist/components/Form/UtilityButton/UtilityButton.stories.svelte +0 -163
  51. package/dist/components/Form/UtilityButton/UtilityButton.stories.svelte.d.ts +0 -22
  52. package/dist/components/Info/Calendar/Calendar.scss +0 -147
  53. package/dist/components/Info/Calendar/Calendar.stories.svelte +0 -134
  54. package/dist/components/Info/Calendar/Calendar.stories.svelte.d.ts +0 -22
  55. package/dist/components/Info/Calendar/Calendar.svelte +0 -61
  56. package/dist/components/Info/Calendar/Calendar.svelte.d.ts +0 -6
  57. package/dist/components/Info/Calendar/CalendarGrid/CalendarGrid.svelte +0 -16
  58. package/dist/components/Info/Calendar/CalendarGrid/CalendarGrid.svelte.d.ts +0 -4
  59. package/dist/components/Info/Calendar/CalendarGrid/TableBody.svelte +0 -25
  60. package/dist/components/Info/Calendar/CalendarGrid/TableBody.svelte.d.ts +0 -8
  61. package/dist/components/Info/Calendar/CalendarGrid/TableHead.svelte +0 -19
  62. package/dist/components/Info/Calendar/CalendarGrid/TableHead.svelte.d.ts +0 -6
  63. package/dist/components/Info/Calendar/Header.svelte +0 -25
  64. package/dist/components/Info/Calendar/Header.svelte.d.ts +0 -3
  65. package/dist/components/Layout/Card/Card.stories.svelte +0 -113
  66. package/dist/components/Layout/Card/Card.stories.svelte.d.ts +0 -22
  67. package/dist/components/Layout/Grid/Column/Column.stories.svelte +0 -66
  68. package/dist/components/Layout/Grid/Column/Column.stories.svelte.d.ts +0 -22
  69. package/dist/components/Layout/Grid/Grid.stories.svelte +0 -192
  70. package/dist/components/Layout/Grid/Grid.stories.svelte.d.ts +0 -22
  71. package/dist/components/Layout/Grid/Row/Row.stories.svelte +0 -39
  72. package/dist/components/Layout/Grid/Row/Row.stories.svelte.d.ts +0 -22
  73. package/dist/components/Layout/Theme/Theme.stories.svelte +0 -54
  74. package/dist/components/Layout/Theme/Theme.stories.svelte.d.ts +0 -25
  75. package/dist/components/Layout/Theme/ThemeSystem/index.mdx +0 -35
  76. package/dist/storybook-types.d.ts +0 -129
  77. package/dist/storybook-types.js +0 -1
  78. package/dist/utils/time/date-creator/createDate/createDate.mdx +0 -98
  79. package/dist/utils/time/date-creator/createDateFactory/createDateFactory.mdx +0 -104
  80. package/dist/utils/time/timeout/timeout.mdx +0 -114
  81. package/src/lib/Home.mdx +0 -69
  82. package/src/lib/components/Form/Button/Button.stories.svelte +0 -178
  83. package/src/lib/components/Form/Checkbox/Checkbox.stories.svelte +0 -132
  84. package/src/lib/components/Form/DatePicker/DatePicker.scss +0 -55
  85. package/src/lib/components/Form/DatePicker/DatePicker.stories.svelte +0 -139
  86. package/src/lib/components/Form/DatePicker/DatePicker.svelte +0 -136
  87. package/src/lib/components/Form/DatePicker/DatePickerInput/DatePickerInput.svelte +0 -96
  88. package/src/lib/components/Form/DatePicker/DatePickerInput/Segments.svelte +0 -17
  89. package/src/lib/components/Form/DatePicker/DatePickerInput/utils.ts +0 -55
  90. package/src/lib/components/Form/DatePicker/DatePickerPopup/CalendarGrid.svelte +0 -35
  91. package/src/lib/components/Form/DatePicker/DatePickerPopup/DatePickerPopup.svelte +0 -52
  92. package/src/lib/components/Form/DatePicker/DatePickerPopup/Header.svelte +0 -25
  93. package/src/lib/components/Form/FormField/FormField.stories.svelte +0 -48
  94. package/src/lib/components/Form/InputEnclosure/InputEnclosure.stories.svelte +0 -166
  95. package/src/lib/components/Form/Label/Label.stories.svelte +0 -31
  96. package/src/lib/components/Form/RadioGroup/Radio/Radio.stories.svelte +0 -78
  97. package/src/lib/components/Form/RadioGroup/RadioGroup.stories.svelte +0 -172
  98. package/src/lib/components/Form/Select/Select.stories.svelte +0 -175
  99. package/src/lib/components/Form/Switch/Switch.stories.svelte +0 -128
  100. package/src/lib/components/Form/TextInput/TextInput.stories.svelte +0 -162
  101. package/src/lib/components/Form/UtilityButton/UtilityButton.stories.svelte +0 -163
  102. package/src/lib/components/Info/Calendar/Calendar.scss +0 -147
  103. package/src/lib/components/Info/Calendar/Calendar.stories.svelte +0 -134
  104. package/src/lib/components/Info/Calendar/Calendar.svelte +0 -61
  105. package/src/lib/components/Info/Calendar/CalendarGrid/CalendarGrid.svelte +0 -16
  106. package/src/lib/components/Info/Calendar/CalendarGrid/TableBody.svelte +0 -25
  107. package/src/lib/components/Info/Calendar/CalendarGrid/TableHead.svelte +0 -19
  108. package/src/lib/components/Info/Calendar/Header.svelte +0 -25
  109. package/src/lib/components/Layout/Card/Card.stories.svelte +0 -113
  110. package/src/lib/components/Layout/Grid/Column/Column.stories.svelte +0 -66
  111. package/src/lib/components/Layout/Grid/Grid.stories.svelte +0 -192
  112. package/src/lib/components/Layout/Grid/Row/Row.stories.svelte +0 -39
  113. package/src/lib/components/Layout/Theme/Theme.stories.svelte +0 -54
  114. package/src/lib/components/Layout/Theme/ThemeSystem/index.mdx +0 -35
  115. package/src/lib/storybook-types.ts +0 -182
  116. package/src/lib/utils/time/date-creator/createDate/createDate.mdx +0 -98
  117. package/src/lib/utils/time/date-creator/createDateFactory/createDateFactory.mdx +0 -104
  118. package/src/lib/utils/time/timeout/timeout.mdx +0 -114
@@ -1,113 +0,0 @@
1
- <script module lang="ts">
2
- import { defineMeta } from '@storybook/addon-svelte-csf';
3
- import Card, { cardColorOptions } from './Card.svelte';
4
- import type { CardProps } from './Card.svelte';
5
- import type { ArgTypes } from 'storybook/internal/csf';
6
- import { componentVariantOptions } from '../../../attributes/variant.js';
7
- import { componentRoundnessOptions } from '../../../attributes/roundness.js';
8
- import { ComponentShadowOptions } from '../../../attributes/shadow.js';
9
- import { componentThemeColorsOptions } from '../../../attributes/theme.js';
10
-
11
- const description = `
12
- a simple, customizable, and re-usable card component
13
-
14
- \`\`\`ts
15
- import { Card } from '@flightlesslabs/dodo-ui';
16
- \`\`\`
17
- `;
18
-
19
- // ------------------------------
20
- // Storybook ArgTypes
21
- // ------------------------------
22
- export const storyCardArgTypes: Partial<ArgTypes<CardProps>> = {
23
- // ------------------------------
24
- // Core
25
- // ------------------------------
26
- children: { table: { category: 'API', subcategory: 'Base' } },
27
- class: { table: { category: 'API', subcategory: 'Base' } },
28
-
29
- // ------------------------------
30
- // Appearance
31
- // ------------------------------
32
- shadow: {
33
- control: { type: 'select' },
34
- options: ComponentShadowOptions,
35
- description: 'Component Shadow',
36
- table: { category: 'API', subcategory: 'Appearance', defaultValue: { summary: '1' } },
37
- },
38
- color: {
39
- control: { type: 'select' },
40
- options: cardColorOptions,
41
- description: 'Color theme token',
42
- table: { category: 'API', subcategory: 'Appearance', defaultValue: { summary: 'default' } },
43
- },
44
- variant: {
45
- control: { type: 'select' },
46
- options: componentVariantOptions,
47
- description: 'Visual variant of the card',
48
- table: { category: 'API', subcategory: 'Appearance', defaultValue: { summary: 'text' } },
49
- },
50
- roundness: {
51
- control: { type: 'select' },
52
- options: componentRoundnessOptions,
53
- description: 'Border radius token',
54
- table: { category: 'API', subcategory: 'Appearance' },
55
- },
56
- outline: {
57
- control: { type: 'boolean' },
58
- description: 'Render outlined style',
59
- table: { category: 'API', subcategory: 'Appearance' },
60
- },
61
- active: {
62
- control: { type: 'boolean' },
63
- description: 'Add mouse hover and active effects',
64
- table: { category: 'API', subcategory: 'Appearance' },
65
- },
66
- theme: {
67
- control: { type: 'select' },
68
- options: componentThemeColorsOptions,
69
- description: 'Theme color',
70
- table: { category: 'API', subcategory: 'Base', defaultValue: { summary: 'undefined' } },
71
- },
72
- };
73
-
74
- // ------------------------------
75
- // Storybook Meta
76
- // ------------------------------
77
- const { Story } = defineMeta({
78
- component: Card,
79
- tags: ['autodocs'],
80
- argTypes: storyCardArgTypes,
81
- parameters: {
82
- docs: {
83
- description: {
84
- component: description,
85
- },
86
- },
87
- },
88
- });
89
- </script>
90
-
91
- <!-- ------------------------------ -->
92
- <!-- Stories -->
93
- <!-- ------------------------------ -->
94
-
95
- <Story name="Default"><p>Hello there</p></Story>
96
-
97
- <Story name="Color" args={{ color: 'safe' }}><p>Hello there</p></Story>
98
-
99
- <Story name="Active" args={{ color: 'primary', active: true }}><p>Hello there</p></Story>
100
-
101
- <Story name="Solid" args={{ color: 'primary', variant: 'solid' }}><p>Hello there</p></Story>
102
-
103
- <Story name="Outline" args={{ outline: true, shadow: 0 }}><p>Hello there</p></Story>
104
-
105
- <Story name="Fixed Size" args={{ height: '200px', width: '250px' }}><p>Hello there</p></Story>
106
-
107
- <Story name="Light Theme" args={{ theme: 'light' }}>
108
- <p>Hello there</p>
109
- </Story>
110
-
111
- <Story name="Dark Theme" args={{ theme: 'dark' }} globals={{ backgrounds: { value: 'dark' } }}>
112
- <p>Hello there</p>
113
- </Story>
@@ -1,22 +0,0 @@
1
- import Card from './Card.svelte';
2
- import type { CardProps } from './Card.svelte';
3
- import type { ArgTypes } from 'storybook/internal/csf';
4
- export declare const storyCardArgTypes: Partial<ArgTypes<CardProps>>;
5
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
6
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
7
- $$bindings?: Bindings;
8
- } & Exports;
9
- (internal: unknown, props: {
10
- $$events?: Events;
11
- $$slots?: Slots;
12
- }): Exports & {
13
- $set?: any;
14
- $on?: any;
15
- };
16
- z_$$bindings?: Bindings;
17
- }
18
- declare const Card: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
19
- [evt: string]: CustomEvent<any>;
20
- }, {}, {}, string>;
21
- type Card = InstanceType<typeof Card>;
22
- export default Card;
@@ -1,66 +0,0 @@
1
- <script module lang="ts">
2
- import { defineMeta } from '@storybook/addon-svelte-csf';
3
- import Column, { gridColumnSizeOptions } from './Column.svelte';
4
- import type { GridColumnProps } from './Column.svelte';
5
- import type { ArgTypes } from 'storybook/internal/csf';
6
-
7
- // ------------------------------
8
- // Storybook ArgTypes
9
- // ------------------------------
10
- export const storyColumnArgTypes: Partial<ArgTypes<GridColumnProps>> = {
11
- // ------------------------------
12
- // Core
13
- // ------------------------------
14
- children: { table: { category: 'API', subcategory: 'Base' } },
15
- class: { table: { category: 'API', subcategory: 'Base' } },
16
-
17
- // ------------------------------
18
- // Size
19
- // ------------------------------
20
- size: {
21
- control: { type: 'select' },
22
- options: gridColumnSizeOptions,
23
- table: { category: 'API', subcategory: 'Size', defaultValue: { summary: '12' } },
24
- },
25
- sm: {
26
- control: { type: 'select' },
27
- options: gridColumnSizeOptions,
28
- table: { category: 'API', subcategory: 'Size' },
29
- },
30
- md: {
31
- control: { type: 'select' },
32
- options: gridColumnSizeOptions,
33
- table: { category: 'API', subcategory: 'Size' },
34
- },
35
- lg: {
36
- control: { type: 'select' },
37
- options: gridColumnSizeOptions,
38
- table: { category: 'API', subcategory: 'Size' },
39
- },
40
- xl: {
41
- control: { type: 'select' },
42
- options: gridColumnSizeOptions,
43
- table: { category: 'API', subcategory: 'Size' },
44
- },
45
- xxl: {
46
- control: { type: 'select' },
47
- options: gridColumnSizeOptions,
48
- table: { category: 'API', subcategory: 'Size' },
49
- },
50
- };
51
-
52
- // ------------------------------
53
- // Storybook Meta
54
- // ------------------------------
55
- const { Story } = defineMeta({
56
- component: Column,
57
- tags: ['autodocs'],
58
- argTypes: storyColumnArgTypes,
59
- });
60
- </script>
61
-
62
- <!-- ------------------------------ -->
63
- <!-- Stories -->
64
- <!-- ------------------------------ -->
65
-
66
- <Story name="Default">Hello there</Story>
@@ -1,22 +0,0 @@
1
- import Column from './Column.svelte';
2
- import type { GridColumnProps } from './Column.svelte';
3
- import type { ArgTypes } from 'storybook/internal/csf';
4
- export declare const storyColumnArgTypes: Partial<ArgTypes<GridColumnProps>>;
5
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
6
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
7
- $$bindings?: Bindings;
8
- } & Exports;
9
- (internal: unknown, props: {
10
- $$events?: Events;
11
- $$slots?: Slots;
12
- }): Exports & {
13
- $set?: any;
14
- $on?: any;
15
- };
16
- z_$$bindings?: Bindings;
17
- }
18
- declare const Column: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
19
- [evt: string]: CustomEvent<any>;
20
- }, {}, {}, string>;
21
- type Column = InstanceType<typeof Column>;
22
- export default Column;
@@ -1,192 +0,0 @@
1
- <script module lang="ts">
2
- import { defineMeta } from '@storybook/addon-svelte-csf';
3
- import Grid from './Grid.svelte';
4
- import type { GridProps } from './Grid.svelte';
5
- import type { ArgTypes } from 'storybook/internal/csf';
6
- import Column from './Column/Column.svelte';
7
- import Card from '../Card/Card.svelte';
8
- import Row from './Row/Row.svelte';
9
-
10
- const description = `
11
- a set of components for your basic "12 column grid" needs
12
-
13
- \`\`\`ts
14
- import { Grid, Column, Row } from '@flightlesslabs/dodo-ui';
15
- \`\`\`
16
- `;
17
-
18
- // ------------------------------
19
- // Storybook ArgTypes
20
- // ------------------------------
21
- export const storyGridArgTypes: Partial<ArgTypes<GridProps>> = {
22
- // ------------------------------
23
- // Core
24
- // ------------------------------
25
- children: { table: { category: 'API', subcategory: 'Base' } },
26
- class: { table: { category: 'API', subcategory: 'Base' } },
27
- gap: { table: { category: 'API', subcategory: 'Base', defaultValue: { summary: '1' } } },
28
- };
29
-
30
- // ------------------------------
31
- // Storybook Meta
32
- // ------------------------------
33
- const { Story } = defineMeta({
34
- component: Grid,
35
- tags: ['autodocs'],
36
- argTypes: storyGridArgTypes,
37
- parameters: {
38
- docs: {
39
- description: {
40
- component: description,
41
- },
42
- },
43
- },
44
- });
45
- </script>
46
-
47
- <!-- ------------------------------ -->
48
- <!-- Stories -->
49
- <!-- ------------------------------ -->
50
-
51
- <!-- Basic 12 column grid -->
52
- <Story name="Default">
53
- <Column sm={4}>Hello there</Column>
54
- <Column sm={4}>Hello there</Column>
55
- <Column sm={4}>Hello there</Column>
56
- <Column sm={4}>Hello there</Column>
57
- <Column sm={4}>Hello there</Column>
58
- </Story>
59
-
60
- <Story name="Example">
61
- <Column sm={4}>
62
- <Card color="primary">
63
- <p>Hello there</p>
64
- </Card>
65
- </Column>
66
- <Column sm={4}>
67
- <Card color="primary">
68
- <p>Hello there</p>
69
- </Card>
70
- </Column>
71
- <Column sm={4}>
72
- <Card color="primary">
73
- <p>Hello there</p>
74
- </Card>
75
- </Column>
76
- <Column sm={4}>
77
- <Card color="primary">
78
- <p>Hello there</p>
79
- </Card>
80
- </Column>
81
- </Story>
82
-
83
- <Story name="Grid Row">
84
- <Row>
85
- <Column sm={6} md={4} lg={3}>
86
- <Card color="primary">
87
- <p>Hello there</p>
88
- </Card>
89
- </Column>
90
- <Column sm={6} md={4} lg={3}>
91
- <Card color="primary">
92
- <p>Hello there</p>
93
- </Card>
94
- </Column>
95
- <Column sm={6} md={4} lg={3}>
96
- <Card color="primary">
97
- <p>Hello there</p>
98
- </Card>
99
- </Column>
100
- </Row>
101
- <Row>
102
- <Column sm={6} md={4} lg={3}>
103
- <Card color="primary">
104
- <p>Hello there</p>
105
- </Card>
106
- </Column>
107
- <Column sm={6} md={4} lg={3}>
108
- <Card color="primary">
109
- <p>Hello there</p>
110
- </Card>
111
- </Column>
112
- <Column sm={6} md={4} lg={3}>
113
- <Card color="primary">
114
- <p>Hello there</p>
115
- </Card>
116
- </Column>
117
- </Row>
118
- </Story>
119
-
120
- <Story name="Gap" args={{ gap: 2 }}>
121
- <Column sm={4}>
122
- <Card color="primary">
123
- <p>Hello there</p>
124
- </Card>
125
- </Column>
126
- <Column sm={4}>
127
- <Card color="primary">
128
- <p>Hello there</p>
129
- </Card>
130
- </Column>
131
- <Column sm={4}>
132
- <Card color="primary">
133
- <p>Hello there</p>
134
- </Card>
135
- </Column>
136
- <Column sm={4}>
137
- <Card color="primary">
138
- <p>Hello there</p>
139
- </Card>
140
- </Column>
141
- </Story>
142
-
143
- <Story name="Responsive">
144
- <Column sm={6} md={4} lg={3}>
145
- <Card color="primary">
146
- <p>Hello there</p>
147
- </Card>
148
- </Column>
149
- <Column sm={6} md={4} lg={3}>
150
- <Card color="primary">
151
- <p>Hello there</p>
152
- </Card>
153
- </Column>
154
- <Column sm={6} md={4} lg={3}>
155
- <Card color="primary">
156
- <p>Hello there</p>
157
- </Card>
158
- </Column>
159
- <Column sm={6} md={4} lg={3}>
160
- <Card color="primary">
161
- <p>Hello there</p>
162
- </Card>
163
- </Column>
164
- <Column sm={6} md={4} lg={3}>
165
- <Card color="primary">
166
- <p>Hello there</p>
167
- </Card>
168
- </Column>
169
- <Column sm={6} md={4} lg={3}>
170
- <Card color="primary">
171
- <p>Hello there</p>
172
- </Card>
173
- </Column>
174
- </Story>
175
-
176
- <Story name="Flex">
177
- <Column md="flex">
178
- <Card color="primary">
179
- <p>Hello there</p>
180
- </Card>
181
- </Column>
182
- <Column md={2}>
183
- <Card color="primary">
184
- <p>Hello there</p>
185
- </Card>
186
- </Column>
187
- <Column md={2}>
188
- <Card color="primary">
189
- <p>Hello there</p>
190
- </Card>
191
- </Column>
192
- </Story>
@@ -1,22 +0,0 @@
1
- import Grid from './Grid.svelte';
2
- import type { GridProps } from './Grid.svelte';
3
- import type { ArgTypes } from 'storybook/internal/csf';
4
- export declare const storyGridArgTypes: Partial<ArgTypes<GridProps>>;
5
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
6
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
7
- $$bindings?: Bindings;
8
- } & Exports;
9
- (internal: unknown, props: {
10
- $$events?: Events;
11
- $$slots?: Slots;
12
- }): Exports & {
13
- $set?: any;
14
- $on?: any;
15
- };
16
- z_$$bindings?: Bindings;
17
- }
18
- declare const Grid: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
19
- [evt: string]: CustomEvent<any>;
20
- }, {}, {}, string>;
21
- type Grid = InstanceType<typeof Grid>;
22
- export default Grid;
@@ -1,39 +0,0 @@
1
- <script module lang="ts">
2
- import { defineMeta } from '@storybook/addon-svelte-csf';
3
- import Row from './Row.svelte';
4
- import type { GridRowProps } from './Row.svelte';
5
- import type { ArgTypes } from 'storybook/internal/csf';
6
- import Column from '../Column/Column.svelte';
7
-
8
- // ------------------------------
9
- // Storybook ArgTypes
10
- // ------------------------------
11
- export const storyRowArgTypes: Partial<ArgTypes<GridRowProps>> = {
12
- // ------------------------------
13
- // Core
14
- // ------------------------------
15
- children: { table: { category: 'API', subcategory: 'Base' } },
16
- class: { table: { category: 'API', subcategory: 'Base' } },
17
- };
18
-
19
- // ------------------------------
20
- // Storybook Meta
21
- // ------------------------------
22
- const { Story } = defineMeta({
23
- component: Row,
24
- tags: ['autodocs'],
25
- argTypes: storyRowArgTypes,
26
- });
27
- </script>
28
-
29
- <!-- ------------------------------ -->
30
- <!-- Stories -->
31
- <!-- ------------------------------ -->
32
-
33
- <Story name="Default">
34
- <Column sm={4}>Hello there</Column>
35
- <Column sm={4}>Hello there</Column>
36
- <Column sm={4}>Hello there</Column>
37
- <Column sm={4}>Hello there</Column>
38
- <Column sm={4}>Hello there</Column>
39
- </Story>
@@ -1,22 +0,0 @@
1
- import Row from './Row.svelte';
2
- import type { GridRowProps } from './Row.svelte';
3
- import type { ArgTypes } from 'storybook/internal/csf';
4
- export declare const storyRowArgTypes: Partial<ArgTypes<GridRowProps>>;
5
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
6
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
7
- $$bindings?: Bindings;
8
- } & Exports;
9
- (internal: unknown, props: {
10
- $$events?: Events;
11
- $$slots?: Slots;
12
- }): Exports & {
13
- $set?: any;
14
- $on?: any;
15
- };
16
- z_$$bindings?: Bindings;
17
- }
18
- declare const Row: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
19
- [evt: string]: CustomEvent<any>;
20
- }, {}, {}, string>;
21
- type Row = InstanceType<typeof Row>;
22
- export default Row;
@@ -1,54 +0,0 @@
1
- <script module lang="ts">
2
- import { defineMeta } from '@storybook/addon-svelte-csf';
3
- import Theme from './Theme.svelte';
4
- import type { ThemeProps } from './Theme.svelte';
5
- import type { ArgTypes } from 'storybook/internal/csf';
6
- import { componentThemeOptions } from '../../../attributes/theme.js';
7
-
8
- const description = `
9
- Wrap your app at the root with Theme to provide a consistent light or dark class (based on system or override) to all child components
10
-
11
- \`\`\`ts
12
- import { Theme } from '@flightlesslabs/dodo-ui';
13
- \`\`\`
14
- `;
15
-
16
- /**
17
- * Storybook controls for Theme
18
- */
19
- export const ThemeArgTypes: Partial<ArgTypes<ThemeProps>> = {
20
- class: { table: { category: 'API', subcategory: 'Base' } },
21
- type: {
22
- control: { type: 'select' },
23
- options: componentThemeOptions,
24
- description: 'Theme color type: auto by defualt',
25
- table: { category: 'API', subcategory: 'Base', defaultValue: { summary: 'auto' } },
26
- },
27
- global: {
28
- table: { category: 'API', subcategory: 'Base' },
29
- },
30
- };
31
-
32
- const { Story } = defineMeta({
33
- component: Theme,
34
- tags: ['autodocs'],
35
- argTypes: ThemeArgTypes,
36
- parameters: {
37
- docs: {
38
- description: {
39
- component: description,
40
- },
41
- },
42
- },
43
- });
44
- </script>
45
-
46
- <!-- ------------------------------ -->
47
- <!-- Stories -->
48
- <!-- ------------------------------ -->
49
-
50
- <Story name="Default"></Story>
51
-
52
- <Story name="Light" args={{ type: 'light' }}></Story>
53
-
54
- <Story name="Dark" args={{ type: 'dark' }} globals={{ backgrounds: { value: 'dark' } }}></Story>
@@ -1,25 +0,0 @@
1
- import Theme from './Theme.svelte';
2
- import type { ThemeProps } from './Theme.svelte';
3
- import type { ArgTypes } from 'storybook/internal/csf';
4
- /**
5
- * Storybook controls for Theme
6
- */
7
- export declare const ThemeArgTypes: Partial<ArgTypes<ThemeProps>>;
8
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
9
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
10
- $$bindings?: Bindings;
11
- } & Exports;
12
- (internal: unknown, props: {
13
- $$events?: Events;
14
- $$slots?: Slots;
15
- }): Exports & {
16
- $set?: any;
17
- $on?: any;
18
- };
19
- z_$$bindings?: Bindings;
20
- }
21
- declare const Theme: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
22
- [evt: string]: CustomEvent<any>;
23
- }, {}, {}, string>;
24
- type Theme = InstanceType<typeof Theme>;
25
- export default Theme;
@@ -1,35 +0,0 @@
1
- # 🎨 Theme System
2
-
3
- A lightweight theme system built using context + local store.
4
-
5
- ## 🧩 Theme Context
6
-
7
- ### 📦 Import
8
-
9
- ```ts
10
- import { useThemeContext } from '@flightlesslabs/dodo-ui';
11
- ```
12
-
13
- Provides access to the active theme.
14
-
15
- ### Usage
16
-
17
- ```ts
18
- const { theme } = useThemeContext();
19
- ```
20
-
21
- ## 🏪 Theme Store
22
-
23
- Global theme state.
24
-
25
- ### 📦 Import
26
-
27
- ```ts
28
- import { useThemeStore } from '@flightlesslabs/dodo-ui';
29
- ```
30
-
31
- ### Read
32
-
33
- ```ts
34
- const theme = useThemeStore.theme;
35
- ```