quirk-ui 0.1.44 → 0.1.45

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index35.css');const e=require("react/jsx-runtime"),r=require("react"),M=require("react-dom"),R=require("../../../x-Dft9NVe_.cjs"),T="_overlay_1hf1u_2",D="_fadeIn_1hf1u_1",P="_modal_1hf1u_19",U="_slideUp_1hf1u_1",A="_trigger_1hf1u_54",C="_closeButton_1hf1u_61",F="_title_1hf1u_89",K="_content_1hf1u_99",l={overlay:T,fadeIn:D,modal:P,slideUp:U,"size-sm":"_size-sm_1hf1u_31","size-md":"_size-md_1hf1u_35","size-lg":"_size-lg_1hf1u_39","size-xl":"_size-xl_1hf1u_43","size-full":"_size-full_1hf1u_47",trigger:A,closeButton:C,title:F,content:K},X=()=>{typeof document<"u"&&(document.body.style.overflow="hidden")},b=()=>{typeof document<"u"&&(document.body.style.overflow="")};function G({content:x,trigger:k,isOpen:h,onOpen:o,onClose:i,size:z="md",closeOnEscape:y=!0,closeOnOverlayClick:j=!0,showCloseButton:p=!0,className:w,overlayClassName:$,style:E,title:f}){const[q,v]=r.useState(!1),_=r.useRef(null),m=h!==void 0,t=m?h:q,N=()=>{m||v(!0),o==null||o()},d=()=>{m||v(!1),i==null||i()},S=()=>{t?d():N()},I=()=>{j&&d()};r.useEffect(()=>{if(!y||!t)return;const n=c=>{c.key==="Escape"&&d()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t,y]),r.useEffect(()=>(t?X():b(),()=>b()),[t]),r.useEffect(()=>{if(!t||!_.current)return;const n=_.current,c=n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=c[0],a=c[c.length-1],g=u=>{u.key==="Tab"&&(u.shiftKey?document.activeElement===s&&(u.preventDefault(),a==null||a.focus()):document.activeElement===a&&(u.preventDefault(),s==null||s.focus()))};return n.addEventListener("keydown",g),s==null||s.focus(),()=>{n.removeEventListener("keydown",g)}},[t]);const B=l[`size-${z}`]||"",L=t?e.jsx("div",{className:`${l.overlay} ${$??""}`.trim(),onClick:I,role:"dialog","aria-modal":"true","aria-labelledby":f?"modal-title":void 0,children:e.jsxs("div",{ref:_,className:`${l.modal} ${B} ${w??""}`.trim(),style:E,onClick:n=>n.stopPropagation(),children:[p&&e.jsx("button",{"aria-label":"Close",className:l.closeButton,onClick:d,type:"button",children:e.jsx(R.X,{size:20})}),f&&e.jsx("div",{className:l.title,id:"modal-title",children:f}),e.jsx("div",{className:l.content,children:x})]})}):null;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:l.trigger,onClick:S,children:k}),typeof window<"u"&&M.createPortal(L,document.body)]})}exports.Modal=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index35.css');const e=require("react/jsx-runtime"),c=require("react"),M=require("react-dom"),R=require("../../../x-Dft9NVe_.cjs"),T="_overlay_1h84d_2",D="_fadeIn_1h84d_1",P="_modal_1h84d_19",U="_slideUp_1h84d_1",A="_trigger_1h84d_54",C="_closeButton_1h84d_61",F="_title_1h84d_89",K="_content_1h84d_99",l={overlay:T,fadeIn:D,modal:P,slideUp:U,"size-sm":"_size-sm_1h84d_31","size-md":"_size-md_1h84d_35","size-lg":"_size-lg_1h84d_39","size-xl":"_size-xl_1h84d_43","size-full":"_size-full_1h84d_47",trigger:A,closeButton:C,title:F,content:K},X=()=>{typeof document<"u"&&(document.body.style.overflow="hidden")},b=()=>{typeof document<"u"&&(document.body.style.overflow="")};function G({content:x,trigger:k,isOpen:h,onOpen:i,onClose:o,size:z="md",closeOnEscape:v=!0,closeOnOverlayClick:j=!0,showCloseButton:p=!0,className:w,overlayClassName:$,style:E,title:f}){const[q,y]=c.useState(!1),_=c.useRef(null),m=h!==void 0,t=m?h:q,N=()=>{m||y(!0),i==null||i()},r=()=>{m||y(!1),o==null||o()},S=()=>{t?r():N()},I=()=>{j&&r()};c.useEffect(()=>{if(!v||!t)return;const s=d=>{d.key==="Escape"&&r()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t,v]),c.useEffect(()=>(t?X():b(),()=>b()),[t]),c.useEffect(()=>{if(!t||!_.current)return;const s=_.current,d=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=d[0],a=d[d.length-1],g=u=>{u.key==="Tab"&&(u.shiftKey?document.activeElement===n&&(u.preventDefault(),a==null||a.focus()):document.activeElement===a&&(u.preventDefault(),n==null||n.focus()))};return s.addEventListener("keydown",g),n==null||n.focus(),()=>{s.removeEventListener("keydown",g)}},[t]);const B=l[`size-${z}`]||"",L=t?e.jsx("div",{className:`${l.overlay} ${$??""}`.trim(),onClick:I,role:"dialog","aria-modal":"true","aria-labelledby":f?"modal-title":void 0,children:e.jsxs("div",{style:{position:"relative"},children:[p&&e.jsx("button",{"aria-label":"Close",className:l.closeButton,onClick:r,type:"button",children:e.jsx(R.X,{size:20})}),e.jsxs("div",{ref:_,className:`${l.modal} ${B} ${w??""}`.trim(),style:E,onClick:s=>s.stopPropagation(),children:[f&&e.jsx("div",{className:l.title,id:"modal-title",children:f}),e.jsx("div",{className:l.content,children:x})]})]})}):null;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:l.trigger,onClick:S,children:k}),typeof window<"u"&&M.createPortal(L,document.body)]})}exports.Modal=G;
@@ -1,34 +1,34 @@
1
- import { jsxs as b, Fragment as D, jsx as s } from "react/jsx-runtime";
2
- import { useState as P, useRef as R, useEffect as _ } from "react";
1
+ import { jsxs as _, Fragment as D, jsx as d } from "react/jsx-runtime";
2
+ import { useState as P, useRef as R, useEffect as h } from "react";
3
3
  import { createPortal as q } from "react-dom";
4
4
  import { X as A } from "../../../x-CnsEH4Ox.js";
5
- import '../../../index35.css';const C = "_overlay_1hf1u_2", F = "_fadeIn_1hf1u_1", K = "_modal_1hf1u_19", M = "_slideUp_1hf1u_1", X = "_trigger_1hf1u_54", G = "_closeButton_1hf1u_61", H = "_title_1hf1u_89", J = "_content_1hf1u_99", o = {
5
+ import '../../../index35.css';const C = "_overlay_1h84d_2", F = "_fadeIn_1h84d_1", K = "_modal_1h84d_19", M = "_slideUp_1h84d_1", X = "_trigger_1h84d_54", G = "_closeButton_1h84d_61", H = "_title_1h84d_89", J = "_content_1h84d_99", l = {
6
6
  overlay: C,
7
7
  fadeIn: F,
8
8
  modal: K,
9
9
  slideUp: M,
10
- "size-sm": "_size-sm_1hf1u_31",
11
- "size-md": "_size-md_1hf1u_35",
12
- "size-lg": "_size-lg_1hf1u_39",
13
- "size-xl": "_size-xl_1hf1u_43",
14
- "size-full": "_size-full_1hf1u_47",
10
+ "size-sm": "_size-sm_1h84d_31",
11
+ "size-md": "_size-md_1h84d_35",
12
+ "size-lg": "_size-lg_1h84d_39",
13
+ "size-xl": "_size-xl_1h84d_43",
14
+ "size-full": "_size-full_1h84d_47",
15
15
  trigger: X,
16
16
  closeButton: G,
17
17
  title: H,
18
18
  content: J
19
19
  }, Q = () => {
20
20
  typeof document < "u" && (document.body.style.overflow = "hidden");
21
- }, k = () => {
21
+ }, p = () => {
22
22
  typeof document < "u" && (document.body.style.overflow = "");
23
23
  };
24
24
  function O({
25
- content: p,
25
+ content: k,
26
26
  trigger: z,
27
- isOpen: h,
28
- onOpen: l,
27
+ isOpen: v,
28
+ onOpen: o,
29
29
  onClose: i,
30
30
  size: w = "md",
31
- closeOnEscape: v = !0,
31
+ closeOnEscape: y = !0,
32
32
  closeOnOverlayClick: x = !0,
33
33
  showCloseButton: N = !0,
34
34
  className: $,
@@ -36,67 +36,69 @@ function O({
36
36
  style: I,
37
37
  title: u
38
38
  }) {
39
- const [B, y] = P(!1), f = R(null), m = h !== void 0, e = m ? h : B, L = () => {
40
- m || y(!0), l == null || l();
39
+ const [B, g] = P(!1), f = R(null), m = v !== void 0, e = m ? v : B, L = () => {
40
+ m || g(!0), o == null || o();
41
41
  }, r = () => {
42
- m || y(!1), i == null || i();
42
+ m || g(!1), i == null || i();
43
43
  }, S = () => {
44
44
  e ? r() : L();
45
45
  }, T = () => {
46
46
  x && r();
47
47
  };
48
- _(() => {
49
- if (!v || !e) return;
50
- const t = (c) => {
51
- c.key === "Escape" && r();
48
+ h(() => {
49
+ if (!y || !e) return;
50
+ const t = (s) => {
51
+ s.key === "Escape" && r();
52
52
  };
53
53
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
54
- }, [e, v]), _(() => (e ? Q() : k(), () => k()), [e]), _(() => {
54
+ }, [e, y]), h(() => (e ? Q() : p(), () => p()), [e]), h(() => {
55
55
  if (!e || !f.current) return;
56
- const t = f.current, c = t.querySelectorAll(
56
+ const t = f.current, s = t.querySelectorAll(
57
57
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
58
- ), n = c[0], d = c[c.length - 1], g = (a) => {
59
- a.key === "Tab" && (a.shiftKey ? document.activeElement === n && (a.preventDefault(), d == null || d.focus()) : document.activeElement === d && (a.preventDefault(), n == null || n.focus()));
58
+ ), n = s[0], c = s[s.length - 1], b = (a) => {
59
+ a.key === "Tab" && (a.shiftKey ? document.activeElement === n && (a.preventDefault(), c == null || c.focus()) : document.activeElement === c && (a.preventDefault(), n == null || n.focus()));
60
60
  };
61
- return t.addEventListener("keydown", g), n == null || n.focus(), () => {
62
- t.removeEventListener("keydown", g);
61
+ return t.addEventListener("keydown", b), n == null || n.focus(), () => {
62
+ t.removeEventListener("keydown", b);
63
63
  };
64
64
  }, [e]);
65
- const U = o[`size-${w}`] || "", j = e ? /* @__PURE__ */ s(
65
+ const U = l[`size-${w}`] || "", j = e ? /* @__PURE__ */ d(
66
66
  "div",
67
67
  {
68
- className: `${o.overlay} ${E ?? ""}`.trim(),
68
+ className: `${l.overlay} ${E ?? ""}`.trim(),
69
69
  onClick: T,
70
70
  role: "dialog",
71
71
  "aria-modal": "true",
72
72
  "aria-labelledby": u ? "modal-title" : void 0,
73
- children: /* @__PURE__ */ b(
74
- "div",
75
- {
76
- ref: f,
77
- className: `${o.modal} ${U} ${$ ?? ""}`.trim(),
78
- style: I,
79
- onClick: (t) => t.stopPropagation(),
80
- children: [
81
- N && /* @__PURE__ */ s(
82
- "button",
83
- {
84
- "aria-label": "Close",
85
- className: o.closeButton,
86
- onClick: r,
87
- type: "button",
88
- children: /* @__PURE__ */ s(A, { size: 20 })
89
- }
90
- ),
91
- u && /* @__PURE__ */ s("div", { className: o.title, id: "modal-title", children: u }),
92
- /* @__PURE__ */ s("div", { className: o.content, children: p })
93
- ]
94
- }
95
- )
73
+ children: /* @__PURE__ */ _("div", { style: { position: "relative" }, children: [
74
+ N && /* @__PURE__ */ d(
75
+ "button",
76
+ {
77
+ "aria-label": "Close",
78
+ className: l.closeButton,
79
+ onClick: r,
80
+ type: "button",
81
+ children: /* @__PURE__ */ d(A, { size: 20 })
82
+ }
83
+ ),
84
+ /* @__PURE__ */ _(
85
+ "div",
86
+ {
87
+ ref: f,
88
+ className: `${l.modal} ${U} ${$ ?? ""}`.trim(),
89
+ style: I,
90
+ onClick: (t) => t.stopPropagation(),
91
+ children: [
92
+ u && /* @__PURE__ */ d("div", { className: l.title, id: "modal-title", children: u }),
93
+ /* @__PURE__ */ d("div", { className: l.content, children: k })
94
+ ]
95
+ }
96
+ )
97
+ ] })
96
98
  }
97
99
  ) : null;
98
- return /* @__PURE__ */ b(D, { children: [
99
- /* @__PURE__ */ s("div", { className: o.trigger, onClick: S, children: z }),
100
+ return /* @__PURE__ */ _(D, { children: [
101
+ /* @__PURE__ */ d("div", { className: l.trigger, onClick: S, children: z }),
100
102
  typeof window < "u" && q(j, document.body)
101
103
  ] });
102
104
  }
package/dist/index35.css CHANGED
@@ -1 +1 @@
1
- ._overlay_1hf1u_2{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;animation:_fadeIn_1hf1u_1 .2s ease;padding:var(--spacing-md, 1rem);overflow-y:auto}._modal_1hf1u_19{position:relative;background-color:var(--color-foreground, #fff);border-radius:var(--radius-lg, .5rem);padding:var(--spacing-xl, 2rem);max-height:90vh;overflow-y:auto;animation:_slideUp_1hf1u_1 .3s ease;box-shadow:var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .1))}._size-sm_1hf1u_31{width:min(90%,400px)}._size-md_1hf1u_35{width:min(90%,600px)}._size-lg_1hf1u_39{width:min(90%,800px)}._size-xl_1hf1u_43{width:min(90%,1200px)}._size-full_1hf1u_47{width:95%;height:95vh;max-height:95vh}._trigger_1hf1u_54{width:auto;display:inline-block;cursor:pointer}._closeButton_1hf1u_61{position:absolute;top:var(--spacing-md, 1rem);right:var(--spacing-md, 1rem);background:none;border:none;cursor:pointer;padding:var(--spacing-xs, .25rem);border-radius:var(--radius-sm, .25rem);color:var(--color-text-secondary, #666);transition:all .2s ease;display:flex;align-items:center;justify-content:center;z-index:1}._closeButton_1hf1u_61:hover{background-color:var(--color-secondary-10, #f5f5f5);color:var(--color-text-primary, #333)}._closeButton_1hf1u_61:focus-visible{outline:2px solid var(--color-primary-100, #007bff);outline-offset:2px}._title_1hf1u_89{font-size:var(--font-size-xl, 1.5rem);font-weight:var(--font-weight-bold, 700);color:var(--color-heading, #111);margin-bottom:var(--spacing-lg, 1.5rem);padding-right:var(--spacing-xl, 2rem);line-height:var(--line-height-heading, 1.2)}._content_1hf1u_99{color:var(--color-text-primary, #333);line-height:var(--line-height-normal, 1.5)}._content_1hf1u_99 video{width:100%;max-width:100%;height:auto;border-radius:var(--radius-md, .5rem)}._content_1hf1u_99 img{max-width:100%;height:auto;border-radius:var(--radius-md, .5rem)}@keyframes _fadeIn_1hf1u_1{0%{opacity:0}to{opacity:1}}@keyframes _slideUp_1hf1u_1{0%{opacity:0;transform:translateY(30px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@media (max-width: 768px){._modal_1hf1u_19{padding:var(--spacing-lg, 1.5rem);max-height:85vh}._size-sm_1hf1u_31,._size-md_1hf1u_35,._size-lg_1hf1u_39,._size-xl_1hf1u_43{width:95%}._title_1hf1u_89{font-size:var(--font-size-lg, 1.25rem);padding-right:var(--spacing-lg, 1.5rem)}}@media (max-width: 480px){._overlay_1hf1u_2{padding:var(--spacing-sm, .5rem)}._modal_1hf1u_19{padding:var(--spacing-md, 1rem);max-height:90vh}._closeButton_1hf1u_61{top:var(--spacing-sm, .5rem);right:var(--spacing-sm, .5rem)}._title_1hf1u_89{font-size:var(--font-size-md, 1rem);margin-bottom:var(--spacing-md, 1rem)}}
1
+ ._overlay_1h84d_2{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;animation:_fadeIn_1h84d_1 .2s ease;padding:var(--spacing-md, 1rem);overflow-y:auto}._modal_1h84d_19{position:relative;background-color:var(--color-foreground, #fff);border-radius:var(--radius-lg, .5rem);padding:var(--spacing-xl, 2rem);max-height:90vh;overflow-y:auto;animation:_slideUp_1h84d_1 .3s ease;box-shadow:var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .1))}._size-sm_1h84d_31{width:min(90%,400px)}._size-md_1h84d_35{width:min(90%,600px)}._size-lg_1h84d_39{width:min(90%,800px)}._size-xl_1h84d_43{width:min(90%,1200px)}._size-full_1h84d_47{width:95%;height:95vh;max-height:95vh}._trigger_1h84d_54{width:auto;display:inline-block;cursor:pointer}._closeButton_1h84d_61{position:absolute;top:-2rem;right:2.5rem;background:none;border:none;cursor:pointer;padding:var(--spacing-xs, .25rem);border-radius:var(--radius-sm, .25rem);color:#fff;transition:all .2s ease;display:flex;align-items:center;justify-content:center;z-index:1}._closeButton_1h84d_61:hover{background-color:var(--color-secondary-10, #f5f5f5);color:var(--color-text-primary, #333)}._closeButton_1h84d_61:focus-visible{outline:2px solid var(--color-primary-100, #007bff);outline-offset:2px}._title_1h84d_89{font-size:var(--font-size-xl, 1.5rem);font-weight:var(--font-weight-bold, 700);color:var(--color-heading, #111);margin-bottom:var(--spacing-lg, 1.5rem);padding-right:var(--spacing-xl, 2rem);line-height:var(--line-height-heading, 1.2)}._content_1h84d_99{color:var(--color-text-primary, #333);line-height:var(--line-height-normal, 1.5)}._content_1h84d_99 video{width:100%;max-width:100%;height:auto;border-radius:var(--radius-md, .5rem)}._content_1h84d_99 img{max-width:100%;height:auto;border-radius:var(--radius-md, .5rem)}@keyframes _fadeIn_1h84d_1{0%{opacity:0}to{opacity:1}}@keyframes _slideUp_1h84d_1{0%{opacity:0;transform:translateY(30px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@media (max-width: 768px){._modal_1h84d_19{padding:var(--spacing-lg, 1.5rem);max-height:85vh}._size-sm_1h84d_31,._size-md_1h84d_35,._size-lg_1h84d_39,._size-xl_1h84d_43{width:95%}._title_1h84d_89{font-size:var(--font-size-lg, 1.25rem);padding-right:var(--spacing-lg, 1.5rem)}}@media (max-width: 480px){._overlay_1h84d_2{padding:var(--spacing-sm, .5rem)}._modal_1h84d_19{padding:var(--spacing-md, 1rem);max-height:90vh}._closeButton_1h84d_61{top:var(--spacing-sm, .5rem);right:var(--spacing-sm, .5rem)}._title_1h84d_89{font-size:var(--font-size-md, 1rem);margin-bottom:var(--spacing-md, 1rem)}}
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index60.css');const t=require("react/jsx-runtime");;/* empty css */require("react");require("../../../core/components/Avatar/index.cjs");const f=require("../../../core/components/Badge/index.cjs");require("../../../core/components/Checkbox/index.cjs");require("react-dom");require("../../../core/components/Tabs/index.cjs");require("../../../core/tokens/theme.cjs");const j=require("../../../core/context/ThemeContext.cjs"),C=require("../../../createLucideIcon-DpotSgUx.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index60.css');const t=require("react/jsx-runtime");;/* empty css */require("react");require("../../../core/components/Avatar/index.cjs");const g=require("../../../core/components/Badge/index.cjs");require("../../../core/components/Checkbox/index.cjs");require("react-dom");require("../../../core/components/Tabs/index.cjs");require("../../../core/tokens/theme.cjs");const j=require("../../../core/context/ThemeContext.cjs"),C=require("../../../createLucideIcon-DpotSgUx.cjs");/**
2
2
  * @license lucide-react v0.488.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const T=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],N=C.createLucideIcon("arrow-up-right",T),q="_item_1vn4l_1",k="_itemImage_1vn4l_14",I="_itemTitle_1vn4l_20",b="_callToAction_1vn4l_26",A="_icon_1vn4l_33",w="_single_1vn4l_39",E="_first_1vn4l_40",U="_itemContent_1vn4l_41",B="_itemExcerpt_1vn4l_113",P="_imagePlaceholder_1vn4l_180",z="_category_1vn4l_229",L="_itemEyebrow_1vn4l_248",r={item:q,itemImage:k,itemTitle:I,callToAction:b,icon:A,single:w,first:E,itemContent:U,itemExcerpt:B,imagePlaceholder:P,category:z,itemEyebrow:L};function M(e,i){var n;if(e!=null&&e.imageUrls)return i==="dark"?((n=e.imageUrls.dark)==null?void 0:n.medium)??e.imageUrls.default.medium:e.imageUrls.default.medium}function $(e,i){var l,a,c,s;const n=i==="dark"?"darkImage":"defaultImage";return((a=(l=e==null?void 0:e[n])==null?void 0:l.asset)==null?void 0:a.altText)??((s=(c=e==null?void 0:e[n])==null?void 0:c.asset)==null?void 0:s.description)??"Card image"}function F(e){var l,a;const i=((l=e.categories)==null?void 0:l.find(c=>{var s,o;return!((o=(s=c.slug)==null?void 0:s.current)!=null&&o.startsWith("library/type"))}))??null,n=((a=e.categories)==null?void 0:a.find(c=>{var s,o;return(o=(s=c.slug)==null?void 0:s.current)==null?void 0:o.startsWith("library/type")}))??null;return{mainCategory:i,typeCategory:n}}function S({href:e,className:i,children:n}){return t.jsx("a",{href:e,className:i,children:n})}function W({article:e,className:i="",index:n,layout:l,limit:a,renderImage:c,renderLink:s}){const{mode:o}=j.useTheme(),u=`/blog/articles/${e.slug.current}`,m=M(e.featuredImage,o),_=$(e.featuredImage,o),{mainCategory:g,typeCategory:x}=F(e),v=[r.item,i,n===0?r.first:"",a===1?r.single:"",l??""].filter(Boolean).join(" "),h=t.jsxs("div",{className:r.itemImage,children:[x&&t.jsx("div",{className:r.category,children:x.title}),m?c?c({src:m,alt:_,fill:!0,sizes:"(max-width: 767px) 650px, 300px",priority:!0}):t.jsx("img",{src:m,alt:_,style:{width:"100%",height:"100%",objectFit:"cover"}}):t.jsx("div",{className:r.imagePlaceholder})]}),y=t.jsxs(t.Fragment,{children:[h,t.jsxs("div",{className:r.itemContent,children:[g&&t.jsx(f.Badge,{className:r.itemEyebrow,text:g.title,variant:"muted"}),t.jsxs("div",{className:r.itemTitle,children:[t.jsx("h3",{children:e.title}),t.jsx("div",{className:r.callToAction,children:t.jsx("div",{className:r.icon,children:t.jsx(N,{size:45})})})]}),e.excerpt&&t.jsx("p",{className:r.itemExcerpt,children:e.excerpt})]})]}),p=s?({children:d})=>s({href:u,className:v,children:d}):({children:d})=>t.jsx(S,{href:u,className:v,children:d});return t.jsx(p,{children:y})}exports.BlogArticleCard=W;
6
+ */const T=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],N=C.createLucideIcon("arrow-up-right",T),q="_item_1vn4l_1",I="_itemImage_1vn4l_14",b="_itemTitle_1vn4l_20",k="_callToAction_1vn4l_26",A="_icon_1vn4l_33",w="_single_1vn4l_39",E="_first_1vn4l_40",U="_itemContent_1vn4l_41",B="_itemExcerpt_1vn4l_113",P="_imagePlaceholder_1vn4l_180",L="_category_1vn4l_229",z="_itemEyebrow_1vn4l_248",s={item:q,itemImage:I,itemTitle:b,callToAction:k,icon:A,single:w,first:E,itemContent:U,itemExcerpt:B,imagePlaceholder:P,category:L,itemEyebrow:z};function M(e,i){var r;if(e!=null&&e.imageUrls)return i==="dark"?((r=e.imageUrls.dark)==null?void 0:r.medium)??e.imageUrls.default.medium:e.imageUrls.default.medium}function $(e,i){var c,n,o,u,d,m;if(!e)return"Card image";const r=i==="dark"?"darkImage":"defaultImage",l=((n=(c=e==null?void 0:e[r])==null?void 0:c.asset)==null?void 0:n.altText)??((u=(o=e==null?void 0:e[r])==null?void 0:o.asset)==null?void 0:u.description);if(l)return l;const a=((d=e==null?void 0:e.asset)==null?void 0:d.altText)??((m=e==null?void 0:e.asset)==null?void 0:m.description);return a||"Card image"}function F(e){var l,a;const i=((l=e.categories)==null?void 0:l.find(c=>{var n,o;return!((o=(n=c.slug)==null?void 0:n.current)!=null&&o.startsWith("library/type"))}))??null,r=((a=e.categories)==null?void 0:a.find(c=>{var n,o;return(o=(n=c.slug)==null?void 0:n.current)==null?void 0:o.startsWith("library/type")}))??null;return{mainCategory:i,typeCategory:r}}function S({href:e,className:i,children:r}){return t.jsx("a",{href:e,className:i,children:r})}function W({article:e,className:i="",index:r,layout:l,limit:a,renderImage:c,renderLink:n}){const{mode:o}=j.useTheme(),u=`/blog/articles/${e.slug.current}`,d=M(e.featuredImage,o),m=$(e.featuredImage,o),{mainCategory:x,typeCategory:v}=F(e),h=[s.item,i,r===0?s.first:"",a===1?s.single:"",l??""].filter(Boolean).join(" "),y=t.jsxs("div",{className:s.itemImage,children:[v&&t.jsx("div",{className:s.category,children:v.title}),d?c?c({src:d,alt:m,fill:!0,sizes:"(max-width: 767px) 650px, 300px",priority:r===0}):t.jsx("img",{src:d,alt:m,style:{width:"100%",height:"100%",objectFit:"cover"}}):t.jsx("div",{className:s.imagePlaceholder})]}),f=t.jsxs(t.Fragment,{children:[y,t.jsxs("div",{className:s.itemContent,children:[x&&t.jsx(g.Badge,{className:s.itemEyebrow,text:x.title,variant:"muted"}),t.jsxs("div",{className:s.itemTitle,children:[t.jsx("h3",{children:e.title}),t.jsx("div",{className:s.callToAction,children:t.jsx("div",{className:s.icon,children:t.jsx(N,{size:45})})})]}),e.excerpt&&t.jsx("p",{className:s.itemExcerpt,children:e.excerpt})]})]}),p=n?({children:_})=>n({href:u,className:h,children:_}):({children:_})=>t.jsx(S,{href:u,className:h,children:_});return t.jsx(p,{children:f})}exports.BlogArticleCard=W;
@@ -1,4 +1,4 @@
1
- import { jsxs as m, jsx as i, Fragment as x } from "react/jsx-runtime";
1
+ import { jsxs as _, jsx as o, Fragment as x } from "react/jsx-runtime";
2
2
  import '../../../index.css';import '../../../index60.css';/* empty css */
3
3
  import "react";
4
4
  import "../../../core/components/Avatar/index.mjs";
@@ -8,112 +8,115 @@ import "react-dom";
8
8
  import "../../../core/components/Tabs/index.mjs";
9
9
  import "../../../core/tokens/theme.mjs";
10
10
  import { useTheme as N } from "../../../core/context/ThemeContext.mjs";
11
- import { c as k } from "../../../createLucideIcon-C8GTh_Qx.js";
11
+ import { c as T } from "../../../createLucideIcon-C8GTh_Qx.js";
12
12
  /**
13
13
  * @license lucide-react v0.488.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
17
  */
18
- const T = [
18
+ const k = [
19
19
  ["path", { d: "M7 7h10v10", key: "1tivn9" }],
20
20
  ["path", { d: "M7 17 17 7", key: "1vkiza" }]
21
- ], I = k("arrow-up-right", T), b = "_item_1vn4l_1", w = "_itemImage_1vn4l_14", A = "_itemTitle_1vn4l_20", E = "_callToAction_1vn4l_26", U = "_icon_1vn4l_33", j = "_single_1vn4l_39", B = "_first_1vn4l_40", P = "_itemContent_1vn4l_41", z = "_itemExcerpt_1vn4l_113", L = "_imagePlaceholder_1vn4l_180", F = "_category_1vn4l_229", M = "_itemEyebrow_1vn4l_248", e = {
21
+ ], I = T("arrow-up-right", k), b = "_item_1vn4l_1", w = "_itemImage_1vn4l_14", A = "_itemTitle_1vn4l_20", E = "_callToAction_1vn4l_26", U = "_icon_1vn4l_33", P = "_single_1vn4l_39", j = "_first_1vn4l_40", B = "_itemContent_1vn4l_41", L = "_itemExcerpt_1vn4l_113", z = "_imagePlaceholder_1vn4l_180", F = "_category_1vn4l_229", M = "_itemEyebrow_1vn4l_248", n = {
22
22
  item: b,
23
23
  itemImage: w,
24
24
  itemTitle: A,
25
25
  callToAction: E,
26
26
  icon: U,
27
- single: j,
28
- first: B,
29
- itemContent: P,
30
- itemExcerpt: z,
31
- imagePlaceholder: L,
27
+ single: P,
28
+ first: j,
29
+ itemContent: B,
30
+ itemExcerpt: L,
31
+ imagePlaceholder: z,
32
32
  category: F,
33
33
  itemEyebrow: M
34
34
  };
35
- function W(t, r) {
36
- var n;
35
+ function W(t, s) {
36
+ var e;
37
37
  if (t != null && t.imageUrls)
38
- return r === "dark" ? ((n = t.imageUrls.dark) == null ? void 0 : n.medium) ?? t.imageUrls.default.medium : t.imageUrls.default.medium;
38
+ return s === "dark" ? ((e = t.imageUrls.dark) == null ? void 0 : e.medium) ?? t.imageUrls.default.medium : t.imageUrls.default.medium;
39
39
  }
40
- function D(t, r) {
41
- var l, a, s, o;
42
- const n = r === "dark" ? "darkImage" : "defaultImage";
43
- return ((a = (l = t == null ? void 0 : t[n]) == null ? void 0 : l.asset) == null ? void 0 : a.altText) ?? ((o = (s = t == null ? void 0 : t[n]) == null ? void 0 : s.asset) == null ? void 0 : o.description) ?? "Card image";
40
+ function D(t, s) {
41
+ var c, r, i, d, m, u;
42
+ if (!t) return "Card image";
43
+ const e = s === "dark" ? "darkImage" : "defaultImage", l = ((r = (c = t == null ? void 0 : t[e]) == null ? void 0 : c.asset) == null ? void 0 : r.altText) ?? ((d = (i = t == null ? void 0 : t[e]) == null ? void 0 : i.asset) == null ? void 0 : d.description);
44
+ if (l) return l;
45
+ const a = ((m = t == null ? void 0 : t.asset) == null ? void 0 : m.altText) ?? ((u = t == null ? void 0 : t.asset) == null ? void 0 : u.description);
46
+ return a || "Card image";
44
47
  }
45
- function R(t) {
48
+ function K(t) {
46
49
  var l, a;
47
- const r = ((l = t.categories) == null ? void 0 : l.find(
48
- (s) => {
49
- var o, c;
50
- return !((c = (o = s.slug) == null ? void 0 : o.current) != null && c.startsWith("library/type"));
50
+ const s = ((l = t.categories) == null ? void 0 : l.find(
51
+ (c) => {
52
+ var r, i;
53
+ return !((i = (r = c.slug) == null ? void 0 : r.current) != null && i.startsWith("library/type"));
51
54
  }
52
- )) ?? null, n = ((a = t.categories) == null ? void 0 : a.find(
53
- (s) => {
54
- var o, c;
55
- return (c = (o = s.slug) == null ? void 0 : o.current) == null ? void 0 : c.startsWith("library/type");
55
+ )) ?? null, e = ((a = t.categories) == null ? void 0 : a.find(
56
+ (c) => {
57
+ var r, i;
58
+ return (i = (r = c.slug) == null ? void 0 : r.current) == null ? void 0 : i.startsWith("library/type");
56
59
  }
57
60
  )) ?? null;
58
- return { mainCategory: r, typeCategory: n };
61
+ return { mainCategory: s, typeCategory: e };
59
62
  }
60
- function $({
63
+ function R({
61
64
  href: t,
62
- className: r,
63
- children: n
65
+ className: s,
66
+ children: e
64
67
  }) {
65
- return /* @__PURE__ */ i("a", { href: t, className: r, children: n });
68
+ return /* @__PURE__ */ o("a", { href: t, className: s, children: e });
66
69
  }
67
70
  function tt({
68
71
  article: t,
69
- className: r = "",
70
- index: n,
72
+ className: s = "",
73
+ index: e,
71
74
  layout: l,
72
75
  limit: a,
73
- renderImage: s,
74
- renderLink: o
76
+ renderImage: c,
77
+ renderLink: r
75
78
  }) {
76
- const { mode: c } = N(), p = `/blog/articles/${t.slug.current}`, d = W(t.featuredImage, c), u = D(t.featuredImage, c), { mainCategory: v, typeCategory: g } = R(t), h = [
77
- e.item,
78
- r,
79
- n === 0 ? e.first : "",
80
- a === 1 ? e.single : "",
79
+ const { mode: i } = N(), d = `/blog/articles/${t.slug.current}`, m = W(t.featuredImage, i), u = D(t.featuredImage, i), { mainCategory: f, typeCategory: v } = K(t), h = [
80
+ n.item,
81
+ s,
82
+ e === 0 ? n.first : "",
83
+ a === 1 ? n.single : "",
81
84
  l ?? ""
82
- ].filter(Boolean).join(" "), f = /* @__PURE__ */ m("div", { className: e.itemImage, children: [
83
- g && /* @__PURE__ */ i("div", { className: e.category, children: g.title }),
84
- d ? s ? s({
85
- src: d,
85
+ ].filter(Boolean).join(" "), y = /* @__PURE__ */ _("div", { className: n.itemImage, children: [
86
+ v && /* @__PURE__ */ o("div", { className: n.category, children: v.title }),
87
+ m ? c ? c({
88
+ src: m,
86
89
  alt: u,
87
90
  fill: !0,
88
91
  sizes: "(max-width: 767px) 650px, 300px",
89
- priority: !0
90
- }) : /* @__PURE__ */ i(
92
+ priority: e === 0
93
+ }) : /* @__PURE__ */ o(
91
94
  "img",
92
95
  {
93
- src: d,
96
+ src: m,
94
97
  alt: u,
95
98
  style: { width: "100%", height: "100%", objectFit: "cover" }
96
99
  }
97
- ) : /* @__PURE__ */ i("div", { className: e.imagePlaceholder })
98
- ] }), y = /* @__PURE__ */ m(x, { children: [
99
- f,
100
- /* @__PURE__ */ m("div", { className: e.itemContent, children: [
101
- v && /* @__PURE__ */ i(
100
+ ) : /* @__PURE__ */ o("div", { className: n.imagePlaceholder })
101
+ ] }), g = /* @__PURE__ */ _(x, { children: [
102
+ y,
103
+ /* @__PURE__ */ _("div", { className: n.itemContent, children: [
104
+ f && /* @__PURE__ */ o(
102
105
  C,
103
106
  {
104
- className: e.itemEyebrow,
105
- text: v.title,
107
+ className: n.itemEyebrow,
108
+ text: f.title,
106
109
  variant: "muted"
107
110
  }
108
111
  ),
109
- /* @__PURE__ */ m("div", { className: e.itemTitle, children: [
110
- /* @__PURE__ */ i("h3", { children: t.title }),
111
- /* @__PURE__ */ i("div", { className: e.callToAction, children: /* @__PURE__ */ i("div", { className: e.icon, children: /* @__PURE__ */ i(I, { size: 45 }) }) })
112
+ /* @__PURE__ */ _("div", { className: n.itemTitle, children: [
113
+ /* @__PURE__ */ o("h3", { children: t.title }),
114
+ /* @__PURE__ */ o("div", { className: n.callToAction, children: /* @__PURE__ */ o("div", { className: n.icon, children: /* @__PURE__ */ o(I, { size: 45 }) }) })
112
115
  ] }),
113
- t.excerpt && /* @__PURE__ */ i("p", { className: e.itemExcerpt, children: t.excerpt })
116
+ t.excerpt && /* @__PURE__ */ o("p", { className: n.itemExcerpt, children: t.excerpt })
114
117
  ] })
115
118
  ] });
116
- return /* @__PURE__ */ i(o ? ({ children: _ }) => o({ href: p, className: h, children: _ }) : ({ children: _ }) => /* @__PURE__ */ i($, { href: p, className: h, children: _ }), { children: y });
119
+ return /* @__PURE__ */ o(r ? ({ children: p }) => r({ href: d, className: h, children: p }) : ({ children: p }) => /* @__PURE__ */ o(R, { href: d, className: h, children: p }), { children: g });
117
120
  }
118
121
  export {
119
122
  tt as BlogArticleCard
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.44",
4
+ "version": "0.1.45",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {