@povio/ui 2.3.3 → 3.0.0-rc.1
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 +371 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +482 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +13 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +267 -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 +387 -143
- 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 +104 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +173 -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 +12 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +36 -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 +57 -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,28 +1,94 @@
|
|
|
1
1
|
import { Pagination } from "../shared/pagination/Pagination.js";
|
|
2
2
|
import { Table } from "./Table.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/table/PaginatedTable.tsx
|
|
5
|
-
var PaginatedTable = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var PaginatedTable = (t0) => {
|
|
7
|
+
const $ = c(24);
|
|
8
|
+
let items;
|
|
9
|
+
let pagination;
|
|
10
|
+
let rest;
|
|
11
|
+
let setPagination;
|
|
12
|
+
let totalItems;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({pagination, setPagination, items, totalItems, ...rest} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = items;
|
|
17
|
+
$[2] = pagination;
|
|
18
|
+
$[3] = rest;
|
|
19
|
+
$[4] = setPagination;
|
|
20
|
+
$[5] = totalItems;
|
|
21
|
+
} else {
|
|
22
|
+
items = $[1];
|
|
23
|
+
pagination = $[2];
|
|
24
|
+
rest = $[3];
|
|
25
|
+
setPagination = $[4];
|
|
26
|
+
totalItems = $[5];
|
|
27
|
+
}
|
|
28
|
+
let t1;
|
|
29
|
+
if ($[6] !== items) {
|
|
30
|
+
t1 = items ?? [];
|
|
31
|
+
$[6] = items;
|
|
32
|
+
$[7] = t1;
|
|
33
|
+
} else t1 = $[7];
|
|
34
|
+
let t2;
|
|
35
|
+
if ($[8] !== rest || $[9] !== t1) {
|
|
36
|
+
t2 = /* @__PURE__ */ jsx(Table, {
|
|
9
37
|
...rest,
|
|
10
|
-
items:
|
|
11
|
-
})
|
|
38
|
+
items: t1
|
|
39
|
+
});
|
|
40
|
+
$[8] = rest;
|
|
41
|
+
$[9] = t1;
|
|
42
|
+
$[10] = t2;
|
|
43
|
+
} else t2 = $[10];
|
|
44
|
+
const t3 = totalItems ?? 0;
|
|
45
|
+
let t4;
|
|
46
|
+
let t5;
|
|
47
|
+
if ($[11] !== pagination || $[12] !== setPagination) {
|
|
48
|
+
t4 = (page) => setPagination({
|
|
49
|
+
...pagination,
|
|
50
|
+
pageIndex: page
|
|
51
|
+
});
|
|
52
|
+
t5 = (pageSize) => setPagination({
|
|
53
|
+
...pagination,
|
|
54
|
+
pageSize,
|
|
55
|
+
pageIndex: 1
|
|
56
|
+
});
|
|
57
|
+
$[11] = pagination;
|
|
58
|
+
$[12] = setPagination;
|
|
59
|
+
$[13] = t4;
|
|
60
|
+
$[14] = t5;
|
|
61
|
+
} else {
|
|
62
|
+
t4 = $[13];
|
|
63
|
+
t5 = $[14];
|
|
64
|
+
}
|
|
65
|
+
let t6;
|
|
66
|
+
if ($[15] !== pagination.pageIndex || $[16] !== pagination.pageSize || $[17] !== t3 || $[18] !== t4 || $[19] !== t5) {
|
|
67
|
+
t6 = /* @__PURE__ */ jsx(Pagination, {
|
|
12
68
|
page: pagination.pageIndex,
|
|
13
69
|
pageSize: pagination.pageSize,
|
|
14
|
-
totalItems:
|
|
15
|
-
onPageChange:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
70
|
+
totalItems: t3,
|
|
71
|
+
onPageChange: t4,
|
|
72
|
+
onPageSizeChange: t5
|
|
73
|
+
});
|
|
74
|
+
$[15] = pagination.pageIndex;
|
|
75
|
+
$[16] = pagination.pageSize;
|
|
76
|
+
$[17] = t3;
|
|
77
|
+
$[18] = t4;
|
|
78
|
+
$[19] = t5;
|
|
79
|
+
$[20] = t6;
|
|
80
|
+
} else t6 = $[20];
|
|
81
|
+
let t7;
|
|
82
|
+
if ($[21] !== t2 || $[22] !== t6) {
|
|
83
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: "flex flex-col gap-4",
|
|
85
|
+
children: [t2, t6]
|
|
86
|
+
});
|
|
87
|
+
$[21] = t2;
|
|
88
|
+
$[22] = t6;
|
|
89
|
+
$[23] = t7;
|
|
90
|
+
} else t7 = $[23];
|
|
91
|
+
return t7;
|
|
26
92
|
};
|
|
27
93
|
//#endregion
|
|
28
94
|
export { PaginatedTable };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
"use no memo";
|
|
1
2
|
import { ChevronDownIcon } from "../../assets/icons/ChevronDown.js";
|
|
2
3
|
import { ChevronUpIcon } from "../../assets/icons/ChevronUp.js";
|
|
3
|
-
import {
|
|
4
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
4
5
|
import { InlineIconButton } from "../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
6
|
import { useIntersectionObserver } from "../../hooks/useIntersectionObserver.js";
|
|
6
|
-
import {
|
|
7
|
+
import { tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableRowDefinition } from "./table.cva.js";
|
|
7
8
|
import { CellText } from "./CellText.js";
|
|
8
9
|
import { DragIndicatorIcon } from "../../assets/icons/DragIndicator.js";
|
|
9
10
|
import { HeaderText } from "./HeaderText.js";
|
|
@@ -26,8 +27,8 @@ var CustomCellContext = (context) => {
|
|
|
26
27
|
value: context.getValue()
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
|
-
var
|
|
30
|
-
const rendered =
|
|
30
|
+
var renderCell = (Comp, props) => {
|
|
31
|
+
const rendered = flexRender(Comp, props);
|
|
31
32
|
return typeof rendered === "string" ? /* @__PURE__ */ jsx(CellText, { children: rendered }) : rendered;
|
|
32
33
|
};
|
|
33
34
|
var RowDragHandleCell = ({ rowId }) => {
|
|
@@ -68,16 +69,16 @@ var DraggableRow = ({ row, showCellBorder, onRowClick, onDoubleClick, tableRowCv
|
|
|
68
69
|
return /* @__PURE__ */ jsx("td", {
|
|
69
70
|
tabIndex: -1,
|
|
70
71
|
className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta.cellClass, columnMeta.width),
|
|
71
|
-
children:
|
|
72
|
+
children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
|
|
72
73
|
}, cell.id);
|
|
73
74
|
})
|
|
74
75
|
});
|
|
75
76
|
};
|
|
76
77
|
var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, className, sorting, setSorting, columnOrder, setColumnOrder, columnVisibility, setColumnVisibility, bulkSelectionActions: ActionHeader, enableDragDrop = false, onDragEnd, onReorder, getRowId, enableRowSelection, enableMultiRowSelection = false, defaultSelectedRows, onRowSelectionChange, ...props }) => {
|
|
77
|
-
const tableRowCva =
|
|
78
|
-
const tableHeadRowCva =
|
|
79
|
-
const tableHeadDataCva =
|
|
80
|
-
const tableDataCva =
|
|
78
|
+
const tableRowCva = UIOverrides.useCva("table.rowCva", tableRowDefinition);
|
|
79
|
+
const tableHeadRowCva = UIOverrides.useCva("table.headRowCva", tableHeadRowDefinition);
|
|
80
|
+
const tableHeadDataCva = UIOverrides.useCva("table.headDataCva", tableHeadDataDefinition);
|
|
81
|
+
const tableDataCva = UIOverrides.useCva("table.dataCva", tableDataDefinition);
|
|
81
82
|
const ref = useRef(null);
|
|
82
83
|
const { listeners } = useTableNav();
|
|
83
84
|
const getCoreRowModelCallback = useCallback(getCoreRowModel, []);
|
|
@@ -154,8 +155,8 @@ var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, classN
|
|
|
154
155
|
if (!active || !over || active.id === over.id) return;
|
|
155
156
|
if (getRowId && (onReorder || onDragEnd)) {
|
|
156
157
|
if (onReorder) {
|
|
157
|
-
const oldIndex = items.findIndex((
|
|
158
|
-
const newIndex = items.findIndex((
|
|
158
|
+
const oldIndex = items.findIndex((item_0) => getRowId(item_0) === active.id);
|
|
159
|
+
const newIndex = items.findIndex((item_1) => getRowId(item_1) === over.id);
|
|
159
160
|
if (oldIndex !== -1 && newIndex !== -1) onReorder(arrayMove(items, oldIndex, newIndex));
|
|
160
161
|
}
|
|
161
162
|
onDragEnd?.(event);
|
|
@@ -185,18 +186,18 @@ var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, classN
|
|
|
185
186
|
children: headerGroup.headers.filter((header) => {
|
|
186
187
|
if (isAnyRowSelected && header.index > 0) return false;
|
|
187
188
|
return header.column.getIsVisible();
|
|
188
|
-
}).map((
|
|
189
|
-
const columnMeta =
|
|
189
|
+
}).map((header_0, index) => {
|
|
190
|
+
const columnMeta = header_0.column.columnDef.meta ?? {};
|
|
190
191
|
return /* @__PURE__ */ jsx("th", {
|
|
191
|
-
colSpan: isAnyRowSelected ? columnCount :
|
|
192
|
+
colSpan: isAnyRowSelected ? columnCount : header_0.colSpan,
|
|
192
193
|
tabIndex: -1,
|
|
193
194
|
className: clsx(tableHeadDataCva({ hasRightBorder: index > 0 && showCellBorder }), columnMeta.headerClass, columnMeta.width),
|
|
194
195
|
children: isAnyRowSelected ? /* @__PURE__ */ jsx(ActionHeader, { table }) : /* @__PURE__ */ jsxs("button", {
|
|
195
196
|
type: "button",
|
|
196
197
|
"aria-label": "Sort column",
|
|
197
|
-
className: clsx("flex select-none items-center gap-1 text-text-default-1",
|
|
198
|
-
onClick:
|
|
199
|
-
children: [typeof
|
|
198
|
+
className: clsx("flex select-none items-center gap-1 text-text-default-1", header_0.column.getCanSort() ? "h-6 cursor-pointer rounded-xs px-1 hover:bg-elevation-fill-default-2" : "cursor-default", columnMeta.sortClass),
|
|
199
|
+
onClick: header_0.column.getToggleSortingHandler(),
|
|
200
|
+
children: [typeof header_0.column.columnDef.header === "function" ? flexRender(header_0.column.columnDef.header, header_0.getContext()) : /* @__PURE__ */ jsx(HeaderText, { children: header_0.column.columnDef.header }), {
|
|
200
201
|
asc: /* @__PURE__ */ jsx(ChevronUpIcon, {
|
|
201
202
|
width: 18,
|
|
202
203
|
height: 18
|
|
@@ -205,9 +206,9 @@ var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, classN
|
|
|
205
206
|
width: 18,
|
|
206
207
|
height: 18
|
|
207
208
|
})
|
|
208
|
-
}[
|
|
209
|
+
}[header_0.column.getIsSorted()] ?? null]
|
|
209
210
|
})
|
|
210
|
-
},
|
|
211
|
+
}, header_0.id);
|
|
211
212
|
})
|
|
212
213
|
}, headerGroup.id))]
|
|
213
214
|
}), /* @__PURE__ */ jsx("tbody", {
|
|
@@ -216,8 +217,8 @@ var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, classN
|
|
|
216
217
|
children: enableDragDrop ? /* @__PURE__ */ jsx(SortableContext, {
|
|
217
218
|
items: dataIds,
|
|
218
219
|
strategy: verticalListSortingStrategy,
|
|
219
|
-
children: table.getRowModel().rows.map((
|
|
220
|
-
row,
|
|
220
|
+
children: table.getRowModel().rows.map((row_0) => /* @__PURE__ */ jsx(DraggableRow, {
|
|
221
|
+
row: row_0,
|
|
221
222
|
showCellBorder,
|
|
222
223
|
onRowClick,
|
|
223
224
|
onDoubleClick,
|
|
@@ -226,29 +227,29 @@ var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, classN
|
|
|
226
227
|
tableDataCva,
|
|
227
228
|
hasOnClick,
|
|
228
229
|
...props
|
|
229
|
-
},
|
|
230
|
-
}) : table.getRowModel().rows.map((
|
|
230
|
+
}, row_0.id))
|
|
231
|
+
}) : table.getRowModel().rows.map((row_1) => {
|
|
231
232
|
return /* @__PURE__ */ jsx("tr", {
|
|
232
233
|
className: clsx(tableRowCva({ ...props })),
|
|
233
234
|
onClick: () => {
|
|
234
235
|
if (onRowClick) {
|
|
235
|
-
onRowClick(
|
|
236
|
+
onRowClick(row_1.original);
|
|
236
237
|
return;
|
|
237
238
|
}
|
|
238
|
-
if (
|
|
239
|
+
if (row_1.getCanSelect()) row_1.toggleSelected();
|
|
239
240
|
},
|
|
240
|
-
onDoubleClick: () => onDoubleClick?.(
|
|
241
|
-
"data-clickable": hasOnClick ||
|
|
242
|
-
"data-selected":
|
|
243
|
-
children:
|
|
244
|
-
const
|
|
241
|
+
onDoubleClick: () => onDoubleClick?.(row_1.original),
|
|
242
|
+
"data-clickable": hasOnClick || row_1.getCanSelect() || void 0,
|
|
243
|
+
"data-selected": row_1.getIsSelected() || void 0,
|
|
244
|
+
children: row_1.getVisibleCells().map((cell, cellIndex) => {
|
|
245
|
+
const columnMeta_0 = cell.column.columnDef.meta ?? {};
|
|
245
246
|
return /* @__PURE__ */ jsx("td", {
|
|
246
247
|
tabIndex: -1,
|
|
247
|
-
className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }),
|
|
248
|
-
children:
|
|
248
|
+
className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta_0.cellClass, columnMeta_0.width),
|
|
249
|
+
children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
|
|
249
250
|
}, cell.id);
|
|
250
251
|
})
|
|
251
|
-
},
|
|
252
|
+
}, row_1.id);
|
|
252
253
|
})
|
|
253
254
|
})]
|
|
254
255
|
});
|
|
@@ -1,25 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { UIOverrides } from '../../config/uiOverrides.context';
|
|
2
|
+
export declare const tableRowDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly alternatingBackground: {
|
|
6
|
+
readonly even: "even:bg-elevation-fill-inverted-4/5";
|
|
7
|
+
readonly odd: "odd:bg-elevation-fill-inverted-4/5";
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
export type TableRowConfig = NonNullable<typeof tableRowDefinition.config>;
|
|
12
|
+
export interface TableRowVariantProps extends UIOverrides.VariantProps<TableRowConfig> {
|
|
6
13
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
14
|
+
export declare const tableHeadRowDefinition: {
|
|
15
|
+
base: string[];
|
|
16
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
17
|
+
};
|
|
18
|
+
export type TableHeadRowConfig = NonNullable<typeof tableHeadRowDefinition.config>;
|
|
19
|
+
export interface TableHeadRowVariantProps extends UIOverrides.VariantProps<TableHeadRowConfig> {
|
|
9
20
|
}
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
export declare const tableHeadDataDefinition: {
|
|
22
|
+
base: string[];
|
|
23
|
+
config: import("../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
24
|
+
readonly hasRightBorder: {
|
|
25
|
+
readonly true: "border-l border-l-elevation-outline-default-1 border-solid";
|
|
26
|
+
readonly false: "";
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
export type TableHeadDataConfig = NonNullable<typeof tableHeadDataDefinition.config>;
|
|
31
|
+
export interface TableHeadDataVariantProps extends UIOverrides.VariantProps<TableHeadDataConfig> {
|
|
14
32
|
}
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
33
|
+
export declare const tableDataDefinition: {
|
|
34
|
+
base: string[];
|
|
35
|
+
config: import("../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
36
|
+
readonly hasRightBorder: {
|
|
37
|
+
readonly true: "border-l border-l-elevation-outline-default-1";
|
|
38
|
+
readonly false: "";
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
export type TableDataConfig = NonNullable<typeof tableDataDefinition.config>;
|
|
43
|
+
export interface TableDataVariantProps extends UIOverrides.VariantProps<TableDataConfig> {
|
|
19
44
|
}
|
|
20
|
-
export declare const
|
|
21
|
-
|
|
45
|
+
export declare const tableHeaderTextDefinition: {
|
|
46
|
+
base: string[];
|
|
47
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
48
|
+
};
|
|
49
|
+
export type TableHeaderTextConfig = NonNullable<typeof tableHeaderTextDefinition.config>;
|
|
50
|
+
export interface TableHeaderTextVariantProps extends UIOverrides.VariantProps<TableHeaderTextConfig> {
|
|
22
51
|
}
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
52
|
+
export declare const tableCellTextDefinition: {
|
|
53
|
+
base: string[];
|
|
54
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
55
|
+
};
|
|
56
|
+
export type TableCellTextConfig = NonNullable<typeof tableCellTextDefinition.config>;
|
|
57
|
+
export interface TableCellTextVariantProps extends UIOverrides.VariantProps<TableCellTextConfig> {
|
|
25
58
|
}
|
|
@@ -1,39 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/table/table.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
variants: { hasRightBorder: {
|
|
18
|
-
true: "border-l border-l-elevation-outline-default-1 border-solid",
|
|
19
|
-
false: ""
|
|
20
|
-
} },
|
|
21
|
-
defaultVariants: { hasRightBorder: true }
|
|
3
|
+
var tableRowDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: [
|
|
5
|
+
"h-9 max-h-12",
|
|
6
|
+
"hover:bg-elevation-fill-default-2",
|
|
7
|
+
"disabled:opacity-50",
|
|
8
|
+
"selected:bg-elevation-fill-default-2",
|
|
9
|
+
"hover:selected:bg-interactive-subtle-secondary-hover",
|
|
10
|
+
"data-clickable:cursor-pointer",
|
|
11
|
+
"focus-within:bg-elevation-fill-default-2"
|
|
12
|
+
],
|
|
13
|
+
config: { variants: { alternatingBackground: {
|
|
14
|
+
even: "even:bg-elevation-fill-inverted-4/5",
|
|
15
|
+
odd: "odd:bg-elevation-fill-inverted-4/5"
|
|
16
|
+
} } }
|
|
22
17
|
});
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
"border-b border-b-elevation-outline-default-1",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} },
|
|
34
|
-
defaultVariants: { hasRightBorder: true }
|
|
18
|
+
var tableHeadRowDefinition = UIOverrides.defineConfig({ base: ["h-8 w-full"] });
|
|
19
|
+
var tableHeadDataDefinition = UIOverrides.defineConfig({
|
|
20
|
+
base: ["border-b border-b-elevation-outline-default-1 border-solid px-table-header-cell-container-side-default py-table-header-cell-container-height-default text-left", "group-data-[is-sticky=true]/table-head:bg-elevation-fill-default-1"],
|
|
21
|
+
config: {
|
|
22
|
+
variants: { hasRightBorder: {
|
|
23
|
+
true: "border-l border-l-elevation-outline-default-1 border-solid",
|
|
24
|
+
false: ""
|
|
25
|
+
} },
|
|
26
|
+
defaultVariants: { hasRightBorder: true }
|
|
27
|
+
}
|
|
35
28
|
});
|
|
36
|
-
var
|
|
37
|
-
|
|
29
|
+
var tableDataDefinition = UIOverrides.defineConfig({
|
|
30
|
+
base: [
|
|
31
|
+
"relative h-0-5 overflow-hidden text-ellipsis whitespace-nowrap border-t border-t-transparent px-2",
|
|
32
|
+
"border-b border-b-elevation-outline-default-1",
|
|
33
|
+
"has-[*>[data-hovered]:not([data-disabled])]:hover:border-b-input-outlined-outline-hover",
|
|
34
|
+
"has-[*>[data-invalid]]:border-b-input-outlined-outline-error!",
|
|
35
|
+
"has-[*>[data-focused]]:border-b-input-outlined-outline-active"
|
|
36
|
+
],
|
|
37
|
+
config: {
|
|
38
|
+
variants: { hasRightBorder: {
|
|
39
|
+
true: "border-l border-l-elevation-outline-default-1",
|
|
40
|
+
false: ""
|
|
41
|
+
} },
|
|
42
|
+
defaultVariants: { hasRightBorder: true }
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
var tableHeaderTextDefinition = UIOverrides.defineConfig({ base: ["overflow-hidden text-ellipsis px-table-cell-content-side-m py-table-cell-content-height-m text-text-default-1"] });
|
|
46
|
+
var tableCellTextDefinition = UIOverrides.defineConfig({ base: ["block overflow-hidden text-ellipsis text-text-default-2"] });
|
|
38
47
|
//#endregion
|
|
39
|
-
export {
|
|
48
|
+
export { tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition };
|
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { LinkContext } from "../../../config/link.context.js";
|
|
3
|
-
import {
|
|
3
|
+
import { linkDefinition } from "./link.cva.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { Link } from "react-aria-components";
|
|
6
7
|
//#region src/components/text/Link/Link.tsx
|
|
7
|
-
var Link$1 = (
|
|
8
|
+
var Link$1 = (t0) => {
|
|
9
|
+
const $ = c(4);
|
|
10
|
+
const { variant, ...props } = t0;
|
|
8
11
|
const linkContext = LinkContext.useLinkContext();
|
|
9
|
-
const linkCva =
|
|
12
|
+
const linkCva = UIOverrides.useCva("link.cva", linkDefinition);
|
|
10
13
|
const LinkComponent = linkContext?.LinkComponent ?? Link;
|
|
11
14
|
if (!props.to && props.href) props.to = props.href;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className:
|
|
15
|
-
variant,
|
|
16
|
-
className: props.className
|
|
17
|
-
})
|
|
15
|
+
const t1 = linkCva({
|
|
16
|
+
variant,
|
|
17
|
+
className: props.className
|
|
18
18
|
});
|
|
19
|
+
let t2;
|
|
20
|
+
if ($[0] !== LinkComponent || $[1] !== props || $[2] !== t1) {
|
|
21
|
+
t2 = /* @__PURE__ */ jsx(LinkComponent, {
|
|
22
|
+
...props,
|
|
23
|
+
className: t1
|
|
24
|
+
});
|
|
25
|
+
$[0] = LinkComponent;
|
|
26
|
+
$[1] = props;
|
|
27
|
+
$[2] = t1;
|
|
28
|
+
$[3] = t2;
|
|
29
|
+
} else t2 = $[3];
|
|
30
|
+
return t2;
|
|
19
31
|
};
|
|
20
32
|
//#endregion
|
|
21
33
|
export { Link$1 as Link };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const linkDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly variant: {
|
|
6
|
+
readonly default: ["text-interactive-text-primary-idle focus-visible:outline-interactive-text-primary-focus", "hover:text-interactive-text-primary-hover focus-visible:text-interactive-text-primary-focus active:text-interactive-text-primary-pressed"];
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export type LinkConfig = NonNullable<typeof linkDefinition.config>;
|
|
11
|
+
export interface LinkVariantProps extends UIOverrides.VariantProps<LinkConfig> {
|
|
6
12
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
3
|
//#region src/components/text/Link/link.cva.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
var linkDefinition = UIOverrides.defineConfig({
|
|
5
|
+
base: ["underline", uiOutlineClass],
|
|
6
|
+
config: {
|
|
7
|
+
variants: { variant: { default: ["text-interactive-text-primary-idle focus-visible:outline-interactive-text-primary-focus", "hover:text-interactive-text-primary-hover focus-visible:text-interactive-text-primary-focus active:text-interactive-text-primary-pressed"] } },
|
|
8
|
+
defaultVariants: { variant: "default" }
|
|
9
|
+
}
|
|
7
10
|
});
|
|
8
11
|
//#endregion
|
|
9
|
-
export {
|
|
12
|
+
export { linkDefinition };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
3
|
import { Typography } from "../Typography/Typography.js";
|
|
4
4
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
5
5
|
import "../../../config/i18n.js";
|
|
6
|
-
import {
|
|
6
|
+
import { tagDefinition } from "./tag.cva.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
9
|
import { Button } from "react-aria-components";
|
|
@@ -12,7 +12,7 @@ import { useTranslation } from "react-i18next";
|
|
|
12
12
|
var Tag = ({ className, children, dismissable, isDisabled, onDismiss, contentRef, ...props }) => {
|
|
13
13
|
const uiConfig = UIConfig.useConfig();
|
|
14
14
|
const { textVariant = uiConfig.tag.textVariant, textSize = uiConfig.tag.textSize } = props;
|
|
15
|
-
const tagCva =
|
|
15
|
+
const tagCva = UIOverrides.useCva("tag.cva", tagDefinition);
|
|
16
16
|
const { t } = useTranslation("ui");
|
|
17
17
|
const buttonProps = {
|
|
18
18
|
isDisabled,
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const tagDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly color: {
|
|
6
|
+
readonly primary: ["bg-interactive-subtle-primary-idle text-interactive-subtle-primary-on-idle", "hover:bg-interactive-subtle-primary-hover hover:text-interactive-subtle-primary-on-hover", "pressed:bg-interactive-subtle-primary-pressed pressed:text-interactive-subtle-primary-on-pressed", "disabled:bg-interactive-subtle-primary-disabled disabled:text-interactive-subtle-primary-on-disabled", "focus-visible:outline-interactive-contained-primary-focus"];
|
|
7
|
+
readonly secondary: ["bg-interactive-subtle-secondary-idle text-interactive-subtle-secondary-on-idle", "hover:bg-interactive-subtle-secondary-hover hover:text-interactive-subtle-secondary-on-hover", "pressed:bg-interactive-subtle-secondary-pressed pressed:text-interactive-subtle-secondary-on-pressed", "disabled:bg-interactive-subtle-secondary-disabled disabled:text-interactive-subtle-secondary-on-disabled", "focus-visible:outline-interactive-contained-primary-focus"];
|
|
8
|
+
readonly success: ["bg-interactive-subtle-success-idle text-interactive-subtle-success-on-idle", "hover:bg-interactive-subtle-success-hover hover:text-interactive-subtle-success-on-hover", "pressed:bg-interactive-subtle-success-pressed pressed:text-interactive-subtle-success-on-pressed", "disabled:bg-interactive-subtle-success-disabled disabled:text-interactive-subtle-success-on-disabled", "focus-visible:outline-interactive-contained-primary-focus"];
|
|
9
|
+
readonly warning: ["bg-interactive-subtle-warning-idle text-interactive-subtle-warning-on-idle", "hover:bg-interactive-subtle-warning-hover hover:text-interactive-subtle-warning-on-hover", "pressed:bg-interactive-subtle-warning-pressed pressed:text-interactive-subtle-warning-on-pressed", "disabled:bg-interactive-subtle-warning-disabled disabled:text-interactive-subtle-warning-on-disabled", "focus-visible:outline-interactive-contained-primary-focus"];
|
|
10
|
+
readonly error: ["bg-interactive-subtle-error-idle text-interactive-subtle-error-on-idle", "hover:bg-interactive-subtle-error-hover hover:text-interactive-subtle-error-on-hover", "pressed:bg-interactive-subtle-error-pressed pressed:text-interactive-subtle-error-on-pressed", "disabled:bg-interactive-subtle-error-disabled disabled:text-interactive-subtle-error-on-disabled", "focus-visible:outline-interactive-contained-primary-focus"];
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
export type TagConfig = NonNullable<typeof tagDefinition.config>;
|
|
15
|
+
export interface TagVariantProps extends UIOverrides.VariantProps<TagConfig> {
|
|
6
16
|
}
|