@jirawatpyk/aura-react 5.8.0 → 5.9.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.
Files changed (63) hide show
  1. package/README.md +27 -0
  2. package/dist/aura.bundle.js +1485 -1085
  3. package/dist/cjs/index.cjs +1485 -1085
  4. package/dist/esm/Accordion.js +2 -1
  5. package/dist/esm/Alert.js +2 -1
  6. package/dist/esm/AppShell.js +2 -1
  7. package/dist/esm/Breadcrumb.js +2 -1
  8. package/dist/esm/Button.js +2 -1
  9. package/dist/esm/Checkbox.js +2 -1
  10. package/dist/esm/Combobox.js +7 -6
  11. package/dist/esm/Command.js +3 -2
  12. package/dist/esm/DataTable.js +35 -13
  13. package/dist/esm/DatePicker.js +8 -7
  14. package/dist/esm/Dialog.js +38 -5
  15. package/dist/esm/Field.js +2 -1
  16. package/dist/esm/FileUpload.js +4 -3
  17. package/dist/esm/FilterBar.js +3 -2
  18. package/dist/esm/FormErrorSummary.js +2 -1
  19. package/dist/esm/Icon.js +50 -31
  20. package/dist/esm/Menu.js +2 -1
  21. package/dist/esm/NumberField.js +3 -2
  22. package/dist/esm/Pagination.js +3 -2
  23. package/dist/esm/PasswordField.js +2 -1
  24. package/dist/esm/Popover.js +2 -1
  25. package/dist/esm/RadioGroup.js +2 -1
  26. package/dist/esm/Select.js +4 -3
  27. package/dist/esm/SideNav.js +3 -2
  28. package/dist/esm/Stat.js +8 -1
  29. package/dist/esm/Stepper.js +2 -1
  30. package/dist/esm/Tabs.js +79 -9
  31. package/dist/esm/Tag.js +3 -2
  32. package/dist/esm/TimePicker.js +5 -4
  33. package/dist/esm/Toaster.js +3 -2
  34. package/dist/esm/classes.js +14 -1
  35. package/dist/esm/colorScheme.js +8 -1
  36. package/dist/esm/display.js +22 -12
  37. package/dist/esm/iconSvg.js +53 -0
  38. package/dist/esm/icons.js +531 -0
  39. package/dist/esm/index.js +2 -1
  40. package/dist/esm/internal.js +1 -14
  41. package/dist/esm/locale.js +7 -0
  42. package/dist/esm/strings.js +4 -245
  43. package/dist/esm/strings.sv.js +127 -0
  44. package/dist/esm/strings.th.js +127 -0
  45. package/dist/icons/index.cjs +613 -0
  46. package/dist/icons/index.d.cts +106 -0
  47. package/dist/icons/index.d.ts +106 -0
  48. package/dist/index.d.cts +44 -2
  49. package/dist/index.d.ts +44 -2
  50. package/dist/locales/sv.cjs +149 -0
  51. package/dist/locales/sv.d.cts +96 -0
  52. package/dist/locales/sv.d.ts +96 -0
  53. package/dist/locales/th.cjs +149 -0
  54. package/dist/locales/th.d.cts +96 -0
  55. package/dist/locales/th.d.ts +96 -0
  56. package/dist/server/index.cjs +445 -314
  57. package/dist/server/index.d.cts +24 -0
  58. package/dist/server/index.d.ts +24 -0
  59. package/dist/server/index.js +445 -314
  60. package/dist/styles.css +1 -0
  61. package/dist/styles.layer.css +1 -0
  62. package/package.json +35 -3
  63. package/scripts/aura-icons-codemod.mjs +345 -0
package/dist/esm/Icon.js CHANGED
@@ -1,12 +1,47 @@
1
1
  'use client';
2
2
  import * as React from "react";
3
- import { cx } from "./classes.js";
4
- const h = React.createElement;
5
- const ICONS = { "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" }]] };
6
- const SIZES = { sm: 16, md: 20, lg: 24 };
3
+ import { cx, devWarnOnce } from "./classes.js";
4
+ import { iconSize, iconSvg, shapesOf } from "./iconSvg.js";
5
+ const 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" }]] };
6
+ const ICONS = map;
7
+ const registered = {};
8
+ function registerIcons(icons) {
9
+ for (let i = 0; i < icons.length; i++) {
10
+ const c = icons[i];
11
+ if (c && c.auraShapes) {
12
+ map[c.iconName] = c.auraShapes;
13
+ registered[c.iconName] = true;
14
+ }
15
+ }
16
+ }
7
17
  const Icon = React.forwardRef(function Icon2(props, ref) {
8
- const size = SIZES[props.size] || props.size || 16;
18
+ const own = shapesOf(props.name);
19
+ if (own) {
20
+ const ep = props.name.props;
21
+ return iconSvg(
22
+ own,
23
+ {
24
+ size: props.size || ep.size,
25
+ label: props.label || ep.label,
26
+ strokeWidth: props.strokeWidth || ep.strokeWidth,
27
+ className: cx(ep.className, props.className) || void 0
28
+ },
29
+ ref
30
+ );
31
+ }
32
+ const drawn = props.name;
33
+ if (React.isValidElement(drawn) && drawn.type === "svg" && /(^| )aura-icon( |$)/.test(String(drawn.props.className || "")) && !/aura-icon--custom/.test(String(drawn.props.className || ""))) {
34
+ const dp = drawn.props;
35
+ const o = { ref };
36
+ if (props.size) o.width = o.height = iconSize(props.size);
37
+ if (props.strokeWidth) o.strokeWidth = props.strokeWidth;
38
+ if (props.className) o.className = cx(String(dp.className), props.className);
39
+ if (props.label)
40
+ Object.assign(o, { role: "img", "aria-label": props.label, "aria-hidden": void 0, focusable: void 0 });
41
+ return React.cloneElement(drawn, o);
42
+ }
9
43
  if (React.isValidElement(props.name)) {
44
+ const size = iconSize(props.size);
10
45
  return /* @__PURE__ */ React.createElement(
11
46
  "span",
12
47
  {
@@ -17,35 +52,19 @@ const Icon = React.forwardRef(function Icon2(props, ref) {
17
52
  props.name
18
53
  );
19
54
  }
20
- const shapes = ICONS[props.name];
55
+ if (typeof props.name === "string" && !registered[props.name])
56
+ devWarnOnce(
57
+ "icon-names",
58
+ 'Icon names as strings (icon="' + props.name + '") need registerIcons() from 6.0. Import icons from "@jirawatpyk/aura-react/icons" (npx aura-icons-codemod), or call registerIcons(allIcons) once.'
59
+ );
60
+ const shapes = map[props.name];
21
61
  if (!shapes) return null;
22
- const a11y = props.label ? { role: "img", "aria-label": props.label } : { "aria-hidden": true, focusable: "false" };
23
- return /* @__PURE__ */ React.createElement(
24
- "svg",
25
- {
26
- ref,
27
- xmlns: "http://www.w3.org/2000/svg",
28
- width: size,
29
- height: size,
30
- viewBox: "0 0 24 24",
31
- fill: "none",
32
- stroke: "currentColor",
33
- strokeWidth: props.strokeWidth || 2,
34
- strokeLinecap: "round",
35
- strokeLinejoin: "round",
36
- className: cx("aura-icon", props.className),
37
- ...a11y
38
- },
39
- shapes.map(function(s, i) {
40
- const attrs = { key: i };
41
- for (const k in s[1]) attrs[k === "stroke-width" ? "strokeWidth" : k] = s[1][k];
42
- return h(s[0], attrs);
43
- })
44
- );
62
+ return iconSvg(shapes, props, ref);
45
63
  });
46
- const iconNames = Object.keys(ICONS);
64
+ const iconNames = Object.keys(map);
47
65
  export {
48
66
  ICONS,
49
67
  Icon,
50
- iconNames
68
+ iconNames,
69
+ registerIcons
51
70
  };
package/dist/esm/Menu.js CHANGED
@@ -4,6 +4,7 @@ import { createPortal } from "react-dom";
4
4
  import { cx, uid, useIsoLayoutEffect, useMounted, useMergedRef } from "./internal.js";
5
5
  import { Icon } from "./Icon.js";
6
6
  import { useLinkComponent } from "./locale.js";
7
+ import { IconCheck } from "./icons.js";
7
8
  const Menu = React.forwardRef(function Menu2(props, ref) {
8
9
  const own = React.useRef(null), merged = useMergedRef(ref, own);
9
10
  const posState = React.useState(null);
@@ -109,7 +110,7 @@ const Menu = React.forwardRef(function Menu2(props, ref) {
109
110
  if (it.separator) return /* @__PURE__ */ React.createElement("div", { key: "s" + i, role: "separator", className: "aura-menu__sep" });
110
111
  const isRadio = it.type === "radio";
111
112
  const isCheck = !isRadio && it.checked !== void 0;
112
- const lead = isRadio ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-menu__radio", it.checked && "is-on") }) : isCheck ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-menu__check", it.checked && "is-on") }, it.checked ? /* @__PURE__ */ React.createElement(Icon, { name: "check", size: 12, strokeWidth: 3 }) : null) : it.icon ? /* @__PURE__ */ React.createElement(Icon, { name: it.icon }) : /* @__PURE__ */ React.createElement("span", { className: "aura-menu__blank" });
113
+ const lead = isRadio ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-menu__radio", it.checked && "is-on") }) : isCheck ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-menu__check", it.checked && "is-on") }, it.checked ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), size: 12, strokeWidth: 3 }) : null) : it.icon ? /* @__PURE__ */ React.createElement(Icon, { name: it.icon }) : /* @__PURE__ */ React.createElement("span", { className: "aura-menu__blank" });
113
114
  const body = [
114
115
  /* @__PURE__ */ React.createElement(React.Fragment, { key: "l" }, lead),
115
116
  /* @__PURE__ */ React.createElement("span", { key: "t", className: "aura-menu__label" }, it.label),
@@ -4,6 +4,7 @@ import { Field, describedBy } from "./Field.js";
4
4
  import { Icon } from "./Icon.js";
5
5
  import { cx, uid, useMaybeControlled } from "./internal.js";
6
6
  import { useStrings } from "./locale.js";
7
+ import { IconMinus, IconPlus } from "./icons.js";
7
8
  function decimalsOf(n) {
8
9
  const s = String(n);
9
10
  const i = s.indexOf(".");
@@ -151,7 +152,7 @@ const NumberField = React.forwardRef(function NumberField2(props, ref) {
151
152
  nudge(-step);
152
153
  }
153
154
  },
154
- /* @__PURE__ */ React.createElement(Icon, { name: "minus" })
155
+ /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconMinus, null) })
155
156
  ), /* @__PURE__ */ React.createElement(
156
157
  "button",
157
158
  {
@@ -168,7 +169,7 @@ const NumberField = React.forwardRef(function NumberField2(props, ref) {
168
169
  nudge(step);
169
170
  }
170
171
  },
171
- /* @__PURE__ */ React.createElement(Icon, { name: "plus" })
172
+ /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconPlus, null) })
172
173
  )) : null)
173
174
  );
174
175
  });
@@ -4,6 +4,7 @@ import { Icon } from "./Icon.js";
4
4
  import { IconButton } from "./IconButton.js";
5
5
  import { cx, plainClick, useMaybeControlled } from "./internal.js";
6
6
  import { useLinkComponent, useStrings } from "./locale.js";
7
+ import { IconChevronLeft, IconChevronRight } from "./icons.js";
7
8
  function pageList(page, count, sib) {
8
9
  let out = [], lo = Math.max(2, page - sib), hi = Math.min(count - 1, page + sib);
9
10
  if (page - sib <= 3) {
@@ -98,9 +99,9 @@ const Pagination = React.forwardRef(function Pagination2(props, ref) {
98
99
  /* @__PURE__ */ React.createElement(Icon, { name: icon, size: "sm" })
99
100
  );
100
101
  }
101
- return /* @__PURE__ */ React.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, "chevron-left", t.prevPage, "prev", page <= 1), /* @__PURE__ */ React.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
102
+ return /* @__PURE__ */ React.createElement("nav", { ref, className: cx("aura-pagination", props.className), "aria-label": props.label || t.pagination }, arrow(page - 1, /* @__PURE__ */ React.createElement(IconChevronLeft, null), t.prevPage, "prev", page <= 1), /* @__PURE__ */ React.createElement("ol", { className: "aura-pagination__list" }, pageList(page, count, props.siblingCount == null ? 1 : props.siblingCount).map(function(p) {
102
103
  return typeof p === "number" ? /* @__PURE__ */ React.createElement("li", { key: p }, item(p, p)) : /* @__PURE__ */ React.createElement("li", { key: p, className: "aura-pagination__gap", "aria-hidden": true }, "\u2026");
103
- })), /* @__PURE__ */ React.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, "chevron-right", t.nextPage, "next", page >= count));
104
+ })), /* @__PURE__ */ React.createElement("span", { className: "aura-pagination__compact", "aria-hidden": true }, t.page(page, count)), arrow(page + 1, /* @__PURE__ */ React.createElement(IconChevronRight, null), t.nextPage, "next", page >= count));
104
105
  });
105
106
  export {
106
107
  Pagination
@@ -4,6 +4,7 @@ import { TextField } from "./TextField.js";
4
4
  import { IconButton } from "./IconButton.js";
5
5
  import { cx, omit } from "./internal.js";
6
6
  import { useStrings } from "./locale.js";
7
+ import { IconEye, IconEyeOff } from "./icons.js";
7
8
  const PasswordField = React.forwardRef(function PasswordField2(props, ref) {
8
9
  const t = useStrings();
9
10
  const shown = React.useState(false);
@@ -21,7 +22,7 @@ const PasswordField = React.forwardRef(function PasswordField2(props, ref) {
21
22
  suffix: props.toggle === false ? void 0 : /* @__PURE__ */ React.createElement(
22
23
  IconButton,
23
24
  {
24
- icon: shown[0] ? "eye-off" : "eye",
25
+ icon: shown[0] ? /* @__PURE__ */ React.createElement(IconEyeOff, null) : /* @__PURE__ */ React.createElement(IconEye, null),
25
26
  label: t.showPassword,
26
27
  "aria-pressed": shown[0],
27
28
  disabled: props.disabled,
@@ -13,6 +13,7 @@ import {
13
13
  } from "./internal.js";
14
14
  import { useDensity, useStrings } from "./locale.js";
15
15
  import { createPortal } from "react-dom";
16
+ import { IconX } from "./icons.js";
16
17
  function position(anchor, pop, placement) {
17
18
  const r = anchor.getBoundingClientRect(), pw = pop.offsetWidth, ph = pop.scrollHeight, vw = window.innerWidth, vh = window.innerHeight, gap = 6;
18
19
  let side = (placement || "bottom-start").split("-")[0], align = (placement || "bottom-start").split("-")[1] || "start";
@@ -124,7 +125,7 @@ const Popover = React.forwardRef(function Popover2(props, ref) {
124
125
  props.title ? /* @__PURE__ */ React.createElement("div", { className: "aura-popover__head" }, /* @__PURE__ */ React.createElement("p", { className: "aura-popover__title", id: id + "-title" }, props.title), /* @__PURE__ */ React.createElement(
125
126
  IconButton,
126
127
  {
127
- icon: "x",
128
+ icon: /* @__PURE__ */ React.createElement(IconX, null),
128
129
  label: t.close,
129
130
  onClick: function() {
130
131
  close(true);
@@ -3,6 +3,7 @@ import * as React from "react";
3
3
  import { describedBy } from "./Field.js";
4
4
  import { Icon } from "./Icon.js";
5
5
  import { cx, uid, useMaybeControlled } from "./internal.js";
6
+ import { IconCircleAlert } from "./icons.js";
6
7
  const RadioGroup = React.forwardRef(function RadioGroup2(props, ref) {
7
8
  const auto = uid(), id = props.id || auto;
8
9
  const st = useMaybeControlled(
@@ -51,7 +52,7 @@ const RadioGroup = React.forwardRef(function RadioGroup2(props, ref) {
51
52
  }
52
53
  ), /* @__PURE__ */ React.createElement("span", { className: "aura-choice__text" }, /* @__PURE__ */ React.createElement("span", { className: "aura-choice__label" }, v.label), v.description ? /* @__PURE__ */ React.createElement("span", { className: "aura-choice__desc" }, v.description) : null));
53
54
  })),
54
- props.error ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__error", id: id + "-error" }, /* @__PURE__ */ React.createElement(Icon, { name: "circle-alert", size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__hint", id: id + "-hint" }, props.hint) : null
55
+ props.error ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__error", id: id + "-error" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCircleAlert, null), size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__hint", id: id + "-hint" }, props.hint) : null
55
56
  );
56
57
  });
57
58
  export {
@@ -5,6 +5,7 @@ import { FIELD_KEYS, Field, describedBy } from "./Field.js";
5
5
  import { Icon } from "./Icon.js";
6
6
  import { useDensity } from "./locale.js";
7
7
  import { cx, devWarnOnce, omit, uid, useIsoLayoutEffect, useMergedRef, useMounted } from "./internal.js";
8
+ import { IconCheck, IconChevronDown } from "./icons.js";
8
9
  const h = React.createElement;
9
10
  const FORM_KEYS = ["name", "form", "value", "defaultValue", "disabled", "autoComplete", "onInput", "onInvalid"];
10
11
  const HANDLED_KEYS = FORM_KEYS.concat([
@@ -347,7 +348,7 @@ const Select = React.forwardRef(function Select2(props, ref) {
347
348
  }),
348
349
  opts,
349
350
  props.children
350
- ), /* @__PURE__ */ React.createElement(Icon, { name: "chevron-down", className: "aura-select__chevron" }))
351
+ ), /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconChevronDown, null), className: "aura-select__chevron" }))
351
352
  );
352
353
  const listId = id + "-list", labelId = id + "-label";
353
354
  const optId = function(i) {
@@ -383,7 +384,7 @@ const Select = React.forwardRef(function Select2(props, ref) {
383
384
  }
384
385
  },
385
386
  /* @__PURE__ */ React.createElement("span", { className: "aura-combo__text" }, /* @__PURE__ */ React.createElement("span", { className: "aura-combo__label" }, it.label)),
386
- sel ? /* @__PURE__ */ React.createElement(Icon, { name: "check", className: "aura-combo__check" }) : null
387
+ sel ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), className: "aura-combo__check" }) : null
387
388
  );
388
389
  };
389
390
  const runs = [];
@@ -502,7 +503,7 @@ const Select = React.forwardRef(function Select2(props, ref) {
502
503
  },
503
504
  /* @__PURE__ */ React.createElement("span", { id: id + "-value", className: cx("aura-select__value", shown[0].empty && "is-placeholder") }, shown[0].label || " ")
504
505
  ),
505
- /* @__PURE__ */ React.createElement(Icon, { name: "chevron-down", className: "aura-select__chevron" }),
506
+ /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconChevronDown, null), className: "aura-select__chevron" }),
506
507
  popup
507
508
  )
508
509
  );
@@ -5,6 +5,7 @@ import { Icon } from "./Icon.js";
5
5
  import { IconButton } from "./IconButton.js";
6
6
  import { cx, plainClick, uid, useMaybeControlled } from "./internal.js";
7
7
  import { useLinkComponent, useStrings } from "./locale.js";
8
+ import { IconChevronDown, IconPanelLeftClose, IconPanelLeftOpen } from "./icons.js";
8
9
  function contains(it, id) {
9
10
  return !!id && !!it.children && it.children.some(function(c) {
10
11
  return c.id === id || contains(c, id);
@@ -105,7 +106,7 @@ const SideNav = React.forwardRef(function SideNav2(props, ref) {
105
106
  /* @__PURE__ */ React.createElement("span", { key: "l", className: "aura-nav__label" }, it.label),
106
107
  it.badge != null ? /* @__PURE__ */ React.createElement("span", { key: "b", className: "aura-nav__badge" }, it.badge) : null,
107
108
  it.count != null ? /* @__PURE__ */ React.createElement("span", { key: "c", className: "aura-nav__count" }, it.count) : null,
108
- group ? /* @__PURE__ */ React.createElement(Icon, { key: "g", name: "chevron-down", className: cx("aura-nav__chevron", open && "is-open") }) : null
109
+ group ? /* @__PURE__ */ React.createElement(Icon, { key: "g", name: /* @__PURE__ */ React.createElement(IconChevronDown, null), className: cx("aura-nav__chevron", open && "is-open") }) : null
109
110
  ];
110
111
  }
111
112
  function item(it, depth) {
@@ -188,7 +189,7 @@ const SideNav = React.forwardRef(function SideNav2(props, ref) {
188
189
  props.collapsible ? /* @__PURE__ */ React.createElement("div", { className: "aura-nav__toggle" }, /* @__PURE__ */ React.createElement(
189
190
  IconButton,
190
191
  {
191
- icon: collapsed ? "panel-left-open" : "panel-left-close",
192
+ icon: collapsed ? /* @__PURE__ */ React.createElement(IconPanelLeftOpen, null) : /* @__PURE__ */ React.createElement(IconPanelLeftClose, null),
192
193
  label: collapsed ? t.expandNav : t.collapseNav,
193
194
  size: "md",
194
195
  onClick: function() {
package/dist/esm/Stat.js CHANGED
@@ -3,6 +3,7 @@ import * as React from "react";
3
3
  import { cx } from "./internal.js";
4
4
  import { Icon } from "./Icon.js";
5
5
  import { useLinkComponent } from "./locale.js";
6
+ import { IconMinus, IconTrendingDown, IconTrendingUp } from "./icons.js";
6
7
  const Stat = React.forwardRef(function Stat2(props, ref) {
7
8
  const ch = props.change;
8
9
  const dir = ch && (ch.direction || "flat");
@@ -24,7 +25,13 @@ const Stat = React.forwardRef(function Stat2(props, ref) {
24
25
  },
25
26
  /* @__PURE__ */ React.createElement("span", { className: "aura-stat__head" }, /* @__PURE__ */ React.createElement("span", { className: "aura-stat__label" }, props.label), props.icon ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__icon" }, /* @__PURE__ */ React.createElement(Icon, { name: props.icon })) : null),
26
27
  props.loading ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__value" }, /* @__PURE__ */ React.createElement("span", { className: "aura-skel aura-stat__skel" })) : /* @__PURE__ */ React.createElement("span", { className: cx("aura-stat__value", numeric && "is-numeric") }, props.value, props.unit ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__unit" }, props.unit) : null),
27
- ch && !props.loading || props.caption ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__foot" }, ch && !props.loading ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-stat__change", "is-" + tone) }, /* @__PURE__ */ React.createElement(Icon, { name: dir === "up" ? "trending-up" : dir === "down" ? "trending-down" : "minus", size: 14 }), /* @__PURE__ */ React.createElement("span", null, ch.value)) : null, ch && ch.label && !props.loading ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__caption" }, ch.label) : null, props.caption ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__caption" }, props.caption) : null) : null
28
+ ch && !props.loading || props.caption ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__foot" }, ch && !props.loading ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-stat__change", "is-" + tone) }, /* @__PURE__ */ React.createElement(
29
+ Icon,
30
+ {
31
+ name: dir === "up" ? /* @__PURE__ */ React.createElement(IconTrendingUp, null) : dir === "down" ? /* @__PURE__ */ React.createElement(IconTrendingDown, null) : /* @__PURE__ */ React.createElement(IconMinus, null),
32
+ size: 14
33
+ }
34
+ ), /* @__PURE__ */ React.createElement("span", null, ch.value)) : null, ch && ch.label && !props.loading ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__caption" }, ch.label) : null, props.caption ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__caption" }, props.caption) : null) : null
28
35
  );
29
36
  });
30
37
  export {
@@ -3,6 +3,7 @@ import * as React from "react";
3
3
  import { Icon } from "./Icon.js";
4
4
  import { cx } from "./internal.js";
5
5
  import { useStrings } from "./locale.js";
6
+ import { IconCheck } from "./icons.js";
6
7
  const Stepper = React.forwardRef(function Stepper2(props, ref) {
7
8
  const t = useStrings();
8
9
  const steps = props.steps || [];
@@ -22,7 +23,7 @@ const Stepper = React.forwardRef(function Stepper2(props, ref) {
22
23
  },
23
24
  /* @__PURE__ */ React.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
24
25
  const state = i < at ? "done" : i === at ? "current" : "upcoming";
25
- const marker = /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, state === "done" ? /* @__PURE__ */ React.createElement(Icon, { name: "check" }) : i + 1);
26
+ const marker = /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, state === "done" ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null) }) : i + 1);
26
27
  const text = /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__label" }, s.label, state === "done" ? /* @__PURE__ */ React.createElement("span", { className: "aura-sr-only" }, ", " + t.stepDone) : null), s.description ? /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__desc" }, s.description) : null);
27
28
  const clickable = state === "done" && !!props.onStepClick;
28
29
  return /* @__PURE__ */ React.createElement(
package/dist/esm/Tabs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import * as React from "react";
3
3
  import { Icon } from "./Icon.js";
4
- import { cx, uid, useMaybeControlled } from "./internal.js";
4
+ import { cx, devWarnOnce, omit, uid, useMaybeControlled } from "./internal.js";
5
5
  import { useLinkComponent } from "./locale.js";
6
6
  const Tabs = React.forwardRef(function Tabs2(props, ref) {
7
7
  const items = props.tabs || [], base = uid();
@@ -22,6 +22,16 @@ const Tabs = React.forwardRef(function Tabs2(props, ref) {
22
22
  return t.id === cur;
23
23
  })[0] || firstOn || items[0];
24
24
  const Link = useLinkComponent(props.linkComponent);
25
+ const manual = props.activation === "manual";
26
+ const [focusId, setFocusId] = React.useState(null);
27
+ items.forEach(function(t) {
28
+ const al = t.tabProps && t.tabProps["aria-label"];
29
+ if (al && al.toLowerCase().indexOf(String(t.label).toLowerCase()) !== 0)
30
+ devWarnOnce(
31
+ "tab-label-in-name",
32
+ 'Tabs: tabProps aria-label "' + al + '" should start with the visible label "' + t.label + '" so voice control finds the tab (WCAG 2.5.3 Label in Name).'
33
+ );
34
+ });
25
35
  if (asLinks)
26
36
  return /* @__PURE__ */ React.createElement(
27
37
  "nav",
@@ -37,14 +47,37 @@ const Tabs = React.forwardRef(function Tabs2(props, ref) {
37
47
  t.label,
38
48
  t.count != null ? /* @__PURE__ */ React.createElement("span", { key: "c", className: "aura-tab__count" }, t.count) : null
39
49
  ];
40
- return t.disabled ? /* @__PURE__ */ React.createElement("span", { key: t.id, className: "aura-tab is-disabled", "aria-disabled": true }, inner) : /* @__PURE__ */ React.createElement(
50
+ const own = omit(t.tabProps || {}, [
51
+ "type",
52
+ "disabled",
53
+ "form",
54
+ "formAction",
55
+ "formEncType",
56
+ "formMethod",
57
+ "formNoValidate",
58
+ "formTarget",
59
+ "name",
60
+ "value"
61
+ ]);
62
+ return t.disabled ? /* @__PURE__ */ React.createElement(
63
+ "span",
64
+ {
65
+ ...omit(own, ["onClick"]),
66
+ key: t.id,
67
+ className: cx("aura-tab is-disabled", own.className),
68
+ "aria-disabled": true
69
+ },
70
+ inner
71
+ ) : /* @__PURE__ */ React.createElement(
41
72
  Link,
42
73
  {
74
+ ...own,
43
75
  key: t.id,
44
76
  href: t.href,
45
- className: cx("aura-tab", on && "is-active"),
77
+ className: cx("aura-tab", on && "is-active", own.className),
46
78
  "aria-current": on ? "page" : void 0,
47
79
  onClick: function(e) {
80
+ if (own.onClick) own.onClick(e);
48
81
  if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
49
82
  st[1](t.id);
50
83
  }
@@ -58,19 +91,28 @@ const Tabs = React.forwardRef(function Tabs2(props, ref) {
58
91
  return !t2.disabled;
59
92
  });
60
93
  const t = enabled[(i + enabled.length) % enabled.length];
61
- st[1](t.id);
94
+ if (manual) setFocusId(t.id);
95
+ else st[1](t.id);
62
96
  if (refs.current[t.id]) refs.current[t.id].focus();
63
97
  }
98
+ const stop = manual && focusId && items.filter(function(t) {
99
+ return t.id === focusId && !t.disabled;
100
+ })[0] || current;
64
101
  return /* @__PURE__ */ React.createElement("div", { ref, className: cx("aura-tabs", props.className) }, /* @__PURE__ */ React.createElement(
65
102
  "div",
66
103
  {
67
104
  role: "tablist",
68
105
  "aria-label": props.label,
69
106
  className: "aura-tabs__list",
107
+ onBlur: manual ? function(e) {
108
+ if (!e.currentTarget.contains(e.relatedTarget)) setFocusId(null);
109
+ } : void 0,
70
110
  onKeyDown: function(e) {
71
111
  const enabled = items.filter(function(t) {
72
112
  return !t.disabled;
73
- }), i = enabled.indexOf(current);
113
+ }), focused = enabled.filter(function(t) {
114
+ return refs.current[t.id] === e.target;
115
+ })[0], i = enabled.indexOf(focused || stop);
74
116
  if (e.key === "ArrowRight") {
75
117
  e.preventDefault();
76
118
  go(i + 1);
@@ -88,22 +130,31 @@ const Tabs = React.forwardRef(function Tabs2(props, ref) {
88
130
  },
89
131
  items.map(function(t) {
90
132
  const on = current && t.id === current.id;
133
+ const own = t.tabProps || {};
91
134
  return /* @__PURE__ */ React.createElement(
92
135
  "button",
93
136
  {
137
+ ...own,
94
138
  key: t.id,
95
139
  type: "button",
96
140
  role: "tab",
97
141
  id: base + "-tab-" + t.id,
98
142
  "aria-selected": on,
99
143
  "aria-controls": base + "-panel-" + t.id,
100
- tabIndex: on ? 0 : -1,
144
+ tabIndex: stop && t.id === stop.id ? 0 : -1,
101
145
  disabled: t.disabled,
102
146
  ref: function(el) {
103
147
  refs.current[t.id] = el;
104
148
  },
105
- className: cx("aura-tab", on && "is-active"),
106
- onClick: function() {
149
+ className: cx("aura-tab", on && "is-active", own.className),
150
+ onFocus: manual ? function(e) {
151
+ if (own.onFocus) own.onFocus(e);
152
+ setFocusId(t.id);
153
+ } : own.onFocus,
154
+ onClick: function(e) {
155
+ if (own.onClick) own.onClick(e);
156
+ if (e.defaultPrevented) return;
157
+ if (manual && current && t.id === current.id) return;
107
158
  st[1](t.id);
108
159
  }
109
160
  },
@@ -112,7 +163,26 @@ const Tabs = React.forwardRef(function Tabs2(props, ref) {
112
163
  t.count != null ? /* @__PURE__ */ React.createElement("span", { className: "aura-tab__count" }, t.count) : null
113
164
  );
114
165
  })
115
- ), current && current.content !== void 0 ? /* @__PURE__ */ React.createElement(
166
+ ), props.keepMounted ? (
167
+ /* 5.9: every panel stays in the DOM (same node across switches); the inactive ones are hidden. */
168
+ items.map(function(t) {
169
+ if (t.content === void 0) return null;
170
+ const on = current && t.id === current.id;
171
+ return /* @__PURE__ */ React.createElement(
172
+ "div",
173
+ {
174
+ key: t.id,
175
+ role: "tabpanel",
176
+ id: base + "-panel-" + t.id,
177
+ "aria-labelledby": base + "-tab-" + t.id,
178
+ tabIndex: 0,
179
+ hidden: !on,
180
+ className: "aura-tabs__panel"
181
+ },
182
+ t.content
183
+ );
184
+ })
185
+ ) : current && current.content !== void 0 ? /* @__PURE__ */ React.createElement(
116
186
  "div",
117
187
  {
118
188
  role: "tabpanel",
package/dist/esm/Tag.js CHANGED
@@ -3,6 +3,7 @@ import * as React from "react";
3
3
  import { Icon } from "./Icon.js";
4
4
  import { cx, omit } from "./internal.js";
5
5
  import { useStrings } from "./locale.js";
6
+ import { IconCheck, IconX } from "./icons.js";
6
7
  const Tag = React.forwardRef(function Tag2(props, ref) {
7
8
  const t = useStrings();
8
9
  const selectable = props.onClick != null || props.selected != null;
@@ -22,7 +23,7 @@ const Tag = React.forwardRef(function Tag2(props, ref) {
22
23
  disabled: props.disabled,
23
24
  className: cx("aura-tag is-selectable", props.selected && "is-selected", props.className)
24
25
  },
25
- props.selected ? /* @__PURE__ */ React.createElement(Icon, { name: "check", size: 14 }) : inner[0],
26
+ props.selected ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), size: 14 }) : inner[0],
26
27
  inner[1]
27
28
  );
28
29
  }
@@ -34,7 +35,7 @@ const Tag = React.forwardRef(function Tag2(props, ref) {
34
35
  "aria-label": props.removeLabel || t.remove(typeof props.children === "string" ? props.children : ""),
35
36
  onClick: props.onRemove
36
37
  },
37
- /* @__PURE__ */ React.createElement(Icon, { name: "x", size: 12 })
38
+ /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconX, null), size: 12 })
38
39
  ) : null);
39
40
  });
40
41
  export {