@jirawatpyk/aura-react 5.41.0 → 5.42.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.
@@ -232,7 +232,7 @@ window.Aura = (() => {
232
232
  }
233
233
 
234
234
  // src/Icon.tsx
235
- var map = { "check": [["path", { "d": "M20 6 9 17l-5-5" }]], "x": [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]], "plus": [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]], "minus": [["path", { "d": "M5 12h14" }]], "search": [["path", { "d": "m21 21-4.34-4.34" }], ["circle", { "cx": "11", "cy": "11", "r": "8" }]], "chevron-down": [["path", { "d": "m6 9 6 6 6-6" }]], "chevron-up": [["path", { "d": "m18 15-6-6-6 6" }]], "chevron-left": [["path", { "d": "m15 18-6-6 6-6" }]], "chevron-right": [["path", { "d": "m9 18 6-6-6-6" }]], "arrow-right": [["path", { "d": "M5 12h14" }], ["path", { "d": "m12 5 7 7-7 7" }]], "arrow-up-right": [["path", { "d": "M7 7h10v10" }], ["path", { "d": "M7 17 17 7" }]], "arrow-up-down": [["path", { "d": "m21 16-4 4-4-4" }], ["path", { "d": "M17 20V4" }], ["path", { "d": "m3 8 4-4 4 4" }], ["path", { "d": "M7 4v16" }]], "loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]], "circle-alert": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }], ["line", { "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }]], "circle-check": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "m16 9-5.5 5.5L8 12" }]], "info": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]], "triangle-alert": [["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { "d": "M12 9v4" }], ["path", { "d": "M12 17h.01" }]], "settings": [["path", { "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "user": [["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { "cx": "12", "cy": "7", "r": "4" }]], "users": [["path", { "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { "d": "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { "d": "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { "cx": "9", "cy": "7", "r": "4" }]], "filter": [["path", { "d": "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]], "ellipsis": [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]], "external-link": [["path", { "d": "M15 3h6v6" }], ["path", { "d": "M10 14 21 3" }], ["path", { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]], "copy": [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]], "trash-2": [["path", { "d": "M10 11v6" }], ["path", { "d": "M14 11v6" }], ["path", { "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { "d": "M3 6h18" }], ["path", { "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]], "pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]], "download": [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]], "upload": [["path", { "d": "M12 3v12" }], ["path", { "d": "m17 8-5-5-5 5" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]], "calendar": [["path", { "d": "M8 2v3" }], ["path", { "d": "M16 2v3" }], ["rect", { "x": "3", "y": "3", "width": "18", "height": "18", "rx": "2" }], ["path", { "d": "M3 9h18" }]], "bell": [["path", { "d": "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]], "menu": [["path", { "d": "M4 5h16" }], ["path", { "d": "M4 12h16" }], ["path", { "d": "M4 19h16" }]], "eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "log-out": [["path", { "d": "m16 17 5-5-5-5" }], ["path", { "d": "M21 12H9" }], ["path", { "d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]], "circle": [["circle", { "cx": "12", "cy": "12", "r": "10" }]], "circle-dot-dashed": [["path", { "d": "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { "d": "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { "d": "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { "d": "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { "d": "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { "d": "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { "d": "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { "d": "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { "cx": "12", "cy": "12", "r": "1" }]], "ban": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M4.929 4.929 19.07 19.071" }]], "arrow-up": [["path", { "d": "m5 12 7-7 7 7" }], ["path", { "d": "M12 19V5" }]], "arrow-down": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]], "inbox": [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]], "pin": [["path", { "d": "M12 17v5" }], ["path", { "d": "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]], "pin-off": [["path", { "d": "M12 17v5" }], ["path", { "d": "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { "d": "m2 2 20 20" }], ["path", { "d": "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }]], "eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { "d": "m2 2 20 20" }]], "columns-3": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "M15 3v18" }]], "arrow-left": [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]], "rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]], "house": [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]], "layout-dashboard": [["rect", { "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }]], "folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]], "chart-column": [["path", { "d": "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { "d": "M18 17V9" }], ["path", { "d": "M13 17V5" }], ["path", { "d": "M8 17v-3" }]], "file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { "d": "M10 9H8" }], ["path", { "d": "M16 13H8" }], ["path", { "d": "M16 17H8" }]], "mail": [["path", { "d": "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { "x": "2", "y": "4", "width": "20", "height": "16", "rx": "2" }]], "lock": [["rect", { "width": "18", "height": "11", "x": "3", "y": "11", "rx": "2", "ry": "2" }], ["path", { "d": "M7 11V7a5 5 0 0 1 10 0v4" }]], "clock": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 6v6l4 2" }]], "trending-up": [["path", { "d": "M16 7h6v6" }], ["path", { "d": "m22 7-8.5 8.5-5-5L2 17" }]], "trending-down": [["path", { "d": "M16 17h6v-6" }], ["path", { "d": "m22 17-8.5-8.5-5 5L2 7" }]], "image": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]], "paperclip": [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]], "cloud-upload": [["path", { "d": "M12 13v8" }], ["path", { "d": "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { "d": "m8 17 4-4 4 4" }]], "file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]], "sun": [["circle", { "cx": "12", "cy": "12", "r": "4" }], ["path", { "d": "M12 2v2" }], ["path", { "d": "M12 20v2" }], ["path", { "d": "m4.93 4.93 1.41 1.41" }], ["path", { "d": "m17.66 17.66 1.41 1.41" }], ["path", { "d": "M2 12h2" }], ["path", { "d": "M20 12h2" }], ["path", { "d": "m6.34 17.66-1.41 1.41" }], ["path", { "d": "m19.07 4.93-1.41 1.41" }]], "moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]], "monitor": [["rect", { "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }], ["line", { "x1": "8", "x2": "16", "y1": "21", "y2": "21" }], ["line", { "x1": "12", "x2": "12", "y1": "17", "y2": "21" }]], "panel-left-close": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m16 15-3-3 3-3" }]], "panel-left-open": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m14 9 3 3-3 3" }]], "server": [["rect", { "width": "20", "height": "8", "x": "2", "y": "2", "rx": "2", "ry": "2" }], ["rect", { "width": "20", "height": "8", "x": "2", "y": "14", "rx": "2", "ry": "2" }], ["line", { "x1": "6", "x2": "6.01", "y1": "6", "y2": "6" }], ["line", { "x1": "6", "x2": "6.01", "y1": "18", "y2": "18" }]], "globe": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }], ["path", { "d": "M2 12h20" }]], "activity": [["path", { "d": "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }]], "shield-alert": [["path", { "d": "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { "d": "M12 8v4" }], ["path", { "d": "M12 16h.01" }]], "phone": [["path", { "d": "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }]], "wrench": [["path", { "d": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]] };
235
+ var map = { "check": [["path", { "d": "M20 6 9 17l-5-5" }]], "x": [["path", { "d": "M18 6 6 18" }], ["path", { "d": "m6 6 12 12" }]], "plus": [["path", { "d": "M5 12h14" }], ["path", { "d": "M12 5v14" }]], "minus": [["path", { "d": "M5 12h14" }]], "search": [["path", { "d": "m21 21-4.34-4.34" }], ["circle", { "cx": "11", "cy": "11", "r": "8" }]], "chevron-down": [["path", { "d": "m6 9 6 6 6-6" }]], "chevron-up": [["path", { "d": "m18 15-6-6-6 6" }]], "chevron-left": [["path", { "d": "m15 18-6-6 6-6" }]], "chevron-right": [["path", { "d": "m9 18 6-6-6-6" }]], "arrow-right": [["path", { "d": "M5 12h14" }], ["path", { "d": "m12 5 7 7-7 7" }]], "arrow-up-right": [["path", { "d": "M7 7h10v10" }], ["path", { "d": "M7 17 17 7" }]], "arrow-up-down": [["path", { "d": "m21 16-4 4-4-4" }], ["path", { "d": "M17 20V4" }], ["path", { "d": "m3 8 4-4 4 4" }], ["path", { "d": "M7 4v16" }]], "loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]], "circle-alert": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }], ["line", { "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }]], "circle-check": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "m16 9-5.5 5.5L8 12" }]], "info": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 16v-4" }], ["path", { "d": "M12 8h.01" }]], "triangle-alert": [["path", { "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }], ["path", { "d": "M12 9v4" }], ["path", { "d": "M12 17h.01" }]], "settings": [["path", { "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "user": [["path", { "d": "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }], ["circle", { "cx": "12", "cy": "7", "r": "4" }]], "users": [["path", { "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }], ["path", { "d": "M16 3.128a4 4 0 0 1 0 7.744" }], ["path", { "d": "M22 21v-2a4 4 0 0 0-3-3.87" }], ["circle", { "cx": "9", "cy": "7", "r": "4" }]], "filter": [["path", { "d": "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }]], "ellipsis": [["circle", { "cx": "12", "cy": "12", "r": "1" }], ["circle", { "cx": "19", "cy": "12", "r": "1" }], ["circle", { "cx": "5", "cy": "12", "r": "1" }]], "external-link": [["path", { "d": "M15 3h6v6" }], ["path", { "d": "M10 14 21 3" }], ["path", { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]], "copy": [["rect", { "width": "14", "height": "14", "x": "8", "y": "8", "rx": "2", "ry": "2" }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]], "trash-2": [["path", { "d": "M10 11v6" }], ["path", { "d": "M14 11v6" }], ["path", { "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }], ["path", { "d": "M3 6h18" }], ["path", { "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]], "pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }], ["path", { "d": "m15 5 4 4" }]], "download": [["path", { "d": "M12 15V3" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10 5 5 5-5" }]], "upload": [["path", { "d": "M12 3v12" }], ["path", { "d": "m17 8-5-5-5 5" }], ["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]], "calendar": [["path", { "d": "M8 2v3" }], ["path", { "d": "M16 2v3" }], ["rect", { "x": "3", "y": "3", "width": "18", "height": "18", "rx": "2" }], ["path", { "d": "M3 9h18" }]], "bell": [["path", { "d": "M10.268 21a2 2 0 0 0 3.464 0" }], ["path", { "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }]], "menu": [["path", { "d": "M4 5h16" }], ["path", { "d": "M4 12h16" }], ["path", { "d": "M4 19h16" }]], "eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }], ["circle", { "cx": "12", "cy": "12", "r": "3" }]], "log-out": [["path", { "d": "m16 17 5-5-5-5" }], ["path", { "d": "M21 12H9" }], ["path", { "d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]], "circle": [["circle", { "cx": "12", "cy": "12", "r": "10" }]], "circle-dot-dashed": [["path", { "d": "M10.1 2.18a9.93 9.93 0 0 1 3.8 0" }], ["path", { "d": "M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7" }], ["path", { "d": "M21.82 10.1a9.93 9.93 0 0 1 0 3.8" }], ["path", { "d": "M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69" }], ["path", { "d": "M13.9 21.82a9.94 9.94 0 0 1-3.8 0" }], ["path", { "d": "M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7" }], ["path", { "d": "M2.18 13.9a9.93 9.93 0 0 1 0-3.8" }], ["path", { "d": "M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69" }], ["circle", { "cx": "12", "cy": "12", "r": "1" }]], "ban": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M4.929 4.929 19.07 19.071" }]], "arrow-up": [["path", { "d": "m5 12 7-7 7 7" }], ["path", { "d": "M12 19V5" }]], "arrow-down": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]], "inbox": [["polyline", { "points": "22 12 16 12 14 15 10 15 8 12 2 12" }], ["path", { "d": "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }]], "pin": [["path", { "d": "M12 17v5" }], ["path", { "d": "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }]], "pin-off": [["path", { "d": "M12 17v5" }], ["path", { "d": "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" }], ["path", { "d": "m2 2 20 20" }], ["path", { "d": "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" }]], "eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }], ["path", { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }], ["path", { "d": "m2 2 20 20" }]], "columns-3": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "M15 3v18" }]], "arrow-left": [["path", { "d": "m12 19-7-7 7-7" }], ["path", { "d": "M19 12H5" }]], "rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]], "house": [["path", { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" }], ["path", { "d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }]], "layout-dashboard": [["rect", { "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }], ["rect", { "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }], ["rect", { "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }]], "folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]], "chart-column": [["path", { "d": "M3 3v16a2 2 0 0 0 2 2h16" }], ["path", { "d": "M18 17V9" }], ["path", { "d": "M13 17V5" }], ["path", { "d": "M8 17v-3" }]], "file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }], ["path", { "d": "M10 9H8" }], ["path", { "d": "M16 13H8" }], ["path", { "d": "M16 17H8" }]], "mail": [["path", { "d": "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }], ["rect", { "x": "2", "y": "4", "width": "20", "height": "16", "rx": "2" }]], "lock": [["rect", { "width": "18", "height": "11", "x": "3", "y": "11", "rx": "2", "ry": "2" }], ["path", { "d": "M7 11V7a5 5 0 0 1 10 0v4" }]], "clock": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 6v6l4 2" }]], "trending-up": [["path", { "d": "M16 7h6v6" }], ["path", { "d": "m22 7-8.5 8.5-5-5L2 17" }]], "trending-down": [["path", { "d": "M16 17h6v-6" }], ["path", { "d": "m22 17-8.5-8.5-5 5L2 7" }]], "image": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }], ["circle", { "cx": "9", "cy": "9", "r": "2" }], ["path", { "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]], "paperclip": [["path", { "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }]], "cloud-upload": [["path", { "d": "M12 13v8" }], ["path", { "d": "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" }], ["path", { "d": "m8 17 4-4 4 4" }]], "file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]], "sun": [["circle", { "cx": "12", "cy": "12", "r": "4" }], ["path", { "d": "M12 2v2" }], ["path", { "d": "M12 20v2" }], ["path", { "d": "m4.93 4.93 1.41 1.41" }], ["path", { "d": "m17.66 17.66 1.41 1.41" }], ["path", { "d": "M2 12h2" }], ["path", { "d": "M20 12h2" }], ["path", { "d": "m6.34 17.66-1.41 1.41" }], ["path", { "d": "m19.07 4.93-1.41 1.41" }]], "moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]], "monitor": [["rect", { "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }], ["line", { "x1": "8", "x2": "16", "y1": "21", "y2": "21" }], ["line", { "x1": "12", "x2": "12", "y1": "17", "y2": "21" }]], "panel-left-close": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m16 15-3-3 3-3" }]], "panel-left-open": [["rect", { "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }], ["path", { "d": "M9 3v18" }], ["path", { "d": "m14 9 3 3-3 3" }]], "server": [["rect", { "width": "20", "height": "8", "x": "2", "y": "2", "rx": "2", "ry": "2" }], ["rect", { "width": "20", "height": "8", "x": "2", "y": "14", "rx": "2", "ry": "2" }], ["line", { "x1": "6", "x2": "6.01", "y1": "6", "y2": "6" }], ["line", { "x1": "6", "x2": "6.01", "y1": "18", "y2": "18" }]], "globe": [["circle", { "cx": "12", "cy": "12", "r": "10" }], ["path", { "d": "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }], ["path", { "d": "M2 12h20" }]], "activity": [["path", { "d": "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" }]], "shield-alert": [["path", { "d": "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }], ["path", { "d": "M12 8v4" }], ["path", { "d": "M12 16h.01" }]], "phone": [["path", { "d": "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" }]], "wrench": [["path", { "d": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]], "sliders-horizontal": [["path", { "d": "M10 5H3" }], ["path", { "d": "M12 19H3" }], ["path", { "d": "M14 3v4" }], ["path", { "d": "M16 17v4" }], ["path", { "d": "M21 12h-9" }], ["path", { "d": "M21 19h-5" }], ["path", { "d": "M21 5h-7" }], ["path", { "d": "M8 10v4" }], ["path", { "d": "M8 12H3" }]] };
236
236
  var ICONS = map;
237
237
  var registered = {};
238
238
  function registerIcons(icons) {
@@ -377,6 +377,7 @@ window.Aura = (() => {
377
377
  function plainClick(e) {
378
378
  return !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey;
379
379
  }
380
+ var FilterSheet = React3.createContext(false);
380
381
 
381
382
  // src/display.tsx
382
383
  var React4 = __toESM(require_react(), 1);
@@ -601,6 +602,17 @@ window.Aura = (() => {
601
602
  }
602
603
  ]
603
604
  ]);
605
+ var IconSlidersHorizontal = /* @__PURE__ */ defineIcon("sliders-horizontal", [
606
+ ["path", { d: "M10 5H3" }],
607
+ ["path", { d: "M12 19H3" }],
608
+ ["path", { d: "M14 3v4" }],
609
+ ["path", { d: "M16 17v4" }],
610
+ ["path", { d: "M21 12h-9" }],
611
+ ["path", { d: "M21 19h-5" }],
612
+ ["path", { d: "M21 5h-7" }],
613
+ ["path", { d: "M8 10v4" }],
614
+ ["path", { d: "M8 12H3" }]
615
+ ]);
604
616
 
605
617
  // src/display.tsx
606
618
  var h2 = React4.createElement;
@@ -951,6 +963,10 @@ window.Aura = (() => {
951
963
  statusOk: "\u0E1B\u0E01\u0E15\u0E34",
952
964
  statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
953
965
  opensInNewTab: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
966
+ filtersApplied: function(n3) {
967
+ return "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07, \u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48 " + n3.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
968
+ },
969
+ done: "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19",
954
970
  accepts: function(list, max) {
955
971
  return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
956
972
  }
@@ -1088,6 +1104,10 @@ window.Aura = (() => {
1088
1104
  statusOk: "OK",
1089
1105
  statusUnknown: "Ingen data",
1090
1106
  opensInNewTab: "\xF6ppnas i en ny flik",
1107
+ filtersApplied: function(n3) {
1108
+ return "Filter, " + n3.toLocaleString("sv-SE") + " aktiva";
1109
+ },
1110
+ done: "Klar",
1091
1111
  accepts: function(list, max) {
1092
1112
  return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
1093
1113
  }
@@ -1226,6 +1246,10 @@ window.Aura = (() => {
1226
1246
  statusOk: "OK",
1227
1247
  statusUnknown: "No data",
1228
1248
  opensInNewTab: "opens in a new tab",
1249
+ filtersApplied: function(n3) {
1250
+ return "Filters, " + n3.toLocaleString("en") + " applied";
1251
+ },
1252
+ done: "Done",
1229
1253
  accepts: function(list, max) {
1230
1254
  return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
1231
1255
  }
@@ -2727,12 +2751,18 @@ window.Aura = (() => {
2727
2751
  var React17 = __toESM(require_react(), 1);
2728
2752
  var FilterSelect = React17.forwardRef(function FilterSelect2(props, ref) {
2729
2753
  const onChange = props.onChange;
2730
- const pass = Object.assign(omit(props, ["label", "allLabel", "onChange"]), {
2731
- [FILTER_KEY]: { name: props.label, allLabel: props.allLabel },
2732
- onChange: onChange ? function(e) {
2733
- onChange(e.target.value);
2734
- } : void 0
2735
- });
2754
+ const inSheet = React17.useContext(FilterSheet);
2755
+ const pass = Object.assign(
2756
+ omit(props, ["label", "allLabel", "onChange"]),
2757
+ inSheet ? { label: props.label } : {
2758
+ [FILTER_KEY]: { name: props.label, allLabel: props.allLabel }
2759
+ },
2760
+ {
2761
+ onChange: onChange ? function(e) {
2762
+ onChange(e.target.value);
2763
+ } : void 0
2764
+ }
2765
+ );
2736
2766
  return /* @__PURE__ */ React17.createElement(Select, { ...pass, ref });
2737
2767
  });
2738
2768
 
@@ -3588,6 +3618,7 @@ window.Aura = (() => {
3588
3618
  const anyLabel = props.anyLabel || dt.anyTime;
3589
3619
  const value = v.start && v.end ? formatDateRange(v.start, v.end, { locale, calendar }) : anyLabel;
3590
3620
  const setFace = useMergedRef(ref, faceRef);
3621
+ const inSheet = React19.useContext(FilterSheet);
3591
3622
  const limits = {
3592
3623
  min: props.min,
3593
3624
  max: props.max,
@@ -3688,7 +3719,7 @@ window.Aura = (() => {
3688
3719
  ),
3689
3720
  document.body
3690
3721
  ) : null;
3691
- return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
3722
+ const box = /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
3692
3723
  "div",
3693
3724
  {
3694
3725
  ref: boxRef,
@@ -3696,6 +3727,7 @@ window.Aura = (() => {
3696
3727
  "aura-filterselect",
3697
3728
  pop.open && "is-open",
3698
3729
  props.disabled && "is-disabled",
3730
+ inSheet && "aura-filterselect--sheet",
3699
3731
  touchClass(props.touchHeight),
3700
3732
  props.className
3701
3733
  )
@@ -3724,6 +3756,8 @@ window.Aura = (() => {
3724
3756
  /* @__PURE__ */ React19.createElement(Icon, { name: /* @__PURE__ */ React19.createElement(IconChevronDown, null), className: "aura-filterselect__chevron" })
3725
3757
  )
3726
3758
  ), cal);
3759
+ if (!inSheet) return box;
3760
+ return /* @__PURE__ */ React19.createElement("div", { className: cx("aura-field", props.disabled && "is-disabled") }, /* @__PURE__ */ React19.createElement("span", { className: "aura-field__label", "aria-hidden": own ? void 0 : true }, props.label), box);
3727
3761
  }
3728
3762
  );
3729
3763
 
@@ -4714,162 +4748,439 @@ window.Aura = (() => {
4714
4748
  );
4715
4749
 
4716
4750
  // src/FilterBar.tsx
4717
- var React29 = __toESM(require_react(), 1);
4751
+ var React31 = __toESM(require_react(), 1);
4718
4752
 
4719
- // src/Tag.tsx
4753
+ // src/Dialog.tsx
4720
4754
  var React28 = __toESM(require_react(), 1);
4755
+ var import_react_dom7 = __toESM(require_react_dom(), 1);
4721
4756
 
4722
- // src/Tooltip.tsx
4757
+ // src/useModal.tsx
4723
4758
  var React27 = __toESM(require_react(), 1);
4724
- var import_react_dom7 = __toESM(require_react_dom(), 1);
4725
- var Tooltip = React27.forwardRef(function Tooltip2(props, ref) {
4726
- const id = uid(), st = React27.useState(false), open = props.open !== void 0 ? props.open : st[0], set = st[1];
4727
- const anchor = React27.useRef(null), anchorMerged = useMergedRef(ref, anchor), tip2 = React27.useRef(null), timer2 = React27.useRef(void 0);
4728
- const pos = React27.useState(null), mounted = useMounted();
4729
- function show3(now) {
4730
- clearTimeout(timer2.current);
4731
- timer2.current = setTimeout(
4732
- function() {
4733
- set(true);
4734
- },
4735
- now ? 0 : props.delay == null ? 400 : props.delay
4736
- );
4737
- }
4738
- function hide2() {
4739
- clearTimeout(timer2.current);
4740
- set(false);
4741
- }
4742
- function hideSoon2() {
4743
- clearTimeout(timer2.current);
4744
- timer2.current = setTimeout(function() {
4745
- set(false);
4746
- }, 120);
4747
- }
4748
- React27.useEffect(function() {
4749
- return function() {
4750
- clearTimeout(timer2.current);
4751
- };
4752
- }, []);
4753
- function place2() {
4754
- if (!anchor.current || !tip2.current) return;
4755
- const r2 = anchor.current.getBoundingClientRect(), t = tip2.current.getBoundingClientRect();
4756
- const vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
4757
- let side = props.side || "top";
4758
- if (side === "top" && r2.top - t.height - gap < m && r2.bottom + gap + t.height <= vh - m) side = "bottom";
4759
- else if (side === "bottom" && r2.bottom + gap + t.height > vh - m && r2.top - t.height - gap >= m) side = "top";
4760
- else if (side === "left" && r2.left - t.width - gap < m && r2.right + gap + t.width <= vw - m) side = "right";
4761
- else if (side === "right" && r2.right + gap + t.width > vw - m && r2.left - t.width - gap >= m) side = "left";
4762
- const clampX = function(x) {
4763
- return Math.max(m, Math.min(x, vw - t.width - m));
4764
- };
4765
- const clampY = function(y) {
4766
- return Math.max(m, Math.min(y, vh - t.height - m));
4767
- };
4768
- let top, left;
4769
- if (side === "top" || side === "bottom") {
4770
- top = clampY(side === "top" ? r2.top - t.height - gap : r2.bottom + gap);
4771
- left = clampX(r2.left + r2.width / 2 - t.width / 2);
4772
- } else {
4773
- left = side === "left" ? r2.left - t.width - gap : r2.right + gap;
4774
- left = clampX(left);
4775
- top = clampY(r2.top + r2.height / 2 - t.height / 2);
4776
- }
4777
- pos[1]({ top, left });
4778
- }
4779
- useIsoLayoutEffect(
4780
- function() {
4781
- if (!open) return;
4782
- place2();
4783
- window.addEventListener("scroll", place2, true);
4784
- window.addEventListener("resize", place2);
4785
- return function() {
4786
- window.removeEventListener("scroll", place2, true);
4787
- window.removeEventListener("resize", place2);
4788
- };
4789
- },
4790
- [open, mounted]
4791
- );
4759
+ var locks = 0;
4760
+ var savedOverflow = "";
4761
+ function lockScroll() {
4762
+ const body = document.body;
4763
+ if (locks === 0) savedOverflow = body.style.overflow;
4764
+ locks++;
4765
+ body.style.overflow = "hidden";
4766
+ let done = false;
4767
+ return function() {
4768
+ if (done) return;
4769
+ done = true;
4770
+ locks--;
4771
+ if (locks === 0) body.style.overflow = savedOverflow;
4772
+ };
4773
+ }
4774
+ function tabbable(el) {
4775
+ const all = Array.prototype.filter.call(el.querySelectorAll(FOCUSABLE), function(c) {
4776
+ return c.tabIndex >= 0;
4777
+ });
4778
+ const shown = all.filter(function(c) {
4779
+ return c.getClientRects().length > 0;
4780
+ });
4781
+ return shown.length ? shown : all;
4782
+ }
4783
+ function useModal(open, ref, opts) {
4784
+ const mounted = useMounted();
4785
+ const prev = React27.useRef(null);
4786
+ const o = opts || {};
4787
+ const latest = React27.useRef(o);
4788
+ latest.current = o;
4792
4789
  React27.useEffect(
4793
4790
  function() {
4794
- if (!open) return;
4795
- function esc(e) {
4796
- if (e.key === "Escape") hide2();
4797
- }
4798
- document.addEventListener("keydown", esc);
4791
+ if (!open || !mounted) return;
4792
+ prev.current = document.activeElement;
4793
+ const unlock = lockScroll();
4794
+ const el = ref.current;
4795
+ const firstIn = function(scope) {
4796
+ if (!scope || !el) return null;
4797
+ const sel = FOCUSABLE.split(",").map(function(s) {
4798
+ return scope + " " + s;
4799
+ }).join(",");
4800
+ const list = el.querySelectorAll(sel);
4801
+ for (let i = 0; i < list.length; i++)
4802
+ if (list[i].tabIndex >= 0 && list[i].getClientRects().length > 0) return list[i];
4803
+ return null;
4804
+ };
4805
+ const target = el && (el.querySelector("[data-autofocus]") || firstIn(o.bodySelector) || firstIn(o.footSelector) || el);
4806
+ if (target && o.autoFocus !== false) target.focus();
4799
4807
  return function() {
4800
- document.removeEventListener("keydown", esc);
4808
+ unlock();
4809
+ const l = latest.current;
4810
+ const ff = l.finalFocus;
4811
+ const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
4812
+ const back = to && to.isConnected ? to : prev.current;
4813
+ if (back && back.focus) back.focus();
4814
+ if (l.onCloseComplete) l.onCloseComplete();
4801
4815
  };
4802
4816
  },
4803
- [open]
4804
- );
4805
- const child = React27.Children.only(props.children);
4806
- const trigger = /* @__PURE__ */ React27.createElement(
4807
- "span",
4808
- {
4809
- ref: anchorMerged,
4810
- className: "aura-tooltip-anchor",
4811
- onMouseEnter: function() {
4812
- show3(false);
4813
- },
4814
- onMouseLeave: hideSoon2,
4815
- onFocus: function() {
4816
- show3(true);
4817
- },
4818
- onBlur: hide2
4819
- },
4820
- React27.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
4817
+ [open, mounted]
4821
4818
  );
4822
- return /* @__PURE__ */ React27.createElement(React27.Fragment, null, trigger, open && mounted ? (0, import_react_dom7.createPortal)(
4823
- /* @__PURE__ */ React27.createElement(
4824
- "div",
4825
- {
4826
- ref: tip2,
4827
- id,
4828
- role: "tooltip",
4829
- onMouseEnter: function() {
4830
- clearTimeout(timer2.current);
4831
- },
4832
- onMouseLeave: hideSoon2,
4833
- className: "aura-tooltip aura-tooltip--hoverable",
4834
- style: { top: pos[0] ? pos[0].top : -9999, left: pos[0] ? pos[0].left : -9999 }
4835
- },
4836
- props.content
4837
- ),
4838
- document.body
4839
- ) : null);
4840
- });
4841
-
4842
- // src/Tag.tsx
4843
- function textOf2(node, all) {
4844
- if (node == null || typeof node === "boolean") return "";
4845
- if (typeof node === "string" || typeof node === "number") return String(node);
4846
- if (Array.isArray(node))
4847
- return node.map(function(n3) {
4848
- return textOf2(n3, all);
4849
- }).join("");
4850
- if (React28.isValidElement(node)) {
4851
- const p = node.props;
4852
- return !all && (p["aria-hidden"] === true || p["aria-hidden"] === "true") ? "" : textOf2(p.children, all);
4819
+ function onKeyDown(e) {
4820
+ if (e.key === "Escape") {
4821
+ e.stopPropagation();
4822
+ if (o.onEscape) o.onEscape();
4823
+ return;
4824
+ }
4825
+ if (e.key !== "Tab" || !ref.current || e.defaultPrevented) return;
4826
+ if (!ref.current.contains(e.target)) return;
4827
+ const list = tabbable(ref.current);
4828
+ if (!list.length) {
4829
+ e.preventDefault();
4830
+ return;
4831
+ }
4832
+ const first = list[0], last = list[list.length - 1], active = document.activeElement, stray = active === ref.current;
4833
+ if (e.shiftKey && (active === first || stray)) {
4834
+ e.preventDefault();
4835
+ last.focus();
4836
+ } else if (!e.shiftKey && (active === last || stray)) {
4837
+ e.preventDefault();
4838
+ first.focus();
4839
+ }
4853
4840
  }
4854
- return "";
4841
+ return { ready: !!open && mounted, onKeyDown };
4842
+ }
4843
+
4844
+ // src/Dialog.tsx
4845
+ var DialogClose = React28.createContext(null);
4846
+ function useDialogClose() {
4847
+ return React28.useContext(DialogClose) || function() {
4848
+ };
4855
4849
  }
4856
- var Tag = React28.forwardRef(function Tag2(props, ref) {
4850
+ var Dialog = React28.forwardRef(function Dialog2(props, ref) {
4857
4851
  const t = useStrings();
4858
- const selectable = props.onClick != null || props.selected != null;
4852
+ const density = useDensity();
4853
+ const own = React28.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
4854
+ const openState = useMaybeControlled(props.open, false, null), open = openState[0];
4855
+ if (props.open === void 0 && !props.trigger)
4856
+ devWarnOnce("dialog-no-open", "Dialog has neither `open` nor `trigger`, so it can never open. Pass one of them.");
4857
+ const trigId = uid();
4858
+ function closeNow() {
4859
+ if (props.open === void 0) openState[1](false);
4860
+ if (props.onClose) props.onClose();
4861
+ }
4862
+ function close() {
4863
+ if (props.dismissible === false) return;
4864
+ closeNow();
4865
+ }
4866
+ const scrimCloses = props.dismissible !== false && (props.dismissOnScrim !== void 0 ? props.dismissOnScrim : props.role !== "alertdialog");
4867
+ const modal = useModal(open, own, {
4868
+ autoFocus: props.autoFocus,
4869
+ onEscape: close,
4870
+ bodySelector: ".aura-dialog__body",
4871
+ footSelector: ".aura-dialog__foot",
4872
+ /* With a trigger, focus goes back to it even where a click doesn't focus buttons (Safari). */
4873
+ finalFocus: props.trigger ? function() {
4874
+ const ff = props.finalFocus;
4875
+ const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
4876
+ return to || document.querySelector('[data-aura-trigger="' + trigId + '"]');
4877
+ } : props.finalFocus,
4878
+ onCloseComplete: props.onCloseComplete
4879
+ });
4880
+ const trig = props.trigger;
4881
+ const trigger = trig && React28.isValidElement(trig) ? React28.cloneElement(trig, {
4882
+ "aria-haspopup": "dialog",
4883
+ "aria-expanded": open,
4884
+ "data-aura-trigger": trigId,
4885
+ onClick: function(e) {
4886
+ const own2 = trig.props.onClick;
4887
+ if (own2) own2(e);
4888
+ if (e.defaultPrevented) return;
4889
+ if (props.open === void 0) openState[1](true);
4890
+ if (props.onOpen) props.onOpen();
4891
+ }
4892
+ }) : null;
4893
+ if (!modal.ready) return trigger;
4859
4894
  const rest = omit(props, [
4860
- "onRemove",
4861
- "selected",
4862
- "icon",
4863
- "className",
4864
- "children",
4865
- "disabled",
4866
- "removeLabel",
4895
+ "open",
4896
+ "onClose",
4897
+ "title",
4898
+ "description",
4899
+ "children",
4900
+ "footer",
4901
+ "size",
4902
+ "dismissible",
4903
+ "dismissOnScrim",
4904
+ "role",
4905
+ "autoFocus",
4906
+ "className",
4907
+ "trigger",
4908
+ "onOpen",
4909
+ "finalFocus",
4910
+ "onCloseComplete",
4911
+ "aria-labelledby",
4912
+ "aria-describedby",
4913
+ "aria-modal"
4914
+ ]);
4915
+ const panel = (0, import_react_dom7.createPortal)(
4916
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React28.createElement(
4917
+ "div",
4918
+ {
4919
+ className: "aura-scrim",
4920
+ onClick: scrimCloses ? close : void 0,
4921
+ onMouseDown: scrimCloses ? void 0 : function(e) {
4922
+ e.preventDefault();
4923
+ },
4924
+ "aria-hidden": true
4925
+ }
4926
+ ), /* @__PURE__ */ React28.createElement(
4927
+ "div",
4928
+ {
4929
+ ...rest,
4930
+ ref: merged,
4931
+ role: props.role || "dialog",
4932
+ "aria-modal": true,
4933
+ "aria-labelledby": titleId,
4934
+ "aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
4935
+ tabIndex: -1,
4936
+ className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
4937
+ },
4938
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog__head" }, /* @__PURE__ */ React28.createElement("h2", { className: "aura-dialog__title", id: titleId }, props.title), props.dismissible !== false ? /* @__PURE__ */ React28.createElement(IconButton, { icon: /* @__PURE__ */ React28.createElement(IconX, null), label: t.close, className: "aura-dialog__close", onClick: close }) : null),
4939
+ props.description ? /* @__PURE__ */ React28.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
4940
+ /* @__PURE__ */ React28.createElement(DialogClose.Provider, { value: closeNow }, props.children ? /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog__body" }, props.children) : null, props.footer ? /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog__foot" }, props.footer) : null)
4941
+ )),
4942
+ document.body
4943
+ );
4944
+ return trigger ? /* @__PURE__ */ React28.createElement(React28.Fragment, null, trigger, panel) : panel;
4945
+ });
4946
+ var Drawer = React28.forwardRef(function Drawer2(props, ref) {
4947
+ const t = useStrings();
4948
+ const density = useDensity();
4949
+ const own = React28.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
4950
+ function close() {
4951
+ if (props.dismissible !== false && props.onClose) props.onClose();
4952
+ }
4953
+ const modal = useModal(props.open, own, {
4954
+ autoFocus: props.autoFocus,
4955
+ onEscape: close,
4956
+ bodySelector: ".aura-drawer__body",
4957
+ footSelector: ".aura-drawer__foot",
4958
+ finalFocus: props.finalFocus,
4959
+ onCloseComplete: props.onCloseComplete
4960
+ });
4961
+ if (!modal.ready) return null;
4962
+ const side = props.side === "left" ? "left" : "right";
4963
+ const rest = omit(props, [
4964
+ "open",
4965
+ "onClose",
4966
+ "side",
4967
+ "size",
4968
+ "title",
4969
+ "description",
4970
+ "children",
4971
+ "footer",
4972
+ "dismissible",
4973
+ "dismissOnScrim",
4974
+ "autoFocus",
4975
+ "aria-label",
4976
+ "aria-describedby",
4977
+ "aria-labelledby",
4978
+ "className",
4979
+ "closeLabel",
4980
+ "closeProps",
4981
+ "finalFocus",
4982
+ "onCloseComplete"
4983
+ ]);
4984
+ const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
4985
+ return (0, import_react_dom7.createPortal)(
4986
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React28.createElement(
4987
+ "div",
4988
+ {
4989
+ className: "aura-scrim",
4990
+ onClick: drawerScrimCloses ? close : void 0,
4991
+ onMouseDown: !drawerScrimCloses ? function(e) {
4992
+ e.preventDefault();
4993
+ } : void 0,
4994
+ "aria-hidden": true
4995
+ }
4996
+ ), /* @__PURE__ */ React28.createElement(
4997
+ "div",
4998
+ {
4999
+ ...rest,
5000
+ ref: merged,
5001
+ role: "dialog",
5002
+ "aria-modal": true,
5003
+ "aria-labelledby": props.title ? titleId : props["aria-labelledby"],
5004
+ "aria-label": props.title ? void 0 : props["aria-label"],
5005
+ "aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
5006
+ tabIndex: -1,
5007
+ className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
5008
+ },
5009
+ props.title || props.dismissible !== false ? /* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__head" }, props.title ? /* @__PURE__ */ React28.createElement("h2", { className: "aura-drawer__title", id: titleId }, props.title) : /* @__PURE__ */ React28.createElement("span", { style: { flex: 1 } }), props.dismissible !== false ? /* @__PURE__ */ React28.createElement(
5010
+ IconButton,
5011
+ {
5012
+ ...props.closeProps,
5013
+ icon: /* @__PURE__ */ React28.createElement(IconX, null),
5014
+ label: props.closeLabel || t.close,
5015
+ onClick: function(e) {
5016
+ const own2 = props.closeProps && props.closeProps.onClick;
5017
+ if (own2) own2(e);
5018
+ if (!e.defaultPrevented) close();
5019
+ }
5020
+ }
5021
+ ) : null) : null,
5022
+ props.description ? /* @__PURE__ */ React28.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
5023
+ /* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__body" }, props.children),
5024
+ props.footer ? /* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
5025
+ )),
5026
+ document.body
5027
+ );
5028
+ });
5029
+
5030
+ // src/Tag.tsx
5031
+ var React30 = __toESM(require_react(), 1);
5032
+
5033
+ // src/Tooltip.tsx
5034
+ var React29 = __toESM(require_react(), 1);
5035
+ var import_react_dom8 = __toESM(require_react_dom(), 1);
5036
+ var Tooltip = React29.forwardRef(function Tooltip2(props, ref) {
5037
+ const id = uid(), st = React29.useState(false), open = props.open !== void 0 ? props.open : st[0], set = st[1];
5038
+ const anchor = React29.useRef(null), anchorMerged = useMergedRef(ref, anchor), tip2 = React29.useRef(null), timer2 = React29.useRef(void 0);
5039
+ const pos = React29.useState(null), mounted = useMounted();
5040
+ function show3(now) {
5041
+ clearTimeout(timer2.current);
5042
+ timer2.current = setTimeout(
5043
+ function() {
5044
+ set(true);
5045
+ },
5046
+ now ? 0 : props.delay == null ? 400 : props.delay
5047
+ );
5048
+ }
5049
+ function hide2() {
5050
+ clearTimeout(timer2.current);
5051
+ set(false);
5052
+ }
5053
+ function hideSoon2() {
5054
+ clearTimeout(timer2.current);
5055
+ timer2.current = setTimeout(function() {
5056
+ set(false);
5057
+ }, 120);
5058
+ }
5059
+ React29.useEffect(function() {
5060
+ return function() {
5061
+ clearTimeout(timer2.current);
5062
+ };
5063
+ }, []);
5064
+ function place2() {
5065
+ if (!anchor.current || !tip2.current) return;
5066
+ const r2 = anchor.current.getBoundingClientRect(), t = tip2.current.getBoundingClientRect();
5067
+ const vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
5068
+ let side = props.side || "top";
5069
+ if (side === "top" && r2.top - t.height - gap < m && r2.bottom + gap + t.height <= vh - m) side = "bottom";
5070
+ else if (side === "bottom" && r2.bottom + gap + t.height > vh - m && r2.top - t.height - gap >= m) side = "top";
5071
+ else if (side === "left" && r2.left - t.width - gap < m && r2.right + gap + t.width <= vw - m) side = "right";
5072
+ else if (side === "right" && r2.right + gap + t.width > vw - m && r2.left - t.width - gap >= m) side = "left";
5073
+ const clampX = function(x) {
5074
+ return Math.max(m, Math.min(x, vw - t.width - m));
5075
+ };
5076
+ const clampY = function(y) {
5077
+ return Math.max(m, Math.min(y, vh - t.height - m));
5078
+ };
5079
+ let top, left;
5080
+ if (side === "top" || side === "bottom") {
5081
+ top = clampY(side === "top" ? r2.top - t.height - gap : r2.bottom + gap);
5082
+ left = clampX(r2.left + r2.width / 2 - t.width / 2);
5083
+ } else {
5084
+ left = side === "left" ? r2.left - t.width - gap : r2.right + gap;
5085
+ left = clampX(left);
5086
+ top = clampY(r2.top + r2.height / 2 - t.height / 2);
5087
+ }
5088
+ pos[1]({ top, left });
5089
+ }
5090
+ useIsoLayoutEffect(
5091
+ function() {
5092
+ if (!open) return;
5093
+ place2();
5094
+ window.addEventListener("scroll", place2, true);
5095
+ window.addEventListener("resize", place2);
5096
+ return function() {
5097
+ window.removeEventListener("scroll", place2, true);
5098
+ window.removeEventListener("resize", place2);
5099
+ };
5100
+ },
5101
+ [open, mounted]
5102
+ );
5103
+ React29.useEffect(
5104
+ function() {
5105
+ if (!open) return;
5106
+ function esc(e) {
5107
+ if (e.key === "Escape") hide2();
5108
+ }
5109
+ document.addEventListener("keydown", esc);
5110
+ return function() {
5111
+ document.removeEventListener("keydown", esc);
5112
+ };
5113
+ },
5114
+ [open]
5115
+ );
5116
+ const child = React29.Children.only(props.children);
5117
+ const trigger = /* @__PURE__ */ React29.createElement(
5118
+ "span",
5119
+ {
5120
+ ref: anchorMerged,
5121
+ className: "aura-tooltip-anchor",
5122
+ onMouseEnter: function() {
5123
+ show3(false);
5124
+ },
5125
+ onMouseLeave: hideSoon2,
5126
+ onFocus: function() {
5127
+ show3(true);
5128
+ },
5129
+ onBlur: hide2
5130
+ },
5131
+ React29.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
5132
+ );
5133
+ return /* @__PURE__ */ React29.createElement(React29.Fragment, null, trigger, open && mounted ? (0, import_react_dom8.createPortal)(
5134
+ /* @__PURE__ */ React29.createElement(
5135
+ "div",
5136
+ {
5137
+ ref: tip2,
5138
+ id,
5139
+ role: "tooltip",
5140
+ onMouseEnter: function() {
5141
+ clearTimeout(timer2.current);
5142
+ },
5143
+ onMouseLeave: hideSoon2,
5144
+ className: "aura-tooltip aura-tooltip--hoverable",
5145
+ style: { top: pos[0] ? pos[0].top : -9999, left: pos[0] ? pos[0].left : -9999 }
5146
+ },
5147
+ props.content
5148
+ ),
5149
+ document.body
5150
+ ) : null);
5151
+ });
5152
+
5153
+ // src/Tag.tsx
5154
+ function textOf2(node, all) {
5155
+ if (node == null || typeof node === "boolean") return "";
5156
+ if (typeof node === "string" || typeof node === "number") return String(node);
5157
+ if (Array.isArray(node))
5158
+ return node.map(function(n3) {
5159
+ return textOf2(n3, all);
5160
+ }).join("");
5161
+ if (React30.isValidElement(node)) {
5162
+ const p = node.props;
5163
+ return !all && (p["aria-hidden"] === true || p["aria-hidden"] === "true") ? "" : textOf2(p.children, all);
5164
+ }
5165
+ return "";
5166
+ }
5167
+ var Tag = React30.forwardRef(function Tag2(props, ref) {
5168
+ const t = useStrings();
5169
+ const selectable = props.onClick != null || props.selected != null;
5170
+ const rest = omit(props, [
5171
+ "onRemove",
5172
+ "selected",
5173
+ "icon",
5174
+ "className",
5175
+ "children",
5176
+ "disabled",
5177
+ "removeLabel",
4867
5178
  "touchHeight"
4868
5179
  ]);
4869
- const textRef = React28.useRef(null);
5180
+ const textRef = React30.useRef(null);
4870
5181
  useAutoTip();
4871
- const cutState = React28.useState(false), isCut = cutState[0];
4872
- const check = React28.useCallback(function() {
5182
+ const cutState = React30.useState(false), isCut = cutState[0];
5183
+ const check = React30.useCallback(function() {
4873
5184
  const el = textRef.current;
4874
5185
  if (el) cutState[1](el.scrollWidth > el.clientWidth + 1);
4875
5186
  }, []);
@@ -4888,11 +5199,11 @@ window.Aura = (() => {
4888
5199
  );
4889
5200
  const fullText = isCut ? textOf2(props.children, true).replace(/\s+/g, " ").trim() : "";
4890
5201
  const inner = [
4891
- props.icon ? /* @__PURE__ */ React28.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
4892
- /* @__PURE__ */ React28.createElement("span", { key: "t", ref: textRef, className: "aura-tag__text", "data-aura-tip": fullText || void 0 }, props.children)
5202
+ props.icon ? /* @__PURE__ */ React30.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
5203
+ /* @__PURE__ */ React30.createElement("span", { key: "t", ref: textRef, className: "aura-tag__text", "data-aura-tip": fullText || void 0 }, props.children)
4893
5204
  ];
4894
5205
  if (selectable) {
4895
- return /* @__PURE__ */ React28.createElement(
5206
+ return /* @__PURE__ */ React30.createElement(
4896
5207
  "button",
4897
5208
  {
4898
5209
  ...rest,
@@ -4907,7 +5218,7 @@ window.Aura = (() => {
4907
5218
  props.className
4908
5219
  )
4909
5220
  },
4910
- props.selected ? /* @__PURE__ */ React28.createElement(Icon, { name: /* @__PURE__ */ React28.createElement(IconCheck, null), size: 14 }) : inner[0],
5221
+ props.selected ? /* @__PURE__ */ React30.createElement(Icon, { name: /* @__PURE__ */ React30.createElement(IconCheck, null), size: 14 }) : inner[0],
4911
5222
  inner[1]
4912
5223
  );
4913
5224
  }
@@ -4917,8 +5228,8 @@ window.Aura = (() => {
4917
5228
  "tag-remove-label",
4918
5229
  'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
4919
5230
  );
4920
- return /* @__PURE__ */ React28.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? function() {
4921
- const btn = /* @__PURE__ */ React28.createElement(
5231
+ return /* @__PURE__ */ React30.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? function() {
5232
+ const btn = /* @__PURE__ */ React30.createElement(
4922
5233
  "button",
4923
5234
  {
4924
5235
  type: "button",
@@ -4926,23 +5237,41 @@ window.Aura = (() => {
4926
5237
  "aria-label": props.removeLabel || t.remove(name),
4927
5238
  onClick: props.onRemove
4928
5239
  },
4929
- /* @__PURE__ */ React28.createElement(Icon, { name: /* @__PURE__ */ React28.createElement(IconX, null), size: 14 })
5240
+ /* @__PURE__ */ React30.createElement(Icon, { name: /* @__PURE__ */ React30.createElement(IconX, null), size: 14 })
4930
5241
  );
4931
- return /* @__PURE__ */ React28.createElement(Tooltip, { content: fullText, open: fullText ? void 0 : false }, btn);
5242
+ return /* @__PURE__ */ React30.createElement(Tooltip, { content: fullText, open: fullText ? void 0 : false }, btn);
4932
5243
  }() : null);
4933
5244
  });
4934
5245
 
5246
+ // src/breakpoints.ts
5247
+ var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
5248
+ var ORDER = ["base", "sm", "md", "lg", "xl"];
5249
+ function respVars(prefix, value, map2) {
5250
+ const style = {};
5251
+ if (value == null) return style;
5252
+ if (typeof value !== "object") value = { base: value };
5253
+ let byBp = value, cur2;
5254
+ ORDER.forEach(function(k) {
5255
+ if (byBp[k] !== void 0) cur2 = map2 ? map2(byBp[k]) : byBp[k];
5256
+ if (cur2 !== void 0) style["--" + prefix + "-" + k] = cur2;
5257
+ });
5258
+ return style;
5259
+ }
5260
+ var space = function(v) {
5261
+ return typeof v === "number" ? "var(--aura-space-" + v + ")" : v;
5262
+ };
5263
+
4935
5264
  // src/FilterBar.tsx
4936
- var FilterBar = React29.forwardRef(function FilterBar2(props, ref) {
5265
+ var FilterBar = React31.forwardRef(function FilterBar2(props, ref) {
4937
5266
  const t = useStrings();
4938
5267
  const id = uid();
4939
5268
  const hasSearch = !!props.onSearchChange;
4940
- const draft = React29.useState(props.search || "");
4941
- const timer2 = React29.useRef(null);
4942
- const sent = React29.useRef(props.search || "");
4943
- const onChange = React29.useRef(props.onSearchChange);
5269
+ const draft = React31.useState(props.search || "");
5270
+ const timer2 = React31.useRef(null);
5271
+ const sent = React31.useRef(props.search || "");
5272
+ const onChange = React31.useRef(props.onSearchChange);
4944
5273
  onChange.current = props.onSearchChange;
4945
- React29.useEffect(
5274
+ React31.useEffect(
4946
5275
  function() {
4947
5276
  if ((props.search || "") !== sent.current) {
4948
5277
  sent.current = props.search || "";
@@ -4951,7 +5280,7 @@ window.Aura = (() => {
4951
5280
  },
4952
5281
  [props.search]
4953
5282
  );
4954
- React29.useEffect(function() {
5283
+ React31.useEffect(function() {
4955
5284
  return function() {
4956
5285
  if (timer2.current) clearTimeout(timer2.current);
4957
5286
  };
@@ -4974,167 +5303,172 @@ window.Aura = (() => {
4974
5303
  );
4975
5304
  }
4976
5305
  const filters = props.filters || [];
4977
- const anything = filters.length > 0 || !!(props.search || draft[0]);
4978
- const count = props.resultCount == null ? null : typeof props.resultCount === "number" ? t.results(props.resultCount) : props.resultCount;
4979
- return /* @__PURE__ */ React29.createElement(
4980
- "div",
4981
- {
4982
- ref,
4983
- role: "region",
4984
- "aria-label": props.label || t.filters,
4985
- className: cx(
4986
- "aura-filterbar",
4987
- props.searchGrow && "aura-filterbar--grow",
4988
- props.controlsLayout === "fill" && "aura-filterbar--fill",
4989
- props.stackBelow === "lg" && "aura-filterbar--stack-lg",
4990
- touchClass(props.touchHeight),
4991
- props.className
4992
- )
4993
- },
4994
- /* @__PURE__ */ React29.createElement("div", { className: "aura-filterbar__row" }, hasSearch ? /* @__PURE__ */ React29.createElement("div", { className: "aura-input has-icon aura-filterbar__search" }, /* @__PURE__ */ React29.createElement(Icon, { name: /* @__PURE__ */ React29.createElement(IconSearch, null), className: "aura-input__icon" }), /* @__PURE__ */ React29.createElement(
4995
- "input",
4996
- {
4997
- id,
4998
- type: "search",
4999
- className: "aura-input__control",
5000
- "aria-label": props.searchLabel || t.search,
5001
- placeholder: props.searchPlaceholder || props.searchLabel || t.search,
5002
- value: draft[0],
5003
- onChange: function(e) {
5004
- type(e.target.value);
5005
- },
5006
- onKeyDown: function(e) {
5007
- if (e.key === "Enter") send(draft[0]);
5008
- if (e.key === "Escape" && draft[0]) {
5009
- e.preventDefault();
5010
- draft[1]("");
5011
- send("");
5012
- }
5013
- }
5014
- }
5015
- ), draft[0] ? /* @__PURE__ */ React29.createElement(
5016
- IconButton,
5017
- {
5018
- icon: /* @__PURE__ */ React29.createElement(IconX, null),
5019
- label: t.clear((props.searchLabel || t.search).toLowerCase()),
5020
- className: "aura-filterbar__clear-search",
5021
- onClick: function() {
5022
- draft[1]("");
5023
- send("");
5024
- }
5025
- }
5026
- ) : null) : null, props.children ? /* @__PURE__ */ React29.createElement("div", { className: "aura-filterbar__controls" }, props.children) : null, /* @__PURE__ */ React29.createElement("span", { className: "aura-filterbar__spacer" }), count != null ? /* @__PURE__ */ React29.createElement("span", { className: "aura-filterbar__count", "aria-live": "polite" }, count) : null, props.actions ? /* @__PURE__ */ React29.createElement("div", { className: "aura-filterbar__actions" }, props.actions) : null),
5027
- filters.length || props.onClearAll && anything ? /* @__PURE__ */ React29.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
5028
- return /* @__PURE__ */ React29.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
5029
- }), props.onClearAll && anything ? /* @__PURE__ */ React29.createElement(
5030
- "button",
5031
- {
5032
- type: "button",
5033
- className: "aura-filterbar__clear",
5034
- onClick: function() {
5035
- draft[1]("");
5036
- sent.current = "";
5037
- if (timer2.current) clearTimeout(timer2.current);
5038
- props.onClearAll();
5039
- }
5040
- },
5041
- t.clearFilters
5042
- ) : null) : null
5043
- );
5044
- });
5045
-
5046
- // src/Command.tsx
5047
- var React31 = __toESM(require_react(), 1);
5048
- var import_react_dom8 = __toESM(require_react_dom(), 1);
5049
-
5050
- // src/useModal.tsx
5051
- var React30 = __toESM(require_react(), 1);
5052
- var locks = 0;
5053
- var savedOverflow = "";
5054
- function lockScroll() {
5055
- const body = document.body;
5056
- if (locks === 0) savedOverflow = body.style.overflow;
5057
- locks++;
5058
- body.style.overflow = "hidden";
5059
- let done = false;
5060
- return function() {
5061
- if (done) return;
5062
- done = true;
5063
- locks--;
5064
- if (locks === 0) body.style.overflow = savedOverflow;
5065
- };
5066
- }
5067
- function tabbable(el) {
5068
- const all = Array.prototype.filter.call(el.querySelectorAll(FOCUSABLE), function(c) {
5069
- return c.tabIndex >= 0;
5070
- });
5071
- const shown = all.filter(function(c) {
5072
- return c.getClientRects().length > 0;
5073
- });
5074
- return shown.length ? shown : all;
5075
- }
5076
- function useModal(open, ref, opts) {
5077
- const mounted = useMounted();
5078
- const prev = React30.useRef(null);
5079
- const o = opts || {};
5080
- const latest = React30.useRef(o);
5081
- latest.current = o;
5082
- React30.useEffect(
5306
+ const hasChildren = React31.Children.toArray(props.children).length > 0;
5307
+ const collapse = props.collapseBelow && hasChildren ? props.collapseBelow : null;
5308
+ const sheet = React31.useState(false), open = !!collapse && sheet[0];
5309
+ const sheetId = id + "-filters";
5310
+ const doneRef = React31.useRef(null), moreRef = React31.useRef(null), own = React31.useRef(null), rootRef = useMergedRef(ref, own);
5311
+ if (collapse)
5312
+ React31.Children.forEach(props.children, function(c) {
5313
+ if (!React31.isValidElement(c) || c.type === Button || c.type === IconButton) return;
5314
+ const p = c.props;
5315
+ if (p.defaultValue !== void 0 || p.defaultChecked !== void 0 || "label" in p && !("value" in p) && !("selected" in p) && !("checked" in p))
5316
+ devWarnOnce(
5317
+ "filterbar-uncontrolled",
5318
+ "FilterBar collapseBelow: a filter without `value` resets when the Filters sheet opens or closes (its children move there and back). Keep each filter's value with the page: `value` + `onChange`."
5319
+ );
5320
+ });
5321
+ function backTo() {
5322
+ const m = moreRef.current;
5323
+ if (m && m.getClientRects().length) return m;
5324
+ const bar = own.current;
5325
+ if (!bar) return null;
5326
+ return bar.querySelector(
5327
+ '.aura-filterbar__controls :is(button, input, select, [tabindex]):not([disabled]):not([tabindex="-1"])'
5328
+ ) || bar.querySelector(".aura-filterbar__search input");
5329
+ }
5330
+ const applied = props.filterCount != null ? props.filterCount : filters.length;
5331
+ React31.useEffect(
5083
5332
  function() {
5084
- if (!open || !mounted) return;
5085
- prev.current = document.activeElement;
5086
- const unlock = lockScroll();
5087
- const el = ref.current;
5088
- const firstIn = function(scope) {
5089
- if (!scope || !el) return null;
5090
- const sel = FOCUSABLE.split(",").map(function(s) {
5091
- return scope + " " + s;
5092
- }).join(",");
5093
- const list = el.querySelectorAll(sel);
5094
- for (let i = 0; i < list.length; i++)
5095
- if (list[i].tabIndex >= 0 && list[i].getClientRects().length > 0) return list[i];
5096
- return null;
5097
- };
5098
- const target = el && (el.querySelector("[data-autofocus]") || firstIn(o.bodySelector) || firstIn(o.footSelector) || el);
5099
- if (target && o.autoFocus !== false) target.focus();
5333
+ if (!open || !collapse || typeof window.matchMedia !== "function") return;
5334
+ const mq = window.matchMedia("(min-width: " + breakpoints[collapse] + "px)");
5335
+ function check() {
5336
+ if (mq.matches) sheet[1](false);
5337
+ }
5338
+ check();
5339
+ if (mq.addEventListener) mq.addEventListener("change", check);
5340
+ else mq.addListener(check);
5100
5341
  return function() {
5101
- unlock();
5102
- const l = latest.current;
5103
- const ff = l.finalFocus;
5104
- const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
5105
- const back = to && to.isConnected ? to : prev.current;
5106
- if (back && back.focus) back.focus();
5107
- if (l.onCloseComplete) l.onCloseComplete();
5342
+ if (mq.removeEventListener) mq.removeEventListener("change", check);
5343
+ else mq.removeListener(check);
5108
5344
  };
5109
5345
  },
5110
- [open, mounted]
5111
- );
5112
- function onKeyDown(e) {
5113
- if (e.key === "Escape") {
5114
- e.stopPropagation();
5115
- if (o.onEscape) o.onEscape();
5116
- return;
5117
- }
5118
- if (e.key !== "Tab" || !ref.current || e.defaultPrevented) return;
5119
- if (!ref.current.contains(e.target)) return;
5120
- const list = tabbable(ref.current);
5121
- if (!list.length) {
5122
- e.preventDefault();
5123
- return;
5346
+ [open, collapse]
5347
+ );
5348
+ function clearAll() {
5349
+ draft[1]("");
5350
+ sent.current = "";
5351
+ if (timer2.current) clearTimeout(timer2.current);
5352
+ props.onClearAll();
5353
+ }
5354
+ const anything = filters.length > 0 || !!(props.search || draft[0]);
5355
+ const count = props.resultCount == null ? null : typeof props.resultCount === "number" ? t.results(props.resultCount) : props.resultCount;
5356
+ const searchBox = hasSearch ? /* @__PURE__ */ React31.createElement("div", { className: "aura-input has-icon aura-filterbar__search" }, /* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconSearch, null), className: "aura-input__icon" }), /* @__PURE__ */ React31.createElement(
5357
+ "input",
5358
+ {
5359
+ id,
5360
+ type: "search",
5361
+ className: "aura-input__control",
5362
+ "aria-label": props.searchLabel || t.search,
5363
+ placeholder: props.searchPlaceholder || props.searchLabel || t.search,
5364
+ value: draft[0],
5365
+ onChange: function(e) {
5366
+ type(e.target.value);
5367
+ },
5368
+ onKeyDown: function(e) {
5369
+ if (e.key === "Enter") send(draft[0]);
5370
+ if (e.key === "Escape" && draft[0]) {
5371
+ e.preventDefault();
5372
+ draft[1]("");
5373
+ send("");
5374
+ }
5375
+ }
5124
5376
  }
5125
- const first = list[0], last = list[list.length - 1], active = document.activeElement, stray = active === ref.current;
5126
- if (e.shiftKey && (active === first || stray)) {
5127
- e.preventDefault();
5128
- last.focus();
5129
- } else if (!e.shiftKey && (active === last || stray)) {
5130
- e.preventDefault();
5131
- first.focus();
5377
+ ), draft[0] ? /* @__PURE__ */ React31.createElement(
5378
+ IconButton,
5379
+ {
5380
+ icon: /* @__PURE__ */ React31.createElement(IconX, null),
5381
+ label: t.clear((props.searchLabel || t.search).toLowerCase()),
5382
+ className: "aura-filterbar__clear-search",
5383
+ onClick: function() {
5384
+ draft[1]("");
5385
+ send("");
5386
+ }
5132
5387
  }
5133
- }
5134
- return { ready: !!open && mounted, onKeyDown };
5135
- }
5388
+ ) : null) : null;
5389
+ const more = collapse ? /* @__PURE__ */ React31.createElement(
5390
+ Button,
5391
+ {
5392
+ ref: moreRef,
5393
+ variant: "secondary",
5394
+ icon: /* @__PURE__ */ React31.createElement(IconSlidersHorizontal, null),
5395
+ className: "aura-filterbar__more",
5396
+ "aria-haspopup": "dialog",
5397
+ "aria-expanded": open,
5398
+ "aria-controls": open ? sheetId : void 0,
5399
+ onClick: function() {
5400
+ sheet[1](true);
5401
+ }
5402
+ },
5403
+ applied > 0 ? /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement("span", { className: "aura-sr-only" }, t.filtersApplied(applied)), /* @__PURE__ */ React31.createElement("span", { "aria-hidden": true }, t.filters + " (" + applied + ")")) : t.filters
5404
+ ) : null;
5405
+ return /* @__PURE__ */ React31.createElement(
5406
+ "div",
5407
+ {
5408
+ ref: rootRef,
5409
+ role: "region",
5410
+ "aria-label": props.label || t.filters,
5411
+ className: cx(
5412
+ "aura-filterbar",
5413
+ props.searchGrow && "aura-filterbar--grow",
5414
+ props.controlsLayout === "fill" && "aura-filterbar--fill",
5415
+ props.stackBelow === "lg" && "aura-filterbar--stack-lg",
5416
+ collapse && "aura-filterbar--collapse-" + collapse,
5417
+ touchClass(props.touchHeight),
5418
+ props.className
5419
+ )
5420
+ },
5421
+ /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__row" }, collapse ? (
5422
+ /* 5.42: the search and the Filters button share a row of their own below the breakpoint (count and actions
5423
+ * wrap under them); from the breakpoint up this box is display: contents and the bar is as before. */
5424
+ /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__lead" }, searchBox, more)
5425
+ ) : searchBox, hasChildren && !open ? /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__controls" }, props.children) : null, /* @__PURE__ */ React31.createElement("span", { className: "aura-filterbar__spacer" }), count != null ? /* @__PURE__ */ React31.createElement("span", { className: "aura-filterbar__count", "aria-live": "polite" }, count) : null, props.actions ? /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__actions" }, props.actions) : null),
5426
+ filters.length || props.onClearAll && anything ? /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
5427
+ return /* @__PURE__ */ React31.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
5428
+ }), props.onClearAll && anything ? /* @__PURE__ */ React31.createElement("button", { type: "button", className: "aura-filterbar__clear", onClick: clearAll }, t.clearFilters) : null) : null,
5429
+ collapse ? /* @__PURE__ */ React31.createElement(
5430
+ Dialog,
5431
+ {
5432
+ open,
5433
+ onClose: function() {
5434
+ sheet[1](false);
5435
+ },
5436
+ id: sheetId,
5437
+ finalFocus: backTo,
5438
+ title: t.filters,
5439
+ size: "sm",
5440
+ className: "aura-filterbar__sheet",
5441
+ footer: /* @__PURE__ */ React31.createElement(React31.Fragment, null, props.onClearAll && filters.length ? /* @__PURE__ */ React31.createElement(
5442
+ Button,
5443
+ {
5444
+ variant: "secondary",
5445
+ touchHeight: true,
5446
+ onClick: function() {
5447
+ clearAll();
5448
+ if (doneRef.current) doneRef.current.focus();
5449
+ }
5450
+ },
5451
+ t.clearFilters
5452
+ ) : null, /* @__PURE__ */ React31.createElement(
5453
+ Button,
5454
+ {
5455
+ ref: doneRef,
5456
+ touchHeight: true,
5457
+ onClick: function() {
5458
+ sheet[1](false);
5459
+ }
5460
+ },
5461
+ t.done
5462
+ ))
5463
+ },
5464
+ /* @__PURE__ */ React31.createElement(FilterSheet.Provider, { value: true }, /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar aura-filterbar--sheet is-touch-always" }, props.children))
5465
+ ) : null
5466
+ );
5467
+ });
5136
5468
 
5137
5469
  // src/Command.tsx
5470
+ var React32 = __toESM(require_react(), 1);
5471
+ var import_react_dom9 = __toESM(require_react_dom(), 1);
5138
5472
  function isMac() {
5139
5473
  return typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
5140
5474
  }
@@ -5142,21 +5476,21 @@ window.Aura = (() => {
5142
5476
  const t = useStrings();
5143
5477
  const density = useDensity();
5144
5478
  const id = uid(), listId = id + "-list";
5145
- const box = React31.useRef(null);
5146
- const input = React31.useRef(null);
5147
- const qState = React31.useState(""), act = React31.useState(null);
5479
+ const box = React32.useRef(null);
5480
+ const input = React32.useRef(null);
5481
+ const qState = React32.useState(""), act = React32.useState(null);
5148
5482
  const query = props.query !== void 0 ? props.query : qState[0];
5149
5483
  function setQuery(v) {
5150
5484
  if (props.query === void 0) qState[1](v);
5151
5485
  if (props.onQueryChange) props.onQueryChange(v);
5152
5486
  }
5153
- const openRef = React31.useRef(props.open);
5487
+ const openRef = React32.useRef(props.open);
5154
5488
  openRef.current = props.open;
5155
5489
  const close = function() {
5156
5490
  props.onOpenChange(false);
5157
5491
  };
5158
5492
  const modal = useModal(props.open, box, { onEscape: close });
5159
- React31.useEffect(
5493
+ React32.useEffect(
5160
5494
  function() {
5161
5495
  if (props.hotkey === false) return;
5162
5496
  function onKey2(e) {
@@ -5172,7 +5506,7 @@ window.Aura = (() => {
5172
5506
  },
5173
5507
  [props.hotkey, props.onOpenChange]
5174
5508
  );
5175
- React31.useEffect(
5509
+ React32.useEffect(
5176
5510
  function() {
5177
5511
  if (!props.open) {
5178
5512
  if (query) setQuery("");
@@ -5212,7 +5546,7 @@ window.Aura = (() => {
5212
5546
  const optId = function(i2) {
5213
5547
  return id + "-o" + i2;
5214
5548
  };
5215
- React31.useEffect(
5549
+ React32.useEffect(
5216
5550
  function() {
5217
5551
  if (!box.current || active < 0) return;
5218
5552
  const el = box.current.querySelector("#" + CSS.escape(optId(active)));
@@ -5256,8 +5590,8 @@ window.Aura = (() => {
5256
5590
  }
5257
5591
  if (!modal.ready) return null;
5258
5592
  let i = -1;
5259
- return (0, import_react_dom8.createPortal)(
5260
- /* @__PURE__ */ React31.createElement(
5593
+ return (0, import_react_dom9.createPortal)(
5594
+ /* @__PURE__ */ React32.createElement(
5261
5595
  "div",
5262
5596
  {
5263
5597
  className: "aura-dialog-layer aura-command-layer",
@@ -5267,8 +5601,8 @@ window.Aura = (() => {
5267
5601
  e.stopPropagation();
5268
5602
  }
5269
5603
  },
5270
- /* @__PURE__ */ React31.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
5271
- /* @__PURE__ */ React31.createElement(
5604
+ /* @__PURE__ */ React32.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
5605
+ /* @__PURE__ */ React32.createElement(
5272
5606
  "div",
5273
5607
  {
5274
5608
  ref: box,
@@ -5278,7 +5612,7 @@ window.Aura = (() => {
5278
5612
  tabIndex: -1,
5279
5613
  className: cx("aura-command", props.className)
5280
5614
  },
5281
- /* @__PURE__ */ React31.createElement("div", { className: "aura-command__search" }, /* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconSearch, null), className: "aura-command__search-icon" }), /* @__PURE__ */ React31.createElement(
5615
+ /* @__PURE__ */ React32.createElement("div", { className: "aura-command__search" }, /* @__PURE__ */ React32.createElement(Icon, { name: /* @__PURE__ */ React32.createElement(IconSearch, null), className: "aura-command__search-icon" }), /* @__PURE__ */ React32.createElement(
5282
5616
  "input",
5283
5617
  {
5284
5618
  ref: input,
@@ -5301,8 +5635,8 @@ window.Aura = (() => {
5301
5635
  },
5302
5636
  onKeyDown: onKey
5303
5637
  }
5304
- ), /* @__PURE__ */ React31.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
5305
- /* @__PURE__ */ React31.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React31.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React31.createElement(Icon, { name: /* @__PURE__ */ React31.createElement(IconLoaderCircle, null), className: "aura-spin" }), t.searching) : null, !flat3.length ? props.loading ? null : /* @__PURE__ */ React31.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React31.createElement(
5638
+ ), /* @__PURE__ */ React32.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
5639
+ /* @__PURE__ */ React32.createElement("div", { className: "aura-command__list", "aria-busy": props.loading || void 0 }, props.loading ? /* @__PURE__ */ React32.createElement("div", { className: "aura-command__loading" }, /* @__PURE__ */ React32.createElement(Icon, { name: /* @__PURE__ */ React32.createElement(IconLoaderCircle, null), className: "aura-spin" }), t.searching) : null, !flat3.length ? props.loading ? null : /* @__PURE__ */ React32.createElement("div", { className: "aura-command__empty" }, props.empty != null ? props.empty : props.emptyText || t.noMatches) : /* @__PURE__ */ React32.createElement(
5306
5640
  "div",
5307
5641
  {
5308
5642
  id: listId,
@@ -5312,7 +5646,7 @@ window.Aura = (() => {
5312
5646
  },
5313
5647
  groups.map(function(g, gi) {
5314
5648
  const gid = id + "-g" + gi;
5315
- return /* @__PURE__ */ React31.createElement(
5649
+ return /* @__PURE__ */ React32.createElement(
5316
5650
  "div",
5317
5651
  {
5318
5652
  key: g.name || gi,
@@ -5320,11 +5654,11 @@ window.Aura = (() => {
5320
5654
  "aria-labelledby": g.name ? gid : void 0,
5321
5655
  className: "aura-command__group"
5322
5656
  },
5323
- g.name ? /* @__PURE__ */ React31.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
5657
+ g.name ? /* @__PURE__ */ React32.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
5324
5658
  g.items.map(function(it) {
5325
5659
  i++;
5326
5660
  const n3 = i;
5327
- return /* @__PURE__ */ React31.createElement(
5661
+ return /* @__PURE__ */ React32.createElement(
5328
5662
  "div",
5329
5663
  {
5330
5664
  key: it.id,
@@ -5348,210 +5682,22 @@ window.Aura = (() => {
5348
5682
  run(it);
5349
5683
  }
5350
5684
  },
5351
- it.icon ? /* @__PURE__ */ React31.createElement(Icon, { name: it.icon }) : null,
5352
- /* @__PURE__ */ React31.createElement("span", { className: "aura-command__text" }, /* @__PURE__ */ React31.createElement("span", { className: "aura-command__label", id: it.description ? optId(n3) + "-label" : void 0 }, it.label), it.description ? /* @__PURE__ */ React31.createElement("span", { className: "aura-command__desc", id: optId(n3) + "-desc", "aria-hidden": true }, it.description) : null),
5353
- it.shortcut ? /* @__PURE__ */ React31.createElement("kbd", { className: "aura-command__kbd", id: it.description ? optId(n3) + "-kbd" : void 0 }, it.shortcut) : null
5685
+ it.icon ? /* @__PURE__ */ React32.createElement(Icon, { name: it.icon }) : null,
5686
+ /* @__PURE__ */ React32.createElement("span", { className: "aura-command__text" }, /* @__PURE__ */ React32.createElement("span", { className: "aura-command__label", id: it.description ? optId(n3) + "-label" : void 0 }, it.label), it.description ? /* @__PURE__ */ React32.createElement("span", { className: "aura-command__desc", id: optId(n3) + "-desc", "aria-hidden": true }, it.description) : null),
5687
+ it.shortcut ? /* @__PURE__ */ React32.createElement("kbd", { className: "aura-command__kbd", id: it.description ? optId(n3) + "-kbd" : void 0 }, it.shortcut) : null
5354
5688
  );
5355
5689
  })
5356
5690
  );
5357
5691
  })
5358
5692
  )),
5359
- /* @__PURE__ */ React31.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : query && !flat3.length ? t.noMatches : props.loading === false && query ? t.results(flat3.length) : ""),
5360
- /* @__PURE__ */ React31.createElement("div", { className: "aura-command__foot", "aria-hidden": true }, t.commandHint, /* @__PURE__ */ React31.createElement("span", { className: "aura-command__mod" }, isMac() ? "\u2318K" : "Ctrl K"))
5693
+ /* @__PURE__ */ React32.createElement("span", { className: "aura-sr-only", role: "status" }, props.loading ? t.searching : query && !flat3.length ? t.noMatches : props.loading === false && query ? t.results(flat3.length) : ""),
5694
+ /* @__PURE__ */ React32.createElement("div", { className: "aura-command__foot", "aria-hidden": true }, t.commandHint, /* @__PURE__ */ React32.createElement("span", { className: "aura-command__mod" }, isMac() ? "\u2318K" : "Ctrl K"))
5361
5695
  )
5362
5696
  ),
5363
5697
  document.body
5364
5698
  );
5365
5699
  }
5366
5700
 
5367
- // src/Dialog.tsx
5368
- var React32 = __toESM(require_react(), 1);
5369
- var import_react_dom9 = __toESM(require_react_dom(), 1);
5370
- var DialogClose = React32.createContext(null);
5371
- function useDialogClose() {
5372
- return React32.useContext(DialogClose) || function() {
5373
- };
5374
- }
5375
- var Dialog = React32.forwardRef(function Dialog2(props, ref) {
5376
- const t = useStrings();
5377
- const density = useDensity();
5378
- const own = React32.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
5379
- const openState = useMaybeControlled(props.open, false, null), open = openState[0];
5380
- if (props.open === void 0 && !props.trigger)
5381
- devWarnOnce("dialog-no-open", "Dialog has neither `open` nor `trigger`, so it can never open. Pass one of them.");
5382
- const trigId = uid();
5383
- function closeNow() {
5384
- if (props.open === void 0) openState[1](false);
5385
- if (props.onClose) props.onClose();
5386
- }
5387
- function close() {
5388
- if (props.dismissible === false) return;
5389
- closeNow();
5390
- }
5391
- const scrimCloses = props.dismissible !== false && (props.dismissOnScrim !== void 0 ? props.dismissOnScrim : props.role !== "alertdialog");
5392
- const modal = useModal(open, own, {
5393
- autoFocus: props.autoFocus,
5394
- onEscape: close,
5395
- bodySelector: ".aura-dialog__body",
5396
- footSelector: ".aura-dialog__foot",
5397
- /* With a trigger, focus goes back to it even where a click doesn't focus buttons (Safari). */
5398
- finalFocus: props.trigger ? function() {
5399
- const ff = props.finalFocus;
5400
- const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
5401
- return to || document.querySelector('[data-aura-trigger="' + trigId + '"]');
5402
- } : props.finalFocus,
5403
- onCloseComplete: props.onCloseComplete
5404
- });
5405
- const trig = props.trigger;
5406
- const trigger = trig && React32.isValidElement(trig) ? React32.cloneElement(trig, {
5407
- "aria-haspopup": "dialog",
5408
- "aria-expanded": open,
5409
- "data-aura-trigger": trigId,
5410
- onClick: function(e) {
5411
- const own2 = trig.props.onClick;
5412
- if (own2) own2(e);
5413
- if (e.defaultPrevented) return;
5414
- if (props.open === void 0) openState[1](true);
5415
- if (props.onOpen) props.onOpen();
5416
- }
5417
- }) : null;
5418
- if (!modal.ready) return trigger;
5419
- const rest = omit(props, [
5420
- "open",
5421
- "onClose",
5422
- "title",
5423
- "description",
5424
- "children",
5425
- "footer",
5426
- "size",
5427
- "dismissible",
5428
- "dismissOnScrim",
5429
- "role",
5430
- "autoFocus",
5431
- "className",
5432
- "trigger",
5433
- "onOpen",
5434
- "finalFocus",
5435
- "onCloseComplete",
5436
- "aria-labelledby",
5437
- "aria-describedby",
5438
- "aria-modal"
5439
- ]);
5440
- const panel = (0, import_react_dom9.createPortal)(
5441
- /* @__PURE__ */ React32.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React32.createElement(
5442
- "div",
5443
- {
5444
- className: "aura-scrim",
5445
- onClick: scrimCloses ? close : void 0,
5446
- onMouseDown: scrimCloses ? void 0 : function(e) {
5447
- e.preventDefault();
5448
- },
5449
- "aria-hidden": true
5450
- }
5451
- ), /* @__PURE__ */ React32.createElement(
5452
- "div",
5453
- {
5454
- ...rest,
5455
- ref: merged,
5456
- role: props.role || "dialog",
5457
- "aria-modal": true,
5458
- "aria-labelledby": titleId,
5459
- "aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
5460
- tabIndex: -1,
5461
- className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
5462
- },
5463
- /* @__PURE__ */ React32.createElement("div", { className: "aura-dialog__head" }, /* @__PURE__ */ React32.createElement("h2", { className: "aura-dialog__title", id: titleId }, props.title), props.dismissible !== false ? /* @__PURE__ */ React32.createElement(IconButton, { icon: /* @__PURE__ */ React32.createElement(IconX, null), label: t.close, className: "aura-dialog__close", onClick: close }) : null),
5464
- props.description ? /* @__PURE__ */ React32.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
5465
- /* @__PURE__ */ React32.createElement(DialogClose.Provider, { value: closeNow }, props.children ? /* @__PURE__ */ React32.createElement("div", { className: "aura-dialog__body" }, props.children) : null, props.footer ? /* @__PURE__ */ React32.createElement("div", { className: "aura-dialog__foot" }, props.footer) : null)
5466
- )),
5467
- document.body
5468
- );
5469
- return trigger ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, trigger, panel) : panel;
5470
- });
5471
- var Drawer = React32.forwardRef(function Drawer2(props, ref) {
5472
- const t = useStrings();
5473
- const density = useDensity();
5474
- const own = React32.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
5475
- function close() {
5476
- if (props.dismissible !== false && props.onClose) props.onClose();
5477
- }
5478
- const modal = useModal(props.open, own, {
5479
- autoFocus: props.autoFocus,
5480
- onEscape: close,
5481
- bodySelector: ".aura-drawer__body",
5482
- footSelector: ".aura-drawer__foot",
5483
- finalFocus: props.finalFocus,
5484
- onCloseComplete: props.onCloseComplete
5485
- });
5486
- if (!modal.ready) return null;
5487
- const side = props.side === "left" ? "left" : "right";
5488
- const rest = omit(props, [
5489
- "open",
5490
- "onClose",
5491
- "side",
5492
- "size",
5493
- "title",
5494
- "description",
5495
- "children",
5496
- "footer",
5497
- "dismissible",
5498
- "dismissOnScrim",
5499
- "autoFocus",
5500
- "aria-label",
5501
- "aria-describedby",
5502
- "aria-labelledby",
5503
- "className",
5504
- "closeLabel",
5505
- "closeProps",
5506
- "finalFocus",
5507
- "onCloseComplete"
5508
- ]);
5509
- const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
5510
- return (0, import_react_dom9.createPortal)(
5511
- /* @__PURE__ */ React32.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React32.createElement(
5512
- "div",
5513
- {
5514
- className: "aura-scrim",
5515
- onClick: drawerScrimCloses ? close : void 0,
5516
- onMouseDown: !drawerScrimCloses ? function(e) {
5517
- e.preventDefault();
5518
- } : void 0,
5519
- "aria-hidden": true
5520
- }
5521
- ), /* @__PURE__ */ React32.createElement(
5522
- "div",
5523
- {
5524
- ...rest,
5525
- ref: merged,
5526
- role: "dialog",
5527
- "aria-modal": true,
5528
- "aria-labelledby": props.title ? titleId : props["aria-labelledby"],
5529
- "aria-label": props.title ? void 0 : props["aria-label"],
5530
- "aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
5531
- tabIndex: -1,
5532
- className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
5533
- },
5534
- props.title || props.dismissible !== false ? /* @__PURE__ */ React32.createElement("div", { className: "aura-drawer__head" }, props.title ? /* @__PURE__ */ React32.createElement("h2", { className: "aura-drawer__title", id: titleId }, props.title) : /* @__PURE__ */ React32.createElement("span", { style: { flex: 1 } }), props.dismissible !== false ? /* @__PURE__ */ React32.createElement(
5535
- IconButton,
5536
- {
5537
- ...props.closeProps,
5538
- icon: /* @__PURE__ */ React32.createElement(IconX, null),
5539
- label: props.closeLabel || t.close,
5540
- onClick: function(e) {
5541
- const own2 = props.closeProps && props.closeProps.onClick;
5542
- if (own2) own2(e);
5543
- if (!e.defaultPrevented) close();
5544
- }
5545
- }
5546
- ) : null) : null,
5547
- props.description ? /* @__PURE__ */ React32.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
5548
- /* @__PURE__ */ React32.createElement("div", { className: "aura-drawer__body" }, props.children),
5549
- props.footer ? /* @__PURE__ */ React32.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
5550
- )),
5551
- document.body
5552
- );
5553
- });
5554
-
5555
5701
  // src/DataTable.tsx
5556
5702
  var React33 = __toESM(require_react(), 1);
5557
5703
  var import_react_dom10 = __toESM(require_react_dom(), 1);
@@ -7589,26 +7735,6 @@ window.Aura = (() => {
7589
7735
 
7590
7736
  // src/responsive.tsx
7591
7737
  var React39 = __toESM(require_react(), 1);
7592
-
7593
- // src/breakpoints.ts
7594
- var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
7595
- var ORDER = ["base", "sm", "md", "lg", "xl"];
7596
- function respVars(prefix, value, map2) {
7597
- const style = {};
7598
- if (value == null) return style;
7599
- if (typeof value !== "object") value = { base: value };
7600
- let byBp = value, cur2;
7601
- ORDER.forEach(function(k) {
7602
- if (byBp[k] !== void 0) cur2 = map2 ? map2(byBp[k]) : byBp[k];
7603
- if (cur2 !== void 0) style["--" + prefix + "-" + k] = cur2;
7604
- });
7605
- return style;
7606
- }
7607
- var space = function(v) {
7608
- return typeof v === "number" ? "var(--aura-space-" + v + ")" : v;
7609
- };
7610
-
7611
- // src/responsive.tsx
7612
7738
  var ORDER2 = ["base", "sm", "md", "lg", "xl"];
7613
7739
  function useBreakpoint() {
7614
7740
  return React39.useSyncExternalStore(subscribe, current, function() {