@bccampus/ui-components 0.1.0 → 0.2.0
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/banner.d.ts +16 -0
- package/dist/banner.js +42 -0
- package/dist/button.d.ts +5 -4
- package/dist/button.js +20 -14
- package/dist/caption.js +9 -8
- package/dist/card.d.ts +15 -9
- package/dist/card.js +62 -84
- package/dist/createLucideIcon-CzehbSja.js +94 -0
- package/dist/horizontal-list.d.ts +9 -2
- package/dist/horizontal-list.js +47 -115
- package/dist/icon-generator.d.ts +2 -1
- package/dist/icon-generator.js +180 -147
- package/dist/index-CQhYMnjT.js +34 -0
- package/dist/index-DlfV3JTY.js +70 -0
- package/dist/input.d.ts +7 -0
- package/dist/input.js +18 -0
- package/dist/masked-image-generator.d.ts +1 -0
- package/dist/overlay.d.ts +13 -0
- package/dist/overlay.js +27 -0
- package/dist/page-header.d.ts +5 -0
- package/dist/page-header.js +943 -0
- package/dist/page-section.d.ts +14 -0
- package/dist/page-section.js +31 -0
- package/dist/page.d.ts +7 -0
- package/dist/page.js +8 -0
- package/dist/search-input.d.ts +7 -0
- package/dist/search-input.js +23 -0
- package/dist/tag.d.ts +2 -2
- package/dist/tag.js +10 -9
- package/dist/ui-components.d.ts +84 -29
- package/dist/ui-components.js +42 -27
- package/package.json +44 -15
- package/src/assets/images/image_06.jpg +0 -0
- package/src/components/ui/banner.tsx +48 -0
- package/src/components/ui/button.tsx +52 -47
- package/src/components/ui/card.tsx +131 -147
- package/src/components/ui/horizontal-list.tsx +75 -50
- package/src/components/ui/icon-generator/generate-tiles.tsx +243 -243
- package/src/components/ui/icon-generator/icon-generator.tsx +84 -51
- package/src/components/ui/icon-generator/masked-image-generator.tsx +38 -38
- package/src/components/ui/icon-generator/types.ts +53 -52
- package/src/components/ui/index.ts +11 -4
- package/src/components/ui/input.tsx +17 -0
- package/src/components/ui/overlay.tsx +29 -0
- package/src/components/ui/page-header.tsx +16 -0
- package/src/components/ui/page-section.tsx +33 -0
- package/src/components/ui/page.tsx +9 -0
- package/src/components/ui/search-input.tsx +16 -0
- package/src/components/ui/tag.tsx +39 -39
- package/src/components/ui/typography/caption.tsx +32 -32
- package/src/styles/all.css +4 -4
- package/src/styles/colors.css +9 -10
- package/src/styles/index.css +7 -7
- package/src/styles/theme.css +56 -2
- package/src/styles/typography.css +480 -479
- package/tsconfig.app.json +37 -37
- package/vite.config.ts +51 -44
- package/dist/@bccampus-ui-components-0.1.0.tgz +0 -0
- package/dist/index-DcqAdr0d.js +0 -102
- package/dist/mockServiceWorker.js +0 -348
- package/public/mockServiceWorker.js +0 -348
- package/src/assets/images/bg_pattern_01.png +0 -0
- package/src/assets/images/bg_pattern_02.png +0 -0
- package/src/assets/images/bg_pattern_03.png +0 -0
- package/src/assets/images/bg_pattern_04.png +0 -0
package/dist/horizontal-list.js
CHANGED
|
@@ -1,145 +1,77 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Button as
|
|
4
|
-
import {
|
|
1
|
+
import { j as o } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { c as n } from "./utils-CRiPKpXj.js";
|
|
3
|
+
import { Button as r } from "./button.js";
|
|
4
|
+
import { useRef as p, useCallback as c } from "react";
|
|
5
|
+
import { c as d } from "./index-CQhYMnjT.js";
|
|
6
|
+
import { c as a } from "./createLucideIcon-CzehbSja.js";
|
|
5
7
|
/**
|
|
6
8
|
* @license lucide-react v0.544.0 - ISC
|
|
7
9
|
*
|
|
8
10
|
* This source code is licensed under the ISC license.
|
|
9
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
12
|
*/
|
|
11
|
-
const
|
|
12
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
13
|
-
(e, o, r) => r ? r.toUpperCase() : o.toLowerCase()
|
|
14
|
-
), p = (t) => {
|
|
15
|
-
const e = y(t);
|
|
16
|
-
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
17
|
-
}, h = (...t) => t.filter((e, o, r) => !!e && e.trim() !== "" && r.indexOf(e) === o).join(" ").trim(), k = (t) => {
|
|
18
|
-
for (const e in t)
|
|
19
|
-
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
20
|
-
return !0;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @license lucide-react v0.544.0 - ISC
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the ISC license.
|
|
26
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/
|
|
28
|
-
var N = {
|
|
29
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
-
width: 24,
|
|
31
|
-
height: 24,
|
|
32
|
-
viewBox: "0 0 24 24",
|
|
33
|
-
fill: "none",
|
|
34
|
-
stroke: "currentColor",
|
|
35
|
-
strokeWidth: 2,
|
|
36
|
-
strokeLinecap: "round",
|
|
37
|
-
strokeLinejoin: "round"
|
|
38
|
-
};
|
|
13
|
+
const u = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], v = a("chevron-left", u);
|
|
39
14
|
/**
|
|
40
15
|
* @license lucide-react v0.544.0 - ISC
|
|
41
16
|
*
|
|
42
17
|
* This source code is licensed under the ISC license.
|
|
43
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
19
|
*/
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
iconNode: c,
|
|
54
|
-
...i
|
|
55
|
-
}, C) => l(
|
|
56
|
-
"svg",
|
|
57
|
-
{
|
|
58
|
-
ref: C,
|
|
59
|
-
...N,
|
|
60
|
-
width: e,
|
|
61
|
-
height: e,
|
|
62
|
-
stroke: t,
|
|
63
|
-
strokeWidth: r ? Number(o) * 24 / Number(e) : o,
|
|
64
|
-
className: h("lucide", n),
|
|
65
|
-
...!s && !k(i) && { "aria-hidden": "true" },
|
|
66
|
-
...i
|
|
20
|
+
const j = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], g = a("chevron-right", j), w = d(
|
|
21
|
+
"scrollbar-hidden overscroll-x-contain flex flex-row flex-nowrap py-1 gap-card overflow-x-auto snap-x snap-mandatory touch-pan-x scroll-smooth *:shrink-0 *:grow-0 *:snap-center *:select-none",
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
variant: {
|
|
25
|
+
contain: "w-full ",
|
|
26
|
+
overflow: "w-screen px-section -ms-section scroll-px-(--section-p)"
|
|
27
|
+
}
|
|
67
28
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "contain"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
73
33
|
);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
r
|
|
89
|
-
),
|
|
90
|
-
...n
|
|
91
|
-
})
|
|
92
|
-
);
|
|
93
|
-
return o.displayName = p(t), o;
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* @license lucide-react v0.544.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/
|
|
101
|
-
const A = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], L = x("chevron-left", A);
|
|
102
|
-
/**
|
|
103
|
-
* @license lucide-react v0.544.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/
|
|
108
|
-
const R = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], B = x("chevron-right", R);
|
|
109
|
-
function I({ className: t, children: e, toolbarLocation: o = "bottom", ...r }) {
|
|
110
|
-
const n = v(null), s = f(() => {
|
|
111
|
-
n.current?.scrollBy({ left: -320 });
|
|
112
|
-
}, []), c = f(() => {
|
|
113
|
-
n.current?.scrollBy({ left: 320 });
|
|
114
|
-
}, []);
|
|
115
|
-
return /* @__PURE__ */ a.jsxs(
|
|
34
|
+
function L({
|
|
35
|
+
variant: i,
|
|
36
|
+
className: l,
|
|
37
|
+
children: f,
|
|
38
|
+
toolbarLocation: t = "bottom",
|
|
39
|
+
scrollBy: e = 360,
|
|
40
|
+
...m
|
|
41
|
+
}) {
|
|
42
|
+
const s = p(null), x = c(() => {
|
|
43
|
+
s.current?.scrollBy({ left: -e });
|
|
44
|
+
}, [e]), h = c(() => {
|
|
45
|
+
s.current?.scrollBy({ left: e });
|
|
46
|
+
}, [e]);
|
|
47
|
+
return /* @__PURE__ */ o.jsxs(
|
|
116
48
|
"div",
|
|
117
49
|
{
|
|
118
|
-
className:
|
|
119
|
-
"flex-col":
|
|
120
|
-
"flex-col-reverse":
|
|
50
|
+
className: n("flex gap-4", {
|
|
51
|
+
"flex-col": t === "bottom",
|
|
52
|
+
"flex-col-reverse": t === "top"
|
|
121
53
|
}),
|
|
122
54
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ o.jsx(
|
|
124
56
|
"div",
|
|
125
57
|
{
|
|
126
|
-
ref:
|
|
127
|
-
className:
|
|
128
|
-
|
|
129
|
-
|
|
58
|
+
ref: s,
|
|
59
|
+
className: n(
|
|
60
|
+
w({ variant: i }),
|
|
61
|
+
l
|
|
130
62
|
),
|
|
131
|
-
...
|
|
132
|
-
children:
|
|
63
|
+
...m,
|
|
64
|
+
children: f
|
|
133
65
|
}
|
|
134
66
|
),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ o.jsxs("div", { className: "flex justify-center sm:justify-start", children: [
|
|
68
|
+
/* @__PURE__ */ o.jsx(r, { size: "icon", variant: "ghost", className: "rounded-full", onClick: x, children: /* @__PURE__ */ o.jsx(v, { className: "size-9" }) }),
|
|
69
|
+
/* @__PURE__ */ o.jsx(r, { size: "icon", variant: "ghost", className: "rounded-full", onClick: h, children: /* @__PURE__ */ o.jsx(g, { className: "size-9" }) })
|
|
138
70
|
] })
|
|
139
71
|
]
|
|
140
72
|
}
|
|
141
73
|
);
|
|
142
74
|
}
|
|
143
75
|
export {
|
|
144
|
-
|
|
76
|
+
L as HorizontalList
|
|
145
77
|
};
|
package/dist/icon-generator.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
export declare function IconGenerator({ pattern, tileSize, tileClassName, tileBgClassName, renderChildren, ...props }: IconGeneratorProps): JSX_2.Element;
|
|
4
|
+
export declare function IconGenerator({ pattern, tileSize, tileClassName, tileBgClassName, renderChildren, fit, ...props }: IconGeneratorProps): JSX_2.Element;
|
|
5
5
|
|
|
6
6
|
declare interface IconGeneratorProps extends Omit<React.ComponentProps<"svg">, "children" | "width" | "height" | "overflow"> {
|
|
7
7
|
pattern?: (TileShape | TileConfig)[][];
|
|
8
8
|
tileSize?: number;
|
|
9
9
|
tileClassName?: string;
|
|
10
10
|
tileBgClassName?: string;
|
|
11
|
+
fit?: "none" | "fill" | "width" | "height";
|
|
11
12
|
renderChildren?: (paths: (JSX.Element | null)[], width: number, height: number) => React.ReactNode;
|
|
12
13
|
}
|
|
13
14
|
|
package/dist/icon-generator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as h } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
2
|
+
import { useMemo as M } from "react";
|
|
3
|
+
import { c as d } from "./utils-CRiPKpXj.js";
|
|
4
|
+
const $ = {
|
|
5
5
|
Blank: 0,
|
|
6
6
|
Rand: 1,
|
|
7
7
|
Mosaic: 2,
|
|
@@ -27,244 +27,277 @@ const r = {
|
|
|
27
27
|
PieNW: 23,
|
|
28
28
|
PieNE: 24,
|
|
29
29
|
PieRand: 25
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
}, k = [
|
|
31
|
+
$.Square,
|
|
32
|
+
$.Circle,
|
|
33
|
+
$.Diamond,
|
|
34
|
+
$.Hexagon,
|
|
35
|
+
$.TriangleSE,
|
|
36
|
+
$.TriangleSW,
|
|
37
|
+
$.TriangleNW,
|
|
38
|
+
$.TriangleNE,
|
|
39
|
+
$.PieSE,
|
|
40
|
+
$.PieSW,
|
|
41
|
+
$.PieNW,
|
|
42
|
+
$.PieNE
|
|
43
43
|
], N = {
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
44
|
+
[$.Blank]: () => null,
|
|
45
|
+
[$.Rand]: (c, r, a, s) => N[k[Math.floor(Math.random() * k.length)]](c, r, a, s),
|
|
46
|
+
[$.Mosaic]: (c, r, a, s) => N[Math.random() > 0.8 ? $.Blank : $.Square](c, r, a, s),
|
|
47
|
+
[$.MosaicCircle]: (c, r, a, s) => N[Math.random() > 0.8 ? $.Blank : $.Circle](c, r, a, s),
|
|
48
|
+
[$.MosaicDiamond]: (c, r, a, s) => N[Math.random() > 0.8 ? $.Blank : $.Diamond](c, r, a, s),
|
|
49
|
+
[$.Square]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
50
50
|
"rect",
|
|
51
51
|
{
|
|
52
52
|
x: a * c,
|
|
53
|
-
y: a *
|
|
53
|
+
y: a * r,
|
|
54
54
|
width: a * s.scale,
|
|
55
55
|
height: a * s.scale,
|
|
56
|
-
className:
|
|
56
|
+
className: d("fill-current stroke-none", s?.className)
|
|
57
57
|
},
|
|
58
|
-
`tile-${c}-${
|
|
58
|
+
`tile-${c}-${r}`
|
|
59
59
|
),
|
|
60
|
-
[
|
|
60
|
+
[$.Circle]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
61
61
|
"circle",
|
|
62
62
|
{
|
|
63
63
|
cx: a * (c + 0.5 * s.scale),
|
|
64
|
-
cy: a * (
|
|
64
|
+
cy: a * (r + 0.5 * s.scale),
|
|
65
65
|
r: a / 2 * s.scale,
|
|
66
|
-
className:
|
|
66
|
+
className: d("fill-current stroke-none", s?.className)
|
|
67
67
|
},
|
|
68
|
-
`tile-${c}-${
|
|
68
|
+
`tile-${c}-${r}`
|
|
69
69
|
),
|
|
70
|
-
[
|
|
70
|
+
[$.Diamond]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
71
71
|
"path",
|
|
72
72
|
{
|
|
73
|
-
d: `M ${a * (c + 0.5 * s.scale)} ${a *
|
|
74
|
-
L ${a * (c + s.scale)} ${a * (
|
|
75
|
-
L ${a * (c + 0.5 * s.scale)} ${a * (
|
|
76
|
-
L ${a * c} ${a * (
|
|
77
|
-
className:
|
|
73
|
+
d: `M ${a * (c + 0.5 * s.scale)} ${a * r}
|
|
74
|
+
L ${a * (c + s.scale)} ${a * (r + 0.5 * s.scale)}
|
|
75
|
+
L ${a * (c + 0.5 * s.scale)} ${a * (r + s.scale)}
|
|
76
|
+
L ${a * c} ${a * (r + 0.5 * s.scale)} Z`,
|
|
77
|
+
className: d("fill-current stroke-none", s?.className)
|
|
78
78
|
},
|
|
79
|
-
`tile-${c}-${
|
|
79
|
+
`tile-${c}-${r}`
|
|
80
80
|
),
|
|
81
|
-
[
|
|
82
|
-
const
|
|
81
|
+
[$.Hexagon]: (c, r, a, s) => {
|
|
82
|
+
const o = a / Math.sqrt(3), m = (a - o) / 2;
|
|
83
83
|
return /* @__PURE__ */ h.jsx(
|
|
84
84
|
"path",
|
|
85
85
|
{
|
|
86
86
|
rotate: 45,
|
|
87
|
-
d: `M ${a * c + m * s.scale} ${a *
|
|
88
|
-
L ${a * c + (m +
|
|
89
|
-
L ${a * (c + s.scale)} ${a * (
|
|
90
|
-
L ${a * c + (m +
|
|
91
|
-
L ${a * c + m * s.scale} ${a * (
|
|
92
|
-
L ${a * c} ${a * (
|
|
93
|
-
className:
|
|
87
|
+
d: `M ${a * c + m * s.scale} ${a * r}
|
|
88
|
+
L ${a * c + (m + o) * s.scale} ${a * r}
|
|
89
|
+
L ${a * (c + s.scale)} ${a * (r + 0.5 * s.scale)}
|
|
90
|
+
L ${a * c + (m + o) * s.scale} ${a * (r + s.scale)}
|
|
91
|
+
L ${a * c + m * s.scale} ${a * (r + s.scale)}
|
|
92
|
+
L ${a * c} ${a * (r + 0.5 * s.scale)} Z`,
|
|
93
|
+
className: d("fill-current stroke-none", s?.className)
|
|
94
94
|
},
|
|
95
|
-
`tile-${c}-${
|
|
95
|
+
`tile-${c}-${r}`
|
|
96
96
|
);
|
|
97
97
|
},
|
|
98
|
-
[
|
|
99
|
-
[
|
|
98
|
+
[$.RandBasic]: (c, r, a, s) => N[$.Square + Math.floor(Math.random() * 4)](c, r, a, s),
|
|
99
|
+
[$.TriangleSE]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
100
100
|
"path",
|
|
101
101
|
{
|
|
102
|
-
d: `M ${a * (c + s.scale)} ${a *
|
|
103
|
-
L ${a * c} ${a * (
|
|
104
|
-
L ${a * (c + s.scale)} ${a * (
|
|
105
|
-
className:
|
|
102
|
+
d: `M ${a * (c + s.scale)} ${a * r}
|
|
103
|
+
L ${a * c} ${a * (r + s.scale)}
|
|
104
|
+
L ${a * (c + s.scale)} ${a * (r + s.scale)} Z`,
|
|
105
|
+
className: d("fill-current stroke-none", s?.className)
|
|
106
106
|
},
|
|
107
|
-
`tile-${c}-${
|
|
107
|
+
`tile-${c}-${r}`
|
|
108
108
|
),
|
|
109
|
-
[
|
|
109
|
+
[$.TriangleSW]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
110
110
|
"path",
|
|
111
111
|
{
|
|
112
|
-
d: `M ${a * c} ${a *
|
|
113
|
-
L ${a * (c + s.scale)} ${a * (
|
|
114
|
-
L ${a * c} ${a * (
|
|
115
|
-
className:
|
|
112
|
+
d: `M ${a * c} ${a * r}
|
|
113
|
+
L ${a * (c + s.scale)} ${a * (r + s.scale)}
|
|
114
|
+
L ${a * c} ${a * (r + s.scale)} Z`,
|
|
115
|
+
className: d("fill-current stroke-none", s?.className)
|
|
116
116
|
},
|
|
117
|
-
`tile-${c}-${
|
|
117
|
+
`tile-${c}-${r}`
|
|
118
118
|
),
|
|
119
|
-
[
|
|
119
|
+
[$.TriangleNW]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
120
120
|
"path",
|
|
121
121
|
{
|
|
122
|
-
d: `M ${a * (c + s.scale)} ${a *
|
|
123
|
-
L ${a * c} ${a * (
|
|
124
|
-
L ${a * c} ${a *
|
|
125
|
-
className:
|
|
122
|
+
d: `M ${a * (c + s.scale)} ${a * r}
|
|
123
|
+
L ${a * c} ${a * (r + s.scale)}
|
|
124
|
+
L ${a * c} ${a * r} Z`,
|
|
125
|
+
className: d("fill-current stroke-none", s?.className)
|
|
126
126
|
},
|
|
127
|
-
`tile-${c}-${
|
|
127
|
+
`tile-${c}-${r}`
|
|
128
128
|
),
|
|
129
|
-
[
|
|
129
|
+
[$.TriangleNE]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
130
130
|
"path",
|
|
131
131
|
{
|
|
132
|
-
d: `M ${a * c} ${a *
|
|
133
|
-
L ${a * (c + s.scale)} ${a * (
|
|
134
|
-
L ${a * (c + s.scale)} ${a *
|
|
135
|
-
className:
|
|
132
|
+
d: `M ${a * c} ${a * r}
|
|
133
|
+
L ${a * (c + s.scale)} ${a * (r + s.scale)}
|
|
134
|
+
L ${a * (c + s.scale)} ${a * r} Z`,
|
|
135
|
+
className: d("fill-current stroke-none", s?.className)
|
|
136
136
|
},
|
|
137
|
-
`tile-${c}-${
|
|
137
|
+
`tile-${c}-${r}`
|
|
138
138
|
),
|
|
139
|
-
[
|
|
139
|
+
[$.TriangleRand]: (c, r, a, s) => N[$.TriangleSE + Math.floor(Math.random() * 4)](
|
|
140
140
|
c,
|
|
141
|
-
|
|
141
|
+
r,
|
|
142
142
|
a,
|
|
143
143
|
s
|
|
144
144
|
),
|
|
145
|
-
[
|
|
145
|
+
[$.CaretN]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
146
146
|
"path",
|
|
147
147
|
{
|
|
148
|
-
d: `M ${a * c} ${a * (
|
|
149
|
-
L ${a * (c + s.scale)} ${a * (
|
|
150
|
-
L ${a * (c + 0.5 * s.scale)} ${a *
|
|
151
|
-
className:
|
|
148
|
+
d: `M ${a * c} ${a * (r + s.scale)}
|
|
149
|
+
L ${a * (c + s.scale)} ${a * (r + s.scale)}
|
|
150
|
+
L ${a * (c + 0.5 * s.scale)} ${a * r} Z`,
|
|
151
|
+
className: d("fill-current stroke-none", s?.className)
|
|
152
152
|
},
|
|
153
|
-
`tile-${c}-${
|
|
153
|
+
`tile-${c}-${r}`
|
|
154
154
|
),
|
|
155
|
-
[
|
|
155
|
+
[$.CaretE]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
156
156
|
"path",
|
|
157
157
|
{
|
|
158
|
-
d: `M ${a * c} ${a *
|
|
159
|
-
L ${a * (c + s.scale)} ${a * (
|
|
160
|
-
L ${a * c} ${a * (
|
|
161
|
-
className:
|
|
158
|
+
d: `M ${a * c} ${a * r}
|
|
159
|
+
L ${a * (c + s.scale)} ${a * (r + 0.5 * s.scale)}
|
|
160
|
+
L ${a * c} ${a * (r + s.scale)} Z`,
|
|
161
|
+
className: d("fill-current stroke-none", s?.className)
|
|
162
162
|
},
|
|
163
|
-
`tile-${c}-${
|
|
163
|
+
`tile-${c}-${r}`
|
|
164
164
|
),
|
|
165
|
-
[
|
|
165
|
+
[$.CaretS]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
166
166
|
"path",
|
|
167
167
|
{
|
|
168
|
-
d: `M ${a * c} ${a *
|
|
169
|
-
L ${a * (c + s.scale)} ${a *
|
|
170
|
-
L ${a * (c + 0.5 * s.scale)} ${a * (
|
|
171
|
-
className:
|
|
168
|
+
d: `M ${a * c} ${a * r}
|
|
169
|
+
L ${a * (c + s.scale)} ${a * r}
|
|
170
|
+
L ${a * (c + 0.5 * s.scale)} ${a * (r + s.scale)} Z`,
|
|
171
|
+
className: d("fill-current stroke-none", s?.className)
|
|
172
172
|
},
|
|
173
|
-
`tile-${c}-${
|
|
173
|
+
`tile-${c}-${r}`
|
|
174
174
|
),
|
|
175
|
-
[
|
|
175
|
+
[$.CaretW]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
176
176
|
"path",
|
|
177
177
|
{
|
|
178
|
-
d: `M ${a * (c + s.scale)} ${a *
|
|
179
|
-
L ${a * c} ${a * (
|
|
180
|
-
L ${a * (c + s.scale)} ${a * (
|
|
181
|
-
className:
|
|
178
|
+
d: `M ${a * (c + s.scale)} ${a * r}
|
|
179
|
+
L ${a * c} ${a * (r + 0.5 * s.scale)}
|
|
180
|
+
L ${a * (c + s.scale)} ${a * (r + s.scale)} Z`,
|
|
181
|
+
className: d("fill-current stroke-none", s?.className)
|
|
182
182
|
},
|
|
183
|
-
`tile-${c}-${
|
|
183
|
+
`tile-${c}-${r}`
|
|
184
184
|
),
|
|
185
|
-
[
|
|
186
|
-
[
|
|
185
|
+
[$.CaretRand]: (c, r, a, s) => N[$.CaretN + Math.floor(Math.random() * 4)](c, r, a, s),
|
|
186
|
+
[$.PieSE]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
187
187
|
"path",
|
|
188
188
|
{
|
|
189
|
-
d: `M ${a * s.scale + a * c} ${a *
|
|
190
|
-
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * c} ${a * s.scale + a *
|
|
191
|
-
L ${a * s.scale + a * c} ${a * s.scale + a *
|
|
192
|
-
className:
|
|
189
|
+
d: `M ${a * s.scale + a * c} ${a * r}
|
|
190
|
+
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * c} ${a * s.scale + a * r}
|
|
191
|
+
L ${a * s.scale + a * c} ${a * s.scale + a * r} Z`,
|
|
192
|
+
className: d("fill-current stroke-none", s?.className)
|
|
193
193
|
},
|
|
194
|
-
`tile-${c}-${
|
|
194
|
+
`tile-${c}-${r}`
|
|
195
195
|
),
|
|
196
|
-
[
|
|
196
|
+
[$.PieSW]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
197
197
|
"path",
|
|
198
198
|
{
|
|
199
|
-
d: `M ${a * s.scale + a * c} ${a * s.scale + a *
|
|
200
|
-
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * c} ${a *
|
|
201
|
-
L ${a * c} ${a * s.scale + a *
|
|
202
|
-
className:
|
|
199
|
+
d: `M ${a * s.scale + a * c} ${a * s.scale + a * r}
|
|
200
|
+
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * c} ${a * r}
|
|
201
|
+
L ${a * c} ${a * s.scale + a * r} Z`,
|
|
202
|
+
className: d("fill-current stroke-none", s?.className)
|
|
203
203
|
},
|
|
204
|
-
`tile-${c}-${
|
|
204
|
+
`tile-${c}-${r}`
|
|
205
205
|
),
|
|
206
|
-
[
|
|
206
|
+
[$.PieNW]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
207
207
|
"path",
|
|
208
208
|
{
|
|
209
|
-
d: `M ${a * c} ${a * s.scale + a *
|
|
210
|
-
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * s.scale + a * c} ${a *
|
|
211
|
-
L ${a * c} ${a *
|
|
212
|
-
className:
|
|
209
|
+
d: `M ${a * c} ${a * s.scale + a * r}
|
|
210
|
+
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * s.scale + a * c} ${a * r}
|
|
211
|
+
L ${a * c} ${a * r} Z`,
|
|
212
|
+
className: d("fill-current stroke-none", s?.className)
|
|
213
213
|
},
|
|
214
|
-
`tile-${c}-${
|
|
214
|
+
`tile-${c}-${r}`
|
|
215
215
|
),
|
|
216
|
-
[
|
|
216
|
+
[$.PieNE]: (c, r, a, s) => /* @__PURE__ */ h.jsx(
|
|
217
217
|
"path",
|
|
218
218
|
{
|
|
219
|
-
d: `M ${a * c} ${a *
|
|
220
|
-
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * s.scale + a * c} ${a * s.scale + a *
|
|
221
|
-
L ${a * s.scale + a * c} ${a *
|
|
222
|
-
className:
|
|
219
|
+
d: `M ${a * c} ${a * r}
|
|
220
|
+
A ${a * s.scale} ${a * s.scale}, 0, 0, 0, ${a * s.scale + a * c} ${a * s.scale + a * r}
|
|
221
|
+
L ${a * s.scale + a * c} ${a * r} Z`,
|
|
222
|
+
className: d("fill-current stroke-none", s?.className)
|
|
223
223
|
},
|
|
224
|
-
`tile-${c}-${
|
|
224
|
+
`tile-${c}-${r}`
|
|
225
225
|
),
|
|
226
|
-
[
|
|
227
|
-
},
|
|
228
|
-
(s,
|
|
229
|
-
const
|
|
230
|
-
return N[
|
|
226
|
+
[$.PieRand]: (c, r, a, s) => N[$.PieSE + Math.floor(Math.random() * 4)](c, r, a, s)
|
|
227
|
+
}, T = (c, r, a) => c.map(
|
|
228
|
+
(s, o) => s.map((m, x) => {
|
|
229
|
+
const n = typeof m == "object" ? { className: d(a, m.className), scale: m.scale ?? 1, shape: m.shape } : { className: a, scale: 1, shape: m };
|
|
230
|
+
return N[n.shape](x, o, r, n);
|
|
231
231
|
})
|
|
232
|
-
).flat(),
|
|
233
|
-
[
|
|
234
|
-
[
|
|
232
|
+
).flat(), E = [
|
|
233
|
+
[$.PieRand, $.PieRand],
|
|
234
|
+
[$.PieRand, $.PieRand]
|
|
235
235
|
];
|
|
236
|
-
function
|
|
237
|
-
pattern: c =
|
|
238
|
-
tileSize:
|
|
236
|
+
function Z({
|
|
237
|
+
pattern: c = E,
|
|
238
|
+
tileSize: r = 64,
|
|
239
239
|
tileClassName: a,
|
|
240
240
|
tileBgClassName: s,
|
|
241
|
-
renderChildren:
|
|
242
|
-
|
|
241
|
+
renderChildren: o,
|
|
242
|
+
fit: m = "none",
|
|
243
|
+
...x
|
|
243
244
|
}) {
|
|
244
|
-
const
|
|
245
|
+
const n = M(
|
|
245
246
|
() => ({
|
|
246
|
-
width: c.reduce((u,
|
|
247
|
-
height: c.length *
|
|
247
|
+
width: c.reduce((u, P) => Math.max(u, P.length), 0) * r,
|
|
248
|
+
height: c.length * r
|
|
248
249
|
}),
|
|
249
|
-
[c,
|
|
250
|
-
),
|
|
251
|
-
const u =
|
|
250
|
+
[c, r]
|
|
251
|
+
), L = M(() => {
|
|
252
|
+
const u = T(c, r, a);
|
|
252
253
|
return s && u.unshift(
|
|
253
254
|
/* @__PURE__ */ h.jsx(
|
|
254
255
|
"rect",
|
|
255
256
|
{
|
|
256
257
|
x: 0,
|
|
257
258
|
y: 0,
|
|
258
|
-
width:
|
|
259
|
-
height:
|
|
260
|
-
className:
|
|
259
|
+
width: n.width,
|
|
260
|
+
height: n.height,
|
|
261
|
+
className: d("fill-black stroke-2 stroke-black", s)
|
|
261
262
|
},
|
|
262
263
|
"svg-mask-invert"
|
|
263
264
|
)
|
|
264
265
|
), u;
|
|
265
|
-
}, [c,
|
|
266
|
-
|
|
266
|
+
}, [c, n, a, s, r]), p = M(() => {
|
|
267
|
+
switch (m) {
|
|
268
|
+
case "fill":
|
|
269
|
+
return n.width <= n.height ? "100%" : void 0;
|
|
270
|
+
case "width":
|
|
271
|
+
return "100%";
|
|
272
|
+
case "none":
|
|
273
|
+
return n.width;
|
|
274
|
+
default:
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
}, [m, n]), j = M(() => {
|
|
278
|
+
switch (m) {
|
|
279
|
+
case "fill":
|
|
280
|
+
return n.height < n.width ? "100%" : void 0;
|
|
281
|
+
case "height":
|
|
282
|
+
return "100%";
|
|
283
|
+
case "none":
|
|
284
|
+
return n.height;
|
|
285
|
+
default:
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
}, [m, n]);
|
|
289
|
+
return /* @__PURE__ */ h.jsx(
|
|
290
|
+
"svg",
|
|
291
|
+
{
|
|
292
|
+
width: p,
|
|
293
|
+
height: j,
|
|
294
|
+
viewBox: `0 0 ${n.width} ${n.height}`,
|
|
295
|
+
overflow: "visible",
|
|
296
|
+
...x,
|
|
297
|
+
children: o ? o(L, n.width, n.height) : L
|
|
298
|
+
}
|
|
299
|
+
);
|
|
267
300
|
}
|
|
268
301
|
export {
|
|
269
|
-
|
|
302
|
+
Z as IconGenerator
|
|
270
303
|
};
|