@solibo/solibo-ui 2.0.3 → 2.1.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/assets/index.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -1
- package/dist/assets/index52.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/assets/index54.css +1 -1
- package/dist/assets/index55.css +1 -0
- package/dist/assets/index6.css +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +38 -38
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/clipboard/index.cjs +2 -0
- package/dist/components/clipboard/index.cjs.map +1 -0
- package/dist/components/clipboard/index.js +29 -0
- package/dist/components/clipboard/index.js.map +1 -0
- package/dist/components/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.js +2 -2
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +35 -35
- package/dist/components/divider/index.cjs +1 -1
- package/dist/components/divider/index.js +3 -3
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +4 -4
- package/dist/components/dropzone/index.cjs +1 -1
- package/dist/components/dropzone/index.js +1 -1
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +2 -2
- package/dist/components/empty-state/index.cjs +1 -1
- package/dist/components/empty-state/index.cjs.map +1 -1
- package/dist/components/empty-state/index.js +16 -11
- package/dist/components/empty-state/index.js.map +1 -1
- package/dist/components/fieldset/index.cjs +1 -1
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +1 -1
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +1 -1
- package/dist/components/group/index.cjs +1 -1
- package/dist/components/group/index.js +3 -3
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.cjs.map +1 -1
- package/dist/components/header/index.js +22 -22
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.cjs.map +1 -1
- package/dist/components/icon/index.js +28 -26
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/iframe/index.cjs +1 -1
- package/dist/components/iframe/index.cjs.map +1 -1
- package/dist/components/iframe/index.js +45 -44
- package/dist/components/iframe/index.js.map +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.cjs.map +1 -1
- package/dist/components/list/index.js +72 -44
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/menu/index.cjs +1 -1
- package/dist/components/menu/index.cjs.map +1 -1
- package/dist/components/menu/index.js +23 -22
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.cjs.map +1 -1
- package/dist/components/message/index.js +33 -33
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +36 -36
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.cjs.map +1 -1
- package/dist/components/popover/index.js +81 -69
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/sortable/index.cjs.map +1 -1
- package/dist/components/sortable/index.js.map +1 -1
- package/dist/components/table/index.cjs.map +1 -1
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +12 -12
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/components/widget/index.cjs +1 -1
- package/dist/components/widget/index.cjs.map +1 -1
- package/dist/components/widget/index.js +13 -8
- package/dist/components/widget/index.js.map +1 -1
- package/dist/icons-BTif0nDb.cjs +2 -0
- package/dist/icons-BTif0nDb.cjs.map +1 -0
- package/dist/{icons-dUP7sKyt.js → icons-CBbpxsJF.js} +32 -5
- package/dist/icons-CBbpxsJF.js.map +1 -0
- package/dist/{index-Bt7vnwji.cjs → index-5qUTKX7P.cjs} +2 -2
- package/dist/{index-Bt7vnwji.cjs.map → index-5qUTKX7P.cjs.map} +1 -1
- package/dist/{index-BLb3JiCr.js → index-BuSfz4qx.js} +3 -3
- package/dist/{index-BLb3JiCr.js.map → index-BuSfz4qx.js.map} +1 -1
- package/dist/{index-DWDp66fp.cjs → index-CeHwRKAg.cjs} +2 -2
- package/dist/{index-DWDp66fp.cjs.map → index-CeHwRKAg.cjs.map} +1 -1
- package/dist/{index-Ds-Ocs4L.js → index-DBWgRXp9.js} +3 -3
- package/dist/{index-Ds-Ocs4L.js.map → index-DBWgRXp9.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +45 -7
- package/dist/index.js +97 -95
- package/dist/index.js.map +1 -1
- package/dist/menu-popover-CdhAgSQb.cjs +2 -0
- package/dist/menu-popover-CdhAgSQb.cjs.map +1 -0
- package/dist/menu-popover-D-Ax5zzy.js +77 -0
- package/dist/menu-popover-D-Ax5zzy.js.map +1 -0
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/icons-Dv_p0bUF.cjs +0 -2
- package/dist/icons-Dv_p0bUF.cjs.map +0 -1
- package/dist/icons-dUP7sKyt.js.map +0 -1
- package/dist/menu-popover-CM3v5s-5.cjs +0 -2
- package/dist/menu-popover-CM3v5s-5.cjs.map +0 -1
- package/dist/menu-popover-DOkciab5.js +0 -74
- package/dist/menu-popover-DOkciab5.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const o=require("./components/app-link/index.cjs"),t=require("./components/app-shell/index.cjs"),r=require("./components/aside/index.cjs"),i=require("./components/avatar/index.cjs"),s=require("./components/badge/index.cjs"),c=require("./components/banner/index.cjs"),p=require("./components/branding/index.cjs"),_=require("./components/button/index.cjs"),a=require("./components/card/index.cjs"),d=require("./components/checkbox/index.cjs"),u=require("./components/chip/index.cjs"),m=require("./components/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const o=require("./components/app-link/index.cjs"),t=require("./components/app-shell/index.cjs"),r=require("./components/aside/index.cjs"),i=require("./components/avatar/index.cjs"),s=require("./components/badge/index.cjs"),c=require("./components/banner/index.cjs"),p=require("./components/branding/index.cjs"),_=require("./components/button/index.cjs"),a=require("./components/card/index.cjs"),d=require("./components/checkbox/index.cjs"),u=require("./components/chip/index.cjs"),m=require("./components/clipboard/index.cjs"),l=require("./components/collapsible/index.cjs"),x=require("./components/controls/index.cjs"),q=require("./components/croppable/index.cjs"),g=require("./components/dialog/index.cjs"),b=require("./components/divider/index.cjs"),v=require("./components/dropdown/index.cjs"),h=require("./components/dropzone/index.cjs"),S=require("./components/editor/index.cjs"),T=require("./components/empty-state/index.cjs"),C=require("./components/fieldset/index.cjs"),L=require("./components/figure/index.cjs"),I=require("./components/file/index.cjs"),F=require("./components/footer/index.cjs"),f=require("./components/form/index.cjs"),k=require("./components/graph/index.cjs"),y=require("./components/group/index.cjs"),A=require("./components/header/index.cjs"),B=require("./components/icon/index.cjs"),D=require("./components/iframe/index.cjs"),M=require("./components/image/index.cjs"),P=require("./index-CeHwRKAg.cjs"),N=require("./components/link/index.cjs"),O=require("./components/list/index.cjs"),j=require("./components/loading/index.cjs"),w=require("./components/menu/index.cjs"),E=require("./components/message/index.cjs"),G=require("./components/messages/index.cjs"),e=require("./components/nav/index.cjs"),z=require("./components/object/index.cjs"),H=require("./components/page-layout/index.cjs"),W=require("./components/popover/index.cjs"),J=require("./components/portal/index.cjs"),K=require("./components/search/index.cjs"),Q=require("./index-5qUTKX7P.cjs"),n=require("./components/sortable/index.cjs"),R=require("./components/table/index.cjs"),U=require("./components/textarea/index.cjs"),V=require("./components/toast/index.cjs"),X=require("./components/toasts/index.cjs"),Y=require("./components/toggle/index.cjs"),Z=require("./components/toolbar/index.cjs"),$=require("./components/tooltip/index.cjs"),ee=require("./components/widget/index.cjs");exports.AppLink=o.AppLink;exports.AppShell=t.AppShell;exports.Aside=r.Aside;exports.Avatar=i.Avatar;exports.Badge=s.Badge;exports.Banner=c.Banner;exports.Branding=p.Branding;exports.Button=_.Button;exports.Card=a.Card;exports.Checkbox=d.Checkbox;exports.Chip=u.Chip;exports.Clipboard=m.Clipboard;exports.Collapsible=l.Collapsible;exports.Controls=x.Controls;exports.Croppable=q.Croppable;exports.Dialog=g.Dialog;exports.Divider=b.Divider;exports.Dropdown=v.Dropdown;exports.Dropzone=h.Dropzone;exports.Editor=S.Editor;exports.EmptyState=T.EmptyState;exports.Fieldset=C.Fieldset;exports.Figure=L.Figure;exports.File=I.File;exports.Footer=F.Footer;exports.Form=f.Form;exports.Graph=k.Graph;exports.Group=y.Group;exports.Header=A.Header;exports.Icon=B.Icon;exports.Iframe=D.Iframe;exports.Image=M.Image;exports.Input=P.Input;exports.Link=N.Link;exports.List=O.List;exports.Loading=j.Loading;exports.Menu=w.Menu;exports.Message=E.Message;exports.Messages=G.Messages;exports.Nav=e.Nav;exports.NavItem=e.NavItem;exports.NavLabel=e.NavLabel;exports.Object=z.Object;exports.PageLayout=H.PageLayout;exports.Popover=W.Popover;exports.Portal=J.Portal;exports.Search=K.Search;exports.Select=Q.Select;exports.Sortable=n.Sortable;exports.useOptionalSortableItem=n.useOptionalSortableItem;exports.Table=R.Table;exports.Textarea=U.Textarea;exports.Toast=V.Toast;exports.Toasts=X.Toasts;exports.Toggle=Y.Toggle;exports.Toolbar=Z.Toolbar;exports.Tooltip=$.Tooltip;exports.Widget=ee.Widget;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -127,6 +127,14 @@ declare type ChipSharedProps = {
|
|
|
127
127
|
onDelete: () => void;
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
+
declare const Clipboard_2: ({ label, onSuccess }: ClipboardProps) => JSX.Element;
|
|
131
|
+
export { Clipboard_2 as Clipboard }
|
|
132
|
+
|
|
133
|
+
declare type ClipboardProps = {
|
|
134
|
+
label: string;
|
|
135
|
+
onSuccess: () => void;
|
|
136
|
+
};
|
|
137
|
+
|
|
130
138
|
export declare const Collapsible: ({ children, disabled, open, summary }: CollapsibleProps) => JSX.Element;
|
|
131
139
|
|
|
132
140
|
export declare type CollapsibleProps = {
|
|
@@ -268,12 +276,13 @@ export declare type EditorProps = {
|
|
|
268
276
|
submitLabel?: string;
|
|
269
277
|
};
|
|
270
278
|
|
|
271
|
-
export declare const EmptyState: ({ button, content, header }: EmptyStateProps) => JSX.Element;
|
|
279
|
+
export declare const EmptyState: ({ button, content, header, icon }: EmptyStateProps) => JSX.Element;
|
|
272
280
|
|
|
273
281
|
export declare type EmptyStateProps = {
|
|
274
282
|
button?: React.ReactNode;
|
|
275
283
|
content: string;
|
|
276
284
|
header: string;
|
|
285
|
+
icon?: IconName;
|
|
277
286
|
};
|
|
278
287
|
|
|
279
288
|
export declare const Fieldset: ({ className, ...props }: FieldsetProps) => JSX.Element;
|
|
@@ -357,6 +366,9 @@ declare const iconBodies: {
|
|
|
357
366
|
readonly ArrowDown: {
|
|
358
367
|
readonly regular: "<path d=\"M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z\"/>";
|
|
359
368
|
};
|
|
369
|
+
readonly ArrowRight: {
|
|
370
|
+
readonly regular: "<path d=\"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z\"/>";
|
|
371
|
+
};
|
|
360
372
|
readonly ArrowsClockwise: {
|
|
361
373
|
readonly regular: "<path d=\"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z\"/>";
|
|
362
374
|
};
|
|
@@ -369,6 +381,9 @@ declare const iconBodies: {
|
|
|
369
381
|
readonly ArrowUp: {
|
|
370
382
|
readonly regular: "<path d=\"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z\"/>";
|
|
371
383
|
};
|
|
384
|
+
readonly Bell: {
|
|
385
|
+
readonly fill: "<path d=\"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z\"/>";
|
|
386
|
+
};
|
|
372
387
|
readonly BuildingApartment: {
|
|
373
388
|
readonly fill: "<path d=\"M240,208h-8V72a8,8,0,0,0-8-8H184V40a8,8,0,0,0-8-8H80a8,8,0,0,0-8,8V96H32a8,8,0,0,0-8,8V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM80,176H64a8,8,0,0,1,0-16H80a8,8,0,0,1,0,16Zm0-32H64a8,8,0,0,1,0-16H80a8,8,0,0,1,0,16Zm64,64H112V168h32Zm-8-64H120a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H120a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H120a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm56,96H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Z\"/>";
|
|
374
389
|
readonly regular: "<path d=\"M240,208h-8V72a8,8,0,0,0-8-8H184V40a8,8,0,0,0-8-8H80a8,8,0,0,0-8,8V96H32a8,8,0,0,0-8,8V208H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,112H80a8,8,0,0,0,8-8V48h80V72a8,8,0,0,0,8,8h40V208H152V168a8,8,0,0,0-8-8H112a8,8,0,0,0-8,8v40H40Zm96,96H120V176h16ZM112,72a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H120A8,8,0,0,1,112,72Zm0,32a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H120A8,8,0,0,1,112,104Zm56,0a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H176A8,8,0,0,1,168,104ZM88,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H80A8,8,0,0,1,88,136Zm0,32a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H80A8,8,0,0,1,88,168Zm24-32a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H120A8,8,0,0,1,112,136Zm56,0a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H176A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1,8-8h16a8,8,0,0,1,0,16H176A8,8,0,0,1,168,168Z\"/>";
|
|
@@ -379,6 +394,9 @@ declare const iconBodies: {
|
|
|
379
394
|
readonly CaretLeft: {
|
|
380
395
|
readonly regular: "<path d=\"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z\"/>";
|
|
381
396
|
};
|
|
397
|
+
readonly CaretRight: {
|
|
398
|
+
readonly regular: "<path d=\"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z\"/>";
|
|
399
|
+
};
|
|
382
400
|
readonly CaretUpDown: {
|
|
383
401
|
readonly regular: "<path d=\"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z\"/>";
|
|
384
402
|
};
|
|
@@ -395,6 +413,12 @@ declare const iconBodies: {
|
|
|
395
413
|
readonly fill: "<path d=\"M200,32H163.74a47.92,47.92,0,0,0-71.48,0H56A16,16,0,0,0,40,48V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm-72,0a32,32,0,0,1,32,32H96A32,32,0,0,1,128,32Zm32,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z\"/>";
|
|
396
414
|
readonly regular: "<path d=\"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z\"/>";
|
|
397
415
|
};
|
|
416
|
+
readonly Clock: {
|
|
417
|
+
readonly fill: "<path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z\"/>";
|
|
418
|
+
};
|
|
419
|
+
readonly Confetti: {
|
|
420
|
+
readonly fill: "<path d=\"M111.49,52.63a15.8,15.8,0,0,0-26,5.77L33,202.78A15.83,15.83,0,0,0,47.76,224a16,16,0,0,0,5.46-1l144.37-52.5a15.8,15.8,0,0,0,5.78-26ZM65.14,161.13l19.2-52.79,63.32,63.32-52.8,19.2ZM160,72a37.8,37.8,0,0,1,3.84-15.58C169.14,45.83,179.14,40,192,40c6.7,0,11-2.29,13.65-7.21A22,22,0,0,0,208,23.94,8,8,0,0,1,224,24c0,12.86-8.52,32-32,32-6.7,0-11,2.29-13.65,7.21A22,22,0,0,0,176,72.06,8,8,0,0,1,160,72ZM136,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm101.66,82.34a8,8,0,1,1-11.32,11.31l-16-16a8,8,0,0,1,11.32-11.32Zm4.87-42.75-24,8a8,8,0,0,1-5.06-15.18l24-8a8,8,0,0,1,5.06,15.18Z\"/>";
|
|
421
|
+
};
|
|
398
422
|
readonly Copy: {
|
|
399
423
|
readonly fill: "<path d=\"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z\"/>";
|
|
400
424
|
readonly regular: "<path d=\"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z\"/>";
|
|
@@ -442,6 +466,9 @@ declare const iconBodies: {
|
|
|
442
466
|
readonly fill: "<path d=\"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z\"/>";
|
|
443
467
|
readonly regular: "<path d=\"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z\"/>";
|
|
444
468
|
};
|
|
469
|
+
readonly HandCoins: {
|
|
470
|
+
readonly fill: "<path d=\"M128.09,57.38a36,36,0,0,1,55.17-27.82,4,4,0,0,1-.56,7A52.06,52.06,0,0,0,152,84c0,1.17,0,2.34.12,3.49a4,4,0,0,1-6,3.76A36,36,0,0,1,128.09,57.38ZM240,160.61a24.47,24.47,0,0,1-13.6,22l-.44.2-38.83,16.54a6.94,6.94,0,0,1-1.19.4l-64,16A7.93,7.93,0,0,1,120,216H16A16,16,0,0,1,0,200V160a16,16,0,0,1,16-16H44.69l22.62-22.63A31.82,31.82,0,0,1,89.94,112H140a28,28,0,0,1,27.25,34.45l41.84-9.62A24.61,24.61,0,0,1,240,160.61Zm-16,0a8.61,8.61,0,0,0-10.87-8.3l-.31.08-67,15.41a8.32,8.32,0,0,1-1.79.2H112a8,8,0,0,1,0-16h28a12,12,0,0,0,0-24H89.94a15.86,15.86,0,0,0-11.31,4.69L56,155.31V200h63l62.43-15.61,38-16.18A8.56,8.56,0,0,0,224,160.61ZM168,84a36,36,0,1,0,36-36A36,36,0,0,0,168,84Z\"/>";
|
|
471
|
+
};
|
|
445
472
|
readonly House: {
|
|
446
473
|
readonly fill: "<path d=\"M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z\"/>";
|
|
447
474
|
readonly regular: "<path d=\"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z\"/>";
|
|
@@ -470,6 +497,9 @@ declare const iconBodies: {
|
|
|
470
497
|
readonly MagnifyingGlass: {
|
|
471
498
|
readonly regular: "<path d=\"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z\"/>";
|
|
472
499
|
};
|
|
500
|
+
readonly MapPin: {
|
|
501
|
+
readonly fill: "<path d=\"M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z\"/>";
|
|
502
|
+
};
|
|
473
503
|
readonly Megaphone: {
|
|
474
504
|
readonly fill: "<path d=\"M200,72H160.2c-2.91-.17-53.62-3.74-101.91-44.24A16,16,0,0,0,32,40V200a16,16,0,0,0,26.29,12.25c37.77-31.68,77-40.76,93.71-43.3v31.72A16,16,0,0,0,159.12,214l11,7.33A16,16,0,0,0,194.5,212l11.77-44.36A48,48,0,0,0,200,72ZM179,207.89l0,.11-11-7.33V168h21.6ZM200,152H168V88h32a32,32,0,1,1,0,64Z\"/>";
|
|
475
505
|
readonly regular: "<path d=\"M248,120a48.05,48.05,0,0,0-48-48H160.2c-2.91-.17-53.62-3.74-101.91-44.24A16,16,0,0,0,32,40V200a16,16,0,0,0,26.29,12.25c37.77-31.68,77-40.76,93.71-43.3v31.72A16,16,0,0,0,159.12,214l11,7.33A16,16,0,0,0,194.5,212l11.77-44.36A48.07,48.07,0,0,0,248,120ZM48,199.93V40h0c42.81,35.91,86.63,45,104,47.24v65.48C134.65,155,90.84,164.07,48,199.93Zm131,8,0,.11-11-7.33V168h21.6ZM200,152H168V88h32a32,32,0,1,1,0,64Z\"/>";
|
|
@@ -486,6 +516,9 @@ declare const iconBodies: {
|
|
|
486
516
|
readonly Pencil: {
|
|
487
517
|
readonly fill: "<path d=\"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM51.31,160l90.35-90.35,16.68,16.69L68,176.68ZM48,179.31,76.69,208H48Zm48,25.38L79.31,188l90.35-90.35h0l16.68,16.69Z\"/>";
|
|
488
518
|
};
|
|
519
|
+
readonly PenNib: {
|
|
520
|
+
readonly fill: "<path d=\"M243.31,81.36,174.63,12.68a16,16,0,0,0-22.63,0L123.56,41.12l-58,21.76A16,16,0,0,0,55.36,75.23L34.59,199.83a4,4,0,0,0,6.77,3.49l57-57a23.85,23.85,0,0,1-2.29-12.08,24,24,0,1,1,13.6,23.4l-57,57a4,4,0,0,0,3.49,6.77l124.61-20.77a16,16,0,0,0,12.35-10.16l21.77-58.07L243.31,104a16,16,0,0,0,0-22.63ZM208,116.68,139.32,48l24-24L232,92.68Z\"/>";
|
|
521
|
+
};
|
|
489
522
|
readonly Phone: {
|
|
490
523
|
readonly fill: "<path d=\"M231.88,175.08A56.26,56.26,0,0,1,176,224C96.6,224,32,159.4,32,80A56.26,56.26,0,0,1,80.92,24.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,117.39,96c-.18.27-.37.52-.57.77L96,121.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,231.88,175.08Z\"/>";
|
|
491
524
|
readonly regular: "<path d=\"M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z\"/>";
|
|
@@ -503,6 +536,9 @@ declare const iconBodies: {
|
|
|
503
536
|
readonly fill: "<path d=\"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z\"/>";
|
|
504
537
|
readonly regular: "<path d=\"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z\"/>";
|
|
505
538
|
};
|
|
539
|
+
readonly Signature: {
|
|
540
|
+
readonly regular: "<path d=\"M232,168H63.86c2.66-5.24,5.33-10.63,8-16.11,15,1.65,32.58-8.78,52.66-31.14,5,13.46,14.45,30.93,30.58,31.25,9.06.18,18.11-5.2,27.42-16.37C189.31,143.75,203.3,152,232,152a8,8,0,0,0,0-16c-30.43,0-39.43-10.45-40-16.11a7.67,7.67,0,0,0-5.46-7.75,8.14,8.14,0,0,0-9.25,3.49c-12.07,18.54-19.38,20.43-21.92,20.37-8.26-.16-16.66-19.52-19.54-33.42a8,8,0,0,0-14.09-3.37C101.54,124.55,88,133.08,79.57,135.29,88.06,116.42,94.4,99.85,98.46,85.9c6.82-23.44,7.32-39.83,1.51-50.1-3-5.38-9.34-11.8-22.06-11.8C61.85,24,49.18,39.18,43.14,65.65c-3.59,15.71-4.18,33.21-1.62,48s7.87,25.55,15.59,31.94c-3.73,7.72-7.53,15.26-11.23,22.41H24a8,8,0,0,0,0,16H37.41c-11.32,21-20.12,35.64-20.26,35.88a8,8,0,1,0,13.71,8.24c.15-.26,11.27-18.79,24.7-44.12H232a8,8,0,0,0,0-16ZM58.74,69.21C62.72,51.74,70.43,40,77.91,40c5.33,0,7.1,1.86,8.13,3.67,3,5.33,6.52,24.19-21.66,86.39C56.12,118.78,53.31,93,58.74,69.21Z\"/>";
|
|
541
|
+
};
|
|
506
542
|
readonly SlidersHorizontal: {
|
|
507
543
|
readonly fill: "<path d=\"M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z\"/>";
|
|
508
544
|
};
|
|
@@ -607,7 +643,7 @@ declare type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
607
643
|
variant?: 'danger' | 'minimal' | 'primary';
|
|
608
644
|
};
|
|
609
645
|
|
|
610
|
-
export declare function List({ children, className, columns, compact, controls, horizontal, ordered, ref, style, ...props }: ListProps): JSX.Element;
|
|
646
|
+
export declare function List({ children, className, columns, compact, controls, horizontal, layout, maxVisibleItems, ordered, ref, style, ...props }: ListProps): JSX.Element;
|
|
611
647
|
|
|
612
648
|
declare type ListElement = HTMLUListElement | HTMLOListElement;
|
|
613
649
|
|
|
@@ -616,6 +652,8 @@ export declare type ListProps = React.ComponentPropsWithoutRef<'ul'> & {
|
|
|
616
652
|
compact?: boolean;
|
|
617
653
|
controls?: React.ReactNode;
|
|
618
654
|
horizontal?: boolean;
|
|
655
|
+
layout?: 'grid' | 'masonry';
|
|
656
|
+
maxVisibleItems?: number;
|
|
619
657
|
ordered?: boolean;
|
|
620
658
|
ref?: React.Ref<ListElement>;
|
|
621
659
|
};
|
|
@@ -654,7 +692,6 @@ export declare const Message: ({ actions, appearance, attachments, author, autho
|
|
|
654
692
|
declare type MessageItem = MessageOptions;
|
|
655
693
|
|
|
656
694
|
export declare type MessageOptions = {
|
|
657
|
-
/** Controls shown under the message, e.g. a delete button for the author's own message. */
|
|
658
695
|
actions?: React.ReactNode;
|
|
659
696
|
appearance?: 'default' | 'document' | 'file';
|
|
660
697
|
attachments?: React.ReactNode;
|
|
@@ -779,6 +816,7 @@ declare type PopoverRenderProps = {
|
|
|
779
816
|
close: (options?: PopoverCloseOptions) => void;
|
|
780
817
|
initialFocus?: PopoverInitialFocus;
|
|
781
818
|
isOpen: boolean;
|
|
819
|
+
isPositioned: boolean;
|
|
782
820
|
};
|
|
783
821
|
|
|
784
822
|
export declare const Portal: ({ children, portals, open, setOpen }: PortalProps) => JSX.Element;
|
|
@@ -848,6 +886,7 @@ declare const sizes: {
|
|
|
848
886
|
large: string;
|
|
849
887
|
medium: string;
|
|
850
888
|
small: string;
|
|
889
|
+
tiny: string;
|
|
851
890
|
};
|
|
852
891
|
|
|
853
892
|
declare const sizes_2: {
|
|
@@ -862,9 +901,6 @@ declare const sizes_3: {
|
|
|
862
901
|
small: string;
|
|
863
902
|
};
|
|
864
903
|
|
|
865
|
-
/**
|
|
866
|
-
* Children must provide a stable `data-id` for emits `{ id, weight }` and `key` (reconciliation).
|
|
867
|
-
*/
|
|
868
904
|
export declare function Sortable({ children, className, columns, isRearranging, onChangeOrder, ...props }: SortableProps): JSX.Element;
|
|
869
905
|
|
|
870
906
|
declare type SortableItemContextValue = {
|
|
@@ -1009,10 +1045,12 @@ declare const variants_8: {
|
|
|
1009
1045
|
static: string;
|
|
1010
1046
|
};
|
|
1011
1047
|
|
|
1012
|
-
export declare const Widget: ({ children, ...props }: WidgetProps) => JSX.Element;
|
|
1048
|
+
export declare const Widget: ({ children, className, color, ...props }: WidgetProps) => JSX.Element;
|
|
1013
1049
|
|
|
1014
1050
|
declare type WidgetProps = {
|
|
1015
1051
|
children: React.ReactNode;
|
|
1052
|
+
className?: string;
|
|
1053
|
+
color?: '1' | '2';
|
|
1016
1054
|
};
|
|
1017
1055
|
|
|
1018
1056
|
declare type WrappedSelectElement = default_2.ReactElement<SelectProps, typeof Select>;
|
package/dist/index.js
CHANGED
|
@@ -4,54 +4,55 @@ import { Aside as x } from "./components/aside/index.js";
|
|
|
4
4
|
import { Avatar as a } from "./components/avatar/index.js";
|
|
5
5
|
import { Badge as i } from "./components/badge/index.js";
|
|
6
6
|
import { Banner as n } from "./components/banner/index.js";
|
|
7
|
-
import { Branding as
|
|
7
|
+
import { Branding as g } from "./components/branding/index.js";
|
|
8
8
|
import { Button as u } from "./components/button/index.js";
|
|
9
|
-
import { Card as
|
|
10
|
-
import { Checkbox as
|
|
9
|
+
import { Card as I } from "./components/card/index.js";
|
|
10
|
+
import { Checkbox as T } from "./components/checkbox/index.js";
|
|
11
11
|
import { Chip as L } from "./components/chip/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
12
|
+
import { Clipboard as h } from "./components/clipboard/index.js";
|
|
13
|
+
import { Collapsible as A } from "./components/collapsible/index.js";
|
|
14
|
+
import { Controls as D } from "./components/controls/index.js";
|
|
15
|
+
import { Croppable as M } from "./components/croppable/index.js";
|
|
16
|
+
import { Dialog as P } from "./components/dialog/index.js";
|
|
17
|
+
import { Divider as E } from "./components/divider/index.js";
|
|
18
|
+
import { Dropdown as O } from "./components/dropdown/index.js";
|
|
19
|
+
import { Dropzone as w } from "./components/dropzone/index.js";
|
|
20
|
+
import { Editor as H } from "./components/editor/index.js";
|
|
21
|
+
import { EmptyState as q } from "./components/empty-state/index.js";
|
|
22
|
+
import { Fieldset as K } from "./components/fieldset/index.js";
|
|
23
|
+
import { Figure as R } from "./components/figure/index.js";
|
|
24
|
+
import { File as V } from "./components/file/index.js";
|
|
25
|
+
import { Footer as Y } from "./components/footer/index.js";
|
|
26
|
+
import { Form as _ } from "./components/form/index.js";
|
|
27
|
+
import { Graph as oo } from "./components/graph/index.js";
|
|
28
|
+
import { Group as eo } from "./components/group/index.js";
|
|
29
|
+
import { Header as po } from "./components/header/index.js";
|
|
30
|
+
import { Icon as xo } from "./components/icon/index.js";
|
|
31
|
+
import { Iframe as ao } from "./components/iframe/index.js";
|
|
32
|
+
import { Image as io } from "./components/image/index.js";
|
|
33
|
+
import { I as no } from "./index-DBWgRXp9.js";
|
|
34
|
+
import { Link as bo } from "./components/link/index.js";
|
|
35
|
+
import { List as Co } from "./components/list/index.js";
|
|
36
|
+
import { Loading as So } from "./components/loading/index.js";
|
|
37
|
+
import { Menu as vo } from "./components/menu/index.js";
|
|
38
|
+
import { Message as co } from "./components/message/index.js";
|
|
39
|
+
import { Messages as Fo } from "./components/messages/index.js";
|
|
40
|
+
import { Nav as Bo, NavItem as Do, NavLabel as ko } from "./components/nav/index.js";
|
|
41
|
+
import { Object as No } from "./components/object/index.js";
|
|
42
|
+
import { PageLayout as yo } from "./components/page-layout/index.js";
|
|
43
|
+
import { Popover as Go } from "./components/popover/index.js";
|
|
44
|
+
import { Portal as jo } from "./components/portal/index.js";
|
|
45
|
+
import { Search as zo } from "./components/search/index.js";
|
|
46
|
+
import { S as Wo } from "./index-BuSfz4qx.js";
|
|
47
|
+
import { Sortable as Jo, useOptionalSortableItem as Ko } from "./components/sortable/index.js";
|
|
48
|
+
import { Table as Ro } from "./components/table/index.js";
|
|
49
|
+
import { Textarea as Vo } from "./components/textarea/index.js";
|
|
50
|
+
import { Toast as Yo } from "./components/toast/index.js";
|
|
51
|
+
import { Toasts as _o } from "./components/toasts/index.js";
|
|
52
|
+
import { Toggle as or } from "./components/toggle/index.js";
|
|
53
|
+
import { Toolbar as er } from "./components/toolbar/index.js";
|
|
54
|
+
import { Tooltip as pr } from "./components/tooltip/index.js";
|
|
55
|
+
import { Widget as xr } from "./components/widget/index.js";
|
|
55
56
|
import './assets/index.css';export {
|
|
56
57
|
e as AppLink,
|
|
57
58
|
p as AppShell,
|
|
@@ -59,56 +60,57 @@ import './assets/index.css';export {
|
|
|
59
60
|
a as Avatar,
|
|
60
61
|
i as Badge,
|
|
61
62
|
n as Banner,
|
|
62
|
-
|
|
63
|
+
g as Branding,
|
|
63
64
|
u as Button,
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
I as Card,
|
|
66
|
+
T as Checkbox,
|
|
66
67
|
L as Chip,
|
|
67
|
-
h as
|
|
68
|
-
A as
|
|
69
|
-
D as
|
|
70
|
-
M as
|
|
71
|
-
P as
|
|
72
|
-
E as
|
|
73
|
-
O as
|
|
74
|
-
w as
|
|
75
|
-
H as
|
|
76
|
-
q as
|
|
77
|
-
K as
|
|
78
|
-
R as
|
|
79
|
-
V as
|
|
80
|
-
Y as
|
|
81
|
-
_ as
|
|
82
|
-
oo as
|
|
83
|
-
eo as
|
|
84
|
-
po as
|
|
85
|
-
xo as
|
|
86
|
-
ao as
|
|
87
|
-
io as
|
|
88
|
-
no as
|
|
89
|
-
bo as
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
co as
|
|
94
|
-
Fo as
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
ko as
|
|
98
|
-
No as
|
|
99
|
-
yo as
|
|
100
|
-
Go as
|
|
101
|
-
jo as
|
|
102
|
-
zo as
|
|
103
|
-
Wo as
|
|
104
|
-
|
|
105
|
-
Ro as
|
|
106
|
-
Vo as
|
|
107
|
-
Yo as
|
|
108
|
-
_o as
|
|
109
|
-
or as
|
|
110
|
-
er as
|
|
111
|
-
pr as
|
|
112
|
-
|
|
68
|
+
h as Clipboard,
|
|
69
|
+
A as Collapsible,
|
|
70
|
+
D as Controls,
|
|
71
|
+
M as Croppable,
|
|
72
|
+
P as Dialog,
|
|
73
|
+
E as Divider,
|
|
74
|
+
O as Dropdown,
|
|
75
|
+
w as Dropzone,
|
|
76
|
+
H as Editor,
|
|
77
|
+
q as EmptyState,
|
|
78
|
+
K as Fieldset,
|
|
79
|
+
R as Figure,
|
|
80
|
+
V as File,
|
|
81
|
+
Y as Footer,
|
|
82
|
+
_ as Form,
|
|
83
|
+
oo as Graph,
|
|
84
|
+
eo as Group,
|
|
85
|
+
po as Header,
|
|
86
|
+
xo as Icon,
|
|
87
|
+
ao as Iframe,
|
|
88
|
+
io as Image,
|
|
89
|
+
no as Input,
|
|
90
|
+
bo as Link,
|
|
91
|
+
Co as List,
|
|
92
|
+
So as Loading,
|
|
93
|
+
vo as Menu,
|
|
94
|
+
co as Message,
|
|
95
|
+
Fo as Messages,
|
|
96
|
+
Bo as Nav,
|
|
97
|
+
Do as NavItem,
|
|
98
|
+
ko as NavLabel,
|
|
99
|
+
No as Object,
|
|
100
|
+
yo as PageLayout,
|
|
101
|
+
Go as Popover,
|
|
102
|
+
jo as Portal,
|
|
103
|
+
zo as Search,
|
|
104
|
+
Wo as Select,
|
|
105
|
+
Jo as Sortable,
|
|
106
|
+
Ro as Table,
|
|
107
|
+
Vo as Textarea,
|
|
108
|
+
Yo as Toast,
|
|
109
|
+
_o as Toasts,
|
|
110
|
+
or as Toggle,
|
|
111
|
+
er as Toolbar,
|
|
112
|
+
pr as Tooltip,
|
|
113
|
+
xr as Widget,
|
|
114
|
+
Ko as useOptionalSortableItem
|
|
113
115
|
};
|
|
114
116
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";require('./assets/menu-popover.css');const s=require("react/jsx-runtime"),k=require("./classix-5H4IWnMA.cjs"),l=require("react"),y=require("./components/list/index.cjs"),j=require("./components/icon/index.cjs"),A=require("./components/popover/index.cjs"),w="_list_25aqk_3",D="_item_25aqk_15",I="_active_25aqk_38",C="_danger_25aqk_47",m={list:w,item:D,active:I,danger:C},E=n=>Array.from((n==null?void 0:n.querySelectorAll('[role="menuitem"]'))??[]).filter(r=>!r.disabled);function P({actions:n,initialFocus:r,menuAccessibleLabel:u,onSelect:p,readyToFocus:i=!0,usesMenuSemantics:o=!1}){const _=l.useRef(null),f=l.useCallback((e,c=!1)=>{const t=E(_.current);if(t.length===0)return;if(e==="first"||e==="last"){t[e==="first"?0:t.length-1].focus({preventScroll:c});return}const a=t.indexOf(document.activeElement),d=e==="next"?(a+1)%t.length:(a-1+t.length)%t.length;t[d].focus()},[]);l.useEffect(()=>{o&&i&&f(r??"first",!0)},[f,r,i,o]);const q=e=>{if(!o)return;const t={ArrowDown:"next",ArrowUp:"previous",End:"last",Home:"first"}[e.key];t&&(e.preventDefault(),f(t))};return s.jsx(y.List,{"aria-label":u,className:m.list,onKeyDown:q,ref:_,role:o?"menu":void 0,"data-component":"menuactionlist",children:n.map(({button:e,id:c,isActive:t,isDanger:a,value:d},h)=>s.jsx("li",{role:o?"none":void 0,children:l.cloneElement(e,{"aria-current":t?"true":e.props["aria-current"],className:k.t(e.props.className,m.item,t&&m.active,a&&m.danger),onClick:x=>{var g,v;(v=(g=e.props).onClick)==null||v.call(g,x),p(d,x)},role:o?"menuitem":e.props.role,variant:"tertiary"})},c??e.key??h))})}const R=({children:n,inline:r,triggerAccessibleLabel:u,triggerIcon:p="DotsThreeVertical",triggerLabel:i})=>s.jsx(A.Popover,{inline:r,triggerAccessibleLabel:u,triggerAriaHasPopup:"menu",triggerButtonContent:s.jsxs(s.Fragment,{children:[i,s.jsx(j.Icon,{gap:i?"left":"none",name:p,size:"medium"})]}),"data-component":"menupopover",children:n});exports.MenuActionList=P;exports.MenuPopover=R;
|
|
2
|
+
//# sourceMappingURL=menu-popover-CdhAgSQb.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-popover-CdhAgSQb.cjs","sources":["../src/components/menu/action-list.tsx","../src/components/menu/menu-popover.tsx"],"sourcesContent":["import cx from 'classix';\nimport { cloneElement, useCallback, useEffect, useRef } from 'react';\n\nimport { type ButtonProps } from '../button';\nimport { List } from '../list';\nimport { type PopoverInitialFocus } from '../popover';\nimport styles from './styles.module.css';\n\nexport type MenuAction<T> = {\n button: React.ReactElement<ButtonProps>;\n id?: React.Key;\n isActive?: boolean;\n isDanger?: boolean;\n value: T;\n};\n\ntype MenuFocusTarget = 'first' | 'last' | 'next' | 'previous';\n\nconst getFocusableItems = (list: HTMLUListElement | HTMLOListElement | null) =>\n Array.from(list?.querySelectorAll<HTMLButtonElement>('[role=\"menuitem\"]') ?? []).filter(\n (item) => !item.disabled\n );\n\nexport function MenuActionList<T>({\n actions,\n initialFocus,\n menuAccessibleLabel,\n onSelect,\n readyToFocus = true,\n usesMenuSemantics = false,\n}: {\n actions: MenuAction<T>[];\n initialFocus?: PopoverInitialFocus;\n menuAccessibleLabel?: string;\n onSelect: (value: T, event: React.MouseEvent<HTMLButtonElement>) => void;\n readyToFocus?: boolean;\n usesMenuSemantics?: boolean;\n}) {\n const listRef = useRef<HTMLUListElement | HTMLOListElement>(null);\n\n const focusItem = useCallback((target: MenuFocusTarget, preventScroll = false) => {\n const items = getFocusableItems(listRef.current);\n if (items.length === 0) return;\n\n if (target === 'first' || target === 'last') {\n items[target === 'first' ? 0 : items.length - 1].focus({ preventScroll });\n return;\n }\n\n const currentIndex = items.indexOf(document.activeElement as HTMLButtonElement);\n const nextIndex =\n target === 'next'\n ? (currentIndex + 1) % items.length\n : (currentIndex - 1 + items.length) % items.length;\n items[nextIndex].focus();\n }, []);\n\n useEffect(() => {\n if (usesMenuSemantics && readyToFocus) focusItem(initialFocus ?? 'first', true);\n }, [focusItem, initialFocus, readyToFocus, usesMenuSemantics]);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLUListElement>) => {\n if (!usesMenuSemantics) return;\n\n const targets = {\n ArrowDown: 'next',\n ArrowUp: 'previous',\n End: 'last',\n Home: 'first',\n } as const;\n const target = targets[event.key as keyof typeof targets];\n if (!target) return;\n\n event.preventDefault();\n focusItem(target);\n };\n\n return (\n <List\n aria-label={menuAccessibleLabel}\n className={styles.list}\n onKeyDown={handleKeyDown}\n ref={listRef}\n role={usesMenuSemantics ? 'menu' : undefined}\n >\n {actions.map(({ button, id, isActive, isDanger, value }, index) => (\n <li\n key={id ?? button.key ?? index}\n role={usesMenuSemantics ? 'none' : undefined}\n >\n {cloneElement(button, {\n 'aria-current': isActive ? 'true' : button.props['aria-current'],\n className: cx(\n button.props.className,\n styles.item,\n isActive && styles.active,\n isDanger && styles.danger\n ),\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => {\n button.props.onClick?.(event);\n onSelect(value, event);\n },\n role: usesMenuSemantics ? 'menuitem' : button.props.role,\n variant: 'tertiary',\n })}\n </li>\n ))}\n </List>\n );\n}\n","import { Icon, type IconName } from '../icon';\nimport { Popover, type PopoverProps } from '../popover';\n\nexport const MenuPopover = ({\n children,\n inline,\n triggerAccessibleLabel,\n triggerIcon = 'DotsThreeVertical',\n triggerLabel,\n}: Pick<PopoverProps, 'children' | 'inline' | 'triggerAccessibleLabel'> & {\n triggerIcon?: IconName;\n triggerLabel?: React.ReactNode;\n}) => (\n <Popover\n inline={inline}\n triggerAccessibleLabel={triggerAccessibleLabel}\n triggerAriaHasPopup='menu'\n triggerButtonContent={\n <>\n {triggerLabel}\n <Icon\n gap={triggerLabel ? 'left' : 'none'}\n name={triggerIcon}\n size='medium'\n />\n </>\n }\n >\n {children}\n </Popover>\n);\n"],"names":["getFocusableItems","list","Array","from","querySelectorAll","filter","item","disabled","MenuActionList","actions","initialFocus","menuAccessibleLabel","onSelect","readyToFocus","usesMenuSemantics","listRef","useRef","focusItem","useCallback","target","preventScroll","items","current","length","focus","currentIndex","indexOf","document","activeElement","nextIndex","useEffect","handleKeyDown","event","ArrowDown","ArrowUp","End","Home","key","preventDefault","List","styles","undefined","map","button","id","isActive","isDanger","value","index","jsx","cloneElement","props","className","cx","active","danger","onClick","role","variant","MenuPopover","children","inline","triggerAccessibleLabel","triggerIcon","triggerLabel","Popover","jsxs","Fragment","Icon"],"mappings":"0VAkBMA,EAAqBC,GACzBC,MAAMC,MAAKF,GAAAA,YAAAA,EAAMG,iBAAoC,uBAAwB,CAAA,CAAE,EAAEC,OAC9EC,GAAS,CAACA,EAAKC,QAClB,EAEK,SAASC,EAAkB,CAChCC,QAAAA,EACAC,aAAAA,EACAC,oBAAAA,EACAC,SAAAA,EACAC,aAAAA,EAAe,GACfC,kBAAAA,EAAoB,EAQtB,EAAG,CACD,MAAMC,EAAUC,EAAAA,OAA4C,IAAI,EAE1DC,EAAYC,EAAAA,YAAY,CAACC,EAAyBC,EAAgB,KAAU,CAChF,MAAMC,EAAQrB,EAAkBe,EAAQO,OAAO,EAC/C,GAAID,EAAME,SAAW,EAAG,OAExB,GAAIJ,IAAW,SAAWA,IAAW,OAAQ,CAC3CE,EAAMF,IAAW,QAAU,EAAIE,EAAME,OAAS,CAAC,EAAEC,MAAM,CAAEJ,cAAAA,CAAAA,CAAe,EACxE,MACF,CAEA,MAAMK,EAAeJ,EAAMK,QAAQC,SAASC,aAAkC,EACxEC,EACJV,IAAW,QACNM,EAAe,GAAKJ,EAAME,QAC1BE,EAAe,EAAIJ,EAAME,QAAUF,EAAME,OAChDF,EAAMQ,CAAS,EAAEL,MAAAA,CACnB,EAAG,CAAA,CAAE,EAELM,EAAAA,UAAU,IAAM,CACVhB,GAAqBD,GAAcI,EAAUP,GAAgB,QAAS,EAAI,CAChF,EAAG,CAACO,EAAWP,EAAcG,EAAcC,CAAiB,CAAC,EAE7D,MAAMiB,EAAiBC,GAAiD,CACtE,GAAI,CAAClB,EAAmB,OAQxB,MAAMK,EANU,CACdc,UAAW,OACXC,QAAS,WACTC,IAAK,OACLC,KAAM,OAAA,EAEeJ,EAAMK,GAA2B,EACnDlB,IAELa,EAAMM,eAAAA,EACNrB,EAAUE,CAAM,EAClB,EAEA,aACGoB,OAAA,CACC,aAAY5B,EACZ,UAAW6B,EAAOvC,KAClB,UAAW8B,EACX,IAAKhB,EACL,KAAMD,EAAoB,OAAS2B,OAAU,iBAAA,iBAE5ChC,SAAAA,EAAQiC,IAAI,CAAC,CAAEC,OAAAA,EAAQC,GAAAA,EAAIC,SAAAA,EAAUC,SAAAA,EAAUC,MAAAA,CAAAA,EAASC,IACvDC,EAAAA,IAAC,KAAA,CAEC,KAAMnC,EAAoB,OAAS2B,OAElCS,SAAAA,EAAAA,aAAaP,EAAQ,CACpB,eAAgBE,EAAW,OAASF,EAAOQ,MAAM,cAAc,EAC/DC,UAAWC,EAAAA,EACTV,EAAOQ,MAAMC,UACbZ,EAAOlC,KACPuC,GAAYL,EAAOc,OACnBR,GAAYN,EAAOe,MACrB,EACAC,QAAUxB,GAA+C,UACvDW,GAAAA,EAAAA,EAAOQ,OAAMK,UAAbb,MAAAA,EAAAA,KAAAA,EAAuBX,GACvBpB,EAASmC,EAAOf,CAAK,CACvB,EACAyB,KAAM3C,EAAoB,WAAa6B,EAAOQ,MAAMM,KACpDC,QAAS,UAAA,CACV,CAAA,EAjBId,GAAMD,EAAON,KAAOW,CAkB3B,CACD,EACH,CAEJ,CC1GO,MAAMW,EAAcA,CAAC,CAC1BC,SAAAA,EACAC,OAAAA,EACAC,uBAAAA,EACAC,YAAAA,EAAc,oBACdC,aAAAA,CAIF,UACGC,EAAAA,QAAA,CACC,OAAAJ,EACA,uBAAAC,EACA,oBAAoB,OACpB,qBACEI,EAAAA,KAAAC,EAAAA,SAAA,CACGH,SAAAA,CAAAA,EACDf,EAAAA,IAACmB,EAAAA,MACC,IAAKJ,EAAe,OAAS,OAC7B,KAAMD,EACN,KAAK,QAAA,CAAQ,CAAA,CAAA,CAEjB,EACD,iBAAA,cAEAH,SAAAA,CAAAA,CACH"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as c, jsxs as x, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { t as q } from "./classix-DG18itHa.js";
|
|
3
|
+
import { useRef as w, useCallback as A, useEffect as D, cloneElement as I } from "react";
|
|
4
|
+
import { List as C } from "./components/list/index.js";
|
|
5
|
+
import { Icon as E } from "./components/icon/index.js";
|
|
6
|
+
import { Popover as N } from "./components/popover/index.js";
|
|
7
|
+
import './assets/menu-popover.css';const P = "_list_25aqk_3", j = "_item_25aqk_15", H = "_active_25aqk_38", K = "_danger_25aqk_47", s = {
|
|
8
|
+
list: P,
|
|
9
|
+
item: j,
|
|
10
|
+
active: H,
|
|
11
|
+
danger: K
|
|
12
|
+
}, R = (t) => Array.from((t == null ? void 0 : t.querySelectorAll('[role="menuitem"]')) ?? []).filter((o) => !o.disabled);
|
|
13
|
+
function F({
|
|
14
|
+
actions: t,
|
|
15
|
+
initialFocus: o,
|
|
16
|
+
menuAccessibleLabel: m,
|
|
17
|
+
onSelect: f,
|
|
18
|
+
readyToFocus: a = !0,
|
|
19
|
+
usesMenuSemantics: n = !1
|
|
20
|
+
}) {
|
|
21
|
+
const u = w(null), p = A((e, i = !1) => {
|
|
22
|
+
const r = R(u.current);
|
|
23
|
+
if (r.length === 0) return;
|
|
24
|
+
if (e === "first" || e === "last") {
|
|
25
|
+
r[e === "first" ? 0 : r.length - 1].focus({
|
|
26
|
+
preventScroll: i
|
|
27
|
+
});
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const l = r.indexOf(document.activeElement), d = e === "next" ? (l + 1) % r.length : (l - 1 + r.length) % r.length;
|
|
31
|
+
r[d].focus();
|
|
32
|
+
}, []);
|
|
33
|
+
D(() => {
|
|
34
|
+
n && a && p(o ?? "first", !0);
|
|
35
|
+
}, [p, o, a, n]);
|
|
36
|
+
const v = (e) => {
|
|
37
|
+
if (!n) return;
|
|
38
|
+
const r = {
|
|
39
|
+
ArrowDown: "next",
|
|
40
|
+
ArrowUp: "previous",
|
|
41
|
+
End: "last",
|
|
42
|
+
Home: "first"
|
|
43
|
+
}[e.key];
|
|
44
|
+
r && (e.preventDefault(), p(r));
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ c(C, { "aria-label": m, className: s.list, onKeyDown: v, ref: u, role: n ? "menu" : void 0, "data-component": "menuactionlist", children: t.map(({
|
|
47
|
+
button: e,
|
|
48
|
+
id: i,
|
|
49
|
+
isActive: r,
|
|
50
|
+
isDanger: l,
|
|
51
|
+
value: d
|
|
52
|
+
}, k) => /* @__PURE__ */ c("li", { role: n ? "none" : void 0, children: I(e, {
|
|
53
|
+
"aria-current": r ? "true" : e.props["aria-current"],
|
|
54
|
+
className: q(e.props.className, s.item, r && s.active, l && s.danger),
|
|
55
|
+
onClick: (g) => {
|
|
56
|
+
var _, h;
|
|
57
|
+
(h = (_ = e.props).onClick) == null || h.call(_, g), f(d, g);
|
|
58
|
+
},
|
|
59
|
+
role: n ? "menuitem" : e.props.role,
|
|
60
|
+
variant: "tertiary"
|
|
61
|
+
}) }, i ?? e.key ?? k)) });
|
|
62
|
+
}
|
|
63
|
+
const G = ({
|
|
64
|
+
children: t,
|
|
65
|
+
inline: o,
|
|
66
|
+
triggerAccessibleLabel: m,
|
|
67
|
+
triggerIcon: f = "DotsThreeVertical",
|
|
68
|
+
triggerLabel: a
|
|
69
|
+
}) => /* @__PURE__ */ c(N, { inline: o, triggerAccessibleLabel: m, triggerAriaHasPopup: "menu", triggerButtonContent: /* @__PURE__ */ x(y, { children: [
|
|
70
|
+
a,
|
|
71
|
+
/* @__PURE__ */ c(E, { gap: a ? "left" : "none", name: f, size: "medium" })
|
|
72
|
+
] }), "data-component": "menupopover", children: t });
|
|
73
|
+
export {
|
|
74
|
+
F as M,
|
|
75
|
+
G as a
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=menu-popover-D-Ax5zzy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-popover-D-Ax5zzy.js","sources":["../src/components/menu/action-list.tsx","../src/components/menu/menu-popover.tsx"],"sourcesContent":["import cx from 'classix';\nimport { cloneElement, useCallback, useEffect, useRef } from 'react';\n\nimport { type ButtonProps } from '../button';\nimport { List } from '../list';\nimport { type PopoverInitialFocus } from '../popover';\nimport styles from './styles.module.css';\n\nexport type MenuAction<T> = {\n button: React.ReactElement<ButtonProps>;\n id?: React.Key;\n isActive?: boolean;\n isDanger?: boolean;\n value: T;\n};\n\ntype MenuFocusTarget = 'first' | 'last' | 'next' | 'previous';\n\nconst getFocusableItems = (list: HTMLUListElement | HTMLOListElement | null) =>\n Array.from(list?.querySelectorAll<HTMLButtonElement>('[role=\"menuitem\"]') ?? []).filter(\n (item) => !item.disabled\n );\n\nexport function MenuActionList<T>({\n actions,\n initialFocus,\n menuAccessibleLabel,\n onSelect,\n readyToFocus = true,\n usesMenuSemantics = false,\n}: {\n actions: MenuAction<T>[];\n initialFocus?: PopoverInitialFocus;\n menuAccessibleLabel?: string;\n onSelect: (value: T, event: React.MouseEvent<HTMLButtonElement>) => void;\n readyToFocus?: boolean;\n usesMenuSemantics?: boolean;\n}) {\n const listRef = useRef<HTMLUListElement | HTMLOListElement>(null);\n\n const focusItem = useCallback((target: MenuFocusTarget, preventScroll = false) => {\n const items = getFocusableItems(listRef.current);\n if (items.length === 0) return;\n\n if (target === 'first' || target === 'last') {\n items[target === 'first' ? 0 : items.length - 1].focus({ preventScroll });\n return;\n }\n\n const currentIndex = items.indexOf(document.activeElement as HTMLButtonElement);\n const nextIndex =\n target === 'next'\n ? (currentIndex + 1) % items.length\n : (currentIndex - 1 + items.length) % items.length;\n items[nextIndex].focus();\n }, []);\n\n useEffect(() => {\n if (usesMenuSemantics && readyToFocus) focusItem(initialFocus ?? 'first', true);\n }, [focusItem, initialFocus, readyToFocus, usesMenuSemantics]);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLUListElement>) => {\n if (!usesMenuSemantics) return;\n\n const targets = {\n ArrowDown: 'next',\n ArrowUp: 'previous',\n End: 'last',\n Home: 'first',\n } as const;\n const target = targets[event.key as keyof typeof targets];\n if (!target) return;\n\n event.preventDefault();\n focusItem(target);\n };\n\n return (\n <List\n aria-label={menuAccessibleLabel}\n className={styles.list}\n onKeyDown={handleKeyDown}\n ref={listRef}\n role={usesMenuSemantics ? 'menu' : undefined}\n >\n {actions.map(({ button, id, isActive, isDanger, value }, index) => (\n <li\n key={id ?? button.key ?? index}\n role={usesMenuSemantics ? 'none' : undefined}\n >\n {cloneElement(button, {\n 'aria-current': isActive ? 'true' : button.props['aria-current'],\n className: cx(\n button.props.className,\n styles.item,\n isActive && styles.active,\n isDanger && styles.danger\n ),\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => {\n button.props.onClick?.(event);\n onSelect(value, event);\n },\n role: usesMenuSemantics ? 'menuitem' : button.props.role,\n variant: 'tertiary',\n })}\n </li>\n ))}\n </List>\n );\n}\n","import { Icon, type IconName } from '../icon';\nimport { Popover, type PopoverProps } from '../popover';\n\nexport const MenuPopover = ({\n children,\n inline,\n triggerAccessibleLabel,\n triggerIcon = 'DotsThreeVertical',\n triggerLabel,\n}: Pick<PopoverProps, 'children' | 'inline' | 'triggerAccessibleLabel'> & {\n triggerIcon?: IconName;\n triggerLabel?: React.ReactNode;\n}) => (\n <Popover\n inline={inline}\n triggerAccessibleLabel={triggerAccessibleLabel}\n triggerAriaHasPopup='menu'\n triggerButtonContent={\n <>\n {triggerLabel}\n <Icon\n gap={triggerLabel ? 'left' : 'none'}\n name={triggerIcon}\n size='medium'\n />\n </>\n }\n >\n {children}\n </Popover>\n);\n"],"names":["getFocusableItems","list","Array","from","querySelectorAll","filter","item","disabled","MenuActionList","actions","initialFocus","menuAccessibleLabel","onSelect","readyToFocus","usesMenuSemantics","listRef","useRef","focusItem","useCallback","target","preventScroll","items","current","length","focus","currentIndex","indexOf","document","activeElement","nextIndex","useEffect","handleKeyDown","event","ArrowDown","ArrowUp","End","Home","key","preventDefault","List","styles","undefined","map","button","id","isActive","isDanger","value","index","jsx","cloneElement","props","className","cx","active","danger","onClick","role","variant","MenuPopover","children","inline","triggerAccessibleLabel","triggerIcon","triggerLabel","Popover","jsxs","Fragment","Icon"],"mappings":";;;;;;;;;;;GAkBMA,IAAoBA,CAACC,MACzBC,MAAMC,MAAKF,KAAAA,gBAAAA,EAAMG,iBAAoC,yBAAwB,CAAA,CAAE,EAAEC,OAC9EC,CAAAA,MAAS,CAACA,EAAKC,QAClB;AAEK,SAASC,EAAkB;AAAA,EAChCC,SAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,qBAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,mBAAAA,IAAoB;AAQtB,GAAG;AACD,QAAMC,IAAUC,EAA4C,IAAI,GAE1DC,IAAYC,EAAY,CAACC,GAAyBC,IAAgB,OAAU;AAChF,UAAMC,IAAQrB,EAAkBe,EAAQO,OAAO;AAC/C,QAAID,EAAME,WAAW,EAAG;AAExB,QAAIJ,MAAW,WAAWA,MAAW,QAAQ;AAC3CE,MAAAA,EAAMF,MAAW,UAAU,IAAIE,EAAME,SAAS,CAAC,EAAEC,MAAM;AAAA,QAAEJ,eAAAA;AAAAA,MAAAA,CAAe;AACxE;AAAA,IACF;AAEA,UAAMK,IAAeJ,EAAMK,QAAQC,SAASC,aAAkC,GACxEC,IACJV,MAAW,UACNM,IAAe,KAAKJ,EAAME,UAC1BE,IAAe,IAAIJ,EAAME,UAAUF,EAAME;AAChDF,IAAAA,EAAMQ,CAAS,EAAEL,MAAAA;AAAAA,EACnB,GAAG,CAAA,CAAE;AAELM,EAAAA,EAAU,MAAM;AACd,IAAIhB,KAAqBD,KAAcI,EAAUP,KAAgB,SAAS,EAAI;AAAA,EAChF,GAAG,CAACO,GAAWP,GAAcG,GAAcC,CAAiB,CAAC;AAE7D,QAAMiB,IAAgBA,CAACC,MAAiD;AACtE,QAAI,CAAClB,EAAmB;AAQxB,UAAMK,IANU;AAAA,MACdc,WAAW;AAAA,MACXC,SAAS;AAAA,MACTC,KAAK;AAAA,MACLC,MAAM;AAAA,IAAA,EAEeJ,EAAMK,GAA2B;AACxD,IAAKlB,MAELa,EAAMM,eAAAA,GACNrB,EAAUE,CAAM;AAAA,EAClB;AAEA,2BACGoB,GAAA,EACC,cAAY5B,GACZ,WAAW6B,EAAOvC,MAClB,WAAW8B,GACX,KAAKhB,GACL,MAAMD,IAAoB,SAAS2B,QAAU,kBAAA,kBAE5ChC,UAAAA,EAAQiC,IAAI,CAAC;AAAA,IAAEC,QAAAA;AAAAA,IAAQC,IAAAA;AAAAA,IAAIC,UAAAA;AAAAA,IAAUC,UAAAA;AAAAA,IAAUC,OAAAA;AAAAA,EAAAA,GAASC,MACvD,gBAAAC,EAAC,MAAA,EAEC,MAAMnC,IAAoB,SAAS2B,QAElCS,UAAAA,EAAaP,GAAQ;AAAA,IACpB,gBAAgBE,IAAW,SAASF,EAAOQ,MAAM,cAAc;AAAA,IAC/DC,WAAWC,EACTV,EAAOQ,MAAMC,WACbZ,EAAOlC,MACPuC,KAAYL,EAAOc,QACnBR,KAAYN,EAAOe,MACrB;AAAA,IACAC,SAASA,CAACxB,MAA+C;;AACvDW,OAAAA,KAAAA,IAAAA,EAAOQ,OAAMK,YAAbb,QAAAA,EAAAA,KAAAA,GAAuBX,IACvBpB,EAASmC,GAAOf,CAAK;AAAA,IACvB;AAAA,IACAyB,MAAM3C,IAAoB,aAAa6B,EAAOQ,MAAMM;AAAAA,IACpDC,SAAS;AAAA,EAAA,CACV,EAAA,GAjBId,KAAMD,EAAON,OAAOW,CAkB3B,CACD,GACH;AAEJ;AC1GO,MAAMW,IAAcA,CAAC;AAAA,EAC1BC,UAAAA;AAAAA,EACAC,QAAAA;AAAAA,EACAC,wBAAAA;AAAAA,EACAC,aAAAA,IAAc;AAAA,EACdC,cAAAA;AAIF,wBACGC,GAAA,EACC,QAAAJ,GACA,wBAAAC,GACA,qBAAoB,QACpB,sBACE,gBAAAI,EAAAC,GAAA,EACGH,UAAAA;AAAAA,EAAAA;AAAAA,EACD,gBAAAf,EAACmB,KACC,KAAKJ,IAAe,SAAS,QAC7B,MAAMD,GACN,MAAK,SAAA,CAAQ;AAAA,EAAA,CAEjB,GACD,kBAAA,eAEAH,UAAAA,EAAAA,CACH;"}
|
package/dist/tokens.json
CHANGED