@ultraviolet/ui 3.7.1 → 3.8.1
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/Alert/styles.css.d.ts +1 -1
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Avatar/index.js +45 -41
- package/dist/components/Avatar/styles.css.js +1 -0
- package/dist/components/Avatar/variables.css.js +0 -1
- package/dist/components/Banner/index.d.ts.map +1 -1
- package/dist/components/Banner/index.js +1 -1
- package/dist/components/Banner/styles.css.d.ts +1 -1
- package/dist/components/BarStack/styles.css.js +1 -1
- package/dist/components/Button/index.d.ts +41 -22
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +18 -10
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +44 -38
- package/dist/components/Checkbox/styles.css.js +0 -1
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/DateInput/helpersLocale.d.ts.map +1 -1
- package/dist/components/DateInput/helpersLocale.js +8 -5
- package/dist/components/Dialog/constants.d.ts +1 -1
- package/dist/components/Dialog/index.d.ts +20 -5
- package/dist/components/Dialog/index.d.ts.map +1 -1
- package/dist/components/Drawer/styles.css.d.ts +1 -1
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.js +10 -1
- package/dist/components/EmptyState/styles.css.d.ts +1 -1
- package/dist/components/EmptyState/styles.css.d.ts.map +1 -1
- package/dist/components/ExpandableCard/index.d.ts.map +1 -1
- package/dist/components/ExpandableCard/index.js +28 -20
- package/dist/components/FileInput/components/List.d.ts.map +1 -1
- package/dist/components/FileInput/components/List.js +15 -2
- package/dist/components/FileInput/index.d.ts.map +1 -1
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +3 -1
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts.map +1 -1
- package/dist/components/GlobalAlert/index.d.ts +61 -1
- package/dist/components/GlobalAlert/index.d.ts.map +1 -1
- package/dist/components/Link/index.d.ts +23 -2
- package/dist/components/Link/index.d.ts.map +1 -1
- package/dist/components/Link/index.js +26 -14
- package/dist/components/List/HeaderCell.d.ts.map +1 -1
- package/dist/components/List/HeaderCell.js +3 -1
- package/dist/components/List/ListContext.d.ts.map +1 -1
- package/dist/components/List/ListContext.js +3 -1
- package/dist/components/List/Row.d.ts.map +1 -1
- package/dist/components/List/Row.js +14 -5
- package/dist/components/List/SkeletonRows.d.ts.map +1 -1
- package/dist/components/List/SkeletonRows.js +0 -1
- package/dist/components/List/styles.css.d.ts +1 -0
- package/dist/components/List/styles.css.d.ts.map +1 -1
- package/dist/components/List/styles.css.js +4 -1
- package/dist/components/List/variables.css.js +1 -1
- package/dist/components/Menu/helpers.d.ts +1 -1
- package/dist/components/Menu/index.d.ts +1 -1
- package/dist/components/Meter/index.d.ts.map +1 -1
- package/dist/components/Meter/index.js +43 -40
- package/dist/components/Modal/components/Dialog.d.ts.map +1 -1
- package/dist/components/Modal/components/Dialog.js +10 -1
- package/dist/components/NumberInput/styles.css.d.ts +1 -1
- package/dist/components/Pagination/styles.css.d.ts +2 -2
- package/dist/components/Popup/styles.css.js +0 -1
- package/dist/components/Popup/variables.css.js +1 -0
- package/dist/components/ProgressBar/styles.css.d.ts +1 -1
- package/dist/components/ProgressBar/styles.css.js +0 -1
- package/dist/components/ProgressBar/variables.css.js +1 -0
- package/dist/components/Radio/index.js +22 -22
- package/dist/components/Row/styles.css.d.ts +44 -44
- package/dist/components/SelectInput/components/Dropdown.d.ts.map +1 -1
- package/dist/components/SelectInput/components/Dropdown.js +52 -56
- package/dist/components/SelectInput/components/selectBar.css.d.ts +1 -1
- package/dist/components/SelectableCard/IllustrationContainer.d.ts +8 -0
- package/dist/components/SelectableCard/IllustrationContainer.d.ts.map +1 -0
- package/dist/components/SelectableCard/IllustrationContainer.js +66 -0
- package/dist/components/SelectableCard/MultiStateInput.d.ts +3 -0
- package/dist/components/SelectableCard/MultiStateInput.d.ts.map +1 -0
- package/dist/components/SelectableCard/MultiStateInput.js +94 -0
- package/dist/components/SelectableCard/SelectableCard.d.ts +7 -0
- package/dist/components/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/dist/components/SelectableCard/SelectableCard.js +165 -0
- package/dist/components/SelectableCard/index.d.ts +1 -33
- package/dist/components/SelectableCard/index.d.ts.map +1 -1
- package/dist/components/SelectableCard/types.d.ts +32 -0
- package/dist/components/SelectableCard/types.d.ts.map +1 -0
- package/dist/components/SelectableCardGroup/index.js +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.js +1 -1
- package/dist/components/Separator/index.d.ts.map +1 -1
- package/dist/components/Separator/index.js +1 -0
- package/dist/components/Skeleton/Donut.d.ts.map +1 -1
- package/dist/components/Skeleton/Donut.js +12 -9
- package/dist/components/Slider/styles.css.d.ts +1 -1
- package/dist/components/Stack/styles.css.d.ts +46 -46
- package/dist/components/Stepper/styles.css.d.ts +1 -1
- package/dist/components/SwitchButton/Option.js +1 -1
- package/dist/components/SwitchButton/index.d.ts.map +1 -1
- package/dist/components/SwitchButton/index.js +7 -4
- package/dist/components/SwitchButton/styles.css.d.ts +2 -2
- package/dist/components/SwitchButton/styles.css.d.ts.map +1 -1
- package/dist/components/Table/HeaderRow.d.ts.map +1 -1
- package/dist/components/Table/HeaderRow.js +22 -25
- package/dist/components/Table/SkeletonRows.d.ts.map +1 -1
- package/dist/components/Table/SkeletonRows.js +4 -13
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/TextInput/index.d.ts.map +1 -1
- package/dist/components/TextInput/index.js +6 -1
- package/dist/components/TextInput/styles.css.d.ts +1 -1
- package/dist/components/TextInput/styles.css.d.ts.map +1 -1
- package/dist/components/Toggle/index.d.ts +2 -7
- package/dist/components/Toggle/index.d.ts.map +1 -1
- package/dist/components/Toggle/index.js +13 -1
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/UnitInput/index.d.ts.map +1 -1
- package/dist/components/UnitInput/index.js +2 -1
- package/dist/components/UnitInput/styles.css.d.ts +2 -2
- package/dist/components/VerificationCode/styles.css.d.ts +1 -1
- package/dist/components/compositions/OptionSelector/__mock__/resources.d.ts.map +1 -1
- package/dist/components/compositions/OptionSelector/index.js +1 -1
- package/dist/index.js +3 -2
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +46 -4
- package/dist/theme/index.d.ts +3 -2
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -2
- package/dist/ui.css +1 -1
- package/package.json +3 -3
- package/dist/components/SelectableCard/index.js +0 -232
|
@@ -38,7 +38,7 @@ export declare const alert: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
38
38
|
}>;
|
|
39
39
|
export declare const wrapAlert: string;
|
|
40
40
|
export declare const textAlert: string;
|
|
41
|
-
export declare const buttonAlert: Record<"
|
|
41
|
+
export declare const buttonAlert: Record<"small" | "medium", string>;
|
|
42
42
|
export declare const buttonCloseAlert: string;
|
|
43
43
|
export type AlertVariants = NonNullable<RecipeVariants<typeof alert>>;
|
|
44
44
|
export declare const smallIcon: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,SAAS,CAAA;AAO3D;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,mIAcpB,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,SAAS,CAAA;AAO3D;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,mIAcpB,WAAW,4CAgEb,CAAA"}
|
|
@@ -29,47 +29,51 @@ const Avatar = ({
|
|
|
29
29
|
(bgColor) => theme.colors[bgColor]?.backgroundStrong ?? bgColor
|
|
30
30
|
);
|
|
31
31
|
const finalSize = sizes(theme)[size];
|
|
32
|
-
return
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
32
|
+
return (
|
|
33
|
+
// biome-ignore lint/a11y/noNoninteractiveElementInteractions: event handler only when role="button"
|
|
34
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: event handler only when role="button"
|
|
35
|
+
/* @__PURE__ */ jsxs(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: cn(className, containerAvatar({ sentiment, shape, size })),
|
|
39
|
+
"data-has-background": !["user", "image"].includes(variant),
|
|
40
|
+
"data-testid": dataTestId,
|
|
41
|
+
onClick,
|
|
42
|
+
onKeyDown: (event) => event.key === " " || event.key === "Enter" ? onClick?.() : null,
|
|
43
|
+
role: onClick ? "button" : void 0,
|
|
44
|
+
style: {
|
|
45
|
+
backgroundImage: image ? `url(${image})` : void 0,
|
|
46
|
+
backgroundSize: image ? "cover" : void 0,
|
|
47
|
+
...style
|
|
48
|
+
},
|
|
49
|
+
children: [
|
|
50
|
+
upload ? /* @__PURE__ */ jsx("div", { className: uploadContainer({ shape, size }), children: /* @__PURE__ */ jsx(UploadIcon, { prominence: "stronger", sentiment: "neutral", size: "large" }) }) : null,
|
|
51
|
+
variant === "user" ? /* @__PURE__ */ jsx("div", { className: productIconContainer({ shape, size }), children: /* @__PURE__ */ jsx(UserProductIcon, { className: svgAvatar({ shape }) }) }) : null,
|
|
52
|
+
variant === "icon" ? /* @__PURE__ */ jsx("div", { className: elementContainer({ shape }), children }) : null,
|
|
53
|
+
variant === "text" ? /* @__PURE__ */ jsx("div", { className: elementContainer({ shape }), children: /* @__PURE__ */ jsx(
|
|
54
|
+
Text,
|
|
55
|
+
{
|
|
56
|
+
as: "span",
|
|
57
|
+
prominence: sentiment === "primary" ? "stronger" : "strong",
|
|
58
|
+
sentiment: "neutral",
|
|
59
|
+
variant: TEXT_VARIANT_BY_SIZE[size],
|
|
60
|
+
children: text
|
|
61
|
+
}
|
|
62
|
+
) }) : null,
|
|
63
|
+
variant === "colors" ? /* @__PURE__ */ jsx(
|
|
64
|
+
"span",
|
|
65
|
+
{
|
|
66
|
+
className: colorsAvatar({ shape, size }),
|
|
67
|
+
style: assignInlineVars({
|
|
68
|
+
[finalSizeAvatar]: finalSize,
|
|
69
|
+
[finalColorAvatar]: finalColors[0],
|
|
70
|
+
[halvedColorAvatar]: isHalved ? finalColors[1] : finalColors[0]
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
) : null
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
)
|
|
73
77
|
);
|
|
74
78
|
};
|
|
75
79
|
export {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* empty css */
|
|
1
2
|
/* empty css */
|
|
2
3
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
4
|
var containerAvatar = createRuntimeFn({ defaultClassName: "uv_19x8y1k0", variantClassNames: { sentiment: { neutral: "uv_19x8y1k1", primary: "uv_19x8y1k2" }, shape: { circle: "uv_19x8y1k3", square: "uv_19x8y1k4" }, size: { large: "uv_19x8y1k5", medium: "uv_19x8y1k6", small: "uv_19x8y1k7", xsmall: "uv_19x8y1k8" } }, defaultVariants: {}, compoundVariants: [[{ shape: "square", size: "large" }, "uv_19x8y1k9"], [{ shape: "square", size: "medium" }, "uv_19x8y1ka"], [{ shape: "square", size: "small" }, "uv_19x8y1kb"], [{ shape: "square", size: "xsmall" }, "uv_19x8y1kc"]] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAMlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAGlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,GAAG,cAAc,CAAA;AAElB;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,sKAgBpB,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAMlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAGlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,GAAG,cAAc,CAAA;AAElB;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,sKAgBpB,WAAW,mDAyHb,CAAA"}
|
|
@@ -53,7 +53,7 @@ const Banner = ({
|
|
|
53
53
|
justifyContent: "space-between",
|
|
54
54
|
style,
|
|
55
55
|
children: [
|
|
56
|
-
image ? /* @__PURE__ */ jsx(Stack, { className: imageStackBanner[size], justifyContent: "center", children: typeof image === "string" ? /* @__PURE__ */ jsx("img", { alt: "", src: image }) : image }) : /* @__PURE__ */ jsx(Stack, { className: imageStackBanner[size], justifyContent: "center", children: /* @__PURE__ */ jsx("img", { alt: "", src: defaultImage }) }),
|
|
56
|
+
image ? /* @__PURE__ */ jsx(Stack, { className: imageStackBanner[size], justifyContent: "center", children: typeof image === "string" ? /* @__PURE__ */ jsx("img", { alt: "", height: "auto", src: image, width: "auto" }) : image }) : /* @__PURE__ */ jsx(Stack, { className: imageStackBanner[size], justifyContent: "center", children: /* @__PURE__ */ jsx("img", { alt: "", height: "auto", src: defaultImage, width: "auto" }) }),
|
|
57
57
|
/* @__PURE__ */ jsxs(
|
|
58
58
|
Stack,
|
|
59
59
|
{
|
|
@@ -13,7 +13,7 @@ export declare const banner: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
13
13
|
promotional: {};
|
|
14
14
|
};
|
|
15
15
|
}>;
|
|
16
|
-
export declare const imageStackBanner: Record<"
|
|
16
|
+
export declare const imageStackBanner: Record<"small" | "medium", string>;
|
|
17
17
|
export declare const closeButtonBanner: string;
|
|
18
18
|
export type BannerVariants = NonNullable<RecipeVariants<typeof banner>>;
|
|
19
19
|
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
3
|
var wrapperWidth = "var(--uv_1s3oplf0)";
|
|
4
4
|
var wrapperBarStack = "uv_1s3oplf1";
|
|
5
|
-
var barStack = createRuntimeFn({ defaultClassName: "uv_1s3oplf2", variantClassNames: { size: { fontSize: "uv_1s3oplf3 var(--
|
|
5
|
+
var barStack = createRuntimeFn({ defaultClassName: "uv_1s3oplf2", variantClassNames: { size: { fontSize: "uv_1s3oplf3 var(--uv_theme_rwwhslcr)", large: "uv_1s3oplf4", medium: "uv_1s3oplf5", small: "uv_1s3oplf6", xsmall: "uv_1s3oplf7" } }, defaultVariants: { size: "medium" }, compoundVariants: [] });
|
|
6
6
|
var barStackText = "uv_1s3oplf8";
|
|
7
7
|
var containerBarStack = "uv_1s3oplf9";
|
|
8
8
|
var barStackLegendCircle = createRuntimeFn({ defaultClassName: "uv_1s3oplfb", variantClassNames: { child: { "0": "uv_1s3oplfc", "1": "uv_1s3oplfd", "2": "uv_1s3oplfe", "3": "uv_1s3oplff", "4": "uv_1s3oplfg", "5": "uv_1s3oplfh" } }, defaultVariants: { child: 0 }, compoundVariants: [] });
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import type { RenderProp } from '@ultraviolet/utils';
|
|
1
2
|
import type { AriaRole, ButtonHTMLAttributes, CSSProperties, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const Button: import("react").ForwardRefExoticComponent<{
|
|
7
|
-
type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
8
|
-
autoFocus?: ButtonHTMLAttributes<HTMLButtonElement>["autoFocus"];
|
|
3
|
+
import type { ButtonVariants } from './styles.css';
|
|
4
|
+
type CommonProps = {
|
|
5
|
+
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
6
|
+
autoFocus?: ButtonHTMLAttributes<HTMLButtonElement>['autoFocus'];
|
|
9
7
|
role?: AriaRole;
|
|
10
8
|
className?: string;
|
|
11
9
|
'data-testid'?: string;
|
|
@@ -22,27 +20,48 @@ export declare const Button: import("react").ForwardRefExoticComponent<{
|
|
|
22
20
|
'aria-keyshortcuts'?: string;
|
|
23
21
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
24
22
|
tooltip?: string;
|
|
25
|
-
tabIndex?: ButtonHTMLAttributes<HTMLButtonElement>[
|
|
23
|
+
tabIndex?: ButtonHTMLAttributes<HTMLButtonElement>['tabIndex'];
|
|
26
24
|
onMouseDown?: MouseEventHandler<HTMLElement>;
|
|
27
25
|
onMouseUp?: MouseEventHandler<HTMLElement>;
|
|
28
26
|
onMouseOut?: MouseEventHandler<HTMLElement>;
|
|
29
|
-
onBlur?: ButtonHTMLAttributes<HTMLElement>[
|
|
27
|
+
onBlur?: ButtonHTMLAttributes<HTMLElement>['onBlur'];
|
|
30
28
|
onMouseEnter?: MouseEventHandler<HTMLElement>;
|
|
31
29
|
onMouseLeave?: MouseEventHandler<HTMLElement>;
|
|
32
|
-
onPointerDown?: ButtonHTMLAttributes<HTMLButtonElement>[
|
|
33
|
-
onKeyDown?: ButtonHTMLAttributes<HTMLButtonElement>[
|
|
30
|
+
onPointerDown?: ButtonHTMLAttributes<HTMLButtonElement>['onPointerDown'];
|
|
31
|
+
onKeyDown?: ButtonHTMLAttributes<HTMLButtonElement>['onKeyDown'];
|
|
34
32
|
style?: CSSProperties;
|
|
35
|
-
} &
|
|
36
|
-
|
|
37
|
-
fullWidth?: boolean | undefined;
|
|
38
|
-
sentiment?: "primary" | "secondary" | "neutral" | "success" | "danger" | "warning" | "info" | "white" | "black" | undefined;
|
|
39
|
-
size?: "large" | "medium" | "small" | "xsmall" | undefined;
|
|
40
|
-
variant?: "filled" | "outlined" | "ghost" | undefined;
|
|
41
|
-
} & {
|
|
33
|
+
} & ButtonVariants;
|
|
34
|
+
type BaseButtonProps = CommonProps & {
|
|
42
35
|
children: ReactNode;
|
|
43
36
|
name?: string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
} & XOR<[
|
|
38
|
+
{
|
|
39
|
+
href?: string;
|
|
40
|
+
target?: string;
|
|
41
|
+
download?: string;
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
/**
|
|
45
|
+
* Custom element or render function to use instead of the default button.
|
|
46
|
+
*
|
|
47
|
+
* Element form (props auto-merged):
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <Button render={<NextLink href="/about" />}>About</Button>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* Function form (you control prop merging):
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <Button render={(props) => <NextLink {...props} href="/about" />}>About</Button>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
render: RenderProp;
|
|
58
|
+
}
|
|
59
|
+
]>;
|
|
60
|
+
/**
|
|
61
|
+
* Button component is used to trigger an action or event, such as submitting a form, opening a dialog,
|
|
62
|
+
* canceling an action, or performing a delete operation.
|
|
63
|
+
* Use `render` prop to render a custom element (e.g., Next.js Link) while preserving Button's styling.
|
|
64
|
+
*/
|
|
65
|
+
export declare const Button: import("react").ForwardRefExoticComponent<BaseButtonProps & import("react").RefAttributes<Element>>;
|
|
66
|
+
export {};
|
|
48
67
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,KAAK,EACV,QAAQ,EACR,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,SAAS,EAEV,MAAM,OAAO,CAAA;AAId,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAGlD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;IACtD,SAAS,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,mBAAmB,CAAC,EAAE,M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|
|
3
3
|
import { useTheme } from "@ultraviolet/themes";
|
|
4
|
-
import { cn } from "@ultraviolet/utils";
|
|
4
|
+
import { cn, renderElement } from "@ultraviolet/utils";
|
|
5
5
|
import { forwardRef, useMemo } from "react";
|
|
6
6
|
import { Loader } from "../Loader/index.js";
|
|
7
7
|
import { Tooltip } from "../Tooltip/index.js";
|
|
@@ -45,7 +45,8 @@ const Button = forwardRef(
|
|
|
45
45
|
tooltip,
|
|
46
46
|
tabIndex,
|
|
47
47
|
autoFocus,
|
|
48
|
-
style
|
|
48
|
+
style,
|
|
49
|
+
render
|
|
49
50
|
}, ref) => {
|
|
50
51
|
const computeIsDisabled = disabled || isLoading;
|
|
51
52
|
const { theme } = useTheme();
|
|
@@ -62,6 +63,19 @@ const Button = forwardRef(
|
|
|
62
63
|
isLoading ? /* @__PURE__ */ jsx(Loader, { active: true, sentiment: computedSentimentLoader, size: "small" }) : null,
|
|
63
64
|
children
|
|
64
65
|
] });
|
|
66
|
+
const computedClassName = cn(
|
|
67
|
+
className,
|
|
68
|
+
button({ disabled, fullWidth, sentiment, size, variant })
|
|
69
|
+
);
|
|
70
|
+
if (render) {
|
|
71
|
+
return /* @__PURE__ */ jsx(Tooltip, { containerFullWidth: fullWidth, text: tooltip, children: renderElement(render, {
|
|
72
|
+
children,
|
|
73
|
+
className: computedClassName,
|
|
74
|
+
"data-testid": dataTestId,
|
|
75
|
+
ref,
|
|
76
|
+
style
|
|
77
|
+
}) });
|
|
78
|
+
}
|
|
65
79
|
if (href && !computeIsDisabled) {
|
|
66
80
|
return /* @__PURE__ */ jsx(Tooltip, { containerFullWidth: fullWidth, text: tooltip, children: /* @__PURE__ */ jsx(
|
|
67
81
|
"a",
|
|
@@ -77,10 +91,7 @@ const Button = forwardRef(
|
|
|
77
91
|
"aria-pressed": ariaPressed,
|
|
78
92
|
"aria-roledescription": ariaRoledescription,
|
|
79
93
|
autoFocus,
|
|
80
|
-
className:
|
|
81
|
-
className,
|
|
82
|
-
button({ disabled, fullWidth, sentiment, size, variant })
|
|
83
|
-
),
|
|
94
|
+
className: computedClassName,
|
|
84
95
|
"data-testid": dataTestId,
|
|
85
96
|
download,
|
|
86
97
|
href,
|
|
@@ -110,10 +121,7 @@ const Button = forwardRef(
|
|
|
110
121
|
"aria-haspopup": ariaHaspopup,
|
|
111
122
|
"aria-label": ariaLabel,
|
|
112
123
|
autoFocus,
|
|
113
|
-
className:
|
|
114
|
-
className,
|
|
115
|
-
button({ disabled, fullWidth, sentiment, size, variant })
|
|
116
|
-
),
|
|
124
|
+
className: computedClassName,
|
|
117
125
|
"data-testid": dataTestId,
|
|
118
126
|
disabled: computeIsDisabled,
|
|
119
127
|
name,
|
|
@@ -16,7 +16,7 @@ type CheckboxProps = {
|
|
|
16
16
|
required?: boolean;
|
|
17
17
|
'data-testid'?: string;
|
|
18
18
|
tooltip?: string;
|
|
19
|
-
} & Pick<InputHTMLAttributes<HTMLInputElement>, 'autoFocus' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onClick' | 'onFocus' | 'tabIndex' | 'value' | 'style'> & LabelProp;
|
|
19
|
+
} & Pick<InputHTMLAttributes<HTMLInputElement>, 'autoFocus' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onKeyDown' | 'onClick' | 'onFocus' | 'tabIndex' | 'value' | 'style'> & LabelProp;
|
|
20
20
|
/**
|
|
21
21
|
* Checkbox is an input component used to select or deselect an option.
|
|
22
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAmC3D,KAAK,SAAS,GACV;IACE,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB,GACD;IACE,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,YAAY,EAAE,MAAM,CAAA;CACr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M,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GAAG,IAAI,CACN,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,WAAW,GACX,IAAI,GACJ,MAAM,GACN,QAAQ,GACR,UAAU,GACV,WAAW,GACX,SAAS,GACT,SAAS,GACT,UAAU,GACV,OAAO,GACP,OAAO,CACV,GACC,SAAS,CAAA;AAEX;;GAEG;AACH,eAAO,MAAM,QAAQ,4GAsJpB,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useTheme } from "@ultraviolet/themes";
|
|
4
4
|
import { cn } from "@ultraviolet/utils";
|
|
5
5
|
import { forwardRef, useId } from "react";
|
|
6
6
|
import { Stack } from "../Stack/index.js";
|
|
7
7
|
import { Text } from "../Text/index.js";
|
|
8
8
|
import { Tooltip } from "../Tooltip/index.js";
|
|
9
|
-
import { checkboxInput, icon, iconPath, checkMixedMark,
|
|
9
|
+
import { checkboxInput, icon, iconPath, checkMixedMark, errorText, checkboxContainer, innerCheckbox, label } from "./styles.css.js";
|
|
10
10
|
const CheckboxIconContainer = ({ children }) => {
|
|
11
11
|
const theme = useTheme();
|
|
12
12
|
return /* @__PURE__ */ jsxs("g", { children: [
|
|
@@ -32,6 +32,7 @@ const Checkbox = forwardRef(
|
|
|
32
32
|
onChange,
|
|
33
33
|
onFocus,
|
|
34
34
|
onBlur,
|
|
35
|
+
onKeyDown,
|
|
35
36
|
error,
|
|
36
37
|
name,
|
|
37
38
|
helper,
|
|
@@ -50,6 +51,18 @@ const Checkbox = forwardRef(
|
|
|
50
51
|
}, ref) => {
|
|
51
52
|
const uniqId = useId();
|
|
52
53
|
const localId = id ?? uniqId;
|
|
54
|
+
const styledChildren = typeof children === "string" ? /* @__PURE__ */ jsx(
|
|
55
|
+
Text,
|
|
56
|
+
{
|
|
57
|
+
as: "label",
|
|
58
|
+
className: label,
|
|
59
|
+
htmlFor: localId,
|
|
60
|
+
prominence: "default",
|
|
61
|
+
sentiment: "neutral",
|
|
62
|
+
variant: "body",
|
|
63
|
+
children
|
|
64
|
+
}
|
|
65
|
+
) : /* @__PURE__ */ jsx("label", { className: label, htmlFor: localId, children });
|
|
53
66
|
const isCheck = checked === true ? checked : false;
|
|
54
67
|
return /* @__PURE__ */ jsx(Tooltip, { text: tooltip, children: /* @__PURE__ */ jsxs(
|
|
55
68
|
"div",
|
|
@@ -77,6 +90,7 @@ const Checkbox = forwardRef(
|
|
|
77
90
|
onBlur,
|
|
78
91
|
onChange,
|
|
79
92
|
onFocus,
|
|
93
|
+
onKeyDown,
|
|
80
94
|
ref,
|
|
81
95
|
required,
|
|
82
96
|
style,
|
|
@@ -85,44 +99,36 @@ const Checkbox = forwardRef(
|
|
|
85
99
|
value
|
|
86
100
|
}
|
|
87
101
|
),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
"
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
/* @__PURE__ */ jsxs("svg", { className: icon, fill: "none", viewBox: "0 0 24 24", children: [
|
|
103
|
+
/* @__PURE__ */ jsx("title", { children: "checkbox" }),
|
|
104
|
+
/* @__PURE__ */ jsx(CheckboxIconContainer, { children: checked !== "indeterminate" ? /* @__PURE__ */ jsx(
|
|
105
|
+
"path",
|
|
106
|
+
{
|
|
107
|
+
className: iconPath,
|
|
108
|
+
clipRule: "evenodd",
|
|
109
|
+
d: "M15.6678 5.26709C16.0849 5.6463 16.113 6.28907 15.7307 6.70276L9.29172 13.6705C9.10291 13.8748 8.83818 13.9937 8.55884 13.9998C8.2795 14.0058 8.0098 13.8984 7.81223 13.7024L4.30004 10.2185C3.89999 9.82169 3.89999 9.17831 4.30004 8.78149C4.70009 8.38467 5.34869 8.38467 5.74874 8.78149L8.50441 11.5149L14.2205 5.32951C14.6028 4.91583 15.2508 4.88788 15.6678 5.26709Z",
|
|
110
|
+
fill: "white",
|
|
111
|
+
fillRule: "evenodd",
|
|
112
|
+
height: 9,
|
|
113
|
+
width: 12,
|
|
114
|
+
x: "5",
|
|
115
|
+
y: "4"
|
|
116
|
+
}
|
|
117
|
+
) : /* @__PURE__ */ jsx(
|
|
118
|
+
"rect",
|
|
119
|
+
{
|
|
120
|
+
className: checkMixedMark,
|
|
121
|
+
height: "2",
|
|
122
|
+
rx: "1",
|
|
123
|
+
width: "12",
|
|
124
|
+
x: "6",
|
|
125
|
+
y: "11"
|
|
126
|
+
}
|
|
127
|
+
) })
|
|
128
|
+
] }),
|
|
112
129
|
children || required || helper || error ? /* @__PURE__ */ jsxs(Stack, { flex: 1, gap: 0.5, children: [
|
|
113
130
|
children || required ? /* @__PURE__ */ jsxs(Stack, { alignItems: "center", direction: "row", flex: 1, gap: 0.5, children: [
|
|
114
|
-
children ?
|
|
115
|
-
Text,
|
|
116
|
-
{
|
|
117
|
-
as: "label",
|
|
118
|
-
className: label,
|
|
119
|
-
htmlFor: localId,
|
|
120
|
-
prominence: "default",
|
|
121
|
-
sentiment: "neutral",
|
|
122
|
-
variant: "body",
|
|
123
|
-
children
|
|
124
|
-
}
|
|
125
|
-
) : /* @__PURE__ */ jsx("label", { className: label, htmlFor: localId, children }) }) : null,
|
|
131
|
+
children ? styledChildren : null,
|
|
126
132
|
required ? /* @__PURE__ */ jsx(Text, { as: "sup", sentiment: "danger", variant: "body", children: "*" }) : null
|
|
127
133
|
] }) : null,
|
|
128
134
|
helper ? /* @__PURE__ */ jsx(
|
|
@@ -15,7 +15,7 @@ type ChipType = {
|
|
|
15
15
|
export declare const Chip: {
|
|
16
16
|
({ children, size, disabled, active, className, "data-testid": dataTestId, onClick, style, }: ChipType): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
Icon: ({ name, onClick, "data-testid": dataTestId, }: {
|
|
18
|
-
name: "search" | "anchor" | "bold" | "
|
|
18
|
+
name: "search" | "anchor" | "bold" | "sort" | "filter" | "address" | "audio" | "video" | "italic" | "underline" | "drag" | "image" | "stop" | "view" | "id" | "send" | "email" | "arrowLeft" | "cancel" | "close" | "play" | "download" | "pen" | "upload" | "addressOutline" | "addressPlay" | "adjustmentsHorizontal" | "adjustmentsHorizontalOutline" | "alertCircle" | "alertCircleOutline" | "arrowDown" | "arrowLeftBottom" | "arrowLeftDouble" | "arrowRightBottom" | "arrowRightDouble" | "arrowRight" | "arrowUp" | "attach" | "autoFix" | "autoFixOutline" | "bookOpenOutline" | "bookOpenOutlineOutline" | "boxEssentials" | "boxEssentialsOutline" | "bullhorn" | "bullhornOutline" | "burger" | "calculator" | "calculatorOutline" | "calendarRange" | "calendarRangeOutline" | "chat" | "chatOutline" | "checkCircle" | "checkCircleOutline" | "check" | "clickhouse" | "lock" | "clock" | "lockOutline" | "clockOutline" | "closeCircle" | "closeCircleOutline" | "console" | "consoleOutline" | "copyContent" | "credential" | "credentialOutline" | "creditCard" | "creditCardOutline" | "database" | "databaseOutline" | "delete" | "deleteOutline" | "detach" | "doc" | "docOutline" | "docPaper" | "docPaperOutline" | "dotsHorizontal" | "dotsVertical" | "earth" | "earthOutline" | "east" | "eastShort" | "emailOutline" | "emailRemove" | "emailRemoveOutline" | "equal" | "escape" | "expand" | "expandMore" | "eye" | "eyeOff" | "eyeOffOutline" | "eyeOutline" | "filterOutline" | "folder" | "folderOutline" | "github" | "helpCircle" | "helpCircleOutline" | "home" | "homeOutline" | "idOutline" | "imageOutline" | "information" | "informationOutline" | "instagram" | "leaf" | "leafOutline" | "leftRightArrow" | "lightBulb" | "lightBulbOutline" | "linkedin" | "listBullet" | "listNumber" | "logout" | "members" | "membersOutline" | "minus" | "moon" | "moonOutline" | "mosaic" | "mosaicOutline" | "music" | "musicOutline" | "north" | "northShort" | "notification" | "notificationOutline" | "openInNew" | "organization" | "paperclip" | "partnerSpace" | "pen2" | "pen2Outline" | "pencil" | "pencilOutline" | "penOutline" | "phone" | "phoneOutline" | "pin" | "pinOutline" | "playOutline" | "plus" | "privacy" | "privacyOutline" | "profile" | "profileOutline" | "progressCheck" | "rayEndArrow" | "rayStartArrow" | "rayStartEnd" | "rayTopArrow" | "reboot" | "restore" | "revoke" | "rocket" | "rocketOutline" | "rss" | "sendOutline" | "settings" | "settingsOutline" | "shieldCheck" | "shieldCheckOutline" | "shield" | "shieldOutline" | "sidebar" | "sidebarOutline" | "slack" | "south" | "southShort" | "sparkles" | "sparklesOutline" | "star" | "starOutline" | "stopOutline" | "sun" | "sunOutline" | "support" | "supportOutline" | "switchOrga" | "thumbsDown" | "thumbsDownOutline" | "thumbsUp" | "thumbsUpOutline" | "twitter" | "unlock" | "unlockOutline" | "unpin" | "unpinOutline" | "videoOutline" | "weatherNight" | "weatherNightOutline" | "west" | "westShort" | "youtube";
|
|
19
19
|
onClick?: () => void;
|
|
20
20
|
'data-testid'?: string;
|
|
21
21
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpersLocale.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/helpersLocale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAatC,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,GAAG,MAAM,aAWzD,CAAA;AAaD,eAAO,MAAM,OAAO,GAAI,QAAQ,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"helpersLocale.d.ts","sourceRoot":"","sources":["../../../src/components/DateInput/helpersLocale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAatC,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,GAAG,MAAM,aAWzD,CAAA;AAaD,eAAO,MAAM,OAAO,GAAI,QAAQ,MAAM,GAAG,MAAM,2BAwB9C,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,GAAG,MAAM,2BAahD,CAAA"}
|
|
@@ -30,15 +30,18 @@ const getDays = (locale) => {
|
|
|
30
30
|
const computedLocale = typeof locale === "string" ? locale : locale.code;
|
|
31
31
|
const longDays = getLocalizedDays(computedLocale);
|
|
32
32
|
const days = {};
|
|
33
|
-
|
|
33
|
+
for (const longDay of longDays) {
|
|
34
34
|
days[longDay] = longDay.slice(0, 2);
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
const dayKeys = Object.keys(days);
|
|
37
|
-
dayKeys.
|
|
37
|
+
const dayKeysShifted = dayKeys.shift();
|
|
38
|
+
if (dayKeysShifted) {
|
|
39
|
+
dayKeys.push(dayKeysShifted);
|
|
40
|
+
}
|
|
38
41
|
const orderedDaysMap = {};
|
|
39
|
-
|
|
42
|
+
for (const key of dayKeys) {
|
|
40
43
|
orderedDaysMap[key] = days[key];
|
|
41
|
-
}
|
|
44
|
+
}
|
|
42
45
|
return orderedDaysMap;
|
|
43
46
|
};
|
|
44
47
|
const getMonths = (locale) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const DIALOG_SENTIMENTS: ("
|
|
1
|
+
export declare const DIALOG_SENTIMENTS: ("danger" | "success" | "primary" | "warning")[];
|
|
2
2
|
export type DialogSentiment = (typeof DIALOG_SENTIMENTS)[number];
|
|
3
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -13,7 +13,7 @@ export declare const BaseDialog: ({ ariaLabel, className, children, "data-testid
|
|
|
13
13
|
export declare const Dialog: (({ ariaLabel, className, children, "data-testid": dataTestId, disclosure, hideOnClickOutside, hideOnEsc, id, isClosable, onBeforeClose, onClose, open, placement, sentiment, title, style, }: DialogProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
14
14
|
Button: ({ children, onClick, disabled, tooltip, style, }: {
|
|
15
15
|
children: import("react").ReactNode;
|
|
16
|
-
} & Pick<{
|
|
16
|
+
} & Pick<({
|
|
17
17
|
type?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
18
18
|
autoFocus?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["autoFocus"];
|
|
19
19
|
role?: import("react").AriaRole;
|
|
@@ -45,16 +45,31 @@ export declare const Dialog: (({ ariaLabel, className, children, "data-testid":
|
|
|
45
45
|
} & {
|
|
46
46
|
disabled?: boolean | undefined;
|
|
47
47
|
fullWidth?: boolean | undefined;
|
|
48
|
-
sentiment?: "
|
|
49
|
-
size?: "
|
|
48
|
+
sentiment?: "danger" | "info" | "neutral" | "success" | "primary" | "warning" | "black" | "white" | "secondary" | undefined;
|
|
49
|
+
size?: "small" | "large" | "medium" | "xsmall" | undefined;
|
|
50
50
|
variant?: "filled" | "outlined" | "ghost" | undefined;
|
|
51
|
-
} & {
|
|
51
|
+
} & ({
|
|
52
52
|
children: import("react").ReactNode;
|
|
53
53
|
name?: string;
|
|
54
|
+
} & ((Without<{
|
|
55
|
+
href?: string;
|
|
56
|
+
target?: string;
|
|
57
|
+
download?: string;
|
|
58
|
+
}, {
|
|
59
|
+
render: import("@ultraviolet/utils").RenderProp;
|
|
60
|
+
}> & {
|
|
61
|
+
render: import("@ultraviolet/utils").RenderProp;
|
|
62
|
+
}) | (Without<{
|
|
63
|
+
render: import("@ultraviolet/utils").RenderProp;
|
|
64
|
+
}, {
|
|
65
|
+
href?: string;
|
|
66
|
+
target?: string;
|
|
67
|
+
download?: string;
|
|
68
|
+
}> & {
|
|
54
69
|
href?: string;
|
|
55
70
|
target?: string;
|
|
56
71
|
download?: string;
|
|
57
|
-
} & import("react").RefAttributes<Element>, "tooltip" | "style" | "disabled" | "onClick">) => import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
})))) & import("react").RefAttributes<Element>, "tooltip" | "style" | "disabled" | "onClick">) => import("react/jsx-runtime").JSX.Element;
|
|
58
73
|
Buttons: ({ secondaryButton, primaryButton, }: {
|
|
59
74
|
secondaryButton: import("react").ReactNode;
|
|
60
75
|
primaryButton: import("react").ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAOlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAKlD,KAAK,WAAW,GAAG,IAAI,CACrB,cAAc,CAAC,OAAO,KAAK,CAAC,EAC1B,WAAW,GACX,UAAU,GACV,WAAW,GACX,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,WAAW,GACX,IAAI,GACJ,YAAY,GACZ,eAAe,GACf,SAAS,GACT,MAAM,GACN,WAAW,GACX,OAAO,CACV,GAAG;IACF,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,6LAiBxB,WAAW,4CA4Db,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,iMAjEhB,WAAW
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAOlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAKlD,KAAK,WAAW,GAAG,IAAI,CACrB,cAAc,CAAC,OAAO,KAAK,CAAC,EAC1B,WAAW,GACX,UAAU,GACV,WAAW,GACX,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,WAAW,GACX,IAAI,GACJ,YAAY,GACZ,eAAe,GACf,SAAS,GACT,MAAM,GACN,WAAW,GACX,OAAO,CACV,GAAG;IACF,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,6LAiBxB,WAAW,4CA4Db,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,iMAjEhB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEZ,CAAA"}
|
|
@@ -4,7 +4,7 @@ export declare const SIZES: {
|
|
|
4
4
|
small: number;
|
|
5
5
|
};
|
|
6
6
|
export type SizeProp = keyof typeof SIZES;
|
|
7
|
-
export declare const drawer: Record<"
|
|
7
|
+
export declare const drawer: Record<"small" | "large" | "medium", string>;
|
|
8
8
|
export declare const drawerContentWrapper: string;
|
|
9
9
|
export declare const drawerChildrenWrapper: string;
|
|
10
10
|
export declare const drawerContent: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9C,KAAK,eAAe,GAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,SAAS,CAAA;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB;;OA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