@nori-ui/core 1.6.0 → 1.7.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.
Files changed (179) hide show
  1. package/dist/{chunk-7UKRN73P.js → chunk-2XJCLPNH.js} +3 -3
  2. package/dist/{chunk-7UKRN73P.js.map → chunk-2XJCLPNH.js.map} +1 -1
  3. package/dist/{chunk-5PSC5HT4.js → chunk-3B345SQU.js} +5 -5
  4. package/dist/{chunk-5PSC5HT4.js.map → chunk-3B345SQU.js.map} +1 -1
  5. package/dist/{chunk-JSAG5YO7.js → chunk-3IIIHZHT.js} +3 -3
  6. package/dist/{chunk-JSAG5YO7.js.map → chunk-3IIIHZHT.js.map} +1 -1
  7. package/dist/{chunk-DDGMLLS3.js → chunk-3W3XYULK.js} +3 -3
  8. package/dist/{chunk-DDGMLLS3.js.map → chunk-3W3XYULK.js.map} +1 -1
  9. package/dist/{chunk-WYPGQVDV.js → chunk-5YHT252H.js} +3 -3
  10. package/dist/{chunk-WYPGQVDV.js.map → chunk-5YHT252H.js.map} +1 -1
  11. package/dist/{chunk-ZMSIYLSI.js → chunk-7FSFJA33.js} +3 -3
  12. package/dist/{chunk-ZMSIYLSI.js.map → chunk-7FSFJA33.js.map} +1 -1
  13. package/dist/{chunk-YZ27OS2R.js → chunk-C32XGHWO.js} +3 -3
  14. package/dist/{chunk-YZ27OS2R.js.map → chunk-C32XGHWO.js.map} +1 -1
  15. package/dist/{chunk-UJWCEGQY.js → chunk-C5HQPXRI.js} +3 -3
  16. package/dist/{chunk-UJWCEGQY.js.map → chunk-C5HQPXRI.js.map} +1 -1
  17. package/dist/{chunk-XALU6LOT.js → chunk-EN4CLDGZ.js} +3 -3
  18. package/dist/{chunk-XALU6LOT.js.map → chunk-EN4CLDGZ.js.map} +1 -1
  19. package/dist/{chunk-6AD6KCVB.js → chunk-F5UKI7XD.js} +3 -3
  20. package/dist/{chunk-6AD6KCVB.js.map → chunk-F5UKI7XD.js.map} +1 -1
  21. package/dist/chunk-GTAXVTLF.js +43 -0
  22. package/dist/chunk-GTAXVTLF.js.map +1 -0
  23. package/dist/{chunk-NNFJKRXZ.js → chunk-H2LHWJ52.js} +3 -3
  24. package/dist/{chunk-NNFJKRXZ.js.map → chunk-H2LHWJ52.js.map} +1 -1
  25. package/dist/{chunk-PZS4A4VQ.js → chunk-HXCETKCC.js} +3 -3
  26. package/dist/{chunk-PZS4A4VQ.js.map → chunk-HXCETKCC.js.map} +1 -1
  27. package/dist/chunk-IGBXSBF7.js +71 -0
  28. package/dist/chunk-IGBXSBF7.js.map +1 -0
  29. package/dist/{chunk-JXLEMBDB.js → chunk-IIVTPN62.js} +3 -3
  30. package/dist/{chunk-JXLEMBDB.js.map → chunk-IIVTPN62.js.map} +1 -1
  31. package/dist/{chunk-PNP7L4TA.js → chunk-ISCJST4P.js} +3 -3
  32. package/dist/{chunk-PNP7L4TA.js.map → chunk-ISCJST4P.js.map} +1 -1
  33. package/dist/{chunk-TLS54G6Y.js → chunk-IWM2XDXH.js} +3 -3
  34. package/dist/{chunk-TLS54G6Y.js.map → chunk-IWM2XDXH.js.map} +1 -1
  35. package/dist/chunk-J5LK2XHE.js +118 -0
  36. package/dist/chunk-J5LK2XHE.js.map +1 -0
  37. package/dist/chunk-KFFGDET3.js +27 -0
  38. package/dist/chunk-KFFGDET3.js.map +1 -0
  39. package/dist/{chunk-MRJWPRCX.js → chunk-L6VYDM7S.js} +3 -3
  40. package/dist/{chunk-MRJWPRCX.js.map → chunk-L6VYDM7S.js.map} +1 -1
  41. package/dist/chunk-M4BI63P6.js +188 -0
  42. package/dist/chunk-M4BI63P6.js.map +1 -0
  43. package/dist/{chunk-RUWD35UI.js → chunk-MK57AOTI.js} +4 -4
  44. package/dist/{chunk-RUWD35UI.js.map → chunk-MK57AOTI.js.map} +1 -1
  45. package/dist/{chunk-3BDDPFCI.js → chunk-MOAIQHR7.js} +3 -3
  46. package/dist/{chunk-3BDDPFCI.js.map → chunk-MOAIQHR7.js.map} +1 -1
  47. package/dist/{chunk-5XEGZFG5.js → chunk-MYBBBLYE.js} +3 -3
  48. package/dist/{chunk-5XEGZFG5.js.map → chunk-MYBBBLYE.js.map} +1 -1
  49. package/dist/{chunk-WP2Z2ATO.js → chunk-O6M3F7BZ.js} +5 -5
  50. package/dist/{chunk-WP2Z2ATO.js.map → chunk-O6M3F7BZ.js.map} +1 -1
  51. package/dist/{chunk-FEPTH5RV.js → chunk-OELY6K44.js} +3 -3
  52. package/dist/{chunk-FEPTH5RV.js.map → chunk-OELY6K44.js.map} +1 -1
  53. package/dist/{chunk-BZLT6R62.js → chunk-OIHX5B4R.js} +3 -3
  54. package/dist/{chunk-BZLT6R62.js.map → chunk-OIHX5B4R.js.map} +1 -1
  55. package/dist/{chunk-QJVS2VXS.js → chunk-PGYEIXCO.js} +4 -4
  56. package/dist/{chunk-QJVS2VXS.js.map → chunk-PGYEIXCO.js.map} +1 -1
  57. package/dist/{chunk-UZD77M3J.js → chunk-PJTCO76H.js} +3 -3
  58. package/dist/{chunk-UZD77M3J.js.map → chunk-PJTCO76H.js.map} +1 -1
  59. package/dist/{chunk-4PUPKWEP.js → chunk-PJXVLE24.js} +4 -4
  60. package/dist/{chunk-4PUPKWEP.js.map → chunk-PJXVLE24.js.map} +1 -1
  61. package/dist/{chunk-WGT345SV.js → chunk-PLQPBMG2.js} +3 -3
  62. package/dist/{chunk-WGT345SV.js.map → chunk-PLQPBMG2.js.map} +1 -1
  63. package/dist/{chunk-OMU4R4Y5.js → chunk-PQW5LKAI.js} +3 -3
  64. package/dist/{chunk-OMU4R4Y5.js.map → chunk-PQW5LKAI.js.map} +1 -1
  65. package/dist/{chunk-Y5TJ7CAX.js → chunk-RI4Y2C5U.js} +3 -3
  66. package/dist/{chunk-Y5TJ7CAX.js.map → chunk-RI4Y2C5U.js.map} +1 -1
  67. package/dist/{chunk-3OIWAS2P.js → chunk-SF6WPUC5.js} +3 -3
  68. package/dist/{chunk-3OIWAS2P.js.map → chunk-SF6WPUC5.js.map} +1 -1
  69. package/dist/{chunk-MKSDYRWQ.js → chunk-STX5UKYT.js} +3 -3
  70. package/dist/{chunk-MKSDYRWQ.js.map → chunk-STX5UKYT.js.map} +1 -1
  71. package/dist/{chunk-2RL6WCFC.js → chunk-TSWPHJIU.js} +4 -4
  72. package/dist/{chunk-2RL6WCFC.js.map → chunk-TSWPHJIU.js.map} +1 -1
  73. package/dist/{chunk-SFNDR6DI.js → chunk-U2ZKY2CP.js} +3 -3
  74. package/dist/{chunk-SFNDR6DI.js.map → chunk-U2ZKY2CP.js.map} +1 -1
  75. package/dist/{chunk-PABG3IJ6.js → chunk-UKDDK42K.js} +3 -3
  76. package/dist/{chunk-PABG3IJ6.js.map → chunk-UKDDK42K.js.map} +1 -1
  77. package/dist/{chunk-VYRJ7OE5.js → chunk-USFXANEU.js} +3 -3
  78. package/dist/{chunk-VYRJ7OE5.js.map → chunk-USFXANEU.js.map} +1 -1
  79. package/dist/{chunk-CCUXO2HN.js → chunk-V5QSMDZL.js} +3 -3
  80. package/dist/{chunk-CCUXO2HN.js.map → chunk-V5QSMDZL.js.map} +1 -1
  81. package/dist/{chunk-NF7XG2FG.js → chunk-V75O7QQO.js} +3 -3
  82. package/dist/{chunk-NF7XG2FG.js.map → chunk-V75O7QQO.js.map} +1 -1
  83. package/dist/{chunk-NRYWNOG5.js → chunk-VL2WNGPF.js} +3 -3
  84. package/dist/{chunk-NRYWNOG5.js.map → chunk-VL2WNGPF.js.map} +1 -1
  85. package/dist/{chunk-JQQ3FBN7.js → chunk-VLZANXRZ.js} +3 -3
  86. package/dist/{chunk-JQQ3FBN7.js.map → chunk-VLZANXRZ.js.map} +1 -1
  87. package/dist/{chunk-2HMQDJ22.js → chunk-VOF3S5I4.js} +3 -3
  88. package/dist/{chunk-2HMQDJ22.js.map → chunk-VOF3S5I4.js.map} +1 -1
  89. package/dist/chunk-XQNVWHMN.js +60 -0
  90. package/dist/chunk-XQNVWHMN.js.map +1 -0
  91. package/dist/{chunk-JZ774T7U.js → chunk-ZGFXKYA5.js} +3 -3
  92. package/dist/{chunk-JZ774T7U.js.map → chunk-ZGFXKYA5.js.map} +1 -1
  93. package/dist/client.cjs +451 -2
  94. package/dist/client.cjs.map +1 -1
  95. package/dist/client.d.cts +6 -0
  96. package/dist/client.d.ts +6 -0
  97. package/dist/client.js +52 -46
  98. package/dist/client.js.map +1 -1
  99. package/dist/components/Accordion/index.js +2 -2
  100. package/dist/components/Alert/index.js +2 -2
  101. package/dist/components/AlertDialog/index.js +2 -2
  102. package/dist/components/AspectRatio/index.cjs +67 -0
  103. package/dist/components/AspectRatio/index.cjs.map +1 -0
  104. package/dist/components/AspectRatio/index.d.cts +30 -0
  105. package/dist/components/AspectRatio/index.d.ts +30 -0
  106. package/dist/components/AspectRatio/index.js +5 -0
  107. package/dist/components/AspectRatio/index.js.map +1 -0
  108. package/dist/components/Avatar/index.js +2 -2
  109. package/dist/components/Badge/index.js +2 -2
  110. package/dist/components/Box/index.js +4 -4
  111. package/dist/components/Breadcrumb/index.js +3 -3
  112. package/dist/components/Button/index.js +2 -2
  113. package/dist/components/ButtonGroup/index.cjs +83 -0
  114. package/dist/components/ButtonGroup/index.cjs.map +1 -0
  115. package/dist/components/ButtonGroup/index.d.cts +45 -0
  116. package/dist/components/ButtonGroup/index.d.ts +45 -0
  117. package/dist/components/ButtonGroup/index.js +5 -0
  118. package/dist/components/ButtonGroup/index.js.map +1 -0
  119. package/dist/components/Calendar/index.js +3 -3
  120. package/dist/components/Card/index.js +2 -2
  121. package/dist/components/Checkbox/index.js +2 -2
  122. package/dist/components/Collapsible/index.cjs +512 -0
  123. package/dist/components/Collapsible/index.cjs.map +1 -0
  124. package/dist/components/Collapsible/index.d.cts +50 -0
  125. package/dist/components/Collapsible/index.d.ts +50 -0
  126. package/dist/components/Collapsible/index.js +7 -0
  127. package/dist/components/Collapsible/index.js.map +1 -0
  128. package/dist/components/Combobox/index.js +3 -3
  129. package/dist/components/ContextMenu/index.js +4 -4
  130. package/dist/components/DataTable/index.js +3 -3
  131. package/dist/components/DatePicker/index.js +5 -5
  132. package/dist/components/Dialog/index.js +2 -2
  133. package/dist/components/DropdownMenu/index.js +3 -3
  134. package/dist/components/Empty/index.cjs +385 -0
  135. package/dist/components/Empty/index.cjs.map +1 -0
  136. package/dist/components/Empty/index.d.cts +32 -0
  137. package/dist/components/Empty/index.d.ts +32 -0
  138. package/dist/components/Empty/index.js +7 -0
  139. package/dist/components/Empty/index.js.map +1 -0
  140. package/dist/components/FloatButton/index.js +3 -3
  141. package/dist/components/HStack/index.js +4 -4
  142. package/dist/components/InputGroup/index.js +2 -2
  143. package/dist/components/Item/index.cjs +443 -0
  144. package/dist/components/Item/index.cjs.map +1 -0
  145. package/dist/components/Item/index.d.cts +40 -0
  146. package/dist/components/Item/index.d.ts +40 -0
  147. package/dist/components/Item/index.js +7 -0
  148. package/dist/components/Item/index.js.map +1 -0
  149. package/dist/components/Kbd/index.cjs +396 -0
  150. package/dist/components/Kbd/index.cjs.map +1 -0
  151. package/dist/components/Kbd/index.d.cts +22 -0
  152. package/dist/components/Kbd/index.d.ts +22 -0
  153. package/dist/components/Kbd/index.js +7 -0
  154. package/dist/components/Kbd/index.js.map +1 -0
  155. package/dist/components/Pagination/index.js +4 -4
  156. package/dist/components/Popover/index.js +2 -2
  157. package/dist/components/Progress/index.js +2 -2
  158. package/dist/components/Radio/index.js +2 -2
  159. package/dist/components/SegmentedControl/index.js +2 -2
  160. package/dist/components/Select/index.js +2 -2
  161. package/dist/components/Separator/index.js +2 -2
  162. package/dist/components/Sheet/index.js +2 -2
  163. package/dist/components/Skeleton/index.js +2 -2
  164. package/dist/components/Slider/index.js +2 -2
  165. package/dist/components/Switch/index.js +2 -2
  166. package/dist/components/Table/index.js +2 -2
  167. package/dist/components/Tabs/index.js +2 -2
  168. package/dist/components/Text/index.js +2 -2
  169. package/dist/components/TextArea/index.js +3 -3
  170. package/dist/components/TextInput/index.js +2 -2
  171. package/dist/components/Toggle/index.js +2 -2
  172. package/dist/components/Tooltip/index.js +2 -2
  173. package/dist/components/VStack/index.js +4 -4
  174. package/dist/index.cjs +451 -2
  175. package/dist/index.cjs.map +1 -1
  176. package/dist/index.d.cts +6 -0
  177. package/dist/index.d.ts +6 -0
  178. package/dist/index.js +50 -44
  179. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type ButtonGroupOrientation = 'horizontal' | 'vertical';
5
+ type ButtonGroupSize = 'sm' | 'md' | 'lg';
6
+ type ButtonGroupProps = {
7
+ children?: ReactNode;
8
+ /** Flex direction for the group. @defaultValue 'horizontal' */
9
+ orientation?: ButtonGroupOrientation;
10
+ /**
11
+ * Size hint passed to children via `data-group-size`. Buttons inside
12
+ * the group can read this to self-size consistently. When omitted, each
13
+ * Button retains its own `size` prop.
14
+ */
15
+ size?: ButtonGroupSize;
16
+ className?: string;
17
+ testID?: string;
18
+ };
19
+ /**
20
+ * Joins multiple buttons in a visually connected row (or column). Middle
21
+ * buttons lose outer edge radius; adjacent borders merge so the group looks
22
+ * like a single segmented control.
23
+ *
24
+ * The radius treatment is implemented by injecting `data-position` attributes
25
+ * (first / middle / last) onto each direct child. A companion CSS rule in the
26
+ * nori preset (or a Tailwind variant) can target `[data-position=first]`,
27
+ * `[data-position=middle]`, and `[data-position=last]` to strip the
28
+ * appropriate border-radius corners. When using Button from `@nori-ui/core`,
29
+ * no extra setup is needed — the tokens preset ships the rules.
30
+ *
31
+ * ```tsx
32
+ * <ButtonGroup>
33
+ * <Button variant="secondary">Day</Button>
34
+ * <Button variant="secondary">Week</Button>
35
+ * <Button variant="secondary">Month</Button>
36
+ * </ButtonGroup>
37
+ * ```
38
+ *
39
+ * > **v2 note:** Corner-radius stripping is applied via CSS data-attribute
40
+ * > selectors on web. On native, middle-button radius adjustment is a future
41
+ * > enhancement (currently the group renders with standard per-button radius).
42
+ */
43
+ declare const ButtonGroup: ({ children, orientation, size, className, testID }: ButtonGroupProps) => react_jsx_runtime.JSX.Element;
44
+
45
+ export { ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonGroupSize };
@@ -0,0 +1,5 @@
1
+ export { ButtonGroup } from '../../chunk-GTAXVTLF.js';
2
+ import '../../chunk-CHXHRJNZ.js';
3
+ import '../../chunk-WCQVDF3K.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,11 +1,11 @@
1
- export { Calendar, useCalendarCaption } from '../../chunk-2HMQDJ22.js';
1
+ export { Calendar, useCalendarCaption } from '../../chunk-VOF3S5I4.js';
2
+ import '../../chunk-PJTCO76H.js';
2
3
  import '../../chunk-GJMHNEQ3.js';
3
4
  import '../../chunk-4UFAZLSZ.js';
4
- import '../../chunk-UZD77M3J.js';
5
5
  import '../../chunk-7Z4NMNX6.js';
6
6
  import '../../chunk-5A2QOOVN.js';
7
- import '../../chunk-CHXHRJNZ.js';
8
7
  import '../../chunk-R5JMDDCB.js';
8
+ import '../../chunk-CHXHRJNZ.js';
9
9
  import '../../chunk-WCQVDF3K.js';
10
10
  //# sourceMappingURL=index.js.map
11
11
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
- export { Card } from '../../chunk-OMU4R4Y5.js';
1
+ export { Card } from '../../chunk-PQW5LKAI.js';
2
2
  import '../../chunk-5A2QOOVN.js';
3
- import '../../chunk-CHXHRJNZ.js';
4
3
  import '../../chunk-R5JMDDCB.js';
4
+ import '../../chunk-CHXHRJNZ.js';
5
5
  import '../../chunk-WCQVDF3K.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
- export { Checkbox } from '../../chunk-NNFJKRXZ.js';
1
+ export { Checkbox } from '../../chunk-H2LHWJ52.js';
2
2
  import '../../chunk-7Z4NMNX6.js';
3
3
  import '../../chunk-ZIBNLXIV.js';
4
4
  import '../../chunk-5A2QOOVN.js';
5
- import '../../chunk-CHXHRJNZ.js';
6
5
  import '../../chunk-R5JMDDCB.js';
6
+ import '../../chunk-CHXHRJNZ.js';
7
7
  import '../../chunk-WCQVDF3K.js';
8
8
  //# sourceMappingURL=index.js.map
9
9
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,512 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var reactNative = require('react-native');
5
+ var jsxRuntime = require('nativewind/jsx-runtime');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+
10
+ // src/theme/px.ts
11
+ function px(value) {
12
+ if (typeof value === "number") {
13
+ return value;
14
+ }
15
+ const n = Number.parseFloat(value);
16
+ return Number.isFinite(n) ? n : 0;
17
+ }
18
+ __name(px, "px");
19
+
20
+ // ../tokens/build/theme.ts
21
+ var theme = {
22
+ color: {
23
+ danger: "#ef4444",
24
+ info: "#3b82f6",
25
+ neutral: {
26
+ "100": "#f4f4f5",
27
+ "200": "#e4e4e7",
28
+ "300": "#d4d4d8",
29
+ "400": "#a1a1aa",
30
+ "50": "#fafafa",
31
+ "500": "#71717a",
32
+ "600": "#52525b",
33
+ "700": "#3f3f46",
34
+ "800": "#27272a",
35
+ "900": "#18181b"
36
+ },
37
+ primary: {
38
+ "100": "#ccfbf1",
39
+ "200": "#99f6e4",
40
+ "300": "#5eead4",
41
+ "400": "#2dd4bf",
42
+ "50": "#f0fdfa",
43
+ "500": "#14b8a6",
44
+ "600": "#0d9488",
45
+ "700": "#0f766e",
46
+ "800": "#115e59",
47
+ "900": "#134e4a"
48
+ },
49
+ success: "#22c55e",
50
+ warning: "#f59e0b"
51
+ },
52
+ fontFamily: {
53
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
54
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
55
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
56
+ },
57
+ fontSize: {
58
+ "2xl": "24px",
59
+ "3xl": "30px",
60
+ "4xl": "36px",
61
+ lg: "18px",
62
+ md: "16px",
63
+ sm: "14px",
64
+ xl: "20px",
65
+ xs: "12px"
66
+ },
67
+ fontWeight: {
68
+ bold: "700",
69
+ medium: "500",
70
+ regular: "400",
71
+ semibold: "600"
72
+ },
73
+ lineHeight: {
74
+ normal: "1.4",
75
+ relaxed: "1.6",
76
+ tight: "1.2"
77
+ },
78
+ radius: {
79
+ "2xl": "16px",
80
+ full: "9999px",
81
+ lg: "8px",
82
+ md: "6px",
83
+ none: "0px",
84
+ sm: "4px",
85
+ xl: "12px"
86
+ },
87
+ semantic: {
88
+ background: {
89
+ default: "#fafafa",
90
+ elevated: "#ffffff",
91
+ subtle: "#f4f4f5"
92
+ },
93
+ border: {
94
+ default: "#e4e4e7",
95
+ strong: "#d4d4d8"
96
+ },
97
+ interactive: {
98
+ destructive: "#ef4444",
99
+ primary: "#0d9488",
100
+ primaryHover: "#0f766e",
101
+ primaryPressed: "#115e59"
102
+ },
103
+ text: {
104
+ default: "#18181b",
105
+ inverted: "#fafafa",
106
+ muted: "#52525b"
107
+ }
108
+ },
109
+ shadow: {
110
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
111
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
112
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
113
+ },
114
+ spacing: {
115
+ "0": "0px",
116
+ "1": "4px",
117
+ "10": "40px",
118
+ "12": "48px",
119
+ "16": "64px",
120
+ "2": "8px",
121
+ "20": "80px",
122
+ "24": "96px",
123
+ "3": "12px",
124
+ "4": "16px",
125
+ "5": "20px",
126
+ "6": "24px",
127
+ "8": "32px"
128
+ }
129
+ };
130
+ var themeDark = {
131
+ color: {
132
+ danger: "#ef4444",
133
+ info: "#3b82f6",
134
+ neutral: {
135
+ "100": "#f4f4f5",
136
+ "200": "#e4e4e7",
137
+ "300": "#d4d4d8",
138
+ "400": "#a1a1aa",
139
+ "50": "#fafafa",
140
+ "500": "#71717a",
141
+ "600": "#52525b",
142
+ "700": "#3f3f46",
143
+ "800": "#27272a",
144
+ "900": "#18181b"
145
+ },
146
+ primary: {
147
+ "100": "#ccfbf1",
148
+ "200": "#99f6e4",
149
+ "300": "#5eead4",
150
+ "400": "#2dd4bf",
151
+ "50": "#f0fdfa",
152
+ "500": "#14b8a6",
153
+ "600": "#0d9488",
154
+ "700": "#0f766e",
155
+ "800": "#115e59",
156
+ "900": "#134e4a"
157
+ },
158
+ success: "#22c55e",
159
+ warning: "#f59e0b"
160
+ },
161
+ fontFamily: {
162
+ body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
163
+ display: "ui-serif, Georgia, 'Times New Roman', serif",
164
+ mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
165
+ },
166
+ fontSize: {
167
+ "2xl": "24px",
168
+ "3xl": "30px",
169
+ "4xl": "36px",
170
+ lg: "18px",
171
+ md: "16px",
172
+ sm: "14px",
173
+ xl: "20px",
174
+ xs: "12px"
175
+ },
176
+ fontWeight: {
177
+ bold: "700",
178
+ medium: "500",
179
+ regular: "400",
180
+ semibold: "600"
181
+ },
182
+ lineHeight: {
183
+ normal: "1.4",
184
+ relaxed: "1.6",
185
+ tight: "1.2"
186
+ },
187
+ radius: {
188
+ "2xl": "16px",
189
+ full: "9999px",
190
+ lg: "8px",
191
+ md: "6px",
192
+ none: "0px",
193
+ sm: "4px",
194
+ xl: "12px"
195
+ },
196
+ semantic: {
197
+ background: {
198
+ default: "#18181b",
199
+ elevated: "#3f3f46",
200
+ subtle: "#27272a"
201
+ },
202
+ border: {
203
+ default: "#3f3f46",
204
+ strong: "#52525b"
205
+ },
206
+ interactive: {
207
+ destructive: "#ef4444",
208
+ primary: "#2dd4bf",
209
+ primaryHover: "#5eead4",
210
+ primaryPressed: "#99f6e4"
211
+ },
212
+ text: {
213
+ default: "#fafafa",
214
+ inverted: "#18181b",
215
+ muted: "#a1a1aa"
216
+ }
217
+ },
218
+ shadow: {
219
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
220
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
221
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
222
+ },
223
+ spacing: {
224
+ "0": "0px",
225
+ "1": "4px",
226
+ "10": "40px",
227
+ "12": "48px",
228
+ "16": "64px",
229
+ "2": "8px",
230
+ "20": "80px",
231
+ "24": "96px",
232
+ "3": "12px",
233
+ "4": "16px",
234
+ "5": "20px",
235
+ "6": "24px",
236
+ "8": "32px"
237
+ }
238
+ };
239
+ var defaultTheme = {
240
+ light: theme,
241
+ dark: themeDark
242
+ };
243
+ var ThemeContext = react.createContext(defaultTheme);
244
+ ThemeContext.displayName = "ThemeContext";
245
+ var ColorSchemeOverrideContext = react.createContext(null);
246
+ ColorSchemeOverrideContext.displayName = "ColorSchemeOverrideContext";
247
+ var isWeb = reactNative.Platform.OS === "web";
248
+ function readWebScheme() {
249
+ if (typeof document === "undefined") {
250
+ return "light";
251
+ }
252
+ const root = document.documentElement;
253
+ if (root.classList.contains("dark")) {
254
+ return "dark";
255
+ }
256
+ if (root.getAttribute("data-theme") === "dark") {
257
+ return "dark";
258
+ }
259
+ return "light";
260
+ }
261
+ __name(readWebScheme, "readWebScheme");
262
+ function useColorScheme() {
263
+ const override = react.useContext(ColorSchemeOverrideContext);
264
+ const [scheme, setScheme] = react.useState(() => {
265
+ if (isWeb) {
266
+ return readWebScheme();
267
+ }
268
+ return reactNative.Appearance.getColorScheme() ?? "light";
269
+ });
270
+ react.useEffect(() => {
271
+ if (isWeb) {
272
+ const root = document.documentElement;
273
+ const update = /* @__PURE__ */ __name(() => setScheme(readWebScheme()), "update");
274
+ const observer = new MutationObserver(update);
275
+ observer.observe(root, { attributes: true, attributeFilter: ["class", "data-theme"] });
276
+ update();
277
+ return () => observer.disconnect();
278
+ }
279
+ const sub = reactNative.Appearance.addChangeListener(({ colorScheme }) => {
280
+ setScheme(colorScheme ?? "light");
281
+ });
282
+ return () => sub.remove();
283
+ }, []);
284
+ return override ?? scheme;
285
+ }
286
+ __name(useColorScheme, "useColorScheme");
287
+
288
+ // src/theme/use-theme-colors.ts
289
+ function useThemeColors() {
290
+ const scheme = useColorScheme();
291
+ const themePair = react.useContext(ThemeContext);
292
+ return scheme === "dark" ? themePair.dark : themePair.light;
293
+ }
294
+ __name(useThemeColors, "useThemeColors");
295
+
296
+ // src/utils/cn.ts
297
+ function cn(...inputs) {
298
+ const out = [];
299
+ for (const input of inputs) {
300
+ append(out, input);
301
+ }
302
+ return out.join(" ");
303
+ }
304
+ __name(cn, "cn");
305
+ function append(out, input) {
306
+ if (!input) {
307
+ return;
308
+ }
309
+ if (typeof input === "string") {
310
+ if (input.length > 0) {
311
+ out.push(input);
312
+ }
313
+ return;
314
+ }
315
+ if (typeof input === "number") {
316
+ return;
317
+ }
318
+ if (Array.isArray(input)) {
319
+ for (const inner of input) {
320
+ append(out, inner);
321
+ }
322
+ return;
323
+ }
324
+ if (typeof input === "object") {
325
+ for (const key of Object.keys(input)) {
326
+ if (input[key]) {
327
+ out.push(key);
328
+ }
329
+ }
330
+ }
331
+ }
332
+ __name(append, "append");
333
+ var CollapsibleContext = react.createContext(null);
334
+ var useCollapsibleContext = /* @__PURE__ */ __name((label) => {
335
+ const ctx = react.useContext(CollapsibleContext);
336
+ if (!ctx) {
337
+ throw new Error(`<${label}> must be rendered inside a <Collapsible>.`);
338
+ }
339
+ return ctx;
340
+ }, "useCollapsibleContext");
341
+ var CollapsibleRoot = /* @__PURE__ */ __name(({
342
+ open: controlledOpen,
343
+ defaultOpen = false,
344
+ onOpenChange,
345
+ children,
346
+ className,
347
+ testID
348
+ }) => {
349
+ const baseId = react.useId();
350
+ const [innerOpen, setInnerOpen] = react.useState(defaultOpen);
351
+ const isControlled = controlledOpen !== void 0;
352
+ const open = isControlled ? controlledOpen : innerOpen;
353
+ const toggle = react.useCallback(() => {
354
+ const next = !open;
355
+ if (!isControlled) {
356
+ setInnerOpen(next);
357
+ }
358
+ onOpenChange?.(next);
359
+ }, [open, isControlled, onOpenChange]);
360
+ const ctx = react.useMemo(
361
+ () => ({
362
+ open,
363
+ toggle,
364
+ contentId: `${baseId}-content`,
365
+ triggerId: `${baseId}-trigger`
366
+ }),
367
+ [open, toggle, baseId]
368
+ );
369
+ return /* @__PURE__ */ jsxRuntime.jsx(CollapsibleContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
370
+ reactNative.View,
371
+ {
372
+ ...testID !== void 0 ? { testID } : {},
373
+ className: cn("flex-col", className),
374
+ style: { flexDirection: "column" },
375
+ children
376
+ }
377
+ ) });
378
+ }, "CollapsibleRoot");
379
+ var CollapsibleTrigger = /* @__PURE__ */ __name(({ children, className, testID }) => {
380
+ const { open, toggle, contentId, triggerId } = useCollapsibleContext("Collapsible.Trigger");
381
+ const colors = useThemeColors();
382
+ const triggerStyle = {
383
+ flexDirection: "row",
384
+ alignItems: "center",
385
+ paddingVertical: px(colors.spacing["2"]),
386
+ paddingHorizontal: px(colors.spacing["1"])
387
+ };
388
+ return /* @__PURE__ */ jsxRuntime.jsx(
389
+ reactNative.Pressable,
390
+ {
391
+ id: triggerId,
392
+ ...testID !== void 0 ? { testID } : {},
393
+ role: "button",
394
+ accessibilityRole: "button",
395
+ "aria-expanded": open,
396
+ "aria-controls": contentId,
397
+ onPress: toggle,
398
+ className: cn("flex-row items-center py-2 px-1", className),
399
+ style: triggerStyle,
400
+ children: typeof children === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
401
+ reactNative.Text,
402
+ {
403
+ style: {
404
+ color: colors.semantic.text.default,
405
+ fontFamily: colors.fontFamily.body,
406
+ fontSize: px(colors.fontSize.sm),
407
+ fontWeight: colors.fontWeight.medium
408
+ },
409
+ children
410
+ }
411
+ ) : children
412
+ }
413
+ );
414
+ }, "CollapsibleTrigger");
415
+ var CollapsibleContent = /* @__PURE__ */ __name(({ children, className, testID }) => {
416
+ const { open, contentId, triggerId } = useCollapsibleContext("Collapsible.Content");
417
+ const wrapperRef = react.useRef(null);
418
+ const innerRef = react.useRef(null);
419
+ react.useEffect(() => {
420
+ if (reactNative.Platform.OS !== "web") {
421
+ return;
422
+ }
423
+ const wrapper = wrapperRef.current;
424
+ const inner = innerRef.current;
425
+ if (!wrapper || !inner) {
426
+ return;
427
+ }
428
+ const isFirstPaint = wrapper.dataset.noriPainted !== "1";
429
+ wrapper.dataset.noriPainted = "1";
430
+ wrapper.style.overflow = "hidden";
431
+ wrapper.style.transitionProperty = "max-height, opacity";
432
+ wrapper.style.transitionDuration = "200ms";
433
+ wrapper.style.transitionTimingFunction = "cubic-bezier(0.16, 1, 0.3, 1)";
434
+ if (open) {
435
+ const target = inner.scrollHeight;
436
+ if (isFirstPaint) {
437
+ wrapper.style.maxHeight = `${target}px`;
438
+ wrapper.style.opacity = "1";
439
+ return;
440
+ }
441
+ wrapper.style.maxHeight = "0px";
442
+ wrapper.style.opacity = "0";
443
+ void wrapper.offsetHeight;
444
+ requestAnimationFrame(() => {
445
+ wrapper.style.maxHeight = `${target}px`;
446
+ wrapper.style.opacity = "1";
447
+ });
448
+ } else {
449
+ if (isFirstPaint) {
450
+ wrapper.style.maxHeight = "0px";
451
+ wrapper.style.opacity = "0";
452
+ return;
453
+ }
454
+ const current = inner.scrollHeight;
455
+ wrapper.style.maxHeight = `${current}px`;
456
+ wrapper.style.opacity = "1";
457
+ void wrapper.offsetHeight;
458
+ requestAnimationFrame(() => {
459
+ wrapper.style.maxHeight = "0px";
460
+ wrapper.style.opacity = "0";
461
+ });
462
+ }
463
+ }, [open]);
464
+ if (reactNative.Platform.OS !== "web") {
465
+ if (!open) {
466
+ return null;
467
+ }
468
+ return /* @__PURE__ */ jsxRuntime.jsx(
469
+ reactNative.View,
470
+ {
471
+ ...testID !== void 0 ? { testID } : {},
472
+ id: contentId,
473
+ "aria-labelledby": triggerId,
474
+ className: cn("flex-col", className),
475
+ style: { flexDirection: "column" },
476
+ children
477
+ }
478
+ );
479
+ }
480
+ return /* @__PURE__ */ jsxRuntime.jsx(
481
+ reactNative.View,
482
+ {
483
+ ref: (node) => {
484
+ wrapperRef.current = node;
485
+ },
486
+ ...testID !== void 0 ? { testID } : {},
487
+ id: contentId,
488
+ "aria-labelledby": triggerId,
489
+ "aria-hidden": !open,
490
+ className: cn("overflow-hidden", className),
491
+ children: /* @__PURE__ */ jsxRuntime.jsx(
492
+ reactNative.View,
493
+ {
494
+ ref: (node) => {
495
+ innerRef.current = node;
496
+ },
497
+ className: "flex-col",
498
+ style: { flexDirection: "column" },
499
+ children
500
+ }
501
+ )
502
+ }
503
+ );
504
+ }, "CollapsibleContent");
505
+ var Collapsible = Object.assign(CollapsibleRoot, {
506
+ Trigger: CollapsibleTrigger,
507
+ Content: CollapsibleContent
508
+ });
509
+
510
+ exports.Collapsible = Collapsible;
511
+ //# sourceMappingURL=index.cjs.map
512
+ //# sourceMappingURL=index.cjs.map