aristid-ds 0.10.0 → 0.12.0
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/CHANGELOG.md +35 -0
- package/dist/Kit/App/index.d.ts +2 -2
- package/dist/Kit/DataDisplay/Avatar/Avatar.js +3 -3
- package/dist/Kit/DataDisplay/Avatar/AvatarGroup.js +6 -6
- package/dist/Kit/DataDisplay/Badge/index.js +23 -14
- package/dist/Kit/DataDisplay/Card/index.js +31 -31
- package/dist/Kit/DataDisplay/Collapse/Collapse.js +17 -18
- package/dist/Kit/DataDisplay/Collapse/Header.js +14 -14
- package/dist/Kit/DataDisplay/Collapse/HeaderExtra.js +17 -18
- package/dist/Kit/DataDisplay/Image/index.js +20 -20
- package/dist/Kit/DataDisplay/ItemCard/ColorBar.js +15 -21
- package/dist/Kit/DataDisplay/ItemCard/index.js +39 -45
- package/dist/Kit/DataDisplay/ItemList/index.js +36 -262
- package/dist/Kit/DataDisplay/ItemList/style.d.ts +3 -0
- package/dist/Kit/DataDisplay/ItemList/style.js +236 -0
- package/dist/Kit/DataDisplay/ItemList/types.d.ts +2 -1
- package/dist/Kit/DataDisplay/LegacyCard/index.js +54 -65
- package/dist/Kit/DataDisplay/Tabs/index.js +30 -47
- package/dist/Kit/DataDisplay/Tag/Group.js +4 -4
- package/dist/Kit/DataDisplay/Tag/Tag.d.ts +1 -2
- package/dist/Kit/DataDisplay/Tag/Tag.js +17 -13
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tour/style.js +7 -6
- package/dist/Kit/DataEntry/AutoComplete/index.js +3 -3
- package/dist/Kit/DataEntry/Checkbox/Checkbox.js +25 -24
- package/dist/Kit/DataEntry/Checkbox/Group.js +26 -25
- package/dist/Kit/DataEntry/Checkbox/index.d.ts +2 -3
- package/dist/Kit/DataEntry/Checkbox/types.d.ts +5 -0
- package/dist/Kit/DataEntry/ColorPicker/index.js +7 -7
- package/dist/Kit/DataEntry/ColorPicker/style.js +11 -12
- package/dist/Kit/DataEntry/DatePicker/DatePicker.js +13 -14
- package/dist/Kit/DataEntry/DatePicker/RangePicker.js +12 -13
- package/dist/Kit/DataEntry/DatePicker/style.js +8 -9
- package/dist/Kit/DataEntry/Input/Input.js +17 -18
- package/dist/Kit/DataEntry/Input/Password.js +11 -15
- package/dist/Kit/DataEntry/Input/TextArea.js +14 -18
- package/dist/Kit/DataEntry/Input/types.d.ts +0 -8
- package/dist/Kit/DataEntry/InputNumber/index.js +18 -17
- package/dist/Kit/DataEntry/InputWrapper/InputWrapper.js +102 -0
- package/dist/Kit/DataEntry/InputWrapper/index.d.ts +1 -0
- package/dist/Kit/DataEntry/InputWrapper/types.d.ts +10 -0
- package/dist/Kit/DataEntry/Radio/Group.d.ts +2 -2
- package/dist/Kit/DataEntry/Radio/Group.js +21 -20
- package/dist/Kit/DataEntry/Radio/Radio.js +18 -16
- package/dist/Kit/DataEntry/Radio/index.d.ts +2 -2
- package/dist/Kit/DataEntry/Radio/types.d.ts +6 -1
- package/dist/Kit/DataEntry/Rate/index.js +4 -4
- package/dist/Kit/DataEntry/Select/index.js +38 -41
- package/dist/Kit/DataEntry/Select/style.js +193 -181
- package/dist/Kit/DataEntry/Select/types.d.ts +3 -5
- package/dist/Kit/DataEntry/Slider/index.js +10 -10
- package/dist/Kit/DataEntry/Switch/index.js +3 -3
- package/dist/Kit/DataEntry/Upload/Dragger.js +19 -20
- package/dist/Kit/DataEntry/Upload/Upload.js +3 -3
- package/dist/Kit/DataEntry/index.d.ts +1 -0
- package/dist/Kit/Feedback/Alert/index.js +35 -38
- package/dist/Kit/Feedback/Modal/ConfirmDialog.js +12 -12
- package/dist/Kit/Feedback/Modal/Modal.js +45 -39
- package/dist/Kit/Feedback/Modal/confirm.js +1 -1
- package/dist/Kit/Feedback/Modal/types.d.ts +1 -0
- package/dist/Kit/Feedback/Notification/KitNotification.d.ts +3 -0
- package/dist/Kit/Feedback/Notification/KitNotification.js +188 -0
- package/dist/Kit/Feedback/Notification/index.d.ts +1 -0
- package/dist/Kit/Feedback/Notification/notification-provider.js +26 -27
- package/dist/Kit/Feedback/Notification/style.d.ts +16 -0
- package/dist/Kit/Feedback/Notification/style.js +16 -11
- package/dist/Kit/Feedback/Notification/types.d.ts +1 -0
- package/dist/Kit/Feedback/Progress/index.js +15 -16
- package/dist/Kit/Feedback/SnackBar/SnackBar.js +13 -14
- package/dist/Kit/Feedback/index.d.ts +1 -1
- package/dist/Kit/General/Button/index.js +42 -41
- package/dist/Kit/General/Icon/index.js +19 -18
- package/dist/Kit/General/Typography/Link.js +11 -10
- package/dist/Kit/General/Typography/Paragraph.js +9 -8
- package/dist/Kit/General/Typography/Text.js +15 -14
- package/dist/Kit/General/Typography/commons.js +2 -2
- package/dist/Kit/General/Typography/style.js +17 -16
- package/dist/Kit/Layout/Divider/index.js +16 -15
- package/dist/Kit/Layout/Space/index.js +8 -8
- package/dist/Kit/Navigation/Breadcrumb/index.js +9 -9
- package/dist/Kit/Navigation/DropDown/style.js +4 -8
- package/dist/Kit/Navigation/Header/index.js +9 -9
- package/dist/Kit/Navigation/Menu/ItemMenu.js +22 -22
- package/dist/Kit/Navigation/Menu/Menu.js +5 -5
- package/dist/Kit/Navigation/Pagination/index.js +6 -7
- package/dist/Kit/index.d.ts +1 -1
- package/dist/index.es.js +95 -93
- package/dist/index.umd.js +1808 -1626
- package/dist/theme/aristid/components/DataDisplay/Avatar/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Badge/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Card/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Collapse/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Image/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/ItemCard/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/ItemList/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/LegacyCard/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tabs/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tag/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tooltip/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataDisplay/Tree/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Checkbox/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/ColorPicker/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/DatePicker/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Input/index.d.ts +1 -2
- package/dist/theme/aristid/components/DataEntry/Input/index.js +3 -4
- package/dist/theme/aristid/components/DataEntry/InputNumber/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/InputWrapper/index.d.ts +2 -0
- package/dist/theme/aristid/components/DataEntry/InputWrapper/index.js +5 -0
- package/dist/theme/aristid/components/DataEntry/Radio/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Rate/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Select/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Slider/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Switch/index.d.ts +1 -1
- package/dist/theme/aristid/components/DataEntry/Upload/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Alert/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Modal/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Notification/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/Notification/index.js +2 -2
- package/dist/theme/aristid/components/Feedback/Progress/index.d.ts +1 -1
- package/dist/theme/aristid/components/Feedback/SnackBar/index.d.ts +1 -1
- package/dist/theme/aristid/components/General/Button/index.d.ts +1 -1
- package/dist/theme/aristid/components/General/Icon/index.d.ts +1 -1
- package/dist/theme/aristid/components/General/Typography/index.d.ts +1 -1
- package/dist/theme/aristid/components/Layout/Divider/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Breadcrumb/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/DropDown/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Header/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Menu/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Pagination/index.d.ts +1 -1
- package/dist/theme/aristid/components/Navigation/Steps/index.d.ts +1 -1
- package/dist/theme/aristid/general/border/index.d.ts +1 -1
- package/dist/theme/aristid/general/colors/index.d.ts +1 -1
- package/dist/theme/aristid/general/index.d.ts +1 -1
- package/dist/theme/aristid/general/spacing/index.d.ts +1 -1
- package/dist/theme/aristid/general/typography/index.d.ts +1 -1
- package/dist/theme/theme-context.js +21 -25
- package/dist/theme/types/components/DataEntry/Input/index.d.ts +0 -54
- package/dist/theme/types/components/DataEntry/InputWrapper/index.d.ts +95 -0
- package/dist/theme/types/components/Feedback/Notification/index.d.ts +1 -0
- package/dist/theme/types/index.d.ts +1 -1
- package/dist/theme/utils/convert.d.ts +1 -1
- package/dist/theme/utils/convert.js +2 -2
- package/dist/translation/en-US/components/DataDisplay/Collapse/index.d.ts +1 -1
- package/dist/translation/en-US/components/DataDisplay/Image/index.d.ts +1 -1
- package/dist/translation/en-US/general/index.d.ts +1 -1
- package/dist/translation/fr-FR/components/DataDisplay/Collapse/index.d.ts +1 -1
- package/dist/translation/fr-FR/components/DataDisplay/Image/index.d.ts +1 -1
- package/dist/translation/fr-FR/general/index.d.ts +1 -1
- package/dist/translation/utils/index.js +5 -5
- package/dist/utils/functions/index.d.ts +6 -0
- package/dist/utils/functions/index.js +26 -22
- package/package.json +1 -1
- package/dist/Kit/DataEntry/Input/InputWrapper.js +0 -26
- /package/dist/Kit/DataEntry/{Input → InputWrapper}/InputWrapper.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.0](https://www.npmjs.com/package/aristid-ds/v/0.12.0) (2024-02-02)
|
|
4
|
+
|
|
5
|
+
### ✨ Features
|
|
6
|
+
* **Modal:**
|
|
7
|
+
* Add `fullscreen`option (@evoiron)
|
|
8
|
+
|
|
9
|
+
* **⚠️ Breaking change - ItemList**
|
|
10
|
+
* Add `selected` props to display a colored border (@Delmotte-Vincent)
|
|
11
|
+
* Rename `onSelectChange` by `onSelect` (@Delmotte-Vincent)
|
|
12
|
+
|
|
13
|
+
### 🐛 Bug Fixes
|
|
14
|
+
* A build option was removed by error
|
|
15
|
+
* **Select**
|
|
16
|
+
* Remove unused props `suffixIcon` and adapt the documentation (@Delmotte-Vincent)
|
|
17
|
+
* Add focus state on select dropdown (@Delmotte-Vincent)
|
|
18
|
+
* Fix Ellipsed tag on select (@Delmotte-Vincent)
|
|
19
|
+
* **Storybook**
|
|
20
|
+
* fix a visual bug on storybook caused by an addon (@evoiron)
|
|
21
|
+
|
|
22
|
+
### 📚 Documentation
|
|
23
|
+
* New documentation page to list available design tokens (@evoiron)
|
|
24
|
+
* Display each design token corresponding css variable (@evoiron)
|
|
25
|
+
* Display package version number on the top right corner of Storybook (@philippechevieux)
|
|
26
|
+
|
|
27
|
+
## [0.11.0](https://www.npmjs.com/package/aristid-ds/v/0.11.0) (2024-01-24)
|
|
28
|
+
### ✨ Features
|
|
29
|
+
* **Notification:**
|
|
30
|
+
* Add `KitNotification` component usable without using `useKitNotification` hook (@evoiron)
|
|
31
|
+
|
|
32
|
+
### 🐛 Bug Fixes
|
|
33
|
+
|
|
34
|
+
* Fix warning at build time about potential cycling dependencies (@evoiron)
|
|
35
|
+
* Remove deprecated package `react-uuid` (@evoiron)
|
|
36
|
+
* Enable 3 Select options, to allow dynamic filtering of options (@evoiron)
|
|
37
|
+
|
|
3
38
|
## [0.10.0](https://www.npmjs.com/package/aristid-ds/v/0.10.0) (2024-01-19)
|
|
4
39
|
|
|
5
40
|
### ✨ Features
|
package/dist/Kit/App/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { IKitCustomTheme } from '
|
|
3
|
-
import { IKitLocale } from '
|
|
2
|
+
import { IKitCustomTheme } from '@theme/types';
|
|
3
|
+
import { IKitLocale } from '@translation/types';
|
|
4
4
|
export declare const KitApp: FunctionComponent<{
|
|
5
5
|
customTheme?: IKitCustomTheme;
|
|
6
6
|
locale?: IKitLocale;
|
|
@@ -16,9 +16,9 @@ const A = u(d)`
|
|
|
16
16
|
var(${l.neutral.typography.white})
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
`, h = (
|
|
20
|
-
var n = v().appId, i = p(() => ({ ...t, ...h(
|
|
21
|
-
return c.createElement(A, { style: i, className: n + " " + (
|
|
19
|
+
`, h = (r, o) => r && y(r) ? { [a.colors.background.default]: f(r, o), [a.colors.typography.default]: g(r) ? C(r, o) : k(r) } : null, s = ({ color: r, className: o, style: t, secondaryColorInvert: e = !1, ...m }) => {
|
|
20
|
+
var n = v().appId, i = p(() => ({ ...t, ...h(r, e) }), [r, e, t]);
|
|
21
|
+
return c.createElement(A, { style: i, className: n + " " + (o ?? ""), ...m });
|
|
22
22
|
}, w = (s.displayName = "KitAvatar", s);
|
|
23
23
|
export {
|
|
24
24
|
w as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "react";
|
|
2
2
|
import { Avatar as i } from "antd";
|
|
3
3
|
import { useKitTheme as m } from "../../../theme/useKitTheme.js";
|
|
4
4
|
import p, { css as u } from "styled-components";
|
|
5
5
|
import { kitAvatarGroupCssTokens as a } from "../../../theme/aristid/components/DataDisplay/Avatar/index.js";
|
|
6
6
|
import { kitColorsPaletteCssTokens as e } from "../../../theme/aristid/general/colors/index.js";
|
|
7
|
-
const
|
|
7
|
+
const n = p(i.Group)`
|
|
8
8
|
${({ $shouldOverrideLastAvatarStyle: r }) => r ? u`
|
|
9
9
|
&.ant-avatar-group > span:last-child {
|
|
10
10
|
background: var(
|
|
@@ -20,10 +20,10 @@ const v = p(i.Group)`
|
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
` : void 0}
|
|
23
|
-
`,
|
|
24
|
-
var
|
|
25
|
-
return
|
|
26
|
-
}, $ =
|
|
23
|
+
`, v = ({ className: r, maxCount: o, ...t }) => {
|
|
24
|
+
var l = m().appId;
|
|
25
|
+
return s.createElement(n, { ...t, maxCount: o, $shouldOverrideLastAvatarStyle: !!o, className: l + " " + (r ?? ""), maxStyle: { cursor: t.maxPopoverTrigger === "click" ? "pointer" : "initial" } });
|
|
26
|
+
}, $ = v;
|
|
27
27
|
export {
|
|
28
28
|
$ as default
|
|
29
29
|
};
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l, { useMemo as m } from "react";
|
|
2
2
|
import { Badge as d } from "antd";
|
|
3
|
-
import { styled as
|
|
4
|
-
import { useKitTheme as
|
|
5
|
-
import { isValidColor as
|
|
6
|
-
import { kitBadgeCssTokens as
|
|
7
|
-
|
|
3
|
+
import { styled as p } from "styled-components";
|
|
4
|
+
import { useKitTheme as g } from "../../../theme/useKitTheme.js";
|
|
5
|
+
import { isValidColor as c, getColor as u, getLighterColor as f } from "../../../utils/functions/index.js";
|
|
6
|
+
import { kitBadgeCssTokens as e } from "../../../theme/aristid/components/DataDisplay/Badge/index.js";
|
|
7
|
+
import { kitColorsPaletteCssTokens as n } from "../../../theme/aristid/general/colors/index.js";
|
|
8
|
+
import { typographyCssTokens as y } from "../../../theme/aristid/general/typography/index.js";
|
|
9
|
+
import { convertToPixel as h } from "../../../theme/utils/convert.js";
|
|
10
|
+
const C = p(d)`
|
|
8
11
|
height: 16px;
|
|
9
12
|
min-width: 16px;
|
|
10
13
|
line-height: 16px;
|
|
11
|
-
font-size:
|
|
14
|
+
font-size: ${h(y.fontSize7)};
|
|
12
15
|
|
|
13
16
|
.ant-badge-count {
|
|
14
|
-
background: var(
|
|
15
|
-
|
|
17
|
+
background: var(
|
|
18
|
+
${e.colors.background.default},
|
|
19
|
+
var(${n.secondary.red.red400})
|
|
20
|
+
);
|
|
21
|
+
color: var(
|
|
22
|
+
${e.colors.typography.default},
|
|
23
|
+
var(${n.neutral.typography.white})
|
|
24
|
+
);
|
|
16
25
|
}
|
|
17
26
|
|
|
18
27
|
&.ant-badge {
|
|
@@ -34,11 +43,11 @@ const y = g(d)`
|
|
|
34
43
|
}
|
|
35
44
|
}
|
|
36
45
|
}
|
|
37
|
-
`,
|
|
38
|
-
var
|
|
39
|
-
return
|
|
46
|
+
`, b = (o, t) => o && c(o) ? { [e.colors.background.default]: u(o, t), [e.colors.typography.default]: f(o, t) } : null, k = ({ color: o, style: t, secondaryColorInvert: r = !1, ...a }) => {
|
|
47
|
+
var i = g().appId, s = m(() => ({ ...t, ...b(o, r) }), [o, r, t]);
|
|
48
|
+
return l.createElement(C, { style: s, className: a.className + " " + i, ...a });
|
|
40
49
|
};
|
|
41
|
-
|
|
50
|
+
k.displayName = "KitBadge";
|
|
42
51
|
export {
|
|
43
|
-
|
|
52
|
+
k as KitBadge
|
|
44
53
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "react";
|
|
2
2
|
import { styled as G } from "styled-components";
|
|
3
3
|
import N from "classnames";
|
|
4
4
|
import { kitColorsPaletteCssTokens as t } from "../../../theme/aristid/general/colors/index.js";
|
|
5
5
|
import { typographyCssTokens as i } from "../../../theme/aristid/general/typography/index.js";
|
|
6
|
-
import { spacingCssTokens as
|
|
6
|
+
import { spacingCssTokens as h } from "../../../theme/aristid/general/spacing/index.js";
|
|
7
7
|
import { FontAwesomeIcon as T } from "@fortawesome/react-fontawesome";
|
|
8
8
|
import { faEllipsis as S } from "@fortawesome/free-solid-svg-icons";
|
|
9
|
-
import { kitCardCssTokens as
|
|
9
|
+
import { kitCardCssTokens as e } from "../../../theme/aristid/components/DataDisplay/Card/index.js";
|
|
10
10
|
import { useKitTheme as z } from "../../../theme/useKitTheme.js";
|
|
11
|
+
import { KitTag as K } from "../Tag/index.js";
|
|
11
12
|
import { convertToPixel as d } from "../../../theme/utils/convert.js";
|
|
12
|
-
import { KitCheckbox as
|
|
13
|
-
import { KitSwitch as
|
|
13
|
+
import { KitCheckbox as F } from "../../DataEntry/Checkbox/index.js";
|
|
14
|
+
import { KitSwitch as W } from "../../DataEntry/Switch/index.js";
|
|
14
15
|
import { KitButton as c } from "../../General/Button/index.js";
|
|
15
|
-
import { KitDropDown as
|
|
16
|
-
import { KitTag as B } from "../Tag/index.js";
|
|
16
|
+
import { KitDropDown as B } from "../../Navigation/DropDown/index.js";
|
|
17
17
|
import { KitTypography as n } from "../../General/Typography/index.js";
|
|
18
18
|
const I = G.div`
|
|
19
19
|
display: flex;
|
|
@@ -21,12 +21,12 @@ const I = G.div`
|
|
|
21
21
|
border-radius: 10px;
|
|
22
22
|
overflow: hidden;
|
|
23
23
|
background-color: var(
|
|
24
|
-
${
|
|
24
|
+
${e.colors.background.default},
|
|
25
25
|
var(${t.neutral.white})
|
|
26
26
|
);
|
|
27
27
|
border: 1px solid
|
|
28
28
|
var(
|
|
29
|
-
${
|
|
29
|
+
${e.colors.border.default},
|
|
30
30
|
var(${t.secondary.mediumGrey.mediumGrey200})
|
|
31
31
|
);
|
|
32
32
|
margin: 2px;
|
|
@@ -35,12 +35,12 @@ const I = G.div`
|
|
|
35
35
|
|
|
36
36
|
&.kit-card-disabled {
|
|
37
37
|
background-color: var(
|
|
38
|
-
${
|
|
38
|
+
${e.colors.background.disabled},
|
|
39
39
|
var(${t.secondary.mediumGrey.mediumGrey100})
|
|
40
40
|
);
|
|
41
41
|
.kit-card-picture {
|
|
42
42
|
border-color: var(
|
|
43
|
-
${
|
|
43
|
+
${e.colors.separator.disabled},
|
|
44
44
|
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
45
45
|
);
|
|
46
46
|
}
|
|
@@ -48,19 +48,19 @@ const I = G.div`
|
|
|
48
48
|
.kit-card-content {
|
|
49
49
|
.kit-card-title {
|
|
50
50
|
color: var(
|
|
51
|
-
${
|
|
51
|
+
${e.colors.typography.title.disabled},
|
|
52
52
|
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
.kit-card-description {
|
|
56
56
|
color: var(
|
|
57
|
-
${
|
|
57
|
+
${e.colors.typography.description.disabled},
|
|
58
58
|
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
.kit-card-extra {
|
|
62
62
|
color: var(
|
|
63
|
-
${
|
|
63
|
+
${e.colors.typography.extra.disabled},
|
|
64
64
|
var(${t.secondary.mediumGrey.mediumGrey400})
|
|
65
65
|
);
|
|
66
66
|
}
|
|
@@ -70,48 +70,48 @@ const I = G.div`
|
|
|
70
70
|
&.kit-card-selected {
|
|
71
71
|
margin: 0;
|
|
72
72
|
border: 3px solid
|
|
73
|
-
var(${
|
|
73
|
+
var(${e.colors.border.selected}, var(${t.primary.primary400}));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.kit-card-content {
|
|
77
77
|
grid-area: content;
|
|
78
78
|
display: flex;
|
|
79
79
|
flex-direction: column;
|
|
80
|
-
gap: ${d(
|
|
81
|
-
padding: ${d(
|
|
80
|
+
gap: ${d(h.xs)};
|
|
81
|
+
padding: ${d(h.s)};
|
|
82
82
|
|
|
83
83
|
.kit-card-title {
|
|
84
|
-
font-size: ${d(
|
|
84
|
+
font-size: ${d(e.typography.title.fontSize, i.fontSize3)};
|
|
85
85
|
font-weight: var(
|
|
86
|
-
${
|
|
86
|
+
${e.typography.title.fontWeight},
|
|
87
87
|
var(${i.boldFontWeight})
|
|
88
88
|
);
|
|
89
89
|
color: var(
|
|
90
|
-
${
|
|
90
|
+
${e.colors.typography.title.default},
|
|
91
91
|
var(${t.primary.primary400})
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.kit-card-description {
|
|
96
|
-
font-size: ${d(
|
|
96
|
+
font-size: ${d(e.typography.description.fontSize, i.fontSize5)};
|
|
97
97
|
font-weight: var(
|
|
98
|
-
${
|
|
98
|
+
${e.typography.description.fontWeight},
|
|
99
99
|
var(${i.regularFontWeight})
|
|
100
100
|
);
|
|
101
101
|
color: var(
|
|
102
|
-
${
|
|
102
|
+
${e.colors.typography.description.default},
|
|
103
103
|
var(${t.secondary.mediumGrey.mediumGrey600})
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.kit-card-extra {
|
|
108
|
-
font-size: ${d(
|
|
108
|
+
font-size: ${d(e.typography.extra.fontSize, i.fontSize4)};
|
|
109
109
|
font-weight: var(
|
|
110
|
-
${
|
|
110
|
+
${e.typography.extra.fontWeight},
|
|
111
111
|
var(${i.boldFontWeight})
|
|
112
112
|
);
|
|
113
113
|
color: var(
|
|
114
|
-
${
|
|
114
|
+
${e.colors.typography.extra.default},
|
|
115
115
|
var(${t.primary.primary400})
|
|
116
116
|
);
|
|
117
117
|
}
|
|
@@ -125,7 +125,7 @@ const I = G.div`
|
|
|
125
125
|
overflow: hidden;
|
|
126
126
|
position: relative;
|
|
127
127
|
border-bottom: 4px solid
|
|
128
|
-
${({ $brandingBar: o }) => o ? `var(${
|
|
128
|
+
${({ $brandingBar: o }) => o ? `var(${e.colors.separator.default}, var(${t.primary.primary400}))` : "transparent"};
|
|
129
129
|
|
|
130
130
|
img {
|
|
131
131
|
height: 100%;
|
|
@@ -160,14 +160,14 @@ const I = G.div`
|
|
|
160
160
|
&:focus-within:not(.kit-card-disabled) {
|
|
161
161
|
margin: 0;
|
|
162
162
|
border: 3px solid
|
|
163
|
-
var(${
|
|
163
|
+
var(${e.colors.border.focus}, var(${t.primary.primary200}));
|
|
164
164
|
outline: none;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
&:hover:not(.kit-card-disabled) {
|
|
168
168
|
margin: 0;
|
|
169
169
|
border: 3px solid
|
|
170
|
-
var(${
|
|
170
|
+
var(${e.colors.border.hover}, var(${t.primary.primary400}));
|
|
171
171
|
|
|
172
172
|
.kit-card-picture {
|
|
173
173
|
border-color: transparent;
|
|
@@ -177,10 +177,10 @@ const I = G.div`
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
`, A = ({ actions: o, description:
|
|
180
|
+
`, A = ({ actions: o, description: l, className: v, style: x, title: s, extra: m, previewSrc: p, tags: y, onActivate: g, onSelect: f, brandingBar: k = !1, selected: u = !1, activated: $ = !1, disabled: a = !1 }) => {
|
|
181
181
|
const E = z().appId;
|
|
182
182
|
var C = o && 2 < o.length, w = o && o.length <= 2;
|
|
183
|
-
return
|
|
183
|
+
return r.createElement(I, { tabIndex: a ? -1 : 0, className: N(v, E, { "kit-card-selected": u, "kit-card-disabled": a }), style: x, $brandingBar: k }, r.createElement("div", { className: "kit-card-picture" }, r.createElement("img", { src: p ?? "public/images/no-preview.png" }), f && r.createElement(F, { className: "kit-card-checkbox", onChange: f, checked: u, disabled: a }), g && r.createElement(W, { className: "kit-card-switch", onChange: g, checked: $, disabled: a }), r.createElement("div", { className: "kit-card-buttons" }, w && r.createElement(r.Fragment, null, o.map((b) => r.createElement(c, { type: "segmented", icon: b.icon, onClick: b.onClick, disabled: a }))), C && r.createElement(r.Fragment, null, r.createElement(c, { type: "segmented", icon: o[0].icon, onClick: o[0].onClick, disabled: a }), r.createElement(B, { menu: { items: o.slice(1) }, disabled: a }, r.createElement(c, { type: "segmented", icon: r.createElement(T, { icon: S }) }))))), r.createElement("div", { className: "kit-card-content" }, y && r.createElement(K.Group, { tags: y }), s && r.createElement(n.Text, { className: "kit-card-title" }, s), l && r.createElement(n.Text, { className: "kit-card-description" }, l), m && r.createElement(n.Text, { className: "kit-card-extra", ellipsis: { tooltip: !0 } }, m)));
|
|
184
184
|
};
|
|
185
185
|
A.displayName = "KitCard";
|
|
186
186
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import v, { cloneElement as
|
|
2
|
-
import { Collapse as
|
|
3
|
-
import
|
|
1
|
+
import v, { cloneElement as b } from "react";
|
|
2
|
+
import { Collapse as h } from "antd";
|
|
3
|
+
import $ from "styled-components";
|
|
4
4
|
import { kitCollapseCssTokens as e } from "../../../theme/aristid/components/DataDisplay/Collapse/index.js";
|
|
5
5
|
import { borderCssTokens as d } from "../../../theme/aristid/general/border/index.js";
|
|
6
6
|
import { kitColorsPaletteCssTokens as o } from "../../../theme/aristid/general/colors/index.js";
|
|
7
7
|
import { spacingCssTokens as t } from "../../../theme/aristid/general/spacing/index.js";
|
|
8
|
-
import { useKitTheme as
|
|
9
|
-
import { FontAwesomeIcon as
|
|
10
|
-
import { faChevronDown as
|
|
8
|
+
import { useKitTheme as x } from "../../../theme/useKitTheme.js";
|
|
9
|
+
import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { faChevronDown as C } from "@fortawesome/free-solid-svg-icons";
|
|
11
11
|
import { convertToPixel as a } from "../../../theme/utils/convert.js";
|
|
12
|
-
const
|
|
12
|
+
const k = $(h)`
|
|
13
13
|
border: none;
|
|
14
14
|
|
|
15
15
|
&&& > .ant-collapse-item {
|
|
@@ -108,7 +108,7 @@ const I = x($)`
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
&.ant-collapse-item-active .ant-collapse-header .ant-collapse-expand-icon svg {
|
|
111
|
+
&.ant-collapse-item-active > .ant-collapse-header > .ant-collapse-expand-icon svg {
|
|
112
112
|
transition: transform 0.3s ease-in-out;
|
|
113
113
|
transform: rotate(180deg);
|
|
114
114
|
}
|
|
@@ -142,15 +142,14 @@ const I = x($)`
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
`,
|
|
146
|
-
var
|
|
147
|
-
return
|
|
148
|
-
var
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}, R = (b.displayName = "KitCollapse", b);
|
|
145
|
+
`, I = () => v.createElement(g, { icon: C }), u = ({ className: p, expandIcon: c, items: n, collapsible: m, ...f }) => {
|
|
146
|
+
var y = x().appId;
|
|
147
|
+
return m === "disabled" && n != null && n.forEach((r) => {
|
|
148
|
+
var l, s, i;
|
|
149
|
+
r.label !== void 0 && (s = r.label, i = r.extra, s !== void 0 && ((l = s.type) == null ? void 0 : l.displayName) === "KitHeader" && (r.label = b(s, { disabled: !0 })), i !== void 0) && ((l = i.type) == null ? void 0 : l.displayName) === "KitHeaderExtra" && (r.extra = b(i, { disabled: !0 }));
|
|
150
|
+
}), v.createElement(k, { ...f, className: y + " " + (p ?? ""), expandIcon: c ?? I, expandIconPosition: "end", collapsible: m, items: n });
|
|
151
|
+
}, F = (u.displayName = "KitCollapse", u);
|
|
153
152
|
export {
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
u as KitCollapse,
|
|
154
|
+
F as default
|
|
156
155
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import m from "styled-components";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { KitTag as p } from "../Tag/index.js";
|
|
4
|
+
import { KitImage as g } from "../Image/index.js";
|
|
5
|
+
import { FontAwesomeIcon as h } from "@fortawesome/react-fontawesome";
|
|
6
|
+
import { faEye as k } from "@fortawesome/free-regular-svg-icons";
|
|
5
7
|
import { convertToPixel as l } from "../../../theme/utils/convert.js";
|
|
6
8
|
import { spacingCssTokens as n } from "../../../theme/aristid/general/spacing/index.js";
|
|
7
|
-
import { typographyCssTokens as
|
|
8
|
-
import { KitSwitch as
|
|
9
|
-
import { KitImage as w } from "../Image/index.js";
|
|
10
|
-
import { KitTag as f } from "../Tag/index.js";
|
|
9
|
+
import { typographyCssTokens as w } from "../../../theme/aristid/general/typography/index.js";
|
|
10
|
+
import { KitSwitch as v } from "../../DataEntry/Switch/index.js";
|
|
11
11
|
import { KitTypography as c } from "../../General/Typography/index.js";
|
|
12
|
-
const
|
|
12
|
+
const f = m.div`
|
|
13
13
|
display: grid;
|
|
14
14
|
grid-template: 'switch image content';
|
|
15
15
|
grid-template-columns: min-content min-content min-content;
|
|
@@ -42,20 +42,20 @@ const v = m.div`
|
|
|
42
42
|
|
|
43
43
|
.kit-collapse-header-content-title {
|
|
44
44
|
grid-area: title;
|
|
45
|
-
font-size: ${l(
|
|
45
|
+
font-size: ${l(w.fontSize3)};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.kit-collapse-header-content-description {
|
|
49
49
|
grid-area: description;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`, E = ({ onSwitchChange: t, disabled: i }) => e.createElement("div", { className: "kit-collapse-header-switch", onClick: (a) => a.stopPropagation() }, e.createElement(
|
|
53
|
-
var o;
|
|
54
|
-
|
|
55
|
-
}, disabled: i })), x = ({ imageSrc: t }) => e.createElement("div", { className: "kit-collapse-header-image", onClick: (i) => i.stopPropagation() }, e.createElement(
|
|
52
|
+
`, E = ({ onSwitchChange: t, disabled: i }) => e.createElement("div", { className: "kit-collapse-header-switch", onClick: (a) => a.stopPropagation() }, e.createElement(v, { onChange: (a, r) => {
|
|
53
|
+
var o = r.target.closest(".ant-collapse-item");
|
|
54
|
+
o != null && o.setAttribute("data-item-selected", a.toString()), t(a, r);
|
|
55
|
+
}, disabled: i })), x = ({ imageSrc: t }) => e.createElement("div", { className: "kit-collapse-header-image", onClick: (i) => i.stopPropagation() }, e.createElement(g, { src: t, style: { height: "auto", width: "auto", maxHeight: "90px", maxWidth: "50px" }, preview: { mask: e.createElement(h, { icon: k }) } })), C = ({ title: t, description: i, tagContent: a, disabled: r }) => {
|
|
56
56
|
var o = "kit-collapse-header-content";
|
|
57
|
-
return e.createElement("div", { className: o += t !== void 0 && i !== void 0 ? " kit-collapse-header-content-rows" : "" }, a !== void 0 && e.createElement("div", { className: "kit-collapse-header-tag" }, e.createElement(
|
|
58
|
-
}, d = ({ onSwitchChange: t, imageSrc: i, title: a, description: r, tagContent: o, disabled: s = !1 }) => e.createElement(
|
|
57
|
+
return e.createElement("div", { className: o += t !== void 0 && i !== void 0 ? " kit-collapse-header-content-rows" : "" }, a !== void 0 && e.createElement("div", { className: "kit-collapse-header-tag" }, e.createElement(p, null, a)), t !== void 0 && e.createElement(c.Text, { className: "kit-collapse-header-content-title", size: "large", weight: "bold", ellipsis: { tooltip: !0 }, disabled: r }, t), i !== void 0 && e.createElement(c.Text, { className: "kit-collapse-header-content-description", size: "large", weight: "regular", ellipsis: { tooltip: !0 }, disabled: r }, i));
|
|
58
|
+
}, d = ({ onSwitchChange: t, imageSrc: i, title: a, description: r, tagContent: o, disabled: s = !1 }) => e.createElement(f, null, t !== void 0 && e.createElement(E, { onSwitchChange: t, disabled: s }), i !== void 0 && e.createElement(x, { imageSrc: i }), e.createElement(C, { title: a, description: r, tagContent: o, disabled: s })), P = (d.displayName = "KitHeader", d);
|
|
59
59
|
export {
|
|
60
60
|
d as KitHeader,
|
|
61
61
|
P as default
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import o, { useState as
|
|
2
|
-
import
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { faEllipsisVertical as
|
|
1
|
+
import o, { useState as k } from "react";
|
|
2
|
+
import E from "styled-components";
|
|
3
|
+
import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { faEllipsisVertical as u } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import { convertToPixel as d } from "../../../theme/utils/convert.js";
|
|
6
|
-
import { spacingCssTokens as
|
|
7
|
-
import { useKitLocale as
|
|
6
|
+
import { spacingCssTokens as m } from "../../../theme/aristid/general/spacing/index.js";
|
|
7
|
+
import { useKitLocale as C } from "../../../translation/useKitLocale.js";
|
|
8
8
|
import { KitTooltip as c } from "../Tooltip/index.js";
|
|
9
9
|
import { KitButton as s } from "../../General/Button/index.js";
|
|
10
|
-
import { KitDropDown as
|
|
11
|
-
const
|
|
10
|
+
import { KitDropDown as b } from "../../Navigation/DropDown/index.js";
|
|
11
|
+
const x = E.div`
|
|
12
12
|
display: grid;
|
|
13
13
|
grid-template: 'checkbox actions';
|
|
14
14
|
|
|
@@ -18,19 +18,18 @@ const h = f.div`
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.kit-collapse-header-extra-actions {
|
|
21
|
-
padding-left: ${d(
|
|
21
|
+
padding-left: ${d(m.s)};
|
|
22
22
|
grid-area: actions;
|
|
23
23
|
display: grid;
|
|
24
24
|
grid-template-columns: auto auto;
|
|
25
25
|
|
|
26
26
|
> div:nth-child(2) {
|
|
27
|
-
margin-left: ${d(
|
|
27
|
+
margin-left: ${d(m.s)};
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var k = u().locale;
|
|
30
|
+
`, h = ({ actions: e, disabled: t }) => {
|
|
31
|
+
const [r, n] = k(!1);
|
|
32
|
+
var g = C().locale;
|
|
34
33
|
const a = e[0] || null, l = e.length <= 2 && e[1] ? e[1] : null;
|
|
35
34
|
return o.createElement("div", { className: "kit-collapse-header-extra-actions" }, a && o.createElement(c, { title: a.label, open: !t && void 0 }, o.createElement(s, { icon: a.icon, disabled: t, onClick: (i) => {
|
|
36
35
|
i.stopPropagation(), a.onClick && a.onClick(i);
|
|
@@ -38,9 +37,9 @@ const h = f.div`
|
|
|
38
37
|
i.stopPropagation(), l.onClick !== void 0 && l.onClick(i);
|
|
39
38
|
} })), 2 < e.length && o.createElement("div", { onClick: (i) => {
|
|
40
39
|
i.stopPropagation();
|
|
41
|
-
} }, o.createElement(
|
|
42
|
-
},
|
|
40
|
+
} }, o.createElement(b, { menu: { items: v({ actions: e }) }, trigger: ["click"], onOpenChange: () => n(!1) }, o.createElement(c, { title: (e = g.Collapse) == null ? void 0 : e.more, open: !t && r, onOpenChange: n }, o.createElement(s, { icon: o.createElement(f, { icon: u }), disabled: t })))));
|
|
41
|
+
}, v = ({ actions: e }) => (e = [...e], e.splice(0, 1), e = e.map((t, r) => ({ key: r, icon: t.icon, label: t.label, onClick: (n) => t.onClick && t.onClick(n) })), e), p = ({ actions: e, disabled: t = !1 }) => o.createElement(x, null, e !== void 0 && o.createElement(h, { actions: e, disabled: t })), O = (p.displayName = "KitHeaderExtra", p);
|
|
43
42
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
p as KitHeaderExtra,
|
|
44
|
+
O as default
|
|
46
45
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Image as
|
|
3
|
-
import
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { faEye as
|
|
1
|
+
import t from "react";
|
|
2
|
+
import { Image as u } from "antd";
|
|
3
|
+
import p from "styled-components";
|
|
4
|
+
import { FontAwesomeIcon as $ } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import { faEye as v } from "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
import { useKitLocale as k } from "../../../translation/useKitLocale.js";
|
|
7
7
|
import { kitImageCssTokens as e } from "../../../theme/aristid/components/DataDisplay/Image/index.js";
|
|
8
8
|
import { borderCssTokens as a } from "../../../theme/aristid/general/border/index.js";
|
|
9
|
-
import { kitColorsPaletteCssTokens as
|
|
9
|
+
import { kitColorsPaletteCssTokens as l } from "../../../theme/aristid/general/colors/index.js";
|
|
10
10
|
import { useKitTheme as g } from "../../../theme/useKitTheme.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
border: ${({ $
|
|
11
|
+
import { convertToPixel as d } from "../../../theme/utils/convert.js";
|
|
12
|
+
const I = p(u)`
|
|
13
|
+
border-radius: ${({ $rounded: r }) => r ? d(e.border.radius.rounded, a.radius.s) : d(e.border.radius.default, a.radius.square)};
|
|
14
|
+
border: ${({ $bordered: r }) => r ? `1px solid var(${e.colors.border.default}, var(${l.neutral.black60}))` : `var(${e.colors.border.none}, none))`};
|
|
14
15
|
|
|
15
16
|
+ .ant-image-mask {
|
|
16
|
-
border-radius: ${({ $rounded: r }) => r ?
|
|
17
|
-
border: ${({ $bordered: r }) => r ? `1px solid var(${e.colors.border.default}, var(${
|
|
17
|
+
border-radius: ${({ $rounded: r }) => r ? d(e.border.radius.rounded, a.radius.s) : d(e.border.radius.default, a.radius.square)};
|
|
18
|
+
border: ${({ $bordered: r }) => r ? `1px solid var(${e.colors.border.default}, var(${l.neutral.black60}))` : `var(${e.colors.border.none}, none))`};
|
|
18
19
|
}
|
|
19
|
-
`,
|
|
20
|
+
`, w = p.div`
|
|
20
21
|
display: flex;
|
|
21
22
|
gap: 6px;
|
|
22
|
-
`,
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
m.PreviewGroup = l.PreviewGroup, m.displayName = "KitImage";
|
|
23
|
+
`, x = ({ rounded: r, bordered: b, preview: o, className: i, ...c }) => {
|
|
24
|
+
var s = k().locale, f = g().appId;
|
|
25
|
+
const m = t.createElement(w, null, t.createElement($, { icon: v }), (s = s.Image) == null ? void 0 : s.preview);
|
|
26
|
+
return t.createElement(I, { className: f + " " + (i ?? ""), $rounded: r, $bordered: b, preview: typeof o == "object" ? { mask: m, ...o } : o === void 0 ? { mask: m } : o, ...c });
|
|
27
|
+
}, n = x;
|
|
28
|
+
n.PreviewGroup = u.PreviewGroup, n.displayName = "KitImage";
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
n as KitImage
|
|
31
31
|
};
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { KitTooltip as
|
|
1
|
+
import l from "react";
|
|
2
|
+
import m from "styled-components";
|
|
3
|
+
import { KitTooltip as c } from "../Tooltip/index.js";
|
|
4
4
|
import { useKitTheme as s } from "../../../theme/useKitTheme.js";
|
|
5
|
-
import { kitItemCardCssTokens as
|
|
6
|
-
import { borderCssTokens as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
height: ${({ $column: r }) => r ? "auto" : `calc(var(
|
|
13
|
-
${t.colorBar.thickness},
|
|
14
|
-
8
|
|
15
|
-
)* 1px)`};
|
|
16
|
-
border-radius: calc(var(${t.colorBar.border.radius}, var(${n.radius.s})) * 1px);
|
|
5
|
+
import { kitItemCardCssTokens as a } from "../../../theme/aristid/components/DataDisplay/ItemCard/index.js";
|
|
6
|
+
import { borderCssTokens as u } from "../../../theme/aristid/general/border/index.js";
|
|
7
|
+
import { convertToPixel as i } from "../../../theme/utils/convert.js";
|
|
8
|
+
const d = m.div`
|
|
9
|
+
width: ${({ $column: r }) => r ? i(a.colorBar.thickness, 8) : "auto"};
|
|
10
|
+
height: ${({ $column: r }) => r ? "auto" : i(a.colorBar.thickness, 8)};
|
|
11
|
+
border-radius: ${i(a.colorBar.border.radius, u.radius.s)};
|
|
17
12
|
display: flex;
|
|
18
13
|
flex-direction: ${({ $column: r }) => r ? "column" : "row"};
|
|
19
14
|
overflow: hidden;
|
|
@@ -21,11 +16,10 @@ const d = i.div`
|
|
|
21
16
|
> div {
|
|
22
17
|
flex: 1 1 auto;
|
|
23
18
|
}
|
|
24
|
-
`, p = (r) => ({ background: r.color
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, x = u;
|
|
19
|
+
`, p = (r) => ({ background: (r = r.color) != null ? r : "transparent" }), f = (r) => {
|
|
20
|
+
var o, n = s().appId;
|
|
21
|
+
return l.createElement(d, { $column: (o = r.vertical) != null && o, className: n + " " + r.className }, (o = r.colors) == null ? void 0 : o.map((e, t) => l.createElement(c, { key: e.label + "_" + t, title: e.label, placement: (t = r.vertical) != null && t ? "right" : "top" }, l.createElement("div", { style: p(e) }))));
|
|
22
|
+
}, y = f;
|
|
29
23
|
export {
|
|
30
|
-
|
|
24
|
+
y as default
|
|
31
25
|
};
|