@xenosystem/blocks 0.21.0 → 0.23.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.
@@ -0,0 +1,238 @@
1
+ // src/icons/glyphs.tsx
2
+ import Copy from "@xenosystem/elements/elements/copy";
3
+ import Download from "@xenosystem/elements/elements/download";
4
+ import Plus from "@xenosystem/elements/elements/plus";
5
+ import Minus from "@xenosystem/elements/elements/minus";
6
+ import Refresh from "@xenosystem/elements/elements/refresh";
7
+ import X from "@xenosystem/elements/elements/x";
8
+
9
+ // src/icons/elements.tsx
10
+ import { XenoElement } from "@xenosystem/elements-react";
11
+ import { jsx } from "react/jsx-runtime";
12
+ var GLYPH_STROKE_WIDTH = 1.5;
13
+ function fromElement(decl, defaultSize = 11, state) {
14
+ const Glyph = ({ size = defaultSize, className }) => /* @__PURE__ */ jsx(XenoElement, { decl, state, size, strokeWidth: GLYPH_STROKE_WIDTH, className, "aria-hidden": "true", role: void 0, "aria-label": void 0 });
15
+ Glyph.displayName = `Element(${decl.id})`;
16
+ return Glyph;
17
+ }
18
+
19
+ // src/icons/glyphs.tsx
20
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
21
+ function Svg({ children, size = 11 }) {
22
+ return /* @__PURE__ */ jsx2("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children });
23
+ }
24
+ var RefreshGlyph = fromElement(Refresh);
25
+ var XGlyph = fromElement(X);
26
+ var PlusGlyph = fromElement(Plus);
27
+ var MinusGlyph = fromElement(Minus);
28
+ function ChevronGlyph({ direction = "right", size } = {}) {
29
+ const d = direction === "left" ? "m15 18-6-6 6-6" : direction === "up" ? "m18 15-6-6-6 6" : direction === "down" ? "m6 9 6 6 6-6" : "m9 18 6-6-6-6";
30
+ return /* @__PURE__ */ jsx2(Svg, { size, children: /* @__PURE__ */ jsx2("path", { d }) });
31
+ }
32
+ var DownloadGlyph = fromElement(Download);
33
+ function PlugGlyph({ size } = {}) {
34
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
35
+ /* @__PURE__ */ jsx2("path", { d: "M12 22v-5" }),
36
+ /* @__PURE__ */ jsx2("path", { d: "M9 8V2M15 8V2" }),
37
+ /* @__PURE__ */ jsx2("path", { d: "M18 8v3a6 6 0 0 1-12 0V8Z" })
38
+ ] });
39
+ }
40
+ function SortAscGlyph({ size = 9 } = {}) {
41
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
42
+ /* @__PURE__ */ jsx2("path", { d: "m5 12 7-7 7 7" }),
43
+ /* @__PURE__ */ jsx2("path", { d: "M12 19V5" })
44
+ ] });
45
+ }
46
+ function SortDescGlyph({ size = 9 } = {}) {
47
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
48
+ /* @__PURE__ */ jsx2("path", { d: "M12 5v14" }),
49
+ /* @__PURE__ */ jsx2("path", { d: "m19 12-7 7-7-7" })
50
+ ] });
51
+ }
52
+ function ExpandGlyph({ size } = {}) {
53
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
54
+ /* @__PURE__ */ jsx2("path", { d: "M12 22v-6" }),
55
+ /* @__PURE__ */ jsx2("path", { d: "M12 8V2" }),
56
+ /* @__PURE__ */ jsx2("path", { d: "m9 5 3-3 3 3" }),
57
+ /* @__PURE__ */ jsx2("path", { d: "m9 19 3 3 3-3" }),
58
+ /* @__PURE__ */ jsx2("path", { d: "M4 12H2" }),
59
+ /* @__PURE__ */ jsx2("path", { d: "M10 12H8" }),
60
+ /* @__PURE__ */ jsx2("path", { d: "M16 12h-2" }),
61
+ /* @__PURE__ */ jsx2("path", { d: "M22 12h-2" })
62
+ ] });
63
+ }
64
+ function CollapseGlyph({ size } = {}) {
65
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
66
+ /* @__PURE__ */ jsx2("path", { d: "M12 22v-6" }),
67
+ /* @__PURE__ */ jsx2("path", { d: "M12 8V2" }),
68
+ /* @__PURE__ */ jsx2("path", { d: "m9 13 3 3 3-3" }),
69
+ /* @__PURE__ */ jsx2("path", { d: "m9 11 3-3 3 3" }),
70
+ /* @__PURE__ */ jsx2("path", { d: "M4 12H2" }),
71
+ /* @__PURE__ */ jsx2("path", { d: "M22 12h-2" })
72
+ ] });
73
+ }
74
+ var CopyGlyph = fromElement(Copy);
75
+ function ClearGlyph({ size } = {}) {
76
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
77
+ /* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "18", height: "18", rx: "3" }),
78
+ /* @__PURE__ */ jsx2("path", { d: "m6 6 12 12" })
79
+ ] });
80
+ }
81
+ function CancelGlyph({ size } = {}) {
82
+ return /* @__PURE__ */ jsx2(Svg, { size, children: /* @__PURE__ */ jsx2("rect", { x: "5", y: "5", width: "14", height: "14", rx: "2" }) });
83
+ }
84
+ function RetryGlyph({ size } = {}) {
85
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
86
+ /* @__PURE__ */ jsx2("path", { d: "M21 12a9 9 0 1 1-3.36-7" }),
87
+ /* @__PURE__ */ jsx2("path", { d: "M21 3v6h-6" })
88
+ ] });
89
+ }
90
+ function CaseGlyph({ size = 12 } = {}) {
91
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
92
+ /* @__PURE__ */ jsx2("path", { d: "m3 15 4-8 4 8" }),
93
+ /* @__PURE__ */ jsx2("path", { d: "M4 13h6" }),
94
+ /* @__PURE__ */ jsx2("rect", { x: "15", y: "9", width: "6", height: "6", rx: "1.5" }),
95
+ /* @__PURE__ */ jsx2("path", { d: "M21 9v6" })
96
+ ] });
97
+ }
98
+ function WholeWordGlyph({ size = 12 } = {}) {
99
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
100
+ /* @__PURE__ */ jsx2("path", { d: "M7 12h10" }),
101
+ /* @__PURE__ */ jsx2("path", { d: "M3 7v10" }),
102
+ /* @__PURE__ */ jsx2("path", { d: "M21 7v10" })
103
+ ] });
104
+ }
105
+ function RegexGlyph({ size = 12 } = {}) {
106
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
107
+ /* @__PURE__ */ jsx2("path", { d: "M12 4v8" }),
108
+ /* @__PURE__ */ jsx2("path", { d: "m8.5 6 7 4" }),
109
+ /* @__PURE__ */ jsx2("path", { d: "m8.5 10 7-4" }),
110
+ /* @__PURE__ */ jsx2("path", { d: "M5 18h2" })
111
+ ] });
112
+ }
113
+ function AlignLeftGlyph({ size } = {}) {
114
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
115
+ /* @__PURE__ */ jsx2("rect", { x: "6", y: "14", width: "9", height: "6", rx: "2" }),
116
+ /* @__PURE__ */ jsx2("rect", { x: "6", y: "4", width: "16", height: "6", rx: "2" }),
117
+ /* @__PURE__ */ jsx2("path", { d: "M2 2v20" })
118
+ ] });
119
+ }
120
+ function AlignHCenterGlyph({ size } = {}) {
121
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
122
+ /* @__PURE__ */ jsx2("path", { d: "M12 2v20" }),
123
+ /* @__PURE__ */ jsx2("path", { d: "M8 10H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4" }),
124
+ /* @__PURE__ */ jsx2("path", { d: "M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4" }),
125
+ /* @__PURE__ */ jsx2("path", { d: "M8 20H7a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h1" }),
126
+ /* @__PURE__ */ jsx2("path", { d: "M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1" })
127
+ ] });
128
+ }
129
+ function AlignRightGlyph({ size } = {}) {
130
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
131
+ /* @__PURE__ */ jsx2("rect", { x: "2", y: "4", width: "16", height: "6", rx: "2" }),
132
+ /* @__PURE__ */ jsx2("rect", { x: "9", y: "14", width: "9", height: "6", rx: "2" }),
133
+ /* @__PURE__ */ jsx2("path", { d: "M22 22V2" })
134
+ ] });
135
+ }
136
+ function AlignTopGlyph({ size } = {}) {
137
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
138
+ /* @__PURE__ */ jsx2("rect", { x: "4", y: "6", width: "6", height: "16", rx: "2" }),
139
+ /* @__PURE__ */ jsx2("rect", { x: "14", y: "6", width: "6", height: "9", rx: "2" }),
140
+ /* @__PURE__ */ jsx2("path", { d: "M22 2H2" })
141
+ ] });
142
+ }
143
+ function AlignVCenterGlyph({ size } = {}) {
144
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
145
+ /* @__PURE__ */ jsx2("path", { d: "M2 12h20" }),
146
+ /* @__PURE__ */ jsx2("path", { d: "M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4" }),
147
+ /* @__PURE__ */ jsx2("path", { d: "M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4" }),
148
+ /* @__PURE__ */ jsx2("path", { d: "M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1" }),
149
+ /* @__PURE__ */ jsx2("path", { d: "M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1" })
150
+ ] });
151
+ }
152
+ function AlignBottomGlyph({ size } = {}) {
153
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
154
+ /* @__PURE__ */ jsx2("rect", { x: "4", y: "2", width: "6", height: "16", rx: "2" }),
155
+ /* @__PURE__ */ jsx2("rect", { x: "14", y: "9", width: "6", height: "9", rx: "2" }),
156
+ /* @__PURE__ */ jsx2("path", { d: "M22 22H2" })
157
+ ] });
158
+ }
159
+ function DistributeHGlyph({ size } = {}) {
160
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
161
+ /* @__PURE__ */ jsx2("rect", { x: "9", y: "9", width: "6", height: "6", rx: "2" }),
162
+ /* @__PURE__ */ jsx2("path", { d: "M4 22V2" }),
163
+ /* @__PURE__ */ jsx2("path", { d: "M20 22V2" })
164
+ ] });
165
+ }
166
+ function DistributeVGlyph({ size } = {}) {
167
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
168
+ /* @__PURE__ */ jsx2("rect", { x: "9", y: "9", width: "6", height: "6", rx: "2" }),
169
+ /* @__PURE__ */ jsx2("path", { d: "M22 20H2" }),
170
+ /* @__PURE__ */ jsx2("path", { d: "M22 4H2" })
171
+ ] });
172
+ }
173
+ function BringToFrontGlyph({ size } = {}) {
174
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
175
+ /* @__PURE__ */ jsx2("rect", { x: "8", y: "8", width: "8", height: "8", rx: "2" }),
176
+ /* @__PURE__ */ jsx2("path", { d: "M4 10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2" }),
177
+ /* @__PURE__ */ jsx2("path", { d: "M14 20a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2" })
178
+ ] });
179
+ }
180
+ function SendToBackGlyph({ size } = {}) {
181
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
182
+ /* @__PURE__ */ jsx2("rect", { x: "14", y: "14", width: "8", height: "8", rx: "2" }),
183
+ /* @__PURE__ */ jsx2("rect", { x: "2", y: "2", width: "8", height: "8", rx: "2" }),
184
+ /* @__PURE__ */ jsx2("path", { d: "M7 14v1a2 2 0 0 0 2 2h1" }),
185
+ /* @__PURE__ */ jsx2("path", { d: "M14 7h1a2 2 0 0 1 2 2v1" })
186
+ ] });
187
+ }
188
+ function GroupGlyph({ size } = {}) {
189
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
190
+ /* @__PURE__ */ jsx2("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
191
+ /* @__PURE__ */ jsx2("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
192
+ /* @__PURE__ */ jsx2("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
193
+ /* @__PURE__ */ jsx2("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }),
194
+ /* @__PURE__ */ jsx2("rect", { x: "7", y: "7", width: "5", height: "5", rx: "1" }),
195
+ /* @__PURE__ */ jsx2("rect", { x: "12", y: "12", width: "5", height: "5", rx: "1" })
196
+ ] });
197
+ }
198
+ function UngroupGlyph({ size } = {}) {
199
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
200
+ /* @__PURE__ */ jsx2("rect", { x: "2", y: "4", width: "8", height: "6", rx: "1" }),
201
+ /* @__PURE__ */ jsx2("rect", { x: "14", y: "14", width: "8", height: "6", rx: "1" })
202
+ ] });
203
+ }
204
+
205
+ export {
206
+ fromElement,
207
+ Svg,
208
+ RefreshGlyph,
209
+ XGlyph,
210
+ PlusGlyph,
211
+ MinusGlyph,
212
+ ChevronGlyph,
213
+ DownloadGlyph,
214
+ PlugGlyph,
215
+ SortAscGlyph,
216
+ SortDescGlyph,
217
+ ExpandGlyph,
218
+ CollapseGlyph,
219
+ CopyGlyph,
220
+ ClearGlyph,
221
+ CancelGlyph,
222
+ RetryGlyph,
223
+ CaseGlyph,
224
+ WholeWordGlyph,
225
+ RegexGlyph,
226
+ AlignLeftGlyph,
227
+ AlignHCenterGlyph,
228
+ AlignRightGlyph,
229
+ AlignTopGlyph,
230
+ AlignVCenterGlyph,
231
+ AlignBottomGlyph,
232
+ DistributeHGlyph,
233
+ DistributeVGlyph,
234
+ BringToFrontGlyph,
235
+ SendToBackGlyph,
236
+ GroupGlyph,
237
+ UngroupGlyph
238
+ };