@povio/ui 3.1.1 → 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/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/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 +87 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +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/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/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/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 +19 -0
- 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 +17 -2
- package/dist/index.js +14 -4
- 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,14 +1,48 @@
|
|
|
1
1
|
import { MenuPopover } from "./MenuPopover.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { MenuTrigger } from "react-aria-components";
|
|
4
5
|
//#region src/components/Menu/MenuDesktop.tsx
|
|
5
|
-
var MenuDesktop = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
var MenuDesktop = (t0) => {
|
|
7
|
+
const $ = c(12);
|
|
8
|
+
let items;
|
|
9
|
+
let onAction;
|
|
10
|
+
let props;
|
|
11
|
+
let trigger;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({trigger, items, onAction, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = items;
|
|
16
|
+
$[2] = onAction;
|
|
17
|
+
$[3] = props;
|
|
18
|
+
$[4] = trigger;
|
|
19
|
+
} else {
|
|
20
|
+
items = $[1];
|
|
21
|
+
onAction = $[2];
|
|
22
|
+
props = $[3];
|
|
23
|
+
trigger = $[4];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[5] !== items || $[6] !== onAction || $[7] !== props) {
|
|
27
|
+
t1 = /* @__PURE__ */ jsx(MenuPopover, {
|
|
28
|
+
...props,
|
|
29
|
+
offset: 0,
|
|
30
|
+
items,
|
|
31
|
+
onAction
|
|
32
|
+
});
|
|
33
|
+
$[5] = items;
|
|
34
|
+
$[6] = onAction;
|
|
35
|
+
$[7] = props;
|
|
36
|
+
$[8] = t1;
|
|
37
|
+
} else t1 = $[8];
|
|
38
|
+
let t2;
|
|
39
|
+
if ($[9] !== t1 || $[10] !== trigger) {
|
|
40
|
+
t2 = /* @__PURE__ */ jsxs(MenuTrigger, { children: [trigger, t1] });
|
|
41
|
+
$[9] = t1;
|
|
42
|
+
$[10] = trigger;
|
|
43
|
+
$[11] = t2;
|
|
44
|
+
} else t2 = $[11];
|
|
45
|
+
return t2;
|
|
12
46
|
};
|
|
13
47
|
//#endregion
|
|
14
48
|
export { MenuDesktop };
|
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
import { ArrowRightIcon } from "../../assets/icons/ArrowRight.js";
|
|
2
2
|
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
3
3
|
import { menuItemDefinition } from "./menu.cva.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { clsx } from "clsx";
|
|
6
7
|
import { MenuItem } from "react-aria-components";
|
|
7
8
|
//#region src/components/Menu/MenuItem.tsx
|
|
8
|
-
var MenuItem$1 = (
|
|
9
|
+
var MenuItem$1 = (t0) => {
|
|
10
|
+
const $ = c(9);
|
|
11
|
+
const { label, content, children, className, ...item } = t0;
|
|
9
12
|
const hasSubmenu = !!children && children?.length > 0;
|
|
10
13
|
const menuItemCva = UIOverrides.useCva("menu.itemCva", menuItemDefinition);
|
|
11
|
-
|
|
14
|
+
const T0 = MenuItem;
|
|
15
|
+
const t1 = clsx(menuItemCva({
|
|
12
16
|
...item,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
isMobile: false
|
|
18
|
+
}), className);
|
|
19
|
+
const t2 = content ?? label;
|
|
20
|
+
let t3;
|
|
21
|
+
if ($[0] !== hasSubmenu) {
|
|
22
|
+
t3 = hasSubmenu && /* @__PURE__ */ jsx(ArrowRightIcon, { className: "size-6" });
|
|
23
|
+
$[0] = hasSubmenu;
|
|
24
|
+
$[1] = t3;
|
|
25
|
+
} else t3 = $[1];
|
|
26
|
+
let t4;
|
|
27
|
+
if ($[2] !== T0 || $[3] !== item || $[4] !== label || $[5] !== t1 || $[6] !== t2 || $[7] !== t3) {
|
|
28
|
+
t4 = /* @__PURE__ */ jsxs(T0, {
|
|
16
29
|
...item,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
textValue: label,
|
|
31
|
+
"aria-label": label,
|
|
32
|
+
className: t1,
|
|
33
|
+
children: [t2, t3]
|
|
34
|
+
});
|
|
35
|
+
$[2] = T0;
|
|
36
|
+
$[3] = item;
|
|
37
|
+
$[4] = label;
|
|
38
|
+
$[5] = t1;
|
|
39
|
+
$[6] = t2;
|
|
40
|
+
$[7] = t3;
|
|
41
|
+
$[8] = t4;
|
|
42
|
+
} else t4 = $[8];
|
|
43
|
+
return t4;
|
|
21
44
|
};
|
|
22
45
|
//#endregion
|
|
23
46
|
export { MenuItem$1 as MenuItem };
|
|
@@ -3,50 +3,88 @@ import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
|
3
3
|
import { menuDefinition, menuItemDefinition } from "./menu.cva.js";
|
|
4
4
|
import { MenuItem as MenuItem$1 } from "./MenuItem.js";
|
|
5
5
|
import { BottomSheet } from "../overlays/BottomSheet/BottomSheet.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { clsx } from "clsx";
|
|
8
9
|
import { useRef, useState } from "react";
|
|
9
10
|
import { Button, Menu } from "react-aria-components";
|
|
10
11
|
//#region src/components/Menu/MenuMobile.tsx
|
|
11
|
-
var MenuMobile = (
|
|
12
|
+
var MenuMobile = (t0) => {
|
|
13
|
+
const $ = c(23);
|
|
14
|
+
let bottomSheetProps;
|
|
15
|
+
let items;
|
|
16
|
+
let onAction;
|
|
17
|
+
let props;
|
|
18
|
+
let trigger;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({trigger, items, onAction, bottomSheetProps, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = bottomSheetProps;
|
|
23
|
+
$[2] = items;
|
|
24
|
+
$[3] = onAction;
|
|
25
|
+
$[4] = props;
|
|
26
|
+
$[5] = trigger;
|
|
27
|
+
} else {
|
|
28
|
+
bottomSheetProps = $[1];
|
|
29
|
+
items = $[2];
|
|
30
|
+
onAction = $[3];
|
|
31
|
+
props = $[4];
|
|
32
|
+
trigger = $[5];
|
|
33
|
+
}
|
|
12
34
|
const menuItemCva = UIOverrides.useCva("menu.itemCva", menuItemDefinition);
|
|
13
35
|
const menuCva = UIOverrides.useCva("menu.cva", menuDefinition);
|
|
14
36
|
const activeItemRef = useRef(null);
|
|
15
|
-
|
|
37
|
+
let t1;
|
|
38
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
39
|
+
t1 = [];
|
|
40
|
+
$[6] = t1;
|
|
41
|
+
} else t1 = $[6];
|
|
42
|
+
const activeItemParentsRef = useRef(t1);
|
|
16
43
|
const lastEventRef = useRef(null);
|
|
17
44
|
const [isOpen, setIsOpen] = useState(false);
|
|
18
45
|
const [activeItem, setActiveItem] = useState(null);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
46
|
+
let t2;
|
|
47
|
+
if ($[7] !== onAction) {
|
|
48
|
+
t2 = (item) => {
|
|
49
|
+
if (!item.children) {
|
|
50
|
+
activeItemRef.current = null;
|
|
51
|
+
activeItemParentsRef.current = [];
|
|
52
|
+
setActiveItem(null);
|
|
53
|
+
setIsOpen(false);
|
|
54
|
+
item.onAction?.();
|
|
55
|
+
onAction?.(item.id, lastEventRef.current);
|
|
56
|
+
lastEventRef.current = null;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (activeItemRef.current) activeItemParentsRef.current.push(activeItemRef.current);
|
|
60
|
+
activeItemRef.current = item;
|
|
61
|
+
setActiveItem(activeItemRef.current);
|
|
62
|
+
};
|
|
63
|
+
$[7] = onAction;
|
|
64
|
+
$[8] = t2;
|
|
65
|
+
} else t2 = $[8];
|
|
66
|
+
const handleAction = t2;
|
|
67
|
+
let t3;
|
|
68
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
+
t3 = () => {
|
|
70
|
+
if (activeItemRef.current) return;
|
|
24
71
|
setIsOpen(false);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ jsx(BottomSheet, {
|
|
43
|
-
isDismissable: true,
|
|
44
|
-
hideHeader: true,
|
|
45
|
-
...bottomSheetProps,
|
|
46
|
-
isOpen,
|
|
47
|
-
onOpenChange: setIsOpen,
|
|
48
|
-
trigger,
|
|
49
|
-
children: () => /* @__PURE__ */ jsxs(Fragment, { children: [activeItem && /* @__PURE__ */ jsxs(Button, {
|
|
72
|
+
};
|
|
73
|
+
$[9] = t3;
|
|
74
|
+
} else t3 = $[9];
|
|
75
|
+
const onClose = t3;
|
|
76
|
+
let t4;
|
|
77
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
78
|
+
t4 = () => {
|
|
79
|
+
activeItemRef.current = activeItemParentsRef.current.pop() ?? null;
|
|
80
|
+
setActiveItem(activeItemRef.current);
|
|
81
|
+
};
|
|
82
|
+
$[10] = t4;
|
|
83
|
+
} else t4 = $[10];
|
|
84
|
+
const onBack = t4;
|
|
85
|
+
let t5;
|
|
86
|
+
if ($[11] !== activeItem || $[12] !== handleAction || $[13] !== items || $[14] !== menuCva || $[15] !== menuItemCva || $[16] !== props) {
|
|
87
|
+
t5 = () => /* @__PURE__ */ jsxs(Fragment, { children: [activeItem && /* @__PURE__ */ jsxs(Button, {
|
|
50
88
|
className: clsx(menuItemCva({
|
|
51
89
|
...props,
|
|
52
90
|
isMobile: true
|
|
@@ -57,8 +95,8 @@ var MenuMobile = ({ trigger, items, onAction, bottomSheetProps, ...props }) => {
|
|
|
57
95
|
onClickCapture: (e) => {
|
|
58
96
|
lastEventRef.current = e;
|
|
59
97
|
},
|
|
60
|
-
onKeyDownCapture: (
|
|
61
|
-
lastEventRef.current =
|
|
98
|
+
onKeyDownCapture: (e_0) => {
|
|
99
|
+
lastEventRef.current = e_0;
|
|
62
100
|
},
|
|
63
101
|
children: /* @__PURE__ */ jsx(Menu, {
|
|
64
102
|
autoFocus: true,
|
|
@@ -67,13 +105,38 @@ var MenuMobile = ({ trigger, items, onAction, bottomSheetProps, ...props }) => {
|
|
|
67
105
|
...props,
|
|
68
106
|
isMobile: true
|
|
69
107
|
}),
|
|
70
|
-
children: (activeItem?.children ?? items).map((
|
|
71
|
-
...
|
|
72
|
-
onAction: () => handleAction(
|
|
108
|
+
children: (activeItem?.children ?? items).map((item_0, index) => /* @__PURE__ */ jsx(MenuItem$1, {
|
|
109
|
+
...item_0,
|
|
110
|
+
onAction: () => handleAction(item_0)
|
|
73
111
|
}, index))
|
|
74
112
|
})
|
|
75
|
-
})] })
|
|
76
|
-
|
|
113
|
+
})] });
|
|
114
|
+
$[11] = activeItem;
|
|
115
|
+
$[12] = handleAction;
|
|
116
|
+
$[13] = items;
|
|
117
|
+
$[14] = menuCva;
|
|
118
|
+
$[15] = menuItemCva;
|
|
119
|
+
$[16] = props;
|
|
120
|
+
$[17] = t5;
|
|
121
|
+
} else t5 = $[17];
|
|
122
|
+
let t6;
|
|
123
|
+
if ($[18] !== bottomSheetProps || $[19] !== isOpen || $[20] !== t5 || $[21] !== trigger) {
|
|
124
|
+
t6 = /* @__PURE__ */ jsx(BottomSheet, {
|
|
125
|
+
isDismissable: true,
|
|
126
|
+
hideHeader: true,
|
|
127
|
+
...bottomSheetProps,
|
|
128
|
+
isOpen,
|
|
129
|
+
onOpenChange: setIsOpen,
|
|
130
|
+
trigger,
|
|
131
|
+
children: t5
|
|
132
|
+
});
|
|
133
|
+
$[18] = bottomSheetProps;
|
|
134
|
+
$[19] = isOpen;
|
|
135
|
+
$[20] = t5;
|
|
136
|
+
$[21] = trigger;
|
|
137
|
+
$[22] = t6;
|
|
138
|
+
} else t6 = $[22];
|
|
139
|
+
return t6;
|
|
77
140
|
};
|
|
78
141
|
//#endregion
|
|
79
142
|
export { MenuMobile };
|
|
@@ -1,45 +1,121 @@
|
|
|
1
1
|
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
import { menuDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition } from "./menu.cva.js";
|
|
3
3
|
import { MenuItem as MenuItem$1 } from "./MenuItem.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { useRef } from "react";
|
|
6
7
|
import { Menu, Popover, SubmenuTrigger } from "react-aria-components";
|
|
7
8
|
//#region src/components/Menu/MenuPopover.tsx
|
|
8
|
-
var MenuPopover = (
|
|
9
|
+
var MenuPopover = (t0) => {
|
|
10
|
+
const $ = c(28);
|
|
11
|
+
const { items, className, onAction, ...props } = t0;
|
|
9
12
|
const lastEventRef = useRef(null);
|
|
10
13
|
const menuPopoverCva = UIOverrides.useCva("menu.popoverCva", menuPopoverDefinition);
|
|
11
14
|
const menuPopoverWrapperCva = UIOverrides.useCva("menu.popoverWrapperCva", menuPopoverWrapperDefinition);
|
|
12
15
|
const menuCva = UIOverrides.useCva("menu.cva", menuDefinition);
|
|
13
|
-
|
|
16
|
+
const T0 = Popover;
|
|
17
|
+
const t1 = menuPopoverCva({
|
|
14
18
|
...props,
|
|
15
|
-
className
|
|
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
|
-
|
|
19
|
+
className
|
|
20
|
+
});
|
|
21
|
+
let t2;
|
|
22
|
+
if ($[0] !== menuPopoverWrapperCva) {
|
|
23
|
+
t2 = menuPopoverWrapperCva({});
|
|
24
|
+
$[0] = menuPopoverWrapperCva;
|
|
25
|
+
$[1] = t2;
|
|
26
|
+
} else t2 = $[1];
|
|
27
|
+
let t3;
|
|
28
|
+
let t4;
|
|
29
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
30
|
+
t3 = (e) => {
|
|
31
|
+
lastEventRef.current = e;
|
|
32
|
+
};
|
|
33
|
+
t4 = (e_0) => {
|
|
34
|
+
lastEventRef.current = e_0;
|
|
35
|
+
};
|
|
36
|
+
$[2] = t3;
|
|
37
|
+
$[3] = t4;
|
|
38
|
+
} else {
|
|
39
|
+
t3 = $[2];
|
|
40
|
+
t4 = $[3];
|
|
41
|
+
}
|
|
42
|
+
const T1 = Menu;
|
|
43
|
+
let t5;
|
|
44
|
+
if ($[4] !== onAction) {
|
|
45
|
+
t5 = (key) => onAction?.(key, lastEventRef.current);
|
|
46
|
+
$[4] = onAction;
|
|
47
|
+
$[5] = t5;
|
|
48
|
+
} else t5 = $[5];
|
|
49
|
+
const t6 = menuCva({
|
|
50
|
+
...props,
|
|
51
|
+
isMobile: false
|
|
42
52
|
});
|
|
53
|
+
let t7;
|
|
54
|
+
if ($[6] !== items || $[7] !== onAction) {
|
|
55
|
+
let t8;
|
|
56
|
+
if ($[9] !== onAction) {
|
|
57
|
+
t8 = (item, index) => !item.children || item.children.length === 0 ? /* @__PURE__ */ jsx(MenuItem$1, { ...item }, index) : /* @__PURE__ */ jsxs(SubmenuTrigger, { children: [/* @__PURE__ */ jsx(MenuItem$1, { ...item }), /* @__PURE__ */ jsx(MenuPopover, {
|
|
58
|
+
offset: 0,
|
|
59
|
+
onAction,
|
|
60
|
+
items: item.children
|
|
61
|
+
})] }, index);
|
|
62
|
+
$[9] = onAction;
|
|
63
|
+
$[10] = t8;
|
|
64
|
+
} else t8 = $[10];
|
|
65
|
+
t7 = items.map(t8);
|
|
66
|
+
$[6] = items;
|
|
67
|
+
$[7] = onAction;
|
|
68
|
+
$[8] = t7;
|
|
69
|
+
} else t7 = $[8];
|
|
70
|
+
let t8;
|
|
71
|
+
if ($[11] !== T1 || $[12] !== t5 || $[13] !== t6 || $[14] !== t7) {
|
|
72
|
+
t8 = /* @__PURE__ */ jsx(T1, {
|
|
73
|
+
onAction: t5,
|
|
74
|
+
className: t6,
|
|
75
|
+
children: t7
|
|
76
|
+
});
|
|
77
|
+
$[11] = T1;
|
|
78
|
+
$[12] = t5;
|
|
79
|
+
$[13] = t6;
|
|
80
|
+
$[14] = t7;
|
|
81
|
+
$[15] = t8;
|
|
82
|
+
} else t8 = $[15];
|
|
83
|
+
let t9;
|
|
84
|
+
if ($[16] !== t3 || $[17] !== t4 || $[18] !== t8) {
|
|
85
|
+
t9 = /* @__PURE__ */ jsx("div", {
|
|
86
|
+
onClickCapture: t3,
|
|
87
|
+
onKeyDownCapture: t4,
|
|
88
|
+
children: t8
|
|
89
|
+
});
|
|
90
|
+
$[16] = t3;
|
|
91
|
+
$[17] = t4;
|
|
92
|
+
$[18] = t8;
|
|
93
|
+
$[19] = t9;
|
|
94
|
+
} else t9 = $[19];
|
|
95
|
+
let t10;
|
|
96
|
+
if ($[20] !== t2 || $[21] !== t9) {
|
|
97
|
+
t10 = /* @__PURE__ */ jsx("div", {
|
|
98
|
+
className: t2,
|
|
99
|
+
children: t9
|
|
100
|
+
});
|
|
101
|
+
$[20] = t2;
|
|
102
|
+
$[21] = t9;
|
|
103
|
+
$[22] = t10;
|
|
104
|
+
} else t10 = $[22];
|
|
105
|
+
let t11;
|
|
106
|
+
if ($[23] !== T0 || $[24] !== props || $[25] !== t1 || $[26] !== t10) {
|
|
107
|
+
t11 = /* @__PURE__ */ jsx(T0, {
|
|
108
|
+
...props,
|
|
109
|
+
className: t1,
|
|
110
|
+
children: t10
|
|
111
|
+
});
|
|
112
|
+
$[23] = T0;
|
|
113
|
+
$[24] = props;
|
|
114
|
+
$[25] = t1;
|
|
115
|
+
$[26] = t10;
|
|
116
|
+
$[27] = t11;
|
|
117
|
+
} else t11 = $[27];
|
|
118
|
+
return t11;
|
|
43
119
|
};
|
|
44
120
|
//#endregion
|
|
45
121
|
export { MenuPopover };
|
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
2
2
|
import { Button } from "../Button/Button.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/buttons/IconButton/IconButton.tsx
|
|
5
|
-
var IconButton = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
var IconButton = (t0) => {
|
|
7
|
+
const $ = c(11);
|
|
8
|
+
let disableTooltip;
|
|
9
|
+
let label;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({label, disableTooltip, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = disableTooltip;
|
|
15
|
+
$[2] = label;
|
|
16
|
+
$[3] = props;
|
|
17
|
+
} else {
|
|
18
|
+
disableTooltip = $[1];
|
|
19
|
+
label = $[2];
|
|
20
|
+
props = $[3];
|
|
21
|
+
}
|
|
22
|
+
const t1 = !label || disableTooltip;
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[4] !== label || $[5] !== props) {
|
|
25
|
+
t2 = /* @__PURE__ */ jsx(Button, {
|
|
11
26
|
...props,
|
|
12
27
|
iconOnly: true,
|
|
13
28
|
width: "hug",
|
|
14
29
|
children: label
|
|
15
|
-
})
|
|
16
|
-
|
|
30
|
+
});
|
|
31
|
+
$[4] = label;
|
|
32
|
+
$[5] = props;
|
|
33
|
+
$[6] = t2;
|
|
34
|
+
} else t2 = $[6];
|
|
35
|
+
let t3;
|
|
36
|
+
if ($[7] !== label || $[8] !== t1 || $[9] !== t2) {
|
|
37
|
+
t3 = /* @__PURE__ */ jsx(Tooltip, {
|
|
38
|
+
text: label,
|
|
39
|
+
placement: "bottom",
|
|
40
|
+
hidden: t1,
|
|
41
|
+
children: t2
|
|
42
|
+
});
|
|
43
|
+
$[7] = label;
|
|
44
|
+
$[8] = t1;
|
|
45
|
+
$[9] = t2;
|
|
46
|
+
$[10] = t3;
|
|
47
|
+
} else t3 = $[10];
|
|
48
|
+
return t3;
|
|
17
49
|
};
|
|
18
50
|
//#endregion
|
|
19
51
|
export { IconButton };
|
|
@@ -8,5 +8,6 @@ export interface InlineIconButtonProps extends Omit<AriaButtonProps, "children">
|
|
|
8
8
|
link?: LinkNavigationProps;
|
|
9
9
|
ref?: RefObject<HTMLButtonElement | HTMLAnchorElement | null>;
|
|
10
10
|
disableTooltip?: boolean;
|
|
11
|
+
staticRender?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare const InlineIconButton: ({ label, ...props }: InlineIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const InlineIconButton: ({ label, size, ...props }: InlineIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,40 @@
|
|
|
1
1
|
import { Button } from "../Button/Button.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/buttons/InlineIconButton/InlineIconButton.tsx
|
|
4
|
-
var InlineIconButton = (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
var InlineIconButton = (t0) => {
|
|
6
|
+
const $ = c(8);
|
|
7
|
+
let label;
|
|
8
|
+
let props;
|
|
9
|
+
let t1;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({label, size: t1, ...props} = t0);
|
|
12
|
+
$[0] = t0;
|
|
13
|
+
$[1] = label;
|
|
14
|
+
$[2] = props;
|
|
15
|
+
$[3] = t1;
|
|
16
|
+
} else {
|
|
17
|
+
label = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
t1 = $[3];
|
|
20
|
+
}
|
|
21
|
+
const size = t1 === void 0 ? "none" : t1;
|
|
22
|
+
let t2;
|
|
23
|
+
if ($[4] !== label || $[5] !== props || $[6] !== size) {
|
|
24
|
+
t2 = /* @__PURE__ */ jsx(Button, {
|
|
25
|
+
...props,
|
|
26
|
+
iconOnly: true,
|
|
27
|
+
variant: "text",
|
|
28
|
+
size,
|
|
29
|
+
width: "hug",
|
|
30
|
+
children: label
|
|
31
|
+
});
|
|
32
|
+
$[4] = label;
|
|
33
|
+
$[5] = props;
|
|
34
|
+
$[6] = size;
|
|
35
|
+
$[7] = t2;
|
|
36
|
+
} else t2 = $[7];
|
|
37
|
+
return t2;
|
|
13
38
|
};
|
|
14
39
|
//#endregion
|
|
15
40
|
export { InlineIconButton };
|
|
@@ -2,33 +2,71 @@ import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
|
2
2
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
3
|
import { ButtonContent } from "../shared/ButtonContent.js";
|
|
4
4
|
import { pillButtonContent, pillButtonDefinition, pillButtonIconSize, pillButtonTypography } from "./pillButton.cva.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
import { Button, ToggleButton } from "react-aria-components";
|
|
8
9
|
//#region src/components/buttons/PillButton/PillButton.tsx
|
|
9
|
-
var PillButton = (
|
|
10
|
+
var PillButton = (t0) => {
|
|
11
|
+
const $ = c(17);
|
|
12
|
+
const { children, dismissable, toggle, icon, iconPosition, contentRef, ...props } = t0;
|
|
10
13
|
const pillButtonCva = UIOverrides.useCva("pillButton.cva", pillButtonDefinition);
|
|
11
14
|
const pillButtonTypographyMap = UIOverrides.useMapper("pillButton.typography", pillButtonTypography);
|
|
12
15
|
const Component = toggle ? ToggleButton : Button;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[0] !== dismissable || $[1] !== icon || $[2] !== iconPosition) {
|
|
18
|
+
t1 = () => {
|
|
19
|
+
if (dismissable) return "right";
|
|
20
|
+
return icon ? iconPosition : "none";
|
|
21
|
+
};
|
|
22
|
+
$[0] = dismissable;
|
|
23
|
+
$[1] = icon;
|
|
24
|
+
$[2] = iconPosition;
|
|
25
|
+
$[3] = t1;
|
|
26
|
+
} else t1 = $[3];
|
|
27
|
+
const getIconPosition = t1;
|
|
28
|
+
const t2 = clsx(pillButtonCva({
|
|
18
29
|
...props,
|
|
19
|
-
className:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
className: props.className
|
|
31
|
+
}), pillButtonContent({ iconPosition: getIconPosition() }));
|
|
32
|
+
const T0 = ButtonContent;
|
|
33
|
+
const t3 = dismissable ? CloseIcon : icon;
|
|
34
|
+
const t4 = dismissable ? "right" : iconPosition;
|
|
35
|
+
const t5 = pillButtonIconSize;
|
|
36
|
+
const t6 = pillButtonTypographyMap({ ...props });
|
|
37
|
+
let t7;
|
|
38
|
+
if ($[4] !== T0 || $[5] !== children || $[6] !== contentRef || $[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== t6) {
|
|
39
|
+
t7 = /* @__PURE__ */ jsx(T0, {
|
|
24
40
|
ref: contentRef,
|
|
25
41
|
content: children,
|
|
26
|
-
icon:
|
|
27
|
-
iconPosition:
|
|
28
|
-
iconClassName:
|
|
29
|
-
typography:
|
|
30
|
-
})
|
|
31
|
-
|
|
42
|
+
icon: t3,
|
|
43
|
+
iconPosition: t4,
|
|
44
|
+
iconClassName: t5,
|
|
45
|
+
typography: t6
|
|
46
|
+
});
|
|
47
|
+
$[4] = T0;
|
|
48
|
+
$[5] = children;
|
|
49
|
+
$[6] = contentRef;
|
|
50
|
+
$[7] = t3;
|
|
51
|
+
$[8] = t4;
|
|
52
|
+
$[9] = t5;
|
|
53
|
+
$[10] = t6;
|
|
54
|
+
$[11] = t7;
|
|
55
|
+
} else t7 = $[11];
|
|
56
|
+
let t8;
|
|
57
|
+
if ($[12] !== Component || $[13] !== props || $[14] !== t2 || $[15] !== t7) {
|
|
58
|
+
t8 = /* @__PURE__ */ jsx(Component, {
|
|
59
|
+
...props,
|
|
60
|
+
className: t2,
|
|
61
|
+
children: t7
|
|
62
|
+
});
|
|
63
|
+
$[12] = Component;
|
|
64
|
+
$[13] = props;
|
|
65
|
+
$[14] = t2;
|
|
66
|
+
$[15] = t7;
|
|
67
|
+
$[16] = t8;
|
|
68
|
+
} else t8 = $[16];
|
|
69
|
+
return t8;
|
|
32
70
|
};
|
|
33
71
|
//#endregion
|
|
34
72
|
export { PillButton };
|