@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,29 @@
|
|
|
1
|
+
import { Tag } from "./Tag.js";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
const SelectInputTags = ({ selectedItems, isDisabled, selectedTagsType, collapseAfter, onRemove }) => {
|
|
5
|
+
const { displayedItems, remainingCount } = useMemo(() => {
|
|
6
|
+
if (!collapseAfter || selectedItems.length <= collapseAfter) return {
|
|
7
|
+
displayedItems: selectedItems,
|
|
8
|
+
remainingCount: 0
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
displayedItems: selectedItems.slice(0, collapseAfter - 1),
|
|
12
|
+
remainingCount: selectedItems.length - (collapseAfter - 1)
|
|
13
|
+
};
|
|
14
|
+
}, [selectedItems, collapseAfter]);
|
|
15
|
+
if (selectedTagsType === "tags") return /* @__PURE__ */ jsxs(Fragment, { children: [displayedItems.map((item) => /* @__PURE__ */ jsx(Tag, {
|
|
16
|
+
dismissable: true,
|
|
17
|
+
isDisabled,
|
|
18
|
+
onDismiss: () => onRemove(item.id),
|
|
19
|
+
excludeFromTabOrder: true,
|
|
20
|
+
className: "z-1",
|
|
21
|
+
children: item.label
|
|
22
|
+
}, item.id)), remainingCount > 0 && /* @__PURE__ */ jsx(Tag, {
|
|
23
|
+
isDisabled,
|
|
24
|
+
excludeFromTabOrder: true,
|
|
25
|
+
children: `+${remainingCount} more`
|
|
26
|
+
}, "remaining-count")] });
|
|
27
|
+
return /* @__PURE__ */ jsx("p", { children: selectedItems.map((item) => item.label).join(", ") });
|
|
28
|
+
};
|
|
29
|
+
export { SelectInputTags };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { SelectAllItemId } from "./useSelectItems.js";
|
|
2
|
+
import { SelectContext } from "./select.context.js";
|
|
3
|
+
import { SelectListBoxItem } from "./SelectListBoxItem.js";
|
|
4
|
+
import { SelectListBoxItemSelectAll } from "./SelectListBoxItemSelectAll.js";
|
|
5
|
+
import { SelectListBoxLoadingItem } from "./SelectListBoxLoadingItem.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { ListBox, ListLayout, Virtualizer } from "react-aria-components";
|
|
9
|
+
const SelectListBox = ({ label, selectionMode, isSearchable, isScrollable = true, virtualizerOptions, newItemRender, onLoadMore, className, onClose,...props }) => {
|
|
10
|
+
const { fieldState, onChange, listItems, selectableListItems, selectedIds, isMultiple, onClear, onSelectAll } = SelectContext.useSelect();
|
|
11
|
+
const onSelectionChange = (value) => {
|
|
12
|
+
const ids = Array.from(value);
|
|
13
|
+
if (!isMultiple && ids.length === 0) {
|
|
14
|
+
if (fieldState.value) {
|
|
15
|
+
onClose?.();
|
|
16
|
+
onChange(fieldState.value);
|
|
17
|
+
}
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (isMultiple && ids.includes("all-item-id")) {
|
|
21
|
+
if (ids.length > selectableListItems.length) onClear();
|
|
22
|
+
else onSelectAll();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (isMultiple) onChange(ids);
|
|
26
|
+
else {
|
|
27
|
+
onClose?.();
|
|
28
|
+
onChange(ids[0]);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const renderItem = (item) => {
|
|
32
|
+
if (item.isSelectAllItem) return /* @__PURE__ */ jsx(SelectListBoxItemSelectAll, { ...item }, item.id);
|
|
33
|
+
if (item.isLoadingItem) return /* @__PURE__ */ jsx(SelectListBoxLoadingItem, {
|
|
34
|
+
...item,
|
|
35
|
+
onLoadMore
|
|
36
|
+
}, item.id);
|
|
37
|
+
return /* @__PURE__ */ jsx(SelectListBoxItem, {
|
|
38
|
+
...item,
|
|
39
|
+
isSearchable,
|
|
40
|
+
isNewItem: item.isNewItem,
|
|
41
|
+
newItemRender
|
|
42
|
+
}, item.id);
|
|
43
|
+
};
|
|
44
|
+
if (virtualizerOptions || listItems.length > 100) return /* @__PURE__ */ jsx(Virtualizer, {
|
|
45
|
+
layout: ListLayout,
|
|
46
|
+
layoutOptions: virtualizerOptions,
|
|
47
|
+
children: /* @__PURE__ */ jsx(ListBox, {
|
|
48
|
+
...props,
|
|
49
|
+
"aria-label": label,
|
|
50
|
+
selectionMode,
|
|
51
|
+
className: clsx("flex-1 outline-none [&>div:last-child>*]:border-b-0", isScrollable ? "overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
|
|
52
|
+
items: listItems,
|
|
53
|
+
selectedKeys: selectedIds,
|
|
54
|
+
onSelectionChange,
|
|
55
|
+
escapeKeyBehavior: "none",
|
|
56
|
+
shouldSelectOnPressUp: true,
|
|
57
|
+
children: renderItem
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
return /* @__PURE__ */ jsx(ListBox, {
|
|
61
|
+
...props,
|
|
62
|
+
"aria-label": label,
|
|
63
|
+
selectionMode,
|
|
64
|
+
className: clsx("flex-1 outline-none [&>div:last-child]:border-b-0", isScrollable ? "overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
|
|
65
|
+
items: listItems,
|
|
66
|
+
selectedKeys: selectedIds,
|
|
67
|
+
onSelectionChange,
|
|
68
|
+
escapeKeyBehavior: "none",
|
|
69
|
+
shouldSelectOnPressUp: true,
|
|
70
|
+
children: renderItem
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
export { SelectListBox };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CheckboxCheckmark } from "./CheckboxCheckmark2.js";
|
|
2
|
+
import { ns } from "./i18n.js";
|
|
3
|
+
import { SelectContext } from "./select.context.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { ListBoxItem } from "react-aria-components";
|
|
7
|
+
import { useMemo, useRef } from "react";
|
|
8
|
+
import { useTranslation } from "react-i18next";
|
|
9
|
+
const SelectListBoxItem = ({ isSearchable, isNewItem, newItemRender, id, label, content, isDisabled }) => {
|
|
10
|
+
const ref = useRef(null);
|
|
11
|
+
const { t } = useTranslation("ui");
|
|
12
|
+
const { selectedIds, isMultiple } = SelectContext.useSelect();
|
|
13
|
+
const itemContent = useMemo(() => {
|
|
14
|
+
if (isNewItem) return newItemRender?.(label) ?? `${t(($) => $.ui.autocomplete.createNewBtn)} '${label}'`;
|
|
15
|
+
return content ?? label;
|
|
16
|
+
}, [
|
|
17
|
+
isNewItem,
|
|
18
|
+
newItemRender,
|
|
19
|
+
label,
|
|
20
|
+
content,
|
|
21
|
+
t
|
|
22
|
+
]);
|
|
23
|
+
return /* @__PURE__ */ jsxs(ListBoxItem, {
|
|
24
|
+
ref,
|
|
25
|
+
id,
|
|
26
|
+
textValue: label,
|
|
27
|
+
isDisabled,
|
|
28
|
+
className: clsx(selectListBoxItemClass, !isMultiple && "selected:bg-interactive-contained-primary-idle selected:text-interactive-contained-primary-on-idle", isNewItem ? "text-interactive-text-primary-idle" : "text-interactive-text-secondary-idle"),
|
|
29
|
+
children: [
|
|
30
|
+
isMultiple && !isSearchable && /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
31
|
+
variant: "default",
|
|
32
|
+
className: "group-focus-visible:outline-none!"
|
|
33
|
+
}),
|
|
34
|
+
isMultiple && isSearchable && /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: "group",
|
|
36
|
+
"data-rac": "",
|
|
37
|
+
"data-selected": selectedIds.includes(id) || void 0,
|
|
38
|
+
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
39
|
+
variant: "default",
|
|
40
|
+
className: "group-focus-visible:outline-none!"
|
|
41
|
+
})
|
|
42
|
+
}),
|
|
43
|
+
itemContent
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const selectListBoxItemClass = clsx("group flex cursor-pointer items-center gap-2 px-list-side-item py-list-height-item", "border-b border-b-elevation-outline-default-1 outline-none", "font-labels-default text-interactive-text-secondary-idle text-label-2", "hover:text-interactive-text-secondary-hover", "focus-visible:bg-interactive-contained-primary-focus focus-visible:text-interactive-text-secondary-idle-inverted", "disabled:cursor-default disabled:text-interactive-text-secondary-disabled");
|
|
48
|
+
export { SelectListBoxItem, selectListBoxItemClass };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CheckboxCheckmark } from "./CheckboxCheckmark2.js";
|
|
2
|
+
import { ns } from "./i18n.js";
|
|
3
|
+
import { SelectContext } from "./select.context.js";
|
|
4
|
+
import { selectListBoxItemClass } from "./SelectListBoxItem.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ListBoxItem } from "react-aria-components";
|
|
7
|
+
import { useRef } from "react";
|
|
8
|
+
import { useTranslation } from "react-i18next";
|
|
9
|
+
const SelectListBoxItemSelectAll = ({ id, label, isDisabled }) => {
|
|
10
|
+
const ref = useRef(null);
|
|
11
|
+
const { t } = useTranslation("ui");
|
|
12
|
+
const { selectableListItems, selectedIds } = SelectContext.useSelect();
|
|
13
|
+
return /* @__PURE__ */ jsxs(ListBoxItem, {
|
|
14
|
+
ref,
|
|
15
|
+
id,
|
|
16
|
+
textValue: label || t(($) => $.ui.select.allOption),
|
|
17
|
+
isDisabled,
|
|
18
|
+
className: selectListBoxItemClass,
|
|
19
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: "group",
|
|
21
|
+
"data-rac": "",
|
|
22
|
+
"data-selected": selectedIds.length === selectableListItems.length || void 0,
|
|
23
|
+
"data-indeterminate": selectedIds.length > 0 && selectedIds.length < selectableListItems.length || void 0,
|
|
24
|
+
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
25
|
+
variant: "default",
|
|
26
|
+
className: "group-focus-visible:!outline-none"
|
|
27
|
+
})
|
|
28
|
+
}), t(($) => $.ui.select.allOption)]
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export { SelectListBoxItemSelectAll };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Loader } from "./Loader.js";
|
|
2
|
+
import { ns } from "./i18n.js";
|
|
3
|
+
import { SelectContext } from "./select.context.js";
|
|
4
|
+
import { selectListBoxItemClass } from "./SelectListBoxItem.js";
|
|
5
|
+
import { useIntersectionObserver } from "./useIntersectionObserver.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { ListBoxItem } from "react-aria-components";
|
|
8
|
+
import { useCallback } from "react";
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
10
|
+
const SelectListBoxLoadingItem = ({ id, label, onLoadMore }) => {
|
|
11
|
+
const { t } = useTranslation("ui");
|
|
12
|
+
const { isDebouncing, isLoading, hasLoadMore } = SelectContext.useSelect();
|
|
13
|
+
const { setRef } = useIntersectionObserver({
|
|
14
|
+
onIntersection: useCallback(() => {
|
|
15
|
+
if (!isDebouncing && !isLoading && hasLoadMore) onLoadMore?.();
|
|
16
|
+
}, [
|
|
17
|
+
isDebouncing,
|
|
18
|
+
isLoading,
|
|
19
|
+
hasLoadMore,
|
|
20
|
+
onLoadMore
|
|
21
|
+
]),
|
|
22
|
+
rootMargin: "40px"
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
25
|
+
id,
|
|
26
|
+
textValue: label || t(($) => $.ui.loadingState.text),
|
|
27
|
+
isDisabled: true,
|
|
28
|
+
className: selectListBoxItemClass,
|
|
29
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
30
|
+
ref: (ref) => {
|
|
31
|
+
setRef(ref);
|
|
32
|
+
return () => {
|
|
33
|
+
setRef(null);
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
className: "flex flex-1 justify-center text-interactive-text-primary-idle",
|
|
37
|
+
children: /* @__PURE__ */ jsx(Loader, {})
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
export { SelectListBoxLoadingItem };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TextButton } from "./TextButton.js";
|
|
2
|
+
import { ns } from "./i18n.js";
|
|
3
|
+
import { SelectContext } from "./select.context.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
const SelectListBoxSelectionBar = ({ className }) => {
|
|
8
|
+
const { t } = useTranslation("ui");
|
|
9
|
+
const { onClear, onSelectAll } = SelectContext.useSelect();
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className: clsx("flex items-center justify-between border-elevation-outline-default-1 border-b px-4 py-3", className),
|
|
12
|
+
children: [/* @__PURE__ */ jsx(TextButton, {
|
|
13
|
+
type: "button",
|
|
14
|
+
color: "primary",
|
|
15
|
+
onPress: onSelectAll,
|
|
16
|
+
children: t(($) => $.ui.select.selectAll)
|
|
17
|
+
}), /* @__PURE__ */ jsx(TextButton, {
|
|
18
|
+
type: "button",
|
|
19
|
+
color: "secondary",
|
|
20
|
+
onPress: onClear,
|
|
21
|
+
children: t(($) => $.ui.select.clearSelection)
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
export { SelectListBoxSelectionBar };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { BottomSheet } from "./BottomSheet.js";
|
|
2
|
+
import { FormFieldHeader } from "./FormFieldHeader.js";
|
|
3
|
+
import { FormFieldHeaderClose } from "./FormFieldHeaderClose.js";
|
|
4
|
+
import { FormField } from "./FormField.js";
|
|
5
|
+
import { SelectContext } from "./select.context.js";
|
|
6
|
+
import { SelectInput } from "./SelectInput.js";
|
|
7
|
+
import { SelectListBox } from "./SelectListBox.js";
|
|
8
|
+
import { TextInput } from "./TextInput.js";
|
|
9
|
+
import { SelectListBoxSelectionBar } from "./SelectListBoxSelectionBar.js";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { clsx } from "clsx";
|
|
12
|
+
import { DialogTrigger } from "react-aria-components";
|
|
13
|
+
import { useRef } from "react";
|
|
14
|
+
import { useLabel } from "react-aria";
|
|
15
|
+
const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur,...props }) => {
|
|
16
|
+
const { label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, isSearchable, isClearable, as, collapseAfter, selectedTagsType } = props;
|
|
17
|
+
const formFieldProps = {
|
|
18
|
+
error,
|
|
19
|
+
label,
|
|
20
|
+
tooltipText,
|
|
21
|
+
helperText,
|
|
22
|
+
isRequired,
|
|
23
|
+
rightContent,
|
|
24
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
25
|
+
hideLabel,
|
|
26
|
+
isDisabled,
|
|
27
|
+
headerClassName,
|
|
28
|
+
errorClassName
|
|
29
|
+
};
|
|
30
|
+
const { labelProps, fieldProps } = useLabel({ label });
|
|
31
|
+
const headerProps = {
|
|
32
|
+
label,
|
|
33
|
+
tooltipText,
|
|
34
|
+
helperText,
|
|
35
|
+
isRequired,
|
|
36
|
+
rightContent,
|
|
37
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
38
|
+
isDisabled,
|
|
39
|
+
className: headerClassName,
|
|
40
|
+
labelProps
|
|
41
|
+
};
|
|
42
|
+
const { fieldState, isOpen, setIsOpen, onInputChange, isMultiple } = SelectContext.useSelect();
|
|
43
|
+
const searchInputRef = useRef(null);
|
|
44
|
+
const dialogTriggerProps = {
|
|
45
|
+
isOpen,
|
|
46
|
+
onOpenChange: setIsOpen
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsx(FormField, {
|
|
49
|
+
...formFieldProps,
|
|
50
|
+
as,
|
|
51
|
+
labelProps,
|
|
52
|
+
className: clsx("w-full", containerClassName),
|
|
53
|
+
children: /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
54
|
+
...dialogTriggerProps,
|
|
55
|
+
children: [customTrigger ? /* @__PURE__ */ jsx("div", {
|
|
56
|
+
...fieldProps,
|
|
57
|
+
ref,
|
|
58
|
+
children: customTrigger
|
|
59
|
+
}) : /* @__PURE__ */ jsx(SelectInput, {
|
|
60
|
+
ref,
|
|
61
|
+
placeholder,
|
|
62
|
+
variant,
|
|
63
|
+
as,
|
|
64
|
+
isDisabled,
|
|
65
|
+
isInvalid: !!error,
|
|
66
|
+
className,
|
|
67
|
+
hideDropdownIcon,
|
|
68
|
+
isSearchable: false,
|
|
69
|
+
isClearable,
|
|
70
|
+
showSelectionContent,
|
|
71
|
+
onBlur,
|
|
72
|
+
fieldProps,
|
|
73
|
+
headerProps,
|
|
74
|
+
collapseAfter,
|
|
75
|
+
selectedTagsType
|
|
76
|
+
}), /* @__PURE__ */ jsx(BottomSheet, {
|
|
77
|
+
isOpen,
|
|
78
|
+
onOpenChange: setIsOpen,
|
|
79
|
+
onStateChange: (state) => {
|
|
80
|
+
if (state === "opened") searchInputRef.current?.focus();
|
|
81
|
+
},
|
|
82
|
+
label,
|
|
83
|
+
footer: isMultiple && /* @__PURE__ */ jsx(SelectListBoxSelectionBar, {}),
|
|
84
|
+
isDismissable: true,
|
|
85
|
+
children: (close) => /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "flex flex-col",
|
|
87
|
+
children: [isSearchable ? /* @__PURE__ */ jsx(TextInput, {
|
|
88
|
+
ref: searchInputRef,
|
|
89
|
+
label,
|
|
90
|
+
placeholder,
|
|
91
|
+
value: fieldState.inputValue,
|
|
92
|
+
onChange: onInputChange,
|
|
93
|
+
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
94
|
+
inputClassName,
|
|
95
|
+
className: "mb-1-5 px-4 pt-3"
|
|
96
|
+
}) : /* @__PURE__ */ jsx(FormFieldHeader, {
|
|
97
|
+
label,
|
|
98
|
+
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
99
|
+
className: "!mb-1-5 px-4 pt-3"
|
|
100
|
+
}), /* @__PURE__ */ jsx(SelectListBox, {
|
|
101
|
+
...props,
|
|
102
|
+
autoFocus: !isSearchable,
|
|
103
|
+
isScrollable: false,
|
|
104
|
+
onClose: close
|
|
105
|
+
})]
|
|
106
|
+
})
|
|
107
|
+
})]
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
export { SelectMobile };
|
package/dist/Send.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const SendIcon = (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: "M5.105 7.59c-1.092-1.712.764-3.774 2.58-2.866l10.973 5.487c1.474.737 1.474 2.84 0 3.578L7.685 19.275c-1.816.908-3.672-1.154-2.58-2.865L7.92 12zM17.764 12 6.79 6.513l2.815 4.41a2 2 0 0 1 0 2.153l-2.815 4.41z",
|
|
12
|
+
clipRule: "evenodd"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
export { SendIcon };
|
package/dist/Slider.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Typography } from "./Typography.js";
|
|
2
|
+
import { uiOutlineClass } from "./outline.clsx.js";
|
|
3
|
+
import { UIConfig } from "./uiConfig.context.js";
|
|
4
|
+
import { FormField } from "./FormField.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { Slider, SliderThumb, SliderTrack } from "react-aria-components";
|
|
8
|
+
import { mergeRefs } from "@react-aria/utils";
|
|
9
|
+
import { Controller } from "react-hook-form";
|
|
10
|
+
var SliderBase = (props) => {
|
|
11
|
+
const ui = UIConfig.useConfig();
|
|
12
|
+
const { label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, unit, hideLabel = ui.input.hideLabel, minValue = ui.slider.minValue, maxValue = ui.slider.maxValue,...rest } = props;
|
|
13
|
+
const formFieldProps = {
|
|
14
|
+
error,
|
|
15
|
+
label,
|
|
16
|
+
tooltipText,
|
|
17
|
+
helperText,
|
|
18
|
+
isRequired,
|
|
19
|
+
rightContent,
|
|
20
|
+
isHeaderHidden,
|
|
21
|
+
hideLabel,
|
|
22
|
+
isDisabled,
|
|
23
|
+
headerClassName,
|
|
24
|
+
errorClassName
|
|
25
|
+
};
|
|
26
|
+
const defaultValue = props.defaultValue ?? (props.isRange ? [minValue, minValue] : minValue);
|
|
27
|
+
const getTrackFillStyle = (state) => {
|
|
28
|
+
const p0 = state.getThumbPercent(0);
|
|
29
|
+
const p1 = state.getThumbPercent(1);
|
|
30
|
+
return {
|
|
31
|
+
left: props.isRange ? `${p0 * 100}%` : 0,
|
|
32
|
+
width: props.isRange ? `${(p1 - p0) * 100}%` : `${p0 * 100}%`
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ jsx(Slider, {
|
|
36
|
+
...rest,
|
|
37
|
+
defaultValue,
|
|
38
|
+
minValue,
|
|
39
|
+
maxValue,
|
|
40
|
+
isDisabled,
|
|
41
|
+
children: /* @__PURE__ */ jsx(FormField, {
|
|
42
|
+
...formFieldProps,
|
|
43
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
44
|
+
className: "flex items-center justify-between",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsxs(Typography, {
|
|
47
|
+
className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
|
|
48
|
+
size: "label-2",
|
|
49
|
+
children: [minValue, unit]
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ jsx(SliderTrack, {
|
|
52
|
+
className: "relative mx-2 h-6 w-full",
|
|
53
|
+
children: ({ state }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: "absolute top-1/2 h-1 w-full -translate-y-1/2 overflow-hidden rounded-full bg-elevation-outline-default-1",
|
|
55
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: clsx("absolute top-0 h-1 rounded-full", props.isDisabled ? "bg-interactive-contained-primary-disabled" : "bg-interactive-contained-primary-idle"),
|
|
57
|
+
style: getTrackFillStyle(state)
|
|
58
|
+
})
|
|
59
|
+
}), state.values.map((_, i) => /* @__PURE__ */ jsx(SliderThumb, {
|
|
60
|
+
index: i,
|
|
61
|
+
className: clsx("absolute top-1/2 size-4 cursor-pointer rounded-full bg-interactive-contained-primary-idle disabled:cursor-default", "dragging:bg-interactive-contained-primary-pressed hover:bg-interactive-contained-primary-hover focus-visible:outline-interactive-contained-primary-focus disabled:bg-interactive-contained-primary-disabled", uiOutlineClass),
|
|
62
|
+
isDisabled
|
|
63
|
+
}, i))] })
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsxs(Typography, {
|
|
66
|
+
className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
|
|
67
|
+
size: "label-2",
|
|
68
|
+
children: [maxValue, unit]
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
const Slider$1 = (props) => {
|
|
76
|
+
if ("formControl" in props && props.formControl) {
|
|
77
|
+
const { formControl, ref,...innerProps } = props;
|
|
78
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
79
|
+
control: formControl.control,
|
|
80
|
+
name: formControl.name,
|
|
81
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(SliderBase, {
|
|
82
|
+
...innerProps,
|
|
83
|
+
ref: mergeRefs(ref, field.ref),
|
|
84
|
+
value: field.value,
|
|
85
|
+
onChange: field.onChange,
|
|
86
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
87
|
+
error: props.error ?? error?.message
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return /* @__PURE__ */ jsx(SliderBase, { ...props });
|
|
92
|
+
};
|
|
93
|
+
export { Slider$1 as Slider };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ChevronDownIcon } from "./ChevronDown.js";
|
|
2
|
+
import { Button } from "./Button.js";
|
|
3
|
+
import { IconButton } from "./IconButton.js";
|
|
4
|
+
import { Menu } from "./Menu2.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
const SplitButton = ({ variant, color, width, size, label, labelRight, link, items, className, isLoading,...props }) => {
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
className: "group/split flex items-center",
|
|
10
|
+
"data-split": "",
|
|
11
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
12
|
+
...props,
|
|
13
|
+
width,
|
|
14
|
+
size,
|
|
15
|
+
variant,
|
|
16
|
+
color,
|
|
17
|
+
link,
|
|
18
|
+
className: clsx("rounded-r-none! border-r border-solid", className),
|
|
19
|
+
"data-separator": "",
|
|
20
|
+
isLoading,
|
|
21
|
+
children: label
|
|
22
|
+
}), /* @__PURE__ */ jsx(Menu, {
|
|
23
|
+
trigger: /* @__PURE__ */ jsx(IconButton, {
|
|
24
|
+
size,
|
|
25
|
+
variant,
|
|
26
|
+
color,
|
|
27
|
+
label: labelRight,
|
|
28
|
+
icon: ChevronDownIcon,
|
|
29
|
+
className: "rounded-l-none! border-l-0!",
|
|
30
|
+
isDisabled: props.isDisabled || isLoading
|
|
31
|
+
}),
|
|
32
|
+
items
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export { SplitButton };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const StrikethroughIcon = (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: "M3.833 13.624a.68.68 0 0 1-.498-.2.68.68 0 0 1-.202-.5q0-.297.202-.499.201-.2.498-.2h16.334q.297 0 .498.2.202.202.202.5a.68.68 0 0 1-.202.498q-.201.201-.498.201zm7.18-3.248V6.983H6.929a.95.95 0 0 1-.699-.288.95.95 0 0 1-.288-.7q0-.412.288-.703A.95.95 0 0 1 6.93 5h10.15q.411 0 .699.288a.95.95 0 0 1 .288.7q0 .413-.288.704a.95.95 0 0 1-.7.291h-4.083v3.393zm0 5.097h1.983v2.54a.95.95 0 0 1-.288.7.95.95 0 0 1-.7.287.96.96 0 0 1-.703-.29.96.96 0 0 1-.292-.706z"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
export { StrikethroughIcon };
|