@spaced-out/ui-design-system 0.6.9 → 0.6.11
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/CONTRIBUTING.md +4 -4
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +22 -9
- package/lib/components/Pagination/Pagination.module.css +5 -0
- package/lib/components/ProgressDonut/ProgressDonut.d.ts +9 -3
- package/lib/components/ProgressDonut/ProgressDonut.d.ts.map +1 -1
- package/lib/components/ProgressDonut/ProgressDonut.js +43 -17
- package/lib/components/ProgressDonut/ProgressDonut.module.css +5 -0
- package/lib/components/Table/DefaultTableHeader.d.ts +1 -0
- package/lib/components/Table/DefaultTableHeader.d.ts.map +1 -1
- package/lib/components/Table/DefaultTableHeader.js +12 -13
- package/lib/components/Table/StaticTable.d.ts.map +1 -1
- package/lib/components/Table/StaticTable.js +1 -0
- package/lib/components/Table/Table.module.css +1 -1
- package/mcp/package.json +1 -1
- 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.6.11](https://github.com/spaced-out/ui-design-system/compare/v0.6.10...v0.6.11) (2026-04-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **Table:** apply checkbox className to header cell ([#476](https://github.com/spaced-out/ui-design-system/issues/476)) ([91e91df](https://github.com/spaced-out/ui-design-system/commit/91e91df475d7330cefca2e9ef0dace347624c6f7))
|
|
11
|
+
|
|
12
|
+
### [0.6.10](https://github.com/spaced-out/ui-design-system/compare/v0.6.9...v0.6.10) (2026-04-13)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* rating prop in Progressdonut, responsiveness in Pagination ([#474](https://github.com/spaced-out/ui-design-system/issues/474)) ([0516ad4](https://github.com/spaced-out/ui-design-system/commit/0516ad4ba28995df31c3427cdfc8da15dae3e6ab))
|
|
18
|
+
|
|
5
19
|
### [0.6.9](https://github.com/spaced-out/ui-design-system/compare/v0.6.8...v0.6.9) (2026-04-10)
|
|
6
20
|
|
|
7
21
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -156,7 +156,7 @@ Check out our [**Design Tokens Page**](https://spaced-out.github.io/ui-design-sy
|
|
|
156
156
|
|
|
157
157
|
### Testing Genesis Design System Locally
|
|
158
158
|
|
|
159
|
-
> In the `
|
|
159
|
+
> In the `ui-design-system` directory's run:
|
|
160
160
|
|
|
161
161
|
```bash
|
|
162
162
|
yarn build
|
|
@@ -174,7 +174,7 @@ Check out our [**Design Tokens Page**](https://spaced-out.github.io/ui-design-sy
|
|
|
174
174
|
...
|
|
175
175
|
"dependencies": {
|
|
176
176
|
...
|
|
177
|
-
"@spaced-out/ui-design-system": "file:../
|
|
177
|
+
"@spaced-out/ui-design-system": "file:../ui-design-system",
|
|
178
178
|
...
|
|
179
179
|
},
|
|
180
180
|
...
|
|
@@ -182,9 +182,9 @@ Check out our [**Design Tokens Page**](https://spaced-out.github.io/ui-design-sy
|
|
|
182
182
|
|
|
183
183
|
which will install the local genesis design system library as a dependency in `consumer`.
|
|
184
184
|
|
|
185
|
-
For every change in `
|
|
185
|
+
For every change in `ui-design-system` that you want to propagate to `consumer` run:
|
|
186
186
|
|
|
187
|
-
> in `
|
|
187
|
+
> in `ui-design-system`
|
|
188
188
|
|
|
189
189
|
```bash
|
|
190
190
|
yarn build
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4B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CAAC,SAAS,CAAA;CAAC,EAC5B,MAAM,mBAAmB,GAAG,MAAM;IAAC,UAAU,CAAC,EAAE,UAAU,CAAA;CAAC,CAC5D,EACD,mBAAmB;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC5D,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,kBAAkB,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,eAAO,MAAM,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAC7C,eAAe,EACf,cAAc,CAoIf,CAAC"}
|
|
@@ -10,6 +10,7 @@ var _useWindowSize = require("../../hooks/useWindowSize");
|
|
|
10
10
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
11
11
|
var _helpers = require("../../utils/helpers");
|
|
12
12
|
var _qa = require("../../utils/qa");
|
|
13
|
+
var _string = require("../../utils/string");
|
|
13
14
|
var _Dropdown = require("../Dropdown");
|
|
14
15
|
var _PaginationItem = require("./PaginationItem");
|
|
15
16
|
var _Text = require("../Text");
|
|
@@ -18,12 +19,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
20
|
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
21
|
const LARGE_LIST_DROPDOWN_OPTIONS = 50;
|
|
21
|
-
const
|
|
22
|
+
const COMPACT_BREAKPOINT = 500;
|
|
22
23
|
const Pagination = exports.Pagination = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
23
24
|
const {
|
|
24
25
|
width
|
|
25
26
|
} = (0, _useWindowSize.useWindowSize)();
|
|
26
|
-
const
|
|
27
|
+
const isCompact = width <= COMPACT_BREAKPOINT;
|
|
27
28
|
const {
|
|
28
29
|
classNames,
|
|
29
30
|
style = 'primary',
|
|
@@ -31,13 +32,15 @@ const Pagination = exports.Pagination = /*#__PURE__*/React.forwardRef((props, re
|
|
|
31
32
|
currentPage = 1,
|
|
32
33
|
totalPages = 1,
|
|
33
34
|
onChange,
|
|
34
|
-
showFirstButton = style !== 'primary' &&
|
|
35
|
-
showLastButton = style !== 'primary' &&
|
|
35
|
+
showFirstButton = style !== 'primary' && !isCompact,
|
|
36
|
+
showLastButton = style !== 'primary' && !isCompact,
|
|
36
37
|
staticPaginationLabel,
|
|
37
38
|
testId,
|
|
38
39
|
...restPaginationProps
|
|
39
40
|
} = props;
|
|
40
|
-
const
|
|
41
|
+
const isNotPrimary = style !== 'primary';
|
|
42
|
+
const showPageSelectionDropDown = isNotPrimary && !isCompact;
|
|
43
|
+
const showChildren = !(style === 'primary' && isCompact);
|
|
41
44
|
const {
|
|
42
45
|
items
|
|
43
46
|
} = (0, _usePagination.usePagination)({
|
|
@@ -63,8 +66,10 @@ const Pagination = exports.Pagination = /*#__PURE__*/React.forwardRef((props, re
|
|
|
63
66
|
base: testId,
|
|
64
67
|
slot: 'root'
|
|
65
68
|
}),
|
|
66
|
-
className: (0, _classify.default)(_PaginationModule.default.wrapper,
|
|
67
|
-
|
|
69
|
+
className: (0, _classify.default)(_PaginationModule.default.wrapper, {
|
|
70
|
+
[_PaginationModule.default.wrapperCompact]: style === 'primary' && isCompact
|
|
71
|
+
}, classNames?.wrapper),
|
|
72
|
+
children: [showChildren && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
73
|
className: (0, _classify.default)(_PaginationModule.default.childrenSlot, classNames?.children),
|
|
69
74
|
"data-testid": (0, _qa.generateTestId)({
|
|
70
75
|
base: testId,
|
|
@@ -77,7 +82,7 @@ const Pagination = exports.Pagination = /*#__PURE__*/React.forwardRef((props, re
|
|
|
77
82
|
base: testId,
|
|
78
83
|
slot: 'paginator-slots'
|
|
79
84
|
}),
|
|
80
|
-
children: [
|
|
85
|
+
children: [isNotPrimary && showPageSelectionDropDown && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
81
86
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.Dropdown, {
|
|
82
87
|
size: "small",
|
|
83
88
|
classNames: {
|
|
@@ -105,8 +110,16 @@ const Pagination = exports.Pagination = /*#__PURE__*/React.forwardRef((props, re
|
|
|
105
110
|
base: testId,
|
|
106
111
|
slot: 'label'
|
|
107
112
|
}),
|
|
108
|
-
children: staticPaginationLabel ? staticPaginationLabel : `of ${totalPages} ${
|
|
113
|
+
children: staticPaginationLabel ? staticPaginationLabel : `of ${totalPages} ${(0, _string.formatWord)('Page', totalPages)}`
|
|
109
114
|
})]
|
|
115
|
+
}), isNotPrimary && isCompact && !!totalPages && !!currentPage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.SubTitleExtraSmall, {
|
|
116
|
+
color: "tertiary",
|
|
117
|
+
className: _PaginationModule.default.secondaryLabel,
|
|
118
|
+
testId: (0, _qa.generateTestId)({
|
|
119
|
+
base: testId,
|
|
120
|
+
slot: 'label'
|
|
121
|
+
}),
|
|
122
|
+
children: staticPaginationLabel ? staticPaginationLabel : `${currentPage} of ${totalPages} ${(0, _string.formatWord)('Page', totalPages)}`
|
|
110
123
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
111
124
|
className: (0, _classify.default)(_PaginationModule.default.paginatorSlot, classNames?.paginator),
|
|
112
125
|
"data-testid": (0, _qa.generateTestId)({
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
justify-content: space-between;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.wrapperCompact {
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
.childrenSlot {
|
|
14
18
|
display: flex;
|
|
15
19
|
}
|
|
@@ -21,6 +25,7 @@
|
|
|
21
25
|
|
|
22
26
|
.paginatorSlots {
|
|
23
27
|
display: flex;
|
|
28
|
+
align-items: center;
|
|
24
29
|
gap: spaceSmall;
|
|
25
30
|
}
|
|
26
31
|
|
|
@@ -4,12 +4,18 @@ type ClassNames = Readonly<{
|
|
|
4
4
|
wrapper?: string;
|
|
5
5
|
donutChart?: string;
|
|
6
6
|
}>;
|
|
7
|
-
export
|
|
7
|
+
export type ProgressDonutProps = {
|
|
8
8
|
classNames?: ClassNames;
|
|
9
9
|
color?: keyof typeof COLORS;
|
|
10
|
-
|
|
10
|
+
size?: 'small' | 'medium';
|
|
11
11
|
testId?: string;
|
|
12
|
-
}
|
|
12
|
+
} & ({
|
|
13
|
+
percentage?: number;
|
|
14
|
+
rating?: never;
|
|
15
|
+
} | {
|
|
16
|
+
rating: number;
|
|
17
|
+
percentage?: never;
|
|
18
|
+
});
|
|
13
19
|
export declare const ProgressDonut: Flow.AbstractComponent<ProgressDonutProps, HTMLDivElement>;
|
|
14
20
|
export {};
|
|
15
21
|
//# sourceMappingURL=ProgressDonut.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressDonut.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressDonut/ProgressDonut.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressDonut.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressDonut/ProgressDonut.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAuBtD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,CACA;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAC,GACrC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAC,CACvC,CAAC;AAcF,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,cAAc,CAsGf,CAAC"}
|
|
@@ -13,14 +13,24 @@ var _ProgressDonutModule = _interopRequireDefault(require("./ProgressDonut.modul
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
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); }
|
|
16
|
-
const STROKE_WIDTH = 8;
|
|
17
16
|
const MIN_PERCENTAGE = 0;
|
|
18
17
|
const DIVISOR_TWO = 2;
|
|
19
18
|
const MAX_PERCENTAGE = 100;
|
|
19
|
+
const MAX_RATING = 10;
|
|
20
|
+
const MIN_RATING = 0;
|
|
20
21
|
const SUCCESS_THRESHOLD = 80;
|
|
21
|
-
const LARGE_DONUT_SIZE = 72;
|
|
22
22
|
const INFO_THRESHOLD = 50;
|
|
23
23
|
const WARNING_THRESHOLD = 30;
|
|
24
|
+
const DONUT_CONFIG = {
|
|
25
|
+
small: {
|
|
26
|
+
size: 34,
|
|
27
|
+
strokeWidth: 4
|
|
28
|
+
},
|
|
29
|
+
medium: {
|
|
30
|
+
size: 72,
|
|
31
|
+
strokeWidth: 8
|
|
32
|
+
}
|
|
33
|
+
};
|
|
24
34
|
const getProgressDonutColor = percentage => {
|
|
25
35
|
if (percentage >= SUCCESS_THRESHOLD) {
|
|
26
36
|
return COLORS.colorSuccess;
|
|
@@ -35,15 +45,29 @@ const getProgressDonutColor = percentage => {
|
|
|
35
45
|
const ProgressDonut = exports.ProgressDonut = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
36
46
|
let {
|
|
37
47
|
classNames,
|
|
38
|
-
percentage
|
|
48
|
+
percentage,
|
|
49
|
+
rating,
|
|
39
50
|
color,
|
|
51
|
+
size = 'medium',
|
|
40
52
|
testId
|
|
41
53
|
} = _ref;
|
|
42
|
-
const
|
|
54
|
+
const clampedRating = rating !== undefined ? Math.min(Math.max(Math.round(rating), MIN_RATING), MAX_RATING) : undefined;
|
|
55
|
+
const donutPercentage = React.useMemo(() => {
|
|
56
|
+
if (clampedRating !== undefined) {
|
|
57
|
+
return clampedRating / MAX_RATING * MAX_PERCENTAGE;
|
|
58
|
+
}
|
|
59
|
+
return Math.min(Math.max(percentage ?? 0, MIN_PERCENTAGE), MAX_PERCENTAGE);
|
|
60
|
+
}, [percentage, clampedRating]);
|
|
43
61
|
const donutColor = React.useMemo(() => getProgressDonutColor(donutPercentage), [donutPercentage]);
|
|
44
|
-
const
|
|
62
|
+
const {
|
|
63
|
+
size: donutSize,
|
|
64
|
+
strokeWidth
|
|
65
|
+
} = DONUT_CONFIG[size];
|
|
66
|
+
const radius = React.useMemo(() => (donutSize - strokeWidth) / DIVISOR_TWO, [donutSize, strokeWidth]);
|
|
45
67
|
const circumference = React.useMemo(() => DIVISOR_TWO * Math.PI * radius, [radius]);
|
|
46
68
|
const offset = React.useMemo(() => circumference - donutPercentage / MAX_PERCENTAGE * circumference, [circumference, donutPercentage]);
|
|
69
|
+
const displayValue = clampedRating !== undefined ? `${clampedRating}` : `${donutPercentage}%`;
|
|
70
|
+
const TextComponent = size === 'small' ? _Text.BodyMediumBold : _Text.BodyLargeBold;
|
|
47
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
48
72
|
ref: ref,
|
|
49
73
|
"data-testid": (0, _qa.generateTestId)({
|
|
@@ -54,34 +78,36 @@ const ProgressDonut = exports.ProgressDonut = /*#__PURE__*/React.forwardRef((_re
|
|
|
54
78
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
55
79
|
className: (0, _classify.default)(_ProgressDonutModule.default.donutChart, classNames?.donutChart),
|
|
56
80
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
57
|
-
width:
|
|
58
|
-
height:
|
|
59
|
-
viewBox: `0 0 ${
|
|
81
|
+
width: donutSize,
|
|
82
|
+
height: donutSize,
|
|
83
|
+
viewBox: `0 0 ${donutSize} ${donutSize}`,
|
|
60
84
|
className: _ProgressDonutModule.default.donutChartSvg,
|
|
61
85
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
62
86
|
className: _ProgressDonutModule.default.donutChartBackground,
|
|
63
|
-
cx:
|
|
64
|
-
cy:
|
|
87
|
+
cx: donutSize / DIVISOR_TWO,
|
|
88
|
+
cy: donutSize / DIVISOR_TWO,
|
|
65
89
|
r: radius,
|
|
66
|
-
strokeWidth:
|
|
90
|
+
strokeWidth: strokeWidth
|
|
67
91
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
68
92
|
className: _ProgressDonutModule.default.donutChartForeground,
|
|
69
|
-
cx:
|
|
70
|
-
cy:
|
|
93
|
+
cx: donutSize / DIVISOR_TWO,
|
|
94
|
+
cy: donutSize / DIVISOR_TWO,
|
|
71
95
|
r: radius,
|
|
72
|
-
strokeWidth:
|
|
96
|
+
strokeWidth: strokeWidth,
|
|
73
97
|
strokeDasharray: circumference,
|
|
74
98
|
strokeDashoffset: donutPercentage === MIN_PERCENTAGE ? circumference : offset,
|
|
75
99
|
stroke: COLORS[color || ''] || donutColor,
|
|
76
100
|
strokeLinecap: "round"
|
|
77
101
|
})]
|
|
78
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
79
|
-
className: _ProgressDonutModule.default.donutChartPercentage,
|
|
102
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(TextComponent, {
|
|
103
|
+
className: (0, _classify.default)(_ProgressDonutModule.default.donutChartPercentage, {
|
|
104
|
+
[_ProgressDonutModule.default.donutChartPercentageSmallPercent]: size === 'small' && rating === undefined
|
|
105
|
+
}),
|
|
80
106
|
testId: (0, _qa.generateTestId)({
|
|
81
107
|
base: testId,
|
|
82
108
|
slot: 'percentage'
|
|
83
109
|
}),
|
|
84
|
-
children:
|
|
110
|
+
children: displayValue
|
|
85
111
|
})]
|
|
86
112
|
})
|
|
87
113
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
borderRadiusSmall
|
|
3
3
|
) from '../../styles/variables/_border.css';
|
|
4
4
|
@value (spaceHalfFluid, spaceNegHalfFluid) from '../../styles/variables/_space.css';
|
|
5
|
+
@value (fontSize12) from '../../styles/variables/_font.css';
|
|
5
6
|
@value (size10, size20, sizeFluid) from
|
|
6
7
|
'../../styles/variables/_size.css';
|
|
7
8
|
@value (
|
|
@@ -41,3 +42,7 @@
|
|
|
41
42
|
.donutChartPercentage {
|
|
42
43
|
position: absolute;
|
|
43
44
|
}
|
|
45
|
+
|
|
46
|
+
.donutChartPercentageSmallPercent {
|
|
47
|
+
font-size: fontSize12;
|
|
48
|
+
}
|
|
@@ -39,6 +39,7 @@ export interface TableHeaderProps<T, U> {
|
|
|
39
39
|
}) => unknown;
|
|
40
40
|
disabled?: boolean;
|
|
41
41
|
stickyHeader?: boolean;
|
|
42
|
+
checkboxClassName?: string;
|
|
42
43
|
testId?: string;
|
|
43
44
|
}
|
|
44
45
|
export declare function DefaultTableHeader<T extends GenericObject, U extends GenericObject>(props: TableHeaderProps<T, U>): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultTableHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Table/DefaultTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAOzE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAM9D,MAAM,WAAW,iBAAiB,CAAC,CAAC,EAAE,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CA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|
} = props;
|
|
68
69
|
const tableHeaderCells = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
@@ -155,19 +156,17 @@ function DefaultTableHeader(props) {
|
|
|
155
156
|
className: _TableModule.default.defaultHeaderRow,
|
|
156
157
|
children: [handleCheckboxClick && /*#__PURE__*/(0, _jsxRuntime.jsx)(BasicHeadCell, {
|
|
157
158
|
scope: "col",
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
slot: 'select-all-checkbox'
|
|
170
|
-
})
|
|
159
|
+
className: (0, _classify.default)(_TableModule.default.checkbox, checkboxClassName),
|
|
160
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.Checkbox, {
|
|
161
|
+
value: "all",
|
|
162
|
+
checked: checked === 'true' ? true : false,
|
|
163
|
+
indeterminate: checked === 'mixed',
|
|
164
|
+
onChange: handleCheckboxClick,
|
|
165
|
+
disabled: disabled,
|
|
166
|
+
ariaLabel: "Select all rows",
|
|
167
|
+
testId: (0, _qa.generateTestId)({
|
|
168
|
+
base: testId,
|
|
169
|
+
slot: 'select-all-checkbox'
|
|
171
170
|
})
|
|
172
171
|
})
|
|
173
172
|
}), tableHeaderCells()]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticTable.d.ts","sourceRoot":"","sources":["../../../src/components/Table/StaticTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AASzE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EAEb,UAAU,EACX,MAAM,4BAA4B,CAAC;AAKpC,eAAO,MAAM,UAAU,EAAE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6 +147,7 @@ function TableWrapper(_ref3) {
|
|
|
147
147
|
disabled: disabled,
|
|
148
148
|
handleCheckboxClick: handleHeaderCheckboxClick,
|
|
149
149
|
stickyHeader: stickyHeader,
|
|
150
|
+
checkboxClassName: classNames?.checkbox,
|
|
150
151
|
checked: selectedKeys == null || selectedKeys.length === 0 ? 'false' : selectedKeys.length < entriesLength ? 'mixed' : 'true',
|
|
151
152
|
testId: (0, _qa.generateTestId)({
|
|
152
153
|
base: testId,
|
package/mcp/package.json
CHANGED