@ultraviolet/ui 3.0.0-beta.19 → 3.0.0-beta.20
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.cjs +0 -1
- package/dist/components/Alert/styles.css.js +0 -1
- package/dist/components/Avatar/styles.css.cjs +1 -0
- package/dist/components/Avatar/styles.css.js +1 -0
- package/dist/components/Avatar/variables.css.cjs +0 -1
- package/dist/components/Avatar/variables.css.js +0 -1
- package/dist/components/Banner/index.cjs +2 -3
- package/dist/components/Banner/index.js +1 -2
- package/dist/components/Banner/styles.css.d.ts +1 -1
- package/dist/components/BarChart/index.cjs +4 -4
- package/dist/components/BarChart/index.js +1 -1
- package/dist/components/Breadcrumbs/styles.css.cjs +1 -0
- package/dist/components/Breadcrumbs/styles.css.js +1 -0
- package/dist/components/Button/index.cjs +2 -2
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Checkbox/index.cjs +2 -2
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/Dialog/constants.d.ts +1 -1
- package/dist/components/Dialog/index.d.ts +2 -2
- package/dist/components/EmptyState/styles.css.d.ts +1 -1
- package/dist/components/ExpandableCard/index.cjs +2 -2
- package/dist/components/ExpandableCard/index.js +1 -1
- package/dist/components/GlobalAlert/GlobalAlertLink.cjs +2 -2
- package/dist/components/GlobalAlert/GlobalAlertLink.js +1 -1
- package/dist/components/LineChart/index.cjs +5 -5
- package/dist/components/LineChart/index.js +1 -1
- package/dist/components/List/index.d.ts +1 -1
- package/dist/components/Menu/helpers.d.ts +1 -1
- package/dist/components/Menu/index.d.ts +1 -1
- package/dist/components/NumberInput/styles.css.d.ts +1 -1
- package/dist/components/PieChart/index.cjs +7 -7
- package/dist/components/PieChart/index.js +1 -1
- package/dist/components/ProgressBar/styles.css.d.ts +1 -1
- package/dist/components/Row/styles.css.d.ts +46 -46
- package/dist/components/SelectInput/components/Dropdown.cjs +2 -3
- package/dist/components/SelectInput/components/Dropdown.js +1 -2
- package/dist/components/SelectableCard/index.cjs +2 -2
- package/dist/components/SelectableCard/index.js +1 -1
- package/dist/components/Slider/components/DoubleSlider.cjs +20 -20
- package/dist/components/Slider/components/DoubleSlider.js +6 -6
- package/dist/components/Slider/components/SingleSlider.cjs +5 -5
- package/dist/components/Slider/components/SingleSlider.js +4 -4
- package/dist/components/Slider/styles.d.ts +11 -11
- package/dist/components/Snippet/index.cjs +14 -14
- package/dist/components/Snippet/index.js +10 -10
- package/dist/components/Stack/styles.css.d.ts +51 -51
- package/dist/components/SwitchButton/styles.css.d.ts +3 -3
- package/dist/components/Table/HeaderRow.cjs +2 -2
- package/dist/components/Table/HeaderRow.js +1 -1
- package/dist/components/Table/index.cjs +4 -4
- package/dist/components/Table/index.js +3 -3
- package/dist/components/Tabs/TabMenuItem.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/TextArea/index.cjs +2 -2
- package/dist/components/TextArea/index.js +1 -1
- package/dist/components/TextInput/styles.css.d.ts +1 -1
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/UnitInput/styles.css.d.ts +2 -2
- package/dist/components/VerificationCode/styles.css.d.ts +1 -1
- package/dist/index.cjs +8 -3
- package/dist/index.js +1 -2
- package/dist/theme/index.cjs +8 -0
- package/dist/theme/index.d.ts +2 -3
- package/dist/theme/index.js +4 -2
- package/package.json +3 -3
- package/dist/theme/ThemeProvider.cjs +0 -43
- package/dist/theme/ThemeProvider.js +0 -43
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
;/* empty css */
|
|
4
3
|
;/* empty css */
|
|
5
4
|
const createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
6
5
|
var alert = createRuntimeFn.createRuntimeFn({ defaultClassName: "uv_1b838gx0", variantClassNames: { sentiment: { danger: "uv_1b838gx1", info: "uv_1b838gx2", success: "uv_1b838gx3", warning: "uv_1b838gx4", neutral: "uv_1b838gx5" } }, defaultVariants: { sentiment: "danger" }, compoundVariants: [] });
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* empty css */
|
|
2
1
|
/* empty css */
|
|
3
2
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4
3
|
var alert = createRuntimeFn({ defaultClassName: "uv_1b838gx0", variantClassNames: { sentiment: { danger: "uv_1b838gx1", info: "uv_1b838gx2", success: "uv_1b838gx3", warning: "uv_1b838gx4", neutral: "uv_1b838gx5" } }, defaultVariants: { sentiment: "danger" }, compoundVariants: [] });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
;/* empty css */
|
|
3
4
|
;/* empty css */
|
|
4
5
|
const createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
5
6
|
var containerAvatar = createRuntimeFn.createRuntimeFn({ defaultClassName: "uv_19x8y1k0", variantClassNames: { shape: { circle: "uv_19x8y1k1", square: "uv_19x8y1k2" }, size: { large: "uv_19x8y1k3", medium: "uv_19x8y1k4", small: "uv_19x8y1k5", xsmall: "uv_19x8y1k6" }, sentiment: { primary: "uv_19x8y1k7", neutral: "uv_19x8y1k8" } }, defaultVariants: {}, compoundVariants: [[{ size: "large", shape: "square" }, "uv_19x8y1k9"], [{ size: "medium", shape: "square" }, "uv_19x8y1ka"], [{ size: "small", shape: "square" }, "uv_19x8y1kb"], [{ size: "xsmall", shape: "square" }, "uv_19x8y1kc"]] });
|
|
@@ -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: { shape: { circle: "uv_19x8y1k1", square: "uv_19x8y1k2" }, size: { large: "uv_19x8y1k3", medium: "uv_19x8y1k4", small: "uv_19x8y1k5", xsmall: "uv_19x8y1k6" }, sentiment: { primary: "uv_19x8y1k7", neutral: "uv_19x8y1k8" } }, defaultVariants: {}, compoundVariants: [[{ size: "large", shape: "square" }, "uv_19x8y1k9"], [{ size: "medium", shape: "square" }, "uv_19x8y1ka"], [{ size: "small", shape: "square" }, "uv_19x8y1kb"], [{ size: "xsmall", shape: "square" }, "uv_19x8y1kc"]] });
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const Icon = require("@ultraviolet/icons");
|
|
6
|
+
const themes = require("@ultraviolet/themes");
|
|
6
7
|
const react = require("react");
|
|
7
|
-
require("../../theme/index.cjs");
|
|
8
8
|
const index$2 = require("../Button/index.cjs");
|
|
9
9
|
const index$3 = require("../Link/index.cjs");
|
|
10
10
|
const index = require("../Stack/index.cjs");
|
|
@@ -12,7 +12,6 @@ const index$1 = require("../Text/index.cjs");
|
|
|
12
12
|
const defaultImage = require("./assets/default-image.svg.cjs");
|
|
13
13
|
const defaultImageSmall = require("./assets/default-image-small.svg.cjs");
|
|
14
14
|
const styles_css = require("./styles.css.cjs");
|
|
15
|
-
const ThemeProvider = require("../../theme/ThemeProvider.cjs");
|
|
16
15
|
const Banner = ({
|
|
17
16
|
variant = "intro",
|
|
18
17
|
size = "medium",
|
|
@@ -31,7 +30,7 @@ const Banner = ({
|
|
|
31
30
|
}) => {
|
|
32
31
|
const {
|
|
33
32
|
theme
|
|
34
|
-
} =
|
|
33
|
+
} = themes.useTheme();
|
|
35
34
|
const defaultImage$1 = size === "small" ? defaultImageSmall : defaultImage;
|
|
36
35
|
const prominence = react.useMemo(() => {
|
|
37
36
|
if (variant === "promotional") {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { CloseIcon } from "@ultraviolet/icons";
|
|
4
|
+
import { useTheme } from "@ultraviolet/themes";
|
|
4
5
|
import { useMemo, useState } from "react";
|
|
5
|
-
import "../../theme/index.js";
|
|
6
6
|
import { Button } from "../Button/index.js";
|
|
7
7
|
import { Link } from "../Link/index.js";
|
|
8
8
|
import { Stack } from "../Stack/index.js";
|
|
@@ -10,7 +10,6 @@ import { Text } from "../Text/index.js";
|
|
|
10
10
|
import defaultIllustration from "./assets/default-image.svg.js";
|
|
11
11
|
import defaultIllustrationSmall from "./assets/default-image-small.svg.js";
|
|
12
12
|
import { banner, imageStackBanner, closeButtonBanner } from "./styles.css.js";
|
|
13
|
-
import { useTheme } from "../../theme/ThemeProvider.js";
|
|
14
13
|
const Banner = ({
|
|
15
14
|
variant = "intro",
|
|
16
15
|
size = "medium",
|
|
@@ -13,6 +13,6 @@ 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<"medium" | "small", string>;
|
|
17
17
|
export declare const closeButtonBanner: string;
|
|
18
18
|
export type BannerVariants = NonNullable<RecipeVariants<typeof banner>>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react = require("@emotion/react");
|
|
6
5
|
const bar = require("@nivo/bar");
|
|
7
|
-
const
|
|
6
|
+
const themes = require("@ultraviolet/themes");
|
|
7
|
+
const react = require("react");
|
|
8
8
|
const legend = require("../../helpers/legend.cjs");
|
|
9
9
|
const nivoTheme = require("../../helpers/nivoTheme.cjs");
|
|
10
10
|
const Tooltip = require("./Tooltip.cjs");
|
|
@@ -30,8 +30,8 @@ const BarChart = ({
|
|
|
30
30
|
className,
|
|
31
31
|
"data-testid": dataTestId
|
|
32
32
|
}) => {
|
|
33
|
-
const theme =
|
|
34
|
-
const tooltip = react
|
|
33
|
+
const theme = themes.useTheme();
|
|
34
|
+
const tooltip = react.useCallback((props) => {
|
|
35
35
|
const {
|
|
36
36
|
indexValue,
|
|
37
37
|
formattedValue,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { useTheme } from "@emotion/react";
|
|
4
3
|
import { ResponsiveBar } from "@nivo/bar";
|
|
4
|
+
import { useTheme } from "@ultraviolet/themes";
|
|
5
5
|
import { useCallback } from "react";
|
|
6
6
|
import { getLegendColor } from "../../helpers/legend.js";
|
|
7
7
|
import { getNivoTheme } from "../../helpers/nivoTheme.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const themes = require("@ultraviolet/themes");
|
|
5
6
|
const react = require("react");
|
|
6
|
-
const ThemeProvider = require("../../theme/ThemeProvider.cjs");
|
|
7
7
|
const index$1 = require("../Loader/index.cjs");
|
|
8
8
|
const index = require("../Tooltip/index.cjs");
|
|
9
9
|
const styles_css = require("./styles.css.cjs");
|
|
@@ -49,7 +49,7 @@ const Button = react.forwardRef(({
|
|
|
49
49
|
const computeIsDisabled = disabled || isLoading;
|
|
50
50
|
const {
|
|
51
51
|
theme
|
|
52
|
-
} =
|
|
52
|
+
} = themes.useTheme();
|
|
53
53
|
const computedSentimentLoader = react.useMemo(() => {
|
|
54
54
|
if (variant === "filled" && !["black", "white"].includes(sentiment)) {
|
|
55
55
|
if (theme === "light") {
|
|
@@ -35,9 +35,9 @@ export declare const Button: import("react").ForwardRefExoticComponent<{
|
|
|
35
35
|
onKeyDown?: ButtonHTMLAttributes<HTMLButtonElement>["onKeyDown"];
|
|
36
36
|
style?: CSSProperties;
|
|
37
37
|
} & {
|
|
38
|
-
size?: "
|
|
38
|
+
size?: "large" | "medium" | "small" | "xsmall" | undefined;
|
|
39
39
|
fullWidth?: boolean | undefined;
|
|
40
|
-
sentiment?: "
|
|
40
|
+
sentiment?: "primary" | "secondary" | "neutral" | "success" | "danger" | "warning" | "info" | "white" | "black" | undefined;
|
|
41
41
|
variant?: "filled" | "outlined" | "ghost" | undefined;
|
|
42
42
|
disabled?: boolean | undefined;
|
|
43
43
|
} & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { useTheme } from "@ultraviolet/themes";
|
|
3
4
|
import { forwardRef, useMemo } from "react";
|
|
4
|
-
import { useTheme } from "../../theme/ThemeProvider.js";
|
|
5
5
|
import { Loader } from "../Loader/index.js";
|
|
6
6
|
import { Tooltip } from "../Tooltip/index.js";
|
|
7
7
|
import { button } from "./styles.css.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const themes = require("@ultraviolet/themes");
|
|
6
6
|
const react = require("react");
|
|
7
7
|
const index$1 = require("../Stack/index.cjs");
|
|
8
8
|
const index$2 = require("../Text/index.cjs");
|
|
@@ -11,7 +11,7 @@ const styles_css = require("./styles.css.cjs");
|
|
|
11
11
|
const CheckboxIconContainer = ({
|
|
12
12
|
children
|
|
13
13
|
}) => {
|
|
14
|
-
const theme =
|
|
14
|
+
const theme = themes.useTheme();
|
|
15
15
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
16
16
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { className: styles_css.innerCheckbox, height: "16", rx: theme.radii.small, strokeWidth: "2", width: "16", x: "4", y: "4" }),
|
|
17
17
|
children
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { useTheme } from "@
|
|
3
|
+
import { useTheme } from "@ultraviolet/themes";
|
|
4
4
|
import { forwardRef, useId } from "react";
|
|
5
5
|
import { Stack } from "../Stack/index.js";
|
|
6
6
|
import { Text } from "../Text/index.js";
|
|
@@ -14,7 +14,7 @@ type ChipType = {
|
|
|
14
14
|
export declare const Chip: {
|
|
15
15
|
({ children, size, disabled, active, className, "data-testid": dataTestId, onClick, }: ChipType): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
16
|
Icon: ({ name, onClick, "data-testid": dataTestId, }: {
|
|
17
|
-
name: "search" | "anchor" | "bold" | "
|
|
17
|
+
name: "search" | "anchor" | "bold" | "filter" | "sort" | "italic" | "underline" | "drag" | "address" | "audio" | "video" | "image" | "stop" | "view" | "id" | "pen" | "download" | "cancel" | "close" | "play" | "send" | "email" | "arrowLeft" | "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" | "closeCircleOutline" | "console" | "consoleOutline" | "copyContent" | "credential" | "credentialOutline" | "creditCard" | "creditCardOutline" | "database" | "databaseOutline" | "delete" | "deleteOutline" | "detach" | "doc" | "docOutline" | "dotsHorizontal" | "dotsVertical" | "earth" | "earthOutline" | "east" | "eastShort" | "emailOutline" | "emailRemove" | "emailRemoveOutline" | "equal" | "escape" | "expand" | "expandMore" | "eye" | "eyeOff" | "eyeOffOutline" | "eyeOutline" | "filterOutline" | "folder" | "folderOutline" | "github" | "helpCircle" | "helpCircleOutline" | "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" | "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";
|
|
18
18
|
onClick?: () => void;
|
|
19
19
|
'data-testid'?: string;
|
|
20
20
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DIALOG_SENTIMENTS: ("
|
|
1
|
+
export declare const DIALOG_SENTIMENTS: ("primary" | "success" | "danger" | "warning")[];
|
|
2
2
|
export type DialogSentiment = (typeof DIALOG_SENTIMENTS)[number];
|
|
@@ -42,9 +42,9 @@ export declare const Dialog: (({ ariaLabel, className, children, "data-testid":
|
|
|
42
42
|
onKeyDown?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["onKeyDown"];
|
|
43
43
|
style?: import("react").CSSProperties;
|
|
44
44
|
} & {
|
|
45
|
-
size?: "
|
|
45
|
+
size?: "large" | "medium" | "small" | "xsmall" | undefined;
|
|
46
46
|
fullWidth?: boolean | undefined;
|
|
47
|
-
sentiment?: "
|
|
47
|
+
sentiment?: "primary" | "secondary" | "neutral" | "success" | "danger" | "warning" | "info" | "white" | "black" | undefined;
|
|
48
48
|
variant?: "filled" | "outlined" | "ghost" | undefined;
|
|
49
49
|
disabled?: boolean | undefined;
|
|
50
50
|
} & {
|
|
@@ -25,5 +25,5 @@ export declare const emptyStateContainer: import("@vanilla-extract/recipes").Run
|
|
|
25
25
|
};
|
|
26
26
|
}>;
|
|
27
27
|
export declare const paddedStack: string;
|
|
28
|
-
export declare const emptyStateImage: Record<"
|
|
28
|
+
export declare const emptyStateImage: Record<"large" | "medium" | "small", string>;
|
|
29
29
|
export {};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react$1 = require("@emotion/react");
|
|
6
5
|
const Icon = require("@ultraviolet/icons");
|
|
6
|
+
const themes = require("@ultraviolet/themes");
|
|
7
7
|
const react = require("react");
|
|
8
8
|
const index = require("../Stack/index.cjs");
|
|
9
9
|
const index$1 = require("../Tooltip/index.cjs");
|
|
@@ -33,7 +33,7 @@ const BaseExpandableCard = react.forwardRef(({
|
|
|
33
33
|
const draggableFirstRef = react.useRef(null);
|
|
34
34
|
const [isHovered, setIsHovered] = react.useState(false);
|
|
35
35
|
const [clicking, setClicking] = react.useState(false);
|
|
36
|
-
const theme =
|
|
36
|
+
const theme = themes.useTheme();
|
|
37
37
|
const handleMouseEnter = () => {
|
|
38
38
|
setIsHovered(true);
|
|
39
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { useTheme } from "@emotion/react";
|
|
4
3
|
import { DragIcon, ArrowDownIcon } from "@ultraviolet/icons";
|
|
4
|
+
import { useTheme } from "@ultraviolet/themes";
|
|
5
5
|
import { forwardRef, useRef, useState, useCallback } from "react";
|
|
6
6
|
import { Stack } from "../Stack/index.js";
|
|
7
7
|
import { Tooltip } from "../Tooltip/index.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const themes = require("@ultraviolet/themes");
|
|
6
6
|
const index = require("../Link/index.cjs");
|
|
7
7
|
const GlobalAlertLink = ({
|
|
8
8
|
children,
|
|
@@ -18,7 +18,7 @@ const GlobalAlertLink = ({
|
|
|
18
18
|
}) => {
|
|
19
19
|
const {
|
|
20
20
|
theme
|
|
21
|
-
} =
|
|
21
|
+
} = themes.useTheme();
|
|
22
22
|
return /* @__PURE__ */ jsxRuntime.jsx(index.Link, { "aria-label": ariaLabel, className, "data-testid": dataTestId, download, href, onClick, oneLine, prominence: theme === "light" ? "strong" : "stronger", rel, size: "small", target, variant: "inline", children });
|
|
23
23
|
};
|
|
24
24
|
exports.GlobalAlertLink = GlobalAlertLink;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react = require("@emotion/react");
|
|
6
5
|
const line = require("@nivo/line");
|
|
7
|
-
const
|
|
6
|
+
const themes = require("@ultraviolet/themes");
|
|
7
|
+
const react = require("react");
|
|
8
8
|
const legend = require("../../helpers/legend.cjs");
|
|
9
9
|
const nivoTheme = require("../../helpers/nivoTheme.cjs");
|
|
10
10
|
const CustomLegend = require("./CustomLegend.cjs");
|
|
@@ -41,7 +41,7 @@ const LineChart = ({
|
|
|
41
41
|
chartProps = DEFAULT_CHARTPROPS,
|
|
42
42
|
"data-testid": dataTestId
|
|
43
43
|
}) => {
|
|
44
|
-
const theme =
|
|
44
|
+
const theme = themes.useTheme();
|
|
45
45
|
const dataset = {
|
|
46
46
|
datasets: data?.map((d) => ({
|
|
47
47
|
data: d.data,
|
|
@@ -49,13 +49,13 @@ const LineChart = ({
|
|
|
49
49
|
label: d?.["label"]
|
|
50
50
|
}))
|
|
51
51
|
};
|
|
52
|
-
const [selected, setSelected] = react
|
|
52
|
+
const [selected, setSelected] = react.useState(dataset.datasets?.map(({
|
|
53
53
|
id
|
|
54
54
|
}, index) => `${id}${index}`));
|
|
55
55
|
const finalData = dataset.datasets?.filter(({
|
|
56
56
|
id
|
|
57
57
|
}, index) => selected ? selected.includes(`${id}${index}`) : false);
|
|
58
|
-
react
|
|
58
|
+
react.useEffect(() => {
|
|
59
59
|
if (selected !== void 0) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, Fragment, jsx } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { useTheme } from "@emotion/react";
|
|
4
3
|
import { ResponsiveLine } from "@nivo/line";
|
|
4
|
+
import { useTheme } from "@ultraviolet/themes";
|
|
5
5
|
import { useState, useEffect } from "react";
|
|
6
6
|
import { getLegendColor } from "../../helpers/legend.js";
|
|
7
7
|
import { getNivoTheme } from "../../helpers/nivoTheme.js";
|
|
@@ -35,7 +35,7 @@ export declare const List: import("react").ForwardRefExoticComponent<ListProps &
|
|
|
35
35
|
expandable?: ReactNode;
|
|
36
36
|
selectDisabled?: boolean | string;
|
|
37
37
|
disabled?: boolean;
|
|
38
|
-
sentiment?: "
|
|
38
|
+
sentiment?: "primary" | "secondary" | "neutral" | "success" | "danger" | "warning" | "info";
|
|
39
39
|
expanded?: boolean;
|
|
40
40
|
className?: string;
|
|
41
41
|
expandablePadding?: "0" | "1" | "0.5" | "0.25" | "1.5" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
|
|
@@ -3,4 +3,4 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
* Search inside a children (React Element) recursively until a result is found
|
|
4
4
|
*/
|
|
5
5
|
export declare const searchChildren: (children: ReactNode, searchString: string) => ReactNode[];
|
|
6
|
-
export declare const getListItem: (listItems: Element[]) => (
|
|
6
|
+
export declare const getListItem: (listItems: Element[]) => (HTMLButtonElement | HTMLAnchorElement)[];
|
|
@@ -69,7 +69,7 @@ export declare const Menu: import("react").ForwardRefExoticComponent<{
|
|
|
69
69
|
children: import("react").ReactNode;
|
|
70
70
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
71
71
|
borderless?: boolean;
|
|
72
|
-
sentiment?: "
|
|
72
|
+
sentiment?: "primary" | "neutral" | "danger";
|
|
73
73
|
active?: boolean;
|
|
74
74
|
'data-testid'?: string;
|
|
75
75
|
searchText?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const numberinputSideContainer: Record<"
|
|
1
|
+
export declare const numberinputSideContainer: Record<"large" | "medium" | "small", string>;
|
|
2
2
|
export declare const inputContainer: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
3
|
controls: {
|
|
4
4
|
false: {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react = require("@emotion/react");
|
|
6
5
|
const pie = require("@nivo/pie");
|
|
6
|
+
const themes = require("@ultraviolet/themes");
|
|
7
7
|
const dynamic = require("@vanilla-extract/dynamic");
|
|
8
|
-
const react
|
|
8
|
+
const react = require("react");
|
|
9
9
|
const legend = require("../../helpers/legend.cjs");
|
|
10
10
|
const nivoTheme = require("../../helpers/nivoTheme.cjs");
|
|
11
11
|
const index = require("../Text/index.cjs");
|
|
@@ -28,13 +28,13 @@ const PieChart = ({
|
|
|
28
28
|
margin = DEFAULT_MARGIN,
|
|
29
29
|
chartProps = DEFAULT_CHARTPROPS
|
|
30
30
|
}) => {
|
|
31
|
-
const theme =
|
|
32
|
-
const [currentFocusIndex, setCurrentFocusIndex] = react
|
|
33
|
-
const emptyTooltip = react
|
|
31
|
+
const theme = themes.useTheme();
|
|
32
|
+
const [currentFocusIndex, setCurrentFocusIndex] = react.useState();
|
|
33
|
+
const emptyTooltip = react.useCallback(() => /* @__PURE__ */ jsxRuntime.jsx("span", {}), []);
|
|
34
34
|
const isEmpty = !data || data.length === 0;
|
|
35
|
-
const EmptyLegendDisplayed = react
|
|
35
|
+
const EmptyLegendDisplayed = react.useCallback(() => emptyLegend ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.emptyLegendPie, children: /* @__PURE__ */ jsxRuntime.jsx(index.Text, { as: "p", variant: "body", children: emptyLegend }) }) : null, [emptyLegend]);
|
|
36
36
|
const localColors = legend.getLegendColor(theme);
|
|
37
|
-
const LegendDisplayer = react
|
|
37
|
+
const LegendDisplayer = react.useCallback(() => isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(EmptyLegendDisplayed, {}) : /* @__PURE__ */ jsxRuntime.jsx(Legends, { colors: localColors, data, focused: currentFocusIndex, onFocusChange: setCurrentFocusIndex }), [isEmpty, currentFocusIndex, data, EmptyLegendDisplayed, localColors]);
|
|
38
38
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles_css.containerPie, style: dynamic.assignInlineVars({
|
|
39
39
|
[styles_css.heightContainerPie]: height ? `${height}px` : ""
|
|
40
40
|
}), children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { useTheme } from "@emotion/react";
|
|
4
3
|
import { Pie } from "@nivo/pie";
|
|
4
|
+
import { useTheme } from "@ultraviolet/themes";
|
|
5
5
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
6
6
|
import { useState, useCallback } from "react";
|
|
7
7
|
import { getLegendColor } from "../../helpers/legend.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const progressContainer: string;
|
|
2
2
|
export declare const customText: string;
|
|
3
3
|
export declare const progressBar: string;
|
|
4
|
-
export declare const filledBarSentiments: Record<"
|
|
4
|
+
export declare const filledBarSentiments: Record<"primary" | "secondary" | "success" | "danger" | "warning" | "info", string>;
|