@cdx-ui/components 0.0.1-alpha.14 → 0.0.1-alpha.15
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 +1 -1
- 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 +324 -140
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js +18 -11
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +17 -16
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Heading/index.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js +3 -2
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +2 -1
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- 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/styles.js +6 -1
- package/lib/commonjs/components/Link/styles.js.map +1 -1
- 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/styles.js +2 -14
- package/lib/commonjs/components/Stack/styles.js.map +1 -1
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +3 -2
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- 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/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 +323 -139
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Checkbox/index.js +19 -12
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +17 -16
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Heading/index.js.map +1 -1
- package/lib/module/components/Heading/styles.js +3 -2
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/Icon/index.js +2 -1
- package/lib/module/components/Icon/index.js.map +1 -1
- 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/styles.js +6 -1
- package/lib/module/components/Link/styles.js.map +1 -1
- 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/styles.js +2 -14
- package/lib/module/components/Stack/styles.js.map +1 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +3 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- 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/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/Checkbox/index.d.ts +6 -4
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Heading/index.d.ts +6 -2
- package/lib/typescript/components/Heading/index.d.ts.map +1 -1
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
- package/lib/typescript/components/Icon/index.d.ts +1 -2
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- 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/styles.d.ts.map +1 -1
- 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/styles.d.ts.map +1 -1
- package/lib/typescript/components/Text/index.d.ts +6 -2
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts.map +1 -1
- 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 +4 -4
- package/src/components/Box/Box.tsx +1 -0
- package/src/components/Button/index.tsx +23 -15
- package/src/components/Button/styles.ts +353 -149
- package/src/components/Checkbox/index.tsx +15 -21
- package/src/components/Checkbox/styles.ts +33 -24
- package/src/components/Heading/index.tsx +4 -1
- package/src/components/Heading/styles.tsx +3 -2
- package/src/components/Icon/index.tsx +7 -2
- package/src/components/Input/index.tsx +9 -20
- package/src/components/Input/styles.ts +42 -37
- package/src/components/Link/styles.ts +10 -1
- package/src/components/Select/index.tsx +12 -11
- package/src/components/Select/styles.ts +63 -74
- package/src/components/Stack/styles.ts +2 -14
- package/src/components/Text/index.tsx +2 -1
- package/src/components/Text/styles.tsx +3 -2
- package/src/styles/index.ts +1 -0
- package/src/styles/primitives.ts +107 -0
|
@@ -2,116 +2,92 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, COLOR_TEXT_MUTED, COLOR_TEXT_PRIMARY, DISABLED_CURSOR, DISABLED_OPACITY, RADIUS_SM, RADIUS_MD, SHADOW_SM, SHADOW_MD, SIZE_SCALE, TRANSITION_COLORS } from '../../styles/primitives';
|
|
5
6
|
|
|
6
7
|
// ── Trigger ─────────────────────────────────────────────────
|
|
7
8
|
|
|
8
|
-
export const selectTriggerVariants = cva(['flex-row items-center justify-between',
|
|
9
|
+
export const selectTriggerVariants = cva(['flex-row items-center justify-between', RADIUS_SM, SHADOW_SM, TRANSITION_COLORS, COLOR_BG_PRIMARY, `border ${COLOR_BORDER_DEFAULT}`, DISABLED_OPACITY, DISABLED_CURSOR, 'data-[readonly=true]:cursor-default', 'data-[state=open]:border-slate-900', 'data-[invalid=true]:border-red-500', 'data-[readonly=true]:bg-slate-50', Platform.select({
|
|
10
|
+
default: 'data-[active=true]:border-slate-300',
|
|
11
|
+
web: ['data-[hover=true]:border-slate-300 data-[active=true]:data-[hover=true]:border-slate-400', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2', 'data-[state=open]:ring-2 data-[state=open]:ring-slate-400/50'].join(' ')
|
|
12
|
+
})], {
|
|
9
13
|
variants: {
|
|
10
14
|
variant: {
|
|
11
|
-
outline: [
|
|
12
|
-
default: 'data-[active=true]:border-gray-400',
|
|
13
|
-
web: 'data-[hover=true]:border-gray-400 data-[active=true]:data-[hover=true]:border-gray-500'
|
|
14
|
-
}), 'data-[state=open]:data-[invalid=false]:border-blue-500', 'data-[invalid=true]:border-red-500', 'data-[readonly=true]:bg-gray-50'],
|
|
15
|
-
filled: ['bg-gray-100 border border-transparent', Platform.select({
|
|
16
|
-
default: 'data-[active=true]:bg-gray-200',
|
|
17
|
-
web: 'data-[hover=true]:bg-gray-200 data-[active=true]:data-[hover=true]:bg-gray-300'
|
|
18
|
-
}), 'data-[state=open]:border-blue-500', 'data-[invalid=true]:border-red-500 data-[invalid=true]:border', 'data-[readonly=true]:bg-gray-200'],
|
|
19
|
-
ghost: ['bg-transparent border border-transparent', Platform.select({
|
|
20
|
-
default: 'data-[active=true]:bg-gray-100',
|
|
21
|
-
web: 'data-[hover=true]:bg-gray-50 data-[active=true]:data-[hover=true]:bg-gray-100'
|
|
22
|
-
}), 'data-[invalid=true]:border-red-500 data-[invalid=true]:border']
|
|
15
|
+
outline: []
|
|
23
16
|
},
|
|
24
17
|
size: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
lg: 'h-12 px-4 gap-2.5'
|
|
18
|
+
default: `${SIZE_SCALE.default.height} ${SIZE_SCALE.default.px} ${SIZE_SCALE.default.gap}`,
|
|
19
|
+
small: `${SIZE_SCALE.small.height} ${SIZE_SCALE.small.px} ${SIZE_SCALE.small.gap}`
|
|
28
20
|
}
|
|
29
21
|
},
|
|
30
22
|
defaultVariants: {
|
|
31
23
|
variant: 'outline',
|
|
32
|
-
size: '
|
|
24
|
+
size: 'default'
|
|
33
25
|
}
|
|
34
26
|
});
|
|
35
27
|
|
|
36
28
|
// ── Value ───────────────────────────────────────────────────
|
|
37
29
|
|
|
38
|
-
export const selectValueVariants = cva(['flex-1', 'data-[placeholder=true]:text-
|
|
30
|
+
export const selectValueVariants = cva(['flex-1', 'data-[placeholder=true]:text-slate-400', 'data-[invalid=true]:text-red-600', COLOR_TEXT_PRIMARY], {
|
|
39
31
|
variants: {
|
|
40
|
-
variant: {
|
|
41
|
-
outline: 'text-gray-900',
|
|
42
|
-
filled: 'text-gray-900',
|
|
43
|
-
ghost: 'text-gray-900'
|
|
44
|
-
},
|
|
45
32
|
size: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
lg: 'text-lg'
|
|
33
|
+
default: SIZE_SCALE.default.text,
|
|
34
|
+
small: SIZE_SCALE.small.text
|
|
49
35
|
}
|
|
50
36
|
},
|
|
51
37
|
defaultVariants: {
|
|
52
|
-
|
|
53
|
-
size: 'md'
|
|
38
|
+
size: 'default'
|
|
54
39
|
}
|
|
55
40
|
});
|
|
56
41
|
|
|
57
42
|
// ── Icon ────────────────────────────────────────────────────
|
|
58
43
|
|
|
59
|
-
export const selectIconVariants = cva(['items-center justify-center', 'data-[invalid=true]:text-red-500'], {
|
|
44
|
+
export const selectIconVariants = cva(['items-center justify-center', COLOR_TEXT_MUTED, 'data-[invalid=true]:text-red-500'], {
|
|
60
45
|
variants: {
|
|
61
|
-
variant: {
|
|
62
|
-
outline: 'text-gray-500',
|
|
63
|
-
filled: 'text-gray-500',
|
|
64
|
-
ghost: 'text-gray-400'
|
|
65
|
-
},
|
|
66
46
|
size: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
lg: 'h-6 w-6'
|
|
47
|
+
default: 'h-5 w-5',
|
|
48
|
+
small: 'h-4 w-4'
|
|
70
49
|
}
|
|
71
50
|
},
|
|
72
51
|
defaultVariants: {
|
|
73
|
-
|
|
74
|
-
size: 'md'
|
|
52
|
+
size: 'default'
|
|
75
53
|
}
|
|
76
54
|
});
|
|
77
55
|
|
|
78
56
|
// ── Content ─────────────────────────────────────────────────
|
|
79
57
|
|
|
80
|
-
export const selectContentVariants = cva([
|
|
81
|
-
web:
|
|
58
|
+
export const selectContentVariants = cva([COLOR_BG_PRIMARY, `border ${COLOR_BORDER_DEFAULT}`, 'overflow-hidden', RADIUS_MD, Platform.select({
|
|
59
|
+
web: SHADOW_MD,
|
|
82
60
|
default: ''
|
|
83
61
|
}), 'max-h-60', 'py-1']);
|
|
84
62
|
|
|
85
63
|
// ── Item ────────────────────────────────────────────────────
|
|
86
64
|
|
|
87
|
-
export const selectItemVariants = cva(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-
|
|
88
|
-
default: 'data-[active=true]:bg-
|
|
89
|
-
web: 'data-[hover=true]:bg-
|
|
65
|
+
export const selectItemVariants = cva(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-slate-50 data-[state=checked]:font-medium', Platform.select({
|
|
66
|
+
default: 'data-[active=true]:bg-slate-100',
|
|
67
|
+
web: 'data-[hover=true]:bg-slate-50 data-[active=true]:data-[hover=true]:bg-slate-100 data-[highlighted=true]:bg-slate-50'
|
|
90
68
|
})], {
|
|
91
69
|
variants: {
|
|
92
70
|
size: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
lg: 'px-4 py-2.5'
|
|
71
|
+
default: 'px-3 py-2',
|
|
72
|
+
small: 'px-2.5 py-1.5'
|
|
96
73
|
}
|
|
97
74
|
},
|
|
98
75
|
defaultVariants: {
|
|
99
|
-
size: '
|
|
76
|
+
size: 'default'
|
|
100
77
|
}
|
|
101
78
|
});
|
|
102
79
|
|
|
103
80
|
// ── ItemLabel ───────────────────────────────────────────────
|
|
104
81
|
|
|
105
|
-
export const selectItemLabelVariants = cva([
|
|
82
|
+
export const selectItemLabelVariants = cva([COLOR_TEXT_PRIMARY, 'data-[state=checked]:font-medium'], {
|
|
106
83
|
variants: {
|
|
107
84
|
size: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
lg: 'text-lg'
|
|
85
|
+
default: SIZE_SCALE.default.text,
|
|
86
|
+
small: SIZE_SCALE.small.text
|
|
111
87
|
}
|
|
112
88
|
},
|
|
113
89
|
defaultVariants: {
|
|
114
|
-
size: '
|
|
90
|
+
size: 'default'
|
|
115
91
|
}
|
|
116
92
|
});
|
|
117
93
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","
|
|
1
|
+
{"version":3,"names":["Platform","cva","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","COLOR_TEXT_MUTED","COLOR_TEXT_PRIMARY","DISABLED_CURSOR","DISABLED_OPACITY","RADIUS_SM","RADIUS_MD","SHADOW_SM","SHADOW_MD","SIZE_SCALE","TRANSITION_COLORS","selectTriggerVariants","select","default","web","join","variants","variant","outline","size","height","px","gap","small","defaultVariants","selectValueVariants","text","selectIconVariants","selectContentVariants","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SACEC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,EAChBC,kBAAkB,EAClBC,eAAe,EACfC,gBAAgB,EAChBC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,iBAAiB,QACZ,yBAAyB;;AAEhC;;AAEA,OAAO,MAAMC,qBAAqB,GAAGb,GAAG,CACtC,CACE,uCAAuC,EACvCO,SAAS,EACTE,SAAS,EACTG,iBAAiB,EACjBX,gBAAgB,EAChB,UAAUC,oBAAoB,EAAE,EAChCI,gBAAgB,EAChBD,eAAe,EACf,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,kCAAkC,EAClCN,QAAQ,CAACe,MAAM,CAAC;EACdC,OAAO,EAAE,qCAAqC;EAC9CC,GAAG,EAAE,CACH,0FAA0F,EAC1F,sHAAsH,EACtH,8DAA8D,CAC/D,CAACC,IAAI,CAAC,GAAG;AACZ,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE;IACX,CAAC;IACDC,IAAI,EAAE;MACJN,OAAO,EAAE,GAAGJ,UAAU,CAACI,OAAO,CAACO,MAAM,IAAIX,UAAU,CAACI,O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EAA0E,EAC1E,mEAAmE,EACnED,QAAQ,CAACe,MAAM,CAAC;EACdC,OAAO,EAAE,iCAAiC;EAC1CC,GAAG,EAAE;AACP,CAAC,CAAC,CACH,EACD;EACEE,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAE,WAAW;MACpBU,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfL,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEA,OAAO,MAAMW,uBAAuB,GAAGhC,GAAG,CACxC,CAACI,kBAAkB,EAAE,kCAAkC,CAAC,EACxD;EACEc,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAEJ,UAAU,CAACI,OAAO,CAACa,IAAI;MAChCH,KAAK,EAAEd,UAAU,CAACc,KAAK,CAACG;IAC1B;EACF,CAAC;EACDF,eAAe,EAAE;IACfL,IAAI,EAAE;EACR;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -14,13 +14,7 @@ export const hStackRootVariants = cva([], {
|
|
|
14
14
|
true: 'flex-row-reverse',
|
|
15
15
|
false: 'flex-row'
|
|
16
16
|
},
|
|
17
|
-
space:
|
|
18
|
-
xs: spaceMap.xs,
|
|
19
|
-
sm: spaceMap.sm,
|
|
20
|
-
md: spaceMap.md,
|
|
21
|
-
lg: spaceMap.lg,
|
|
22
|
-
xl: spaceMap.xl
|
|
23
|
-
}
|
|
17
|
+
space: spaceMap
|
|
24
18
|
},
|
|
25
19
|
defaultVariants: {
|
|
26
20
|
reversed: false
|
|
@@ -32,13 +26,7 @@ export const vStackRootVariants = cva([], {
|
|
|
32
26
|
true: 'flex-col-reverse',
|
|
33
27
|
false: 'flex-col'
|
|
34
28
|
},
|
|
35
|
-
space:
|
|
36
|
-
xs: spaceMap.xs,
|
|
37
|
-
sm: spaceMap.sm,
|
|
38
|
-
md: spaceMap.md,
|
|
39
|
-
lg: spaceMap.lg,
|
|
40
|
-
xl: spaceMap.xl
|
|
41
|
-
}
|
|
29
|
+
space: spaceMap
|
|
42
30
|
},
|
|
43
31
|
defaultVariants: {
|
|
44
32
|
reversed: false
|
|
@@ -1 +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,
|
|
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":[]}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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":[]}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
|
|
6
|
-
|
|
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',
|
|
7
8
|
default: ''
|
|
8
9
|
})], {
|
|
9
10
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","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;
|
|
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 @@
|
|
|
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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YAAY,CAAC,CAAC;AACvC,OAAO,MAAMC,SAAS,GAAG,YAAY,CAAC,CAAC;AACvC,OAAO,MAAMC,WAAW,GAAG,cAAc,CAAC,CAAC;;AAE3C;AACA,OAAO,MAAMC,SAAS,GAAG,WAAW;AACpC,OAAO,MAAMC,SAAS,GAAG,WAAW;;AAEpC;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAG;EACxBC,OAAO,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,EAAE,EAAE,MAAM;IAAEC,GAAG,EAAE,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":[]}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,GAAG,2FAQf,CAAC"}
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,mCAAmC;AACnC,eAAO,MAAM,GAAG,2FAQf,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
import { ActivityIndicator, Text, View, type ActivityIndicatorProps, type PressableProps, type ViewProps, type TextProps } from 'react-native';
|
|
3
3
|
import { type IButtonProps } from '@cdx-ui/primitives';
|
|
4
|
+
import { IconProps } from '../Icon';
|
|
4
5
|
import { type ButtonGroupVariantProps, type ButtonVariantProps } from './styles';
|
|
5
6
|
export interface ButtonProps extends PressableProps, IButtonProps, ButtonVariantProps {
|
|
6
7
|
className?: string;
|
|
@@ -21,10 +22,12 @@ export interface ButtonGroupProps extends Omit<ViewProps, 'children'> {
|
|
|
21
22
|
reversed?: boolean;
|
|
22
23
|
}
|
|
23
24
|
declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<View>>;
|
|
24
|
-
export interface ButtonIconProps extends
|
|
25
|
-
className?: string;
|
|
25
|
+
export interface ButtonIconProps extends Omit<IconProps, 'children'> {
|
|
26
26
|
}
|
|
27
|
-
declare const ButtonIcon:
|
|
27
|
+
declare const ButtonIcon: {
|
|
28
|
+
({ className, style, as, ...props }: ButtonIconProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
28
31
|
export interface ButtonSpinnerProps extends ActivityIndicatorProps {
|
|
29
32
|
className?: string;
|
|
30
33
|
colorClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EACL,iBAAiB,EAEjB,IAAI,EACJ,IAAI,EACJ,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EACL,iBAAiB,EAEjB,IAAI,EACJ,IAAI,EACJ,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EAMxB,MAAM,UAAU,CAAC;AAoBlB,MAAM,WAAW,WAAY,SAAQ,cAAc,EAAE,YAAY,EAAE,kBAAkB;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,8FAgCf,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,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size?: "
|
|
3
|
+
variant?: "strong" | "outline" | "ghost" | null | undefined;
|
|
4
|
+
color?: "action" | "danger" | "warning" | "success" | "info" | null | undefined;
|
|
5
|
+
size?: "default" | "small" | null | undefined;
|
|
6
|
+
mode?: "light" | "dark" | null | undefined;
|
|
6
7
|
fullWidth?: boolean | null | undefined;
|
|
7
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
9
|
export declare const buttonTextVariants: (props?: ({
|
|
9
|
-
variant?: "
|
|
10
|
-
color?: "
|
|
11
|
-
size?: "
|
|
10
|
+
variant?: "strong" | "outline" | "ghost" | null | undefined;
|
|
11
|
+
color?: "action" | "danger" | "warning" | "success" | "info" | null | undefined;
|
|
12
|
+
size?: "default" | "small" | null | undefined;
|
|
13
|
+
mode?: "light" | "dark" | null | undefined;
|
|
12
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
15
|
export declare const buttonSpinnerVariants: (props?: ({
|
|
14
|
-
variant?: "
|
|
15
|
-
color?: "
|
|
16
|
+
variant?: "strong" | "outline" | "ghost" | null | undefined;
|
|
17
|
+
color?: "action" | "danger" | "warning" | "success" | "info" | null | undefined;
|
|
18
|
+
mode?: "light" | "dark" | null | undefined;
|
|
16
19
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
20
|
export declare const buttonGroupVariants: (props?: ({
|
|
18
21
|
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
|
|
19
22
|
isAttached?: boolean | null | undefined;
|
|
20
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
|
+
export declare const buttonIconVariants: (props?: ({
|
|
25
|
+
size?: "default" | "small" | null | undefined;
|
|
26
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
27
|
export type ButtonVariantProps = VariantProps<typeof buttonRootVariants>;
|
|
22
28
|
export type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>;
|
|
23
29
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAalE,eAAO,MAAM,kBAAkB;;;;;;8EA0V9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;8EAwI7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;8EAoFhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;8EAiB9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;8EAU7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACzE,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { Text, type TextProps, View, type ViewProps } from 'react-native';
|
|
3
3
|
import { type ICheckboxProps } from '@cdx-ui/primitives';
|
|
4
|
+
import { IconProps } from '../Icon';
|
|
4
5
|
import { type CheckboxVariantProps } from './styles';
|
|
5
6
|
export interface CheckboxProps extends ICheckboxProps, CheckboxVariantProps {
|
|
6
7
|
className?: string;
|
|
@@ -12,11 +13,12 @@ export interface CheckboxIndicatorProps extends ViewProps {
|
|
|
12
13
|
children?: ReactNode;
|
|
13
14
|
}
|
|
14
15
|
declare const CheckboxIndicator: import("react").ForwardRefExoticComponent<CheckboxIndicatorProps & import("react").RefAttributes<View>>;
|
|
15
|
-
export interface CheckboxIconProps extends
|
|
16
|
-
className?: string;
|
|
17
|
-
children?: ReactNode;
|
|
16
|
+
export interface CheckboxIconProps extends Omit<IconProps, 'children'> {
|
|
18
17
|
}
|
|
19
|
-
declare const CheckboxIcon:
|
|
18
|
+
declare const CheckboxIcon: {
|
|
19
|
+
({ className, style, ...props }: CheckboxIconProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
20
22
|
export interface CheckboxLabelProps extends TextProps {
|
|
21
23
|
className?: string;
|
|
22
24
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAa,IAAI,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAa,IAAI,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAErF,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EACL,KAAK,oBAAoB,EAM1B,MAAM,UAAU,CAAC;AAoBlB,MAAM,WAAW,aAAc,SAAQ,cAAc,EAAE,oBAAoB;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,YAAY,gGAsBjB,CAAC;AAQF,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,iBAAiB,yGAgBtB,CAAC;AAQF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;CAAG;AAEzE,QAAA,MAAM,YAAY;qCAAoC,iBAAiB;;CAKtE,CAAC;AAQF,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,qGAgBlB,CAAC;AAQF,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC9B;AAED,QAAA,MAAM,aAAa,qGAkClB,CAAC;AAQF,KAAK,yBAAyB,GAAG,OAAO,YAAY,GAAG;IACrD,SAAS,EAAE,OAAO,iBAAiB,CAAC;IACpC,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,KAAK,EAAE,OAAO,aAAa,CAAC;IAC5B,KAAK,EAAE,OAAO,aAAa,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAKf,yBAAyB,CAAC;AAEhC,YAAY,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const checkboxRootVariants: (props?: ({
|
|
3
|
-
size?: "
|
|
3
|
+
size?: "default" | "small" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export declare const checkboxIndicatorVariants: (props?: ({
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "default" | "small" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export declare const checkboxIconVariants: (props?: ({
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "default" | "small" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
export declare const checkboxLabelVariants: (props?: ({
|
|
12
|
-
size?: "
|
|
12
|
+
size?: "default" | "small" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export declare const checkboxGroupVariants: (props?: ({
|
|
15
15
|
direction?: "row" | "column" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAUlE,eAAO,MAAM,oBAAoB;;8EAahC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;8EAmCrC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;8EAU/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;8EAajC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;8EAUhC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import { type HeadingVariantProps } from './styles';
|
|
4
|
-
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof Text
|
|
5
|
-
|
|
4
|
+
export type HeadingProps = HeadingVariantProps & ComponentPropsWithoutRef<typeof Text> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const Heading: import("react").NamedExoticComponent<HeadingVariantProps & import("react-native").TextProps & {
|
|
8
|
+
className?: string;
|
|
9
|
+
} & import("react").RefAttributes<Text>>;
|
|
6
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Heading/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAUlE,MAAM,MAAM,YAAY,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Heading/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAUlE,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAC5C,wBAAwB,CAAC,OAAO,IAAI,CAAC,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEJ,eAAO,MAAM,OAAO;gBAHJ,MAAM;wCAkBrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Heading/styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Heading/styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,YAAY;;8EAmBxB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CdxIcon, CdxIconProps } from '@cdx-ui/icons';
|
|
2
|
-
type IconProps = CdxIconProps & {
|
|
2
|
+
export type IconProps = CdxIconProps & {
|
|
3
3
|
className?: string;
|
|
4
4
|
as: CdxIcon;
|
|
5
5
|
};
|
|
@@ -24,5 +24,4 @@ type IconProps = CdxIconProps & {
|
|
|
24
24
|
* @param {...CdxIconProps} ...props - Additional icon props passed to the "as" icon.
|
|
25
25
|
*/
|
|
26
26
|
export declare function Icon({ as: IconComponent, className, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export {};
|
|
28
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG3D,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,OAAO,CAAC;CACb,CAAC;AAiBF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAQzE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type TextInput, View, type ViewProps } from 'react-native';
|
|
3
3
|
import { type IInputFieldProps, type IInputProps, type IInputSlotProps } from '@cdx-ui/primitives';
|
|
4
|
+
import { IconProps } from '../Icon';
|
|
4
5
|
import { type InputVariantProps } from './styles';
|
|
5
6
|
export interface InputProps extends ViewProps, IInputFieldProps, InputVariantProps {
|
|
6
7
|
className?: string;
|
|
@@ -17,11 +18,12 @@ export interface InputSlotProps extends ViewProps, IInputSlotProps {
|
|
|
17
18
|
children?: ReactNode;
|
|
18
19
|
}
|
|
19
20
|
declare const InputSlot: import("react").ForwardRefExoticComponent<InputSlotProps & import("react").RefAttributes<View>>;
|
|
20
|
-
export interface InputIconProps extends
|
|
21
|
-
className?: string;
|
|
22
|
-
children?: ReactNode;
|
|
21
|
+
export interface InputIconProps extends Omit<IconProps, 'children'> {
|
|
23
22
|
}
|
|
24
|
-
declare const InputIcon:
|
|
23
|
+
declare const InputIcon: {
|
|
24
|
+
({ className, style, as, ...props }: InputIconProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
25
27
|
type InputCompoundComponent = typeof InputRoot & {
|
|
26
28
|
Field: typeof InputField;
|
|
27
29
|
Slot: typeof InputSlot;
|