daleui 0.0.2 → 0.0.5
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.
- package/README.md +43 -0
- package/dist/check-DEVerfH5.js +72 -0
- package/dist/components/Box/Box.d.ts +34 -0
- package/dist/components/Box/Box.js +34 -0
- package/dist/components/Button/Button.d.ts +37 -0
- package/dist/components/Button/Button.js +367 -0
- package/dist/components/Card/Card.d.ts +68 -0
- package/dist/components/Card/Card.js +132 -0
- package/dist/components/Checkbox/Checkbox.d.ts +34 -0
- package/dist/components/Checkbox/Checkbox.js +657 -0
- package/dist/components/Flex/Flex.d.ts +361 -0
- package/dist/components/Flex/Flex.js +65 -0
- package/dist/components/HStack/HStack.d.ts +23 -0
- package/dist/components/HStack/HStack.js +35 -0
- package/dist/components/Heading/Heading.d.ts +33 -0
- package/dist/components/Heading/Heading.js +67 -0
- package/dist/components/Icon/Icon.d.ts +20 -0
- package/dist/components/Icon/Icon.js +325 -0
- package/dist/components/Label/Label.d.ts +35 -0
- package/dist/components/Label/Label.js +74 -0
- package/dist/components/Link/Link.d.ts +33 -0
- package/dist/components/Link/Link.js +176 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +17 -0
- package/dist/components/PasswordInput/PasswordInput.js +151 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +82 -0
- package/dist/components/RadioGroup/RadioGroup.js +713 -0
- package/dist/components/Select/Select.d.ts +39 -0
- package/dist/components/Select/Select.js +222 -0
- package/dist/components/Tag/Tag.d.ts +26 -0
- package/dist/components/Tag/Tag.js +189 -0
- package/dist/components/Text/Text.d.ts +22 -0
- package/dist/components/Text/Text.js +115 -0
- package/dist/components/TextInput/TextInput.d.ts +21 -0
- package/dist/components/TextInput/TextInput.js +106 -0
- package/dist/components/VStack/VStack.d.ts +23 -0
- package/dist/components/VStack/VStack.js +35 -0
- package/dist/css-QiVVeZaw.js +212 -0
- package/dist/cva-BrKodHDH.js +57 -0
- package/dist/cx-DN21T1EH.js +9 -0
- package/dist/hstack-cCrHxysi.js +43 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +37 -0
- package/dist/tokens/colors.d.ts +4 -0
- package/dist/tokens/iconography.d.ts +45 -0
- package/dist/tokens/spacing.d.ts +42 -0
- package/dist/tokens/typography.d.ts +312 -0
- package/dist/use-locale-context-DYXE7B4r.js +775 -0
- package/package.json +62 -39
- package/styled-system/css/conditions.mjs +36 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.mjs +45 -0
- package/styled-system/css/cva.d.ts +6 -0
- package/styled-system/css/cva.mjs +87 -0
- package/styled-system/css/cx.d.ts +5 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +5 -0
- package/styled-system/css/index.mjs +4 -0
- package/styled-system/css/sva.d.ts +4 -0
- package/styled-system/css/sva.mjs +46 -0
- package/styled-system/helpers.mjs +316 -0
- package/styled-system/patterns/aspect-ratio.d.ts +20 -0
- package/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/styled-system/patterns/bleed.d.ts +21 -0
- package/styled-system/patterns/bleed.mjs +24 -0
- package/styled-system/patterns/box.d.ts +20 -0
- package/styled-system/patterns/box.mjs +15 -0
- package/styled-system/patterns/center.d.ts +20 -0
- package/styled-system/patterns/center.mjs +21 -0
- package/styled-system/patterns/circle.d.ts +20 -0
- package/styled-system/patterns/circle.mjs +25 -0
- package/styled-system/patterns/container.d.ts +20 -0
- package/styled-system/patterns/container.mjs +21 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.mjs +21 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.mjs +25 -0
- package/styled-system/patterns/flex.d.ts +26 -0
- package/styled-system/patterns/flex.mjs +26 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.mjs +52 -0
- package/styled-system/patterns/grid-item.d.ts +25 -0
- package/styled-system/patterns/grid-item.mjs +25 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.mjs +27 -0
- package/styled-system/patterns/hstack.d.ts +21 -0
- package/styled-system/patterns/hstack.mjs +24 -0
- package/styled-system/patterns/index.d.ts +21 -0
- package/styled-system/patterns/index.mjs +20 -0
- package/styled-system/patterns/link-overlay.d.ts +20 -0
- package/styled-system/patterns/link-overlay.mjs +24 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.mjs +21 -0
- package/styled-system/patterns/square.d.ts +20 -0
- package/styled-system/patterns/square.mjs +24 -0
- package/styled-system/patterns/stack.d.ts +23 -0
- package/styled-system/patterns/stack.mjs +24 -0
- package/styled-system/patterns/visually-hidden.d.ts +20 -0
- package/styled-system/patterns/visually-hidden.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +21 -0
- package/styled-system/patterns/vstack.mjs +24 -0
- package/styled-system/patterns/wrap.d.ts +24 -0
- package/styled-system/patterns/wrap.mjs +25 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.mjs +3176 -0
- package/styled-system/tokens/tokens.d.ts +63 -0
- package/styled-system/types/composition.d.ts +224 -0
- package/styled-system/types/conditions.d.ts +310 -0
- package/styled-system/types/csstype.d.ts +21298 -0
- package/styled-system/types/global.d.ts +20 -0
- package/styled-system/types/index.d.ts +7 -0
- package/styled-system/types/parts.d.ts +8 -0
- package/styled-system/types/pattern.d.ts +78 -0
- package/styled-system/types/prop-type.d.ts +265 -0
- package/styled-system/types/recipe.d.ts +181 -0
- package/styled-system/types/selectors.d.ts +59 -0
- package/styled-system/types/static-css.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +7504 -0
- package/styled-system/types/system-types.d.ts +269 -0
- package/.github/CODEOWNERS +0 -1
- package/.github/FUNDING.yml +0 -1
- package/.github/workflows/automation.yml +0 -13
- package/.github/workflows/chromatic.yml +0 -19
- package/.github/workflows/deployment.yml +0 -32
- package/.github/workflows/integration.yml +0 -15
- package/.github/workflows/storybook-tests.yml +0 -17
- package/.storybook/main.ts +0 -18
- package/.storybook/preview.ts +0 -29
- package/.storybook/test-runner.ts +0 -33
- package/bun.lock +0 -2099
- package/chromatic.config.json +0 -5
- package/eslint.config.js +0 -28
- package/index.html +0 -13
- package/panda.config.ts +0 -61
- package/postcss.config.cjs +0 -5
- package/public/logo.svg +0 -9
- package/src/App.tsx +0 -67
- package/src/assets/Discord.svg +0 -1
- package/src/assets/GitHub.svg +0 -1
- package/src/assets/LinkedIn.svg +0 -1
- package/src/assets/Medium.svg +0 -1
- package/src/assets/YouTube.svg +0 -1
- package/src/components/Button/Button.stories.tsx +0 -115
- package/src/components/Button/Button.test.tsx +0 -108
- package/src/components/Button/Button.tsx +0 -245
- package/src/components/Button/index.tsx +0 -1
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -129
- package/src/components/Checkbox/Checkbox.test.tsx +0 -169
- package/src/components/Checkbox/Checkbox.tsx +0 -190
- package/src/components/Heading/Heading.stories.tsx +0 -72
- package/src/components/Heading/Heading.test.tsx +0 -55
- package/src/components/Heading/Heading.tsx +0 -73
- package/src/components/Heading/index.tsx +0 -1
- package/src/components/Icon/Icon.stories.tsx +0 -106
- package/src/components/Icon/Icon.test.tsx +0 -44
- package/src/components/Icon/Icon.tsx +0 -116
- package/src/components/Icon/index.tsx +0 -1
- package/src/components/Text/Text.stories.tsx +0 -65
- package/src/components/Text/Text.test.tsx +0 -54
- package/src/components/Text/Text.tsx +0 -93
- package/src/components/Text/index.tsx +0 -1
- package/src/index.css +0 -2
- package/src/main.tsx +0 -10
- package/src/setupTests.tsx +0 -5
- package/src/styles/globalCss.ts +0 -43
- package/src/tokens/colors.mdx +0 -100
- package/src/tokens/colors.ts +0 -288
- package/src/tokens/iconography.mdx +0 -15
- package/src/tokens/iconography.tsx +0 -54
- package/src/tokens/typography.mdx +0 -38
- package/src/tokens/typography.ts +0 -132
- package/src/vite-env.d.ts +0 -2
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -22
- package/vite.config.ts +0 -16
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue, Nested } from './conditions';
|
|
3
|
+
import type { AtRule, Globals, PropertiesFallback } from './csstype';
|
|
4
|
+
import type { SystemProperties, CssVarProperties } from './style-props';
|
|
5
|
+
|
|
6
|
+
type String = string & {}
|
|
7
|
+
type Number = number & {}
|
|
8
|
+
|
|
9
|
+
export type Pretty<T> = { [K in keyof T]: T[K] } & {}
|
|
10
|
+
|
|
11
|
+
export type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never
|
|
12
|
+
|
|
13
|
+
export type DistributiveUnion<T, U> = {
|
|
14
|
+
[K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]
|
|
15
|
+
} & DistributiveOmit<U, keyof T>
|
|
16
|
+
|
|
17
|
+
export type Assign<T, U> = {
|
|
18
|
+
[K in keyof T]: K extends keyof U ? U[K] : T[K]
|
|
19
|
+
} & U
|
|
20
|
+
|
|
21
|
+
/* -----------------------------------------------------------------------------
|
|
22
|
+
* Native css properties
|
|
23
|
+
* -----------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
type DashedIdent = `--${string}`
|
|
26
|
+
|
|
27
|
+
type StringToMultiple<T extends string> = T | `${T}, ${T}`
|
|
28
|
+
|
|
29
|
+
export type PositionAreaAxis =
|
|
30
|
+
| 'left'
|
|
31
|
+
| 'center'
|
|
32
|
+
| 'right'
|
|
33
|
+
| 'x-start'
|
|
34
|
+
| 'x-end'
|
|
35
|
+
| 'span-x-start'
|
|
36
|
+
| 'span-x-end'
|
|
37
|
+
| 'x-self-start'
|
|
38
|
+
| 'x-self-end'
|
|
39
|
+
| 'span-x-self-start'
|
|
40
|
+
| 'span-x-self-end'
|
|
41
|
+
| 'span-all'
|
|
42
|
+
| 'top'
|
|
43
|
+
| 'bottom'
|
|
44
|
+
| 'span-top'
|
|
45
|
+
| 'span-bottom'
|
|
46
|
+
| 'y-start'
|
|
47
|
+
| 'y-end'
|
|
48
|
+
| 'span-y-start'
|
|
49
|
+
| 'span-y-end'
|
|
50
|
+
| 'y-self-start'
|
|
51
|
+
| 'y-self-end'
|
|
52
|
+
| 'span-y-self-start'
|
|
53
|
+
| 'span-y-self-end'
|
|
54
|
+
| 'block-start'
|
|
55
|
+
| 'block-end'
|
|
56
|
+
| 'span-block-start'
|
|
57
|
+
| 'span-block-end'
|
|
58
|
+
| 'inline-start'
|
|
59
|
+
| 'inline-end'
|
|
60
|
+
| 'span-inline-start'
|
|
61
|
+
| 'span-inline-end'
|
|
62
|
+
| 'self-block-start'
|
|
63
|
+
| 'self-block-end'
|
|
64
|
+
| 'span-self-block-start'
|
|
65
|
+
| 'span-self-block-end'
|
|
66
|
+
| 'self-inline-start'
|
|
67
|
+
| 'self-inline-end'
|
|
68
|
+
| 'span-self-inline-start'
|
|
69
|
+
| 'span-self-inline-end'
|
|
70
|
+
| 'start'
|
|
71
|
+
| 'end'
|
|
72
|
+
| 'span-start'
|
|
73
|
+
| 'span-end'
|
|
74
|
+
| 'self-start'
|
|
75
|
+
| 'self-end'
|
|
76
|
+
| 'span-self-start'
|
|
77
|
+
| 'span-self-end'
|
|
78
|
+
|
|
79
|
+
type PositionTry =
|
|
80
|
+
| 'normal'
|
|
81
|
+
| 'flip-block'
|
|
82
|
+
| 'flip-inline'
|
|
83
|
+
| 'top'
|
|
84
|
+
| 'bottom'
|
|
85
|
+
| 'left'
|
|
86
|
+
| 'right'
|
|
87
|
+
| 'block-start'
|
|
88
|
+
| 'block-end'
|
|
89
|
+
| 'inline-start'
|
|
90
|
+
| 'inline-end'
|
|
91
|
+
| DashedIdent
|
|
92
|
+
|
|
93
|
+
export interface ModernCssProperties {
|
|
94
|
+
/**
|
|
95
|
+
* Defines a name for the anchor element that can be referenced by positioned elements.
|
|
96
|
+
*/
|
|
97
|
+
anchorName?: Globals | 'none' | DashedIdent | StringToMultiple<DashedIdent>
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Defines the scope of anchor names within the element.
|
|
101
|
+
*/
|
|
102
|
+
anchorScope?: Globals | 'none' | 'all' | DashedIdent | StringToMultiple<DashedIdent>
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Controls how form elements size themselves.
|
|
106
|
+
*/
|
|
107
|
+
fieldSizing?: Globals | 'fixed' | 'content'
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Controls whether interpolation of size values should allow keywords.
|
|
111
|
+
*/
|
|
112
|
+
interpolateSize?: Globals | 'allow-keywords' | 'numeric-only'
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Specifies the anchor element that this positioned element should be positioned relative to.
|
|
116
|
+
*/
|
|
117
|
+
positionAnchor?: Globals | 'auto' | DashedIdent
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Specifies the area within the anchor element where this positioned element should be placed.
|
|
121
|
+
*/
|
|
122
|
+
positionArea?: Globals | 'auto' | PositionAreaAxis | `${PositionAreaAxis} ${PositionAreaAxis}` | String
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Specifies the position try options for the element.
|
|
126
|
+
*/
|
|
127
|
+
positionTry?: Globals | StringToMultiple<PositionTry> | String
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Specifies fallback position try options when the primary position fails.
|
|
131
|
+
*/
|
|
132
|
+
positionTryFallback?: Globals | 'none' | StringToMultiple<PositionTry> | String
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Specifies the order in which position try options should be attempted.
|
|
136
|
+
*/
|
|
137
|
+
positionTryOrder?: Globals | 'normal' | 'most-width' | 'most-height' | 'most-block-size' | 'most-inline-size'
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Controls when the positioned element should be visible.
|
|
141
|
+
*/
|
|
142
|
+
positionVisibility?: Globals | 'always' | 'anchors-visible' | 'no-overflow'
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Controls whether text should wrap or not.
|
|
146
|
+
*/
|
|
147
|
+
textWrapMode?: Globals | 'wrap' | 'nowrap'
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Controls trimming of spacing in text.
|
|
151
|
+
*/
|
|
152
|
+
textSpacingTrim?: Globals | 'normal' | 'space-all' | 'space-first' | 'trim-start'
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Controls the style of text wrapping.
|
|
156
|
+
*/
|
|
157
|
+
textWrapStyle?: Globals | 'auto' | 'balance' | 'pretty' | 'stable'
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Controls whether the entire element should be draggable instead of its contents.
|
|
161
|
+
*/
|
|
162
|
+
WebkitUserDrag?: Globals | 'auto' | 'element' | 'none'
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Specifies whether an element can be used to drag the entire app window (Electron).
|
|
166
|
+
*/
|
|
167
|
+
WebkitAppRegion?: Globals | 'drag' | 'no-drag'
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Sets the horizontal spacing between table borders.
|
|
171
|
+
*/
|
|
172
|
+
WebkitBorderHorizontalSpacing?: Globals | String | Number
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Sets the vertical spacing between table borders.
|
|
176
|
+
*/
|
|
177
|
+
WebkitBorderVerticalSpacing?: Globals | String | Number
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Controls the display of text content for security purposes (e.g., password fields).
|
|
181
|
+
*/
|
|
182
|
+
WebkitTextSecurity?: Globals | 'none' | 'circle' | 'disc' | 'square'
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type CssProperty = keyof PropertiesFallback
|
|
186
|
+
|
|
187
|
+
export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties, ModernCssProperties {}
|
|
188
|
+
|
|
189
|
+
export interface CssKeyframes {
|
|
190
|
+
[name: string]: {
|
|
191
|
+
[time: string]: CssProperties
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* -----------------------------------------------------------------------------
|
|
196
|
+
* Conditional css properties
|
|
197
|
+
* -----------------------------------------------------------------------------*/
|
|
198
|
+
|
|
199
|
+
interface GenericProperties {
|
|
200
|
+
[key: string]: ConditionalValue<String | Number | boolean>
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* -----------------------------------------------------------------------------
|
|
204
|
+
* Native css props
|
|
205
|
+
* -----------------------------------------------------------------------------*/
|
|
206
|
+
|
|
207
|
+
export type NestedCssProperties = Nested<CssProperties>
|
|
208
|
+
|
|
209
|
+
export type SystemStyleObject = Omit<Nested<SystemProperties & CssVarProperties>, 'base'>
|
|
210
|
+
|
|
211
|
+
export interface GlobalStyleObject {
|
|
212
|
+
[selector: string]: SystemStyleObject
|
|
213
|
+
}
|
|
214
|
+
export interface ExtendableGlobalStyleObject {
|
|
215
|
+
[selector: string]: SystemStyleObject | undefined
|
|
216
|
+
extend?: GlobalStyleObject | undefined
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* -----------------------------------------------------------------------------
|
|
220
|
+
* Composition (text styles, layer styles)
|
|
221
|
+
* -----------------------------------------------------------------------------*/
|
|
222
|
+
|
|
223
|
+
type FilterStyleObject<P extends string> = {
|
|
224
|
+
[K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>
|
|
228
|
+
|
|
229
|
+
/* -----------------------------------------------------------------------------
|
|
230
|
+
* Font face
|
|
231
|
+
* -----------------------------------------------------------------------------*/
|
|
232
|
+
|
|
233
|
+
export type GlobalFontfaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>
|
|
234
|
+
|
|
235
|
+
export type FontfaceRule = Omit<GlobalFontfaceRule, 'fontFamily'>
|
|
236
|
+
|
|
237
|
+
export interface GlobalFontface {
|
|
238
|
+
[name: string]: FontfaceRule | FontfaceRule[]
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface ExtendableGlobalFontface {
|
|
242
|
+
[name: string]: FontfaceRule | FontfaceRule[] | GlobalFontface | undefined
|
|
243
|
+
extend?: GlobalFontface | undefined
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* -----------------------------------------------------------------------------
|
|
247
|
+
* Jsx style props
|
|
248
|
+
* -----------------------------------------------------------------------------*/
|
|
249
|
+
interface WithCss {
|
|
250
|
+
css?: SystemStyleObject | SystemStyleObject[]
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export type JsxStyleProps = SystemStyleObject & WithCss
|
|
254
|
+
|
|
255
|
+
export interface PatchedHTMLProps {
|
|
256
|
+
htmlWidth?: string | number
|
|
257
|
+
htmlHeight?: string | number
|
|
258
|
+
htmlTranslate?: 'yes' | 'no' | undefined
|
|
259
|
+
htmlContent?: string
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'
|
|
263
|
+
|
|
264
|
+
type WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps
|
|
265
|
+
|
|
266
|
+
export type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<
|
|
267
|
+
WithHTMLProps<T>,
|
|
268
|
+
P
|
|
269
|
+
>
|
package/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @DaleStudy/daleui
|
package/.github/FUNDING.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
github: DaleStudy
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: "Chromatic 🎨"
|
|
2
|
-
|
|
3
|
-
on: push
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
chromatic:
|
|
7
|
-
environment:
|
|
8
|
-
name: chromatic
|
|
9
|
-
url: https://${{ github.ref_name }}--675790d317ba346348aa3490.chromatic.com
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
with:
|
|
14
|
-
fetch-depth: 0
|
|
15
|
-
- uses: oven-sh/setup-bun@v2
|
|
16
|
-
- run: bun install
|
|
17
|
-
- uses: chromaui/action@latest
|
|
18
|
-
with:
|
|
19
|
-
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: Deployment 🚢
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
pages: write
|
|
10
|
-
id-token: write
|
|
11
|
-
|
|
12
|
-
concurrency:
|
|
13
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
-
cancel-in-progress: true
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
deploy:
|
|
18
|
-
environment:
|
|
19
|
-
name: github-pages
|
|
20
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
21
|
-
runs-on: ubuntu-latest
|
|
22
|
-
steps:
|
|
23
|
-
- uses: actions/checkout@v4
|
|
24
|
-
- uses: oven-sh/setup-bun@v2
|
|
25
|
-
- run: bun install
|
|
26
|
-
- run: bun run build
|
|
27
|
-
- uses: actions/configure-pages@v4
|
|
28
|
-
- uses: actions/upload-pages-artifact@v3
|
|
29
|
-
with:
|
|
30
|
-
path: "./dist"
|
|
31
|
-
- uses: actions/deploy-pages@v4
|
|
32
|
-
id: deployment
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: Integration 🔀
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
build:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- uses: actions/checkout@v4
|
|
11
|
-
- uses: oven-sh/setup-bun@v2
|
|
12
|
-
- run: bun install
|
|
13
|
-
- run: bun run lint
|
|
14
|
-
- run: bun run test run
|
|
15
|
-
- run: bun run build
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
name: Storybook Tests
|
|
2
|
-
|
|
3
|
-
on: deployment_status
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test-storybook:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
timeout-minutes: 60
|
|
9
|
-
if: github.event.deployment_status.environment == 'chromatic' && github.event.deployment_status.state == 'success'
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v4
|
|
12
|
-
- uses: oven-sh/setup-bun@v2
|
|
13
|
-
- run: bun install
|
|
14
|
-
- run: bunx playwright install --with-deps
|
|
15
|
-
- run: bun run test-storybook
|
|
16
|
-
env:
|
|
17
|
-
TARGET_URL: "${{ github.event.deployment_status.environment_url }}"
|
package/.storybook/main.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from "@storybook/react-vite";
|
|
2
|
-
|
|
3
|
-
const config: StorybookConfig = {
|
|
4
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
5
|
-
addons: [
|
|
6
|
-
"@storybook/addon-links",
|
|
7
|
-
"@storybook/addon-essentials",
|
|
8
|
-
"@chromatic-com/storybook",
|
|
9
|
-
"@storybook/addon-interactions",
|
|
10
|
-
"@storybook/addon-a11y",
|
|
11
|
-
"@storybook/addon-themes",
|
|
12
|
-
],
|
|
13
|
-
framework: {
|
|
14
|
-
name: "@storybook/react-vite",
|
|
15
|
-
options: {},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
export default config;
|
package/.storybook/preview.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import "../src/index.css";
|
|
2
|
-
import { withThemeByClassName } from "@storybook/addon-themes";
|
|
3
|
-
import type { Preview, ReactRenderer } from "@storybook/react";
|
|
4
|
-
|
|
5
|
-
const preview: Preview = {
|
|
6
|
-
parameters: {
|
|
7
|
-
controls: {
|
|
8
|
-
matchers: {
|
|
9
|
-
color: /(background|color)$/i,
|
|
10
|
-
date: /Date$/i,
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
docs: {
|
|
14
|
-
toc: true,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
decorators: [
|
|
18
|
-
withThemeByClassName<ReactRenderer>({
|
|
19
|
-
themes: {
|
|
20
|
-
light: "",
|
|
21
|
-
dark: "dark",
|
|
22
|
-
},
|
|
23
|
-
defaultTheme: "light",
|
|
24
|
-
}),
|
|
25
|
-
],
|
|
26
|
-
tags: ["autodocs"],
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default preview;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { TestRunnerConfig } from "@storybook/test-runner";
|
|
2
|
-
import { getStoryContext } from "@storybook/test-runner";
|
|
3
|
-
|
|
4
|
-
import { injectAxe, checkA11y, configureAxe } from "axe-playwright";
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* See https://storybook.js.org/docs/writing-tests/test-runner#test-hook-api
|
|
8
|
-
* to learn more about the test-runner hooks API.
|
|
9
|
-
*/
|
|
10
|
-
const config: TestRunnerConfig = {
|
|
11
|
-
async preVisit(page) {
|
|
12
|
-
await injectAxe(page);
|
|
13
|
-
},
|
|
14
|
-
async postVisit(page, context) {
|
|
15
|
-
// Get the entire context of a story, including parameters, args, argTypes, etc.
|
|
16
|
-
const storyContext = await getStoryContext(page, context);
|
|
17
|
-
|
|
18
|
-
// Apply story-level a11y rules
|
|
19
|
-
await configureAxe(page, {
|
|
20
|
-
rules: storyContext.parameters?.a11y?.config?.rules,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const element = storyContext.parameters?.a11y?.element ?? "#storybook-root";
|
|
24
|
-
await checkA11y(page, element, {
|
|
25
|
-
detailedReport: true,
|
|
26
|
-
detailedReportOptions: {
|
|
27
|
-
html: true,
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export default config;
|