quirk-ui 0.0.59 → 0.0.60
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/index31.css +1 -1
- package/dist/components/Carousel/index.js +51 -51
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/assets/index31.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._carousel_u7gup_1{width:100%}@media (max-width: 767px){._carousel_u7gup_1{padding:0 3rem}}._trackContainer_u7gup_9{overflow:hidden;width:100%}@media (max-width: 767px){._trackContainer_u7gup_9{overflow:visible}}._track_u7gup_9{display:flex;transition:transform .3s ease;will-change:transform}._page_u7gup_24{display:flex;gap:var(--spacing-md);padding:0 var(--spacing-sm)}._controls_u7gup_30{display:flex;justify-content:space-between;align-items:center;margin-top:var(--spacing-md);padding:0 var(--spacing-md);width:100%}@media (max-width: 767px){._controls_u7gup_30{width:var(--card-width);margin-left:auto;margin-right:auto}}._indicators_u7gup_47{display:flex;flex-wrap:wrap;max-width:125px;gap:var(--spacing-xs)}._indicator_u7gup_47{width:10px;height:10px;border-radius:50%;background-color:#e0e0e0;border:1px solid #fff;cursor:pointer;transition:background-color .3s}._indicator_u7gup_47._active_u7gup_64{background-color:var(--color-primary)}._buttons_u7gup_68{display:flex;gap:var(--spacing-md)}._prev_u7gup_73._disabled_u7gup_73,._next_u7gup_74._disabled_u7gup_73{opacity:.5;pointer-events:none}._buttons_u7gup_68 button:not(._disabled_u7gup_73):hover{background-color:var(--color-primary);color:#fff}._prev_u7gup_73,._next_u7gup_74{background-color:#e0e0e0;color:var(--color-text-primary);border:1px solid #fff;padding:var(--spacing-sm);cursor:pointer;transition:background-color .3s,color .3s;border-radius:50%;width:40px;height:40px;display:flex;justify-content:center;align-items:center}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as v, useRef as M, useEffect as
|
|
1
|
+
import { jsxs as x, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useRef as M, useEffect as $ } from "react";
|
|
3
3
|
import { A as O } from "../../arrow-left-BIJvHwNQ.js";
|
|
4
4
|
import { A as q } from "../../arrow-right-QEwnX3Sk.js";
|
|
5
|
-
import '../../assets/index31.css';const B = "
|
|
5
|
+
import '../../assets/index31.css';const B = "_carousel_u7gup_1", F = "_trackContainer_u7gup_9", H = "_track_u7gup_9", J = "_page_u7gup_24", K = "_controls_u7gup_30", Q = "_indicators_u7gup_47", S = "_indicator_u7gup_47", U = "_active_u7gup_64", V = "_buttons_u7gup_68", Y = "_prev_u7gup_73", Z = "_disabled_u7gup_73", P = "_next_u7gup_74", n = {
|
|
6
6
|
carousel: B,
|
|
7
7
|
trackContainer: F,
|
|
8
8
|
track: H,
|
|
@@ -16,83 +16,83 @@ import '../../assets/index31.css';const B = "_carousel_184sh_1", F = "_trackCont
|
|
|
16
16
|
disabled: Z,
|
|
17
17
|
next: P
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
items:
|
|
19
|
+
function st({
|
|
20
|
+
items: b,
|
|
21
21
|
itemsPerPage: f = 9,
|
|
22
22
|
itemsPerRow: W = 3,
|
|
23
23
|
autoPlay: o = !1,
|
|
24
|
-
autoPlayInterval:
|
|
24
|
+
autoPlayInterval: N = 3e3,
|
|
25
25
|
className: z,
|
|
26
26
|
externalRef: A,
|
|
27
27
|
siblingRef: a,
|
|
28
|
-
isSplit:
|
|
28
|
+
isSplit: k = !1
|
|
29
29
|
}) {
|
|
30
|
-
const [i, l] = v(0), [d,
|
|
30
|
+
const [i, l] = v(0), [d, p] = v(0), [h, y] = v(f), [C, T] = v(!1), E = M(null), g = M(null), _ = A, L = (t, e) => {
|
|
31
31
|
const c = [];
|
|
32
|
-
for (let
|
|
33
|
-
c.push(t.slice(
|
|
32
|
+
for (let r = 0; r < t.length; r += e)
|
|
33
|
+
c.push(t.slice(r, r + e));
|
|
34
34
|
return c;
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
$(() => {
|
|
37
37
|
const t = () => {
|
|
38
38
|
const e = window.innerWidth < 768;
|
|
39
39
|
T(e), y(e ? 1 : f), l(0);
|
|
40
40
|
};
|
|
41
41
|
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
42
42
|
}, [f]);
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const m = Math.ceil(h / W), I = L(b, h), u = I.length, j = 3 * 16, R = 6 * 16;
|
|
44
|
+
$(() => {
|
|
45
45
|
const t = new ResizeObserver((e) => {
|
|
46
46
|
var c;
|
|
47
|
-
for (let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
) :
|
|
47
|
+
for (let r of e)
|
|
48
|
+
r.contentRect && (C ? p(r.contentRect.width - R) : k && a != null && a.current ? p(
|
|
49
|
+
r.contentRect.width - ((c = a == null ? void 0 : a.current) == null ? void 0 : c.offsetWidth) - j
|
|
50
|
+
) : p(r.contentRect.width), l(0));
|
|
51
51
|
});
|
|
52
|
-
return
|
|
53
|
-
}, [
|
|
54
|
-
const
|
|
55
|
-
l((t) => Math.min(t + 1,
|
|
52
|
+
return _ != null && _.current && t.observe(_.current), () => t.disconnect();
|
|
53
|
+
}, [C, k]);
|
|
54
|
+
const w = () => {
|
|
55
|
+
l((t) => Math.min(t + 1, u - 1));
|
|
56
56
|
}, X = () => {
|
|
57
57
|
l((t) => Math.max(t - 1, 0));
|
|
58
58
|
}, D = (t) => {
|
|
59
59
|
l(t);
|
|
60
60
|
}, G = () => d ? `translateX(-${i * d}px)` : "translateX(0px)";
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
}), [o,
|
|
64
|
-
/* @__PURE__ */
|
|
61
|
+
return $(() => (o && (g.current = setInterval(w, N)), () => {
|
|
62
|
+
g.current && clearInterval(g.current);
|
|
63
|
+
}), [o, N, w]), /* @__PURE__ */ x("div", { className: `${z ?? ""} ${n.carousel}`, ref: E, children: [
|
|
64
|
+
/* @__PURE__ */ s(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
|
-
className:
|
|
67
|
+
className: n.trackContainer,
|
|
68
68
|
style: { maxWidth: `${d}px` },
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ s(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
|
-
className:
|
|
73
|
-
style: { width: `${
|
|
74
|
-
children: I.map((t, e) => /* @__PURE__ */
|
|
72
|
+
className: n.track,
|
|
73
|
+
style: { width: `${u * 100}%`, transform: G() },
|
|
74
|
+
children: I.map((t, e) => /* @__PURE__ */ s(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
77
|
+
className: n.page,
|
|
78
78
|
style: {
|
|
79
|
-
display:
|
|
79
|
+
display: m > 1 ? "grid" : "flex",
|
|
80
80
|
gridTemplateColumns: `repeat(${Math.ceil(
|
|
81
|
-
|
|
81
|
+
h / m
|
|
82
82
|
)}, 1fr)`,
|
|
83
|
-
gridTemplateRows: `repeat(${
|
|
83
|
+
gridTemplateRows: `repeat(${m}, auto)`,
|
|
84
84
|
width: `${d}px`
|
|
85
85
|
},
|
|
86
|
-
children: t.map((c,
|
|
86
|
+
children: t.map((c, r) => /* @__PURE__ */ s(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
|
-
className:
|
|
89
|
+
className: n.slide,
|
|
90
90
|
style: {
|
|
91
|
-
width: `${d /
|
|
91
|
+
width: `${d / m - 16}px`
|
|
92
92
|
},
|
|
93
93
|
children: c
|
|
94
94
|
},
|
|
95
|
-
|
|
95
|
+
r
|
|
96
96
|
))
|
|
97
97
|
},
|
|
98
98
|
e
|
|
@@ -101,35 +101,35 @@ function rt({
|
|
|
101
101
|
)
|
|
102
102
|
}
|
|
103
103
|
),
|
|
104
|
-
|
|
105
|
-
/* @__PURE__ */
|
|
104
|
+
u > 1 && /* @__PURE__ */ x("div", { className: n.controls, children: [
|
|
105
|
+
/* @__PURE__ */ s("div", { className: n.indicators, children: Array.from({ length: u }).map((t, e) => /* @__PURE__ */ s(
|
|
106
106
|
"button",
|
|
107
107
|
{
|
|
108
|
-
className: `${
|
|
108
|
+
className: `${n.indicator} ${e === i ? n.active : ""}`,
|
|
109
109
|
onClick: () => D(e),
|
|
110
110
|
"aria-label": `Go to group ${e + 1}`
|
|
111
111
|
},
|
|
112
112
|
e
|
|
113
113
|
)) }),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ x("div", { className: n.buttons, children: [
|
|
115
|
+
/* @__PURE__ */ s(
|
|
116
116
|
"button",
|
|
117
117
|
{
|
|
118
118
|
"aria-label": "Previous slide",
|
|
119
|
-
className: `${
|
|
119
|
+
className: `${n.prev} ${!o && i === 0 ? n.disabled : ""}`,
|
|
120
120
|
onClick: X,
|
|
121
121
|
disabled: !o && i === 0,
|
|
122
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ s(O, { size: 36 })
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ s(
|
|
126
126
|
"button",
|
|
127
127
|
{
|
|
128
128
|
"aria-label": "Next slide",
|
|
129
|
-
className: `${
|
|
130
|
-
onClick:
|
|
131
|
-
disabled: !o && i >=
|
|
132
|
-
children: /* @__PURE__ */
|
|
129
|
+
className: `${n.next} ${!o && i >= u - 1 ? n.disabled : ""}`,
|
|
130
|
+
onClick: w,
|
|
131
|
+
disabled: !o && i >= b.length - h,
|
|
132
|
+
children: /* @__PURE__ */ s(q, { size: 36 })
|
|
133
133
|
}
|
|
134
134
|
)
|
|
135
135
|
] })
|
|
@@ -137,5 +137,5 @@ function rt({
|
|
|
137
137
|
] });
|
|
138
138
|
}
|
|
139
139
|
export {
|
|
140
|
-
|
|
140
|
+
st as Carousel
|
|
141
141
|
};
|
package/dist/styles.css
CHANGED
|
@@ -28,7 +28,7 @@ ul._list_4w9h5_1{list-style-type:none;padding:0;margin:0}ol._list_4w9h5_1{list-s
|
|
|
28
28
|
._notification_1txoc_1{display:flex;align-items:center;padding:var(--spacing-md);background-color:var(--color-secondary);color:var(--color-text-primaray);box-shadow:0 4px 8px #0000001a;border-radius:var(--radius-md);font-size:var(--font-size-md);font-weight:var(--font-weight-semibold);gap:var(--spacing-sm);animation:_slideIn_1txoc_1 .3s ease forwards;opacity:1;transform-origin:right center;width:fit-content}._enter_1txoc_18{opacity:1;transform:translate(0)}._exiting_1txoc_23{animation:_slideOut_1txoc_1 .3s ease forwards}._info_1txoc_27{background-color:var(--color-info-bg);color:var(--color-info-text)}._success_1txoc_32{background-color:var(--color-success-bg);color:var(--color-success-text)}._warning_1txoc_37{background-color:var(--color-warning-bg);color:var(--color-warning-text)}._error_1txoc_42{background-color:var(--color-error-bg);color:var(--color-error-text)}._closeButton_1txoc_47{background:none;border:none;cursor:pointer;color:#fff;padding:0;margin-left:auto;display:flex;align-items:center}@keyframes _slideIn_1txoc_1{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOut_1txoc_1{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}
|
|
29
29
|
._container_61msx_1{position:fixed;bottom:1rem;right:1rem;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:.5rem;z-index:1000}
|
|
30
30
|
._progressBarContainer_a1m8u_1{display:flex;align-items:center;justify-content:center;gap:.25rem;width:100%}._progressBar_a1m8u_1{flex:1;height:12px;background-color:#f0f0f0;border-radius:4px;overflow:hidden;position:relative}._fill_a1m8u_18{height:100%;transition:width .3s ease;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;border-radius:4px}._primary_a1m8u_29 ._fill_a1m8u_18{background-color:var(--color-primary)}._success_a1m8u_33 ._fill_a1m8u_18{background-color:var(--color-success)}._warning_a1m8u_37 ._fill_a1m8u_18{background-color:var(--color-warning)}._danger_a1m8u_41 ._fill_a1m8u_18{background-color:var(--color-error)}._label_a1m8u_45{flex:.1;position:relative;width:auto;text-align:center;color:var(--color-text-primary);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold)}
|
|
31
|
-
.
|
|
31
|
+
._carousel_u7gup_1{width:100%}@media (max-width: 767px){._carousel_u7gup_1{padding:0 3rem}}._trackContainer_u7gup_9{overflow:hidden;width:100%}@media (max-width: 767px){._trackContainer_u7gup_9{overflow:visible}}._track_u7gup_9{display:flex;transition:transform .3s ease;will-change:transform}._page_u7gup_24{display:flex;gap:var(--spacing-md);padding:0 var(--spacing-sm)}._controls_u7gup_30{display:flex;justify-content:space-between;align-items:center;margin-top:var(--spacing-md);padding:0 var(--spacing-md);width:100%}@media (max-width: 767px){._controls_u7gup_30{width:var(--card-width);margin-left:auto;margin-right:auto}}._indicators_u7gup_47{display:flex;flex-wrap:wrap;max-width:125px;gap:var(--spacing-xs)}._indicator_u7gup_47{width:10px;height:10px;border-radius:50%;background-color:#e0e0e0;border:1px solid #fff;cursor:pointer;transition:background-color .3s}._indicator_u7gup_47._active_u7gup_64{background-color:var(--color-primary)}._buttons_u7gup_68{display:flex;gap:var(--spacing-md)}._prev_u7gup_73._disabled_u7gup_73,._next_u7gup_74._disabled_u7gup_73{opacity:.5;pointer-events:none}._buttons_u7gup_68 button:not(._disabled_u7gup_73):hover{background-color:var(--color-primary);color:#fff}._prev_u7gup_73,._next_u7gup_74{background-color:#e0e0e0;color:var(--color-text-primary);border:1px solid #fff;padding:var(--spacing-sm);cursor:pointer;transition:background-color .3s,color .3s;border-radius:50%;width:40px;height:40px;display:flex;justify-content:center;align-items:center}
|
|
32
32
|
._drawer_55xty_1{position:fixed;background-color:var(--color-background);transition:transform .3s ease-in-out;z-index:1000;width:300px;height:100%;box-shadow:0 0 10px #00000026;padding:var(--spacing-md)}._right_55xty_12{top:0;right:0;transform:translate(100%)}._left_55xty_18{top:0;left:0;transform:translate(-100%)}._top_55xty_24{top:0;left:0;width:100%;height:auto;transform:translateY(-100%)}._bottom_55xty_32{bottom:0;left:0;width:100%;height:auto;transform:translateY(100%)}._open_55xty_40._right_55xty_12,._open_55xty_40._left_55xty_18{transform:translate(0)}._open_55xty_40._top_55xty_24,._open_55xty_40._bottom_55xty_32{transform:translateY(0)}._overlay_55xty_50{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#0000004d;opacity:0;pointer-events:none;transition:opacity .3s ease-in-out;z-index:999}._overlay_55xty_50._show_55xty_60{opacity:1;pointer-events:all}
|
|
33
33
|
._tabs_f06du_1{display:flex;flex-direction:column;width:100%}._tabsList_f06du_7{display:flex;border-bottom:2px solid var(--color-border)}._left_f06du_12{justify-content:flex-start}._center_f06du_16{justify-content:center}._right_f06du_20{justify-content:flex-end}._tabsTrigger_f06du_24{padding:var(--spacing-md);border:none;border-bottom:2px solid transparent;background:none;cursor:pointer;color:var(--color-muted);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);transition:color .3s ease,border-color .3s ease;position:relative;top:2px}._tabsTrigger_f06du_24._active_f06du_38{border-color:var(--color-primary);color:var(--color-primary)}._tabsPanelWrapper_f06du_43{position:relative;min-height:100px}._tabsPanel_f06du_43{animation:_fadeSlide_f06du_1 .3s ease both;position:absolute;width:100%;top:0;left:0;padding:var(--spacing-md);color:var(--color-text-primary)}@keyframes _fadeSlide_f06du_1{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
|
|
34
34
|
._breadcrumbs_1nbgu_1{display:block;font-size:var(--font-size-sm);line-height:1.5}._list_1nbgu_7{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0}._item_1nbgu_15{display:flex;align-items:center}._separator_1nbgu_20{margin:0 var(--spacing-xs);color:var(--color-muted)}._link_1nbgu_25{color:var(--color-muted);text-decoration:none;transition:color .3s ease}._link_1nbgu_25:hover{color:var(--color-primary)}._label_1nbgu_35{color:var(--color-muted)}._active_1nbgu_39{font-weight:var(--font-weight-bold);color:var(--color-primary)}
|