@jirawatpyk/aura-react 5.40.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.
- package/README.md +24 -2
- package/dist/aura.bundle.js +681 -544
- package/dist/cjs/index.cjs +681 -544
- package/dist/esm/AppShell.js +1 -0
- package/dist/esm/FilterBar.js +145 -48
- package/dist/esm/FilterDateRange.js +6 -2
- package/dist/esm/FilterSelect.js +13 -7
- package/dist/esm/Icon.js +1 -1
- package/dist/esm/Menu.js +4 -1
- package/dist/esm/PageHeader.js +4 -0
- package/dist/esm/icons.js +14 -1
- package/dist/esm/internal.js +2 -0
- package/dist/esm/strings.js +5 -0
- package/dist/esm/strings.sv.js +5 -0
- package/dist/esm/strings.th.js +5 -0
- package/dist/icons/index.cjs +14 -1
- package/dist/icons/index.d.cts +2 -1
- package/dist/icons/index.d.ts +2 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/locales/sv.cjs +5 -0
- package/dist/locales/sv.d.cts +6 -0
- package/dist/locales/sv.d.ts +6 -0
- package/dist/locales/th.cjs +5 -0
- package/dist/locales/th.d.cts +6 -0
- package/dist/locales/th.d.ts +6 -0
- package/dist/server/index.cjs +20 -1
- package/dist/server/index.d.cts +11 -1
- package/dist/server/index.d.ts +11 -1
- package/dist/server/index.js +20 -1
- package/dist/styles.css +53 -6
- package/dist/styles.layer.css +53 -6
- package/package.json +1 -1
package/dist/aura.bundle.js
CHANGED
|
@@ -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;
|
|
@@ -950,6 +962,11 @@ window.Aura = (() => {
|
|
|
950
962
|
statusMaintenance: "\u0E1B\u0E34\u0E14\u0E1B\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E38\u0E07",
|
|
951
963
|
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
952
964
|
statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
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",
|
|
953
970
|
accepts: function(list, max) {
|
|
954
971
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
955
972
|
}
|
|
@@ -1086,6 +1103,11 @@ window.Aura = (() => {
|
|
|
1086
1103
|
statusMaintenance: "Underh\xE5ll",
|
|
1087
1104
|
statusOk: "OK",
|
|
1088
1105
|
statusUnknown: "Ingen data",
|
|
1106
|
+
opensInNewTab: "\xF6ppnas i en ny flik",
|
|
1107
|
+
filtersApplied: function(n3) {
|
|
1108
|
+
return "Filter, " + n3.toLocaleString("sv-SE") + " aktiva";
|
|
1109
|
+
},
|
|
1110
|
+
done: "Klar",
|
|
1089
1111
|
accepts: function(list, max) {
|
|
1090
1112
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
1091
1113
|
}
|
|
@@ -1223,6 +1245,11 @@ window.Aura = (() => {
|
|
|
1223
1245
|
statusMaintenance: "Maintenance",
|
|
1224
1246
|
statusOk: "OK",
|
|
1225
1247
|
statusUnknown: "No data",
|
|
1248
|
+
opensInNewTab: "opens in a new tab",
|
|
1249
|
+
filtersApplied: function(n3) {
|
|
1250
|
+
return "Filters, " + n3.toLocaleString("en") + " applied";
|
|
1251
|
+
},
|
|
1252
|
+
done: "Done",
|
|
1226
1253
|
accepts: function(list, max) {
|
|
1227
1254
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
1228
1255
|
}
|
|
@@ -1624,6 +1651,7 @@ window.Aura = (() => {
|
|
|
1624
1651
|
const headerId = uid(), itemId = uid();
|
|
1625
1652
|
const hasHeader = props.header != null && props.header !== false && props.header !== "";
|
|
1626
1653
|
const Link = useLinkComponent(props.linkComponent);
|
|
1654
|
+
const t = useStrings();
|
|
1627
1655
|
function place2() {
|
|
1628
1656
|
const a = props.anchor, m = own.current;
|
|
1629
1657
|
if (!a || !m) return;
|
|
@@ -1750,6 +1778,8 @@ window.Aura = (() => {
|
|
|
1750
1778
|
if (reasonId)
|
|
1751
1779
|
body[2] = /* Hidden from the name (it would be read twice); aria-describedby still reads it. */
|
|
1752
1780
|
/* @__PURE__ */ React9.createElement("span", { key: "h", id: reasonId, className: "aura-menu__hint aura-menu__reason", "aria-hidden": true }, it.disabledReason);
|
|
1781
|
+
if (it.href && !it.disabled && it.target === "_blank")
|
|
1782
|
+
body[1] = /* @__PURE__ */ React9.createElement("span", { key: "t", className: "aura-menu__label" }, it.label, /* @__PURE__ */ React9.createElement("span", { className: "aura-sr-only" }, " (" + t.opensInNewTab + ")"));
|
|
1753
1783
|
if (it.href && !it.disabled)
|
|
1754
1784
|
return /* @__PURE__ */ React9.createElement(
|
|
1755
1785
|
Link,
|
|
@@ -2721,12 +2751,18 @@ window.Aura = (() => {
|
|
|
2721
2751
|
var React17 = __toESM(require_react(), 1);
|
|
2722
2752
|
var FilterSelect = React17.forwardRef(function FilterSelect2(props, ref) {
|
|
2723
2753
|
const onChange = props.onChange;
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
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
|
+
);
|
|
2730
2766
|
return /* @__PURE__ */ React17.createElement(Select, { ...pass, ref });
|
|
2731
2767
|
});
|
|
2732
2768
|
|
|
@@ -3582,6 +3618,7 @@ window.Aura = (() => {
|
|
|
3582
3618
|
const anyLabel = props.anyLabel || dt.anyTime;
|
|
3583
3619
|
const value = v.start && v.end ? formatDateRange(v.start, v.end, { locale, calendar }) : anyLabel;
|
|
3584
3620
|
const setFace = useMergedRef(ref, faceRef);
|
|
3621
|
+
const inSheet = React19.useContext(FilterSheet);
|
|
3585
3622
|
const limits = {
|
|
3586
3623
|
min: props.min,
|
|
3587
3624
|
max: props.max,
|
|
@@ -3682,7 +3719,7 @@ window.Aura = (() => {
|
|
|
3682
3719
|
),
|
|
3683
3720
|
document.body
|
|
3684
3721
|
) : null;
|
|
3685
|
-
|
|
3722
|
+
const box = /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
3686
3723
|
"div",
|
|
3687
3724
|
{
|
|
3688
3725
|
ref: boxRef,
|
|
@@ -3690,6 +3727,7 @@ window.Aura = (() => {
|
|
|
3690
3727
|
"aura-filterselect",
|
|
3691
3728
|
pop.open && "is-open",
|
|
3692
3729
|
props.disabled && "is-disabled",
|
|
3730
|
+
inSheet && "aura-filterselect--sheet",
|
|
3693
3731
|
touchClass(props.touchHeight),
|
|
3694
3732
|
props.className
|
|
3695
3733
|
)
|
|
@@ -3718,6 +3756,8 @@ window.Aura = (() => {
|
|
|
3718
3756
|
/* @__PURE__ */ React19.createElement(Icon, { name: /* @__PURE__ */ React19.createElement(IconChevronDown, null), className: "aura-filterselect__chevron" })
|
|
3719
3757
|
)
|
|
3720
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);
|
|
3721
3761
|
}
|
|
3722
3762
|
);
|
|
3723
3763
|
|
|
@@ -4708,162 +4748,439 @@ window.Aura = (() => {
|
|
|
4708
4748
|
);
|
|
4709
4749
|
|
|
4710
4750
|
// src/FilterBar.tsx
|
|
4711
|
-
var
|
|
4751
|
+
var React31 = __toESM(require_react(), 1);
|
|
4712
4752
|
|
|
4713
|
-
// src/
|
|
4753
|
+
// src/Dialog.tsx
|
|
4714
4754
|
var React28 = __toESM(require_react(), 1);
|
|
4755
|
+
var import_react_dom7 = __toESM(require_react_dom(), 1);
|
|
4715
4756
|
|
|
4716
|
-
// src/
|
|
4757
|
+
// src/useModal.tsx
|
|
4717
4758
|
var React27 = __toESM(require_react(), 1);
|
|
4718
|
-
var
|
|
4719
|
-
var
|
|
4720
|
-
|
|
4721
|
-
const
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
);
|
|
4731
|
-
}
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
if (!anchor.current || !tip2.current) return;
|
|
4749
|
-
const r2 = anchor.current.getBoundingClientRect(), t = tip2.current.getBoundingClientRect();
|
|
4750
|
-
const vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
|
|
4751
|
-
let side = props.side || "top";
|
|
4752
|
-
if (side === "top" && r2.top - t.height - gap < m && r2.bottom + gap + t.height <= vh - m) side = "bottom";
|
|
4753
|
-
else if (side === "bottom" && r2.bottom + gap + t.height > vh - m && r2.top - t.height - gap >= m) side = "top";
|
|
4754
|
-
else if (side === "left" && r2.left - t.width - gap < m && r2.right + gap + t.width <= vw - m) side = "right";
|
|
4755
|
-
else if (side === "right" && r2.right + gap + t.width > vw - m && r2.left - t.width - gap >= m) side = "left";
|
|
4756
|
-
const clampX = function(x) {
|
|
4757
|
-
return Math.max(m, Math.min(x, vw - t.width - m));
|
|
4758
|
-
};
|
|
4759
|
-
const clampY = function(y) {
|
|
4760
|
-
return Math.max(m, Math.min(y, vh - t.height - m));
|
|
4761
|
-
};
|
|
4762
|
-
let top, left;
|
|
4763
|
-
if (side === "top" || side === "bottom") {
|
|
4764
|
-
top = clampY(side === "top" ? r2.top - t.height - gap : r2.bottom + gap);
|
|
4765
|
-
left = clampX(r2.left + r2.width / 2 - t.width / 2);
|
|
4766
|
-
} else {
|
|
4767
|
-
left = side === "left" ? r2.left - t.width - gap : r2.right + gap;
|
|
4768
|
-
left = clampX(left);
|
|
4769
|
-
top = clampY(r2.top + r2.height / 2 - t.height / 2);
|
|
4770
|
-
}
|
|
4771
|
-
pos[1]({ top, left });
|
|
4772
|
-
}
|
|
4773
|
-
useIsoLayoutEffect(
|
|
4774
|
-
function() {
|
|
4775
|
-
if (!open) return;
|
|
4776
|
-
place2();
|
|
4777
|
-
window.addEventListener("scroll", place2, true);
|
|
4778
|
-
window.addEventListener("resize", place2);
|
|
4779
|
-
return function() {
|
|
4780
|
-
window.removeEventListener("scroll", place2, true);
|
|
4781
|
-
window.removeEventListener("resize", place2);
|
|
4782
|
-
};
|
|
4783
|
-
},
|
|
4784
|
-
[open, mounted]
|
|
4785
|
-
);
|
|
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;
|
|
4786
4789
|
React27.useEffect(
|
|
4787
4790
|
function() {
|
|
4788
|
-
if (!open) return;
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
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();
|
|
4793
4807
|
return function() {
|
|
4794
|
-
|
|
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();
|
|
4795
4815
|
};
|
|
4796
4816
|
},
|
|
4797
|
-
[open]
|
|
4798
|
-
);
|
|
4799
|
-
const child = React27.Children.only(props.children);
|
|
4800
|
-
const trigger = /* @__PURE__ */ React27.createElement(
|
|
4801
|
-
"span",
|
|
4802
|
-
{
|
|
4803
|
-
ref: anchorMerged,
|
|
4804
|
-
className: "aura-tooltip-anchor",
|
|
4805
|
-
onMouseEnter: function() {
|
|
4806
|
-
show3(false);
|
|
4807
|
-
},
|
|
4808
|
-
onMouseLeave: hideSoon2,
|
|
4809
|
-
onFocus: function() {
|
|
4810
|
-
show3(true);
|
|
4811
|
-
},
|
|
4812
|
-
onBlur: hide2
|
|
4813
|
-
},
|
|
4814
|
-
React27.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
|
|
4817
|
+
[open, mounted]
|
|
4815
4818
|
);
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
function textOf2(node, all) {
|
|
4838
|
-
if (node == null || typeof node === "boolean") return "";
|
|
4839
|
-
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
4840
|
-
if (Array.isArray(node))
|
|
4841
|
-
return node.map(function(n3) {
|
|
4842
|
-
return textOf2(n3, all);
|
|
4843
|
-
}).join("");
|
|
4844
|
-
if (React28.isValidElement(node)) {
|
|
4845
|
-
const p = node.props;
|
|
4846
|
-
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
|
+
}
|
|
4847
4840
|
}
|
|
4848
|
-
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
|
+
};
|
|
4849
4849
|
}
|
|
4850
|
-
var
|
|
4850
|
+
var Dialog = React28.forwardRef(function Dialog2(props, ref) {
|
|
4851
4851
|
const t = useStrings();
|
|
4852
|
-
const
|
|
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;
|
|
4853
4894
|
const rest = omit(props, [
|
|
4854
|
-
"
|
|
4855
|
-
"
|
|
4856
|
-
"
|
|
4857
|
-
"
|
|
4858
|
-
"children",
|
|
4859
|
-
"
|
|
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",
|
|
4860
5177
|
"removeLabel",
|
|
4861
5178
|
"touchHeight"
|
|
4862
5179
|
]);
|
|
4863
|
-
const textRef =
|
|
5180
|
+
const textRef = React30.useRef(null);
|
|
4864
5181
|
useAutoTip();
|
|
4865
|
-
const cutState =
|
|
4866
|
-
const check =
|
|
5182
|
+
const cutState = React30.useState(false), isCut = cutState[0];
|
|
5183
|
+
const check = React30.useCallback(function() {
|
|
4867
5184
|
const el = textRef.current;
|
|
4868
5185
|
if (el) cutState[1](el.scrollWidth > el.clientWidth + 1);
|
|
4869
5186
|
}, []);
|
|
@@ -4882,11 +5199,11 @@ window.Aura = (() => {
|
|
|
4882
5199
|
);
|
|
4883
5200
|
const fullText = isCut ? textOf2(props.children, true).replace(/\s+/g, " ").trim() : "";
|
|
4884
5201
|
const inner = [
|
|
4885
|
-
props.icon ? /* @__PURE__ */
|
|
4886
|
-
/* @__PURE__ */
|
|
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)
|
|
4887
5204
|
];
|
|
4888
5205
|
if (selectable) {
|
|
4889
|
-
return /* @__PURE__ */
|
|
5206
|
+
return /* @__PURE__ */ React30.createElement(
|
|
4890
5207
|
"button",
|
|
4891
5208
|
{
|
|
4892
5209
|
...rest,
|
|
@@ -4901,7 +5218,7 @@ window.Aura = (() => {
|
|
|
4901
5218
|
props.className
|
|
4902
5219
|
)
|
|
4903
5220
|
},
|
|
4904
|
-
props.selected ? /* @__PURE__ */
|
|
5221
|
+
props.selected ? /* @__PURE__ */ React30.createElement(Icon, { name: /* @__PURE__ */ React30.createElement(IconCheck, null), size: 14 }) : inner[0],
|
|
4905
5222
|
inner[1]
|
|
4906
5223
|
);
|
|
4907
5224
|
}
|
|
@@ -4911,8 +5228,8 @@ window.Aura = (() => {
|
|
|
4911
5228
|
"tag-remove-label",
|
|
4912
5229
|
'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
|
|
4913
5230
|
);
|
|
4914
|
-
return /* @__PURE__ */
|
|
4915
|
-
const btn = /* @__PURE__ */
|
|
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(
|
|
4916
5233
|
"button",
|
|
4917
5234
|
{
|
|
4918
5235
|
type: "button",
|
|
@@ -4920,23 +5237,41 @@ window.Aura = (() => {
|
|
|
4920
5237
|
"aria-label": props.removeLabel || t.remove(name),
|
|
4921
5238
|
onClick: props.onRemove
|
|
4922
5239
|
},
|
|
4923
|
-
/* @__PURE__ */
|
|
5240
|
+
/* @__PURE__ */ React30.createElement(Icon, { name: /* @__PURE__ */ React30.createElement(IconX, null), size: 14 })
|
|
4924
5241
|
);
|
|
4925
|
-
return /* @__PURE__ */
|
|
5242
|
+
return /* @__PURE__ */ React30.createElement(Tooltip, { content: fullText, open: fullText ? void 0 : false }, btn);
|
|
4926
5243
|
}() : null);
|
|
4927
5244
|
});
|
|
4928
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
|
+
|
|
4929
5264
|
// src/FilterBar.tsx
|
|
4930
|
-
var FilterBar =
|
|
5265
|
+
var FilterBar = React31.forwardRef(function FilterBar2(props, ref) {
|
|
4931
5266
|
const t = useStrings();
|
|
4932
5267
|
const id = uid();
|
|
4933
5268
|
const hasSearch = !!props.onSearchChange;
|
|
4934
|
-
const draft =
|
|
4935
|
-
const timer2 =
|
|
4936
|
-
const sent =
|
|
4937
|
-
const onChange =
|
|
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);
|
|
4938
5273
|
onChange.current = props.onSearchChange;
|
|
4939
|
-
|
|
5274
|
+
React31.useEffect(
|
|
4940
5275
|
function() {
|
|
4941
5276
|
if ((props.search || "") !== sent.current) {
|
|
4942
5277
|
sent.current = props.search || "";
|
|
@@ -4945,7 +5280,7 @@ window.Aura = (() => {
|
|
|
4945
5280
|
},
|
|
4946
5281
|
[props.search]
|
|
4947
5282
|
);
|
|
4948
|
-
|
|
5283
|
+
React31.useEffect(function() {
|
|
4949
5284
|
return function() {
|
|
4950
5285
|
if (timer2.current) clearTimeout(timer2.current);
|
|
4951
5286
|
};
|
|
@@ -4968,167 +5303,172 @@ window.Aura = (() => {
|
|
|
4968
5303
|
);
|
|
4969
5304
|
}
|
|
4970
5305
|
const filters = props.filters || [];
|
|
4971
|
-
const
|
|
4972
|
-
const
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
onChange: function(e) {
|
|
4998
|
-
type(e.target.value);
|
|
4999
|
-
},
|
|
5000
|
-
onKeyDown: function(e) {
|
|
5001
|
-
if (e.key === "Enter") send(draft[0]);
|
|
5002
|
-
if (e.key === "Escape" && draft[0]) {
|
|
5003
|
-
e.preventDefault();
|
|
5004
|
-
draft[1]("");
|
|
5005
|
-
send("");
|
|
5006
|
-
}
|
|
5007
|
-
}
|
|
5008
|
-
}
|
|
5009
|
-
), draft[0] ? /* @__PURE__ */ React29.createElement(
|
|
5010
|
-
IconButton,
|
|
5011
|
-
{
|
|
5012
|
-
icon: /* @__PURE__ */ React29.createElement(IconX, null),
|
|
5013
|
-
label: t.clear((props.searchLabel || t.search).toLowerCase()),
|
|
5014
|
-
className: "aura-filterbar__clear-search",
|
|
5015
|
-
onClick: function() {
|
|
5016
|
-
draft[1]("");
|
|
5017
|
-
send("");
|
|
5018
|
-
}
|
|
5019
|
-
}
|
|
5020
|
-
) : 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),
|
|
5021
|
-
filters.length || props.onClearAll && anything ? /* @__PURE__ */ React29.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
|
|
5022
|
-
return /* @__PURE__ */ React29.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
|
|
5023
|
-
}), props.onClearAll && anything ? /* @__PURE__ */ React29.createElement(
|
|
5024
|
-
"button",
|
|
5025
|
-
{
|
|
5026
|
-
type: "button",
|
|
5027
|
-
className: "aura-filterbar__clear",
|
|
5028
|
-
onClick: function() {
|
|
5029
|
-
draft[1]("");
|
|
5030
|
-
sent.current = "";
|
|
5031
|
-
if (timer2.current) clearTimeout(timer2.current);
|
|
5032
|
-
props.onClearAll();
|
|
5033
|
-
}
|
|
5034
|
-
},
|
|
5035
|
-
t.clearFilters
|
|
5036
|
-
) : null) : null
|
|
5037
|
-
);
|
|
5038
|
-
});
|
|
5039
|
-
|
|
5040
|
-
// src/Command.tsx
|
|
5041
|
-
var React31 = __toESM(require_react(), 1);
|
|
5042
|
-
var import_react_dom8 = __toESM(require_react_dom(), 1);
|
|
5043
|
-
|
|
5044
|
-
// src/useModal.tsx
|
|
5045
|
-
var React30 = __toESM(require_react(), 1);
|
|
5046
|
-
var locks = 0;
|
|
5047
|
-
var savedOverflow = "";
|
|
5048
|
-
function lockScroll() {
|
|
5049
|
-
const body = document.body;
|
|
5050
|
-
if (locks === 0) savedOverflow = body.style.overflow;
|
|
5051
|
-
locks++;
|
|
5052
|
-
body.style.overflow = "hidden";
|
|
5053
|
-
let done = false;
|
|
5054
|
-
return function() {
|
|
5055
|
-
if (done) return;
|
|
5056
|
-
done = true;
|
|
5057
|
-
locks--;
|
|
5058
|
-
if (locks === 0) body.style.overflow = savedOverflow;
|
|
5059
|
-
};
|
|
5060
|
-
}
|
|
5061
|
-
function tabbable(el) {
|
|
5062
|
-
const all = Array.prototype.filter.call(el.querySelectorAll(FOCUSABLE), function(c) {
|
|
5063
|
-
return c.tabIndex >= 0;
|
|
5064
|
-
});
|
|
5065
|
-
const shown = all.filter(function(c) {
|
|
5066
|
-
return c.getClientRects().length > 0;
|
|
5067
|
-
});
|
|
5068
|
-
return shown.length ? shown : all;
|
|
5069
|
-
}
|
|
5070
|
-
function useModal(open, ref, opts) {
|
|
5071
|
-
const mounted = useMounted();
|
|
5072
|
-
const prev = React30.useRef(null);
|
|
5073
|
-
const o = opts || {};
|
|
5074
|
-
const latest = React30.useRef(o);
|
|
5075
|
-
latest.current = o;
|
|
5076
|
-
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(
|
|
5077
5332
|
function() {
|
|
5078
|
-
if (!open || !
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
}).join(",");
|
|
5087
|
-
const list = el.querySelectorAll(sel);
|
|
5088
|
-
for (let i = 0; i < list.length; i++)
|
|
5089
|
-
if (list[i].tabIndex >= 0 && list[i].getClientRects().length > 0) return list[i];
|
|
5090
|
-
return null;
|
|
5091
|
-
};
|
|
5092
|
-
const target = el && (el.querySelector("[data-autofocus]") || firstIn(o.bodySelector) || firstIn(o.footSelector) || el);
|
|
5093
|
-
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);
|
|
5094
5341
|
return function() {
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
const ff = l.finalFocus;
|
|
5098
|
-
const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
|
|
5099
|
-
const back = to && to.isConnected ? to : prev.current;
|
|
5100
|
-
if (back && back.focus) back.focus();
|
|
5101
|
-
if (l.onCloseComplete) l.onCloseComplete();
|
|
5342
|
+
if (mq.removeEventListener) mq.removeEventListener("change", check);
|
|
5343
|
+
else mq.removeListener(check);
|
|
5102
5344
|
};
|
|
5103
5345
|
},
|
|
5104
|
-
[open,
|
|
5105
|
-
);
|
|
5106
|
-
function
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
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
|
+
}
|
|
5118
5376
|
}
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
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
|
+
}
|
|
5126
5387
|
}
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
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
|
+
});
|
|
5130
5468
|
|
|
5131
5469
|
// src/Command.tsx
|
|
5470
|
+
var React32 = __toESM(require_react(), 1);
|
|
5471
|
+
var import_react_dom9 = __toESM(require_react_dom(), 1);
|
|
5132
5472
|
function isMac() {
|
|
5133
5473
|
return typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
|
|
5134
5474
|
}
|
|
@@ -5136,21 +5476,21 @@ window.Aura = (() => {
|
|
|
5136
5476
|
const t = useStrings();
|
|
5137
5477
|
const density = useDensity();
|
|
5138
5478
|
const id = uid(), listId = id + "-list";
|
|
5139
|
-
const box =
|
|
5140
|
-
const input =
|
|
5141
|
-
const qState =
|
|
5479
|
+
const box = React32.useRef(null);
|
|
5480
|
+
const input = React32.useRef(null);
|
|
5481
|
+
const qState = React32.useState(""), act = React32.useState(null);
|
|
5142
5482
|
const query = props.query !== void 0 ? props.query : qState[0];
|
|
5143
5483
|
function setQuery(v) {
|
|
5144
5484
|
if (props.query === void 0) qState[1](v);
|
|
5145
5485
|
if (props.onQueryChange) props.onQueryChange(v);
|
|
5146
5486
|
}
|
|
5147
|
-
const openRef =
|
|
5487
|
+
const openRef = React32.useRef(props.open);
|
|
5148
5488
|
openRef.current = props.open;
|
|
5149
5489
|
const close = function() {
|
|
5150
5490
|
props.onOpenChange(false);
|
|
5151
5491
|
};
|
|
5152
5492
|
const modal = useModal(props.open, box, { onEscape: close });
|
|
5153
|
-
|
|
5493
|
+
React32.useEffect(
|
|
5154
5494
|
function() {
|
|
5155
5495
|
if (props.hotkey === false) return;
|
|
5156
5496
|
function onKey2(e) {
|
|
@@ -5166,7 +5506,7 @@ window.Aura = (() => {
|
|
|
5166
5506
|
},
|
|
5167
5507
|
[props.hotkey, props.onOpenChange]
|
|
5168
5508
|
);
|
|
5169
|
-
|
|
5509
|
+
React32.useEffect(
|
|
5170
5510
|
function() {
|
|
5171
5511
|
if (!props.open) {
|
|
5172
5512
|
if (query) setQuery("");
|
|
@@ -5206,7 +5546,7 @@ window.Aura = (() => {
|
|
|
5206
5546
|
const optId = function(i2) {
|
|
5207
5547
|
return id + "-o" + i2;
|
|
5208
5548
|
};
|
|
5209
|
-
|
|
5549
|
+
React32.useEffect(
|
|
5210
5550
|
function() {
|
|
5211
5551
|
if (!box.current || active < 0) return;
|
|
5212
5552
|
const el = box.current.querySelector("#" + CSS.escape(optId(active)));
|
|
@@ -5250,8 +5590,8 @@ window.Aura = (() => {
|
|
|
5250
5590
|
}
|
|
5251
5591
|
if (!modal.ready) return null;
|
|
5252
5592
|
let i = -1;
|
|
5253
|
-
return (0,
|
|
5254
|
-
/* @__PURE__ */
|
|
5593
|
+
return (0, import_react_dom9.createPortal)(
|
|
5594
|
+
/* @__PURE__ */ React32.createElement(
|
|
5255
5595
|
"div",
|
|
5256
5596
|
{
|
|
5257
5597
|
className: "aura-dialog-layer aura-command-layer",
|
|
@@ -5261,8 +5601,8 @@ window.Aura = (() => {
|
|
|
5261
5601
|
e.stopPropagation();
|
|
5262
5602
|
}
|
|
5263
5603
|
},
|
|
5264
|
-
/* @__PURE__ */
|
|
5265
|
-
/* @__PURE__ */
|
|
5604
|
+
/* @__PURE__ */ React32.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
|
|
5605
|
+
/* @__PURE__ */ React32.createElement(
|
|
5266
5606
|
"div",
|
|
5267
5607
|
{
|
|
5268
5608
|
ref: box,
|
|
@@ -5272,7 +5612,7 @@ window.Aura = (() => {
|
|
|
5272
5612
|
tabIndex: -1,
|
|
5273
5613
|
className: cx("aura-command", props.className)
|
|
5274
5614
|
},
|
|
5275
|
-
/* @__PURE__ */
|
|
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(
|
|
5276
5616
|
"input",
|
|
5277
5617
|
{
|
|
5278
5618
|
ref: input,
|
|
@@ -5295,8 +5635,8 @@ window.Aura = (() => {
|
|
|
5295
5635
|
},
|
|
5296
5636
|
onKeyDown: onKey
|
|
5297
5637
|
}
|
|
5298
|
-
), /* @__PURE__ */
|
|
5299
|
-
/* @__PURE__ */
|
|
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(
|
|
5300
5640
|
"div",
|
|
5301
5641
|
{
|
|
5302
5642
|
id: listId,
|
|
@@ -5306,7 +5646,7 @@ window.Aura = (() => {
|
|
|
5306
5646
|
},
|
|
5307
5647
|
groups.map(function(g, gi) {
|
|
5308
5648
|
const gid = id + "-g" + gi;
|
|
5309
|
-
return /* @__PURE__ */
|
|
5649
|
+
return /* @__PURE__ */ React32.createElement(
|
|
5310
5650
|
"div",
|
|
5311
5651
|
{
|
|
5312
5652
|
key: g.name || gi,
|
|
@@ -5314,11 +5654,11 @@ window.Aura = (() => {
|
|
|
5314
5654
|
"aria-labelledby": g.name ? gid : void 0,
|
|
5315
5655
|
className: "aura-command__group"
|
|
5316
5656
|
},
|
|
5317
|
-
g.name ? /* @__PURE__ */
|
|
5657
|
+
g.name ? /* @__PURE__ */ React32.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
|
|
5318
5658
|
g.items.map(function(it) {
|
|
5319
5659
|
i++;
|
|
5320
5660
|
const n3 = i;
|
|
5321
|
-
return /* @__PURE__ */
|
|
5661
|
+
return /* @__PURE__ */ React32.createElement(
|
|
5322
5662
|
"div",
|
|
5323
5663
|
{
|
|
5324
5664
|
key: it.id,
|
|
@@ -5342,210 +5682,22 @@ window.Aura = (() => {
|
|
|
5342
5682
|
run(it);
|
|
5343
5683
|
}
|
|
5344
5684
|
},
|
|
5345
|
-
it.icon ? /* @__PURE__ */
|
|
5346
|
-
/* @__PURE__ */
|
|
5347
|
-
it.shortcut ? /* @__PURE__ */
|
|
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
|
|
5348
5688
|
);
|
|
5349
5689
|
})
|
|
5350
5690
|
);
|
|
5351
5691
|
})
|
|
5352
5692
|
)),
|
|
5353
|
-
/* @__PURE__ */
|
|
5354
|
-
/* @__PURE__ */
|
|
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"))
|
|
5355
5695
|
)
|
|
5356
5696
|
),
|
|
5357
5697
|
document.body
|
|
5358
5698
|
);
|
|
5359
5699
|
}
|
|
5360
5700
|
|
|
5361
|
-
// src/Dialog.tsx
|
|
5362
|
-
var React32 = __toESM(require_react(), 1);
|
|
5363
|
-
var import_react_dom9 = __toESM(require_react_dom(), 1);
|
|
5364
|
-
var DialogClose = React32.createContext(null);
|
|
5365
|
-
function useDialogClose() {
|
|
5366
|
-
return React32.useContext(DialogClose) || function() {
|
|
5367
|
-
};
|
|
5368
|
-
}
|
|
5369
|
-
var Dialog = React32.forwardRef(function Dialog2(props, ref) {
|
|
5370
|
-
const t = useStrings();
|
|
5371
|
-
const density = useDensity();
|
|
5372
|
-
const own = React32.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
5373
|
-
const openState = useMaybeControlled(props.open, false, null), open = openState[0];
|
|
5374
|
-
if (props.open === void 0 && !props.trigger)
|
|
5375
|
-
devWarnOnce("dialog-no-open", "Dialog has neither `open` nor `trigger`, so it can never open. Pass one of them.");
|
|
5376
|
-
const trigId = uid();
|
|
5377
|
-
function closeNow() {
|
|
5378
|
-
if (props.open === void 0) openState[1](false);
|
|
5379
|
-
if (props.onClose) props.onClose();
|
|
5380
|
-
}
|
|
5381
|
-
function close() {
|
|
5382
|
-
if (props.dismissible === false) return;
|
|
5383
|
-
closeNow();
|
|
5384
|
-
}
|
|
5385
|
-
const scrimCloses = props.dismissible !== false && (props.dismissOnScrim !== void 0 ? props.dismissOnScrim : props.role !== "alertdialog");
|
|
5386
|
-
const modal = useModal(open, own, {
|
|
5387
|
-
autoFocus: props.autoFocus,
|
|
5388
|
-
onEscape: close,
|
|
5389
|
-
bodySelector: ".aura-dialog__body",
|
|
5390
|
-
footSelector: ".aura-dialog__foot",
|
|
5391
|
-
/* With a trigger, focus goes back to it even where a click doesn't focus buttons (Safari). */
|
|
5392
|
-
finalFocus: props.trigger ? function() {
|
|
5393
|
-
const ff = props.finalFocus;
|
|
5394
|
-
const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
|
|
5395
|
-
return to || document.querySelector('[data-aura-trigger="' + trigId + '"]');
|
|
5396
|
-
} : props.finalFocus,
|
|
5397
|
-
onCloseComplete: props.onCloseComplete
|
|
5398
|
-
});
|
|
5399
|
-
const trig = props.trigger;
|
|
5400
|
-
const trigger = trig && React32.isValidElement(trig) ? React32.cloneElement(trig, {
|
|
5401
|
-
"aria-haspopup": "dialog",
|
|
5402
|
-
"aria-expanded": open,
|
|
5403
|
-
"data-aura-trigger": trigId,
|
|
5404
|
-
onClick: function(e) {
|
|
5405
|
-
const own2 = trig.props.onClick;
|
|
5406
|
-
if (own2) own2(e);
|
|
5407
|
-
if (e.defaultPrevented) return;
|
|
5408
|
-
if (props.open === void 0) openState[1](true);
|
|
5409
|
-
if (props.onOpen) props.onOpen();
|
|
5410
|
-
}
|
|
5411
|
-
}) : null;
|
|
5412
|
-
if (!modal.ready) return trigger;
|
|
5413
|
-
const rest = omit(props, [
|
|
5414
|
-
"open",
|
|
5415
|
-
"onClose",
|
|
5416
|
-
"title",
|
|
5417
|
-
"description",
|
|
5418
|
-
"children",
|
|
5419
|
-
"footer",
|
|
5420
|
-
"size",
|
|
5421
|
-
"dismissible",
|
|
5422
|
-
"dismissOnScrim",
|
|
5423
|
-
"role",
|
|
5424
|
-
"autoFocus",
|
|
5425
|
-
"className",
|
|
5426
|
-
"trigger",
|
|
5427
|
-
"onOpen",
|
|
5428
|
-
"finalFocus",
|
|
5429
|
-
"onCloseComplete",
|
|
5430
|
-
"aria-labelledby",
|
|
5431
|
-
"aria-describedby",
|
|
5432
|
-
"aria-modal"
|
|
5433
|
-
]);
|
|
5434
|
-
const panel = (0, import_react_dom9.createPortal)(
|
|
5435
|
-
/* @__PURE__ */ React32.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React32.createElement(
|
|
5436
|
-
"div",
|
|
5437
|
-
{
|
|
5438
|
-
className: "aura-scrim",
|
|
5439
|
-
onClick: scrimCloses ? close : void 0,
|
|
5440
|
-
onMouseDown: scrimCloses ? void 0 : function(e) {
|
|
5441
|
-
e.preventDefault();
|
|
5442
|
-
},
|
|
5443
|
-
"aria-hidden": true
|
|
5444
|
-
}
|
|
5445
|
-
), /* @__PURE__ */ React32.createElement(
|
|
5446
|
-
"div",
|
|
5447
|
-
{
|
|
5448
|
-
...rest,
|
|
5449
|
-
ref: merged,
|
|
5450
|
-
role: props.role || "dialog",
|
|
5451
|
-
"aria-modal": true,
|
|
5452
|
-
"aria-labelledby": titleId,
|
|
5453
|
-
"aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
|
|
5454
|
-
tabIndex: -1,
|
|
5455
|
-
className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
|
|
5456
|
-
},
|
|
5457
|
-
/* @__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),
|
|
5458
|
-
props.description ? /* @__PURE__ */ React32.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
|
|
5459
|
-
/* @__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)
|
|
5460
|
-
)),
|
|
5461
|
-
document.body
|
|
5462
|
-
);
|
|
5463
|
-
return trigger ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, trigger, panel) : panel;
|
|
5464
|
-
});
|
|
5465
|
-
var Drawer = React32.forwardRef(function Drawer2(props, ref) {
|
|
5466
|
-
const t = useStrings();
|
|
5467
|
-
const density = useDensity();
|
|
5468
|
-
const own = React32.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
5469
|
-
function close() {
|
|
5470
|
-
if (props.dismissible !== false && props.onClose) props.onClose();
|
|
5471
|
-
}
|
|
5472
|
-
const modal = useModal(props.open, own, {
|
|
5473
|
-
autoFocus: props.autoFocus,
|
|
5474
|
-
onEscape: close,
|
|
5475
|
-
bodySelector: ".aura-drawer__body",
|
|
5476
|
-
footSelector: ".aura-drawer__foot",
|
|
5477
|
-
finalFocus: props.finalFocus,
|
|
5478
|
-
onCloseComplete: props.onCloseComplete
|
|
5479
|
-
});
|
|
5480
|
-
if (!modal.ready) return null;
|
|
5481
|
-
const side = props.side === "left" ? "left" : "right";
|
|
5482
|
-
const rest = omit(props, [
|
|
5483
|
-
"open",
|
|
5484
|
-
"onClose",
|
|
5485
|
-
"side",
|
|
5486
|
-
"size",
|
|
5487
|
-
"title",
|
|
5488
|
-
"description",
|
|
5489
|
-
"children",
|
|
5490
|
-
"footer",
|
|
5491
|
-
"dismissible",
|
|
5492
|
-
"dismissOnScrim",
|
|
5493
|
-
"autoFocus",
|
|
5494
|
-
"aria-label",
|
|
5495
|
-
"aria-describedby",
|
|
5496
|
-
"aria-labelledby",
|
|
5497
|
-
"className",
|
|
5498
|
-
"closeLabel",
|
|
5499
|
-
"closeProps",
|
|
5500
|
-
"finalFocus",
|
|
5501
|
-
"onCloseComplete"
|
|
5502
|
-
]);
|
|
5503
|
-
const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
|
|
5504
|
-
return (0, import_react_dom9.createPortal)(
|
|
5505
|
-
/* @__PURE__ */ React32.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React32.createElement(
|
|
5506
|
-
"div",
|
|
5507
|
-
{
|
|
5508
|
-
className: "aura-scrim",
|
|
5509
|
-
onClick: drawerScrimCloses ? close : void 0,
|
|
5510
|
-
onMouseDown: !drawerScrimCloses ? function(e) {
|
|
5511
|
-
e.preventDefault();
|
|
5512
|
-
} : void 0,
|
|
5513
|
-
"aria-hidden": true
|
|
5514
|
-
}
|
|
5515
|
-
), /* @__PURE__ */ React32.createElement(
|
|
5516
|
-
"div",
|
|
5517
|
-
{
|
|
5518
|
-
...rest,
|
|
5519
|
-
ref: merged,
|
|
5520
|
-
role: "dialog",
|
|
5521
|
-
"aria-modal": true,
|
|
5522
|
-
"aria-labelledby": props.title ? titleId : props["aria-labelledby"],
|
|
5523
|
-
"aria-label": props.title ? void 0 : props["aria-label"],
|
|
5524
|
-
"aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
|
|
5525
|
-
tabIndex: -1,
|
|
5526
|
-
className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
|
|
5527
|
-
},
|
|
5528
|
-
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(
|
|
5529
|
-
IconButton,
|
|
5530
|
-
{
|
|
5531
|
-
...props.closeProps,
|
|
5532
|
-
icon: /* @__PURE__ */ React32.createElement(IconX, null),
|
|
5533
|
-
label: props.closeLabel || t.close,
|
|
5534
|
-
onClick: function(e) {
|
|
5535
|
-
const own2 = props.closeProps && props.closeProps.onClick;
|
|
5536
|
-
if (own2) own2(e);
|
|
5537
|
-
if (!e.defaultPrevented) close();
|
|
5538
|
-
}
|
|
5539
|
-
}
|
|
5540
|
-
) : null) : null,
|
|
5541
|
-
props.description ? /* @__PURE__ */ React32.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
|
|
5542
|
-
/* @__PURE__ */ React32.createElement("div", { className: "aura-drawer__body" }, props.children),
|
|
5543
|
-
props.footer ? /* @__PURE__ */ React32.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
|
|
5544
|
-
)),
|
|
5545
|
-
document.body
|
|
5546
|
-
);
|
|
5547
|
-
});
|
|
5548
|
-
|
|
5549
5701
|
// src/DataTable.tsx
|
|
5550
5702
|
var React33 = __toESM(require_react(), 1);
|
|
5551
5703
|
var import_react_dom10 = __toESM(require_react_dom(), 1);
|
|
@@ -7583,26 +7735,6 @@ window.Aura = (() => {
|
|
|
7583
7735
|
|
|
7584
7736
|
// src/responsive.tsx
|
|
7585
7737
|
var React39 = __toESM(require_react(), 1);
|
|
7586
|
-
|
|
7587
|
-
// src/breakpoints.ts
|
|
7588
|
-
var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
|
|
7589
|
-
var ORDER = ["base", "sm", "md", "lg", "xl"];
|
|
7590
|
-
function respVars(prefix, value, map2) {
|
|
7591
|
-
const style = {};
|
|
7592
|
-
if (value == null) return style;
|
|
7593
|
-
if (typeof value !== "object") value = { base: value };
|
|
7594
|
-
let byBp = value, cur2;
|
|
7595
|
-
ORDER.forEach(function(k) {
|
|
7596
|
-
if (byBp[k] !== void 0) cur2 = map2 ? map2(byBp[k]) : byBp[k];
|
|
7597
|
-
if (cur2 !== void 0) style["--" + prefix + "-" + k] = cur2;
|
|
7598
|
-
});
|
|
7599
|
-
return style;
|
|
7600
|
-
}
|
|
7601
|
-
var space = function(v) {
|
|
7602
|
-
return typeof v === "number" ? "var(--aura-space-" + v + ")" : v;
|
|
7603
|
-
};
|
|
7604
|
-
|
|
7605
|
-
// src/responsive.tsx
|
|
7606
7738
|
var ORDER2 = ["base", "sm", "md", "lg", "xl"];
|
|
7607
7739
|
function useBreakpoint() {
|
|
7608
7740
|
return React39.useSyncExternalStore(subscribe, current, function() {
|
|
@@ -7698,6 +7830,8 @@ window.Aura = (() => {
|
|
|
7698
7830
|
});
|
|
7699
7831
|
const level = props.headingLevel || 1;
|
|
7700
7832
|
const below2 = props.actionsFullWidthBelow;
|
|
7833
|
+
const hide2 = props.titleHideBelow;
|
|
7834
|
+
const hasMeta = props.meta != null && props.meta !== false;
|
|
7701
7835
|
return h8(
|
|
7702
7836
|
"div",
|
|
7703
7837
|
Object.assign(attrs2, {
|
|
@@ -7705,6 +7839,8 @@ window.Aura = (() => {
|
|
|
7705
7839
|
className: cx(
|
|
7706
7840
|
"aura-page-header",
|
|
7707
7841
|
(below2 === "sm" || below2 === "md" || below2 === "lg") && "aura-page-header--actions-full-below-" + below2,
|
|
7842
|
+
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && "aura-page-header--title-hide-below-" + hide2,
|
|
7843
|
+
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && !hasMeta && "has-no-meta",
|
|
7708
7844
|
props.className
|
|
7709
7845
|
),
|
|
7710
7846
|
style: props.style
|
|
@@ -8183,6 +8319,7 @@ window.Aura = (() => {
|
|
|
8183
8319
|
className: cx(
|
|
8184
8320
|
"aura-shell__bar",
|
|
8185
8321
|
(!props.header || props.headerHideFrom === "lg") && "aura-shell__bar--menu-only",
|
|
8322
|
+
!props.header && "aura-shell__bar--no-header",
|
|
8186
8323
|
props.headerHideOnScroll && "aura-shell__bar--hides",
|
|
8187
8324
|
away && "is-away"
|
|
8188
8325
|
)
|