@ultraviolet/ui 3.0.0-beta.24 → 3.0.0-beta.25
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/ActionBar/index.cjs +7 -3
- package/dist/components/ActionBar/index.d.ts +3 -2
- package/dist/components/ActionBar/index.js +7 -3
- package/dist/components/Alert/index.cjs +3 -2
- package/dist/components/Alert/index.d.ts +3 -2
- package/dist/components/Alert/index.js +3 -2
- package/dist/components/Alert/styles.css.cjs +0 -1
- package/dist/components/Alert/styles.css.js +0 -1
- package/dist/components/Avatar/index.cjs +4 -2
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Avatar/index.js +4 -2
- package/dist/components/Avatar/styles.css.cjs +1 -0
- package/dist/components/Avatar/styles.css.js +1 -0
- package/dist/components/Avatar/types.d.ts +2 -1
- package/dist/components/Badge/index.cjs +3 -2
- package/dist/components/Badge/index.d.ts +3 -2
- package/dist/components/Badge/index.js +3 -2
- package/dist/components/Banner/index.cjs +3 -2
- package/dist/components/Banner/index.d.ts +3 -2
- package/dist/components/Banner/index.js +3 -2
- package/dist/components/BarChart/index.cjs +4 -2
- package/dist/components/BarChart/index.d.ts +3 -2
- package/dist/components/BarChart/index.js +4 -2
- package/dist/components/BarStack/index.cjs +3 -2
- package/dist/components/BarStack/index.d.ts +3 -2
- package/dist/components/BarStack/index.js +3 -2
- package/dist/components/Breadcrumbs/index.cjs +3 -2
- package/dist/components/Breadcrumbs/index.d.ts +2 -1
- package/dist/components/Breadcrumbs/index.js +3 -2
- package/dist/components/Bullet/index.cjs +3 -2
- package/dist/components/Bullet/index.d.ts +3 -2
- package/dist/components/Bullet/index.js +3 -2
- package/dist/components/Button/index.cjs +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Card/index.cjs +4 -3
- package/dist/components/Card/index.d.ts +2 -1
- package/dist/components/Card/index.js +4 -3
- package/dist/components/Carousel/index.cjs +8 -4
- package/dist/components/Carousel/index.d.ts +4 -3
- package/dist/components/Carousel/index.js +8 -4
- package/dist/components/Checkbox/index.cjs +3 -2
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.js +3 -2
- package/dist/components/CheckboxGroup/index.cjs +6 -4
- package/dist/components/CheckboxGroup/index.d.ts +4 -4
- package/dist/components/CheckboxGroup/index.js +6 -4
- package/dist/components/Chip/index.cjs +3 -2
- package/dist/components/Chip/index.d.ts +3 -2
- package/dist/components/Chip/index.js +3 -2
- package/dist/components/CopyButton/index.cjs +3 -2
- package/dist/components/CopyButton/index.d.ts +3 -1
- package/dist/components/CopyButton/index.js +3 -2
- package/dist/components/DateInput/index.cjs +3 -2
- package/dist/components/DateInput/index.d.ts +3 -2
- package/dist/components/DateInput/index.js +3 -2
- package/dist/components/Dialog/components/Button.cjs +3 -2
- package/dist/components/Dialog/components/Button.d.ts +2 -2
- package/dist/components/Dialog/components/Button.js +3 -2
- package/dist/components/Dialog/components/CancelButton.cjs +3 -2
- package/dist/components/Dialog/components/CancelButton.d.ts +3 -2
- package/dist/components/Dialog/components/CancelButton.js +3 -2
- package/dist/components/Dialog/components/Stack.cjs +3 -2
- package/dist/components/Dialog/components/Stack.d.ts +3 -2
- package/dist/components/Dialog/components/Stack.js +3 -2
- package/dist/components/Dialog/components/Text.cjs +3 -2
- package/dist/components/Dialog/components/Text.d.ts +3 -1
- package/dist/components/Dialog/components/Text.js +3 -2
- package/dist/components/Dialog/index.cjs +3 -2
- package/dist/components/Dialog/index.d.ts +11 -8
- package/dist/components/Dialog/index.js +3 -2
- package/dist/components/Drawer/index.cjs +3 -2
- package/dist/components/Drawer/index.d.ts +3 -3
- package/dist/components/Drawer/index.js +3 -2
- package/dist/components/EmptyState/index.cjs +4 -3
- package/dist/components/EmptyState/index.d.ts +3 -2
- package/dist/components/EmptyState/index.js +4 -3
- package/dist/components/Expandable/index.cjs +15 -8
- package/dist/components/Expandable/index.d.ts +4 -3
- package/dist/components/Expandable/index.js +15 -8
- package/dist/components/ExpandableCard/components/Title.cjs +3 -2
- package/dist/components/ExpandableCard/components/Title.d.ts +2 -2
- package/dist/components/ExpandableCard/components/Title.js +3 -2
- package/dist/components/ExpandableCard/index.cjs +3 -2
- package/dist/components/ExpandableCard/index.d.ts +3 -2
- package/dist/components/ExpandableCard/index.js +3 -2
- package/dist/components/GlobalAlert/GlobalAlertLink.cjs +3 -2
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +1 -1
- package/dist/components/GlobalAlert/GlobalAlertLink.js +3 -2
- package/dist/components/GlobalAlert/index.cjs +3 -2
- package/dist/components/GlobalAlert/index.d.ts +4 -3
- package/dist/components/GlobalAlert/index.js +3 -2
- package/dist/components/InfiniteScroll/index.cjs +4 -2
- package/dist/components/InfiniteScroll/index.d.ts +3 -2
- package/dist/components/InfiniteScroll/index.js +4 -2
- package/dist/components/Key/index.cjs +3 -2
- package/dist/components/Key/index.d.ts +3 -1
- package/dist/components/Key/index.js +3 -2
- package/dist/components/Label/index.cjs +8 -6
- package/dist/components/Label/index.d.ts +3 -2
- package/dist/components/Label/index.js +8 -6
- package/dist/components/LineChart/index.cjs +3 -1
- package/dist/components/LineChart/index.d.ts +3 -2
- package/dist/components/LineChart/index.js +3 -1
- package/dist/components/Link/index.cjs +3 -2
- package/dist/components/Link/index.d.ts +2 -1
- package/dist/components/Link/index.js +3 -2
- package/dist/components/List/Cell.cjs +2 -2
- package/dist/components/List/Cell.js +2 -2
- package/dist/components/List/index.cjs +3 -2
- package/dist/components/List/index.d.ts +4 -3
- package/dist/components/List/index.js +3 -2
- package/dist/components/Loader/index.cjs +5 -3
- package/dist/components/Loader/index.d.ts +3 -1
- package/dist/components/Loader/index.js +5 -3
- package/dist/components/Menu/MenuContent.cjs +3 -2
- package/dist/components/Menu/MenuContent.d.ts +1 -1
- package/dist/components/Menu/MenuContent.js +3 -2
- package/dist/components/Menu/components/Group.cjs +3 -2
- package/dist/components/Menu/components/Group.d.ts +3 -2
- package/dist/components/Menu/components/Group.js +3 -2
- package/dist/components/Menu/components/Item.cjs +4 -3
- package/dist/components/Menu/components/Item.d.ts +2 -1
- package/dist/components/Menu/components/Item.js +4 -3
- package/dist/components/Menu/index.d.ts +4 -2
- package/dist/components/Menu/types.d.ts +1 -1
- package/dist/components/Meter/index.cjs +2 -1
- package/dist/components/Meter/index.d.ts +3 -1
- package/dist/components/Meter/index.js +2 -1
- package/dist/components/Modal/ModalContent.cjs +3 -2
- package/dist/components/Modal/ModalContent.d.ts +3 -2
- package/dist/components/Modal/ModalContent.js +3 -2
- package/dist/components/Modal/components/Dialog.cjs +9 -5
- package/dist/components/Modal/components/Dialog.d.ts +1 -1
- package/dist/components/Modal/components/Dialog.js +9 -5
- package/dist/components/Modal/index.cjs +3 -2
- package/dist/components/Modal/index.d.ts +3 -2
- package/dist/components/Modal/index.js +3 -2
- package/dist/components/Modal/types.d.ts +2 -1
- package/dist/components/Notice/index.cjs +3 -2
- package/dist/components/Notice/index.d.ts +3 -2
- package/dist/components/Notice/index.js +3 -2
- package/dist/components/Notification/index.cjs +2 -1
- package/dist/components/Notification/index.d.ts +3 -2
- package/dist/components/Notification/index.js +2 -1
- package/dist/components/NumberInput/index.cjs +3 -2
- package/dist/components/NumberInput/index.d.ts +1 -1
- package/dist/components/NumberInput/index.js +3 -2
- package/dist/components/Pagination/index.cjs +3 -2
- package/dist/components/Pagination/index.d.ts +3 -1
- package/dist/components/Pagination/index.js +3 -2
- package/dist/components/PasswordCheck/index.cjs +3 -2
- package/dist/components/PasswordCheck/index.d.ts +3 -1
- package/dist/components/PasswordCheck/index.js +3 -2
- package/dist/components/PieChart/index.cjs +8 -4
- package/dist/components/PieChart/index.d.ts +3 -2
- package/dist/components/PieChart/index.js +8 -4
- package/dist/components/Popover/index.cjs +3 -2
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.js +3 -2
- package/dist/components/ProgressBar/index.cjs +3 -2
- package/dist/components/ProgressBar/index.d.ts +3 -2
- package/dist/components/ProgressBar/index.js +3 -2
- package/dist/components/Radio/index.cjs +3 -1
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +3 -1
- package/dist/components/RadioGroup/index.cjs +3 -2
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.js +3 -2
- package/dist/components/SearchInput/index.cjs +3 -2
- package/dist/components/SearchInput/index.js +3 -2
- package/dist/components/SelectInput/components/selectBar.css.cjs +0 -2
- package/dist/components/SelectInput/components/selectBar.css.js +0 -2
- package/dist/components/SelectableCard/index.cjs +10 -6
- package/dist/components/SelectableCard/index.d.ts +2 -1
- package/dist/components/SelectableCard/index.js +10 -6
- package/dist/components/SelectableCardGroup/index.cjs +2 -1
- package/dist/components/SelectableCardGroup/index.d.ts +1 -1
- package/dist/components/SelectableCardGroup/index.js +2 -1
- package/dist/components/SelectableCardOptionGroup/components/Image.cjs +2 -20
- package/dist/components/SelectableCardOptionGroup/components/Image.js +2 -18
- package/dist/components/SelectableCardOptionGroup/components/Option.cjs +13 -74
- package/dist/components/SelectableCardOptionGroup/components/Option.d.ts +1 -1
- package/dist/components/SelectableCardOptionGroup/components/Option.js +8 -67
- package/dist/components/SelectableCardOptionGroup/index.cjs +3 -2
- package/dist/components/SelectableCardOptionGroup/index.d.ts +3 -3
- package/dist/components/SelectableCardOptionGroup/index.js +3 -2
- package/dist/components/SelectableCardOptionGroup/styles.css.cjs +16 -0
- package/dist/components/SelectableCardOptionGroup/styles.css.d.ts +7 -0
- package/dist/components/SelectableCardOptionGroup/styles.css.js +16 -0
- package/dist/components/Separator/index.cjs +3 -2
- package/dist/components/Separator/index.d.ts +3 -2
- package/dist/components/Separator/index.js +3 -2
- package/dist/components/Slider/index.cjs +2 -1
- package/dist/components/Slider/index.d.ts +1 -1
- package/dist/components/Slider/index.js +2 -1
- package/dist/components/Slider/types.d.ts +1 -1
- package/dist/components/Snippet/index.cjs +3 -2
- package/dist/components/Snippet/index.d.ts +3 -2
- package/dist/components/Snippet/index.js +3 -2
- package/dist/components/Stack/index.cjs +10 -6
- package/dist/components/Stack/index.d.ts +1 -1
- package/dist/components/Stack/index.js +10 -6
- package/dist/components/Status/index.cjs +3 -2
- package/dist/components/Status/index.d.ts +3 -1
- package/dist/components/Status/index.js +3 -2
- package/dist/components/StepList/index.cjs +2 -1
- package/dist/components/StepList/index.d.ts +3 -2
- package/dist/components/StepList/index.js +2 -1
- package/dist/components/Stepper/Step.cjs +2 -1
- package/dist/components/Stepper/Step.d.ts +3 -2
- package/dist/components/Stepper/Step.js +2 -1
- package/dist/components/Stepper/index.cjs +3 -2
- package/dist/components/Stepper/index.d.ts +5 -3
- package/dist/components/Stepper/index.js +3 -2
- package/dist/components/SwitchButton/Option.cjs +3 -2
- package/dist/components/SwitchButton/Option.d.ts +3 -2
- package/dist/components/SwitchButton/Option.js +3 -2
- package/dist/components/SwitchButton/index.cjs +3 -2
- package/dist/components/SwitchButton/index.d.ts +5 -3
- package/dist/components/SwitchButton/index.js +3 -2
- package/dist/components/Table/Cell.cjs +10 -6
- package/dist/components/Table/Cell.d.ts +3 -2
- package/dist/components/Table/Cell.js +10 -6
- package/dist/components/Table/Row.cjs +2 -1
- package/dist/components/Table/Row.d.ts +3 -2
- package/dist/components/Table/Row.js +2 -1
- package/dist/components/Table/index.cjs +3 -2
- package/dist/components/Table/index.d.ts +7 -3
- package/dist/components/Table/index.js +3 -2
- package/dist/components/Tabs/Tab.d.ts +2 -1
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/TagInput/index.cjs +3 -2
- package/dist/components/TagInput/index.d.ts +3 -2
- package/dist/components/TagInput/index.js +3 -2
- package/dist/components/TagList/index.cjs +8 -6
- package/dist/components/TagList/index.d.ts +3 -2
- package/dist/components/TagList/index.js +8 -6
- package/dist/components/Text/style.css.cjs +0 -1
- package/dist/components/Text/style.css.js +0 -1
- package/dist/components/Text/variables.css.cjs +1 -0
- package/dist/components/Text/variables.css.js +1 -0
- package/dist/components/TextArea/index.cjs +8 -4
- package/dist/components/TextArea/index.d.ts +2 -1
- package/dist/components/TextArea/index.js +8 -4
- package/dist/components/TextInput/index.cjs +3 -2
- package/dist/components/TextInput/index.d.ts +1 -1
- package/dist/components/TextInput/index.js +3 -2
- package/dist/components/TimeInput/index.cjs +2 -1
- package/dist/components/TimeInput/index.d.ts +3 -2
- package/dist/components/TimeInput/index.js +2 -1
- package/dist/components/Toaster/components/Button.d.ts +1 -1
- package/dist/components/Toaster/index.cjs +3 -2
- package/dist/components/Toaster/index.d.ts +4 -3
- package/dist/components/Toaster/index.js +3 -2
- package/dist/components/Toaster/styles.css.d.ts +1 -0
- package/dist/components/Toggle/index.cjs +3 -2
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/Toggle/index.js +3 -2
- package/dist/components/ToggleGroup/index.cjs +6 -4
- package/dist/components/ToggleGroup/index.d.ts +4 -4
- package/dist/components/ToggleGroup/index.js +6 -4
- package/dist/components/UnitInput/index.cjs +3 -2
- package/dist/components/UnitInput/index.d.ts +2 -2
- package/dist/components/UnitInput/index.js +3 -2
- package/dist/components/VerificationCode/index.cjs +3 -2
- package/dist/components/VerificationCode/index.d.ts +3 -2
- package/dist/components/VerificationCode/index.js +3 -2
- package/dist/ui.css +1 -1
- package/package.json +2 -2
- package/dist/components/Toaster/components/Button.cjs +0 -15
- package/dist/components/Toaster/components/Button.js +0 -12
|
@@ -41,7 +41,8 @@ const Snippet = ({
|
|
|
41
41
|
initiallyExpanded,
|
|
42
42
|
rows = 4,
|
|
43
43
|
noExpandable = false,
|
|
44
|
-
onCopy
|
|
44
|
+
onCopy,
|
|
45
|
+
style
|
|
45
46
|
}) => {
|
|
46
47
|
const theme = ThemeProvider.useTheme();
|
|
47
48
|
const [showMore, setShowMore] = react.useReducer((value) => !value, initiallyExpanded ?? false);
|
|
@@ -50,7 +51,7 @@ const Snippet = ({
|
|
|
50
51
|
const multiline = numberOfLines > 1;
|
|
51
52
|
const hasShowMoreButton = numberOfLines > rows && multiline && !noExpandable;
|
|
52
53
|
const minHeight = rows * Number.parseFloat(theme.typography.code.lineHeight) * 16 + Number.parseFloat(theme.space[4]) * 16;
|
|
53
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.snippetContainer[multiline ? "multiline" : "oneLine"]}`, "data-testid": dataTestId, children: /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { className: styles_css.stackStyle, children: [
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.snippetContainer[multiline ? "multiline" : "oneLine"]}`, "data-testid": dataTestId, style, children: /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { className: styles_css.stackStyle, children: [
|
|
54
55
|
hasShowMoreButton ? /* @__PURE__ */ jsxRuntime.jsx(index$1.Expandable, { minHeight, opened: showMore, children: /* @__PURE__ */ jsxRuntime.jsx(CodeContent, { lines, multiline, noExpandable, prefix, rows, children }) }) : /* @__PURE__ */ jsxRuntime.jsx(CodeContent, { lines, multiline, noExpandable, prefix, rows, children }),
|
|
55
56
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.buttonContainer[multiline && numberOfLines > 1 ? "multiline" : "oneLine"], children: /* @__PURE__ */ jsxRuntime.jsx(index$2.CopyButton, { copiedText, copyText, onCopy, sentiment: "neutral", value: children }) }),
|
|
56
57
|
hasShowMoreButton ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.showMoreContainer[showMore ? "true" : "false"], children: /* @__PURE__ */ jsxRuntime.jsx("button", { "aria-expanded": showMore, className: styles_css.showMoreButton, onClick: setShowMore, type: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(index$3.Text, { as: "span", className: styles_css.centeredText, sentiment: "neutral", variant: "bodySmallStrong", children: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentProps } from 'react';
|
|
1
|
+
import type { ComponentProps, CSSProperties } from 'react';
|
|
2
2
|
import { CopyButton } from '../CopyButton';
|
|
3
3
|
type Prefixes = 'lines' | 'command';
|
|
4
4
|
type SnippetProps = {
|
|
@@ -17,10 +17,11 @@ type SnippetProps = {
|
|
|
17
17
|
rows?: number;
|
|
18
18
|
noExpandable?: boolean;
|
|
19
19
|
onCopy?: () => void;
|
|
20
|
+
style?: CSSProperties;
|
|
20
21
|
} & Pick<ComponentProps<typeof CopyButton>, 'copyText' | 'copiedText'>;
|
|
21
22
|
/**
|
|
22
23
|
* Snippet component is used to display code snippets with the ability to copy the code.
|
|
23
24
|
* It also has the ability to show/hide the code snippet if it has more than 4 lines.
|
|
24
25
|
*/
|
|
25
|
-
export declare const Snippet: ({ children, copyText, copiedText, showText, hideText, prefix, className, "data-testid": dataTestId, initiallyExpanded, rows, noExpandable, onCopy, }: SnippetProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const Snippet: ({ children, copyText, copiedText, showText, hideText, prefix, className, "data-testid": dataTestId, initiallyExpanded, rows, noExpandable, onCopy, style, }: SnippetProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
27
|
export {};
|
|
@@ -39,7 +39,8 @@ const Snippet = ({
|
|
|
39
39
|
initiallyExpanded,
|
|
40
40
|
rows = 4,
|
|
41
41
|
noExpandable = false,
|
|
42
|
-
onCopy
|
|
42
|
+
onCopy,
|
|
43
|
+
style
|
|
43
44
|
}) => {
|
|
44
45
|
const theme = useTheme();
|
|
45
46
|
const [showMore, setShowMore] = useReducer((value) => !value, initiallyExpanded ?? false);
|
|
@@ -48,7 +49,7 @@ const Snippet = ({
|
|
|
48
49
|
const multiline = numberOfLines > 1;
|
|
49
50
|
const hasShowMoreButton = numberOfLines > rows && multiline && !noExpandable;
|
|
50
51
|
const minHeight = rows * Number.parseFloat(theme.typography.code.lineHeight) * 16 + Number.parseFloat(theme.space[4]) * 16;
|
|
51
|
-
return /* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${snippetContainer[multiline ? "multiline" : "oneLine"]}`, "data-testid": dataTestId, children: /* @__PURE__ */ jsxs(Stack, { className: stackStyle, children: [
|
|
52
|
+
return /* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${snippetContainer[multiline ? "multiline" : "oneLine"]}`, "data-testid": dataTestId, style, children: /* @__PURE__ */ jsxs(Stack, { className: stackStyle, children: [
|
|
52
53
|
hasShowMoreButton ? /* @__PURE__ */ jsx(Expandable, { minHeight, opened: showMore, children: /* @__PURE__ */ jsx(CodeContent, { lines, multiline, noExpandable, prefix: prefix2, rows, children }) }) : /* @__PURE__ */ jsx(CodeContent, { lines, multiline, noExpandable, prefix: prefix2, rows, children }),
|
|
53
54
|
/* @__PURE__ */ jsx("div", { className: buttonContainer[multiline && numberOfLines > 1 ? "multiline" : "oneLine"], children: /* @__PURE__ */ jsx(CopyButton, { copiedText, copyText, onCopy, sentiment: "neutral", value: children }) }),
|
|
54
55
|
hasShowMoreButton ? /* @__PURE__ */ jsx("div", { className: showMoreContainer[showMore ? "true" : "false"], children: /* @__PURE__ */ jsx("button", { "aria-expanded": showMore, className: showMoreButton, onClick: setShowMore, type: "button", children: /* @__PURE__ */ jsxs(Text, { as: "span", className: centeredText, sentiment: "neutral", variant: "bodySmallStrong", children: [
|
|
@@ -27,6 +27,7 @@ const Stack = ({
|
|
|
27
27
|
flex,
|
|
28
28
|
as,
|
|
29
29
|
ref,
|
|
30
|
+
style,
|
|
30
31
|
...props
|
|
31
32
|
}) => {
|
|
32
33
|
const wrapValue = react.useMemo(() => {
|
|
@@ -67,12 +68,15 @@ const Stack = ({
|
|
|
67
68
|
"data-testid": dataTestId,
|
|
68
69
|
id,
|
|
69
70
|
ref,
|
|
70
|
-
style:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
style: {
|
|
72
|
+
...dynamic.assignInlineVars({
|
|
73
|
+
[variables_css.widthVar]: width?.toString(),
|
|
74
|
+
[variables_css.maxWidthVar]: maxWidth?.toString(),
|
|
75
|
+
[variables_css.minWidthVar]: minWidth?.toString(),
|
|
76
|
+
[variables_css.flexVar]: flex?.toString()
|
|
77
|
+
}),
|
|
78
|
+
...style
|
|
79
|
+
},
|
|
76
80
|
...props,
|
|
77
81
|
children
|
|
78
82
|
}
|
|
@@ -20,5 +20,5 @@ type OwnStackProps = {
|
|
|
20
20
|
id?: string;
|
|
21
21
|
};
|
|
22
22
|
export type StackProps<T extends ElementType = 'div'> = PolymorphicComponentProps<T, OwnStackProps>;
|
|
23
|
-
export declare const Stack: <T extends ElementType = "div">({ gap, direction, alignItems, justifyContent, wrap, className, children, id, "data-testid": dataTestId, width, maxWidth, minWidth, flex, as, ref, ...props }: StackProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const Stack: <T extends ElementType = "div">({ gap, direction, alignItems, justifyContent, wrap, className, children, id, "data-testid": dataTestId, width, maxWidth, minWidth, flex, as, ref, style, ...props }: StackProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -25,6 +25,7 @@ const Stack = ({
|
|
|
25
25
|
flex,
|
|
26
26
|
as,
|
|
27
27
|
ref,
|
|
28
|
+
style,
|
|
28
29
|
...props
|
|
29
30
|
}) => {
|
|
30
31
|
const wrapValue = useMemo(() => {
|
|
@@ -65,12 +66,15 @@ const Stack = ({
|
|
|
65
66
|
"data-testid": dataTestId,
|
|
66
67
|
id,
|
|
67
68
|
ref,
|
|
68
|
-
style:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
style: {
|
|
70
|
+
...assignInlineVars({
|
|
71
|
+
[widthVar]: width?.toString(),
|
|
72
|
+
[maxWidthVar]: maxWidth?.toString(),
|
|
73
|
+
[minWidthVar]: minWidth?.toString(),
|
|
74
|
+
[flexVar]: flex?.toString()
|
|
75
|
+
}),
|
|
76
|
+
...style
|
|
77
|
+
},
|
|
74
78
|
...props,
|
|
75
79
|
children
|
|
76
80
|
}
|
|
@@ -10,10 +10,11 @@ const Status = ({
|
|
|
10
10
|
tooltip,
|
|
11
11
|
sentiment,
|
|
12
12
|
"data-testid": dataTestId,
|
|
13
|
-
notification
|
|
13
|
+
notification,
|
|
14
|
+
style
|
|
14
15
|
}) => /* @__PURE__ */ jsxRuntime.jsx(index.Tooltip, { text: tooltip, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${className ? `${className} ` : ""}${styles_css.status({
|
|
15
16
|
notification
|
|
16
|
-
})}`, "data-testid": dataTestId, children: [
|
|
17
|
+
})}`, "data-testid": dataTestId, style, children: [
|
|
17
18
|
animated ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles_css.animatedCircleStatus({
|
|
18
19
|
sentiment
|
|
19
20
|
}) }) : null,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
1
2
|
import type { SENTIMENTS } from './constant';
|
|
2
3
|
type StatusSentiment = (typeof SENTIMENTS)[number];
|
|
3
4
|
type StatusProps = {
|
|
@@ -10,9 +11,10 @@ type StatusProps = {
|
|
|
10
11
|
* This prop will set status as a notification and make it absolute to its parent displayed on top right.
|
|
11
12
|
*/
|
|
12
13
|
notification?: boolean;
|
|
14
|
+
style?: CSSProperties;
|
|
13
15
|
};
|
|
14
16
|
/**
|
|
15
17
|
* Status component used to display a colored circle with a tooltip for additional information.
|
|
16
18
|
*/
|
|
17
|
-
export declare const Status: ({ animated, className, tooltip, sentiment, "data-testid": dataTestId, notification, }: StatusProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const Status: ({ animated, className, tooltip, sentiment, "data-testid": dataTestId, notification, style, }: StatusProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -8,10 +8,11 @@ const Status = ({
|
|
|
8
8
|
tooltip,
|
|
9
9
|
sentiment,
|
|
10
10
|
"data-testid": dataTestId,
|
|
11
|
-
notification
|
|
11
|
+
notification,
|
|
12
|
+
style
|
|
12
13
|
}) => /* @__PURE__ */ jsx(Tooltip, { text: tooltip, children: /* @__PURE__ */ jsxs("span", { className: `${className ? `${className} ` : ""}${status({
|
|
13
14
|
notification
|
|
14
|
-
})}`, "data-testid": dataTestId, children: [
|
|
15
|
+
})}`, "data-testid": dataTestId, style, children: [
|
|
15
16
|
animated ? /* @__PURE__ */ jsx("span", { className: animatedCircleStatus({
|
|
16
17
|
sentiment
|
|
17
18
|
}) }) : null,
|
|
@@ -25,7 +25,8 @@ const Item = ({
|
|
|
25
25
|
const StepList = ({
|
|
26
26
|
children,
|
|
27
27
|
className,
|
|
28
|
+
style,
|
|
28
29
|
"data-testid": dataTestId
|
|
29
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${className ? `${className} ` : ""}${styles_css.steps}`, "data-testid": dataTestId, children });
|
|
30
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${className ? `${className} ` : ""}${styles_css.steps}`, "data-testid": dataTestId, style, children });
|
|
30
31
|
StepList.Item = Item;
|
|
31
32
|
exports.StepList = StepList;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentProps, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Bullet } from '../Bullet';
|
|
3
3
|
export type Sizes = 'small' | 'medium';
|
|
4
4
|
type ItemProps = {
|
|
@@ -16,13 +16,14 @@ type StepListProps = {
|
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
className?: string;
|
|
18
18
|
'data-testid'?: string;
|
|
19
|
+
style?: CSSProperties;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
21
22
|
* StepList component is used to display a list of steps.
|
|
22
23
|
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
23
24
|
*/
|
|
24
25
|
export declare const StepList: {
|
|
25
|
-
({ children, className, "data-testid": dataTestId, }: StepListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
|
+
({ children, className, style, "data-testid": dataTestId, }: StepListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
27
|
Item: ({ bulletContent, sentiment, prominence, children, onClick, onKeyDown, size, disabled, className, }: ItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
27
28
|
};
|
|
28
29
|
export {};
|
|
@@ -23,8 +23,9 @@ const Item = ({
|
|
|
23
23
|
const StepList = ({
|
|
24
24
|
children,
|
|
25
25
|
className,
|
|
26
|
+
style,
|
|
26
27
|
"data-testid": dataTestId
|
|
27
|
-
}) => /* @__PURE__ */ jsx("ul", { className: `${className ? `${className} ` : ""}${steps}`, "data-testid": dataTestId, children });
|
|
28
|
+
}) => /* @__PURE__ */ jsx("ul", { className: `${className ? `${className} ` : ""}${steps}`, "data-testid": dataTestId, style, children });
|
|
28
29
|
StepList.Item = Item;
|
|
29
30
|
export {
|
|
30
31
|
StepList
|
|
@@ -16,6 +16,7 @@ const Step = ({
|
|
|
16
16
|
title,
|
|
17
17
|
children,
|
|
18
18
|
className,
|
|
19
|
+
style,
|
|
19
20
|
"data-testid": dataTestId
|
|
20
21
|
}) => {
|
|
21
22
|
const {
|
|
@@ -51,7 +52,7 @@ const Step = ({
|
|
|
51
52
|
}
|
|
52
53
|
onClick?.(index$3);
|
|
53
54
|
}
|
|
54
|
-
}, children: [
|
|
55
|
+
}, style, children: [
|
|
55
56
|
isDone && !disabled ? /* @__PURE__ */ jsxRuntime.jsx(index$1.Bullet, { className: styles_css.stepBullet({
|
|
56
57
|
disabled,
|
|
57
58
|
isActive,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
type StepProps = {
|
|
3
3
|
onClick?: (index: number) => void;
|
|
4
4
|
/**
|
|
@@ -20,6 +20,7 @@ type StepProps = {
|
|
|
20
20
|
children?: ReactNode;
|
|
21
21
|
className?: string;
|
|
22
22
|
'data-testid'?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
23
24
|
};
|
|
24
|
-
export declare const Step: ({ index, onClick, disabled, title, children, className, "data-testid": dataTestId, }: StepProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const Step: ({ index, onClick, disabled, title, children, className, style, "data-testid": dataTestId, }: StepProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
26
|
export {};
|
|
@@ -14,6 +14,7 @@ const Step = ({
|
|
|
14
14
|
title,
|
|
15
15
|
children,
|
|
16
16
|
className,
|
|
17
|
+
style,
|
|
17
18
|
"data-testid": dataTestId
|
|
18
19
|
}) => {
|
|
19
20
|
const {
|
|
@@ -49,7 +50,7 @@ const Step = ({
|
|
|
49
50
|
}
|
|
50
51
|
onClick?.(index);
|
|
51
52
|
}
|
|
52
|
-
}, children: [
|
|
53
|
+
}, style, children: [
|
|
53
54
|
isDone && !disabled ? /* @__PURE__ */ jsx(Bullet, { className: stepBullet({
|
|
54
55
|
disabled,
|
|
55
56
|
isActive,
|
|
@@ -15,14 +15,15 @@ const Stepper = ({
|
|
|
15
15
|
labelPosition = "bottom",
|
|
16
16
|
size = "medium",
|
|
17
17
|
"data-testid": dataTestId,
|
|
18
|
-
separator = true
|
|
18
|
+
separator = true,
|
|
19
|
+
style
|
|
19
20
|
}) => {
|
|
20
21
|
const cleanChildren = react.Children.toArray(children).filter(react.isValidElement);
|
|
21
22
|
const lastStep = react.Children.count(cleanChildren) - 1;
|
|
22
23
|
return /* @__PURE__ */ jsxRuntime.jsx(StepperProvider.StepperProvider, { animated, interactive, labelPosition, selected, separator, size, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.stepperContainer({
|
|
23
24
|
labelPosition,
|
|
24
25
|
separator
|
|
25
|
-
})}`, "data-testid": dataTestId, children: react.Children.map(cleanChildren, (child, index) => {
|
|
26
|
+
})}`, "data-testid": dataTestId, style, children: react.Children.map(cleanChildren, (child, index) => {
|
|
26
27
|
const getTemporal = () => {
|
|
27
28
|
if (index < selected) {
|
|
28
29
|
return "done";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
type StepperProps = {
|
|
3
3
|
animated?: boolean;
|
|
4
4
|
/**
|
|
@@ -15,10 +15,11 @@ type StepperProps = {
|
|
|
15
15
|
size?: 'small' | 'medium';
|
|
16
16
|
'data-testid'?: string;
|
|
17
17
|
separator?: boolean;
|
|
18
|
+
style?: CSSProperties;
|
|
18
19
|
};
|
|
19
20
|
export declare const Stepper: {
|
|
20
|
-
({ children, interactive, selected, animated, className, labelPosition, size, "data-testid": dataTestId, separator, }: StepperProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
-
Step: ({ index, onClick, disabled, title, children, className, "data-testid": dataTestId, }: {
|
|
21
|
+
({ children, interactive, selected, animated, className, labelPosition, size, "data-testid": dataTestId, separator, style, }: StepperProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
22
|
+
Step: ({ index, onClick, disabled, title, children, className, style, "data-testid": dataTestId, }: {
|
|
22
23
|
onClick?: (index: number) => void;
|
|
23
24
|
index?: number;
|
|
24
25
|
disabled?: boolean;
|
|
@@ -26,6 +27,7 @@ export declare const Stepper: {
|
|
|
26
27
|
children?: ReactNode;
|
|
27
28
|
className?: string;
|
|
28
29
|
'data-testid'?: string;
|
|
30
|
+
style?: CSSProperties;
|
|
29
31
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
30
32
|
};
|
|
31
33
|
export {};
|
|
@@ -13,14 +13,15 @@ const Stepper = ({
|
|
|
13
13
|
labelPosition = "bottom",
|
|
14
14
|
size = "medium",
|
|
15
15
|
"data-testid": dataTestId,
|
|
16
|
-
separator = true
|
|
16
|
+
separator = true,
|
|
17
|
+
style
|
|
17
18
|
}) => {
|
|
18
19
|
const cleanChildren = Children.toArray(children).filter(isValidElement);
|
|
19
20
|
const lastStep = Children.count(cleanChildren) - 1;
|
|
20
21
|
return /* @__PURE__ */ jsx(StepperProvider, { animated, interactive, labelPosition, selected, separator, size, children: /* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${stepperContainer({
|
|
21
22
|
labelPosition,
|
|
22
23
|
separator
|
|
23
|
-
})}`, "data-testid": dataTestId, children: Children.map(cleanChildren, (child, index) => {
|
|
24
|
+
})}`, "data-testid": dataTestId, style, children: Children.map(cleanChildren, (child, index) => {
|
|
24
25
|
const getTemporal = () => {
|
|
25
26
|
if (index < selected) {
|
|
26
27
|
return "done";
|
|
@@ -11,7 +11,8 @@ const Option = ({
|
|
|
11
11
|
children,
|
|
12
12
|
"data-testid": dataTestId,
|
|
13
13
|
disabled,
|
|
14
|
-
tooltip
|
|
14
|
+
tooltip,
|
|
15
|
+
style
|
|
15
16
|
}) => {
|
|
16
17
|
const context = SwitchButtonContext.useSwitchButton();
|
|
17
18
|
const ref = react.useRef(null);
|
|
@@ -34,6 +35,6 @@ const Option = ({
|
|
|
34
35
|
setRefOptions([...refOptions, option]);
|
|
35
36
|
}
|
|
36
37
|
}, [refOptions, setRefOptions, value]);
|
|
37
|
-
return /* @__PURE__ */ jsxRuntime.jsx(index.SelectableCard, { checked: localValue === value, className: styles_css.switchButtonOption[sentiment], "data-checked": localValue === value, "data-testid": dataTestId ?? `switch-button-${value}`, disabled: !!disabled, label: children, name, onBlur, onChange: handleOnChange, onFocus, ref, tooltip, value });
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index.SelectableCard, { checked: localValue === value, className: styles_css.switchButtonOption[sentiment], "data-checked": localValue === value, "data-testid": dataTestId ?? `switch-button-${value}`, disabled: !!disabled, label: children, name, onBlur, onChange: handleOnChange, onFocus, ref, style, tooltip, value });
|
|
38
39
|
};
|
|
39
40
|
exports.Option = Option;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
type OptionProps = {
|
|
3
3
|
value: string;
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
'data-testid'?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
tooltip?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
8
9
|
};
|
|
9
|
-
export declare const Option: ({ value, children, "data-testid": dataTestId, disabled, tooltip, }: OptionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Option: ({ value, children, "data-testid": dataTestId, disabled, tooltip, style, }: OptionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -9,7 +9,8 @@ const Option = ({
|
|
|
9
9
|
children,
|
|
10
10
|
"data-testid": dataTestId,
|
|
11
11
|
disabled,
|
|
12
|
-
tooltip
|
|
12
|
+
tooltip,
|
|
13
|
+
style
|
|
13
14
|
}) => {
|
|
14
15
|
const context = useSwitchButton();
|
|
15
16
|
const ref = useRef(null);
|
|
@@ -32,7 +33,7 @@ const Option = ({
|
|
|
32
33
|
setRefOptions([...refOptions, option]);
|
|
33
34
|
}
|
|
34
35
|
}, [refOptions, setRefOptions, value]);
|
|
35
|
-
return /* @__PURE__ */ jsx(SelectableCard, { checked: localValue === value, className: switchButtonOption[sentiment], "data-checked": localValue === value, "data-testid": dataTestId ?? `switch-button-${value}`, disabled: !!disabled, label: children, name, onBlur, onChange: handleOnChange, onFocus, ref, tooltip, value });
|
|
36
|
+
return /* @__PURE__ */ jsx(SelectableCard, { checked: localValue === value, className: switchButtonOption[sentiment], "data-checked": localValue === value, "data-testid": dataTestId ?? `switch-button-${value}`, disabled: !!disabled, label: children, name, onBlur, onChange: handleOnChange, onFocus, ref, style, tooltip, value });
|
|
36
37
|
};
|
|
37
38
|
export {
|
|
38
39
|
Option
|
|
@@ -21,7 +21,8 @@ const SwitchButton = ({
|
|
|
21
21
|
tooltip,
|
|
22
22
|
className,
|
|
23
23
|
children,
|
|
24
|
-
"data-testid": dataTestId
|
|
24
|
+
"data-testid": dataTestId,
|
|
25
|
+
style
|
|
25
26
|
}) => {
|
|
26
27
|
const containerRef = react.useRef(null);
|
|
27
28
|
const [localValue, setLocalValue] = react.useState(value);
|
|
@@ -100,7 +101,7 @@ const SwitchButton = ({
|
|
|
100
101
|
if (mouseDownSide) {
|
|
101
102
|
setWidth(width - constant.FOCUS_OVERLAY_SCALE_RATIO);
|
|
102
103
|
}
|
|
103
|
-
}, ref: containerRef, children: [
|
|
104
|
+
}, ref: containerRef, style, children: [
|
|
104
105
|
width ? /* @__PURE__ */ jsxRuntime.jsx(FocusOverlay.FocusOverlay, { cardWidth: width, mouseDownSide, position, sentiment }) : null,
|
|
105
106
|
children
|
|
106
107
|
] }) }) }) });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEventHandler, FocusEventHandler, ReactNode } from 'react';
|
|
1
|
+
import type { ChangeEventHandler, CSSProperties, FocusEventHandler, ReactNode } from 'react';
|
|
2
2
|
type SwitchButtonProps = {
|
|
3
3
|
name?: string;
|
|
4
4
|
children: ReactNode;
|
|
@@ -11,18 +11,20 @@ type SwitchButtonProps = {
|
|
|
11
11
|
'data-testid'?: string;
|
|
12
12
|
size?: 'small' | 'medium';
|
|
13
13
|
sentiment?: 'primary' | 'neutral';
|
|
14
|
+
style?: CSSProperties;
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
17
|
* SwitchButton is a component that allows the user to select between two options.
|
|
17
18
|
*/
|
|
18
19
|
export declare const SwitchButton: {
|
|
19
|
-
({ value, onChange, onFocus, onBlur, name, size, sentiment, tooltip, className, children, "data-testid": dataTestId, }: SwitchButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
-
Option: ({ value, children, "data-testid": dataTestId, disabled, tooltip, }: {
|
|
20
|
+
({ value, onChange, onFocus, onBlur, name, size, sentiment, tooltip, className, children, "data-testid": dataTestId, style, }: SwitchButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
Option: ({ value, children, "data-testid": dataTestId, disabled, tooltip, style, }: {
|
|
21
22
|
value: string;
|
|
22
23
|
children: ReactNode;
|
|
23
24
|
'data-testid'?: string;
|
|
24
25
|
disabled?: boolean;
|
|
25
26
|
tooltip?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
26
28
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
27
29
|
};
|
|
28
30
|
export {};
|
|
@@ -19,7 +19,8 @@ const SwitchButton = ({
|
|
|
19
19
|
tooltip,
|
|
20
20
|
className,
|
|
21
21
|
children,
|
|
22
|
-
"data-testid": dataTestId
|
|
22
|
+
"data-testid": dataTestId,
|
|
23
|
+
style
|
|
23
24
|
}) => {
|
|
24
25
|
const containerRef = useRef(null);
|
|
25
26
|
const [localValue, setLocalValue] = useState(value);
|
|
@@ -98,7 +99,7 @@ const SwitchButton = ({
|
|
|
98
99
|
if (mouseDownSide) {
|
|
99
100
|
setWidth(width - FOCUS_OVERLAY_SCALE_RATIO);
|
|
100
101
|
}
|
|
101
|
-
}, ref: containerRef, children: [
|
|
102
|
+
}, ref: containerRef, style, children: [
|
|
102
103
|
width ? /* @__PURE__ */ jsx(FocusOverlay, { cardWidth: width, mouseDownSide, position, sentiment }) : null,
|
|
103
104
|
children
|
|
104
105
|
] }) }) }) });
|
|
@@ -12,7 +12,8 @@ const Cell = ({
|
|
|
12
12
|
colSpan,
|
|
13
13
|
rowSpan,
|
|
14
14
|
sentiment,
|
|
15
|
-
align = "left"
|
|
15
|
+
align = "left",
|
|
16
|
+
style
|
|
16
17
|
}) => {
|
|
17
18
|
const {
|
|
18
19
|
maxWidth,
|
|
@@ -22,10 +23,13 @@ const Cell = ({
|
|
|
22
23
|
return /* @__PURE__ */ jsxRuntime.jsx("td", { align, className: `${className ? `${className} ` : ""}${styles_css.tableCell({
|
|
23
24
|
align,
|
|
24
25
|
sentiment
|
|
25
|
-
})}`, colSpan, rowSpan, style:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
})}`, colSpan, rowSpan, style: {
|
|
27
|
+
...dynamic.assignInlineVars({
|
|
28
|
+
[variables_css.widthCell]: width,
|
|
29
|
+
[variables_css.minWidthCell]: minWidth,
|
|
30
|
+
[variables_css.maxWidthCell]: maxWidth
|
|
31
|
+
}),
|
|
32
|
+
...style
|
|
33
|
+
}, children });
|
|
30
34
|
};
|
|
31
35
|
exports.Cell = Cell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { Color } from '../../theme';
|
|
3
3
|
type Align = 'left' | 'center' | 'right';
|
|
4
4
|
type CellProps = {
|
|
@@ -8,6 +8,7 @@ type CellProps = {
|
|
|
8
8
|
rowSpan?: number;
|
|
9
9
|
sentiment?: Color;
|
|
10
10
|
align?: Align;
|
|
11
|
+
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
|
-
export declare const Cell: ({ children, className, colSpan, rowSpan, sentiment, align, }: CellProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Cell: ({ children, className, colSpan, rowSpan, sentiment, align, style, }: CellProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -10,7 +10,8 @@ const Cell = ({
|
|
|
10
10
|
colSpan,
|
|
11
11
|
rowSpan,
|
|
12
12
|
sentiment,
|
|
13
|
-
align = "left"
|
|
13
|
+
align = "left",
|
|
14
|
+
style
|
|
14
15
|
}) => {
|
|
15
16
|
const {
|
|
16
17
|
maxWidth,
|
|
@@ -20,11 +21,14 @@ const Cell = ({
|
|
|
20
21
|
return /* @__PURE__ */ jsx("td", { align, className: `${className ? `${className} ` : ""}${tableCell({
|
|
21
22
|
align,
|
|
22
23
|
sentiment
|
|
23
|
-
})}`, colSpan, rowSpan, style:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
})}`, colSpan, rowSpan, style: {
|
|
25
|
+
...assignInlineVars({
|
|
26
|
+
[widthCell]: width,
|
|
27
|
+
[minWidthCell]: minWidth,
|
|
28
|
+
[maxWidthCell]: maxWidth
|
|
29
|
+
}),
|
|
30
|
+
...style
|
|
31
|
+
}, children });
|
|
28
32
|
};
|
|
29
33
|
export {
|
|
30
34
|
Cell
|
|
@@ -21,6 +21,7 @@ const Row = ({
|
|
|
21
21
|
highlightAnimation,
|
|
22
22
|
expandable,
|
|
23
23
|
expanded,
|
|
24
|
+
style,
|
|
24
25
|
"data-testid": dataTestid
|
|
25
26
|
}) => {
|
|
26
27
|
const {
|
|
@@ -69,7 +70,7 @@ const Row = ({
|
|
|
69
70
|
}
|
|
70
71
|
}, [refList, setRefList]);
|
|
71
72
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
72
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: `${className ? `${className}` : ""}${highlightAnimation ? ` ${styles_css.tableTrAnimation}` : ""}`, "data-testid": dataTestid, role: canClickRowToExpand ? "button row" : "row", children: [
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: `${className ? `${className}` : ""}${highlightAnimation ? ` ${styles_css.tableTrAnimation}` : ""}`, "data-testid": dataTestid, role: canClickRowToExpand ? "button row" : "row", style, children: [
|
|
73
74
|
selectable ? /* @__PURE__ */ jsxRuntime.jsx(ColumnProvider.ColumnProvider, { width: themes.theme.sizing[300], children: /* @__PURE__ */ jsxRuntime.jsx(Cell.Cell, { className: styles_css$1.listNoPaddingCell, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.tableCheckboxContainer, children: /* @__PURE__ */ jsxRuntime.jsx(index.Tooltip, { text: typeof selectDisabled === "string" ? selectDisabled : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(index$1.Checkbox, { "aria-label": "select", checked: selectedRowIds[id], className: inRange?.includes(id) ? styles_css$1.listCheckboxInRange : void 0, disabled: !!selectDisabled, name: "table-select-checkbox", onChange: () => handleOnChange(id, selectedRowIds[id]), ref: checkboxRowRef, value: id }) }) }) }) }) : null,
|
|
74
75
|
expandButton ? /* @__PURE__ */ jsxRuntime.jsx(ColumnProvider.ColumnProvider, { width: themes.theme.sizing[300], children: /* @__PURE__ */ jsxRuntime.jsx(Cell.Cell, { className: styles_css$1.listNoPaddingCell, children: /* @__PURE__ */ jsxRuntime.jsx(index$2.Button, { "aria-label": "expand", "data-testid": "list-expand-button", disabled: !expandable, onClick: toggleRowExpand, sentiment: "neutral", size: "xsmall", variant: "ghost", children: expandedRowIds[id] ? /* @__PURE__ */ jsxRuntime.jsx(Icon.ArrowUpIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(Icon.ArrowDownIcon, {}) }) }) }) : null,
|
|
75
76
|
react.Children.map(children, (child, index2) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
type RowProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
expandable?: ReactNode;
|
|
@@ -11,6 +11,7 @@ type RowProps = {
|
|
|
11
11
|
selectDisabled?: boolean | string;
|
|
12
12
|
highlightAnimation?: boolean;
|
|
13
13
|
expanded?: boolean;
|
|
14
|
+
style?: CSSProperties;
|
|
14
15
|
};
|
|
15
|
-
export declare const Row: ({ children, className, id, selectDisabled, highlightAnimation, expandable, expanded, "data-testid": dataTestid, }: RowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Row: ({ children, className, id, selectDisabled, highlightAnimation, expandable, expanded, style, "data-testid": dataTestid, }: RowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -19,6 +19,7 @@ const Row = ({
|
|
|
19
19
|
highlightAnimation,
|
|
20
20
|
expandable,
|
|
21
21
|
expanded,
|
|
22
|
+
style,
|
|
22
23
|
"data-testid": dataTestid
|
|
23
24
|
}) => {
|
|
24
25
|
const {
|
|
@@ -67,7 +68,7 @@ const Row = ({
|
|
|
67
68
|
}
|
|
68
69
|
}, [refList, setRefList]);
|
|
69
70
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
-
/* @__PURE__ */ jsxs("tr", { className: `${className ? `${className}` : ""}${highlightAnimation ? ` ${tableTrAnimation}` : ""}`, "data-testid": dataTestid, role: canClickRowToExpand ? "button row" : "row", children: [
|
|
71
|
+
/* @__PURE__ */ jsxs("tr", { className: `${className ? `${className}` : ""}${highlightAnimation ? ` ${tableTrAnimation}` : ""}`, "data-testid": dataTestid, role: canClickRowToExpand ? "button row" : "row", style, children: [
|
|
71
72
|
selectable ? /* @__PURE__ */ jsx(ColumnProvider, { width: theme.sizing[300], children: /* @__PURE__ */ jsx(Cell, { className: listNoPaddingCell, children: /* @__PURE__ */ jsx("div", { className: tableCheckboxContainer, children: /* @__PURE__ */ jsx(Tooltip, { text: typeof selectDisabled === "string" ? selectDisabled : void 0, children: /* @__PURE__ */ jsx(Checkbox, { "aria-label": "select", checked: selectedRowIds[id], className: inRange?.includes(id) ? listCheckboxInRange : void 0, disabled: !!selectDisabled, name: "table-select-checkbox", onChange: () => handleOnChange(id, selectedRowIds[id]), ref: checkboxRowRef, value: id }) }) }) }) }) : null,
|
|
72
73
|
expandButton ? /* @__PURE__ */ jsx(ColumnProvider, { width: theme.sizing[300], children: /* @__PURE__ */ jsx(Cell, { className: listNoPaddingCell, children: /* @__PURE__ */ jsx(Button, { "aria-label": "expand", "data-testid": "list-expand-button", disabled: !expandable, onClick: toggleRowExpand, sentiment: "neutral", size: "xsmall", variant: "ghost", children: expandedRowIds[id] ? /* @__PURE__ */ jsx(ArrowUpIcon, {}) : /* @__PURE__ */ jsx(ArrowDownIcon, {}) }) }) }) : null,
|
|
73
74
|
Children.map(children, (child, index) => {
|
|
@@ -39,8 +39,9 @@ const BaseTable = react.forwardRef(({
|
|
|
39
39
|
bordered = false,
|
|
40
40
|
stripped = false,
|
|
41
41
|
autoCollapse = false,
|
|
42
|
-
onSelectedChange
|
|
43
|
-
|
|
42
|
+
onSelectedChange,
|
|
43
|
+
style
|
|
44
|
+
}, ref) => /* @__PURE__ */ jsxRuntime.jsx(TableContext.TableProvider, { autoCollapse, bordered, columns, expandButton: expandable, onSelectedChange, selectable, stripped, children: /* @__PURE__ */ jsxRuntime.jsx(TableContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: `${styles_css.table}${stripped ? ` ${styles_css.tableStripped}` : ""}${bordered ? ` ${styles_css.tableBordered}` : ""}`, ref, style, children: [
|
|
44
45
|
/* @__PURE__ */ jsxRuntime.jsx(Header.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderRow.HeaderRow, { hasSelectAllColumn: selectable, children: columns.map((column, index) => /* @__PURE__ */ jsxRuntime.jsx(HeaderCell.HeaderCell, { align: column.align, info: column.info, isOrdered: column.isOrdered, maxWidth: column.maxWidth, minWidth: column.minWidth, onOrder: column.onOrder, orderDirection: column.orderDirection, width: column.width, children: column.label }, `header-column-${index}`)) }) }),
|
|
45
46
|
loading ? /* @__PURE__ */ jsxRuntime.jsx(Body.Body, { children: /* @__PURE__ */ jsxRuntime.jsx(SkeletonRows.SkeletonRows, { cols: columns.length, rows: 5, selectable }) }) : children
|
|
46
47
|
] }) }) }));
|