@ultraviolet/ui 3.0.0-beta.23 → 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/README.md +1 -6
- 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/ActionBar/styles.css.cjs +0 -1
- package/dist/components/ActionBar/styles.css.js +0 -1
- 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/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 +9 -49
- package/dist/components/Key/index.d.ts +3 -1
- package/dist/components/Key/index.js +10 -48
- package/dist/components/Key/styles.css.cjs +6 -0
- package/dist/components/Key/styles.css.d.ts +29 -0
- package/dist/components/Key/styles.css.js +6 -0
- 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/CustomLegend.cjs +40 -54
- package/dist/components/LineChart/CustomLegend.js +41 -55
- 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/LineChart/styles.css.cjs +16 -6
- package/dist/components/LineChart/styles.css.d.ts +5 -0
- package/dist/components/LineChart/styles.css.js +16 -6
- 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 +4 -21
- package/dist/components/SelectableCardGroup/index.d.ts +1 -1
- package/dist/components/SelectableCardGroup/index.js +4 -19
- package/dist/components/SelectableCardGroup/styles.css.cjs +5 -0
- package/dist/components/SelectableCardGroup/styles.css.d.ts +1 -0
- package/dist/components/SelectableCardGroup/styles.css.js +5 -0
- 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 +5 -22
- package/dist/components/SelectableCardOptionGroup/index.d.ts +3 -3
- package/dist/components/SelectableCardOptionGroup/index.js +5 -20
- package/dist/components/SelectableCardOptionGroup/styles.css.cjs +21 -0
- package/dist/components/SelectableCardOptionGroup/styles.css.d.ts +8 -0
- package/dist/components/SelectableCardOptionGroup/styles.css.js +21 -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/index.cjs +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -0
- package/dist/ui.css +1 -1
- package/dist/utils/animationVanillaExtract.css.cjs +11 -0
- package/dist/utils/animationVanillaExtract.css.d.ts +1 -0
- package/dist/utils/animationVanillaExtract.css.js +11 -0
- package/dist/utils/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/components/Toaster/components/Button.cjs +0 -15
- package/dist/components/Toaster/components/Button.js +0 -12
package/README.md
CHANGED
|
@@ -46,16 +46,11 @@ You will also need to import styles of components for them to have the correct s
|
|
|
46
46
|
|
|
47
47
|
```tsx
|
|
48
48
|
import { ThemeProvider } from '@ultraviolet/ui'
|
|
49
|
-
import { Button,
|
|
49
|
+
import { Button, theme } from '@ultraviolet/ui'
|
|
50
50
|
import '@ultraviolet/ui/styles'
|
|
51
51
|
|
|
52
52
|
const App = () => (
|
|
53
53
|
<ThemeProvider theme={theme}>
|
|
54
|
-
<Global
|
|
55
|
-
styles={css`
|
|
56
|
-
${normalize()}
|
|
57
|
-
`}
|
|
58
|
-
/>
|
|
59
54
|
<Button onClick={() => console.log('clicked')}>Click Me</Button>
|
|
60
55
|
</ThemeProvider>
|
|
61
56
|
)
|
|
@@ -11,8 +11,12 @@ const ActionBar = ({
|
|
|
11
11
|
role = "dialog",
|
|
12
12
|
rank = 0,
|
|
13
13
|
className,
|
|
14
|
+
style,
|
|
14
15
|
"data-testid": dataTestId
|
|
15
|
-
}) => reactDom.createPortal(/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.actionBar}`, "data-testid": dataTestId, role, style:
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
}) => reactDom.createPortal(/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.actionBar}`, "data-testid": dataTestId, role, style: {
|
|
17
|
+
...dynamic.assignInlineVars({
|
|
18
|
+
[styles_css.rankActionBar]: `${rank}`
|
|
19
|
+
}),
|
|
20
|
+
...style
|
|
21
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(index.Stack, { alignItems: "center", className: styles_css.stackActionBar, children }) }), document.body);
|
|
18
22
|
exports.ActionBar = ActionBar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
type ActionBarProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
/**
|
|
@@ -8,6 +8,7 @@ type ActionBarProps = {
|
|
|
8
8
|
role?: string;
|
|
9
9
|
className?: string;
|
|
10
10
|
'data-testid'?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
14
|
* The ActionBar is a floating bar that appears at the bottom of a page.
|
|
@@ -16,5 +17,5 @@ type ActionBarProps = {
|
|
|
16
17
|
* **Note:** ActionBar is added into a portal at the end of the body element. This means that it will always be on top of other elements without `z-index`,
|
|
17
18
|
* and will not be affected by the layout of the page it is on.
|
|
18
19
|
*/
|
|
19
|
-
export declare const ActionBar: ({ children, role, rank, className, "data-testid": dataTestId, }: ActionBarProps) => import("react").ReactPortal;
|
|
20
|
+
export declare const ActionBar: ({ children, role, rank, className, style, "data-testid": dataTestId, }: ActionBarProps) => import("react").ReactPortal;
|
|
20
21
|
export {};
|
|
@@ -9,10 +9,14 @@ const ActionBar = ({
|
|
|
9
9
|
role = "dialog",
|
|
10
10
|
rank = 0,
|
|
11
11
|
className,
|
|
12
|
+
style,
|
|
12
13
|
"data-testid": dataTestId
|
|
13
|
-
}) => createPortal(/* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${actionBar}`, "data-testid": dataTestId, role, style:
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
}) => createPortal(/* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${actionBar}`, "data-testid": dataTestId, role, style: {
|
|
15
|
+
...assignInlineVars({
|
|
16
|
+
[rankActionBar]: `${rank}`
|
|
17
|
+
}),
|
|
18
|
+
...style
|
|
19
|
+
}, children: /* @__PURE__ */ jsx(Stack, { alignItems: "center", className: stackActionBar, children }) }), document.body);
|
|
16
20
|
export {
|
|
17
21
|
ActionBar
|
|
18
22
|
};
|
|
@@ -25,7 +25,8 @@ const Alert = ({
|
|
|
25
25
|
onClose,
|
|
26
26
|
className,
|
|
27
27
|
disabled,
|
|
28
|
-
"data-testid": dataTestId
|
|
28
|
+
"data-testid": dataTestId,
|
|
29
|
+
style
|
|
29
30
|
}) => {
|
|
30
31
|
const [opened, setOpened] = react.useState(true);
|
|
31
32
|
const Icon$1 = sentimentIcons[sentiment];
|
|
@@ -34,7 +35,7 @@ const Alert = ({
|
|
|
34
35
|
}
|
|
35
36
|
return /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { className: `${className ? `${className} ` : ""}${styles_css.alert({
|
|
36
37
|
sentiment
|
|
37
|
-
})}`, "data-testid": dataTestId, direction: "row", gap: 1, children: [
|
|
38
|
+
})}`, "data-testid": dataTestId, direction: "row", gap: 1, style, children: [
|
|
38
39
|
/* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { alignItems: "center", className: styles_css.wrapAlert, direction: "row", gap: 2, justifyContent: "space-between", wrap: true, children: [
|
|
39
40
|
/* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { alignItems: "start", direction: "row", flex: "1 1 auto", gap: 2, children: [
|
|
40
41
|
/* @__PURE__ */ jsxRuntime.jsx(Icon$1, { "aria-hidden": "true", prominence: sentiment === "neutral" ? "strong" : void 0, sentiment, size: "large" }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentProps, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Button } from '../Button';
|
|
3
3
|
import type { AlertSentiment } from './type';
|
|
4
4
|
type AlertProps = {
|
|
@@ -18,9 +18,10 @@ type AlertProps = {
|
|
|
18
18
|
* Disabled the alert button.
|
|
19
19
|
*/
|
|
20
20
|
disabled?: boolean;
|
|
21
|
+
style?: CSSProperties;
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
24
|
* Alert component is used to display a short, important message in a way that attracts the user's attention without interrupting the user's task.
|
|
24
25
|
*/
|
|
25
|
-
export declare const Alert: ({ children, title, sentiment, buttonText, onClickButton, closable, onClose, className, disabled, "data-testid": dataTestId, }: AlertProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare const Alert: ({ children, title, sentiment, buttonText, onClickButton, closable, onClose, className, disabled, "data-testid": dataTestId, style, }: AlertProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
26
27
|
export {};
|
|
@@ -23,7 +23,8 @@ const Alert = ({
|
|
|
23
23
|
onClose,
|
|
24
24
|
className,
|
|
25
25
|
disabled,
|
|
26
|
-
"data-testid": dataTestId
|
|
26
|
+
"data-testid": dataTestId,
|
|
27
|
+
style
|
|
27
28
|
}) => {
|
|
28
29
|
const [opened, setOpened] = useState(true);
|
|
29
30
|
const Icon = sentimentIcons[sentiment];
|
|
@@ -32,7 +33,7 @@ const Alert = ({
|
|
|
32
33
|
}
|
|
33
34
|
return /* @__PURE__ */ jsxs(Stack, { className: `${className ? `${className} ` : ""}${alert({
|
|
34
35
|
sentiment
|
|
35
|
-
})}`, "data-testid": dataTestId, direction: "row", gap: 1, children: [
|
|
36
|
+
})}`, "data-testid": dataTestId, direction: "row", gap: 1, style, children: [
|
|
36
37
|
/* @__PURE__ */ jsxs(Stack, { alignItems: "center", className: wrapAlert, direction: "row", gap: 2, justifyContent: "space-between", wrap: true, children: [
|
|
37
38
|
/* @__PURE__ */ jsxs(Stack, { alignItems: "start", direction: "row", flex: "1 1 auto", gap: 2, children: [
|
|
38
39
|
/* @__PURE__ */ jsx(Icon, { "aria-hidden": "true", prominence: sentiment === "neutral" ? "strong" : void 0, sentiment, size: "large" }),
|
|
@@ -22,7 +22,8 @@ const Avatar = ({
|
|
|
22
22
|
onClick,
|
|
23
23
|
className,
|
|
24
24
|
children,
|
|
25
|
-
"data-testid": dataTestId
|
|
25
|
+
"data-testid": dataTestId,
|
|
26
|
+
style
|
|
26
27
|
}) => {
|
|
27
28
|
const isHalved = colors.length > 1;
|
|
28
29
|
const finalColors = colors?.map((bgColor) => themes.theme.colors[bgColor]?.backgroundStrong ?? bgColor);
|
|
@@ -33,7 +34,8 @@ const Avatar = ({
|
|
|
33
34
|
size
|
|
34
35
|
})}`, "data-has-background": !["user", "image"].includes(variant), "data-testid": dataTestId, onClick, onKeyDown: (event) => event.key === " " || event.key === "Enter" ? onClick?.() : null, role: onClick ? "button" : void 0, style: {
|
|
35
36
|
backgroundImage: image ? `url(${image})` : void 0,
|
|
36
|
-
backgroundSize: image ? "cover" : void 0
|
|
37
|
+
backgroundSize: image ? "cover" : void 0,
|
|
38
|
+
...style
|
|
37
39
|
}, children: [
|
|
38
40
|
upload ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.uploadContainer({
|
|
39
41
|
shape,
|
|
@@ -2,4 +2,4 @@ import type { AvatarProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* The Avatar component is used to represent a user, product, or entity. It can be used to display an image, an icon, a text or a set of colors.
|
|
4
4
|
*/
|
|
5
|
-
export declare const Avatar: ({ shape, variant, image, text, size, sentiment, colors, upload, onClick, className, children, "data-testid": dataTestId, }: AvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Avatar: ({ shape, variant, image, text, size, sentiment, colors, upload, onClick, className, children, "data-testid": dataTestId, style, }: AvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -20,7 +20,8 @@ const Avatar = ({
|
|
|
20
20
|
onClick,
|
|
21
21
|
className,
|
|
22
22
|
children,
|
|
23
|
-
"data-testid": dataTestId
|
|
23
|
+
"data-testid": dataTestId,
|
|
24
|
+
style
|
|
24
25
|
}) => {
|
|
25
26
|
const isHalved = colors.length > 1;
|
|
26
27
|
const finalColors = colors?.map((bgColor) => theme.colors[bgColor]?.backgroundStrong ?? bgColor);
|
|
@@ -31,7 +32,8 @@ const Avatar = ({
|
|
|
31
32
|
size
|
|
32
33
|
})}`, "data-has-background": !["user", "image"].includes(variant), "data-testid": dataTestId, onClick, onKeyDown: (event) => event.key === " " || event.key === "Enter" ? onClick?.() : null, role: onClick ? "button" : void 0, style: {
|
|
33
34
|
backgroundImage: image ? `url(${image})` : void 0,
|
|
34
|
-
backgroundSize: image ? "cover" : void 0
|
|
35
|
+
backgroundSize: image ? "cover" : void 0,
|
|
36
|
+
...style
|
|
35
37
|
}, children: [
|
|
36
38
|
upload ? /* @__PURE__ */ jsx("div", { className: uploadContainer({
|
|
37
39
|
shape,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MouseEvent, ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import type { SENTIMENTS, sizes } from './constants';
|
|
3
3
|
export type Colors = [] | [string] | [string, string] | readonly [string, string] | readonly [string] | readonly [];
|
|
4
4
|
export type SentimentColors = 'primary' | 'neutral' | 'success' | 'danger' | 'warning' | 'info';
|
|
@@ -10,6 +10,7 @@ type CommonProps = {
|
|
|
10
10
|
onClick?: (event?: MouseEvent<HTMLDivElement>) => void;
|
|
11
11
|
className?: string;
|
|
12
12
|
'data-testid'?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
13
14
|
};
|
|
14
15
|
type VariantUser = {
|
|
15
16
|
variant: 'user';
|
|
@@ -13,7 +13,8 @@ const Badge = ({
|
|
|
13
13
|
disabled = false,
|
|
14
14
|
className,
|
|
15
15
|
children,
|
|
16
|
-
"data-testid": dataTestId
|
|
16
|
+
"data-testid": dataTestId,
|
|
17
|
+
style
|
|
17
18
|
}) => {
|
|
18
19
|
const ariaLabel = react.useMemo(() => ["neutral", "primary"].some((baseSentiment) => baseSentiment === sentiment) ? void 0 : sentiment, [sentiment]);
|
|
19
20
|
return /* @__PURE__ */ jsxRuntime.jsx(index.Text, { "aria-label": ariaLabel, as: "span", className: `${className ? `${className} ` : ""}${styles_css.badge({
|
|
@@ -21,6 +22,6 @@ const Badge = ({
|
|
|
21
22
|
prominence,
|
|
22
23
|
sentiment,
|
|
23
24
|
size
|
|
24
|
-
})}`, "data-testid": dataTestId, prominence: disabled ? "weak" : "default", variant: constant.TEXT_VARIANT[size], whiteSpace: "nowrap", children });
|
|
25
|
+
})}`, "data-testid": dataTestId, prominence: disabled ? "weak" : "default", style, variant: constant.TEXT_VARIANT[size], whiteSpace: "nowrap", children });
|
|
25
26
|
};
|
|
26
27
|
exports.Badge = Badge;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { BadgeVariants } from './styles.css';
|
|
3
3
|
type BadgeProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
'data-testid'?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
7
8
|
} & BadgeVariants;
|
|
8
9
|
/**
|
|
9
10
|
* Badge component is used to display a status or a label in a small container.
|
|
10
11
|
*/
|
|
11
|
-
export declare const Badge: ({ sentiment, size, prominence, disabled, className, children, "data-testid": dataTestId, }: BadgeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Badge: ({ sentiment, size, prominence, disabled, className, children, "data-testid": dataTestId, style, }: BadgeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -11,7 +11,8 @@ const Badge = ({
|
|
|
11
11
|
disabled = false,
|
|
12
12
|
className,
|
|
13
13
|
children,
|
|
14
|
-
"data-testid": dataTestId
|
|
14
|
+
"data-testid": dataTestId,
|
|
15
|
+
style
|
|
15
16
|
}) => {
|
|
16
17
|
const ariaLabel = useMemo(() => ["neutral", "primary"].some((baseSentiment) => baseSentiment === sentiment) ? void 0 : sentiment, [sentiment]);
|
|
17
18
|
return /* @__PURE__ */ jsx(Text, { "aria-label": ariaLabel, as: "span", className: `${className ? `${className} ` : ""}${badge({
|
|
@@ -19,7 +20,7 @@ const Badge = ({
|
|
|
19
20
|
prominence,
|
|
20
21
|
sentiment,
|
|
21
22
|
size
|
|
22
|
-
})}`, "data-testid": dataTestId, prominence: disabled ? "weak" : "default", variant: TEXT_VARIANT[size], whiteSpace: "nowrap", children });
|
|
23
|
+
})}`, "data-testid": dataTestId, prominence: disabled ? "weak" : "default", style, variant: TEXT_VARIANT[size], whiteSpace: "nowrap", children });
|
|
23
24
|
};
|
|
24
25
|
export {
|
|
25
26
|
Badge
|
|
@@ -26,7 +26,8 @@ const Banner = ({
|
|
|
26
26
|
image,
|
|
27
27
|
className,
|
|
28
28
|
closable = true,
|
|
29
|
-
"data-testid": dataTestId
|
|
29
|
+
"data-testid": dataTestId,
|
|
30
|
+
style
|
|
30
31
|
}) => {
|
|
31
32
|
const {
|
|
32
33
|
theme
|
|
@@ -48,7 +49,7 @@ const Banner = ({
|
|
|
48
49
|
return /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { className: `${className ? `${className} ` : ""}${styles_css.banner({
|
|
49
50
|
size,
|
|
50
51
|
variant
|
|
51
|
-
})}`, "data-testid": dataTestId, direction: "row", gap: 2, justifyContent: "space-between", children: [
|
|
52
|
+
})}`, "data-testid": dataTestId, direction: "row", gap: 2, justifyContent: "space-between", style, children: [
|
|
52
53
|
image ? /* @__PURE__ */ jsxRuntime.jsx(index.Stack, { className: styles_css.imageStackBanner[size], justifyContent: "center", children: typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx("img", { alt: "", src: image }) : image }) : /* @__PURE__ */ jsxRuntime.jsx(index.Stack, { className: styles_css.imageStackBanner[size], justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx("img", { alt: "", src: defaultImage$1 }) }),
|
|
53
54
|
/* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { alignItems: direction === "column" ? "start" : "center", direction, gap: 2, justifyContent: "space-between", style: {
|
|
54
55
|
flex: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentProps, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Button } from '../Button';
|
|
3
3
|
import type { BannerVariants } from './styles.css';
|
|
4
4
|
type BannerProps = {
|
|
@@ -18,9 +18,10 @@ type BannerProps = {
|
|
|
18
18
|
closable?: boolean;
|
|
19
19
|
className?: string;
|
|
20
20
|
'data-testid'?: string;
|
|
21
|
+
style?: CSSProperties;
|
|
21
22
|
} & BannerVariants;
|
|
22
23
|
/**
|
|
23
24
|
* Banner component is used to display an informative message to the user with style.
|
|
24
25
|
*/
|
|
25
|
-
export declare const Banner: ({ variant, size, title, children, direction, onClose, buttonText, onClickButton, linkText, linkHref, image, className, closable, "data-testid": dataTestId, }: BannerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare const Banner: ({ variant, size, title, children, direction, onClose, buttonText, onClickButton, linkText, linkHref, image, className, closable, "data-testid": dataTestId, style, }: BannerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
26
27
|
export {};
|
|
@@ -24,7 +24,8 @@ const Banner = ({
|
|
|
24
24
|
image,
|
|
25
25
|
className,
|
|
26
26
|
closable = true,
|
|
27
|
-
"data-testid": dataTestId
|
|
27
|
+
"data-testid": dataTestId,
|
|
28
|
+
style
|
|
28
29
|
}) => {
|
|
29
30
|
const {
|
|
30
31
|
theme
|
|
@@ -46,7 +47,7 @@ const Banner = ({
|
|
|
46
47
|
return /* @__PURE__ */ jsxs(Stack, { className: `${className ? `${className} ` : ""}${banner({
|
|
47
48
|
size,
|
|
48
49
|
variant
|
|
49
|
-
})}`, "data-testid": dataTestId, direction: "row", gap: 2, justifyContent: "space-between", children: [
|
|
50
|
+
})}`, "data-testid": dataTestId, direction: "row", gap: 2, justifyContent: "space-between", style, children: [
|
|
50
51
|
image ? /* @__PURE__ */ jsx(Stack, { className: imageStackBanner[size], justifyContent: "center", children: typeof image === "string" ? /* @__PURE__ */ jsx("img", { alt: "", src: image }) : image }) : /* @__PURE__ */ jsx(Stack, { className: imageStackBanner[size], justifyContent: "center", children: /* @__PURE__ */ jsx("img", { alt: "", src: defaultImage }) }),
|
|
51
52
|
/* @__PURE__ */ jsxs(Stack, { alignItems: direction === "column" ? "start" : "center", direction, gap: 2, justifyContent: "space-between", style: {
|
|
52
53
|
flex: 1
|
|
@@ -28,7 +28,8 @@ const BarChart = ({
|
|
|
28
28
|
tooltipFunction,
|
|
29
29
|
chartProps,
|
|
30
30
|
className,
|
|
31
|
-
"data-testid": dataTestId
|
|
31
|
+
"data-testid": dataTestId,
|
|
32
|
+
style
|
|
32
33
|
}) => {
|
|
33
34
|
const theme = themes.useTheme();
|
|
34
35
|
const tooltip = react.useCallback((props) => {
|
|
@@ -40,7 +41,8 @@ const BarChart = ({
|
|
|
40
41
|
return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { color, formattedValue, indexValue: indexValue.toString() });
|
|
41
42
|
}, [tooltipFunction]);
|
|
42
43
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "data-testid": dataTestId, style: {
|
|
43
|
-
height
|
|
44
|
+
height,
|
|
45
|
+
...style
|
|
44
46
|
}, children: /* @__PURE__ */ jsxRuntime.jsx(bar.ResponsiveBar, { axisBottom: {
|
|
45
47
|
format: axisFormatters?.bottom,
|
|
46
48
|
tickPadding: 5,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BarDatum, BarSvgProps, BarTooltipProps } from '@nivo/bar';
|
|
2
2
|
import { ResponsiveBar } from '@nivo/bar';
|
|
3
3
|
import type { Box, DatumValue, ValueFormat } from '@nivo/core';
|
|
4
|
-
import type { ComponentProps } from 'react';
|
|
4
|
+
import type { ComponentProps, CSSProperties } from 'react';
|
|
5
5
|
import BarChartTooltip from './Tooltip';
|
|
6
6
|
type Formatter = ValueFormat<DatumValue>;
|
|
7
7
|
type TickSpec = NonNullable<ComponentProps<typeof ResponsiveBar>['axisBottom']>['tickValues'];
|
|
@@ -17,11 +17,12 @@ type BarChartProps = {
|
|
|
17
17
|
tooltipFunction?: (props: BarTooltipProps<BarDatum>) => ComponentProps<typeof BarChartTooltip>;
|
|
18
18
|
chartProps?: Partial<BarSvgProps<BarDatum>>;
|
|
19
19
|
'data-testid'?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
23
|
* BarChart component is used to display data in a bar chart format. It uses the Nivo library under the hood.
|
|
23
24
|
* See https://nivo.rocks/bar/ for more information.
|
|
24
25
|
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
25
26
|
*/
|
|
26
|
-
export declare const BarChart: ({ height, margin, data, axisFormatters, tickValues, keys, tooltipFunction, chartProps, className, "data-testid": dataTestId, }: BarChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const BarChart: ({ height, margin, data, axisFormatters, tickValues, keys, tooltipFunction, chartProps, className, "data-testid": dataTestId, style, }: BarChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -26,7 +26,8 @@ const BarChart = ({
|
|
|
26
26
|
tooltipFunction,
|
|
27
27
|
chartProps,
|
|
28
28
|
className,
|
|
29
|
-
"data-testid": dataTestId
|
|
29
|
+
"data-testid": dataTestId,
|
|
30
|
+
style
|
|
30
31
|
}) => {
|
|
31
32
|
const theme = useTheme();
|
|
32
33
|
const tooltip = useCallback((props) => {
|
|
@@ -38,7 +39,8 @@ const BarChart = ({
|
|
|
38
39
|
return /* @__PURE__ */ jsx(BarChartToolTip, { color, formattedValue, indexValue: indexValue.toString() });
|
|
39
40
|
}, [tooltipFunction]);
|
|
40
41
|
return /* @__PURE__ */ jsx("div", { className, "data-testid": dataTestId, style: {
|
|
41
|
-
height
|
|
42
|
+
height,
|
|
43
|
+
...style
|
|
42
44
|
}, children: /* @__PURE__ */ jsx(ResponsiveBar, { axisBottom: {
|
|
43
45
|
format: axisFormatters?.bottom,
|
|
44
46
|
tickPadding: 5,
|
|
@@ -10,12 +10,13 @@ const BarStack = ({
|
|
|
10
10
|
data,
|
|
11
11
|
total,
|
|
12
12
|
className,
|
|
13
|
-
"data-testid": dataTestId
|
|
13
|
+
"data-testid": dataTestId,
|
|
14
|
+
style
|
|
14
15
|
}) => {
|
|
15
16
|
const computedTotal = react.useMemo(() => total ?? data.reduce((acc, {
|
|
16
17
|
value
|
|
17
18
|
}) => acc + value, 0), [total, data]);
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.containerBarStack}`, "data-testid": dataTestId, children: data.map(({
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.containerBarStack}`, "data-testid": dataTestId, style, children: data.map(({
|
|
19
20
|
id,
|
|
20
21
|
value,
|
|
21
22
|
text,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
type BarProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Unique id of the bar
|
|
@@ -29,9 +29,10 @@ type BarStackProps = {
|
|
|
29
29
|
total?: number;
|
|
30
30
|
className?: string;
|
|
31
31
|
'data-testid'?: string;
|
|
32
|
+
style?: CSSProperties;
|
|
32
33
|
};
|
|
33
34
|
/**
|
|
34
35
|
* BarStack is a graphic component that is used to show data in one dimension.
|
|
35
36
|
*/
|
|
36
|
-
export declare const BarStack: ({ data, total, className, "data-testid": dataTestId, }: BarStackProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const BarStack: ({ data, total, className, "data-testid": dataTestId, style, }: BarStackProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
37
38
|
export {};
|
|
@@ -8,12 +8,13 @@ const BarStack = ({
|
|
|
8
8
|
data,
|
|
9
9
|
total,
|
|
10
10
|
className,
|
|
11
|
-
"data-testid": dataTestId
|
|
11
|
+
"data-testid": dataTestId,
|
|
12
|
+
style
|
|
12
13
|
}) => {
|
|
13
14
|
const computedTotal = useMemo(() => total ?? data.reduce((acc, {
|
|
14
15
|
value
|
|
15
16
|
}) => acc + value, 0), [total, data]);
|
|
16
|
-
return /* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${containerBarStack}`, "data-testid": dataTestId, children: data.map(({
|
|
17
|
+
return /* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${containerBarStack}`, "data-testid": dataTestId, style, children: data.map(({
|
|
17
18
|
id,
|
|
18
19
|
value,
|
|
19
20
|
text,
|
|
@@ -7,7 +7,8 @@ const styles_css = require("./styles.css.cjs");
|
|
|
7
7
|
const Breadcrumbs = ({
|
|
8
8
|
children,
|
|
9
9
|
className,
|
|
10
|
-
"data-testid": dataTestId
|
|
11
|
-
|
|
10
|
+
"data-testid": dataTestId,
|
|
11
|
+
style
|
|
12
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", className, "data-testid": dataTestId, style, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: styles_css.breadcrumbs, children }) });
|
|
12
13
|
Breadcrumbs.Item = Item.Item;
|
|
13
14
|
exports.Breadcrumbs = Breadcrumbs;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { JSX, ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, JSX, ReactNode } from 'react';
|
|
2
2
|
import { Item } from './components/Item';
|
|
3
3
|
type BreadcrumbsProps = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
'data-testid'?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
7
8
|
};
|
|
8
9
|
type BreadcrumbsType = ((props: BreadcrumbsProps) => JSX.Element) & {
|
|
9
10
|
Item: typeof Item;
|
|
@@ -5,8 +5,9 @@ import { breadcrumbs } from "./styles.css.js";
|
|
|
5
5
|
const Breadcrumbs = ({
|
|
6
6
|
children,
|
|
7
7
|
className,
|
|
8
|
-
"data-testid": dataTestId
|
|
9
|
-
|
|
8
|
+
"data-testid": dataTestId,
|
|
9
|
+
style
|
|
10
|
+
}) => /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", className, "data-testid": dataTestId, style, children: /* @__PURE__ */ jsx("ol", { className: breadcrumbs, children }) });
|
|
10
11
|
Breadcrumbs.Item = Item;
|
|
11
12
|
export {
|
|
12
13
|
Breadcrumbs
|
|
@@ -13,11 +13,12 @@ const Bullet = ({
|
|
|
13
13
|
"data-testid": dataTestId,
|
|
14
14
|
prominence = "default",
|
|
15
15
|
children,
|
|
16
|
-
disabled
|
|
16
|
+
disabled,
|
|
17
|
+
style
|
|
17
18
|
}) => /* @__PURE__ */ jsxRuntime.jsx(index.Tooltip, { id: tooltipBaseId, text: tooltip, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.bullet({
|
|
18
19
|
disabled,
|
|
19
20
|
prominence,
|
|
20
21
|
sentiment,
|
|
21
22
|
size
|
|
22
|
-
})}`, "data-testid": dataTestId, children }) });
|
|
23
|
+
})}`, "data-testid": dataTestId, style, children }) });
|
|
23
24
|
exports.Bullet = Bullet;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { SENTIMENTS } from '../../theme';
|
|
3
3
|
import type { PROMINENCES, SIZES } from './constants';
|
|
4
4
|
type ProminenceType = keyof typeof PROMINENCES;
|
|
@@ -12,9 +12,10 @@ type BulletProps = {
|
|
|
12
12
|
prominence?: ProminenceType;
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
style?: CSSProperties;
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* Bullet component is used to display a small icon or text with a colored background in a circle.
|
|
18
19
|
*/
|
|
19
|
-
export declare const Bullet: ({ className, sentiment, size, tooltip, tooltipBaseId, "data-testid": dataTestId, prominence, children, disabled, }: BulletProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const Bullet: ({ className, sentiment, size, tooltip, tooltipBaseId, "data-testid": dataTestId, prominence, children, disabled, style, }: BulletProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -11,13 +11,14 @@ const Bullet = ({
|
|
|
11
11
|
"data-testid": dataTestId,
|
|
12
12
|
prominence = "default",
|
|
13
13
|
children,
|
|
14
|
-
disabled
|
|
14
|
+
disabled,
|
|
15
|
+
style
|
|
15
16
|
}) => /* @__PURE__ */ jsx(Tooltip, { id: tooltipBaseId, text: tooltip, children: /* @__PURE__ */ jsx("div", { className: `${className ? `${className} ` : ""}${bullet({
|
|
16
17
|
disabled,
|
|
17
18
|
prominence,
|
|
18
19
|
sentiment,
|
|
19
20
|
size
|
|
20
|
-
})}`, "data-testid": dataTestId, children }) });
|
|
21
|
+
})}`, "data-testid": dataTestId, style, children }) });
|
|
21
22
|
export {
|
|
22
23
|
Bullet
|
|
23
24
|
};
|
|
@@ -71,7 +71,7 @@ const Button = react.forwardRef(({
|
|
|
71
71
|
sentiment,
|
|
72
72
|
size,
|
|
73
73
|
variant
|
|
74
|
-
})}`, "data-testid": dataTestId, download, href, onBlur, onClick, onMouseDown, onMouseEnter, onMouseLeave, onMouseOut, onMouseUp, ref, role, tabIndex, target, type, children: content }) });
|
|
74
|
+
})}`, "data-testid": dataTestId, download, href, onBlur, onClick, onMouseDown, onMouseEnter, onMouseLeave, onMouseOut, onMouseUp, ref, role, style, tabIndex, target, type, children: content }) });
|
|
75
75
|
}
|
|
76
76
|
return /* @__PURE__ */ jsxRuntime.jsx(index.Tooltip, { containerFullWidth: fullWidth, text: tooltip, children: /* @__PURE__ */ jsxRuntime.jsx("button", { "aria-controls": ariaControls, "aria-current": ariaCurrent, "aria-expanded": ariaExpanded, "aria-haspopup": ariaHaspopup, "aria-label": ariaLabel, autoFocus, className: `${className ? `${className} ` : ""}${styles_css.button({
|
|
77
77
|
disabled,
|
|
@@ -69,7 +69,7 @@ const Button = forwardRef(({
|
|
|
69
69
|
sentiment,
|
|
70
70
|
size,
|
|
71
71
|
variant
|
|
72
|
-
})}`, "data-testid": dataTestId, download, href, onBlur, onClick, onMouseDown, onMouseEnter, onMouseLeave, onMouseOut, onMouseUp, ref, role, tabIndex, target, type, children: content }) });
|
|
72
|
+
})}`, "data-testid": dataTestId, download, href, onBlur, onClick, onMouseDown, onMouseEnter, onMouseLeave, onMouseOut, onMouseUp, ref, role, style, tabIndex, target, type, children: content }) });
|
|
73
73
|
}
|
|
74
74
|
return /* @__PURE__ */ jsx(Tooltip, { containerFullWidth: fullWidth, text: tooltip, children: /* @__PURE__ */ jsx("button", { "aria-controls": ariaControls, "aria-current": ariaCurrent, "aria-expanded": ariaExpanded, "aria-haspopup": ariaHaspopup, "aria-label": ariaLabel, autoFocus, className: `${className ? `${className} ` : ""}${button({
|
|
75
75
|
disabled,
|
|
@@ -13,14 +13,15 @@ const Card = react.forwardRef(({
|
|
|
13
13
|
active = false,
|
|
14
14
|
children,
|
|
15
15
|
className,
|
|
16
|
-
"data-testid": dataTestId
|
|
17
|
-
|
|
16
|
+
"data-testid": dataTestId,
|
|
17
|
+
style
|
|
18
|
+
}, ref) => header ? /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { className: `${className ? `${className} ` : ""}${styles_css.stackCard}`, "data-disabled": disabled, "data-testid": dataTestId, gap: 1, ref, style, children: [
|
|
18
19
|
typeof header === "string" ? /* @__PURE__ */ jsxRuntime.jsx(index$1.Text, { as: "h2", disabled, prominence: "strong", sentiment: "neutral", variant: "heading", children: header }) : header,
|
|
19
20
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_css.borderedBox, "data-disabled": disabled, "data-is-active": active, children: subHeader ? /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { gap: 2, children: [
|
|
20
21
|
typeof subHeader === "string" ? /* @__PURE__ */ jsxRuntime.jsx(index$1.Text, { as: "h3", disabled, sentiment: "neutral", variant: "headingSmallStrong", children: subHeader }) : subHeader,
|
|
21
22
|
children
|
|
22
23
|
] }) : children })
|
|
23
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.borderedBox}`, "data-disabled": disabled, "data-is-active": active, "data-testid": dataTestId, ref, children: subHeader ? /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { gap: 2, children: [
|
|
24
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className ? `${className} ` : ""}${styles_css.borderedBox}`, "data-disabled": disabled, "data-is-active": active, "data-testid": dataTestId, ref, style, children: subHeader ? /* @__PURE__ */ jsxRuntime.jsxs(index.Stack, { gap: 2, children: [
|
|
24
25
|
typeof subHeader === "string" ? /* @__PURE__ */ jsxRuntime.jsx(index$1.Text, { as: "h3", disabled, sentiment: "neutral", variant: "headingSmallStrong", children: subHeader }) : subHeader,
|
|
25
26
|
children
|
|
26
27
|
] }) : children }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
type CardProps = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
/**
|
|
@@ -13,6 +13,7 @@ type CardProps = {
|
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
'data-testid'?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* Card component is a simple component to display content in a box with a border.
|