@cdx-ui/components 0.0.1-beta.3 → 0.0.1-beta.31
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 +18 -11
- package/lib/commonjs/components/Button/styles.js +2 -2
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +22 -4
- package/lib/commonjs/components/Card/index.js.map +1 -1
- package/lib/commonjs/components/Card/styles.js +27 -5
- package/lib/commonjs/components/Card/styles.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js +5 -29
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +39 -47
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Field/index.js +8 -2
- package/lib/commonjs/components/Field/index.js.map +1 -1
- package/lib/commonjs/components/Field/styles.js +4 -4
- package/lib/commonjs/components/Field/styles.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js +1 -1
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +1 -2
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/index.js +6 -1
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +135 -10
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +7 -6
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +283 -0
- package/lib/commonjs/components/ListItem/index.js.map +1 -0
- package/lib/commonjs/components/ListItem/styles.js +130 -0
- package/lib/commonjs/components/ListItem/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/index.js +22 -10
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js +167 -0
- package/lib/commonjs/components/Radio/index.js.map +1 -0
- package/lib/commonjs/components/Radio/styles.js +31 -0
- package/lib/commonjs/components/Radio/styles.js.map +1 -0
- package/lib/commonjs/components/Text/styles.js +2 -2
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/components/Tile/index.js +251 -0
- package/lib/commonjs/components/Tile/index.js.map +1 -0
- package/lib/commonjs/components/Tile/styles.js +52 -0
- package/lib/commonjs/components/Tile/styles.js.map +1 -0
- package/lib/commonjs/components/index.js +36 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/Button.figma.js +70 -0
- package/lib/commonjs/figma/Button.figma.js.map +1 -0
- package/lib/commonjs/figma/Card.Header.figma.js +28 -0
- package/lib/commonjs/figma/Card.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/Card.figma.js +42 -0
- package/lib/commonjs/figma/Card.figma.js.map +1 -0
- package/lib/commonjs/figma/Checkbox.figma.js +55 -0
- package/lib/commonjs/figma/Checkbox.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Input.figma.js +57 -0
- package/lib/commonjs/figma/Field.Input.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Select.figma.js +57 -0
- package/lib/commonjs/figma/Field.Select.figma.js.map +1 -0
- package/lib/commonjs/figma/Heading.figma.js +30 -0
- package/lib/commonjs/figma/Heading.figma.js.map +1 -0
- package/lib/commonjs/figma/Icon.figma.js +20 -0
- package/lib/commonjs/figma/Icon.figma.js.map +1 -0
- package/lib/commonjs/figma/IconButton.figma.js +47 -0
- package/lib/commonjs/figma/IconButton.figma.js.map +1 -0
- package/lib/commonjs/figma/Input.figma.js +52 -0
- package/lib/commonjs/figma/Input.figma.js.map +1 -0
- package/lib/commonjs/figma/ProgressSegmented.figma.js +39 -0
- package/lib/commonjs/figma/ProgressSegmented.figma.js.map +1 -0
- package/lib/commonjs/figma/Radio.figma.js +38 -0
- package/lib/commonjs/figma/Radio.figma.js.map +1 -0
- package/lib/commonjs/figma/Select.figma.js +53 -0
- package/lib/commonjs/figma/Select.figma.js.map +1 -0
- package/lib/commonjs/figma/Text.figma.js +29 -0
- package/lib/commonjs/figma/Text.figma.js.map +1 -0
- package/lib/commonjs/figma/icons.figma.batch.js +27 -0
- package/lib/commonjs/figma/icons.figma.batch.js.map +1 -0
- package/lib/commonjs/figma/icons.figma.batch.json +17705 -0
- package/lib/commonjs/styles/primitives.js +36 -2
- package/lib/commonjs/styles/primitives.js.map +1 -1
- package/lib/module/components/Button/styles.js +2 -2
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Card/index.js +23 -4
- package/lib/module/components/Card/index.js.map +1 -1
- package/lib/module/components/Card/styles.js +27 -5
- package/lib/module/components/Card/styles.js.map +1 -1
- package/lib/module/components/Checkbox/index.js +6 -30
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +40 -48
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Field/index.js +9 -3
- package/lib/module/components/Field/index.js.map +1 -1
- package/lib/module/components/Field/styles.js +4 -4
- package/lib/module/components/Field/styles.js.map +1 -1
- package/lib/module/components/Heading/styles.js +1 -1
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/Icon/index.js +1 -2
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/IconButton/index.js +6 -1
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +135 -10
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/Input/styles.js +7 -6
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/ListItem/index.js +226 -0
- package/lib/module/components/ListItem/index.js.map +1 -0
- package/lib/module/components/ListItem/styles.js +127 -0
- package/lib/module/components/ListItem/styles.js.map +1 -0
- package/lib/module/components/ProgressSegmented/index.js +23 -11
- package/lib/module/components/ProgressSegmented/index.js.map +1 -1
- package/lib/module/components/Radio/index.js +164 -0
- package/lib/module/components/Radio/index.js.map +1 -0
- package/lib/module/components/Radio/styles.js +27 -0
- package/lib/module/components/Radio/styles.js.map +1 -0
- package/lib/module/components/Text/styles.js +2 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/components/Tile/index.js +243 -0
- package/lib/module/components/Tile/index.js.map +1 -0
- package/lib/module/components/Tile/styles.js +48 -0
- package/lib/module/components/Tile/styles.js.map +1 -0
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/Button.figma.js +64 -0
- package/lib/module/figma/Button.figma.js.map +1 -0
- package/lib/module/figma/Card.Header.figma.js +22 -0
- package/lib/module/figma/Card.Header.figma.js.map +1 -0
- package/lib/module/figma/Card.figma.js +36 -0
- package/lib/module/figma/Card.figma.js.map +1 -0
- package/lib/module/figma/Checkbox.figma.js +49 -0
- package/lib/module/figma/Checkbox.figma.js.map +1 -0
- package/lib/module/figma/Field.Input.figma.js +51 -0
- package/lib/module/figma/Field.Input.figma.js.map +1 -0
- package/lib/module/figma/Field.Select.figma.js +51 -0
- package/lib/module/figma/Field.Select.figma.js.map +1 -0
- package/lib/module/figma/Heading.figma.js +24 -0
- package/lib/module/figma/Heading.figma.js.map +1 -0
- package/lib/module/figma/Icon.figma.js +14 -0
- package/lib/module/figma/Icon.figma.js.map +1 -0
- package/lib/module/figma/IconButton.figma.js +41 -0
- package/lib/module/figma/IconButton.figma.js.map +1 -0
- package/lib/module/figma/Input.figma.js +46 -0
- package/lib/module/figma/Input.figma.js.map +1 -0
- package/lib/module/figma/ProgressSegmented.figma.js +33 -0
- package/lib/module/figma/ProgressSegmented.figma.js.map +1 -0
- package/lib/module/figma/Radio.figma.js +32 -0
- package/lib/module/figma/Radio.figma.js.map +1 -0
- package/lib/module/figma/Select.figma.js +47 -0
- package/lib/module/figma/Select.figma.js.map +1 -0
- package/lib/module/figma/Text.figma.js +23 -0
- package/lib/module/figma/Text.figma.js.map +1 -0
- package/lib/module/figma/icons.figma.batch.js +22 -0
- package/lib/module/figma/icons.figma.batch.js.map +1 -0
- package/lib/module/figma/icons.figma.batch.json +17705 -0
- package/lib/module/styles/primitives.js +36 -2
- package/lib/module/styles/primitives.js.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +4 -3
- package/lib/typescript/components/Card/index.d.ts.map +1 -1
- package/lib/typescript/components/Card/styles.d.ts +13 -3
- package/lib/typescript/components/Card/styles.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts +1 -2
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -14
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +2 -2
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -1
- package/lib/typescript/components/Field/index.d.ts.map +1 -1
- package/lib/typescript/components/Field/styles.d.ts.map +1 -1
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/styles.d.ts +6 -2
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +49 -0
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -0
- package/lib/typescript/components/ListItem/styles.d.ts +30 -0
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts +14 -3
- package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -1
- package/lib/typescript/components/Radio/index.d.ts +40 -0
- package/lib/typescript/components/Radio/index.d.ts.map +1 -0
- package/lib/typescript/components/Radio/styles.d.ts +8 -0
- package/lib/typescript/components/Radio/styles.d.ts.map +1 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -1
- package/lib/typescript/components/Tile/index.d.ts +70 -0
- package/lib/typescript/components/Tile/index.d.ts.map +1 -0
- package/lib/typescript/components/Tile/styles.d.ts +18 -0
- package/lib/typescript/components/Tile/styles.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +3 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/figma/Button.figma.d.ts +8 -0
- package/lib/typescript/figma/Button.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Card.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Card.figma.d.ts +8 -0
- package/lib/typescript/figma/Card.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Checkbox.figma.d.ts +8 -0
- package/lib/typescript/figma/Checkbox.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Input.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Input.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Select.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Select.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Heading.figma.d.ts +8 -0
- package/lib/typescript/figma/Heading.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Icon.figma.d.ts +8 -0
- package/lib/typescript/figma/Icon.figma.d.ts.map +1 -0
- package/lib/typescript/figma/IconButton.figma.d.ts +8 -0
- package/lib/typescript/figma/IconButton.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Input.figma.d.ts +8 -0
- package/lib/typescript/figma/Input.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ProgressSegmented.figma.d.ts +8 -0
- package/lib/typescript/figma/ProgressSegmented.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Radio.figma.d.ts +8 -0
- package/lib/typescript/figma/Radio.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Select.figma.d.ts +8 -0
- package/lib/typescript/figma/Select.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Text.figma.d.ts +8 -0
- package/lib/typescript/figma/Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/icons.figma.batch.d.ts +14 -0
- package/lib/typescript/figma/icons.figma.batch.d.ts.map +1 -0
- package/lib/typescript/styles/primitives.d.ts +35 -0
- package/lib/typescript/styles/primitives.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/Button/styles.ts +2 -2
- package/src/components/Card/index.tsx +41 -16
- package/src/components/Card/styles.ts +43 -23
- package/src/components/Checkbox/index.tsx +8 -19
- package/src/components/Checkbox/styles.ts +82 -86
- package/src/components/Field/FieldLabel.web.tsx +1 -1
- package/src/components/Field/index.tsx +10 -3
- package/src/components/Field/styles.ts +5 -4
- package/src/components/Heading/{styles.tsx → styles.ts} +1 -1
- package/src/components/Icon/index.tsx +1 -2
- package/src/components/IconButton/index.tsx +3 -2
- package/src/components/IconButton/styles.ts +136 -10
- package/src/components/Input/styles.ts +13 -8
- package/src/components/ListItem/index.tsx +285 -0
- package/src/components/ListItem/styles.ts +153 -0
- package/src/components/ProgressSegmented/index.tsx +49 -14
- package/src/components/Radio/index.tsx +192 -0
- package/src/components/Radio/styles.ts +59 -0
- package/src/components/Text/{styles.tsx → styles.ts} +2 -2
- package/src/components/Tile/index.tsx +296 -0
- package/src/components/Tile/styles.ts +82 -0
- package/src/components/index.ts +3 -0
- package/src/styles/primitives.ts +36 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const tileGroupVariants: (props?: ({
|
|
3
|
+
direction?: "row" | "column" | null | undefined;
|
|
4
|
+
spacing?: "default" | "none" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export type TileGroupVariantProps = VariantProps<typeof tileGroupVariants>;
|
|
7
|
+
export declare const tileRootVariants: (props?: ({
|
|
8
|
+
shape?: "flat" | "card" | null | undefined;
|
|
9
|
+
showSeparator?: boolean | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
export declare const tileLeadingSlotVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
12
|
+
export declare const tileTrailingSlotVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
13
|
+
export declare const tileContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
14
|
+
export declare const tileTitleVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
|
+
export declare const tileDescriptionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
|
+
export declare const tileIndicatorVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
export type TileVariantProps = VariantProps<typeof tileRootVariants>;
|
|
18
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Tile/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,iBAAiB;;;8EAe5B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3E,eAAO,MAAM,gBAAgB;;;8EA4C5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,oFAAqD,CAAC;AAE1F,eAAO,MAAM,wBAAwB,oFAAqD,CAAC;AAE3F,eAAO,MAAM,mBAAmB,oFAAwD,CAAC;AAEzF,eAAO,MAAM,iBAAiB,oFAAmE,CAAC;AAElG,eAAO,MAAM,uBAAuB,oFAAuD,CAAC;AAE5F,eAAO,MAAM,qBAAqB,oFAAqD,CAAC;AAExF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -13,11 +13,14 @@ export * from './Image';
|
|
|
13
13
|
export * from './Input';
|
|
14
14
|
export * from './OtpInput';
|
|
15
15
|
export * from './Link';
|
|
16
|
+
export * from './ListItem';
|
|
16
17
|
export * from './ProgressBar';
|
|
17
18
|
export * from './ProgressSegmented';
|
|
19
|
+
export * from './Radio';
|
|
18
20
|
export * from './Select';
|
|
19
21
|
export * from './VirtualizedList';
|
|
20
22
|
export * from './Switch';
|
|
23
|
+
export * from './Tile';
|
|
21
24
|
export { HStack, VStack } from './Stack';
|
|
22
25
|
export * from './Heading';
|
|
23
26
|
export * from './Text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Button.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAqD1B,wBASE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.Header.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Card.Header.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAU1B,wBASE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Card.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AA8B1B,wBASE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Checkbox.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAwC1B,wBAOE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.Input.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Field.Input.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AA4C1B,wBAYE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.Select.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Field.Select.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AA4C1B,wBAYE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Heading.figma.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAe1B,wBAIE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Icon.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAM1B,wBAIE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/IconButton.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAiC1B,wBAKE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Input.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAgD1B,wBAOE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressSegmented.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/ProgressSegmented.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AA0B1B,wBAME"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Radio.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAsB1B,wBAOE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Select.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAyC1B,wBASE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Text.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAe1B,wBAIE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import figma from 'figma';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
example: figma.TemplateStringResult;
|
|
4
|
+
imports: string[];
|
|
5
|
+
id: string;
|
|
6
|
+
metadata: {
|
|
7
|
+
nestable: boolean;
|
|
8
|
+
props: {
|
|
9
|
+
componentName: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=icons.figma.batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.figma.batch.d.ts","sourceRoot":"","sources":["../../../src/figma/icons.figma.batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;QAaF,MAAM;;;;;;;;AAH9B,wBAQE"}
|
|
@@ -1,22 +1,53 @@
|
|
|
1
|
+
/** @deprecated Use `bg-surface-primary` (--color-surface-primary) instead. */
|
|
1
2
|
export declare const COLOR_BG_PRIMARY = "bg-white";
|
|
3
|
+
/** @deprecated Use `bg-surface-secondary` (--color-surface-secondary) instead. */
|
|
2
4
|
export declare const COLOR_BG_SUBTLE = "bg-slate-50";
|
|
5
|
+
/** @deprecated Use `bg-surface-neutral-subtle` (--color-surface-neutral-subtle) instead. */
|
|
3
6
|
export declare const COLOR_BG_MUTED = "bg-slate-100";
|
|
7
|
+
/** @deprecated Use `bg-base-950` (--color-base-950) instead. */
|
|
4
8
|
export declare const COLOR_BG_INVERSE = "bg-slate-900";
|
|
9
|
+
/** @deprecated Use `border-stroke-secondary` (--color-stroke-secondary) instead. */
|
|
5
10
|
export declare const COLOR_BORDER_DEFAULT = "border-slate-200";
|
|
11
|
+
/** @deprecated Use `border-stroke-hover` (--color-stroke-hover) instead. */
|
|
6
12
|
export declare const COLOR_BORDER_STRONG = "border-slate-300";
|
|
13
|
+
/** @deprecated Use `border-stroke-focus` (--color-stroke-focus) instead. */
|
|
7
14
|
export declare const COLOR_BORDER_FOCUS = "border-slate-900";
|
|
15
|
+
/** @deprecated Use `border-stroke-danger` (--color-stroke-danger) instead. */
|
|
8
16
|
export declare const COLOR_BORDER_INVALID = "border-red-500";
|
|
17
|
+
/** @deprecated Use `text-content-primary` (--color-content-primary) instead. */
|
|
9
18
|
export declare const COLOR_TEXT_PRIMARY = "text-slate-900";
|
|
19
|
+
/** @deprecated Use `text-content-secondary` (--color-content-secondary) instead. */
|
|
10
20
|
export declare const COLOR_TEXT_SECONDARY = "text-slate-500";
|
|
21
|
+
/** @deprecated Use `text-content-tertiary` (--color-content-tertiary) instead. */
|
|
11
22
|
export declare const COLOR_TEXT_MUTED = "text-slate-400";
|
|
23
|
+
/** @deprecated Use the appropriate `text-content-*-on-strong` token for the surface color, e.g. `text-content-action-on-strong` (--color-content-action-on-strong). */
|
|
12
24
|
export declare const COLOR_TEXT_INVERSE = "text-white";
|
|
25
|
+
/** @deprecated Use `text-content-tertiary` (--color-content-tertiary) instead. */
|
|
13
26
|
export declare const COLOR_TEXT_PLACEHOLDER = "text-slate-400";
|
|
27
|
+
/** @deprecated Use `text-content-danger` (--color-content-danger) instead. */
|
|
14
28
|
export declare const COLOR_TEXT_INVALID = "text-red-600";
|
|
29
|
+
/** @deprecated Use `bg-surface-action-strong` (--color-surface-action-strong) instead. */
|
|
15
30
|
export declare const COLOR_BRAND_DEFAULT = "bg-slate-900";
|
|
31
|
+
/** @deprecated Use `bg-surface-action-strong-hover` (--color-surface-action-strong-hover) instead. */
|
|
16
32
|
export declare const COLOR_BRAND_HOVER = "bg-slate-800";
|
|
33
|
+
/** @deprecated Use `bg-surface-action-strong-active` (--color-surface-action-strong-active) instead. */
|
|
17
34
|
export declare const COLOR_BRAND_ACTIVE = "bg-slate-700";
|
|
35
|
+
/** @deprecated Use `bg-surface-action-strong` (--color-surface-action-strong) instead. */
|
|
18
36
|
export declare const COLOR_ACCENT_DEFAULT = "bg-slate-900";
|
|
37
|
+
/** @deprecated Use `border-stroke-action` (--color-stroke-action) instead. */
|
|
19
38
|
export declare const COLOR_ACCENT_BORDER = "border-slate-900";
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use semantic token classes directly instead. Map each color key to its
|
|
41
|
+
* corresponding `--color-surface-*`, `--color-stroke-*`, and `--color-content-*` tokens:
|
|
42
|
+
* - `bg` → `bg-surface-{color}-strong` (--color-surface-{color}-strong)
|
|
43
|
+
* - `bgHover` → `bg-surface-{color}-strong-hover` (--color-surface-{color}-strong-hover)
|
|
44
|
+
* - `bgActive` → `bg-surface-{color}-strong-active` (--color-surface-{color}-strong-active)
|
|
45
|
+
* - `border` → `border-stroke-{color}` (--color-stroke-{color})
|
|
46
|
+
* - `text` → `text-content-{color}` (--color-content-{color})
|
|
47
|
+
* - `ring` → `ring-[--color-stroke-focus]` (--color-stroke-focus)
|
|
48
|
+
*
|
|
49
|
+
* See Button/styles.ts for a complete migration example.
|
|
50
|
+
*/
|
|
20
51
|
export declare const SEMANTIC_COLORS: {
|
|
21
52
|
readonly action: {
|
|
22
53
|
readonly bg: "bg-slate-900";
|
|
@@ -59,12 +90,16 @@ export declare const SEMANTIC_COLORS: {
|
|
|
59
90
|
readonly ring: "ring-sky-400/50";
|
|
60
91
|
};
|
|
61
92
|
};
|
|
93
|
+
/** @deprecated Use `ring-2 ring-[--color-stroke-focus] ring-offset-2` (--color-stroke-focus) instead. */
|
|
62
94
|
export declare const FOCUS_RING = "ring-2 ring-slate-400/50 ring-offset-2";
|
|
63
95
|
export declare const RADIUS_SM = "rounded-lg";
|
|
64
96
|
export declare const RADIUS_MD = "rounded-xl";
|
|
65
97
|
export declare const RADIUS_FULL = "rounded-full";
|
|
98
|
+
/** @deprecated Use `shadow-sm` directly instead */
|
|
66
99
|
export declare const SHADOW_SM = "shadow-sm";
|
|
100
|
+
/** @deprecated Use `shadow-md` directly instead */
|
|
67
101
|
export declare const SHADOW_MD = "shadow-md";
|
|
102
|
+
/** @deprecated */
|
|
68
103
|
export declare const SIZE_SCALE: {
|
|
69
104
|
readonly default: {
|
|
70
105
|
readonly height: "h-10";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/styles/primitives.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAC3C,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAC7C,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAG/C,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAGrD,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AACrD,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AACjD,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAChD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AACnD,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/styles/primitives.ts"],"names":[],"mappings":"AAKA,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAC3C,kFAAkF;AAClF,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAC7C,4FAA4F;AAC5F,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAC7C,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAG/C,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAGrD,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AACrD,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AACjD,uKAAuK;AACvK,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,sGAAsG;AACtG,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAChD,wGAAwG;AACxG,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD,0FAA0F;AAC1F,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AACnD,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClB,CAAC;AAGX,yGAAyG;AACzG,eAAO,MAAM,UAAU,2CAA2C,CAAC;AAGnE,eAAO,MAAM,SAAS,eAAe,CAAC;AACtC,eAAO,MAAM,SAAS,eAAe,CAAC;AACtC,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAI1C,mDAAmD;AACnD,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,mDAAmD;AACnD,eAAO,MAAM,SAAS,cAAc,CAAC;AAMrC,kBAAkB;AAClB,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAGb,CAAC;AAGX,eAAO,MAAM,iBAAiB,mCAAmC,CAAC;AAGlE,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAClE,eAAO,MAAM,eAAe,qFACwD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.31",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"lib",
|
|
27
27
|
"src",
|
|
28
|
-
"!src
|
|
28
|
+
"!src/figma"
|
|
29
29
|
],
|
|
30
30
|
"react-native-builder-bob": {
|
|
31
31
|
"source": "src",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"@gorhom/bottom-sheet": "^5.2.6",
|
|
68
68
|
"class-variance-authority": "^0.7.1",
|
|
69
69
|
"uniwind": "1.6.1",
|
|
70
|
-
"@cdx-ui/primitives": "0.0.1-beta.
|
|
71
|
-
"@cdx-ui/utils": "0.0.1-beta.
|
|
72
|
-
"@cdx-ui/icons": "0.0.1-beta.
|
|
70
|
+
"@cdx-ui/primitives": "0.0.1-beta.31",
|
|
71
|
+
"@cdx-ui/utils": "0.0.1-beta.31",
|
|
72
|
+
"@cdx-ui/icons": "0.0.1-beta.31"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/react": "*",
|
|
@@ -10,7 +10,7 @@ export const buttonRootVariants = cva(
|
|
|
10
10
|
'rounded-[var(--border-radius-button)]',
|
|
11
11
|
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
12
12
|
TRANSITION_COLORS,
|
|
13
|
-
'data-[disabled=true]:opacity-[--opacity-disabled]',
|
|
13
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
14
14
|
DISABLED_CURSOR,
|
|
15
15
|
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[--color-stroke-focus] web:data-[focus-visible=true]:ring-offset-2',
|
|
16
16
|
],
|
|
@@ -29,7 +29,7 @@ export const buttonRootVariants = cva(
|
|
|
29
29
|
info: [],
|
|
30
30
|
},
|
|
31
31
|
size: {
|
|
32
|
-
default: 'h-
|
|
32
|
+
default: 'h-11 px-4 gap-2',
|
|
33
33
|
small: 'h-8 px-3 gap-1.5',
|
|
34
34
|
},
|
|
35
35
|
fullWidth: {
|
|
@@ -1,31 +1,48 @@
|
|
|
1
1
|
import { forwardRef, type ReactNode } from 'react';
|
|
2
2
|
import { View, type ViewProps } from 'react-native';
|
|
3
|
-
import { cn } from '@cdx-ui/utils';
|
|
3
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
4
4
|
import {
|
|
5
5
|
cardContentVariants,
|
|
6
6
|
cardFooterVariants,
|
|
7
7
|
cardHeaderVariants,
|
|
8
8
|
cardRootVariants,
|
|
9
|
+
type CardContentVariantProps,
|
|
10
|
+
type CardFooterVariantProps,
|
|
11
|
+
type CardVariantProps,
|
|
9
12
|
} from './styles';
|
|
10
13
|
|
|
11
14
|
// =============================================================================
|
|
12
15
|
// STYLED ROOT COMPONENT
|
|
13
16
|
// =============================================================================
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
const SCOPE = 'CARD';
|
|
19
|
+
|
|
20
|
+
const Root = withStyleContext(View, SCOPE);
|
|
21
|
+
|
|
22
|
+
const useCardStyleContext = () => useStyleContext(SCOPE) as CardVariantProps;
|
|
23
|
+
|
|
24
|
+
export interface CardProps extends ViewProps, CardVariantProps {
|
|
16
25
|
className?: string;
|
|
17
26
|
children?: ReactNode;
|
|
18
27
|
}
|
|
19
28
|
|
|
20
|
-
const CardRoot = forwardRef<View, CardProps>(
|
|
21
|
-
|
|
29
|
+
const CardRoot = forwardRef<View, CardProps>(
|
|
30
|
+
({ className, children, style, fullBleed, ...props }, ref) => {
|
|
31
|
+
const computedClassName = cn(cardRootVariants(), className);
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
33
|
+
return (
|
|
34
|
+
<Root
|
|
35
|
+
ref={ref}
|
|
36
|
+
className={computedClassName}
|
|
37
|
+
style={style}
|
|
38
|
+
context={{ fullBleed }}
|
|
39
|
+
{...props}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
</Root>
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
);
|
|
29
46
|
|
|
30
47
|
CardRoot.displayName = 'Card';
|
|
31
48
|
|
|
@@ -56,14 +73,18 @@ CardHeader.displayName = 'Card.Header';
|
|
|
56
73
|
// STYLED CONTENT COMPONENT
|
|
57
74
|
// =============================================================================
|
|
58
75
|
|
|
59
|
-
export interface CardContentProps extends ViewProps {
|
|
76
|
+
export interface CardContentProps extends ViewProps, CardContentVariantProps {
|
|
60
77
|
className?: string;
|
|
61
78
|
children?: ReactNode;
|
|
62
79
|
}
|
|
63
80
|
|
|
64
81
|
const CardContent = forwardRef<View, CardContentProps>(
|
|
65
|
-
({ className, children, style, ...props }, ref) => {
|
|
66
|
-
const
|
|
82
|
+
({ className, children, style, fullBleed, ...props }, ref) => {
|
|
83
|
+
const { fullBleed: fullBleedFromContext } = useCardStyleContext();
|
|
84
|
+
const computedClassName = cn(
|
|
85
|
+
cardContentVariants({ fullBleed: fullBleed ?? fullBleedFromContext }),
|
|
86
|
+
className,
|
|
87
|
+
);
|
|
67
88
|
|
|
68
89
|
return (
|
|
69
90
|
<View ref={ref} className={computedClassName} style={style} {...props}>
|
|
@@ -79,14 +100,18 @@ CardContent.displayName = 'Card.Content';
|
|
|
79
100
|
// STYLED FOOTER COMPONENT
|
|
80
101
|
// =============================================================================
|
|
81
102
|
|
|
82
|
-
export interface CardFooterProps extends ViewProps {
|
|
103
|
+
export interface CardFooterProps extends ViewProps, CardFooterVariantProps {
|
|
83
104
|
className?: string;
|
|
84
105
|
children?: ReactNode;
|
|
85
106
|
}
|
|
86
107
|
|
|
87
108
|
const CardFooter = forwardRef<View, CardFooterProps>(
|
|
88
|
-
({ className, children, style, ...props }, ref) => {
|
|
89
|
-
const
|
|
109
|
+
({ className, children, style, fullBleed, ...props }, ref) => {
|
|
110
|
+
const { fullBleed: fullBleedFromContext } = useCardStyleContext();
|
|
111
|
+
const computedClassName = cn(
|
|
112
|
+
cardFooterVariants({ fullBleed: fullBleed ?? fullBleedFromContext }),
|
|
113
|
+
className,
|
|
114
|
+
);
|
|
90
115
|
|
|
91
116
|
return (
|
|
92
117
|
<View ref={ref} className={computedClassName} style={style} {...props}>
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { cva } from 'class-variance-authority';
|
|
2
|
-
import {
|
|
3
|
-
COLOR_BG_PRIMARY,
|
|
4
|
-
COLOR_BORDER_DEFAULT,
|
|
5
|
-
COLOR_TEXT_PRIMARY,
|
|
6
|
-
RADIUS_SM,
|
|
7
|
-
SHADOW_SM,
|
|
8
|
-
} from '../../styles/primitives';
|
|
1
|
+
import { cva, VariantProps } from 'class-variance-authority';
|
|
9
2
|
|
|
10
3
|
// ── Root ────────────────────────────────────────────────────
|
|
11
4
|
|
|
12
|
-
export const cardRootVariants = cva(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
]
|
|
5
|
+
export const cardRootVariants = cva(
|
|
6
|
+
[
|
|
7
|
+
'bg-surface-primary',
|
|
8
|
+
'border border-stroke-secondary',
|
|
9
|
+
'rounded-[var(--border-radius-default)]',
|
|
10
|
+
'overflow-hidden',
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
fullBleed: {
|
|
15
|
+
true: '',
|
|
16
|
+
false: '',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
);
|
|
19
21
|
|
|
20
22
|
// ── Header ──────────────────────────────────────────────────
|
|
21
23
|
|
|
22
24
|
export const cardHeaderVariants = cva([
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
+
'border-t-8 border-t-surface-brand-strong',
|
|
26
|
+
'border-b border-solid border-b-stroke-secondary',
|
|
27
|
+
'flex-row items-center justify-between gap-0.5',
|
|
28
|
+
'px-5 py-3',
|
|
25
29
|
]);
|
|
26
30
|
|
|
27
31
|
// ── Title ───────────────────────────────────────────────────
|
|
@@ -30,12 +34,28 @@ export const cardTitleVariants = cva(['flex-1']);
|
|
|
30
34
|
|
|
31
35
|
// ── Content ─────────────────────────────────────────────────
|
|
32
36
|
|
|
33
|
-
export const cardContentVariants = cva([
|
|
37
|
+
export const cardContentVariants = cva(['text-content-primary', 'p-5'], {
|
|
38
|
+
variants: {
|
|
39
|
+
fullBleed: {
|
|
40
|
+
true: 'p-0',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
34
44
|
|
|
35
45
|
// ── Footer ──────────────────────────────────────────────────
|
|
36
46
|
|
|
37
|
-
export const cardFooterVariants = cva([
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
export const cardFooterVariants = cva(['flex-col items-stretch gap-2'], {
|
|
48
|
+
variants: {
|
|
49
|
+
fullBleed: {
|
|
50
|
+
true: 'p-5',
|
|
51
|
+
false: 'px-5 pb-5 pt-0',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
fullBleed: false,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export type CardVariantProps = VariantProps<typeof cardRootVariants>;
|
|
60
|
+
export type CardContentVariantProps = VariantProps<typeof cardContentVariants>;
|
|
61
|
+
export type CardFooterVariantProps = VariantProps<typeof cardFooterVariants>;
|