@mage-ui/components 1.0.88 → 1.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/components/buttons/button/Button.mjs.map +1 -1
  2. package/dist/components/buttons/button-action/ButtonAction.mjs.map +1 -1
  3. package/dist/components/buttons/button-action/ButtonActionContext.mjs.map +1 -1
  4. package/dist/components/buttons/button-action/ButtonLoader.mjs.map +1 -1
  5. package/dist/components/buttons/button-icon/ButtonIcon.mjs.map +1 -1
  6. package/dist/components/buttons/button-icon-visual/ButtonIconVisual.mjs.map +1 -1
  7. package/dist/components/buttons/button-visual/ButtonVisual.mjs.map +1 -1
  8. package/dist/components/controls/avatar-upload/AvatarUpload.d.mts +0 -1
  9. package/dist/components/controls/avatar-upload/AvatarUpload.d.mts.map +1 -1
  10. package/dist/components/controls/avatar-upload/AvatarUpload.mjs.map +1 -1
  11. package/dist/components/controls/checkbox/Checkbox.mjs.map +1 -1
  12. package/dist/components/controls/checkbox-group/CheckboxGroup.mjs.map +1 -1
  13. package/dist/components/controls/date-picker/DatePicker.mjs.map +1 -1
  14. package/dist/components/controls/dropdown/Dropdown.d.mts +0 -3
  15. package/dist/components/controls/dropdown/Dropdown.d.mts.map +1 -1
  16. package/dist/components/controls/dropdown/Dropdown.mjs.map +1 -1
  17. package/dist/components/controls/dropdown/DropdownChevron.d.mts +0 -2
  18. package/dist/components/controls/dropdown/DropdownChevron.d.mts.map +1 -1
  19. package/dist/components/controls/dropdown/DropdownChevron.mjs.map +1 -1
  20. package/dist/components/controls/dropdown/DropdownClearButton.d.mts +0 -2
  21. package/dist/components/controls/dropdown/DropdownClearButton.d.mts.map +1 -1
  22. package/dist/components/controls/dropdown/DropdownClearButton.mjs.map +1 -1
  23. package/dist/components/controls/dropdown/DropdownContextProvider.d.mts +0 -2
  24. package/dist/components/controls/dropdown/DropdownContextProvider.d.mts.map +1 -1
  25. package/dist/components/controls/dropdown/DropdownContextProvider.mjs.map +1 -1
  26. package/dist/components/controls/dropdown/DropdownEndSlot.mjs.map +1 -1
  27. package/dist/components/controls/dropdown/DropdownTargetTextInput.d.mts +0 -1
  28. package/dist/components/controls/dropdown/DropdownTargetTextInput.d.mts.map +1 -1
  29. package/dist/components/controls/dropdown/DropdownTargetTextInput.mjs.map +1 -1
  30. package/dist/components/controls/dropdown/autocomplete/Autocomplete.mjs.map +1 -1
  31. package/dist/components/controls/dropdown/autocomplete/AutocompleteLoader.mjs.map +1 -1
  32. package/dist/components/controls/dropdown/autocomplete/AutocompleteTarget.mjs.map +1 -1
  33. package/dist/components/controls/dropdown/combobox/Combobox.mjs.map +1 -1
  34. package/dist/components/controls/dropdown/combobox/ComboboxCreatableOption.d.mts +0 -2
  35. package/dist/components/controls/dropdown/combobox/ComboboxCreatableOption.d.mts.map +1 -1
  36. package/dist/components/controls/dropdown/combobox/ComboboxCreatableOption.mjs.map +1 -1
  37. package/dist/components/controls/dropdown/combobox/ComboboxEmptyOption.d.mts +0 -2
  38. package/dist/components/controls/dropdown/combobox/ComboboxEmptyOption.d.mts.map +1 -1
  39. package/dist/components/controls/dropdown/combobox/ComboboxEmptyOption.mjs.map +1 -1
  40. package/dist/components/controls/dropdown/combobox/ComboboxOptions.mjs.map +1 -1
  41. package/dist/components/controls/dropdown/combobox/ComboboxTarget.d.mts +0 -2
  42. package/dist/components/controls/dropdown/combobox/ComboboxTarget.d.mts.map +1 -1
  43. package/dist/components/controls/dropdown/combobox/ComboboxTarget.mjs.map +1 -1
  44. package/dist/components/controls/dropdown/select/Select.mjs.map +1 -1
  45. package/dist/components/controls/dropdown/select/SelectSearch.d.mts +0 -1
  46. package/dist/components/controls/dropdown/select/SelectSearch.d.mts.map +1 -1
  47. package/dist/components/controls/dropdown/select/SelectSearch.mjs.map +1 -1
  48. package/dist/components/controls/dropzone/Dropzone.d.mts +0 -1
  49. package/dist/components/controls/dropzone/Dropzone.d.mts.map +1 -1
  50. package/dist/components/controls/dropzone/Dropzone.mjs.map +1 -1
  51. package/dist/components/controls/dropzone-files/DropzoneFiles.d.mts +0 -2
  52. package/dist/components/controls/dropzone-files/DropzoneFiles.d.mts.map +1 -1
  53. package/dist/components/controls/dropzone-files/DropzoneFiles.mjs.map +1 -1
  54. package/dist/components/controls/file-input/BaseFileInput.d.mts +0 -1
  55. package/dist/components/controls/file-input/BaseFileInput.d.mts.map +1 -1
  56. package/dist/components/controls/file-input/BaseFileInput.mjs.map +1 -1
  57. package/dist/components/controls/file-input/FileInput.mjs.map +1 -1
  58. package/dist/components/controls/file-input/FileInputMultiple.mjs.map +1 -1
  59. package/dist/components/controls/password-input/PasswordInput.mjs.map +1 -1
  60. package/dist/components/controls/password-input/PasswordStrengthInput.d.mts +0 -1
  61. package/dist/components/controls/password-input/PasswordStrengthInput.d.mts.map +1 -1
  62. package/dist/components/controls/password-input/PasswordStrengthInput.mjs.map +1 -1
  63. package/dist/components/controls/radio/Radio.mjs.map +1 -1
  64. package/dist/components/controls/radio-group/RadioGroup.mjs.map +1 -1
  65. package/dist/components/controls/switch/Switch.d.mts +0 -1
  66. package/dist/components/controls/switch/Switch.d.mts.map +1 -1
  67. package/dist/components/controls/switch/Switch.mjs.map +1 -1
  68. package/dist/components/controls/switch-group/SwitchGroup.mjs.map +1 -1
  69. package/dist/components/controls/text-input/TextInput.mjs.map +1 -1
  70. package/dist/components/controls/textarea/Textarea.mjs.map +1 -1
  71. package/dist/components/data-display/assigned-user/AssignedUser.d.mts +0 -1
  72. package/dist/components/data-display/assigned-user/AssignedUser.d.mts.map +1 -1
  73. package/dist/components/data-display/assigned-user/AssignedUser.mjs.map +1 -1
  74. package/dist/components/data-display/avatar/Avatar.mjs.map +1 -1
  75. package/dist/components/data-display/badge/Badge.mjs.map +1 -1
  76. package/dist/components/data-display/calendar/Calendar.d.mts +1 -6
  77. package/dist/components/data-display/calendar/Calendar.d.mts.map +1 -1
  78. package/dist/components/data-display/calendar/Calendar.mjs +1 -1
  79. package/dist/components/data-display/calendar/Calendar.mjs.map +1 -1
  80. package/dist/components/data-display/datatables/DataTable.d.mts +0 -1
  81. package/dist/components/data-display/datatables/DataTable.d.mts.map +1 -1
  82. package/dist/components/data-display/datatables/DataTable.mjs.map +1 -1
  83. package/dist/components/data-display/datatables/DataTableBody.mjs.map +1 -1
  84. package/dist/components/data-display/datatables/DataTableBottomSlot.mjs.map +1 -1
  85. package/dist/components/data-display/datatables/DataTableBulkBar.d.mts +0 -1
  86. package/dist/components/data-display/datatables/DataTableBulkBar.d.mts.map +1 -1
  87. package/dist/components/data-display/datatables/DataTableBulkBar.mjs.map +1 -1
  88. package/dist/components/data-display/datatables/DataTableColumns.mjs.map +1 -1
  89. package/dist/components/data-display/datatables/DataTableErrorState.mjs.map +1 -1
  90. package/dist/components/data-display/datatables/DataTableHeader.mjs.map +1 -1
  91. package/dist/components/data-display/datatables/DataTablePageSize.mjs.map +1 -1
  92. package/dist/components/data-display/datatables/DataTablePagination.mjs.map +1 -1
  93. package/dist/components/data-display/datatables/DataTableRootContainer.mjs.map +1 -1
  94. package/dist/components/data-display/datatables/DataTableSkeleton.mjs.map +1 -1
  95. package/dist/components/data-display/datatables/DataTableSlotRow.mjs.map +1 -1
  96. package/dist/components/data-display/datatables/DataTableTopSlot.mjs.map +1 -1
  97. package/dist/components/data-display/datatables/DataTableViewport.mjs.map +1 -1
  98. package/dist/components/data-display/description-list/DescriptionList.mjs.map +1 -1
  99. package/dist/components/data-display/icons/icon/Icon.mjs.map +1 -1
  100. package/dist/components/data-display/icons/icon-raw/IconRaw.mjs.map +1 -1
  101. package/dist/components/data-display/icons/icon-svg/IconSvg.mjs.map +1 -1
  102. package/dist/components/data-display/icons/icon-wrapped/IconWrapped.mjs.map +1 -1
  103. package/dist/components/data-display/index.d.mts +1 -1
  104. package/dist/components/data-display/indicator/Indicator.mjs.map +1 -1
  105. package/dist/components/data-display/loader-dot/LoaderDot.mjs.map +1 -1
  106. package/dist/components/data-display/loader-oval/LoaderOval.mjs.map +1 -1
  107. package/dist/components/data-display/logos/logo-image/LogoImage.mjs.map +1 -1
  108. package/dist/components/data-display/logos/logo-svg/LogoSvg.mjs.map +1 -1
  109. package/dist/components/data-display/notification-banner/NotificationBanner.mjs.map +1 -1
  110. package/dist/components/data-display/removable-item/RemovableItem.d.mts +0 -1
  111. package/dist/components/data-display/removable-item/RemovableItem.d.mts.map +1 -1
  112. package/dist/components/data-display/removable-item/RemovableItem.mjs.map +1 -1
  113. package/dist/components/data-display/table/TableBody.mjs.map +1 -1
  114. package/dist/components/data-display/table/TableCaption.mjs.map +1 -1
  115. package/dist/components/data-display/table/TableCell.mjs.map +1 -1
  116. package/dist/components/data-display/table/TableFoot.mjs.map +1 -1
  117. package/dist/components/data-display/table/TableHead.mjs.map +1 -1
  118. package/dist/components/data-display/table/TableHeaderCell.mjs.map +1 -1
  119. package/dist/components/data-display/table/TableRoot.mjs.map +1 -1
  120. package/dist/components/data-display/table/TableRow.mjs.map +1 -1
  121. package/dist/components/data-display/table/TableScroll.mjs.map +1 -1
  122. package/dist/components/data-display/tag/Tag.d.mts +0 -1
  123. package/dist/components/data-display/tag/Tag.d.mts.map +1 -1
  124. package/dist/components/data-display/tag/Tag.mjs.map +1 -1
  125. package/dist/components/data-display/tag-group/TagGroup.mjs.map +1 -1
  126. package/dist/components/data-display/uploaded-file/UploadedFile.d.mts +0 -1
  127. package/dist/components/data-display/uploaded-file/UploadedFile.d.mts.map +1 -1
  128. package/dist/components/data-display/uploaded-file/UploadedFile.mjs.map +1 -1
  129. package/dist/components/data-display/uploaded-file/UploadedFileDetails.mjs.map +1 -1
  130. package/dist/components/data-display/uploaded-file/UploadedFileIcon.mjs.map +1 -1
  131. package/dist/components/forms/Form.d.mts +0 -1
  132. package/dist/components/forms/Form.d.mts.map +1 -1
  133. package/dist/components/forms/Form.mjs.map +1 -1
  134. package/dist/components/forms/FormBase.mjs.map +1 -1
  135. package/dist/components/forms/FormErrorBox.mjs.map +1 -1
  136. package/dist/components/forms/controls/FormCheckbox.d.mts +0 -2
  137. package/dist/components/forms/controls/FormCheckbox.d.mts.map +1 -1
  138. package/dist/components/forms/controls/FormCheckbox.mjs.map +1 -1
  139. package/dist/components/forms/controls/FormHidden.mjs.map +1 -1
  140. package/dist/components/forms/controls/FormPassword.d.mts +0 -2
  141. package/dist/components/forms/controls/FormPassword.d.mts.map +1 -1
  142. package/dist/components/forms/controls/FormPassword.mjs.map +1 -1
  143. package/dist/components/forms/controls/FormSubmit.d.mts +0 -3
  144. package/dist/components/forms/controls/FormSubmit.d.mts.map +1 -1
  145. package/dist/components/forms/controls/FormSubmit.mjs.map +1 -1
  146. package/dist/components/forms/controls/FormTextInput.mjs.map +1 -1
  147. package/dist/components/forms/controls/register-components.mjs.map +1 -1
  148. package/dist/components/forms/rules/zod.d.mts +0 -1
  149. package/dist/components/forms/rules/zod.d.mts.map +1 -1
  150. package/dist/components/index.d.mts +2 -10
  151. package/dist/components/layouts/card/Card.mjs.map +1 -1
  152. package/dist/components/layouts/fluid-grid/FluidGrid.mjs.map +1 -1
  153. package/dist/components/layouts/grid/Grid.mjs.map +1 -1
  154. package/dist/components/misc/horizontal-divider/HorizontalDivider.mjs.map +1 -1
  155. package/dist/components/misc/scroll-area/ScrollArea.mjs.map +1 -1
  156. package/dist/components/misc/scroll-area-autosize/ScrollAreaAutosize.mjs.map +1 -1
  157. package/dist/components/misc/visually-hidden/VisuallyHidden.mjs.map +1 -1
  158. package/dist/components/navigations/breadcrumbs/Breadcrumbs.mjs.map +1 -1
  159. package/dist/components/navigations/breadcrumbs/BreadcrumbsBar.mjs.map +1 -1
  160. package/dist/components/navigations/menu/Menu.d.mts +0 -1
  161. package/dist/components/navigations/menu/Menu.d.mts.map +1 -1
  162. package/dist/components/navigations/menu/Menu.mjs.map +1 -1
  163. package/dist/components/navigations/pagination/Pagination.mjs.map +1 -1
  164. package/dist/components/navigations/sidebars/sidebar/Sidebar.mjs.map +1 -1
  165. package/dist/components/navigations/sidebars/sidebar/SidebarContext.mjs.map +1 -1
  166. package/dist/components/navigations/sidebars/sidebar/SidebarNavGroup.mjs.map +1 -1
  167. package/dist/components/navigations/sidebars/sidebar/SidebarNavItem.mjs.map +1 -1
  168. package/dist/components/navigations/sidebars/sidebar/SidebarNavItemButton.mjs.map +1 -1
  169. package/dist/components/navigations/sidebars/sidebar/SidebarNavItemButtonCollapsed.mjs.map +1 -1
  170. package/dist/components/navigations/sidebars/sidebar/SidebarNavItemLink.d.mts +0 -1
  171. package/dist/components/navigations/sidebars/sidebar/SidebarNavItemLink.d.mts.map +1 -1
  172. package/dist/components/navigations/sidebars/sidebar/SidebarNavItemLink.mjs.map +1 -1
  173. package/dist/components/navigations/sidebars/sidebar/SidebarNavList.mjs.map +1 -1
  174. package/dist/components/navigations/sidebars/sidebar/SidebarSubNavItem.d.mts +0 -1
  175. package/dist/components/navigations/sidebars/sidebar/SidebarSubNavItem.d.mts.map +1 -1
  176. package/dist/components/navigations/sidebars/sidebar/SidebarSubNavItem.mjs.map +1 -1
  177. package/dist/components/navigations/sidebars/sidebar/SidebarSubnav.mjs.map +1 -1
  178. package/dist/components/overlays/modal/features/ModalAlert.d.mts +0 -2
  179. package/dist/components/overlays/modal/features/ModalAlert.d.mts.map +1 -1
  180. package/dist/components/overlays/modal/features/ModalAlert.mjs.map +1 -1
  181. package/dist/components/overlays/modal/features/ModalConfirm.d.mts +0 -2
  182. package/dist/components/overlays/modal/features/ModalConfirm.d.mts.map +1 -1
  183. package/dist/components/overlays/modal/features/ModalConfirm.mjs.map +1 -1
  184. package/dist/components/overlays/modal/features/ModalDialog.d.mts +0 -2
  185. package/dist/components/overlays/modal/features/ModalDialog.d.mts.map +1 -1
  186. package/dist/components/overlays/modal/features/ModalDialog.mjs.map +1 -1
  187. package/dist/components/overlays/modal/index.mjs +1 -1
  188. package/dist/components/overlays/modal/index.mjs.map +1 -1
  189. package/dist/components/overlays/modal/modal-core.mjs.map +1 -1
  190. package/dist/components/overlays/modal/modal-primitives.mjs.map +1 -1
  191. package/dist/components/overlays/modal/modal-registry.mjs.map +1 -1
  192. package/dist/components/overlays/toast/toast.mjs.map +1 -1
  193. package/dist/components/overlays/tooltip/Tooltip.mjs.map +1 -1
  194. package/dist/index.d.mts +2 -4
  195. package/dist/providers/MageUiProvider.d.mts +0 -1
  196. package/dist/providers/MageUiProvider.d.mts.map +1 -1
  197. package/dist/providers/MageUiProvider.mjs.map +1 -1
  198. package/package.json +22 -25
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxEmptyOption.d.mts","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxEmptyOption.tsx"],"mappings":";;;KAIY,wBAAA;EACV,SAAA;EACA,UAAA;IACE,KAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"ComboboxEmptyOption.d.mts","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxEmptyOption.tsx"],"mappings":";KAIY,wBAAA;EACV,SAAA;EACA,UAAA;IACE,KAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxEmptyOption.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxEmptyOption.tsx"],"sourcesContent":["import { comboboxEmpty } from '@mage-ui/styled-system/recipes';\n\nimport { Dropdown } from '../Dropdown';\n\nexport type ComboboxEmptyOptionProps = {\n emptyText?: string;\n classNames?: {\n empty?: string;\n };\n};\n\nexport const ComboboxEmptyOption = ({\n emptyText,\n classNames,\n}: ComboboxEmptyOptionProps) => {\n if (emptyText === undefined) {\n return null;\n }\n\n return (\n <Dropdown.Empty\n classNames={{ empty: classNames?.empty ?? comboboxEmpty() }}\n >\n {emptyText}\n </Dropdown.Empty>\n );\n};\n"],"mappings":"kJAWA,MAAa,GAAuB,CAClC,YACA,gBAEI,IAAc,IAAA,GACT,KAIP,EAAC,EAAS,MAAA,CACR,WAAY,CAAE,MAAO,GAAY,OAAS,GAAe,CAAE,UAE1D,GACc"}
1
+ {"version":3,"file":"ComboboxEmptyOption.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxEmptyOption.tsx"],"sourcesContent":["import { comboboxEmpty } from '@mage-ui/styled-system/recipes';\n\nimport { Dropdown } from '../Dropdown';\n\nexport type ComboboxEmptyOptionProps = {\n emptyText?: string;\n classNames?: {\n empty?: string;\n };\n};\n\nexport const ComboboxEmptyOption = ({\n emptyText,\n classNames,\n}: ComboboxEmptyOptionProps) => {\n if (emptyText === undefined) {\n return null;\n }\n\n return (\n <Dropdown.Empty\n classNames={{ empty: classNames?.empty ?? comboboxEmpty() }}\n >\n {emptyText}\n </Dropdown.Empty>\n );\n};\n"],"mappings":"kJAWA,MAAa,GAAuB,CAClC,YACA,gBAEI,IAAc,IAAA,GACT,KAIP,EAAC,EAAS,MAAV,CACE,WAAY,CAAE,MAAO,GAAY,OAAS,GAAe,CAAE,UAE1D,EACc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxOptions.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxOptions.tsx"],"sourcesContent":["import { Dropdown } from '../Dropdown';\nimport type { DropdownValue } from '../DropdownContextProvider';\nimport { useDropdownContext } from '../DropdownContextProvider';\nimport {\n ComboboxCreatableOption,\n type ComboboxCreatableOptionProps,\n} from './ComboboxCreatableOption';\nimport {\n ComboboxEmptyOption,\n type ComboboxEmptyOptionProps,\n} from './ComboboxEmptyOption';\n\nexport const ComboboxOptions = ({\n creatableProps,\n emptyProps,\n}: {\n creatableProps: ComboboxCreatableOptionProps;\n emptyProps: ComboboxEmptyOptionProps;\n}) => {\n const { options, value } = useDropdownContext();\n const { creatable } = creatableProps;\n\n const optionsList = options.map((item: DropdownValue) => {\n return (\n <Dropdown.Option\n id={item.id.toString()}\n value={item.value?.toString() as string}\n key={item.id}\n onMouseDown={(e) => e.preventDefault()}\n active={item.id === value.id}\n >\n {item.render ?? item.value?.toString()}\n </Dropdown.Option>\n );\n });\n\n return (\n <Dropdown.Options>\n {optionsList}\n {creatable && <ComboboxCreatableOption {...creatableProps} />}\n {!creatable && options.length === 0 && (\n <ComboboxEmptyOption {...emptyProps} />\n )}\n </Dropdown.Options>\n );\n};\n"],"mappings":"ySAYA,MAAa,GAAmB,CAC9B,iBACA,gBAII,CACJ,GAAM,CAAE,UAAS,SAAU,GAAoB,CACzC,CAAE,aAAc,EAEhB,EAAc,EAAQ,IAAK,GAE7B,EAAC,EAAS,OAAA,CACR,GAAI,EAAK,GAAG,UAAU,CACtB,MAAO,EAAK,OAAO,UAAU,CAE7B,YAAc,GAAM,EAAE,gBAAgB,CACtC,OAAQ,EAAK,KAAO,EAAM,YAEzB,EAAK,QAAU,EAAK,OAAO,UAAU,EAJjC,EAAK,GAKM,CAEpB,CAEF,OACE,EAAC,EAAS,QAAA,CAAA,SAAA,CACP,EACA,GAAa,EAAC,EAAA,CAAwB,GAAI,EAAA,CAAkB,CAC5D,CAAC,GAAa,EAAQ,SAAW,GAChC,EAAC,EAAA,CAAoB,GAAI,EAAA,CAAc,GAExB"}
1
+ {"version":3,"file":"ComboboxOptions.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxOptions.tsx"],"sourcesContent":["import { Dropdown } from '../Dropdown';\nimport type { DropdownValue } from '../DropdownContextProvider';\nimport { useDropdownContext } from '../DropdownContextProvider';\nimport {\n ComboboxCreatableOption,\n type ComboboxCreatableOptionProps,\n} from './ComboboxCreatableOption';\nimport {\n ComboboxEmptyOption,\n type ComboboxEmptyOptionProps,\n} from './ComboboxEmptyOption';\n\nexport const ComboboxOptions = ({\n creatableProps,\n emptyProps,\n}: {\n creatableProps: ComboboxCreatableOptionProps;\n emptyProps: ComboboxEmptyOptionProps;\n}) => {\n const { options, value } = useDropdownContext();\n const { creatable } = creatableProps;\n\n const optionsList = options.map((item: DropdownValue) => {\n return (\n <Dropdown.Option\n id={item.id.toString()}\n value={item.value?.toString() as string}\n key={item.id}\n onMouseDown={(e) => e.preventDefault()}\n active={item.id === value.id}\n >\n {item.render ?? item.value?.toString()}\n </Dropdown.Option>\n );\n });\n\n return (\n <Dropdown.Options>\n {optionsList}\n {creatable && <ComboboxCreatableOption {...creatableProps} />}\n {!creatable && options.length === 0 && (\n <ComboboxEmptyOption {...emptyProps} />\n )}\n </Dropdown.Options>\n );\n};\n"],"mappings":"ySAYA,MAAa,GAAmB,CAC9B,iBACA,gBAII,CACJ,GAAM,CAAE,UAAS,SAAU,GAAoB,CACzC,CAAE,aAAc,EAEhB,EAAc,EAAQ,IAAK,GAE7B,EAAC,EAAS,OAAV,CACE,GAAI,EAAK,GAAG,UAAU,CACtB,MAAO,EAAK,OAAO,UAAU,CAE7B,YAAc,GAAM,EAAE,gBAAgB,CACtC,OAAQ,EAAK,KAAO,EAAM,YAEzB,EAAK,QAAU,EAAK,OAAO,UAAU,CACtB,CALX,EAAK,GAKM,CAEpB,CAEF,OACE,EAAC,EAAS,QAAV,CAAA,SAAA,CACG,EACA,GAAa,EAAC,EAAD,CAAyB,GAAI,EAAkB,CAAA,CAC5D,CAAC,GAAa,EAAQ,SAAW,GAChC,EAAC,EAAD,CAAqB,GAAI,EAAc,CAAA,CAExB,CAAA,CAAA"}
@@ -1,6 +1,4 @@
1
1
  import { DropdownTargetTextInputProps } from "../DropdownTargetTextInput.mjs";
2
- import "react/jsx-runtime";
3
-
4
2
  //#region src/components/controls/dropdown/combobox/ComboboxTarget.d.ts
5
3
  type ComboboxTargetProps = DropdownTargetTextInputProps;
6
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxTarget.d.mts","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxTarget.tsx"],"mappings":";;;;KAMY,mBAAA,GAAsB,4BAAA"}
1
+ {"version":3,"file":"ComboboxTarget.d.mts","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxTarget.tsx"],"mappings":";;KAMY,mBAAA,GAAsB,4BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxTarget.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxTarget.tsx"],"sourcesContent":["import { useDropdownContext } from '../DropdownContextProvider';\nimport {\n DropdownTargetTextInput,\n type DropdownTargetTextInputProps,\n} from '../DropdownTargetTextInput';\n\nexport type ComboboxTargetProps = DropdownTargetTextInputProps;\n\nexport const ComboboxTarget = ({ ...props }: ComboboxTargetProps) => {\n const { store, setQuery } = useDropdownContext();\n\n return (\n <DropdownTargetTextInput\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n store.openDropdown();\n }}\n onChange={(e) => {\n e.stopPropagation();\n e.preventDefault();\n setQuery(e.currentTarget?.value);\n store.openDropdown();\n }}\n clearable={true}\n showChevron={true}\n {...props}\n />\n );\n};\n"],"mappings":"qLAQA,MAAa,GAAkB,CAAE,GAAG,KAAiC,CACnE,GAAM,CAAE,QAAO,YAAa,GAAoB,CAEhD,OACE,EAAC,EAAA,CACC,QAAU,GAAM,CACd,EAAE,iBAAiB,CACnB,EAAE,gBAAgB,CAClB,EAAM,cAAc,EAEtB,SAAW,GAAM,CACf,EAAE,iBAAiB,CACnB,EAAE,gBAAgB,CAClB,EAAS,EAAE,eAAe,MAAM,CAChC,EAAM,cAAc,EAEtB,UAAW,GACX,YAAa,GACb,GAAI,GACJ"}
1
+ {"version":3,"file":"ComboboxTarget.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/combobox/ComboboxTarget.tsx"],"sourcesContent":["import { useDropdownContext } from '../DropdownContextProvider';\nimport {\n DropdownTargetTextInput,\n type DropdownTargetTextInputProps,\n} from '../DropdownTargetTextInput';\n\nexport type ComboboxTargetProps = DropdownTargetTextInputProps;\n\nexport const ComboboxTarget = ({ ...props }: ComboboxTargetProps) => {\n const { store, setQuery } = useDropdownContext();\n\n return (\n <DropdownTargetTextInput\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n store.openDropdown();\n }}\n onChange={(e) => {\n e.stopPropagation();\n e.preventDefault();\n setQuery(e.currentTarget?.value);\n store.openDropdown();\n }}\n clearable={true}\n showChevron={true}\n {...props}\n />\n );\n};\n"],"mappings":"qLAQA,MAAa,GAAkB,CAAE,GAAG,KAAiC,CACnE,GAAM,CAAE,QAAO,YAAa,GAAoB,CAEhD,OACE,EAAC,EAAD,CACE,QAAU,GAAM,CACd,EAAE,iBAAiB,CACnB,EAAE,gBAAgB,CAClB,EAAM,cAAc,EAEtB,SAAW,GAAM,CACf,EAAE,iBAAiB,CACnB,EAAE,gBAAgB,CAClB,EAAS,EAAE,eAAe,MAAM,CAChC,EAAM,cAAc,EAEtB,UAAW,GACX,YAAa,GACb,GAAI,EACJ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Select.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/select/Select.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n select,\n selectChevron,\n selectChevronIcon,\n selectChevronIconRoot,\n selectChevronRoot,\n selectClearButton,\n selectClearButtonIcon,\n selectClearButtonIconRaw,\n selectClearButtonIconRawRoot,\n selectClearButtonRoot,\n selectEmpty,\n selectOption,\n selectOptions,\n selectRoot,\n selectScrollAreaAutosize,\n selectSearchInput,\n selectSearchSection,\n selectSearchWrapper,\n selectTextInput,\n selectTextInputDescription,\n selectTextInputError,\n selectTextInputInput,\n selectTextInputLabel,\n selectTextInputRequired,\n selectTextInputRoot,\n selectTextInputSection,\n selectTextInputWrapper,\n} from '@mage-ui/styled-system/recipes';\n\nimport { ComboboxOptions } from '../combobox/ComboboxOptions';\nimport type { ComboboxTargetProps } from '../combobox/ComboboxTarget';\nimport { ComboboxTarget } from '../combobox/ComboboxTarget';\nimport { Dropdown, type DropdownProps } from '../Dropdown';\nimport { SelectSearch, type SelectSearchClassNames } from './SelectSearch';\n\nexport type SelectProps = Omit<\n DropdownProps,\n 'children' | 'classNames' | 'target'\n> & {\n label?: string;\n placeholder?: string;\n clearable?: boolean;\n clearButtonText?: string;\n emptyText?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchStartSlot?: ReactNode;\n searchClassNames?: SelectSearchClassNames;\n startSlot?: ReactNode;\n classNames?: DropdownProps['classNames'] & {\n target?: ComboboxTargetProps['classNames'] & {\n clearButton?: NonNullable<\n ComboboxTargetProps['clearButtonProps']\n >['classNames'];\n chevron?: NonNullable<ComboboxTargetProps['chevronProps']>['classNames'];\n };\n scrollArea?: NonNullable<DropdownProps['scrollAreaProps']>['classNames'];\n };\n};\n\nexport const Select = ({\n label,\n placeholder,\n clearable = true,\n clearButtonText,\n emptyText,\n searchable,\n searchPlaceholder,\n searchStartSlot,\n searchClassNames,\n startSlot,\n classNames,\n ...props\n}: SelectProps) => {\n const {\n target: targetClassNames,\n scrollArea: scrollAreaClassNames,\n ...dropdownClassNames\n } = classNames || {};\n\n const {\n clearButton: clearButtonClassNames,\n chevron: chevronClassNames,\n ...restTargetClassNames\n } = targetClassNames || {};\n const resolvedEmptyText =\n emptyText ?? (searchable ? 'No results' : undefined);\n\n const targetProps = {\n placeholder,\n label,\n clearable,\n readOnly: true,\n closeOnBlur: !searchable,\n startSlot,\n displayQuery: false,\n classNames: {\n dropdownTextInput:\n restTargetClassNames?.dropdownTextInput ?? selectTextInput(),\n root: restTargetClassNames?.root ?? selectTextInputRoot(),\n label: restTargetClassNames?.label ?? selectTextInputLabel(),\n description:\n restTargetClassNames?.description ?? selectTextInputDescription(),\n error: restTargetClassNames?.error ?? selectTextInputError(),\n wrapper: restTargetClassNames?.wrapper ?? selectTextInputWrapper(),\n input: restTargetClassNames?.input ?? selectTextInputInput(),\n section: restTargetClassNames?.section ?? selectTextInputSection(),\n required: restTargetClassNames?.required ?? selectTextInputRequired(),\n },\n clearButtonProps: {\n label: clearButtonText,\n classNames: {\n clearButton: clearButtonClassNames?.clearButton ?? selectClearButton(),\n root: clearButtonClassNames?.root ?? selectClearButtonRoot(),\n icon: clearButtonClassNames?.icon ?? selectClearButtonIcon(),\n iconRaw: {\n iconRaw:\n clearButtonClassNames?.iconRaw?.iconRaw ??\n selectClearButtonIconRaw(),\n root:\n clearButtonClassNames?.iconRaw?.root ??\n selectClearButtonIconRawRoot(),\n },\n },\n },\n chevronProps: {\n classNames: {\n chevron: chevronClassNames?.chevron ?? selectChevron(),\n root: chevronClassNames?.root ?? selectChevronRoot(),\n open: {\n iconRaw: chevronClassNames?.open?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.open?.root ?? selectChevronIconRoot(),\n },\n close: {\n iconRaw: chevronClassNames?.close?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.close?.root ?? selectChevronIconRoot(),\n },\n },\n },\n };\n\n return (\n <Dropdown\n data-searchable={searchable}\n classNames={{\n dropdown: dropdownClassNames?.dropdown ?? select(),\n root: dropdownClassNames?.root ?? selectRoot(),\n options: dropdownClassNames?.options ?? selectOptions(),\n option: dropdownClassNames?.option ?? selectOption(),\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n search: dropdownClassNames?.search,\n }}\n scrollAreaProps={{\n classNames: {\n dropdownScrollAreaAutosize:\n scrollAreaClassNames?.dropdownScrollAreaAutosize ??\n selectScrollAreaAutosize(),\n },\n }}\n target={<ComboboxTarget {...targetProps} />}\n dropdownTopSlot={\n searchable && (\n <SelectSearch\n searchPlaceholder={searchPlaceholder}\n startSlot={searchStartSlot}\n classNames={{\n input: searchClassNames?.input ?? selectSearchInput(),\n wrapper: searchClassNames?.wrapper ?? selectSearchWrapper(),\n section: searchClassNames?.section ?? selectSearchSection(),\n }}\n />\n )\n }\n {...props}\n >\n <ComboboxOptions\n emptyProps={{\n emptyText: resolvedEmptyText,\n classNames: {\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n },\n }}\n creatableProps={{\n creatable: false,\n }}\n />\n </Dropdown>\n );\n};\n"],"mappings":"s8BA+DA,MAAa,GAAU,CACrB,QACA,cACA,YAAY,GACZ,kBACA,YACA,aACA,oBACA,kBACA,mBACA,YACA,aACA,GAAG,KACc,CACjB,GAAM,CACJ,OAAQ,EACR,WAAY,EACZ,GAAG,GACD,GAAc,EAAE,CAEd,CACJ,YAAa,EACb,QAAS,EACT,GAAG,GACD,GAAoB,EAAE,CACpB,EACJ,IAAc,EAAa,aAAe,IAAA,IAEtC,EAAc,CAClB,cACA,QACA,YACA,SAAU,GACV,YAAa,CAAC,EACd,YACA,aAAc,GACd,WAAY,CACV,kBACE,GAAsB,mBAAqB,GAAiB,CAC9D,KAAM,GAAsB,MAAQ,GAAqB,CACzD,MAAO,GAAsB,OAAS,GAAsB,CAC5D,YACE,GAAsB,aAAe,GAA4B,CACnE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,SAAU,GAAsB,UAAY,GAAyB,CACtE,CACD,iBAAkB,CAChB,MAAO,EACP,WAAY,CACV,YAAa,GAAuB,aAAe,GAAmB,CACtE,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,QAAS,CACP,QACE,GAAuB,SAAS,SAChC,GAA0B,CAC5B,KACE,GAAuB,SAAS,MAChC,GAA8B,CACjC,CACF,CACF,CACD,aAAc,CACZ,WAAY,CACV,QAAS,GAAmB,SAAW,GAAe,CACtD,KAAM,GAAmB,MAAQ,GAAmB,CACpD,KAAM,CACJ,QAAS,GAAmB,MAAM,SAAW,GAAmB,CAChE,KAAM,GAAmB,MAAM,MAAQ,GAAuB,CAC/D,CACD,MAAO,CACL,QAAS,GAAmB,OAAO,SAAW,GAAmB,CACjE,KAAM,GAAmB,OAAO,MAAQ,GAAuB,CAChE,CACF,CACF,CACF,CAED,OACE,EAAC,EAAA,CACC,kBAAiB,EACjB,WAAY,CACV,SAAU,GAAoB,UAAY,GAAQ,CAClD,KAAM,GAAoB,MAAQ,GAAY,CAC9C,QAAS,GAAoB,SAAW,GAAe,CACvD,OAAQ,GAAoB,QAAU,GAAc,CACpD,MAAO,GAAoB,OAAS,GAAa,CACjD,OAAQ,GAAoB,OAC7B,CACD,gBAAiB,CACf,WAAY,CACV,2BACE,GAAsB,4BACtB,GAA0B,CAC7B,CACF,CACD,OAAQ,EAAC,EAAA,CAAe,GAAI,EAAA,CAAe,CAC3C,gBACE,GACE,EAAC,EAAA,CACoB,oBACnB,UAAW,EACX,WAAY,CACV,MAAO,GAAkB,OAAS,GAAmB,CACrD,QAAS,GAAkB,SAAW,GAAqB,CAC3D,QAAS,GAAkB,SAAW,GAAqB,CAC5D,EACD,CAGN,GAAI,WAEJ,EAAC,EAAA,CACC,WAAY,CACV,UAAW,EACX,WAAY,CACV,MAAO,GAAoB,OAAS,GAAa,CAClD,CACF,CACD,eAAgB,CACd,UAAW,GACZ,EACD,EACO"}
1
+ {"version":3,"file":"Select.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/select/Select.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n select,\n selectChevron,\n selectChevronIcon,\n selectChevronIconRoot,\n selectChevronRoot,\n selectClearButton,\n selectClearButtonIcon,\n selectClearButtonIconRaw,\n selectClearButtonIconRawRoot,\n selectClearButtonRoot,\n selectEmpty,\n selectOption,\n selectOptions,\n selectRoot,\n selectScrollAreaAutosize,\n selectSearchInput,\n selectSearchSection,\n selectSearchWrapper,\n selectTextInput,\n selectTextInputDescription,\n selectTextInputError,\n selectTextInputInput,\n selectTextInputLabel,\n selectTextInputRequired,\n selectTextInputRoot,\n selectTextInputSection,\n selectTextInputWrapper,\n} from '@mage-ui/styled-system/recipes';\n\nimport { ComboboxOptions } from '../combobox/ComboboxOptions';\nimport type { ComboboxTargetProps } from '../combobox/ComboboxTarget';\nimport { ComboboxTarget } from '../combobox/ComboboxTarget';\nimport { Dropdown, type DropdownProps } from '../Dropdown';\nimport { SelectSearch, type SelectSearchClassNames } from './SelectSearch';\n\nexport type SelectProps = Omit<\n DropdownProps,\n 'children' | 'classNames' | 'target'\n> & {\n label?: string;\n placeholder?: string;\n clearable?: boolean;\n clearButtonText?: string;\n emptyText?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n searchStartSlot?: ReactNode;\n searchClassNames?: SelectSearchClassNames;\n startSlot?: ReactNode;\n classNames?: DropdownProps['classNames'] & {\n target?: ComboboxTargetProps['classNames'] & {\n clearButton?: NonNullable<\n ComboboxTargetProps['clearButtonProps']\n >['classNames'];\n chevron?: NonNullable<ComboboxTargetProps['chevronProps']>['classNames'];\n };\n scrollArea?: NonNullable<DropdownProps['scrollAreaProps']>['classNames'];\n };\n};\n\nexport const Select = ({\n label,\n placeholder,\n clearable = true,\n clearButtonText,\n emptyText,\n searchable,\n searchPlaceholder,\n searchStartSlot,\n searchClassNames,\n startSlot,\n classNames,\n ...props\n}: SelectProps) => {\n const {\n target: targetClassNames,\n scrollArea: scrollAreaClassNames,\n ...dropdownClassNames\n } = classNames || {};\n\n const {\n clearButton: clearButtonClassNames,\n chevron: chevronClassNames,\n ...restTargetClassNames\n } = targetClassNames || {};\n const resolvedEmptyText =\n emptyText ?? (searchable ? 'No results' : undefined);\n\n const targetProps = {\n placeholder,\n label,\n clearable,\n readOnly: true,\n closeOnBlur: !searchable,\n startSlot,\n displayQuery: false,\n classNames: {\n dropdownTextInput:\n restTargetClassNames?.dropdownTextInput ?? selectTextInput(),\n root: restTargetClassNames?.root ?? selectTextInputRoot(),\n label: restTargetClassNames?.label ?? selectTextInputLabel(),\n description:\n restTargetClassNames?.description ?? selectTextInputDescription(),\n error: restTargetClassNames?.error ?? selectTextInputError(),\n wrapper: restTargetClassNames?.wrapper ?? selectTextInputWrapper(),\n input: restTargetClassNames?.input ?? selectTextInputInput(),\n section: restTargetClassNames?.section ?? selectTextInputSection(),\n required: restTargetClassNames?.required ?? selectTextInputRequired(),\n },\n clearButtonProps: {\n label: clearButtonText,\n classNames: {\n clearButton: clearButtonClassNames?.clearButton ?? selectClearButton(),\n root: clearButtonClassNames?.root ?? selectClearButtonRoot(),\n icon: clearButtonClassNames?.icon ?? selectClearButtonIcon(),\n iconRaw: {\n iconRaw:\n clearButtonClassNames?.iconRaw?.iconRaw ??\n selectClearButtonIconRaw(),\n root:\n clearButtonClassNames?.iconRaw?.root ??\n selectClearButtonIconRawRoot(),\n },\n },\n },\n chevronProps: {\n classNames: {\n chevron: chevronClassNames?.chevron ?? selectChevron(),\n root: chevronClassNames?.root ?? selectChevronRoot(),\n open: {\n iconRaw: chevronClassNames?.open?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.open?.root ?? selectChevronIconRoot(),\n },\n close: {\n iconRaw: chevronClassNames?.close?.iconRaw ?? selectChevronIcon(),\n root: chevronClassNames?.close?.root ?? selectChevronIconRoot(),\n },\n },\n },\n };\n\n return (\n <Dropdown\n data-searchable={searchable}\n classNames={{\n dropdown: dropdownClassNames?.dropdown ?? select(),\n root: dropdownClassNames?.root ?? selectRoot(),\n options: dropdownClassNames?.options ?? selectOptions(),\n option: dropdownClassNames?.option ?? selectOption(),\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n search: dropdownClassNames?.search,\n }}\n scrollAreaProps={{\n classNames: {\n dropdownScrollAreaAutosize:\n scrollAreaClassNames?.dropdownScrollAreaAutosize ??\n selectScrollAreaAutosize(),\n },\n }}\n target={<ComboboxTarget {...targetProps} />}\n dropdownTopSlot={\n searchable && (\n <SelectSearch\n searchPlaceholder={searchPlaceholder}\n startSlot={searchStartSlot}\n classNames={{\n input: searchClassNames?.input ?? selectSearchInput(),\n wrapper: searchClassNames?.wrapper ?? selectSearchWrapper(),\n section: searchClassNames?.section ?? selectSearchSection(),\n }}\n />\n )\n }\n {...props}\n >\n <ComboboxOptions\n emptyProps={{\n emptyText: resolvedEmptyText,\n classNames: {\n empty: dropdownClassNames?.empty ?? selectEmpty(),\n },\n }}\n creatableProps={{\n creatable: false,\n }}\n />\n </Dropdown>\n );\n};\n"],"mappings":"s8BA+DA,MAAa,GAAU,CACrB,QACA,cACA,YAAY,GACZ,kBACA,YACA,aACA,oBACA,kBACA,mBACA,YACA,aACA,GAAG,KACc,CACjB,GAAM,CACJ,OAAQ,EACR,WAAY,EACZ,GAAG,GACD,GAAc,EAAE,CAEd,CACJ,YAAa,EACb,QAAS,EACT,GAAG,GACD,GAAoB,EAAE,CACpB,EACJ,IAAc,EAAa,aAAe,IAAA,IAEtC,EAAc,CAClB,cACA,QACA,YACA,SAAU,GACV,YAAa,CAAC,EACd,YACA,aAAc,GACd,WAAY,CACV,kBACE,GAAsB,mBAAqB,GAAiB,CAC9D,KAAM,GAAsB,MAAQ,GAAqB,CACzD,MAAO,GAAsB,OAAS,GAAsB,CAC5D,YACE,GAAsB,aAAe,GAA4B,CACnE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,MAAO,GAAsB,OAAS,GAAsB,CAC5D,QAAS,GAAsB,SAAW,GAAwB,CAClE,SAAU,GAAsB,UAAY,GAAyB,CACtE,CACD,iBAAkB,CAChB,MAAO,EACP,WAAY,CACV,YAAa,GAAuB,aAAe,GAAmB,CACtE,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,KAAM,GAAuB,MAAQ,GAAuB,CAC5D,QAAS,CACP,QACE,GAAuB,SAAS,SAChC,GAA0B,CAC5B,KACE,GAAuB,SAAS,MAChC,GAA8B,CACjC,CACF,CACF,CACD,aAAc,CACZ,WAAY,CACV,QAAS,GAAmB,SAAW,GAAe,CACtD,KAAM,GAAmB,MAAQ,GAAmB,CACpD,KAAM,CACJ,QAAS,GAAmB,MAAM,SAAW,GAAmB,CAChE,KAAM,GAAmB,MAAM,MAAQ,GAAuB,CAC/D,CACD,MAAO,CACL,QAAS,GAAmB,OAAO,SAAW,GAAmB,CACjE,KAAM,GAAmB,OAAO,MAAQ,GAAuB,CAChE,CACF,CACF,CACF,CAED,OACE,EAAC,EAAD,CACE,kBAAiB,EACjB,WAAY,CACV,SAAU,GAAoB,UAAY,GAAQ,CAClD,KAAM,GAAoB,MAAQ,GAAY,CAC9C,QAAS,GAAoB,SAAW,GAAe,CACvD,OAAQ,GAAoB,QAAU,GAAc,CACpD,MAAO,GAAoB,OAAS,GAAa,CACjD,OAAQ,GAAoB,OAC7B,CACD,gBAAiB,CACf,WAAY,CACV,2BACE,GAAsB,4BACtB,GAA0B,CAC7B,CACF,CACD,OAAQ,EAAC,EAAD,CAAgB,GAAI,EAAe,CAAA,CAC3C,gBACE,GACE,EAAC,EAAD,CACqB,oBACnB,UAAW,EACX,WAAY,CACV,MAAO,GAAkB,OAAS,GAAmB,CACrD,QAAS,GAAkB,SAAW,GAAqB,CAC3D,QAAS,GAAkB,SAAW,GAAqB,CAC5D,CACD,CAAA,CAGN,GAAI,WAEJ,EAAC,EAAD,CACE,WAAY,CACV,UAAW,EACX,WAAY,CACV,MAAO,GAAoB,OAAS,GAAa,CAClD,CACF,CACD,eAAgB,CACd,UAAW,GACZ,CACD,CAAA,CACO,CAAA"}
@@ -1,4 +1,3 @@
1
- import "react/jsx-runtime";
2
1
  import { ReactNode } from "react";
3
2
 
4
3
  //#region src/components/controls/dropdown/select/SelectSearch.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"SelectSearch.d.mts","names":[],"sources":["../../../../../src/components/controls/dropdown/select/SelectSearch.tsx"],"mappings":";;;;KAKY,sBAAA;EACV,KAAA;EACA,OAAA;EACA,OAAA;AAAA"}
1
+ {"version":3,"file":"SelectSearch.d.mts","names":[],"sources":["../../../../../src/components/controls/dropdown/select/SelectSearch.tsx"],"mappings":";;;KAKY,sBAAA;EACV,KAAA;EACA,OAAA;EACA,OAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectSearch.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/select/SelectSearch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Dropdown } from '../Dropdown';\nimport { useDropdownContext } from '../DropdownContextProvider';\n\nexport type SelectSearchClassNames = {\n input?: string;\n wrapper?: string;\n section?: string;\n};\n\nexport type SelectSearchProps = {\n searchPlaceholder?: string;\n startSlot?: ReactNode;\n classNames?: SelectSearchClassNames;\n};\n\nexport const SelectSearch = ({\n searchPlaceholder,\n startSlot,\n classNames,\n}: SelectSearchProps) => {\n const { query, setQuery, store } = useDropdownContext();\n\n return (\n <Dropdown.Search\n value={query ?? ''}\n onChange={(event) => {\n setQuery(event.currentTarget.value);\n store.updateSelectedOptionIndex();\n }}\n placeholder={searchPlaceholder}\n leftSection={startSlot}\n leftSectionProps={{\n className: classNames?.section,\n }}\n classNames={{\n input: classNames?.input,\n wrapper: classNames?.wrapper,\n }}\n />\n );\n};\n"],"mappings":"uJAiBA,MAAa,GAAgB,CAC3B,oBACA,YACA,gBACuB,CACvB,GAAM,CAAE,QAAO,WAAU,SAAU,GAAoB,CAEvD,OACE,EAAC,EAAS,OAAA,CACR,MAAO,GAAS,GAChB,SAAW,GAAU,CACnB,EAAS,EAAM,cAAc,MAAM,CACnC,EAAM,2BAA2B,EAEnC,YAAa,EACb,YAAa,EACb,iBAAkB,CAChB,UAAW,GAAY,QACxB,CACD,WAAY,CACV,MAAO,GAAY,MACnB,QAAS,GAAY,QACtB,EACD"}
1
+ {"version":3,"file":"SelectSearch.mjs","names":[],"sources":["../../../../../src/components/controls/dropdown/select/SelectSearch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Dropdown } from '../Dropdown';\nimport { useDropdownContext } from '../DropdownContextProvider';\n\nexport type SelectSearchClassNames = {\n input?: string;\n wrapper?: string;\n section?: string;\n};\n\nexport type SelectSearchProps = {\n searchPlaceholder?: string;\n startSlot?: ReactNode;\n classNames?: SelectSearchClassNames;\n};\n\nexport const SelectSearch = ({\n searchPlaceholder,\n startSlot,\n classNames,\n}: SelectSearchProps) => {\n const { query, setQuery, store } = useDropdownContext();\n\n return (\n <Dropdown.Search\n value={query ?? ''}\n onChange={(event) => {\n setQuery(event.currentTarget.value);\n store.updateSelectedOptionIndex();\n }}\n placeholder={searchPlaceholder}\n leftSection={startSlot}\n leftSectionProps={{\n className: classNames?.section,\n }}\n classNames={{\n input: classNames?.input,\n wrapper: classNames?.wrapper,\n }}\n />\n );\n};\n"],"mappings":"uJAiBA,MAAa,GAAgB,CAC3B,oBACA,YACA,gBACuB,CACvB,GAAM,CAAE,QAAO,WAAU,SAAU,GAAoB,CAEvD,OACE,EAAC,EAAS,OAAV,CACE,MAAO,GAAS,GAChB,SAAW,GAAU,CACnB,EAAS,EAAM,cAAc,MAAM,CACnC,EAAM,2BAA2B,EAEnC,YAAa,EACb,YAAa,EACb,iBAAkB,CAChB,UAAW,GAAY,QACxB,CACD,WAAY,CACV,MAAO,GAAY,MACnB,QAAS,GAAY,QACtB,CACD,CAAA"}
@@ -1,6 +1,5 @@
1
1
  import { IconProps } from "../../data-display/icons/icon/Icon.mjs";
2
2
  import { LoaderOvalProps } from "../../data-display/loader-oval/LoaderOval.mjs";
3
- import "../../data-display/index.mjs";
4
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
4
  import { ReactNode } from "react";
6
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"Dropzone.d.mts","names":[],"sources":["../../../../src/components/controls/dropzone/Dropzone.tsx"],"mappings":";;;;;;;KA2BY,QAAA;EACV,IAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;EACA,QAAA;EACA,OAAA;EACA,GAAA;EACA,KAAA;EACA,QAAA;AAAA;AAAA,KAGU,aAAA;EACV,QAAA;IACE,KAAA;IACA,WAAA;IACA;EAAA;IAEA,KAAA,EAAO,MAAA,SAAe,QAAA;IACtB,WAAA;IACA,UAAA,GAAa,QAAA;EAAA,MACT,SAAA;EACN,YAAA,GAAe,MAAA,SAAe,QAAA;EAC9B,QAAA;EACA,IAAA,GAAO,MAAA;EACP,GAAA;EACA,MAAA;EACA,qBAAA;EACA,KAAA,GAAQ,SAAA;EACR,QAAA,GAAW,SAAA;EACX,IAAA,GAAO,SAAA;EACP,OAAA;EACA,UAAA;IACE,QAAA;IACA,IAAA;IACA,gBAAA;MACE,IAAA;MACA,KAAA;IAAA;IAEF,QAAA;IACA,YAAA,GAAe,SAAA;IACf,MAAA,GAAS,eAAA;IACT,QAAA;IACA,KAAA;IACA,QAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAIS,QAAA;EAAY,IAAA;EAAA,QAAA;EAAA,YAAA;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;EAAA,KAAA;EAAA,QAAA;EAAA,IAAA;EAAA,OAAA;EAAA;AAAA,GAYtB,aAAA,KAAa,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"Dropzone.d.mts","names":[],"sources":["../../../../src/components/controls/dropzone/Dropzone.tsx"],"mappings":";;;;;;KA2BY,QAAA;EACV,IAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;EACA,QAAA;EACA,OAAA;EACA,GAAA;EACA,KAAA;EACA,QAAA;AAAA;AAAA,KAGU,aAAA;EACV,QAAA;IACE,KAAA;IACA,WAAA;IACA;EAAA;IAEA,KAAA,EAAO,MAAA,SAAe,QAAA;IACtB,WAAA;IACA,UAAA,GAAa,QAAA;EAAA,MACT,SAAA;EACN,YAAA,GAAe,MAAA,SAAe,QAAA;EAC9B,QAAA;EACA,IAAA,GAAO,MAAA;EACP,GAAA;EACA,MAAA;EACA,qBAAA;EACA,KAAA,GAAQ,SAAA;EACR,QAAA,GAAW,SAAA;EACX,IAAA,GAAO,SAAA;EACP,OAAA;EACA,UAAA;IACE,QAAA;IACA,IAAA;IACA,gBAAA;MACE,IAAA;MACA,KAAA;IAAA;IAEF,QAAA;IACA,YAAA,GAAe,SAAA;IACf,MAAA,GAAS,eAAA;IACT,QAAA;IACA,KAAA;IACA,QAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAIS,QAAA;EAAY,IAAA;EAAA,QAAA;EAAA,YAAA;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;EAAA,KAAA;EAAA,QAAA;EAAA,IAAA;EAAA,OAAA;EAAA;AAAA,GAYtB,aAAA,KAAa,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dropzone.mjs","names":["Dropzone","MantineDropzone"],"sources":["../../../../src/components/controls/dropzone/Dropzone.tsx"],"sourcesContent":["import { type ReactNode, useCallback, useRef } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n dropzone,\n dropzoneDropzoneInner,\n dropzoneDropzoneRoot,\n dropzoneHint,\n dropzoneIcon,\n dropzoneIconSlot,\n dropzoneLoader,\n dropzoneLoaderRoot,\n dropzoneRoot,\n dropzoneSubtitle,\n dropzoneTextSlot,\n dropzoneTitle,\n} from '@mage-ui/styled-system/recipes';\nimport { Dropzone as MantineDropzone } from '@mantine/dropzone';\nimport {\n Icon,\n type IconProps,\n LoaderOval,\n type LoaderOvalProps,\n} from '@/components/data-display';\n\nimport { useDropzoneState } from './use-dropzone-state';\n\nexport type FileData = {\n name: string;\n size: number;\n type: string;\n date: string;\n uploaded: boolean;\n loading: boolean;\n url: string;\n error?: string;\n progress?: number; // (0-100)\n};\n\nexport type DropzoneProps = {\n children: ({\n files,\n isUploading,\n removeFile,\n }: {\n files: Record<string, FileData>;\n isUploading: boolean;\n removeFile: (fileName: string) => void;\n }) => ReactNode;\n initialFiles?: Record<string, FileData>;\n maxFiles?: number;\n data?: Record<string, unknown>;\n url: string;\n accept?: string[];\n preventDropOnDocument?: boolean;\n title?: ReactNode;\n subtitle?: ReactNode;\n hint?: ReactNode;\n inputId?: string;\n classNames?: {\n dropzone?: string;\n root?: string;\n dropzoneDropzone?: {\n root?: string;\n inner?: string;\n };\n iconSlot?: string;\n dropzoneIcon?: IconProps['classNames'];\n loader?: LoaderOvalProps['classNames'];\n textSlot?: string;\n title?: string;\n subtitle?: string;\n hint?: string;\n };\n};\n\nexport const Dropzone = ({\n data,\n children,\n initialFiles = {},\n maxFiles,\n accept,\n url,\n title,\n subtitle,\n hint,\n inputId,\n classNames,\n}: DropzoneProps) => {\n const dropzoneRef = useRef<HTMLDivElement>(null);\n const { files, isUploading, uploadMultipleFiles, removeFile } =\n useDropzoneState(url, initialFiles);\n const handleDrop = useCallback(\n async (acceptedFiles: File[]) => {\n const currentCount = Object.keys(files).length;\n const max = maxFiles ?? Number.POSITIVE_INFINITY;\n const remainingSlots = max - currentCount;\n if (remainingSlots <= 0) {\n return;\n }\n const filesToUpload = acceptedFiles.slice(0, remainingSlots);\n await uploadMultipleFiles(filesToUpload, data);\n },\n [uploadMultipleFiles, data, files, maxFiles],\n );\n\n return (\n <div\n className={cx(\n classNames?.dropzone ?? dropzone(),\n classNames?.root ?? dropzoneRoot(),\n )}\n >\n <MantineDropzone\n ref={dropzoneRef}\n onDrop={handleDrop}\n disabled={\n Object.keys(files).length >= (maxFiles ?? Number.POSITIVE_INFINITY)\n }\n loading={isUploading}\n accept={accept}\n preventDropOnDocument\n inputProps={{ id: inputId }}\n classNames={{\n root:\n classNames?.dropzoneDropzone?.root ??\n cx(dropzoneDropzoneRoot(), 'group'),\n inner: classNames?.dropzoneDropzone?.inner ?? dropzoneDropzoneInner(),\n }}\n >\n <div className={classNames?.iconSlot ?? dropzoneIconSlot()}>\n {isUploading ? (\n <LoaderOval\n classNames={{\n loader: classNames?.loader?.loader ?? dropzoneLoader(),\n root: classNames?.loader?.root ?? dropzoneLoaderRoot(),\n }}\n />\n ) : (\n <>\n <MantineDropzone.Idle>\n <Icon\n name='mage-dropzone-upload-01'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.dropzoneIcon?.icon ?? dropzoneIcon(),\n }}\n />\n </MantineDropzone.Idle>\n <MantineDropzone.Accept>\n <Icon\n name='mage-dropzone-thumbs-up'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.dropzoneIcon?.icon ?? dropzoneIcon(),\n }}\n />\n </MantineDropzone.Accept>\n <MantineDropzone.Reject>\n <Icon\n name='mage-dropzone-thumbs-down'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.dropzoneIcon?.icon ?? dropzoneIcon(),\n }}\n />\n </MantineDropzone.Reject>\n </>\n )}\n </div>\n <div className={classNames?.textSlot ?? dropzoneTextSlot()}>\n <span className={classNames?.title ?? dropzoneTitle()}>\n {title || 'Upload files'}\n </span>\n <span className={classNames?.subtitle ?? dropzoneSubtitle()}>\n {subtitle || 'Drag images here or click to select files'}\n </span>\n <span className={classNames?.hint ?? dropzoneHint()}>\n {hint ||\n 'Attach as many files as you like, each file should not exceed 5mb'}\n </span>\n </div>\n </MantineDropzone>\n {Object.keys(files).length > 0 &&\n children({ files, isUploading, removeFile })}\n </div>\n );\n};\n"],"mappings":"wrBA4EA,MAAaA,GAAY,CACvB,OACA,WACA,eAAe,EAAE,CACjB,WACA,SACA,MACA,QACA,WACA,OACA,UACA,gBACmB,CACnB,IAAM,EAAc,EAAuB,KAAK,CAC1C,CAAE,QAAO,cAAa,sBAAqB,cAC/C,EAAiB,EAAK,EAAa,CAC/B,EAAa,EACjB,KAAO,IAA0B,CAC/B,IAAM,EAAe,OAAO,KAAK,EAAM,CAAC,OAElC,GADM,GAAY,KACK,EACzB,GAAkB,GAItB,MAAM,EADgB,EAAc,MAAM,EAAG,EAAe,CACnB,EAAK,EAEhD,CAAC,EAAqB,EAAM,EAAO,EAAS,CAC7C,CAED,OACE,EAAC,MAAA,CACC,UAAW,EACT,GAAY,UAAY,GAAU,CAClC,GAAY,MAAQ,GAAc,CACnC,WAED,EAACC,EAAAA,CACC,IAAK,EACL,OAAQ,EACR,SACE,OAAO,KAAK,EAAM,CAAC,SAAW,GAAY,KAE5C,QAAS,EACD,SACR,sBAAA,GACA,WAAY,CAAE,GAAI,EAAS,CAC3B,WAAY,CACV,KACE,GAAY,kBAAkB,MAC9B,EAAG,GAAsB,CAAE,QAAQ,CACrC,MAAO,GAAY,kBAAkB,OAAS,GAAuB,CACtE,WAED,EAAC,MAAA,CAAI,UAAW,GAAY,UAAY,GAAkB,UACvD,EACC,EAAC,EAAA,CACC,WAAY,CACV,OAAQ,GAAY,QAAQ,QAAU,GAAgB,CACtD,KAAM,GAAY,QAAQ,MAAQ,GAAoB,CACvD,CAAA,CACD,CAEF,EAAA,EAAA,CAAA,SAAA,CACE,EAACA,EAAgB,KAAA,CAAA,SACf,EAAC,EAAA,CACC,KAAK,0BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,cAAc,MAAQ,GAAc,CACvD,EACD,CAAA,CACmB,CACvB,EAACA,EAAgB,OAAA,CAAA,SACf,EAAC,EAAA,CACC,KAAK,0BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,cAAc,MAAQ,GAAc,CACvD,EACD,CAAA,CACqB,CACzB,EAACA,EAAgB,OAAA,CAAA,SACf,EAAC,EAAA,CACC,KAAK,4BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,cAAc,MAAQ,GAAc,CACvD,EACD,CAAA,CACqB,GACxB,EAED,CACN,EAAC,MAAA,CAAI,UAAW,GAAY,UAAY,GAAkB,WACxD,EAAC,OAAA,CAAK,UAAW,GAAY,OAAS,GAAe,UAClD,GAAS,gBACL,CACP,EAAC,OAAA,CAAK,UAAW,GAAY,UAAY,GAAkB,UACxD,GAAY,6CACR,CACP,EAAC,OAAA,CAAK,UAAW,GAAY,MAAQ,GAAc,UAChD,GACC,qEACG,GACH,CAAA,EACU,CACjB,OAAO,KAAK,EAAM,CAAC,OAAS,GAC3B,EAAS,CAAE,QAAO,cAAa,aAAY,CAAC,CAAA,EAC1C"}
1
+ {"version":3,"file":"Dropzone.mjs","names":["Dropzone","MantineDropzone"],"sources":["../../../../src/components/controls/dropzone/Dropzone.tsx"],"sourcesContent":["import { type ReactNode, useCallback, useRef } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n dropzone,\n dropzoneDropzoneInner,\n dropzoneDropzoneRoot,\n dropzoneHint,\n dropzoneIcon,\n dropzoneIconSlot,\n dropzoneLoader,\n dropzoneLoaderRoot,\n dropzoneRoot,\n dropzoneSubtitle,\n dropzoneTextSlot,\n dropzoneTitle,\n} from '@mage-ui/styled-system/recipes';\nimport { Dropzone as MantineDropzone } from '@mantine/dropzone';\nimport {\n Icon,\n type IconProps,\n LoaderOval,\n type LoaderOvalProps,\n} from '@/components/data-display';\n\nimport { useDropzoneState } from './use-dropzone-state';\n\nexport type FileData = {\n name: string;\n size: number;\n type: string;\n date: string;\n uploaded: boolean;\n loading: boolean;\n url: string;\n error?: string;\n progress?: number; // (0-100)\n};\n\nexport type DropzoneProps = {\n children: ({\n files,\n isUploading,\n removeFile,\n }: {\n files: Record<string, FileData>;\n isUploading: boolean;\n removeFile: (fileName: string) => void;\n }) => ReactNode;\n initialFiles?: Record<string, FileData>;\n maxFiles?: number;\n data?: Record<string, unknown>;\n url: string;\n accept?: string[];\n preventDropOnDocument?: boolean;\n title?: ReactNode;\n subtitle?: ReactNode;\n hint?: ReactNode;\n inputId?: string;\n classNames?: {\n dropzone?: string;\n root?: string;\n dropzoneDropzone?: {\n root?: string;\n inner?: string;\n };\n iconSlot?: string;\n dropzoneIcon?: IconProps['classNames'];\n loader?: LoaderOvalProps['classNames'];\n textSlot?: string;\n title?: string;\n subtitle?: string;\n hint?: string;\n };\n};\n\nexport const Dropzone = ({\n data,\n children,\n initialFiles = {},\n maxFiles,\n accept,\n url,\n title,\n subtitle,\n hint,\n inputId,\n classNames,\n}: DropzoneProps) => {\n const dropzoneRef = useRef<HTMLDivElement>(null);\n const { files, isUploading, uploadMultipleFiles, removeFile } =\n useDropzoneState(url, initialFiles);\n const handleDrop = useCallback(\n async (acceptedFiles: File[]) => {\n const currentCount = Object.keys(files).length;\n const max = maxFiles ?? Number.POSITIVE_INFINITY;\n const remainingSlots = max - currentCount;\n if (remainingSlots <= 0) {\n return;\n }\n const filesToUpload = acceptedFiles.slice(0, remainingSlots);\n await uploadMultipleFiles(filesToUpload, data);\n },\n [uploadMultipleFiles, data, files, maxFiles],\n );\n\n return (\n <div\n className={cx(\n classNames?.dropzone ?? dropzone(),\n classNames?.root ?? dropzoneRoot(),\n )}\n >\n <MantineDropzone\n ref={dropzoneRef}\n onDrop={handleDrop}\n disabled={\n Object.keys(files).length >= (maxFiles ?? Number.POSITIVE_INFINITY)\n }\n loading={isUploading}\n accept={accept}\n preventDropOnDocument\n inputProps={{ id: inputId }}\n classNames={{\n root:\n classNames?.dropzoneDropzone?.root ??\n cx(dropzoneDropzoneRoot(), 'group'),\n inner: classNames?.dropzoneDropzone?.inner ?? dropzoneDropzoneInner(),\n }}\n >\n <div className={classNames?.iconSlot ?? dropzoneIconSlot()}>\n {isUploading ? (\n <LoaderOval\n classNames={{\n loader: classNames?.loader?.loader ?? dropzoneLoader(),\n root: classNames?.loader?.root ?? dropzoneLoaderRoot(),\n }}\n />\n ) : (\n <>\n <MantineDropzone.Idle>\n <Icon\n name='mage-dropzone-upload-01'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.dropzoneIcon?.icon ?? dropzoneIcon(),\n }}\n />\n </MantineDropzone.Idle>\n <MantineDropzone.Accept>\n <Icon\n name='mage-dropzone-thumbs-up'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.dropzoneIcon?.icon ?? dropzoneIcon(),\n }}\n />\n </MantineDropzone.Accept>\n <MantineDropzone.Reject>\n <Icon\n name='mage-dropzone-thumbs-down'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.dropzoneIcon?.icon ?? dropzoneIcon(),\n }}\n />\n </MantineDropzone.Reject>\n </>\n )}\n </div>\n <div className={classNames?.textSlot ?? dropzoneTextSlot()}>\n <span className={classNames?.title ?? dropzoneTitle()}>\n {title || 'Upload files'}\n </span>\n <span className={classNames?.subtitle ?? dropzoneSubtitle()}>\n {subtitle || 'Drag images here or click to select files'}\n </span>\n <span className={classNames?.hint ?? dropzoneHint()}>\n {hint ||\n 'Attach as many files as you like, each file should not exceed 5mb'}\n </span>\n </div>\n </MantineDropzone>\n {Object.keys(files).length > 0 &&\n children({ files, isUploading, removeFile })}\n </div>\n );\n};\n"],"mappings":"wrBA4EA,MAAaA,GAAY,CACvB,OACA,WACA,eAAe,EAAE,CACjB,WACA,SACA,MACA,QACA,WACA,OACA,UACA,gBACmB,CACnB,IAAM,EAAc,EAAuB,KAAK,CAC1C,CAAE,QAAO,cAAa,sBAAqB,cAC/C,EAAiB,EAAK,EAAa,CAC/B,EAAa,EACjB,KAAO,IAA0B,CAC/B,IAAM,EAAe,OAAO,KAAK,EAAM,CAAC,OAElC,GADM,GAAY,KACK,EACzB,GAAkB,GAItB,MAAM,EADgB,EAAc,MAAM,EAAG,EAAe,CACnB,EAAK,EAEhD,CAAC,EAAqB,EAAM,EAAO,EAAS,CAC7C,CAED,OACE,EAAC,MAAD,CACE,UAAW,EACT,GAAY,UAAY,GAAU,CAClC,GAAY,MAAQ,GAAc,CACnC,UAJH,CAME,EAACC,EAAD,CACE,IAAK,EACL,OAAQ,EACR,SACE,OAAO,KAAK,EAAM,CAAC,SAAW,GAAY,KAE5C,QAAS,EACD,SACR,sBAAA,GACA,WAAY,CAAE,GAAI,EAAS,CAC3B,WAAY,CACV,KACE,GAAY,kBAAkB,MAC9B,EAAG,GAAsB,CAAE,QAAQ,CACrC,MAAO,GAAY,kBAAkB,OAAS,GAAuB,CACtE,UAfH,CAiBE,EAAC,MAAD,CAAK,UAAW,GAAY,UAAY,GAAkB,UACvD,EACC,EAAC,EAAD,CACE,WAAY,CACV,OAAQ,GAAY,QAAQ,QAAU,GAAgB,CACtD,KAAM,GAAY,QAAQ,MAAQ,GAAoB,CACvD,CACD,CAAA,CAEF,EAAA,EAAA,CAAA,SAAA,CACE,EAACA,EAAgB,KAAjB,CAAA,SACE,EAAC,EAAD,CACE,KAAK,0BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,cAAc,MAAQ,GAAc,CACvD,CACD,CAAA,CACmB,CAAA,CACvB,EAACA,EAAgB,OAAjB,CAAA,SACE,EAAC,EAAD,CACE,KAAK,0BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,cAAc,MAAQ,GAAc,CACvD,CACD,CAAA,CACqB,CAAA,CACzB,EAACA,EAAgB,OAAjB,CAAA,SACE,EAAC,EAAD,CACE,KAAK,4BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,cAAc,MAAQ,GAAc,CACvD,CACD,CAAA,CACqB,CAAA,CACxB,CAAA,CAAA,CAED,CAAA,CACN,EAAC,MAAD,CAAK,UAAW,GAAY,UAAY,GAAkB,UAA1D,CACE,EAAC,OAAD,CAAM,UAAW,GAAY,OAAS,GAAe,UAClD,GAAS,eACL,CAAA,CACP,EAAC,OAAD,CAAM,UAAW,GAAY,UAAY,GAAkB,UACxD,GAAY,4CACR,CAAA,CACP,EAAC,OAAD,CAAM,UAAW,GAAY,MAAQ,GAAc,UAChD,GACC,oEACG,CAAA,CACH,GACU,GACjB,OAAO,KAAK,EAAM,CAAC,OAAS,GAC3B,EAAS,CAAE,QAAO,cAAa,aAAY,CAAC,CAC1C"}
@@ -1,7 +1,5 @@
1
1
  import { UploadedFileProps } from "../../data-display/uploaded-file/UploadedFile.mjs";
2
- import "../../data-display/index.mjs";
3
2
  import { DropzoneProps, FileData } from "../dropzone/Dropzone.mjs";
4
- import "../index.mjs";
5
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
6
4
  import { ReactNode } from "react";
7
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"DropzoneFiles.d.mts","names":[],"sources":["../../../../src/components/controls/dropzone-files/DropzoneFiles.tsx"],"mappings":";;;;;;;;KAoCY,kBAAA;EACV,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,KAAA,GAAQ,SAAA;EACR,KAAA,GAAQ,SAAA;EACR,QAAA,GAAW,SAAA;EACX,IAAA,GAAO,SAAA;EACP,YAAA,GAAe,MAAA,SAAe,QAAA;EAC9B,QAAA;EACA,MAAA;EACA,GAAA;EACA,OAAA;EACA,cAAA;EACA,UAAA;IACE,aAAA;IACA,IAAA;IACA,YAAA;IACA,KAAA;IACA,WAAA;IACA,KAAA;IACA,QAAA;IACA,QAAA;IACA,YAAA,GAAe,iBAAA;IACf,QAAA,GAAW,aAAA;IACX,UAAA;MAAe,UAAA;IAAA;EAAA;AAAA;AAAA,cAMN,aAAA;EAAiB,KAAA;EAAA,WAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,IAAA;EAAA,YAAA;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;EAAA,OAAA;EAAA;AAAA,GAa3B,kBAAA,KAAkB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"DropzoneFiles.d.mts","names":[],"sources":["../../../../src/components/controls/dropzone-files/DropzoneFiles.tsx"],"mappings":";;;;;;KAoCY,kBAAA;EACV,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,KAAA,GAAQ,SAAA;EACR,KAAA,GAAQ,SAAA;EACR,QAAA,GAAW,SAAA;EACX,IAAA,GAAO,SAAA;EACP,YAAA,GAAe,MAAA,SAAe,QAAA;EAC9B,QAAA;EACA,MAAA;EACA,GAAA;EACA,OAAA;EACA,cAAA;EACA,UAAA;IACE,aAAA;IACA,IAAA;IACA,YAAA;IACA,KAAA;IACA,WAAA;IACA,KAAA;IACA,QAAA;IACA,QAAA;IACA,YAAA,GAAe,iBAAA;IACf,QAAA,GAAW,aAAA;IACX,UAAA;MAAe,UAAA;IAAA;EAAA;AAAA;AAAA,cAMN,aAAA;EAAiB,KAAA;EAAA,WAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,IAAA;EAAA,YAAA;EAAA,QAAA;EAAA,MAAA;EAAA,GAAA;EAAA,OAAA;EAAA;AAAA,GAa3B,kBAAA,KAAkB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DropzoneFiles.mjs","names":[],"sources":["../../../../src/components/controls/dropzone-files/DropzoneFiles.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n dropzoneFiles,\n dropzoneFilesDescription,\n dropzoneFilesDropzone,\n dropzoneFilesError,\n dropzoneFilesFileItem,\n dropzoneFilesFileList,\n dropzoneFilesLabel,\n dropzoneFilesLabelWrapper,\n dropzoneFilesRoot,\n dropzoneFilesUploadedFile,\n // dropzoneFilesUploadedFileStartIconWrapped,\n // dropzoneFilesUploadedFileStartIconWrappedRoot,\n // dropzoneFilesUploadedFileStartIcon,\n // dropzoneFilesUploadedFileStartIconRoot,\n // dropzoneFilesUploadedFileStartIconIconRaw,\n // dropzoneFilesUploadedFileStartIconIconRawRoot,\n} from '@mage-ui/styled-system/recipes';\nimport {\n Dropzone,\n type DropzoneProps,\n type FileData,\n} from '@/components/controls';\nimport {\n // Icon,\n // type IconProps,\n // IconWrapped,\n // type IconWrappedProps,\n UploadedFile,\n UploadedFileDetails,\n type UploadedFileProps,\n} from '@/components/data-display';\n\nexport type DropzoneFilesProps = {\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n title?: ReactNode;\n subtitle?: ReactNode;\n hint?: ReactNode;\n initialFiles?: Record<string, FileData>;\n maxFiles?: number;\n accept?: string[];\n url: string;\n inputId?: string;\n fileListHeight?: number | string;\n classNames?: {\n dropzoneFiles?: string;\n root?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n fileList?: string;\n fileItem?: string;\n uploadedFile?: UploadedFileProps['classNames'];\n dropzone?: DropzoneProps['classNames'];\n scrollArea?: { scrollArea?: string };\n // startIconWrapped?: IconWrappedProps['classNames'];\n // startIcon?: IconProps['classNames'];\n };\n};\n\nexport const DropzoneFiles = ({\n label,\n description,\n error,\n title,\n subtitle,\n hint,\n initialFiles,\n maxFiles,\n accept,\n url,\n inputId,\n classNames,\n}: DropzoneFilesProps) => {\n const generatedId = useId();\n const groupId = inputId ?? generatedId;\n\n // TODO: gestionar error\n // TOOD: gestionar required\n return (\n <div\n className={cx(\n classNames?.dropzoneFiles ?? dropzoneFiles(),\n classNames?.root ?? dropzoneFilesRoot(),\n )}\n >\n <div className={classNames?.labelWrapper ?? dropzoneFilesLabelWrapper()}>\n {/* TODO: label obligatori / hidden */}\n {label && (\n <label\n htmlFor={groupId}\n className={classNames?.label ?? dropzoneFilesLabel()}\n >\n {label}\n </label>\n )}\n {description && (\n <p className={classNames?.description ?? dropzoneFilesDescription()}>\n {description}\n </p>\n )}\n </div>\n <Dropzone\n maxFiles={maxFiles}\n accept={accept}\n url={url}\n initialFiles={initialFiles}\n inputId={groupId}\n title={title}\n subtitle={subtitle}\n hint={hint}\n classNames={{\n dropzone: classNames?.dropzone?.dropzone ?? dropzoneFilesDropzone(),\n }}\n >\n {({ files, removeFile }) => (\n <ul className={classNames?.fileList ?? dropzoneFilesFileList()}>\n {Object.values(files).map((file) => (\n <li\n key={file.name}\n className={classNames?.fileItem ?? dropzoneFilesFileItem()}\n >\n <UploadedFile\n key={file.name}\n fileName={file.name}\n fileType={file.type}\n url={file.url}\n onRemove={() => removeFile(file.name)}\n classNames={{\n uploadedFile:\n classNames?.uploadedFile?.uploadedFile ??\n dropzoneFilesUploadedFile(),\n }}\n >\n {/* TODO: comentar */}\n <UploadedFileDetails\n fileSize={`${(file.size / 1024).toFixed(1)} KB`}\n fileDate={file.date}\n fileType={file.type}\n />\n </UploadedFile>\n </li>\n ))}\n </ul>\n )}\n </Dropzone>\n {error && (\n <p className={classNames?.error ?? dropzoneFilesError()}>{error}</p>\n )}\n </div>\n );\n};\n"],"mappings":"upBAkEA,MAAa,GAAiB,CAC5B,QACA,cACA,QACA,QACA,WACA,OACA,eACA,WACA,SACA,MACA,UACA,gBACwB,CACxB,IAAM,EAAc,GAAO,CACrB,EAAU,GAAW,EAI3B,OACE,EAAC,MAAA,CACC,UAAW,EACT,GAAY,eAAiB,GAAe,CAC5C,GAAY,MAAQ,GAAmB,CACxC,WAED,EAAC,MAAA,CAAI,UAAW,GAAY,cAAgB,GAA2B,WAEpE,GACC,EAAC,QAAA,CACC,QAAS,EACT,UAAW,GAAY,OAAS,GAAoB,UAEnD,GACK,CAET,GACC,EAAC,IAAA,CAAE,UAAW,GAAY,aAAe,GAA0B,UAChE,GACC,CAAA,EAEF,CACN,EAAC,EAAA,CACW,WACF,SACH,MACS,eACd,QAAS,EACF,QACG,WACJ,OACN,WAAY,CACV,SAAU,GAAY,UAAU,UAAY,GAAuB,CACpE,WAEC,CAAE,QAAO,gBACT,EAAC,KAAA,CAAG,UAAW,GAAY,UAAY,GAAuB,UAC3D,OAAO,OAAO,EAAM,CAAC,IAAK,GACzB,EAAC,KAAA,CAEC,UAAW,GAAY,UAAY,GAAuB,UAE1D,EAAC,EAAA,CAEC,SAAU,EAAK,KACf,SAAU,EAAK,KACf,IAAK,EAAK,IACV,aAAgB,EAAW,EAAK,KAAK,CACrC,WAAY,CACV,aACE,GAAY,cAAc,cAC1B,GAA2B,CAC9B,UAGD,EAAC,EAAA,CACC,SAAU,IAAI,EAAK,KAAO,MAAM,QAAQ,EAAE,CAAC,KAC3C,SAAU,EAAK,KACf,SAAU,EAAK,MACf,EAhBG,EAAK,KAiBG,EArBV,EAAK,KAsBP,CACL,EACC,EAEE,CACV,GACC,EAAC,IAAA,CAAE,UAAW,GAAY,OAAS,GAAoB,UAAG,GAAU,GAElE"}
1
+ {"version":3,"file":"DropzoneFiles.mjs","names":[],"sources":["../../../../src/components/controls/dropzone-files/DropzoneFiles.tsx"],"sourcesContent":["import { type ReactNode, useId } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n dropzoneFiles,\n dropzoneFilesDescription,\n dropzoneFilesDropzone,\n dropzoneFilesError,\n dropzoneFilesFileItem,\n dropzoneFilesFileList,\n dropzoneFilesLabel,\n dropzoneFilesLabelWrapper,\n dropzoneFilesRoot,\n dropzoneFilesUploadedFile,\n // dropzoneFilesUploadedFileStartIconWrapped,\n // dropzoneFilesUploadedFileStartIconWrappedRoot,\n // dropzoneFilesUploadedFileStartIcon,\n // dropzoneFilesUploadedFileStartIconRoot,\n // dropzoneFilesUploadedFileStartIconIconRaw,\n // dropzoneFilesUploadedFileStartIconIconRawRoot,\n} from '@mage-ui/styled-system/recipes';\nimport {\n Dropzone,\n type DropzoneProps,\n type FileData,\n} from '@/components/controls';\nimport {\n // Icon,\n // type IconProps,\n // IconWrapped,\n // type IconWrappedProps,\n UploadedFile,\n UploadedFileDetails,\n type UploadedFileProps,\n} from '@/components/data-display';\n\nexport type DropzoneFilesProps = {\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n title?: ReactNode;\n subtitle?: ReactNode;\n hint?: ReactNode;\n initialFiles?: Record<string, FileData>;\n maxFiles?: number;\n accept?: string[];\n url: string;\n inputId?: string;\n fileListHeight?: number | string;\n classNames?: {\n dropzoneFiles?: string;\n root?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n fileList?: string;\n fileItem?: string;\n uploadedFile?: UploadedFileProps['classNames'];\n dropzone?: DropzoneProps['classNames'];\n scrollArea?: { scrollArea?: string };\n // startIconWrapped?: IconWrappedProps['classNames'];\n // startIcon?: IconProps['classNames'];\n };\n};\n\nexport const DropzoneFiles = ({\n label,\n description,\n error,\n title,\n subtitle,\n hint,\n initialFiles,\n maxFiles,\n accept,\n url,\n inputId,\n classNames,\n}: DropzoneFilesProps) => {\n const generatedId = useId();\n const groupId = inputId ?? generatedId;\n\n // TODO: gestionar error\n // TOOD: gestionar required\n return (\n <div\n className={cx(\n classNames?.dropzoneFiles ?? dropzoneFiles(),\n classNames?.root ?? dropzoneFilesRoot(),\n )}\n >\n <div className={classNames?.labelWrapper ?? dropzoneFilesLabelWrapper()}>\n {/* TODO: label obligatori / hidden */}\n {label && (\n <label\n htmlFor={groupId}\n className={classNames?.label ?? dropzoneFilesLabel()}\n >\n {label}\n </label>\n )}\n {description && (\n <p className={classNames?.description ?? dropzoneFilesDescription()}>\n {description}\n </p>\n )}\n </div>\n <Dropzone\n maxFiles={maxFiles}\n accept={accept}\n url={url}\n initialFiles={initialFiles}\n inputId={groupId}\n title={title}\n subtitle={subtitle}\n hint={hint}\n classNames={{\n dropzone: classNames?.dropzone?.dropzone ?? dropzoneFilesDropzone(),\n }}\n >\n {({ files, removeFile }) => (\n <ul className={classNames?.fileList ?? dropzoneFilesFileList()}>\n {Object.values(files).map((file) => (\n <li\n key={file.name}\n className={classNames?.fileItem ?? dropzoneFilesFileItem()}\n >\n <UploadedFile\n key={file.name}\n fileName={file.name}\n fileType={file.type}\n url={file.url}\n onRemove={() => removeFile(file.name)}\n classNames={{\n uploadedFile:\n classNames?.uploadedFile?.uploadedFile ??\n dropzoneFilesUploadedFile(),\n }}\n >\n {/* TODO: comentar */}\n <UploadedFileDetails\n fileSize={`${(file.size / 1024).toFixed(1)} KB`}\n fileDate={file.date}\n fileType={file.type}\n />\n </UploadedFile>\n </li>\n ))}\n </ul>\n )}\n </Dropzone>\n {error && (\n <p className={classNames?.error ?? dropzoneFilesError()}>{error}</p>\n )}\n </div>\n );\n};\n"],"mappings":"upBAkEA,MAAa,GAAiB,CAC5B,QACA,cACA,QACA,QACA,WACA,OACA,eACA,WACA,SACA,MACA,UACA,gBACwB,CACxB,IAAM,EAAc,GAAO,CACrB,EAAU,GAAW,EAI3B,OACE,EAAC,MAAD,CACE,UAAW,EACT,GAAY,eAAiB,GAAe,CAC5C,GAAY,MAAQ,GAAmB,CACxC,UAJH,CAME,EAAC,MAAD,CAAK,UAAW,GAAY,cAAgB,GAA2B,UAAvE,CAEG,GACC,EAAC,QAAD,CACE,QAAS,EACT,UAAW,GAAY,OAAS,GAAoB,UAEnD,EACK,CAAA,CAET,GACC,EAAC,IAAD,CAAG,UAAW,GAAY,aAAe,GAA0B,UAChE,EACC,CAAA,CAEF,GACN,EAAC,EAAD,CACY,WACF,SACH,MACS,eACd,QAAS,EACF,QACG,WACJ,OACN,WAAY,CACV,SAAU,GAAY,UAAU,UAAY,GAAuB,CACpE,WAEC,CAAE,QAAO,gBACT,EAAC,KAAD,CAAI,UAAW,GAAY,UAAY,GAAuB,UAC3D,OAAO,OAAO,EAAM,CAAC,IAAK,GACzB,EAAC,KAAD,CAEE,UAAW,GAAY,UAAY,GAAuB,UAE1D,EAAC,EAAD,CAEE,SAAU,EAAK,KACf,SAAU,EAAK,KACf,IAAK,EAAK,IACV,aAAgB,EAAW,EAAK,KAAK,CACrC,WAAY,CACV,aACE,GAAY,cAAc,cAC1B,GAA2B,CAC9B,UAGD,EAAC,EAAD,CACE,SAAU,IAAI,EAAK,KAAO,MAAM,QAAQ,EAAE,CAAC,KAC3C,SAAU,EAAK,KACf,SAAU,EAAK,KACf,CAAA,CACW,CAjBR,EAAK,KAiBG,CACZ,CAtBE,EAAK,KAsBP,CACL,CACC,CAAA,CAEE,CAAA,CACV,GACC,EAAC,IAAD,CAAG,UAAW,GAAY,OAAS,GAAoB,UAAG,EAAU,CAAA,CAElE"}
@@ -1,5 +1,4 @@
1
1
  import { FileInputProps } from "@mantine/core";
2
- import "react/jsx-runtime";
3
2
  import { ReactNode } from "react";
4
3
 
5
4
  //#region src/components/controls/file-input/BaseFileInput.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"BaseFileInput.d.mts","names":[],"sources":["../../../../src/components/controls/file-input/BaseFileInput.tsx"],"mappings":";;;;;KAoBY,kBAAA,GAAqB,IAAA,CAC/B,cAAA;EAQA,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,WAAA,GAAc,SAAA;EACd,KAAA,GAAQ,SAAA;EACR,MAAA;EACA,QAAA;EACA,QAAA;EACA,QAAA;EACA,QAAA,IAAY,OAAA,EAAS,IAAA,GAAO,IAAA;EAC5B,cAAA,GAAiB,cAAA;EACjB,UAAA;IACE,SAAA;IACA,IAAA;IACA,KAAA;IACA,QAAA;IACA,WAAA;IACA,KAAA;IACA,OAAA;IACA,KAAA;IACA,OAAA;IACA,WAAA;IACA,SAAA;MACE,IAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"BaseFileInput.d.mts","names":[],"sources":["../../../../src/components/controls/file-input/BaseFileInput.tsx"],"mappings":";;;;KAoBY,kBAAA,GAAqB,IAAA,CAC/B,cAAA;EAQA,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,WAAA,GAAc,SAAA;EACd,KAAA,GAAQ,SAAA;EACR,MAAA;EACA,QAAA;EACA,QAAA;EACA,QAAA;EACA,QAAA,IAAY,OAAA,EAAS,IAAA,GAAO,IAAA;EAC5B,cAAA,GAAiB,cAAA;EACjB,UAAA;IACE,SAAA;IACA,IAAA;IACA,KAAA;IACA,QAAA;IACA,WAAA;IACA,KAAA;IACA,OAAA;IACA,KAAA;IACA,OAAA;IACA,WAAA;IACA,SAAA;MACE,IAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseFileInput.mjs","names":["MantineFileInput"],"sources":["../../../../src/components/controls/file-input/BaseFileInput.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n fileInput,\n fileInputDescription,\n fileInputError,\n fileInputInput,\n fileInputLabel,\n fileInputPlaceholder,\n fileInputRequired,\n fileInputRoot,\n fileInputSection,\n fileInputStartIcon,\n fileInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport type { FileInputProps as MantineFileInputProps } from '@mantine/core';\nimport { FileInput as MantineFileInput } from '@mantine/core';\nimport { Icon } from '@/components/data-display/icons/icon/Icon';\n\nexport type BaseFileInputProps = Omit<\n MantineFileInputProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'classNames'\n | 'valueComponent'\n | 'multiple'\n> & {\n label?: ReactNode;\n description?: ReactNode;\n placeholder?: ReactNode;\n error?: ReactNode;\n accept?: string;\n required?: boolean;\n disabled?: boolean;\n multiple: boolean;\n onChange?: (payload: File | File[] | null) => void;\n valueComponent?: MantineFileInputProps['valueComponent'];\n classNames?: {\n fileInput?: string;\n root?: string;\n label?: string;\n required?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n placeholder?: string;\n startIcon?: {\n icon?: string;\n };\n };\n};\n\nexport const BaseFileInput = ({\n name,\n onBlur,\n onFocus,\n onChange,\n label,\n description,\n placeholder,\n error,\n multiple,\n accept,\n required,\n disabled,\n valueComponent,\n classNames,\n}: BaseFileInputProps) => {\n return (\n <MantineFileInput\n name={name}\n onBlur={onBlur}\n onFocus={onFocus}\n onChange={(payload) => {\n onChange?.(payload);\n }}\n disabled={disabled}\n required={required}\n multiple={multiple}\n accept={accept}\n clearable={true}\n label={label}\n description={description}\n placeholder={placeholder}\n error={error}\n valueComponent={valueComponent}\n leftSection={\n <Icon\n name='mage-dropzone-upload-01'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.startIcon?.icon ?? fileInputStartIcon(),\n }}\n />\n }\n classNames={{\n root: cx(\n classNames?.fileInput ?? fileInput(),\n classNames?.root ?? fileInputRoot(),\n 'group',\n ),\n label: classNames?.label ?? fileInputLabel(),\n required: classNames?.required ?? fileInputRequired(),\n description: classNames?.description ?? fileInputDescription(),\n error: classNames?.error ?? fileInputError(),\n wrapper: classNames?.wrapper ?? fileInputWrapper(),\n input: cx(classNames?.input ?? fileInputInput(), 'peer'),\n section: cx(classNames?.section ?? fileInputSection(), 'group'),\n placeholder: classNames?.placeholder ?? fileInputPlaceholder(),\n }}\n />\n );\n};\n"],"mappings":"ydAwDA,MAAa,GAAiB,CAC5B,OACA,SACA,UACA,WACA,QACA,cACA,cACA,QACA,WACA,SACA,WACA,WACA,iBACA,gBAGE,EAACA,EAAAA,CACO,OACE,SACC,UACT,SAAW,GAAY,CACrB,IAAW,EAAQ,EAEX,WACA,WACA,WACF,SACR,UAAW,GACJ,QACM,cACA,cACN,QACS,iBAChB,YACE,EAAC,EAAA,CACC,KAAK,0BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,WAAW,MAAQ,GAAoB,CAC1D,EACD,CAEJ,WAAY,CACV,KAAM,EACJ,GAAY,WAAa,GAAW,CACpC,GAAY,MAAQ,GAAe,CACnC,QACD,CACD,MAAO,GAAY,OAAS,GAAgB,CAC5C,SAAU,GAAY,UAAY,GAAmB,CACrD,YAAa,GAAY,aAAe,GAAsB,CAC9D,MAAO,GAAY,OAAS,GAAgB,CAC5C,QAAS,GAAY,SAAW,GAAkB,CAClD,MAAO,EAAG,GAAY,OAAS,GAAgB,CAAE,OAAO,CACxD,QAAS,EAAG,GAAY,SAAW,GAAkB,CAAE,QAAQ,CAC/D,YAAa,GAAY,aAAe,GAAsB,CAC/D,EACD"}
1
+ {"version":3,"file":"BaseFileInput.mjs","names":["MantineFileInput"],"sources":["../../../../src/components/controls/file-input/BaseFileInput.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n fileInput,\n fileInputDescription,\n fileInputError,\n fileInputInput,\n fileInputLabel,\n fileInputPlaceholder,\n fileInputRequired,\n fileInputRoot,\n fileInputSection,\n fileInputStartIcon,\n fileInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport type { FileInputProps as MantineFileInputProps } from '@mantine/core';\nimport { FileInput as MantineFileInput } from '@mantine/core';\nimport { Icon } from '@/components/data-display/icons/icon/Icon';\n\nexport type BaseFileInputProps = Omit<\n MantineFileInputProps,\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'classNames'\n | 'valueComponent'\n | 'multiple'\n> & {\n label?: ReactNode;\n description?: ReactNode;\n placeholder?: ReactNode;\n error?: ReactNode;\n accept?: string;\n required?: boolean;\n disabled?: boolean;\n multiple: boolean;\n onChange?: (payload: File | File[] | null) => void;\n valueComponent?: MantineFileInputProps['valueComponent'];\n classNames?: {\n fileInput?: string;\n root?: string;\n label?: string;\n required?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n placeholder?: string;\n startIcon?: {\n icon?: string;\n };\n };\n};\n\nexport const BaseFileInput = ({\n name,\n onBlur,\n onFocus,\n onChange,\n label,\n description,\n placeholder,\n error,\n multiple,\n accept,\n required,\n disabled,\n valueComponent,\n classNames,\n}: BaseFileInputProps) => {\n return (\n <MantineFileInput\n name={name}\n onBlur={onBlur}\n onFocus={onFocus}\n onChange={(payload) => {\n onChange?.(payload);\n }}\n disabled={disabled}\n required={required}\n multiple={multiple}\n accept={accept}\n clearable={true}\n label={label}\n description={description}\n placeholder={placeholder}\n error={error}\n valueComponent={valueComponent}\n leftSection={\n <Icon\n name='mage-dropzone-upload-01'\n path='/icons/sprite-mage.svg'\n classNames={{\n icon: classNames?.startIcon?.icon ?? fileInputStartIcon(),\n }}\n />\n }\n classNames={{\n root: cx(\n classNames?.fileInput ?? fileInput(),\n classNames?.root ?? fileInputRoot(),\n 'group',\n ),\n label: classNames?.label ?? fileInputLabel(),\n required: classNames?.required ?? fileInputRequired(),\n description: classNames?.description ?? fileInputDescription(),\n error: classNames?.error ?? fileInputError(),\n wrapper: classNames?.wrapper ?? fileInputWrapper(),\n input: cx(classNames?.input ?? fileInputInput(), 'peer'),\n section: cx(classNames?.section ?? fileInputSection(), 'group'),\n placeholder: classNames?.placeholder ?? fileInputPlaceholder(),\n }}\n />\n );\n};\n"],"mappings":"ydAwDA,MAAa,GAAiB,CAC5B,OACA,SACA,UACA,WACA,QACA,cACA,cACA,QACA,WACA,SACA,WACA,WACA,iBACA,gBAGE,EAACA,EAAD,CACQ,OACE,SACC,UACT,SAAW,GAAY,CACrB,IAAW,EAAQ,EAEX,WACA,WACA,WACF,SACR,UAAW,GACJ,QACM,cACA,cACN,QACS,iBAChB,YACE,EAAC,EAAD,CACE,KAAK,0BACL,KAAK,yBACL,WAAY,CACV,KAAM,GAAY,WAAW,MAAQ,GAAoB,CAC1D,CACD,CAAA,CAEJ,WAAY,CACV,KAAM,EACJ,GAAY,WAAa,GAAW,CACpC,GAAY,MAAQ,GAAe,CACnC,QACD,CACD,MAAO,GAAY,OAAS,GAAgB,CAC5C,SAAU,GAAY,UAAY,GAAmB,CACrD,YAAa,GAAY,aAAe,GAAsB,CAC9D,MAAO,GAAY,OAAS,GAAgB,CAC5C,QAAS,GAAY,SAAW,GAAkB,CAClD,MAAO,EAAG,GAAY,OAAS,GAAgB,CAAE,OAAO,CACxD,QAAS,EAAG,GAAY,SAAW,GAAkB,CAAE,QAAQ,CAC/D,YAAa,GAAY,aAAe,GAAsB,CAC/D,CACD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.mjs","names":[],"sources":["../../../../src/components/controls/file-input/FileInput.tsx"],"sourcesContent":["import { BaseFileInput, type BaseFileInputProps } from './BaseFileInput';\n\nexport type FileInputProps = Omit<\n BaseFileInputProps,\n 'multiple' | 'valueComponent' | 'onChange'\n> & {\n onChange?: (file: File | null) => void;\n};\n\nexport const FileInput = ({\n name,\n onBlur,\n onFocus,\n onChange,\n label,\n description,\n placeholder,\n error,\n accept,\n required,\n disabled,\n classNames,\n}: FileInputProps) => {\n return (\n <BaseFileInput\n name={name}\n onBlur={onBlur}\n onFocus={onFocus}\n label={label}\n description={description}\n placeholder={placeholder}\n error={error}\n accept={accept}\n required={required}\n disabled={disabled}\n classNames={classNames}\n multiple={false}\n onChange={(payload) => {\n onChange?.(payload as File | null);\n }}\n />\n );\n};\n"],"mappings":"4FASA,MAAa,GAAa,CACxB,OACA,SACA,UACA,WACA,QACA,cACA,cACA,QACA,SACA,WACA,WACA,gBAGE,EAAC,EAAA,CACO,OACE,SACC,UACF,QACM,cACA,cACN,QACC,SACE,WACA,WACE,aACZ,SAAU,GACV,SAAW,GAAY,CACrB,IAAW,EAAuB,GAEpC"}
1
+ {"version":3,"file":"FileInput.mjs","names":[],"sources":["../../../../src/components/controls/file-input/FileInput.tsx"],"sourcesContent":["import { BaseFileInput, type BaseFileInputProps } from './BaseFileInput';\n\nexport type FileInputProps = Omit<\n BaseFileInputProps,\n 'multiple' | 'valueComponent' | 'onChange'\n> & {\n onChange?: (file: File | null) => void;\n};\n\nexport const FileInput = ({\n name,\n onBlur,\n onFocus,\n onChange,\n label,\n description,\n placeholder,\n error,\n accept,\n required,\n disabled,\n classNames,\n}: FileInputProps) => {\n return (\n <BaseFileInput\n name={name}\n onBlur={onBlur}\n onFocus={onFocus}\n label={label}\n description={description}\n placeholder={placeholder}\n error={error}\n accept={accept}\n required={required}\n disabled={disabled}\n classNames={classNames}\n multiple={false}\n onChange={(payload) => {\n onChange?.(payload as File | null);\n }}\n />\n );\n};\n"],"mappings":"4FASA,MAAa,GAAa,CACxB,OACA,SACA,UACA,WACA,QACA,cACA,cACA,QACA,SACA,WACA,WACA,gBAGE,EAAC,EAAD,CACQ,OACE,SACC,UACF,QACM,cACA,cACN,QACC,SACE,WACA,WACE,aACZ,SAAU,GACV,SAAW,GAAY,CACrB,IAAW,EAAuB,EAEpC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileInputMultiple.mjs","names":[],"sources":["../../../../src/components/controls/file-input/FileInputMultiple.tsx"],"sourcesContent":["import { fileInputBadge } from '@mage-ui/styled-system/recipes';\nimport type { FileInputProps as MantineFileInputProps } from '@mantine/core';\nimport { Badge } from '@/components/data-display/badge/Badge';\n\nimport { BaseFileInput, type BaseFileInputProps } from './BaseFileInput';\n\nexport type FileInputMultipleProps = Omit<\n BaseFileInputProps,\n 'multiple' | 'onChange' | 'valueComponent'\n> & {\n onChange?: (files: File[] | null) => void;\n badgeClassNames?: {\n badge?: string;\n root?: string;\n section?: string;\n label?: string;\n };\n};\n\nconst createValueComponent = ({\n badgeClassNames,\n}: {\n badgeClassNames?: {\n badge?: string;\n };\n}): MantineFileInputProps['valueComponent'] => {\n return ({ value }) => {\n if (!value) return null;\n\n const files = Array.isArray(value) ? value : [value];\n\n return (\n <>\n {files.map((file) => (\n <Badge\n key={`${file.name}-${file.lastModified}`}\n classNames={{\n badge: badgeClassNames?.badge ?? fileInputBadge(),\n }}\n >\n {file.name}\n </Badge>\n ))}\n </>\n );\n };\n};\n\nexport const FileInputMultiple = ({\n name,\n onBlur,\n onFocus,\n onChange,\n label,\n description,\n placeholder,\n error,\n accept,\n required,\n disabled,\n classNames,\n badgeClassNames,\n}: FileInputMultipleProps) => {\n return (\n <BaseFileInput\n name={name}\n onBlur={onBlur}\n onFocus={onFocus}\n label={label}\n description={description}\n placeholder={placeholder}\n error={error}\n accept={accept}\n required={required}\n disabled={disabled}\n classNames={classNames}\n multiple={true}\n valueComponent={createValueComponent({\n badgeClassNames,\n })}\n onChange={(payload) => {\n onChange?.(payload as File[] | null);\n }}\n />\n );\n};\n"],"mappings":"qOAmBA,MAAM,GAAwB,CAC5B,sBAMQ,CAAE,WACH,EAKH,EAAA,EAAA,CAAA,UAHY,MAAM,QAAQ,EAAM,CAAG,EAAQ,CAAC,EAAM,EAIzC,IAAK,GACV,EAAC,EAAA,CAEC,WAAY,CACV,MAAO,GAAiB,OAAS,GAAgB,CAClD,UAEA,EAAK,MALD,GAAG,EAAK,KAAK,GAAG,EAAK,eAMpB,CACR,CAAA,CACD,CAhBc,KAqBV,GAAqB,CAChC,OACA,SACA,UACA,WACA,QACA,cACA,cACA,QACA,SACA,WACA,WACA,aACA,qBAGE,EAAC,EAAA,CACO,OACE,SACC,UACF,QACM,cACA,cACN,QACC,SACE,WACA,WACE,aACZ,SAAU,GACV,eAAgB,EAAqB,CACnC,kBACD,CAAC,CACF,SAAW,GAAY,CACrB,IAAW,EAAyB,GAEtC"}
1
+ {"version":3,"file":"FileInputMultiple.mjs","names":[],"sources":["../../../../src/components/controls/file-input/FileInputMultiple.tsx"],"sourcesContent":["import { fileInputBadge } from '@mage-ui/styled-system/recipes';\nimport type { FileInputProps as MantineFileInputProps } from '@mantine/core';\nimport { Badge } from '@/components/data-display/badge/Badge';\n\nimport { BaseFileInput, type BaseFileInputProps } from './BaseFileInput';\n\nexport type FileInputMultipleProps = Omit<\n BaseFileInputProps,\n 'multiple' | 'onChange' | 'valueComponent'\n> & {\n onChange?: (files: File[] | null) => void;\n badgeClassNames?: {\n badge?: string;\n root?: string;\n section?: string;\n label?: string;\n };\n};\n\nconst createValueComponent = ({\n badgeClassNames,\n}: {\n badgeClassNames?: {\n badge?: string;\n };\n}): MantineFileInputProps['valueComponent'] => {\n return ({ value }) => {\n if (!value) return null;\n\n const files = Array.isArray(value) ? value : [value];\n\n return (\n <>\n {files.map((file) => (\n <Badge\n key={`${file.name}-${file.lastModified}`}\n classNames={{\n badge: badgeClassNames?.badge ?? fileInputBadge(),\n }}\n >\n {file.name}\n </Badge>\n ))}\n </>\n );\n };\n};\n\nexport const FileInputMultiple = ({\n name,\n onBlur,\n onFocus,\n onChange,\n label,\n description,\n placeholder,\n error,\n accept,\n required,\n disabled,\n classNames,\n badgeClassNames,\n}: FileInputMultipleProps) => {\n return (\n <BaseFileInput\n name={name}\n onBlur={onBlur}\n onFocus={onFocus}\n label={label}\n description={description}\n placeholder={placeholder}\n error={error}\n accept={accept}\n required={required}\n disabled={disabled}\n classNames={classNames}\n multiple={true}\n valueComponent={createValueComponent({\n badgeClassNames,\n })}\n onChange={(payload) => {\n onChange?.(payload as File[] | null);\n }}\n />\n );\n};\n"],"mappings":"qOAmBA,MAAM,GAAwB,CAC5B,sBAMQ,CAAE,WACH,EAKH,EAAA,EAAA,CAAA,UAHY,MAAM,QAAQ,EAAM,CAAG,EAAQ,CAAC,EAAM,EAIzC,IAAK,GACV,EAAC,EAAD,CAEE,WAAY,CACV,MAAO,GAAiB,OAAS,GAAgB,CAClD,UAEA,EAAK,KACA,CAND,GAAG,EAAK,KAAK,GAAG,EAAK,eAMpB,CACR,CACD,CAAA,CAhBc,KAqBV,GAAqB,CAChC,OACA,SACA,UACA,WACA,QACA,cACA,cACA,QACA,SACA,WACA,WACA,aACA,qBAGE,EAAC,EAAD,CACQ,OACE,SACC,UACF,QACM,cACA,cACN,QACC,SACE,WACA,WACE,aACZ,SAAU,GACV,eAAgB,EAAqB,CACnC,kBACD,CAAC,CACF,SAAW,GAAY,CACrB,IAAW,EAAyB,EAEtC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInput.mjs","names":[],"sources":["../../../../src/components/controls/password-input/PasswordInput.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n passwordInput,\n passwordInputButtonIcon,\n passwordInputButtonIconIcon,\n passwordInputButtonIconIconRaw,\n passwordInputButtonIconIconRawRoot,\n passwordInputButtonIconRoot,\n passwordInputDescription,\n passwordInputError,\n passwordInputInput,\n passwordInputLabel,\n passwordInputRequired,\n passwordInputRoot,\n passwordInputSection,\n passwordInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { ButtonIcon } from '@/components/buttons';\n\nimport { TextInput, type TextInputProps } from '../text-input/TextInput';\n\nexport type PasswordInputProps = Omit<\n NonNullable<TextInputProps>,\n 'classNames'\n> & {\n hideText?: string;\n showText?: string;\n classNames?: Omit<NonNullable<TextInputProps['classNames']>, 'textInput'> & {\n passwordInput?: string;\n buttonIcon?: {\n buttonIcon?: string;\n root?: string;\n icon?: string;\n iconRaw?: {\n iconRaw?: string;\n root?: string;\n };\n };\n };\n};\n\nexport const PasswordInput = ({\n classNames,\n hideText = 'Hide password',\n showText = 'Show password',\n ...props\n}: PasswordInputProps) => {\n const [visible, setVisible] = useState(false);\n\n const ButtonVisibility = () => {\n return (\n <ButtonIcon\n name={\n visible ? 'mage-password-input-eye-off' : 'mage-password-input-eye'\n }\n path='/icons/sprite-mage.svg'\n label={visible ? hideText : showText}\n onClick={() => setVisible(!visible)}\n classNames={{\n buttonIcon:\n classNames?.buttonIcon?.buttonIcon ?? passwordInputButtonIcon(),\n root: classNames?.buttonIcon?.root ?? passwordInputButtonIconRoot(),\n icon: classNames?.buttonIcon?.icon ?? passwordInputButtonIconIcon(),\n iconRaw: {\n iconRaw:\n classNames?.buttonIcon?.iconRaw?.iconRaw ??\n passwordInputButtonIconIconRaw(),\n root:\n classNames?.buttonIcon?.iconRaw?.root ??\n passwordInputButtonIconIconRawRoot(),\n },\n }}\n />\n );\n };\n\n return (\n <TextInput\n type={visible ? 'text' : 'password'}\n endSlot={<ButtonVisibility />}\n classNames={{\n root: cx(\n classNames?.passwordInput ?? passwordInput(),\n classNames?.root ?? passwordInputRoot(),\n ),\n label: classNames?.label ?? passwordInputLabel(),\n required: classNames?.required ?? passwordInputRequired(),\n description: classNames?.description ?? passwordInputDescription(),\n error: classNames?.error ?? passwordInputError(),\n wrapper: classNames?.wrapper ?? passwordInputWrapper(),\n input: classNames?.input ?? passwordInputInput(),\n section: classNames?.section ?? passwordInputSection(),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"6qBA2CA,MAAa,GAAiB,CAC5B,aACA,WAAW,gBACX,WAAW,gBACX,GAAG,KACqB,CACxB,GAAM,CAAC,EAAS,GAAc,EAAS,GAAM,CA6B7C,OACE,EAAC,EAAA,CACC,KAAM,EAAU,OAAS,WACzB,QAAS,MA5BT,EAAC,EAAA,CACC,KACE,EAAU,8BAAgC,0BAE5C,KAAK,yBACL,MAAO,EAAU,EAAW,EAC5B,YAAe,EAAW,CAAC,EAAQ,CACnC,WAAY,CACV,WACE,GAAY,YAAY,YAAc,GAAyB,CACjE,KAAM,GAAY,YAAY,MAAQ,GAA6B,CACnE,KAAM,GAAY,YAAY,MAAQ,GAA6B,CACnE,QAAS,CACP,QACE,GAAY,YAAY,SAAS,SACjC,GAAgC,CAClC,KACE,GAAY,YAAY,SAAS,MACjC,GAAoC,CACvC,CACF,EACD,CAOQ,EAAA,CAAmB,CAC7B,WAAY,CACV,KAAM,EACJ,GAAY,eAAiB,GAAe,CAC5C,GAAY,MAAQ,GAAmB,CACxC,CACD,MAAO,GAAY,OAAS,GAAoB,CAChD,SAAU,GAAY,UAAY,GAAuB,CACzD,YAAa,GAAY,aAAe,GAA0B,CAClE,MAAO,GAAY,OAAS,GAAoB,CAChD,QAAS,GAAY,SAAW,GAAsB,CACtD,MAAO,GAAY,OAAS,GAAoB,CAChD,QAAS,GAAY,SAAW,GAAsB,CACvD,CACD,GAAI,GACJ"}
1
+ {"version":3,"file":"PasswordInput.mjs","names":[],"sources":["../../../../src/components/controls/password-input/PasswordInput.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n passwordInput,\n passwordInputButtonIcon,\n passwordInputButtonIconIcon,\n passwordInputButtonIconIconRaw,\n passwordInputButtonIconIconRawRoot,\n passwordInputButtonIconRoot,\n passwordInputDescription,\n passwordInputError,\n passwordInputInput,\n passwordInputLabel,\n passwordInputRequired,\n passwordInputRoot,\n passwordInputSection,\n passwordInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { ButtonIcon } from '@/components/buttons';\n\nimport { TextInput, type TextInputProps } from '../text-input/TextInput';\n\nexport type PasswordInputProps = Omit<\n NonNullable<TextInputProps>,\n 'classNames'\n> & {\n hideText?: string;\n showText?: string;\n classNames?: Omit<NonNullable<TextInputProps['classNames']>, 'textInput'> & {\n passwordInput?: string;\n buttonIcon?: {\n buttonIcon?: string;\n root?: string;\n icon?: string;\n iconRaw?: {\n iconRaw?: string;\n root?: string;\n };\n };\n };\n};\n\nexport const PasswordInput = ({\n classNames,\n hideText = 'Hide password',\n showText = 'Show password',\n ...props\n}: PasswordInputProps) => {\n const [visible, setVisible] = useState(false);\n\n const ButtonVisibility = () => {\n return (\n <ButtonIcon\n name={\n visible ? 'mage-password-input-eye-off' : 'mage-password-input-eye'\n }\n path='/icons/sprite-mage.svg'\n label={visible ? hideText : showText}\n onClick={() => setVisible(!visible)}\n classNames={{\n buttonIcon:\n classNames?.buttonIcon?.buttonIcon ?? passwordInputButtonIcon(),\n root: classNames?.buttonIcon?.root ?? passwordInputButtonIconRoot(),\n icon: classNames?.buttonIcon?.icon ?? passwordInputButtonIconIcon(),\n iconRaw: {\n iconRaw:\n classNames?.buttonIcon?.iconRaw?.iconRaw ??\n passwordInputButtonIconIconRaw(),\n root:\n classNames?.buttonIcon?.iconRaw?.root ??\n passwordInputButtonIconIconRawRoot(),\n },\n }}\n />\n );\n };\n\n return (\n <TextInput\n type={visible ? 'text' : 'password'}\n endSlot={<ButtonVisibility />}\n classNames={{\n root: cx(\n classNames?.passwordInput ?? passwordInput(),\n classNames?.root ?? passwordInputRoot(),\n ),\n label: classNames?.label ?? passwordInputLabel(),\n required: classNames?.required ?? passwordInputRequired(),\n description: classNames?.description ?? passwordInputDescription(),\n error: classNames?.error ?? passwordInputError(),\n wrapper: classNames?.wrapper ?? passwordInputWrapper(),\n input: classNames?.input ?? passwordInputInput(),\n section: classNames?.section ?? passwordInputSection(),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"6qBA2CA,MAAa,GAAiB,CAC5B,aACA,WAAW,gBACX,WAAW,gBACX,GAAG,KACqB,CACxB,GAAM,CAAC,EAAS,GAAc,EAAS,GAAM,CA6B7C,OACE,EAAC,EAAD,CACE,KAAM,EAAU,OAAS,WACzB,QAAS,MA5BT,EAAC,EAAD,CACE,KACE,EAAU,8BAAgC,0BAE5C,KAAK,yBACL,MAAO,EAAU,EAAW,EAC5B,YAAe,EAAW,CAAC,EAAQ,CACnC,WAAY,CACV,WACE,GAAY,YAAY,YAAc,GAAyB,CACjE,KAAM,GAAY,YAAY,MAAQ,GAA6B,CACnE,KAAM,GAAY,YAAY,MAAQ,GAA6B,CACnE,QAAS,CACP,QACE,GAAY,YAAY,SAAS,SACjC,GAAgC,CAClC,KACE,GAAY,YAAY,SAAS,MACjC,GAAoC,CACvC,CACF,CACD,CAAA,CAOO,EAAoB,CAAA,CAC7B,WAAY,CACV,KAAM,EACJ,GAAY,eAAiB,GAAe,CAC5C,GAAY,MAAQ,GAAmB,CACxC,CACD,MAAO,GAAY,OAAS,GAAoB,CAChD,SAAU,GAAY,UAAY,GAAuB,CACzD,YAAa,GAAY,aAAe,GAA0B,CAClE,MAAO,GAAY,OAAS,GAAoB,CAChD,QAAS,GAAY,SAAW,GAAsB,CACtD,MAAO,GAAY,OAAS,GAAoB,CAChD,QAAS,GAAY,SAAW,GAAsB,CACvD,CACD,GAAI,EACJ,CAAA"}
@@ -1,5 +1,4 @@
1
1
  import { IconProps } from "../../data-display/icons/icon/Icon.mjs";
2
- import "../../data-display/index.mjs";
3
2
  import { PasswordInputProps } from "./PasswordInput.mjs";
4
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordStrengthInput.d.mts","names":[],"sources":["../../../../src/components/controls/password-input/PasswordStrengthInput.tsx"],"mappings":";;;;;;KAmCY,YAAA;EACV,IAAA;EACA,OAAA;AAAA;AAAA,KAGU,eAAA;EACV,QAAA;EACA,KAAA;AAAA;AAAA,KAGU,0BAAA,GAA6B,kBAAA;EACvC,QAAA,GAAW,eAAA;EACX,KAAA,GAAQ,YAAA;EACR,SAAA;EACA,iBAAA;EACA,UAAA;IACE,qBAAA;IACA,IAAA;IACA,eAAA;IACA,UAAA;IACA,GAAA;IACA,OAAA;IACA,aAAA;IACA,KAAA;IACA,IAAA;IACA,QAAA,GAAW,SAAA;IACX,QAAA;IACA,aAAA,GAAgB,kBAAA;EAAA;AAAA;AAAA,cAIP,qBAAA;EAAyB,QAAA;EAAA,KAAA;EAAA,SAAA;EAAA,iBAAA;EAAA,UAAA;EAAA,GAAA;AAAA,GAOnC,0BAAA,KAA0B,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"PasswordStrengthInput.d.mts","names":[],"sources":["../../../../src/components/controls/password-input/PasswordStrengthInput.tsx"],"mappings":";;;;;KAmCY,YAAA;EACV,IAAA;EACA,OAAA;AAAA;AAAA,KAGU,eAAA;EACV,QAAA;EACA,KAAA;AAAA;AAAA,KAGU,0BAAA,GAA6B,kBAAA;EACvC,QAAA,GAAW,eAAA;EACX,KAAA,GAAQ,YAAA;EACR,SAAA;EACA,iBAAA;EACA,UAAA;IACE,qBAAA;IACA,IAAA;IACA,eAAA;IACA,UAAA;IACA,GAAA;IACA,OAAA;IACA,aAAA;IACA,KAAA;IACA,IAAA;IACA,QAAA,GAAW,SAAA;IACX,QAAA;IACA,aAAA,GAAgB,kBAAA;EAAA;AAAA;AAAA,cAIP,qBAAA;EAAyB,QAAA;EAAA,KAAA;EAAA,SAAA;EAAA,iBAAA;EAAA,UAAA;EAAA,GAAA;AAAA,GAOnC,0BAAA,KAA0B,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordStrengthInput.mjs","names":[],"sources":["../../../../src/components/controls/password-input/PasswordStrengthInput.tsx"],"sourcesContent":["import { cx } from '@mage-ui/styled-system/css';\nimport {\n passwordStrengthInput,\n passwordStrengthInputBar,\n passwordStrengthInputBarWrapper,\n passwordStrengthInputInput,\n passwordStrengthInputInputButtonIcon,\n passwordStrengthInputInputButtonIconIcon,\n passwordStrengthInputInputButtonIconIconRaw,\n passwordStrengthInputInputButtonIconIconRawRoot,\n passwordStrengthInputInputButtonIconRoot,\n passwordStrengthInputInputDescription,\n passwordStrengthInputInputError,\n passwordStrengthInputInputInput,\n passwordStrengthInputInputLabel,\n passwordStrengthInputInputRequired,\n passwordStrengthInputInputRoot,\n passwordStrengthInputInputSection,\n passwordStrengthInputInputWrapper,\n passwordStrengthInputRoot,\n passwordStrengthInputRule,\n passwordStrengthInputRuleIcon,\n passwordStrengthInputRuleIconIconRaw,\n passwordStrengthInputRuleIconIconRawRoot,\n passwordStrengthInputRuleIconRoot,\n passwordStrengthInputRules,\n passwordStrengthInputRuleText,\n passwordStrengthInputSegment,\n passwordStrengthInputStrengthLabel,\n passwordStrengthInputStrengthWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Icon, type IconProps } from '@/components/data-display';\n\nimport { PasswordInput, type PasswordInputProps } from './PasswordInput';\n\nexport type PasswordRule = {\n text: string;\n isValid: boolean;\n};\n\nexport type PasswordSegment = {\n minScore: number;\n label: string;\n};\n\nexport type PasswordStrengthInputProps = PasswordInputProps & {\n segments?: PasswordSegment[];\n rules?: PasswordRule[];\n showRules?: boolean;\n showStrengthLabel?: boolean;\n classNames?: {\n passwordStrengthInput?: string;\n root?: string;\n strengthWrapper?: string;\n barWrapper?: string;\n bar?: string;\n segment?: string;\n strengthLabel?: string;\n rules?: string;\n rule?: string;\n ruleIcon?: IconProps['classNames'];\n ruleText?: string;\n passwordInput?: PasswordInputProps['classNames'];\n };\n};\n\nexport const PasswordStrengthInput = ({\n segments = [],\n rules = [],\n showRules = true,\n showStrengthLabel = true,\n classNames,\n ...props\n}: PasswordStrengthInputProps) => {\n const sortedSegments = [...segments].sort((a, b) => a.minScore - b.minScore);\n const segmentCount = sortedSegments.length;\n\n const validCount = rules.filter((rule) => rule.isValid).length;\n const scorePercent = rules.length > 0 ? (validCount / rules.length) * 100 : 0;\n\n const hasRulesDisplay = showRules && rules.length > 0;\n\n const hasValue = props.value && String(props.value).length > 0;\n\n const currentSegment = [...sortedSegments]\n .reverse()\n .find((segment) => scorePercent >= segment.minScore);\n const currentLabel = hasValue ? (currentSegment?.label ?? '') : '';\n\n const getSegmentColor = (index: number) => {\n if (!hasValue) {\n return 'var(--password-strength-input-segment-background)';\n }\n\n const segment = sortedSegments[index];\n\n if (scorePercent >= segment.minScore) {\n const ratio = segmentCount > 1 ? index / (segmentCount - 1) : 1;\n\n return `hsl(\n calc(\n var(--password-strength-input-segment-hue-start) +\n ${ratio} *\n (var(--password-strength-input-segment-hue-end) -\n var(--password-strength-input-segment-hue-start))\n ),\n var(--password-strength-input-segment-saturation),\n var(--password-strength-input-segment-lightness)\n )`;\n }\n\n return 'var(--password-strength-input-segment-background)';\n };\n\n // const getSegmentColor = (index: number) => {\n // if (!hasValue) {\n // return 'var(--password-strength-input-segment-background)';\n // }\n\n // const segment = sortedSegments[index];\n\n // if (scorePercent >= segment.minScore) {\n // const ratio =\n // segmentCount > 1 ? index / (segmentCount - 1) : 1;\n\n // const percentage = Math.round(ratio * 100);\n\n // return `color-mix(\n // in oklch,\n // var(--password-strength-input-segment-color-start) ${100 - percentage}%,\n // var(--password-strength-input-segment-color-end) ${percentage}%\n // )`;\n // }\n\n // return 'var(--password-strength-input-segment-background)';\n // };\n\n return (\n <div\n className={cx(\n classNames?.passwordStrengthInput ?? passwordStrengthInput(),\n classNames?.root ?? passwordStrengthInputRoot(),\n )}\n data-scope='passwordStrengthInput'\n data-rules={hasRulesDisplay}\n >\n <PasswordInput\n classNames={{\n passwordInput:\n classNames?.passwordInput ?? passwordStrengthInputInput(),\n root:\n classNames?.passwordInput?.root ?? passwordStrengthInputInputRoot(),\n label:\n classNames?.passwordInput?.label ??\n passwordStrengthInputInputLabel(),\n description:\n classNames?.passwordInput?.description ??\n passwordStrengthInputInputDescription(),\n error:\n classNames?.passwordInput?.error ??\n passwordStrengthInputInputError(),\n wrapper:\n classNames?.passwordInput?.wrapper ??\n passwordStrengthInputInputWrapper(),\n required:\n classNames?.passwordInput?.required ??\n passwordStrengthInputInputRequired(),\n input:\n classNames?.passwordInput?.input ??\n passwordStrengthInputInputInput(),\n section:\n classNames?.passwordInput?.section ??\n passwordStrengthInputInputSection(),\n buttonIcon: {\n buttonIcon:\n classNames?.passwordInput?.buttonIcon?.buttonIcon ??\n passwordStrengthInputInputButtonIcon(),\n root:\n classNames?.passwordInput?.buttonIcon?.root ??\n passwordStrengthInputInputButtonIconRoot(),\n icon:\n classNames?.passwordInput?.buttonIcon?.icon ??\n passwordStrengthInputInputButtonIconIcon(),\n iconRaw: {\n iconRaw:\n classNames?.passwordInput?.buttonIcon?.iconRaw?.iconRaw ??\n passwordStrengthInputInputButtonIconIconRaw(),\n root:\n classNames?.passwordInput?.buttonIcon?.iconRaw?.root ??\n passwordStrengthInputInputButtonIconIconRawRoot(),\n },\n },\n }}\n {...props}\n />\n <div\n className={cx(\n classNames?.strengthWrapper ?? passwordStrengthInputStrengthWrapper(),\n )}\n >\n <div\n className={cx(\n classNames?.barWrapper ?? passwordStrengthInputBarWrapper(),\n )}\n >\n <div className={cx(classNames?.bar ?? passwordStrengthInputBar())}>\n {sortedSegments.map((_, index) => (\n <div\n key={index}\n style={{\n backgroundColor: getSegmentColor(index),\n }}\n className={cx(\n classNames?.segment ?? passwordStrengthInputSegment(),\n )}\n />\n ))}\n </div>\n {showStrengthLabel && currentLabel && (\n <span\n className={cx(\n classNames?.strengthLabel ??\n passwordStrengthInputStrengthLabel(),\n )}\n >\n {currentLabel}\n </span>\n )}\n </div>\n {hasRulesDisplay && (\n <ul className={cx(classNames?.rules ?? passwordStrengthInputRules())}>\n {rules.map((rule, index) => (\n <li\n key={index}\n className={cx(classNames?.rule ?? passwordStrengthInputRule())}\n data-valid={rule.isValid || undefined}\n >\n <Icon\n path='/icons/sprite-mage.svg'\n name={\n rule.isValid\n ? 'mage-password-input-strength-rule-check'\n : 'mage-password-input-strength-rule-x'\n }\n classNames={{\n icon:\n classNames?.ruleIcon?.icon ??\n passwordStrengthInputRuleIcon(),\n root:\n classNames?.ruleIcon?.root ??\n passwordStrengthInputRuleIconRoot(),\n iconRaw: {\n iconRaw:\n classNames?.ruleIcon?.iconRaw?.iconRaw ??\n passwordStrengthInputRuleIconIconRaw(),\n root:\n classNames?.ruleIcon?.iconRaw?.root ??\n passwordStrengthInputRuleIconIconRawRoot(),\n },\n }}\n />\n <span\n className={cx(\n classNames?.ruleText ?? passwordStrengthInputRuleText(),\n )}\n >\n {rule.text}\n </span>\n </li>\n ))}\n </ul>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":"qzCAkEA,MAAa,GAAyB,CACpC,WAAW,EAAE,CACb,QAAQ,EAAE,CACV,YAAY,GACZ,oBAAoB,GACpB,aACA,GAAG,KAC6B,CAChC,IAAM,EAAiB,CAAC,GAAG,EAAS,CAAC,MAAM,EAAG,IAAM,EAAE,SAAW,EAAE,SAAS,CACtE,EAAe,EAAe,OAE9B,EAAa,EAAM,OAAQ,GAAS,EAAK,QAAQ,CAAC,OAClD,EAAe,EAAM,OAAS,EAAK,EAAa,EAAM,OAAU,IAAM,EAEtE,EAAkB,GAAa,EAAM,OAAS,EAE9C,EAAW,EAAM,OAAS,OAAO,EAAM,MAAM,CAAC,OAAS,EAEvD,EAAiB,CAAC,GAAG,EAAe,CACvC,SAAS,CACT,KAAM,GAAY,GAAgB,EAAQ,SAAS,CAChD,EAAe,EAAY,GAAgB,OAAS,GAAM,GAE1D,EAAmB,GAClB,GAMD,GAFY,EAAe,GAEH,SAGnB;;;YAFO,EAAe,EAAI,GAAS,EAAe,GAAK,EAKlD;;;;;;SASP,oDA0BT,OACE,EAAC,MAAA,CACC,UAAW,EACT,GAAY,uBAAyB,GAAuB,CAC5D,GAAY,MAAQ,GAA2B,CAChD,CACD,aAAW,wBACX,aAAY,YAEZ,EAAC,EAAA,CACC,WAAY,CACV,cACE,GAAY,eAAiB,GAA4B,CAC3D,KACE,GAAY,eAAe,MAAQ,GAAgC,CACrE,MACE,GAAY,eAAe,OAC3B,GAAiC,CACnC,YACE,GAAY,eAAe,aAC3B,GAAuC,CACzC,MACE,GAAY,eAAe,OAC3B,GAAiC,CACnC,QACE,GAAY,eAAe,SAC3B,GAAmC,CACrC,SACE,GAAY,eAAe,UAC3B,GAAoC,CACtC,MACE,GAAY,eAAe,OAC3B,GAAiC,CACnC,QACE,GAAY,eAAe,SAC3B,GAAmC,CACrC,WAAY,CACV,WACE,GAAY,eAAe,YAAY,YACvC,GAAsC,CACxC,KACE,GAAY,eAAe,YAAY,MACvC,GAA0C,CAC5C,KACE,GAAY,eAAe,YAAY,MACvC,GAA0C,CAC5C,QAAS,CACP,QACE,GAAY,eAAe,YAAY,SAAS,SAChD,GAA6C,CAC/C,KACE,GAAY,eAAe,YAAY,SAAS,MAChD,GAAiD,CACpD,CACF,CACF,CACD,GAAI,GACJ,CACF,EAAC,MAAA,CACC,UAAW,EACT,GAAY,iBAAmB,GAAsC,CACtE,WAED,EAAC,MAAA,CACC,UAAW,EACT,GAAY,YAAc,GAAiC,CAC5D,WAED,EAAC,MAAA,CAAI,UAAW,EAAG,GAAY,KAAO,GAA0B,CAAC,UAC9D,EAAe,KAAK,EAAG,IACtB,EAAC,MAAA,CAEC,MAAO,CACL,gBAAiB,EAAgB,EAAM,CACxC,CACD,UAAW,EACT,GAAY,SAAW,GAA8B,CACtD,EANI,EAOL,CACF,EACE,CACL,GAAqB,GACpB,EAAC,OAAA,CACC,UAAW,EACT,GAAY,eACV,GAAoC,CACvC,UAEA,GACI,CAAA,EAEL,CACL,GACC,EAAC,KAAA,CAAG,UAAW,EAAG,GAAY,OAAS,GAA4B,CAAC,UACjE,EAAM,KAAK,EAAM,IAChB,EAAC,KAAA,CAEC,UAAW,EAAG,GAAY,MAAQ,GAA2B,CAAC,CAC9D,aAAY,EAAK,SAAW,IAAA,aAE5B,EAAC,EAAA,CACC,KAAK,yBACL,KACE,EAAK,QACD,0CACA,sCAEN,WAAY,CACV,KACE,GAAY,UAAU,MACtB,GAA+B,CACjC,KACE,GAAY,UAAU,MACtB,GAAmC,CACrC,QAAS,CACP,QACE,GAAY,UAAU,SAAS,SAC/B,GAAsC,CACxC,KACE,GAAY,UAAU,SAAS,MAC/B,GAA0C,CAC7C,CACF,EACD,CACF,EAAC,OAAA,CACC,UAAW,EACT,GAAY,UAAY,GAA+B,CACxD,UAEA,EAAK,MACD,CAAA,EAlCF,EAmCF,CACL,EACC,CAAA,EAEH,CAAA,EACF"}
1
+ {"version":3,"file":"PasswordStrengthInput.mjs","names":[],"sources":["../../../../src/components/controls/password-input/PasswordStrengthInput.tsx"],"sourcesContent":["import { cx } from '@mage-ui/styled-system/css';\nimport {\n passwordStrengthInput,\n passwordStrengthInputBar,\n passwordStrengthInputBarWrapper,\n passwordStrengthInputInput,\n passwordStrengthInputInputButtonIcon,\n passwordStrengthInputInputButtonIconIcon,\n passwordStrengthInputInputButtonIconIconRaw,\n passwordStrengthInputInputButtonIconIconRawRoot,\n passwordStrengthInputInputButtonIconRoot,\n passwordStrengthInputInputDescription,\n passwordStrengthInputInputError,\n passwordStrengthInputInputInput,\n passwordStrengthInputInputLabel,\n passwordStrengthInputInputRequired,\n passwordStrengthInputInputRoot,\n passwordStrengthInputInputSection,\n passwordStrengthInputInputWrapper,\n passwordStrengthInputRoot,\n passwordStrengthInputRule,\n passwordStrengthInputRuleIcon,\n passwordStrengthInputRuleIconIconRaw,\n passwordStrengthInputRuleIconIconRawRoot,\n passwordStrengthInputRuleIconRoot,\n passwordStrengthInputRules,\n passwordStrengthInputRuleText,\n passwordStrengthInputSegment,\n passwordStrengthInputStrengthLabel,\n passwordStrengthInputStrengthWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Icon, type IconProps } from '@/components/data-display';\n\nimport { PasswordInput, type PasswordInputProps } from './PasswordInput';\n\nexport type PasswordRule = {\n text: string;\n isValid: boolean;\n};\n\nexport type PasswordSegment = {\n minScore: number;\n label: string;\n};\n\nexport type PasswordStrengthInputProps = PasswordInputProps & {\n segments?: PasswordSegment[];\n rules?: PasswordRule[];\n showRules?: boolean;\n showStrengthLabel?: boolean;\n classNames?: {\n passwordStrengthInput?: string;\n root?: string;\n strengthWrapper?: string;\n barWrapper?: string;\n bar?: string;\n segment?: string;\n strengthLabel?: string;\n rules?: string;\n rule?: string;\n ruleIcon?: IconProps['classNames'];\n ruleText?: string;\n passwordInput?: PasswordInputProps['classNames'];\n };\n};\n\nexport const PasswordStrengthInput = ({\n segments = [],\n rules = [],\n showRules = true,\n showStrengthLabel = true,\n classNames,\n ...props\n}: PasswordStrengthInputProps) => {\n const sortedSegments = [...segments].sort((a, b) => a.minScore - b.minScore);\n const segmentCount = sortedSegments.length;\n\n const validCount = rules.filter((rule) => rule.isValid).length;\n const scorePercent = rules.length > 0 ? (validCount / rules.length) * 100 : 0;\n\n const hasRulesDisplay = showRules && rules.length > 0;\n\n const hasValue = props.value && String(props.value).length > 0;\n\n const currentSegment = [...sortedSegments]\n .reverse()\n .find((segment) => scorePercent >= segment.minScore);\n const currentLabel = hasValue ? (currentSegment?.label ?? '') : '';\n\n const getSegmentColor = (index: number) => {\n if (!hasValue) {\n return 'var(--password-strength-input-segment-background)';\n }\n\n const segment = sortedSegments[index];\n\n if (scorePercent >= segment.minScore) {\n const ratio = segmentCount > 1 ? index / (segmentCount - 1) : 1;\n\n return `hsl(\n calc(\n var(--password-strength-input-segment-hue-start) +\n ${ratio} *\n (var(--password-strength-input-segment-hue-end) -\n var(--password-strength-input-segment-hue-start))\n ),\n var(--password-strength-input-segment-saturation),\n var(--password-strength-input-segment-lightness)\n )`;\n }\n\n return 'var(--password-strength-input-segment-background)';\n };\n\n // const getSegmentColor = (index: number) => {\n // if (!hasValue) {\n // return 'var(--password-strength-input-segment-background)';\n // }\n\n // const segment = sortedSegments[index];\n\n // if (scorePercent >= segment.minScore) {\n // const ratio =\n // segmentCount > 1 ? index / (segmentCount - 1) : 1;\n\n // const percentage = Math.round(ratio * 100);\n\n // return `color-mix(\n // in oklch,\n // var(--password-strength-input-segment-color-start) ${100 - percentage}%,\n // var(--password-strength-input-segment-color-end) ${percentage}%\n // )`;\n // }\n\n // return 'var(--password-strength-input-segment-background)';\n // };\n\n return (\n <div\n className={cx(\n classNames?.passwordStrengthInput ?? passwordStrengthInput(),\n classNames?.root ?? passwordStrengthInputRoot(),\n )}\n data-scope='passwordStrengthInput'\n data-rules={hasRulesDisplay}\n >\n <PasswordInput\n classNames={{\n passwordInput:\n classNames?.passwordInput ?? passwordStrengthInputInput(),\n root:\n classNames?.passwordInput?.root ?? passwordStrengthInputInputRoot(),\n label:\n classNames?.passwordInput?.label ??\n passwordStrengthInputInputLabel(),\n description:\n classNames?.passwordInput?.description ??\n passwordStrengthInputInputDescription(),\n error:\n classNames?.passwordInput?.error ??\n passwordStrengthInputInputError(),\n wrapper:\n classNames?.passwordInput?.wrapper ??\n passwordStrengthInputInputWrapper(),\n required:\n classNames?.passwordInput?.required ??\n passwordStrengthInputInputRequired(),\n input:\n classNames?.passwordInput?.input ??\n passwordStrengthInputInputInput(),\n section:\n classNames?.passwordInput?.section ??\n passwordStrengthInputInputSection(),\n buttonIcon: {\n buttonIcon:\n classNames?.passwordInput?.buttonIcon?.buttonIcon ??\n passwordStrengthInputInputButtonIcon(),\n root:\n classNames?.passwordInput?.buttonIcon?.root ??\n passwordStrengthInputInputButtonIconRoot(),\n icon:\n classNames?.passwordInput?.buttonIcon?.icon ??\n passwordStrengthInputInputButtonIconIcon(),\n iconRaw: {\n iconRaw:\n classNames?.passwordInput?.buttonIcon?.iconRaw?.iconRaw ??\n passwordStrengthInputInputButtonIconIconRaw(),\n root:\n classNames?.passwordInput?.buttonIcon?.iconRaw?.root ??\n passwordStrengthInputInputButtonIconIconRawRoot(),\n },\n },\n }}\n {...props}\n />\n <div\n className={cx(\n classNames?.strengthWrapper ?? passwordStrengthInputStrengthWrapper(),\n )}\n >\n <div\n className={cx(\n classNames?.barWrapper ?? passwordStrengthInputBarWrapper(),\n )}\n >\n <div className={cx(classNames?.bar ?? passwordStrengthInputBar())}>\n {sortedSegments.map((_, index) => (\n <div\n key={index}\n style={{\n backgroundColor: getSegmentColor(index),\n }}\n className={cx(\n classNames?.segment ?? passwordStrengthInputSegment(),\n )}\n />\n ))}\n </div>\n {showStrengthLabel && currentLabel && (\n <span\n className={cx(\n classNames?.strengthLabel ??\n passwordStrengthInputStrengthLabel(),\n )}\n >\n {currentLabel}\n </span>\n )}\n </div>\n {hasRulesDisplay && (\n <ul className={cx(classNames?.rules ?? passwordStrengthInputRules())}>\n {rules.map((rule, index) => (\n <li\n key={index}\n className={cx(classNames?.rule ?? passwordStrengthInputRule())}\n data-valid={rule.isValid || undefined}\n >\n <Icon\n path='/icons/sprite-mage.svg'\n name={\n rule.isValid\n ? 'mage-password-input-strength-rule-check'\n : 'mage-password-input-strength-rule-x'\n }\n classNames={{\n icon:\n classNames?.ruleIcon?.icon ??\n passwordStrengthInputRuleIcon(),\n root:\n classNames?.ruleIcon?.root ??\n passwordStrengthInputRuleIconRoot(),\n iconRaw: {\n iconRaw:\n classNames?.ruleIcon?.iconRaw?.iconRaw ??\n passwordStrengthInputRuleIconIconRaw(),\n root:\n classNames?.ruleIcon?.iconRaw?.root ??\n passwordStrengthInputRuleIconIconRawRoot(),\n },\n }}\n />\n <span\n className={cx(\n classNames?.ruleText ?? passwordStrengthInputRuleText(),\n )}\n >\n {rule.text}\n </span>\n </li>\n ))}\n </ul>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":"qzCAkEA,MAAa,GAAyB,CACpC,WAAW,EAAE,CACb,QAAQ,EAAE,CACV,YAAY,GACZ,oBAAoB,GACpB,aACA,GAAG,KAC6B,CAChC,IAAM,EAAiB,CAAC,GAAG,EAAS,CAAC,MAAM,EAAG,IAAM,EAAE,SAAW,EAAE,SAAS,CACtE,EAAe,EAAe,OAE9B,EAAa,EAAM,OAAQ,GAAS,EAAK,QAAQ,CAAC,OAClD,EAAe,EAAM,OAAS,EAAK,EAAa,EAAM,OAAU,IAAM,EAEtE,EAAkB,GAAa,EAAM,OAAS,EAE9C,EAAW,EAAM,OAAS,OAAO,EAAM,MAAM,CAAC,OAAS,EAEvD,EAAiB,CAAC,GAAG,EAAe,CACvC,SAAS,CACT,KAAM,GAAY,GAAgB,EAAQ,SAAS,CAChD,EAAe,EAAY,GAAgB,OAAS,GAAM,GAE1D,EAAmB,GAClB,GAMD,GAFY,EAAe,GAEH,SAGnB;;;YAFO,EAAe,EAAI,GAAS,EAAe,GAAK,EAKlD;;;;;;SASP,oDA0BT,OACE,EAAC,MAAD,CACE,UAAW,EACT,GAAY,uBAAyB,GAAuB,CAC5D,GAAY,MAAQ,GAA2B,CAChD,CACD,aAAW,wBACX,aAAY,WANd,CAQE,EAAC,EAAD,CACE,WAAY,CACV,cACE,GAAY,eAAiB,GAA4B,CAC3D,KACE,GAAY,eAAe,MAAQ,GAAgC,CACrE,MACE,GAAY,eAAe,OAC3B,GAAiC,CACnC,YACE,GAAY,eAAe,aAC3B,GAAuC,CACzC,MACE,GAAY,eAAe,OAC3B,GAAiC,CACnC,QACE,GAAY,eAAe,SAC3B,GAAmC,CACrC,SACE,GAAY,eAAe,UAC3B,GAAoC,CACtC,MACE,GAAY,eAAe,OAC3B,GAAiC,CACnC,QACE,GAAY,eAAe,SAC3B,GAAmC,CACrC,WAAY,CACV,WACE,GAAY,eAAe,YAAY,YACvC,GAAsC,CACxC,KACE,GAAY,eAAe,YAAY,MACvC,GAA0C,CAC5C,KACE,GAAY,eAAe,YAAY,MACvC,GAA0C,CAC5C,QAAS,CACP,QACE,GAAY,eAAe,YAAY,SAAS,SAChD,GAA6C,CAC/C,KACE,GAAY,eAAe,YAAY,SAAS,MAChD,GAAiD,CACpD,CACF,CACF,CACD,GAAI,EACJ,CAAA,CACF,EAAC,MAAD,CACE,UAAW,EACT,GAAY,iBAAmB,GAAsC,CACtE,UAHH,CAKE,EAAC,MAAD,CACE,UAAW,EACT,GAAY,YAAc,GAAiC,CAC5D,UAHH,CAKE,EAAC,MAAD,CAAK,UAAW,EAAG,GAAY,KAAO,GAA0B,CAAC,UAC9D,EAAe,KAAK,EAAG,IACtB,EAAC,MAAD,CAEE,MAAO,CACL,gBAAiB,EAAgB,EAAM,CACxC,CACD,UAAW,EACT,GAAY,SAAW,GAA8B,CACtD,CACD,CAPK,EAOL,CACF,CACE,CAAA,CACL,GAAqB,GACpB,EAAC,OAAD,CACE,UAAW,EACT,GAAY,eACV,GAAoC,CACvC,UAEA,EACI,CAAA,CAEL,GACL,GACC,EAAC,KAAD,CAAI,UAAW,EAAG,GAAY,OAAS,GAA4B,CAAC,UACjE,EAAM,KAAK,EAAM,IAChB,EAAC,KAAD,CAEE,UAAW,EAAG,GAAY,MAAQ,GAA2B,CAAC,CAC9D,aAAY,EAAK,SAAW,IAAA,YAH9B,CAKE,EAAC,EAAD,CACE,KAAK,yBACL,KACE,EAAK,QACD,0CACA,sCAEN,WAAY,CACV,KACE,GAAY,UAAU,MACtB,GAA+B,CACjC,KACE,GAAY,UAAU,MACtB,GAAmC,CACrC,QAAS,CACP,QACE,GAAY,UAAU,SAAS,SAC/B,GAAsC,CACxC,KACE,GAAY,UAAU,SAAS,MAC/B,GAA0C,CAC7C,CACF,CACD,CAAA,CACF,EAAC,OAAD,CACE,UAAW,EACT,GAAY,UAAY,GAA+B,CACxD,UAEA,EAAK,KACD,CAAA,CACJ,EAnCE,EAmCF,CACL,CACC,CAAA,CAEH,GACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.mjs","names":["Radio","MantineRadio"],"sources":["../../../../src/components/controls/radio/Radio.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n radio,\n radioBody,\n radioDescription,\n radioError,\n radioIcon,\n radioInner,\n radioLabel,\n radioLabelWrapper,\n radioRadio,\n radioRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Radio as MantineRadio } from '@mantine/core';\n\nimport { RadioGroup } from '../radio-group/RadioGroup';\n\nexport type RadioProps = Omit<ComponentProps<'input'>, 'size'> & {\n label: ReactNode;\n hiddenLabel?: boolean;\n error?: ReactNode;\n description?: ReactNode;\n value?: string;\n classNames?: {\n root?: string;\n radio?: string;\n radioRadio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Radio = ({\n classNames,\n label,\n hiddenLabel,\n description,\n error,\n value,\n disabled,\n onChange,\n}: RadioProps): ReactNode => {\n return (\n <MantineRadio\n classNames={{\n root: cx(classNames?.radio ?? radio(), classNames?.root ?? radioRoot()),\n radio: cx(classNames?.radioRadio ?? radioRadio(), 'peer'),\n icon: classNames?.icon ?? radioIcon(),\n inner: classNames?.inner ?? radioInner(),\n body: classNames?.body ?? radioBody(),\n labelWrapper: classNames?.labelWrapper ?? radioLabelWrapper(),\n label: cx(\n classNames?.label ?? radioLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? radioDescription(),\n error: classNames?.error ?? radioError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n disabled={disabled}\n onChange={onChange}\n />\n );\n};\n\nRadio.displayName = 'Radio';\nRadio.Group = RadioGroup;\n"],"mappings":"2cAwCA,MAAaA,GAAS,CACpB,aACA,QACA,cACA,cACA,QACA,QACA,WACA,cAGE,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,EAAG,GAAY,OAAS,GAAO,CAAE,GAAY,MAAQ,GAAW,CAAC,CACvE,MAAO,EAAG,GAAY,YAAc,GAAY,CAAE,OAAO,CACzD,KAAM,GAAY,MAAQ,GAAW,CACrC,MAAO,GAAY,OAAS,GAAY,CACxC,KAAM,GAAY,MAAQ,GAAW,CACrC,aAAc,GAAY,cAAgB,GAAmB,CAC7D,MAAO,EACL,GAAY,OAAS,GAAY,CACjC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAkB,CAC1D,MAAO,GAAY,OAAS,GAAY,CACzC,CACM,QACM,cACN,QACA,QACG,WACA,YACV,CAIN,EAAM,YAAc,QACpB,EAAM,MAAQ"}
1
+ {"version":3,"file":"Radio.mjs","names":["Radio","MantineRadio"],"sources":["../../../../src/components/controls/radio/Radio.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n radio,\n radioBody,\n radioDescription,\n radioError,\n radioIcon,\n radioInner,\n radioLabel,\n radioLabelWrapper,\n radioRadio,\n radioRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Radio as MantineRadio } from '@mantine/core';\n\nimport { RadioGroup } from '../radio-group/RadioGroup';\n\nexport type RadioProps = Omit<ComponentProps<'input'>, 'size'> & {\n label: ReactNode;\n hiddenLabel?: boolean;\n error?: ReactNode;\n description?: ReactNode;\n value?: string;\n classNames?: {\n root?: string;\n radio?: string;\n radioRadio?: string;\n icon?: string;\n inner?: string;\n body?: string;\n labelWrapper?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Radio = ({\n classNames,\n label,\n hiddenLabel,\n description,\n error,\n value,\n disabled,\n onChange,\n}: RadioProps): ReactNode => {\n return (\n <MantineRadio\n classNames={{\n root: cx(classNames?.radio ?? radio(), classNames?.root ?? radioRoot()),\n radio: cx(classNames?.radioRadio ?? radioRadio(), 'peer'),\n icon: classNames?.icon ?? radioIcon(),\n inner: classNames?.inner ?? radioInner(),\n body: classNames?.body ?? radioBody(),\n labelWrapper: classNames?.labelWrapper ?? radioLabelWrapper(),\n label: cx(\n classNames?.label ?? radioLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? radioDescription(),\n error: classNames?.error ?? radioError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n disabled={disabled}\n onChange={onChange}\n />\n );\n};\n\nRadio.displayName = 'Radio';\nRadio.Group = RadioGroup;\n"],"mappings":"2cAwCA,MAAaA,GAAS,CACpB,aACA,QACA,cACA,cACA,QACA,QACA,WACA,cAGE,EAACC,EAAD,CACE,WAAY,CACV,KAAM,EAAG,GAAY,OAAS,GAAO,CAAE,GAAY,MAAQ,GAAW,CAAC,CACvE,MAAO,EAAG,GAAY,YAAc,GAAY,CAAE,OAAO,CACzD,KAAM,GAAY,MAAQ,GAAW,CACrC,MAAO,GAAY,OAAS,GAAY,CACxC,KAAM,GAAY,MAAQ,GAAW,CACrC,aAAc,GAAY,cAAgB,GAAmB,CAC7D,MAAO,EACL,GAAY,OAAS,GAAY,CACjC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAkB,CAC1D,MAAO,GAAY,OAAS,GAAY,CACzC,CACM,QACM,cACN,QACA,QACG,WACA,WACV,CAAA,CAIN,EAAM,YAAc,QACpB,EAAM,MAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.mjs","names":["MantineRadio"],"sources":["../../../../src/components/controls/radio-group/RadioGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n radioGroup,\n radioGroupDescription,\n radioGroupError,\n radioGroupGroup,\n radioGroupLabel,\n radioGroupRequired,\n radioGroupRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Radio as MantineRadio } from '@mantine/core';\n\nexport type RadioGroupProps = {\n label: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string;\n onChange?: (value: string) => void;\n hiddenLabel?: boolean;\n required?: boolean;\n classNames?: {\n radioGroup?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: string;\n groupList?: string;\n };\n};\n\nexport const RadioGroup = ({\n label,\n error,\n description,\n children,\n value,\n onChange,\n hiddenLabel,\n required,\n classNames,\n}: RadioGroupProps): ReactNode => {\n return (\n <MantineRadio.Group\n classNames={{\n root: cx(\n classNames?.radioGroup ?? radioGroup(),\n classNames?.root ?? radioGroupRoot(),\n ),\n label: cx(\n classNames?.label ?? radioGroupLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? radioGroupDescription(),\n required: classNames?.required ?? radioGroupRequired(),\n error: classNames?.error ?? radioGroupError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n onChange={onChange}\n withAsterisk={required}\n >\n <div className={classNames?.groupList ?? radioGroupGroup()}>\n {children}\n </div>\n </MantineRadio.Group>\n );\n};\n\nRadioGroup.displayName = 'Radio.Group';\n"],"mappings":"iYAmCA,MAAa,GAAc,CACzB,QACA,QACA,cACA,WACA,QACA,WACA,cACA,WACA,gBAGE,EAACA,EAAa,MAAA,CACZ,WAAY,CACV,KAAM,EACJ,GAAY,YAAc,GAAY,CACtC,GAAY,MAAQ,GAAgB,CACrC,CACD,MAAO,EACL,GAAY,OAAS,GAAiB,CACtC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAuB,CAC/D,SAAU,GAAY,UAAY,GAAoB,CACtD,MAAO,GAAY,OAAS,GAAiB,CAC9C,CACM,QACM,cACN,QACA,QACG,WACV,aAAc,WAEd,EAAC,MAAA,CAAI,UAAW,GAAY,WAAa,GAAiB,CACvD,YACG,EACa,CAIzB,EAAW,YAAc"}
1
+ {"version":3,"file":"RadioGroup.mjs","names":["MantineRadio"],"sources":["../../../../src/components/controls/radio-group/RadioGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n radioGroup,\n radioGroupDescription,\n radioGroupError,\n radioGroupGroup,\n radioGroupLabel,\n radioGroupRequired,\n radioGroupRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Radio as MantineRadio } from '@mantine/core';\n\nexport type RadioGroupProps = {\n label: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string;\n onChange?: (value: string) => void;\n hiddenLabel?: boolean;\n required?: boolean;\n classNames?: {\n radioGroup?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: string;\n groupList?: string;\n };\n};\n\nexport const RadioGroup = ({\n label,\n error,\n description,\n children,\n value,\n onChange,\n hiddenLabel,\n required,\n classNames,\n}: RadioGroupProps): ReactNode => {\n return (\n <MantineRadio.Group\n classNames={{\n root: cx(\n classNames?.radioGroup ?? radioGroup(),\n classNames?.root ?? radioGroupRoot(),\n ),\n label: cx(\n classNames?.label ?? radioGroupLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? radioGroupDescription(),\n required: classNames?.required ?? radioGroupRequired(),\n error: classNames?.error ?? radioGroupError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n onChange={onChange}\n withAsterisk={required}\n >\n <div className={classNames?.groupList ?? radioGroupGroup()}>\n {children}\n </div>\n </MantineRadio.Group>\n );\n};\n\nRadioGroup.displayName = 'Radio.Group';\n"],"mappings":"iYAmCA,MAAa,GAAc,CACzB,QACA,QACA,cACA,WACA,QACA,WACA,cACA,WACA,gBAGE,EAACA,EAAa,MAAd,CACE,WAAY,CACV,KAAM,EACJ,GAAY,YAAc,GAAY,CACtC,GAAY,MAAQ,GAAgB,CACrC,CACD,MAAO,EACL,GAAY,OAAS,GAAiB,CACtC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAuB,CAC/D,SAAU,GAAY,UAAY,GAAoB,CACtD,MAAO,GAAY,OAAS,GAAiB,CAC9C,CACM,QACM,cACN,QACA,QACG,WACV,aAAc,WAEd,EAAC,MAAD,CAAK,UAAW,GAAY,WAAa,GAAiB,CACvD,WACG,CAAA,CACa,CAAA,CAIzB,EAAW,YAAc"}
@@ -1,5 +1,4 @@
1
1
  import { SwitchGroupProps } from "../switch-group/SwitchGroup.mjs";
2
- import "../index.mjs";
3
2
  import { ComponentProps, ReactNode } from "react";
4
3
 
5
4
  //#region src/components/controls/switch/Switch.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.mts","names":[],"sources":["../../../../src/components/controls/switch/Switch.tsx"],"mappings":";;;;;KAuBY,WAAA,GAAc,IAAA,CAAK,cAAA;EAC7B,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,KAAA;EACA,WAAA;EACA,aAAA;EACA,UAAA;IACE,MAAA;IACA,IAAA;IACA,KAAA;IACA,KAAA;IACA,KAAA;IACA,UAAA;IACA,IAAA;IACA,SAAA;IACA,YAAA;IACA,aAAA;IACA,KAAA;IACA,WAAA;IACA,KAAA;EAAA;AAAA;AAAA,cAIS,MAAA;EAAA;;;;;;;;;KASV,WAAA,GAAc,SAAA"}
1
+ {"version":3,"file":"Switch.d.mts","names":[],"sources":["../../../../src/components/controls/switch/Switch.tsx"],"mappings":";;;;KAuBY,WAAA,GAAc,IAAA,CAAK,cAAA;EAC7B,KAAA,GAAQ,SAAA;EACR,WAAA,GAAc,SAAA;EACd,KAAA;EACA,WAAA;EACA,aAAA;EACA,UAAA;IACE,MAAA;IACA,IAAA;IACA,KAAA;IACA,KAAA;IACA,KAAA;IACA,UAAA;IACA,IAAA;IACA,SAAA;IACA,YAAA;IACA,aAAA;IACA,KAAA;IACA,WAAA;IACA,KAAA;EAAA;AAAA;AAAA,cAIS,MAAA;EAAA;;;;;;;;;KASV,WAAA,GAAc,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.mjs","names":["Switch","MantineSwitch"],"sources":["../../../../src/components/controls/switch/Switch.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n switchBody,\n switchBodyError,\n switchDescription,\n switchError,\n switchInput,\n switchLabel,\n switchLabelRequired,\n switchLabelWrapper,\n switchRecipe,\n switchRoot,\n switchThumb,\n switchTrack,\n switchTrackLabel,\n} from '@mage-ui/styled-system/recipes';\nimport { Switch as MantineSwitch } from '@mantine/core';\n\nimport { SwitchGroup } from '../switch-group/SwitchGroup';\n\nexport type SwitchProps = Omit<ComponentProps<'input'>, 'size' | 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: string;\n hiddenLabel?: boolean;\n labelPosition?: 'left' | 'right';\n classNames?: {\n switch?: string;\n root?: string;\n input?: string;\n track?: string;\n thumb?: string;\n trackLabel?: string;\n body?: string;\n bodyError?: string;\n labelWrapper?: string;\n labelRequired?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Switch = ({\n classNames,\n label,\n hiddenLabel,\n description,\n error,\n required,\n labelPosition,\n ...props\n}: SwitchProps): ReactNode => {\n const RequiredAsterisk = () =>\n required ? (\n <span className={classNames?.labelRequired ?? switchLabelRequired()}>\n *\n </span>\n ) : null;\n\n return (\n <MantineSwitch\n classNames={{\n root: cx(\n classNames?.switch ?? switchRecipe(),\n classNames?.root ?? switchRoot(),\n ),\n input: cx(classNames?.input ?? switchInput(), 'peer'),\n track: classNames?.track ?? switchTrack(),\n thumb: classNames?.thumb ?? switchThumb(),\n trackLabel: classNames?.trackLabel ?? switchTrackLabel(),\n body: cx(\n classNames?.body ?? switchBody(),\n error && (classNames?.bodyError ?? switchBodyError()),\n ),\n labelWrapper: classNames?.labelWrapper ?? switchLabelWrapper(),\n label: cx(\n classNames?.label ?? switchLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? switchDescription(),\n error: classNames?.error ?? switchError(),\n }}\n label={\n <>\n {label}\n <RequiredAsterisk />\n </>\n }\n description={description}\n error={error}\n required={required}\n labelPosition={labelPosition}\n {...props}\n />\n );\n};\n\nSwitch.displayName = 'Switch';\nSwitch.Group = SwitchGroup;\n"],"mappings":"4jBA8CA,MAAaA,GAAU,CACrB,aACA,QACA,cACA,cACA,QACA,WACA,gBACA,GAAG,KAUD,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,EACJ,GAAY,QAAU,GAAc,CACpC,GAAY,MAAQ,GAAY,CACjC,CACD,MAAO,EAAG,GAAY,OAAS,GAAa,CAAE,OAAO,CACrD,MAAO,GAAY,OAAS,GAAa,CACzC,MAAO,GAAY,OAAS,GAAa,CACzC,WAAY,GAAY,YAAc,GAAkB,CACxD,KAAM,EACJ,GAAY,MAAQ,GAAY,CAChC,IAAU,GAAY,WAAa,GAAiB,EACrD,CACD,aAAc,GAAY,cAAgB,GAAoB,CAC9D,MAAO,EACL,GAAY,OAAS,GAAa,CAClC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAmB,CAC3D,MAAO,GAAY,OAAS,GAAa,CAC1C,CACD,MACE,EAAA,EAAA,CAAA,SAAA,CACG,EACD,MAhCN,EACE,EAAC,OAAA,CAAK,UAAW,GAAY,eAAiB,GAAqB,UAAE,KAE9D,CACL,KA4BG,EAAA,CAAmB,CAAA,CAAA,CACnB,CAEQ,cACN,QACG,WACK,gBACf,GAAI,GACJ,CAIN,EAAO,YAAc,SACrB,EAAO,MAAQ"}
1
+ {"version":3,"file":"Switch.mjs","names":["Switch","MantineSwitch"],"sources":["../../../../src/components/controls/switch/Switch.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n switchBody,\n switchBodyError,\n switchDescription,\n switchError,\n switchInput,\n switchLabel,\n switchLabelRequired,\n switchLabelWrapper,\n switchRecipe,\n switchRoot,\n switchThumb,\n switchTrack,\n switchTrackLabel,\n} from '@mage-ui/styled-system/recipes';\nimport { Switch as MantineSwitch } from '@mantine/core';\n\nimport { SwitchGroup } from '../switch-group/SwitchGroup';\n\nexport type SwitchProps = Omit<ComponentProps<'input'>, 'size' | 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: string;\n hiddenLabel?: boolean;\n labelPosition?: 'left' | 'right';\n classNames?: {\n switch?: string;\n root?: string;\n input?: string;\n track?: string;\n thumb?: string;\n trackLabel?: string;\n body?: string;\n bodyError?: string;\n labelWrapper?: string;\n labelRequired?: string;\n label?: string;\n description?: string;\n error?: string;\n };\n};\n\nexport const Switch = ({\n classNames,\n label,\n hiddenLabel,\n description,\n error,\n required,\n labelPosition,\n ...props\n}: SwitchProps): ReactNode => {\n const RequiredAsterisk = () =>\n required ? (\n <span className={classNames?.labelRequired ?? switchLabelRequired()}>\n *\n </span>\n ) : null;\n\n return (\n <MantineSwitch\n classNames={{\n root: cx(\n classNames?.switch ?? switchRecipe(),\n classNames?.root ?? switchRoot(),\n ),\n input: cx(classNames?.input ?? switchInput(), 'peer'),\n track: classNames?.track ?? switchTrack(),\n thumb: classNames?.thumb ?? switchThumb(),\n trackLabel: classNames?.trackLabel ?? switchTrackLabel(),\n body: cx(\n classNames?.body ?? switchBody(),\n error && (classNames?.bodyError ?? switchBodyError()),\n ),\n labelWrapper: classNames?.labelWrapper ?? switchLabelWrapper(),\n label: cx(\n classNames?.label ?? switchLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? switchDescription(),\n error: classNames?.error ?? switchError(),\n }}\n label={\n <>\n {label}\n <RequiredAsterisk />\n </>\n }\n description={description}\n error={error}\n required={required}\n labelPosition={labelPosition}\n {...props}\n />\n );\n};\n\nSwitch.displayName = 'Switch';\nSwitch.Group = SwitchGroup;\n"],"mappings":"4jBA8CA,MAAaA,GAAU,CACrB,aACA,QACA,cACA,cACA,QACA,WACA,gBACA,GAAG,KAUD,EAACC,EAAD,CACE,WAAY,CACV,KAAM,EACJ,GAAY,QAAU,GAAc,CACpC,GAAY,MAAQ,GAAY,CACjC,CACD,MAAO,EAAG,GAAY,OAAS,GAAa,CAAE,OAAO,CACrD,MAAO,GAAY,OAAS,GAAa,CACzC,MAAO,GAAY,OAAS,GAAa,CACzC,WAAY,GAAY,YAAc,GAAkB,CACxD,KAAM,EACJ,GAAY,MAAQ,GAAY,CAChC,IAAU,GAAY,WAAa,GAAiB,EACrD,CACD,aAAc,GAAY,cAAgB,GAAoB,CAC9D,MAAO,EACL,GAAY,OAAS,GAAa,CAClC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAmB,CAC3D,MAAO,GAAY,OAAS,GAAa,CAC1C,CACD,MACE,EAAA,EAAA,CAAA,SAAA,CACG,EACD,MAhCN,EACE,EAAC,OAAD,CAAM,UAAW,GAAY,eAAiB,GAAqB,UAAE,IAE9D,CAAA,CACL,KA4BE,EAAoB,CAAA,CACnB,CAAA,CAAA,CAEQ,cACN,QACG,WACK,gBACf,GAAI,EACJ,CAAA,CAIN,EAAO,YAAc,SACrB,EAAO,MAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchGroup.mjs","names":["MantineSwitch"],"sources":["../../../../src/components/controls/switch-group/SwitchGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n switchGroup,\n switchGroupDescription,\n switchGroupError,\n switchGroupGroup,\n switchGroupLabel,\n switchGroupRequired,\n switchGroupRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Switch as MantineSwitch } from '@mantine/core';\n\nexport type SwitchGroupProps = {\n label: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string[];\n onChange?: (value: string[]) => void;\n hiddenLabel?: boolean;\n required?: boolean;\n disabled?: boolean;\n classNames?: {\n switchGroup?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: string;\n groupList?: string;\n };\n};\n\nexport const SwitchGroup = ({\n label,\n error,\n description,\n children,\n value,\n onChange,\n hiddenLabel,\n required,\n disabled,\n classNames,\n}: SwitchGroupProps): ReactNode => {\n return (\n <MantineSwitch.Group\n classNames={{\n root: cx(\n classNames?.switchGroup ?? switchGroup(),\n classNames?.root ?? switchGroupRoot(),\n ),\n label: cx(\n classNames?.label ?? switchGroupLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? switchGroupDescription(),\n required: classNames?.required ?? switchGroupRequired(),\n error: classNames?.error ?? switchGroupError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n onChange={onChange}\n withAsterisk={required}\n disabled={disabled}\n >\n <div className={classNames?.groupList ?? switchGroupGroup()}>\n {children}\n </div>\n </MantineSwitch.Group>\n );\n};\n\nSwitchGroup.displayName = 'Switch.Group';\n"],"mappings":"yYAoCA,MAAa,GAAe,CAC1B,QACA,QACA,cACA,WACA,QACA,WACA,cACA,WACA,WACA,gBAGE,EAACA,EAAc,MAAA,CACb,WAAY,CACV,KAAM,EACJ,GAAY,aAAe,GAAa,CACxC,GAAY,MAAQ,GAAiB,CACtC,CACD,MAAO,EACL,GAAY,OAAS,GAAkB,CACvC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAwB,CAChE,SAAU,GAAY,UAAY,GAAqB,CACvD,MAAO,GAAY,OAAS,GAAkB,CAC/C,CACM,QACM,cACN,QACA,QACG,WACV,aAAc,EACJ,oBAEV,EAAC,MAAA,CAAI,UAAW,GAAY,WAAa,GAAkB,CACxD,YACG,EACc,CAI1B,EAAY,YAAc"}
1
+ {"version":3,"file":"SwitchGroup.mjs","names":["MantineSwitch"],"sources":["../../../../src/components/controls/switch-group/SwitchGroup.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport { visuallyHidden } from '@mage-ui/styled-system/patterns';\nimport {\n switchGroup,\n switchGroupDescription,\n switchGroupError,\n switchGroupGroup,\n switchGroupLabel,\n switchGroupRequired,\n switchGroupRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Switch as MantineSwitch } from '@mantine/core';\n\nexport type SwitchGroupProps = {\n label: ReactNode;\n error?: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n value?: string[];\n onChange?: (value: string[]) => void;\n hiddenLabel?: boolean;\n required?: boolean;\n disabled?: boolean;\n classNames?: {\n switchGroup?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: string;\n groupList?: string;\n };\n};\n\nexport const SwitchGroup = ({\n label,\n error,\n description,\n children,\n value,\n onChange,\n hiddenLabel,\n required,\n disabled,\n classNames,\n}: SwitchGroupProps): ReactNode => {\n return (\n <MantineSwitch.Group\n classNames={{\n root: cx(\n classNames?.switchGroup ?? switchGroup(),\n classNames?.root ?? switchGroupRoot(),\n ),\n label: cx(\n classNames?.label ?? switchGroupLabel(),\n hiddenLabel && visuallyHidden(),\n ),\n description: classNames?.description ?? switchGroupDescription(),\n required: classNames?.required ?? switchGroupRequired(),\n error: classNames?.error ?? switchGroupError(),\n }}\n label={label}\n description={description}\n error={error}\n value={value}\n onChange={onChange}\n withAsterisk={required}\n disabled={disabled}\n >\n <div className={classNames?.groupList ?? switchGroupGroup()}>\n {children}\n </div>\n </MantineSwitch.Group>\n );\n};\n\nSwitchGroup.displayName = 'Switch.Group';\n"],"mappings":"yYAoCA,MAAa,GAAe,CAC1B,QACA,QACA,cACA,WACA,QACA,WACA,cACA,WACA,WACA,gBAGE,EAACA,EAAc,MAAf,CACE,WAAY,CACV,KAAM,EACJ,GAAY,aAAe,GAAa,CACxC,GAAY,MAAQ,GAAiB,CACtC,CACD,MAAO,EACL,GAAY,OAAS,GAAkB,CACvC,GAAe,GAAgB,CAChC,CACD,YAAa,GAAY,aAAe,GAAwB,CAChE,SAAU,GAAY,UAAY,GAAqB,CACvD,MAAO,GAAY,OAAS,GAAkB,CAC/C,CACM,QACM,cACN,QACA,QACG,WACV,aAAc,EACJ,oBAEV,EAAC,MAAD,CAAK,UAAW,GAAY,WAAa,GAAkB,CACxD,WACG,CAAA,CACc,CAAA,CAI1B,EAAY,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.mjs","names":["TextInput","MantineTextInput"],"sources":["../../../../src/components/controls/text-input/TextInput.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n textInput,\n textInputDescription,\n textInputError,\n textInputInput,\n textInputLabel,\n textInputRequired,\n textInputRoot,\n textInputSection,\n textInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { TextInput as MantineTextInput } from '@mantine/core';\n\nexport type TextInputProps = Omit<ComponentProps<'input'>, 'size'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n readOnly?: boolean;\n classNames?: {\n textInput?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n required?: string;\n };\n};\n\nexport const TextInput = ({\n classNames,\n required,\n startSlot,\n endSlot,\n ...props\n}: TextInputProps) => {\n return (\n <MantineTextInput\n leftSection={startSlot}\n rightSection={endSlot}\n withAsterisk={required}\n classNames={{\n root: cx(\n classNames?.textInput ?? textInput(),\n classNames?.root ?? textInputRoot(),\n 'group',\n ),\n label: classNames?.label ?? textInputLabel(),\n required: classNames?.required ?? textInputRequired(),\n description: classNames?.description ?? textInputDescription(),\n error: classNames?.error ?? textInputError(),\n wrapper: classNames?.wrapper ?? textInputWrapper(),\n input: cx(classNames?.input ?? textInputInput(), 'peer'),\n section: cx(classNames?.section ?? textInputSection(), 'group'),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"yWAoCA,MAAaA,GAAa,CACxB,aACA,WACA,YACA,UACA,GAAG,KAGD,EAACC,EAAAA,CACC,YAAa,EACb,aAAc,EACd,aAAc,EACd,WAAY,CACV,KAAM,EACJ,GAAY,WAAa,GAAW,CACpC,GAAY,MAAQ,GAAe,CACnC,QACD,CACD,MAAO,GAAY,OAAS,GAAgB,CAC5C,SAAU,GAAY,UAAY,GAAmB,CACrD,YAAa,GAAY,aAAe,GAAsB,CAC9D,MAAO,GAAY,OAAS,GAAgB,CAC5C,QAAS,GAAY,SAAW,GAAkB,CAClD,MAAO,EAAG,GAAY,OAAS,GAAgB,CAAE,OAAO,CACxD,QAAS,EAAG,GAAY,SAAW,GAAkB,CAAE,QAAQ,CAChE,CACD,GAAI,GACJ"}
1
+ {"version":3,"file":"TextInput.mjs","names":["TextInput","MantineTextInput"],"sources":["../../../../src/components/controls/text-input/TextInput.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n textInput,\n textInputDescription,\n textInputError,\n textInputInput,\n textInputLabel,\n textInputRequired,\n textInputRoot,\n textInputSection,\n textInputWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { TextInput as MantineTextInput } from '@mantine/core';\n\nexport type TextInputProps = Omit<ComponentProps<'input'>, 'size'> & {\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n readOnly?: boolean;\n classNames?: {\n textInput?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n required?: string;\n };\n};\n\nexport const TextInput = ({\n classNames,\n required,\n startSlot,\n endSlot,\n ...props\n}: TextInputProps) => {\n return (\n <MantineTextInput\n leftSection={startSlot}\n rightSection={endSlot}\n withAsterisk={required}\n classNames={{\n root: cx(\n classNames?.textInput ?? textInput(),\n classNames?.root ?? textInputRoot(),\n 'group',\n ),\n label: classNames?.label ?? textInputLabel(),\n required: classNames?.required ?? textInputRequired(),\n description: classNames?.description ?? textInputDescription(),\n error: classNames?.error ?? textInputError(),\n wrapper: classNames?.wrapper ?? textInputWrapper(),\n input: cx(classNames?.input ?? textInputInput(), 'peer'),\n section: cx(classNames?.section ?? textInputSection(), 'group'),\n }}\n {...props}\n />\n );\n};\n"],"mappings":"yWAoCA,MAAaA,GAAa,CACxB,aACA,WACA,YACA,UACA,GAAG,KAGD,EAACC,EAAD,CACE,YAAa,EACb,aAAc,EACd,aAAc,EACd,WAAY,CACV,KAAM,EACJ,GAAY,WAAa,GAAW,CACpC,GAAY,MAAQ,GAAe,CACnC,QACD,CACD,MAAO,GAAY,OAAS,GAAgB,CAC5C,SAAU,GAAY,UAAY,GAAmB,CACrD,YAAa,GAAY,aAAe,GAAsB,CAC9D,MAAO,GAAY,OAAS,GAAgB,CAC5C,QAAS,GAAY,SAAW,GAAkB,CAClD,MAAO,EAAG,GAAY,OAAS,GAAgB,CAAE,OAAO,CACxD,QAAS,EAAG,GAAY,SAAW,GAAkB,CAAE,QAAQ,CAChE,CACD,GAAI,EACJ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.mjs","names":["Textarea","MantineTextarea"],"sources":["../../../../src/components/controls/textarea/Textarea.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n textarea,\n textareaDescription,\n textareaError,\n textareaInput,\n textareaLabel,\n textareaRequired,\n textareaRoot,\n textareaSection,\n textareaWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Textarea as MantineTextarea } from '@mantine/core';\n\nexport type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> & {\n name?: string;\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n autosize?: boolean;\n minRows?: number;\n maxRows?: number;\n classNames?: {\n textarea?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n };\n};\n\nexport const Textarea = ({\n name,\n label,\n description,\n error,\n placeholder,\n classNames,\n startSlot,\n endSlot,\n onChange,\n value,\n id,\n disabled,\n required,\n readOnly,\n autosize,\n minRows,\n maxRows,\n}: TextareaProps) => {\n return (\n <MantineTextarea\n name={name}\n label={label}\n description={description}\n error={error}\n placeholder={placeholder}\n leftSection={startSlot}\n rightSection={endSlot}\n onChange={onChange}\n value={value}\n id={id}\n disabled={disabled}\n withAsterisk={required}\n required={required}\n readOnly={readOnly}\n autosize={autosize}\n minRows={minRows}\n maxRows={maxRows}\n classNames={{\n root: cx(\n classNames?.textarea ?? textarea(),\n classNames?.root ?? textareaRoot(),\n 'group',\n ),\n label: classNames?.label ?? textareaLabel(),\n required: classNames?.label ?? textareaRequired(),\n description: classNames?.description ?? textareaDescription(),\n error: classNames?.error ?? textareaError(),\n wrapper: classNames?.wrapper ?? textareaWrapper(),\n input: classNames?.input ?? textareaInput(),\n section: classNames?.section ?? textareaSection(),\n }}\n />\n );\n};\n"],"mappings":"+VAsCA,MAAaA,GAAY,CACvB,OACA,QACA,cACA,QACA,cACA,aACA,YACA,UACA,WACA,QACA,KACA,WACA,WACA,WACA,WACA,UACA,aAGE,EAACC,EAAAA,CACO,OACC,QACM,cACN,QACM,cACb,YAAa,EACb,aAAc,EACJ,WACH,QACH,KACM,WACV,aAAc,EACJ,WACA,WACA,WACD,UACA,UACT,WAAY,CACV,KAAM,EACJ,GAAY,UAAY,GAAU,CAClC,GAAY,MAAQ,GAAc,CAClC,QACD,CACD,MAAO,GAAY,OAAS,GAAe,CAC3C,SAAU,GAAY,OAAS,GAAkB,CACjD,YAAa,GAAY,aAAe,GAAqB,CAC7D,MAAO,GAAY,OAAS,GAAe,CAC3C,QAAS,GAAY,SAAW,GAAiB,CACjD,MAAO,GAAY,OAAS,GAAe,CAC3C,QAAS,GAAY,SAAW,GAAiB,CAClD,EACD"}
1
+ {"version":3,"file":"Textarea.mjs","names":["Textarea","MantineTextarea"],"sources":["../../../../src/components/controls/textarea/Textarea.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n textarea,\n textareaDescription,\n textareaError,\n textareaInput,\n textareaLabel,\n textareaRequired,\n textareaRoot,\n textareaSection,\n textareaWrapper,\n} from '@mage-ui/styled-system/recipes';\nimport { Textarea as MantineTextarea } from '@mantine/core';\n\nexport type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> & {\n name?: string;\n label?: ReactNode;\n description?: ReactNode;\n error?: ReactNode;\n startSlot?: ReactNode;\n endSlot?: ReactNode;\n autosize?: boolean;\n minRows?: number;\n maxRows?: number;\n classNames?: {\n textarea?: string;\n root?: string;\n label?: string;\n description?: string;\n error?: string;\n wrapper?: string;\n input?: string;\n section?: string;\n };\n};\n\nexport const Textarea = ({\n name,\n label,\n description,\n error,\n placeholder,\n classNames,\n startSlot,\n endSlot,\n onChange,\n value,\n id,\n disabled,\n required,\n readOnly,\n autosize,\n minRows,\n maxRows,\n}: TextareaProps) => {\n return (\n <MantineTextarea\n name={name}\n label={label}\n description={description}\n error={error}\n placeholder={placeholder}\n leftSection={startSlot}\n rightSection={endSlot}\n onChange={onChange}\n value={value}\n id={id}\n disabled={disabled}\n withAsterisk={required}\n required={required}\n readOnly={readOnly}\n autosize={autosize}\n minRows={minRows}\n maxRows={maxRows}\n classNames={{\n root: cx(\n classNames?.textarea ?? textarea(),\n classNames?.root ?? textareaRoot(),\n 'group',\n ),\n label: classNames?.label ?? textareaLabel(),\n required: classNames?.label ?? textareaRequired(),\n description: classNames?.description ?? textareaDescription(),\n error: classNames?.error ?? textareaError(),\n wrapper: classNames?.wrapper ?? textareaWrapper(),\n input: classNames?.input ?? textareaInput(),\n section: classNames?.section ?? textareaSection(),\n }}\n />\n );\n};\n"],"mappings":"+VAsCA,MAAaA,GAAY,CACvB,OACA,QACA,cACA,QACA,cACA,aACA,YACA,UACA,WACA,QACA,KACA,WACA,WACA,WACA,WACA,UACA,aAGE,EAACC,EAAD,CACQ,OACC,QACM,cACN,QACM,cACb,YAAa,EACb,aAAc,EACJ,WACH,QACH,KACM,WACV,aAAc,EACJ,WACA,WACA,WACD,UACA,UACT,WAAY,CACV,KAAM,EACJ,GAAY,UAAY,GAAU,CAClC,GAAY,MAAQ,GAAc,CAClC,QACD,CACD,MAAO,GAAY,OAAS,GAAe,CAC3C,SAAU,GAAY,OAAS,GAAkB,CACjD,YAAa,GAAY,aAAe,GAAqB,CAC7D,MAAO,GAAY,OAAS,GAAe,CAC3C,QAAS,GAAY,SAAW,GAAiB,CACjD,MAAO,GAAY,OAAS,GAAe,CAC3C,QAAS,GAAY,SAAW,GAAiB,CAClD,CACD,CAAA"}
@@ -1,6 +1,5 @@
1
1
  import { AvatarProps } from "../avatar/Avatar.mjs";
2
2
  import { RemovableItemProps } from "../removable-item/RemovableItem.mjs";
3
- import "../index.mjs";
4
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
4
  import { ReactNode } from "react";
6
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"AssignedUser.d.mts","names":[],"sources":["../../../../src/components/data-display/assigned-user/AssignedUser.tsx"],"mappings":";;;;;;;KA2BY,iBAAA;EACV,IAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA,GAAW,SAAA;EACX,iBAAA;EACA,UAAA;IACE,YAAA;IACA,IAAA;IACA,OAAA;IACA,OAAA;IACA,IAAA;IACA,MAAA,GAAS,WAAA;IACT,aAAA,GAAgB,kBAAA;IAChB,UAAA,GAAa,WAAA,CAAY,kBAAA;EAAA;AAAA;AAAA,cAIhB,YAAA;EAAgB,IAAA;EAAA,SAAA;EAAA,SAAA;EAAA,QAAA;EAAA,iBAAA;EAAA,QAAA;EAAA;AAAA,GAQ1B,iBAAA,KAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"AssignedUser.d.mts","names":[],"sources":["../../../../src/components/data-display/assigned-user/AssignedUser.tsx"],"mappings":";;;;;;KA2BY,iBAAA;EACV,IAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA,GAAW,SAAA;EACX,iBAAA;EACA,UAAA;IACE,YAAA;IACA,IAAA;IACA,OAAA;IACA,OAAA;IACA,IAAA;IACA,MAAA,GAAS,WAAA;IACT,aAAA,GAAgB,kBAAA;IAChB,UAAA,GAAa,WAAA,CAAY,kBAAA;EAAA;AAAA;AAAA,cAIhB,YAAA;EAAgB,IAAA;EAAA,SAAA;EAAA,SAAA;EAAA,QAAA;EAAA,iBAAA;EAAA,QAAA;EAAA;AAAA,GAQ1B,iBAAA,KAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssignedUser.mjs","names":[],"sources":["../../../../src/components/data-display/assigned-user/AssignedUser.tsx"],"sourcesContent":["// TODO: crear stories\n\nimport type { ReactNode } from 'react';\n\nimport {\n assignedUser,\n assignedUserAvatar,\n assignedUserAvatarImage,\n assignedUserAvatarPlaceholder,\n assignedUserAvatarRoot,\n assignedUserButtonIcon,\n assignedUserButtonIconIcon,\n assignedUserButtonIconIconRaw,\n assignedUserButtonIconIconRawRoot,\n assignedUserButtonIconRoot,\n assignedUserContent,\n assignedUserName,\n assignedUserRoot,\n assignedUserSection,\n} from '@mage-ui/styled-system/recipes';\nimport {\n Avatar,\n type AvatarProps,\n RemovableItem,\n type RemovableItemProps,\n} from '@/components/data-display';\n\nexport type AssignedUserProps = {\n name: string;\n avatarSrc?: string;\n avatarAlt?: string;\n onRemove: () => void;\n children?: ReactNode;\n removeButtonLabel?: string;\n classNames?: {\n assignedUser?: string;\n root?: string;\n section?: string;\n content?: string;\n name?: string;\n avatar?: AvatarProps['classNames'];\n removableItem?: RemovableItemProps['classNames'];\n buttonIcon?: NonNullable<RemovableItemProps['classNames']>['buttonIcon'];\n };\n};\n\nexport const AssignedUser = ({\n name,\n avatarSrc,\n avatarAlt,\n onRemove,\n removeButtonLabel = 'Remove user',\n children,\n classNames,\n}: AssignedUserProps) => {\n return (\n <RemovableItem\n startSlot={\n <Avatar\n name={name}\n src={avatarSrc}\n alt={avatarAlt}\n classNames={{\n avatar: classNames?.avatar?.avatar ?? assignedUserAvatar(),\n root: classNames?.avatar?.root ?? assignedUserAvatarRoot(),\n image: classNames?.avatar?.image ?? assignedUserAvatarImage(),\n placeholder:\n classNames?.avatar?.placeholder ??\n assignedUserAvatarPlaceholder(),\n }}\n />\n }\n onRemove={onRemove}\n removeButtonLabel={removeButtonLabel}\n classNames={{\n container:\n classNames?.removableItem?.container ??\n classNames?.assignedUser ??\n assignedUser(),\n root:\n classNames?.removableItem?.root ??\n classNames?.root ??\n assignedUserRoot(),\n section:\n classNames?.removableItem?.section ??\n classNames?.section ??\n assignedUserSection(),\n content:\n classNames?.removableItem?.content ??\n classNames?.content ??\n assignedUserContent(),\n buttonIcon: {\n buttonIcon:\n classNames?.buttonIcon?.buttonIcon ??\n classNames?.removableItem?.buttonIcon?.buttonIcon ??\n assignedUserButtonIcon(),\n root:\n classNames?.buttonIcon?.root ??\n classNames?.removableItem?.buttonIcon?.root ??\n assignedUserButtonIconRoot(),\n icon:\n classNames?.buttonIcon?.icon ??\n classNames?.removableItem?.buttonIcon?.icon ??\n assignedUserButtonIconIcon(),\n iconRaw: {\n iconRaw:\n classNames?.buttonIcon?.iconRaw?.iconRaw ??\n classNames?.removableItem?.buttonIcon?.iconRaw?.iconRaw ??\n assignedUserButtonIconIconRaw(),\n root:\n classNames?.buttonIcon?.iconRaw?.root ??\n classNames?.removableItem?.buttonIcon?.iconRaw?.root ??\n assignedUserButtonIconIconRawRoot(),\n },\n },\n }}\n >\n <span className={classNames?.name ?? assignedUserName()}>{children}</span>\n </RemovableItem>\n );\n};\n"],"mappings":"glBA8CA,MAAa,GAAgB,CAC3B,OACA,YACA,YACA,WACA,oBAAoB,cACpB,WACA,gBAGE,EAAC,EAAA,CACC,UACE,EAAC,EAAA,CACO,OACN,IAAK,EACL,IAAK,EACL,WAAY,CACV,OAAQ,GAAY,QAAQ,QAAU,GAAoB,CAC1D,KAAM,GAAY,QAAQ,MAAQ,GAAwB,CAC1D,MAAO,GAAY,QAAQ,OAAS,GAAyB,CAC7D,YACE,GAAY,QAAQ,aACpB,GAA+B,CAClC,EACD,CAEM,WACS,oBACnB,WAAY,CACV,UACE,GAAY,eAAe,WAC3B,GAAY,cACZ,GAAc,CAChB,KACE,GAAY,eAAe,MAC3B,GAAY,MACZ,GAAkB,CACpB,QACE,GAAY,eAAe,SAC3B,GAAY,SACZ,GAAqB,CACvB,QACE,GAAY,eAAe,SAC3B,GAAY,SACZ,GAAqB,CACvB,WAAY,CACV,WACE,GAAY,YAAY,YACxB,GAAY,eAAe,YAAY,YACvC,GAAwB,CAC1B,KACE,GAAY,YAAY,MACxB,GAAY,eAAe,YAAY,MACvC,GAA4B,CAC9B,KACE,GAAY,YAAY,MACxB,GAAY,eAAe,YAAY,MACvC,GAA4B,CAC9B,QAAS,CACP,QACE,GAAY,YAAY,SAAS,SACjC,GAAY,eAAe,YAAY,SAAS,SAChD,GAA+B,CACjC,KACE,GAAY,YAAY,SAAS,MACjC,GAAY,eAAe,YAAY,SAAS,MAChD,GAAmC,CACtC,CACF,CACF,UAED,EAAC,OAAA,CAAK,UAAW,GAAY,MAAQ,GAAkB,CAAG,YAAgB,EAC5D"}
1
+ {"version":3,"file":"AssignedUser.mjs","names":[],"sources":["../../../../src/components/data-display/assigned-user/AssignedUser.tsx"],"sourcesContent":["// TODO: crear stories\n\nimport type { ReactNode } from 'react';\n\nimport {\n assignedUser,\n assignedUserAvatar,\n assignedUserAvatarImage,\n assignedUserAvatarPlaceholder,\n assignedUserAvatarRoot,\n assignedUserButtonIcon,\n assignedUserButtonIconIcon,\n assignedUserButtonIconIconRaw,\n assignedUserButtonIconIconRawRoot,\n assignedUserButtonIconRoot,\n assignedUserContent,\n assignedUserName,\n assignedUserRoot,\n assignedUserSection,\n} from '@mage-ui/styled-system/recipes';\nimport {\n Avatar,\n type AvatarProps,\n RemovableItem,\n type RemovableItemProps,\n} from '@/components/data-display';\n\nexport type AssignedUserProps = {\n name: string;\n avatarSrc?: string;\n avatarAlt?: string;\n onRemove: () => void;\n children?: ReactNode;\n removeButtonLabel?: string;\n classNames?: {\n assignedUser?: string;\n root?: string;\n section?: string;\n content?: string;\n name?: string;\n avatar?: AvatarProps['classNames'];\n removableItem?: RemovableItemProps['classNames'];\n buttonIcon?: NonNullable<RemovableItemProps['classNames']>['buttonIcon'];\n };\n};\n\nexport const AssignedUser = ({\n name,\n avatarSrc,\n avatarAlt,\n onRemove,\n removeButtonLabel = 'Remove user',\n children,\n classNames,\n}: AssignedUserProps) => {\n return (\n <RemovableItem\n startSlot={\n <Avatar\n name={name}\n src={avatarSrc}\n alt={avatarAlt}\n classNames={{\n avatar: classNames?.avatar?.avatar ?? assignedUserAvatar(),\n root: classNames?.avatar?.root ?? assignedUserAvatarRoot(),\n image: classNames?.avatar?.image ?? assignedUserAvatarImage(),\n placeholder:\n classNames?.avatar?.placeholder ??\n assignedUserAvatarPlaceholder(),\n }}\n />\n }\n onRemove={onRemove}\n removeButtonLabel={removeButtonLabel}\n classNames={{\n container:\n classNames?.removableItem?.container ??\n classNames?.assignedUser ??\n assignedUser(),\n root:\n classNames?.removableItem?.root ??\n classNames?.root ??\n assignedUserRoot(),\n section:\n classNames?.removableItem?.section ??\n classNames?.section ??\n assignedUserSection(),\n content:\n classNames?.removableItem?.content ??\n classNames?.content ??\n assignedUserContent(),\n buttonIcon: {\n buttonIcon:\n classNames?.buttonIcon?.buttonIcon ??\n classNames?.removableItem?.buttonIcon?.buttonIcon ??\n assignedUserButtonIcon(),\n root:\n classNames?.buttonIcon?.root ??\n classNames?.removableItem?.buttonIcon?.root ??\n assignedUserButtonIconRoot(),\n icon:\n classNames?.buttonIcon?.icon ??\n classNames?.removableItem?.buttonIcon?.icon ??\n assignedUserButtonIconIcon(),\n iconRaw: {\n iconRaw:\n classNames?.buttonIcon?.iconRaw?.iconRaw ??\n classNames?.removableItem?.buttonIcon?.iconRaw?.iconRaw ??\n assignedUserButtonIconIconRaw(),\n root:\n classNames?.buttonIcon?.iconRaw?.root ??\n classNames?.removableItem?.buttonIcon?.iconRaw?.root ??\n assignedUserButtonIconIconRawRoot(),\n },\n },\n }}\n >\n <span className={classNames?.name ?? assignedUserName()}>{children}</span>\n </RemovableItem>\n );\n};\n"],"mappings":"glBA8CA,MAAa,GAAgB,CAC3B,OACA,YACA,YACA,WACA,oBAAoB,cACpB,WACA,gBAGE,EAAC,EAAD,CACE,UACE,EAAC,EAAD,CACQ,OACN,IAAK,EACL,IAAK,EACL,WAAY,CACV,OAAQ,GAAY,QAAQ,QAAU,GAAoB,CAC1D,KAAM,GAAY,QAAQ,MAAQ,GAAwB,CAC1D,MAAO,GAAY,QAAQ,OAAS,GAAyB,CAC7D,YACE,GAAY,QAAQ,aACpB,GAA+B,CAClC,CACD,CAAA,CAEM,WACS,oBACnB,WAAY,CACV,UACE,GAAY,eAAe,WAC3B,GAAY,cACZ,GAAc,CAChB,KACE,GAAY,eAAe,MAC3B,GAAY,MACZ,GAAkB,CACpB,QACE,GAAY,eAAe,SAC3B,GAAY,SACZ,GAAqB,CACvB,QACE,GAAY,eAAe,SAC3B,GAAY,SACZ,GAAqB,CACvB,WAAY,CACV,WACE,GAAY,YAAY,YACxB,GAAY,eAAe,YAAY,YACvC,GAAwB,CAC1B,KACE,GAAY,YAAY,MACxB,GAAY,eAAe,YAAY,MACvC,GAA4B,CAC9B,KACE,GAAY,YAAY,MACxB,GAAY,eAAe,YAAY,MACvC,GAA4B,CAC9B,QAAS,CACP,QACE,GAAY,YAAY,SAAS,SACjC,GAAY,eAAe,YAAY,SAAS,SAChD,GAA+B,CACjC,KACE,GAAY,YAAY,SAAS,MACjC,GAAY,eAAe,YAAY,SAAS,MAChD,GAAmC,CACtC,CACF,CACF,UAED,EAAC,OAAD,CAAM,UAAW,GAAY,MAAQ,GAAkB,CAAG,WAAgB,CAAA,CAC5D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.mjs","names":["Avatar","MantineAvatar"],"sources":["../../../../src/components/data-display/avatar/Avatar.tsx"],"sourcesContent":["import { cx } from '@mage-ui/styled-system/css';\nimport {\n type AvatarVariantProps,\n avatar,\n avatarImage,\n avatarPlaceholder,\n avatarRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Avatar as MantineAvatar } from '@mantine/core';\n\nexport type AvatarProps = {\n name: string;\n src?: string;\n alt?: string;\n classNames?: {\n avatar?: string;\n root?: string;\n image?: string;\n placeholder?: string;\n };\n} & AvatarVariantProps;\n\nexport const Avatar = ({ classNames, name, src, alt }: AvatarProps) => {\n return (\n <MantineAvatar\n name={name}\n src={src}\n alt={alt || name}\n classNames={{\n root: cx(\n classNames?.avatar ?? avatar(),\n classNames?.root ?? avatarRoot(),\n ),\n image: classNames?.image ?? avatarImage(),\n placeholder: classNames?.placeholder ?? avatarPlaceholder(),\n }}\n />\n );\n};\n"],"mappings":"+OAsBA,MAAaA,GAAU,CAAE,aAAY,OAAM,MAAK,SAE5C,EAACC,EAAAA,CACO,OACD,MACL,IAAK,GAAO,EACZ,WAAY,CACV,KAAM,EACJ,GAAY,QAAU,GAAQ,CAC9B,GAAY,MAAQ,GAAY,CACjC,CACD,MAAO,GAAY,OAAS,GAAa,CACzC,YAAa,GAAY,aAAe,GAAmB,CAC5D,EACD"}
1
+ {"version":3,"file":"Avatar.mjs","names":["Avatar","MantineAvatar"],"sources":["../../../../src/components/data-display/avatar/Avatar.tsx"],"sourcesContent":["import { cx } from '@mage-ui/styled-system/css';\nimport {\n type AvatarVariantProps,\n avatar,\n avatarImage,\n avatarPlaceholder,\n avatarRoot,\n} from '@mage-ui/styled-system/recipes';\nimport { Avatar as MantineAvatar } from '@mantine/core';\n\nexport type AvatarProps = {\n name: string;\n src?: string;\n alt?: string;\n classNames?: {\n avatar?: string;\n root?: string;\n image?: string;\n placeholder?: string;\n };\n} & AvatarVariantProps;\n\nexport const Avatar = ({ classNames, name, src, alt }: AvatarProps) => {\n return (\n <MantineAvatar\n name={name}\n src={src}\n alt={alt || name}\n classNames={{\n root: cx(\n classNames?.avatar ?? avatar(),\n classNames?.root ?? avatarRoot(),\n ),\n image: classNames?.image ?? avatarImage(),\n placeholder: classNames?.placeholder ?? avatarPlaceholder(),\n }}\n />\n );\n};\n"],"mappings":"+OAsBA,MAAaA,GAAU,CAAE,aAAY,OAAM,MAAK,SAE5C,EAACC,EAAD,CACQ,OACD,MACL,IAAK,GAAO,EACZ,WAAY,CACV,KAAM,EACJ,GAAY,QAAU,GAAQ,CAC9B,GAAY,MAAQ,GAAY,CACjC,CACD,MAAO,GAAY,OAAS,GAAa,CACzC,YAAa,GAAY,aAAe,GAAmB,CAC5D,CACD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.mjs","names":["Badge","MantineBadge"],"sources":["../../../../src/components/data-display/badge/Badge.tsx"],"sourcesContent":["import type React from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n badge,\n badgeLabel,\n badgeRoot,\n badgeSection,\n} from '@mage-ui/styled-system/recipes';\nimport { Badge as MantineBadge } from '@mantine/core';\n\nexport type BadgeProps = {\n classNames?: {\n badge?: string;\n root?: string;\n section?: string;\n label?: string;\n };\n children?: React.ReactNode;\n endSlot?: React.ReactNode;\n startSlot?: React.ReactNode;\n};\n\nexport const Badge = ({\n children,\n endSlot,\n startSlot,\n classNames,\n}: BadgeProps) => {\n return (\n <MantineBadge\n classNames={{\n root: cx(classNames?.badge ?? badge(), classNames?.root ?? badgeRoot()),\n section: classNames?.section ?? badgeSection(),\n label: classNames?.label ?? badgeLabel(),\n }}\n leftSection={startSlot}\n rightSection={endSlot}\n >\n {children}\n </MantineBadge>\n );\n};\n"],"mappings":"sOAuBA,MAAaA,GAAS,CACpB,WACA,UACA,YACA,gBAGE,EAACC,EAAAA,CACC,WAAY,CACV,KAAM,EAAG,GAAY,OAAS,GAAO,CAAE,GAAY,MAAQ,GAAW,CAAC,CACvE,QAAS,GAAY,SAAW,GAAc,CAC9C,MAAO,GAAY,OAAS,GAAY,CACzC,CACD,YAAa,EACb,aAAc,EAEb,YACY"}
1
+ {"version":3,"file":"Badge.mjs","names":["Badge","MantineBadge"],"sources":["../../../../src/components/data-display/badge/Badge.tsx"],"sourcesContent":["import type React from 'react';\n\nimport { cx } from '@mage-ui/styled-system/css';\nimport {\n badge,\n badgeLabel,\n badgeRoot,\n badgeSection,\n} from '@mage-ui/styled-system/recipes';\nimport { Badge as MantineBadge } from '@mantine/core';\n\nexport type BadgeProps = {\n classNames?: {\n badge?: string;\n root?: string;\n section?: string;\n label?: string;\n };\n children?: React.ReactNode;\n endSlot?: React.ReactNode;\n startSlot?: React.ReactNode;\n};\n\nexport const Badge = ({\n children,\n endSlot,\n startSlot,\n classNames,\n}: BadgeProps) => {\n return (\n <MantineBadge\n classNames={{\n root: cx(classNames?.badge ?? badge(), classNames?.root ?? badgeRoot()),\n section: classNames?.section ?? badgeSection(),\n label: classNames?.label ?? badgeLabel(),\n }}\n leftSection={startSlot}\n rightSection={endSlot}\n >\n {children}\n </MantineBadge>\n );\n};\n"],"mappings":"sOAuBA,MAAaA,GAAS,CACpB,WACA,UACA,YACA,gBAGE,EAACC,EAAD,CACE,WAAY,CACV,KAAM,EAAG,GAAY,OAAS,GAAO,CAAE,GAAY,MAAQ,GAAW,CAAC,CACvE,QAAS,GAAY,SAAW,GAAc,CAC9C,MAAO,GAAY,OAAS,GAAY,CACzC,CACD,YAAa,EACb,aAAc,EAEb,WACY,CAAA"}