@povio/ui 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +102 -39
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/Button/button.cva.d.ts +3 -3
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +55 -17
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +91 -46
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/index.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
- package/dist/components/inputs/Input/shared/InputContent.js +193 -59
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +227 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +28 -0
- package/dist/components/inputs/shared/input.cva.js +38 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +28 -14
- package/dist/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +30 -11
- package/dist/config/uiOverrides.context.js +54 -14
- package/dist/helpers/dynamicInputs.d.ts +12 -9
- package/dist/helpers/dynamicInputs.js +13 -8
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +72 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +18 -3
- package/dist/index.js +15 -5
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/zod.utils.d.ts +2 -0
- package/dist/utils/zod.utils.js +5 -0
- package/package.json +2 -2
|
@@ -1,83 +1,375 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { CheckContent } from "../shared/CheckContent.js";
|
|
4
|
+
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
5
|
+
import { inputBaseDefinition, inputSizeDefinition } from "../shared/input.cva.js";
|
|
4
6
|
import { FormField } from "../FormField/FormField.js";
|
|
5
|
-
import { radioDefinition, radioIndicatorClass, radioTypography } from "./radio.cva.js";
|
|
7
|
+
import { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography } from "./radio.cva.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
6
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
10
|
import { clsx } from "clsx";
|
|
8
11
|
import { Radio, RadioGroup } from "react-aria-components";
|
|
12
|
+
import { useLabel } from "react-aria";
|
|
9
13
|
import { mergeRefs } from "@react-aria/utils";
|
|
10
14
|
import { Controller } from "react-hook-form";
|
|
11
15
|
//#region src/components/inputs/RadioGroup/RadioGroup.tsx
|
|
12
16
|
var RadioGroupBase = (props) => {
|
|
17
|
+
const $ = c(91);
|
|
13
18
|
const ui = UIConfig.useConfig();
|
|
14
19
|
const radioCva = UIOverrides.useCva("radio.cva", radioDefinition);
|
|
15
20
|
const radioTypographyMap = UIOverrides.useMapper("radio.typography", radioTypography);
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
children: /* @__PURE__ */ jsx(FormField, {
|
|
39
|
-
...formFieldProps,
|
|
40
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
41
|
-
className: clsx("flex flex-col", inputClassName),
|
|
42
|
-
children: options.map((option) => /* @__PURE__ */ jsxs(Radio, {
|
|
43
|
-
value: option.value,
|
|
44
|
-
className: clsx("relative", radioIndicatorClass),
|
|
45
|
-
children: [/* @__PURE__ */ jsx("div", { className: radioCva({
|
|
46
|
-
variant,
|
|
47
|
-
...rest
|
|
48
|
-
}) }), /* @__PURE__ */ jsx(CheckContent, {
|
|
49
|
-
typography: radioTypographyMap({
|
|
50
|
-
variant,
|
|
51
|
-
...rest
|
|
52
|
-
}),
|
|
53
|
-
className: labelClassName,
|
|
54
|
-
children: option.label
|
|
55
|
-
})]
|
|
56
|
-
}, option.value))
|
|
57
|
-
})
|
|
58
|
-
})
|
|
21
|
+
const radioContentWrapperCva = UIOverrides.useCva("radio.contentWrapperCva", radioContentWrapperDefinition);
|
|
22
|
+
const radioContentRowCva = UIOverrides.useCva("radio.contentRowCva", radioContentRowDefinition);
|
|
23
|
+
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
24
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
25
|
+
const radioContentClassNameMap = UIOverrides.useMapper("radio.contentClassName", radioContentClassName);
|
|
26
|
+
const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, onChange, onBlur, fireBlurOnChange: fireBlurOnChangeProp, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
|
|
27
|
+
const as = asProp ?? ui.input.as;
|
|
28
|
+
const size = sizeProp ?? ui.input.size;
|
|
29
|
+
const variant = variantProp ?? ui.radioGroup.variant;
|
|
30
|
+
const hideLabel = hideLabelProp ?? ui.radioGroup.hideLabel;
|
|
31
|
+
const fireBlurOnChange = fireBlurOnChangeProp ?? ui.radioGroup.fireBlurOnChange;
|
|
32
|
+
const radioClassName = radioCva({
|
|
33
|
+
variant,
|
|
34
|
+
...rest
|
|
35
|
+
});
|
|
36
|
+
const radioTypographyProps = radioTypographyMap({
|
|
37
|
+
variant,
|
|
38
|
+
...rest
|
|
39
|
+
});
|
|
40
|
+
const radioContentClassNameValue = radioContentClassNameMap({
|
|
41
|
+
variant,
|
|
42
|
+
...rest
|
|
59
43
|
});
|
|
44
|
+
const t0 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
45
|
+
let t1;
|
|
46
|
+
if ($[0] !== className || $[1] !== error || $[2] !== errorClassName || $[3] !== headerClassName || $[4] !== helperText || $[5] !== hideLabel || $[6] !== isDisabled || $[7] !== isRequired || $[8] !== label || $[9] !== rightContent || $[10] !== t0 || $[11] !== tooltipText) {
|
|
47
|
+
t1 = {
|
|
48
|
+
className,
|
|
49
|
+
error,
|
|
50
|
+
label,
|
|
51
|
+
tooltipText,
|
|
52
|
+
helperText,
|
|
53
|
+
isRequired,
|
|
54
|
+
rightContent,
|
|
55
|
+
isHeaderHidden: t0,
|
|
56
|
+
hideLabel,
|
|
57
|
+
isDisabled,
|
|
58
|
+
headerClassName,
|
|
59
|
+
errorClassName
|
|
60
|
+
};
|
|
61
|
+
$[0] = className;
|
|
62
|
+
$[1] = error;
|
|
63
|
+
$[2] = errorClassName;
|
|
64
|
+
$[3] = headerClassName;
|
|
65
|
+
$[4] = helperText;
|
|
66
|
+
$[5] = hideLabel;
|
|
67
|
+
$[6] = isDisabled;
|
|
68
|
+
$[7] = isRequired;
|
|
69
|
+
$[8] = label;
|
|
70
|
+
$[9] = rightContent;
|
|
71
|
+
$[10] = t0;
|
|
72
|
+
$[11] = tooltipText;
|
|
73
|
+
$[12] = t1;
|
|
74
|
+
} else t1 = $[12];
|
|
75
|
+
const formFieldProps = t1;
|
|
76
|
+
let t2;
|
|
77
|
+
if ($[13] !== label) {
|
|
78
|
+
t2 = { label };
|
|
79
|
+
$[13] = label;
|
|
80
|
+
$[14] = t2;
|
|
81
|
+
} else t2 = $[14];
|
|
82
|
+
const { labelProps, fieldProps } = useLabel(t2);
|
|
83
|
+
const t3 = hideLabel || isHeaderHidden;
|
|
84
|
+
let t4;
|
|
85
|
+
if ($[15] !== headerClassName || $[16] !== helperText || $[17] !== isDisabled || $[18] !== isRequired || $[19] !== label || $[20] !== labelProps || $[21] !== rightContent || $[22] !== t3 || $[23] !== tooltipText) {
|
|
86
|
+
t4 = {
|
|
87
|
+
label,
|
|
88
|
+
tooltipText,
|
|
89
|
+
helperText,
|
|
90
|
+
isRequired,
|
|
91
|
+
rightContent,
|
|
92
|
+
isHeaderHidden: t3,
|
|
93
|
+
isDisabled,
|
|
94
|
+
className: headerClassName,
|
|
95
|
+
labelProps
|
|
96
|
+
};
|
|
97
|
+
$[15] = headerClassName;
|
|
98
|
+
$[16] = helperText;
|
|
99
|
+
$[17] = isDisabled;
|
|
100
|
+
$[18] = isRequired;
|
|
101
|
+
$[19] = label;
|
|
102
|
+
$[20] = labelProps;
|
|
103
|
+
$[21] = rightContent;
|
|
104
|
+
$[22] = t3;
|
|
105
|
+
$[23] = tooltipText;
|
|
106
|
+
$[24] = t4;
|
|
107
|
+
} else t4 = $[24];
|
|
108
|
+
const headerProps = t4;
|
|
109
|
+
const selectedValue = value ?? defaultValue;
|
|
110
|
+
const shouldRenderInputFrame = as !== "default";
|
|
111
|
+
let t5;
|
|
112
|
+
if ($[25] !== fireBlurOnChange || $[26] !== onBlur || $[27] !== onChange) {
|
|
113
|
+
t5 = (nextValue) => {
|
|
114
|
+
onChange?.(nextValue);
|
|
115
|
+
if (fireBlurOnChange) onBlur?.({});
|
|
116
|
+
};
|
|
117
|
+
$[25] = fireBlurOnChange;
|
|
118
|
+
$[26] = onBlur;
|
|
119
|
+
$[27] = onChange;
|
|
120
|
+
$[28] = t5;
|
|
121
|
+
} else t5 = $[28];
|
|
122
|
+
const handleChange = t5;
|
|
123
|
+
const T0 = RadioGroup;
|
|
124
|
+
const t6 = !!error;
|
|
125
|
+
const t7 = isDirty || void 0;
|
|
126
|
+
const t8 = isRequired || void 0;
|
|
127
|
+
const t9 = "group";
|
|
128
|
+
const T1 = FormField;
|
|
129
|
+
const t10 = as === "inline" && "h-full";
|
|
130
|
+
let t11;
|
|
131
|
+
if ($[29] !== className || $[30] !== t10) {
|
|
132
|
+
t11 = clsx("w-full", t10, className);
|
|
133
|
+
$[29] = className;
|
|
134
|
+
$[30] = t10;
|
|
135
|
+
$[31] = t11;
|
|
136
|
+
} else t11 = $[31];
|
|
137
|
+
const t12 = as === "inline" ? -1 : void 0;
|
|
138
|
+
let t13;
|
|
139
|
+
if ($[32] !== as || $[33] !== inputBaseCva || $[34] !== inputClassName || $[35] !== shouldRenderInputFrame || $[36] !== ui) {
|
|
140
|
+
t13 = clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
|
|
141
|
+
variant: ui.input.variant,
|
|
142
|
+
as
|
|
143
|
+
}), inputClassName);
|
|
144
|
+
$[32] = as;
|
|
145
|
+
$[33] = inputBaseCva;
|
|
146
|
+
$[34] = inputClassName;
|
|
147
|
+
$[35] = shouldRenderInputFrame;
|
|
148
|
+
$[36] = ui;
|
|
149
|
+
$[37] = t13;
|
|
150
|
+
} else t13 = $[37];
|
|
151
|
+
const t14 = "";
|
|
152
|
+
const t15 = isDisabled || void 0;
|
|
153
|
+
const t16 = isDisabled || void 0;
|
|
154
|
+
const t17 = !!error || void 0;
|
|
155
|
+
const t18 = selectedValue != null && selectedValue !== "" ? true : void 0;
|
|
156
|
+
const t19 = "";
|
|
157
|
+
const t20 = clsx(radioContentWrapperCva({
|
|
158
|
+
variant,
|
|
159
|
+
as,
|
|
160
|
+
hasInputFrame: shouldRenderInputFrame,
|
|
161
|
+
...rest
|
|
162
|
+
}), shouldRenderInputFrame && inputSizeCva({
|
|
163
|
+
as,
|
|
164
|
+
size
|
|
165
|
+
}));
|
|
166
|
+
const t21 = isDirty || void 0;
|
|
167
|
+
const t22 = isRequired || void 0;
|
|
168
|
+
let t23;
|
|
169
|
+
if ($[38] !== as || $[39] !== headerProps || $[40] !== size) {
|
|
170
|
+
t23 = as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
171
|
+
as,
|
|
172
|
+
size,
|
|
173
|
+
...headerProps
|
|
174
|
+
});
|
|
175
|
+
$[38] = as;
|
|
176
|
+
$[39] = headerProps;
|
|
177
|
+
$[40] = size;
|
|
178
|
+
$[41] = t23;
|
|
179
|
+
} else t23 = $[41];
|
|
180
|
+
const t24 = radioContentRowCva({
|
|
181
|
+
variant,
|
|
182
|
+
as,
|
|
183
|
+
hasInputFrame: shouldRenderInputFrame,
|
|
184
|
+
...rest
|
|
185
|
+
});
|
|
186
|
+
let t25;
|
|
187
|
+
if ($[42] !== labelClassName || $[43] !== options || $[44] !== radioClassName || $[45] !== radioContentClassNameValue || $[46] !== radioTypographyProps) {
|
|
188
|
+
let t26;
|
|
189
|
+
if ($[48] !== labelClassName || $[49] !== radioClassName || $[50] !== radioContentClassNameValue || $[51] !== radioTypographyProps) {
|
|
190
|
+
t26 = (option) => /* @__PURE__ */ jsxs(Radio, {
|
|
191
|
+
value: option.value,
|
|
192
|
+
className: clsx("relative", radioIndicatorClass),
|
|
193
|
+
children: [/* @__PURE__ */ jsx("div", { className: radioClassName }), /* @__PURE__ */ jsx(CheckContent, {
|
|
194
|
+
typography: radioTypographyProps,
|
|
195
|
+
contentClassName: radioContentClassNameValue,
|
|
196
|
+
className: labelClassName,
|
|
197
|
+
children: option.label
|
|
198
|
+
})]
|
|
199
|
+
}, option.value);
|
|
200
|
+
$[48] = labelClassName;
|
|
201
|
+
$[49] = radioClassName;
|
|
202
|
+
$[50] = radioContentClassNameValue;
|
|
203
|
+
$[51] = radioTypographyProps;
|
|
204
|
+
$[52] = t26;
|
|
205
|
+
} else t26 = $[52];
|
|
206
|
+
t25 = options.map(t26);
|
|
207
|
+
$[42] = labelClassName;
|
|
208
|
+
$[43] = options;
|
|
209
|
+
$[44] = radioClassName;
|
|
210
|
+
$[45] = radioContentClassNameValue;
|
|
211
|
+
$[46] = radioTypographyProps;
|
|
212
|
+
$[47] = t25;
|
|
213
|
+
} else t25 = $[47];
|
|
214
|
+
let t26;
|
|
215
|
+
if ($[53] !== t24 || $[54] !== t25) {
|
|
216
|
+
t26 = /* @__PURE__ */ jsx("div", {
|
|
217
|
+
className: t24,
|
|
218
|
+
children: t25
|
|
219
|
+
});
|
|
220
|
+
$[53] = t24;
|
|
221
|
+
$[54] = t25;
|
|
222
|
+
$[55] = t26;
|
|
223
|
+
} else t26 = $[55];
|
|
224
|
+
let t27;
|
|
225
|
+
if ($[56] !== t20 || $[57] !== t21 || $[58] !== t22 || $[59] !== t23 || $[60] !== t26) {
|
|
226
|
+
t27 = /* @__PURE__ */ jsxs("div", {
|
|
227
|
+
className: t20,
|
|
228
|
+
"data-is-dirty": t21,
|
|
229
|
+
"data-is-required": t22,
|
|
230
|
+
children: [t23, t26]
|
|
231
|
+
});
|
|
232
|
+
$[56] = t20;
|
|
233
|
+
$[57] = t21;
|
|
234
|
+
$[58] = t22;
|
|
235
|
+
$[59] = t23;
|
|
236
|
+
$[60] = t26;
|
|
237
|
+
$[61] = t27;
|
|
238
|
+
} else t27 = $[61];
|
|
239
|
+
let t28;
|
|
240
|
+
if ($[62] !== t13 || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t27) {
|
|
241
|
+
t28 = /* @__PURE__ */ jsx("div", {
|
|
242
|
+
className: t13,
|
|
243
|
+
"data-rac": t14,
|
|
244
|
+
"data-disabled": t15,
|
|
245
|
+
"data-is-disabled": t16,
|
|
246
|
+
"data-invalid": t17,
|
|
247
|
+
"data-has-selection": t18,
|
|
248
|
+
"data-radio-group-content": t19,
|
|
249
|
+
children: t27
|
|
250
|
+
});
|
|
251
|
+
$[62] = t13;
|
|
252
|
+
$[63] = t15;
|
|
253
|
+
$[64] = t16;
|
|
254
|
+
$[65] = t17;
|
|
255
|
+
$[66] = t18;
|
|
256
|
+
$[67] = t27;
|
|
257
|
+
$[68] = t28;
|
|
258
|
+
} else t28 = $[68];
|
|
259
|
+
let t29;
|
|
260
|
+
if ($[69] !== T1 || $[70] !== as || $[71] !== formFieldProps || $[72] !== labelProps || $[73] !== t11 || $[74] !== t12 || $[75] !== t28) {
|
|
261
|
+
t29 = /* @__PURE__ */ jsx(T1, {
|
|
262
|
+
...formFieldProps,
|
|
263
|
+
as,
|
|
264
|
+
labelProps,
|
|
265
|
+
className: t11,
|
|
266
|
+
tabIndex: t12,
|
|
267
|
+
children: t28
|
|
268
|
+
});
|
|
269
|
+
$[69] = T1;
|
|
270
|
+
$[70] = as;
|
|
271
|
+
$[71] = formFieldProps;
|
|
272
|
+
$[72] = labelProps;
|
|
273
|
+
$[73] = t11;
|
|
274
|
+
$[74] = t12;
|
|
275
|
+
$[75] = t28;
|
|
276
|
+
$[76] = t29;
|
|
277
|
+
} else t29 = $[76];
|
|
278
|
+
let t30;
|
|
279
|
+
if ($[77] !== T0 || $[78] !== defaultValue || $[79] !== fieldProps || $[80] !== handleChange || $[81] !== isDisabled || $[82] !== onBlur || $[83] !== ref || $[84] !== rest || $[85] !== t29 || $[86] !== t6 || $[87] !== t7 || $[88] !== t8 || $[89] !== value) {
|
|
280
|
+
t30 = /* @__PURE__ */ jsx(T0, {
|
|
281
|
+
...rest,
|
|
282
|
+
...fieldProps,
|
|
283
|
+
ref,
|
|
284
|
+
value,
|
|
285
|
+
defaultValue,
|
|
286
|
+
onChange: handleChange,
|
|
287
|
+
onBlur,
|
|
288
|
+
isDisabled,
|
|
289
|
+
isInvalid: t6,
|
|
290
|
+
"data-is-dirty": t7,
|
|
291
|
+
"data-is-required": t8,
|
|
292
|
+
className: t9,
|
|
293
|
+
children: t29
|
|
294
|
+
});
|
|
295
|
+
$[77] = T0;
|
|
296
|
+
$[78] = defaultValue;
|
|
297
|
+
$[79] = fieldProps;
|
|
298
|
+
$[80] = handleChange;
|
|
299
|
+
$[81] = isDisabled;
|
|
300
|
+
$[82] = onBlur;
|
|
301
|
+
$[83] = ref;
|
|
302
|
+
$[84] = rest;
|
|
303
|
+
$[85] = t29;
|
|
304
|
+
$[86] = t6;
|
|
305
|
+
$[87] = t7;
|
|
306
|
+
$[88] = t8;
|
|
307
|
+
$[89] = value;
|
|
308
|
+
$[90] = t30;
|
|
309
|
+
} else t30 = $[90];
|
|
310
|
+
return t30;
|
|
60
311
|
};
|
|
61
312
|
var RadioGroup$1 = (props) => {
|
|
313
|
+
const $ = c(15);
|
|
62
314
|
if ("formControl" in props && props.formControl) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
315
|
+
let formControl;
|
|
316
|
+
let innerProps;
|
|
317
|
+
let ref;
|
|
318
|
+
if ($[0] !== props) {
|
|
319
|
+
({formControl, ref, ...innerProps} = props);
|
|
320
|
+
$[0] = props;
|
|
321
|
+
$[1] = formControl;
|
|
322
|
+
$[2] = innerProps;
|
|
323
|
+
$[3] = ref;
|
|
324
|
+
} else {
|
|
325
|
+
formControl = $[1];
|
|
326
|
+
innerProps = $[2];
|
|
327
|
+
ref = $[3];
|
|
328
|
+
}
|
|
329
|
+
let t0;
|
|
330
|
+
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
331
|
+
t0 = (t1) => {
|
|
332
|
+
const { field, fieldState: t2 } = t1;
|
|
333
|
+
const { error, isDirty } = t2;
|
|
334
|
+
return /* @__PURE__ */ jsx(RadioGroupBase, {
|
|
335
|
+
...innerProps,
|
|
336
|
+
ref: mergeRefs(ref, field.ref),
|
|
337
|
+
value: field.value,
|
|
338
|
+
onChange: field.onChange,
|
|
339
|
+
onBlur: field.onBlur,
|
|
340
|
+
name: field.name,
|
|
341
|
+
isDirty,
|
|
342
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
343
|
+
error: props.error ?? error?.message
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
$[4] = innerProps;
|
|
347
|
+
$[5] = props.error;
|
|
348
|
+
$[6] = props.isDisabled;
|
|
349
|
+
$[7] = ref;
|
|
350
|
+
$[8] = t0;
|
|
351
|
+
} else t0 = $[8];
|
|
352
|
+
let t1;
|
|
353
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
354
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
355
|
+
control: formControl.control,
|
|
356
|
+
name: formControl.name,
|
|
357
|
+
render: t0
|
|
358
|
+
});
|
|
359
|
+
$[9] = formControl.control;
|
|
360
|
+
$[10] = formControl.name;
|
|
361
|
+
$[11] = t0;
|
|
362
|
+
$[12] = t1;
|
|
363
|
+
} else t1 = $[12];
|
|
364
|
+
return t1;
|
|
79
365
|
}
|
|
80
|
-
|
|
366
|
+
let t0;
|
|
367
|
+
if ($[13] !== props) {
|
|
368
|
+
t0 = /* @__PURE__ */ jsx(RadioGroupBase, { ...props });
|
|
369
|
+
$[13] = props;
|
|
370
|
+
$[14] = t0;
|
|
371
|
+
} else t0 = $[14];
|
|
372
|
+
return t0;
|
|
81
373
|
};
|
|
82
374
|
//#endregion
|
|
83
375
|
export { RadioGroup$1 as RadioGroup };
|
|
@@ -11,7 +11,52 @@ export declare const radioDefinition: {
|
|
|
11
11
|
export type RadioConfig = NonNullable<typeof radioDefinition.config>;
|
|
12
12
|
export interface RadioVariantProps extends UIOverrides.VariantProps<RadioConfig> {
|
|
13
13
|
}
|
|
14
|
+
export declare const radioContentWrapperDefinition: {
|
|
15
|
+
base: string[];
|
|
16
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
17
|
+
readonly variant: {
|
|
18
|
+
readonly default: "";
|
|
19
|
+
};
|
|
20
|
+
readonly as: {
|
|
21
|
+
readonly default: "flex-col";
|
|
22
|
+
readonly floating: "flex-col";
|
|
23
|
+
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
24
|
+
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
25
|
+
};
|
|
26
|
+
readonly hasInputFrame: {
|
|
27
|
+
readonly true: "gap-2";
|
|
28
|
+
readonly false: "";
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
export type RadioContentWrapperConfig = NonNullable<typeof radioContentWrapperDefinition.config>;
|
|
33
|
+
export interface RadioContentWrapperVariantProps extends UIOverrides.VariantProps<RadioContentWrapperConfig> {
|
|
34
|
+
}
|
|
35
|
+
export declare const radioContentRowDefinition: {
|
|
36
|
+
base: string[];
|
|
37
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
38
|
+
readonly variant: {
|
|
39
|
+
readonly default: "";
|
|
40
|
+
};
|
|
41
|
+
readonly as: {
|
|
42
|
+
readonly default: "flex-col";
|
|
43
|
+
readonly floating: "flex-col";
|
|
44
|
+
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
45
|
+
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
46
|
+
};
|
|
47
|
+
readonly hasInputFrame: {
|
|
48
|
+
readonly true: "gap-2";
|
|
49
|
+
readonly false: "";
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
export type RadioContentRowConfig = NonNullable<typeof radioContentRowDefinition.config>;
|
|
54
|
+
export interface RadioContentRowVariantProps extends UIOverrides.VariantProps<RadioContentRowConfig> {
|
|
55
|
+
}
|
|
14
56
|
export declare const radioIndicatorClass = "group flex items-center gap-2";
|
|
15
57
|
export declare const radioTypography: (props: {
|
|
16
58
|
readonly variant?: "default" | null | undefined;
|
|
17
59
|
}) => TypographyVariantProps | undefined;
|
|
60
|
+
export declare const radioContentClassName: (props: {
|
|
61
|
+
readonly variant?: "default" | null | undefined;
|
|
62
|
+
}) => string | undefined;
|
|
@@ -28,11 +28,58 @@ var radioDefinition = UIOverrides.defineConfig({
|
|
|
28
28
|
defaultVariants: { variant: "default" }
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
+
var radioContentWrapperDefinition = UIOverrides.defineConfig({
|
|
32
|
+
base: ["relative flex"],
|
|
33
|
+
config: {
|
|
34
|
+
variants: {
|
|
35
|
+
variant: { default: "" },
|
|
36
|
+
as: {
|
|
37
|
+
default: "flex-col",
|
|
38
|
+
floating: "flex-col",
|
|
39
|
+
filter: "flex-row flex-wrap items-center gap-2",
|
|
40
|
+
inline: "flex-row flex-wrap items-center gap-2"
|
|
41
|
+
},
|
|
42
|
+
hasInputFrame: {
|
|
43
|
+
true: "gap-2",
|
|
44
|
+
false: ""
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
variant: "default",
|
|
49
|
+
as: "default",
|
|
50
|
+
hasInputFrame: false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var radioContentRowDefinition = UIOverrides.defineConfig({
|
|
55
|
+
base: ["flex"],
|
|
56
|
+
config: {
|
|
57
|
+
variants: {
|
|
58
|
+
variant: { default: "" },
|
|
59
|
+
as: {
|
|
60
|
+
default: "flex-col",
|
|
61
|
+
floating: "flex-col",
|
|
62
|
+
filter: "flex-row flex-wrap items-center gap-2",
|
|
63
|
+
inline: "flex-row flex-wrap items-center gap-2"
|
|
64
|
+
},
|
|
65
|
+
hasInputFrame: {
|
|
66
|
+
true: "gap-2",
|
|
67
|
+
false: ""
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
defaultVariants: {
|
|
71
|
+
variant: "default",
|
|
72
|
+
as: "default",
|
|
73
|
+
hasInputFrame: false
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
31
77
|
var radioIndicatorClass = "group flex items-center gap-2";
|
|
32
78
|
var radioTypography = compoundMapper({ default: {
|
|
33
79
|
size: "label-1",
|
|
34
80
|
sizeMobile: "label-1",
|
|
35
81
|
variant: "default"
|
|
36
82
|
} });
|
|
83
|
+
var radioContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
37
84
|
//#endregion
|
|
38
|
-
export { radioDefinition, radioIndicatorClass, radioTypography };
|
|
85
|
+
export { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
import { Key } from 'react-aria-components';
|
|
2
3
|
import { FieldValues } from 'react-hook-form';
|
|
3
4
|
import { SelectBaseProps } from '../shared/SelectBase';
|
|
4
5
|
import { DefaultInitialSelectItem, GroupedSelectControlProps, GroupedSelectProps } from '../shared/select.types';
|
|
5
6
|
import { OmitDiscriminatedUnion } from '../../../../types/common';
|
|
6
|
-
export type AutocompleteProps<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = OmitDiscriminatedUnion<SelectBaseProps<TKey, TInitialSelectItem>, "isSearchable"
|
|
7
|
+
export type AutocompleteProps<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = OmitDiscriminatedUnion<SelectBaseProps<TKey, TInitialSelectItem>, "isSearchable"> & {
|
|
8
|
+
renderStaticInput?: boolean;
|
|
9
|
+
};
|
|
7
10
|
export type ControlledAutocompleteProps<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = Omit<AutocompleteProps<TKey, TInitialSelectItem>, keyof GroupedSelectProps> & GroupedSelectControlProps<TFieldValues, TKey, TInitialSelectItem>;
|
|
8
|
-
export declare
|
|
11
|
+
export declare function Autocomplete<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: AutocompleteProps<TKey, TInitialSelectItem>): ReactElement;
|
|
12
|
+
export declare function Autocomplete<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: ControlledAutocompleteProps<TFieldValues, TKey, TInitialSelectItem>): ReactElement;
|