@povio/ui 2.2.0 → 2.2.2

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 (283) hide show
  1. package/README.md +9 -2
  2. package/dist/{rolldown_runtime.js → _virtual/rolldown:runtime.js} +17 -2
  3. package/dist/{HighlightOn.js → assets/icons/HighlightOn.js} +1 -1
  4. package/dist/{TextColor.js → assets/icons/TextColor.js} +1 -1
  5. package/dist/{Breadcrumbs.js → components/Breadcrumbs/Breadcrumbs.js} +11 -12
  6. package/dist/components/Menu/Menu.d.ts +0 -1
  7. package/dist/{Menu2.js → components/Menu/Menu.js} +1 -1
  8. package/dist/components/Menu/MenuDesktop.d.ts +1 -1
  9. package/dist/components/Menu/MenuDesktop.js +12 -0
  10. package/dist/{MenuItem.js → components/Menu/MenuItem.js} +4 -4
  11. package/dist/{MenuMobile.js → components/Menu/MenuMobile.js} +6 -7
  12. package/dist/{MenuPopover.js → components/Menu/MenuPopover.js} +10 -9
  13. package/dist/components/buttons/Button/Button.d.ts +3 -3
  14. package/dist/components/buttons/Button/Button.js +64 -0
  15. package/dist/{button.cva.js → components/buttons/Button/button.cva.js} +3 -12
  16. package/dist/components/buttons/IconButton/IconButton.d.ts +1 -1
  17. package/dist/components/buttons/IconButton/IconButton.js +17 -0
  18. package/dist/{InlineIconButton.js → components/buttons/InlineIconButton/InlineIconButton.js} +2 -2
  19. package/dist/components/buttons/PillButton/PillButton.d.ts +3 -2
  20. package/dist/components/buttons/PillButton/PillButton.js +32 -0
  21. package/dist/{pillButton.cva.js → components/buttons/PillButton/pillButton.cva.js} +4 -4
  22. package/dist/{SplitButton.js → components/buttons/SplitButton/SplitButton.js} +5 -5
  23. package/dist/components/buttons/TextButton/TextButton.d.ts +0 -1
  24. package/dist/{TextButton.js → components/buttons/TextButton/TextButton.js} +2 -3
  25. package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -1
  26. package/dist/{ToggleButton.js → components/buttons/ToggleButton/ToggleButton.js} +2 -3
  27. package/dist/components/buttons/shared/ButtonContent.d.ts +3 -5
  28. package/dist/components/buttons/shared/ButtonContent.js +35 -0
  29. package/dist/components/buttons/shared/buttonContent.cva.d.ts +4 -0
  30. package/dist/components/buttons/shared/buttonContent.cva.js +36 -0
  31. package/dist/{Checkbox.js → components/inputs/Checkbox/Checkbox.js} +8 -8
  32. package/dist/{CheckboxCheckmark2.js → components/inputs/Checkbox/CheckboxCheckmark.js} +6 -7
  33. package/dist/{checkbox.cva.js → components/inputs/Checkbox/checkbox.cva.js} +2 -2
  34. package/dist/{DatePicker.js → components/inputs/DateTime/DatePicker/DatePicker.js} +13 -17
  35. package/dist/{DateRangePicker.js → components/inputs/DateTime/DateRangePicker/DateRangePicker.js} +16 -23
  36. package/dist/{DateTimePicker.js → components/inputs/DateTime/DateTimePicker/DateTimePicker.js} +12 -14
  37. package/dist/{TimePicker.js → components/inputs/DateTime/TimePicker/TimePicker.js} +10 -10
  38. package/dist/{Calendar2.js → components/inputs/DateTime/shared/Calendar.js} +1 -1
  39. package/dist/{CalendarCell.js → components/inputs/DateTime/shared/CalendarCell.js} +2 -2
  40. package/dist/{CalendarGrid.js → components/inputs/DateTime/shared/CalendarGrid.js} +2 -2
  41. package/dist/{CalendarHeader.js → components/inputs/DateTime/shared/CalendarHeader.js} +5 -5
  42. package/dist/{CalendarSelectHeader.js → components/inputs/DateTime/shared/CalendarSelectHeader.js} +9 -9
  43. package/dist/{DateField.js → components/inputs/DateTime/shared/DateField.js} +1 -1
  44. package/dist/{DatePickerInput.js → components/inputs/DateTime/shared/DatePickerInput.js} +73 -88
  45. package/dist/{DateTimeDialog.js → components/inputs/DateTime/shared/DateTimeDialog.js} +4 -4
  46. package/dist/{DateTimeDialogFooter.js → components/inputs/DateTime/shared/DateTimeDialogFooter.js} +2 -2
  47. package/dist/{MonthPicker.js → components/inputs/DateTime/shared/MonthPicker.js} +1 -1
  48. package/dist/{TimePickerForm.js → components/inputs/DateTime/shared/TimePickerForm.js} +6 -6
  49. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +88 -0
  50. package/dist/{YearPicker.js → components/inputs/DateTime/shared/YearPicker.js} +2 -2
  51. package/dist/{FileUpload.js → components/inputs/File/FileUpload.js} +10 -10
  52. package/dist/{InputUpload.js → components/inputs/File/InputUpload.js} +7 -7
  53. package/dist/{FileUploadContent.js → components/inputs/File/shared/FileUploadContent.js} +1 -1
  54. package/dist/{FileUploadContentEmpty.js → components/inputs/File/shared/FileUploadContentEmpty.js} +4 -4
  55. package/dist/{FileUploadContentError.js → components/inputs/File/shared/FileUploadContentError.js} +7 -7
  56. package/dist/{FileUploadContentFilled.js → components/inputs/File/shared/FileUploadContentFilled.js} +8 -8
  57. package/dist/{FileUploadContentLoading.js → components/inputs/File/shared/FileUploadContentLoading.js} +7 -7
  58. package/dist/{InputUploadContent.js → components/inputs/File/shared/InputUploadContent.js} +9 -9
  59. package/dist/{InputUploadFilled.js → components/inputs/File/shared/InputUploadFilled.js} +6 -6
  60. package/dist/{ProgressBar.js → components/inputs/File/shared/ProgressBar.js} +1 -1
  61. package/dist/{fileUpload.cva.js → components/inputs/File/shared/fileUpload.cva.js} +1 -1
  62. package/dist/{inputUploadButton.cva.js → components/inputs/File/shared/inputUploadButton.cva.js} +1 -1
  63. package/dist/{FormField.js → components/inputs/FormField/FormField.js} +1 -1
  64. package/dist/components/inputs/FormField/FormFieldError.js +11 -0
  65. package/dist/{FormFieldHeader.js → components/inputs/FormField/FormFieldHeader.js} +3 -3
  66. package/dist/{FormFieldHeaderClose.js → components/inputs/FormField/FormFieldHeaderClose.js} +2 -2
  67. package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -1
  68. package/dist/components/inputs/FormField/FormFieldLabel.js +25 -0
  69. package/dist/{NumberInput.js → components/inputs/Input/NumberInput/NumberInput.js} +35 -32
  70. package/dist/{PasswordInput.js → components/inputs/Input/PasswordInput/PasswordInput.js} +4 -4
  71. package/dist/{TextArea.js → components/inputs/Input/TextArea/TextArea.js} +23 -15
  72. package/dist/{TextInput.js → components/inputs/Input/TextInput/TextInput.js} +36 -33
  73. package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -2
  74. package/dist/components/inputs/Input/shared/InputContent.js +74 -0
  75. package/dist/{Form.js → components/inputs/Inputs/Form.js} +4 -4
  76. package/dist/{InputItem.js → components/inputs/Inputs/InputItem.js} +15 -15
  77. package/dist/{RadioGroup.js → components/inputs/RadioGroup/RadioGroup.js} +8 -9
  78. package/dist/{radio.cva.js → components/inputs/RadioGroup/radio.cva.js} +2 -2
  79. package/dist/{Autocomplete.js → components/inputs/Selection/Autocomplete/Autocomplete.js} +2 -2
  80. package/dist/{QueryAutocomplete.js → components/inputs/Selection/Autocomplete/QueryAutocomplete.js} +1 -1
  81. package/dist/{Select.js → components/inputs/Selection/Select/Select.js} +2 -2
  82. package/dist/{SelectBase.js → components/inputs/Selection/shared/SelectBase.js} +2 -2
  83. package/dist/{SelectDesktop.js → components/inputs/Selection/shared/SelectDesktop.js} +21 -9
  84. package/dist/{SelectInput.js → components/inputs/Selection/shared/SelectInput.js} +31 -48
  85. package/dist/{SelectInputTags.js → components/inputs/Selection/shared/SelectInputTags.js} +1 -1
  86. package/dist/{SelectListBox.js → components/inputs/Selection/shared/SelectListBox.js} +1 -1
  87. package/dist/{SelectListBoxItem.js → components/inputs/Selection/shared/SelectListBoxItem.js} +2 -2
  88. package/dist/{SelectListBoxItemSelectAll.js → components/inputs/Selection/shared/SelectListBoxItemSelectAll.js} +2 -2
  89. package/dist/{SelectListBoxLoadingItem.js → components/inputs/Selection/shared/SelectListBoxLoadingItem.js} +3 -3
  90. package/dist/{SelectListBoxSelectionBar.js → components/inputs/Selection/shared/SelectListBoxSelectionBar.js} +2 -2
  91. package/dist/{SelectMobile.js → components/inputs/Selection/shared/SelectMobile.js} +6 -6
  92. package/dist/{select.context.js → components/inputs/Selection/shared/select.context.js} +2 -2
  93. package/dist/{Slider.js → components/inputs/Slider/Slider.js} +6 -6
  94. package/dist/{TextEditor.js → components/inputs/TextEditor/TextEditor.js} +14 -7
  95. package/dist/{ColorPickerDropdown.js → components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js} +3 -3
  96. package/dist/{HyperlinkAction.js → components/inputs/TextEditor/Toolbar/HyperlinkAction.js} +6 -6
  97. package/dist/{TextAlignSelect.js → components/inputs/TextEditor/Toolbar/TextAlignSelect.js} +6 -6
  98. package/dist/{TextColorSelect.js → components/inputs/TextEditor/Toolbar/TextColorSelect.js} +2 -2
  99. package/dist/{TextHighlightSelect.js → components/inputs/TextEditor/Toolbar/TextHighlightSelect.js} +3 -3
  100. package/dist/{TextListActions.js → components/inputs/TextEditor/Toolbar/TextListActions.js} +4 -4
  101. package/dist/{TextMarksActions.js → components/inputs/TextEditor/Toolbar/TextMarksActions.js} +6 -6
  102. package/dist/{TextStyleSelect.js → components/inputs/TextEditor/Toolbar/TextStyleSelect.js} +3 -3
  103. package/dist/{Toggle.js → components/inputs/Toggle/Toggle.js} +8 -9
  104. package/dist/{toggle.cva.js → components/inputs/Toggle/toggle.cva.js} +2 -2
  105. package/dist/{CheckContent.js → components/inputs/shared/CheckContent.js} +4 -4
  106. package/dist/components/inputs/shared/InputClear.d.ts +2 -1
  107. package/dist/components/inputs/shared/InputClear.js +19 -0
  108. package/dist/{TooltipWrapper.js → components/inputs/shared/TooltipWrapper.js} +1 -1
  109. package/dist/components/inputs/shared/input.cva.d.ts +4 -4
  110. package/dist/{input.cva.js → components/inputs/shared/input.cva.js} +38 -29
  111. package/dist/components/inputs/shared/label.cva.d.ts +2 -2
  112. package/dist/components/inputs/shared/label.cva.js +64 -0
  113. package/dist/{Accordion.js → components/navigation/Accordion/Accordion.js} +2 -2
  114. package/dist/{AccordionItem.js → components/navigation/Accordion/AccordionItem.js} +12 -13
  115. package/dist/{Stepper.js → components/navigation/Stepper/Stepper.js} +2 -2
  116. package/dist/{StepperItem.js → components/navigation/Stepper/StepperItem.js} +8 -9
  117. package/dist/{StepperSeparator.js → components/navigation/Stepper/StepperSeparator.js} +2 -2
  118. package/dist/{outline.clsx.js → components/outline.clsx.js} +1 -1
  119. package/dist/components/overlays/ActionModal/ActionModal.d.ts +6 -1
  120. package/dist/{ActionModal.js → components/overlays/ActionModal/ActionModal.js} +10 -9
  121. package/dist/{BottomSheet.js → components/overlays/BottomSheet/BottomSheet.js} +7 -7
  122. package/dist/{Drawer.js → components/overlays/Drawer/Drawer.js} +1 -1
  123. package/dist/components/overlays/Modal/Modal.d.ts +2 -1
  124. package/dist/{Modal.js → components/overlays/Modal/Modal.js} +9 -9
  125. package/dist/{ResponsivePopover.js → components/overlays/ResponsivePopover/ResponsivePopover.js} +4 -4
  126. package/dist/{Tooltip.js → components/overlays/Tooltip/Tooltip.js} +11 -11
  127. package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +3 -2
  128. package/dist/{TooltipEllipsis.js → components/overlays/Tooltip/TooltipEllipsis.js} +2 -1
  129. package/dist/{Segment.js → components/segment/Segment.js} +5 -6
  130. package/dist/{SegmentItem.js → components/segment/SegmentItem.js} +4 -4
  131. package/dist/{Pagination.js → components/shared/pagination/Pagination.js} +3 -3
  132. package/dist/{PaginationList.js → components/shared/pagination/PaginationList.js} +6 -6
  133. package/dist/{Alert.js → components/status/Alert/Alert.js} +7 -8
  134. package/dist/{Loader.js → components/status/Loader/Loader.js} +1 -1
  135. package/dist/{Toast.js → components/status/Toast/Toast.js} +10 -11
  136. package/dist/{toast.cva.js → components/status/Toast/toast.cva.js} +1 -1
  137. package/dist/{CellText.js → components/table/CellText.js} +1 -1
  138. package/dist/{ColumnConfig.js → components/table/ColumnConfig.js} +5 -5
  139. package/dist/{HeaderText.js → components/table/HeaderText.js} +1 -1
  140. package/dist/{InfiniteTable.js → components/table/InfiniteTable.js} +3 -3
  141. package/dist/{PaginatedTable.js → components/table/PaginatedTable.js} +2 -2
  142. package/dist/{Table.js → components/table/Table.js} +25 -20
  143. package/dist/{table.cva.js → components/table/table.cva.js} +1 -1
  144. package/dist/{Link2.js → components/text/Link/Link.js} +4 -4
  145. package/dist/{link.cva.js → components/text/Link/link.cva.js} +1 -1
  146. package/dist/components/text/Tag/Tag.d.ts +3 -1
  147. package/dist/components/text/Tag/Tag.js +38 -0
  148. package/dist/{tag.cva.js → components/text/Tag/tag.cva.js} +1 -1
  149. package/dist/components/text/Typography/Typography.d.ts +1 -1
  150. package/dist/{Typography.js → components/text/Typography/Typography.js} +3 -3
  151. package/dist/{confirmation.context.js → config/confirmation.context.js} +1 -1
  152. package/dist/config/i18n.js +8 -0
  153. package/dist/{theme.context.js → config/theme.context.js} +1 -1
  154. package/dist/config/uiConfig.context.d.ts +4 -0
  155. package/dist/{uiConfig.context.js → config/uiConfig.context.js} +13 -2
  156. package/dist/config/uiStyle.context.d.ts +7 -3
  157. package/dist/config/uiStyle.context.js +28 -0
  158. package/dist/{dynamicColumns.js → helpers/dynamicColumns.js} +3 -3
  159. package/dist/{dynamicInputs.js → helpers/dynamicInputs.js} +2 -2
  160. package/dist/{useAutosave.js → hooks/useAutosave.js} +2 -2
  161. package/dist/{useDeepCompare.js → hooks/useDeepCompare.js} +1 -1
  162. package/dist/{useFilters.js → hooks/useFilters.js} +1 -1
  163. package/dist/{useForm.js → hooks/useForm.js} +1 -1
  164. package/dist/{useFormAutosave.js → hooks/useFormAutosave.js} +2 -2
  165. package/dist/{usePagination.js → hooks/usePagination.js} +1 -1
  166. package/dist/{useSorting.js → hooks/useSorting.js} +1 -1
  167. package/dist/{useStateAndRef.js → hooks/useStateAndRef.js} +1 -1
  168. package/dist/{useTableNav.js → hooks/useTableNav.js} +1 -1
  169. package/dist/index.js +137 -137
  170. package/dist/node_modules/.pnpm/motion@12.23.28_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/motion/dist/es/react.js +10 -0
  171. package/dist/text-editor.js +1 -1
  172. package/dist/tw-ui-plugin.d.ts +3 -0
  173. package/dist/utils/compoundMapper.d.ts +1 -1
  174. package/package.json +25 -26
  175. package/dist/Button.js +0 -54
  176. package/dist/ButtonContent.js +0 -28
  177. package/dist/FormFieldError.js +0 -11
  178. package/dist/FormFieldLabel.js +0 -32
  179. package/dist/IconButton.js +0 -12
  180. package/dist/InputClear.js +0 -19
  181. package/dist/InputContent.js +0 -94
  182. package/dist/MenuDesktop.js +0 -54
  183. package/dist/PillButton.js +0 -37
  184. package/dist/Tag.js +0 -42
  185. package/dist/TimePickerInput.js +0 -105
  186. package/dist/buttonContent.cva.js +0 -10
  187. package/dist/i18n.js +0 -8
  188. package/dist/label.cva.js +0 -92
  189. package/dist/react.js +0 -6
  190. package/dist/uiStyle.context.js +0 -16
  191. /package/dist/{AlignCenter.js → assets/icons/AlignCenter.js} +0 -0
  192. /package/dist/{AlignLeft.js → assets/icons/AlignLeft.js} +0 -0
  193. /package/dist/{AlignLeftRight.js → assets/icons/AlignLeftRight.js} +0 -0
  194. /package/dist/{AlignRight.js → assets/icons/AlignRight.js} +0 -0
  195. /package/dist/{ArrowDropDown.js → assets/icons/ArrowDropDown.js} +0 -0
  196. /package/dist/{ArrowDropUp.js → assets/icons/ArrowDropUp.js} +0 -0
  197. /package/dist/{ArrowLeft.js → assets/icons/ArrowLeft.js} +0 -0
  198. /package/dist/{ArrowRight.js → assets/icons/ArrowRight.js} +0 -0
  199. /package/dist/{Bold.js → assets/icons/Bold.js} +0 -0
  200. /package/dist/{BulletedList.js → assets/icons/BulletedList.js} +0 -0
  201. /package/dist/{Calendar.js → assets/icons/Calendar.js} +0 -0
  202. /package/dist/{Check.js → assets/icons/Check.js} +0 -0
  203. /package/dist/{CheckCircle.js → assets/icons/CheckCircle.js} +0 -0
  204. /package/dist/{CheckboxCheckmark.js → assets/icons/CheckboxCheckmark.js} +0 -0
  205. /package/dist/{CheckboxIndeterminate.js → assets/icons/CheckboxIndeterminate.js} +0 -0
  206. /package/dist/{ChevronDown.js → assets/icons/ChevronDown.js} +0 -0
  207. /package/dist/{ChevronLeft.js → assets/icons/ChevronLeft.js} +0 -0
  208. /package/dist/{ChevronRight.js → assets/icons/ChevronRight.js} +0 -0
  209. /package/dist/{ChevronUp.js → assets/icons/ChevronUp.js} +0 -0
  210. /package/dist/{ChevronsLeft.js → assets/icons/ChevronsLeft.js} +0 -0
  211. /package/dist/{ChevronsRight.js → assets/icons/ChevronsRight.js} +0 -0
  212. /package/dist/{Clock.js → assets/icons/Clock.js} +0 -0
  213. /package/dist/{Close.js → assets/icons/Close.js} +0 -0
  214. /package/dist/{DateTime.js → assets/icons/DateTime.js} +0 -0
  215. /package/dist/{DragIndicator.js → assets/icons/DragIndicator.js} +0 -0
  216. /package/dist/{File.js → assets/icons/File.js} +0 -0
  217. /package/dist/{Highlight.js → assets/icons/Highlight.js} +0 -0
  218. /package/dist/{Home.js → assets/icons/Home.js} +0 -0
  219. /package/dist/{Info.js → assets/icons/Info.js} +0 -0
  220. /package/dist/{Italic.js → assets/icons/Italic.js} +0 -0
  221. /package/dist/{Link.js → assets/icons/Link.js} +0 -0
  222. /package/dist/{Menu.js → assets/icons/Menu.js} +0 -0
  223. /package/dist/{NumberedList.js → assets/icons/NumberedList.js} +0 -0
  224. /package/dist/{PointerHorizontal.js → assets/icons/PointerHorizontal.js} +0 -0
  225. /package/dist/{PointerVertical.js → assets/icons/PointerVertical.js} +0 -0
  226. /package/dist/{Send.js → assets/icons/Send.js} +0 -0
  227. /package/dist/{Strikethrough.js → assets/icons/Strikethrough.js} +0 -0
  228. /package/dist/{Today.js → assets/icons/Today.js} +0 -0
  229. /package/dist/{Underlined.js → assets/icons/Underlined.js} +0 -0
  230. /package/dist/{Upload.js → assets/icons/Upload.js} +0 -0
  231. /package/dist/{Visibility.js → assets/icons/Visibility.js} +0 -0
  232. /package/dist/{VisibilityOff.js → assets/icons/VisibilityOff.js} +0 -0
  233. /package/dist/{WarningFilled.js → assets/icons/WarningFilled.js} +0 -0
  234. /package/dist/{translation.js → assets/locales/en/translation.json.js} +0 -0
  235. /package/dist/{translation2.js → assets/locales/sl/translation.json.js} +0 -0
  236. /package/dist/{breadcrumbs.cva.js → components/Breadcrumbs/breadcrumbs.cva.js} +0 -0
  237. /package/dist/{menu.cva.js → components/Menu/menu.cva.js} +0 -0
  238. /package/dist/{DateSegmentItem.js → components/inputs/DateTime/shared/DateSegmentItem.js} +0 -0
  239. /package/dist/{RangeCalendar.js → components/inputs/DateTime/shared/RangeCalendar.js} +0 -0
  240. /package/dist/{TimeField.js → components/inputs/DateTime/shared/TimeField.js} +0 -0
  241. /package/dist/{FileUploadContainer.js → components/inputs/File/FileUploadContainer.js} +0 -0
  242. /package/dist/{FileCard.js → components/inputs/File/shared/FileCard.js} +0 -0
  243. /package/dist/{FileCardList.js → components/inputs/File/shared/FileCardList.js} +0 -0
  244. /package/dist/{Inputs.js → components/inputs/Inputs/Inputs.js} +0 -0
  245. /package/dist/{useSelectItems.js → components/inputs/Selection/shared/useSelectItems.js} +0 -0
  246. /package/dist/{ColorPicker.js → components/inputs/TextEditor/Toolbar/ColorPicker.js} +0 -0
  247. /package/dist/{TextEditorToolbar.js → components/inputs/TextEditor/Toolbar/TextEditorToolbar.js} +0 -0
  248. /package/dist/{textEditor.types.js → components/inputs/TextEditor/textEditor.types.js} +0 -0
  249. /package/dist/{accordion.cva.js → components/navigation/Accordion/accordion.cva.js} +0 -0
  250. /package/dist/{stepper.cva.js → components/navigation/Stepper/stepper.cva.js} +0 -0
  251. /package/dist/{modal.cva.js → components/overlays/Modal/modal.cva.js} +0 -0
  252. /package/dist/{tooltip.cva.js → components/overlays/Tooltip/tooltip.cva.js} +0 -0
  253. /package/dist/{segment.cva.js → components/segment/segment.cva.js} +0 -0
  254. /package/dist/{minWidth.cva.js → components/shared/pagination/minWidth.cva.js} +0 -0
  255. /package/dist/{alert.cva.js → components/status/Alert/alert.cva.js} +0 -0
  256. /package/dist/{loader.cva.js → components/status/Loader/loader.cva.js} +0 -0
  257. /package/dist/{useToast.js → components/status/Toast/useToast.js} +0 -0
  258. /package/dist/{status.cva.js → components/status/shared/status.cva.js} +0 -0
  259. /package/dist/{typography.cva.js → components/text/Typography/typography.cva.js} +0 -0
  260. /package/dist/{link.context.js → config/link.context.js} +0 -0
  261. /package/dist/{router.context.js → config/router.context.js} +0 -0
  262. /package/dist/{useBreakpoint.js → hooks/useBreakpoint.js} +0 -0
  263. /package/dist/{useDebounceCallback.js → hooks/useDebounceCallback.js} +0 -0
  264. /package/dist/{useIntersectionObserver.js → hooks/useIntersectionObserver.js} +0 -0
  265. /package/dist/{useLocalStorage.js → hooks/useLocalStorage.js} +0 -0
  266. /package/dist/{useLongPressRepeat.js → hooks/useLongPressRepeat.js} +0 -0
  267. /package/dist/{useScrollableListBox.js → hooks/useScrollableListBox.js} +0 -0
  268. /package/dist/{useTableColumnConfig.js → hooks/useTableColumnConfig.js} +0 -0
  269. /package/dist/{useTranslationMemo.js → hooks/useTranslationMemo.js} +0 -0
  270. /package/dist/{array.utils.js → utils/array.utils.js} +0 -0
  271. /package/dist/{compoundMapper.js → utils/compoundMapper.js} +0 -0
  272. /package/dist/{date-time.utils.js → utils/date-time.utils.js} +0 -0
  273. /package/dist/{date.utils.js → utils/date.utils.js} +0 -0
  274. /package/dist/{dom.utils.js → utils/dom.utils.js} +0 -0
  275. /package/dist/{file.utils.js → utils/file.utils.js} +0 -0
  276. /package/dist/{isEqual.js → utils/isEqual.js} +0 -0
  277. /package/dist/{logger.js → utils/logger.js} +0 -0
  278. /package/dist/{object.utils.js → utils/object.utils.js} +0 -0
  279. /package/dist/{queries.utils.js → utils/queries.utils.js} +0 -0
  280. /package/dist/{rest.utils.js → utils/rest.utils.js} +0 -0
  281. /package/dist/{routing.utils.js → utils/routing.utils.js} +0 -0
  282. /package/dist/{string.utils.js → utils/string.utils.js} +0 -0
  283. /package/dist/{zod.utils.js → utils/zod.utils.js} +0 -0
package/README.md CHANGED
@@ -4,7 +4,7 @@ UI Components that match Povio's Atlas Design System.
4
4
 
5
5
  ## Installation
6
6
 
7
- `yarn add @povio/ui`
7
+ `pnpm add @povio/ui`
8
8
 
9
9
  ## Versioning
10
10
 
@@ -32,13 +32,20 @@ This is required for buttons to behave as expected. It is based on [Tailwind Upg
32
32
  In order for Tailwind to also compile classes for @povio/ui package, you need to include @source directive in Tailwind config.
33
33
  In your globals.css add (make sure path is correct):
34
34
  ```css
35
- @source "../../../../node_modules/@povio/ui/dist";
35
+ @source "../../node_modules/@povio/ui/dist";
36
36
  ```
37
37
 
38
38
  ### React Aria
39
39
 
40
40
  We are using `react-aria-components` for our UI components including their plugin for Tailwind that makes classes for modifiers a bit shorter. As such, make sure to install and setup [`tailwindcss-react-aria-components`](https://www.npmjs.com/package/tailwindcss-react-aria-components)
41
41
 
42
+ ### Custom Tailwind plugin
43
+
44
+ We also use a custom tailwind plugin to shorten some selectors inside the @povio/ui package. Install it by adding the following line to your `base.css`.
45
+ ```css
46
+ @plugin "@povio/ui/tw-ui-plugin";
47
+ ```
48
+
42
49
  ### Translations
43
50
 
44
51
  We're using `i18next` for translations. Make sure the package versions match in your project. Out of sync major version might cause issues.
@@ -2,6 +2,15 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (all, symbols) => {
6
+ let target = {};
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
12
+ return target;
13
+ };
5
14
  var __copyProps = (to, from, except, desc) => {
6
15
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
7
16
  key = keys[i];
@@ -12,5 +21,11 @@ var __copyProps = (to, from, except, desc) => {
12
21
  }
13
22
  return to;
14
23
  };
15
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
16
- export { __reExport };
24
+ var __reExport = (target, mod, secondTarget, symbols) => {
25
+ if (symbols) {
26
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
27
+ secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
28
+ }
29
+ __copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
30
+ };
31
+ export { __export, __reExport };
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- const HighlightOnIcon = ({ highlightColor,...props }) => /* @__PURE__ */ jsx("svg", {
2
+ const HighlightOnIcon = ({ highlightColor, ...props }) => /* @__PURE__ */ jsx("svg", {
3
3
  xmlns: "http://www.w3.org/2000/svg",
4
4
  fill: "none",
5
5
  viewBox: "0 0 24 24",
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- const TextColorIcon = ({ textColor,...props }) => /* @__PURE__ */ jsxs("svg", {
2
+ const TextColorIcon = ({ textColor, ...props }) => /* @__PURE__ */ jsxs("svg", {
3
3
  xmlns: "http://www.w3.org/2000/svg",
4
4
  fill: "none",
5
5
  viewBox: "0 0 25 24",
@@ -1,21 +1,20 @@
1
- import { ChevronRightIcon } from "./ChevronRight.js";
1
+ import { ChevronRightIcon } from "../../assets/icons/ChevronRight.js";
2
2
  import { breadcrumbChevron, breadcrumbIcon, breadcrumbItem, breadcrumbSegment, breadcrumbsCva } from "./breadcrumbs.cva.js";
3
- import { UIStyle } from "./uiStyle.context.js";
4
- import { MenuDesktop } from "./MenuDesktop.js";
5
- import { Typography } from "./Typography.js";
6
- import { Tooltip as Tooltip$1 } from "./Tooltip.js";
7
- import { LinkContext } from "./link.context.js";
3
+ import { UIStyle } from "../../config/uiStyle.context.js";
4
+ import { MenuDesktop } from "../Menu/MenuDesktop.js";
5
+ import { Typography } from "../text/Typography/Typography.js";
6
+ import { Tooltip as Tooltip$1 } from "../overlays/Tooltip/Tooltip.js";
7
+ import { LinkContext } from "../../config/link.context.js";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { clsx } from "clsx";
10
10
  import { useLayoutEffect, useRef, useState } from "react";
11
11
  import { Breadcrumb, Breadcrumbs, Button, Link } from "react-aria-components";
12
12
  const Breadcrumbs$1 = ({ items, className, onAction, iconOnly = false }) => {
13
- const uiStyle = UIStyle.useConfig();
14
- const breadcrumbsCva$1 = uiStyle?.breadcrumbs?.cva ?? breadcrumbsCva;
15
- const breadcrumbItem$1 = uiStyle?.breadcrumbs?.itemCva ?? breadcrumbItem;
16
- const breadcrumbSegmentCva = uiStyle?.breadcrumbs?.segmentCva ?? breadcrumbSegment;
17
- const breadcrumbChevronCva = uiStyle?.breadcrumbs?.chevronCva ?? breadcrumbChevron;
18
- const breadcrumbIconCva = uiStyle?.breadcrumbs?.iconCva ?? breadcrumbIcon;
13
+ const breadcrumbsCva$1 = UIStyle.useCva("breadcrumbs.cva", breadcrumbsCva);
14
+ const breadcrumbItem$1 = UIStyle.useCva("breadcrumbs.itemCva", breadcrumbItem);
15
+ const breadcrumbSegmentCva = UIStyle.useCva("breadcrumbs.segmentCva", breadcrumbSegment);
16
+ const breadcrumbChevronCva = UIStyle.useCva("breadcrumbs.chevronCva", breadcrumbChevron);
17
+ const breadcrumbIconCva = UIStyle.useCva("breadcrumbs.iconCva", breadcrumbIcon);
19
18
  const containerRef = useRef(null);
20
19
  const [isOverflowing, setIsOverflowing] = useState(items.length <= 2 ? false : null);
21
20
  useLayoutEffect(() => {
@@ -9,7 +9,6 @@ export interface MenuItem extends Omit<MenuItemProps, "aria-label" | "textValue"
9
9
  export interface MenuProps {
10
10
  trigger: ReactElement;
11
11
  items: MenuItem[];
12
- triggerOnHover?: boolean;
13
12
  closeDelay?: number;
14
13
  onAction?: (key: Key, e: any) => void;
15
14
  }
@@ -1,6 +1,6 @@
1
1
  import { MenuDesktop } from "./MenuDesktop.js";
2
2
  import { MenuMobile } from "./MenuMobile.js";
3
- import { useBreakpoint } from "./useBreakpoint.js";
3
+ import { useBreakpoint } from "../../hooks/useBreakpoint.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  const Menu = (props) => {
6
6
  if (useBreakpoint("md")) return /* @__PURE__ */ jsx(MenuDesktop, { ...props });
@@ -1,2 +1,2 @@
1
1
  import { MenuProps } from './Menu';
2
- export declare const MenuDesktop: ({ trigger, items, closeDelay, triggerOnHover, onAction, ...props }: MenuProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const MenuDesktop: ({ trigger, items, onAction, ...props }: MenuProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { MenuPopover } from "./MenuPopover.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { MenuTrigger } from "react-aria-components";
4
+ const MenuDesktop = ({ trigger, items, onAction, ...props }) => {
5
+ return /* @__PURE__ */ jsxs(MenuTrigger, { children: [trigger, /* @__PURE__ */ jsx(MenuPopover, {
6
+ ...props,
7
+ offset: 0,
8
+ items,
9
+ onAction
10
+ })] });
11
+ };
12
+ export { MenuDesktop };
@@ -1,12 +1,12 @@
1
- import { ArrowRightIcon } from "./ArrowRight.js";
1
+ import { ArrowRightIcon } from "../../assets/icons/ArrowRight.js";
2
2
  import { menuItemCva } from "./menu.cva.js";
3
- import { UIStyle } from "./uiStyle.context.js";
3
+ import { UIStyle } from "../../config/uiStyle.context.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { clsx } from "clsx";
6
6
  import { MenuItem } from "react-aria-components";
7
- const MenuItem$1 = ({ label, content, children, className,...item }) => {
7
+ const MenuItem$1 = ({ label, content, children, className, ...item }) => {
8
8
  const hasSubmenu = !!children && children?.length > 0;
9
- const menuItemCva$1 = UIStyle.useConfig()?.menu?.itemCva ?? menuItemCva;
9
+ const menuItemCva$1 = UIStyle.useCva("menu.itemCva", menuItemCva);
10
10
  return /* @__PURE__ */ jsxs(MenuItem, {
11
11
  ...item,
12
12
  textValue: label,
@@ -1,16 +1,15 @@
1
- import { ArrowLeftIcon } from "./ArrowLeft.js";
1
+ import { ArrowLeftIcon } from "../../assets/icons/ArrowLeft.js";
2
2
  import { menuCva, menuItemCva } from "./menu.cva.js";
3
- import { UIStyle } from "./uiStyle.context.js";
3
+ import { UIStyle } from "../../config/uiStyle.context.js";
4
4
  import { MenuItem as MenuItem$1 } from "./MenuItem.js";
5
- import { BottomSheet } from "./BottomSheet.js";
5
+ import { BottomSheet } from "../overlays/BottomSheet/BottomSheet.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { clsx } from "clsx";
8
8
  import { useRef, useState } from "react";
9
9
  import { Button, Menu } from "react-aria-components";
10
- const MenuMobile = ({ trigger, items, onAction,...props }) => {
11
- const uiStyle = UIStyle.useConfig();
12
- const menuItemCva$1 = uiStyle?.menu?.itemCva ?? menuItemCva;
13
- const menuCva$1 = uiStyle?.menu?.cva ?? menuCva;
10
+ const MenuMobile = ({ trigger, items, onAction, ...props }) => {
11
+ const menuItemCva$1 = UIStyle.useCva("menu.itemCva", menuItemCva);
12
+ const menuCva$1 = UIStyle.useCva("menu.cva", menuCva);
14
13
  const activeItemRef = useRef(null);
15
14
  const activeItemParentsRef = useRef([]);
16
15
  const lastEventRef = useRef(null);
@@ -1,21 +1,22 @@
1
1
  import { menuCva, menuPopoverCva, menuPopoverWrapperCva } from "./menu.cva.js";
2
- import { UIStyle } from "./uiStyle.context.js";
2
+ import { UIStyle } from "../../config/uiStyle.context.js";
3
3
  import { MenuItem as MenuItem$1 } from "./MenuItem.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { clsx } from "clsx";
6
5
  import { useRef } from "react";
7
6
  import { Menu, Popover, SubmenuTrigger } from "react-aria-components";
8
- const MenuPopover = ({ items, className, onAction,...props }) => {
7
+ const MenuPopover = ({ items, className, onAction, ...props }) => {
9
8
  const lastEventRef = useRef(null);
10
- const uiStyle = UIStyle.useConfig();
11
- const menuPopoverCva$1 = uiStyle?.menu?.popoverCva ?? menuPopoverCva;
12
- const menuPopoverWrapperCva$1 = uiStyle?.menu?.popoverWrapperCva ?? menuPopoverWrapperCva;
13
- const menuCva$1 = uiStyle?.menu?.cva ?? menuCva;
9
+ const menuPopoverCva$1 = UIStyle.useCva("menu.popoverCva", menuPopoverCva);
10
+ const menuPopoverWrapperCva$1 = UIStyle.useCva("menu.popoverWrapperCva", menuPopoverWrapperCva);
11
+ const menuCva$1 = UIStyle.useCva("menu.cva", menuCva);
14
12
  return /* @__PURE__ */ jsx(Popover, {
15
13
  ...props,
16
- className: clsx(menuPopoverCva$1({ ...props }), className),
14
+ className: menuPopoverCva$1({
15
+ ...props,
16
+ className
17
+ }),
17
18
  children: /* @__PURE__ */ jsx("div", {
18
- className: menuPopoverWrapperCva$1({ ...props }),
19
+ className: menuPopoverWrapperCva$1({}),
19
20
  children: /* @__PURE__ */ jsx("div", {
20
21
  onClickCapture: (e) => {
21
22
  lastEventRef.current = e;
@@ -1,4 +1,4 @@
1
- import { FC, ReactElement, SVGProps } from 'react';
1
+ import { FC, ReactElement, Ref, SVGProps } from 'react';
2
2
  import { ButtonProps as AriaButtonProps, ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
3
3
  import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
4
4
  import { LinkNavigationProps } from '../../text/Link/Link';
@@ -22,7 +22,7 @@ export type ButtonProps<IconOnly extends boolean = false> = ButtonVariantProps &
22
22
  link?: LinkNavigationProps;
23
23
  noDisableWhenLoading?: boolean;
24
24
  iconClassName?: string;
25
- disableTooltip?: boolean;
25
+ contentRef?: Ref<HTMLElement>;
26
26
  };
27
- export declare const Button: <IconOnly extends boolean = false>({ icon: Icon, iconPosition, children, isLoading, className, link, iconClassName, noDisableWhenLoading, disableTooltip, ...props }: ButtonProps<IconOnly>) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const Button: <IconOnly extends boolean = false>({ icon: Icon, iconPosition, children, isLoading, className, link, iconClassName, noDisableWhenLoading, contentRef, ...props }: ButtonProps<IconOnly>) => import("react/jsx-runtime").JSX.Element;
28
28
  export {};
@@ -0,0 +1,64 @@
1
+ import { UIStyle } from "../../../config/uiStyle.context.js";
2
+ import { LinkContext } from "../../../config/link.context.js";
3
+ import { ButtonContent } from "../shared/ButtonContent.js";
4
+ import { UIConfig } from "../../../config/uiConfig.context.js";
5
+ import { button, buttonContent, buttonIconSize, buttonSize, buttonTypography } from "./button.cva.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { clsx } from "clsx";
8
+ import { Button, Link, ToggleButton } from "react-aria-components";
9
+ const Button$1 = ({ icon: Icon, iconPosition, children, isLoading, className, link, iconClassName, noDisableWhenLoading, contentRef, ...props }) => {
10
+ const linkContext = LinkContext.useLinkContext();
11
+ const uiConfig = UIConfig.useConfig();
12
+ const { variant = uiConfig.button.variant, size = uiConfig.button.size } = props;
13
+ const buttonCva = UIStyle.useCva("button.cva", button);
14
+ const buttonSizeCva = UIStyle.useCva("button.sizeCva", buttonSize);
15
+ const buttonContentCva = UIStyle.useCva("button.contentCva", buttonContent);
16
+ const buttonIconSizeCva = UIStyle.useCva("button.iconSize", buttonIconSize);
17
+ const typographyMap = UIStyle.useMapper("button.typography", buttonTypography);
18
+ const Component = (() => {
19
+ if (link) return linkContext?.LinkComponent ?? Link;
20
+ if (props.toggle != null) return ToggleButton;
21
+ return Button;
22
+ })();
23
+ if (link && !link.to && link.href) link.to = link.href;
24
+ return /* @__PURE__ */ jsx(Component, {
25
+ ...props,
26
+ ...link,
27
+ isDisabled: props.isDisabled || isLoading && !noDisableWhenLoading,
28
+ className: clsx(buttonCva({
29
+ ...props,
30
+ variant,
31
+ size,
32
+ className
33
+ }), buttonSizeCva({
34
+ ...props,
35
+ variant,
36
+ size
37
+ }), buttonContentCva({
38
+ ...props,
39
+ variant,
40
+ size,
41
+ iconPosition: !Icon ? "none" : iconPosition
42
+ })),
43
+ children: /* @__PURE__ */ jsx(ButtonContent, {
44
+ ref: contentRef,
45
+ isLoading,
46
+ icon: Icon,
47
+ text: children,
48
+ hideText: props.iconOnly,
49
+ iconPosition,
50
+ iconClassName: buttonIconSizeCva({
51
+ ...props,
52
+ variant,
53
+ size,
54
+ className: iconClassName
55
+ }),
56
+ typography: typographyMap({
57
+ ...props,
58
+ variant,
59
+ size
60
+ })
61
+ })
62
+ });
63
+ };
64
+ export { Button$1 as Button };
@@ -1,5 +1,5 @@
1
- import { uiOutlineClass } from "./outline.clsx.js";
2
- import { compoundMapper } from "./compoundMapper.js";
1
+ import { uiOutlineClass } from "../../outline.clsx.js";
2
+ import { compoundMapper } from "../../../utils/compoundMapper.js";
3
3
  import { cva } from "class-variance-authority";
4
4
  const button = cva([
5
5
  "group inline-flex items-center justify-center border border-solid",
@@ -584,19 +584,10 @@ const buttonContent = cva("", {
584
584
  none: ""
585
585
  },
586
586
  iconOnly: {
587
- true: "p-0",
587
+ true: "",
588
588
  false: ""
589
589
  }
590
590
  },
591
- compoundVariants: [{
592
- iconOnly: false,
593
- iconPosition: "left",
594
- className: "pr-button-side-button-content"
595
- }, {
596
- iconOnly: false,
597
- iconPosition: "right",
598
- className: "pl-button-side-button-content"
599
- }],
600
591
  defaultVariants: {
601
592
  size: "m",
602
593
  iconPosition: "left",
@@ -8,4 +8,4 @@ export interface IconButtonProps extends ButtonVariantProps, Omit<AriaButtonProp
8
8
  link?: LinkNavigationProps;
9
9
  disableTooltip?: boolean;
10
10
  }
11
- export declare const IconButton: ({ label, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const IconButton: ({ label, disableTooltip, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
2
+ import { Button } from "../Button/Button.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ const IconButton = ({ label, disableTooltip, ...props }) => {
5
+ return /* @__PURE__ */ jsx(Tooltip, {
6
+ text: label,
7
+ placement: "bottom",
8
+ hidden: !label || disableTooltip,
9
+ children: /* @__PURE__ */ jsx(Button, {
10
+ ...props,
11
+ iconOnly: true,
12
+ width: "hug",
13
+ children: label
14
+ })
15
+ });
16
+ };
17
+ export { IconButton };
@@ -1,6 +1,6 @@
1
- import { Button } from "./Button.js";
1
+ import { Button } from "../Button/Button.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- const InlineIconButton = ({ label,...props }) => {
3
+ const InlineIconButton = ({ label, ...props }) => {
4
4
  return /* @__PURE__ */ jsx(Button, {
5
5
  ...props,
6
6
  iconOnly: true,
@@ -1,4 +1,4 @@
1
- import { FC, SVGProps } from 'react';
1
+ import { FC, Ref, SVGProps } from 'react';
2
2
  import { ButtonProps as AriaButtonProps, ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
3
3
  import { PillButtonVariants } from './pillButton.cva';
4
4
  import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
@@ -7,5 +7,6 @@ export interface PillButtonProps extends AriaButtonProps, Omit<AriaToggleButtonP
7
7
  dismissable?: boolean;
8
8
  toggle?: boolean;
9
9
  icon?: FC<SVGProps<SVGSVGElement>>;
10
+ contentRef?: Ref<HTMLElement>;
10
11
  }
11
- export declare const PillButton: ({ children, dismissable, toggle, icon, iconPosition, ...props }: PillButtonProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const PillButton: ({ children, dismissable, toggle, icon, iconPosition, contentRef, ...props }: PillButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { CloseIcon } from "../../../assets/icons/Close.js";
2
+ import { UIStyle } from "../../../config/uiStyle.context.js";
3
+ import { ButtonContent } from "../shared/ButtonContent.js";
4
+ import { pillButton, pillButtonContent, pillButtonIconSize, pillButtonTypography } from "./pillButton.cva.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { clsx } from "clsx";
7
+ import { Button, ToggleButton } from "react-aria-components";
8
+ const PillButton = ({ children, dismissable, toggle, icon, iconPosition, contentRef, ...props }) => {
9
+ const pillButtonCva = UIStyle.useCva("pillButton.cva", pillButton);
10
+ const pillButtonTypographyMap = UIStyle.useMapper("pillButton.typography", pillButtonTypography);
11
+ const Component = toggle ? ToggleButton : Button;
12
+ const getIconPosition = () => {
13
+ if (dismissable) return "right";
14
+ return icon ? iconPosition : "none";
15
+ };
16
+ return /* @__PURE__ */ jsx(Component, {
17
+ ...props,
18
+ className: clsx(pillButtonCva({
19
+ ...props,
20
+ className: props.className
21
+ }), pillButtonContent({ iconPosition: getIconPosition() })),
22
+ children: /* @__PURE__ */ jsx(ButtonContent, {
23
+ ref: contentRef,
24
+ text: children,
25
+ icon: dismissable ? CloseIcon : icon,
26
+ iconPosition: dismissable ? "right" : iconPosition,
27
+ iconClassName: pillButtonIconSize,
28
+ typography: pillButtonTypographyMap({ ...props })
29
+ })
30
+ });
31
+ };
32
+ export { PillButton };
@@ -1,5 +1,5 @@
1
- import { uiOutlineClass } from "./outline.clsx.js";
2
- import { compoundMapper } from "./compoundMapper.js";
1
+ import { uiOutlineClass } from "../../outline.clsx.js";
2
+ import { compoundMapper } from "../../../utils/compoundMapper.js";
3
3
  import { clsx } from "clsx";
4
4
  import { cva } from "class-variance-authority";
5
5
  const pillButton = cva([
@@ -240,8 +240,8 @@ const pillButton = cva([
240
240
  });
241
241
  const pillButtonContent = cva("", {
242
242
  variants: { iconPosition: {
243
- left: "gap-button-gap-icon-to-label pr-button-side-button-content",
244
- right: "gap-button-gap-icon-to-label pl-button-side-button-content",
243
+ left: "gap-button-gap-icon-to-label",
244
+ right: "gap-button-gap-icon-to-label",
245
245
  none: "gap-button-gap-icon-to-label"
246
246
  } },
247
247
  defaultVariants: { iconPosition: "left" }
@@ -1,10 +1,10 @@
1
- import { ChevronDownIcon } from "./ChevronDown.js";
2
- import { Button } from "./Button.js";
3
- import { IconButton } from "./IconButton.js";
4
- import { Menu } from "./Menu2.js";
1
+ import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
2
+ import { Button } from "../Button/Button.js";
3
+ import { IconButton } from "../IconButton/IconButton.js";
4
+ import { Menu } from "../../Menu/Menu.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { clsx } from "clsx";
7
- const SplitButton = ({ variant, color, width, size, label, labelRight, link, items, className, isLoading,...props }) => {
7
+ const SplitButton = ({ variant, color, width, size, label, labelRight, link, items, className, isLoading, ...props }) => {
8
8
  return /* @__PURE__ */ jsxs("div", {
9
9
  className: "group/split flex items-center",
10
10
  "data-split": "",
@@ -7,6 +7,5 @@ export type TextButtonProps = Omit<ButtonVariantProps, "variant"> & ButtonConten
7
7
  children: string;
8
8
  isLoading?: boolean;
9
9
  link?: LinkNavigationProps;
10
- disableTooltip?: boolean;
11
10
  };
12
11
  export declare const TextButton: ({ children, ...props }: TextButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,11 @@
1
- import { Button } from "./Button.js";
1
+ import { Button } from "../Button/Button.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- const TextButton = ({ children,...props }) => {
3
+ const TextButton = ({ children, ...props }) => {
4
4
  return /* @__PURE__ */ jsx(Button, {
5
5
  ...props,
6
6
  variant: "text",
7
7
  size: "none",
8
8
  width: props.width ?? "hug",
9
- disableTooltip: props.disableTooltip,
10
9
  children
11
10
  });
12
11
  };
@@ -4,6 +4,5 @@ import { ButtonVariantProps } from '../Button/button.cva';
4
4
  import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
5
5
  export type ToggleButtonProps = ButtonVariantProps & ButtonContentVariantProps & AriaToggleButtonProps & ButtonIconProps<true | false> & {
6
6
  children: string;
7
- disableTooltip?: boolean;
8
7
  };
9
8
  export declare const ToggleButton: ({ children, ...props }: ToggleButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,11 @@
1
- import { Button } from "./Button.js";
1
+ import { Button } from "../Button/Button.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- const ToggleButton = ({ children,...props }) => {
3
+ const ToggleButton = ({ children, ...props }) => {
4
4
  return /* @__PURE__ */ jsx(Button, {
5
5
  ...props,
6
6
  toggle: true,
7
7
  variant: "outlined",
8
8
  color: "primary",
9
- disableTooltip: props.disableTooltip,
10
9
  children
11
10
  });
12
11
  };
@@ -1,16 +1,14 @@
1
1
  import { FC, ReactElement, Ref, SVGProps } from 'react';
2
- import { ButtonVariantProps } from '../Button/button.cva';
3
2
  import { ButtonContentVariantProps } from './buttonContent.cva';
4
3
  import { TypographyVariantProps } from '../../text/Typography/typography.cva';
5
- interface ButtonContentProps extends ButtonContentVariantProps, Pick<ButtonVariantProps, "size"> {
6
- ref?: Ref<HTMLHeadingElement>;
4
+ interface ButtonContentProps extends ButtonContentVariantProps {
5
+ ref?: Ref<HTMLElement>;
7
6
  text: string;
8
7
  isLoading?: boolean;
9
- className?: string;
10
8
  icon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
11
9
  iconClassName?: string;
12
10
  hideText?: boolean;
13
11
  typography?: TypographyVariantProps;
14
12
  }
15
- export declare const ButtonContent: ({ ref, text, isLoading, className, icon: Icon, iconClassName, hideText, iconPosition, typography, }: ButtonContentProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const ButtonContent: ({ ref, text, isLoading, icon: Icon, iconClassName, hideText, iconPosition, typography: typographyOverrides, }: ButtonContentProps) => import("react/jsx-runtime").JSX.Element;
16
14
  export {};
@@ -0,0 +1,35 @@
1
+ import { UIStyle } from "../../../config/uiStyle.context.js";
2
+ import { typography } from "../../text/Typography/typography.cva.js";
3
+ import { buttonContentLabel } from "./buttonContent.cva.js";
4
+ import { Loader } from "../../status/Loader/Loader.js";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { clsx } from "clsx";
7
+ import { isValidElement } from "react";
8
+ const ButtonContent = ({ ref, text, isLoading, icon: Icon, iconClassName, hideText, iconPosition = "left", typography: typographyOverrides }) => {
9
+ const typographyCva = UIStyle.useCva("typography.cva", typography);
10
+ let iconOrLoader = null;
11
+ if (isLoading) iconOrLoader = /* @__PURE__ */ jsx(Loader, { className: "shrink-0" });
12
+ else if (Icon) if (isValidElement(Icon)) iconOrLoader = Icon;
13
+ else iconOrLoader = /* @__PURE__ */ jsx(Icon, { className: clsx("shrink-0", iconClassName) });
14
+ const resolvedTypography = {
15
+ size: "label-2",
16
+ variant: "prominent-1",
17
+ ...typographyOverrides
18
+ };
19
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
20
+ iconOrLoader && iconPosition === "left" && iconOrLoader,
21
+ /* @__PURE__ */ jsx("span", {
22
+ className: clsx(typographyCva({
23
+ ...resolvedTypography,
24
+ sizeMobile: resolvedTypography.sizeMobile ?? resolvedTypography.size
25
+ }), buttonContentLabel({
26
+ iconPosition: iconOrLoader ? iconPosition : "none",
27
+ hideText: !!hideText
28
+ })),
29
+ ref,
30
+ children: text
31
+ }),
32
+ iconOrLoader && iconPosition === "right" && iconOrLoader
33
+ ] });
34
+ };
35
+ export { ButtonContent };
@@ -2,5 +2,9 @@ import { VariantProps } from 'class-variance-authority';
2
2
  export declare const buttonContent: (props?: ({
3
3
  iconPosition?: "none" | "left" | "right" | null | undefined;
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
+ export declare const buttonContentLabel: (props?: ({
6
+ iconPosition?: "none" | "left" | "right" | null | undefined;
7
+ hideText?: boolean | null | undefined;
8
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
9
  export interface ButtonContentVariantProps extends VariantProps<typeof buttonContent> {
6
10
  }
@@ -0,0 +1,36 @@
1
+ import { cva } from "class-variance-authority";
2
+ cva("flex w-full items-center justify-center", {
3
+ variants: { iconPosition: {
4
+ left: "flex-row",
5
+ right: "flex-row-reverse",
6
+ none: "flex-row"
7
+ } },
8
+ defaultVariants: { iconPosition: "left" }
9
+ });
10
+ const buttonContentLabel = cva("hyphens-auto md:truncate", {
11
+ variants: {
12
+ iconPosition: {
13
+ left: "",
14
+ right: "",
15
+ none: ""
16
+ },
17
+ hideText: {
18
+ true: "sr-only",
19
+ false: ""
20
+ }
21
+ },
22
+ compoundVariants: [{
23
+ iconPosition: "left",
24
+ hideText: false,
25
+ className: "mr-button-side-button-content"
26
+ }, {
27
+ iconPosition: "right",
28
+ hideText: false,
29
+ className: "ml-button-side-button-content"
30
+ }],
31
+ defaultVariants: {
32
+ iconPosition: "none",
33
+ hideText: false
34
+ }
35
+ });
36
+ export { buttonContentLabel };