@povio/ui 3.0.0-rc.3 → 3.1.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/README.md +39 -0
- package/dist/assets/icons/AlignCenter.js +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +39 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -373
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +45 -88
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +2 -2
- package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
- package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -45
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -227
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -397
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -11
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -28
- package/dist/components/inputs/shared/input.cva.js +4 -38
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +25 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +22 -64
- package/dist/components/overlays/Modal/modal.cva.js +1 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +17 -22
- package/dist/components/status/Toast/toast.cva.d.ts +14 -3
- package/dist/components/status/Toast/toast.cva.js +12 -10
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +30 -30
- package/dist/components/table/table.cva.d.ts +7 -0
- package/dist/components/table/table.cva.js +2 -1
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Pill/Pill.d.ts +15 -0
- package/dist/components/text/Pill/Pill.js +44 -0
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +10 -21
- package/dist/config/uiConfig.context.js +18 -69
- package/dist/config/uiOverrides.context.d.ts +10 -20
- package/dist/config/uiOverrides.context.js +14 -54
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useAutosave.d.ts +1 -2
- package/dist/hooks/useAutosave.js +4 -12
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.d.ts +1 -3
- package/dist/hooks/useFormAutosave.js +30 -122
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +7 -16
- package/dist/index.js +6 -13
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -136
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -40
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -37
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -14
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -72
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
|
-
import {
|
|
3
|
+
import { 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";
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { clsx } from "clsx";
|
|
10
9
|
import { Checkbox } from "react-aria-components";
|
|
@@ -12,218 +11,53 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
12
11
|
import { Controller } from "react-hook-form";
|
|
13
12
|
//#region src/components/inputs/Checkbox/Checkbox.tsx
|
|
14
13
|
var CheckboxBase = (props) => {
|
|
15
|
-
const $ = c(48);
|
|
16
14
|
const ui = UIConfig.useConfig();
|
|
17
15
|
const checkboxTypographyMap = UIOverrides.useMapper("checkbox.typography", checkboxTypography);
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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, {
|
|
16
|
+
const { className, children, isDisabled, error, variant = ui.checkbox.variant, hideLabel = ui.input.hideLabel, ...rest } = props;
|
|
17
|
+
const formFieldErrorProps = {
|
|
18
|
+
error,
|
|
19
|
+
isDisabled
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Checkbox, {
|
|
22
|
+
...rest,
|
|
23
|
+
isDisabled,
|
|
24
|
+
isInvalid: !!error,
|
|
25
|
+
"aria-errormessage": error || void 0,
|
|
26
|
+
"data-is-dirty": props.isDirty || void 0,
|
|
27
|
+
"data-is-required": props.isRequired || void 0,
|
|
28
|
+
className: clsx("relative", checkboxIndicatorClass, className),
|
|
29
|
+
children: [/* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
94
30
|
variant,
|
|
95
31
|
...rest
|
|
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, {
|
|
32
|
+
}), !hideLabel && /* @__PURE__ */ jsx(CheckContent, {
|
|
104
33
|
typography: checkboxTypographyMap({
|
|
105
34
|
variant,
|
|
106
35
|
...rest
|
|
107
36
|
}),
|
|
108
|
-
contentClassName: checkboxContentClassNameMap({
|
|
109
|
-
variant,
|
|
110
|
-
...rest
|
|
111
|
-
}),
|
|
112
37
|
children
|
|
113
|
-
})
|
|
114
|
-
|
|
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;
|
|
38
|
+
})]
|
|
39
|
+
}), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
|
|
165
40
|
};
|
|
166
41
|
var Checkbox$1 = (props) => {
|
|
167
|
-
const $ = c(15);
|
|
168
42
|
if ("formControl" in props && props.formControl) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
({
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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;
|
|
43
|
+
const { formControl, ref, ...innerProps } = props;
|
|
44
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
45
|
+
control: formControl.control,
|
|
46
|
+
name: formControl.name,
|
|
47
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(CheckboxBase, {
|
|
48
|
+
...innerProps,
|
|
49
|
+
ref: mergeRefs(ref, field.ref),
|
|
50
|
+
isSelected: field.value,
|
|
51
|
+
onChange: field.onChange,
|
|
52
|
+
onBlur: field.onBlur,
|
|
53
|
+
name: field.name,
|
|
54
|
+
isDirty,
|
|
55
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
56
|
+
error: props.error ?? error?.message
|
|
57
|
+
})
|
|
58
|
+
});
|
|
219
59
|
}
|
|
220
|
-
|
|
221
|
-
if ($[13] !== props) {
|
|
222
|
-
t0 = /* @__PURE__ */ jsx(CheckboxBase, { ...props });
|
|
223
|
-
$[13] = props;
|
|
224
|
-
$[14] = t0;
|
|
225
|
-
} else t0 = $[14];
|
|
226
|
-
return t0;
|
|
60
|
+
return /* @__PURE__ */ jsx(CheckboxBase, { ...props });
|
|
227
61
|
};
|
|
228
62
|
//#endregion
|
|
229
63
|
export { Checkbox$1 as Checkbox };
|
|
@@ -2,38 +2,24 @@ 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";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
//#region src/components/inputs/Checkbox/CheckboxCheckmark.tsx
|
|
8
|
-
var CheckboxCheckmark = (
|
|
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;
|
|
7
|
+
var CheckboxCheckmark = ({ variant, className, selectedIcon: SelectedIcon = CheckboxCheckmarkIcon, indeterminateIcon: IndeterminateIcon = CheckboxIndeterminateIcon, ...props }) => {
|
|
13
8
|
const checkboxCva = UIOverrides.useCva("checkbox.cva", checkboxDefinition);
|
|
14
9
|
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];
|
|
31
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
32
|
-
className:
|
|
11
|
+
className: checkboxCva({
|
|
12
|
+
variant,
|
|
13
|
+
...props,
|
|
14
|
+
className
|
|
15
|
+
}),
|
|
33
16
|
children: [/* @__PURE__ */ jsx(SelectedIcon, { className: checkboxIconCva({
|
|
34
17
|
...props,
|
|
35
18
|
iconVariant: "selected"
|
|
36
|
-
}) }),
|
|
19
|
+
}) }), /* @__PURE__ */ jsx(IndeterminateIcon, { className: checkboxIconCva({
|
|
20
|
+
...props,
|
|
21
|
+
iconVariant: "indeterminate"
|
|
22
|
+
}) })]
|
|
37
23
|
});
|
|
38
24
|
};
|
|
39
25
|
//#endregion
|
|
@@ -15,9 +15,6 @@ 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;
|
|
21
18
|
export declare const checkboxIconDefinition: {
|
|
22
19
|
base: string[];
|
|
23
20
|
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
@@ -44,7 +44,6 @@ var checkboxTypography = compoundMapper({ default: {
|
|
|
44
44
|
sizeMobile: "label-1",
|
|
45
45
|
variant: "default"
|
|
46
46
|
} });
|
|
47
|
-
var checkboxContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
48
47
|
var checkboxIconDefinition = UIOverrides.defineConfig({
|
|
49
48
|
base: ["absolute hidden size-3"],
|
|
50
49
|
config: {
|
|
@@ -56,4 +55,4 @@ var checkboxIconDefinition = UIOverrides.defineConfig({
|
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
57
|
//#endregion
|
|
59
|
-
export {
|
|
58
|
+
export { checkboxDefinition, checkboxIconDefinition, checkboxIndicatorClass, checkboxTypography };
|
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
import { CalendarDate, DateValue } from '@internationalized/date';
|
|
2
|
-
import {
|
|
2
|
+
import { Ref } from 'react';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { DatePickerStateOptions } from 'react-stately';
|
|
5
5
|
import { DatePickerInputHandle } from '../shared/DatePickerInput';
|
|
6
|
-
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
|
|
7
6
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
8
7
|
import { ControlProps } from '../../shared/form.types';
|
|
9
8
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
10
9
|
type DatePickerGranularity = "day" | "month" | "year";
|
|
11
|
-
interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<CalendarDate>, "granularity" | "shouldCloseOnSelect" | "label"
|
|
10
|
+
interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<CalendarDate>, "granularity" | "shouldCloseOnSelect" | "label"> {
|
|
12
11
|
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
13
12
|
disableDropdown?: boolean;
|
|
14
13
|
isClearable?: boolean;
|
|
15
14
|
className?: string;
|
|
16
|
-
todayIcon?:
|
|
17
|
-
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
18
|
-
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
19
|
-
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
15
|
+
todayIcon?: boolean;
|
|
20
16
|
isDirty?: boolean;
|
|
21
17
|
disableManualEntry?: boolean;
|
|
22
|
-
autoFixYear?: boolean;
|
|
23
18
|
placeholder?: string;
|
|
24
19
|
inputClassName?: string;
|
|
25
|
-
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
26
20
|
shouldUpdateDateOnMonthYearChange?: boolean;
|
|
27
21
|
granularity?: DatePickerGranularity;
|
|
22
|
+
autoFixYear?: boolean;
|
|
28
23
|
format?: string;
|
|
29
|
-
fireBlurOnChange?: boolean;
|
|
30
24
|
}
|
|
31
25
|
export interface DatePickerProps extends Omit<DatePickerBaseProps, "value" | "onChange" | "minValue" | "maxValue"> {
|
|
32
26
|
value?: string | null;
|
|
@@ -34,8 +28,7 @@ export interface DatePickerProps extends Omit<DatePickerBaseProps, "value" | "on
|
|
|
34
28
|
fullIso?: boolean;
|
|
35
29
|
minValue?: DateValue | string;
|
|
36
30
|
maxValue?: DateValue | string;
|
|
37
|
-
renderStaticInput?: boolean;
|
|
38
31
|
}
|
|
39
32
|
export type ControlledDatePickerProps<TFieldValues extends FieldValues> = ControlProps<DatePickerProps, TFieldValues>;
|
|
40
|
-
export declare const DatePicker: <TFieldValues extends FieldValues>({ fullIso, granularity, minValue, maxValue,
|
|
33
|
+
export declare const DatePicker: <TFieldValues extends FieldValues>({ fullIso, granularity, minValue, maxValue, ...props }: ControlledDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
41
34
|
export {};
|