@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,32 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/overlays/Tooltip/tooltip.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var tooltipDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: ["group max-w-64 rounded-tooltip-rounding-default px-tooltip-side-default py-tooltip-height-default shadow-2"],
|
|
5
|
+
config: {
|
|
6
|
+
variants: { color: {
|
|
7
|
+
default: ["bg-interactive-contained-secondary-idle"],
|
|
8
|
+
error: ["w-max bg-elevation-fill-error-1"]
|
|
9
|
+
} },
|
|
10
|
+
defaultVariants: { color: "default" }
|
|
11
|
+
}
|
|
9
12
|
});
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
var tooltipPointerHorizontalDefinition = UIOverrides.defineConfig({
|
|
14
|
+
base: ["h-2-5 w-5 group-placement-left:hidden group-placement-right:hidden group-placement-top:rotate-180"],
|
|
15
|
+
config: {
|
|
16
|
+
variants: { color: {
|
|
17
|
+
default: ["text-interactive-contained-secondary-idle"],
|
|
18
|
+
error: ["text-elevation-fill-error-1"]
|
|
19
|
+
} },
|
|
20
|
+
defaultVariants: { color: "default" }
|
|
21
|
+
}
|
|
16
22
|
});
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
var tooltipPointerVerticalDefinition = UIOverrides.defineConfig({
|
|
24
|
+
base: ["h-5 w-2-5 group-placement-bottom:hidden group-placement-top:hidden group-placement-left:rotate-180"],
|
|
25
|
+
config: {
|
|
26
|
+
variants: { color: {
|
|
27
|
+
default: ["text-interactive-contained-secondary-idle"],
|
|
28
|
+
error: ["text-elevation-fill-error-1"]
|
|
29
|
+
} },
|
|
30
|
+
defaultVariants: { color: "default" }
|
|
31
|
+
}
|
|
23
32
|
});
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
var tooltipTextDefinition = UIOverrides.defineConfig({
|
|
34
|
+
base: [],
|
|
35
|
+
config: {
|
|
36
|
+
variants: { color: {
|
|
37
|
+
default: ["text-interactive-contained-secondary-on-idle"],
|
|
38
|
+
error: ["text-text-error-inverted-1"]
|
|
39
|
+
} },
|
|
40
|
+
defaultVariants: { color: "default" }
|
|
41
|
+
}
|
|
30
42
|
});
|
|
31
43
|
//#endregion
|
|
32
|
-
export {
|
|
44
|
+
export { tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
import { FormField } from "../inputs/FormField/FormField.js";
|
|
3
|
-
import {
|
|
3
|
+
import { segmentDefinition } from "./segment.cva.js";
|
|
4
4
|
import { SegmentItem } from "./SegmentItem.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
@@ -20,7 +20,7 @@ var SegmentBase = ({ className, items, error, onChange, value, defaultValue, seg
|
|
|
20
20
|
const buttonGroupRef = useRef(null);
|
|
21
21
|
const state = useToggleGroupState(props);
|
|
22
22
|
const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
|
|
23
|
-
const segmentCva
|
|
23
|
+
const segmentCva = UIOverrides.useCva("segment.cva", segmentDefinition);
|
|
24
24
|
const formFieldProps = {
|
|
25
25
|
error,
|
|
26
26
|
label: "",
|
|
@@ -42,7 +42,7 @@ var SegmentBase = ({ className, items, error, onChange, value, defaultValue, seg
|
|
|
42
42
|
...groupProps,
|
|
43
43
|
ref: buttonGroupRef,
|
|
44
44
|
onSelectionChange,
|
|
45
|
-
className: segmentCva
|
|
45
|
+
className: segmentCva({
|
|
46
46
|
...props,
|
|
47
47
|
className
|
|
48
48
|
}),
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../text/Typography/Typography.js";
|
|
3
|
-
import {
|
|
3
|
+
import { segmentItemDefinition } from "./segment.cva.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ToggleButton } from "react-aria-components";
|
|
6
6
|
//#region src/components/segment/SegmentItem.tsx
|
|
7
7
|
var SegmentItem = ({ label, icon, id, isDisabled, className, ...props }) => {
|
|
8
8
|
const IconComponent = icon;
|
|
9
9
|
const iconOnly = !!(icon && !label);
|
|
10
|
-
const segmentItemCva
|
|
10
|
+
const segmentItemCva = UIOverrides.useCva("segment.itemCva", segmentItemDefinition);
|
|
11
11
|
return /* @__PURE__ */ jsxs(ToggleButton, {
|
|
12
12
|
...props,
|
|
13
13
|
id,
|
|
14
|
-
className: segmentItemCva
|
|
14
|
+
className: segmentItemCva({
|
|
15
15
|
iconOnly,
|
|
16
16
|
className
|
|
17
17
|
}),
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
import { UIOverrides } from '../../config/uiOverrides.context';
|
|
2
|
+
export declare const segmentDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
5
|
+
};
|
|
6
|
+
export type SegmentConfig = NonNullable<typeof segmentDefinition.config>;
|
|
7
|
+
export interface SegmentVariantProps extends UIOverrides.VariantProps<SegmentConfig> {
|
|
4
8
|
}
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
export declare const segmentItemDefinition: {
|
|
10
|
+
base: string[];
|
|
11
|
+
config: import("../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
12
|
+
readonly iconOnly: {
|
|
13
|
+
readonly true: "px-segmented-control-height-segment";
|
|
14
|
+
readonly false: "px-segmented-control-side-segment";
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
export type SegmentItemConfig = NonNullable<typeof segmentItemDefinition.config>;
|
|
19
|
+
export interface SegmentItemVariantProps extends UIOverrides.VariantProps<SegmentItemConfig> {
|
|
9
20
|
}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/segment/segment.cva.ts
|
|
3
|
-
var
|
|
3
|
+
var segmentDefinition = UIOverrides.defineConfig({ base: [
|
|
4
4
|
"group/segment grid w-fit items-center gap-segmented-control-side-segmented-control p-segmented-control-side-segmented-control",
|
|
5
5
|
"bg-elevation-fill-default-3",
|
|
6
6
|
"rounded-segmented-control-rounding-segmented-control"
|
|
7
|
-
]);
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
] });
|
|
8
|
+
var segmentItemDefinition = UIOverrides.defineConfig({
|
|
9
|
+
base: [
|
|
10
|
+
"flex items-center justify-center gap-segmented-control-gap-content-icon-to-text transition-all duration-200",
|
|
11
|
+
"border border-support-transparent-outline",
|
|
12
|
+
"py-segmented-control-height-segment",
|
|
13
|
+
"rounded-segmented-control-rounding-segment",
|
|
14
|
+
"text-interactive-subtle-secondary-on-idle",
|
|
15
|
+
"hover:border-interactive-subtle-secondary-hover hover:bg-interactive-subtle-secondary-hover hover:text-interactive-subtle-secondary-on-hover",
|
|
16
|
+
"pressed:border-interactive-subtle-secondary-pressed pressed:bg-interactive-subtle-secondary-pressed pressed:text-interactive-subtle-secondary-on-pressed",
|
|
17
|
+
"disabled:border-support-transparent-outline disabled:text-interactive-subtle-secondary-on-disabled",
|
|
18
|
+
"selected:border-interactive-subtle-secondary-toggled-idle selected:bg-interactive-subtle-secondary-toggled-idle selected:text-interactive-subtle-secondary-on-toggled-idle",
|
|
19
|
+
"selected:disabled:border-interactive-subtle-secondary-toggled-disabled selected:disabled:bg-interactive-subtle-secondary-toggled-disabled selected:disabled:text-interactive-subtle-secondary-on-toggled-disabled"
|
|
20
|
+
],
|
|
21
|
+
config: {
|
|
22
|
+
variants: { iconOnly: {
|
|
23
|
+
true: "px-segmented-control-height-segment",
|
|
24
|
+
false: "px-segmented-control-side-segment"
|
|
25
|
+
} },
|
|
26
|
+
defaultVariants: { iconOnly: false }
|
|
27
|
+
}
|
|
25
28
|
});
|
|
26
29
|
//#endregion
|
|
27
|
-
export {
|
|
30
|
+
export { segmentDefinition, segmentItemDefinition };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
import { UIOverrides } from '../../config/uiOverrides.context';
|
|
2
|
+
export declare const popoverDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
5
|
+
};
|
|
6
|
+
export type PopoverConfig = NonNullable<typeof popoverDefinition.config>;
|
|
7
|
+
export interface PopoverVariantProps extends UIOverrides.VariantProps<PopoverConfig> {
|
|
4
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/shared/popover.cva.ts
|
|
3
|
-
var
|
|
3
|
+
var popoverDefinition = UIOverrides.defineConfig({ base: ["rounded-list-rounding-dropdown border border-elevation-outline-default-1 border-solid bg-elevation-fill-default-1 shadow-5 outline-none"] });
|
|
4
4
|
//#endregion
|
|
5
|
-
export {
|
|
5
|
+
export { popoverDefinition };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
3
3
|
import { Loader } from "../Loader/Loader.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { alertDefinition } from "./alert.cva.js";
|
|
5
|
+
import { statusIconDefinition, statusSeparatorDefinition } from "../shared/status.cva.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/status/Alert/Alert.tsx
|
|
8
8
|
var Alert = ({ variant, color, text, isLoading = false, rightContent, hasSeparator, icon: Icon, className }) => {
|
|
9
|
-
const alertCva =
|
|
10
|
-
const iconCva =
|
|
11
|
-
const separatorCva =
|
|
9
|
+
const alertCva = UIOverrides.useCva("alert.cva", alertDefinition);
|
|
10
|
+
const iconCva = UIOverrides.useCva("status.iconCva", statusIconDefinition);
|
|
11
|
+
const separatorCva = UIOverrides.useCva("status.separatorCva", statusSeparatorDefinition);
|
|
12
12
|
return /* @__PURE__ */ jsx("div", {
|
|
13
13
|
className: alertCva({
|
|
14
14
|
variant,
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const alertDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly variant: {
|
|
6
|
+
readonly outlined: "border bg-elevation-fill-default-1 text-text-default-1";
|
|
7
|
+
readonly contained: "text-text-inverted-1";
|
|
8
|
+
};
|
|
9
|
+
readonly color: {
|
|
10
|
+
readonly neutral: "";
|
|
11
|
+
readonly success: "";
|
|
12
|
+
readonly warning: "";
|
|
13
|
+
readonly error: "";
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
export type AlertConfig = NonNullable<typeof alertDefinition.config>;
|
|
18
|
+
export interface AlertVariantProps extends UIOverrides.VariantProps<AlertConfig> {
|
|
7
19
|
}
|
|
@@ -1,64 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/status/Alert/alert.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
var alertDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: ["min-h-0 overflow-hidden rounded-alert-rounding-default p-0"],
|
|
5
|
+
config: {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
9
|
+
contained: "text-text-inverted-1"
|
|
10
|
+
},
|
|
11
|
+
color: {
|
|
12
|
+
neutral: "",
|
|
13
|
+
success: "",
|
|
14
|
+
warning: "",
|
|
15
|
+
error: ""
|
|
16
|
+
}
|
|
8
17
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
compoundVariants: [
|
|
19
|
+
{
|
|
20
|
+
variant: "outlined",
|
|
21
|
+
color: "neutral",
|
|
22
|
+
className: "border-elevation-outline-default-1"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
variant: "outlined",
|
|
26
|
+
color: "success",
|
|
27
|
+
className: "border-elevation-outline-success-1"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
variant: "outlined",
|
|
31
|
+
color: "warning",
|
|
32
|
+
className: "border-elevation-outline-warning-1"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
variant: "outlined",
|
|
36
|
+
color: "error",
|
|
37
|
+
className: "border-elevation-outline-error-1"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
variant: "contained",
|
|
41
|
+
color: "neutral",
|
|
42
|
+
className: "bg-elevation-fill-inverted-1"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
variant: "contained",
|
|
46
|
+
color: "success",
|
|
47
|
+
className: "bg-elevation-fill-success-1"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
variant: "contained",
|
|
51
|
+
color: "warning",
|
|
52
|
+
className: "bg-elevation-fill-warning-1"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
variant: "contained",
|
|
56
|
+
color: "error",
|
|
57
|
+
className: "bg-elevation-fill-error-1"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
defaultVariants: {
|
|
23
61
|
variant: "outlined",
|
|
24
|
-
color: "
|
|
25
|
-
className: "border-elevation-outline-success-1"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
variant: "outlined",
|
|
29
|
-
color: "warning",
|
|
30
|
-
className: "border-elevation-outline-warning-1"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
variant: "outlined",
|
|
34
|
-
color: "error",
|
|
35
|
-
className: "border-elevation-outline-error-1"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
variant: "contained",
|
|
39
|
-
color: "neutral",
|
|
40
|
-
className: "bg-elevation-fill-inverted-1"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
variant: "contained",
|
|
44
|
-
color: "success",
|
|
45
|
-
className: "bg-elevation-fill-success-1"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
variant: "contained",
|
|
49
|
-
color: "warning",
|
|
50
|
-
className: "bg-elevation-fill-warning-1"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
variant: "contained",
|
|
54
|
-
color: "error",
|
|
55
|
-
className: "bg-elevation-fill-error-1"
|
|
62
|
+
color: "neutral"
|
|
56
63
|
}
|
|
57
|
-
],
|
|
58
|
-
defaultVariants: {
|
|
59
|
-
variant: "outlined",
|
|
60
|
-
color: "neutral"
|
|
61
64
|
}
|
|
62
65
|
});
|
|
63
66
|
//#endregion
|
|
64
|
-
export {
|
|
67
|
+
export { alertDefinition };
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const loaderWrapperDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly size: {
|
|
6
|
+
readonly default: "size-6";
|
|
7
|
+
readonly l: "size-16";
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
2
11
|
export declare const loaderWrapper: (props?: ({
|
|
3
|
-
size?: "default" | "l" | null | undefined;
|
|
12
|
+
readonly size?: "default" | "l" | null | undefined;
|
|
4
13
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
14
|
+
export declare const loaderDefinition: {
|
|
15
|
+
base: string[];
|
|
16
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
17
|
+
readonly size: {
|
|
18
|
+
readonly default: "size-3-5";
|
|
19
|
+
readonly l: "size-8";
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
5
23
|
export declare const loader: (props?: ({
|
|
6
|
-
size?: "default" | "l" | null | undefined;
|
|
24
|
+
readonly size?: "default" | "l" | null | undefined;
|
|
7
25
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export
|
|
26
|
+
export type LoaderConfig = NonNullable<typeof loaderDefinition.config>;
|
|
27
|
+
export interface LoaderVariantProps extends UIOverrides.VariantProps<LoaderConfig> {
|
|
9
28
|
}
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
//#region src/components/status/Loader/loader.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var loaderWrapperDefinition = UIOverrides.defineConfig({
|
|
5
|
+
base: ["flex items-center justify-center"],
|
|
6
|
+
config: {
|
|
7
|
+
variants: { size: {
|
|
8
|
+
default: "size-6",
|
|
9
|
+
l: "size-16"
|
|
10
|
+
} },
|
|
11
|
+
defaultVariants: { size: "default" }
|
|
12
|
+
}
|
|
9
13
|
});
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
var loaderWrapper = cva(loaderWrapperDefinition.base, loaderWrapperDefinition.config);
|
|
15
|
+
var loaderDefinition = UIOverrides.defineConfig({
|
|
16
|
+
base: ["animate-loader-spin"],
|
|
17
|
+
config: {
|
|
18
|
+
variants: { size: {
|
|
19
|
+
default: "size-3-5",
|
|
20
|
+
l: "size-8"
|
|
21
|
+
} },
|
|
22
|
+
defaultVariants: { size: "default" }
|
|
23
|
+
}
|
|
16
24
|
});
|
|
25
|
+
var loader = cva(loaderDefinition.base, loaderDefinition.config);
|
|
17
26
|
//#endregion
|
|
18
|
-
export { loader, loaderWrapper };
|
|
27
|
+
export { loader, loaderDefinition, loaderWrapper, loaderWrapperDefinition };
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
3
3
|
import { Loader } from "../Loader/Loader.js";
|
|
4
4
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
5
5
|
import { Button } from "../../buttons/Button/Button.js";
|
|
6
|
-
import {
|
|
7
|
-
import { buttonColorVariant, toast as toast$1, toastContainer, toastWrapper } from "./toast.cva.js";
|
|
6
|
+
import { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition, toastContainer, toastDefinition, toastWrapper } from "./toast.cva.js";
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { ToastContainer } from "react-toastify";
|
|
10
9
|
//#region src/components/status/Toast/Toast.tsx
|
|
11
10
|
var Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) => {
|
|
12
11
|
const uiConfig = UIConfig.useConfig();
|
|
13
12
|
const { variant = uiConfig.toast.variant, ...restProps } = props;
|
|
14
|
-
const toastCva =
|
|
15
|
-
const buttonColor =
|
|
16
|
-
const iconCva =
|
|
17
|
-
const separatorCva =
|
|
13
|
+
const toastCva = UIOverrides.useCva("toast.cva", toastDefinition);
|
|
14
|
+
const buttonColor = UIOverrides.useMapper("toast.buttonColor", buttonColorVariant);
|
|
15
|
+
const iconCva = UIOverrides.useCva("status.iconCva", statusIconDefinition);
|
|
16
|
+
const separatorCva = UIOverrides.useCva("status.separatorCva", statusSeparatorDefinition);
|
|
18
17
|
const variantProps = {
|
|
19
18
|
variant,
|
|
20
19
|
...restProps
|
|
@@ -1,18 +1,69 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
1
|
import { ButtonVariantProps } from '../../buttons/Button/button.cva';
|
|
2
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
3
3
|
export declare const toastContainer: (props?: ({
|
|
4
4
|
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | "bottom-center" | "top-center" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
export declare const toastWrapper: string;
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export declare const toastDefinition: {
|
|
8
|
+
base: string[];
|
|
9
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
10
|
+
readonly variant: {
|
|
11
|
+
readonly outlined: "border bg-elevation-fill-default-1 text-text-default-1";
|
|
12
|
+
readonly contained: "text-text-inverted-1";
|
|
13
|
+
};
|
|
14
|
+
readonly color: {
|
|
15
|
+
readonly neutral: "";
|
|
16
|
+
readonly success: "";
|
|
17
|
+
readonly warning: "";
|
|
18
|
+
readonly error: "";
|
|
19
|
+
};
|
|
20
|
+
readonly position: {
|
|
21
|
+
readonly "bottom-right": "";
|
|
22
|
+
readonly "bottom-left": "";
|
|
23
|
+
readonly "bottom-center": "";
|
|
24
|
+
readonly "top-right": "";
|
|
25
|
+
readonly "top-left": "";
|
|
26
|
+
readonly "top-center": "";
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
export type ToastConfig = NonNullable<typeof toastDefinition.config>;
|
|
31
|
+
export interface ToastVariantProps extends UIOverrides.VariantProps<ToastConfig> {
|
|
13
32
|
}
|
|
14
33
|
export declare const buttonColorVariant: (props: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | "bottom-center" | "top-center" | null | undefined;
|
|
34
|
+
readonly variant?: "contained" | "outlined" | null | undefined;
|
|
35
|
+
readonly color?: "success" | "warning" | "error" | "neutral" | null | undefined;
|
|
36
|
+
readonly position?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | "bottom-center" | "top-center" | null | undefined;
|
|
18
37
|
}) => Pick<ButtonVariantProps, "color" | "inverted"> | undefined;
|
|
38
|
+
export declare const statusIconDefinition: {
|
|
39
|
+
base: string[];
|
|
40
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
41
|
+
readonly variant: {
|
|
42
|
+
readonly outlined: "";
|
|
43
|
+
readonly contained: "text-text-inverted-1";
|
|
44
|
+
};
|
|
45
|
+
readonly color: {
|
|
46
|
+
readonly neutral: "";
|
|
47
|
+
readonly success: "";
|
|
48
|
+
readonly warning: "";
|
|
49
|
+
readonly error: "";
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
export type StatusIconConfig = NonNullable<typeof statusIconDefinition.config>;
|
|
54
|
+
export declare const statusSeparatorDefinition: {
|
|
55
|
+
base: string[];
|
|
56
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
57
|
+
readonly variant: {
|
|
58
|
+
readonly outlined: "";
|
|
59
|
+
readonly contained: "hidden";
|
|
60
|
+
};
|
|
61
|
+
readonly color: {
|
|
62
|
+
readonly neutral: "bg-elevation-outline-default-1";
|
|
63
|
+
readonly success: "bg-elevation-outline-success-1";
|
|
64
|
+
readonly warning: "bg-elevation-outline-warning-1";
|
|
65
|
+
readonly error: "bg-elevation-outline-error-1";
|
|
66
|
+
};
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
export type StatusSeparatorConfig = NonNullable<typeof statusSeparatorDefinition.config>;
|