@caseparts-org/caseblocks 0.0.68 → 0.0.69
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/dist/assets/Icon.css +1 -1
- package/dist/atoms/Icon/Icon.d.ts +1 -1
- package/dist/atoms/Icon/Icon.js +20 -19
- package/dist/atoms/Icon/Icon.stories.js +19 -18
- package/package.json +1 -1
package/dist/assets/Icon.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._icon-
|
|
1
|
+
._icon-sm_tdofh_1{--icon-size: var(--font-size-md);--icon-padding: calc(var(--font-size-md) / 4)}._icon-md_tdofh_5{--icon-size: var(--font-size-2xl);--icon-padding: calc(var(--font-size-md) / 4)}._icon-lg_tdofh_9{--icon-size: var(--font-size-3xl);--icon-padding: calc(var(--font-size-lg) / 4)}._wrapper_tdofh_15{display:inline-flex;width:var(--icon-size);height:var(--icon-size);aspect-ratio:1 / 1;align-items:center;justify-content:center;line-height:1;padding:var(--icon-padding)}._wrapper_tdofh_15>i,._wrapper_tdofh_15>svg{font-size:var(--icon-size);width:100%;height:100%;max-width:100%;max-height:100%}._iconColor-default_tdofh_37{color:var(--icons-icon-default)}._iconColor-default-inverted_tdofh_38{color:var(--icons-icon-invert)}._iconColor-secondary_tdofh_39{color:var(--icons-icon-secondary)}._iconColor-warning_tdofh_40{color:var(--icons-icon-warning)}._iconColor-error-warning_tdofh_41{color:var(--icons-icon-error-warning)}._iconColor-success_tdofh_42{color:var(--icons-icon-success)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HideAtProps } from '../HideAt';
|
|
2
2
|
type IconSet = "fa-kit" | "fa-solid" | "fa-regular" | "fa-light" | "fa-thin" | "fa-brands";
|
|
3
3
|
type IconVariant = "fa-sharp" | "fa-duotone" | "fa-sharp-duotone";
|
|
4
|
-
type IconColorToken = "default" | "secondary" | "warning" | "error-warning" | "success";
|
|
4
|
+
type IconColorToken = "default" | "default-inverted" | "secondary" | "warning" | "error-warning" | "success";
|
|
5
5
|
interface IconProps extends React.HTMLAttributes<HTMLSpanElement>, HideAtProps {
|
|
6
6
|
iconKey: `${IconSet} ${string}` | `${IconVariant} ${IconSet} ${string}`;
|
|
7
7
|
size?: "sm" | "md" | "lg";
|
package/dist/atoms/Icon/Icon.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { getHideAtStyles as
|
|
4
|
-
import '../../assets/Icon.css';const
|
|
5
|
-
"icon-sm": "_icon-
|
|
6
|
-
"icon-md": "_icon-
|
|
7
|
-
"icon-lg": "_icon-
|
|
8
|
-
wrapper:
|
|
9
|
-
"iconColor-default": "_iconColor-
|
|
10
|
-
"iconColor-
|
|
11
|
-
"iconColor-
|
|
12
|
-
"iconColor-
|
|
13
|
-
"iconColor-
|
|
3
|
+
import { getHideAtStyles as l } from "../HideAt.js";
|
|
4
|
+
import '../../assets/Icon.css';const a = "_wrapper_tdofh_15", o = {
|
|
5
|
+
"icon-sm": "_icon-sm_tdofh_1",
|
|
6
|
+
"icon-md": "_icon-md_tdofh_5",
|
|
7
|
+
"icon-lg": "_icon-lg_tdofh_9",
|
|
8
|
+
wrapper: a,
|
|
9
|
+
"iconColor-default": "_iconColor-default_tdofh_37",
|
|
10
|
+
"iconColor-default-inverted": "_iconColor-default-inverted_tdofh_38",
|
|
11
|
+
"iconColor-secondary": "_iconColor-secondary_tdofh_39",
|
|
12
|
+
"iconColor-warning": "_iconColor-warning_tdofh_40",
|
|
13
|
+
"iconColor-error-warning": "_iconColor-error-warning_tdofh_41",
|
|
14
|
+
"iconColor-success": "_iconColor-success_tdofh_42"
|
|
14
15
|
};
|
|
15
16
|
function p({
|
|
16
17
|
iconKey: c,
|
|
17
18
|
size: i = "md",
|
|
18
|
-
hideAt:
|
|
19
|
-
className:
|
|
20
|
-
colorToken:
|
|
21
|
-
...
|
|
19
|
+
hideAt: e,
|
|
20
|
+
className: t,
|
|
21
|
+
colorToken: _ = "default",
|
|
22
|
+
...d
|
|
22
23
|
}) {
|
|
23
24
|
return /* @__PURE__ */ r(
|
|
24
25
|
"span",
|
|
@@ -26,11 +27,11 @@ function p({
|
|
|
26
27
|
className: n(
|
|
27
28
|
o.wrapper,
|
|
28
29
|
o[`icon-${i}`],
|
|
29
|
-
o[`iconColor-${
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
o[`iconColor-${_}`],
|
|
31
|
+
l(e),
|
|
32
|
+
t
|
|
32
33
|
),
|
|
33
|
-
...
|
|
34
|
+
...d,
|
|
34
35
|
children: /* @__PURE__ */ r("i", { className: n(c), "aria-hidden": "true" })
|
|
35
36
|
}
|
|
36
37
|
);
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { Icon as
|
|
4
|
-
const
|
|
2
|
+
import { useEffect as s, createElement as c } from "react";
|
|
3
|
+
import { Icon as i } from "./Icon.js";
|
|
4
|
+
const d = [
|
|
5
5
|
"fa-kit fa-chat",
|
|
6
6
|
"fa-solid fa-user",
|
|
7
7
|
"fa-regular fa-bell",
|
|
8
8
|
"fa-solid fa-gear",
|
|
9
9
|
"fa-solid fa-circle-info",
|
|
10
10
|
"fa-solid fa-triangle-exclamation"
|
|
11
|
-
],
|
|
11
|
+
], u = {
|
|
12
12
|
title: "Case Parts/Atoms/Icon",
|
|
13
|
-
component:
|
|
13
|
+
component: i,
|
|
14
14
|
parameters: { layout: "centered" },
|
|
15
15
|
tags: ["autodocs"],
|
|
16
16
|
argTypes: {
|
|
17
17
|
iconKey: {
|
|
18
18
|
control: { type: "select" },
|
|
19
|
-
options:
|
|
19
|
+
options: d
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
22
|
control: { type: "radio" },
|
|
@@ -25,7 +25,7 @@ const f = [
|
|
|
25
25
|
colorToken: {
|
|
26
26
|
name: "color",
|
|
27
27
|
control: { type: "select" },
|
|
28
|
-
options: ["default", "secondary", "warning", "error-warning", "success"]
|
|
28
|
+
options: ["default", "default-inverted", "secondary", "warning", "error-warning", "success"]
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
args: {
|
|
@@ -36,28 +36,29 @@ const f = [
|
|
|
36
36
|
}
|
|
37
37
|
}, a = (e) => {
|
|
38
38
|
const { iconKey: t } = e;
|
|
39
|
-
return
|
|
40
|
-
var o, n,
|
|
39
|
+
return s(() => {
|
|
40
|
+
var o, n, l;
|
|
41
41
|
try {
|
|
42
|
-
(
|
|
42
|
+
(l = (n = (o = window == null ? void 0 : window.FontAwesome) == null ? void 0 : o.dom) == null ? void 0 : n.i2svg) == null || l.call(n);
|
|
43
43
|
} catch {
|
|
44
44
|
console.log();
|
|
45
45
|
}
|
|
46
|
-
}, [t]), /* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
}, [t]), /* @__PURE__ */ r("div", { style: { backgroundColor: e.colorToken === "default-inverted" ? "#444" : "white" }, children: /* @__PURE__ */ c(
|
|
47
|
+
i,
|
|
48
48
|
{
|
|
49
49
|
...e,
|
|
50
50
|
key: `${t}-${e.size}-${e.colorToken}`
|
|
51
51
|
}
|
|
52
|
-
);
|
|
53
|
-
},
|
|
52
|
+
) });
|
|
53
|
+
}, y = {
|
|
54
54
|
render: (e) => /* @__PURE__ */ r(a, { ...e })
|
|
55
|
-
},
|
|
55
|
+
}, g = {
|
|
56
56
|
render: (e) => /* @__PURE__ */ r("div", { style: { display: "flex", gap: "0.75rem", alignItems: "center" }, children: ["sm", "md", "lg"].map((t) => /* @__PURE__ */ r(a, { ...e, size: t }, t)) })
|
|
57
57
|
}, k = {
|
|
58
58
|
args: { iconKey: "fa-solid fa-circle-info" },
|
|
59
59
|
render: (e) => /* @__PURE__ */ r("div", { style: { display: "flex", gap: "1rem", alignItems: "center" }, children: [
|
|
60
60
|
"default",
|
|
61
|
+
"default-inverted",
|
|
61
62
|
"secondary",
|
|
62
63
|
"warning",
|
|
63
64
|
"error-warning",
|
|
@@ -75,7 +76,7 @@ const f = [
|
|
|
75
76
|
};
|
|
76
77
|
export {
|
|
77
78
|
k as Colors,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
y as Default,
|
|
80
|
+
g as Sizes,
|
|
81
|
+
u as default
|
|
81
82
|
};
|