@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,92 @@
|
|
|
1
|
+
import { ClockIcon } from "./Clock.js";
|
|
2
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
+
import { Typography } from "./Typography.js";
|
|
4
|
+
import { InlineIconButton } from "./InlineIconButton.js";
|
|
5
|
+
import { inputSide, useInputCva } from "./input.cva.js";
|
|
6
|
+
import { FormFieldLabel } from "./FormFieldLabel.js";
|
|
7
|
+
import { InputClear } from "./InputClear.js";
|
|
8
|
+
import { TimeField } from "./TimeField.js";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { Button } from "react-aria-components";
|
|
12
|
+
import { useMemo, useState } from "react";
|
|
13
|
+
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
14
|
+
import useMeasure from "react-use-measure";
|
|
15
|
+
const TimePickerInput = ({ ref, as, fieldProps, state, isDisabled, isDirty, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, onPress,...props }) => {
|
|
16
|
+
const inputCva = useInputCva();
|
|
17
|
+
const inputSideCva = UIStyle.useConfig()?.input?.sideCva ?? inputSide;
|
|
18
|
+
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
19
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
20
|
+
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
|
|
21
|
+
const { isFocusVisible } = useFocusVisible();
|
|
22
|
+
const [labelContentRef, { width: labelWidth }] = useMeasure();
|
|
23
|
+
const hidePlaceholder = as === "floating" && !state.value && !isFocused;
|
|
24
|
+
const style = useMemo(() => {
|
|
25
|
+
return { paddingLeft: as === "filter" ? `calc(var(${inputSideCva({
|
|
26
|
+
size,
|
|
27
|
+
type: "var"
|
|
28
|
+
})}) + ${labelWidth}px)` : "0px" };
|
|
29
|
+
}, [
|
|
30
|
+
labelWidth,
|
|
31
|
+
as,
|
|
32
|
+
size,
|
|
33
|
+
inputSideCva
|
|
34
|
+
]);
|
|
35
|
+
const canClear = state.segments.some((segment) => segment.type !== "literal" && segment.isPlaceholder === false);
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
37
|
+
ref,
|
|
38
|
+
className: inputCva({
|
|
39
|
+
variant,
|
|
40
|
+
as,
|
|
41
|
+
size,
|
|
42
|
+
...props,
|
|
43
|
+
className: clsx("group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2")
|
|
44
|
+
}),
|
|
45
|
+
"data-rac": "",
|
|
46
|
+
"data-hovered": isHovered || void 0,
|
|
47
|
+
"data-disabled": isDisabled || void 0,
|
|
48
|
+
"data-invalid": isInvalid || void 0,
|
|
49
|
+
"data-is-empty": state.value === null || void 0,
|
|
50
|
+
"data-focus-within": isFocused || void 0,
|
|
51
|
+
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
52
|
+
"data-has-selection": state.value !== null || void 0,
|
|
53
|
+
"data-is-dirty": isDirty || void 0,
|
|
54
|
+
...fieldProps,
|
|
55
|
+
...focusWithinProps,
|
|
56
|
+
...hoverProps,
|
|
57
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [
|
|
58
|
+
disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
59
|
+
onPress,
|
|
60
|
+
className: "absolute inset-0 z-0"
|
|
61
|
+
}),
|
|
62
|
+
as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
63
|
+
ref: labelContentRef,
|
|
64
|
+
as,
|
|
65
|
+
...headerProps
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ jsx("div", {
|
|
68
|
+
style,
|
|
69
|
+
children: disableManualEntry && placeholder && !state.value ? /* @__PURE__ */ jsx(Typography, {
|
|
70
|
+
size: "label-1",
|
|
71
|
+
className: "text-text-default-3",
|
|
72
|
+
children: placeholder
|
|
73
|
+
}) : /* @__PURE__ */ jsx(TimeField, {
|
|
74
|
+
fieldProps,
|
|
75
|
+
state,
|
|
76
|
+
isDisabled,
|
|
77
|
+
hidePlaceholder
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
] }), /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: clsx("relative z-1 flex items-center gap-2", as === "floating" && "-mt-4"),
|
|
82
|
+
children: [isClearable && canClear && /* @__PURE__ */ jsx(InputClear, { onClear: () => state.setValue(null) }), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
83
|
+
label: "",
|
|
84
|
+
color: "secondary",
|
|
85
|
+
onPress,
|
|
86
|
+
icon: ClockIcon,
|
|
87
|
+
isDisabled
|
|
88
|
+
})]
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
export { TimePickerInput };
|
package/dist/Toast.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Loader } from "./Loader.js";
|
|
2
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
+
import { Typography } from "./Typography.js";
|
|
4
|
+
import { Button } from "./Button.js";
|
|
5
|
+
import { statusIcon, statusSeparator } from "./status.cva.js";
|
|
6
|
+
import { buttonColorVariant, toast as toast$1, toastContainer, toastWrapper } from "./toast.cva.js";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { ToastContainer } from "react-toastify";
|
|
9
|
+
const Toast = ({ text, isLoading = false, actions = [], icon: Icon,...props }) => {
|
|
10
|
+
const uiStyle = UIStyle.useConfig();
|
|
11
|
+
const toastCva = uiStyle?.toast?.cva ?? toast$1;
|
|
12
|
+
const buttonColor = uiStyle?.toast?.buttonColor ?? buttonColorVariant;
|
|
13
|
+
const iconCva = uiStyle?.status?.iconCva ?? statusIcon;
|
|
14
|
+
const separatorCva = uiStyle?.status?.separatorCva ?? statusSeparator;
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: toastCva({ ...props }),
|
|
17
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "flex items-start gap-toast-gap-icon-to-text px-toast-side-default py-toast-height-content",
|
|
19
|
+
children: [
|
|
20
|
+
isLoading && /* @__PURE__ */ jsx(Loader, {
|
|
21
|
+
size: "default",
|
|
22
|
+
className: "shrink-0"
|
|
23
|
+
}),
|
|
24
|
+
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({ ...props }) }),
|
|
25
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
26
|
+
size: "label-2",
|
|
27
|
+
children: text
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}), actions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { className: separatorCva({ ...props }) }), /* @__PURE__ */ jsx("div", {
|
|
31
|
+
className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-toast-gap-action px-toast-side-default py-toast-height-actions-mobile md:w-auto md:justify-center md:py-toast-height-actions-desktop",
|
|
32
|
+
children: actions.map(({ text: buttonText, onPress }) => /* @__PURE__ */ jsx(Button, {
|
|
33
|
+
onPress,
|
|
34
|
+
...buttonColor({ ...props }),
|
|
35
|
+
variant: "text",
|
|
36
|
+
size: "none",
|
|
37
|
+
width: "hug",
|
|
38
|
+
children: buttonText
|
|
39
|
+
}, buttonText))
|
|
40
|
+
})] })]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const ToastContainer$1 = () => {
|
|
44
|
+
return /* @__PURE__ */ jsx(ToastContainer, {
|
|
45
|
+
className: (params) => {
|
|
46
|
+
return toastContainer({
|
|
47
|
+
position: params?.position,
|
|
48
|
+
className: params?.defaultClassName
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
toastClassName: toastWrapper,
|
|
52
|
+
autoClose: 2500,
|
|
53
|
+
icon: false,
|
|
54
|
+
closeButton: false,
|
|
55
|
+
hideProgressBar: true
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
export { Toast, ToastContainer$1 as ToastContainer };
|
package/dist/Today.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const TodayIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
className: "fill-current",
|
|
7
|
+
...props,
|
|
8
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
d: "M9.184 9.672v-.945h5.628v.945h-2.27V16H11.45V9.672z"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
export { TodayIcon };
|
package/dist/Toggle.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
2
|
+
import { FormFieldError } from "./FormFieldError.js";
|
|
3
|
+
import { CheckContent } from "./CheckContent.js";
|
|
4
|
+
import { UIConfig } from "./uiConfig.context.js";
|
|
5
|
+
import { toggle, toggleTypography } from "./toggle.cva.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { Switch } from "react-aria-components";
|
|
9
|
+
import { mergeRefs } from "@react-aria/utils";
|
|
10
|
+
import { Controller } from "react-hook-form";
|
|
11
|
+
var ToggleBase = (props) => {
|
|
12
|
+
const ui = UIConfig.useConfig();
|
|
13
|
+
const uiStyle = UIStyle.useConfig();
|
|
14
|
+
const toggleCva = uiStyle?.toggle?.cva ?? toggle;
|
|
15
|
+
const toggleTypographyMap = uiStyle?.toggle?.typography ?? toggleTypography;
|
|
16
|
+
const { className, children, isDisabled, error, variant = ui.toggle.variant,...rest } = props;
|
|
17
|
+
const formFieldErrorProps = {
|
|
18
|
+
error,
|
|
19
|
+
isDisabled
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Switch, {
|
|
22
|
+
...rest,
|
|
23
|
+
"data-is-dirty": props.isDirty || void 0,
|
|
24
|
+
"data-is-required": props.isRequired || void 0,
|
|
25
|
+
isDisabled,
|
|
26
|
+
className: clsx("group flex items-center gap-2", !isDisabled && "cursor-pointer", className),
|
|
27
|
+
children: [/* @__PURE__ */ jsx("div", { className: toggleCva({
|
|
28
|
+
variant,
|
|
29
|
+
...rest
|
|
30
|
+
}) }), /* @__PURE__ */ jsx(CheckContent, {
|
|
31
|
+
typography: toggleTypographyMap({
|
|
32
|
+
variant,
|
|
33
|
+
...rest
|
|
34
|
+
}),
|
|
35
|
+
children
|
|
36
|
+
})]
|
|
37
|
+
}), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
|
|
38
|
+
};
|
|
39
|
+
const Toggle = (props) => {
|
|
40
|
+
if ("formControl" in props && props.formControl) {
|
|
41
|
+
const { formControl, ref,...innerProps } = props;
|
|
42
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
43
|
+
control: formControl.control,
|
|
44
|
+
name: formControl.name,
|
|
45
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(ToggleBase, {
|
|
46
|
+
...innerProps,
|
|
47
|
+
ref: mergeRefs(ref, field.ref),
|
|
48
|
+
isSelected: field.value,
|
|
49
|
+
onChange: field.onChange,
|
|
50
|
+
onBlur: field.onBlur,
|
|
51
|
+
name: field.name,
|
|
52
|
+
isDirty,
|
|
53
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
54
|
+
error: props.error ?? error?.message
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return /* @__PURE__ */ jsx(ToggleBase, { ...props });
|
|
59
|
+
};
|
|
60
|
+
export { Toggle };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Button } from "./Button.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
const ToggleButton = ({ children,...props }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
5
|
+
...props,
|
|
6
|
+
toggle: true,
|
|
7
|
+
variant: "outlined",
|
|
8
|
+
color: "primary",
|
|
9
|
+
disableTooltip: props.disableTooltip,
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export { ToggleButton };
|
package/dist/Tooltip.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PointerHorizontalIcon } from "./PointerHorizontal.js";
|
|
2
|
+
import { PointerVerticalIcon } from "./PointerVertical.js";
|
|
3
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
4
|
+
import { Typography } from "./Typography.js";
|
|
5
|
+
import { tooltipCva, tooltipPointerHorizontalCva, tooltipPointerVerticalCva, tooltipTextCva } from "./tooltip.cva.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { OverlayArrow, Tooltip, TooltipTrigger } from "react-aria-components";
|
|
8
|
+
import { Fragment as Fragment$1, useRef } from "react";
|
|
9
|
+
import { useFocusable } from "react-aria";
|
|
10
|
+
var CustomTrigger = ({ children, className, tabIndex }) => {
|
|
11
|
+
const ref = useRef(null);
|
|
12
|
+
const { focusableProps } = useFocusable({}, ref);
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
ref,
|
|
15
|
+
...focusableProps,
|
|
16
|
+
tabIndex: tabIndex ?? 0,
|
|
17
|
+
className,
|
|
18
|
+
children
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const Tooltip$1 = ({ children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, triggerTabIndex,...tooltipProps }) => {
|
|
22
|
+
const uiStyle = UIStyle.useConfig();
|
|
23
|
+
const tooltipCva$1 = uiStyle?.tooltip?.cva ?? tooltipCva;
|
|
24
|
+
const tooltipPointerHorizontalCva$1 = uiStyle?.tooltip?.pointerHorizontalCva ?? tooltipPointerHorizontalCva;
|
|
25
|
+
const tooltipPointerVerticalCva$1 = uiStyle?.tooltip?.pointerVerticalCva ?? tooltipPointerVerticalCva;
|
|
26
|
+
const tooltipTextCva$1 = uiStyle?.tooltip?.textCva ?? tooltipTextCva;
|
|
27
|
+
const Trigger = isNonInteractiveTrigger ? CustomTrigger : Fragment$1;
|
|
28
|
+
return /* @__PURE__ */ jsxs(TooltipTrigger, {
|
|
29
|
+
delay: delay ?? 0,
|
|
30
|
+
closeDelay: closeDelay ?? 0,
|
|
31
|
+
isDisabled,
|
|
32
|
+
children: [isNonInteractiveTrigger ? /* @__PURE__ */ jsx(Trigger, {
|
|
33
|
+
...isNonInteractiveTrigger && { className: triggerClassName },
|
|
34
|
+
tabIndex: triggerTabIndex,
|
|
35
|
+
children
|
|
36
|
+
}) : /* @__PURE__ */ jsx(Trigger, { children }), /* @__PURE__ */ jsxs(Tooltip, {
|
|
37
|
+
className: tooltipCva$1({ color }),
|
|
38
|
+
...tooltipProps,
|
|
39
|
+
offset: 13,
|
|
40
|
+
children: [/* @__PURE__ */ jsxs(OverlayArrow, { children: [/* @__PURE__ */ jsx(PointerHorizontalIcon, { className: tooltipPointerHorizontalCva$1({ color }) }), /* @__PURE__ */ jsx(PointerVerticalIcon, { className: tooltipPointerVerticalCva$1({ color }) })] }), /* @__PURE__ */ jsx(Typography, {
|
|
41
|
+
size: "body-4",
|
|
42
|
+
variant: "prominent-1",
|
|
43
|
+
className: tooltipTextCva$1({ color }),
|
|
44
|
+
children: text
|
|
45
|
+
})]
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
export { Tooltip$1 as Tooltip };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tooltip } from "./Tooltip.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
const TooltipEllipsis = ({ text, children, isDisabled }) => {
|
|
5
|
+
const [isEllipsisActive, setIsEllipsisActive] = useState(false);
|
|
6
|
+
const onContentRef = (ref) => {
|
|
7
|
+
if (ref) setIsEllipsisActive(ref.offsetWidth < ref.scrollWidth);
|
|
8
|
+
};
|
|
9
|
+
const content = children(onContentRef);
|
|
10
|
+
if (isEllipsisActive && !isDisabled) return /* @__PURE__ */ jsx(Tooltip, {
|
|
11
|
+
text,
|
|
12
|
+
placement: "bottom",
|
|
13
|
+
isDisabled,
|
|
14
|
+
children: content
|
|
15
|
+
});
|
|
16
|
+
return content;
|
|
17
|
+
};
|
|
18
|
+
export { TooltipEllipsis };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Tooltip } from "./Tooltip.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
const TooltipWrapper = (props) => {
|
|
4
|
+
if (props.as !== "inline") return props.children;
|
|
5
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
6
|
+
text: props.error || void 0,
|
|
7
|
+
placement: "bottom",
|
|
8
|
+
color: "error",
|
|
9
|
+
hidden: !props.error,
|
|
10
|
+
isNonInteractiveTrigger: true,
|
|
11
|
+
triggerClassName: props.triggerClassName,
|
|
12
|
+
triggerTabIndex: props.triggerTabIndex,
|
|
13
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
14
|
+
tabIndex: -1,
|
|
15
|
+
children: props.children
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export { TooltipWrapper };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { typography } from "./typography.cva.js";
|
|
2
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
const Typography = ({ as = "p", className,...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(as, {
|
|
6
|
+
className: (UIStyle.useConfig()?.typography?.cva ?? typography)({
|
|
7
|
+
...props,
|
|
8
|
+
sizeMobile: props.sizeMobile ?? props.size,
|
|
9
|
+
className
|
|
10
|
+
}),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
export { Typography };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const UnderlinedIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 25 24",
|
|
6
|
+
className: "fill-current",
|
|
7
|
+
...props,
|
|
8
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
strokeWidth: .2,
|
|
12
|
+
d: "M6.872 18.89q.212.21.518.21h9.892q.306 0 .518-.21.21-.212.21-.518a.7.7 0 0 0-.21-.518.7.7 0 0 0-.518-.21H7.39a.7.7 0 0 0-.518.209.7.7 0 0 0-.21.518q0 .308.21.519ZM8.353 5.155a.83.83 0 0 0-.264.615v5.851c0 1.348.371 2.434 1.123 3.248.754.815 1.8 1.218 3.124 1.218s2.37-.403 3.124-1.218c.752-.814 1.123-1.9 1.123-3.248v-5.85a.84.84 0 0 0-.255-.615.84.84 0 0 0-.613-.256.87.87 0 0 0-.62.255.83.83 0 0 0-.265.615V11.7c0 .828-.22 1.48-.65 1.968-.427.484-1.037.732-1.844.732s-1.417-.248-1.844-.732c-.43-.487-.65-1.14-.65-1.968V5.77a.84.84 0 0 0-.255-.614.84.84 0 0 0-.613-.256.87.87 0 0 0-.62.255Z"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
export { UnderlinedIcon };
|
package/dist/Upload.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
const UploadIcon = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
className: "fill-current",
|
|
7
|
+
...props,
|
|
8
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
d: "M19.5 13.6a.9.9 0 0 1 .9.9v3.333a2.57 2.57 0 0 1-2.567 2.567H6.167a2.57 2.57 0 0 1-2.555-2.313l-.012-.254V14.5a.9.9 0 0 1 1.796-.092l.004.092v3.333l.015.15a.766.766 0 0 0 .752.617h11.666a.766.766 0 0 0 .767-.767V14.5a.9.9 0 0 1 .9-.9"
|
|
11
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "M12.04 3.602h.007q.078.003.151.02.006 0 .011.003c.168.04.319.127.436.247l4.158 4.158.061.069A.9.9 0 0 1 15.6 9.365l-.069-.062-2.63-2.63V14.5a.9.9 0 0 1-1.8 0V6.672l-2.63 2.63-.069.063A.901.901 0 0 1 7.196 8.03l4.167-4.167.069-.061a.9.9 0 0 1 .432-.192l.027-.004A1 1 0 0 1 12 3.6z"
|
|
14
|
+
})]
|
|
15
|
+
});
|
|
16
|
+
export { UploadIcon };
|
package/dist/View.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
const ViewIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
className: "fill-current",
|
|
7
|
+
...props,
|
|
8
|
+
children: /* @__PURE__ */ jsxs("g", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M21.338 11.788A10.43 10.43 0 0 0 12 5.124a10.43 10.43 0 0 0-9.337 6.663.63.63 0 0 0 0 .425A10.43 10.43 0 0 0 12 18.875a10.43 10.43 0 0 0 9.337-6.662.62.62 0 0 0 0-.425M12 17.624c-3.312 0-6.812-2.456-8.081-5.625C5.188 8.831 8.688 6.375 12 6.375c3.313 0 6.813 2.456 8.081 5.625-1.268 3.169-4.768 5.625-8.081 5.625" }), /* @__PURE__ */ jsx("path", { d: "M12 8.25a3.75 3.75 0 1 0 0 7.5 3.75 3.75 0 0 0 0-7.5m0 6.25a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5" })]
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
export { ViewIcon };
|
package/dist/ViewOff.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
const ViewOffIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
className: "fill-current",
|
|
7
|
+
...props,
|
|
8
|
+
children: /* @__PURE__ */ jsxs("g", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
children: [/* @__PURE__ */ jsx("path", { d: "m5.275 16.069.894-.888A8.8 8.8 0 0 1 3.919 12C5.188 8.831 8.688 6.375 12 6.375a7.7 7.7 0 0 1 2.5.45l.969-.975A9.2 9.2 0 0 0 12 5.125a10.43 10.43 0 0 0-9.337 6.663.63.63 0 0 0 0 .425 10 10 0 0 0 2.612 3.856" }), /* @__PURE__ */ jsx("path", { d: "M9.5 11.831a2.5 2.5 0 0 1 2.313-2.312l1.13-1.138a3.75 3.75 0 0 0-4.58 4.582zM21.338 11.788a10.25 10.25 0 0 0-3.588-4.65l3-3.007-.881-.881L3.25 19.869l.881.881 3.188-3.187A9.56 9.56 0 0 0 12 18.875a10.43 10.43 0 0 0 9.337-6.662.62.62 0 0 0 0-.425M14.5 12a2.5 2.5 0 0 1-3.75 2.15l3.4-3.4A2.5 2.5 0 0 1 14.5 12M12 17.625a8.16 8.16 0 0 1-3.75-.988l1.588-1.587a3.75 3.75 0 0 0 5.218-5.219l1.794-1.793A9.1 9.1 0 0 1 20.081 12c-1.268 3.169-4.768 5.625-8.081 5.625" })]
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
export { ViewOffIcon };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const WarningFilledIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
className: "fill-current",
|
|
7
|
+
...props,
|
|
8
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
fillRule: "evenodd",
|
|
11
|
+
d: "M12.165 3.52a2.57 2.57 0 0 1 1.94 1.091l.09.139.001.004 7.059 11.783.008.013.079.147a2.568 2.568 0 0 1-2.274 3.702H4.932a2.568 2.568 0 0 1-2.195-3.85l.007-.012L9.803 4.754l.002-.004.09-.139A2.57 2.57 0 0 1 12 3.514zM12 15.267a.9.9 0 0 0 0 1.8h.008l.092-.005a.9.9 0 0 0 0-1.79l-.092-.005zM12 8.6a.9.9 0 0 0-.9.9v3.333l.005.093a.9.9 0 0 0 1.79 0l.005-.093V9.5l-.005-.092A.9.9 0 0 0 12 8.6",
|
|
12
|
+
clipRule: "evenodd"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
export { WarningFilledIcon };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Typography } from "./Typography.js";
|
|
2
|
+
import { useScrollableListBox } from "./useScrollableListBox.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { today } from "@internationalized/date";
|
|
8
|
+
import { useDateFormatter } from "@react-aria/i18n";
|
|
9
|
+
const YearPicker = ({ state, onSelectionChange }) => {
|
|
10
|
+
const formatter = useDateFormatter({
|
|
11
|
+
year: "numeric",
|
|
12
|
+
timeZone: state.timeZone
|
|
13
|
+
});
|
|
14
|
+
const years = useMemo(() => {
|
|
15
|
+
const arr = [];
|
|
16
|
+
for (let i = -100; i <= 100; i++) {
|
|
17
|
+
const date = today(state.timeZone).add({ years: i });
|
|
18
|
+
arr.push({
|
|
19
|
+
value: date.year,
|
|
20
|
+
formatted: formatter.format(date.toDate(state.timeZone))
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return arr;
|
|
24
|
+
}, [state.timeZone, formatter]);
|
|
25
|
+
const isYearDisabled = (year) => {
|
|
26
|
+
if (state.minValue && year < state.minValue.year) return true;
|
|
27
|
+
if (state.maxValue && year > state.maxValue.year) return true;
|
|
28
|
+
return false;
|
|
29
|
+
};
|
|
30
|
+
const selectedYear = years.findIndex((year) => year.value === state.focusedDate.year);
|
|
31
|
+
const { ref } = useScrollableListBox();
|
|
32
|
+
return /* @__PURE__ */ jsx(ListBox, {
|
|
33
|
+
ref,
|
|
34
|
+
autoFocus: true,
|
|
35
|
+
"aria-label": "Year",
|
|
36
|
+
selectionMode: "single",
|
|
37
|
+
selectedKeys: [selectedYear],
|
|
38
|
+
onSelectionChange: (key) => {
|
|
39
|
+
if (key === "all") return;
|
|
40
|
+
const index = [...key][0];
|
|
41
|
+
if (typeof index === "number") {
|
|
42
|
+
const date = state.focusedDate.set({ year: years[index].value });
|
|
43
|
+
state.setFocusedDate(date);
|
|
44
|
+
}
|
|
45
|
+
onSelectionChange(key);
|
|
46
|
+
},
|
|
47
|
+
className: "h-80 max-h-full min-h-0 w-full shrink-0 overflow-y-auto md:h-72 md:w-80",
|
|
48
|
+
children: years.map((year, index) => {
|
|
49
|
+
const isDisabled = isYearDisabled(year.value);
|
|
50
|
+
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
51
|
+
id: index,
|
|
52
|
+
textValue: year.formatted,
|
|
53
|
+
isDisabled,
|
|
54
|
+
className: clsx("flex px-4 py-2 text-interactive-text-secondary-idle outline-none", "border-elevation-outline-default-1 border-b border-solid bg-elevation-fill-default-1 last:border-b-0", "hover:text-interactive-text-secondary-hover", "selected:bg-interactive-contained-primary-idle selected:text-interactive-text-secondary-idle-inverted", "focus-visible:bg-interactive-contained-primary-focus focus-visible:text-interactive-text-secondary-idle-inverted", isDisabled ? "cursor-default opacity-50" : "cursor-pointer"),
|
|
55
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
56
|
+
as: "span",
|
|
57
|
+
size: "label-2",
|
|
58
|
+
children: year.formatted
|
|
59
|
+
})
|
|
60
|
+
}, index);
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
export { YearPicker };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AuthContext } from "./auth.context.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useEffect, useState } from "react";
|
|
4
|
+
import { AbilityBuilder, createMongoAbility } from "@casl/ability";
|
|
5
|
+
import { unpackRules } from "@casl/ability/extra";
|
|
6
|
+
import { useAbility } from "@casl/react";
|
|
7
|
+
let AbilityContext;
|
|
8
|
+
(function(_AbilityContext) {
|
|
9
|
+
const createAppAbilityBuilder = () => new AbilityBuilder(createMongoAbility);
|
|
10
|
+
const initialAppAbility = createAppAbilityBuilder().build();
|
|
11
|
+
const Context = createContext({});
|
|
12
|
+
const { Consumer } = Context;
|
|
13
|
+
_AbilityContext.Consumer = Consumer;
|
|
14
|
+
_AbilityContext.Provider = ({ children }) => {
|
|
15
|
+
const [ability, setAbility] = useState(initialAppAbility);
|
|
16
|
+
const { user } = AuthContext.useAuth();
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!user || !("aclRules" in user)) return;
|
|
19
|
+
const { can, build } = createAppAbilityBuilder();
|
|
20
|
+
const packedRules = user.aclRules;
|
|
21
|
+
unpackRules(packedRules).forEach(({ action, subject, conditions }) => {
|
|
22
|
+
can(action, subject, conditions);
|
|
23
|
+
});
|
|
24
|
+
setAbility(build());
|
|
25
|
+
}, [user]);
|
|
26
|
+
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
27
|
+
value: ability,
|
|
28
|
+
children
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
_AbilityContext.useAbility = () => {
|
|
32
|
+
return useAbility(Context);
|
|
33
|
+
};
|
|
34
|
+
})(AbilityContext || (AbilityContext = {}));
|
|
35
|
+
export { AbilityContext };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const alert = cva("min-h-0 overflow-hidden rounded-alert-rounding-default p-0", {
|
|
3
|
+
variants: {
|
|
4
|
+
variant: {
|
|
5
|
+
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
6
|
+
contained: "text-text-inverted-1"
|
|
7
|
+
},
|
|
8
|
+
color: {
|
|
9
|
+
neutral: "",
|
|
10
|
+
success: "",
|
|
11
|
+
warning: "",
|
|
12
|
+
error: ""
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
compoundVariants: [
|
|
16
|
+
{
|
|
17
|
+
variant: "outlined",
|
|
18
|
+
color: "neutral",
|
|
19
|
+
className: "border-elevation-outline-default-1"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
variant: "outlined",
|
|
23
|
+
color: "success",
|
|
24
|
+
className: "border-elevation-outline-success-1"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
variant: "outlined",
|
|
28
|
+
color: "warning",
|
|
29
|
+
className: "border-elevation-outline-warning-1"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
variant: "outlined",
|
|
33
|
+
color: "error",
|
|
34
|
+
className: "border-elevation-outline-error-1"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
variant: "contained",
|
|
38
|
+
color: "neutral",
|
|
39
|
+
className: "bg-elevation-fill-inverted-1"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
variant: "contained",
|
|
43
|
+
color: "success",
|
|
44
|
+
className: "bg-elevation-fill-success-1"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
variant: "contained",
|
|
48
|
+
color: "warning",
|
|
49
|
+
className: "bg-elevation-fill-warning-1"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
variant: "contained",
|
|
53
|
+
color: "error",
|
|
54
|
+
className: "bg-elevation-fill-error-1"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
variant: "outlined",
|
|
59
|
+
color: "neutral"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export { alert };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, use, useMemo } from "react";
|
|
3
|
+
let AuthContext;
|
|
4
|
+
(function(_AuthContext) {
|
|
5
|
+
const Context = createContext({});
|
|
6
|
+
_AuthContext.Provider = ({ isAuthenticated, isInitializing, logout, updateTokens, accessToken, user, userPromise, routes, loadingState, children }) => {
|
|
7
|
+
const value = useMemo(() => ({
|
|
8
|
+
isAuthenticated,
|
|
9
|
+
isInitializing,
|
|
10
|
+
logout,
|
|
11
|
+
updateTokens,
|
|
12
|
+
accessToken,
|
|
13
|
+
user,
|
|
14
|
+
userPromise,
|
|
15
|
+
routes,
|
|
16
|
+
loadingState
|
|
17
|
+
}), [
|
|
18
|
+
isAuthenticated,
|
|
19
|
+
isInitializing,
|
|
20
|
+
logout,
|
|
21
|
+
updateTokens,
|
|
22
|
+
accessToken,
|
|
23
|
+
user,
|
|
24
|
+
userPromise,
|
|
25
|
+
routes,
|
|
26
|
+
loadingState
|
|
27
|
+
]);
|
|
28
|
+
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
29
|
+
value,
|
|
30
|
+
children
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
_AuthContext.useAuth = () => {
|
|
34
|
+
return use(Context);
|
|
35
|
+
};
|
|
36
|
+
})(AuthContext || (AuthContext = {}));
|
|
37
|
+
export { AuthContext };
|
package/dist/auth.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AbilityContext } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
AbilityContext,
|
|
8
|
-
AuthContext,
|
|
9
|
-
AuthGuard,
|
|
10
|
-
Can,
|
|
11
|
-
createAclGuard
|
|
12
|
-
};
|
|
1
|
+
import { AuthContext } from "./auth.context.js";
|
|
2
|
+
import { AbilityContext } from "./ability.context.js";
|
|
3
|
+
import { createAclGuard } from "./AclGuard.js";
|
|
4
|
+
import { Can } from "./Can.js";
|
|
5
|
+
import { AuthGuard } from "./AuthGuard.js";
|
|
6
|
+
export { AbilityContext, AuthContext, AuthGuard, Can, createAclGuard };
|