@nice2dev/icons 1.3.15 → 1.3.16
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/CHANGELOG.md +9 -0
- package/dist/cjs/NiceDesktopIconExporter.js +688 -599
- package/dist/cjs/NiceFaviconGenerator.js +603 -417
- package/dist/cjs/NiceIconPicker.js +788 -508
- package/dist/cjs/NiceIconPreview.js +246 -188
- package/dist/cjs/NiceIconSetCreator.js +683 -552
- package/dist/cjs/NiceIconStacker.js +547 -171
- package/dist/cjs/NiceIconValue.js +27 -35
- package/dist/cjs/NtdIconBadge.js +384 -360
- package/dist/cjs/NtdIconMorph.js +419 -354
- package/dist/cjs/NtdStateMorph.js +150 -147
- package/dist/cjs/advancedIconSearch.js +373 -510
- package/dist/cjs/animationControls.js +518 -642
- package/dist/cjs/client.js +12 -15
- package/dist/cjs/createIcon.js +349 -251
- package/dist/cjs/design-tokens.js +324 -390
- package/dist/cjs/figmaExport.js +162 -257
- package/dist/cjs/figmaSync.js +234 -316
- package/dist/cjs/headless-ui.js +240 -368
- package/dist/cjs/iconAnalytics.js +337 -393
- package/dist/cjs/iconHtml.js +64 -86
- package/dist/cjs/iconMetadata.js +392 -472
- package/dist/cjs/iconParts.js +120 -90
- package/dist/cjs/iconStack.js +136 -155
- package/dist/cjs/iconStyles.js +1609 -504
- package/dist/cjs/iconValue.js +359 -430
- package/dist/cjs/icons/accessibility.js +1119 -134
- package/dist/cjs/icons/actions.js +1290 -330
- package/dist/cjs/icons/ai.js +1424 -144
- package/dist/cjs/icons/brand.js +1344 -172
- package/dist/cjs/icons/business.js +903 -193
- package/dist/cjs/icons/devtech.js +1656 -227
- package/dist/cjs/icons/ecommerce.js +802 -111
- package/dist/cjs/icons/education.js +1345 -199
- package/dist/cjs/icons/files.js +1597 -328
- package/dist/cjs/icons/fintech.js +793 -104
- package/dist/cjs/icons/food.js +1507 -153
- package/dist/cjs/icons/fun.js +786 -109
- package/dist/cjs/icons/gaming.js +916 -170
- package/dist/cjs/icons/health.js +623 -112
- package/dist/cjs/icons/index.js +32 -35
- package/dist/cjs/icons/input.js +282 -83
- package/dist/cjs/icons/legal.js +1065 -122
- package/dist/cjs/icons/media.js +1061 -267
- package/dist/cjs/icons/navigation.js +387 -122
- package/dist/cjs/icons/omniverk.js +747 -90
- package/dist/cjs/icons/realestate.js +1520 -193
- package/dist/cjs/icons/saas.js +867 -98
- package/dist/cjs/icons/science.js +1451 -202
- package/dist/cjs/icons/shapes.js +1316 -308
- package/dist/cjs/icons/smarthome.js +786 -90
- package/dist/cjs/icons/social.js +591 -59
- package/dist/cjs/icons/sports.js +1225 -133
- package/dist/cjs/icons/sustainability.js +1211 -139
- package/dist/cjs/icons/travel.js +1470 -148
- package/dist/cjs/icons/ui.js +1508 -315
- package/dist/cjs/icons/weather.js +1160 -173
- package/dist/cjs/index.js +566 -568
- package/dist/cjs/lottieIntegration.js +261 -266
- package/dist/cjs/nicetodev-icons.css +1 -1
- package/dist/cjs/particleEffects.js +270 -251
- package/dist/cjs/resolver.js +229 -284
- package/dist/cjs/rsc.js +175 -193
- package/dist/cjs/sharpen.js +73 -130
- package/dist/cjs/smilAnimations.js +371 -165
- package/dist/cjs/stacking.js +87 -122
- package/dist/cjs/tailwind-plugin.js +280 -320
- package/dist/cjs/types.js +46 -72
- package/dist/cjs/utilities.js +163 -324
- package/dist/cjs/variantProps.js +12 -52
- package/dist/esm/NiceDesktopIconExporter.js +671 -598
- package/dist/esm/NiceFaviconGenerator.js +583 -416
- package/dist/esm/NiceIconPicker.js +789 -507
- package/dist/esm/NiceIconPreview.js +247 -187
- package/dist/esm/NiceIconSetCreator.js +685 -551
- package/dist/esm/NiceIconStacker.js +549 -170
- package/dist/esm/NiceIconValue.js +29 -34
- package/dist/esm/NtdIconBadge.js +388 -359
- package/dist/esm/NtdIconMorph.js +423 -353
- package/dist/esm/NtdStateMorph.js +152 -146
- package/dist/esm/advancedIconSearch.js +391 -509
- package/dist/esm/animationControls.js +527 -641
- package/dist/esm/client.js +48 -10
- package/dist/esm/createIcon.js +350 -250
- package/dist/esm/design-tokens.js +334 -387
- package/dist/esm/figmaExport.js +170 -256
- package/dist/esm/figmaSync.js +237 -315
- package/dist/esm/headless-ui.js +254 -365
- package/dist/esm/iconAnalytics.js +342 -392
- package/dist/esm/iconHtml.js +67 -85
- package/dist/esm/iconMetadata.js +404 -471
- package/dist/esm/iconParts.js +125 -89
- package/dist/esm/iconStack.js +145 -154
- package/dist/esm/iconStyles.js +1620 -503
- package/dist/esm/iconValue.js +361 -429
- package/dist/esm/icons/accessibility.js +1133 -133
- package/dist/esm/icons/actions.js +1320 -329
- package/dist/esm/icons/ai.js +1441 -143
- package/dist/esm/icons/brand.js +1351 -171
- package/dist/esm/icons/business.js +931 -201
- package/dist/esm/icons/devtech.js +1687 -226
- package/dist/esm/icons/ecommerce.js +816 -110
- package/dist/esm/icons/education.js +1364 -198
- package/dist/esm/icons/files.js +1628 -327
- package/dist/esm/icons/fintech.js +807 -103
- package/dist/esm/icons/food.js +1524 -152
- package/dist/esm/icons/fun.js +801 -108
- package/dist/esm/icons/gaming.js +933 -169
- package/dist/esm/icons/health.js +636 -111
- package/dist/esm/icons/index.js +596 -32
- package/dist/esm/icons/input.js +326 -82
- package/dist/esm/icons/legal.js +1079 -121
- package/dist/esm/icons/media.js +1086 -266
- package/dist/esm/icons/navigation.js +401 -121
- package/dist/esm/icons/omniverk.js +759 -89
- package/dist/esm/icons/realestate.js +1544 -198
- package/dist/esm/icons/saas.js +880 -97
- package/dist/esm/icons/science.js +1477 -208
- package/dist/esm/icons/shapes.js +1343 -307
- package/dist/esm/icons/smarthome.js +799 -89
- package/dist/esm/icons/social.js +599 -58
- package/dist/esm/icons/sports.js +1240 -132
- package/dist/esm/icons/sustainability.js +1226 -138
- package/dist/esm/icons/travel.js +1486 -147
- package/dist/esm/icons/ui.js +1540 -314
- package/dist/esm/icons/weather.js +1181 -172
- package/dist/esm/index.js +756 -58
- package/dist/esm/lottieIntegration.js +264 -265
- package/dist/esm/nicetodev-icons.css +1 -1
- package/dist/esm/particleEffects.js +271 -250
- package/dist/esm/resolver.js +231 -283
- package/dist/esm/rsc.js +182 -192
- package/dist/esm/sharpen.js +78 -129
- package/dist/esm/smilAnimations.js +376 -164
- package/dist/esm/stacking.js +99 -121
- package/dist/esm/tailwind-plugin.js +282 -319
- package/dist/esm/types.js +50 -71
- package/dist/esm/utilities.js +177 -321
- package/dist/esm/variantProps.js +23 -52
- package/package.json +15 -22
|
@@ -1,212 +1,591 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from
|
|
2
|
-
import { useNiceTranslation, useControllableState, useRovingFocus } from
|
|
3
|
-
import React, { forwardRef, useState, useRef, useCallback, useMemo, useImperativeHandle } from
|
|
4
|
-
import { NtdPlus, NtdTrash, NtdCheck, NtdCopy } from
|
|
5
|
-
import { NtdClose } from
|
|
6
|
-
import { niceIconStackCode, iconDisplayName, stackParentId, stackChildrenOf, isValidTextBinding, renderIconStack, addStackLayer, removeStackLayer } from
|
|
7
|
-
import { BOX_PERFECT_STACK, defaultStackSize, defaultTextSize
|
|
8
|
-
|
|
9
|
-
/** Where a layer can sit, laid out on the 5 × 5 pad as it sits in its parent. */
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useNiceTranslation, useControllableState, useRovingFocus } from "@nice2dev/ui-core";
|
|
3
|
+
import React, { forwardRef, useState, useRef, useCallback, useMemo, useImperativeHandle } from "react";
|
|
4
|
+
import { NtdPlus, NtdTrash, NtdCheck, NtdCopy } from "./icons/actions.js";
|
|
5
|
+
import { NtdClose } from "./icons/navigation.js";
|
|
6
|
+
import { niceIconStackCode, iconDisplayName, stackParentId, stackChildrenOf, isValidTextBinding, renderIconStack, addStackLayer, removeStackLayer } from "./iconStack.js";
|
|
7
|
+
import { perfectStackOf, BOX_PERFECT_STACK, defaultStackSize, defaultTextSize } from "./stacking.js";
|
|
8
|
+
/* empty css */
|
|
10
9
|
const PAD = [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
10
|
+
{ align: "top-left", row: 1, col: 1 },
|
|
11
|
+
{ align: "top", row: 1, col: 3 },
|
|
12
|
+
{ align: "top-right", row: 1, col: 5 },
|
|
13
|
+
{ align: "half-top-left", row: 2, col: 2 },
|
|
14
|
+
{ align: "half-top", row: 2, col: 3 },
|
|
15
|
+
{ align: "half-top-right", row: 2, col: 4 },
|
|
16
|
+
{ align: "left", row: 3, col: 1 },
|
|
17
|
+
{ align: "half-left", row: 3, col: 2 },
|
|
18
|
+
{ align: "center", row: 3, col: 3 },
|
|
19
|
+
{ align: "half-right", row: 3, col: 4 },
|
|
20
|
+
{ align: "right", row: 3, col: 5 },
|
|
21
|
+
{ align: "half-bottom-left", row: 4, col: 2 },
|
|
22
|
+
{ align: "half-bottom", row: 4, col: 3 },
|
|
23
|
+
{ align: "half-bottom-right", row: 4, col: 4 },
|
|
24
|
+
{ align: "bottom-left", row: 5, col: 1 },
|
|
25
|
+
{ align: "bottom", row: 5, col: 3 },
|
|
26
|
+
{ align: "bottom-right", row: 5, col: 5 }
|
|
28
27
|
];
|
|
29
|
-
/** The positions' names, in words. */
|
|
30
28
|
function alignNames(t) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
return {
|
|
30
|
+
perfect: t("iconStacker.align.perfect", "Auto"),
|
|
31
|
+
center: t("iconStacker.align.center", "Centre"),
|
|
32
|
+
top: t("iconStacker.align.top", "Top edge"),
|
|
33
|
+
bottom: t("iconStacker.align.bottom", "Bottom edge"),
|
|
34
|
+
left: t("iconStacker.align.left", "Left edge"),
|
|
35
|
+
right: t("iconStacker.align.right", "Right edge"),
|
|
36
|
+
"top-left": t("iconStacker.align.top-left", "Top-left corner"),
|
|
37
|
+
"top-right": t("iconStacker.align.top-right", "Top-right corner"),
|
|
38
|
+
"bottom-left": t("iconStacker.align.bottom-left", "Bottom-left corner"),
|
|
39
|
+
"bottom-right": t("iconStacker.align.bottom-right", "Bottom-right corner"),
|
|
40
|
+
"half-top": t("iconStacker.align.half-top", "Halfway to the top"),
|
|
41
|
+
"half-bottom": t("iconStacker.align.half-bottom", "Halfway to the bottom"),
|
|
42
|
+
"half-left": t("iconStacker.align.half-left", "Halfway to the left"),
|
|
43
|
+
"half-right": t("iconStacker.align.half-right", "Halfway to the right"),
|
|
44
|
+
"half-top-left": t("iconStacker.align.half-top-left", "Halfway to the top-left corner"),
|
|
45
|
+
"half-top-right": t("iconStacker.align.half-top-right", "Halfway to the top-right corner"),
|
|
46
|
+
"half-bottom-left": t(
|
|
47
|
+
"iconStacker.align.half-bottom-left",
|
|
48
|
+
"Halfway to the bottom-left corner"
|
|
49
|
+
),
|
|
50
|
+
"half-bottom-right": t(
|
|
51
|
+
"iconStacker.align.half-bottom-right",
|
|
52
|
+
"Halfway to the bottom-right corner"
|
|
53
|
+
)
|
|
54
|
+
};
|
|
51
55
|
}
|
|
52
56
|
const STAGE_SIZE = 64;
|
|
53
57
|
const STAGE_SMALL = [32, 24, 16];
|
|
54
58
|
const NO_LAYERS = [];
|
|
55
|
-
|
|
56
|
-
const AUTO_SWATCH = '#808080';
|
|
57
|
-
/** The layers in tree order (each followed by what sits in it), with their depth. */
|
|
59
|
+
const AUTO_SWATCH = "#808080";
|
|
58
60
|
function walk(layers) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
if (layers[0]) {
|
|
67
|
-
visit(layers[0], 0);
|
|
61
|
+
const out = [];
|
|
62
|
+
const visit = (layer, depth) => {
|
|
63
|
+
out.push({ layer, depth });
|
|
64
|
+
for (const child of stackChildrenOf(layers, layer.id)) {
|
|
65
|
+
visit(child, depth + 1);
|
|
68
66
|
}
|
|
69
|
-
|
|
67
|
+
};
|
|
68
|
+
if (layers[0]) {
|
|
69
|
+
visit(layers[0], 0);
|
|
70
|
+
}
|
|
71
|
+
return out;
|
|
70
72
|
}
|
|
71
|
-
/** A colour of the layer's own, or "auto" — following its parent — until one is picked. */
|
|
72
73
|
function Swatch({ label, value, onChange, autoLabel, resetLabel }) {
|
|
73
|
-
|
|
74
|
+
return /* @__PURE__ */ jsxs("span", { className: "nice-icon-stacker__swatch", children: [
|
|
75
|
+
/* @__PURE__ */ jsxs(
|
|
76
|
+
"label",
|
|
77
|
+
{
|
|
78
|
+
className: `nice-icon-stacker__swatch-pick${value ? "" : " nice-icon-stacker__swatch-pick--auto"}`,
|
|
79
|
+
title: `${label}: ${value ?? autoLabel}`,
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
"span",
|
|
83
|
+
{
|
|
84
|
+
className: "nice-icon-stacker__swatch-dot",
|
|
85
|
+
style: value ? { background: value } : void 0
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
"input",
|
|
91
|
+
{
|
|
92
|
+
type: "color",
|
|
93
|
+
value: value ?? AUTO_SWATCH,
|
|
94
|
+
onChange: (e) => onChange(e.target.value)
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
value && /* @__PURE__ */ jsx(
|
|
101
|
+
"button",
|
|
102
|
+
{
|
|
103
|
+
type: "button",
|
|
104
|
+
className: "nice-icon-stacker__reset",
|
|
105
|
+
onClick: () => onChange(void 0),
|
|
106
|
+
"aria-label": `${resetLabel}: ${label}`,
|
|
107
|
+
title: resetLabel,
|
|
108
|
+
children: /* @__PURE__ */ jsx(NtdClose, { size: 10 })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] });
|
|
74
112
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
113
|
+
const NiceIconStacker = forwardRef(
|
|
114
|
+
function NiceIconStacker2({
|
|
115
|
+
icons,
|
|
116
|
+
layers: layersProp,
|
|
117
|
+
defaultLayers,
|
|
118
|
+
onLayersChange,
|
|
119
|
+
current,
|
|
120
|
+
onAddClick,
|
|
121
|
+
previewProps,
|
|
122
|
+
iconLabel = iconDisplayName,
|
|
123
|
+
showCode = true,
|
|
124
|
+
keepBase = false,
|
|
125
|
+
className
|
|
126
|
+
}, ref) {
|
|
86
127
|
const { t } = useNiceTranslation();
|
|
87
128
|
const [layers, setLayers] = useControllableState({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
129
|
+
value: layersProp,
|
|
130
|
+
defaultValue: defaultLayers,
|
|
131
|
+
fallbackValue: NO_LAYERS,
|
|
132
|
+
onChange: onLayersChange,
|
|
133
|
+
componentName: "NiceIconStacker"
|
|
93
134
|
});
|
|
94
135
|
const [copied, setCopied] = useState(false);
|
|
95
|
-
|
|
96
|
-
const [selected, setSelected] = useState(undefined);
|
|
136
|
+
const [selected, setSelected] = useState(void 0);
|
|
97
137
|
const base = layers[0];
|
|
98
|
-
const target =
|
|
138
|
+
const target = layers.find((l) => l.id === selected) ?? layers[layers.length - 1] ?? void 0;
|
|
99
139
|
const listRef = useRef(null);
|
|
100
140
|
useRovingFocus(listRef, {
|
|
101
|
-
|
|
102
|
-
|
|
141
|
+
orientation: "vertical",
|
|
142
|
+
itemSelector: ".nice-icon-stacker__layer-select"
|
|
103
143
|
});
|
|
104
144
|
const padRef = useRef(null);
|
|
105
145
|
useRovingFocus(padRef, {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
146
|
+
orientation: "grid",
|
|
147
|
+
itemSelector: '[role="radio"]',
|
|
148
|
+
activateOnMove: true
|
|
109
149
|
});
|
|
110
|
-
const resolve = useCallback(
|
|
150
|
+
const resolve = useCallback(
|
|
151
|
+
(name) => typeof icons === "function" ? icons(name) : icons[name],
|
|
152
|
+
[icons]
|
|
153
|
+
);
|
|
111
154
|
const tree = useMemo(() => walk(layers), [layers]);
|
|
112
|
-
const code = useMemo(() =>
|
|
113
|
-
const update = (id, patch) => setLayers((prev) => prev.map((l) =>
|
|
155
|
+
const code = useMemo(() => showCode ? niceIconStackCode(layers) : "", [layers, showCode]);
|
|
156
|
+
const update = (id, patch) => setLayers((prev) => prev.map((l) => l.id === id ? { ...l, ...patch } : l));
|
|
114
157
|
const add = (icon = current) => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
setSelected(added);
|
|
158
|
+
if (!icon) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
let added = "";
|
|
162
|
+
setLayers((prev) => {
|
|
163
|
+
const next = addStackLayer(prev, icon, prev.find((l) => l.id === target?.id)?.id);
|
|
164
|
+
added = next.id;
|
|
165
|
+
return next.layers;
|
|
166
|
+
});
|
|
167
|
+
setSelected(added);
|
|
126
168
|
};
|
|
127
169
|
const remove = (id) => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
170
|
+
setLayers((prev) => removeStackLayer(prev, id));
|
|
171
|
+
if (selected === id) {
|
|
172
|
+
setSelected(void 0);
|
|
173
|
+
}
|
|
132
174
|
};
|
|
133
175
|
const clear = () => {
|
|
134
|
-
|
|
135
|
-
|
|
176
|
+
setLayers((prev) => keepBase && prev[0] ? [prev[0]] : NO_LAYERS);
|
|
177
|
+
setSelected(void 0);
|
|
136
178
|
};
|
|
137
179
|
useImperativeHandle(ref, () => ({ add, clear }));
|
|
138
180
|
const copy = () => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}));
|
|
181
|
+
void navigator.clipboard?.writeText(code).then(() => {
|
|
182
|
+
setCopied(true);
|
|
183
|
+
window.setTimeout(() => setCopied(false), 1500);
|
|
184
|
+
});
|
|
144
185
|
};
|
|
145
|
-
const autoLabel = t(
|
|
146
|
-
const resetLabel = t(
|
|
186
|
+
const autoLabel = t("iconStacker.auto", "auto");
|
|
187
|
+
const resetLabel = t("iconStacker.reset", "Back to auto");
|
|
147
188
|
const names = alignNames(t);
|
|
148
189
|
const alignName = (a) => names[a];
|
|
149
|
-
const currentName = current ? iconLabel(current.icon) :
|
|
150
|
-
const targetName = target ? iconLabel(target.icon) :
|
|
190
|
+
const currentName = current ? iconLabel(current.icon) : "";
|
|
191
|
+
const targetName = target ? iconLabel(target.icon) : "";
|
|
151
192
|
const asks = !!onAddClick || !current;
|
|
152
|
-
const addText = asks
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const addLabel = asks
|
|
156
|
-
? base && target
|
|
157
|
-
? t('iconStacker.addIconInto', 'Add an icon into {target}').replace('{target}', targetName)
|
|
158
|
-
: addText
|
|
159
|
-
: base && target
|
|
160
|
-
? t('iconStacker.addInto', 'Add {icon} into {target}')
|
|
161
|
-
.replace('{icon}', currentName)
|
|
162
|
-
.replace('{target}', targetName)
|
|
163
|
-
: t('iconStacker.add', 'Add {icon} to the stack').replace('{icon}', currentName);
|
|
164
|
-
const clearLabel = keepBase
|
|
165
|
-
? t('iconStacker.clearOverlays', 'Take off the stacked icons')
|
|
166
|
-
: t('iconStacker.clear', 'Clear the stack');
|
|
167
|
-
// the selected layer, as the inspector edits it
|
|
193
|
+
const addText = asks ? t("iconStacker.addIcon", "Add an icon") : t("iconStacker.addShort", "Add {icon}").replace("{icon}", currentName);
|
|
194
|
+
const addLabel = asks ? base && target ? t("iconStacker.addIconInto", "Add an icon into {target}").replace("{target}", targetName) : addText : base && target ? t("iconStacker.addInto", "Add {icon} into {target}").replace("{icon}", currentName).replace("{target}", targetName) : t("iconStacker.add", "Add {icon} to the stack").replace("{icon}", currentName);
|
|
195
|
+
const clearLabel = keepBase ? t("iconStacker.clearOverlays", "Take off the stacked icons") : t("iconStacker.clear", "Clear the stack");
|
|
168
196
|
const edited = target;
|
|
169
|
-
const editedIcon = edited ? resolve(edited.icon) :
|
|
197
|
+
const editedIcon = edited ? resolve(edited.icon) : void 0;
|
|
170
198
|
const editedIsBase = !!edited && edited === base;
|
|
171
|
-
const align =
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
const atSpot = align === 'perfect';
|
|
178
|
-
const share = (_d = edited === null || edited === void 0 ? void 0 : edited.size) !== null && _d !== void 0 ? _d : (atSpot ? spot.size : defaultStackSize(align));
|
|
199
|
+
const align = edited?.align ?? "perfect";
|
|
200
|
+
const parentId = edited ? stackParentId(layers, edited) : void 0;
|
|
201
|
+
const parentLayer = parentId ? layers.find((p) => p.id === parentId) : void 0;
|
|
202
|
+
const spot = parentLayer && perfectStackOf(resolve(parentLayer.icon)) || BOX_PERFECT_STACK;
|
|
203
|
+
const atSpot = align === "perfect";
|
|
204
|
+
const share = edited?.size ?? (atSpot ? spot.size : defaultStackSize(align));
|
|
179
205
|
const turnDefault = atSpot ? spot.rotation : 0;
|
|
180
|
-
const turn =
|
|
206
|
+
const turn = edited?.rotation ?? turnDefault;
|
|
181
207
|
const innermost = !!edited && stackChildrenOf(layers, edited.id).length === 0;
|
|
182
208
|
const hasText = !!edited && (innermost || !!edited.text || !!edited.textBinding);
|
|
183
|
-
const textSize =
|
|
184
|
-
const bindingInvalid = !!
|
|
185
|
-
return
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
const textSize = edited?.textSize ?? defaultTextSize((edited?.text ?? "").length || 1, perfectStackOf(editedIcon)?.size);
|
|
210
|
+
const bindingInvalid = !!edited?.textBinding && !isValidTextBinding(edited.textBinding);
|
|
211
|
+
return /* @__PURE__ */ jsxs("div", { className: ["nice-icon-stacker", className].filter(Boolean).join(" "), children: [
|
|
212
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__bar", children: [
|
|
213
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__title", children: t("iconStacker.layers", "Layers") }),
|
|
214
|
+
/* @__PURE__ */ jsxs(
|
|
215
|
+
"button",
|
|
216
|
+
{
|
|
217
|
+
type: "button",
|
|
218
|
+
className: "nice-icon-stacker__add",
|
|
219
|
+
onClick: () => onAddClick ? onAddClick(target) : add(),
|
|
220
|
+
disabled: !onAddClick && !current,
|
|
221
|
+
"aria-label": addLabel,
|
|
222
|
+
title: addLabel,
|
|
223
|
+
children: [
|
|
224
|
+
/* @__PURE__ */ jsx(NtdPlus, { size: 14 }),
|
|
225
|
+
" ",
|
|
226
|
+
addText
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ jsx(
|
|
231
|
+
"button",
|
|
232
|
+
{
|
|
233
|
+
type: "button",
|
|
234
|
+
className: "nice-icon-stacker__clear",
|
|
235
|
+
onClick: clear,
|
|
236
|
+
disabled: keepBase ? layers.length < 2 : layers.length === 0,
|
|
237
|
+
"aria-label": clearLabel,
|
|
238
|
+
title: clearLabel,
|
|
239
|
+
children: /* @__PURE__ */ jsx(NtdTrash, { size: 14 })
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
] }),
|
|
243
|
+
!base || !edited ? /* @__PURE__ */ jsx("p", { className: "nice-icon-stacker__empty", children: t("iconStacker.empty", "The stack is empty. Add an icon to start one.") }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
244
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__top", children: [
|
|
245
|
+
/* @__PURE__ */ jsxs(
|
|
246
|
+
"div",
|
|
247
|
+
{
|
|
248
|
+
className: "nice-icon-stacker__preview",
|
|
249
|
+
"aria-label": t("iconStacker.preview", "Preview"),
|
|
250
|
+
role: "group",
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__preview-main", title: `${STAGE_SIZE}px`, children: renderIconStack(layers, icons, {
|
|
253
|
+
baseProps: { ...previewProps, size: STAGE_SIZE, title: iconLabel(base.icon) }
|
|
254
|
+
}) }),
|
|
255
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__preview-small", children: STAGE_SMALL.map((s) => /* @__PURE__ */ jsx("span", { title: `${s}px`, children: renderIconStack(layers, icons, { baseProps: { ...previewProps, size: s } }) }, s)) })
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__layers-wrap", children: [
|
|
260
|
+
/* @__PURE__ */ jsx(
|
|
261
|
+
"ol",
|
|
262
|
+
{
|
|
263
|
+
ref: listRef,
|
|
264
|
+
className: "nice-icon-stacker__layers",
|
|
265
|
+
"aria-label": t("iconStacker.layers", "Layers"),
|
|
266
|
+
children: tree.map(({ layer: l, depth }) => {
|
|
267
|
+
const Icon = resolve(l.icon);
|
|
268
|
+
const isBase = l === base;
|
|
269
|
+
const isSelected = l === edited;
|
|
270
|
+
const name = iconLabel(l.icon);
|
|
271
|
+
const removable = !(isBase && keepBase);
|
|
272
|
+
const removeLabel = t("iconStacker.remove", "Remove {icon}").replace(
|
|
273
|
+
"{icon}",
|
|
274
|
+
name
|
|
275
|
+
);
|
|
276
|
+
return /* @__PURE__ */ jsxs(
|
|
277
|
+
"li",
|
|
278
|
+
{
|
|
279
|
+
className: `nice-icon-stacker__layer${isSelected ? " nice-icon-stacker__layer--selected" : ""}`,
|
|
280
|
+
style: { ["--nice-icon-stacker-depth"]: String(depth) },
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ jsxs(
|
|
283
|
+
"button",
|
|
284
|
+
{
|
|
285
|
+
type: "button",
|
|
286
|
+
className: "nice-icon-stacker__layer-select",
|
|
287
|
+
"aria-pressed": isSelected,
|
|
288
|
+
onClick: () => setSelected(l.id),
|
|
289
|
+
onKeyDown: (e) => {
|
|
290
|
+
if (removable && (e.key === "Delete" || e.key === "Backspace")) {
|
|
291
|
+
e.preventDefault();
|
|
292
|
+
remove(l.id);
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__layer-icon", children: Icon ? /* @__PURE__ */ jsx(Icon, { size: 18, variant: l.variant }) : null }),
|
|
297
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__layer-name", children: name }),
|
|
298
|
+
l.text && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
299
|
+
" ",
|
|
300
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__layer-text", children: l.text })
|
|
301
|
+
] }),
|
|
302
|
+
isBase && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
303
|
+
" ",
|
|
304
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__badge", children: t("iconStacker.base", "Base") })
|
|
305
|
+
] })
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
removable && /* @__PURE__ */ jsx(
|
|
310
|
+
"button",
|
|
311
|
+
{
|
|
312
|
+
type: "button",
|
|
313
|
+
className: "nice-icon-stacker__remove",
|
|
314
|
+
onClick: () => remove(l.id),
|
|
315
|
+
"aria-label": removeLabel,
|
|
316
|
+
title: removeLabel,
|
|
317
|
+
children: /* @__PURE__ */ jsx(NtdClose, { size: 10 })
|
|
318
|
+
}
|
|
319
|
+
)
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
l.id
|
|
323
|
+
);
|
|
324
|
+
})
|
|
325
|
+
}
|
|
326
|
+
),
|
|
327
|
+
/* @__PURE__ */ jsx("small", { className: "nice-icon-stacker__hint", children: t("iconStacker.hint", "A new icon goes into the selected layer.") })
|
|
328
|
+
] })
|
|
329
|
+
] }),
|
|
330
|
+
/* @__PURE__ */ jsxs(
|
|
331
|
+
"div",
|
|
332
|
+
{
|
|
333
|
+
className: "nice-icon-stacker__inspector",
|
|
334
|
+
role: "group",
|
|
335
|
+
"aria-label": iconLabel(edited.icon),
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__inspector-head", children: [
|
|
338
|
+
editedIcon && React.createElement(editedIcon, { size: 16, variant: edited.variant }),
|
|
339
|
+
/* @__PURE__ */ jsx("span", { children: iconLabel(edited.icon) }),
|
|
340
|
+
parentLayer && /* @__PURE__ */ jsx("small", { children: t("iconStacker.inside", "in {icon}").replace(
|
|
341
|
+
"{icon}",
|
|
342
|
+
iconLabel(parentLayer.icon)
|
|
343
|
+
) })
|
|
344
|
+
] }),
|
|
345
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__inspector-body", children: [
|
|
346
|
+
!editedIsBase && /* @__PURE__ */ jsxs(
|
|
347
|
+
"div",
|
|
348
|
+
{
|
|
349
|
+
ref: padRef,
|
|
350
|
+
className: "nice-icon-stacker__pad",
|
|
351
|
+
role: "radiogroup",
|
|
352
|
+
"aria-label": t("iconStacker.align", "Position"),
|
|
353
|
+
children: [
|
|
354
|
+
/* @__PURE__ */ jsx(
|
|
355
|
+
"button",
|
|
356
|
+
{
|
|
357
|
+
type: "button",
|
|
358
|
+
role: "radio",
|
|
359
|
+
"aria-checked": align === "perfect",
|
|
360
|
+
className: "nice-icon-stacker__pad-auto",
|
|
361
|
+
title: t(
|
|
362
|
+
"iconStacker.align.perfectHint",
|
|
363
|
+
"The spot the icon keeps for what is stacked in it"
|
|
364
|
+
),
|
|
365
|
+
onClick: () => update(edited.id, { align: void 0 }),
|
|
366
|
+
children: alignName("perfect")
|
|
367
|
+
}
|
|
368
|
+
),
|
|
369
|
+
/* @__PURE__ */ jsx("span", { className: "nice-icon-stacker__pad-box", children: PAD.map(({ align: a, row, col }) => /* @__PURE__ */ jsx(
|
|
370
|
+
"button",
|
|
371
|
+
{
|
|
372
|
+
type: "button",
|
|
373
|
+
role: "radio",
|
|
374
|
+
"aria-checked": align === a,
|
|
375
|
+
"aria-label": alignName(a),
|
|
376
|
+
title: alignName(a),
|
|
377
|
+
className: "nice-icon-stacker__pad-dot",
|
|
378
|
+
style: { gridRow: row, gridColumn: col },
|
|
379
|
+
onClick: () => update(edited.id, { align: a })
|
|
380
|
+
},
|
|
381
|
+
a
|
|
382
|
+
)) })
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
),
|
|
386
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__fields", children: [
|
|
387
|
+
!editedIsBase && /* @__PURE__ */ jsxs("label", { className: "nice-icon-stacker__field", children: [
|
|
388
|
+
/* @__PURE__ */ jsx("span", { children: t("iconStacker.size", "Size") }),
|
|
389
|
+
/* @__PURE__ */ jsx(
|
|
390
|
+
"input",
|
|
391
|
+
{
|
|
392
|
+
type: "range",
|
|
393
|
+
min: 0.2,
|
|
394
|
+
max: 1,
|
|
395
|
+
step: 0.05,
|
|
396
|
+
value: share,
|
|
397
|
+
onChange: (e) => update(edited.id, { size: Number(e.target.value) })
|
|
398
|
+
}
|
|
399
|
+
),
|
|
400
|
+
/* @__PURE__ */ jsxs("output", { children: [
|
|
401
|
+
Math.round(share * 100),
|
|
402
|
+
"%"
|
|
403
|
+
] })
|
|
404
|
+
] }),
|
|
405
|
+
hasText && /* @__PURE__ */ jsxs("label", { className: "nice-icon-stacker__field", children: [
|
|
406
|
+
/* @__PURE__ */ jsx("span", { children: t("iconStacker.text", "Text") }),
|
|
407
|
+
/* @__PURE__ */ jsx(
|
|
408
|
+
"input",
|
|
409
|
+
{
|
|
410
|
+
type: "text",
|
|
411
|
+
value: edited.text ?? "",
|
|
412
|
+
maxLength: 4,
|
|
413
|
+
onChange: (e) => update(edited.id, { text: e.target.value || void 0 })
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
] })
|
|
417
|
+
] })
|
|
418
|
+
] }),
|
|
419
|
+
/* @__PURE__ */ jsxs("details", { className: "nice-icon-stacker__more", children: [
|
|
420
|
+
/* @__PURE__ */ jsx("summary", { children: t("iconStacker.more", "More") }),
|
|
421
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__more-body", children: [
|
|
422
|
+
!editedIsBase && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
423
|
+
/* @__PURE__ */ jsxs("label", { className: "nice-icon-stacker__field", children: [
|
|
424
|
+
/* @__PURE__ */ jsx("span", { children: t("iconStacker.rotation", "Turn") }),
|
|
425
|
+
/* @__PURE__ */ jsx(
|
|
426
|
+
"input",
|
|
427
|
+
{
|
|
428
|
+
type: "range",
|
|
429
|
+
min: -180,
|
|
430
|
+
max: 180,
|
|
431
|
+
step: 15,
|
|
432
|
+
value: turn,
|
|
433
|
+
onChange: (e) => {
|
|
434
|
+
const v = Number(e.target.value);
|
|
435
|
+
update(edited.id, { rotation: v === turnDefault ? void 0 : v });
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
),
|
|
439
|
+
/* @__PURE__ */ jsxs("output", { children: [
|
|
440
|
+
turn,
|
|
441
|
+
"°"
|
|
442
|
+
] })
|
|
443
|
+
] }),
|
|
444
|
+
/* @__PURE__ */ jsxs("label", { className: "nice-icon-stacker__field", children: [
|
|
445
|
+
/* @__PURE__ */ jsx("span", { children: t("iconStacker.offsetX", "Shift right") }),
|
|
446
|
+
/* @__PURE__ */ jsx(
|
|
447
|
+
"input",
|
|
448
|
+
{
|
|
449
|
+
type: "range",
|
|
450
|
+
min: -50,
|
|
451
|
+
max: 50,
|
|
452
|
+
step: 1,
|
|
453
|
+
value: edited.offsetX ?? 0,
|
|
454
|
+
onChange: (e) => update(edited.id, { offsetX: Number(e.target.value) || void 0 })
|
|
455
|
+
}
|
|
456
|
+
),
|
|
457
|
+
/* @__PURE__ */ jsxs("output", { children: [
|
|
458
|
+
edited.offsetX ?? 0,
|
|
459
|
+
"%"
|
|
460
|
+
] })
|
|
461
|
+
] }),
|
|
462
|
+
/* @__PURE__ */ jsxs("label", { className: "nice-icon-stacker__field", children: [
|
|
463
|
+
/* @__PURE__ */ jsx("span", { children: t("iconStacker.offsetY", "Shift down") }),
|
|
464
|
+
/* @__PURE__ */ jsx(
|
|
465
|
+
"input",
|
|
466
|
+
{
|
|
467
|
+
type: "range",
|
|
468
|
+
min: -50,
|
|
469
|
+
max: 50,
|
|
470
|
+
step: 1,
|
|
471
|
+
value: edited.offsetY ?? 0,
|
|
472
|
+
onChange: (e) => update(edited.id, { offsetY: Number(e.target.value) || void 0 })
|
|
473
|
+
}
|
|
474
|
+
),
|
|
475
|
+
/* @__PURE__ */ jsxs("output", { children: [
|
|
476
|
+
edited.offsetY ?? 0,
|
|
477
|
+
"%"
|
|
478
|
+
] })
|
|
479
|
+
] })
|
|
480
|
+
] }),
|
|
481
|
+
/* @__PURE__ */ jsxs("div", { className: "nice-icon-stacker__swatches", children: [
|
|
482
|
+
/* @__PURE__ */ jsx(
|
|
483
|
+
Swatch,
|
|
484
|
+
{
|
|
485
|
+
label: t("iconStacker.primary", "Primary"),
|
|
486
|
+
value: edited.primaryColor,
|
|
487
|
+
onChange: (v) => update(edited.id, { primaryColor: v }),
|
|
488
|
+
autoLabel,
|
|
489
|
+
resetLabel
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
/* @__PURE__ */ jsx(
|
|
493
|
+
Swatch,
|
|
494
|
+
{
|
|
495
|
+
label: t("iconStacker.secondary", "Secondary"),
|
|
496
|
+
value: edited.secondaryColor,
|
|
497
|
+
onChange: (v) => update(edited.id, { secondaryColor: v }),
|
|
498
|
+
autoLabel,
|
|
499
|
+
resetLabel
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ jsx(
|
|
503
|
+
Swatch,
|
|
504
|
+
{
|
|
505
|
+
label: t("iconStacker.accent", "Accent"),
|
|
506
|
+
value: edited.accentColor,
|
|
507
|
+
onChange: (v) => update(edited.id, { accentColor: v }),
|
|
508
|
+
autoLabel,
|
|
509
|
+
resetLabel
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
hasText && /* @__PURE__ */ jsx(
|
|
513
|
+
Swatch,
|
|
514
|
+
{
|
|
515
|
+
label: t("iconStacker.textColor", "Text colour"),
|
|
516
|
+
value: edited.textColor,
|
|
517
|
+
onChange: (v) => update(edited.id, { textColor: v }),
|
|
518
|
+
autoLabel,
|
|
519
|
+
resetLabel
|
|
520
|
+
}
|
|
521
|
+
)
|
|
522
|
+
] }),
|
|
523
|
+
hasText && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
524
|
+
/* @__PURE__ */ jsxs("label", { className: "nice-icon-stacker__field", children: [
|
|
525
|
+
/* @__PURE__ */ jsx("span", { children: t("iconStacker.textSize", "Text size") }),
|
|
526
|
+
/* @__PURE__ */ jsx(
|
|
527
|
+
"input",
|
|
528
|
+
{
|
|
529
|
+
type: "range",
|
|
530
|
+
min: 3,
|
|
531
|
+
max: 14,
|
|
532
|
+
step: 0.5,
|
|
533
|
+
value: textSize,
|
|
534
|
+
onChange: (e) => update(edited.id, { textSize: Number(e.target.value) })
|
|
535
|
+
}
|
|
536
|
+
),
|
|
537
|
+
/* @__PURE__ */ jsx("output", { children: textSize }),
|
|
538
|
+
edited.textSize !== void 0 && /* @__PURE__ */ jsx(
|
|
539
|
+
"button",
|
|
540
|
+
{
|
|
541
|
+
type: "button",
|
|
542
|
+
className: "nice-icon-stacker__reset",
|
|
543
|
+
onClick: () => update(edited.id, { textSize: void 0 }),
|
|
544
|
+
"aria-label": `${resetLabel}: ${t("iconStacker.textSize", "Text size")}`,
|
|
545
|
+
title: resetLabel,
|
|
546
|
+
children: /* @__PURE__ */ jsx(NtdClose, { size: 10 })
|
|
547
|
+
}
|
|
548
|
+
)
|
|
549
|
+
] }),
|
|
550
|
+
/* @__PURE__ */ jsxs("label", { className: "nice-icon-stacker__field", children: [
|
|
551
|
+
/* @__PURE__ */ jsx("span", { children: t("iconStacker.bind", "Bind to") }),
|
|
552
|
+
/* @__PURE__ */ jsx(
|
|
553
|
+
"input",
|
|
554
|
+
{
|
|
555
|
+
type: "text",
|
|
556
|
+
value: edited.textBinding ?? "",
|
|
557
|
+
"aria-invalid": bindingInvalid || void 0,
|
|
558
|
+
title: t(
|
|
559
|
+
"iconStacker.bindHint",
|
|
560
|
+
"The name of the value the text shows, e.g. count — the text above is a sample"
|
|
561
|
+
),
|
|
562
|
+
onChange: (e) => update(edited.id, { textBinding: e.target.value.trim() || void 0 })
|
|
563
|
+
}
|
|
564
|
+
)
|
|
565
|
+
] })
|
|
566
|
+
] })
|
|
567
|
+
] })
|
|
568
|
+
] })
|
|
569
|
+
]
|
|
570
|
+
}
|
|
571
|
+
),
|
|
572
|
+
showCode && /* @__PURE__ */ jsxs("details", { className: "nice-icon-stacker__code", children: [
|
|
573
|
+
/* @__PURE__ */ jsx("summary", { children: t("iconStacker.code", "JSX code") }),
|
|
574
|
+
/* @__PURE__ */ jsx("pre", { children: code }),
|
|
575
|
+
/* @__PURE__ */ jsxs("button", { type: "button", onClick: copy, children: [
|
|
576
|
+
copied ? /* @__PURE__ */ jsx(NtdCheck, { size: 14 }) : /* @__PURE__ */ jsx(NtdCopy, { size: 14 }),
|
|
577
|
+
" ",
|
|
578
|
+
copied ? t("iconStacker.copied", "Copied") : t("iconStacker.copy", "Copy the code")
|
|
579
|
+
] })
|
|
580
|
+
] })
|
|
581
|
+
] })
|
|
582
|
+
] });
|
|
583
|
+
}
|
|
584
|
+
);
|
|
585
|
+
if (process.env.NODE_ENV !== "production") {
|
|
586
|
+
NiceIconStacker.displayName = "NiceIconStacker";
|
|
210
587
|
}
|
|
211
|
-
|
|
212
|
-
|
|
588
|
+
export {
|
|
589
|
+
NiceIconStacker,
|
|
590
|
+
niceIconStackCode
|
|
591
|
+
};
|