@wipco/sdui 0.1.0 → 0.3.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/LICENSE +21 -0
- package/NOTICE +27 -0
- package/dist/chunk-4SU2KYPU.js +59 -0
- package/dist/chunk-56KKWLNI.js +186 -0
- package/dist/chunk-7Y4J7EOK.js +115 -0
- package/dist/chunk-APCXOCAO.js +110 -0
- package/dist/chunk-AROOQ5W6.js +119 -0
- package/dist/chunk-DGPRX4MU.js +251 -0
- package/dist/chunk-IL2KS4WS.js +25 -0
- package/dist/chunk-KADFN76X.js +541 -0
- package/dist/chunk-KBHI3IUR.js +40 -0
- package/dist/chunk-LZJTKVMO.js +767 -0
- package/dist/chunk-MOIU7MUA.js +282 -0
- package/dist/chunk-MSAV4J4I.js +77 -0
- package/dist/chunk-OOHHW4K4.js +159 -0
- package/dist/chunk-Q6SBH63R.js +190 -0
- package/dist/chunk-QZQDHSMD.js +78 -0
- package/dist/chunk-RH7ESUE6.js +309 -0
- package/dist/chunk-SEBPBUZR.js +260 -0
- package/dist/chunk-USKRM22W.js +39 -0
- package/dist/chunk-WNYWTFGW.js +61 -0
- package/dist/chunk-WVRCIVAD.js +72 -0
- package/dist/chunk-YJMD6MOE.js +404 -0
- package/dist/chunk-ZNITJ4KK.js +433 -0
- package/dist/chunk-ZQR3ULVH.js +193 -0
- package/dist/chunk-ZUCI34QY.js +1290 -0
- package/dist/index.d.ts +391 -79
- package/dist/index.js +277 -758
- package/dist/meta.d.ts +10 -2
- package/dist/meta.js +268 -27
- package/dist/rich.js +3 -2
- package/dist/styles.css +334 -13
- package/dist/widgets/AutocompleteField.d.ts +96 -0
- package/dist/widgets/AutocompleteField.js +3 -0
- package/dist/widgets/ColumnBoard.d.ts +47 -0
- package/dist/widgets/ColumnBoard.js +2 -0
- package/dist/widgets/DiffView.d.ts +30 -0
- package/dist/widgets/DiffView.js +2 -0
- package/dist/widgets/Disclosure.d.ts +20 -0
- package/dist/widgets/Disclosure.js +2 -0
- package/dist/widgets/EventCalendar.d.ts +59 -0
- package/dist/widgets/EventCalendar.js +2 -0
- package/dist/widgets/ImageLightbox.d.ts +25 -0
- package/dist/widgets/ImageLightbox.js +2 -0
- package/dist/widgets/InlineEdit.d.ts +23 -0
- package/dist/widgets/InlineEdit.js +2 -0
- package/dist/widgets/JsonField.d.ts +24 -0
- package/dist/widgets/JsonField.js +2 -0
- package/dist/widgets/LiveClock.d.ts +21 -0
- package/dist/widgets/LiveClock.js +1 -0
- package/dist/widgets/OrgChart.d.ts +32 -0
- package/dist/widgets/OrgChart.js +2 -0
- package/dist/widgets/PeriodFilter.d.ts +48 -0
- package/dist/widgets/PeriodFilter.js +2 -0
- package/dist/widgets/PrintSheet.d.ts +23 -0
- package/dist/widgets/PrintSheet.js +2 -0
- package/dist/widgets/SearchableMultiPicker.d.ts +29 -0
- package/dist/widgets/SearchableMultiPicker.js +3 -0
- package/dist/widgets/SecureScreen.d.ts +25 -0
- package/dist/widgets/SecureScreen.js +2 -0
- package/dist/widgets/StackedMeter.d.ts +26 -0
- package/dist/widgets/StackedMeter.js +1 -0
- package/dist/widgets/Strip.d.ts +20 -0
- package/dist/widgets/Strip.js +1 -0
- package/dist/widgets/SummaryTable.d.ts +31 -0
- package/dist/widgets/SummaryTable.js +1 -0
- package/dist/widgets/TagMultiSelect.d.ts +25 -0
- package/dist/widgets/TagMultiSelect.js +2 -0
- package/dist/widgets/Timeline.d.ts +30 -0
- package/dist/widgets/Timeline.js +3 -0
- package/dist/widgets/TreePicker.d.ts +21 -0
- package/dist/widgets/TreePicker.js +3 -0
- package/dist/widgets/TreeView.d.ts +26 -0
- package/dist/widgets/TreeView.js +2 -0
- package/dist/widgets/index.d.ts +76 -0
- package/dist/widgets/index.js +69 -0
- package/package.json +93 -3
- package/dist/chunk-AR2JYE75.js +0 -889
|
@@ -0,0 +1,1290 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components.tsx
|
|
5
|
+
|
|
6
|
+
// src/icons.ts
|
|
7
|
+
var ICON_NODES = {
|
|
8
|
+
"activity": [
|
|
9
|
+
{ t: "path", d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }
|
|
10
|
+
],
|
|
11
|
+
"arrow-down": [
|
|
12
|
+
{ t: "path", d: "M12 5v14" },
|
|
13
|
+
{ t: "path", d: "m19 12-7 7-7-7" }
|
|
14
|
+
],
|
|
15
|
+
"arrow-left": [
|
|
16
|
+
{ t: "path", d: "m12 19-7-7 7-7" },
|
|
17
|
+
{ t: "path", d: "M19 12H5" }
|
|
18
|
+
],
|
|
19
|
+
"arrow-right": [
|
|
20
|
+
{ t: "path", d: "M5 12h14" },
|
|
21
|
+
{ t: "path", d: "m12 5 7 7-7 7" }
|
|
22
|
+
],
|
|
23
|
+
"arrow-up-right": [
|
|
24
|
+
{ t: "path", d: "M7 7h10v10" },
|
|
25
|
+
{ t: "path", d: "M7 17 17 7" }
|
|
26
|
+
],
|
|
27
|
+
"axis-3d": [
|
|
28
|
+
{ t: "path", d: "M13.5 10.5 15 9" },
|
|
29
|
+
{ t: "path", d: "M4 4v15a1 1 0 0 0 1 1h15" },
|
|
30
|
+
{ t: "path", d: "M4.293 19.707 6 18" },
|
|
31
|
+
{ t: "path", d: "m9 15 1.5-1.5" }
|
|
32
|
+
],
|
|
33
|
+
"bell": [
|
|
34
|
+
{ t: "path", d: "M10.268 21a2 2 0 0 0 3.464 0" },
|
|
35
|
+
{ t: "path", d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }
|
|
36
|
+
],
|
|
37
|
+
"blocks": [
|
|
38
|
+
{ t: "path", d: "M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2" },
|
|
39
|
+
{ t: "rect", x: "14", y: "2", width: "8", height: "8", rx: "1" }
|
|
40
|
+
],
|
|
41
|
+
"bookmark": [
|
|
42
|
+
{ t: "path", d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z" }
|
|
43
|
+
],
|
|
44
|
+
"box": [
|
|
45
|
+
{ t: "path", d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" },
|
|
46
|
+
{ t: "path", d: "m3.3 7 8.7 5 8.7-5" },
|
|
47
|
+
{ t: "path", d: "M12 22V12" }
|
|
48
|
+
],
|
|
49
|
+
"boxes": [
|
|
50
|
+
{ t: "path", d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" },
|
|
51
|
+
{ t: "path", d: "m7 16.5-4.74-2.85" },
|
|
52
|
+
{ t: "path", d: "m7 16.5 5-3" },
|
|
53
|
+
{ t: "path", d: "M7 16.5v5.17" },
|
|
54
|
+
{ t: "path", d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" },
|
|
55
|
+
{ t: "path", d: "m17 16.5-5-3" },
|
|
56
|
+
{ t: "path", d: "m17 16.5 4.74-2.85" },
|
|
57
|
+
{ t: "path", d: "M17 16.5v5.17" },
|
|
58
|
+
{ t: "path", d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" },
|
|
59
|
+
{ t: "path", d: "M12 8 7.26 5.15" },
|
|
60
|
+
{ t: "path", d: "m12 8 4.74-2.85" },
|
|
61
|
+
{ t: "path", d: "M12 13.5V8" }
|
|
62
|
+
],
|
|
63
|
+
"building-2": [
|
|
64
|
+
{ t: "path", d: "M10 12h4" },
|
|
65
|
+
{ t: "path", d: "M10 8h4" },
|
|
66
|
+
{ t: "path", d: "M14 21v-3a2 2 0 0 0-4 0v3" },
|
|
67
|
+
{ t: "path", d: "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2" },
|
|
68
|
+
{ t: "path", d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16" }
|
|
69
|
+
],
|
|
70
|
+
"calendar": [
|
|
71
|
+
{ t: "path", d: "M8 2v3" },
|
|
72
|
+
{ t: "path", d: "M16 2v3" },
|
|
73
|
+
{ t: "rect", x: "3", y: "3", width: "18", height: "18", rx: "2" },
|
|
74
|
+
{ t: "path", d: "M3 9h18" }
|
|
75
|
+
],
|
|
76
|
+
"camera": [
|
|
77
|
+
{ t: "path", d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" },
|
|
78
|
+
{ t: "circle", cx: "12", cy: "13", r: "3" }
|
|
79
|
+
],
|
|
80
|
+
"chart-column": [
|
|
81
|
+
{ t: "path", d: "M3 3v16a2 2 0 0 0 2 2h16" },
|
|
82
|
+
{ t: "path", d: "M18 17V9" },
|
|
83
|
+
{ t: "path", d: "M13 17V5" },
|
|
84
|
+
{ t: "path", d: "M8 17v-3" }
|
|
85
|
+
],
|
|
86
|
+
"chart-pie": [
|
|
87
|
+
{ t: "path", d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" },
|
|
88
|
+
{ t: "path", d: "M21.21 15.89A10 10 0 1 1 8 2.83" }
|
|
89
|
+
],
|
|
90
|
+
"check": [
|
|
91
|
+
{ t: "path", d: "M20 6 9 17l-5-5" }
|
|
92
|
+
],
|
|
93
|
+
"check-check": [
|
|
94
|
+
{ t: "path", d: "M18 6 7 17l-5-5" },
|
|
95
|
+
{ t: "path", d: "m22 10-7.5 7.5L13 16" }
|
|
96
|
+
],
|
|
97
|
+
"chevron-down": [
|
|
98
|
+
{ t: "path", d: "m6 9 6 6 6-6" }
|
|
99
|
+
],
|
|
100
|
+
"chevron-left": [
|
|
101
|
+
{ t: "path", d: "m15 18-6-6 6-6" }
|
|
102
|
+
],
|
|
103
|
+
"chevron-right": [
|
|
104
|
+
{ t: "path", d: "m9 18 6-6-6-6" }
|
|
105
|
+
],
|
|
106
|
+
"chevron-up": [
|
|
107
|
+
{ t: "path", d: "m18 15-6-6-6 6" }
|
|
108
|
+
],
|
|
109
|
+
"chevrons-up-down": [
|
|
110
|
+
{ t: "path", d: "m7 15 5 5 5-5" },
|
|
111
|
+
{ t: "path", d: "m7 9 5-5 5 5" }
|
|
112
|
+
],
|
|
113
|
+
"circle-alert": [
|
|
114
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
115
|
+
{ t: "line", x1: "12", x2: "12", y1: "8", y2: "12" },
|
|
116
|
+
{ t: "line", x1: "12", x2: "12.01", y1: "16", y2: "16" }
|
|
117
|
+
],
|
|
118
|
+
"circle-check": [
|
|
119
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
120
|
+
{ t: "path", d: "m9 12 2 2 4-4" }
|
|
121
|
+
],
|
|
122
|
+
"circle-dot": [
|
|
123
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
124
|
+
{ t: "circle", cx: "12", cy: "12", r: "1" }
|
|
125
|
+
],
|
|
126
|
+
"circle-question-mark": [
|
|
127
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
128
|
+
{ t: "path", d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" },
|
|
129
|
+
{ t: "path", d: "M12 17h.01" }
|
|
130
|
+
],
|
|
131
|
+
"circle-user": [
|
|
132
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
133
|
+
{ t: "circle", cx: "12", cy: "10", r: "3" },
|
|
134
|
+
{ t: "path", d: "M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" }
|
|
135
|
+
],
|
|
136
|
+
"circle-x": [
|
|
137
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
138
|
+
{ t: "path", d: "m15 9-6 6" },
|
|
139
|
+
{ t: "path", d: "m9 9 6 6" }
|
|
140
|
+
],
|
|
141
|
+
"clock": [
|
|
142
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
143
|
+
{ t: "path", d: "M12 6v6l4 2" }
|
|
144
|
+
],
|
|
145
|
+
"cloud": [
|
|
146
|
+
{ t: "path", d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" }
|
|
147
|
+
],
|
|
148
|
+
"cloud-upload": [
|
|
149
|
+
{ t: "path", d: "M12 13v8" },
|
|
150
|
+
{ t: "path", d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" },
|
|
151
|
+
{ t: "path", d: "m8 17 4-4 4 4" }
|
|
152
|
+
],
|
|
153
|
+
"compass": [
|
|
154
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
155
|
+
{ t: "path", d: "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" }
|
|
156
|
+
],
|
|
157
|
+
"component": [
|
|
158
|
+
{ t: "path", d: "M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" },
|
|
159
|
+
{ t: "path", d: "M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z" },
|
|
160
|
+
{ t: "path", d: "M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z" },
|
|
161
|
+
{ t: "path", d: "M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z" }
|
|
162
|
+
],
|
|
163
|
+
"construction": [
|
|
164
|
+
{ t: "rect", x: "2", y: "6", width: "20", height: "8", rx: "1" },
|
|
165
|
+
{ t: "path", d: "M17 14v7" },
|
|
166
|
+
{ t: "path", d: "M7 14v7" },
|
|
167
|
+
{ t: "path", d: "M17 3v3" },
|
|
168
|
+
{ t: "path", d: "M7 3v3" },
|
|
169
|
+
{ t: "path", d: "M10 14 2.3 6.3" },
|
|
170
|
+
{ t: "path", d: "m14 6 7.7 7.7" },
|
|
171
|
+
{ t: "path", d: "m8 6 8 8" }
|
|
172
|
+
],
|
|
173
|
+
"copy": [
|
|
174
|
+
{ t: "rect", width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" },
|
|
175
|
+
{ t: "path", d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }
|
|
176
|
+
],
|
|
177
|
+
"cpu": [
|
|
178
|
+
{ t: "path", d: "M12 20v2" },
|
|
179
|
+
{ t: "path", d: "M12 2v2" },
|
|
180
|
+
{ t: "path", d: "M17 20v2" },
|
|
181
|
+
{ t: "path", d: "M17 2v2" },
|
|
182
|
+
{ t: "path", d: "M2 12h2" },
|
|
183
|
+
{ t: "path", d: "M2 17h2" },
|
|
184
|
+
{ t: "path", d: "M2 7h2" },
|
|
185
|
+
{ t: "path", d: "M20 12h2" },
|
|
186
|
+
{ t: "path", d: "M20 17h2" },
|
|
187
|
+
{ t: "path", d: "M20 7h2" },
|
|
188
|
+
{ t: "path", d: "M7 20v2" },
|
|
189
|
+
{ t: "path", d: "M7 2v2" },
|
|
190
|
+
{ t: "rect", x: "4", y: "4", width: "16", height: "16", rx: "2" },
|
|
191
|
+
{ t: "rect", x: "8", y: "8", width: "8", height: "8", rx: "1" }
|
|
192
|
+
],
|
|
193
|
+
"crosshair": [
|
|
194
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
195
|
+
{ t: "line", x1: "22", x2: "18", y1: "12", y2: "12" },
|
|
196
|
+
{ t: "line", x1: "6", x2: "2", y1: "12", y2: "12" },
|
|
197
|
+
{ t: "line", x1: "12", x2: "12", y1: "6", y2: "2" },
|
|
198
|
+
{ t: "line", x1: "12", x2: "12", y1: "22", y2: "18" }
|
|
199
|
+
],
|
|
200
|
+
"database": [
|
|
201
|
+
{ t: "ellipse", cx: "12", cy: "5", rx: "9", ry: "3" },
|
|
202
|
+
{ t: "path", d: "M3 5V19A9 3 0 0 0 21 19V5" },
|
|
203
|
+
{ t: "path", d: "M3 12A9 3 0 0 0 21 12" }
|
|
204
|
+
],
|
|
205
|
+
"download": [
|
|
206
|
+
{ t: "path", d: "M12 15V3" },
|
|
207
|
+
{ t: "path", d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" },
|
|
208
|
+
{ t: "path", d: "m7 10 5 5 5-5" }
|
|
209
|
+
],
|
|
210
|
+
"ellipsis": [
|
|
211
|
+
{ t: "circle", cx: "12", cy: "12", r: "1" },
|
|
212
|
+
{ t: "circle", cx: "19", cy: "12", r: "1" },
|
|
213
|
+
{ t: "circle", cx: "5", cy: "12", r: "1" }
|
|
214
|
+
],
|
|
215
|
+
"ellipsis-vertical": [
|
|
216
|
+
{ t: "circle", cx: "12", cy: "12", r: "1" },
|
|
217
|
+
{ t: "circle", cx: "12", cy: "5", r: "1" },
|
|
218
|
+
{ t: "circle", cx: "12", cy: "19", r: "1" }
|
|
219
|
+
],
|
|
220
|
+
"external-link": [
|
|
221
|
+
{ t: "path", d: "M15 3h6v6" },
|
|
222
|
+
{ t: "path", d: "M10 14 21 3" },
|
|
223
|
+
{ t: "path", d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }
|
|
224
|
+
],
|
|
225
|
+
"eye": [
|
|
226
|
+
{ t: "path", d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" },
|
|
227
|
+
{ t: "circle", cx: "12", cy: "12", r: "3" }
|
|
228
|
+
],
|
|
229
|
+
"eye-off": [
|
|
230
|
+
{ t: "path", d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" },
|
|
231
|
+
{ t: "path", d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" },
|
|
232
|
+
{ t: "path", d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" },
|
|
233
|
+
{ t: "path", d: "m2 2 20 20" }
|
|
234
|
+
],
|
|
235
|
+
"factory": [
|
|
236
|
+
{ t: "path", d: "M12 16h.01" },
|
|
237
|
+
{ t: "path", d: "M16 16h.01" },
|
|
238
|
+
{ t: "path", d: "M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z" },
|
|
239
|
+
{ t: "path", d: "M8 16h.01" }
|
|
240
|
+
],
|
|
241
|
+
"file-text": [
|
|
242
|
+
{ t: "path", d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" },
|
|
243
|
+
{ t: "path", d: "M14 2v5a1 1 0 0 0 1 1h5" },
|
|
244
|
+
{ t: "path", d: "M10 9H8" },
|
|
245
|
+
{ t: "path", d: "M16 13H8" },
|
|
246
|
+
{ t: "path", d: "M16 17H8" }
|
|
247
|
+
],
|
|
248
|
+
"files": [
|
|
249
|
+
{ t: "path", d: "M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" },
|
|
250
|
+
{ t: "path", d: "M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z" },
|
|
251
|
+
{ t: "path", d: "M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" }
|
|
252
|
+
],
|
|
253
|
+
"flag": [
|
|
254
|
+
{ t: "path", d: "M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528" }
|
|
255
|
+
],
|
|
256
|
+
"folder": [
|
|
257
|
+
{ t: "path", d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }
|
|
258
|
+
],
|
|
259
|
+
"folder-open": [
|
|
260
|
+
{ t: "path", d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" }
|
|
261
|
+
],
|
|
262
|
+
"funnel": [
|
|
263
|
+
{ t: "path", d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }
|
|
264
|
+
],
|
|
265
|
+
"gauge": [
|
|
266
|
+
{ t: "path", d: "m12 14 4-4" },
|
|
267
|
+
{ t: "path", d: "M3.34 19a10 10 0 1 1 17.32 0" }
|
|
268
|
+
],
|
|
269
|
+
"git-branch": [
|
|
270
|
+
{ t: "path", d: "M15 6a9 9 0 0 0-9 9V3" },
|
|
271
|
+
{ t: "circle", cx: "18", cy: "6", r: "3" },
|
|
272
|
+
{ t: "circle", cx: "6", cy: "18", r: "3" }
|
|
273
|
+
],
|
|
274
|
+
"grid-3x3": [
|
|
275
|
+
{ t: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" },
|
|
276
|
+
{ t: "path", d: "M3 9h18" },
|
|
277
|
+
{ t: "path", d: "M3 15h18" },
|
|
278
|
+
{ t: "path", d: "M9 3v18" },
|
|
279
|
+
{ t: "path", d: "M15 3v18" }
|
|
280
|
+
],
|
|
281
|
+
"hammer": [
|
|
282
|
+
{ t: "path", d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" },
|
|
283
|
+
{ t: "path", d: "m18 15 4-4" },
|
|
284
|
+
{ t: "path", d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" }
|
|
285
|
+
],
|
|
286
|
+
"hard-drive": [
|
|
287
|
+
{ t: "path", d: "M10 16h.01" },
|
|
288
|
+
{ t: "path", d: "M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" },
|
|
289
|
+
{ t: "path", d: "M21.946 12.013H2.054" },
|
|
290
|
+
{ t: "path", d: "M6 16h.01" }
|
|
291
|
+
],
|
|
292
|
+
"image": [
|
|
293
|
+
{ t: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" },
|
|
294
|
+
{ t: "circle", cx: "9", cy: "9", r: "2" },
|
|
295
|
+
{ t: "path", d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }
|
|
296
|
+
],
|
|
297
|
+
"info": [
|
|
298
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
299
|
+
{ t: "path", d: "M12 16v-4" },
|
|
300
|
+
{ t: "path", d: "M12 8h.01" }
|
|
301
|
+
],
|
|
302
|
+
"key": [
|
|
303
|
+
{ t: "path", d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4" },
|
|
304
|
+
{ t: "path", d: "m21 2-9.6 9.6" },
|
|
305
|
+
{ t: "circle", cx: "7.5", cy: "15.5", r: "5.5" }
|
|
306
|
+
],
|
|
307
|
+
"land-plot": [
|
|
308
|
+
{ t: "path", d: "m12 8 6-3-6-3v10" },
|
|
309
|
+
{ t: "path", d: "m8 11.99-5.5 3.14a1 1 0 0 0 0 1.74l8.5 4.86a2 2 0 0 0 2 0l8.5-4.86a1 1 0 0 0 0-1.74L16 12" },
|
|
310
|
+
{ t: "path", d: "m6.49 12.85 11.02 6.3" },
|
|
311
|
+
{ t: "path", d: "M17.51 12.85 6.5 19.15" }
|
|
312
|
+
],
|
|
313
|
+
"layers": [
|
|
314
|
+
{ t: "path", d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" },
|
|
315
|
+
{ t: "path", d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" },
|
|
316
|
+
{ t: "path", d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" }
|
|
317
|
+
],
|
|
318
|
+
"layout-dashboard": [
|
|
319
|
+
{ t: "rect", width: "7", height: "9", x: "3", y: "3", rx: "1" },
|
|
320
|
+
{ t: "rect", width: "7", height: "5", x: "14", y: "3", rx: "1" },
|
|
321
|
+
{ t: "rect", width: "7", height: "9", x: "14", y: "12", rx: "1" },
|
|
322
|
+
{ t: "rect", width: "7", height: "5", x: "3", y: "16", rx: "1" }
|
|
323
|
+
],
|
|
324
|
+
"layout-grid": [
|
|
325
|
+
{ t: "rect", width: "7", height: "7", x: "3", y: "3", rx: "1" },
|
|
326
|
+
{ t: "rect", width: "7", height: "7", x: "14", y: "3", rx: "1" },
|
|
327
|
+
{ t: "rect", width: "7", height: "7", x: "14", y: "14", rx: "1" },
|
|
328
|
+
{ t: "rect", width: "7", height: "7", x: "3", y: "14", rx: "1" }
|
|
329
|
+
],
|
|
330
|
+
"link": [
|
|
331
|
+
{ t: "path", d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" },
|
|
332
|
+
{ t: "path", d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }
|
|
333
|
+
],
|
|
334
|
+
"list": [
|
|
335
|
+
{ t: "path", d: "M3 5h.01" },
|
|
336
|
+
{ t: "path", d: "M3 12h.01" },
|
|
337
|
+
{ t: "path", d: "M3 19h.01" },
|
|
338
|
+
{ t: "path", d: "M8 5h13" },
|
|
339
|
+
{ t: "path", d: "M8 12h13" },
|
|
340
|
+
{ t: "path", d: "M8 19h13" }
|
|
341
|
+
],
|
|
342
|
+
"list-filter": [
|
|
343
|
+
{ t: "path", d: "M2 5h20" },
|
|
344
|
+
{ t: "path", d: "M6 12h12" },
|
|
345
|
+
{ t: "path", d: "M9 19h6" }
|
|
346
|
+
],
|
|
347
|
+
"loader-circle": [
|
|
348
|
+
{ t: "path", d: "M21 12a9 9 0 1 1-6.219-8.56" }
|
|
349
|
+
],
|
|
350
|
+
"locate-fixed": [
|
|
351
|
+
{ t: "line", x1: "2", x2: "5", y1: "12", y2: "12" },
|
|
352
|
+
{ t: "line", x1: "19", x2: "22", y1: "12", y2: "12" },
|
|
353
|
+
{ t: "line", x1: "12", x2: "12", y1: "2", y2: "5" },
|
|
354
|
+
{ t: "line", x1: "12", x2: "12", y1: "19", y2: "22" },
|
|
355
|
+
{ t: "circle", cx: "12", cy: "12", r: "7" },
|
|
356
|
+
{ t: "circle", cx: "12", cy: "12", r: "3" }
|
|
357
|
+
],
|
|
358
|
+
"lock": [
|
|
359
|
+
{ t: "rect", width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" },
|
|
360
|
+
{ t: "path", d: "M7 11V7a5 5 0 0 1 10 0v4" }
|
|
361
|
+
],
|
|
362
|
+
"lock-open": [
|
|
363
|
+
{ t: "rect", width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" },
|
|
364
|
+
{ t: "path", d: "M7 11V7a5 5 0 0 1 9.9-1" }
|
|
365
|
+
],
|
|
366
|
+
"log-out": [
|
|
367
|
+
{ t: "path", d: "m16 17 5-5-5-5" },
|
|
368
|
+
{ t: "path", d: "M21 12H9" },
|
|
369
|
+
{ t: "path", d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }
|
|
370
|
+
],
|
|
371
|
+
"map": [
|
|
372
|
+
{ t: "path", d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z" },
|
|
373
|
+
{ t: "path", d: "M15 5.764v15" },
|
|
374
|
+
{ t: "path", d: "M9 3.236v15" }
|
|
375
|
+
],
|
|
376
|
+
"map-pin": [
|
|
377
|
+
{ t: "path", d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" },
|
|
378
|
+
{ t: "circle", cx: "12", cy: "10", r: "3" }
|
|
379
|
+
],
|
|
380
|
+
"maximize": [
|
|
381
|
+
{ t: "path", d: "M8 3H5a2 2 0 0 0-2 2v3" },
|
|
382
|
+
{ t: "path", d: "M21 8V5a2 2 0 0 0-2-2h-3" },
|
|
383
|
+
{ t: "path", d: "M3 16v3a2 2 0 0 0 2 2h3" },
|
|
384
|
+
{ t: "path", d: "M16 21h3a2 2 0 0 0 2-2v-3" }
|
|
385
|
+
],
|
|
386
|
+
"message-square": [
|
|
387
|
+
{ t: "path", d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }
|
|
388
|
+
],
|
|
389
|
+
"minimize": [
|
|
390
|
+
{ t: "path", d: "M8 3v3a2 2 0 0 1-2 2H3" },
|
|
391
|
+
{ t: "path", d: "M21 8h-3a2 2 0 0 1-2-2V3" },
|
|
392
|
+
{ t: "path", d: "M3 16h3a2 2 0 0 1 2 2v3" },
|
|
393
|
+
{ t: "path", d: "M16 21v-3a2 2 0 0 1 2-2h3" }
|
|
394
|
+
],
|
|
395
|
+
"minus": [
|
|
396
|
+
{ t: "path", d: "M5 12h14" }
|
|
397
|
+
],
|
|
398
|
+
"monitor": [
|
|
399
|
+
{ t: "rect", width: "20", height: "14", x: "2", y: "3", rx: "2" },
|
|
400
|
+
{ t: "line", x1: "8", x2: "16", y1: "21", y2: "21" },
|
|
401
|
+
{ t: "line", x1: "12", x2: "12", y1: "17", y2: "21" }
|
|
402
|
+
],
|
|
403
|
+
"moon": [
|
|
404
|
+
{ t: "path", d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }
|
|
405
|
+
],
|
|
406
|
+
"move": [
|
|
407
|
+
{ t: "path", d: "M12 2v20" },
|
|
408
|
+
{ t: "path", d: "m15 19-3 3-3-3" },
|
|
409
|
+
{ t: "path", d: "m19 9 3 3-3 3" },
|
|
410
|
+
{ t: "path", d: "M2 12h20" },
|
|
411
|
+
{ t: "path", d: "m5 9-3 3 3 3" },
|
|
412
|
+
{ t: "path", d: "m9 5 3-3 3 3" }
|
|
413
|
+
],
|
|
414
|
+
"move-3d": [
|
|
415
|
+
{ t: "path", d: "M5 3v16h16" },
|
|
416
|
+
{ t: "path", d: "m5 19 6-6" },
|
|
417
|
+
{ t: "path", d: "m2 6 3-3 3 3" },
|
|
418
|
+
{ t: "path", d: "m18 16 3 3-3 3" }
|
|
419
|
+
],
|
|
420
|
+
"orbit": [
|
|
421
|
+
{ t: "path", d: "M20.341 6.484A10 10 0 0 1 10.266 21.85" },
|
|
422
|
+
{ t: "path", d: "M3.659 17.516A10 10 0 0 1 13.74 2.152" },
|
|
423
|
+
{ t: "circle", cx: "12", cy: "12", r: "3" },
|
|
424
|
+
{ t: "circle", cx: "19", cy: "5", r: "2" },
|
|
425
|
+
{ t: "circle", cx: "5", cy: "19", r: "2" }
|
|
426
|
+
],
|
|
427
|
+
"panel-left": [
|
|
428
|
+
{ t: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" },
|
|
429
|
+
{ t: "path", d: "M9 3v18" }
|
|
430
|
+
],
|
|
431
|
+
"panel-right-close": [
|
|
432
|
+
{ t: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" },
|
|
433
|
+
{ t: "path", d: "M15 3v18" },
|
|
434
|
+
{ t: "path", d: "m8 9 3 3-3 3" }
|
|
435
|
+
],
|
|
436
|
+
"paperclip": [
|
|
437
|
+
{ t: "path", d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }
|
|
438
|
+
],
|
|
439
|
+
"pause": [
|
|
440
|
+
{ t: "rect", x: "14", y: "3", width: "5", height: "18", rx: "1" },
|
|
441
|
+
{ t: "rect", x: "5", y: "3", width: "5", height: "18", rx: "1" }
|
|
442
|
+
],
|
|
443
|
+
"pen-tool": [
|
|
444
|
+
{ t: "path", d: "M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z" },
|
|
445
|
+
{ t: "path", d: "m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18" },
|
|
446
|
+
{ t: "path", d: "m2.3 2.3 7.286 7.286" },
|
|
447
|
+
{ t: "circle", cx: "11", cy: "11", r: "2" }
|
|
448
|
+
],
|
|
449
|
+
"pencil": [
|
|
450
|
+
{ t: "path", d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" },
|
|
451
|
+
{ t: "path", d: "m15 5 4 4" }
|
|
452
|
+
],
|
|
453
|
+
"pin": [
|
|
454
|
+
{ t: "path", d: "M12 17v5" },
|
|
455
|
+
{ t: "path", d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }
|
|
456
|
+
],
|
|
457
|
+
"play": [
|
|
458
|
+
{ t: "path", d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }
|
|
459
|
+
],
|
|
460
|
+
"plus": [
|
|
461
|
+
{ t: "path", d: "M5 12h14" },
|
|
462
|
+
{ t: "path", d: "M12 5v14" }
|
|
463
|
+
],
|
|
464
|
+
"radar": [
|
|
465
|
+
{ t: "path", d: "M19.07 4.93A10 10 0 0 0 6.99 3.34" },
|
|
466
|
+
{ t: "path", d: "M4 6h.01" },
|
|
467
|
+
{ t: "path", d: "M2.29 9.62A10 10 0 1 0 21.31 8.35" },
|
|
468
|
+
{ t: "path", d: "M16.24 7.76A6 6 0 1 0 8.23 16.67" },
|
|
469
|
+
{ t: "path", d: "M12 18h.01" },
|
|
470
|
+
{ t: "path", d: "M17.99 11.66A6 6 0 0 1 15.77 16.67" },
|
|
471
|
+
{ t: "circle", cx: "12", cy: "12", r: "2" },
|
|
472
|
+
{ t: "path", d: "m13.41 10.59 5.66-5.66" }
|
|
473
|
+
],
|
|
474
|
+
"refresh-cw": [
|
|
475
|
+
{ t: "path", d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" },
|
|
476
|
+
{ t: "path", d: "M21 3v5h-5" },
|
|
477
|
+
{ t: "path", d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" },
|
|
478
|
+
{ t: "path", d: "M8 16H3v5" }
|
|
479
|
+
],
|
|
480
|
+
"rotate-3d": [
|
|
481
|
+
{ t: "path", d: "m15.194 13.707 3.814 1.86-1.86 3.814" },
|
|
482
|
+
{ t: "path", d: "M16.47214 7.52786 A 5 10 0 1 0 13 21.79796" },
|
|
483
|
+
{ t: "path", d: "M21.79796 11 A 10 5 0 1 0 19 15.57071" }
|
|
484
|
+
],
|
|
485
|
+
"rotate-ccw": [
|
|
486
|
+
{ t: "path", d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" },
|
|
487
|
+
{ t: "path", d: "M3 3v5h5" }
|
|
488
|
+
],
|
|
489
|
+
"route": [
|
|
490
|
+
{ t: "circle", cx: "6", cy: "19", r: "3" },
|
|
491
|
+
{ t: "path", d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15" },
|
|
492
|
+
{ t: "circle", cx: "18", cy: "5", r: "3" }
|
|
493
|
+
],
|
|
494
|
+
"ruler": [
|
|
495
|
+
{ t: "path", d: "M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z" },
|
|
496
|
+
{ t: "path", d: "m14.5 12.5 2-2" },
|
|
497
|
+
{ t: "path", d: "m11.5 9.5 2-2" },
|
|
498
|
+
{ t: "path", d: "m8.5 6.5 2-2" },
|
|
499
|
+
{ t: "path", d: "m17.5 15.5 2-2" }
|
|
500
|
+
],
|
|
501
|
+
"scan": [
|
|
502
|
+
{ t: "path", d: "M3 7V5a2 2 0 0 1 2-2h2" },
|
|
503
|
+
{ t: "path", d: "M17 3h2a2 2 0 0 1 2 2v2" },
|
|
504
|
+
{ t: "path", d: "M21 17v2a2 2 0 0 1-2 2h-2" },
|
|
505
|
+
{ t: "path", d: "M7 21H5a2 2 0 0 1-2-2v-2" }
|
|
506
|
+
],
|
|
507
|
+
"scan-line": [
|
|
508
|
+
{ t: "path", d: "M3 7V5a2 2 0 0 1 2-2h2" },
|
|
509
|
+
{ t: "path", d: "M17 3h2a2 2 0 0 1 2 2v2" },
|
|
510
|
+
{ t: "path", d: "M21 17v2a2 2 0 0 1-2 2h-2" },
|
|
511
|
+
{ t: "path", d: "M7 21H5a2 2 0 0 1-2-2v-2" },
|
|
512
|
+
{ t: "path", d: "M7 12h10" }
|
|
513
|
+
],
|
|
514
|
+
"scan-search": [
|
|
515
|
+
{ t: "path", d: "M3 7V5a2 2 0 0 1 2-2h2" },
|
|
516
|
+
{ t: "path", d: "M17 3h2a2 2 0 0 1 2 2v2" },
|
|
517
|
+
{ t: "path", d: "M21 17v2a2 2 0 0 1-2 2h-2" },
|
|
518
|
+
{ t: "path", d: "M7 21H5a2 2 0 0 1-2-2v-2" },
|
|
519
|
+
{ t: "circle", cx: "12", cy: "12", r: "3" },
|
|
520
|
+
{ t: "path", d: "m16 16-1.9-1.9" }
|
|
521
|
+
],
|
|
522
|
+
"search": [
|
|
523
|
+
{ t: "path", d: "m21 21-4.34-4.34" },
|
|
524
|
+
{ t: "circle", cx: "11", cy: "11", r: "8" }
|
|
525
|
+
],
|
|
526
|
+
"send": [
|
|
527
|
+
{ t: "path", d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" },
|
|
528
|
+
{ t: "path", d: "m21.854 2.147-10.94 10.939" }
|
|
529
|
+
],
|
|
530
|
+
"settings": [
|
|
531
|
+
{ t: "path", d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" },
|
|
532
|
+
{ t: "circle", cx: "12", cy: "12", r: "3" }
|
|
533
|
+
],
|
|
534
|
+
"settings-2": [
|
|
535
|
+
{ t: "path", d: "M14 17H5" },
|
|
536
|
+
{ t: "path", d: "M19 7h-9" },
|
|
537
|
+
{ t: "circle", cx: "17", cy: "17", r: "3" },
|
|
538
|
+
{ t: "circle", cx: "7", cy: "7", r: "3" }
|
|
539
|
+
],
|
|
540
|
+
"share-2": [
|
|
541
|
+
{ t: "circle", cx: "18", cy: "5", r: "3" },
|
|
542
|
+
{ t: "circle", cx: "6", cy: "12", r: "3" },
|
|
543
|
+
{ t: "circle", cx: "18", cy: "19", r: "3" },
|
|
544
|
+
{ t: "line", x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49" },
|
|
545
|
+
{ t: "line", x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49" }
|
|
546
|
+
],
|
|
547
|
+
"shield-check": [
|
|
548
|
+
{ t: "path", d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" },
|
|
549
|
+
{ t: "path", d: "m9 12 2 2 4-4" }
|
|
550
|
+
],
|
|
551
|
+
"sliders-horizontal": [
|
|
552
|
+
{ t: "path", d: "M10 5H3" },
|
|
553
|
+
{ t: "path", d: "M12 19H3" },
|
|
554
|
+
{ t: "path", d: "M14 3v4" },
|
|
555
|
+
{ t: "path", d: "M16 17v4" },
|
|
556
|
+
{ t: "path", d: "M21 12h-9" },
|
|
557
|
+
{ t: "path", d: "M21 19h-5" },
|
|
558
|
+
{ t: "path", d: "M21 5h-7" },
|
|
559
|
+
{ t: "path", d: "M8 10v4" },
|
|
560
|
+
{ t: "path", d: "M8 12H3" }
|
|
561
|
+
],
|
|
562
|
+
"split": [
|
|
563
|
+
{ t: "path", d: "M16 3h5v5" },
|
|
564
|
+
{ t: "path", d: "M8 3H3v5" },
|
|
565
|
+
{ t: "path", d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" },
|
|
566
|
+
{ t: "path", d: "m15 9 6-6" }
|
|
567
|
+
],
|
|
568
|
+
"square-dashed": [
|
|
569
|
+
{ t: "path", d: "M5 3a2 2 0 0 0-2 2" },
|
|
570
|
+
{ t: "path", d: "M19 3a2 2 0 0 1 2 2" },
|
|
571
|
+
{ t: "path", d: "M21 19a2 2 0 0 1-2 2" },
|
|
572
|
+
{ t: "path", d: "M5 21a2 2 0 0 1-2-2" },
|
|
573
|
+
{ t: "path", d: "M9 3h1" },
|
|
574
|
+
{ t: "path", d: "M9 21h1" },
|
|
575
|
+
{ t: "path", d: "M14 3h1" },
|
|
576
|
+
{ t: "path", d: "M14 21h1" },
|
|
577
|
+
{ t: "path", d: "M3 9v1" },
|
|
578
|
+
{ t: "path", d: "M21 9v1" },
|
|
579
|
+
{ t: "path", d: "M3 14v1" },
|
|
580
|
+
{ t: "path", d: "M21 14v1" }
|
|
581
|
+
],
|
|
582
|
+
"square-pen": [
|
|
583
|
+
{ t: "path", d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" },
|
|
584
|
+
{ t: "path", d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" }
|
|
585
|
+
],
|
|
586
|
+
"star": [
|
|
587
|
+
{ t: "path", d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" }
|
|
588
|
+
],
|
|
589
|
+
"sun": [
|
|
590
|
+
{ t: "circle", cx: "12", cy: "12", r: "4" },
|
|
591
|
+
{ t: "path", d: "M12 2v2" },
|
|
592
|
+
{ t: "path", d: "M12 20v2" },
|
|
593
|
+
{ t: "path", d: "m4.93 4.93 1.41 1.41" },
|
|
594
|
+
{ t: "path", d: "m17.66 17.66 1.41 1.41" },
|
|
595
|
+
{ t: "path", d: "M2 12h2" },
|
|
596
|
+
{ t: "path", d: "M20 12h2" },
|
|
597
|
+
{ t: "path", d: "m6.34 17.66-1.41 1.41" },
|
|
598
|
+
{ t: "path", d: "m19.07 4.93-1.41 1.41" }
|
|
599
|
+
],
|
|
600
|
+
"table": [
|
|
601
|
+
{ t: "path", d: "M12 3v18" },
|
|
602
|
+
{ t: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" },
|
|
603
|
+
{ t: "path", d: "M3 9h18" },
|
|
604
|
+
{ t: "path", d: "M3 15h18" }
|
|
605
|
+
],
|
|
606
|
+
"tag": [
|
|
607
|
+
{ t: "path", d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" },
|
|
608
|
+
{ t: "circle", cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" }
|
|
609
|
+
],
|
|
610
|
+
"target": [
|
|
611
|
+
{ t: "circle", cx: "12", cy: "12", r: "10" },
|
|
612
|
+
{ t: "circle", cx: "12", cy: "12", r: "6" },
|
|
613
|
+
{ t: "circle", cx: "12", cy: "12", r: "2" }
|
|
614
|
+
],
|
|
615
|
+
"trash-2": [
|
|
616
|
+
{ t: "path", d: "M10 11v6" },
|
|
617
|
+
{ t: "path", d: "M14 11v6" },
|
|
618
|
+
{ t: "path", d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" },
|
|
619
|
+
{ t: "path", d: "M3 6h18" },
|
|
620
|
+
{ t: "path", d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }
|
|
621
|
+
],
|
|
622
|
+
"trending-up": [
|
|
623
|
+
{ t: "path", d: "M16 7h6v6" },
|
|
624
|
+
{ t: "path", d: "m22 7-8.5 8.5-5-5L2 17" }
|
|
625
|
+
],
|
|
626
|
+
"triangle-alert": [
|
|
627
|
+
{ t: "path", d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" },
|
|
628
|
+
{ t: "path", d: "M12 9v4" },
|
|
629
|
+
{ t: "path", d: "M12 17h.01" }
|
|
630
|
+
],
|
|
631
|
+
"unplug": [
|
|
632
|
+
{ t: "path", d: "m19 5 3-3" },
|
|
633
|
+
{ t: "path", d: "m2 22 3-3" },
|
|
634
|
+
{ t: "path", d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z" },
|
|
635
|
+
{ t: "path", d: "M7.5 13.5 10 11" },
|
|
636
|
+
{ t: "path", d: "M10.5 16.5 13 14" },
|
|
637
|
+
{ t: "path", d: "m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z" }
|
|
638
|
+
],
|
|
639
|
+
"upload": [
|
|
640
|
+
{ t: "path", d: "M12 3v12" },
|
|
641
|
+
{ t: "path", d: "m17 8-5-5-5 5" },
|
|
642
|
+
{ t: "path", d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }
|
|
643
|
+
],
|
|
644
|
+
"user": [
|
|
645
|
+
{ t: "path", d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" },
|
|
646
|
+
{ t: "circle", cx: "12", cy: "7", r: "4" }
|
|
647
|
+
],
|
|
648
|
+
"users": [
|
|
649
|
+
{ t: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" },
|
|
650
|
+
{ t: "path", d: "M16 3.128a4 4 0 0 1 0 7.744" },
|
|
651
|
+
{ t: "path", d: "M22 21v-2a4 4 0 0 0-3-3.87" },
|
|
652
|
+
{ t: "circle", cx: "9", cy: "7", r: "4" }
|
|
653
|
+
],
|
|
654
|
+
"video": [
|
|
655
|
+
{ t: "path", d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" },
|
|
656
|
+
{ t: "rect", x: "2", y: "6", width: "14", height: "12", rx: "2" }
|
|
657
|
+
],
|
|
658
|
+
"waypoints": [
|
|
659
|
+
{ t: "path", d: "m10.586 5.414-5.172 5.172" },
|
|
660
|
+
{ t: "path", d: "m18.586 13.414-5.172 5.172" },
|
|
661
|
+
{ t: "path", d: "M6 12h12" },
|
|
662
|
+
{ t: "circle", cx: "12", cy: "20", r: "2" },
|
|
663
|
+
{ t: "circle", cx: "12", cy: "4", r: "2" },
|
|
664
|
+
{ t: "circle", cx: "20", cy: "12", r: "2" },
|
|
665
|
+
{ t: "circle", cx: "4", cy: "12", r: "2" }
|
|
666
|
+
],
|
|
667
|
+
"workflow": [
|
|
668
|
+
{ t: "rect", width: "8", height: "8", x: "3", y: "3", rx: "2" },
|
|
669
|
+
{ t: "path", d: "M7 11v4a2 2 0 0 0 2 2h4" },
|
|
670
|
+
{ t: "rect", width: "8", height: "8", x: "13", y: "13", rx: "2" }
|
|
671
|
+
],
|
|
672
|
+
"wrench": [
|
|
673
|
+
{ t: "path", d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }
|
|
674
|
+
],
|
|
675
|
+
"x": [
|
|
676
|
+
{ t: "path", d: "M18 6 6 18" },
|
|
677
|
+
{ t: "path", d: "m6 6 12 12" }
|
|
678
|
+
],
|
|
679
|
+
"zoom-in": [
|
|
680
|
+
{ t: "circle", cx: "11", cy: "11", r: "8" },
|
|
681
|
+
{ t: "line", x1: "21", x2: "16.65", y1: "21", y2: "16.65" },
|
|
682
|
+
{ t: "line", x1: "11", x2: "11", y1: "8", y2: "14" },
|
|
683
|
+
{ t: "line", x1: "8", x2: "14", y1: "11", y2: "11" }
|
|
684
|
+
],
|
|
685
|
+
"zoom-out": [
|
|
686
|
+
{ t: "circle", cx: "11", cy: "11", r: "8" },
|
|
687
|
+
{ t: "line", x1: "21", x2: "16.65", y1: "21", y2: "16.65" },
|
|
688
|
+
{ t: "line", x1: "8", x2: "14", y1: "11", y2: "11" }
|
|
689
|
+
]
|
|
690
|
+
};
|
|
691
|
+
function cx(...parts) {
|
|
692
|
+
return parts.filter(Boolean).join(" ");
|
|
693
|
+
}
|
|
694
|
+
function Icon({ name, size = 18, strokeWidth = 1.5, className = "", style, title, ...rest }) {
|
|
695
|
+
const nodes = Object.hasOwn(ICON_NODES, name) ? ICON_NODES[name] : void 0;
|
|
696
|
+
if (!nodes) return null;
|
|
697
|
+
return /* @__PURE__ */ jsx(
|
|
698
|
+
"svg",
|
|
699
|
+
{
|
|
700
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
701
|
+
width: size,
|
|
702
|
+
height: size,
|
|
703
|
+
viewBox: "0 0 24 24",
|
|
704
|
+
fill: "none",
|
|
705
|
+
stroke: "currentColor",
|
|
706
|
+
strokeWidth,
|
|
707
|
+
strokeLinecap: "round",
|
|
708
|
+
strokeLinejoin: "round",
|
|
709
|
+
className: ("wp-ico " + className).trim(),
|
|
710
|
+
style: { flex: "none", display: "block", ...style },
|
|
711
|
+
role: title ? "img" : void 0,
|
|
712
|
+
"aria-hidden": title ? void 0 : true,
|
|
713
|
+
"aria-label": title,
|
|
714
|
+
...rest,
|
|
715
|
+
children: nodes.map(({ t: Tag2, ...attrs }, i) => /* @__PURE__ */ jsx(Tag2, { ...attrs }, i))
|
|
716
|
+
}
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
function Button({
|
|
720
|
+
variant = "secondary",
|
|
721
|
+
size = "md",
|
|
722
|
+
icon,
|
|
723
|
+
iconEnd,
|
|
724
|
+
loading = false,
|
|
725
|
+
block = false,
|
|
726
|
+
disabled = false,
|
|
727
|
+
as = "button",
|
|
728
|
+
children,
|
|
729
|
+
className = "",
|
|
730
|
+
...rest
|
|
731
|
+
}) {
|
|
732
|
+
const Tag2 = as;
|
|
733
|
+
const classes = ["wp-btn", `wp-btn--${variant}`];
|
|
734
|
+
if (size !== "md") classes.push(`wp-btn--${size}`);
|
|
735
|
+
if (block) classes.push("wp-btn--block");
|
|
736
|
+
if (loading) classes.push("wp-btn--loading");
|
|
737
|
+
if (className) classes.push(className);
|
|
738
|
+
const iconSize = size === "xs" || size === "sm" ? 14 : size === "lg" || size === "xl" ? 18 : 16;
|
|
739
|
+
return /* @__PURE__ */ jsxs(
|
|
740
|
+
Tag2,
|
|
741
|
+
{
|
|
742
|
+
className: classes.join(" "),
|
|
743
|
+
disabled: Tag2 === "button" ? disabled || loading : void 0,
|
|
744
|
+
"aria-disabled": disabled || void 0,
|
|
745
|
+
...rest,
|
|
746
|
+
children: [
|
|
747
|
+
icon ? /* @__PURE__ */ jsx(Icon, { name: icon, size: iconSize }) : null,
|
|
748
|
+
children,
|
|
749
|
+
iconEnd ? /* @__PURE__ */ jsx(Icon, { name: iconEnd, size: iconSize }) : null
|
|
750
|
+
]
|
|
751
|
+
}
|
|
752
|
+
);
|
|
753
|
+
}
|
|
754
|
+
function IconButton({
|
|
755
|
+
icon,
|
|
756
|
+
label,
|
|
757
|
+
size = "md",
|
|
758
|
+
tone = "default",
|
|
759
|
+
variant,
|
|
760
|
+
pressed,
|
|
761
|
+
disabled = false,
|
|
762
|
+
className = "",
|
|
763
|
+
type = "button",
|
|
764
|
+
...rest
|
|
765
|
+
}) {
|
|
766
|
+
const look = variant ?? (tone === "danger" ? "danger" : "ghost");
|
|
767
|
+
const classes = ["wp-iconbtn"];
|
|
768
|
+
if (look !== "ghost") classes.push(`wp-iconbtn--${look}`);
|
|
769
|
+
if (size !== "md") classes.push(`wp-iconbtn--${size}`);
|
|
770
|
+
if (className) classes.push(className);
|
|
771
|
+
const iconSize = size === "xs" ? 14 : size === "sm" ? 16 : size === "lg" ? 20 : 18;
|
|
772
|
+
return /* @__PURE__ */ jsx(
|
|
773
|
+
"button",
|
|
774
|
+
{
|
|
775
|
+
type,
|
|
776
|
+
className: classes.join(" "),
|
|
777
|
+
title: label,
|
|
778
|
+
"aria-label": label,
|
|
779
|
+
"aria-pressed": pressed,
|
|
780
|
+
disabled,
|
|
781
|
+
...rest,
|
|
782
|
+
children: /* @__PURE__ */ jsx(Icon, { name: icon, size: iconSize })
|
|
783
|
+
}
|
|
784
|
+
);
|
|
785
|
+
}
|
|
786
|
+
function Input({ size = "md", icon, invalid = false, mono = false, trailing, className = "", style, ...rest }) {
|
|
787
|
+
const classes = ["wp-input"];
|
|
788
|
+
if (size !== "md") classes.push(`wp-input--${size}`);
|
|
789
|
+
if (invalid) classes.push("wp-input--invalid");
|
|
790
|
+
if (mono) classes.push("wp-input--mono");
|
|
791
|
+
if (className) classes.push(className);
|
|
792
|
+
const input = /* @__PURE__ */ jsx("input", { className: classes.join(" "), "aria-invalid": invalid || void 0, style, ...rest });
|
|
793
|
+
if (!icon && !trailing) return input;
|
|
794
|
+
const wrap = ["wp-inputwrap"];
|
|
795
|
+
if (icon) wrap.push("wp-inputwrap--lead");
|
|
796
|
+
if (trailing) wrap.push("wp-inputwrap--trail");
|
|
797
|
+
return /* @__PURE__ */ jsxs("div", { className: wrap.join(" "), children: [
|
|
798
|
+
icon ? /* @__PURE__ */ jsx("span", { className: "wp-inputwrap__lead", children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 15 }) }) : null,
|
|
799
|
+
input,
|
|
800
|
+
trailing ? /* @__PURE__ */ jsx("span", { className: "wp-inputwrap__trail", children: typeof trailing === "string" ? /* @__PURE__ */ jsx(Icon, { name: trailing, size: 15 }) : trailing }) : null
|
|
801
|
+
] });
|
|
802
|
+
}
|
|
803
|
+
function Textarea({ invalid = false, rows = 3, className = "", ...rest }) {
|
|
804
|
+
return /* @__PURE__ */ jsx(
|
|
805
|
+
"textarea",
|
|
806
|
+
{
|
|
807
|
+
className: cx("wp-textarea", invalid && "wp-textarea--invalid", className),
|
|
808
|
+
rows,
|
|
809
|
+
"aria-invalid": invalid || void 0,
|
|
810
|
+
...rest
|
|
811
|
+
}
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
function Select({ options = [], size = "md", invalid = false, placeholder, className = "", ...rest }) {
|
|
815
|
+
const classes = ["wp-select"];
|
|
816
|
+
if (size !== "md") classes.push(`wp-select--${size}`);
|
|
817
|
+
if (invalid) classes.push("wp-select--invalid");
|
|
818
|
+
if (className) classes.push(className);
|
|
819
|
+
return /* @__PURE__ */ jsxs("div", { className: "wp-selectwrap", children: [
|
|
820
|
+
/* @__PURE__ */ jsxs("select", { className: classes.join(" "), "aria-invalid": invalid || void 0, ...rest, children: [
|
|
821
|
+
placeholder ? /* @__PURE__ */ jsx("option", { value: "", children: placeholder }) : null,
|
|
822
|
+
options.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value))
|
|
823
|
+
] }),
|
|
824
|
+
/* @__PURE__ */ jsx("span", { className: "wp-selectwrap__caret", children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: 15 }) })
|
|
825
|
+
] });
|
|
826
|
+
}
|
|
827
|
+
function Checkbox({ label, description, indeterminate = false, disabled = false, className = "", ...rest }) {
|
|
828
|
+
const ref = React.useRef(null);
|
|
829
|
+
React.useEffect(() => {
|
|
830
|
+
if (ref.current) ref.current.indeterminate = indeterminate;
|
|
831
|
+
}, [indeterminate]);
|
|
832
|
+
return /* @__PURE__ */ jsxs("label", { className: cx("wp-check", disabled && "wp-check--disabled", className), children: [
|
|
833
|
+
/* @__PURE__ */ jsx("input", { ref, type: "checkbox", disabled, ...rest }),
|
|
834
|
+
/* @__PURE__ */ jsx("span", { className: "wp-check__box", children: /* @__PURE__ */ jsx(Icon, { name: indeterminate ? "minus" : "check", size: 12, strokeWidth: 2.5 }) }),
|
|
835
|
+
label || description ? /* @__PURE__ */ jsxs("span", { className: "wp-check__text", children: [
|
|
836
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
837
|
+
description ? /* @__PURE__ */ jsx("span", { className: "wp-check__desc", children: description }) : null
|
|
838
|
+
] }) : null
|
|
839
|
+
] });
|
|
840
|
+
}
|
|
841
|
+
function Switch({ label, size = "md", disabled = false, className = "", ...rest }) {
|
|
842
|
+
return /* @__PURE__ */ jsxs("label", { className: cx("wp-switch", size === "sm" && "wp-switch--sm", className), children: [
|
|
843
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", role: "switch", disabled, ...rest }),
|
|
844
|
+
/* @__PURE__ */ jsx("span", { className: "wp-switch__track" }),
|
|
845
|
+
label ? /* @__PURE__ */ jsx("span", { children: label }) : null
|
|
846
|
+
] });
|
|
847
|
+
}
|
|
848
|
+
function Field({ label, hint, error, required = false, htmlFor, layout = "stacked", children, className = "", ...rest }) {
|
|
849
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("wp-field", layout === "horizontal" && "wp-field--horizontal", className), ...rest, children: [
|
|
850
|
+
label ? /* @__PURE__ */ jsxs("label", { className: "wp-field__label", htmlFor, children: [
|
|
851
|
+
label,
|
|
852
|
+
required ? /* @__PURE__ */ jsx("span", { className: "wp-field__req", "aria-hidden": "true", children: "*" }) : null
|
|
853
|
+
] }) : null,
|
|
854
|
+
/* @__PURE__ */ jsxs("div", { className: "wp-field__body", children: [
|
|
855
|
+
children,
|
|
856
|
+
error ? /* @__PURE__ */ jsxs("span", { className: "wp-field__error", children: [
|
|
857
|
+
/* @__PURE__ */ jsx(Icon, { name: "circle-alert", size: 13 }),
|
|
858
|
+
error
|
|
859
|
+
] }) : hint ? /* @__PURE__ */ jsx("span", { className: "wp-field__hint", children: hint }) : null
|
|
860
|
+
] })
|
|
861
|
+
] });
|
|
862
|
+
}
|
|
863
|
+
function Card({
|
|
864
|
+
title,
|
|
865
|
+
subtitle,
|
|
866
|
+
actions,
|
|
867
|
+
footer,
|
|
868
|
+
variant = "default",
|
|
869
|
+
selected = false,
|
|
870
|
+
interactive = false,
|
|
871
|
+
padding = "default",
|
|
872
|
+
children,
|
|
873
|
+
className = "",
|
|
874
|
+
...rest
|
|
875
|
+
}) {
|
|
876
|
+
const classes = ["wp-card"];
|
|
877
|
+
if (variant !== "default") classes.push(`wp-card--${variant}`);
|
|
878
|
+
if (interactive) classes.push("wp-card--interactive");
|
|
879
|
+
if (selected) classes.push("wp-card--selected");
|
|
880
|
+
if (className) classes.push(className);
|
|
881
|
+
const bodyClass = padding === "tight" ? "wp-card__body wp-card__body--tight" : "wp-card__body";
|
|
882
|
+
return /* @__PURE__ */ jsxs("div", { className: classes.join(" "), ...rest, children: [
|
|
883
|
+
title || actions ? /* @__PURE__ */ jsxs("div", { className: "wp-card__head", children: [
|
|
884
|
+
/* @__PURE__ */ jsxs("div", { style: { minWidth: 0 }, children: [
|
|
885
|
+
/* @__PURE__ */ jsx("div", { className: "wp-card__title", children: title }),
|
|
886
|
+
subtitle ? /* @__PURE__ */ jsx("div", { className: "wp-card__sub", children: subtitle }) : null
|
|
887
|
+
] }),
|
|
888
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "wp-row", style: { gap: 6, flex: "none" }, children: actions }) : null
|
|
889
|
+
] }) : null,
|
|
890
|
+
padding === "none" ? children : /* @__PURE__ */ jsx("div", { className: bodyClass, children }),
|
|
891
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "wp-card__foot", children: footer }) : null
|
|
892
|
+
] });
|
|
893
|
+
}
|
|
894
|
+
function Badge({ tone = "neutral", dot = false, size = "md", children, className = "", ...rest }) {
|
|
895
|
+
return /* @__PURE__ */ jsx(
|
|
896
|
+
"span",
|
|
897
|
+
{
|
|
898
|
+
className: cx("wp-badge", `wp-badge--${tone}`, dot && "wp-badge--dot", size === "lg" && "wp-badge--lg", className),
|
|
899
|
+
...rest,
|
|
900
|
+
children
|
|
901
|
+
}
|
|
902
|
+
);
|
|
903
|
+
}
|
|
904
|
+
function Tag({ color, filled = false, onRemove, children, className = "", ...rest }) {
|
|
905
|
+
return /* @__PURE__ */ jsxs("span", { className: cx("wp-tag", filled && "wp-tag--filled", className), ...rest, children: [
|
|
906
|
+
color ? /* @__PURE__ */ jsx("span", { className: "wp-tag__dot", style: { background: color } }) : null,
|
|
907
|
+
children,
|
|
908
|
+
onRemove ? /* @__PURE__ */ jsx("span", { className: "wp-tag__x", role: "button", "aria-label": "\uC81C\uAC70", onClick: onRemove, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 10, strokeWidth: 2 }) }) : null
|
|
909
|
+
] });
|
|
910
|
+
}
|
|
911
|
+
var TONE_ICONS = {
|
|
912
|
+
info: "info",
|
|
913
|
+
success: "circle-check",
|
|
914
|
+
warning: "triangle-alert",
|
|
915
|
+
danger: "circle-alert",
|
|
916
|
+
neutral: "info"
|
|
917
|
+
};
|
|
918
|
+
function Alert({ tone = "info", title, children, actions, onClose, bar = false, className = "", ...rest }) {
|
|
919
|
+
return /* @__PURE__ */ jsxs(
|
|
920
|
+
"div",
|
|
921
|
+
{
|
|
922
|
+
className: cx("wp-alert", `wp-alert--${tone}`, bar && "wp-alert--bar", className),
|
|
923
|
+
role: tone === "danger" ? "alert" : "status",
|
|
924
|
+
...rest,
|
|
925
|
+
children: [
|
|
926
|
+
/* @__PURE__ */ jsx("span", { className: "wp-alert__icon", children: /* @__PURE__ */ jsx(Icon, { name: TONE_ICONS[tone] ?? "info", size: 16 }) }),
|
|
927
|
+
/* @__PURE__ */ jsxs("div", { className: "wp-alert__body", children: [
|
|
928
|
+
title ? /* @__PURE__ */ jsx("span", { className: "wp-alert__title", children: title }) : null,
|
|
929
|
+
children ? /* @__PURE__ */ jsx("span", { className: "wp-alert__text", children }) : null,
|
|
930
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "wp-alert__actions", children: actions }) : null
|
|
931
|
+
] }),
|
|
932
|
+
onClose ? /* @__PURE__ */ jsx("button", { type: "button", className: "wp-iconbtn wp-iconbtn--xs", "aria-label": "\uB2EB\uAE30", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 13 }) }) : null
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
function Toast({ tone = "info", title, children, action, onClose, className = "", ...rest }) {
|
|
938
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("wp-toast", `wp-toast--${tone}`, className), role: "status", ...rest, children: [
|
|
939
|
+
/* @__PURE__ */ jsx("span", { className: "wp-toast__icon", children: /* @__PURE__ */ jsx(Icon, { name: TONE_ICONS[tone] ?? "info", size: 16 }) }),
|
|
940
|
+
/* @__PURE__ */ jsxs("div", { className: "wp-toast__body", children: [
|
|
941
|
+
title ? /* @__PURE__ */ jsx("span", { className: "wp-toast__title", children: title }) : null,
|
|
942
|
+
children ? /* @__PURE__ */ jsx("span", { className: "wp-toast__text", children }) : null
|
|
943
|
+
] }),
|
|
944
|
+
action,
|
|
945
|
+
onClose ? /* @__PURE__ */ jsx("button", { type: "button", className: "wp-toast__x", "aria-label": "\uB2EB\uAE30", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 13 }) }) : null
|
|
946
|
+
] });
|
|
947
|
+
}
|
|
948
|
+
function Tabs({ items = [], value, onChange, size = "md", onChrome = false, className = "", ...rest }) {
|
|
949
|
+
return /* @__PURE__ */ jsx(
|
|
950
|
+
"div",
|
|
951
|
+
{
|
|
952
|
+
className: cx("wp-tabs", size === "lg" && "wp-tabs--lg", onChrome && "wp-tabs--onchrome", className),
|
|
953
|
+
role: "tablist",
|
|
954
|
+
...rest,
|
|
955
|
+
children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
956
|
+
"button",
|
|
957
|
+
{
|
|
958
|
+
type: "button",
|
|
959
|
+
role: "tab",
|
|
960
|
+
className: "wp-tab",
|
|
961
|
+
"aria-selected": value === item.value,
|
|
962
|
+
onClick: onChange ? () => onChange(item.value) : void 0,
|
|
963
|
+
children: [
|
|
964
|
+
item.icon ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: 15 }) : null,
|
|
965
|
+
item.label,
|
|
966
|
+
item.count != null ? /* @__PURE__ */ jsx("span", { className: "wp-tab__count", children: item.count }) : null
|
|
967
|
+
]
|
|
968
|
+
},
|
|
969
|
+
item.value
|
|
970
|
+
))
|
|
971
|
+
}
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
function Table({
|
|
975
|
+
columns = [],
|
|
976
|
+
rows = [],
|
|
977
|
+
dense = false,
|
|
978
|
+
hover = true,
|
|
979
|
+
sticky = false,
|
|
980
|
+
sort,
|
|
981
|
+
onSort,
|
|
982
|
+
selectedIds = [],
|
|
983
|
+
rowKey = "id",
|
|
984
|
+
onRowClick,
|
|
985
|
+
empty,
|
|
986
|
+
className = "",
|
|
987
|
+
...rest
|
|
988
|
+
}) {
|
|
989
|
+
const classes = ["wp-table"];
|
|
990
|
+
if (dense) classes.push("wp-table--dense");
|
|
991
|
+
if (hover) classes.push("wp-table--hover");
|
|
992
|
+
if (sticky) classes.push("wp-table--sticky");
|
|
993
|
+
if (className) classes.push(className);
|
|
994
|
+
if (!rows.length && empty) return /* @__PURE__ */ jsx(Fragment, { children: empty });
|
|
995
|
+
return /* @__PURE__ */ jsxs("table", { className: classes.join(" "), ...rest, children: [
|
|
996
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((column) => /* @__PURE__ */ jsx("th", { style: { width: column.width, textAlign: column.align === "right" ? "right" : void 0 }, children: column.sortable && onSort ? /* @__PURE__ */ jsxs("button", { type: "button", className: "wp-table__sort", onClick: () => onSort(column.key), children: [
|
|
997
|
+
column.header,
|
|
998
|
+
/* @__PURE__ */ jsx(
|
|
999
|
+
Icon,
|
|
1000
|
+
{
|
|
1001
|
+
name: sort && sort.key === column.key ? sort.dir === "asc" ? "chevron-up" : "chevron-down" : "chevrons-up-down",
|
|
1002
|
+
size: 12
|
|
1003
|
+
}
|
|
1004
|
+
)
|
|
1005
|
+
] }) : column.header }, column.key)) }) }),
|
|
1006
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsx(
|
|
1007
|
+
"tr",
|
|
1008
|
+
{
|
|
1009
|
+
"aria-selected": selectedIds.indexOf(row?.[rowKey]) > -1 || void 0,
|
|
1010
|
+
onClick: onRowClick ? () => onRowClick(row) : void 0,
|
|
1011
|
+
style: onRowClick ? { cursor: "pointer" } : void 0,
|
|
1012
|
+
children: columns.map((column) => {
|
|
1013
|
+
const cls = [];
|
|
1014
|
+
if (column.align === "right") cls.push("wp-table__num");
|
|
1015
|
+
if (column.mono) cls.push("wp-table__mono");
|
|
1016
|
+
if (column.strong) cls.push("wp-table__strong");
|
|
1017
|
+
const raw = row?.[column.key];
|
|
1018
|
+
let content;
|
|
1019
|
+
if (column.render) {
|
|
1020
|
+
content = column.render(row, index);
|
|
1021
|
+
} else if (column.badge) {
|
|
1022
|
+
const key = raw == null ? "" : String(raw);
|
|
1023
|
+
const tone = column.badge.toneMap?.[key] ?? "neutral";
|
|
1024
|
+
content = /* @__PURE__ */ jsx(Badge, { tone, children: column.badge.labelMap?.[key] ?? key });
|
|
1025
|
+
} else {
|
|
1026
|
+
content = raw;
|
|
1027
|
+
}
|
|
1028
|
+
return /* @__PURE__ */ jsx("td", { className: cls.join(" ") || void 0, children: content }, column.key);
|
|
1029
|
+
})
|
|
1030
|
+
},
|
|
1031
|
+
row?.[rowKey] != null ? String(row[rowKey]) : index
|
|
1032
|
+
)) })
|
|
1033
|
+
] });
|
|
1034
|
+
}
|
|
1035
|
+
function StatCard({ label, value, unit, delta, trend = "flat", icon, footer, size = "md", className = "", ...rest }) {
|
|
1036
|
+
const arrow = trend === "up" ? "arrow-up-right" : trend === "down" ? "arrow-down" : "minus";
|
|
1037
|
+
return /* @__PURE__ */ jsx("div", { className: cx("wp-card", className), ...rest, children: /* @__PURE__ */ jsx("div", { className: "wp-card__body", children: /* @__PURE__ */ jsxs("div", { className: size === "sm" ? "wp-stat wp-stat--sm" : "wp-stat", children: [
|
|
1038
|
+
/* @__PURE__ */ jsxs("div", { className: "wp-stat__label", children: [
|
|
1039
|
+
icon ? /* @__PURE__ */ jsx(Icon, { name: icon, size: 14 }) : null,
|
|
1040
|
+
label
|
|
1041
|
+
] }),
|
|
1042
|
+
/* @__PURE__ */ jsxs("div", { className: "wp-stat__value", children: [
|
|
1043
|
+
value,
|
|
1044
|
+
unit ? /* @__PURE__ */ jsx("span", { className: "wp-stat__unit", children: unit }) : null
|
|
1045
|
+
] }),
|
|
1046
|
+
delta ? /* @__PURE__ */ jsxs("div", { className: `wp-stat__delta wp-stat__delta--${trend}`, children: [
|
|
1047
|
+
/* @__PURE__ */ jsx(Icon, { name: arrow, size: 13 }),
|
|
1048
|
+
delta
|
|
1049
|
+
] }) : null,
|
|
1050
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "wp-caption", style: { marginTop: 2 }, children: footer }) : null
|
|
1051
|
+
] }) }) });
|
|
1052
|
+
}
|
|
1053
|
+
function EmptyState({ icon = "square-dashed", title, children, actions, tight = false, className = "", ...rest }) {
|
|
1054
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("wp-empty", tight && "wp-empty--tight", className), ...rest, children: [
|
|
1055
|
+
/* @__PURE__ */ jsx("span", { className: "wp-empty__mark", children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 20 }) }),
|
|
1056
|
+
title ? /* @__PURE__ */ jsx("div", { className: "wp-empty__title", children: title }) : null,
|
|
1057
|
+
children ? /* @__PURE__ */ jsx("div", { className: "wp-empty__text", children }) : null,
|
|
1058
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "wp-empty__actions", children: actions }) : null
|
|
1059
|
+
] });
|
|
1060
|
+
}
|
|
1061
|
+
function Spinner({ size = "md", inverse = false, label, className = "", ...rest }) {
|
|
1062
|
+
const el = /* @__PURE__ */ jsx(
|
|
1063
|
+
"span",
|
|
1064
|
+
{
|
|
1065
|
+
className: cx("wp-spinner", size !== "md" && `wp-spinner--${size}`, inverse && "wp-spinner--inverse", className),
|
|
1066
|
+
role: "status",
|
|
1067
|
+
"aria-label": label || "\uB85C\uB529 \uC911",
|
|
1068
|
+
...rest
|
|
1069
|
+
}
|
|
1070
|
+
);
|
|
1071
|
+
if (!label) return el;
|
|
1072
|
+
return /* @__PURE__ */ jsxs("span", { className: "wp-row", style: { gap: 8 }, children: [
|
|
1073
|
+
el,
|
|
1074
|
+
/* @__PURE__ */ jsx("span", { className: "wp-caption", children: label })
|
|
1075
|
+
] });
|
|
1076
|
+
}
|
|
1077
|
+
function ProgressBar({
|
|
1078
|
+
value = 0,
|
|
1079
|
+
max = 100,
|
|
1080
|
+
tone = "brand",
|
|
1081
|
+
size = "md",
|
|
1082
|
+
striped = false,
|
|
1083
|
+
showValue = false,
|
|
1084
|
+
label,
|
|
1085
|
+
className = "",
|
|
1086
|
+
...rest
|
|
1087
|
+
}) {
|
|
1088
|
+
const pct = Math.max(0, Math.min(100, (Number(value) || 0) / (Number(max) || 100) * 100));
|
|
1089
|
+
const track = ["wp-meter"];
|
|
1090
|
+
if (size !== "md") track.push(`wp-meter--${size}`);
|
|
1091
|
+
const fill = ["wp-meter__fill"];
|
|
1092
|
+
if (tone !== "brand") fill.push(`wp-meter__fill--${tone}`);
|
|
1093
|
+
if (striped) fill.push("wp-meter__fill--striped");
|
|
1094
|
+
const bar = /* @__PURE__ */ jsx(
|
|
1095
|
+
"div",
|
|
1096
|
+
{
|
|
1097
|
+
className: track.join(" "),
|
|
1098
|
+
role: "progressbar",
|
|
1099
|
+
"aria-valuenow": value,
|
|
1100
|
+
"aria-valuemin": 0,
|
|
1101
|
+
"aria-valuemax": max,
|
|
1102
|
+
"aria-label": typeof label === "string" ? label : void 0,
|
|
1103
|
+
children: /* @__PURE__ */ jsx("div", { className: fill.join(" "), style: { width: `${pct}%` } })
|
|
1104
|
+
}
|
|
1105
|
+
);
|
|
1106
|
+
if (!showValue && !label) {
|
|
1107
|
+
return /* @__PURE__ */ jsx("div", { className, ...rest, children: bar });
|
|
1108
|
+
}
|
|
1109
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("wp-col", className), style: { gap: 5 }, ...rest, children: [
|
|
1110
|
+
label ? /* @__PURE__ */ jsxs("div", { className: "wp-row wp-row--between", children: [
|
|
1111
|
+
/* @__PURE__ */ jsx("span", { className: "wp-caption", children: label }),
|
|
1112
|
+
showValue ? /* @__PURE__ */ jsxs("span", { className: "wp-caption wp-num", children: [
|
|
1113
|
+
Math.round(pct),
|
|
1114
|
+
"%"
|
|
1115
|
+
] }) : null
|
|
1116
|
+
] }) : null,
|
|
1117
|
+
label ? bar : /* @__PURE__ */ jsxs("div", { className: "wp-meter-row", children: [
|
|
1118
|
+
bar,
|
|
1119
|
+
/* @__PURE__ */ jsxs("span", { className: "wp-meter-row__val", children: [
|
|
1120
|
+
Math.round(pct),
|
|
1121
|
+
"%"
|
|
1122
|
+
] })
|
|
1123
|
+
] })
|
|
1124
|
+
] });
|
|
1125
|
+
}
|
|
1126
|
+
function pageItems(page, total) {
|
|
1127
|
+
const out = [];
|
|
1128
|
+
if (total <= 7) {
|
|
1129
|
+
for (let i = 1; i <= total; i++) out.push(i);
|
|
1130
|
+
return out;
|
|
1131
|
+
}
|
|
1132
|
+
out.push(1);
|
|
1133
|
+
if (page > 3) out.push("\u2026");
|
|
1134
|
+
for (let i = Math.max(2, page - 1); i <= Math.min(total - 1, page + 1); i++) out.push(i);
|
|
1135
|
+
if (page < total - 2) out.push("\u2026");
|
|
1136
|
+
out.push(total);
|
|
1137
|
+
return out;
|
|
1138
|
+
}
|
|
1139
|
+
function Pagination({ page = 1, pageCount = 1, total, pageSize, onChange, className = "", ...rest }) {
|
|
1140
|
+
const from = total != null && pageSize ? (page - 1) * pageSize + 1 : null;
|
|
1141
|
+
const to = total != null && pageSize ? Math.min(total, page * pageSize) : null;
|
|
1142
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("wp-pager", className), ...rest, children: [
|
|
1143
|
+
from != null ? /* @__PURE__ */ jsxs("span", { className: "wp-num", children: [
|
|
1144
|
+
from,
|
|
1145
|
+
"\u2013",
|
|
1146
|
+
to,
|
|
1147
|
+
" / ",
|
|
1148
|
+
total
|
|
1149
|
+
] }) : null,
|
|
1150
|
+
/* @__PURE__ */ jsx("span", { className: "wp-spacer" }),
|
|
1151
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "wp-pager__page", "aria-label": "\uC774\uC804", disabled: page <= 1, onClick: () => onChange?.(page - 1), children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: 14 }) }),
|
|
1152
|
+
/* @__PURE__ */ jsx("div", { className: "wp-pager__pages", children: pageItems(page, pageCount).map(
|
|
1153
|
+
(p, i) => p === "\u2026" ? /* @__PURE__ */ jsx("span", { className: "wp-pager__gap", children: "\u2026" }, `g${i}`) : /* @__PURE__ */ jsx("button", { type: "button", className: "wp-pager__page", "aria-current": p === page || void 0, onClick: () => onChange?.(p), children: p }, p)
|
|
1154
|
+
) }),
|
|
1155
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "wp-pager__page", "aria-label": "\uB2E4\uC74C", disabled: page >= pageCount, onClick: () => onChange?.(page + 1), children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 14 }) })
|
|
1156
|
+
] });
|
|
1157
|
+
}
|
|
1158
|
+
function Dialog({ title, subtitle, icon, tone = "brand", size = "md", footer, onClose, children, className = "", ...rest }) {
|
|
1159
|
+
const classes = ["wp-dialog"];
|
|
1160
|
+
if (size !== "md") classes.push(`wp-dialog--${size}`);
|
|
1161
|
+
if (className) classes.push(className);
|
|
1162
|
+
return /* @__PURE__ */ jsx("div", { className: "wp-overlay", ...rest, children: /* @__PURE__ */ jsxs("div", { className: classes.join(" "), role: "dialog", "aria-modal": "true", "aria-label": typeof title === "string" ? title : void 0, children: [
|
|
1163
|
+
/* @__PURE__ */ jsxs("div", { className: "wp-dialog__head", children: [
|
|
1164
|
+
icon ? /* @__PURE__ */ jsx("span", { className: tone === "danger" ? "wp-dialog__mark wp-dialog__mark--danger" : "wp-dialog__mark", children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 16 }) }) : null,
|
|
1165
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1166
|
+
/* @__PURE__ */ jsx("div", { className: "wp-dialog__title", children: title }),
|
|
1167
|
+
subtitle ? /* @__PURE__ */ jsx("div", { className: "wp-dialog__sub", children: subtitle }) : null
|
|
1168
|
+
] }),
|
|
1169
|
+
onClose ? /* @__PURE__ */ jsx("button", { type: "button", className: "wp-iconbtn wp-iconbtn--sm", "aria-label": "\uB2EB\uAE30", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 16 }) }) : null
|
|
1170
|
+
] }),
|
|
1171
|
+
/* @__PURE__ */ jsx("div", { className: "wp-dialog__body", children }),
|
|
1172
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "wp-dialog__foot", children: footer }) : null
|
|
1173
|
+
] }) });
|
|
1174
|
+
}
|
|
1175
|
+
function SegmentedControl({ items = [], value, onChange, size = "md", className = "", ...rest }) {
|
|
1176
|
+
const classes = ["wp-seg"];
|
|
1177
|
+
if (size === "lg") classes.push("wp-seg--lg");
|
|
1178
|
+
if (className) classes.push(className);
|
|
1179
|
+
return /* @__PURE__ */ jsx("div", { className: classes.join(" "), role: "tablist", ...rest, children: items.map((it) => /* @__PURE__ */ jsxs(
|
|
1180
|
+
"button",
|
|
1181
|
+
{
|
|
1182
|
+
type: "button",
|
|
1183
|
+
role: "tab",
|
|
1184
|
+
className: "wp-seg__item",
|
|
1185
|
+
"aria-selected": value === it.value,
|
|
1186
|
+
onClick: onChange ? () => onChange(it.value) : void 0,
|
|
1187
|
+
children: [
|
|
1188
|
+
it.icon ? /* @__PURE__ */ jsx(Icon, { name: it.icon, size: 14 }) : null,
|
|
1189
|
+
it.label
|
|
1190
|
+
]
|
|
1191
|
+
},
|
|
1192
|
+
it.value
|
|
1193
|
+
)) });
|
|
1194
|
+
}
|
|
1195
|
+
function Avatar({ name = "", src, shape = "hex", size = "md", tone = "brand", className = "", ...rest }) {
|
|
1196
|
+
const classes = ["wp-avatar", "wp-avatar--" + shape];
|
|
1197
|
+
if (size !== "md") classes.push("wp-avatar--" + size);
|
|
1198
|
+
if (tone !== "brand") classes.push("wp-avatar--" + tone);
|
|
1199
|
+
if (className) classes.push(className);
|
|
1200
|
+
const initials = name.trim().slice(0, 2).toUpperCase();
|
|
1201
|
+
return /* @__PURE__ */ jsx("span", { className: classes.join(" "), title: name || void 0, ...rest, children: src ? /* @__PURE__ */ jsx("img", { src, alt: name }) : initials });
|
|
1202
|
+
}
|
|
1203
|
+
function Breadcrumb({ items = [], className = "", ...rest }) {
|
|
1204
|
+
return /* @__PURE__ */ jsx("nav", { className: ("wp-crumbs " + className).trim(), "aria-label": "\uC704\uCE58", ...rest, children: items.map((it, i) => {
|
|
1205
|
+
const last = i === items.length - 1;
|
|
1206
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
1207
|
+
last ? /* @__PURE__ */ jsx("span", { className: "wp-crumbs__current", "aria-current": "page", children: it.label }) : /* @__PURE__ */ jsxs("a", { className: "wp-crumbs__item", href: it.href || "#", onClick: (e) => {
|
|
1208
|
+
if (!it.href) e.preventDefault();
|
|
1209
|
+
if (it.onClick) it.onClick();
|
|
1210
|
+
}, children: [
|
|
1211
|
+
it.icon ? /* @__PURE__ */ jsx(Icon, { name: it.icon, size: 13 }) : null,
|
|
1212
|
+
it.label
|
|
1213
|
+
] }),
|
|
1214
|
+
last ? null : /* @__PURE__ */ jsx("span", { className: "wp-crumbs__sep", children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 12 }) })
|
|
1215
|
+
] }, `${it.label}${i}`);
|
|
1216
|
+
}) });
|
|
1217
|
+
}
|
|
1218
|
+
function Radio({ label, description, disabled = false, className = "", ...rest }) {
|
|
1219
|
+
const classes = ["wp-check"];
|
|
1220
|
+
if (disabled) classes.push("wp-check--disabled");
|
|
1221
|
+
if (className) classes.push(className);
|
|
1222
|
+
return /* @__PURE__ */ jsxs("label", { className: classes.join(" "), children: [
|
|
1223
|
+
/* @__PURE__ */ jsx("input", { type: "radio", disabled, ...rest }),
|
|
1224
|
+
/* @__PURE__ */ jsx("span", { className: "wp-check__box wp-check__box--radio" }),
|
|
1225
|
+
label || description ? /* @__PURE__ */ jsxs("span", { className: "wp-check__text", children: [
|
|
1226
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
1227
|
+
description ? /* @__PURE__ */ jsx("span", { className: "wp-check__desc", children: description }) : null
|
|
1228
|
+
] }) : null
|
|
1229
|
+
] });
|
|
1230
|
+
}
|
|
1231
|
+
function SidebarNav({ sections = [], value, onSelect, collapsed = false, light = false, className = "", ...rest }) {
|
|
1232
|
+
const classes = ["wp-nav"];
|
|
1233
|
+
if (collapsed) classes.push("wp-nav--collapsed");
|
|
1234
|
+
if (light) classes.push("wp-nav--light");
|
|
1235
|
+
if (className) classes.push(className);
|
|
1236
|
+
return /* @__PURE__ */ jsx("nav", { className: classes.join(" "), ...rest, children: sections.map((s, si) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
1237
|
+
s.label ? /* @__PURE__ */ jsx("div", { className: "wp-nav__section", children: s.label }) : null,
|
|
1238
|
+
(s.items || []).map((it) => /* @__PURE__ */ jsxs(
|
|
1239
|
+
"a",
|
|
1240
|
+
{
|
|
1241
|
+
href: it.href || "#",
|
|
1242
|
+
className: "wp-nav__item",
|
|
1243
|
+
"aria-current": value === it.value ? "page" : void 0,
|
|
1244
|
+
title: collapsed ? it.label : void 0,
|
|
1245
|
+
onClick: (e) => {
|
|
1246
|
+
if (!it.href) e.preventDefault();
|
|
1247
|
+
if (onSelect) onSelect(it.value);
|
|
1248
|
+
},
|
|
1249
|
+
children: [
|
|
1250
|
+
it.icon ? /* @__PURE__ */ jsx("span", { className: "wp-nav__icon", children: /* @__PURE__ */ jsx(Icon, { name: it.icon, size: 17 }) }) : null,
|
|
1251
|
+
/* @__PURE__ */ jsx("span", { className: "wp-nav__label", children: it.label }),
|
|
1252
|
+
it.meta != null ? /* @__PURE__ */ jsx("span", { className: "wp-nav__meta", children: it.meta }) : null
|
|
1253
|
+
]
|
|
1254
|
+
},
|
|
1255
|
+
it.value
|
|
1256
|
+
))
|
|
1257
|
+
] }, s.label ? String(s.label) : si)) });
|
|
1258
|
+
}
|
|
1259
|
+
function Tooltip({ label, shortcut, placement = "top", wrap = false, children, className = "", ...rest }) {
|
|
1260
|
+
const [open, setOpen] = React.useState(false);
|
|
1261
|
+
const pos = {
|
|
1262
|
+
top: { bottom: "100%", left: "50%", transform: "translate(-50%,-7px)" },
|
|
1263
|
+
bottom: { top: "100%", left: "50%", transform: "translate(-50%,7px)" },
|
|
1264
|
+
left: { right: "100%", top: "50%", transform: "translate(-7px,-50%)" },
|
|
1265
|
+
right: { left: "100%", top: "50%", transform: "translate(7px,-50%)" }
|
|
1266
|
+
}[placement];
|
|
1267
|
+
const classes = ["wp-tooltip", "wp-tooltip--" + placement];
|
|
1268
|
+
if (wrap) classes.push("wp-tooltip--wrap");
|
|
1269
|
+
if (className) classes.push(className);
|
|
1270
|
+
return /* @__PURE__ */ jsxs(
|
|
1271
|
+
"span",
|
|
1272
|
+
{
|
|
1273
|
+
className: "wp-tooltip-host",
|
|
1274
|
+
onMouseEnter: () => setOpen(true),
|
|
1275
|
+
onMouseLeave: () => setOpen(false),
|
|
1276
|
+
onFocus: () => setOpen(true),
|
|
1277
|
+
onBlur: () => setOpen(false),
|
|
1278
|
+
...rest,
|
|
1279
|
+
children: [
|
|
1280
|
+
children,
|
|
1281
|
+
open ? /* @__PURE__ */ jsxs("span", { className: classes.join(" "), style: pos, role: "tooltip", children: [
|
|
1282
|
+
label,
|
|
1283
|
+
shortcut ? /* @__PURE__ */ jsx("kbd", { className: "wp-tooltip__key", children: shortcut }) : null
|
|
1284
|
+
] }) : null
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
export { Alert, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Dialog, EmptyState, Field, Icon, IconButton, Input, Pagination, ProgressBar, Radio, SegmentedControl, Select, SidebarNav, Spinner, StatCard, Switch, Table, Tabs, Tag, Textarea, Toast, Tooltip };
|