@behivetech/atoms.icon 0.0.0-stage → 0.3.3

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/README.md CHANGED
@@ -1,3 +1,28 @@
1
- # Temporary Holding Version
1
+ # Icon
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A hand-authored, stroke-based SVG icon set behind a single `Icon` component — the same idea as `@ant-design/icons`/`@mui/icons-material`, but self-contained (no new dependency). Icons use `stroke="currentColor"`, so they inherit color from whatever text color is in scope.
4
+
5
+ ## Usage
6
+
7
+ ```jsx
8
+ import { Icon } from '@behivetech/atoms.icon';
9
+
10
+ <Icon name="trash" />
11
+ <Icon name="close" size="sm" />
12
+ ```
13
+
14
+ ## Available icons
15
+
16
+ `close`, `chevron-up`, `chevron-down`, `pencil`, `trash`, `box`, `upload`, `bold`, `italic`, `list`, `link`, `image`, `file-text`, `ellipse`, `rectangle`, `polygon`, `cursor`, `label`, `camp-border`, `structure`, `road`, `restroom`
17
+
18
+ Note that `box` is the 3D carton glyph; `rectangle` is the flat shape primitive that pairs with `ellipse`.
19
+
20
+ Add new icons by adding a module under `icons/` that calls `createIcon` with geometry in a `0 0 24 24` viewBox, stroke-based to match the existing set, then registering it in `icons/index.ts` and `icons/registry.ts`.
21
+
22
+ ## Props
23
+
24
+ | Prop | Type | Default | Description |
25
+ | ----------- | ---------------------- | ------- | ------------------------------- |
26
+ | `name` | `IconName` | — | Which icon to render (required) |
27
+ | `size` | `sm \| md \| lg \| xl` | `md` | Icon width/height |
28
+ | `className` | `string` | — | Additional class names |
package/dist/index.cjs ADDED
@@ -0,0 +1,499 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // ../../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js
34
+ var require_classnames = __commonJS({
35
+ "../../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js"(exports2, module2) {
36
+ "use strict";
37
+ (function() {
38
+ "use strict";
39
+ var hasOwn = {}.hasOwnProperty;
40
+ function classNames() {
41
+ var classes = "";
42
+ for (var i = 0; i < arguments.length; i++) {
43
+ var arg = arguments[i];
44
+ if (arg) {
45
+ classes = appendClass(classes, parseValue(arg));
46
+ }
47
+ }
48
+ return classes;
49
+ }
50
+ function parseValue(arg) {
51
+ if (typeof arg === "string" || typeof arg === "number") {
52
+ return arg;
53
+ }
54
+ if (typeof arg !== "object") {
55
+ return "";
56
+ }
57
+ if (Array.isArray(arg)) {
58
+ return classNames.apply(null, arg);
59
+ }
60
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
61
+ return arg.toString();
62
+ }
63
+ var classes = "";
64
+ for (var key in arg) {
65
+ if (hasOwn.call(arg, key) && arg[key]) {
66
+ classes = appendClass(classes, key);
67
+ }
68
+ }
69
+ return classes;
70
+ }
71
+ function appendClass(value, newClass) {
72
+ if (!newClass) {
73
+ return value;
74
+ }
75
+ if (value) {
76
+ return value + " " + newClass;
77
+ }
78
+ return value + newClass;
79
+ }
80
+ if (typeof module2 !== "undefined" && module2.exports) {
81
+ classNames.default = classNames;
82
+ module2.exports = classNames;
83
+ } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
84
+ define("classnames", [], function() {
85
+ return classNames;
86
+ });
87
+ } else {
88
+ window.classNames = classNames;
89
+ }
90
+ })();
91
+ }
92
+ });
93
+
94
+ // index.ts
95
+ var index_exports = {};
96
+ __export(index_exports, {
97
+ BoldIcon: () => BoldIcon,
98
+ BoxIcon: () => BoxIcon,
99
+ CampBorderIcon: () => CampBorderIcon,
100
+ ChevronDownIcon: () => ChevronDownIcon,
101
+ ChevronUpIcon: () => ChevronUpIcon,
102
+ CloseIcon: () => CloseIcon,
103
+ CursorIcon: () => CursorIcon,
104
+ EllipseIcon: () => EllipseIcon,
105
+ FileTextIcon: () => FileTextIcon,
106
+ Icon: () => Icon,
107
+ ImageIcon: () => ImageIcon,
108
+ ItalicIcon: () => ItalicIcon,
109
+ LabelIcon: () => LabelIcon,
110
+ LinkIcon: () => LinkIcon,
111
+ ListIcon: () => ListIcon,
112
+ PencilIcon: () => PencilIcon,
113
+ PolygonIcon: () => PolygonIcon,
114
+ RectangleIcon: () => RectangleIcon,
115
+ RestroomIcon: () => RestroomIcon,
116
+ RoadIcon: () => RoadIcon,
117
+ StructureIcon: () => StructureIcon,
118
+ TrashIcon: () => TrashIcon,
119
+ UploadIcon: () => UploadIcon,
120
+ createIcon: () => createIcon
121
+ });
122
+ module.exports = __toCommonJS(index_exports);
123
+
124
+ // ../../../../packages/registry/class-names/dist/index.js
125
+ var import_classnames = __toESM(require_classnames(), 1);
126
+ var getClassName = ({
127
+ className,
128
+ modifiers = {},
129
+ rootClass,
130
+ styles = {}
131
+ }) => {
132
+ function getModifiers() {
133
+ const updatedModifiers = {};
134
+ const modifierKeys = Object.keys(modifiers);
135
+ if (modifierKeys.length) {
136
+ modifierKeys.forEach((modKey) => {
137
+ const classKey = `${rootClass}--${modKey}`;
138
+ const newClassName = styles[classKey] || classKey;
139
+ updatedModifiers[newClassName] = modifiers[modKey] ?? false;
140
+ });
141
+ }
142
+ return updatedModifiers;
143
+ }
144
+ function getChildClass(childClassName) {
145
+ const classKey = `${rootClass}__${childClassName}`;
146
+ return styles[classKey] || classKey;
147
+ }
148
+ function getRootStyles() {
149
+ return (0, import_classnames.default)(
150
+ className,
151
+ {
152
+ ...getModifiers()
153
+ },
154
+ styles[rootClass] || rootClass
155
+ );
156
+ }
157
+ return [getRootStyles(), getChildClass];
158
+ };
159
+
160
+ // icon.module.scss
161
+ var icon_module_default = {
162
+ "BHT__Icon": "BHT__Icon",
163
+ "BHT__Icon--sm": "BHT__Icon--sm",
164
+ "BHT__Icon--md": "BHT__Icon--md",
165
+ "BHT__Icon--lg": "BHT__Icon--lg",
166
+ "BHT__Icon--xl": "BHT__Icon--xl"
167
+ };
168
+
169
+ // create-icon.tsx
170
+ var import_jsx_runtime = require("react/jsx-runtime");
171
+ function createIcon(displayName, children) {
172
+ const Component = ({ size = "md", className, ...rest }) => {
173
+ const [rootClass] = getClassName({
174
+ className,
175
+ rootClass: "BHT__Icon",
176
+ modifiers: { [size]: true },
177
+ styles: icon_module_default
178
+ });
179
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
180
+ "svg",
181
+ {
182
+ ...rest,
183
+ className: rootClass,
184
+ viewBox: "0 0 24 24",
185
+ fill: "none",
186
+ stroke: "currentColor",
187
+ strokeWidth: 2,
188
+ strokeLinecap: "round",
189
+ strokeLinejoin: "round",
190
+ "aria-hidden": "true",
191
+ children
192
+ }
193
+ );
194
+ };
195
+ Component.displayName = displayName;
196
+ return Component;
197
+ }
198
+
199
+ // icons/close.tsx
200
+ var import_jsx_runtime2 = require("react/jsx-runtime");
201
+ var CloseIcon = /* @__PURE__ */ createIcon(
202
+ "CloseIcon",
203
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M18 6 6 18M6 6l12 12" })
204
+ );
205
+
206
+ // icons/chevron-up.tsx
207
+ var import_jsx_runtime3 = require("react/jsx-runtime");
208
+ var ChevronUpIcon = /* @__PURE__ */ createIcon(
209
+ "ChevronUpIcon",
210
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M18 15l-6-6-6 6" })
211
+ );
212
+
213
+ // icons/chevron-down.tsx
214
+ var import_jsx_runtime4 = require("react/jsx-runtime");
215
+ var ChevronDownIcon = /* @__PURE__ */ createIcon(
216
+ "ChevronDownIcon",
217
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M6 9l6 6 6-6" })
218
+ );
219
+
220
+ // icons/pencil.tsx
221
+ var import_jsx_runtime5 = require("react/jsx-runtime");
222
+ var PencilIcon = /* @__PURE__ */ createIcon(
223
+ "PencilIcon",
224
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
225
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 20h9" }),
226
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z" })
227
+ ] })
228
+ );
229
+
230
+ // icons/trash.tsx
231
+ var import_jsx_runtime6 = require("react/jsx-runtime");
232
+ var TrashIcon = /* @__PURE__ */ createIcon(
233
+ "TrashIcon",
234
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
235
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 6h18" }),
236
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }),
237
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }),
238
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M10 11v6" }),
239
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M14 11v6" })
240
+ ] })
241
+ );
242
+
243
+ // icons/box.tsx
244
+ var import_jsx_runtime7 = require("react/jsx-runtime");
245
+ var BoxIcon = /* @__PURE__ */ createIcon(
246
+ "BoxIcon",
247
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
248
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M21 8 12 3 3 8l9 5 9-5Z" }),
249
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 8v8l9 5 9-5V8" }),
250
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 13v8" })
251
+ ] })
252
+ );
253
+
254
+ // icons/upload.tsx
255
+ var import_jsx_runtime8 = require("react/jsx-runtime");
256
+ var UploadIcon = /* @__PURE__ */ createIcon(
257
+ "UploadIcon",
258
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
259
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
260
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M17 8l-5-5-5 5" }),
261
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M12 3v12" })
262
+ ] })
263
+ );
264
+
265
+ // icons/bold.tsx
266
+ var import_jsx_runtime9 = require("react/jsx-runtime");
267
+ var BoldIcon = /* @__PURE__ */ createIcon(
268
+ "BoldIcon",
269
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
270
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }),
271
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" })
272
+ ] })
273
+ );
274
+
275
+ // icons/italic.tsx
276
+ var import_jsx_runtime10 = require("react/jsx-runtime");
277
+ var ItalicIcon = /* @__PURE__ */ createIcon(
278
+ "ItalicIcon",
279
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
280
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M19 4h-9" }),
281
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M14 20H5" }),
282
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M15 4 9 20" })
283
+ ] })
284
+ );
285
+
286
+ // icons/list.tsx
287
+ var import_jsx_runtime11 = require("react/jsx-runtime");
288
+ var ListIcon = /* @__PURE__ */ createIcon(
289
+ "ListIcon",
290
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
291
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M8 6h13" }),
292
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M8 12h13" }),
293
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M8 18h13" }),
294
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M3 6h.01" }),
295
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M3 12h.01" }),
296
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M3 18h.01" })
297
+ ] })
298
+ );
299
+
300
+ // icons/link.tsx
301
+ var import_jsx_runtime12 = require("react/jsx-runtime");
302
+ var LinkIcon = /* @__PURE__ */ createIcon(
303
+ "LinkIcon",
304
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
305
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3" }),
306
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M8 12h8" })
307
+ ] })
308
+ );
309
+
310
+ // icons/image.tsx
311
+ var import_jsx_runtime13 = require("react/jsx-runtime");
312
+ var ImageIcon = /* @__PURE__ */ createIcon(
313
+ "ImageIcon",
314
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
315
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
316
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
317
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M21 15l-5-5L5 21" })
318
+ ] })
319
+ );
320
+
321
+ // icons/file-text.tsx
322
+ var import_jsx_runtime14 = require("react/jsx-runtime");
323
+ var FileTextIcon = /* @__PURE__ */ createIcon(
324
+ "FileTextIcon",
325
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
326
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2Z" }),
327
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M14 2v6h6" }),
328
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M16 13H8" }),
329
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M16 17H8" }),
330
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M10 9H8" })
331
+ ] })
332
+ );
333
+
334
+ // icons/ellipse.tsx
335
+ var import_jsx_runtime15 = require("react/jsx-runtime");
336
+ var EllipseIcon = /* @__PURE__ */ createIcon(
337
+ "EllipseIcon",
338
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ellipse", { cx: "12", cy: "12", rx: "10", ry: "7" })
339
+ );
340
+
341
+ // icons/rectangle.tsx
342
+ var import_jsx_runtime16 = require("react/jsx-runtime");
343
+ var RectangleIcon = /* @__PURE__ */ createIcon(
344
+ "RectangleIcon",
345
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "2", y: "5", width: "20", height: "14", rx: "1" })
346
+ );
347
+
348
+ // icons/polygon.tsx
349
+ var import_jsx_runtime17 = require("react/jsx-runtime");
350
+ var PolygonIcon = /* @__PURE__ */ createIcon(
351
+ "PolygonIcon",
352
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M10.83 2.38a2 2 0 0 1 2.34 0l8 5.74a2 2 0 0 1 .73 2.25l-3.04 9.26a2 2 0 0 1-1.9 1.37H7.04a2 2 0 0 1-1.9-1.37L2.1 10.37a2 2 0 0 1 .73-2.25z" })
353
+ );
354
+
355
+ // icons/cursor.tsx
356
+ var import_jsx_runtime18 = require("react/jsx-runtime");
357
+ var CursorIcon = /* @__PURE__ */ createIcon(
358
+ "CursorIcon",
359
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z" })
360
+ );
361
+
362
+ // icons/label.tsx
363
+ var import_jsx_runtime19 = require("react/jsx-runtime");
364
+ var LabelIcon = /* @__PURE__ */ createIcon(
365
+ "LabelIcon",
366
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
367
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M12 4v16" }),
368
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" }),
369
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M9 20h6" })
370
+ ] })
371
+ );
372
+
373
+ // icons/camp-border.tsx
374
+ var import_jsx_runtime20 = require("react/jsx-runtime");
375
+ var CampBorderIcon = /* @__PURE__ */ createIcon(
376
+ "CampBorderIcon",
377
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
378
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M5 3a2 2 0 0 0-2 2" }),
379
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M19 3a2 2 0 0 1 2 2" }),
380
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M21 19a2 2 0 0 1-2 2" }),
381
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M5 21a2 2 0 0 1-2-2" }),
382
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M9 3h1" }),
383
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M9 21h1" }),
384
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M14 3h1" }),
385
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M14 21h1" }),
386
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M3 9v1" }),
387
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M21 9v1" }),
388
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M3 14v1" }),
389
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M21 14v1" })
390
+ ] })
391
+ );
392
+
393
+ // icons/structure.tsx
394
+ var import_jsx_runtime21 = require("react/jsx-runtime");
395
+ var StructureIcon = /* @__PURE__ */ createIcon(
396
+ "StructureIcon",
397
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
398
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }),
399
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" })
400
+ ] })
401
+ );
402
+
403
+ // icons/road.tsx
404
+ var import_jsx_runtime22 = require("react/jsx-runtime");
405
+ var RoadIcon = /* @__PURE__ */ createIcon(
406
+ "RoadIcon",
407
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
408
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M4 19l4-14" }),
409
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M16 5l4 14" }),
410
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M12 8v-2" }),
411
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M12 13v-2" }),
412
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M12 18v-2" })
413
+ ] })
414
+ );
415
+
416
+ // icons/restroom.tsx
417
+ var import_jsx_runtime23 = require("react/jsx-runtime");
418
+ var RestroomIcon = /* @__PURE__ */ createIcon(
419
+ "RestroomIcon",
420
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
421
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "6.5", cy: "4", r: "2" }),
422
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M3.5 14 6.5 8l3 6z" }),
423
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M5 14v7" }),
424
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M8 14v7" }),
425
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "17.5", cy: "4", r: "2" }),
426
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M14.5 14 17.5 8l3 6z" }),
427
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M16 14v7" }),
428
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M19 14v7" })
429
+ ] })
430
+ );
431
+
432
+ // icons/registry.ts
433
+ var iconRegistry = {
434
+ close: CloseIcon,
435
+ "chevron-up": ChevronUpIcon,
436
+ "chevron-down": ChevronDownIcon,
437
+ pencil: PencilIcon,
438
+ trash: TrashIcon,
439
+ box: BoxIcon,
440
+ upload: UploadIcon,
441
+ bold: BoldIcon,
442
+ italic: ItalicIcon,
443
+ list: ListIcon,
444
+ link: LinkIcon,
445
+ image: ImageIcon,
446
+ "file-text": FileTextIcon,
447
+ ellipse: EllipseIcon,
448
+ rectangle: RectangleIcon,
449
+ polygon: PolygonIcon,
450
+ cursor: CursorIcon,
451
+ label: LabelIcon,
452
+ "camp-border": CampBorderIcon,
453
+ structure: StructureIcon,
454
+ road: RoadIcon,
455
+ restroom: RestroomIcon
456
+ };
457
+
458
+ // icon.tsx
459
+ var import_jsx_runtime24 = require("react/jsx-runtime");
460
+ var Icon = ({ name, ...rest }) => {
461
+ const Glyph = iconRegistry[name];
462
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Glyph, { ...rest });
463
+ };
464
+ // Annotate the CommonJS export names for ESM import in node:
465
+ 0 && (module.exports = {
466
+ BoldIcon,
467
+ BoxIcon,
468
+ CampBorderIcon,
469
+ ChevronDownIcon,
470
+ ChevronUpIcon,
471
+ CloseIcon,
472
+ CursorIcon,
473
+ EllipseIcon,
474
+ FileTextIcon,
475
+ Icon,
476
+ ImageIcon,
477
+ ItalicIcon,
478
+ LabelIcon,
479
+ LinkIcon,
480
+ ListIcon,
481
+ PencilIcon,
482
+ PolygonIcon,
483
+ RectangleIcon,
484
+ RestroomIcon,
485
+ RoadIcon,
486
+ StructureIcon,
487
+ TrashIcon,
488
+ UploadIcon,
489
+ createIcon
490
+ });
491
+ /*! Bundled license information:
492
+
493
+ classnames/index.js:
494
+ (*!
495
+ Copyright (c) 2018 Jed Watson.
496
+ Licensed under the MIT License (MIT), see
497
+ http://jedwatson.github.io/classnames
498
+ *)
499
+ */
package/dist/index.css ADDED
@@ -0,0 +1,21 @@
1
+ /* esbuild-sass-plugin:css-chunkicon.module.scss */
2
+ .BHT__Icon {
3
+ display: inline-block;
4
+ flex-shrink: 0;
5
+ }
6
+ .BHT__Icon--sm {
7
+ width: 1rem;
8
+ height: 1rem;
9
+ }
10
+ .BHT__Icon--md {
11
+ width: 1.25rem;
12
+ height: 1.25rem;
13
+ }
14
+ .BHT__Icon--lg {
15
+ width: 1.5rem;
16
+ height: 1.5rem;
17
+ }
18
+ .BHT__Icon--xl {
19
+ width: 2.5rem;
20
+ height: 2.5rem;
21
+ }
@@ -0,0 +1,133 @@
1
+ import * as react from 'react';
2
+ import { SVGAttributes, ReactNode } from 'react';
3
+
4
+ type IconSize = "sm" | "md" | "lg" | "xl";
5
+ interface IconBaseProps extends SVGAttributes<SVGSVGElement> {
6
+ /** Controls width/height; defaults to md */
7
+ size?: IconSize;
8
+ /** Additional class names to merge with the component root element */
9
+ className?: string;
10
+ }
11
+ type IconComponent = (props: IconBaseProps) => ReactNode;
12
+ /**
13
+ * Builds a single icon component from its glyph geometry.
14
+ *
15
+ * This is the only module that imports the stylesheet, so the per-icon modules
16
+ * stay free of side effects and a consumer importing one icon pulls in one
17
+ * glyph rather than the whole set.
18
+ */
19
+ declare function createIcon(displayName: string, children: ReactNode): IconComponent;
20
+
21
+ declare const CloseIcon: IconComponent;
22
+
23
+ declare const ChevronUpIcon: IconComponent;
24
+
25
+ declare const ChevronDownIcon: IconComponent;
26
+
27
+ declare const PencilIcon: IconComponent;
28
+
29
+ declare const TrashIcon: IconComponent;
30
+
31
+ declare const BoxIcon: IconComponent;
32
+
33
+ declare const UploadIcon: IconComponent;
34
+
35
+ declare const BoldIcon: IconComponent;
36
+
37
+ declare const ItalicIcon: IconComponent;
38
+
39
+ declare const ListIcon: IconComponent;
40
+
41
+ declare const LinkIcon: IconComponent;
42
+
43
+ /** Feather `image` */
44
+ declare const ImageIcon: IconComponent;
45
+
46
+ declare const FileTextIcon: IconComponent;
47
+
48
+ /** Lucide `circle`, flattened. No set ships an ellipse — it's a primitive. */
49
+ declare const EllipseIcon: IconComponent;
50
+
51
+ /**
52
+ * A flat rectangle primitive — the counterpart to `ellipse`. Lucide's `square`
53
+ * is the nearest thing any set ships, but a square is the wrong footprint for a
54
+ * shape tool sitting next to the ellipse, so this matches the ellipse's bounds.
55
+ */
56
+ declare const RectangleIcon: IconComponent;
57
+
58
+ /** Lucide `pentagon` */
59
+ declare const PolygonIcon: IconComponent;
60
+
61
+ /** Lucide `mouse-pointer-2` */
62
+ declare const CursorIcon: IconComponent;
63
+
64
+ /** Lucide `type` */
65
+ declare const LabelIcon: IconComponent;
66
+
67
+ /** Lucide `square-dashed` */
68
+ declare const CampBorderIcon: IconComponent;
69
+
70
+ /** Lucide `house` */
71
+ declare const StructureIcon: IconComponent;
72
+
73
+ /** Tabler `road` */
74
+ declare const RoadIcon: IconComponent;
75
+
76
+ /**
77
+ * The two-figure WC convention, authored rather than taken from a library.
78
+ *
79
+ * This is the one glyph in the set with no stroke-library equivalent: Lucide's
80
+ * `toilet` collapses into an unreadable shape at 16px, and Tabler's `friends`
81
+ * loses its heads at that size. Kept deliberately blunt — head, body, legs and
82
+ * nothing else — because it is checked at `sm`, where any further detail fills
83
+ * in solid.
84
+ */
85
+ declare const RestroomIcon: IconComponent;
86
+
87
+ /**
88
+ * Every icon keyed by its string name. Importing this pulls in the whole set,
89
+ * which is why it lives behind `<Icon name>` rather than the barrel: a
90
+ * consumer reaching for one glyph should import that glyph.
91
+ */
92
+ declare const iconRegistry: {
93
+ readonly close: IconComponent;
94
+ readonly "chevron-up": IconComponent;
95
+ readonly "chevron-down": IconComponent;
96
+ readonly pencil: IconComponent;
97
+ readonly trash: IconComponent;
98
+ readonly box: IconComponent;
99
+ readonly upload: IconComponent;
100
+ readonly bold: IconComponent;
101
+ readonly italic: IconComponent;
102
+ readonly list: IconComponent;
103
+ readonly link: IconComponent;
104
+ readonly image: IconComponent;
105
+ readonly "file-text": IconComponent;
106
+ readonly ellipse: IconComponent;
107
+ readonly rectangle: IconComponent;
108
+ readonly polygon: IconComponent;
109
+ readonly cursor: IconComponent;
110
+ readonly label: IconComponent;
111
+ readonly "camp-border": IconComponent;
112
+ readonly structure: IconComponent;
113
+ readonly road: IconComponent;
114
+ readonly restroom: IconComponent;
115
+ };
116
+
117
+ type IconName = keyof typeof iconRegistry;
118
+ interface IconProps extends Omit<IconBaseProps, "name"> {
119
+ /** Which icon to render */
120
+ name: IconName;
121
+ }
122
+ /**
123
+ * Renders any icon by name.
124
+ *
125
+ * Convenient when the icon is chosen at runtime — a toolbar built from config,
126
+ * say — but the lookup is dynamic, so a bundler cannot know which glyphs are
127
+ * reachable and this pulls in the entire set. Import the icon you want
128
+ * (`import { BoxIcon } from "@behivetech/atoms.icon"`, or
129
+ * `"@behivetech/atoms.icon/box"`) wherever the name is known at build time.
130
+ */
131
+ declare const Icon: ({ name, ...rest }: IconProps) => react.JSX.Element;
132
+
133
+ export { BoldIcon, BoxIcon, CampBorderIcon, ChevronDownIcon, ChevronUpIcon, CloseIcon, CursorIcon, EllipseIcon, FileTextIcon, Icon, type IconBaseProps, type IconComponent, type IconName, type IconProps, type IconSize, ImageIcon, ItalicIcon, LabelIcon, LinkIcon, ListIcon, PencilIcon, PolygonIcon, RectangleIcon, RestroomIcon, RoadIcon, StructureIcon, TrashIcon, UploadIcon, createIcon };