@boostdev/design-system-components 1.2.3 → 1.2.5

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 (198) hide show
  1. package/AGENTS.md +19 -11
  2. package/README.md +36 -1
  3. package/dist/client.cjs +50 -50
  4. package/dist/client.css +470 -470
  5. package/dist/client.js +50 -50
  6. package/dist/index.cjs +50 -50
  7. package/dist/index.css +470 -470
  8. package/dist/index.js +50 -50
  9. package/dist/native/index.cjs +3692 -352
  10. package/dist/native/index.d.cts +359 -3
  11. package/dist/native/index.d.ts +359 -3
  12. package/dist/native/index.js +3811 -364
  13. package/dist/utils.cjs +30 -0
  14. package/dist/utils.d.cts +8 -0
  15. package/dist/utils.d.ts +8 -0
  16. package/dist/utils.js +5 -0
  17. package/package.json +10 -4
  18. package/src/client.ts +6 -0
  19. package/src/components/interaction/Button/Button.native.stories.tsx +10 -12
  20. package/src/components/interaction/Button/Button.native.tsx +3 -3
  21. package/src/components/interaction/Dialog/Dialog.native.mdx +61 -0
  22. package/src/components/interaction/Dialog/Dialog.native.spec.tsx +73 -0
  23. package/src/components/interaction/Dialog/Dialog.native.stories.tsx +53 -0
  24. package/src/components/interaction/Dialog/Dialog.native.tsx +128 -0
  25. package/src/components/interaction/Drawer/Drawer.native.mdx +58 -0
  26. package/src/components/interaction/Drawer/Drawer.native.spec.tsx +81 -0
  27. package/src/components/interaction/Drawer/Drawer.native.stories.tsx +33 -0
  28. package/src/components/interaction/Drawer/Drawer.native.tsx +175 -0
  29. package/src/components/interaction/DropdownMenu/DropdownMenu.native.mdx +74 -0
  30. package/src/components/interaction/DropdownMenu/DropdownMenu.native.spec.tsx +78 -0
  31. package/src/components/interaction/DropdownMenu/DropdownMenu.native.stories.tsx +51 -0
  32. package/src/components/interaction/DropdownMenu/DropdownMenu.native.tsx +254 -0
  33. package/src/components/interaction/Popover/Popover.native.mdx +61 -0
  34. package/src/components/interaction/Popover/Popover.native.spec.tsx +73 -0
  35. package/src/components/interaction/Popover/Popover.native.stories.tsx +44 -0
  36. package/src/components/interaction/Popover/Popover.native.tsx +87 -0
  37. package/src/components/interaction/Rating/Rating.native.mdx +55 -0
  38. package/src/components/interaction/Rating/Rating.native.spec.tsx +38 -0
  39. package/src/components/interaction/Rating/Rating.native.stories.tsx +37 -0
  40. package/src/components/interaction/Rating/Rating.native.tsx +50 -0
  41. package/src/components/interaction/Toast/Toast.native.mdx +81 -0
  42. package/src/components/interaction/Toast/Toast.native.spec.tsx +80 -0
  43. package/src/components/interaction/Toast/Toast.native.stories.tsx +47 -0
  44. package/src/components/interaction/Toast/Toast.native.tsx +202 -0
  45. package/src/components/interaction/form/Checkbox/Checkbox.native.stories.tsx +2 -4
  46. package/src/components/interaction/form/Checkbox/Checkbox.native.tsx +1 -1
  47. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.native.mdx +78 -0
  48. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.native.spec.tsx +57 -0
  49. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.native.stories.tsx +96 -0
  50. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.native.tsx +61 -0
  51. package/src/components/interaction/form/Combobox/Combobox.native.mdx +86 -0
  52. package/src/components/interaction/form/Combobox/Combobox.native.spec.tsx +60 -0
  53. package/src/components/interaction/form/Combobox/Combobox.native.stories.tsx +99 -0
  54. package/src/components/interaction/form/Combobox/Combobox.native.tsx +211 -0
  55. package/src/components/interaction/form/FileInput/FileInput.native.mdx +86 -0
  56. package/src/components/interaction/form/FileInput/FileInput.native.spec.tsx +73 -0
  57. package/src/components/interaction/form/FileInput/FileInput.native.stories.tsx +69 -0
  58. package/src/components/interaction/form/FileInput/FileInput.native.tsx +129 -0
  59. package/src/components/interaction/form/FormInput/FormInput.native.mdx +81 -0
  60. package/src/components/interaction/form/FormInput/FormInput.native.spec.tsx +51 -0
  61. package/src/components/interaction/form/FormInput/FormInput.native.stories.tsx +54 -0
  62. package/src/components/interaction/form/FormInput/FormInput.native.tsx +122 -0
  63. package/src/components/interaction/form/NumberInput/NumberInput.native.mdx +87 -0
  64. package/src/components/interaction/form/NumberInput/NumberInput.native.spec.tsx +63 -0
  65. package/src/components/interaction/form/NumberInput/NumberInput.native.stories.tsx +63 -0
  66. package/src/components/interaction/form/NumberInput/NumberInput.native.tsx +198 -0
  67. package/src/components/interaction/form/Radio/Radio.native.spec.tsx +79 -0
  68. package/src/components/interaction/form/Radio/Radio.native.stories.tsx +12 -14
  69. package/src/components/interaction/form/Radio/Radio.native.tsx +1 -1
  70. package/src/components/interaction/form/RadioGroup/RadioGroup.native.mdx +79 -0
  71. package/src/components/interaction/form/RadioGroup/RadioGroup.native.spec.tsx +66 -0
  72. package/src/components/interaction/form/RadioGroup/RadioGroup.native.stories.tsx +96 -0
  73. package/src/components/interaction/form/RadioGroup/RadioGroup.native.tsx +61 -0
  74. package/src/components/interaction/form/SegmentedControl/SegmentedControl.native.mdx +78 -0
  75. package/src/components/interaction/form/SegmentedControl/SegmentedControl.native.spec.tsx +82 -0
  76. package/src/components/interaction/form/SegmentedControl/SegmentedControl.native.stories.tsx +99 -0
  77. package/src/components/interaction/form/SegmentedControl/SegmentedControl.native.tsx +121 -0
  78. package/src/components/interaction/form/Select/Select.native.mdx +85 -0
  79. package/src/components/interaction/form/Select/Select.native.spec.tsx +64 -0
  80. package/src/components/interaction/form/Select/Select.native.stories.tsx +75 -0
  81. package/src/components/interaction/form/Select/Select.native.tsx +252 -0
  82. package/src/components/interaction/form/Slider/Slider.native.mdx +83 -0
  83. package/src/components/interaction/form/Slider/Slider.native.spec.tsx +51 -0
  84. package/src/components/interaction/form/Slider/Slider.native.stories.tsx +58 -0
  85. package/src/components/interaction/form/Slider/Slider.native.tsx +188 -0
  86. package/src/components/interaction/form/Switch/Switch.native.stories.tsx +2 -4
  87. package/src/components/interaction/form/Textarea/Textarea.native.mdx +76 -0
  88. package/src/components/interaction/form/Textarea/Textarea.native.spec.tsx +50 -0
  89. package/src/components/interaction/form/Textarea/Textarea.native.stories.tsx +50 -0
  90. package/src/components/interaction/form/Textarea/Textarea.native.tsx +108 -0
  91. package/src/components/interaction/form/atoms/Label.native.spec.tsx +39 -0
  92. package/src/components/interaction/form/atoms/Label.native.stories.tsx +1 -1
  93. package/src/components/interaction/form/atoms/Message.native.stories.tsx +1 -1
  94. package/src/components/layout/ButtonGroup/ButtonGroup.native.spec.tsx +83 -0
  95. package/src/components/layout/ButtonGroup/ButtonGroup.native.stories.tsx +13 -19
  96. package/src/components/layout/Card/Card.native.spec.tsx +102 -0
  97. package/src/components/layout/Card/Card.native.stories.tsx +9 -11
  98. package/src/components/layout/Card/Card.native.tsx +1 -1
  99. package/src/components/layout/IconWrapper/IconWrapper.native.stories.tsx +7 -11
  100. package/src/components/layout/SectionHeader/SectionHeader.native.spec.tsx +51 -0
  101. package/src/components/layout/SectionHeader/SectionHeader.native.stories.tsx +6 -8
  102. package/src/components/ui/Accordion/Accordion.native.mdx +65 -0
  103. package/src/components/ui/Accordion/Accordion.native.spec.tsx +69 -0
  104. package/src/components/ui/Accordion/Accordion.native.stories.tsx +52 -0
  105. package/src/components/ui/Accordion/Accordion.native.tsx +141 -0
  106. package/src/components/ui/Alert/Alert.native.spec.tsx +76 -0
  107. package/src/components/ui/Alert/Alert.native.stories.tsx +8 -10
  108. package/src/components/ui/Alert/Alert.native.tsx +7 -7
  109. package/src/components/ui/Avatar/Avatar.native.stories.tsx +6 -8
  110. package/src/components/ui/Avatar/Avatar.native.tsx +2 -2
  111. package/src/components/ui/Badge/Badge.native.spec.tsx +45 -0
  112. package/src/components/ui/Badge/Badge.native.stories.tsx +6 -8
  113. package/src/components/ui/Badge/Badge.native.tsx +2 -2
  114. package/src/components/ui/Breadcrumb/Breadcrumb.native.mdx +52 -0
  115. package/src/components/ui/Breadcrumb/Breadcrumb.native.spec.tsx +49 -0
  116. package/src/components/ui/Breadcrumb/Breadcrumb.native.stories.tsx +46 -0
  117. package/src/components/ui/Breadcrumb/Breadcrumb.native.tsx +83 -0
  118. package/src/components/ui/Calendar/Calendar.native.mdx +58 -0
  119. package/src/components/ui/Calendar/Calendar.native.spec.tsx +92 -0
  120. package/src/components/ui/Calendar/Calendar.native.stories.tsx +45 -0
  121. package/src/components/ui/Calendar/Calendar.native.tsx +294 -0
  122. package/src/components/ui/Carousel/Carousel.native.mdx +55 -0
  123. package/src/components/ui/Carousel/Carousel.native.spec.tsx +55 -0
  124. package/src/components/ui/Carousel/Carousel.native.stories.tsx +59 -0
  125. package/src/components/ui/Carousel/Carousel.native.tsx +184 -0
  126. package/src/components/ui/Collapsible/Collapsible.native.mdx +53 -0
  127. package/src/components/ui/Collapsible/Collapsible.native.spec.tsx +68 -0
  128. package/src/components/ui/Collapsible/Collapsible.native.stories.tsx +48 -0
  129. package/src/components/ui/Collapsible/Collapsible.native.tsx +139 -0
  130. package/src/components/ui/DescriptionList/DescriptionList.native.mdx +50 -0
  131. package/src/components/ui/DescriptionList/DescriptionList.native.spec.tsx +37 -0
  132. package/src/components/ui/DescriptionList/DescriptionList.native.stories.tsx +48 -0
  133. package/src/components/ui/DescriptionList/DescriptionList.native.tsx +54 -0
  134. package/src/components/ui/Link/Link.native.mdx +53 -0
  135. package/src/components/ui/Link/Link.native.spec.tsx +35 -0
  136. package/src/components/ui/Link/Link.native.stories.tsx +46 -0
  137. package/src/components/ui/Link/Link.native.tsx +48 -0
  138. package/src/components/ui/Loading/Loading.native.stories.tsx +6 -8
  139. package/src/components/ui/NotificationBanner/NotificationBanner.native.spec.tsx +85 -0
  140. package/src/components/ui/NotificationBanner/NotificationBanner.native.stories.tsx +8 -10
  141. package/src/components/ui/NotificationBanner/NotificationBanner.native.tsx +7 -7
  142. package/src/components/ui/Pagination/Pagination.native.mdx +62 -0
  143. package/src/components/ui/Pagination/Pagination.native.spec.tsx +86 -0
  144. package/src/components/ui/Pagination/Pagination.native.stories.tsx +47 -0
  145. package/src/components/ui/Pagination/Pagination.native.tsx +157 -0
  146. package/src/components/ui/Progress/Progress.native.spec.tsx +56 -0
  147. package/src/components/ui/Progress/Progress.native.stories.tsx +1 -1
  148. package/src/components/ui/Progress/Progress.native.tsx +2 -2
  149. package/src/components/ui/ProgressCircle/ProgressCircle.native.mdx +63 -0
  150. package/src/components/ui/ProgressCircle/ProgressCircle.native.spec.tsx +39 -0
  151. package/src/components/ui/ProgressCircle/ProgressCircle.native.stories.tsx +36 -0
  152. package/src/components/ui/ProgressCircle/ProgressCircle.native.tsx +176 -0
  153. package/src/components/ui/Separator/Separator.native.spec.tsx +39 -0
  154. package/src/components/ui/Separator/Separator.native.stories.tsx +10 -14
  155. package/src/components/ui/Skeleton/Skeleton.native.spec.tsx +39 -0
  156. package/src/components/ui/Skeleton/Skeleton.native.stories.tsx +6 -8
  157. package/src/components/ui/Skeleton/Skeleton.native.tsx +2 -1
  158. package/src/components/ui/Table/Table.native.mdx +72 -0
  159. package/src/components/ui/Table/Table.native.spec.tsx +83 -0
  160. package/src/components/ui/Table/Table.native.stories.tsx +55 -0
  161. package/src/components/ui/Table/Table.native.tsx +196 -0
  162. package/src/components/ui/Tabs/Tabs.native.mdx +65 -0
  163. package/src/components/ui/Tabs/Tabs.native.spec.tsx +65 -0
  164. package/src/components/ui/Tabs/Tabs.native.stories.tsx +57 -0
  165. package/src/components/ui/Tabs/Tabs.native.tsx +133 -0
  166. package/src/components/ui/Tooltip/Tooltip.native.mdx +47 -0
  167. package/src/components/ui/Tooltip/Tooltip.native.spec.tsx +37 -0
  168. package/src/components/ui/Tooltip/Tooltip.native.stories.tsx +38 -0
  169. package/src/components/ui/Tooltip/Tooltip.native.tsx +57 -0
  170. package/src/components/ui/Typography/Typography.native.spec.tsx +49 -0
  171. package/src/components/ui/Typography/Typography.native.stories.tsx +8 -10
  172. package/src/native/ThemeContext.tsx +3 -3
  173. package/src/native.ts +37 -0
  174. package/src/stories/ReactNative.mdx +48 -13
  175. package/src/utils.ts +6 -0
  176. package/src/web-components/interaction/BdsAccordion.stories.tsx +1 -1
  177. package/src/web-components/interaction/BdsCollapsible.stories.tsx +1 -1
  178. package/src/web-components/interaction/BdsSkipLink.stories.tsx +1 -1
  179. package/src/web-components/interaction/BdsTabs.stories.tsx +1 -1
  180. package/src/web-components/interaction/BdsTooltip.stories.tsx +1 -1
  181. package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +1 -1
  182. package/src/web-components/interaction/form/BdsCheckboxGroup.stories.tsx +1 -1
  183. package/src/web-components/interaction/form/BdsCombobox.stories.tsx +1 -1
  184. package/src/web-components/interaction/form/BdsFileInput.stories.tsx +1 -1
  185. package/src/web-components/interaction/form/BdsFormInput.stories.tsx +1 -1
  186. package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +1 -1
  187. package/src/web-components/interaction/form/BdsRadio.stories.tsx +1 -1
  188. package/src/web-components/interaction/form/BdsRadioGroup.stories.tsx +1 -1
  189. package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +1 -1
  190. package/src/web-components/interaction/form/BdsSelect.stories.tsx +1 -1
  191. package/src/web-components/interaction/form/BdsSlider.stories.tsx +1 -1
  192. package/src/web-components/interaction/form/BdsSwitch.stories.tsx +1 -1
  193. package/src/web-components/interaction/form/BdsTextarea.stories.tsx +1 -1
  194. package/src/web-components/ui/BdsButtonGroup.stories.tsx +1 -1
  195. package/src/web-components/ui/BdsCard.stories.tsx +1 -1
  196. package/src/web-components/ui/BdsIconWrapper.stories.tsx +1 -1
  197. package/src/web-components/ui/BdsRating.stories.tsx +1 -1
  198. package/src/web-components/ui/BdsSectionHeader.stories.tsx +1 -1
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,30 +17,66 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/native.ts
21
31
  var native_exports = {};
22
32
  __export(native_exports, {
33
+ Accordion: () => Accordion,
23
34
  Alert: () => Alert,
24
35
  Avatar: () => Avatar,
25
36
  Badge: () => Badge,
37
+ Breadcrumb: () => Breadcrumb,
26
38
  Button: () => Button,
27
39
  ButtonGroup: () => ButtonGroup,
40
+ Calendar: () => Calendar,
28
41
  Card: () => Card,
42
+ Carousel: () => Carousel,
29
43
  Checkbox: () => Checkbox,
44
+ CheckboxGroup: () => CheckboxGroup,
45
+ Collapsible: () => Collapsible,
46
+ Combobox: () => Combobox,
47
+ DescriptionList: () => DescriptionList,
48
+ Dialog: () => Dialog,
49
+ Drawer: () => Drawer,
50
+ DropdownMenu: () => DropdownMenu,
51
+ FileInput: () => FileInput,
52
+ FormInput: () => FormInput,
30
53
  IconWrapper: () => IconWrapper,
31
54
  Label: () => Label,
55
+ Link: () => Link,
32
56
  Loading: () => Loading,
33
57
  Message: () => Message,
34
58
  NotificationBanner: () => NotificationBanner,
59
+ NumberInput: () => NumberInput,
60
+ Pagination: () => Pagination,
61
+ Popover: () => Popover,
35
62
  Progress: () => Progress,
63
+ ProgressCircle: () => ProgressCircle,
36
64
  Radio: () => Radio,
65
+ RadioGroup: () => RadioGroup,
66
+ Rating: () => Rating,
37
67
  SectionHeader: () => SectionHeader,
68
+ SegmentedControl: () => SegmentedControl,
69
+ Select: () => Select,
38
70
  Separator: () => Separator,
39
71
  Skeleton: () => Skeleton,
72
+ Slider: () => Slider,
40
73
  Switch: () => Switch,
74
+ Table: () => Table,
75
+ Tabs: () => Tabs,
76
+ Textarea: () => Textarea,
41
77
  ThemeProvider: () => ThemeProvider,
78
+ ToastProvider: () => ToastProvider,
79
+ Tooltip: () => Tooltip,
42
80
  Typography: () => Typography,
43
81
  animation: () => import_native.animation,
44
82
  border: () => import_native.border,
@@ -47,6 +85,7 @@ __export(native_exports, {
47
85
  lineHeight: () => lineHeight,
48
86
  spacing: () => import_native.spacing,
49
87
  useTheme: () => useTheme,
88
+ useToast: () => useToast,
50
89
  zIndex: () => import_native.zIndex
51
90
  });
52
91
  module.exports = __toCommonJS(native_exports);
@@ -69,9 +108,9 @@ var lineHeight = {
69
108
  // src/native/ThemeContext.tsx
70
109
  var import_jsx_runtime = require("react/jsx-runtime");
71
110
  var ThemeContext = (0, import_react.createContext)(null);
72
- function ThemeProvider({ children }) {
73
- const scheme = (0, import_react_native.useColorScheme)();
74
- const isDark = scheme === "dark";
111
+ function ThemeProvider({ children, colorScheme }) {
112
+ const systemScheme = (0, import_react_native.useColorScheme)();
113
+ const isDark = (colorScheme ?? systemScheme) === "dark";
75
114
  const value = (0, import_react.useMemo)(
76
115
  () => ({ colors: isDark ? import_native.colors.dark : import_native.colors.light, isDark }),
77
116
  [isDark]
@@ -149,7 +188,7 @@ var styles2 = import_react_native3.StyleSheet.create({
149
188
  justifyContent: "center",
150
189
  paddingVertical: import_native.spacing.xxs,
151
190
  paddingHorizontal: import_native.spacing.xs,
152
- borderRadius: 999
191
+ borderRadius: import_native.border.radius.full
153
192
  },
154
193
  text: {
155
194
  fontSize: import_native.font.size.bodyS,
@@ -184,7 +223,7 @@ function getInitials(name) {
184
223
  }
185
224
  var styles3 = import_react_native4.StyleSheet.create({
186
225
  container: {
187
- borderRadius: 999,
226
+ borderRadius: import_native.border.radius.full,
188
227
  overflow: "hidden",
189
228
  alignItems: "center",
190
229
  justifyContent: "center"
@@ -311,12 +350,12 @@ var styles5 = import_react_native7.StyleSheet.create({
311
350
  },
312
351
  track: {
313
352
  width: "100%",
314
- borderRadius: import_native.border.radius.xs,
353
+ borderRadius: import_native.border.radius.full,
315
354
  overflow: "hidden"
316
355
  },
317
356
  fill: {
318
357
  height: "100%",
319
- borderRadius: import_native.border.radius.xs
358
+ borderRadius: import_native.border.radius.full
320
359
  }
321
360
  });
322
361
  function Progress({
@@ -365,7 +404,7 @@ var import_react_native8 = require("react-native");
365
404
  var import_jsx_runtime8 = require("react/jsx-runtime");
366
405
  var styles6 = import_react_native8.StyleSheet.create({
367
406
  skeleton: {
368
- borderRadius: 4,
407
+ borderRadius: import_native.border.radius.xs,
369
408
  overflow: "hidden"
370
409
  }
371
410
  });
@@ -441,18 +480,18 @@ function Alert({
441
480
  const { colors: colors2 } = useTheme();
442
481
  const isUrgent = variant === "error" || variant === "warning";
443
482
  const variantColors = {
444
- info: { bg: colors2.colorBlueSubtle, text: colors2.colorOnBlueSubtle },
445
- success: { bg: colors2.colorSuccessSubtle, text: colors2.colorOnSuccessSubtle },
446
- warning: { bg: colors2.colorOrangeSubtle, text: colors2.colorOnOrangeSubtle },
447
- error: { bg: colors2.colorRedSubtle, text: colors2.colorOnRedSubtle }
483
+ info: { bg: colors2.colorBlueSubtle, text: colors2.colorOnBlueSubtle, border: colors2.colorBlue },
484
+ success: { bg: colors2.colorSuccessSubtle, text: colors2.colorOnSuccessSubtle, border: colors2.colorSuccess },
485
+ warning: { bg: colors2.colorOrangeSubtle, text: colors2.colorOnOrangeSubtle, border: colors2.colorWarning },
486
+ error: { bg: colors2.colorRedSubtle, text: colors2.colorOnBg, border: colors2.colorError }
448
487
  };
449
- const { bg, text } = variantColors[variant];
488
+ const { bg, text, border: borderColor } = variantColors[variant];
450
489
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
451
490
  import_react_native9.View,
452
491
  {
453
492
  accessibilityRole: isUrgent ? "alert" : "none",
454
493
  accessibilityLiveRegion: isUrgent ? "assertive" : "polite",
455
- style: [styles7.alert, { backgroundColor: bg }, style],
494
+ style: [styles7.alert, { backgroundColor: bg, borderStartWidth: import_native.spacing.s, borderStartColor: borderColor }, style],
456
495
  children: [
457
496
  icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native9.View, { style: styles7.icon, children: icon }),
458
497
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native9.View, { style: styles7.content, children: [
@@ -507,18 +546,18 @@ function NotificationBanner({
507
546
  const { colors: colors2 } = useTheme();
508
547
  const isUrgent = variant === "error" || variant === "warning";
509
548
  const variantColors = {
510
- info: { bg: colors2.colorBlueSubtle, text: colors2.colorOnBlueSubtle },
511
- success: { bg: colors2.colorSuccessSubtle, text: colors2.colorOnSuccessSubtle },
512
- warning: { bg: colors2.colorOrangeSubtle, text: colors2.colorOnOrangeSubtle },
513
- error: { bg: colors2.colorRedSubtle, text: colors2.colorOnRedSubtle }
549
+ info: { bg: colors2.colorBlueSubtle, text: colors2.colorOnBlueSubtle, border: colors2.colorBlue },
550
+ success: { bg: colors2.colorSuccessSubtle, text: colors2.colorOnSuccessSubtle, border: colors2.colorSuccess },
551
+ warning: { bg: colors2.colorOrangeSubtle, text: colors2.colorOnOrangeSubtle, border: colors2.colorWarning },
552
+ error: { bg: colors2.colorRedSubtle, text: colors2.colorOnBg, border: colors2.colorError }
514
553
  };
515
- const { bg, text } = variantColors[variant];
554
+ const { bg, text, border: borderColor } = variantColors[variant];
516
555
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
517
556
  import_react_native10.View,
518
557
  {
519
558
  accessibilityRole: isUrgent ? "alert" : "none",
520
559
  accessibilityLiveRegion: isUrgent ? "assertive" : "polite",
521
- style: [styles8.banner, { backgroundColor: bg }, style],
560
+ style: [styles8.banner, { backgroundColor: bg, borderBottomWidth: 3, borderBottomColor: borderColor }, style],
522
561
  children: [
523
562
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.Text, { style: [styles8.content, { color: text }], children }),
524
563
  action,
@@ -538,455 +577,3756 @@ function NotificationBanner({
538
577
  );
539
578
  }
540
579
 
541
- // src/components/layout/Card/Card.native.tsx
580
+ // src/components/ui/Link/Link.native.tsx
542
581
  var import_react_native11 = require("react-native");
543
582
  var import_jsx_runtime11 = require("react/jsx-runtime");
544
- var paddingMap = {
545
- none: 0,
546
- small: import_native.spacing.s,
547
- medium: import_native.spacing.m,
548
- large: import_native.spacing.xxl
549
- };
550
- var alignMap = {
551
- start: "flex-start",
552
- center: "center",
553
- end: "flex-end"
554
- };
555
583
  var styles9 = import_react_native11.StyleSheet.create({
556
- card: {
557
- borderRadius: import_native.border.radius.s,
558
- overflow: "hidden"
584
+ text: {
585
+ fontSize: import_native.font.size.body,
586
+ fontFamily: import_native.font.family.body,
587
+ textDecorationLine: "underline"
588
+ },
589
+ pressed: {
590
+ opacity: 0.75
559
591
  }
560
592
  });
561
- function Card({
562
- children,
563
- variant = "default",
564
- padding = "medium",
565
- textAlign = "start",
566
- style,
567
- onPress,
568
- accessibilityLabel
569
- }) {
593
+ function Link({ href, children, accessibilityLabel, style, onPress }) {
570
594
  const { colors: colors2 } = useTheme();
571
- const variantStyle = {
572
- backgroundColor: colors2.colorBg,
573
- ...variant === "elevated" && {
574
- shadowColor: "#000",
575
- shadowOffset: { width: 0, height: 2 },
576
- shadowOpacity: 0.1,
577
- shadowRadius: 8,
578
- elevation: 4
579
- },
580
- ...variant === "outlined" && {
581
- borderWidth: 1,
582
- borderColor: colors2.colorBgSubtle
595
+ const handlePress = () => {
596
+ if (onPress) {
597
+ onPress();
598
+ } else if (href) {
599
+ import_react_native11.Linking.openURL(href);
583
600
  }
584
601
  };
585
- const inner = {
586
- padding: paddingMap[padding],
587
- alignItems: alignMap[textAlign]
588
- };
589
- if (onPress) {
590
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
591
- import_react_native11.Pressable,
592
- {
593
- onPress,
594
- accessibilityRole: "button",
595
- accessibilityLabel,
596
- style: ({ pressed }) => [styles9.card, variantStyle, inner, pressed && { opacity: 0.8 }, style],
597
- children
598
- }
599
- );
600
- }
601
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.View, { style: [styles9.card, variantStyle, inner, style], children });
602
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
603
+ import_react_native11.Pressable,
604
+ {
605
+ onPress: handlePress,
606
+ accessibilityRole: "link",
607
+ accessibilityLabel,
608
+ style: ({ pressed }) => pressed && styles9.pressed,
609
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { style: [styles9.text, { color: colors2.colorInteractiveOnBg }, style], children })
610
+ }
611
+ );
602
612
  }
603
613
 
604
- // src/components/layout/SectionHeader/SectionHeader.native.tsx
614
+ // src/components/ui/DescriptionList/DescriptionList.native.tsx
605
615
  var import_react_native12 = require("react-native");
606
616
  var import_jsx_runtime12 = require("react/jsx-runtime");
607
- var alignMap2 = {
608
- start: "flex-start",
609
- center: "center",
610
- end: "flex-end"
611
- };
612
- var titleStyles = import_react_native12.StyleSheet.create({
613
- small: {
614
- fontSize: import_native.font.size.heading3,
615
- fontFamily: import_native.font.family.heading,
616
- fontWeight: import_native.font.weight.heading,
617
- lineHeight: lineHeight.heading3
618
- },
619
- medium: {
620
- fontSize: import_native.font.size.heading2,
621
- fontFamily: import_native.font.family.heading,
622
- fontWeight: import_native.font.weight.heading,
623
- lineHeight: lineHeight.heading2
624
- },
625
- large: {
626
- fontSize: import_native.font.size.heading1,
627
- fontFamily: import_native.font.family.heading,
628
- fontWeight: import_native.font.weight.heading,
629
- lineHeight: lineHeight.heading1
630
- }
631
- });
632
617
  var styles10 = import_react_native12.StyleSheet.create({
633
- container: {
618
+ list: {
619
+ gap: import_native.spacing.m
620
+ },
621
+ group: {
634
622
  gap: import_native.spacing.xxs
635
623
  },
636
- subtitle: {
624
+ term: {
637
625
  fontSize: import_native.font.size.bodyS,
638
626
  fontFamily: import_native.font.family.body,
627
+ fontWeight: import_native.font.weight.semibold,
639
628
  lineHeight: lineHeight.bodyS
629
+ },
630
+ description: {
631
+ fontSize: import_native.font.size.body,
632
+ fontFamily: import_native.font.family.body,
633
+ fontWeight: import_native.font.weight.body,
634
+ lineHeight: lineHeight.body
640
635
  }
641
636
  });
642
- function SectionHeader({
643
- title,
644
- subtitle,
645
- alignment = "start",
646
- size = "medium",
647
- style
648
- }) {
637
+ function DescriptionList({ items, style }) {
649
638
  const { colors: colors2 } = useTheme();
650
- const align = alignMap2[alignment];
651
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: [styles10.container, { alignItems: align }, style], children: [
652
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
653
- import_react_native12.Text,
654
- {
655
- accessibilityRole: "header",
656
- style: [titleStyles[size], { color: colors2.colorOnBg }],
657
- children: title
658
- }
659
- ),
660
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: [styles10.subtitle, { color: colors2.colorOnBgSubtle }], children: subtitle })
661
- ] });
639
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.View, { style: [styles10.list, style], accessibilityRole: "list", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: styles10.group, accessibilityRole: "listitem", children: [
640
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: [styles10.term, { color: colors2.colorOnBgSubtle }], children: item.term }),
641
+ typeof item.description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: [styles10.description, { color: colors2.colorOnBg }], children: item.description }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.View, { children: item.description })
642
+ ] }, i)) });
662
643
  }
663
644
 
664
- // src/components/layout/IconWrapper/IconWrapper.native.tsx
645
+ // src/components/ui/Breadcrumb/Breadcrumb.native.tsx
665
646
  var import_react_native13 = require("react-native");
666
647
  var import_jsx_runtime13 = require("react/jsx-runtime");
667
- function IconWrapper({ children, style, accessibilityElementsHidden }) {
648
+ var styles11 = import_react_native13.StyleSheet.create({
649
+ container: {
650
+ flexDirection: "row",
651
+ flexWrap: "wrap",
652
+ alignItems: "center"
653
+ },
654
+ separator: {
655
+ marginHorizontal: import_native.spacing.xs,
656
+ fontSize: import_native.font.size.body,
657
+ fontFamily: import_native.font.family.body,
658
+ lineHeight: lineHeight.body
659
+ },
660
+ itemText: {
661
+ fontSize: import_native.font.size.body,
662
+ fontFamily: import_native.font.family.body,
663
+ lineHeight: lineHeight.body
664
+ },
665
+ pressed: {
666
+ opacity: 0.75
667
+ }
668
+ });
669
+ function Breadcrumb({ items, style }) {
670
+ const { colors: colors2 } = useTheme();
668
671
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
669
672
  import_react_native13.View,
670
673
  {
671
- style: [{ alignItems: "center", justifyContent: "center" }, style],
672
- importantForAccessibility: accessibilityElementsHidden ? "no-hide-descendants" : "auto",
673
- accessibilityElementsHidden,
674
- children
674
+ style: [styles11.container, style],
675
+ accessibilityRole: "navigation",
676
+ accessibilityLabel: "Breadcrumb",
677
+ children: items.map((item, index) => {
678
+ const isLast = index === items.length - 1;
679
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.View, { style: { flexDirection: "row", alignItems: "center", minHeight: 44 }, children: isLast ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
680
+ import_react_native13.Text,
681
+ {
682
+ style: [styles11.itemText, { color: colors2.colorOnBg }],
683
+ accessibilityRole: "text",
684
+ children: item.label
685
+ }
686
+ ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
687
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
688
+ import_react_native13.Pressable,
689
+ {
690
+ onPress: item.onPress,
691
+ accessibilityRole: "link",
692
+ style: ({ pressed }) => pressed && styles11.pressed,
693
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Text, { style: [styles11.itemText, { color: colors2.colorInteractiveOnBg }], children: item.label })
694
+ }
695
+ ),
696
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
697
+ import_react_native13.Text,
698
+ {
699
+ style: [styles11.separator, { color: colors2.colorOnBgSubtle }],
700
+ importantForAccessibility: "no",
701
+ accessibilityElementsHidden: true,
702
+ children: "/"
703
+ }
704
+ )
705
+ ] }) }, index);
706
+ })
675
707
  }
676
708
  );
677
709
  }
678
710
 
679
- // src/components/layout/ButtonGroup/ButtonGroup.native.tsx
711
+ // src/components/ui/ProgressCircle/ProgressCircle.native.tsx
680
712
  var import_react_native14 = require("react-native");
681
713
  var import_jsx_runtime14 = require("react/jsx-runtime");
682
- var styles11 = import_react_native14.StyleSheet.create({
683
- group: {
684
- flexDirection: "row",
685
- flexWrap: "wrap",
686
- gap: import_native.spacing.xs
714
+ var SIZE_PX = {
715
+ small: 40,
716
+ medium: 64,
717
+ large: 96
718
+ };
719
+ var STROKE_WIDTH = {
720
+ small: 3,
721
+ medium: 4,
722
+ large: 5
723
+ };
724
+ var FONT_SIZE = {
725
+ small: import_native.font.size.bodyS - 2,
726
+ medium: import_native.font.size.bodyS,
727
+ large: import_native.font.size.body
728
+ };
729
+ var styles12 = import_react_native14.StyleSheet.create({
730
+ wrapper: {
731
+ alignItems: "center",
732
+ justifyContent: "center"
687
733
  },
688
- column: {
689
- flexDirection: "column",
690
- gap: import_native.spacing.xs
734
+ valueText: {
735
+ position: "absolute",
736
+ fontFamily: import_native.font.family.body,
737
+ fontWeight: import_native.font.weight.semibold
691
738
  }
692
739
  });
693
- function ButtonGroup({ children, variant, accessibilityLabel, style }) {
694
- const isColumn = variant === "card" || variant === "modal";
740
+ function HalfCircle({
741
+ size,
742
+ stroke,
743
+ color,
744
+ rotation
745
+ }) {
695
746
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
696
747
  import_react_native14.View,
697
748
  {
698
- accessibilityLabel,
699
- style: [isColumn ? styles11.column : styles11.group, style],
700
- children
749
+ style: {
750
+ width: size / 2,
751
+ height: size,
752
+ overflow: "hidden"
753
+ },
754
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
755
+ import_react_native14.View,
756
+ {
757
+ style: {
758
+ width: size,
759
+ height: size,
760
+ borderRadius: size / 2,
761
+ borderWidth: stroke,
762
+ borderColor: color,
763
+ transform: [{ rotate: `${rotation}deg` }]
764
+ }
765
+ }
766
+ )
701
767
  }
702
768
  );
703
769
  }
704
-
705
- // src/components/interaction/Button/Button.native.tsx
706
- var import_react_native15 = require("react-native");
707
- var import_jsx_runtime15 = require("react/jsx-runtime");
708
- var sizeTokens = {
709
- small: { height: 36, px: import_native.spacing.m, fontSize: import_native.font.size.bodyS, radius: import_native.border.radius.xs },
710
- medium: { height: 48, px: import_native.spacing.m, fontSize: import_native.font.size.body, radius: import_native.border.radius.s },
711
- large: { height: 56, px: import_native.spacing.xxl, fontSize: import_native.font.size.heading3, radius: import_native.border.radius.m }
712
- };
713
- var styles12 = import_react_native15.StyleSheet.create({
714
- pressable: {
715
- flexDirection: "row",
716
- alignItems: "center",
717
- justifyContent: "center",
718
- gap: import_native.spacing.xs,
719
- alignSelf: "flex-start"
720
- },
721
- label: {
722
- fontFamily: import_native.font.family.body,
723
- fontWeight: import_native.font.weight.semibold,
724
- includeFontPadding: false
725
- }
726
- });
727
- function Button({
728
- children,
729
- variant = "default",
770
+ function ProgressCircle({
771
+ value,
772
+ max = 100,
730
773
  size = "medium",
731
- iconStart,
732
- iconEnd,
733
- disabled = false,
734
- onPress,
735
- accessibilityLabel,
774
+ label,
775
+ showValue = false,
736
776
  style
737
777
  }) {
738
778
  const { colors: colors2 } = useTheme();
739
- const { height, px, fontSize, radius } = sizeTokens[size];
740
- const primaryColor = colors2.colorInteractive;
741
- const onPrimaryColor = colors2.colorOnInteractive;
742
- const outlineTextColor = colors2.colorInteractiveOnBg;
743
- const isOutline = variant === "outline" || variant === "ghost";
744
- const containerStyle = {
745
- height,
746
- paddingHorizontal: px,
747
- borderRadius: radius,
748
- opacity: disabled ? 0.4 : 1,
749
- ...variant === "default" && { backgroundColor: primaryColor },
750
- ...isOutline && {
751
- backgroundColor: "transparent",
752
- borderWidth: 1,
753
- borderColor: outlineTextColor
754
- }
755
- };
756
- const textColor = variant === "default" ? onPrimaryColor : outlineTextColor;
757
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
758
- import_react_native15.Pressable,
779
+ const percentage = Math.min(100, Math.max(0, value / max * 100));
780
+ const px = SIZE_PX[size];
781
+ const stroke = STROKE_WIDTH[size];
782
+ const fillColor = colors2.colorInteractive;
783
+ const trackColor = colors2.colorBgSubtle;
784
+ const degrees = percentage / 100 * 360;
785
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
786
+ import_react_native14.View,
759
787
  {
760
- onPress,
761
- disabled,
762
- accessibilityRole: "button",
763
- accessibilityLabel,
764
- accessibilityState: { disabled },
765
- style: ({ pressed }) => [styles12.pressable, containerStyle, pressed && { opacity: 0.75 }, style],
788
+ style: [
789
+ styles12.wrapper,
790
+ { width: px, height: px },
791
+ style
792
+ ],
793
+ accessibilityRole: "progressbar",
794
+ accessibilityLabel: label,
795
+ accessibilityValue: { min: 0, max, now: value },
766
796
  children: [
767
- iconStart && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.View, { importantForAccessibility: "no-hide-descendants", accessibilityElementsHidden: true, children: iconStart }),
768
- children && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.Text, { style: [styles12.label, { fontSize, color: textColor }], children }),
769
- iconEnd && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.View, { importantForAccessibility: "no-hide-descendants", children: iconEnd })
797
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
798
+ import_react_native14.View,
799
+ {
800
+ style: {
801
+ position: "absolute",
802
+ width: px,
803
+ height: px,
804
+ borderRadius: px / 2,
805
+ borderWidth: stroke,
806
+ borderColor: trackColor
807
+ }
808
+ }
809
+ ),
810
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
811
+ import_react_native14.View,
812
+ {
813
+ style: {
814
+ position: "absolute",
815
+ width: px / 2,
816
+ height: px,
817
+ start: px / 2,
818
+ overflow: "hidden"
819
+ },
820
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
821
+ HalfCircle,
822
+ {
823
+ size: px,
824
+ stroke,
825
+ color: percentage > 0 ? fillColor : "transparent",
826
+ rotation: Math.min(degrees, 180) - 180
827
+ }
828
+ )
829
+ }
830
+ ),
831
+ degrees > 180 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
832
+ import_react_native14.View,
833
+ {
834
+ style: {
835
+ position: "absolute",
836
+ width: px / 2,
837
+ height: px,
838
+ start: 0,
839
+ overflow: "hidden"
840
+ },
841
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
842
+ import_react_native14.View,
843
+ {
844
+ style: {
845
+ position: "absolute",
846
+ end: 0
847
+ },
848
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
849
+ HalfCircle,
850
+ {
851
+ size: px,
852
+ stroke,
853
+ color: fillColor,
854
+ rotation: Math.min(degrees - 180, 180)
855
+ }
856
+ )
857
+ }
858
+ )
859
+ }
860
+ ),
861
+ showValue && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
862
+ import_react_native14.Text,
863
+ {
864
+ style: [styles12.valueText, { fontSize: FONT_SIZE[size], color: colors2.colorOnBg }],
865
+ importantForAccessibility: "no",
866
+ accessibilityElementsHidden: true,
867
+ children: [
868
+ Math.round(percentage),
869
+ "%"
870
+ ]
871
+ }
872
+ )
770
873
  ]
771
874
  }
772
875
  );
773
876
  }
774
877
 
775
- // src/components/interaction/form/Switch/Switch.native.tsx
776
- var import_react_native18 = require("react-native");
878
+ // src/components/ui/Tooltip/Tooltip.native.tsx
879
+ var import_react3 = require("react");
880
+ var import_react_native15 = require("react-native");
881
+ var import_jsx_runtime15 = require("react/jsx-runtime");
882
+ var styles13 = import_react_native15.StyleSheet.create({
883
+ wrapper: {
884
+ position: "relative"
885
+ },
886
+ tooltip: {
887
+ position: "absolute",
888
+ bottom: "100%",
889
+ start: 0,
890
+ marginBottom: import_native.spacing.xxs,
891
+ paddingVertical: import_native.spacing.xxs,
892
+ paddingHorizontal: import_native.spacing.xs,
893
+ borderRadius: import_native.border.radius.full,
894
+ zIndex: 10,
895
+ alignSelf: "flex-start"
896
+ },
897
+ text: {
898
+ fontSize: import_native.font.size.bodyS,
899
+ fontFamily: import_native.font.family.body
900
+ }
901
+ });
902
+ function Tooltip({ content, children, style }) {
903
+ const { colors: colors2 } = useTheme();
904
+ const [visible, setVisible] = (0, import_react3.useState)(false);
905
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native15.View, { style: [styles13.wrapper, style], children: [
906
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
907
+ import_react_native15.Pressable,
908
+ {
909
+ onLongPress: () => setVisible(true),
910
+ onPressOut: () => setVisible(false),
911
+ accessibilityHint: content,
912
+ children
913
+ }
914
+ ),
915
+ visible && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
916
+ import_react_native15.View,
917
+ {
918
+ style: [styles13.tooltip, { backgroundColor: colors2.colorOnBg }],
919
+ accessibilityRole: "text",
920
+ accessibilityLabel: content,
921
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.Text, { style: [styles13.text, { color: colors2.colorBg }], children: content })
922
+ }
923
+ )
924
+ ] });
925
+ }
777
926
 
778
- // src/components/interaction/form/atoms/Label.native.tsx
927
+ // src/components/ui/Pagination/Pagination.native.tsx
779
928
  var import_react_native16 = require("react-native");
780
929
  var import_jsx_runtime16 = require("react/jsx-runtime");
781
- function Label({ label, style }) {
782
- const { colors: colors2 } = useTheme();
783
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
784
- import_react_native16.Text,
785
- {
786
- style: [
787
- {
788
- fontFamily: import_native.font.family.body,
789
- fontSize: import_native.font.size.body,
790
- lineHeight: lineHeight.body,
791
- fontWeight: import_native.font.weight.semibold,
792
- color: colors2.colorOnBg
793
- },
794
- style
795
- ],
796
- children: label
930
+ function getPageRange(current, total) {
931
+ const delta = 1;
932
+ const range = [];
933
+ for (let i = 1; i <= total; i++) {
934
+ if (i === 1 || i === total || i >= current - delta && i <= current + delta) {
935
+ range.push(i);
936
+ } else if (range[range.length - 1] !== "...") {
937
+ range.push("...");
938
+ }
939
+ }
940
+ return range;
941
+ }
942
+ var styles14 = import_react_native16.StyleSheet.create({
943
+ container: {
944
+ flexDirection: "row",
945
+ alignItems: "center",
946
+ gap: import_native.spacing.xxs
947
+ },
948
+ button: {
949
+ minWidth: 44,
950
+ minHeight: 44,
951
+ alignItems: "center",
952
+ justifyContent: "center",
953
+ borderRadius: import_native.border.radius.full,
954
+ paddingHorizontal: import_native.spacing.xs,
955
+ paddingVertical: import_native.spacing.xxs
956
+ },
957
+ buttonText: {
958
+ fontSize: import_native.font.size.body,
959
+ fontFamily: import_native.font.family.body,
960
+ lineHeight: lineHeight.body,
961
+ fontWeight: import_native.font.weight.body
962
+ },
963
+ navText: {
964
+ fontSize: import_native.font.size.body,
965
+ fontFamily: import_native.font.family.body,
966
+ lineHeight: lineHeight.body,
967
+ fontWeight: import_native.font.weight.semibold
968
+ },
969
+ ellipsis: {
970
+ fontSize: import_native.font.size.body,
971
+ fontFamily: import_native.font.family.body,
972
+ lineHeight: lineHeight.body,
973
+ minWidth: 44,
974
+ minHeight: 44,
975
+ textAlign: "center",
976
+ textAlignVertical: "center"
977
+ },
978
+ pressed: {
979
+ opacity: 0.75
980
+ },
981
+ disabled: {
982
+ opacity: 0.4
983
+ }
984
+ });
985
+ function Pagination({
986
+ currentPage,
987
+ totalPages,
988
+ onPageChange,
989
+ style
990
+ }) {
991
+ const { colors: colors2 } = useTheme();
992
+ const pages = getPageRange(currentPage, totalPages);
993
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
994
+ import_react_native16.View,
995
+ {
996
+ style: [styles14.container, style],
997
+ accessibilityRole: "navigation",
998
+ accessibilityLabel: "Pagination",
999
+ children: [
1000
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1001
+ import_react_native16.Pressable,
1002
+ {
1003
+ onPress: () => onPageChange(currentPage - 1),
1004
+ disabled: currentPage <= 1,
1005
+ accessibilityRole: "button",
1006
+ accessibilityLabel: "Previous page",
1007
+ accessibilityState: { disabled: currentPage <= 1 },
1008
+ style: ({ pressed }) => [
1009
+ styles14.button,
1010
+ currentPage <= 1 && styles14.disabled,
1011
+ pressed && !currentPage && styles14.pressed
1012
+ ],
1013
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.Text, { style: [styles14.navText, { color: colors2.colorOnBg }], children: "\u2039" })
1014
+ }
1015
+ ),
1016
+ pages.map(
1017
+ (page, index) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1018
+ import_react_native16.Text,
1019
+ {
1020
+ style: [styles14.ellipsis, { color: colors2.colorOnBgSubtle }],
1021
+ importantForAccessibility: "no",
1022
+ accessibilityElementsHidden: true,
1023
+ children: "..."
1024
+ },
1025
+ `ellipsis-${index}`
1026
+ ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1027
+ import_react_native16.Pressable,
1028
+ {
1029
+ onPress: () => onPageChange(page),
1030
+ accessibilityRole: "button",
1031
+ accessibilityLabel: `Page ${page}`,
1032
+ accessibilityState: { selected: currentPage === page },
1033
+ style: ({ pressed }) => [
1034
+ styles14.button,
1035
+ currentPage === page && { backgroundColor: colors2.colorInteractive },
1036
+ pressed && styles14.pressed
1037
+ ],
1038
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1039
+ import_react_native16.Text,
1040
+ {
1041
+ style: [
1042
+ styles14.buttonText,
1043
+ {
1044
+ color: currentPage === page ? colors2.colorOnInteractive : colors2.colorOnBg
1045
+ },
1046
+ currentPage === page && { fontWeight: import_native.font.weight.semibold }
1047
+ ],
1048
+ children: page
1049
+ }
1050
+ )
1051
+ },
1052
+ page
1053
+ )
1054
+ ),
1055
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1056
+ import_react_native16.Pressable,
1057
+ {
1058
+ onPress: () => onPageChange(currentPage + 1),
1059
+ disabled: currentPage >= totalPages,
1060
+ accessibilityRole: "button",
1061
+ accessibilityLabel: "Next page",
1062
+ accessibilityState: { disabled: currentPage >= totalPages },
1063
+ style: ({ pressed }) => [
1064
+ styles14.button,
1065
+ currentPage >= totalPages && styles14.disabled,
1066
+ pressed && styles14.pressed
1067
+ ],
1068
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.Text, { style: [styles14.navText, { color: colors2.colorOnBg }], children: "\u203A" })
1069
+ }
1070
+ )
1071
+ ]
797
1072
  }
798
1073
  );
799
1074
  }
800
1075
 
801
- // src/components/interaction/form/atoms/Message.native.tsx
1076
+ // src/components/ui/Collapsible/Collapsible.native.tsx
1077
+ var import_react4 = require("react");
802
1078
  var import_react_native17 = require("react-native");
803
1079
  var import_jsx_runtime17 = require("react/jsx-runtime");
804
- var styles13 = import_react_native17.StyleSheet.create({
805
- base: {
1080
+ if (import_react_native17.Platform.OS === "android" && import_react_native17.UIManager.setLayoutAnimationEnabledExperimental) {
1081
+ import_react_native17.UIManager.setLayoutAnimationEnabledExperimental(true);
1082
+ }
1083
+ var styles15 = import_react_native17.StyleSheet.create({
1084
+ container: {
1085
+ borderRadius: import_native.border.radius.m,
1086
+ overflow: "hidden"
1087
+ },
1088
+ header: {
1089
+ flexDirection: "row",
1090
+ alignItems: "center",
1091
+ justifyContent: "space-between",
1092
+ minHeight: 44,
1093
+ paddingVertical: import_native.spacing.s,
1094
+ paddingHorizontal: import_native.spacing.m
1095
+ },
1096
+ summaryText: {
1097
+ flex: 1,
1098
+ fontSize: import_native.font.size.body,
806
1099
  fontFamily: import_native.font.family.body,
807
- fontSize: import_native.font.size.bodyS,
808
- lineHeight: lineHeight.bodyS
1100
+ fontWeight: import_native.font.weight.semibold,
1101
+ lineHeight: lineHeight.body
1102
+ },
1103
+ chevron: {
1104
+ fontSize: import_native.font.size.body,
1105
+ marginStart: import_native.spacing.xs
1106
+ },
1107
+ content: {
1108
+ paddingHorizontal: import_native.spacing.m,
1109
+ paddingBottom: import_native.spacing.m
1110
+ },
1111
+ pressed: {
1112
+ opacity: 0.75
809
1113
  }
810
1114
  });
811
- function Message({ message, type, style }) {
1115
+ function Collapsible({
1116
+ summary,
1117
+ children,
1118
+ open: controlledOpen,
1119
+ defaultOpen = false,
1120
+ onToggle,
1121
+ name: _name,
1122
+ // eslint-disable-line @typescript-eslint/no-unused-vars
1123
+ style
1124
+ }) {
812
1125
  const { colors: colors2 } = useTheme();
813
- if (!message) return null;
814
- const color = type === "error" ? colors2.colorError : colors2.colorOnBgSubtle;
815
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
816
- import_react_native17.Text,
1126
+ const [internalOpen, setInternalOpen] = (0, import_react4.useState)(defaultOpen);
1127
+ const isControlled = controlledOpen !== void 0;
1128
+ const isOpen = isControlled ? controlledOpen : internalOpen;
1129
+ const rotation = (0, import_react4.useRef)(new import_react_native17.Animated.Value(isOpen ? 1 : 0)).current;
1130
+ const toggle = (0, import_react4.useCallback)(() => {
1131
+ const next = !isOpen;
1132
+ import_react_native17.LayoutAnimation.configureNext(import_react_native17.LayoutAnimation.Presets.easeInEaseOut);
1133
+ import_react_native17.Animated.timing(rotation, {
1134
+ toValue: next ? 1 : 0,
1135
+ duration: 200,
1136
+ useNativeDriver: true
1137
+ }).start();
1138
+ if (!isControlled) {
1139
+ setInternalOpen(next);
1140
+ }
1141
+ onToggle?.(next);
1142
+ }, [isOpen, isControlled, onToggle, rotation]);
1143
+ const rotateZ = rotation.interpolate({
1144
+ inputRange: [0, 1],
1145
+ outputRange: ["0deg", "90deg"]
1146
+ });
1147
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1148
+ import_react_native17.View,
817
1149
  {
818
- accessibilityRole: type === "error" ? "alert" : "none",
819
- accessibilityLiveRegion: type === "error" ? "assertive" : "polite",
820
- style: [styles13.base, { color }, style],
821
- children: message
1150
+ style: [styles15.container, { borderBottomWidth: 1, borderBottomColor: colors2.colorBgSubtle }, style],
1151
+ accessibilityRole: "summary",
1152
+ children: [
1153
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1154
+ import_react_native17.Pressable,
1155
+ {
1156
+ onPress: toggle,
1157
+ accessibilityRole: "button",
1158
+ accessibilityLabel: summary,
1159
+ accessibilityState: { expanded: isOpen },
1160
+ style: ({ pressed }) => [styles15.header, pressed && styles15.pressed],
1161
+ children: [
1162
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native17.Text, { style: [styles15.summaryText, { color: colors2.colorOnBg }], children: summary }),
1163
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1164
+ import_react_native17.Animated.Text,
1165
+ {
1166
+ style: [styles15.chevron, { color: colors2.colorOnBgSubtle, transform: [{ rotateZ }] }],
1167
+ importantForAccessibility: "no",
1168
+ accessibilityElementsHidden: true,
1169
+ children: "\u25B8"
1170
+ }
1171
+ )
1172
+ ]
1173
+ }
1174
+ ),
1175
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native17.View, { style: styles15.content, children })
1176
+ ]
822
1177
  }
823
1178
  );
824
1179
  }
825
1180
 
826
- // src/components/interaction/form/Switch/Switch.native.tsx
1181
+ // src/components/ui/Accordion/Accordion.native.tsx
1182
+ var import_react5 = require("react");
1183
+ var import_react_native18 = require("react-native");
827
1184
  var import_jsx_runtime18 = require("react/jsx-runtime");
828
- var styles14 = import_react_native18.StyleSheet.create({
1185
+ if (import_react_native18.Platform.OS === "android" && import_react_native18.UIManager.setLayoutAnimationEnabledExperimental) {
1186
+ import_react_native18.UIManager.setLayoutAnimationEnabledExperimental(true);
1187
+ }
1188
+ var styles16 = import_react_native18.StyleSheet.create({
829
1189
  container: {
830
- gap: import_native.spacing.xxs
1190
+ overflow: "hidden",
1191
+ borderRadius: import_native.border.radius.s
831
1192
  },
832
- row: {
1193
+ item: {
1194
+ borderBottomWidth: 1
1195
+ },
1196
+ header: {
833
1197
  flexDirection: "row",
834
1198
  alignItems: "center",
835
- gap: import_native.spacing.xs
1199
+ justifyContent: "space-between",
1200
+ minHeight: 44,
1201
+ paddingVertical: import_native.spacing.s,
1202
+ paddingHorizontal: import_native.spacing.m
1203
+ },
1204
+ titleText: {
1205
+ flex: 1,
1206
+ fontSize: import_native.font.size.body,
1207
+ fontFamily: import_native.font.family.body,
1208
+ fontWeight: import_native.font.weight.semibold,
1209
+ lineHeight: lineHeight.body
1210
+ },
1211
+ chevron: {
1212
+ fontSize: import_native.font.size.bodyS,
1213
+ marginStart: import_native.spacing.xs
1214
+ },
1215
+ panel: {
1216
+ paddingHorizontal: import_native.spacing.m,
1217
+ paddingBottom: import_native.spacing.m
1218
+ },
1219
+ pressed: {
1220
+ opacity: 0.75
1221
+ },
1222
+ disabled: {
1223
+ opacity: 0.4
836
1224
  }
837
1225
  });
838
- function Switch({
839
- label,
840
- value = false,
841
- onChange,
842
- disabled = false,
843
- error,
844
- hint,
1226
+ function Accordion({
1227
+ items,
1228
+ allowMultiple = false,
1229
+ defaultOpen = [],
845
1230
  style
846
1231
  }) {
847
1232
  const { colors: colors2 } = useTheme();
848
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native18.View, { style: [styles14.container, style], children: [
849
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native18.View, { style: styles14.row, children: [
850
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
851
- import_react_native18.Switch,
852
- {
853
- value,
854
- onValueChange: onChange,
855
- disabled,
856
- accessibilityLabel: label,
857
- accessibilityRole: "switch",
858
- accessibilityState: { checked: value, disabled },
859
- thumbColor: colors2.colorInteractive,
860
- trackColor: { false: colors2.colorBgSubtle, true: colors2.colorBlueSubtle }
861
- }
862
- ),
863
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { label })
864
- ] }),
865
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Message, { type: "error", message: error }),
866
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Message, { type: "hint", message: hint })
867
- ] });
1233
+ const [openIds, setOpenIds] = (0, import_react5.useState)(defaultOpen);
1234
+ const toggle = (id) => {
1235
+ import_react_native18.LayoutAnimation.configureNext(import_react_native18.LayoutAnimation.Presets.easeInEaseOut);
1236
+ setOpenIds((prev) => {
1237
+ const isOpen = prev.includes(id);
1238
+ if (isOpen) return prev.filter((i) => i !== id);
1239
+ return allowMultiple ? [...prev, id] : [id];
1240
+ });
1241
+ };
1242
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native18.View, { style: [styles16.container, style], children: items.map((item, index) => {
1243
+ const isOpen = openIds.includes(item.id);
1244
+ const isLast = index === items.length - 1;
1245
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1246
+ import_react_native18.View,
1247
+ {
1248
+ style: [
1249
+ styles16.item,
1250
+ { borderBottomColor: colors2.colorBgSubtle },
1251
+ isLast && { borderBottomWidth: 0 }
1252
+ ],
1253
+ children: [
1254
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1255
+ import_react_native18.Pressable,
1256
+ {
1257
+ onPress: () => toggle(item.id),
1258
+ disabled: item.disabled,
1259
+ accessibilityRole: "button",
1260
+ accessibilityState: { expanded: isOpen, disabled: item.disabled },
1261
+ style: ({ pressed }) => [
1262
+ styles16.header,
1263
+ item.disabled && styles16.disabled,
1264
+ pressed && !item.disabled && styles16.pressed
1265
+ ],
1266
+ children: [
1267
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native18.Text, { style: [styles16.titleText, { color: colors2.colorOnBg }], children: typeof item.title === "string" ? item.title : item.title }),
1268
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1269
+ import_react_native18.Text,
1270
+ {
1271
+ style: [styles16.chevron, { color: colors2.colorOnBgSubtle }],
1272
+ importantForAccessibility: "no",
1273
+ accessibilityElementsHidden: true,
1274
+ children: isOpen ? "\u25BE" : "\u25B8"
1275
+ }
1276
+ )
1277
+ ]
1278
+ }
1279
+ ),
1280
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native18.View, { style: styles16.panel, accessibilityRole: "summary", children: item.content })
1281
+ ]
1282
+ },
1283
+ item.id
1284
+ );
1285
+ }) });
868
1286
  }
869
1287
 
870
- // src/components/interaction/form/Checkbox/Checkbox.native.tsx
1288
+ // src/components/ui/Tabs/Tabs.native.tsx
1289
+ var import_react6 = require("react");
871
1290
  var import_react_native19 = require("react-native");
872
1291
  var import_jsx_runtime19 = require("react/jsx-runtime");
873
- var BOX = 22;
874
- var styles15 = import_react_native19.StyleSheet.create({
1292
+ var styles17 = import_react_native19.StyleSheet.create({
875
1293
  container: {
876
- gap: import_native.spacing.xxs
1294
+ overflow: "hidden"
877
1295
  },
878
- row: {
1296
+ tabList: {
879
1297
  flexDirection: "row",
880
- alignItems: "center",
881
- gap: import_native.spacing.xs,
882
- minHeight: 44
1298
+ borderBottomWidth: 2
883
1299
  },
884
- box: {
885
- width: BOX,
886
- height: BOX,
887
- borderRadius: import_native.border.radius.xs,
888
- borderWidth: 2,
1300
+ tabButton: {
1301
+ minHeight: 44,
1302
+ paddingHorizontal: import_native.spacing.m,
1303
+ paddingVertical: import_native.spacing.s,
889
1304
  alignItems: "center",
890
- justifyContent: "center"
1305
+ justifyContent: "center",
1306
+ borderBottomWidth: 2,
1307
+ marginBottom: -2
891
1308
  },
892
- checkmark: {
893
- fontSize: 14,
894
- fontWeight: "700",
895
- lineHeight: 16
1309
+ tabLabel: {
1310
+ fontSize: import_native.font.size.body,
1311
+ fontFamily: import_native.font.family.body,
1312
+ lineHeight: lineHeight.body
1313
+ },
1314
+ panel: {
1315
+ paddingVertical: import_native.spacing.m
1316
+ },
1317
+ pressed: {
1318
+ opacity: 0.75
1319
+ },
1320
+ disabled: {
1321
+ opacity: 0.4
896
1322
  }
897
1323
  });
898
- function Checkbox({
899
- label,
900
- name,
901
- checked = false,
902
- onChange,
903
- disabled = false,
904
- error,
905
- hint,
1324
+ function Tabs({
1325
+ tabs,
1326
+ defaultTab,
906
1327
  style
907
1328
  }) {
908
1329
  const { colors: colors2 } = useTheme();
909
- const borderColor = error ? colors2.colorError : checked ? colors2.colorInteractive : colors2.colorBgSubtle;
910
- const bgColor = checked ? colors2.colorInteractive : "transparent";
911
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native19.View, { style: [styles15.container, style], children: [
912
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
913
- import_react_native19.Pressable,
1330
+ const [activeTab, setActiveTab] = (0, import_react6.useState)(defaultTab ?? tabs[0]?.id);
1331
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native19.View, { style: [styles17.container, style], children: [
1332
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1333
+ import_react_native19.ScrollView,
914
1334
  {
915
- onPress: () => !disabled && onChange?.(!checked),
916
- accessibilityRole: "checkbox",
917
- accessibilityLabel: typeof label === "string" ? label : name,
918
- accessibilityState: { checked, disabled },
919
- disabled,
920
- style: ({ pressed }) => [styles15.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
921
- children: [
922
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native19.View, { style: [styles15.box, { borderColor, backgroundColor: bgColor }], children: checked && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Label, { label: "\u2713", style: [styles15.checkmark, { color: colors2.colorOnInteractive }] }) }),
923
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Label, { label })
924
- ]
1335
+ horizontal: true,
1336
+ showsHorizontalScrollIndicator: false,
1337
+ contentContainerStyle: [styles17.tabList, { borderBottomColor: colors2.colorBgSubtle }],
1338
+ accessibilityRole: "tabbar",
1339
+ children: tabs.map((tab) => {
1340
+ const isActive = activeTab === tab.id;
1341
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1342
+ import_react_native19.Pressable,
1343
+ {
1344
+ onPress: () => setActiveTab(tab.id),
1345
+ disabled: tab.disabled,
1346
+ accessibilityRole: "tab",
1347
+ accessibilityState: {
1348
+ selected: isActive,
1349
+ disabled: tab.disabled
1350
+ },
1351
+ accessibilityLabel: typeof tab.label === "string" ? tab.label : void 0,
1352
+ style: ({ pressed }) => [
1353
+ styles17.tabButton,
1354
+ {
1355
+ borderBottomColor: isActive ? colors2.colorInteractive : "transparent"
1356
+ },
1357
+ tab.disabled && styles17.disabled,
1358
+ pressed && !tab.disabled && styles17.pressed
1359
+ ],
1360
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1361
+ import_react_native19.Text,
1362
+ {
1363
+ style: [
1364
+ styles17.tabLabel,
1365
+ {
1366
+ color: isActive ? colors2.colorInteractive : colors2.colorOnBgSubtle,
1367
+ fontWeight: isActive ? import_native.font.weight.semibold : import_native.font.weight.body
1368
+ }
1369
+ ],
1370
+ children: tab.label
1371
+ }
1372
+ )
1373
+ },
1374
+ tab.id
1375
+ );
1376
+ })
925
1377
  }
926
1378
  ),
927
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Message, { type: "error", message: error }),
928
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Message, { type: "hint", message: hint })
1379
+ tabs.map((tab) => {
1380
+ const isActive = activeTab === tab.id;
1381
+ if (!isActive) return null;
1382
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native19.View, { style: styles17.panel, accessibilityRole: "tabpanel", children: tab.content }, tab.id);
1383
+ })
929
1384
  ] });
930
1385
  }
931
1386
 
932
- // src/components/interaction/form/Radio/Radio.native.tsx
1387
+ // src/components/ui/Table/Table.native.tsx
933
1388
  var import_react_native20 = require("react-native");
934
1389
  var import_jsx_runtime20 = require("react/jsx-runtime");
935
- var DOT = 22;
936
- var INNER = 10;
937
- var styles16 = import_react_native20.StyleSheet.create({
938
- container: {
1390
+ var styles18 = import_react_native20.StyleSheet.create({
1391
+ wrapper: {
1392
+ borderRadius: import_native.border.radius.s,
1393
+ overflow: "hidden"
1394
+ },
1395
+ caption: {
1396
+ fontSize: import_native.font.size.bodyS,
1397
+ fontFamily: import_native.font.family.body,
1398
+ fontWeight: import_native.font.weight.semibold,
1399
+ lineHeight: lineHeight.bodyS,
1400
+ paddingVertical: import_native.spacing.xs,
1401
+ paddingHorizontal: import_native.spacing.m
1402
+ },
1403
+ headerRow: {
1404
+ flexDirection: "row"
1405
+ },
1406
+ headerCell: {
1407
+ flex: 1,
1408
+ minWidth: 100,
1409
+ paddingVertical: import_native.spacing.s,
1410
+ paddingHorizontal: import_native.spacing.m,
1411
+ flexDirection: "row",
1412
+ alignItems: "center",
939
1413
  gap: import_native.spacing.xxs
940
1414
  },
1415
+ headerText: {
1416
+ fontSize: import_native.font.size.bodyS,
1417
+ fontFamily: import_native.font.family.body,
1418
+ fontWeight: import_native.font.weight.semibold,
1419
+ lineHeight: lineHeight.bodyS
1420
+ },
1421
+ sortIndicator: {
1422
+ fontSize: import_native.font.size.bodyS
1423
+ },
941
1424
  row: {
942
1425
  flexDirection: "row",
943
- alignItems: "center",
944
- gap: import_native.spacing.xs,
1426
+ borderTopWidth: 1,
945
1427
  minHeight: 44
946
1428
  },
947
- outer: {
948
- width: DOT,
949
- height: DOT,
950
- borderRadius: DOT / 2,
951
- borderWidth: 2,
952
- alignItems: "center",
1429
+ cell: {
1430
+ flex: 1,
1431
+ minWidth: 100,
1432
+ paddingVertical: import_native.spacing.s,
1433
+ paddingHorizontal: import_native.spacing.m,
953
1434
  justifyContent: "center"
954
1435
  },
955
- inner: {
956
- width: INNER,
957
- height: INNER,
958
- borderRadius: INNER / 2
1436
+ cellText: {
1437
+ fontSize: import_native.font.size.body,
1438
+ fontFamily: import_native.font.family.body,
1439
+ fontWeight: import_native.font.weight.body,
1440
+ lineHeight: lineHeight.body
1441
+ },
1442
+ pressed: {
1443
+ opacity: 0.75
959
1444
  }
960
1445
  });
961
- function Radio({
962
- label,
963
- name,
964
- checked = false,
965
- onChange,
966
- disabled = false,
967
- error,
968
- hint,
1446
+ function Table({
1447
+ columns,
1448
+ rows,
1449
+ caption,
1450
+ sortKey,
1451
+ sortDirection,
1452
+ onSort,
969
1453
  style
970
1454
  }) {
971
1455
  const { colors: colors2 } = useTheme();
972
- const borderColor = error ? colors2.colorError : checked ? colors2.colorInteractive : colors2.colorBgSubtle;
973
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native20.View, { style: [styles16.container, style], children: [
974
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
975
- import_react_native20.Pressable,
976
- {
977
- onPress: () => !disabled && onChange?.(),
978
- accessibilityRole: "radio",
979
- accessibilityLabel: typeof label === "string" ? label : name,
980
- accessibilityState: { checked, disabled },
981
- disabled,
982
- style: ({ pressed }) => [styles16.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
983
- children: [
984
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: [styles16.outer, { borderColor }], children: checked && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: [styles16.inner, { backgroundColor: colors2.colorInteractive }] }) }),
985
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Label, { label })
986
- ]
987
- }
988
- ),
989
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Message, { type: "error", message: error }),
990
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Message, { type: "hint", message: hint })
1456
+ const handleSort = (key) => {
1457
+ if (!onSort) return;
1458
+ const nextDirection = sortKey === key && sortDirection === "asc" ? "desc" : "asc";
1459
+ onSort(key, nextDirection);
1460
+ };
1461
+ const getSortLabel = (col) => {
1462
+ const base = `Sort by ${String(col.header)}`;
1463
+ if (sortKey !== col.key) return base;
1464
+ return `${base}, currently ${sortDirection === "asc" ? "ascending" : "descending"}`;
1465
+ };
1466
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1467
+ import_react_native20.ScrollView,
1468
+ {
1469
+ horizontal: true,
1470
+ showsHorizontalScrollIndicator: true,
1471
+ style: [styles18.wrapper, { backgroundColor: colors2.colorBg }, style],
1472
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native20.View, { children: [
1473
+ caption && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.Text, { style: [styles18.caption, { color: colors2.colorOnBgSubtle }], children: caption }),
1474
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: [styles18.headerRow, { backgroundColor: colors2.colorBgSubtle }], children: columns.map(
1475
+ (col) => col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1476
+ import_react_native20.Pressable,
1477
+ {
1478
+ onPress: () => handleSort(col.key),
1479
+ accessibilityRole: "button",
1480
+ accessibilityLabel: getSortLabel(col),
1481
+ style: ({ pressed }) => [styles18.headerCell, pressed && styles18.pressed],
1482
+ children: [
1483
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.Text, { style: [styles18.headerText, { color: colors2.colorOnBg }], children: col.header }),
1484
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1485
+ import_react_native20.Text,
1486
+ {
1487
+ style: [
1488
+ styles18.sortIndicator,
1489
+ {
1490
+ color: sortKey === col.key ? colors2.colorInteractive : colors2.colorOnBgSubtle
1491
+ }
1492
+ ],
1493
+ importantForAccessibility: "no",
1494
+ accessibilityElementsHidden: true,
1495
+ children: sortKey === col.key ? sortDirection === "asc" ? "\u25B2" : "\u25BC" : "\u25BD"
1496
+ }
1497
+ )
1498
+ ]
1499
+ },
1500
+ col.key
1501
+ ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: styles18.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.Text, { style: [styles18.headerText, { color: colors2.colorOnBg }], children: col.header }) }, col.key)
1502
+ ) }),
1503
+ rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1504
+ import_react_native20.View,
1505
+ {
1506
+ style: [
1507
+ styles18.row,
1508
+ { borderTopColor: colors2.colorBgSubtle },
1509
+ rowIndex % 2 === 1 && { backgroundColor: colors2.colorBgSubtle }
1510
+ ],
1511
+ accessibilityRole: "none",
1512
+ children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: styles18.cell, children: col.render ? typeof col.render(row) === "string" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.Text, { style: [styles18.cellText, { color: colors2.colorOnBg }], children: col.render(row) }) : col.render(row) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.Text, { style: [styles18.cellText, { color: colors2.colorOnBg }], children: String(row[col.key] ?? "") }) }, col.key))
1513
+ },
1514
+ rowIndex
1515
+ ))
1516
+ ] })
1517
+ }
1518
+ );
1519
+ }
1520
+
1521
+ // src/components/ui/Calendar/Calendar.native.tsx
1522
+ var import_react7 = require("react");
1523
+ var import_react_native21 = require("react-native");
1524
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1525
+ var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
1526
+ var DAY_LABELS = {
1527
+ Su: "Sunday",
1528
+ Mo: "Monday",
1529
+ Tu: "Tuesday",
1530
+ We: "Wednesday",
1531
+ Th: "Thursday",
1532
+ Fr: "Friday",
1533
+ Sa: "Saturday"
1534
+ };
1535
+ var MONTHS = [
1536
+ "January",
1537
+ "February",
1538
+ "March",
1539
+ "April",
1540
+ "May",
1541
+ "June",
1542
+ "July",
1543
+ "August",
1544
+ "September",
1545
+ "October",
1546
+ "November",
1547
+ "December"
1548
+ ];
1549
+ function isSameDay(a, b) {
1550
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
1551
+ }
1552
+ function toMidnight(date) {
1553
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
1554
+ }
1555
+ function isOutOfRange(date, min, max) {
1556
+ const d = toMidnight(date);
1557
+ if (min && d < toMidnight(min)) return true;
1558
+ return !!(max && d > toMidnight(max));
1559
+ }
1560
+ function getDaysInMonth(year, month) {
1561
+ return new Date(year, month + 1, 0).getDate();
1562
+ }
1563
+ function getFirstDayOfMonth(year, month) {
1564
+ return new Date(year, month, 1).getDay();
1565
+ }
1566
+ var DAY_SIZE = 44;
1567
+ var styles19 = import_react_native21.StyleSheet.create({
1568
+ container: {
1569
+ alignSelf: "flex-start"
1570
+ },
1571
+ header: {
1572
+ flexDirection: "row",
1573
+ alignItems: "center",
1574
+ justifyContent: "space-between",
1575
+ paddingVertical: import_native.spacing.xs,
1576
+ paddingHorizontal: import_native.spacing.xxs
1577
+ },
1578
+ navButton: {
1579
+ minWidth: DAY_SIZE,
1580
+ minHeight: DAY_SIZE,
1581
+ alignItems: "center",
1582
+ justifyContent: "center",
1583
+ borderRadius: import_native.border.radius.full
1584
+ },
1585
+ navText: {
1586
+ fontSize: import_native.font.size.heading3,
1587
+ fontWeight: import_native.font.weight.semibold
1588
+ },
1589
+ monthYear: {
1590
+ fontSize: import_native.font.size.body,
1591
+ fontFamily: import_native.font.family.body,
1592
+ fontWeight: import_native.font.weight.semibold,
1593
+ lineHeight: lineHeight.body
1594
+ },
1595
+ weekRow: {
1596
+ flexDirection: "row"
1597
+ },
1598
+ weekday: {
1599
+ width: DAY_SIZE,
1600
+ height: DAY_SIZE,
1601
+ alignItems: "center",
1602
+ justifyContent: "center"
1603
+ },
1604
+ weekdayText: {
1605
+ fontSize: import_native.font.size.bodyS,
1606
+ fontFamily: import_native.font.family.body,
1607
+ fontWeight: import_native.font.weight.semibold,
1608
+ lineHeight: lineHeight.bodyS
1609
+ },
1610
+ grid: {
1611
+ gap: import_native.spacing.xxxs
1612
+ },
1613
+ dayRow: {
1614
+ flexDirection: "row"
1615
+ },
1616
+ dayCell: {
1617
+ width: DAY_SIZE,
1618
+ height: DAY_SIZE,
1619
+ alignItems: "center",
1620
+ justifyContent: "center",
1621
+ borderRadius: import_native.border.radius.full
1622
+ },
1623
+ dayText: {
1624
+ fontSize: import_native.font.size.body,
1625
+ fontFamily: import_native.font.family.body,
1626
+ lineHeight: lineHeight.body
1627
+ },
1628
+ today: {
1629
+ borderWidth: 1
1630
+ },
1631
+ pressed: {
1632
+ opacity: 0.75
1633
+ },
1634
+ disabled: {
1635
+ opacity: 0.4
1636
+ }
1637
+ });
1638
+ function Calendar({
1639
+ value,
1640
+ defaultValue,
1641
+ min,
1642
+ max,
1643
+ onChange,
1644
+ style
1645
+ }) {
1646
+ const { colors: colors2 } = useTheme();
1647
+ const today = /* @__PURE__ */ new Date();
1648
+ const controlled = value !== void 0;
1649
+ const [internal, setInternal] = (0, import_react7.useState)(defaultValue);
1650
+ const selected = controlled ? value : internal;
1651
+ const [viewYear, setViewYear] = (0, import_react7.useState)(
1652
+ selected?.getFullYear() ?? today.getFullYear()
1653
+ );
1654
+ const [viewMonth, setViewMonth] = (0, import_react7.useState)(
1655
+ selected?.getMonth() ?? today.getMonth()
1656
+ );
1657
+ const daysInMonth = getDaysInMonth(viewYear, viewMonth);
1658
+ const firstDay = getFirstDayOfMonth(viewYear, viewMonth);
1659
+ const navigate = (delta) => {
1660
+ const d = new Date(viewYear, viewMonth + delta, 1);
1661
+ setViewYear(d.getFullYear());
1662
+ setViewMonth(d.getMonth());
1663
+ };
1664
+ const selectDay = (day) => {
1665
+ const date = new Date(viewYear, viewMonth, day);
1666
+ if (isOutOfRange(date, min, max)) return;
1667
+ if (!controlled) setInternal(date);
1668
+ onChange?.(date);
1669
+ };
1670
+ const cells = [
1671
+ ...Array.from({ length: firstDay }, () => null),
1672
+ ...Array.from({ length: daysInMonth }, (_, i) => ({ day: i + 1 }))
1673
+ ];
1674
+ while (cells.length % 7 !== 0) cells.push(null);
1675
+ const rows = Array.from(
1676
+ { length: cells.length / 7 },
1677
+ (_, i) => cells.slice(i * 7, i * 7 + 7)
1678
+ );
1679
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1680
+ import_react_native21.View,
1681
+ {
1682
+ style: [styles19.container, style],
1683
+ accessibilityRole: "none",
1684
+ accessibilityLabel: `${MONTHS[viewMonth]} ${viewYear} calendar`,
1685
+ children: [
1686
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native21.View, { style: styles19.header, children: [
1687
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1688
+ import_react_native21.Pressable,
1689
+ {
1690
+ onPress: () => navigate(-1),
1691
+ accessibilityRole: "button",
1692
+ accessibilityLabel: "Previous month",
1693
+ style: ({ pressed }) => [styles19.navButton, pressed && styles19.pressed],
1694
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.Text, { style: [styles19.navText, { color: colors2.colorOnBg }], children: "\u2039" })
1695
+ }
1696
+ ),
1697
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1698
+ import_react_native21.Text,
1699
+ {
1700
+ style: [styles19.monthYear, { color: colors2.colorOnBg }],
1701
+ accessibilityRole: "text",
1702
+ accessibilityLiveRegion: "polite",
1703
+ children: [
1704
+ MONTHS[viewMonth],
1705
+ " ",
1706
+ viewYear
1707
+ ]
1708
+ }
1709
+ ),
1710
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1711
+ import_react_native21.Pressable,
1712
+ {
1713
+ onPress: () => navigate(1),
1714
+ accessibilityRole: "button",
1715
+ accessibilityLabel: "Next month",
1716
+ style: ({ pressed }) => [styles19.navButton, pressed && styles19.pressed],
1717
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.Text, { style: [styles19.navText, { color: colors2.colorOnBg }], children: "\u203A" })
1718
+ }
1719
+ )
1720
+ ] }),
1721
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.View, { style: styles19.weekRow, children: DAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.View, { style: styles19.weekday, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1722
+ import_react_native21.Text,
1723
+ {
1724
+ style: [styles19.weekdayText, { color: colors2.colorOnBgSubtle }],
1725
+ accessibilityLabel: DAY_LABELS[d],
1726
+ children: d
1727
+ }
1728
+ ) }, d)) }),
1729
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.View, { style: styles19.grid, children: rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.View, { style: styles19.dayRow, children: row.map((cell, colIndex) => {
1730
+ if (!cell) {
1731
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.View, { style: styles19.dayCell }, colIndex);
1732
+ }
1733
+ const date = new Date(viewYear, viewMonth, cell.day);
1734
+ const isSelected = selected ? isSameDay(date, selected) : false;
1735
+ const isToday = isSameDay(date, today);
1736
+ const disabled = isOutOfRange(date, min, max);
1737
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1738
+ import_react_native21.Pressable,
1739
+ {
1740
+ onPress: () => selectDay(cell.day),
1741
+ disabled,
1742
+ accessibilityRole: "button",
1743
+ accessibilityLabel: date.toLocaleDateString("en", {
1744
+ month: "long",
1745
+ day: "numeric",
1746
+ year: "numeric"
1747
+ }),
1748
+ accessibilityState: {
1749
+ selected: isSelected,
1750
+ disabled
1751
+ },
1752
+ style: ({ pressed }) => [
1753
+ styles19.dayCell,
1754
+ isSelected && {
1755
+ backgroundColor: colors2.colorInteractive
1756
+ },
1757
+ isToday && !isSelected && [
1758
+ styles19.today,
1759
+ { borderColor: colors2.colorInteractive }
1760
+ ],
1761
+ disabled && styles19.disabled,
1762
+ pressed && !disabled && styles19.pressed
1763
+ ],
1764
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1765
+ import_react_native21.Text,
1766
+ {
1767
+ style: [
1768
+ styles19.dayText,
1769
+ {
1770
+ color: isSelected ? colors2.colorOnInteractive : colors2.colorOnBg,
1771
+ fontWeight: isToday ? import_native.font.weight.semibold : import_native.font.weight.body
1772
+ }
1773
+ ],
1774
+ children: cell.day
1775
+ }
1776
+ )
1777
+ },
1778
+ colIndex
1779
+ );
1780
+ }) }, rowIndex)) })
1781
+ ]
1782
+ }
1783
+ );
1784
+ }
1785
+
1786
+ // src/components/ui/Carousel/Carousel.native.tsx
1787
+ var import_react8 = require("react");
1788
+ var import_react_native22 = require("react-native");
1789
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1790
+ var DOT_SIZE = 8;
1791
+ var DOT_HIT_SIZE = 44;
1792
+ var styles20 = import_react_native22.StyleSheet.create({
1793
+ container: {
1794
+ width: "100%"
1795
+ },
1796
+ scrollView: {
1797
+ flexGrow: 0
1798
+ },
1799
+ slide: {
1800
+ justifyContent: "center",
1801
+ alignItems: "center"
1802
+ },
1803
+ nav: {
1804
+ flexDirection: "row",
1805
+ alignItems: "center",
1806
+ justifyContent: "center",
1807
+ gap: import_native.spacing.xs,
1808
+ paddingVertical: import_native.spacing.s
1809
+ },
1810
+ navButton: {
1811
+ minWidth: 44,
1812
+ minHeight: 44,
1813
+ alignItems: "center",
1814
+ justifyContent: "center",
1815
+ borderRadius: import_native.border.radius.s
1816
+ },
1817
+ navText: {
1818
+ fontSize: 20,
1819
+ fontWeight: "600"
1820
+ },
1821
+ dots: {
1822
+ flexDirection: "row",
1823
+ alignItems: "center",
1824
+ gap: import_native.spacing.xs
1825
+ },
1826
+ dotWrapper: {
1827
+ minWidth: DOT_HIT_SIZE,
1828
+ minHeight: DOT_HIT_SIZE,
1829
+ alignItems: "center",
1830
+ justifyContent: "center"
1831
+ },
1832
+ dot: {
1833
+ width: DOT_SIZE,
1834
+ height: DOT_SIZE,
1835
+ borderRadius: DOT_SIZE / 2
1836
+ },
1837
+ pressed: {
1838
+ opacity: 0.75
1839
+ }
1840
+ });
1841
+ function Carousel({
1842
+ items,
1843
+ label,
1844
+ style
1845
+ }) {
1846
+ const { colors: colors2 } = useTheme();
1847
+ const scrollRef = (0, import_react8.useRef)(null);
1848
+ const [activeIndex, setActiveIndex] = (0, import_react8.useState)(0);
1849
+ const [slideWidth, setSlideWidth] = (0, import_react8.useState)(import_react_native22.Dimensions.get("window").width);
1850
+ const handleScroll = (0, import_react8.useCallback)(
1851
+ (e) => {
1852
+ const offset = e.nativeEvent.contentOffset.x;
1853
+ const width = e.nativeEvent.layoutMeasurement.width;
1854
+ if (width > 0) {
1855
+ const index = Math.round(offset / width);
1856
+ setActiveIndex(index);
1857
+ }
1858
+ },
1859
+ []
1860
+ );
1861
+ const scrollTo = (index) => {
1862
+ const clamped = Math.max(0, Math.min(index, items.length - 1));
1863
+ scrollRef.current?.scrollTo({ x: clamped * slideWidth, animated: true });
1864
+ };
1865
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1866
+ import_react_native22.View,
1867
+ {
1868
+ style: [styles20.container, style],
1869
+ accessibilityRole: "none",
1870
+ accessibilityLabel: label,
1871
+ children: [
1872
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1873
+ import_react_native22.ScrollView,
1874
+ {
1875
+ ref: scrollRef,
1876
+ horizontal: true,
1877
+ pagingEnabled: true,
1878
+ showsHorizontalScrollIndicator: false,
1879
+ onScroll: handleScroll,
1880
+ scrollEventThrottle: 16,
1881
+ onLayout: (e) => setSlideWidth(e.nativeEvent.layout.width),
1882
+ style: styles20.scrollView,
1883
+ children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native22.View, { style: [styles20.slide, { width: slideWidth }], children: item }, index))
1884
+ }
1885
+ ),
1886
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native22.View, { style: styles20.nav, children: [
1887
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1888
+ import_react_native22.Pressable,
1889
+ {
1890
+ onPress: () => scrollTo(activeIndex - 1),
1891
+ disabled: activeIndex <= 0,
1892
+ accessibilityRole: "button",
1893
+ accessibilityLabel: "Previous",
1894
+ accessibilityState: { disabled: activeIndex <= 0 },
1895
+ style: ({ pressed }) => [
1896
+ styles20.navButton,
1897
+ activeIndex <= 0 && { opacity: 0.4 },
1898
+ pressed && styles20.pressed
1899
+ ],
1900
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native22.Text, { style: [styles20.navText, { color: colors2.colorOnBg }], children: "\u2039" })
1901
+ }
1902
+ ),
1903
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native22.View, { style: styles20.dots, children: items.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1904
+ import_react_native22.Pressable,
1905
+ {
1906
+ onPress: () => scrollTo(index),
1907
+ accessibilityRole: "button",
1908
+ accessibilityLabel: `Go to slide ${index + 1}`,
1909
+ accessibilityState: { selected: activeIndex === index },
1910
+ style: styles20.dotWrapper,
1911
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1912
+ import_react_native22.View,
1913
+ {
1914
+ style: [
1915
+ styles20.dot,
1916
+ {
1917
+ backgroundColor: activeIndex === index ? colors2.colorInteractive : colors2.colorBgSubtle
1918
+ }
1919
+ ]
1920
+ }
1921
+ )
1922
+ },
1923
+ index
1924
+ )) }),
1925
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1926
+ import_react_native22.Pressable,
1927
+ {
1928
+ onPress: () => scrollTo(activeIndex + 1),
1929
+ disabled: activeIndex >= items.length - 1,
1930
+ accessibilityRole: "button",
1931
+ accessibilityLabel: "Next",
1932
+ accessibilityState: { disabled: activeIndex >= items.length - 1 },
1933
+ style: ({ pressed }) => [
1934
+ styles20.navButton,
1935
+ activeIndex >= items.length - 1 && { opacity: 0.4 },
1936
+ pressed && styles20.pressed
1937
+ ],
1938
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native22.Text, { style: [styles20.navText, { color: colors2.colorOnBg }], children: "\u203A" })
1939
+ }
1940
+ )
1941
+ ] })
1942
+ ]
1943
+ }
1944
+ );
1945
+ }
1946
+
1947
+ // src/components/layout/Card/Card.native.tsx
1948
+ var import_react_native23 = require("react-native");
1949
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1950
+ var paddingMap = {
1951
+ none: 0,
1952
+ small: import_native.spacing.s,
1953
+ medium: import_native.spacing.m,
1954
+ large: import_native.spacing.xxl
1955
+ };
1956
+ var alignMap = {
1957
+ start: "flex-start",
1958
+ center: "center",
1959
+ end: "flex-end"
1960
+ };
1961
+ var styles21 = import_react_native23.StyleSheet.create({
1962
+ card: {
1963
+ borderRadius: import_native.border.radius.m,
1964
+ overflow: "hidden"
1965
+ }
1966
+ });
1967
+ function Card({
1968
+ children,
1969
+ variant = "default",
1970
+ padding = "medium",
1971
+ textAlign = "start",
1972
+ style,
1973
+ onPress,
1974
+ accessibilityLabel
1975
+ }) {
1976
+ const { colors: colors2 } = useTheme();
1977
+ const variantStyle = {
1978
+ backgroundColor: colors2.colorBg,
1979
+ ...variant === "elevated" && {
1980
+ shadowColor: "#000",
1981
+ shadowOffset: { width: 0, height: 2 },
1982
+ shadowOpacity: 0.1,
1983
+ shadowRadius: 8,
1984
+ elevation: 4
1985
+ },
1986
+ ...variant === "outlined" && {
1987
+ borderWidth: 1,
1988
+ borderColor: colors2.colorBgSubtle
1989
+ }
1990
+ };
1991
+ const inner = {
1992
+ padding: paddingMap[padding],
1993
+ alignItems: alignMap[textAlign]
1994
+ };
1995
+ if (onPress) {
1996
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1997
+ import_react_native23.Pressable,
1998
+ {
1999
+ onPress,
2000
+ accessibilityRole: "button",
2001
+ accessibilityLabel,
2002
+ style: ({ pressed }) => [styles21.card, variantStyle, inner, pressed && { opacity: 0.8 }, style],
2003
+ children
2004
+ }
2005
+ );
2006
+ }
2007
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native23.View, { style: [styles21.card, variantStyle, inner, style], children });
2008
+ }
2009
+
2010
+ // src/components/layout/SectionHeader/SectionHeader.native.tsx
2011
+ var import_react_native24 = require("react-native");
2012
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2013
+ var alignMap2 = {
2014
+ start: "flex-start",
2015
+ center: "center",
2016
+ end: "flex-end"
2017
+ };
2018
+ var titleStyles = import_react_native24.StyleSheet.create({
2019
+ small: {
2020
+ fontSize: import_native.font.size.heading3,
2021
+ fontFamily: import_native.font.family.heading,
2022
+ fontWeight: import_native.font.weight.heading,
2023
+ lineHeight: lineHeight.heading3
2024
+ },
2025
+ medium: {
2026
+ fontSize: import_native.font.size.heading2,
2027
+ fontFamily: import_native.font.family.heading,
2028
+ fontWeight: import_native.font.weight.heading,
2029
+ lineHeight: lineHeight.heading2
2030
+ },
2031
+ large: {
2032
+ fontSize: import_native.font.size.heading1,
2033
+ fontFamily: import_native.font.family.heading,
2034
+ fontWeight: import_native.font.weight.heading,
2035
+ lineHeight: lineHeight.heading1
2036
+ }
2037
+ });
2038
+ var styles22 = import_react_native24.StyleSheet.create({
2039
+ container: {
2040
+ gap: import_native.spacing.xxs
2041
+ },
2042
+ subtitle: {
2043
+ fontSize: import_native.font.size.bodyS,
2044
+ fontFamily: import_native.font.family.body,
2045
+ lineHeight: lineHeight.bodyS
2046
+ }
2047
+ });
2048
+ function SectionHeader({
2049
+ title,
2050
+ subtitle,
2051
+ alignment = "start",
2052
+ size = "medium",
2053
+ style
2054
+ }) {
2055
+ const { colors: colors2 } = useTheme();
2056
+ const align = alignMap2[alignment];
2057
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native24.View, { style: [styles22.container, { alignItems: align }, style], children: [
2058
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2059
+ import_react_native24.Text,
2060
+ {
2061
+ accessibilityRole: "header",
2062
+ style: [titleStyles[size], { color: colors2.colorOnBg }],
2063
+ children: title
2064
+ }
2065
+ ),
2066
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native24.Text, { style: [styles22.subtitle, { color: colors2.colorOnBgSubtle }], children: subtitle })
2067
+ ] });
2068
+ }
2069
+
2070
+ // src/components/layout/IconWrapper/IconWrapper.native.tsx
2071
+ var import_react_native25 = require("react-native");
2072
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2073
+ function IconWrapper({ children, style, accessibilityElementsHidden }) {
2074
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2075
+ import_react_native25.View,
2076
+ {
2077
+ style: [{ alignItems: "center", justifyContent: "center" }, style],
2078
+ importantForAccessibility: accessibilityElementsHidden ? "no-hide-descendants" : "auto",
2079
+ accessibilityElementsHidden,
2080
+ children
2081
+ }
2082
+ );
2083
+ }
2084
+
2085
+ // src/components/layout/ButtonGroup/ButtonGroup.native.tsx
2086
+ var import_react_native26 = require("react-native");
2087
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2088
+ var styles23 = import_react_native26.StyleSheet.create({
2089
+ group: {
2090
+ flexDirection: "row",
2091
+ flexWrap: "wrap",
2092
+ gap: import_native.spacing.xs
2093
+ },
2094
+ column: {
2095
+ flexDirection: "column",
2096
+ gap: import_native.spacing.xs
2097
+ }
2098
+ });
2099
+ function ButtonGroup({ children, variant, accessibilityLabel, style }) {
2100
+ const isColumn = variant === "card" || variant === "modal";
2101
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2102
+ import_react_native26.View,
2103
+ {
2104
+ accessibilityLabel,
2105
+ style: [isColumn ? styles23.column : styles23.group, style],
2106
+ children
2107
+ }
2108
+ );
2109
+ }
2110
+
2111
+ // src/components/interaction/Button/Button.native.tsx
2112
+ var import_react_native27 = require("react-native");
2113
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2114
+ var sizeTokens = {
2115
+ small: { height: 36, px: import_native.spacing.m, fontSize: import_native.font.size.bodyS, radius: import_native.border.radius.full },
2116
+ medium: { height: 48, px: import_native.spacing.m, fontSize: import_native.font.size.body, radius: import_native.border.radius.full },
2117
+ large: { height: 56, px: import_native.spacing.xxl, fontSize: import_native.font.size.heading3, radius: import_native.border.radius.full }
2118
+ };
2119
+ var styles24 = import_react_native27.StyleSheet.create({
2120
+ pressable: {
2121
+ flexDirection: "row",
2122
+ alignItems: "center",
2123
+ justifyContent: "center",
2124
+ gap: import_native.spacing.xs,
2125
+ alignSelf: "flex-start"
2126
+ },
2127
+ label: {
2128
+ fontFamily: import_native.font.family.body,
2129
+ fontWeight: import_native.font.weight.semibold,
2130
+ includeFontPadding: false
2131
+ }
2132
+ });
2133
+ function Button({
2134
+ children,
2135
+ variant = "default",
2136
+ size = "medium",
2137
+ iconStart,
2138
+ iconEnd,
2139
+ disabled = false,
2140
+ onPress,
2141
+ accessibilityLabel,
2142
+ style
2143
+ }) {
2144
+ const { colors: colors2 } = useTheme();
2145
+ const { height, px, fontSize, radius } = sizeTokens[size];
2146
+ const primaryColor = colors2.colorInteractive;
2147
+ const onPrimaryColor = colors2.colorOnInteractive;
2148
+ const outlineTextColor = colors2.colorInteractiveOnBg;
2149
+ const isOutline = variant === "outline" || variant === "ghost";
2150
+ const containerStyle = {
2151
+ height,
2152
+ paddingHorizontal: px,
2153
+ borderRadius: radius,
2154
+ opacity: disabled ? 0.4 : 1,
2155
+ ...variant === "default" && { backgroundColor: primaryColor },
2156
+ ...isOutline && {
2157
+ backgroundColor: "transparent",
2158
+ borderWidth: 1,
2159
+ borderColor: outlineTextColor
2160
+ }
2161
+ };
2162
+ const textColor = variant === "default" ? onPrimaryColor : outlineTextColor;
2163
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2164
+ import_react_native27.Pressable,
2165
+ {
2166
+ onPress,
2167
+ disabled,
2168
+ accessibilityRole: "button",
2169
+ accessibilityLabel,
2170
+ accessibilityState: { disabled },
2171
+ style: ({ pressed }) => [styles24.pressable, containerStyle, pressed && { opacity: 0.75 }, style],
2172
+ children: [
2173
+ iconStart && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native27.View, { importantForAccessibility: "no-hide-descendants", accessibilityElementsHidden: true, children: iconStart }),
2174
+ children && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native27.Text, { style: [styles24.label, { fontSize, color: textColor }], children }),
2175
+ iconEnd && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native27.View, { importantForAccessibility: "no-hide-descendants", children: iconEnd })
2176
+ ]
2177
+ }
2178
+ );
2179
+ }
2180
+
2181
+ // src/components/interaction/Rating/Rating.native.tsx
2182
+ var import_react_native28 = require("react-native");
2183
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2184
+ var STAR_SIZE = 24;
2185
+ var styles25 = import_react_native28.StyleSheet.create({
2186
+ container: {
2187
+ flexDirection: "row",
2188
+ alignItems: "center"
2189
+ },
2190
+ star: {
2191
+ fontSize: STAR_SIZE,
2192
+ fontFamily: import_native.font.family.body
2193
+ }
2194
+ });
2195
+ function Rating({ value, max = 5, style, accessibilityLabel }) {
2196
+ const { colors: colors2 } = useTheme();
2197
+ const label = accessibilityLabel ?? `${value} out of ${max} stars`;
2198
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2199
+ import_react_native28.View,
2200
+ {
2201
+ style: [styles25.container, style],
2202
+ accessibilityRole: "image",
2203
+ accessibilityLabel: label,
2204
+ children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2205
+ import_react_native28.Text,
2206
+ {
2207
+ style: [
2208
+ styles25.star,
2209
+ { color: i < value ? colors2.colorWarning : colors2.colorBgSubtle }
2210
+ ],
2211
+ importantForAccessibility: "no",
2212
+ accessibilityElementsHidden: true,
2213
+ children: "\u2605"
2214
+ },
2215
+ i
2216
+ ))
2217
+ }
2218
+ );
2219
+ }
2220
+
2221
+ // src/components/interaction/form/Switch/Switch.native.tsx
2222
+ var import_react_native31 = require("react-native");
2223
+
2224
+ // src/components/interaction/form/atoms/Label.native.tsx
2225
+ var import_react_native29 = require("react-native");
2226
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2227
+ function Label({ label, style }) {
2228
+ const { colors: colors2 } = useTheme();
2229
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2230
+ import_react_native29.Text,
2231
+ {
2232
+ style: [
2233
+ {
2234
+ fontFamily: import_native.font.family.body,
2235
+ fontSize: import_native.font.size.body,
2236
+ lineHeight: lineHeight.body,
2237
+ fontWeight: import_native.font.weight.semibold,
2238
+ color: colors2.colorOnBg
2239
+ },
2240
+ style
2241
+ ],
2242
+ children: label
2243
+ }
2244
+ );
2245
+ }
2246
+
2247
+ // src/components/interaction/form/atoms/Message.native.tsx
2248
+ var import_react_native30 = require("react-native");
2249
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2250
+ var styles26 = import_react_native30.StyleSheet.create({
2251
+ base: {
2252
+ fontFamily: import_native.font.family.body,
2253
+ fontSize: import_native.font.size.bodyS,
2254
+ lineHeight: lineHeight.bodyS
2255
+ }
2256
+ });
2257
+ function Message({ message, type, style }) {
2258
+ const { colors: colors2 } = useTheme();
2259
+ if (!message) return null;
2260
+ const color = type === "error" ? colors2.colorError : colors2.colorOnBgSubtle;
2261
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2262
+ import_react_native30.Text,
2263
+ {
2264
+ accessibilityRole: type === "error" ? "alert" : "none",
2265
+ accessibilityLiveRegion: type === "error" ? "assertive" : "polite",
2266
+ style: [styles26.base, { color }, style],
2267
+ children: message
2268
+ }
2269
+ );
2270
+ }
2271
+
2272
+ // src/components/interaction/form/Switch/Switch.native.tsx
2273
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2274
+ var styles27 = import_react_native31.StyleSheet.create({
2275
+ container: {
2276
+ gap: import_native.spacing.xxs
2277
+ },
2278
+ row: {
2279
+ flexDirection: "row",
2280
+ alignItems: "center",
2281
+ gap: import_native.spacing.xs
2282
+ }
2283
+ });
2284
+ function Switch({
2285
+ label,
2286
+ value = false,
2287
+ onChange,
2288
+ disabled = false,
2289
+ error,
2290
+ hint,
2291
+ style
2292
+ }) {
2293
+ const { colors: colors2 } = useTheme();
2294
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native31.View, { style: [styles27.container, style], children: [
2295
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native31.View, { style: styles27.row, children: [
2296
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2297
+ import_react_native31.Switch,
2298
+ {
2299
+ value,
2300
+ onValueChange: onChange,
2301
+ disabled,
2302
+ accessibilityLabel: label,
2303
+ accessibilityRole: "switch",
2304
+ accessibilityState: { checked: value, disabled },
2305
+ thumbColor: colors2.colorInteractive,
2306
+ trackColor: { false: colors2.colorBgSubtle, true: colors2.colorBlueSubtle }
2307
+ }
2308
+ ),
2309
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Label, { label })
2310
+ ] }),
2311
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Message, { type: "error", message: error }),
2312
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Message, { type: "hint", message: hint })
2313
+ ] });
2314
+ }
2315
+
2316
+ // src/components/interaction/form/Checkbox/Checkbox.native.tsx
2317
+ var import_react_native32 = require("react-native");
2318
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2319
+ var BOX = 22;
2320
+ var styles28 = import_react_native32.StyleSheet.create({
2321
+ container: {
2322
+ gap: import_native.spacing.xxs
2323
+ },
2324
+ row: {
2325
+ flexDirection: "row",
2326
+ alignItems: "center",
2327
+ gap: import_native.spacing.xs,
2328
+ minHeight: 44
2329
+ },
2330
+ box: {
2331
+ width: BOX,
2332
+ height: BOX,
2333
+ borderRadius: import_native.border.radius.xs,
2334
+ borderWidth: 2,
2335
+ alignItems: "center",
2336
+ justifyContent: "center"
2337
+ },
2338
+ checkmark: {
2339
+ fontSize: 14,
2340
+ fontWeight: "700",
2341
+ lineHeight: 16
2342
+ }
2343
+ });
2344
+ function Checkbox({
2345
+ label,
2346
+ name,
2347
+ checked = false,
2348
+ onChange,
2349
+ disabled = false,
2350
+ error,
2351
+ hint,
2352
+ style
2353
+ }) {
2354
+ const { colors: colors2 } = useTheme();
2355
+ const borderColor = error ? colors2.colorError : checked ? colors2.colorInteractive : colors2.colorOnBg;
2356
+ const bgColor = checked ? colors2.colorInteractive : "transparent";
2357
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_native32.View, { style: [styles28.container, style], children: [
2358
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2359
+ import_react_native32.Pressable,
2360
+ {
2361
+ onPress: () => !disabled && onChange?.(!checked),
2362
+ accessibilityRole: "checkbox",
2363
+ accessibilityLabel: typeof label === "string" ? label : name,
2364
+ accessibilityState: { checked, disabled },
2365
+ disabled,
2366
+ style: ({ pressed }) => [styles28.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
2367
+ children: [
2368
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_native32.View, { style: [styles28.box, { borderColor, backgroundColor: bgColor }], children: checked && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Label, { label: "\u2713", style: [styles28.checkmark, { color: colors2.colorOnInteractive }] }) }),
2369
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Label, { label })
2370
+ ]
2371
+ }
2372
+ ),
2373
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Message, { type: "error", message: error }),
2374
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Message, { type: "hint", message: hint })
2375
+ ] });
2376
+ }
2377
+
2378
+ // src/components/interaction/form/CheckboxGroup/CheckboxGroup.native.tsx
2379
+ var import_react_native33 = require("react-native");
2380
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2381
+ var styles29 = import_react_native33.StyleSheet.create({
2382
+ container: {
2383
+ gap: import_native.spacing.xs
2384
+ },
2385
+ legend: {
2386
+ fontFamily: import_native.font.family.body,
2387
+ fontSize: import_native.font.size.body,
2388
+ lineHeight: lineHeight.body,
2389
+ fontWeight: import_native.font.weight.semibold
2390
+ },
2391
+ required: {
2392
+ fontWeight: import_native.font.weight.body
2393
+ },
2394
+ items: {
2395
+ gap: import_native.spacing.xxs
2396
+ }
2397
+ });
2398
+ function CheckboxGroup({
2399
+ legend,
2400
+ children,
2401
+ error,
2402
+ hint,
2403
+ required,
2404
+ disabled = false,
2405
+ style
2406
+ }) {
2407
+ const { colors: colors2 } = useTheme();
2408
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2409
+ import_react_native33.View,
2410
+ {
2411
+ style: [styles29.container, disabled && { opacity: 0.4 }, style],
2412
+ accessibilityRole: "none",
2413
+ accessibilityLabel: legend,
2414
+ children: [
2415
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react_native33.Text, { style: [styles29.legend, { color: colors2.colorOnBg }], children: [
2416
+ legend,
2417
+ required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native33.Text, { style: [styles29.required, { color: colors2.colorOnBgSubtle }], children: " *" })
2418
+ ] }),
2419
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_native33.View, { style: styles29.items, children }),
2420
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Message, { type: "error", message: error }),
2421
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Message, { type: "hint", message: hint })
2422
+ ]
2423
+ }
2424
+ );
2425
+ }
2426
+
2427
+ // src/components/interaction/form/Radio/Radio.native.tsx
2428
+ var import_react_native34 = require("react-native");
2429
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2430
+ var DOT = 22;
2431
+ var INNER = 10;
2432
+ var styles30 = import_react_native34.StyleSheet.create({
2433
+ container: {
2434
+ gap: import_native.spacing.xxs
2435
+ },
2436
+ row: {
2437
+ flexDirection: "row",
2438
+ alignItems: "center",
2439
+ gap: import_native.spacing.xs,
2440
+ minHeight: 44
2441
+ },
2442
+ outer: {
2443
+ width: DOT,
2444
+ height: DOT,
2445
+ borderRadius: DOT / 2,
2446
+ borderWidth: 2,
2447
+ alignItems: "center",
2448
+ justifyContent: "center"
2449
+ },
2450
+ inner: {
2451
+ width: INNER,
2452
+ height: INNER,
2453
+ borderRadius: INNER / 2
2454
+ }
2455
+ });
2456
+ function Radio({
2457
+ label,
2458
+ name,
2459
+ checked = false,
2460
+ onChange,
2461
+ disabled = false,
2462
+ error,
2463
+ hint,
2464
+ style
2465
+ }) {
2466
+ const { colors: colors2 } = useTheme();
2467
+ const borderColor = error ? colors2.colorError : checked ? colors2.colorInteractive : colors2.colorOnBg;
2468
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native34.View, { style: [styles30.container, style], children: [
2469
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2470
+ import_react_native34.Pressable,
2471
+ {
2472
+ onPress: () => !disabled && onChange?.(),
2473
+ accessibilityRole: "radio",
2474
+ accessibilityLabel: typeof label === "string" ? label : name,
2475
+ accessibilityState: { checked, disabled },
2476
+ disabled,
2477
+ style: ({ pressed }) => [styles30.row, pressed && { opacity: 0.7 }, disabled && { opacity: 0.4 }],
2478
+ children: [
2479
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native34.View, { style: [styles30.outer, { borderColor }], children: checked && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_native34.View, { style: [styles30.inner, { backgroundColor: colors2.colorInteractive }] }) }),
2480
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Label, { label })
2481
+ ]
2482
+ }
2483
+ ),
2484
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { type: "error", message: error }),
2485
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { type: "hint", message: hint })
2486
+ ] });
2487
+ }
2488
+
2489
+ // src/components/interaction/form/RadioGroup/RadioGroup.native.tsx
2490
+ var import_react_native35 = require("react-native");
2491
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2492
+ var styles31 = import_react_native35.StyleSheet.create({
2493
+ container: {
2494
+ gap: import_native.spacing.xs
2495
+ },
2496
+ legend: {
2497
+ fontFamily: import_native.font.family.body,
2498
+ fontSize: import_native.font.size.body,
2499
+ lineHeight: lineHeight.body,
2500
+ fontWeight: import_native.font.weight.semibold
2501
+ },
2502
+ required: {
2503
+ fontWeight: import_native.font.weight.body
2504
+ },
2505
+ items: {
2506
+ gap: import_native.spacing.xxs
2507
+ }
2508
+ });
2509
+ function RadioGroup({
2510
+ legend,
2511
+ children,
2512
+ error,
2513
+ hint,
2514
+ required,
2515
+ disabled = false,
2516
+ style
2517
+ }) {
2518
+ const { colors: colors2 } = useTheme();
2519
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2520
+ import_react_native35.View,
2521
+ {
2522
+ style: [styles31.container, disabled && { opacity: 0.4 }, style],
2523
+ accessibilityRole: "radiogroup",
2524
+ accessibilityLabel: legend,
2525
+ children: [
2526
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react_native35.Text, { style: [styles31.legend, { color: colors2.colorOnBg }], children: [
2527
+ legend,
2528
+ required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native35.Text, { style: [styles31.required, { color: colors2.colorOnBgSubtle }], children: " *" })
2529
+ ] }),
2530
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native35.View, { style: styles31.items, children }),
2531
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { type: "error", message: error }),
2532
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { type: "hint", message: hint })
2533
+ ]
2534
+ }
2535
+ );
2536
+ }
2537
+
2538
+ // src/components/interaction/form/FileInput/FileInput.native.tsx
2539
+ var import_react_native36 = require("react-native");
2540
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2541
+ var styles32 = import_react_native36.StyleSheet.create({
2542
+ container: {
2543
+ gap: import_native.spacing.xxs
2544
+ },
2545
+ dropZone: {
2546
+ alignItems: "center",
2547
+ justifyContent: "center",
2548
+ gap: import_native.spacing.xs,
2549
+ paddingVertical: import_native.spacing.xl,
2550
+ paddingHorizontal: import_native.spacing.m,
2551
+ borderWidth: 2,
2552
+ borderStyle: "dashed",
2553
+ borderRadius: import_native.border.radius.s,
2554
+ minHeight: 120
2555
+ },
2556
+ icon: {
2557
+ fontSize: 28,
2558
+ lineHeight: 32
2559
+ },
2560
+ prompt: {
2561
+ fontFamily: import_native.font.family.body,
2562
+ fontSize: import_native.font.size.body,
2563
+ lineHeight: lineHeight.body,
2564
+ textAlign: "center"
2565
+ },
2566
+ acceptHint: {
2567
+ fontFamily: import_native.font.family.body,
2568
+ fontSize: import_native.font.size.bodyS,
2569
+ lineHeight: lineHeight.bodyS,
2570
+ textAlign: "center"
2571
+ },
2572
+ fileList: {
2573
+ gap: import_native.spacing.xxs,
2574
+ alignItems: "center"
2575
+ },
2576
+ fileName: {
2577
+ fontFamily: import_native.font.family.body,
2578
+ fontSize: import_native.font.size.bodyS,
2579
+ lineHeight: lineHeight.bodyS
2580
+ }
2581
+ });
2582
+ function FileInput({
2583
+ label,
2584
+ name,
2585
+ accept,
2586
+ disabled = false,
2587
+ required,
2588
+ error,
2589
+ hint,
2590
+ onSelect,
2591
+ fileNames = [],
2592
+ style
2593
+ }) {
2594
+ const { colors: colors2 } = useTheme();
2595
+ const borderColor = error ? colors2.colorError : colors2.colorBgSubtle;
2596
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native36.View, { style: [styles32.container, style], testID: name, children: [
2597
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2598
+ Label,
2599
+ {
2600
+ label: required ? `${label} *` : label
2601
+ }
2602
+ ),
2603
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2604
+ import_react_native36.Pressable,
2605
+ {
2606
+ onPress: () => !disabled && onSelect?.(),
2607
+ disabled,
2608
+ accessibilityRole: "button",
2609
+ accessibilityLabel: `${label}, tap to select file`,
2610
+ accessibilityState: { disabled },
2611
+ style: ({ pressed }) => [
2612
+ styles32.dropZone,
2613
+ {
2614
+ borderColor,
2615
+ backgroundColor: "transparent"
2616
+ },
2617
+ pressed && { opacity: 0.7 },
2618
+ disabled && { opacity: 0.4 }
2619
+ ],
2620
+ children: [
2621
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native36.Text, { style: [styles32.icon, { color: colors2.colorInteractive }], children: "\u2191" }),
2622
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native36.Text, { style: [styles32.prompt, { color: colors2.colorOnBgSubtle }], children: fileNames.length > 0 ? "Selected files:" : "Tap to select file" }),
2623
+ fileNames.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native36.View, { style: styles32.fileList, children: fileNames.map((fileName) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native36.Text, { style: [styles32.fileName, { color: colors2.colorOnBg }], children: fileName }, fileName)) }),
2624
+ accept && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native36.Text, { style: [styles32.acceptHint, { color: colors2.colorOnBgSubtle }], children: accept })
2625
+ ]
2626
+ }
2627
+ ),
2628
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { type: "error", message: error }),
2629
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { type: "hint", message: hint })
2630
+ ] });
2631
+ }
2632
+
2633
+ // src/components/interaction/form/Combobox/Combobox.native.tsx
2634
+ var import_react9 = require("react");
2635
+ var import_react_native37 = require("react-native");
2636
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2637
+ var MAX_DROPDOWN_HEIGHT = 200;
2638
+ var styles33 = import_react_native37.StyleSheet.create({
2639
+ container: {
2640
+ gap: import_native.spacing.xxs
2641
+ },
2642
+ inputWrapper: {
2643
+ position: "relative"
2644
+ },
2645
+ input: {
2646
+ fontFamily: import_native.font.family.body,
2647
+ fontSize: import_native.font.size.body,
2648
+ lineHeight: lineHeight.body,
2649
+ paddingVertical: import_native.spacing.xs,
2650
+ paddingHorizontal: import_native.spacing.s,
2651
+ borderWidth: 1,
2652
+ borderRadius: import_native.border.radius.full,
2653
+ minHeight: 44
2654
+ },
2655
+ dropdown: {
2656
+ position: "absolute",
2657
+ top: "100%",
2658
+ start: 0,
2659
+ end: 0,
2660
+ maxHeight: MAX_DROPDOWN_HEIGHT,
2661
+ borderWidth: 1,
2662
+ borderTopWidth: 0,
2663
+ borderBottomStartRadius: import_native.border.radius.xs,
2664
+ borderBottomEndRadius: import_native.border.radius.xs,
2665
+ zIndex: 10
2666
+ },
2667
+ option: {
2668
+ paddingVertical: import_native.spacing.xs,
2669
+ paddingHorizontal: import_native.spacing.s,
2670
+ minHeight: 44,
2671
+ justifyContent: "center"
2672
+ },
2673
+ optionText: {
2674
+ fontFamily: import_native.font.family.body,
2675
+ fontSize: import_native.font.size.body,
2676
+ lineHeight: lineHeight.body
2677
+ }
2678
+ });
2679
+ function Combobox({
2680
+ label,
2681
+ name,
2682
+ options,
2683
+ placeholder,
2684
+ value,
2685
+ onChange,
2686
+ disabled = false,
2687
+ error,
2688
+ hint,
2689
+ style
2690
+ }) {
2691
+ const { colors: colors2 } = useTheme();
2692
+ const selectedOption = (0, import_react9.useMemo)(
2693
+ () => options.find((o) => o.value === value),
2694
+ [options, value]
2695
+ );
2696
+ const [inputValue, setInputValue] = (0, import_react9.useState)(selectedOption?.label ?? "");
2697
+ const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
2698
+ const filtered = (0, import_react9.useMemo)(
2699
+ () => options.filter(
2700
+ (o) => o.label.toLowerCase().includes(inputValue.toLowerCase())
2701
+ ),
2702
+ [options, inputValue]
2703
+ );
2704
+ const selectOption = (option) => {
2705
+ setInputValue(option.label);
2706
+ setIsOpen(false);
2707
+ onChange?.(option.value);
2708
+ };
2709
+ const handleChangeText = (text) => {
2710
+ setInputValue(text);
2711
+ setIsOpen(true);
2712
+ };
2713
+ const handleFocus = () => {
2714
+ setIsOpen(true);
2715
+ };
2716
+ const handleBlur = () => {
2717
+ setTimeout(() => setIsOpen(false), 150);
2718
+ };
2719
+ const borderColor = error ? colors2.colorError : colors2.colorOnBg;
2720
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native37.View, { style: [styles33.container, style], children: [
2721
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label, { label }),
2722
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native37.View, { style: styles33.inputWrapper, children: [
2723
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2724
+ import_react_native37.TextInput,
2725
+ {
2726
+ value: inputValue,
2727
+ onChangeText: handleChangeText,
2728
+ onFocus: handleFocus,
2729
+ onBlur: handleBlur,
2730
+ placeholder,
2731
+ placeholderTextColor: colors2.colorOnBgSubtle,
2732
+ editable: !disabled,
2733
+ accessibilityRole: "combobox",
2734
+ accessibilityLabel: typeof label === "string" ? label : name,
2735
+ accessibilityState: { disabled, expanded: isOpen },
2736
+ style: [
2737
+ styles33.input,
2738
+ {
2739
+ borderColor,
2740
+ color: colors2.colorOnBg,
2741
+ backgroundColor: colors2.colorBg
2742
+ },
2743
+ disabled && { opacity: 0.4 }
2744
+ ]
2745
+ }
2746
+ ),
2747
+ isOpen && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2748
+ import_react_native37.ScrollView,
2749
+ {
2750
+ style: [
2751
+ styles33.dropdown,
2752
+ {
2753
+ borderColor: colors2.colorBgSubtle,
2754
+ backgroundColor: colors2.colorBg
2755
+ }
2756
+ ],
2757
+ keyboardShouldPersistTaps: "handled",
2758
+ nestedScrollEnabled: true,
2759
+ children: filtered.map((option) => {
2760
+ const isSelected = option.value === value;
2761
+ const isDisabled = option.disabled;
2762
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2763
+ import_react_native37.Pressable,
2764
+ {
2765
+ onPress: () => !isDisabled && selectOption(option),
2766
+ disabled: isDisabled,
2767
+ accessibilityRole: "menuitem",
2768
+ accessibilityLabel: option.label,
2769
+ accessibilityState: { selected: isSelected, disabled: isDisabled },
2770
+ style: ({ pressed }) => [
2771
+ styles33.option,
2772
+ isSelected && { backgroundColor: colors2.colorBlueSubtle },
2773
+ pressed && !isDisabled && { backgroundColor: colors2.colorBgSubtle },
2774
+ isDisabled && { opacity: 0.4 }
2775
+ ],
2776
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2777
+ import_react_native37.Text,
2778
+ {
2779
+ style: [
2780
+ styles33.optionText,
2781
+ {
2782
+ color: isSelected ? colors2.colorInteractive : colors2.colorOnBg
2783
+ },
2784
+ isSelected && { fontWeight: import_native.font.weight.semibold }
2785
+ ],
2786
+ children: option.label
2787
+ }
2788
+ )
2789
+ },
2790
+ option.value
2791
+ );
2792
+ })
2793
+ }
2794
+ )
2795
+ ] }),
2796
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { type: "error", message: error }),
2797
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { type: "hint", message: hint })
2798
+ ] });
2799
+ }
2800
+
2801
+ // src/components/interaction/form/SegmentedControl/SegmentedControl.native.tsx
2802
+ var import_react10 = require("react");
2803
+ var import_react_native38 = require("react-native");
2804
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2805
+ var sizeTokens2 = {
2806
+ small: { height: 32, fontSize: import_native.font.size.bodyS, px: import_native.spacing.s },
2807
+ medium: { height: 40, fontSize: import_native.font.size.body, px: import_native.spacing.m },
2808
+ large: { height: 48, fontSize: import_native.font.size.body, px: import_native.spacing.l }
2809
+ };
2810
+ var styles34 = import_react_native38.StyleSheet.create({
2811
+ track: {
2812
+ flexDirection: "row",
2813
+ borderRadius: import_native.border.radius.full,
2814
+ overflow: "hidden"
2815
+ },
2816
+ item: {
2817
+ flex: 1,
2818
+ alignItems: "center",
2819
+ justifyContent: "center",
2820
+ minHeight: 44
2821
+ },
2822
+ label: {
2823
+ fontFamily: import_native.font.family.body,
2824
+ fontWeight: import_native.font.weight.semibold,
2825
+ textAlign: "center"
2826
+ }
2827
+ });
2828
+ function SegmentedControl({
2829
+ selectedIndex = 0,
2830
+ disabled = false,
2831
+ size = "medium",
2832
+ variant = "outline",
2833
+ children,
2834
+ accessibilityLabel,
2835
+ onValueChange,
2836
+ style
2837
+ }) {
2838
+ const { colors: colors2 } = useTheme();
2839
+ const { height, fontSize, px } = sizeTokens2[size];
2840
+ const items = import_react10.Children.toArray(children);
2841
+ const trackStyle = variant === "filled" ? { backgroundColor: colors2.colorBgSubtle } : { backgroundColor: "transparent", borderWidth: 1, borderColor: colors2.colorBgSubtle };
2842
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2843
+ import_react_native38.View,
2844
+ {
2845
+ style: [styles34.track, trackStyle, { borderRadius: import_native.border.radius.full }, style],
2846
+ accessibilityRole: "tablist",
2847
+ accessibilityLabel,
2848
+ children: items.map((child, index) => {
2849
+ const isActive = index === selectedIndex;
2850
+ const activeStyle = variant === "filled" ? { backgroundColor: colors2.colorInteractive } : { borderWidth: 2, borderColor: colors2.colorInteractive };
2851
+ const inactiveStyle = variant === "filled" ? {} : {};
2852
+ const textColor = variant === "filled" && isActive ? colors2.colorOnInteractive : isActive ? colors2.colorInteractive : colors2.colorOnBgSubtle;
2853
+ const label = typeof child === "string" || typeof child === "number" ? String(child) : null;
2854
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2855
+ import_react_native38.Pressable,
2856
+ {
2857
+ onPress: () => !disabled && onValueChange?.(index),
2858
+ disabled,
2859
+ accessibilityRole: "tab",
2860
+ accessibilityLabel: label ?? void 0,
2861
+ accessibilityState: { selected: isActive, disabled },
2862
+ style: ({ pressed }) => [
2863
+ styles34.item,
2864
+ { height, paddingHorizontal: px },
2865
+ isActive ? activeStyle : inactiveStyle,
2866
+ variant === "filled" && isActive && { borderRadius: import_native.border.radius.full },
2867
+ pressed && !disabled && { opacity: 0.7 },
2868
+ disabled && { opacity: 0.4 }
2869
+ ],
2870
+ children: label !== null ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native38.Text, { style: [styles34.label, { fontSize, color: textColor }], children: label }) : child
2871
+ },
2872
+ index
2873
+ );
2874
+ })
2875
+ }
2876
+ );
2877
+ }
2878
+
2879
+ // src/components/interaction/form/FormInput/FormInput.native.tsx
2880
+ var import_react11 = require("react");
2881
+ var import_react_native39 = require("react-native");
2882
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2883
+ var keyboardTypeMap = {
2884
+ text: "default",
2885
+ email: "email-address",
2886
+ password: "default",
2887
+ tel: "phone-pad",
2888
+ url: "url",
2889
+ number: "numeric",
2890
+ search: "default"
2891
+ };
2892
+ var styles35 = import_react_native39.StyleSheet.create({
2893
+ container: {
2894
+ gap: import_native.spacing.xxs
2895
+ },
2896
+ input: {
2897
+ fontFamily: import_native.font.family.body,
2898
+ fontSize: import_native.font.size.body,
2899
+ lineHeight: lineHeight.body,
2900
+ paddingHorizontal: import_native.spacing.s,
2901
+ paddingVertical: import_native.spacing.xs,
2902
+ borderWidth: 1,
2903
+ borderRadius: import_native.border.radius.full,
2904
+ minHeight: 44
2905
+ }
2906
+ });
2907
+ function FormInput({
2908
+ label,
2909
+ name,
2910
+ type = "text",
2911
+ value,
2912
+ defaultValue,
2913
+ placeholder,
2914
+ error,
2915
+ hint,
2916
+ disabled = false,
2917
+ onChange,
2918
+ onBlur,
2919
+ onFocus,
2920
+ style
2921
+ }) {
2922
+ const { colors: colors2 } = useTheme();
2923
+ const [focused, setFocused] = (0, import_react11.useState)(false);
2924
+ const borderColor = error ? colors2.colorError : focused ? colors2.colorInteractive : colors2.colorOnBg;
2925
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native39.View, { style: [styles35.container, style], children: [
2926
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label, { label }),
2927
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2928
+ import_react_native39.TextInput,
2929
+ {
2930
+ accessibilityLabel: typeof label === "string" ? label : name,
2931
+ accessibilityState: { disabled },
2932
+ accessibilityHint: hint,
2933
+ value,
2934
+ defaultValue,
2935
+ placeholder,
2936
+ placeholderTextColor: colors2.colorOnBgSubtle,
2937
+ keyboardType: keyboardTypeMap[type],
2938
+ secureTextEntry: type === "password",
2939
+ autoCapitalize: type === "email" || type === "url" ? "none" : "sentences",
2940
+ autoComplete: type === "email" ? "email" : type === "tel" ? "tel" : void 0,
2941
+ editable: !disabled,
2942
+ onChangeText: onChange,
2943
+ onFocus: () => {
2944
+ setFocused(true);
2945
+ onFocus?.();
2946
+ },
2947
+ onBlur: () => {
2948
+ setFocused(false);
2949
+ onBlur?.();
2950
+ },
2951
+ style: [
2952
+ styles35.input,
2953
+ {
2954
+ borderColor,
2955
+ color: colors2.colorOnBg,
2956
+ backgroundColor: colors2.colorBg
2957
+ },
2958
+ disabled && { opacity: 0.4 }
2959
+ ]
2960
+ }
2961
+ ),
2962
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { type: "error", message: error }),
2963
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { type: "hint", message: hint })
2964
+ ] });
2965
+ }
2966
+
2967
+ // src/components/interaction/form/Textarea/Textarea.native.tsx
2968
+ var import_react12 = require("react");
2969
+ var import_react_native40 = require("react-native");
2970
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2971
+ var styles36 = import_react_native40.StyleSheet.create({
2972
+ container: {
2973
+ gap: import_native.spacing.xxs
2974
+ },
2975
+ textarea: {
2976
+ fontFamily: import_native.font.family.body,
2977
+ fontSize: import_native.font.size.body,
2978
+ lineHeight: lineHeight.body,
2979
+ paddingHorizontal: import_native.spacing.s,
2980
+ paddingVertical: import_native.spacing.xs,
2981
+ borderWidth: 1,
2982
+ borderRadius: import_native.border.radius.xs,
2983
+ minHeight: 100,
2984
+ textAlignVertical: "top"
2985
+ }
2986
+ });
2987
+ function Textarea({
2988
+ label,
2989
+ name,
2990
+ value,
2991
+ defaultValue,
2992
+ placeholder,
2993
+ error,
2994
+ hint,
2995
+ disabled = false,
2996
+ numberOfLines = 4,
2997
+ onChange,
2998
+ onBlur,
2999
+ onFocus,
3000
+ style
3001
+ }) {
3002
+ const { colors: colors2 } = useTheme();
3003
+ const [focused, setFocused] = (0, import_react12.useState)(false);
3004
+ const borderColor = error ? colors2.colorError : focused ? colors2.colorInteractive : colors2.colorOnBg;
3005
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native40.View, { style: [styles36.container, style], children: [
3006
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Label, { label }),
3007
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3008
+ import_react_native40.TextInput,
3009
+ {
3010
+ accessibilityLabel: typeof label === "string" ? label : name,
3011
+ accessibilityState: { disabled },
3012
+ accessibilityHint: hint,
3013
+ multiline: true,
3014
+ numberOfLines,
3015
+ value,
3016
+ defaultValue,
3017
+ placeholder,
3018
+ placeholderTextColor: colors2.colorOnBgSubtle,
3019
+ editable: !disabled,
3020
+ onChangeText: onChange,
3021
+ onFocus: () => {
3022
+ setFocused(true);
3023
+ onFocus?.();
3024
+ },
3025
+ onBlur: () => {
3026
+ setFocused(false);
3027
+ onBlur?.();
3028
+ },
3029
+ style: [
3030
+ styles36.textarea,
3031
+ {
3032
+ borderColor,
3033
+ color: colors2.colorOnBg,
3034
+ backgroundColor: colors2.colorBg
3035
+ },
3036
+ disabled && { opacity: 0.4 }
3037
+ ]
3038
+ }
3039
+ ),
3040
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { type: "error", message: error }),
3041
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { type: "hint", message: hint })
3042
+ ] });
3043
+ }
3044
+
3045
+ // src/components/interaction/form/Select/Select.native.tsx
3046
+ var import_react13 = require("react");
3047
+ var import_react_native41 = require("react-native");
3048
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3049
+ var styles37 = import_react_native41.StyleSheet.create({
3050
+ container: {
3051
+ gap: import_native.spacing.xxs
3052
+ },
3053
+ trigger: {
3054
+ flexDirection: "row",
3055
+ alignItems: "center",
3056
+ justifyContent: "space-between",
3057
+ paddingHorizontal: import_native.spacing.s,
3058
+ paddingVertical: import_native.spacing.xs,
3059
+ borderWidth: 1,
3060
+ borderRadius: import_native.border.radius.full,
3061
+ minHeight: 44
3062
+ },
3063
+ triggerText: {
3064
+ fontFamily: import_native.font.family.body,
3065
+ fontSize: import_native.font.size.body,
3066
+ lineHeight: lineHeight.body,
3067
+ flex: 1
3068
+ },
3069
+ chevron: {
3070
+ fontFamily: import_native.font.family.body,
3071
+ fontSize: import_native.font.size.body,
3072
+ marginStart: import_native.spacing.xs
3073
+ },
3074
+ overlay: {
3075
+ flex: 1,
3076
+ justifyContent: "flex-end",
3077
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
3078
+ },
3079
+ sheet: {
3080
+ maxHeight: "60%",
3081
+ borderTopStartRadius: import_native.border.radius.m,
3082
+ borderTopEndRadius: import_native.border.radius.m,
3083
+ paddingTop: import_native.spacing.m,
3084
+ paddingBottom: import_native.spacing.xxxl
3085
+ },
3086
+ sheetHeader: {
3087
+ flexDirection: "row",
3088
+ justifyContent: "space-between",
3089
+ alignItems: "center",
3090
+ paddingHorizontal: import_native.spacing.m,
3091
+ paddingBottom: import_native.spacing.s
3092
+ },
3093
+ sheetTitle: {
3094
+ fontFamily: import_native.font.family.body,
3095
+ fontSize: import_native.font.size.heading3,
3096
+ fontWeight: import_native.font.weight.semibold
3097
+ },
3098
+ closeText: {
3099
+ fontFamily: import_native.font.family.body,
3100
+ fontSize: import_native.font.size.body,
3101
+ fontWeight: import_native.font.weight.semibold
3102
+ },
3103
+ optionItem: {
3104
+ paddingHorizontal: import_native.spacing.m,
3105
+ paddingVertical: import_native.spacing.s,
3106
+ minHeight: 44,
3107
+ justifyContent: "center"
3108
+ },
3109
+ optionText: {
3110
+ fontFamily: import_native.font.family.body,
3111
+ fontSize: import_native.font.size.body,
3112
+ lineHeight: lineHeight.body
3113
+ }
3114
+ });
3115
+ function Select({
3116
+ label,
3117
+ name,
3118
+ options,
3119
+ placeholder = "Select an option",
3120
+ value,
3121
+ error,
3122
+ hint,
3123
+ disabled = false,
3124
+ onChange,
3125
+ style
3126
+ }) {
3127
+ const { colors: colors2 } = useTheme();
3128
+ const [open, setOpen] = (0, import_react13.useState)(false);
3129
+ const selectedOption = options.find((o) => o.value === value);
3130
+ const displayText = selectedOption?.label ?? placeholder;
3131
+ const isPlaceholder = !selectedOption;
3132
+ const borderColor = error ? colors2.colorError : open ? colors2.colorInteractive : colors2.colorOnBg;
3133
+ const handleSelect = (optionValue) => {
3134
+ onChange?.(optionValue);
3135
+ setOpen(false);
3136
+ };
3137
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native41.View, { style: [styles37.container, style], children: [
3138
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Label, { label }),
3139
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3140
+ import_react_native41.Pressable,
3141
+ {
3142
+ accessibilityRole: "button",
3143
+ accessibilityLabel: typeof label === "string" ? `${label}, ${displayText}` : name,
3144
+ accessibilityState: { disabled, expanded: open },
3145
+ accessibilityHint: "Double tap to open options",
3146
+ disabled,
3147
+ onPress: () => setOpen(true),
3148
+ style: [
3149
+ styles37.trigger,
3150
+ {
3151
+ borderColor,
3152
+ backgroundColor: colors2.colorBg
3153
+ },
3154
+ disabled && { opacity: 0.4 }
3155
+ ],
3156
+ children: [
3157
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3158
+ import_react_native41.Text,
3159
+ {
3160
+ style: [
3161
+ styles37.triggerText,
3162
+ {
3163
+ color: isPlaceholder ? colors2.colorOnBgSubtle : colors2.colorOnBg
3164
+ }
3165
+ ],
3166
+ children: displayText
3167
+ }
3168
+ ),
3169
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native41.Text, { style: [styles37.chevron, { color: colors2.colorOnBgSubtle }], "aria-hidden": true, children: "\u25BE" })
3170
+ ]
3171
+ }
3172
+ ),
3173
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3174
+ import_react_native41.Modal,
3175
+ {
3176
+ visible: open,
3177
+ transparent: true,
3178
+ animationType: "slide",
3179
+ onRequestClose: () => setOpen(false),
3180
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3181
+ import_react_native41.Pressable,
3182
+ {
3183
+ style: styles37.overlay,
3184
+ onPress: () => setOpen(false),
3185
+ accessibilityRole: "button",
3186
+ accessibilityLabel: "Close options",
3187
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3188
+ import_react_native41.Pressable,
3189
+ {
3190
+ style: [styles37.sheet, { backgroundColor: colors2.colorBg }],
3191
+ onPress: () => {
3192
+ },
3193
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native41.SafeAreaView, { children: [
3194
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native41.View, { style: styles37.sheetHeader, children: [
3195
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native41.Text, { style: [styles37.sheetTitle, { color: colors2.colorOnBg }], children: typeof label === "string" ? label : "Select" }),
3196
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3197
+ import_react_native41.Pressable,
3198
+ {
3199
+ accessibilityRole: "button",
3200
+ accessibilityLabel: "Close",
3201
+ onPress: () => setOpen(false),
3202
+ hitSlop: 8,
3203
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native41.Text, { style: [styles37.closeText, { color: colors2.colorInteractive }], children: "Done" })
3204
+ }
3205
+ )
3206
+ ] }),
3207
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3208
+ import_react_native41.FlatList,
3209
+ {
3210
+ data: options,
3211
+ keyExtractor: (item) => item.value,
3212
+ renderItem: ({ item }) => {
3213
+ const isSelected = item.value === value;
3214
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3215
+ import_react_native41.Pressable,
3216
+ {
3217
+ accessibilityRole: "button",
3218
+ accessibilityLabel: item.label,
3219
+ accessibilityState: {
3220
+ selected: isSelected,
3221
+ disabled: item.disabled
3222
+ },
3223
+ disabled: item.disabled,
3224
+ onPress: () => handleSelect(item.value),
3225
+ style: ({ pressed }) => [
3226
+ styles37.optionItem,
3227
+ isSelected && { backgroundColor: colors2.colorBgSubtle },
3228
+ pressed && { opacity: 0.7 },
3229
+ item.disabled && { opacity: 0.4 }
3230
+ ],
3231
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3232
+ import_react_native41.Text,
3233
+ {
3234
+ style: [
3235
+ styles37.optionText,
3236
+ {
3237
+ color: isSelected ? colors2.colorInteractive : colors2.colorOnBg,
3238
+ fontWeight: isSelected ? import_native.font.weight.semibold : import_native.font.weight.body
3239
+ }
3240
+ ],
3241
+ children: item.label
3242
+ }
3243
+ )
3244
+ }
3245
+ );
3246
+ }
3247
+ }
3248
+ )
3249
+ ] })
3250
+ }
3251
+ )
3252
+ }
3253
+ )
3254
+ }
3255
+ ),
3256
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { type: "error", message: error }),
3257
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { type: "hint", message: hint })
3258
+ ] });
3259
+ }
3260
+
3261
+ // src/components/interaction/form/Slider/Slider.native.tsx
3262
+ var import_react14 = require("react");
3263
+ var import_react_native42 = require("react-native");
3264
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3265
+ var TRACK_HEIGHT = 6;
3266
+ var THUMB_SIZE = 24;
3267
+ var styles38 = import_react_native42.StyleSheet.create({
3268
+ container: {
3269
+ gap: import_native.spacing.xxs
3270
+ },
3271
+ labelRow: {
3272
+ flexDirection: "row",
3273
+ justifyContent: "space-between",
3274
+ alignItems: "center"
3275
+ },
3276
+ valueText: {
3277
+ fontFamily: import_native.font.family.body,
3278
+ fontSize: import_native.font.size.bodyS,
3279
+ lineHeight: lineHeight.bodyS,
3280
+ fontWeight: import_native.font.weight.semibold
3281
+ },
3282
+ trackContainer: {
3283
+ height: THUMB_SIZE + import_native.spacing.xs * 2,
3284
+ justifyContent: "center",
3285
+ paddingHorizontal: THUMB_SIZE / 2
3286
+ },
3287
+ track: {
3288
+ height: TRACK_HEIGHT,
3289
+ borderRadius: TRACK_HEIGHT / 2,
3290
+ overflow: "hidden"
3291
+ },
3292
+ fill: {
3293
+ height: TRACK_HEIGHT,
3294
+ borderRadius: TRACK_HEIGHT / 2
3295
+ },
3296
+ thumb: {
3297
+ position: "absolute",
3298
+ width: THUMB_SIZE,
3299
+ height: THUMB_SIZE,
3300
+ borderRadius: THUMB_SIZE / 2,
3301
+ top: "50%",
3302
+ marginTop: -(THUMB_SIZE / 2),
3303
+ borderWidth: 2
3304
+ }
3305
+ });
3306
+ function clampValue(v, min, max) {
3307
+ return Math.min(max, Math.max(min, v));
3308
+ }
3309
+ function snapToStep(v, min, step) {
3310
+ return Math.round((v - min) / step) * step + min;
3311
+ }
3312
+ function Slider({
3313
+ label,
3314
+ name: _name,
3315
+ // eslint-disable-line @typescript-eslint/no-unused-vars
3316
+ value,
3317
+ defaultValue,
3318
+ min = 0,
3319
+ max = 100,
3320
+ step = 1,
3321
+ showValue = false,
3322
+ disabled = false,
3323
+ error,
3324
+ hint,
3325
+ onChange,
3326
+ style
3327
+ }) {
3328
+ const { colors: colors2 } = useTheme();
3329
+ const isControlled = value !== void 0;
3330
+ const [internalValue, setInternalValue] = (0, import_react14.useState)(defaultValue ?? min);
3331
+ const [trackWidth, setTrackWidth] = (0, import_react14.useState)(0);
3332
+ const currentValue = isControlled ? value : internalValue;
3333
+ const fillPct = max > min ? (currentValue - min) / (max - min) * 100 : 0;
3334
+ const updateValue = (v) => {
3335
+ const clamped = clampValue(v, min, max);
3336
+ const snapped = snapToStep(clamped, min, step);
3337
+ if (!isControlled) setInternalValue(snapped);
3338
+ onChange?.(snapped);
3339
+ };
3340
+ const handleTrackLayout = (e) => {
3341
+ setTrackWidth(e.nativeEvent.layout.width);
3342
+ };
3343
+ const valueFromTouch = (pageX, layoutX) => {
3344
+ const x = pageX - layoutX;
3345
+ const pct = clampValue(x / trackWidth, 0, 1);
3346
+ return pct * (max - min) + min;
3347
+ };
3348
+ const handleStartShouldSetResponder = () => !disabled;
3349
+ const handleResponderGrant = (e) => {
3350
+ const target = e.currentTarget;
3351
+ target.measure((_x, _y, _w, _h, pageX) => {
3352
+ updateValue(valueFromTouch(e.nativeEvent.pageX, pageX));
3353
+ });
3354
+ };
3355
+ const handleResponderMove = (e) => {
3356
+ const target = e.currentTarget;
3357
+ target.measure((_x, _y, _w, _h, pageX) => {
3358
+ updateValue(valueFromTouch(e.nativeEvent.pageX, pageX));
3359
+ });
3360
+ };
3361
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3362
+ import_react_native42.View,
3363
+ {
3364
+ style: [styles38.container, style],
3365
+ accessibilityRole: "adjustable",
3366
+ accessibilityLabel: label,
3367
+ accessibilityValue: { min, max, now: currentValue, text: String(currentValue) },
3368
+ accessibilityState: { disabled },
3369
+ children: [
3370
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native42.View, { style: styles38.labelRow, children: [
3371
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Label, { label }),
3372
+ showValue && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native42.Text, { style: [styles38.valueText, { color: colors2.colorOnBg }], children: currentValue })
3373
+ ] }),
3374
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3375
+ import_react_native42.View,
3376
+ {
3377
+ style: [styles38.trackContainer, disabled && { opacity: 0.4 }],
3378
+ onLayout: handleTrackLayout,
3379
+ onStartShouldSetResponder: handleStartShouldSetResponder,
3380
+ onMoveShouldSetResponder: handleStartShouldSetResponder,
3381
+ onResponderGrant: handleResponderGrant,
3382
+ onResponderMove: handleResponderMove,
3383
+ children: [
3384
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native42.View, { style: [styles38.track, { backgroundColor: colors2.colorBgSubtle }], children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3385
+ import_react_native42.View,
3386
+ {
3387
+ style: [
3388
+ styles38.fill,
3389
+ {
3390
+ width: `${fillPct}%`,
3391
+ backgroundColor: error ? colors2.colorError : colors2.colorInteractive
3392
+ }
3393
+ ]
3394
+ }
3395
+ ) }),
3396
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3397
+ import_react_native42.View,
3398
+ {
3399
+ style: [
3400
+ styles38.thumb,
3401
+ {
3402
+ start: `${fillPct}%`,
3403
+ marginStart: -(THUMB_SIZE / 2),
3404
+ backgroundColor: colors2.colorBg,
3405
+ borderColor: error ? colors2.colorError : colors2.colorInteractive
3406
+ }
3407
+ ]
3408
+ }
3409
+ )
3410
+ ]
3411
+ }
3412
+ ),
3413
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { type: "error", message: error }),
3414
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { type: "hint", message: hint })
3415
+ ]
3416
+ }
3417
+ );
3418
+ }
3419
+
3420
+ // src/components/interaction/form/NumberInput/NumberInput.native.tsx
3421
+ var import_react15 = require("react");
3422
+ var import_react_native43 = require("react-native");
3423
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3424
+ var STEPPER_SIZE = 44;
3425
+ var styles39 = import_react_native43.StyleSheet.create({
3426
+ container: {
3427
+ gap: import_native.spacing.xxs
3428
+ },
3429
+ inputRow: {
3430
+ flexDirection: "row",
3431
+ alignItems: "center"
3432
+ },
3433
+ stepper: {
3434
+ width: STEPPER_SIZE,
3435
+ height: STEPPER_SIZE,
3436
+ alignItems: "center",
3437
+ justifyContent: "center",
3438
+ borderWidth: 1
3439
+ },
3440
+ stepperStart: {
3441
+ borderTopStartRadius: import_native.border.radius.full,
3442
+ borderBottomStartRadius: import_native.border.radius.full,
3443
+ borderEndWidth: 0
3444
+ },
3445
+ stepperEnd: {
3446
+ borderTopEndRadius: import_native.border.radius.full,
3447
+ borderBottomEndRadius: import_native.border.radius.full,
3448
+ borderStartWidth: 0
3449
+ },
3450
+ stepperText: {
3451
+ fontSize: 20,
3452
+ fontWeight: import_native.font.weight.semibold,
3453
+ lineHeight: 24
3454
+ },
3455
+ input: {
3456
+ flex: 1,
3457
+ fontFamily: import_native.font.family.body,
3458
+ fontSize: import_native.font.size.body,
3459
+ lineHeight: lineHeight.body,
3460
+ textAlign: "center",
3461
+ paddingHorizontal: import_native.spacing.xs,
3462
+ paddingVertical: import_native.spacing.xs,
3463
+ borderTopWidth: 1,
3464
+ borderBottomWidth: 1,
3465
+ minHeight: STEPPER_SIZE
3466
+ }
3467
+ });
3468
+ function NumberInput({
3469
+ label,
3470
+ name: _name,
3471
+ // eslint-disable-line @typescript-eslint/no-unused-vars
3472
+ value,
3473
+ defaultValue,
3474
+ min,
3475
+ max,
3476
+ step = 1,
3477
+ disabled = false,
3478
+ error,
3479
+ hint,
3480
+ onChange,
3481
+ style
3482
+ }) {
3483
+ const { colors: colors2 } = useTheme();
3484
+ const isControlled = value !== void 0;
3485
+ const [internalValue, setInternalValue] = (0, import_react15.useState)(defaultValue ?? 0);
3486
+ const currentValue = isControlled ? value : internalValue;
3487
+ const clamp = (v) => {
3488
+ const withMin = min !== void 0 ? Math.max(min, v) : v;
3489
+ return max !== void 0 ? Math.min(max, withMin) : withMin;
3490
+ };
3491
+ const update = (next) => {
3492
+ const clamped = clamp(next);
3493
+ if (!isControlled) setInternalValue(clamped);
3494
+ onChange?.(clamped);
3495
+ };
3496
+ const canDecrease = min === void 0 || currentValue > min;
3497
+ const canIncrease = max === void 0 || currentValue < max;
3498
+ const borderColor = error ? colors2.colorError : colors2.colorOnBg;
3499
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native43.View, { style: [styles39.container, style], children: [
3500
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Label, { label }),
3501
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react_native43.View, { style: [styles39.inputRow, disabled && { opacity: 0.4 }], children: [
3502
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3503
+ import_react_native43.Pressable,
3504
+ {
3505
+ accessibilityRole: "button",
3506
+ accessibilityLabel: "Decrease",
3507
+ accessibilityState: { disabled: disabled || !canDecrease },
3508
+ disabled: disabled || !canDecrease,
3509
+ onPress: () => update(currentValue - step),
3510
+ style: ({ pressed }) => [
3511
+ styles39.stepper,
3512
+ styles39.stepperStart,
3513
+ {
3514
+ borderColor,
3515
+ backgroundColor: colors2.colorBgSubtle
3516
+ },
3517
+ pressed && { opacity: 0.7 },
3518
+ (disabled || !canDecrease) && { opacity: 0.4 }
3519
+ ],
3520
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3521
+ import_react_native43.Text,
3522
+ {
3523
+ style: [styles39.stepperText, { color: colors2.colorOnBg }],
3524
+ "aria-hidden": true,
3525
+ children: "\u2212"
3526
+ }
3527
+ )
3528
+ }
3529
+ ),
3530
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3531
+ import_react_native43.TextInput,
3532
+ {
3533
+ accessibilityLabel: label,
3534
+ accessibilityState: { disabled },
3535
+ accessibilityValue: {
3536
+ min,
3537
+ max,
3538
+ now: currentValue,
3539
+ text: String(currentValue)
3540
+ },
3541
+ keyboardType: "numeric",
3542
+ value: String(currentValue),
3543
+ editable: !disabled,
3544
+ onChangeText: (text) => {
3545
+ const parsed = parseFloat(text);
3546
+ const safe = isNaN(parsed) ? 0 : parsed;
3547
+ update(safe);
3548
+ },
3549
+ style: [
3550
+ styles39.input,
3551
+ {
3552
+ borderColor,
3553
+ color: colors2.colorOnBg,
3554
+ backgroundColor: colors2.colorBg
3555
+ }
3556
+ ]
3557
+ }
3558
+ ),
3559
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3560
+ import_react_native43.Pressable,
3561
+ {
3562
+ accessibilityRole: "button",
3563
+ accessibilityLabel: "Increase",
3564
+ accessibilityState: { disabled: disabled || !canIncrease },
3565
+ disabled: disabled || !canIncrease,
3566
+ onPress: () => update(currentValue + step),
3567
+ style: ({ pressed }) => [
3568
+ styles39.stepper,
3569
+ styles39.stepperEnd,
3570
+ {
3571
+ borderColor,
3572
+ backgroundColor: colors2.colorBgSubtle
3573
+ },
3574
+ pressed && { opacity: 0.7 },
3575
+ (disabled || !canIncrease) && { opacity: 0.4 }
3576
+ ],
3577
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3578
+ import_react_native43.Text,
3579
+ {
3580
+ style: [styles39.stepperText, { color: colors2.colorOnBg }],
3581
+ "aria-hidden": true,
3582
+ children: "+"
3583
+ }
3584
+ )
3585
+ }
3586
+ )
3587
+ ] }),
3588
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { type: "error", message: error }),
3589
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Message, { type: "hint", message: hint })
3590
+ ] });
3591
+ }
3592
+
3593
+ // src/components/interaction/Dialog/Dialog.native.tsx
3594
+ var import_react_native44 = require("react-native");
3595
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3596
+ var styles40 = import_react_native44.StyleSheet.create({
3597
+ overlay: {
3598
+ flex: 1,
3599
+ justifyContent: "center",
3600
+ alignItems: "center",
3601
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
3602
+ padding: import_native.spacing.m
3603
+ },
3604
+ panel: {
3605
+ width: "100%",
3606
+ maxWidth: 480,
3607
+ borderRadius: import_native.border.radius.m,
3608
+ padding: import_native.spacing.l,
3609
+ paddingTop: import_native.spacing.xl,
3610
+ shadowColor: "#000",
3611
+ shadowOffset: { width: 0, height: 4 },
3612
+ shadowOpacity: 0.15,
3613
+ shadowRadius: 12,
3614
+ elevation: 8
3615
+ },
3616
+ header: {
3617
+ flexDirection: "row",
3618
+ justifyContent: "space-between",
3619
+ alignItems: "center",
3620
+ marginBottom: import_native.spacing.m
3621
+ },
3622
+ title: {
3623
+ fontFamily: import_native.font.family.body,
3624
+ fontSize: import_native.font.size.heading3,
3625
+ fontWeight: import_native.font.weight.semibold,
3626
+ flex: 1
3627
+ },
3628
+ closeButton: {
3629
+ position: "absolute",
3630
+ top: import_native.spacing.s,
3631
+ end: import_native.spacing.s,
3632
+ width: 44,
3633
+ height: 44,
3634
+ alignItems: "center",
3635
+ justifyContent: "center",
3636
+ zIndex: 1
3637
+ },
3638
+ closeText: {
3639
+ fontFamily: import_native.font.family.body,
3640
+ fontSize: 20,
3641
+ lineHeight: 24
3642
+ }
3643
+ });
3644
+ function Dialog({
3645
+ isOpen = false,
3646
+ onClose,
3647
+ title,
3648
+ children,
3649
+ style
3650
+ }) {
3651
+ const { colors: colors2 } = useTheme();
3652
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3653
+ import_react_native44.Modal,
3654
+ {
3655
+ visible: isOpen,
3656
+ transparent: true,
3657
+ animationType: "fade",
3658
+ onRequestClose: onClose,
3659
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3660
+ import_react_native44.Pressable,
3661
+ {
3662
+ style: styles40.overlay,
3663
+ onPress: onClose,
3664
+ accessibilityRole: "button",
3665
+ accessibilityLabel: "Close dialog",
3666
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3667
+ import_react_native44.Pressable,
3668
+ {
3669
+ style: [styles40.panel, { backgroundColor: colors2.colorGreySubtle }, style],
3670
+ onPress: () => {
3671
+ },
3672
+ accessibilityRole: "none",
3673
+ children: [
3674
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3675
+ import_react_native44.Pressable,
3676
+ {
3677
+ style: styles40.closeButton,
3678
+ onPress: onClose,
3679
+ accessibilityRole: "button",
3680
+ accessibilityLabel: "Close dialog",
3681
+ hitSlop: 8,
3682
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3683
+ import_react_native44.Text,
3684
+ {
3685
+ style: [styles40.closeText, { color: colors2.colorOnBgSubtle }],
3686
+ "aria-hidden": true,
3687
+ children: "\u2715"
3688
+ }
3689
+ )
3690
+ }
3691
+ ),
3692
+ !!title && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native44.View, { style: styles40.header, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native44.Text, { style: [styles40.title, { color: colors2.colorOnGreySubtle }], children: title }) }),
3693
+ children
3694
+ ]
3695
+ }
3696
+ )
3697
+ }
3698
+ )
3699
+ }
3700
+ );
3701
+ }
3702
+
3703
+ // src/components/interaction/Drawer/Drawer.native.tsx
3704
+ var import_react16 = require("react");
3705
+ var import_react_native45 = require("react-native");
3706
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3707
+ var styles41 = import_react_native45.StyleSheet.create({
3708
+ overlay: {
3709
+ flex: 1,
3710
+ justifyContent: "flex-end"
3711
+ },
3712
+ panel: {
3713
+ maxHeight: "90%",
3714
+ borderTopStartRadius: import_native.border.radius.m,
3715
+ borderTopEndRadius: import_native.border.radius.m,
3716
+ paddingTop: import_native.spacing.m,
3717
+ paddingHorizontal: import_native.spacing.m,
3718
+ paddingBottom: import_native.spacing.m,
3719
+ shadowColor: "#000",
3720
+ shadowOffset: { width: 0, height: -4 },
3721
+ shadowOpacity: 0.15,
3722
+ shadowRadius: 16,
3723
+ elevation: 16
3724
+ },
3725
+ header: {
3726
+ flexDirection: "row",
3727
+ justifyContent: "space-between",
3728
+ alignItems: "center",
3729
+ paddingBottom: import_native.spacing.m,
3730
+ borderBottomWidth: 1,
3731
+ marginBottom: import_native.spacing.m
3732
+ },
3733
+ title: {
3734
+ fontFamily: import_native.font.family.body,
3735
+ fontSize: import_native.font.size.heading3,
3736
+ fontWeight: import_native.font.weight.semibold,
3737
+ flex: 1
3738
+ },
3739
+ closeButton: {
3740
+ width: 44,
3741
+ height: 44,
3742
+ alignItems: "center",
3743
+ justifyContent: "center"
3744
+ },
3745
+ closeText: {
3746
+ fontFamily: import_native.font.family.body,
3747
+ fontSize: 20,
3748
+ lineHeight: 24
3749
+ },
3750
+ body: {
3751
+ flex: 1
3752
+ }
3753
+ });
3754
+ function Drawer({
3755
+ isOpen,
3756
+ onClose,
3757
+ title,
3758
+ children,
3759
+ style
3760
+ }) {
3761
+ const { colors: colors2 } = useTheme();
3762
+ const screenHeight = import_react_native45.Dimensions.get("window").height;
3763
+ const slideAnim = (0, import_react16.useRef)(new import_react_native45.Animated.Value(screenHeight)).current;
3764
+ const backdropAnim = (0, import_react16.useRef)(new import_react_native45.Animated.Value(0)).current;
3765
+ (0, import_react16.useEffect)(() => {
3766
+ if (isOpen) {
3767
+ import_react_native45.Animated.parallel([
3768
+ import_react_native45.Animated.timing(slideAnim, {
3769
+ toValue: 0,
3770
+ duration: 250,
3771
+ useNativeDriver: true
3772
+ }),
3773
+ import_react_native45.Animated.timing(backdropAnim, {
3774
+ toValue: 1,
3775
+ duration: 250,
3776
+ useNativeDriver: true
3777
+ })
3778
+ ]).start();
3779
+ } else {
3780
+ import_react_native45.Animated.parallel([
3781
+ import_react_native45.Animated.timing(slideAnim, {
3782
+ toValue: screenHeight,
3783
+ duration: 200,
3784
+ useNativeDriver: true
3785
+ }),
3786
+ import_react_native45.Animated.timing(backdropAnim, {
3787
+ toValue: 0,
3788
+ duration: 200,
3789
+ useNativeDriver: true
3790
+ })
3791
+ ]).start();
3792
+ }
3793
+ }, [isOpen, slideAnim, backdropAnim, screenHeight]);
3794
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3795
+ import_react_native45.Modal,
3796
+ {
3797
+ visible: isOpen,
3798
+ transparent: true,
3799
+ animationType: "none",
3800
+ onRequestClose: onClose,
3801
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native45.View, { style: styles41.overlay, children: [
3802
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3803
+ import_react_native45.Animated.View,
3804
+ {
3805
+ style: [
3806
+ import_react_native45.StyleSheet.absoluteFill,
3807
+ { backgroundColor: "rgba(0, 0, 0, 0.5)", opacity: backdropAnim }
3808
+ ],
3809
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3810
+ import_react_native45.Pressable,
3811
+ {
3812
+ style: import_react_native45.StyleSheet.absoluteFill,
3813
+ onPress: onClose,
3814
+ accessibilityRole: "button",
3815
+ accessibilityLabel: "Close drawer"
3816
+ }
3817
+ )
3818
+ }
3819
+ ),
3820
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3821
+ import_react_native45.Animated.View,
3822
+ {
3823
+ style: [
3824
+ styles41.panel,
3825
+ {
3826
+ backgroundColor: colors2.colorBg,
3827
+ transform: [{ translateY: slideAnim }]
3828
+ },
3829
+ style
3830
+ ],
3831
+ accessibilityRole: "none",
3832
+ children: [
3833
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3834
+ import_react_native45.View,
3835
+ {
3836
+ style: [styles41.header, { borderBottomColor: colors2.colorBgSubtle }],
3837
+ children: [
3838
+ !!title && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native45.Text, { style: [styles41.title, { color: colors2.colorOnBg }], children: title }),
3839
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3840
+ import_react_native45.Pressable,
3841
+ {
3842
+ style: styles41.closeButton,
3843
+ onPress: onClose,
3844
+ accessibilityRole: "button",
3845
+ accessibilityLabel: "Close drawer",
3846
+ hitSlop: 8,
3847
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3848
+ import_react_native45.Text,
3849
+ {
3850
+ style: [styles41.closeText, { color: colors2.colorOnBgSubtle }],
3851
+ "aria-hidden": true,
3852
+ children: "\u2715"
3853
+ }
3854
+ )
3855
+ }
3856
+ )
3857
+ ]
3858
+ }
3859
+ ),
3860
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native45.View, { style: styles41.body, children })
3861
+ ]
3862
+ }
3863
+ )
3864
+ ] })
3865
+ }
3866
+ );
3867
+ }
3868
+
3869
+ // src/components/interaction/Toast/Toast.native.tsx
3870
+ var import_react17 = require("react");
3871
+ var import_react_native46 = require("react-native");
3872
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3873
+ var ToastContext = (0, import_react17.createContext)(void 0);
3874
+ var styles42 = import_react_native46.StyleSheet.create({
3875
+ container: {
3876
+ position: "absolute",
3877
+ top: 0,
3878
+ start: 0,
3879
+ end: 0,
3880
+ paddingTop: import_native.spacing.xxxl,
3881
+ paddingHorizontal: import_native.spacing.m,
3882
+ zIndex: 9999,
3883
+ pointerEvents: "box-none"
3884
+ },
3885
+ toast: {
3886
+ flexDirection: "row",
3887
+ alignItems: "center",
3888
+ justifyContent: "space-between",
3889
+ paddingVertical: import_native.spacing.s,
3890
+ paddingHorizontal: import_native.spacing.m,
3891
+ borderRadius: import_native.border.radius.s,
3892
+ marginBottom: import_native.spacing.xs,
3893
+ minHeight: 48
3894
+ },
3895
+ message: {
3896
+ fontFamily: import_native.font.family.body,
3897
+ fontSize: import_native.font.size.body,
3898
+ fontWeight: import_native.font.weight.semibold,
3899
+ flex: 1
3900
+ },
3901
+ closeButton: {
3902
+ width: 44,
3903
+ height: 44,
3904
+ alignItems: "center",
3905
+ justifyContent: "center",
3906
+ marginStart: import_native.spacing.xs
3907
+ },
3908
+ closeText: {
3909
+ fontFamily: import_native.font.family.body,
3910
+ fontSize: 16,
3911
+ lineHeight: 20
3912
+ }
3913
+ });
3914
+ function ToastItem({
3915
+ toast,
3916
+ onRemove
3917
+ }) {
3918
+ const { colors: colors2 } = useTheme();
3919
+ const slideAnim = (0, import_react17.useRef)(new import_react_native46.Animated.Value(-100)).current;
3920
+ const opacityAnim = (0, import_react17.useRef)(new import_react_native46.Animated.Value(0)).current;
3921
+ const variantColors = (0, import_react17.useMemo)(
3922
+ () => ({
3923
+ success: { bg: colors2.colorSuccess, text: colors2.colorOnSuccess },
3924
+ error: { bg: colors2.colorError, text: colors2.colorOnError },
3925
+ info: { bg: colors2.colorBgSubtle, text: colors2.colorOnBgSubtle }
3926
+ }),
3927
+ [colors2]
3928
+ );
3929
+ (0, import_react17.useEffect)(() => {
3930
+ import_react_native46.Animated.parallel([
3931
+ import_react_native46.Animated.timing(slideAnim, {
3932
+ toValue: 0,
3933
+ duration: 200,
3934
+ useNativeDriver: true
3935
+ }),
3936
+ import_react_native46.Animated.timing(opacityAnim, {
3937
+ toValue: 1,
3938
+ duration: 200,
3939
+ useNativeDriver: true
3940
+ })
3941
+ ]).start();
3942
+ }, [slideAnim, opacityAnim]);
3943
+ (0, import_react17.useEffect)(() => {
3944
+ const timer = setTimeout(onRemove, 5e3);
3945
+ return () => clearTimeout(timer);
3946
+ }, [onRemove]);
3947
+ const { bg, text } = variantColors[toast.variant];
3948
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3949
+ import_react_native46.Animated.View,
3950
+ {
3951
+ style: [
3952
+ styles42.toast,
3953
+ {
3954
+ backgroundColor: bg,
3955
+ transform: [{ translateY: slideAnim }],
3956
+ opacity: opacityAnim
3957
+ }
3958
+ ],
3959
+ accessibilityRole: "alert",
3960
+ accessibilityLiveRegion: "polite",
3961
+ children: [
3962
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native46.Text, { style: [styles42.message, { color: text }], children: toast.message }),
3963
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3964
+ import_react_native46.Pressable,
3965
+ {
3966
+ style: styles42.closeButton,
3967
+ onPress: onRemove,
3968
+ accessibilityRole: "button",
3969
+ accessibilityLabel: "Dismiss",
3970
+ hitSlop: 8,
3971
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native46.Text, { style: [styles42.closeText, { color: text }], "aria-hidden": true, children: "\u2715" })
3972
+ }
3973
+ )
3974
+ ]
3975
+ }
3976
+ );
3977
+ }
3978
+ function ToastProvider({
3979
+ children,
3980
+ style
3981
+ }) {
3982
+ const [toasts, setToasts] = (0, import_react17.useState)([]);
3983
+ const showToast = (0, import_react17.useCallback)((message, variant) => {
3984
+ const id = Math.random().toString(36).substring(2, 9);
3985
+ setToasts((prev) => [...prev, { id, message, variant }]);
3986
+ }, []);
3987
+ const removeToast = (0, import_react17.useCallback)((id) => {
3988
+ setToasts((prev) => prev.filter((t) => t.id !== id));
3989
+ }, []);
3990
+ const value = (0, import_react17.useMemo)(() => ({ showToast }), [showToast]);
3991
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ToastContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react_native46.View, { style: [{ flex: 1 }, style], children: [
3992
+ children,
3993
+ toasts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3994
+ import_react_native46.View,
3995
+ {
3996
+ style: styles42.container,
3997
+ accessibilityRole: "summary",
3998
+ accessibilityLabel: "Notifications",
3999
+ children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4000
+ ToastItem,
4001
+ {
4002
+ toast,
4003
+ onRemove: () => removeToast(toast.id)
4004
+ },
4005
+ toast.id
4006
+ ))
4007
+ }
4008
+ )
4009
+ ] }) });
4010
+ }
4011
+ function useToast() {
4012
+ const context = (0, import_react17.useContext)(ToastContext);
4013
+ if (!context) {
4014
+ throw new Error("useToast must be used within a ToastProvider");
4015
+ }
4016
+ return context;
4017
+ }
4018
+
4019
+ // src/components/interaction/DropdownMenu/DropdownMenu.native.tsx
4020
+ var import_react18 = __toESM(require("react"), 1);
4021
+ var import_react_native47 = require("react-native");
4022
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4023
+ var styles43 = import_react_native47.StyleSheet.create({
4024
+ overlay: {
4025
+ flex: 1,
4026
+ justifyContent: "flex-end"
4027
+ },
4028
+ sheet: {
4029
+ maxHeight: "60%",
4030
+ borderTopStartRadius: import_native.border.radius.m,
4031
+ borderTopEndRadius: import_native.border.radius.m,
4032
+ paddingTop: import_native.spacing.m,
4033
+ paddingBottom: import_native.spacing.xxxl
4034
+ },
4035
+ sheetHeader: {
4036
+ flexDirection: "row",
4037
+ justifyContent: "space-between",
4038
+ alignItems: "center",
4039
+ paddingHorizontal: import_native.spacing.m,
4040
+ paddingBottom: import_native.spacing.s,
4041
+ borderBottomWidth: 1,
4042
+ marginBottom: import_native.spacing.xxs
4043
+ },
4044
+ sheetTitle: {
4045
+ fontFamily: import_native.font.family.body,
4046
+ fontSize: import_native.font.size.heading3,
4047
+ fontWeight: import_native.font.weight.semibold
4048
+ },
4049
+ closeText: {
4050
+ fontFamily: import_native.font.family.body,
4051
+ fontSize: import_native.font.size.body,
4052
+ fontWeight: import_native.font.weight.semibold
4053
+ },
4054
+ separator: {
4055
+ height: 1,
4056
+ marginHorizontal: import_native.spacing.m,
4057
+ marginVertical: import_native.spacing.xxs
4058
+ },
4059
+ item: {
4060
+ flexDirection: "row",
4061
+ alignItems: "center",
4062
+ paddingHorizontal: import_native.spacing.m,
4063
+ paddingVertical: import_native.spacing.s,
4064
+ minHeight: 48,
4065
+ gap: import_native.spacing.s
4066
+ },
4067
+ itemText: {
4068
+ fontFamily: import_native.font.family.body,
4069
+ fontSize: import_native.font.size.body,
4070
+ lineHeight: lineHeight.body
4071
+ }
4072
+ });
4073
+ function DropdownMenu({
4074
+ trigger,
4075
+ items,
4076
+ title = "Menu",
4077
+ style
4078
+ }) {
4079
+ const { colors: colors2 } = useTheme();
4080
+ const [open, setOpen] = (0, import_react18.useState)(false);
4081
+ const screenHeight = import_react_native47.Dimensions.get("window").height;
4082
+ const slideAnim = (0, import_react18.useRef)(new import_react_native47.Animated.Value(screenHeight)).current;
4083
+ const backdropAnim = (0, import_react18.useRef)(new import_react_native47.Animated.Value(0)).current;
4084
+ (0, import_react18.useEffect)(() => {
4085
+ if (open) {
4086
+ import_react_native47.Animated.parallel([
4087
+ import_react_native47.Animated.timing(slideAnim, {
4088
+ toValue: 0,
4089
+ duration: 250,
4090
+ useNativeDriver: true
4091
+ }),
4092
+ import_react_native47.Animated.timing(backdropAnim, {
4093
+ toValue: 1,
4094
+ duration: 250,
4095
+ useNativeDriver: true
4096
+ })
4097
+ ]).start();
4098
+ } else {
4099
+ import_react_native47.Animated.parallel([
4100
+ import_react_native47.Animated.timing(slideAnim, {
4101
+ toValue: screenHeight,
4102
+ duration: 200,
4103
+ useNativeDriver: true
4104
+ }),
4105
+ import_react_native47.Animated.timing(backdropAnim, {
4106
+ toValue: 0,
4107
+ duration: 200,
4108
+ useNativeDriver: true
4109
+ })
4110
+ ]).start();
4111
+ }
4112
+ }, [open, slideAnim, backdropAnim, screenHeight]);
4113
+ const handleItemPress = (item) => {
4114
+ item.onPress?.();
4115
+ setOpen(false);
4116
+ };
4117
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native47.View, { style, children: [
4118
+ import_react18.default.cloneElement(trigger, {
4119
+ onPress: () => setOpen(true),
4120
+ accessibilityRole: "button",
4121
+ accessibilityLabel: title
4122
+ }),
4123
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4124
+ import_react_native47.Modal,
4125
+ {
4126
+ visible: open,
4127
+ transparent: true,
4128
+ animationType: "none",
4129
+ onRequestClose: () => setOpen(false),
4130
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native47.View, { style: styles43.overlay, children: [
4131
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4132
+ import_react_native47.Animated.View,
4133
+ {
4134
+ style: [
4135
+ import_react_native47.StyleSheet.absoluteFill,
4136
+ { backgroundColor: "rgba(0, 0, 0, 0.5)", opacity: backdropAnim }
4137
+ ],
4138
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4139
+ import_react_native47.Pressable,
4140
+ {
4141
+ style: import_react_native47.StyleSheet.absoluteFill,
4142
+ onPress: () => setOpen(false),
4143
+ accessibilityRole: "button",
4144
+ accessibilityLabel: "Close menu"
4145
+ }
4146
+ )
4147
+ }
4148
+ ),
4149
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4150
+ import_react_native47.Animated.View,
4151
+ {
4152
+ style: [
4153
+ styles43.sheet,
4154
+ {
4155
+ backgroundColor: colors2.colorBg,
4156
+ transform: [{ translateY: slideAnim }]
4157
+ }
4158
+ ],
4159
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4160
+ import_react_native47.Pressable,
4161
+ {
4162
+ onPress: () => {
4163
+ },
4164
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native47.SafeAreaView, { children: [
4165
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
4166
+ import_react_native47.View,
4167
+ {
4168
+ style: [
4169
+ styles43.sheetHeader,
4170
+ { borderBottomColor: colors2.colorBgSubtle }
4171
+ ],
4172
+ children: [
4173
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native47.Text, { style: [styles43.sheetTitle, { color: colors2.colorOnBg }], children: title }),
4174
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4175
+ import_react_native47.Pressable,
4176
+ {
4177
+ accessibilityRole: "button",
4178
+ accessibilityLabel: "Close",
4179
+ onPress: () => setOpen(false),
4180
+ hitSlop: 8,
4181
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4182
+ import_react_native47.Text,
4183
+ {
4184
+ style: [
4185
+ styles43.closeText,
4186
+ { color: colors2.colorInteractive }
4187
+ ],
4188
+ children: "Done"
4189
+ }
4190
+ )
4191
+ }
4192
+ )
4193
+ ]
4194
+ }
4195
+ ),
4196
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4197
+ import_react_native47.FlatList,
4198
+ {
4199
+ data: items,
4200
+ keyExtractor: (item) => item.id,
4201
+ renderItem: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
4202
+ item.separator && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4203
+ import_react_native47.View,
4204
+ {
4205
+ style: [
4206
+ styles43.separator,
4207
+ { backgroundColor: colors2.colorBgSubtle }
4208
+ ],
4209
+ accessibilityRole: "none"
4210
+ }
4211
+ ),
4212
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
4213
+ import_react_native47.Pressable,
4214
+ {
4215
+ accessibilityRole: "menuitem",
4216
+ accessibilityLabel: item.label,
4217
+ accessibilityState: { disabled: item.disabled },
4218
+ disabled: item.disabled,
4219
+ onPress: () => handleItemPress(item),
4220
+ style: ({ pressed }) => [
4221
+ styles43.item,
4222
+ pressed && { backgroundColor: colors2.colorBgSubtle },
4223
+ item.disabled && { opacity: 0.4 }
4224
+ ],
4225
+ children: [
4226
+ !!item.icon && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4227
+ import_react_native47.View,
4228
+ {
4229
+ importantForAccessibility: "no-hide-descendants",
4230
+ accessibilityElementsHidden: true,
4231
+ children: item.icon
4232
+ }
4233
+ ),
4234
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4235
+ import_react_native47.Text,
4236
+ {
4237
+ style: [
4238
+ styles43.itemText,
4239
+ { color: colors2.colorOnBg }
4240
+ ],
4241
+ children: item.label
4242
+ }
4243
+ )
4244
+ ]
4245
+ }
4246
+ )
4247
+ ] })
4248
+ }
4249
+ )
4250
+ ] })
4251
+ }
4252
+ )
4253
+ }
4254
+ )
4255
+ ] })
4256
+ }
4257
+ )
4258
+ ] });
4259
+ }
4260
+
4261
+ // src/components/interaction/Popover/Popover.native.tsx
4262
+ var import_react19 = __toESM(require("react"), 1);
4263
+ var import_react_native48 = require("react-native");
4264
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4265
+ var styles44 = import_react_native48.StyleSheet.create({
4266
+ wrapper: {
4267
+ alignSelf: "flex-start"
4268
+ },
4269
+ overlay: {
4270
+ flex: 1,
4271
+ justifyContent: "center",
4272
+ alignItems: "center",
4273
+ backgroundColor: "rgba(0, 0, 0, 0.25)",
4274
+ padding: import_native.spacing.m
4275
+ },
4276
+ panel: {
4277
+ width: "100%",
4278
+ maxWidth: 360,
4279
+ borderRadius: import_native.border.radius.s,
4280
+ padding: import_native.spacing.m,
4281
+ shadowColor: "#000",
4282
+ shadowOffset: { width: 0, height: 2 },
4283
+ shadowOpacity: 0.15,
4284
+ shadowRadius: 8,
4285
+ elevation: 4
4286
+ }
4287
+ });
4288
+ function Popover({
4289
+ children,
4290
+ content,
4291
+ accessibilityLabel,
4292
+ style
4293
+ }) {
4294
+ const { colors: colors2 } = useTheme();
4295
+ const [isOpen, setIsOpen] = (0, import_react19.useState)(false);
4296
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react_native48.View, { style: [styles44.wrapper, style], children: [
4297
+ import_react19.default.cloneElement(children, {
4298
+ onPress: () => setIsOpen(true),
4299
+ accessibilityRole: "button",
4300
+ accessibilityLabel: accessibilityLabel ?? "Open popover"
4301
+ }),
4302
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4303
+ import_react_native48.Modal,
4304
+ {
4305
+ visible: isOpen,
4306
+ transparent: true,
4307
+ animationType: "fade",
4308
+ onRequestClose: () => setIsOpen(false),
4309
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4310
+ import_react_native48.Pressable,
4311
+ {
4312
+ style: styles44.overlay,
4313
+ onPress: () => setIsOpen(false),
4314
+ accessibilityRole: "button",
4315
+ accessibilityLabel: "Close popover",
4316
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4317
+ import_react_native48.Pressable,
4318
+ {
4319
+ style: [styles44.panel, { backgroundColor: colors2.colorBg }],
4320
+ onPress: () => {
4321
+ },
4322
+ accessibilityRole: "none",
4323
+ accessibilityLabel,
4324
+ children: content
4325
+ }
4326
+ )
4327
+ }
4328
+ )
4329
+ }
4330
+ )
991
4331
  ] });
992
4332
  }