@apipass/design-system 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/embedded-styles.js +1 -1
- package/dist/lib/lib.index.cjs +1 -1
- package/dist/lib/lib.index.js +298 -292
- package/dist/lib/lib.index.js.map +1 -1
- package/dist/lib/style.css +1 -1
- package/dist/lib/ui/components/Widget/Widget.cjs +1 -1
- package/dist/lib/ui/components/Widget/Widget.cjs.map +1 -1
- package/dist/lib/ui/components/Widget/Widget.js +1 -1
- package/dist/lib/ui/components/Widget/Widget.js.map +1 -1
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.cjs +2 -0
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.cjs.map +1 -0
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.js +18 -0
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.js.map +1 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.cjs +2 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.cjs.map +1 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.js +22 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.js.map +1 -0
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.cjs +2 -0
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.cjs.map +1 -0
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.js +27 -0
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.js.map +1 -0
- package/dist/lib/ui/primitives/Dialog/Dialog.cjs +1 -1
- package/dist/lib/ui/primitives/Dialog/Dialog.cjs.map +1 -1
- package/dist/lib/ui/primitives/Dialog/Dialog.js +27 -27
- package/dist/lib/ui/primitives/Dialog/Dialog.js.map +1 -1
- package/dist/types/ui/components/WidgetEmptyState/WidgetEmptyState.d.ts +6 -0
- package/dist/types/ui/components/WidgetErrorState/WidgetErrorState.d.ts +8 -0
- package/dist/types/ui/components/WidgetLoadingState/WidgetLoadingState.d.ts +6 -0
- package/dist/types/ui/components/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../../vendor/clsx/dist/clsx.cjs"),d=require("react");;/* empty css */const l=require("../../primitives/Tooltip/Tooltip.cjs"),g=require("../../icons/IconInfo.cjs"),u=require("../../primitives/IconButton/IconButton.cjs"),m=d.forwardRef(function({title:s,description:t,headerActions:i,children:r,className:a,...n},c){return e.jsxs("div",{ref:c,className:o.clsx("widget",a),...n,children:[e.jsxs("div",{className:"widget-header widget-drag-handle",children:[e.jsxs("span",{className:"widget-header-title-group",children:[e.jsx("span",{className:"widget-header-title",children:s}),t&&e.jsx(l.Tooltip,{content:t,placement:"bottom",offset:4,children:e.jsx(u.IconButton,{"aria-label":`Mais informações sobre ${s}`,variant:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../../vendor/clsx/dist/clsx.cjs"),d=require("react");;/* empty css */const l=require("../../primitives/Tooltip/Tooltip.cjs"),g=require("../../icons/IconInfo.cjs"),u=require("../../primitives/IconButton/IconButton.cjs"),m=d.forwardRef(function({title:s,description:t,headerActions:i,children:r,className:a,...n},c){return e.jsxs("div",{ref:c,className:o.clsx("widget",a),...n,children:[e.jsxs("div",{className:"widget-header widget-drag-handle",children:[e.jsxs("span",{className:"widget-header-title-group",children:[e.jsx("span",{className:"widget-header-title",children:s}),t&&e.jsx(l.Tooltip,{content:t,placement:"bottom",offset:4,children:e.jsx(u.IconButton,{"aria-label":`Mais informações sobre ${s}`,variant:"subtle",size:"small",className:"widget-header-description-trigger",children:e.jsx(g.IconInfo,{size:"14"})})})]}),i&&e.jsx("div",{className:"widget-header-actions",children:i})]}),e.jsx("div",{className:"widget-body",children:r})]})});exports.Widget=m;
|
|
2
2
|
//# sourceMappingURL=Widget.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Widget.cjs","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"
|
|
1
|
+
{"version":3,"file":"Widget.cjs","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"subtle\"\n size=\"small\"\n className=\"widget-header-description-trigger\"\n >\n <IconInfo size=\"14\" />\n </IconButton>\n </Tooltip>\n )}\n </span>\n {headerActions && <div className=\"widget-header-actions\">{headerActions}</div>}\n </div>\n <div className=\"widget-body\">{children}</div>\n </div>\n );\n});\n"],"names":["Widget","forwardRef","title","description","headerActions","children","className","props","ref","jsxs","clsx","jsx","Tooltip","IconButton","IconInfo"],"mappings":"0WAYaA,EAASC,EAAAA,WAAwC,SAC5D,CAAE,MAAAC,EAAO,YAAAC,EAAa,cAAAC,EAAe,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAA,EAC7DC,EACA,CACA,OACEC,OAAC,OAAI,IAAAD,EAAU,UAAWE,OAAK,SAAUJ,CAAS,EAAI,GAAGC,EACvD,SAAA,CAAAE,EAAAA,KAAC,MAAA,CAAI,UAAU,mCACb,SAAA,CAAAA,EAAAA,KAAC,OAAA,CAAK,UAAU,4BACd,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAuB,SAAAT,EAAM,EAC5CC,SACES,UAAA,CAAQ,QAAST,EAAa,UAAU,SAAS,OAAQ,EACxD,SAAAQ,EAAAA,IAACE,EAAAA,WAAA,CACC,aAAY,0BAA0BX,CAAK,GAC3C,QAAQ,SACR,KAAK,QACL,UAAU,oCAEV,SAAAS,EAAAA,IAACG,EAAAA,SAAA,CAAS,KAAK,IAAA,CAAK,CAAA,CAAA,CACtB,CACF,CAAA,EAEJ,EACCV,GAAiBO,EAAAA,IAAC,MAAA,CAAI,UAAU,wBAAyB,SAAAP,CAAA,CAAc,CAAA,EAC1E,EACAO,EAAAA,IAAC,MAAA,CAAI,UAAU,cAAe,SAAAN,CAAA,CAAS,CAAA,EACzC,CAEJ,CAAC"}
|
|
@@ -14,7 +14,7 @@ const I = n(function({ title: r, description: t, headerActions: a, children: o,
|
|
|
14
14
|
f,
|
|
15
15
|
{
|
|
16
16
|
"aria-label": `Mais informações sobre ${r}`,
|
|
17
|
-
variant: "
|
|
17
|
+
variant: "subtle",
|
|
18
18
|
size: "small",
|
|
19
19
|
className: "widget-header-description-trigger",
|
|
20
20
|
children: /* @__PURE__ */ e(g, { size: "14" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Widget.js","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"
|
|
1
|
+
{"version":3,"file":"Widget.js","sources":["../../../../../src/ui/components/Widget/Widget.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef, type ReactNode, forwardRef } from \"react\";\nimport { IconInfo } from \"icons\";\nimport { IconButton, Tooltip } from \"primitives\";\nimport \"./widget.css\";\n\nexport type WidgetProps = ComponentPropsWithoutRef<\"div\"> & {\n title: string;\n description?: ReactNode;\n headerActions?: ReactNode;\n};\n\nexport const Widget = forwardRef<HTMLDivElement, WidgetProps>(function Widget(\n { title, description, headerActions, children, className, ...props },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(\"widget\", className)} {...props}>\n <div className=\"widget-header widget-drag-handle\">\n <span className=\"widget-header-title-group\">\n <span className=\"widget-header-title\">{title}</span>\n {description && (\n <Tooltip content={description} placement=\"bottom\" offset={4}>\n <IconButton\n aria-label={`Mais informações sobre ${title}`}\n variant=\"subtle\"\n size=\"small\"\n className=\"widget-header-description-trigger\"\n >\n <IconInfo size=\"14\" />\n </IconButton>\n </Tooltip>\n )}\n </span>\n {headerActions && <div className=\"widget-header-actions\">{headerActions}</div>}\n </div>\n <div className=\"widget-body\">{children}</div>\n </div>\n );\n});\n"],"names":["Widget","forwardRef","title","description","headerActions","children","className","props","ref","jsxs","clsx","jsx","Tooltip","IconButton","IconInfo"],"mappings":";;;;;;;AAYO,MAAMA,IAASC,EAAwC,SAC5D,EAAE,OAAAC,GAAO,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAC7DC,GACA;AACA,SACE,gBAAAC,EAAC,SAAI,KAAAD,GAAU,WAAWE,EAAK,UAAUJ,CAAS,GAAI,GAAGC,GACvD,UAAA;AAAA,IAAA,gBAAAE,EAAC,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,MAAA,gBAAAA,EAAC,QAAA,EAAK,WAAU,6BACd,UAAA;AAAA,QAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,uBAAuB,UAAAT,GAAM;AAAA,QAC5CC,uBACES,GAAA,EAAQ,SAAST,GAAa,WAAU,UAAS,QAAQ,GACxD,UAAA,gBAAAQ;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,cAAY,0BAA0BX,CAAK;AAAA,YAC3C,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,WAAU;AAAA,YAEV,UAAA,gBAAAS,EAACG,GAAA,EAAS,MAAK,KAAA,CAAK;AAAA,UAAA;AAAA,QAAA,EACtB,CACF;AAAA,MAAA,GAEJ;AAAA,MACCV,KAAiB,gBAAAO,EAAC,OAAA,EAAI,WAAU,yBAAyB,UAAAP,EAAA,CAAc;AAAA,IAAA,GAC1E;AAAA,IACA,gBAAAO,EAAC,OAAA,EAAI,WAAU,eAAe,UAAAN,EAAA,CAAS;AAAA,EAAA,GACzC;AAEJ,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../../vendor/clsx/dist/clsx.cjs");;/* empty css */const r=require("../../icons/IconInbox.cjs");function a({message:t,className:s,...i}){return e.jsxs("div",{role:"status",className:n.clsx("widget-empty-state",s),...i,children:[e.jsx(r.IconInbox,{size:"24",className:"widget-empty-state-icon"}),e.jsx("span",{className:"widget-empty-state-message",children:t})]})}exports.WidgetEmptyState=a;
|
|
2
|
+
//# sourceMappingURL=WidgetEmptyState.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetEmptyState.cjs","sources":["../../../../../src/ui/components/WidgetEmptyState/WidgetEmptyState.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { IconInbox } from \"icons\";\nimport \"./widget-empty-state.css\";\n\nexport type WidgetEmptyStateProps = ComponentPropsWithoutRef<\"div\"> & {\n message: string;\n};\n\nexport function WidgetEmptyState({\n message,\n className,\n ...props\n}: WidgetEmptyStateProps) {\n return (\n <div role=\"status\" className={clsx(\"widget-empty-state\", className)} {...props}>\n <IconInbox size=\"24\" className=\"widget-empty-state-icon\" />\n <span className=\"widget-empty-state-message\">{message}</span>\n </div>\n );\n}\n"],"names":["WidgetEmptyState","message","className","props","jsxs","clsx","jsx","IconInbox"],"mappings":"0PASO,SAASA,EAAiB,CAC/B,QAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,OACEC,OAAC,MAAA,CAAI,KAAK,SAAS,UAAWC,EAAAA,KAAK,qBAAsBH,CAAS,EAAI,GAAGC,EACvE,SAAA,CAAAG,EAAAA,IAACC,EAAAA,UAAA,CAAU,KAAK,KAAK,UAAU,0BAA0B,EACzDD,EAAAA,IAAC,OAAA,CAAK,UAAU,6BAA8B,SAAAL,CAAA,CAAQ,CAAA,EACxD,CAEJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as a } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { IconInbox as o } from "../../icons/IconInbox.js";
|
|
5
|
+
function d({
|
|
6
|
+
message: e,
|
|
7
|
+
className: s,
|
|
8
|
+
...m
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ i("div", { role: "status", className: a("widget-empty-state", s), ...m, children: [
|
|
11
|
+
/* @__PURE__ */ t(o, { size: "24", className: "widget-empty-state-icon" }),
|
|
12
|
+
/* @__PURE__ */ t("span", { className: "widget-empty-state-message", children: e })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
d as WidgetEmptyState
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=WidgetEmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetEmptyState.js","sources":["../../../../../src/ui/components/WidgetEmptyState/WidgetEmptyState.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { IconInbox } from \"icons\";\nimport \"./widget-empty-state.css\";\n\nexport type WidgetEmptyStateProps = ComponentPropsWithoutRef<\"div\"> & {\n message: string;\n};\n\nexport function WidgetEmptyState({\n message,\n className,\n ...props\n}: WidgetEmptyStateProps) {\n return (\n <div role=\"status\" className={clsx(\"widget-empty-state\", className)} {...props}>\n <IconInbox size=\"24\" className=\"widget-empty-state-icon\" />\n <span className=\"widget-empty-state-message\">{message}</span>\n </div>\n );\n}\n"],"names":["WidgetEmptyState","message","className","props","jsxs","clsx","jsx","IconInbox"],"mappings":";;;;AASO,SAASA,EAAiB;AAAA,EAC/B,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAA0B;AACxB,SACE,gBAAAC,EAAC,OAAA,EAAI,MAAK,UAAS,WAAWC,EAAK,sBAAsBH,CAAS,GAAI,GAAGC,GACvE,UAAA;AAAA,IAAA,gBAAAG,EAACC,GAAA,EAAU,MAAK,MAAK,WAAU,2BAA0B;AAAA,IACzD,gBAAAD,EAAC,QAAA,EAAK,WAAU,8BAA8B,UAAAL,EAAA,CAAQ;AAAA,EAAA,GACxD;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs");;/* empty css */const l=require("../../icons/IconAlertTriangle.cjs"),o=require("../../primitives/Button/Button.cjs");function c({message:t,retryLabel:s,onRetry:r,className:i,...n}){return e.jsxs("div",{role:"alert",className:a.clsx("widget-error-state",i),...n,children:[e.jsx(l.IconAlertTriangle,{size:"24",className:"widget-error-state-icon"}),e.jsx("span",{className:"widget-error-state-message",children:t}),r&&e.jsx(o.Button,{variant:"neutral",size:"small",onPress:r,children:s})]})}exports.WidgetErrorState=c;
|
|
2
|
+
//# sourceMappingURL=WidgetErrorState.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetErrorState.cjs","sources":["../../../../../src/ui/components/WidgetErrorState/WidgetErrorState.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { IconAlertTriangle } from \"icons\";\nimport { Button } from \"primitives\";\nimport \"./widget-error-state.css\";\n\nexport type WidgetErrorStateProps = ComponentPropsWithoutRef<\"div\"> & {\n message: string;\n retryLabel: string;\n onRetry?: () => void;\n};\n\nexport function WidgetErrorState({\n message,\n retryLabel,\n onRetry,\n className,\n ...props\n}: WidgetErrorStateProps) {\n return (\n <div role=\"alert\" className={clsx(\"widget-error-state\", className)} {...props}>\n <IconAlertTriangle size=\"24\" className=\"widget-error-state-icon\" />\n <span className=\"widget-error-state-message\">{message}</span>\n {onRetry && (\n <Button variant=\"neutral\" size=\"small\" onPress={onRetry}>\n {retryLabel}\n </Button>\n )}\n </div>\n );\n}\n"],"names":["WidgetErrorState","message","retryLabel","onRetry","className","props","jsxs","clsx","jsx","IconAlertTriangle","Button"],"mappings":"kTAYO,SAASA,EAAiB,CAC/B,QAAAC,EACA,WAAAC,EACA,QAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,OACEC,OAAC,MAAA,CAAI,KAAK,QAAQ,UAAWC,EAAAA,KAAK,qBAAsBH,CAAS,EAAI,GAAGC,EACtE,SAAA,CAAAG,EAAAA,IAACC,EAAAA,kBAAA,CAAkB,KAAK,KAAK,UAAU,0BAA0B,EACjED,EAAAA,IAAC,OAAA,CAAK,UAAU,6BAA8B,SAAAP,EAAQ,EACrDE,SACEO,SAAA,CAAO,QAAQ,UAAU,KAAK,QAAQ,QAASP,EAC7C,SAAAD,CAAA,CACH,CAAA,EAEJ,CAEJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as l } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { IconAlertTriangle as m } from "../../icons/IconAlertTriangle.js";
|
|
5
|
+
import { Button as n } from "../../primitives/Button/Button.js";
|
|
6
|
+
function u({
|
|
7
|
+
message: t,
|
|
8
|
+
retryLabel: s,
|
|
9
|
+
onRetry: e,
|
|
10
|
+
className: i,
|
|
11
|
+
...o
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ a("div", { role: "alert", className: l("widget-error-state", i), ...o, children: [
|
|
14
|
+
/* @__PURE__ */ r(m, { size: "24", className: "widget-error-state-icon" }),
|
|
15
|
+
/* @__PURE__ */ r("span", { className: "widget-error-state-message", children: t }),
|
|
16
|
+
e && /* @__PURE__ */ r(n, { variant: "neutral", size: "small", onPress: e, children: s })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
u as WidgetErrorState
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=WidgetErrorState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetErrorState.js","sources":["../../../../../src/ui/components/WidgetErrorState/WidgetErrorState.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { IconAlertTriangle } from \"icons\";\nimport { Button } from \"primitives\";\nimport \"./widget-error-state.css\";\n\nexport type WidgetErrorStateProps = ComponentPropsWithoutRef<\"div\"> & {\n message: string;\n retryLabel: string;\n onRetry?: () => void;\n};\n\nexport function WidgetErrorState({\n message,\n retryLabel,\n onRetry,\n className,\n ...props\n}: WidgetErrorStateProps) {\n return (\n <div role=\"alert\" className={clsx(\"widget-error-state\", className)} {...props}>\n <IconAlertTriangle size=\"24\" className=\"widget-error-state-icon\" />\n <span className=\"widget-error-state-message\">{message}</span>\n {onRetry && (\n <Button variant=\"neutral\" size=\"small\" onPress={onRetry}>\n {retryLabel}\n </Button>\n )}\n </div>\n );\n}\n"],"names":["WidgetErrorState","message","retryLabel","onRetry","className","props","jsxs","clsx","jsx","IconAlertTriangle","Button"],"mappings":";;;;;AAYO,SAASA,EAAiB;AAAA,EAC/B,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAA0B;AACxB,SACE,gBAAAC,EAAC,OAAA,EAAI,MAAK,SAAQ,WAAWC,EAAK,sBAAsBH,CAAS,GAAI,GAAGC,GACtE,UAAA;AAAA,IAAA,gBAAAG,EAACC,GAAA,EAAkB,MAAK,MAAK,WAAU,2BAA0B;AAAA,IACjE,gBAAAD,EAAC,QAAA,EAAK,WAAU,8BAA8B,UAAAP,GAAQ;AAAA,IACrDE,uBACEO,GAAA,EAAO,SAAQ,WAAU,MAAK,SAAQ,SAASP,GAC7C,UAAAD,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs");;/* empty css */const n=require("../../icons/IconLoader.cjs");function r({message:t,className:s,...i}){return e.jsxs("div",{role:"status","aria-live":"polite",className:a.clsx("widget-loading-state",s),...i,children:[e.jsx(n.IconLoader,{size:"24",className:"widget-loading-state-spinner"}),e.jsx("span",{className:"widget-loading-state-message",children:t})]})}exports.WidgetLoadingState=r;
|
|
2
|
+
//# sourceMappingURL=WidgetLoadingState.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetLoadingState.cjs","sources":["../../../../../src/ui/components/WidgetLoadingState/WidgetLoadingState.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { IconLoader } from \"icons\";\nimport \"./widget-loading-state.css\";\n\nexport type WidgetLoadingStateProps = ComponentPropsWithoutRef<\"div\"> & {\n message: string;\n};\n\nexport function WidgetLoadingState({\n message,\n className,\n ...props\n}: WidgetLoadingStateProps) {\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n className={clsx(\"widget-loading-state\", className)}\n {...props}\n >\n <IconLoader size=\"24\" className=\"widget-loading-state-spinner\" />\n <span className=\"widget-loading-state-message\">{message}</span>\n </div>\n );\n}\n"],"names":["WidgetLoadingState","message","className","props","jsxs","clsx","jsx","IconLoader"],"mappings":"6PASO,SAASA,EAAmB,CACjC,QAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAA4B,CAC1B,OACEC,EAAAA,KAAC,MAAA,CACC,KAAK,SACL,YAAU,SACV,UAAWC,EAAAA,KAAK,uBAAwBH,CAAS,EAChD,GAAGC,EAEJ,SAAA,CAAAG,EAAAA,IAACC,EAAAA,WAAA,CAAW,KAAK,KAAK,UAAU,+BAA+B,EAC/DD,EAAAA,IAAC,OAAA,CAAK,UAAU,+BAAgC,SAAAL,CAAA,CAAQ,CAAA,CAAA,CAAA,CAG9D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as o } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { IconLoader as r } from "../../icons/IconLoader.js";
|
|
5
|
+
function g({
|
|
6
|
+
message: t,
|
|
7
|
+
className: i,
|
|
8
|
+
...a
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ s(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
role: "status",
|
|
14
|
+
"aria-live": "polite",
|
|
15
|
+
className: o("widget-loading-state", i),
|
|
16
|
+
...a,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ e(r, { size: "24", className: "widget-loading-state-spinner" }),
|
|
19
|
+
/* @__PURE__ */ e("span", { className: "widget-loading-state-message", children: t })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
g as WidgetLoadingState
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=WidgetLoadingState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetLoadingState.js","sources":["../../../../../src/ui/components/WidgetLoadingState/WidgetLoadingState.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { IconLoader } from \"icons\";\nimport \"./widget-loading-state.css\";\n\nexport type WidgetLoadingStateProps = ComponentPropsWithoutRef<\"div\"> & {\n message: string;\n};\n\nexport function WidgetLoadingState({\n message,\n className,\n ...props\n}: WidgetLoadingStateProps) {\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n className={clsx(\"widget-loading-state\", className)}\n {...props}\n >\n <IconLoader size=\"24\" className=\"widget-loading-state-spinner\" />\n <span className=\"widget-loading-state-message\">{message}</span>\n </div>\n );\n}\n"],"names":["WidgetLoadingState","message","className","props","jsxs","clsx","jsx","IconLoader"],"mappings":";;;;AASO,SAASA,EAAmB;AAAA,EACjC,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAA4B;AAC1B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,WAAWC,EAAK,wBAAwBH,CAAS;AAAA,MAChD,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAG,EAACC,GAAA,EAAW,MAAK,MAAK,WAAU,gCAA+B;AAAA,QAC/D,gBAAAD,EAAC,QAAA,EAAK,WAAU,gCAAgC,UAAAL,EAAA,CAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9D;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs"),t=require("react-aria-components");;/* empty css */const x=require("../../icons/IconX.cjs"),c=require("../Text/Text.cjs"),r=require("../IconButton/IconButton.cjs"),D=require("../Button/Button.cjs");function g({className:s,type:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("../../../vendor/clsx/dist/clsx.cjs"),t=require("react-aria-components");;/* empty css */const x=require("../../icons/IconX.cjs"),c=require("../Text/Text.cjs"),r=require("../IconButton/IconButton.cjs"),D=require("../Button/Button.cjs");function g({className:s,type:e="card",...i}){const l=a.clsx(s,"dialog",`dialog-type-${e}`);return o.jsx(t.Dialog,{className:l,...i})}const m=({onPress:s})=>o.jsx(r.IconButton,{className:"dialog-close","aria-label":"Dismiss dialog",onPress:s,variant:"subtle",size:"small",children:o.jsx(x.IconX,{})});function u({...s}){return o.jsx(t.DialogTrigger,{...s})}function j({label:s,icon:e,variant:i,children:l,...n}){return o.jsxs(u,{children:[e?o.jsx(r.IconButton,{variant:i,"aria-label":s,children:e}):o.jsx(D.Button,{variant:i,children:s}),o.jsx(d,{isDismissable:!0,children:o.jsx(g,{...n,children:l})})]})}function N({className:s,...e}){const i=a.clsx(s,"dialog-title");return o.jsx(c.TextHeading,{...e,slot:"title",className:i})}function b({className:s,...e}){const i=a.clsx(s,"dialog-description");return o.jsx(c.Text,{...e,className:i})}function B({bleed:s,className:e,...i}){const l=a.clsx(e,"dialog-body",s&&"dialog-body-bleed");return o.jsx("div",{...i,className:l})}function d({children:s,className:e,isDismissable:i,...l}){const n=a.clsx(e,"dialog-backdrop");return o.jsx(t.ModalOverlay,{className:n,isDismissable:i,...l,children:o.jsx(t.Modal,{className:"dialog-container",children:s})})}exports.Dialog=g;exports.DialogBody=B;exports.DialogButton=j;exports.DialogClose=m;exports.DialogDescription=b;exports.DialogModal=d;exports.DialogTitle=N;exports.DialogTrigger=u;
|
|
2
2
|
//# sourceMappingURL=Dialog.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.cjs","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":"uXA0BO,SAASA,EAAO,CAAE,UAAAC,EAAW,KAAAC,EAAO,OAAQ,GAAGC,GAAsB,CAC1E,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,SAAU,eAAeC,CAAI,EAAE,EAClE,OAAOI,EAAAA,IAACC,EAAAA,OAAA,CAAU,UAAWH,EAAa,GAAGD,EAAO,CACtD,CAGO,MAAMK,EAAc,CAAC,CAAE,QAAAC,CAAA,IAC5BH,EAAAA,IAACI,EAAAA,WAAA,CACC,UAAU,eACV,aAAW,iBACX,QAAAD,EACA,QAAQ,SACR,KAAK,QAEL,eAACE,EAAAA,MAAA,CAAA,CAAM,CAAA,CACT,EAIK,SAASC,EAAc,CAAE,GAAGT,GAA6B,CAC9D,OAAOG,MAACO,EAAAA,cAAA,CAAkB,GAAGV,CAAA,CAAO,CACtC,CASO,SAASW,EAAa,CAC3B,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,SAAAC,EACA,GAAGf,CACL,EAAsB,CACpB,cACGS,EAAA,CACE,SAAA,CAAAI,EACCV,EAAAA,IAACI,EAAAA,WAAA,CAAW,QAAAO,EAAkB,aAAYF,EACvC,WACH,EAEAT,EAAAA,IAACa,EAAAA,OAAA,CAAO,QAAAF,EAAmB,SAAAF,EAAM,EAEnCT,EAAAA,IAACc,GAAY,cAAa,GACxB,eAACpB,EAAA,CAAQ,GAAGG,EAAQ,SAAAe,CAAA,CAAS,CAAA,CAC/B,CAAA,EACF,CAEJ,CAGO,SAASG,EAAY,CAAE,UAAApB,EAAW,GAAGE,GAA2B,CACrE,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,cAAc,EACjD,aAAQqB,EAAAA,YAAA,CAAa,GAAGnB,EAAO,KAAK,QAAQ,UAAWC,EAAY,CACrE,CAGO,SAASmB,EAAkB,CAChC,UAAAtB,EACA,GAAGE,CACL,EAA2B,CACzB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,oBAAoB,EACvD,OAAOK,EAAAA,IAACkB,EAAAA,KAAA,CAAM,GAAGrB,EAAO,UAAWC,EAAY,CACjD,CAKO,SAASqB,EAAW,CAAE,MAAAC,EAAO,UAAAzB,EAAW,GAAGE,GAA0B,CAC1E,MAAMC,EAAaC,EAAAA,KACjBJ,EACA,cACAyB,GAAS,mBAAA,EAEX,OAAOpB,EAAAA,IAAC,MAAA,CAAK,GAAGH,EAAO,UAAWC,EAAY,CAChD,CAGO,SAASgB,EAAY,CAC1B,SAAAF,EACA,UAAAjB,EACA,cAAA0B,EACA,GAAGxB,CACL,EAAqB,CACnB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,iBAAiB,EACpD,OACEK,EAAAA,IAACsB,EAAAA,aAAA,CAAgB,UAAWxB,
|
|
1
|
+
{"version":3,"file":"Dialog.cjs","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} isDismissable={isDismissable} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":"uXA0BO,SAASA,EAAO,CAAE,UAAAC,EAAW,KAAAC,EAAO,OAAQ,GAAGC,GAAsB,CAC1E,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,SAAU,eAAeC,CAAI,EAAE,EAClE,OAAOI,EAAAA,IAACC,EAAAA,OAAA,CAAU,UAAWH,EAAa,GAAGD,EAAO,CACtD,CAGO,MAAMK,EAAc,CAAC,CAAE,QAAAC,CAAA,IAC5BH,EAAAA,IAACI,EAAAA,WAAA,CACC,UAAU,eACV,aAAW,iBACX,QAAAD,EACA,QAAQ,SACR,KAAK,QAEL,eAACE,EAAAA,MAAA,CAAA,CAAM,CAAA,CACT,EAIK,SAASC,EAAc,CAAE,GAAGT,GAA6B,CAC9D,OAAOG,MAACO,EAAAA,cAAA,CAAkB,GAAGV,CAAA,CAAO,CACtC,CASO,SAASW,EAAa,CAC3B,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,SAAAC,EACA,GAAGf,CACL,EAAsB,CACpB,cACGS,EAAA,CACE,SAAA,CAAAI,EACCV,EAAAA,IAACI,EAAAA,WAAA,CAAW,QAAAO,EAAkB,aAAYF,EACvC,WACH,EAEAT,EAAAA,IAACa,EAAAA,OAAA,CAAO,QAAAF,EAAmB,SAAAF,EAAM,EAEnCT,EAAAA,IAACc,GAAY,cAAa,GACxB,eAACpB,EAAA,CAAQ,GAAGG,EAAQ,SAAAe,CAAA,CAAS,CAAA,CAC/B,CAAA,EACF,CAEJ,CAGO,SAASG,EAAY,CAAE,UAAApB,EAAW,GAAGE,GAA2B,CACrE,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,cAAc,EACjD,aAAQqB,EAAAA,YAAA,CAAa,GAAGnB,EAAO,KAAK,QAAQ,UAAWC,EAAY,CACrE,CAGO,SAASmB,EAAkB,CAChC,UAAAtB,EACA,GAAGE,CACL,EAA2B,CACzB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,oBAAoB,EACvD,OAAOK,EAAAA,IAACkB,EAAAA,KAAA,CAAM,GAAGrB,EAAO,UAAWC,EAAY,CACjD,CAKO,SAASqB,EAAW,CAAE,MAAAC,EAAO,UAAAzB,EAAW,GAAGE,GAA0B,CAC1E,MAAMC,EAAaC,EAAAA,KACjBJ,EACA,cACAyB,GAAS,mBAAA,EAEX,OAAOpB,EAAAA,IAAC,MAAA,CAAK,GAAGH,EAAO,UAAWC,EAAY,CAChD,CAGO,SAASgB,EAAY,CAC1B,SAAAF,EACA,UAAAjB,EACA,cAAA0B,EACA,GAAGxB,CACL,EAAqB,CACnB,MAAMC,EAAaC,EAAAA,KAAKJ,EAAW,iBAAiB,EACpD,OACEK,EAAAA,IAACsB,EAAAA,aAAA,CAAgB,UAAWxB,EAAY,cAAAuB,EAA+B,GAAGxB,EACxE,SAAAG,EAAAA,IAACuB,EAAAA,MAAA,CAAS,UAAW,mBAAqB,SAAAX,CAAA,CAAS,EACrD,CAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as r } from "../../../vendor/clsx/dist/clsx.js";
|
|
3
3
|
import { Dialog as c, DialogTrigger as m, ModalOverlay as g, Modal as d } from "react-aria-components";
|
|
4
4
|
/* empty css */
|
|
@@ -6,11 +6,11 @@ import { IconX as u } from "../../icons/IconX.js";
|
|
|
6
6
|
import { TextHeading as D, Text as f } from "../Text/Text.js";
|
|
7
7
|
import { IconButton as t } from "../IconButton/IconButton.js";
|
|
8
8
|
import { Button as p } from "../Button/Button.js";
|
|
9
|
-
function N({ className: o, type:
|
|
10
|
-
const
|
|
11
|
-
return /* @__PURE__ */
|
|
9
|
+
function N({ className: o, type: i = "card", ...l }) {
|
|
10
|
+
const s = r(o, "dialog", `dialog-type-${i}`);
|
|
11
|
+
return /* @__PURE__ */ a(c, { className: s, ...l });
|
|
12
12
|
}
|
|
13
|
-
const I = ({ onPress: o }) => /* @__PURE__ */
|
|
13
|
+
const I = ({ onPress: o }) => /* @__PURE__ */ a(
|
|
14
14
|
t,
|
|
15
15
|
{
|
|
16
16
|
className: "dialog-close",
|
|
@@ -18,51 +18,51 @@ const I = ({ onPress: o }) => /* @__PURE__ */ i(
|
|
|
18
18
|
onPress: o,
|
|
19
19
|
variant: "subtle",
|
|
20
20
|
size: "small",
|
|
21
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ a(u, {})
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
function b({ ...o }) {
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ a(m, { ...o });
|
|
26
26
|
}
|
|
27
27
|
function k({
|
|
28
28
|
label: o,
|
|
29
|
-
icon:
|
|
30
|
-
variant:
|
|
31
|
-
children:
|
|
29
|
+
icon: i,
|
|
30
|
+
variant: l,
|
|
31
|
+
children: s,
|
|
32
32
|
...e
|
|
33
33
|
}) {
|
|
34
34
|
return /* @__PURE__ */ n(b, { children: [
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
i ? /* @__PURE__ */ a(t, { variant: l, "aria-label": o, children: i }) : /* @__PURE__ */ a(p, { variant: l, children: o }),
|
|
36
|
+
/* @__PURE__ */ a(h, { isDismissable: !0, children: /* @__PURE__ */ a(N, { ...e, children: s }) })
|
|
37
37
|
] });
|
|
38
38
|
}
|
|
39
|
-
function z({ className: o, ...
|
|
40
|
-
const
|
|
41
|
-
return /* @__PURE__ */
|
|
39
|
+
function z({ className: o, ...i }) {
|
|
40
|
+
const l = r(o, "dialog-title");
|
|
41
|
+
return /* @__PURE__ */ a(D, { ...i, slot: "title", className: l });
|
|
42
42
|
}
|
|
43
43
|
function C({
|
|
44
44
|
className: o,
|
|
45
|
-
...
|
|
45
|
+
...i
|
|
46
46
|
}) {
|
|
47
|
-
const
|
|
48
|
-
return /* @__PURE__ */
|
|
47
|
+
const l = r(o, "dialog-description");
|
|
48
|
+
return /* @__PURE__ */ a(f, { ...i, className: l });
|
|
49
49
|
}
|
|
50
|
-
function H({ bleed: o, className:
|
|
51
|
-
const
|
|
52
|
-
|
|
50
|
+
function H({ bleed: o, className: i, ...l }) {
|
|
51
|
+
const s = r(
|
|
52
|
+
i,
|
|
53
53
|
"dialog-body",
|
|
54
54
|
o && "dialog-body-bleed"
|
|
55
55
|
);
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ a("div", { ...l, className: s });
|
|
57
57
|
}
|
|
58
58
|
function h({
|
|
59
59
|
children: o,
|
|
60
|
-
className:
|
|
61
|
-
isDismissable:
|
|
62
|
-
...
|
|
60
|
+
className: i,
|
|
61
|
+
isDismissable: l,
|
|
62
|
+
...s
|
|
63
63
|
}) {
|
|
64
|
-
const e = r(
|
|
65
|
-
return /* @__PURE__ */
|
|
64
|
+
const e = r(i, "dialog-backdrop");
|
|
65
|
+
return /* @__PURE__ */ a(g, { className: e, isDismissable: l, ...s, children: /* @__PURE__ */ a(d, { className: "dialog-container", children: o }) });
|
|
66
66
|
}
|
|
67
67
|
export {
|
|
68
68
|
N as Dialog,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":";;;;;;;;AA0BO,SAASA,EAAO,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,KAAsB;AAC1E,QAAMC,IAAaC,EAAKJ,GAAW,UAAU,eAAeC,CAAI,EAAE;AAClE,SAAO,gBAAAI,EAACC,GAAA,EAAU,WAAWH,GAAa,GAAGD,GAAO;AACtD;AAGO,MAAMK,IAAc,CAAC,EAAE,SAAAC,EAAA,MAC5B,gBAAAH;AAAA,EAACI;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,cAAW;AAAA,IACX,SAAAD;AAAA,IACA,SAAQ;AAAA,IACR,MAAK;AAAA,IAEL,4BAACE,GAAA,CAAA,CAAM;AAAA,EAAA;AACT;AAIK,SAASC,EAAc,EAAE,GAAGT,KAA6B;AAC9D,SAAO,gBAAAG,EAACO,GAAA,EAAkB,GAAGV,EAAA,CAAO;AACtC;AASO,SAASW,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGf;AACL,GAAsB;AACpB,2BACGS,GAAA,EACE,UAAA;AAAA,IAAAI,IACC,gBAAAV,EAACI,GAAA,EAAW,SAAAO,GAAkB,cAAYF,GACvC,aACH,IAEA,gBAAAT,EAACa,GAAA,EAAO,SAAAF,GAAmB,UAAAF,GAAM;AAAA,IAEnC,gBAAAT,EAACc,KAAY,eAAa,IACxB,4BAACpB,GAAA,EAAQ,GAAGG,GAAQ,UAAAe,EAAA,CAAS,EAAA,CAC/B;AAAA,EAAA,GACF;AAEJ;AAGO,SAASG,EAAY,EAAE,WAAApB,GAAW,GAAGE,KAA2B;AACrE,QAAMC,IAAaC,EAAKJ,GAAW,cAAc;AACjD,2BAAQqB,GAAA,EAAa,GAAGnB,GAAO,MAAK,SAAQ,WAAWC,GAAY;AACrE;AAGO,SAASmB,EAAkB;AAAA,EAChC,WAAAtB;AAAA,EACA,GAAGE;AACL,GAA2B;AACzB,QAAMC,IAAaC,EAAKJ,GAAW,oBAAoB;AACvD,SAAO,gBAAAK,EAACkB,GAAA,EAAM,GAAGrB,GAAO,WAAWC,GAAY;AACjD;AAKO,SAASqB,EAAW,EAAE,OAAAC,GAAO,WAAAzB,GAAW,GAAGE,KAA0B;AAC1E,QAAMC,IAAaC;AAAA,IACjBJ;AAAA,IACA;AAAA,IACAyB,KAAS;AAAA,EAAA;AAEX,SAAO,gBAAApB,EAAC,OAAA,EAAK,GAAGH,GAAO,WAAWC,GAAY;AAChD;AAGO,SAASgB,EAAY;AAAA,EAC1B,UAAAF;AAAA,EACA,WAAAjB;AAAA,EACA,eAAA0B;AAAA,EACA,GAAGxB;AACL,GAAqB;AACnB,QAAMC,IAAaC,EAAKJ,GAAW,iBAAiB;AACpD,SACE,gBAAAK,EAACsB,GAAA,EAAgB,WAAWxB,
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../../../../src/ui/primitives/Dialog/Dialog.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { IconX } from \"icons\";\nimport {\n Button,\n ButtonProps,\n IconButton,\n IconButtonProps,\n Text,\n TextHeading,\n type TextHeadingProps,\n type TextProps,\n} from \"primitives\";\nimport {\n Dialog as RACDialog,\n DialogTrigger as RACDialogTrigger,\n Modal as RACModal,\n ModalOverlay as RACModalOverlay,\n type DialogProps as RACDialogProps,\n type DialogTriggerProps as RACDialogTriggerProps,\n type ModalOverlayProps as RACModalOverlayProps,\n} from \"react-aria-components\";\nimport \"./dialog.css\";\n\nexport type DialogProps = RACDialogProps & {\n type?: \"sheet\" | \"card\";\n};\nexport function Dialog({ className, type = \"card\", ...props }: DialogProps) {\n const classNames = clsx(className, \"dialog\", `dialog-type-${type}`);\n return <RACDialog className={classNames} {...props} />;\n}\n\nexport type DialogCloseProps = Pick<IconButtonProps, \"onPress\">;\nexport const DialogClose = ({ onPress }: DialogCloseProps) => (\n <IconButton\n className=\"dialog-close\"\n aria-label=\"Dismiss dialog\"\n onPress={onPress}\n variant=\"subtle\"\n size=\"small\"\n >\n <IconX />\n </IconButton>\n);\n\nexport type DialogTriggerProps = RACDialogTriggerProps;\nexport function DialogTrigger({ ...props }: DialogTriggerProps) {\n return <RACDialogTrigger {...props} />;\n}\n\nexport interface DialogButtonProps\n extends DialogProps,\n Omit<DialogTriggerProps, \"children\"> {\n label: string;\n variant?: ButtonProps[\"variant\"];\n icon?: React.ReactNode;\n}\nexport function DialogButton({\n label,\n icon,\n variant,\n children,\n ...props\n}: DialogButtonProps) {\n return (\n <DialogTrigger>\n {icon ? (\n <IconButton variant={variant} aria-label={label}>\n {icon}\n </IconButton>\n ) : (\n <Button variant={variant}>{label}</Button>\n )}\n <DialogModal isDismissable>\n <Dialog {...props}>{children}</Dialog>\n </DialogModal>\n </DialogTrigger>\n );\n}\n\nexport type DialogTitleProps = TextHeadingProps;\nexport function DialogTitle({ className, ...props }: DialogTitleProps) {\n const classNames = clsx(className, \"dialog-title\");\n return <TextHeading {...props} slot=\"title\" className={classNames} />;\n}\n\nexport type DialogDescriptionProps = TextProps;\nexport function DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n const classNames = clsx(className, \"dialog-description\");\n return <Text {...props} className={classNames} />;\n}\n\nexport type DialogBodyProps = {\n bleed?: boolean;\n} & React.ComponentPropsWithoutRef<\"div\">;\nexport function DialogBody({ bleed, className, ...props }: DialogBodyProps) {\n const classNames = clsx(\n className,\n \"dialog-body\",\n bleed && \"dialog-body-bleed\",\n );\n return <div {...props} className={classNames} />;\n}\n\nexport type DialogModalProps = RACModalOverlayProps;\nexport function DialogModal({\n children,\n className,\n isDismissable,\n ...props\n}: DialogModalProps) {\n const classNames = clsx(className, \"dialog-backdrop\");\n return (\n <RACModalOverlay className={classNames} isDismissable={isDismissable} {...props}>\n <RACModal className={\"dialog-container\"}>{children}</RACModal>\n </RACModalOverlay>\n );\n}\n"],"names":["Dialog","className","type","props","classNames","clsx","jsx","RACDialog","DialogClose","onPress","IconButton","IconX","DialogTrigger","RACDialogTrigger","DialogButton","label","icon","variant","children","Button","DialogModal","DialogTitle","TextHeading","DialogDescription","Text","DialogBody","bleed","isDismissable","RACModalOverlay","RACModal"],"mappings":";;;;;;;;AA0BO,SAASA,EAAO,EAAE,WAAAC,GAAW,MAAAC,IAAO,QAAQ,GAAGC,KAAsB;AAC1E,QAAMC,IAAaC,EAAKJ,GAAW,UAAU,eAAeC,CAAI,EAAE;AAClE,SAAO,gBAAAI,EAACC,GAAA,EAAU,WAAWH,GAAa,GAAGD,GAAO;AACtD;AAGO,MAAMK,IAAc,CAAC,EAAE,SAAAC,EAAA,MAC5B,gBAAAH;AAAA,EAACI;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,cAAW;AAAA,IACX,SAAAD;AAAA,IACA,SAAQ;AAAA,IACR,MAAK;AAAA,IAEL,4BAACE,GAAA,CAAA,CAAM;AAAA,EAAA;AACT;AAIK,SAASC,EAAc,EAAE,GAAGT,KAA6B;AAC9D,SAAO,gBAAAG,EAACO,GAAA,EAAkB,GAAGV,EAAA,CAAO;AACtC;AASO,SAASW,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGf;AACL,GAAsB;AACpB,2BACGS,GAAA,EACE,UAAA;AAAA,IAAAI,IACC,gBAAAV,EAACI,GAAA,EAAW,SAAAO,GAAkB,cAAYF,GACvC,aACH,IAEA,gBAAAT,EAACa,GAAA,EAAO,SAAAF,GAAmB,UAAAF,GAAM;AAAA,IAEnC,gBAAAT,EAACc,KAAY,eAAa,IACxB,4BAACpB,GAAA,EAAQ,GAAGG,GAAQ,UAAAe,EAAA,CAAS,EAAA,CAC/B;AAAA,EAAA,GACF;AAEJ;AAGO,SAASG,EAAY,EAAE,WAAApB,GAAW,GAAGE,KAA2B;AACrE,QAAMC,IAAaC,EAAKJ,GAAW,cAAc;AACjD,2BAAQqB,GAAA,EAAa,GAAGnB,GAAO,MAAK,SAAQ,WAAWC,GAAY;AACrE;AAGO,SAASmB,EAAkB;AAAA,EAChC,WAAAtB;AAAA,EACA,GAAGE;AACL,GAA2B;AACzB,QAAMC,IAAaC,EAAKJ,GAAW,oBAAoB;AACvD,SAAO,gBAAAK,EAACkB,GAAA,EAAM,GAAGrB,GAAO,WAAWC,GAAY;AACjD;AAKO,SAASqB,EAAW,EAAE,OAAAC,GAAO,WAAAzB,GAAW,GAAGE,KAA0B;AAC1E,QAAMC,IAAaC;AAAA,IACjBJ;AAAA,IACA;AAAA,IACAyB,KAAS;AAAA,EAAA;AAEX,SAAO,gBAAApB,EAAC,OAAA,EAAK,GAAGH,GAAO,WAAWC,GAAY;AAChD;AAGO,SAASgB,EAAY;AAAA,EAC1B,UAAAF;AAAA,EACA,WAAAjB;AAAA,EACA,eAAA0B;AAAA,EACA,GAAGxB;AACL,GAAqB;AACnB,QAAMC,IAAaC,EAAKJ,GAAW,iBAAiB;AACpD,SACE,gBAAAK,EAACsB,GAAA,EAAgB,WAAWxB,GAAY,eAAAuB,GAA+B,GAAGxB,GACxE,UAAA,gBAAAG,EAACuB,GAAA,EAAS,WAAW,oBAAqB,UAAAX,EAAA,CAAS,GACrD;AAEJ;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import "./widget-empty-state.css";
|
|
3
|
+
export type WidgetEmptyStateProps = ComponentPropsWithoutRef<"div"> & {
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function WidgetEmptyState({ message, className, ...props }: WidgetEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import "./widget-error-state.css";
|
|
3
|
+
export type WidgetErrorStateProps = ComponentPropsWithoutRef<"div"> & {
|
|
4
|
+
message: string;
|
|
5
|
+
retryLabel: string;
|
|
6
|
+
onRetry?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function WidgetErrorState({ message, retryLabel, onRetry, className, ...props }: WidgetErrorStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import "./widget-loading-state.css";
|
|
3
|
+
export type WidgetLoadingStateProps = ComponentPropsWithoutRef<"div"> & {
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function WidgetLoadingState({ message, className, ...props }: WidgetLoadingStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,7 @@ export * from "./FormModal/FormModal";
|
|
|
6
6
|
export * from "./PageHeader/PageHeader";
|
|
7
7
|
export * from "./Sidebar/Sidebar";
|
|
8
8
|
export * from "./Widget/Widget";
|
|
9
|
+
export * from "./WidgetEmptyState/WidgetEmptyState";
|
|
10
|
+
export * from "./WidgetErrorState/WidgetErrorState";
|
|
9
11
|
export * from "./WidgetGrid/WidgetGrid";
|
|
12
|
+
export * from "./WidgetLoadingState/WidgetLoadingState";
|