@spaced-out/ui-design-system 0.5.16 → 0.5.18
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 +14 -0
- package/lib/components/Checklist/Checklist.d.ts +44 -0
- package/lib/components/Checklist/Checklist.d.ts.map +1 -0
- package/lib/components/Checklist/Checklist.js +146 -0
- package/lib/components/Checklist/Checklist.module.css +164 -0
- package/lib/components/Checklist/index.d.ts +2 -0
- package/lib/components/Checklist/index.d.ts.map +1 -0
- package/lib/components/Checklist/index.js +16 -0
- package/lib/components/Menu/MenuOptionButton.js +10 -10
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.5.18](https://github.com/spaced-out/ui-design-system/compare/v0.5.17...v0.5.18) (2025-11-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **GDS-545:** Checklist AI component ([#425](https://github.com/spaced-out/ui-design-system/issues/425)) ([b2da14e](https://github.com/spaced-out/ui-design-system/commit/b2da14e9a70067943f874d4e504d0186ef905015))
|
|
11
|
+
|
|
12
|
+
### [0.5.17](https://github.com/spaced-out/ui-design-system/compare/v0.5.16...v0.5.17) (2025-11-10)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* adds fix for optionTestId preference on testId ([#424](https://github.com/spaced-out/ui-design-system/issues/424)) ([e9315fd](https://github.com/spaced-out/ui-design-system/commit/e9315fd0480ae9f9ce5ec66305052e91667ed9ab))
|
|
18
|
+
|
|
5
19
|
### [0.5.16](https://github.com/spaced-out/ui-design-system/compare/v0.5.15...v0.5.16) (2025-11-06)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ColorTypes } from '../../types/typography';
|
|
3
|
+
import type { IconType } from '../../components/Icon';
|
|
4
|
+
type ClassNames = Readonly<{
|
|
5
|
+
header?: string;
|
|
6
|
+
wrapper?: string;
|
|
7
|
+
content?: string;
|
|
8
|
+
listItemContainer?: string;
|
|
9
|
+
cardContentContainer?: string;
|
|
10
|
+
}>;
|
|
11
|
+
export interface ChecklistItem {
|
|
12
|
+
label: React.ReactNode;
|
|
13
|
+
key: string;
|
|
14
|
+
iconLeftName?: string;
|
|
15
|
+
iconLeftType?: IconType;
|
|
16
|
+
iconLeftColor?: ColorTypes;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
rightSlot?: React.ReactNode;
|
|
19
|
+
onExpand?: (item: ChecklistItem) => void;
|
|
20
|
+
}
|
|
21
|
+
export interface ChecklistProps {
|
|
22
|
+
classNames?: ClassNames;
|
|
23
|
+
isOpen?: boolean;
|
|
24
|
+
testId?: string;
|
|
25
|
+
title: React.ReactNode;
|
|
26
|
+
rightSlot?: React.ReactNode;
|
|
27
|
+
footer?: React.ReactNode;
|
|
28
|
+
listItems: Array<ChecklistItem>;
|
|
29
|
+
hideChecklistItemExpandButton?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface ChecklistProgressBarProps {
|
|
32
|
+
classNames?: {
|
|
33
|
+
wrapper?: string;
|
|
34
|
+
container?: string;
|
|
35
|
+
bar?: string;
|
|
36
|
+
};
|
|
37
|
+
totalItems: number;
|
|
38
|
+
completedItems: number;
|
|
39
|
+
showLoadingBar?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const ChecklistProgressBar: React.ForwardRefExoticComponent<ChecklistProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export declare const Checklist: React.ForwardRefExoticComponent<ChecklistProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=Checklist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checklist.d.ts","sourceRoot":"","sources":["../../../src/components/Checklist/Checklist.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAMrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AASlD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAChC,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB,kGAiB/B,CAAC;AAEH,eAAO,MAAM,SAAS,uFAwHrB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ChecklistProgressBar = exports.Checklist = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
9
|
+
var _qa = require("../../utils/qa");
|
|
10
|
+
var _Button = require("../Button");
|
|
11
|
+
var _Card = require("../Card");
|
|
12
|
+
var _Icon = require("../Icon");
|
|
13
|
+
var _Text = require("../Text");
|
|
14
|
+
var _Truncate = require("../Truncate");
|
|
15
|
+
var _TruncatedTextWithTooltip = require("../TruncatedTextWithTooltip");
|
|
16
|
+
var _ChecklistModule = _interopRequireDefault(require("./Checklist.module.css"));
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
|
+
const ChecklistProgressBar = exports.ChecklistProgressBar = /*#__PURE__*/React.forwardRef(_ref => {
|
|
21
|
+
let {
|
|
22
|
+
totalItems,
|
|
23
|
+
completedItems,
|
|
24
|
+
showLoadingBar,
|
|
25
|
+
classNames
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
28
|
+
className: (0, _classify.default)(_ChecklistModule.default.checklistProgressBar, classNames?.wrapper),
|
|
29
|
+
children: [showLoadingBar ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
|
+
className: (0, _classify.default)(_ChecklistModule.default.progressLinear, classNames?.container),
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
className: (0, _classify.default)(_ChecklistModule.default.progressLinearBar, classNames?.bar),
|
|
33
|
+
style: {
|
|
34
|
+
width: `${Math.min(completedItems / totalItems * 100, 100)}%`
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodyMediumBold, {
|
|
38
|
+
children: `${completedItems} / ${totalItems}`
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
const Checklist = exports.Checklist = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
43
|
+
let {
|
|
44
|
+
isOpen,
|
|
45
|
+
classNames,
|
|
46
|
+
testId,
|
|
47
|
+
title,
|
|
48
|
+
rightSlot,
|
|
49
|
+
footer,
|
|
50
|
+
listItems = [],
|
|
51
|
+
hideChecklistItemExpandButton = false
|
|
52
|
+
} = _ref2;
|
|
53
|
+
const [collapsibleCardIsOpen, setCollapsibleCardIsOpen] = React.useState(Boolean(isOpen));
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
setCollapsibleCardIsOpen(Boolean(isOpen));
|
|
56
|
+
}, [isOpen]);
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58
|
+
ref: ref,
|
|
59
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
60
|
+
base: testId,
|
|
61
|
+
slot: 'wrapper'
|
|
62
|
+
}),
|
|
63
|
+
className: (0, _classify.default)(_ChecklistModule.default.wrapper, classNames?.wrapper),
|
|
64
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.UnstyledButton, {
|
|
65
|
+
className: (0, _classify.default)(_ChecklistModule.default.header, {
|
|
66
|
+
[_ChecklistModule.default.isOpen]: collapsibleCardIsOpen
|
|
67
|
+
}, classNames?.header),
|
|
68
|
+
onClick: () => {
|
|
69
|
+
setCollapsibleCardIsOpen(!collapsibleCardIsOpen);
|
|
70
|
+
},
|
|
71
|
+
testId: (0, _qa.generateTestId)({
|
|
72
|
+
base: testId,
|
|
73
|
+
slot: 'header-button'
|
|
74
|
+
}),
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
76
|
+
className: _ChecklistModule.default.headerContent,
|
|
77
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
78
|
+
className: _ChecklistModule.default.titleContainer,
|
|
79
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
80
|
+
name: collapsibleCardIsOpen ? 'chevron-up' : 'chevron-down',
|
|
81
|
+
color: "secondary",
|
|
82
|
+
size: "small",
|
|
83
|
+
testId: (0, _qa.generateTestId)({
|
|
84
|
+
base: testId,
|
|
85
|
+
slot: collapsibleCardIsOpen ? 'chevron-up' : 'chevron-down'
|
|
86
|
+
})
|
|
87
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
88
|
+
testId: (0, _qa.generateTestId)({
|
|
89
|
+
base: testId,
|
|
90
|
+
slot: 'title'
|
|
91
|
+
}),
|
|
92
|
+
children: title
|
|
93
|
+
})]
|
|
94
|
+
}), rightSlot ? rightSlot : null]
|
|
95
|
+
})
|
|
96
|
+
}), collapsibleCardIsOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
97
|
+
className: (0, _classify.default)(_ChecklistModule.default.content, classNames?.content),
|
|
98
|
+
"data-testid": (0, _qa.generateTestId)({
|
|
99
|
+
base: testId,
|
|
100
|
+
slot: 'content'
|
|
101
|
+
}),
|
|
102
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.Card, {
|
|
103
|
+
classNames: {
|
|
104
|
+
wrapper: _ChecklistModule.default.cardWrapper
|
|
105
|
+
},
|
|
106
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Card.CardContent, {
|
|
107
|
+
className: (0, _classify.default)(_ChecklistModule.default.cardContentContainer, classNames?.cardContentContainer),
|
|
108
|
+
children: listItems.map(item => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.UnstyledButton, {
|
|
109
|
+
className: (0, _classify.default)(_ChecklistModule.default.checklistItemContainer, classNames?.listItemContainer),
|
|
110
|
+
onClick: () => item.onExpand?.(item),
|
|
111
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
112
|
+
className: _ChecklistModule.default.checklistItemLeft,
|
|
113
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
114
|
+
name: item.iconLeftName || '',
|
|
115
|
+
type: item.iconLeftType,
|
|
116
|
+
color: item.iconLeftColor || 'tertiary'
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodyMedium, {
|
|
118
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TruncatedTextWithTooltip.TruncatedTextWithTooltip, {
|
|
119
|
+
tooltip: {
|
|
120
|
+
bodyMaxLines: 2,
|
|
121
|
+
elevation: 'modal'
|
|
122
|
+
},
|
|
123
|
+
children: item.label
|
|
124
|
+
})
|
|
125
|
+
})]
|
|
126
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
127
|
+
className: _ChecklistModule.default.checklistItemRight,
|
|
128
|
+
children: item.rightSlot ? item.rightSlot : !hideChecklistItemExpandButton ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
129
|
+
name: "chevron-right",
|
|
130
|
+
color: "secondary",
|
|
131
|
+
size: "small",
|
|
132
|
+
testId: (0, _qa.generateTestId)({
|
|
133
|
+
base: testId,
|
|
134
|
+
slot: 'chevron-right'
|
|
135
|
+
})
|
|
136
|
+
}) : null
|
|
137
|
+
})]
|
|
138
|
+
}))
|
|
139
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Card.CardFooter, {
|
|
140
|
+
children: footer
|
|
141
|
+
})]
|
|
142
|
+
})
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
Checklist.displayName = 'Checklist';
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
@value (
|
|
2
|
+
colorBorderPrimary,
|
|
3
|
+
colorBackgroundPrimary,
|
|
4
|
+
colorBackgroundTertiary,
|
|
5
|
+
colorBackgroundSecondary,
|
|
6
|
+
colorFillPrimary
|
|
7
|
+
) from '../../styles/variables/_color.css';
|
|
8
|
+
@value (
|
|
9
|
+
sizeFluid,
|
|
10
|
+
size58,
|
|
11
|
+
size34,
|
|
12
|
+
size42,
|
|
13
|
+
size8,
|
|
14
|
+
size400,
|
|
15
|
+
size20,
|
|
16
|
+
size100,
|
|
17
|
+
size200
|
|
18
|
+
) from '../../styles/variables/_size.css';
|
|
19
|
+
@value (
|
|
20
|
+
spaceSmall,
|
|
21
|
+
spaceXSmall
|
|
22
|
+
) from '../../styles/variables/_space.css';
|
|
23
|
+
@value (
|
|
24
|
+
elevationCard,
|
|
25
|
+
elevationMenu
|
|
26
|
+
) from '../../styles/variables/_elevation.css';
|
|
27
|
+
@value (
|
|
28
|
+
borderWidthPrimary,
|
|
29
|
+
borderRadiusSmall,
|
|
30
|
+
borderRadiusNone
|
|
31
|
+
) from '../../styles/variables/_border.css';
|
|
32
|
+
|
|
33
|
+
.wrapper {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-flow: column;
|
|
36
|
+
width: sizeFluid;
|
|
37
|
+
position: relative;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.header {
|
|
41
|
+
composes: subTitleSmall from '../../styles/typography.module.css';
|
|
42
|
+
composes: borderPrimary from '../../styles/border.module.css';
|
|
43
|
+
min-height: size42;
|
|
44
|
+
border-radius: borderRadiusSmall;
|
|
45
|
+
display: flex;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
align-items: flex-start;
|
|
48
|
+
width: sizeFluid;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
gap: spaceSmall;
|
|
51
|
+
padding: spaceSmall;
|
|
52
|
+
background-color: colorBackgroundTertiary;
|
|
53
|
+
z-index: elevationCard;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.header.isOpen {
|
|
57
|
+
min-height: size58;
|
|
58
|
+
background-color: colorBackgroundPrimary;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.headerContent {
|
|
62
|
+
display: flex;
|
|
63
|
+
gap: spaceXSmall;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
width: sizeFluid;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.content {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-flow: column;
|
|
72
|
+
background-color: colorBackgroundPrimary;
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: calc(sizeFluid - size20);
|
|
75
|
+
border-radius: borderRadiusSmall;
|
|
76
|
+
width: sizeFluid;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.cardWrapper {
|
|
80
|
+
z-index: elevationMenu;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.contentContainer {
|
|
84
|
+
display: flex;
|
|
85
|
+
padding: spaceSmall;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.actionContainer {
|
|
89
|
+
display: flex;
|
|
90
|
+
border-top: borderWidthPrimary solid colorBorderPrimary;
|
|
91
|
+
border-radius: borderRadiusNone borderRadiusNone borderRadiusSmall
|
|
92
|
+
borderRadiusSmall;
|
|
93
|
+
background-color: colorBackgroundTertiary;
|
|
94
|
+
padding: spaceSmall;
|
|
95
|
+
gap: spaceXSmall;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.titleContainer {
|
|
99
|
+
display: flex;
|
|
100
|
+
gap: spaceXSmall;
|
|
101
|
+
align-items: center;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.cardContentContainer {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-flow: column;
|
|
107
|
+
gap: spaceXSmall;
|
|
108
|
+
padding: spaceSmall;
|
|
109
|
+
width: sizeFluid;
|
|
110
|
+
justify-content: space-between;
|
|
111
|
+
max-height: size400;
|
|
112
|
+
overflow-y: auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.checklistItemContainer {
|
|
116
|
+
display: flex;
|
|
117
|
+
gap: spaceXSmall;
|
|
118
|
+
align-items: center;
|
|
119
|
+
width: sizeFluid;
|
|
120
|
+
background-color: colorBackgroundTertiary;
|
|
121
|
+
height: size34;
|
|
122
|
+
border-radius: borderRadiusSmall;
|
|
123
|
+
padding: spaceXSmall;
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.checklistItemContainer:hover {
|
|
128
|
+
background-color: colorBackgroundSecondary;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.checklistItemLeft {
|
|
132
|
+
display: flex;
|
|
133
|
+
gap: spaceXSmall;
|
|
134
|
+
align-items: center;
|
|
135
|
+
width: sizeFluid;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.checklistItemRight {
|
|
139
|
+
display: flex;
|
|
140
|
+
gap: spaceXSmall;
|
|
141
|
+
align-items: center;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.progressLinear {
|
|
145
|
+
min-width: size100;
|
|
146
|
+
max-width: size200;
|
|
147
|
+
background-color: colorBorderPrimary;
|
|
148
|
+
border-radius: borderRadiusSmall;
|
|
149
|
+
height: size8;
|
|
150
|
+
box-sizing: content-box;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.progressLinearBar {
|
|
154
|
+
height: size8;
|
|
155
|
+
background-color: colorFillPrimary;
|
|
156
|
+
border-radius: borderRadiusSmall;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.checklistProgressBar {
|
|
160
|
+
display: flex;
|
|
161
|
+
gap: spaceXSmall;
|
|
162
|
+
align-items: center;
|
|
163
|
+
min-width: max-content;
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checklist/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Checklist = require("./Checklist");
|
|
7
|
+
Object.keys(_Checklist).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Checklist[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Checklist[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -91,7 +91,7 @@ const MenuOptionButton = props => {
|
|
|
91
91
|
onClick: e => onSelect && onSelect(option, e),
|
|
92
92
|
autoFocus: selectedOption?.key === key,
|
|
93
93
|
testId: (0, _qa.generateTestId)({
|
|
94
|
-
base:
|
|
94
|
+
base: optionTestId || testId,
|
|
95
95
|
slot: 'option-button',
|
|
96
96
|
index: key
|
|
97
97
|
}),
|
|
@@ -104,7 +104,7 @@ const MenuOptionButton = props => {
|
|
|
104
104
|
checked: isSelected(),
|
|
105
105
|
indeterminate: indeterminate,
|
|
106
106
|
testId: (0, _qa.generateTestId)({
|
|
107
|
-
base:
|
|
107
|
+
base: optionTestId || testId,
|
|
108
108
|
slot: 'checkbox',
|
|
109
109
|
index: key
|
|
110
110
|
})
|
|
@@ -114,7 +114,7 @@ const MenuOptionButton = props => {
|
|
|
114
114
|
selectedValue: selectedKeys?.[0],
|
|
115
115
|
tabIndex: -1,
|
|
116
116
|
testId: (0, _qa.generateTestId)({
|
|
117
|
-
base:
|
|
117
|
+
base: optionTestId || testId,
|
|
118
118
|
slot: 'radio-button',
|
|
119
119
|
index: key
|
|
120
120
|
})
|
|
@@ -124,21 +124,21 @@ const MenuOptionButton = props => {
|
|
|
124
124
|
size: "small",
|
|
125
125
|
className: _MenuModule.default.icon,
|
|
126
126
|
testId: (0, _qa.generateTestId)({
|
|
127
|
-
base:
|
|
127
|
+
base: optionTestId || testId,
|
|
128
128
|
slot: 'icon-left',
|
|
129
129
|
index: key
|
|
130
130
|
})
|
|
131
131
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
132
132
|
className: (0, _classify.classify)(_MenuModule.default.optionTextContainer, classNames?.optionTextContainer),
|
|
133
133
|
"data-testid": (0, _qa.generateTestId)({
|
|
134
|
-
base:
|
|
134
|
+
base: optionTestId || testId,
|
|
135
135
|
slot: 'text-container',
|
|
136
136
|
index: key
|
|
137
137
|
}),
|
|
138
138
|
children: [/*#__PURE__*/React.isValidElement(customComponent) ? customComponent : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
139
|
className: (0, _classify.classify)(_MenuModule.default.optionTextLabel, classNames?.optionTextLabel),
|
|
140
140
|
"data-testid": (0, _qa.generateTestId)({
|
|
141
|
-
base:
|
|
141
|
+
base: optionTestId || testId,
|
|
142
142
|
slot: 'label',
|
|
143
143
|
index: key
|
|
144
144
|
}),
|
|
@@ -146,19 +146,19 @@ const MenuOptionButton = props => {
|
|
|
146
146
|
label: resolvedLabel,
|
|
147
147
|
allowWrap,
|
|
148
148
|
showLabelTooltip,
|
|
149
|
-
testId:
|
|
149
|
+
testId: optionTestId || testId,
|
|
150
150
|
key
|
|
151
151
|
})
|
|
152
152
|
}), !!secondaryLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
153
153
|
className: _MenuModule.default.optionTextSecondaryLabel,
|
|
154
154
|
"data-testid": (0, _qa.generateTestId)({
|
|
155
|
-
base:
|
|
155
|
+
base: optionTestId || testId,
|
|
156
156
|
slot: 'secondary-label',
|
|
157
157
|
index: key
|
|
158
158
|
}),
|
|
159
159
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Truncate.Truncate, {
|
|
160
160
|
testId: (0, _qa.generateTestId)({
|
|
161
|
-
base:
|
|
161
|
+
base: optionTestId || testId,
|
|
162
162
|
slot: 'secondary-label-text',
|
|
163
163
|
index: key
|
|
164
164
|
}),
|
|
@@ -171,7 +171,7 @@ const MenuOptionButton = props => {
|
|
|
171
171
|
size: "small",
|
|
172
172
|
className: (0, _classify.classify)(_MenuModule.default.icon, _MenuModule.default.rightIcon),
|
|
173
173
|
testId: (0, _qa.generateTestId)({
|
|
174
|
-
base:
|
|
174
|
+
base: optionTestId || testId,
|
|
175
175
|
slot: 'icon-right',
|
|
176
176
|
index: key
|
|
177
177
|
})
|
|
@@ -12,6 +12,7 @@ export * from '../components/Card';
|
|
|
12
12
|
export * from '../components/Charts';
|
|
13
13
|
export * from '../components/ChatBubble';
|
|
14
14
|
export * from '../components/Checkbox';
|
|
15
|
+
export * from '../components/Checklist';
|
|
15
16
|
export * from '../components/Chip';
|
|
16
17
|
export * from '../components/CircularLoader';
|
|
17
18
|
export * from '../components/CollapsibleCard';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mDAAmD,CAAC;AAClE,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cA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AAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yCAAyC,CAAC;AACxD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
|
package/lib/components/index.js
CHANGED
|
@@ -157,6 +157,17 @@ Object.keys(_Checkbox).forEach(function (key) {
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
});
|
|
160
|
+
var _Checklist = require("./Checklist");
|
|
161
|
+
Object.keys(_Checklist).forEach(function (key) {
|
|
162
|
+
if (key === "default" || key === "__esModule") return;
|
|
163
|
+
if (key in exports && exports[key] === _Checklist[key]) return;
|
|
164
|
+
Object.defineProperty(exports, key, {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () {
|
|
167
|
+
return _Checklist[key];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
160
171
|
var _Chip = require("./Chip");
|
|
161
172
|
Object.keys(_Chip).forEach(function (key) {
|
|
162
173
|
if (key === "default" || key === "__esModule") return;
|