@povio/ui 2.1.13 → 2.1.15
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.
- package/README.md +74 -0
- package/dist/AclGuard.js +12 -0
- package/dist/ActionModal.js +51 -0
- package/dist/Alert.js +46 -0
- package/dist/AlignCenter.js +13 -0
- package/dist/AlignLeft.js +13 -0
- package/dist/AlignLeftRight.js +13 -0
- package/dist/AlignRight.js +13 -0
- package/dist/ArrowDropDown.js +13 -0
- package/dist/ArrowDropUp.js +13 -0
- package/dist/ArrowLeft.js +13 -0
- package/dist/ArrowRight.js +13 -0
- package/dist/AuthGuard.js +22 -0
- package/dist/Autocomplete.js +28 -0
- package/dist/Bold.js +13 -0
- package/dist/BottomSheet.js +191 -0
- package/dist/BulletedList.js +13 -0
- package/dist/Button.js +54 -0
- package/dist/ButtonContent.js +28 -0
- package/dist/Calendar.js +15 -0
- package/dist/Calendar2.js +54 -0
- package/dist/CalendarCell.js +130 -0
- package/dist/CalendarGrid.js +50 -0
- package/dist/CalendarHeader.js +75 -0
- package/dist/CalendarSelectHeader.js +170 -0
- package/dist/Can.js +13 -0
- package/dist/CellText.js +13 -0
- package/dist/Check.js +15 -0
- package/dist/CheckCircle.js +13 -0
- package/dist/CheckContent.js +16 -0
- package/dist/Checkbox.js +61 -0
- package/dist/CheckboxCheckmark.js +16 -0
- package/dist/CheckboxCheckmark2.js +25 -0
- package/dist/CheckboxIndeterminate.js +16 -0
- package/dist/ChevronDown.js +15 -0
- package/dist/ChevronLeft.js +15 -0
- package/dist/ChevronRight.js +15 -0
- package/dist/ChevronUp.js +15 -0
- package/dist/ChevronsLeft.js +15 -0
- package/dist/ChevronsRight.js +15 -0
- package/dist/Clock.js +13 -0
- package/dist/Close.js +13 -0
- package/dist/ColorPicker.js +16 -0
- package/dist/ColorPickerDropdown.js +51 -0
- package/dist/ColumnConfig.js +81 -0
- package/dist/DateField.js +89 -0
- package/dist/DatePicker.js +191 -0
- package/dist/DatePickerInput.js +158 -0
- package/dist/DateRangePicker.js +601 -0
- package/dist/DateSegmentItem.js +29 -0
- package/dist/DateTime.js +18 -0
- package/dist/DateTimeDialog.js +49 -0
- package/dist/DateTimeDialogFooter.js +25 -0
- package/dist/DateTimePicker.js +200 -0
- package/dist/Drag.js +13 -0
- package/dist/Drawer.js +43 -0
- package/dist/File.js +15 -0
- package/dist/FileCard.js +50 -0
- package/dist/FileCardList.js +17 -0
- package/dist/FileUpload.js +189 -0
- package/dist/FileUploadContainer.js +12 -0
- package/dist/FileUploadContent.js +61 -0
- package/dist/FileUploadContentEmpty.js +54 -0
- package/dist/FileUploadContentError.js +109 -0
- package/dist/FileUploadContentFilled.js +112 -0
- package/dist/FileUploadContentLoading.js +76 -0
- package/dist/Form.js +42 -0
- package/dist/FormField.js +35 -0
- package/dist/FormFieldError.js +11 -0
- package/dist/FormFieldHeader.js +36 -0
- package/dist/FormFieldHeaderClose.js +15 -0
- package/dist/FormFieldLabel.js +32 -0
- package/dist/HeaderText.js +10 -0
- package/dist/Highlight.js +13 -0
- package/dist/HighlightOn.js +19 -0
- package/dist/HyperlinkAction.js +70 -0
- package/dist/IconButton.js +12 -0
- package/dist/InfiniteTable.js +31 -0
- package/dist/Info.js +18 -0
- package/dist/InlineIconButton.js +13 -0
- package/dist/InputClear.js +19 -0
- package/dist/InputContent.js +94 -0
- package/dist/InputItem.js +54 -0
- package/dist/InputUpload.js +111 -0
- package/dist/InputUploadContent.js +52 -0
- package/dist/InputUploadFilled.js +26 -0
- package/dist/Inputs.js +15 -0
- package/dist/Italic.js +13 -0
- package/dist/Link.js +13 -0
- package/dist/Link2.js +19 -0
- package/dist/Loader.js +32 -0
- package/dist/Menu.js +13 -0
- package/dist/Menu2.js +9 -0
- package/dist/MenuDesktop.js +53 -0
- package/dist/MenuItem.js +21 -0
- package/dist/MenuMobile.js +64 -0
- package/dist/MenuPopover.js +30 -0
- package/dist/Modal.js +49 -0
- package/dist/MonthPicker.js +56 -0
- package/dist/NumberInput.js +132 -0
- package/dist/NumberedList.js +13 -0
- package/dist/PaginatedTable.js +26 -0
- package/dist/Pagination.js +43 -0
- package/dist/PaginationList.js +105 -0
- package/dist/PasswordInput.js +21 -0
- package/dist/PillButton.js +37 -0
- package/dist/PointerHorizontal.js +13 -0
- package/dist/PointerVertical.js +13 -0
- package/dist/ProgressBar.js +25 -0
- package/dist/QueryAutocomplete.js +18 -0
- package/dist/RadioGroup.js +81 -0
- package/dist/RangeCalendar.js +96 -0
- package/dist/ResponsivePopover.js +41 -0
- package/dist/Segment.js +82 -0
- package/dist/SegmentItem.js +23 -0
- package/dist/Select.js +24 -0
- package/dist/SelectBase.js +28 -0
- package/dist/SelectDesktop.js +147 -0
- package/dist/SelectInput.js +159 -0
- package/dist/SelectInputTags.js +29 -0
- package/dist/SelectListBox.js +73 -0
- package/dist/SelectListBoxItem.js +48 -0
- package/dist/SelectListBoxItemSelectAll.js +31 -0
- package/dist/SelectListBoxLoadingItem.js +41 -0
- package/dist/SelectListBoxSelectionBar.js +25 -0
- package/dist/SelectMobile.js +111 -0
- package/dist/Send.js +15 -0
- package/dist/Slider.js +93 -0
- package/dist/SplitButton.js +36 -0
- package/dist/Strikethrough.js +13 -0
- package/dist/Table.js +248 -0
- package/dist/Tag.js +42 -0
- package/dist/TextAlignSelect.js +44 -0
- package/dist/TextArea.js +120 -0
- package/dist/TextButton.js +13 -0
- package/dist/TextColor.js +16 -0
- package/dist/TextColorSelect.js +22 -0
- package/dist/TextEditor.js +143 -0
- package/dist/TextEditorToolbar.js +30 -0
- package/dist/TextHighlightSelect.js +24 -0
- package/dist/TextInput.js +125 -0
- package/dist/TextListActions.js +42 -0
- package/dist/TextMarksActions.js +67 -0
- package/dist/TextStyleSelect.js +52 -0
- package/dist/TimeField.js +17 -0
- package/dist/TimePicker.js +158 -0
- package/dist/TimePickerForm.js +158 -0
- package/dist/TimePickerInput.js +92 -0
- package/dist/Toast.js +58 -0
- package/dist/Today.js +13 -0
- package/dist/Toggle.js +60 -0
- package/dist/ToggleButton.js +13 -0
- package/dist/Tooltip.js +49 -0
- package/dist/TooltipEllipsis.js +18 -0
- package/dist/TooltipWrapper.js +19 -0
- package/dist/Typography.js +14 -0
- package/dist/Underlined.js +15 -0
- package/dist/Upload.js +16 -0
- package/dist/View.js +13 -0
- package/dist/ViewOff.js +13 -0
- package/dist/WarningFilled.js +15 -0
- package/dist/YearPicker.js +64 -0
- package/dist/ability.context.js +35 -0
- package/dist/alert.cva.js +62 -0
- package/dist/array.utils.js +8 -0
- package/dist/auth.context.js +37 -0
- package/dist/auth.js +6 -12
- package/dist/button.cva.js +656 -0
- package/dist/buttonContent.cva.js +10 -0
- package/dist/checkbox.cva.js +47 -0
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +2 -2
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +5 -0
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -1
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -1
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -0
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +3 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +11 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/File/fileUpload.types.d.ts +3 -0
- package/dist/components/inputs/File/inputUpload.types.d.ts +2 -0
- package/dist/components/inputs/FormField/FormField.d.ts +4 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +4 -2
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -0
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -1
- package/dist/components/inputs/Input/shared/InputContent.d.ts +4 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.d.ts +2 -0
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/compoundMapper.js +11 -0
- package/dist/config/uiConfig.context.d.ts +1 -1
- package/dist/config/uiStyle.context.d.ts +2 -1
- package/dist/confirmation.context.js +78 -0
- package/dist/date-time.utils.js +50 -0
- package/dist/date.utils.js +17 -0
- package/dist/dom.utils.js +17 -0
- package/dist/dynamicColumns.js +272 -0
- package/dist/dynamicInputs.js +186 -0
- package/dist/error-handling.js +87 -0
- package/dist/file.utils.js +43 -0
- package/dist/fileUpload.cva.js +49 -0
- package/dist/hooks/useBreakpoint.d.ts +1 -1
- package/dist/i18n.js +8 -0
- package/dist/index.js +136 -278
- package/dist/input.cva.js +210 -0
- package/dist/inputUploadButton.cva.js +27 -0
- package/dist/isEqual.js +57 -0
- package/dist/label.cva.js +104 -0
- package/dist/link.context.js +17 -0
- package/dist/link.cva.js +7 -0
- package/dist/loader.cva.js +16 -0
- package/dist/logger.js +17 -0
- package/dist/menu.cva.js +27 -0
- package/dist/minWidth.cva.js +9 -0
- package/dist/modal.cva.js +31 -0
- package/dist/object.utils.js +36 -0
- package/dist/outline.clsx.js +4 -0
- package/dist/pillButton.cva.js +254 -0
- package/dist/queries.utils.js +7 -0
- package/dist/radio.cva.js +42 -0
- package/dist/react.js +6 -0
- package/dist/rest-interceptor.js +22 -0
- package/dist/rest.utils.js +31 -0
- package/dist/rolldown_runtime.js +16 -0
- package/dist/router.context.js +37 -0
- package/dist/routing.utils.js +9 -0
- package/dist/segment.cva.js +25 -0
- package/dist/select.context.js +190 -0
- package/dist/status.cva.js +57 -0
- package/dist/string.utils.js +10 -0
- package/dist/table.cva.js +35 -0
- package/dist/tag.cva.js +50 -0
- package/dist/text-editor.js +2 -4
- package/dist/textEditor.types.js +38 -0
- package/dist/theme.context.js +65 -0
- package/dist/toast.cva.js +158 -0
- package/dist/toggle.cva.js +27 -0
- package/dist/tooltip.cva.js +30 -0
- package/dist/translation.js +147 -0
- package/dist/translation2.js +145 -0
- package/dist/typography.cva.js +124 -0
- package/dist/uiConfig.context.js +58 -0
- package/dist/uiStyle.context.js +16 -0
- package/dist/useAutosave.js +62 -0
- package/dist/useBreakpoint.js +28 -0
- package/dist/useDebounceCallback.js +23 -0
- package/dist/useDeepCompare.js +21 -0
- package/dist/useFilters.js +121 -0
- package/dist/useForm.js +12 -0
- package/dist/useFormAutosave.js +52 -0
- package/dist/useIntersectionObserver.js +23 -0
- package/dist/useLocalStorage.js +35 -0
- package/dist/useLongPressRepeat.js +27 -0
- package/dist/usePagination.js +26 -0
- package/dist/useScrollableListBox.js +24 -0
- package/dist/useSelectItems.js +82 -0
- package/dist/useSorting.js +34 -0
- package/dist/useStateAndRef.js +15 -0
- package/dist/useTableColumnConfig.js +38 -0
- package/dist/useTableNav.js +279 -0
- package/dist/useToast.js +63 -0
- package/dist/useTranslationMemo.js +10 -0
- package/dist/zod.utils.js +17 -0
- package/package.json +14 -14
- package/dist/assets/icons/AlignCenter.js +0 -21
- package/dist/assets/icons/AlignLeft.js +0 -21
- package/dist/assets/icons/AlignLeftRight.js +0 -21
- package/dist/assets/icons/AlignRight.js +0 -21
- package/dist/assets/icons/ArrowDropDown.js +0 -21
- package/dist/assets/icons/ArrowDropUp.js +0 -21
- package/dist/assets/icons/ArrowLeft.js +0 -21
- package/dist/assets/icons/ArrowRight.js +0 -21
- package/dist/assets/icons/Bold.js +0 -21
- package/dist/assets/icons/BulletedList.js +0 -21
- package/dist/assets/icons/Calendar.js +0 -23
- package/dist/assets/icons/Check.js +0 -23
- package/dist/assets/icons/CheckCircle.js +0 -21
- package/dist/assets/icons/CheckboxCheckmark.js +0 -24
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -24
- package/dist/assets/icons/ChevronDown.js +0 -23
- package/dist/assets/icons/ChevronLeft.js +0 -23
- package/dist/assets/icons/ChevronRight.js +0 -23
- package/dist/assets/icons/ChevronUp.js +0 -23
- package/dist/assets/icons/ChevronsLeft.js +0 -23
- package/dist/assets/icons/ChevronsRight.js +0 -23
- package/dist/assets/icons/Clock.js +0 -21
- package/dist/assets/icons/Close.js +0 -21
- package/dist/assets/icons/DateTime.js +0 -32
- package/dist/assets/icons/Drag.js +0 -21
- package/dist/assets/icons/File.js +0 -23
- package/dist/assets/icons/Highlight.js +0 -21
- package/dist/assets/icons/HighlightOn.js +0 -30
- package/dist/assets/icons/Info.js +0 -32
- package/dist/assets/icons/Italic.js +0 -21
- package/dist/assets/icons/Link.js +0 -21
- package/dist/assets/icons/Menu.js +0 -21
- package/dist/assets/icons/NumberedList.js +0 -21
- package/dist/assets/icons/PointerHorizontal.js +0 -21
- package/dist/assets/icons/PointerVertical.js +0 -21
- package/dist/assets/icons/Send.js +0 -23
- package/dist/assets/icons/Strikethrough.js +0 -21
- package/dist/assets/icons/TextColor.js +0 -30
- package/dist/assets/icons/Today.js +0 -21
- package/dist/assets/icons/Underlined.js +0 -23
- package/dist/assets/icons/Upload.js +0 -30
- package/dist/assets/icons/View.js +0 -18
- package/dist/assets/icons/ViewOff.js +0 -18
- package/dist/assets/icons/WarningFilled.js +0 -23
- package/dist/assets/locales/en/translation.json.js +0 -14
- package/dist/assets/locales/sl/translation.json.js +0 -14
- package/dist/components/Menu/Menu.js +0 -14
- package/dist/components/Menu/MenuDesktop.js +0 -74
- package/dist/components/Menu/MenuItem.js +0 -27
- package/dist/components/Menu/MenuMobile.js +0 -83
- package/dist/components/Menu/MenuPopover.js +0 -43
- package/dist/components/Menu/menu.cva.js +0 -45
- package/dist/components/buttons/Button/Button.js +0 -73
- package/dist/components/buttons/Button/button.cva.js +0 -666
- package/dist/components/buttons/IconButton/IconButton.js +0 -17
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -18
- package/dist/components/buttons/PillButton/PillButton.js +0 -44
- package/dist/components/buttons/PillButton/pillButton.cva.js +0 -268
- package/dist/components/buttons/SplitButton/SplitButton.js +0 -65
- package/dist/components/buttons/TextButton/TextButton.js +0 -18
- package/dist/components/buttons/ToggleButton/ToggleButton.js +0 -21
- package/dist/components/buttons/shared/ButtonContent.js +0 -53
- package/dist/components/buttons/shared/buttonContent.cva.js +0 -16
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -81
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +0 -32
- package/dist/components/inputs/Checkbox/checkbox.cva.js +0 -51
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +0 -246
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +0 -684
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +0 -260
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +0 -233
- package/dist/components/inputs/DateTime/shared/Calendar.js +0 -85
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +0 -160
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +0 -67
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +0 -89
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +0 -203
- package/dist/components/inputs/DateTime/shared/DateField.js +0 -62
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -175
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +0 -55
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +0 -76
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +0 -47
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +0 -82
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +0 -133
- package/dist/components/inputs/DateTime/shared/TimeField.js +0 -26
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +0 -186
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +0 -115
- package/dist/components/inputs/DateTime/shared/YearPicker.js +0 -89
- package/dist/components/inputs/File/FileUpload.js +0 -254
- package/dist/components/inputs/File/FileUploadContainer.js +0 -17
- package/dist/components/inputs/File/InputUpload.js +0 -176
- package/dist/components/inputs/File/shared/FileCard.js +0 -67
- package/dist/components/inputs/File/shared/FileCardList.js +0 -20
- package/dist/components/inputs/File/shared/FileUploadContent.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentError.js +0 -167
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +0 -176
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +0 -128
- package/dist/components/inputs/File/shared/InputUploadContent.js +0 -73
- package/dist/components/inputs/File/shared/InputUploadFilled.js +0 -45
- package/dist/components/inputs/File/shared/ProgressBar.js +0 -42
- package/dist/components/inputs/File/shared/fileUpload.cva.js +0 -58
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +0 -49
- package/dist/components/inputs/FormField/FormField.js +0 -54
- package/dist/components/inputs/FormField/FormFieldError.js +0 -16
- package/dist/components/inputs/FormField/FormFieldHeader.js +0 -57
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +0 -20
- package/dist/components/inputs/FormField/FormFieldLabel.js +0 -37
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -166
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -26
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -155
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -162
- package/dist/components/inputs/Input/shared/InputContent.js +0 -114
- package/dist/components/inputs/Inputs/Form.js +0 -68
- package/dist/components/inputs/Inputs/InputItem.js +0 -61
- package/dist/components/inputs/Inputs/Inputs.js +0 -32
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -103
- package/dist/components/inputs/RadioGroup/radio.cva.js +0 -57
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +0 -39
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -25
- package/dist/components/inputs/Selection/Select/Select.js +0 -32
- package/dist/components/inputs/Selection/shared/SelectBase.js +0 -27
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +0 -223
- package/dist/components/inputs/Selection/shared/SelectInput.js +0 -234
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +0 -49
- package/dist/components/inputs/Selection/shared/SelectListBox.js +0 -127
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +0 -78
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +0 -45
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +0 -47
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +0 -42
- package/dist/components/inputs/Selection/shared/SelectMobile.js +0 -165
- package/dist/components/inputs/Selection/shared/select.context.js +0 -244
- package/dist/components/inputs/Selection/shared/useSelectItems.js +0 -94
- package/dist/components/inputs/Slider/Slider.js +0 -137
- package/dist/components/inputs/TextEditor/TextEditor.js +0 -223
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +0 -34
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +0 -80
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +0 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +0 -56
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +0 -33
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +0 -31
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +0 -37
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +0 -51
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +0 -73
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +0 -61
- package/dist/components/inputs/TextEditor/textEditor.types.js +0 -40
- package/dist/components/inputs/Toggle/Toggle.js +0 -65
- package/dist/components/inputs/Toggle/toggle.cva.js +0 -44
- package/dist/components/inputs/shared/CheckContent.js +0 -22
- package/dist/components/inputs/shared/InputClear.js +0 -27
- package/dist/components/inputs/shared/TooltipWrapper.js +0 -23
- package/dist/components/inputs/shared/input.cva.js +0 -174
- package/dist/components/inputs/shared/label.cva.js +0 -128
- package/dist/components/outline.clsx.js +0 -11
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -80
- package/dist/components/overlays/BottomSheet/BottomSheet.js +0 -261
- package/dist/components/overlays/Drawer/Drawer.js +0 -84
- package/dist/components/overlays/Modal/Modal.js +0 -64
- package/dist/components/overlays/Modal/modal.cva.js +0 -53
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -71
- package/dist/components/overlays/Tooltip/Tooltip.js +0 -92
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +0 -27
- package/dist/components/overlays/Tooltip/tooltip.cva.js +0 -60
- package/dist/components/segment/Segment.js +0 -118
- package/dist/components/segment/SegmentItem.js +0 -35
- package/dist/components/segment/segment.cva.js +0 -35
- package/dist/components/shared/pagination/Pagination.js +0 -75
- package/dist/components/shared/pagination/PaginationList.js +0 -145
- package/dist/components/shared/pagination/minWidth.cva.js +0 -15
- package/dist/components/status/Alert/Alert.js +0 -41
- package/dist/components/status/Alert/alert.cva.js +0 -64
- package/dist/components/status/Loader/Loader.js +0 -37
- package/dist/components/status/Loader/loader.cva.js +0 -27
- package/dist/components/status/Toast/Toast.js +0 -65
- package/dist/components/status/Toast/toast.cva.js +0 -150
- package/dist/components/status/Toast/useToast.js +0 -94
- package/dist/components/status/shared/status.cva.js +0 -62
- package/dist/components/table/CellText.js +0 -18
- package/dist/components/table/ColumnConfig.js +0 -124
- package/dist/components/table/HeaderText.js +0 -15
- package/dist/components/table/InfiniteTable.js +0 -40
- package/dist/components/table/PaginatedTable.js +0 -33
- package/dist/components/table/Table.js +0 -370
- package/dist/components/table/table.cva.js +0 -63
- package/dist/components/text/Link/Link.js +0 -24
- package/dist/components/text/Link/link.cva.js +0 -18
- package/dist/components/text/Tag/Tag.js +0 -49
- package/dist/components/text/Tag/tag.cva.js +0 -59
- package/dist/components/text/Typography/Typography.js +0 -22
- package/dist/components/text/Typography/typography.cva.js +0 -100
- package/dist/config/confirmation.context.js +0 -107
- package/dist/config/i18n.js +0 -15
- package/dist/config/link.context.js +0 -19
- package/dist/config/router.context.js +0 -39
- package/dist/config/theme.context.js +0 -73
- package/dist/config/uiConfig.context.js +0 -68
- package/dist/config/uiStyle.context.js +0 -16
- package/dist/helpers/dynamicColumns.js +0 -359
- package/dist/helpers/dynamicInputs.js +0 -212
- package/dist/hooks/useAutosave.js +0 -83
- package/dist/hooks/useBreakpoint.js +0 -25
- package/dist/hooks/useDebounceCallback.js +0 -29
- package/dist/hooks/useDeepCompare.js +0 -25
- package/dist/hooks/useFilters.js +0 -160
- package/dist/hooks/useForm.js +0 -22
- package/dist/hooks/useFormAutosave.js +0 -67
- package/dist/hooks/useIntersectionObserver.js +0 -27
- package/dist/hooks/useLocalStorage.js +0 -54
- package/dist/hooks/useLongPressRepeat.js +0 -33
- package/dist/hooks/usePagination.js +0 -35
- package/dist/hooks/useScrollableListBox.js +0 -30
- package/dist/hooks/useSorting.js +0 -32
- package/dist/hooks/useStateAndRef.js +0 -17
- package/dist/hooks/useTableColumnConfig.js +0 -63
- package/dist/hooks/useTableNav.js +0 -394
- package/dist/hooks/useTranslationMemo.js +0 -14
- package/dist/utils/array.utils.js +0 -12
- package/dist/utils/compoundMapper.js +0 -14
- package/dist/utils/date-time.utils.js +0 -77
- package/dist/utils/date.utils.js +0 -23
- package/dist/utils/dom.utils.js +0 -13
- package/dist/utils/file.utils.js +0 -63
- package/dist/utils/isEqual.js +0 -95
- package/dist/utils/logger.js +0 -19
- package/dist/utils/object.utils.js +0 -53
- package/dist/utils/queries.utils.js +0 -9
- package/dist/utils/rest.utils.js +0 -51
- package/dist/utils/routing.utils.js +0 -15
- package/dist/utils/string.utils.js +0 -12
- package/dist/utils/vendor/acl/AclGuard.js +0 -14
- package/dist/utils/vendor/acl/Can.js +0 -18
- package/dist/utils/vendor/acl/ability.context.js +0 -37
- package/dist/utils/vendor/auth/AuthGuard.js +0 -26
- package/dist/utils/vendor/auth/auth.context.js +0 -41
- package/dist/utils/vendor/error-handling.js +0 -119
- package/dist/utils/vendor/rest-interceptor.js +0 -21
- package/dist/utils/zod.utils.js +0 -21
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { DialogTrigger, Popover, Dialog } from "react-aria-components";
|
|
4
|
-
import { FormFieldHeader } from "../../inputs/FormField/FormFieldHeader.js";
|
|
5
|
-
import { FormFieldHeaderClose } from "../../inputs/FormField/FormFieldHeaderClose.js";
|
|
6
|
-
import { BottomSheet } from "../BottomSheet/BottomSheet.js";
|
|
7
|
-
import { useBreakpoint } from "../../../hooks/useBreakpoint.js";
|
|
8
|
-
const ResponsivePopover = ({
|
|
9
|
-
trigger,
|
|
10
|
-
isOpen,
|
|
11
|
-
onOpenChange,
|
|
12
|
-
children,
|
|
13
|
-
popoverClassName,
|
|
14
|
-
sheetLabel
|
|
15
|
-
}) => {
|
|
16
|
-
const isDesktop = useBreakpoint("md");
|
|
17
|
-
if (!isDesktop) {
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
BottomSheet,
|
|
20
|
-
{
|
|
21
|
-
isOpen,
|
|
22
|
-
onOpenChange,
|
|
23
|
-
trigger,
|
|
24
|
-
height: "auto",
|
|
25
|
-
isDismissable: true,
|
|
26
|
-
children: (close) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
28
|
-
FormFieldHeader,
|
|
29
|
-
{
|
|
30
|
-
label: sheetLabel,
|
|
31
|
-
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
32
|
-
className: "px-4 pt-3"
|
|
33
|
-
}
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */ jsx("div", { className: "p-4", children })
|
|
36
|
-
] })
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
return /* @__PURE__ */ jsxs(
|
|
41
|
-
DialogTrigger,
|
|
42
|
-
{
|
|
43
|
-
isOpen,
|
|
44
|
-
onOpenChange,
|
|
45
|
-
children: [
|
|
46
|
-
trigger,
|
|
47
|
-
/* @__PURE__ */ jsx(
|
|
48
|
-
Popover,
|
|
49
|
-
{
|
|
50
|
-
className: clsx("my-4 outline-none", popoverClassName),
|
|
51
|
-
offset: 0,
|
|
52
|
-
placement: "bottom start",
|
|
53
|
-
children: /* @__PURE__ */ jsx(Dialog, { className: "outline-none", children: /* @__PURE__ */ jsx(
|
|
54
|
-
"div",
|
|
55
|
-
{
|
|
56
|
-
className: clsx(
|
|
57
|
-
"overflow-hidden p-2 shadow-5 outline-none",
|
|
58
|
-
"rounded-s border border-elevation-outline-default-1 bg-elevation-fill-default-1"
|
|
59
|
-
),
|
|
60
|
-
children
|
|
61
|
-
}
|
|
62
|
-
) })
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
export {
|
|
70
|
-
ResponsivePopover
|
|
71
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment, useRef } from "react";
|
|
3
|
-
import { useFocusable } from "react-aria";
|
|
4
|
-
import { TooltipTrigger, Tooltip as Tooltip$1, OverlayArrow } from "react-aria-components";
|
|
5
|
-
import { PointerHorizontalIcon } from "../../../assets/icons/PointerHorizontal.js";
|
|
6
|
-
import { PointerVerticalIcon } from "../../../assets/icons/PointerVertical.js";
|
|
7
|
-
import { tooltipCva, tooltipPointerHorizontalCva, tooltipPointerVerticalCva, tooltipTextCva } from "./tooltip.cva.js";
|
|
8
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
9
|
-
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
10
|
-
const CustomTrigger = ({
|
|
11
|
-
children,
|
|
12
|
-
className,
|
|
13
|
-
tabIndex
|
|
14
|
-
}) => {
|
|
15
|
-
const ref = useRef(null);
|
|
16
|
-
const { focusableProps } = useFocusable({}, ref);
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
18
|
-
"div",
|
|
19
|
-
{
|
|
20
|
-
ref,
|
|
21
|
-
...focusableProps,
|
|
22
|
-
tabIndex: tabIndex ?? 0,
|
|
23
|
-
className,
|
|
24
|
-
children
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
const Tooltip = ({
|
|
29
|
-
children,
|
|
30
|
-
text,
|
|
31
|
-
isDisabled,
|
|
32
|
-
delay,
|
|
33
|
-
closeDelay,
|
|
34
|
-
color,
|
|
35
|
-
isNonInteractiveTrigger,
|
|
36
|
-
triggerClassName,
|
|
37
|
-
triggerTabIndex,
|
|
38
|
-
...tooltipProps
|
|
39
|
-
}) => {
|
|
40
|
-
const uiStyle = UIStyle.useConfig();
|
|
41
|
-
const tooltipCva$1 = uiStyle?.tooltip?.cva ?? tooltipCva;
|
|
42
|
-
const tooltipPointerHorizontalCva$1 = uiStyle?.tooltip?.pointerHorizontalCva ?? tooltipPointerHorizontalCva;
|
|
43
|
-
const tooltipPointerVerticalCva$1 = uiStyle?.tooltip?.pointerVerticalCva ?? tooltipPointerVerticalCva;
|
|
44
|
-
const tooltipTextCva$1 = uiStyle?.tooltip?.textCva ?? tooltipTextCva;
|
|
45
|
-
const Trigger = isNonInteractiveTrigger ? CustomTrigger : Fragment;
|
|
46
|
-
return /* @__PURE__ */ jsxs(
|
|
47
|
-
TooltipTrigger,
|
|
48
|
-
{
|
|
49
|
-
delay: delay ?? 0,
|
|
50
|
-
closeDelay: closeDelay ?? 0,
|
|
51
|
-
isDisabled,
|
|
52
|
-
children: [
|
|
53
|
-
isNonInteractiveTrigger ? /* @__PURE__ */ jsx(
|
|
54
|
-
Trigger,
|
|
55
|
-
{
|
|
56
|
-
...isNonInteractiveTrigger && {
|
|
57
|
-
className: triggerClassName
|
|
58
|
-
},
|
|
59
|
-
tabIndex: triggerTabIndex,
|
|
60
|
-
children
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ jsx(Trigger, { children }),
|
|
63
|
-
/* @__PURE__ */ jsxs(
|
|
64
|
-
Tooltip$1,
|
|
65
|
-
{
|
|
66
|
-
className: tooltipCva$1({ color }),
|
|
67
|
-
...tooltipProps,
|
|
68
|
-
offset: 13,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ jsxs(OverlayArrow, { children: [
|
|
71
|
-
/* @__PURE__ */ jsx(PointerHorizontalIcon, { className: tooltipPointerHorizontalCva$1({ color }) }),
|
|
72
|
-
/* @__PURE__ */ jsx(PointerVerticalIcon, { className: tooltipPointerVerticalCva$1({ color }) })
|
|
73
|
-
] }),
|
|
74
|
-
/* @__PURE__ */ jsx(
|
|
75
|
-
Typography,
|
|
76
|
-
{
|
|
77
|
-
size: "body-4",
|
|
78
|
-
variant: "prominent-1",
|
|
79
|
-
className: tooltipTextCva$1({ color }),
|
|
80
|
-
children: text
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
export {
|
|
91
|
-
Tooltip
|
|
92
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Tooltip } from "./Tooltip.js";
|
|
4
|
-
const TooltipEllipsis = ({ text, children, isDisabled }) => {
|
|
5
|
-
const [isEllipsisActive, setIsEllipsisActive] = useState(false);
|
|
6
|
-
const onContentRef = (ref) => {
|
|
7
|
-
if (ref) {
|
|
8
|
-
setIsEllipsisActive(ref.offsetWidth < ref.scrollWidth);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
const content = children(onContentRef);
|
|
12
|
-
if (isEllipsisActive && !isDisabled) {
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
Tooltip,
|
|
15
|
-
{
|
|
16
|
-
text,
|
|
17
|
-
placement: "bottom",
|
|
18
|
-
isDisabled,
|
|
19
|
-
children: content
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
return content;
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
TooltipEllipsis
|
|
27
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const tooltipCva = cva(
|
|
3
|
-
["group max-w-64 rounded-tooltip-rounding-default px-tooltip-side-default py-tooltip-height-default shadow-2"],
|
|
4
|
-
{
|
|
5
|
-
variants: {
|
|
6
|
-
color: {
|
|
7
|
-
default: ["bg-interactive-contained-secondary-idle"],
|
|
8
|
-
error: ["w-max bg-elevation-fill-error-1"]
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
defaultVariants: {
|
|
12
|
-
color: "default"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
const tooltipPointerHorizontalCva = cva(
|
|
17
|
-
["h-2-5 w-5 group-placement-left:hidden group-placement-right:hidden group-placement-top:rotate-180"],
|
|
18
|
-
{
|
|
19
|
-
variants: {
|
|
20
|
-
color: {
|
|
21
|
-
default: ["text-interactive-contained-secondary-idle"],
|
|
22
|
-
error: ["text-elevation-fill-error-1"]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
color: "default"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
const tooltipPointerVerticalCva = cva(
|
|
31
|
-
["h-5 w-2-5 group-placement-bottom:hidden group-placement-top:hidden group-placement-left:rotate-180"],
|
|
32
|
-
{
|
|
33
|
-
variants: {
|
|
34
|
-
color: {
|
|
35
|
-
default: ["text-interactive-contained-secondary-idle"],
|
|
36
|
-
error: ["text-elevation-fill-error-1"]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
color: "default"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
const tooltipTextCva = cva([], {
|
|
45
|
-
variants: {
|
|
46
|
-
color: {
|
|
47
|
-
default: ["text-text-inverted-3"],
|
|
48
|
-
error: ["text-text-error-inverted-1"]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
color: "default"
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
export {
|
|
56
|
-
tooltipCva,
|
|
57
|
-
tooltipPointerHorizontalCva,
|
|
58
|
-
tooltipPointerVerticalCva,
|
|
59
|
-
tooltipTextCva
|
|
60
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { mergeRefs } from "@react-aria/utils";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { useRef, useMemo, Fragment } from "react";
|
|
5
|
-
import { useToggleButtonGroup } from "react-aria";
|
|
6
|
-
import { ToggleButtonGroup } from "react-aria-components";
|
|
7
|
-
import { Controller } from "react-hook-form";
|
|
8
|
-
import { useToggleGroupState } from "react-stately";
|
|
9
|
-
import { FormField } from "../inputs/FormField/FormField.js";
|
|
10
|
-
import { segmentCva } from "./segment.cva.js";
|
|
11
|
-
import { UIStyle } from "../../config/uiStyle.context.js";
|
|
12
|
-
import { SegmentItem } from "./SegmentItem.js";
|
|
13
|
-
const SegmentBase = ({
|
|
14
|
-
className,
|
|
15
|
-
items,
|
|
16
|
-
error,
|
|
17
|
-
onChange,
|
|
18
|
-
value,
|
|
19
|
-
defaultValue,
|
|
20
|
-
...rest
|
|
21
|
-
}) => {
|
|
22
|
-
const props = {
|
|
23
|
-
...rest,
|
|
24
|
-
defaultSelectedKeys: defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0,
|
|
25
|
-
selectedKeys: value ? Array.isArray(value) ? value : [value] : void 0
|
|
26
|
-
};
|
|
27
|
-
const buttonGroupRef = useRef(null);
|
|
28
|
-
const uiStyle = UIStyle.useConfig();
|
|
29
|
-
const state = useToggleGroupState(props);
|
|
30
|
-
const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
|
|
31
|
-
const segmentCva$1 = uiStyle?.segment?.cva ?? segmentCva;
|
|
32
|
-
const formFieldProps = {
|
|
33
|
-
error,
|
|
34
|
-
label: "",
|
|
35
|
-
hideLabel: true,
|
|
36
|
-
isDisabled: props.isDisabled
|
|
37
|
-
};
|
|
38
|
-
const onSelectionChange = (keys) => {
|
|
39
|
-
if (props.selectionMode === "multiple") {
|
|
40
|
-
onChange?.(Array.from(keys.values()));
|
|
41
|
-
} else {
|
|
42
|
-
onChange?.(Array.from(keys.values())[0]);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const gridTemplateColumns = useMemo(() => {
|
|
46
|
-
return items.length > 2 ? Array.from({ length: items.length * 2 - 1 }, (_, i) => i % 2 === 0 ? "1fr" : "auto").join(" ") : `repeat(${items.length}, 1fr)`;
|
|
47
|
-
}, [items.length]);
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
49
|
-
FormField,
|
|
50
|
-
{
|
|
51
|
-
...formFieldProps,
|
|
52
|
-
className: clsx("relative w-full", className),
|
|
53
|
-
children: /* @__PURE__ */ jsx(
|
|
54
|
-
ToggleButtonGroup,
|
|
55
|
-
{
|
|
56
|
-
...props,
|
|
57
|
-
...groupProps,
|
|
58
|
-
ref: buttonGroupRef,
|
|
59
|
-
onSelectionChange,
|
|
60
|
-
className: segmentCva$1({ ...props, className }),
|
|
61
|
-
style: {
|
|
62
|
-
gridTemplateColumns
|
|
63
|
-
},
|
|
64
|
-
children: items.map((item, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
65
|
-
/* @__PURE__ */ jsx(
|
|
66
|
-
SegmentItem,
|
|
67
|
-
{
|
|
68
|
-
...item,
|
|
69
|
-
isDisabled: item.isDisabled || props.isDisabled,
|
|
70
|
-
isSelected: state.selectedKeys.has(item.id),
|
|
71
|
-
onPress: () => {
|
|
72
|
-
state.toggleKey(item.id);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: clsx(
|
|
80
|
-
"h-5 w-px rounded-2xl",
|
|
81
|
-
!state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"
|
|
82
|
-
),
|
|
83
|
-
children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
] }, item.id))
|
|
87
|
-
}
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
const Segment = (props) => {
|
|
93
|
-
if ("formControl" in props && props.formControl) {
|
|
94
|
-
const { formControl, ref, ...innerProps } = props;
|
|
95
|
-
return /* @__PURE__ */ jsx(
|
|
96
|
-
Controller,
|
|
97
|
-
{
|
|
98
|
-
control: formControl.control,
|
|
99
|
-
name: formControl.name,
|
|
100
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
101
|
-
SegmentBase,
|
|
102
|
-
{
|
|
103
|
-
...innerProps,
|
|
104
|
-
ref: mergeRefs(ref, field.ref),
|
|
105
|
-
value: field.value,
|
|
106
|
-
onChange: field.onChange,
|
|
107
|
-
isDisabled: field.disabled || props.isDisabled,
|
|
108
|
-
error: props.error ?? error?.message
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
return /* @__PURE__ */ jsx(SegmentBase, { ...props });
|
|
115
|
-
};
|
|
116
|
-
export {
|
|
117
|
-
Segment
|
|
118
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ToggleButton } from "react-aria-components";
|
|
3
|
-
import { segmentItemCva } from "./segment.cva.js";
|
|
4
|
-
import { Typography } from "../text/Typography/Typography.js";
|
|
5
|
-
import { UIStyle } from "../../config/uiStyle.context.js";
|
|
6
|
-
const SegmentItem = ({ label, icon, id, isDisabled, ...props }) => {
|
|
7
|
-
const IconComponent = icon;
|
|
8
|
-
const iconOnly = !!(icon && !label);
|
|
9
|
-
const uiStyle = UIStyle.useConfig();
|
|
10
|
-
const segmentItemCva$1 = uiStyle?.segment?.itemCva ?? segmentItemCva;
|
|
11
|
-
return /* @__PURE__ */ jsxs(
|
|
12
|
-
ToggleButton,
|
|
13
|
-
{
|
|
14
|
-
...props,
|
|
15
|
-
id,
|
|
16
|
-
className: segmentItemCva$1({ iconOnly }),
|
|
17
|
-
isDisabled,
|
|
18
|
-
children: [
|
|
19
|
-
icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" }),
|
|
20
|
-
label && /* @__PURE__ */ jsx(
|
|
21
|
-
Typography,
|
|
22
|
-
{
|
|
23
|
-
size: "label-2",
|
|
24
|
-
as: "span",
|
|
25
|
-
className: "overflow-hidden text-ellipsis text-center",
|
|
26
|
-
children: label
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
SegmentItem
|
|
35
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const segmentCva = cva([
|
|
3
|
-
"group/segment grid w-fit items-center gap-segmented-control-side-segmented-control p-segmented-control-side-segmented-control",
|
|
4
|
-
"bg-elevation-fill-default-3",
|
|
5
|
-
"rounded-segmented-control-rounding-segmented-control"
|
|
6
|
-
]);
|
|
7
|
-
const segmentItemCva = cva(
|
|
8
|
-
[
|
|
9
|
-
"flex items-center justify-center gap-segmented-control-gap-content-icon-to-text transition-all duration-200",
|
|
10
|
-
"border border-support-transparent-outline",
|
|
11
|
-
"py-segmented-control-height-segment",
|
|
12
|
-
"rounded-segmented-control-rounding-segment",
|
|
13
|
-
"text-interactive-subtle-secondary-on-idle",
|
|
14
|
-
"hover:border-interactive-subtle-secondary-hover hover:bg-interactive-subtle-secondary-hover hover:text-interactive-subtle-secondary-on-hover",
|
|
15
|
-
"pressed:border-interactive-subtle-secondary-pressed pressed:bg-interactive-subtle-secondary-pressed pressed:text-interactive-subtle-secondary-on-pressed",
|
|
16
|
-
"disabled:border-support-transparent-outline disabled:text-interactive-subtle-secondary-on-disabled",
|
|
17
|
-
"selected:border-interactive-subtle-secondary-toggled-idle selected:bg-interactive-subtle-secondary-toggled-idle selected:text-interactive-subtle-secondary-on-toggled-idle",
|
|
18
|
-
"selected:disabled:border-interactive-subtle-secondary-toggled-disabled selected:disabled:bg-interactive-subtle-secondary-toggled-disabled selected:disabled:text-interactive-subtle-secondary-on-toggled-disabled"
|
|
19
|
-
],
|
|
20
|
-
{
|
|
21
|
-
variants: {
|
|
22
|
-
iconOnly: {
|
|
23
|
-
true: "px-segmented-control-height-segment",
|
|
24
|
-
false: "px-segmented-control-side-segment"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
iconOnly: false
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
export {
|
|
33
|
-
segmentCva,
|
|
34
|
-
segmentItemCva
|
|
35
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { NumberInput } from "../../inputs/Input/NumberInput/NumberInput.js";
|
|
5
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
6
|
-
import { ns } from "../../../config/i18n.js";
|
|
7
|
-
import { PaginationList } from "./PaginationList.js";
|
|
8
|
-
const Pagination = ({
|
|
9
|
-
size = "s",
|
|
10
|
-
variant = "subtle",
|
|
11
|
-
color = "secondary",
|
|
12
|
-
page,
|
|
13
|
-
totalItems,
|
|
14
|
-
totalPages,
|
|
15
|
-
pageSize,
|
|
16
|
-
hideText = true,
|
|
17
|
-
hideFirstLast = true,
|
|
18
|
-
hidePrevNext = false,
|
|
19
|
-
hideNumbers = false,
|
|
20
|
-
className,
|
|
21
|
-
onPageChange,
|
|
22
|
-
onPageSizeChange
|
|
23
|
-
}) => {
|
|
24
|
-
const { t } = useTranslation(ns);
|
|
25
|
-
return /* @__PURE__ */ jsxs(
|
|
26
|
-
"nav",
|
|
27
|
-
{
|
|
28
|
-
id: "pagination",
|
|
29
|
-
className: clsx("flex items-center gap-2", className),
|
|
30
|
-
children: [
|
|
31
|
-
totalItems > pageSize && /* @__PURE__ */ jsx(
|
|
32
|
-
PaginationList,
|
|
33
|
-
{
|
|
34
|
-
page,
|
|
35
|
-
size,
|
|
36
|
-
color,
|
|
37
|
-
variant,
|
|
38
|
-
hideText,
|
|
39
|
-
hideFirstLast,
|
|
40
|
-
hidePrevNext,
|
|
41
|
-
hideNumbers,
|
|
42
|
-
totalPages: totalPages ?? Math.ceil(totalItems / pageSize),
|
|
43
|
-
onPageChange
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
47
|
-
/* @__PURE__ */ jsx(
|
|
48
|
-
Typography,
|
|
49
|
-
{
|
|
50
|
-
variant: "default",
|
|
51
|
-
size: "label-2",
|
|
52
|
-
as: "span",
|
|
53
|
-
className: "whitespace-nowrap text-text-default-1",
|
|
54
|
-
children: t(($) => $.ui.pagination.resultsPerPage)
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
NumberInput,
|
|
59
|
-
{
|
|
60
|
-
value: pageSize,
|
|
61
|
-
onChange: (value) => onPageSizeChange?.(Number(value)),
|
|
62
|
-
label: t(($) => $.ui.pagination.resultsPerPage),
|
|
63
|
-
hideLabel: true,
|
|
64
|
-
className: "w-min",
|
|
65
|
-
inputClassName: "min-w-12 !px-3 !py-0-5"
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
] })
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
Pagination
|
|
75
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { ChevronLeftIcon } from "../../../assets/icons/ChevronLeft.js";
|
|
6
|
-
import { ChevronRightIcon } from "../../../assets/icons/ChevronRight.js";
|
|
7
|
-
import { ChevronsLeftIcon } from "../../../assets/icons/ChevronsLeft.js";
|
|
8
|
-
import { ChevronsRightIcon } from "../../../assets/icons/ChevronsRight.js";
|
|
9
|
-
import { Button } from "../../buttons/Button/Button.js";
|
|
10
|
-
import { ns } from "../../../config/i18n.js";
|
|
11
|
-
import { minWidth } from "./minWidth.cva.js";
|
|
12
|
-
const PaginationList = ({
|
|
13
|
-
page,
|
|
14
|
-
totalPages,
|
|
15
|
-
size,
|
|
16
|
-
color,
|
|
17
|
-
variant,
|
|
18
|
-
hideText,
|
|
19
|
-
hideFirstLast,
|
|
20
|
-
hidePrevNext,
|
|
21
|
-
hideNumbers,
|
|
22
|
-
className,
|
|
23
|
-
onPageChange
|
|
24
|
-
}) => {
|
|
25
|
-
const { t } = useTranslation(ns);
|
|
26
|
-
const isPrevDisabled = page <= 1;
|
|
27
|
-
const isNextDisabled = page >= totalPages;
|
|
28
|
-
const renderPageNumbers = useMemo(() => {
|
|
29
|
-
const pagesToShow = [];
|
|
30
|
-
pagesToShow.push(1);
|
|
31
|
-
if (page > 3) {
|
|
32
|
-
pagesToShow.push("ellipsis");
|
|
33
|
-
}
|
|
34
|
-
for (let i = Math.max(2, page - 1); i <= Math.min(totalPages - 1, page + 1); i++) {
|
|
35
|
-
pagesToShow.push(i);
|
|
36
|
-
}
|
|
37
|
-
if (page < totalPages - 2) {
|
|
38
|
-
pagesToShow.push("ellipsis");
|
|
39
|
-
}
|
|
40
|
-
if (totalPages > 1 && !pagesToShow.includes(totalPages)) {
|
|
41
|
-
pagesToShow.push(totalPages);
|
|
42
|
-
}
|
|
43
|
-
return pagesToShow.map((p, index) => {
|
|
44
|
-
if (p === "ellipsis") {
|
|
45
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
-
Button,
|
|
47
|
-
{
|
|
48
|
-
variant,
|
|
49
|
-
color,
|
|
50
|
-
size,
|
|
51
|
-
width: "fill",
|
|
52
|
-
className: clsx(minWidth({ size })),
|
|
53
|
-
children: "..."
|
|
54
|
-
},
|
|
55
|
-
`ellipsis-${index}`
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
return /* @__PURE__ */ jsx(
|
|
59
|
-
Button,
|
|
60
|
-
{
|
|
61
|
-
width: "hug",
|
|
62
|
-
size,
|
|
63
|
-
variant,
|
|
64
|
-
color,
|
|
65
|
-
"data-selected": p === page ? true : void 0,
|
|
66
|
-
className: clsx(p.toString().length <= 2 && minWidth({ size })),
|
|
67
|
-
onPress: () => onPageChange?.(p),
|
|
68
|
-
children: p.toString()
|
|
69
|
-
},
|
|
70
|
-
`page-${p}`
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
}, [page, color, size, variant, totalPages, onPageChange]);
|
|
74
|
-
if (totalPages <= 1) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
const onNext = () => {
|
|
78
|
-
if (!isNextDisabled) {
|
|
79
|
-
onPageChange?.(page + 1);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const onPrevious = () => {
|
|
83
|
-
if (!isPrevDisabled) {
|
|
84
|
-
onPageChange?.(page - 1);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
return /* @__PURE__ */ jsxs("nav", { className: clsx("flex items-center gap-pagination-button-to-button", className), children: [
|
|
88
|
-
!hideFirstLast && /* @__PURE__ */ jsx(
|
|
89
|
-
Button,
|
|
90
|
-
{
|
|
91
|
-
onClick: () => onPageChange?.(1),
|
|
92
|
-
isDisabled: isPrevDisabled,
|
|
93
|
-
size,
|
|
94
|
-
color,
|
|
95
|
-
variant,
|
|
96
|
-
iconOnly: hideText,
|
|
97
|
-
icon: ChevronsLeftIcon,
|
|
98
|
-
children: t(($) => $.ui.pagination.firstBtn)
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
!hidePrevNext && /* @__PURE__ */ jsx(
|
|
102
|
-
Button,
|
|
103
|
-
{
|
|
104
|
-
onClick: onPrevious,
|
|
105
|
-
isDisabled: isPrevDisabled,
|
|
106
|
-
size,
|
|
107
|
-
color,
|
|
108
|
-
variant,
|
|
109
|
-
iconOnly: hideText,
|
|
110
|
-
icon: ChevronLeftIcon,
|
|
111
|
-
children: t(($) => $.ui.pagination.backBtn)
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
!hideNumbers && renderPageNumbers,
|
|
115
|
-
!hidePrevNext && /* @__PURE__ */ jsx(
|
|
116
|
-
Button,
|
|
117
|
-
{
|
|
118
|
-
onClick: onNext,
|
|
119
|
-
isDisabled: isNextDisabled,
|
|
120
|
-
size,
|
|
121
|
-
color,
|
|
122
|
-
variant,
|
|
123
|
-
iconOnly: hideText,
|
|
124
|
-
icon: ChevronRightIcon,
|
|
125
|
-
children: t(($) => $.ui.pagination.nextBtn)
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
!hideFirstLast && /* @__PURE__ */ jsx(
|
|
129
|
-
Button,
|
|
130
|
-
{
|
|
131
|
-
onClick: () => onPageChange?.(totalPages),
|
|
132
|
-
isDisabled: isNextDisabled,
|
|
133
|
-
size,
|
|
134
|
-
color,
|
|
135
|
-
variant,
|
|
136
|
-
iconOnly: hideText,
|
|
137
|
-
icon: ChevronsRightIcon,
|
|
138
|
-
children: t(($) => $.ui.pagination.lastBtn)
|
|
139
|
-
}
|
|
140
|
-
)
|
|
141
|
-
] });
|
|
142
|
-
};
|
|
143
|
-
export {
|
|
144
|
-
PaginationList
|
|
145
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const minWidth = cva("", {
|
|
3
|
-
variants: {
|
|
4
|
-
size: {
|
|
5
|
-
xxs: ["min-w-button-width-min-width-xxs"],
|
|
6
|
-
xs: ["min-w-button-width-min-width-xs"],
|
|
7
|
-
s: ["min-w-button-width-min-width-s"],
|
|
8
|
-
m: ["min-w-button-width-min-width-m"],
|
|
9
|
-
l: ["min-w-button-width-min-width-l"]
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
export {
|
|
14
|
-
minWidth
|
|
15
|
-
};
|