@povio/ui 2.1.14 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -0
- package/dist/AclGuard.js +12 -0
- package/dist/ActionModal.js +51 -0
- package/dist/Alert.js +46 -0
- package/dist/AlignCenter.js +13 -0
- package/dist/AlignLeft.js +13 -0
- package/dist/AlignLeftRight.js +13 -0
- package/dist/AlignRight.js +13 -0
- package/dist/ArrowDropDown.js +13 -0
- package/dist/ArrowDropUp.js +13 -0
- package/dist/ArrowLeft.js +13 -0
- package/dist/ArrowRight.js +13 -0
- package/dist/AuthGuard.js +22 -0
- package/dist/Autocomplete.js +28 -0
- package/dist/Bold.js +13 -0
- package/dist/BottomSheet.js +191 -0
- package/dist/BulletedList.js +13 -0
- package/dist/Button.js +54 -0
- package/dist/ButtonContent.js +28 -0
- package/dist/Calendar.js +15 -0
- package/dist/Calendar2.js +54 -0
- package/dist/CalendarCell.js +130 -0
- package/dist/CalendarGrid.js +50 -0
- package/dist/CalendarHeader.js +75 -0
- package/dist/CalendarSelectHeader.js +170 -0
- package/dist/Can.js +13 -0
- package/dist/CellText.js +13 -0
- package/dist/Check.js +15 -0
- package/dist/CheckCircle.js +13 -0
- package/dist/CheckContent.js +16 -0
- package/dist/Checkbox.js +61 -0
- package/dist/CheckboxCheckmark.js +16 -0
- package/dist/CheckboxCheckmark2.js +25 -0
- package/dist/CheckboxIndeterminate.js +16 -0
- package/dist/ChevronDown.js +15 -0
- package/dist/ChevronLeft.js +15 -0
- package/dist/ChevronRight.js +15 -0
- package/dist/ChevronUp.js +15 -0
- package/dist/ChevronsLeft.js +15 -0
- package/dist/ChevronsRight.js +15 -0
- package/dist/Clock.js +13 -0
- package/dist/Close.js +13 -0
- package/dist/ColorPicker.js +16 -0
- package/dist/ColorPickerDropdown.js +51 -0
- package/dist/ColumnConfig.js +81 -0
- package/dist/DateField.js +89 -0
- package/dist/DatePicker.js +191 -0
- package/dist/DatePickerInput.js +158 -0
- package/dist/DateRangePicker.js +601 -0
- package/dist/DateSegmentItem.js +29 -0
- package/dist/DateTime.js +18 -0
- package/dist/DateTimeDialog.js +49 -0
- package/dist/DateTimeDialogFooter.js +25 -0
- package/dist/DateTimePicker.js +200 -0
- package/dist/Drag.js +13 -0
- package/dist/Drawer.js +43 -0
- package/dist/File.js +15 -0
- package/dist/FileCard.js +50 -0
- package/dist/FileCardList.js +17 -0
- package/dist/FileUpload.js +189 -0
- package/dist/FileUploadContainer.js +12 -0
- package/dist/FileUploadContent.js +61 -0
- package/dist/FileUploadContentEmpty.js +54 -0
- package/dist/FileUploadContentError.js +109 -0
- package/dist/FileUploadContentFilled.js +112 -0
- package/dist/FileUploadContentLoading.js +76 -0
- package/dist/Form.js +42 -0
- package/dist/FormField.js +35 -0
- package/dist/FormFieldError.js +11 -0
- package/dist/FormFieldHeader.js +36 -0
- package/dist/FormFieldHeaderClose.js +15 -0
- package/dist/FormFieldLabel.js +32 -0
- package/dist/HeaderText.js +10 -0
- package/dist/Highlight.js +13 -0
- package/dist/HighlightOn.js +19 -0
- package/dist/HyperlinkAction.js +70 -0
- package/dist/IconButton.js +12 -0
- package/dist/InfiniteTable.js +31 -0
- package/dist/Info.js +18 -0
- package/dist/InlineIconButton.js +13 -0
- package/dist/InputClear.js +19 -0
- package/dist/InputContent.js +94 -0
- package/dist/InputItem.js +54 -0
- package/dist/InputUpload.js +111 -0
- package/dist/InputUploadContent.js +52 -0
- package/dist/InputUploadFilled.js +26 -0
- package/dist/Inputs.js +15 -0
- package/dist/Italic.js +13 -0
- package/dist/Link.js +13 -0
- package/dist/Link2.js +19 -0
- package/dist/Loader.js +32 -0
- package/dist/Menu.js +13 -0
- package/dist/Menu2.js +9 -0
- package/dist/MenuDesktop.js +53 -0
- package/dist/MenuItem.js +21 -0
- package/dist/MenuMobile.js +64 -0
- package/dist/MenuPopover.js +30 -0
- package/dist/Modal.js +49 -0
- package/dist/MonthPicker.js +56 -0
- package/dist/NumberInput.js +132 -0
- package/dist/NumberedList.js +13 -0
- package/dist/PaginatedTable.js +26 -0
- package/dist/Pagination.js +43 -0
- package/dist/PaginationList.js +105 -0
- package/dist/PasswordInput.js +21 -0
- package/dist/PillButton.js +37 -0
- package/dist/PointerHorizontal.js +13 -0
- package/dist/PointerVertical.js +13 -0
- package/dist/ProgressBar.js +25 -0
- package/dist/QueryAutocomplete.js +18 -0
- package/dist/RadioGroup.js +81 -0
- package/dist/RangeCalendar.js +96 -0
- package/dist/ResponsivePopover.js +41 -0
- package/dist/Segment.js +82 -0
- package/dist/SegmentItem.js +23 -0
- package/dist/Select.js +24 -0
- package/dist/SelectBase.js +28 -0
- package/dist/SelectDesktop.js +147 -0
- package/dist/SelectInput.js +159 -0
- package/dist/SelectInputTags.js +29 -0
- package/dist/SelectListBox.js +73 -0
- package/dist/SelectListBoxItem.js +48 -0
- package/dist/SelectListBoxItemSelectAll.js +31 -0
- package/dist/SelectListBoxLoadingItem.js +41 -0
- package/dist/SelectListBoxSelectionBar.js +25 -0
- package/dist/SelectMobile.js +111 -0
- package/dist/Send.js +15 -0
- package/dist/Slider.js +93 -0
- package/dist/SplitButton.js +36 -0
- package/dist/Strikethrough.js +13 -0
- package/dist/Table.js +248 -0
- package/dist/Tag.js +42 -0
- package/dist/TextAlignSelect.js +44 -0
- package/dist/TextArea.js +120 -0
- package/dist/TextButton.js +13 -0
- package/dist/TextColor.js +16 -0
- package/dist/TextColorSelect.js +22 -0
- package/dist/TextEditor.js +143 -0
- package/dist/TextEditorToolbar.js +30 -0
- package/dist/TextHighlightSelect.js +24 -0
- package/dist/TextInput.js +125 -0
- package/dist/TextListActions.js +42 -0
- package/dist/TextMarksActions.js +67 -0
- package/dist/TextStyleSelect.js +52 -0
- package/dist/TimeField.js +17 -0
- package/dist/TimePicker.js +158 -0
- package/dist/TimePickerForm.js +158 -0
- package/dist/TimePickerInput.js +92 -0
- package/dist/Toast.js +58 -0
- package/dist/Today.js +13 -0
- package/dist/Toggle.js +60 -0
- package/dist/ToggleButton.js +13 -0
- package/dist/Tooltip.js +49 -0
- package/dist/TooltipEllipsis.js +18 -0
- package/dist/TooltipWrapper.js +19 -0
- package/dist/Typography.js +14 -0
- package/dist/Underlined.js +15 -0
- package/dist/Upload.js +16 -0
- package/dist/View.js +13 -0
- package/dist/ViewOff.js +13 -0
- package/dist/WarningFilled.js +15 -0
- package/dist/YearPicker.js +64 -0
- package/dist/ability.context.js +35 -0
- package/dist/alert.cva.js +62 -0
- package/dist/array.utils.js +8 -0
- package/dist/auth.context.js +37 -0
- package/dist/auth.js +6 -12
- package/dist/button.cva.js +656 -0
- package/dist/buttonContent.cva.js +10 -0
- package/dist/checkbox.cva.js +47 -0
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +2 -2
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +5 -0
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +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,13 @@
|
|
|
1
|
+
import { Button } from "./Button.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
const InlineIconButton = ({ label,...props }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
5
|
+
...props,
|
|
6
|
+
iconOnly: true,
|
|
7
|
+
variant: "text",
|
|
8
|
+
size: "none",
|
|
9
|
+
width: "hug",
|
|
10
|
+
children: label
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export { InlineIconButton };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CloseIcon } from "./Close.js";
|
|
2
|
+
import { InlineIconButton } from "./InlineIconButton.js";
|
|
3
|
+
import { ns } from "./i18n.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
const InputClear = ({ onClear, className, style }) => {
|
|
8
|
+
const { t } = useTranslation("ui");
|
|
9
|
+
return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
10
|
+
color: "secondary",
|
|
11
|
+
className: clsx("group-hover/date-picker-content:flex! group-hover/select-content:flex! hidden! group-hover:flex! group-focus-within:flex! items-center", className),
|
|
12
|
+
label: t(($) => $.ui.clearAlt),
|
|
13
|
+
icon: CloseIcon,
|
|
14
|
+
onPress: onClear,
|
|
15
|
+
excludeFromTabOrder: true,
|
|
16
|
+
style
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export { InputClear };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Loader } from "./Loader.js";
|
|
2
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
+
import { Typography } from "./Typography.js";
|
|
4
|
+
import { InlineIconButton } from "./InlineIconButton.js";
|
|
5
|
+
import { inputSide } from "./input.cva.js";
|
|
6
|
+
import { FormFieldLabel } from "./FormFieldLabel.js";
|
|
7
|
+
import { InputClear } from "./InputClear.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { clsx } from "clsx";
|
|
10
|
+
import { isValidElement, useMemo } from "react";
|
|
11
|
+
import useMeasure from "react-use-measure";
|
|
12
|
+
const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, onBlur, children, headerProps, as, size }) => {
|
|
13
|
+
const inputSideCva = UIStyle.useConfig()?.input?.sideCva ?? inputSide;
|
|
14
|
+
const [leadingContentRef, { width: leadingWidth }] = useMeasure();
|
|
15
|
+
const [trailingContentRef, { width: trailingWidth }] = useMeasure();
|
|
16
|
+
const [labelContentRef, { width: labelWidth }] = useMeasure();
|
|
17
|
+
const isLeadingIconElement = LeadingIcon && isValidElement(LeadingIcon);
|
|
18
|
+
const isTrailingIconElement = TrailingIcon && isValidElement(TrailingIcon);
|
|
19
|
+
const showClear = isClearable && value != null && value !== "";
|
|
20
|
+
const style = useMemo(() => {
|
|
21
|
+
const leftPadding = as === "filter" ? labelWidth + leadingWidth : leadingWidth;
|
|
22
|
+
return {
|
|
23
|
+
paddingLeft: `calc(var(${inputSideCva({
|
|
24
|
+
size,
|
|
25
|
+
type: "var"
|
|
26
|
+
})}) + ${leftPadding}px + ${leftPadding > 0 ? "var(--spacing-2)" : "0px"})`,
|
|
27
|
+
paddingRight: `calc(var(${inputSideCva({
|
|
28
|
+
size,
|
|
29
|
+
type: "var"
|
|
30
|
+
})}) + ${trailingWidth}px + ${trailingWidth > 0 ? "var(--spacing-2)" : "0px"})`
|
|
31
|
+
};
|
|
32
|
+
}, [
|
|
33
|
+
leadingWidth,
|
|
34
|
+
trailingWidth,
|
|
35
|
+
labelWidth,
|
|
36
|
+
as,
|
|
37
|
+
size,
|
|
38
|
+
inputSideCva
|
|
39
|
+
]);
|
|
40
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: clsx("group/input-content relative", { "h-full": as === "inline" }),
|
|
42
|
+
children: [
|
|
43
|
+
as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
44
|
+
ref: labelContentRef,
|
|
45
|
+
as,
|
|
46
|
+
...headerProps
|
|
47
|
+
}),
|
|
48
|
+
children(style),
|
|
49
|
+
LeadingIcon && /* @__PURE__ */ jsx("div", {
|
|
50
|
+
ref: leadingContentRef,
|
|
51
|
+
className: clsx("absolute top-1/2 -translate-y-1/2", !isLeadingIconElement && "pointer-events-none", inputSideCva({
|
|
52
|
+
size,
|
|
53
|
+
type: "left"
|
|
54
|
+
})),
|
|
55
|
+
children: isLeadingIconElement ? LeadingIcon : /* @__PURE__ */ jsx(LeadingIcon, { className: "size-6 text-interactive-text-secondary-idle" })
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsxs("div", {
|
|
58
|
+
ref: trailingContentRef,
|
|
59
|
+
className: clsx("absolute top-1/2 flex -translate-y-1/2 items-center gap-2", !isTrailingIconElement && !action && !showClear && "pointer-events-none", inputSideCva({
|
|
60
|
+
size,
|
|
61
|
+
type: "right"
|
|
62
|
+
})),
|
|
63
|
+
children: [
|
|
64
|
+
showClear && !isDisabled && /* @__PURE__ */ jsx(InputClear, { onClear: () => {
|
|
65
|
+
onChange?.("");
|
|
66
|
+
onBlur?.({ target: { value: "" } });
|
|
67
|
+
} }),
|
|
68
|
+
unit && /* @__PURE__ */ jsx(Typography, {
|
|
69
|
+
as: "span",
|
|
70
|
+
size: "label-2",
|
|
71
|
+
variant: "prominent-1",
|
|
72
|
+
className: "text-text-default-3",
|
|
73
|
+
children: unit
|
|
74
|
+
}),
|
|
75
|
+
isLoading && /* @__PURE__ */ jsx("div", {
|
|
76
|
+
className: "inline-flex",
|
|
77
|
+
children: /* @__PURE__ */ jsx(Loader, {})
|
|
78
|
+
}),
|
|
79
|
+
!isLoading && action && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
80
|
+
color: "secondary",
|
|
81
|
+
icon: action.icon,
|
|
82
|
+
isDisabled,
|
|
83
|
+
onPress: action.onClick,
|
|
84
|
+
excludeFromTabOrder: true,
|
|
85
|
+
label: action.altText,
|
|
86
|
+
className: action.className
|
|
87
|
+
}),
|
|
88
|
+
!isLoading && !action && TrailingIcon && (isTrailingIconElement ? TrailingIcon : /* @__PURE__ */ jsx(TrailingIcon, { className: "size-6 text-interactive-text-secondary-idle" }))
|
|
89
|
+
]
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
export { InputContent };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Checkbox } from "./Checkbox.js";
|
|
2
|
+
import { DatePicker } from "./DatePicker.js";
|
|
3
|
+
import { TextInput } from "./TextInput.js";
|
|
4
|
+
import { Select } from "./Select.js";
|
|
5
|
+
import { DateRangePicker } from "./DateRangePicker.js";
|
|
6
|
+
import { DateTimePicker } from "./DateTimePicker.js";
|
|
7
|
+
import { TimePicker } from "./TimePicker.js";
|
|
8
|
+
import { NumberInput } from "./NumberInput.js";
|
|
9
|
+
import { PasswordInput } from "./PasswordInput.js";
|
|
10
|
+
import { TextArea } from "./TextArea.js";
|
|
11
|
+
import { Autocomplete } from "./Autocomplete.js";
|
|
12
|
+
import { QueryAutocomplete } from "./QueryAutocomplete.js";
|
|
13
|
+
import { Slider } from "./Slider.js";
|
|
14
|
+
import { Toggle } from "./Toggle.js";
|
|
15
|
+
import { Segment } from "./Segment.js";
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
var componentRegistry = {
|
|
18
|
+
toggle: Toggle,
|
|
19
|
+
checkbox: Checkbox,
|
|
20
|
+
numberInput: NumberInput,
|
|
21
|
+
slider: Slider,
|
|
22
|
+
textInput: TextInput,
|
|
23
|
+
passwordInput: PasswordInput,
|
|
24
|
+
textArea: TextArea,
|
|
25
|
+
select: Select,
|
|
26
|
+
autocomplete: Autocomplete,
|
|
27
|
+
queryAutocomplete: QueryAutocomplete,
|
|
28
|
+
segment: Segment,
|
|
29
|
+
datePicker: DatePicker,
|
|
30
|
+
dateTimePicker: DateTimePicker,
|
|
31
|
+
timePicker: TimePicker,
|
|
32
|
+
dateRangePicker: DateRangePicker,
|
|
33
|
+
unknown: null
|
|
34
|
+
};
|
|
35
|
+
function InputItem({ form, inputDef }) {
|
|
36
|
+
const { name, label, placeholder, props, inputWrapper, render, type } = inputDef;
|
|
37
|
+
const formControl = {
|
|
38
|
+
control: form.control,
|
|
39
|
+
name
|
|
40
|
+
};
|
|
41
|
+
if (render) return render(formControl, form);
|
|
42
|
+
if (!type) return null;
|
|
43
|
+
const Component = componentRegistry[type];
|
|
44
|
+
const usesChildrenAsLabel = ["toggle", "checkbox"].includes(type);
|
|
45
|
+
const inputComponent = /* @__PURE__ */ jsx(Component, {
|
|
46
|
+
...props ?? {},
|
|
47
|
+
label: usesChildrenAsLabel ? void 0 : label,
|
|
48
|
+
placeholder,
|
|
49
|
+
formControl,
|
|
50
|
+
children: usesChildrenAsLabel ? label : void 0
|
|
51
|
+
});
|
|
52
|
+
return inputWrapper ? inputWrapper(inputComponent, label) : inputComponent;
|
|
53
|
+
}
|
|
54
|
+
export { InputItem };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { UIConfig } from "./uiConfig.context.js";
|
|
2
|
+
import { FormField } from "./FormField.js";
|
|
3
|
+
import { FileUtils } from "./file.utils.js";
|
|
4
|
+
import { InputUploadContent } from "./InputUploadContent.js";
|
|
5
|
+
import { InputUploadFilled } from "./InputUploadFilled.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { mergeRefs, useLabels } from "@react-aria/utils";
|
|
10
|
+
import { Controller } from "react-hook-form";
|
|
11
|
+
var InputUploadBase = ({ ref: _ref, label, tooltipText, variant, helperText, isRequired, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, onChange, onInvalidFileType, value, defaultValue, allowsMultiple = false, hideLabel, acceptedFileTypes,...rest }) => {
|
|
12
|
+
const ui = UIConfig.useConfig();
|
|
13
|
+
const [internalFiles, setInternalFiles] = useState(() => {
|
|
14
|
+
if (value !== void 0) {
|
|
15
|
+
if (allowsMultiple) return value || [];
|
|
16
|
+
return value ? [value] : [];
|
|
17
|
+
}
|
|
18
|
+
if (defaultValue !== void 0) {
|
|
19
|
+
if (allowsMultiple) return defaultValue || [];
|
|
20
|
+
return defaultValue ? [defaultValue] : [];
|
|
21
|
+
}
|
|
22
|
+
return [];
|
|
23
|
+
});
|
|
24
|
+
const files = value !== void 0 ? (() => {
|
|
25
|
+
if (allowsMultiple) return value || [];
|
|
26
|
+
return value ? [value] : [];
|
|
27
|
+
})() : internalFiles;
|
|
28
|
+
const formFieldProps = {
|
|
29
|
+
error,
|
|
30
|
+
label,
|
|
31
|
+
tooltipText,
|
|
32
|
+
helperText,
|
|
33
|
+
isRequired,
|
|
34
|
+
isHeaderHidden,
|
|
35
|
+
hideLabel: hideLabel ?? ui.input.hideLabel,
|
|
36
|
+
isDisabled,
|
|
37
|
+
headerClassName,
|
|
38
|
+
errorClassName
|
|
39
|
+
};
|
|
40
|
+
const labelProps = useLabels({ "aria-label": label });
|
|
41
|
+
const updateFiles = (newFiles) => {
|
|
42
|
+
if (value === void 0) setInternalFiles(newFiles);
|
|
43
|
+
if (allowsMultiple) onChange?.(newFiles);
|
|
44
|
+
else onChange?.(newFiles[0] || null);
|
|
45
|
+
};
|
|
46
|
+
const handleFileSelect = (inputFiles) => {
|
|
47
|
+
const acceptedFiles = inputFiles.filter((file) => FileUtils.isFileTypeAccepted(file, acceptedFileTypes));
|
|
48
|
+
const invalidFiles = inputFiles.filter((file) => !FileUtils.isFileTypeAccepted(file, acceptedFileTypes));
|
|
49
|
+
if (allowsMultiple) {
|
|
50
|
+
updateFiles([...files, ...acceptedFiles]);
|
|
51
|
+
if (invalidFiles.length > 0) onInvalidFileType?.(invalidFiles.map((file) => file.name));
|
|
52
|
+
} else {
|
|
53
|
+
if (acceptedFiles.length > 0) updateFiles([acceptedFiles[0]]);
|
|
54
|
+
if (invalidFiles.length > 0) onInvalidFileType?.(invalidFiles[0].name);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const handleSelect = (inputFiles) => {
|
|
58
|
+
if (!inputFiles) return;
|
|
59
|
+
handleFileSelect(Array.from(inputFiles));
|
|
60
|
+
};
|
|
61
|
+
const handleDrop = async (e) => {
|
|
62
|
+
if (!e.items) return;
|
|
63
|
+
const promises = [];
|
|
64
|
+
e.items.forEach((item) => {
|
|
65
|
+
if (item.kind === "file") promises.push(item.getFile());
|
|
66
|
+
});
|
|
67
|
+
handleFileSelect(await Promise.all(promises));
|
|
68
|
+
};
|
|
69
|
+
const handleRemove = () => {
|
|
70
|
+
updateFiles([]);
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ jsx(FormField, {
|
|
73
|
+
...formFieldProps,
|
|
74
|
+
labelProps,
|
|
75
|
+
className: clsx("w-full", className),
|
|
76
|
+
children: files.length > 0 ? /* @__PURE__ */ jsx(InputUploadFilled, {
|
|
77
|
+
files,
|
|
78
|
+
onRemove: handleRemove,
|
|
79
|
+
isDisabled
|
|
80
|
+
}) : /* @__PURE__ */ jsx(InputUploadContent, {
|
|
81
|
+
...rest,
|
|
82
|
+
label,
|
|
83
|
+
error,
|
|
84
|
+
allowsMultiple,
|
|
85
|
+
acceptedFileTypes,
|
|
86
|
+
variant,
|
|
87
|
+
isDisabled,
|
|
88
|
+
onSelect: handleSelect,
|
|
89
|
+
onDrop: handleDrop
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const InputUpload = (props) => {
|
|
94
|
+
if ("formControl" in props && props.formControl) {
|
|
95
|
+
const { formControl, ref,...innerProps } = props;
|
|
96
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
97
|
+
control: formControl.control,
|
|
98
|
+
name: formControl.name,
|
|
99
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(InputUploadBase, {
|
|
100
|
+
...innerProps,
|
|
101
|
+
ref: mergeRefs(ref, field.ref),
|
|
102
|
+
value: field.value,
|
|
103
|
+
onChange: field.onChange,
|
|
104
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
105
|
+
error: props.error ?? error?.message
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return /* @__PURE__ */ jsx(InputUploadBase, { ...props });
|
|
110
|
+
};
|
|
111
|
+
export { InputUpload };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
2
|
+
import { Typography } from "./Typography.js";
|
|
3
|
+
import { Button as Button$1 } from "./Button.js";
|
|
4
|
+
import { TextButton } from "./TextButton.js";
|
|
5
|
+
import { inputSize } from "./input.cva.js";
|
|
6
|
+
import { ns } from "./i18n.js";
|
|
7
|
+
import { UploadIcon } from "./Upload.js";
|
|
8
|
+
import { inputUploadButton, inputUploadDropZone } from "./inputUploadButton.cva.js";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { DropZone, FileTrigger } from "react-aria-components";
|
|
12
|
+
import { useTranslation } from "react-i18next";
|
|
13
|
+
const InputUploadContent = (props) => {
|
|
14
|
+
const { variant, isDisabled, error,...rest } = props;
|
|
15
|
+
const { t } = useTranslation("ui");
|
|
16
|
+
const inputSizeCva = UIStyle.useConfig()?.input?.sizeCva ?? inputSize;
|
|
17
|
+
return /* @__PURE__ */ jsx(FileTrigger, {
|
|
18
|
+
...rest,
|
|
19
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
"data-rac": "",
|
|
21
|
+
"data-disabled": isDisabled || void 0,
|
|
22
|
+
"data-invalid": !!error || void 0,
|
|
23
|
+
className: inputUploadButton({
|
|
24
|
+
variant,
|
|
25
|
+
className: "group/input-upload"
|
|
26
|
+
}),
|
|
27
|
+
children: [/* @__PURE__ */ jsxs(DropZone, {
|
|
28
|
+
...rest,
|
|
29
|
+
isDisabled,
|
|
30
|
+
className: clsx(inputUploadDropZone({ variant }), inputSizeCva({ size: "default" })),
|
|
31
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
32
|
+
variant: "default",
|
|
33
|
+
size: "label-1",
|
|
34
|
+
as: "span",
|
|
35
|
+
className: "min-w-0 flex-fill select-none truncate text-text-default-3",
|
|
36
|
+
children: t(($) => $.ui.fileUpload.emptyText)
|
|
37
|
+
}), variant === "nested" && /* @__PURE__ */ jsx(TextButton, {
|
|
38
|
+
isDisabled,
|
|
39
|
+
icon: UploadIcon,
|
|
40
|
+
children: t(($) => $.ui.fileUpload.upload)
|
|
41
|
+
})]
|
|
42
|
+
}), variant !== "nested" && /* @__PURE__ */ jsx(Button$1, {
|
|
43
|
+
size: "s",
|
|
44
|
+
width: "hug",
|
|
45
|
+
isDisabled,
|
|
46
|
+
className: "truncate",
|
|
47
|
+
children: t(($) => $.ui.fileUpload.uploadFile)
|
|
48
|
+
})]
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
export { InputUploadContent };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CloseIcon } from "./Close.js";
|
|
2
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
+
import { Typography } from "./Typography.js";
|
|
4
|
+
import { InlineIconButton } from "./InlineIconButton.js";
|
|
5
|
+
import { inputSize } from "./input.cva.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
const InputUploadFilled = ({ files, onRemove, isDisabled }) => {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: clsx("flex items-center rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle", (UIStyle.useConfig()?.input?.sizeCva ?? inputSize)({ size: "default" })),
|
|
11
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
12
|
+
variant: "default",
|
|
13
|
+
size: "label-1",
|
|
14
|
+
as: "span",
|
|
15
|
+
className: "flex-fill select-none truncate text-ellipsis text-text-default-1",
|
|
16
|
+
children: files.map((file) => file.name).join(", ")
|
|
17
|
+
}), /* @__PURE__ */ jsx(InlineIconButton, {
|
|
18
|
+
label: "Remove files",
|
|
19
|
+
color: "secondary",
|
|
20
|
+
icon: CloseIcon,
|
|
21
|
+
isDisabled,
|
|
22
|
+
onPress: onRemove
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export { InputUploadFilled };
|
package/dist/Inputs.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputItem } from "./InputItem.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
function Inputs({ form, inputDefs, children }) {
|
|
4
|
+
if (!children) return inputDefs.map((inputDef) => /* @__PURE__ */ jsx(InputItem, {
|
|
5
|
+
form,
|
|
6
|
+
inputDef
|
|
7
|
+
}, String(inputDef.name)));
|
|
8
|
+
const childrenParams = {};
|
|
9
|
+
for (const inputDef of inputDefs) childrenParams[inputDef.name] = /* @__PURE__ */ jsx(InputItem, {
|
|
10
|
+
form,
|
|
11
|
+
inputDef
|
|
12
|
+
});
|
|
13
|
+
return children(childrenParams);
|
|
14
|
+
}
|
|
15
|
+
export { Inputs };
|
package/dist/Italic.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const ItalicIcon = (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
|
+
d: "M6.743 19a.92.92 0 0 1-.678-.277.92.92 0 0 1-.277-.679q0-.401.277-.678a.92.92 0 0 1 .678-.276H9.82l3.424-10.18h-3.078a.92.92 0 0 1-.678-.277.92.92 0 0 1-.277-.679.92.92 0 0 1 .277-.678.92.92 0 0 1 .678-.276h7.762q.4 0 .678.277a.92.92 0 0 1 .277.679.92.92 0 0 1-.277.678.92.92 0 0 1-.678.276h-2.754l-3.423 10.18h2.753q.4 0 .678.277.277.277.277.679a.92.92 0 0 1-.277.678.92.92 0 0 1-.678.276z"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
export { ItalicIcon };
|
package/dist/Link.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const LinkIcon = (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: "M7.039 16.538q-1.884 0-3.211-1.327Q2.5 13.883 2.5 12q0-1.883 1.328-3.212 1.328-1.328 3.21-1.328h3.02q.318 0 .534.216a.73.73 0 0 1 .216.535q0 .318-.216.534a.73.73 0 0 1-.534.215h-3.02q-1.26 0-2.149.89A2.93 2.93 0 0 0 4 12q0 1.26.89 2.149.888.89 2.147.89h3.02q.32 0 .535.215a.73.73 0 0 1 .216.535q0 .318-.216.534a.73.73 0 0 1-.534.215zM9 12.75a.73.73 0 0 1-.534-.216A.73.73 0 0 1 8.25 12q0-.32.216-.535A.73.73 0 0 1 9 11.25h6q.319 0 .534.216a.73.73 0 0 1 .216.534q0 .319-.216.534a.73.73 0 0 1-.534.216zm4.942 3.788a.73.73 0 0 1-.534-.215.73.73 0 0 1-.216-.535q0-.319.216-.534a.73.73 0 0 1 .534-.216h3.02q1.26 0 2.148-.89Q20 13.26 20 12t-.89-2.15a2.93 2.93 0 0 0-2.147-.889h-3.02a.73.73 0 0 1-.535-.215.73.73 0 0 1-.216-.535q0-.318.216-.534a.73.73 0 0 1 .534-.216h3.02q1.883 0 3.21 1.328 1.328 1.328 1.328 3.21 0 1.884-1.328 3.211-1.327 1.328-3.21 1.328z"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
export { LinkIcon };
|
package/dist/Link2.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
2
|
+
import { LinkContext } from "./link.context.js";
|
|
3
|
+
import { link } from "./link.cva.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Link } from "react-aria-components";
|
|
6
|
+
const Link$1 = ({ variant,...props }) => {
|
|
7
|
+
const linkContext = LinkContext.useLinkContext();
|
|
8
|
+
const linkCva = UIStyle.useConfig()?.link?.cva ?? link;
|
|
9
|
+
const LinkComponent = linkContext?.LinkComponent ?? Link;
|
|
10
|
+
if (!props.to && props.href) props.to = props.href;
|
|
11
|
+
return /* @__PURE__ */ jsx(LinkComponent, {
|
|
12
|
+
...props,
|
|
13
|
+
className: linkCva({
|
|
14
|
+
variant,
|
|
15
|
+
className: props.className
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export { Link$1 as Link };
|
package/dist/Loader.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { loader, loaderWrapper } from "./loader.cva.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
const Loader = ({ size, className,...props }) => {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: loaderWrapper({
|
|
6
|
+
size,
|
|
7
|
+
className
|
|
8
|
+
}),
|
|
9
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
10
|
+
className: loader({
|
|
11
|
+
size,
|
|
12
|
+
className
|
|
13
|
+
}),
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
fill: "none",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
...props,
|
|
18
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
19
|
+
className: "opacity-20",
|
|
20
|
+
cx: "12",
|
|
21
|
+
cy: "12",
|
|
22
|
+
r: "10",
|
|
23
|
+
stroke: "currentColor",
|
|
24
|
+
strokeWidth: "4"
|
|
25
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
26
|
+
fill: "currentColor",
|
|
27
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
28
|
+
})]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export { Loader };
|
package/dist/Menu.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const MenuIcon = (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: "M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1M2 12a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1M3 17a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2z"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
export { MenuIcon };
|
package/dist/Menu2.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MenuDesktop } from "./MenuDesktop.js";
|
|
2
|
+
import { MenuMobile } from "./MenuMobile.js";
|
|
3
|
+
import { useBreakpoint } from "./useBreakpoint.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
const Menu = (props) => {
|
|
6
|
+
if (useBreakpoint("md")) return /* @__PURE__ */ jsx(MenuDesktop, { ...props });
|
|
7
|
+
return /* @__PURE__ */ jsx(MenuMobile, { ...props });
|
|
8
|
+
};
|
|
9
|
+
export { Menu };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MenuPopover } from "./MenuPopover.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MenuTrigger } from "react-aria-components";
|
|
4
|
+
import React, { useRef, useState } from "react";
|
|
5
|
+
import { useHover } from "react-aria";
|
|
6
|
+
var CLOSE_DELAY = 100;
|
|
7
|
+
const MenuDesktop = ({ trigger, items, closeDelay = CLOSE_DELAY, triggerOnHover = false,...props }) => {
|
|
8
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
9
|
+
const timeoutRef = useRef(null);
|
|
10
|
+
const isHoveringTrigger = useRef(false);
|
|
11
|
+
const openMenu = () => {
|
|
12
|
+
if (timeoutRef.current) {
|
|
13
|
+
clearTimeout(timeoutRef.current);
|
|
14
|
+
timeoutRef.current = null;
|
|
15
|
+
}
|
|
16
|
+
setIsOpen(true);
|
|
17
|
+
};
|
|
18
|
+
const closeMenu = () => {
|
|
19
|
+
if (isHoveringTrigger.current) return;
|
|
20
|
+
timeoutRef.current = setTimeout(() => {
|
|
21
|
+
setIsOpen(false);
|
|
22
|
+
timeoutRef.current = null;
|
|
23
|
+
}, closeDelay);
|
|
24
|
+
};
|
|
25
|
+
const { hoverProps } = useHover({
|
|
26
|
+
isDisabled: !triggerOnHover,
|
|
27
|
+
onHoverChange: (isHovering) => {
|
|
28
|
+
if (isHovering) {
|
|
29
|
+
isHoveringTrigger.current = true;
|
|
30
|
+
openMenu();
|
|
31
|
+
} else {
|
|
32
|
+
isHoveringTrigger.current = false;
|
|
33
|
+
closeMenu();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
let triggerComponent = trigger;
|
|
38
|
+
if (triggerOnHover) triggerComponent = React.cloneElement(trigger, hoverProps);
|
|
39
|
+
return /* @__PURE__ */ jsxs(MenuTrigger, {
|
|
40
|
+
isOpen: triggerOnHover ? isOpen : void 0,
|
|
41
|
+
onOpenChange: setIsOpen,
|
|
42
|
+
children: [triggerComponent, /* @__PURE__ */ jsx(MenuPopover, {
|
|
43
|
+
...props,
|
|
44
|
+
offset: 0,
|
|
45
|
+
items,
|
|
46
|
+
isOpen: triggerOnHover ? isOpen : void 0,
|
|
47
|
+
isNonModal: triggerOnHover,
|
|
48
|
+
onMouseEnter: triggerOnHover ? openMenu : void 0,
|
|
49
|
+
onMouseLeave: triggerOnHover ? closeMenu : void 0
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
export { MenuDesktop };
|
package/dist/MenuItem.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ArrowRightIcon } from "./ArrowRight.js";
|
|
2
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
+
import { menuItemCva } from "./menu.cva.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { MenuItem } from "react-aria-components";
|
|
7
|
+
const MenuItem$1 = ({ label, content, children, className,...item }) => {
|
|
8
|
+
const hasSubmenu = !!children && children?.length > 0;
|
|
9
|
+
const menuItemCva$1 = UIStyle.useConfig()?.menu?.itemCva ?? menuItemCva;
|
|
10
|
+
return /* @__PURE__ */ jsxs(MenuItem, {
|
|
11
|
+
...item,
|
|
12
|
+
textValue: label,
|
|
13
|
+
"aria-label": label,
|
|
14
|
+
className: clsx(menuItemCva$1({
|
|
15
|
+
...item,
|
|
16
|
+
isMobile: false
|
|
17
|
+
}), className),
|
|
18
|
+
children: [content ?? label, hasSubmenu && /* @__PURE__ */ jsx(ArrowRightIcon, { className: "size-6" })]
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export { MenuItem$1 as MenuItem };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ArrowLeftIcon } from "./ArrowLeft.js";
|
|
2
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
3
|
+
import { menuCva, menuItemCva } from "./menu.cva.js";
|
|
4
|
+
import { MenuItem as MenuItem$1 } from "./MenuItem.js";
|
|
5
|
+
import { BottomSheet } from "./BottomSheet.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { Button, Menu } from "react-aria-components";
|
|
9
|
+
import { useRef, useState } from "react";
|
|
10
|
+
const MenuMobile = ({ trigger, items,...props }) => {
|
|
11
|
+
const uiStyle = UIStyle.useConfig();
|
|
12
|
+
const menuItemCva$1 = uiStyle?.menu?.itemCva ?? menuItemCva;
|
|
13
|
+
const menuCva$1 = uiStyle?.menu?.cva ?? menuCva;
|
|
14
|
+
const activeItemRef = useRef(null);
|
|
15
|
+
const activeItemParentsRef = useRef([]);
|
|
16
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
17
|
+
const [activeItem, setActiveItem] = useState(null);
|
|
18
|
+
const onAction = (item) => {
|
|
19
|
+
if (!item.children) {
|
|
20
|
+
activeItemRef.current = null;
|
|
21
|
+
activeItemParentsRef.current = [];
|
|
22
|
+
setActiveItem(null);
|
|
23
|
+
setIsOpen(false);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (activeItemRef.current) activeItemParentsRef.current.push(activeItemRef.current);
|
|
27
|
+
activeItemRef.current = item;
|
|
28
|
+
setActiveItem(activeItemRef.current);
|
|
29
|
+
};
|
|
30
|
+
const onClose = () => {
|
|
31
|
+
if (activeItemRef.current) return;
|
|
32
|
+
setIsOpen(false);
|
|
33
|
+
};
|
|
34
|
+
const onBack = () => {
|
|
35
|
+
activeItemRef.current = activeItemParentsRef.current.pop() ?? null;
|
|
36
|
+
setActiveItem(activeItemRef.current);
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsx(BottomSheet, {
|
|
39
|
+
isOpen,
|
|
40
|
+
onOpenChange: setIsOpen,
|
|
41
|
+
trigger,
|
|
42
|
+
isDismissable: true,
|
|
43
|
+
children: () => /* @__PURE__ */ jsxs(Fragment, { children: [activeItem && /* @__PURE__ */ jsxs(Button, {
|
|
44
|
+
className: clsx(menuItemCva$1({
|
|
45
|
+
...props,
|
|
46
|
+
isMobile: true
|
|
47
|
+
})),
|
|
48
|
+
onPress: onBack,
|
|
49
|
+
children: [/* @__PURE__ */ jsx(ArrowLeftIcon, { className: "size-6" }), activeItem.label]
|
|
50
|
+
}), /* @__PURE__ */ jsx(Menu, {
|
|
51
|
+
autoFocus: true,
|
|
52
|
+
onClose,
|
|
53
|
+
className: menuCva$1({
|
|
54
|
+
...props,
|
|
55
|
+
isMobile: true
|
|
56
|
+
}),
|
|
57
|
+
children: (activeItem?.children ?? items).map((item, index) => /* @__PURE__ */ jsx(MenuItem$1, {
|
|
58
|
+
...item,
|
|
59
|
+
onAction: () => onAction(item)
|
|
60
|
+
}, index))
|
|
61
|
+
})] })
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
export { MenuMobile };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { UIStyle } from "./uiStyle.context.js";
|
|
2
|
+
import { menuCva, menuPopoverCva, menuPopoverWrapperCva } from "./menu.cva.js";
|
|
3
|
+
import { MenuItem as MenuItem$1 } from "./MenuItem.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { Menu, Popover, SubmenuTrigger } from "react-aria-components";
|
|
7
|
+
const MenuPopover = ({ items, className,...props }) => {
|
|
8
|
+
const uiStyle = UIStyle.useConfig();
|
|
9
|
+
const menuPopoverCva$1 = uiStyle?.menu?.popoverCva ?? menuPopoverCva;
|
|
10
|
+
const menuPopoverWrapperCva$1 = uiStyle?.menu?.popoverWrapperCva ?? menuPopoverWrapperCva;
|
|
11
|
+
const menuCva$1 = uiStyle?.menu?.cva ?? menuCva;
|
|
12
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
13
|
+
...props,
|
|
14
|
+
className: clsx(menuPopoverCva$1({ ...props }), className),
|
|
15
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: menuPopoverWrapperCva$1({ ...props }),
|
|
17
|
+
children: /* @__PURE__ */ jsx(Menu, {
|
|
18
|
+
className: menuCva$1({
|
|
19
|
+
...props,
|
|
20
|
+
isMobile: false
|
|
21
|
+
}),
|
|
22
|
+
children: items.map((item, index) => !item.children || item.children.length === 0 ? /* @__PURE__ */ jsx(MenuItem$1, { ...item }, index) : /* @__PURE__ */ jsxs(SubmenuTrigger, { children: [/* @__PURE__ */ jsx(MenuItem$1, { ...item }), /* @__PURE__ */ jsx(MenuPopover, {
|
|
23
|
+
offset: 0,
|
|
24
|
+
items: item.children
|
|
25
|
+
})] }, index))
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export { MenuPopover };
|