@kalink-ui/seedly 0.8.1 → 0.10.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.
- package/CHANGELOG.md +20 -0
- package/package.json +26 -18
- package/src/components/box/box.css.ts +6 -15
- package/src/components/box/box.tsx +2 -2
- package/src/components/box/index.ts +1 -1
- package/src/components/button/button.css.ts +45 -48
- package/src/components/button/button.tsx +11 -8
- package/src/components/button/index.ts +1 -1
- package/src/components/button-icon/button-icon.css.ts +90 -0
- package/src/components/button-icon/button-icon.tsx +23 -0
- package/src/components/button-icon/index.ts +1 -0
- package/src/components/card/card.css.ts +42 -0
- package/src/components/card/card.tsx +76 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/center/center.css.ts +1 -1
- package/src/components/center/center.tsx +2 -2
- package/src/components/center/index.ts +1 -1
- package/src/components/cluster/cluster.css.ts +18 -1
- package/src/components/cluster/cluster.tsx +2 -2
- package/src/components/cluster/index.ts +1 -1
- package/src/components/cover/cover.css.ts +1 -1
- package/src/components/divider/divider.css.ts +11 -0
- package/src/components/divider/divider.tsx +11 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/form-field/form-field-context.ts +18 -0
- package/src/components/form-field/form-field-control.tsx +34 -0
- package/src/components/form-field/form-field-description.tsx +16 -0
- package/src/components/form-field/form-field-error.tsx +22 -0
- package/src/components/form-field/form-field-item-context.ts +6 -0
- package/src/components/form-field/form-field-item.tsx +28 -0
- package/src/components/form-field/form-field-label.tsx +27 -0
- package/src/components/form-field/form-field-message.tsx +33 -0
- package/src/components/form-field/form-field.css.ts +97 -0
- package/src/components/form-field/form-field.tsx +56 -0
- package/src/components/form-field/index.ts +9 -0
- package/src/components/frame/frame.css.ts +8 -8
- package/src/components/frame/frame.tsx +2 -6
- package/src/components/frame/index.ts +1 -1
- package/src/components/grid/grid.css.ts +1 -1
- package/src/components/heading/heading.css.ts +49 -2
- package/src/components/heading/heading.tsx +123 -69
- package/src/components/heading/index.ts +2 -1
- package/src/components/index.ts +27 -14
- package/src/components/input/index.ts +2 -0
- package/src/components/input/input-wrapper.tsx +58 -0
- package/src/components/input/input.css.ts +250 -0
- package/src/components/input/input.tsx +56 -0
- package/src/components/label/index.ts +1 -0
- package/src/components/label/label.css.ts +37 -0
- package/src/components/label/label.tsx +23 -0
- package/src/components/loader/index.ts +1 -0
- package/src/components/loader/loader.css.ts +109 -0
- package/src/components/loader/moon-loader.tsx +43 -0
- package/src/components/loader-overlay/index.ts +1 -0
- package/src/components/loader-overlay/loader-overlay.css.ts +35 -0
- package/src/components/loader-overlay/loader-overlay.tsx +28 -0
- package/src/components/menu/index.ts +2 -0
- package/src/components/menu/menu-item.css.ts +79 -0
- package/src/components/menu/menu-separator.css.ts +53 -0
- package/src/components/popover/index.ts +3 -0
- package/src/components/popover/popover-content.css.ts +107 -0
- package/src/components/popover/popover-content.tsx +78 -0
- package/src/components/popover/popover.tsx +6 -0
- package/src/components/scroll-area/index.ts +1 -0
- package/src/components/scroll-area/scroll-area.css.ts +72 -0
- package/src/components/scroll-area/scroll-area.tsx +39 -0
- package/src/components/scroll-area/scroll-bar.tsx +37 -0
- package/src/components/seed/index.ts +1 -1
- package/src/components/seed/seed.tsx +39 -2
- package/src/components/select/index.ts +5 -0
- package/src/components/select/select-content.css.ts +22 -0
- package/src/components/select/select-content.tsx +51 -0
- package/src/components/select/select-item.css.ts +24 -0
- package/src/components/select/select-item.tsx +24 -0
- package/src/components/select/select-root.tsx +14 -0
- package/src/components/select/select-trigger.css.ts +75 -0
- package/src/components/select/select-trigger.tsx +47 -0
- package/src/components/select/select.tsx +85 -0
- package/src/components/sheet/index.ts +5 -0
- package/src/components/sheet/sheet-content.css.ts +143 -0
- package/src/components/sheet/sheet-content.tsx +43 -0
- package/src/components/sheet/sheet-description.tsx +21 -0
- package/src/components/sheet/sheet-footer.tsx +15 -0
- package/src/components/sheet/sheet-header.css.ts +35 -0
- package/src/components/sheet/sheet-header.tsx +32 -0
- package/src/components/sheet/sheet-overlay.css.ts +43 -0
- package/src/components/sheet/sheet-overlay.tsx +14 -0
- package/src/components/sheet/sheet-title.tsx +31 -0
- package/src/components/sheet/sheet.tsx +8 -0
- package/src/components/stack/index.ts +1 -1
- package/src/components/stack/stack.tsx +2 -2
- package/src/components/text/index.ts +6 -0
- package/src/components/text/text.css.ts +173 -7
- package/src/components/text/text.tsx +19 -27
- package/src/components/text-field/index.ts +1 -0
- package/src/components/text-field/text-field.css.ts +3 -0
- package/src/components/text-field/text-field.tsx +64 -0
- package/src/components/textarea/index.ts +1 -0
- package/src/components/textarea/textarea-input.tsx +20 -0
- package/src/components/textarea/textarea.css.ts +10 -0
- package/src/components/textarea/textarea.tsx +69 -0
- package/src/styles/define-responsive-properties.ts +242 -0
- package/src/styles/extract-sprinkles-props.ts +29 -35
- package/src/styles/index.ts +9 -0
- package/src/styles/reset.css.ts +1 -0
- package/src/styles/system-contract.css.ts +0 -2
- package/src/styles/typography.css.ts +10 -5
- package/src/styles/visually-hidden.css.ts +21 -0
- package/build-storybook.log +0 -67
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ConditionalValue,
|
|
3
|
+
defineProperties,
|
|
4
|
+
} from '@vanilla-extract/sprinkles';
|
|
5
|
+
|
|
6
|
+
import { utilities } from './layers.css';
|
|
7
|
+
import { sys } from './system-contract.css';
|
|
8
|
+
|
|
9
|
+
interface ScreenMediaQueries {
|
|
10
|
+
sm: `screen and (min-width: ${string}px)`;
|
|
11
|
+
md: `screen and (min-width: ${string}px)`;
|
|
12
|
+
lg: `screen and (min-width: ${string}px)`;
|
|
13
|
+
xl: `screen and (min-width: ${string}px)`;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface DefineResponsivePropertiesArgs {
|
|
17
|
+
screen: ScreenMediaQueries;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const defineResponsiveProperties = ({
|
|
21
|
+
screen,
|
|
22
|
+
}: DefineResponsivePropertiesArgs) =>
|
|
23
|
+
defineProperties({
|
|
24
|
+
'@layer': utilities,
|
|
25
|
+
|
|
26
|
+
conditions: {
|
|
27
|
+
xs: {},
|
|
28
|
+
sm: { '@media': screen.sm },
|
|
29
|
+
md: { '@media': screen.md },
|
|
30
|
+
lg: { '@media': screen.lg },
|
|
31
|
+
xl: { '@media': screen.xl },
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
defaultCondition: 'xs',
|
|
35
|
+
responsiveArray: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
36
|
+
|
|
37
|
+
properties: {
|
|
38
|
+
display: [
|
|
39
|
+
'none',
|
|
40
|
+
'block',
|
|
41
|
+
'inline',
|
|
42
|
+
'inline-block',
|
|
43
|
+
'flex',
|
|
44
|
+
'inline-flex',
|
|
45
|
+
'grid',
|
|
46
|
+
'list-item',
|
|
47
|
+
],
|
|
48
|
+
paddingBlockStart: sys.spacing,
|
|
49
|
+
paddingBlockEnd: sys.spacing,
|
|
50
|
+
paddingInlineStart: sys.spacing,
|
|
51
|
+
paddingInlineEnd: sys.spacing,
|
|
52
|
+
|
|
53
|
+
marginBlockStart: sys.spacing,
|
|
54
|
+
marginBlockEnd: sys.spacing,
|
|
55
|
+
marginInlineStart: sys.spacing,
|
|
56
|
+
marginInlineEnd: sys.spacing,
|
|
57
|
+
|
|
58
|
+
columnGap: sys.spacing,
|
|
59
|
+
rowGap: sys.spacing,
|
|
60
|
+
|
|
61
|
+
flexDirection: ['row', 'row-reverse', 'column', 'column-reverse'],
|
|
62
|
+
|
|
63
|
+
justifyContent: [
|
|
64
|
+
'flex-start',
|
|
65
|
+
'flex-end',
|
|
66
|
+
'center',
|
|
67
|
+
'space-between',
|
|
68
|
+
'space-around',
|
|
69
|
+
],
|
|
70
|
+
alignItems: ['flex-start', 'flex-end', 'center', 'baseline', 'stretch'],
|
|
71
|
+
alignSelf: ['flex-start', 'flex-end', 'center', 'baseline', 'stretch'],
|
|
72
|
+
|
|
73
|
+
position: [
|
|
74
|
+
'absolute',
|
|
75
|
+
'relative',
|
|
76
|
+
'fixed',
|
|
77
|
+
'sticky',
|
|
78
|
+
'static',
|
|
79
|
+
'inherit',
|
|
80
|
+
],
|
|
81
|
+
insetBlockStart: sys.spacing,
|
|
82
|
+
insetBlockEnd: sys.spacing,
|
|
83
|
+
insetInlineStart: sys.spacing,
|
|
84
|
+
insetInlineEnd: sys.spacing,
|
|
85
|
+
|
|
86
|
+
textAlign: ['start', 'end', 'center', 'justify'],
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
shorthands: {
|
|
90
|
+
padding: [
|
|
91
|
+
'paddingBlockStart',
|
|
92
|
+
'paddingInlineEnd',
|
|
93
|
+
'paddingBlockEnd',
|
|
94
|
+
'paddingInlineStart',
|
|
95
|
+
],
|
|
96
|
+
paddingBlock: ['paddingBlockStart', 'paddingBlockEnd'],
|
|
97
|
+
paddingInline: ['paddingInlineEnd', 'paddingInlineStart'],
|
|
98
|
+
|
|
99
|
+
margin: [
|
|
100
|
+
'marginBlockStart',
|
|
101
|
+
'marginInlineEnd',
|
|
102
|
+
'marginBlockEnd',
|
|
103
|
+
'marginInlineStart',
|
|
104
|
+
],
|
|
105
|
+
marginBlock: ['marginBlockStart', 'marginBlockEnd'],
|
|
106
|
+
marginInline: ['marginInlineEnd', 'marginInlineStart'],
|
|
107
|
+
|
|
108
|
+
gap: ['rowGap', 'columnGap'],
|
|
109
|
+
|
|
110
|
+
inset: [
|
|
111
|
+
'insetBlockStart',
|
|
112
|
+
'insetInlineEnd',
|
|
113
|
+
'insetBlockEnd',
|
|
114
|
+
'insetInlineStart',
|
|
115
|
+
],
|
|
116
|
+
insetBlock: ['insetBlockStart', 'insetBlockEnd'],
|
|
117
|
+
insetInline: ['insetInlineEnd', 'insetInlineStart'],
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
type DefineResponsiveProperties = ReturnType<typeof defineResponsiveProperties>;
|
|
122
|
+
|
|
123
|
+
export type ResponsiveValue<Value extends string | number> = ConditionalValue<
|
|
124
|
+
DefineResponsiveProperties,
|
|
125
|
+
Value
|
|
126
|
+
>;
|
|
127
|
+
|
|
128
|
+
export type DisplayValues =
|
|
129
|
+
keyof DefineResponsiveProperties['styles']['display']['values'];
|
|
130
|
+
export type JustifyContentValues =
|
|
131
|
+
keyof DefineResponsiveProperties['styles']['justifyContent']['values'];
|
|
132
|
+
export type AlignItemsValues =
|
|
133
|
+
keyof DefineResponsiveProperties['styles']['alignItems']['values'];
|
|
134
|
+
export type AlignSelfValues =
|
|
135
|
+
keyof DefineResponsiveProperties['styles']['alignSelf']['values'];
|
|
136
|
+
export type FlexDirectionValues =
|
|
137
|
+
keyof DefineResponsiveProperties['styles']['flexDirection']['values'];
|
|
138
|
+
export type ColumnGapValues =
|
|
139
|
+
keyof DefineResponsiveProperties['styles']['columnGap']['values'];
|
|
140
|
+
export type RowGapValues =
|
|
141
|
+
keyof DefineResponsiveProperties['styles']['rowGap']['values'];
|
|
142
|
+
|
|
143
|
+
export type PaddingBlockStartValues =
|
|
144
|
+
keyof DefineResponsiveProperties['styles']['paddingBlockStart']['values'];
|
|
145
|
+
export type PaddingBlockEndValues =
|
|
146
|
+
keyof DefineResponsiveProperties['styles']['paddingBlockEnd']['values'];
|
|
147
|
+
export type PaddingInlineStartValues =
|
|
148
|
+
keyof DefineResponsiveProperties['styles']['paddingInlineStart']['values'];
|
|
149
|
+
export type PaddingInlineEndValues =
|
|
150
|
+
keyof DefineResponsiveProperties['styles']['paddingInlineEnd']['values'];
|
|
151
|
+
export type MarginBlockStartValues =
|
|
152
|
+
keyof DefineResponsiveProperties['styles']['marginBlockStart']['values'];
|
|
153
|
+
export type MarginBlockEndValues =
|
|
154
|
+
keyof DefineResponsiveProperties['styles']['marginBlockEnd']['values'];
|
|
155
|
+
export type MarginInlineStartValues =
|
|
156
|
+
keyof DefineResponsiveProperties['styles']['marginInlineStart']['values'];
|
|
157
|
+
export type MarginInlineEndValues =
|
|
158
|
+
keyof DefineResponsiveProperties['styles']['marginInlineEnd']['values'];
|
|
159
|
+
|
|
160
|
+
export type PositionValues =
|
|
161
|
+
keyof DefineResponsiveProperties['styles']['position']['values'];
|
|
162
|
+
export type InsetBlockStartValues =
|
|
163
|
+
keyof DefineResponsiveProperties['styles']['insetBlockStart']['values'];
|
|
164
|
+
export type InsetBlockEndValues =
|
|
165
|
+
keyof DefineResponsiveProperties['styles']['insetBlockEnd']['values'];
|
|
166
|
+
export type InsetInlineStartValues =
|
|
167
|
+
keyof DefineResponsiveProperties['styles']['insetInlineStart']['values'];
|
|
168
|
+
export type InsetInlineEndValues =
|
|
169
|
+
keyof DefineResponsiveProperties['styles']['insetInlineEnd']['values'];
|
|
170
|
+
|
|
171
|
+
export type TextAlignValues =
|
|
172
|
+
keyof DefineResponsiveProperties['styles']['textAlign']['values'];
|
|
173
|
+
|
|
174
|
+
export interface ResponsiveProperties {
|
|
175
|
+
/** Mapped to `display` css property */
|
|
176
|
+
display?: ResponsiveValue<DisplayValues>;
|
|
177
|
+
/** Mapped to `flex-direction` css property */
|
|
178
|
+
flexDirection?: ResponsiveValue<FlexDirectionValues>;
|
|
179
|
+
/** Mapped to `justify-content` css property */
|
|
180
|
+
justifyContent?: ResponsiveValue<JustifyContentValues>;
|
|
181
|
+
/** Mapped to `align-items` css property */
|
|
182
|
+
alignItems?: ResponsiveValue<AlignItemsValues>;
|
|
183
|
+
/** Mapped to `align-self` css property */
|
|
184
|
+
alignSelf?: ResponsiveValue<AlignSelfValues>;
|
|
185
|
+
/** Mapped to `column-gap` css property */
|
|
186
|
+
columnGap?: ResponsiveValue<ColumnGapValues>;
|
|
187
|
+
/** Mapped to `row-gap` css property */
|
|
188
|
+
rowGap?: ResponsiveValue<RowGapValues>;
|
|
189
|
+
/** Mapped to `gap` css property */
|
|
190
|
+
gap?: ResponsiveValue<ColumnGapValues | RowGapValues>;
|
|
191
|
+
|
|
192
|
+
/** Mapped to `padding-block-start` css property */
|
|
193
|
+
paddingBlockStart?: ResponsiveValue<PaddingBlockStartValues>;
|
|
194
|
+
/** Mapped to `padding-block-end` css property */
|
|
195
|
+
paddingBlockEnd?: ResponsiveValue<PaddingBlockEndValues>;
|
|
196
|
+
/** Mapped to `padding-inline-start` css property */
|
|
197
|
+
paddingInlineStart?: ResponsiveValue<PaddingInlineStartValues>;
|
|
198
|
+
/** Mapped to `padding-inline-end` css property */
|
|
199
|
+
paddingInlineEnd?: ResponsiveValue<PaddingInlineEndValues>;
|
|
200
|
+
/** Mapped to `padding` css property */
|
|
201
|
+
padding?: ResponsiveValue<PaddingBlockStartValues | PaddingInlineStartValues>;
|
|
202
|
+
/** Mapped to `padding-block` css property */
|
|
203
|
+
paddingBlock?: ResponsiveValue<
|
|
204
|
+
PaddingBlockStartValues | PaddingBlockEndValues
|
|
205
|
+
>;
|
|
206
|
+
/** Mapped to `padding-inline` css property */
|
|
207
|
+
paddingInline?: ResponsiveValue<
|
|
208
|
+
PaddingInlineStartValues | PaddingInlineEndValues
|
|
209
|
+
>;
|
|
210
|
+
|
|
211
|
+
/** Mapped to `margin-block-start` css property */
|
|
212
|
+
marginBlockStart?: ResponsiveValue<MarginBlockStartValues>;
|
|
213
|
+
/** Mapped to `margin-block-end` css property */
|
|
214
|
+
marginBlockEnd?: ResponsiveValue<MarginBlockEndValues>;
|
|
215
|
+
/** Mapped to `margin-inline-start` css property */
|
|
216
|
+
marginInlineStart?: ResponsiveValue<MarginInlineStartValues>;
|
|
217
|
+
/** Mapped to `margin-inline-end` css property */
|
|
218
|
+
marginInlineEnd?: ResponsiveValue<MarginInlineEndValues>;
|
|
219
|
+
/** Mapped to `margin` css property */
|
|
220
|
+
margin?: ResponsiveValue<MarginBlockStartValues | MarginInlineStartValues>;
|
|
221
|
+
/** Mapped to `margin-block` css property */
|
|
222
|
+
marginBlock?: ResponsiveValue<MarginBlockStartValues | MarginBlockEndValues>;
|
|
223
|
+
/** Mapped to `margin-inline` css property */
|
|
224
|
+
marginInline?: ResponsiveValue<
|
|
225
|
+
MarginInlineStartValues | MarginInlineEndValues
|
|
226
|
+
>;
|
|
227
|
+
|
|
228
|
+
/** Mapped to `position` css property */
|
|
229
|
+
position?: ResponsiveValue<PositionValues>;
|
|
230
|
+
|
|
231
|
+
/** Mapped to `inset-block-start` css property */
|
|
232
|
+
insetBlockStart?: ResponsiveValue<InsetBlockStartValues>;
|
|
233
|
+
/** Mapped to `inset-block-end` css property */
|
|
234
|
+
insetBlockEnd?: ResponsiveValue<InsetBlockEndValues>;
|
|
235
|
+
/** Mapped to `inset-inline-start` css property */
|
|
236
|
+
insetInlineStart?: ResponsiveValue<InsetInlineStartValues>;
|
|
237
|
+
/** Mapped to `inset-inline-end` css property */
|
|
238
|
+
insetInlineEnd?: ResponsiveValue<InsetInlineEndValues>;
|
|
239
|
+
|
|
240
|
+
/** Mapped to `text-align` css property */
|
|
241
|
+
textAlign?: ResponsiveValue<TextAlignValues>;
|
|
242
|
+
}
|
|
@@ -1,46 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { UnknownRecord } from 'type-fest';
|
|
1
|
+
import { UnknownRecord } from 'type-fest';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(...args: any): string;
|
|
8
|
-
properties: Set<string>;
|
|
3
|
+
export interface SprinklesFnBase<TSprinklesProps = Record<string, unknown>> {
|
|
4
|
+
(props: TSprinklesProps): string;
|
|
5
|
+
properties: Set<Extract<keyof TSprinklesProps, string>>;
|
|
9
6
|
}
|
|
10
7
|
|
|
11
|
-
export type GetSprinkles<T extends SprinklesFnBase> =
|
|
8
|
+
export type GetSprinkles<T extends SprinklesFnBase> =
|
|
9
|
+
T extends SprinklesFnBase<infer TSprinklesProps> ? TSprinklesProps : never;
|
|
12
10
|
|
|
13
|
-
export type SprinklesProps<TSprinklesFnBase extends SprinklesFnBase> =
|
|
14
|
-
TSprinklesFnBase['properties'] extends Set<infer T>
|
|
15
|
-
? {
|
|
16
|
-
[KeyType in keyof T]: T[KeyType] extends SprinklesProperties
|
|
17
|
-
? KeyType
|
|
18
|
-
: never;
|
|
19
|
-
}
|
|
20
|
-
: never;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Extracts the sprinkles properties from the given component props,
|
|
24
|
-
* returning an array containing the extracted sprinkle props and
|
|
25
|
-
* the remaining component props.
|
|
26
|
-
*/
|
|
27
11
|
export const extractSprinklesProps = <
|
|
28
|
-
|
|
29
|
-
|
|
12
|
+
TProps extends UnknownRecord,
|
|
13
|
+
TSprinkles extends SprinklesFnBase,
|
|
30
14
|
>(
|
|
31
|
-
props:
|
|
32
|
-
sprinkles:
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
|
|
15
|
+
props: TProps,
|
|
16
|
+
sprinkles: TSprinkles,
|
|
17
|
+
): [
|
|
18
|
+
Pick<TProps, Extract<keyof TProps, keyof GetSprinkles<TSprinkles>>>,
|
|
19
|
+
Omit<TProps, Extract<keyof TProps, keyof GetSprinkles<TSprinkles>>>,
|
|
20
|
+
] => {
|
|
21
|
+
const sprinkleProps = {} as Pick<
|
|
22
|
+
TProps,
|
|
23
|
+
Extract<keyof TProps, keyof GetSprinkles<TSprinkles>>
|
|
24
|
+
>;
|
|
25
|
+
const componentProps = {} as Omit<
|
|
26
|
+
TProps,
|
|
27
|
+
Extract<keyof TProps, keyof GetSprinkles<TSprinkles>>
|
|
28
|
+
>;
|
|
36
29
|
|
|
37
|
-
for (const
|
|
38
|
-
if (sprinkles.properties.has(
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
for (const key of Object.keys(props) as (keyof TProps)[]) {
|
|
31
|
+
if (sprinkles.properties.has(key as string)) {
|
|
32
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
33
|
+
(sprinkleProps as any)[key] = props[key];
|
|
34
|
+
} else {
|
|
35
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
36
|
+
(componentProps as any)[key] = props[key];
|
|
41
37
|
}
|
|
42
|
-
|
|
43
|
-
componentProps[prop] = props[prop];
|
|
44
38
|
}
|
|
45
39
|
|
|
46
40
|
return [sprinkleProps, componentProps];
|
package/src/styles/index.ts
CHANGED
|
@@ -13,3 +13,12 @@ export {
|
|
|
13
13
|
} from './extract-sprinkles-props';
|
|
14
14
|
|
|
15
15
|
export { mapContractVars } from './map-contract-vars';
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
defineResponsiveProperties,
|
|
19
|
+
type ResponsiveProperties,
|
|
20
|
+
} from './define-responsive-properties';
|
|
21
|
+
|
|
22
|
+
export { transition, type CreateTransitionFn } from './transition';
|
|
23
|
+
|
|
24
|
+
export { visuallyHidden } from './visually-hidden.css';
|
package/src/styles/reset.css.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { styleVariants } from '@vanilla-extract/css';
|
|
2
2
|
|
|
3
|
+
import { base } from './layers.css';
|
|
3
4
|
import { sys, TypographySize, TypographyVariant } from './system-contract.css';
|
|
4
5
|
|
|
5
6
|
export const typography = Object.entries(sys.typography).reduce(
|
|
@@ -8,11 +9,15 @@ export const typography = Object.entries(sys.typography).reduce(
|
|
|
8
9
|
...acc,
|
|
9
10
|
[key]: styleVariants(value, (variant) => {
|
|
10
11
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
'@layer': {
|
|
13
|
+
[base]: {
|
|
14
|
+
fontFamily: variant.font,
|
|
15
|
+
fontWeight: variant.weight,
|
|
16
|
+
lineHeight: variant.lineHeight,
|
|
17
|
+
letterSpacing: variant.tracking,
|
|
18
|
+
fontSize: variant.size,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
16
21
|
};
|
|
17
22
|
}),
|
|
18
23
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
2
|
+
|
|
3
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
4
|
+
export const visuallyHidden = recipe({
|
|
5
|
+
variants: {
|
|
6
|
+
hidden: {
|
|
7
|
+
true: {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
border: 0,
|
|
10
|
+
width: 1,
|
|
11
|
+
height: 1,
|
|
12
|
+
padding: 0,
|
|
13
|
+
margin: -1,
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
clip: 'rect(0, 0, 0, 0)',
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
wordWrap: 'normal',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
package/build-storybook.log
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @kalink-ui/seedly@0.8.0 build-storybook /Users/louis/dev/kalink-ui/packages/seedly
|
|
3
|
-
> storybook build --output-dir\=/tmp/chromatic--31226-9S6bTYf09Tsv --webpack-stats-json\=/tmp/chromatic--31226-9S6bTYf09Tsv
|
|
4
|
-
|
|
5
|
-
[1m@storybook/core v8.6.4
|
|
6
|
-
[22m
|
|
7
|
-
info => Cleaning outputDir: [36m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv[39m
|
|
8
|
-
info => Loading presets
|
|
9
|
-
info => Building manager..
|
|
10
|
-
info => Manager built ([38;2;181;126;229m106 ms[39m)
|
|
11
|
-
info => Building preview..
|
|
12
|
-
[36mvite v6.2.1 [32mbuilding for production...[36m[39m
|
|
13
|
-
transforming...
|
|
14
|
-
[32m✓[39m 172 modules transformed.
|
|
15
|
-
rendering chunks...
|
|
16
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[32miframe.html [39m[1m[2m 17.54 kB[22m[1m[22m
|
|
17
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mlayers.css.ts-C66eHa0l.css [39m[1m[2m 0.07 kB[22m[1m[22m
|
|
18
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mtext-or75WcbY.css [39m[1m[2m 0.11 kB[22m[1m[22m
|
|
19
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mframe-wUsZLpNa.css [39m[1m[2m 0.38 kB[22m[1m[22m
|
|
20
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mgrid-svOAN5eX.css [39m[1m[2m 0.84 kB[22m[1m[22m
|
|
21
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mseed-BSZyHzsv.css [39m[1m[2m 0.86 kB[22m[1m[22m
|
|
22
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mstack-fHq0j-Mf.css [39m[1m[2m 0.94 kB[22m[1m[22m
|
|
23
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35msidebar-BfSQAuXb.css [39m[1m[2m 0.95 kB[22m[1m[22m
|
|
24
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mcenter-DXS2n_JN.css [39m[1m[2m 1.03 kB[22m[1m[22m
|
|
25
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mcover-ClXyrnXr.css [39m[1m[2m 1.03 kB[22m[1m[22m
|
|
26
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mcluster-BYRTQ7OR.css [39m[1m[2m 1.04 kB[22m[1m[22m
|
|
27
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mswitcher-CaEmo08Z.css [39m[1m[2m 1.15 kB[22m[1m[22m
|
|
28
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mbox-C2bbsHZY.css [39m[1m[2m 1.38 kB[22m[1m[22m
|
|
29
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mtypography.css.ts-SSimWp8t.css [39m[1m[2m 2.25 kB[22m[1m[22m
|
|
30
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[35mbutton-Bz5cKKrj.css [39m[1m[2m 2.70 kB[22m[1m[22m
|
|
31
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-CT6mYyLc.js [39m[1m[2m 0.16 kB[22m[1m[22m
|
|
32
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-BtThajRf.js [39m[1m[2m 0.17 kB[22m[1m[22m
|
|
33
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-DoMOH9fu.js [39m[1m[2m 0.23 kB[22m[1m[22m
|
|
34
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mvanilla-extract-dynamic.esm-BUlnp6I2.js [39m[1m[2m 0.31 kB[22m[1m[22m
|
|
35
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-caVMbCIR.js [39m[1m[2m 0.69 kB[22m[1m[22m
|
|
36
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mtypography.css-DQ-nfkim.js [39m[1m[2m 0.75 kB[22m[1m[22m
|
|
37
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mindex-ogSvIofg.js [39m[1m[2m 0.77 kB[22m[1m[22m
|
|
38
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mstack-CyXomRKS.js [39m[1m[2m 0.78 kB[22m[1m[22m
|
|
39
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mcluster.stories-CPq7agrP.js [39m[1m[2m 0.82 kB[22m[1m[22m
|
|
40
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mcluster-Dy3GR3gU.js [39m[1m[2m 0.94 kB[22m[1m[22m
|
|
41
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mframe.stories-5pt_eAa4.js [39m[1m[2m 0.98 kB[22m[1m[22m
|
|
42
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mclsx-yWx7DIeZ.js [39m[1m[2m 1.09 kB[22m[1m[22m
|
|
43
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mcommon-args-BxOi7vI0.js [39m[1m[2m 1.16 kB[22m[1m[22m
|
|
44
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mheading.stories-DnTp5v4g.js [39m[1m[2m 1.18 kB[22m[1m[22m
|
|
45
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mcenter.stories-DVx4loHB.js [39m[1m[2m 1.24 kB[22m[1m[22m
|
|
46
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mbox.stories-D4I0_iYq.js [39m[1m[2m 1.31 kB[22m[1m[22m
|
|
47
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mtext.stories-B94F4zrO.js [39m[1m[2m 1.38 kB[22m[1m[22m
|
|
48
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mcover.stories-D5Tpwx4p.js [39m[1m[2m 1.44 kB[22m[1m[22m
|
|
49
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mswitcher.stories-vZpJAqZC.js [39m[1m[2m 1.62 kB[22m[1m[22m
|
|
50
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mgrid.stories-Cg2miXZJ.js [39m[1m[2m 1.66 kB[22m[1m[22m
|
|
51
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36msidebar.stories-BsY8S9Y-.js [39m[1m[2m 1.87 kB[22m[1m[22m
|
|
52
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mcreateRuntimeFn-62c9670f.esm-BmIeg6ni.js [39m[1m[2m 2.04 kB[22m[1m[22m
|
|
53
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mstack.stories-B3r3rUis.js [39m[1m[2m 2.14 kB[22m[1m[22m
|
|
54
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-A6H2BGQG.js [39m[1m[2m 3.40 kB[22m[1m[22m
|
|
55
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-xOAuwTm5.js [39m[1m[2m 4.87 kB[22m[1m[22m
|
|
56
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mseed.stories-OnvavYFI.js [39m[1m[2m 5.10 kB[22m[1m[22m
|
|
57
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-DY_pW_WS.js [39m[1m[2m 7.62 kB[22m[1m[22m
|
|
58
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mbutton.stories-CoUSjtPq.js [39m[1m[2m 7.87 kB[22m[1m[22m
|
|
59
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mpreview-CuLlOZat.js [39m[1m[2m 8.08 kB[22m[1m[22m
|
|
60
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mentry-preview-B0dZ39Bz.js [39m[1m[2m 38.10 kB[22m[1m[22m
|
|
61
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mreact-18-Uoay0tNS.js [39m[1m[2m177.34 kB[22m[1m[22m
|
|
62
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36miframe-2U23pR0X.js [39m[1m[2m210.78 kB[22m[1m[22m
|
|
63
|
-
[2m../../../../../../tmp/chromatic--31226-9S6bTYf09Tsv/[22m[2massets/[22m[36mindex-0CFqCGht.js [39m[1m[33m658.80 kB[39m[22m
|
|
64
|
-
[32m✓ built in 1.79s[39m
|
|
65
|
-
info => Preview built ([38;2;181;126;229m2.14 s[39m)
|
|
66
|
-
info => preview stats written to [36m/tmp/chromatic--31226-9S6bTYf09Tsv/preview-stats.json[39m
|
|
67
|
-
info => Output directory: /tmp/chromatic--31226-9S6bTYf09Tsv
|