@leaflink/stash 49.5.0 → 50.0.1

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 (418) hide show
  1. package/assets/icons/circle-empty.svg +1 -0
  2. package/assets/spritesheet.svg +1 -1
  3. package/dist/Accordion.js +25 -28
  4. package/dist/Accordion.js.map +1 -1
  5. package/dist/Accordion.vue.d.ts +16 -16
  6. package/dist/ActionsDropdown.js +14 -26
  7. package/dist/ActionsDropdown.js.map +1 -1
  8. package/dist/ActionsDropdown.vue.d.ts +12 -12
  9. package/dist/AddressSelect.js +22 -47
  10. package/dist/AddressSelect.js.map +1 -1
  11. package/dist/AddressSelect.vue.d.ts +45 -45
  12. package/dist/Alert.js +4 -6
  13. package/dist/Alert.js.map +1 -1
  14. package/dist/Alert.vue.d.ts +18 -18
  15. package/dist/AppNavigationItem.js +16 -19
  16. package/dist/AppNavigationItem.js.map +1 -1
  17. package/dist/AppNavigationItem.vue.d.ts +4 -4
  18. package/dist/AppSidebar.js +27 -28
  19. package/dist/AppSidebar.js.map +1 -1
  20. package/dist/AppSidebar.vue.d.ts +7 -7
  21. package/dist/AppTopbar.js +12 -17
  22. package/dist/AppTopbar.js.map +1 -1
  23. package/dist/AppTopbar.vue.d.ts +8 -8
  24. package/dist/Avatar.js +1 -1
  25. package/dist/Avatar.vue.d.ts +22 -22
  26. package/dist/Backdrop.js +1 -1
  27. package/dist/Backdrop.vue.d.ts +1 -1
  28. package/dist/Badge.js +1 -1
  29. package/dist/Badge.js.map +1 -1
  30. package/dist/Badge.vue.d.ts +36 -36
  31. package/dist/Box.js +2 -3
  32. package/dist/Box.js.map +1 -1
  33. package/dist/Box.vue.d.ts +12 -12
  34. package/dist/{Box.vue_vue_type_script_setup_true_lang-69e5176b.js → Box.vue_vue_type_script_setup_true_lang-DgJHq-09.js} +1 -1
  35. package/dist/{Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map → Box.vue_vue_type_script_setup_true_lang-DgJHq-09.js.map} +1 -1
  36. package/dist/Button.js +40 -27
  37. package/dist/Button.js.map +1 -1
  38. package/dist/Button.vue.d.ts +34 -27
  39. package/dist/ButtonGroup.js +1 -1
  40. package/dist/ButtonGroup.vue.d.ts +14 -14
  41. package/dist/Card.vue.d.ts +3 -3
  42. package/dist/CardContent.js +1 -1
  43. package/dist/CardContent.vue.d.ts +1 -1
  44. package/dist/CardFooter.js +1 -1
  45. package/dist/CardFooter.vue.d.ts +1 -1
  46. package/dist/CardMedia.js +11 -14
  47. package/dist/CardMedia.js.map +1 -1
  48. package/dist/Carousel.js +179 -180
  49. package/dist/Carousel.js.map +1 -1
  50. package/dist/Carousel.vue.d.ts +33 -11
  51. package/dist/Checkbox.js +38 -35
  52. package/dist/Checkbox.js.map +1 -1
  53. package/dist/Checkbox.vue.d.ts +31 -31
  54. package/dist/ChevronToggle.js +2 -10
  55. package/dist/ChevronToggle.js.map +1 -1
  56. package/dist/ChevronToggle.vue.d.ts +5 -5
  57. package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js → ChevronToggle.vue_vue_type_script_setup_true_lang-DuvluoTi.js} +1 -1
  58. package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map → ChevronToggle.vue_vue_type_script_setup_true_lang-DuvluoTi.js.map} +1 -1
  59. package/dist/Chip.js +17 -20
  60. package/dist/Chip.js.map +1 -1
  61. package/dist/Chip.vue.d.ts +32 -32
  62. package/dist/ConfirmationCodeInput.js +1 -1
  63. package/dist/ConfirmationCodeInput.js.map +1 -1
  64. package/dist/ConfirmationCodeInput.vue.d.ts +29 -29
  65. package/dist/ContextSwitcher.js +8 -14
  66. package/dist/ContextSwitcher.js.map +1 -1
  67. package/dist/ContextSwitcher.vue.d.ts +32 -32
  68. package/dist/Copy.js +23 -34
  69. package/dist/Copy.js.map +1 -1
  70. package/dist/Copy.vue.d.ts +9 -9
  71. package/dist/CurrencyInput.js +117 -128
  72. package/dist/CurrencyInput.js.map +1 -1
  73. package/dist/CurrencyInput.vue.d.ts +26 -21
  74. package/dist/CustomRender.vue.d.ts +12 -1
  75. package/dist/DataView.js +70 -73
  76. package/dist/DataView.js.map +1 -1
  77. package/dist/{DataView.vue_used_vue_type_style_index_0_lang.module-5c180dba.js → DataView.keys-C7eaZg2G.js} +5 -8
  78. package/dist/DataView.keys-C7eaZg2G.js.map +1 -0
  79. package/dist/DataView.vue.d.ts +51 -51
  80. package/dist/DataViewFilters.js +76 -90
  81. package/dist/DataViewFilters.js.map +1 -1
  82. package/dist/{DataViewFilters.keys-c80ffabe.js → DataViewFilters.keys-BLu07FiP.js} +1 -1
  83. package/dist/{DataViewFilters.keys-c80ffabe.js.map → DataViewFilters.keys-BLu07FiP.js.map} +1 -1
  84. package/dist/DataViewFilters.vue.d.ts +39 -39
  85. package/dist/DataViewSortButton.js +30 -43
  86. package/dist/DataViewSortButton.js.map +1 -1
  87. package/dist/DataViewSortButton.vue.d.ts +3 -3
  88. package/dist/DataViewToolbar.js +27 -36
  89. package/dist/DataViewToolbar.js.map +1 -1
  90. package/dist/DataViewToolbar.vue.d.ts +17 -17
  91. package/dist/DatePicker.js +649 -662
  92. package/dist/DatePicker.js.map +1 -1
  93. package/dist/DatePicker.vue.d.ts +73 -73
  94. package/dist/DescriptionList.js +1 -1
  95. package/dist/{DescriptionList.keys-c906ce05.js → DescriptionList.keys-BHlHYV6b.js} +1 -1
  96. package/dist/{DescriptionList.keys-c906ce05.js.map → DescriptionList.keys-BHlHYV6b.js.map} +1 -1
  97. package/dist/DescriptionList.vue.d.ts +6 -6
  98. package/dist/DescriptionListDetail.js +1 -1
  99. package/dist/DescriptionListDetail.vue.d.ts +1 -1
  100. package/dist/DescriptionListGroup.js +1 -1
  101. package/dist/DescriptionListGroup.vue.d.ts +1 -1
  102. package/dist/DescriptionListTerm.js +1 -1
  103. package/dist/DescriptionListTerm.vue.d.ts +1 -1
  104. package/dist/Dialog.js +26 -30
  105. package/dist/Dialog.js.map +1 -1
  106. package/dist/Dialog.vue.d.ts +34 -34
  107. package/dist/Divider.js +1 -1
  108. package/dist/Divider.js.map +1 -1
  109. package/dist/Divider.vue.d.ts +1 -1
  110. package/dist/Dropdown.js +21 -28
  111. package/dist/Dropdown.js.map +1 -1
  112. package/dist/Dropdown.vue.d.ts +28 -28
  113. package/dist/EmptyState.js +32 -33
  114. package/dist/EmptyState.js.map +1 -1
  115. package/dist/EmptyState.vue.d.ts +36 -36
  116. package/dist/Expand.js +2 -3
  117. package/dist/Expand.js.map +1 -1
  118. package/dist/Expand.vue.d.ts +14 -14
  119. package/dist/{Expand.vue_vue_type_script_setup_true_lang-0f236267.js → Expand.vue_vue_type_script_setup_true_lang-D0fSAtHr.js} +1 -1
  120. package/dist/{Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map → Expand.vue_vue_type_script_setup_true_lang-D0fSAtHr.js.map} +1 -1
  121. package/dist/Field.js +2 -7
  122. package/dist/Field.js.map +1 -1
  123. package/dist/Field.vue.d.ts +30 -30
  124. package/dist/{Field.vue_vue_type_script_setup_true_lang-fded4f75.js → Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js} +2 -2
  125. package/dist/{Field.vue_vue_type_script_setup_true_lang-fded4f75.js.map → Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js.map} +1 -1
  126. package/dist/FileUpload.js +58 -57
  127. package/dist/FileUpload.js.map +1 -1
  128. package/dist/FileUpload.vue.d.ts +28 -28
  129. package/dist/FilterChip.js +12 -17
  130. package/dist/FilterChip.js.map +1 -1
  131. package/dist/FilterChip.vue.d.ts +19 -19
  132. package/dist/FilterDrawerItem.js +24 -30
  133. package/dist/FilterDrawerItem.js.map +1 -1
  134. package/dist/FilterDrawerItem.vue.d.ts +2 -2
  135. package/dist/FilterDropdown.js +41 -57
  136. package/dist/FilterDropdown.js.map +1 -1
  137. package/dist/FilterDropdown.vue.d.ts +9 -9
  138. package/dist/FilterSelect.js +36 -45
  139. package/dist/FilterSelect.js.map +1 -1
  140. package/dist/FilterSelect.vue.d.ts +5 -5
  141. package/dist/Filters.js +60 -96
  142. package/dist/Filters.js.map +1 -1
  143. package/dist/Filters.vue.d.ts +2005 -2294
  144. package/dist/HttpError.js +16 -23
  145. package/dist/HttpError.js.map +1 -1
  146. package/dist/HttpError.vue.d.ts +18 -18
  147. package/dist/Icon.js +28 -22
  148. package/dist/Icon.js.map +1 -1
  149. package/dist/Icon.vue.d.ts +13 -13
  150. package/dist/IconLabel.js +9 -12
  151. package/dist/IconLabel.js.map +1 -1
  152. package/dist/IconLabel.vue.d.ts +17 -17
  153. package/dist/Illustration.js +8 -11
  154. package/dist/Illustration.js.map +1 -1
  155. package/dist/Illustration.vue.d.ts +21 -21
  156. package/dist/{Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js → Illustration.vue_vue_type_script_setup_true_lang-C3qG3Ty6.js} +2 -2
  157. package/dist/{Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map → Illustration.vue_vue_type_script_setup_true_lang-C3qG3Ty6.js.map} +1 -1
  158. package/dist/Image.js.map +1 -1
  159. package/dist/Image.vue.d.ts +18 -18
  160. package/dist/InlineEdit.js +19 -30
  161. package/dist/InlineEdit.js.map +1 -1
  162. package/dist/InlineEdit.vue.d.ts +26 -26
  163. package/dist/Input.js +58 -64
  164. package/dist/Input.js.map +1 -1
  165. package/dist/Input.vue.d.ts +44 -36
  166. package/dist/InputOptions.js +66 -93
  167. package/dist/InputOptions.js.map +1 -1
  168. package/dist/InputOptions.vue.d.ts +66 -58
  169. package/dist/IntegrationIcon.js +2 -2
  170. package/dist/IntegrationIcon.js.map +1 -1
  171. package/dist/IntegrationIcon.vue.d.ts +12 -12
  172. package/dist/Label.js +2 -5
  173. package/dist/Label.js.map +1 -1
  174. package/dist/Label.vue.d.ts +17 -17
  175. package/dist/{Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js → Label.vue_vue_type_script_setup_true_lang-C4JKdqvC.js} +1 -1
  176. package/dist/{Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js.map → Label.vue_vue_type_script_setup_true_lang-C4JKdqvC.js.map} +1 -1
  177. package/dist/LicenseChip.js +10 -16
  178. package/dist/LicenseChip.js.map +1 -1
  179. package/dist/LicenseChip.vue.d.ts +3 -3
  180. package/dist/ListItem.js +5 -8
  181. package/dist/ListItem.js.map +1 -1
  182. package/dist/ListItem.vue.d.ts +275 -225
  183. package/dist/ListItemCell.js +1 -1
  184. package/dist/ListItemCell.js.map +1 -1
  185. package/dist/ListItemCell.vue.d.ts +13 -2
  186. package/dist/ListView.js +57 -101
  187. package/dist/ListView.js.map +1 -1
  188. package/dist/ListView.vue.d.ts +5185 -5430
  189. package/dist/Loading.js +12 -10
  190. package/dist/Loading.js.map +1 -1
  191. package/dist/Loading.vue.d.ts +1 -1
  192. package/dist/Logo.js +2 -4
  193. package/dist/Logo.js.map +1 -1
  194. package/dist/Logo.vue.d.ts +17 -17
  195. package/dist/{Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js → Logo.vue_vue_type_script_setup_true_lang-BfUU9J9O.js} +1 -1
  196. package/dist/{Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map → Logo.vue_vue_type_script_setup_true_lang-BfUU9J9O.js.map} +1 -1
  197. package/dist/Menu.js +1 -1
  198. package/dist/Menu.vue.d.ts +1 -1
  199. package/dist/MenuItem.js +1 -1
  200. package/dist/MenuItem.vue.d.ts +1 -1
  201. package/dist/{MenusPlugin-9288029a.js → MenusPlugin-Bk6UW6o9.js} +1 -1
  202. package/dist/{MenusPlugin-9288029a.js.map → MenusPlugin-Bk6UW6o9.js.map} +1 -1
  203. package/dist/Metric.vue.d.ts +10 -10
  204. package/dist/Modal.js +27 -32
  205. package/dist/Modal.js.map +1 -1
  206. package/dist/Modal.vue.d.ts +42 -42
  207. package/dist/Modals.js +14 -16
  208. package/dist/Modals.js.map +1 -1
  209. package/dist/Modals.vue.d.ts +1 -1
  210. package/dist/ModalsPlugin.js +9 -12
  211. package/dist/ModalsPlugin.js.map +1 -1
  212. package/dist/Module.js +3 -3
  213. package/dist/{Module.keys-2cc7d830.js → Module.keys-CEsrW2f0.js} +1 -1
  214. package/dist/{Module.keys-2cc7d830.js.map → Module.keys-CEsrW2f0.js.map} +1 -1
  215. package/dist/{Module.types-3f78f2a0.js → Module.types-B1FfGGac.js} +1 -1
  216. package/dist/{Module.types-3f78f2a0.js.map → Module.types-B1FfGGac.js.map} +1 -1
  217. package/dist/Module.vue.d.ts +3 -3
  218. package/dist/ModuleContent.js +2 -2
  219. package/dist/ModuleContent.vue.d.ts +1 -1
  220. package/dist/ModuleFooter.js +2 -2
  221. package/dist/ModuleFooter.vue.d.ts +1 -1
  222. package/dist/ModuleHeader.js +3 -3
  223. package/dist/ModuleHeader.vue.d.ts +15 -15
  224. package/dist/ObfuscateText.js +8 -13
  225. package/dist/ObfuscateText.js.map +1 -1
  226. package/dist/ObfuscateText.vue.d.ts +18 -18
  227. package/dist/PageContent.js +1 -1
  228. package/dist/PageContent.vue.d.ts +1 -1
  229. package/dist/PageHeader.js +26 -23
  230. package/dist/PageHeader.js.map +1 -1
  231. package/dist/PageHeader.vue.d.ts +7 -4
  232. package/dist/PageNavigation.js +41 -64
  233. package/dist/PageNavigation.js.map +1 -1
  234. package/dist/PageNavigation.vue.d.ts +10 -10
  235. package/dist/Paginate.js +36 -34
  236. package/dist/Paginate.js.map +1 -1
  237. package/dist/Paginate.vue.d.ts +11 -11
  238. package/dist/PlaidLink.js +3 -5
  239. package/dist/PlaidLink.js.map +1 -1
  240. package/dist/PlaidLink.vue.d.ts +29 -29
  241. package/dist/QuickAction.js +12 -15
  242. package/dist/QuickAction.js.map +1 -1
  243. package/dist/QuickAction.vue.d.ts +1 -1
  244. package/dist/Radio.js +1 -1
  245. package/dist/Radio.js.map +1 -1
  246. package/dist/Radio.vue.d.ts +83 -12
  247. package/dist/RadioGroup.js +41 -45
  248. package/dist/RadioGroup.js.map +1 -1
  249. package/dist/{RadioGroup.keys-974818d6.js → RadioGroup.keys-CqfiKkNz.js} +1 -1
  250. package/dist/{RadioGroup.keys-974818d6.js.map → RadioGroup.keys-CqfiKkNz.js.map} +1 -1
  251. package/dist/RadioGroup.vue.d.ts +30 -30
  252. package/dist/RadioNew.js +2 -2
  253. package/dist/RadioNew.js.map +1 -1
  254. package/dist/RadioNew.vue.d.ts +26 -26
  255. package/dist/RangeInput.js +10 -14
  256. package/dist/RangeInput.js.map +1 -1
  257. package/dist/RangeInput.vue.d.ts +1 -1
  258. package/dist/SearchBar.js +31 -41
  259. package/dist/SearchBar.js.map +1 -1
  260. package/dist/SearchBar.vue.d.ts +22 -22
  261. package/dist/Select.js +66 -78
  262. package/dist/Select.js.map +1 -1
  263. package/dist/Select.vue.d.ts +123 -123
  264. package/dist/SelectStatus.js +47 -69
  265. package/dist/SelectStatus.js.map +1 -1
  266. package/dist/SelectStatus.vue.d.ts +33 -26
  267. package/dist/Skeleton.js +1 -1
  268. package/dist/Skeleton.js.map +1 -1
  269. package/dist/Skeleton.vue.d.ts +9 -9
  270. package/dist/Step.js +10 -14
  271. package/dist/Step.js.map +1 -1
  272. package/dist/Step.vue.d.ts +21 -21
  273. package/dist/Stepper.js +37 -40
  274. package/dist/Stepper.js.map +1 -1
  275. package/dist/Stepper.vue.d.ts +34 -29
  276. package/dist/Switch.js +1 -1
  277. package/dist/Switch.vue.d.ts +23 -23
  278. package/dist/Tab.js +21 -36
  279. package/dist/Tab.js.map +1 -1
  280. package/dist/Table.js +38 -55
  281. package/dist/Table.js.map +1 -1
  282. package/dist/Table.keys-LHQf6FEH.js +7 -0
  283. package/dist/{Table.keys-83e4f09b.js.map → Table.keys-LHQf6FEH.js.map} +1 -1
  284. package/dist/Table.vue.d.ts +36 -36
  285. package/dist/TableCell.js +26 -26
  286. package/dist/TableCell.js.map +1 -1
  287. package/dist/TableCell.vue.d.ts +6 -6
  288. package/dist/TableHeaderCell.js +6 -13
  289. package/dist/TableHeaderCell.js.map +1 -1
  290. package/dist/TableHeaderCell.vue.d.ts +3 -3
  291. package/dist/TableHeaderRow.js +22 -32
  292. package/dist/TableHeaderRow.js.map +1 -1
  293. package/dist/TableHeaderRow.vue.d.ts +8 -8
  294. package/dist/TableRow.js +59 -59
  295. package/dist/TableRow.js.map +1 -1
  296. package/dist/TableRow.vue.d.ts +26 -26
  297. package/dist/Tabs.js +10 -24
  298. package/dist/Tabs.js.map +1 -1
  299. package/dist/Tabs.vue.d.ts +5 -5
  300. package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js → Tabs.vue_vue_type_script_setup_true_lang-l41hWkV4.js} +31 -34
  301. package/dist/Tabs.vue_vue_type_script_setup_true_lang-l41hWkV4.js.map +1 -0
  302. package/dist/TextEditor.js +1269 -1364
  303. package/dist/TextEditor.js.map +1 -1
  304. package/dist/TextEditor.vue.d.ts +46 -46
  305. package/dist/Textarea.js +30 -31
  306. package/dist/Textarea.js.map +1 -1
  307. package/dist/Textarea.vue.d.ts +34 -26
  308. package/dist/Timeline.js +9 -10
  309. package/dist/Timeline.js.map +1 -1
  310. package/dist/Timeline.vue.d.ts +6 -6
  311. package/dist/TimelineItem.js +1 -1
  312. package/dist/TimelineItem.vue.d.ts +1 -1
  313. package/dist/Toast.js +5 -9
  314. package/dist/Toast.js.map +1 -1
  315. package/dist/Toast.vue.d.ts +3 -3
  316. package/dist/Toasts.js +15 -25
  317. package/dist/Toasts.js.map +1 -1
  318. package/dist/Toasts.vue.d.ts +1 -1
  319. package/dist/ToastsPlugin.js +11 -23
  320. package/dist/ToastsPlugin.js.map +1 -1
  321. package/dist/Tooltip.js +1 -1
  322. package/dist/Tooltip.js.map +1 -1
  323. package/dist/Tooltip.vue.d.ts +15 -15
  324. package/dist/{_commonjsHelpers-10dfc225.js → _commonjsHelpers-DaMA6jEr.js} +1 -1
  325. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  326. package/dist/{_plugin-vue_export-helper-dad06003.js → _plugin-vue_export-helper-CHgC5LLL.js} +1 -1
  327. package/dist/_plugin-vue_export-helper-CHgC5LLL.js.map +1 -0
  328. package/dist/{colors-8d9b9429.js → colors-DDDVvqfQ.js} +1 -1
  329. package/dist/{colors-8d9b9429.js.map → colors-DDDVvqfQ.js.map} +1 -1
  330. package/dist/components.css +2 -2
  331. package/dist/directives/observe.js.map +1 -1
  332. package/dist/directives/sticky.js.map +1 -1
  333. package/dist/directives/tooltip.js +21 -27
  334. package/dist/directives/tooltip.js.map +1 -1
  335. package/dist/directives/viewable.js +1 -1
  336. package/dist/directives/viewable.js.map +1 -1
  337. package/dist/{floating-ui.vue-8d7f7932.js → floating-ui.vue-BmfQDqE-.js} +2 -3
  338. package/dist/{floating-ui.vue-8d7f7932.js.map → floating-ui.vue-BmfQDqE-.js.map} +1 -1
  339. package/dist/{formatDateTime-a5e70901.js → formatDateTime-C8CYECpd.js} +8 -12
  340. package/dist/{formatDateTime-a5e70901.js.map → formatDateTime-C8CYECpd.js.map} +1 -1
  341. package/dist/{index-9e1095ef.js → index-D6bxWkZ1.js} +2 -3
  342. package/dist/{index-9e1095ef.js.map → index-D6bxWkZ1.js.map} +1 -1
  343. package/dist/index.d.ts +1 -1
  344. package/dist/index.js +90 -112
  345. package/dist/index.js.map +1 -1
  346. package/dist/{isDefined-2ce6cde4.js → isDefined-DzVx0B6k.js} +1 -1
  347. package/dist/{isDefined-2ce6cde4.js.map → isDefined-DzVx0B6k.js.map} +1 -1
  348. package/dist/{isValid-4b2b7a54.js → isValid-DN-HkCoi.js} +1 -1
  349. package/dist/{isValid-4b2b7a54.js.map → isValid-DN-HkCoi.js.map} +1 -1
  350. package/dist/{keys-241d03b7.js → keys-BEdEsanp.js} +1 -1
  351. package/dist/{keys-241d03b7.js.map → keys-BEdEsanp.js.map} +1 -1
  352. package/dist/{keys-7ecef029.js → keys-C8Zfr_By.js} +1 -1
  353. package/dist/{keys-7ecef029.js.map → keys-C8Zfr_By.js.map} +1 -1
  354. package/dist/{misc-76697f61.js → misc-CHQs-G03.js} +1 -1
  355. package/dist/{misc-76697f61.js.map → misc-CHQs-G03.js.map} +1 -1
  356. package/dist/{parseISO-ed4094c1.js → parseISO-wlfIB_QJ.js} +12 -18
  357. package/dist/{parseISO-ed4094c1.js.map → parseISO-wlfIB_QJ.js.map} +1 -1
  358. package/dist/{searchFuzzy-9b74ec4e.js → searchFuzzy-DKooyZM8.js} +110 -149
  359. package/dist/{searchFuzzy-9b74ec4e.js.map → searchFuzzy-DKooyZM8.js.map} +1 -1
  360. package/dist/{statusLevels-a8b041f4.js → statusLevels-D8EgtE_L.js} +1 -1
  361. package/dist/{statusLevels-a8b041f4.js.map → statusLevels-D8EgtE_L.js.map} +1 -1
  362. package/dist/storage.js +8 -15
  363. package/dist/storage.js.map +1 -1
  364. package/dist/tailwind-base.js.map +1 -1
  365. package/dist/{toTimeZone-a2ed6470.js → toTimeZone-CVE1ZmsS.js} +1 -1
  366. package/dist/{toTimeZone-a2ed6470.js.map → toTimeZone-CVE1ZmsS.js.map} +1 -1
  367. package/dist/useDialog.js +7 -7
  368. package/dist/useGoogleMaps.js +18 -28
  369. package/dist/useGoogleMaps.js.map +1 -1
  370. package/dist/useModals.js +1 -2
  371. package/dist/useModals.js.map +1 -1
  372. package/dist/useScriptTag.js.map +1 -1
  373. package/dist/useSearch.js +14 -19
  374. package/dist/useSearch.js.map +1 -1
  375. package/dist/useStepper.js.map +1 -1
  376. package/dist/useValidation.js +1 -1
  377. package/dist/useValidation.js.map +1 -1
  378. package/dist/utils/calculateElementOverflow.js +9 -13
  379. package/dist/utils/calculateElementOverflow.js.map +1 -1
  380. package/dist/utils/colorScheme.js.map +1 -1
  381. package/dist/utils/createQueryString.js +4 -5
  382. package/dist/utils/createQueryString.js.map +1 -1
  383. package/dist/utils/createValidDate.js +2 -2
  384. package/dist/utils/formatDateTime.js +4 -5
  385. package/dist/utils/formatDateTime.js.map +1 -1
  386. package/dist/utils/getContrastingTextColor.js +1 -1
  387. package/dist/utils/getContrastingTextColor.js.map +1 -1
  388. package/dist/utils/helpers.js.map +1 -1
  389. package/dist/utils/i18n.js +25 -26
  390. package/dist/utils/i18n.js.map +1 -1
  391. package/dist/utils/normalizeDate.js +1 -1
  392. package/dist/utils/searchFuzzy.js +3 -10
  393. package/dist/utils/searchFuzzy.js.map +1 -1
  394. package/dist/utils/storage.js +6 -11
  395. package/dist/utils/storage.js.map +1 -1
  396. package/dist/utils/toTimeZone.js +2 -3
  397. package/dist/utils/toTimeZone.js.map +1 -1
  398. package/package.json +13 -14
  399. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js +0 -17
  400. package/dist/Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js.map +0 -1
  401. package/dist/Carousel.types.d.ts +0 -33
  402. package/dist/Carousel.types.js +0 -2
  403. package/dist/Carousel.types.js.map +0 -1
  404. package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js +0 -9
  405. package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js.map +0 -1
  406. package/dist/DataView.vue_used_vue_type_style_index_0_lang.module-5c180dba.js.map +0 -1
  407. package/dist/EmptyState.vue_used_vue_type_style_index_0_lang.module-f5d89366.js +0 -8
  408. package/dist/EmptyState.vue_used_vue_type_style_index_0_lang.module-f5d89366.js.map +0 -1
  409. package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js +0 -11
  410. package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js.map +0 -1
  411. package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js +0 -8
  412. package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js.map +0 -1
  413. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js +0 -11
  414. package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js.map +0 -1
  415. package/dist/Table.keys-83e4f09b.js +0 -27
  416. package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js.map +0 -1
  417. package/dist/_commonjsHelpers-10dfc225.js.map +0 -1
  418. package/dist/_plugin-vue_export-helper-dad06003.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../src/components/RadioGroup/components/VariantButton.vue","../src/components/RadioGroup/components/VariantChip.vue","../src/components/RadioGroup/components/VariantRadio.vue","../src/components/RadioGroup/components/VariantTile.vue","../src/components/RadioGroup/RadioGroup.types.ts","../src/components/RadioGroup/RadioGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantButton must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-flex\" :class=\"classes.root\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"tw-sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style module>\n .root label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.semibold');\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root > div:first-child label {\n border-top-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .root > div:last-child label {\n border-top-right-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n\n .root > div:not(:first-child) label {\n margin-left: -1px;\n }\n\n .root > div:not(:last-child) label {\n border-right-color: transparent;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantChip must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-my-1.5 tw-flex tw-flex-wrap\" :class=\"classes.root\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"tw-sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style module>\n .root {\n gap: theme('spacing.6');\n }\n\n .root label {\n padding: theme('spacing[1.5]') theme('spacing.3');\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.normal');\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-white);\n background-color: var(--color-blue-500);\n font-weight: theme('fontWeight.bold');\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantRadio must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-flex tw-flex-wrap\" :class=\"classes.root\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style module>\n .root {\n gap: theme('spacing.6');\n }\n\n .root label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .root input {\n appearance: none;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 5px;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n .root input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantTile must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-flex tw-flex-wrap\" :class=\"classes.root\">\n <label\n v-for=\"option in options\"\n :key=\"`${name}-${option.id}`\"\n :class=\"[classes['tile-container'], { 'tw-w-full': fullWidth }]\"\n :for=\"`${name}-${option.id}`\"\n >\n <div\n class=\"tw-flex tw-border\"\n :class=\"[\n classes['tile-header'],\n {\n 'tw-border-blue-500 tw-bg-blue-100 tw-text-ice-900': modelValue === option.value,\n 'tw-border-ice-500 tw-bg-ice-100 tw-text-ice-700': modelValue !== option.value,\n },\n ]\"\n >\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"tw-sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <div>\n <span>\n {{ option.text }}\n </span>\n </div>\n </div>\n <div\n class=\"tw-border-x tw-border-b\"\n :class=\"[\n classes['tile-body'],\n {\n 'tw-border-ice-500': modelValue !== option.value,\n 'tw-border-blue-500': modelValue === option.value,\n },\n ]\"\n >\n <p class=\"tw-m-0 tw-text-ice-900\">{{ option.subTitle }}</p>\n <p class=\"tw-m-0 tw-text-ice-700\">{{ option.subText }}</p>\n </div>\n </label>\n </div>\n</template>\n\n<style module>\n .root {\n gap: theme('spacing.6');\n }\n\n .root label {\n cursor: pointer;\n user-select: none;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n\n .root label.tile-container {\n border-radius: theme('borderRadius.DEFAULT');\n display: flex;\n flex: 1;\n flex-direction: column;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT') 0 0;\n padding: theme('spacing.3') 0;\n }\n\n .root label.tile-container:hover .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .tile-body {\n border-radius: 0 0 theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT');\n background-color: var(--color-white);\n padding: theme('spacing.6');\n display: flex;\n flex-direction: column;\n }\n\n .root label.tile-container:hover .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n\n .root input {\n appearance: none;\n background-color: var(--color-white);\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n }\n\n .root input ~ div {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root label.tile-container input {\n margin-left: theme('spacing.3');\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n @media screen and (width <= 640px) {\n .root {\n flex-direction: column;\n }\n }\n</style>\n","import { ComputedRef } from 'vue';\n\nexport enum RadioGroupVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioGroupVariants = `${RadioGroupVariant}`;\n\n/**\n * An individual radio `<input>` within a RadioGroup instance\n */\nexport interface RadioGroupOption {\n /**\n * Disables the RadioGroupOption if truthy\n */\n disabled?: boolean;\n\n /**\n * The unique identifier for the option\n */\n id: string;\n\n /**\n * The text to be displayed for the option\n */\n text: string;\n\n /**\n * The value of the option. Used for the modelValue of the RadioGroup.\n */\n value: string;\n\n /**\n * The subtitle for tile variant\n */\n subTitle?: string;\n\n /**\n * The subtext for tile variant\n */\n subText?: string;\n}\n\n/**\n * Properties and utilities provided to children of a RadioGroup instance\n */\nexport interface RadioGroupInjection {\n /**\n * This type should match RadioGroupProps['disabled']\n */\n disabled: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['fullWidth']\n */\n fullWidth: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['modelValue']\n */\n modelValue: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['name']\n */\n name: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['options']\n */\n options: ComputedRef<RadioGroupOption[] | undefined>;\n\n /**\n * Triggered when the user changes their selection; updates the v-model.\n */\n update: (e: Event) => void;\n\n /**\n * This type should match RadioGroupProps['variant']\n * @default 'radio'\n */\n variant: ComputedRef<RadioGroupVariants | undefined>;\n}\n","<script lang=\"ts\">\n import { RadioGroupOption, RadioGroupVariant, RadioGroupVariants } from './RadioGroup.types';\n\n export * from './RadioGroup.keys';\n export * from './RadioGroup.types';\n\n export interface RadioGroupProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` elements within the RadioGroup.\n */\n name?: string;\n\n /**\n * Deprecated - Compose your radio group with the `Radio` component instead\n * @deprecated\n */\n options?: RadioGroupOption[];\n\n /**\n * The value of the selected radio option. Use this prop with the `update:modelValue` event to create a controlled component.\n */\n modelValue?: RadioGroupOption['value'];\n\n /**\n * @defaultValue 'radio'\n */\n variant?: RadioGroupVariants;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Adds spacing under the field that is consistent whether hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n }\n</script>\n\n<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, provide } from 'vue';\n\n import Field from '../Field/Field.vue';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RADIO_GROUP_INJECTION } from './RadioGroup.keys';\n\n const variantComponentsMap = {\n [RadioGroupVariant.Button]: VariantButton,\n [RadioGroupVariant.Chip]: VariantChip,\n [RadioGroupVariant.Radio]: VariantRadio,\n [RadioGroupVariant.Tile]: VariantTile,\n };\n\n const props = withDefaults(defineProps<RadioGroupProps>(), {\n variant: 'radio',\n disabled: false,\n fullWidth: false,\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n modelValue: undefined,\n name: undefined,\n options: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Occurs when the user selects a radio option. Also, it enables v-model usage on the component.\n */\n (e: 'update:modelValue', value: RadioGroupOption['value']): void;\n }>();\n\n function update(e: Event) {\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n\n const errorId = uniqueId('radio-group-field-error-');\n\n provide(RADIO_GROUP_INJECTION.key, {\n name: computed(() => props.name),\n disabled: computed(() => props.disabled),\n fullWidth: computed(() => props.fullWidth),\n modelValue: computed(() => props.modelValue),\n options: computed(() => props.options),\n variant: computed(() => props.variant),\n update,\n });\n</script>\n\n<template>\n <Field\n class=\"stash-radio-group\"\n data-test=\"stash-radio-group\"\n :aria-errormessage=\"errorId\"\n :aria-invalid=\"!!props.errorText\"\n role=\"radiogroup\"\n fieldset\n :label=\"props.label\"\n :add-bottom-space=\"props.addBottomSpace\"\n :error-id=\"errorId\"\n :error-text=\"props.errorText\"\n :hint-text=\"props.hintText\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n :is-required=\"props.isRequired\"\n :is-read-only=\"props.isReadOnly\"\n >\n <slot v-if=\"props.options\">\n <component :is=\"variantComponentsMap[props.variant]\" />\n </slot>\n <div\n v-else\n class=\"tw-flex\"\n :class=\"{\n 'tw-flex-wrap': props.variant !== RadioGroupVariant.Button,\n 'tw-gap-x-1.5 tw-gap-y-3': props.variant === RadioGroupVariant.Chip,\n 'tw-gap-6': props.variant === RadioGroupVariant.Radio || props.variant === RadioGroupVariant.Tile,\n }\"\n >\n <slot></slot>\n </div>\n </Field>\n</template>\n\n<style scoped>\n .stash-radio-group :global(.stash-field-hint),\n .stash-radio-group :global(.stash-field-error) {\n display: block;\n width: 100%;\n }\n\n .stash-radio-group > :global(.stash-label) {\n margin-bottom: 4px;\n }\n</style>\n"],"names":["radioGroupInjection","inject","RADIO_GROUP_INJECTION","name","disabled","fullWidth","modelValue","options","update","classes","useCssModule","RadioGroupVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","props","__props","emit","__emit","e","errorId","uniqueId","provide","computed"],"mappings":";;;;;;;;;;;AAKQ,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,wDAAwD;AAG1E,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPV,UAAAV,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPV,UAAAV,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,uDAAuD;AAGzE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPV,UAAAV,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVN,IAAAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;ACoFV,UAAMC,IAAuB;AAAA,MAC3B,CAACD,EAAkB,MAAM,GAAGE;AAAA,MAC5B,CAACF,EAAkB,IAAI,GAAGG;AAAA,MAC1B,CAACH,EAAkB,KAAK,GAAGI;AAAA,MAC3B,CAACJ,EAAkB,IAAI,GAAGK;AAAA,IAAA,GAGtBC,IAAQC,GAYRC,IAAOC;AAOb,aAASZ,EAAOa,GAAU;AACnB,MAAAF,EAAA,qBAAsBE,EAAE,OAA4B,KAAK;AAAA,IAChE;AAEM,UAAAC,IAAUC,EAAS,0BAA0B;AAEnD,WAAAC,EAAQtB,EAAsB,KAAK;AAAA,MACjC,MAAMuB,EAAS,MAAMR,EAAM,IAAI;AAAA,MAC/B,UAAUQ,EAAS,MAAMR,EAAM,QAAQ;AAAA,MACvC,WAAWQ,EAAS,MAAMR,EAAM,SAAS;AAAA,MACzC,YAAYQ,EAAS,MAAMR,EAAM,UAAU;AAAA,MAC3C,SAASQ,EAAS,MAAMR,EAAM,OAAO;AAAA,MACrC,SAASQ,EAAS,MAAMR,EAAM,OAAO;AAAA,MACrC,QAAAT;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../src/components/RadioGroup/components/VariantButton.vue","../src/components/RadioGroup/components/VariantChip.vue","../src/components/RadioGroup/components/VariantRadio.vue","../src/components/RadioGroup/components/VariantTile.vue","../src/components/RadioGroup/RadioGroup.types.ts","../src/components/RadioGroup/RadioGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantButton must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-flex\" :class=\"classes.root\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"tw-sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style module>\n .root label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.semibold');\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root > div:first-child label {\n border-top-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .root > div:last-child label {\n border-top-right-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n\n .root > div:not(:first-child) label {\n margin-left: -1px;\n }\n\n .root > div:not(:last-child) label {\n border-right-color: transparent;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantChip must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-my-1.5 tw-flex tw-flex-wrap\" :class=\"classes.root\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"tw-sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style module>\n .root {\n gap: theme('spacing.6');\n }\n\n .root label {\n padding: theme('spacing[1.5]') theme('spacing.3');\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.normal');\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue-500);\n color: var(--color-white);\n background-color: var(--color-blue-500);\n font-weight: theme('fontWeight.bold');\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantRadio must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-flex tw-flex-wrap\" :class=\"classes.root\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'tw-w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style module>\n .root {\n gap: theme('spacing.6');\n }\n\n .root label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .root input {\n appearance: none;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 5px;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n .root input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject, useCssModule } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantTile must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n const classes = useCssModule();\n</script>\n\n<template>\n <div class=\"tw-flex tw-flex-wrap\" :class=\"classes.root\">\n <label\n v-for=\"option in options\"\n :key=\"`${name}-${option.id}`\"\n :class=\"[classes['tile-container'], { 'tw-w-full': fullWidth }]\"\n :for=\"`${name}-${option.id}`\"\n >\n <div\n class=\"tw-flex tw-border\"\n :class=\"[\n classes['tile-header'],\n {\n 'tw-border-blue-500 tw-bg-blue-100 tw-text-ice-900': modelValue === option.value,\n 'tw-border-ice-500 tw-bg-ice-100 tw-text-ice-700': modelValue !== option.value,\n },\n ]\"\n >\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"tw-sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <div>\n <span>\n {{ option.text }}\n </span>\n </div>\n </div>\n <div\n class=\"tw-border-x tw-border-b\"\n :class=\"[\n classes['tile-body'],\n {\n 'tw-border-ice-500': modelValue !== option.value,\n 'tw-border-blue-500': modelValue === option.value,\n },\n ]\"\n >\n <p class=\"tw-m-0 tw-text-ice-900\">{{ option.subTitle }}</p>\n <p class=\"tw-m-0 tw-text-ice-700\">{{ option.subText }}</p>\n </div>\n </label>\n </div>\n</template>\n\n<style module>\n .root {\n gap: theme('spacing.6');\n }\n\n .root label {\n cursor: pointer;\n user-select: none;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n\n .root label.tile-container {\n border-radius: theme('borderRadius.DEFAULT');\n display: flex;\n flex: 1;\n flex-direction: column;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT') 0 0;\n padding: theme('spacing.3') 0;\n }\n\n .root label.tile-container:hover .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .tile-body {\n border-radius: 0 0 theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT');\n background-color: var(--color-white);\n padding: theme('spacing.6');\n display: flex;\n flex-direction: column;\n }\n\n .root label.tile-container:hover .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n\n .root input {\n appearance: none;\n background-color: var(--color-white);\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n }\n\n .root input ~ div {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .root label.tile-container input {\n margin-left: theme('spacing.3');\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, transparent 54%);\n }\n\n @media screen and (width <= 640px) {\n .root {\n flex-direction: column;\n }\n }\n</style>\n","import { ComputedRef } from 'vue';\n\nexport enum RadioGroupVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioGroupVariants = `${RadioGroupVariant}`;\n\n/**\n * An individual radio `<input>` within a RadioGroup instance\n */\nexport interface RadioGroupOption {\n /**\n * Disables the RadioGroupOption if truthy\n */\n disabled?: boolean;\n\n /**\n * The unique identifier for the option\n */\n id: number | string;\n\n /**\n * The text to be displayed for the option\n */\n text: string;\n\n /**\n * The value of the option. Used for the modelValue of the RadioGroup.\n */\n value: string;\n\n /**\n * The subtitle for tile variant\n */\n subTitle?: string;\n\n /**\n * The subtext for tile variant\n */\n subText?: string;\n}\n\n/**\n * Properties and utilities provided to children of a RadioGroup instance\n */\nexport interface RadioGroupInjection {\n /**\n * This type should match RadioGroupProps['disabled']\n */\n disabled: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['fullWidth']\n */\n fullWidth: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['modelValue']\n */\n modelValue: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['name']\n */\n name: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['options']\n */\n options: ComputedRef<RadioGroupOption[] | undefined>;\n\n /**\n * Triggered when the user changes their selection; updates the v-model.\n */\n update: (e: Event) => void;\n\n /**\n * This type should match RadioGroupProps['variant']\n * @default 'radio'\n */\n variant: ComputedRef<RadioGroupVariants | undefined>;\n}\n","<script lang=\"ts\">\n import { RadioGroupOption, RadioGroupVariant, RadioGroupVariants } from './RadioGroup.types';\n\n export * from './RadioGroup.keys';\n export * from './RadioGroup.types';\n\n export interface RadioGroupProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` elements within the RadioGroup.\n */\n name?: string;\n\n /**\n * Deprecated - Compose your radio group with the `Radio` component instead\n * @deprecated\n */\n options?: RadioGroupOption[];\n\n /**\n * The value of the selected radio option. Use this prop with the `update:modelValue` event to create a controlled component.\n */\n modelValue?: RadioGroupOption['value'];\n\n /**\n * @defaultValue 'radio'\n */\n variant?: RadioGroupVariants;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Adds spacing under the field that is consistent whether hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n }\n</script>\n\n<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, provide } from 'vue';\n\n import Field from '../Field/Field.vue';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RADIO_GROUP_INJECTION } from './RadioGroup.keys';\n\n const variantComponentsMap = {\n [RadioGroupVariant.Button]: VariantButton,\n [RadioGroupVariant.Chip]: VariantChip,\n [RadioGroupVariant.Radio]: VariantRadio,\n [RadioGroupVariant.Tile]: VariantTile,\n };\n\n const props = withDefaults(defineProps<RadioGroupProps>(), {\n variant: 'radio',\n disabled: false,\n fullWidth: false,\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n modelValue: undefined,\n name: undefined,\n options: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Occurs when the user selects a radio option. Also, it enables v-model usage on the component.\n */\n (e: 'update:modelValue', value: RadioGroupOption['value']): void;\n }>();\n\n function update(e: Event) {\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n\n const errorId = uniqueId('radio-group-field-error-');\n\n provide(RADIO_GROUP_INJECTION.key, {\n name: computed(() => props.name),\n disabled: computed(() => props.disabled),\n fullWidth: computed(() => props.fullWidth),\n modelValue: computed(() => props.modelValue),\n options: computed(() => props.options),\n variant: computed(() => props.variant),\n update,\n });\n</script>\n\n<template>\n <Field\n class=\"stash-radio-group\"\n data-test=\"stash-radio-group\"\n :aria-errormessage=\"errorId\"\n :aria-invalid=\"!!props.errorText\"\n role=\"radiogroup\"\n fieldset\n :label=\"props.label\"\n :add-bottom-space=\"props.addBottomSpace\"\n :error-id=\"errorId\"\n :error-text=\"props.errorText\"\n :hint-text=\"props.hintText\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n :is-required=\"props.isRequired\"\n :is-read-only=\"props.isReadOnly\"\n >\n <slot v-if=\"props.options\">\n <component :is=\"variantComponentsMap[props.variant]\" />\n </slot>\n <div\n v-else\n class=\"tw-flex\"\n :class=\"{\n 'tw-flex-wrap': props.variant !== RadioGroupVariant.Button,\n 'tw-gap-x-1.5 tw-gap-y-3': props.variant === RadioGroupVariant.Chip,\n 'tw-gap-6': props.variant === RadioGroupVariant.Radio || props.variant === RadioGroupVariant.Tile,\n }\"\n >\n <slot></slot>\n </div>\n </Field>\n</template>\n\n<style scoped>\n .stash-radio-group :global(.stash-field-hint),\n .stash-radio-group :global(.stash-field-error) {\n display: block;\n width: 100%;\n }\n\n .stash-radio-group > :global(.stash-label) {\n margin-bottom: 4px;\n }\n</style>\n"],"names":["radioGroupInjection","inject","RADIO_GROUP_INJECTION","name","disabled","fullWidth","modelValue","options","update","classes","useCssModule","RadioGroupVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","props","__props","emit","__emit","e","errorId","uniqueId","provide","computed"],"mappings":";;;;;;;;AAKQ,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,wDAAwD;AAG1E,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPV,UAAAV,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPV,UAAAV,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,uDAAuD;AAGzE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPV,UAAAV,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR,GAC7DS,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVN,IAAAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;ACoFV,UAAMC,IAAuB;AAAA,MAC3B,CAACD,EAAkB,MAAM,GAAGE;AAAA,MAC5B,CAACF,EAAkB,IAAI,GAAGG;AAAA,MAC1B,CAACH,EAAkB,KAAK,GAAGI;AAAA,MAC3B,CAACJ,EAAkB,IAAI,GAAGK;AAAA,IAAA,GAGtBC,IAAQC,GAYRC,IAAOC;AAOb,aAASZ,EAAOa,GAAU;AACnB,MAAAF,EAAA,qBAAsBE,EAAE,OAA4B,KAAK;AAAA,IAChE;AAEM,UAAAC,IAAUC,EAAS,0BAA0B;AAEnD,WAAAC,EAAQtB,EAAsB,KAAK;AAAA,MACjC,MAAMuB,EAAS,MAAMR,EAAM,IAAI;AAAA,MAC/B,UAAUQ,EAAS,MAAMR,EAAM,QAAQ;AAAA,MACvC,WAAWQ,EAAS,MAAMR,EAAM,SAAS;AAAA,MACzC,YAAYQ,EAAS,MAAMR,EAAM,UAAU;AAAA,MAC3C,SAASQ,EAAS,MAAMR,EAAM,OAAO;AAAA,MACrC,SAASQ,EAAS,MAAMR,EAAM,OAAO;AAAA,MACrC,QAAAT;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,4 +4,4 @@ const I = {
4
4
  export {
5
5
  I as R
6
6
  };
7
- //# sourceMappingURL=RadioGroup.keys-974818d6.js.map
7
+ //# sourceMappingURL=RadioGroup.keys-CqfiKkNz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.keys-974818d6.js","sources":["../src/components/RadioGroup/RadioGroup.keys.ts"],"sourcesContent":["import { InjectionKey } from 'vue';\n\nimport { RadioGroupInjection } from './RadioGroup.types';\n\nexport const RADIO_GROUP_INJECTION = {\n key: Symbol('RADIO_GROUP_INJECTION_KEY') as InjectionKey<RadioGroupInjection>,\n};\n"],"names":["RADIO_GROUP_INJECTION"],"mappings":"AAIO,MAAMA,IAAwB;AAAA,EACnC,KAAK,OAAO,2BAA2B;AACzC;"}
1
+ {"version":3,"file":"RadioGroup.keys-CqfiKkNz.js","sources":["../src/components/RadioGroup/RadioGroup.keys.ts"],"sourcesContent":["import { InjectionKey } from 'vue';\n\nimport { RadioGroupInjection } from './RadioGroup.types';\n\nexport const RADIO_GROUP_INJECTION = {\n key: Symbol('RADIO_GROUP_INJECTION_KEY') as InjectionKey<RadioGroupInjection>,\n};\n"],"names":["RADIO_GROUP_INJECTION"],"mappings":"AAIO,MAAMA,IAAwB;AAAA,EACnC,KAAK,OAAO,2BAA2B;AACzC;"}
@@ -35,39 +35,39 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
35
35
  };
36
36
 
37
37
  declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RadioGroupProps>, {
38
- variant: string;
39
- disabled: boolean;
40
- fullWidth: boolean;
41
- errorText: undefined;
42
- hintText: undefined;
43
- label: undefined;
44
- modelValue: undefined;
45
- name: undefined;
46
- options: undefined;
38
+ variant: string;
39
+ disabled: boolean;
40
+ fullWidth: boolean;
41
+ errorText: undefined;
42
+ hintText: undefined;
43
+ label: undefined;
44
+ modelValue: undefined;
45
+ name: undefined;
46
+ options: undefined;
47
47
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
48
- "update:modelValue": (value: string) => void;
48
+ "update:modelValue": (value: string) => void;
49
49
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RadioGroupProps>, {
50
- variant: string;
51
- disabled: boolean;
52
- fullWidth: boolean;
53
- errorText: undefined;
54
- hintText: undefined;
55
- label: undefined;
56
- modelValue: undefined;
57
- name: undefined;
58
- options: undefined;
50
+ variant: string;
51
+ disabled: boolean;
52
+ fullWidth: boolean;
53
+ errorText: undefined;
54
+ hintText: undefined;
55
+ label: undefined;
56
+ modelValue: undefined;
57
+ name: undefined;
58
+ options: undefined;
59
59
  }>>> & Readonly<{
60
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
60
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
61
61
  }>, {
62
- name: string;
63
- disabled: boolean;
64
- label: string;
65
- errorText: string;
66
- hintText: string;
67
- options: RadioGroupOption[];
68
- modelValue: string;
69
- variant: "button" | "radio" | "tile" | "chip";
70
- fullWidth: boolean;
62
+ name: string;
63
+ disabled: boolean;
64
+ label: string;
65
+ errorText: string;
66
+ hintText: string;
67
+ options: RadioGroupOption[];
68
+ modelValue: string;
69
+ variant: "button" | "radio" | "tile" | "chip";
70
+ fullWidth: boolean;
71
71
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
72
72
  default?(_: {}): any;
73
73
  }>;
@@ -123,7 +123,7 @@ export declare interface RadioGroupOption {
123
123
  /**
124
124
  * The unique identifier for the option
125
125
  */
126
- id: string;
126
+ id: number | string;
127
127
  /**
128
128
  * The text to be displayed for the option
129
129
  */
package/dist/RadioNew.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as p, useCssModule as v, openBlock as _, createElementBlock as f, normalizeClass as d, unref as s, createElementVNode as i, toDisplayString as $, withDirectives as W, vShow as C, renderSlot as y, inject as M, computed as r, createBlock as x, resolveDynamicComponent as N, withCtx as D } from "vue";
2
- import { R as E } from "./RadioGroup.keys-974818d6.js";
3
- import { _ as h } from "./_plugin-vue_export-helper-dad06003.js";
2
+ import { R as E } from "./RadioGroup.keys-CqfiKkNz.js";
3
+ import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const R = ["id", "name", "value", "checked", "disabled"], T = ["for"], g = /* @__PURE__ */ p({
5
5
  __name: "VariantButton",
6
6
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"RadioNew.js","sources":["../src/components/RadioNew/components/VariantButton.vue","../src/components/RadioNew/components/VariantChip.vue","../src/components/RadioNew/components/VariantRadio.vue","../src/components/RadioNew/components/VariantTile.vue","../src/components/RadioNew/Radio.types.ts","../src/components/RadioNew/RadioNew.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.semibold');\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root:first-of-type .label {\n border-top-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:last-of-type .label {\n border-top-right-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:not(:first-of-type) .label {\n margin-left: -1px;\n }\n\n .root:not(:last-of-type) .label {\n border-right-color: transparent;\n }\n\n .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n display: inline-block;\n padding: theme('spacing.1') theme('spacing.3');\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.normal');\n line-height: 1.375rem;\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: theme('colors.white');\n background-color: var(--color-blue-500);\n font-weight: theme('fontWeight.bold');\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div class=\"tw-flex\" :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label\n v-show=\"props.label\"\n :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n border-radius: 50%;\n min-width: 20px;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled {\n background-image: radial-gradient(var(--color-ice-100) 100%, var(--color-ice-100) 100%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .input:disabled ~ .label {\n cursor: auto;\n }\n\n .input:hover:not(:disabled) ~ .label {\n color: var(--color-ice-900);\n }\n\n .input:not(:disabled) ~ .label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <label\n :class=\"[classes.root, { 'tw-w-full': props.fullWidth, [classes['root--disabled']]: props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n <div\n class=\"tw-flex tw-border\"\n :class=\"[\n classes['tile-header'],\n {\n 'tw-border-blue-500 tw-bg-blue-100': props.modelValue === props.value && !props.disabled,\n 'tw-border-ice-500 tw-bg-ice-100': props.modelValue !== props.value || props.disabled,\n },\n ]\"\n >\n <input\n :id=\"`${props.name}-${props.id}`\"\n :aria-labelledby=\"`tile-label-${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <div :id=\"`tile-label-${props.name}-${props.id}`\" :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\">\n {{ props.label }}\n </div>\n </div>\n <div\n :class=\"[\n classes['tile-body'],\n {\n 'tw-border-ice-500': props.modelValue !== props.value || props.disabled,\n 'tw-border-blue-500': props.modelValue === props.value && !props.disabled,\n },\n ]\"\n >\n <slot></slot>\n </div>\n </label>\n</template>\n\n<style module>\n .root {\n border-radius: theme('borderRadius.DEFAULT');\n cursor: pointer;\n display: flex;\n flex: 1;\n flex-direction: column;\n user-select: none;\n }\n\n .root--disabled {\n cursor: auto;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT') 0 0;\n padding: theme('spacing.3') 0;\n }\n\n .root:hover:not(.root--disabled) .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n background-color: theme('colors.white');\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n margin-left: theme('spacing.3');\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .tile-body {\n border-radius: 0 0 theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT');\n border-width: 0 1px 1px 1px;\n background-color: theme('colors.white');\n padding: theme('spacing.6');\n display: flex;\n flex-direction: column;\n }\n\n .root:hover:not(.root--disabled) .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n</style>\n","export enum RadioVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioVariants = `${RadioVariant}`;\n","<script lang=\"ts\">\n export * from './Radio.types';\n\n export interface RadioProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Adds error styling\n */\n hasError?: boolean;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * the styling for the radio button @defaultValue 'radio'\n */\n variant?: RadioVariants;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup/RadioGroup.keys';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RadioVariant, RadioVariants } from './Radio.types';\n\n const variantComponentsMap = {\n [RadioVariant.Button]: VariantButton,\n [RadioVariant.Chip]: VariantChip,\n [RadioVariant.Radio]: VariantRadio,\n [RadioVariant.Tile]: VariantTile,\n };\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key, null);\n\n const props = withDefaults(defineProps<RadioProps>(), {\n disabled: false,\n fullWidth: false,\n hasError: false,\n id: undefined,\n label: '',\n modelValue: undefined,\n name: undefined,\n variant: undefined,\n });\n\n /**\n * use prop values but fallback to radio group context values if they are provided\n */\n const derivedModelValue = computed(() => props.modelValue || radioGroupInjection?.modelValue.value);\n const derivedName = computed(() => props.name || radioGroupInjection?.name.value);\n const derivedNameFullWidth = computed(() => props.fullWidth || radioGroupInjection?.fullWidth.value);\n const derivedDisabled = computed(() => props.disabled || radioGroupInjection?.disabled.value);\n const derivedVariant = computed<RadioVariants>(() => props.variant || radioGroupInjection?.variant.value || 'radio');\n\n const emit = defineEmits<{\n (e: 'update:modelValue', value: RadioProps['value']): void;\n }>();\n\n function onInput(e: Event) {\n if (radioGroupInjection?.update) {\n radioGroupInjection.update(e);\n\n return;\n }\n\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n</script>\n\n<template>\n <component\n :is=\"variantComponentsMap[derivedVariant]\"\n :id=\"props.id\"\n :disabled=\"derivedDisabled\"\n :has-error=\"props.hasError\"\n :full-width=\"derivedNameFullWidth\"\n :label=\"props.label\"\n :model-value=\"derivedModelValue\"\n :name=\"derivedName\"\n :value=\"props.value\"\n @input=\"onInput\"\n >\n <slot></slot>\n </component>\n</template>\n"],"names":["props","__props","classes","useCssModule","emit","__emit","RadioVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","radioGroupInjection","inject","RADIO_GROUP_INJECTION","derivedModelValue","computed","derivedName","derivedNameFullWidth","derivedDisabled","derivedVariant","onInput","e"],"mappings":";;;;;;;;;;;;;;;;AAyCE,UAAMA,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHb,UAAML,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHb,UAAML,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHb,UAAML,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5CH,IAAAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;AC8DV,UAAMC,IAAuB;AAAA,MAC3B,CAACD,EAAa,MAAM,GAAGE;AAAA,MACvB,CAACF,EAAa,IAAI,GAAGG;AAAA,MACrB,CAACH,EAAa,KAAK,GAAGI;AAAA,MACtB,CAACJ,EAAa,IAAI,GAAGK;AAAA,IAAA,GAGjBC,IAAsBC,EAAOC,EAAsB,KAAK,IAAI,GAE5Dd,IAAQC,GAcRc,IAAoBC,EAAS,MAAMhB,EAAM,eAAcY,KAAA,gBAAAA,EAAqB,WAAW,MAAK,GAC5FK,IAAcD,EAAS,MAAMhB,EAAM,SAAQY,KAAA,gBAAAA,EAAqB,KAAK,MAAK,GAC1EM,IAAuBF,EAAS,MAAMhB,EAAM,cAAaY,KAAA,gBAAAA,EAAqB,UAAU,MAAK,GAC7FO,IAAkBH,EAAS,MAAMhB,EAAM,aAAYY,KAAA,gBAAAA,EAAqB,SAAS,MAAK,GACtFQ,IAAiBJ,EAAwB,MAAMhB,EAAM,YAAWY,KAAA,gBAAAA,EAAqB,QAAQ,UAAS,OAAO,GAE7GR,IAAOC;AAIb,aAASgB,EAAQC,GAAU;AACzB,UAAIV,KAAA,QAAAA,EAAqB,QAAQ;AAC/B,QAAAA,EAAoB,OAAOU,CAAC;AAE5B;AAAA;AAGG,MAAAlB,EAAA,qBAAsBkB,EAAE,OAA4B,KAAK;AAAA,IAChE;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioNew.js","sources":["../src/components/RadioNew/components/VariantButton.vue","../src/components/RadioNew/components/VariantChip.vue","../src/components/RadioNew/components/VariantRadio.vue","../src/components/RadioNew/components/VariantTile.vue","../src/components/RadioNew/Radio.types.ts","../src/components/RadioNew/RadioNew.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.semibold');\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root:first-of-type .label {\n border-top-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:last-of-type .label {\n border-top-right-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:not(:first-of-type) .label {\n margin-left: -1px;\n }\n\n .root:not(:last-of-type) .label {\n border-right-color: transparent;\n }\n\n .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n display: inline-block;\n padding: theme('spacing.1') theme('spacing.3');\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.normal');\n line-height: 1.375rem;\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: theme('colors.white');\n background-color: var(--color-blue-500);\n font-weight: theme('fontWeight.bold');\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div class=\"tw-flex\" :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label\n v-show=\"props.label\"\n :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n border-radius: 50%;\n min-width: 20px;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled {\n background-image: radial-gradient(var(--color-ice-100) 100%, var(--color-ice-100) 100%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .input:disabled ~ .label {\n cursor: auto;\n }\n\n .input:hover:not(:disabled) ~ .label {\n color: var(--color-ice-900);\n }\n\n .input:not(:disabled) ~ .label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <label\n :class=\"[classes.root, { 'tw-w-full': props.fullWidth, [classes['root--disabled']]: props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n <div\n class=\"tw-flex tw-border\"\n :class=\"[\n classes['tile-header'],\n {\n 'tw-border-blue-500 tw-bg-blue-100': props.modelValue === props.value && !props.disabled,\n 'tw-border-ice-500 tw-bg-ice-100': props.modelValue !== props.value || props.disabled,\n },\n ]\"\n >\n <input\n :id=\"`${props.name}-${props.id}`\"\n :aria-labelledby=\"`tile-label-${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <div :id=\"`tile-label-${props.name}-${props.id}`\" :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\">\n {{ props.label }}\n </div>\n </div>\n <div\n :class=\"[\n classes['tile-body'],\n {\n 'tw-border-ice-500': props.modelValue !== props.value || props.disabled,\n 'tw-border-blue-500': props.modelValue === props.value && !props.disabled,\n },\n ]\"\n >\n <slot></slot>\n </div>\n </label>\n</template>\n\n<style module>\n .root {\n border-radius: theme('borderRadius.DEFAULT');\n cursor: pointer;\n display: flex;\n flex: 1;\n flex-direction: column;\n user-select: none;\n }\n\n .root--disabled {\n cursor: auto;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT') 0 0;\n padding: theme('spacing.3') 0;\n }\n\n .root:hover:not(.root--disabled) .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n background-color: theme('colors.white');\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n margin-left: theme('spacing.3');\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .tile-body {\n border-radius: 0 0 theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT');\n border-width: 0 1px 1px 1px;\n background-color: theme('colors.white');\n padding: theme('spacing.6');\n display: flex;\n flex-direction: column;\n }\n\n .root:hover:not(.root--disabled) .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n</style>\n","export enum RadioVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioVariants = `${RadioVariant}`;\n","<script lang=\"ts\">\n export * from './Radio.types';\n\n export interface RadioProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Adds error styling\n */\n hasError?: boolean;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * the styling for the radio button @defaultValue 'radio'\n */\n variant?: RadioVariants;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup/RadioGroup.keys';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RadioVariant, RadioVariants } from './Radio.types';\n\n const variantComponentsMap = {\n [RadioVariant.Button]: VariantButton,\n [RadioVariant.Chip]: VariantChip,\n [RadioVariant.Radio]: VariantRadio,\n [RadioVariant.Tile]: VariantTile,\n };\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key, null);\n\n const props = withDefaults(defineProps<RadioProps>(), {\n disabled: false,\n fullWidth: false,\n hasError: false,\n id: undefined,\n label: '',\n modelValue: undefined,\n name: undefined,\n variant: undefined,\n });\n\n /**\n * use prop values but fallback to radio group context values if they are provided\n */\n const derivedModelValue = computed(() => props.modelValue || radioGroupInjection?.modelValue.value);\n const derivedName = computed(() => props.name || radioGroupInjection?.name.value);\n const derivedNameFullWidth = computed(() => props.fullWidth || radioGroupInjection?.fullWidth.value);\n const derivedDisabled = computed(() => props.disabled || radioGroupInjection?.disabled.value);\n const derivedVariant = computed<RadioVariants>(() => props.variant || radioGroupInjection?.variant.value || 'radio');\n\n const emit = defineEmits<{\n (e: 'update:modelValue', value: RadioProps['value']): void;\n }>();\n\n function onInput(e: Event) {\n if (radioGroupInjection?.update) {\n radioGroupInjection.update(e);\n\n return;\n }\n\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n</script>\n\n<template>\n <component\n :is=\"variantComponentsMap[derivedVariant]\"\n :id=\"props.id\"\n :disabled=\"derivedDisabled\"\n :has-error=\"props.hasError\"\n :full-width=\"derivedNameFullWidth\"\n :label=\"props.label\"\n :model-value=\"derivedModelValue\"\n :name=\"derivedName\"\n :value=\"props.value\"\n @input=\"onInput\"\n >\n <slot></slot>\n </component>\n</template>\n"],"names":["props","__props","classes","useCssModule","emit","__emit","RadioVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","radioGroupInjection","inject","RADIO_GROUP_INJECTION","derivedModelValue","computed","derivedName","derivedNameFullWidth","derivedDisabled","derivedVariant","onInput","e"],"mappings":";;;;;;;;;;;;;;;;AAyCE,UAAMA,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHb,UAAML,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHb,UAAML,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHb,UAAML,IAAQC,GACRC,IAAUC,KAEVC,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5CH,IAAAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;AC8DV,UAAMC,IAAuB;AAAA,MAC3B,CAACD,EAAa,MAAM,GAAGE;AAAA,MACvB,CAACF,EAAa,IAAI,GAAGG;AAAA,MACrB,CAACH,EAAa,KAAK,GAAGI;AAAA,MACtB,CAACJ,EAAa,IAAI,GAAGK;AAAA,IAAA,GAGjBC,IAAsBC,EAAOC,EAAsB,KAAK,IAAI,GAE5Dd,IAAQC,GAcRc,IAAoBC,EAAS,MAAMhB,EAAM,eAAcY,KAAA,gBAAAA,EAAqB,WAAW,MAAK,GAC5FK,IAAcD,EAAS,MAAMhB,EAAM,SAAQY,KAAA,gBAAAA,EAAqB,KAAK,MAAK,GAC1EM,IAAuBF,EAAS,MAAMhB,EAAM,cAAaY,KAAA,gBAAAA,EAAqB,UAAU,MAAK,GAC7FO,IAAkBH,EAAS,MAAMhB,EAAM,aAAYY,KAAA,gBAAAA,EAAqB,SAAS,MAAK,GACtFQ,IAAiBJ,EAAwB,MAAMhB,EAAM,YAAWY,KAAA,gBAAAA,EAAqB,QAAQ,UAAS,OAAO,GAE7GR,IAAOC;AAIb,aAASgB,EAAQC,GAAU;AACzB,UAAIV,KAAA,QAAAA,EAAqB,QAAQ;AAC/B,QAAAA,EAAoB,OAAOU,CAAC;AAE5B;AAAA,MACF;AAEK,MAAAlB,EAAA,qBAAsBkB,EAAE,OAA4B,KAAK;AAAA,IAChE;;;;;;;;;;;;;;;;;;;"}
@@ -33,36 +33,36 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
33
33
  };
34
34
 
35
35
  declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RadioProps>, {
36
- disabled: boolean;
37
- fullWidth: boolean;
38
- hasError: boolean;
39
- id: undefined;
40
- label: string;
41
- modelValue: undefined;
42
- name: undefined;
43
- variant: undefined;
36
+ disabled: boolean;
37
+ fullWidth: boolean;
38
+ hasError: boolean;
39
+ id: undefined;
40
+ label: string;
41
+ modelValue: undefined;
42
+ name: undefined;
43
+ variant: undefined;
44
44
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
45
- "update:modelValue": (value: string) => void;
45
+ "update:modelValue": (value: string) => void;
46
46
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RadioProps>, {
47
- disabled: boolean;
48
- fullWidth: boolean;
49
- hasError: boolean;
50
- id: undefined;
51
- label: string;
52
- modelValue: undefined;
53
- name: undefined;
54
- variant: undefined;
47
+ disabled: boolean;
48
+ fullWidth: boolean;
49
+ hasError: boolean;
50
+ id: undefined;
51
+ label: string;
52
+ modelValue: undefined;
53
+ name: undefined;
54
+ variant: undefined;
55
55
  }>>> & Readonly<{
56
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
56
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
57
57
  }>, {
58
- name: string;
59
- disabled: boolean;
60
- label: string;
61
- id: string | number;
62
- hasError: boolean;
63
- modelValue: string;
64
- variant: "button" | "radio" | "tile" | "chip";
65
- fullWidth: boolean;
58
+ name: string;
59
+ disabled: boolean;
60
+ label: string;
61
+ id: string | number;
62
+ hasError: boolean;
63
+ modelValue: string;
64
+ variant: "button" | "radio" | "tile" | "chip";
65
+ fullWidth: boolean;
66
66
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
67
67
  default?(_: {}): any;
68
68
  }>;
@@ -1,29 +1,25 @@
1
- import { defineComponent as s, useSlots as n, openBlock as a, createElementBlock as r, renderSlot as o, createVNode as m } from "vue";
2
- import p from "./Icon.js";
3
- import "lodash-es/uniqueId";
4
- import "./index-9e1095ef.js";
5
- import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
6
- import "./_plugin-vue_export-helper-dad06003.js";
7
- const i = {
1
+ import { defineComponent as o, useSlots as n, openBlock as a, createElementBlock as r, renderSlot as s, createVNode as l } from "vue";
2
+ import m from "./Icon.js";
3
+ const p = {
8
4
  "data-test": "stash-range-input",
9
5
  class: "stash-range-input tw-flex tw-gap-3"
10
- }, x = /* @__PURE__ */ s({
6
+ }, _ = /* @__PURE__ */ o({
11
7
  __name: "RangeInput",
12
- setup(l) {
8
+ setup(c) {
13
9
  const t = n();
14
10
  if (!(!!t.min && !!t.max))
15
11
  throw new Error("RangeInput: please provide slots for min and max values.");
16
- return (e, u) => (a(), r("div", i, [
17
- o(e.$slots, "min"),
18
- m(p, {
12
+ return (e, u) => (a(), r("div", p, [
13
+ s(e.$slots, "min"),
14
+ l(m, {
19
15
  name: "transfer",
20
16
  class: "tw-mb-2 tw-mt-auto"
21
17
  }),
22
- o(e.$slots, "max")
18
+ s(e.$slots, "max")
23
19
  ]));
24
20
  }
25
21
  });
26
22
  export {
27
- x as default
23
+ _ as default
28
24
  };
29
25
  //# sourceMappingURL=RangeInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RangeInput.js","sources":["../src/components/RangeInput/RangeInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n const slots = useSlots();\n\n const hasSlots = !!slots.min && !!slots.max;\n\n if (!hasSlots) {\n throw new Error('RangeInput: please provide slots for min and max values.');\n }\n</script>\n\n<template>\n <div data-test=\"stash-range-input\" class=\"stash-range-input tw-flex tw-gap-3\">\n <!-- @slot field for minimal value input -->\n <slot name=\"min\"></slot>\n\n <Icon name=\"transfer\" class=\"tw-mb-2 tw-mt-auto\" />\n <!-- @slot Field for maximal value input -->\n <slot name=\"max\"></slot>\n </div>\n</template>\n"],"names":["slots","useSlots"],"mappings":";;;;;;;;;;;;AAKE,UAAMA,IAAQC;AAId,QAAI,EAFa,CAAC,CAACD,EAAM,OAAO,CAAC,CAACA,EAAM;AAGhC,YAAA,IAAI,MAAM,0DAA0D;;;;;;;;;;;"}
1
+ {"version":3,"file":"RangeInput.js","sources":["../src/components/RangeInput/RangeInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n const slots = useSlots();\n\n const hasSlots = !!slots.min && !!slots.max;\n\n if (!hasSlots) {\n throw new Error('RangeInput: please provide slots for min and max values.');\n }\n</script>\n\n<template>\n <div data-test=\"stash-range-input\" class=\"stash-range-input tw-flex tw-gap-3\">\n <!-- @slot field for minimal value input -->\n <slot name=\"min\"></slot>\n\n <Icon name=\"transfer\" class=\"tw-mb-2 tw-mt-auto\" />\n <!-- @slot Field for maximal value input -->\n <slot name=\"max\"></slot>\n </div>\n</template>\n"],"names":["slots","useSlots"],"mappings":";;;;;;;;AAKE,UAAMA,IAAQC;AAId,QAAI,EAFa,CAAC,CAACD,EAAM,OAAO,CAAC,CAACA,EAAM;AAGhC,YAAA,IAAI,MAAM,0DAA0D;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
9
9
  };
10
10
  };
11
11
 
12
- declare const _default: __VLS_WithTemplateSlots<DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
12
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
13
13
  min?(_: {}): any;
14
14
  max?(_: {}): any;
15
15
  }>;
package/dist/SearchBar.js CHANGED
@@ -1,19 +1,9 @@
1
- import { defineComponent as V, useCssModule as I, useSlots as T, ref as h, computed as K, openBlock as f, createBlock as b, normalizeClass as n, unref as c, withKeys as s, createSlots as L, withCtx as i, createVNode as p, createCommentVNode as W, renderSlot as w } from "vue";
1
+ import { defineComponent as V, useCssModule as I, useSlots as T, ref as m, computed as K, openBlock as f, createBlock as b, normalizeClass as r, unref as c, withKeys as s, createSlots as L, withCtx as u, createVNode as h, createCommentVNode as W, renderSlot as w } from "vue";
2
2
  import { t as _ } from "./locale.js";
3
3
  import y from "./Button.js";
4
4
  import v from "./Icon.js";
5
5
  import M from "./Input.js";
6
- import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
7
- import "lodash-es/get";
8
- import "./Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js";
9
- import "lodash-es/uniqueId";
10
- import "./index-9e1095ef.js";
11
- import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
12
- import "lodash-es/isNil";
13
- import "./utils/i18n.js";
14
- import "./constants.js";
15
- import "./Field.vue_vue_type_script_setup_true_lang-fded4f75.js";
16
- import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
6
+ import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
7
  const R = /* @__PURE__ */ V({
18
8
  name: "ll-search-bar",
19
9
  __name: "SearchBar",
@@ -27,36 +17,36 @@ const R = /* @__PURE__ */ V({
27
17
  },
28
18
  emits: ["search", "update:model-value"],
29
19
  setup(k, { emit: g }) {
30
- const e = k, o = g, u = I(), x = T(), t = h(e.modelValue), m = h(), C = K(() => t.value ? 0 : -1);
31
- function l() {
32
- e.isLoading || e.isWorking || o("search", t.value);
20
+ const e = k, l = g, i = I(), x = T(), a = m(e.modelValue), p = m(), C = K(() => a.value ? 0 : -1);
21
+ function o() {
22
+ e.isLoading || e.isWorking || l("search", a.value);
33
23
  }
34
24
  function d() {
35
- var r, a;
36
- t.value = "", o("search", ""), o("update:model-value", ""), (a = (r = m.value) == null ? void 0 : r.inputEl) == null || a.focus();
25
+ var n, t;
26
+ a.value = "", l("search", ""), l("update:model-value", ""), (t = (n = p.value) == null ? void 0 : n.inputEl) == null || t.focus();
37
27
  }
38
28
  function B() {
39
- o("update:model-value", t.value);
29
+ l("update:model-value", a.value);
40
30
  }
41
- return (r, a) => (f(), b(M, {
31
+ return (n, t) => (f(), b(M, {
42
32
  ref_key: "stashInputRef",
43
- ref: m,
44
- modelValue: t.value,
33
+ ref: p,
34
+ modelValue: a.value,
45
35
  "onUpdate:modelValue": [
46
- a[0] || (a[0] = (S) => t.value = S),
36
+ t[0] || (t[0] = (S) => a.value = S),
47
37
  B
48
38
  ],
49
- class: n(["stash-search-bar", c(u)["search-input"]]),
39
+ class: r(["stash-search-bar", c(i)["search-input"]]),
50
40
  label: e.label,
51
41
  placeholder: e.placeholder,
52
42
  "hint-text": e.hintText,
53
43
  "data-test": "stash-search-bar",
54
- onKeyup: s(l, ["enter"])
44
+ onKeyup: s(o, ["enter"])
55
45
  }, L({
56
- append: i(() => [
57
- t.value ? (f(), b(y, {
46
+ append: u(() => [
47
+ a.value ? (f(), b(y, {
58
48
  key: 0,
59
- class: n(c(u)["clear-button"]),
49
+ class: r(c(i)["clear-button"]),
60
50
  disabled: e.isLoading,
61
51
  "data-test": "stash-search-bar|clear-button",
62
52
  onClick: d,
@@ -65,25 +55,25 @@ const R = /* @__PURE__ */ V({
65
55
  s(d, ["space"])
66
56
  ]
67
57
  }, {
68
- default: i(() => [
69
- p(v, { name: "close" })
58
+ default: u(() => [
59
+ h(v, { name: "close" })
70
60
  ]),
71
61
  _: 1
72
62
  }, 8, ["class", "disabled"])) : W("", !0),
73
- p(y, {
63
+ h(y, {
74
64
  tabindex: C.value,
75
65
  "data-test": "stash-search-bar|search-button",
76
66
  disabled: e.isLoading,
77
- class: n(c(u)["search-button"]),
78
- onClick: l,
67
+ class: r(c(i)["search-button"]),
68
+ onClick: o,
79
69
  onKeyup: [
80
- s(l, ["enter"]),
81
- s(l, ["space"])
70
+ s(o, ["enter"]),
71
+ s(o, ["space"])
82
72
  ]
83
73
  }, {
84
- default: i(() => [
85
- p(v, {
86
- class: n({ "tw-animate-spin": e.isWorking }),
74
+ default: u(() => [
75
+ h(v, {
76
+ class: r({ "tw-animate-spin": e.isWorking }),
87
77
  name: e.isWorking ? "loading-empty" : "search"
88
78
  }, null, 8, ["class", "name"])
89
79
  ]),
@@ -94,8 +84,8 @@ const R = /* @__PURE__ */ V({
94
84
  }, [
95
85
  c(x).hint ? {
96
86
  name: "hint",
97
- fn: i(() => [
98
- w(r.$slots, "hint")
87
+ fn: u(() => [
88
+ w(n.$slots, "hint")
99
89
  ]),
100
90
  key: "0"
101
91
  } : void 0
@@ -107,8 +97,8 @@ const R = /* @__PURE__ */ V({
107
97
  "search-button": "_search-button_1e71y_40"
108
98
  }, z = {
109
99
  $style: $
110
- }, ee = /* @__PURE__ */ N(R, [["__cssModules", z]]);
100
+ }, F = /* @__PURE__ */ N(R, [["__cssModules", z]]);
111
101
  export {
112
- ee as default
102
+ F as default
113
103
  };
114
104
  //# sourceMappingURL=SearchBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBar.js","sources":["../src/components/SearchBar/SearchBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, ref, useCssModule, useSlots } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n import Input from '../Input/Input.vue';\n\n export interface SearchBarProps {\n /**\n * Indicates loading activity (for example async request) that should prevent search\n */\n isLoading?: boolean;\n\n /**\n * Sets a visual indicator that the search is active\n */\n isWorking?: boolean;\n\n /**\n * The search term\n */\n modelValue?: string;\n\n /**\n * Placeholder text for the input\n */\n placeholder?: string;\n\n /**\n * Label for search bar\n */\n label?: string;\n\n /**\n * Text below the input\n */\n hintText?: string;\n }\n\n defineOptions({\n name: 'll-search-bar',\n });\n\n const props = withDefaults(defineProps<SearchBarProps>(), {\n isLoading: false,\n isWorking: false,\n modelValue: '',\n placeholder: t('ll.search'),\n label: t('ll.search'),\n hintText: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when searching or clearing the search input\n */\n (e: 'search', searchTerm: string): void;\n\n /**\n * Emitted when the search term changes\n */\n (e: 'update:model-value', searchTerm: string): void;\n }>();\n\n const classes = useCssModule();\n const slots = useSlots();\n const searchTerm = ref(props.modelValue);\n const stashInputRef = ref<InstanceType<typeof Input>>();\n\n const searchTabIndex = computed(() => (searchTerm.value ? 0 : -1));\n\n function onSearch() {\n if (props.isLoading || props.isWorking) {\n return;\n }\n emit('search', searchTerm.value);\n }\n\n function clearSearchTerm() {\n searchTerm.value = '';\n emit('search', '');\n emit('update:model-value', '');\n\n stashInputRef.value?.inputEl?.focus();\n }\n\n function handleChange() {\n emit('update:model-value', searchTerm.value);\n }\n</script>\n\n<template>\n <Input\n ref=\"stashInputRef\"\n v-model=\"searchTerm\"\n class=\"stash-search-bar\"\n :class=\"classes['search-input']\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :hint-text=\"props.hintText\"\n data-test=\"stash-search-bar\"\n @update:model-value=\"handleChange\"\n @keyup.enter=\"onSearch\"\n >\n <template #append>\n <Button\n v-if=\"searchTerm\"\n :class=\"classes['clear-button']\"\n :disabled=\"props.isLoading\"\n data-test=\"stash-search-bar|clear-button\"\n @click=\"clearSearchTerm\"\n @keyup.enter=\"clearSearchTerm\"\n @keyup.space=\"clearSearchTerm\"\n >\n <Icon name=\"close\" />\n </Button>\n <Button\n :tabindex=\"searchTabIndex\"\n data-test=\"stash-search-bar|search-button\"\n :disabled=\"props.isLoading\"\n :class=\"classes['search-button']\"\n @click=\"onSearch\"\n @keyup.enter=\"onSearch\"\n @keyup.space=\"onSearch\"\n >\n <Icon :class=\"{ 'tw-animate-spin': props.isWorking }\" :name=\"props.isWorking ? 'loading-empty' : 'search'\" />\n </Button>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Overrides the Input hint-text prop -->\n <slot name=\"hint\"></slot>\n </template>\n </Input>\n</template>\n\n<style module>\n .search-input input:hover {\n border: 1px solid var(--color-blue-500);\n }\n\n .search-input :global(.stash-input-append) {\n display: flex;\n justify-content: flex-end;\n width: 72px; /* double the the default width of 36px */\n overflow: visible;\n }\n\n .search-input :global(.stash-input-append) .clear-button {\n color: var(--color-ice-700);\n height: theme('spacing.9');\n min-width: theme('spacing.9');\n width: theme('spacing.9');\n background: none;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:focus-visible {\n outline: none;\n box-shadow: none;\n\n & svg {\n border-radius: theme(borderRadius.DEFAULT);\n\n @apply tw-ring-4 tw-ring-blue-500 tw-ring-opacity-15;\n }\n }\n }\n\n .search-input :global(.stash-input-append) .clear-button:disabled {\n color: var(--color-ice-500);\n cursor: default;\n }\n\n .search-input :global(.stash-input-append) .search-button {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n height: theme('spacing.9');\n min-width: theme('spacing.9');\n width: theme('spacing.9');\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:focus {\n box-shadow: none;\n }\n\n &:disabled {\n border-color: var(--color-ice-500);\n }\n\n &:hover {\n background-color: var(--color-blue-600);\n }\n\n &:active {\n background-color: var(--color-blue-700);\n }\n\n &:focus-visible {\n outline: none;\n border: 1px solid var(--color-blue-900);\n /* Simulating a bigger border so the design does not break */\n box-shadow: inset 0 0 0 1px var(--color-blue-900), 0 0 0 4px rgb(0 114 240 / 15%); /* Unfortunatelly, we have to use RGBA to make the shadow transparent, this is blue-500 */\n }\n }\n</style>\n"],"names":["props","__props","emit","__emit","classes","useCssModule","slots","useSlots","searchTerm","ref","stashInputRef","searchTabIndex","computed","onSearch","clearSearchTerm","_b","_a","handleChange"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CE,UAAMA,IAAQC,GASRC,IAAOC,GAYPC,IAAUC,KACVC,IAAQC,KACRC,IAAaC,EAAIT,EAAM,UAAU,GACjCU,IAAgBD,KAEhBE,IAAiBC,EAAS,MAAOJ,EAAW,QAAQ,IAAI,EAAG;AAEjE,aAASK,IAAW;AACd,MAAAb,EAAM,aAAaA,EAAM,aAGxBE,EAAA,UAAUM,EAAW,KAAK;AAAA,IACjC;AAEA,aAASM,IAAkB;;AACzB,MAAAN,EAAW,QAAQ,IACnBN,EAAK,UAAU,EAAE,GACjBA,EAAK,sBAAsB,EAAE,IAEfa,KAAAC,IAAAN,EAAA,UAAA,gBAAAM,EAAO,YAAP,QAAAD,EAAgB;AAAA,IAChC;AAEA,aAASE,IAAe;AACjB,MAAAf,EAAA,sBAAsBM,EAAW,KAAK;AAAA,IAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SearchBar.js","sources":["../src/components/SearchBar/SearchBar.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, ref, useCssModule, useSlots } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n import Input from '../Input/Input.vue';\n\n export interface SearchBarProps {\n /**\n * Indicates loading activity (for example async request) that should prevent search\n */\n isLoading?: boolean;\n\n /**\n * Sets a visual indicator that the search is active\n */\n isWorking?: boolean;\n\n /**\n * The search term\n */\n modelValue?: string;\n\n /**\n * Placeholder text for the input\n */\n placeholder?: string;\n\n /**\n * Label for search bar\n */\n label?: string;\n\n /**\n * Text below the input\n */\n hintText?: string;\n }\n\n defineOptions({\n name: 'll-search-bar',\n });\n\n const props = withDefaults(defineProps<SearchBarProps>(), {\n isLoading: false,\n isWorking: false,\n modelValue: '',\n placeholder: t('ll.search'),\n label: t('ll.search'),\n hintText: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when searching or clearing the search input\n */\n (e: 'search', searchTerm: string): void;\n\n /**\n * Emitted when the search term changes\n */\n (e: 'update:model-value', searchTerm: string): void;\n }>();\n\n const classes = useCssModule();\n const slots = useSlots();\n const searchTerm = ref(props.modelValue);\n const stashInputRef = ref<InstanceType<typeof Input>>();\n\n const searchTabIndex = computed(() => (searchTerm.value ? 0 : -1));\n\n function onSearch() {\n if (props.isLoading || props.isWorking) {\n return;\n }\n emit('search', searchTerm.value);\n }\n\n function clearSearchTerm() {\n searchTerm.value = '';\n emit('search', '');\n emit('update:model-value', '');\n\n stashInputRef.value?.inputEl?.focus();\n }\n\n function handleChange() {\n emit('update:model-value', searchTerm.value);\n }\n</script>\n\n<template>\n <Input\n ref=\"stashInputRef\"\n v-model=\"searchTerm\"\n class=\"stash-search-bar\"\n :class=\"classes['search-input']\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :hint-text=\"props.hintText\"\n data-test=\"stash-search-bar\"\n @update:model-value=\"handleChange\"\n @keyup.enter=\"onSearch\"\n >\n <template #append>\n <Button\n v-if=\"searchTerm\"\n :class=\"classes['clear-button']\"\n :disabled=\"props.isLoading\"\n data-test=\"stash-search-bar|clear-button\"\n @click=\"clearSearchTerm\"\n @keyup.enter=\"clearSearchTerm\"\n @keyup.space=\"clearSearchTerm\"\n >\n <Icon name=\"close\" />\n </Button>\n <Button\n :tabindex=\"searchTabIndex\"\n data-test=\"stash-search-bar|search-button\"\n :disabled=\"props.isLoading\"\n :class=\"classes['search-button']\"\n @click=\"onSearch\"\n @keyup.enter=\"onSearch\"\n @keyup.space=\"onSearch\"\n >\n <Icon :class=\"{ 'tw-animate-spin': props.isWorking }\" :name=\"props.isWorking ? 'loading-empty' : 'search'\" />\n </Button>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Overrides the Input hint-text prop -->\n <slot name=\"hint\"></slot>\n </template>\n </Input>\n</template>\n\n<style module>\n .search-input input:hover {\n border: 1px solid var(--color-blue-500);\n }\n\n .search-input :global(.stash-input-append) {\n display: flex;\n justify-content: flex-end;\n width: 72px; /* double the the default width of 36px */\n overflow: visible;\n }\n\n .search-input :global(.stash-input-append) .clear-button {\n color: var(--color-ice-700);\n height: theme('spacing.9');\n min-width: theme('spacing.9');\n width: theme('spacing.9');\n background: none;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:focus-visible {\n outline: none;\n box-shadow: none;\n\n & svg {\n border-radius: theme(borderRadius.DEFAULT);\n\n @apply tw-ring-4 tw-ring-blue-500 tw-ring-opacity-15;\n }\n }\n }\n\n .search-input :global(.stash-input-append) .clear-button:disabled {\n color: var(--color-ice-500);\n cursor: default;\n }\n\n .search-input :global(.stash-input-append) .search-button {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n height: theme('spacing.9');\n min-width: theme('spacing.9');\n width: theme('spacing.9');\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:focus {\n box-shadow: none;\n }\n\n &:disabled {\n border-color: var(--color-ice-500);\n }\n\n &:hover {\n background-color: var(--color-blue-600);\n }\n\n &:active {\n background-color: var(--color-blue-700);\n }\n\n &:focus-visible {\n outline: none;\n border: 1px solid var(--color-blue-900);\n /* Simulating a bigger border so the design does not break */\n box-shadow: inset 0 0 0 1px var(--color-blue-900), 0 0 0 4px rgb(0 114 240 / 15%); /* Unfortunatelly, we have to use RGBA to make the shadow transparent, this is blue-500 */\n }\n }\n</style>\n"],"names":["props","__props","emit","__emit","classes","useCssModule","slots","useSlots","searchTerm","ref","stashInputRef","searchTabIndex","computed","onSearch","clearSearchTerm","_b","_a","handleChange"],"mappings":";;;;;;;;;;;;;;;;;;;AA4CE,UAAMA,IAAQC,GASRC,IAAOC,GAYPC,IAAUC,KACVC,IAAQC,KACRC,IAAaC,EAAIT,EAAM,UAAU,GACjCU,IAAgBD,KAEhBE,IAAiBC,EAAS,MAAOJ,EAAW,QAAQ,IAAI,EAAG;AAEjE,aAASK,IAAW;AACd,MAAAb,EAAM,aAAaA,EAAM,aAGxBE,EAAA,UAAUM,EAAW,KAAK;AAAA,IACjC;AAEA,aAASM,IAAkB;;AACzB,MAAAN,EAAW,QAAQ,IACnBN,EAAK,UAAU,EAAE,GACjBA,EAAK,sBAAsB,EAAE,IAEfa,KAAAC,IAAAN,EAAA,UAAA,gBAAAM,EAAO,YAAP,QAAAD,EAAgB;AAAA,IAChC;AAEA,aAASE,IAAe;AACjB,MAAAf,EAAA,sBAAsBM,EAAW,KAAK;AAAA,IAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}