@pega/cosmos-react-core 6.0.14 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  2. package/lib/components/AppShell/AppHeader.js +4 -6
  3. package/lib/components/AppShell/AppHeader.js.map +1 -1
  4. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  5. package/lib/components/AppShell/AppHeader.styles.js +6 -2
  6. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  7. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  8. package/lib/components/AppShell/Drawer.js +3 -2
  9. package/lib/components/AppShell/Drawer.js.map +1 -1
  10. package/lib/components/AppShell/style-utils.d.ts +1 -0
  11. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  12. package/lib/components/AppShell/style-utils.js +4 -2
  13. package/lib/components/AppShell/style-utils.js.map +1 -1
  14. package/lib/components/Badges/Selection.js +1 -1
  15. package/lib/components/Badges/Selection.js.map +1 -1
  16. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  17. package/lib/components/FieldGroup/FieldGroupList.js +23 -4
  18. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  19. package/lib/components/HiddenText/HiddenText.d.ts +11 -0
  20. package/lib/components/HiddenText/HiddenText.d.ts.map +1 -0
  21. package/lib/components/HiddenText/HiddenText.js +15 -0
  22. package/lib/components/HiddenText/HiddenText.js.map +1 -0
  23. package/lib/components/HiddenText/index.d.ts +2 -0
  24. package/lib/components/HiddenText/index.d.ts.map +1 -0
  25. package/lib/components/HiddenText/index.js +2 -0
  26. package/lib/components/HiddenText/index.js.map +1 -0
  27. package/lib/components/Icon/Icon.d.ts.map +1 -1
  28. package/lib/components/Icon/Icon.js +2 -2
  29. package/lib/components/Icon/Icon.js.map +1 -1
  30. package/lib/components/Icon/streamline-icons/arrow-micro-up-down.icon.d.ts +5 -0
  31. package/lib/components/Icon/streamline-icons/arrow-micro-up-down.icon.d.ts.map +1 -0
  32. package/lib/components/Icon/streamline-icons/arrow-micro-up-down.icon.js +7 -0
  33. package/lib/components/Icon/streamline-icons/arrow-micro-up-down.icon.js.map +1 -0
  34. package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
  35. package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
  36. package/lib/components/Icon/streamlineIconNames.js +1 -0
  37. package/lib/components/Icon/streamlineIconNames.js.map +1 -1
  38. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  39. package/lib/components/Menu/Menu.styles.js +1 -2
  40. package/lib/components/Menu/Menu.styles.js.map +1 -1
  41. package/lib/components/MenuButton/MenuButton.js +1 -1
  42. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  43. package/lib/components/Modal/Modal.d.ts.map +1 -1
  44. package/lib/components/Modal/Modal.js +10 -3
  45. package/lib/components/Modal/Modal.js.map +1 -1
  46. package/lib/components/Modal/Modal.styles.d.ts +3 -1
  47. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  48. package/lib/components/Modal/Modal.styles.js +22 -12
  49. package/lib/components/Modal/Modal.styles.js.map +1 -1
  50. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  51. package/lib/components/MultiStepForm/MultiStepForm.js +28 -1
  52. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  53. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  54. package/lib/components/Tooltip/Tooltip.js +4 -1
  55. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  56. package/lib/hooks/index.d.ts +1 -0
  57. package/lib/hooks/index.d.ts.map +1 -1
  58. package/lib/hooks/index.js +1 -0
  59. package/lib/hooks/index.js.map +1 -1
  60. package/lib/hooks/useI18n.d.ts +13 -1
  61. package/lib/hooks/useI18n.d.ts.map +1 -1
  62. package/lib/hooks/useRefMap.d.ts +8 -0
  63. package/lib/hooks/useRefMap.d.ts.map +1 -0
  64. package/lib/hooks/useRefMap.js +27 -0
  65. package/lib/hooks/useRefMap.js.map +1 -0
  66. package/lib/i18n/default.d.ts +13 -1
  67. package/lib/i18n/default.d.ts.map +1 -1
  68. package/lib/i18n/default.js +16 -2
  69. package/lib/i18n/default.js.map +1 -1
  70. package/lib/i18n/i18n.d.ts +13 -1
  71. package/lib/i18n/i18n.d.ts.map +1 -1
  72. package/lib/index.d.ts +1 -0
  73. package/lib/index.d.ts.map +1 -1
  74. package/lib/index.js +1 -0
  75. package/lib/index.js.map +1 -1
  76. package/lib/utils/index.d.ts +1 -0
  77. package/lib/utils/index.d.ts.map +1 -1
  78. package/lib/utils/index.js +1 -0
  79. package/lib/utils/index.js.map +1 -1
  80. package/lib/utils/mouseState.d.ts +9 -0
  81. package/lib/utils/mouseState.d.ts.map +1 -0
  82. package/lib/utils/mouseState.js +26 -0
  83. package/lib/utils/mouseState.js.map +1 -0
  84. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // This file is autogenerated. Any changes will be overwritten.
3
+ export const set = 'streamline';
4
+ export const name = 'arrow-micro-up-down';
5
+ export const Component = () => (_jsx("path", { fill: 'currentColor', stroke: 'currentColor', strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M6.415 7.47h5.17c.31 0 .517-.147.362-.265L9.362 4.58a.654.654 0 0 0-.62-.059c-.052.03-.104.03-.104.06L6.053 7.205c-.155.118.051.265.362.265zm5.17 3.06h-5.17c-.31 0-.517.147-.362.265l2.585 2.625a.654.654 0 0 0 .62.059c.052-.03.104-.03.104-.06l2.585-2.624c.155-.118-.051-.265-.362-.265z' }));
6
+ export const viewBox = '0 0 18 18';
7
+ //# sourceMappingURL=arrow-micro-up-down.icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-micro-up-down.icon.js","sourceRoot":"","sources":["../../../../src/components/Icon/streamline-icons/arrow-micro-up-down.icon.tsx"],"names":[],"mappings":";AAAA,+DAA+D;AAE/D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC;AAEhC,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CAC7B,eACE,IAAI,EAAC,cAAc,EACnB,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,CAAC,EAAC,8RAA8R,GAChS,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\n\nexport const set = 'streamline';\n\nexport const name = 'arrow-micro-up-down';\n\nexport const Component = () => (\n <path\n fill='currentColor'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n d='M6.415 7.47h5.17c.31 0 .517-.147.362-.265L9.362 4.58a.654.654 0 0 0-.62-.059c-.052.03-.104.03-.104.06L6.053 7.205c-.155.118.051.265.362.265zm5.17 3.06h-5.17c-.31 0-.517.147-.362.265l2.585 2.625a.654.654 0 0 0 .62.059c.052-.03.104-.03.104-.06l2.585-2.624c.155-.118-.051-.265-.362-.265z'\n />\n);\n\nexport const viewBox = '0 0 18 18';\n"]}
@@ -1,4 +1,4 @@
1
- declare const streamlineIconNames: readonly ["ai-assist", "alexa", "align-center", "align-left", "align-right", "amazon", "api", "app", "arrow-above-row-right", "arrow-bend-left", "arrow-down", "arrow-left-column", "arrow-left", "arrow-micro-down", "arrow-micro-left", "arrow-micro-right", "arrow-micro-up", "arrow-out", "arrow-right-column", "arrow-right", "arrow-up-down", "arrow-up", "bank", "bars", "bell-push-notification", "bell", "bluetooth", "book-open", "bookmark", "box-4", "box", "browser-code", "browser", "bug", "building-2", "building-3-solid", "building-3", "bulb", "calendar-empty", "calendar-range", "calendar", "car", "caret-down", "caret-left", "caret-right", "caret-up", "case-medical", "case-solid", "case", "chain", "chart-line", "chart-pie", "chat-check", "chat-exclamation-mark", "chat-help", "chat-quote", "chat-transfer", "chat-typing", "chat-unavailable", "chat", "chats", "check-badge", "check", "chevron-solid", "chevron", "circle-mixed-left", "circle", "clipboard-check", "clipboard-medical", "clipboard-pencil-solid", "clipboard-pencil", "clipboard-plus", "clipboard", "clock-solid", "clock", "cloud", "code-search", "code", "column-delete", "conversation", "copy", "credit", "csr-agent", "currency", "custom-column", "database-search", "dataviz-area-multi", "dataviz-area-stacked", "dataviz-area", "dataviz-bar-clustered", "dataviz-bar-stacked", "dataviz-bar", "dataviz-bell-curve", "dataviz-bubble", "dataviz-column-clustered", "dataviz-column-stacked", "dataviz-column", "dataviz-combo", "dataviz-datetime-field", "dataviz-donut", "dataviz-flip-counter", "dataviz-forecast", "dataviz-funnel", "dataviz-gauge-linear", "dataviz-gauge-progress", "dataviz-gauge", "dataviz-geo-choropleth", "dataviz-heatmap", "dataviz-histogram", "dataviz-line-horizontal", "dataviz-line-multi", "dataviz-line-stepped", "dataviz-line", "dataviz-numeric-field", "dataviz-pareto", "dataviz-pie", "dataviz-pivot-table", "dataviz-radar", "dataviz-scatter", "dataviz-spark", "dataviz-sparklines-area", "dataviz-sparklines-columns", "dataviz-sparklines-line", "dataviz-sparklines-pies", "dataviz-spline", "dataviz-string-field", "dataviz-table-with-bars", "dataviz-trend-down", "dataviz-trend-up", "dataviz-waterfall", "desktop", "diamond", "disc-stack-solid", "disc-stack", "doctor-female", "doctor-male", "document-pdf", "document", "docusign", "dot-9-solid", "download", "drag", "email-open", "exchange", "eye-off", "face-blank", "face-happy", "face-sad", "facebook", "farming-wheat", "fast-forward", "field-cursor", "filetype-text", "filter", "fingerprint-search", "flag-check", "flag-finish", "flag-wave-solid", "flag-wave", "flashlight", "flow-process", "folder-closed", "folder-empty", "folder-hierarchy", "folder-nested", "folder-search", "folder", "folders", "forward-all", "forward", "function", "gear-play", "gear-solid", "gear", "globe", "google", "government", "graduate", "hand-book-open", "hand-over-paper", "hand", "handshake", "header", "headset", "home-solid", "home", "house-bed", "house-person", "infinity", "information", "ios-face-id", "ios-finger-id", "layers", "letter", "linkedin", "list", "location-solid", "location", "mail-warning", "mail", "megaphone", "merge", "messages-to-chat", "mic-off", "mic", "minus", "mobile-phone", "module", "money-atm", "money", "monitor-lock", "more", "mountain-top", "multi-device", "navigation", "newspaper-fold", "newspaper", "nodes-down", "note-pin", "notepad", "number-decimal", "offer-list", "offer-table", "offer", "open-new-tab", "open", "opportunity-refresh", "opportunity", "os-apple", "paper-clip", "paper-search", "password-lock", "pause", "paypal", "pega", "pegasus", "pencil", "people-group-stakeholders", "percentage", "person-connection", "person-hierarchy-check", "person-stars", "person", "persons-group", "phone-call", "phone-dial", "phone-hangup", "phone-in", "phone-ivr", "phone-off", "phone-out", "phone-split", "phone-transfer", "phone", "phonebook", "picture", "play-solid", "play", "plug-solid", "plug", "plus", "polaris-solid", "polaris", "presentation", "product", "project-plan", "project", "qr", "receipt", "reply-all", "reply", "reset", "robot-happy", "robot-sad", "robot", "roof-people", "row-delete", "row-insert", "row", "rule-library-solid", "rule-library", "rule", "scale-down", "scale-up", "script", "search-analytics-solid", "search-analytics", "search", "send", "server", "set", "share", "shield-solid", "shield", "shipment-box", "shop", "shuffle", "sigma", "slideshow", "snow", "speaker", "split", "stakeholders", "star-mixed", "star-solid", "star", "sub-step", "table-bolt-solid", "table-bolt", "table", "tag", "target-path", "team", "thumbs-down-solid", "thumbs-down", "thumbs-up-solid", "thumbs-up", "times", "todo", "toolbox-open", "toolbox-wrench", "transform", "trash", "tribox", "twitter", "two-disk-stacks", "type-cursor", "umbrella", "user-check", "user-document", "user-information", "user-pencil", "user-solid", "user-star", "user-unavailable", "user", "variable", "voice", "wand", "warn-solid", "warn", "widget", "wifi", "youtube"];
1
+ declare const streamlineIconNames: readonly ["ai-assist", "alexa", "align-center", "align-left", "align-right", "amazon", "api", "app", "arrow-above-row-right", "arrow-bend-left", "arrow-down", "arrow-left-column", "arrow-left", "arrow-micro-down", "arrow-micro-left", "arrow-micro-right", "arrow-micro-up-down", "arrow-micro-up", "arrow-out", "arrow-right-column", "arrow-right", "arrow-up-down", "arrow-up", "bank", "bars", "bell-push-notification", "bell", "bluetooth", "book-open", "bookmark", "box-4", "box", "browser-code", "browser", "bug", "building-2", "building-3-solid", "building-3", "bulb", "calendar-empty", "calendar-range", "calendar", "car", "caret-down", "caret-left", "caret-right", "caret-up", "case-medical", "case-solid", "case", "chain", "chart-line", "chart-pie", "chat-check", "chat-exclamation-mark", "chat-help", "chat-quote", "chat-transfer", "chat-typing", "chat-unavailable", "chat", "chats", "check-badge", "check", "chevron-solid", "chevron", "circle-mixed-left", "circle", "clipboard-check", "clipboard-medical", "clipboard-pencil-solid", "clipboard-pencil", "clipboard-plus", "clipboard", "clock-solid", "clock", "cloud", "code-search", "code", "column-delete", "conversation", "copy", "credit", "csr-agent", "currency", "custom-column", "database-search", "dataviz-area-multi", "dataviz-area-stacked", "dataviz-area", "dataviz-bar-clustered", "dataviz-bar-stacked", "dataviz-bar", "dataviz-bell-curve", "dataviz-bubble", "dataviz-column-clustered", "dataviz-column-stacked", "dataviz-column", "dataviz-combo", "dataviz-datetime-field", "dataviz-donut", "dataviz-flip-counter", "dataviz-forecast", "dataviz-funnel", "dataviz-gauge-linear", "dataviz-gauge-progress", "dataviz-gauge", "dataviz-geo-choropleth", "dataviz-heatmap", "dataviz-histogram", "dataviz-line-horizontal", "dataviz-line-multi", "dataviz-line-stepped", "dataviz-line", "dataviz-numeric-field", "dataviz-pareto", "dataviz-pie", "dataviz-pivot-table", "dataviz-radar", "dataviz-scatter", "dataviz-spark", "dataviz-sparklines-area", "dataviz-sparklines-columns", "dataviz-sparklines-line", "dataviz-sparklines-pies", "dataviz-spline", "dataviz-string-field", "dataviz-table-with-bars", "dataviz-trend-down", "dataviz-trend-up", "dataviz-waterfall", "desktop", "diamond", "disc-stack-solid", "disc-stack", "doctor-female", "doctor-male", "document-pdf", "document", "docusign", "dot-9-solid", "download", "drag", "email-open", "exchange", "eye-off", "face-blank", "face-happy", "face-sad", "facebook", "farming-wheat", "fast-forward", "field-cursor", "filetype-text", "filter", "fingerprint-search", "flag-check", "flag-finish", "flag-wave-solid", "flag-wave", "flashlight", "flow-process", "folder-closed", "folder-empty", "folder-hierarchy", "folder-nested", "folder-search", "folder", "folders", "forward-all", "forward", "function", "gear-play", "gear-solid", "gear", "globe", "google", "government", "graduate", "hand-book-open", "hand-over-paper", "hand", "handshake", "header", "headset", "home-solid", "home", "house-bed", "house-person", "infinity", "information", "ios-face-id", "ios-finger-id", "layers", "letter", "linkedin", "list", "location-solid", "location", "mail-warning", "mail", "megaphone", "merge", "messages-to-chat", "mic-off", "mic", "minus", "mobile-phone", "module", "money-atm", "money", "monitor-lock", "more", "mountain-top", "multi-device", "navigation", "newspaper-fold", "newspaper", "nodes-down", "note-pin", "notepad", "number-decimal", "offer-list", "offer-table", "offer", "open-new-tab", "open", "opportunity-refresh", "opportunity", "os-apple", "paper-clip", "paper-search", "password-lock", "pause", "paypal", "pega", "pegasus", "pencil", "people-group-stakeholders", "percentage", "person-connection", "person-hierarchy-check", "person-stars", "person", "persons-group", "phone-call", "phone-dial", "phone-hangup", "phone-in", "phone-ivr", "phone-off", "phone-out", "phone-split", "phone-transfer", "phone", "phonebook", "picture", "play-solid", "play", "plug-solid", "plug", "plus", "polaris-solid", "polaris", "presentation", "product", "project-plan", "project", "qr", "receipt", "reply-all", "reply", "reset", "robot-happy", "robot-sad", "robot", "roof-people", "row-delete", "row-insert", "row", "rule-library-solid", "rule-library", "rule", "scale-down", "scale-up", "script", "search-analytics-solid", "search-analytics", "search", "send", "server", "set", "share", "shield-solid", "shield", "shipment-box", "shop", "shuffle", "sigma", "slideshow", "snow", "speaker", "split", "stakeholders", "star-mixed", "star-solid", "star", "sub-step", "table-bolt-solid", "table-bolt", "table", "tag", "target-path", "team", "thumbs-down-solid", "thumbs-down", "thumbs-up-solid", "thumbs-up", "times", "todo", "toolbox-open", "toolbox-wrench", "transform", "trash", "tribox", "twitter", "two-disk-stacks", "type-cursor", "umbrella", "user-check", "user-document", "user-information", "user-pencil", "user-solid", "user-star", "user-unavailable", "user", "variable", "voice", "wand", "warn-solid", "warn", "widget", "wifi", "youtube"];
2
2
  export default streamlineIconNames;
3
3
  export type StreamlineIconName = (typeof streamlineIconNames)[number];
4
4
  //# sourceMappingURL=streamlineIconNames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streamlineIconNames.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/streamlineIconNames.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,mBAAmB,s5JAyVf,CAAC;AAEX,eAAe,mBAAmB,CAAC;AAEnC,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"streamlineIconNames.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/streamlineIconNames.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,mBAAmB,66JA0Vf,CAAC;AAEX,eAAe,mBAAmB,CAAC;AAEnC,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -16,6 +16,7 @@ const streamlineIconNames = [
16
16
  'arrow-micro-down',
17
17
  'arrow-micro-left',
18
18
  'arrow-micro-right',
19
+ 'arrow-micro-up-down',
19
20
  'arrow-micro-up',
20
21
  'arrow-out',
21
22
  'arrow-right-column',
@@ -1 +1 @@
1
- {"version":3,"file":"streamlineIconNames.js","sourceRoot":"","sources":["../../../src/components/Icon/streamlineIconNames.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,MAAM,mBAAmB,GAAG;IAC1B,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;IACZ,aAAa;IACb,QAAQ;IACR,KAAK;IACL,KAAK;IACL,uBAAuB;IACvB,iBAAiB;IACjB,YAAY;IACZ,mBAAmB;IACnB,YAAY;IACZ,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;IACnB,gB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U;IACV,YAAY;IACZ,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,UAAU;IACV,OAAO;IACP,MAAM;IACN,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,MAAM;IACN,SAAS;CACD,CAAC;AAEX,eAAe,mBAAmB,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\n\nconst streamlineIconNames = [\n 'ai-assist',\n 'alexa',\n 'align-center',\n 'align-left',\n 'align-right',\n 'amazon',\n 'api',\n 'app',\n 'arrow-above-row-right',\n 'arrow-bend-left',\n 'arrow-down',\n 'arrow-left-column',\n 'arrow-left',\n 'arrow-micro-down',\n 'arrow-micro-left',\n 'arrow-micro-right',\n 'arrow-micro-up',\n 'arrow-out',\n 'arrow-right-column',\n 'arrow-right',\n 'arrow-up-down',\n 'arrow-up',\n 'bank',\n 'bars',\n 'bell-push-notification',\n 'bell',\n 'bluetooth',\n 'book-open',\n 'bookmark',\n 'box-4',\n 'box',\n 'browser-code',\n 'browser',\n 'bug',\n 'building-2',\n 'building-3-solid',\n 'building-3',\n 'bulb',\n 'calendar-empty',\n 'calendar-range',\n 'calendar',\n 'car',\n 'caret-down',\n 'caret-left',\n 'caret-right',\n 'caret-up',\n 'case-medical',\n 'case-solid',\n 'case',\n 'chain',\n 'chart-line',\n 'chart-pie',\n 'chat-check',\n 'chat-exclamation-mark',\n 'chat-help',\n 'chat-quote',\n 'chat-transfer',\n 'chat-typing',\n 'chat-unavailable',\n 'chat',\n 'chats',\n 'check-badge',\n 'check',\n 'chevron-solid',\n 'chevron',\n 'circle-mixed-left',\n 'circle',\n 'clipboard-check',\n 'clipboard-medical',\n 'clipboard-pencil-solid',\n 'clipboard-pencil',\n 'clipboard-plus',\n 'clipboard',\n 'clock-solid',\n 'clock',\n 'cloud',\n 'code-search',\n 'code',\n 'column-delete',\n 'conversation',\n 'copy',\n 'credit',\n 'csr-agent',\n 'currency',\n 'custom-column',\n 'database-search',\n 'dataviz-area-multi',\n 'dataviz-area-stacked',\n 'dataviz-area',\n 'dataviz-bar-clustered',\n 'dataviz-bar-stacked',\n 'dataviz-bar',\n 'dataviz-bell-curve',\n 'dataviz-bubble',\n 'dataviz-column-clustered',\n 'dataviz-column-stacked',\n 'dataviz-column',\n 'dataviz-combo',\n 'dataviz-datetime-field',\n 'dataviz-donut',\n 'dataviz-flip-counter',\n 'dataviz-forecast',\n 'dataviz-funnel',\n 'dataviz-gauge-linear',\n 'dataviz-gauge-progress',\n 'dataviz-gauge',\n 'dataviz-geo-choropleth',\n 'dataviz-heatmap',\n 'dataviz-histogram',\n 'dataviz-line-horizontal',\n 'dataviz-line-multi',\n 'dataviz-line-stepped',\n 'dataviz-line',\n 'dataviz-numeric-field',\n 'dataviz-pareto',\n 'dataviz-pie',\n 'dataviz-pivot-table',\n 'dataviz-radar',\n 'dataviz-scatter',\n 'dataviz-spark',\n 'dataviz-sparklines-area',\n 'dataviz-sparklines-columns',\n 'dataviz-sparklines-line',\n 'dataviz-sparklines-pies',\n 'dataviz-spline',\n 'dataviz-string-field',\n 'dataviz-table-with-bars',\n 'dataviz-trend-down',\n 'dataviz-trend-up',\n 'dataviz-waterfall',\n 'desktop',\n 'diamond',\n 'disc-stack-solid',\n 'disc-stack',\n 'doctor-female',\n 'doctor-male',\n 'document-pdf',\n 'document',\n 'docusign',\n 'dot-9-solid',\n 'download',\n 'drag',\n 'email-open',\n 'exchange',\n 'eye-off',\n 'face-blank',\n 'face-happy',\n 'face-sad',\n 'facebook',\n 'farming-wheat',\n 'fast-forward',\n 'field-cursor',\n 'filetype-text',\n 'filter',\n 'fingerprint-search',\n 'flag-check',\n 'flag-finish',\n 'flag-wave-solid',\n 'flag-wave',\n 'flashlight',\n 'flow-process',\n 'folder-closed',\n 'folder-empty',\n 'folder-hierarchy',\n 'folder-nested',\n 'folder-search',\n 'folder',\n 'folders',\n 'forward-all',\n 'forward',\n 'function',\n 'gear-play',\n 'gear-solid',\n 'gear',\n 'globe',\n 'google',\n 'government',\n 'graduate',\n 'hand-book-open',\n 'hand-over-paper',\n 'hand',\n 'handshake',\n 'header',\n 'headset',\n 'home-solid',\n 'home',\n 'house-bed',\n 'house-person',\n 'infinity',\n 'information',\n 'ios-face-id',\n 'ios-finger-id',\n 'layers',\n 'letter',\n 'linkedin',\n 'list',\n 'location-solid',\n 'location',\n 'mail-warning',\n 'mail',\n 'megaphone',\n 'merge',\n 'messages-to-chat',\n 'mic-off',\n 'mic',\n 'minus',\n 'mobile-phone',\n 'module',\n 'money-atm',\n 'money',\n 'monitor-lock',\n 'more',\n 'mountain-top',\n 'multi-device',\n 'navigation',\n 'newspaper-fold',\n 'newspaper',\n 'nodes-down',\n 'note-pin',\n 'notepad',\n 'number-decimal',\n 'offer-list',\n 'offer-table',\n 'offer',\n 'open-new-tab',\n 'open',\n 'opportunity-refresh',\n 'opportunity',\n 'os-apple',\n 'paper-clip',\n 'paper-search',\n 'password-lock',\n 'pause',\n 'paypal',\n 'pega',\n 'pegasus',\n 'pencil',\n 'people-group-stakeholders',\n 'percentage',\n 'person-connection',\n 'person-hierarchy-check',\n 'person-stars',\n 'person',\n 'persons-group',\n 'phone-call',\n 'phone-dial',\n 'phone-hangup',\n 'phone-in',\n 'phone-ivr',\n 'phone-off',\n 'phone-out',\n 'phone-split',\n 'phone-transfer',\n 'phone',\n 'phonebook',\n 'picture',\n 'play-solid',\n 'play',\n 'plug-solid',\n 'plug',\n 'plus',\n 'polaris-solid',\n 'polaris',\n 'presentation',\n 'product',\n 'project-plan',\n 'project',\n 'qr',\n 'receipt',\n 'reply-all',\n 'reply',\n 'reset',\n 'robot-happy',\n 'robot-sad',\n 'robot',\n 'roof-people',\n 'row-delete',\n 'row-insert',\n 'row',\n 'rule-library-solid',\n 'rule-library',\n 'rule',\n 'scale-down',\n 'scale-up',\n 'script',\n 'search-analytics-solid',\n 'search-analytics',\n 'search',\n 'send',\n 'server',\n 'set',\n 'share',\n 'shield-solid',\n 'shield',\n 'shipment-box',\n 'shop',\n 'shuffle',\n 'sigma',\n 'slideshow',\n 'snow',\n 'speaker',\n 'split',\n 'stakeholders',\n 'star-mixed',\n 'star-solid',\n 'star',\n 'sub-step',\n 'table-bolt-solid',\n 'table-bolt',\n 'table',\n 'tag',\n 'target-path',\n 'team',\n 'thumbs-down-solid',\n 'thumbs-down',\n 'thumbs-up-solid',\n 'thumbs-up',\n 'times',\n 'todo',\n 'toolbox-open',\n 'toolbox-wrench',\n 'transform',\n 'trash',\n 'tribox',\n 'twitter',\n 'two-disk-stacks',\n 'type-cursor',\n 'umbrella',\n 'user-check',\n 'user-document',\n 'user-information',\n 'user-pencil',\n 'user-solid',\n 'user-star',\n 'user-unavailable',\n 'user',\n 'variable',\n 'voice',\n 'wand',\n 'warn-solid',\n 'warn',\n 'widget',\n 'wifi',\n 'youtube'\n] as const;\n\nexport default streamlineIconNames;\n\nexport type StreamlineIconName = (typeof streamlineIconNames)[number];\n"]}
1
+ {"version":3,"file":"streamlineIconNames.js","sourceRoot":"","sources":["../../../src/components/Icon/streamlineIconNames.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,MAAM,mBAAmB,GAAG;IAC1B,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;IACZ,aAAa;IACb,QAAQ;IACR,KAAK;IACL,KAAK;IACL,uBAAuB;IACvB,iBAAiB;IACjB,YAAY;IACZ,mBAAmB;IACnB,YAAY;IACZ,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;IACnB,qBAAqB;IACrB,gBAAgB;IAChB,WAAW;IACX,oBAAoB;IACpB,aAAa;IACb,eAAe;IACf,UAAU;IACV,MAAM;IACN,MAAM;IACN,wBAAwB;IACxB,MAAM;IACN,WAAW;IACX,WAAW;IACX,UAAU;IACV,OAAO;IACP,KAAK;IACL,cAAc;IACd,SAAS;IACT,KAAK;IACL,YAAY;IACZ,kBAAkB;IAClB,YAAY;IACZ,MAAM;IACN,gBAAgB;IAChB,gBAAgB;IACh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AAY;IACZ,YAAY;IACZ,cAAc;IACd,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,aAAa;IACb,gBAAgB;IAChB,OAAO;IACP,WAAW;IACX,SAAS;IACT,YAAY;IACZ,MAAM;IACN,YAAY;IACZ,MAAM;IACN,MAAM;IACN,eAAe;IACf,SAAS;IACT,cAAc;IACd,SAAS;IACT,cAAc;IACd,SAAS;IACT,IAAI;IACJ,SAAS;IACT,WAAW;IACX,OAAO;IACP,OAAO;IACP,aAAa;IACb,WAAW;IACX,OAAO;IACP,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,KAAK;IACL,oBAAoB;IACpB,cAAc;IACd,MAAM;IACN,YAAY;IACZ,UAAU;IACV,QAAQ;IACR,wBAAwB;IACxB,kBAAkB;IAClB,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,KAAK;IACL,OAAO;IACP,cAAc;IACd,QAAQ;IACR,cAAc;IACd,MAAM;IACN,SAAS;IACT,OAAO;IACP,WAAW;IACX,MAAM;IACN,SAAS;IACT,OAAO;IACP,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,MAAM;IACN,UAAU;IACV,kBAAkB;IAClB,YAAY;IACZ,OAAO;IACP,KAAK;IACL,aAAa;IACb,MAAM;IACN,mBAAmB;IACnB,aAAa;IACb,iBAAiB;IACjB,WAAW;IACX,OAAO;IACP,MAAM;IACN,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,OAAO;IACP,QAAQ;IACR,SAAS;IACT,iBAAiB;IACjB,aAAa;IACb,UAAU;IACV,YAAY;IACZ,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,UAAU;IACV,OAAO;IACP,MAAM;IACN,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,MAAM;IACN,SAAS;CACD,CAAC;AAEX,eAAe,mBAAmB,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\n\nconst streamlineIconNames = [\n 'ai-assist',\n 'alexa',\n 'align-center',\n 'align-left',\n 'align-right',\n 'amazon',\n 'api',\n 'app',\n 'arrow-above-row-right',\n 'arrow-bend-left',\n 'arrow-down',\n 'arrow-left-column',\n 'arrow-left',\n 'arrow-micro-down',\n 'arrow-micro-left',\n 'arrow-micro-right',\n 'arrow-micro-up-down',\n 'arrow-micro-up',\n 'arrow-out',\n 'arrow-right-column',\n 'arrow-right',\n 'arrow-up-down',\n 'arrow-up',\n 'bank',\n 'bars',\n 'bell-push-notification',\n 'bell',\n 'bluetooth',\n 'book-open',\n 'bookmark',\n 'box-4',\n 'box',\n 'browser-code',\n 'browser',\n 'bug',\n 'building-2',\n 'building-3-solid',\n 'building-3',\n 'bulb',\n 'calendar-empty',\n 'calendar-range',\n 'calendar',\n 'car',\n 'caret-down',\n 'caret-left',\n 'caret-right',\n 'caret-up',\n 'case-medical',\n 'case-solid',\n 'case',\n 'chain',\n 'chart-line',\n 'chart-pie',\n 'chat-check',\n 'chat-exclamation-mark',\n 'chat-help',\n 'chat-quote',\n 'chat-transfer',\n 'chat-typing',\n 'chat-unavailable',\n 'chat',\n 'chats',\n 'check-badge',\n 'check',\n 'chevron-solid',\n 'chevron',\n 'circle-mixed-left',\n 'circle',\n 'clipboard-check',\n 'clipboard-medical',\n 'clipboard-pencil-solid',\n 'clipboard-pencil',\n 'clipboard-plus',\n 'clipboard',\n 'clock-solid',\n 'clock',\n 'cloud',\n 'code-search',\n 'code',\n 'column-delete',\n 'conversation',\n 'copy',\n 'credit',\n 'csr-agent',\n 'currency',\n 'custom-column',\n 'database-search',\n 'dataviz-area-multi',\n 'dataviz-area-stacked',\n 'dataviz-area',\n 'dataviz-bar-clustered',\n 'dataviz-bar-stacked',\n 'dataviz-bar',\n 'dataviz-bell-curve',\n 'dataviz-bubble',\n 'dataviz-column-clustered',\n 'dataviz-column-stacked',\n 'dataviz-column',\n 'dataviz-combo',\n 'dataviz-datetime-field',\n 'dataviz-donut',\n 'dataviz-flip-counter',\n 'dataviz-forecast',\n 'dataviz-funnel',\n 'dataviz-gauge-linear',\n 'dataviz-gauge-progress',\n 'dataviz-gauge',\n 'dataviz-geo-choropleth',\n 'dataviz-heatmap',\n 'dataviz-histogram',\n 'dataviz-line-horizontal',\n 'dataviz-line-multi',\n 'dataviz-line-stepped',\n 'dataviz-line',\n 'dataviz-numeric-field',\n 'dataviz-pareto',\n 'dataviz-pie',\n 'dataviz-pivot-table',\n 'dataviz-radar',\n 'dataviz-scatter',\n 'dataviz-spark',\n 'dataviz-sparklines-area',\n 'dataviz-sparklines-columns',\n 'dataviz-sparklines-line',\n 'dataviz-sparklines-pies',\n 'dataviz-spline',\n 'dataviz-string-field',\n 'dataviz-table-with-bars',\n 'dataviz-trend-down',\n 'dataviz-trend-up',\n 'dataviz-waterfall',\n 'desktop',\n 'diamond',\n 'disc-stack-solid',\n 'disc-stack',\n 'doctor-female',\n 'doctor-male',\n 'document-pdf',\n 'document',\n 'docusign',\n 'dot-9-solid',\n 'download',\n 'drag',\n 'email-open',\n 'exchange',\n 'eye-off',\n 'face-blank',\n 'face-happy',\n 'face-sad',\n 'facebook',\n 'farming-wheat',\n 'fast-forward',\n 'field-cursor',\n 'filetype-text',\n 'filter',\n 'fingerprint-search',\n 'flag-check',\n 'flag-finish',\n 'flag-wave-solid',\n 'flag-wave',\n 'flashlight',\n 'flow-process',\n 'folder-closed',\n 'folder-empty',\n 'folder-hierarchy',\n 'folder-nested',\n 'folder-search',\n 'folder',\n 'folders',\n 'forward-all',\n 'forward',\n 'function',\n 'gear-play',\n 'gear-solid',\n 'gear',\n 'globe',\n 'google',\n 'government',\n 'graduate',\n 'hand-book-open',\n 'hand-over-paper',\n 'hand',\n 'handshake',\n 'header',\n 'headset',\n 'home-solid',\n 'home',\n 'house-bed',\n 'house-person',\n 'infinity',\n 'information',\n 'ios-face-id',\n 'ios-finger-id',\n 'layers',\n 'letter',\n 'linkedin',\n 'list',\n 'location-solid',\n 'location',\n 'mail-warning',\n 'mail',\n 'megaphone',\n 'merge',\n 'messages-to-chat',\n 'mic-off',\n 'mic',\n 'minus',\n 'mobile-phone',\n 'module',\n 'money-atm',\n 'money',\n 'monitor-lock',\n 'more',\n 'mountain-top',\n 'multi-device',\n 'navigation',\n 'newspaper-fold',\n 'newspaper',\n 'nodes-down',\n 'note-pin',\n 'notepad',\n 'number-decimal',\n 'offer-list',\n 'offer-table',\n 'offer',\n 'open-new-tab',\n 'open',\n 'opportunity-refresh',\n 'opportunity',\n 'os-apple',\n 'paper-clip',\n 'paper-search',\n 'password-lock',\n 'pause',\n 'paypal',\n 'pega',\n 'pegasus',\n 'pencil',\n 'people-group-stakeholders',\n 'percentage',\n 'person-connection',\n 'person-hierarchy-check',\n 'person-stars',\n 'person',\n 'persons-group',\n 'phone-call',\n 'phone-dial',\n 'phone-hangup',\n 'phone-in',\n 'phone-ivr',\n 'phone-off',\n 'phone-out',\n 'phone-split',\n 'phone-transfer',\n 'phone',\n 'phonebook',\n 'picture',\n 'play-solid',\n 'play',\n 'plug-solid',\n 'plug',\n 'plus',\n 'polaris-solid',\n 'polaris',\n 'presentation',\n 'product',\n 'project-plan',\n 'project',\n 'qr',\n 'receipt',\n 'reply-all',\n 'reply',\n 'reset',\n 'robot-happy',\n 'robot-sad',\n 'robot',\n 'roof-people',\n 'row-delete',\n 'row-insert',\n 'row',\n 'rule-library-solid',\n 'rule-library',\n 'rule',\n 'scale-down',\n 'scale-up',\n 'script',\n 'search-analytics-solid',\n 'search-analytics',\n 'search',\n 'send',\n 'server',\n 'set',\n 'share',\n 'shield-solid',\n 'shield',\n 'shipment-box',\n 'shop',\n 'shuffle',\n 'sigma',\n 'slideshow',\n 'snow',\n 'speaker',\n 'split',\n 'stakeholders',\n 'star-mixed',\n 'star-solid',\n 'star',\n 'sub-step',\n 'table-bolt-solid',\n 'table-bolt',\n 'table',\n 'tag',\n 'target-path',\n 'team',\n 'thumbs-down-solid',\n 'thumbs-down',\n 'thumbs-up-solid',\n 'thumbs-up',\n 'times',\n 'todo',\n 'toolbox-open',\n 'toolbox-wrench',\n 'transform',\n 'trash',\n 'tribox',\n 'twitter',\n 'two-disk-stacks',\n 'type-cursor',\n 'umbrella',\n 'user-check',\n 'user-document',\n 'user-information',\n 'user-pencil',\n 'user-solid',\n 'user-star',\n 'user-unavailable',\n 'user',\n 'variable',\n 'voice',\n 'wand',\n 'warn-solid',\n 'warn',\n 'widget',\n 'wifi',\n 'youtube'\n] as const;\n\nexport default streamlineIconNames;\n\nexport type StreamlineIconName = (typeof streamlineIconNames)[number];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,kBAAkB,qMAE9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,0KAAiB,CAAC;AAElD,eAAO,MAAM,cAAc;kBACX,OAAO;WACd,SAAS,CAAC,MAAM,CAAC;;;SAoHzB,CAAC;AAIF,eAAO,MAAM,eAAe,yGAW3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,uGAElC,CAAC;AAEF,eAAO,MAAM,eAAe,wGAM1B,CAAC;AAIH,eAAO,MAAM,mBAAmB,wGAM9B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAUhC,CAAC;AAIH,eAAO,MAAM,oBAAoB,4GA6C/B,CAAC;AAIH,eAAO,MAAM,cAAc,wGAiB1B,CAAC;AAIF,eAAO,MAAM,uBAAuB,8GAMlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,8GAEzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wGAI7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yGAoBjC,CAAC;AAIF,eAAO,MAAM,UAAU,yGAsDrB,CAAC"}
1
+ {"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,kBAAkB,qMAE9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,0KAAiB,CAAC;AAElD,eAAO,MAAM,cAAc;kBACX,OAAO;WACd,SAAS,CAAC,MAAM,CAAC;;;SAoHzB,CAAC;AAIF,eAAO,MAAM,eAAe,yGAW3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,uGAElC,CAAC;AAEF,eAAO,MAAM,eAAe,wGAM1B,CAAC;AAIH,eAAO,MAAM,mBAAmB,wGAM9B,CAAC;AAIH,eAAO,MAAM,qBAAqB,yGAUhC,CAAC;AAIH,eAAO,MAAM,oBAAoB,4GA6C/B,CAAC;AAIH,eAAO,MAAM,cAAc,wGAiB1B,CAAC;AAIF,eAAO,MAAM,uBAAuB,8GAMlC,CAAC;AAIH,eAAO,MAAM,6BAA6B,8GAEzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,wGAI7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yGAoBjC,CAAC;AAIF,eAAO,MAAM,UAAU,yGAmDrB,CAAC"}
@@ -248,7 +248,6 @@ export const StyledMenuListWrapper = styled.div(({ theme }) => css `
248
248
  StyledMenuListWrapper.defaultProps = defaultThemeProp;
249
249
  export const StyledMenu = styled.div(({ theme }) => {
250
250
  const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;
251
- const activeColor = tryCatch(() => mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive));
252
251
  return css `
253
252
  display: flex;
254
253
  flex-direction: column;
@@ -274,7 +273,7 @@ export const StyledMenu = styled.div(({ theme }) => {
274
273
  }
275
274
 
276
275
  &[data-active-scope='true'] [data-current='true'] {
277
- background-color: ${activeColor};
276
+ box-shadow: ${theme.base.shadow['focus-inset']};
278
277
  }
279
278
 
280
279
  ${StyledVisuallyHiddenText}:first-child {
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.styles.js","sourceRoot":"","sources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AAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,MAAM,WAAW,GAAG,mBAAmB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;IAC3E,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CAChC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CACpF,CAAC;IAEF,OAAO,GAAG,CAAA;;;;;MAKN,qBAAqB;;;;;oBAKP,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;0BAejB,WAAW;;;MAG/B,wBAAwB;UACpB,qBAAqB;;;;;;;;iBAQd,KAAK,CAAC,IAAI,CAAC,OAAO;;;;uBAIZ,WAAW;;;;oBAId,WAAW;;GAE5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { hideVisually, mix, readableColor, rgba } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledEmptyState } from '../EmptyState';\nimport Icon, { StyledIcon } from '../Icon';\nimport { StyledGrid } from '../Grid';\nimport { tryCatch } from '../../utils';\nimport { StyledText } from '../Text';\nimport { StyledVisuallyHiddenText } from '../VisuallyHiddenText/VisuallyHiddenText';\nimport Button from '../Button';\n\nimport type { MenuProps } from './Menu.types';\n\nexport const StyledExpandButton = styled(Button)`\n align-self: center;\n`;\n\nexport const StyledCheckMarkIcon = styled(Icon)``;\n\nexport const StyledMenuItem = styled.li<{\n isParentItem: boolean;\n mode?: MenuProps['mode'];\n isChecked?: boolean;\n selectableParent?: boolean;\n}>(\n ({\n theme: { base, components },\n isParentItem,\n mode = 'action',\n 'aria-selected': isChecked = false,\n selectableParent = false\n }) => {\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverCheckColor = tryCatch(() =>\n rgba(\n components['radio-check'][':checked']['background-color'],\n base.transparency['transparent-5']\n )\n );\n\n const checkedBackground = components['radio-check'][':checked']['background-color'];\n const checkedForeground = tryCatch(() => readableColor(checkedBackground));\n\n return css`\n min-height: ${base['hit-area']['mouse-min']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n cursor: pointer;\n\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n }\n\n &:focus-within {\n background-color: ${activeColor};\n }\n\n &:hover {\n ${StyledCheckMarkIcon} {\n visibility: visible;\n ${mode === 'single-select' &&\n css`\n color: ${isChecked ? checkedBackground : hoverCheckColor};\n `}\n ${mode === 'multi-select' &&\n css`\n ${!isChecked &&\n css`\n border-color: ${components['form-control'][':hover']['border-color']};\n `}\n `}\n }\n }\n\n &:hover:not([aria-disabled='true']) {\n background-color: ${hoverColor};\n }\n\n a:first-of-type {\n display: block;\n width: 100%;\n text-decoration: none;\n color: inherit;\n }\n\n ${isParentItem &&\n !selectableParent &&\n (mode === 'multi-select' || mode === 'single-select') &&\n css`\n padding-inline-start: calc(1.125rem + 2 * ${base.spacing});\n `}\n\n ${StyledGrid} {\n flex-grow: 1;\n }\n\n ${StyledCheckMarkIcon} {\n margin-inline-start: 0;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedForeground};\n background-color: ${checkedBackground};\n border: 0.0625rem solid ${components['radio-check'][':checked']['border-color']};\n `\n : css`\n color: transparent;\n border: 0.0625rem solid ${components['radio-check']['border-color']};\n `}\n border-radius: min(\n calc(${base['border-radius']} * ${components.checkbox['border-radius']}),\n 0.25rem\n );\n `}\n }\n\n &[aria-disabled='true'] {\n background-color: ${components['form-control'][':disabled']['background-color']};\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nStyledMenuItem.defaultProps = defaultThemeProp;\n\nexport const StyledAncestors = styled.div`\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n & > ${StyledText} {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n\nexport const StyledVisibilityHidden = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledSeparator = styled.li(({ theme }) => {\n return css`\n height: 0.0625rem;\n background-color: ${theme.base.palette['border-line']};\n margin: ${theme.base.spacing} 0;\n `;\n});\n\nStyledSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupList = styled.ul(({ theme }) => {\n return css`\n ${StyledMenuItem} {\n padding-inline-start: calc(1.5 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledMenuGroupList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupHeader = styled.div(({ theme }) => {\n return css`\n min-height: ${theme.base['hit-area']['mouse-min']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n background-color: ${theme.base.palette['secondary-background']};\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n }\n `;\n});\n\nStyledMenuGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n cursor: pointer;\n width: 100%;\n background-color: ${base.palette['primary-background']};\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &:focus-within {\n box-shadow: ${base.shadow['focus-inset']};\n background-color: ${activeColor};\n }\n\n &:hover:not([aria-disabled='true']):not([data-current='true']) {\n background-color: ${hoverColor};\n }\n color: ${base.palette['foreground-color']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n border-radius: inherit;\n\n > ${StyledGrid} {\n grid-column-gap: ${base.spacing};\n }\n\n ${StyledIcon} {\n /* Fixes vertical align issue increasing box size beyond square */\n display: block;\n }\n `;\n});\n\nStyledMenuListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledEmptyState} {\n padding: ${theme.base.spacing};\n height: auto;\n }\n\n li:not(:first-child):not([role='presentation']) > ${StyledMenuGroupHeader} {\n margin-block-start: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n const activeColor = tryCatch(() =>\n mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive)\n );\n\n return css`\n display: flex;\n flex-direction: column;\n\n &,\n ${StyledMenuListWrapper} {\n max-height: inherit;\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &[data-active-scope='true'] [data-current='true'] {\n background-color: ${activeColor};\n }\n\n ${StyledVisuallyHiddenText}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Menu.styles.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,MAAM,MAAM,WAAW,CAAC;AAI/B,MAAM,CAAC,MAAM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Color, rgba } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledEmptyState } from '../EmptyState';\nimport Icon, { StyledIcon } from '../Icon';\nimport { StyledGrid } from '../Grid';\nimport { tryCatch } from '../../utils';\nimport { StyledText } from '../Text';\nimport { StyledVisuallyHiddenText } from '../VisuallyHiddenText/VisuallyHiddenText';\nimport Button from '../Button';\n\nimport type { MenuProps } from './Menu.types';\n\nexport const StyledExpandButton = styled(Button)`\n align-self: center;\n`;\n\nexport const StyledCheckMarkIcon = styled(Icon)``;\n\nexport const StyledMenuItem = styled.li<{\n isParentItem: boolean;\n mode?: MenuProps['mode'];\n isChecked?: boolean;\n selectableParent?: boolean;\n}>(\n ({\n theme: { base, components },\n isParentItem,\n mode = 'action',\n 'aria-selected': isChecked = false,\n selectableParent = false\n }) => {\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverCheckColor = tryCatch(() =>\n rgba(\n components['radio-check'][':checked']['background-color'],\n base.transparency['transparent-5']\n )\n );\n\n const checkedBackground = components['radio-check'][':checked']['background-color'];\n const checkedForeground = tryCatch(() => readableColor(checkedBackground));\n\n return css`\n min-height: ${base['hit-area']['mouse-min']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n cursor: pointer;\n\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n }\n\n &:focus-within {\n background-color: ${activeColor};\n }\n\n &:hover {\n ${StyledCheckMarkIcon} {\n visibility: visible;\n ${mode === 'single-select' &&\n css`\n color: ${isChecked ? checkedBackground : hoverCheckColor};\n `}\n ${mode === 'multi-select' &&\n css`\n ${!isChecked &&\n css`\n border-color: ${components['form-control'][':hover']['border-color']};\n `}\n `}\n }\n }\n\n &:hover:not([aria-disabled='true']) {\n background-color: ${hoverColor};\n }\n\n a:first-of-type {\n display: block;\n width: 100%;\n text-decoration: none;\n color: inherit;\n }\n\n ${isParentItem &&\n !selectableParent &&\n (mode === 'multi-select' || mode === 'single-select') &&\n css`\n padding-inline-start: calc(1.125rem + 2 * ${base.spacing});\n `}\n\n ${StyledGrid} {\n flex-grow: 1;\n }\n\n ${StyledCheckMarkIcon} {\n margin-inline-start: 0;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedForeground};\n background-color: ${checkedBackground};\n border: 0.0625rem solid ${components['radio-check'][':checked']['border-color']};\n `\n : css`\n color: transparent;\n border: 0.0625rem solid ${components['radio-check']['border-color']};\n `}\n border-radius: min(\n calc(${base['border-radius']} * ${components.checkbox['border-radius']}),\n 0.25rem\n );\n `}\n }\n\n &[aria-disabled='true'] {\n background-color: ${components['form-control'][':disabled']['background-color']};\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nStyledMenuItem.defaultProps = defaultThemeProp;\n\nexport const StyledAncestors = styled.div`\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n & > ${StyledText} {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n\nexport const StyledVisibilityHidden = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledSeparator = styled.li(({ theme }) => {\n return css`\n height: 0.0625rem;\n background-color: ${theme.base.palette['border-line']};\n margin: ${theme.base.spacing} 0;\n `;\n});\n\nStyledSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupList = styled.ul(({ theme }) => {\n return css`\n ${StyledMenuItem} {\n padding-inline-start: calc(1.5 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledMenuGroupList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupHeader = styled.div(({ theme }) => {\n return css`\n min-height: ${theme.base['hit-area']['mouse-min']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n background-color: ${theme.base.palette['secondary-background']};\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n }\n `;\n});\n\nStyledMenuGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n cursor: pointer;\n width: 100%;\n background-color: ${base.palette['primary-background']};\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &:focus-within {\n box-shadow: ${base.shadow['focus-inset']};\n background-color: ${activeColor};\n }\n\n &:hover:not([aria-disabled='true']):not([data-current='true']) {\n background-color: ${hoverColor};\n }\n color: ${base.palette['foreground-color']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n border-radius: inherit;\n\n > ${StyledGrid} {\n grid-column-gap: ${base.spacing};\n }\n\n ${StyledIcon} {\n /* Fixes vertical align issue increasing box size beyond square */\n display: block;\n }\n `;\n});\n\nStyledMenuListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledEmptyState} {\n padding: ${theme.base.spacing};\n height: auto;\n }\n\n li:not(:first-child):not([role='presentation']) > ${StyledMenuGroupHeader} {\n margin-block-start: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n\n return css`\n display: flex;\n flex-direction: column;\n\n &,\n ${StyledMenuListWrapper} {\n max-height: inherit;\n }\n\n &:focus {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &[data-active-scope='true'] [data-current='true'] {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n\n ${StyledVisuallyHiddenText}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n"]}
@@ -65,7 +65,7 @@ const MenuButton = forwardRef(function MenuButton(props, ref) {
65
65
  }
66
66
  }, buttonRef);
67
67
  const { rtl } = useDirection();
68
- return (_jsxs(_Fragment, { children: [_jsx(Button, { "data-testid": testIds.root, as: StyledMenuButton, "aria-label": text, ...restProps, id: id, ref: buttonRef, "aria-expanded": isOpen, "aria-haspopup": 'menu', "aria-controls": `${id}-popover`, label: iconOnly && !isOpen ? text : undefined, onClick: (e) => {
68
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { "data-testid": testIds.root, as: StyledMenuButton, "aria-label": text, ...restProps, id: id, ref: buttonRef, "aria-expanded": isOpen, "aria-haspopup": 'menu', "aria-controls": isOpen ? `${id}-popover` : undefined, label: iconOnly && !isOpen ? text : undefined, onClick: (e) => {
69
69
  // e.detail is 0 when triggered by keyboard.
70
70
  const mouseClick = e.detail > 0;
71
71
  // Close the menu if it is open and either:
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAS1D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,kBAAkB,EAClB,MAAM,EACN,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,EACV,MAAM,aAAa,CAAC;AACrB,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,kBAAkB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uB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,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { forwardRef, useState, useCallback } from 'react';\nimport type {\n FunctionComponent,\n MouseEventHandler,\n MouseEvent,\n UIEvent,\n PropsWithoutRef,\n KeyboardEventHandler\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp, OmitStrict, TestIdProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport {\n useConsolidatedRef,\n useUID,\n useFocusWithin,\n useDirection,\n useTestIds,\n useEscape\n} from '../../hooks';\nimport Button, { StyledButton } from '../Button';\nimport type { ButtonProps } from '../Button';\nimport Popover, { StyledPopover } from '../Popover';\nimport type { PopoverProps } from '../Popover';\nimport Menu from '../Menu';\nimport type { AcceptedMouseEventElement, MenuProps } from '../Menu/Menu.types';\nimport Icon, { registerIcon, StyledIcon } from '../Icon';\nimport * as arrowMicroDownIcon from '../Icon/icons/arrow-micro-down.icon';\nimport Text, { StyledText } from '../Text';\nimport Flex from '../Flex';\nimport { Count } from '../Badges';\nimport type { CountProps } from '../Badges/Count';\nimport { withTestIds } from '../../utils';\n\nimport { getMenuButtonTestIds } from './MenuButton.test-ids';\n\nregisterIcon(arrowMicroDownIcon);\n\nexport interface MenuButtonProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The text for the MenuButton also used to set the aria-label. */\n text: string;\n /**\n * Determines the Button variant for the MenuButton.\n * @default 'secondary'\n */\n variant?: ButtonProps['variant'];\n /** The name of the icon for the MenuButton. */\n icon?: string;\n /** Only display the icon. The text prop will be forwarded to a tooltip. */\n iconOnly?: ButtonProps['icon'];\n /** The total count representing the list data which was selected. */\n count?: CountProps['children'];\n /** The click handler for the MenuButton. */\n onClick?: MouseEventHandler;\n /** Menu related props. */\n menu?: MenuProps;\n /** Popover related props. */\n popover?: OmitStrict<PopoverProps, 'show' | 'target' | 'children'>;\n /** DOM id for the button element. */\n id?: string;\n /** Ref for the button element. */\n ref?: ButtonProps['ref'];\n /** The keydown handler for the MenuButton. */\n onKeyDown?: KeyboardEventHandler;\n}\n\nconst StyledMenuButton = styled.button(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n gap: ${spacing};\n flex-shrink: 0;\n white-space: nowrap;\n max-width: 100%;\n\n & + ${StyledPopover} + ${StyledButton} {\n margin-inline-start: ${spacing};\n }\n `;\n }\n);\n\nStyledMenuButton.defaultProps = defaultThemeProp;\n\nconst StyledMenuButtonChildren = styled.span(({ theme }) => {\n return css`\n max-width: 100%;\n\n ${StyledText} {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n ${StyledIcon}:last-child:not(:first-child) {\n /* Offsets the flex gap to make the down arrow appear to trail the text. */\n margin-inline-start: -${theme.base.spacing};\n }\n `;\n});\n\nconst StyledMenuButtonPopover = styled(Popover)`\n min-width: 20ch;\n`;\n\nconst MenuButton: FunctionComponent<ForwardProps & MenuButtonProps> = forwardRef(\n function MenuButton(props: PropsWithoutRef<MenuButtonProps>, ref: MenuButtonProps['ref']) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n text,\n menu,\n popover,\n onClick,\n icon,\n count,\n iconOnly = false,\n ...restProps\n } = props;\n const testIds = useTestIds(testId, getMenuButtonTestIds);\n const [isOpen, setIsOpen] = useState(false);\n\n const buttonRef = useConsolidatedRef(ref);\n const popoverRef = useConsolidatedRef<HTMLDivElement>(popover?.ref);\n const menuRef = useConsolidatedRef<HTMLDivElement>(menu?.ref);\n\n // FIXME: Type assertion required for issue in useFocusWithin generic\n useFocusWithin<HTMLElement>(\n [popoverRef, buttonRef],\n useCallback(isFocused => {\n if (!isFocused) setIsOpen(false);\n }, [])\n );\n\n useEscape(e => {\n if (isOpen) {\n setIsOpen(false);\n e.stopPropagation();\n }\n }, buttonRef);\n\n const { rtl } = useDirection();\n\n return (\n <>\n <Button\n data-testid={testIds.root}\n as={StyledMenuButton}\n aria-label={text}\n {...restProps}\n id={id}\n ref={buttonRef}\n aria-expanded={isOpen}\n aria-haspopup='menu'\n aria-controls={`${id}-popover`}\n label={iconOnly && !isOpen ? text : undefined}\n onClick={(e: MouseEvent<HTMLButtonElement> & UIEvent<HTMLButtonElement>) => {\n // e.detail is 0 when triggered by keyboard.\n const mouseClick = e.detail > 0;\n\n // Close the menu if it is open and either:\n // It is a *mouse* click on the button.\n // Or, the menu mode is not multiselect.\n if (isOpen && (mouseClick || menu?.mode !== 'multi-select')) {\n setIsOpen(false);\n } else {\n setIsOpen(true);\n }\n\n // If the menu is closed or the user mouse clicks.\n // This avoids Enter key firing onClick when selecting a menu item.\n if (!isOpen || mouseClick) {\n onClick?.(e);\n }\n }}\n icon={iconOnly}\n >\n <Flex as={StyledMenuButtonChildren} container={{ alignItems: 'center', gap: 1 }}>\n {icon && <Icon name={icon} />}\n {!iconOnly && (\n <>\n {text && <Text>{text}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n {text && <Icon name='arrow-micro-down' />}\n </>\n )}\n </Flex>\n </Button>\n <StyledMenuButtonPopover\n placement={rtl ? 'bottom-end' : 'bottom-start'}\n hideOnTargetHidden\n {...popover}\n id={`${id}-popover`}\n show={!!menu && isOpen}\n target={buttonRef.current}\n ref={popoverRef}\n >\n {menu && (\n <Menu\n testId={testIds.root}\n {...menu}\n ref={menuRef}\n items={menu.items}\n onItemClick={(itemId, e) => {\n if (\n menu.mode !== 'multi-select' &&\n (e as MouseEvent<AcceptedMouseEventElement> & UIEvent<AcceptedMouseEventElement>)\n .detail > 0\n ) {\n setIsOpen(false);\n }\n menu.onItemClick?.(itemId, e);\n }}\n focusControlEl={buttonRef.current || undefined}\n />\n )}\n </StyledMenuButtonPopover>\n </>\n );\n }\n);\n\nexport default withTestIds(MenuButton, getMenuButtonTestIds);\n"]}
1
+ {"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,E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AAI,EAAC,kBAAkB,GAAG,IACxC,CACJ,IACI,GACA,EACT,KAAC,uBAAuB,IACtB,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,EAC9C,kBAAkB,WACd,OAAO,EACX,EAAE,EAAE,GAAG,EAAE,UAAU,EACnB,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,MAAM,EACtB,MAAM,EAAE,SAAS,CAAC,OAAO,EACzB,GAAG,EAAE,UAAU,YAEd,IAAI,IAAI,CACP,KAAC,IAAI,IACH,MAAM,EAAE,OAAO,CAAC,IAAI,KAChB,IAAI,EACR,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBACzB,IACE,IAAI,CAAC,IAAI,KAAK,cAAc;4BAC3B,CAAgF;iCAC9E,MAAM,GAAG,CAAC,EACb;4BACA,SAAS,CAAC,KAAK,CAAC,CAAC;yBAClB;wBACD,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;oBAChC,CAAC,EACD,cAAc,EAAE,SAAS,CAAC,OAAO,IAAI,SAAS,GAC9C,CACH,GACuB,IACzB,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { forwardRef, useState, useCallback } from 'react';\nimport type {\n FunctionComponent,\n MouseEventHandler,\n MouseEvent,\n UIEvent,\n PropsWithoutRef,\n KeyboardEventHandler\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp, OmitStrict, TestIdProp } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport {\n useConsolidatedRef,\n useUID,\n useFocusWithin,\n useDirection,\n useTestIds,\n useEscape\n} from '../../hooks';\nimport Button, { StyledButton } from '../Button';\nimport type { ButtonProps } from '../Button';\nimport Popover, { StyledPopover } from '../Popover';\nimport type { PopoverProps } from '../Popover';\nimport Menu from '../Menu';\nimport type { AcceptedMouseEventElement, MenuProps } from '../Menu/Menu.types';\nimport Icon, { registerIcon, StyledIcon } from '../Icon';\nimport * as arrowMicroDownIcon from '../Icon/icons/arrow-micro-down.icon';\nimport Text, { StyledText } from '../Text';\nimport Flex from '../Flex';\nimport { Count } from '../Badges';\nimport type { CountProps } from '../Badges/Count';\nimport { withTestIds } from '../../utils';\n\nimport { getMenuButtonTestIds } from './MenuButton.test-ids';\n\nregisterIcon(arrowMicroDownIcon);\n\nexport interface MenuButtonProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The text for the MenuButton also used to set the aria-label. */\n text: string;\n /**\n * Determines the Button variant for the MenuButton.\n * @default 'secondary'\n */\n variant?: ButtonProps['variant'];\n /** The name of the icon for the MenuButton. */\n icon?: string;\n /** Only display the icon. The text prop will be forwarded to a tooltip. */\n iconOnly?: ButtonProps['icon'];\n /** The total count representing the list data which was selected. */\n count?: CountProps['children'];\n /** The click handler for the MenuButton. */\n onClick?: MouseEventHandler;\n /** Menu related props. */\n menu?: MenuProps;\n /** Popover related props. */\n popover?: OmitStrict<PopoverProps, 'show' | 'target' | 'children'>;\n /** DOM id for the button element. */\n id?: string;\n /** Ref for the button element. */\n ref?: ButtonProps['ref'];\n /** The keydown handler for the MenuButton. */\n onKeyDown?: KeyboardEventHandler;\n}\n\nconst StyledMenuButton = styled.button(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n gap: ${spacing};\n flex-shrink: 0;\n white-space: nowrap;\n max-width: 100%;\n\n & + ${StyledPopover} + ${StyledButton} {\n margin-inline-start: ${spacing};\n }\n `;\n }\n);\n\nStyledMenuButton.defaultProps = defaultThemeProp;\n\nconst StyledMenuButtonChildren = styled.span(({ theme }) => {\n return css`\n max-width: 100%;\n\n ${StyledText} {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n ${StyledIcon}:last-child:not(:first-child) {\n /* Offsets the flex gap to make the down arrow appear to trail the text. */\n margin-inline-start: -${theme.base.spacing};\n }\n `;\n});\n\nconst StyledMenuButtonPopover = styled(Popover)`\n min-width: 20ch;\n`;\n\nconst MenuButton: FunctionComponent<ForwardProps & MenuButtonProps> = forwardRef(\n function MenuButton(props: PropsWithoutRef<MenuButtonProps>, ref: MenuButtonProps['ref']) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n text,\n menu,\n popover,\n onClick,\n icon,\n count,\n iconOnly = false,\n ...restProps\n } = props;\n const testIds = useTestIds(testId, getMenuButtonTestIds);\n const [isOpen, setIsOpen] = useState(false);\n\n const buttonRef = useConsolidatedRef(ref);\n const popoverRef = useConsolidatedRef<HTMLDivElement>(popover?.ref);\n const menuRef = useConsolidatedRef<HTMLDivElement>(menu?.ref);\n\n // FIXME: Type assertion required for issue in useFocusWithin generic\n useFocusWithin<HTMLElement>(\n [popoverRef, buttonRef],\n useCallback(isFocused => {\n if (!isFocused) setIsOpen(false);\n }, [])\n );\n\n useEscape(e => {\n if (isOpen) {\n setIsOpen(false);\n e.stopPropagation();\n }\n }, buttonRef);\n\n const { rtl } = useDirection();\n\n return (\n <>\n <Button\n data-testid={testIds.root}\n as={StyledMenuButton}\n aria-label={text}\n {...restProps}\n id={id}\n ref={buttonRef}\n aria-expanded={isOpen}\n aria-haspopup='menu'\n aria-controls={isOpen ? `${id}-popover` : undefined}\n label={iconOnly && !isOpen ? text : undefined}\n onClick={(e: MouseEvent<HTMLButtonElement> & UIEvent<HTMLButtonElement>) => {\n // e.detail is 0 when triggered by keyboard.\n const mouseClick = e.detail > 0;\n\n // Close the menu if it is open and either:\n // It is a *mouse* click on the button.\n // Or, the menu mode is not multiselect.\n if (isOpen && (mouseClick || menu?.mode !== 'multi-select')) {\n setIsOpen(false);\n } else {\n setIsOpen(true);\n }\n\n // If the menu is closed or the user mouse clicks.\n // This avoids Enter key firing onClick when selecting a menu item.\n if (!isOpen || mouseClick) {\n onClick?.(e);\n }\n }}\n icon={iconOnly}\n >\n <Flex as={StyledMenuButtonChildren} container={{ alignItems: 'center', gap: 1 }}>\n {icon && <Icon name={icon} />}\n {!iconOnly && (\n <>\n {text && <Text>{text}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n {text && <Icon name='arrow-micro-down' />}\n </>\n )}\n </Flex>\n </Button>\n <StyledMenuButtonPopover\n placement={rtl ? 'bottom-end' : 'bottom-start'}\n hideOnTargetHidden\n {...popover}\n id={`${id}-popover`}\n show={!!menu && isOpen}\n target={buttonRef.current}\n ref={popoverRef}\n >\n {menu && (\n <Menu\n testId={testIds.root}\n {...menu}\n ref={menuRef}\n items={menu.items}\n onItemClick={(itemId, e) => {\n if (\n menu.mode !== 'multi-select' &&\n (e as MouseEvent<AcceptedMouseEventElement> & UIEvent<AcceptedMouseEventElement>)\n .detail > 0\n ) {\n setIsOpen(false);\n }\n menu.onItemClick?.(itemId, e);\n }}\n focusControlEl={buttonRef.current || undefined}\n />\n )}\n </StyledMenuButtonPopover>\n </>\n );\n }\n);\n\nexport default withTestIds(MenuButton, getMenuButtonTestIds);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoBhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAWhD,QAAA,MAAM,KAAK,EAAE,iBAAiB,CAAC,UAAU,GAAG,YAAY,CAkStD,CAAC;AAEH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAqBhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAWhD,QAAA,MAAM,KAAK,EAAE,iBAAiB,CAAC,UAAU,GAAG,YAAY,CA+StD,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -5,7 +5,7 @@ import { getFocusables } from '../../utils';
5
5
  import Backdrop from '../Backdrop';
6
6
  import Flex from '../Flex';
7
7
  import Button from '../Button';
8
- import { useConsolidatedRef, useI18n, useOuterEvent, useUID, useFocusTrap, usePrevious, useModalContext, useEvent } from '../../hooks';
8
+ import { useConsolidatedRef, useI18n, useOuterEvent, useUID, useFocusTrap, usePrevious, useModalContext, useEvent, useBreakpoint } from '../../hooks';
9
9
  import Icon, { registerIcon } from '../Icon';
10
10
  import * as timesIcon from '../Icon/icons/times.icon';
11
11
  import * as minusIcon from '../Icon/icons/minus.icon';
@@ -98,8 +98,9 @@ const Modal = forwardRef(function Modal(props, ref) {
98
98
  setFocus();
99
99
  }
100
100
  }, [progress]);
101
+ const isModalSmallOrAbove = useBreakpoint('sm', { breakpointRef: modalRef });
101
102
  const maximized = stretch || state === 'maximized';
102
- const modal = (_jsxs(Flex, { ...restProps, container: { direction: 'column' }, ref: modalRef, as: StyledModal, forwardedAs: as, onClick: (e) => e.stopPropagation(), onKeyDown: onModalKeyDown, alert: alert, role: alert ? 'alertdialog' : 'dialog', stretch: maximized, center: center, "aria-labelledby": `${id}-heading`, "aria-describedby": alert ? `${id}-content` : undefined, "aria-modal": state === 'docked' ? 'false' : 'true', state: state, "aria-busy": progress ? 'true' : 'false', children: [_jsxs(Flex, { container: { justify: 'between', alignItems: 'center', gap: 1 }, item: { shrink: 0 }, as: StyledModalHeader, hasAction: minimizable || dismissible, children: [_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, as: Text, variant: 'h2', id: `${id}-heading`, children: [_jsx("span", { children: heading }), typeof count === 'number' && _jsx(Count, { children: count })] }), _jsxs(Flex, { container: true, children: [maximizable && !alert && state !== 'maximized' && (_jsx(Button, { icon: true, variant: 'simple', label: t('maximize'), "aria-label": t('modal_maximize'), onKeyDown: onHeaderActionKeyDown, onClick: () => {
103
+ const modal = (_jsxs(Flex, { ...restProps, container: { direction: 'column' }, ref: modalRef, as: StyledModal, forwardedAs: as, onClick: (e) => e.stopPropagation(), onKeyDown: onModalKeyDown, alert: alert, role: alert ? 'alertdialog' : 'dialog', stretch: maximized, center: center, "aria-labelledby": `${id}-heading`, "aria-describedby": alert ? `${id}-content` : undefined, "aria-modal": state === 'docked' ? 'false' : 'true', state: state, "aria-busy": progress ? 'true' : 'false', children: [_jsxs(Flex, { container: { justify: 'between', alignItems: 'start', gap: 1 }, item: { shrink: 0 }, as: StyledModalHeader, hasAction: minimizable || dismissible, children: [_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, as: Text, variant: 'h2', id: `${id}-heading`, children: [_jsx("span", { children: heading }), typeof count === 'number' && _jsx(Count, { children: count })] }), _jsxs(Flex, { container: true, children: [maximizable && !alert && state !== 'maximized' && (_jsx(Button, { icon: true, variant: 'simple', label: t('maximize'), "aria-label": t('modal_maximize'), onKeyDown: onHeaderActionKeyDown, onClick: () => {
103
104
  if (onRequestMaximize?.() !== false) {
104
105
  maximize();
105
106
  }
@@ -113,7 +114,13 @@ const Modal = forwardRef(function Modal(props, ref) {
113
114
  }
114
115
  }, children: _jsx(Icon, { name: 'minus' }) })), dismissible && !alert && (_jsx(Button, { icon: true, variant: 'simple', label: t('close'), "aria-label": t('modal_close'), onKeyDown: onHeaderActionKeyDown, onClick: tryDismiss, ref: closeButtonRef, children: _jsx(Icon, { name: 'times' }) }))] })] }), _jsxs(Flex, { item: { grow: 1 }, as: StyledModalContent, ref: modalContentRef, style: modalContentRef.current
115
116
  ? { '--scroll-top': `${modalContentRef.current.scrollTop}px` }
116
- : undefined, children: [children && (_jsx(StyledModalChildrenWrap, { id: `${id}-content`, inert: progress ? '' : undefined, children: children })), _jsx(Progress, { visible: !!progress, focusOnVisible: true, placement: 'local', message: typeof progress === 'object' ? progress.message : t('loading') })] }), actions && (_jsx(Flex, { container: { justify: 'between' }, item: { shrink: 0 }, as: StyledModalActions, children: actions }))] }));
117
+ : undefined, children: [children && (_jsx(StyledModalChildrenWrap, { id: `${id}-content`, inert: progress ? '' : undefined, children: children })), _jsx(Progress, { visible: !!progress, focusOnVisible: true, placement: 'local', message: typeof progress === 'object' ? progress.message : t('loading') })] }), actions && (_jsx(Flex, { container: {
118
+ pad: [2.5, 3, 3],
119
+ gap: 1,
120
+ ...(isModalSmallOrAbove
121
+ ? { direction: 'row', justify: 'end' }
122
+ : { direction: 'column' })
123
+ }, item: { shrink: 0 }, as: StyledModalActions, isSmallOrAbove: isModalSmallOrAbove, children: actions }))] }));
117
124
  const renderModal = state === 'docked' ? (modal) : (_jsx(Backdrop, { ref: backdropRef, container: {
118
125
  alignItems: center || maximized ? 'center' : 'start'
119
126
  }, transitionSpeed: 'slow', open: state === 'open' || state === 'maximized', onBeforeTransitionIn: onBeforeOpen, onAfterTransitionIn: onAfterOpen, onBeforeTransitionOut: onBeforeClose, onAfterTransitionOut: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AASnE,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,MAAM,EACN,YAAY,EACZ,WAAW,EACX,eAAe,EACf,QAAQ,EACT,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,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I,CACV,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,kBAAkB,YACjF,OAAO,GACH,CACR,IACI,CACR,CAAC;IAEF,MAAM,WAAW,GACf,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CACnB,KAAK,CACN,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,IACP,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE;YACT,UAAU,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO;SACrD,EACD,eAAe,EAAC,MAAM,EACtB,IAAI,EAAE,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,WAAW,EAC/C,oBAAoB,EAAE,YAAY,EAClC,mBAAmB,EAAE,WAAW,EAChC,qBAAqB,EAAE,aAAa,EACpC,oBAAoB,EAAE,GAAG,EAAE;YACzB,OAAO,EAAE,CAAC;YACV,YAAY,EAAE,EAAE,CAAC;QACnB,CAAC,YAEA,KAAK,GACG,CACZ,CAAC;IAEJ,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,KAAC,cAAc,OAAK,KAAK,KAAM,SAAS,GAAI,CAAC,CAAC,CAAC,WAAW,CAAC;AAC5F,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useCallback } from 'react';\nimport type {\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n MouseEvent,\n KeyboardEvent as ReactKeyboardEvent\n} from 'react';\n\nimport Progress from '../Progress';\nimport { getFocusables } from '../../utils';\nimport Backdrop from '../Backdrop';\nimport Flex from '../Flex';\nimport Button from '../Button';\nimport type { ForwardProps } from '../../types';\nimport {\n useConsolidatedRef,\n useI18n,\n useOuterEvent,\n useUID,\n useFocusTrap,\n usePrevious,\n useModalContext,\n useEvent\n} from '../../hooks';\nimport Icon, { registerIcon } from '../Icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport * as minusIcon from '../Icon/icons/minus.icon';\nimport * as dockIcon from '../Icon/icons/dock.icon';\nimport * as undockIcon from '../Icon/icons/undock.icon';\nimport Text from '../Text';\nimport { Count } from '../Badges';\n\nimport MinimizedModal from './MinimizedModal';\nimport type { ModalProps } from './Modal.types';\nimport {\n StyledModal,\n StyledModalHeader,\n StyledModalContent,\n StyledModalActions,\n StyledModalChildrenWrap\n} from './Modal.styles';\n\nregisterIcon(timesIcon, minusIcon, dockIcon, undockIcon);\n\nconst Modal: FunctionComponent<ModalProps & ForwardProps> = forwardRef(function Modal(\n props: PropsWithoutRef<ModalProps>,\n ref: Ref<HTMLElement>\n) {\n const {\n as,\n progress = false,\n heading,\n count,\n children,\n actions,\n stretch = false,\n center = false,\n defaultFocus,\n onBeforeOpen,\n onAfterOpen,\n onBeforeClose,\n onAfterClose,\n onRequestDismiss,\n onRequestMinimize,\n onRequestMaximize,\n onRequestDock,\n onRequestActivate,\n ...restProps\n } = props;\n\n const {\n alert,\n dismissible,\n minimizable,\n maximizable,\n dockable,\n state,\n dismiss,\n minimize,\n maximize,\n dock,\n unmount,\n top\n } = useModalContext();\n\n const modalRef = useConsolidatedRef(ref);\n const modalContentRef = useRef<HTMLDivElement>(null);\n const backdropRef = useRef<HTMLDivElement>(null);\n const closeButtonRef = useRef<HTMLButtonElement>(null);\n const previousState = usePrevious(state);\n const id = useUID();\n const t = useI18n();\n\n const tryDismiss = () => {\n if (onRequestDismiss?.() !== false) {\n dismiss();\n }\n };\n\n const setFocus = () => {\n if (progress) return;\n\n const focusables = getFocusables(modalRef);\n\n if (defaultFocus?.current) {\n defaultFocus.current.focus();\n } else {\n const focusable =\n focusables.find(el => {\n return modalContentRef.current?.contains(el);\n }) ??\n closeButtonRef.current ??\n focusables[0];\n\n focusable?.focus();\n }\n };\n\n useFocusTrap(modalRef, false);\n useEvent('shortcut', e => e.stopPropagation(), { eventOptions: { capture: true } });\n\n useOuterEvent('mousedown', [modalRef], e => {\n if (['minimized', 'docked', 'closed'].includes(state)) return;\n\n if (dismissible) {\n if (e.target === backdropRef.current) {\n tryDismiss();\n }\n } else {\n modalRef.current?.focus();\n }\n });\n\n useEffect(() => {\n if (state === 'minimized') return;\n if (state === 'open' || state === 'maximized' || state === 'docked') setFocus();\n\n // This won't actually run until potential changes to docked modal handling.\n if (state === 'closed' && previousState === 'docked') {\n onBeforeClose?.();\n unmount();\n onAfterClose?.();\n }\n }, [state]);\n\n useEffect(() => {\n // If a modal is already in a closed state on initial mount, unmount it.\n // This only happens when a docked modal closes since the ModalManager\n // remounts it outside of the DockedModals container if state !== 'docked'.\n if (state === 'closed') {\n onBeforeClose?.();\n unmount();\n onAfterClose?.();\n }\n }, []);\n\n // Dismiss on Escape needs to be handled using React event handling to be cancelable using SyntheticEvent.stopPropagation.\n const onModalKeyDown = useCallback(\n (e: ReactKeyboardEvent) => {\n if (dismissible && (state === 'open' || state === 'maximized') && e.key === 'Escape' && top) {\n tryDismiss();\n }\n },\n [dismissible, state, top, tryDismiss]\n );\n\n const onHeaderActionKeyDown = useCallback((e: ReactKeyboardEvent<HTMLButtonElement>) => {\n if (e.repeat && (e.key === 'Enter' || e.key === ' ')) e.preventDefault();\n }, []);\n\n useEffect(() => {\n if (!progress) {\n setFocus();\n }\n }, [progress]);\n\n const maximized = stretch || state === 'maximized';\n\n const modal = (\n <Flex\n {...restProps}\n container={{ direction: 'column' }}\n ref={modalRef}\n as={StyledModal}\n forwardedAs={as}\n onClick={(e: MouseEvent) => e.stopPropagation()}\n onKeyDown={onModalKeyDown}\n alert={alert}\n role={alert ? 'alertdialog' : 'dialog'}\n stretch={maximized}\n center={center}\n aria-labelledby={`${id}-heading`}\n aria-describedby={alert ? `${id}-content` : undefined}\n aria-modal={state === 'docked' ? 'false' : 'true'}\n state={state}\n aria-busy={progress ? 'true' : 'false'}\n >\n <Flex\n container={{ justify: 'between', alignItems: 'center', gap: 1 }}\n item={{ shrink: 0 }}\n as={StyledModalHeader}\n hasAction={minimizable || dismissible}\n >\n <Flex\n container={{ alignItems: 'center', gap: 1 }}\n as={Text}\n variant='h2'\n id={`${id}-heading`}\n >\n <span>{heading}</span>\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n\n <Flex container>\n {maximizable && !alert && state !== 'maximized' && (\n <Button\n icon\n variant='simple'\n label={t('maximize')}\n aria-label={t('modal_maximize')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={() => {\n if (onRequestMaximize?.() !== false) {\n maximize();\n }\n }}\n >\n <Icon name='undock' />\n </Button>\n )}\n {dockable && !alert && state !== 'docked' && (\n <Button\n icon\n variant='simple'\n label={t('dock')}\n aria-label={t('modal_dock')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={() => {\n if (onRequestDock?.() !== false) {\n dock();\n }\n }}\n >\n <Icon name='dock' />\n </Button>\n )}\n {minimizable && !alert && (\n <Button\n icon\n variant='simple'\n label={t('minimize')}\n aria-label={t('modal_minimize')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={() => {\n if (onRequestMinimize?.() !== false) {\n minimize();\n }\n }}\n >\n <Icon name='minus' />\n </Button>\n )}\n {dismissible && !alert && (\n <Button\n icon\n variant='simple'\n label={t('close')}\n aria-label={t('modal_close')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={tryDismiss}\n ref={closeButtonRef}\n >\n <Icon name='times' />\n </Button>\n )}\n </Flex>\n </Flex>\n\n <Flex\n item={{ grow: 1 }}\n as={StyledModalContent}\n ref={modalContentRef}\n style={\n modalContentRef.current\n ? { '--scroll-top': `${modalContentRef.current.scrollTop}px` }\n : undefined\n }\n >\n {children && (\n <StyledModalChildrenWrap id={`${id}-content`} inert={progress ? '' : undefined}>\n {children}\n </StyledModalChildrenWrap>\n )}\n\n <Progress\n visible={!!progress}\n focusOnVisible\n placement='local'\n message={typeof progress === 'object' ? progress.message : t('loading')}\n />\n </Flex>\n\n {actions && (\n <Flex container={{ justify: 'between' }} item={{ shrink: 0 }} as={StyledModalActions}>\n {actions}\n </Flex>\n )}\n </Flex>\n );\n\n const renderModal =\n state === 'docked' ? (\n modal\n ) : (\n <Backdrop\n ref={backdropRef}\n container={{\n alignItems: center || maximized ? 'center' : 'start'\n }}\n transitionSpeed='slow'\n open={state === 'open' || state === 'maximized'}\n onBeforeTransitionIn={onBeforeOpen}\n onAfterTransitionIn={onAfterOpen}\n onBeforeTransitionOut={onBeforeClose}\n onAfterTransitionOut={() => {\n unmount();\n onAfterClose?.();\n }}\n >\n {modal}\n </Backdrop>\n );\n\n return state === 'minimized' ? <MinimizedModal {...props} {...restProps} /> : renderModal;\n});\n\nexport default Modal;\n"]}
1
+ {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AASnE,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,MAAM,EACN,YAAY,EACZ,WAAW,EACX,eAAe,EACf,QAAQ,EACR,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AACxD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,KAAK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C,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;wBACtC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;iBAC7B,EACD,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EACnB,EAAE,EAAE,kBAAkB,EACtB,cAAc,EAAE,mBAAmB,YAElC,OAAO,GACH,CACR,IACI,CACR,CAAC;IAEF,MAAM,WAAW,GACf,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CACnB,KAAK,CACN,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,IACP,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE;YACT,UAAU,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO;SACrD,EACD,eAAe,EAAC,MAAM,EACtB,IAAI,EAAE,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,WAAW,EAC/C,oBAAoB,EAAE,YAAY,EAClC,mBAAmB,EAAE,WAAW,EAChC,qBAAqB,EAAE,aAAa,EACpC,oBAAoB,EAAE,GAAG,EAAE;YACzB,OAAO,EAAE,CAAC;YACV,YAAY,EAAE,EAAE,CAAC;QACnB,CAAC,YAEA,KAAK,GACG,CACZ,CAAC;IAEJ,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,KAAC,cAAc,OAAK,KAAK,KAAM,SAAS,GAAI,CAAC,CAAC,CAAC,WAAW,CAAC;AAC5F,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useCallback } from 'react';\nimport type {\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n MouseEvent,\n KeyboardEvent as ReactKeyboardEvent\n} from 'react';\n\nimport Progress from '../Progress';\nimport { getFocusables } from '../../utils';\nimport Backdrop from '../Backdrop';\nimport Flex from '../Flex';\nimport Button from '../Button';\nimport type { ForwardProps } from '../../types';\nimport {\n useConsolidatedRef,\n useI18n,\n useOuterEvent,\n useUID,\n useFocusTrap,\n usePrevious,\n useModalContext,\n useEvent,\n useBreakpoint\n} from '../../hooks';\nimport Icon, { registerIcon } from '../Icon';\nimport * as timesIcon from '../Icon/icons/times.icon';\nimport * as minusIcon from '../Icon/icons/minus.icon';\nimport * as dockIcon from '../Icon/icons/dock.icon';\nimport * as undockIcon from '../Icon/icons/undock.icon';\nimport Text from '../Text';\nimport { Count } from '../Badges';\n\nimport MinimizedModal from './MinimizedModal';\nimport type { ModalProps } from './Modal.types';\nimport {\n StyledModal,\n StyledModalHeader,\n StyledModalContent,\n StyledModalActions,\n StyledModalChildrenWrap\n} from './Modal.styles';\n\nregisterIcon(timesIcon, minusIcon, dockIcon, undockIcon);\n\nconst Modal: FunctionComponent<ModalProps & ForwardProps> = forwardRef(function Modal(\n props: PropsWithoutRef<ModalProps>,\n ref: Ref<HTMLElement>\n) {\n const {\n as,\n progress = false,\n heading,\n count,\n children,\n actions,\n stretch = false,\n center = false,\n defaultFocus,\n onBeforeOpen,\n onAfterOpen,\n onBeforeClose,\n onAfterClose,\n onRequestDismiss,\n onRequestMinimize,\n onRequestMaximize,\n onRequestDock,\n onRequestActivate,\n ...restProps\n } = props;\n\n const {\n alert,\n dismissible,\n minimizable,\n maximizable,\n dockable,\n state,\n dismiss,\n minimize,\n maximize,\n dock,\n unmount,\n top\n } = useModalContext();\n\n const modalRef = useConsolidatedRef(ref);\n const modalContentRef = useRef<HTMLDivElement>(null);\n const backdropRef = useRef<HTMLDivElement>(null);\n const closeButtonRef = useRef<HTMLButtonElement>(null);\n const previousState = usePrevious(state);\n const id = useUID();\n const t = useI18n();\n\n const tryDismiss = () => {\n if (onRequestDismiss?.() !== false) {\n dismiss();\n }\n };\n\n const setFocus = () => {\n if (progress) return;\n\n const focusables = getFocusables(modalRef);\n\n if (defaultFocus?.current) {\n defaultFocus.current.focus();\n } else {\n const focusable =\n focusables.find(el => {\n return modalContentRef.current?.contains(el);\n }) ??\n closeButtonRef.current ??\n focusables[0];\n\n focusable?.focus();\n }\n };\n\n useFocusTrap(modalRef, false);\n useEvent('shortcut', e => e.stopPropagation(), { eventOptions: { capture: true } });\n\n useOuterEvent('mousedown', [modalRef], e => {\n if (['minimized', 'docked', 'closed'].includes(state)) return;\n\n if (dismissible) {\n if (e.target === backdropRef.current) {\n tryDismiss();\n }\n } else {\n modalRef.current?.focus();\n }\n });\n\n useEffect(() => {\n if (state === 'minimized') return;\n if (state === 'open' || state === 'maximized' || state === 'docked') setFocus();\n\n // This won't actually run until potential changes to docked modal handling.\n if (state === 'closed' && previousState === 'docked') {\n onBeforeClose?.();\n unmount();\n onAfterClose?.();\n }\n }, [state]);\n\n useEffect(() => {\n // If a modal is already in a closed state on initial mount, unmount it.\n // This only happens when a docked modal closes since the ModalManager\n // remounts it outside of the DockedModals container if state !== 'docked'.\n if (state === 'closed') {\n onBeforeClose?.();\n unmount();\n onAfterClose?.();\n }\n }, []);\n\n // Dismiss on Escape needs to be handled using React event handling to be cancelable using SyntheticEvent.stopPropagation.\n const onModalKeyDown = useCallback(\n (e: ReactKeyboardEvent) => {\n if (dismissible && (state === 'open' || state === 'maximized') && e.key === 'Escape' && top) {\n tryDismiss();\n }\n },\n [dismissible, state, top, tryDismiss]\n );\n\n const onHeaderActionKeyDown = useCallback((e: ReactKeyboardEvent<HTMLButtonElement>) => {\n if (e.repeat && (e.key === 'Enter' || e.key === ' ')) e.preventDefault();\n }, []);\n\n useEffect(() => {\n if (!progress) {\n setFocus();\n }\n }, [progress]);\n\n const isModalSmallOrAbove = useBreakpoint('sm', { breakpointRef: modalRef });\n\n const maximized = stretch || state === 'maximized';\n\n const modal = (\n <Flex\n {...restProps}\n container={{ direction: 'column' }}\n ref={modalRef}\n as={StyledModal}\n forwardedAs={as}\n onClick={(e: MouseEvent) => e.stopPropagation()}\n onKeyDown={onModalKeyDown}\n alert={alert}\n role={alert ? 'alertdialog' : 'dialog'}\n stretch={maximized}\n center={center}\n aria-labelledby={`${id}-heading`}\n aria-describedby={alert ? `${id}-content` : undefined}\n aria-modal={state === 'docked' ? 'false' : 'true'}\n state={state}\n aria-busy={progress ? 'true' : 'false'}\n >\n <Flex\n container={{ justify: 'between', alignItems: 'start', gap: 1 }}\n item={{ shrink: 0 }}\n as={StyledModalHeader}\n hasAction={minimizable || dismissible}\n >\n <Flex\n container={{ alignItems: 'center', gap: 1 }}\n as={Text}\n variant='h2'\n id={`${id}-heading`}\n >\n <span>{heading}</span>\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n\n <Flex container>\n {maximizable && !alert && state !== 'maximized' && (\n <Button\n icon\n variant='simple'\n label={t('maximize')}\n aria-label={t('modal_maximize')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={() => {\n if (onRequestMaximize?.() !== false) {\n maximize();\n }\n }}\n >\n <Icon name='undock' />\n </Button>\n )}\n {dockable && !alert && state !== 'docked' && (\n <Button\n icon\n variant='simple'\n label={t('dock')}\n aria-label={t('modal_dock')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={() => {\n if (onRequestDock?.() !== false) {\n dock();\n }\n }}\n >\n <Icon name='dock' />\n </Button>\n )}\n {minimizable && !alert && (\n <Button\n icon\n variant='simple'\n label={t('minimize')}\n aria-label={t('modal_minimize')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={() => {\n if (onRequestMinimize?.() !== false) {\n minimize();\n }\n }}\n >\n <Icon name='minus' />\n </Button>\n )}\n {dismissible && !alert && (\n <Button\n icon\n variant='simple'\n label={t('close')}\n aria-label={t('modal_close')}\n onKeyDown={onHeaderActionKeyDown}\n onClick={tryDismiss}\n ref={closeButtonRef}\n >\n <Icon name='times' />\n </Button>\n )}\n </Flex>\n </Flex>\n\n <Flex\n item={{ grow: 1 }}\n as={StyledModalContent}\n ref={modalContentRef}\n style={\n modalContentRef.current\n ? { '--scroll-top': `${modalContentRef.current.scrollTop}px` }\n : undefined\n }\n >\n {children && (\n <StyledModalChildrenWrap id={`${id}-content`} inert={progress ? '' : undefined}>\n {children}\n </StyledModalChildrenWrap>\n )}\n\n <Progress\n visible={!!progress}\n focusOnVisible\n placement='local'\n message={typeof progress === 'object' ? progress.message : t('loading')}\n />\n </Flex>\n\n {actions && (\n <Flex\n container={{\n pad: [2.5, 3, 3],\n gap: 1,\n ...(isModalSmallOrAbove\n ? { direction: 'row', justify: 'end' }\n : { direction: 'column' })\n }}\n item={{ shrink: 0 }}\n as={StyledModalActions}\n isSmallOrAbove={isModalSmallOrAbove}\n >\n {actions}\n </Flex>\n )}\n </Flex>\n );\n\n const renderModal =\n state === 'docked' ? (\n modal\n ) : (\n <Backdrop\n ref={backdropRef}\n container={{\n alignItems: center || maximized ? 'center' : 'start'\n }}\n transitionSpeed='slow'\n open={state === 'open' || state === 'maximized'}\n onBeforeTransitionIn={onBeforeOpen}\n onAfterTransitionIn={onAfterOpen}\n onBeforeTransitionOut={onBeforeClose}\n onAfterTransitionOut={() => {\n unmount();\n onAfterClose?.();\n }}\n >\n {modal}\n </Backdrop>\n );\n\n return state === 'minimized' ? <MinimizedModal {...props} {...restProps} /> : renderModal;\n});\n\nexport default Modal;\n"]}
@@ -4,6 +4,8 @@ export declare const StyledModalHeader: import("styled-components").StyledCompon
4
4
  hasAction?: boolean | undefined;
5
5
  }, never>;
6
6
  export declare const StyledModalContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledModalActions: import("styled-components").StyledComponent<"footer", import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const StyledModalActions: import("styled-components").StyledComponent<"footer", import("styled-components").DefaultTheme, {
8
+ isSmallOrAbove: boolean;
9
+ }, never>;
8
10
  export declare const StyledModal: import("styled-components").StyledComponent<"article", import("styled-components").DefaultTheme, Partial<import("../Card").CardProps> & Pick<ModalProps, "progress" | "children" | "as" | "heading" | "className" | "actions" | "count" | "forwardedAs" | "defaultFocus" | "onBeforeOpen" | "onAfterOpen" | "onBeforeClose" | "onAfterClose" | "onRequestDismiss" | "onRequestMinimize" | "onRequestMaximize" | "onRequestDock" | "onRequestActivate"> & Required<Pick<ModalProps, "stretch" | "center" | "autoWidth">> & Pick<ModalContextValue, "alert" | "state">, never>;
9
11
  //# sourceMappingURL=Modal.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAInE,eAAO,MAAM,uBAAuB,yGAAe,CAAC;AAEpD,eAAO,MAAM,iBAAiB;;SAyB7B,CAAC;AAIF,eAAO,MAAM,kBAAkB,yGAc7B,CAAC;AAIH,eAAO,MAAM,kBAAkB,4GAI7B,CAAC;AAIH,eAAO,MAAM,WAAW,8iBAoFtB,CAAC"}
1
+ {"version":3,"file":"Modal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAInE,eAAO,MAAM,uBAAuB,yGAAe,CAAC;AAEpD,eAAO,MAAM,iBAAiB;;SAqB7B,CAAC;AAIF,eAAO,MAAM,kBAAkB,yGAc7B,CAAC;AAIH,eAAO,MAAM,kBAAkB;oBAAmC,OAAO;SAoBxE,CAAC;AAIF,eAAO,MAAM,WAAW,8iBAoFtB,CAAC"}
@@ -10,17 +10,13 @@ export const StyledModalHeader = styled.header(({ theme: { base }, hasAction })
10
10
  return css `
11
11
  padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})
12
12
  calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});
13
- h2 > ${StyledIcon} {
14
- margin-inline-end: ${base.spacing};
13
+
14
+ h2 {
15
+ margin-block-start: calc(0.5 * ${base.spacing});
15
16
  }
16
17
 
17
- > h2 {
18
- overflow-x: hidden;
19
- > :first-child {
20
- overflow-x: hidden;
21
- white-space: nowrap;
22
- text-overflow: ellipsis;
23
- }
18
+ h2 > ${StyledIcon} {
19
+ margin-inline-end: ${base.spacing};
24
20
  }
25
21
 
26
22
  ${StyledButton} {
@@ -45,10 +41,24 @@ export const StyledModalContent = styled.div(({ theme: { base } }) => {
45
41
  `;
46
42
  });
47
43
  StyledModalContent.defaultProps = defaultThemeProp;
48
- export const StyledModalActions = styled.footer(({ theme: { base } }) => {
44
+ export const StyledModalActions = styled.footer(({ isSmallOrAbove }) => {
49
45
  return css `
50
- padding: calc(2.5 * ${base.spacing}) calc(3 * ${base.spacing}) calc(3 * ${base.spacing});
51
- `;
46
+ ${StyledButton} + ${StyledButton} {
47
+ margin-inline-start: unset;
48
+ }
49
+
50
+ & > :not(button) {
51
+ display: contents;
52
+ }
53
+
54
+ ${isSmallOrAbove &&
55
+ css `
56
+ & > button:first-child:not(:last-child),
57
+ & > :first-child:not(:last-child) button:first-child {
58
+ margin-inline-end: auto;
59
+ }
60
+ `}
61
+ `;
52
62
  });
53
63
  StyledModalActions.defaultProps = defaultThemeProp;
54
64
  export const StyledModal = styled(StyledCard)(({ theme: { base }, alert, autoWidth, center, stretch, state }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAM7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AAE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,CAAC;AAEnD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAE3C,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IAClE,IAAI,eAAe,GAAG,MAAM,CAAC;IAC7B,IAAI,eAAe,GAAG,MAAM,CAAC;IAE7B,IAAI,KAAK,EAAE;QACT,eAAe,GAAG,MAAM,CAAC;QACzB,eAAe,GAAG,MAAM,CAAC;KAC1B;SAAM,IAAI,SAAS,EAAE;QACpB,eAAe,GAAG,MAAM,CAAC;KAC1B;IAED,OAAO,GAAG,CAAA;;kBAEM,IAAI,CAAC,MAAM,CAAC,IAAI;;MAE5B,CAAC,KAAK,IAAI,OAAO;QACjB,CAAC,CAAC,GAAG,CAAA;;;;0CAI+B,IAAI,CAAC,WAAW,CAAC,EAAE;;;;;0CAKnB,IAAI,CAAC,WAAW,CAAC,EAAE;;;;SAIpD;QACH,CAAC,CAAC,GAAG,CAAA;8CACmC,eAAe;8CACf,eAAe;;YAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;WAEF;;0CAE+B,IAAI,CAAC,WAAW,CAAC,EAAE;gDACb,eAAe;gDACf,eAAe;;cAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;aAEF;;;0CAG6B,IAAI,CAAC,WAAW,CAAC,EAAE;gDACb,eAAe;gDACf,eAAe;;cAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;aAEF;;SAEJ;;MAEH,KAAK,KAAK,QAAQ;QACpB,GAAG,CAAA;;;;;;;;;;;KAWF;;;QAGG,kBAAkB;;;;;;GAMvB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,WAAW,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { StyledButton } from '../Button';\nimport type { PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { StyledIcon } from '../Icon';\nimport { StyledCard } from '../Card';\nimport { StyledBackdrop } from '../Backdrop';\n\nimport type { ModalContextValue, ModalProps } from './Modal.types';\n\ntype ModalPropsWithDefaults = PropsWithDefaults<ModalProps, 'stretch' | 'center' | 'autoWidth'>;\n\nexport const StyledModalChildrenWrap = styled.div``;\n\nexport const StyledModalHeader = styled.header<{ hasAction?: boolean }>(\n ({ theme: { base }, hasAction }) => {\n const padAdjust = hasAction ? 0.75 : 0;\n\n return css`\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});\n h2 > ${StyledIcon} {\n margin-inline-end: ${base.spacing};\n }\n\n > h2 {\n overflow-x: hidden;\n > :first-child {\n overflow-x: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n\n ${StyledButton} {\n color: ${base.palette['foreground-color']};\n }\n `;\n }\n);\n\nStyledModalHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModalContent = styled.div(({ theme: { base } }) => {\n return css`\n position: relative;\n padding: calc(0.5 * ${base.spacing}) calc(3 * ${base.spacing});\n overflow-y: auto;\n\n &:last-child {\n padding-bottom: calc(3 * ${base.spacing});\n }\n\n & > ${StyledBackdrop} {\n top: var(--scroll-top, 0);\n }\n `;\n});\n\nStyledModalContent.defaultProps = defaultThemeProp;\n\nexport const StyledModalActions = styled.footer(({ theme: { base } }) => {\n return css`\n padding: calc(2.5 * ${base.spacing}) calc(3 * ${base.spacing}) calc(3 * ${base.spacing});\n `;\n});\n\nStyledModalActions.defaultProps = defaultThemeProp;\n\nexport const StyledModal = styled(StyledCard)<\n ModalPropsWithDefaults & Pick<ModalContextValue, 'alert' | 'state'>\n>(({ theme: { base }, alert, autoWidth, center, stretch, state }) => {\n let defaultMinWidth = '80ch';\n let defaultMaxWidth = '80ch';\n\n if (alert) {\n defaultMinWidth = '60ch';\n defaultMaxWidth = '60ch';\n } else if (autoWidth) {\n defaultMaxWidth = '100%';\n }\n\n return css`\n position: relative;\n box-shadow: ${base.shadow.high};\n\n ${!alert && stretch\n ? css`\n width: calc(100% - 1rem);\n height: calc(100% - 1rem);\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n width: calc(100% - 2rem);\n height: calc(100% - 2rem);\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n width: calc(100% - 4rem);\n height: calc(100% - 4rem);\n }\n `\n : css`\n min-width: min(calc(100% - 1rem), ${defaultMinWidth});\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n max-height: calc(100% - 1rem);\n ${!center &&\n css`\n margin-block-start: 0.5rem;\n `}\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n min-width: min(calc(100% - 2rem), ${defaultMinWidth});\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n max-height: calc(100% - 2rem);\n ${!center &&\n css`\n margin-block-start: 1rem;\n `}\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n min-width: min(calc(100% - 4rem), ${defaultMinWidth});\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n max-height: calc(100% - 4rem);\n ${!center &&\n css`\n margin-block-start: 2rem;\n `}\n }\n `}\n\n ${state === 'docked' &&\n css`\n /*\n * This seems like the most optimal of the suboptimal solutions.\n * https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity\n */\n &&& {\n /* Using non logical properties due to Safari 14.x support and since the inline bottom values are the same. */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n pointer-events: auto;\n }\n `}\n\n &[aria-busy='true'] {\n ${StyledModalContent} {\n /* TODO: Replace with useScrollToggle hook. */\n overflow: hidden;\n min-height: 8rem;\n }\n }\n `;\n});\n\nStyledModal.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,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C,WAAW,CAAC,EAAE;gDACb,eAAe;gDACf,eAAe;;cAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;aAEF;;SAEJ;;MAEH,KAAK,KAAK,QAAQ;QACpB,GAAG,CAAA;;;;;;;;;;;KAWF;;;QAGG,kBAAkB;;;;;;GAMvB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,WAAW,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { StyledButton } from '../Button';\nimport type { PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { StyledIcon } from '../Icon';\nimport { StyledCard } from '../Card';\nimport { StyledBackdrop } from '../Backdrop';\n\nimport type { ModalContextValue, ModalProps } from './Modal.types';\n\ntype ModalPropsWithDefaults = PropsWithDefaults<ModalProps, 'stretch' | 'center' | 'autoWidth'>;\n\nexport const StyledModalChildrenWrap = styled.div``;\n\nexport const StyledModalHeader = styled.header<{ hasAction?: boolean }>(\n ({ theme: { base }, hasAction }) => {\n const padAdjust = hasAction ? 0.75 : 0;\n\n return css`\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});\n\n h2 {\n margin-block-start: calc(0.5 * ${base.spacing});\n }\n\n h2 > ${StyledIcon} {\n margin-inline-end: ${base.spacing};\n }\n\n ${StyledButton} {\n color: ${base.palette['foreground-color']};\n }\n `;\n }\n);\n\nStyledModalHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModalContent = styled.div(({ theme: { base } }) => {\n return css`\n position: relative;\n padding: calc(0.5 * ${base.spacing}) calc(3 * ${base.spacing});\n overflow-y: auto;\n\n &:last-child {\n padding-bottom: calc(3 * ${base.spacing});\n }\n\n & > ${StyledBackdrop} {\n top: var(--scroll-top, 0);\n }\n `;\n});\n\nStyledModalContent.defaultProps = defaultThemeProp;\n\nexport const StyledModalActions = styled.footer<{ isSmallOrAbove: boolean }>(\n ({ isSmallOrAbove }) => {\n return css`\n ${StyledButton} + ${StyledButton} {\n margin-inline-start: unset;\n }\n\n & > :not(button) {\n display: contents;\n }\n\n ${isSmallOrAbove &&\n css`\n & > button:first-child:not(:last-child),\n & > :first-child:not(:last-child) button:first-child {\n margin-inline-end: auto;\n }\n `}\n `;\n }\n);\n\nStyledModalActions.defaultProps = defaultThemeProp;\n\nexport const StyledModal = styled(StyledCard)<\n ModalPropsWithDefaults & Pick<ModalContextValue, 'alert' | 'state'>\n>(({ theme: { base }, alert, autoWidth, center, stretch, state }) => {\n let defaultMinWidth = '80ch';\n let defaultMaxWidth = '80ch';\n\n if (alert) {\n defaultMinWidth = '60ch';\n defaultMaxWidth = '60ch';\n } else if (autoWidth) {\n defaultMaxWidth = '100%';\n }\n\n return css`\n position: relative;\n box-shadow: ${base.shadow.high};\n\n ${!alert && stretch\n ? css`\n width: calc(100% - 1rem);\n height: calc(100% - 1rem);\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n width: calc(100% - 2rem);\n height: calc(100% - 2rem);\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n width: calc(100% - 4rem);\n height: calc(100% - 4rem);\n }\n `\n : css`\n min-width: min(calc(100% - 1rem), ${defaultMinWidth});\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n max-height: calc(100% - 1rem);\n ${!center &&\n css`\n margin-block-start: 0.5rem;\n `}\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n min-width: min(calc(100% - 2rem), ${defaultMinWidth});\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n max-height: calc(100% - 2rem);\n ${!center &&\n css`\n margin-block-start: 1rem;\n `}\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n min-width: min(calc(100% - 4rem), ${defaultMinWidth});\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n max-height: calc(100% - 4rem);\n ${!center &&\n css`\n margin-block-start: 2rem;\n `}\n }\n `}\n\n ${state === 'docked' &&\n css`\n /*\n * This seems like the most optimal of the suboptimal solutions.\n * https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity\n */\n &&& {\n /* Using non logical properties due to Safari 14.x support and since the inline bottom values are the same. */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n pointer-events: auto;\n }\n `}\n\n &[aria-busy='true'] {\n ${StyledModalContent} {\n /* TODO: Replace with useScrollToggle hook. */\n overflow: hidden;\n min-height: 8rem;\n }\n }\n `;\n});\n\nStyledModal.defaultProps = defaultThemeProp;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStepForm.d.ts","sourceRoot":"","sources":["../../../src/components/MultiStepForm/MultiStepForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAYhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAWhD,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAI5D,eAAO,MAAM,UAAU;;;SAkBtB,CAAC;AAIF,eAAO,MAAM,iBAAiB,yGAAe,CAAC;AAE9C,eAAO,MAAM,yBAAyB,iKAqBpC,CAAC;AAIH,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CAwK9E,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"MultiStepForm.d.ts","sourceRoot":"","sources":["../../../src/components/MultiStepForm/MultiStepForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAYhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAYhD,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAI5D,eAAO,MAAM,UAAU;;;SAkBtB,CAAC;AAIF,eAAO,MAAM,iBAAiB,yGAAe,CAAC;AAE9C,eAAO,MAAM,yBAAyB,iKAqBpC,CAAC;AA0BH,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CAkL9E,CAAC;AAEF,eAAe,aAAa,CAAC"}