magic-pill 9.0.0-next.0 → 9.0.0-next.2

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 (112) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +6 -2
  3. package/dist/MagicPill/MagicPill.js +194 -2
  4. package/dist/MagicPill/MagicPill.mjs +194 -2
  5. package/dist/MagicPill/choreography.js +132 -2
  6. package/dist/MagicPill/choreography.mjs +125 -2
  7. package/dist/Pill/Pill.js +106 -2
  8. package/dist/Pill/Pill.mjs +106 -2
  9. package/dist/Pill/PillAction.js +67 -2
  10. package/dist/Pill/PillAction.mjs +67 -2
  11. package/dist/Pill/PillContext.js +26 -2
  12. package/dist/Pill/PillContext.mjs +24 -2
  13. package/dist/Pill/PillPanel.js +90 -2
  14. package/dist/Pill/PillPanel.mjs +89 -2
  15. package/dist/Pill/parts.js +46 -2
  16. package/dist/Pill/parts.mjs +43 -2
  17. package/dist/PillNavbar/PillNavbar.js +44 -2
  18. package/dist/PillNavbar/PillNavbar.mjs +44 -2
  19. package/dist/PillNavbar/matchPath.js +34 -2
  20. package/dist/PillNavbar/matchPath.mjs +34 -2
  21. package/dist/PillNotification/PillNotification.js +64 -2
  22. package/dist/PillNotification/PillNotification.mjs +63 -2
  23. package/dist/icons/ArrowIcon.js +21 -2
  24. package/dist/icons/ArrowIcon.mjs +21 -2
  25. package/dist/icons/BoxIcon.js +21 -2
  26. package/dist/icons/BoxIcon.mjs +21 -2
  27. package/dist/icons/CheckIcon.js +17 -2
  28. package/dist/icons/CheckIcon.mjs +17 -2
  29. package/dist/icons/CloseIcon.js +17 -2
  30. package/dist/icons/CloseIcon.mjs +17 -2
  31. package/dist/icons/CouponIcon.js +17 -2
  32. package/dist/icons/CouponIcon.mjs +17 -2
  33. package/dist/icons/DocumentIcon.js +17 -2
  34. package/dist/icons/DocumentIcon.mjs +17 -2
  35. package/dist/icons/HelpIcon.js +17 -2
  36. package/dist/icons/HelpIcon.mjs +17 -2
  37. package/dist/icons/InfoIcon.js +17 -2
  38. package/dist/icons/InfoIcon.mjs +17 -2
  39. package/dist/icons/MailIcon.js +17 -2
  40. package/dist/icons/MailIcon.mjs +17 -2
  41. package/dist/icons/PhoneIcon.js +21 -2
  42. package/dist/icons/PhoneIcon.mjs +21 -2
  43. package/dist/icons/PlusIcon.js +17 -2
  44. package/dist/icons/PlusIcon.mjs +17 -2
  45. package/dist/icons/UndoIcon.js +21 -2
  46. package/dist/icons/UndoIcon.mjs +21 -2
  47. package/dist/index.js +50 -1
  48. package/dist/index.mjs +24 -1
  49. package/dist/store/store.js +104 -2
  50. package/dist/store/store.mjs +102 -2
  51. package/dist/store/usePillQueue.js +17 -2
  52. package/dist/store/usePillQueue.mjs +17 -2
  53. package/dist/styles.css +125 -35
  54. package/dist/utils/inputModality.js +23 -0
  55. package/dist/utils/inputModality.mjs +22 -0
  56. package/dist/utils/react.js +23 -2
  57. package/dist/utils/react.mjs +21 -2
  58. package/dist/utils/url.js +22 -2
  59. package/dist/utils/url.mjs +22 -2
  60. package/package.json +3 -2
  61. package/dist/MagicPill/MagicPill.js.map +0 -1
  62. package/dist/MagicPill/MagicPill.mjs.map +0 -1
  63. package/dist/MagicPill/choreography.js.map +0 -1
  64. package/dist/MagicPill/choreography.mjs.map +0 -1
  65. package/dist/Pill/Pill.js.map +0 -1
  66. package/dist/Pill/Pill.mjs.map +0 -1
  67. package/dist/Pill/PillAction.js.map +0 -1
  68. package/dist/Pill/PillAction.mjs.map +0 -1
  69. package/dist/Pill/PillContext.js.map +0 -1
  70. package/dist/Pill/PillContext.mjs.map +0 -1
  71. package/dist/Pill/PillPanel.js.map +0 -1
  72. package/dist/Pill/PillPanel.mjs.map +0 -1
  73. package/dist/Pill/parts.js.map +0 -1
  74. package/dist/Pill/parts.mjs.map +0 -1
  75. package/dist/PillNavbar/PillNavbar.js.map +0 -1
  76. package/dist/PillNavbar/PillNavbar.mjs.map +0 -1
  77. package/dist/PillNavbar/matchPath.js.map +0 -1
  78. package/dist/PillNavbar/matchPath.mjs.map +0 -1
  79. package/dist/PillNotification/PillNotification.js.map +0 -1
  80. package/dist/PillNotification/PillNotification.mjs.map +0 -1
  81. package/dist/icons/ArrowIcon.js.map +0 -1
  82. package/dist/icons/ArrowIcon.mjs.map +0 -1
  83. package/dist/icons/BoxIcon.js.map +0 -1
  84. package/dist/icons/BoxIcon.mjs.map +0 -1
  85. package/dist/icons/CheckIcon.js.map +0 -1
  86. package/dist/icons/CheckIcon.mjs.map +0 -1
  87. package/dist/icons/CloseIcon.js.map +0 -1
  88. package/dist/icons/CloseIcon.mjs.map +0 -1
  89. package/dist/icons/CouponIcon.js.map +0 -1
  90. package/dist/icons/CouponIcon.mjs.map +0 -1
  91. package/dist/icons/DocumentIcon.js.map +0 -1
  92. package/dist/icons/DocumentIcon.mjs.map +0 -1
  93. package/dist/icons/HelpIcon.js.map +0 -1
  94. package/dist/icons/HelpIcon.mjs.map +0 -1
  95. package/dist/icons/InfoIcon.js.map +0 -1
  96. package/dist/icons/InfoIcon.mjs.map +0 -1
  97. package/dist/icons/MailIcon.js.map +0 -1
  98. package/dist/icons/MailIcon.mjs.map +0 -1
  99. package/dist/icons/PhoneIcon.js.map +0 -1
  100. package/dist/icons/PhoneIcon.mjs.map +0 -1
  101. package/dist/icons/PlusIcon.js.map +0 -1
  102. package/dist/icons/PlusIcon.mjs.map +0 -1
  103. package/dist/icons/UndoIcon.js.map +0 -1
  104. package/dist/icons/UndoIcon.mjs.map +0 -1
  105. package/dist/store/store.js.map +0 -1
  106. package/dist/store/store.mjs.map +0 -1
  107. package/dist/store/usePillQueue.js.map +0 -1
  108. package/dist/store/usePillQueue.mjs.map +0 -1
  109. package/dist/utils/react.js.map +0 -1
  110. package/dist/utils/react.mjs.map +0 -1
  111. package/dist/utils/url.js.map +0 -1
  112. package/dist/utils/url.mjs.map +0 -1
@@ -1,2 +1,89 @@
1
- "use client";import{forwardRef as e,useEffect as t,useId as n,useMemo as r,useRef as i}from"react";import a from"./PillAction.mjs";import{useInternalPill as o}from"./PillContext.mjs";import s from"../icons/CloseIcon.mjs";import{mergeRefs as c}from"../utils/react.mjs";import{jsx as l,jsxs as u}from"react/jsx-runtime";const d=e(function({title:e,closeLabel:d=`Close`,closeIcon:f,children:p,...m},h){let{presence:g,closePanel:_,panelId:v,panelTriggerRef:y,rootRef:b}=o(`<PillPanel>`),x=g===`panel`,S=n(),C=i(null),w=r(()=>c(C,h),[h]),T=i(x);t(()=>{let e=T.current;if(T.current=x,x&&!e)C.current?.focus({preventScroll:!0});else if(!x&&e){let e=document.activeElement;(!e||e===document.body||b.current?.contains(e))&&y.current?.focus()}},[x,y,b]);let E=e!=null;return/* @__PURE__ */ u(`div`,{...m,ref:w,id:v,"data-mp":`panel`,"data-open":x?``:void 0,role:`region`,"aria-labelledby":E?S:void 0,tabIndex:-1,children:[E&&/* @__PURE__ */ l(`div`,{id:S,"data-mp":`panel-title`,children:e}),/* @__PURE__ */ l(`div`,{"data-mp":`panel-body`,children:p}),/* @__PURE__ */ l(`div`,{"data-mp":`panel-footer`,children:/* @__PURE__ */ l(a,{icon:f??/* @__PURE__ */ l(s,{}),label:d,onClick:_})})]})}),f=e(function(e,t){let{presence:n,setPresence:s,closePanel:u,panelId:d,panelTriggerRef:f}=o(`<PillPanelTrigger>`),p=n===`panel`,m=i(null),h=r(()=>c(m,t),[t]),g=()=>{f.current=m.current,p?u():s(`panel`)};return/* @__PURE__ */ l(a,{...e,ref:h,"aria-expanded":p,"aria-controls":d,onClick:g})});export{d as PillPanel,f as PillPanelTrigger};
2
- //# sourceMappingURL=PillPanel.mjs.map
1
+ "use client";
2
+
3
+ import { forwardRef, useEffect, useId, useMemo, useRef } from "react";
4
+ import PillAction from "./PillAction.mjs";
5
+ import { useInternalPill } from "./PillContext.mjs";
6
+ import CloseIcon from "../icons/CloseIcon.mjs";
7
+ import { getInputModality, trackInputModality } from "../utils/inputModality.mjs";
8
+ import { mergeRefs } from "../utils/react.mjs";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+
11
+ // src/Pill/PillPanel.tsx
12
+ /**
13
+ * Content shown when the pill's presence is `panel` (one panel per pill).
14
+ * Labelled by its title, focused when it opens, gives focus back to its
15
+ * trigger when it closes.
16
+ */
17
+ const PillPanel = forwardRef(function PillPanel({ title, closeLabel = "Close", closeIcon, children, ...rest }, forwardedRef) {
18
+ const { presence, closePanel, panelId, panelTriggerRef, rootRef } = useInternalPill("<PillPanel>");
19
+ const isOpen = presence === "panel";
20
+ const titleId = useId();
21
+ const panelRef = useRef(null);
22
+ const ref = useMemo(() => mergeRefs(panelRef, forwardedRef), [forwardedRef]);
23
+ const wasOpenRef = useRef(isOpen);
24
+ useEffect(trackInputModality, []);
25
+ useEffect(() => {
26
+ const wasOpen = wasOpenRef.current;
27
+ wasOpenRef.current = isOpen;
28
+ if (isOpen && !wasOpen) panelRef.current?.focus({ preventScroll: true });
29
+ else if (!isOpen && wasOpen) {
30
+ const active = document.activeElement;
31
+ if (!active || active === document.body || rootRef.current?.contains(active)) panelTriggerRef.current?.focus(getInputModality() === "pointer" ? { focusVisible: false } : void 0);
32
+ }
33
+ }, [
34
+ isOpen,
35
+ panelTriggerRef,
36
+ rootRef
37
+ ]);
38
+ const hasTitle = title !== void 0 && title !== null;
39
+ return /* @__PURE__ */ jsxs("div", {
40
+ ...rest,
41
+ ref,
42
+ id: panelId,
43
+ "data-mp": "panel",
44
+ "data-open": isOpen ? "" : void 0,
45
+ role: "region",
46
+ "aria-labelledby": hasTitle ? titleId : void 0,
47
+ tabIndex: -1,
48
+ children: [
49
+ hasTitle && /* @__PURE__ */ jsx("div", {
50
+ id: titleId,
51
+ "data-mp": "panel-title",
52
+ children: title
53
+ }),
54
+ /* @__PURE__ */ jsx("div", {
55
+ "data-mp": "panel-body",
56
+ children
57
+ }),
58
+ /* @__PURE__ */ jsx("div", {
59
+ "data-mp": "panel-footer",
60
+ children: /* @__PURE__ */ jsx(PillAction, {
61
+ icon: closeIcon ?? /* @__PURE__ */ jsx(CloseIcon, {}),
62
+ label: closeLabel,
63
+ onClick: closePanel
64
+ })
65
+ })
66
+ ]
67
+ });
68
+ });
69
+ /** An action that opens (and closes) the pill's panel. */
70
+ const PillPanelTrigger = forwardRef(function PillPanelTrigger(props, forwardedRef) {
71
+ const { presence, setPresence, closePanel, panelId, panelTriggerRef } = useInternalPill("<PillPanelTrigger>");
72
+ const isOpen = presence === "panel";
73
+ const triggerRef = useRef(null);
74
+ const ref = useMemo(() => mergeRefs(triggerRef, forwardedRef), [forwardedRef]);
75
+ const toggle = () => {
76
+ panelTriggerRef.current = triggerRef.current;
77
+ if (isOpen) closePanel();
78
+ else setPresence("panel");
79
+ };
80
+ return /* @__PURE__ */ jsx(PillAction, {
81
+ ...props,
82
+ ref,
83
+ "aria-expanded": isOpen,
84
+ "aria-controls": panelId,
85
+ onClick: toggle
86
+ });
87
+ });
88
+
89
+ export { PillPanel, PillPanelTrigger };
@@ -1,2 +1,46 @@
1
- let e=require("react"),t=require("react/jsx-runtime");const n=(0,e.forwardRef)(function({label:e,...n},r){return/* @__PURE__ */ (0,t.jsx)(`span`,{...e?{role:`img`,"aria-label":e}:{"aria-hidden":!0},...n,ref:r,"data-mp":`icon`})}),r=(0,e.forwardRef)(function(e,n){return/* @__PURE__ */ (0,t.jsx)(`span`,{"aria-hidden":`true`,...e,ref:n,"data-mp":`divider`})}),i=(0,e.forwardRef)(function(e,n){return/* @__PURE__ */ (0,t.jsx)(`div`,{...e,ref:n,"data-mp":`message`})}),a=(0,e.forwardRef)(function(e,n){return/* @__PURE__ */ (0,t.jsx)(`div`,{...e,ref:n,"data-mp":`actions`})});exports.PillActions=a,exports.PillDivider=r,exports.PillIcon=n,exports.PillMessage=i;
2
- //# sourceMappingURL=parts.js.map
1
+ let react = require("react");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+
4
+ // src/Pill/parts.tsx
5
+ /** The leading icon. Decorative (`aria-hidden`) unless you give it a `label`. */
6
+ const PillIcon = (0, react.forwardRef)(function PillIcon({ label, ...rest }, ref) {
7
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
8
+ ...label ? {
9
+ role: "img",
10
+ "aria-label": label
11
+ } : { "aria-hidden": true },
12
+ ...rest,
13
+ ref,
14
+ "data-mp": "icon"
15
+ });
16
+ });
17
+ /** The thin line between the icon and the message. */
18
+ const PillDivider = (0, react.forwardRef)(function PillDivider(props, ref) {
19
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
20
+ "aria-hidden": "true",
21
+ ...props,
22
+ ref,
23
+ "data-mp": "divider"
24
+ });
25
+ });
26
+ /** The message, in the italic serif. Accepts any content. */
27
+ const PillMessage = (0, react.forwardRef)(function PillMessage(props, ref) {
28
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
29
+ ...props,
30
+ ref,
31
+ "data-mp": "message"
32
+ });
33
+ });
34
+ /** A row (or a column, in a vertical pill) of actions. */
35
+ const PillActions = (0, react.forwardRef)(function PillActions(props, ref) {
36
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
37
+ ...props,
38
+ ref,
39
+ "data-mp": "actions"
40
+ });
41
+ });
42
+
43
+ exports.PillActions = PillActions;
44
+ exports.PillDivider = PillDivider;
45
+ exports.PillIcon = PillIcon;
46
+ exports.PillMessage = PillMessage;
@@ -1,2 +1,43 @@
1
- import{forwardRef as e}from"react";import{jsx as t}from"react/jsx-runtime";const n=e(function({label:e,...n},r){return/* @__PURE__ */ t(`span`,{...e?{role:`img`,"aria-label":e}:{"aria-hidden":!0},...n,ref:r,"data-mp":`icon`})}),r=e(function(e,n){return/* @__PURE__ */ t(`span`,{"aria-hidden":`true`,...e,ref:n,"data-mp":`divider`})}),i=e(function(e,n){return/* @__PURE__ */ t(`div`,{...e,ref:n,"data-mp":`message`})}),a=e(function(e,n){return/* @__PURE__ */ t(`div`,{...e,ref:n,"data-mp":`actions`})});export{a as PillActions,r as PillDivider,n as PillIcon,i as PillMessage};
2
- //# sourceMappingURL=parts.mjs.map
1
+ import { forwardRef } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ // src/Pill/parts.tsx
5
+ /** The leading icon. Decorative (`aria-hidden`) unless you give it a `label`. */
6
+ const PillIcon = forwardRef(function PillIcon({ label, ...rest }, ref) {
7
+ return /* @__PURE__ */ jsx("span", {
8
+ ...label ? {
9
+ role: "img",
10
+ "aria-label": label
11
+ } : { "aria-hidden": true },
12
+ ...rest,
13
+ ref,
14
+ "data-mp": "icon"
15
+ });
16
+ });
17
+ /** The thin line between the icon and the message. */
18
+ const PillDivider = forwardRef(function PillDivider(props, ref) {
19
+ return /* @__PURE__ */ jsx("span", {
20
+ "aria-hidden": "true",
21
+ ...props,
22
+ ref,
23
+ "data-mp": "divider"
24
+ });
25
+ });
26
+ /** The message, in the italic serif. Accepts any content. */
27
+ const PillMessage = forwardRef(function PillMessage(props, ref) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ ...props,
30
+ ref,
31
+ "data-mp": "message"
32
+ });
33
+ });
34
+ /** A row (or a column, in a vertical pill) of actions. */
35
+ const PillActions = forwardRef(function PillActions(props, ref) {
36
+ return /* @__PURE__ */ jsx("div", {
37
+ ...props,
38
+ ref,
39
+ "data-mp": "actions"
40
+ });
41
+ });
42
+
43
+ export { PillActions, PillDivider, PillIcon, PillMessage };
@@ -1,2 +1,44 @@
1
- "use client";let e=require("react");const t=require("../Pill/parts.js"),n=require("../Pill/PillAction.js"),r=require("./matchPath.js");let i=require("react/jsx-runtime");function a(t){let[n,r]=(0,e.useState)(void 0);return(0,e.useEffect)(()=>{if(!t)return;let e=()=>r(window.location.pathname);return e(),window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[t]),n}const o=(0,e.forwardRef)(function({items:e,pathname:o,linkComponent:s,"aria-label":c=`Main`,...l},u){let d=a(o===void 0),f=r.findActiveIndex(o??d,e);return/* @__PURE__ */ (0,i.jsx)(`nav`,{"aria-label":c,...l,ref:u,"data-mp":`navbar`,children:/* @__PURE__ */ (0,i.jsx)(t.PillActions,{children:e.map((e,t)=>/* @__PURE__ */ (0,i.jsx)(n,{icon:e.icon,label:e.label,href:e.href,linkComponent:s,"aria-current":t===f?`page`:void 0},e.href))})})});exports.PillNavbar=o;
2
- //# sourceMappingURL=PillNavbar.js.map
1
+ "use client";
2
+
3
+ let react = require("react");
4
+ const require_parts = require("../Pill/parts.js");
5
+ const require_PillAction = require("../Pill/PillAction.js");
6
+ const require_matchPath = require("./matchPath.js");
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+
9
+ // src/PillNavbar/PillNavbar.tsx
10
+ /** Without a `pathname` prop: the browser's path, read after mounting (no hydration mismatch). */
11
+ function useLocationPathname(enabled) {
12
+ const [pathname, setPathname] = (0, react.useState)(void 0);
13
+ (0, react.useEffect)(() => {
14
+ if (!enabled) return;
15
+ const update = () => setPathname(window.location.pathname);
16
+ update();
17
+ window.addEventListener("popstate", update);
18
+ return () => window.removeEventListener("popstate", update);
19
+ }, [enabled]);
20
+ return pathname;
21
+ }
22
+ /**
23
+ * A <nav> of icon links. The active one shows its label and gets
24
+ * `aria-current="page"`. Render it inside a <Pill>, or as the base layer of a <MagicPill>.
25
+ */
26
+ const PillNavbar = (0, react.forwardRef)(function PillNavbar({ items, pathname, linkComponent, "aria-label": ariaLabel = "Main", ...rest }, ref) {
27
+ const locationPathname = useLocationPathname(pathname === void 0);
28
+ const activeIndex = require_matchPath.findActiveIndex(pathname ?? locationPathname, items);
29
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
30
+ "aria-label": ariaLabel,
31
+ ...rest,
32
+ ref,
33
+ "data-mp": "navbar",
34
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.PillActions, { children: items.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PillAction, {
35
+ icon: item.icon,
36
+ label: item.label,
37
+ href: item.href,
38
+ linkComponent,
39
+ "aria-current": index === activeIndex ? "page" : void 0
40
+ }, item.href)) })
41
+ });
42
+ });
43
+
44
+ exports.PillNavbar = PillNavbar;
@@ -1,2 +1,44 @@
1
- "use client";import{forwardRef as e,useEffect as t,useState as n}from"react";import{PillActions as r}from"../Pill/parts.mjs";import i from"../Pill/PillAction.mjs";import{findActiveIndex as a}from"./matchPath.mjs";import{jsx as o}from"react/jsx-runtime";function s(e){let[r,i]=n(void 0);return t(()=>{if(!e)return;let t=()=>i(window.location.pathname);return t(),window.addEventListener(`popstate`,t),()=>window.removeEventListener(`popstate`,t)},[e]),r}const c=e(function({items:e,pathname:t,linkComponent:n,"aria-label":c=`Main`,...l},u){let d=s(t===void 0),f=a(t??d,e);return/* @__PURE__ */ o(`nav`,{"aria-label":c,...l,ref:u,"data-mp":`navbar`,children:/* @__PURE__ */ o(r,{children:e.map((e,t)=>/* @__PURE__ */ o(i,{icon:e.icon,label:e.label,href:e.href,linkComponent:n,"aria-current":t===f?`page`:void 0},e.href))})})});export{c as PillNavbar};
2
- //# sourceMappingURL=PillNavbar.mjs.map
1
+ "use client";
2
+
3
+ import { forwardRef, useEffect, useState } from "react";
4
+ import { PillActions } from "../Pill/parts.mjs";
5
+ import PillAction from "../Pill/PillAction.mjs";
6
+ import { findActiveIndex } from "./matchPath.mjs";
7
+ import { jsx } from "react/jsx-runtime";
8
+
9
+ // src/PillNavbar/PillNavbar.tsx
10
+ /** Without a `pathname` prop: the browser's path, read after mounting (no hydration mismatch). */
11
+ function useLocationPathname(enabled) {
12
+ const [pathname, setPathname] = useState(void 0);
13
+ useEffect(() => {
14
+ if (!enabled) return;
15
+ const update = () => setPathname(window.location.pathname);
16
+ update();
17
+ window.addEventListener("popstate", update);
18
+ return () => window.removeEventListener("popstate", update);
19
+ }, [enabled]);
20
+ return pathname;
21
+ }
22
+ /**
23
+ * A <nav> of icon links. The active one shows its label and gets
24
+ * `aria-current="page"`. Render it inside a <Pill>, or as the base layer of a <MagicPill>.
25
+ */
26
+ const PillNavbar = forwardRef(function PillNavbar({ items, pathname, linkComponent, "aria-label": ariaLabel = "Main", ...rest }, ref) {
27
+ const locationPathname = useLocationPathname(pathname === void 0);
28
+ const activeIndex = findActiveIndex(pathname ?? locationPathname, items);
29
+ return /* @__PURE__ */ jsx("nav", {
30
+ "aria-label": ariaLabel,
31
+ ...rest,
32
+ ref,
33
+ "data-mp": "navbar",
34
+ children: /* @__PURE__ */ jsx(PillActions, { children: items.map((item, index) => /* @__PURE__ */ jsx(PillAction, {
35
+ icon: item.icon,
36
+ label: item.label,
37
+ href: item.href,
38
+ linkComponent,
39
+ "aria-current": index === activeIndex ? "page" : void 0
40
+ }, item.href)) })
41
+ });
42
+ });
43
+
44
+ export { PillNavbar };
@@ -1,2 +1,34 @@
1
- function e(e){let t=e.split(/[?#]/,1)[0];return t.length>1?t.replace(/\/+$/,``)||`/`:t}function t(t,n){if(typeof n.match==`function`)return n.match(t);if(!n.href.startsWith(`/`)||n.href.startsWith(`//`))return!1;let r=e(t),i=e(n.href);return n.match===`exact`||i===`/`?r===i:r===i||r.startsWith(`${i}/`)}exports.findActiveIndex=function(n,r){if(n===void 0)return-1;let i=-1,a=-1;return r.forEach((r,o)=>{let s=e(r.href).length;s>a&&t(n,r)&&(i=o,a=s)}),i};
2
- //# sourceMappingURL=matchPath.js.map
1
+ // src/PillNavbar/matchPath.ts
2
+ /** "/blog/?q=1#top" → "/blog": no query, no hash, no trailing slash (except the root). */
3
+ function normalisePath(path) {
4
+ const withoutSuffix = path.split(/[?#]/, 1)[0];
5
+ return withoutSuffix.length > 1 ? withoutSuffix.replace(/\/+$/, "") || "/" : withoutSuffix;
6
+ }
7
+ function matches(pathname, item) {
8
+ if (typeof item.match === "function") return item.match(pathname);
9
+ if (!item.href.startsWith("/") || item.href.startsWith("//")) return false;
10
+ const path = normalisePath(pathname);
11
+ const href = normalisePath(item.href);
12
+ if (item.match === "exact" || href === "/") return path === href;
13
+ return path === href || path.startsWith(`${href}/`);
14
+ }
15
+ /**
16
+ * The index of the active item, or -1. Several items can match ("/blog" and
17
+ * "/blog/drafts" on "/blog/drafts/1"): the longest href wins, so exactly one
18
+ * item is active.
19
+ */
20
+ function findActiveIndex(pathname, items) {
21
+ if (pathname === void 0) return -1;
22
+ let activeIndex = -1;
23
+ let activeLength = -1;
24
+ items.forEach((item, index) => {
25
+ const length = normalisePath(item.href).length;
26
+ if (length > activeLength && matches(pathname, item)) {
27
+ activeIndex = index;
28
+ activeLength = length;
29
+ }
30
+ });
31
+ return activeIndex;
32
+ }
33
+
34
+ exports.findActiveIndex = findActiveIndex;
@@ -1,2 +1,34 @@
1
- function e(e){let t=e.split(/[?#]/,1)[0];return t.length>1?t.replace(/\/+$/,``)||`/`:t}function t(t,n){if(typeof n.match==`function`)return n.match(t);if(!n.href.startsWith(`/`)||n.href.startsWith(`//`))return!1;let r=e(t),i=e(n.href);return n.match===`exact`||i===`/`?r===i:r===i||r.startsWith(`${i}/`)}function n(n,r){if(n===void 0)return-1;let i=-1,a=-1;return r.forEach((r,o)=>{let s=e(r.href).length;s>a&&t(n,r)&&(i=o,a=s)}),i}export{n as findActiveIndex};
2
- //# sourceMappingURL=matchPath.mjs.map
1
+ // src/PillNavbar/matchPath.ts
2
+ /** "/blog/?q=1#top" → "/blog": no query, no hash, no trailing slash (except the root). */
3
+ function normalisePath(path) {
4
+ const withoutSuffix = path.split(/[?#]/, 1)[0];
5
+ return withoutSuffix.length > 1 ? withoutSuffix.replace(/\/+$/, "") || "/" : withoutSuffix;
6
+ }
7
+ function matches(pathname, item) {
8
+ if (typeof item.match === "function") return item.match(pathname);
9
+ if (!item.href.startsWith("/") || item.href.startsWith("//")) return false;
10
+ const path = normalisePath(pathname);
11
+ const href = normalisePath(item.href);
12
+ if (item.match === "exact" || href === "/") return path === href;
13
+ return path === href || path.startsWith(`${href}/`);
14
+ }
15
+ /**
16
+ * The index of the active item, or -1. Several items can match ("/blog" and
17
+ * "/blog/drafts" on "/blog/drafts/1"): the longest href wins, so exactly one
18
+ * item is active.
19
+ */
20
+ function findActiveIndex(pathname, items) {
21
+ if (pathname === void 0) return -1;
22
+ let activeIndex = -1;
23
+ let activeLength = -1;
24
+ items.forEach((item, index) => {
25
+ const length = normalisePath(item.href).length;
26
+ if (length > activeLength && matches(pathname, item)) {
27
+ activeIndex = index;
28
+ activeLength = length;
29
+ }
30
+ });
31
+ return activeIndex;
32
+ }
33
+
34
+ export { findActiveIndex };
@@ -1,2 +1,64 @@
1
- const e=require("../Pill/parts.js"),t=require("../Pill/PillAction.js"),n=require("../Pill/PillPanel.js"),r=require("../icons/PlusIcon.js");let i=require("react/jsx-runtime");function a({icon:a,message:o,action:s,panel:c,linkComponent:l,classNames:u={},onAction:d}){let f=a!=null;return/* @__PURE__ */ (0,i.jsxs)(i.Fragment,{children:[f&&/* @__PURE__ */ (0,i.jsxs)(i.Fragment,{children:[/* @__PURE__ */ (0,i.jsx)(e.PillIcon,{className:u.icon,children:a}),/* @__PURE__ */ (0,i.jsx)(e.PillDivider,{className:u.divider})]}),/* @__PURE__ */ (0,i.jsx)(e.PillMessage,{className:u.message,children:o}),(s||c)&&/* @__PURE__ */ (0,i.jsxs)(e.PillActions,{className:u.actions,children:[s&&(e=>{let{icon:n,label:r}=e;if(e.href!==void 0)return/* @__PURE__ */ (0,i.jsx)(t,{icon:n,label:r,href:e.href,linkComponent:l,className:u.action,onClick:d});let{onClick:a}=e;return/* @__PURE__ */ (0,i.jsx)(t,{icon:n,label:r,className:u.action,onClick:e=>{a(e),d?.(e)}})})(s),c&&/* @__PURE__ */ (0,i.jsx)(n.PillPanelTrigger,{icon:c.trigger?c.trigger.icon:/* @__PURE__ */ (0,i.jsx)(r,{}),label:c.trigger?.label??`Learn more`,className:u.action})]}),c&&/* @__PURE__ */ (0,i.jsx)(n.PillPanel,{title:c.title,closeLabel:c.closeLabel,className:u.panel,children:c.content})]})}const o=a;exports.NotificationContent=a,exports.PillNotification=o;
2
- //# sourceMappingURL=PillNotification.js.map
1
+ const require_parts = require("../Pill/parts.js");
2
+ const require_PillAction = require("../Pill/PillAction.js");
3
+ const require_PillPanel = require("../Pill/PillPanel.js");
4
+ const require_PlusIcon = require("../icons/PlusIcon.js");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+
7
+ // src/PillNotification/PillNotification.tsx
8
+ /** The implementation, with the host-only `onAction` hook. */
9
+ function NotificationContent({ icon, message, action, panel, linkComponent, classNames = {}, onAction }) {
10
+ const hasIcon = icon !== void 0 && icon !== null;
11
+ const renderAction = (notificationAction) => {
12
+ const { icon: actionIcon, label } = notificationAction;
13
+ if (notificationAction.href !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PillAction, {
14
+ icon: actionIcon,
15
+ label,
16
+ href: notificationAction.href,
17
+ linkComponent,
18
+ className: classNames.action,
19
+ onClick: onAction
20
+ });
21
+ const { onClick } = notificationAction;
22
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PillAction, {
23
+ icon: actionIcon,
24
+ label,
25
+ className: classNames.action,
26
+ onClick: (event) => {
27
+ onClick(event);
28
+ onAction?.(event);
29
+ }
30
+ });
31
+ };
32
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
33
+ hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.PillIcon, {
34
+ className: classNames.icon,
35
+ children: icon
36
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.PillDivider, { className: classNames.divider })] }),
37
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.PillMessage, {
38
+ className: classNames.message,
39
+ children: message
40
+ }),
41
+ (action || panel) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_parts.PillActions, {
42
+ className: classNames.actions,
43
+ children: [action && renderAction(action), panel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PillPanel.PillPanelTrigger, {
44
+ icon: panel.trigger ? panel.trigger.icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PlusIcon, {}),
45
+ label: panel.trigger?.label ?? "Learn more",
46
+ className: classNames.action
47
+ })]
48
+ }),
49
+ panel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PillPanel.PillPanel, {
50
+ title: panel.title,
51
+ closeLabel: panel.closeLabel,
52
+ className: classNames.panel,
53
+ children: panel.content
54
+ })
55
+ ] });
56
+ }
57
+ /**
58
+ * Icon · divider · message · action, with an optional expandable panel.
59
+ * Render it inside a <Pill>, or let <MagicPill> render it for pill().notify().
60
+ */
61
+ const PillNotification = NotificationContent;
62
+
63
+ exports.NotificationContent = NotificationContent;
64
+ exports.PillNotification = PillNotification;
@@ -1,2 +1,63 @@
1
- import{PillActions as e,PillDivider as t,PillIcon as n,PillMessage as r}from"../Pill/parts.mjs";import i from"../Pill/PillAction.mjs";import{PillPanel as a,PillPanelTrigger as o}from"../Pill/PillPanel.mjs";import s from"../icons/PlusIcon.mjs";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";function d({icon:d,message:f,action:p,panel:m,linkComponent:h,classNames:g={},onAction:_}){return/* @__PURE__ */ u(c,{children:[d!=null&&/* @__PURE__ */ u(c,{children:[/* @__PURE__ */ l(n,{className:g.icon,children:d}),/* @__PURE__ */ l(t,{className:g.divider})]}),/* @__PURE__ */ l(r,{className:g.message,children:f}),(p||m)&&/* @__PURE__ */ u(e,{className:g.actions,children:[p&&(e=>{let{icon:t,label:n}=e;if(e.href!==void 0)return/* @__PURE__ */ l(i,{icon:t,label:n,href:e.href,linkComponent:h,className:g.action,onClick:_});let{onClick:r}=e;return/* @__PURE__ */ l(i,{icon:t,label:n,className:g.action,onClick:e=>{r(e),_?.(e)}})})(p),m&&/* @__PURE__ */ l(o,{icon:m.trigger?m.trigger.icon:/* @__PURE__ */ l(s,{}),label:m.trigger?.label??`Learn more`,className:g.action})]}),m&&/* @__PURE__ */ l(a,{title:m.title,closeLabel:m.closeLabel,className:g.panel,children:m.content})]})}const f=d;export{d as NotificationContent,f as PillNotification};
2
- //# sourceMappingURL=PillNotification.mjs.map
1
+ import { PillActions, PillDivider, PillIcon, PillMessage } from "../Pill/parts.mjs";
2
+ import PillAction from "../Pill/PillAction.mjs";
3
+ import { PillPanel, PillPanelTrigger } from "../Pill/PillPanel.mjs";
4
+ import PlusIcon from "../icons/PlusIcon.mjs";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ // src/PillNotification/PillNotification.tsx
8
+ /** The implementation, with the host-only `onAction` hook. */
9
+ function NotificationContent({ icon, message, action, panel, linkComponent, classNames = {}, onAction }) {
10
+ const hasIcon = icon !== void 0 && icon !== null;
11
+ const renderAction = (notificationAction) => {
12
+ const { icon: actionIcon, label } = notificationAction;
13
+ if (notificationAction.href !== void 0) return /* @__PURE__ */ jsx(PillAction, {
14
+ icon: actionIcon,
15
+ label,
16
+ href: notificationAction.href,
17
+ linkComponent,
18
+ className: classNames.action,
19
+ onClick: onAction
20
+ });
21
+ const { onClick } = notificationAction;
22
+ return /* @__PURE__ */ jsx(PillAction, {
23
+ icon: actionIcon,
24
+ label,
25
+ className: classNames.action,
26
+ onClick: (event) => {
27
+ onClick(event);
28
+ onAction?.(event);
29
+ }
30
+ });
31
+ };
32
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
33
+ hasIcon && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PillIcon, {
34
+ className: classNames.icon,
35
+ children: icon
36
+ }), /* @__PURE__ */ jsx(PillDivider, { className: classNames.divider })] }),
37
+ /* @__PURE__ */ jsx(PillMessage, {
38
+ className: classNames.message,
39
+ children: message
40
+ }),
41
+ (action || panel) && /* @__PURE__ */ jsxs(PillActions, {
42
+ className: classNames.actions,
43
+ children: [action && renderAction(action), panel && /* @__PURE__ */ jsx(PillPanelTrigger, {
44
+ icon: panel.trigger ? panel.trigger.icon : /* @__PURE__ */ jsx(PlusIcon, {}),
45
+ label: panel.trigger?.label ?? "Learn more",
46
+ className: classNames.action
47
+ })]
48
+ }),
49
+ panel && /* @__PURE__ */ jsx(PillPanel, {
50
+ title: panel.title,
51
+ closeLabel: panel.closeLabel,
52
+ className: classNames.panel,
53
+ children: panel.content
54
+ })
55
+ ] });
56
+ }
57
+ /**
58
+ * Icon · divider · message · action, with an optional expandable panel.
59
+ * Render it inside a <Pill>, or let <MagicPill> render it for pill().notify().
60
+ */
61
+ const PillNotification = NotificationContent;
62
+
63
+ export { NotificationContent, PillNotification };
@@ -1,2 +1,21 @@
1
- let e=require("react/jsx-runtime");const t=t=>/* @__PURE__ */ (0,e.jsx)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 31 20`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,...t,children:/* @__PURE__ */ (0,e.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.813004 10.2755C0.813004 9.69059 1.28715 9.21645 1.87204 9.21645L26.8501 9.21645L20.1858 2.55207C19.7722 2.1385 19.7722 1.46795 20.1858 1.05438C20.5993 0.640799 21.2699 0.640799 21.6835 1.05438L30.1557 9.52663C30.5693 9.94021 30.5693 10.6107 30.1557 11.0243L21.6835 19.4966C21.2699 19.9102 20.5993 19.9102 20.1858 19.4966C19.7722 19.083 19.7722 18.4125 20.1858 17.9989L26.8501 11.3345L1.87204 11.3345C1.28715 11.3345 0.813004 10.8604 0.813004 10.2755Z`})});module.exports=t;
2
- //# sourceMappingURL=ArrowIcon.js.map
1
+ let react_jsx_runtime = require("react/jsx-runtime");
2
+
3
+ // src/icons/ArrowIcon.tsx
4
+ /** v9 icon (from `arrow_label`): drawn in `currentColor`, decorative by default. */
5
+ const ArrowIcon = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 31 20",
9
+ fill: "currentColor",
10
+ "aria-hidden": "true",
11
+ focusable: "false",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ ...props,
14
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
15
+ fillRule: "evenodd",
16
+ clipRule: "evenodd",
17
+ d: "M0.813004 10.2755C0.813004 9.69059 1.28715 9.21645 1.87204 9.21645L26.8501 9.21645L20.1858 2.55207C19.7722 2.1385 19.7722 1.46795 20.1858 1.05438C20.5993 0.640799 21.2699 0.640799 21.6835 1.05438L30.1557 9.52663C30.5693 9.94021 30.5693 10.6107 30.1557 11.0243L21.6835 19.4966C21.2699 19.9102 20.5993 19.9102 20.1858 19.4966C19.7722 19.083 19.7722 18.4125 20.1858 17.9989L26.8501 11.3345L1.87204 11.3345C1.28715 11.3345 0.813004 10.8604 0.813004 10.2755Z"
18
+ })
19
+ });
20
+
21
+ module.exports = ArrowIcon;
@@ -1,2 +1,21 @@
1
- import{jsx as e}from"react/jsx-runtime";const t=t=>/* @__PURE__ */ e(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 31 20`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,...t,children:/* @__PURE__ */ e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.813004 10.2755C0.813004 9.69059 1.28715 9.21645 1.87204 9.21645L26.8501 9.21645L20.1858 2.55207C19.7722 2.1385 19.7722 1.46795 20.1858 1.05438C20.5993 0.640799 21.2699 0.640799 21.6835 1.05438L30.1557 9.52663C30.5693 9.94021 30.5693 10.6107 30.1557 11.0243L21.6835 19.4966C21.2699 19.9102 20.5993 19.9102 20.1858 19.4966C19.7722 19.083 19.7722 18.4125 20.1858 17.9989L26.8501 11.3345L1.87204 11.3345C1.28715 11.3345 0.813004 10.8604 0.813004 10.2755Z`})});export{t as default};
2
- //# sourceMappingURL=ArrowIcon.mjs.map
1
+ import { jsx } from "react/jsx-runtime";
2
+
3
+ // src/icons/ArrowIcon.tsx
4
+ /** v9 icon (from `arrow_label`): drawn in `currentColor`, decorative by default. */
5
+ const ArrowIcon = (props) => /* @__PURE__ */ jsx("svg", {
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 31 20",
9
+ fill: "currentColor",
10
+ "aria-hidden": "true",
11
+ focusable: "false",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ ...props,
14
+ children: /* @__PURE__ */ jsx("path", {
15
+ fillRule: "evenodd",
16
+ clipRule: "evenodd",
17
+ d: "M0.813004 10.2755C0.813004 9.69059 1.28715 9.21645 1.87204 9.21645L26.8501 9.21645L20.1858 2.55207C19.7722 2.1385 19.7722 1.46795 20.1858 1.05438C20.5993 0.640799 21.2699 0.640799 21.6835 1.05438L30.1557 9.52663C30.5693 9.94021 30.5693 10.6107 30.1557 11.0243L21.6835 19.4966C21.2699 19.9102 20.5993 19.9102 20.1858 19.4966C19.7722 19.083 19.7722 18.4125 20.1858 17.9989L26.8501 11.3345L1.87204 11.3345C1.28715 11.3345 0.813004 10.8604 0.813004 10.2755Z"
18
+ })
19
+ });
20
+
21
+ export { ArrowIcon as default };
@@ -1,2 +1,21 @@
1
- let e=require("react/jsx-runtime");const t=t=>/* @__PURE__ */ (0,e.jsx)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 27 26`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,...t,children:/* @__PURE__ */ (0,e.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M25.5226 4.8102C25.9834 4.99448 26.2855 5.4407 26.2855 5.9369V19.9512C26.2855 20.4474 25.9834 20.8936 25.5226 21.0779L13.7921 25.7701C13.5028 25.8858 13.1801 25.8858 12.8908 25.7701L1.16028 21.0779C0.699563 20.8936 0.397461 20.4474 0.397461 19.9512V5.9369C0.397461 5.4407 0.699563 4.99448 1.16028 4.8102L12.4401 0.298213C12.4451 0.296221 12.4501 0.294245 12.4551 0.292286L12.8908 0.117998C13.1801 0.00227327 13.5028 0.00227283 13.7921 0.117998L14.2279 0.292303C14.2329 0.294256 14.2379 0.296226 14.2428 0.298213L25.5226 4.8102ZM17.2306 3.23602L7.27396 7.21868L3.38482 5.66302L2.01546 6.21076V6.85792L12.5325 11.0647V23.8841L13.3415 24.2077L14.1505 23.8841V11.0647L24.6675 6.85792V6.21076L23.2981 5.66302L13.3415 9.64568L9.45226 8.09L19.4089 4.10734L17.2306 3.23602Z`})});module.exports=t;
2
- //# sourceMappingURL=BoxIcon.js.map
1
+ let react_jsx_runtime = require("react/jsx-runtime");
2
+
3
+ // src/icons/BoxIcon.tsx
4
+ /** v9 icon (from `box_label`): drawn in `currentColor`, decorative by default. */
5
+ const BoxIcon = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 27 26",
9
+ fill: "currentColor",
10
+ "aria-hidden": "true",
11
+ focusable: "false",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ ...props,
14
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
15
+ fillRule: "evenodd",
16
+ clipRule: "evenodd",
17
+ d: "M25.5226 4.8102C25.9834 4.99448 26.2855 5.4407 26.2855 5.9369V19.9512C26.2855 20.4474 25.9834 20.8936 25.5226 21.0779L13.7921 25.7701C13.5028 25.8858 13.1801 25.8858 12.8908 25.7701L1.16028 21.0779C0.699563 20.8936 0.397461 20.4474 0.397461 19.9512V5.9369C0.397461 5.4407 0.699563 4.99448 1.16028 4.8102L12.4401 0.298213C12.4451 0.296221 12.4501 0.294245 12.4551 0.292286L12.8908 0.117998C13.1801 0.00227327 13.5028 0.00227283 13.7921 0.117998L14.2279 0.292303C14.2329 0.294256 14.2379 0.296226 14.2428 0.298213L25.5226 4.8102ZM17.2306 3.23602L7.27396 7.21868L3.38482 5.66302L2.01546 6.21076V6.85792L12.5325 11.0647V23.8841L13.3415 24.2077L14.1505 23.8841V11.0647L24.6675 6.85792V6.21076L23.2981 5.66302L13.3415 9.64568L9.45226 8.09L19.4089 4.10734L17.2306 3.23602Z"
18
+ })
19
+ });
20
+
21
+ module.exports = BoxIcon;
@@ -1,2 +1,21 @@
1
- import{jsx as e}from"react/jsx-runtime";const t=t=>/* @__PURE__ */ e(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 27 26`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,...t,children:/* @__PURE__ */ e(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M25.5226 4.8102C25.9834 4.99448 26.2855 5.4407 26.2855 5.9369V19.9512C26.2855 20.4474 25.9834 20.8936 25.5226 21.0779L13.7921 25.7701C13.5028 25.8858 13.1801 25.8858 12.8908 25.7701L1.16028 21.0779C0.699563 20.8936 0.397461 20.4474 0.397461 19.9512V5.9369C0.397461 5.4407 0.699563 4.99448 1.16028 4.8102L12.4401 0.298213C12.4451 0.296221 12.4501 0.294245 12.4551 0.292286L12.8908 0.117998C13.1801 0.00227327 13.5028 0.00227283 13.7921 0.117998L14.2279 0.292303C14.2329 0.294256 14.2379 0.296226 14.2428 0.298213L25.5226 4.8102ZM17.2306 3.23602L7.27396 7.21868L3.38482 5.66302L2.01546 6.21076V6.85792L12.5325 11.0647V23.8841L13.3415 24.2077L14.1505 23.8841V11.0647L24.6675 6.85792V6.21076L23.2981 5.66302L13.3415 9.64568L9.45226 8.09L19.4089 4.10734L17.2306 3.23602Z`})});export{t as default};
2
- //# sourceMappingURL=BoxIcon.mjs.map
1
+ import { jsx } from "react/jsx-runtime";
2
+
3
+ // src/icons/BoxIcon.tsx
4
+ /** v9 icon (from `box_label`): drawn in `currentColor`, decorative by default. */
5
+ const BoxIcon = (props) => /* @__PURE__ */ jsx("svg", {
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 27 26",
9
+ fill: "currentColor",
10
+ "aria-hidden": "true",
11
+ focusable: "false",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ ...props,
14
+ children: /* @__PURE__ */ jsx("path", {
15
+ fillRule: "evenodd",
16
+ clipRule: "evenodd",
17
+ d: "M25.5226 4.8102C25.9834 4.99448 26.2855 5.4407 26.2855 5.9369V19.9512C26.2855 20.4474 25.9834 20.8936 25.5226 21.0779L13.7921 25.7701C13.5028 25.8858 13.1801 25.8858 12.8908 25.7701L1.16028 21.0779C0.699563 20.8936 0.397461 20.4474 0.397461 19.9512V5.9369C0.397461 5.4407 0.699563 4.99448 1.16028 4.8102L12.4401 0.298213C12.4451 0.296221 12.4501 0.294245 12.4551 0.292286L12.8908 0.117998C13.1801 0.00227327 13.5028 0.00227283 13.7921 0.117998L14.2279 0.292303C14.2329 0.294256 14.2379 0.296226 14.2428 0.298213L25.5226 4.8102ZM17.2306 3.23602L7.27396 7.21868L3.38482 5.66302L2.01546 6.21076V6.85792L12.5325 11.0647V23.8841L13.3415 24.2077L14.1505 23.8841V11.0647L24.6675 6.85792V6.21076L23.2981 5.66302L13.3415 9.64568L9.45226 8.09L19.4089 4.10734L17.2306 3.23602Z"
18
+ })
19
+ });
20
+
21
+ export { BoxIcon as default };
@@ -1,2 +1,17 @@
1
- let e=require("react/jsx-runtime");const t=t=>/* @__PURE__ */ (0,e.jsx)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 36 28`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,...t,children:/* @__PURE__ */ (0,e.jsx)(`path`,{d:`M31.7745 0.900854C32.7099 -0.0470194 34.2265 -0.0470194 35.1619 0.900854C36.0859 1.8371 36.0972 3.34793 35.1959 4.29828L16.0585 26.9205C16.0401 26.9438 16.0204 26.966 15.9996 26.9872C15.0641 27.935 13.5475 27.935 12.6121 26.9872L0.966345 15.1863C0.0309227 14.2385 0.0309227 12.7017 0.966344 11.7538C1.90177 10.8059 3.41838 10.8059 4.35381 11.7538L14.2337 21.7652L31.7109 0.97346C31.7307 0.947992 31.7519 0.923746 31.7745 0.900854Z`})});module.exports=t;
2
- //# sourceMappingURL=CheckIcon.js.map
1
+ let react_jsx_runtime = require("react/jsx-runtime");
2
+
3
+ // src/icons/CheckIcon.tsx
4
+ /** v9 icon (from `checkmark`): drawn in `currentColor`, decorative by default. */
5
+ const CheckIcon = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 36 28",
9
+ fill: "currentColor",
10
+ "aria-hidden": "true",
11
+ focusable: "false",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ ...props,
14
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M31.7745 0.900854C32.7099 -0.0470194 34.2265 -0.0470194 35.1619 0.900854C36.0859 1.8371 36.0972 3.34793 35.1959 4.29828L16.0585 26.9205C16.0401 26.9438 16.0204 26.966 15.9996 26.9872C15.0641 27.935 13.5475 27.935 12.6121 26.9872L0.966345 15.1863C0.0309227 14.2385 0.0309227 12.7017 0.966344 11.7538C1.90177 10.8059 3.41838 10.8059 4.35381 11.7538L14.2337 21.7652L31.7109 0.97346C31.7307 0.947992 31.7519 0.923746 31.7745 0.900854Z" })
15
+ });
16
+
17
+ module.exports = CheckIcon;
@@ -1,2 +1,17 @@
1
- import{jsx as e}from"react/jsx-runtime";const t=t=>/* @__PURE__ */ e(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 36 28`,fill:`currentColor`,"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,...t,children:/* @__PURE__ */ e(`path`,{d:`M31.7745 0.900854C32.7099 -0.0470194 34.2265 -0.0470194 35.1619 0.900854C36.0859 1.8371 36.0972 3.34793 35.1959 4.29828L16.0585 26.9205C16.0401 26.9438 16.0204 26.966 15.9996 26.9872C15.0641 27.935 13.5475 27.935 12.6121 26.9872L0.966345 15.1863C0.0309227 14.2385 0.0309227 12.7017 0.966344 11.7538C1.90177 10.8059 3.41838 10.8059 4.35381 11.7538L14.2337 21.7652L31.7109 0.97346C31.7307 0.947992 31.7519 0.923746 31.7745 0.900854Z`})});export{t as default};
2
- //# sourceMappingURL=CheckIcon.mjs.map
1
+ import { jsx } from "react/jsx-runtime";
2
+
3
+ // src/icons/CheckIcon.tsx
4
+ /** v9 icon (from `checkmark`): drawn in `currentColor`, decorative by default. */
5
+ const CheckIcon = (props) => /* @__PURE__ */ jsx("svg", {
6
+ width: "1em",
7
+ height: "1em",
8
+ viewBox: "0 0 36 28",
9
+ fill: "currentColor",
10
+ "aria-hidden": "true",
11
+ focusable: "false",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ ...props,
14
+ children: /* @__PURE__ */ jsx("path", { d: "M31.7745 0.900854C32.7099 -0.0470194 34.2265 -0.0470194 35.1619 0.900854C36.0859 1.8371 36.0972 3.34793 35.1959 4.29828L16.0585 26.9205C16.0401 26.9438 16.0204 26.966 15.9996 26.9872C15.0641 27.935 13.5475 27.935 12.6121 26.9872L0.966345 15.1863C0.0309227 14.2385 0.0309227 12.7017 0.966344 11.7538C1.90177 10.8059 3.41838 10.8059 4.35381 11.7538L14.2337 21.7652L31.7109 0.97346C31.7307 0.947992 31.7519 0.923746 31.7745 0.900854Z" })
15
+ });
16
+
17
+ export { CheckIcon as default };