@povio/ui 3.4.0-rc.15 → 3.4.0-rc.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/assets/locales/en/{translation.json.js → translation.js} +1 -0
- package/dist/assets/locales/sl/{translation.json.js → translation.js} +1 -0
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +39 -40
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +5 -5
- package/dist/components/Menu/MenuDesktop.js +2 -2
- package/dist/components/Menu/MenuItem.d.ts +6 -3
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/Menu/MenuMobile.js +3 -3
- package/dist/components/Menu/MenuPopover.d.ts +7 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/Menu/menu.cva.d.ts +35 -35
- package/dist/components/Menu/menu.cva.js +4 -4
- package/dist/components/accordion.d.ts +5 -0
- package/dist/components/accordion.js +81 -0
- package/dist/components/action-modal.d.ts +26 -0
- package/dist/components/action-modal.js +188 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.js +114 -0
- package/dist/components/autocomplete.d.ts +16 -0
- package/dist/components/{inputs/Selection/Autocomplete/Autocomplete.js → autocomplete.js} +34 -64
- package/dist/components/bottom-sheet.d.ts +34 -0
- package/dist/components/{overlays/BottomSheet/BottomSheet.js → bottom-sheet.js} +17 -14
- package/dist/components/breadcrumbs.d.ts +19 -0
- package/dist/components/breadcrumbs.js +263 -0
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +2 -0
- package/dist/components/buttons/Button/Button.d.ts +25 -23
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/Button/button.cva.d.ts +89 -95
- package/dist/components/buttons/Button/button.cva.js +8 -44
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -38
- package/dist/components/buttons/PillButton/pillButton.cva.js +5 -5
- package/dist/components/buttons/shared/ButtonContent.js +81 -23
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +6 -8
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -1
- package/dist/components/checkbox-group.d.ts +28 -0
- package/dist/components/checkbox-group.js +163 -0
- package/dist/components/checkbox.d.ts +24 -0
- package/dist/components/checkbox.js +80 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -0
- package/dist/components/date-range-picker.d.ts +2 -0
- package/dist/components/date-range-picker.js +2 -0
- package/dist/components/date-time-picker.d.ts +2 -0
- package/dist/components/date-time-picker.js +2 -0
- package/dist/components/drawer.d.ts +18 -0
- package/dist/components/{overlays/Drawer/Drawer.js → drawer.js} +4 -4
- package/dist/components/file-upload-container.d.ts +5 -0
- package/dist/components/file-upload-container.js +15 -0
- package/dist/components/file-upload.d.ts +7 -0
- package/dist/components/{inputs/File/FileUpload.js → file-upload.js} +59 -98
- package/dist/components/form-field.d.ts +24 -0
- package/dist/components/form-field.js +47 -0
- package/dist/components/icon-button.d.ts +14 -0
- package/dist/components/{buttons/IconButton/IconButton.js → icon-button.js} +3 -3
- package/dist/components/inline-icon-button.d.ts +16 -0
- package/dist/components/inline-icon-button.js +40 -0
- package/dist/components/input-upload.d.ts +7 -0
- package/dist/components/input-upload.js +118 -0
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +1 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +73 -89
- package/dist/components/inputs/Checkbox/checkbox.cva.js +8 -8
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +40 -37
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +44 -36
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +46 -43
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +174 -170
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +41 -38
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -20
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +29 -26
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +166 -542
- package/dist/components/inputs/DateTime/shared/Calendar.js +17 -14
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +18 -18
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +6 -5
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +9 -8
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +45 -45
- package/dist/components/inputs/DateTime/shared/DateField.js +19 -20
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +11 -45
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +26 -102
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +29 -84
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +3 -3
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +59 -104
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +113 -283
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +73 -216
- package/dist/components/inputs/DateTime/shared/YearPicker.js +69 -120
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +8 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -15
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +1 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +13 -52
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.js +1 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +13 -12
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +12 -26
- package/dist/components/inputs/File/fileUpload.types.d.ts +87 -84
- package/dist/components/inputs/File/inputUpload.types.d.ts +34 -32
- package/dist/components/inputs/File/inputUpload.types.js +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +47 -110
- package/dist/components/inputs/File/shared/FileCardList.js +16 -54
- package/dist/components/inputs/File/shared/FileUploadContent.js +47 -188
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +6 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadContent.js +38 -151
- package/dist/components/inputs/File/shared/InputUploadFilled.js +10 -50
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +6 -4
- package/dist/components/inputs/File/shared/ProgressBar.js +2 -2
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +17 -16
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +24 -25
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +5 -5
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +34 -33
- package/dist/components/inputs/File/shared/progressBar.cva.js +5 -5
- package/dist/components/inputs/FormField/FormFieldError.d.ts +9 -6
- package/dist/components/inputs/FormField/FormFieldError.js +6 -24
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +15 -13
- package/dist/components/inputs/FormField/FormFieldHeader.js +24 -80
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +7 -25
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldError.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +1 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +11 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +121 -554
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -7
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +1 -1
- package/dist/components/inputs/Input/shared/InputContent.d.ts +25 -27
- package/dist/components/inputs/Input/shared/InputContent.js +61 -195
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +1 -1
- package/dist/components/inputs/Inputs/Form.d.ts +19 -19
- package/dist/components/inputs/Inputs/Form.js +23 -51
- package/dist/components/inputs/Inputs/InputItem.d.ts +77 -58
- package/dist/components/inputs/Inputs/InputItem.js +29 -78
- package/dist/components/inputs/Inputs/Inputs.d.ts +12 -9
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +49 -59
- package/dist/components/inputs/RadioGroup/radio.cva.js +6 -6
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +25 -38
- package/dist/components/inputs/Selection/Select/Select.d.ts +15 -11
- package/dist/components/inputs/Selection/Select/Select.js +36 -112
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +39 -37
- package/dist/components/inputs/Selection/shared/SelectBase.js +26 -70
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +145 -393
- package/dist/components/inputs/Selection/shared/SelectInput.js +162 -429
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +27 -101
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +24 -72
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +10 -59
- package/dist/components/inputs/Selection/shared/SelectMobile.js +4 -4
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +14 -39
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +8 -15
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +6 -6
- package/dist/components/inputs/Selection/shared/select.context.js +52 -52
- package/dist/components/inputs/Selection/shared/select.types.d.ts +60 -62
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +8 -5
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -11
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -15
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +3 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +12 -12
- package/dist/components/inputs/Skeleton/InputFrame.js +30 -30
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +24 -20
- package/dist/components/inputs/TextEditor/TextEditor.js +22 -63
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +31 -103
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +48 -197
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +33 -93
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +55 -127
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +39 -142
- package/dist/components/inputs/TextEditor/textEditor.types.js +1 -1
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -18
- package/dist/components/inputs/Toggle/toggle.cva.js +3 -3
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.js +31 -103
- package/dist/components/inputs/shared/TooltipWrapper.js +14 -49
- package/dist/components/inputs/shared/form.binding.d.ts +7 -27
- package/dist/components/inputs/shared/form.binding.js +8 -37
- package/dist/components/inputs/shared/form.types.d.ts +11 -11
- package/dist/components/inputs/shared/form.types.js +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +76 -85
- package/dist/components/inputs/shared/input.cva.js +9 -19
- package/dist/components/inputs/shared/label.cva.d.ts +18 -18
- package/dist/components/inputs/shared/label.cva.js +2 -2
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +10 -7
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +1 -1
- package/dist/components/inputs/shared/useFieldAccessibility.js +19 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +50 -105
- package/dist/components/link.d.ts +11 -0
- package/dist/components/{text/Link/Link.js → link.js} +7 -7
- package/dist/components/loader.d.ts +7 -0
- package/dist/components/{status/Loader/Loader.js → loader.js} +2 -2
- package/dist/components/menu.d.ts +23 -0
- package/dist/components/{Menu/Menu.js → menu.js} +4 -4
- package/dist/components/modal.d.ts +2 -0
- package/dist/components/modal.js +2 -0
- package/dist/components/navigation/Accordion/AccordionItem.js +87 -42
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +76 -100
- package/dist/components/navigation/Accordion/accordion.cva.js +10 -10
- package/dist/components/navigation/Accordion/accordion.types.d.ts +52 -49
- package/dist/components/navigation/Stepper/StepperItem.js +3 -3
- package/dist/components/navigation/Stepper/StepperSeparator.js +1 -1
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +73 -86
- package/dist/components/navigation/Stepper/stepper.cva.js +7 -7
- package/dist/components/navigation/Stepper/stepper.types.d.ts +29 -37
- package/dist/components/number-input.d.ts +27 -0
- package/dist/components/number-input.js +245 -0
- package/dist/components/number-range-input.d.ts +39 -0
- package/dist/components/number-range-input.js +267 -0
- package/dist/components/outline.clsx.d.ts +4 -2
- package/dist/components/outline.clsx.js +2 -2
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +3 -3
- package/dist/components/overlays/Modal/Modal.d.ts +18 -14
- package/dist/components/overlays/Modal/Modal.js +4 -2
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -34
- package/dist/components/overlays/Modal/modal.cva.js +4 -4
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +39 -45
- package/dist/components/overlays/Tooltip/tooltip.cva.js +4 -4
- package/dist/components/pagination.d.ts +12 -0
- package/dist/components/pagination.js +131 -0
- package/dist/components/password-input.d.ts +10 -0
- package/dist/components/password-input.js +23 -0
- package/dist/components/pill-button.d.ts +15 -0
- package/dist/components/{buttons/PillButton/PillButton.js → pill-button.js} +5 -5
- package/dist/components/pill.d.ts +18 -0
- package/dist/components/{text/Pill/Pill.js → pill.js} +6 -6
- package/dist/components/query-autocomplete.d.ts +8 -0
- package/dist/components/query-autocomplete.js +105 -0
- package/dist/components/query-select.d.ts +19 -0
- package/dist/components/query-select.js +115 -0
- package/dist/components/radio-group.d.ts +24 -0
- package/dist/components/radio-group.js +165 -0
- package/dist/components/responsive-popover.d.ts +19 -0
- package/dist/components/responsive-popover.js +126 -0
- package/dist/components/segment/SegmentItem.js +3 -3
- package/dist/components/segment/segment.cva.d.ts +20 -18
- package/dist/components/segment/segment.cva.js +2 -2
- package/dist/components/segment/segment.types.d.ts +33 -30
- package/dist/components/segment.d.ts +7 -0
- package/dist/components/{segment/Segment.js → segment.js} +8 -8
- package/dist/components/select.d.ts +4 -0
- package/dist/components/select.js +2 -0
- package/dist/components/shared/pagination/PaginationList.d.ts +17 -14
- package/dist/components/shared/pagination/PaginationList.js +2 -2
- package/dist/components/shared/pagination/minWidth.cva.js +1 -1
- package/dist/components/shared/popover.cva.d.ts +8 -7
- package/dist/components/shared/popover.cva.js +1 -1
- package/dist/components/slider.d.ts +22 -0
- package/dist/components/slider.js +103 -0
- package/dist/components/split-button.d.ts +15 -0
- package/dist/components/{buttons/SplitButton/SplitButton.js → split-button.js} +5 -5
- package/dist/components/status/Alert/alert.cva.d.ts +21 -18
- package/dist/components/status/Alert/alert.cva.js +1 -1
- package/dist/components/status/Loader/loader.cva.d.ts +23 -26
- package/dist/components/status/Loader/loader.cva.js +4 -4
- package/dist/components/status/Toast/toast.cva.d.ts +58 -77
- package/dist/components/status/Toast/toast.cva.js +6 -6
- package/dist/components/status/Toast/useToast.d.ts +14 -11
- package/dist/components/status/Toast/useToast.js +2 -2
- package/dist/components/status/shared/status.cva.d.ts +32 -28
- package/dist/components/status/shared/status.cva.js +2 -2
- package/dist/components/stepper.d.ts +5 -0
- package/dist/components/stepper.js +79 -0
- package/dist/components/table/CellText.d.ts +10 -7
- package/dist/components/table/CellText.js +4 -3
- package/dist/components/table/ColumnConfig.d.ts +12 -9
- package/dist/components/table/ColumnConfig.js +8 -7
- package/dist/components/table/HeaderText.d.ts +10 -7
- package/dist/components/table/HeaderText.js +4 -3
- package/dist/components/table/InfiniteTable.d.ts +10 -8
- package/dist/components/table/InfiniteTable.js +68 -17
- package/dist/components/table/PaginatedTable.d.ts +12 -10
- package/dist/components/table/PaginatedTable.js +2 -2
- package/dist/components/table/Table.d.ts +34 -35
- package/dist/components/table/Table.js +19 -17
- package/dist/components/table/table.cva.d.ts +40 -59
- package/dist/components/table/table.cva.js +7 -7
- package/dist/components/tag.d.ts +18 -0
- package/dist/components/{text/Tag/Tag.js → tag.js} +6 -6
- package/dist/components/text/Link/link.cva.d.ts +14 -11
- package/dist/components/text/Link/link.cva.js +1 -1
- package/dist/components/text/Tag/tag.cva.d.ts +18 -15
- package/dist/components/text/Tag/tag.cva.js +1 -1
- package/dist/components/text/Typography/typography.cva.d.ts +51 -48
- package/dist/components/text/Typography/typography.cva.js +1 -1
- package/dist/components/text-area.d.ts +21 -0
- package/dist/components/text-area.js +138 -0
- package/dist/components/text-button.d.ts +15 -0
- package/dist/components/{buttons/TextButton/TextButton.js → text-button.js} +2 -2
- package/dist/components/text-input.d.ts +27 -0
- package/dist/components/text-input.js +241 -0
- package/dist/components/time-picker.d.ts +2 -0
- package/dist/components/time-picker.js +2 -0
- package/dist/components/toast.d.ts +17 -0
- package/dist/components/{status/Toast/Toast.js → toast.js} +11 -11
- package/dist/components/toggle-button.d.ts +12 -0
- package/dist/components/{buttons/ToggleButton/ToggleButton.js → toggle-button.js} +2 -2
- package/dist/components/toggle.d.ts +19 -0
- package/dist/components/toggle.js +74 -0
- package/dist/components/tooltip-ellipsis.d.ts +11 -0
- package/dist/components/{overlays/Tooltip/TooltipEllipsis.js → tooltip-ellipsis.js} +3 -3
- package/dist/components/tooltip.d.ts +16 -0
- package/dist/components/{overlays/Tooltip/Tooltip.js → tooltip.js} +9 -9
- package/dist/components/typography.d.ts +12 -0
- package/dist/components/typography.js +31 -0
- package/dist/config/confirmation.context.d.ts +22 -19
- package/dist/config/confirmation.context.js +3 -3
- package/dist/config/i18n.d.ts +311 -308
- package/dist/config/i18n.js +4 -4
- package/dist/config/link.context.d.ts +9 -7
- package/dist/config/link.context.js +2 -2
- package/dist/config/router.context.d.ts +11 -9
- package/dist/config/router.context.js +2 -2
- package/dist/config/theme.context.d.ts +19 -16
- package/dist/config/theme.context.js +99 -46
- package/dist/config/uiConfig.context.d.ts +80 -75
- package/dist/config/uiConfig.context.js +46 -9
- package/dist/config/uiOverrides.context.d.ts +205 -204
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +27 -28
- package/dist/helpers/dynamicColumns.js +32 -31
- package/dist/helpers/dynamicInputs.d.ts +66 -74
- package/dist/helpers/dynamicInputs.js +21 -20
- package/dist/hooks/useAutosave.d.ts +12 -9
- package/dist/hooks/useAutosave.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +4 -2
- package/dist/hooks/useBreakpoint.js +37 -10
- package/dist/hooks/useDebounceCallback.d.ts +7 -4
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useDeepCompare.d.ts +7 -4
- package/dist/hooks/useDeepCompare.js +4 -4
- package/dist/hooks/useFilters.d.ts +10 -7
- package/dist/hooks/useFilters.js +8 -6
- package/dist/hooks/useForm.d.ts +35 -35
- package/dist/hooks/useForm.js +6 -6
- package/dist/hooks/useFormAutosave.d.ts +16 -13
- package/dist/hooks/useFormAutosave.js +18 -17
- package/dist/hooks/useIntersectionObserver.d.ts +7 -5
- package/dist/hooks/useIntersectionObserver.js +2 -2
- package/dist/hooks/useKeyInteractions.d.ts +19 -16
- package/dist/hooks/useKeyInteractions.js +5 -5
- package/dist/hooks/useLocalStorage.d.ts +10 -8
- package/dist/hooks/useLocalStorage.js +3 -3
- package/dist/hooks/useLongPressRepeat.d.ts +10 -7
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.d.ts +9 -6
- package/dist/hooks/usePagination.js +2 -2
- package/dist/hooks/useQueryAutocomplete.js +2 -2
- package/dist/hooks/useScrollableListBox.d.ts +5 -2
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.d.ts +8 -5
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.d.ts +5 -3
- package/dist/hooks/useStateAndRef.js +2 -2
- package/dist/hooks/useTableColumnConfig.d.ts +15 -13
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/hooks/useTableNav.d.ts +79 -77
- package/dist/hooks/useTableNav.js +19 -37
- package/dist/hooks/useTranslationMemo.d.ts +5 -3
- package/dist/index.d.ts +145 -1
- package/dist/index.js +29 -29
- package/dist/rhf/Inputs.d.ts +55 -54
- package/dist/rhf/Inputs.js +62 -17
- package/dist/rhf/autocomplete.d.ts +3 -0
- package/dist/rhf/autocomplete.js +2 -0
- package/dist/rhf/checkbox-group.d.ts +3 -0
- package/dist/rhf/checkbox-group.js +2 -0
- package/dist/rhf/checkbox.d.ts +3 -0
- package/dist/rhf/checkbox.js +2 -0
- package/dist/rhf/components.d.ts +77 -75
- package/dist/rhf/components.js +43 -43
- package/dist/rhf/date-picker.d.ts +3 -0
- package/dist/rhf/date-picker.js +2 -0
- package/dist/rhf/date-range-picker.d.ts +3 -0
- package/dist/rhf/date-range-picker.js +2 -0
- package/dist/rhf/date-time-picker.d.ts +3 -0
- package/dist/rhf/date-time-picker.js +2 -0
- package/dist/rhf/dynamicInputs.d.ts +16 -14
- package/dist/rhf/dynamicInputs.js +1 -1
- package/dist/rhf/entry.utils.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +8 -6
- package/dist/rhf/form.types.d.ts +11 -10
- package/dist/rhf/number-input.d.ts +8 -0
- package/dist/rhf/number-input.js +7 -0
- package/dist/rhf/number-range-input.d.ts +8 -0
- package/dist/rhf/number-range-input.js +7 -0
- package/dist/rhf/password-input.d.ts +8 -0
- package/dist/rhf/password-input.js +7 -0
- package/dist/rhf/query-autocomplete.d.ts +2 -0
- package/dist/rhf/query-autocomplete.js +2 -0
- package/dist/rhf/query-select.d.ts +2 -0
- package/dist/rhf/query-select.js +2 -0
- package/dist/rhf/radio-group.d.ts +3 -0
- package/dist/rhf/radio-group.js +2 -0
- package/dist/rhf/segment.d.ts +3 -0
- package/dist/rhf/segment.js +2 -0
- package/dist/rhf/select.d.ts +3 -0
- package/dist/rhf/select.js +2 -0
- package/dist/rhf/slider.d.ts +3 -0
- package/dist/rhf/slider.js +2 -0
- package/dist/rhf/text-area.d.ts +8 -0
- package/dist/rhf/text-area.js +7 -0
- package/dist/rhf/text-input.d.ts +8 -0
- package/dist/rhf/text-input.js +7 -0
- package/dist/rhf/time-picker.d.ts +3 -0
- package/dist/rhf/time-picker.js +2 -0
- package/dist/rhf/toggle.d.ts +3 -0
- package/dist/rhf/toggle.js +2 -0
- package/dist/rhf/useAutosave.d.ts +12 -9
- package/dist/rhf/useForm.d.ts +13 -13
- package/dist/rhf/useFormAutosave.d.ts +17 -14
- package/dist/rhf/useFormAutosave.js +121 -34
- package/dist/rhf.d.ts +146 -225
- package/dist/rhf.js +120 -0
- package/dist/tanstack/autocomplete.d.ts +2 -0
- package/dist/tanstack/autocomplete.js +2 -0
- package/dist/tanstack/checkbox-group.d.ts +2 -0
- package/dist/tanstack/checkbox-group.js +2 -0
- package/dist/tanstack/checkbox.d.ts +2 -0
- package/dist/tanstack/checkbox.js +2 -0
- package/dist/tanstack/date-picker.d.ts +2 -0
- package/dist/tanstack/date-picker.js +2 -0
- package/dist/tanstack/date-range-picker.d.ts +2 -0
- package/dist/tanstack/date-range-picker.js +2 -0
- package/dist/tanstack/date-time-picker.d.ts +2 -0
- package/dist/tanstack/date-time-picker.js +2 -0
- package/dist/tanstack/form.d.ts +3 -0
- package/dist/tanstack/form.js +3 -0
- package/dist/tanstack/number-input.d.ts +2 -0
- package/dist/tanstack/number-input.js +2 -0
- package/dist/tanstack/number-range-input.d.ts +3 -0
- package/dist/tanstack/number-range-input.js +2 -0
- package/dist/tanstack/password-input.d.ts +2 -0
- package/dist/tanstack/password-input.js +2 -0
- package/dist/tanstack/query-autocomplete.d.ts +2 -0
- package/dist/tanstack/query-autocomplete.js +2 -0
- package/dist/tanstack/query-select.d.ts +2 -0
- package/dist/tanstack/query-select.js +2 -0
- package/dist/tanstack/radio-group.d.ts +2 -0
- package/dist/tanstack/radio-group.js +2 -0
- package/dist/tanstack/segment.d.ts +3 -0
- package/dist/tanstack/segment.js +2 -0
- package/dist/tanstack/select.d.ts +2 -0
- package/dist/tanstack/select.js +2 -0
- package/dist/tanstack/slider.d.ts +2 -0
- package/dist/tanstack/slider.js +2 -0
- package/dist/tanstack/table.d.ts +12 -0
- package/dist/tanstack/table.js +11 -0
- package/dist/tanstack/text-area.d.ts +2 -0
- package/dist/tanstack/text-area.js +2 -0
- package/dist/tanstack/text-input.d.ts +2 -0
- package/dist/tanstack/text-input.js +2 -0
- package/dist/tanstack/time-picker.d.ts +2 -0
- package/dist/tanstack/time-picker.js +2 -0
- package/dist/tanstack/toggle.d.ts +2 -0
- package/dist/tanstack/toggle.js +2 -0
- package/dist/tanstack.d.ts +151 -224
- package/dist/tanstack.js +45 -45
- package/dist/text-editor.d.ts +2 -2
- package/dist/tw-ui-plugin.d.ts +4 -2
- package/dist/tw-ui-plugin.js +1 -1
- package/dist/types/common.d.ts +11 -12
- package/dist/types/error-handling.d.ts +8 -5
- package/dist/utils/array.utils.d.ts +5 -2
- package/dist/utils/array.utils.js +1 -1
- package/dist/utils/compoundMapper.d.ts +12 -14
- package/dist/utils/compoundMapper.js +1 -1
- package/dist/utils/date-time.utils.d.ts +44 -41
- package/dist/utils/date-time.utils.js +7 -9
- package/dist/utils/date.utils.d.ts +6 -4
- package/dist/utils/date.utils.js +29 -6
- package/dist/utils/dom.utils.d.ts +7 -4
- package/dist/utils/dom.utils.js +2 -2
- package/dist/utils/file.utils.d.ts +20 -12
- package/dist/utils/file.utils.js +19 -8
- package/dist/utils/intl.utils.d.ts +7 -5
- package/dist/utils/intl.utils.js +2 -2
- package/dist/utils/isEqual.d.ts +4 -1
- package/dist/utils/isEqual.js +3 -3
- package/dist/utils/logger.d.ts +9 -6
- package/dist/utils/logger.js +1 -1
- package/dist/utils/object.utils.d.ts +12 -9
- package/dist/utils/object.utils.js +1 -1
- package/dist/utils/queries.utils.d.ts +6 -3
- package/dist/utils/queries.utils.js +1 -1
- package/dist/utils/query.utils.js +1 -1
- package/dist/utils/routing.utils.d.ts +6 -3
- package/dist/utils/routing.utils.js +1 -1
- package/dist/utils/string.utils.d.ts +6 -3
- package/dist/utils/string.utils.js +1 -1
- package/dist/utils/style-merge.util.d.ts +38 -41
- package/dist/utils/style-merge.util.js +7 -4
- package/dist/utils/zod.utils.d.ts +22 -19
- package/dist/utils/zod.utils.js +1 -1
- package/package.json +475 -8
- package/dist/assets/locales/en/translation.json.d.ts +0 -158
- package/dist/assets/locales/sl/translation.json.d.ts +0 -154
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -16
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -112
- package/dist/components/Menu/Menu.d.ts +0 -21
- package/dist/components/Menu/MenuDesktop.d.ts +0 -2
- package/dist/components/Menu/MenuMobile.d.ts +0 -2
- package/dist/components/buttons/IconButton/IconButton.d.ts +0 -11
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +0 -13
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -15
- package/dist/components/buttons/PillButton/PillButton.d.ts +0 -12
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +0 -12
- package/dist/components/buttons/TextButton/TextButton.d.ts +0 -12
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -9
- package/dist/components/buttons/shared/ButtonContent.d.ts +0 -14
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -20
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -236
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +0 -9
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +0 -26
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +0 -392
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +0 -29
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -22
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -27
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -17
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +0 -21
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -8
- package/dist/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -26
- package/dist/components/inputs/DateTime/shared/TimeField.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -10
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +0 -25
- package/dist/components/inputs/DateTime/shared/YearPicker.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -41
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +0 -2
- package/dist/components/inputs/File/FileUpload.d.ts +0 -4
- package/dist/components/inputs/File/FileUploadContainer.d.ts +0 -3
- package/dist/components/inputs/File/FileUploadContainer.js +0 -22
- package/dist/components/inputs/File/InputUpload.d.ts +0 -4
- package/dist/components/inputs/File/InputUpload.js +0 -157
- package/dist/components/inputs/File/index.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCard.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCardList.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContent.d.ts +0 -10
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadContent.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadFilled.d.ts +0 -8
- package/dist/components/inputs/FormField/FormField.d.ts +0 -20
- package/dist/components/inputs/FormField/FormField.js +0 -127
- package/dist/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -5
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -13
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +0 -23
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -494
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -36
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -338
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +0 -7
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -61
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +0 -19
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -346
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +0 -23
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -470
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +0 -22
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -371
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +0 -12
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +0 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -176
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -15
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -172
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +0 -15
- package/dist/components/inputs/Selection/shared/SelectInputTags.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.d.ts +0 -7
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +0 -32
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.d.ts +0 -23
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -84
- package/dist/components/inputs/Slider/Slider.d.ts +0 -19
- package/dist/components/inputs/Slider/Slider.js +0 -285
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -7
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -10
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/textEditor.types.d.ts +0 -5
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -16
- package/dist/components/inputs/Toggle/Toggle.js +0 -234
- package/dist/components/inputs/shared/CheckContent.d.ts +0 -9
- package/dist/components/inputs/shared/InputClear.d.ts +0 -10
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +0 -10
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -15
- package/dist/components/navigation/Accordion/Accordion.d.ts +0 -3
- package/dist/components/navigation/Accordion/Accordion.js +0 -34
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/Stepper.d.ts +0 -2
- package/dist/components/navigation/Stepper/Stepper.js +0 -34
- package/dist/components/navigation/Stepper/StepperItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +0 -5
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +0 -24
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -54
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +0 -32
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +0 -13
- package/dist/components/overlays/Drawer/Drawer.d.ts +0 -15
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -17
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -45
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +0 -13
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -8
- package/dist/components/segment/Segment.d.ts +0 -4
- package/dist/components/segment/SegmentItem.d.ts +0 -2
- package/dist/components/shared/pagination/Pagination.d.ts +0 -9
- package/dist/components/shared/pagination/Pagination.js +0 -45
- package/dist/components/shared/pagination/minWidth.cva.d.ts +0 -3
- package/dist/components/status/Alert/Alert.d.ts +0 -11
- package/dist/components/status/Alert/Alert.js +0 -47
- package/dist/components/status/Loader/Loader.d.ts +0 -5
- package/dist/components/status/Toast/Toast.d.ts +0 -14
- package/dist/components/text/Link/Link.d.ts +0 -9
- package/dist/components/text/Pill/Pill.d.ts +0 -15
- package/dist/components/text/Tag/Tag.d.ts +0 -15
- package/dist/components/text/Typography/Typography.d.ts +0 -11
- package/dist/components/text/Typography/Typography.js +0 -16
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -13
- package/dist/rhf/entrypoints.type-test.d.ts +0 -1
- package/dist/types/react-query.d.ts +0 -6
- package/dist/utils/array.utils.spec.d.ts +0 -1
- package/dist/utils/compoundMapper.spec.d.ts +0 -1
- package/dist/utils/date-time.utils.spec.d.ts +0 -1
- package/dist/utils/date.utils.spec.d.ts +0 -1
- package/dist/utils/intl.utils.spec.d.ts +0 -1
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/rest.utils.d.ts +0 -10
- package/dist/utils/rest.utils.js +0 -33
- package/dist/utils/style-merge.util.spec.d.ts +0 -1
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { StyleMergeUtils } from "../../../utils/style-merge.util.js";
|
|
2
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
|
+
//#region src/components/text/Typography/typography.cva.d.ts
|
|
4
|
+
declare const typographyDefinition: {
|
|
5
|
+
base: string[];
|
|
6
|
+
config: StyleMergeUtils.Config<{
|
|
7
|
+
readonly size: {
|
|
8
|
+
readonly "headline-1": "md:text-desktop-headline-1";
|
|
9
|
+
readonly "title-1": "md:text-desktop-title-1";
|
|
10
|
+
readonly "title-2": "md:text-desktop-title-2";
|
|
11
|
+
readonly "title-3": "md:text-desktop-title-3";
|
|
12
|
+
readonly "title-4": "md:text-desktop-title-4";
|
|
13
|
+
readonly "title-5": "md:text-desktop-title-5";
|
|
14
|
+
readonly "title-6": "md:text-desktop-title-6";
|
|
15
|
+
readonly "body-1": "md:text-desktop-body-1";
|
|
16
|
+
readonly "body-2": "md:text-desktop-body-2";
|
|
17
|
+
readonly "body-3": "md:text-desktop-body-3";
|
|
18
|
+
readonly "body-4": "md:text-desktop-body-4";
|
|
19
|
+
readonly "label-1": "md:text-label-1";
|
|
20
|
+
readonly "label-2": "md:text-label-2";
|
|
21
|
+
readonly "label-3": "md:text-label-3";
|
|
22
|
+
};
|
|
23
|
+
readonly sizeMobile: {
|
|
24
|
+
readonly "headline-1": "text-mobile-headline-1";
|
|
25
|
+
readonly "title-1": "text-mobile-title-1";
|
|
26
|
+
readonly "title-2": "text-mobile-title-2";
|
|
27
|
+
readonly "title-3": "text-mobile-title-3";
|
|
28
|
+
readonly "title-4": "text-mobile-title-4";
|
|
29
|
+
readonly "title-5": "text-mobile-title-5";
|
|
30
|
+
readonly "title-6": "text-mobile-title-6";
|
|
31
|
+
readonly "body-1": "text-mobile-body-1";
|
|
32
|
+
readonly "body-2": "text-mobile-body-2";
|
|
33
|
+
readonly "body-3": "text-mobile-body-3";
|
|
34
|
+
readonly "body-4": "text-mobile-body-4";
|
|
35
|
+
readonly "label-1": "text-label-1";
|
|
36
|
+
readonly "label-2": "text-label-2";
|
|
37
|
+
readonly "label-3": "text-label-3";
|
|
38
|
+
};
|
|
39
|
+
readonly variant: {
|
|
40
|
+
readonly default: "";
|
|
41
|
+
readonly "prominent-1": "";
|
|
42
|
+
readonly "default-italic": "italic";
|
|
43
|
+
readonly "prominent-1-italic": "italic";
|
|
44
|
+
readonly "prominent-2": "";
|
|
45
|
+
readonly "prominent-2-italic": "italic";
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
46
48
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
type TypographyConfig = NonNullable<typeof typographyDefinition.config>;
|
|
50
|
+
interface TypographyVariantProps extends UIOverrides.VariantProps<TypographyConfig> {}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { TypographyConfig, TypographyVariantProps, typographyDefinition };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/text/Typography/typography.cva.ts
|
|
3
|
-
|
|
3
|
+
const typographyDefinition = UIOverrides.defineConfig({
|
|
4
4
|
base: [""],
|
|
5
5
|
config: {
|
|
6
6
|
variants: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FieldValues } from "./inputs/shared/form.binding.js";
|
|
2
|
+
import { ControlProps } from "./inputs/shared/form.types.js";
|
|
3
|
+
import { InputVariantProps } from "./inputs/shared/input.cva.js";
|
|
4
|
+
import { FormFieldProps } from "./form-field.js";
|
|
5
|
+
import { Ref } from "react";
|
|
6
|
+
import { TextAreaProps as TextAreaProps$1 } from "react-aria-components";
|
|
7
|
+
import { AriaTextFieldProps } from "react-aria";
|
|
8
|
+
//#region src/components/inputs/Input/TextArea/TextArea.d.ts
|
|
9
|
+
interface TextAreaBaseProps extends FormFieldProps, InputVariantProps, Omit<TextAreaProps$1, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLTextAreaElement>, "label"> {
|
|
10
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
11
|
+
isClearable?: boolean;
|
|
12
|
+
isClearableIfDisabled?: boolean;
|
|
13
|
+
isDirty?: boolean;
|
|
14
|
+
inputClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
interface TextAreaProps extends TextAreaBaseProps {}
|
|
17
|
+
type ControlledTextAreaProps<TFieldValues extends FieldValues> = ControlProps<TextAreaProps, TFieldValues>;
|
|
18
|
+
declare const TextAreaComponent: <TFieldValues extends FieldValues>(props: ControlledTextAreaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare const TextArea: typeof TextAreaComponent;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ControlledTextAreaProps, TextArea, TextAreaProps };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
|
+
import { UIConfig } from "../config/uiConfig.context.js";
|
|
3
|
+
import { FieldController } from "./inputs/shared/form.binding.js";
|
|
4
|
+
import { FormFieldLabel } from "./inputs/FormField/FormFieldLabel.js";
|
|
5
|
+
import { FormField } from "./form-field.js";
|
|
6
|
+
import { inputSideDefinition, inputSizeDefinition, useInputCva } from "./inputs/shared/input.cva.js";
|
|
7
|
+
import { InputClear } from "./inputs/shared/InputClear.js";
|
|
8
|
+
import { TooltipWrapper } from "./inputs/shared/TooltipWrapper.js";
|
|
9
|
+
import { textAreaWrapperDefinition } from "./inputs/Input/TextArea/TextArea.cva.js";
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { memo, useRef } from "react";
|
|
12
|
+
import { TextArea as TextArea$1 } from "react-aria-components";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { useTextField } from "react-aria";
|
|
15
|
+
import { mergeRefs } from "@react-aria/utils";
|
|
16
|
+
//#region src/components/inputs/Input/TextArea/TextArea.tsx
|
|
17
|
+
const TextAreaBase = (props) => {
|
|
18
|
+
const ui = UIConfig.useConfig();
|
|
19
|
+
const inputCva = useInputCva();
|
|
20
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
21
|
+
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
22
|
+
const textAreaWrapperCva = UIOverrides.useCva("textArea.wrapperCva", textAreaWrapperDefinition);
|
|
23
|
+
const { ref, className, inputClassName, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, value, onChange, onBlur, as: asProp, hideLabel: hideLabelProp, variant: variantProp, isClearable: isClearableProp, isClearableIfDisabled, ...rest } = props;
|
|
24
|
+
const as = asProp ?? ui.input.as;
|
|
25
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
26
|
+
const variant = variantProp ?? ui.input.variant;
|
|
27
|
+
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
28
|
+
const textFieldRef = useRef(null);
|
|
29
|
+
const textFieldProps = {
|
|
30
|
+
...rest,
|
|
31
|
+
label,
|
|
32
|
+
isDisabled,
|
|
33
|
+
isInvalid: !!error,
|
|
34
|
+
isRequired,
|
|
35
|
+
value,
|
|
36
|
+
onChange,
|
|
37
|
+
onBlur
|
|
38
|
+
};
|
|
39
|
+
const { labelProps, inputProps } = useTextField(textFieldProps, textFieldRef);
|
|
40
|
+
const formFieldProps = {
|
|
41
|
+
error,
|
|
42
|
+
label,
|
|
43
|
+
tooltipText,
|
|
44
|
+
helperText,
|
|
45
|
+
isRequired,
|
|
46
|
+
rightContent,
|
|
47
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
48
|
+
hideLabel,
|
|
49
|
+
isDisabled,
|
|
50
|
+
headerClassName,
|
|
51
|
+
errorClassName
|
|
52
|
+
};
|
|
53
|
+
const headerProps = {
|
|
54
|
+
label,
|
|
55
|
+
tooltipText,
|
|
56
|
+
helperText,
|
|
57
|
+
isRequired,
|
|
58
|
+
rightContent,
|
|
59
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
60
|
+
isDisabled,
|
|
61
|
+
className: headerClassName,
|
|
62
|
+
labelProps
|
|
63
|
+
};
|
|
64
|
+
const showClear = isClearable && value != null && value !== "" && (!isDisabled || isClearableIfDisabled === true);
|
|
65
|
+
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
66
|
+
as,
|
|
67
|
+
error,
|
|
68
|
+
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
69
|
+
children: /* @__PURE__ */ jsx(FormField, {
|
|
70
|
+
...formFieldProps,
|
|
71
|
+
as,
|
|
72
|
+
labelProps,
|
|
73
|
+
className: clsx("group w-full flex flex-col", className),
|
|
74
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
75
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
76
|
+
className: textAreaWrapperCva({}),
|
|
77
|
+
"data-text-area": true,
|
|
78
|
+
children: [
|
|
79
|
+
as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
80
|
+
as,
|
|
81
|
+
...headerProps,
|
|
82
|
+
className: clsx(headerProps.className, inputSideCva({
|
|
83
|
+
size: "default",
|
|
84
|
+
type: "left"
|
|
85
|
+
}))
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ jsx(TextArea$1, {
|
|
88
|
+
...inputProps,
|
|
89
|
+
"data-is-dirty": isDirty || void 0,
|
|
90
|
+
"data-is-required": isRequired || void 0,
|
|
91
|
+
"data-is-empty": value?.trim() === "" || value === null || value === void 0 || void 0,
|
|
92
|
+
placeholder: as === "floating" ? "" : inputProps.placeholder,
|
|
93
|
+
className: inputCva({
|
|
94
|
+
variant,
|
|
95
|
+
as,
|
|
96
|
+
...rest,
|
|
97
|
+
className: clsx("block h-full min-h-8", inputClassName)
|
|
98
|
+
}),
|
|
99
|
+
ref
|
|
100
|
+
}),
|
|
101
|
+
showClear && /* @__PURE__ */ jsx("span", {
|
|
102
|
+
className: clsx("absolute top-0 right-0", inputSizeCva({ size: "default" })),
|
|
103
|
+
children: /* @__PURE__ */ jsx(InputClear, {
|
|
104
|
+
onClear: () => {
|
|
105
|
+
onChange?.("");
|
|
106
|
+
onBlur?.(null);
|
|
107
|
+
},
|
|
108
|
+
show: true
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
const TextAreaComponent = (props) => {
|
|
117
|
+
if ("field" in props && props.field) {
|
|
118
|
+
const { field, ref, ...innerProps } = props;
|
|
119
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
120
|
+
control: field.form,
|
|
121
|
+
name: field.name,
|
|
122
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(TextAreaBase, {
|
|
123
|
+
...innerProps,
|
|
124
|
+
ref: mergeRefs(ref, field.ref),
|
|
125
|
+
value: field.value ?? "",
|
|
126
|
+
onChange: field.onChange,
|
|
127
|
+
onBlur: field.onBlur,
|
|
128
|
+
isDirty,
|
|
129
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
130
|
+
error: props.error ?? error?.message
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return /* @__PURE__ */ jsx(TextAreaBase, { ...props });
|
|
135
|
+
};
|
|
136
|
+
const TextArea = memo(TextAreaComponent);
|
|
137
|
+
//#endregion
|
|
138
|
+
export { TextArea };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LinkNavigationProps } from "./link.js";
|
|
2
|
+
import { ButtonVariantProps } from "./buttons/Button/button.cva.js";
|
|
3
|
+
import { ButtonContentVariantProps } from "./buttons/shared/buttonContent.cva.js";
|
|
4
|
+
import { ButtonIconProps } from "./buttons/Button/Button.js";
|
|
5
|
+
import { ReactNode } from "react";
|
|
6
|
+
import { ButtonProps } from "react-aria-components";
|
|
7
|
+
//#region src/components/buttons/TextButton/TextButton.d.ts
|
|
8
|
+
type TextButtonProps = Omit<ButtonVariantProps, "variant"> & ButtonContentVariantProps & ButtonProps & ButtonIconProps<true | false> & {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
link?: LinkNavigationProps;
|
|
12
|
+
};
|
|
13
|
+
declare const TextButton: ({ children, ...props }: TextButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { TextButton, TextButtonProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button } from "
|
|
1
|
+
import { Button } from "./buttons/Button/Button.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/buttons/TextButton/TextButton.tsx
|
|
5
|
-
|
|
5
|
+
const TextButton = (t0) => {
|
|
6
6
|
const $ = c(7);
|
|
7
7
|
let children;
|
|
8
8
|
let props;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FieldValues } from "./inputs/shared/form.binding.js";
|
|
2
|
+
import { ControlProps } from "./inputs/shared/form.types.js";
|
|
3
|
+
import { InputVariantProps } from "./inputs/shared/input.cva.js";
|
|
4
|
+
import { InputContentProps } from "./inputs/Input/shared/InputContent.js";
|
|
5
|
+
import { FormFieldProps } from "./form-field.js";
|
|
6
|
+
import { Ref } from "react";
|
|
7
|
+
import { InputProps } from "react-aria-components";
|
|
8
|
+
import { AriaTextFieldProps } from "react-aria";
|
|
9
|
+
//#region src/components/inputs/Input/TextInput/TextInput.d.ts
|
|
10
|
+
type AllowedHTMLInputTypeAttribute = "email" | "hidden" | "tel" | "text" | "url";
|
|
11
|
+
interface TextInputBaseProps extends FormFieldProps, InputVariantProps, Omit<InputContentProps, "ref" | "value" | "onChange" | "onBlur">, Omit<InputProps, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "type" | "size" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLInputElement>, "label"> {
|
|
12
|
+
ref?: Ref<HTMLInputElement>;
|
|
13
|
+
inputClassName?: string;
|
|
14
|
+
type?: AllowedHTMLInputTypeAttribute;
|
|
15
|
+
todayIcon?: boolean;
|
|
16
|
+
isDirty?: boolean;
|
|
17
|
+
autoFocusOnMount?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface TextInputProps extends TextInputBaseProps {
|
|
20
|
+
renderStaticInput?: boolean;
|
|
21
|
+
}
|
|
22
|
+
type ControlledTextInputProps<TFieldValues extends Record<string, unknown>> = ControlProps<TextInputProps, TFieldValues>;
|
|
23
|
+
/** @internal Exported for production render benchmarks. */
|
|
24
|
+
declare const TextInputComponent: <TFieldValues extends FieldValues>({ renderStaticInput, ...props }: ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare const TextInput: typeof TextInputComponent;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ControlledTextInputProps, TextInput, TextInputComponent, TextInputProps };
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
|
+
import { UIConfig } from "../config/uiConfig.context.js";
|
|
3
|
+
import { FieldController } from "./inputs/shared/form.binding.js";
|
|
4
|
+
import { FormField } from "./form-field.js";
|
|
5
|
+
import { inputBaseDefinition } from "./inputs/shared/input.cva.js";
|
|
6
|
+
import { TooltipWrapper } from "./inputs/shared/TooltipWrapper.js";
|
|
7
|
+
import { InputFrame } from "./inputs/Skeleton/InputFrame.js";
|
|
8
|
+
import { useStaticInputHandoff } from "./inputs/shared/useStaticInputHandoff.js";
|
|
9
|
+
import { InputContent } from "./inputs/Input/shared/InputContent.js";
|
|
10
|
+
import { useFieldAccessibility } from "./inputs/shared/useFieldAccessibility.js";
|
|
11
|
+
import { clsx } from "clsx";
|
|
12
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
13
|
+
import { Input } from "react-aria-components";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
import { useFocusVisible, useTextField } from "react-aria";
|
|
16
|
+
import { mergeRefs } from "@react-aria/utils";
|
|
17
|
+
//#region src/components/inputs/Input/TextInput/TextInput.tsx
|
|
18
|
+
const TextInputBase = (props) => {
|
|
19
|
+
"use no memo";
|
|
20
|
+
const ui = UIConfig.useConfig();
|
|
21
|
+
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
22
|
+
const inputRef = useRef(null);
|
|
23
|
+
const { ref, inputClassName, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, as: asProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, autoFocusOnMount, ...rest } = props;
|
|
24
|
+
const as = asProp ?? ui.input.as;
|
|
25
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
26
|
+
const variant = variantProp ?? ui.input.variant;
|
|
27
|
+
const size = sizeProp ?? ui.input.size;
|
|
28
|
+
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
29
|
+
const { isFocusVisible } = useFocusVisible();
|
|
30
|
+
const inputValue = value ?? "";
|
|
31
|
+
const textFieldRef = useRef(null);
|
|
32
|
+
const textFieldProps = {
|
|
33
|
+
...rest,
|
|
34
|
+
label,
|
|
35
|
+
isDisabled,
|
|
36
|
+
isInvalid: !!error,
|
|
37
|
+
isRequired,
|
|
38
|
+
value: inputValue,
|
|
39
|
+
onChange,
|
|
40
|
+
onBlur
|
|
41
|
+
};
|
|
42
|
+
const { labelProps, inputProps } = useTextField(textFieldProps, textFieldRef);
|
|
43
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
44
|
+
describedBy: inputProps["aria-describedby"],
|
|
45
|
+
error,
|
|
46
|
+
helperText
|
|
47
|
+
});
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (!autoFocusOnMount || isDisabled) return;
|
|
50
|
+
requestAnimationFrame(() => inputRef.current?.focus());
|
|
51
|
+
}, [autoFocusOnMount, isDisabled]);
|
|
52
|
+
const formFieldProps = {
|
|
53
|
+
errorMessageId,
|
|
54
|
+
error,
|
|
55
|
+
label,
|
|
56
|
+
tooltipText,
|
|
57
|
+
helperText,
|
|
58
|
+
helperTextId,
|
|
59
|
+
isRequired,
|
|
60
|
+
rightContent,
|
|
61
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
62
|
+
hideLabel,
|
|
63
|
+
isDisabled,
|
|
64
|
+
headerClassName,
|
|
65
|
+
errorClassName
|
|
66
|
+
};
|
|
67
|
+
const inputContentProps = {
|
|
68
|
+
unit,
|
|
69
|
+
isLoading,
|
|
70
|
+
isDisabled,
|
|
71
|
+
action,
|
|
72
|
+
leadingIcon,
|
|
73
|
+
trailingIcon,
|
|
74
|
+
isClearable,
|
|
75
|
+
isClearableIfDisabled,
|
|
76
|
+
value: inputValue,
|
|
77
|
+
onChange,
|
|
78
|
+
onBlur
|
|
79
|
+
};
|
|
80
|
+
const headerProps = {
|
|
81
|
+
label,
|
|
82
|
+
tooltipText,
|
|
83
|
+
helperText,
|
|
84
|
+
isRequired,
|
|
85
|
+
rightContent,
|
|
86
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
87
|
+
isDisabled,
|
|
88
|
+
className: headerClassName,
|
|
89
|
+
labelProps
|
|
90
|
+
};
|
|
91
|
+
const dataIsDisabled = isDisabled || void 0;
|
|
92
|
+
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
93
|
+
as,
|
|
94
|
+
error,
|
|
95
|
+
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
96
|
+
children: /* @__PURE__ */ jsx(FormField, {
|
|
97
|
+
...formFieldProps,
|
|
98
|
+
as,
|
|
99
|
+
labelProps,
|
|
100
|
+
className: clsx("group w-full", as === "inline" && "h-full", className),
|
|
101
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
102
|
+
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
103
|
+
"data-is-required": isRequired || void 0,
|
|
104
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
105
|
+
className: clsx("relative flex cursor-text has-disabled:cursor-default", inputBaseCva({
|
|
106
|
+
variant,
|
|
107
|
+
as,
|
|
108
|
+
...rest
|
|
109
|
+
}), inputClassName),
|
|
110
|
+
onClick: () => inputRef.current?.focus(),
|
|
111
|
+
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
112
|
+
"data-is-required": isRequired || void 0,
|
|
113
|
+
"data-is-disabled": dataIsDisabled,
|
|
114
|
+
children: /* @__PURE__ */ jsx(InputContent, {
|
|
115
|
+
...inputContentProps,
|
|
116
|
+
headerProps,
|
|
117
|
+
as,
|
|
118
|
+
size,
|
|
119
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
120
|
+
...inputProps,
|
|
121
|
+
"aria-describedby": describedBy,
|
|
122
|
+
"aria-errormessage": errorMessageId,
|
|
123
|
+
ref: mergeRefs(ref, inputRef),
|
|
124
|
+
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
125
|
+
"data-is-filled": !(value === "" || value === null || value === void 0) || void 0,
|
|
126
|
+
"data-is-dirty": isDirty || void 0,
|
|
127
|
+
"data-is-required": isRequired || void 0,
|
|
128
|
+
"data-is-disabled": dataIsDisabled,
|
|
129
|
+
placeholder: as === "floating" ? "\xA0" : inputProps.placeholder,
|
|
130
|
+
className: "w-full bg-transparent outline-none",
|
|
131
|
+
onFocus: (e) => {
|
|
132
|
+
inputProps.onFocus?.(e);
|
|
133
|
+
if (isFocusVisible) e.target.select();
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
const TextInputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
142
|
+
"use no memo";
|
|
143
|
+
const ui = UIConfig.useConfig();
|
|
144
|
+
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
145
|
+
const inputRef = useRef(null);
|
|
146
|
+
const { shouldFocus, renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff({
|
|
147
|
+
inputRef,
|
|
148
|
+
renderInput,
|
|
149
|
+
setRenderInput,
|
|
150
|
+
getPressTarget: (input) => {
|
|
151
|
+
let element = input;
|
|
152
|
+
for (let depth = 0; element && depth < 6; depth += 1) {
|
|
153
|
+
const action = element.querySelector("[data-static-press-action]");
|
|
154
|
+
if (action) return action;
|
|
155
|
+
element = element.parentElement;
|
|
156
|
+
}
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
if (!renderInput) {
|
|
161
|
+
const staticValue = props.value ?? props.defaultValue ?? "";
|
|
162
|
+
const inputType = props.type;
|
|
163
|
+
const as = props.as ?? ui.input.as;
|
|
164
|
+
let isDisabled = !!props.isDisabled;
|
|
165
|
+
if (isFormControlDisabled) isDisabled = true;
|
|
166
|
+
const maskedPasswordValue = inputType === "password" && `${staticValue}`.length > 0 ? "•".repeat(`${staticValue}`.length) : staticValue;
|
|
167
|
+
const displayValue = maskedPasswordValue == null ? "" : `${maskedPasswordValue}`;
|
|
168
|
+
const hasValue = displayValue !== "";
|
|
169
|
+
const dataAttributes = {
|
|
170
|
+
dataIsEmpty: !hasValue,
|
|
171
|
+
dataIsFilled: hasValue,
|
|
172
|
+
dataIsDirty: props.isDirty,
|
|
173
|
+
dataIsRequired: props.isRequired,
|
|
174
|
+
dataIsDisabled: isDisabled,
|
|
175
|
+
dataDisabled: isDisabled,
|
|
176
|
+
dataInvalid: !!props.error,
|
|
177
|
+
dataHasSelection: hasValue
|
|
178
|
+
};
|
|
179
|
+
return /* @__PURE__ */ jsx(InputFrame, {
|
|
180
|
+
...props,
|
|
181
|
+
isDisabled,
|
|
182
|
+
className: clsx("group w-full", as === "inline" && "h-full", props.className),
|
|
183
|
+
dataAttributes,
|
|
184
|
+
onStaticInteract: renderRealInput,
|
|
185
|
+
onStaticPress: props.action ? replayStaticInputPress : void 0,
|
|
186
|
+
staticPressTarget: "action",
|
|
187
|
+
inputClassName: props.inputClassName,
|
|
188
|
+
contentClassName: clsx(as === "inline" && "h-full", "pr-0!"),
|
|
189
|
+
trailingClassName: "py-0! pl-0!",
|
|
190
|
+
wrapContentAndTrailing: true,
|
|
191
|
+
reserveTrailingContent: true,
|
|
192
|
+
children: (dataAttributeProps) => /* @__PURE__ */ jsx("input", {
|
|
193
|
+
ref: inputRef,
|
|
194
|
+
type: inputType === "hidden" ? "password" : inputType,
|
|
195
|
+
disabled: isDisabled,
|
|
196
|
+
tabIndex: -1,
|
|
197
|
+
value: displayValue,
|
|
198
|
+
placeholder: as === "floating" ? "" : props.placeholder,
|
|
199
|
+
className: "w-full bg-transparent outline-none",
|
|
200
|
+
onChange: (event) => replayStaticInputChange(event.target.value),
|
|
201
|
+
...dataAttributeProps,
|
|
202
|
+
"data-rac": true
|
|
203
|
+
})
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return /* @__PURE__ */ jsx(TextInputBase, {
|
|
207
|
+
...props,
|
|
208
|
+
ref: mergeRefs(props.ref, inputRef),
|
|
209
|
+
autoFocusOnMount: shouldFocus
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
/** @internal Exported for production render benchmarks. */
|
|
213
|
+
const TextInputComponent = ({ renderStaticInput, ...props }) => {
|
|
214
|
+
"use no memo";
|
|
215
|
+
if ("field" in props && props.field) {
|
|
216
|
+
const { field, ref, ...innerProps } = props;
|
|
217
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
218
|
+
control: field.form,
|
|
219
|
+
name: field.name,
|
|
220
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(TextInputInner, {
|
|
221
|
+
...innerProps,
|
|
222
|
+
ref: mergeRefs(ref, field.ref),
|
|
223
|
+
value: field.value,
|
|
224
|
+
onChange: field.onChange,
|
|
225
|
+
onBlur: field.onBlur,
|
|
226
|
+
isDirty,
|
|
227
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
228
|
+
isFormControlDisabled: field.disabled,
|
|
229
|
+
error: props.error ?? error?.message,
|
|
230
|
+
renderStaticInput
|
|
231
|
+
})
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
return /* @__PURE__ */ jsx(TextInputInner, {
|
|
235
|
+
...props,
|
|
236
|
+
renderStaticInput
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
const TextInput = memo(TextInputComponent);
|
|
240
|
+
//#endregion
|
|
241
|
+
export { TextInput, TextInputComponent };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToastVariantProps } from "./status/Toast/toast.cva.js";
|
|
2
|
+
import { FC, ReactNode, SVGProps } from "react";
|
|
3
|
+
//#region src/components/status/Toast/Toast.d.ts
|
|
4
|
+
interface ToastAction {
|
|
5
|
+
text: string;
|
|
6
|
+
onPress: () => void;
|
|
7
|
+
}
|
|
8
|
+
interface ToastProps extends ToastVariantProps {
|
|
9
|
+
text: ReactNode;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
12
|
+
actions?: ToastAction[];
|
|
13
|
+
}
|
|
14
|
+
declare const Toast: ({ text, isLoading, actions, icon: Icon, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const ToastContainer: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Toast, ToastAction, ToastContainer, ToastProps };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { UIOverrides } from "
|
|
2
|
-
import { Typography } from "
|
|
3
|
-
import { Loader } from "
|
|
4
|
-
import { UIConfig } from "
|
|
5
|
-
import { Button } from "
|
|
6
|
-
import { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition, toastContainerDefinition, toastDefinition, toastWrapper } from "./toast.cva.js";
|
|
1
|
+
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
|
+
import { Typography } from "./typography.js";
|
|
3
|
+
import { Loader } from "./loader.js";
|
|
4
|
+
import { UIConfig } from "../config/uiConfig.context.js";
|
|
5
|
+
import { Button } from "./buttons/Button/Button.js";
|
|
6
|
+
import { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition, toastContainerDefinition, toastDefinition, toastWrapper } from "./status/Toast/toast.cva.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { ToastContainer } from "react-toastify";
|
|
9
|
+
import { ToastContainer as ToastContainer$1 } from "react-toastify";
|
|
10
10
|
//#region src/components/status/Toast/Toast.tsx
|
|
11
|
-
|
|
11
|
+
const Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) => {
|
|
12
12
|
const uiConfig = UIConfig.useConfig();
|
|
13
13
|
const { variant = uiConfig.toast.variant, ...restProps } = props;
|
|
14
14
|
const toastCva = UIOverrides.useCva("toast.cva", toastDefinition);
|
|
@@ -47,7 +47,7 @@ var Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) =>
|
|
|
47
47
|
})] })]
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
const ToastContainer = () => {
|
|
51
51
|
const $ = c(6);
|
|
52
52
|
const uiConfig = UIConfig.useConfig();
|
|
53
53
|
const containerCva = UIOverrides.useCva("toast.containerCva", toastContainerDefinition);
|
|
@@ -63,7 +63,7 @@ var ToastContainer$1 = () => {
|
|
|
63
63
|
} else t0 = $[2];
|
|
64
64
|
let t1;
|
|
65
65
|
if ($[3] !== t0 || $[4] !== uiConfig.toast.position) {
|
|
66
|
-
t1 = /* @__PURE__ */ jsx(ToastContainer, {
|
|
66
|
+
t1 = /* @__PURE__ */ jsx(ToastContainer$1, {
|
|
67
67
|
position: uiConfig.toast.position,
|
|
68
68
|
className: t0,
|
|
69
69
|
toastClassName: toastWrapper,
|
|
@@ -79,4 +79,4 @@ var ToastContainer$1 = () => {
|
|
|
79
79
|
return t1;
|
|
80
80
|
};
|
|
81
81
|
//#endregion
|
|
82
|
-
export { Toast, ToastContainer
|
|
82
|
+
export { Toast, ToastContainer };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonVariantProps } from "./buttons/Button/button.cva.js";
|
|
2
|
+
import { ButtonContentVariantProps } from "./buttons/shared/buttonContent.cva.js";
|
|
3
|
+
import { ButtonIconProps } from "./buttons/Button/Button.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import { ToggleButtonProps as ToggleButtonProps$1 } from "react-aria-components";
|
|
6
|
+
//#region src/components/buttons/ToggleButton/ToggleButton.d.ts
|
|
7
|
+
type ToggleButtonProps = ButtonVariantProps & ButtonContentVariantProps & ToggleButtonProps$1 & ButtonIconProps<true | false> & {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const ToggleButton: ({ children, ...props }: ToggleButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ToggleButton, ToggleButtonProps };
|