quirk-ui 0.1.118 → 0.1.119
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('../../../index44.css');const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index44.css');const n=require("react/jsx-runtime"),a=require("react"),l=require("../../../x-Dft9NVe_.cjs"),u="_announcement_33ndx_1",d="_inner_33ndx_12",m="_content_33ndx_25",_="_close_33ndx_52",e={announcement:u,inner:d,content:m,close:_};function x({blocks:t,renderRichText:s,className:i}){const[r,o]=a.useState(!1);if(r||!(t!=null&&t.length))return null;const c=s?s({blocks:t,className:e.content}):null;return c?n.jsx("div",{role:"region","aria-label":"Announcement",className:`${e.announcement} ${i??""}`.trim(),children:n.jsxs("div",{className:e.inner,children:[n.jsx("div",{className:e.content,children:c}),n.jsx("button",{className:e.close,onClick:()=>o(!0),"aria-label":"Dismiss announcement",children:n.jsx(l.X,{size:16,"aria-hidden":"true"})})]})}):null}exports.Announcement=x;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l } from "react";
|
|
3
3
|
import { X as m } from "../../../x-CnsEH4Ox.js";
|
|
4
|
-
import '../../../index44.css';const u = "
|
|
4
|
+
import '../../../index44.css';const u = "_announcement_33ndx_1", d = "_inner_33ndx_12", _ = "_content_33ndx_25", f = "_close_33ndx_52", n = {
|
|
5
5
|
announcement: u,
|
|
6
6
|
inner: d,
|
|
7
7
|
content: _,
|
|
8
8
|
close: f
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function p({
|
|
11
11
|
blocks: e,
|
|
12
|
-
renderRichText:
|
|
12
|
+
renderRichText: s,
|
|
13
13
|
className: o
|
|
14
14
|
}) {
|
|
15
|
-
const [
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
return
|
|
15
|
+
const [r, c] = l(!1);
|
|
16
|
+
if (r || !(e != null && e.length)) return null;
|
|
17
|
+
const i = s ? s({ blocks: e, className: n.content }) : null;
|
|
18
|
+
return i ? /* @__PURE__ */ t(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
21
|
role: "region",
|
|
22
22
|
"aria-label": "Announcement",
|
|
23
23
|
className: `${n.announcement} ${o ?? ""}`.trim(),
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */ t("div", { className: n.content, children:
|
|
24
|
+
children: /* @__PURE__ */ a("div", { className: n.inner, children: [
|
|
25
|
+
/* @__PURE__ */ t("div", { className: n.content, children: i }),
|
|
26
26
|
/* @__PURE__ */ t(
|
|
27
27
|
"button",
|
|
28
28
|
{
|
|
29
29
|
className: n.close,
|
|
30
|
-
onClick: () =>
|
|
30
|
+
onClick: () => c(!0),
|
|
31
31
|
"aria-label": "Dismiss announcement",
|
|
32
32
|
children: /* @__PURE__ */ t(m, { size: 16, "aria-hidden": "true" })
|
|
33
33
|
}
|
|
@@ -37,5 +37,5 @@ function v({
|
|
|
37
37
|
) : null;
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
p as Announcement
|
|
41
41
|
};
|
package/dist/index44.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._announcement_33ndx_1{width:100%;background-color:var( --color-announcement-background, var(--color-primary-100) );color:var(--color-announcement-text, #ffffff);position:relative;z-index:1000}._inner_33ndx_12{display:flex;align-items:center;justify-content:center;gap:var(--spacing-sm);padding:var(--spacing-sm) var(--spacing-md);max-width:var(--layout-width, 1250px);margin:0 auto;padding-right:calc(var(--spacing-md) + 32px);position:relative}._content_33ndx_25{text-align:center;font-size:var(--font-size-sm);line-height:1.5}._content_33ndx_25 p{margin:0;display:inline;color:var(--color-announcement-text)}._content_33ndx_25 a{color:var(--color-announcement-link, inherit);text-decoration:underline;text-underline-offset:2px}._content_33ndx_25 a:hover{opacity:.8}._content_33ndx_25 strong{font-weight:var(--font-weight-semibold)}._close_33ndx_52{position:absolute;right:var(--spacing-md);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-full);background:transparent;border:none;color:inherit;cursor:pointer;opacity:.7;transition:opacity .15s ease,background-color .15s ease;flex-shrink:0}._close_33ndx_52:hover{opacity:1;background-color:#ffffff26}._close_33ndx_52:focus-visible{outline:2px solid currentColor;outline-offset:2px}
|
package/dist/index44.css.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
|
-
readonly "
|
|
3
|
-
readonly "
|
|
4
|
-
readonly "
|
|
5
|
-
readonly "
|
|
2
|
+
readonly "_announcement_33ndx_1": string;
|
|
3
|
+
readonly "_close_33ndx_52": string;
|
|
4
|
+
readonly "_content_33ndx_25": string;
|
|
5
|
+
readonly "_inner_33ndx_12": string;
|
|
6
6
|
};
|
|
7
7
|
export = styles;
|
|
8
8
|
|