@lucian-seo/lucian-ui 0.2.0 → 0.2.2
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/lib/{Input-DzJm1Kv4.js → Input-Bv2FRGIe.js} +2 -2
- package/dist/lib/{Input-DzJm1Kv4.js.map → Input-Bv2FRGIe.js.map} +1 -1
- package/dist/lib/{Pagination-AWL5k5zG.js → Popover-Cq6yhJaK.js} +193 -132
- package/dist/lib/Popover-Cq6yhJaK.js.map +1 -0
- package/dist/lib/{Switch-DyKAqvde.js → Switch-DmKcoBT0.js} +3 -3
- package/dist/lib/Switch-DmKcoBT0.js.map +1 -0
- package/dist/lib/{Tag-Z8PjnJFt.js → Tag-CnNuj4nV.js} +2 -2
- package/dist/lib/{Tag-Z8PjnJFt.js.map → Tag-CnNuj4nV.js.map} +1 -1
- package/dist/lib/{TagInput-CeA0n7ax.js → TagInput-BcSSnJY_.js} +4 -4
- package/dist/lib/{TagInput-CeA0n7ax.js.map → TagInput-BcSSnJY_.js.map} +1 -1
- package/dist/lib/{ToggleButton-r73bokux.js → ToggleButton-CcST9ch9.js} +3 -3
- package/dist/lib/{ToggleButton-r73bokux.js.map → ToggleButton-CcST9ch9.js.map} +1 -1
- package/dist/lib/{Toolbar-DDOaxG3B.js → Toolbar-Cq2wF4Yg.js} +67 -127
- package/dist/lib/Toolbar-Cq2wF4Yg.js.map +1 -0
- package/dist/lib/{Tooltip-BW1-aVDg.js → Tooltip-1flxtzgM.js} +2 -2
- package/dist/lib/{Tooltip-BW1-aVDg.js.map → Tooltip-1flxtzgM.js.map} +1 -1
- package/dist/lib/{VisuallyHidden-DcE0EFpo.js → VisuallyHidden-Bht2-rdy.js} +16 -14
- package/dist/lib/VisuallyHidden-Bht2-rdy.js.map +1 -0
- package/dist/lib/{VoiceControlBar-lMPuJMcF.js → VoiceControlBar-iWzq7jiw.js} +1769 -1505
- package/dist/lib/VoiceControlBar-iWzq7jiw.js.map +1 -0
- package/dist/lib/{Waveform-EahaE6uD.js → Waveform-CtI9GetQ.js} +3 -3
- package/dist/lib/Waveform-CtI9GetQ.js.map +1 -0
- package/dist/lib/components/common/Badge/Badge.d.ts +1 -9
- package/dist/lib/components/common/Glass/Glass.d.ts +1 -3
- package/dist/lib/components/common/index.js +5 -5
- package/dist/lib/components/composed/index.js +3 -3
- package/dist/lib/components/derived/index.js +3 -3
- package/dist/lib/components/extended/DataGrid/DataGrid.clipboard.d.ts +2 -0
- package/dist/lib/components/extended/DataGrid/DataGrid.d.ts +6 -0
- package/dist/lib/components/extended/DataGrid/DataGrid.features.d.ts +2 -0
- package/dist/lib/components/extended/index.js +1 -1
- package/dist/lib/index.js +12 -12
- package/dist/lib/styles.css +1 -1
- package/dist/lib/tokens.css +29 -34
- package/docs/DATAGRID.md +111 -1
- package/package.json +1 -1
- package/dist/lib/Pagination-AWL5k5zG.js.map +0 -1
- package/dist/lib/Switch-DyKAqvde.js.map +0 -1
- package/dist/lib/Toolbar-DDOaxG3B.js.map +0 -1
- package/dist/lib/VisuallyHidden-DcE0EFpo.js.map +0 -1
- package/dist/lib/VoiceControlBar-lMPuJMcF.js.map +0 -1
- package/dist/lib/Waveform-EahaE6uD.js.map +0 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { cloneElement as
|
|
4
|
-
import { Check as
|
|
5
|
-
import * as
|
|
1
|
+
import { n as e, s as t, t as n } from "./VisuallyHidden-Bht2-rdy.js";
|
|
2
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import { cloneElement as a, forwardRef as o, useId as s, useLayoutEffect as c, useRef as l, useState as u } from "react";
|
|
4
|
+
import { Check as d, ChevronDown as f, ChevronLeft as p, ChevronRight as m, Circle as h, X as g } from "lucide-react";
|
|
5
|
+
import * as _ from "@radix-ui/react-popover";
|
|
6
|
+
import * as v from "@radix-ui/react-dropdown-menu";
|
|
6
7
|
//#region src/foundation/focus.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
return [...document.querySelectorAll(
|
|
8
|
+
var y = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
9
|
+
function b() {
|
|
10
|
+
return [...document.querySelectorAll(y)].filter((e) => !e.closest("[aria-hidden=\"true\"]") && e.offsetParent !== null);
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function x(e) {
|
|
12
13
|
if (!e) return () => {};
|
|
13
|
-
let t =
|
|
14
|
+
let t = b(), n = (t) => e.contains(t), r = t.find((t) => !n(t) && e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING), i = [...t].reverse().find((t) => !n(t) && e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_PRECEDING), a = r ?? i ?? null;
|
|
14
15
|
return () => {
|
|
15
16
|
a && requestAnimationFrame(() => {
|
|
16
17
|
let e = document.activeElement;
|
|
@@ -20,60 +21,60 @@ function v(e) {
|
|
|
20
21
|
}
|
|
21
22
|
//#endregion
|
|
22
23
|
//#region src/components/composed/Disclosure/Disclosure.tsx
|
|
23
|
-
function
|
|
24
|
+
function S({ summary: e, children: n, defaultOpen: a, open: o, onOpenChange: s, icon: c, aside: l, plain: u, className: d, ...p }) {
|
|
24
25
|
let m = o !== void 0;
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ i("details", {
|
|
26
27
|
...p,
|
|
27
|
-
className: `disclosure ${
|
|
28
|
+
className: `disclosure ${d ?? ""}`.trim(),
|
|
28
29
|
"data-plain": u ? "" : void 0,
|
|
29
30
|
open: o ?? a,
|
|
30
31
|
onToggle: (e) => {
|
|
31
32
|
let t = e.currentTarget.open;
|
|
32
33
|
m && t === o || s?.(t);
|
|
33
34
|
},
|
|
34
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ i("summary", {
|
|
35
36
|
className: "disclosure__summary",
|
|
36
37
|
onClick: m ? (e) => {
|
|
37
38
|
e.preventDefault(), s?.(!o);
|
|
38
39
|
} : void 0,
|
|
39
40
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
icon:
|
|
41
|
+
/* @__PURE__ */ r(t, {
|
|
42
|
+
icon: f,
|
|
42
43
|
size: "sm",
|
|
43
44
|
className: "disclosure__chevron"
|
|
44
45
|
}),
|
|
45
|
-
c ? /* @__PURE__ */
|
|
46
|
+
c ? /* @__PURE__ */ r(t, {
|
|
46
47
|
icon: c,
|
|
47
48
|
size: "sm",
|
|
48
49
|
className: "disclosure__icon"
|
|
49
50
|
}) : null,
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ r("span", {
|
|
51
52
|
className: "disclosure__label",
|
|
52
|
-
children:
|
|
53
|
+
children: e
|
|
53
54
|
}),
|
|
54
|
-
l ? /* @__PURE__ */
|
|
55
|
+
l ? /* @__PURE__ */ r("span", {
|
|
55
56
|
className: "disclosure__aside",
|
|
56
57
|
children: l
|
|
57
58
|
}) : null
|
|
58
59
|
]
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ r("div", {
|
|
60
61
|
className: "disclosure__body",
|
|
61
|
-
children:
|
|
62
|
+
children: n
|
|
62
63
|
})]
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
...
|
|
66
|
+
function C({ children: e, className: t, ...n }) {
|
|
67
|
+
return /* @__PURE__ */ r("div", {
|
|
68
|
+
...n,
|
|
68
69
|
className: `accordion ${t ?? ""}`.trim(),
|
|
69
70
|
children: e
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
73
|
//#endregion
|
|
73
74
|
//#region src/components/composed/Field/Field.tsx
|
|
74
|
-
function
|
|
75
|
-
let g =
|
|
76
|
-
return /* @__PURE__ */
|
|
75
|
+
function w({ label: e, children: t, hint: a, error: o, required: c, optional: l, size: u = "md", layout: d = "stacked", labelHidden: f, id: p, className: m, ...h }) {
|
|
76
|
+
let g = s(), _ = p ?? g, v = `${_}-label`, y = `${_}-hint`, b = `${_}-error`, x = !!o, S = [x ? b : null, a ? y : null].filter(Boolean).join(" ");
|
|
77
|
+
return /* @__PURE__ */ i("div", {
|
|
77
78
|
...h,
|
|
78
79
|
className: `field ${m ?? ""}`.trim(),
|
|
79
80
|
"data-size": u,
|
|
@@ -81,38 +82,38 @@ function x({ label: e, children: i, hint: a, error: s, required: c, optional: l,
|
|
|
81
82
|
"data-invalid": x ? "" : void 0,
|
|
82
83
|
"data-label-hidden": f ? "" : void 0,
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ i("div", {
|
|
85
86
|
className: "field__head",
|
|
86
87
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ i("label", {
|
|
88
89
|
className: "field__label",
|
|
89
90
|
id: v,
|
|
90
91
|
htmlFor: _,
|
|
91
92
|
children: [
|
|
92
|
-
f ? /* @__PURE__ */ n
|
|
93
|
-
c && !f ? /* @__PURE__ */
|
|
93
|
+
f ? /* @__PURE__ */ r(n, { children: e }) : e,
|
|
94
|
+
c && !f ? /* @__PURE__ */ r("span", {
|
|
94
95
|
className: "field__required",
|
|
95
96
|
"aria-hidden": "true",
|
|
96
97
|
children: "*"
|
|
97
98
|
}) : null,
|
|
98
|
-
c ? /* @__PURE__ */ n
|
|
99
|
+
c ? /* @__PURE__ */ r(n, { children: " (필수)" }) : null
|
|
99
100
|
]
|
|
100
101
|
}),
|
|
101
|
-
l && !f ? /* @__PURE__ */
|
|
102
|
+
l && !f ? /* @__PURE__ */ r("span", {
|
|
102
103
|
className: "field__optional",
|
|
103
104
|
children: "선택"
|
|
104
105
|
}) : null,
|
|
105
|
-
l && f ? /* @__PURE__ */ n
|
|
106
|
+
l && f ? /* @__PURE__ */ r(n, { children: "(선택)" }) : null
|
|
106
107
|
]
|
|
107
108
|
}),
|
|
108
|
-
a ? /* @__PURE__ */
|
|
109
|
+
a ? /* @__PURE__ */ r("p", {
|
|
109
110
|
className: "field__hint",
|
|
110
111
|
id: y,
|
|
111
112
|
children: a
|
|
112
113
|
}) : null,
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ r("div", {
|
|
114
115
|
className: "field__control",
|
|
115
|
-
children:
|
|
116
|
+
children: t({
|
|
116
117
|
id: _,
|
|
117
118
|
"aria-labelledby": v,
|
|
118
119
|
"aria-describedby": S || void 0,
|
|
@@ -121,28 +122,28 @@ function x({ label: e, children: i, hint: a, error: s, required: c, optional: l,
|
|
|
121
122
|
invalid: x
|
|
122
123
|
})
|
|
123
124
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ r("p", {
|
|
125
126
|
className: "field__error",
|
|
126
127
|
id: b,
|
|
127
128
|
"aria-live": "polite",
|
|
128
129
|
"data-part": "error",
|
|
129
|
-
children:
|
|
130
|
+
children: o
|
|
130
131
|
})
|
|
131
132
|
]
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
//#endregion
|
|
135
136
|
//#region src/components/composed/Menu/scope.tsx
|
|
136
|
-
var
|
|
137
|
+
var T = [
|
|
137
138
|
"data-theme",
|
|
138
139
|
"data-brand",
|
|
139
140
|
"data-density",
|
|
140
141
|
"data-radius",
|
|
141
142
|
"data-look"
|
|
142
143
|
];
|
|
143
|
-
function
|
|
144
|
-
let [e, t] =
|
|
145
|
-
return
|
|
144
|
+
function E() {
|
|
145
|
+
let [e, t] = u(null), [n, r] = u([]);
|
|
146
|
+
return c(() => {
|
|
146
147
|
if (!e) return;
|
|
147
148
|
let t = [];
|
|
148
149
|
for (let n = e; n && n !== e.ownerDocument.body; n = n.parentElement) t.unshift(n);
|
|
@@ -157,7 +158,7 @@ function C() {
|
|
|
157
158
|
let i = new MutationObserver(n);
|
|
158
159
|
for (let e of t) i.observe(e, {
|
|
159
160
|
attributes: !0,
|
|
160
|
-
attributeFilter: [...
|
|
161
|
+
attributeFilter: [...T]
|
|
161
162
|
});
|
|
162
163
|
return () => i.disconnect();
|
|
163
164
|
}, [e]), {
|
|
@@ -165,8 +166,8 @@ function C() {
|
|
|
165
166
|
setTrigger: t
|
|
166
167
|
};
|
|
167
168
|
}
|
|
168
|
-
var
|
|
169
|
-
return e.reduceRight((e, t,
|
|
169
|
+
var D = o(function({ scopes: e, children: t }, n) {
|
|
170
|
+
return e.reduceRight((e, t, n) => /* @__PURE__ */ r("div", {
|
|
170
171
|
className: "menu__scope",
|
|
171
172
|
"data-theme": t["data-theme"],
|
|
172
173
|
"data-brand": t["data-brand"],
|
|
@@ -174,26 +175,26 @@ var w = a(function({ scopes: e, children: t }, r) {
|
|
|
174
175
|
"data-radius": t["data-radius"],
|
|
175
176
|
"data-look": t["data-look"],
|
|
176
177
|
children: e
|
|
177
|
-
},
|
|
178
|
+
}, n), a(t, { ref: n }));
|
|
178
179
|
});
|
|
179
180
|
//#endregion
|
|
180
181
|
//#region src/components/composed/Menu/Menu.tsx
|
|
181
|
-
function
|
|
182
|
-
let { scopes: d, setTrigger: f } =
|
|
183
|
-
return /* @__PURE__ */
|
|
182
|
+
function O({ children: e, items: t, side: n = "bottom", align: a = "start", open: o, onOpenChange: s, disabled: c, id: l, className: u }) {
|
|
183
|
+
let { scopes: d, setTrigger: f } = E();
|
|
184
|
+
return /* @__PURE__ */ i(v.Root, {
|
|
184
185
|
open: o,
|
|
185
186
|
onOpenChange: s,
|
|
186
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ r(v.Trigger, {
|
|
187
188
|
ref: f,
|
|
188
189
|
asChild: !0,
|
|
189
190
|
disabled: c,
|
|
190
191
|
children: e
|
|
191
|
-
}), /* @__PURE__ */
|
|
192
|
+
}), /* @__PURE__ */ r(v.Portal, { children: /* @__PURE__ */ r(D, {
|
|
192
193
|
scopes: d,
|
|
193
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ r(v.Content, {
|
|
194
195
|
...l ? { id: l } : null,
|
|
195
196
|
className: `menu ${u ?? ""}`.trim(),
|
|
196
|
-
side:
|
|
197
|
+
side: n,
|
|
197
198
|
align: a,
|
|
198
199
|
sideOffset: 6,
|
|
199
200
|
collisionPadding: 12,
|
|
@@ -202,146 +203,146 @@ function T({ children: e, items: t, side: i = "bottom", align: a = "start", open
|
|
|
202
203
|
}) })]
|
|
203
204
|
});
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
-
return /* @__PURE__ */
|
|
206
|
+
function k({ children: e, icon: n, shortcut: a, destructive: o, disabled: s, onSelect: c, className: l, ...u }) {
|
|
207
|
+
return /* @__PURE__ */ i(v.Item, {
|
|
207
208
|
...u,
|
|
208
209
|
className: `menu__item ${l ?? ""}`.trim(),
|
|
209
210
|
"data-destructive": o ? "" : void 0,
|
|
210
211
|
disabled: s,
|
|
211
212
|
onSelect: c,
|
|
212
213
|
children: [
|
|
213
|
-
|
|
214
|
-
icon:
|
|
214
|
+
n ? /* @__PURE__ */ r(t, {
|
|
215
|
+
icon: n,
|
|
215
216
|
size: "sm",
|
|
216
217
|
className: "menu__icon"
|
|
217
218
|
}) : null,
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ r("span", {
|
|
219
220
|
className: "menu__label",
|
|
220
|
-
children:
|
|
221
|
+
children: e
|
|
221
222
|
}),
|
|
222
|
-
a ? /* @__PURE__ */
|
|
223
|
+
a ? /* @__PURE__ */ r("kbd", {
|
|
223
224
|
className: "menu__shortcut",
|
|
224
225
|
children: a
|
|
225
226
|
}) : null
|
|
226
227
|
]
|
|
227
228
|
});
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
-
return /* @__PURE__ */
|
|
230
|
+
function A({ children: e, checked: n, onCheckedChange: a, disabled: o, className: s, ...c }) {
|
|
231
|
+
return /* @__PURE__ */ i(v.CheckboxItem, {
|
|
231
232
|
...c,
|
|
232
233
|
className: `menu__item ${s ?? ""}`.trim(),
|
|
233
|
-
checked:
|
|
234
|
+
checked: n,
|
|
234
235
|
onCheckedChange: a,
|
|
235
236
|
disabled: o,
|
|
236
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ r("span", {
|
|
237
238
|
className: "menu__mark",
|
|
238
239
|
"aria-hidden": "true",
|
|
239
|
-
children: /* @__PURE__ */
|
|
240
|
-
icon:
|
|
240
|
+
children: /* @__PURE__ */ r(v.ItemIndicator, { children: /* @__PURE__ */ r(t, {
|
|
241
|
+
icon: d,
|
|
241
242
|
size: "xs"
|
|
242
243
|
}) })
|
|
243
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ r("span", {
|
|
244
245
|
className: "menu__label",
|
|
245
|
-
children:
|
|
246
|
+
children: e
|
|
246
247
|
})]
|
|
247
248
|
});
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
-
return /* @__PURE__ */
|
|
250
|
+
function j({ children: e, value: t, onValueChange: n }) {
|
|
251
|
+
return /* @__PURE__ */ r(v.RadioGroup, {
|
|
251
252
|
value: t,
|
|
252
|
-
onValueChange:
|
|
253
|
+
onValueChange: n,
|
|
253
254
|
children: e
|
|
254
255
|
});
|
|
255
256
|
}
|
|
256
|
-
function
|
|
257
|
-
return /* @__PURE__ */
|
|
257
|
+
function M({ children: e, value: n, disabled: a, className: o, ...s }) {
|
|
258
|
+
return /* @__PURE__ */ i(v.RadioItem, {
|
|
258
259
|
...s,
|
|
259
260
|
className: `menu__item ${o ?? ""}`.trim(),
|
|
260
|
-
value:
|
|
261
|
+
value: n,
|
|
261
262
|
disabled: a,
|
|
262
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ r("span", {
|
|
263
264
|
className: "menu__mark",
|
|
264
265
|
"aria-hidden": "true",
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
-
icon:
|
|
266
|
+
children: /* @__PURE__ */ r(v.ItemIndicator, { children: /* @__PURE__ */ r(t, {
|
|
267
|
+
icon: h,
|
|
267
268
|
size: "xs",
|
|
268
269
|
className: "menu__dot"
|
|
269
270
|
}) })
|
|
270
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ r("span", {
|
|
271
272
|
className: "menu__label",
|
|
272
|
-
children:
|
|
273
|
+
children: e
|
|
273
274
|
})]
|
|
274
275
|
});
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
-
return /* @__PURE__ */
|
|
277
|
+
function N({ children: e, label: t }) {
|
|
278
|
+
return /* @__PURE__ */ i(v.Group, { children: [t ? /* @__PURE__ */ r(v.Label, {
|
|
278
279
|
className: "menu__group-label",
|
|
279
280
|
children: t
|
|
280
281
|
}) : null, e] });
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
-
return /* @__PURE__ */
|
|
283
|
+
function P() {
|
|
284
|
+
return /* @__PURE__ */ r(v.Separator, { className: "menu__separator" });
|
|
284
285
|
}
|
|
285
|
-
function
|
|
286
|
-
let { scopes: s, setTrigger: c } =
|
|
287
|
-
return /* @__PURE__ */
|
|
286
|
+
function F({ children: e, label: n, icon: a, disabled: o }) {
|
|
287
|
+
let { scopes: s, setTrigger: c } = E();
|
|
288
|
+
return /* @__PURE__ */ i(v.Sub, { children: [/* @__PURE__ */ i(v.SubTrigger, {
|
|
288
289
|
ref: c,
|
|
289
290
|
className: "menu__item",
|
|
290
291
|
disabled: o,
|
|
291
292
|
children: [
|
|
292
|
-
a ? /* @__PURE__ */
|
|
293
|
+
a ? /* @__PURE__ */ r(t, {
|
|
293
294
|
icon: a,
|
|
294
295
|
size: "sm",
|
|
295
296
|
className: "menu__icon"
|
|
296
297
|
}) : null,
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ r("span", {
|
|
298
299
|
className: "menu__label",
|
|
299
|
-
children:
|
|
300
|
+
children: n
|
|
300
301
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
icon:
|
|
302
|
+
/* @__PURE__ */ r(t, {
|
|
303
|
+
icon: m,
|
|
303
304
|
size: "xs",
|
|
304
305
|
className: "menu__chevron"
|
|
305
306
|
})
|
|
306
307
|
]
|
|
307
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ r(v.Portal, { children: /* @__PURE__ */ r(D, {
|
|
308
309
|
scopes: s,
|
|
309
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ r(v.SubContent, {
|
|
310
311
|
className: "menu",
|
|
311
312
|
sideOffset: 4,
|
|
312
313
|
alignOffset: -4,
|
|
313
314
|
collisionPadding: 12,
|
|
314
|
-
children:
|
|
315
|
+
children: e
|
|
315
316
|
})
|
|
316
317
|
}) })] });
|
|
317
318
|
}
|
|
318
319
|
//#endregion
|
|
319
320
|
//#region src/components/composed/Pagination/Pagination.tsx
|
|
320
|
-
var
|
|
321
|
-
function
|
|
322
|
-
t =
|
|
321
|
+
var I = (e, t) => Array.from({ length: Math.max(0, t - e + 1) }, (t, n) => e + n), L = (e) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : 0, R = (e, t) => Math.max(1, Math.min(t || 1, Number.isFinite(e) ? Math.floor(e) : 1));
|
|
322
|
+
function z(e, t, n = 1) {
|
|
323
|
+
t = L(t), e = R(e, t), n = Number.isFinite(n) ? Math.max(0, Math.min(t, Math.floor(n))) : 1;
|
|
323
324
|
let r = n * 2 + 5;
|
|
324
|
-
if (t <= r) return
|
|
325
|
+
if (t <= r) return I(1, t);
|
|
325
326
|
let i = t, a = e - n > 2, o = e + n < i - 1, s = r - 2 - !!a - !!o;
|
|
326
327
|
return a ? o ? [
|
|
327
328
|
1,
|
|
328
329
|
"gap",
|
|
329
|
-
...
|
|
330
|
+
...I(e - n, e + n),
|
|
330
331
|
"gap",
|
|
331
332
|
i
|
|
332
333
|
] : [
|
|
333
334
|
1,
|
|
334
335
|
"gap",
|
|
335
|
-
...
|
|
336
|
+
...I(i - s, i)
|
|
336
337
|
] : [
|
|
337
|
-
...
|
|
338
|
+
...I(1, 1 + s),
|
|
338
339
|
"gap",
|
|
339
340
|
i
|
|
340
341
|
];
|
|
341
342
|
}
|
|
342
|
-
function
|
|
343
|
-
let y =
|
|
344
|
-
|
|
343
|
+
function B({ page: e, pageCount: a, onPageChange: o, label: s, siblings: d = 1, summary: f, size: h = "md", responsive: g = !0, className: _, ...v }) {
|
|
344
|
+
let y = L(a), b = R(e, y), x = l(null), S = l(null), [C, w] = u(null);
|
|
345
|
+
c(() => {
|
|
345
346
|
if (!g || !x.current || !S.current) return;
|
|
346
347
|
let e = 0, t = 0, n = () => {
|
|
347
348
|
let n = S.current;
|
|
@@ -363,37 +364,37 @@ function L({ page: i, pageCount: a, onPageChange: o, label: u, siblings: d = 1,
|
|
|
363
364
|
y,
|
|
364
365
|
d
|
|
365
366
|
]);
|
|
366
|
-
let T =
|
|
367
|
-
g && C !== null && T.length + 2 > C && (T =
|
|
367
|
+
let T = z(b, y, d);
|
|
368
|
+
g && C !== null && T.length + 2 > C && (T = z(b, y, 0), T.length + 2 > C && (T = y ? [b] : []));
|
|
368
369
|
let E = b <= 1 || y <= 0, D = b >= y || y <= 0;
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
+
return /* @__PURE__ */ i("nav", {
|
|
370
371
|
...v,
|
|
371
372
|
ref: x,
|
|
372
373
|
className: `pagination ${_ ?? ""}`.trim(),
|
|
373
|
-
"aria-label":
|
|
374
|
+
"aria-label": s,
|
|
374
375
|
"data-size": h,
|
|
375
|
-
children: [
|
|
376
|
+
children: [f ? /* @__PURE__ */ i("p", {
|
|
376
377
|
className: "pagination__summary",
|
|
377
378
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ i("span", {
|
|
379
380
|
className: "pagination__figures",
|
|
380
381
|
children: [
|
|
381
|
-
|
|
382
|
+
f.from.toLocaleString("ko-KR"),
|
|
382
383
|
"–",
|
|
383
|
-
|
|
384
|
+
f.to.toLocaleString("ko-KR")
|
|
384
385
|
]
|
|
385
386
|
}),
|
|
386
387
|
" / ",
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ r("span", {
|
|
388
389
|
className: "pagination__figures",
|
|
389
|
-
children:
|
|
390
|
+
children: f.total.toLocaleString("ko-KR")
|
|
390
391
|
})
|
|
391
392
|
]
|
|
392
|
-
}) : null, /* @__PURE__ */
|
|
393
|
+
}) : null, /* @__PURE__ */ i("ul", {
|
|
393
394
|
className: "pagination__list",
|
|
394
395
|
ref: S,
|
|
395
396
|
children: [
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ r("li", { children: /* @__PURE__ */ i("button", {
|
|
397
398
|
type: "button",
|
|
398
399
|
className: "pagination__step",
|
|
399
400
|
onClick: () => {
|
|
@@ -401,33 +402,33 @@ function L({ page: i, pageCount: a, onPageChange: o, label: u, siblings: d = 1,
|
|
|
401
402
|
},
|
|
402
403
|
"aria-disabled": E || void 0,
|
|
403
404
|
"data-part": "previous",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
405
|
-
icon:
|
|
405
|
+
children: [/* @__PURE__ */ r(t, {
|
|
406
|
+
icon: p,
|
|
406
407
|
size: "sm"
|
|
407
|
-
}), /* @__PURE__ */ n
|
|
408
|
+
}), /* @__PURE__ */ r(n, { children: "이전 페이지" })]
|
|
408
409
|
}) }),
|
|
409
|
-
T.map((e,
|
|
410
|
+
T.map((e, t) => e === "gap" ? /* @__PURE__ */ r("li", {
|
|
410
411
|
className: "pagination__gap",
|
|
411
412
|
"aria-hidden": "true",
|
|
412
413
|
children: "…"
|
|
413
|
-
}, `gap-${
|
|
414
|
+
}, `gap-${t}`) : /* @__PURE__ */ r("li", { children: e === b ? /* @__PURE__ */ i("button", {
|
|
414
415
|
type: "button",
|
|
415
416
|
className: "pagination__page",
|
|
416
417
|
"aria-current": "page",
|
|
417
418
|
onClick: () => void 0,
|
|
418
419
|
"data-part": "current",
|
|
419
|
-
children: [/* @__PURE__ */ n
|
|
420
|
-
}) : /* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ r(n, { children: `${y}페이지 중 ` }), e]
|
|
421
|
+
}) : /* @__PURE__ */ i("button", {
|
|
421
422
|
type: "button",
|
|
422
423
|
className: "pagination__page",
|
|
423
424
|
onClick: () => o(e),
|
|
424
425
|
"data-part": `page-${e}`,
|
|
425
|
-
children: [/* @__PURE__ */ n
|
|
426
|
+
children: [/* @__PURE__ */ r(n, { children: `${e}페이지로` }), /* @__PURE__ */ r("span", {
|
|
426
427
|
"aria-hidden": "true",
|
|
427
428
|
children: e
|
|
428
429
|
})]
|
|
429
430
|
}) }, e)),
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ r("li", { children: /* @__PURE__ */ i("button", {
|
|
431
432
|
type: "button",
|
|
432
433
|
className: "pagination__step",
|
|
433
434
|
onClick: () => {
|
|
@@ -435,16 +436,76 @@ function L({ page: i, pageCount: a, onPageChange: o, label: u, siblings: d = 1,
|
|
|
435
436
|
},
|
|
436
437
|
"aria-disabled": D || void 0,
|
|
437
438
|
"data-part": "next",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
439
|
-
icon:
|
|
439
|
+
children: [/* @__PURE__ */ r(t, {
|
|
440
|
+
icon: m,
|
|
440
441
|
size: "sm"
|
|
441
|
-
}), /* @__PURE__ */ n
|
|
442
|
+
}), /* @__PURE__ */ r(n, { children: "다음 페이지" })]
|
|
442
443
|
}) })
|
|
443
444
|
]
|
|
444
445
|
})]
|
|
445
446
|
});
|
|
446
447
|
}
|
|
447
448
|
//#endregion
|
|
448
|
-
|
|
449
|
+
//#region src/components/composed/Popover/Popover.tsx
|
|
450
|
+
function V({ children: t, content: n, title: a, titleHidden: o, description: c, side: l = "bottom", align: u = "center", width: d = "md", arrow: f = !0, dismissible: p, open: m, defaultOpen: h, onOpenChange: v, className: y, ...b }) {
|
|
451
|
+
let x = s();
|
|
452
|
+
return /* @__PURE__ */ i(_.Root, {
|
|
453
|
+
open: m,
|
|
454
|
+
defaultOpen: h,
|
|
455
|
+
onOpenChange: v,
|
|
456
|
+
children: [/* @__PURE__ */ r(_.Trigger, {
|
|
457
|
+
asChild: !0,
|
|
458
|
+
children: t
|
|
459
|
+
}), /* @__PURE__ */ r(_.Portal, { children: /* @__PURE__ */ i(_.Content, {
|
|
460
|
+
...b,
|
|
461
|
+
className: `popover ${y ?? ""}`.trim(),
|
|
462
|
+
side: l,
|
|
463
|
+
align: u,
|
|
464
|
+
sideOffset: 8,
|
|
465
|
+
collisionPadding: 12,
|
|
466
|
+
"data-width": d,
|
|
467
|
+
"aria-labelledby": `${x}-title`,
|
|
468
|
+
"aria-describedby": c ? `${x}-description` : void 0,
|
|
469
|
+
children: [
|
|
470
|
+
/* @__PURE__ */ i("div", {
|
|
471
|
+
className: "popover__head",
|
|
472
|
+
"data-empty": o && !p ? "" : void 0,
|
|
473
|
+
children: [/* @__PURE__ */ r("h2", {
|
|
474
|
+
className: "popover__title",
|
|
475
|
+
id: `${x}-title`,
|
|
476
|
+
"data-hidden": o ? "" : void 0,
|
|
477
|
+
children: a
|
|
478
|
+
}), p ? /* @__PURE__ */ r(_.Close, {
|
|
479
|
+
asChild: !0,
|
|
480
|
+
children: /* @__PURE__ */ r(e, {
|
|
481
|
+
icon: g,
|
|
482
|
+
label: `${a} 닫기`,
|
|
483
|
+
size: "sm",
|
|
484
|
+
variant: "ghost",
|
|
485
|
+
tone: "neutral",
|
|
486
|
+
"data-part": "close"
|
|
487
|
+
})
|
|
488
|
+
}) : null]
|
|
489
|
+
}),
|
|
490
|
+
c ? /* @__PURE__ */ r("p", {
|
|
491
|
+
className: "popover__description",
|
|
492
|
+
id: `${x}-description`,
|
|
493
|
+
children: c
|
|
494
|
+
}) : null,
|
|
495
|
+
/* @__PURE__ */ r("div", {
|
|
496
|
+
className: "popover__body",
|
|
497
|
+
children: n
|
|
498
|
+
}),
|
|
499
|
+
f ? /* @__PURE__ */ r(_.Arrow, {
|
|
500
|
+
className: "popover__arrow",
|
|
501
|
+
width: 12,
|
|
502
|
+
height: 6
|
|
503
|
+
}) : null
|
|
504
|
+
]
|
|
505
|
+
}) })]
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
//#endregion
|
|
509
|
+
export { A as a, j as c, F as d, w as f, x as h, O as i, M as l, S as m, B as n, N as o, C as p, z as r, k as s, V as t, P as u };
|
|
449
510
|
|
|
450
|
-
//# sourceMappingURL=
|
|
511
|
+
//# sourceMappingURL=Popover-Cq6yhJaK.js.map
|