@x-plat/design-system 0.1.5 → 0.2.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/dist/{colors-BG91q_uV.d.cts → colors-DmMsWD7G.d.cts} +20 -4
- package/dist/{colors-BG91q_uV.d.ts → colors-DmMsWD7G.d.ts} +20 -4
- package/dist/components/Accordion/index.cjs +25 -14
- package/dist/components/Accordion/index.css +6 -6
- package/dist/components/Accordion/index.d.cts +16 -3
- package/dist/components/Accordion/index.d.ts +16 -3
- package/dist/components/Accordion/index.js +25 -14
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/index.css +16 -16
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Avatar/index.cjs +1 -1
- package/dist/components/Avatar/index.css +3 -279
- package/dist/components/Avatar/index.d.cts +2 -118
- package/dist/components/Avatar/index.d.ts +2 -118
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Badge/index.cjs +3 -2
- package/dist/components/Badge/index.css +23 -279
- package/dist/components/Badge/index.d.cts +4 -118
- package/dist/components/Badge/index.d.ts +4 -118
- package/dist/components/Badge/index.js +3 -2
- package/dist/components/Breadcrumb/index.cjs +1 -1
- package/dist/components/Breadcrumb/index.css +4 -4
- package/dist/components/Breadcrumb/index.js +1 -1
- package/dist/components/Button/index.cjs +3 -2
- package/dist/components/Button/index.css +26 -1214
- package/dist/components/Button/index.d.cts +4 -118
- package/dist/components/Button/index.d.ts +4 -118
- package/dist/components/Button/index.js +3 -2
- package/dist/components/Card/index.cjs +1 -1
- package/dist/components/Card/index.css +3 -3
- package/dist/components/Card/index.js +1 -1
- package/dist/components/CardTab/index.cjs +124 -0
- package/dist/components/CardTab/index.css +78 -0
- package/dist/components/CardTab/index.d.cts +44 -0
- package/dist/components/CardTab/index.d.ts +44 -0
- package/dist/components/CardTab/index.js +87 -0
- package/dist/components/CheckBox/index.cjs +3 -2
- package/dist/components/CheckBox/index.css +27 -563
- package/dist/components/CheckBox/index.d.cts +5 -119
- package/dist/components/CheckBox/index.d.ts +5 -119
- package/dist/components/CheckBox/index.js +3 -2
- package/dist/components/Chip/index.cjs +3 -2
- package/dist/components/Chip/index.css +21 -1209
- package/dist/components/Chip/index.d.cts +4 -118
- package/dist/components/Chip/index.d.ts +4 -118
- package/dist/components/Chip/index.js +3 -2
- package/dist/components/DatePicker/index.cjs +5 -3
- package/dist/components/DatePicker/index.css +62 -1239
- package/dist/components/DatePicker/index.d.cts +3 -235
- package/dist/components/DatePicker/index.d.ts +3 -235
- package/dist/components/DatePicker/index.js +5 -3
- package/dist/components/Divider/index.cjs +1 -1
- package/dist/components/Divider/index.css +2 -2
- package/dist/components/Divider/index.js +1 -1
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.css +5 -5
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Dropdown/index.cjs +1 -1
- package/dist/components/Dropdown/index.css +7 -7
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/EmptyState/index.cjs +1 -1
- package/dist/components/EmptyState/index.css +3 -3
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/FileUpload/index.cjs +1 -1
- package/dist/components/FileUpload/index.css +8 -8
- package/dist/components/FileUpload/index.js +1 -1
- package/dist/components/HtmlTypeWriter/index.css +1 -1
- package/dist/components/ImageSelector/index.css +9 -9
- package/dist/components/Input/index.cjs +3 -2
- package/dist/components/Input/index.css +21 -10
- package/dist/components/Input/index.d.cts +6 -2
- package/dist/components/Input/index.d.ts +6 -2
- package/dist/components/Input/index.js +3 -2
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Pagination/index.cjs +3 -2
- package/dist/components/Pagination/index.css +33 -283
- package/dist/components/Pagination/index.d.cts +4 -118
- package/dist/components/Pagination/index.d.ts +4 -118
- package/dist/components/Pagination/index.js +3 -2
- package/dist/components/PopOver/index.cjs +1 -1
- package/dist/components/PopOver/index.js +1 -1
- package/dist/components/Progress/index.cjs +1 -1
- package/dist/components/Progress/index.css +3 -281
- package/dist/components/Progress/index.d.cts +2 -118
- package/dist/components/Progress/index.d.ts +2 -118
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/Radio/index.cjs +4 -1
- package/dist/components/Radio/index.css +36 -747
- package/dist/components/Radio/index.d.cts +6 -119
- package/dist/components/Radio/index.d.ts +6 -119
- package/dist/components/Radio/index.js +4 -1
- package/dist/components/Select/index.cjs +4 -2
- package/dist/components/Select/index.css +38 -18
- package/dist/components/Select/index.d.cts +3 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.js +4 -2
- package/dist/components/Skeleton/index.cjs +1 -1
- package/dist/components/Skeleton/index.css +1 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Spinner/index.cjs +1 -1
- package/dist/components/Spinner/index.css +2 -280
- package/dist/components/Spinner/index.d.cts +2 -118
- package/dist/components/Spinner/index.d.ts +2 -118
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/Steps/index.cjs +1 -1
- package/dist/components/Steps/index.css +14 -846
- package/dist/components/Steps/index.d.cts +2 -118
- package/dist/components/Steps/index.d.ts +2 -118
- package/dist/components/Steps/index.js +1 -1
- package/dist/components/Switch/index.cjs +1 -1
- package/dist/components/Switch/index.css +9 -745
- package/dist/components/Switch/index.d.cts +2 -118
- package/dist/components/Switch/index.d.ts +2 -118
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Tab/index.cjs +3 -3
- package/dist/components/Tab/index.css +20 -9
- package/dist/components/Tab/index.d.cts +2 -0
- package/dist/components/Tab/index.d.ts +2 -0
- package/dist/components/Tab/index.js +3 -3
- package/dist/components/Table/index.cjs +1 -1
- package/dist/components/Table/index.css +47 -4003
- package/dist/components/Table/index.d.cts +2 -118
- package/dist/components/Table/index.d.ts +2 -118
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/index.cjs +3 -2
- package/dist/components/Tag/index.css +27 -467
- package/dist/components/Tag/index.d.cts +4 -118
- package/dist/components/Tag/index.d.ts +4 -118
- package/dist/components/Tag/index.js +3 -2
- package/dist/components/TextArea/index.cjs +1 -1
- package/dist/components/TextArea/index.css +4 -4
- package/dist/components/TextArea/index.js +1 -1
- package/dist/components/Toast/index.cjs +1 -1
- package/dist/components/Toast/index.css +8 -8
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Tooltip/index.cjs +1 -1
- package/dist/components/Tooltip/index.css +4 -560
- package/dist/components/Tooltip/index.d.cts +2 -118
- package/dist/components/Tooltip/index.d.ts +2 -118
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/Video/index.cjs +1 -1
- package/dist/components/Video/index.css +3 -3
- package/dist/components/Video/index.js +1 -1
- package/dist/components/index.cjs +441 -347
- package/dist/components/index.css +1278 -12638
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +439 -346
- package/dist/index.cjs +466 -371
- package/dist/index.css +1281 -12641
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +466 -370
- package/dist/layout/Grid/FullGrid/index.cjs +1 -1
- package/dist/layout/Grid/FullGrid/index.js +1 -1
- package/dist/layout/Grid/FullScreen/index.cjs +1 -1
- package/dist/layout/Grid/FullScreen/index.js +1 -1
- package/dist/layout/Grid/Item/index.cjs +1 -1
- package/dist/layout/Grid/Item/index.js +1 -1
- package/dist/layout/Grid/index.cjs +1 -1
- package/dist/layout/Grid/index.js +1 -1
- package/dist/layout/Header/index.css +2 -2
- package/dist/layout/Layout/index.css +1 -1
- package/dist/layout/SideBar/index.cjs +1 -1
- package/dist/layout/SideBar/index.js +1 -1
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.css +3 -3
- package/dist/layout/index.js +1 -1
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/package.json +12 -12
- package/README.md +0 -123
|
@@ -121,13 +121,29 @@ declare const colors: {
|
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
/**
|
|
125
|
+
* 브랜드 토큰 패키지에서 확장 가능한 인터페이스.
|
|
126
|
+
* declare module "@x-plat/design-system" 로 머지하면 됨.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* // @x-plat/tokens-cbio/types.d.ts
|
|
130
|
+
* declare module "@x-plat/design-system" {
|
|
131
|
+
* interface CustomColors {
|
|
132
|
+
* primitive: { 500: string; 600: string };
|
|
133
|
+
* }
|
|
134
|
+
* }
|
|
135
|
+
*/
|
|
136
|
+
interface CustomColors {
|
|
137
|
+
}
|
|
138
|
+
type DefaultColors = typeof colors;
|
|
139
|
+
type MergedNamespaceColors<N extends keyof DefaultColors> = DefaultColors[N] & (N extends "xplat" ? CustomColors : {});
|
|
140
|
+
type ColorNamespace = keyof DefaultColors;
|
|
141
|
+
type ColorName<C extends ColorNamespace> = keyof MergedNamespaceColors<C>;
|
|
142
|
+
type ColorDepth<C extends ColorNamespace, K extends ColorName<C>> = K extends keyof MergedNamespaceColors<C> ? MergedNamespaceColors<C>[K] extends string ? undefined : keyof MergedNamespaceColors<C>[K] : undefined;
|
|
127
143
|
interface ColorProps<N extends ColorNamespace, C extends ColorName<N> = ColorName<N>> {
|
|
128
144
|
colorNamespace?: N;
|
|
129
145
|
color?: C;
|
|
130
146
|
colorDepth?: ColorDepth<N, C>;
|
|
131
147
|
}
|
|
132
148
|
|
|
133
|
-
export { type
|
|
149
|
+
export { type CustomColors as C, type ColorNamespace as a, type ColorName as b, colors as c, type ColorDepth as d, type ColorProps as e };
|
|
@@ -121,13 +121,29 @@ declare const colors: {
|
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
/**
|
|
125
|
+
* 브랜드 토큰 패키지에서 확장 가능한 인터페이스.
|
|
126
|
+
* declare module "@x-plat/design-system" 로 머지하면 됨.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* // @x-plat/tokens-cbio/types.d.ts
|
|
130
|
+
* declare module "@x-plat/design-system" {
|
|
131
|
+
* interface CustomColors {
|
|
132
|
+
* primitive: { 500: string; 600: string };
|
|
133
|
+
* }
|
|
134
|
+
* }
|
|
135
|
+
*/
|
|
136
|
+
interface CustomColors {
|
|
137
|
+
}
|
|
138
|
+
type DefaultColors = typeof colors;
|
|
139
|
+
type MergedNamespaceColors<N extends keyof DefaultColors> = DefaultColors[N] & (N extends "xplat" ? CustomColors : {});
|
|
140
|
+
type ColorNamespace = keyof DefaultColors;
|
|
141
|
+
type ColorName<C extends ColorNamespace> = keyof MergedNamespaceColors<C>;
|
|
142
|
+
type ColorDepth<C extends ColorNamespace, K extends ColorName<C>> = K extends keyof MergedNamespaceColors<C> ? MergedNamespaceColors<C>[K] extends string ? undefined : keyof MergedNamespaceColors<C>[K] : undefined;
|
|
127
143
|
interface ColorProps<N extends ColorNamespace, C extends ColorName<N> = ColorName<N>> {
|
|
128
144
|
colorNamespace?: N;
|
|
129
145
|
color?: C;
|
|
130
146
|
colorDepth?: ColorDepth<N, C>;
|
|
131
147
|
}
|
|
132
148
|
|
|
133
|
-
export { type
|
|
149
|
+
export { type CustomColors as C, type ColorNamespace as a, type ColorName as b, colors as c, type ColorDepth as d, type ColorProps as e };
|
|
@@ -937,7 +937,7 @@ var import_jsx_runtime293 = require("react/jsx-runtime");
|
|
|
937
937
|
// src/tokens/svg/validation/SuccessIcon.tsx
|
|
938
938
|
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
939
939
|
|
|
940
|
-
// node_modules/clsx/dist/clsx.mjs
|
|
940
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
941
941
|
function r(e) {
|
|
942
942
|
var t, f, n = "";
|
|
943
943
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -988,26 +988,37 @@ var AccordionItem = ({ item, isOpen, onToggle }) => {
|
|
|
988
988
|
] });
|
|
989
989
|
};
|
|
990
990
|
var Accordion = (props) => {
|
|
991
|
-
const { items,
|
|
992
|
-
const
|
|
993
|
-
|
|
991
|
+
const { items, className } = props;
|
|
992
|
+
const isMultiple = props.multiple === true;
|
|
993
|
+
const controlledKeys = isMultiple ? props.activeKeys : props.activeKey !== void 0 ? props.activeKey !== null ? [props.activeKey] : [] : void 0;
|
|
994
|
+
const defaultKeys = isMultiple ? props.defaultActiveKeys ?? [] : props.defaultActiveKey ? [props.defaultActiveKey] : [];
|
|
995
|
+
const isControlled = controlledKeys !== void 0;
|
|
996
|
+
const [uncontrolledKeys, setUncontrolledKeys] = import_react.default.useState(
|
|
997
|
+
new Set(defaultKeys)
|
|
994
998
|
);
|
|
999
|
+
const currentKeys = isControlled ? new Set(controlledKeys) : uncontrolledKeys;
|
|
995
1000
|
const toggle = (key) => {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
}
|
|
1001
|
+
const next = new Set(isMultiple ? currentKeys : []);
|
|
1002
|
+
if (currentKeys.has(key)) {
|
|
1003
|
+
next.delete(key);
|
|
1004
|
+
} else {
|
|
1005
|
+
next.add(key);
|
|
1006
|
+
}
|
|
1007
|
+
if (!isControlled) {
|
|
1008
|
+
setUncontrolledKeys(next);
|
|
1009
|
+
}
|
|
1010
|
+
if (isMultiple) {
|
|
1011
|
+
props.onChange?.([...next]);
|
|
1012
|
+
} else {
|
|
1013
|
+
const first = [...next][0] ?? null;
|
|
1014
|
+
props.onChange?.(first);
|
|
1015
|
+
}
|
|
1005
1016
|
};
|
|
1006
1017
|
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: clsx_default("lib-xplat-accordion", className), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
1007
1018
|
AccordionItem,
|
|
1008
1019
|
{
|
|
1009
1020
|
item,
|
|
1010
|
-
isOpen:
|
|
1021
|
+
isOpen: currentKeys.has(item.key),
|
|
1011
1022
|
onToggle: () => toggle(item.key)
|
|
1012
1023
|
},
|
|
1013
1024
|
item.key
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* src/components/Accordion/accordion.scss */
|
|
2
2
|
.lib-xplat-accordion {
|
|
3
|
-
border: 1px solid
|
|
3
|
+
border: 1px solid var(--xplat-neutral-200);
|
|
4
4
|
border-radius: 0.5rem;
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
}
|
|
7
7
|
.lib-xplat-accordion .accordion-item {
|
|
8
|
-
border-bottom: 1px solid
|
|
8
|
+
border-bottom: 1px solid var(--xplat-neutral-200);
|
|
9
9
|
}
|
|
10
10
|
.lib-xplat-accordion .accordion-item:last-child {
|
|
11
11
|
border-bottom: none;
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
font-size: 14px;
|
|
23
23
|
font-weight: 500;
|
|
24
|
-
color:
|
|
24
|
+
color: var(--xplat-neutral-900);
|
|
25
25
|
text-align: left;
|
|
26
26
|
transition: background-color 0.2s;
|
|
27
27
|
}
|
|
28
28
|
.lib-xplat-accordion .accordion-header:hover {
|
|
29
|
-
background-color:
|
|
29
|
+
background-color: var(--xplat-neutral-50);
|
|
30
30
|
}
|
|
31
31
|
.lib-xplat-accordion .accordion-header .chevron {
|
|
32
32
|
width: 20px;
|
|
33
33
|
height: 20px;
|
|
34
34
|
flex-shrink: 0;
|
|
35
35
|
transition: transform 0.25s ease;
|
|
36
|
-
color:
|
|
36
|
+
color: var(--xplat-neutral-500);
|
|
37
37
|
}
|
|
38
38
|
.lib-xplat-accordion .accordion-body {
|
|
39
39
|
overflow: hidden;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
.lib-xplat-accordion .accordion-content {
|
|
44
44
|
padding: 0 1rem 0.875rem;
|
|
45
45
|
font-size: 14px;
|
|
46
|
-
color:
|
|
46
|
+
color: var(--xplat-neutral-600);
|
|
47
47
|
line-height: 1.6;
|
|
48
48
|
}
|
|
49
49
|
.lib-xplat-accordion .accordion-item.open .chevron {
|
|
@@ -5,12 +5,25 @@ interface AccordionItemData {
|
|
|
5
5
|
title: React.ReactNode;
|
|
6
6
|
content: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
8
|
+
interface AccordionBaseProps {
|
|
9
9
|
items: AccordionItemData[];
|
|
10
|
-
multiple?: boolean;
|
|
11
|
-
defaultActiveKeys?: string[];
|
|
12
10
|
className?: string;
|
|
13
11
|
}
|
|
12
|
+
interface AccordionSingleProps extends AccordionBaseProps {
|
|
13
|
+
multiple?: false;
|
|
14
|
+
/** 열려있는 아이템 key (controlled) */
|
|
15
|
+
activeKey?: string | null;
|
|
16
|
+
defaultActiveKey?: string;
|
|
17
|
+
onChange?: (key: string | null) => void;
|
|
18
|
+
}
|
|
19
|
+
interface AccordionMultipleProps extends AccordionBaseProps {
|
|
20
|
+
multiple: true;
|
|
21
|
+
/** 열려있는 아이템 key 목록 (controlled) */
|
|
22
|
+
activeKeys?: string[];
|
|
23
|
+
defaultActiveKeys?: string[];
|
|
24
|
+
onChange?: (keys: string[]) => void;
|
|
25
|
+
}
|
|
26
|
+
type AccordionProps = AccordionSingleProps | AccordionMultipleProps;
|
|
14
27
|
declare const Accordion: React.FC<AccordionProps>;
|
|
15
28
|
|
|
16
29
|
export { Accordion };
|
|
@@ -5,12 +5,25 @@ interface AccordionItemData {
|
|
|
5
5
|
title: React.ReactNode;
|
|
6
6
|
content: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
8
|
+
interface AccordionBaseProps {
|
|
9
9
|
items: AccordionItemData[];
|
|
10
|
-
multiple?: boolean;
|
|
11
|
-
defaultActiveKeys?: string[];
|
|
12
10
|
className?: string;
|
|
13
11
|
}
|
|
12
|
+
interface AccordionSingleProps extends AccordionBaseProps {
|
|
13
|
+
multiple?: false;
|
|
14
|
+
/** 열려있는 아이템 key (controlled) */
|
|
15
|
+
activeKey?: string | null;
|
|
16
|
+
defaultActiveKey?: string;
|
|
17
|
+
onChange?: (key: string | null) => void;
|
|
18
|
+
}
|
|
19
|
+
interface AccordionMultipleProps extends AccordionBaseProps {
|
|
20
|
+
multiple: true;
|
|
21
|
+
/** 열려있는 아이템 key 목록 (controlled) */
|
|
22
|
+
activeKeys?: string[];
|
|
23
|
+
defaultActiveKeys?: string[];
|
|
24
|
+
onChange?: (keys: string[]) => void;
|
|
25
|
+
}
|
|
26
|
+
type AccordionProps = AccordionSingleProps | AccordionMultipleProps;
|
|
14
27
|
declare const Accordion: React.FC<AccordionProps>;
|
|
15
28
|
|
|
16
29
|
export { Accordion };
|
|
@@ -901,7 +901,7 @@ import { jsx as jsx293, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
|
901
901
|
// src/tokens/svg/validation/SuccessIcon.tsx
|
|
902
902
|
import { jsx as jsx294 } from "react/jsx-runtime";
|
|
903
903
|
|
|
904
|
-
// node_modules/clsx/dist/clsx.mjs
|
|
904
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
905
905
|
function r(e) {
|
|
906
906
|
var t, f, n = "";
|
|
907
907
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -952,26 +952,37 @@ var AccordionItem = ({ item, isOpen, onToggle }) => {
|
|
|
952
952
|
] });
|
|
953
953
|
};
|
|
954
954
|
var Accordion = (props) => {
|
|
955
|
-
const { items,
|
|
956
|
-
const
|
|
957
|
-
|
|
955
|
+
const { items, className } = props;
|
|
956
|
+
const isMultiple = props.multiple === true;
|
|
957
|
+
const controlledKeys = isMultiple ? props.activeKeys : props.activeKey !== void 0 ? props.activeKey !== null ? [props.activeKey] : [] : void 0;
|
|
958
|
+
const defaultKeys = isMultiple ? props.defaultActiveKeys ?? [] : props.defaultActiveKey ? [props.defaultActiveKey] : [];
|
|
959
|
+
const isControlled = controlledKeys !== void 0;
|
|
960
|
+
const [uncontrolledKeys, setUncontrolledKeys] = React.useState(
|
|
961
|
+
new Set(defaultKeys)
|
|
958
962
|
);
|
|
963
|
+
const currentKeys = isControlled ? new Set(controlledKeys) : uncontrolledKeys;
|
|
959
964
|
const toggle = (key) => {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
}
|
|
965
|
+
const next = new Set(isMultiple ? currentKeys : []);
|
|
966
|
+
if (currentKeys.has(key)) {
|
|
967
|
+
next.delete(key);
|
|
968
|
+
} else {
|
|
969
|
+
next.add(key);
|
|
970
|
+
}
|
|
971
|
+
if (!isControlled) {
|
|
972
|
+
setUncontrolledKeys(next);
|
|
973
|
+
}
|
|
974
|
+
if (isMultiple) {
|
|
975
|
+
props.onChange?.([...next]);
|
|
976
|
+
} else {
|
|
977
|
+
const first = [...next][0] ?? null;
|
|
978
|
+
props.onChange?.(first);
|
|
979
|
+
}
|
|
969
980
|
};
|
|
970
981
|
return /* @__PURE__ */ jsx295("div", { className: clsx_default("lib-xplat-accordion", className), children: items.map((item) => /* @__PURE__ */ jsx295(
|
|
971
982
|
AccordionItem,
|
|
972
983
|
{
|
|
973
984
|
item,
|
|
974
|
-
isOpen:
|
|
985
|
+
isOpen: currentKeys.has(item.key),
|
|
975
986
|
onToggle: () => toggle(item.key)
|
|
976
987
|
},
|
|
977
988
|
item.key
|
|
@@ -24,7 +24,7 @@ __export(Alert_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(Alert_exports);
|
|
26
26
|
|
|
27
|
-
// node_modules/clsx/dist/clsx.mjs
|
|
27
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
28
28
|
function r(e) {
|
|
29
29
|
var t, f, n = "";
|
|
30
30
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -27,34 +27,34 @@
|
|
|
27
27
|
opacity: 1;
|
|
28
28
|
}
|
|
29
29
|
.lib-xplat-alert.info {
|
|
30
|
-
background-color:
|
|
31
|
-
border-color:
|
|
32
|
-
color:
|
|
30
|
+
background-color: var(--xplat-lightblue-50);
|
|
31
|
+
border-color: var(--xplat-lightblue-200);
|
|
32
|
+
color: var(--xplat-lightblue-700);
|
|
33
33
|
}
|
|
34
34
|
.lib-xplat-alert.info .close-btn {
|
|
35
|
-
color:
|
|
35
|
+
color: var(--xplat-lightblue-700);
|
|
36
36
|
}
|
|
37
37
|
.lib-xplat-alert.success {
|
|
38
|
-
background-color:
|
|
39
|
-
border-color:
|
|
40
|
-
color:
|
|
38
|
+
background-color: var(--xplat-green-50);
|
|
39
|
+
border-color: var(--xplat-green-200);
|
|
40
|
+
color: var(--xplat-green-700);
|
|
41
41
|
}
|
|
42
42
|
.lib-xplat-alert.success .close-btn {
|
|
43
|
-
color:
|
|
43
|
+
color: var(--xplat-green-700);
|
|
44
44
|
}
|
|
45
45
|
.lib-xplat-alert.warning {
|
|
46
|
-
background-color:
|
|
47
|
-
border-color:
|
|
48
|
-
color:
|
|
46
|
+
background-color: var(--xplat-yellow-50);
|
|
47
|
+
border-color: var(--xplat-yellow-200);
|
|
48
|
+
color: var(--xplat-yellow-700);
|
|
49
49
|
}
|
|
50
50
|
.lib-xplat-alert.warning .close-btn {
|
|
51
|
-
color:
|
|
51
|
+
color: var(--xplat-yellow-700);
|
|
52
52
|
}
|
|
53
53
|
.lib-xplat-alert.error {
|
|
54
|
-
background-color:
|
|
55
|
-
border-color:
|
|
56
|
-
color:
|
|
54
|
+
background-color: var(--xplat-red-50);
|
|
55
|
+
border-color: var(--xplat-red-200);
|
|
56
|
+
color: var(--xplat-red-700);
|
|
57
57
|
}
|
|
58
58
|
.lib-xplat-alert.error .close-btn {
|
|
59
|
-
color:
|
|
59
|
+
color: var(--xplat-red-700);
|
|
60
60
|
}
|
|
@@ -151,7 +151,7 @@ var getColorClass = (namespace, palette, shade) => {
|
|
|
151
151
|
return `${String(namespace)}-${String(palette)}${hasShade ? `-${String(shade)}` : ""}`;
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
// node_modules/clsx/dist/clsx.mjs
|
|
154
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
155
155
|
function r(e) {
|
|
156
156
|
var t, f, n = "";
|
|
157
157
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -34,289 +34,13 @@
|
|
|
34
34
|
display: flex;
|
|
35
35
|
align-items: center;
|
|
36
36
|
justify-content: center;
|
|
37
|
-
color:
|
|
37
|
+
color: var(--xplat-white);
|
|
38
38
|
font-weight: 600;
|
|
39
39
|
}
|
|
40
40
|
.lib-xplat-avatar .fallback svg {
|
|
41
41
|
width: 60%;
|
|
42
42
|
height: 60%;
|
|
43
43
|
}
|
|
44
|
-
.lib-xplat-avatar .fallback
|
|
45
|
-
background-color:
|
|
46
|
-
}
|
|
47
|
-
.lib-xplat-avatar .fallback.xplat-red-100 {
|
|
48
|
-
background-color: #FFDDDE;
|
|
49
|
-
}
|
|
50
|
-
.lib-xplat-avatar .fallback.xplat-red-200 {
|
|
51
|
-
background-color: #FFC1C2;
|
|
52
|
-
}
|
|
53
|
-
.lib-xplat-avatar .fallback.xplat-red-300 {
|
|
54
|
-
background-color: #FF9698;
|
|
55
|
-
}
|
|
56
|
-
.lib-xplat-avatar .fallback.xplat-red-400 {
|
|
57
|
-
background-color: #FF5A5D;
|
|
58
|
-
}
|
|
59
|
-
.lib-xplat-avatar .fallback.xplat-red-500 {
|
|
60
|
-
background-color: #FF272B;
|
|
61
|
-
}
|
|
62
|
-
.lib-xplat-avatar .fallback.xplat-red-600 {
|
|
63
|
-
background-color: #F80409;
|
|
64
|
-
}
|
|
65
|
-
.lib-xplat-avatar .fallback.xplat-red-700 {
|
|
66
|
-
background-color: #D40105;
|
|
67
|
-
}
|
|
68
|
-
.lib-xplat-avatar .fallback.xplat-red-800 {
|
|
69
|
-
background-color: #AE0609;
|
|
70
|
-
}
|
|
71
|
-
.lib-xplat-avatar .fallback.xplat-red-900 {
|
|
72
|
-
background-color: #900C0F;
|
|
73
|
-
}
|
|
74
|
-
.lib-xplat-avatar .fallback.xplat-green-50 {
|
|
75
|
-
background-color: #E5F6EA;
|
|
76
|
-
}
|
|
77
|
-
.lib-xplat-avatar .fallback.xplat-green-100 {
|
|
78
|
-
background-color: #C1E7CC;
|
|
79
|
-
}
|
|
80
|
-
.lib-xplat-avatar .fallback.xplat-green-200 {
|
|
81
|
-
background-color: #98D8AC;
|
|
82
|
-
}
|
|
83
|
-
.lib-xplat-avatar .fallback.xplat-green-300 {
|
|
84
|
-
background-color: #6CCA8B;
|
|
85
|
-
}
|
|
86
|
-
.lib-xplat-avatar .fallback.xplat-green-400 {
|
|
87
|
-
background-color: #47BE72;
|
|
88
|
-
}
|
|
89
|
-
.lib-xplat-avatar .fallback.xplat-green-500 {
|
|
90
|
-
background-color: #10B259;
|
|
91
|
-
}
|
|
92
|
-
.lib-xplat-avatar .fallback.xplat-green-600 {
|
|
93
|
-
background-color: #00A34F;
|
|
94
|
-
}
|
|
95
|
-
.lib-xplat-avatar .fallback.xplat-green-700 {
|
|
96
|
-
background-color: #009143;
|
|
97
|
-
}
|
|
98
|
-
.lib-xplat-avatar .fallback.xplat-green-800 {
|
|
99
|
-
background-color: #007F38;
|
|
100
|
-
}
|
|
101
|
-
.lib-xplat-avatar .fallback.xplat-green-900 {
|
|
102
|
-
background-color: #006024;
|
|
103
|
-
}
|
|
104
|
-
.lib-xplat-avatar .fallback.xplat-orange-50 {
|
|
105
|
-
background-color: #FFF8EC;
|
|
106
|
-
}
|
|
107
|
-
.lib-xplat-avatar .fallback.xplat-orange-100 {
|
|
108
|
-
background-color: #FFF0D3;
|
|
109
|
-
}
|
|
110
|
-
.lib-xplat-avatar .fallback.xplat-orange-200 {
|
|
111
|
-
background-color: #FFDDA5;
|
|
112
|
-
}
|
|
113
|
-
.lib-xplat-avatar .fallback.xplat-orange-300 {
|
|
114
|
-
background-color: #FFC46D;
|
|
115
|
-
}
|
|
116
|
-
.lib-xplat-avatar .fallback.xplat-orange-400 {
|
|
117
|
-
background-color: #FF9F32;
|
|
118
|
-
}
|
|
119
|
-
.lib-xplat-avatar .fallback.xplat-orange-500 {
|
|
120
|
-
background-color: #FF820A;
|
|
121
|
-
}
|
|
122
|
-
.lib-xplat-avatar .fallback.xplat-orange-600 {
|
|
123
|
-
background-color: #FF6900;
|
|
124
|
-
}
|
|
125
|
-
.lib-xplat-avatar .fallback.xplat-orange-700 {
|
|
126
|
-
background-color: #CC4B02;
|
|
127
|
-
}
|
|
128
|
-
.lib-xplat-avatar .fallback.xplat-orange-800 {
|
|
129
|
-
background-color: #A13A0B;
|
|
130
|
-
}
|
|
131
|
-
.lib-xplat-avatar .fallback.xplat-orange-900 {
|
|
132
|
-
background-color: #82320C;
|
|
133
|
-
}
|
|
134
|
-
.lib-xplat-avatar .fallback.xplat-yellow-50 {
|
|
135
|
-
background-color: #FFFDE7;
|
|
136
|
-
}
|
|
137
|
-
.lib-xplat-avatar .fallback.xplat-yellow-100 {
|
|
138
|
-
background-color: #FFFAC1;
|
|
139
|
-
}
|
|
140
|
-
.lib-xplat-avatar .fallback.xplat-yellow-200 {
|
|
141
|
-
background-color: #FFF186;
|
|
142
|
-
}
|
|
143
|
-
.lib-xplat-avatar .fallback.xplat-yellow-300 {
|
|
144
|
-
background-color: #FFE041;
|
|
145
|
-
}
|
|
146
|
-
.lib-xplat-avatar .fallback.xplat-yellow-400 {
|
|
147
|
-
background-color: #FFCC0D;
|
|
148
|
-
}
|
|
149
|
-
.lib-xplat-avatar .fallback.xplat-yellow-500 {
|
|
150
|
-
background-color: #F0B100;
|
|
151
|
-
}
|
|
152
|
-
.lib-xplat-avatar .fallback.xplat-yellow-600 {
|
|
153
|
-
background-color: #D18800;
|
|
154
|
-
}
|
|
155
|
-
.lib-xplat-avatar .fallback.xplat-yellow-700 {
|
|
156
|
-
background-color: #A66002;
|
|
157
|
-
}
|
|
158
|
-
.lib-xplat-avatar .fallback.xplat-yellow-800 {
|
|
159
|
-
background-color: #894B0A;
|
|
160
|
-
}
|
|
161
|
-
.lib-xplat-avatar .fallback.xplat-yellow-900 {
|
|
162
|
-
background-color: #743D0F;
|
|
163
|
-
}
|
|
164
|
-
.lib-xplat-avatar .fallback.xplat-blue-50 {
|
|
165
|
-
background-color: #F1F4FD;
|
|
166
|
-
}
|
|
167
|
-
.lib-xplat-avatar .fallback.xplat-blue-100 {
|
|
168
|
-
background-color: #DFE7FA;
|
|
169
|
-
}
|
|
170
|
-
.lib-xplat-avatar .fallback.xplat-blue-200 {
|
|
171
|
-
background-color: #C5D4F8;
|
|
172
|
-
}
|
|
173
|
-
.lib-xplat-avatar .fallback.xplat-blue-300 {
|
|
174
|
-
background-color: #9EB8F2;
|
|
175
|
-
}
|
|
176
|
-
.lib-xplat-avatar .fallback.xplat-blue-400 {
|
|
177
|
-
background-color: #7093EA;
|
|
178
|
-
}
|
|
179
|
-
.lib-xplat-avatar .fallback.xplat-blue-500 {
|
|
180
|
-
background-color: #4D6DE3;
|
|
181
|
-
}
|
|
182
|
-
.lib-xplat-avatar .fallback.xplat-blue-600 {
|
|
183
|
-
background-color: #3950D7;
|
|
184
|
-
}
|
|
185
|
-
.lib-xplat-avatar .fallback.xplat-blue-700 {
|
|
186
|
-
background-color: #303EC5;
|
|
187
|
-
}
|
|
188
|
-
.lib-xplat-avatar .fallback.xplat-blue-800 {
|
|
189
|
-
background-color: #2D35A0;
|
|
190
|
-
}
|
|
191
|
-
.lib-xplat-avatar .fallback.xplat-blue-900 {
|
|
192
|
-
background-color: #29317F;
|
|
193
|
-
}
|
|
194
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-50 {
|
|
195
|
-
background-color: #EEFAFF;
|
|
196
|
-
}
|
|
197
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-100 {
|
|
198
|
-
background-color: #D9F4FF;
|
|
199
|
-
}
|
|
200
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-200 {
|
|
201
|
-
background-color: #BBEDFF;
|
|
202
|
-
}
|
|
203
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-300 {
|
|
204
|
-
background-color: #8DE3FF;
|
|
205
|
-
}
|
|
206
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-400 {
|
|
207
|
-
background-color: #57D0FF;
|
|
208
|
-
}
|
|
209
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-500 {
|
|
210
|
-
background-color: #30B6FF;
|
|
211
|
-
}
|
|
212
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-600 {
|
|
213
|
-
background-color: #1999F7;
|
|
214
|
-
}
|
|
215
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-700 {
|
|
216
|
-
background-color: #1280E3;
|
|
217
|
-
}
|
|
218
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-800 {
|
|
219
|
-
background-color: #1566B8;
|
|
220
|
-
}
|
|
221
|
-
.lib-xplat-avatar .fallback.xplat-lightblue-900 {
|
|
222
|
-
background-color: #175791;
|
|
223
|
-
}
|
|
224
|
-
.lib-xplat-avatar .fallback.xplat-purple-50 {
|
|
225
|
-
background-color: #FBF6FE;
|
|
226
|
-
}
|
|
227
|
-
.lib-xplat-avatar .fallback.xplat-purple-100 {
|
|
228
|
-
background-color: #F5EAFD;
|
|
229
|
-
}
|
|
230
|
-
.lib-xplat-avatar .fallback.xplat-purple-200 {
|
|
231
|
-
background-color: #EDD8FC;
|
|
232
|
-
}
|
|
233
|
-
.lib-xplat-avatar .fallback.xplat-purple-300 {
|
|
234
|
-
background-color: #E0BAF8;
|
|
235
|
-
}
|
|
236
|
-
.lib-xplat-avatar .fallback.xplat-purple-400 {
|
|
237
|
-
background-color: #CD8DF3;
|
|
238
|
-
}
|
|
239
|
-
.lib-xplat-avatar .fallback.xplat-purple-500 {
|
|
240
|
-
background-color: #B961EB;
|
|
241
|
-
}
|
|
242
|
-
.lib-xplat-avatar .fallback.xplat-purple-600 {
|
|
243
|
-
background-color: #A541DC;
|
|
244
|
-
}
|
|
245
|
-
.lib-xplat-avatar .fallback.xplat-purple-700 {
|
|
246
|
-
background-color: #9230C5;
|
|
247
|
-
}
|
|
248
|
-
.lib-xplat-avatar .fallback.xplat-purple-800 {
|
|
249
|
-
background-color: #782B9E;
|
|
250
|
-
}
|
|
251
|
-
.lib-xplat-avatar .fallback.xplat-purple-900 {
|
|
252
|
-
background-color: #62247F;
|
|
253
|
-
}
|
|
254
|
-
.lib-xplat-avatar .fallback.xplat-pink-50 {
|
|
255
|
-
background-color: #FFF4FE;
|
|
256
|
-
}
|
|
257
|
-
.lib-xplat-avatar .fallback.xplat-pink-100 {
|
|
258
|
-
background-color: #FFE7FD;
|
|
259
|
-
}
|
|
260
|
-
.lib-xplat-avatar .fallback.xplat-pink-200 {
|
|
261
|
-
background-color: #FFCFFA;
|
|
262
|
-
}
|
|
263
|
-
.lib-xplat-avatar .fallback.xplat-pink-300 {
|
|
264
|
-
background-color: #FEA9F1;
|
|
265
|
-
}
|
|
266
|
-
.lib-xplat-avatar .fallback.xplat-pink-400 {
|
|
267
|
-
background-color: #FD75E7;
|
|
268
|
-
}
|
|
269
|
-
.lib-xplat-avatar .fallback.xplat-pink-500 {
|
|
270
|
-
background-color: #F553DA;
|
|
271
|
-
}
|
|
272
|
-
.lib-xplat-avatar .fallback.xplat-pink-600 {
|
|
273
|
-
background-color: #D821B6;
|
|
274
|
-
}
|
|
275
|
-
.lib-xplat-avatar .fallback.xplat-pink-700 {
|
|
276
|
-
background-color: #B31892;
|
|
277
|
-
}
|
|
278
|
-
.lib-xplat-avatar .fallback.xplat-pink-800 {
|
|
279
|
-
background-color: #921676;
|
|
280
|
-
}
|
|
281
|
-
.lib-xplat-avatar .fallback.xplat-pink-900 {
|
|
282
|
-
background-color: #781761;
|
|
283
|
-
}
|
|
284
|
-
.lib-xplat-avatar .fallback.xplat-neutral-50 {
|
|
285
|
-
background-color: #FAFAFA;
|
|
286
|
-
}
|
|
287
|
-
.lib-xplat-avatar .fallback.xplat-neutral-100 {
|
|
288
|
-
background-color: #F5F5F5;
|
|
289
|
-
}
|
|
290
|
-
.lib-xplat-avatar .fallback.xplat-neutral-200 {
|
|
291
|
-
background-color: #E5E5E5;
|
|
292
|
-
}
|
|
293
|
-
.lib-xplat-avatar .fallback.xplat-neutral-300 {
|
|
294
|
-
background-color: #D4D4D4;
|
|
295
|
-
}
|
|
296
|
-
.lib-xplat-avatar .fallback.xplat-neutral-400 {
|
|
297
|
-
background-color: #A1A1A1;
|
|
298
|
-
}
|
|
299
|
-
.lib-xplat-avatar .fallback.xplat-neutral-500 {
|
|
300
|
-
background-color: #737373;
|
|
301
|
-
}
|
|
302
|
-
.lib-xplat-avatar .fallback.xplat-neutral-600 {
|
|
303
|
-
background-color: #525252;
|
|
304
|
-
}
|
|
305
|
-
.lib-xplat-avatar .fallback.xplat-neutral-700 {
|
|
306
|
-
background-color: #404040;
|
|
307
|
-
}
|
|
308
|
-
.lib-xplat-avatar .fallback.xplat-neutral-800 {
|
|
309
|
-
background-color: #262626;
|
|
310
|
-
}
|
|
311
|
-
.lib-xplat-avatar .fallback.xplat-neutral-900 {
|
|
312
|
-
background-color: #171717;
|
|
313
|
-
}
|
|
314
|
-
.lib-xplat-avatar .fallback.xplat-black {
|
|
315
|
-
background-color: #000000;
|
|
316
|
-
}
|
|
317
|
-
.lib-xplat-avatar .fallback.xplat-white {
|
|
318
|
-
background-color: #FFFFFF;
|
|
319
|
-
}
|
|
320
|
-
.lib-xplat-avatar .fallback.test-default {
|
|
321
|
-
background-color: #ffffff;
|
|
44
|
+
.lib-xplat-avatar .fallback {
|
|
45
|
+
background-color: var(--ds-color);
|
|
322
46
|
}
|