@cdx-ui/components 0.0.1-alpha.2 → 0.0.1-alpha.21
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/BottomSheet/index.js +248 -0
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/styles.js +61 -0
- package/lib/commonjs/components/BottomSheet/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 +94 -0
- package/lib/commonjs/components/Link/index.js.map +1 -0
- package/lib/commonjs/components/Link/styles.js +16 -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 +120 -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/BottomSheet/index.js +242 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -0
- package/lib/module/components/BottomSheet/styles.js +58 -0
- package/lib/module/components/BottomSheet/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 +85 -0
- package/lib/module/components/Link/index.js.map +1 -0
- package/lib/module/components/Link/styles.js +12 -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 +10 -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/BottomSheet/index.d.ts +61 -0
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/styles.d.ts +16 -0
- package/lib/typescript/components/BottomSheet/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 +26 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -0
- package/lib/typescript/components/Link/styles.d.ts +4 -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 +10 -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 +22 -13
- package/src/components/Avatar/index.tsx +174 -0
- package/src/components/Avatar/styles.ts +83 -0
- package/src/components/BottomSheet/index.tsx +316 -0
- package/src/components/BottomSheet/styles.ts +79 -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 +83 -0
- package/src/components/Link/styles.ts +20 -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 +10 -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":["_reactNative","require","_classVarianceAuthority","selectTriggerVariants","exports","cva","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","selectTriggerVariants","exports","cva","RADIUS_SM","SHADOW_SM","TRANSITION_COLORS","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","DISABLED_OPACITY","DISABLED_CURSOR","Platform","select","default","web","join","variants","variant","outline","size","SIZE_SCALE","height","px","gap","small","defaultVariants","selectValueVariants","COLOR_TEXT_PRIMARY","text","selectIconVariants","COLOR_TEXT_MUTED","selectContentVariants","RADIUS_MD","SHADOW_MD","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAeA;;AAEO,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,IAAAE,2BAAG,EACtC,CACE,uCAAuC,EACvCC,qBAAS,EACTC,qBAAS,EACTC,6BAAiB,EACjBC,4BAAgB,EAChB,UAAUC,gCAAoB,EAAE,EAChCC,4BAAgB,EAChBC,2BAAe,EACf,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,kCAAkC,EAClCC,qBAAQ,CAACC,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,GAAGO,sBAAU,CAACP,OAAO,CAACQ,MAAM,IAAID,sBAAU,CAACP,OAAO,CAACS,EAAE,IAAIF,sBAAU,CAACP,OAAO,CAACU,GAAG,EAAE;MAC1FC,KAAK,EAAE,GAAGJ,sBAAU,CAACI,KAAK,CAACH,MA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EACvB,gCAAgC,EAChC,0EAA0E,EAC1E,mEAAmE,EACnEQ,qBAAQ,CAACC,MAAM,CAAC;EACdC,OAAO,EAAE,iCAAiC;EAC1CC,GAAG,EAAE;AACP,CAAC,CAAC,CACH,EACD;EACEE,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAE,WAAW;MACpBW,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEO,MAAMgB,uBAAuB,GAAAjC,OAAA,CAAAiC,uBAAA,GAAG,IAAAhC,2BAAG,EACxC,CAACwB,8BAAkB,EAAE,kCAAkC,CAAC,EACxD;EACEX,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAEO,sBAAU,CAACP,OAAO,CAACe,IAAI;MAChCJ,KAAK,EAAEJ,sBAAU,CAACI,KAAK,CAACI;IAC1B;EACF,CAAC;EACDH,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -6,37 +6,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.HStack = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
// import { spacing } from '@cdx-ui/tokens';
|
|
11
|
-
|
|
12
|
-
// TODO: Integrate with tokens (multiply by spacing)
|
|
13
|
-
const spaceScale = {
|
|
14
|
-
xs: 1,
|
|
15
|
-
sm: 2,
|
|
16
|
-
md: 3,
|
|
17
|
-
lg: 4,
|
|
18
|
-
xl: 5,
|
|
19
|
-
'2xl': 6,
|
|
20
|
-
'3xl': 7,
|
|
21
|
-
'4xl': 8
|
|
22
|
-
};
|
|
23
12
|
const HStack = exports.HStack = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
reversed = false,
|
|
24
14
|
space,
|
|
25
|
-
reversed,
|
|
26
15
|
style,
|
|
27
16
|
className,
|
|
28
17
|
children,
|
|
29
18
|
...restProps
|
|
30
19
|
}, ref) => {
|
|
31
|
-
const gap = space ? spaceScale[space] : undefined;
|
|
32
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
33
21
|
ref: ref,
|
|
34
|
-
className:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
} : null, style],
|
|
22
|
+
className: (0, _utils.cn)((0, _styles.hStackRootVariants)({
|
|
23
|
+
reversed,
|
|
24
|
+
space
|
|
25
|
+
}), className),
|
|
26
|
+
style: style,
|
|
40
27
|
...restProps,
|
|
41
28
|
children: children
|
|
42
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","HStack","exports","forwardRef","reversed","space","style","className","children","restProps","ref","jsx","View","cn","hStackRootVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/Stack/HStack.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAQxD,MAAMK,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAG,IAAAE,iBAAU,EAC9B,CACE;EAAEC,QAAQ,GAAG,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EACrEC,GAAuB,KACpB;EACH,oBACE,IAAAV,WAAA,CAAAW,GAAA,EAACd,YAAA,CAAAe,IAAI;IACHF,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAE,IAAAM,SAAE,EAAC,IAAAC,0BAAkB,EAAC;MAAEV,QAAQ;MAAEC;IAAM,CAAC,CAAC,EAAEE,SAAS,CAAE;IAClED,KAAK,EAAEA,KAAM;IAAA,GACTG,SAAS;IAAAD,QAAA,EAEZA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDP,MAAM,CAACc,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -6,37 +6,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.VStack = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
// import { spacing } from '@cdx-ui/tokens';
|
|
11
|
-
|
|
12
|
-
// TODO: Integrate with tokens (multiply by spacing)
|
|
13
|
-
const spaceScale = {
|
|
14
|
-
xs: 1,
|
|
15
|
-
sm: 2,
|
|
16
|
-
md: 3,
|
|
17
|
-
lg: 4,
|
|
18
|
-
xl: 5,
|
|
19
|
-
'2xl': 6,
|
|
20
|
-
'3xl': 7,
|
|
21
|
-
'4xl': 8
|
|
22
|
-
};
|
|
23
12
|
const VStack = exports.VStack = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
reversed = false,
|
|
24
14
|
space,
|
|
25
|
-
reversed,
|
|
26
15
|
style,
|
|
27
16
|
className,
|
|
28
17
|
children,
|
|
29
18
|
...restProps
|
|
30
19
|
}, ref) => {
|
|
31
|
-
const gap = space ? spaceScale[space] : undefined;
|
|
32
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
33
21
|
ref: ref,
|
|
34
|
-
className:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
} : null, style],
|
|
22
|
+
className: (0, _utils.cn)((0, _styles.vStackRootVariants)({
|
|
23
|
+
reversed,
|
|
24
|
+
space
|
|
25
|
+
}), className),
|
|
26
|
+
style: style,
|
|
40
27
|
...restProps,
|
|
41
28
|
children: children
|
|
42
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","VStack","exports","forwardRef","reversed","space","style","className","children","restProps","ref","jsx","View","cn","vStackRootVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/Stack/VStack.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAQxD,MAAMK,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAG,IAAAE,iBAAU,EAC9B,CACE;EAAEC,QAAQ,GAAG,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EACrEC,GAAuB,KACpB;EACH,oBACE,IAAAV,WAAA,CAAAW,GAAA,EAACd,YAAA,CAAAe,IAAI;IACHF,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAE,IAAAM,SAAE,EAAC,IAAAC,0BAAkB,EAAC;MAAEV,QAAQ;MAAEC;IAAM,CAAC,CAAC,EAAEE,SAAS,CAAE;IAClED,KAAK,EAAEA,KAAM;IAAA,GACTG,SAAS;IAAAD,QAAA,EAEZA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDP,MAAM,CAACc,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.vStackRootVariants = exports.hStackRootVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const spaceMap = {
|
|
9
|
+
xs: 'gap-1',
|
|
10
|
+
sm: 'gap-2',
|
|
11
|
+
md: 'gap-3',
|
|
12
|
+
lg: 'gap-4',
|
|
13
|
+
xl: 'gap-5'
|
|
14
|
+
};
|
|
15
|
+
const hStackRootVariants = exports.hStackRootVariants = (0, _classVarianceAuthority.cva)([], {
|
|
16
|
+
variants: {
|
|
17
|
+
reversed: {
|
|
18
|
+
true: 'flex-row-reverse',
|
|
19
|
+
false: 'flex-row'
|
|
20
|
+
},
|
|
21
|
+
space: spaceMap
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
reversed: false
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const vStackRootVariants = exports.vStackRootVariants = (0, _classVarianceAuthority.cva)([], {
|
|
28
|
+
variants: {
|
|
29
|
+
reversed: {
|
|
30
|
+
true: 'flex-col-reverse',
|
|
31
|
+
false: 'flex-col'
|
|
32
|
+
},
|
|
33
|
+
space: spaceMap
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
reversed: false
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","spaceMap","xs","sm","md","lg","xl","hStackRootVariants","exports","cva","variants","reversed","true","false","space","defaultVariants","vStackRootVariants"],"sourceRoot":"../../../../src","sources":["components/Stack/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAIA,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;AAExC,MAAMC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,2BAAG,EAAC,EAAE,EAAE;EACxCC,QAAQ,EAAE;IACRC,QAAQ,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACT,CAAC;IACDC,KAAK,EAAEb;EACT,CAAC;EACDc,eAAe,EAAE;IACfJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEK,MAAMK,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAG,IAAAP,2BAAG,EAAC,EAAE,EAAE;EACxCC,QAAQ,EAAE;IACRC,QAAQ,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACT,CAAC;IACDC,KAAK,EAAEb;EACT,CAAC;EACDc,eAAe,EAAE;IACfJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseSwitch = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const BaseSwitch = exports.BaseSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
states,
|
|
14
|
+
className,
|
|
15
|
+
disabled,
|
|
16
|
+
value,
|
|
17
|
+
...props
|
|
18
|
+
}, ref) => {
|
|
19
|
+
const isChecked = value ?? states?.checked ?? false;
|
|
20
|
+
const isDisabled = disabled ?? states?.disabled ?? false;
|
|
21
|
+
const isInvalid = states?.invalid ?? false;
|
|
22
|
+
const uniwindProps = {
|
|
23
|
+
className,
|
|
24
|
+
thumbColorClassName: (0, _utils.cn)((0, _styles.switchThumbColorVariants)({
|
|
25
|
+
isDisabled
|
|
26
|
+
})),
|
|
27
|
+
trackColorOnClassName: (0, _utils.cn)((0, _styles.switchTrackOnVariants)({
|
|
28
|
+
isInvalid
|
|
29
|
+
})),
|
|
30
|
+
trackColorOffClassName: (0, _utils.cn)((0, _styles.switchTrackOffVariants)({
|
|
31
|
+
isInvalid
|
|
32
|
+
})),
|
|
33
|
+
ios_backgroundColorClassName: (0, _utils.cn)((0, _styles.switchIosBgVariants)({
|
|
34
|
+
isInvalid
|
|
35
|
+
}))
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
|
|
38
|
+
ref: ref,
|
|
39
|
+
value: isChecked,
|
|
40
|
+
disabled: isDisabled,
|
|
41
|
+
...uniwindProps,
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
BaseSwitch.displayName = 'BaseSwitch';
|
|
46
|
+
//# sourceMappingURL=BaseSwitch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","BaseSwitch","exports","forwardRef","states","className","disabled","value","props","ref","isChecked","checked","isDisabled","isInvalid","invalid","uniwindProps","thumbColorClassName","cn","switchThumbColorVariants","trackColorOnClassName","switchTrackOnVariants","trackColorOffClassName","switchTrackOffVariants","ios_backgroundColorClassName","switchIosBgVariants","jsx","Switch","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/BaseSwitch.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKkB,IAAAI,WAAA,GAAAJ,OAAA;AASX,MAAMK,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CAAC;EAAEC,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,EAAE,IAAAC,SAAE,EAAC,IAAAC,gCAAwB,EAAC;MAAEN;IAAW,CAAC,CAAC,CAAC;IACjEO,qBAAqB,EAAE,IAAAF,SAAE,EAAC,IAAAG,6BAAqB,EAAC;MAAEP;IAAU,CAAC,CAAC,CAAC;IAC/DQ,sBAAsB,EAAE,IAAAJ,SAAE,EAAC,IAAAK,8BAAsB,EAAC;MAAET;IAAU,CAAC,CAAC,CAAC;IACjEU,4BAA4B,EAAE,IAAAN,SAAE,EAAC,IAAAO,2BAAmB,EAAC;MAAEX;IAAU,CAAC,CAAC;EACrE,CAAC;EAED,oBACE,IAAAb,WAAA,CAAAyB,GAAA,EAAC5B,YAAA,CAAA6B,MAAQ;IAACjB,GAAG,EAAEA,GAAI;IAACF,KAAK,EAAEG,SAAU;IAACJ,QAAQ,EAAEM,UAAW;IAAA,GAAKG,YAAY;IAAA,GAAMP;EAAK,CAAG,CAAC;AAE/F,CACF,CAAC;AAEDP,UAAU,CAAC0B,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseSwitch = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const BaseSwitch = exports.BaseSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
value,
|
|
14
|
+
onValueChange,
|
|
15
|
+
disabled,
|
|
16
|
+
states,
|
|
17
|
+
dataSet,
|
|
18
|
+
className,
|
|
19
|
+
size = 'md',
|
|
20
|
+
onFocus,
|
|
21
|
+
onBlur,
|
|
22
|
+
...props
|
|
23
|
+
}, ref) => {
|
|
24
|
+
const isChecked = value ?? states?.checked ?? false;
|
|
25
|
+
const isDisabled = disabled ?? states?.disabled ?? false;
|
|
26
|
+
const isInvalid = states?.invalid ?? false;
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
28
|
+
ref: ref,
|
|
29
|
+
role: "switch",
|
|
30
|
+
"aria-checked": isChecked,
|
|
31
|
+
"aria-disabled": isDisabled,
|
|
32
|
+
disabled: isDisabled,
|
|
33
|
+
onPress: () => onValueChange?.(!isChecked),
|
|
34
|
+
onFocus: onFocus,
|
|
35
|
+
onBlur: onBlur,
|
|
36
|
+
tabIndex: 0,
|
|
37
|
+
className: (0, _utils.cn)((0, _styles.switchTrackVariants)({
|
|
38
|
+
size
|
|
39
|
+
}), (0, _styles.switchWebTrackColorVariants)({
|
|
40
|
+
isChecked,
|
|
41
|
+
isInvalid
|
|
42
|
+
}), className)
|
|
43
|
+
// @ts-expect-error dataSet is a RNW/Uniwind prop not in Pressable types
|
|
44
|
+
,
|
|
45
|
+
dataSet: dataSet,
|
|
46
|
+
...props,
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
48
|
+
className: (0, _utils.cn)((0, _styles.switchThumbVariants)({
|
|
49
|
+
size,
|
|
50
|
+
isChecked
|
|
51
|
+
}))
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
BaseSwitch.displayName = 'BaseSwitch';
|
|
56
|
+
//# sourceMappingURL=BaseSwitch.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","BaseSwitch","exports","forwardRef","value","onValueChange","disabled","states","dataSet","className","size","onFocus","onBlur","props","ref","isChecked","checked","isDisabled","isInvalid","invalid","jsx","Pressable","role","onPress","tabIndex","cn","switchTrackVariants","switchWebTrackColorVariants","children","View","switchThumbVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/BaseSwitch.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKkB,IAAAI,WAAA,GAAAJ,OAAA;AAcX,MAAMK,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CACE;EACEC,KAAK;EACLC,aAAa;EACbC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC,IAAI,GAAG,IAAI;EACXC,OAAO;EACPC,MAAM;EACN,GAAGC;AACL,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,SAAS,GAAGX,KAAK,IAAIG,MAAM,EAAES,OAAO,IAAI,KAAK;EACnD,MAAMC,UAAU,GAAGX,QAAQ,IAAIC,MAAM,EAAED,QAAQ,IAAI,KAAK;EACxD,MAAMY,SAAS,GAAGX,MAAM,EAAEY,OAAO,IAAI,KAAK;EAE1C,oBACE,IAAAnB,WAAA,CAAAoB,GAAA,EAACvB,YAAA,CAAAwB,SAAS;IACRP,GAAG,EAAEA,GAAI;IACTQ,IAAI,EAAC,QAAQ;IACb,gBAAcP,SAAU;IACxB,iBAAeE,UAAW;IAC1BX,QAAQ,EAAEW,UAAW;IACrBM,OAAO,EAAEA,CAAA,KAAMlB,aAAa,GAAG,CAACU,SAAS,CAAE;IAC3CJ,OAAO,EAAEA,OAAQ;IACjBC,MAAM,EAAEA,MAAO;IACfY,QAAQ,EAAE,CAAE;IACZf,SAAS,EAAE,IAAAgB,SAAE,EACX,IAAAC,2BAAmB,EAAC;MAAEhB;IAAK,CAAC,CAAC,EAC7B,IAAAiB,mCAA2B,EAAC;MAAEZ,SAAS;MAAEG;IAAU,CAAC,CAAC,EACrDT,SACF;IACA;IAAA;IACAD,OAAO,EAAEA,OAAQ;IAAA,GACbK,KAAK;IAAAe,QAAA,eAET,IAAA5B,WAAA,CAAAoB,GAAA,EAACvB,YAAA,CAAAgC,IAAI;MAACpB,SAAS,EAAE,IAAAgB,SAAE,EAAC,IAAAK,2BAAmB,EAAC;QAAEpB,IAAI;QAAEK;MAAU,CAAC,CAAC;IAAE,CAAE;EAAC,CACxD,CAAC;AAEhB,CACF,CAAC;AAEDd,UAAU,CAAC8B,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Switch = void 0;
|
|
7
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
8
|
+
var _BaseSwitch = require("./BaseSwitch");
|
|
9
|
+
const SwitchPrimitive = (0, _primitives.createSwitch)({
|
|
10
|
+
Root: _BaseSwitch.BaseSwitch
|
|
11
|
+
});
|
|
12
|
+
const Switch = exports.Switch = SwitchPrimitive;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_primitives","require","_BaseSwitch","SwitchPrimitive","createSwitch","Root","BaseSwitch","Switch","exports"],"sourceRoot":"../../../../src","sources":["components/Switch/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAGA,MAAME,eAAe,GAAG,IAAAC,wBAAY,EAAC;EAAEC,IAAI,EAAEC;AAAW,CAAC,CAAC;AAMnD,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGJ,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.switchWebTrackColorVariants = exports.switchTrackVariants = exports.switchTrackOnVariants = exports.switchTrackOffVariants = exports.switchThumbVariants = exports.switchThumbColorVariants = exports.switchIosBgVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// NATIVE — Uniwind className bindings for RN Switch
|
|
10
|
+
// =============================================================================
|
|
11
|
+
|
|
12
|
+
const switchThumbColorVariants = exports.switchThumbColorVariants = (0, _classVarianceAuthority.cva)(['accent-white'], {
|
|
13
|
+
variants: {
|
|
14
|
+
isDisabled: {
|
|
15
|
+
true: 'accent-gray-200',
|
|
16
|
+
false: ''
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
isDisabled: false
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const switchTrackOnVariants = exports.switchTrackOnVariants = (0, _classVarianceAuthority.cva)(['accent-blue-500'], {
|
|
24
|
+
variants: {
|
|
25
|
+
isInvalid: {
|
|
26
|
+
true: 'accent-red-500',
|
|
27
|
+
false: ''
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
isInvalid: false
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const switchTrackOffVariants = exports.switchTrackOffVariants = (0, _classVarianceAuthority.cva)(['accent-gray-300'], {
|
|
35
|
+
variants: {
|
|
36
|
+
isInvalid: {
|
|
37
|
+
true: 'accent-red-300',
|
|
38
|
+
false: ''
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
isInvalid: false
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const switchIosBgVariants = exports.switchIosBgVariants = (0, _classVarianceAuthority.cva)(['accent-gray-300'], {
|
|
46
|
+
variants: {
|
|
47
|
+
isInvalid: {
|
|
48
|
+
true: 'accent-red-300',
|
|
49
|
+
false: ''
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
isInvalid: false
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// =============================================================================
|
|
58
|
+
// WEB — Tailwind classes for custom Pressable toggle
|
|
59
|
+
// =============================================================================
|
|
60
|
+
|
|
61
|
+
const switchTrackVariants = exports.switchTrackVariants = (0, _classVarianceAuthority.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'], {
|
|
62
|
+
variants: {
|
|
63
|
+
size: {
|
|
64
|
+
sm: 'w-9 h-5 p-0.5',
|
|
65
|
+
md: 'w-11 h-6 p-0.5',
|
|
66
|
+
lg: 'w-14 h-8 p-1'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
size: 'md'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const switchWebTrackColorVariants = exports.switchWebTrackColorVariants = (0, _classVarianceAuthority.cva)([], {
|
|
74
|
+
variants: {
|
|
75
|
+
isChecked: {
|
|
76
|
+
true: 'bg-blue-500 data-[hover=true]:bg-blue-600',
|
|
77
|
+
false: 'bg-gray-300 data-[hover=true]:bg-gray-400'
|
|
78
|
+
},
|
|
79
|
+
isInvalid: {
|
|
80
|
+
true: '',
|
|
81
|
+
false: ''
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
compoundVariants: [{
|
|
85
|
+
isChecked: true,
|
|
86
|
+
isInvalid: true,
|
|
87
|
+
className: 'bg-red-500 data-[hover=true]:bg-red-600'
|
|
88
|
+
}, {
|
|
89
|
+
isChecked: false,
|
|
90
|
+
isInvalid: true,
|
|
91
|
+
className: 'bg-red-300 data-[hover=true]:bg-red-400'
|
|
92
|
+
}],
|
|
93
|
+
defaultVariants: {
|
|
94
|
+
isChecked: false,
|
|
95
|
+
isInvalid: false
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const switchThumbVariants = exports.switchThumbVariants = (0, _classVarianceAuthority.cva)(['rounded-full bg-white shadow-sm', 'transition-transform duration-200'], {
|
|
99
|
+
variants: {
|
|
100
|
+
size: {
|
|
101
|
+
sm: 'w-4 h-4',
|
|
102
|
+
md: 'w-5 h-5',
|
|
103
|
+
lg: 'w-6 h-6'
|
|
104
|
+
},
|
|
105
|
+
isChecked: {
|
|
106
|
+
true: '',
|
|
107
|
+
false: 'translate-x-0'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
compoundVariants: [{
|
|
111
|
+
size: 'sm',
|
|
112
|
+
isChecked: true,
|
|
113
|
+
className: 'translate-x-4'
|
|
114
|
+
}, {
|
|
115
|
+
size: 'md',
|
|
116
|
+
isChecked: true,
|
|
117
|
+
className: 'translate-x-5'
|
|
118
|
+
}, {
|
|
119
|
+
size: 'lg',
|
|
120
|
+
isChecked: true,
|
|
121
|
+
className: 'translate-x-6'
|
|
122
|
+
}],
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
size: 'md',
|
|
125
|
+
isChecked: false
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","switchThumbColorVariants","exports","cva","variants","isDisabled","true","false","defaultVariants","switchTrackOnVariants","isInvalid","switchTrackOffVariants","switchIosBgVariants","switchTrackVariants","size","sm","md","lg","switchWebTrackColorVariants","isChecked","compoundVariants","className","switchThumbVariants"],"sour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AE;EAAgB,CAAC,EAC3D;IAAEP,IAAI,EAAE,IAAI;IAAEK,SAAS,EAAE,IAAI;IAAEE,SAAS,EAAE;EAAgB,CAAC,EAC3D;IAAEP,IAAI,EAAE,IAAI;IAAEK,SAAS,EAAE,IAAI;IAAEE,SAAS,EAAE;EAAgB,CAAC,CAC5D;EACDb,eAAe,EAAE;IACfM,IAAI,EAAE,IAAI;IACVK,SAAS,EAAE;EACb;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -3,15 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
exports.Text = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const Text = exports.Text = /*#__PURE__*/(0, _react.forwardRef)(function Text({
|
|
13
|
+
className,
|
|
14
|
+
size = 'md',
|
|
15
|
+
...props
|
|
16
|
+
}, ref) {
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
18
|
+
className: (0, _utils.cn)((0, _styles.textStyle)({
|
|
19
|
+
size
|
|
20
|
+
}), className),
|
|
21
|
+
...props,
|
|
22
|
+
ref: ref
|
|
15
23
|
});
|
|
16
24
|
});
|
|
25
|
+
Text.displayName = 'Text';
|
|
17
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","Text","exports","forwardRef","className","size","props","ref","jsx","cn","textStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Text/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAuD,IAAAI,WAAA,GAAAJ,OAAA;AAKhD,MAAMK,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,iBAAU,EAAyC,SAASF,IAAIA,CAClF;EAAEG,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBAAO,IAAAP,WAAA,CAAAQ,GAAA,EAACX,YAAA,CAAAI,IAAM;IAACG,SAAS,EAAE,IAAAK,SAAE,EAAC,IAAAC,iBAAS,EAAC;MAAEL;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AACvF,CAAC,CAAC;AAEFN,IAAI,CAACU,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.textStyle = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
+
var _primitives = require("../../styles/primitives");
|
|
10
|
+
const textStyle = exports.textStyle = (0, _classVarianceAuthority.cva)([`${_primitives.COLOR_TEXT_PRIMARY} font-normal`, _reactNative.Platform.select({
|
|
11
|
+
web: 'font-sans my-0 bg-transparent display-inline no-underline',
|
|
12
|
+
default: ''
|
|
13
|
+
})], {
|
|
14
|
+
variants: {
|
|
15
|
+
size: {
|
|
16
|
+
xl: 'text-xl',
|
|
17
|
+
lg: 'text-lg',
|
|
18
|
+
md: 'text-base',
|
|
19
|
+
sm: 'text-sm',
|
|
20
|
+
xs: 'text-xs'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","textStyle","exports","cva","COLOR_TEXT_PRIMARY","Platform","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEO,MAAMG,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,2BAAG,EAC1B,CACE,GAAGC,8BAAkB,cAAc,EACnCC,qBAAQ,CAACC,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,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VirtualizedList = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _flashList = require("@shopify/flash-list");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function VirtualizedListInner(props, ref) {
|
|
11
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_flashList.FlashList, {
|
|
12
|
+
ref: ref,
|
|
13
|
+
role: "list",
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const VirtualizedList = exports.VirtualizedList = /*#__PURE__*/(0, _react.forwardRef)(VirtualizedListInner);
|
|
18
|
+
VirtualizedList.displayName = 'VirtualizedList';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_flashList","_jsxRuntime","VirtualizedListInner","props","ref","jsx","FlashList","role","VirtualizedList","exports","forwardRef","displayName"],"sourceRoot":"../../../../src","sources":["components/VirtualizedList/index.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAAwF,IAAAE,WAAA,GAAAF,OAAA;AAKxF,SAASG,oBAAoBA,CAC3BC,KAA8B,EAC9BC,GAAkC,EAClC;EACA,oBAAO,IAAAH,WAAA,CAAAI,GAAA,EAACL,UAAA,CAAAM,SAAS;IAACF,GAAG,EAAEA,GAAI;IAACG,IAAI,EAAC,MAAM;IAAA,GAAKJ;EAAK,CAAG,CAAC;AACvD;AAEO,MAAMK,eAAe,GAAAC,OAAA,CAAAD,eAAA,gBAAG,IAAAE,iBAAU,EAACR,oBAAoB,CAEtC;AAEvBM,eAAe,CAA8BG,WAAW,GAAG,iBAAiB","ignoreList":[]}
|