quirk-ui 0.1.20 → 0.1.21
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/index12.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index61.css +1 -1
- package/dist/assets/index66.css +1 -1
- package/dist/core/components/Calendar/Calendar.test.cjs +1 -1
- package/dist/core/components/Calendar/Calendar.test.mjs +1 -1
- package/dist/core/components/Calendar/index.cjs +1 -1
- package/dist/core/components/Calendar/index.mjs +1 -1
- package/dist/core/components/Checkbox/index.cjs +1 -1
- package/dist/core/components/Checkbox/index.mjs +59 -59
- package/dist/core/components/DatePicker/DatePicker.test.cjs +1 -1
- package/dist/core/components/DatePicker/DatePicker.test.mjs +1 -1
- package/dist/core/components/DatePicker/index.cjs +2 -2
- package/dist/core/components/DatePicker/index.mjs +56 -56
- package/dist/core/components/Heading/index.cjs +1 -1
- package/dist/core/components/Heading/index.mjs +27 -27
- package/dist/core/components/Text/index.cjs +1 -1
- package/dist/core/components/Text/index.mjs +21 -21
- package/dist/{index-hM-Do4qg.js → index-D38CuMjf.js} +42 -42
- package/dist/{index-CiXCoJuk.cjs → index-DvtjEAHw.cjs} +1 -1
- package/dist/next/blocks/StickyScrollBlock/index.cjs +1 -1
- package/dist/next/blocks/StickyScrollBlock/index.mjs +34 -34
- package/dist/styles.css +12 -12
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useState as $, useRef as u, useCallback as k, useEffect as C } from "react";
|
|
3
3
|
import { resolveImageUrl as A, resolveAltText as E } from "../../utils/mediaUtils.mjs";
|
|
4
4
|
import { extractText as M } from "../../utils/blockRenderers.mjs";
|
|
5
5
|
import { useTheme as j } from "../../../core/context/ThemeContext.mjs";
|
|
6
6
|
import { useMediaQuery as z } from "../../hooks/useMediaQuery.mjs";
|
|
7
7
|
import { useStyleClasses as B } from "../../hooks/useStyleClasses.mjs";
|
|
8
|
-
import '../../../assets/index12.css';const U = "
|
|
8
|
+
import '../../../assets/index12.css';const U = "_layout_11dq8_1", O = "_container_11dq8_7", Q = "_heading_11dq8_23", V = "_title_11dq8_28", D = "_text_11dq8_28", F = "_scroll_11dq8_43", G = "_sidebar_11dq8_48", H = "_number_11dq8_73", J = "_link_11dq8_91", L = "_active_11dq8_106", P = "_content_11dq8_118", W = "_flex_11dq8_129", X = "_item_11dq8_154", Y = "_image_11dq8_173", Z = "_eyebrow_11dq8_199", e = {
|
|
9
9
|
layout: U,
|
|
10
10
|
container: O,
|
|
11
11
|
heading: Q,
|
|
@@ -22,14 +22,14 @@ import '../../../assets/index12.css';const U = "_layout_1a34q_1", O = "_containe
|
|
|
22
22
|
image: Y,
|
|
23
23
|
eyebrow: Z
|
|
24
24
|
};
|
|
25
|
-
function
|
|
25
|
+
function lt({
|
|
26
26
|
heading: n,
|
|
27
27
|
items: r,
|
|
28
|
-
showNumbers:
|
|
28
|
+
showNumbers: d,
|
|
29
29
|
styleOptions: p,
|
|
30
30
|
id: N,
|
|
31
|
-
renderImage:
|
|
32
|
-
renderRichText:
|
|
31
|
+
renderImage: b,
|
|
32
|
+
renderRichText: l
|
|
33
33
|
}) {
|
|
34
34
|
const [f, v] = $(null), { mode: y } = j(), q = z("(max-width: 768px)"), w = B(p), _ = u(!1), m = u(null), g = u([]), h = k(
|
|
35
35
|
(t) => (s) => {
|
|
@@ -41,10 +41,10 @@ function et({
|
|
|
41
41
|
const t = new IntersectionObserver(
|
|
42
42
|
(s) => {
|
|
43
43
|
if (_.current) return;
|
|
44
|
-
const i = s.filter((
|
|
44
|
+
const i = s.filter((o) => o.isIntersecting).sort((o, S) => S.intersectionRatio - o.intersectionRatio);
|
|
45
45
|
if (i.length > 0) {
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
const o = i[0].target.getAttribute("id");
|
|
47
|
+
o && v(o);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -64,67 +64,67 @@ function et({
|
|
|
64
64
|
_.current = !1;
|
|
65
65
|
}, 600), (s = document.getElementById(t)) == null || s.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
66
66
|
}, []);
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */ c("div", { className:
|
|
67
|
+
return /* @__PURE__ */ a("section", { id: N, className: `${w} ${e.layout}`, children: /* @__PURE__ */ c("article", { className: e.container, children: [
|
|
68
|
+
/* @__PURE__ */ c("div", { className: e.heading, children: [
|
|
69
69
|
/* @__PURE__ */ c("div", { children: [
|
|
70
|
-
n.eyebrow && (
|
|
70
|
+
n.eyebrow && (l == null ? void 0 : l({
|
|
71
71
|
blocks: n.eyebrow,
|
|
72
|
-
className:
|
|
72
|
+
className: e.eyebrow
|
|
73
73
|
})),
|
|
74
|
-
|
|
74
|
+
l == null ? void 0 : l({
|
|
75
75
|
blocks: n.title,
|
|
76
|
-
className:
|
|
76
|
+
className: e.title
|
|
77
77
|
})
|
|
78
78
|
] }),
|
|
79
|
-
n.description && (
|
|
79
|
+
n.description && (l == null ? void 0 : l({ blocks: n.description }))
|
|
80
80
|
] }),
|
|
81
|
-
/* @__PURE__ */ c("div", { className:
|
|
82
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ c("div", { className: e.scroll, children: [
|
|
82
|
+
/* @__PURE__ */ a("nav", { className: e.sidebar, "aria-label": "Section navigation", children: /* @__PURE__ */ a("ul", { children: r.map((t, s) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ c(
|
|
83
83
|
"button",
|
|
84
84
|
{
|
|
85
85
|
type: "button",
|
|
86
|
-
className: `${
|
|
86
|
+
className: `${e.link} ${f === t._key ? e.active : ""}`,
|
|
87
87
|
"aria-current": f === t._key ? "true" : void 0,
|
|
88
88
|
onClick: () => I(t._key),
|
|
89
89
|
children: [
|
|
90
|
-
|
|
90
|
+
d && /* @__PURE__ */ a("div", { className: e.number, "aria-hidden": "true", children: s + 1 }),
|
|
91
91
|
t.title && M(t.title)
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
) }, t._key)) }) }),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
const i = A(t.image, y),
|
|
95
|
+
/* @__PURE__ */ a("div", { className: e.content, children: r.map((t, s) => {
|
|
96
|
+
const i = A(t.image, y), o = E(t.image, y);
|
|
97
97
|
return /* @__PURE__ */ c(
|
|
98
98
|
"section",
|
|
99
99
|
{
|
|
100
100
|
ref: h(s),
|
|
101
101
|
id: t._key,
|
|
102
|
-
className:
|
|
102
|
+
className: e.item,
|
|
103
103
|
"aria-labelledby": `${t._key}-heading`,
|
|
104
104
|
children: [
|
|
105
|
-
/* @__PURE__ */ c("div", { className:
|
|
106
|
-
/* @__PURE__ */ c("div", { className:
|
|
107
|
-
q &&
|
|
108
|
-
t.title && (
|
|
105
|
+
/* @__PURE__ */ c("div", { className: e.text, children: [
|
|
106
|
+
/* @__PURE__ */ c("div", { className: e.flex, children: [
|
|
107
|
+
q && d && /* @__PURE__ */ a("div", { className: e.number, "aria-hidden": "true", children: s + 1 }),
|
|
108
|
+
t.title && (l == null ? void 0 : l({
|
|
109
109
|
blocks: t.title,
|
|
110
|
-
className:
|
|
110
|
+
className: e.title
|
|
111
111
|
}))
|
|
112
112
|
] }),
|
|
113
|
-
t.description && (
|
|
113
|
+
t.description && (l == null ? void 0 : l({ blocks: t.description }))
|
|
114
114
|
] }),
|
|
115
|
-
t.image && i && /* @__PURE__ */
|
|
115
|
+
t.image && i && /* @__PURE__ */ a("div", { className: e.image, children: b ? b({
|
|
116
116
|
src: i,
|
|
117
|
-
alt:
|
|
117
|
+
alt: o,
|
|
118
118
|
width: 600,
|
|
119
119
|
height: 400,
|
|
120
120
|
// Only the first image is above-the-fold.
|
|
121
121
|
priority: s === 0,
|
|
122
122
|
loading: s === 0 ? "eager" : "lazy"
|
|
123
|
-
}) : /* @__PURE__ */
|
|
123
|
+
}) : /* @__PURE__ */ a(
|
|
124
124
|
"img",
|
|
125
125
|
{
|
|
126
126
|
src: i,
|
|
127
|
-
alt:
|
|
127
|
+
alt: o,
|
|
128
128
|
width: 600,
|
|
129
129
|
height: 400,
|
|
130
130
|
loading: s === 0 ? "eager" : "lazy"
|
|
@@ -139,5 +139,5 @@ function et({
|
|
|
139
139
|
] }) });
|
|
140
140
|
}
|
|
141
141
|
export {
|
|
142
|
-
|
|
142
|
+
lt as StickyScrollBlock
|
|
143
143
|
};
|