@cdx-ui/components 0.0.1-alpha.2 → 0.0.1-alpha.20
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 +2 -2
- package/lib/commonjs/components/Avatar/index.js +156 -0
- package/lib/commonjs/components/Avatar/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/styles.js +80 -0
- package/lib/commonjs/components/Avatar/styles.js.map +1 -0
- package/lib/commonjs/components/Box/Box.js +1 -0
- package/lib/commonjs/components/Box/Box.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +28 -13
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +323 -139
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +104 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Card/styles.js +28 -0
- package/lib/commonjs/components/Card/styles.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +180 -0
- package/lib/commonjs/components/Checkbox/index.js.map +1 -0
- package/lib/commonjs/components/Checkbox/styles.js +68 -0
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -0
- package/lib/commonjs/components/Chip/index.js +103 -0
- package/lib/commonjs/components/Chip/index.js.map +1 -0
- package/lib/commonjs/components/Chip/styles.js +50 -0
- package/lib/commonjs/components/Chip/styles.js.map +1 -0
- package/lib/commonjs/components/Heading/index.js +35 -0
- package/lib/commonjs/components/Heading/index.js.map +1 -0
- package/lib/commonjs/components/Heading/styles.js +24 -0
- package/lib/commonjs/components/Heading/styles.js.map +1 -0
- package/lib/commonjs/components/Icon/index.js +61 -0
- package/lib/commonjs/components/Icon/index.js.map +1 -0
- package/lib/commonjs/components/Input/index.js +10 -16
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +16 -30
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +38 -0
- package/lib/commonjs/components/Link/index.js.map +1 -0
- package/lib/commonjs/components/Link/styles.js +14 -0
- package/lib/commonjs/components/Link/styles.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +11 -12
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +29 -53
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +8 -21
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +8 -21
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/Stack/styles.js +39 -0
- package/lib/commonjs/components/Stack/styles.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js +46 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.web.js +56 -0
- package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -0
- package/lib/commonjs/components/Switch/index.js +13 -0
- package/lib/commonjs/components/Switch/index.js.map +1 -0
- package/lib/commonjs/components/Switch/styles.js +128 -0
- package/lib/commonjs/components/Switch/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +18 -9
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +24 -0
- package/lib/commonjs/components/Text/styles.js.map +1 -0
- package/lib/commonjs/components/VirtualizedList/index.js +19 -0
- package/lib/commonjs/components/VirtualizedList/index.js.map +1 -0
- package/lib/commonjs/components/index.js +108 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/metro/withCdxMetroConfig.js +24 -0
- package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -0
- package/lib/commonjs/styles/index.js +17 -0
- package/lib/commonjs/styles/index.js.map +1 -0
- package/lib/commonjs/styles/primitives.js +123 -0
- package/lib/commonjs/styles/primitives.js.map +1 -0
- package/lib/module/components/Avatar/index.js +152 -0
- package/lib/module/components/Avatar/index.js.map +1 -0
- package/lib/module/components/Avatar/styles.js +77 -0
- package/lib/module/components/Avatar/styles.js.map +1 -0
- package/lib/module/components/Box/Box.js +1 -0
- package/lib/module/components/Box/Box.js.map +1 -1
- package/lib/module/components/Button/index.js +29 -14
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +322 -138
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Card/index.js +100 -0
- package/lib/module/components/Card/index.js.map +1 -0
- package/lib/module/components/Card/styles.js +25 -0
- package/lib/module/components/Card/styles.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +176 -0
- package/lib/module/components/Checkbox/index.js.map +1 -0
- package/lib/module/components/Checkbox/styles.js +64 -0
- package/lib/module/components/Checkbox/styles.js.map +1 -0
- package/lib/module/components/Chip/index.js +99 -0
- package/lib/module/components/Chip/index.js.map +1 -0
- package/lib/module/components/Chip/styles.js +46 -0
- package/lib/module/components/Chip/styles.js.map +1 -0
- package/lib/module/components/Heading/index.js +31 -0
- package/lib/module/components/Heading/index.js.map +1 -0
- package/lib/module/components/Heading/styles.js +20 -0
- package/lib/module/components/Heading/styles.js.map +1 -0
- package/lib/module/components/Icon/index.js +57 -0
- package/lib/module/components/Icon/index.js.map +1 -0
- package/lib/module/components/Input/index.js +10 -16
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +16 -30
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/Link/index.js +29 -0
- package/lib/module/components/Link/index.js.map +1 -0
- package/lib/module/components/Link/styles.js +10 -0
- package/lib/module/components/Link/styles.js.map +1 -0
- package/lib/module/components/Select/index.js +12 -13
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +29 -53
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +8 -21
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +8 -21
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/Stack/styles.js +35 -0
- package/lib/module/components/Stack/styles.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.js +42 -0
- package/lib/module/components/Switch/BaseSwitch.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.web.js +52 -0
- package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -0
- package/lib/module/components/Switch/index.js +9 -0
- package/lib/module/components/Switch/index.js.map +1 -0
- package/lib/module/components/Switch/styles.js +125 -0
- package/lib/module/components/Switch/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +19 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +20 -0
- package/lib/module/components/Text/styles.js.map +1 -0
- package/lib/module/components/VirtualizedList/index.js +15 -0
- package/lib/module/components/VirtualizedList/index.js.map +1 -0
- package/lib/module/components/index.js +9 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/metro/withCdxMetroConfig.js +20 -0
- package/lib/module/metro/withCdxMetroConfig.js.map +1 -0
- package/lib/module/styles/index.js +4 -0
- package/lib/module/styles/index.js.map +1 -0
- package/lib/module/styles/primitives.js +119 -0
- package/lib/module/styles/primitives.js.map +1 -0
- package/lib/typescript/components/Avatar/index.d.ts +40 -0
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/components/Avatar/styles.d.ts +16 -0
- package/lib/typescript/components/Avatar/styles.d.ts.map +1 -0
- package/lib/typescript/components/Box/Box.d.ts +1 -0
- package/lib/typescript/components/Box/Box.d.ts.map +1 -1
- package/lib/typescript/components/Button/index.d.ts +6 -3
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +14 -8
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +30 -0
- package/lib/typescript/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/components/Card/styles.d.ts +6 -0
- package/lib/typescript/components/Card/styles.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/index.d.ts +46 -0
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/styles.d.ts +18 -0
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -0
- package/lib/typescript/components/Chip/index.d.ts +27 -0
- package/lib/typescript/components/Chip/index.d.ts.map +1 -0
- package/lib/typescript/components/Chip/styles.d.ts +12 -0
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -0
- package/lib/typescript/components/Heading/index.d.ts +10 -0
- package/lib/typescript/components/Heading/index.d.ts.map +1 -0
- package/lib/typescript/components/Heading/styles.d.ts +6 -0
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
- package/lib/typescript/components/Icon/index.d.ts +27 -0
- package/lib/typescript/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/components/Input/index.d.ts +6 -4
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts +5 -7
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +8 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -0
- package/lib/typescript/components/Link/styles.d.ts +2 -0
- package/lib/typescript/components/Link/styles.d.ts.map +1 -0
- package/lib/typescript/components/Select/index.d.ts +6 -3
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts +6 -8
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Stack/HStack.d.ts +1 -12
- package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/VStack.d.ts +1 -12
- package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/styles.d.ts +10 -0
- package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
- package/lib/typescript/components/Switch/BaseSwitch.d.ts +9 -0
- package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -0
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +15 -0
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -0
- package/lib/typescript/components/Switch/index.d.ts +8 -0
- package/lib/typescript/components/Switch/index.d.ts.map +1 -0
- package/lib/typescript/components/Switch/styles.d.ts +26 -0
- package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
- package/lib/typescript/components/Text/index.d.ts +9 -1
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +6 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +9 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/metro/withCdxMetroConfig.d.ts +19 -0
- package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -0
- package/lib/typescript/styles/index.d.ts +2 -0
- package/lib/typescript/styles/index.d.ts.map +1 -0
- package/lib/typescript/styles/primitives.d.ts +85 -0
- package/lib/typescript/styles/primitives.d.ts.map +1 -0
- package/package.json +21 -13
- package/src/components/Avatar/index.tsx +174 -0
- package/src/components/Avatar/styles.ts +83 -0
- package/src/components/Box/Box.tsx +1 -0
- package/src/components/Button/index.tsx +23 -15
- package/src/components/Button/styles.ts +353 -144
- package/src/components/Card/index.tsx +115 -0
- package/src/components/Card/styles.ts +41 -0
- package/src/components/Checkbox/index.tsx +209 -0
- package/src/components/Checkbox/styles.ts +103 -0
- package/src/components/Chip/index.tsx +91 -0
- package/src/components/Chip/styles.ts +51 -0
- package/src/components/Heading/index.tsx +36 -0
- package/src/components/Heading/styles.tsx +26 -0
- package/src/components/Icon/index.tsx +54 -0
- package/src/components/Input/index.tsx +9 -20
- package/src/components/Input/styles.ts +42 -37
- package/src/components/Link/index.tsx +27 -0
- package/src/components/Link/styles.ts +16 -0
- package/src/components/Select/index.tsx +12 -11
- package/src/components/Select/styles.ts +63 -74
- package/src/components/Stack/HStack.tsx +8 -19
- package/src/components/Stack/VStack.tsx +8 -23
- package/src/components/Stack/styles.ts +37 -0
- package/src/components/Switch/BaseSwitch.tsx +38 -0
- package/src/components/Switch/BaseSwitch.web.tsx +69 -0
- package/src/components/Switch/index.tsx +13 -0
- package/src/components/Switch/styles.ts +120 -0
- package/src/components/Text/index.tsx +16 -0
- package/src/components/Text/styles.tsx +26 -0
- package/src/components/VirtualizedList/index.tsx +19 -0
- package/src/components/index.ts +9 -0
- package/src/metro/withCdxMetroConfig.ts +29 -0
- package/src/styles/index.ts +1 -0
- package/src/styles/primitives.ts +107 -0
- package/lib/commonjs/components/Text/Text.js +0 -30
- package/lib/commonjs/components/Text/Text.js.map +0 -1
- package/lib/module/components/Text/Text.js +0 -26
- package/lib/module/components/Text/Text.js.map +0 -1
- package/lib/typescript/components/Text/Text.d.ts +0 -11
- package/lib/typescript/components/Text/Text.d.ts.map +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","
|
|
1
|
+
{"version":3,"names":["forwardRef","View","cn","vStackRootVariants","jsx","_jsx","VStack","reversed","space","style","className","children","restProps","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Stack/VStack.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,kBAAkB,QAAyB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ/D,OAAO,MAAMC,MAAM,gBAAGN,UAAU,CAC9B,CACE;EAAEO,QAAQ,GAAG,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EACrEC,GAAuB,KACpB;EACH,oBACER,IAAA,CAACJ,IAAI;IACHY,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAER,EAAE,CAACC,kBAAkB,CAAC;MAAEI,QAAQ;MAAEC;IAAM,CAAC,CAAC,EAAEE,SAAS,CAAE;IAClED,KAAK,EAAEA,KAAM;IAAA,GACTG,SAAS;IAAAD,QAAA,EAEZA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDL,MAAM,CAACQ,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
const spaceMap = {
|
|
5
|
+
xs: 'gap-1',
|
|
6
|
+
sm: 'gap-2',
|
|
7
|
+
md: 'gap-3',
|
|
8
|
+
lg: 'gap-4',
|
|
9
|
+
xl: 'gap-5'
|
|
10
|
+
};
|
|
11
|
+
export const hStackRootVariants = cva([], {
|
|
12
|
+
variants: {
|
|
13
|
+
reversed: {
|
|
14
|
+
true: 'flex-row-reverse',
|
|
15
|
+
false: 'flex-row'
|
|
16
|
+
},
|
|
17
|
+
space: spaceMap
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
reversed: false
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export const vStackRootVariants = cva([], {
|
|
24
|
+
variants: {
|
|
25
|
+
reversed: {
|
|
26
|
+
true: 'flex-col-reverse',
|
|
27
|
+
false: 'flex-col'
|
|
28
|
+
},
|
|
29
|
+
space: spaceMap
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
reversed: false
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","spaceMap","xs","sm","md","lg","xl","hStackRootVariants","variants","reversed","true","false","space","defaultVariants","vStackRootVariants"],"sourceRoot":"../../../../src","sources":["components/Stack/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAI9C,MAAMC,QAAQ,GAAG;EACfC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE;AACN,CAA+C;AAE/C,OAAO,MAAMC,kBAAkB,GAAGP,GAAG,CAAC,EAAE,EAAE;EACxCQ,QAAQ,EAAE;IACRC,QAAQ,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACT,CAAC;IACDC,KAAK,EAAEX;EACT,CAAC;EACDY,eAAe,EAAE;IACfJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,OAAO,MAAMK,kBAAkB,GAAGd,GAAG,CAAC,EAAE,EAAE;EACxCQ,QAAQ,EAAE;IACRC,QAAQ,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACT,CAAC;IACDC,KAAK,EAAEX;EACT,CAAC;EACDY,eAAe,EAAE;IACfJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Switch as RNSwitch } from 'react-native';
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { switchIosBgVariants, switchThumbColorVariants, switchTrackOffVariants, switchTrackOnVariants } from './styles';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const BaseSwitch = /*#__PURE__*/forwardRef(({
|
|
9
|
+
states,
|
|
10
|
+
className,
|
|
11
|
+
disabled,
|
|
12
|
+
value,
|
|
13
|
+
...props
|
|
14
|
+
}, ref) => {
|
|
15
|
+
const isChecked = value ?? states?.checked ?? false;
|
|
16
|
+
const isDisabled = disabled ?? states?.disabled ?? false;
|
|
17
|
+
const isInvalid = states?.invalid ?? false;
|
|
18
|
+
const uniwindProps = {
|
|
19
|
+
className,
|
|
20
|
+
thumbColorClassName: cn(switchThumbColorVariants({
|
|
21
|
+
isDisabled
|
|
22
|
+
})),
|
|
23
|
+
trackColorOnClassName: cn(switchTrackOnVariants({
|
|
24
|
+
isInvalid
|
|
25
|
+
})),
|
|
26
|
+
trackColorOffClassName: cn(switchTrackOffVariants({
|
|
27
|
+
isInvalid
|
|
28
|
+
})),
|
|
29
|
+
ios_backgroundColorClassName: cn(switchIosBgVariants({
|
|
30
|
+
isInvalid
|
|
31
|
+
}))
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/_jsx(RNSwitch, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
value: isChecked,
|
|
36
|
+
disabled: isDisabled,
|
|
37
|
+
...uniwindProps,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
BaseSwitch.displayName = 'BaseSwitch';
|
|
42
|
+
//# sourceMappingURL=BaseSwitch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Switch","RNSwitch","cn","switchIosBgVariants","switchThumbColorVariants","switchTrackOffVariants","switchTrackOnVariants","jsx","_jsx","BaseSwitch","states","className","disabled","value","props","ref","isChecked","checked","isDisabled","isInvalid","invalid","uniwindProps","thumbColorClassName","trackColorOnClassName","trackColorOffClassName","ios_backgroundColorClassName","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/BaseSwitch.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,MAAM,IAAIC,QAAQ,QAA0B,cAAc;AACnE,SAASC,EAAE,QAAQ,eAAe;AAClC,SACEC,mBAAmB,EACnBC,wBAAwB,EACxBC,sBAAsB,EACtBC,qBAAqB,QAChB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASlB,OAAO,MAAMC,UAAU,gBAAGV,UAAU,CAClC,CAAC;EAAEW,MAAM;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACzD,MAAMC,SAAS,GAAGH,KAAK,IAAIH,MAAM,EAAEO,OAAO,IAAI,KAAK;EACnD,MAAMC,UAAU,GAAGN,QAAQ,IAAIF,MAAM,EAAEE,QAAQ,IAAI,KAAK;EACxD,MAAMO,SAAS,GAAGT,MAAM,EAAEU,OAAO,IAAI,KAAK;EAE1C,MAAMC,YAAgD,GAAG;IACvDV,SAAS;IACTW,mBAAmB,EAAEpB,EAAE,CAACE,wBAAwB,CAAC;MAAEc;IAAW,CAAC,CAAC,CAAC;IACjEK,qBAAqB,EAAErB,EAAE,CAACI,qBAAqB,CAAC;MAAEa;IAAU,CAAC,CAAC,CAAC;IAC/DK,sBAAsB,EAAEtB,EAAE,CAACG,sBAAsB,CAAC;MAAEc;IAAU,CAAC,CAAC,CAAC;IACjEM,4BAA4B,EAAEvB,EAAE,CAACC,mBAAmB,CAAC;MAAEgB;IAAU,CAAC,CAAC;EACrE,CAAC;EAED,oBACEX,IAAA,CAACP,QAAQ;IAACc,GAAG,EAAEA,GAAI;IAACF,KAAK,EAAEG,SAAU;IAACJ,QAAQ,EAAEM,UAAW;IAAA,GAAKG,YAAY;IAAA,GAAMP;EAAK,CAAG,CAAC;AAE/F,CACF,CAAC;AAEDL,UAAU,CAACiB,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable, View } from 'react-native';
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { switchThumbVariants, switchTrackVariants, switchWebTrackColorVariants } from './styles';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const BaseSwitch = /*#__PURE__*/forwardRef(({
|
|
9
|
+
value,
|
|
10
|
+
onValueChange,
|
|
11
|
+
disabled,
|
|
12
|
+
states,
|
|
13
|
+
dataSet,
|
|
14
|
+
className,
|
|
15
|
+
size = 'md',
|
|
16
|
+
onFocus,
|
|
17
|
+
onBlur,
|
|
18
|
+
...props
|
|
19
|
+
}, ref) => {
|
|
20
|
+
const isChecked = value ?? states?.checked ?? false;
|
|
21
|
+
const isDisabled = disabled ?? states?.disabled ?? false;
|
|
22
|
+
const isInvalid = states?.invalid ?? false;
|
|
23
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
24
|
+
ref: ref,
|
|
25
|
+
role: "switch",
|
|
26
|
+
"aria-checked": isChecked,
|
|
27
|
+
"aria-disabled": isDisabled,
|
|
28
|
+
disabled: isDisabled,
|
|
29
|
+
onPress: () => onValueChange?.(!isChecked),
|
|
30
|
+
onFocus: onFocus,
|
|
31
|
+
onBlur: onBlur,
|
|
32
|
+
tabIndex: 0,
|
|
33
|
+
className: cn(switchTrackVariants({
|
|
34
|
+
size
|
|
35
|
+
}), switchWebTrackColorVariants({
|
|
36
|
+
isChecked,
|
|
37
|
+
isInvalid
|
|
38
|
+
}), className)
|
|
39
|
+
// @ts-expect-error dataSet is a RNW/Uniwind prop not in Pressable types
|
|
40
|
+
,
|
|
41
|
+
dataSet: dataSet,
|
|
42
|
+
...props,
|
|
43
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
44
|
+
className: cn(switchThumbVariants({
|
|
45
|
+
size,
|
|
46
|
+
isChecked
|
|
47
|
+
}))
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
BaseSwitch.displayName = 'BaseSwitch';
|
|
52
|
+
//# sourceMappingURL=BaseSwitch.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","View","cn","switchThumbVariants","switchTrackVariants","switchWebTrackColorVariants","jsx","_jsx","BaseSwitch","value","onValueChange","disabled","states","dataSet","className","size","onFocus","onBlur","props","ref","isChecked","checked","isDisabled","isInvalid","invalid","role","onPress","tabIndex","children","displayName"],"sourceRoot":"../../../../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AAmB,CAAC;QAAEY,IAAI;QAAEK;MAAU,CAAC,CAAC;IAAE,CAAE;EAAC,CACxD,CAAC;AAEhB,CACF,CAAC;AAEDZ,UAAU,CAACqB,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createSwitch","BaseSwitch","SwitchPrimitive","Root","Switch"],"sourceRoot":"../../../../src","sources":["components/Switch/index.tsx"],"mappings":";;AAAA,SAA4BA,YAAY,QAAQ,oBAAoB;AACpE,SAASC,UAAU,QAAQ,cAAc;AAGzC,MAAMC,eAAe,GAAGF,YAAY,CAAC;EAAEG,IAAI,EAAEF;AAAW,CAAC,CAAC;AAM1D,OAAO,MAAMG,MAAM,GAAGF,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// NATIVE — Uniwind className bindings for RN Switch
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
export const switchThumbColorVariants = cva(['accent-white'], {
|
|
10
|
+
variants: {
|
|
11
|
+
isDisabled: {
|
|
12
|
+
true: 'accent-gray-200',
|
|
13
|
+
false: ''
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
isDisabled: false
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export const switchTrackOnVariants = cva(['accent-blue-500'], {
|
|
21
|
+
variants: {
|
|
22
|
+
isInvalid: {
|
|
23
|
+
true: 'accent-red-500',
|
|
24
|
+
false: ''
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
isInvalid: false
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export const switchTrackOffVariants = cva(['accent-gray-300'], {
|
|
32
|
+
variants: {
|
|
33
|
+
isInvalid: {
|
|
34
|
+
true: 'accent-red-300',
|
|
35
|
+
false: ''
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
isInvalid: false
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export const switchIosBgVariants = cva(['accent-gray-300'], {
|
|
43
|
+
variants: {
|
|
44
|
+
isInvalid: {
|
|
45
|
+
true: 'accent-red-300',
|
|
46
|
+
false: ''
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
isInvalid: false
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// =============================================================================
|
|
55
|
+
// WEB — Tailwind classes for custom Pressable toggle
|
|
56
|
+
// =============================================================================
|
|
57
|
+
|
|
58
|
+
export const switchTrackVariants = cva(['flex-row items-center rounded-full cursor-pointer', 'transition-colors duration-200', 'data-[disabled=true]:opacity-50 data-[disabled=true]:cursor-not-allowed', 'web:data-[focus-visible=true]:ring-3 web:data-[focus-visible=true]:ring-blue-300/50', 'web:data-[invalid=true]:data-[focus-visible=true]:ring-red-300/50'], {
|
|
59
|
+
variants: {
|
|
60
|
+
size: {
|
|
61
|
+
sm: 'w-9 h-5 p-0.5',
|
|
62
|
+
md: 'w-11 h-6 p-0.5',
|
|
63
|
+
lg: 'w-14 h-8 p-1'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
defaultVariants: {
|
|
67
|
+
size: 'md'
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export const switchWebTrackColorVariants = cva([], {
|
|
71
|
+
variants: {
|
|
72
|
+
isChecked: {
|
|
73
|
+
true: 'bg-blue-500 data-[hover=true]:bg-blue-600',
|
|
74
|
+
false: 'bg-gray-300 data-[hover=true]:bg-gray-400'
|
|
75
|
+
},
|
|
76
|
+
isInvalid: {
|
|
77
|
+
true: '',
|
|
78
|
+
false: ''
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
compoundVariants: [{
|
|
82
|
+
isChecked: true,
|
|
83
|
+
isInvalid: true,
|
|
84
|
+
className: 'bg-red-500 data-[hover=true]:bg-red-600'
|
|
85
|
+
}, {
|
|
86
|
+
isChecked: false,
|
|
87
|
+
isInvalid: true,
|
|
88
|
+
className: 'bg-red-300 data-[hover=true]:bg-red-400'
|
|
89
|
+
}],
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
isChecked: false,
|
|
92
|
+
isInvalid: false
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
export const switchThumbVariants = cva(['rounded-full bg-white shadow-sm', 'transition-transform duration-200'], {
|
|
96
|
+
variants: {
|
|
97
|
+
size: {
|
|
98
|
+
sm: 'w-4 h-4',
|
|
99
|
+
md: 'w-5 h-5',
|
|
100
|
+
lg: 'w-6 h-6'
|
|
101
|
+
},
|
|
102
|
+
isChecked: {
|
|
103
|
+
true: '',
|
|
104
|
+
false: 'translate-x-0'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
compoundVariants: [{
|
|
108
|
+
size: 'sm',
|
|
109
|
+
isChecked: true,
|
|
110
|
+
className: 'translate-x-4'
|
|
111
|
+
}, {
|
|
112
|
+
size: 'md',
|
|
113
|
+
isChecked: true,
|
|
114
|
+
className: 'translate-x-5'
|
|
115
|
+
}, {
|
|
116
|
+
size: 'lg',
|
|
117
|
+
isChecked: true,
|
|
118
|
+
className: 'translate-x-6'
|
|
119
|
+
}],
|
|
120
|
+
defaultVariants: {
|
|
121
|
+
size: 'md',
|
|
122
|
+
isChecked: false
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","switchThumbColorVariants","variants","isDisabled","true","false","defaultVariants","switchTrackOnVariants","isInvalid","switchTrackOffVariants","switchIosBgVariants","switchTrackVariants","size","sm","md","lg","switchWebTrackColorVariants","isChecked","compoundVariants","className","switchThumbVariants"],"sourceRoot":"../../../../src","s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ACfM,IAAI,EAAE,IAAI;IACVK,SAAS,EAAE;EACb;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Text as RNText } from 'react-native';
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { textStyle } from './styles';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const Text = /*#__PURE__*/forwardRef(function Text({
|
|
9
|
+
className,
|
|
10
|
+
size = 'md',
|
|
11
|
+
...props
|
|
12
|
+
}, ref) {
|
|
13
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
14
|
+
className: cn(textStyle({
|
|
15
|
+
size
|
|
16
|
+
}), className),
|
|
17
|
+
...props,
|
|
18
|
+
ref: ref
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
Text.displayName = 'Text';
|
|
4
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Text/index.
|
|
1
|
+
{"version":3,"names":["forwardRef","Text","RNText","cn","textStyle","jsx","_jsx","className","size","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAA0D,OAAO;AACpF,SAASC,IAAI,IAAIC,MAAM,QAAQ,cAAc;AAC7C,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,SAAS,QAA0B,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAKvD,OAAO,MAAML,IAAI,gBAAGD,UAAU,CAAyC,SAASC,IAAIA,CAClF;EAAEM,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBAAOJ,IAAA,CAACJ,MAAM;IAACK,SAAS,EAAEJ,EAAE,CAACC,SAAS,CAAC;MAAEI;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AACvF,CAAC,CAAC;AAEFT,IAAI,CAACU,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { COLOR_TEXT_PRIMARY } from '../../styles/primitives';
|
|
6
|
+
export const textStyle = cva([`${COLOR_TEXT_PRIMARY} font-normal`, Platform.select({
|
|
7
|
+
web: 'font-sans my-0 bg-transparent display-inline no-underline',
|
|
8
|
+
default: ''
|
|
9
|
+
})], {
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
xl: 'text-xl',
|
|
13
|
+
lg: 'text-lg',
|
|
14
|
+
md: 'text-base',
|
|
15
|
+
sm: 'text-sm',
|
|
16
|
+
xs: 'text-xs'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","COLOR_TEXT_PRIMARY","textStyle","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,MAAMC,SAAS,GAAGF,GAAG,CAC1B,CACE,GAAGC,kBAAkB,cAAc,EACnCF,QAAQ,CAACI,MAAM,CAAC;EACdC,GAAG,EAAE,2DAA2D;EAChEC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,WAAW;MACfC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { FlashList } from '@shopify/flash-list';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
function VirtualizedListInner(props, ref) {
|
|
7
|
+
return /*#__PURE__*/_jsx(FlashList, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
role: "list",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export const VirtualizedList = /*#__PURE__*/forwardRef(VirtualizedListInner);
|
|
14
|
+
VirtualizedList.displayName = 'VirtualizedList';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","FlashList","jsx","_jsx","VirtualizedListInner","props","ref","role","VirtualizedList","displayName"],"sourceRoot":"../../../../src","sources":["components/VirtualizedList/index.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,SAAS,QAAgD,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAKxF,SAASC,oBAAoBA,CAC3BC,KAA8B,EAC9BC,GAAkC,EAClC;EACA,oBAAOH,IAAA,CAACF,SAAS;IAACK,GAAG,EAAEA,GAAI;IAACC,IAAI,EAAC,MAAM;IAAA,GAAKF;EAAK,CAAG,CAAC;AACvD;AAEA,OAAO,MAAMG,eAAe,gBAAGR,UAAU,CAACI,oBAAoB,CAEtC;AAEvBI,eAAe,CAA8BC,WAAW,GAAG,iBAAiB","ignoreList":[]}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
export * from './Avatar';
|
|
3
4
|
export * from './Box';
|
|
4
5
|
export * from './Button';
|
|
6
|
+
export * from './Chip';
|
|
7
|
+
export * from './Card';
|
|
8
|
+
export * from './Checkbox';
|
|
5
9
|
export * from './Input';
|
|
10
|
+
export * from './Link';
|
|
6
11
|
export * from './Select';
|
|
12
|
+
export * from './VirtualizedList';
|
|
13
|
+
export * from './Switch';
|
|
7
14
|
export { HStack, VStack } from './Stack';
|
|
15
|
+
export * from './Heading';
|
|
8
16
|
export * from './Text';
|
|
17
|
+
export * from './Icon';
|
|
9
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,UAAU;AACxB,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { withUniwindConfig } from 'uniwind/metro';
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a Metro config with CDX UI's styling-layer configuration.
|
|
6
|
+
*
|
|
7
|
+
* Today this delegates to Uniwind. If the styling layer is swapped (see
|
|
8
|
+
* `docs/research/uniwind-to-nativewind-contingency.md`), only the internals
|
|
9
|
+
* of this function change — consuming Metro configs stay the same.
|
|
10
|
+
*
|
|
11
|
+
* Must be the **outermost** Metro config wrapper (after any other wrappers
|
|
12
|
+
* like `withStorybook`).
|
|
13
|
+
*/
|
|
14
|
+
export function withCdxMetroConfig(config, options) {
|
|
15
|
+
return withUniwindConfig(config, {
|
|
16
|
+
cssEntryFile: options.cssEntryFile,
|
|
17
|
+
dtsFile: options.generatedTypesFile
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=withCdxMetroConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withUniwindConfig","withCdxMetroConfig","config","options","cssEntryFile","dtsFile","generatedTypesFile"],"sourceRoot":"../../../src","sources":["metro/withCdxMetroConfig.ts"],"mappings":";;AACA,SAASA,iBAAiB,QAAQ,eAAe;AASjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,MAAS,EACTC,OAA8B,EAC3B;EACH,OAAOH,iBAAiB,CAACE,MAAM,EAAE;IAC/BE,YAAY,EAAED,OAAO,CAACC,YAAY;IAClCC,OAAO,EAAEF,OAAO,CAACG;EACnB,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["styles/index.ts"],"mappings":";;AAAA,cAAc,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// packages/components/src/styles/primitives.ts
|
|
4
|
+
// Semantic constants for CDX UI component styling.
|
|
5
|
+
// See docs/visual-revamp-plan.md for rationale and usage.
|
|
6
|
+
|
|
7
|
+
// ─── Colors ──────────────────────────────────────────────
|
|
8
|
+
// Surface & background
|
|
9
|
+
export const COLOR_BG_PRIMARY = 'bg-white';
|
|
10
|
+
export const COLOR_BG_SUBTLE = 'bg-slate-50';
|
|
11
|
+
export const COLOR_BG_MUTED = 'bg-slate-100';
|
|
12
|
+
export const COLOR_BG_INVERSE = 'bg-slate-900';
|
|
13
|
+
|
|
14
|
+
// Border
|
|
15
|
+
export const COLOR_BORDER_DEFAULT = 'border-slate-200';
|
|
16
|
+
export const COLOR_BORDER_STRONG = 'border-slate-300';
|
|
17
|
+
export const COLOR_BORDER_FOCUS = 'border-slate-900';
|
|
18
|
+
export const COLOR_BORDER_INVALID = 'border-red-500';
|
|
19
|
+
|
|
20
|
+
// Text
|
|
21
|
+
export const COLOR_TEXT_PRIMARY = 'text-slate-900';
|
|
22
|
+
export const COLOR_TEXT_SECONDARY = 'text-slate-500';
|
|
23
|
+
export const COLOR_TEXT_MUTED = 'text-slate-400';
|
|
24
|
+
export const COLOR_TEXT_INVERSE = 'text-white';
|
|
25
|
+
export const COLOR_TEXT_PLACEHOLDER = 'text-slate-400';
|
|
26
|
+
export const COLOR_TEXT_INVALID = 'text-red-600';
|
|
27
|
+
|
|
28
|
+
// Brand / Action
|
|
29
|
+
export const COLOR_BRAND_DEFAULT = 'bg-slate-900';
|
|
30
|
+
export const COLOR_BRAND_HOVER = 'bg-slate-800';
|
|
31
|
+
export const COLOR_BRAND_ACTIVE = 'bg-slate-700';
|
|
32
|
+
|
|
33
|
+
// Accent (for checked states, active indicators)
|
|
34
|
+
export const COLOR_ACCENT_DEFAULT = 'bg-slate-900';
|
|
35
|
+
export const COLOR_ACCENT_BORDER = 'border-slate-900';
|
|
36
|
+
|
|
37
|
+
// Semantic colors (danger, warning, success, info)
|
|
38
|
+
// Kept for Button's 5-color system
|
|
39
|
+
export const SEMANTIC_COLORS = {
|
|
40
|
+
action: {
|
|
41
|
+
bg: 'bg-slate-900',
|
|
42
|
+
bgHover: 'bg-slate-800',
|
|
43
|
+
bgActive: 'bg-slate-700',
|
|
44
|
+
border: 'border-slate-900',
|
|
45
|
+
text: 'text-slate-900',
|
|
46
|
+
ring: 'ring-slate-400/50'
|
|
47
|
+
},
|
|
48
|
+
danger: {
|
|
49
|
+
bg: 'bg-red-600',
|
|
50
|
+
bgHover: 'bg-red-700',
|
|
51
|
+
bgActive: 'bg-red-800',
|
|
52
|
+
border: 'border-red-600',
|
|
53
|
+
text: 'text-red-600',
|
|
54
|
+
ring: 'ring-red-400/50'
|
|
55
|
+
},
|
|
56
|
+
warning: {
|
|
57
|
+
bg: 'bg-amber-500',
|
|
58
|
+
bgHover: 'bg-amber-600',
|
|
59
|
+
bgActive: 'bg-amber-700',
|
|
60
|
+
border: 'border-amber-500',
|
|
61
|
+
text: 'text-amber-600',
|
|
62
|
+
ring: 'ring-amber-400/50'
|
|
63
|
+
},
|
|
64
|
+
success: {
|
|
65
|
+
bg: 'bg-green-600',
|
|
66
|
+
bgHover: 'bg-green-700',
|
|
67
|
+
bgActive: 'bg-green-800',
|
|
68
|
+
border: 'border-green-600',
|
|
69
|
+
text: 'text-green-600',
|
|
70
|
+
ring: 'ring-green-400/50'
|
|
71
|
+
},
|
|
72
|
+
info: {
|
|
73
|
+
bg: 'bg-sky-500',
|
|
74
|
+
bgHover: 'bg-sky-600',
|
|
75
|
+
bgActive: 'bg-sky-700',
|
|
76
|
+
border: 'border-sky-500',
|
|
77
|
+
text: 'text-sky-600',
|
|
78
|
+
ring: 'ring-sky-400/50'
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// ─── Focus ───────────────────────────────────────────────
|
|
83
|
+
export const FOCUS_RING = 'ring-2 ring-slate-400/50 ring-offset-2';
|
|
84
|
+
|
|
85
|
+
// ─── Radius ──────────────────────────────────────────────
|
|
86
|
+
export const RADIUS_SM = 'rounded-lg'; // buttons, inputs, checkboxes
|
|
87
|
+
export const RADIUS_MD = 'rounded-xl'; // cards, dropdowns, modals
|
|
88
|
+
export const RADIUS_FULL = 'rounded-full'; // pills, avatars, switches
|
|
89
|
+
|
|
90
|
+
// ─── Shadows ─────────────────────────────────────────────
|
|
91
|
+
export const SHADOW_SM = 'shadow-sm';
|
|
92
|
+
export const SHADOW_MD = 'shadow-md';
|
|
93
|
+
|
|
94
|
+
// ─── Sizing ──────────────────────────────────────────────
|
|
95
|
+
// Unified size scale for interactive/form components (Button, Input, Select, Checkbox).
|
|
96
|
+
// Only two sizes: 'default' (regular) and 'small' (compact).
|
|
97
|
+
// NOTE: Text and Heading use a separate typography scale (xs/sm/md/lg/xl) — not this.
|
|
98
|
+
export const SIZE_SCALE = {
|
|
99
|
+
default: {
|
|
100
|
+
height: 'h-10',
|
|
101
|
+
px: 'px-4',
|
|
102
|
+
gap: 'gap-2',
|
|
103
|
+
text: 'text-base'
|
|
104
|
+
},
|
|
105
|
+
small: {
|
|
106
|
+
height: 'h-8',
|
|
107
|
+
px: 'px-3',
|
|
108
|
+
gap: 'gap-1.5',
|
|
109
|
+
text: 'text-sm'
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// ─── Transitions ─────────────────────────────────────────
|
|
114
|
+
export const TRANSITION_COLORS = 'transition-colors duration-150';
|
|
115
|
+
|
|
116
|
+
// ─── Disabled ────────────────────────────────────────────
|
|
117
|
+
export const DISABLED_OPACITY = 'data-[disabled=true]:opacity-50';
|
|
118
|
+
export const DISABLED_CURSOR = 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none';
|
|
119
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["COLOR_BG_PRIMARY","COLOR_BG_SUBTLE","COLOR_BG_MUTED","COLOR_BG_INVERSE","COLOR_BORDER_DEFAULT","COLOR_BORDER_STRONG","COLOR_BORDER_FOCUS","COLOR_BORDER_INVALID","COLOR_TEXT_PRIMARY","COLOR_TEXT_SECONDARY","COLOR_TEXT_MUTED","COLOR_TEXT_INVERSE","COLOR_TEXT_PLACEHOLDER","COLOR_TEXT_INVALID","COLOR_BRAND_DEFAULT","COLOR_BRAND_HOVER","COLOR_BRAND_ACTIVE","COLOR_ACCENT_DEFAULT","COLOR_ACCENT_BORDER","SEMANTIC_COLORS","action","bg","bgHover","bgActive","border","text","ring","danger","warning","success","info","FOCUS_RING","RADIUS_SM","RADIUS_MD","RADIUS_FULL","SHADOW_SM","SHADOW_MD","SIZE_SCALE","default","height","px","gap","small","TRANSITION_COLORS","DISABLED_OPACITY","DISABLED_CURSOR"],"sourceRoot":"../../../src","sources":["styles/primitives.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAG,UAAU;AAC1C,OAAO,MAAMC,eAAe,GAAG,aAAa;AAC5C,OAAO,MAAMC,cAAc,GAAG,cAAc;AAC5C,OAAO,MAAMC,gBAAgB,GAAG,cAAc;;AAE9C;AACA,OAAO,MAAMC,oBAAoB,GAAG,kBAAkB;AACtD,OAAO,MAAMC,mBAAmB,GAAG,kBAAkB;AACrD,OAAO,MAAMC,kBAAkB,GAAG,kBAAkB;AACpD,OAAO,MAAMC,oBAAoB,GAAG,gBAAgB;;AAEpD;AACA,OAAO,MAAMC,kBAAkB,GAAG,gBAAgB;AAClD,OAAO,MAAMC,oBAAoB,GAAG,gBAAgB;AACpD,OAAO,MAAMC,gBAAgB,GAAG,gBAAgB;AAChD,OAAO,MAAMC,kBAAkB,GAAG,YAAY;AAC9C,OAAO,MAAMC,sBAAsB,GAAG,gBAAgB;AACtD,OAAO,MAAMC,kBAAkB,GAAG,cAAc;;AAEhD;AACA,OAAO,MAAMC,mBAAmB,GAAG,cAAc;AACjD,OAAO,MAAMC,iBAAiB,GAAG,cAAc;AAC/C,OAAO,MAAMC,kBAAkB,GAAG,cAAc;;AAEhD;AACA,OAAO,MAAMC,oBAAoB,GAAG,cAAc;AAClD,OAAO,MAAMC,mBAAmB,GAAG,kBAAkB;;AAErD;AACA;AACA,OAAO,MAAMC,eAAe,GAAG;EAC7BC,MAAM,EAAE;IACNC,EAAE,EAAE,cAAc;IAClBC,OAAO,EAAE,cAAc;IACvBC,QAAQ,EAAE,cAA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OAAO;IAAEhB,IAAI,EAAE;EAAY,CAAC;EACxEiB,KAAK,EAAE;IAAEH,MAAM,EAAE,KAAK;IAAEC,EAAE,EAAE,MAAM;IAAEC,GAAG,EAAE,SAAS;IAAEhB,IAAI,EAAE;EAAU;AACtE,CAAU;;AAEV;AACA,OAAO,MAAMkB,iBAAiB,GAAG,gCAAgC;;AAEjE;AACA,OAAO,MAAMC,gBAAgB,GAAG,iCAAiC;AACjE,OAAO,MAAMC,eAAe,GAC1B,kFAAkF","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { Image, Text, View, type ImageProps, type TextProps, type ViewProps } from 'react-native';
|
|
3
|
+
import { type IAvatarImageProps, type IAvatarProps } from '@cdx-ui/primitives';
|
|
4
|
+
import { type IconProps } from '../Icon';
|
|
5
|
+
import { type AvatarVariantProps } from './styles';
|
|
6
|
+
export interface AvatarProps extends ViewProps, IAvatarProps, AvatarVariantProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const AvatarRoot: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<View>>;
|
|
11
|
+
export interface AvatarImageProps extends Omit<ImageProps, 'source'>, IAvatarImageProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const AvatarImage: import("react").ForwardRefExoticComponent<AvatarImageProps & import("react").RefAttributes<Image>>;
|
|
15
|
+
export interface AvatarTextProps extends TextProps {
|
|
16
|
+
className?: string;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare const AvatarText: import("react").ForwardRefExoticComponent<AvatarTextProps & import("react").RefAttributes<Text>>;
|
|
20
|
+
export interface AvatarIconProps extends Omit<IconProps, 'children'> {
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const AvatarIcon: {
|
|
24
|
+
({ className, style, ...props }: AvatarIconProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export interface AvatarBadgeProps extends ViewProps {
|
|
28
|
+
className?: string;
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
declare const AvatarBadge: import("react").ForwardRefExoticComponent<AvatarBadgeProps & import("react").RefAttributes<View>>;
|
|
32
|
+
type AvatarCompoundComponent = typeof AvatarRoot & {
|
|
33
|
+
Image: typeof AvatarImage;
|
|
34
|
+
Text: typeof AvatarText;
|
|
35
|
+
Icon: typeof AvatarIcon;
|
|
36
|
+
Badge: typeof AvatarBadge;
|
|
37
|
+
};
|
|
38
|
+
export declare const Avatar: AvatarCompoundComponent;
|
|
39
|
+
export type { AvatarVariantProps };
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAgB,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE7F,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,UAAU,CAAC;AAoBlB,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,YAAY,EAAE,kBAAkB;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,8FAgBf,CAAC;AAQF,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,iBAAiB;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,oGAWf,CAAC;AAQH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,kGAgBf,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU;qCAAoC,eAAe;;CAKlE,CAAC;AAQF,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,mGAgBhB,CAAC;AAQF,KAAK,uBAAuB,GAAG,OAAO,UAAU,GAAG;IACjD,KAAK,EAAE,OAAO,WAAW,CAAC;IAC1B,IAAI,EAAE,OAAO,UAAU,CAAC;IACxB,IAAI,EAAE,OAAO,UAAU,CAAC;IACxB,KAAK,EAAE,OAAO,WAAW,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,MAAM,EAKb,uBAAuB,CAAC;AAE9B,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const avatarRootVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const avatarImageVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
|
+
export declare const avatarTextVariants: (props?: ({
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export declare const avatarIconVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare const avatarBadgeVariants: (props?: ({
|
|
13
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export type AvatarVariantProps = VariantProps<typeof avatarRootVariants>;
|
|
16
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Avatar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,kBAAkB;;8EAgB9B,CAAC;AAIF,eAAO,MAAM,mBAAmB,oFAI9B,CAAC;AAIH,eAAO,MAAM,kBAAkB;;8EAa7B,CAAC;AAIH,eAAO,MAAM,kBAAkB;;8EAa7B,CAAC;AAIH,eAAO,MAAM,mBAAmB;;8EAa9B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -4,5 +4,6 @@ export interface BoxProps extends ViewProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
textProps?: TextProps;
|
|
6
6
|
}
|
|
7
|
+
/** @deprecated Use View instead */
|
|
7
8
|
export declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<View>>;
|
|
8
9
|
//# sourceMappingURL=Box.d.ts.map
|