@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
|
@@ -1,21 +1,60 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
3
|
+
import { tooltipWrapperTriggerDefinition } from "./tooltipWrapper.cva.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
2
5
|
import { jsx } from "react/jsx-runtime";
|
|
3
6
|
//#region src/components/inputs/shared/TooltipWrapper.tsx
|
|
4
7
|
var TooltipWrapper = (props) => {
|
|
8
|
+
const $ = c(14);
|
|
9
|
+
const tooltipWrapperTriggerCva = UIOverrides.useCva("tooltipWrapper.triggerCva", tooltipWrapperTriggerDefinition);
|
|
5
10
|
if (props.as !== "inline") return props.children;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const t0 = props.error || void 0;
|
|
12
|
+
const t1 = !props.error;
|
|
13
|
+
let t2;
|
|
14
|
+
if ($[0] !== props.triggerClassName || $[1] !== tooltipWrapperTriggerCva) {
|
|
15
|
+
t2 = tooltipWrapperTriggerCva({ className: props.triggerClassName });
|
|
16
|
+
$[0] = props.triggerClassName;
|
|
17
|
+
$[1] = tooltipWrapperTriggerCva;
|
|
18
|
+
$[2] = t2;
|
|
19
|
+
} else t2 = $[2];
|
|
20
|
+
const t3 = props.triggerTabIndex;
|
|
21
|
+
let t4;
|
|
22
|
+
if ($[3] !== tooltipWrapperTriggerCva) {
|
|
23
|
+
t4 = tooltipWrapperTriggerCva({});
|
|
24
|
+
$[3] = tooltipWrapperTriggerCva;
|
|
25
|
+
$[4] = t4;
|
|
26
|
+
} else t4 = $[4];
|
|
27
|
+
let t5;
|
|
28
|
+
if ($[5] !== props.children || $[6] !== t4) {
|
|
29
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
15
30
|
tabIndex: -1,
|
|
31
|
+
className: t4,
|
|
16
32
|
children: props.children
|
|
17
|
-
})
|
|
18
|
-
|
|
33
|
+
});
|
|
34
|
+
$[5] = props.children;
|
|
35
|
+
$[6] = t4;
|
|
36
|
+
$[7] = t5;
|
|
37
|
+
} else t5 = $[7];
|
|
38
|
+
let t6;
|
|
39
|
+
if ($[8] !== props.triggerTabIndex || $[9] !== t0 || $[10] !== t1 || $[11] !== t2 || $[12] !== t5) {
|
|
40
|
+
t6 = /* @__PURE__ */ jsx(Tooltip, {
|
|
41
|
+
text: t0,
|
|
42
|
+
placement: "bottom",
|
|
43
|
+
color: "error",
|
|
44
|
+
hidden: t1,
|
|
45
|
+
isNonInteractiveTrigger: true,
|
|
46
|
+
triggerClassName: t2,
|
|
47
|
+
triggerTabIndex: t3,
|
|
48
|
+
children: t5
|
|
49
|
+
});
|
|
50
|
+
$[8] = props.triggerTabIndex;
|
|
51
|
+
$[9] = t0;
|
|
52
|
+
$[10] = t1;
|
|
53
|
+
$[11] = t2;
|
|
54
|
+
$[12] = t5;
|
|
55
|
+
$[13] = t6;
|
|
56
|
+
} else t6 = $[13];
|
|
57
|
+
return t6;
|
|
19
58
|
};
|
|
20
59
|
//#endregion
|
|
21
60
|
export { TooltipWrapper };
|
|
@@ -38,6 +38,34 @@ export declare const inputSizeDefinition: {
|
|
|
38
38
|
export type InputSizeConfig = NonNullable<typeof inputSizeDefinition.config>;
|
|
39
39
|
export interface InputSizeProps extends UIOverrides.VariantProps<InputSizeConfig> {
|
|
40
40
|
}
|
|
41
|
+
export declare const inputContentWrapperDefinition: {
|
|
42
|
+
base: string[];
|
|
43
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
44
|
+
readonly as: {
|
|
45
|
+
readonly default: "";
|
|
46
|
+
readonly floating: "flex-col";
|
|
47
|
+
readonly filter: "gap-input-gap-input-text-to-elements";
|
|
48
|
+
readonly inline: "";
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
export type InputContentWrapperConfig = NonNullable<typeof inputContentWrapperDefinition.config>;
|
|
53
|
+
export interface InputContentWrapperProps extends UIOverrides.VariantProps<InputContentWrapperConfig> {
|
|
54
|
+
}
|
|
55
|
+
export declare const inputClearClassDefinition: {
|
|
56
|
+
base: string[];
|
|
57
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
58
|
+
readonly as: {
|
|
59
|
+
readonly default: "";
|
|
60
|
+
readonly floating: "";
|
|
61
|
+
readonly filter: "";
|
|
62
|
+
readonly inline: "";
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
};
|
|
66
|
+
export type InputClearClassConfig = NonNullable<typeof inputClearClassDefinition.config>;
|
|
67
|
+
export interface InputClearClassProps extends UIOverrides.VariantProps<InputClearClassConfig> {
|
|
68
|
+
}
|
|
41
69
|
export declare const inputSideDefinition: {
|
|
42
70
|
base: string[];
|
|
43
71
|
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { clsx } from "clsx";
|
|
4
5
|
//#region src/components/inputs/shared/input.cva.ts
|
|
5
6
|
var inputBaseDefinition = UIOverrides.defineConfig({
|
|
@@ -208,6 +209,30 @@ var inputSizeDefinition = UIOverrides.defineConfig({
|
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
});
|
|
212
|
+
var inputContentWrapperDefinition = UIOverrides.defineConfig({
|
|
213
|
+
base: ["flex w-full"],
|
|
214
|
+
config: {
|
|
215
|
+
variants: { as: {
|
|
216
|
+
default: "",
|
|
217
|
+
floating: "flex-col",
|
|
218
|
+
filter: "gap-input-gap-input-text-to-elements",
|
|
219
|
+
inline: ""
|
|
220
|
+
} },
|
|
221
|
+
defaultVariants: { as: "default" }
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
var inputClearClassDefinition = UIOverrides.defineConfig({
|
|
225
|
+
base: [""],
|
|
226
|
+
config: {
|
|
227
|
+
variants: { as: {
|
|
228
|
+
default: "",
|
|
229
|
+
floating: "",
|
|
230
|
+
filter: "",
|
|
231
|
+
inline: ""
|
|
232
|
+
} },
|
|
233
|
+
defaultVariants: { as: "default" }
|
|
234
|
+
}
|
|
235
|
+
});
|
|
211
236
|
var inputSideDefinition = UIOverrides.defineConfig({
|
|
212
237
|
base: [""],
|
|
213
238
|
config: {
|
|
@@ -290,11 +315,20 @@ var inputSideDefinition = UIOverrides.defineConfig({
|
|
|
290
315
|
}
|
|
291
316
|
});
|
|
292
317
|
var useInputCva = () => {
|
|
318
|
+
const $ = c(3);
|
|
293
319
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
294
320
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
321
|
+
let t0;
|
|
322
|
+
if ($[0] !== inputBaseCva || $[1] !== inputSizeCva) {
|
|
323
|
+
t0 = (t1) => {
|
|
324
|
+
const { className, ...rest } = t1;
|
|
325
|
+
return clsx(inputBaseCva(rest), inputSizeCva(rest), className);
|
|
326
|
+
};
|
|
327
|
+
$[0] = inputBaseCva;
|
|
328
|
+
$[1] = inputSizeCva;
|
|
329
|
+
$[2] = t0;
|
|
330
|
+
} else t0 = $[2];
|
|
331
|
+
return t0;
|
|
298
332
|
};
|
|
299
333
|
//#endregion
|
|
300
|
-
export { inputBaseDefinition, inputSideDefinition, inputSizeDefinition, useInputCva };
|
|
334
|
+
export { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, useInputCva };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const tooltipWrapperTriggerDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config?: import("../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
5
|
+
};
|
|
6
|
+
export type TooltipWrapperTriggerConfig = NonNullable<typeof tooltipWrapperTriggerDefinition.config>;
|
|
7
|
+
export interface TooltipWrapperTriggerVariantProps extends UIOverrides.VariantProps<TooltipWrapperTriggerConfig> {
|
|
8
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
//#region src/components/inputs/shared/tooltipWrapper.cva.ts
|
|
3
|
+
var tooltipWrapperTriggerDefinition = UIOverrides.defineConfig({ base: ["inline-flex"] });
|
|
4
|
+
//#endregion
|
|
5
|
+
export { tooltipWrapperTriggerDefinition };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Dispatch, RefObject, SetStateAction } from 'react';
|
|
2
|
+
interface StaticInputHandoffOptions<TElement extends HTMLElement> {
|
|
3
|
+
inputRef: RefObject<TElement | null>;
|
|
4
|
+
renderInput: boolean;
|
|
5
|
+
setRenderInput: Dispatch<SetStateAction<boolean>>;
|
|
6
|
+
getFocusTarget?: (element: TElement, staticTarget: EventTarget | null) => HTMLElement | null | undefined;
|
|
7
|
+
getPressTarget?: (element: TElement) => HTMLElement | null | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const useStaticInputHandoff: <TElement extends HTMLElement = HTMLInputElement>({ inputRef, renderInput, setRenderInput, getFocusTarget, getPressTarget, }: StaticInputHandoffOptions<TElement>) => {
|
|
10
|
+
shouldFocus: boolean;
|
|
11
|
+
renderRealInput: (focus: boolean, target?: EventTarget | null) => void;
|
|
12
|
+
replayStaticInputChange: (value: string) => void;
|
|
13
|
+
replayStaticInputPress: () => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
//#region src/components/inputs/shared/useStaticInputHandoff.ts
|
|
4
|
+
var useStaticInputHandoff = (t0) => {
|
|
5
|
+
const $ = c(16);
|
|
6
|
+
const { inputRef, renderInput, setRenderInput, getFocusTarget, getPressTarget } = t0;
|
|
7
|
+
const [shouldFocus, setShouldFocus] = useState(false);
|
|
8
|
+
const pendingStaticChangeRef = useRef(null);
|
|
9
|
+
const pendingStaticFocusTargetRef = useRef(null);
|
|
10
|
+
const resolvedFocusTargetRef = useRef(null);
|
|
11
|
+
const shouldReplayStaticPressRef = useRef(false);
|
|
12
|
+
let t1;
|
|
13
|
+
let t2;
|
|
14
|
+
if ($[0] !== getFocusTarget || $[1] !== getPressTarget || $[2] !== inputRef || $[3] !== renderInput || $[4] !== shouldFocus) {
|
|
15
|
+
t1 = () => {
|
|
16
|
+
if (!renderInput || !shouldFocus) return;
|
|
17
|
+
const focusRealInput = (replayPendingInteraction) => {
|
|
18
|
+
const input = inputRef.current;
|
|
19
|
+
const pendingValue = pendingStaticChangeRef.current;
|
|
20
|
+
let focusTarget = null;
|
|
21
|
+
if (!replayPendingInteraction && resolvedFocusTargetRef.current) focusTarget = resolvedFocusTargetRef.current;
|
|
22
|
+
else if (input) focusTarget = getFocusTarget?.(input, pendingStaticFocusTargetRef.current) ?? input;
|
|
23
|
+
if (replayPendingInteraction) resolvedFocusTargetRef.current = focusTarget;
|
|
24
|
+
if (replayPendingInteraction && focusTarget instanceof HTMLInputElement && pendingValue != null) {
|
|
25
|
+
(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set)?.call(focusTarget, pendingValue);
|
|
26
|
+
focusTarget.dispatchEvent(new Event("input", { bubbles: true }));
|
|
27
|
+
pendingStaticChangeRef.current = null;
|
|
28
|
+
}
|
|
29
|
+
focusTarget?.focus();
|
|
30
|
+
if (!replayPendingInteraction) {
|
|
31
|
+
pendingStaticFocusTargetRef.current = null;
|
|
32
|
+
resolvedFocusTargetRef.current = null;
|
|
33
|
+
}
|
|
34
|
+
if (replayPendingInteraction && shouldReplayStaticPressRef.current) {
|
|
35
|
+
shouldReplayStaticPressRef.current = false;
|
|
36
|
+
(input ? getPressTarget?.(input) ?? focusTarget : focusTarget)?.click();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
focusRealInput(true);
|
|
40
|
+
const frame = requestAnimationFrame(() => {
|
|
41
|
+
focusRealInput(false);
|
|
42
|
+
setShouldFocus(false);
|
|
43
|
+
});
|
|
44
|
+
return () => {
|
|
45
|
+
cancelAnimationFrame(frame);
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
t2 = [
|
|
49
|
+
getFocusTarget,
|
|
50
|
+
getPressTarget,
|
|
51
|
+
inputRef,
|
|
52
|
+
renderInput,
|
|
53
|
+
shouldFocus
|
|
54
|
+
];
|
|
55
|
+
$[0] = getFocusTarget;
|
|
56
|
+
$[1] = getPressTarget;
|
|
57
|
+
$[2] = inputRef;
|
|
58
|
+
$[3] = renderInput;
|
|
59
|
+
$[4] = shouldFocus;
|
|
60
|
+
$[5] = t1;
|
|
61
|
+
$[6] = t2;
|
|
62
|
+
} else {
|
|
63
|
+
t1 = $[5];
|
|
64
|
+
t2 = $[6];
|
|
65
|
+
}
|
|
66
|
+
useLayoutEffect(t1, t2);
|
|
67
|
+
let t3;
|
|
68
|
+
let t4;
|
|
69
|
+
let t5;
|
|
70
|
+
if ($[7] !== setRenderInput) {
|
|
71
|
+
t3 = (focus, target) => {
|
|
72
|
+
pendingStaticFocusTargetRef.current = target ?? null;
|
|
73
|
+
setShouldFocus(focus);
|
|
74
|
+
setRenderInput(true);
|
|
75
|
+
};
|
|
76
|
+
t4 = (value) => {
|
|
77
|
+
pendingStaticChangeRef.current = value;
|
|
78
|
+
setShouldFocus(true);
|
|
79
|
+
setRenderInput(true);
|
|
80
|
+
};
|
|
81
|
+
t5 = () => {
|
|
82
|
+
shouldReplayStaticPressRef.current = true;
|
|
83
|
+
setShouldFocus(true);
|
|
84
|
+
setRenderInput(true);
|
|
85
|
+
};
|
|
86
|
+
$[7] = setRenderInput;
|
|
87
|
+
$[8] = t3;
|
|
88
|
+
$[9] = t4;
|
|
89
|
+
$[10] = t5;
|
|
90
|
+
} else {
|
|
91
|
+
t3 = $[8];
|
|
92
|
+
t4 = $[9];
|
|
93
|
+
t5 = $[10];
|
|
94
|
+
}
|
|
95
|
+
let t6;
|
|
96
|
+
if ($[11] !== shouldFocus || $[12] !== t3 || $[13] !== t4 || $[14] !== t5) {
|
|
97
|
+
t6 = {
|
|
98
|
+
shouldFocus,
|
|
99
|
+
renderRealInput: t3,
|
|
100
|
+
replayStaticInputChange: t4,
|
|
101
|
+
replayStaticInputPress: t5
|
|
102
|
+
};
|
|
103
|
+
$[11] = shouldFocus;
|
|
104
|
+
$[12] = t3;
|
|
105
|
+
$[13] = t4;
|
|
106
|
+
$[14] = t5;
|
|
107
|
+
$[15] = t6;
|
|
108
|
+
} else t6 = $[15];
|
|
109
|
+
return t6;
|
|
110
|
+
};
|
|
111
|
+
//#endregion
|
|
112
|
+
export { useStaticInputHandoff };
|
|
@@ -1,34 +1,81 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { accordionDefinition } from "./accordion.cva.js";
|
|
3
3
|
import { AccordionItem } from "./AccordionItem.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { clsx } from "clsx";
|
|
6
7
|
import { DisclosureGroup } from "react-aria-components";
|
|
7
8
|
//#region src/components/navigation/Accordion/Accordion.tsx
|
|
8
|
-
var Accordion = (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
var Accordion = (t0) => {
|
|
10
|
+
const $ = c(23);
|
|
11
|
+
const { items, variant: t1, actionPosition: t2, allowsMultipleExpanded: t3, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled } = t0;
|
|
12
|
+
const variant = t1 === void 0 ? "filled" : t1;
|
|
13
|
+
const actionPosition = t2 === void 0 ? "right" : t2;
|
|
14
|
+
const allowsMultipleExpanded = t3 === void 0 ? false : t3;
|
|
15
|
+
const accordionCva = UIOverrides.useCva("accordion.cva", accordionDefinition);
|
|
16
|
+
const t4 = items.length === 1;
|
|
17
|
+
let t5;
|
|
18
|
+
if ($[0] !== accordionCva || $[1] !== className || $[2] !== t4 || $[3] !== variant) {
|
|
19
|
+
t5 = clsx(accordionCva({
|
|
15
20
|
className,
|
|
16
21
|
variant,
|
|
17
|
-
singleItem:
|
|
18
|
-
}))
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
singleItem: t4
|
|
23
|
+
}));
|
|
24
|
+
$[0] = accordionCva;
|
|
25
|
+
$[1] = className;
|
|
26
|
+
$[2] = t4;
|
|
27
|
+
$[3] = variant;
|
|
28
|
+
$[4] = t5;
|
|
29
|
+
} else t5 = $[4];
|
|
30
|
+
let t6;
|
|
31
|
+
if ($[5] !== actionPosition || $[6] !== disabled || $[7] !== items || $[8] !== variant) {
|
|
32
|
+
let t7;
|
|
33
|
+
if ($[10] !== actionPosition || $[11] !== disabled || $[12] !== items.length || $[13] !== variant) {
|
|
34
|
+
t7 = (item) => /* @__PURE__ */ jsx(AccordionItem, {
|
|
35
|
+
id: item.id,
|
|
36
|
+
heading: item.heading,
|
|
37
|
+
subheading: item.subheading,
|
|
38
|
+
icon: item.icon,
|
|
39
|
+
variant,
|
|
40
|
+
actionPosition,
|
|
41
|
+
disabled: item.disabled || disabled,
|
|
42
|
+
isSingle: items.length === 1,
|
|
43
|
+
children: item.children
|
|
44
|
+
}, item.id);
|
|
45
|
+
$[10] = actionPosition;
|
|
46
|
+
$[11] = disabled;
|
|
47
|
+
$[12] = items.length;
|
|
48
|
+
$[13] = variant;
|
|
49
|
+
$[14] = t7;
|
|
50
|
+
} else t7 = $[14];
|
|
51
|
+
t6 = items.map(t7);
|
|
52
|
+
$[5] = actionPosition;
|
|
53
|
+
$[6] = disabled;
|
|
54
|
+
$[7] = items;
|
|
55
|
+
$[8] = variant;
|
|
56
|
+
$[9] = t6;
|
|
57
|
+
} else t6 = $[9];
|
|
58
|
+
let t7;
|
|
59
|
+
if ($[15] !== allowsMultipleExpanded || $[16] !== defaultExpandedKeys || $[17] !== disabled || $[18] !== expandedKeys || $[19] !== onExpandedChange || $[20] !== t5 || $[21] !== t6) {
|
|
60
|
+
t7 = /* @__PURE__ */ jsx(DisclosureGroup, {
|
|
61
|
+
allowsMultipleExpanded,
|
|
62
|
+
expandedKeys,
|
|
63
|
+
defaultExpandedKeys,
|
|
64
|
+
onExpandedChange,
|
|
65
|
+
className: t5,
|
|
66
|
+
isDisabled: disabled,
|
|
67
|
+
children: t6
|
|
68
|
+
});
|
|
69
|
+
$[15] = allowsMultipleExpanded;
|
|
70
|
+
$[16] = defaultExpandedKeys;
|
|
71
|
+
$[17] = disabled;
|
|
72
|
+
$[18] = expandedKeys;
|
|
73
|
+
$[19] = onExpandedChange;
|
|
74
|
+
$[20] = t5;
|
|
75
|
+
$[21] = t6;
|
|
76
|
+
$[22] = t7;
|
|
77
|
+
} else t7 = $[22];
|
|
78
|
+
return t7;
|
|
32
79
|
};
|
|
33
80
|
//#endregion
|
|
34
81
|
export { Accordion };
|
|
@@ -2,10 +2,15 @@ import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
|
|
|
2
2
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
3
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
4
4
|
import { accordionChevronDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition } from "./accordion.cva.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Button, Disclosure, DisclosurePanel, Heading } from "react-aria-components";
|
|
7
8
|
//#region src/components/navigation/Accordion/AccordionItem.tsx
|
|
8
|
-
var AccordionItem = (
|
|
9
|
+
var AccordionItem = (t0) => {
|
|
10
|
+
const $ = c(25);
|
|
11
|
+
const { id, disabled, heading, subheading, children, icon: Icon, variant: t1, actionPosition: t2, isSingle } = t0;
|
|
12
|
+
const variant = t1 === void 0 ? "filled" : t1;
|
|
13
|
+
const actionPosition = t2 === void 0 ? "right" : t2;
|
|
9
14
|
const itemCva = UIOverrides.useCva("accordion.itemCva", accordionItemDefinition);
|
|
10
15
|
const triggerCva = UIOverrides.useCva("accordion.triggerCva", accordionTriggerDefinition);
|
|
11
16
|
const headingCva = UIOverrides.useCva("accordion.headingCva", accordionHeadingDefinition);
|
|
@@ -15,49 +20,89 @@ var AccordionItem = ({ id, disabled, heading, subheading, children, icon: Icon,
|
|
|
15
20
|
const iconCva = UIOverrides.useCva("accordion.iconCva", accordionIconDefinition);
|
|
16
21
|
const panelCva = UIOverrides.useCva("accordion.panelCva", accordionPanelDefinition);
|
|
17
22
|
const panelContentCva = UIOverrides.useCva("accordion.panelContentCva", accordionPanelContentDefinition);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
let t3;
|
|
24
|
+
if ($[0] !== isSingle || $[1] !== itemCva || $[2] !== variant) {
|
|
25
|
+
t3 = itemCva({
|
|
21
26
|
variant,
|
|
22
27
|
singleItem: isSingle
|
|
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
|
-
|
|
28
|
+
});
|
|
29
|
+
$[0] = isSingle;
|
|
30
|
+
$[1] = itemCva;
|
|
31
|
+
$[2] = variant;
|
|
32
|
+
$[3] = t3;
|
|
33
|
+
} else t3 = $[3];
|
|
34
|
+
let t4;
|
|
35
|
+
if ($[4] !== Icon || $[5] !== actionPosition || $[6] !== chevronCva || $[7] !== children || $[8] !== disabled || $[9] !== heading || $[10] !== headingCva || $[11] !== headingSubtitleCva || $[12] !== headingTitleCva || $[13] !== iconCva || $[14] !== panelContentCva || $[15] !== panelCva || $[16] !== subheading || $[17] !== triggerCva || $[18] !== variant) {
|
|
36
|
+
t4 = (t5) => {
|
|
37
|
+
const { isExpanded } = t5;
|
|
38
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Heading, { children: /* @__PURE__ */ jsxs(Button, {
|
|
39
|
+
slot: "trigger",
|
|
40
|
+
className: triggerCva({
|
|
41
|
+
variant,
|
|
42
|
+
actionPosition,
|
|
43
|
+
disabled
|
|
44
|
+
}),
|
|
45
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: headingCva({}),
|
|
47
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "flex flex-1 items-center gap-accordion-gap-icon-to-text",
|
|
49
|
+
children: [
|
|
50
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({}) }),
|
|
51
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
52
|
+
size: "label-2",
|
|
53
|
+
variant: "default",
|
|
54
|
+
className: headingTitleCva({}),
|
|
55
|
+
children: heading
|
|
56
|
+
}),
|
|
57
|
+
subheading && /* @__PURE__ */ jsx(Typography, {
|
|
58
|
+
size: "label-3",
|
|
59
|
+
variant: "default",
|
|
60
|
+
className: headingSubtitleCva({}),
|
|
61
|
+
children: subheading
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, { className: chevronCva({ isExpanded }) })]
|
|
66
|
+
}) }), /* @__PURE__ */ jsx(DisclosurePanel, {
|
|
67
|
+
className: panelCva({ isExpanded }),
|
|
68
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
69
|
+
className: panelContentCva({}),
|
|
70
|
+
children
|
|
51
71
|
})
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
})] });
|
|
73
|
+
};
|
|
74
|
+
$[4] = Icon;
|
|
75
|
+
$[5] = actionPosition;
|
|
76
|
+
$[6] = chevronCva;
|
|
77
|
+
$[7] = children;
|
|
78
|
+
$[8] = disabled;
|
|
79
|
+
$[9] = heading;
|
|
80
|
+
$[10] = headingCva;
|
|
81
|
+
$[11] = headingSubtitleCva;
|
|
82
|
+
$[12] = headingTitleCva;
|
|
83
|
+
$[13] = iconCva;
|
|
84
|
+
$[14] = panelContentCva;
|
|
85
|
+
$[15] = panelCva;
|
|
86
|
+
$[16] = subheading;
|
|
87
|
+
$[17] = triggerCva;
|
|
88
|
+
$[18] = variant;
|
|
89
|
+
$[19] = t4;
|
|
90
|
+
} else t4 = $[19];
|
|
91
|
+
let t5;
|
|
92
|
+
if ($[20] !== disabled || $[21] !== id || $[22] !== t3 || $[23] !== t4) {
|
|
93
|
+
t5 = /* @__PURE__ */ jsx(Disclosure, {
|
|
94
|
+
id,
|
|
95
|
+
className: t3,
|
|
96
|
+
isDisabled: disabled,
|
|
97
|
+
children: t4
|
|
98
|
+
});
|
|
99
|
+
$[20] = disabled;
|
|
100
|
+
$[21] = id;
|
|
101
|
+
$[22] = t3;
|
|
102
|
+
$[23] = t4;
|
|
103
|
+
$[24] = t5;
|
|
104
|
+
} else t5 = $[24];
|
|
105
|
+
return t5;
|
|
61
106
|
};
|
|
62
107
|
//#endregion
|
|
63
108
|
export { AccordionItem };
|
|
@@ -2,33 +2,78 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { stepperDefinition } from "./stepper.cva.js";
|
|
3
3
|
import { StepperItem } from "./StepperItem.js";
|
|
4
4
|
import { StepperSeparator } from "./StepperSeparator.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Fragment as Fragment$1 } from "react";
|
|
7
8
|
//#region src/components/navigation/Stepper/Stepper.tsx
|
|
8
|
-
var Stepper = (
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
var Stepper = (t0) => {
|
|
10
|
+
const $ = c(23);
|
|
11
|
+
const { steps, currentStep, orientation: t1, contentOrientation: t2, iconsOnly, titlesOnly, onStepClick, className } = t0;
|
|
12
|
+
const orientation = t1 === void 0 ? "horizontal" : t1;
|
|
13
|
+
const contentOrientation = t2 === void 0 ? "horizontal" : t2;
|
|
14
|
+
const stepperCva = UIOverrides.useCva("stepper.cva", stepperDefinition);
|
|
15
|
+
let t3;
|
|
16
|
+
if ($[0] !== className || $[1] !== orientation || $[2] !== stepperCva) {
|
|
17
|
+
t3 = stepperCva({
|
|
11
18
|
orientation,
|
|
12
19
|
className
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
});
|
|
21
|
+
$[0] = className;
|
|
22
|
+
$[1] = orientation;
|
|
23
|
+
$[2] = stepperCva;
|
|
24
|
+
$[3] = t3;
|
|
25
|
+
} else t3 = $[3];
|
|
26
|
+
let t4;
|
|
27
|
+
if ($[4] !== contentOrientation || $[5] !== currentStep || $[6] !== iconsOnly || $[7] !== onStepClick || $[8] !== orientation || $[9] !== steps || $[10] !== titlesOnly) {
|
|
28
|
+
let t5;
|
|
29
|
+
if ($[12] !== contentOrientation || $[13] !== currentStep || $[14] !== iconsOnly || $[15] !== onStepClick || $[16] !== orientation || $[17] !== steps.length || $[18] !== titlesOnly) {
|
|
30
|
+
t5 = (step, index) => {
|
|
31
|
+
const status = index < currentStep ? "completed" : index === currentStep ? "active" : "todo";
|
|
32
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StepperItem, {
|
|
33
|
+
step,
|
|
34
|
+
stepNumber: index + 1,
|
|
35
|
+
status,
|
|
36
|
+
contentOrientation,
|
|
37
|
+
iconsOnly,
|
|
38
|
+
titlesOnly,
|
|
39
|
+
onPress: onStepClick && status === "completed" ? () => onStepClick(index) : void 0
|
|
40
|
+
}), index < steps.length - 1 && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
41
|
+
orientation,
|
|
42
|
+
contentOrientation
|
|
43
|
+
})] }, step.id);
|
|
44
|
+
};
|
|
45
|
+
$[12] = contentOrientation;
|
|
46
|
+
$[13] = currentStep;
|
|
47
|
+
$[14] = iconsOnly;
|
|
48
|
+
$[15] = onStepClick;
|
|
49
|
+
$[16] = orientation;
|
|
50
|
+
$[17] = steps.length;
|
|
51
|
+
$[18] = titlesOnly;
|
|
52
|
+
$[19] = t5;
|
|
53
|
+
} else t5 = $[19];
|
|
54
|
+
t4 = steps.map(t5);
|
|
55
|
+
$[4] = contentOrientation;
|
|
56
|
+
$[5] = currentStep;
|
|
57
|
+
$[6] = iconsOnly;
|
|
58
|
+
$[7] = onStepClick;
|
|
59
|
+
$[8] = orientation;
|
|
60
|
+
$[9] = steps;
|
|
61
|
+
$[10] = titlesOnly;
|
|
62
|
+
$[11] = t4;
|
|
63
|
+
} else t4 = $[11];
|
|
64
|
+
let t5;
|
|
65
|
+
if ($[20] !== t3 || $[21] !== t4) {
|
|
66
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: t3,
|
|
68
|
+
role: "group",
|
|
69
|
+
"aria-label": "Progress",
|
|
70
|
+
children: t4
|
|
71
|
+
});
|
|
72
|
+
$[20] = t3;
|
|
73
|
+
$[21] = t4;
|
|
74
|
+
$[22] = t5;
|
|
75
|
+
} else t5 = $[22];
|
|
76
|
+
return t5;
|
|
32
77
|
};
|
|
33
78
|
//#endregion
|
|
34
79
|
export { Stepper };
|