@caseparts-org/caseblocks 0.0.68 → 0.0.70
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._icon-
|
|
1
|
+
._icon-sm_7uoas_1{--icon-size: var(--font-size-md);--icon-padding: calc(var(--font-size-md) / 4)}._icon-md_7uoas_5{--icon-size: var(--font-size-2xl);--icon-padding: calc(var(--font-size-md) / 4)}._icon-lg_7uoas_9{--icon-size: var(--font-size-3xl);--icon-padding: calc(var(--font-size-lg) / 4)}._wrapper_7uoas_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_7uoas_15>i,._wrapper_7uoas_15>svg{font-size:var(--icon-size);width:100%;height:100%;max-width:100%;max-height:100%}._iconColor-inherit_7uoas_37{color:inherit}._iconColor-default_7uoas_38{color:var(--icons-icon-default)}._iconColor-default-inverted_7uoas_39{color:var(--icons-icon-invert)}._iconColor-secondary_7uoas_40{color:var(--icons-icon-secondary)}._iconColor-warning_7uoas_41{color:var(--icons-icon-warning)}._iconColor-error-warning_7uoas_42{color:var(--icons-icon-error-warning)}._iconColor-success_7uoas_43{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 = "inherit" | "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,40 +1,42 @@
|
|
|
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-
|
|
10
|
-
"iconColor-
|
|
11
|
-
"iconColor-
|
|
12
|
-
"iconColor-
|
|
13
|
-
"iconColor-
|
|
3
|
+
import { getHideAtStyles as l } from "../HideAt.js";
|
|
4
|
+
import '../../assets/Icon.css';const t = "_wrapper_7uoas_15", o = {
|
|
5
|
+
"icon-sm": "_icon-sm_7uoas_1",
|
|
6
|
+
"icon-md": "_icon-md_7uoas_5",
|
|
7
|
+
"icon-lg": "_icon-lg_7uoas_9",
|
|
8
|
+
wrapper: t,
|
|
9
|
+
"iconColor-inherit": "_iconColor-inherit_7uoas_37",
|
|
10
|
+
"iconColor-default": "_iconColor-default_7uoas_38",
|
|
11
|
+
"iconColor-default-inverted": "_iconColor-default-inverted_7uoas_39",
|
|
12
|
+
"iconColor-secondary": "_iconColor-secondary_7uoas_40",
|
|
13
|
+
"iconColor-warning": "_iconColor-warning_7uoas_41",
|
|
14
|
+
"iconColor-error-warning": "_iconColor-error-warning_7uoas_42",
|
|
15
|
+
"iconColor-success": "_iconColor-success_7uoas_43"
|
|
14
16
|
};
|
|
15
|
-
function
|
|
16
|
-
iconKey:
|
|
17
|
-
size:
|
|
18
|
-
hideAt:
|
|
19
|
-
className:
|
|
20
|
-
colorToken:
|
|
21
|
-
...
|
|
17
|
+
function m({
|
|
18
|
+
iconKey: i,
|
|
19
|
+
size: c = "md",
|
|
20
|
+
hideAt: s,
|
|
21
|
+
className: a,
|
|
22
|
+
colorToken: _ = "inherit",
|
|
23
|
+
...e
|
|
22
24
|
}) {
|
|
23
25
|
return /* @__PURE__ */ r(
|
|
24
26
|
"span",
|
|
25
27
|
{
|
|
26
28
|
className: n(
|
|
27
29
|
o.wrapper,
|
|
28
|
-
o[`icon-${
|
|
29
|
-
o[`iconColor-${
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
o[`icon-${c}`],
|
|
31
|
+
o[`iconColor-${_}`],
|
|
32
|
+
l(s),
|
|
33
|
+
a
|
|
32
34
|
),
|
|
33
|
-
...
|
|
34
|
-
children: /* @__PURE__ */ r("i", { className: n(
|
|
35
|
+
...e,
|
|
36
|
+
children: /* @__PURE__ */ r("i", { className: n(i), "aria-hidden": "true" })
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
m as Icon
|
|
40
42
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as
|
|
2
|
+
import { useEffect as s, createElement as c } from "react";
|
|
3
3
|
import { Icon as l } from "./Icon.js";
|
|
4
|
-
const
|
|
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
13
|
component: l,
|
|
14
14
|
parameters: { layout: "centered" },
|
|
@@ -16,7 +16,7 @@ const f = [
|
|
|
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: ["inherit", "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, i;
|
|
41
41
|
try {
|
|
42
|
-
(
|
|
42
|
+
(i = (n = (o = window == null ? void 0 : window.FontAwesome) == null ? void 0 : o.dom) == null ? void 0 : n.i2svg) == null || i.call(n);
|
|
43
43
|
} catch {
|
|
44
44
|
console.log();
|
|
45
45
|
}
|
|
46
|
-
}, [t]), /* @__PURE__ */
|
|
46
|
+
}, [t]), /* @__PURE__ */ r("div", { style: { backgroundColor: e.colorToken === "default-inverted" ? "#444" : "white" }, children: /* @__PURE__ */ c(
|
|
47
47
|
l,
|
|
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
|
+
}, h = {
|
|
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",
|
|
@@ -74,8 +75,8 @@ const f = [
|
|
|
74
75
|
)) })
|
|
75
76
|
};
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
h as Colors,
|
|
79
|
+
y as Default,
|
|
80
|
+
g as Sizes,
|
|
81
|
+
u as default
|
|
81
82
|
};
|
|
@@ -42,7 +42,7 @@ function N({
|
|
|
42
42
|
flexDirection: "row",
|
|
43
43
|
alignItems: "center",
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */ e("button", { className: t.button, type: "submit", children: /* @__PURE__ */ e(f, { iconKey: "fa-regular fa-magnifying-glass", size: "
|
|
45
|
+
/* @__PURE__ */ e("button", { className: t.button, type: "submit", children: /* @__PURE__ */ e(f, { iconKey: "fa-regular fa-magnifying-glass", size: "md" }) }),
|
|
46
46
|
/* @__PURE__ */ e(
|
|
47
47
|
"input",
|
|
48
48
|
{
|