@povio/ui 2.3.3 → 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/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/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,29 +1,32 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
3
|
//#region src/components/inputs/shared/label.cva.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
4
|
+
var labelDefinition = UIOverrides.defineConfig({
|
|
5
|
+
base: [""],
|
|
6
|
+
config: {
|
|
7
|
+
variants: { as: {
|
|
8
|
+
default: ["flex items-start gap-1 text-text-default-1 input-disabled:text-text-default-3"],
|
|
9
|
+
filter: ["text-text-default-1 input-disabled:text-text-default-3"],
|
|
10
|
+
inline: ["flex items-start gap-1 text-text-default-1"],
|
|
11
|
+
floating: [
|
|
12
|
+
"pointer-events-none",
|
|
13
|
+
"absolute transition-all duration-75",
|
|
14
|
+
"top-1/2 -translate-y-1/2",
|
|
15
|
+
"text-text-default-3",
|
|
16
|
+
"input-disabled:text-interactive-text-secondary-disabled!",
|
|
17
|
+
"input-filled:top-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top))]",
|
|
18
|
+
"input-filled:translate-y-0",
|
|
19
|
+
"input-filled:text-text-default-1",
|
|
20
|
+
"input-filled:font-semibold!",
|
|
21
|
+
"input-filled:text-label-3!",
|
|
22
|
+
"group-data-[text-area]/text-area:top-floating-label-input-height-empty group-data-[text-area]/text-area:translate-y-0",
|
|
23
|
+
"group-has-[textarea:not(:placeholder-shown)]/text-area:hidden",
|
|
24
|
+
"group-data-[text-editor]/text-editor:top-floating-label-input-height-empty group-data-[text-editor]/text-editor:left-input-side-default group-data-[text-editor]/text-editor:translate-y-0",
|
|
25
|
+
"group-data-[is-filled=true]/text-editor:hidden"
|
|
26
|
+
]
|
|
27
|
+
} },
|
|
28
|
+
defaultVariants: { as: "default" }
|
|
29
|
+
}
|
|
27
30
|
});
|
|
28
31
|
var labelTypography = compoundMapper({
|
|
29
32
|
compoundVariants: [
|
|
@@ -68,4 +71,4 @@ var labelTypography = compoundMapper({
|
|
|
68
71
|
defaultVariants: { as: "default" }
|
|
69
72
|
});
|
|
70
73
|
//#endregion
|
|
71
|
-
export {
|
|
74
|
+
export { labelDefinition, labelTypography };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
import { accordionDefinition } from "./accordion.cva.js";
|
|
3
3
|
import { AccordionItem } from "./AccordionItem.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { clsx } from "clsx";
|
|
@@ -11,7 +11,7 @@ var Accordion = ({ items, variant = "filled", actionPosition = "right", allowsMu
|
|
|
11
11
|
expandedKeys,
|
|
12
12
|
defaultExpandedKeys,
|
|
13
13
|
onExpandedChange,
|
|
14
|
-
className: clsx(
|
|
14
|
+
className: clsx(UIOverrides.useCva("accordion.cva", accordionDefinition)({
|
|
15
15
|
className,
|
|
16
16
|
variant,
|
|
17
17
|
singleItem: items.length === 1
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
3
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
4
|
-
import {
|
|
4
|
+
import { accordionChevronDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition } from "./accordion.cva.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Button, Disclosure, DisclosurePanel, Heading } from "react-aria-components";
|
|
7
7
|
//#region src/components/navigation/Accordion/AccordionItem.tsx
|
|
8
8
|
var AccordionItem = ({ id, disabled, heading, subheading, children, icon: Icon, variant = "filled", actionPosition = "right", isSingle }) => {
|
|
9
|
-
const itemCva =
|
|
10
|
-
const triggerCva =
|
|
11
|
-
const headingCva =
|
|
12
|
-
const headingTitleCva =
|
|
13
|
-
const headingSubtitleCva =
|
|
14
|
-
const chevronCva =
|
|
15
|
-
const iconCva =
|
|
16
|
-
const panelCva =
|
|
17
|
-
const panelContentCva =
|
|
9
|
+
const itemCva = UIOverrides.useCva("accordion.itemCva", accordionItemDefinition);
|
|
10
|
+
const triggerCva = UIOverrides.useCva("accordion.triggerCva", accordionTriggerDefinition);
|
|
11
|
+
const headingCva = UIOverrides.useCva("accordion.headingCva", accordionHeadingDefinition);
|
|
12
|
+
const headingTitleCva = UIOverrides.useCva("accordion.headingTitleCva", accordionHeadingTitleDefinition);
|
|
13
|
+
const headingSubtitleCva = UIOverrides.useCva("accordion.headingSubtitleCva", accordionHeadingSubtitleDefinition);
|
|
14
|
+
const chevronCva = UIOverrides.useCva("accordion.chevronCva", accordionChevronDefinition);
|
|
15
|
+
const iconCva = UIOverrides.useCva("accordion.iconCva", accordionIconDefinition);
|
|
16
|
+
const panelCva = UIOverrides.useCva("accordion.panelCva", accordionPanelDefinition);
|
|
17
|
+
const panelContentCva = UIOverrides.useCva("accordion.panelContentCva", accordionPanelContentDefinition);
|
|
18
18
|
return /* @__PURE__ */ jsx(Disclosure, {
|
|
19
19
|
id,
|
|
20
20
|
className: itemCva({
|
|
@@ -1,45 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const accordionDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly variant: {
|
|
6
|
+
readonly filled: "gap-1";
|
|
7
|
+
readonly outlined: "";
|
|
8
|
+
};
|
|
9
|
+
readonly singleItem: {
|
|
10
|
+
readonly true: "";
|
|
11
|
+
readonly false: "";
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export type AccordionConfig = NonNullable<typeof accordionDefinition.config>;
|
|
16
|
+
export interface AccordionVariantProps extends UIOverrides.VariantProps<AccordionConfig> {
|
|
17
|
+
}
|
|
18
|
+
export declare const accordionItemDefinition: {
|
|
19
|
+
base: string[];
|
|
20
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
21
|
+
readonly variant: {
|
|
22
|
+
readonly filled: "rounded-accordion-rounding-filled bg-elevation-fill-default-2";
|
|
23
|
+
readonly outlined: "";
|
|
24
|
+
};
|
|
25
|
+
readonly singleItem: {
|
|
26
|
+
readonly true: "";
|
|
27
|
+
readonly false: "";
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
export type AccordionItemConfig = NonNullable<typeof accordionItemDefinition.config>;
|
|
32
|
+
export interface AccordionItemVariantProps extends UIOverrides.VariantProps<AccordionItemConfig> {
|
|
33
|
+
}
|
|
34
|
+
export declare const accordionTriggerDefinition: {
|
|
35
|
+
base: string[];
|
|
36
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
37
|
+
readonly variant: {
|
|
38
|
+
readonly outlined: "rounded-accordion-rounding-outlined hover:bg-elevation-fill-default-2";
|
|
39
|
+
readonly filled: "rounded-accordion-rounding-filled bg-elevation-fill-default-2 hover:bg-elevation-fill-default-3";
|
|
40
|
+
};
|
|
41
|
+
readonly actionPosition: {
|
|
42
|
+
readonly left: "flex-row-reverse";
|
|
43
|
+
readonly right: "flex-row";
|
|
44
|
+
};
|
|
45
|
+
readonly disabled: {
|
|
46
|
+
readonly true: "opacity-50";
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
50
|
+
export type AccordionTriggerConfig = NonNullable<typeof accordionTriggerDefinition.config>;
|
|
51
|
+
export interface AccordionTriggerVariantProps extends UIOverrides.VariantProps<AccordionTriggerConfig> {
|
|
52
|
+
}
|
|
53
|
+
export declare const accordionHeadingDefinition: {
|
|
54
|
+
base: string[];
|
|
55
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{}>;
|
|
56
|
+
};
|
|
57
|
+
export type AccordionHeadingConfig = NonNullable<typeof accordionHeadingDefinition.config>;
|
|
58
|
+
export interface AccordionHeadingVariantProps extends UIOverrides.VariantProps<AccordionHeadingConfig> {
|
|
59
|
+
}
|
|
60
|
+
export declare const accordionHeadingTitleDefinition: {
|
|
61
|
+
base: string[];
|
|
62
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{}>;
|
|
63
|
+
};
|
|
64
|
+
export type AccordionHeadingTitleConfig = NonNullable<typeof accordionHeadingTitleDefinition.config>;
|
|
65
|
+
export interface AccordionHeadingTitleVariantProps extends UIOverrides.VariantProps<AccordionHeadingTitleConfig> {
|
|
66
|
+
}
|
|
67
|
+
export declare const accordionHeadingSubtitleDefinition: {
|
|
68
|
+
base: string[];
|
|
69
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{}>;
|
|
70
|
+
};
|
|
71
|
+
export type AccordionHeadingSubtitleConfig = NonNullable<typeof accordionHeadingSubtitleDefinition.config>;
|
|
72
|
+
export interface AccordionHeadingSubtitleVariantProps extends UIOverrides.VariantProps<AccordionHeadingSubtitleConfig> {
|
|
73
|
+
}
|
|
74
|
+
export declare const accordionChevronDefinition: {
|
|
75
|
+
base: string[];
|
|
76
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
77
|
+
readonly isExpanded: {
|
|
78
|
+
readonly true: "rotate-180";
|
|
79
|
+
readonly false: "rotate-0";
|
|
80
|
+
};
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
export type AccordionChevronConfig = NonNullable<typeof accordionChevronDefinition.config>;
|
|
84
|
+
export interface AccordionChevronVariantProps extends UIOverrides.VariantProps<AccordionChevronConfig> {
|
|
85
|
+
}
|
|
86
|
+
export declare const accordionIconDefinition: {
|
|
87
|
+
base: string[];
|
|
88
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{}>;
|
|
89
|
+
};
|
|
90
|
+
export type AccordionIconConfig = NonNullable<typeof accordionIconDefinition.config>;
|
|
91
|
+
export interface AccordionIconVariantProps extends UIOverrides.VariantProps<AccordionIconConfig> {
|
|
92
|
+
}
|
|
93
|
+
export declare const accordionPanelDefinition: {
|
|
94
|
+
base: string[];
|
|
95
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
96
|
+
readonly isExpanded: {
|
|
97
|
+
readonly true: "px-accordion-side-accordion pt-0 pb-accordion-height-accordion";
|
|
98
|
+
};
|
|
99
|
+
}>;
|
|
100
|
+
};
|
|
101
|
+
export type AccordionPanelConfig = NonNullable<typeof accordionPanelDefinition.config>;
|
|
102
|
+
export interface AccordionPanelVariantProps extends UIOverrides.VariantProps<AccordionPanelConfig> {
|
|
103
|
+
}
|
|
104
|
+
export declare const accordionPanelContentDefinition: {
|
|
105
|
+
base: string[];
|
|
106
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{}>;
|
|
107
|
+
};
|
|
108
|
+
export type AccordionPanelContentConfig = NonNullable<typeof accordionPanelContentDefinition.config>;
|
|
109
|
+
export interface AccordionPanelContentVariantProps extends UIOverrides.VariantProps<AccordionPanelContentConfig> {
|
|
45
110
|
}
|
|
@@ -1,99 +1,129 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/navigation/Accordion/accordion.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
var accordionDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: ["flex w-full flex-col"],
|
|
5
|
+
config: {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
filled: "gap-1",
|
|
9
|
+
outlined: ""
|
|
10
|
+
},
|
|
11
|
+
singleItem: {
|
|
12
|
+
true: "",
|
|
13
|
+
false: ""
|
|
14
|
+
}
|
|
8
15
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
defaultVariants: {
|
|
15
|
-
variant: "filled",
|
|
16
|
-
singleItem: false
|
|
17
|
-
},
|
|
18
|
-
compoundVariants: [{
|
|
19
|
-
variant: "outlined",
|
|
20
|
-
singleItem: false,
|
|
21
|
-
className: "rounded-global-rounding-s border border-elevation-outline-default-1"
|
|
22
|
-
}]
|
|
23
|
-
});
|
|
24
|
-
var accordionItemCva = cva("flex w-full flex-col", {
|
|
25
|
-
variants: {
|
|
26
|
-
variant: {
|
|
27
|
-
filled: "rounded-accordion-rounding-filled bg-elevation-fill-default-2",
|
|
28
|
-
outlined: ""
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "filled",
|
|
18
|
+
singleItem: false
|
|
29
19
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
variant: "filled",
|
|
37
|
-
singleItem: false
|
|
38
|
-
},
|
|
39
|
-
compoundVariants: [{
|
|
40
|
-
singleItem: true,
|
|
41
|
-
variant: "outlined",
|
|
42
|
-
className: "border-elevation-outline-default-1 border-b"
|
|
43
|
-
}, {
|
|
44
|
-
singleItem: false,
|
|
45
|
-
variant: "outlined",
|
|
46
|
-
className: "not-last:border-elevation-outline-default-1 not-last:border-b"
|
|
47
|
-
}]
|
|
20
|
+
compoundVariants: [{
|
|
21
|
+
variant: "outlined",
|
|
22
|
+
singleItem: false,
|
|
23
|
+
className: "rounded-global-rounding-s border border-elevation-outline-default-1"
|
|
24
|
+
}]
|
|
25
|
+
}
|
|
48
26
|
});
|
|
49
|
-
var
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
27
|
+
var accordionItemDefinition = UIOverrides.defineConfig({
|
|
28
|
+
base: ["flex w-full flex-col"],
|
|
29
|
+
config: {
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
filled: "rounded-accordion-rounding-filled bg-elevation-fill-default-2",
|
|
33
|
+
outlined: ""
|
|
34
|
+
},
|
|
35
|
+
singleItem: {
|
|
36
|
+
true: "",
|
|
37
|
+
false: ""
|
|
38
|
+
}
|
|
58
39
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "filled",
|
|
42
|
+
singleItem: false
|
|
62
43
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
44
|
+
compoundVariants: [{
|
|
45
|
+
singleItem: true,
|
|
46
|
+
variant: "outlined",
|
|
47
|
+
className: "border-elevation-outline-default-1 border-b"
|
|
48
|
+
}, {
|
|
49
|
+
singleItem: false,
|
|
50
|
+
variant: "outlined",
|
|
51
|
+
className: "not-last:border-elevation-outline-default-1 not-last:border-b"
|
|
52
|
+
}]
|
|
68
53
|
}
|
|
69
54
|
});
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
var accordionTriggerDefinition = UIOverrides.defineConfig({
|
|
56
|
+
base: [
|
|
57
|
+
"group flex w-full items-center gap-accordion-gap-content-to-arrow",
|
|
58
|
+
"px-accordion-side-accordion py-accordion-height-accordion",
|
|
59
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-interactive-contained-primary-focus"
|
|
60
|
+
],
|
|
61
|
+
config: {
|
|
62
|
+
variants: {
|
|
63
|
+
variant: {
|
|
64
|
+
outlined: "rounded-accordion-rounding-outlined hover:bg-elevation-fill-default-2",
|
|
65
|
+
filled: "rounded-accordion-rounding-filled bg-elevation-fill-default-2 hover:bg-elevation-fill-default-3"
|
|
66
|
+
},
|
|
67
|
+
actionPosition: {
|
|
68
|
+
left: "flex-row-reverse",
|
|
69
|
+
right: "flex-row"
|
|
70
|
+
},
|
|
71
|
+
disabled: { true: "opacity-50" }
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
variant: "filled",
|
|
75
|
+
actionPosition: "right"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
73
78
|
});
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
var accordionHeadingDefinition = UIOverrides.defineConfig({
|
|
80
|
+
base: ["flex flex-1 items-center justify-between gap-accordion-gap-content-to-arrow"],
|
|
81
|
+
config: {
|
|
82
|
+
variants: {},
|
|
83
|
+
defaultVariants: {}
|
|
84
|
+
}
|
|
77
85
|
});
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
86
|
+
var accordionHeadingTitleDefinition = UIOverrides.defineConfig({
|
|
87
|
+
base: ["flex-1 text-left text-text-default-1"],
|
|
88
|
+
config: {
|
|
89
|
+
variants: {},
|
|
90
|
+
defaultVariants: {}
|
|
91
|
+
}
|
|
81
92
|
});
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
var accordionHeadingSubtitleDefinition = UIOverrides.defineConfig({
|
|
94
|
+
base: ["flex-1 text-left text-text-default-2"],
|
|
95
|
+
config: {
|
|
96
|
+
variants: {},
|
|
97
|
+
defaultVariants: {}
|
|
98
|
+
}
|
|
88
99
|
});
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
var accordionChevronDefinition = UIOverrides.defineConfig({
|
|
101
|
+
base: ["size-6 shrink-0 text-interactive-text-secondary-idle transition-transform duration-200"],
|
|
102
|
+
config: {
|
|
103
|
+
variants: { isExpanded: {
|
|
104
|
+
true: "rotate-180",
|
|
105
|
+
false: "rotate-0"
|
|
106
|
+
} },
|
|
107
|
+
defaultVariants: { isExpanded: false }
|
|
108
|
+
}
|
|
92
109
|
});
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
110
|
+
var accordionIconDefinition = UIOverrides.defineConfig({
|
|
111
|
+
base: ["size-6 shrink-0 text-text-default-3"],
|
|
112
|
+
config: {
|
|
113
|
+
variants: {},
|
|
114
|
+
defaultVariants: {}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
var accordionPanelDefinition = UIOverrides.defineConfig({
|
|
118
|
+
base: [""],
|
|
119
|
+
config: { variants: { isExpanded: { true: "px-accordion-side-accordion pt-0 pb-accordion-height-accordion" } } }
|
|
120
|
+
});
|
|
121
|
+
var accordionPanelContentDefinition = UIOverrides.defineConfig({
|
|
122
|
+
base: ["py-accordion-height-content"],
|
|
123
|
+
config: {
|
|
124
|
+
variants: {},
|
|
125
|
+
defaultVariants: {}
|
|
126
|
+
}
|
|
97
127
|
});
|
|
98
128
|
//#endregion
|
|
99
|
-
export {
|
|
129
|
+
export { accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
import { stepperDefinition } from "./stepper.cva.js";
|
|
3
3
|
import { StepperItem } from "./StepperItem.js";
|
|
4
4
|
import { StepperSeparator } from "./StepperSeparator.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -7,7 +7,7 @@ import { Fragment as Fragment$1 } from "react";
|
|
|
7
7
|
//#region src/components/navigation/Stepper/Stepper.tsx
|
|
8
8
|
var Stepper = ({ steps, currentStep, orientation = "horizontal", contentOrientation = "horizontal", iconsOnly, titlesOnly, onStepClick, className }) => {
|
|
9
9
|
return /* @__PURE__ */ jsx("div", {
|
|
10
|
-
className:
|
|
10
|
+
className: UIOverrides.useCva("stepper.cva", stepperDefinition)({
|
|
11
11
|
orientation,
|
|
12
12
|
className
|
|
13
13
|
}),
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { CheckIcon } from "../../../assets/icons/Check.js";
|
|
2
|
-
import {
|
|
2
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
3
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
4
|
-
import {
|
|
4
|
+
import { stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSubtextDefinition, stepperTitleDefinition } from "./stepper.cva.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { Button } from "react-aria-components";
|
|
8
8
|
//#region src/components/navigation/Stepper/StepperItem.tsx
|
|
9
9
|
var StepperItem = ({ step, stepNumber, status, contentOrientation, iconsOnly, titlesOnly, onPress }) => {
|
|
10
|
-
const stepperItemCva
|
|
11
|
-
const stepperIconCva
|
|
12
|
-
const stepperNumberCva
|
|
13
|
-
const stepperTitleCva
|
|
14
|
-
const stepperSubtextCva
|
|
10
|
+
const stepperItemCva = UIOverrides.useCva("stepper.itemCva", stepperItemDefinition);
|
|
11
|
+
const stepperIconCva = UIOverrides.useCva("stepper.iconCva", stepperIconDefinition);
|
|
12
|
+
const stepperNumberCva = UIOverrides.useCva("stepper.numberCva", stepperNumberDefinition);
|
|
13
|
+
const stepperTitleCva = UIOverrides.useCva("stepper.titleCva", stepperTitleDefinition);
|
|
14
|
+
const stepperSubtextCva = UIOverrides.useCva("stepper.subtextCva", stepperSubtextDefinition);
|
|
15
15
|
const showTitle = !iconsOnly;
|
|
16
16
|
const showSubtext = !iconsOnly && !titlesOnly && !!step.subtext;
|
|
17
17
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
18
|
-
className: stepperIconCva
|
|
18
|
+
className: stepperIconCva({ status }),
|
|
19
19
|
children: status === "completed" ? /* @__PURE__ */ jsx(CheckIcon, { className: "size-5 text-interactive-contained-primary-on-idle" }) : /* @__PURE__ */ jsx(Typography, {
|
|
20
|
-
className: stepperNumberCva
|
|
20
|
+
className: stepperNumberCva({ status }),
|
|
21
21
|
variant: "prominent-1",
|
|
22
22
|
size: "label-3",
|
|
23
23
|
children: stepNumber
|
|
@@ -25,18 +25,18 @@ var StepperItem = ({ step, stepNumber, status, contentOrientation, iconsOnly, ti
|
|
|
25
25
|
}), showTitle && /* @__PURE__ */ jsxs("div", {
|
|
26
26
|
className: "flex flex-col gap-stepper-gap-text-to-subtext",
|
|
27
27
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
28
|
-
className: stepperTitleCva
|
|
28
|
+
className: stepperTitleCva({ status }),
|
|
29
29
|
size: "label-2",
|
|
30
30
|
variant: "default",
|
|
31
31
|
children: step.title
|
|
32
32
|
}), showSubtext && /* @__PURE__ */ jsx(Typography, {
|
|
33
|
-
className: stepperSubtextCva
|
|
33
|
+
className: stepperSubtextCva({ status }),
|
|
34
34
|
size: "label-3",
|
|
35
35
|
variant: "default",
|
|
36
36
|
children: step.subtext
|
|
37
37
|
})]
|
|
38
38
|
})] });
|
|
39
|
-
const className = stepperItemCva
|
|
39
|
+
const className = stepperItemCva({ contentOrientation });
|
|
40
40
|
if (onPress) return /* @__PURE__ */ jsx(Button, {
|
|
41
41
|
onPress,
|
|
42
42
|
className: clsx("group cursor-pointer", className),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
import { stepperSeparatorDefinition } from "./stepper.cva.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/navigation/Stepper/StepperSeparator.tsx
|
|
5
5
|
var StepperSeparator = ({ orientation, contentOrientation }) => {
|
|
6
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
6
|
+
return /* @__PURE__ */ jsx("div", { className: UIOverrides.useCva("stepper.separatorCva", stepperSeparatorDefinition)({
|
|
7
7
|
orientation,
|
|
8
8
|
contentOrientation
|
|
9
9
|
}) });
|