@x-plat/design-system 0.1.2 → 0.1.4

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.
Files changed (112) hide show
  1. package/dist/components/Accordion/index.cjs +1021 -0
  2. package/dist/components/Accordion/index.css +51 -0
  3. package/dist/components/Accordion/index.d.cts +16 -0
  4. package/dist/components/Accordion/index.d.ts +16 -0
  5. package/dist/components/Accordion/index.js +984 -0
  6. package/dist/components/Alert/index.cjs +72 -0
  7. package/dist/components/Alert/index.css +60 -0
  8. package/dist/components/Alert/index.d.cts +12 -0
  9. package/dist/components/Alert/index.d.ts +12 -0
  10. package/dist/components/Alert/index.js +45 -0
  11. package/dist/components/Avatar/index.cjs +196 -0
  12. package/dist/components/Avatar/index.css +322 -0
  13. package/dist/components/Avatar/index.d.cts +133 -0
  14. package/dist/components/Avatar/index.d.ts +133 -0
  15. package/dist/components/Avatar/index.js +169 -0
  16. package/dist/components/Badge/index.cjs +200 -0
  17. package/dist/components/Badge/index.css +307 -0
  18. package/dist/components/Badge/index.d.cts +133 -0
  19. package/dist/components/Badge/index.d.ts +133 -0
  20. package/dist/components/Badge/index.js +173 -0
  21. package/dist/components/Breadcrumb/index.cjs +60 -0
  22. package/dist/components/Breadcrumb/index.css +37 -0
  23. package/dist/components/Breadcrumb/index.d.cts +15 -0
  24. package/dist/components/Breadcrumb/index.d.ts +15 -0
  25. package/dist/components/Breadcrumb/index.js +33 -0
  26. package/dist/components/Chart/index.cjs +6 -3
  27. package/dist/components/Chart/index.js +6 -3
  28. package/dist/components/CheckBox/index.cjs +1 -1
  29. package/dist/components/CheckBox/index.css +13 -1
  30. package/dist/components/CheckBox/index.js +1 -1
  31. package/dist/components/DatePicker/index.cjs +77 -5
  32. package/dist/components/DatePicker/index.css +20 -2
  33. package/dist/components/DatePicker/index.d.cts +245 -4
  34. package/dist/components/DatePicker/index.d.ts +245 -4
  35. package/dist/components/DatePicker/index.js +77 -5
  36. package/dist/components/Divider/index.cjs +61 -0
  37. package/dist/components/Divider/index.css +15 -0
  38. package/dist/components/Divider/index.d.cts +10 -0
  39. package/dist/components/Divider/index.d.ts +10 -0
  40. package/dist/components/Divider/index.js +34 -0
  41. package/dist/components/Drawer/index.cjs +111 -0
  42. package/dist/components/Drawer/index.css +70 -0
  43. package/dist/components/Drawer/index.d.cts +14 -0
  44. package/dist/components/Drawer/index.d.ts +14 -0
  45. package/dist/components/Drawer/index.js +74 -0
  46. package/dist/components/Dropdown/index.cjs +185 -0
  47. package/dist/components/Dropdown/index.css +54 -0
  48. package/dist/components/Dropdown/index.d.cts +17 -0
  49. package/dist/components/Dropdown/index.d.ts +17 -0
  50. package/dist/components/Dropdown/index.js +148 -0
  51. package/dist/components/EmptyState/index.cjs +60 -0
  52. package/dist/components/EmptyState/index.css +32 -0
  53. package/dist/components/EmptyState/index.d.cts +12 -0
  54. package/dist/components/EmptyState/index.d.ts +12 -0
  55. package/dist/components/EmptyState/index.js +33 -0
  56. package/dist/components/FileUpload/index.cjs +1039 -0
  57. package/dist/components/FileUpload/index.css +42 -0
  58. package/dist/components/FileUpload/index.d.cts +14 -0
  59. package/dist/components/FileUpload/index.d.ts +14 -0
  60. package/dist/components/FileUpload/index.js +1002 -0
  61. package/dist/components/ImageSelector/index.cjs +9 -3
  62. package/dist/components/ImageSelector/index.js +9 -3
  63. package/dist/components/Modal/index.cjs +2 -0
  64. package/dist/components/Modal/index.js +2 -0
  65. package/dist/components/Pagination/index.cjs +1167 -0
  66. package/dist/components/Pagination/index.css +325 -0
  67. package/dist/components/Pagination/index.d.cts +133 -0
  68. package/dist/components/Pagination/index.d.ts +133 -0
  69. package/dist/components/Pagination/index.js +1140 -0
  70. package/dist/components/Progress/index.cjs +218 -0
  71. package/dist/components/Progress/index.css +313 -0
  72. package/dist/components/Progress/index.d.cts +133 -0
  73. package/dist/components/Progress/index.d.ts +133 -0
  74. package/dist/components/Progress/index.js +191 -0
  75. package/dist/components/Radio/index.css +1 -1
  76. package/dist/components/Skeleton/index.cjs +65 -0
  77. package/dist/components/Skeleton/index.css +27 -0
  78. package/dist/components/Skeleton/index.d.cts +12 -0
  79. package/dist/components/Skeleton/index.d.ts +12 -0
  80. package/dist/components/Skeleton/index.js +38 -0
  81. package/dist/components/Spinner/index.cjs +222 -0
  82. package/dist/components/Spinner/index.css +317 -0
  83. package/dist/components/Spinner/index.d.cts +130 -0
  84. package/dist/components/Spinner/index.d.ts +130 -0
  85. package/dist/components/Spinner/index.js +195 -0
  86. package/dist/components/Steps/index.cjs +1105 -0
  87. package/dist/components/Steps/index.css +918 -0
  88. package/dist/components/Steps/index.d.cts +134 -0
  89. package/dist/components/Steps/index.d.ts +134 -0
  90. package/dist/components/Steps/index.js +1078 -0
  91. package/dist/components/Tag/index.cjs +1090 -0
  92. package/dist/components/Tag/index.css +498 -0
  93. package/dist/components/Tag/index.d.cts +131 -0
  94. package/dist/components/Tag/index.d.ts +131 -0
  95. package/dist/components/Tag/index.js +1063 -0
  96. package/dist/components/Toast/index.cjs +150 -0
  97. package/dist/components/Toast/index.css +111 -0
  98. package/dist/components/Toast/index.d.cts +15 -0
  99. package/dist/components/Toast/index.d.ts +15 -0
  100. package/dist/components/Toast/index.js +112 -0
  101. package/dist/components/Tooltip/index.css +3 -0
  102. package/dist/components/index.cjs +1992 -1101
  103. package/dist/components/index.css +10623 -7074
  104. package/dist/components/index.d.cts +19 -2
  105. package/dist/components/index.d.ts +19 -2
  106. package/dist/components/index.js +1950 -1077
  107. package/dist/index.cjs +2935 -2080
  108. package/dist/index.css +10619 -7070
  109. package/dist/index.d.cts +18 -1
  110. package/dist/index.d.ts +18 -1
  111. package/dist/index.js +2980 -2143
  112. package/package.json +2 -2
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { C as ColorNamespace, a as ColorName, d as ColorProps } from '../../colors-BG91q_uV.js';
2
4
 
3
5
  interface InputDatePickerProps {
4
6
  value: Date;
@@ -33,7 +35,7 @@ interface PopupPickerBaseProps {
33
35
  type PopupPickerProps = PopupPickerBaseProps & (SinglePickerProps | RangePickerProps$1);
34
36
  declare const PopupPicker: React.FC<PopupPickerProps>;
35
37
 
36
- interface RangePickerProps {
38
+ interface RangePickerProps<N extends ColorNamespace = "xplat", C extends ColorName<N> = ColorName<N>> extends Partial<ColorProps<N, C>> {
37
39
  startDate: Date;
38
40
  endDate: Date;
39
41
  onChange?: (range: {
@@ -43,14 +45,253 @@ interface RangePickerProps {
43
45
  minDate?: Date;
44
46
  maxDate?: Date;
45
47
  }
46
- declare const RangePicker: React.FC<RangePickerProps>;
48
+ declare const RangePicker: {
49
+ <N extends ColorNamespace = "xplat", C extends ColorName<N> = keyof {
50
+ readonly xplat: {
51
+ readonly red: {
52
+ readonly 50: "#FFF0F0";
53
+ readonly 100: "#FFDDDE";
54
+ readonly 200: "#FFC1C2";
55
+ readonly 300: "#FF9698";
56
+ readonly 400: "#FF5A5D";
57
+ readonly 500: "#FF272B";
58
+ readonly 600: "#F80409";
59
+ readonly 700: "#D40105";
60
+ readonly 800: "#AE0609";
61
+ readonly 900: "#900C0F";
62
+ };
63
+ readonly green: {
64
+ readonly 50: "#E5F6EA";
65
+ readonly 100: "#C1E7CC";
66
+ readonly 200: "#98D8AC";
67
+ readonly 300: "#6CCA8B";
68
+ readonly 400: "#47BE72";
69
+ readonly 500: "#10B259";
70
+ readonly 600: "#00A34F";
71
+ readonly 700: "#009143";
72
+ readonly 800: "#007F38";
73
+ readonly 900: "#006024";
74
+ };
75
+ readonly orange: {
76
+ readonly 50: "#FFF8EC";
77
+ readonly 100: "#FFF0D3";
78
+ readonly 200: "#FFDDA5";
79
+ readonly 300: "#FFC46D";
80
+ readonly 400: "#FF9F32";
81
+ readonly 500: "#FF820A";
82
+ readonly 600: "#FF6900";
83
+ readonly 700: "#CC4B02";
84
+ readonly 800: "#A13A0B";
85
+ readonly 900: "#82320C";
86
+ };
87
+ readonly yellow: {
88
+ readonly 50: "#FFFDE7";
89
+ readonly 100: "#FFFAC1";
90
+ readonly 200: "#FFF186";
91
+ readonly 300: "#FFE041";
92
+ readonly 400: "#FFCC0D";
93
+ readonly 500: "#F0B100";
94
+ readonly 600: "#D18800";
95
+ readonly 700: "#A66002";
96
+ readonly 800: "#894B0A";
97
+ readonly 900: "#743D0F";
98
+ };
99
+ readonly blue: {
100
+ readonly 50: "#F1F4FD";
101
+ readonly 100: "#DFE7FA";
102
+ readonly 200: "#C5D4F8";
103
+ readonly 300: "#9EB8F2";
104
+ readonly 400: "#7093EA";
105
+ readonly 500: "#4D6DE3";
106
+ readonly 600: "#3950D7";
107
+ readonly 700: "#303EC5";
108
+ readonly 800: "#2D35A0";
109
+ readonly 900: "#29317F";
110
+ };
111
+ readonly lightblue: {
112
+ readonly 50: "#EEFAFF";
113
+ readonly 100: "#D9F4FF";
114
+ readonly 200: "#BBEDFF";
115
+ readonly 300: "#8DE3FF";
116
+ readonly 400: "#57D0FF";
117
+ readonly 500: "#30B6FF";
118
+ readonly 600: "#1999F7";
119
+ readonly 700: "#1280E3";
120
+ readonly 800: "#1566B8";
121
+ readonly 900: "#175791";
122
+ };
123
+ readonly purple: {
124
+ readonly 50: "#FBF6FE";
125
+ readonly 100: "#F5EAFD";
126
+ readonly 200: "#EDD8FC";
127
+ readonly 300: "#E0BAF8";
128
+ readonly 400: "#CD8DF3";
129
+ readonly 500: "#B961EB";
130
+ readonly 600: "#A541DC";
131
+ readonly 700: "#9230C5";
132
+ readonly 800: "#782B9E";
133
+ readonly 900: "#62247F";
134
+ };
135
+ readonly pink: {
136
+ readonly 50: "#FFF4FE";
137
+ readonly 100: "#FFE7FD";
138
+ readonly 200: "#FFCFFA";
139
+ readonly 300: "#FEA9F1";
140
+ readonly 400: "#FD75E7";
141
+ readonly 500: "#F553DA";
142
+ readonly 600: "#D821B6";
143
+ readonly 700: "#B31892";
144
+ readonly 800: "#921676";
145
+ readonly 900: "#781761";
146
+ };
147
+ readonly neutral: {
148
+ readonly 50: "#FAFAFA";
149
+ readonly 100: "#F5F5F5";
150
+ readonly 200: "#E5E5E5";
151
+ readonly 300: "#D4D4D4";
152
+ readonly 400: "#A1A1A1";
153
+ readonly 500: "#737373";
154
+ readonly 600: "#525252";
155
+ readonly 700: "#404040";
156
+ readonly 800: "#262626";
157
+ readonly 900: "#171717";
158
+ };
159
+ readonly black: "#000000";
160
+ readonly white: "#FFFFFF";
161
+ };
162
+ readonly test: {
163
+ readonly default: "#ffffff";
164
+ };
165
+ }[N]>(props: RangePickerProps<N, C>): react_jsx_runtime.JSX.Element;
166
+ displayName: string;
167
+ };
47
168
 
48
- interface SingleDatePickerProps {
169
+ interface SingleDatePickerProps<N extends ColorNamespace = "xplat", C extends ColorName<N> = ColorName<N>> extends Partial<ColorProps<N, C>> {
49
170
  value: Date | null;
50
171
  onChange?: (date: Date | null) => void;
51
172
  minDate?: Date;
52
173
  maxDate?: Date;
174
+ highlightDates?: Date[];
53
175
  }
54
- declare const SingleDatePicker: React.FC<SingleDatePickerProps>;
176
+ declare const SingleDatePicker: {
177
+ <N extends ColorNamespace = "xplat", C extends ColorName<N> = keyof {
178
+ readonly xplat: {
179
+ readonly red: {
180
+ readonly 50: "#FFF0F0";
181
+ readonly 100: "#FFDDDE";
182
+ readonly 200: "#FFC1C2";
183
+ readonly 300: "#FF9698";
184
+ readonly 400: "#FF5A5D";
185
+ readonly 500: "#FF272B";
186
+ readonly 600: "#F80409";
187
+ readonly 700: "#D40105";
188
+ readonly 800: "#AE0609";
189
+ readonly 900: "#900C0F";
190
+ };
191
+ readonly green: {
192
+ readonly 50: "#E5F6EA";
193
+ readonly 100: "#C1E7CC";
194
+ readonly 200: "#98D8AC";
195
+ readonly 300: "#6CCA8B";
196
+ readonly 400: "#47BE72";
197
+ readonly 500: "#10B259";
198
+ readonly 600: "#00A34F";
199
+ readonly 700: "#009143";
200
+ readonly 800: "#007F38";
201
+ readonly 900: "#006024";
202
+ };
203
+ readonly orange: {
204
+ readonly 50: "#FFF8EC";
205
+ readonly 100: "#FFF0D3";
206
+ readonly 200: "#FFDDA5";
207
+ readonly 300: "#FFC46D";
208
+ readonly 400: "#FF9F32";
209
+ readonly 500: "#FF820A";
210
+ readonly 600: "#FF6900";
211
+ readonly 700: "#CC4B02";
212
+ readonly 800: "#A13A0B";
213
+ readonly 900: "#82320C";
214
+ };
215
+ readonly yellow: {
216
+ readonly 50: "#FFFDE7";
217
+ readonly 100: "#FFFAC1";
218
+ readonly 200: "#FFF186";
219
+ readonly 300: "#FFE041";
220
+ readonly 400: "#FFCC0D";
221
+ readonly 500: "#F0B100";
222
+ readonly 600: "#D18800";
223
+ readonly 700: "#A66002";
224
+ readonly 800: "#894B0A";
225
+ readonly 900: "#743D0F";
226
+ };
227
+ readonly blue: {
228
+ readonly 50: "#F1F4FD";
229
+ readonly 100: "#DFE7FA";
230
+ readonly 200: "#C5D4F8";
231
+ readonly 300: "#9EB8F2";
232
+ readonly 400: "#7093EA";
233
+ readonly 500: "#4D6DE3";
234
+ readonly 600: "#3950D7";
235
+ readonly 700: "#303EC5";
236
+ readonly 800: "#2D35A0";
237
+ readonly 900: "#29317F";
238
+ };
239
+ readonly lightblue: {
240
+ readonly 50: "#EEFAFF";
241
+ readonly 100: "#D9F4FF";
242
+ readonly 200: "#BBEDFF";
243
+ readonly 300: "#8DE3FF";
244
+ readonly 400: "#57D0FF";
245
+ readonly 500: "#30B6FF";
246
+ readonly 600: "#1999F7";
247
+ readonly 700: "#1280E3";
248
+ readonly 800: "#1566B8";
249
+ readonly 900: "#175791";
250
+ };
251
+ readonly purple: {
252
+ readonly 50: "#FBF6FE";
253
+ readonly 100: "#F5EAFD";
254
+ readonly 200: "#EDD8FC";
255
+ readonly 300: "#E0BAF8";
256
+ readonly 400: "#CD8DF3";
257
+ readonly 500: "#B961EB";
258
+ readonly 600: "#A541DC";
259
+ readonly 700: "#9230C5";
260
+ readonly 800: "#782B9E";
261
+ readonly 900: "#62247F";
262
+ };
263
+ readonly pink: {
264
+ readonly 50: "#FFF4FE";
265
+ readonly 100: "#FFE7FD";
266
+ readonly 200: "#FFCFFA";
267
+ readonly 300: "#FEA9F1";
268
+ readonly 400: "#FD75E7";
269
+ readonly 500: "#F553DA";
270
+ readonly 600: "#D821B6";
271
+ readonly 700: "#B31892";
272
+ readonly 800: "#921676";
273
+ readonly 900: "#781761";
274
+ };
275
+ readonly neutral: {
276
+ readonly 50: "#FAFAFA";
277
+ readonly 100: "#F5F5F5";
278
+ readonly 200: "#E5E5E5";
279
+ readonly 300: "#D4D4D4";
280
+ readonly 400: "#A1A1A1";
281
+ readonly 500: "#737373";
282
+ readonly 600: "#525252";
283
+ readonly 700: "#404040";
284
+ readonly 800: "#262626";
285
+ readonly 900: "#171717";
286
+ };
287
+ readonly black: "#000000";
288
+ readonly white: "#FFFFFF";
289
+ };
290
+ readonly test: {
291
+ readonly default: "#ffffff";
292
+ };
293
+ }[N]>(props: SingleDatePickerProps<N, C>): react_jsx_runtime.JSX.Element;
294
+ displayName: string;
295
+ };
55
296
 
56
297
  export { InputDatePicker, PopupPicker as PopupDatePicker, RangePicker as RangeDatePicker, SingleDatePicker };
@@ -1490,6 +1490,8 @@ var Modal = (props) => {
1490
1490
  "div",
1491
1491
  {
1492
1492
  className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
1493
+ role: "dialog",
1494
+ "aria-modal": "true",
1493
1495
  onClick: (e) => e.stopPropagation(),
1494
1496
  children
1495
1497
  }
@@ -1506,13 +1508,48 @@ var Modal_default = Modal;
1506
1508
  import DatePicker2 from "react-datepicker";
1507
1509
  import "react-datepicker/dist/react-datepicker.css";
1508
1510
  import { jsx as jsx301 } from "react/jsx-runtime";
1511
+ function getColorValue(ns, color, depth) {
1512
+ const nsColors = colors[ns];
1513
+ const colorEntry = nsColors[color];
1514
+ if (typeof colorEntry === "string") return colorEntry;
1515
+ return colorEntry[String(depth)] ?? "";
1516
+ }
1509
1517
  var SingleDatePicker = (props) => {
1510
- const { value, onChange, ...rest } = props;
1518
+ const {
1519
+ value,
1520
+ onChange,
1521
+ colorNamespace = "xplat",
1522
+ color = "blue",
1523
+ colorDepth,
1524
+ highlightDates,
1525
+ ...rest
1526
+ } = props;
1511
1527
  const handleChange = (date) => {
1512
1528
  if (Array.isArray(date)) return;
1513
1529
  onChange?.(date);
1514
1530
  };
1515
- return /* @__PURE__ */ jsx301("div", { className: "lib-xplat-datepicker", children: /* @__PURE__ */ jsx301(DatePicker2, { selected: value, onChange: handleChange, inline: true, ...rest }) });
1531
+ const activeColor = getColorValue(
1532
+ colorNamespace,
1533
+ color,
1534
+ colorDepth ?? 500
1535
+ );
1536
+ return /* @__PURE__ */ jsx301(
1537
+ "div",
1538
+ {
1539
+ className: "lib-xplat-datepicker",
1540
+ style: { "--datepicker-active-color": activeColor },
1541
+ children: /* @__PURE__ */ jsx301(
1542
+ DatePicker2,
1543
+ {
1544
+ selected: value,
1545
+ onChange: handleChange,
1546
+ inline: true,
1547
+ highlightDates,
1548
+ ...rest
1549
+ }
1550
+ )
1551
+ }
1552
+ );
1516
1553
  };
1517
1554
  SingleDatePicker.displayName = "SingleDatePicker";
1518
1555
  var SingleDatePicker_default = SingleDatePicker;
@@ -1573,9 +1610,40 @@ PopupPicker.displayName = "PopupPicker";
1573
1610
  var PopupPicker_default = PopupPicker;
1574
1611
 
1575
1612
  // src/components/DatePicker/RangePicker/index.tsx
1613
+ import React6 from "react";
1576
1614
  import { jsx as jsx303, jsxs as jsxs192 } from "react/jsx-runtime";
1615
+ function getDatesBetween(start, end) {
1616
+ const dates = [];
1617
+ const current = new Date(start);
1618
+ current.setHours(0, 0, 0, 0);
1619
+ const last = new Date(end);
1620
+ last.setHours(0, 0, 0, 0);
1621
+ while (current <= last) {
1622
+ dates.push(new Date(current));
1623
+ current.setDate(current.getDate() + 1);
1624
+ }
1625
+ return dates;
1626
+ }
1577
1627
  var RangePicker = (props) => {
1578
- const { startDate, endDate, onChange, minDate, maxDate } = props;
1628
+ const {
1629
+ startDate,
1630
+ endDate,
1631
+ onChange,
1632
+ minDate,
1633
+ maxDate,
1634
+ colorNamespace,
1635
+ color,
1636
+ colorDepth
1637
+ } = props;
1638
+ const rangeDates = React6.useMemo(
1639
+ () => getDatesBetween(startDate, endDate),
1640
+ [startDate, endDate]
1641
+ );
1642
+ const colorProps = {
1643
+ ...colorNamespace !== void 0 && { colorNamespace },
1644
+ ...color !== void 0 && { color },
1645
+ ...colorDepth !== void 0 && { colorDepth }
1646
+ };
1579
1647
  return /* @__PURE__ */ jsxs192("div", { className: "lib-xplat-range-datepicker", children: [
1580
1648
  /* @__PURE__ */ jsxs192("div", { className: "lib-xplat-range-datepicker-from", children: [
1581
1649
  /* @__PURE__ */ jsx303("span", { className: "lib-xplat-range-datepicker-label", children: "\uC2DC\uC791" }),
@@ -1585,7 +1653,9 @@ var RangePicker = (props) => {
1585
1653
  value: startDate,
1586
1654
  onChange: (date) => date != null && onChange?.({ startDate: date, endDate }),
1587
1655
  minDate,
1588
- maxDate: endDate
1656
+ maxDate: endDate,
1657
+ highlightDates: rangeDates,
1658
+ ...colorProps
1589
1659
  }
1590
1660
  )
1591
1661
  ] }),
@@ -1597,7 +1667,9 @@ var RangePicker = (props) => {
1597
1667
  value: endDate,
1598
1668
  onChange: (date) => date != null && onChange?.({ startDate, endDate: date }),
1599
1669
  minDate: startDate,
1600
- maxDate
1670
+ maxDate,
1671
+ highlightDates: rangeDates,
1672
+ ...colorProps
1601
1673
  }
1602
1674
  )
1603
1675
  ] })
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/Divider/index.ts
21
+ var Divider_exports = {};
22
+ __export(Divider_exports, {
23
+ Divider: () => Divider_default
24
+ });
25
+ module.exports = __toCommonJS(Divider_exports);
26
+
27
+ // node_modules/clsx/dist/clsx.mjs
28
+ function r(e) {
29
+ var t, f, n = "";
30
+ if ("string" == typeof e || "number" == typeof e) n += e;
31
+ else if ("object" == typeof e) if (Array.isArray(e)) {
32
+ var o = e.length;
33
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
34
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
35
+ return n;
36
+ }
37
+ function clsx() {
38
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
39
+ return n;
40
+ }
41
+ var clsx_default = clsx;
42
+
43
+ // src/components/Divider/Divider.tsx
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var Divider = (props) => {
46
+ const { orientation = "horizontal", className } = props;
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ "div",
49
+ {
50
+ className: clsx_default("lib-xplat-divider", orientation, className),
51
+ role: "separator",
52
+ "aria-orientation": orientation
53
+ }
54
+ );
55
+ };
56
+ Divider.displayName = "Divider";
57
+ var Divider_default = Divider;
58
+ // Annotate the CommonJS export names for ESM import in node:
59
+ 0 && (module.exports = {
60
+ Divider
61
+ });
@@ -0,0 +1,15 @@
1
+ /* src/components/Divider/divider.scss */
2
+ .lib-xplat-divider {
3
+ border: none;
4
+ flex-shrink: 0;
5
+ }
6
+ .lib-xplat-divider.horizontal {
7
+ width: 100%;
8
+ height: 1px;
9
+ background-color: #E5E5E5;
10
+ }
11
+ .lib-xplat-divider.vertical {
12
+ width: 1px;
13
+ align-self: stretch;
14
+ background-color: #E5E5E5;
15
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+
3
+ type DividerOrientation = "horizontal" | "vertical";
4
+ interface DividerProps {
5
+ orientation?: DividerOrientation;
6
+ className?: string;
7
+ }
8
+ declare const Divider: React.FC<DividerProps>;
9
+
10
+ export { Divider };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+
3
+ type DividerOrientation = "horizontal" | "vertical";
4
+ interface DividerProps {
5
+ orientation?: DividerOrientation;
6
+ className?: string;
7
+ }
8
+ declare const Divider: React.FC<DividerProps>;
9
+
10
+ export { Divider };
@@ -0,0 +1,34 @@
1
+ // node_modules/clsx/dist/clsx.mjs
2
+ function r(e) {
3
+ var t, f, n = "";
4
+ if ("string" == typeof e || "number" == typeof e) n += e;
5
+ else if ("object" == typeof e) if (Array.isArray(e)) {
6
+ var o = e.length;
7
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
8
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
9
+ return n;
10
+ }
11
+ function clsx() {
12
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
13
+ return n;
14
+ }
15
+ var clsx_default = clsx;
16
+
17
+ // src/components/Divider/Divider.tsx
18
+ import { jsx } from "react/jsx-runtime";
19
+ var Divider = (props) => {
20
+ const { orientation = "horizontal", className } = props;
21
+ return /* @__PURE__ */ jsx(
22
+ "div",
23
+ {
24
+ className: clsx_default("lib-xplat-divider", orientation, className),
25
+ role: "separator",
26
+ "aria-orientation": orientation
27
+ }
28
+ );
29
+ };
30
+ Divider.displayName = "Divider";
31
+ var Divider_default = Divider;
32
+ export {
33
+ Divider_default as Divider
34
+ };
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/Drawer/index.ts
31
+ var Drawer_exports = {};
32
+ __export(Drawer_exports, {
33
+ Drawer: () => Drawer_default
34
+ });
35
+ module.exports = __toCommonJS(Drawer_exports);
36
+
37
+ // src/components/Drawer/Drawer.tsx
38
+ var import_react = __toESM(require("react"), 1);
39
+ var import_react_dom = require("react-dom");
40
+
41
+ // node_modules/clsx/dist/clsx.mjs
42
+ function r(e) {
43
+ var t, f, n = "";
44
+ if ("string" == typeof e || "number" == typeof e) n += e;
45
+ else if ("object" == typeof e) if (Array.isArray(e)) {
46
+ var o = e.length;
47
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
48
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
49
+ return n;
50
+ }
51
+ function clsx() {
52
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
53
+ return n;
54
+ }
55
+ var clsx_default = clsx;
56
+
57
+ // src/components/Drawer/Drawer.tsx
58
+ var import_jsx_runtime = require("react/jsx-runtime");
59
+ var ANIMATION_DURATION_MS = 250;
60
+ var Drawer = (props) => {
61
+ const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
62
+ const [mounted, setMounted] = import_react.default.useState(false);
63
+ const [visible, setVisible] = import_react.default.useState(false);
64
+ import_react.default.useEffect(() => {
65
+ if (isOpen) {
66
+ setMounted(true);
67
+ const t2 = setTimeout(() => setVisible(true), 1);
68
+ return () => clearTimeout(t2);
69
+ }
70
+ setVisible(false);
71
+ const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
72
+ return () => clearTimeout(t);
73
+ }, [isOpen]);
74
+ if (typeof document === "undefined") return null;
75
+ if (!mounted) return null;
76
+ const stateClass = visible ? "enter" : "exit";
77
+ const widthValue = typeof width === "number" ? `${width}px` : width;
78
+ return (0, import_react_dom.createPortal)(
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
+ "div",
81
+ {
82
+ className: clsx_default("lib-xplat-drawer-overlay", stateClass),
83
+ onClick: onClose,
84
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
85
+ "div",
86
+ {
87
+ className: clsx_default("lib-xplat-drawer", placement, stateClass),
88
+ style: { width: widthValue },
89
+ role: "dialog",
90
+ "aria-modal": "true",
91
+ onClick: (e) => e.stopPropagation(),
92
+ children: [
93
+ title && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "drawer-header", children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "drawer-title", children: title }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
96
+ ] }),
97
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "drawer-body", children })
98
+ ]
99
+ }
100
+ )
101
+ }
102
+ ),
103
+ document.body
104
+ );
105
+ };
106
+ Drawer.displayName = "Drawer";
107
+ var Drawer_default = Drawer;
108
+ // Annotate the CommonJS export names for ESM import in node:
109
+ 0 && (module.exports = {
110
+ Drawer
111
+ });