@povio/ui 3.1.0 → 3.2.0
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 +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +102 -39
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/Button/button.cva.d.ts +3 -3
- 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 +55 -17
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- 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 +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +342 -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 +233 -98
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
- 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 +211 -65
- 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 +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -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 +41 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +91 -46
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/index.d.ts +1 -1
- 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 +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
- 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 +25 -5
- 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 +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
- 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 +574 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
- package/dist/components/inputs/Input/shared/InputContent.js +193 -59
- 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 +353 -61
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +227 -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 +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
- 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 +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -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 +83 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +612 -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 +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- 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 +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- 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 +28 -0
- package/dist/components/inputs/shared/input.cva.js +38 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- 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/ResponsivePopover/ResponsivePopover.js +85 -28
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +28 -14
- package/dist/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- 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 +30 -11
- package/dist/config/uiOverrides.context.js +54 -14
- package/dist/helpers/dynamicInputs.d.ts +12 -9
- package/dist/helpers/dynamicInputs.js +13 -8
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +72 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +18 -3
- package/dist/index.js +15 -5
- 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/zod.utils.d.ts +2 -0
- package/dist/utils/zod.utils.js +5 -0
- package/package.json +2 -2
|
@@ -2,6 +2,7 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
4
4
|
import { FormField } from "../FormField/FormField.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
import { Slider, SliderThumb, SliderTrack } from "react-aria-components";
|
|
@@ -9,88 +10,276 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
9
10
|
import { Controller } from "react-hook-form";
|
|
10
11
|
//#region src/components/inputs/Slider/Slider.tsx
|
|
11
12
|
var SliderBase = (props) => {
|
|
13
|
+
const $ = c(61);
|
|
12
14
|
const ui = UIConfig.useConfig();
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
15
|
+
let T0;
|
|
16
|
+
let formFieldProps;
|
|
17
|
+
let getTrackFillStyle;
|
|
18
|
+
let isDisabled;
|
|
19
|
+
let maxValue;
|
|
20
|
+
let minValue;
|
|
21
|
+
let onBlur;
|
|
22
|
+
let t0;
|
|
23
|
+
let t1;
|
|
24
|
+
let t2;
|
|
25
|
+
let t3;
|
|
26
|
+
let t4;
|
|
27
|
+
let t5;
|
|
28
|
+
let unit;
|
|
29
|
+
if ($[0] !== props || $[1] !== ui) {
|
|
30
|
+
const { label, tooltipText, helperText, isRequired, rightContent, isDisabled: t6, headerClassName, errorClassName, isHeaderHidden, error, unit: t7, hideLabel: hideLabelProp, minValue: minValueProp, maxValue: maxValueProp, onBlur: t8, ...rest } = props;
|
|
31
|
+
isDisabled = t6;
|
|
32
|
+
unit = t7;
|
|
33
|
+
onBlur = t8;
|
|
34
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
35
|
+
minValue = minValueProp ?? ui.slider.minValue;
|
|
36
|
+
maxValue = maxValueProp ?? ui.slider.maxValue;
|
|
37
|
+
let t9;
|
|
38
|
+
if ($[16] !== error || $[17] !== errorClassName || $[18] !== headerClassName || $[19] !== helperText || $[20] !== hideLabel || $[21] !== isDisabled || $[22] !== isHeaderHidden || $[23] !== isRequired || $[24] !== label || $[25] !== rightContent || $[26] !== tooltipText) {
|
|
39
|
+
t9 = {
|
|
40
|
+
error,
|
|
41
|
+
label,
|
|
42
|
+
tooltipText,
|
|
43
|
+
helperText,
|
|
44
|
+
isRequired,
|
|
45
|
+
rightContent,
|
|
46
|
+
isHeaderHidden,
|
|
47
|
+
hideLabel,
|
|
48
|
+
isDisabled,
|
|
49
|
+
headerClassName,
|
|
50
|
+
errorClassName
|
|
51
|
+
};
|
|
52
|
+
$[16] = error;
|
|
53
|
+
$[17] = errorClassName;
|
|
54
|
+
$[18] = headerClassName;
|
|
55
|
+
$[19] = helperText;
|
|
56
|
+
$[20] = hideLabel;
|
|
57
|
+
$[21] = isDisabled;
|
|
58
|
+
$[22] = isHeaderHidden;
|
|
59
|
+
$[23] = isRequired;
|
|
60
|
+
$[24] = label;
|
|
61
|
+
$[25] = rightContent;
|
|
62
|
+
$[26] = tooltipText;
|
|
63
|
+
$[27] = t9;
|
|
64
|
+
} else t9 = $[27];
|
|
65
|
+
formFieldProps = t9;
|
|
66
|
+
let t10;
|
|
67
|
+
if ($[28] !== minValue || $[29] !== props.defaultValue || $[30] !== props.isRange) {
|
|
68
|
+
t10 = props.defaultValue ?? (props.isRange ? [minValue, minValue] : minValue);
|
|
69
|
+
$[28] = minValue;
|
|
70
|
+
$[29] = props.defaultValue;
|
|
71
|
+
$[30] = props.isRange;
|
|
72
|
+
$[31] = t10;
|
|
73
|
+
} else t10 = $[31];
|
|
74
|
+
const defaultValue = t10;
|
|
75
|
+
let t11;
|
|
76
|
+
if ($[32] !== props.isRange) {
|
|
77
|
+
t11 = (state) => {
|
|
78
|
+
const p0 = state.getThumbPercent(0);
|
|
79
|
+
const p1 = state.getThumbPercent(1);
|
|
80
|
+
return {
|
|
81
|
+
left: props.isRange ? `${p0 * 100}%` : 0,
|
|
82
|
+
width: props.isRange ? `${(p1 - p0) * 100}%` : `${p0 * 100}%`
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
$[32] = props.isRange;
|
|
86
|
+
$[33] = t11;
|
|
87
|
+
} else t11 = $[33];
|
|
88
|
+
getTrackFillStyle = t11;
|
|
89
|
+
T0 = Slider;
|
|
90
|
+
t0 = rest;
|
|
91
|
+
t1 = defaultValue;
|
|
92
|
+
t2 = minValue;
|
|
93
|
+
t3 = maxValue;
|
|
94
|
+
t4 = isDisabled;
|
|
95
|
+
t5 = clsx("group", rest.className);
|
|
96
|
+
$[0] = props;
|
|
97
|
+
$[1] = ui;
|
|
98
|
+
$[2] = T0;
|
|
99
|
+
$[3] = formFieldProps;
|
|
100
|
+
$[4] = getTrackFillStyle;
|
|
101
|
+
$[5] = isDisabled;
|
|
102
|
+
$[6] = maxValue;
|
|
103
|
+
$[7] = minValue;
|
|
104
|
+
$[8] = onBlur;
|
|
105
|
+
$[9] = t0;
|
|
106
|
+
$[10] = t1;
|
|
107
|
+
$[11] = t2;
|
|
108
|
+
$[12] = t3;
|
|
109
|
+
$[13] = t4;
|
|
110
|
+
$[14] = t5;
|
|
111
|
+
$[15] = unit;
|
|
112
|
+
} else {
|
|
113
|
+
T0 = $[2];
|
|
114
|
+
formFieldProps = $[3];
|
|
115
|
+
getTrackFillStyle = $[4];
|
|
116
|
+
isDisabled = $[5];
|
|
117
|
+
maxValue = $[6];
|
|
118
|
+
minValue = $[7];
|
|
119
|
+
onBlur = $[8];
|
|
120
|
+
t0 = $[9];
|
|
121
|
+
t1 = $[10];
|
|
122
|
+
t2 = $[11];
|
|
123
|
+
t3 = $[12];
|
|
124
|
+
t4 = $[13];
|
|
125
|
+
t5 = $[14];
|
|
126
|
+
unit = $[15];
|
|
127
|
+
}
|
|
128
|
+
let t6;
|
|
129
|
+
if ($[34] !== minValue || $[35] !== unit) {
|
|
130
|
+
t6 = /* @__PURE__ */ jsxs(Typography, {
|
|
131
|
+
className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
|
|
132
|
+
size: "label-2",
|
|
133
|
+
children: [minValue, unit]
|
|
134
|
+
});
|
|
135
|
+
$[34] = minValue;
|
|
136
|
+
$[35] = unit;
|
|
137
|
+
$[36] = t6;
|
|
138
|
+
} else t6 = $[36];
|
|
139
|
+
let t7;
|
|
140
|
+
if ($[37] !== getTrackFillStyle || $[38] !== isDisabled || $[39] !== onBlur || $[40] !== props.isDisabled) {
|
|
141
|
+
t7 = /* @__PURE__ */ jsx(SliderTrack, {
|
|
142
|
+
className: "relative mx-2 h-6 w-full",
|
|
143
|
+
children: (t8) => {
|
|
144
|
+
const { state: state_0 } = t8;
|
|
145
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
146
|
+
className: "absolute top-1/2 h-1 w-full -translate-y-1/2 overflow-hidden rounded-full bg-elevation-outline-default-1",
|
|
147
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
148
|
+
className: clsx("absolute top-0 h-1 rounded-full", props.isDisabled ? "bg-interactive-contained-primary-disabled" : "bg-interactive-contained-primary-idle"),
|
|
149
|
+
style: getTrackFillStyle(state_0)
|
|
71
150
|
})
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
151
|
+
}), state_0.values.map((_, i) => /* @__PURE__ */ jsx(SliderThumb, {
|
|
152
|
+
index: i,
|
|
153
|
+
className: clsx("absolute top-1/2 size-4 cursor-pointer rounded-full bg-interactive-contained-primary-idle disabled:cursor-default", "dragging:bg-interactive-contained-primary-pressed hover:bg-interactive-contained-primary-hover focus-visible:outline-interactive-contained-primary-focus disabled:bg-interactive-contained-primary-disabled", uiOutlineClass),
|
|
154
|
+
isDisabled,
|
|
155
|
+
onBlur: (event) => onBlur?.({ target: event.target })
|
|
156
|
+
}, i))] });
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
$[37] = getTrackFillStyle;
|
|
160
|
+
$[38] = isDisabled;
|
|
161
|
+
$[39] = onBlur;
|
|
162
|
+
$[40] = props.isDisabled;
|
|
163
|
+
$[41] = t7;
|
|
164
|
+
} else t7 = $[41];
|
|
165
|
+
let t8;
|
|
166
|
+
if ($[42] !== maxValue || $[43] !== unit) {
|
|
167
|
+
t8 = /* @__PURE__ */ jsxs(Typography, {
|
|
168
|
+
className: "min-w-10 px-slider-side-leading-and-trailing py-slider-height-leading-and-trailing text-text-default-3",
|
|
169
|
+
size: "label-2",
|
|
170
|
+
children: [maxValue, unit]
|
|
171
|
+
});
|
|
172
|
+
$[42] = maxValue;
|
|
173
|
+
$[43] = unit;
|
|
174
|
+
$[44] = t8;
|
|
175
|
+
} else t8 = $[44];
|
|
176
|
+
let t9;
|
|
177
|
+
if ($[45] !== t6 || $[46] !== t7 || $[47] !== t8) {
|
|
178
|
+
t9 = /* @__PURE__ */ jsxs("div", {
|
|
179
|
+
className: "flex items-center justify-between",
|
|
180
|
+
children: [
|
|
181
|
+
t6,
|
|
182
|
+
t7,
|
|
183
|
+
t8
|
|
184
|
+
]
|
|
185
|
+
});
|
|
186
|
+
$[45] = t6;
|
|
187
|
+
$[46] = t7;
|
|
188
|
+
$[47] = t8;
|
|
189
|
+
$[48] = t9;
|
|
190
|
+
} else t9 = $[48];
|
|
191
|
+
let t10;
|
|
192
|
+
if ($[49] !== formFieldProps || $[50] !== t9) {
|
|
193
|
+
t10 = /* @__PURE__ */ jsx(FormField, {
|
|
194
|
+
...formFieldProps,
|
|
195
|
+
children: t9
|
|
196
|
+
});
|
|
197
|
+
$[49] = formFieldProps;
|
|
198
|
+
$[50] = t9;
|
|
199
|
+
$[51] = t10;
|
|
200
|
+
} else t10 = $[51];
|
|
201
|
+
let t11;
|
|
202
|
+
if ($[52] !== T0 || $[53] !== t0 || $[54] !== t1 || $[55] !== t10 || $[56] !== t2 || $[57] !== t3 || $[58] !== t4 || $[59] !== t5) {
|
|
203
|
+
t11 = /* @__PURE__ */ jsx(T0, {
|
|
204
|
+
...t0,
|
|
205
|
+
defaultValue: t1,
|
|
206
|
+
minValue: t2,
|
|
207
|
+
maxValue: t3,
|
|
208
|
+
isDisabled: t4,
|
|
209
|
+
className: t5,
|
|
210
|
+
children: t10
|
|
211
|
+
});
|
|
212
|
+
$[52] = T0;
|
|
213
|
+
$[53] = t0;
|
|
214
|
+
$[54] = t1;
|
|
215
|
+
$[55] = t10;
|
|
216
|
+
$[56] = t2;
|
|
217
|
+
$[57] = t3;
|
|
218
|
+
$[58] = t4;
|
|
219
|
+
$[59] = t5;
|
|
220
|
+
$[60] = t11;
|
|
221
|
+
} else t11 = $[60];
|
|
222
|
+
return t11;
|
|
76
223
|
};
|
|
77
224
|
var Slider$1 = (props) => {
|
|
225
|
+
const $ = c(15);
|
|
78
226
|
if ("formControl" in props && props.formControl) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
227
|
+
let formControl;
|
|
228
|
+
let innerProps;
|
|
229
|
+
let ref;
|
|
230
|
+
if ($[0] !== props) {
|
|
231
|
+
({formControl, ref, ...innerProps} = props);
|
|
232
|
+
$[0] = props;
|
|
233
|
+
$[1] = formControl;
|
|
234
|
+
$[2] = innerProps;
|
|
235
|
+
$[3] = ref;
|
|
236
|
+
} else {
|
|
237
|
+
formControl = $[1];
|
|
238
|
+
innerProps = $[2];
|
|
239
|
+
ref = $[3];
|
|
240
|
+
}
|
|
241
|
+
let t0;
|
|
242
|
+
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
243
|
+
t0 = (t1) => {
|
|
244
|
+
const { field, fieldState: t2 } = t1;
|
|
245
|
+
const { error } = t2;
|
|
246
|
+
return /* @__PURE__ */ jsx(SliderBase, {
|
|
247
|
+
...innerProps,
|
|
248
|
+
ref: mergeRefs(ref, field.ref),
|
|
249
|
+
value: field.value,
|
|
250
|
+
onBlur: field.onBlur,
|
|
251
|
+
onChange: field.onChange,
|
|
252
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
253
|
+
error: props.error ?? error?.message
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
$[4] = innerProps;
|
|
257
|
+
$[5] = props.error;
|
|
258
|
+
$[6] = props.isDisabled;
|
|
259
|
+
$[7] = ref;
|
|
260
|
+
$[8] = t0;
|
|
261
|
+
} else t0 = $[8];
|
|
262
|
+
let t1;
|
|
263
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
264
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
265
|
+
control: formControl.control,
|
|
266
|
+
name: formControl.name,
|
|
267
|
+
render: t0
|
|
268
|
+
});
|
|
269
|
+
$[9] = formControl.control;
|
|
270
|
+
$[10] = formControl.name;
|
|
271
|
+
$[11] = t0;
|
|
272
|
+
$[12] = t1;
|
|
273
|
+
} else t1 = $[12];
|
|
274
|
+
return t1;
|
|
92
275
|
}
|
|
93
|
-
|
|
276
|
+
let t0;
|
|
277
|
+
if ($[13] !== props) {
|
|
278
|
+
t0 = /* @__PURE__ */ jsx(SliderBase, { ...props });
|
|
279
|
+
$[13] = props;
|
|
280
|
+
$[14] = t0;
|
|
281
|
+
} else t0 = $[14];
|
|
282
|
+
return t0;
|
|
94
283
|
};
|
|
95
284
|
//#endregion
|
|
96
285
|
export { Slider$1 as Slider };
|
|
@@ -15,6 +15,7 @@ export interface TextEditorBaseProps extends FormFieldProps {
|
|
|
15
15
|
onBlur?: () => void;
|
|
16
16
|
as?: "default" | "filter" | "floating" | "inline" | null;
|
|
17
17
|
editorClassName?: string;
|
|
18
|
+
isDirty?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export type TextEditorProps = TextEditorBaseProps;
|
|
20
21
|
export type ControlledTextEditorProps<TFieldValues extends FieldValues> = ControlProps<TextEditorProps, TFieldValues>;
|