@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/cjs/index.cjs
CHANGED
|
@@ -214,7 +214,7 @@ function shapesOf(el) {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
// src/Icon.tsx
|
|
217
|
-
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" }]] };
|
|
217
|
+
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" }]] };
|
|
218
218
|
var ICONS = map;
|
|
219
219
|
var registered = {};
|
|
220
220
|
function registerIcons(icons) {
|
|
@@ -359,6 +359,7 @@ function useMergedRef(a, b) {
|
|
|
359
359
|
function plainClick(e) {
|
|
360
360
|
return !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey;
|
|
361
361
|
}
|
|
362
|
+
var FilterSheet = React3.createContext(false);
|
|
362
363
|
|
|
363
364
|
// src/display.tsx
|
|
364
365
|
var React4 = __toESM(require("react"), 1);
|
|
@@ -583,6 +584,17 @@ var IconWrench = /* @__PURE__ */ defineIcon("wrench", [
|
|
|
583
584
|
}
|
|
584
585
|
]
|
|
585
586
|
]);
|
|
587
|
+
var IconSlidersHorizontal = /* @__PURE__ */ defineIcon("sliders-horizontal", [
|
|
588
|
+
["path", { d: "M10 5H3" }],
|
|
589
|
+
["path", { d: "M12 19H3" }],
|
|
590
|
+
["path", { d: "M14 3v4" }],
|
|
591
|
+
["path", { d: "M16 17v4" }],
|
|
592
|
+
["path", { d: "M21 12h-9" }],
|
|
593
|
+
["path", { d: "M21 19h-5" }],
|
|
594
|
+
["path", { d: "M21 5h-7" }],
|
|
595
|
+
["path", { d: "M8 10v4" }],
|
|
596
|
+
["path", { d: "M8 12H3" }]
|
|
597
|
+
]);
|
|
586
598
|
|
|
587
599
|
// src/display.tsx
|
|
588
600
|
var h2 = React4.createElement;
|
|
@@ -932,6 +944,11 @@ var th = {
|
|
|
932
944
|
statusMaintenance: "\u0E1B\u0E34\u0E14\u0E1B\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E38\u0E07",
|
|
933
945
|
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
934
946
|
statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
947
|
+
opensInNewTab: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
|
|
948
|
+
filtersApplied: function(n3) {
|
|
949
|
+
return "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07, \u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48 " + n3.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
|
|
950
|
+
},
|
|
951
|
+
done: "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19",
|
|
935
952
|
accepts: function(list, max) {
|
|
936
953
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
937
954
|
}
|
|
@@ -1068,6 +1085,11 @@ var sv = {
|
|
|
1068
1085
|
statusMaintenance: "Underh\xE5ll",
|
|
1069
1086
|
statusOk: "OK",
|
|
1070
1087
|
statusUnknown: "Ingen data",
|
|
1088
|
+
opensInNewTab: "\xF6ppnas i en ny flik",
|
|
1089
|
+
filtersApplied: function(n3) {
|
|
1090
|
+
return "Filter, " + n3.toLocaleString("sv-SE") + " aktiva";
|
|
1091
|
+
},
|
|
1092
|
+
done: "Klar",
|
|
1071
1093
|
accepts: function(list, max) {
|
|
1072
1094
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
1073
1095
|
}
|
|
@@ -1205,6 +1227,11 @@ var STRINGS = {
|
|
|
1205
1227
|
statusMaintenance: "Maintenance",
|
|
1206
1228
|
statusOk: "OK",
|
|
1207
1229
|
statusUnknown: "No data",
|
|
1230
|
+
opensInNewTab: "opens in a new tab",
|
|
1231
|
+
filtersApplied: function(n3) {
|
|
1232
|
+
return "Filters, " + n3.toLocaleString("en") + " applied";
|
|
1233
|
+
},
|
|
1234
|
+
done: "Done",
|
|
1208
1235
|
accepts: function(list, max) {
|
|
1209
1236
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
1210
1237
|
}
|
|
@@ -1606,6 +1633,7 @@ var Menu = React9.forwardRef(function Menu2(props, ref) {
|
|
|
1606
1633
|
const headerId = uid(), itemId = uid();
|
|
1607
1634
|
const hasHeader = props.header != null && props.header !== false && props.header !== "";
|
|
1608
1635
|
const Link = useLinkComponent(props.linkComponent);
|
|
1636
|
+
const t = useStrings();
|
|
1609
1637
|
function place2() {
|
|
1610
1638
|
const a = props.anchor, m = own.current;
|
|
1611
1639
|
if (!a || !m) return;
|
|
@@ -1732,6 +1760,8 @@ var Menu = React9.forwardRef(function Menu2(props, ref) {
|
|
|
1732
1760
|
if (reasonId)
|
|
1733
1761
|
body[2] = /* Hidden from the name (it would be read twice); aria-describedby still reads it. */
|
|
1734
1762
|
/* @__PURE__ */ React9.createElement("span", { key: "h", id: reasonId, className: "aura-menu__hint aura-menu__reason", "aria-hidden": true }, it.disabledReason);
|
|
1763
|
+
if (it.href && !it.disabled && it.target === "_blank")
|
|
1764
|
+
body[1] = /* @__PURE__ */ React9.createElement("span", { key: "t", className: "aura-menu__label" }, it.label, /* @__PURE__ */ React9.createElement("span", { className: "aura-sr-only" }, " (" + t.opensInNewTab + ")"));
|
|
1735
1765
|
if (it.href && !it.disabled)
|
|
1736
1766
|
return /* @__PURE__ */ React9.createElement(
|
|
1737
1767
|
Link,
|
|
@@ -2703,12 +2733,18 @@ var Select = React16.forwardRef(function Select2(props, ref) {
|
|
|
2703
2733
|
var React17 = __toESM(require("react"), 1);
|
|
2704
2734
|
var FilterSelect = React17.forwardRef(function FilterSelect2(props, ref) {
|
|
2705
2735
|
const onChange = props.onChange;
|
|
2706
|
-
const
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2736
|
+
const inSheet = React17.useContext(FilterSheet);
|
|
2737
|
+
const pass = Object.assign(
|
|
2738
|
+
omit(props, ["label", "allLabel", "onChange"]),
|
|
2739
|
+
inSheet ? { label: props.label } : {
|
|
2740
|
+
[FILTER_KEY]: { name: props.label, allLabel: props.allLabel }
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
onChange: onChange ? function(e) {
|
|
2744
|
+
onChange(e.target.value);
|
|
2745
|
+
} : void 0
|
|
2746
|
+
}
|
|
2747
|
+
);
|
|
2712
2748
|
return /* @__PURE__ */ React17.createElement(Select, { ...pass, ref });
|
|
2713
2749
|
});
|
|
2714
2750
|
|
|
@@ -3564,6 +3600,7 @@ var FilterDateRange = React19.forwardRef(
|
|
|
3564
3600
|
const anyLabel = props.anyLabel || dt.anyTime;
|
|
3565
3601
|
const value = v.start && v.end ? formatDateRange(v.start, v.end, { locale, calendar }) : anyLabel;
|
|
3566
3602
|
const setFace = useMergedRef(ref, faceRef);
|
|
3603
|
+
const inSheet = React19.useContext(FilterSheet);
|
|
3567
3604
|
const limits = {
|
|
3568
3605
|
min: props.min,
|
|
3569
3606
|
max: props.max,
|
|
@@ -3664,7 +3701,7 @@ var FilterDateRange = React19.forwardRef(
|
|
|
3664
3701
|
),
|
|
3665
3702
|
document.body
|
|
3666
3703
|
) : null;
|
|
3667
|
-
|
|
3704
|
+
const box = /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
|
|
3668
3705
|
"div",
|
|
3669
3706
|
{
|
|
3670
3707
|
ref: boxRef,
|
|
@@ -3672,6 +3709,7 @@ var FilterDateRange = React19.forwardRef(
|
|
|
3672
3709
|
"aura-filterselect",
|
|
3673
3710
|
pop.open && "is-open",
|
|
3674
3711
|
props.disabled && "is-disabled",
|
|
3712
|
+
inSheet && "aura-filterselect--sheet",
|
|
3675
3713
|
touchClass(props.touchHeight),
|
|
3676
3714
|
props.className
|
|
3677
3715
|
)
|
|
@@ -3700,6 +3738,8 @@ var FilterDateRange = React19.forwardRef(
|
|
|
3700
3738
|
/* @__PURE__ */ React19.createElement(Icon, { name: /* @__PURE__ */ React19.createElement(IconChevronDown, null), className: "aura-filterselect__chevron" })
|
|
3701
3739
|
)
|
|
3702
3740
|
), cal);
|
|
3741
|
+
if (!inSheet) return box;
|
|
3742
|
+
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);
|
|
3703
3743
|
}
|
|
3704
3744
|
);
|
|
3705
3745
|
|
|
@@ -4690,162 +4730,439 @@ var FormErrorSummary = React26.forwardRef(
|
|
|
4690
4730
|
);
|
|
4691
4731
|
|
|
4692
4732
|
// src/FilterBar.tsx
|
|
4693
|
-
var
|
|
4733
|
+
var React31 = __toESM(require("react"), 1);
|
|
4694
4734
|
|
|
4695
|
-
// src/
|
|
4735
|
+
// src/Dialog.tsx
|
|
4696
4736
|
var React28 = __toESM(require("react"), 1);
|
|
4737
|
+
var import_react_dom7 = require("react-dom");
|
|
4697
4738
|
|
|
4698
|
-
// src/
|
|
4739
|
+
// src/useModal.tsx
|
|
4699
4740
|
var React27 = __toESM(require("react"), 1);
|
|
4700
|
-
var
|
|
4701
|
-
var
|
|
4702
|
-
|
|
4703
|
-
const
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
);
|
|
4713
|
-
}
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
if (!anchor.current || !tip2.current) return;
|
|
4731
|
-
const r2 = anchor.current.getBoundingClientRect(), t = tip2.current.getBoundingClientRect();
|
|
4732
|
-
const vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
|
|
4733
|
-
let side = props.side || "top";
|
|
4734
|
-
if (side === "top" && r2.top - t.height - gap < m && r2.bottom + gap + t.height <= vh - m) side = "bottom";
|
|
4735
|
-
else if (side === "bottom" && r2.bottom + gap + t.height > vh - m && r2.top - t.height - gap >= m) side = "top";
|
|
4736
|
-
else if (side === "left" && r2.left - t.width - gap < m && r2.right + gap + t.width <= vw - m) side = "right";
|
|
4737
|
-
else if (side === "right" && r2.right + gap + t.width > vw - m && r2.left - t.width - gap >= m) side = "left";
|
|
4738
|
-
const clampX = function(x) {
|
|
4739
|
-
return Math.max(m, Math.min(x, vw - t.width - m));
|
|
4740
|
-
};
|
|
4741
|
-
const clampY = function(y) {
|
|
4742
|
-
return Math.max(m, Math.min(y, vh - t.height - m));
|
|
4743
|
-
};
|
|
4744
|
-
let top, left;
|
|
4745
|
-
if (side === "top" || side === "bottom") {
|
|
4746
|
-
top = clampY(side === "top" ? r2.top - t.height - gap : r2.bottom + gap);
|
|
4747
|
-
left = clampX(r2.left + r2.width / 2 - t.width / 2);
|
|
4748
|
-
} else {
|
|
4749
|
-
left = side === "left" ? r2.left - t.width - gap : r2.right + gap;
|
|
4750
|
-
left = clampX(left);
|
|
4751
|
-
top = clampY(r2.top + r2.height / 2 - t.height / 2);
|
|
4752
|
-
}
|
|
4753
|
-
pos[1]({ top, left });
|
|
4754
|
-
}
|
|
4755
|
-
useIsoLayoutEffect(
|
|
4756
|
-
function() {
|
|
4757
|
-
if (!open) return;
|
|
4758
|
-
place2();
|
|
4759
|
-
window.addEventListener("scroll", place2, true);
|
|
4760
|
-
window.addEventListener("resize", place2);
|
|
4761
|
-
return function() {
|
|
4762
|
-
window.removeEventListener("scroll", place2, true);
|
|
4763
|
-
window.removeEventListener("resize", place2);
|
|
4764
|
-
};
|
|
4765
|
-
},
|
|
4766
|
-
[open, mounted]
|
|
4767
|
-
);
|
|
4741
|
+
var locks = 0;
|
|
4742
|
+
var savedOverflow = "";
|
|
4743
|
+
function lockScroll() {
|
|
4744
|
+
const body = document.body;
|
|
4745
|
+
if (locks === 0) savedOverflow = body.style.overflow;
|
|
4746
|
+
locks++;
|
|
4747
|
+
body.style.overflow = "hidden";
|
|
4748
|
+
let done = false;
|
|
4749
|
+
return function() {
|
|
4750
|
+
if (done) return;
|
|
4751
|
+
done = true;
|
|
4752
|
+
locks--;
|
|
4753
|
+
if (locks === 0) body.style.overflow = savedOverflow;
|
|
4754
|
+
};
|
|
4755
|
+
}
|
|
4756
|
+
function tabbable(el) {
|
|
4757
|
+
const all = Array.prototype.filter.call(el.querySelectorAll(FOCUSABLE), function(c) {
|
|
4758
|
+
return c.tabIndex >= 0;
|
|
4759
|
+
});
|
|
4760
|
+
const shown = all.filter(function(c) {
|
|
4761
|
+
return c.getClientRects().length > 0;
|
|
4762
|
+
});
|
|
4763
|
+
return shown.length ? shown : all;
|
|
4764
|
+
}
|
|
4765
|
+
function useModal(open, ref, opts) {
|
|
4766
|
+
const mounted = useMounted();
|
|
4767
|
+
const prev = React27.useRef(null);
|
|
4768
|
+
const o = opts || {};
|
|
4769
|
+
const latest = React27.useRef(o);
|
|
4770
|
+
latest.current = o;
|
|
4768
4771
|
React27.useEffect(
|
|
4769
4772
|
function() {
|
|
4770
|
-
if (!open) return;
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4773
|
+
if (!open || !mounted) return;
|
|
4774
|
+
prev.current = document.activeElement;
|
|
4775
|
+
const unlock = lockScroll();
|
|
4776
|
+
const el = ref.current;
|
|
4777
|
+
const firstIn = function(scope) {
|
|
4778
|
+
if (!scope || !el) return null;
|
|
4779
|
+
const sel = FOCUSABLE.split(",").map(function(s) {
|
|
4780
|
+
return scope + " " + s;
|
|
4781
|
+
}).join(",");
|
|
4782
|
+
const list = el.querySelectorAll(sel);
|
|
4783
|
+
for (let i = 0; i < list.length; i++)
|
|
4784
|
+
if (list[i].tabIndex >= 0 && list[i].getClientRects().length > 0) return list[i];
|
|
4785
|
+
return null;
|
|
4786
|
+
};
|
|
4787
|
+
const target = el && (el.querySelector("[data-autofocus]") || firstIn(o.bodySelector) || firstIn(o.footSelector) || el);
|
|
4788
|
+
if (target && o.autoFocus !== false) target.focus();
|
|
4775
4789
|
return function() {
|
|
4776
|
-
|
|
4790
|
+
unlock();
|
|
4791
|
+
const l = latest.current;
|
|
4792
|
+
const ff = l.finalFocus;
|
|
4793
|
+
const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
|
|
4794
|
+
const back = to && to.isConnected ? to : prev.current;
|
|
4795
|
+
if (back && back.focus) back.focus();
|
|
4796
|
+
if (l.onCloseComplete) l.onCloseComplete();
|
|
4777
4797
|
};
|
|
4778
4798
|
},
|
|
4779
|
-
[open]
|
|
4780
|
-
);
|
|
4781
|
-
const child = React27.Children.only(props.children);
|
|
4782
|
-
const trigger = /* @__PURE__ */ React27.createElement(
|
|
4783
|
-
"span",
|
|
4784
|
-
{
|
|
4785
|
-
ref: anchorMerged,
|
|
4786
|
-
className: "aura-tooltip-anchor",
|
|
4787
|
-
onMouseEnter: function() {
|
|
4788
|
-
show3(false);
|
|
4789
|
-
},
|
|
4790
|
-
onMouseLeave: hideSoon2,
|
|
4791
|
-
onFocus: function() {
|
|
4792
|
-
show3(true);
|
|
4793
|
-
},
|
|
4794
|
-
onBlur: hide2
|
|
4795
|
-
},
|
|
4796
|
-
React27.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
|
|
4799
|
+
[open, mounted]
|
|
4797
4800
|
);
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
function textOf2(node, all) {
|
|
4820
|
-
if (node == null || typeof node === "boolean") return "";
|
|
4821
|
-
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
4822
|
-
if (Array.isArray(node))
|
|
4823
|
-
return node.map(function(n3) {
|
|
4824
|
-
return textOf2(n3, all);
|
|
4825
|
-
}).join("");
|
|
4826
|
-
if (React28.isValidElement(node)) {
|
|
4827
|
-
const p = node.props;
|
|
4828
|
-
return !all && (p["aria-hidden"] === true || p["aria-hidden"] === "true") ? "" : textOf2(p.children, all);
|
|
4801
|
+
function onKeyDown(e) {
|
|
4802
|
+
if (e.key === "Escape") {
|
|
4803
|
+
e.stopPropagation();
|
|
4804
|
+
if (o.onEscape) o.onEscape();
|
|
4805
|
+
return;
|
|
4806
|
+
}
|
|
4807
|
+
if (e.key !== "Tab" || !ref.current || e.defaultPrevented) return;
|
|
4808
|
+
if (!ref.current.contains(e.target)) return;
|
|
4809
|
+
const list = tabbable(ref.current);
|
|
4810
|
+
if (!list.length) {
|
|
4811
|
+
e.preventDefault();
|
|
4812
|
+
return;
|
|
4813
|
+
}
|
|
4814
|
+
const first = list[0], last = list[list.length - 1], active = document.activeElement, stray = active === ref.current;
|
|
4815
|
+
if (e.shiftKey && (active === first || stray)) {
|
|
4816
|
+
e.preventDefault();
|
|
4817
|
+
last.focus();
|
|
4818
|
+
} else if (!e.shiftKey && (active === last || stray)) {
|
|
4819
|
+
e.preventDefault();
|
|
4820
|
+
first.focus();
|
|
4821
|
+
}
|
|
4829
4822
|
}
|
|
4830
|
-
return
|
|
4823
|
+
return { ready: !!open && mounted, onKeyDown };
|
|
4824
|
+
}
|
|
4825
|
+
|
|
4826
|
+
// src/Dialog.tsx
|
|
4827
|
+
var DialogClose = React28.createContext(null);
|
|
4828
|
+
function useDialogClose() {
|
|
4829
|
+
return React28.useContext(DialogClose) || function() {
|
|
4830
|
+
};
|
|
4831
4831
|
}
|
|
4832
|
-
var
|
|
4832
|
+
var Dialog = React28.forwardRef(function Dialog2(props, ref) {
|
|
4833
4833
|
const t = useStrings();
|
|
4834
|
-
const
|
|
4834
|
+
const density = useDensity();
|
|
4835
|
+
const own = React28.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
4836
|
+
const openState = useMaybeControlled(props.open, false, null), open = openState[0];
|
|
4837
|
+
if (props.open === void 0 && !props.trigger)
|
|
4838
|
+
devWarnOnce("dialog-no-open", "Dialog has neither `open` nor `trigger`, so it can never open. Pass one of them.");
|
|
4839
|
+
const trigId = uid();
|
|
4840
|
+
function closeNow() {
|
|
4841
|
+
if (props.open === void 0) openState[1](false);
|
|
4842
|
+
if (props.onClose) props.onClose();
|
|
4843
|
+
}
|
|
4844
|
+
function close() {
|
|
4845
|
+
if (props.dismissible === false) return;
|
|
4846
|
+
closeNow();
|
|
4847
|
+
}
|
|
4848
|
+
const scrimCloses = props.dismissible !== false && (props.dismissOnScrim !== void 0 ? props.dismissOnScrim : props.role !== "alertdialog");
|
|
4849
|
+
const modal = useModal(open, own, {
|
|
4850
|
+
autoFocus: props.autoFocus,
|
|
4851
|
+
onEscape: close,
|
|
4852
|
+
bodySelector: ".aura-dialog__body",
|
|
4853
|
+
footSelector: ".aura-dialog__foot",
|
|
4854
|
+
/* With a trigger, focus goes back to it even where a click doesn't focus buttons (Safari). */
|
|
4855
|
+
finalFocus: props.trigger ? function() {
|
|
4856
|
+
const ff = props.finalFocus;
|
|
4857
|
+
const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
|
|
4858
|
+
return to || document.querySelector('[data-aura-trigger="' + trigId + '"]');
|
|
4859
|
+
} : props.finalFocus,
|
|
4860
|
+
onCloseComplete: props.onCloseComplete
|
|
4861
|
+
});
|
|
4862
|
+
const trig = props.trigger;
|
|
4863
|
+
const trigger = trig && React28.isValidElement(trig) ? React28.cloneElement(trig, {
|
|
4864
|
+
"aria-haspopup": "dialog",
|
|
4865
|
+
"aria-expanded": open,
|
|
4866
|
+
"data-aura-trigger": trigId,
|
|
4867
|
+
onClick: function(e) {
|
|
4868
|
+
const own2 = trig.props.onClick;
|
|
4869
|
+
if (own2) own2(e);
|
|
4870
|
+
if (e.defaultPrevented) return;
|
|
4871
|
+
if (props.open === void 0) openState[1](true);
|
|
4872
|
+
if (props.onOpen) props.onOpen();
|
|
4873
|
+
}
|
|
4874
|
+
}) : null;
|
|
4875
|
+
if (!modal.ready) return trigger;
|
|
4835
4876
|
const rest = omit(props, [
|
|
4836
|
-
"
|
|
4837
|
-
"
|
|
4838
|
-
"
|
|
4839
|
-
"
|
|
4840
|
-
"children",
|
|
4841
|
-
"
|
|
4877
|
+
"open",
|
|
4878
|
+
"onClose",
|
|
4879
|
+
"title",
|
|
4880
|
+
"description",
|
|
4881
|
+
"children",
|
|
4882
|
+
"footer",
|
|
4883
|
+
"size",
|
|
4884
|
+
"dismissible",
|
|
4885
|
+
"dismissOnScrim",
|
|
4886
|
+
"role",
|
|
4887
|
+
"autoFocus",
|
|
4888
|
+
"className",
|
|
4889
|
+
"trigger",
|
|
4890
|
+
"onOpen",
|
|
4891
|
+
"finalFocus",
|
|
4892
|
+
"onCloseComplete",
|
|
4893
|
+
"aria-labelledby",
|
|
4894
|
+
"aria-describedby",
|
|
4895
|
+
"aria-modal"
|
|
4896
|
+
]);
|
|
4897
|
+
const panel = (0, import_react_dom7.createPortal)(
|
|
4898
|
+
/* @__PURE__ */ React28.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React28.createElement(
|
|
4899
|
+
"div",
|
|
4900
|
+
{
|
|
4901
|
+
className: "aura-scrim",
|
|
4902
|
+
onClick: scrimCloses ? close : void 0,
|
|
4903
|
+
onMouseDown: scrimCloses ? void 0 : function(e) {
|
|
4904
|
+
e.preventDefault();
|
|
4905
|
+
},
|
|
4906
|
+
"aria-hidden": true
|
|
4907
|
+
}
|
|
4908
|
+
), /* @__PURE__ */ React28.createElement(
|
|
4909
|
+
"div",
|
|
4910
|
+
{
|
|
4911
|
+
...rest,
|
|
4912
|
+
ref: merged,
|
|
4913
|
+
role: props.role || "dialog",
|
|
4914
|
+
"aria-modal": true,
|
|
4915
|
+
"aria-labelledby": titleId,
|
|
4916
|
+
"aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
|
|
4917
|
+
tabIndex: -1,
|
|
4918
|
+
className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
|
|
4919
|
+
},
|
|
4920
|
+
/* @__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),
|
|
4921
|
+
props.description ? /* @__PURE__ */ React28.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
|
|
4922
|
+
/* @__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)
|
|
4923
|
+
)),
|
|
4924
|
+
document.body
|
|
4925
|
+
);
|
|
4926
|
+
return trigger ? /* @__PURE__ */ React28.createElement(React28.Fragment, null, trigger, panel) : panel;
|
|
4927
|
+
});
|
|
4928
|
+
var Drawer = React28.forwardRef(function Drawer2(props, ref) {
|
|
4929
|
+
const t = useStrings();
|
|
4930
|
+
const density = useDensity();
|
|
4931
|
+
const own = React28.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
4932
|
+
function close() {
|
|
4933
|
+
if (props.dismissible !== false && props.onClose) props.onClose();
|
|
4934
|
+
}
|
|
4935
|
+
const modal = useModal(props.open, own, {
|
|
4936
|
+
autoFocus: props.autoFocus,
|
|
4937
|
+
onEscape: close,
|
|
4938
|
+
bodySelector: ".aura-drawer__body",
|
|
4939
|
+
footSelector: ".aura-drawer__foot",
|
|
4940
|
+
finalFocus: props.finalFocus,
|
|
4941
|
+
onCloseComplete: props.onCloseComplete
|
|
4942
|
+
});
|
|
4943
|
+
if (!modal.ready) return null;
|
|
4944
|
+
const side = props.side === "left" ? "left" : "right";
|
|
4945
|
+
const rest = omit(props, [
|
|
4946
|
+
"open",
|
|
4947
|
+
"onClose",
|
|
4948
|
+
"side",
|
|
4949
|
+
"size",
|
|
4950
|
+
"title",
|
|
4951
|
+
"description",
|
|
4952
|
+
"children",
|
|
4953
|
+
"footer",
|
|
4954
|
+
"dismissible",
|
|
4955
|
+
"dismissOnScrim",
|
|
4956
|
+
"autoFocus",
|
|
4957
|
+
"aria-label",
|
|
4958
|
+
"aria-describedby",
|
|
4959
|
+
"aria-labelledby",
|
|
4960
|
+
"className",
|
|
4961
|
+
"closeLabel",
|
|
4962
|
+
"closeProps",
|
|
4963
|
+
"finalFocus",
|
|
4964
|
+
"onCloseComplete"
|
|
4965
|
+
]);
|
|
4966
|
+
const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
|
|
4967
|
+
return (0, import_react_dom7.createPortal)(
|
|
4968
|
+
/* @__PURE__ */ React28.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React28.createElement(
|
|
4969
|
+
"div",
|
|
4970
|
+
{
|
|
4971
|
+
className: "aura-scrim",
|
|
4972
|
+
onClick: drawerScrimCloses ? close : void 0,
|
|
4973
|
+
onMouseDown: !drawerScrimCloses ? function(e) {
|
|
4974
|
+
e.preventDefault();
|
|
4975
|
+
} : void 0,
|
|
4976
|
+
"aria-hidden": true
|
|
4977
|
+
}
|
|
4978
|
+
), /* @__PURE__ */ React28.createElement(
|
|
4979
|
+
"div",
|
|
4980
|
+
{
|
|
4981
|
+
...rest,
|
|
4982
|
+
ref: merged,
|
|
4983
|
+
role: "dialog",
|
|
4984
|
+
"aria-modal": true,
|
|
4985
|
+
"aria-labelledby": props.title ? titleId : props["aria-labelledby"],
|
|
4986
|
+
"aria-label": props.title ? void 0 : props["aria-label"],
|
|
4987
|
+
"aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
|
|
4988
|
+
tabIndex: -1,
|
|
4989
|
+
className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
|
|
4990
|
+
},
|
|
4991
|
+
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(
|
|
4992
|
+
IconButton,
|
|
4993
|
+
{
|
|
4994
|
+
...props.closeProps,
|
|
4995
|
+
icon: /* @__PURE__ */ React28.createElement(IconX, null),
|
|
4996
|
+
label: props.closeLabel || t.close,
|
|
4997
|
+
onClick: function(e) {
|
|
4998
|
+
const own2 = props.closeProps && props.closeProps.onClick;
|
|
4999
|
+
if (own2) own2(e);
|
|
5000
|
+
if (!e.defaultPrevented) close();
|
|
5001
|
+
}
|
|
5002
|
+
}
|
|
5003
|
+
) : null) : null,
|
|
5004
|
+
props.description ? /* @__PURE__ */ React28.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
|
|
5005
|
+
/* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__body" }, props.children),
|
|
5006
|
+
props.footer ? /* @__PURE__ */ React28.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
|
|
5007
|
+
)),
|
|
5008
|
+
document.body
|
|
5009
|
+
);
|
|
5010
|
+
});
|
|
5011
|
+
|
|
5012
|
+
// src/Tag.tsx
|
|
5013
|
+
var React30 = __toESM(require("react"), 1);
|
|
5014
|
+
|
|
5015
|
+
// src/Tooltip.tsx
|
|
5016
|
+
var React29 = __toESM(require("react"), 1);
|
|
5017
|
+
var import_react_dom8 = require("react-dom");
|
|
5018
|
+
var Tooltip = React29.forwardRef(function Tooltip2(props, ref) {
|
|
5019
|
+
const id = uid(), st = React29.useState(false), open = props.open !== void 0 ? props.open : st[0], set = st[1];
|
|
5020
|
+
const anchor = React29.useRef(null), anchorMerged = useMergedRef(ref, anchor), tip2 = React29.useRef(null), timer2 = React29.useRef(void 0);
|
|
5021
|
+
const pos = React29.useState(null), mounted = useMounted();
|
|
5022
|
+
function show3(now) {
|
|
5023
|
+
clearTimeout(timer2.current);
|
|
5024
|
+
timer2.current = setTimeout(
|
|
5025
|
+
function() {
|
|
5026
|
+
set(true);
|
|
5027
|
+
},
|
|
5028
|
+
now ? 0 : props.delay == null ? 400 : props.delay
|
|
5029
|
+
);
|
|
5030
|
+
}
|
|
5031
|
+
function hide2() {
|
|
5032
|
+
clearTimeout(timer2.current);
|
|
5033
|
+
set(false);
|
|
5034
|
+
}
|
|
5035
|
+
function hideSoon2() {
|
|
5036
|
+
clearTimeout(timer2.current);
|
|
5037
|
+
timer2.current = setTimeout(function() {
|
|
5038
|
+
set(false);
|
|
5039
|
+
}, 120);
|
|
5040
|
+
}
|
|
5041
|
+
React29.useEffect(function() {
|
|
5042
|
+
return function() {
|
|
5043
|
+
clearTimeout(timer2.current);
|
|
5044
|
+
};
|
|
5045
|
+
}, []);
|
|
5046
|
+
function place2() {
|
|
5047
|
+
if (!anchor.current || !tip2.current) return;
|
|
5048
|
+
const r2 = anchor.current.getBoundingClientRect(), t = tip2.current.getBoundingClientRect();
|
|
5049
|
+
const vw = window.innerWidth, vh = window.innerHeight, gap = 8, m = 8;
|
|
5050
|
+
let side = props.side || "top";
|
|
5051
|
+
if (side === "top" && r2.top - t.height - gap < m && r2.bottom + gap + t.height <= vh - m) side = "bottom";
|
|
5052
|
+
else if (side === "bottom" && r2.bottom + gap + t.height > vh - m && r2.top - t.height - gap >= m) side = "top";
|
|
5053
|
+
else if (side === "left" && r2.left - t.width - gap < m && r2.right + gap + t.width <= vw - m) side = "right";
|
|
5054
|
+
else if (side === "right" && r2.right + gap + t.width > vw - m && r2.left - t.width - gap >= m) side = "left";
|
|
5055
|
+
const clampX = function(x) {
|
|
5056
|
+
return Math.max(m, Math.min(x, vw - t.width - m));
|
|
5057
|
+
};
|
|
5058
|
+
const clampY = function(y) {
|
|
5059
|
+
return Math.max(m, Math.min(y, vh - t.height - m));
|
|
5060
|
+
};
|
|
5061
|
+
let top, left;
|
|
5062
|
+
if (side === "top" || side === "bottom") {
|
|
5063
|
+
top = clampY(side === "top" ? r2.top - t.height - gap : r2.bottom + gap);
|
|
5064
|
+
left = clampX(r2.left + r2.width / 2 - t.width / 2);
|
|
5065
|
+
} else {
|
|
5066
|
+
left = side === "left" ? r2.left - t.width - gap : r2.right + gap;
|
|
5067
|
+
left = clampX(left);
|
|
5068
|
+
top = clampY(r2.top + r2.height / 2 - t.height / 2);
|
|
5069
|
+
}
|
|
5070
|
+
pos[1]({ top, left });
|
|
5071
|
+
}
|
|
5072
|
+
useIsoLayoutEffect(
|
|
5073
|
+
function() {
|
|
5074
|
+
if (!open) return;
|
|
5075
|
+
place2();
|
|
5076
|
+
window.addEventListener("scroll", place2, true);
|
|
5077
|
+
window.addEventListener("resize", place2);
|
|
5078
|
+
return function() {
|
|
5079
|
+
window.removeEventListener("scroll", place2, true);
|
|
5080
|
+
window.removeEventListener("resize", place2);
|
|
5081
|
+
};
|
|
5082
|
+
},
|
|
5083
|
+
[open, mounted]
|
|
5084
|
+
);
|
|
5085
|
+
React29.useEffect(
|
|
5086
|
+
function() {
|
|
5087
|
+
if (!open) return;
|
|
5088
|
+
function esc(e) {
|
|
5089
|
+
if (e.key === "Escape") hide2();
|
|
5090
|
+
}
|
|
5091
|
+
document.addEventListener("keydown", esc);
|
|
5092
|
+
return function() {
|
|
5093
|
+
document.removeEventListener("keydown", esc);
|
|
5094
|
+
};
|
|
5095
|
+
},
|
|
5096
|
+
[open]
|
|
5097
|
+
);
|
|
5098
|
+
const child = React29.Children.only(props.children);
|
|
5099
|
+
const trigger = /* @__PURE__ */ React29.createElement(
|
|
5100
|
+
"span",
|
|
5101
|
+
{
|
|
5102
|
+
ref: anchorMerged,
|
|
5103
|
+
className: "aura-tooltip-anchor",
|
|
5104
|
+
onMouseEnter: function() {
|
|
5105
|
+
show3(false);
|
|
5106
|
+
},
|
|
5107
|
+
onMouseLeave: hideSoon2,
|
|
5108
|
+
onFocus: function() {
|
|
5109
|
+
show3(true);
|
|
5110
|
+
},
|
|
5111
|
+
onBlur: hide2
|
|
5112
|
+
},
|
|
5113
|
+
React29.cloneElement(child, { "aria-describedby": open ? id : child.props["aria-describedby"] })
|
|
5114
|
+
);
|
|
5115
|
+
return /* @__PURE__ */ React29.createElement(React29.Fragment, null, trigger, open && mounted ? (0, import_react_dom8.createPortal)(
|
|
5116
|
+
/* @__PURE__ */ React29.createElement(
|
|
5117
|
+
"div",
|
|
5118
|
+
{
|
|
5119
|
+
ref: tip2,
|
|
5120
|
+
id,
|
|
5121
|
+
role: "tooltip",
|
|
5122
|
+
onMouseEnter: function() {
|
|
5123
|
+
clearTimeout(timer2.current);
|
|
5124
|
+
},
|
|
5125
|
+
onMouseLeave: hideSoon2,
|
|
5126
|
+
className: "aura-tooltip aura-tooltip--hoverable",
|
|
5127
|
+
style: { top: pos[0] ? pos[0].top : -9999, left: pos[0] ? pos[0].left : -9999 }
|
|
5128
|
+
},
|
|
5129
|
+
props.content
|
|
5130
|
+
),
|
|
5131
|
+
document.body
|
|
5132
|
+
) : null);
|
|
5133
|
+
});
|
|
5134
|
+
|
|
5135
|
+
// src/Tag.tsx
|
|
5136
|
+
function textOf2(node, all) {
|
|
5137
|
+
if (node == null || typeof node === "boolean") return "";
|
|
5138
|
+
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
5139
|
+
if (Array.isArray(node))
|
|
5140
|
+
return node.map(function(n3) {
|
|
5141
|
+
return textOf2(n3, all);
|
|
5142
|
+
}).join("");
|
|
5143
|
+
if (React30.isValidElement(node)) {
|
|
5144
|
+
const p = node.props;
|
|
5145
|
+
return !all && (p["aria-hidden"] === true || p["aria-hidden"] === "true") ? "" : textOf2(p.children, all);
|
|
5146
|
+
}
|
|
5147
|
+
return "";
|
|
5148
|
+
}
|
|
5149
|
+
var Tag = React30.forwardRef(function Tag2(props, ref) {
|
|
5150
|
+
const t = useStrings();
|
|
5151
|
+
const selectable = props.onClick != null || props.selected != null;
|
|
5152
|
+
const rest = omit(props, [
|
|
5153
|
+
"onRemove",
|
|
5154
|
+
"selected",
|
|
5155
|
+
"icon",
|
|
5156
|
+
"className",
|
|
5157
|
+
"children",
|
|
5158
|
+
"disabled",
|
|
4842
5159
|
"removeLabel",
|
|
4843
5160
|
"touchHeight"
|
|
4844
5161
|
]);
|
|
4845
|
-
const textRef =
|
|
5162
|
+
const textRef = React30.useRef(null);
|
|
4846
5163
|
useAutoTip();
|
|
4847
|
-
const cutState =
|
|
4848
|
-
const check =
|
|
5164
|
+
const cutState = React30.useState(false), isCut = cutState[0];
|
|
5165
|
+
const check = React30.useCallback(function() {
|
|
4849
5166
|
const el = textRef.current;
|
|
4850
5167
|
if (el) cutState[1](el.scrollWidth > el.clientWidth + 1);
|
|
4851
5168
|
}, []);
|
|
@@ -4864,11 +5181,11 @@ var Tag = React28.forwardRef(function Tag2(props, ref) {
|
|
|
4864
5181
|
);
|
|
4865
5182
|
const fullText = isCut ? textOf2(props.children, true).replace(/\s+/g, " ").trim() : "";
|
|
4866
5183
|
const inner = [
|
|
4867
|
-
props.icon ? /* @__PURE__ */
|
|
4868
|
-
/* @__PURE__ */
|
|
5184
|
+
props.icon ? /* @__PURE__ */ React30.createElement(Icon, { key: "i", name: props.icon, size: 14 }) : null,
|
|
5185
|
+
/* @__PURE__ */ React30.createElement("span", { key: "t", ref: textRef, className: "aura-tag__text", "data-aura-tip": fullText || void 0 }, props.children)
|
|
4869
5186
|
];
|
|
4870
5187
|
if (selectable) {
|
|
4871
|
-
return /* @__PURE__ */
|
|
5188
|
+
return /* @__PURE__ */ React30.createElement(
|
|
4872
5189
|
"button",
|
|
4873
5190
|
{
|
|
4874
5191
|
...rest,
|
|
@@ -4883,7 +5200,7 @@ var Tag = React28.forwardRef(function Tag2(props, ref) {
|
|
|
4883
5200
|
props.className
|
|
4884
5201
|
)
|
|
4885
5202
|
},
|
|
4886
|
-
props.selected ? /* @__PURE__ */
|
|
5203
|
+
props.selected ? /* @__PURE__ */ React30.createElement(Icon, { name: /* @__PURE__ */ React30.createElement(IconCheck, null), size: 14 }) : inner[0],
|
|
4887
5204
|
inner[1]
|
|
4888
5205
|
);
|
|
4889
5206
|
}
|
|
@@ -4893,8 +5210,8 @@ var Tag = React28.forwardRef(function Tag2(props, ref) {
|
|
|
4893
5210
|
"tag-remove-label",
|
|
4894
5211
|
'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
|
|
4895
5212
|
);
|
|
4896
|
-
return /* @__PURE__ */
|
|
4897
|
-
const btn = /* @__PURE__ */
|
|
5213
|
+
return /* @__PURE__ */ React30.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? function() {
|
|
5214
|
+
const btn = /* @__PURE__ */ React30.createElement(
|
|
4898
5215
|
"button",
|
|
4899
5216
|
{
|
|
4900
5217
|
type: "button",
|
|
@@ -4902,23 +5219,41 @@ var Tag = React28.forwardRef(function Tag2(props, ref) {
|
|
|
4902
5219
|
"aria-label": props.removeLabel || t.remove(name),
|
|
4903
5220
|
onClick: props.onRemove
|
|
4904
5221
|
},
|
|
4905
|
-
/* @__PURE__ */
|
|
5222
|
+
/* @__PURE__ */ React30.createElement(Icon, { name: /* @__PURE__ */ React30.createElement(IconX, null), size: 14 })
|
|
4906
5223
|
);
|
|
4907
|
-
return /* @__PURE__ */
|
|
5224
|
+
return /* @__PURE__ */ React30.createElement(Tooltip, { content: fullText, open: fullText ? void 0 : false }, btn);
|
|
4908
5225
|
}() : null);
|
|
4909
5226
|
});
|
|
4910
5227
|
|
|
5228
|
+
// src/breakpoints.ts
|
|
5229
|
+
var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
|
|
5230
|
+
var ORDER = ["base", "sm", "md", "lg", "xl"];
|
|
5231
|
+
function respVars(prefix, value, map2) {
|
|
5232
|
+
const style = {};
|
|
5233
|
+
if (value == null) return style;
|
|
5234
|
+
if (typeof value !== "object") value = { base: value };
|
|
5235
|
+
let byBp = value, cur2;
|
|
5236
|
+
ORDER.forEach(function(k) {
|
|
5237
|
+
if (byBp[k] !== void 0) cur2 = map2 ? map2(byBp[k]) : byBp[k];
|
|
5238
|
+
if (cur2 !== void 0) style["--" + prefix + "-" + k] = cur2;
|
|
5239
|
+
});
|
|
5240
|
+
return style;
|
|
5241
|
+
}
|
|
5242
|
+
var space = function(v) {
|
|
5243
|
+
return typeof v === "number" ? "var(--aura-space-" + v + ")" : v;
|
|
5244
|
+
};
|
|
5245
|
+
|
|
4911
5246
|
// src/FilterBar.tsx
|
|
4912
|
-
var FilterBar =
|
|
5247
|
+
var FilterBar = React31.forwardRef(function FilterBar2(props, ref) {
|
|
4913
5248
|
const t = useStrings();
|
|
4914
5249
|
const id = uid();
|
|
4915
5250
|
const hasSearch = !!props.onSearchChange;
|
|
4916
|
-
const draft =
|
|
4917
|
-
const timer2 =
|
|
4918
|
-
const sent =
|
|
4919
|
-
const onChange =
|
|
5251
|
+
const draft = React31.useState(props.search || "");
|
|
5252
|
+
const timer2 = React31.useRef(null);
|
|
5253
|
+
const sent = React31.useRef(props.search || "");
|
|
5254
|
+
const onChange = React31.useRef(props.onSearchChange);
|
|
4920
5255
|
onChange.current = props.onSearchChange;
|
|
4921
|
-
|
|
5256
|
+
React31.useEffect(
|
|
4922
5257
|
function() {
|
|
4923
5258
|
if ((props.search || "") !== sent.current) {
|
|
4924
5259
|
sent.current = props.search || "";
|
|
@@ -4927,7 +5262,7 @@ var FilterBar = React29.forwardRef(function FilterBar2(props, ref) {
|
|
|
4927
5262
|
},
|
|
4928
5263
|
[props.search]
|
|
4929
5264
|
);
|
|
4930
|
-
|
|
5265
|
+
React31.useEffect(function() {
|
|
4931
5266
|
return function() {
|
|
4932
5267
|
if (timer2.current) clearTimeout(timer2.current);
|
|
4933
5268
|
};
|
|
@@ -4950,167 +5285,172 @@ var FilterBar = React29.forwardRef(function FilterBar2(props, ref) {
|
|
|
4950
5285
|
);
|
|
4951
5286
|
}
|
|
4952
5287
|
const filters = props.filters || [];
|
|
4953
|
-
const
|
|
4954
|
-
const
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
onChange: function(e) {
|
|
4980
|
-
type(e.target.value);
|
|
4981
|
-
},
|
|
4982
|
-
onKeyDown: function(e) {
|
|
4983
|
-
if (e.key === "Enter") send(draft[0]);
|
|
4984
|
-
if (e.key === "Escape" && draft[0]) {
|
|
4985
|
-
e.preventDefault();
|
|
4986
|
-
draft[1]("");
|
|
4987
|
-
send("");
|
|
4988
|
-
}
|
|
4989
|
-
}
|
|
4990
|
-
}
|
|
4991
|
-
), draft[0] ? /* @__PURE__ */ React29.createElement(
|
|
4992
|
-
IconButton,
|
|
4993
|
-
{
|
|
4994
|
-
icon: /* @__PURE__ */ React29.createElement(IconX, null),
|
|
4995
|
-
label: t.clear((props.searchLabel || t.search).toLowerCase()),
|
|
4996
|
-
className: "aura-filterbar__clear-search",
|
|
4997
|
-
onClick: function() {
|
|
4998
|
-
draft[1]("");
|
|
4999
|
-
send("");
|
|
5000
|
-
}
|
|
5001
|
-
}
|
|
5002
|
-
) : 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),
|
|
5003
|
-
filters.length || props.onClearAll && anything ? /* @__PURE__ */ React29.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
|
|
5004
|
-
return /* @__PURE__ */ React29.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
|
|
5005
|
-
}), props.onClearAll && anything ? /* @__PURE__ */ React29.createElement(
|
|
5006
|
-
"button",
|
|
5007
|
-
{
|
|
5008
|
-
type: "button",
|
|
5009
|
-
className: "aura-filterbar__clear",
|
|
5010
|
-
onClick: function() {
|
|
5011
|
-
draft[1]("");
|
|
5012
|
-
sent.current = "";
|
|
5013
|
-
if (timer2.current) clearTimeout(timer2.current);
|
|
5014
|
-
props.onClearAll();
|
|
5015
|
-
}
|
|
5016
|
-
},
|
|
5017
|
-
t.clearFilters
|
|
5018
|
-
) : null) : null
|
|
5019
|
-
);
|
|
5020
|
-
});
|
|
5021
|
-
|
|
5022
|
-
// src/Command.tsx
|
|
5023
|
-
var React31 = __toESM(require("react"), 1);
|
|
5024
|
-
var import_react_dom8 = require("react-dom");
|
|
5025
|
-
|
|
5026
|
-
// src/useModal.tsx
|
|
5027
|
-
var React30 = __toESM(require("react"), 1);
|
|
5028
|
-
var locks = 0;
|
|
5029
|
-
var savedOverflow = "";
|
|
5030
|
-
function lockScroll() {
|
|
5031
|
-
const body = document.body;
|
|
5032
|
-
if (locks === 0) savedOverflow = body.style.overflow;
|
|
5033
|
-
locks++;
|
|
5034
|
-
body.style.overflow = "hidden";
|
|
5035
|
-
let done = false;
|
|
5036
|
-
return function() {
|
|
5037
|
-
if (done) return;
|
|
5038
|
-
done = true;
|
|
5039
|
-
locks--;
|
|
5040
|
-
if (locks === 0) body.style.overflow = savedOverflow;
|
|
5041
|
-
};
|
|
5042
|
-
}
|
|
5043
|
-
function tabbable(el) {
|
|
5044
|
-
const all = Array.prototype.filter.call(el.querySelectorAll(FOCUSABLE), function(c) {
|
|
5045
|
-
return c.tabIndex >= 0;
|
|
5046
|
-
});
|
|
5047
|
-
const shown = all.filter(function(c) {
|
|
5048
|
-
return c.getClientRects().length > 0;
|
|
5049
|
-
});
|
|
5050
|
-
return shown.length ? shown : all;
|
|
5051
|
-
}
|
|
5052
|
-
function useModal(open, ref, opts) {
|
|
5053
|
-
const mounted = useMounted();
|
|
5054
|
-
const prev = React30.useRef(null);
|
|
5055
|
-
const o = opts || {};
|
|
5056
|
-
const latest = React30.useRef(o);
|
|
5057
|
-
latest.current = o;
|
|
5058
|
-
React30.useEffect(
|
|
5288
|
+
const hasChildren = React31.Children.toArray(props.children).length > 0;
|
|
5289
|
+
const collapse = props.collapseBelow && hasChildren ? props.collapseBelow : null;
|
|
5290
|
+
const sheet = React31.useState(false), open = !!collapse && sheet[0];
|
|
5291
|
+
const sheetId = id + "-filters";
|
|
5292
|
+
const doneRef = React31.useRef(null), moreRef = React31.useRef(null), own = React31.useRef(null), rootRef = useMergedRef(ref, own);
|
|
5293
|
+
if (collapse)
|
|
5294
|
+
React31.Children.forEach(props.children, function(c) {
|
|
5295
|
+
if (!React31.isValidElement(c) || c.type === Button || c.type === IconButton) return;
|
|
5296
|
+
const p = c.props;
|
|
5297
|
+
if (p.defaultValue !== void 0 || p.defaultChecked !== void 0 || "label" in p && !("value" in p) && !("selected" in p) && !("checked" in p))
|
|
5298
|
+
devWarnOnce(
|
|
5299
|
+
"filterbar-uncontrolled",
|
|
5300
|
+
"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`."
|
|
5301
|
+
);
|
|
5302
|
+
});
|
|
5303
|
+
function backTo() {
|
|
5304
|
+
const m = moreRef.current;
|
|
5305
|
+
if (m && m.getClientRects().length) return m;
|
|
5306
|
+
const bar = own.current;
|
|
5307
|
+
if (!bar) return null;
|
|
5308
|
+
return bar.querySelector(
|
|
5309
|
+
'.aura-filterbar__controls :is(button, input, select, [tabindex]):not([disabled]):not([tabindex="-1"])'
|
|
5310
|
+
) || bar.querySelector(".aura-filterbar__search input");
|
|
5311
|
+
}
|
|
5312
|
+
const applied = props.filterCount != null ? props.filterCount : filters.length;
|
|
5313
|
+
React31.useEffect(
|
|
5059
5314
|
function() {
|
|
5060
|
-
if (!open || !
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
}).join(",");
|
|
5069
|
-
const list = el.querySelectorAll(sel);
|
|
5070
|
-
for (let i = 0; i < list.length; i++)
|
|
5071
|
-
if (list[i].tabIndex >= 0 && list[i].getClientRects().length > 0) return list[i];
|
|
5072
|
-
return null;
|
|
5073
|
-
};
|
|
5074
|
-
const target = el && (el.querySelector("[data-autofocus]") || firstIn(o.bodySelector) || firstIn(o.footSelector) || el);
|
|
5075
|
-
if (target && o.autoFocus !== false) target.focus();
|
|
5315
|
+
if (!open || !collapse || typeof window.matchMedia !== "function") return;
|
|
5316
|
+
const mq = window.matchMedia("(min-width: " + breakpoints[collapse] + "px)");
|
|
5317
|
+
function check() {
|
|
5318
|
+
if (mq.matches) sheet[1](false);
|
|
5319
|
+
}
|
|
5320
|
+
check();
|
|
5321
|
+
if (mq.addEventListener) mq.addEventListener("change", check);
|
|
5322
|
+
else mq.addListener(check);
|
|
5076
5323
|
return function() {
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
const ff = l.finalFocus;
|
|
5080
|
-
const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
|
|
5081
|
-
const back = to && to.isConnected ? to : prev.current;
|
|
5082
|
-
if (back && back.focus) back.focus();
|
|
5083
|
-
if (l.onCloseComplete) l.onCloseComplete();
|
|
5324
|
+
if (mq.removeEventListener) mq.removeEventListener("change", check);
|
|
5325
|
+
else mq.removeListener(check);
|
|
5084
5326
|
};
|
|
5085
5327
|
},
|
|
5086
|
-
[open,
|
|
5087
|
-
);
|
|
5088
|
-
function
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5328
|
+
[open, collapse]
|
|
5329
|
+
);
|
|
5330
|
+
function clearAll() {
|
|
5331
|
+
draft[1]("");
|
|
5332
|
+
sent.current = "";
|
|
5333
|
+
if (timer2.current) clearTimeout(timer2.current);
|
|
5334
|
+
props.onClearAll();
|
|
5335
|
+
}
|
|
5336
|
+
const anything = filters.length > 0 || !!(props.search || draft[0]);
|
|
5337
|
+
const count = props.resultCount == null ? null : typeof props.resultCount === "number" ? t.results(props.resultCount) : props.resultCount;
|
|
5338
|
+
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(
|
|
5339
|
+
"input",
|
|
5340
|
+
{
|
|
5341
|
+
id,
|
|
5342
|
+
type: "search",
|
|
5343
|
+
className: "aura-input__control",
|
|
5344
|
+
"aria-label": props.searchLabel || t.search,
|
|
5345
|
+
placeholder: props.searchPlaceholder || props.searchLabel || t.search,
|
|
5346
|
+
value: draft[0],
|
|
5347
|
+
onChange: function(e) {
|
|
5348
|
+
type(e.target.value);
|
|
5349
|
+
},
|
|
5350
|
+
onKeyDown: function(e) {
|
|
5351
|
+
if (e.key === "Enter") send(draft[0]);
|
|
5352
|
+
if (e.key === "Escape" && draft[0]) {
|
|
5353
|
+
e.preventDefault();
|
|
5354
|
+
draft[1]("");
|
|
5355
|
+
send("");
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5100
5358
|
}
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5359
|
+
), draft[0] ? /* @__PURE__ */ React31.createElement(
|
|
5360
|
+
IconButton,
|
|
5361
|
+
{
|
|
5362
|
+
icon: /* @__PURE__ */ React31.createElement(IconX, null),
|
|
5363
|
+
label: t.clear((props.searchLabel || t.search).toLowerCase()),
|
|
5364
|
+
className: "aura-filterbar__clear-search",
|
|
5365
|
+
onClick: function() {
|
|
5366
|
+
draft[1]("");
|
|
5367
|
+
send("");
|
|
5368
|
+
}
|
|
5108
5369
|
}
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5370
|
+
) : null) : null;
|
|
5371
|
+
const more = collapse ? /* @__PURE__ */ React31.createElement(
|
|
5372
|
+
Button,
|
|
5373
|
+
{
|
|
5374
|
+
ref: moreRef,
|
|
5375
|
+
variant: "secondary",
|
|
5376
|
+
icon: /* @__PURE__ */ React31.createElement(IconSlidersHorizontal, null),
|
|
5377
|
+
className: "aura-filterbar__more",
|
|
5378
|
+
"aria-haspopup": "dialog",
|
|
5379
|
+
"aria-expanded": open,
|
|
5380
|
+
"aria-controls": open ? sheetId : void 0,
|
|
5381
|
+
onClick: function() {
|
|
5382
|
+
sheet[1](true);
|
|
5383
|
+
}
|
|
5384
|
+
},
|
|
5385
|
+
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
|
|
5386
|
+
) : null;
|
|
5387
|
+
return /* @__PURE__ */ React31.createElement(
|
|
5388
|
+
"div",
|
|
5389
|
+
{
|
|
5390
|
+
ref: rootRef,
|
|
5391
|
+
role: "region",
|
|
5392
|
+
"aria-label": props.label || t.filters,
|
|
5393
|
+
className: cx(
|
|
5394
|
+
"aura-filterbar",
|
|
5395
|
+
props.searchGrow && "aura-filterbar--grow",
|
|
5396
|
+
props.controlsLayout === "fill" && "aura-filterbar--fill",
|
|
5397
|
+
props.stackBelow === "lg" && "aura-filterbar--stack-lg",
|
|
5398
|
+
collapse && "aura-filterbar--collapse-" + collapse,
|
|
5399
|
+
touchClass(props.touchHeight),
|
|
5400
|
+
props.className
|
|
5401
|
+
)
|
|
5402
|
+
},
|
|
5403
|
+
/* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__row" }, collapse ? (
|
|
5404
|
+
/* 5.42: the search and the Filters button share a row of their own below the breakpoint (count and actions
|
|
5405
|
+
* wrap under them); from the breakpoint up this box is display: contents and the bar is as before. */
|
|
5406
|
+
/* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__lead" }, searchBox, more)
|
|
5407
|
+
) : 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),
|
|
5408
|
+
filters.length || props.onClearAll && anything ? /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar__chips" }, filters.map(function(f) {
|
|
5409
|
+
return /* @__PURE__ */ React31.createElement(Tag, { key: f.id, onRemove: f.onRemove }, f.label);
|
|
5410
|
+
}), props.onClearAll && anything ? /* @__PURE__ */ React31.createElement("button", { type: "button", className: "aura-filterbar__clear", onClick: clearAll }, t.clearFilters) : null) : null,
|
|
5411
|
+
collapse ? /* @__PURE__ */ React31.createElement(
|
|
5412
|
+
Dialog,
|
|
5413
|
+
{
|
|
5414
|
+
open,
|
|
5415
|
+
onClose: function() {
|
|
5416
|
+
sheet[1](false);
|
|
5417
|
+
},
|
|
5418
|
+
id: sheetId,
|
|
5419
|
+
finalFocus: backTo,
|
|
5420
|
+
title: t.filters,
|
|
5421
|
+
size: "sm",
|
|
5422
|
+
className: "aura-filterbar__sheet",
|
|
5423
|
+
footer: /* @__PURE__ */ React31.createElement(React31.Fragment, null, props.onClearAll && filters.length ? /* @__PURE__ */ React31.createElement(
|
|
5424
|
+
Button,
|
|
5425
|
+
{
|
|
5426
|
+
variant: "secondary",
|
|
5427
|
+
touchHeight: true,
|
|
5428
|
+
onClick: function() {
|
|
5429
|
+
clearAll();
|
|
5430
|
+
if (doneRef.current) doneRef.current.focus();
|
|
5431
|
+
}
|
|
5432
|
+
},
|
|
5433
|
+
t.clearFilters
|
|
5434
|
+
) : null, /* @__PURE__ */ React31.createElement(
|
|
5435
|
+
Button,
|
|
5436
|
+
{
|
|
5437
|
+
ref: doneRef,
|
|
5438
|
+
touchHeight: true,
|
|
5439
|
+
onClick: function() {
|
|
5440
|
+
sheet[1](false);
|
|
5441
|
+
}
|
|
5442
|
+
},
|
|
5443
|
+
t.done
|
|
5444
|
+
))
|
|
5445
|
+
},
|
|
5446
|
+
/* @__PURE__ */ React31.createElement(FilterSheet.Provider, { value: true }, /* @__PURE__ */ React31.createElement("div", { className: "aura-filterbar aura-filterbar--sheet is-touch-always" }, props.children))
|
|
5447
|
+
) : null
|
|
5448
|
+
);
|
|
5449
|
+
});
|
|
5112
5450
|
|
|
5113
5451
|
// src/Command.tsx
|
|
5452
|
+
var React32 = __toESM(require("react"), 1);
|
|
5453
|
+
var import_react_dom9 = require("react-dom");
|
|
5114
5454
|
function isMac() {
|
|
5115
5455
|
return typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
|
|
5116
5456
|
}
|
|
@@ -5118,21 +5458,21 @@ function Command(props) {
|
|
|
5118
5458
|
const t = useStrings();
|
|
5119
5459
|
const density = useDensity();
|
|
5120
5460
|
const id = uid(), listId = id + "-list";
|
|
5121
|
-
const box =
|
|
5122
|
-
const input =
|
|
5123
|
-
const qState =
|
|
5461
|
+
const box = React32.useRef(null);
|
|
5462
|
+
const input = React32.useRef(null);
|
|
5463
|
+
const qState = React32.useState(""), act = React32.useState(null);
|
|
5124
5464
|
const query = props.query !== void 0 ? props.query : qState[0];
|
|
5125
5465
|
function setQuery(v) {
|
|
5126
5466
|
if (props.query === void 0) qState[1](v);
|
|
5127
5467
|
if (props.onQueryChange) props.onQueryChange(v);
|
|
5128
5468
|
}
|
|
5129
|
-
const openRef =
|
|
5469
|
+
const openRef = React32.useRef(props.open);
|
|
5130
5470
|
openRef.current = props.open;
|
|
5131
5471
|
const close = function() {
|
|
5132
5472
|
props.onOpenChange(false);
|
|
5133
5473
|
};
|
|
5134
5474
|
const modal = useModal(props.open, box, { onEscape: close });
|
|
5135
|
-
|
|
5475
|
+
React32.useEffect(
|
|
5136
5476
|
function() {
|
|
5137
5477
|
if (props.hotkey === false) return;
|
|
5138
5478
|
function onKey2(e) {
|
|
@@ -5148,7 +5488,7 @@ function Command(props) {
|
|
|
5148
5488
|
},
|
|
5149
5489
|
[props.hotkey, props.onOpenChange]
|
|
5150
5490
|
);
|
|
5151
|
-
|
|
5491
|
+
React32.useEffect(
|
|
5152
5492
|
function() {
|
|
5153
5493
|
if (!props.open) {
|
|
5154
5494
|
if (query) setQuery("");
|
|
@@ -5188,7 +5528,7 @@ function Command(props) {
|
|
|
5188
5528
|
const optId = function(i2) {
|
|
5189
5529
|
return id + "-o" + i2;
|
|
5190
5530
|
};
|
|
5191
|
-
|
|
5531
|
+
React32.useEffect(
|
|
5192
5532
|
function() {
|
|
5193
5533
|
if (!box.current || active < 0) return;
|
|
5194
5534
|
const el = box.current.querySelector("#" + CSS.escape(optId(active)));
|
|
@@ -5232,8 +5572,8 @@ function Command(props) {
|
|
|
5232
5572
|
}
|
|
5233
5573
|
if (!modal.ready) return null;
|
|
5234
5574
|
let i = -1;
|
|
5235
|
-
return (0,
|
|
5236
|
-
/* @__PURE__ */
|
|
5575
|
+
return (0, import_react_dom9.createPortal)(
|
|
5576
|
+
/* @__PURE__ */ React32.createElement(
|
|
5237
5577
|
"div",
|
|
5238
5578
|
{
|
|
5239
5579
|
className: "aura-dialog-layer aura-command-layer",
|
|
@@ -5243,8 +5583,8 @@ function Command(props) {
|
|
|
5243
5583
|
e.stopPropagation();
|
|
5244
5584
|
}
|
|
5245
5585
|
},
|
|
5246
|
-
/* @__PURE__ */
|
|
5247
|
-
/* @__PURE__ */
|
|
5586
|
+
/* @__PURE__ */ React32.createElement("div", { className: "aura-scrim", onClick: close, "aria-hidden": true }),
|
|
5587
|
+
/* @__PURE__ */ React32.createElement(
|
|
5248
5588
|
"div",
|
|
5249
5589
|
{
|
|
5250
5590
|
ref: box,
|
|
@@ -5254,7 +5594,7 @@ function Command(props) {
|
|
|
5254
5594
|
tabIndex: -1,
|
|
5255
5595
|
className: cx("aura-command", props.className)
|
|
5256
5596
|
},
|
|
5257
|
-
/* @__PURE__ */
|
|
5597
|
+
/* @__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(
|
|
5258
5598
|
"input",
|
|
5259
5599
|
{
|
|
5260
5600
|
ref: input,
|
|
@@ -5277,8 +5617,8 @@ function Command(props) {
|
|
|
5277
5617
|
},
|
|
5278
5618
|
onKeyDown: onKey
|
|
5279
5619
|
}
|
|
5280
|
-
), /* @__PURE__ */
|
|
5281
|
-
/* @__PURE__ */
|
|
5620
|
+
), /* @__PURE__ */ React32.createElement("kbd", { className: "aura-command__kbd" }, "Esc")),
|
|
5621
|
+
/* @__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(
|
|
5282
5622
|
"div",
|
|
5283
5623
|
{
|
|
5284
5624
|
id: listId,
|
|
@@ -5288,7 +5628,7 @@ function Command(props) {
|
|
|
5288
5628
|
},
|
|
5289
5629
|
groups.map(function(g, gi) {
|
|
5290
5630
|
const gid = id + "-g" + gi;
|
|
5291
|
-
return /* @__PURE__ */
|
|
5631
|
+
return /* @__PURE__ */ React32.createElement(
|
|
5292
5632
|
"div",
|
|
5293
5633
|
{
|
|
5294
5634
|
key: g.name || gi,
|
|
@@ -5296,11 +5636,11 @@ function Command(props) {
|
|
|
5296
5636
|
"aria-labelledby": g.name ? gid : void 0,
|
|
5297
5637
|
className: "aura-command__group"
|
|
5298
5638
|
},
|
|
5299
|
-
g.name ? /* @__PURE__ */
|
|
5639
|
+
g.name ? /* @__PURE__ */ React32.createElement("div", { className: "aura-command__heading", id: gid, role: "presentation" }, g.name) : null,
|
|
5300
5640
|
g.items.map(function(it) {
|
|
5301
5641
|
i++;
|
|
5302
5642
|
const n3 = i;
|
|
5303
|
-
return /* @__PURE__ */
|
|
5643
|
+
return /* @__PURE__ */ React32.createElement(
|
|
5304
5644
|
"div",
|
|
5305
5645
|
{
|
|
5306
5646
|
key: it.id,
|
|
@@ -5324,210 +5664,22 @@ function Command(props) {
|
|
|
5324
5664
|
run(it);
|
|
5325
5665
|
}
|
|
5326
5666
|
},
|
|
5327
|
-
it.icon ? /* @__PURE__ */
|
|
5328
|
-
/* @__PURE__ */
|
|
5329
|
-
it.shortcut ? /* @__PURE__ */
|
|
5667
|
+
it.icon ? /* @__PURE__ */ React32.createElement(Icon, { name: it.icon }) : null,
|
|
5668
|
+
/* @__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),
|
|
5669
|
+
it.shortcut ? /* @__PURE__ */ React32.createElement("kbd", { className: "aura-command__kbd", id: it.description ? optId(n3) + "-kbd" : void 0 }, it.shortcut) : null
|
|
5330
5670
|
);
|
|
5331
5671
|
})
|
|
5332
5672
|
);
|
|
5333
5673
|
})
|
|
5334
5674
|
)),
|
|
5335
|
-
/* @__PURE__ */
|
|
5336
|
-
/* @__PURE__ */
|
|
5675
|
+
/* @__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) : ""),
|
|
5676
|
+
/* @__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"))
|
|
5337
5677
|
)
|
|
5338
5678
|
),
|
|
5339
5679
|
document.body
|
|
5340
5680
|
);
|
|
5341
5681
|
}
|
|
5342
5682
|
|
|
5343
|
-
// src/Dialog.tsx
|
|
5344
|
-
var React32 = __toESM(require("react"), 1);
|
|
5345
|
-
var import_react_dom9 = require("react-dom");
|
|
5346
|
-
var DialogClose = React32.createContext(null);
|
|
5347
|
-
function useDialogClose() {
|
|
5348
|
-
return React32.useContext(DialogClose) || function() {
|
|
5349
|
-
};
|
|
5350
|
-
}
|
|
5351
|
-
var Dialog = React32.forwardRef(function Dialog2(props, ref) {
|
|
5352
|
-
const t = useStrings();
|
|
5353
|
-
const density = useDensity();
|
|
5354
|
-
const own = React32.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
5355
|
-
const openState = useMaybeControlled(props.open, false, null), open = openState[0];
|
|
5356
|
-
if (props.open === void 0 && !props.trigger)
|
|
5357
|
-
devWarnOnce("dialog-no-open", "Dialog has neither `open` nor `trigger`, so it can never open. Pass one of them.");
|
|
5358
|
-
const trigId = uid();
|
|
5359
|
-
function closeNow() {
|
|
5360
|
-
if (props.open === void 0) openState[1](false);
|
|
5361
|
-
if (props.onClose) props.onClose();
|
|
5362
|
-
}
|
|
5363
|
-
function close() {
|
|
5364
|
-
if (props.dismissible === false) return;
|
|
5365
|
-
closeNow();
|
|
5366
|
-
}
|
|
5367
|
-
const scrimCloses = props.dismissible !== false && (props.dismissOnScrim !== void 0 ? props.dismissOnScrim : props.role !== "alertdialog");
|
|
5368
|
-
const modal = useModal(open, own, {
|
|
5369
|
-
autoFocus: props.autoFocus,
|
|
5370
|
-
onEscape: close,
|
|
5371
|
-
bodySelector: ".aura-dialog__body",
|
|
5372
|
-
footSelector: ".aura-dialog__foot",
|
|
5373
|
-
/* With a trigger, focus goes back to it even where a click doesn't focus buttons (Safari). */
|
|
5374
|
-
finalFocus: props.trigger ? function() {
|
|
5375
|
-
const ff = props.finalFocus;
|
|
5376
|
-
const to = ff ? typeof ff === "function" ? ff() : ff.current : null;
|
|
5377
|
-
return to || document.querySelector('[data-aura-trigger="' + trigId + '"]');
|
|
5378
|
-
} : props.finalFocus,
|
|
5379
|
-
onCloseComplete: props.onCloseComplete
|
|
5380
|
-
});
|
|
5381
|
-
const trig = props.trigger;
|
|
5382
|
-
const trigger = trig && React32.isValidElement(trig) ? React32.cloneElement(trig, {
|
|
5383
|
-
"aria-haspopup": "dialog",
|
|
5384
|
-
"aria-expanded": open,
|
|
5385
|
-
"data-aura-trigger": trigId,
|
|
5386
|
-
onClick: function(e) {
|
|
5387
|
-
const own2 = trig.props.onClick;
|
|
5388
|
-
if (own2) own2(e);
|
|
5389
|
-
if (e.defaultPrevented) return;
|
|
5390
|
-
if (props.open === void 0) openState[1](true);
|
|
5391
|
-
if (props.onOpen) props.onOpen();
|
|
5392
|
-
}
|
|
5393
|
-
}) : null;
|
|
5394
|
-
if (!modal.ready) return trigger;
|
|
5395
|
-
const rest = omit(props, [
|
|
5396
|
-
"open",
|
|
5397
|
-
"onClose",
|
|
5398
|
-
"title",
|
|
5399
|
-
"description",
|
|
5400
|
-
"children",
|
|
5401
|
-
"footer",
|
|
5402
|
-
"size",
|
|
5403
|
-
"dismissible",
|
|
5404
|
-
"dismissOnScrim",
|
|
5405
|
-
"role",
|
|
5406
|
-
"autoFocus",
|
|
5407
|
-
"className",
|
|
5408
|
-
"trigger",
|
|
5409
|
-
"onOpen",
|
|
5410
|
-
"finalFocus",
|
|
5411
|
-
"onCloseComplete",
|
|
5412
|
-
"aria-labelledby",
|
|
5413
|
-
"aria-describedby",
|
|
5414
|
-
"aria-modal"
|
|
5415
|
-
]);
|
|
5416
|
-
const panel = (0, import_react_dom9.createPortal)(
|
|
5417
|
-
/* @__PURE__ */ React32.createElement("div", { className: "aura-dialog-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React32.createElement(
|
|
5418
|
-
"div",
|
|
5419
|
-
{
|
|
5420
|
-
className: "aura-scrim",
|
|
5421
|
-
onClick: scrimCloses ? close : void 0,
|
|
5422
|
-
onMouseDown: scrimCloses ? void 0 : function(e) {
|
|
5423
|
-
e.preventDefault();
|
|
5424
|
-
},
|
|
5425
|
-
"aria-hidden": true
|
|
5426
|
-
}
|
|
5427
|
-
), /* @__PURE__ */ React32.createElement(
|
|
5428
|
-
"div",
|
|
5429
|
-
{
|
|
5430
|
-
...rest,
|
|
5431
|
-
ref: merged,
|
|
5432
|
-
role: props.role || "dialog",
|
|
5433
|
-
"aria-modal": true,
|
|
5434
|
-
"aria-labelledby": titleId,
|
|
5435
|
-
"aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
|
|
5436
|
-
tabIndex: -1,
|
|
5437
|
-
className: cx("aura-dialog", "aura-dialog--" + (props.size || "md"), props.className)
|
|
5438
|
-
},
|
|
5439
|
-
/* @__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),
|
|
5440
|
-
props.description ? /* @__PURE__ */ React32.createElement("p", { className: "aura-dialog__desc", id: descId }, props.description) : null,
|
|
5441
|
-
/* @__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)
|
|
5442
|
-
)),
|
|
5443
|
-
document.body
|
|
5444
|
-
);
|
|
5445
|
-
return trigger ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, trigger, panel) : panel;
|
|
5446
|
-
});
|
|
5447
|
-
var Drawer = React32.forwardRef(function Drawer2(props, ref) {
|
|
5448
|
-
const t = useStrings();
|
|
5449
|
-
const density = useDensity();
|
|
5450
|
-
const own = React32.useRef(null), merged = useMergedRef(ref, own), titleId = uid(), descId = uid();
|
|
5451
|
-
function close() {
|
|
5452
|
-
if (props.dismissible !== false && props.onClose) props.onClose();
|
|
5453
|
-
}
|
|
5454
|
-
const modal = useModal(props.open, own, {
|
|
5455
|
-
autoFocus: props.autoFocus,
|
|
5456
|
-
onEscape: close,
|
|
5457
|
-
bodySelector: ".aura-drawer__body",
|
|
5458
|
-
footSelector: ".aura-drawer__foot",
|
|
5459
|
-
finalFocus: props.finalFocus,
|
|
5460
|
-
onCloseComplete: props.onCloseComplete
|
|
5461
|
-
});
|
|
5462
|
-
if (!modal.ready) return null;
|
|
5463
|
-
const side = props.side === "left" ? "left" : "right";
|
|
5464
|
-
const rest = omit(props, [
|
|
5465
|
-
"open",
|
|
5466
|
-
"onClose",
|
|
5467
|
-
"side",
|
|
5468
|
-
"size",
|
|
5469
|
-
"title",
|
|
5470
|
-
"description",
|
|
5471
|
-
"children",
|
|
5472
|
-
"footer",
|
|
5473
|
-
"dismissible",
|
|
5474
|
-
"dismissOnScrim",
|
|
5475
|
-
"autoFocus",
|
|
5476
|
-
"aria-label",
|
|
5477
|
-
"aria-describedby",
|
|
5478
|
-
"aria-labelledby",
|
|
5479
|
-
"className",
|
|
5480
|
-
"closeLabel",
|
|
5481
|
-
"closeProps",
|
|
5482
|
-
"finalFocus",
|
|
5483
|
-
"onCloseComplete"
|
|
5484
|
-
]);
|
|
5485
|
-
const drawerScrimCloses = props.dismissible !== false && props.dismissOnScrim !== false;
|
|
5486
|
-
return (0, import_react_dom9.createPortal)(
|
|
5487
|
-
/* @__PURE__ */ React32.createElement("div", { className: "aura-dialog-layer aura-drawer-layer", "data-density": density, onKeyDown: modal.onKeyDown }, /* @__PURE__ */ React32.createElement(
|
|
5488
|
-
"div",
|
|
5489
|
-
{
|
|
5490
|
-
className: "aura-scrim",
|
|
5491
|
-
onClick: drawerScrimCloses ? close : void 0,
|
|
5492
|
-
onMouseDown: !drawerScrimCloses ? function(e) {
|
|
5493
|
-
e.preventDefault();
|
|
5494
|
-
} : void 0,
|
|
5495
|
-
"aria-hidden": true
|
|
5496
|
-
}
|
|
5497
|
-
), /* @__PURE__ */ React32.createElement(
|
|
5498
|
-
"div",
|
|
5499
|
-
{
|
|
5500
|
-
...rest,
|
|
5501
|
-
ref: merged,
|
|
5502
|
-
role: "dialog",
|
|
5503
|
-
"aria-modal": true,
|
|
5504
|
-
"aria-labelledby": props.title ? titleId : props["aria-labelledby"],
|
|
5505
|
-
"aria-label": props.title ? void 0 : props["aria-label"],
|
|
5506
|
-
"aria-describedby": cx(props.description ? descId : "", props["aria-describedby"]) || void 0,
|
|
5507
|
-
tabIndex: -1,
|
|
5508
|
-
className: cx("aura-drawer", "aura-drawer--" + side, "aura-drawer--" + (props.size || "md"), props.className)
|
|
5509
|
-
},
|
|
5510
|
-
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(
|
|
5511
|
-
IconButton,
|
|
5512
|
-
{
|
|
5513
|
-
...props.closeProps,
|
|
5514
|
-
icon: /* @__PURE__ */ React32.createElement(IconX, null),
|
|
5515
|
-
label: props.closeLabel || t.close,
|
|
5516
|
-
onClick: function(e) {
|
|
5517
|
-
const own2 = props.closeProps && props.closeProps.onClick;
|
|
5518
|
-
if (own2) own2(e);
|
|
5519
|
-
if (!e.defaultPrevented) close();
|
|
5520
|
-
}
|
|
5521
|
-
}
|
|
5522
|
-
) : null) : null,
|
|
5523
|
-
props.description ? /* @__PURE__ */ React32.createElement("p", { className: "aura-drawer__desc", id: descId }, props.description) : null,
|
|
5524
|
-
/* @__PURE__ */ React32.createElement("div", { className: "aura-drawer__body" }, props.children),
|
|
5525
|
-
props.footer ? /* @__PURE__ */ React32.createElement("div", { className: "aura-drawer__foot" }, props.footer) : null
|
|
5526
|
-
)),
|
|
5527
|
-
document.body
|
|
5528
|
-
);
|
|
5529
|
-
});
|
|
5530
|
-
|
|
5531
5683
|
// src/DataTable.tsx
|
|
5532
5684
|
var React33 = __toESM(require("react"), 1);
|
|
5533
5685
|
var import_react_dom10 = require("react-dom");
|
|
@@ -7565,26 +7717,6 @@ var React40 = __toESM(require("react"), 1);
|
|
|
7565
7717
|
|
|
7566
7718
|
// src/responsive.tsx
|
|
7567
7719
|
var React39 = __toESM(require("react"), 1);
|
|
7568
|
-
|
|
7569
|
-
// src/breakpoints.ts
|
|
7570
|
-
var breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
|
|
7571
|
-
var ORDER = ["base", "sm", "md", "lg", "xl"];
|
|
7572
|
-
function respVars(prefix, value, map2) {
|
|
7573
|
-
const style = {};
|
|
7574
|
-
if (value == null) return style;
|
|
7575
|
-
if (typeof value !== "object") value = { base: value };
|
|
7576
|
-
let byBp = value, cur2;
|
|
7577
|
-
ORDER.forEach(function(k) {
|
|
7578
|
-
if (byBp[k] !== void 0) cur2 = map2 ? map2(byBp[k]) : byBp[k];
|
|
7579
|
-
if (cur2 !== void 0) style["--" + prefix + "-" + k] = cur2;
|
|
7580
|
-
});
|
|
7581
|
-
return style;
|
|
7582
|
-
}
|
|
7583
|
-
var space = function(v) {
|
|
7584
|
-
return typeof v === "number" ? "var(--aura-space-" + v + ")" : v;
|
|
7585
|
-
};
|
|
7586
|
-
|
|
7587
|
-
// src/responsive.tsx
|
|
7588
7720
|
var ORDER2 = ["base", "sm", "md", "lg", "xl"];
|
|
7589
7721
|
function useBreakpoint() {
|
|
7590
7722
|
return React39.useSyncExternalStore(subscribe, current, function() {
|
|
@@ -7680,6 +7812,8 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
|
|
|
7680
7812
|
});
|
|
7681
7813
|
const level = props.headingLevel || 1;
|
|
7682
7814
|
const below2 = props.actionsFullWidthBelow;
|
|
7815
|
+
const hide2 = props.titleHideBelow;
|
|
7816
|
+
const hasMeta = props.meta != null && props.meta !== false;
|
|
7683
7817
|
return h8(
|
|
7684
7818
|
"div",
|
|
7685
7819
|
Object.assign(attrs2, {
|
|
@@ -7687,6 +7821,8 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
|
|
|
7687
7821
|
className: cx(
|
|
7688
7822
|
"aura-page-header",
|
|
7689
7823
|
(below2 === "sm" || below2 === "md" || below2 === "lg") && "aura-page-header--actions-full-below-" + below2,
|
|
7824
|
+
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && "aura-page-header--title-hide-below-" + hide2,
|
|
7825
|
+
(hide2 === "sm" || hide2 === "md" || hide2 === "lg") && !hasMeta && "has-no-meta",
|
|
7690
7826
|
props.className
|
|
7691
7827
|
),
|
|
7692
7828
|
style: props.style
|
|
@@ -8165,6 +8301,7 @@ var AppShell = React47.forwardRef(function AppShell2(props, ref) {
|
|
|
8165
8301
|
className: cx(
|
|
8166
8302
|
"aura-shell__bar",
|
|
8167
8303
|
(!props.header || props.headerHideFrom === "lg") && "aura-shell__bar--menu-only",
|
|
8304
|
+
!props.header && "aura-shell__bar--no-header",
|
|
8168
8305
|
props.headerHideOnScroll && "aura-shell__bar--hides",
|
|
8169
8306
|
away && "is-away"
|
|
8170
8307
|
)
|