@povio/ui 2.3.2 → 3.0.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/locales/sl/translation.json.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.js +11 -11
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +40 -14
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +21 -18
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +6 -6
- package/dist/components/Menu/MenuPopover.js +8 -8
- package/dist/components/Menu/menu.cva.d.ts +35 -13
- package/dist/components/Menu/menu.cva.js +30 -24
- package/dist/components/buttons/Button/Button.js +7 -7
- package/dist/components/buttons/Button/button.cva.d.ts +95 -26
- package/dist/components/buttons/Button/button.cva.js +601 -589
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +247 -239
- package/dist/components/buttons/shared/ButtonContent.js +3 -3
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +3 -5
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -8
- package/dist/components/inputs/Checkbox/Checkbox.js +2 -2
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +4 -4
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +23 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.js +46 -40
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +150 -68
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +4 -4
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +3 -3
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +26 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.js +48 -40
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +23 -6
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +29 -20
- package/dist/components/inputs/FormField/FormFieldError.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +3 -3
- package/dist/components/inputs/FormField/FormFieldLabel.js +6 -6
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -8
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -8
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +3 -3
- package/dist/components/inputs/Input/TextArea/TextArea.js +4 -4
- package/dist/components/inputs/Input/TextInput/TextInput.js +3 -3
- package/dist/components/inputs/Input/shared/InputContent.js +5 -5
- package/dist/components/inputs/RadioGroup/RadioGroup.js +4 -4
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +12 -6
- package/dist/components/inputs/RadioGroup/radio.cva.js +27 -24
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectInput.js +4 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +3 -3
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -6
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +21 -18
- package/dist/components/inputs/TextEditor/TextEditor.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +3 -3
- package/dist/components/inputs/Toggle/Toggle.js +4 -4
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +12 -6
- package/dist/components/inputs/Toggle/toggle.cva.js +24 -21
- package/dist/components/inputs/shared/CheckContent.js +3 -3
- package/dist/components/inputs/shared/input.cva.d.ts +55 -16
- package/dist/components/inputs/shared/input.cva.js +279 -271
- package/dist/components/inputs/shared/label.cva.d.ts +15 -6
- package/dist/components/inputs/shared/label.cva.js +28 -25
- package/dist/components/navigation/Accordion/Accordion.js +3 -3
- package/dist/components/navigation/Accordion/AccordionItem.js +11 -11
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +109 -44
- package/dist/components/navigation/Accordion/accordion.cva.js +114 -84
- package/dist/components/navigation/Stepper/Stepper.js +3 -3
- package/dist/components/navigation/Stepper/StepperItem.js +12 -12
- package/dist/components/navigation/Stepper/StepperSeparator.js +3 -3
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +86 -30
- package/dist/components/navigation/Stepper/stepper.cva.js +104 -83
- package/dist/components/overlays/Modal/Modal.js +5 -5
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -9
- package/dist/components/overlays/Modal/modal.cva.js +38 -27
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +3 -3
- package/dist/components/overlays/Tooltip/Tooltip.js +9 -9
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +45 -17
- package/dist/components/overlays/Tooltip/tooltip.cva.js +38 -26
- package/dist/components/segment/Segment.js +4 -4
- package/dist/components/segment/SegmentItem.js +4 -4
- package/dist/components/segment/segment.cva.d.ts +18 -7
- package/dist/components/segment/segment.cva.js +24 -21
- package/dist/components/shared/popover.cva.d.ts +7 -3
- package/dist/components/shared/popover.cva.js +3 -3
- package/dist/components/status/Alert/Alert.js +6 -6
- package/dist/components/status/Alert/alert.cva.d.ts +18 -6
- package/dist/components/status/Alert/alert.cva.js +60 -57
- package/dist/components/status/Loader/loader.cva.d.ts +23 -4
- package/dist/components/status/Loader/loader.cva.js +22 -13
- package/dist/components/status/Toast/Toast.js +6 -7
- package/dist/components/status/Toast/toast.cva.d.ts +61 -10
- package/dist/components/status/Toast/toast.cva.js +129 -64
- package/dist/components/status/shared/status.cva.d.ts +30 -8
- package/dist/components/status/shared/status.cva.js +56 -50
- package/dist/components/table/CellText.js +3 -3
- package/dist/components/table/HeaderText.js +3 -3
- package/dist/components/table/Table.js +6 -6
- package/dist/components/table/table.cva.d.ts +52 -19
- package/dist/components/table/table.cva.js +44 -35
- package/dist/components/text/Link/Link.js +3 -3
- package/dist/components/text/Link/link.cva.d.ts +11 -5
- package/dist/components/text/Link/link.cva.js +8 -5
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/components/text/Tag/tag.cva.d.ts +15 -5
- package/dist/components/text/Tag/tag.cva.js +51 -48
- package/dist/components/text/Typography/Typography.js +3 -3
- package/dist/components/text/Typography/typography.cva.d.ts +48 -7
- package/dist/components/text/Typography/typography.cva.js +125 -122
- package/dist/config/uiOverrides.context.d.ts +174 -0
- package/dist/config/uiOverrides.context.js +73 -0
- package/dist/index.d.ts +29 -1
- package/dist/index.js +30 -2
- package/dist/utils/style-merge.util.d.ts +43 -0
- package/dist/utils/style-merge.util.js +233 -0
- package/dist/utils/style-merge.util.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/config/uiStyle.context.d.ts +0 -162
- package/dist/config/uiStyle.context.js +0 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
|
+
import { popoverDefinition } from "../../../shared/popover.cva.js";
|
|
3
3
|
import { FormField } from "../../FormField/FormField.js";
|
|
4
4
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
5
5
|
import "./useSelectItems.js";
|
|
@@ -15,7 +15,7 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
15
15
|
//#region src/components/inputs/Selection/shared/SelectDesktop.tsx
|
|
16
16
|
var SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur, ...props }) => {
|
|
17
17
|
const { label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, isSearchable, isClearable, isLoading, as, size, collapseAfter, selectedTagsType } = props;
|
|
18
|
-
const popoverCva =
|
|
18
|
+
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
19
19
|
const formFieldProps = {
|
|
20
20
|
error,
|
|
21
21
|
label,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
3
3
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
5
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
6
6
|
import { InputClear } from "../../shared/InputClear.js";
|
|
7
|
-
import {
|
|
7
|
+
import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
8
8
|
import { SelectInputTags } from "./SelectInputTags.js";
|
|
9
9
|
import { SelectContext } from "./select.context.js";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -15,8 +15,8 @@ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
|
15
15
|
import { useTranslation } from "react-i18next";
|
|
16
16
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
17
17
|
var SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, onCloseComboBox, onBlur, ...props }) => {
|
|
18
|
-
const inputSizeCva =
|
|
19
|
-
const inputBaseCva =
|
|
18
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
19
|
+
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
20
20
|
const { t } = useTranslation("ui");
|
|
21
21
|
const state = use(ComboBoxStateContext);
|
|
22
22
|
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
import "../../../../config/i18n.js";
|
|
3
3
|
import { CheckboxCheckmark } from "../../Checkbox/CheckboxCheckmark.js";
|
|
4
4
|
import { SelectContext } from "./select.context.js";
|
|
5
|
-
import {
|
|
5
|
+
import { selectListBoxItemDefinition } from "./selectItem.cva.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useMemo, useRef } from "react";
|
|
8
8
|
import { ListBoxItem } from "react-aria-components";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
//#region src/components/inputs/Selection/shared/SelectListBoxItem.tsx
|
|
11
11
|
var SelectListBoxItem = ({ isSearchable, isNewItem, newItemRender, id, label, content, isDisabled }) => {
|
|
12
|
-
const selectListItemCva =
|
|
12
|
+
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
13
13
|
const ref = useRef(null);
|
|
14
14
|
const { t } = useTranslation("ui");
|
|
15
15
|
const { selectedIds, isMultiple } = SelectContext.useSelect();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
import "../../../../config/i18n.js";
|
|
3
3
|
import { CheckboxCheckmark } from "../../Checkbox/CheckboxCheckmark.js";
|
|
4
4
|
import { SelectContext } from "./select.context.js";
|
|
5
|
-
import {
|
|
5
|
+
import { selectListBoxItemDefinition } from "./selectItem.cva.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useRef } from "react";
|
|
8
8
|
import { ListBoxItem } from "react-aria-components";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
//#region src/components/inputs/Selection/shared/SelectListBoxItemSelectAll.tsx
|
|
11
11
|
var SelectListBoxItemSelectAll = ({ id, label, isDisabled }) => {
|
|
12
|
-
const selectListItemCva =
|
|
12
|
+
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
13
13
|
const ref = useRef(null);
|
|
14
14
|
const { t } = useTranslation("ui");
|
|
15
15
|
const { selectableListItems, selectedIds } = SelectContext.useSelect();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
import { Loader } from "../../../status/Loader/Loader.js";
|
|
3
3
|
import "../../../../config/i18n.js";
|
|
4
4
|
import { SelectContext } from "./select.context.js";
|
|
5
|
-
import {
|
|
5
|
+
import { selectListBoxItemDefinition } from "./selectItem.cva.js";
|
|
6
6
|
import { useIntersectionObserver } from "../../../../hooks/useIntersectionObserver.js";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { useCallback } from "react";
|
|
@@ -10,7 +10,7 @@ import { ListBoxItem } from "react-aria-components";
|
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
//#region src/components/inputs/Selection/shared/SelectListBoxLoadingItem.tsx
|
|
12
12
|
var SelectListBoxLoadingItem = ({ id, label, onLoadMore }) => {
|
|
13
|
-
const selectListItemCva =
|
|
13
|
+
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
14
14
|
const { t } = useTranslation("ui");
|
|
15
15
|
const { isDebouncing, isLoading, hasLoadMore } = SelectContext.useSelect();
|
|
16
16
|
const { ref } = useIntersectionObserver({
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { UIOverrides } from '../../../../config/uiOverrides.context';
|
|
2
|
+
export declare const selectListBoxItemDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly isSingle: {
|
|
6
|
+
readonly true: "selected:bg-interactive-contained-primary-idle selected:text-interactive-contained-primary-on-idle";
|
|
7
|
+
};
|
|
8
|
+
readonly isNewItem: {
|
|
9
|
+
readonly true: "text-interactive-text-primary-idle";
|
|
10
|
+
readonly false: "text-interactive-text-secondary-idle";
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
export type SelectListBoxItemConfig = NonNullable<typeof selectListBoxItemDefinition.config>;
|
|
15
|
+
export interface SelectListBoxItemCva extends UIOverrides.VariantProps<SelectListBoxItemConfig> {
|
|
16
|
+
}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/inputs/Selection/shared/selectItem.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
true: "
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
var selectListBoxItemDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: [
|
|
5
|
+
"group flex cursor-pointer items-center gap-2 px-list-side-item-left py-list-height-item",
|
|
6
|
+
"border-b border-b-elevation-outline-default-1 outline-none",
|
|
7
|
+
"font-labels-default text-label-2",
|
|
8
|
+
"hover:text-interactive-text-secondary-hover",
|
|
9
|
+
"focus-visible:bg-interactive-contained-primary-focus focus-visible:text-interactive-text-secondary-idle-inverted",
|
|
10
|
+
"disabled:cursor-default disabled:text-interactive-text-secondary-disabled"
|
|
11
|
+
],
|
|
12
|
+
config: {
|
|
13
|
+
variants: {
|
|
14
|
+
isSingle: { true: "selected:bg-interactive-contained-primary-idle selected:text-interactive-contained-primary-on-idle" },
|
|
15
|
+
isNewItem: {
|
|
16
|
+
true: "text-interactive-text-primary-idle",
|
|
17
|
+
false: "text-interactive-text-secondary-idle"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: { isNewItem: false }
|
|
21
|
+
}
|
|
19
22
|
});
|
|
20
23
|
//#endregion
|
|
21
|
-
export {
|
|
24
|
+
export { selectListBoxItemDefinition };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { isEqual } from "../../../utils/isEqual.js";
|
|
3
3
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
4
4
|
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
5
|
-
import {
|
|
5
|
+
import { inputSideDefinition } from "../shared/input.cva.js";
|
|
6
6
|
import { FormField } from "../FormField/FormField.js";
|
|
7
7
|
import { TextEditorToolbar } from "./Toolbar/TextEditorToolbar.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -43,7 +43,7 @@ var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tool
|
|
|
43
43
|
const [isFocused, setIsFocused] = useState(false);
|
|
44
44
|
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
|
|
45
45
|
const { isFocusVisible } = useFocusVisible();
|
|
46
|
-
const inputSideCva =
|
|
46
|
+
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
47
47
|
const formFieldProps = {
|
|
48
48
|
error,
|
|
49
49
|
label,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
3
3
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
4
4
|
import { useInputCva } from "../../shared/input.cva.js";
|
|
5
|
-
import {
|
|
5
|
+
import { popoverDefinition } from "../../../shared/popover.cva.js";
|
|
6
6
|
import { ColorPicker } from "./ColorPicker.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { clsx } from "clsx";
|
|
@@ -11,7 +11,7 @@ import { Button, Dialog, DialogTrigger, Popover } from "react-aria-components";
|
|
|
11
11
|
//#region src/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.tsx
|
|
12
12
|
var ColorPickerDropdown = ({ colors, value, onChange, isDisabled, children }) => {
|
|
13
13
|
const inputCva = useInputCva();
|
|
14
|
-
const popoverCva =
|
|
14
|
+
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
15
15
|
const [isOpen, setIsOpen] = useState(false);
|
|
16
16
|
const handleChange = (color) => {
|
|
17
17
|
onChange(color);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { FormFieldError } from "../FormField/FormFieldError.js";
|
|
4
4
|
import { CheckContent } from "../shared/CheckContent.js";
|
|
5
|
-
import {
|
|
5
|
+
import { toggleDefinition, toggleTypography } from "./toggle.cva.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { Switch } from "react-aria-components";
|
|
@@ -11,8 +11,8 @@ import { Controller } from "react-hook-form";
|
|
|
11
11
|
//#region src/components/inputs/Toggle/Toggle.tsx
|
|
12
12
|
var ToggleBase = (props) => {
|
|
13
13
|
const ui = UIConfig.useConfig();
|
|
14
|
-
const toggleCva =
|
|
15
|
-
const toggleTypographyMap =
|
|
14
|
+
const toggleCva = UIOverrides.useCva("toggle.cva", toggleDefinition);
|
|
15
|
+
const toggleTypographyMap = UIOverrides.useMapper("toggle.typography", toggleTypography);
|
|
16
16
|
const { className, children, isDisabled, error, variant = ui.toggle.variant, ...rest } = props;
|
|
17
17
|
const formFieldErrorProps = {
|
|
18
18
|
error,
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import { TypographyVariantProps } from '../../text/Typography/typography.cva';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
3
|
+
export declare const toggleDefinition: {
|
|
4
|
+
base: string[];
|
|
5
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
6
|
+
readonly variant: {
|
|
7
|
+
readonly default: ["bg-interactive-contained-secondary-idle", "group-disabled:bg-interactive-contained-secondary-disabled", "group-hover:bg-interactive-contained-secondary-hover", "group-pressed:bg-interactive-contained-secondary-pressed", "group-selected:bg-interactive-contained-primary-idle", "group-selected:group-hover:bg-interactive-contained-primary-hover", "group-selected:group-pressed:bg-interactive-contained-primary-pressed", "group-focus-visible:outline-interactive-text-secondary-focus", "before:bg-interactive-contained-secondary-on-idle", "group-hover:before:bg-interactive-contained-secondary-on-hover", "group-disabled:before:bg-interactive-contained-secondary-on-disabled", "group-selected:before:bg-interactive-contained-primary-on-idle", "group-selected:group-hover:before:bg-interactive-contained-primary-on-hover", "group-selected:group-pressed:before:bg-interactive-contained-primary-on-pressed", "group-selected:group-disabled:bg-interactive-contained-primary-disabled"];
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
export type ToggleConfig = NonNullable<typeof toggleDefinition.config>;
|
|
12
|
+
export interface ToggleVariantProps extends UIOverrides.VariantProps<ToggleConfig> {
|
|
7
13
|
}
|
|
8
14
|
export declare const toggleTypography: (props: {
|
|
9
|
-
variant?: "default" | null | undefined;
|
|
15
|
+
readonly variant?: "default" | null | undefined;
|
|
10
16
|
}) => TypographyVariantProps | undefined;
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { uiGroupOutlineClass } from "../../outline.clsx.js";
|
|
2
3
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
4
|
//#region src/components/inputs/Toggle/toggle.cva.ts
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
var toggleDefinition = UIOverrides.defineConfig({
|
|
6
|
+
base: ["h-6 w-10 rounded-full before:m-0-5 before:block before:aspect-square before:h-5 before:rounded-full before:transition-transform before:content-[''] group-selected:before:translate-x-4", uiGroupOutlineClass],
|
|
7
|
+
config: {
|
|
8
|
+
variants: { variant: { default: [
|
|
9
|
+
"bg-interactive-contained-secondary-idle",
|
|
10
|
+
"group-disabled:bg-interactive-contained-secondary-disabled",
|
|
11
|
+
"group-hover:bg-interactive-contained-secondary-hover",
|
|
12
|
+
"group-pressed:bg-interactive-contained-secondary-pressed",
|
|
13
|
+
"group-selected:bg-interactive-contained-primary-idle",
|
|
14
|
+
"group-selected:group-hover:bg-interactive-contained-primary-hover",
|
|
15
|
+
"group-selected:group-pressed:bg-interactive-contained-primary-pressed",
|
|
16
|
+
"group-focus-visible:outline-interactive-text-secondary-focus",
|
|
17
|
+
"before:bg-interactive-contained-secondary-on-idle",
|
|
18
|
+
"group-hover:before:bg-interactive-contained-secondary-on-hover",
|
|
19
|
+
"group-disabled:before:bg-interactive-contained-secondary-on-disabled",
|
|
20
|
+
"group-selected:before:bg-interactive-contained-primary-on-idle",
|
|
21
|
+
"group-selected:group-hover:before:bg-interactive-contained-primary-on-hover",
|
|
22
|
+
"group-selected:group-pressed:before:bg-interactive-contained-primary-on-pressed",
|
|
23
|
+
"group-selected:group-disabled:bg-interactive-contained-primary-disabled"
|
|
24
|
+
] } },
|
|
25
|
+
defaultVariants: { variant: "default" }
|
|
26
|
+
}
|
|
24
27
|
});
|
|
25
28
|
var toggleTypography = compoundMapper({ default: {
|
|
26
29
|
size: "label-1",
|
|
@@ -28,4 +31,4 @@ var toggleTypography = compoundMapper({ default: {
|
|
|
28
31
|
variant: "default"
|
|
29
32
|
} });
|
|
30
33
|
//#endregion
|
|
31
|
-
export {
|
|
34
|
+
export { toggleDefinition, toggleTypography };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
import { typographyDefinition } from "../../text/Typography/typography.cva.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import clsx$1 from "clsx";
|
|
5
5
|
//#region src/components/inputs/shared/CheckContent.tsx
|
|
6
6
|
var CheckContent = ({ children, className, ...props }) => {
|
|
7
7
|
return /* @__PURE__ */ jsx("div", {
|
|
8
|
-
className: clsx$1(
|
|
8
|
+
className: clsx$1(UIOverrides.useCva("typography.cva", typographyDefinition)({
|
|
9
9
|
size: "label-1",
|
|
10
10
|
sizeMobile: "label-1",
|
|
11
11
|
variant: "default",
|
|
@@ -1,22 +1,61 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
3
|
+
export declare const inputBaseDefinition: {
|
|
4
|
+
base: string[];
|
|
5
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
6
|
+
readonly variant: {
|
|
7
|
+
readonly outlined: "";
|
|
8
|
+
readonly filled: "";
|
|
9
|
+
};
|
|
10
|
+
readonly as: {
|
|
11
|
+
readonly default: "rounded-input-rounding-default";
|
|
12
|
+
readonly floating: "rounded-input-rounding-default";
|
|
13
|
+
readonly filter: "rounded-input-rounding-default";
|
|
14
|
+
readonly inline: ["h-full", "border-transparent border-b-0 bg-transparent text-text-default-1", "hover:border-input-outlined-outline-hover", "focus-within:border-input-outlined-outline-active", "invalid:border-input-outlined-outline-error", "has-invalid:border-input-outlined-outline-error", "disabled:hover:border-transparent", "has-disabled:hover:border-transparent"];
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
export type InputBaseConfig = NonNullable<typeof inputBaseDefinition.config>;
|
|
19
|
+
export interface InputBaseProps extends UIOverrides.VariantProps<InputBaseConfig> {
|
|
8
20
|
}
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
export declare const inputSizeDefinition: {
|
|
22
|
+
base: string[];
|
|
23
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
24
|
+
readonly size: {
|
|
25
|
+
readonly "extra-small": "text-label-1";
|
|
26
|
+
readonly small: "text-label-1";
|
|
27
|
+
readonly default: "text-label-1";
|
|
28
|
+
readonly large: "text-label-1";
|
|
29
|
+
};
|
|
30
|
+
readonly as: {
|
|
31
|
+
readonly default: "";
|
|
32
|
+
readonly floating: ["px-input-side-m", "py-floating-label-input-height-empty", "input-filled:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]", "input-filled:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]"];
|
|
33
|
+
readonly filter: "";
|
|
34
|
+
readonly inline: "";
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export type InputSizeConfig = NonNullable<typeof inputSizeDefinition.config>;
|
|
39
|
+
export interface InputSizeProps extends UIOverrides.VariantProps<InputSizeConfig> {
|
|
14
40
|
}
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
41
|
+
export declare const inputSideDefinition: {
|
|
42
|
+
base: string[];
|
|
43
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
44
|
+
readonly size: {
|
|
45
|
+
readonly "extra-small": "";
|
|
46
|
+
readonly small: "";
|
|
47
|
+
readonly default: "";
|
|
48
|
+
readonly large: "";
|
|
49
|
+
};
|
|
50
|
+
readonly type: {
|
|
51
|
+
readonly left: "";
|
|
52
|
+
readonly right: "";
|
|
53
|
+
readonly var: "";
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
};
|
|
57
|
+
export type InputSideConfig = NonNullable<typeof inputSideDefinition.config>;
|
|
58
|
+
export interface InputSideProps extends UIOverrides.VariantProps<InputSideConfig> {
|
|
20
59
|
}
|
|
21
60
|
export interface InputVariantProps extends InputBaseProps, InputSizeProps {
|
|
22
61
|
}
|