@lmb-it/kitsconcerto-native 0.1.277 → 0.1.284

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 (220) hide show
  1. package/components/Avatar/index.cjs +1 -0
  2. package/components/Avatar/index.cjs.map +1 -1
  3. package/components/Avatar/index.js +1 -0
  4. package/components/Avatar/index.js.map +1 -1
  5. package/components/Banner/banner.cjs +1 -0
  6. package/components/Banner/banner.cjs.map +1 -1
  7. package/components/Banner/banner.js +1 -0
  8. package/components/Banner/banner.js.map +1 -1
  9. package/components/BottomTabBar/index.cjs +1 -0
  10. package/components/BottomTabBar/index.cjs.map +1 -1
  11. package/components/BottomTabBar/index.js +1 -0
  12. package/components/BottomTabBar/index.js.map +1 -1
  13. package/components/BreadCrumb/index.cjs.map +1 -1
  14. package/components/BreadCrumb/index.js.map +1 -1
  15. package/components/Button/Button.cjs +1 -0
  16. package/components/Button/Button.cjs.map +1 -1
  17. package/components/Button/Button.js +1 -0
  18. package/components/Button/Button.js.map +1 -1
  19. package/components/Carousel/index.cjs +1 -0
  20. package/components/Carousel/index.cjs.map +1 -1
  21. package/components/Carousel/index.js +1 -0
  22. package/components/Carousel/index.js.map +1 -1
  23. package/components/ChatBubble/index.cjs +1 -0
  24. package/components/ChatBubble/index.cjs.map +1 -1
  25. package/components/ChatBubble/index.js +1 -0
  26. package/components/ChatBubble/index.js.map +1 -1
  27. package/components/Chip/index.cjs +1 -0
  28. package/components/Chip/index.cjs.map +1 -1
  29. package/components/Chip/index.js +1 -0
  30. package/components/Chip/index.js.map +1 -1
  31. package/components/DateSeparator/index.cjs +1 -0
  32. package/components/DateSeparator/index.cjs.map +1 -1
  33. package/components/DateSeparator/index.js +1 -0
  34. package/components/DateSeparator/index.js.map +1 -1
  35. package/components/DetailsList/index.cjs +1 -0
  36. package/components/DetailsList/index.cjs.map +1 -1
  37. package/components/DetailsList/index.js +1 -0
  38. package/components/DetailsList/index.js.map +1 -1
  39. package/components/EmptyState/index.cjs +1 -0
  40. package/components/EmptyState/index.cjs.map +1 -1
  41. package/components/EmptyState/index.js +1 -0
  42. package/components/EmptyState/index.js.map +1 -1
  43. package/components/Gallery/index.cjs +1 -0
  44. package/components/Gallery/index.cjs.map +1 -1
  45. package/components/Gallery/index.js +1 -0
  46. package/components/Gallery/index.js.map +1 -1
  47. package/components/MessageComposer/index.cjs +1 -0
  48. package/components/MessageComposer/index.cjs.map +1 -1
  49. package/components/MessageComposer/index.js +1 -0
  50. package/components/MessageComposer/index.js.map +1 -1
  51. package/components/MessageReceipt/index.cjs +1 -0
  52. package/components/MessageReceipt/index.cjs.map +1 -1
  53. package/components/MessageReceipt/index.js +1 -0
  54. package/components/MessageReceipt/index.js.map +1 -1
  55. package/components/ProgressBar/index.cjs +1 -0
  56. package/components/ProgressBar/index.cjs.map +1 -1
  57. package/components/ProgressBar/index.js +1 -0
  58. package/components/ProgressBar/index.js.map +1 -1
  59. package/components/SegmentedControl/index.cjs +1 -0
  60. package/components/SegmentedControl/index.cjs.map +1 -1
  61. package/components/SegmentedControl/index.js +1 -0
  62. package/components/SegmentedControl/index.js.map +1 -1
  63. package/components/StatCard/index.cjs +1 -0
  64. package/components/StatCard/index.cjs.map +1 -1
  65. package/components/StatCard/index.js +1 -0
  66. package/components/StatCard/index.js.map +1 -1
  67. package/components/Stepper/index.cjs +1 -0
  68. package/components/Stepper/index.cjs.map +1 -1
  69. package/components/Stepper/index.js +1 -0
  70. package/components/Stepper/index.js.map +1 -1
  71. package/components/Tabs/index.cjs +1 -0
  72. package/components/Tabs/index.cjs.map +1 -1
  73. package/components/Tabs/index.js +1 -0
  74. package/components/Tabs/index.js.map +1 -1
  75. package/components/Timeline/index.cjs +1 -0
  76. package/components/Timeline/index.cjs.map +1 -1
  77. package/components/Timeline/index.js +1 -0
  78. package/components/Timeline/index.js.map +1 -1
  79. package/components/Translate/index.cjs +1 -0
  80. package/components/Translate/index.cjs.map +1 -1
  81. package/components/Translate/index.js +1 -0
  82. package/components/Translate/index.js.map +1 -1
  83. package/components/TypingIndicator/index.cjs +1 -0
  84. package/components/TypingIndicator/index.cjs.map +1 -1
  85. package/components/TypingIndicator/index.js +1 -0
  86. package/components/TypingIndicator/index.js.map +1 -1
  87. package/components/overlay/ConfirmDialog/index.cjs +1 -0
  88. package/components/overlay/ConfirmDialog/index.cjs.map +1 -1
  89. package/components/overlay/ConfirmDialog/index.js +1 -0
  90. package/components/overlay/ConfirmDialog/index.js.map +1 -1
  91. package/components/overlay/Dialog/index.cjs +1 -0
  92. package/components/overlay/Dialog/index.cjs.map +1 -1
  93. package/components/overlay/Dialog/index.js +1 -0
  94. package/components/overlay/Dialog/index.js.map +1 -1
  95. package/contexts/BreadcrumbContext.cjs +33 -0
  96. package/contexts/BreadcrumbContext.cjs.map +1 -0
  97. package/contexts/BreadcrumbContext.js +28 -0
  98. package/contexts/BreadcrumbContext.js.map +1 -0
  99. package/form/controls/Checkbox/index.cjs +1 -0
  100. package/form/controls/Checkbox/index.cjs.map +1 -1
  101. package/form/controls/Checkbox/index.js +1 -0
  102. package/form/controls/Checkbox/index.js.map +1 -1
  103. package/form/controls/RadioButton/radio.cjs +1 -0
  104. package/form/controls/RadioButton/radio.cjs.map +1 -1
  105. package/form/controls/RadioButton/radio.js +1 -0
  106. package/form/controls/RadioButton/radio.js.map +1 -1
  107. package/form/controls/TriStateCheckbox/index.cjs +1 -0
  108. package/form/controls/TriStateCheckbox/index.cjs.map +1 -1
  109. package/form/controls/TriStateCheckbox/index.js +1 -0
  110. package/form/controls/TriStateCheckbox/index.js.map +1 -1
  111. package/form/file-pickers/index.cjs +1 -0
  112. package/form/file-pickers/index.cjs.map +1 -1
  113. package/form/file-pickers/index.js +1 -0
  114. package/form/file-pickers/index.js.map +1 -1
  115. package/form/helpers/FormContainer/index.cjs +1 -0
  116. package/form/helpers/FormContainer/index.cjs.map +1 -1
  117. package/form/helpers/FormContainer/index.js +1 -0
  118. package/form/helpers/FormContainer/index.js.map +1 -1
  119. package/form/inputs/ColorPicker/index.cjs +1 -0
  120. package/form/inputs/ColorPicker/index.cjs.map +1 -1
  121. package/form/inputs/ColorPicker/index.js +1 -0
  122. package/form/inputs/ColorPicker/index.js.map +1 -1
  123. package/form/inputs/Datepicker/index.cjs +1 -0
  124. package/form/inputs/Datepicker/index.cjs.map +1 -1
  125. package/form/inputs/Datepicker/index.js +1 -0
  126. package/form/inputs/Datepicker/index.js.map +1 -1
  127. package/form/inputs/InputLocation/index.cjs +1 -0
  128. package/form/inputs/InputLocation/index.cjs.map +1 -1
  129. package/form/inputs/InputLocation/index.js +1 -0
  130. package/form/inputs/InputLocation/index.js.map +1 -1
  131. package/form/inputs/InputMask/index.cjs +1 -0
  132. package/form/inputs/InputMask/index.cjs.map +1 -1
  133. package/form/inputs/InputMask/index.js +1 -0
  134. package/form/inputs/InputMask/index.js.map +1 -1
  135. package/form/inputs/InputNumber/index.cjs +1 -0
  136. package/form/inputs/InputNumber/index.cjs.map +1 -1
  137. package/form/inputs/InputNumber/index.js +1 -0
  138. package/form/inputs/InputNumber/index.js.map +1 -1
  139. package/form/inputs/InputPassword/index.cjs +1 -0
  140. package/form/inputs/InputPassword/index.cjs.map +1 -1
  141. package/form/inputs/InputPassword/index.js +1 -0
  142. package/form/inputs/InputPassword/index.js.map +1 -1
  143. package/form/inputs/InputSwitch/index.cjs +1 -0
  144. package/form/inputs/InputSwitch/index.cjs.map +1 -1
  145. package/form/inputs/InputSwitch/index.js +1 -0
  146. package/form/inputs/InputSwitch/index.js.map +1 -1
  147. package/form/inputs/InputText/index.cjs +1 -0
  148. package/form/inputs/InputText/index.cjs.map +1 -1
  149. package/form/inputs/InputText/index.js +1 -0
  150. package/form/inputs/InputText/index.js.map +1 -1
  151. package/form/inputs/InputTextarea/index.cjs +1 -0
  152. package/form/inputs/InputTextarea/index.cjs.map +1 -1
  153. package/form/inputs/InputTextarea/index.js +1 -0
  154. package/form/inputs/InputTextarea/index.js.map +1 -1
  155. package/form/inputs/PhoneInput/index.cjs +1 -0
  156. package/form/inputs/PhoneInput/index.cjs.map +1 -1
  157. package/form/inputs/PhoneInput/index.js +1 -0
  158. package/form/inputs/PhoneInput/index.js.map +1 -1
  159. package/form/selects/AutoComplete/index.cjs +1 -0
  160. package/form/selects/AutoComplete/index.cjs.map +1 -1
  161. package/form/selects/AutoComplete/index.js +1 -0
  162. package/form/selects/AutoComplete/index.js.map +1 -1
  163. package/form/selects/CascadeSelect/index.cjs +1 -0
  164. package/form/selects/CascadeSelect/index.cjs.map +1 -1
  165. package/form/selects/CascadeSelect/index.js +1 -0
  166. package/form/selects/CascadeSelect/index.js.map +1 -1
  167. package/form/selects/Dropdown/index.cjs +1 -0
  168. package/form/selects/Dropdown/index.cjs.map +1 -1
  169. package/form/selects/Dropdown/index.js +1 -0
  170. package/form/selects/Dropdown/index.js.map +1 -1
  171. package/form/selects/ListBox/index.cjs +1 -0
  172. package/form/selects/ListBox/index.cjs.map +1 -1
  173. package/form/selects/ListBox/index.js +1 -0
  174. package/form/selects/ListBox/index.js.map +1 -1
  175. package/form/selects/MultiSelect/index.cjs +1 -0
  176. package/form/selects/MultiSelect/index.cjs.map +1 -1
  177. package/form/selects/MultiSelect/index.js +1 -0
  178. package/form/selects/MultiSelect/index.js.map +1 -1
  179. package/form/selects/TreeSelect/index.cjs +1 -0
  180. package/form/selects/TreeSelect/index.cjs.map +1 -1
  181. package/form/selects/TreeSelect/index.js +1 -0
  182. package/form/selects/TreeSelect/index.js.map +1 -1
  183. package/form/selects/helpers/SelectPopupOverlay.cjs +1 -0
  184. package/form/selects/helpers/SelectPopupOverlay.cjs.map +1 -1
  185. package/form/selects/helpers/SelectPopupOverlay.js +1 -0
  186. package/form/selects/helpers/SelectPopupOverlay.js.map +1 -1
  187. package/form-renderer/components/fields/FileUploader/index.cjs +1 -0
  188. package/form-renderer/components/fields/FileUploader/index.cjs.map +1 -1
  189. package/form-renderer/components/fields/FileUploader/index.js +1 -0
  190. package/form-renderer/components/fields/FileUploader/index.js.map +1 -1
  191. package/form-renderer/components/fields/Group/index.cjs +1 -0
  192. package/form-renderer/components/fields/Group/index.cjs.map +1 -1
  193. package/form-renderer/components/fields/Group/index.js +1 -0
  194. package/form-renderer/components/fields/Group/index.js.map +1 -1
  195. package/form-renderer/components/fields/Radios/index.cjs +1 -0
  196. package/form-renderer/components/fields/Radios/index.cjs.map +1 -1
  197. package/form-renderer/components/fields/Radios/index.js +1 -0
  198. package/form-renderer/components/fields/Radios/index.js.map +1 -1
  199. package/form-renderer/components/fields/Select/index.cjs +1 -0
  200. package/form-renderer/components/fields/Select/index.cjs.map +1 -1
  201. package/form-renderer/components/fields/Select/index.js +1 -0
  202. package/form-renderer/components/fields/Select/index.js.map +1 -1
  203. package/hooks/main.cjs +1 -0
  204. package/hooks/main.cjs.map +1 -1
  205. package/hooks/main.js +1 -0
  206. package/hooks/main.js.map +1 -1
  207. package/hooks/useBreadcrumbTrail.cjs +21 -0
  208. package/hooks/useBreadcrumbTrail.cjs.map +1 -0
  209. package/hooks/useBreadcrumbTrail.js +16 -0
  210. package/hooks/useBreadcrumbTrail.js.map +1 -0
  211. package/index.cjs +5 -0
  212. package/index.cjs.map +1 -1
  213. package/index.d.ts +144 -5
  214. package/index.js +2 -0
  215. package/index.js.map +1 -1
  216. package/package.json +1 -1
  217. package/primitives/Card/index.cjs +1 -0
  218. package/primitives/Card/index.cjs.map +1 -1
  219. package/primitives/Card/index.js +1 -0
  220. package/primitives/Card/index.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/form/controls/TriStateCheckbox/index.native.tsx"],"sourcesContent":["import {TriStateCheckbox as TriStateCheckboxMobile, type TriStateCheckboxProps} from \"@lmb-it/kitsconcertomobile\";\nimport {useSelectionController} from \"../../../hooks\";\n\nexport const TriStateCheckbox = (props:TriStateCheckboxProps)=>{\n const { value, onChange } = useSelectionController({\n mode: 'tristate',\n defaultValue: false // Start at false\n });\n\n return <TriStateCheckboxMobile value={value} onChange={()=>onChange()} {...props} />\n}\n"],"names":["TriStateCheckboxMobile"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,gBAAA,GAAmB,CAAC,KAAA,KAA8B;AAC3D,EAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAS,GAAI,sBAAA,CAAuB;AAAA,IAC/C,IAAA,EAAM,UAAA;AAAA,IACN,YAAA,EAAc;AAAA;AAAA,GACjB,CAAA;AAED,EAAA,uBAAO,GAAA,CAACA,sBAAuB,KAAA,EAAc,QAAA,EAAU,MAAI,QAAA,EAAS,EAAI,GAAG,KAAA,EAAO,CAAA;AACtF;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/form/controls/TriStateCheckbox/index.native.tsx"],"sourcesContent":["import {TriStateCheckbox as TriStateCheckboxMobile, type TriStateCheckboxProps} from \"@lmb-it/kitsconcertomobile\";\nimport {useSelectionController} from \"../../../hooks\";\n\nexport const TriStateCheckbox = (props:TriStateCheckboxProps)=>{\n const { value, onChange } = useSelectionController({\n mode: 'tristate',\n defaultValue: false // Start at false\n });\n\n return <TriStateCheckboxMobile value={value} onChange={()=>onChange()} {...props} />\n}\n"],"names":["TriStateCheckboxMobile"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,gBAAA,GAAmB,CAAC,KAAA,KAA8B;AAC3D,EAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAS,GAAI,sBAAA,CAAuB;AAAA,IAC/C,IAAA,EAAM,UAAA;AAAA,IACN,YAAA,EAAc;AAAA;AAAA,GACjB,CAAA;AAED,EAAA,uBAAO,GAAA,CAACA,sBAAuB,KAAA,EAAc,QAAA,EAAU,MAAI,QAAA,EAAS,EAAI,GAAG,KAAA,EAAO,CAAA;AACtF;;;;"}
@@ -9,6 +9,7 @@ require('react');
9
9
  require('axios');
10
10
  require('../../contexts/DialogContext.cjs');
11
11
  require('../../contexts/PermissionsContext.cjs');
12
+ require('../../contexts/BreadcrumbContext.cjs');
12
13
  require('../selects/SelectContext.cjs');
13
14
 
14
15
  const FilePicker = (props) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/form/file-pickers/index.native.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport type {IFileUploader} from \"@lmb-it/kitsconcerto-types\";\nimport MainUploader from \"./MainUploader\";\nimport {KitsContainer} from \"../../_compat\";\n\nconst FilePicker: FC<IFileUploader> = (props) => {\n const { id, helperText, disabled, label, errors, hideError, invalid } = props;\n\n return (\n <KitsContainer\n id={id}\n className={\"file-picker-component\"}\n disabled={disabled}\n label={label}\n hideError={hideError}\n errors={errors}\n invalid={invalid}\n helperText={helperText}\n bare\n isFloatedLabel={false}\n >\n <MainUploader name={id} {...props} />\n </KitsContainer>\n );\n};\n\nexport default FilePicker;\n"],"names":["jsx","KitsContainer","MainUploader"],"mappings":";;;;;;;;;;;;;AAKA,MAAM,UAAA,GAAgC,CAAC,KAAA,KAAU;AAC7C,EAAA,MAAM,EAAE,IAAI,UAAA,EAAY,QAAA,EAAU,OAAO,MAAA,EAAQ,SAAA,EAAW,SAAQ,GAAI,KAAA;AAExE,EAAA,uBACIA,cAAA;AAAA,IAACC,oBAAA;AAAA,IAAA;AAAA,MACG,EAAA;AAAA,MACA,SAAA,EAAW,uBAAA;AAAA,MACX,QAAA;AAAA,MACA,KAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA,EAAI,IAAA;AAAA,MACJ,cAAA,EAAgB,KAAA;AAAA,MAEhB,QAAA,kBAAAD,cAAA,CAACE,sBAAA,EAAA,EAAa,IAAA,EAAM,EAAA,EAAK,GAAG,KAAA,EAAO;AAAA;AAAA,GACvC;AAER;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/form/file-pickers/index.native.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport type {IFileUploader} from \"@lmb-it/kitsconcerto-types\";\nimport MainUploader from \"./MainUploader\";\nimport {KitsContainer} from \"../../_compat\";\n\nconst FilePicker: FC<IFileUploader> = (props) => {\n const { id, helperText, disabled, label, errors, hideError, invalid } = props;\n\n return (\n <KitsContainer\n id={id}\n className={\"file-picker-component\"}\n disabled={disabled}\n label={label}\n hideError={hideError}\n errors={errors}\n invalid={invalid}\n helperText={helperText}\n bare\n isFloatedLabel={false}\n >\n <MainUploader name={id} {...props} />\n </KitsContainer>\n );\n};\n\nexport default FilePicker;\n"],"names":["jsx","KitsContainer","MainUploader"],"mappings":";;;;;;;;;;;;;;AAKA,MAAM,UAAA,GAAgC,CAAC,KAAA,KAAU;AAC7C,EAAA,MAAM,EAAE,IAAI,UAAA,EAAY,QAAA,EAAU,OAAO,MAAA,EAAQ,SAAA,EAAW,SAAQ,GAAI,KAAA;AAExE,EAAA,uBACIA,cAAA;AAAA,IAACC,oBAAA;AAAA,IAAA;AAAA,MACG,EAAA;AAAA,MACA,SAAA,EAAW,uBAAA;AAAA,MACX,QAAA;AAAA,MACA,KAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA,EAAI,IAAA;AAAA,MACJ,cAAA,EAAgB,KAAA;AAAA,MAEhB,QAAA,kBAAAD,cAAA,CAACE,sBAAA,EAAA,EAAa,IAAA,EAAM,EAAA,EAAK,GAAG,KAAA,EAAO;AAAA;AAAA,GACvC;AAER;;;;"}
@@ -5,6 +5,7 @@ import 'react';
5
5
  import 'axios';
6
6
  import '../../contexts/DialogContext.js';
7
7
  import '../../contexts/PermissionsContext.js';
8
+ import '../../contexts/BreadcrumbContext.js';
8
9
  import '../selects/SelectContext.js';
9
10
 
10
11
  const FilePicker = (props) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/form/file-pickers/index.native.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport type {IFileUploader} from \"@lmb-it/kitsconcerto-types\";\nimport MainUploader from \"./MainUploader\";\nimport {KitsContainer} from \"../../_compat\";\n\nconst FilePicker: FC<IFileUploader> = (props) => {\n const { id, helperText, disabled, label, errors, hideError, invalid } = props;\n\n return (\n <KitsContainer\n id={id}\n className={\"file-picker-component\"}\n disabled={disabled}\n label={label}\n hideError={hideError}\n errors={errors}\n invalid={invalid}\n helperText={helperText}\n bare\n isFloatedLabel={false}\n >\n <MainUploader name={id} {...props} />\n </KitsContainer>\n );\n};\n\nexport default FilePicker;\n"],"names":[],"mappings":";;;;;;;;;AAKA,MAAM,UAAA,GAAgC,CAAC,KAAA,KAAU;AAC7C,EAAA,MAAM,EAAE,IAAI,UAAA,EAAY,QAAA,EAAU,OAAO,MAAA,EAAQ,SAAA,EAAW,SAAQ,GAAI,KAAA;AAExE,EAAA,uBACI,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACG,EAAA;AAAA,MACA,SAAA,EAAW,uBAAA;AAAA,MACX,QAAA;AAAA,MACA,KAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA,EAAI,IAAA;AAAA,MACJ,cAAA,EAAgB,KAAA;AAAA,MAEhB,QAAA,kBAAA,GAAA,CAAC,YAAA,EAAA,EAAa,IAAA,EAAM,EAAA,EAAK,GAAG,KAAA,EAAO;AAAA;AAAA,GACvC;AAER;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/form/file-pickers/index.native.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport type {IFileUploader} from \"@lmb-it/kitsconcerto-types\";\nimport MainUploader from \"./MainUploader\";\nimport {KitsContainer} from \"../../_compat\";\n\nconst FilePicker: FC<IFileUploader> = (props) => {\n const { id, helperText, disabled, label, errors, hideError, invalid } = props;\n\n return (\n <KitsContainer\n id={id}\n className={\"file-picker-component\"}\n disabled={disabled}\n label={label}\n hideError={hideError}\n errors={errors}\n invalid={invalid}\n helperText={helperText}\n bare\n isFloatedLabel={false}\n >\n <MainUploader name={id} {...props} />\n </KitsContainer>\n );\n};\n\nexport default FilePicker;\n"],"names":[],"mappings":";;;;;;;;;;AAKA,MAAM,UAAA,GAAgC,CAAC,KAAA,KAAU;AAC7C,EAAA,MAAM,EAAE,IAAI,UAAA,EAAY,QAAA,EAAU,OAAO,MAAA,EAAQ,SAAA,EAAW,SAAQ,GAAI,KAAA;AAExE,EAAA,uBACI,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACG,EAAA;AAAA,MACA,SAAA,EAAW,uBAAA;AAAA,MACX,QAAA;AAAA,MACA,KAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA,EAAI,IAAA;AAAA,MACJ,cAAA,EAAgB,KAAA;AAAA,MAEhB,QAAA,kBAAA,GAAA,CAAC,YAAA,EAAA,EAAa,IAAA,EAAM,EAAA,EAAK,GAAG,KAAA,EAAO;AAAA;AAAA,GACvC;AAER;;;;"}
@@ -89,6 +89,7 @@ require('../../../apps/mobile/src/Core/Input/Field.cjs');
89
89
  require('../../../apps/mobile/src/Core/Input/Slot.cjs');
90
90
  require('../../../contexts/DialogContext.cjs');
91
91
  require('../../../contexts/PermissionsContext.cjs');
92
+ require('../../../contexts/BreadcrumbContext.cjs');
92
93
  var useResolvedElementStyles = require('../../../hooks/useResolvedElementStyles.cjs');
93
94
  var useThemedFont = require('../../../hooks/useThemedFont.cjs');
94
95
  var KitsThemeProvider_native = require('../../../contexts/Theme/KitsThemeProvider.cjs');
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../src/form/helpers/FormContainer/index.native.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useMemo } from \"react\";\nimport { View } from \"react-native\";\nimport { uniqueId } from \"lodash\";\nimport ErrorMessage from \"../ErrorMessage\";\nimport type {IKitsContainer} from \"@lmb-it/kitsconcerto-types\";\nimport {\n FormControl,\n FormControlHelper,\n FormControlHelperText,\n style as resolveStyle,\n} from \"@lmb-it/kitsconcertomobile\"\nimport { Label, Text, useKitsTheme } from \"../../../_compat\";\nimport {useResolvedElementStyles, useThemedFont} from \"@lmb-it/kitsconcerto/hooks\";\n\n/**\n * KitsContainer (native) — wraps all form inputs with label, addons, helper\n * text, and errors. Mirror of the web variant: a pure renderer that does NO\n * independent theme lookup. Every slot style comes from `elementStyles`\n * passed by the parent input (already merged through the\n * FormElement < Input/Select < InputText/DropdownSelect/… < per-instance slots\n * chain by the parent's `useComponentDefaults` call).\n *\n * Addon rendering is inlined here (matches web FormContainer). There is NO\n * `Addons` component on either platform anymore — the previous native Addons\n * helper re-resolved tokens and hardcoded `borderRadius / borderWidth /\n * padding / backgroundColor / borderColor` defaults that clobbered\n * `kitsTheme.components.*.leftAddon.style` overrides. Both bugs are fixed by\n * deleting the indirection.\n *\n * Element slots applied here (identical contract to web):\n * container → outer FormControl wrapper\n * label → Label component (plain Text path on native — see Label.native)\n * inputGroup → input group wrapper (around addons + input). On native this\n * wrapper carries the visual border that web gets from the\n * `.p-inputgroup` CSS class.\n * leftAddon → left addon View\n * rightAddon → right addon View\n * helperText → helper text below the group\n * error → error message below the group\n *\n * The `root` slot is NOT applied here — it is applied by the parent form\n * input component directly to the inner Input/Textarea element.\n */\nconst KitsContainer: FC<PropsWithChildren<IKitsContainer>> = (props) => {\n const {\n id,\n helperText,\n children,\n rightAddon,\n leftAddon,\n errors,\n invalid,\n required,\n hideError,\n label,\n isFloatedLabel,\n containerStyle,\n disabled,\n bare,\n elementStyles: parentElementStyles,\n } = props;\n\n // Pure renderer: resolve the elementStyles passed in by the parent.\n // No `useComponentDefaults('FormContainer', …)` lookup — that key is\n // intentionally not part of the consumer-facing theme contract.\n const elStyles = useResolvedElementStyles(parentElementStyles || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n // Generate a unique element ID (for parity with web; not used in native labels)\n const elementId = id ? `${id}_element` : uniqueId(\"element_\");\n\n // Derive label placement from the label prop\n const placement = useMemo(() => {\n if (label && typeof label === 'object' && 'placement' in label) {\n return label.placement; // \"RL\" | \"B\" | \"T\"\n }\n return \"T\"; // default: top\n }, [label]);\n\n // Determine layout direction based on placement\n // T = top (column, label first), B = bottom (column-reverse), RL = side-by-side (row)\n const isHorizontal = placement === \"RL\";\n const isBottom = placement === \"B\";\n\n // Label uses the plain Text path (NOT the FormControlLabel path) because\n // @lmb-it/kitsconcertomobile's FormControlLabelText strips arbitrary\n // inline styles, which broke `kitsTheme.components.Input.label.style`\n // overrides on native. The plain Text path forwards `style` directly.\n const labelElement = !isFloatedLabel ? (\n <Label label={label} elementId={elementId} required={required} style={elStyles.label || undefined} />\n ) : null;\n\n /**\n * Inline addon renderer. Mirrors the dispatch web uses in FormContainer\n * (string → text, ReactElement → element) AND adds the function-arg\n * branch native needs because lucide-react-native icons are passed as\n * functions `(props) => <Icon …/>`. The function-arg branch never runs\n * on web (web never goes through this code) so it cannot affect web.\n */\n const renderAddon = (\n addon: IKitsContainer[\"leftAddon\"] | IKitsContainer[\"rightAddon\"],\n ) => {\n if (!addon) return null;\n if (typeof addon === \"string\" || typeof addon === \"number\") {\n return <Text fontSize={14}>{addon}</Text>;\n }\n if (typeof addon === \"function\") {\n return (addon as (args: { size: number }) => React.ReactNode)({ size: 16 });\n }\n if (React.isValidElement(addon)) {\n return addon;\n }\n return null;\n };\n\n // Resolved inputGroup wrapper style. The default theme provides\n // `Input.inputGroup.style.{borderColor, borderRadius, borderWidth, height}`\n // — these are what give the group its visual frame. Defaults are layered\n // *under* the user's resolved style, so a per-instance override always wins.\n //\n // The `invalid` border color is applied as a fallback default (after\n // theme defaults, before user `inputGroup.borderColor` override). When\n // `bare` is set, the whole frame is suppressed (matches web's\n // `bareInputGroupStyle`).\n const inputGroupStyle = useMemo(() => {\n if (bare) {\n // Bare mode (FilePicker, Radio, Checkbox group, …): drop ALL\n // inputGroup chrome including `height: 52` from the theme. Web's\n // FormContainer does the same — it passes `style={{}}` when\n // bare (see helpers/FormContainer/index.web.tsx, the bare\n // branch of the row Flex). Without this, the non-classic file\n // uploader's 200px dashed drop zone was being squashed to 52px.\n return {\n width: \"100%\" as const,\n borderWidth: 0,\n borderRadius: 0,\n overflow: \"visible\" as const,\n };\n }\n const userStyle = elStyles.inputGroup || {};\n const userOverrodeBorderColor = \"borderColor\" in userStyle;\n return {\n width: \"100%\" as const,\n flexDirection: \"row\" as const,\n alignItems: \"stretch\" as const,\n overflow: \"hidden\" as const,\n ...userStyle,\n ...(invalid && !userOverrodeBorderColor\n ? { borderColor: resolveToken(\"danger\") }\n : {}),\n };\n }, [bare, elStyles.inputGroup, invalid, resolveToken]);\n\n // Addon baseline chrome — mirrors what PrimeReact's `.p-inputgroup-addon`\n // CSS class gives web addons (gray fill + horizontal padding + 1px\n // separator border on the input-facing edge). On web these defaults\n // come from CSS; on native we must apply them inline. Theme overrides\n // (`elStyles.leftAddon` / `rightAddon`) are spread LAST so per-instance\n // values always win. The separator border colour falls back to the\n // inputGroup border colour for visual continuity.\n const addonSeparatorColor = (\n (elStyles.inputGroup && elStyles.inputGroup.borderColor) ||\n resolveToken(\"border\")\n );\n const addonBaseStyle = {\n alignItems: \"center\" as const,\n justifyContent: \"center\" as const,\n paddingHorizontal: 12,\n paddingVertical: 8,\n backgroundColor: resolveToken(\"bg-input\"),\n };\n\n const contentElement = (\n <View style={inputGroupStyle}>\n {leftAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderEndWidth: 1,\n borderEndColor: addonSeparatorColor,\n ...(elStyles.leftAddon || {}),\n }}\n >\n {renderAddon(leftAddon)}\n </View>\n ) : null}\n\n {/* `justifyContent: 'center'` vertically centres the inner Input\n inside the 52px-tall inputGroup (matching web, where flex\n items default to vertical alignment via the inputGroup row\n + the input's intrinsic line-box centring). Without this,\n placeholders and selected values sat near the top edge of\n the input. Tall children that already fill the height\n (textarea) are unaffected because `justifyContent: 'center'`\n is a no-op on items that match the parent's cross-axis. */}\n <View style={{ flex: 1, justifyContent: 'center' }}>{children}</View>\n\n {rightAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderStartWidth: 1,\n borderStartColor: addonSeparatorColor,\n ...(elStyles.rightAddon || {}),\n }}\n >\n {renderAddon(rightAddon)}\n </View>\n ) : null}\n </View>\n );\n\n const containerRnStyle = useMemo(\n () => (containerStyle && Object.keys(containerStyle).length ? resolveStyle(containerStyle) : {}),\n [containerStyle],\n );\n\n return(\n <FormControl\n isInvalid={invalid}\n size=\"md\"\n isDisabled={disabled}\n isReadOnly={disabled}\n isRequired={required}\n style={{\n width:'100%', gap: 4,\n // `bare` strips the container's DEFAULT frame, but must not\n // override an explicit `container` slot. Spread it FIRST so a\n // user's borderRadius / borderWidth / overflow (e.g. an Object\n // or Group styled as a card) wins over the reset.\n ...(bare ? { borderWidth: 0, borderRadius: 0, overflow: 'visible' } : {}),\n ...(elStyles.container || {}),\n ...(containerRnStyle || {}),\n }}\n >\n {isHorizontal ? (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8, width: '100%' }}>\n {labelElement}\n <View style={{ flex: 1 }}>{contentElement}</View>\n </View>\n ) : isBottom ? (\n <>\n {contentElement}\n {labelElement}\n </>\n ) : (\n <>\n {labelElement}\n {contentElement}\n </>\n )}\n {helperText && typeof helperText !== \"function\" && <FormControlHelper>\n <FormControlHelperText style={{...(themedFont ? {fontFamily: themedFont} : {}), ...(elStyles.helperText || {})}}>\n {helperText}\n </FormControlHelperText>\n </FormControlHelper>}\n\n {!hideError && <ErrorMessage invalid={invalid} errors={errors} style={elStyles.error || undefined} />}\n </FormControl>\n )\n};\n\nexport default KitsContainer;\n"],"names":["useResolvedElementStyles","useKitsTheme","useThemedFont","uniqueId","useMemo","jsx","Label","Text","jsxs","View","resolveStyle","FormContro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O,UAAA,KAAe,UAAA,oBAAcP,cAAA,CAACQ,2BAChD,QAAA,kBAAAR,cAAA,CAACS,2BAAA,EAAA,EAAsB,KAAA,EAAO,EAAC,GAAI,UAAA,GAAa,EAAC,UAAA,EAAY,UAAA,EAAU,GAAI,EAAC,EAAI,GAAI,QAAA,CAAS,UAAA,IAAc,EAAC,EAAE,EACzG,QAAA,EAAA,UAAA,EACL,CAAA,EACJ,CAAA;AAAA,QAEC,CAAC,6BAAaT,cAAA,CAACU,2BAAA,EAAA,EAAa,SAAkB,MAAA,EAAgB,KAAA,EAAO,QAAA,CAAS,KAAA,IAAS,MAAA,EAAW;AAAA;AAAA;AAAA,GACvG;AAER;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../src/form/helpers/FormContainer/index.native.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useMemo } from \"react\";\nimport { View } from \"react-native\";\nimport { uniqueId } from \"lodash\";\nimport ErrorMessage from \"../ErrorMessage\";\nimport type {IKitsContainer} from \"@lmb-it/kitsconcerto-types\";\nimport {\n FormControl,\n FormControlHelper,\n FormControlHelperText,\n style as resolveStyle,\n} from \"@lmb-it/kitsconcertomobile\"\nimport { Label, Text, useKitsTheme } from \"../../../_compat\";\nimport {useResolvedElementStyles, useThemedFont} from \"@lmb-it/kitsconcerto/hooks\";\n\n/**\n * KitsContainer (native) — wraps all form inputs with label, addons, helper\n * text, and errors. Mirror of the web variant: a pure renderer that does NO\n * independent theme lookup. Every slot style comes from `elementStyles`\n * passed by the parent input (already merged through the\n * FormElement < Input/Select < InputText/DropdownSelect/… < per-instance slots\n * chain by the parent's `useComponentDefaults` call).\n *\n * Addon rendering is inlined here (matches web FormContainer). There is NO\n * `Addons` component on either platform anymore — the previous native Addons\n * helper re-resolved tokens and hardcoded `borderRadius / borderWidth /\n * padding / backgroundColor / borderColor` defaults that clobbered\n * `kitsTheme.components.*.leftAddon.style` overrides. Both bugs are fixed by\n * deleting the indirection.\n *\n * Element slots applied here (identical contract to web):\n * container → outer FormControl wrapper\n * label → Label component (plain Text path on native — see Label.native)\n * inputGroup → input group wrapper (around addons + input). On native this\n * wrapper carries the visual border that web gets from the\n * `.p-inputgroup` CSS class.\n * leftAddon → left addon View\n * rightAddon → right addon View\n * helperText → helper text below the group\n * error → error message below the group\n *\n * The `root` slot is NOT applied here — it is applied by the parent form\n * input component directly to the inner Input/Textarea element.\n */\nconst KitsContainer: FC<PropsWithChildren<IKitsContainer>> = (props) => {\n const {\n id,\n helperText,\n children,\n rightAddon,\n leftAddon,\n errors,\n invalid,\n required,\n hideError,\n label,\n isFloatedLabel,\n containerStyle,\n disabled,\n bare,\n elementStyles: parentElementStyles,\n } = props;\n\n // Pure renderer: resolve the elementStyles passed in by the parent.\n // No `useComponentDefaults('FormContainer', …)` lookup — that key is\n // intentionally not part of the consumer-facing theme contract.\n const elStyles = useResolvedElementStyles(parentElementStyles || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n // Generate a unique element ID (for parity with web; not used in native labels)\n const elementId = id ? `${id}_element` : uniqueId(\"element_\");\n\n // Derive label placement from the label prop\n const placement = useMemo(() => {\n if (label && typeof label === 'object' && 'placement' in label) {\n return label.placement; // \"RL\" | \"B\" | \"T\"\n }\n return \"T\"; // default: top\n }, [label]);\n\n // Determine layout direction based on placement\n // T = top (column, label first), B = bottom (column-reverse), RL = side-by-side (row)\n const isHorizontal = placement === \"RL\";\n const isBottom = placement === \"B\";\n\n // Label uses the plain Text path (NOT the FormControlLabel path) because\n // @lmb-it/kitsconcertomobile's FormControlLabelText strips arbitrary\n // inline styles, which broke `kitsTheme.components.Input.label.style`\n // overrides on native. The plain Text path forwards `style` directly.\n const labelElement = !isFloatedLabel ? (\n <Label label={label} elementId={elementId} required={required} style={elStyles.label || undefined} />\n ) : null;\n\n /**\n * Inline addon renderer. Mirrors the dispatch web uses in FormContainer\n * (string → text, ReactElement → element) AND adds the function-arg\n * branch native needs because lucide-react-native icons are passed as\n * functions `(props) => <Icon …/>`. The function-arg branch never runs\n * on web (web never goes through this code) so it cannot affect web.\n */\n const renderAddon = (\n addon: IKitsContainer[\"leftAddon\"] | IKitsContainer[\"rightAddon\"],\n ) => {\n if (!addon) return null;\n if (typeof addon === \"string\" || typeof addon === \"number\") {\n return <Text fontSize={14}>{addon}</Text>;\n }\n if (typeof addon === \"function\") {\n return (addon as (args: { size: number }) => React.ReactNode)({ size: 16 });\n }\n if (React.isValidElement(addon)) {\n return addon;\n }\n return null;\n };\n\n // Resolved inputGroup wrapper style. The default theme provides\n // `Input.inputGroup.style.{borderColor, borderRadius, borderWidth, height}`\n // — these are what give the group its visual frame. Defaults are layered\n // *under* the user's resolved style, so a per-instance override always wins.\n //\n // The `invalid` border color is applied as a fallback default (after\n // theme defaults, before user `inputGroup.borderColor` override). When\n // `bare` is set, the whole frame is suppressed (matches web's\n // `bareInputGroupStyle`).\n const inputGroupStyle = useMemo(() => {\n if (bare) {\n // Bare mode (FilePicker, Radio, Checkbox group, …): drop ALL\n // inputGroup chrome including `height: 52` from the theme. Web's\n // FormContainer does the same — it passes `style={{}}` when\n // bare (see helpers/FormContainer/index.web.tsx, the bare\n // branch of the row Flex). Without this, the non-classic file\n // uploader's 200px dashed drop zone was being squashed to 52px.\n return {\n width: \"100%\" as const,\n borderWidth: 0,\n borderRadius: 0,\n overflow: \"visible\" as const,\n };\n }\n const userStyle = elStyles.inputGroup || {};\n const userOverrodeBorderColor = \"borderColor\" in userStyle;\n return {\n width: \"100%\" as const,\n flexDirection: \"row\" as const,\n alignItems: \"stretch\" as const,\n overflow: \"hidden\" as const,\n ...userStyle,\n ...(invalid && !userOverrodeBorderColor\n ? { borderColor: resolveToken(\"danger\") }\n : {}),\n };\n }, [bare, elStyles.inputGroup, invalid, resolveToken]);\n\n // Addon baseline chrome — mirrors what PrimeReact's `.p-inputgroup-addon`\n // CSS class gives web addons (gray fill + horizontal padding + 1px\n // separator border on the input-facing edge). On web these defaults\n // come from CSS; on native we must apply them inline. Theme overrides\n // (`elStyles.leftAddon` / `rightAddon`) are spread LAST so per-instance\n // values always win. The separator border colour falls back to the\n // inputGroup border colour for visual continuity.\n const addonSeparatorColor = (\n (elStyles.inputGroup && elStyles.inputGroup.borderColor) ||\n resolveToken(\"border\")\n );\n const addonBaseStyle = {\n alignItems: \"center\" as const,\n justifyContent: \"center\" as const,\n paddingHorizontal: 12,\n paddingVertical: 8,\n backgroundColor: resolveToken(\"bg-input\"),\n };\n\n const contentElement = (\n <View style={inputGroupStyle}>\n {leftAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderEndWidth: 1,\n borderEndColor: addonSeparatorColor,\n ...(elStyles.leftAddon || {}),\n }}\n >\n {renderAddon(leftAddon)}\n </View>\n ) : null}\n\n {/* `justifyContent: 'center'` vertically centres the inner Input\n inside the 52px-tall inputGroup (matching web, where flex\n items default to vertical alignment via the inputGroup row\n + the input's intrinsic line-box centring). Without this,\n placeholders and selected values sat near the top edge of\n the input. Tall children that already fill the height\n (textarea) are unaffected because `justifyContent: 'center'`\n is a no-op on items that match the parent's cross-axis. */}\n <View style={{ flex: 1, justifyContent: 'center' }}>{children}</View>\n\n {rightAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderStartWidth: 1,\n borderStartColor: addonSeparatorColor,\n ...(elStyles.rightAddon || {}),\n }}\n >\n {renderAddon(rightAddon)}\n </View>\n ) : null}\n </View>\n );\n\n const containerRnStyle = useMemo(\n () => (containerStyle && Object.keys(containerStyle).length ? resolveStyle(containerStyle) : {}),\n [containerStyle],\n );\n\n return(\n <FormControl\n isInvalid={invalid}\n size=\"md\"\n isDisabled={disabled}\n isReadOnly={disabled}\n isRequired={required}\n style={{\n width:'100%', gap: 4,\n // `bare` strips the container's DEFAULT frame, but must not\n // override an explicit `container` slot. Spread it FIRST so a\n // user's borderRadius / borderWidth / overflow (e.g. an Object\n // or Group styled as a card) wins over the reset.\n ...(bare ? { borderWidth: 0, borderRadius: 0, overflow: 'visible' } : {}),\n ...(elStyles.container || {}),\n ...(containerRnStyle || {}),\n }}\n >\n {isHorizontal ? (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8, width: '100%' }}>\n {labelElement}\n <View style={{ flex: 1 }}>{contentElement}</View>\n </View>\n ) : isBottom ? (\n <>\n {contentElement}\n {labelElement}\n </>\n ) : (\n <>\n {labelElement}\n {contentElement}\n </>\n )}\n {helperText && typeof helperText !== \"function\" && <FormControlHelper>\n <FormControlHelperText style={{...(themedFont ? {fontFamily: themedFont} : {}), ...(elStyles.helperText || {})}}>\n {helperText}\n </FormControlHelperText>\n </FormControlHelper>}\n\n {!hideError && <ErrorMessage invalid={invalid} errors={errors} style={elStyles.error || undefined} />}\n </FormControl>\n )\n};\n\nexport default KitsContainer;\n"],"names":["useResolvedElementStyles","useKitsTheme","useThemedFont","uniqueId","useMemo","jsx","Label","Text","jsxs","View","resolveStyle","FormControl","Fragment","FormControlHelper","FormControlHelperText","ErrorMessage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,aAAA,GAAuD,CAAC,KAAA,KAAU;AACpE,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,cAAA;AAAA,IACA,cAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,aAAA,EAAe;AAAA,GACnB,GAAI,KAAA;AAKJ,EAAA,MAAM,QAAA,GAAWA,gCAAA,CAAyB,mBAAA,IAAuB,EAAE,CAAA;AACnE,EAAA,MAAM,EAAE,YAAA,EAAa,GAAIC,qCAAA,EAAa;AACtC,EAAA,MAAM,UAAA,GAAaC,sBAAc,MAAM,CAAA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ACGH,eAAA,CAACC,gBAAA,EAAA,EAAK,KAAA,EAAO,EAAE,aAAA,EAAe,KAAA,EAAO,UAAA,EAAY,QAAA,EAAU,GAAA,EAAK,CAAA,EAAG,KAAA,EAAO,MAAA,EAAO,EAC5E,QAAA,EAAA;AAAA,UAAA,YAAA;AAAA,yCACAA,gBAAA,EAAA,EAAK,KAAA,EAAO,EAAE,IAAA,EAAM,CAAA,IAAM,QAAA,EAAA,cAAA,EAAe;AAAA,SAAA,EAC9C,CAAA,GACA,2BACAD,eAAA,CAAAI,mBAAA,EAAA,EACK,QAAA,EAAA;AAAA,UAAA,cAAA;AAAA,UACA;AAAA,SAAA,EACL,oBAEAJ,eAAA,CAAAI,mBAAA,EAAA,EACK,QAAA,EAAA;AAAA,UAAA,YAAA;AAAA,UACA;AAAA,SAAA,EACL,CAAA;AAAA,QAEH,UAAA,IAAc,OAAO,UAAA,KAAe,UAAA,oBAAcP,cAAA,CAACQ,2BAChD,QAAA,kBAAAR,cAAA,CAACS,2BAAA,EAAA,EAAsB,KAAA,EAAO,EAAC,GAAI,UAAA,GAAa,EAAC,UAAA,EAAY,UAAA,EAAU,GAAI,EAAC,EAAI,GAAI,QAAA,CAAS,UAAA,IAAc,EAAC,EAAE,EACzG,QAAA,EAAA,UAAA,EACL,CAAA,EACJ,CAAA;AAAA,QAEC,CAAC,6BAAaT,cAAA,CAACU,2BAAA,EAAA,EAAa,SAAkB,MAAA,EAAgB,KAAA,EAAO,QAAA,CAAS,KAAA,IAAS,MAAA,EAAW;AAAA;AAAA;AAAA,GACvG;AAER;;;;"}
@@ -85,6 +85,7 @@ import '../../../apps/mobile/src/Core/Input/Field.js';
85
85
  import '../../../apps/mobile/src/Core/Input/Slot.js';
86
86
  import '../../../contexts/DialogContext.js';
87
87
  import '../../../contexts/PermissionsContext.js';
88
+ import '../../../contexts/BreadcrumbContext.js';
88
89
  import useResolvedElementStyles from '../../../hooks/useResolvedElementStyles.js';
89
90
  import useThemedFont from '../../../hooks/useThemedFont.js';
90
91
  import { useKitsTheme } from '../../../contexts/Theme/KitsThemeProvider.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/form/helpers/FormContainer/index.native.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useMemo } from \"react\";\nimport { View } from \"react-native\";\nimport { uniqueId } from \"lodash\";\nimport ErrorMessage from \"../ErrorMessage\";\nimport type {IKitsContainer} from \"@lmb-it/kitsconcerto-types\";\nimport {\n FormControl,\n FormControlHelper,\n FormControlHelperText,\n style as resolveStyle,\n} from \"@lmb-it/kitsconcertomobile\"\nimport { Label, Text, useKitsTheme } from \"../../../_compat\";\nimport {useResolvedElementStyles, useThemedFont} from \"@lmb-it/kitsconcerto/hooks\";\n\n/**\n * KitsContainer (native) — wraps all form inputs with label, addons, helper\n * text, and errors. Mirror of the web variant: a pure renderer that does NO\n * independent theme lookup. Every slot style comes from `elementStyles`\n * passed by the parent input (already merged through the\n * FormElement < Input/Select < InputText/DropdownSelect/… < per-instance slots\n * chain by the parent's `useComponentDefaults` call).\n *\n * Addon rendering is inlined here (matches web FormContainer). There is NO\n * `Addons` component on either platform anymore — the previous native Addons\n * helper re-resolved tokens and hardcoded `borderRadius / borderWidth /\n * padding / backgroundColor / borderColor` defaults that clobbered\n * `kitsTheme.components.*.leftAddon.style` overrides. Both bugs are fixed by\n * deleting the indirection.\n *\n * Element slots applied here (identical contract to web):\n * container → outer FormControl wrapper\n * label → Label component (plain Text path on native — see Label.native)\n * inputGroup → input group wrapper (around addons + input). On native this\n * wrapper carries the visual border that web gets from the\n * `.p-inputgroup` CSS class.\n * leftAddon → left addon View\n * rightAddon → right addon View\n * helperText → helper text below the group\n * error → error message below the group\n *\n * The `root` slot is NOT applied here — it is applied by the parent form\n * input component directly to the inner Input/Textarea element.\n */\nconst KitsContainer: FC<PropsWithChildren<IKitsContainer>> = (props) => {\n const {\n id,\n helperText,\n children,\n rightAddon,\n leftAddon,\n errors,\n invalid,\n required,\n hideError,\n label,\n isFloatedLabel,\n containerStyle,\n disabled,\n bare,\n elementStyles: parentElementStyles,\n } = props;\n\n // Pure renderer: resolve the elementStyles passed in by the parent.\n // No `useComponentDefaults('FormContainer', …)` lookup — that key is\n // intentionally not part of the consumer-facing theme contract.\n const elStyles = useResolvedElementStyles(parentElementStyles || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n // Generate a unique element ID (for parity with web; not used in native labels)\n const elementId = id ? `${id}_element` : uniqueId(\"element_\");\n\n // Derive label placement from the label prop\n const placement = useMemo(() => {\n if (label && typeof label === 'object' && 'placement' in label) {\n return label.placement; // \"RL\" | \"B\" | \"T\"\n }\n return \"T\"; // default: top\n }, [label]);\n\n // Determine layout direction based on placement\n // T = top (column, label first), B = bottom (column-reverse), RL = side-by-side (row)\n const isHorizontal = placement === \"RL\";\n const isBottom = placement === \"B\";\n\n // Label uses the plain Text path (NOT the FormControlLabel path) because\n // @lmb-it/kitsconcertomobile's FormControlLabelText strips arbitrary\n // inline styles, which broke `kitsTheme.components.Input.label.style`\n // overrides on native. The plain Text path forwards `style` directly.\n const labelElement = !isFloatedLabel ? (\n <Label label={label} elementId={elementId} required={required} style={elStyles.label || undefined} />\n ) : null;\n\n /**\n * Inline addon renderer. Mirrors the dispatch web uses in FormContainer\n * (string → text, ReactElement → element) AND adds the function-arg\n * branch native needs because lucide-react-native icons are passed as\n * functions `(props) => <Icon …/>`. The function-arg branch never runs\n * on web (web never goes through this code) so it cannot affect web.\n */\n const renderAddon = (\n addon: IKitsContainer[\"leftAddon\"] | IKitsContainer[\"rightAddon\"],\n ) => {\n if (!addon) return null;\n if (typeof addon === \"string\" || typeof addon === \"number\") {\n return <Text fontSize={14}>{addon}</Text>;\n }\n if (typeof addon === \"function\") {\n return (addon as (args: { size: number }) => React.ReactNode)({ size: 16 });\n }\n if (React.isValidElement(addon)) {\n return addon;\n }\n return null;\n };\n\n // Resolved inputGroup wrapper style. The default theme provides\n // `Input.inputGroup.style.{borderColor, borderRadius, borderWidth, height}`\n // — these are what give the group its visual frame. Defaults are layered\n // *under* the user's resolved style, so a per-instance override always wins.\n //\n // The `invalid` border color is applied as a fallback default (after\n // theme defaults, before user `inputGroup.borderColor` override). When\n // `bare` is set, the whole frame is suppressed (matches web's\n // `bareInputGroupStyle`).\n const inputGroupStyle = useMemo(() => {\n if (bare) {\n // Bare mode (FilePicker, Radio, Checkbox group, …): drop ALL\n // inputGroup chrome including `height: 52` from the theme. Web's\n // FormContainer does the same — it passes `style={{}}` when\n // bare (see helpers/FormContainer/index.web.tsx, the bare\n // branch of the row Flex). Without this, the non-classic file\n // uploader's 200px dashed drop zone was being squashed to 52px.\n return {\n width: \"100%\" as const,\n borderWidth: 0,\n borderRadius: 0,\n overflow: \"visible\" as const,\n };\n }\n const userStyle = elStyles.inputGroup || {};\n const userOverrodeBorderColor = \"borderColor\" in userStyle;\n return {\n width: \"100%\" as const,\n flexDirection: \"row\" as const,\n alignItems: \"stretch\" as const,\n overflow: \"hidden\" as const,\n ...userStyle,\n ...(invalid && !userOverrodeBorderColor\n ? { borderColor: resolveToken(\"danger\") }\n : {}),\n };\n }, [bare, elStyles.inputGroup, invalid, resolveToken]);\n\n // Addon baseline chrome — mirrors what PrimeReact's `.p-inputgroup-addon`\n // CSS class gives web addons (gray fill + horizontal padding + 1px\n // separator border on the input-facing edge). On web these defaults\n // come from CSS; on native we must apply them inline. Theme overrides\n // (`elStyles.leftAddon` / `rightAddon`) are spread LAST so per-instance\n // values always win. The separator border colour falls back to the\n // inputGroup border colour for visual continuity.\n const addonSeparatorColor = (\n (elStyles.inputGroup && elStyles.inputGroup.borderColor) ||\n resolveToken(\"border\")\n );\n const addonBaseStyle = {\n alignItems: \"center\" as const,\n justifyContent: \"center\" as const,\n paddingHorizontal: 12,\n paddingVertical: 8,\n backgroundColor: resolveToken(\"bg-input\"),\n };\n\n const contentElement = (\n <View style={inputGroupStyle}>\n {leftAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderEndWidth: 1,\n borderEndColor: addonSeparatorColor,\n ...(elStyles.leftAddon || {}),\n }}\n >\n {renderAddon(leftAddon)}\n </View>\n ) : null}\n\n {/* `justifyContent: 'center'` vertically centres the inner Input\n inside the 52px-tall inputGroup (matching web, where flex\n items default to vertical alignment via the inputGroup row\n + the input's intrinsic line-box centring). Without this,\n placeholders and selected values sat near the top edge of\n the input. Tall children that already fill the height\n (textarea) are unaffected because `justifyContent: 'center'`\n is a no-op on items that match the parent's cross-axis. */}\n <View style={{ flex: 1, justifyContent: 'center' }}>{children}</View>\n\n {rightAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderStartWidth: 1,\n borderStartColor: addonSeparatorColor,\n ...(elStyles.rightAddon || {}),\n }}\n >\n {renderAddon(rightAddon)}\n </View>\n ) : null}\n </View>\n );\n\n const containerRnStyle = useMemo(\n () => (containerStyle && Object.keys(containerStyle).length ? resolveStyle(containerStyle) : {}),\n [containerStyle],\n );\n\n return(\n <FormControl\n isInvalid={invalid}\n size=\"md\"\n isDisabled={disabled}\n isReadOnly={disabled}\n isRequired={required}\n style={{\n width:'100%', gap: 4,\n // `bare` strips the container's DEFAULT frame, but must not\n // override an explicit `container` slot. Spread it FIRST so a\n // user's borderRadius / borderWidth / overflow (e.g. an Object\n // or Group styled as a card) wins over the reset.\n ...(bare ? { borderWidth: 0, borderRadius: 0, overflow: 'visible' } : {}),\n ...(elStyles.container || {}),\n ...(containerRnStyle || {}),\n }}\n >\n {isHorizontal ? (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8, width: '100%' }}>\n {labelElement}\n <View style={{ flex: 1 }}>{contentElement}</View>\n </View>\n ) : isBottom ? (\n <>\n {contentElement}\n {labelElement}\n </>\n ) : (\n <>\n {labelElement}\n {contentElement}\n </>\n )}\n {helperText && typeof helperText !== \"function\" && <FormControlHelper>\n <FormControlHelperText style={{...(themedFont ? {fontFamily: themedFont} : {}), ...(elStyles.helperText || {})}}>\n {helperText}\n </FormControlHelperText>\n </FormControlHelper>}\n\n {!hideError && <ErrorMessage invalid={invalid} errors={errors} style={elStyles.error || undefined} />}\n </FormControl>\n )\n};\n\nexport default KitsContainer;\n"],"names":["resolveStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,aAAA,GAAuD,CAAC,KAAA,KAAU;AACpE,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,cAAA;AAAA,IACA,cAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,aAAA,EAAe;AAAA,GACnB,GAAI,KAAA;AAKJ,EAAA,MAAM,QAAA,GAAW,wBAAA,CAAyB,mBAAA,IAAuB,EAAE,CAAA;AACnE,EAAA,MAAM,EAAE,YAAA,EAAa,GAAI,YAAA,EAAa;AACtC,EAAA,MAAM,UAAA,GAAa,cAAc,MAAM,CAAA;AAGvC,EAAA,MAAM,YAAY,EAAA,GAAK,CAAA,EAAG,EAAE,CAAA,QAAA,CAAA,GAAa,SAAS,UAAU,CAAA;AAG5D,EAAA,MAAM,SAAA,GAAY,QAAQ,MAAM;AAC5B,IAAA,IAAI,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,IAAY,eAAe,KAAA,EAAO;AAC5D,MAAA,OAAO,KAAA,CAAM,SAAA;AAAA,IACjB;AACA,IAAA,OAAO,GAAA;AAAA,EACX,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AAIV,EAAA,MAAM,eAAe,SAAA,KAAc,IAAA;AACnC,EAAA,MAAM,WAAW,SAAA,KAAc,GAAA;AAM/B,EAAA,MAAM,YAAA,GAAe,CAAC,cAAA,mBAClB,GAAA,C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A,QAEH,UAAA,IAAc,OAAO,UAAA,KAAe,UAAA,oBAAc,GAAA,CAAC,qBAChD,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAsB,KAAA,EAAO,EAAC,GAAI,UAAA,GAAa,EAAC,UAAA,EAAY,UAAA,EAAU,GAAI,EAAC,EAAI,GAAI,QAAA,CAAS,UAAA,IAAc,EAAC,EAAE,EACzG,QAAA,EAAA,UAAA,EACL,CAAA,EACJ,CAAA;AAAA,QAEC,CAAC,6BAAa,GAAA,CAAC,YAAA,EAAA,EAAa,SAAkB,MAAA,EAAgB,KAAA,EAAO,QAAA,CAAS,KAAA,IAAS,MAAA,EAAW;AAAA;AAAA;AAAA,GACvG;AAER;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/form/helpers/FormContainer/index.native.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useMemo } from \"react\";\nimport { View } from \"react-native\";\nimport { uniqueId } from \"lodash\";\nimport ErrorMessage from \"../ErrorMessage\";\nimport type {IKitsContainer} from \"@lmb-it/kitsconcerto-types\";\nimport {\n FormControl,\n FormControlHelper,\n FormControlHelperText,\n style as resolveStyle,\n} from \"@lmb-it/kitsconcertomobile\"\nimport { Label, Text, useKitsTheme } from \"../../../_compat\";\nimport {useResolvedElementStyles, useThemedFont} from \"@lmb-it/kitsconcerto/hooks\";\n\n/**\n * KitsContainer (native) — wraps all form inputs with label, addons, helper\n * text, and errors. Mirror of the web variant: a pure renderer that does NO\n * independent theme lookup. Every slot style comes from `elementStyles`\n * passed by the parent input (already merged through the\n * FormElement < Input/Select < InputText/DropdownSelect/… < per-instance slots\n * chain by the parent's `useComponentDefaults` call).\n *\n * Addon rendering is inlined here (matches web FormContainer). There is NO\n * `Addons` component on either platform anymore — the previous native Addons\n * helper re-resolved tokens and hardcoded `borderRadius / borderWidth /\n * padding / backgroundColor / borderColor` defaults that clobbered\n * `kitsTheme.components.*.leftAddon.style` overrides. Both bugs are fixed by\n * deleting the indirection.\n *\n * Element slots applied here (identical contract to web):\n * container → outer FormControl wrapper\n * label → Label component (plain Text path on native — see Label.native)\n * inputGroup → input group wrapper (around addons + input). On native this\n * wrapper carries the visual border that web gets from the\n * `.p-inputgroup` CSS class.\n * leftAddon → left addon View\n * rightAddon → right addon View\n * helperText → helper text below the group\n * error → error message below the group\n *\n * The `root` slot is NOT applied here — it is applied by the parent form\n * input component directly to the inner Input/Textarea element.\n */\nconst KitsContainer: FC<PropsWithChildren<IKitsContainer>> = (props) => {\n const {\n id,\n helperText,\n children,\n rightAddon,\n leftAddon,\n errors,\n invalid,\n required,\n hideError,\n label,\n isFloatedLabel,\n containerStyle,\n disabled,\n bare,\n elementStyles: parentElementStyles,\n } = props;\n\n // Pure renderer: resolve the elementStyles passed in by the parent.\n // No `useComponentDefaults('FormContainer', …)` lookup — that key is\n // intentionally not part of the consumer-facing theme contract.\n const elStyles = useResolvedElementStyles(parentElementStyles || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n // Generate a unique element ID (for parity with web; not used in native labels)\n const elementId = id ? `${id}_element` : uniqueId(\"element_\");\n\n // Derive label placement from the label prop\n const placement = useMemo(() => {\n if (label && typeof label === 'object' && 'placement' in label) {\n return label.placement; // \"RL\" | \"B\" | \"T\"\n }\n return \"T\"; // default: top\n }, [label]);\n\n // Determine layout direction based on placement\n // T = top (column, label first), B = bottom (column-reverse), RL = side-by-side (row)\n const isHorizontal = placement === \"RL\";\n const isBottom = placement === \"B\";\n\n // Label uses the plain Text path (NOT the FormControlLabel path) because\n // @lmb-it/kitsconcertomobile's FormControlLabelText strips arbitrary\n // inline styles, which broke `kitsTheme.components.Input.label.style`\n // overrides on native. The plain Text path forwards `style` directly.\n const labelElement = !isFloatedLabel ? (\n <Label label={label} elementId={elementId} required={required} style={elStyles.label || undefined} />\n ) : null;\n\n /**\n * Inline addon renderer. Mirrors the dispatch web uses in FormContainer\n * (string → text, ReactElement → element) AND adds the function-arg\n * branch native needs because lucide-react-native icons are passed as\n * functions `(props) => <Icon …/>`. The function-arg branch never runs\n * on web (web never goes through this code) so it cannot affect web.\n */\n const renderAddon = (\n addon: IKitsContainer[\"leftAddon\"] | IKitsContainer[\"rightAddon\"],\n ) => {\n if (!addon) return null;\n if (typeof addon === \"string\" || typeof addon === \"number\") {\n return <Text fontSize={14}>{addon}</Text>;\n }\n if (typeof addon === \"function\") {\n return (addon as (args: { size: number }) => React.ReactNode)({ size: 16 });\n }\n if (React.isValidElement(addon)) {\n return addon;\n }\n return null;\n };\n\n // Resolved inputGroup wrapper style. The default theme provides\n // `Input.inputGroup.style.{borderColor, borderRadius, borderWidth, height}`\n // — these are what give the group its visual frame. Defaults are layered\n // *under* the user's resolved style, so a per-instance override always wins.\n //\n // The `invalid` border color is applied as a fallback default (after\n // theme defaults, before user `inputGroup.borderColor` override). When\n // `bare` is set, the whole frame is suppressed (matches web's\n // `bareInputGroupStyle`).\n const inputGroupStyle = useMemo(() => {\n if (bare) {\n // Bare mode (FilePicker, Radio, Checkbox group, …): drop ALL\n // inputGroup chrome including `height: 52` from the theme. Web's\n // FormContainer does the same — it passes `style={{}}` when\n // bare (see helpers/FormContainer/index.web.tsx, the bare\n // branch of the row Flex). Without this, the non-classic file\n // uploader's 200px dashed drop zone was being squashed to 52px.\n return {\n width: \"100%\" as const,\n borderWidth: 0,\n borderRadius: 0,\n overflow: \"visible\" as const,\n };\n }\n const userStyle = elStyles.inputGroup || {};\n const userOverrodeBorderColor = \"borderColor\" in userStyle;\n return {\n width: \"100%\" as const,\n flexDirection: \"row\" as const,\n alignItems: \"stretch\" as const,\n overflow: \"hidden\" as const,\n ...userStyle,\n ...(invalid && !userOverrodeBorderColor\n ? { borderColor: resolveToken(\"danger\") }\n : {}),\n };\n }, [bare, elStyles.inputGroup, invalid, resolveToken]);\n\n // Addon baseline chrome — mirrors what PrimeReact's `.p-inputgroup-addon`\n // CSS class gives web addons (gray fill + horizontal padding + 1px\n // separator border on the input-facing edge). On web these defaults\n // come from CSS; on native we must apply them inline. Theme overrides\n // (`elStyles.leftAddon` / `rightAddon`) are spread LAST so per-instance\n // values always win. The separator border colour falls back to the\n // inputGroup border colour for visual continuity.\n const addonSeparatorColor = (\n (elStyles.inputGroup && elStyles.inputGroup.borderColor) ||\n resolveToken(\"border\")\n );\n const addonBaseStyle = {\n alignItems: \"center\" as const,\n justifyContent: \"center\" as const,\n paddingHorizontal: 12,\n paddingVertical: 8,\n backgroundColor: resolveToken(\"bg-input\"),\n };\n\n const contentElement = (\n <View style={inputGroupStyle}>\n {leftAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderEndWidth: 1,\n borderEndColor: addonSeparatorColor,\n ...(elStyles.leftAddon || {}),\n }}\n >\n {renderAddon(leftAddon)}\n </View>\n ) : null}\n\n {/* `justifyContent: 'center'` vertically centres the inner Input\n inside the 52px-tall inputGroup (matching web, where flex\n items default to vertical alignment via the inputGroup row\n + the input's intrinsic line-box centring). Without this,\n placeholders and selected values sat near the top edge of\n the input. Tall children that already fill the height\n (textarea) are unaffected because `justifyContent: 'center'`\n is a no-op on items that match the parent's cross-axis. */}\n <View style={{ flex: 1, justifyContent: 'center' }}>{children}</View>\n\n {rightAddon ? (\n <View\n style={{\n ...addonBaseStyle,\n borderStartWidth: 1,\n borderStartColor: addonSeparatorColor,\n ...(elStyles.rightAddon || {}),\n }}\n >\n {renderAddon(rightAddon)}\n </View>\n ) : null}\n </View>\n );\n\n const containerRnStyle = useMemo(\n () => (containerStyle && Object.keys(containerStyle).length ? resolveStyle(containerStyle) : {}),\n [containerStyle],\n );\n\n return(\n <FormControl\n isInvalid={invalid}\n size=\"md\"\n isDisabled={disabled}\n isReadOnly={disabled}\n isRequired={required}\n style={{\n width:'100%', gap: 4,\n // `bare` strips the container's DEFAULT frame, but must not\n // override an explicit `container` slot. Spread it FIRST so a\n // user's borderRadius / borderWidth / overflow (e.g. an Object\n // or Group styled as a card) wins over the reset.\n ...(bare ? { borderWidth: 0, borderRadius: 0, overflow: 'visible' } : {}),\n ...(elStyles.container || {}),\n ...(containerRnStyle || {}),\n }}\n >\n {isHorizontal ? (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8, width: '100%' }}>\n {labelElement}\n <View style={{ flex: 1 }}>{contentElement}</View>\n </View>\n ) : isBottom ? (\n <>\n {contentElement}\n {labelElement}\n </>\n ) : (\n <>\n {labelElement}\n {contentElement}\n </>\n )}\n {helperText && typeof helperText !== \"function\" && <FormControlHelper>\n <FormControlHelperText style={{...(themedFont ? {fontFamily: themedFont} : {}), ...(elStyles.helperText || {})}}>\n {helperText}\n </FormControlHelperText>\n </FormControlHelper>}\n\n {!hideError && <ErrorMessage invalid={invalid} errors={errors} style={elStyles.error || undefined} />}\n </FormControl>\n )\n};\n\nexport default KitsContainer;\n"],"names":["resolveStyle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,aAAA,GAAuD,CAAC,KAAA,KAAU;AACpE,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,cAAA;AAAA,IACA,cAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,aAAA,EAAe;AAAA,GACnB,GAAI,KAAA;AAKJ,EAAA,MAAM,QAAA,GAAW,wBAAA,CAAyB,mBAAA,IAAuB,EAAE,CAAA;AACnE,EAAA,MAAM,EAAE,YAAA,EAAa,GAAI,YAAA,EAAa;AACtC,EAAA,MAAM,UAAA,GAAa,cAAc,MAAM,CAAA;AAGvC,EAAA,MAAM,YAAY,EAAA,GAAK,CAAA,EAAG,EAAE,CAAA,QAAA,CAAA,GAAa,SAAS,UAAU,CAAA;AAG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AA,EAAO,MAAA,EAAO,EAC5E,QAAA,EAAA;AAAA,UAAA,YAAA;AAAA,8BACA,IAAA,EAAA,EAAK,KAAA,EAAO,EAAE,IAAA,EAAM,CAAA,IAAM,QAAA,EAAA,cAAA,EAAe;AAAA,SAAA,EAC9C,CAAA,GACA,2BACA,IAAA,CAAA,QAAA,EAAA,EACK,QAAA,EAAA;AAAA,UAAA,cAAA;AAAA,UACA;AAAA,SAAA,EACL,oBAEA,IAAA,CAAA,QAAA,EAAA,EACK,QAAA,EAAA;AAAA,UAAA,YAAA;AAAA,UACA;AAAA,SAAA,EACL,CAAA;AAAA,QAEH,UAAA,IAAc,OAAO,UAAA,KAAe,UAAA,oBAAc,GAAA,CAAC,qBAChD,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAsB,KAAA,EAAO,EAAC,GAAI,UAAA,GAAa,EAAC,UAAA,EAAY,UAAA,EAAU,GAAI,EAAC,EAAI,GAAI,QAAA,CAAS,UAAA,IAAc,EAAC,EAAE,EACzG,QAAA,EAAA,UAAA,EACL,CAAA,EACJ,CAAA;AAAA,QAEC,CAAC,6BAAa,GAAA,CAAC,YAAA,EAAA,EAAa,SAAkB,MAAA,EAAgB,KAAA,EAAO,QAAA,CAAS,KAAA,IAAS,MAAA,EAAW;AAAA;AAAA;AAAA,GACvG;AAER;;;;"}
@@ -11,6 +11,7 @@ var useFormInputController_native = require('../../helpers/useFormInputControlle
11
11
  var colorPickerStyle_native = require('./colorPickerStyle.cjs');
12
12
  require('../../../contexts/DialogContext.cjs');
13
13
  require('../../../contexts/PermissionsContext.cjs');
14
+ require('../../../contexts/BreadcrumbContext.cjs');
14
15
  var useComponentDefaults = require('../../../hooks/useComponentDefaults.cjs');
15
16
  var useResolvedStyle = require('../../../hooks/useResolvedStyle.cjs');
16
17
  var KitsThemeProvider_native = require('../../../contexts/Theme/KitsThemeProvider.cjs');
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../src/form/inputs/ColorPicker/index.native.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport { View } from \"react-native\";\nimport ColorPicker, { colorKit, HueSlider, OpacitySlider, Panel1, PreviewText, Swatches, type ColorFormatsObject } from 'reanimated-color-picker';\nimport type { IKitsInputColorPicker } from \"@lmb-it/kitsconcerto-types\";\nimport KitsContainer from \"../../helpers/FormContainer\";\nimport { useFormInputController } from \"../../helpers/useFormInputController\";\nimport { createColorPickerStyle } from './colorPickerStyle';\nimport {useComponentDefaults, useResolvedStyle} from \"@lmb-it/kitsconcerto/hooks\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\n\nconst KitsInputColorPicker = ({ ref, ...rawProps }: IKitsInputColorPicker) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults('ColorPicker', rawProps, 'Input');\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const {resolveToken} = useKitsTheme();\n const colorPickerStyle = createColorPickerStyle(resolveToken);\n const {\n id,\n label,\n required,\n disabled,\n errors,\n invalid,\n helperText,\n value,\n defaultValue,\n onChange,\n leftAddon,\n rightAddon,\n colorFormat, // optional: may not be used directly in reanimated-color-picker\n localProps = {},\n ...rest\n } = props;\n\n const customSwatches = new Array(6).fill('#fff').map(() => colorKit.randomRgbColor().hex());\n\n const [resultColor, setResultColor] = useState(customSwatches[0]);\n\n\n\n // Unified controlled/uncontrolled logic\n const { value: displayValue, emitChange, onWorkletChange, currentReanimatedValue } = useFormInputController<any>({\n value,\n defaultValue,\n onChange\n });\n\n const onColorChange = (color: ColorFormatsObject) => {\n 'worklet';\n onWorkletChange(color.hex);\n };\n\n\n return (\n <KitsContainer\n id={id}\n label={label}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n disabled={disabled}\n required={required}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n elementStyles={elementStyles}\n >\n {/* Addons are rendered by KitsContainer (matches every other input\n + web behaviour). This component owns only the picker surface. */}\n <View style={{ width: \"100%\", ...(resolvedRootStyle && Object.keys(resolvedRootStyle).length > 0 ? resolvedRootStyle : resolvedThemeStyle) }}>\n <ColorPicker\n value={resultColor}\n sliderThickness={25}\n thumbSize={24}\n thumbShape='circle'\n onChange={onColorChange}\n onCompleteJS={(color: ColorFormatsObject)=>emitChange(color.hex)}\n style={colorPickerStyle.picker}\n boundedThumb\n >\n <Panel1 style={colorPickerStyle.panelStyle} />\n <HueSlider style={colorPickerStyle.sliderStyle} />\n <OpacitySlider style={colorPickerStyle.sliderStyle} />\n\n {/*<Divider />*/}\n <Swatches\n style={colorPickerStyle.swatchesContainer}\n swatchStyle={colorPickerStyle.swatchStyle}\n colors={customSwatches}\n />\n {/*<Divider />*/}\n\n <PreviewText style={colorPickerStyle.previewTxt} colorFormat='hwba' />\n </ColorPicker>\n </View>\n </KitsContainer>\n );\n};\n\nexport default KitsInputColorPicker;\n"],"names":["useComponentDefaults","useResolvedStyle","useKitsTheme","createColorPickerStyle","colorKit","useState","useFormInputController","jsx","KitsContainer","View","jsxs","Panel1","HueSlider","OpacitySlider","Swatches","PreviewText"],"mappings":";;;;;;;;;;;;;;;;;AAUA,MAAM,uBAAuB,CAAC,EAAE,GAAA,EAAK,GAAG,UAAS,KAA6B;AAC1E,EAAA,MAAM,EAAE,aAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAIA,4BAAA,CAAqB,aAAA,EAAe,QAAA,EAAU,OAAO,CAAA;AAC/G,EAAA,MAAM,kBAAA,GAAqBC,yBAAiB,UAAU,CAAA;AACtD,EAAA,MAAM,iBAAA,GAAoBA,wBAAA,CAAiB,aAAA,EAAe,IAAA,IAAQ,EAAE,CAAA;AACpE,EAAA,MAAM,EAAC,YAAA,EAAY,GAAIC,qCAAA,EAAa;AACpC,EAAA,MAAM,gBAAA,GAAmBC,+CAAuB,YAAY,CAAA;AAC5D,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AA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A,EAAiB,EAAA;AAAA,UACjB,SAAA,EAAW,EAAA;AAAA,UACX,UAAA,EAAW,QAAA;AAAA,UACX,QAAA,EAAU,aAAA;AAAA,UACV,YAAA,EAAc,CAAC,KAAA,KAA4B,UAAA,CAAW,MAAM,GAAG,CAAA;AAAA,UAC/D,OAAO,gBAAA,CAAiB,MAAA;AAAA,UACxB,YAAA,EAAY,IAAA;AAAA,UAEZ,QAAA,EAAA;AAAA,4BAAAH,cAAA,CAACI,kBAAA,EAAA,EAAO,KAAA,EAAO,gBAAA,CAAiB,UAAA,EAAY,CAAA;AAAA,4BAC5CJ,cAAA,CAACK,qBAAA,EAAA,EAAU,KAAA,EAAO,gBAAA,CAAiB,WAAA,EAAa,CAAA;AAAA,4BAChDL,cAAA,CAACM,yBAAA,EAAA,EAAc,KAAA,EAAO,gBAAA,CAAiB,WAAA,EAAa,CAAA;AAAA,4BAGpDN,cAAA;AAAA,cAACO,oBAAA;AAAA,cAAA;AAAA,gBACG,OAAO,gBAAA,CAAiB,iBAAA;AAAA,gBACxB,aAAa,gBAAA,CAAiB,WAAA;AAAA,gBAC9B,MAAA,EAAQ;AAAA;AAAA,aACZ;AAAA,2CAGCC,uBAAA,EAAA,EAAY,KAAA,EAAO,gBAAA,CAAiB,UAAA,EAAY,aAAY,MAAA,EAAO;AAAA;AAAA;AAAA,OACxE,EACJ;AAAA;AAAA,GACJ;AAER;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../src/form/inputs/ColorPicker/index.native.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport { View } from \"react-native\";\nimport ColorPicker, { colorKit, HueSlider, OpacitySlider, Panel1, PreviewText, Swatches, type ColorFormatsObject } from 'reanimated-color-picker';\nimport type { IKitsInputColorPicker } from \"@lmb-it/kitsconcerto-types\";\nimport KitsContainer from \"../../helpers/FormContainer\";\nimport { useFormInputController } from \"../../helpers/useFormInputController\";\nimport { createColorPickerStyle } from './colorPickerStyle';\nimport {useComponentDefaults, useResolvedStyle} from \"@lmb-it/kitsconcerto/hooks\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\n\nconst KitsInputColorPicker = ({ ref, ...rawProps }: IKitsInputColorPicker) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults('ColorPicker', rawProps, 'Input');\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const {resolveToken} = useKitsTheme();\n const colorPickerStyle = createColorPickerStyle(resolveToken);\n const {\n id,\n label,\n required,\n disabled,\n errors,\n invalid,\n helperText,\n value,\n defaultValue,\n onChange,\n leftAddon,\n rightAddon,\n colorFormat, // optional: may not be used directly in reanimated-color-picker\n localProps = {},\n ...rest\n } = props;\n\n const customSwatches = new Array(6).fill('#fff').map(() => colorKit.randomRgbColor().hex());\n\n const [resultColor, setResultColor] = useState(customSwatches[0]);\n\n\n\n // Unified controlled/uncontrolled logic\n const { value: displayValue, emitChange, onWorkletChange, currentReanimatedValue } = useFormInputController<any>({\n value,\n defaultValue,\n onChange\n });\n\n const onColorChange = (color: ColorFormatsObject) => {\n 'worklet';\n onWorkletChange(color.hex);\n };\n\n\n return (\n <KitsContainer\n id={id}\n label={label}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n disabled={disabled}\n required={required}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n elementStyles={elementStyles}\n >\n {/* Addons are rendered by KitsContainer (matches every other input\n + web behaviour). This component owns only the picker surface. */}\n <View style={{ width: \"100%\", ...(resolvedRootStyle && Object.keys(resolvedRootStyle).length > 0 ? resolvedRootStyle : resolvedThemeStyle) }}>\n <ColorPicker\n value={resultColor}\n sliderThickness={25}\n thumbSize={24}\n thumbShape='circle'\n onChange={onColorChange}\n onCompleteJS={(color: ColorFormatsObject)=>emitChange(color.hex)}\n style={colorPickerStyle.picker}\n boundedThumb\n >\n <Panel1 style={colorPickerStyle.panelStyle} />\n <HueSlider style={colorPickerStyle.sliderStyle} />\n <OpacitySlider style={colorPickerStyle.sliderStyle} />\n\n {/*<Divider />*/}\n <Swatches\n style={colorPickerStyle.swatchesContainer}\n swatchStyle={colorPickerStyle.swatchStyle}\n colors={customSwatches}\n />\n {/*<Divider />*/}\n\n <PreviewText style={colorPickerStyle.previewTxt} colorFormat='hwba' />\n </ColorPicker>\n </View>\n </KitsContainer>\n );\n};\n\nexport default KitsInputColorPicker;\n"],"names":["useComponentDefaults","useResolvedStyle","useKitsTheme","createColorPickerStyle","colorKit","useState","useFormInputController","jsx","KitsContainer","View","jsxs","Panel1","HueSlider","OpacitySlider","Swatches","PreviewText"],"mappings":";;;;;;;;;;;;;;;;;;AAUA,MAAM,uBAAuB,CAAC,EAAE,GAAA,EAAK,GAAG,UAAS,KAA6B;AAC1E,EAAA,MAAM,EAAE,aAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAIA,4BAAA,CAAqB,aAAA,EAAe,QAAA,EAAU,OAAO,CAAA;AAC/G,EAAA,MAAM,kBAAA,GAAqBC,yBAAiB,UAAU,CAAA;AACtD,EAAA,MAAM,iBAAA,GAAoBA,wBAAA,CAAiB,aAAA,EAAe,IAAA,IAAQ,EAAE,CAAA;AACpE,EAAA,MAAM,EAAC,YAAA,EAAY,GAAIC,qCAAA,EAAa;AACpC,EAAA,MAAM,gBAAA,GAAmBC,+CAAuB,YAAY,CAAA;AAC5D,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA;AAAA,IACA,aAAa,EAAC;AAAA,IACd,GAAG;AAAA,GACP,GAAI,KAAA;AAEJ,EAAA,MAAM,cAAA,GAAiB,IAAI,KAAA,CAAM,CAAC,EAAE,IAAA,CAAK,MAAM,CAAA,CA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AA,EAAO,KAAA,EAAO,gBAAA,CAAiB,UAAA,EAAY,CAAA;AAAA,4BAC5CJ,cAAA,CAACK,qBAAA,EAAA,EAAU,KAAA,EAAO,gBAAA,CAAiB,WAAA,EAAa,CAAA;AAAA,4BAChDL,cAAA,CAACM,yBAAA,EAAA,EAAc,KAAA,EAAO,gBAAA,CAAiB,WAAA,EAAa,CAAA;AAAA,4BAGpDN,cAAA;AAAA,cAACO,oBAAA;AAAA,cAAA;AAAA,gBACG,OAAO,gBAAA,CAAiB,iBAAA;AAAA,gBACxB,aAAa,gBAAA,CAAiB,WAAA;AAAA,gBAC9B,MAAA,EAAQ;AAAA;AAAA,aACZ;AAAA,2CAGCC,uBAAA,EAAA,EAAY,KAAA,EAAO,gBAAA,CAAiB,UAAA,EAAY,aAAY,MAAA,EAAO;AAAA;AAAA;AAAA,OACxE,EACJ;AAAA;AAAA,GACJ;AAER;;;;"}
@@ -7,6 +7,7 @@ import { useFormInputController } from '../../helpers/useFormInputController/use
7
7
  import { createColorPickerStyle } from './colorPickerStyle.js';
8
8
  import '../../../contexts/DialogContext.js';
9
9
  import '../../../contexts/PermissionsContext.js';
10
+ import '../../../contexts/BreadcrumbContext.js';
10
11
  import useComponentDefaults from '../../../hooks/useComponentDefaults.js';
11
12
  import useResolvedStyle from '../../../hooks/useResolvedStyle.js';
12
13
  import { useKitsTheme } from '../../../contexts/Theme/KitsThemeProvider.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/form/inputs/ColorPicker/index.native.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport { View } from \"react-native\";\nimport ColorPicker, { colorKit, HueSlider, OpacitySlider, Panel1, PreviewText, Swatches, type ColorFormatsObject } from 'reanimated-color-picker';\nimport type { IKitsInputColorPicker } from \"@lmb-it/kitsconcerto-types\";\nimport KitsContainer from \"../../helpers/FormContainer\";\nimport { useFormInputController } from \"../../helpers/useFormInputController\";\nimport { createColorPickerStyle } from './colorPickerStyle';\nimport {useComponentDefaults, useResolvedStyle} from \"@lmb-it/kitsconcerto/hooks\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\n\nconst KitsInputColorPicker = ({ ref, ...rawProps }: IKitsInputColorPicker) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults('ColorPicker', rawProps, 'Input');\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const {resolveToken} = useKitsTheme();\n const colorPickerStyle = createColorPickerStyle(resolveToken);\n const {\n id,\n label,\n required,\n disabled,\n errors,\n invalid,\n helperText,\n value,\n defaultValue,\n onChange,\n leftAddon,\n rightAddon,\n colorFormat, // optional: may not be used directly in reanimated-color-picker\n localProps = {},\n ...rest\n } = props;\n\n const customSwatches = new Array(6).fill('#fff').map(() => colorKit.randomRgbColor().hex());\n\n const [resultColor, setResultColor] = useState(customSwatches[0]);\n\n\n\n // Unified controlled/uncontrolled logic\n const { value: displayValue, emitChange, onWorkletChange, currentReanimatedValue } = useFormInputController<any>({\n value,\n defaultValue,\n onChange\n });\n\n const onColorChange = (color: ColorFormatsObject) => {\n 'worklet';\n onWorkletChange(color.hex);\n };\n\n\n return (\n <KitsContainer\n id={id}\n label={label}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n disabled={disabled}\n required={required}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n elementStyles={elementStyles}\n >\n {/* Addons are rendered by KitsContainer (matches every other input\n + web behaviour). This component owns only the picker surface. */}\n <View style={{ width: \"100%\", ...(resolvedRootStyle && Object.keys(resolvedRootStyle).length > 0 ? resolvedRootStyle : resolvedThemeStyle) }}>\n <ColorPicker\n value={resultColor}\n sliderThickness={25}\n thumbSize={24}\n thumbShape='circle'\n onChange={onColorChange}\n onCompleteJS={(color: ColorFormatsObject)=>emitChange(color.hex)}\n style={colorPickerStyle.picker}\n boundedThumb\n >\n <Panel1 style={colorPickerStyle.panelStyle} />\n <HueSlider style={colorPickerStyle.sliderStyle} />\n <OpacitySlider style={colorPickerStyle.sliderStyle} />\n\n {/*<Divider />*/}\n <Swatches\n style={colorPickerStyle.swatchesContainer}\n swatchStyle={colorPickerStyle.swatchStyle}\n colors={customSwatches}\n />\n {/*<Divider />*/}\n\n <PreviewText style={colorPickerStyle.previewTxt} colorFormat='hwba' />\n </ColorPicker>\n </View>\n </KitsContainer>\n );\n};\n\nexport default KitsInputColorPicker;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,MAAM,uBAAuB,CAAC,EAAE,GAAA,EAAK,GAAG,UAAS,KAA6B;AAC1E,EAAA,MAAM,EAAE,aAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAI,oBAAA,CAAqB,aAAA,EAAe,QAAA,EAAU,OAAO,CAAA;AAC/G,EAAA,MAAM,kBAAA,GAAqB,iBAAiB,UAAU,CAAA;AACtD,EAAA,MAAM,iBAAA,GAAoB,gBAAA,CAAiB,aAAA,EAAe,IAAA,IAAQ,EAAE,CAAA;AACpE,EAAA,MAAM,EAAC,YAAA,EAAY,GAAI,YAAA,EAAa;AACpC,EAAA,MAAM,gBAAA,GAAmB,uBAAuB,YAAY,CAAA;AAC5D,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA;AAAA,IACA,aAAa,EAAC;AAAA,IACd,GAAG;AAAA,GACP,GAAI,KAAA;AAEJ,EAAA,MAAM,cAAA,GAAiB,IAAI,KAAA,CAAM,CAAC,EAAE,IAAA,CAAK,MAAM,CAAA,CAAE,GAAA,CAAI,MAAM,QAAA,CAAS,cAAA,EAAe,CAAE,KAAK,CAAA;AAE1F,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,IAAI,QAAA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,EAAa,CAAA;AAAA,4BAChD,GAAA,CAAC,aAAA,EAAA,EAAc,KAAA,EAAO,gBAAA,CAAiB,WAAA,EAAa,CAAA;AAAA,4BAGpD,GAAA;AAAA,cAAC,QAAA;AAAA,cAAA;AAAA,gBACG,OAAO,gBAAA,CAAiB,iBAAA;AAAA,gBACxB,aAAa,gBAAA,CAAiB,WAAA;AAAA,gBAC9B,MAAA,EAAQ;AAAA;AAAA,aACZ;AAAA,gCAGC,WAAA,EAAA,EAAY,KAAA,EAAO,gBAAA,CAAiB,UAAA,EAAY,aAAY,MAAA,EAAO;AAAA;AAAA;AAAA,OACxE,EACJ;AAAA;AAAA,GACJ;AAER;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/form/inputs/ColorPicker/index.native.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport { View } from \"react-native\";\nimport ColorPicker, { colorKit, HueSlider, OpacitySlider, Panel1, PreviewText, Swatches, type ColorFormatsObject } from 'reanimated-color-picker';\nimport type { IKitsInputColorPicker } from \"@lmb-it/kitsconcerto-types\";\nimport KitsContainer from \"../../helpers/FormContainer\";\nimport { useFormInputController } from \"../../helpers/useFormInputController\";\nimport { createColorPickerStyle } from './colorPickerStyle';\nimport {useComponentDefaults, useResolvedStyle} from \"@lmb-it/kitsconcerto/hooks\";\nimport {useKitsTheme} from \"../../../contexts/Theme\";\n\nconst KitsInputColorPicker = ({ ref, ...rawProps }: IKitsInputColorPicker) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults('ColorPicker', rawProps, 'Input');\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const {resolveToken} = useKitsTheme();\n const colorPickerStyle = createColorPickerStyle(resolveToken);\n const {\n id,\n label,\n required,\n disabled,\n errors,\n invalid,\n helperText,\n value,\n defaultValue,\n onChange,\n leftAddon,\n rightAddon,\n colorFormat, // optional: may not be used directly in reanimated-color-picker\n localProps = {},\n ...rest\n } = props;\n\n const customSwatches = new Array(6).fill('#fff').map(() => colorKit.randomRgbColor().hex());\n\n const [resultColor, setResultColor] = useState(customSwatches[0]);\n\n\n\n // Unified controlled/uncontrolled logic\n const { value: displayValue, emitChange, onWorkletChange, currentReanimatedValue } = useFormInputController<any>({\n value,\n defaultValue,\n onChange\n });\n\n const onColorChange = (color: ColorFormatsObject) => {\n 'worklet';\n onWorkletChange(color.hex);\n };\n\n\n return (\n <KitsContainer\n id={id}\n label={label}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n disabled={disabled}\n required={required}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n elementStyles={elementStyles}\n >\n {/* Addons are rendered by KitsContainer (matches every other input\n + web behaviour). This component owns only the picker surface. */}\n <View style={{ width: \"100%\", ...(resolvedRootStyle && Object.keys(resolvedRootStyle).length > 0 ? resolvedRootStyle : resolvedThemeStyle) }}>\n <ColorPicker\n value={resultColor}\n sliderThickness={25}\n thumbSize={24}\n thumbShape='circle'\n onChange={onColorChange}\n onCompleteJS={(color: ColorFormatsObject)=>emitChange(color.hex)}\n style={colorPickerStyle.picker}\n boundedThumb\n >\n <Panel1 style={colorPickerStyle.panelStyle} />\n <HueSlider style={colorPickerStyle.sliderStyle} />\n <OpacitySlider style={colorPickerStyle.sliderStyle} />\n\n {/*<Divider />*/}\n <Swatches\n style={colorPickerStyle.swatchesContainer}\n swatchStyle={colorPickerStyle.swatchStyle}\n colors={customSwatches}\n />\n {/*<Divider />*/}\n\n <PreviewText style={colorPickerStyle.previewTxt} colorFormat='hwba' />\n </ColorPicker>\n </View>\n </KitsContainer>\n );\n};\n\nexport default KitsInputColorPicker;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,uBAAuB,CAAC,EAAE,GAAA,EAAK,GAAG,UAAS,KAA6B;AAC1E,EAAA,MAAM,EAAE,aAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAI,oBAAA,CAAqB,aAAA,EAAe,QAAA,EAAU,OA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ainer/index.cjs');
10
10
  var useFormInputController_native = require('../../helpers/useFormInputController/useFormInputController.cjs');
11
11
  require('../../../contexts/DialogContext.cjs');
12
12
  require('../../../contexts/PermissionsContext.cjs');
13
+ require('../../../contexts/BreadcrumbContext.cjs');
13
14
  var useComponentDefaults = require('../../../hooks/useComponentDefaults.cjs');
14
15
  var useResolvedStyle = require('../../../hooks/useResolvedStyle.cjs');
15
16
  var useThemedFont = require('../../../hooks/useThemedFont.cjs');
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../src/form/inputs/Datepicker/index.native.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Modal, Platform, Pressable, View } from 'react-native';\nimport DateTimePicker, {\n DateTimePickerAndroid,\n type DatePickerOptions,\n} from '@react-native-community/datetimepicker';\nimport type { IKitsInputCalendar } from '@lmb-it/kitsconcerto-types';\nimport KitsContainer from '../../helpers/FormContainer';\nimport { useFormInputController } from '../../helpers/useFormInputController';\nimport { Text } from '../../../_compat';\nimport {\n useComponentDefaults,\n useResolvedStyle,\n useThemedFont,\n} from '@lmb-it/kitsconcerto/hooks';\nimport { useKitsTheme } from '../../../contexts/Theme';\n\n/**\n * KitsInputCalendar (native).\n *\n * The previous implementation painted the native `DateTimePicker` underneath\n * an absolute-positioned cover with `pointerEvents='none'`. Taps fell through\n * to the native widget — but on iOS that widget renders as a small \"pill\"\n * centred in its parent, so the rest of the full-width row was un-tappable\n * even though it looked like an input.\n *\n * The picker is now opened *imperatively* on tap:\n * • Android → `DateTimePickerAndroid.open(...)` (modal dialog).\n * • iOS → a `Modal` hosting an inline spinner `DateTimePicker`.\n *\n * The visible field is a single `Pressable` styled exactly like the other\n * inputs — `Input.root` + theme `root` slot — so design tokens\n * (background, border via FormContainer's `inputGroup`, font, colour)\n * stay in charge of the look. The Pressable fills the FormContainer's\n * inner cell via `flex: 1`, so the entire row becomes a tap target.\n */\nconst KitsInputCalendar = <T = DatePickerOptions,>({\n ref: _ref,\n placeholder,\n ...rawProps\n}: IKitsInputCalendar<T>) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults(\n 'Datepicker',\n rawProps as any,\n 'Input',\n );\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n const {\n id,\n label,\n helperText,\n errors,\n invalid,\n required,\n hideError,\n disabled,\n isFloatedLabel,\n leftAddon,\n rightAddon,\n value,\n defaultValue,\n onChange,\n containerStyle,\n localProps = {} as DatePickerOptions,\n } = props as any;\n\n const { value: internalVal, emitChange } = useFormInputController<Date | null>({\n value: value as Date | null,\n defaultValue: defaultValue as Date | null,\n onChange: (event) => {\n onChange?.(event.target.value);\n },\n });\n\n const val: Date | null = internalVal instanceof Date ? internalVal : null;\n\n // Inline iOS picker visibility — Android uses the imperative API and never\n // needs this state.\n const [iosOpen, setIosOpen] = useState(false);\n\n const handleNativeChange = useCallback(\n (_event: any, picked?: Date) => {\n if (picked) emitChange(picked);\n },\n [emitChange],\n );\n\n const openPicker = useCallback(() => {\n if (disabled) return;\n if (Platform.OS === 'android') {\n DateTimePickerAndroid.open({\n value: val ?? new Date(),\n mode: 'date',\n onChange: handleNativeChange,\n ...(localProps as any),\n });\n return;\n }\n setIosOpen(true);\n }, [disabled, val, handleNativeChange, localProps]);\n\n // `Input.root` carries `color: 'text'` and the font-size used by every\n // other input. We layer the per-instance `root` slot on top so consumers\n // can still override colour, fontWeight, padding, etc. via theme tokens.\n const rootStyle =\n resolvedRootStyle && Object.keys(resolvedRootStyle).length\n ? resolvedRootStyle\n : resolvedThemeStyle;\n\n const valueColor =\n (rootStyle as any)?.color ?? resolveToken('text-primary');\n // Placeholder colour mirrors the muted token used by Select/InputText.\n const placeholderColor = resolveToken('text-muted');\n\n const isEmpty = !val;\n const displayText = val\n ? val.toLocaleDateString()\n : (placeholder as string | undefined) ?? '';\n\n return (\n <KitsContainer\n id={id}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n label={label}\n required={required}\n hideError={hideError}\n isFloatedLabel={isFloatedLabel}\n disabled={disabled}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n containerStyle={containerStyle}\n elementStyles={elementStyles}\n >\n {/* The Pressable IS the input surface.\n `flex: 1, alignSelf: 'stretch'` makes the tap target fill the\n full row provided by FormContainer's inner `<View flex: 1>`\n cell — including the horizontal padding, the empty area to\n the right of the value, everything. `justifyContent: 'center'`\n vertically centres the text the same way other inputs are\n centred inside the 52-px inputGroup. */}\n <Pressable\n onPress={openPicker}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!disabled }}\n accessibilityLabel={\n typeof label === 'string'\n ? label\n : (label as any)?.text ?? 'Date picker'\n }\n style={({ pressed }) => ({\n flex: 1,\n alignSelf: 'stretch',\n justifyContent: 'center',\n paddingHorizontal: 12,\n opacity: pressed && !disabled ? 0.7 : 1,\n // `root` slot wins last — backgroundColor, color,\n // borderRadius, fontSize etc. all flow from the theme.\n ...(rootStyle || {}),\n })}\n >\n <Text\n style={{\n ...(themedFont ? { fontFamily: themedFont } : {}),\n fontSize: (rootStyle as any)?.fontSize ?? 14,\n color: isEmpty ? placeholderColor : valueColor,\n }}\n numberOfLines={1}\n >\n {displayText}\n </Text>\n </Pressable>\n\n {Platform.OS === 'ios' && iosOpen ? (\n <Modal\n transparent\n animationType=\"fade\"\n visible={iosOpen}\n onRequestClose={() => setIosOpen(false)}\n >\n {/* Scrim — tap outside dismisses, matches Dialog UX. */}\n <Pressable\n onPress={() => setIosOpen(false)}\n style={{\n flex: 1,\n backgroundColor: 'rgba(0,0,0,0.4)',\n justifyContent: 'flex-end',\n }}\n >\n {/* Sheet — swallow taps so the scrim doesn't dismiss\n while the user is spinning the wheels. */}\n <Pressable\n onPress={() => {\n /* swallow */\n }}\n style={{\n backgroundColor:\n (rootStyle as any)?.backgroundColor ??\n resolveToken('surface-card'),\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n paddingTop: 8,\n paddingBottom: 24,\n }}\n >\n {/* Header row with a \"Done\" affordance. The\n wheel commits values as the user spins on\n iOS, so the button only dismisses the\n sheet — no extra emitChange needed. */}\n <View\n style={{\n flexDirection: 'row',\n justifyContent: 'flex-end',\n paddingHorizontal: 16,\n paddingBottom: 4,\n }}\n >\n <Pressable\n onPress={() => setIosOpen(false)}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Done\"\n hitSlop={8}\n >\n <Text\n style={{\n ...(themedFont\n ? { fontFamily: themedFont }\n : {}),\n color: resolveToken('primary'),\n fontWeight: '600',\n fontSize: 16,\n }}\n >\n Done\n </Text>\n </Pressable>\n </View>\n <DateTimePicker\n value={val ?? new Date()}\n mode=\"date\"\n display=\"spinner\"\n onChange={handleNativeChange}\n disabled={disabled}\n {...(localProps as any)}\n />\n </Pressable>\n </Pressable>\n </Modal>\n ) : null}\n </KitsContainer>\n );\n};\n\nexport default KitsInputCalendar;\n"],"names":["useComponentDefaults","useResolvedStyle","useKitsTheme","useThemedFont","useFormInputController","useState","useCallback","Platform","DateTimePickerAndroid","jsxs","KitsContainer","jsx","Pressable","Text","Modal","View"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,MAAM,oBAAoB,CAAyB;AAAA,EAC/C,GAAA,EAAK,IAAA;AAAA,EACL,WAAA;AAAA,EACA,GAAG;AACP,CAAA,KAA6B;AACzB,EAAA,MAAM,EAAE,WAAA,EAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAIA,4BAAA;AAAA,IACtD,YAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACJ;AACA,EAAA,MAAM,kBAAA,GAAqBC,yBAAiB,UAAU,CAAA;AACtD,EAAA,MAAM,iBAAA,GAAoBA,wBAAA,CAAiB,aAAA,EAAe,IAAA,IAAQ,EAAE,CAAA;AACpE,EAAA,MAAM,EAAE,YAAA,EAAa,GAAIC,qCAAA,EAAa;AACtC,EAAA,MAAM,UAAA,GAAa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../../../../../src/form/inputs/Datepicker/index.native.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Modal, Platform, Pressable, View } from 'react-native';\nimport DateTimePicker, {\n DateTimePickerAndroid,\n type DatePickerOptions,\n} from '@react-native-community/datetimepicker';\nimport type { IKitsInputCalendar } from '@lmb-it/kitsconcerto-types';\nimport KitsContainer from '../../helpers/FormContainer';\nimport { useFormInputController } from '../../helpers/useFormInputController';\nimport { Text } from '../../../_compat';\nimport {\n useComponentDefaults,\n useResolvedStyle,\n useThemedFont,\n} from '@lmb-it/kitsconcerto/hooks';\nimport { useKitsTheme } from '../../../contexts/Theme';\n\n/**\n * KitsInputCalendar (native).\n *\n * The previous implementation painted the native `DateTimePicker` underneath\n * an absolute-positioned cover with `pointerEvents='none'`. Taps fell through\n * to the native widget — but on iOS that widget renders as a small \"pill\"\n * centred in its parent, so the rest of the full-width row was un-tappable\n * even though it looked like an input.\n *\n * The picker is now opened *imperatively* on tap:\n * • Android → `DateTimePickerAndroid.open(...)` (modal dialog).\n * • iOS → a `Modal` hosting an inline spinner `DateTimePicker`.\n *\n * The visible field is a single `Pressable` styled exactly like the other\n * inputs — `Input.root` + theme `root` slot — so design tokens\n * (background, border via FormContainer's `inputGroup`, font, colour)\n * stay in charge of the look. The Pressable fills the FormContainer's\n * inner cell via `flex: 1`, so the entire row becomes a tap target.\n */\nconst KitsInputCalendar = <T = DatePickerOptions,>({\n ref: _ref,\n placeholder,\n ...rawProps\n}: IKitsInputCalendar<T>) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults(\n 'Datepicker',\n rawProps as any,\n 'Input',\n );\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n const {\n id,\n label,\n helperText,\n errors,\n invalid,\n required,\n hideError,\n disabled,\n isFloatedLabel,\n leftAddon,\n rightAddon,\n value,\n defaultValue,\n onChange,\n containerStyle,\n localProps = {} as DatePickerOptions,\n } = props as any;\n\n const { value: internalVal, emitChange } = useFormInputController<Date | null>({\n value: value as Date | null,\n defaultValue: defaultValue as Date | null,\n onChange: (event) => {\n onChange?.(event.target.value);\n },\n });\n\n const val: Date | null = internalVal instanceof Date ? internalVal : null;\n\n // Inline iOS picker visibility — Android uses the imperative API and never\n // needs this state.\n const [iosOpen, setIosOpen] = useState(false);\n\n const handleNativeChange = useCallback(\n (_event: any, picked?: Date) => {\n if (picked) emitChange(picked);\n },\n [emitChange],\n );\n\n const openPicker = useCallback(() => {\n if (disabled) return;\n if (Platform.OS === 'android') {\n DateTimePickerAndroid.open({\n value: val ?? new Date(),\n mode: 'date',\n onChange: handleNativeChange,\n ...(localProps as any),\n });\n return;\n }\n setIosOpen(true);\n }, [disabled, val, handleNativeChange, localProps]);\n\n // `Input.root` carries `color: 'text'` and the font-size used by every\n // other input. We layer the per-instance `root` slot on top so consumers\n // can still override colour, fontWeight, padding, etc. via theme tokens.\n const rootStyle =\n resolvedRootStyle && Object.keys(resolvedRootStyle).length\n ? resolvedRootStyle\n : resolvedThemeStyle;\n\n const valueColor =\n (rootStyle as any)?.color ?? resolveToken('text-primary');\n // Placeholder colour mirrors the muted token used by Select/InputText.\n const placeholderColor = resolveToken('text-muted');\n\n const isEmpty = !val;\n const displayText = val\n ? val.toLocaleDateString()\n : (placeholder as string | undefined) ?? '';\n\n return (\n <KitsContainer\n id={id}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n label={label}\n required={required}\n hideError={hideError}\n isFloatedLabel={isFloatedLabel}\n disabled={disabled}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n containerStyle={containerStyle}\n elementStyles={elementStyles}\n >\n {/* The Pressable IS the input surface.\n `flex: 1, alignSelf: 'stretch'` makes the tap target fill the\n full row provided by FormContainer's inner `<View flex: 1>`\n cell — including the horizontal padding, the empty area to\n the right of the value, everything. `justifyContent: 'center'`\n vertically centres the text the same way other inputs are\n centred inside the 52-px inputGroup. */}\n <Pressable\n onPress={openPicker}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!disabled }}\n accessibilityLabel={\n typeof label === 'string'\n ? label\n : (label as any)?.text ?? 'Date picker'\n }\n style={({ pressed }) => ({\n flex: 1,\n alignSelf: 'stretch',\n justifyContent: 'center',\n paddingHorizontal: 12,\n opacity: pressed && !disabled ? 0.7 : 1,\n // `root` slot wins last — backgroundColor, color,\n // borderRadius, fontSize etc. all flow from the theme.\n ...(rootStyle || {}),\n })}\n >\n <Text\n style={{\n ...(themedFont ? { fontFamily: themedFont } : {}),\n fontSize: (rootStyle as any)?.fontSize ?? 14,\n color: isEmpty ? placeholderColor : valueColor,\n }}\n numberOfLines={1}\n >\n {displayText}\n </Text>\n </Pressable>\n\n {Platform.OS === 'ios' && iosOpen ? (\n <Modal\n transparent\n animationType=\"fade\"\n visible={iosOpen}\n onRequestClose={() => setIosOpen(false)}\n >\n {/* Scrim — tap outside dismisses, matches Dialog UX. */}\n <Pressable\n onPress={() => setIosOpen(false)}\n style={{\n flex: 1,\n backgroundColor: 'rgba(0,0,0,0.4)',\n justifyContent: 'flex-end',\n }}\n >\n {/* Sheet — swallow taps so the scrim doesn't dismiss\n while the user is spinning the wheels. */}\n <Pressable\n onPress={() => {\n /* swallow */\n }}\n style={{\n backgroundColor:\n (rootStyle as any)?.backgroundColor ??\n resolveToken('surface-card'),\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n paddingTop: 8,\n paddingBottom: 24,\n }}\n >\n {/* Header row with a \"Done\" affordance. The\n wheel commits values as the user spins on\n iOS, so the button only dismisses the\n sheet — no extra emitChange needed. */}\n <View\n style={{\n flexDirection: 'row',\n justifyContent: 'flex-end',\n paddingHorizontal: 16,\n paddingBottom: 4,\n }}\n >\n <Pressable\n onPress={() => setIosOpen(false)}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Done\"\n hitSlop={8}\n >\n <Text\n style={{\n ...(themedFont\n ? { fontFamily: themedFont }\n : {}),\n color: resolveToken('primary'),\n fontWeight: '600',\n fontSize: 16,\n }}\n >\n Done\n </Text>\n </Pressable>\n </View>\n <DateTimePicker\n value={val ?? new Date()}\n mode=\"date\"\n display=\"spinner\"\n onChange={handleNativeChange}\n disabled={disabled}\n {...(localProps as any)}\n />\n </Pressable>\n </Pressable>\n </Modal>\n ) : null}\n </KitsContainer>\n );\n};\n\nexport default KitsInputCalendar;\n"],"names":["useComponentDefaults","useResolvedStyle","useKitsTheme","useThemedFont","useFormInputController","useState","useCallback","Platform","DateTimePickerAndroid","jsxs","KitsContainer","jsx","Pressable","Text","Modal","View"],"mappings":";;;;;;;;;;;;;;;;;;;AAoCA,MAAM,oBAAoB,CAAyB;AAAA,EAC/C,GAAA,EAAK,IAAA;AAAA,EACL,WAAA;AAAA,EACA,GAAG;AACP,CAAA,KAA6B;AACzB,EAAA,MAAM,EAAE,WAAA,EAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAIA,4BAAA;AAAA,IACtD,YAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACJ;AACA,EAAA,MAAM,kBAAA,GAAqBC,yBAAiB,UAAU,CAAA;AACtD,EAAA,MAAM,iBAAA,GAAoBA,wBAAA,CAAiB,aAAA,EAAe,IAAA,IAAQ,EAAE,CAAA;AACpE,EAAA,MAAM,EAAE,YAAA,EAAa,GAAIC,qCAAA,EAAa;AACtC,EAAA,MAAM,UAAA,GAAaC,sBAAc,MAAM,CAAA;AAEvC,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,cAAA;AAAA,IACA,aAAa;AAAC,GAClB,GAAI,KAA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kBAAAJ,cAAA;AAAA,4BAACC,qBAAA;AAAA,4BAAA;AAAA,8BACG,OAAA,EAAS,MAAM,UAAA,CAAW,KAAK,CAAA;AAAA,8BAC/B,iBAAA,EAAkB,QAAA;AAAA,8BAClB,kBAAA,EAAmB,MAAA;AAAA,8BACnB,OAAA,EAAS,CAAA;AAAA,8BAET,QAAA,kBAAAD,cAAA;AAAA,gCAACE,sBAAA;AAAA,gCAAA;AAAA,kCACG,KAAA,EAAO;AAAA,oCACH,GAAI,UAAA,GACE,EAAE,UAAA,EAAY,UAAA,KACd,EAAC;AAAA,oCACP,KAAA,EAAO,aAAa,SAAS,CAAA;AAAA,oCAC7B,UAAA,EAAY,KAAA;AAAA,oCACZ,QAAA,EAAU;AAAA,mCACd;AAAA,kCACH,QAAA,EAAA;AAAA;AAAA;AAED;AAAA;AACJ;AAAA,uBACJ;AAAA,sCACAF,cAAA;AAAA,wBAAC,cAAA;AAAA,wBAAA;AAAA,0BACG,KAAA,EAAO,GAAA,oBAAO,IAAI,IAAA,EAAK;AAAA,0BACvB,IAAA,EAAK,MAAA;AAAA,0BACL,OAAA,EAAQ,SAAA;AAAA,0BACR,QAAA,EAAU,kBAAA;AAAA,0BACV,QAAA;AAAA,0BACC,GAAI;AAAA;AAAA;AACT;AAAA;AAAA;AACJ;AAAA;AACJ;AAAA,SACJ,GACA;AAAA;AAAA;AAAA,GACR;AAER;;;;"}
@@ -6,6 +6,7 @@ import KitsContainer from '../../helpers/FormContainer/index.js';
6
6
  import { useFormInputController } from '../../helpers/useFormInputController/useFormInputController.js';
7
7
  import '../../../contexts/DialogContext.js';
8
8
  import '../../../contexts/PermissionsContext.js';
9
+ import '../../../contexts/BreadcrumbContext.js';
9
10
  import useComponentDefaults from '../../../hooks/useComponentDefaults.js';
10
11
  import useResolvedStyle from '../../../hooks/useResolvedStyle.js';
11
12
  import useThemedFont from '../../../hooks/useThemedFont.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/form/inputs/Datepicker/index.native.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Modal, Platform, Pressable, View } from 'react-native';\nimport DateTimePicker, {\n DateTimePickerAndroid,\n type DatePickerOptions,\n} from '@react-native-community/datetimepicker';\nimport type { IKitsInputCalendar } from '@lmb-it/kitsconcerto-types';\nimport KitsContainer from '../../helpers/FormContainer';\nimport { useFormInputController } from '../../helpers/useFormInputController';\nimport { Text } from '../../../_compat';\nimport {\n useComponentDefaults,\n useResolvedStyle,\n useThemedFont,\n} from '@lmb-it/kitsconcerto/hooks';\nimport { useKitsTheme } from '../../../contexts/Theme';\n\n/**\n * KitsInputCalendar (native).\n *\n * The previous implementation painted the native `DateTimePicker` underneath\n * an absolute-positioned cover with `pointerEvents='none'`. Taps fell through\n * to the native widget — but on iOS that widget renders as a small \"pill\"\n * centred in its parent, so the rest of the full-width row was un-tappable\n * even though it looked like an input.\n *\n * The picker is now opened *imperatively* on tap:\n * • Android → `DateTimePickerAndroid.open(...)` (modal dialog).\n * • iOS → a `Modal` hosting an inline spinner `DateTimePicker`.\n *\n * The visible field is a single `Pressable` styled exactly like the other\n * inputs — `Input.root` + theme `root` slot — so design tokens\n * (background, border via FormContainer's `inputGroup`, font, colour)\n * stay in charge of the look. The Pressable fills the FormContainer's\n * inner cell via `flex: 1`, so the entire row becomes a tap target.\n */\nconst KitsInputCalendar = <T = DatePickerOptions,>({\n ref: _ref,\n placeholder,\n ...rawProps\n}: IKitsInputCalendar<T>) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults(\n 'Datepicker',\n rawProps as any,\n 'Input',\n );\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n const {\n id,\n label,\n helperText,\n errors,\n invalid,\n required,\n hideError,\n disabled,\n isFloatedLabel,\n leftAddon,\n rightAddon,\n value,\n defaultValue,\n onChange,\n containerStyle,\n localProps = {} as DatePickerOptions,\n } = props as any;\n\n const { value: internalVal, emitChange } = useFormInputController<Date | null>({\n value: value as Date | null,\n defaultValue: defaultValue as Date | null,\n onChange: (event) => {\n onChange?.(event.target.value);\n },\n });\n\n const val: Date | null = internalVal instanceof Date ? internalVal : null;\n\n // Inline iOS picker visibility — Android uses the imperative API and never\n // needs this state.\n const [iosOpen, setIosOpen] = useState(false);\n\n const handleNativeChange = useCallback(\n (_event: any, picked?: Date) => {\n if (picked) emitChange(picked);\n },\n [emitChange],\n );\n\n const openPicker = useCallback(() => {\n if (disabled) return;\n if (Platform.OS === 'android') {\n DateTimePickerAndroid.open({\n value: val ?? new Date(),\n mode: 'date',\n onChange: handleNativeChange,\n ...(localProps as any),\n });\n return;\n }\n setIosOpen(true);\n }, [disabled, val, handleNativeChange, localProps]);\n\n // `Input.root` carries `color: 'text'` and the font-size used by every\n // other input. We layer the per-instance `root` slot on top so consumers\n // can still override colour, fontWeight, padding, etc. via theme tokens.\n const rootStyle =\n resolvedRootStyle && Object.keys(resolvedRootStyle).length\n ? resolvedRootStyle\n : resolvedThemeStyle;\n\n const valueColor =\n (rootStyle as any)?.color ?? resolveToken('text-primary');\n // Placeholder colour mirrors the muted token used by Select/InputText.\n const placeholderColor = resolveToken('text-muted');\n\n const isEmpty = !val;\n const displayText = val\n ? val.toLocaleDateString()\n : (placeholder as string | undefined) ?? '';\n\n return (\n <KitsContainer\n id={id}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n label={label}\n required={required}\n hideError={hideError}\n isFloatedLabel={isFloatedLabel}\n disabled={disabled}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n containerStyle={containerStyle}\n elementStyles={elementStyles}\n >\n {/* The Pressable IS the input surface.\n `flex: 1, alignSelf: 'stretch'` makes the tap target fill the\n full row provided by FormContainer's inner `<View flex: 1>`\n cell — including the horizontal padding, the empty area to\n the right of the value, everything. `justifyContent: 'center'`\n vertically centres the text the same way other inputs are\n centred inside the 52-px inputGroup. */}\n <Pressable\n onPress={openPicker}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!disabled }}\n accessibilityLabel={\n typeof label === 'string'\n ? label\n : (label as any)?.text ?? 'Date picker'\n }\n style={({ pressed }) => ({\n flex: 1,\n alignSelf: 'stretch',\n justifyContent: 'center',\n paddingHorizontal: 12,\n opacity: pressed && !disabled ? 0.7 : 1,\n // `root` slot wins last — backgroundColor, color,\n // borderRadius, fontSize etc. all flow from the theme.\n ...(rootStyle || {}),\n })}\n >\n <Text\n style={{\n ...(themedFont ? { fontFamily: themedFont } : {}),\n fontSize: (rootStyle as any)?.fontSize ?? 14,\n color: isEmpty ? placeholderColor : valueColor,\n }}\n numberOfLines={1}\n >\n {displayText}\n </Text>\n </Pressable>\n\n {Platform.OS === 'ios' && iosOpen ? (\n <Modal\n transparent\n animationType=\"fade\"\n visible={iosOpen}\n onRequestClose={() => setIosOpen(false)}\n >\n {/* Scrim — tap outside dismisses, matches Dialog UX. */}\n <Pressable\n onPress={() => setIosOpen(false)}\n style={{\n flex: 1,\n backgroundColor: 'rgba(0,0,0,0.4)',\n justifyContent: 'flex-end',\n }}\n >\n {/* Sheet — swallow taps so the scrim doesn't dismiss\n while the user is spinning the wheels. */}\n <Pressable\n onPress={() => {\n /* swallow */\n }}\n style={{\n backgroundColor:\n (rootStyle as any)?.backgroundColor ??\n resolveToken('surface-card'),\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n paddingTop: 8,\n paddingBottom: 24,\n }}\n >\n {/* Header row with a \"Done\" affordance. The\n wheel commits values as the user spins on\n iOS, so the button only dismisses the\n sheet — no extra emitChange needed. */}\n <View\n style={{\n flexDirection: 'row',\n justifyContent: 'flex-end',\n paddingHorizontal: 16,\n paddingBottom: 4,\n }}\n >\n <Pressable\n onPress={() => setIosOpen(false)}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Done\"\n hitSlop={8}\n >\n <Text\n style={{\n ...(themedFont\n ? { fontFamily: themedFont }\n : {}),\n color: resolveToken('primary'),\n fontWeight: '600',\n fontSize: 16,\n }}\n >\n Done\n </Text>\n </Pressable>\n </View>\n <DateTimePicker\n value={val ?? new Date()}\n mode=\"date\"\n display=\"spinner\"\n onChange={handleNativeChange}\n disabled={disabled}\n {...(localProps as any)}\n />\n </Pressable>\n </Pressable>\n </Modal>\n ) : null}\n </KitsContainer>\n );\n};\n\nexport default KitsInputCalendar;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA,MAAM,oBAAoB,CAAyB;AAAA,EAC/C,GAAA,EAAK,IAAA;AAAA,EACL,WAAA;AAAA,EACA,GAAG;AACP,CAAA,KAA6B;AACzB,EAAA,MAAM,EAAE,WAAA,EAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAI,oBAAA;AAAA,IACtD,YAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACJ;AACA,EAAA,MAAM,kBAAA,GAAqB,iBAAiB,UAAU,CAAA;AACtD,EAAA,MAAM,iBAAA,GAAoB,gBAAA,CAAiB,aAAA,EAAe,IAAA,IAAQ,EAAE,CAAA;AACpE,EAAA,MAAM,EAAE,YAAA,EAAa,GAAI,YAAA,EAAa;AACtC,EAAA,MAAM,UAAA,GAAa,cAAc,MAAM,CAAA;AAEvC,EAAA,MAAM;AAAA,IACF,EAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,cAAA;AAAA,IACA,aAAa;AAAC,GAClB,GAAI,KAAA;AAEJ,EAAA,MAAM,EAAE,KAAA,EAAO,WAAA,EAAa,UAAA,KAAe,sBAAA,CAAoC;AAAA,IAC3E,KAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA,EAAU,CAA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AAA,8BACnB,OAAA,EAAS,CAAA;AAAA,8BAET,QAAA,kBAAA,GAAA;AAAA,gCAAC,IAAA;AAAA,gCAAA;AAAA,kCACG,KAAA,EAAO;AAAA,oCACH,GAAI,UAAA,GACE,EAAE,UAAA,EAAY,UAAA,KACd,EAAC;AAAA,oCACP,KAAA,EAAO,aAAa,SAAS,CAAA;AAAA,oCAC7B,UAAA,EAAY,KAAA;AAAA,oCACZ,QAAA,EAAU;AAAA,mCACd;AAAA,kCACH,QAAA,EAAA;AAAA;AAAA;AAED;AAAA;AACJ;AAAA,uBACJ;AAAA,sCACA,GAAA;AAAA,wBAAC,cAAA;AAAA,wBAAA;AAAA,0BACG,KAAA,EAAO,GAAA,oBAAO,IAAI,IAAA,EAAK;AAAA,0BACvB,IAAA,EAAK,MAAA;AAAA,0BACL,OAAA,EAAQ,SAAA;AAAA,0BACR,QAAA,EAAU,kBAAA;AAAA,0BACV,QAAA;AAAA,0BACC,GAAI;AAAA;AAAA;AACT;AAAA;AAAA;AACJ;AAAA;AACJ;AAAA,SACJ,GACA;AAAA;AAAA;AAAA,GACR;AAER;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/form/inputs/Datepicker/index.native.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Modal, Platform, Pressable, View } from 'react-native';\nimport DateTimePicker, {\n DateTimePickerAndroid,\n type DatePickerOptions,\n} from '@react-native-community/datetimepicker';\nimport type { IKitsInputCalendar } from '@lmb-it/kitsconcerto-types';\nimport KitsContainer from '../../helpers/FormContainer';\nimport { useFormInputController } from '../../helpers/useFormInputController';\nimport { Text } from '../../../_compat';\nimport {\n useComponentDefaults,\n useResolvedStyle,\n useThemedFont,\n} from '@lmb-it/kitsconcerto/hooks';\nimport { useKitsTheme } from '../../../contexts/Theme';\n\n/**\n * KitsInputCalendar (native).\n *\n * The previous implementation painted the native `DateTimePicker` underneath\n * an absolute-positioned cover with `pointerEvents='none'`. Taps fell through\n * to the native widget — but on iOS that widget renders as a small \"pill\"\n * centred in its parent, so the rest of the full-width row was un-tappable\n * even though it looked like an input.\n *\n * The picker is now opened *imperatively* on tap:\n * • Android → `DateTimePickerAndroid.open(...)` (modal dialog).\n * • iOS → a `Modal` hosting an inline spinner `DateTimePicker`.\n *\n * The visible field is a single `Pressable` styled exactly like the other\n * inputs — `Input.root` + theme `root` slot — so design tokens\n * (background, border via FormContainer's `inputGroup`, font, colour)\n * stay in charge of the look. The Pressable fills the FormContainer's\n * inner cell via `flex: 1`, so the entire row becomes a tap target.\n */\nconst KitsInputCalendar = <T = DatePickerOptions,>({\n ref: _ref,\n placeholder,\n ...rawProps\n}: IKitsInputCalendar<T>) => {\n const { mergedProps: props, themeStyle, elementStyles } = useComponentDefaults(\n 'Datepicker',\n rawProps as any,\n 'Input',\n );\n const resolvedThemeStyle = useResolvedStyle(themeStyle);\n const resolvedRootStyle = useResolvedStyle(elementStyles?.root || {});\n const { resolveToken } = useKitsTheme();\n const themedFont = useThemedFont('body');\n\n const {\n id,\n label,\n helperText,\n errors,\n invalid,\n required,\n hideError,\n disabled,\n isFloatedLabel,\n leftAddon,\n rightAddon,\n value,\n defaultValue,\n onChange,\n containerStyle,\n localProps = {} as DatePickerOptions,\n } = props as any;\n\n const { value: internalVal, emitChange } = useFormInputController<Date | null>({\n value: value as Date | null,\n defaultValue: defaultValue as Date | null,\n onChange: (event) => {\n onChange?.(event.target.value);\n },\n });\n\n const val: Date | null = internalVal instanceof Date ? internalVal : null;\n\n // Inline iOS picker visibility — Android uses the imperative API and never\n // needs this state.\n const [iosOpen, setIosOpen] = useState(false);\n\n const handleNativeChange = useCallback(\n (_event: any, picked?: Date) => {\n if (picked) emitChange(picked);\n },\n [emitChange],\n );\n\n const openPicker = useCallback(() => {\n if (disabled) return;\n if (Platform.OS === 'android') {\n DateTimePickerAndroid.open({\n value: val ?? new Date(),\n mode: 'date',\n onChange: handleNativeChange,\n ...(localProps as any),\n });\n return;\n }\n setIosOpen(true);\n }, [disabled, val, handleNativeChange, localProps]);\n\n // `Input.root` carries `color: 'text'` and the font-size used by every\n // other input. We layer the per-instance `root` slot on top so consumers\n // can still override colour, fontWeight, padding, etc. via theme tokens.\n const rootStyle =\n resolvedRootStyle && Object.keys(resolvedRootStyle).length\n ? resolvedRootStyle\n : resolvedThemeStyle;\n\n const valueColor =\n (rootStyle as any)?.color ?? resolveToken('text-primary');\n // Placeholder colour mirrors the muted token used by Select/InputText.\n const placeholderColor = resolveToken('text-muted');\n\n const isEmpty = !val;\n const displayText = val\n ? val.toLocaleDateString()\n : (placeholder as string | undefined) ?? '';\n\n return (\n <KitsContainer\n id={id}\n helperText={helperText}\n errors={errors}\n invalid={invalid}\n label={label}\n required={required}\n hideError={hideError}\n isFloatedLabel={isFloatedLabel}\n disabled={disabled}\n leftAddon={leftAddon}\n rightAddon={rightAddon}\n containerStyle={containerStyle}\n elementStyles={elementStyles}\n >\n {/* The Pressable IS the input surface.\n `flex: 1, alignSelf: 'stretch'` makes the tap target fill the\n full row provided by FormContainer's inner `<View flex: 1>`\n cell — including the horizontal padding, the empty area to\n the right of the value, everything. `justifyContent: 'center'`\n vertically centres the text the same way other inputs are\n centred inside the 52-px inputGroup. */}\n <Pressable\n onPress={openPicker}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !!disabled }}\n accessibilityLabel={\n typeof label === 'string'\n ? label\n : (label as any)?.text ?? 'Date picker'\n }\n style={({ pressed }) => ({\n flex: 1,\n alignSelf: 'stretch',\n justifyContent: 'center',\n paddingHorizontal: 12,\n opacity: pressed && !disabled ? 0.7 : 1,\n // `root` slot wins last — backgroundColor, color,\n // borderRadius, fontSize etc. all flow from the theme.\n ...(rootStyle || {}),\n })}\n >\n <Text\n style={{\n ...(themedFont ? { fontFamily: themedFont } : {}),\n fontSize: (rootStyle as any)?.fontSize ?? 14,\n color: isEmpty ? placeholderColor : valueColor,\n }}\n numberOfLines={1}\n >\n {displayText}\n </Text>\n </Pressable>\n\n {Platform.OS === 'ios' && iosOpen ? (\n <Modal\n transparent\n animationType=\"fade\"\n visible={iosOpen}\n onRequestClose={() => setIosOpen(false)}\n >\n {/* Scrim — tap outside dismisses, matches Dialog UX. */}\n <Pressable\n onPress={() => setIosOpen(false)}\n style={{\n flex: 1,\n backgroundColor: 'rgba(0,0,0,0.4)',\n justifyContent: 'flex-end',\n }}\n >\n {/* Sheet — swallow taps so the scrim doesn't dismiss\n while the user is spinning the wheels. */}\n <Pressable\n onPress={() => {\n /* swallow */\n }}\n style={{\n backgroundColor:\n (rootStyle as any)?.backgroundColor ??\n resolveToken('surface-card'),\n borderTopLeftRadius: 16,\n borderTopRightRadius: 16,\n paddingTop: 8,\n paddingBottom: 24,\n }}\n >\n {/* Header row with a \"Done\" affordance. The\n wheel commits values as the user spins on\n iOS, so the button only dismisses the\n sheet — no extra emitChange needed. */}\n <View\n style={{\n flexDirection: 'row',\n justifyContent: 'flex-end',\n paddingHorizontal: 16,\n paddingBottom: 4,\n }}\n >\n <Pressable\n onPress={() => setIosOpen(false)}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Done\"\n hitSlop={8}\n >\n <Text\n style={{\n ...(themedFont\n ? { fontFamily: themedFont }\n : {}),\n color: resolveToken('primary'),\n fontWeight: '600',\n fontSize: 16,\n }}\n >\n Done\n </Text>\n </Pressable>\n </View>\n <DateTimePicker\n value={val ?? new Date()}\n mode=\"date\"\n display=\"spinner\"\n onChange={handleNativeChange}\n disabled={disabled}\n {...(localProps as any)}\n />\n </Pressable>\n </Pressable>\n </Modal>\n ) : null}\n </KitsContainer>\n );\n};\n\nexport default KitsInputCalendar;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoCA,MAAM,oBAAoB,CAAyB;AAAA,EAC/C,GAAA,EAAK,IAAA;AAAA,EACL,WAAA;AAAA,EACA,GAAG;AACP,CAAA,KAA6B;AACzB,EAAA,MAAM,EAAE,WAAA,EAAa,KAAA,EAAO,UAAA,EAAY,eAAc,GAAI,oBAAA;AAAA,IACtD,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AAAA,0BACL,OAAA,EAAQ,SAAA;AAAA,0BACR,QAAA,EAAU,kBAAA;AAAA,0BACV,QAAA;AAAA,0BACC,GAAI;AAAA;AAAA;AACT;AAAA;AAAA;AACJ;AAAA;AACJ;AAAA,SACJ,GACA;AAAA;AAAA;AAAA,GACR;AAER;;;;"}
@@ -9,6 +9,7 @@ var googlePlaces_native = require('./googlePlaces.cjs');
9
9
  var SelectContext = require('../../selects/SelectContext.cjs');
10
10
  require('../../../contexts/DialogContext.cjs');
11
11
  require('../../../contexts/PermissionsContext.cjs');
12
+ require('../../../contexts/BreadcrumbContext.cjs');
12
13
 
13
14
  const KitsInputLocation = ({
14
15
  id,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../src/form/inputs/InputLocation/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useRef, useState} from \"react\";\nimport Experian from \"./Experian\";\nimport type {IKitsInputLocation, IRef} from \"@lmb-it/kitsconcerto-types\";\nimport {FormSelect} from \"../../../_compat\";\n// Platform-forked Google transport: legacy Web Service on native\n// (`googlePlaces.native.ts` — RN has no CORS), Places API (New) on web\n// (`googlePlaces.web.ts` — browsers block the legacy endpoints). Same\n// normalized contract on both sides (`googlePlaces.types.ts`), so the\n// Suggestion / IAddressFormat output is unchanged. There is deliberately NO\n// bare `googlePlaces.ts` — a bare sibling wins resolution over the platform\n// files and ships the wrong transport (the v0.1.238 regression).\nimport {googleAutocomplete, googleDetails} from \"./googlePlaces\";\n\ntype Suggestion = {\n label: string;\n value: string;\n format?: string;\n};\n\nconst KitsInputLocation = ({\n id,\n label,\n errors,\n invalid,\n value,\n hideError,\n onAddressClick,\n onChange,\n disabled,\n placeholder,\n countryISO = \"AUS\",\n helperText,\n provider,\n apiKey,\n labelKey = \"label\",\n valueKey = \"value\",\n // list,\n ...rest\n }: IKitsInputLocation) => {\n if (!apiKey) throw new Error(\"API KEY NOT PROVIDED\");\n\n const selectRef = useRef<IRef>(null);\n const [suggestions, setSuggestions] = useState<Suggestion[]>([]);\n // In-flight Details dedupe: on web PrimeReact fires BOTH onChange and\n // onSelect for a single pick, which would double the (billed) Details\n // call. First one in wins; cleared when the fetch settles.\n const pendingDetailsRef = useRef<string | null>(null);\n\n const experian = useMemo(\n () => (provider !== \"google\" ? new Experian(apiKey) : null),\n [provider, apiKey]\n );\n\n const search = useCallback(\n async (query: string): Promise<Suggestion[]> => {\n if (query.length < 4) return [];\n\n try {\n if (provider === \"google\") {\n const mapped = await googleAutocomplete(query, apiKey, countryISO);\n setSuggestions(mapped);\n return mapped;\n } else {\n const res = await experian?.searchAddress(query, countryISO);\n const mapped = res?.data?.result?.suggestions?.map((s: any) => ({\n label: s.text,\n value: s.global_address_key,\n format: s.format,\n })) || [];\n setSuggestions(mapped);\n return mapped;\n }\n } catch {\n setSuggestions([]);\n return [];\n }\n },\n [provider, apiKey, countryISO, experian]\n );\n\n const onPickAddress = useCallback(\n async (event: any, rawItem?: any) => {\n // rawItem is the full suggestion { label, value } passed as second arg by the hook\n const selected = rawItem ?? event;\n\n if (!selected) return;\n\n // WEB (PrimeReact) routes more than item objects through here:\n // typed text arrives as a plain STRING, and a forceSelection\n // blur-clear arrives as the raw change event with a null value.\n // Reading `selected[labelKey]` on those wiped the consumer's\n // controlled value with `undefined`. Pass strings through\n // verbatim; propagate a clear as ''. Native only ever sends item\n // objects, so both branches are no-ops there.\n if (typeof selected === \"string\") {\n onChange?.({target: {value: selected}} as any);\n return;\n }\n if (!(valueKey in selected)) {\n onChange?.({\n target: {value: selected?.target?.value ?? \"\"},\n } as any);\n return;\n }\n\n const placeId = selected[valueKey];\n\n onChange?.({\n target: {value: selected[labelKey]},\n } as any);\n\n if (!onAddressClick || !placeId) return;\n\n if (provider === \"google\") {\n // Web fires onChange AND onSelect for one pick — fetch once.\n if (pendingDetailsRef.current === placeId) return;\n pendingDetailsRef.current = placeId;\n try {\n const details = await googleDetails(placeId, apiKey);\n\n // Build rich address format: each component has a `long` and `short` value.\n const richAddress: Record<string, any> = {\n formatted_address: details.formattedAddress,\n place_id: placeId,\n latitude: details.latitude,\n longitude: details.longitude,\n };\n\n details.components.forEach((c) => {\n if (c.type && !(c.type in richAddress)) {\n richAddress[c.type] = {\n long: c.long,\n short: c.short,\n };\n }\n });\n\n onAddressClick(richAddress);\n } finally {\n pendingDetailsRef.current = null;\n }\n } else {\n const res = await experian?.formatAddress(placeId);\n if (res?.data?.result) { // @ts-ignore\n onAddressClick(res.data.result);\n }\n }\n },\n [\n provider,\n apiKey,\n valueKey,\n labelKey,\n onChange,\n onAddressClick,\n experian,\n ]\n );\n\n return (\n <FormSelect\n ref={selectRef}\n id={id}\n shape=\"autocomplete\"\n value={value}\n label={label}\n placeholder={placeholder}\n labelKey={labelKey}\n valueKey={valueKey}\n onChange={onPickAddress}\n isMultiple={false}\n forceSelection\n completeMethod={search}\n list={suggestions}\n helperText={helperText}\n hideError={hideError}\n disabled={disabled}\n invalid={invalid}\n errors={errors}\n {...rest}\n />\n );\n};\n\nexport default KitsInputLocation;\n"],"names":["useRef","useState","useMemo","Experian","useCallback","googleAutocomplete","googleDetails","jsx","FormSelect"],"mappings":";;;;;;;;;;;;AAmBA,MAAM,oBAAoB,CAAC;AAAA,EACI,EAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA,GAAa,KAAA;AAAA,EACb,UAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA,GAAW,OAAA;AAAA,EACX,QAAA,GAAW,OAAA;AAAA;AAAA,EAEX,GAAG;AACP,CAAA,KAA0B;AACjD,EAAA,IAAI,CAAC,MAAA,EAAQ,MAAM,IAAI,MAAM,sBAAsB,CAAA;AAEnD,EAAA,MAAM,SAAA,GAAYA,aAAa,IAAI,CAAA;AACnC,EAAA,MAAM,CAAC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"],"sourcesContent":["import React, {useCallback, useMemo, useRef, useState} from \"react\";\nimport Experian from \"./Experian\";\nimport type {IKitsInputLocation, IRef} from \"@lmb-it/kitsconcerto-types\";\nimport {FormSelect} from \"../../../_compat\";\n// Platform-forked Google transport: legacy Web Service on native\n// (`googlePlaces.native.ts` — RN has no CORS), Places API (New) on web\n// (`googlePlaces.web.ts` — browsers block the legacy endpoints). Same\n// normalized contract on both sides (`googlePlaces.types.ts`), so the\n// Suggestion / IAddressFormat output is unchanged. There is deliberately NO\n// bare `googlePlaces.ts` — a bare sibling wins resolution over the platform\n// files and ships the wrong transport (the v0.1.238 regression).\nimport {googleAutocomplete, googleDetails} from \"./googlePlaces\";\n\ntype Suggestion = {\n label: string;\n value: string;\n format?: string;\n};\n\nconst KitsInputLocation = ({\n id,\n label,\n errors,\n invalid,\n value,\n hideError,\n onAddressClick,\n onChange,\n disabled,\n placeholder,\n countryISO = \"AUS\",\n helperText,\n provider,\n apiKey,\n labelKey = \"label\",\n valueKey = \"value\",\n // list,\n ...rest\n }: IKitsInputLocation) => {\n if (!apiKey) throw new Error(\"API KEY NOT PROVIDED\");\n\n const selectRef = useRef<IRef>(null);\n const [suggestions, setSuggestions] = useState<Suggestion[]>([]);\n // In-flight Details dedupe: on web PrimeReact fires BOTH onChange and\n // onSelect for a single pick, which would double the (billed) Details\n // call. First one in wins; cleared when the fetch settles.\n const pendingDetailsRef = useRef<string | null>(null);\n\n const experian = useMemo(\n () => (provider !== \"google\" ? new Experian(apiKey) : null),\n [provider, apiKey]\n );\n\n const search = useCallback(\n async (query: string): Promise<Suggestion[]> => {\n if (query.length < 4) return [];\n\n try {\n if (provider === \"google\") {\n const mapped = await googleAutocomplete(query, apiKey, countryISO);\n setSuggestions(mapped);\n return mapped;\n } else {\n const res = await experian?.searchAddress(query, countryISO);\n const mapped = res?.data?.result?.suggestions?.map((s: any) => ({\n label: s.text,\n value: s.global_address_key,\n format: s.format,\n })) || [];\n setSuggestions(mapped);\n return mapped;\n }\n } catch {\n setSuggestions([]);\n return [];\n }\n },\n [provider, apiKey, countryISO, experian]\n );\n\n const onPickAddress = useCallback(\n async (event: any, rawItem?: any) => {\n // rawItem is the full suggestion { label, value } passed as second arg by the hook\n const selected = rawItem ?? event;\n\n if (!selected) return;\n\n // WEB (PrimeReact) routes more than item objects through here:\n // typed text arrives as a plain STRING, and a forceSelection\n // blur-clear arrives as the raw change event with a null value.\n // Reading `selected[labelKey]` on those wiped the consumer's\n // controlled value with `undefined`. Pass strings through\n // verbatim; propagate a clear as ''. Native only ever sends item\n // objects, so both branches are no-ops there.\n if (typeof selected === \"string\") {\n onChange?.({target: {value: selected}} as any);\n return;\n }\n if (!(valueKey in selected)) {\n onChange?.({\n target: {value: selected?.target?.value ?? \"\"},\n } as any);\n return;\n }\n\n const placeId = selected[valueKey];\n\n onChange?.({\n target: {value: selected[labelKey]},\n } as any);\n\n if (!onAddressClick || !placeId) return;\n\n if (provider === \"google\") {\n // Web fires onChange AND onSelect for one pick — fetch once.\n if (pendingDetailsRef.current === placeId) return;\n pendingDetailsRef.current = placeId;\n try {\n const details = await googleDetails(placeId, apiKey);\n\n // Build rich address format: each component has a `long` and `short` value.\n const richAddress: Record<string, any> = {\n formatted_address: details.formattedAddress,\n place_id: placeId,\n latitude: details.latitude,\n longitude: details.longitude,\n };\n\n details.components.forEach((c) => {\n if (c.type && !(c.type in richAddress)) {\n richAddress[c.type] = {\n long: c.long,\n short: c.short,\n };\n }\n });\n\n onAddressClick(richAddress);\n } finally {\n pendingDetailsRef.current = null;\n }\n } else {\n const res = await experian?.formatAddress(placeId);\n if (res?.data?.result) { // @ts-ignore\n onAddressClick(res.data.result);\n }\n }\n },\n [\n provider,\n apiKey,\n valueKey,\n labelKey,\n onChange,\n onAddressClick,\n experian,\n ]\n );\n\n return (\n <FormSelect\n ref={selectRef}\n id={id}\n shape=\"autocomplete\"\n value={value}\n label={label}\n placeholder={placeholder}\n labelKey={labelKey}\n valueKey={valueKey}\n onChange={onPickAddress}\n isMultiple={false}\n forceSelection\n completeMethod={search}\n list={suggestions}\n helperText={helperText}\n hideError={hideError}\n disabled={disabled}\n invalid={invalid}\n errors={errors}\n {...rest}\n />\n );\n};\n\nexport default KitsInputLocation;\n"],"names":["useRef","useState","useMemo","Experian","useCallback","googleAutocomplete","googleDetails","jsx","FormSelect"],"mappings":";;;;;;;;;;;;;AAmBA,MAAM,oBAAoB,CAAC;AAAA,EACI,EAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA,GAAa,KAAA;AAAA,EACb,UAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA,GAAW,OAAA;AAAA,EACX,QAAA,GAAW,OAAA;AAAA;AAAA,EAEX,GAAG;AACP,CAAA,KAA0B;AACjD,EAAA,IAAI,CAAC,MAAA,EAAQ,MAAM,IAAI,MAAM,sBAAsB,CAAA;AAEnD,EAAA,MAAM,SAAA,GAAYA,aAAa,IAAI,CAAA;AACnC,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAIC,cAAA,CAAuB,EAAE,CAAA;AAI/D,EAAA,MAAM,iBAAA,GAAoBD,aAAsB,IAAI,CAAA;AAEpD,EAAA,MAAM,QAAA,GAAWE,aAAA;AAAA,IACb,MAAO,QAAA,KAAa,QAAA,GAAW,IAAIC,gBAAA,CAAS,MAAM,CAAA,GAAI,IAAA;AAAA,IACtD,CAAC,UAAU,MAAM;AAAA,GACrB;AAEA,EAAA,MAAM,MAAA,GAASC,iBAAA;AAAA,IACX,OAAO,KAAA,KAAyC;AAC5C,MAAA,IAAI,KAAA,CAAM,MAAA,GAAS,CAAA,EAAG,OAAO,EAAC;AAE9B,MAAA,IAAI;AACA,QAAA,IAAI,aAAa,QAAA,EAAU;AACvB,UAAA,MAAM,MA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AAM,CAAA;AAAA,QAClC;AAAA,MACJ;AAAA,IACJ,CAAA;AAAA,IACA;AAAA,MACI,QAAA;AAAA,MACA,MAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,cAAA;AAAA,MACA;AAAA;AACJ,GACJ;AAEA,EAAA,uBACIC,cAAA;AAAA,IAACC,qBAAA;AAAA,IAAA;AAAA,MACG,GAAA,EAAK,SAAA;AAAA,MACL,EAAA;AAAA,MACA,KAAA,EAAM,cAAA;AAAA,MACN,KAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA,EAAU,aAAA;AAAA,MACV,UAAA,EAAY,KAAA;AAAA,MACZ,cAAA,EAAc,IAAA;AAAA,MACd,cAAA,EAAgB,MAAA;AAAA,MAChB,IAAA,EAAM,WAAA;AAAA,MACN,UAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACR;AAER;;;;"}
@@ -5,6 +5,7 @@ import { googleAutocomplete, googleDetails } from './googlePlaces.js';
5
5
  import FormSelect from '../../selects/SelectContext.js';
6
6
  import '../../../contexts/DialogContext.js';
7
7
  import '../../../contexts/PermissionsContext.js';
8
+ import '../../../contexts/BreadcrumbContext.js';
8
9
 
9
10
  const KitsInputLocation = ({
10
11
  id,