@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
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { Focusable } from "react-aria-components";
|
|
4
|
-
import { InfoIcon } from "../../../assets/icons/Info.js";
|
|
5
|
-
import { FormFieldLabel } from "./FormFieldLabel.js";
|
|
6
|
-
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
7
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
8
|
-
const FormFieldHeader = ({
|
|
9
|
-
label,
|
|
10
|
-
tooltipText,
|
|
11
|
-
helperText,
|
|
12
|
-
isRequired,
|
|
13
|
-
rightContent,
|
|
14
|
-
isHeaderHidden,
|
|
15
|
-
isDisabled,
|
|
16
|
-
className,
|
|
17
|
-
labelProps
|
|
18
|
-
}) => {
|
|
19
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx(isHeaderHidden ? "sr-only" : "mb-1", className), children: [
|
|
20
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
21
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1", children: [
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
23
|
-
FormFieldLabel,
|
|
24
|
-
{
|
|
25
|
-
label,
|
|
26
|
-
isRequired,
|
|
27
|
-
isDisabled,
|
|
28
|
-
labelProps
|
|
29
|
-
}
|
|
30
|
-
),
|
|
31
|
-
tooltipText && /* @__PURE__ */ jsx(Tooltip, { text: tooltipText, children: /* @__PURE__ */ jsx(Focusable, { children: /* @__PURE__ */ jsx(
|
|
32
|
-
InfoIcon,
|
|
33
|
-
{
|
|
34
|
-
className: clsx(
|
|
35
|
-
"size-6",
|
|
36
|
-
isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle hover:text-interactive-text-secondary-hover"
|
|
37
|
-
),
|
|
38
|
-
tabIndex: 0
|
|
39
|
-
}
|
|
40
|
-
) }) })
|
|
41
|
-
] }),
|
|
42
|
-
rightContent
|
|
43
|
-
] }),
|
|
44
|
-
helperText && /* @__PURE__ */ jsx(
|
|
45
|
-
Typography,
|
|
46
|
-
{
|
|
47
|
-
slot: "description",
|
|
48
|
-
size: "label-2",
|
|
49
|
-
className: "text-text-default-2",
|
|
50
|
-
children: helperText
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] });
|
|
54
|
-
};
|
|
55
|
-
export {
|
|
56
|
-
FormFieldHeader
|
|
57
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from "react-aria-components";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
5
|
-
import { ns } from "../../../config/i18n.js";
|
|
6
|
-
const FormFieldHeaderClose = ({ onClose }) => {
|
|
7
|
-
const { t } = useTranslation(ns);
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
-
Button,
|
|
10
|
-
{
|
|
11
|
-
onPress: onClose,
|
|
12
|
-
"aria-label": t(($) => $.ui.closeAlt),
|
|
13
|
-
className: "shrink-0 focus-visible:outline-interactive-text-secondary-focus",
|
|
14
|
-
children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-6 text-interactive-text-secondary-idle" })
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
FormFieldHeaderClose
|
|
20
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { Label } from "react-aria-components";
|
|
4
|
-
import { inputSide } from "../shared/input.cva.js";
|
|
5
|
-
import { labelTypography, labelBase } from "../shared/label.cva.js";
|
|
6
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
7
|
-
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
8
|
-
const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, size }) => {
|
|
9
|
-
const uiStyle = UIStyle.useConfig();
|
|
10
|
-
const labelTypographyMap = uiStyle?.label?.typography ?? labelTypography;
|
|
11
|
-
const labelBaseCva = uiStyle?.label?.cva ?? labelBase;
|
|
12
|
-
const inputSideCva = uiStyle?.input?.sideCva ?? inputSide;
|
|
13
|
-
return /* @__PURE__ */ jsx(Label, { ...labelProps, children: /* @__PURE__ */ jsxs(
|
|
14
|
-
Typography,
|
|
15
|
-
{
|
|
16
|
-
ref,
|
|
17
|
-
as: "span",
|
|
18
|
-
...{
|
|
19
|
-
size: "label-2",
|
|
20
|
-
variant: "prominent-1",
|
|
21
|
-
...labelTypographyMap({ as })
|
|
22
|
-
},
|
|
23
|
-
className: clsx(
|
|
24
|
-
labelBaseCva({ as }),
|
|
25
|
-
as && ["filter", "floating"].includes(as) && inputSideCva({ size, type: "left" }),
|
|
26
|
-
labelProps?.className
|
|
27
|
-
),
|
|
28
|
-
children: [
|
|
29
|
-
label,
|
|
30
|
-
isRequired && /* @__PURE__ */ jsx("span", { className: clsx(!isDisabled && "text-text-error-1"), children: "*" })
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
) });
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
FormFieldLabel
|
|
37
|
-
};
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { mergeRefs } from "@react-aria/utils";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { useRef } from "react";
|
|
5
|
-
import { useNumberField } from "react-aria";
|
|
6
|
-
import { useLocale, Input } from "react-aria-components";
|
|
7
|
-
import { Controller } from "react-hook-form";
|
|
8
|
-
import { useNumberFieldState } from "react-stately";
|
|
9
|
-
import { FormField } from "../../FormField/FormField.js";
|
|
10
|
-
import { InputContent } from "../shared/InputContent.js";
|
|
11
|
-
import { useInputCva } from "../../shared/input.cva.js";
|
|
12
|
-
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
13
|
-
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
14
|
-
const NumberInputBase = (props) => {
|
|
15
|
-
const ui = UIConfig.useConfig();
|
|
16
|
-
const inputCva = useInputCva();
|
|
17
|
-
const {
|
|
18
|
-
ref,
|
|
19
|
-
inputClassName,
|
|
20
|
-
label,
|
|
21
|
-
tooltipText,
|
|
22
|
-
helperText,
|
|
23
|
-
isRequired,
|
|
24
|
-
rightContent,
|
|
25
|
-
isDisabled,
|
|
26
|
-
headerClassName,
|
|
27
|
-
errorClassName,
|
|
28
|
-
isHeaderHidden,
|
|
29
|
-
error,
|
|
30
|
-
className,
|
|
31
|
-
unit,
|
|
32
|
-
isLoading,
|
|
33
|
-
action,
|
|
34
|
-
leadingIcon,
|
|
35
|
-
trailingIcon,
|
|
36
|
-
value,
|
|
37
|
-
onChange,
|
|
38
|
-
onBlur,
|
|
39
|
-
formatOptions = ui.numberInput.formatOptions,
|
|
40
|
-
variant = ui.input.variant,
|
|
41
|
-
as = ui.input.as,
|
|
42
|
-
size = ui.input.size,
|
|
43
|
-
hideLabel = ui.input.hideLabel,
|
|
44
|
-
isClearable = ui.input.isClearable,
|
|
45
|
-
...rest
|
|
46
|
-
} = props;
|
|
47
|
-
const numberFieldRef = useRef(null);
|
|
48
|
-
const { locale } = useLocale();
|
|
49
|
-
const numberProps = {
|
|
50
|
-
...rest,
|
|
51
|
-
value: value ?? void 0,
|
|
52
|
-
label,
|
|
53
|
-
isDisabled,
|
|
54
|
-
isInvalid: !!error,
|
|
55
|
-
isRequired,
|
|
56
|
-
onChange,
|
|
57
|
-
onBlur,
|
|
58
|
-
locale,
|
|
59
|
-
formatOptions
|
|
60
|
-
};
|
|
61
|
-
const state = useNumberFieldState(numberProps);
|
|
62
|
-
const { labelProps, inputProps } = useNumberField(numberProps, state, numberFieldRef);
|
|
63
|
-
const formFieldProps = {
|
|
64
|
-
error,
|
|
65
|
-
label,
|
|
66
|
-
tooltipText,
|
|
67
|
-
helperText,
|
|
68
|
-
isRequired,
|
|
69
|
-
rightContent,
|
|
70
|
-
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
71
|
-
hideLabel,
|
|
72
|
-
isDisabled,
|
|
73
|
-
headerClassName,
|
|
74
|
-
errorClassName
|
|
75
|
-
};
|
|
76
|
-
const inputContentProps = {
|
|
77
|
-
unit,
|
|
78
|
-
isLoading,
|
|
79
|
-
isDisabled,
|
|
80
|
-
action,
|
|
81
|
-
leadingIcon,
|
|
82
|
-
trailingIcon,
|
|
83
|
-
isClearable
|
|
84
|
-
};
|
|
85
|
-
const headerProps = {
|
|
86
|
-
label,
|
|
87
|
-
tooltipText,
|
|
88
|
-
helperText,
|
|
89
|
-
isRequired,
|
|
90
|
-
rightContent,
|
|
91
|
-
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
92
|
-
isDisabled,
|
|
93
|
-
className: headerClassName,
|
|
94
|
-
labelProps
|
|
95
|
-
};
|
|
96
|
-
return /* @__PURE__ */ jsx(
|
|
97
|
-
TooltipWrapper,
|
|
98
|
-
{
|
|
99
|
-
as,
|
|
100
|
-
error,
|
|
101
|
-
children: /* @__PURE__ */ jsx(
|
|
102
|
-
FormField,
|
|
103
|
-
{
|
|
104
|
-
...formFieldProps,
|
|
105
|
-
as,
|
|
106
|
-
labelProps,
|
|
107
|
-
className: clsx("group w-full", className),
|
|
108
|
-
children: /* @__PURE__ */ jsx(
|
|
109
|
-
InputContent,
|
|
110
|
-
{
|
|
111
|
-
...inputContentProps,
|
|
112
|
-
headerProps,
|
|
113
|
-
as,
|
|
114
|
-
size,
|
|
115
|
-
children: (style) => /* @__PURE__ */ jsx(
|
|
116
|
-
Input,
|
|
117
|
-
{
|
|
118
|
-
...inputProps,
|
|
119
|
-
ref,
|
|
120
|
-
"data-is-empty": value === null || value === void 0 || void 0,
|
|
121
|
-
placeholder: as === "floating" ? "" : inputProps.placeholder,
|
|
122
|
-
className: inputCva({
|
|
123
|
-
variant,
|
|
124
|
-
as,
|
|
125
|
-
size,
|
|
126
|
-
...rest,
|
|
127
|
-
className: inputClassName
|
|
128
|
-
}),
|
|
129
|
-
style
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
};
|
|
139
|
-
const NumberInput = (props) => {
|
|
140
|
-
if ("formControl" in props && props.formControl) {
|
|
141
|
-
const { formControl, ref, ...innerProps } = props;
|
|
142
|
-
return /* @__PURE__ */ jsx(
|
|
143
|
-
Controller,
|
|
144
|
-
{
|
|
145
|
-
control: formControl.control,
|
|
146
|
-
name: formControl.name,
|
|
147
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
148
|
-
NumberInputBase,
|
|
149
|
-
{
|
|
150
|
-
...innerProps,
|
|
151
|
-
ref: mergeRefs(ref, field.ref),
|
|
152
|
-
value: field.value,
|
|
153
|
-
onChange: field.onChange,
|
|
154
|
-
onBlur: field.onBlur,
|
|
155
|
-
isDisabled: field.disabled || props.isDisabled,
|
|
156
|
-
error: props.error ?? error?.message
|
|
157
|
-
}
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
return /* @__PURE__ */ jsx(NumberInputBase, { ...props });
|
|
163
|
-
};
|
|
164
|
-
export {
|
|
165
|
-
NumberInput
|
|
166
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { ViewIcon } from "../../../../assets/icons/View.js";
|
|
5
|
-
import { ViewOffIcon } from "../../../../assets/icons/ViewOff.js";
|
|
6
|
-
import { TextInput } from "../TextInput/TextInput.js";
|
|
7
|
-
import { ns } from "../../../../config/i18n.js";
|
|
8
|
-
const PasswordInput = (props) => {
|
|
9
|
-
const { t } = useTranslation(ns);
|
|
10
|
-
const [isRevealed, setIsRevealed] = useState(false);
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
TextInput,
|
|
13
|
-
{
|
|
14
|
-
...props,
|
|
15
|
-
type: isRevealed ? "text" : "password",
|
|
16
|
-
action: {
|
|
17
|
-
icon: isRevealed ? ViewIcon : ViewOffIcon,
|
|
18
|
-
altText: t(($) => isRevealed ? $.ui.password.hide : $.ui.password.reveal),
|
|
19
|
-
onClick: () => setIsRevealed(!isRevealed)
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
PasswordInput
|
|
26
|
-
};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { mergeRefs } from "@react-aria/utils";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { useRef } from "react";
|
|
5
|
-
import { useTextField } from "react-aria";
|
|
6
|
-
import { TextArea as TextArea$1 } from "react-aria-components";
|
|
7
|
-
import { Controller } from "react-hook-form";
|
|
8
|
-
import { FormField } from "../../FormField/FormField.js";
|
|
9
|
-
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
10
|
-
import { InputClear } from "../../shared/InputClear.js";
|
|
11
|
-
import { useInputCva, inputSize } from "../../shared/input.cva.js";
|
|
12
|
-
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
13
|
-
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
14
|
-
import { UIStyle } from "../../../../config/uiStyle.context.js";
|
|
15
|
-
const TextAreaBase = (props) => {
|
|
16
|
-
const ui = UIConfig.useConfig();
|
|
17
|
-
const inputCva = useInputCva();
|
|
18
|
-
const uiStyle = UIStyle.useConfig();
|
|
19
|
-
const inputSizeCva = uiStyle?.input?.sizeCva ?? inputSize;
|
|
20
|
-
const {
|
|
21
|
-
ref,
|
|
22
|
-
className,
|
|
23
|
-
inputClassName,
|
|
24
|
-
error,
|
|
25
|
-
label,
|
|
26
|
-
tooltipText,
|
|
27
|
-
helperText,
|
|
28
|
-
isRequired,
|
|
29
|
-
rightContent,
|
|
30
|
-
isDisabled,
|
|
31
|
-
headerClassName,
|
|
32
|
-
errorClassName,
|
|
33
|
-
isHeaderHidden,
|
|
34
|
-
value,
|
|
35
|
-
onChange,
|
|
36
|
-
onBlur,
|
|
37
|
-
as = ui.input.as,
|
|
38
|
-
hideLabel = ui.input.hideLabel,
|
|
39
|
-
variant = ui.input.variant,
|
|
40
|
-
isClearable = ui.input.isClearable,
|
|
41
|
-
...rest
|
|
42
|
-
} = props;
|
|
43
|
-
const textFieldRef = useRef(null);
|
|
44
|
-
const textFieldProps = {
|
|
45
|
-
...rest,
|
|
46
|
-
label,
|
|
47
|
-
isDisabled,
|
|
48
|
-
isInvalid: !!error,
|
|
49
|
-
isRequired,
|
|
50
|
-
value,
|
|
51
|
-
onChange,
|
|
52
|
-
onBlur
|
|
53
|
-
};
|
|
54
|
-
const { labelProps, inputProps } = useTextField(textFieldProps, textFieldRef);
|
|
55
|
-
const formFieldProps = {
|
|
56
|
-
error,
|
|
57
|
-
label,
|
|
58
|
-
tooltipText,
|
|
59
|
-
helperText,
|
|
60
|
-
isRequired,
|
|
61
|
-
rightContent,
|
|
62
|
-
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
63
|
-
hideLabel,
|
|
64
|
-
isDisabled,
|
|
65
|
-
headerClassName,
|
|
66
|
-
errorClassName
|
|
67
|
-
};
|
|
68
|
-
const headerProps = {
|
|
69
|
-
label,
|
|
70
|
-
tooltipText,
|
|
71
|
-
helperText,
|
|
72
|
-
isRequired,
|
|
73
|
-
rightContent,
|
|
74
|
-
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
75
|
-
isDisabled,
|
|
76
|
-
className: headerClassName,
|
|
77
|
-
labelProps
|
|
78
|
-
};
|
|
79
|
-
const showClear = isClearable && !!value;
|
|
80
|
-
return /* @__PURE__ */ jsx(
|
|
81
|
-
TooltipWrapper,
|
|
82
|
-
{
|
|
83
|
-
as,
|
|
84
|
-
error,
|
|
85
|
-
children: /* @__PURE__ */ jsx(
|
|
86
|
-
FormField,
|
|
87
|
-
{
|
|
88
|
-
...formFieldProps,
|
|
89
|
-
as,
|
|
90
|
-
labelProps,
|
|
91
|
-
className: clsx("w-full", className),
|
|
92
|
-
children: /* @__PURE__ */ jsxs(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
className: "group/text-area relative h-full",
|
|
96
|
-
"data-text-area": true,
|
|
97
|
-
children: [
|
|
98
|
-
as === "floating" && headerProps && /* @__PURE__ */ jsx(
|
|
99
|
-
FormFieldLabel,
|
|
100
|
-
{
|
|
101
|
-
as,
|
|
102
|
-
...headerProps
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ jsx(
|
|
106
|
-
TextArea$1,
|
|
107
|
-
{
|
|
108
|
-
...inputProps,
|
|
109
|
-
"data-is-empty": value?.trim() === "" || value === null || value === void 0 || void 0,
|
|
110
|
-
placeholder: as === "floating" ? "" : inputProps.placeholder,
|
|
111
|
-
className: inputCva({
|
|
112
|
-
variant,
|
|
113
|
-
as,
|
|
114
|
-
...rest,
|
|
115
|
-
className: clsx("block h-full min-h-8", inputClassName)
|
|
116
|
-
}),
|
|
117
|
-
ref
|
|
118
|
-
}
|
|
119
|
-
),
|
|
120
|
-
showClear && /* @__PURE__ */ jsx("span", { className: clsx("absolute top-0 right-0", inputSizeCva({ size: "default" })), children: /* @__PURE__ */ jsx(InputClear, { onClear: () => onChange?.("") }) })
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
};
|
|
129
|
-
const TextArea = (props) => {
|
|
130
|
-
if ("formControl" in props && props.formControl) {
|
|
131
|
-
const { formControl, ref, ...innerProps } = props;
|
|
132
|
-
return /* @__PURE__ */ jsx(
|
|
133
|
-
Controller,
|
|
134
|
-
{
|
|
135
|
-
control: formControl.control,
|
|
136
|
-
name: formControl.name,
|
|
137
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
138
|
-
TextAreaBase,
|
|
139
|
-
{
|
|
140
|
-
...innerProps,
|
|
141
|
-
ref: mergeRefs(ref, field.ref),
|
|
142
|
-
value: field.value ?? "",
|
|
143
|
-
onChange: field.onChange,
|
|
144
|
-
isDisabled: field.disabled || props.isDisabled,
|
|
145
|
-
error: props.error ?? error?.message
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
return /* @__PURE__ */ jsx(TextAreaBase, { ...props });
|
|
152
|
-
};
|
|
153
|
-
export {
|
|
154
|
-
TextArea
|
|
155
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { mergeRefs } from "@react-aria/utils";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { useRef } from "react";
|
|
5
|
-
import { useTextField } from "react-aria";
|
|
6
|
-
import { Input } from "react-aria-components";
|
|
7
|
-
import { Controller } from "react-hook-form";
|
|
8
|
-
import { FormField } from "../../FormField/FormField.js";
|
|
9
|
-
import { InputContent } from "../shared/InputContent.js";
|
|
10
|
-
import { useInputCva } from "../../shared/input.cva.js";
|
|
11
|
-
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
12
|
-
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
13
|
-
const TextInputBase = (props) => {
|
|
14
|
-
const ui = UIConfig.useConfig();
|
|
15
|
-
const inputCva = useInputCva();
|
|
16
|
-
const {
|
|
17
|
-
ref,
|
|
18
|
-
inputClassName,
|
|
19
|
-
label,
|
|
20
|
-
tooltipText,
|
|
21
|
-
helperText,
|
|
22
|
-
isRequired,
|
|
23
|
-
rightContent,
|
|
24
|
-
isDisabled,
|
|
25
|
-
headerClassName,
|
|
26
|
-
errorClassName,
|
|
27
|
-
isHeaderHidden,
|
|
28
|
-
error,
|
|
29
|
-
className,
|
|
30
|
-
unit,
|
|
31
|
-
isLoading,
|
|
32
|
-
action,
|
|
33
|
-
leadingIcon,
|
|
34
|
-
trailingIcon,
|
|
35
|
-
value,
|
|
36
|
-
onChange,
|
|
37
|
-
onBlur,
|
|
38
|
-
as = ui.input.as,
|
|
39
|
-
hideLabel = ui.input.hideLabel,
|
|
40
|
-
variant = ui.input.variant,
|
|
41
|
-
size = ui.input.size,
|
|
42
|
-
isClearable = ui.input.isClearable,
|
|
43
|
-
...rest
|
|
44
|
-
} = props;
|
|
45
|
-
const textFieldRef = useRef(null);
|
|
46
|
-
const textFieldProps = {
|
|
47
|
-
...rest,
|
|
48
|
-
label,
|
|
49
|
-
isDisabled,
|
|
50
|
-
isInvalid: !!error,
|
|
51
|
-
isRequired,
|
|
52
|
-
value,
|
|
53
|
-
onChange,
|
|
54
|
-
onBlur
|
|
55
|
-
};
|
|
56
|
-
const { labelProps, inputProps } = useTextField(textFieldProps, textFieldRef);
|
|
57
|
-
const formFieldProps = {
|
|
58
|
-
error,
|
|
59
|
-
label,
|
|
60
|
-
tooltipText,
|
|
61
|
-
helperText,
|
|
62
|
-
isRequired,
|
|
63
|
-
rightContent,
|
|
64
|
-
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
65
|
-
hideLabel,
|
|
66
|
-
isDisabled,
|
|
67
|
-
headerClassName,
|
|
68
|
-
errorClassName
|
|
69
|
-
};
|
|
70
|
-
const inputContentProps = {
|
|
71
|
-
unit,
|
|
72
|
-
isLoading,
|
|
73
|
-
isDisabled,
|
|
74
|
-
action,
|
|
75
|
-
leadingIcon,
|
|
76
|
-
trailingIcon,
|
|
77
|
-
isClearable,
|
|
78
|
-
value,
|
|
79
|
-
onChange
|
|
80
|
-
};
|
|
81
|
-
const headerProps = {
|
|
82
|
-
label,
|
|
83
|
-
tooltipText,
|
|
84
|
-
helperText,
|
|
85
|
-
isRequired,
|
|
86
|
-
rightContent,
|
|
87
|
-
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
88
|
-
isDisabled,
|
|
89
|
-
className: headerClassName,
|
|
90
|
-
labelProps
|
|
91
|
-
};
|
|
92
|
-
return /* @__PURE__ */ jsx(
|
|
93
|
-
TooltipWrapper,
|
|
94
|
-
{
|
|
95
|
-
as,
|
|
96
|
-
error,
|
|
97
|
-
children: /* @__PURE__ */ jsx(
|
|
98
|
-
FormField,
|
|
99
|
-
{
|
|
100
|
-
...formFieldProps,
|
|
101
|
-
as,
|
|
102
|
-
labelProps,
|
|
103
|
-
className: clsx(
|
|
104
|
-
"group w-full",
|
|
105
|
-
{
|
|
106
|
-
"h-full": as === "inline"
|
|
107
|
-
},
|
|
108
|
-
className
|
|
109
|
-
),
|
|
110
|
-
children: /* @__PURE__ */ jsx(
|
|
111
|
-
InputContent,
|
|
112
|
-
{
|
|
113
|
-
...inputContentProps,
|
|
114
|
-
headerProps,
|
|
115
|
-
as,
|
|
116
|
-
size,
|
|
117
|
-
children: (style) => /* @__PURE__ */ jsx(
|
|
118
|
-
Input,
|
|
119
|
-
{
|
|
120
|
-
...inputProps,
|
|
121
|
-
ref,
|
|
122
|
-
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
123
|
-
placeholder: as === "floating" ? "" : inputProps.placeholder,
|
|
124
|
-
className: inputCva({ variant, as, size, ...rest, className: inputClassName }),
|
|
125
|
-
style
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
};
|
|
135
|
-
const TextInput = (props) => {
|
|
136
|
-
if ("formControl" in props && props.formControl) {
|
|
137
|
-
const { formControl, ref, ...innerProps } = props;
|
|
138
|
-
return /* @__PURE__ */ jsx(
|
|
139
|
-
Controller,
|
|
140
|
-
{
|
|
141
|
-
control: formControl.control,
|
|
142
|
-
name: formControl.name,
|
|
143
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
144
|
-
TextInputBase,
|
|
145
|
-
{
|
|
146
|
-
...innerProps,
|
|
147
|
-
ref: mergeRefs(ref, field.ref),
|
|
148
|
-
value: field.value,
|
|
149
|
-
onChange: field.onChange,
|
|
150
|
-
onBlur: field.onBlur,
|
|
151
|
-
isDisabled: field.disabled || props.isDisabled,
|
|
152
|
-
error: props.error ?? error?.message
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
return /* @__PURE__ */ jsx(TextInputBase, { ...props });
|
|
159
|
-
};
|
|
160
|
-
export {
|
|
161
|
-
TextInput
|
|
162
|
-
};
|