@ultraviolet/ui 3.0.0-beta.27 → 3.0.0-beta.29
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/README.md +47 -18
- package/dist/components/ActionBar/index.js +19 -7
- package/dist/components/Alert/index.d.ts +2 -1
- package/dist/components/Alert/index.js +98 -20
- package/dist/components/Alert/styles.css.d.ts +10 -1
- package/dist/components/Alert/styles.css.js +7 -5
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Avatar/index.js +46 -36
- package/dist/components/Avatar/styles.css.js +0 -1
- package/dist/components/Avatar/variables.css.js +1 -0
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.js +19 -8
- package/dist/components/Banner/index.d.ts +1 -1
- package/dist/components/Banner/index.js +87 -28
- package/dist/components/BarChart/Tooltip.d.ts +1 -1
- package/dist/components/BarChart/Tooltip.js +23 -10
- package/dist/components/BarChart/index.d.ts +1 -1
- package/dist/components/BarChart/index.js +51 -31
- package/dist/components/BarStack/index.d.ts +1 -1
- package/dist/components/BarStack/index.js +64 -19
- package/dist/components/Breadcrumbs/components/Item.d.ts +1 -1
- package/dist/components/Breadcrumbs/components/Item.js +48 -12
- package/dist/components/Breadcrumbs/index.js +11 -2
- package/dist/components/Bullet/index.d.ts +1 -1
- package/dist/components/Bullet/index.js +10 -7
- package/dist/components/Button/index.js +122 -72
- package/dist/components/Card/index.js +80 -20
- package/dist/components/Carousel/index.d.ts +3 -3
- package/dist/components/Carousel/index.js +72 -26
- package/dist/components/Checkbox/index.js +139 -43
- package/dist/components/CheckboxGroup/index.d.ts +3 -3
- package/dist/components/CheckboxGroup/index.js +77 -24
- package/dist/components/Chip/ChipIcon.d.ts +1 -1
- package/dist/components/Chip/ChipIcon.js +46 -12
- package/dist/components/Chip/index.d.ts +3 -3
- package/dist/components/Chip/index.js +36 -11
- package/dist/components/CopyButton/index.d.ts +1 -1
- package/dist/components/CopyButton/index.js +23 -8
- package/dist/components/DateInput/components/CalendarContent.d.ts +1 -1
- package/dist/components/DateInput/components/CalendarContent.js +61 -26
- package/dist/components/DateInput/components/CalendarDaily.d.ts +1 -1
- package/dist/components/DateInput/components/CalendarDaily.js +105 -62
- package/dist/components/DateInput/components/CalendarMonthly.d.ts +1 -1
- package/dist/components/DateInput/components/CalendarMonthly.js +62 -39
- package/dist/components/DateInput/components/Popup.d.ts +1 -1
- package/dist/components/DateInput/components/Popup.js +29 -6
- package/dist/components/DateInput/helpers.js +9 -2
- package/dist/components/DateInput/helpersLocale.js +3 -9
- package/dist/components/DateInput/index.d.ts +1 -1
- package/dist/components/DateInput/index.js +193 -62
- package/dist/components/Dialog/Context.js +3 -1
- package/dist/components/Dialog/components/Button.d.ts +1 -1
- package/dist/components/Dialog/components/Button.js +12 -2
- package/dist/components/Dialog/components/Buttons.d.ts +1 -1
- package/dist/components/Dialog/components/Buttons.js +1 -1
- package/dist/components/Dialog/components/CancelButton.d.ts +1 -1
- package/dist/components/Dialog/components/CancelButton.js +12 -2
- package/dist/components/Dialog/components/Stack.d.ts +1 -1
- package/dist/components/Dialog/components/Stack.js +2 -5
- package/dist/components/Dialog/components/Text.d.ts +1 -1
- package/dist/components/Dialog/components/Text.js +2 -5
- package/dist/components/Dialog/index.d.ts +7 -7
- package/dist/components/Dialog/index.js +43 -12
- package/dist/components/Drawer/index.d.ts +4 -4
- package/dist/components/Drawer/index.js +53 -15
- package/dist/components/EmptyState/index.d.ts +1 -1
- package/dist/components/EmptyState/index.js +63 -21
- package/dist/components/Expandable/index.d.ts +2 -2
- package/dist/components/Expandable/index.js +52 -15
- package/dist/components/ExpandableCard/components/Title.d.ts +1 -1
- package/dist/components/ExpandableCard/components/Title.js +12 -2
- package/dist/components/ExpandableCard/index.d.ts +1 -1
- package/dist/components/ExpandableCard/index.js +197 -96
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +1 -1
- package/dist/components/GlobalAlert/GlobalAlertLink.js +21 -5
- package/dist/components/GlobalAlert/index.d.ts +2 -2
- package/dist/components/GlobalAlert/index.js +51 -11
- package/dist/components/InfiniteScroll/index.d.ts +1 -1
- package/dist/components/InfiniteScroll/index.js +40 -33
- package/dist/components/Key/index.d.ts +1 -1
- package/dist/components/Key/index.js +29 -8
- package/dist/components/Label/index.d.ts +1 -1
- package/dist/components/Label/index.js +67 -6
- package/dist/components/LineChart/CustomLegend.d.ts +1 -1
- package/dist/components/LineChart/CustomLegend.js +69 -45
- package/dist/components/LineChart/Tooltip.d.ts +1 -1
- package/dist/components/LineChart/Tooltip.js +31 -9
- package/dist/components/LineChart/helpers.js +13 -12
- package/dist/components/LineChart/index.d.ts +1 -1
- package/dist/components/LineChart/index.js +56 -40
- package/dist/components/Link/index.js +74 -57
- package/dist/components/List/Cell.js +24 -22
- package/dist/components/List/ColumnProvider.d.ts +1 -1
- package/dist/components/List/ColumnProvider.js +12 -6
- package/dist/components/List/HeaderCell.d.ts +1 -1
- package/dist/components/List/HeaderCell.js +36 -19
- package/dist/components/List/HeaderRow.d.ts +1 -1
- package/dist/components/List/HeaderRow.js +14 -12
- package/dist/components/List/ListContext.d.ts +1 -1
- package/dist/components/List/ListContext.js +128 -78
- package/dist/components/List/Row.js +166 -90
- package/dist/components/List/SelectBar.d.ts +1 -1
- package/dist/components/List/SelectBar.js +20 -10
- package/dist/components/List/SkeletonRows.d.ts +1 -1
- package/dist/components/List/SkeletonRows.js +26 -16
- package/dist/components/List/index.d.ts +1 -1
- package/dist/components/List/index.js +60 -22
- package/dist/components/Loader/index.d.ts +1 -1
- package/dist/components/Loader/index.js +47 -23
- package/dist/components/Menu/MenuContent.d.ts +1 -1
- package/dist/components/Menu/MenuContent.js +216 -162
- package/dist/components/Menu/MenuProvider.d.ts +1 -1
- package/dist/components/Menu/MenuProvider.js +26 -13
- package/dist/components/Menu/components/Group.d.ts +1 -1
- package/dist/components/Menu/components/Group.js +11 -2
- package/dist/components/Menu/components/Item.js +144 -82
- package/dist/components/Menu/helpers.js +3 -1
- package/dist/components/Menu/index.d.ts +2 -2
- package/dist/components/Menu/index.js +5 -11
- package/dist/components/Menu/types.d.ts +2 -2
- package/dist/components/Meter/index.d.ts +1 -1
- package/dist/components/Meter/index.js +43 -12
- package/dist/components/Modal/ModalContent.d.ts +1 -1
- package/dist/components/Modal/ModalContent.js +41 -11
- package/dist/components/Modal/ModalProvider.d.ts +1 -1
- package/dist/components/Modal/ModalProvider.js +14 -11
- package/dist/components/Modal/components/Dialog.js +91 -47
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.js +60 -3
- package/dist/components/Notice/index.d.ts +1 -1
- package/dist/components/Notice/index.js +24 -5
- package/dist/components/Notification/Notification.js +12 -2
- package/dist/components/Notification/NotificationContainer.d.ts +1 -1
- package/dist/components/Notification/NotificationContainer.js +18 -2
- package/dist/components/NumberInput/index.d.ts +1 -1
- package/dist/components/NumberInput/index.js +239 -130
- package/dist/components/Pagination/PaginationButtons.d.ts +1 -1
- package/dist/components/Pagination/PaginationButtons.js +75 -10
- package/dist/components/Pagination/PerPage.d.ts +1 -1
- package/dist/components/Pagination/PerPage.js +32 -17
- package/dist/components/Pagination/getPageNumbers.js +12 -13
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/Pagination/index.js +26 -3
- package/dist/components/PasswordCheck/index.d.ts +1 -1
- package/dist/components/PasswordCheck/index.js +27 -5
- package/dist/components/PieChart/Legends.d.ts +1 -1
- package/dist/components/PieChart/Legends.js +52 -20
- package/dist/components/PieChart/Tooltip.d.ts +1 -1
- package/dist/components/PieChart/Tooltip.js +2 -4
- package/dist/components/PieChart/index.d.ts +1 -1
- package/dist/components/PieChart/index.js +80 -40
- package/dist/components/Popover/index.js +104 -46
- package/dist/components/Popup/helpers.d.ts +5 -1
- package/dist/components/Popup/helpers.js +49 -35
- package/dist/components/Popup/index.d.ts +2 -1
- package/dist/components/Popup/index.js +373 -255
- package/dist/components/Popup/styles.css.js +0 -1
- package/dist/components/Popup/variables.css.js +1 -0
- package/dist/components/ProgressBar/index.d.ts +1 -1
- package/dist/components/ProgressBar/index.js +74 -20
- package/dist/components/Radio/index.js +83 -51
- package/dist/components/RadioGroup/index.d.ts +2 -2
- package/dist/components/RadioGroup/index.js +74 -20
- package/dist/components/Row/index.d.ts +1 -1
- package/dist/components/Row/index.js +38 -27
- package/dist/components/Row/styles.css.d.ts +11 -0
- package/dist/components/Row/styles.css.js +2 -2
- package/dist/components/SearchInput/KeyGroup.d.ts +1 -1
- package/dist/components/SearchInput/KeyGroup.js +2 -6
- package/dist/components/SearchInput/index.js +232 -164
- package/dist/components/SelectInput/SelectInputProvider.d.ts +1 -1
- package/dist/components/SelectInput/SelectInputProvider.js +91 -55
- package/dist/components/SelectInput/components/Dropdown.d.ts +1 -1
- package/dist/components/SelectInput/components/Dropdown.js +442 -101
- package/dist/components/SelectInput/components/DropdownOption.d.ts +1 -1
- package/dist/components/SelectInput/components/DropdownOption.js +176 -27
- package/dist/components/SelectInput/components/SearchBarDropdown.d.ts +1 -1
- package/dist/components/SelectInput/components/SearchBarDropdown.js +40 -14
- package/dist/components/SelectInput/components/SelectBar.d.ts +1 -1
- package/dist/components/SelectInput/components/SelectBar.js +252 -97
- package/dist/components/SelectInput/index.d.ts +1 -1
- package/dist/components/SelectInput/index.js +102 -10
- package/dist/components/SelectableCard/index.js +200 -114
- package/dist/components/SelectableCardGroup/index.d.ts +2 -2
- package/dist/components/SelectableCardGroup/index.js +67 -25
- package/dist/components/SelectableCardOptionGroup/Provider.js +3 -1
- package/dist/components/SelectableCardOptionGroup/components/Image.d.ts +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Image.js +12 -8
- package/dist/components/SelectableCardOptionGroup/components/Option.d.ts +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.js +96 -19
- package/dist/components/SelectableCardOptionGroup/index.d.ts +2 -2
- package/dist/components/SelectableCardOptionGroup/index.js +53 -17
- package/dist/components/Separator/index.d.ts +1 -1
- package/dist/components/Separator/index.js +43 -26
- package/dist/components/Skeleton/Block.d.ts +1 -1
- package/dist/components/Skeleton/Block.js +2 -6
- package/dist/components/Skeleton/Blocks.d.ts +1 -1
- package/dist/components/Skeleton/Blocks.js +14 -9
- package/dist/components/Skeleton/BoxWithIcon.d.ts +1 -1
- package/dist/components/Skeleton/BoxWithIcon.js +14 -9
- package/dist/components/Skeleton/Donut.d.ts +1 -1
- package/dist/components/Skeleton/Donut.js +10 -2
- package/dist/components/Skeleton/IconSkeleton.d.ts +1 -1
- package/dist/components/Skeleton/IconSkeleton.js +1 -1
- package/dist/components/Skeleton/Line.d.ts +1 -1
- package/dist/components/Skeleton/Line.js +10 -4
- package/dist/components/Skeleton/List.d.ts +1 -1
- package/dist/components/Skeleton/List.js +3 -9
- package/dist/components/Skeleton/Slider.d.ts +1 -1
- package/dist/components/Skeleton/Slider.js +11 -8
- package/dist/components/Skeleton/Square.d.ts +1 -1
- package/dist/components/Skeleton/Square.js +1 -1
- package/dist/components/Skeleton/index.d.ts +9 -9
- package/dist/components/Skeleton/index.js +16 -5
- package/dist/components/Slider/components/DoubleSlider.d.ts +1 -1
- package/dist/components/Slider/components/DoubleSlider.js +191 -88
- package/dist/components/Slider/components/Options.d.ts +1 -1
- package/dist/components/Slider/components/Options.js +44 -28
- package/dist/components/Slider/components/SingleSlider.d.ts +1 -1
- package/dist/components/Slider/components/SingleSlider.js +133 -53
- package/dist/components/Slider/index.d.ts +1 -1
- package/dist/components/Slider/index.js +82 -12
- package/dist/components/Snippet/index.d.ts +1 -1
- package/dist/components/Snippet/index.js +103 -19
- package/dist/components/Stack/index.d.ts +1 -1
- package/dist/components/Stack/index.js +20 -24
- package/dist/components/Stack/styles.css.js +2 -2
- package/dist/components/Status/index.d.ts +1 -1
- package/dist/components/Status/index.js +13 -11
- package/dist/components/StepList/index.d.ts +2 -2
- package/dist/components/StepList/index.js +31 -10
- package/dist/components/Stepper/Step.d.ts +1 -1
- package/dist/components/Stepper/Step.js +65 -30
- package/dist/components/Stepper/StepperProvider.d.ts +1 -1
- package/dist/components/Stepper/StepperProvider.js +13 -10
- package/dist/components/Stepper/index.d.ts +2 -2
- package/dist/components/Stepper/index.js +46 -26
- package/dist/components/SwitchButton/FocusOverlay.d.ts +1 -1
- package/dist/components/SwitchButton/FocusOverlay.js +11 -5
- package/dist/components/SwitchButton/Option.d.ts +1 -1
- package/dist/components/SwitchButton/Option.js +20 -2
- package/dist/components/SwitchButton/index.d.ts +2 -2
- package/dist/components/SwitchButton/index.js +95 -48
- package/dist/components/Table/Body.d.ts +1 -1
- package/dist/components/Table/Body.js +2 -4
- package/dist/components/Table/Cell.d.ts +1 -1
- package/dist/components/Table/Cell.js +20 -17
- package/dist/components/Table/Header.d.ts +1 -1
- package/dist/components/Table/Header.js +2 -4
- package/dist/components/Table/HeaderCell.d.ts +1 -1
- package/dist/components/Table/HeaderCell.js +46 -22
- package/dist/components/Table/HeaderRow.d.ts +1 -1
- package/dist/components/Table/HeaderRow.js +21 -12
- package/dist/components/Table/Row.d.ts +1 -1
- package/dist/components/Table/Row.js +70 -14
- package/dist/components/Table/SelectBar.d.ts +1 -1
- package/dist/components/Table/SelectBar.js +20 -10
- package/dist/components/Table/SkeletonRows.d.ts +1 -1
- package/dist/components/Table/SkeletonRows.js +17 -16
- package/dist/components/Table/TableContext.d.ts +1 -1
- package/dist/components/Table/TableContext.js +22 -13
- package/dist/components/Table/index.d.ts +6 -6
- package/dist/components/Table/index.js +64 -23
- package/dist/components/Tabs/Tab.js +79 -41
- package/dist/components/Tabs/TabMenu.js +39 -23
- package/dist/components/Tabs/TabMenuItem.d.ts +1 -1
- package/dist/components/Tabs/TabMenuItem.js +20 -11
- package/dist/components/Tabs/TabsContext.js +3 -1
- package/dist/components/Tabs/index.d.ts +3 -3
- package/dist/components/Tabs/index.js +34 -14
- package/dist/components/Tag/index.d.ts +1 -1
- package/dist/components/Tag/index.js +45 -12
- package/dist/components/TagInput/index.d.ts +1 -1
- package/dist/components/TagInput/index.js +131 -52
- package/dist/components/TagInput/styles.css.d.ts +3 -0
- package/dist/components/TagList/index.d.ts +1 -1
- package/dist/components/TagList/index.js +132 -59
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Text/index.js +21 -17
- package/dist/components/TextArea/index.js +178 -103
- package/dist/components/TextInput/index.d.ts +1 -1
- package/dist/components/TextInput/index.js +286 -106
- package/dist/components/TimeInput/constants.js +1 -5
- package/dist/components/TimeInput/index.d.ts +1 -1
- package/dist/components/TimeInput/index.js +207 -118
- package/dist/components/Toaster/Toaster.js +1 -1
- package/dist/components/Toaster/ToasterContainer.d.ts +1 -1
- package/dist/components/Toaster/ToasterContainer.js +21 -2
- package/dist/components/Toaster/components/Button.d.ts +1 -1
- package/dist/components/Toaster/components/CloseButton.d.ts +1 -1
- package/dist/components/Toaster/components/CloseButton.js +12 -2
- package/dist/components/Toaster/components/Content.d.ts +1 -1
- package/dist/components/Toaster/components/Content.js +2 -4
- package/dist/components/Toaster/components/Link.d.ts +1 -1
- package/dist/components/Toaster/index.d.ts +2 -2
- package/dist/components/Toggle/index.js +101 -40
- package/dist/components/ToggleGroup/index.d.ts +3 -3
- package/dist/components/ToggleGroup/index.js +61 -22
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/Tooltip/index.js +42 -19
- package/dist/components/TreeMapChart/Tooltip.d.ts +1 -1
- package/dist/components/TreeMapChart/Tooltip.js +1 -1
- package/dist/components/TreeMapChart/index.d.ts +1 -1
- package/dist/components/TreeMapChart/index.js +33 -27
- package/dist/components/UnitInput/index.d.ts +1 -1
- package/dist/components/UnitInput/index.js +110 -29
- package/dist/components/VerificationCode/index.d.ts +1 -1
- package/dist/components/VerificationCode/index.js +80 -21
- package/dist/helpers/legend.js +4 -4
- package/dist/helpers/treeMap.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -4
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/ThemeProvider.js +4 -2
- package/dist/theme/index.js +1 -8
- package/dist/ui.css +1 -1
- package/dist/utils/ids.js +1 -3
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/responsive/index.d.ts +0 -1
- package/dist/utils/responsive/style.css.d.ts +3 -0
- package/package.json +5 -10
- package/dist/utils/responsive/Breakpoint.d.ts +0 -9
- package/dist/utils/responsive/Breakpoint.js +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, jsx } from "
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
4
4
|
import { Text } from "../Text/index.js";
|
|
5
5
|
import { barTooltipContainer, barColorSquare, colorBar } from "./styles.css.js";
|
|
@@ -9,15 +9,28 @@ const BarChartTooltip = ({
|
|
|
9
9
|
color,
|
|
10
10
|
className,
|
|
11
11
|
"data-testid": dataTestId
|
|
12
|
-
}) => /* @__PURE__ */ jsxs(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
}) => /* @__PURE__ */ jsxs(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: `${className ? `${className} ` : ""}${barTooltipContainer}`,
|
|
16
|
+
"data-testid": dataTestId,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
19
|
+
"span",
|
|
20
|
+
{
|
|
21
|
+
className: barColorSquare,
|
|
22
|
+
style: assignInlineVars({
|
|
23
|
+
[colorBar]: color
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
) }),
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
28
|
+
/* @__PURE__ */ jsx(Text, { as: "p", sentiment: "primary", variant: "bodyStronger", children: formattedValue }),
|
|
29
|
+
/* @__PURE__ */ jsx(Text, { as: "p", variant: "bodySmall", children: indexValue })
|
|
30
|
+
] })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
);
|
|
21
34
|
export {
|
|
22
35
|
BarChartTooltip
|
|
23
36
|
};
|
|
@@ -24,5 +24,5 @@ type BarChartProps = {
|
|
|
24
24
|
* See https://nivo.rocks/bar/ for more information.
|
|
25
25
|
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
26
26
|
*/
|
|
27
|
-
export declare const BarChart: ({ height, margin, data, axisFormatters, tickValues, keys, tooltipFunction, chartProps, className, "data-testid": dataTestId, style, }: BarChartProps) => import("
|
|
27
|
+
export declare const BarChart: ({ height, margin, data, axisFormatters, tickValues, keys, tooltipFunction, chartProps, className, "data-testid": dataTestId, style, }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export {};
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ResponsiveBar } from "@nivo/bar";
|
|
4
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";
|
|
8
8
|
import { BarChartTooltip } from "./Tooltip.js";
|
|
9
|
-
const DEFAULT_MARGIN = {
|
|
10
|
-
bottom: 50,
|
|
11
|
-
left: 60,
|
|
12
|
-
right: 25,
|
|
13
|
-
top: 50
|
|
14
|
-
};
|
|
9
|
+
const DEFAULT_MARGIN = { bottom: 50, left: 60, right: 25, top: 50 };
|
|
15
10
|
const DEFAULT_DATA = [];
|
|
16
11
|
const DEFAULT_AXISFORMATTER = {};
|
|
17
12
|
const DEFAULT_KEYS = ["value"];
|
|
@@ -30,30 +25,55 @@ const BarChart = ({
|
|
|
30
25
|
style
|
|
31
26
|
}) => {
|
|
32
27
|
const theme = useTheme();
|
|
33
|
-
const tooltip = useCallback(
|
|
34
|
-
|
|
35
|
-
indexValue,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
28
|
+
const tooltip = useCallback(
|
|
29
|
+
(props) => {
|
|
30
|
+
const { indexValue, formattedValue, color } = tooltipFunction ? tooltipFunction(props) : props;
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
BarChartTooltip,
|
|
33
|
+
{
|
|
34
|
+
color,
|
|
35
|
+
formattedValue,
|
|
36
|
+
indexValue: indexValue.toString()
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
},
|
|
40
|
+
[tooltipFunction]
|
|
41
|
+
);
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className,
|
|
46
|
+
"data-testid": dataTestId,
|
|
47
|
+
style: { height, ...style },
|
|
48
|
+
children: /* @__PURE__ */ jsx(
|
|
49
|
+
ResponsiveBar,
|
|
50
|
+
{
|
|
51
|
+
axisBottom: {
|
|
52
|
+
format: axisFormatters?.bottom,
|
|
53
|
+
tickPadding: 5,
|
|
54
|
+
tickRotation: 0,
|
|
55
|
+
tickSize: 5,
|
|
56
|
+
tickValues: tickValues?.bottom
|
|
57
|
+
},
|
|
58
|
+
axisLeft: {
|
|
59
|
+
format: axisFormatters?.left,
|
|
60
|
+
tickPadding: 5,
|
|
61
|
+
tickRotation: 0,
|
|
62
|
+
tickSize: 5,
|
|
63
|
+
tickValues: tickValues?.left
|
|
64
|
+
},
|
|
65
|
+
colors: getLegendColor(theme),
|
|
66
|
+
data,
|
|
67
|
+
enableLabel: false,
|
|
68
|
+
keys,
|
|
69
|
+
margin,
|
|
70
|
+
theme: getNivoTheme(theme),
|
|
71
|
+
tooltip,
|
|
72
|
+
...chartProps
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
);
|
|
57
77
|
};
|
|
58
78
|
export {
|
|
59
79
|
BarChart
|
|
@@ -34,5 +34,5 @@ type BarStackProps = {
|
|
|
34
34
|
/**
|
|
35
35
|
* BarStack is a graphic component that is used to show data in one dimension.
|
|
36
36
|
*/
|
|
37
|
-
export declare const BarStack: ({ data, total, className, "data-testid": dataTestId, style, }: BarStackProps) => import("
|
|
37
|
+
export declare const BarStack: ({ data, total, className, "data-testid": dataTestId, style, }: BarStackProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { Tooltip } from "../Tooltip/index.js";
|
|
@@ -11,24 +11,69 @@ const BarStack = ({
|
|
|
11
11
|
"data-testid": dataTestId,
|
|
12
12
|
style
|
|
13
13
|
}) => {
|
|
14
|
-
const computedTotal = useMemo(
|
|
15
|
-
value
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
const computedTotal = useMemo(
|
|
15
|
+
() => total ?? data.reduce((acc, { value }) => acc + value, 0),
|
|
16
|
+
[total, data]
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: `${className ? `${className} ` : ""}${containerBarStack}`,
|
|
22
|
+
"data-testid": dataTestId,
|
|
23
|
+
style,
|
|
24
|
+
children: data.map(
|
|
25
|
+
({
|
|
26
|
+
id,
|
|
27
|
+
value,
|
|
28
|
+
text,
|
|
29
|
+
onClick,
|
|
30
|
+
onDoubleClick,
|
|
31
|
+
onKeyDown,
|
|
32
|
+
onMouseEnter,
|
|
33
|
+
onMouseLeave,
|
|
34
|
+
onMouseDown,
|
|
35
|
+
onMouseUp,
|
|
36
|
+
tooltip
|
|
37
|
+
}) => /* @__PURE__ */ jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: wrapperBarStack,
|
|
41
|
+
style: assignInlineVars({
|
|
42
|
+
[wrapperWidth]: `${value / computedTotal * 100}%`
|
|
43
|
+
}),
|
|
44
|
+
children: tooltip ? /* @__PURE__ */ jsx(Tooltip, { id: `tooltip-${id}`, text: tooltip, children: /* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: barStack,
|
|
48
|
+
onClick,
|
|
49
|
+
onDoubleClick,
|
|
50
|
+
onKeyDown,
|
|
51
|
+
onMouseDown,
|
|
52
|
+
onMouseEnter,
|
|
53
|
+
onMouseLeave,
|
|
54
|
+
onMouseUp,
|
|
55
|
+
children: text
|
|
56
|
+
}
|
|
57
|
+
) }) : /* @__PURE__ */ jsx(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: barStack,
|
|
61
|
+
onClick,
|
|
62
|
+
onDoubleClick,
|
|
63
|
+
onKeyDown,
|
|
64
|
+
onMouseDown,
|
|
65
|
+
onMouseEnter,
|
|
66
|
+
onMouseLeave,
|
|
67
|
+
onMouseUp,
|
|
68
|
+
children: text
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
id
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
);
|
|
32
77
|
};
|
|
33
78
|
export {
|
|
34
79
|
BarStack
|
|
@@ -13,5 +13,5 @@ type ItemProps = {
|
|
|
13
13
|
maxWidth?: string;
|
|
14
14
|
minWidth?: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const Item: ({ to, children, disabled, "aria-current": ariaCurrent, onClick, onKeyDown, className, maxWidth, minWidth, }: ItemProps) => import("
|
|
16
|
+
export declare const Item: ({ to, children, disabled, "aria-current": ariaCurrent, onClick, onKeyDown, className, maxWidth, minWidth, }: ItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { Button } from "../../Button/index.js";
|
|
@@ -19,22 +19,58 @@ const Item = ({
|
|
|
19
19
|
}) => {
|
|
20
20
|
const renderedChildren = useMemo(() => {
|
|
21
21
|
if (to) {
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Link,
|
|
24
|
+
{
|
|
25
|
+
className: linkBreadcrumbs,
|
|
26
|
+
href: to,
|
|
27
|
+
prominence: "stronger",
|
|
28
|
+
size: "small",
|
|
29
|
+
children
|
|
30
|
+
}
|
|
31
|
+
);
|
|
23
32
|
}
|
|
24
33
|
if (onClick) {
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
Button,
|
|
36
|
+
{
|
|
37
|
+
className: contentBreadcrumbs,
|
|
38
|
+
disabled,
|
|
39
|
+
sentiment: "neutral",
|
|
40
|
+
size: "small",
|
|
41
|
+
style: assignInlineVars({
|
|
42
|
+
[minWidthVar]: minWidth?.toString(),
|
|
43
|
+
[maxWidthVar]: maxWidth?.toString()
|
|
44
|
+
}),
|
|
45
|
+
variant: "ghost",
|
|
46
|
+
children
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */ jsx(
|
|
51
|
+
Text,
|
|
52
|
+
{
|
|
53
|
+
as: "div",
|
|
54
|
+
className: `${contentBreadcrumbs} ${contentBreadcrumbsText}`,
|
|
55
|
+
variant: "bodySmallStrong",
|
|
56
|
+
children
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}, [children, disabled, maxWidth, minWidth, onClick, to]);
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
"li",
|
|
62
|
+
{
|
|
63
|
+
"aria-current": ariaCurrent,
|
|
64
|
+
className: `${className ? `${className} ` : ""}${itemContainerBreadcrumbs({ clickable: !!onClick })} ${breadcrumbsItem}`,
|
|
65
|
+
onClick,
|
|
66
|
+
onKeyDown,
|
|
67
|
+
style: assignInlineVars({
|
|
26
68
|
[minWidthVar]: minWidth?.toString(),
|
|
27
69
|
[maxWidthVar]: maxWidth?.toString()
|
|
28
|
-
}),
|
|
70
|
+
}),
|
|
71
|
+
children: renderedChildren
|
|
29
72
|
}
|
|
30
|
-
|
|
31
|
-
}, [children, disabled, maxWidth, minWidth, onClick, to]);
|
|
32
|
-
return /* @__PURE__ */ jsx("li", { "aria-current": ariaCurrent, className: `${className ? `${className} ` : ""}${itemContainerBreadcrumbs({
|
|
33
|
-
clickable: !!onClick
|
|
34
|
-
})} ${breadcrumbsItem}`, onClick, onKeyDown, style: assignInlineVars({
|
|
35
|
-
[minWidthVar]: minWidth?.toString(),
|
|
36
|
-
[maxWidthVar]: maxWidth?.toString()
|
|
37
|
-
}), children: renderedChildren });
|
|
73
|
+
);
|
|
38
74
|
};
|
|
39
75
|
export {
|
|
40
76
|
Item
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Item } from "./components/Item.js";
|
|
4
4
|
import { breadcrumbs } from "./styles.css.js";
|
|
5
5
|
const Breadcrumbs = ({
|
|
@@ -7,7 +7,16 @@ const Breadcrumbs = ({
|
|
|
7
7
|
className,
|
|
8
8
|
"data-testid": dataTestId,
|
|
9
9
|
style
|
|
10
|
-
}) => /* @__PURE__ */ jsx(
|
|
10
|
+
}) => /* @__PURE__ */ jsx(
|
|
11
|
+
"nav",
|
|
12
|
+
{
|
|
13
|
+
"aria-label": "breadcrumb",
|
|
14
|
+
className,
|
|
15
|
+
"data-testid": dataTestId,
|
|
16
|
+
style,
|
|
17
|
+
children: /* @__PURE__ */ jsx("ol", { className: breadcrumbs, children })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
11
20
|
Breadcrumbs.Item = Item;
|
|
12
21
|
export {
|
|
13
22
|
Breadcrumbs
|
|
@@ -17,5 +17,5 @@ type BulletProps = {
|
|
|
17
17
|
/**
|
|
18
18
|
* Bullet component is used to display a small icon or text with a colored background in a circle.
|
|
19
19
|
*/
|
|
20
|
-
export declare const Bullet: ({ className, sentiment, size, tooltip, tooltipBaseId, "data-testid": dataTestId, prominence, children, disabled, style, }: BulletProps) => import("
|
|
20
|
+
export declare const Bullet: ({ className, sentiment, size, tooltip, tooltipBaseId, "data-testid": dataTestId, prominence, children, disabled, style, }: BulletProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Tooltip } from "../Tooltip/index.js";
|
|
4
4
|
import { bullet } from "./styles.css.js";
|
|
5
5
|
const Bullet = ({
|
|
@@ -13,12 +13,15 @@ const Bullet = ({
|
|
|
13
13
|
children,
|
|
14
14
|
disabled,
|
|
15
15
|
style
|
|
16
|
-
}) => /* @__PURE__ */ jsx(Tooltip, { id: tooltipBaseId, text: tooltip, children: /* @__PURE__ */ jsx(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
}) => /* @__PURE__ */ jsx(Tooltip, { id: tooltipBaseId, text: tooltip, children: /* @__PURE__ */ jsx(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: `${className ? `${className} ` : ""}${bullet({ disabled, prominence, sentiment, size })}`,
|
|
20
|
+
"data-testid": dataTestId,
|
|
21
|
+
style,
|
|
22
|
+
children
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
22
25
|
export {
|
|
23
26
|
Bullet
|
|
24
27
|
};
|
|
@@ -1,84 +1,134 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs, Fragment } from "
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useTheme } from "@ultraviolet/themes";
|
|
4
4
|
import { forwardRef, useMemo } from "react";
|
|
5
5
|
import { Loader } from "../Loader/index.js";
|
|
6
6
|
import { Tooltip } from "../Tooltip/index.js";
|
|
7
7
|
import { button } from "./styles.css.js";
|
|
8
|
-
const Button = forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
theme
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
8
|
+
const Button = forwardRef(
|
|
9
|
+
({
|
|
10
|
+
type = "button",
|
|
11
|
+
className,
|
|
12
|
+
"data-testid": dataTestId,
|
|
13
|
+
sentiment = "primary",
|
|
14
|
+
variant = "filled",
|
|
15
|
+
size = "large",
|
|
16
|
+
disabled = false,
|
|
17
|
+
fullWidth = false,
|
|
18
|
+
isLoading = false,
|
|
19
|
+
children,
|
|
20
|
+
onClick,
|
|
21
|
+
onMouseDown,
|
|
22
|
+
onMouseUp,
|
|
23
|
+
onMouseOut,
|
|
24
|
+
onBlur,
|
|
25
|
+
onMouseEnter,
|
|
26
|
+
onMouseLeave,
|
|
27
|
+
onPointerDown,
|
|
28
|
+
onKeyDown,
|
|
29
|
+
name,
|
|
30
|
+
"aria-label": ariaLabel,
|
|
31
|
+
"aria-current": ariaCurrent,
|
|
32
|
+
"aria-controls": ariaControls,
|
|
33
|
+
"aria-expanded": ariaExpanded,
|
|
34
|
+
"aria-haspopup": ariaHaspopup,
|
|
35
|
+
"aria-describedby": ariaDescribedby,
|
|
36
|
+
"aria-disabled": ariaDisabled,
|
|
37
|
+
"aria-pressed": ariaPressed,
|
|
38
|
+
"aria-roledescription": ariaRoledescription,
|
|
39
|
+
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
40
|
+
href,
|
|
41
|
+
download,
|
|
42
|
+
target,
|
|
43
|
+
role,
|
|
44
|
+
tooltip,
|
|
45
|
+
tabIndex,
|
|
46
|
+
autoFocus,
|
|
47
|
+
style
|
|
48
|
+
}, ref) => {
|
|
49
|
+
const computeIsDisabled = disabled || isLoading;
|
|
50
|
+
const { theme } = useTheme();
|
|
51
|
+
const computedSentimentLoader = useMemo(() => {
|
|
52
|
+
if (variant === "filled" && !["black", "white"].includes(sentiment)) {
|
|
53
|
+
if (theme === "light") {
|
|
54
|
+
return "white";
|
|
55
|
+
}
|
|
56
|
+
return "black";
|
|
56
57
|
}
|
|
57
|
-
return
|
|
58
|
+
return sentiment;
|
|
59
|
+
}, [sentiment, theme, variant]);
|
|
60
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
isLoading ? /* @__PURE__ */ jsx(Loader, { active: true, sentiment: computedSentimentLoader, size: "small" }) : null,
|
|
62
|
+
children
|
|
63
|
+
] });
|
|
64
|
+
if (href && !computeIsDisabled) {
|
|
65
|
+
return /* @__PURE__ */ jsx(Tooltip, { containerFullWidth: fullWidth, text: tooltip, children: /* @__PURE__ */ jsx(
|
|
66
|
+
"a",
|
|
67
|
+
{
|
|
68
|
+
"aria-controls": ariaControls,
|
|
69
|
+
"aria-current": ariaCurrent,
|
|
70
|
+
"aria-describedby": ariaDescribedby,
|
|
71
|
+
"aria-disabled": ariaDisabled ?? disabled,
|
|
72
|
+
"aria-expanded": ariaExpanded,
|
|
73
|
+
"aria-haspopup": ariaHaspopup,
|
|
74
|
+
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
75
|
+
"aria-label": ariaLabel,
|
|
76
|
+
"aria-pressed": ariaPressed,
|
|
77
|
+
"aria-roledescription": ariaRoledescription,
|
|
78
|
+
autoFocus,
|
|
79
|
+
className: `${className ? `${className} ` : ""}${button({ disabled, fullWidth, sentiment, size, variant })}`,
|
|
80
|
+
"data-testid": dataTestId,
|
|
81
|
+
download,
|
|
82
|
+
href,
|
|
83
|
+
onBlur,
|
|
84
|
+
onClick,
|
|
85
|
+
onMouseDown,
|
|
86
|
+
onMouseEnter,
|
|
87
|
+
onMouseLeave,
|
|
88
|
+
onMouseOut,
|
|
89
|
+
onMouseUp,
|
|
90
|
+
ref,
|
|
91
|
+
role,
|
|
92
|
+
style,
|
|
93
|
+
tabIndex,
|
|
94
|
+
target,
|
|
95
|
+
type,
|
|
96
|
+
children: content
|
|
97
|
+
}
|
|
98
|
+
) });
|
|
58
99
|
}
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
100
|
+
return /* @__PURE__ */ jsx(Tooltip, { containerFullWidth: fullWidth, text: tooltip, children: /* @__PURE__ */ jsx(
|
|
101
|
+
"button",
|
|
102
|
+
{
|
|
103
|
+
"aria-controls": ariaControls,
|
|
104
|
+
"aria-current": ariaCurrent,
|
|
105
|
+
"aria-expanded": ariaExpanded,
|
|
106
|
+
"aria-haspopup": ariaHaspopup,
|
|
107
|
+
"aria-label": ariaLabel,
|
|
108
|
+
autoFocus,
|
|
109
|
+
className: `${className ? `${className} ` : ""}${button({ disabled, fullWidth, sentiment, size, variant })}`,
|
|
110
|
+
"data-testid": dataTestId,
|
|
111
|
+
disabled: computeIsDisabled,
|
|
112
|
+
name,
|
|
113
|
+
onBlur,
|
|
114
|
+
onClick,
|
|
115
|
+
onKeyDown,
|
|
116
|
+
onMouseDown,
|
|
117
|
+
onMouseEnter,
|
|
118
|
+
onMouseLeave,
|
|
119
|
+
onMouseOut,
|
|
120
|
+
onMouseUp,
|
|
121
|
+
onPointerDown,
|
|
122
|
+
ref,
|
|
123
|
+
role,
|
|
124
|
+
style,
|
|
125
|
+
tabIndex,
|
|
126
|
+
type,
|
|
127
|
+
children: content
|
|
128
|
+
}
|
|
129
|
+
) });
|
|
73
130
|
}
|
|
74
|
-
|
|
75
|
-
disabled,
|
|
76
|
-
fullWidth,
|
|
77
|
-
sentiment,
|
|
78
|
-
size,
|
|
79
|
-
variant
|
|
80
|
-
})}`, "data-testid": dataTestId, disabled: computeIsDisabled, name, onBlur, onClick, onKeyDown, onMouseDown, onMouseEnter, onMouseLeave, onMouseOut, onMouseUp, onPointerDown, ref, role, style, tabIndex, type, children: content }) });
|
|
81
|
-
});
|
|
131
|
+
);
|
|
82
132
|
export {
|
|
83
133
|
Button
|
|
84
134
|
};
|