@yakit-libs/yakit-ui-icons 0.1.3 → 0.2.1
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 +47 -5
- package/dist/IconBase.d.ts +9 -0
- package/dist/browser/colorful/index.js +2 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/outline/index.js +2 -0
- package/dist/browser/registry.js +2 -0
- package/dist/browser/solid/index.js +2 -0
- package/dist/colorful/catalog.d.ts +2379 -0
- package/dist/colorful/index.d.ts +297 -0
- package/dist/colorful/index.js +300 -0
- package/dist/colorful/types.d.ts +4 -0
- package/dist/createIcon-CNgBwNTZ.js +70 -0
- package/dist/createIcon.d.ts +4 -3
- package/dist/figmaNameCatalog.d.ts +915 -771
- package/dist/icon.css +29 -0
- package/dist/index-BNKEE7u2.js +962 -0
- package/dist/index-BxhwHLct.js +1864 -0
- package/dist/{index-C7cW06K3.js → index-DdgxZZCf.js} +413 -425
- package/dist/index.d.ts +3 -1
- package/dist/index.js +944 -632
- package/dist/loading/index.d.ts +4 -3
- package/dist/outline/index.d.ts +351 -346
- package/dist/outline/index.js +319 -311
- package/dist/registry.d.ts +19 -10
- package/dist/registry.js +3028 -295
- package/dist/solid/index.d.ts +256 -255
- package/dist/solid/index.js +257 -257
- package/dist/types.d.ts +14 -4
- package/package.json +20 -2
- package/dist/createIcon-DLie83v6.js +0 -21
- package/dist/index-DXCBgsiK.js +0 -940
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
const b = /* @__PURE__ */ new Set([
|
|
4
|
+
"children",
|
|
5
|
+
"dangerouslysetinnerhtml",
|
|
6
|
+
"focusable",
|
|
7
|
+
"ref",
|
|
8
|
+
"role",
|
|
9
|
+
"tabindex"
|
|
10
|
+
]);
|
|
11
|
+
function g(e) {
|
|
12
|
+
const n = e.toLowerCase();
|
|
13
|
+
return b.has(n) || n.startsWith("aria-") || n.startsWith("on");
|
|
14
|
+
}
|
|
15
|
+
function I(e) {
|
|
16
|
+
if (!e) return {};
|
|
17
|
+
const n = {};
|
|
18
|
+
for (const [t, o] of Object.entries(e))
|
|
19
|
+
if (t.toLowerCase(), !g(t)) {
|
|
20
|
+
n[t] = o;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
return n;
|
|
24
|
+
}
|
|
25
|
+
const S = (...e) => e.filter(Boolean).join(" "), l = d(
|
|
26
|
+
({
|
|
27
|
+
Svg: e,
|
|
28
|
+
className: n,
|
|
29
|
+
color: t,
|
|
30
|
+
defaultColor: o,
|
|
31
|
+
onClick: r,
|
|
32
|
+
role: i = "img",
|
|
33
|
+
size: s,
|
|
34
|
+
style: f,
|
|
35
|
+
svgProps: u,
|
|
36
|
+
tabIndex: m,
|
|
37
|
+
...h
|
|
38
|
+
}, p) => {
|
|
39
|
+
const v = I(u), y = s === void 0 ? void 0 : { height: s, width: s }, c = (t == null ? void 0 : t.trim().toLowerCase()) === "currentcolor", C = {
|
|
40
|
+
"--yakit-icon-default-color": c ? "currentColor" : o,
|
|
41
|
+
...t && !c ? { color: t } : void 0,
|
|
42
|
+
...f
|
|
43
|
+
};
|
|
44
|
+
return /* @__PURE__ */ a(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
...h,
|
|
48
|
+
ref: p,
|
|
49
|
+
role: i,
|
|
50
|
+
tabIndex: m ?? (r ? -1 : void 0),
|
|
51
|
+
className: S("anticon", "yakit-icon", n),
|
|
52
|
+
style: C,
|
|
53
|
+
onClick: r,
|
|
54
|
+
children: /* @__PURE__ */ a(e, { ...y, ...v, "aria-hidden": "true", focusable: "false" })
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
l.displayName = "IconBase";
|
|
60
|
+
const w = "var(--Colors-Use-Neutral-Text-1-Title, #353639)";
|
|
61
|
+
// @__NO_SIDE_EFFECTS__
|
|
62
|
+
function L(e, n, t = w) {
|
|
63
|
+
const o = e, r = d((i, s) => /* @__PURE__ */ a(l, { ...i, ref: s, Svg: o, defaultColor: t }));
|
|
64
|
+
return r.displayName = n, r;
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
w as D,
|
|
68
|
+
l as I,
|
|
69
|
+
L as c
|
|
70
|
+
};
|
package/dist/createIcon.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { IconComponent } from './types.js';
|
|
2
|
+
/** Figma `Colors-Use/Neutral/Text 1-Title`, provided by @yakit-libs/color. */
|
|
3
|
+
export declare const DEFAULT_ICON_COLOR = "var(--Colors-Use-Neutral-Text-1-Title, #353639)";
|
|
3
4
|
/**
|
|
4
5
|
* Turns a Figma-exported SVG into an icon component with an Ant Design-like API.
|
|
5
6
|
*/
|
|
6
|
-
export declare function createIcon(svg: unknown, displayName: string, defaultColor?: string):
|
|
7
|
+
export declare function createIcon(svg: unknown, displayName: string, defaultColor?: string): IconComponent;
|