@nori-ui/core 1.0.6 → 1.2.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 (174) hide show
  1. package/dist/chunk-2UXKXUX2.js +286 -0
  2. package/dist/chunk-2UXKXUX2.js.map +1 -0
  3. package/dist/{chunk-DDGMLLS3.js → chunk-46OT4PA6.js} +3 -3
  4. package/dist/{chunk-DDGMLLS3.js.map → chunk-46OT4PA6.js.map} +1 -1
  5. package/dist/{chunk-SFNDR6DI.js → chunk-5BM6H2CD.js} +3 -3
  6. package/dist/{chunk-SFNDR6DI.js.map → chunk-5BM6H2CD.js.map} +1 -1
  7. package/dist/{chunk-EWWQQ5DB.js → chunk-6JVUVBZH.js} +5 -5
  8. package/dist/{chunk-EWWQQ5DB.js.map → chunk-6JVUVBZH.js.map} +1 -1
  9. package/dist/{chunk-FT2XBBQJ.js → chunk-6PO2IWB3.js} +8 -5
  10. package/dist/chunk-6PO2IWB3.js.map +1 -0
  11. package/dist/{chunk-YNKKEO2A.js → chunk-7D2BHQ6M.js} +3 -3
  12. package/dist/{chunk-YNKKEO2A.js.map → chunk-7D2BHQ6M.js.map} +1 -1
  13. package/dist/{chunk-MRJWPRCX.js → chunk-AFQIK6JI.js} +3 -3
  14. package/dist/{chunk-MRJWPRCX.js.map → chunk-AFQIK6JI.js.map} +1 -1
  15. package/dist/{chunk-IKLA2CVQ.js → chunk-C6TRLHMW.js} +21 -5
  16. package/dist/chunk-C6TRLHMW.js.map +1 -0
  17. package/dist/{chunk-NRYWNOG5.js → chunk-CGQIVFCN.js} +3 -3
  18. package/dist/{chunk-NRYWNOG5.js.map → chunk-CGQIVFCN.js.map} +1 -1
  19. package/dist/chunk-EFK7726V.js +104 -0
  20. package/dist/chunk-EFK7726V.js.map +1 -0
  21. package/dist/{chunk-3BDDPFCI.js → chunk-FDBQOQMW.js} +3 -3
  22. package/dist/{chunk-3BDDPFCI.js.map → chunk-FDBQOQMW.js.map} +1 -1
  23. package/dist/{chunk-XALU6LOT.js → chunk-GELLSU64.js} +3 -3
  24. package/dist/{chunk-XALU6LOT.js.map → chunk-GELLSU64.js.map} +1 -1
  25. package/dist/{chunk-BZLT6R62.js → chunk-GRDVE3IR.js} +3 -3
  26. package/dist/{chunk-BZLT6R62.js.map → chunk-GRDVE3IR.js.map} +1 -1
  27. package/dist/{chunk-OMU4R4Y5.js → chunk-HTF6FDB6.js} +3 -3
  28. package/dist/{chunk-OMU4R4Y5.js.map → chunk-HTF6FDB6.js.map} +1 -1
  29. package/dist/{chunk-X7APG7G2.js → chunk-HZKXPN6B.js} +154 -34
  30. package/dist/chunk-HZKXPN6B.js.map +1 -0
  31. package/dist/{chunk-WGT345SV.js → chunk-IGLMPAWE.js} +3 -3
  32. package/dist/{chunk-WGT345SV.js.map → chunk-IGLMPAWE.js.map} +1 -1
  33. package/dist/{chunk-5XEGZFG5.js → chunk-LWQZ257T.js} +3 -3
  34. package/dist/{chunk-5XEGZFG5.js.map → chunk-LWQZ257T.js.map} +1 -1
  35. package/dist/{chunk-RFW5SRZA.js → chunk-MJ4AGXS7.js} +3 -3
  36. package/dist/{chunk-RFW5SRZA.js.map → chunk-MJ4AGXS7.js.map} +1 -1
  37. package/dist/{chunk-PNP7L4TA.js → chunk-RM5TSXVE.js} +3 -3
  38. package/dist/{chunk-PNP7L4TA.js.map → chunk-RM5TSXVE.js.map} +1 -1
  39. package/dist/{chunk-MKSDYRWQ.js → chunk-SINLREQV.js} +3 -3
  40. package/dist/{chunk-MKSDYRWQ.js.map → chunk-SINLREQV.js.map} +1 -1
  41. package/dist/{chunk-TLS54G6Y.js → chunk-UF5OENHV.js} +3 -3
  42. package/dist/{chunk-TLS54G6Y.js.map → chunk-UF5OENHV.js.map} +1 -1
  43. package/dist/{chunk-ZQMNGPLE.js → chunk-UJ5KFRDE.js} +18 -6
  44. package/dist/chunk-UJ5KFRDE.js.map +1 -0
  45. package/dist/{chunk-SWC5CNKE.js → chunk-UPVNZPFV.js} +3 -3
  46. package/dist/{chunk-SWC5CNKE.js.map → chunk-UPVNZPFV.js.map} +1 -1
  47. package/dist/{chunk-3F4TXKDY.js → chunk-UUXWRDWW.js} +3 -3
  48. package/dist/chunk-UUXWRDWW.js.map +1 -0
  49. package/dist/{chunk-7GPDNQSX.js → chunk-V2AWSDDZ.js} +5 -5
  50. package/dist/{chunk-7GPDNQSX.js.map → chunk-V2AWSDDZ.js.map} +1 -1
  51. package/dist/{chunk-JQQ3FBN7.js → chunk-VCJF75T2.js} +3 -3
  52. package/dist/{chunk-JQQ3FBN7.js.map → chunk-VCJF75T2.js.map} +1 -1
  53. package/dist/{chunk-ZBW3BA5R.js → chunk-VMAGFYHG.js} +39 -4
  54. package/dist/chunk-VMAGFYHG.js.map +1 -0
  55. package/dist/{chunk-JZ774T7U.js → chunk-W3HMOOON.js} +3 -3
  56. package/dist/{chunk-JZ774T7U.js.map → chunk-W3HMOOON.js.map} +1 -1
  57. package/dist/{chunk-6AD6KCVB.js → chunk-WAKKQROH.js} +3 -3
  58. package/dist/{chunk-6AD6KCVB.js.map → chunk-WAKKQROH.js.map} +1 -1
  59. package/dist/{chunk-LVWNMQGR.js → chunk-WDNDTSNX.js} +5 -5
  60. package/dist/{chunk-LVWNMQGR.js.map → chunk-WDNDTSNX.js.map} +1 -1
  61. package/dist/chunk-WOF67PKT.js +60 -0
  62. package/dist/chunk-WOF67PKT.js.map +1 -0
  63. package/dist/{chunk-QJNV7YQP.js → chunk-WTNDPO2V.js} +39 -4
  64. package/dist/chunk-WTNDPO2V.js.map +1 -0
  65. package/dist/chunk-XBNVKPJN.js +343 -0
  66. package/dist/chunk-XBNVKPJN.js.map +1 -0
  67. package/dist/{chunk-FEPTH5RV.js → chunk-XP55RZ3D.js} +3 -3
  68. package/dist/{chunk-FEPTH5RV.js.map → chunk-XP55RZ3D.js.map} +1 -1
  69. package/dist/{chunk-CCUXO2HN.js → chunk-Y4ZRSW35.js} +3 -3
  70. package/dist/{chunk-CCUXO2HN.js.map → chunk-Y4ZRSW35.js.map} +1 -1
  71. package/dist/client.cjs +948 -123
  72. package/dist/client.cjs.map +1 -1
  73. package/dist/client.d.cts +3 -0
  74. package/dist/client.d.ts +3 -0
  75. package/dist/client.js +42 -39
  76. package/dist/client.js.map +1 -1
  77. package/dist/components/Accordion/index.js +2 -2
  78. package/dist/components/Alert/index.js +2 -2
  79. package/dist/components/AlertDialog/index.js +2 -2
  80. package/dist/components/Avatar/index.js +2 -2
  81. package/dist/components/Badge/index.js +2 -2
  82. package/dist/components/Box/index.js +4 -4
  83. package/dist/components/Breadcrumb/index.cjs +6 -3
  84. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  85. package/dist/components/Breadcrumb/index.js +5 -5
  86. package/dist/components/Button/index.js +2 -2
  87. package/dist/components/Calendar/index.cjs +170 -35
  88. package/dist/components/Calendar/index.cjs.map +1 -1
  89. package/dist/components/Calendar/index.js +5 -5
  90. package/dist/components/Card/index.js +2 -2
  91. package/dist/components/Checkbox/index.cjs +36 -1
  92. package/dist/components/Checkbox/index.cjs.map +1 -1
  93. package/dist/components/Checkbox/index.d.cts +17 -1
  94. package/dist/components/Checkbox/index.d.ts +17 -1
  95. package/dist/components/Checkbox/index.js +2 -2
  96. package/dist/components/DatePicker/index.cjs +3875 -0
  97. package/dist/components/DatePicker/index.cjs.map +1 -0
  98. package/dist/components/DatePicker/index.d.cts +58 -0
  99. package/dist/components/DatePicker/index.d.ts +58 -0
  100. package/dist/components/DatePicker/index.js +14 -0
  101. package/dist/components/DatePicker/index.js.map +1 -0
  102. package/dist/components/Dialog/index.js +2 -2
  103. package/dist/components/Field/index.cjs +703 -0
  104. package/dist/components/Field/index.cjs.map +1 -0
  105. package/dist/components/Field/index.d.cts +51 -0
  106. package/dist/components/Field/index.d.ts +51 -0
  107. package/dist/components/Field/index.js +9 -0
  108. package/dist/components/Field/index.js.map +1 -0
  109. package/dist/components/FloatButton/index.cjs +6 -3
  110. package/dist/components/FloatButton/index.cjs.map +1 -1
  111. package/dist/components/FloatButton/index.js +5 -5
  112. package/dist/components/HStack/index.js +4 -4
  113. package/dist/components/InputGroup/index.cjs.map +1 -1
  114. package/dist/components/InputGroup/index.d.cts +8 -1
  115. package/dist/components/InputGroup/index.d.ts +8 -1
  116. package/dist/components/InputGroup/index.js +2 -2
  117. package/dist/components/Label/index.cjs +458 -0
  118. package/dist/components/Label/index.cjs.map +1 -0
  119. package/dist/components/Label/index.d.cts +14 -0
  120. package/dist/components/Label/index.d.ts +14 -0
  121. package/dist/components/Label/index.js +8 -0
  122. package/dist/components/Label/index.js.map +1 -0
  123. package/dist/components/Pagination/index.cjs +21 -6
  124. package/dist/components/Pagination/index.cjs.map +1 -1
  125. package/dist/components/Pagination/index.js +5 -5
  126. package/dist/components/Popover/index.js +2 -2
  127. package/dist/components/Progress/index.js +2 -2
  128. package/dist/components/Radio/index.cjs +18 -2
  129. package/dist/components/Radio/index.cjs.map +1 -1
  130. package/dist/components/Radio/index.d.cts +17 -1
  131. package/dist/components/Radio/index.d.ts +17 -1
  132. package/dist/components/Radio/index.js +2 -2
  133. package/dist/components/SegmentedControl/index.js +2 -2
  134. package/dist/components/Select/index.cjs +15 -3
  135. package/dist/components/Select/index.cjs.map +1 -1
  136. package/dist/components/Select/index.d.cts +6 -0
  137. package/dist/components/Select/index.d.ts +6 -0
  138. package/dist/components/Select/index.js +2 -2
  139. package/dist/components/Switch/index.cjs +36 -1
  140. package/dist/components/Switch/index.cjs.map +1 -1
  141. package/dist/components/Switch/index.d.cts +17 -1
  142. package/dist/components/Switch/index.d.ts +17 -1
  143. package/dist/components/Switch/index.js +2 -2
  144. package/dist/components/Tabs/index.js +2 -2
  145. package/dist/components/Text/index.js +2 -2
  146. package/dist/components/TextArea/index.cjs +35 -84
  147. package/dist/components/TextArea/index.cjs.map +1 -1
  148. package/dist/components/TextArea/index.js +3 -3
  149. package/dist/components/TextInput/index.cjs +35 -84
  150. package/dist/components/TextInput/index.cjs.map +1 -1
  151. package/dist/components/TextInput/index.d.cts +7 -8
  152. package/dist/components/TextInput/index.d.ts +7 -8
  153. package/dist/components/TextInput/index.js +2 -2
  154. package/dist/components/Toggle/index.js +2 -2
  155. package/dist/components/Tooltip/index.js +2 -2
  156. package/dist/components/VStack/index.js +4 -4
  157. package/dist/i18n/index.cjs +6 -3
  158. package/dist/i18n/index.cjs.map +1 -1
  159. package/dist/i18n/index.js +1 -1
  160. package/dist/index.cjs +948 -123
  161. package/dist/index.cjs.map +1 -1
  162. package/dist/index.d.cts +3 -0
  163. package/dist/index.d.ts +3 -0
  164. package/dist/index.js +39 -36
  165. package/package.json +8 -1
  166. package/dist/chunk-3F4TXKDY.js.map +0 -1
  167. package/dist/chunk-FT2XBBQJ.js.map +0 -1
  168. package/dist/chunk-IKLA2CVQ.js.map +0 -1
  169. package/dist/chunk-QJNV7YQP.js.map +0 -1
  170. package/dist/chunk-X7APG7G2.js.map +0 -1
  171. package/dist/chunk-ZBW3BA5R.js.map +0 -1
  172. package/dist/chunk-ZQMNGPLE.js.map +0 -1
  173. package/dist/chunk-ZRD4FQBT.js +0 -153
  174. package/dist/chunk-ZRD4FQBT.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1950,8 +1950,8 @@ var defaultDictionary = {
1950
1950
  // floatButton
1951
1951
  "floatButton.backToTop": "Back to top",
1952
1952
  // calendar
1953
- "calendar.header.previous": "Previous",
1954
- "calendar.header.next": "Next",
1953
+ "calendar.header.previous": "Previous month",
1954
+ "calendar.header.next": "Next month",
1955
1955
  "calendar.header.openMonthView": "Open month picker",
1956
1956
  "calendar.header.openYearView": "Open year picker",
1957
1957
  "calendar.header.openDayView": "Open day picker",
@@ -1967,7 +1967,10 @@ var defaultDictionary = {
1967
1967
  "checkbox.checked": "Checked",
1968
1968
  "checkbox.unchecked": "Unchecked",
1969
1969
  "switch.on": "On",
1970
- "switch.off": "Off"
1970
+ "switch.off": "Off",
1971
+ // field
1972
+ "field.requiredIndicator": "*",
1973
+ "field.requiredLabel": "required"
1971
1974
  };
1972
1975
 
1973
1976
  // src/i18n/resolve.ts
@@ -3667,6 +3670,13 @@ var useLocale = /* @__PURE__ */ __name(() => {
3667
3670
  return ctx ?? detectLocale();
3668
3671
  }, "useLocale");
3669
3672
 
3673
+ // src/components/Calendar/scroll/ScrollBody.tsx
3674
+ var ScrollBody = /* @__PURE__ */ __name((_props) => {
3675
+ throw new Error(
3676
+ "[Calendar] ScrollBody: no platform implementation resolved. Ensure your bundler honors *.web.tsx / *.native.tsx extensions."
3677
+ );
3678
+ }, "ScrollBody");
3679
+
3670
3680
  // src/components/Calendar/state/locale-utils.ts
3671
3681
  var getFirstDayOfWeek = /* @__PURE__ */ __name((locale) => {
3672
3682
  try {
@@ -4028,9 +4038,15 @@ var Select = /* @__PURE__ */ __name((props) => {
4028
4038
  itemHeight = DEFAULT_ITEM_HEIGHT,
4029
4039
  maxMenuHeight = DEFAULT_MAX_MENU,
4030
4040
  className,
4031
- testID
4041
+ testID,
4042
+ id,
4043
+ name
4032
4044
  } = props;
4033
4045
  const ariaLabel = props["aria-label"];
4046
+ const ariaLabelledBy = props["aria-labelledby"];
4047
+ const ariaDescribedBy = props["aria-describedby"];
4048
+ const ariaInvalid = props["aria-invalid"];
4049
+ const ariaRequired = props["aria-required"];
4034
4050
  const multiple = props.multiple === true;
4035
4051
  const maxSelected = multiple ? props.maxSelected : void 0;
4036
4052
  const maxChips = multiple ? props.maxChips ?? 3 : void 0;
@@ -4394,11 +4410,11 @@ var Select = /* @__PURE__ */ __name((props) => {
4394
4410
  if (!open || searchable || reactNative.Platform.OS !== "web") {
4395
4411
  return;
4396
4412
  }
4397
- const id = requestAnimationFrame(() => {
4413
+ const id2 = requestAnimationFrame(() => {
4398
4414
  const node = popupRef.current;
4399
4415
  node?.focus?.();
4400
4416
  });
4401
- return () => cancelAnimationFrame(id);
4417
+ return () => cancelAnimationFrame(id2);
4402
4418
  }, [open, searchable]);
4403
4419
  const onListScroll = React.useCallback(
4404
4420
  (event) => {
@@ -4475,7 +4491,13 @@ var Select = /* @__PURE__ */ __name((props) => {
4475
4491
  "aria-controls": `${baseId}-listbox`,
4476
4492
  "aria-haspopup": "listbox",
4477
4493
  tabIndex: disabled ? -1 : 0,
4494
+ ...id !== void 0 ? { id, nativeID: id } : {},
4495
+ ...name !== void 0 ? { name } : {},
4478
4496
  ...ariaLabel !== void 0 ? { "aria-label": ariaLabel, accessibilityLabel: ariaLabel } : {},
4497
+ ...ariaLabelledBy !== void 0 ? { "aria-labelledby": ariaLabelledBy, accessibilityLabelledBy: ariaLabelledBy } : {},
4498
+ ...ariaDescribedBy !== void 0 ? { "aria-describedby": ariaDescribedBy, accessibilityDescribedBy: ariaDescribedBy } : {},
4499
+ ...ariaInvalid === true ? { "aria-invalid": true } : {},
4500
+ ...ariaRequired === true ? { "aria-required": true } : {},
4479
4501
  ...disabled ? { "aria-disabled": true, disabled: true } : {}
4480
4502
  },
4481
4503
  onPress: () => {
@@ -5149,7 +5171,7 @@ var Caption = /* @__PURE__ */ __name(({
5149
5171
  alignSelf: "center"
5150
5172
  },
5151
5173
  children: [
5152
- /* @__PURE__ */ jsxRuntime.jsx(NavButton, { label: t("calendar.header.previous", { defaultValue: "Previous" }), onPress: onPrev, children: "\u2039" }),
5174
+ /* @__PURE__ */ jsxRuntime.jsx(NavButton, { label: t("calendar.header.previous", { defaultValue: "Previous month" }), onPress: onPrev, children: "\u2039" }),
5153
5175
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { flexDirection: "row", gap: monthGap, width: titleRowWidth }, children: showMultiTitles ? months.map((m, i) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { width: gridWidth, alignItems: "center" }, children: caption === "dropdown" && view === "day" ? /* @__PURE__ */ jsxRuntime.jsx(
5154
5176
  DropdownPair,
5155
5177
  {
@@ -5195,7 +5217,7 @@ var Caption = /* @__PURE__ */ __name(({
5195
5217
  drilldown: true
5196
5218
  }
5197
5219
  ) }) }),
5198
- /* @__PURE__ */ jsxRuntime.jsx(NavButton, { label: t("calendar.header.next", { defaultValue: "Next" }), onPress: onNext, children: "\u203A" })
5220
+ /* @__PURE__ */ jsxRuntime.jsx(NavButton, { label: t("calendar.header.next", { defaultValue: "Next month" }), onPress: onNext, children: "\u203A" })
5199
5221
  ]
5200
5222
  }
5201
5223
  );
@@ -5238,8 +5260,53 @@ var DropdownPair = /* @__PURE__ */ __name(({ month, year, monthOptions, yearOpti
5238
5260
  ] });
5239
5261
  }, "DropdownPair");
5240
5262
  var CELL_SIZE = 40;
5241
- var DayCell = /* @__PURE__ */ __name(({ ctx, onPress, onHoverIn, onHoverOut, renderDay }) => {
5263
+ var formatterCache = /* @__PURE__ */ new Map();
5264
+ var RUNTIME_DEFAULT_LOCALE_KEY = "__default__";
5265
+ var getDayFormatter = /* @__PURE__ */ __name((locale) => {
5266
+ const key = locale ?? RUNTIME_DEFAULT_LOCALE_KEY;
5267
+ const cached2 = formatterCache.get(key);
5268
+ if (cached2) {
5269
+ return cached2;
5270
+ }
5271
+ try {
5272
+ const fmt = new Intl.DateTimeFormat(locale, {
5273
+ weekday: "long",
5274
+ month: "long",
5275
+ day: "numeric",
5276
+ year: "numeric",
5277
+ timeZone: "UTC"
5278
+ });
5279
+ formatterCache.set(key, fmt);
5280
+ return fmt;
5281
+ } catch {
5282
+ return null;
5283
+ }
5284
+ }, "getDayFormatter");
5285
+ var formatDayLabel = /* @__PURE__ */ __name((ctx, locale) => {
5286
+ const jsDate = new Date(Date.UTC(ctx.date.year, ctx.date.month - 1, ctx.date.day));
5287
+ const fmt = getDayFormatter(locale);
5288
+ const base = fmt ? fmt.format(jsDate) : (
5289
+ // Fallback if the runtime rejects the locale tag.
5290
+ `${ctx.date.month}/${ctx.date.day}/${ctx.date.year}`
5291
+ );
5292
+ const suffixes = [];
5293
+ if (ctx.isToday) {
5294
+ suffixes.push("today");
5295
+ }
5296
+ if (ctx.isSelected || ctx.isRangeStart || ctx.isRangeEnd) {
5297
+ suffixes.push("selected");
5298
+ }
5299
+ if (ctx.isInRange && !ctx.isRangeStart && !ctx.isRangeEnd) {
5300
+ suffixes.push("in range");
5301
+ }
5302
+ if (ctx.isUnavailable) {
5303
+ suffixes.push("unavailable");
5304
+ }
5305
+ return suffixes.length > 0 ? `${base}, ${suffixes.join(", ")}` : base;
5306
+ }, "formatDayLabel");
5307
+ var DayCell = /* @__PURE__ */ __name(({ ctx, onPress, onHoverIn, onHoverOut, renderDay, locale }) => {
5242
5308
  const colors = useThemeColors();
5309
+ const accessibilityLabel = formatDayLabel(ctx, locale);
5243
5310
  const isSelectedLike = ctx.isSelected || ctx.isRangeStart || ctx.isRangeEnd;
5244
5311
  const isInsideRange = ctx.isInRange || ctx.isInPreviewRange;
5245
5312
  const isRangeMiddle = isInsideRange && !isSelectedLike;
@@ -5248,7 +5315,8 @@ var DayCell = /* @__PURE__ */ __name(({ ctx, onPress, onHoverIn, onHoverOut, ren
5248
5315
  reactNative.Pressable,
5249
5316
  {
5250
5317
  accessibilityRole: "button",
5251
- accessibilityState: { disabled: ctx.isUnavailable },
5318
+ accessibilityLabel,
5319
+ accessibilityState: { disabled: ctx.isUnavailable, selected: isSelectedLike },
5252
5320
  disabled: ctx.isUnavailable,
5253
5321
  onPress,
5254
5322
  ...onHoverIn ? { onHoverIn } : {},
@@ -5506,6 +5574,7 @@ var DayGrid = /* @__PURE__ */ __name((props) => {
5506
5574
  DayCell,
5507
5575
  {
5508
5576
  ctx,
5577
+ locale,
5509
5578
  onPress: () => onDayPress(date),
5510
5579
  ...onDayHover ? {
5511
5580
  onHoverIn: /* @__PURE__ */ __name(() => onDayHover(date), "onHoverIn"),
@@ -5668,6 +5737,9 @@ var focusDayCell = /* @__PURE__ */ __name((root, date, force) => {
5668
5737
  if (!root) {
5669
5738
  return;
5670
5739
  }
5740
+ if (typeof document === "undefined" || typeof root.contains !== "function") {
5741
+ return;
5742
+ }
5671
5743
  if (!force && !root.contains(document.activeElement)) {
5672
5744
  return;
5673
5745
  }
@@ -5772,8 +5844,13 @@ var SingleOrMultiCalendar = /* @__PURE__ */ __name((props) => {
5772
5844
  const colors = useThemeColors();
5773
5845
  const firstDayOfWeek = props.firstDayOfWeek ?? getFirstDayOfWeek(locale);
5774
5846
  const weekendDays = props.weekendDays ?? getWeekendDays(locale);
5775
- const visibleMonths = pickVisibleMonths(props.visibleMonths, containerWidth);
5847
+ const visibleMonths = props.behavior === "scroll" ? 1 : pickVisibleMonths(props.visibleMonths, containerWidth);
5776
5848
  const { innerWidth, gridsRowWidth } = surfaceMetrics(visibleMonths);
5849
+ React.useEffect(() => {
5850
+ if (process.env.NODE_ENV !== "production" && props.behavior === "scroll" && typeof props.visibleMonths === "number" && props.visibleMonths > 1) {
5851
+ console.warn('[Calendar] visibleMonths is ignored when behavior="scroll"; falling back to single column.');
5852
+ }
5853
+ }, [props.behavior, props.visibleMonths]);
5777
5854
  const containerRef = React.useRef(null);
5778
5855
  const state = useCalendarState({
5779
5856
  ...props.mode !== void 0 ? { mode: props.mode } : {},
@@ -5836,6 +5913,8 @@ var SingleOrMultiCalendar = /* @__PURE__ */ __name((props) => {
5836
5913
  setAnchor((a) => a.add({ years: -10 }));
5837
5914
  } else if (state.view === "month") {
5838
5915
  setAnchor((a) => a.add({ years: -1 }));
5916
+ } else if (props.behavior === "scroll") {
5917
+ state.moveFocus({ months: -1 });
5839
5918
  } else {
5840
5919
  setAnchor((a) => a.add({ months: -1 }));
5841
5920
  }
@@ -5845,6 +5924,8 @@ var SingleOrMultiCalendar = /* @__PURE__ */ __name((props) => {
5845
5924
  setAnchor((a) => a.add({ years: 10 }));
5846
5925
  } else if (state.view === "month") {
5847
5926
  setAnchor((a) => a.add({ years: 1 }));
5927
+ } else if (props.behavior === "scroll") {
5928
+ state.moveFocus({ months: 1 });
5848
5929
  } else {
5849
5930
  setAnchor((a) => a.add({ months: 1 }));
5850
5931
  }
@@ -5907,22 +5988,44 @@ var SingleOrMultiCalendar = /* @__PURE__ */ __name((props) => {
5907
5988
  }
5908
5989
  ),
5909
5990
  /* @__PURE__ */ jsxRuntime.jsxs(FadeIn, { children: [
5910
- state.view === "day" && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { flexDirection: "row", gap: MONTH_GAP, alignSelf: "center", width: gridsRowWidth }, children: months.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
5911
- DayGrid,
5991
+ state.view === "day" && (props.behavior === "scroll" ? /* @__PURE__ */ jsxRuntime.jsx(
5992
+ ScrollBody,
5912
5993
  {
5913
- visibleMonth: m,
5914
- locale,
5915
5994
  mode: props.mode ?? "single",
5916
- value: state.value,
5995
+ locale,
5917
5996
  focusedDate: state.focusedDate,
5918
- isUnavailable: state.isUnavailable,
5919
- weekendDays,
5997
+ onFocusedMonthChange: (next) => setAnchor(next),
5998
+ value: state.value,
5999
+ onSelectDate: (date) => state.selectDate(date, "click"),
5920
6000
  firstDayOfWeek,
5921
- onDayPress: (date) => state.selectDate(date, "click"),
6001
+ weekendDays,
6002
+ ...props.minValue !== void 0 ? { minValue: props.minValue } : {},
6003
+ ...props.maxValue !== void 0 ? { maxValue: props.maxValue } : {},
6004
+ ...props.isDateUnavailable !== void 0 ? { isDateUnavailable: props.isDateUnavailable } : {},
5922
6005
  ...renderDay ? { renderDay } : {}
5923
- },
5924
- `${m.year}-${m.month}`
5925
- )) }),
6006
+ }
6007
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
6008
+ reactNative.View,
6009
+ {
6010
+ style: { flexDirection: "row", gap: MONTH_GAP, alignSelf: "center", width: gridsRowWidth },
6011
+ children: months.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
6012
+ DayGrid,
6013
+ {
6014
+ visibleMonth: m,
6015
+ locale,
6016
+ mode: props.mode ?? "single",
6017
+ value: state.value,
6018
+ focusedDate: state.focusedDate,
6019
+ isUnavailable: state.isUnavailable,
6020
+ weekendDays,
6021
+ firstDayOfWeek,
6022
+ onDayPress: (date) => state.selectDate(date, "click"),
6023
+ ...renderDay ? { renderDay } : {}
6024
+ },
6025
+ `${m.year}-${m.month}`
6026
+ ))
6027
+ }
6028
+ )),
5926
6029
  state.view === "month" && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
5927
6030
  MonthGrid,
5928
6031
  {
@@ -5957,8 +6060,13 @@ var RangeCalendar = /* @__PURE__ */ __name((props) => {
5957
6060
  const colors = useThemeColors();
5958
6061
  const firstDayOfWeek = props.firstDayOfWeek ?? getFirstDayOfWeek(locale);
5959
6062
  const weekendDays = props.weekendDays ?? getWeekendDays(locale);
5960
- const visibleMonths = pickVisibleMonths(props.visibleMonths, containerWidth);
6063
+ const visibleMonths = props.behavior === "scroll" ? 1 : pickVisibleMonths(props.visibleMonths, containerWidth);
5961
6064
  const { innerWidth, gridsRowWidth } = surfaceMetrics(visibleMonths);
6065
+ React.useEffect(() => {
6066
+ if (process.env.NODE_ENV !== "production" && props.behavior === "scroll" && typeof props.visibleMonths === "number" && props.visibleMonths > 1) {
6067
+ console.warn('[Calendar] visibleMonths is ignored when behavior="scroll"; falling back to single column.');
6068
+ }
6069
+ }, [props.behavior, props.visibleMonths]);
5962
6070
  const containerRef = React.useRef(null);
5963
6071
  const range2 = useRangeState({
5964
6072
  ...props.value !== void 0 ? { value: props.value } : {},
@@ -6036,6 +6144,8 @@ var RangeCalendar = /* @__PURE__ */ __name((props) => {
6036
6144
  setAnchor((a) => a.add({ years: -10 }));
6037
6145
  } else if (view === "month") {
6038
6146
  setAnchor((a) => a.add({ years: -1 }));
6147
+ } else if (props.behavior === "scroll") {
6148
+ setFocusedDate((f) => f.add({ months: -1 }));
6039
6149
  } else {
6040
6150
  setAnchor((a) => a.add({ months: -1 }));
6041
6151
  }
@@ -6045,6 +6155,8 @@ var RangeCalendar = /* @__PURE__ */ __name((props) => {
6045
6155
  setAnchor((a) => a.add({ years: 10 }));
6046
6156
  } else if (view === "month") {
6047
6157
  setAnchor((a) => a.add({ years: 1 }));
6158
+ } else if (props.behavior === "scroll") {
6159
+ setFocusedDate((f) => f.add({ months: 1 }));
6048
6160
  } else {
6049
6161
  setAnchor((a) => a.add({ months: 1 }));
6050
6162
  }
@@ -6115,24 +6227,47 @@ var RangeCalendar = /* @__PURE__ */ __name((props) => {
6115
6227
  }
6116
6228
  ),
6117
6229
  /* @__PURE__ */ jsxRuntime.jsxs(FadeIn, { children: [
6118
- view === "day" && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { flexDirection: "row", gap: MONTH_GAP, alignSelf: "center", width: gridsRowWidth }, children: months.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
6119
- DayGrid,
6230
+ view === "day" && (props.behavior === "scroll" ? /* @__PURE__ */ jsxRuntime.jsx(
6231
+ ScrollBody,
6120
6232
  {
6121
- visibleMonth: m,
6122
- locale,
6123
6233
  mode: "range",
6234
+ locale,
6235
+ focusedDate,
6236
+ onFocusedMonthChange: (next) => setAnchor(next),
6124
6237
  value: range2.value,
6125
6238
  previewRange: range2.previewRange,
6126
- focusedDate,
6127
- isUnavailable: range2.isUnavailable,
6128
- weekendDays,
6239
+ onSelectDate: (date) => range2.selectDate(date),
6129
6240
  firstDayOfWeek,
6130
- onDayPress: (date) => range2.selectDate(date),
6131
- onDayHover: (date) => range2.setHoveredDate(date),
6241
+ weekendDays,
6242
+ ...props.minValue !== void 0 ? { minValue: props.minValue } : {},
6243
+ ...props.maxValue !== void 0 ? { maxValue: props.maxValue } : {},
6244
+ ...props.isDateUnavailable !== void 0 ? { isDateUnavailable: props.isDateUnavailable } : {},
6132
6245
  ...renderDay ? { renderDay } : {}
6133
- },
6134
- `${m.year}-${m.month}`
6135
- )) }),
6246
+ }
6247
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
6248
+ reactNative.View,
6249
+ {
6250
+ style: { flexDirection: "row", gap: MONTH_GAP, alignSelf: "center", width: gridsRowWidth },
6251
+ children: months.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
6252
+ DayGrid,
6253
+ {
6254
+ visibleMonth: m,
6255
+ locale,
6256
+ mode: "range",
6257
+ value: range2.value,
6258
+ previewRange: range2.previewRange,
6259
+ focusedDate,
6260
+ isUnavailable: range2.isUnavailable,
6261
+ weekendDays,
6262
+ firstDayOfWeek,
6263
+ onDayPress: (date) => range2.selectDate(date),
6264
+ onDayHover: (date) => range2.setHoveredDate(date),
6265
+ ...renderDay ? { renderDay } : {}
6266
+ },
6267
+ `${m.year}-${m.month}`
6268
+ ))
6269
+ }
6270
+ )),
6136
6271
  view === "month" && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
6137
6272
  MonthGrid,
6138
6273
  {
@@ -6329,7 +6464,15 @@ var Checkbox = /* @__PURE__ */ __name(({
6329
6464
  className,
6330
6465
  testID,
6331
6466
  asChild,
6332
- children
6467
+ children,
6468
+ id,
6469
+ name,
6470
+ "aria-labelledby": ariaLabelledBy,
6471
+ accessibilityLabelledBy,
6472
+ "aria-describedby": ariaDescribedBy,
6473
+ accessibilityDescribedBy,
6474
+ "aria-invalid": ariaInvalid,
6475
+ "aria-required": ariaRequired
6333
6476
  }) => {
6334
6477
  const colors = useThemeColors();
6335
6478
  const [inner, setInner] = React.useState(defaultChecked);
@@ -6357,6 +6500,13 @@ var Checkbox = /* @__PURE__ */ __name(({
6357
6500
  accessibilityState: { checked: value, disabled: Boolean(disabled) },
6358
6501
  testID
6359
6502
  };
6503
+ if (id !== void 0) {
6504
+ commonProps.id = id;
6505
+ commonProps.nativeID = id;
6506
+ }
6507
+ if (name !== void 0) {
6508
+ commonProps.name = name;
6509
+ }
6360
6510
  if (disabled) {
6361
6511
  commonProps["aria-disabled"] = true;
6362
6512
  }
@@ -6364,6 +6514,26 @@ var Checkbox = /* @__PURE__ */ __name(({
6364
6514
  commonProps["aria-label"] = label;
6365
6515
  commonProps.accessibilityLabel = label;
6366
6516
  }
6517
+ if (ariaLabelledBy !== void 0) {
6518
+ commonProps["aria-labelledby"] = ariaLabelledBy;
6519
+ commonProps.accessibilityLabelledBy = ariaLabelledBy;
6520
+ }
6521
+ if (accessibilityLabelledBy !== void 0) {
6522
+ commonProps.accessibilityLabelledBy = accessibilityLabelledBy;
6523
+ }
6524
+ if (ariaDescribedBy !== void 0) {
6525
+ commonProps["aria-describedby"] = ariaDescribedBy;
6526
+ commonProps.accessibilityDescribedBy = ariaDescribedBy;
6527
+ }
6528
+ if (accessibilityDescribedBy !== void 0) {
6529
+ commonProps.accessibilityDescribedBy = accessibilityDescribedBy;
6530
+ }
6531
+ if (ariaInvalid) {
6532
+ commonProps["aria-invalid"] = true;
6533
+ }
6534
+ if (ariaRequired) {
6535
+ commonProps["aria-required"] = true;
6536
+ }
6367
6537
  if (asChild) {
6368
6538
  const slotProps = {
6369
6539
  role: "checkbox",
@@ -6420,6 +6590,334 @@ var Checkbox = /* @__PURE__ */ __name(({
6420
6590
  }
6421
6591
  );
6422
6592
  }, "Checkbox");
6593
+ function formatDate(date$1, locale) {
6594
+ try {
6595
+ return new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date$1.toDate(date.getLocalTimeZone()));
6596
+ } catch {
6597
+ return `${date$1.year}-${String(date$1.month).padStart(2, "0")}-${String(date$1.day).padStart(2, "0")}`;
6598
+ }
6599
+ }
6600
+ __name(formatDate, "formatDate");
6601
+ function CalendarIcon({ size = 16, color = "currentColor" }) {
6602
+ const colors = useThemeColors();
6603
+ if (reactNative.Platform.OS === "web") {
6604
+ return /* @__PURE__ */ jsxRuntime.jsx(
6605
+ "svg",
6606
+ {
6607
+ width: size,
6608
+ height: size,
6609
+ viewBox: "0 0 24 24",
6610
+ fill: "none",
6611
+ stroke: color,
6612
+ strokeWidth: "2",
6613
+ strokeLinecap: "round",
6614
+ strokeLinejoin: "round",
6615
+ "aria-hidden": "true",
6616
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" })
6617
+ }
6618
+ );
6619
+ }
6620
+ const resolvedColor = color === "currentColor" ? colors.semantic.text.muted : color;
6621
+ return /* @__PURE__ */ jsxRuntime.jsx(
6622
+ reactNative.Text,
6623
+ {
6624
+ accessibilityElementsHidden: true,
6625
+ importantForAccessibility: "no-hide-descendants",
6626
+ style: { fontSize: size, lineHeight: size, color: resolvedColor },
6627
+ children: "\u{1F4C5}"
6628
+ }
6629
+ );
6630
+ }
6631
+ __name(CalendarIcon, "CalendarIcon");
6632
+ function buildCalendarOptional(minValue, maxValue, isDateUnavailable, firstDayOfWeek) {
6633
+ const out = {};
6634
+ if (minValue !== void 0) {
6635
+ out.minValue = minValue;
6636
+ }
6637
+ if (maxValue !== void 0) {
6638
+ out.maxValue = maxValue;
6639
+ }
6640
+ if (isDateUnavailable !== void 0) {
6641
+ out.isDateUnavailable = isDateUnavailable;
6642
+ }
6643
+ if (firstDayOfWeek !== void 0) {
6644
+ out.firstDayOfWeek = firstDayOfWeek;
6645
+ }
6646
+ return out;
6647
+ }
6648
+ __name(buildCalendarOptional, "buildCalendarOptional");
6649
+ function buildTriggerAriaProps(ariaProps) {
6650
+ const out = {};
6651
+ if (ariaProps["aria-labelledby"] !== void 0) {
6652
+ out["aria-labelledby"] = ariaProps["aria-labelledby"];
6653
+ }
6654
+ if (ariaProps["aria-describedby"] !== void 0) {
6655
+ out["aria-describedby"] = ariaProps["aria-describedby"];
6656
+ }
6657
+ if (ariaProps["aria-invalid"] !== void 0) {
6658
+ out["aria-invalid"] = ariaProps["aria-invalid"];
6659
+ }
6660
+ if (ariaProps["aria-required"] !== void 0) {
6661
+ out["aria-required"] = ariaProps["aria-required"];
6662
+ }
6663
+ return out;
6664
+ }
6665
+ __name(buildTriggerAriaProps, "buildTriggerAriaProps");
6666
+ var DatePickerRoot = /* @__PURE__ */ __name(({
6667
+ value,
6668
+ defaultValue: defaultValue2,
6669
+ onChange,
6670
+ locale: localeProp,
6671
+ minValue,
6672
+ maxValue,
6673
+ isDateUnavailable,
6674
+ firstDayOfWeek,
6675
+ placeholder,
6676
+ disabled = false,
6677
+ id,
6678
+ name: _name,
6679
+ className,
6680
+ testID,
6681
+ ...ariaProps
6682
+ }) => {
6683
+ const providerLocale = useLocale();
6684
+ const locale = localeProp ?? providerLocale;
6685
+ const [open, setOpen] = React.useState(false);
6686
+ const isControlled = value !== void 0;
6687
+ const [inner, setInner] = React.useState(defaultValue2 ?? null);
6688
+ const current = isControlled ? value ?? null : inner;
6689
+ const handleChange = React.useCallback(
6690
+ (date) => {
6691
+ if (!isControlled) {
6692
+ setInner(date);
6693
+ }
6694
+ onChange?.(date);
6695
+ setOpen(false);
6696
+ },
6697
+ [isControlled, onChange]
6698
+ );
6699
+ const handleOpenChange = React.useCallback(
6700
+ (next) => {
6701
+ if (!disabled) {
6702
+ setOpen(next);
6703
+ }
6704
+ },
6705
+ [disabled]
6706
+ );
6707
+ const displayValue = current ? formatDate(current, locale) : null;
6708
+ const calendarOptional = buildCalendarOptional(minValue, maxValue, isDateUnavailable, firstDayOfWeek);
6709
+ const triggerAriaProps = buildTriggerAriaProps(ariaProps);
6710
+ const colors = useThemeColors();
6711
+ const hasError = ariaProps["aria-invalid"] === true || ariaProps["aria-invalid"] === "true";
6712
+ const pressableStyle = {
6713
+ flexDirection: "row",
6714
+ alignItems: "center",
6715
+ borderWidth: 1,
6716
+ borderRadius: px(colors.radius.md),
6717
+ paddingHorizontal: px(colors.spacing["3"]),
6718
+ paddingVertical: px(colors.spacing["2"]),
6719
+ backgroundColor: colors.semantic.background.elevated,
6720
+ borderColor: hasError ? colors.color.danger : colors.semantic.border.default,
6721
+ opacity: disabled ? 0.6 : 1
6722
+ };
6723
+ const textStyle = {
6724
+ flex: 1,
6725
+ fontFamily: colors.fontFamily.body,
6726
+ fontSize: px(colors.fontSize.md),
6727
+ color: displayValue ? colors.semantic.text.default : colors.semantic.text.muted
6728
+ };
6729
+ const triggerExtraProps = {
6730
+ role: "combobox",
6731
+ accessibilityRole: "button",
6732
+ "aria-haspopup": "dialog",
6733
+ "aria-expanded": open,
6734
+ ...triggerAriaProps
6735
+ };
6736
+ if (id !== void 0) {
6737
+ triggerExtraProps.id = id;
6738
+ triggerExtraProps.nativeID = id;
6739
+ }
6740
+ if (testID !== void 0) {
6741
+ triggerExtraProps.testID = testID;
6742
+ }
6743
+ if (hasError) {
6744
+ triggerExtraProps["aria-invalid"] = true;
6745
+ }
6746
+ if (ariaProps["aria-required"]) {
6747
+ triggerExtraProps["aria-required"] = true;
6748
+ }
6749
+ if (disabled) {
6750
+ triggerExtraProps["aria-disabled"] = true;
6751
+ }
6752
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
6753
+ /* @__PURE__ */ jsxRuntime.jsx(Popover.Trigger, { asChild: false, className: cn(className), children: /* @__PURE__ */ jsxRuntime.jsxs(
6754
+ reactNative.Pressable,
6755
+ {
6756
+ onPress: disabled ? void 0 : () => setOpen(!open),
6757
+ disabled,
6758
+ className: cn(
6759
+ "flex-row items-center rounded-md border px-3 py-2",
6760
+ hasError ? "border-semantic-interactive-destructive" : "border-semantic-border-default",
6761
+ disabled ? "opacity-60" : void 0,
6762
+ className
6763
+ ),
6764
+ style: pressableStyle,
6765
+ ...triggerExtraProps,
6766
+ children: [
6767
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, numberOfLines: 1, children: displayValue ?? placeholder ?? "" }),
6768
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { marginLeft: px(colors.spacing["2"]) }, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, { size: 16, color: colors.semantic.text.muted }) })
6769
+ ]
6770
+ }
6771
+ ) }),
6772
+ /* @__PURE__ */ jsxRuntime.jsx(Popover.Content, { "aria-label": "Date picker", side: "bottom", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
6773
+ Calendar,
6774
+ {
6775
+ mode: "single",
6776
+ value: current,
6777
+ onChange: (date) => {
6778
+ handleChange(date);
6779
+ },
6780
+ locale,
6781
+ ...calendarOptional
6782
+ }
6783
+ ) })
6784
+ ] });
6785
+ }, "DatePickerRoot");
6786
+ var DatePickerRange = /* @__PURE__ */ __name(({
6787
+ value,
6788
+ defaultValue: defaultValue2,
6789
+ onChange,
6790
+ locale: localeProp,
6791
+ minValue,
6792
+ maxValue,
6793
+ isDateUnavailable,
6794
+ firstDayOfWeek,
6795
+ placeholder,
6796
+ disabled = false,
6797
+ id,
6798
+ name: _name,
6799
+ className,
6800
+ testID,
6801
+ ...ariaProps
6802
+ }) => {
6803
+ const providerLocale = useLocale();
6804
+ const locale = localeProp ?? providerLocale;
6805
+ const [open, setOpen] = React.useState(false);
6806
+ const isControlled = value !== void 0;
6807
+ const [inner, setInner] = React.useState(defaultValue2 ?? { start: null, end: null });
6808
+ const current = isControlled ? value ?? { start: null, end: null } : inner;
6809
+ const calendarValue = current.start !== null ? { start: current.start, end: current.end } : null;
6810
+ const handleChange = React.useCallback(
6811
+ (calRange) => {
6812
+ const next = {
6813
+ start: calRange?.start ?? null,
6814
+ end: calRange?.end ?? null
6815
+ };
6816
+ if (!isControlled) {
6817
+ setInner(next);
6818
+ }
6819
+ onChange?.(next);
6820
+ if (next.start !== null && next.end !== null) {
6821
+ setOpen(false);
6822
+ }
6823
+ },
6824
+ [isControlled, onChange]
6825
+ );
6826
+ const handleOpenChange = React.useCallback(
6827
+ (next) => {
6828
+ if (!disabled) {
6829
+ setOpen(next);
6830
+ }
6831
+ },
6832
+ [disabled]
6833
+ );
6834
+ let displayValue = null;
6835
+ if (current.start !== null) {
6836
+ const startStr = formatDate(current.start, locale);
6837
+ const endStr = current.end !== null ? formatDate(current.end, locale) : "";
6838
+ displayValue = `${startStr} \u2013 ${endStr}`;
6839
+ }
6840
+ const calendarOptional = buildCalendarOptional(minValue, maxValue, isDateUnavailable, firstDayOfWeek);
6841
+ const triggerAriaProps = buildTriggerAriaProps(ariaProps);
6842
+ const colors = useThemeColors();
6843
+ const hasError = ariaProps["aria-invalid"] === true || ariaProps["aria-invalid"] === "true";
6844
+ const pressableStyle = {
6845
+ flexDirection: "row",
6846
+ alignItems: "center",
6847
+ borderWidth: 1,
6848
+ borderRadius: px(colors.radius.md),
6849
+ paddingHorizontal: px(colors.spacing["3"]),
6850
+ paddingVertical: px(colors.spacing["2"]),
6851
+ backgroundColor: colors.semantic.background.elevated,
6852
+ borderColor: hasError ? colors.color.danger : colors.semantic.border.default,
6853
+ opacity: disabled ? 0.6 : 1
6854
+ };
6855
+ const textStyle = {
6856
+ flex: 1,
6857
+ fontFamily: colors.fontFamily.body,
6858
+ fontSize: px(colors.fontSize.md),
6859
+ color: displayValue ? colors.semantic.text.default : colors.semantic.text.muted
6860
+ };
6861
+ const triggerExtraProps = {
6862
+ role: "combobox",
6863
+ accessibilityRole: "button",
6864
+ "aria-haspopup": "dialog",
6865
+ "aria-expanded": open,
6866
+ ...triggerAriaProps
6867
+ };
6868
+ if (id !== void 0) {
6869
+ triggerExtraProps.id = id;
6870
+ triggerExtraProps.nativeID = id;
6871
+ }
6872
+ if (testID !== void 0) {
6873
+ triggerExtraProps.testID = testID;
6874
+ }
6875
+ if (hasError) {
6876
+ triggerExtraProps["aria-invalid"] = true;
6877
+ }
6878
+ if (ariaProps["aria-required"]) {
6879
+ triggerExtraProps["aria-required"] = true;
6880
+ }
6881
+ if (disabled) {
6882
+ triggerExtraProps["aria-disabled"] = true;
6883
+ }
6884
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
6885
+ /* @__PURE__ */ jsxRuntime.jsx(Popover.Trigger, { asChild: false, className: cn(className), children: /* @__PURE__ */ jsxRuntime.jsxs(
6886
+ reactNative.Pressable,
6887
+ {
6888
+ onPress: disabled ? void 0 : () => setOpen(!open),
6889
+ disabled,
6890
+ className: cn(
6891
+ "flex-row items-center rounded-md border px-3 py-2",
6892
+ hasError ? "border-semantic-interactive-destructive" : "border-semantic-border-default",
6893
+ disabled ? "opacity-60" : void 0,
6894
+ className
6895
+ ),
6896
+ style: pressableStyle,
6897
+ ...triggerExtraProps,
6898
+ children: [
6899
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: textStyle, numberOfLines: 1, children: displayValue ?? placeholder ?? "" }),
6900
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { marginLeft: px(colors.spacing["2"]) }, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, { size: 16, color: colors.semantic.text.muted }) })
6901
+ ]
6902
+ }
6903
+ ) }),
6904
+ /* @__PURE__ */ jsxRuntime.jsx(Popover.Content, { "aria-label": "Date range picker", side: "bottom", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
6905
+ Calendar,
6906
+ {
6907
+ mode: "range",
6908
+ value: calendarValue,
6909
+ onChange: (range2) => {
6910
+ handleChange(range2);
6911
+ },
6912
+ locale,
6913
+ ...calendarOptional
6914
+ }
6915
+ ) })
6916
+ ] });
6917
+ }, "DatePickerRange");
6918
+ var DatePicker = Object.assign(DatePickerRoot, {
6919
+ Range: DatePickerRange
6920
+ });
6423
6921
  var DialogContext = React.createContext(null);
6424
6922
  var useDialogContext = /* @__PURE__ */ __name((label) => {
6425
6923
  const ctx = React.useContext(DialogContext);
@@ -6832,6 +7330,279 @@ var Dialog = Object.assign(DialogRoot, {
6832
7330
  Footer: DialogFooter,
6833
7331
  Close: DialogClose
6834
7332
  });
7333
+ var FieldContext = React.createContext(null);
7334
+ var useFieldContextStrict = /* @__PURE__ */ __name((caller) => {
7335
+ const ctx = React.useContext(FieldContext);
7336
+ if (!ctx) {
7337
+ throw new Error(`[Field] ${caller} must be used inside <Field> or <Field.Group>.`);
7338
+ }
7339
+ return ctx;
7340
+ }, "useFieldContextStrict");
7341
+ var childHasDisplayName = /* @__PURE__ */ __name((child, name) => {
7342
+ if (!React.isValidElement(child)) {
7343
+ return false;
7344
+ }
7345
+ const t = child.type;
7346
+ return typeof t !== "string" && t?.displayName === name;
7347
+ }, "childHasDisplayName");
7348
+ var COMPOUND_DISPLAY_NAMES = ["Field.Label", "Field.Description", "Field.Error", "Field.Control"];
7349
+ var isCompoundChild = /* @__PURE__ */ __name((child) => COMPOUND_DISPLAY_NAMES.some((name) => childHasDisplayName(child, name)), "isCompoundChild");
7350
+ var FieldRoot = /* @__PURE__ */ __name(({
7351
+ name,
7352
+ required = false,
7353
+ disabled = false,
7354
+ error = null,
7355
+ label,
7356
+ description,
7357
+ validating = false,
7358
+ orientation = "vertical",
7359
+ id,
7360
+ children,
7361
+ className,
7362
+ testID,
7363
+ isGroup = false
7364
+ }) => {
7365
+ const colors = useThemeColors();
7366
+ const reactId = React.useId();
7367
+ const fieldId = id ?? `nori-ui-field-${reactId}`;
7368
+ const labelId = `${fieldId}-label`;
7369
+ const descriptionId = `${fieldId}-desc`;
7370
+ const errorId = `${fieldId}-error`;
7371
+ const isCompoundMode = React.useMemo(() => {
7372
+ let found = false;
7373
+ React.Children.forEach(children, (child) => {
7374
+ if (isCompoundChild(child)) {
7375
+ found = true;
7376
+ }
7377
+ });
7378
+ return found;
7379
+ }, [children]);
7380
+ const hasDescription = React.useMemo(() => {
7381
+ if (!isCompoundMode) {
7382
+ return description !== void 0 && description !== null && description !== false && description !== "";
7383
+ }
7384
+ let found = false;
7385
+ React.Children.forEach(children, (child) => {
7386
+ if (childHasDisplayName(child, "Field.Description")) {
7387
+ found = true;
7388
+ }
7389
+ });
7390
+ return found;
7391
+ }, [isCompoundMode, description, children]);
7392
+ const hasError = React.useMemo(() => {
7393
+ if (!isCompoundMode) {
7394
+ return Boolean(error);
7395
+ }
7396
+ let found = false;
7397
+ React.Children.forEach(children, (child) => {
7398
+ if (childHasDisplayName(child, "Field.Error") && React.isValidElement(child)) {
7399
+ const el = child;
7400
+ if (el.props.children !== void 0 && el.props.children !== null && el.props.children !== false && el.props.children !== "") {
7401
+ found = true;
7402
+ }
7403
+ }
7404
+ });
7405
+ if (!found && error !== null && error !== void 0 && error !== false && error !== "") {
7406
+ found = true;
7407
+ }
7408
+ return found;
7409
+ }, [isCompoundMode, error, children]);
7410
+ const describedBy = React.useMemo(() => {
7411
+ const ids = [];
7412
+ if (hasDescription) {
7413
+ ids.push(descriptionId);
7414
+ }
7415
+ if (hasError) {
7416
+ ids.push(errorId);
7417
+ }
7418
+ return ids.length === 0 ? void 0 : ids.join(" ");
7419
+ }, [hasDescription, hasError, descriptionId, errorId]);
7420
+ const value = {
7421
+ fieldId,
7422
+ labelId,
7423
+ descriptionId,
7424
+ errorId,
7425
+ hasError,
7426
+ hasDescription,
7427
+ describedBy,
7428
+ disabled,
7429
+ required,
7430
+ validating,
7431
+ ...name !== void 0 ? { name } : {},
7432
+ // In compound mode pass `error` (string) so Field.Error can fall back to it.
7433
+ // In shorthand mode the error prop may be ReactNode; only pass when it is a string/null.
7434
+ ...error !== null && error !== void 0 && typeof error === "string" ? { error } : {},
7435
+ isGroup
7436
+ };
7437
+ const warnedRef = React.useRef(false);
7438
+ React.useEffect(() => {
7439
+ if (process.env.NODE_ENV === "production" || warnedRef.current) {
7440
+ return;
7441
+ }
7442
+ const hasShorthand = label !== void 0 || description !== void 0 || error !== void 0;
7443
+ if (hasShorthand && isCompoundMode) {
7444
+ warnedRef.current = true;
7445
+ console.warn(
7446
+ "[Field] Mixing shorthand props (label/description/error) with compound children (Field.Label/Field.Description/Field.Error) is not supported. The compound children will win. To suppress this warning, use only one mode."
7447
+ );
7448
+ }
7449
+ }, [label, description, error, isCompoundMode]);
7450
+ const containerStyle = orientation === "horizontal" ? {
7451
+ flexDirection: "row",
7452
+ alignItems: "flex-start",
7453
+ gap: px(colors.spacing["3"])
7454
+ } : { flexDirection: "column", gap: px(colors.spacing["1"]) };
7455
+ const containerExtra = {};
7456
+ if (testID !== void 0) {
7457
+ containerExtra.testID = testID;
7458
+ }
7459
+ containerExtra["data-orientation"] = orientation;
7460
+ if (isGroup) {
7461
+ containerExtra.role = "group";
7462
+ containerExtra["aria-labelledby"] = labelId;
7463
+ containerExtra.accessibilityRole = "none";
7464
+ }
7465
+ if (validating) {
7466
+ containerExtra["data-validating"] = "";
7467
+ containerExtra["aria-busy"] = true;
7468
+ }
7469
+ const renderShorthand = /* @__PURE__ */ __name(() => {
7470
+ const childArray = React.Children.toArray(children);
7471
+ const controlChild = childArray.length === 1 && React.isValidElement(childArray[0]) ? childArray[0] : null;
7472
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7473
+ label !== void 0 && label !== null && label !== false ? /* @__PURE__ */ jsxRuntime.jsx(FieldLabel, { children: label }) : null,
7474
+ description !== void 0 && description !== null && description !== false && description !== "" ? /* @__PURE__ */ jsxRuntime.jsx(FieldDescription, { children: description }) : null,
7475
+ controlChild !== null ? /* @__PURE__ */ jsxRuntime.jsx(FieldControl, { children: controlChild }) : children,
7476
+ error !== void 0 && error !== null && error !== false && error !== "" ? /* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: error }) : null
7477
+ ] });
7478
+ }, "renderShorthand");
7479
+ return /* @__PURE__ */ jsxRuntime.jsx(FieldContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: containerStyle, ...className !== void 0 ? { className } : {}, ...containerExtra, children: [
7480
+ isCompoundMode ? children : renderShorthand(),
7481
+ validating ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm" }) : null
7482
+ ] }) });
7483
+ }, "FieldRoot");
7484
+ var FieldLabel = /* @__PURE__ */ __name(({ children }) => {
7485
+ const ctx = useFieldContextStrict("Field.Label");
7486
+ const colors = useThemeColors();
7487
+ const { t } = useTranslation();
7488
+ const requiredIndicator = t("field.requiredIndicator");
7489
+ const requiredLabel = t("field.requiredLabel");
7490
+ const focusInput = /* @__PURE__ */ __name(() => {
7491
+ if (typeof document !== "undefined") {
7492
+ const el = document.getElementById(ctx.fieldId);
7493
+ if (el && typeof el.focus === "function") {
7494
+ el.focus();
7495
+ }
7496
+ }
7497
+ }, "focusInput");
7498
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: focusInput, accessibilityRole: "none", disabled: ctx.disabled, children: /* @__PURE__ */ jsxRuntime.jsxs(
7499
+ reactNative.Text,
7500
+ {
7501
+ nativeID: ctx.labelId,
7502
+ ...{ id: ctx.labelId },
7503
+ accessibilityRole: "text",
7504
+ style: {
7505
+ fontFamily: colors.fontFamily.body,
7506
+ fontSize: px(colors.fontSize.sm),
7507
+ fontWeight: colors.fontWeight.medium,
7508
+ color: ctx.disabled ? colors.semantic.text.muted : colors.semantic.text.default
7509
+ },
7510
+ children: [
7511
+ children,
7512
+ ctx.required ? /* @__PURE__ */ jsxRuntime.jsx(
7513
+ reactNative.Text,
7514
+ {
7515
+ accessibilityLabel: requiredLabel,
7516
+ ...{ "aria-label": requiredLabel },
7517
+ style: { color: colors.color.danger },
7518
+ children: ` ${requiredIndicator}`
7519
+ }
7520
+ ) : null
7521
+ ]
7522
+ }
7523
+ ) });
7524
+ }, "FieldLabel");
7525
+ FieldLabel.displayName = "Field.Label";
7526
+ var FieldControl = /* @__PURE__ */ __name(({ children }) => {
7527
+ const ctx = useFieldContextStrict("Field.Control");
7528
+ if (React.Children.count(children) !== 1 || !React.isValidElement(children)) {
7529
+ throw new Error("[Field.Control] expects exactly one child element.");
7530
+ }
7531
+ const child = children;
7532
+ const merged = {
7533
+ id: child.props.id ?? ctx.fieldId,
7534
+ accessibilityLabelledBy: ctx.labelId,
7535
+ "aria-labelledby": ctx.labelId
7536
+ };
7537
+ if (ctx.name !== void 0 && child.props.name === void 0) {
7538
+ merged.name = ctx.name;
7539
+ }
7540
+ if (ctx.describedBy !== void 0) {
7541
+ merged["aria-describedby"] = ctx.describedBy;
7542
+ merged.accessibilityDescribedBy = ctx.describedBy;
7543
+ }
7544
+ if (ctx.hasError) {
7545
+ merged["aria-invalid"] = true;
7546
+ }
7547
+ if (ctx.required) {
7548
+ merged["aria-required"] = true;
7549
+ }
7550
+ if (ctx.disabled || child.props.disabled) {
7551
+ merged.disabled = true;
7552
+ }
7553
+ return React.cloneElement(child, merged);
7554
+ }, "FieldControl");
7555
+ FieldControl.displayName = "Field.Control";
7556
+ var FieldDescription = /* @__PURE__ */ __name(({ children }) => {
7557
+ const ctx = useFieldContextStrict("Field.Description");
7558
+ const colors = useThemeColors();
7559
+ return /* @__PURE__ */ jsxRuntime.jsx(
7560
+ reactNative.Text,
7561
+ {
7562
+ nativeID: ctx.descriptionId,
7563
+ ...{ id: ctx.descriptionId },
7564
+ style: {
7565
+ fontFamily: colors.fontFamily.body,
7566
+ fontSize: px(colors.fontSize.sm),
7567
+ color: colors.semantic.text.muted
7568
+ },
7569
+ children
7570
+ }
7571
+ );
7572
+ }, "FieldDescription");
7573
+ FieldDescription.displayName = "Field.Description";
7574
+ var FieldError = /* @__PURE__ */ __name(({ children }) => {
7575
+ const ctx = useFieldContextStrict("Field.Error");
7576
+ const colors = useThemeColors();
7577
+ const content = children ?? ctx.error;
7578
+ if (content === null || content === void 0 || content === "" || content === false) {
7579
+ return null;
7580
+ }
7581
+ return /* @__PURE__ */ jsxRuntime.jsx(
7582
+ reactNative.Text,
7583
+ {
7584
+ nativeID: ctx.errorId,
7585
+ ...{ id: ctx.errorId, role: "alert" },
7586
+ accessibilityRole: "text",
7587
+ style: {
7588
+ fontFamily: colors.fontFamily.body,
7589
+ fontSize: px(colors.fontSize.sm),
7590
+ color: colors.color.danger
7591
+ },
7592
+ children: content
7593
+ }
7594
+ );
7595
+ }, "FieldError");
7596
+ FieldError.displayName = "Field.Error";
7597
+ var FieldGroup = /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxRuntime.jsx(FieldRoot, { ...props, isGroup: true }), "FieldGroup");
7598
+ FieldGroup.displayName = "Field.Group";
7599
+ var Field = Object.assign(FieldRoot, {
7600
+ Label: FieldLabel,
7601
+ Description: FieldDescription,
7602
+ Control: FieldControl,
7603
+ Error: FieldError,
7604
+ Group: FieldGroup
7605
+ });
6835
7606
  var isDev = process.env.NODE_ENV !== "production";
6836
7607
  var SafeAreaInsetsContext = /* @__PURE__ */ React__namespace.createContext(null);
6837
7608
  if (isDev) {
@@ -7842,6 +8613,55 @@ var InputGroup = Object.assign(InputGroupRoot, {
7842
8613
  Addon: InputGroupAddon,
7843
8614
  Input: InputGroupInput
7844
8615
  });
8616
+ var Label = /* @__PURE__ */ __name(({ htmlFor, required = false, disabled = false, children, className, testID }) => {
8617
+ const colors = useThemeColors();
8618
+ const { t } = useTranslation();
8619
+ const requiredIndicator = t("field.requiredIndicator");
8620
+ const requiredLabel = t("field.requiredLabel");
8621
+ const focusTarget = /* @__PURE__ */ __name(() => {
8622
+ if (typeof document !== "undefined") {
8623
+ const el = document.getElementById(htmlFor);
8624
+ if (el && typeof el.focus === "function") {
8625
+ el.focus();
8626
+ }
8627
+ }
8628
+ }, "focusTarget");
8629
+ return /* @__PURE__ */ jsxRuntime.jsx(
8630
+ reactNative.Pressable,
8631
+ {
8632
+ onPress: focusTarget,
8633
+ accessibilityRole: "none",
8634
+ disabled,
8635
+ ...testID !== void 0 ? { testID } : {},
8636
+ ...className !== void 0 ? { className } : {},
8637
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
8638
+ reactNative.Text,
8639
+ {
8640
+ ...{ htmlFor },
8641
+ accessibilityRole: "text",
8642
+ style: {
8643
+ fontFamily: colors.fontFamily.body,
8644
+ fontSize: px(colors.fontSize.sm),
8645
+ fontWeight: colors.fontWeight.medium,
8646
+ color: disabled ? colors.semantic.text.muted : colors.semantic.text.default
8647
+ },
8648
+ children: [
8649
+ children,
8650
+ required ? /* @__PURE__ */ jsxRuntime.jsx(
8651
+ reactNative.Text,
8652
+ {
8653
+ accessibilityLabel: requiredLabel,
8654
+ ...{ "aria-label": requiredLabel },
8655
+ style: { color: colors.color.danger },
8656
+ children: ` ${requiredIndicator}`
8657
+ }
8658
+ ) : null
8659
+ ]
8660
+ }
8661
+ )
8662
+ }
8663
+ );
8664
+ }, "Label");
7845
8665
  var range = /* @__PURE__ */ __name((from, to) => {
7846
8666
  if (to < from) {
7847
8667
  return [];
@@ -8988,7 +9808,15 @@ var RadioGroup = /* @__PURE__ */ __name(({
8988
9808
  name,
8989
9809
  children,
8990
9810
  className,
8991
- testID
9811
+ testID,
9812
+ id,
9813
+ nativeID,
9814
+ "aria-labelledby": ariaLabelledBy,
9815
+ accessibilityLabelledBy,
9816
+ "aria-describedby": ariaDescribedBy,
9817
+ accessibilityDescribedBy,
9818
+ "aria-invalid": ariaInvalid,
9819
+ "aria-required": ariaRequired
8992
9820
  }) => {
8993
9821
  const [inner, setInner] = React.useState(defaultValue2);
8994
9822
  const isControlled = value !== void 0;
@@ -9090,7 +9918,15 @@ var RadioGroup = /* @__PURE__ */ __name(({
9090
9918
  "aria-orientation": orientation,
9091
9919
  "aria-disabled": disabled || void 0,
9092
9920
  onKeyDown: handleKeyDown,
9093
- ...testID !== void 0 ? { testID } : {}
9921
+ ...testID !== void 0 ? { testID } : {},
9922
+ ...id !== void 0 ? { id } : {},
9923
+ ...nativeID !== void 0 ? { nativeID } : {},
9924
+ ...ariaLabelledBy !== void 0 ? { "aria-labelledby": ariaLabelledBy } : {},
9925
+ ...accessibilityLabelledBy !== void 0 ? { accessibilityLabelledBy } : {},
9926
+ ...ariaDescribedBy !== void 0 ? { "aria-describedby": ariaDescribedBy } : {},
9927
+ ...accessibilityDescribedBy !== void 0 ? { accessibilityDescribedBy } : {},
9928
+ ...ariaInvalid ? { "aria-invalid": true } : {},
9929
+ ...ariaRequired ? { "aria-required": true } : {}
9094
9930
  };
9095
9931
  return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxRuntime.jsx(
9096
9932
  RadioGroupViewport,
@@ -10036,7 +10872,15 @@ var Switch = /* @__PURE__ */ __name(({
10036
10872
  className,
10037
10873
  testID,
10038
10874
  asChild,
10039
- children
10875
+ children,
10876
+ id,
10877
+ name,
10878
+ "aria-labelledby": ariaLabelledBy,
10879
+ accessibilityLabelledBy,
10880
+ "aria-describedby": ariaDescribedBy,
10881
+ accessibilityDescribedBy,
10882
+ "aria-invalid": ariaInvalid,
10883
+ "aria-required": ariaRequired
10040
10884
  }) => {
10041
10885
  const colors = useThemeColors();
10042
10886
  const [inner, setInner] = React.useState(defaultChecked);
@@ -10061,6 +10905,13 @@ var Switch = /* @__PURE__ */ __name(({
10061
10905
  accessibilityState: { checked: value, disabled: Boolean(disabled) },
10062
10906
  testID
10063
10907
  };
10908
+ if (id !== void 0) {
10909
+ commonProps.id = id;
10910
+ commonProps.nativeID = id;
10911
+ }
10912
+ if (name !== void 0) {
10913
+ commonProps.name = name;
10914
+ }
10064
10915
  if (disabled) {
10065
10916
  commonProps["aria-disabled"] = true;
10066
10917
  }
@@ -10068,6 +10919,26 @@ var Switch = /* @__PURE__ */ __name(({
10068
10919
  commonProps["aria-label"] = label;
10069
10920
  commonProps.accessibilityLabel = label;
10070
10921
  }
10922
+ if (ariaLabelledBy !== void 0) {
10923
+ commonProps["aria-labelledby"] = ariaLabelledBy;
10924
+ commonProps.accessibilityLabelledBy = ariaLabelledBy;
10925
+ }
10926
+ if (accessibilityLabelledBy !== void 0) {
10927
+ commonProps.accessibilityLabelledBy = accessibilityLabelledBy;
10928
+ }
10929
+ if (ariaDescribedBy !== void 0) {
10930
+ commonProps["aria-describedby"] = ariaDescribedBy;
10931
+ commonProps.accessibilityDescribedBy = ariaDescribedBy;
10932
+ }
10933
+ if (accessibilityDescribedBy !== void 0) {
10934
+ commonProps.accessibilityDescribedBy = accessibilityDescribedBy;
10935
+ }
10936
+ if (ariaInvalid) {
10937
+ commonProps["aria-invalid"] = true;
10938
+ }
10939
+ if (ariaRequired) {
10940
+ commonProps["aria-required"] = true;
10941
+ }
10071
10942
  if (asChild) {
10072
10943
  const slotProps = {
10073
10944
  role: "switch",
@@ -10434,7 +11305,6 @@ var Tabs = Object.assign(TabsRoot, {
10434
11305
  Trigger: TabsTrigger,
10435
11306
  Content: TabsContent
10436
11307
  });
10437
- var CONTAINER_LAYOUT_BASE4 = { flexDirection: "column" };
10438
11308
  var FIELD_LAYOUT_BASE2 = {
10439
11309
  flexDirection: "row",
10440
11310
  alignItems: "center",
@@ -10445,42 +11315,33 @@ var FIELD_LAYOUT_BASE2 = {
10445
11315
  overflow: "hidden"
10446
11316
  };
10447
11317
  var TextInput = /* @__PURE__ */ __name(({
10448
- label,
10449
- helperText,
10450
- error,
10451
11318
  disabled,
10452
11319
  leading,
10453
11320
  trailing,
10454
11321
  containerClassName,
10455
11322
  className,
10456
11323
  testID,
11324
+ id,
11325
+ name,
10457
11326
  onChangeText,
10458
11327
  multiline,
10459
11328
  numberOfLines,
10460
11329
  ...rest
10461
11330
  }) => {
10462
11331
  const colors = useThemeColors();
10463
- const reactId = React.useId();
10464
- const inputId = testID ?? `nori-ui-input-${reactId}`;
10465
11332
  const inputRef = React.useRef(null);
10466
- const focusInput = /* @__PURE__ */ __name(() => {
10467
- inputRef.current?.focus();
10468
- }, "focusInput");
10469
- const describeId = `${inputId}-describe`;
10470
- const hasError = Boolean(error);
10471
- const describedBy = error || helperText ? describeId : void 0;
11333
+ const restAny = rest;
11334
+ const hasError = restAny["aria-invalid"] === true || restAny["aria-invalid"] === "true";
10472
11335
  const inputExtras = {};
10473
11336
  if (testID !== void 0) {
10474
11337
  inputExtras.testID = testID;
10475
11338
  }
10476
- if (label !== void 0) {
10477
- inputExtras.accessibilityLabel = label;
10478
- }
10479
- if (hasError) {
10480
- inputExtras["aria-invalid"] = true;
11339
+ if (id !== void 0) {
11340
+ inputExtras.id = id;
11341
+ inputExtras.nativeID = id;
10481
11342
  }
10482
- if (describedBy !== void 0) {
10483
- inputExtras["aria-describedby"] = describedBy;
11343
+ if (name !== void 0) {
11344
+ inputExtras.name = name;
10484
11345
  }
10485
11346
  if (multiline !== void 0) {
10486
11347
  inputExtras.multiline = multiline;
@@ -10491,12 +11352,6 @@ var TextInput = /* @__PURE__ */ __name(({
10491
11352
  if (onChangeText !== void 0) {
10492
11353
  inputExtras.onChangeText = onChangeText;
10493
11354
  }
10494
- const labelStyle = {
10495
- fontFamily: colors.fontFamily.body,
10496
- fontSize: px(colors.fontSize.sm),
10497
- fontWeight: colors.fontWeight.medium,
10498
- color: colors.semantic.text.default
10499
- };
10500
11355
  const inputStyle = {
10501
11356
  flex: 1,
10502
11357
  paddingVertical: px(colors.spacing["2"]),
@@ -10504,17 +11359,6 @@ var TextInput = /* @__PURE__ */ __name(({
10504
11359
  fontSize: px(colors.fontSize.md),
10505
11360
  color: colors.semantic.text.default
10506
11361
  };
10507
- const helperStyle = {
10508
- fontFamily: colors.fontFamily.body,
10509
- fontSize: px(colors.fontSize.sm),
10510
- color: colors.semantic.text.muted
10511
- };
10512
- const errorStyle = {
10513
- fontFamily: colors.fontFamily.body,
10514
- fontSize: px(colors.fontSize.sm),
10515
- color: colors.color.danger
10516
- };
10517
- const containerStyle = { ...CONTAINER_LAYOUT_BASE4, gap: px(colors.spacing["1"]) };
10518
11362
  const fieldStyle = [
10519
11363
  FIELD_LAYOUT_BASE2,
10520
11364
  {
@@ -10525,55 +11369,33 @@ var TextInput = /* @__PURE__ */ __name(({
10525
11369
  },
10526
11370
  disabled ? { opacity: 0.6 } : null
10527
11371
  ];
10528
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn("flex flex-col gap-1", containerClassName), style: containerStyle, children: [
10529
- label !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: focusInput, accessibilityRole: "none", disabled, children: /* @__PURE__ */ jsxRuntime.jsx(
10530
- reactNative.Text,
10531
- {
10532
- nativeID: `${inputId}-label`,
10533
- accessibilityRole: "text",
10534
- className: "text-sm font-medium text-semantic-text-default",
10535
- style: labelStyle,
10536
- children: label
10537
- }
10538
- ) }) : null,
10539
- /* @__PURE__ */ jsxRuntime.jsxs(
10540
- reactNative.View,
10541
- {
10542
- className: cn(
10543
- "flex-row items-center rounded-md border px-3",
10544
- hasError ? "border-semantic-interactive-destructive" : "border-semantic-border-default",
10545
- disabled ? "opacity-60" : void 0
11372
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: cn(containerClassName), style: { flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
11373
+ reactNative.View,
11374
+ {
11375
+ className: cn(
11376
+ "flex-row items-center rounded-md border px-3",
11377
+ hasError ? "border-semantic-interactive-destructive" : "border-semantic-border-default",
11378
+ disabled ? "opacity-60" : void 0
11379
+ ),
11380
+ style: fieldStyle,
11381
+ children: [
11382
+ leading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "mr-2", style: { marginRight: px(colors.spacing["2"]) }, children: leading }) : null,
11383
+ /* @__PURE__ */ jsxRuntime.jsx(
11384
+ reactNative.TextInput,
11385
+ {
11386
+ ref: inputRef,
11387
+ editable: !disabled,
11388
+ className: cn("flex-1 py-2 text-md text-semantic-text-default outline-none", className),
11389
+ placeholderTextColor: colors.semantic.text.muted,
11390
+ ...inputExtras,
11391
+ ...rest,
11392
+ style: [inputStyle, rest.style]
11393
+ }
10546
11394
  ),
10547
- style: fieldStyle,
10548
- children: [
10549
- leading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "mr-2", style: { marginRight: px(colors.spacing["2"]) }, children: leading }) : null,
10550
- /* @__PURE__ */ jsxRuntime.jsx(
10551
- reactNative.TextInput,
10552
- {
10553
- ref: inputRef,
10554
- nativeID: inputId,
10555
- editable: !disabled,
10556
- className: cn("flex-1 py-2 text-md text-semantic-text-default outline-none", className),
10557
- placeholderTextColor: colors.semantic.text.muted,
10558
- ...inputExtras,
10559
- ...rest,
10560
- style: [inputStyle, rest.style]
10561
- }
10562
- ),
10563
- trailing ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "ml-2", style: { marginLeft: px(colors.spacing["2"]) }, children: trailing }) : null
10564
- ]
10565
- }
10566
- ),
10567
- error ? /* @__PURE__ */ jsxRuntime.jsx(
10568
- reactNative.Text,
10569
- {
10570
- nativeID: describeId,
10571
- className: "text-sm text-semantic-interactive-destructive",
10572
- style: errorStyle,
10573
- children: error
10574
- }
10575
- ) : helperText ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: describeId, className: "text-sm text-semantic-text-muted", style: helperStyle, children: helperText }) : null
10576
- ] });
11395
+ trailing ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { className: "ml-2", style: { marginLeft: px(colors.spacing["2"]) }, children: trailing }) : null
11396
+ ]
11397
+ }
11398
+ ) });
10577
11399
  }, "TextInput");
10578
11400
  var TextArea = /* @__PURE__ */ __name(({ numberOfLines = 4, resize = "vertical", style, ...rest }) => {
10579
11401
  const resizeStyle = { resize };
@@ -11639,11 +12461,14 @@ exports.Button = Button;
11639
12461
  exports.Calendar = Calendar;
11640
12462
  exports.Card = Card;
11641
12463
  exports.Checkbox = Checkbox;
12464
+ exports.DatePicker = DatePicker;
11642
12465
  exports.Dialog = Dialog;
12466
+ exports.Field = Field;
11643
12467
  exports.FloatButton = FloatButton;
11644
12468
  exports.HStack = HStack;
11645
12469
  exports.Icon = Icon;
11646
12470
  exports.InputGroup = InputGroup;
12471
+ exports.Label = Label;
11647
12472
  exports.PAGINATION_COMPACT_BREAKPOINT = PAGINATION_COMPACT_BREAKPOINT;
11648
12473
  exports.Pagination = Pagination;
11649
12474
  exports.Popover = Popover;