@povio/ui 2.1.14 → 2.1.16
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 +80 -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 +197 -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 +209 -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 +3 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +3 -1
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +3 -1
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +8 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -1
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -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/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/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 -251
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +0 -689
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +0 -265
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +0 -217
- 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 -77
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -206
- 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 -125
- package/dist/components/inputs/DateTime/shared/YearPicker.js +0 -89
- package/dist/components/inputs/File/FileUpload.js +0 -257
- package/dist/components/inputs/File/FileUploadContainer.js +0 -17
- package/dist/components/inputs/File/InputUpload.js +0 -174
- 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 -173
- 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 -69
- 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 -33
- 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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const buttonContent = 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
|
+
export { buttonContent };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { uiGroupOutlineClass } from "./outline.clsx.js";
|
|
2
|
+
import { compoundMapper } from "./compoundMapper.js";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
const checkbox = cva([
|
|
5
|
+
"flex items-center justify-center border-2",
|
|
6
|
+
"relative size-4 shrink-0 rounded-xs p-1",
|
|
7
|
+
uiGroupOutlineClass
|
|
8
|
+
], {
|
|
9
|
+
variants: { variant: { default: [
|
|
10
|
+
"m-1 border-interactive-outlined-secondary-on-idle",
|
|
11
|
+
"text-interactive-contained-primary-on-idle",
|
|
12
|
+
"group-hover:text-interactive-contained-primary-on-hover",
|
|
13
|
+
"group-pressed:text-interactive-contained-primary-on-pressed",
|
|
14
|
+
"group-disabled:text-interactive-contained-primary-on-disabled",
|
|
15
|
+
"group-disabled:border-interactive-outlined-secondary-on-disabled",
|
|
16
|
+
"group-hover:border-interactive-outlined-secondary-on-hover",
|
|
17
|
+
"group-pressed:border-interactive-outlined-secondary-on-pressed",
|
|
18
|
+
"group-selected:border-interactive-contained-primary-idle",
|
|
19
|
+
"group-selected:bg-interactive-contained-primary-idle",
|
|
20
|
+
"group-selected:group-hover:bg-interactive-contained-primary-hover",
|
|
21
|
+
"group-selected:group-hover:border-interactive-contained-primary-hover",
|
|
22
|
+
"group-selected:group-pressed:bg-interactive-contained-primary-pressed",
|
|
23
|
+
"group-selected:group-pressed:border-interactive-contained-primary-pressed",
|
|
24
|
+
"group-indeterminate:border-interactive-contained-primary-idle",
|
|
25
|
+
"group-indeterminate:bg-interactive-contained-primary-idle",
|
|
26
|
+
"group-indeterminate:group-hover:bg-interactive-contained-primary-hover",
|
|
27
|
+
"group-indeterminate:group-hover:border-interactive-contained-primary-hover",
|
|
28
|
+
"group-indeterminate:group-pressed:bg-interactive-contained-primary-pressed",
|
|
29
|
+
"group-indeterminate:group-pressed:border-interactive-contained-primary-pressed",
|
|
30
|
+
"group-invalid:border-interactive-outlined-error-on-idle",
|
|
31
|
+
"group-focus-visible:outline-interactive-contained-primary-focus"
|
|
32
|
+
] } },
|
|
33
|
+
defaultVariants: { variant: "default" }
|
|
34
|
+
});
|
|
35
|
+
const checkboxIndicatorClass = "group flex items-center gap-2";
|
|
36
|
+
const checkboxTypography = compoundMapper({ default: {
|
|
37
|
+
size: "label-1",
|
|
38
|
+
variant: "default"
|
|
39
|
+
} });
|
|
40
|
+
const checkboxIcon = cva(["absolute hidden size-3"], {
|
|
41
|
+
variants: { iconVariant: {
|
|
42
|
+
selected: ["group-selected:block"],
|
|
43
|
+
indeterminate: ["group-indeterminate:block"]
|
|
44
|
+
} },
|
|
45
|
+
defaultVariants: { iconVariant: "selected" }
|
|
46
|
+
});
|
|
47
|
+
export { checkbox, checkboxIcon, checkboxIndicatorClass, checkboxTypography };
|
|
@@ -10,6 +10,7 @@ interface CheckboxBaseProps extends FormFieldErrorProps, CheckboxVariantProps, O
|
|
|
10
10
|
hideLabel?: boolean;
|
|
11
11
|
selectedIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
12
12
|
indeterminateIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
13
|
+
isDirty?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export type CheckboxProps = CheckboxBaseProps;
|
|
15
16
|
export type ControlledCheckboxProps<TFieldValues extends FieldValues> = ControlProps<CheckboxProps, TFieldValues, "isSelected">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { CheckboxVariantProps } from './checkbox.cva';
|
|
3
|
-
interface CheckboxCheckmarkProps extends CheckboxVariantProps {
|
|
2
|
+
import { CheckboxIconVariantProps, CheckboxVariantProps } from './checkbox.cva';
|
|
3
|
+
interface CheckboxCheckmarkProps extends CheckboxVariantProps, CheckboxIconVariantProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
selectedIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
6
6
|
indeterminateIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
@@ -9,3 +9,8 @@ export declare const checkboxIndicatorClass = "group flex items-center gap-2";
|
|
|
9
9
|
export declare const checkboxTypography: (props: {
|
|
10
10
|
variant?: "default" | null | undefined;
|
|
11
11
|
}) => TypographyVariantProps | undefined;
|
|
12
|
+
export declare const checkboxIcon: (props?: ({
|
|
13
|
+
iconVariant?: "selected" | "indeterminate" | null | undefined;
|
|
14
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
|
+
export interface CheckboxIconVariantProps extends VariantProps<typeof checkboxIcon> {
|
|
16
|
+
}
|
|
@@ -2,15 +2,17 @@ import { CalendarDate, DateValue } from '@internationalized/date';
|
|
|
2
2
|
import { Ref } from 'react';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { DatePickerStateOptions } from 'react-stately';
|
|
5
|
+
import { DatePickerInputHandle } from '../shared/DatePickerInput';
|
|
5
6
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
6
7
|
import { ControlProps } from '../../shared/form.types';
|
|
7
8
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
8
9
|
interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<CalendarDate>, "granularity" | "shouldCloseOnSelect" | "label"> {
|
|
9
|
-
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
10
11
|
disableDropdown?: boolean;
|
|
11
12
|
isClearable?: boolean;
|
|
12
13
|
className?: string;
|
|
13
14
|
todayIcon?: boolean;
|
|
15
|
+
isDirty?: boolean;
|
|
14
16
|
disableManualEntry?: boolean;
|
|
15
17
|
placeholder?: string;
|
|
16
18
|
}
|
|
@@ -3,16 +3,18 @@ import { Ref } from 'react';
|
|
|
3
3
|
import { DateValue } from 'react-aria';
|
|
4
4
|
import { FieldValues } from 'react-hook-form';
|
|
5
5
|
import { DateRangePickerStateOptions } from 'react-stately';
|
|
6
|
+
import { DatePickerInputHandle } from '../shared/DatePickerInput';
|
|
6
7
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
7
8
|
import { ControlProps } from '../../shared/form.types';
|
|
8
9
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
9
10
|
interface DateRangePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DateRangePickerStateOptions<CalendarDate>, "granularity" | "shouldCloseOnSelect" | "label"> {
|
|
10
|
-
ref?: Ref<HTMLDivElement>;
|
|
11
|
+
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
11
12
|
disableDropdown?: boolean;
|
|
12
13
|
isClearable?: boolean;
|
|
13
14
|
hideSidebar?: boolean;
|
|
14
15
|
className?: string;
|
|
15
16
|
todayIcon?: boolean;
|
|
17
|
+
isDirty?: boolean;
|
|
16
18
|
disableManualEntry?: boolean;
|
|
17
19
|
placeholder?: string;
|
|
18
20
|
}
|
|
@@ -2,15 +2,17 @@ import { Ref } from 'react';
|
|
|
2
2
|
import { DateValue } from 'react-aria';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { DatePickerStateOptions } from 'react-stately';
|
|
5
|
+
import { DatePickerInputHandle } from '../shared/DatePickerInput';
|
|
5
6
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
6
7
|
import { ControlProps } from '../../shared/form.types';
|
|
7
8
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
8
9
|
interface DateTimePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<DateValue>, "granularity" | "shouldCloseOnSelect" | "label"> {
|
|
9
|
-
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
10
11
|
disableDropdown?: boolean;
|
|
11
12
|
isTimeOptional?: boolean;
|
|
12
13
|
isClearable?: boolean;
|
|
13
14
|
todayIcon?: boolean;
|
|
15
|
+
isDirty?: boolean;
|
|
14
16
|
disableManualEntry?: boolean;
|
|
15
17
|
placeholder?: string;
|
|
16
18
|
}
|
|
@@ -2,6 +2,7 @@ import { DateFieldStateOptions } from '@react-stately/datepicker';
|
|
|
2
2
|
import { Ref } from 'react';
|
|
3
3
|
export interface DateFieldHandle {
|
|
4
4
|
clearField: () => void;
|
|
5
|
+
autoFixYear: () => void;
|
|
5
6
|
}
|
|
6
7
|
interface DateFieldProps extends Omit<DateFieldStateOptions, "locale" | "createCalendar"> {
|
|
7
8
|
ref?: Ref<DateFieldHandle>;
|
|
@@ -2,8 +2,12 @@ import { Ref } from 'react';
|
|
|
2
2
|
import { DatePickerAria } from 'react-aria';
|
|
3
3
|
import { FormFieldHeaderProps } from '../../FormField/FormFieldHeader';
|
|
4
4
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
5
|
+
export interface DatePickerInputHandle {
|
|
6
|
+
clear: () => void;
|
|
7
|
+
getContainer?: () => HTMLDivElement | null;
|
|
8
|
+
}
|
|
5
9
|
interface DatePickerInputProps extends InputVariantProps {
|
|
6
|
-
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
7
11
|
groupProps: DatePickerAria["groupProps"];
|
|
8
12
|
fieldProps: DatePickerAria["fieldProps"];
|
|
9
13
|
endFieldProps?: DatePickerAria["fieldProps"];
|
|
@@ -15,9 +19,11 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
15
19
|
isClearable?: boolean;
|
|
16
20
|
headerProps?: FormFieldHeaderProps;
|
|
17
21
|
todayIcon?: boolean;
|
|
22
|
+
isDirty?: boolean;
|
|
23
|
+
isRequired?: boolean;
|
|
18
24
|
disableManualEntry?: boolean;
|
|
19
25
|
placeholder?: string;
|
|
20
26
|
onOpenDropdown?: () => void;
|
|
21
27
|
}
|
|
22
|
-
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, disableManualEntry, placeholder, onOpenDropdown, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, isDirty, isRequired, disableManualEntry, placeholder, onOpenDropdown, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
29
|
export {};
|
|
@@ -8,6 +8,7 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
8
8
|
fieldProps: DateFieldAria["fieldProps"];
|
|
9
9
|
state: TimeFieldState;
|
|
10
10
|
isDisabled?: boolean;
|
|
11
|
+
isDirty?: boolean;
|
|
11
12
|
isInvalid?: boolean;
|
|
12
13
|
disableDropdown?: boolean;
|
|
13
14
|
headerProps?: FormFieldHeaderProps;
|
|
@@ -16,5 +17,5 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
16
17
|
placeholder?: string;
|
|
17
18
|
onPress: () => void;
|
|
18
19
|
}
|
|
19
|
-
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, onPress, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, onPress, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -74,6 +74,7 @@ export type FileUploadBaseProps = {
|
|
|
74
74
|
uploadText?: string;
|
|
75
75
|
browseText?: string;
|
|
76
76
|
value?: FileUploadState[];
|
|
77
|
+
clearOnSuccess?: boolean;
|
|
77
78
|
children?: (props: FileUploadContainerChildrenProps) => ReactNode;
|
|
78
79
|
listRenderer?: (props: FileUploadContainerChildrenProps) => ReactNode;
|
|
79
80
|
} & FormFieldProps & FileUploadVariant & Omit<FileTriggerProps, "children" | "onSelect" | "allowsMultiple" | "value"> & Omit<DropZoneProps, "children" | "onDrop" | "value"> & GroupedFileUploadProps & FileUploadCallbacks;
|
|
@@ -12,6 +12,9 @@ interface FormFieldComponentProps extends PropsWithChildren<FormFieldProps> {
|
|
|
12
12
|
ref?: Ref<HTMLDivElement>;
|
|
13
13
|
labelProps?: FormFieldHeaderProps["labelProps"];
|
|
14
14
|
as?: TextInputProps["as"];
|
|
15
|
+
tabIndex?: number;
|
|
16
|
+
onMouseEnter?: () => void;
|
|
17
|
+
onFocusCapture?: () => void;
|
|
15
18
|
}
|
|
16
|
-
export declare const FormField: ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, }: FormFieldComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const FormField: ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, tabIndex, onMouseEnter, onFocusCapture, }: FormFieldComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
20
|
export {};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { Ref } from 'react';
|
|
1
|
+
import { FocusEvent, Ref } from 'react';
|
|
2
2
|
import { NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
5
5
|
import { InputContentProps } from '../shared/InputContent';
|
|
6
6
|
import { ControlProps } from '../../shared/form.types';
|
|
7
7
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
8
|
-
interface NumberInputBaseProps extends FormFieldProps, InputVariantProps, Omit<InputContentProps, "ref" | "value" | "onChange">, Omit<AriaNumberFieldProps, "value" | "onChange" | "className"> {
|
|
8
|
+
interface NumberInputBaseProps extends FormFieldProps, InputVariantProps, Omit<InputContentProps, "ref" | "value" | "onChange" | "onBlur">, Omit<AriaNumberFieldProps, "value" | "onChange" | "className" | "onBlur"> {
|
|
9
9
|
ref?: Ref<HTMLInputElement>;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
inputClassName?: string;
|
|
12
|
+
isDirty?: boolean;
|
|
12
13
|
value?: number | null;
|
|
13
14
|
onChange?: (value: number | null) => void;
|
|
15
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
14
16
|
}
|
|
15
17
|
export type NumberInputProps = NumberInputBaseProps;
|
|
16
18
|
export type ControlledNumberInputProps<TFieldValues extends FieldValues> = ControlProps<NumberInputProps, TFieldValues>;
|
|
@@ -8,6 +8,7 @@ import { InputVariantProps } from '../../shared/input.cva';
|
|
|
8
8
|
interface TextAreaBaseProps extends FormFieldProps, InputVariantProps, Omit<AriaTextAreaProps, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLTextAreaElement>, "label"> {
|
|
9
9
|
ref?: Ref<HTMLTextAreaElement>;
|
|
10
10
|
isClearable?: boolean;
|
|
11
|
+
isDirty?: boolean;
|
|
11
12
|
inputClassName?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface TextAreaProps extends TextAreaBaseProps {
|
|
@@ -7,11 +7,12 @@ import { InputContentProps } from '../shared/InputContent';
|
|
|
7
7
|
import { ControlProps } from '../../shared/form.types';
|
|
8
8
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
9
9
|
type AllowedHTMLInputTypeAttribute = "email" | "hidden" | "tel" | "text" | "url";
|
|
10
|
-
interface TextInputBaseProps extends FormFieldProps, InputVariantProps, Omit<InputContentProps, "ref" | "value" | "onChange">, Omit<AriaInputProps, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "type" | "size" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLInputElement>, "label"> {
|
|
10
|
+
interface TextInputBaseProps extends FormFieldProps, InputVariantProps, Omit<InputContentProps, "ref" | "value" | "onChange" | "onBlur">, Omit<AriaInputProps, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "type" | "size" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLInputElement>, "label"> {
|
|
11
11
|
ref?: Ref<HTMLInputElement>;
|
|
12
12
|
inputClassName?: string;
|
|
13
13
|
type?: AllowedHTMLInputTypeAttribute;
|
|
14
14
|
todayIcon?: boolean;
|
|
15
|
+
isDirty?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export interface TextInputProps extends TextInputBaseProps {
|
|
17
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, FC, ReactElement, ReactNode, SVGProps } from 'react';
|
|
1
|
+
import { CSSProperties, FC, FocusEvent, ReactElement, ReactNode, SVGProps } from 'react';
|
|
2
2
|
import { InlineIconButtonProps } from '../../../buttons/InlineIconButton/InlineIconButton';
|
|
3
3
|
import { FormFieldHeaderProps } from '../../FormField/FormFieldHeader';
|
|
4
4
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
@@ -16,12 +16,13 @@ export interface InputContentProps {
|
|
|
16
16
|
leadingIcon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
17
17
|
trailingIcon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
18
18
|
isClearable?: boolean;
|
|
19
|
-
value?: string;
|
|
19
|
+
value?: string | number | null;
|
|
20
20
|
onChange?: (value: string) => void;
|
|
21
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
21
22
|
headerProps?: FormFieldHeaderProps;
|
|
22
23
|
}
|
|
23
24
|
interface InputContentComponentProps extends InputContentProps, InputVariantProps {
|
|
24
25
|
children: (style: CSSProperties) => ReactNode;
|
|
25
26
|
}
|
|
26
|
-
export declare const InputContent: ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, children, headerProps, as, size, }: InputContentComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const InputContent: ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, onBlur, children, headerProps, as, size, }: InputContentComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -10,6 +10,9 @@ interface RadioGroupBaseProps extends Omit<FormFieldProps, "variant">, RadioVari
|
|
|
10
10
|
label: string | ReactElement;
|
|
11
11
|
value: string;
|
|
12
12
|
}[];
|
|
13
|
+
isDirty?: boolean;
|
|
14
|
+
inputClassName?: string;
|
|
15
|
+
labelClassName?: string;
|
|
13
16
|
}
|
|
14
17
|
export interface RadioGroupProps extends RadioGroupBaseProps {
|
|
15
18
|
}
|
|
@@ -14,6 +14,7 @@ export interface TextEditorBaseProps extends FormFieldProps {
|
|
|
14
14
|
onChange?: (value: TextEditorValue | null) => void;
|
|
15
15
|
onBlur?: () => void;
|
|
16
16
|
as?: "default" | "filter" | "floating" | "inline" | null;
|
|
17
|
+
editorClassName?: string;
|
|
17
18
|
}
|
|
18
19
|
export type TextEditorProps = TextEditorBaseProps;
|
|
19
20
|
export type ControlledTextEditorProps<TFieldValues extends FieldValues> = ControlProps<TextEditorProps, TFieldValues>;
|
|
@@ -7,6 +7,8 @@ import { ToggleVariantProps } from './toggle.cva';
|
|
|
7
7
|
interface ToggleBaseProps extends FormFieldErrorProps, ToggleVariantProps, Omit<AriaSwitchProps, "className"> {
|
|
8
8
|
ref?: Ref<HTMLLabelElement>;
|
|
9
9
|
children?: string;
|
|
10
|
+
isDirty?: boolean;
|
|
11
|
+
isRequired?: boolean;
|
|
10
12
|
}
|
|
11
13
|
export type ToggleProps = ToggleBaseProps;
|
|
12
14
|
export type ControlledToggleProps<TFieldValues extends FieldValues> = ControlProps<ToggleProps, TFieldValues, "isSelected">;
|
|
@@ -2,6 +2,7 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { TypographyVariantProps } from '../../text/Typography/typography.cva';
|
|
3
3
|
interface CheckContentProps {
|
|
4
4
|
typography?: TypographyVariantProps;
|
|
5
|
+
className?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare const CheckContent: ({ children, ...props }: PropsWithChildren<CheckContentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const CheckContent: ({ children, className, ...props }: PropsWithChildren<CheckContentProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const compoundMapper = (config) => {
|
|
2
|
+
return (props) => {
|
|
3
|
+
return (config.compoundVariants?.find((v) => {
|
|
4
|
+
return Object.entries(v).filter(([key]) => key !== "value").every(([key, value]) => {
|
|
5
|
+
const prop = props[key] || config.defaultVariants?.[key];
|
|
6
|
+
return Array.isArray(value) ? value.includes(prop) : prop === value;
|
|
7
|
+
});
|
|
8
|
+
}))?.value ?? config.default;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export { compoundMapper };
|
|
@@ -2,7 +2,7 @@ import { ClassProp } from 'class-variance-authority/types';
|
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { ButtonVariantProps } from '../components/buttons/Button/button.cva';
|
|
4
4
|
import { PillButtonVariants } from '../components/buttons/PillButton/pillButton.cva';
|
|
5
|
-
import { CheckboxVariantProps } from '../components/inputs/Checkbox/checkbox.cva';
|
|
5
|
+
import { CheckboxIconVariantProps, CheckboxVariantProps } from '../components/inputs/Checkbox/checkbox.cva';
|
|
6
6
|
import { RadioVariantProps } from '../components/inputs/RadioGroup/radio.cva';
|
|
7
7
|
import { InputBaseProps, InputSideProps, InputSizeProps } from '../components/inputs/shared/input.cva';
|
|
8
8
|
import { LabelBaseProps } from '../components/inputs/shared/label.cva';
|
|
@@ -34,6 +34,7 @@ export declare namespace UIStyle {
|
|
|
34
34
|
};
|
|
35
35
|
checkbox: {
|
|
36
36
|
cva?: Cva<CheckboxVariantProps>;
|
|
37
|
+
iconCva?: Cva<CheckboxIconVariantProps>;
|
|
37
38
|
typography?: CompoundMapper<TypographyVariantProps, CheckboxVariantProps>;
|
|
38
39
|
};
|
|
39
40
|
radio: {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ns } from "./i18n.js";
|
|
2
|
+
import { ActionModal } from "./ActionModal.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { createContext, use, useCallback, useMemo, useState } from "react";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
let Confirmation;
|
|
7
|
+
(function(_Confirmation) {
|
|
8
|
+
const DEFAULT_STATE = {
|
|
9
|
+
heading: "",
|
|
10
|
+
description: "",
|
|
11
|
+
isOpen: false,
|
|
12
|
+
primaryAction: {
|
|
13
|
+
label: "",
|
|
14
|
+
onPress: () => {}
|
|
15
|
+
},
|
|
16
|
+
secondaryAction: {
|
|
17
|
+
label: "",
|
|
18
|
+
onPress: () => {}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const Context = createContext(null);
|
|
22
|
+
_Confirmation.Provider = ({ children }) => {
|
|
23
|
+
const [state, setState] = useState(DEFAULT_STATE);
|
|
24
|
+
const { t } = useTranslation("ui");
|
|
25
|
+
const onCancel = () => setState(DEFAULT_STATE);
|
|
26
|
+
const confirm = useCallback(async ({ heading, description, buttonSize, textAlign, modalClassName, cancelLabel = t(($) => $.ui.confirmation.cancel), confirmLabel = t(($) => $.ui.confirmation.confirm), confirmVariant, confirmColor, cancelVariant, cancelColor }) => {
|
|
27
|
+
return new Promise((resolve) => {
|
|
28
|
+
setState({
|
|
29
|
+
heading,
|
|
30
|
+
description,
|
|
31
|
+
buttonSize,
|
|
32
|
+
textAlign,
|
|
33
|
+
modalClassName,
|
|
34
|
+
primaryAction: {
|
|
35
|
+
label: confirmLabel,
|
|
36
|
+
onPress() {
|
|
37
|
+
setState({
|
|
38
|
+
...state,
|
|
39
|
+
isOpen: false,
|
|
40
|
+
heading: "",
|
|
41
|
+
description: ""
|
|
42
|
+
});
|
|
43
|
+
resolve(true);
|
|
44
|
+
},
|
|
45
|
+
variant: confirmVariant,
|
|
46
|
+
color: confirmColor
|
|
47
|
+
},
|
|
48
|
+
secondaryAction: {
|
|
49
|
+
label: cancelLabel,
|
|
50
|
+
onPress() {
|
|
51
|
+
onCancel();
|
|
52
|
+
resolve(false);
|
|
53
|
+
},
|
|
54
|
+
variant: cancelVariant,
|
|
55
|
+
color: cancelColor
|
|
56
|
+
},
|
|
57
|
+
isOpen: !state.isOpen
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}, [state, t]);
|
|
61
|
+
const value = useMemo(() => ({ confirm }), [confirm]);
|
|
62
|
+
return /* @__PURE__ */ jsxs(Context.Provider, {
|
|
63
|
+
value,
|
|
64
|
+
children: [/* @__PURE__ */ jsx(ActionModal, {
|
|
65
|
+
...state,
|
|
66
|
+
onClose: state.secondaryAction?.onPress ?? onCancel,
|
|
67
|
+
primaryAction: state.primaryAction,
|
|
68
|
+
secondaryAction: state.secondaryAction
|
|
69
|
+
}), children]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
_Confirmation.useConfirmation = () => {
|
|
73
|
+
const context = use(Context);
|
|
74
|
+
if (!context) throw new Error("Confirmation.useConfirmation must be used within a Confirmation.Provider");
|
|
75
|
+
return context;
|
|
76
|
+
};
|
|
77
|
+
})(Confirmation || (Confirmation = {}));
|
|
78
|
+
export { Confirmation };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CalendarDate, CalendarDateTime, fromDate, getLocalTimeZone, parseAbsolute, parseAbsoluteToLocal } from "@internationalized/date";
|
|
2
|
+
let DateTimeUtils;
|
|
3
|
+
(function(_DateTimeUtils) {
|
|
4
|
+
function fromISOtoZonedDateTime(isoString) {
|
|
5
|
+
return parseAbsoluteToLocal(isoString);
|
|
6
|
+
}
|
|
7
|
+
_DateTimeUtils.fromISOtoZonedDateTime = fromISOtoZonedDateTime;
|
|
8
|
+
function fromDateValueToISO(dateValue) {
|
|
9
|
+
return dateValue.toDate(getLocalTimeZone()).toISOString();
|
|
10
|
+
}
|
|
11
|
+
_DateTimeUtils.fromDateValueToISO = fromDateValueToISO;
|
|
12
|
+
function fromLocalToZonedDateTime(date) {
|
|
13
|
+
return fromDate(date, getLocalTimeZone());
|
|
14
|
+
}
|
|
15
|
+
_DateTimeUtils.fromLocalToZonedDateTime = fromLocalToZonedDateTime;
|
|
16
|
+
function fromDateValueToLocal(dateValue) {
|
|
17
|
+
return dateValue.toDate(getLocalTimeZone());
|
|
18
|
+
}
|
|
19
|
+
_DateTimeUtils.fromDateValueToLocal = fromDateValueToLocal;
|
|
20
|
+
function fromCalendarDateToUTCISO(calendarDate, options = {}) {
|
|
21
|
+
if (options.endOfDay) return new CalendarDateTime(calendarDate.year, calendarDate.month, calendarDate.day, 23, 59, 59, 999).toDate("UTC").toISOString();
|
|
22
|
+
return calendarDate.toDate("UTC").toISOString();
|
|
23
|
+
}
|
|
24
|
+
_DateTimeUtils.fromCalendarDateToUTCISO = fromCalendarDateToUTCISO;
|
|
25
|
+
function fromUTCISOToCalendarDate(isoString) {
|
|
26
|
+
const date = new Date(isoString);
|
|
27
|
+
return new CalendarDate(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate());
|
|
28
|
+
}
|
|
29
|
+
_DateTimeUtils.fromUTCISOToCalendarDate = fromUTCISOToCalendarDate;
|
|
30
|
+
function fromCalendarDateTimeToUTCISO(calendarDateTime) {
|
|
31
|
+
return calendarDateTime.toDate("UTC").toISOString();
|
|
32
|
+
}
|
|
33
|
+
_DateTimeUtils.fromCalendarDateTimeToUTCISO = fromCalendarDateTimeToUTCISO;
|
|
34
|
+
function fromUTCISOToCalendarDateTime(isoString) {
|
|
35
|
+
const zonedDateTime = parseAbsolute(isoString, "UTC");
|
|
36
|
+
return new CalendarDateTime(zonedDateTime.year, zonedDateTime.month, zonedDateTime.day, zonedDateTime.hour, zonedDateTime.minute, zonedDateTime.second, zonedDateTime.millisecond);
|
|
37
|
+
}
|
|
38
|
+
_DateTimeUtils.fromUTCISOToCalendarDateTime = fromUTCISOToCalendarDateTime;
|
|
39
|
+
function formatTextDateToCalendarDateTime(textDate) {
|
|
40
|
+
if (!textDate?.includes("hh")) return null;
|
|
41
|
+
const datePart = textDate.split(",").at(0)?.trim();
|
|
42
|
+
if (!datePart) return null;
|
|
43
|
+
const date = new Date(datePart);
|
|
44
|
+
if (!date || date.toString() === "Invalid Date") return null;
|
|
45
|
+
const zonedDateTime = fromDate(date, getLocalTimeZone());
|
|
46
|
+
return new CalendarDateTime(zonedDateTime.year, zonedDateTime.month, zonedDateTime.day, 0, 0, 0, 0);
|
|
47
|
+
}
|
|
48
|
+
_DateTimeUtils.formatTextDateToCalendarDateTime = formatTextDateToCalendarDateTime;
|
|
49
|
+
})(DateTimeUtils || (DateTimeUtils = {}));
|
|
50
|
+
export { DateTimeUtils };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
let DateUtils;
|
|
3
|
+
(function(_DateUtils) {
|
|
4
|
+
const DATE_FORMAT = "dd/MM/yyyy";
|
|
5
|
+
const DATETIME_FORMAT = "dd/MM/yyyy HH:mm:ss";
|
|
6
|
+
function formatDate(date, format = DATE_FORMAT) {
|
|
7
|
+
return DateTime.fromJSDate(date).toFormat(format);
|
|
8
|
+
}
|
|
9
|
+
_DateUtils.formatDate = formatDate;
|
|
10
|
+
function formatRelativeTime(date, options) {
|
|
11
|
+
const dateTime = typeof date === "string" ? DateTime.fromISO(date) : DateTime.fromJSDate(date);
|
|
12
|
+
if (!dateTime.isValid) return formatDate(typeof date === "string" ? new Date(date) : date, DATETIME_FORMAT);
|
|
13
|
+
return dateTime.toRelative(options) || formatDate(dateTime.toJSDate(), DATETIME_FORMAT);
|
|
14
|
+
}
|
|
15
|
+
_DateUtils.formatRelativeTime = formatRelativeTime;
|
|
16
|
+
})(DateUtils || (DateUtils = {}));
|
|
17
|
+
export { DateUtils };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
let DomUtils;
|
|
2
|
+
(function(_DomUtils) {
|
|
3
|
+
const KEYBOARD_INPUTS = new Set([
|
|
4
|
+
"button",
|
|
5
|
+
"submit",
|
|
6
|
+
"checkbox",
|
|
7
|
+
"file",
|
|
8
|
+
"image"
|
|
9
|
+
]);
|
|
10
|
+
_DomUtils.isKeyboardInput = (elem) => {
|
|
11
|
+
return elem.tagName === "INPUT" && !KEYBOARD_INPUTS.has(elem.type) || elem.hasAttribute("contenteditable");
|
|
12
|
+
};
|
|
13
|
+
_DomUtils.isKeyboardEvent = (event) => {
|
|
14
|
+
return event.nativeEvent instanceof KeyboardEvent;
|
|
15
|
+
};
|
|
16
|
+
})(DomUtils || (DomUtils = {}));
|
|
17
|
+
export { DomUtils };
|