@povio/ui 2.3.3 → 3.0.0-rc.2
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/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +215 -64
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +40 -14
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +21 -18
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +35 -12
- package/dist/components/Menu/MenuMobile.js +103 -44
- package/dist/components/Menu/MenuPopover.js +110 -34
- package/dist/components/Menu/menu.cva.d.ts +35 -13
- package/dist/components/Menu/menu.cva.js +30 -24
- package/dist/components/buttons/Button/Button.js +7 -7
- package/dist/components/buttons/Button/button.cva.d.ts +95 -26
- package/dist/components/buttons/Button/button.cva.js +601 -589
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +59 -21
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +247 -239
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +83 -25
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +3 -5
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -8
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +203 -37
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +28 -14
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +26 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.js +47 -40
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +373 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +492 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +13 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +273 -47
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +611 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +338 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +286 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +13 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +358 -133
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +84 -30
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +214 -69
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +27 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +40 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +87 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +151 -37
- package/dist/components/inputs/File/shared/InputUploadFilled.js +51 -10
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +26 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.js +48 -40
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +23 -6
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +29 -20
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +27 -7
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +28 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +46 -15
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -8
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +22 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +13 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -8
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -100
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +575 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +12 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +4 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +309 -94
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +422 -93
- package/dist/components/inputs/Input/shared/InputContent.js +196 -63
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +356 -64
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +101 -6
- package/dist/components/inputs/RadioGroup/radio.cva.js +74 -24
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +214 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +225 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +396 -141
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +398 -119
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +88 -38
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +72 -19
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +73 -24
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +10 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +4 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -6
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +21 -18
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +82 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +548 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +450 -101
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +105 -33
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +217 -40
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -6
- package/dist/components/inputs/Toggle/toggle.cva.js +25 -21
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +23 -13
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +137 -16
- package/dist/components/inputs/shared/input.cva.js +317 -273
- package/dist/components/inputs/shared/label.cva.d.ts +15 -6
- package/dist/components/inputs/shared/label.cva.js +28 -25
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +12 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +4 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -0
- package/dist/components/navigation/Accordion/Accordion.js +71 -24
- package/dist/components/navigation/Accordion/AccordionItem.js +97 -52
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +109 -44
- package/dist/components/navigation/Accordion/accordion.cva.js +114 -84
- package/dist/components/navigation/Stepper/Stepper.js +69 -24
- package/dist/components/navigation/Stepper/StepperItem.js +112 -39
- package/dist/components/navigation/Stepper/StepperSeparator.js +25 -7
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +86 -30
- package/dist/components/navigation/Stepper/stepper.cva.js +104 -83
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/Modal/Modal.js +5 -5
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -9
- package/dist/components/overlays/Modal/modal.cva.js +38 -27
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +86 -30
- package/dist/components/overlays/Tooltip/Tooltip.js +143 -34
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +45 -17
- package/dist/components/overlays/Tooltip/tooltip.cva.js +38 -26
- package/dist/components/segment/Segment.js +221 -60
- package/dist/components/segment/SegmentItem.js +70 -13
- package/dist/components/segment/segment.cva.d.ts +18 -7
- package/dist/components/segment/segment.cva.js +24 -21
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/popover.cva.d.ts +7 -3
- package/dist/components/shared/popover.cva.js +3 -3
- package/dist/components/status/Alert/Alert.js +103 -36
- package/dist/components/status/Alert/alert.cva.d.ts +18 -6
- package/dist/components/status/Alert/alert.cva.js +60 -57
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Loader/loader.cva.d.ts +23 -4
- package/dist/components/status/Loader/loader.cva.js +22 -13
- package/dist/components/status/Toast/Toast.js +27 -20
- package/dist/components/status/Toast/toast.cva.d.ts +61 -10
- package/dist/components/status/Toast/toast.cva.js +129 -64
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/status/shared/status.cva.d.ts +30 -8
- package/dist/components/status/shared/status.cva.js +56 -50
- package/dist/components/table/CellText.js +3 -3
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/HeaderText.js +3 -3
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +34 -33
- package/dist/components/table/table.cva.d.ts +52 -19
- package/dist/components/table/table.cva.js +44 -35
- package/dist/components/text/Link/Link.js +22 -10
- package/dist/components/text/Link/link.cva.d.ts +11 -5
- package/dist/components/text/Link/link.cva.js +8 -5
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/components/text/Tag/tag.cva.d.ts +15 -5
- package/dist/components/text/Tag/tag.cva.js +51 -48
- package/dist/components/text/Typography/Typography.js +25 -10
- package/dist/components/text/Typography/typography.cva.d.ts +93 -7
- package/dist/components/text/Typography/typography.cva.js +126 -122
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +192 -0
- package/dist/config/uiOverrides.context.js +113 -0
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +72 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +37 -1
- package/dist/index.js +34 -3
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/style-merge.util.d.ts +43 -0
- package/dist/utils/style-merge.util.js +233 -0
- package/dist/utils/style-merge.util.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/config/uiStyle.context.d.ts +0 -162
- package/dist/config/uiStyle.context.js +0 -30
|
@@ -1,55 +1,169 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
5
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
6
|
-
import {
|
|
6
|
+
import { inputSizeDefinition } from "../../shared/input.cva.js";
|
|
7
7
|
import { UploadIcon } from "../../../../assets/icons/Upload.js";
|
|
8
8
|
import { inputButtonSizeMapping } from "../inputUpload.types.js";
|
|
9
9
|
import { inputUploadButton, inputUploadDropZone } from "./inputUploadButton.cva.js";
|
|
10
|
+
import { c } from "react/compiler-runtime";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
import { clsx } from "clsx";
|
|
12
13
|
import { DropZone, FileTrigger } from "react-aria-components";
|
|
13
14
|
import { useTranslation } from "react-i18next";
|
|
14
15
|
//#region src/components/inputs/File/shared/InputUploadContent.tsx
|
|
15
16
|
var InputUploadContent = (props) => {
|
|
16
|
-
const
|
|
17
|
+
const $ = c(46);
|
|
18
|
+
let buttonText;
|
|
19
|
+
let error;
|
|
20
|
+
let isDisabled;
|
|
21
|
+
let placeholder;
|
|
22
|
+
let rest;
|
|
23
|
+
let size;
|
|
24
|
+
let variant;
|
|
25
|
+
if ($[0] !== props) {
|
|
26
|
+
({variant, isDisabled, error, placeholder, buttonText, size, ...rest} = props);
|
|
27
|
+
$[0] = props;
|
|
28
|
+
$[1] = buttonText;
|
|
29
|
+
$[2] = error;
|
|
30
|
+
$[3] = isDisabled;
|
|
31
|
+
$[4] = placeholder;
|
|
32
|
+
$[5] = rest;
|
|
33
|
+
$[6] = size;
|
|
34
|
+
$[7] = variant;
|
|
35
|
+
} else {
|
|
36
|
+
buttonText = $[1];
|
|
37
|
+
error = $[2];
|
|
38
|
+
isDisabled = $[3];
|
|
39
|
+
placeholder = $[4];
|
|
40
|
+
rest = $[5];
|
|
41
|
+
size = $[6];
|
|
42
|
+
variant = $[7];
|
|
43
|
+
}
|
|
17
44
|
const { t } = useTranslation("ui");
|
|
18
|
-
const inputSizeCva =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
45
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
46
|
+
const t0 = isDisabled || void 0;
|
|
47
|
+
const t1 = isDisabled || void 0;
|
|
48
|
+
const t2 = !!error || void 0;
|
|
49
|
+
let t3;
|
|
50
|
+
if ($[8] !== variant) {
|
|
51
|
+
t3 = inputUploadButton({
|
|
52
|
+
variant,
|
|
53
|
+
className: "group/input-upload"
|
|
54
|
+
});
|
|
55
|
+
$[8] = variant;
|
|
56
|
+
$[9] = t3;
|
|
57
|
+
} else t3 = $[9];
|
|
58
|
+
let t4;
|
|
59
|
+
if ($[10] !== inputSizeCva || $[11] !== size || $[12] !== variant) {
|
|
60
|
+
t4 = clsx(inputUploadDropZone({ variant }), inputSizeCva({ size }));
|
|
61
|
+
$[10] = inputSizeCva;
|
|
62
|
+
$[11] = size;
|
|
63
|
+
$[12] = variant;
|
|
64
|
+
$[13] = t4;
|
|
65
|
+
} else t4 = $[13];
|
|
66
|
+
let t5;
|
|
67
|
+
if ($[14] !== placeholder || $[15] !== t) {
|
|
68
|
+
t5 = placeholder ?? t(_temp);
|
|
69
|
+
$[14] = placeholder;
|
|
70
|
+
$[15] = t;
|
|
71
|
+
$[16] = t5;
|
|
72
|
+
} else t5 = $[16];
|
|
73
|
+
let t6;
|
|
74
|
+
if ($[17] !== t5) {
|
|
75
|
+
t6 = /* @__PURE__ */ jsx(Typography, {
|
|
76
|
+
variant: "default",
|
|
77
|
+
size: "label-1",
|
|
78
|
+
as: "span",
|
|
79
|
+
className: "min-w-0 flex-fill select-none truncate text-text-default-3",
|
|
80
|
+
children: t5
|
|
81
|
+
});
|
|
82
|
+
$[17] = t5;
|
|
83
|
+
$[18] = t6;
|
|
84
|
+
} else t6 = $[18];
|
|
85
|
+
let t7;
|
|
86
|
+
if ($[19] !== buttonText || $[20] !== isDisabled || $[21] !== t || $[22] !== variant) {
|
|
87
|
+
t7 = variant === "nested" && /* @__PURE__ */ jsx(TextButton, {
|
|
88
|
+
isDisabled,
|
|
89
|
+
icon: UploadIcon,
|
|
90
|
+
children: buttonText ?? t(_temp2)
|
|
91
|
+
});
|
|
92
|
+
$[19] = buttonText;
|
|
93
|
+
$[20] = isDisabled;
|
|
94
|
+
$[21] = t;
|
|
95
|
+
$[22] = variant;
|
|
96
|
+
$[23] = t7;
|
|
97
|
+
} else t7 = $[23];
|
|
98
|
+
let t8;
|
|
99
|
+
if ($[24] !== isDisabled || $[25] !== rest || $[26] !== t4 || $[27] !== t6 || $[28] !== t7) {
|
|
100
|
+
t8 = /* @__PURE__ */ jsxs(DropZone, {
|
|
101
|
+
...rest,
|
|
102
|
+
isDisabled,
|
|
103
|
+
className: t4,
|
|
104
|
+
children: [t6, t7]
|
|
105
|
+
});
|
|
106
|
+
$[24] = isDisabled;
|
|
107
|
+
$[25] = rest;
|
|
108
|
+
$[26] = t4;
|
|
109
|
+
$[27] = t6;
|
|
110
|
+
$[28] = t7;
|
|
111
|
+
$[29] = t8;
|
|
112
|
+
} else t8 = $[29];
|
|
113
|
+
let t9;
|
|
114
|
+
if ($[30] !== buttonText || $[31] !== isDisabled || $[32] !== size || $[33] !== t || $[34] !== variant) {
|
|
115
|
+
t9 = variant !== "nested" && /* @__PURE__ */ jsx(Button$1, {
|
|
116
|
+
size: inputButtonSizeMapping[size ?? "default"],
|
|
117
|
+
width: "hug",
|
|
118
|
+
isDisabled,
|
|
119
|
+
className: "truncate",
|
|
120
|
+
children: buttonText ?? t(_temp3)
|
|
121
|
+
});
|
|
122
|
+
$[30] = buttonText;
|
|
123
|
+
$[31] = isDisabled;
|
|
124
|
+
$[32] = size;
|
|
125
|
+
$[33] = t;
|
|
126
|
+
$[34] = variant;
|
|
127
|
+
$[35] = t9;
|
|
128
|
+
} else t9 = $[35];
|
|
129
|
+
let t10;
|
|
130
|
+
if ($[36] !== t0 || $[37] !== t1 || $[38] !== t2 || $[39] !== t3 || $[40] !== t8 || $[41] !== t9) {
|
|
131
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
22
132
|
"data-rac": "",
|
|
23
|
-
"data-disabled":
|
|
24
|
-
"data-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
className: "truncate",
|
|
49
|
-
children: buttonText ?? t(($) => $.ui.fileUpload.uploadFile)
|
|
50
|
-
})]
|
|
51
|
-
})
|
|
52
|
-
});
|
|
133
|
+
"data-disabled": t0,
|
|
134
|
+
"data-is-disabled": t1,
|
|
135
|
+
"data-invalid": t2,
|
|
136
|
+
className: t3,
|
|
137
|
+
children: [t8, t9]
|
|
138
|
+
});
|
|
139
|
+
$[36] = t0;
|
|
140
|
+
$[37] = t1;
|
|
141
|
+
$[38] = t2;
|
|
142
|
+
$[39] = t3;
|
|
143
|
+
$[40] = t8;
|
|
144
|
+
$[41] = t9;
|
|
145
|
+
$[42] = t10;
|
|
146
|
+
} else t10 = $[42];
|
|
147
|
+
let t11;
|
|
148
|
+
if ($[43] !== rest || $[44] !== t10) {
|
|
149
|
+
t11 = /* @__PURE__ */ jsx(FileTrigger, {
|
|
150
|
+
...rest,
|
|
151
|
+
children: t10
|
|
152
|
+
});
|
|
153
|
+
$[43] = rest;
|
|
154
|
+
$[44] = t10;
|
|
155
|
+
$[45] = t11;
|
|
156
|
+
} else t11 = $[45];
|
|
157
|
+
return t11;
|
|
53
158
|
};
|
|
159
|
+
function _temp($) {
|
|
160
|
+
return $.ui.fileUpload.emptyText;
|
|
161
|
+
}
|
|
162
|
+
function _temp2($_0) {
|
|
163
|
+
return $_0.ui.fileUpload.upload;
|
|
164
|
+
}
|
|
165
|
+
function _temp3($_1) {
|
|
166
|
+
return $_1.ui.fileUpload.uploadFile;
|
|
167
|
+
}
|
|
54
168
|
//#endregion
|
|
55
169
|
export { InputUploadContent };
|
|
@@ -1,28 +1,69 @@
|
|
|
1
1
|
import { CloseIcon } from "../../../../assets/icons/Close.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
3
3
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
|
-
import {
|
|
5
|
+
import { inputSizeDefinition } from "../../shared/input.cva.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { clsx } from "clsx";
|
|
8
9
|
//#region src/components/inputs/File/shared/InputUploadFilled.tsx
|
|
9
|
-
var InputUploadFilled = (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var InputUploadFilled = (t0) => {
|
|
11
|
+
const $ = c(14);
|
|
12
|
+
const { files, onRemove, isDisabled, size } = t0;
|
|
13
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
14
|
+
let t1;
|
|
15
|
+
if ($[0] !== inputSizeCva || $[1] !== size) {
|
|
16
|
+
t1 = clsx("flex items-center rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle", inputSizeCva({ size }));
|
|
17
|
+
$[0] = inputSizeCva;
|
|
18
|
+
$[1] = size;
|
|
19
|
+
$[2] = t1;
|
|
20
|
+
} else t1 = $[2];
|
|
21
|
+
let t2;
|
|
22
|
+
if ($[3] !== files) {
|
|
23
|
+
t2 = files.map(_temp).join(", ");
|
|
24
|
+
$[3] = files;
|
|
25
|
+
$[4] = t2;
|
|
26
|
+
} else t2 = $[4];
|
|
27
|
+
let t3;
|
|
28
|
+
if ($[5] !== t2) {
|
|
29
|
+
t3 = /* @__PURE__ */ jsx(Typography, {
|
|
13
30
|
variant: "default",
|
|
14
31
|
size: "label-1",
|
|
15
32
|
as: "span",
|
|
16
33
|
className: "flex-fill select-none truncate text-ellipsis text-text-default-1 input-disabled:text-text-default-3",
|
|
17
|
-
children:
|
|
18
|
-
})
|
|
34
|
+
children: t2
|
|
35
|
+
});
|
|
36
|
+
$[5] = t2;
|
|
37
|
+
$[6] = t3;
|
|
38
|
+
} else t3 = $[6];
|
|
39
|
+
let t4;
|
|
40
|
+
if ($[7] !== isDisabled || $[8] !== onRemove) {
|
|
41
|
+
t4 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
19
42
|
label: "Remove files",
|
|
20
43
|
color: "secondary",
|
|
21
44
|
icon: CloseIcon,
|
|
22
45
|
isDisabled,
|
|
23
46
|
onPress: onRemove
|
|
24
|
-
})
|
|
25
|
-
|
|
47
|
+
});
|
|
48
|
+
$[7] = isDisabled;
|
|
49
|
+
$[8] = onRemove;
|
|
50
|
+
$[9] = t4;
|
|
51
|
+
} else t4 = $[9];
|
|
52
|
+
let t5;
|
|
53
|
+
if ($[10] !== t1 || $[11] !== t3 || $[12] !== t4) {
|
|
54
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: t1,
|
|
56
|
+
children: [t3, t4]
|
|
57
|
+
});
|
|
58
|
+
$[10] = t1;
|
|
59
|
+
$[11] = t3;
|
|
60
|
+
$[12] = t4;
|
|
61
|
+
$[13] = t5;
|
|
62
|
+
} else t5 = $[13];
|
|
63
|
+
return t5;
|
|
26
64
|
};
|
|
65
|
+
function _temp(file) {
|
|
66
|
+
return file.name;
|
|
67
|
+
}
|
|
27
68
|
//#endregion
|
|
28
69
|
export { InputUploadFilled };
|
|
@@ -1,27 +1,66 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import clsx$1 from "clsx";
|
|
4
5
|
//#region src/components/inputs/File/shared/ProgressBar.tsx
|
|
5
|
-
var ProgressBar = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var ProgressBar = (t0) => {
|
|
7
|
+
const $ = c(12);
|
|
8
|
+
const { progress: t1, valueLabel: t2 } = t0;
|
|
9
|
+
const progress = t1 === void 0 ? 0 : t1;
|
|
10
|
+
const valueLabel = t2 === void 0 ? "trailing" : t2;
|
|
11
|
+
const t3 = valueLabel === "leading" && "flex-row-reverse";
|
|
12
|
+
let t4;
|
|
13
|
+
if ($[0] !== t3) {
|
|
14
|
+
t4 = clsx$1("flex w-full items-center justify-center gap-file-upload-content-gap-progress-actions", t3);
|
|
15
|
+
$[0] = t3;
|
|
16
|
+
$[1] = t4;
|
|
17
|
+
} else t4 = $[1];
|
|
18
|
+
let t5;
|
|
19
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
20
|
+
t5 = /* @__PURE__ */ jsx("div", { className: "h-1 w-full shrink-0 rounded-xs bg-input-filled-idle" });
|
|
21
|
+
$[2] = t5;
|
|
22
|
+
} else t5 = $[2];
|
|
23
|
+
const t6 = `${progress}%`;
|
|
24
|
+
let t7;
|
|
25
|
+
if ($[3] !== t6) {
|
|
26
|
+
t7 = /* @__PURE__ */ jsx("div", {
|
|
9
27
|
className: "flex flex-fill flex-col items-start gap-2 py-progress-height-height",
|
|
10
28
|
children: /* @__PURE__ */ jsxs("div", {
|
|
11
29
|
className: "relative h-1 w-full",
|
|
12
|
-
children: [
|
|
30
|
+
children: [t5, /* @__PURE__ */ jsx("div", {
|
|
13
31
|
className: "absolute top-0 left-0 h-1 shrink-0 rounded-xs bg-interactive-contained-primary-idle transition-all duration-300",
|
|
14
|
-
style: { width:
|
|
32
|
+
style: { width: t6 }
|
|
15
33
|
})]
|
|
16
34
|
})
|
|
17
|
-
})
|
|
35
|
+
});
|
|
36
|
+
$[3] = t6;
|
|
37
|
+
$[4] = t7;
|
|
38
|
+
} else t7 = $[4];
|
|
39
|
+
let t8;
|
|
40
|
+
if ($[5] !== progress || $[6] !== valueLabel) {
|
|
41
|
+
t8 = valueLabel !== "none" && /* @__PURE__ */ jsxs(Typography, {
|
|
18
42
|
variant: "default",
|
|
19
43
|
size: "label-2",
|
|
20
44
|
as: "span",
|
|
21
45
|
className: "text-center text-text-default-3",
|
|
22
46
|
children: [progress, "%"]
|
|
23
|
-
})
|
|
24
|
-
|
|
47
|
+
});
|
|
48
|
+
$[5] = progress;
|
|
49
|
+
$[6] = valueLabel;
|
|
50
|
+
$[7] = t8;
|
|
51
|
+
} else t8 = $[7];
|
|
52
|
+
let t9;
|
|
53
|
+
if ($[8] !== t4 || $[9] !== t7 || $[10] !== t8) {
|
|
54
|
+
t9 = /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: t4,
|
|
56
|
+
children: [t7, t8]
|
|
57
|
+
});
|
|
58
|
+
$[8] = t4;
|
|
59
|
+
$[9] = t7;
|
|
60
|
+
$[10] = t8;
|
|
61
|
+
$[11] = t9;
|
|
62
|
+
} else t9 = $[11];
|
|
63
|
+
return t9;
|
|
25
64
|
};
|
|
26
65
|
//#endregion
|
|
27
66
|
export { ProgressBar };
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { UIOverrides } from '../../../../config/uiOverrides.context';
|
|
3
|
+
export declare const fileUploadDropZoneDefinition: {
|
|
4
|
+
base: string[];
|
|
5
|
+
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
6
|
+
readonly variant: {
|
|
7
|
+
readonly vertical: ["flex-col justify-center"];
|
|
8
|
+
readonly horizontal: ["flex-row justify-between"];
|
|
9
|
+
};
|
|
10
|
+
readonly isContainer: {
|
|
11
|
+
readonly true: ["data-[drop-target]:before:content-['']", "data-[drop-target]:before:absolute", "data-[drop-target]:before:z-40", "data-[drop-target]:before:width-full", "data-[drop-target]:before:height-full", "data-[drop-target]:before:top-0", "data-[drop-target]:before:left-0", "data-[drop-target]:border data-[drop-target]:border-dashed", "data-[drop-target]:border-elevation-outline-default-2", "data-[drop-target]:before:pointer-events-none data-[drop-target]:before:inset-0", "data-[drop-target]:before:bg-elevation-fill-default-2"];
|
|
12
|
+
readonly false: ["flex items-center", "py-file-upload-container-height-top-bottom", "px-file-upload-container-side-default", "gap-gap-file-upload-content-gap-icon-to-content", "border border-input-outlined-outline-idle border-dashed bg-input-outlined-idle", "hover:border-elevation-outline-default-2 hover:bg-elevation-fill-default-2", "invalid:border invalid:border-input-outlined-outline-error", "data-[drop-target]:border-elevation-outline-default-2 data-[drop-target]:bg-elevation-fill-default-2", "data-[has-files]:border-solid"];
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
export type FileUploadDropZoneConfig = NonNullable<typeof fileUploadDropZoneDefinition.config>;
|
|
17
|
+
export interface FileUploadDropZoneProps extends UIOverrides.VariantProps<FileUploadDropZoneConfig> {
|
|
18
|
+
}
|
|
8
19
|
export declare const fileUploadDropZone: (props: FileUploadDropZoneProps & ClassProp) => string;
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
export declare const fileCardListDefinition: {
|
|
21
|
+
base: string[];
|
|
22
|
+
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
23
|
+
readonly variant: {
|
|
24
|
+
readonly vertical: ["flex-col"];
|
|
25
|
+
readonly horizontal: ["flex-row flex-wrap"];
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
@@ -1,51 +1,59 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
1
2
|
import { clsx } from "clsx";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/components/inputs/File/shared/fileUpload.cva.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var fileUploadDropZoneDefinition = UIOverrides.defineConfig({
|
|
6
|
+
base: ["relative w-full rounded-file-upload-container-rounding-default"],
|
|
7
|
+
config: {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
vertical: ["flex-col justify-center"],
|
|
11
|
+
horizontal: ["flex-row justify-between"]
|
|
12
|
+
},
|
|
13
|
+
isContainer: {
|
|
14
|
+
true: [
|
|
15
|
+
"data-[drop-target]:before:content-['']",
|
|
16
|
+
"data-[drop-target]:before:absolute",
|
|
17
|
+
"data-[drop-target]:before:z-40",
|
|
18
|
+
"data-[drop-target]:before:width-full",
|
|
19
|
+
"data-[drop-target]:before:height-full",
|
|
20
|
+
"data-[drop-target]:before:top-0",
|
|
21
|
+
"data-[drop-target]:before:left-0",
|
|
22
|
+
"data-[drop-target]:border data-[drop-target]:border-dashed",
|
|
23
|
+
"data-[drop-target]:border-elevation-outline-default-2",
|
|
24
|
+
"data-[drop-target]:before:pointer-events-none data-[drop-target]:before:inset-0",
|
|
25
|
+
"data-[drop-target]:before:bg-elevation-fill-default-2"
|
|
26
|
+
],
|
|
27
|
+
false: [
|
|
28
|
+
"flex items-center",
|
|
29
|
+
"py-file-upload-container-height-top-bottom",
|
|
30
|
+
"px-file-upload-container-side-default",
|
|
31
|
+
"gap-gap-file-upload-content-gap-icon-to-content",
|
|
32
|
+
"border border-input-outlined-outline-idle border-dashed bg-input-outlined-idle",
|
|
33
|
+
"hover:border-elevation-outline-default-2 hover:bg-elevation-fill-default-2",
|
|
34
|
+
"invalid:border invalid:border-input-outlined-outline-error",
|
|
35
|
+
"data-[drop-target]:border-elevation-outline-default-2 data-[drop-target]:bg-elevation-fill-default-2",
|
|
36
|
+
"data-[has-files]:border-solid"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
9
39
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"data-[drop-target]:before:content-['']",
|
|
13
|
-
"data-[drop-target]:before:absolute",
|
|
14
|
-
"data-[drop-target]:before:z-40",
|
|
15
|
-
"data-[drop-target]:before:width-full",
|
|
16
|
-
"data-[drop-target]:before:height-full",
|
|
17
|
-
"data-[drop-target]:before:top-0",
|
|
18
|
-
"data-[drop-target]:before:left-0",
|
|
19
|
-
"data-[drop-target]:border data-[drop-target]:border-dashed",
|
|
20
|
-
"data-[drop-target]:border-elevation-outline-default-2",
|
|
21
|
-
"data-[drop-target]:before:pointer-events-none data-[drop-target]:before:inset-0",
|
|
22
|
-
"data-[drop-target]:before:bg-elevation-fill-default-2"
|
|
23
|
-
],
|
|
24
|
-
false: [
|
|
25
|
-
"flex items-center",
|
|
26
|
-
"py-file-upload-container-height-top-bottom",
|
|
27
|
-
"px-file-upload-container-side-default",
|
|
28
|
-
"gap-gap-file-upload-content-gap-icon-to-content",
|
|
29
|
-
"border border-input-outlined-outline-idle border-dashed bg-input-outlined-idle",
|
|
30
|
-
"hover:border-elevation-outline-default-2 hover:bg-elevation-fill-default-2",
|
|
31
|
-
"invalid:border invalid:border-input-outlined-outline-error",
|
|
32
|
-
"data-[drop-target]:border-elevation-outline-default-2 data-[drop-target]:bg-elevation-fill-default-2",
|
|
33
|
-
"data-[has-files]:border-solid"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
defaultVariants: { variant: "vertical" }
|
|
40
|
+
defaultVariants: { variant: "vertical" }
|
|
41
|
+
}
|
|
38
42
|
});
|
|
43
|
+
var fileUploadDropZoneBase = cva(fileUploadDropZoneDefinition.base, fileUploadDropZoneDefinition.config);
|
|
39
44
|
var fileUploadDropZone = (props) => {
|
|
40
45
|
const { className, ...rest } = props;
|
|
41
46
|
return clsx(fileUploadDropZoneBase(rest), className);
|
|
42
47
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
var fileCardListDefinition = UIOverrides.defineConfig({
|
|
49
|
+
base: ["flex gap-3"],
|
|
50
|
+
config: {
|
|
51
|
+
variants: { variant: {
|
|
52
|
+
vertical: ["flex-col"],
|
|
53
|
+
horizontal: ["flex-row flex-wrap"]
|
|
54
|
+
} },
|
|
55
|
+
defaultVariants: { variant: "vertical" }
|
|
56
|
+
}
|
|
49
57
|
});
|
|
50
58
|
//#endregion
|
|
51
|
-
export { fileUploadDropZone };
|
|
59
|
+
export { fileCardListDefinition, fileUploadDropZone, fileUploadDropZoneDefinition };
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { UIOverrides } from '../../../../config/uiOverrides.context';
|
|
3
|
+
export declare const inputUploadButtonDefinition: {
|
|
4
|
+
base: string[];
|
|
5
|
+
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
6
|
+
readonly variant: {
|
|
7
|
+
readonly default: [];
|
|
8
|
+
readonly nested: [];
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export type InputUploadButtonConfig = NonNullable<typeof inputUploadButtonDefinition.config>;
|
|
13
|
+
export interface InputUploadButtonProps extends UIOverrides.VariantProps<InputUploadButtonConfig> {
|
|
14
|
+
}
|
|
7
15
|
export declare const inputUploadButton: (props: InputUploadButtonProps & ClassProp) => string;
|
|
16
|
+
export declare const inputUploadDropZoneDefinition: {
|
|
17
|
+
base: string[];
|
|
18
|
+
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
19
|
+
readonly variant: {
|
|
20
|
+
readonly default: ["rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle"];
|
|
21
|
+
readonly nested: ["rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle"];
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
8
25
|
export declare const inputUploadDropZone: (props?: ({
|
|
9
|
-
variant?: "default" | "nested" | null | undefined;
|
|
26
|
+
readonly variant?: "default" | "nested" | null | undefined;
|
|
10
27
|
} & ClassProp) | undefined) => string;
|
|
@@ -1,30 +1,39 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
1
2
|
import { clsx } from "clsx";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/components/inputs/File/shared/inputUploadButton.cva.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var inputUploadButtonDefinition = UIOverrides.defineConfig({
|
|
6
|
+
base: ["flex w-full items-center justify-between gap-input-gap-input-to-button-gap"],
|
|
7
|
+
config: {
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: [],
|
|
10
|
+
nested: []
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { variant: "default" }
|
|
13
|
+
}
|
|
10
14
|
});
|
|
15
|
+
var inputUploadButtonBase = cva(inputUploadButtonDefinition.base, inputUploadButtonDefinition.config);
|
|
11
16
|
var inputUploadButton = (props) => {
|
|
12
17
|
const { className, ...rest } = props;
|
|
13
18
|
return clsx(inputUploadButtonBase(rest), className);
|
|
14
19
|
};
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
var inputUploadDropZoneDefinition = UIOverrides.defineConfig({
|
|
21
|
+
base: [
|
|
22
|
+
"relative",
|
|
23
|
+
"min-w-0 flex-1",
|
|
24
|
+
"flex items-center",
|
|
25
|
+
"group-invalid/input-upload:border group-invalid/input-upload:border-input-outlined-outline-error",
|
|
26
|
+
"data-[drop-target]:border-input-outlined-outline-hover",
|
|
27
|
+
"hover:border-input-outlined-outline-hover"
|
|
28
|
+
],
|
|
29
|
+
config: {
|
|
30
|
+
variants: { variant: {
|
|
31
|
+
default: ["rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle"],
|
|
32
|
+
nested: ["rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle"]
|
|
33
|
+
} },
|
|
34
|
+
defaultVariants: { variant: "default" }
|
|
35
|
+
}
|
|
28
36
|
});
|
|
37
|
+
var inputUploadDropZone = cva(inputUploadDropZoneDefinition.base, inputUploadDropZoneDefinition.config);
|
|
29
38
|
//#endregion
|
|
30
|
-
export { inputUploadButton, inputUploadDropZone };
|
|
39
|
+
export { inputUploadButton, inputUploadButtonDefinition, inputUploadDropZone, inputUploadDropZoneDefinition };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren, Ref } from 'react';
|
|
1
|
+
import { FocusEventHandler, MouseEventHandler, PropsWithChildren, Ref } from 'react';
|
|
2
2
|
import { FormFieldErrorProps } from './FormFieldError';
|
|
3
3
|
import { FormFieldHeaderProps } from './FormFieldHeader';
|
|
4
4
|
import { TextInputProps } from '../Input/TextInput/TextInput';
|
|
@@ -13,8 +13,8 @@ interface FormFieldComponentProps extends PropsWithChildren<FormFieldProps> {
|
|
|
13
13
|
labelProps?: FormFieldHeaderProps["labelProps"];
|
|
14
14
|
as?: TextInputProps["as"];
|
|
15
15
|
tabIndex?: number;
|
|
16
|
-
onMouseEnter?:
|
|
17
|
-
onFocusCapture?:
|
|
16
|
+
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
17
|
+
onFocusCapture?: FocusEventHandler<HTMLDivElement>;
|
|
18
18
|
}
|
|
19
19
|
export declare const FormField: ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, tabIndex, onMouseEnter, onFocusCapture, }: FormFieldComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|