@nori-ui/core 1.0.6 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2UXKXUX2.js +286 -0
- package/dist/chunk-2UXKXUX2.js.map +1 -0
- package/dist/{chunk-DDGMLLS3.js → chunk-46OT4PA6.js} +3 -3
- package/dist/{chunk-DDGMLLS3.js.map → chunk-46OT4PA6.js.map} +1 -1
- package/dist/{chunk-SFNDR6DI.js → chunk-5BM6H2CD.js} +3 -3
- package/dist/{chunk-SFNDR6DI.js.map → chunk-5BM6H2CD.js.map} +1 -1
- package/dist/{chunk-EWWQQ5DB.js → chunk-6JVUVBZH.js} +5 -5
- package/dist/{chunk-EWWQQ5DB.js.map → chunk-6JVUVBZH.js.map} +1 -1
- package/dist/{chunk-FT2XBBQJ.js → chunk-6PO2IWB3.js} +8 -5
- package/dist/chunk-6PO2IWB3.js.map +1 -0
- package/dist/{chunk-YNKKEO2A.js → chunk-7D2BHQ6M.js} +3 -3
- package/dist/{chunk-YNKKEO2A.js.map → chunk-7D2BHQ6M.js.map} +1 -1
- package/dist/{chunk-MRJWPRCX.js → chunk-AFQIK6JI.js} +3 -3
- package/dist/{chunk-MRJWPRCX.js.map → chunk-AFQIK6JI.js.map} +1 -1
- package/dist/{chunk-IKLA2CVQ.js → chunk-C6TRLHMW.js} +21 -5
- package/dist/chunk-C6TRLHMW.js.map +1 -0
- package/dist/{chunk-NRYWNOG5.js → chunk-CGQIVFCN.js} +3 -3
- package/dist/{chunk-NRYWNOG5.js.map → chunk-CGQIVFCN.js.map} +1 -1
- package/dist/chunk-EFK7726V.js +104 -0
- package/dist/chunk-EFK7726V.js.map +1 -0
- package/dist/{chunk-3BDDPFCI.js → chunk-FDBQOQMW.js} +3 -3
- package/dist/{chunk-3BDDPFCI.js.map → chunk-FDBQOQMW.js.map} +1 -1
- package/dist/{chunk-XALU6LOT.js → chunk-GELLSU64.js} +3 -3
- package/dist/{chunk-XALU6LOT.js.map → chunk-GELLSU64.js.map} +1 -1
- package/dist/{chunk-BZLT6R62.js → chunk-GRDVE3IR.js} +3 -3
- package/dist/{chunk-BZLT6R62.js.map → chunk-GRDVE3IR.js.map} +1 -1
- package/dist/{chunk-OMU4R4Y5.js → chunk-HTF6FDB6.js} +3 -3
- package/dist/{chunk-OMU4R4Y5.js.map → chunk-HTF6FDB6.js.map} +1 -1
- package/dist/{chunk-X7APG7G2.js → chunk-HZKXPN6B.js} +154 -34
- package/dist/chunk-HZKXPN6B.js.map +1 -0
- package/dist/{chunk-WGT345SV.js → chunk-IGLMPAWE.js} +3 -3
- package/dist/{chunk-WGT345SV.js.map → chunk-IGLMPAWE.js.map} +1 -1
- package/dist/{chunk-5XEGZFG5.js → chunk-LWQZ257T.js} +3 -3
- package/dist/{chunk-5XEGZFG5.js.map → chunk-LWQZ257T.js.map} +1 -1
- package/dist/{chunk-RFW5SRZA.js → chunk-MJ4AGXS7.js} +3 -3
- package/dist/{chunk-RFW5SRZA.js.map → chunk-MJ4AGXS7.js.map} +1 -1
- package/dist/{chunk-PNP7L4TA.js → chunk-RM5TSXVE.js} +3 -3
- package/dist/{chunk-PNP7L4TA.js.map → chunk-RM5TSXVE.js.map} +1 -1
- package/dist/{chunk-MKSDYRWQ.js → chunk-SINLREQV.js} +3 -3
- package/dist/{chunk-MKSDYRWQ.js.map → chunk-SINLREQV.js.map} +1 -1
- package/dist/{chunk-TLS54G6Y.js → chunk-UF5OENHV.js} +3 -3
- package/dist/{chunk-TLS54G6Y.js.map → chunk-UF5OENHV.js.map} +1 -1
- package/dist/{chunk-ZQMNGPLE.js → chunk-UJ5KFRDE.js} +18 -6
- package/dist/chunk-UJ5KFRDE.js.map +1 -0
- package/dist/{chunk-SWC5CNKE.js → chunk-UPVNZPFV.js} +3 -3
- package/dist/{chunk-SWC5CNKE.js.map → chunk-UPVNZPFV.js.map} +1 -1
- package/dist/{chunk-3F4TXKDY.js → chunk-UUXWRDWW.js} +3 -3
- package/dist/chunk-UUXWRDWW.js.map +1 -0
- package/dist/{chunk-7GPDNQSX.js → chunk-V2AWSDDZ.js} +5 -5
- package/dist/{chunk-7GPDNQSX.js.map → chunk-V2AWSDDZ.js.map} +1 -1
- package/dist/{chunk-JQQ3FBN7.js → chunk-VCJF75T2.js} +3 -3
- package/dist/{chunk-JQQ3FBN7.js.map → chunk-VCJF75T2.js.map} +1 -1
- package/dist/{chunk-ZBW3BA5R.js → chunk-VMAGFYHG.js} +39 -4
- package/dist/chunk-VMAGFYHG.js.map +1 -0
- package/dist/{chunk-JZ774T7U.js → chunk-W3HMOOON.js} +3 -3
- package/dist/{chunk-JZ774T7U.js.map → chunk-W3HMOOON.js.map} +1 -1
- package/dist/{chunk-6AD6KCVB.js → chunk-WAKKQROH.js} +3 -3
- package/dist/{chunk-6AD6KCVB.js.map → chunk-WAKKQROH.js.map} +1 -1
- package/dist/{chunk-LVWNMQGR.js → chunk-WDNDTSNX.js} +5 -5
- package/dist/{chunk-LVWNMQGR.js.map → chunk-WDNDTSNX.js.map} +1 -1
- package/dist/chunk-WOF67PKT.js +60 -0
- package/dist/chunk-WOF67PKT.js.map +1 -0
- package/dist/{chunk-QJNV7YQP.js → chunk-WTNDPO2V.js} +39 -4
- package/dist/chunk-WTNDPO2V.js.map +1 -0
- package/dist/{chunk-FEPTH5RV.js → chunk-XP55RZ3D.js} +3 -3
- package/dist/{chunk-FEPTH5RV.js.map → chunk-XP55RZ3D.js.map} +1 -1
- package/dist/{chunk-CCUXO2HN.js → chunk-Y4ZRSW35.js} +3 -3
- package/dist/{chunk-CCUXO2HN.js.map → chunk-Y4ZRSW35.js.map} +1 -1
- package/dist/client.cjs +619 -123
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +40 -38
- package/dist/client.js.map +1 -1
- package/dist/components/Accordion/index.js +2 -2
- package/dist/components/Alert/index.js +2 -2
- package/dist/components/AlertDialog/index.js +2 -2
- package/dist/components/Avatar/index.js +2 -2
- package/dist/components/Badge/index.js +2 -2
- package/dist/components/Box/index.js +4 -4
- package/dist/components/Breadcrumb/index.cjs +6 -3
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.js +5 -5
- package/dist/components/Button/index.js +2 -2
- package/dist/components/Calendar/index.cjs +170 -35
- package/dist/components/Calendar/index.cjs.map +1 -1
- package/dist/components/Calendar/index.js +5 -5
- package/dist/components/Card/index.js +2 -2
- package/dist/components/Checkbox/index.cjs +36 -1
- package/dist/components/Checkbox/index.cjs.map +1 -1
- package/dist/components/Checkbox/index.d.cts +17 -1
- package/dist/components/Checkbox/index.d.ts +17 -1
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/Dialog/index.js +2 -2
- package/dist/components/Field/index.cjs +703 -0
- package/dist/components/Field/index.cjs.map +1 -0
- package/dist/components/Field/index.d.cts +51 -0
- package/dist/components/Field/index.d.ts +51 -0
- package/dist/components/Field/index.js +9 -0
- package/dist/components/Field/index.js.map +1 -0
- package/dist/components/FloatButton/index.cjs +6 -3
- package/dist/components/FloatButton/index.cjs.map +1 -1
- package/dist/components/FloatButton/index.js +5 -5
- package/dist/components/HStack/index.js +4 -4
- package/dist/components/InputGroup/index.cjs.map +1 -1
- package/dist/components/InputGroup/index.d.cts +8 -1
- package/dist/components/InputGroup/index.d.ts +8 -1
- package/dist/components/InputGroup/index.js +2 -2
- package/dist/components/Label/index.cjs +458 -0
- package/dist/components/Label/index.cjs.map +1 -0
- package/dist/components/Label/index.d.cts +14 -0
- package/dist/components/Label/index.d.ts +14 -0
- package/dist/components/Label/index.js +8 -0
- package/dist/components/Label/index.js.map +1 -0
- package/dist/components/Pagination/index.cjs +21 -6
- package/dist/components/Pagination/index.cjs.map +1 -1
- package/dist/components/Pagination/index.js +5 -5
- package/dist/components/Popover/index.js +2 -2
- package/dist/components/Progress/index.js +2 -2
- package/dist/components/Radio/index.cjs +18 -2
- package/dist/components/Radio/index.cjs.map +1 -1
- package/dist/components/Radio/index.d.cts +17 -1
- package/dist/components/Radio/index.d.ts +17 -1
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/SegmentedControl/index.js +2 -2
- package/dist/components/Select/index.cjs +15 -3
- package/dist/components/Select/index.cjs.map +1 -1
- package/dist/components/Select/index.d.cts +6 -0
- package/dist/components/Select/index.d.ts +6 -0
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Switch/index.cjs +36 -1
- package/dist/components/Switch/index.cjs.map +1 -1
- package/dist/components/Switch/index.d.cts +17 -1
- package/dist/components/Switch/index.d.ts +17 -1
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Text/index.js +2 -2
- package/dist/components/TextArea/index.cjs +35 -84
- package/dist/components/TextArea/index.cjs.map +1 -1
- package/dist/components/TextArea/index.js +3 -3
- package/dist/components/TextInput/index.cjs +35 -84
- package/dist/components/TextInput/index.cjs.map +1 -1
- package/dist/components/TextInput/index.d.cts +7 -8
- package/dist/components/TextInput/index.d.ts +7 -8
- package/dist/components/TextInput/index.js +2 -2
- package/dist/components/Toggle/index.js +2 -2
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/VStack/index.js +4 -4
- package/dist/i18n/index.cjs +6 -3
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/index.cjs +619 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +37 -35
- package/package.json +8 -1
- package/dist/chunk-3F4TXKDY.js.map +0 -1
- package/dist/chunk-FT2XBBQJ.js.map +0 -1
- package/dist/chunk-IKLA2CVQ.js.map +0 -1
- package/dist/chunk-QJNV7YQP.js.map +0 -1
- package/dist/chunk-X7APG7G2.js.map +0 -1
- package/dist/chunk-ZBW3BA5R.js.map +0 -1
- package/dist/chunk-ZQMNGPLE.js.map +0 -1
- package/dist/chunk-ZRD4FQBT.js +0 -153
- package/dist/chunk-ZRD4FQBT.js.map +0 -1
|
@@ -80,7 +80,13 @@ type SelectBaseProps<T = unknown> = {
|
|
|
80
80
|
maxMenuHeight?: number;
|
|
81
81
|
className?: string;
|
|
82
82
|
testID?: string;
|
|
83
|
+
id?: string;
|
|
84
|
+
name?: string;
|
|
83
85
|
'aria-label'?: string;
|
|
86
|
+
'aria-labelledby'?: string;
|
|
87
|
+
'aria-describedby'?: string;
|
|
88
|
+
'aria-invalid'?: boolean;
|
|
89
|
+
'aria-required'?: boolean;
|
|
84
90
|
};
|
|
85
91
|
type SelectSingleProps<T = unknown> = SelectBaseProps<T> & {
|
|
86
92
|
/** Single-select mode (default — omit or pass `false`). */
|
|
@@ -80,7 +80,13 @@ type SelectBaseProps<T = unknown> = {
|
|
|
80
80
|
maxMenuHeight?: number;
|
|
81
81
|
className?: string;
|
|
82
82
|
testID?: string;
|
|
83
|
+
id?: string;
|
|
84
|
+
name?: string;
|
|
83
85
|
'aria-label'?: string;
|
|
86
|
+
'aria-labelledby'?: string;
|
|
87
|
+
'aria-describedby'?: string;
|
|
88
|
+
'aria-invalid'?: boolean;
|
|
89
|
+
'aria-required'?: boolean;
|
|
84
90
|
};
|
|
85
91
|
type SelectSingleProps<T = unknown> = SelectBaseProps<T> & {
|
|
86
92
|
/** Single-select mode (default — omit or pass `false`). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { Select } from '../../chunk-
|
|
1
|
+
export { Select } from '../../chunk-UJ5KFRDE.js';
|
|
2
2
|
import '../../chunk-7Z4NMNX6.js';
|
|
3
|
-
import '../../chunk-5A2QOOVN.js';
|
|
4
3
|
import '../../chunk-CHXHRJNZ.js';
|
|
4
|
+
import '../../chunk-5A2QOOVN.js';
|
|
5
5
|
import '../../chunk-R5JMDDCB.js';
|
|
6
6
|
import '../../chunk-WCQVDF3K.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -513,7 +513,15 @@ var Switch = /* @__PURE__ */ __name(({
|
|
|
513
513
|
className,
|
|
514
514
|
testID,
|
|
515
515
|
asChild,
|
|
516
|
-
children
|
|
516
|
+
children,
|
|
517
|
+
id,
|
|
518
|
+
name,
|
|
519
|
+
"aria-labelledby": ariaLabelledBy,
|
|
520
|
+
accessibilityLabelledBy,
|
|
521
|
+
"aria-describedby": ariaDescribedBy,
|
|
522
|
+
accessibilityDescribedBy,
|
|
523
|
+
"aria-invalid": ariaInvalid,
|
|
524
|
+
"aria-required": ariaRequired
|
|
517
525
|
}) => {
|
|
518
526
|
const colors = useThemeColors();
|
|
519
527
|
const [inner, setInner] = react.useState(defaultChecked);
|
|
@@ -538,6 +546,13 @@ var Switch = /* @__PURE__ */ __name(({
|
|
|
538
546
|
accessibilityState: { checked: value, disabled: Boolean(disabled) },
|
|
539
547
|
testID
|
|
540
548
|
};
|
|
549
|
+
if (id !== void 0) {
|
|
550
|
+
commonProps.id = id;
|
|
551
|
+
commonProps.nativeID = id;
|
|
552
|
+
}
|
|
553
|
+
if (name !== void 0) {
|
|
554
|
+
commonProps.name = name;
|
|
555
|
+
}
|
|
541
556
|
if (disabled) {
|
|
542
557
|
commonProps["aria-disabled"] = true;
|
|
543
558
|
}
|
|
@@ -545,6 +560,26 @@ var Switch = /* @__PURE__ */ __name(({
|
|
|
545
560
|
commonProps["aria-label"] = label;
|
|
546
561
|
commonProps.accessibilityLabel = label;
|
|
547
562
|
}
|
|
563
|
+
if (ariaLabelledBy !== void 0) {
|
|
564
|
+
commonProps["aria-labelledby"] = ariaLabelledBy;
|
|
565
|
+
commonProps.accessibilityLabelledBy = ariaLabelledBy;
|
|
566
|
+
}
|
|
567
|
+
if (accessibilityLabelledBy !== void 0) {
|
|
568
|
+
commonProps.accessibilityLabelledBy = accessibilityLabelledBy;
|
|
569
|
+
}
|
|
570
|
+
if (ariaDescribedBy !== void 0) {
|
|
571
|
+
commonProps["aria-describedby"] = ariaDescribedBy;
|
|
572
|
+
commonProps.accessibilityDescribedBy = ariaDescribedBy;
|
|
573
|
+
}
|
|
574
|
+
if (accessibilityDescribedBy !== void 0) {
|
|
575
|
+
commonProps.accessibilityDescribedBy = accessibilityDescribedBy;
|
|
576
|
+
}
|
|
577
|
+
if (ariaInvalid) {
|
|
578
|
+
commonProps["aria-invalid"] = true;
|
|
579
|
+
}
|
|
580
|
+
if (ariaRequired) {
|
|
581
|
+
commonProps["aria-required"] = true;
|
|
582
|
+
}
|
|
548
583
|
if (asChild) {
|
|
549
584
|
const slotProps = {
|
|
550
585
|
role: "switch",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/animation/animated-view.ts","../../../src/animation/use-animated-number.ts","../../../src/slot/compose-refs.ts","../../../src/slot/slot.tsx","../../../src/theme/px.ts","../../../../tokens/build/theme.ts","../../../src/theme/context.tsx","../../../src/theme/use-color-scheme.tsx","../../../src/theme/use-theme-colors.ts","../../../src/utils/cn.ts","../../../src/components/Switch/Switch.tsx"],"names":["Animated","Platform","Easing","useSharedValue","useEffect","withTiming","useAnimatedStyle","forwardRef","Slot","isValidElement","Children","cloneElement","createContext","useContext","useState","Appearance","useCallback","jsx","jsxs","Pressable","View","RNText"],"mappings":";;;;;;;;;;;;;AAOO,IAAM,eAAeA,yBAAA,CAAS,IAAA;ACcrC,IAAM,MAAA,GAASC,qBAAS,EAAA,KAAO,KAAA;AAExB,SAAS,iBAAA,CACZ,QAAA,EACA,MAAA,EACA,OAAA,GAAiC,EAAC,EAC5B;AACN,EAAA,MAAM,EAAE,QAAA,GAAW,GAAA,EAAI,GAAI,OAAA;AAC3B,EAAA,IAAI,MAAA,EAAQ;AACR,IAAA,OAAO,QAAA,CAAS,QAAA,EAAU,MAAA,EAAQ,QAAQ,CAAA;AAAA,EAC9C;AAEA,EAAA,OAAO,mBAAA,CAAoB,QAAA,EAAU,MAAA,EAAQ,QAAQ,CAAA;AACzD;AAXgB,MAAA,CAAA,iBAAA,EAAA,mBAAA,CAAA;AAahB,SAAS,QAAA,CAAS,QAAA,EAA4B,MAAA,EAAgB,QAA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H;AAAA;AAAA;AAAA,GACL;AAER,CAAA,EAjJsB,QAAA","file":"index.cjs","sourcesContent":["'use client';\n\n// Native build: reanimated's `Animated.View` consumes the worklet\n// styles produced by `useAnimatedStyle`. A regular `View` would\n// render the shared values' default frame and never animate.\nimport Animated from 'react-native-reanimated';\n\nexport const AnimatedView = Animated.View;\n","'use client';\n\n// Native build (Metro picks this `.ts` over the `.web.ts` sibling\n// when present — for monorepo workspaces and any consumer that pre-\n// orders `.native.ts` / `.ts` / `.web.ts` resolution properly). Web\n// consumers (Next.js etc.) that don't honor the extension split\n// should alias `react-native-reanimated` to a noop in their bundler\n// config — the IS_WEB early-return below means we never call\n// reanimated APIs on web, so a stub satisfies the import.\n\nimport { useEffect } from 'react';\nimport { Platform } from 'react-native';\nimport { Easing, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nexport type AnimatedProperty = 'left' | 'top' | 'right' | 'bottom' | 'translateX' | 'translateY' | 'opacity' | 'height';\n\nexport type AnimatedNumberOptions = {\n /** Animation duration in ms. @defaultValue 180 */\n duration?: number;\n};\n\nconst IS_WEB = Platform.OS === 'web';\n\nexport function useAnimatedNumber(\n property: AnimatedProperty,\n target: number,\n options: AnimatedNumberOptions = {}\n): object {\n const { duration = 180 } = options;\n if (IS_WEB) {\n return webStyle(property, target, duration);\n }\n // biome-ignore lint/correctness/useHookAtTopLevel: IS_WEB is module-init constant; same path every render\n return useReanimatedTiming(property, target, duration);\n}\n\nfunction webStyle(property: AnimatedProperty, target: number, duration: number): object {\n if (property === 'translateX' || property === 'translateY') {\n return {\n transform: [{ [property]: target }],\n transitionProperty: 'transform',\n transitionDuration: `${duration}ms`,\n transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n };\n }\n return {\n [property]: target,\n transitionProperty: property,\n transitionDuration: `${duration}ms`,\n transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n };\n}\n\n// `opacity` and `height` aren't transforms or position props but follow\n// the exact same animated-shared-value pattern. Adding them here keeps\n// the cross-platform API consistent — Accordion content fades + slides\n// open with the same easing as a Switch thumb.\n\n// Reanimated worklets can't reliably serialize closures over computed\n// keys (`{ [property]: value }`). Static-key paths per property work\n// fine. Six tiny worklets — one per AnimatedProperty — give the plugin\n// the static AST it expects without losing the cross-platform API.\n// The bezier curve mirrors the web CSS transition exactly so a Switch\n// thumb feels identical on both platforms.\nfunction useReanimatedTiming(property: AnimatedProperty, target: number, duration: number): object {\n const easing = Easing.bezier(0.16, 1, 0.3, 1);\n // biome-ignore lint/correctness/useHookAtTopLevel: dispatcher branch is module-init constant; this function only runs when IS_WEB is false\n const shared = useSharedValue(target);\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n useEffect(() => {\n shared.value = withTiming(target, { duration, easing });\n }, [target, shared, duration, easing]);\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const translateXStyle = useAnimatedStyle(() => ({\n transform: [{ translateX: shared.value }],\n }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const translateYStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: shared.value }],\n }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const leftStyle = useAnimatedStyle(() => ({ left: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const topStyle = useAnimatedStyle(() => ({ top: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const rightStyle = useAnimatedStyle(() => ({ right: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const bottomStyle = useAnimatedStyle(() => ({ bottom: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const opacityStyle = useAnimatedStyle(() => ({ opacity: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const heightStyle = useAnimatedStyle(() => ({ height: shared.value }));\n if (property === 'translateX') {\n return translateXStyle;\n }\n if (property === 'translateY') {\n return translateYStyle;\n }\n if (property === 'left') {\n return leftStyle;\n }\n if (property === 'top') {\n return topStyle;\n }\n if (property === 'right') {\n return rightStyle;\n }\n if (property === 'bottom') {\n return bottomStyle;\n }\n if (property === 'opacity') {\n return opacityStyle;\n }\n return heightStyle;\n}\n","// composeRefs — merges multiple React refs (callback or object) into a single callback.\n// Derived from Radix UI's approach; reimplemented here so we don't take a Radix dependency.\n\nimport type { MutableRefObject, Ref, RefCallback } from 'react';\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\nexport function composeRefs<T>(...refs: Array<PossibleRef<T>>): RefCallback<T> {\n return (node: T | null) => {\n for (const ref of refs) {\n if (ref == null) {\n continue;\n }\n if (typeof ref === 'function') {\n ref(node);\n } else {\n // React's MutableRefObject typing — we assign .current directly.\n (ref as MutableRefObject<T | null>).current = node;\n }\n }\n };\n}\n","import type { CSSProperties, ReactElement, Ref } from 'react';\nimport { Children, cloneElement, forwardRef, isValidElement } from 'react';\nimport { composeRefs } from './compose-refs';\n\ntype AnyProps = Record<string, unknown>;\n\nexport type SlotProps = {\n children?: React.ReactNode;\n} & AnyProps;\n\nexport const Slot = forwardRef<unknown, SlotProps>(function Slot(props, forwardedRef) {\n const { children, ...slotProps } = props;\n\n if (!isValidElement(children)) {\n return null;\n }\n\n // Assert that children is a single React element with props — we've narrowed above.\n const child = Children.only(children) as ReactElement<AnyProps> & { ref?: Ref<unknown> };\n const merged = mergeProps(slotProps, child.props);\n\n // Merge refs: Slot's forwarded ref + the child's own ref (if any).\n const childRef = (child as unknown as { ref?: Ref<unknown> }).ref;\n if (forwardedRef || childRef) {\n (merged as AnyProps).ref = composeRefs(forwardedRef, childRef);\n }\n\n return cloneElement(child, merged);\n});\nSlot.displayName = 'Slot';\n\nfunction mergeProps(outer: AnyProps, inner: AnyProps): AnyProps {\n // Inner (child) wins for everything except: className (concatenated), style (merged), and\n // event handlers (composed — outer runs first, then inner).\n const merged: AnyProps = { ...outer };\n\n for (const key of Object.keys(inner)) {\n const outerValue = outer[key];\n const innerValue = inner[key];\n\n if (key === 'className' || key === 'class') {\n merged[key] = joinClass(outerValue, innerValue);\n continue;\n }\n\n if (key === 'style') {\n merged[key] = {\n ...(outerValue as CSSProperties | undefined),\n ...(innerValue as CSSProperties | undefined),\n };\n continue;\n }\n\n if (isEventHandler(key, outerValue, innerValue)) {\n merged[key] = composeHandlers(outerValue as Fn, innerValue as Fn);\n continue;\n }\n\n merged[key] = innerValue;\n }\n\n return merged;\n}\n\nfunction joinClass(outer: unknown, inner: unknown): string | undefined {\n const a = typeof outer === 'string' ? outer : '';\n const b = typeof inner === 'string' ? inner : '';\n const joined = [a, b].filter(Boolean).join(' ');\n return joined.length > 0 ? joined : undefined;\n}\n\ntype Fn = (...args: unknown[]) => unknown;\n\nfunction isEventHandler(key: string, outer: unknown, inner: unknown): boolean {\n if (!key.startsWith('on') || key.length < 3) {\n return false;\n }\n if (key[2] !== key[2]?.toUpperCase()) {\n return false;\n }\n return typeof outer === 'function' && typeof inner === 'function';\n}\n\nfunction composeHandlers(outer: Fn, inner: Fn): Fn {\n return (...args: unknown[]) => {\n outer(...args);\n inner(...args);\n };\n}\n","/**\n * Strip the `px` suffix from a CSS-flavored token value and return a\n * number, the form React Native style props expect for properties like\n * `borderRadius`, `paddingHorizontal`, `fontSize`, etc.\n *\n * The tokens package emits all dimensional tokens as `${number}px`\n * strings (it's the lingua franca for both CSS and Style Dictionary\n * consumers); inside RN we need the unitless number. RN-Web tolerates\n * both, but native is strict.\n *\n * Falls through unchanged for tokens that already came in as numbers\n * (forward-compat).\n *\n * Examples:\n * px('6px') → 6\n * px('1.5px') → 1.5\n * px(6) → 6\n * px('foo') → 0 (defensive — bad input shouldn't crash render)\n */\nexport function px(value: string | number): number {\n if (typeof value === 'number') {\n return value;\n }\n const n = Number.parseFloat(value);\n return Number.isFinite(n) ? n : 0;\n}\n","// GENERATED by @nori-ui/tokens — DO NOT EDIT.\n// Run `yarn build:tokens` to regenerate.\n\n// Generated for light mode.\n// Do not edit — run `yarn build:tokens`.\n\nexport const theme = {\n color: {\n danger: \"#ef4444\",\n info: \"#3b82f6\",\n neutral: {\n \"100\": \"#f4f4f5\",\n \"200\": \"#e4e4e7\",\n \"300\": \"#d4d4d8\",\n \"400\": \"#a1a1aa\",\n \"50\": \"#fafafa\",\n \"500\": \"#71717a\",\n \"600\": \"#52525b\",\n \"700\": \"#3f3f46\",\n \"800\": \"#27272a\",\n \"900\": \"#18181b\",\n },\n primary: {\n \"100\": \"#ccfbf1\",\n \"200\": \"#99f6e4\",\n \"300\": \"#5eead4\",\n \"400\": \"#2dd4bf\",\n \"50\": \"#f0fdfa\",\n \"500\": \"#14b8a6\",\n \"600\": \"#0d9488\",\n \"700\": \"#0f766e\",\n \"800\": \"#115e59\",\n \"900\": \"#134e4a\",\n },\n success: \"#22c55e\",\n warning: \"#f59e0b\",\n },\n fontFamily: {\n body: \"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\",\n display: \"ui-serif, Georgia, 'Times New Roman', serif\",\n mono: \"ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace\",\n },\n fontSize: {\n \"2xl\": \"24px\",\n \"3xl\": \"30px\",\n \"4xl\": \"36px\",\n lg: \"18px\",\n md: \"16px\",\n sm: \"14px\",\n xl: \"20px\",\n xs: \"12px\",\n },\n fontWeight: {\n bold: \"700\",\n medium: \"500\",\n regular: \"400\",\n semibold: \"600\",\n },\n lineHeight: {\n normal: \"1.4\",\n relaxed: \"1.6\",\n tight: \"1.2\",\n },\n radius: {\n \"2xl\": \"16px\",\n full: \"9999px\",\n lg: \"8px\",\n md: \"6px\",\n none: \"0px\",\n sm: \"4px\",\n xl: \"12px\",\n },\n semantic: {\n background: {\n default: \"#fafafa\",\n elevated: \"#ffffff\",\n subtle: \"#f4f4f5\",\n },\n border: {\n default: \"#e4e4e7\",\n strong: \"#d4d4d8\",\n },\n interactive: {\n destructive: \"#ef4444\",\n primary: \"#0d9488\",\n primaryHover: \"#0f766e\",\n primaryPressed: \"#115e59\",\n },\n text: {\n default: \"#18181b\",\n inverted: \"#fafafa\",\n muted: \"#52525b\",\n },\n },\n shadow: {\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n },\n spacing: {\n \"0\": \"0px\",\n \"1\": \"4px\",\n \"10\": \"40px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n \"2\": \"8px\",\n \"20\": \"80px\",\n \"24\": \"96px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"5\": \"20px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n },\n} as const;\n\nexport type Theme = typeof theme;\n\n\n// Dark mode overrides\n// Generated for dark mode.\n// Do not edit — run `yarn build:tokens`.\n\nexport const themeDark = {\n color: {\n danger: \"#ef4444\",\n info: \"#3b82f6\",\n neutral: {\n \"100\": \"#f4f4f5\",\n \"200\": \"#e4e4e7\",\n \"300\": \"#d4d4d8\",\n \"400\": \"#a1a1aa\",\n \"50\": \"#fafafa\",\n \"500\": \"#71717a\",\n \"600\": \"#52525b\",\n \"700\": \"#3f3f46\",\n \"800\": \"#27272a\",\n \"900\": \"#18181b\",\n },\n primary: {\n \"100\": \"#ccfbf1\",\n \"200\": \"#99f6e4\",\n \"300\": \"#5eead4\",\n \"400\": \"#2dd4bf\",\n \"50\": \"#f0fdfa\",\n \"500\": \"#14b8a6\",\n \"600\": \"#0d9488\",\n \"700\": \"#0f766e\",\n \"800\": \"#115e59\",\n \"900\": \"#134e4a\",\n },\n success: \"#22c55e\",\n warning: \"#f59e0b\",\n },\n fontFamily: {\n body: \"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\",\n display: \"ui-serif, Georgia, 'Times New Roman', serif\",\n mono: \"ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace\",\n },\n fontSize: {\n \"2xl\": \"24px\",\n \"3xl\": \"30px\",\n \"4xl\": \"36px\",\n lg: \"18px\",\n md: \"16px\",\n sm: \"14px\",\n xl: \"20px\",\n xs: \"12px\",\n },\n fontWeight: {\n bold: \"700\",\n medium: \"500\",\n regular: \"400\",\n semibold: \"600\",\n },\n lineHeight: {\n normal: \"1.4\",\n relaxed: \"1.6\",\n tight: \"1.2\",\n },\n radius: {\n \"2xl\": \"16px\",\n full: \"9999px\",\n lg: \"8px\",\n md: \"6px\",\n none: \"0px\",\n sm: \"4px\",\n xl: \"12px\",\n },\n semantic: {\n background: {\n default: \"#18181b\",\n elevated: \"#3f3f46\",\n subtle: \"#27272a\",\n },\n border: {\n default: \"#3f3f46\",\n strong: \"#52525b\",\n },\n interactive: {\n destructive: \"#ef4444\",\n primary: \"#2dd4bf\",\n primaryHover: \"#5eead4\",\n primaryPressed: \"#99f6e4\",\n },\n text: {\n default: \"#fafafa\",\n inverted: \"#18181b\",\n muted: \"#a1a1aa\",\n },\n },\n shadow: {\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n },\n spacing: {\n \"0\": \"0px\",\n \"1\": \"4px\",\n \"10\": \"40px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n \"2\": \"8px\",\n \"20\": \"80px\",\n \"24\": \"96px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"5\": \"20px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n },\n} as const;\n\n","'use client';\n\nimport { themeDark as defaultDark, theme as defaultLight, type Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { createContext } from 'react';\n\n/**\n * A `NoriTheme` is a paired light/dark palette. The active half is picked\n * by `useColorScheme()` so the same theme object covers both schemes.\n *\n * Build one yourself by spreading the defaults and overriding the colors\n * you care about, or pick a preset from `@nori-ui/core/themes` (see the\n * Theming docs for examples).\n */\nexport type NoriTheme = {\n light: Theme;\n dark: Theme;\n};\n\n/**\n * Default Nori palette — teal primary on a warm-paper light surface, and\n * teal-400 primary on a deep-zinc dark surface. Mirrors the `theme` /\n * `themeDark` exports from @nori-ui/tokens.\n */\nexport const defaultTheme: NoriTheme = {\n light: defaultLight,\n dark: defaultDark as unknown as Theme,\n};\n\n// Context value is the FULL pair, not the active half. `useThemeColors`\n// (the hook components reach for) resolves it to the right one based on\n// the current color scheme. Storing the pair means a parent only has to\n// declare the theme once — switching scheme is a separate concern.\nexport const ThemeContext = createContext<NoriTheme>(defaultTheme);\nThemeContext.displayName = 'ThemeContext';\n\nexport type ThemeProviderProps = {\n /**\n * The theme to apply to descendants. Pass either:\n * - a full `NoriTheme` (`{ light, dark }`) — both schemes covered\n * - a single `Theme` — used for both light and dark (rare; mostly\n * useful when you ONLY ever render in one scheme)\n * - omit — falls back to the Nori default (teal palette)\n */\n theme?: NoriTheme | Theme;\n children?: ReactNode;\n};\n\nconst isFullTheme = (t: NoriTheme | Theme): t is NoriTheme => 'light' in t && 'dark' in t;\n\nexport function ThemeProvider({ theme, children }: ThemeProviderProps) {\n const value: NoriTheme =\n theme === undefined ? defaultTheme : isFullTheme(theme) ? theme : { light: theme, dark: theme };\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n","'use client';\n\nimport { createContext, type ReactNode, useContext, useEffect, useState } from 'react';\nimport { Appearance, Platform } from 'react-native';\n\nexport type ColorScheme = 'light' | 'dark';\n\n// Override channel so a parent can force a scheme (e.g. an app shell with\n// hard-coded dark chrome that wants nested components to render against\n// the dark token half regardless of the OS Appearance). `null` means\n// \"no override — use the system signal\".\nconst ColorSchemeOverrideContext = createContext<ColorScheme | null>(null);\nColorSchemeOverrideContext.displayName = 'ColorSchemeOverrideContext';\n\nexport type ColorSchemeProviderProps = {\n /** Force a specific scheme for descendants. */\n value: ColorScheme;\n children?: ReactNode;\n};\n\n/**\n * Forces a color scheme for all descendants. Useful when a screen's chrome\n * is hard-coded to one scheme (e.g. a forced-dark editorial surface) and\n * you want library components inside it to follow that, not the OS.\n */\nexport function ColorSchemeProvider({ value, children }: ColorSchemeProviderProps) {\n return <ColorSchemeOverrideContext.Provider value={value}>{children}</ColorSchemeOverrideContext.Provider>;\n}\n\nconst isWeb = Platform.OS === 'web';\n\n// Web: a document is \"in dark mode\" when the root <html> element carries\n// the `dark` class (Tailwind / Fumadocs convention) OR a `data-theme=\"dark\"`\n// attribute (matches the `darkMode` selectors in our Tailwind preset).\n// We deliberately don't fall back to `prefers-color-scheme` — the app\n// usually owns that decision and writes it onto <html>; tracking the system\n// preference too would fight the app's chosen value.\nfunction readWebScheme(): ColorScheme {\n if (typeof document === 'undefined') {\n return 'light';\n }\n const root = document.documentElement;\n if (root.classList.contains('dark')) {\n return 'dark';\n }\n if (root.getAttribute('data-theme') === 'dark') {\n return 'dark';\n }\n return 'light';\n}\n\n/**\n * Returns the current color scheme — `'light'` or `'dark'`.\n *\n * On web: observes the root `<html>` element's `class=\"dark\"` and\n * `data-theme=\"dark\"` attribute (the same signals our Tailwind preset\n * keys on). Updates live as those flip.\n *\n * On native: delegates to `react-native`'s `Appearance` API so the hook\n * tracks the OS preference without extra wiring.\n *\n * Components consume this indirectly via `useThemeColors()`; reach for\n * this directly when you need the raw scheme (e.g. to swap an icon).\n */\nexport function useColorScheme(): ColorScheme {\n // A `<ColorSchemeProvider value=\"dark\">` ancestor (or NoriProvider's\n // `colorScheme` prop, which mounts one) wins over the OS signal — the\n // app shell knows which scheme its chrome is locked to.\n const override = useContext(ColorSchemeOverrideContext);\n\n const [scheme, setScheme] = useState<ColorScheme>(() => {\n if (isWeb) {\n return readWebScheme();\n }\n return (Appearance.getColorScheme() ?? 'light') as ColorScheme;\n });\n\n useEffect(() => {\n if (isWeb) {\n const root = document.documentElement;\n const update = () => setScheme(readWebScheme());\n const observer = new MutationObserver(update);\n observer.observe(root, { attributes: true, attributeFilter: ['class', 'data-theme'] });\n // Sync once after mount in case SSR shipped a different value.\n update();\n return () => observer.disconnect();\n }\n\n const sub = Appearance.addChangeListener(({ colorScheme }) => {\n setScheme((colorScheme ?? 'light') as ColorScheme);\n });\n return () => sub.remove();\n }, []);\n\n return override ?? scheme;\n}\n","'use client';\n\nimport type { Theme } from '@nori-ui/tokens';\nimport { useContext } from 'react';\nimport { ThemeContext } from './context';\nimport { useColorScheme } from './use-color-scheme';\n\n/**\n * Returns the active token palette — `theme.light` in light mode,\n * `theme.dark` in dark mode. Resolves the theme via `ThemeContext` so\n * any ancestor `<ThemeProvider theme={...}>` flows through. With no\n * provider in the tree, the default Nori palette (teal) is used.\n *\n * Use this **inside a component** when you need a hex value for a React\n * Native `style` prop (`backgroundColor`, `borderColor`, etc.).\n *\n * Note: className-based styles (e.g. `bg-semantic-interactive-primary`)\n * compile against the @nori-ui/tokens palette at build time and don't\n * follow `<ThemeProvider>` overrides today. Inline styles via this hook\n * always do — and inline beats class on CSS specificity, so the visible\n * color you see is whatever the hook resolves to. CSS-variable theming\n * for the className path is a planned follow-up.\n */\nexport function useThemeColors(): Theme {\n const scheme = useColorScheme();\n const themePair = useContext(ThemeContext);\n return scheme === 'dark' ? themePair.dark : themePair.light;\n}\n","// cn — class-name merger. clsx-compatible shape.\n//\n// Intentionally does NOT deduplicate Tailwind conflicts (e.g. \"text-sm text-lg\").\n// That's `tailwind-merge`'s job; we defer adding it until a component actually\n// needs it, to keep the core tree-shakable and the runtime zero-dep.\n\nexport type ClassInput =\n | string\n | number\n | boolean\n | null\n | undefined\n | ClassInput[]\n | Record<string, boolean | number | null | undefined>;\n\nexport function cn(...inputs: ClassInput[]): string {\n const out: string[] = [];\n for (const input of inputs) {\n append(out, input);\n }\n return out.join(' ');\n}\n\nfunction append(out: string[], input: ClassInput): void {\n if (!input) {\n return;\n }\n if (typeof input === 'string') {\n if (input.length > 0) {\n out.push(input);\n }\n return;\n }\n if (typeof input === 'number') {\n return; // numbers are never class names\n }\n if (Array.isArray(input)) {\n for (const inner of input) {\n append(out, inner);\n }\n return;\n }\n if (typeof input === 'object') {\n for (const key of Object.keys(input)) {\n if (input[key]) {\n out.push(key);\n }\n }\n }\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { useCallback, useState } from 'react';\nimport type { ViewStyle } from 'react-native';\nimport { Pressable, Text as RNText, View } from 'react-native';\nimport { AnimatedView } from '../../animation/animated-view';\nimport { useAnimatedNumber } from '../../animation/use-animated-number';\nimport { Slot } from '../../slot';\nimport { px } from '../../theme/px';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\n\nexport type SwitchProps = {\n checked?: boolean;\n defaultChecked?: boolean;\n disabled?: boolean;\n onChange?: (next: boolean) => void;\n label?: string;\n className?: string;\n testID?: string;\n asChild?: boolean;\n children?: ReactNode;\n};\n\n// Layout-only base; row gap is theme-driven inside the component.\nconst ROW_LAYOUT_BASE: ViewStyle = { flexDirection: 'row', alignItems: 'center' };\n// Switch track + thumb are tightly coupled — width 40, height 24, thumb\n// 20×20, travel 18px. Component-density literals — not from theme.\nconst TRACK_BASE: ViewStyle = {\n width: 40,\n height: 24,\n borderRadius: 12,\n // Relative so the absolutely-positioned thumb anchors against the\n // track (not the page). The thumb's `left` value transitions between\n // 2 (off) and 18 (on) — see thumb style below.\n position: 'relative',\n};\nconst THUMB_BASE_STYLE: ViewStyle = {\n width: 20,\n height: 20,\n borderRadius: 10,\n // Web: boxShadow (the modern CSS-style replacement for the legacy RN\n // `shadow*` props that react-native-web has deprecated).\n // Native: elevation (Android) — RN ignores boxShadow there.\n ...({ boxShadow: '0 1px 2px rgba(0, 0, 0, 0.15)' } as ViewStyle),\n elevation: 2,\n};\n\n/**\n * Switch — a toggle control with role=\"switch\". Supports controlled + uncontrolled,\n * disabled state, asChild (via Slot), and a visible label that doubles as the\n * accessibility label.\n */\nexport const Switch = ({\n checked,\n defaultChecked = false,\n disabled,\n onChange,\n label,\n className,\n testID,\n asChild,\n children,\n}: SwitchProps) => {\n const colors = useThemeColors();\n const [inner, setInner] = useState<boolean>(defaultChecked);\n const isControlled = checked !== undefined;\n const value = isControlled ? Boolean(checked) : inner;\n // Pulled up here (above the asChild early-return) so the hook is\n // called on every render path, not conditionally. The slide isn't\n // used in the asChild branch, but the wasted work is tiny.\n const slide = useAnimatedNumber('left', value ? 18 : 2);\n\n const toggle = useCallback(() => {\n if (disabled) {\n return;\n }\n const next = !value;\n if (!isControlled) {\n setInner(next);\n }\n onChange?.(next);\n }, [disabled, value, isControlled, onChange]);\n\n const ariaChecked: 'true' | 'false' = value ? 'true' : 'false';\n\n const commonProps: Record<string, unknown> = {\n role: 'switch',\n 'aria-checked': ariaChecked,\n accessibilityRole: 'switch' as const,\n accessibilityState: { checked: value, disabled: Boolean(disabled) },\n testID,\n };\n if (disabled) {\n commonProps['aria-disabled'] = true;\n }\n if (label !== undefined) {\n commonProps['aria-label'] = label;\n commonProps.accessibilityLabel = label;\n }\n\n if (asChild) {\n const slotProps: Record<string, unknown> = {\n role: 'switch',\n 'aria-checked': ariaChecked,\n onClick: toggle,\n };\n if (disabled) {\n slotProps['aria-disabled'] = true;\n }\n if (label !== undefined) {\n slotProps['aria-label'] = label;\n }\n if (testID !== undefined) {\n slotProps['data-testid'] = testID;\n }\n if (className !== undefined) {\n slotProps.className = className;\n }\n return <Slot {...slotProps}>{children}</Slot>;\n }\n\n const trackClasses = cn(\n 'w-10 h-6 rounded-full justify-center px-0.5 transition-colors',\n value ? 'bg-semantic-interactive-primary' : 'bg-neutral-300 dark:bg-neutral-700',\n disabled ? 'opacity-60' : undefined\n );\n // Position is set inline below (absolute + animated `left`), so no\n // self-start/self-end classes here — they'd fight the inline position.\n const thumbClasses = cn('w-5 h-5 rounded-full bg-white dark:bg-neutral-100 shadow-sm');\n\n const trackStyle = [\n TRACK_BASE,\n {\n backgroundColor: value ? colors.semantic.interactive.primary : colors.color.neutral['600'],\n // Subtle 180ms color transition between off → on. Web only;\n // native has no equivalent for the track tint in v1.\n ...({ transitionProperty: 'background-color', transitionDuration: '180ms' } as ViewStyle),\n },\n disabled ? { opacity: 0.6 } : null,\n ];\n // Thumb stays a near-white disc — we deliberately don't go to a dark\n // grey on dark mode because the thumb needs to read as the \"moveable\n // puck\" against the track in both schemes.\n //\n // Animation: thumb slides between left:2 (off) and left:18 (on) —\n // track width 40 - padding 2 - thumb 20 = 18 px travel. The\n // useAnimatedNumber hook picks the right engine per platform (web\n // CSS transition / reanimated spring / RN Animated). The hook is\n // called once at the top of the function — see the `slide` above.\n const thumbStyle = [\n THUMB_BASE_STYLE,\n {\n backgroundColor: colors.color.neutral['50'],\n position: 'absolute' as const,\n top: 2,\n } as ViewStyle,\n slide as ViewStyle,\n ];\n\n // Whole-row Pressable so clicking the label toggles the switch. The\n // visible track is a non-interactive View — one role=\"switch\" per\n // logical control, not two competing hit-areas.\n const rowStyle: ViewStyle = { ...ROW_LAYOUT_BASE, gap: px(colors.spacing['2']) };\n\n return (\n <Pressable\n onPress={toggle}\n {...commonProps}\n className={cn('flex-row items-center gap-2', className)}\n style={rowStyle}\n >\n <View className={trackClasses} style={trackStyle}>\n {/*\n * Animated.View — the slide style fragment from\n * `useAnimatedNumber` contains an `Animated.Value` on\n * native; a plain `View` would render the value as 0\n * (no animation). On web, the same fragment is plain\n * CSS and `Animated.View` falls through to a regular\n * div via react-native-web.\n */}\n <AnimatedView className={thumbClasses} style={thumbStyle} />\n </View>\n {label ? (\n <RNText\n className=\"text-md text-semantic-text-default\"\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.md),\n }}\n >\n {label}\n </RNText>\n ) : null}\n {children}\n </Pressable>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/animation/animated-view.ts","../../../src/animation/use-animated-number.ts","../../../src/slot/compose-refs.ts","../../../src/slot/slot.tsx","../../../src/theme/px.ts","../../../../tokens/build/theme.ts","../../../src/theme/context.tsx","../../../src/theme/use-color-scheme.tsx","../../../src/theme/use-theme-colors.ts","../../../src/utils/cn.ts","../../../src/components/Switch/Switch.tsx"],"names":["Animated","Platform","Easing","useSharedValue","useEffect","withTiming","useAnimatedStyle","forwardRef","Slot","isValidElement","Children","cloneElement","createContext","useContext","useState","Appearance","useCallback","jsx","jsxs","Pressable","View","RNText"],"mappings":";;;;;;;;;;;;;AAOO,IAAM,eAAeA,yBAAA,CAAS,IAAA;ACcrC,IAAM,MAAA,GAASC,qBAAS,EAAA,KAAO,KAAA;AAExB,SAAS,iBAAA,CACZ,QAAA,EACA,MAAA,EACA,OAAA,GAAiC,EAAC,EAC5B;AACN,EAAA,MAAM,EAAE,QAAA,GAAW,GAAA,EAAI,GAAI,OAAA;AAC3B,EAAA,IAAI,MAAA,EAAQ;AACR,IAAA,OAAO,QAAA,CAAS,QAAA,EAAU,MAAA,EAAQ,QAAQ,CAAA;AAAA,EAC9C;AAEA,EAAA,OAAO,mBAAA,CAAoB,QAAA,EAAU,MAAA,EAAQ,QAAQ,CAAA;AACzD;AAXgB,MAAA,CAAA,iBAAA,EAAA,mBAAA,CAAA;AAahB,SAAS,QAAA,CAAS,QAAA,EAA4B,MAAA,EAAgB,QAAA,EAA0B;AACpF,EAAA,IAAI,QAAA,KAAa,YAAA,IAAgB,QAAA,KAAa,YAAA,EAAc;AACxD,IAAA,OAAO;AAAA,MACH,WAAW,CAAC,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAA;AAAA,MAClC,kBAAA,EAAoB,WAAA;AAAA,MACpB,kBAAA,EAAoB,GAAG,QAAQ,CAAA,EAAA,CAAA;AAAA,MAC/B,wBAAA,EAA0B;AAAA,KAC9B;AAAA,EACJ;AACA,EAAA,OAAO;AAAA,IACH,CAAC,QAAQ,GAAG,MAAA;AAAA,IACZ,kBAAA,EAAoB,QAAA;AAAA,IACpB,kBAAA,EAAoB,GAAG,QAAQ,CAAA,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AG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACtD,KAAA,EAAO,QAAA;AAAA,MAEP,QAAA,EAAA;AAAA,wBAAAF,cAAAA,CAACG,gBAAA,EAAA,EAAK,SAAA,EAAW,YAAA,EAAc,KAAA,EAAO,UAAA,EASlC,QAAA,kBAAAH,cAAAA,CAAC,YAAA,EAAA,EAAa,SAAA,EAAW,YAAA,EAAc,KAAA,EAAO,YAAY,CAAA,EAC9D,CAAA;AAAA,QACC,wBACGA,cAAAA;AAAA,UAACI,gBAAA;AAAA,UAAA;AAAA,YACG,SAAA,EAAU,oCAAA;AAAA,YACV,KAAA,EAAO;AAAA,cACH,KAAA,EAAO,MAAA,CAAO,QAAA,CAAS,IAAA,CAAK,OAAA;AAAA,cAC5B,UAAA,EAAY,OAAO,UAAA,CAAW,IAAA;AAAA,cAC9B,QAAA,EAAU,EAAA,CAAG,MAAA,CAAO,QAAA,CAAS,EAAE;AAAA,aACnC;AAAA,YAEC,QAAA,EAAA;AAAA;AAAA,SACL,GACA,IAAA;AAAA,QACH;AAAA;AAAA;AAAA,GACL;AAER,CAAA,EApLsB,QAAA","file":"index.cjs","sourcesContent":["'use client';\n\n// Native build: reanimated's `Animated.View` consumes the worklet\n// styles produced by `useAnimatedStyle`. A regular `View` would\n// render the shared values' default frame and never animate.\nimport Animated from 'react-native-reanimated';\n\nexport const AnimatedView = Animated.View;\n","'use client';\n\n// Native build (Metro picks this `.ts` over the `.web.ts` sibling\n// when present — for monorepo workspaces and any consumer that pre-\n// orders `.native.ts` / `.ts` / `.web.ts` resolution properly). Web\n// consumers (Next.js etc.) that don't honor the extension split\n// should alias `react-native-reanimated` to a noop in their bundler\n// config — the IS_WEB early-return below means we never call\n// reanimated APIs on web, so a stub satisfies the import.\n\nimport { useEffect } from 'react';\nimport { Platform } from 'react-native';\nimport { Easing, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nexport type AnimatedProperty = 'left' | 'top' | 'right' | 'bottom' | 'translateX' | 'translateY' | 'opacity' | 'height';\n\nexport type AnimatedNumberOptions = {\n /** Animation duration in ms. @defaultValue 180 */\n duration?: number;\n};\n\nconst IS_WEB = Platform.OS === 'web';\n\nexport function useAnimatedNumber(\n property: AnimatedProperty,\n target: number,\n options: AnimatedNumberOptions = {}\n): object {\n const { duration = 180 } = options;\n if (IS_WEB) {\n return webStyle(property, target, duration);\n }\n // biome-ignore lint/correctness/useHookAtTopLevel: IS_WEB is module-init constant; same path every render\n return useReanimatedTiming(property, target, duration);\n}\n\nfunction webStyle(property: AnimatedProperty, target: number, duration: number): object {\n if (property === 'translateX' || property === 'translateY') {\n return {\n transform: [{ [property]: target }],\n transitionProperty: 'transform',\n transitionDuration: `${duration}ms`,\n transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n };\n }\n return {\n [property]: target,\n transitionProperty: property,\n transitionDuration: `${duration}ms`,\n transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n };\n}\n\n// `opacity` and `height` aren't transforms or position props but follow\n// the exact same animated-shared-value pattern. Adding them here keeps\n// the cross-platform API consistent — Accordion content fades + slides\n// open with the same easing as a Switch thumb.\n\n// Reanimated worklets can't reliably serialize closures over computed\n// keys (`{ [property]: value }`). Static-key paths per property work\n// fine. Six tiny worklets — one per AnimatedProperty — give the plugin\n// the static AST it expects without losing the cross-platform API.\n// The bezier curve mirrors the web CSS transition exactly so a Switch\n// thumb feels identical on both platforms.\nfunction useReanimatedTiming(property: AnimatedProperty, target: number, duration: number): object {\n const easing = Easing.bezier(0.16, 1, 0.3, 1);\n // biome-ignore lint/correctness/useHookAtTopLevel: dispatcher branch is module-init constant; this function only runs when IS_WEB is false\n const shared = useSharedValue(target);\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n useEffect(() => {\n shared.value = withTiming(target, { duration, easing });\n }, [target, shared, duration, easing]);\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const translateXStyle = useAnimatedStyle(() => ({\n transform: [{ translateX: shared.value }],\n }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const translateYStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: shared.value }],\n }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const leftStyle = useAnimatedStyle(() => ({ left: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const topStyle = useAnimatedStyle(() => ({ top: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const rightStyle = useAnimatedStyle(() => ({ right: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const bottomStyle = useAnimatedStyle(() => ({ bottom: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const opacityStyle = useAnimatedStyle(() => ({ opacity: shared.value }));\n // biome-ignore lint/correctness/useHookAtTopLevel: same\n const heightStyle = useAnimatedStyle(() => ({ height: shared.value }));\n if (property === 'translateX') {\n return translateXStyle;\n }\n if (property === 'translateY') {\n return translateYStyle;\n }\n if (property === 'left') {\n return leftStyle;\n }\n if (property === 'top') {\n return topStyle;\n }\n if (property === 'right') {\n return rightStyle;\n }\n if (property === 'bottom') {\n return bottomStyle;\n }\n if (property === 'opacity') {\n return opacityStyle;\n }\n return heightStyle;\n}\n","// composeRefs — merges multiple React refs (callback or object) into a single callback.\n// Derived from Radix UI's approach; reimplemented here so we don't take a Radix dependency.\n\nimport type { MutableRefObject, Ref, RefCallback } from 'react';\n\ntype PossibleRef<T> = Ref<T> | undefined;\n\nexport function composeRefs<T>(...refs: Array<PossibleRef<T>>): RefCallback<T> {\n return (node: T | null) => {\n for (const ref of refs) {\n if (ref == null) {\n continue;\n }\n if (typeof ref === 'function') {\n ref(node);\n } else {\n // React's MutableRefObject typing — we assign .current directly.\n (ref as MutableRefObject<T | null>).current = node;\n }\n }\n };\n}\n","import type { CSSProperties, ReactElement, Ref } from 'react';\nimport { Children, cloneElement, forwardRef, isValidElement } from 'react';\nimport { composeRefs } from './compose-refs';\n\ntype AnyProps = Record<string, unknown>;\n\nexport type SlotProps = {\n children?: React.ReactNode;\n} & AnyProps;\n\nexport const Slot = forwardRef<unknown, SlotProps>(function Slot(props, forwardedRef) {\n const { children, ...slotProps } = props;\n\n if (!isValidElement(children)) {\n return null;\n }\n\n // Assert that children is a single React element with props — we've narrowed above.\n const child = Children.only(children) as ReactElement<AnyProps> & { ref?: Ref<unknown> };\n const merged = mergeProps(slotProps, child.props);\n\n // Merge refs: Slot's forwarded ref + the child's own ref (if any).\n const childRef = (child as unknown as { ref?: Ref<unknown> }).ref;\n if (forwardedRef || childRef) {\n (merged as AnyProps).ref = composeRefs(forwardedRef, childRef);\n }\n\n return cloneElement(child, merged);\n});\nSlot.displayName = 'Slot';\n\nfunction mergeProps(outer: AnyProps, inner: AnyProps): AnyProps {\n // Inner (child) wins for everything except: className (concatenated), style (merged), and\n // event handlers (composed — outer runs first, then inner).\n const merged: AnyProps = { ...outer };\n\n for (const key of Object.keys(inner)) {\n const outerValue = outer[key];\n const innerValue = inner[key];\n\n if (key === 'className' || key === 'class') {\n merged[key] = joinClass(outerValue, innerValue);\n continue;\n }\n\n if (key === 'style') {\n merged[key] = {\n ...(outerValue as CSSProperties | undefined),\n ...(innerValue as CSSProperties | undefined),\n };\n continue;\n }\n\n if (isEventHandler(key, outerValue, innerValue)) {\n merged[key] = composeHandlers(outerValue as Fn, innerValue as Fn);\n continue;\n }\n\n merged[key] = innerValue;\n }\n\n return merged;\n}\n\nfunction joinClass(outer: unknown, inner: unknown): string | undefined {\n const a = typeof outer === 'string' ? outer : '';\n const b = typeof inner === 'string' ? inner : '';\n const joined = [a, b].filter(Boolean).join(' ');\n return joined.length > 0 ? joined : undefined;\n}\n\ntype Fn = (...args: unknown[]) => unknown;\n\nfunction isEventHandler(key: string, outer: unknown, inner: unknown): boolean {\n if (!key.startsWith('on') || key.length < 3) {\n return false;\n }\n if (key[2] !== key[2]?.toUpperCase()) {\n return false;\n }\n return typeof outer === 'function' && typeof inner === 'function';\n}\n\nfunction composeHandlers(outer: Fn, inner: Fn): Fn {\n return (...args: unknown[]) => {\n outer(...args);\n inner(...args);\n };\n}\n","/**\n * Strip the `px` suffix from a CSS-flavored token value and return a\n * number, the form React Native style props expect for properties like\n * `borderRadius`, `paddingHorizontal`, `fontSize`, etc.\n *\n * The tokens package emits all dimensional tokens as `${number}px`\n * strings (it's the lingua franca for both CSS and Style Dictionary\n * consumers); inside RN we need the unitless number. RN-Web tolerates\n * both, but native is strict.\n *\n * Falls through unchanged for tokens that already came in as numbers\n * (forward-compat).\n *\n * Examples:\n * px('6px') → 6\n * px('1.5px') → 1.5\n * px(6) → 6\n * px('foo') → 0 (defensive — bad input shouldn't crash render)\n */\nexport function px(value: string | number): number {\n if (typeof value === 'number') {\n return value;\n }\n const n = Number.parseFloat(value);\n return Number.isFinite(n) ? n : 0;\n}\n","// GENERATED by @nori-ui/tokens — DO NOT EDIT.\n// Run `yarn build:tokens` to regenerate.\n\n// Generated for light mode.\n// Do not edit — run `yarn build:tokens`.\n\nexport const theme = {\n color: {\n danger: \"#ef4444\",\n info: \"#3b82f6\",\n neutral: {\n \"100\": \"#f4f4f5\",\n \"200\": \"#e4e4e7\",\n \"300\": \"#d4d4d8\",\n \"400\": \"#a1a1aa\",\n \"50\": \"#fafafa\",\n \"500\": \"#71717a\",\n \"600\": \"#52525b\",\n \"700\": \"#3f3f46\",\n \"800\": \"#27272a\",\n \"900\": \"#18181b\",\n },\n primary: {\n \"100\": \"#ccfbf1\",\n \"200\": \"#99f6e4\",\n \"300\": \"#5eead4\",\n \"400\": \"#2dd4bf\",\n \"50\": \"#f0fdfa\",\n \"500\": \"#14b8a6\",\n \"600\": \"#0d9488\",\n \"700\": \"#0f766e\",\n \"800\": \"#115e59\",\n \"900\": \"#134e4a\",\n },\n success: \"#22c55e\",\n warning: \"#f59e0b\",\n },\n fontFamily: {\n body: \"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\",\n display: \"ui-serif, Georgia, 'Times New Roman', serif\",\n mono: \"ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace\",\n },\n fontSize: {\n \"2xl\": \"24px\",\n \"3xl\": \"30px\",\n \"4xl\": \"36px\",\n lg: \"18px\",\n md: \"16px\",\n sm: \"14px\",\n xl: \"20px\",\n xs: \"12px\",\n },\n fontWeight: {\n bold: \"700\",\n medium: \"500\",\n regular: \"400\",\n semibold: \"600\",\n },\n lineHeight: {\n normal: \"1.4\",\n relaxed: \"1.6\",\n tight: \"1.2\",\n },\n radius: {\n \"2xl\": \"16px\",\n full: \"9999px\",\n lg: \"8px\",\n md: \"6px\",\n none: \"0px\",\n sm: \"4px\",\n xl: \"12px\",\n },\n semantic: {\n background: {\n default: \"#fafafa\",\n elevated: \"#ffffff\",\n subtle: \"#f4f4f5\",\n },\n border: {\n default: \"#e4e4e7\",\n strong: \"#d4d4d8\",\n },\n interactive: {\n destructive: \"#ef4444\",\n primary: \"#0d9488\",\n primaryHover: \"#0f766e\",\n primaryPressed: \"#115e59\",\n },\n text: {\n default: \"#18181b\",\n inverted: \"#fafafa\",\n muted: \"#52525b\",\n },\n },\n shadow: {\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n },\n spacing: {\n \"0\": \"0px\",\n \"1\": \"4px\",\n \"10\": \"40px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n \"2\": \"8px\",\n \"20\": \"80px\",\n \"24\": \"96px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"5\": \"20px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n },\n} as const;\n\nexport type Theme = typeof theme;\n\n\n// Dark mode overrides\n// Generated for dark mode.\n// Do not edit — run `yarn build:tokens`.\n\nexport const themeDark = {\n color: {\n danger: \"#ef4444\",\n info: \"#3b82f6\",\n neutral: {\n \"100\": \"#f4f4f5\",\n \"200\": \"#e4e4e7\",\n \"300\": \"#d4d4d8\",\n \"400\": \"#a1a1aa\",\n \"50\": \"#fafafa\",\n \"500\": \"#71717a\",\n \"600\": \"#52525b\",\n \"700\": \"#3f3f46\",\n \"800\": \"#27272a\",\n \"900\": \"#18181b\",\n },\n primary: {\n \"100\": \"#ccfbf1\",\n \"200\": \"#99f6e4\",\n \"300\": \"#5eead4\",\n \"400\": \"#2dd4bf\",\n \"50\": \"#f0fdfa\",\n \"500\": \"#14b8a6\",\n \"600\": \"#0d9488\",\n \"700\": \"#0f766e\",\n \"800\": \"#115e59\",\n \"900\": \"#134e4a\",\n },\n success: \"#22c55e\",\n warning: \"#f59e0b\",\n },\n fontFamily: {\n body: \"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\",\n display: \"ui-serif, Georgia, 'Times New Roman', serif\",\n mono: \"ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace\",\n },\n fontSize: {\n \"2xl\": \"24px\",\n \"3xl\": \"30px\",\n \"4xl\": \"36px\",\n lg: \"18px\",\n md: \"16px\",\n sm: \"14px\",\n xl: \"20px\",\n xs: \"12px\",\n },\n fontWeight: {\n bold: \"700\",\n medium: \"500\",\n regular: \"400\",\n semibold: \"600\",\n },\n lineHeight: {\n normal: \"1.4\",\n relaxed: \"1.6\",\n tight: \"1.2\",\n },\n radius: {\n \"2xl\": \"16px\",\n full: \"9999px\",\n lg: \"8px\",\n md: \"6px\",\n none: \"0px\",\n sm: \"4px\",\n xl: \"12px\",\n },\n semantic: {\n background: {\n default: \"#18181b\",\n elevated: \"#3f3f46\",\n subtle: \"#27272a\",\n },\n border: {\n default: \"#3f3f46\",\n strong: \"#52525b\",\n },\n interactive: {\n destructive: \"#ef4444\",\n primary: \"#2dd4bf\",\n primaryHover: \"#5eead4\",\n primaryPressed: \"#99f6e4\",\n },\n text: {\n default: \"#fafafa\",\n inverted: \"#18181b\",\n muted: \"#a1a1aa\",\n },\n },\n shadow: {\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n },\n spacing: {\n \"0\": \"0px\",\n \"1\": \"4px\",\n \"10\": \"40px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n \"2\": \"8px\",\n \"20\": \"80px\",\n \"24\": \"96px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"5\": \"20px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n },\n} as const;\n\n","'use client';\n\nimport { themeDark as defaultDark, theme as defaultLight, type Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { createContext } from 'react';\n\n/**\n * A `NoriTheme` is a paired light/dark palette. The active half is picked\n * by `useColorScheme()` so the same theme object covers both schemes.\n *\n * Build one yourself by spreading the defaults and overriding the colors\n * you care about, or pick a preset from `@nori-ui/core/themes` (see the\n * Theming docs for examples).\n */\nexport type NoriTheme = {\n light: Theme;\n dark: Theme;\n};\n\n/**\n * Default Nori palette — teal primary on a warm-paper light surface, and\n * teal-400 primary on a deep-zinc dark surface. Mirrors the `theme` /\n * `themeDark` exports from @nori-ui/tokens.\n */\nexport const defaultTheme: NoriTheme = {\n light: defaultLight,\n dark: defaultDark as unknown as Theme,\n};\n\n// Context value is the FULL pair, not the active half. `useThemeColors`\n// (the hook components reach for) resolves it to the right one based on\n// the current color scheme. Storing the pair means a parent only has to\n// declare the theme once — switching scheme is a separate concern.\nexport const ThemeContext = createContext<NoriTheme>(defaultTheme);\nThemeContext.displayName = 'ThemeContext';\n\nexport type ThemeProviderProps = {\n /**\n * The theme to apply to descendants. Pass either:\n * - a full `NoriTheme` (`{ light, dark }`) — both schemes covered\n * - a single `Theme` — used for both light and dark (rare; mostly\n * useful when you ONLY ever render in one scheme)\n * - omit — falls back to the Nori default (teal palette)\n */\n theme?: NoriTheme | Theme;\n children?: ReactNode;\n};\n\nconst isFullTheme = (t: NoriTheme | Theme): t is NoriTheme => 'light' in t && 'dark' in t;\n\nexport function ThemeProvider({ theme, children }: ThemeProviderProps) {\n const value: NoriTheme =\n theme === undefined ? defaultTheme : isFullTheme(theme) ? theme : { light: theme, dark: theme };\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n","'use client';\n\nimport { createContext, type ReactNode, useContext, useEffect, useState } from 'react';\nimport { Appearance, Platform } from 'react-native';\n\nexport type ColorScheme = 'light' | 'dark';\n\n// Override channel so a parent can force a scheme (e.g. an app shell with\n// hard-coded dark chrome that wants nested components to render against\n// the dark token half regardless of the OS Appearance). `null` means\n// \"no override — use the system signal\".\nconst ColorSchemeOverrideContext = createContext<ColorScheme | null>(null);\nColorSchemeOverrideContext.displayName = 'ColorSchemeOverrideContext';\n\nexport type ColorSchemeProviderProps = {\n /** Force a specific scheme for descendants. */\n value: ColorScheme;\n children?: ReactNode;\n};\n\n/**\n * Forces a color scheme for all descendants. Useful when a screen's chrome\n * is hard-coded to one scheme (e.g. a forced-dark editorial surface) and\n * you want library components inside it to follow that, not the OS.\n */\nexport function ColorSchemeProvider({ value, children }: ColorSchemeProviderProps) {\n return <ColorSchemeOverrideContext.Provider value={value}>{children}</ColorSchemeOverrideContext.Provider>;\n}\n\nconst isWeb = Platform.OS === 'web';\n\n// Web: a document is \"in dark mode\" when the root <html> element carries\n// the `dark` class (Tailwind / Fumadocs convention) OR a `data-theme=\"dark\"`\n// attribute (matches the `darkMode` selectors in our Tailwind preset).\n// We deliberately don't fall back to `prefers-color-scheme` — the app\n// usually owns that decision and writes it onto <html>; tracking the system\n// preference too would fight the app's chosen value.\nfunction readWebScheme(): ColorScheme {\n if (typeof document === 'undefined') {\n return 'light';\n }\n const root = document.documentElement;\n if (root.classList.contains('dark')) {\n return 'dark';\n }\n if (root.getAttribute('data-theme') === 'dark') {\n return 'dark';\n }\n return 'light';\n}\n\n/**\n * Returns the current color scheme — `'light'` or `'dark'`.\n *\n * On web: observes the root `<html>` element's `class=\"dark\"` and\n * `data-theme=\"dark\"` attribute (the same signals our Tailwind preset\n * keys on). Updates live as those flip.\n *\n * On native: delegates to `react-native`'s `Appearance` API so the hook\n * tracks the OS preference without extra wiring.\n *\n * Components consume this indirectly via `useThemeColors()`; reach for\n * this directly when you need the raw scheme (e.g. to swap an icon).\n */\nexport function useColorScheme(): ColorScheme {\n // A `<ColorSchemeProvider value=\"dark\">` ancestor (or NoriProvider's\n // `colorScheme` prop, which mounts one) wins over the OS signal — the\n // app shell knows which scheme its chrome is locked to.\n const override = useContext(ColorSchemeOverrideContext);\n\n const [scheme, setScheme] = useState<ColorScheme>(() => {\n if (isWeb) {\n return readWebScheme();\n }\n return (Appearance.getColorScheme() ?? 'light') as ColorScheme;\n });\n\n useEffect(() => {\n if (isWeb) {\n const root = document.documentElement;\n const update = () => setScheme(readWebScheme());\n const observer = new MutationObserver(update);\n observer.observe(root, { attributes: true, attributeFilter: ['class', 'data-theme'] });\n // Sync once after mount in case SSR shipped a different value.\n update();\n return () => observer.disconnect();\n }\n\n const sub = Appearance.addChangeListener(({ colorScheme }) => {\n setScheme((colorScheme ?? 'light') as ColorScheme);\n });\n return () => sub.remove();\n }, []);\n\n return override ?? scheme;\n}\n","'use client';\n\nimport type { Theme } from '@nori-ui/tokens';\nimport { useContext } from 'react';\nimport { ThemeContext } from './context';\nimport { useColorScheme } from './use-color-scheme';\n\n/**\n * Returns the active token palette — `theme.light` in light mode,\n * `theme.dark` in dark mode. Resolves the theme via `ThemeContext` so\n * any ancestor `<ThemeProvider theme={...}>` flows through. With no\n * provider in the tree, the default Nori palette (teal) is used.\n *\n * Use this **inside a component** when you need a hex value for a React\n * Native `style` prop (`backgroundColor`, `borderColor`, etc.).\n *\n * Note: className-based styles (e.g. `bg-semantic-interactive-primary`)\n * compile against the @nori-ui/tokens palette at build time and don't\n * follow `<ThemeProvider>` overrides today. Inline styles via this hook\n * always do — and inline beats class on CSS specificity, so the visible\n * color you see is whatever the hook resolves to. CSS-variable theming\n * for the className path is a planned follow-up.\n */\nexport function useThemeColors(): Theme {\n const scheme = useColorScheme();\n const themePair = useContext(ThemeContext);\n return scheme === 'dark' ? themePair.dark : themePair.light;\n}\n","// cn — class-name merger. clsx-compatible shape.\n//\n// Intentionally does NOT deduplicate Tailwind conflicts (e.g. \"text-sm text-lg\").\n// That's `tailwind-merge`'s job; we defer adding it until a component actually\n// needs it, to keep the core tree-shakable and the runtime zero-dep.\n\nexport type ClassInput =\n | string\n | number\n | boolean\n | null\n | undefined\n | ClassInput[]\n | Record<string, boolean | number | null | undefined>;\n\nexport function cn(...inputs: ClassInput[]): string {\n const out: string[] = [];\n for (const input of inputs) {\n append(out, input);\n }\n return out.join(' ');\n}\n\nfunction append(out: string[], input: ClassInput): void {\n if (!input) {\n return;\n }\n if (typeof input === 'string') {\n if (input.length > 0) {\n out.push(input);\n }\n return;\n }\n if (typeof input === 'number') {\n return; // numbers are never class names\n }\n if (Array.isArray(input)) {\n for (const inner of input) {\n append(out, inner);\n }\n return;\n }\n if (typeof input === 'object') {\n for (const key of Object.keys(input)) {\n if (input[key]) {\n out.push(key);\n }\n }\n }\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { useCallback, useState } from 'react';\nimport type { ViewStyle } from 'react-native';\nimport { Pressable, Text as RNText, View } from 'react-native';\nimport { AnimatedView } from '../../animation/animated-view';\nimport { useAnimatedNumber } from '../../animation/use-animated-number';\nimport { Slot } from '../../slot';\nimport { px } from '../../theme/px';\nimport { useThemeColors } from '../../theme/use-theme-colors';\nimport { cn } from '../../utils/cn';\n\nexport type SwitchProps = {\n checked?: boolean;\n defaultChecked?: boolean;\n disabled?: boolean;\n onChange?: (next: boolean) => void;\n label?: string;\n className?: string;\n testID?: string;\n asChild?: boolean;\n children?: ReactNode;\n /** DOM id / nativeID forwarded to the Pressable — used by Field.Control */\n id?: string;\n /** HTML name attribute (web only) */\n name?: string;\n /** aria-labelledby forwarded to the Pressable */\n 'aria-labelledby'?: string;\n /** React Native accessibilityLabelledBy forwarded to the Pressable */\n accessibilityLabelledBy?: string;\n /** aria-describedby forwarded to the Pressable */\n 'aria-describedby'?: string;\n /** React Native accessibilityDescribedBy forwarded to the Pressable */\n accessibilityDescribedBy?: string;\n /** Marks the control as invalid — set by Field.Control when there is an error */\n 'aria-invalid'?: boolean;\n /** Marks the control as required — set by Field.Control */\n 'aria-required'?: boolean;\n};\n\n// Layout-only base; row gap is theme-driven inside the component.\nconst ROW_LAYOUT_BASE: ViewStyle = { flexDirection: 'row', alignItems: 'center' };\n// Switch track + thumb are tightly coupled — width 40, height 24, thumb\n// 20×20, travel 18px. Component-density literals — not from theme.\nconst TRACK_BASE: ViewStyle = {\n width: 40,\n height: 24,\n borderRadius: 12,\n // Relative so the absolutely-positioned thumb anchors against the\n // track (not the page). The thumb's `left` value transitions between\n // 2 (off) and 18 (on) — see thumb style below.\n position: 'relative',\n};\nconst THUMB_BASE_STYLE: ViewStyle = {\n width: 20,\n height: 20,\n borderRadius: 10,\n // Web: boxShadow (the modern CSS-style replacement for the legacy RN\n // `shadow*` props that react-native-web has deprecated).\n // Native: elevation (Android) — RN ignores boxShadow there.\n ...({ boxShadow: '0 1px 2px rgba(0, 0, 0, 0.15)' } as ViewStyle),\n elevation: 2,\n};\n\n/**\n * Switch — a toggle control with role=\"switch\". Supports controlled + uncontrolled,\n * disabled state, asChild (via Slot), and a visible label that doubles as the\n * accessibility label.\n */\nexport const Switch = ({\n checked,\n defaultChecked = false,\n disabled,\n onChange,\n label,\n className,\n testID,\n asChild,\n children,\n id,\n name,\n 'aria-labelledby': ariaLabelledBy,\n accessibilityLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n accessibilityDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-required': ariaRequired,\n}: SwitchProps) => {\n const colors = useThemeColors();\n const [inner, setInner] = useState<boolean>(defaultChecked);\n const isControlled = checked !== undefined;\n const value = isControlled ? Boolean(checked) : inner;\n // Pulled up here (above the asChild early-return) so the hook is\n // called on every render path, not conditionally. The slide isn't\n // used in the asChild branch, but the wasted work is tiny.\n const slide = useAnimatedNumber('left', value ? 18 : 2);\n\n const toggle = useCallback(() => {\n if (disabled) {\n return;\n }\n const next = !value;\n if (!isControlled) {\n setInner(next);\n }\n onChange?.(next);\n }, [disabled, value, isControlled, onChange]);\n\n const ariaChecked: 'true' | 'false' = value ? 'true' : 'false';\n\n const commonProps: Record<string, unknown> = {\n role: 'switch',\n 'aria-checked': ariaChecked,\n accessibilityRole: 'switch' as const,\n accessibilityState: { checked: value, disabled: Boolean(disabled) },\n testID,\n };\n if (id !== undefined) {\n commonProps.id = id;\n commonProps.nativeID = id;\n }\n if (name !== undefined) {\n commonProps.name = name;\n }\n if (disabled) {\n commonProps['aria-disabled'] = true;\n }\n if (label !== undefined) {\n commonProps['aria-label'] = label;\n commonProps.accessibilityLabel = label;\n }\n if (ariaLabelledBy !== undefined) {\n commonProps['aria-labelledby'] = ariaLabelledBy;\n commonProps.accessibilityLabelledBy = ariaLabelledBy;\n }\n if (accessibilityLabelledBy !== undefined) {\n commonProps.accessibilityLabelledBy = accessibilityLabelledBy;\n }\n if (ariaDescribedBy !== undefined) {\n commonProps['aria-describedby'] = ariaDescribedBy;\n commonProps.accessibilityDescribedBy = ariaDescribedBy;\n }\n if (accessibilityDescribedBy !== undefined) {\n commonProps.accessibilityDescribedBy = accessibilityDescribedBy;\n }\n if (ariaInvalid) {\n commonProps['aria-invalid'] = true;\n }\n if (ariaRequired) {\n commonProps['aria-required'] = true;\n }\n\n if (asChild) {\n const slotProps: Record<string, unknown> = {\n role: 'switch',\n 'aria-checked': ariaChecked,\n onClick: toggle,\n };\n if (disabled) {\n slotProps['aria-disabled'] = true;\n }\n if (label !== undefined) {\n slotProps['aria-label'] = label;\n }\n if (testID !== undefined) {\n slotProps['data-testid'] = testID;\n }\n if (className !== undefined) {\n slotProps.className = className;\n }\n return <Slot {...slotProps}>{children}</Slot>;\n }\n\n const trackClasses = cn(\n 'w-10 h-6 rounded-full justify-center px-0.5 transition-colors',\n value ? 'bg-semantic-interactive-primary' : 'bg-neutral-300 dark:bg-neutral-700',\n disabled ? 'opacity-60' : undefined\n );\n // Position is set inline below (absolute + animated `left`), so no\n // self-start/self-end classes here — they'd fight the inline position.\n const thumbClasses = cn('w-5 h-5 rounded-full bg-white dark:bg-neutral-100 shadow-sm');\n\n const trackStyle = [\n TRACK_BASE,\n {\n backgroundColor: value ? colors.semantic.interactive.primary : colors.color.neutral['600'],\n // Subtle 180ms color transition between off → on. Web only;\n // native has no equivalent for the track tint in v1.\n ...({ transitionProperty: 'background-color', transitionDuration: '180ms' } as ViewStyle),\n },\n disabled ? { opacity: 0.6 } : null,\n ];\n // Thumb stays a near-white disc — we deliberately don't go to a dark\n // grey on dark mode because the thumb needs to read as the \"moveable\n // puck\" against the track in both schemes.\n //\n // Animation: thumb slides between left:2 (off) and left:18 (on) —\n // track width 40 - padding 2 - thumb 20 = 18 px travel. The\n // useAnimatedNumber hook picks the right engine per platform (web\n // CSS transition / reanimated spring / RN Animated). The hook is\n // called once at the top of the function — see the `slide` above.\n const thumbStyle = [\n THUMB_BASE_STYLE,\n {\n backgroundColor: colors.color.neutral['50'],\n position: 'absolute' as const,\n top: 2,\n } as ViewStyle,\n slide as ViewStyle,\n ];\n\n // Whole-row Pressable so clicking the label toggles the switch. The\n // visible track is a non-interactive View — one role=\"switch\" per\n // logical control, not two competing hit-areas.\n const rowStyle: ViewStyle = { ...ROW_LAYOUT_BASE, gap: px(colors.spacing['2']) };\n\n return (\n <Pressable\n onPress={toggle}\n {...commonProps}\n className={cn('flex-row items-center gap-2', className)}\n style={rowStyle}\n >\n <View className={trackClasses} style={trackStyle}>\n {/*\n * Animated.View — the slide style fragment from\n * `useAnimatedNumber` contains an `Animated.Value` on\n * native; a plain `View` would render the value as 0\n * (no animation). On web, the same fragment is plain\n * CSS and `Animated.View` falls through to a regular\n * div via react-native-web.\n */}\n <AnimatedView className={thumbClasses} style={thumbStyle} />\n </View>\n {label ? (\n <RNText\n className=\"text-md text-semantic-text-default\"\n style={{\n color: colors.semantic.text.default,\n fontFamily: colors.fontFamily.body,\n fontSize: px(colors.fontSize.md),\n }}\n >\n {label}\n </RNText>\n ) : null}\n {children}\n </Pressable>\n );\n};\n"]}
|
|
@@ -11,12 +11,28 @@ type SwitchProps = {
|
|
|
11
11
|
testID?: string;
|
|
12
12
|
asChild?: boolean;
|
|
13
13
|
children?: ReactNode;
|
|
14
|
+
/** DOM id / nativeID forwarded to the Pressable — used by Field.Control */
|
|
15
|
+
id?: string;
|
|
16
|
+
/** HTML name attribute (web only) */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** aria-labelledby forwarded to the Pressable */
|
|
19
|
+
'aria-labelledby'?: string;
|
|
20
|
+
/** React Native accessibilityLabelledBy forwarded to the Pressable */
|
|
21
|
+
accessibilityLabelledBy?: string;
|
|
22
|
+
/** aria-describedby forwarded to the Pressable */
|
|
23
|
+
'aria-describedby'?: string;
|
|
24
|
+
/** React Native accessibilityDescribedBy forwarded to the Pressable */
|
|
25
|
+
accessibilityDescribedBy?: string;
|
|
26
|
+
/** Marks the control as invalid — set by Field.Control when there is an error */
|
|
27
|
+
'aria-invalid'?: boolean;
|
|
28
|
+
/** Marks the control as required — set by Field.Control */
|
|
29
|
+
'aria-required'?: boolean;
|
|
14
30
|
};
|
|
15
31
|
/**
|
|
16
32
|
* Switch — a toggle control with role="switch". Supports controlled + uncontrolled,
|
|
17
33
|
* disabled state, asChild (via Slot), and a visible label that doubles as the
|
|
18
34
|
* accessibility label.
|
|
19
35
|
*/
|
|
20
|
-
declare const Switch: ({ checked, defaultChecked, disabled, onChange, label, className, testID, asChild, children, }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare const Switch: ({ checked, defaultChecked, disabled, onChange, label, className, testID, asChild, children, id, name, "aria-labelledby": ariaLabelledBy, accessibilityLabelledBy, "aria-describedby": ariaDescribedBy, accessibilityDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
21
37
|
|
|
22
38
|
export { Switch, type SwitchProps };
|
|
@@ -11,12 +11,28 @@ type SwitchProps = {
|
|
|
11
11
|
testID?: string;
|
|
12
12
|
asChild?: boolean;
|
|
13
13
|
children?: ReactNode;
|
|
14
|
+
/** DOM id / nativeID forwarded to the Pressable — used by Field.Control */
|
|
15
|
+
id?: string;
|
|
16
|
+
/** HTML name attribute (web only) */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** aria-labelledby forwarded to the Pressable */
|
|
19
|
+
'aria-labelledby'?: string;
|
|
20
|
+
/** React Native accessibilityLabelledBy forwarded to the Pressable */
|
|
21
|
+
accessibilityLabelledBy?: string;
|
|
22
|
+
/** aria-describedby forwarded to the Pressable */
|
|
23
|
+
'aria-describedby'?: string;
|
|
24
|
+
/** React Native accessibilityDescribedBy forwarded to the Pressable */
|
|
25
|
+
accessibilityDescribedBy?: string;
|
|
26
|
+
/** Marks the control as invalid — set by Field.Control when there is an error */
|
|
27
|
+
'aria-invalid'?: boolean;
|
|
28
|
+
/** Marks the control as required — set by Field.Control */
|
|
29
|
+
'aria-required'?: boolean;
|
|
14
30
|
};
|
|
15
31
|
/**
|
|
16
32
|
* Switch — a toggle control with role="switch". Supports controlled + uncontrolled,
|
|
17
33
|
* disabled state, asChild (via Slot), and a visible label that doubles as the
|
|
18
34
|
* accessibility label.
|
|
19
35
|
*/
|
|
20
|
-
declare const Switch: ({ checked, defaultChecked, disabled, onChange, label, className, testID, asChild, children, }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare const Switch: ({ checked, defaultChecked, disabled, onChange, label, className, testID, asChild, children, id, name, "aria-labelledby": ariaLabelledBy, accessibilityLabelledBy, "aria-describedby": ariaDescribedBy, accessibilityDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
21
37
|
|
|
22
38
|
export { Switch, type SwitchProps };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { Switch } from '../../chunk-
|
|
1
|
+
export { Switch } from '../../chunk-VMAGFYHG.js';
|
|
2
2
|
import '../../chunk-RB3YBWQ4.js';
|
|
3
3
|
import '../../chunk-RGJ3NBKE.js';
|
|
4
4
|
import '../../chunk-ZIBNLXIV.js';
|
|
5
|
-
import '../../chunk-5A2QOOVN.js';
|
|
6
5
|
import '../../chunk-CHXHRJNZ.js';
|
|
6
|
+
import '../../chunk-5A2QOOVN.js';
|
|
7
7
|
import '../../chunk-R5JMDDCB.js';
|
|
8
8
|
import '../../chunk-WCQVDF3K.js';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Tabs } from '../../chunk-
|
|
2
|
-
import '../../chunk-5A2QOOVN.js';
|
|
1
|
+
export { Tabs } from '../../chunk-GELLSU64.js';
|
|
3
2
|
import '../../chunk-CHXHRJNZ.js';
|
|
3
|
+
import '../../chunk-5A2QOOVN.js';
|
|
4
4
|
import '../../chunk-R5JMDDCB.js';
|
|
5
5
|
import '../../chunk-WCQVDF3K.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Text } from '../../chunk-
|
|
2
|
-
import '../../chunk-5A2QOOVN.js';
|
|
1
|
+
export { Text } from '../../chunk-W3HMOOON.js';
|
|
3
2
|
import '../../chunk-CHXHRJNZ.js';
|
|
3
|
+
import '../../chunk-5A2QOOVN.js';
|
|
4
4
|
import '../../chunk-R5JMDDCB.js';
|
|
5
5
|
import '../../chunk-WCQVDF3K.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -330,7 +330,6 @@ function append(out, input) {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
__name(append, "append");
|
|
333
|
-
var CONTAINER_LAYOUT_BASE = { flexDirection: "column" };
|
|
334
333
|
var FIELD_LAYOUT_BASE = {
|
|
335
334
|
flexDirection: "row",
|
|
336
335
|
alignItems: "center",
|
|
@@ -341,42 +340,33 @@ var FIELD_LAYOUT_BASE = {
|
|
|
341
340
|
overflow: "hidden"
|
|
342
341
|
};
|
|
343
342
|
var TextInput = /* @__PURE__ */ __name(({
|
|
344
|
-
label,
|
|
345
|
-
helperText,
|
|
346
|
-
error,
|
|
347
343
|
disabled,
|
|
348
344
|
leading,
|
|
349
345
|
trailing,
|
|
350
346
|
containerClassName,
|
|
351
347
|
className,
|
|
352
348
|
testID,
|
|
349
|
+
id,
|
|
350
|
+
name,
|
|
353
351
|
onChangeText,
|
|
354
352
|
multiline,
|
|
355
353
|
numberOfLines,
|
|
356
354
|
...rest
|
|
357
355
|
}) => {
|
|
358
356
|
const colors = useThemeColors();
|
|
359
|
-
const reactId = react.useId();
|
|
360
|
-
const inputId = testID ?? `nori-ui-input-${reactId}`;
|
|
361
357
|
const inputRef = react.useRef(null);
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
}, "focusInput");
|
|
365
|
-
const describeId = `${inputId}-describe`;
|
|
366
|
-
const hasError = Boolean(error);
|
|
367
|
-
const describedBy = error || helperText ? describeId : void 0;
|
|
358
|
+
const restAny = rest;
|
|
359
|
+
const hasError = restAny["aria-invalid"] === true || restAny["aria-invalid"] === "true";
|
|
368
360
|
const inputExtras = {};
|
|
369
361
|
if (testID !== void 0) {
|
|
370
362
|
inputExtras.testID = testID;
|
|
371
363
|
}
|
|
372
|
-
if (
|
|
373
|
-
inputExtras.
|
|
364
|
+
if (id !== void 0) {
|
|
365
|
+
inputExtras.id = id;
|
|
366
|
+
inputExtras.nativeID = id;
|
|
374
367
|
}
|
|
375
|
-
if (
|
|
376
|
-
inputExtras
|
|
377
|
-
}
|
|
378
|
-
if (describedBy !== void 0) {
|
|
379
|
-
inputExtras["aria-describedby"] = describedBy;
|
|
368
|
+
if (name !== void 0) {
|
|
369
|
+
inputExtras.name = name;
|
|
380
370
|
}
|
|
381
371
|
if (multiline !== void 0) {
|
|
382
372
|
inputExtras.multiline = multiline;
|
|
@@ -387,12 +377,6 @@ var TextInput = /* @__PURE__ */ __name(({
|
|
|
387
377
|
if (onChangeText !== void 0) {
|
|
388
378
|
inputExtras.onChangeText = onChangeText;
|
|
389
379
|
}
|
|
390
|
-
const labelStyle = {
|
|
391
|
-
fontFamily: colors.fontFamily.body,
|
|
392
|
-
fontSize: px(colors.fontSize.sm),
|
|
393
|
-
fontWeight: colors.fontWeight.medium,
|
|
394
|
-
color: colors.semantic.text.default
|
|
395
|
-
};
|
|
396
380
|
const inputStyle = {
|
|
397
381
|
flex: 1,
|
|
398
382
|
paddingVertical: px(colors.spacing["2"]),
|
|
@@ -400,17 +384,6 @@ var TextInput = /* @__PURE__ */ __name(({
|
|
|
400
384
|
fontSize: px(colors.fontSize.md),
|
|
401
385
|
color: colors.semantic.text.default
|
|
402
386
|
};
|
|
403
|
-
const helperStyle = {
|
|
404
|
-
fontFamily: colors.fontFamily.body,
|
|
405
|
-
fontSize: px(colors.fontSize.sm),
|
|
406
|
-
color: colors.semantic.text.muted
|
|
407
|
-
};
|
|
408
|
-
const errorStyle = {
|
|
409
|
-
fontFamily: colors.fontFamily.body,
|
|
410
|
-
fontSize: px(colors.fontSize.sm),
|
|
411
|
-
color: colors.color.danger
|
|
412
|
-
};
|
|
413
|
-
const containerStyle = { ...CONTAINER_LAYOUT_BASE, gap: px(colors.spacing["1"]) };
|
|
414
387
|
const fieldStyle = [
|
|
415
388
|
FIELD_LAYOUT_BASE,
|
|
416
389
|
{
|
|
@@ -421,55 +394,33 @@ var TextInput = /* @__PURE__ */ __name(({
|
|
|
421
394
|
},
|
|
422
395
|
disabled ? { opacity: 0.6 } : null
|
|
423
396
|
];
|
|
424
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
397
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn(containerClassName), style: { flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
398
|
+
reactNative.View,
|
|
399
|
+
{
|
|
400
|
+
className: cn(
|
|
401
|
+
"flex-row items-center rounded-md border px-3",
|
|
402
|
+
hasError ? "border-semantic-interactive-destructive" : "border-semantic-border-default",
|
|
403
|
+
disabled ? "opacity-60" : void 0
|
|
404
|
+
),
|
|
405
|
+
style: fieldStyle,
|
|
406
|
+
children: [
|
|
407
|
+
leading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "mr-2", style: { marginRight: px(colors.spacing["2"]) }, children: leading }) : null,
|
|
408
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
409
|
+
reactNative.TextInput,
|
|
410
|
+
{
|
|
411
|
+
ref: inputRef,
|
|
412
|
+
editable: !disabled,
|
|
413
|
+
className: cn("flex-1 py-2 text-md text-semantic-text-default outline-none", className),
|
|
414
|
+
placeholderTextColor: colors.semantic.text.muted,
|
|
415
|
+
...inputExtras,
|
|
416
|
+
...rest,
|
|
417
|
+
style: [inputStyle, rest.style]
|
|
418
|
+
}
|
|
442
419
|
),
|
|
443
|
-
style:
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
reactNative.TextInput,
|
|
448
|
-
{
|
|
449
|
-
ref: inputRef,
|
|
450
|
-
nativeID: inputId,
|
|
451
|
-
editable: !disabled,
|
|
452
|
-
className: cn("flex-1 py-2 text-md text-semantic-text-default outline-none", className),
|
|
453
|
-
placeholderTextColor: colors.semantic.text.muted,
|
|
454
|
-
...inputExtras,
|
|
455
|
-
...rest,
|
|
456
|
-
style: [inputStyle, rest.style]
|
|
457
|
-
}
|
|
458
|
-
),
|
|
459
|
-
trailing ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "ml-2", style: { marginLeft: px(colors.spacing["2"]) }, children: trailing }) : null
|
|
460
|
-
]
|
|
461
|
-
}
|
|
462
|
-
),
|
|
463
|
-
error ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
464
|
-
reactNative.Text,
|
|
465
|
-
{
|
|
466
|
-
nativeID: describeId,
|
|
467
|
-
className: "text-sm text-semantic-interactive-destructive",
|
|
468
|
-
style: errorStyle,
|
|
469
|
-
children: error
|
|
470
|
-
}
|
|
471
|
-
) : helperText ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: describeId, className: "text-sm text-semantic-text-muted", style: helperStyle, children: helperText }) : null
|
|
472
|
-
] });
|
|
420
|
+
trailing ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "ml-2", style: { marginLeft: px(colors.spacing["2"]) }, children: trailing }) : null
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
) });
|
|
473
424
|
}, "TextInput");
|
|
474
425
|
var TextArea = /* @__PURE__ */ __name(({ numberOfLines = 4, resize = "vertical", style, ...rest }) => {
|
|
475
426
|
const resizeStyle = { resize };
|