@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,37 +2,122 @@ import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
|
|
|
2
2
|
import { Button } from "../Button/Button.js";
|
|
3
3
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
4
4
|
import { Menu } from "../../Menu/Menu.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
//#region src/components/buttons/SplitButton/SplitButton.tsx
|
|
8
|
-
var SplitButton = (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
var SplitButton = (t0) => {
|
|
10
|
+
const $ = c(36);
|
|
11
|
+
let className;
|
|
12
|
+
let color;
|
|
13
|
+
let isLoading;
|
|
14
|
+
let items;
|
|
15
|
+
let label;
|
|
16
|
+
let labelRight;
|
|
17
|
+
let link;
|
|
18
|
+
let props;
|
|
19
|
+
let size;
|
|
20
|
+
let variant;
|
|
21
|
+
let width;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({variant, color, width, size, label, labelRight, link, items, className, isLoading, ...props} = t0);
|
|
24
|
+
$[0] = t0;
|
|
25
|
+
$[1] = className;
|
|
26
|
+
$[2] = color;
|
|
27
|
+
$[3] = isLoading;
|
|
28
|
+
$[4] = items;
|
|
29
|
+
$[5] = label;
|
|
30
|
+
$[6] = labelRight;
|
|
31
|
+
$[7] = link;
|
|
32
|
+
$[8] = props;
|
|
33
|
+
$[9] = size;
|
|
34
|
+
$[10] = variant;
|
|
35
|
+
$[11] = width;
|
|
36
|
+
} else {
|
|
37
|
+
className = $[1];
|
|
38
|
+
color = $[2];
|
|
39
|
+
isLoading = $[3];
|
|
40
|
+
items = $[4];
|
|
41
|
+
label = $[5];
|
|
42
|
+
labelRight = $[6];
|
|
43
|
+
link = $[7];
|
|
44
|
+
props = $[8];
|
|
45
|
+
size = $[9];
|
|
46
|
+
variant = $[10];
|
|
47
|
+
width = $[11];
|
|
48
|
+
}
|
|
49
|
+
let t1;
|
|
50
|
+
if ($[12] !== className) {
|
|
51
|
+
t1 = clsx("rounded-r-none! border-r border-solid", className);
|
|
52
|
+
$[12] = className;
|
|
53
|
+
$[13] = t1;
|
|
54
|
+
} else t1 = $[13];
|
|
55
|
+
let t2;
|
|
56
|
+
if ($[14] !== color || $[15] !== isLoading || $[16] !== label || $[17] !== link || $[18] !== props || $[19] !== size || $[20] !== t1 || $[21] !== variant || $[22] !== width) {
|
|
57
|
+
t2 = /* @__PURE__ */ jsx(Button, {
|
|
13
58
|
...props,
|
|
14
59
|
width,
|
|
15
60
|
size,
|
|
16
61
|
variant,
|
|
17
62
|
color,
|
|
18
63
|
link,
|
|
19
|
-
className:
|
|
64
|
+
className: t1,
|
|
20
65
|
"data-separator": "",
|
|
21
66
|
isLoading,
|
|
22
67
|
children: label
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
68
|
+
});
|
|
69
|
+
$[14] = color;
|
|
70
|
+
$[15] = isLoading;
|
|
71
|
+
$[16] = label;
|
|
72
|
+
$[17] = link;
|
|
73
|
+
$[18] = props;
|
|
74
|
+
$[19] = size;
|
|
75
|
+
$[20] = t1;
|
|
76
|
+
$[21] = variant;
|
|
77
|
+
$[22] = width;
|
|
78
|
+
$[23] = t2;
|
|
79
|
+
} else t2 = $[23];
|
|
80
|
+
const t3 = props.isDisabled || isLoading;
|
|
81
|
+
let t4;
|
|
82
|
+
if ($[24] !== color || $[25] !== labelRight || $[26] !== size || $[27] !== t3 || $[28] !== variant) {
|
|
83
|
+
t4 = /* @__PURE__ */ jsx(IconButton, {
|
|
84
|
+
size,
|
|
85
|
+
variant,
|
|
86
|
+
color,
|
|
87
|
+
label: labelRight,
|
|
88
|
+
icon: ChevronDownIcon,
|
|
89
|
+
className: "rounded-l-none! border-l-0!",
|
|
90
|
+
isDisabled: t3
|
|
91
|
+
});
|
|
92
|
+
$[24] = color;
|
|
93
|
+
$[25] = labelRight;
|
|
94
|
+
$[26] = size;
|
|
95
|
+
$[27] = t3;
|
|
96
|
+
$[28] = variant;
|
|
97
|
+
$[29] = t4;
|
|
98
|
+
} else t4 = $[29];
|
|
99
|
+
let t5;
|
|
100
|
+
if ($[30] !== items || $[31] !== t4) {
|
|
101
|
+
t5 = /* @__PURE__ */ jsx(Menu, {
|
|
102
|
+
trigger: t4,
|
|
33
103
|
items
|
|
34
|
-
})
|
|
35
|
-
|
|
104
|
+
});
|
|
105
|
+
$[30] = items;
|
|
106
|
+
$[31] = t4;
|
|
107
|
+
$[32] = t5;
|
|
108
|
+
} else t5 = $[32];
|
|
109
|
+
let t6;
|
|
110
|
+
if ($[33] !== t2 || $[34] !== t5) {
|
|
111
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
112
|
+
className: "group/split flex items-center",
|
|
113
|
+
"data-split": "",
|
|
114
|
+
children: [t2, t5]
|
|
115
|
+
});
|
|
116
|
+
$[33] = t2;
|
|
117
|
+
$[34] = t5;
|
|
118
|
+
$[35] = t6;
|
|
119
|
+
} else t6 = $[35];
|
|
120
|
+
return t6;
|
|
36
121
|
};
|
|
37
122
|
//#endregion
|
|
38
123
|
export { SplitButton };
|
|
@@ -1,14 +1,36 @@
|
|
|
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/TextButton/TextButton.tsx
|
|
4
|
-
var TextButton = (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
var TextButton = (t0) => {
|
|
6
|
+
const $ = c(7);
|
|
7
|
+
let children;
|
|
8
|
+
let props;
|
|
9
|
+
if ($[0] !== t0) {
|
|
10
|
+
({children, ...props} = t0);
|
|
11
|
+
$[0] = t0;
|
|
12
|
+
$[1] = children;
|
|
13
|
+
$[2] = props;
|
|
14
|
+
} else {
|
|
15
|
+
children = $[1];
|
|
16
|
+
props = $[2];
|
|
17
|
+
}
|
|
18
|
+
const t1 = props.width ?? "hug";
|
|
19
|
+
let t2;
|
|
20
|
+
if ($[3] !== children || $[4] !== props || $[5] !== t1) {
|
|
21
|
+
t2 = /* @__PURE__ */ jsx(Button, {
|
|
22
|
+
...props,
|
|
23
|
+
variant: "text",
|
|
24
|
+
size: "none",
|
|
25
|
+
width: t1,
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
$[3] = children;
|
|
29
|
+
$[4] = props;
|
|
30
|
+
$[5] = t1;
|
|
31
|
+
$[6] = t2;
|
|
32
|
+
} else t2 = $[6];
|
|
33
|
+
return t2;
|
|
12
34
|
};
|
|
13
35
|
//#endregion
|
|
14
36
|
export { TextButton };
|
|
@@ -1,14 +1,34 @@
|
|
|
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/ToggleButton/ToggleButton.tsx
|
|
4
|
-
var ToggleButton = (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
var ToggleButton = (t0) => {
|
|
6
|
+
const $ = c(6);
|
|
7
|
+
let children;
|
|
8
|
+
let props;
|
|
9
|
+
if ($[0] !== t0) {
|
|
10
|
+
({children, ...props} = t0);
|
|
11
|
+
$[0] = t0;
|
|
12
|
+
$[1] = children;
|
|
13
|
+
$[2] = props;
|
|
14
|
+
} else {
|
|
15
|
+
children = $[1];
|
|
16
|
+
props = $[2];
|
|
17
|
+
}
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[3] !== children || $[4] !== props) {
|
|
20
|
+
t1 = /* @__PURE__ */ jsx(Button, {
|
|
21
|
+
...props,
|
|
22
|
+
toggle: true,
|
|
23
|
+
variant: "outlined",
|
|
24
|
+
color: "primary",
|
|
25
|
+
children
|
|
26
|
+
});
|
|
27
|
+
$[3] = children;
|
|
28
|
+
$[4] = props;
|
|
29
|
+
$[5] = t1;
|
|
30
|
+
} else t1 = $[5];
|
|
31
|
+
return t1;
|
|
12
32
|
};
|
|
13
33
|
//#endregion
|
|
14
34
|
export { ToggleButton };
|
|
@@ -2,36 +2,94 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { typographyDefinition } from "../../text/Typography/typography.cva.js";
|
|
3
3
|
import { buttonContentLabel } from "./buttonContent.cva.js";
|
|
4
4
|
import { Loader } from "../../status/Loader/Loader.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 { isValidElement } from "react";
|
|
8
9
|
//#region src/components/buttons/shared/ButtonContent.tsx
|
|
9
|
-
var ButtonContent = (
|
|
10
|
+
var ButtonContent = (t0) => {
|
|
11
|
+
const $ = c(21);
|
|
12
|
+
const { ref, content, isLoading, icon: Icon, iconClassName, hideText, iconPosition: t1, typography: typographyOverrides } = t0;
|
|
13
|
+
const iconPosition = t1 === void 0 ? "left" : t1;
|
|
10
14
|
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
11
15
|
let iconOrLoader = null;
|
|
12
|
-
if (isLoading)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
16
|
+
if (isLoading) {
|
|
17
|
+
let t2;
|
|
18
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
19
|
+
t2 = /* @__PURE__ */ jsx(Loader, { className: "shrink-0" });
|
|
20
|
+
$[0] = t2;
|
|
21
|
+
} else t2 = $[0];
|
|
22
|
+
iconOrLoader = t2;
|
|
23
|
+
} else if (Icon) if (isValidElement(Icon)) iconOrLoader = Icon;
|
|
24
|
+
else {
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[1] !== iconClassName) {
|
|
27
|
+
t2 = clsx("shrink-0", iconClassName);
|
|
28
|
+
$[1] = iconClassName;
|
|
29
|
+
$[2] = t2;
|
|
30
|
+
} else t2 = $[2];
|
|
31
|
+
let t3;
|
|
32
|
+
if ($[3] !== Icon || $[4] !== t2) {
|
|
33
|
+
t3 = /* @__PURE__ */ jsx(Icon, { className: t2 });
|
|
34
|
+
$[3] = Icon;
|
|
35
|
+
$[4] = t2;
|
|
36
|
+
$[5] = t3;
|
|
37
|
+
} else t3 = $[5];
|
|
38
|
+
iconOrLoader = t3;
|
|
39
|
+
}
|
|
40
|
+
let t2;
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[6] !== hideText || $[7] !== iconOrLoader || $[8] !== iconPosition || $[9] !== typographyCva || $[10] !== typographyOverrides) {
|
|
43
|
+
const resolvedTypography = {
|
|
44
|
+
size: "label-2",
|
|
45
|
+
variant: "prominent-1",
|
|
46
|
+
...typographyOverrides
|
|
47
|
+
};
|
|
48
|
+
t3 = iconOrLoader && iconPosition === "left" && iconOrLoader;
|
|
49
|
+
t2 = clsx(typographyCva({
|
|
50
|
+
...resolvedTypography,
|
|
51
|
+
sizeMobile: resolvedTypography.sizeMobile ?? resolvedTypography.size
|
|
52
|
+
}), buttonContentLabel({
|
|
53
|
+
iconPosition: iconOrLoader ? iconPosition : "none",
|
|
54
|
+
hideText: !!hideText
|
|
55
|
+
}));
|
|
56
|
+
$[6] = hideText;
|
|
57
|
+
$[7] = iconOrLoader;
|
|
58
|
+
$[8] = iconPosition;
|
|
59
|
+
$[9] = typographyCva;
|
|
60
|
+
$[10] = typographyOverrides;
|
|
61
|
+
$[11] = t2;
|
|
62
|
+
$[12] = t3;
|
|
63
|
+
} else {
|
|
64
|
+
t2 = $[11];
|
|
65
|
+
t3 = $[12];
|
|
66
|
+
}
|
|
67
|
+
let t4;
|
|
68
|
+
if ($[13] !== content || $[14] !== ref || $[15] !== t2) {
|
|
69
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
70
|
+
className: t2,
|
|
30
71
|
ref,
|
|
31
72
|
children: content
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
73
|
+
});
|
|
74
|
+
$[13] = content;
|
|
75
|
+
$[14] = ref;
|
|
76
|
+
$[15] = t2;
|
|
77
|
+
$[16] = t4;
|
|
78
|
+
} else t4 = $[16];
|
|
79
|
+
const t5 = iconOrLoader && iconPosition === "right" && iconOrLoader;
|
|
80
|
+
let t6;
|
|
81
|
+
if ($[17] !== t3 || $[18] !== t4 || $[19] !== t5) {
|
|
82
|
+
t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
83
|
+
t3,
|
|
84
|
+
t4,
|
|
85
|
+
t5
|
|
86
|
+
] });
|
|
87
|
+
$[17] = t3;
|
|
88
|
+
$[18] = t4;
|
|
89
|
+
$[19] = t5;
|
|
90
|
+
$[20] = t6;
|
|
91
|
+
} else t6 = $[20];
|
|
92
|
+
return t6;
|
|
35
93
|
};
|
|
36
94
|
//#endregion
|
|
37
95
|
export { ButtonContent };
|
|
@@ -8,6 +8,7 @@ interface CheckboxBaseProps extends FormFieldErrorProps, CheckboxVariantProps, O
|
|
|
8
8
|
ref?: Ref<HTMLLabelElement>;
|
|
9
9
|
children: string | ReactElement;
|
|
10
10
|
hideLabel?: boolean;
|
|
11
|
+
fireBlurOnChange?: boolean;
|
|
11
12
|
selectedIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
12
13
|
indeterminateIcon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
13
14
|
isDirty?: boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
|
-
import { checkboxIndicatorClass, checkboxTypography } from "./checkbox.cva.js";
|
|
3
|
+
import { checkboxContentClassName, checkboxIndicatorClass, checkboxTypography } from "./checkbox.cva.js";
|
|
4
4
|
import { FormFieldError } from "../FormField/FormFieldError.js";
|
|
5
5
|
import { CheckContent } from "../shared/CheckContent.js";
|
|
6
6
|
import { CheckboxCheckmark } from "./CheckboxCheckmark.js";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { clsx } from "clsx";
|
|
9
10
|
import { Checkbox } from "react-aria-components";
|
|
@@ -11,53 +12,218 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
11
12
|
import { Controller } from "react-hook-form";
|
|
12
13
|
//#region src/components/inputs/Checkbox/Checkbox.tsx
|
|
13
14
|
var CheckboxBase = (props) => {
|
|
15
|
+
const $ = c(48);
|
|
14
16
|
const ui = UIConfig.useConfig();
|
|
15
17
|
const checkboxTypographyMap = UIOverrides.useMapper("checkbox.typography", checkboxTypography);
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
className:
|
|
29
|
-
|
|
18
|
+
const checkboxContentClassNameMap = UIOverrides.useMapper("checkbox.contentClassName", checkboxContentClassName);
|
|
19
|
+
let children;
|
|
20
|
+
let className;
|
|
21
|
+
let error;
|
|
22
|
+
let fireBlurOnChangeProp;
|
|
23
|
+
let hideLabelProp;
|
|
24
|
+
let isDisabled;
|
|
25
|
+
let onBlur;
|
|
26
|
+
let onChange;
|
|
27
|
+
let rest;
|
|
28
|
+
let variantProp;
|
|
29
|
+
if ($[0] !== props) {
|
|
30
|
+
({className, children, isDisabled, error, variant: variantProp, hideLabel: hideLabelProp, fireBlurOnChange: fireBlurOnChangeProp, onChange, onBlur, ...rest} = props);
|
|
31
|
+
$[0] = props;
|
|
32
|
+
$[1] = children;
|
|
33
|
+
$[2] = className;
|
|
34
|
+
$[3] = error;
|
|
35
|
+
$[4] = fireBlurOnChangeProp;
|
|
36
|
+
$[5] = hideLabelProp;
|
|
37
|
+
$[6] = isDisabled;
|
|
38
|
+
$[7] = onBlur;
|
|
39
|
+
$[8] = onChange;
|
|
40
|
+
$[9] = rest;
|
|
41
|
+
$[10] = variantProp;
|
|
42
|
+
} else {
|
|
43
|
+
children = $[1];
|
|
44
|
+
className = $[2];
|
|
45
|
+
error = $[3];
|
|
46
|
+
fireBlurOnChangeProp = $[4];
|
|
47
|
+
hideLabelProp = $[5];
|
|
48
|
+
isDisabled = $[6];
|
|
49
|
+
onBlur = $[7];
|
|
50
|
+
onChange = $[8];
|
|
51
|
+
rest = $[9];
|
|
52
|
+
variantProp = $[10];
|
|
53
|
+
}
|
|
54
|
+
const variant = variantProp ?? ui.checkbox.variant;
|
|
55
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
56
|
+
const fireBlurOnChange = fireBlurOnChangeProp ?? ui.checkbox.fireBlurOnChange;
|
|
57
|
+
let t0;
|
|
58
|
+
if ($[11] !== error || $[12] !== isDisabled) {
|
|
59
|
+
t0 = {
|
|
60
|
+
error,
|
|
61
|
+
isDisabled
|
|
62
|
+
};
|
|
63
|
+
$[11] = error;
|
|
64
|
+
$[12] = isDisabled;
|
|
65
|
+
$[13] = t0;
|
|
66
|
+
} else t0 = $[13];
|
|
67
|
+
const formFieldErrorProps = t0;
|
|
68
|
+
let t1;
|
|
69
|
+
if ($[14] !== fireBlurOnChange || $[15] !== onBlur || $[16] !== onChange) {
|
|
70
|
+
t1 = (isSelected) => {
|
|
71
|
+
onChange?.(isSelected);
|
|
72
|
+
if (fireBlurOnChange) onBlur?.({});
|
|
73
|
+
};
|
|
74
|
+
$[14] = fireBlurOnChange;
|
|
75
|
+
$[15] = onBlur;
|
|
76
|
+
$[16] = onChange;
|
|
77
|
+
$[17] = t1;
|
|
78
|
+
} else t1 = $[17];
|
|
79
|
+
const handleChange = t1;
|
|
80
|
+
const t2 = !!error;
|
|
81
|
+
const t3 = hideLabel && typeof children === "string" ? children : void 0;
|
|
82
|
+
const t4 = error || void 0;
|
|
83
|
+
const t5 = props.isDirty || void 0;
|
|
84
|
+
const t6 = props.isRequired || void 0;
|
|
85
|
+
let t7;
|
|
86
|
+
if ($[18] !== className) {
|
|
87
|
+
t7 = clsx("relative", checkboxIndicatorClass, className);
|
|
88
|
+
$[18] = className;
|
|
89
|
+
$[19] = t7;
|
|
90
|
+
} else t7 = $[19];
|
|
91
|
+
let t8;
|
|
92
|
+
if ($[20] !== rest || $[21] !== variant) {
|
|
93
|
+
t8 = /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
30
94
|
variant,
|
|
31
95
|
...rest
|
|
32
|
-
})
|
|
96
|
+
});
|
|
97
|
+
$[20] = rest;
|
|
98
|
+
$[21] = variant;
|
|
99
|
+
$[22] = t8;
|
|
100
|
+
} else t8 = $[22];
|
|
101
|
+
let t9;
|
|
102
|
+
if ($[23] !== checkboxContentClassNameMap || $[24] !== checkboxTypographyMap || $[25] !== children || $[26] !== hideLabel || $[27] !== rest || $[28] !== variant) {
|
|
103
|
+
t9 = !hideLabel && /* @__PURE__ */ jsx(CheckContent, {
|
|
33
104
|
typography: checkboxTypographyMap({
|
|
34
105
|
variant,
|
|
35
106
|
...rest
|
|
36
107
|
}),
|
|
108
|
+
contentClassName: checkboxContentClassNameMap({
|
|
109
|
+
variant,
|
|
110
|
+
...rest
|
|
111
|
+
}),
|
|
37
112
|
children
|
|
38
|
-
})
|
|
39
|
-
|
|
113
|
+
});
|
|
114
|
+
$[23] = checkboxContentClassNameMap;
|
|
115
|
+
$[24] = checkboxTypographyMap;
|
|
116
|
+
$[25] = children;
|
|
117
|
+
$[26] = hideLabel;
|
|
118
|
+
$[27] = rest;
|
|
119
|
+
$[28] = variant;
|
|
120
|
+
$[29] = t9;
|
|
121
|
+
} else t9 = $[29];
|
|
122
|
+
let t10;
|
|
123
|
+
if ($[30] !== handleChange || $[31] !== isDisabled || $[32] !== onBlur || $[33] !== rest || $[34] !== t2 || $[35] !== t3 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
|
|
124
|
+
t10 = /* @__PURE__ */ jsxs(Checkbox, {
|
|
125
|
+
...rest,
|
|
126
|
+
isDisabled,
|
|
127
|
+
isInvalid: t2,
|
|
128
|
+
"aria-label": t3,
|
|
129
|
+
"aria-errormessage": t4,
|
|
130
|
+
"data-is-dirty": t5,
|
|
131
|
+
"data-is-required": t6,
|
|
132
|
+
onChange: handleChange,
|
|
133
|
+
onBlur,
|
|
134
|
+
className: t7,
|
|
135
|
+
children: [t8, t9]
|
|
136
|
+
});
|
|
137
|
+
$[30] = handleChange;
|
|
138
|
+
$[31] = isDisabled;
|
|
139
|
+
$[32] = onBlur;
|
|
140
|
+
$[33] = rest;
|
|
141
|
+
$[34] = t2;
|
|
142
|
+
$[35] = t3;
|
|
143
|
+
$[36] = t4;
|
|
144
|
+
$[37] = t5;
|
|
145
|
+
$[38] = t6;
|
|
146
|
+
$[39] = t7;
|
|
147
|
+
$[40] = t8;
|
|
148
|
+
$[41] = t9;
|
|
149
|
+
$[42] = t10;
|
|
150
|
+
} else t10 = $[42];
|
|
151
|
+
let t11;
|
|
152
|
+
if ($[43] !== formFieldErrorProps) {
|
|
153
|
+
t11 = /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps });
|
|
154
|
+
$[43] = formFieldErrorProps;
|
|
155
|
+
$[44] = t11;
|
|
156
|
+
} else t11 = $[44];
|
|
157
|
+
let t12;
|
|
158
|
+
if ($[45] !== t10 || $[46] !== t11) {
|
|
159
|
+
t12 = /* @__PURE__ */ jsxs(Fragment, { children: [t10, t11] });
|
|
160
|
+
$[45] = t10;
|
|
161
|
+
$[46] = t11;
|
|
162
|
+
$[47] = t12;
|
|
163
|
+
} else t12 = $[47];
|
|
164
|
+
return t12;
|
|
40
165
|
};
|
|
41
166
|
var Checkbox$1 = (props) => {
|
|
167
|
+
const $ = c(15);
|
|
42
168
|
if ("formControl" in props && props.formControl) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
169
|
+
let formControl;
|
|
170
|
+
let innerProps;
|
|
171
|
+
let ref;
|
|
172
|
+
if ($[0] !== props) {
|
|
173
|
+
({formControl, ref, ...innerProps} = props);
|
|
174
|
+
$[0] = props;
|
|
175
|
+
$[1] = formControl;
|
|
176
|
+
$[2] = innerProps;
|
|
177
|
+
$[3] = ref;
|
|
178
|
+
} else {
|
|
179
|
+
formControl = $[1];
|
|
180
|
+
innerProps = $[2];
|
|
181
|
+
ref = $[3];
|
|
182
|
+
}
|
|
183
|
+
let t0;
|
|
184
|
+
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
185
|
+
t0 = (t1) => {
|
|
186
|
+
const { field, fieldState: t2 } = t1;
|
|
187
|
+
const { error, isDirty } = t2;
|
|
188
|
+
return /* @__PURE__ */ jsx(CheckboxBase, {
|
|
189
|
+
...innerProps,
|
|
190
|
+
ref: mergeRefs(ref, field.ref),
|
|
191
|
+
isSelected: field.value,
|
|
192
|
+
onChange: field.onChange,
|
|
193
|
+
onBlur: field.onBlur,
|
|
194
|
+
name: field.name,
|
|
195
|
+
isDirty,
|
|
196
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
197
|
+
error: props.error ?? error?.message
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
$[4] = innerProps;
|
|
201
|
+
$[5] = props.error;
|
|
202
|
+
$[6] = props.isDisabled;
|
|
203
|
+
$[7] = ref;
|
|
204
|
+
$[8] = t0;
|
|
205
|
+
} else t0 = $[8];
|
|
206
|
+
let t1;
|
|
207
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
208
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
209
|
+
control: formControl.control,
|
|
210
|
+
name: formControl.name,
|
|
211
|
+
render: t0
|
|
212
|
+
});
|
|
213
|
+
$[9] = formControl.control;
|
|
214
|
+
$[10] = formControl.name;
|
|
215
|
+
$[11] = t0;
|
|
216
|
+
$[12] = t1;
|
|
217
|
+
} else t1 = $[12];
|
|
218
|
+
return t1;
|
|
59
219
|
}
|
|
60
|
-
|
|
220
|
+
let t0;
|
|
221
|
+
if ($[13] !== props) {
|
|
222
|
+
t0 = /* @__PURE__ */ jsx(CheckboxBase, { ...props });
|
|
223
|
+
$[13] = props;
|
|
224
|
+
$[14] = t0;
|
|
225
|
+
} else t0 = $[14];
|
|
226
|
+
return t0;
|
|
61
227
|
};
|
|
62
228
|
//#endregion
|
|
63
229
|
export { Checkbox$1 as Checkbox };
|
|
@@ -2,24 +2,38 @@ import { CheckboxCheckmarkIcon } from "../../../assets/icons/CheckboxCheckmark.j
|
|
|
2
2
|
import { CheckboxIndeterminateIcon } from "../../../assets/icons/CheckboxIndeterminate.js";
|
|
3
3
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
4
4
|
import { checkboxDefinition, checkboxIconDefinition } from "./checkbox.cva.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/inputs/Checkbox/CheckboxCheckmark.tsx
|
|
7
|
-
var CheckboxCheckmark = (
|
|
8
|
+
var CheckboxCheckmark = (t0) => {
|
|
9
|
+
const $ = c(3);
|
|
10
|
+
const { variant, className, selectedIcon: t1, indeterminateIcon: t2, ...props } = t0;
|
|
11
|
+
const SelectedIcon = t1 === void 0 ? CheckboxCheckmarkIcon : t1;
|
|
12
|
+
const IndeterminateIcon = t2 === void 0 ? CheckboxIndeterminateIcon : t2;
|
|
8
13
|
const checkboxCva = UIOverrides.useCva("checkbox.cva", checkboxDefinition);
|
|
9
14
|
const checkboxIconCva = UIOverrides.useCva("checkbox.iconCva", checkboxIconDefinition);
|
|
15
|
+
const t3 = checkboxCva({
|
|
16
|
+
variant,
|
|
17
|
+
...props,
|
|
18
|
+
className
|
|
19
|
+
});
|
|
20
|
+
const t4 = checkboxIconCva({
|
|
21
|
+
...props,
|
|
22
|
+
iconVariant: "indeterminate"
|
|
23
|
+
});
|
|
24
|
+
let t5;
|
|
25
|
+
if ($[0] !== IndeterminateIcon || $[1] !== t4) {
|
|
26
|
+
t5 = /* @__PURE__ */ jsx(IndeterminateIcon, { className: t4 });
|
|
27
|
+
$[0] = IndeterminateIcon;
|
|
28
|
+
$[1] = t4;
|
|
29
|
+
$[2] = t5;
|
|
30
|
+
} else t5 = $[2];
|
|
10
31
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
-
className:
|
|
12
|
-
variant,
|
|
13
|
-
...props,
|
|
14
|
-
className
|
|
15
|
-
}),
|
|
32
|
+
className: t3,
|
|
16
33
|
children: [/* @__PURE__ */ jsx(SelectedIcon, { className: checkboxIconCva({
|
|
17
34
|
...props,
|
|
18
35
|
iconVariant: "selected"
|
|
19
|
-
}) }),
|
|
20
|
-
...props,
|
|
21
|
-
iconVariant: "indeterminate"
|
|
22
|
-
}) })]
|
|
36
|
+
}) }), t5]
|
|
23
37
|
});
|
|
24
38
|
};
|
|
25
39
|
//#endregion
|
|
@@ -15,6 +15,9 @@ export declare const checkboxIndicatorClass = "group flex items-center gap-2";
|
|
|
15
15
|
export declare const checkboxTypography: (props: {
|
|
16
16
|
readonly variant?: "default" | null | undefined;
|
|
17
17
|
}) => TypographyVariantProps | undefined;
|
|
18
|
+
export declare const checkboxContentClassName: (props: {
|
|
19
|
+
readonly variant?: "default" | null | undefined;
|
|
20
|
+
}) => string | undefined;
|
|
18
21
|
export declare const checkboxIconDefinition: {
|
|
19
22
|
base: string[];
|
|
20
23
|
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|