quirk-ui 0.1.2 → 0.1.3

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.
Files changed (87) hide show
  1. package/dist/CategoryFilters-BQ3HNIBf.cjs +1 -0
  2. package/dist/CategoryFilters-bKLPkXw7.js +79 -0
  3. package/dist/HeroSubComponents-CGkYeBIT.js +202 -0
  4. package/dist/HeroSubComponents-CfbLrTJF.cjs +6 -0
  5. package/dist/assets/CategoryFilters.css +1 -1
  6. package/dist/assets/HeroSubComponents.css +1 -1
  7. package/dist/assets/index10.css +1 -1
  8. package/dist/assets/index11.css +1 -1
  9. package/dist/assets/index12.css +1 -1
  10. package/dist/assets/index13.css +1 -1
  11. package/dist/assets/index14.css +1 -1
  12. package/dist/assets/index15.css +1 -1
  13. package/dist/assets/index16.css +1 -1
  14. package/dist/assets/index17.css +1 -1
  15. package/dist/assets/index18.css +1 -1
  16. package/dist/assets/index19.css +1 -1
  17. package/dist/assets/index2.css +1 -1
  18. package/dist/assets/index3.css +1 -1
  19. package/dist/assets/index4.css +1 -1
  20. package/dist/assets/index5.css +1 -1
  21. package/dist/assets/index6.css +1 -1
  22. package/dist/assets/index61.css +1 -1
  23. package/dist/assets/index7.css +1 -1
  24. package/dist/assets/index8.css +1 -1
  25. package/dist/assets/index9.css +1 -1
  26. package/dist/core/components/Carousel/index.cjs +1 -1
  27. package/dist/core/components/Carousel/index.mjs +1 -1
  28. package/dist/core/components/DatePicker/index.cjs +2 -2
  29. package/dist/core/components/DatePicker/index.mjs +52 -52
  30. package/dist/core/components/Grid/index.cjs +1 -1
  31. package/dist/core/components/Grid/index.mjs +1 -1
  32. package/dist/core/components/Input/index.cjs +1 -1
  33. package/dist/core/components/Input/index.mjs +1 -1
  34. package/dist/core/components/Select/index.cjs +1 -1
  35. package/dist/core/components/Select/index.mjs +1 -1
  36. package/dist/main.cjs +1 -1
  37. package/dist/main.d.ts +23 -2
  38. package/dist/main.mjs +23 -20
  39. package/dist/next/blocks/AccordionBlock/index.cjs +1 -1
  40. package/dist/next/blocks/AccordionBlock/index.mjs +17 -17
  41. package/dist/next/blocks/AdditionalCategoriesBlock/index.cjs +1 -1
  42. package/dist/next/blocks/AdditionalCategoriesBlock/index.mjs +22 -21
  43. package/dist/next/blocks/CardGridBlock/index.cjs +1 -1
  44. package/dist/next/blocks/CardGridBlock/index.mjs +1 -1
  45. package/dist/next/blocks/CarouselBlock/index.cjs +1 -1
  46. package/dist/next/blocks/CarouselBlock/index.mjs +1 -1
  47. package/dist/next/blocks/ContentBlock/index.cjs +1 -1
  48. package/dist/next/blocks/ContentBlock/index.mjs +73 -69
  49. package/dist/next/blocks/DocumentListBlock/CategoryFilters.cjs +1 -1
  50. package/dist/next/blocks/DocumentListBlock/CategoryFilters.mjs +1 -1
  51. package/dist/next/blocks/DocumentListBlock/index.cjs +1 -1
  52. package/dist/next/blocks/DocumentListBlock/index.mjs +75 -65
  53. package/dist/next/blocks/FeaturedDocumentsBlock/index.cjs +1 -1
  54. package/dist/next/blocks/FeaturedDocumentsBlock/index.mjs +78 -74
  55. package/dist/next/blocks/HeroBlock/HeroSubComponents.cjs +1 -1
  56. package/dist/next/blocks/HeroBlock/HeroSubComponents.mjs +1 -1
  57. package/dist/next/blocks/HeroBlock/index.cjs +1 -1
  58. package/dist/next/blocks/HeroBlock/index.mjs +1 -1
  59. package/dist/next/blocks/QuoteBlock/index.cjs +1 -1
  60. package/dist/next/blocks/QuoteBlock/index.mjs +1 -1
  61. package/dist/next/blocks/RichTextBlock/index.cjs +1 -1
  62. package/dist/next/blocks/RichTextBlock/index.mjs +1 -1
  63. package/dist/next/blocks/StickyScrollBlock/index.cjs +1 -1
  64. package/dist/next/blocks/StickyScrollBlock/index.mjs +59 -49
  65. package/dist/next/blocks/TabsBlock/index.cjs +1 -1
  66. package/dist/next/blocks/TabsBlock/index.mjs +107 -94
  67. package/dist/next/blocks/WasHelpfulBlock/index.cjs +1 -1
  68. package/dist/next/blocks/WasHelpfulBlock/index.mjs +1 -1
  69. package/dist/next/cards/SpotlightCard/index.cjs +1 -1
  70. package/dist/next/cards/SpotlightCard/index.mjs +1 -1
  71. package/dist/next/ui/AnimatedSpan/index.cjs +1 -1
  72. package/dist/next/ui/AnimatedSpan/index.mjs +1 -1
  73. package/dist/next/ui/PortableTextRenderer/PortableTextRenderer.types.cjs +1 -0
  74. package/dist/next/ui/PortableTextRenderer/PortableTextRenderer.types.mjs +1 -0
  75. package/dist/next/ui/PortableTextRenderer/index.cjs +1 -1
  76. package/dist/next/ui/PortableTextRenderer/index.mjs +1 -1
  77. package/dist/next/utils/portableTextUtils.cjs +1 -1
  78. package/dist/next/utils/portableTextUtils.mjs +22 -3
  79. package/dist/next.cjs +1 -1
  80. package/dist/next.d.ts +23 -2
  81. package/dist/next.mjs +15 -12
  82. package/dist/styles.css +20 -20
  83. package/package.json +1 -1
  84. package/dist/CategoryFilters-C0_SftM8.js +0 -77
  85. package/dist/CategoryFilters-CvVjFOWh.cjs +0 -1
  86. package/dist/HeroSubComponents-CdjT4Z5_.js +0 -202
  87. package/dist/HeroSubComponents-OGshYYOc.cjs +0 -6
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -1,77 +0,0 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { B as h } from "./index-DoRSKr6y.js";
3
- import { X as g } from "./x-CnsEH4Ox.js";
4
- import './assets/CategoryFilters.css';const p = "_documentList_1firg_1", u = "_container_1firg_9", m = "_heading_1firg_20", H = "_listContainer_1firg_30", L = "_listWrapper_1firg_41", S = "_list_1firg_30", F = "_listHeader_1firg_62", b = "_listSearch_1firg_75", C = "_clearSearch_1firg_102", k = "_listHeaderFilters_1firg_121", v = "_listResults_1firg_132", w = "_listSort_1firg_136", y = "_filterToggle_1firg_159", x = "_filterHeader_1firg_174", N = "_loadMore_1firg_195", I = "_filterList_1firg_199", M = "_listFilters_1firg_206", R = "_applyFilters_1firg_214", T = "_show_1firg_243", W = "_hide_1firg_252", j = "_buttonIsLoading_1firg_301", s = {
5
- documentList: p,
6
- container: u,
7
- heading: m,
8
- listContainer: H,
9
- listWrapper: L,
10
- list: S,
11
- listHeader: F,
12
- listSearch: b,
13
- clearSearch: C,
14
- listHeaderFilters: k,
15
- listResults: v,
16
- listSort: w,
17
- filterToggle: y,
18
- filterHeader: x,
19
- loadMore: N,
20
- filterList: I,
21
- listFilters: M,
22
- applyFilters: R,
23
- show: T,
24
- hide: W,
25
- buttonIsLoading: j
26
- };
27
- function A({
28
- categoryFilters: e,
29
- selectedCategories: r,
30
- onSelectionChange: _,
31
- showFilters: o,
32
- toggleFilters: n,
33
- isLoading: a
34
- }) {
35
- return /* @__PURE__ */ l(
36
- "div",
37
- {
38
- className: `${s.listFilters} ${o ? s.show : s.hide}`,
39
- children: [
40
- /* @__PURE__ */ l("div", { className: s.filterHeader, children: [
41
- /* @__PURE__ */ t("h5", { children: "Filters" }),
42
- /* @__PURE__ */ t("button", { onClick: n, children: /* @__PURE__ */ t(g, { size: 24 }) })
43
- ] }),
44
- /* @__PURE__ */ t("div", { className: s.filterList, children: e == null ? void 0 : e.map((i) => /* @__PURE__ */ l("label", { children: [
45
- /* @__PURE__ */ t(
46
- "input",
47
- {
48
- type: "checkbox",
49
- value: i._id,
50
- checked: r.includes(i._id),
51
- onChange: (c) => {
52
- const d = c.target.checked ? [...r, i._id] : r.filter((f) => f !== i._id);
53
- _(d);
54
- }
55
- }
56
- ),
57
- i.title
58
- ] }, i._id)) }),
59
- /* @__PURE__ */ t(
60
- h,
61
- {
62
- as: "button",
63
- variant: "secondary",
64
- onClick: n,
65
- disabled: a,
66
- className: s.applyFilters,
67
- children: "Apply Filters"
68
- }
69
- )
70
- ]
71
- }
72
- );
73
- }
74
- export {
75
- A as C,
76
- s
77
- };
@@ -1 +0,0 @@
1
- "use strict";require('./assets/CategoryFilters.css');const i=require("react/jsx-runtime"),f=require("./index-CAxKHP72.cjs"),g=require("./x-Dft9NVe_.cjs"),h="_documentList_1firg_1",u="_container_1firg_9",p="_heading_1firg_20",x="_listContainer_1firg_30",F="_listWrapper_1firg_41",H="_list_1firg_30",L="_listHeader_1firg_62",S="_listSearch_1firg_75",j="_clearSearch_1firg_102",m="_listHeaderFilters_1firg_121",b="_listResults_1firg_132",y="_listSort_1firg_136",C="_filterToggle_1firg_159",k="_filterHeader_1firg_174",v="_loadMore_1firg_195",w="_filterList_1firg_199",q="_listFilters_1firg_206",N="_applyFilters_1firg_214",$="_show_1firg_243",I="_hide_1firg_252",M="_buttonIsLoading_1firg_301",t={documentList:h,container:u,heading:p,listContainer:x,listWrapper:F,list:H,listHeader:L,listSearch:S,clearSearch:j,listHeaderFilters:m,listResults:b,listSort:y,filterToggle:C,filterHeader:k,loadMore:v,filterList:w,listFilters:q,applyFilters:N,show:$,hide:I,buttonIsLoading:M};function R({categoryFilters:e,selectedCategories:r,onSelectionChange:n,showFilters:_,toggleFilters:l,isLoading:o}){return i.jsxs("div",{className:`${t.listFilters} ${_?t.show:t.hide}`,children:[i.jsxs("div",{className:t.filterHeader,children:[i.jsx("h5",{children:"Filters"}),i.jsx("button",{onClick:l,children:i.jsx(g.X,{size:24})})]}),i.jsx("div",{className:t.filterList,children:e==null?void 0:e.map(s=>i.jsxs("label",{children:[i.jsx("input",{type:"checkbox",value:s._id,checked:r.includes(s._id),onChange:c=>{const a=c.target.checked?[...r,s._id]:r.filter(d=>d!==s._id);n(a)}}),s.title]},s._id))}),i.jsx(f.Button,{as:"button",variant:"secondary",onClick:l,disabled:o,className:t.applyFilters,children:"Apply Filters"})]})}exports.CategoryFilters=R;exports.styles=t;
@@ -1,202 +0,0 @@
1
- import { jsx as t, jsxs as h } from "react/jsx-runtime";
2
- import { memo as v, forwardRef as p, useRef as y, useImperativeHandle as b, useEffect as g } from "react";
3
- import { buildEmbedSrc as x, resolveImageUrl as w, resolveAltText as N } from "./next/utils/mediaUtils.mjs";
4
- import { c as C } from "./createLucideIcon-C8GTh_Qx.js";
5
- import { P as k } from "./play-DYgKiSaf.js";
6
- import './assets/HeroSubComponents.css';/**
7
- * @license lucide-react v0.488.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */
12
- const B = [
13
- ["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
14
- ["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
15
- ], V = C("pause", B), I = "_hero_1vvl6_1", E = "_container_1vvl6_7", z = "_heading_1vvl6_15", T = "_text_1vvl6_22", j = "_eyebrow_1vvl6_37", H = "_disclaimer_1vvl6_41", D = "_articleDetails_1vvl6_53", F = "_articleType_1vvl6_66", P = "_articleCategories_1vvl6_80", R = "_category_1vvl6_86", A = "_number_1vvl6_102", S = "_blog_1vvl6_129", L = "_overlay_1vvl6_155", U = "_tile_1vvl6_225", Y = "_fullBleed_1vvl6_326", q = "_media_1vvl6_353", G = "_splitAlt_1vvl6_442", J = "_split_1vvl6_442", K = "_videoControl_1vvl6_506", M = "_videoBackground_1vvl6_549", O = "_iframe_1vvl6_550", c = {
16
- hero: I,
17
- container: E,
18
- heading: z,
19
- text: T,
20
- eyebrow: j,
21
- disclaimer: H,
22
- articleDetails: D,
23
- articleType: F,
24
- articleCategories: P,
25
- category: R,
26
- number: A,
27
- default: "_default_1vvl6_125",
28
- blog: S,
29
- overlay: L,
30
- tile: U,
31
- fullBleed: Y,
32
- media: q,
33
- splitAlt: G,
34
- split: J,
35
- videoControl: K,
36
- videoBackground: M,
37
- iframe: O
38
- }, Q = v(function({
39
- isPlaying: e,
40
- onToggle: i
41
- }) {
42
- return /* @__PURE__ */ t(
43
- "button",
44
- {
45
- type: "button",
46
- title: e ? "Pause the video" : "Play the video",
47
- "aria-label": e ? "Pause video" : "Play video",
48
- className: c.videoControl,
49
- onClick: i,
50
- children: e ? /* @__PURE__ */ t(V, { size: 18, "aria-hidden": !0 }) : /* @__PURE__ */ t(k, { size: 18, "aria-hidden": !0 })
51
- }
52
- );
53
- }), m = v(function({
54
- url: e,
55
- provider: i,
56
- wrapperClassName: a,
57
- iframeClassName: l
58
- }) {
59
- const r = x(e, i);
60
- return /* @__PURE__ */ t("div", { className: a, children: /* @__PURE__ */ t(
61
- "iframe",
62
- {
63
- src: r,
64
- className: l,
65
- allow: "autoplay; fullscreen",
66
- allowFullScreen: !0,
67
- title: "Embedded video",
68
- "aria-label": "Background video"
69
- }
70
- ) });
71
- }), f = v(
72
- p(function({
73
- src: e,
74
- autoPlay: i,
75
- posterUrl: a,
76
- wrapperClassName: l,
77
- videoClassName: r,
78
- isPlaying: s,
79
- onToggle: d
80
- }, _) {
81
- const n = y(null);
82
- return b(_, () => ({
83
- play() {
84
- var o;
85
- (o = n.current) == null || o.play().catch(() => {
86
- });
87
- },
88
- pause() {
89
- var o;
90
- (o = n.current) == null || o.pause();
91
- }
92
- })), g(() => {
93
- const o = n.current;
94
- o && (s ? o.play().catch(() => {
95
- }) : o.pause());
96
- }, [s]), /* @__PURE__ */ h("div", { className: l, style: { position: "relative" }, children: [
97
- /* @__PURE__ */ t(Q, { isPlaying: s, onToggle: d }),
98
- /* @__PURE__ */ t(
99
- "video",
100
- {
101
- ref: n,
102
- src: e,
103
- autoPlay: i,
104
- loop: !0,
105
- muted: !0,
106
- playsInline: !0,
107
- poster: a,
108
- preload: "metadata",
109
- className: r,
110
- "aria-label": "Background video"
111
- }
112
- )
113
- ] });
114
- })
115
- ), te = v(function({
116
- url: e,
117
- autoPlay: i,
118
- posterUrl: a,
119
- isPlaying: l,
120
- onToggle: r,
121
- variant: s
122
- }) {
123
- const d = e.includes("vimeo.com"), _ = e.includes("youtube.com") || e.includes("youtu.be"), n = d || _, o = d ? "vimeo" : "youtube";
124
- return s === "inline" ? n ? /* @__PURE__ */ t(
125
- m,
126
- {
127
- url: e,
128
- provider: o,
129
- wrapperClassName: c.media
130
- }
131
- ) : /* @__PURE__ */ t(
132
- f,
133
- {
134
- src: e,
135
- autoPlay: i,
136
- posterUrl: a,
137
- wrapperClassName: c.media,
138
- isPlaying: l,
139
- onToggle: r
140
- }
141
- ) : n ? /* @__PURE__ */ t(
142
- m,
143
- {
144
- url: e,
145
- provider: o,
146
- wrapperClassName: c.videoBackground,
147
- iframeClassName: c.iframe
148
- }
149
- ) : /* @__PURE__ */ t(
150
- f,
151
- {
152
- src: e,
153
- autoPlay: i,
154
- posterUrl: a,
155
- videoClassName: c.videoBackground,
156
- isPlaying: l,
157
- onToggle: r
158
- }
159
- );
160
- }), oe = v(function({
161
- image: e,
162
- mode: i,
163
- variant: a,
164
- imageAdapter: l
165
- }) {
166
- const r = w(e, i, "medium");
167
- if (!r) return null;
168
- const s = N(e, i), d = /* @__PURE__ */ t(
169
- "img",
170
- {
171
- src: r,
172
- alt: s,
173
- draggable: !1,
174
- style: a === "fill" ? { objectFit: "cover", width: "100%", height: "100%" } : { width: "100%", height: "auto" }
175
- }
176
- );
177
- return l ? /* @__PURE__ */ t("div", { className: c.media, children: a === "fill" ? l.render({
178
- src: r,
179
- alt: s,
180
- fill: !0,
181
- priority: !0,
182
- fetchPriority: "high",
183
- style: { objectFit: "cover" },
184
- draggable: !1,
185
- sizes: "(max-width: 767px) 600px, 1200px"
186
- }) : l.render({
187
- src: r,
188
- alt: s,
189
- width: 650,
190
- height: 750,
191
- priority: !0,
192
- fetchPriority: "high"
193
- }) }) : /* @__PURE__ */ t("div", { className: c.media, children: d });
194
- });
195
- export {
196
- oe as H,
197
- f as N,
198
- te as V,
199
- Q as a,
200
- m as b,
201
- c as s
202
- };
@@ -1,6 +0,0 @@
1
- "use strict";require('./assets/HeroSubComponents.css');const t=require("react/jsx-runtime"),c=require("react"),m=require("./next/utils/mediaUtils.cjs"),y=require("./createLucideIcon-DpotSgUx.cjs"),x=require("./play-CQBnZgNa.cjs");/**
2
- * @license lucide-react v0.488.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const b=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],g=y.createLucideIcon("pause",b),j="_hero_1vvl6_1",w="_container_1vvl6_7",C="_heading_1vvl6_15",N="_text_1vvl6_22",k="_eyebrow_1vvl6_37",B="_disclaimer_1vvl6_41",V="_articleDetails_1vvl6_53",I="_articleType_1vvl6_66",E="_articleCategories_1vvl6_80",q="_category_1vvl6_86",z="_number_1vvl6_102",T="_blog_1vvl6_129",H="_overlay_1vvl6_155",R="_tile_1vvl6_225",D="_fullBleed_1vvl6_326",F="_media_1vvl6_353",A="_splitAlt_1vvl6_442",L="_split_1vvl6_442",P="_videoControl_1vvl6_506",S="_videoBackground_1vvl6_549",U="_iframe_1vvl6_550",n={hero:j,container:w,heading:C,text:N,eyebrow:k,disclaimer:B,articleDetails:V,articleType:I,articleCategories:E,category:q,number:z,default:"_default_1vvl6_125",blog:T,overlay:H,tile:R,fullBleed:D,media:F,splitAlt:A,split:L,videoControl:P,videoBackground:S,iframe:U},p=c.memo(function({isPlaying:e,onToggle:i}){return t.jsx("button",{type:"button",title:e?"Pause the video":"Play the video","aria-label":e?"Pause video":"Play video",className:n.videoControl,onClick:i,children:e?t.jsx(g,{size:18,"aria-hidden":!0}):t.jsx(x.Play,{size:18,"aria-hidden":!0})})}),h=c.memo(function({url:e,provider:i,wrapperClassName:s,iframeClassName:l}){const r=m.buildEmbedSrc(e,i);return t.jsx("div",{className:s,children:t.jsx("iframe",{src:r,className:l,allow:"autoplay; fullscreen",allowFullScreen:!0,title:"Embedded video","aria-label":"Background video"})})}),f=c.memo(c.forwardRef(function({src:e,autoPlay:i,posterUrl:s,wrapperClassName:l,videoClassName:r,isPlaying:a,onToggle:v},_){const d=c.useRef(null);return c.useImperativeHandle(_,()=>({play(){var o;(o=d.current)==null||o.play().catch(()=>{})},pause(){var o;(o=d.current)==null||o.pause()}})),c.useEffect(()=>{const o=d.current;o&&(a?o.play().catch(()=>{}):o.pause())},[a]),t.jsxs("div",{className:l,style:{position:"relative"},children:[t.jsx(p,{isPlaying:a,onToggle:v}),t.jsx("video",{ref:d,src:e,autoPlay:i,loop:!0,muted:!0,playsInline:!0,poster:s,preload:"metadata",className:r,"aria-label":"Background video"})]})})),$=c.memo(function({url:e,autoPlay:i,posterUrl:s,isPlaying:l,onToggle:r,variant:a}){const v=e.includes("vimeo.com"),_=e.includes("youtube.com")||e.includes("youtu.be"),d=v||_,o=v?"vimeo":"youtube";return a==="inline"?d?t.jsx(h,{url:e,provider:o,wrapperClassName:n.media}):t.jsx(f,{src:e,autoPlay:i,posterUrl:s,wrapperClassName:n.media,isPlaying:l,onToggle:r}):d?t.jsx(h,{url:e,provider:o,wrapperClassName:n.videoBackground,iframeClassName:n.iframe}):t.jsx(f,{src:e,autoPlay:i,posterUrl:s,videoClassName:n.videoBackground,isPlaying:l,onToggle:r})}),Y=c.memo(function({image:e,mode:i,variant:s,imageAdapter:l}){const r=m.resolveImageUrl(e,i,"medium");if(!r)return null;const a=m.resolveAltText(e,i),v=t.jsx("img",{src:r,alt:a,draggable:!1,style:s==="fill"?{objectFit:"cover",width:"100%",height:"100%"}:{width:"100%",height:"auto"}});return l?t.jsx("div",{className:n.media,children:s==="fill"?l.render({src:r,alt:a,fill:!0,priority:!0,fetchPriority:"high",style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):l.render({src:r,alt:a,width:650,height:750,priority:!0,fetchPriority:"high"})}):t.jsx("div",{className:n.media,children:v})});exports.HeroImage=Y;exports.NativeVideo=f;exports.VideoBlock=$;exports.VideoControl=p;exports.VideoEmbed=h;exports.styles=n;