@tuuject/koi-react 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +73 -2
- package/dist/alert/Alert.d.ts +13 -0
- package/dist/alert/Alert.js +16 -0
- package/dist/avatar/Avatar.d.ts +7 -0
- package/dist/avatar/Avatar.js +10 -0
- package/dist/badge/Badge.d.ts +7 -0
- package/dist/badge/Badge.js +8 -0
- package/dist/button/Button.d.ts +22 -0
- package/dist/button/Button.js +28 -0
- package/dist/card/Card.d.ts +9 -0
- package/dist/card/Card.js +8 -0
- package/dist/chat-bubble/ChatBubble.d.ts +7 -0
- package/dist/chat-bubble/ChatBubble.js +7 -0
- package/dist/checkbox/Checkbox.d.ts +18 -0
- package/dist/checkbox/Checkbox.js +25 -0
- package/dist/dialog/Dialog.d.ts +13 -0
- package/dist/dialog/Dialog.js +38 -0
- package/dist/divider/Divider.d.ts +6 -0
- package/dist/divider/Divider.js +17 -0
- package/dist/field/Field.d.ts +14 -0
- package/dist/field/Field.js +19 -0
- package/dist/field/context.d.ts +5 -0
- package/dist/field/context.js +2 -0
- package/dist/icons.d.ts +26 -0
- package/dist/icons.js +46 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +30 -0
- package/dist/input/Input.d.ts +9 -0
- package/dist/input/Input.js +15 -0
- package/dist/link/Link.d.ts +11 -0
- package/dist/link/Link.js +17 -0
- package/dist/pagination/Pagination.d.ts +7 -0
- package/dist/pagination/Pagination.js +26 -0
- package/dist/panda/buildinfo.json +10442 -0
- package/dist/panda/lib.json +18 -0
- package/dist/panda/preset.mjs +3907 -0
- package/dist/progress/Progress.d.ts +7 -0
- package/dist/progress/Progress.js +17 -0
- package/dist/prose/Prose.d.ts +10 -0
- package/dist/prose/Prose.js +10 -0
- package/dist/radio-group/RadioGroup.d.ts +15 -0
- package/dist/radio-group/RadioGroup.js +26 -0
- package/dist/select/Select.d.ts +11 -0
- package/dist/select/Select.js +21 -0
- package/dist/select/SelectPanel.d.ts +24 -0
- package/dist/select/SelectPanel.js +105 -0
- package/dist/shape.d.ts +16 -0
- package/dist/shape.js +17 -0
- package/dist/skeleton/Skeleton.d.ts +8 -0
- package/dist/skeleton/Skeleton.js +8 -0
- package/dist/spinner/Spinner.d.ts +7 -0
- package/dist/spinner/Spinner.js +13 -0
- package/dist/switch/Switch.d.ts +22 -0
- package/dist/switch/Switch.js +23 -0
- package/dist/table/DataTable.d.ts +12 -0
- package/dist/table/DataTable.js +12 -0
- package/dist/table/Table.d.ts +38 -0
- package/dist/table/Table.js +45 -0
- package/dist/tabs/Tabs.d.ts +11 -0
- package/dist/tabs/Tabs.js +20 -0
- package/dist/tag/Tag.d.ts +6 -0
- package/dist/tag/Tag.js +15 -0
- package/dist/textarea/Textarea.d.ts +9 -0
- package/dist/textarea/Textarea.js +14 -0
- package/dist/toast/Toast.d.ts +23 -0
- package/dist/toast/Toast.js +80 -0
- package/dist/tooltip/Tooltip.d.ts +9 -0
- package/dist/tooltip/Tooltip.js +29 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.js +1 -0
- package/package.json +218 -3
- package/styled-system/css/conditions.d.ts +7 -0
- package/styled-system/css/conditions.js +32 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.js +63 -0
- package/styled-system/css/cva.d.ts +5 -0
- package/styled-system/css/cva.js +51 -0
- package/styled-system/css/cx.d.ts +6 -0
- package/styled-system/css/cx.js +16 -0
- package/styled-system/css/first-that-works.d.ts +22 -0
- package/styled-system/css/first-that-works.js +1 -0
- package/styled-system/css/index.d.ts +8 -0
- package/styled-system/css/index.js +8 -0
- package/styled-system/css/keyframes.d.ts +5 -0
- package/styled-system/css/keyframes.js +8 -0
- package/styled-system/css/position-try.d.ts +5 -0
- package/styled-system/css/position-try.js +11 -0
- package/styled-system/css/sva.d.ts +3 -0
- package/styled-system/css/sva.js +49 -0
- package/styled-system/css/view-transition.d.ts +7 -0
- package/styled-system/css/view-transition.js +18 -0
- package/styled-system/helpers.d.ts +67 -0
- package/styled-system/helpers.js +624 -0
- package/styled-system/jsx/aspect-ratio.d.ts +7 -0
- package/styled-system/jsx/aspect-ratio.js +11 -0
- package/styled-system/jsx/bleed.d.ts +7 -0
- package/styled-system/jsx/bleed.js +11 -0
- package/styled-system/jsx/box.d.ts +7 -0
- package/styled-system/jsx/box.js +11 -0
- package/styled-system/jsx/center.d.ts +7 -0
- package/styled-system/jsx/center.js +11 -0
- package/styled-system/jsx/circle.d.ts +7 -0
- package/styled-system/jsx/circle.js +11 -0
- package/styled-system/jsx/container.d.ts +7 -0
- package/styled-system/jsx/container.js +11 -0
- package/styled-system/jsx/cq.d.ts +7 -0
- package/styled-system/jsx/cq.js +11 -0
- package/styled-system/jsx/create-recipe-context.d.ts +32 -0
- package/styled-system/jsx/create-recipe-context.js +38 -0
- package/styled-system/jsx/create-slot-recipe-context.d.ts +48 -0
- package/styled-system/jsx/create-slot-recipe-context.js +116 -0
- package/styled-system/jsx/divider.d.ts +7 -0
- package/styled-system/jsx/divider.js +11 -0
- package/styled-system/jsx/factory.d.ts +3 -0
- package/styled-system/jsx/factory.js +91 -0
- package/styled-system/jsx/flex.d.ts +7 -0
- package/styled-system/jsx/flex.js +11 -0
- package/styled-system/jsx/float.d.ts +7 -0
- package/styled-system/jsx/float.js +11 -0
- package/styled-system/jsx/grid-item.d.ts +7 -0
- package/styled-system/jsx/grid-item.js +11 -0
- package/styled-system/jsx/grid.d.ts +7 -0
- package/styled-system/jsx/grid.js +11 -0
- package/styled-system/jsx/helper.d.ts +34 -0
- package/styled-system/jsx/helper.js +83 -0
- package/styled-system/jsx/hstack.d.ts +7 -0
- package/styled-system/jsx/hstack.js +11 -0
- package/styled-system/jsx/index.d.ts +25 -0
- package/styled-system/jsx/index.js +24 -0
- package/styled-system/jsx/is-valid-prop.d.ts +7 -0
- package/styled-system/jsx/is-valid-prop.js +12 -0
- package/styled-system/jsx/link-overlay.d.ts +7 -0
- package/styled-system/jsx/link-overlay.js +11 -0
- package/styled-system/jsx/spacer.d.ts +7 -0
- package/styled-system/jsx/spacer.js +11 -0
- package/styled-system/jsx/square.d.ts +7 -0
- package/styled-system/jsx/square.js +11 -0
- package/styled-system/jsx/stack.d.ts +7 -0
- package/styled-system/jsx/stack.js +11 -0
- package/styled-system/jsx/visually-hidden.d.ts +7 -0
- package/styled-system/jsx/visually-hidden.js +11 -0
- package/styled-system/jsx/vstack.d.ts +7 -0
- package/styled-system/jsx/vstack.js +11 -0
- package/styled-system/jsx/wrap.d.ts +7 -0
- package/styled-system/jsx/wrap.js +11 -0
- package/styled-system/patterns/aspect-ratio.d.ts +19 -0
- package/styled-system/patterns/aspect-ratio.js +37 -0
- package/styled-system/patterns/bleed.d.ts +20 -0
- package/styled-system/patterns/bleed.js +30 -0
- package/styled-system/patterns/box.d.ts +17 -0
- package/styled-system/patterns/box.js +16 -0
- package/styled-system/patterns/center.d.ts +19 -0
- package/styled-system/patterns/center.js +22 -0
- package/styled-system/patterns/circle.d.ts +19 -0
- package/styled-system/patterns/circle.js +26 -0
- package/styled-system/patterns/container.d.ts +17 -0
- package/styled-system/patterns/container.js +26 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.js +24 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.js +31 -0
- package/styled-system/patterns/flex.d.ts +25 -0
- package/styled-system/patterns/flex.js +27 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.js +84 -0
- package/styled-system/patterns/grid-item.d.ts +24 -0
- package/styled-system/patterns/grid-item.js +26 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.js +30 -0
- package/styled-system/patterns/hstack.d.ts +20 -0
- package/styled-system/patterns/hstack.js +27 -0
- package/styled-system/patterns/index.d.ts +20 -0
- package/styled-system/patterns/index.js +20 -0
- package/styled-system/patterns/link-overlay.d.ts +17 -0
- package/styled-system/patterns/link-overlay.js +25 -0
- package/styled-system/patterns/runtime.js +25 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.js +26 -0
- package/styled-system/patterns/square.d.ts +19 -0
- package/styled-system/patterns/square.js +25 -0
- package/styled-system/patterns/stack.d.ts +22 -0
- package/styled-system/patterns/stack.js +30 -0
- package/styled-system/patterns/visually-hidden.d.ts +17 -0
- package/styled-system/patterns/visually-hidden.js +19 -0
- package/styled-system/patterns/vstack.d.ts +20 -0
- package/styled-system/patterns/vstack.js +27 -0
- package/styled-system/patterns/wrap.d.ts +23 -0
- package/styled-system/patterns/wrap.js +26 -0
- package/styled-system/recipes/alert.d.ts +19 -0
- package/styled-system/recipes/alert.js +5 -0
- package/styled-system/recipes/avatar.d.ts +19 -0
- package/styled-system/recipes/avatar.js +5 -0
- package/styled-system/recipes/badge.d.ts +18 -0
- package/styled-system/recipes/badge.js +5 -0
- package/styled-system/recipes/button.d.ts +20 -0
- package/styled-system/recipes/button.js +5 -0
- package/styled-system/recipes/card.d.ts +19 -0
- package/styled-system/recipes/card.js +5 -0
- package/styled-system/recipes/chat-bubble.d.ts +16 -0
- package/styled-system/recipes/chat-bubble.js +5 -0
- package/styled-system/recipes/checkbox.d.ts +16 -0
- package/styled-system/recipes/checkbox.js +5 -0
- package/styled-system/recipes/dialog.d.ts +18 -0
- package/styled-system/recipes/dialog.js +5 -0
- package/styled-system/recipes/field.d.ts +16 -0
- package/styled-system/recipes/field.js +5 -0
- package/styled-system/recipes/index.d.ts +27 -0
- package/styled-system/recipes/index.js +27 -0
- package/styled-system/recipes/input.d.ts +18 -0
- package/styled-system/recipes/input.js +5 -0
- package/styled-system/recipes/link.d.ts +18 -0
- package/styled-system/recipes/link.js +5 -0
- package/styled-system/recipes/pagination.d.ts +19 -0
- package/styled-system/recipes/pagination.js +5 -0
- package/styled-system/recipes/progress.d.ts +18 -0
- package/styled-system/recipes/progress.js +5 -0
- package/styled-system/recipes/prose.d.ts +16 -0
- package/styled-system/recipes/prose.js +5 -0
- package/styled-system/recipes/radio-group.d.ts +18 -0
- package/styled-system/recipes/radio-group.js +5 -0
- package/styled-system/recipes/runtime.js +133 -0
- package/styled-system/recipes/select-panel.d.ts +18 -0
- package/styled-system/recipes/select-panel.js +5 -0
- package/styled-system/recipes/select.d.ts +18 -0
- package/styled-system/recipes/select.js +5 -0
- package/styled-system/recipes/separator.d.ts +16 -0
- package/styled-system/recipes/separator.js +5 -0
- package/styled-system/recipes/skeleton.d.ts +14 -0
- package/styled-system/recipes/skeleton.js +5 -0
- package/styled-system/recipes/spinner.d.ts +16 -0
- package/styled-system/recipes/spinner.js +5 -0
- package/styled-system/recipes/switch-recipe.d.ts +16 -0
- package/styled-system/recipes/switch-recipe.js +5 -0
- package/styled-system/recipes/table.d.ts +20 -0
- package/styled-system/recipes/table.js +5 -0
- package/styled-system/recipes/tabs.d.ts +18 -0
- package/styled-system/recipes/tabs.js +5 -0
- package/styled-system/recipes/tag.d.ts +18 -0
- package/styled-system/recipes/tag.js +5 -0
- package/styled-system/recipes/textarea.d.ts +14 -0
- package/styled-system/recipes/textarea.js +5 -0
- package/styled-system/recipes/toast.d.ts +20 -0
- package/styled-system/recipes/toast.js +5 -0
- package/styled-system/recipes/tooltip.d.ts +16 -0
- package/styled-system/recipes/tooltip.js +5 -0
- package/styled-system/tokens/index.d.ts +8 -0
- package/styled-system/tokens/index.js +18 -0
- package/styled-system/types/index.d.ts +5 -0
- package/styled-system/types/jsx.d.ts +80 -0
- package/styled-system/types/pattern.d.ts +26 -0
- package/styled-system/types/recipe.d.ts +77 -0
- package/styled-system/types/system.d.ts +1645 -0
- package/styled-system/types/tokens.d.ts +47 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const flexConfig = { transform(props) {
|
|
6
|
+
const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: direction,
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
flexWrap: wrap2,
|
|
13
|
+
flexBasis: basis,
|
|
14
|
+
flexGrow: grow,
|
|
15
|
+
flexShrink: shrink,
|
|
16
|
+
...rest
|
|
17
|
+
};
|
|
18
|
+
} }
|
|
19
|
+
|
|
20
|
+
export function flexRaw(styles) {
|
|
21
|
+
const s = getPatternStyles(flexConfig, styles || {})
|
|
22
|
+
return flexConfig.transform(s, patternFns)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const flex = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function flex(styles = {}) {
|
|
26
|
+
return css(flexRaw(styles))
|
|
27
|
+
}), { raw: flexRaw, propKeys: ["align","basis","direction","grow","justify","shrink","wrap"] })
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TokenValue } from '../types/tokens';
|
|
2
|
+
import type { ConditionalValue, SystemProperties, SystemStyleObject } from '../types/system';
|
|
3
|
+
|
|
4
|
+
export interface FloatProperties {
|
|
5
|
+
offset?: ConditionalValue<TokenValue<"spacing"> | SystemProperties["top"]>
|
|
6
|
+
offsetX?: ConditionalValue<TokenValue<"spacing"> | SystemProperties["left"]>
|
|
7
|
+
offsetY?: ConditionalValue<TokenValue<"spacing"> | SystemProperties["top"]>
|
|
8
|
+
placement?: ConditionalValue<"bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start">
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type FloatRestStyles = Omit<SystemStyleObject, keyof FloatProperties>
|
|
12
|
+
|
|
13
|
+
interface FloatStyles extends FloatProperties, FloatRestStyles {}
|
|
14
|
+
|
|
15
|
+
interface FloatPatternFn {
|
|
16
|
+
(styles?: FloatStyles): string
|
|
17
|
+
raw: (styles?: FloatStyles) => SystemStyleObject
|
|
18
|
+
propKeys: Array<keyof FloatProperties>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export declare function floatRaw(styles?: FloatStyles): SystemStyleObject;
|
|
22
|
+
|
|
23
|
+
export declare const float: FloatPatternFn;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const floatConfig = {
|
|
6
|
+
transform(props, { map }) {
|
|
7
|
+
const { offset, offsetX, offsetY, placement, ...rest } = props;
|
|
8
|
+
return {
|
|
9
|
+
display: "inline-flex",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
position: "absolute",
|
|
13
|
+
insetBlockStart: map(placement, (v) => {
|
|
14
|
+
const [side] = v.split("-");
|
|
15
|
+
const map2 = {
|
|
16
|
+
top: offsetY,
|
|
17
|
+
middle: "50%",
|
|
18
|
+
bottom: "auto"
|
|
19
|
+
};
|
|
20
|
+
return map2[side];
|
|
21
|
+
}),
|
|
22
|
+
insetBlockEnd: map(placement, (v) => {
|
|
23
|
+
const [side] = v.split("-");
|
|
24
|
+
const map2 = {
|
|
25
|
+
top: "auto",
|
|
26
|
+
middle: "50%",
|
|
27
|
+
bottom: offsetY
|
|
28
|
+
};
|
|
29
|
+
return map2[side];
|
|
30
|
+
}),
|
|
31
|
+
insetInlineStart: map(placement, (v) => {
|
|
32
|
+
const [, align] = v.split("-");
|
|
33
|
+
const map2 = {
|
|
34
|
+
start: offsetX,
|
|
35
|
+
center: "50%",
|
|
36
|
+
end: "auto"
|
|
37
|
+
};
|
|
38
|
+
return map2[align];
|
|
39
|
+
}),
|
|
40
|
+
insetInlineEnd: map(placement, (v) => {
|
|
41
|
+
const [, align] = v.split("-");
|
|
42
|
+
const map2 = {
|
|
43
|
+
start: "auto",
|
|
44
|
+
center: "50%",
|
|
45
|
+
end: offsetX
|
|
46
|
+
};
|
|
47
|
+
return map2[align];
|
|
48
|
+
}),
|
|
49
|
+
translate: map(placement, (v) => {
|
|
50
|
+
const [side, align] = v.split("-");
|
|
51
|
+
const mapX = {
|
|
52
|
+
start: "-50%",
|
|
53
|
+
center: "-50%",
|
|
54
|
+
end: "50%"
|
|
55
|
+
};
|
|
56
|
+
const mapY = {
|
|
57
|
+
top: "-50%",
|
|
58
|
+
middle: "-50%",
|
|
59
|
+
bottom: "50%"
|
|
60
|
+
};
|
|
61
|
+
return `${mapX[align]} ${mapY[side]}`;
|
|
62
|
+
}),
|
|
63
|
+
...rest
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
defaultValues(props) {
|
|
67
|
+
const offset = props.offset || "0";
|
|
68
|
+
return {
|
|
69
|
+
offset,
|
|
70
|
+
offsetX: offset,
|
|
71
|
+
offsetY: offset,
|
|
72
|
+
placement: "top-end"
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function floatRaw(styles) {
|
|
78
|
+
const s = getPatternStyles(floatConfig, styles || {})
|
|
79
|
+
return floatConfig.transform(s, patternFns)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const float = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function float(styles = {}) {
|
|
83
|
+
return css(floatRaw(styles))
|
|
84
|
+
}), { raw: floatRaw, propKeys: ["offset","offsetX","offsetY","placement"] })
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ConditionalValue, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface GridItemProperties {
|
|
4
|
+
colEnd?: ConditionalValue<number>
|
|
5
|
+
colSpan?: ConditionalValue<number>
|
|
6
|
+
colStart?: ConditionalValue<number>
|
|
7
|
+
rowEnd?: ConditionalValue<number>
|
|
8
|
+
rowSpan?: ConditionalValue<number>
|
|
9
|
+
rowStart?: ConditionalValue<number>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type GridItemRestStyles = Omit<SystemStyleObject, keyof GridItemProperties>
|
|
13
|
+
|
|
14
|
+
interface GridItemStyles extends GridItemProperties, GridItemRestStyles {}
|
|
15
|
+
|
|
16
|
+
interface GridItemPatternFn {
|
|
17
|
+
(styles?: GridItemStyles): string
|
|
18
|
+
raw: (styles?: GridItemStyles) => SystemStyleObject
|
|
19
|
+
propKeys: Array<keyof GridItemProperties>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare function gridItemRaw(styles?: GridItemStyles): SystemStyleObject;
|
|
23
|
+
|
|
24
|
+
export declare const gridItem: GridItemPatternFn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const gridItemConfig = { transform(props, { map }) {
|
|
6
|
+
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
|
|
7
|
+
const spanFn = (v) => v === "auto" ? v : `span ${v}`;
|
|
8
|
+
return {
|
|
9
|
+
gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
|
|
10
|
+
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
11
|
+
gridColumnStart: colStart,
|
|
12
|
+
gridColumnEnd: colEnd,
|
|
13
|
+
gridRowStart: rowStart,
|
|
14
|
+
gridRowEnd: rowEnd,
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
} }
|
|
18
|
+
|
|
19
|
+
export function gridItemRaw(styles) {
|
|
20
|
+
const s = getPatternStyles(gridItemConfig, styles || {})
|
|
21
|
+
return gridItemConfig.transform(s, patternFns)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const gridItem = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function gridItem(styles = {}) {
|
|
25
|
+
return css(gridItemRaw(styles))
|
|
26
|
+
}), { raw: gridItemRaw, propKeys: ["colEnd","colSpan","colStart","rowEnd","rowSpan","rowStart"] })
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TokenValue } from '../types/tokens';
|
|
2
|
+
import type { ConditionalValue, SystemProperties, SystemStyleObject } from '../types/system';
|
|
3
|
+
|
|
4
|
+
export interface GridProperties {
|
|
5
|
+
columnGap?: SystemProperties["gap"]
|
|
6
|
+
columns?: ConditionalValue<number>
|
|
7
|
+
gap?: SystemProperties["gap"]
|
|
8
|
+
minChildWidth?: ConditionalValue<TokenValue<"sizes"> | SystemProperties["width"]>
|
|
9
|
+
rowGap?: SystemProperties["gap"]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type GridRestStyles = Omit<SystemStyleObject, keyof GridProperties>
|
|
13
|
+
|
|
14
|
+
interface GridStyles extends GridProperties, GridRestStyles {}
|
|
15
|
+
|
|
16
|
+
interface GridPatternFn {
|
|
17
|
+
(styles?: GridStyles): string
|
|
18
|
+
raw: (styles?: GridStyles) => SystemStyleObject
|
|
19
|
+
propKeys: Array<keyof GridProperties>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare function gridRaw(styles?: GridStyles): SystemStyleObject;
|
|
23
|
+
|
|
24
|
+
export declare const grid: GridPatternFn;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const gridConfig = {
|
|
6
|
+
transform(props, { map, isCssUnit }) {
|
|
7
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
|
|
8
|
+
const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
9
|
+
return {
|
|
10
|
+
display: "grid",
|
|
11
|
+
gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
|
|
12
|
+
gap,
|
|
13
|
+
columnGap,
|
|
14
|
+
rowGap,
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
defaultValues(props) {
|
|
19
|
+
return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function gridRaw(styles) {
|
|
24
|
+
const s = getPatternStyles(gridConfig, styles || {})
|
|
25
|
+
return gridConfig.transform(s, patternFns)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const grid = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function grid(styles = {}) {
|
|
29
|
+
return css(gridRaw(styles))
|
|
30
|
+
}), { raw: gridRaw, propKeys: ["columnGap","columns","gap","minChildWidth","rowGap"] })
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface HstackProperties {
|
|
4
|
+
gap?: SystemProperties["gap"]
|
|
5
|
+
justify?: SystemProperties["justifyContent"]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type HstackRestStyles = Omit<SystemStyleObject, keyof HstackProperties>
|
|
9
|
+
|
|
10
|
+
interface HstackStyles extends HstackProperties, HstackRestStyles {}
|
|
11
|
+
|
|
12
|
+
interface HstackPatternFn {
|
|
13
|
+
(styles?: HstackStyles): string
|
|
14
|
+
raw: (styles?: HstackStyles) => SystemStyleObject
|
|
15
|
+
propKeys: Array<keyof HstackProperties>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare function hstackRaw(styles?: HstackStyles): SystemStyleObject;
|
|
19
|
+
|
|
20
|
+
export declare const hstack: HstackPatternFn;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const hstackConfig = {
|
|
6
|
+
transform(props) {
|
|
7
|
+
const { justify, gap, ...rest } = props;
|
|
8
|
+
return {
|
|
9
|
+
display: "flex",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
defaultValues: { gap: "8px" }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function hstackRaw(styles) {
|
|
21
|
+
const s = getPatternStyles(hstackConfig, styles || {})
|
|
22
|
+
return hstackConfig.transform(s, patternFns)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const hstack = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function hstack(styles = {}) {
|
|
26
|
+
return css(hstackRaw(styles))
|
|
27
|
+
}), { raw: hstackRaw, propKeys: ["gap","justify"] })
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './aspect-ratio';
|
|
2
|
+
export * from './bleed';
|
|
3
|
+
export * from './box';
|
|
4
|
+
export * from './center';
|
|
5
|
+
export * from './circle';
|
|
6
|
+
export * from './container';
|
|
7
|
+
export * from './cq';
|
|
8
|
+
export * from './divider';
|
|
9
|
+
export * from './flex';
|
|
10
|
+
export * from './float';
|
|
11
|
+
export * from './grid';
|
|
12
|
+
export * from './grid-item';
|
|
13
|
+
export * from './hstack';
|
|
14
|
+
export * from './link-overlay';
|
|
15
|
+
export * from './spacer';
|
|
16
|
+
export * from './square';
|
|
17
|
+
export * from './stack';
|
|
18
|
+
export * from './visually-hidden';
|
|
19
|
+
export * from './vstack';
|
|
20
|
+
export * from './wrap';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './aspect-ratio';
|
|
2
|
+
export * from './bleed';
|
|
3
|
+
export * from './box';
|
|
4
|
+
export * from './center';
|
|
5
|
+
export * from './circle';
|
|
6
|
+
export * from './container';
|
|
7
|
+
export * from './cq';
|
|
8
|
+
export * from './divider';
|
|
9
|
+
export * from './flex';
|
|
10
|
+
export * from './float';
|
|
11
|
+
export * from './grid';
|
|
12
|
+
export * from './grid-item';
|
|
13
|
+
export * from './hstack';
|
|
14
|
+
export * from './link-overlay';
|
|
15
|
+
export * from './spacer';
|
|
16
|
+
export * from './square';
|
|
17
|
+
export * from './stack';
|
|
18
|
+
export * from './visually-hidden';
|
|
19
|
+
export * from './vstack';
|
|
20
|
+
export * from './wrap';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface LinkOverlayProperties {}
|
|
4
|
+
|
|
5
|
+
type LinkOverlayRestStyles = Omit<SystemStyleObject, keyof LinkOverlayProperties>
|
|
6
|
+
|
|
7
|
+
interface LinkOverlayStyles extends LinkOverlayProperties, LinkOverlayRestStyles {}
|
|
8
|
+
|
|
9
|
+
interface LinkOverlayPatternFn {
|
|
10
|
+
(styles?: LinkOverlayStyles): string
|
|
11
|
+
raw: (styles?: LinkOverlayStyles) => SystemStyleObject
|
|
12
|
+
propKeys: Array<keyof LinkOverlayProperties>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare function linkOverlayRaw(styles?: LinkOverlayStyles): SystemStyleObject;
|
|
16
|
+
|
|
17
|
+
export declare const linkOverlay: LinkOverlayPatternFn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const linkOverlayConfig = { transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
_before: {
|
|
8
|
+
content: "\"\"",
|
|
9
|
+
position: "absolute",
|
|
10
|
+
inset: "0",
|
|
11
|
+
zIndex: "0",
|
|
12
|
+
...props["_before"]
|
|
13
|
+
},
|
|
14
|
+
...props
|
|
15
|
+
};
|
|
16
|
+
} }
|
|
17
|
+
|
|
18
|
+
export function linkOverlayRaw(styles) {
|
|
19
|
+
const s = getPatternStyles(linkOverlayConfig, styles || {})
|
|
20
|
+
return linkOverlayConfig.transform(s, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const linkOverlay = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function linkOverlay(styles = {}) {
|
|
24
|
+
return css(linkOverlayRaw(styles))
|
|
25
|
+
}), { raw: linkOverlayRaw, propKeys: [] })
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { mapObject, withDefaults } from '../helpers';
|
|
2
|
+
|
|
3
|
+
const CSS_FUNCTION_REGEX = /^(min|max|clamp|calc)\(.*\)/
|
|
4
|
+
const CSS_VAR_REGEX = /^var\(--.+\)$/
|
|
5
|
+
const CSS_UNIT_REGEX = /^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?(?:cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cqw|cqh|cqi|cqb|cqmin|cqmax|%)$/
|
|
6
|
+
|
|
7
|
+
export function isCssFunction(v) {
|
|
8
|
+
return typeof v === "string" && CSS_FUNCTION_REGEX.test(v)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function isCssVar(v) {
|
|
12
|
+
return typeof v === "string" && CSS_VAR_REGEX.test(v)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function isCssUnit(v) {
|
|
16
|
+
return typeof v === "string" && CSS_UNIT_REGEX.test(v)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const patternFns = { map: mapObject, isCssFunction, isCssVar, isCssUnit }
|
|
20
|
+
|
|
21
|
+
export function getPatternStyles(pattern, styles) {
|
|
22
|
+
if (!pattern?.defaultValues) return styles
|
|
23
|
+
const defaults = typeof pattern.defaultValues === "function" ? pattern.defaultValues(styles) : pattern.defaultValues
|
|
24
|
+
return withDefaults(defaults, styles)
|
|
25
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TokenValue } from '../types/tokens';
|
|
2
|
+
import type { ConditionalValue, SystemStyleObject } from '../types/system';
|
|
3
|
+
|
|
4
|
+
export interface SpacerProperties {
|
|
5
|
+
size?: ConditionalValue<TokenValue<"spacing">>
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type SpacerRestStyles = Omit<SystemStyleObject, keyof SpacerProperties>
|
|
9
|
+
|
|
10
|
+
interface SpacerStyles extends SpacerProperties, SpacerRestStyles {}
|
|
11
|
+
|
|
12
|
+
interface SpacerPatternFn {
|
|
13
|
+
(styles?: SpacerStyles): string
|
|
14
|
+
raw: (styles?: SpacerStyles) => SystemStyleObject
|
|
15
|
+
propKeys: Array<keyof SpacerProperties>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare function spacerRaw(styles?: SpacerStyles): SystemStyleObject;
|
|
19
|
+
|
|
20
|
+
export declare const spacer: SpacerPatternFn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const spacerConfig = { transform(props, { map, isCssUnit, isCssVar }) {
|
|
6
|
+
const { size, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
alignSelf: "stretch",
|
|
9
|
+
justifySelf: "stretch",
|
|
10
|
+
flex: map(size, (v) => {
|
|
11
|
+
if (v == null) return "1";
|
|
12
|
+
const val = isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
13
|
+
return `0 0 ${val}`;
|
|
14
|
+
}),
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
} }
|
|
18
|
+
|
|
19
|
+
export function spacerRaw(styles) {
|
|
20
|
+
const s = getPatternStyles(spacerConfig, styles || {})
|
|
21
|
+
return spacerConfig.transform(s, patternFns)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const spacer = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function spacer(styles = {}) {
|
|
25
|
+
return css(spacerRaw(styles))
|
|
26
|
+
}), { raw: spacerRaw, propKeys: ["size"] })
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface SquareProperties {
|
|
4
|
+
size?: SystemProperties["width"]
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type SquareRestStyles = Omit<SystemStyleObject, keyof SquareProperties>
|
|
8
|
+
|
|
9
|
+
interface SquareStyles extends SquareProperties, SquareRestStyles {}
|
|
10
|
+
|
|
11
|
+
interface SquarePatternFn {
|
|
12
|
+
(styles?: SquareStyles): string
|
|
13
|
+
raw: (styles?: SquareStyles) => SystemStyleObject
|
|
14
|
+
propKeys: Array<keyof SquareProperties>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare function squareRaw(styles?: SquareStyles): SystemStyleObject;
|
|
18
|
+
|
|
19
|
+
export declare const square: SquarePatternFn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const squareConfig = { transform(props) {
|
|
6
|
+
const { size, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
flex: "0 0 auto",
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
} }
|
|
17
|
+
|
|
18
|
+
export function squareRaw(styles) {
|
|
19
|
+
const s = getPatternStyles(squareConfig, styles || {})
|
|
20
|
+
return squareConfig.transform(s, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const square = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function square(styles = {}) {
|
|
24
|
+
return css(squareRaw(styles))
|
|
25
|
+
}), { raw: squareRaw, propKeys: ["size"] })
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface StackProperties {
|
|
4
|
+
align?: SystemProperties["alignItems"]
|
|
5
|
+
direction?: SystemProperties["flexDirection"]
|
|
6
|
+
gap?: SystemProperties["gap"]
|
|
7
|
+
justify?: SystemProperties["justifyContent"]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type StackRestStyles = Omit<SystemStyleObject, keyof StackProperties>
|
|
11
|
+
|
|
12
|
+
interface StackStyles extends StackProperties, StackRestStyles {}
|
|
13
|
+
|
|
14
|
+
interface StackPatternFn {
|
|
15
|
+
(styles?: StackStyles): string
|
|
16
|
+
raw: (styles?: StackStyles) => SystemStyleObject
|
|
17
|
+
propKeys: Array<keyof StackProperties>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare function stackRaw(styles?: StackStyles): SystemStyleObject;
|
|
21
|
+
|
|
22
|
+
export declare const stack: StackPatternFn;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const stackConfig = {
|
|
6
|
+
transform(props) {
|
|
7
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
8
|
+
return {
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: direction,
|
|
11
|
+
alignItems: align,
|
|
12
|
+
justifyContent: justify,
|
|
13
|
+
gap,
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
defaultValues: {
|
|
18
|
+
direction: "column",
|
|
19
|
+
gap: "8px"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function stackRaw(styles) {
|
|
24
|
+
const s = getPatternStyles(stackConfig, styles || {})
|
|
25
|
+
return stackConfig.transform(s, patternFns)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const stack = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function stack(styles = {}) {
|
|
29
|
+
return css(stackRaw(styles))
|
|
30
|
+
}), { raw: stackRaw, propKeys: ["align","direction","gap","justify"] })
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface VisuallyHiddenProperties {}
|
|
4
|
+
|
|
5
|
+
type VisuallyHiddenRestStyles = Omit<SystemStyleObject, keyof VisuallyHiddenProperties>
|
|
6
|
+
|
|
7
|
+
interface VisuallyHiddenStyles extends VisuallyHiddenProperties, VisuallyHiddenRestStyles {}
|
|
8
|
+
|
|
9
|
+
interface VisuallyHiddenPatternFn {
|
|
10
|
+
(styles?: VisuallyHiddenStyles): string
|
|
11
|
+
raw: (styles?: VisuallyHiddenStyles) => SystemStyleObject
|
|
12
|
+
propKeys: Array<keyof VisuallyHiddenProperties>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare function visuallyHiddenRaw(styles?: VisuallyHiddenStyles): SystemStyleObject;
|
|
16
|
+
|
|
17
|
+
export declare const visuallyHidden: VisuallyHiddenPatternFn;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const visuallyHiddenConfig = { transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
srOnly: true,
|
|
8
|
+
...props
|
|
9
|
+
};
|
|
10
|
+
} }
|
|
11
|
+
|
|
12
|
+
export function visuallyHiddenRaw(styles) {
|
|
13
|
+
const s = getPatternStyles(visuallyHiddenConfig, styles || {})
|
|
14
|
+
return visuallyHiddenConfig.transform(s, patternFns)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const visuallyHidden = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function visuallyHidden(styles = {}) {
|
|
18
|
+
return css(visuallyHiddenRaw(styles))
|
|
19
|
+
}), { raw: visuallyHiddenRaw, propKeys: [] })
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface VstackProperties {
|
|
4
|
+
gap?: SystemProperties["gap"]
|
|
5
|
+
justify?: SystemProperties["justifyContent"]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type VstackRestStyles = Omit<SystemStyleObject, keyof VstackProperties>
|
|
9
|
+
|
|
10
|
+
interface VstackStyles extends VstackProperties, VstackRestStyles {}
|
|
11
|
+
|
|
12
|
+
interface VstackPatternFn {
|
|
13
|
+
(styles?: VstackStyles): string
|
|
14
|
+
raw: (styles?: VstackStyles) => SystemStyleObject
|
|
15
|
+
propKeys: Array<keyof VstackProperties>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare function vstackRaw(styles?: VstackStyles): SystemStyleObject;
|
|
19
|
+
|
|
20
|
+
export declare const vstack: VstackPatternFn;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const vstackConfig = {
|
|
6
|
+
transform(props) {
|
|
7
|
+
const { justify, gap, ...rest } = props;
|
|
8
|
+
return {
|
|
9
|
+
display: "flex",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
flexDirection: "column",
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
defaultValues: { gap: "8px" }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function vstackRaw(styles) {
|
|
21
|
+
const s = getPatternStyles(vstackConfig, styles || {})
|
|
22
|
+
return vstackConfig.transform(s, patternFns)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const vstack = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function vstack(styles = {}) {
|
|
26
|
+
return css(vstackRaw(styles))
|
|
27
|
+
}), { raw: vstackRaw, propKeys: ["gap","justify"] })
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface WrapProperties {
|
|
4
|
+
align?: SystemProperties["alignItems"]
|
|
5
|
+
columnGap?: SystemProperties["gap"]
|
|
6
|
+
gap?: SystemProperties["gap"]
|
|
7
|
+
justify?: SystemProperties["justifyContent"]
|
|
8
|
+
rowGap?: SystemProperties["gap"]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type WrapRestStyles = Omit<SystemStyleObject, keyof WrapProperties>
|
|
12
|
+
|
|
13
|
+
interface WrapStyles extends WrapProperties, WrapRestStyles {}
|
|
14
|
+
|
|
15
|
+
interface WrapPatternFn {
|
|
16
|
+
(styles?: WrapStyles): string
|
|
17
|
+
raw: (styles?: WrapStyles) => SystemStyleObject
|
|
18
|
+
propKeys: Array<keyof WrapProperties>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export declare function wrapRaw(styles?: WrapStyles): SystemStyleObject;
|
|
22
|
+
|
|
23
|
+
export declare const wrap: WrapPatternFn;
|