impact-ui 5.0.0-beta.1 → 5.0.0-beta.2

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 (131) hide show
  1. package/dist/components/Avatar/index.js +1 -1
  2. package/dist/components/Chatbot/index.js +1 -1
  3. package/dist/components/CommentsPanel/CommentsPanel.impl.js +1 -1
  4. package/dist/components/DatePicker/datePickerInput.d.ts.map +1 -1
  5. package/dist/components/DatePicker/datePickerInput.js +5 -2
  6. package/dist/components/DatePicker/index.js +1 -1
  7. package/dist/components/DynamicLayout/index.js +1 -1
  8. package/dist/components/FileUpload/index.d.ts.map +1 -1
  9. package/dist/components/FileUpload/index.js +11 -4
  10. package/dist/components/FilterPanel/index.js +1 -1
  11. package/dist/components/FiltersStrip/index.js +1 -1
  12. package/dist/components/Header/Header.types.d.ts +16 -4
  13. package/dist/components/Header/Header.types.d.ts.map +1 -1
  14. package/dist/components/Header/index.d.ts +1 -1
  15. package/dist/components/Header/index.d.ts.map +1 -1
  16. package/dist/components/Header/index.js +36 -17
  17. package/dist/components/HomePage/constants.d.ts.map +1 -1
  18. package/dist/components/HomePage/constants.js +3 -4
  19. package/dist/components/HomePage/index.js +1 -1
  20. package/dist/components/MonthPicker/index.d.ts.map +1 -1
  21. package/dist/components/MonthPicker/index.js +6 -12
  22. package/dist/components/MonthRangePicker/index.d.ts.map +1 -1
  23. package/dist/components/MonthRangePicker/index.js +7 -3
  24. package/dist/components/NewDynamicLayout/index.js +1 -1
  25. package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +1 -1
  26. package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.js +1 -1
  27. package/dist/components/Notification/index.js +1 -1
  28. package/dist/components/OnboardingTour/index.d.ts.map +1 -1
  29. package/dist/components/OnboardingTour/index.js +10 -4
  30. package/dist/components/OnboardingTour/productTourList.js +4 -4
  31. package/dist/components/OnboardingTour/tooltipCard.d.ts.map +1 -1
  32. package/dist/components/OnboardingTour/tooltipCard.js +2 -2
  33. package/dist/components/Popover/Popover.types.d.ts +5 -0
  34. package/dist/components/Popover/Popover.types.d.ts.map +1 -1
  35. package/dist/components/Popover/index.d.ts +1 -1
  36. package/dist/components/Popover/index.d.ts.map +1 -1
  37. package/dist/components/Popover/index.js +11 -3
  38. package/dist/components/ProfileMenu/ProfileMenu.types.d.ts +16 -5
  39. package/dist/components/ProfileMenu/ProfileMenu.types.d.ts.map +1 -1
  40. package/dist/components/ProfileMenu/ProfileMenuListItem.d.ts +12 -0
  41. package/dist/components/ProfileMenu/ProfileMenuListItem.d.ts.map +1 -0
  42. package/dist/components/ProfileMenu/ProfileMenuListItem.js +42 -0
  43. package/dist/components/ProfileMenu/index.d.ts +3 -10
  44. package/dist/components/ProfileMenu/index.d.ts.map +1 -1
  45. package/dist/components/ProfileMenu/index.js +104 -244
  46. package/dist/components/Slider/index.d.ts.map +1 -1
  47. package/dist/components/Slider/index.js +3 -1
  48. package/dist/components/Slider/sliderValueLabel.d.ts +7 -0
  49. package/dist/components/Slider/sliderValueLabel.d.ts.map +1 -0
  50. package/dist/components/Slider/sliderValueLabel.js +31 -0
  51. package/dist/components/TableChat/EmptyContainer.js +1 -1
  52. package/dist/components/TableChat/TableChatSidePanel.js +1 -1
  53. package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +1 -1
  54. package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +1 -1
  55. package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +1 -1
  56. package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +1 -1
  57. package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +1 -1
  58. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +1 -1
  59. package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +1 -1
  60. package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +1 -1
  61. package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +1 -1
  62. package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +1 -1
  63. package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +1 -1
  64. package/dist/components/TableChat/components/TextEditor/Mention.js +1 -1
  65. package/dist/components/TableChat/components/TextEditor/MentionList.js +1 -1
  66. package/dist/components/TableV36/CommentsPortal.js +1 -1
  67. package/dist/components/TableV36/index.js +1 -1
  68. package/dist/components/TableV36/tableFunctions.js +4 -4
  69. package/dist/components/TableV36/tableHeader.d.ts +1 -3
  70. package/dist/components/TableV36/tableHeader.d.ts.map +1 -1
  71. package/dist/components/TableV36/tableHeader.js +3 -2
  72. package/dist/components/TableV36/tablePagination.js +1 -1
  73. package/dist/components/TableV36/tableSettings.d.ts.map +1 -1
  74. package/dist/components/TableV36/tableSettings.js +8 -9
  75. package/dist/components/ThemingPanel/AccentColorSection.d.ts +11 -0
  76. package/dist/components/ThemingPanel/AccentColorSection.d.ts.map +1 -0
  77. package/dist/components/ThemingPanel/AccentColorSection.js +43 -0
  78. package/dist/components/ThemingPanel/EnhanceContrastSection.d.ts +11 -0
  79. package/dist/components/ThemingPanel/EnhanceContrastSection.d.ts.map +1 -0
  80. package/dist/components/ThemingPanel/EnhanceContrastSection.js +42 -0
  81. package/dist/components/ThemingPanel/InterfaceThemeSection.d.ts +13 -0
  82. package/dist/components/ThemingPanel/InterfaceThemeSection.d.ts.map +1 -0
  83. package/dist/components/ThemingPanel/InterfaceThemeSection.js +118 -0
  84. package/dist/components/ThemingPanel/StylesSection.d.ts +11 -0
  85. package/dist/components/ThemingPanel/StylesSection.d.ts.map +1 -0
  86. package/dist/components/ThemingPanel/StylesSection.js +43 -0
  87. package/dist/components/ThemingPanel/ThemesTab.d.ts +18 -0
  88. package/dist/components/ThemingPanel/ThemesTab.d.ts.map +1 -0
  89. package/dist/components/ThemingPanel/ThemesTab.js +33 -0
  90. package/dist/components/ThemingPanel/ThemingPanel.d.ts +10 -0
  91. package/dist/components/ThemingPanel/ThemingPanel.d.ts.map +1 -0
  92. package/dist/components/ThemingPanel/ThemingPanel.js +178 -0
  93. package/dist/components/ThemingPanel/ThemingPanel.types.d.ts +21 -0
  94. package/dist/components/ThemingPanel/ThemingPanel.types.d.ts.map +1 -0
  95. package/dist/components/ThemingPanel/index.d.ts +9 -0
  96. package/dist/components/ThemingPanel/index.d.ts.map +1 -0
  97. package/dist/components/ThemingPanel/themingPanel.constants.d.ts +23 -0
  98. package/dist/components/ThemingPanel/themingPanel.constants.d.ts.map +1 -0
  99. package/dist/components/ThemingPanel/themingPanel.constants.js +44 -0
  100. package/dist/components/common/MentionEditor/MentionList/index.js +1 -1
  101. package/dist/components/common/MentionEditor/index.js +1 -1
  102. package/dist/components/index.d.ts +3 -1
  103. package/dist/components/index.d.ts.map +1 -1
  104. package/dist/components/index.js +4 -0
  105. package/dist/components/shared/tableColumnSettings/tableSettingsV36.d.ts.map +1 -1
  106. package/dist/locales/de-DE.json.d.ts +30 -0
  107. package/dist/locales/de-DE.json.js +30 -0
  108. package/dist/locales/en-US.json.d.ts +30 -0
  109. package/dist/locales/en-US.json.js +30 -0
  110. package/dist/locales/es-ES.json.d.ts +30 -0
  111. package/dist/locales/es-ES.json.js +30 -0
  112. package/dist/mcp-component-registry.json +131 -87
  113. package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +1 -3
  114. package/dist/styles/style.css +1 -1
  115. package/dist/styles/tokens/tokens.generated.d.ts +18 -0
  116. package/dist/styles/tokens/tokens.generated.d.ts.map +1 -1
  117. package/dist/styles/tokens/tokens.generated.js +20 -2
  118. package/dist/tokens/ImpactUiThemeProvider.d.ts.map +1 -1
  119. package/dist/tokens/ImpactUiThemeProvider.js +11 -3
  120. package/dist/tokens/index.d.ts +1 -1
  121. package/dist/tokens/index.d.ts.map +1 -1
  122. package/dist/tokens/themeDom.d.ts +8 -2
  123. package/dist/tokens/themeDom.d.ts.map +1 -1
  124. package/dist/tokens/themeDom.js +67 -3
  125. package/package.json +1 -1
  126. package/dist/_virtual/ArticleOutlined.js +0 -4
  127. package/dist/_virtual/Check.js +0 -4
  128. package/dist/_virtual/NotificationsOffOutlined.js +0 -4
  129. package/dist/node_modules/@mui/icons-material/ArticleOutlined.js +0 -19
  130. package/dist/node_modules/@mui/icons-material/Check.js +0 -17
  131. package/dist/node_modules/@mui/icons-material/NotificationsOffOutlined.js +0 -17
@@ -1,14 +1,23 @@
1
+ import { ReactNode } from 'react';
1
2
  import { BaseComponentProps } from '../../types';
2
3
  import { AvatarProps } from '../Avatar/Avatar.types';
3
4
 
5
+ /** Configurable row in the profile menu (below Themes, above Logout). */
6
+ export interface ProfileMenuItem {
7
+ /** Stable key; falls back to label */
8
+ id?: string;
9
+ label: string;
10
+ icon?: ReactNode;
11
+ onClick?: () => void;
12
+ disabled?: boolean;
13
+ /** When true (default), the popover closes after click */
14
+ closeOnClick?: boolean;
15
+ }
4
16
  /**
5
17
  * Header-avatar profile popover: banner + avatar + name/email, then a settings-style
6
- * list (Mute notifications, Themes, Keyboard shortcuts, Release notes, Help, All settings)
7
- * and a Logout row.
18
+ * list: built-in **Themes**, optional `menuItems` (icon + label + onClick), then **Logout**.
8
19
  *
9
- * Only `Themes` is wired to real behavior out of the box (via `useImpactUiTheme`); the
10
- * other rows are presentational placeholders — pass the matching `on…Click` to hook up
11
- * real behavior as each surface is implemented.
20
+ * **Themes** opens the Appearance modal (`ThemingPanel`). Add app-specific rows via `menuItems`.
12
21
  */
13
22
  export interface ProfileMenuProps extends BaseComponentProps {
14
23
  /** Element the popover is anchored to (usually the header avatar button) */
@@ -35,5 +44,7 @@ export interface ProfileMenuProps extends BaseComponentProps {
35
44
  onAllSettingsClick?: () => void;
36
45
  /** Called when "Logout" is clicked */
37
46
  onLogoutClick?: () => void;
47
+ /** Custom rows after Themes and before the Logout divider */
48
+ menuItems?: ProfileMenuItem[];
38
49
  }
39
50
  //# sourceMappingURL=ProfileMenu.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileMenu.types.d.ts","sourceRoot":"","sources":["../../../src/components/ProfileMenu/ProfileMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,4EAA4E;IAC5E,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,gFAAgF;IAChF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACnC,wEAAwE;IACxE,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,wEAAwE;IACxE,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B"}
1
+ {"version":3,"file":"ProfileMenu.types.d.ts","sourceRoot":"","sources":["../../../src/components/ProfileMenu/ProfileMenu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,4EAA4E;IAC5E,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,gFAAgF;IAChF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACnC,wEAAwE;IACxE,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,wEAAwE;IACxE,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;CAC/B"}
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ interface ProfileMenuListItemProps {
4
+ label: string;
5
+ icon?: ReactNode;
6
+ className?: string;
7
+ disabled?: boolean;
8
+ onActivate: () => void;
9
+ }
10
+ export declare function ProfileMenuListItem({ label, icon, className, disabled, onActivate, }: ProfileMenuListItemProps): import("react").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=ProfileMenuListItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileMenuListItem.d.ts","sourceRoot":"","sources":["../../../src/components/ProfileMenu/ProfileMenuListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,UAAU,wBAAwB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,IAAI,EACJ,SAAc,EACd,QAAgB,EAChB,UAAU,GACX,EAAE,wBAAwB,+BA+B1B"}
@@ -0,0 +1,42 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ function ProfileMenuListItem({
3
+ label,
4
+ icon,
5
+ className = "",
6
+ disabled = false,
7
+ onActivate
8
+ }) {
9
+ const handleClick = () => {
10
+ if (disabled) {
11
+ return;
12
+ }
13
+ onActivate();
14
+ };
15
+ const handleKeyDown = (event) => {
16
+ if (disabled) {
17
+ return;
18
+ }
19
+ if (event.key === "Enter" || event.key === " ") {
20
+ event.preventDefault();
21
+ onActivate();
22
+ }
23
+ };
24
+ return /* @__PURE__ */ jsxs(
25
+ "div",
26
+ {
27
+ "aria-disabled": disabled || void 0,
28
+ className: `ia-profile-menu-item ${className}`.trim(),
29
+ role: "menuitem",
30
+ tabIndex: disabled ? -1 : 0,
31
+ onClick: handleClick,
32
+ onKeyDown: handleKeyDown,
33
+ children: [
34
+ icon,
35
+ /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: label })
36
+ ]
37
+ }
38
+ );
39
+ }
40
+ export {
41
+ ProfileMenuListItem
42
+ };
@@ -1,17 +1,10 @@
1
1
  import { ProfileMenuProps } from './ProfileMenu.types';
2
2
 
3
- export type { ProfileMenuProps } from './ProfileMenu.types';
3
+ export type { ProfileMenuProps, ProfileMenuItem } from './ProfileMenu.types';
4
4
  /**
5
- * Header-avatar profile popover.
6
- *
7
- * Shows a banner + avatar + name/email, then a settings-style list (Mute notifications,
8
- * Themes, Keyboard shortcuts, Release notes, Help, All settings) and a Logout row.
9
- *
10
- * Only the **Themes** row is wired up for now — it expands inline and lets the user pick
11
- * Light / Dark / System via `useImpactUiTheme`. The other rows are presentational
12
- * placeholders; pass the matching `on…Click` prop to wire up real behavior later.
5
+ * Header-avatar profile surface ({@link Popover} `contentOnly`). **Themes** opens {@link ThemingPanel}.
13
6
  */
14
- export declare function ProfileMenu({ anchorEl, open, onClose, userName, userEmail, avatarProps, onMuteNotificationsClick, onKeyboardShortcutsClick, onReleaseNotesClick, onHelpClick, onAllSettingsClick, onLogoutClick, className, id, 'data-testid': dataTestId, }: ProfileMenuProps): import("react").JSX.Element;
7
+ export declare function ProfileMenu({ anchorEl, open, onClose, userName, userEmail, avatarProps, onMuteNotificationsClick: _onMuteNotificationsClick, onKeyboardShortcutsClick: _onKeyboardShortcutsClick, onReleaseNotesClick: _onReleaseNotesClick, onHelpClick: _onHelpClick, onAllSettingsClick: _onAllSettingsClick, onLogoutClick, menuItems, className, id, 'data-testid': dataTestId, }: ProfileMenuProps): import("react").JSX.Element;
15
8
  export declare namespace ProfileMenu {
16
9
  var displayName: string;
17
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ProfileMenu/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,2BAA2B,CAAC;AAEnC,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAO5D;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,EAAE,EACF,aAAa,EAAE,UAAU,GAC1B,EAAE,gBAAgB,+BAqOlB;yBArPe,WAAW"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ProfileMenu/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,2BAA2B,CAAC;AAEnC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI7E;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,WAAW,EACX,wBAAwB,EAAE,yBAAyB,EACnD,wBAAwB,EAAE,yBAAyB,EACnD,mBAAmB,EAAE,oBAAoB,EACzC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,mBAAmB,EACvC,aAAa,EACb,SAAS,EACT,SAAS,EACT,EAAE,EACF,aAAa,EAAE,UAAU,GAC1B,EAAE,gBAAgB,+BA4MlB;yBA7Ne,WAAW"}
@@ -1,20 +1,17 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".ia-styles.ia-profile-menu .MuiPaper-root{background:var(--iu-bg-surface-layer-bg);border:.5px solid var(--iu-border-default);border-radius:16px;box-shadow:var(--iu-effect-shadow-header-dropdown-elevated);margin-top:8px;overflow:hidden;width:280px}.ia-profile-menu-container{display:flex;flex-direction:column;font-family:Manrope,sans-serif}.ia-profile-menu-banner{background:linear-gradient(115deg,var(--iu-primitive-color-green-300,#7fb88f) 0,var(--iu-bg-surface-lighter,#e7e4d8) 38%,var(--iu-bg-warning-lighter,#edd77f) 68%,var(--iu-bg-warning,#e1bc29) 100%);height:96px;position:relative}.ia-profile-menu-avatar{bottom:-28px;left:50%;position:absolute;transform:translate(-50%)}.ia-profile-menu-avatar .ia-avatar{border:3px solid var(--iu-bg-surface-layer-bg);border-radius:16px;box-shadow:var(--iu-effect-shadow-header-bar-elevation);font-size:20px;font-weight:700;height:72px!important;width:72px!important}.ia-profile-menu-identity{align-items:center;display:flex;flex-direction:column;gap:2px;padding:36px 16px 16px;text-align:center}.ia-profile-menu-name{color:var(--iu-on-surface-body);font-size:20px;font-weight:800}.ia-profile-menu-email{color:var(--iu-on-surface-label);font-size:14px;font-weight:400}.ia-profile-menu-list{display:flex;flex-direction:column;gap:2px;padding:0 8px 8px}.ia-profile-menu-item{align-items:center;border-radius:10px;color:var(--iu-on-surface-body);cursor:pointer;display:flex;gap:8px;height:44px;padding:0 12px}.ia-profile-menu-item:hover{background:var(--iu-bg-surface-lighter)}.ia-profile-menu-item:focus-visible{outline:2px solid var(--iu-bg-primary);outline-offset:1px}.ia-profile-menu-item-icon{color:var(--iu-on-surface-label);flex:none;height:20px;width:20px}.ia-profile-menu-item-label{flex:1;font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ia-profile-menu-item-chevron{color:var(--iu-on-surface-label);flex:none;height:18px;width:18px}.ia-profile-menu-item-chevron-expand{transition:transform .15s ease}.ia-profile-menu-item-chevron-expanded{transform:rotate(180deg)}.ia-profile-menu-item-active{background:var(--iu-bg-primary-subtle)}.ia-profile-menu-theme-options{display:flex;flex-direction:column;gap:2px;margin:0 0 2px;padding:4px 0 4px 36px}.ia-profile-menu-theme-option{align-items:center;border-radius:8px;color:var(--iu-on-surface-body);cursor:pointer;display:flex;font-size:14px;font-weight:400;height:36px;justify-content:space-between;padding:0 12px}.ia-profile-menu-theme-option:hover{background:var(--iu-bg-surface-lighter)}.ia-profile-menu-theme-option-selected{color:var(--iu-bg-primary);font-weight:600}.ia-profile-menu-theme-option-check{color:var(--iu-bg-primary);height:16px;width:16px}.ia-profile-menu-divider{background:var(--iu-border-default);height:1px;margin:4px 16px}.ia-profile-menu-item-logout{margin:0 8px 8px}.ia-profile-menu-item-logout,.ia-profile-menu-item-logout .ia-profile-menu-item-icon{color:var(--iu-on-error-text)}.ia-profile-menu-item-logout:hover{background:var(--iu-legacy-error-background)}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
2
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.ia-styles.ia-profile-menu :is(.MuiPaper-root,.ia-profile-menu-paper){background:var(--iu-bg-disabled-1);background-image:none;border:.5px solid var(--iu-border-default);border-radius:16px;box-shadow:var(--iu-effect-shadow-header-dropdown-elevated);color:var(--iu-on-surface-body);margin-top:8px;overflow:hidden;padding:0!important;width:280px}.ia-profile-menu-container{background:var(--iu-bg-disabled-1);display:flex;flex-direction:column;font-family:Manrope,sans-serif;position:relative;width:100%}.ia-profile-menu-banner{background-color:var(--iu-bg-disabled-1);border-radius:16px 16px 0 0;height:148px;left:0;overflow:hidden;pointer-events:none;position:absolute;top:0;width:100%;z-index:0}.ia-profile-menu-banner:before{background-image:var(--ia-profile-menu-banner-url);background-position:6px top;background-repeat:no-repeat;background-size:cover;content:"";top:0;right:0;bottom:0;left:0;position:absolute;transform:rotate(180deg) scale(1.55);transform-origin:center center;z-index:1}.ia-profile-menu-avatar{z-index:1}.ia-profile-menu-avatar .ia-avatar{background-color:var(--iu-primitive-color-green-500)!important;border:4px solid var(--iu-bg-disabled-1);border-radius:16px;box-shadow:var(--iu-effect-shadow-header-bar-elevation);color:var(--iu-on-primary-text);font-size:20px;font-weight:700;height:64px!important;width:64px!important}.ia-profile-menu-identity{align-items:center;display:flex;flex-direction:column;gap:2px;padding:12px 16px 16px;text-align:center;width:100%}.ia-profile-menu-name{color:var(--iu-on-surface-title);font-size:16px;font-weight:800;line-height:24px}.ia-profile-menu-email{color:var(--iu-on-surface-label);font-size:12px;font-weight:500;line-height:24px}.ia-profile-menu-list{background:var(--iu-bg-surface-layer-bg);display:flex;flex-direction:column;gap:2px;padding:8px 8px 12px;width:100%}.ia-profile-menu-item{align-items:center;border-radius:10px;color:var(--iu-on-surface-body);cursor:pointer;display:flex;gap:8px;height:44px;padding:0 12px;width:100%}.ia-profile-menu-item:hover{background:var(--iu-bg-primary-subtle)}.ia-profile-menu-item:focus-visible{outline:2px solid var(--iu-bg-primary);outline-offset:1px}.ia-profile-menu-item-icon{color:var(--iu-on-surface-icon);flex:none;height:16px;width:16px}.ia-profile-menu-item-label{flex:1;font-size:14px;font-weight:500;line-height:21px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ia-profile-menu-item-chevron{color:var(--iu-on-surface-icon);flex:none;height:18px;width:18px}.ia-profile-menu-item-chevron-expand{transition:transform .15s ease}.ia-profile-menu-item-chevron-expanded{transform:rotate(180deg)}.ia-profile-menu-item-active{background:var(--iu-bg-primary-subtle)}.ia-profile-menu-divider{background:var(--iu-border-default);height:1px;margin:4px 6px}.ia-profile-menu-item-logout{background:var(--iu-bg-surface-layer-bg);color:var(--iu-bg-error)}.ia-profile-menu-item-logout .ia-profile-menu-item-icon{color:var(--iu-on-error)}.ia-profile-menu-item-logout:hover{background:var(--iu-bg-primary-subtle)}.ia_profile_main{align-items:center;align-self:stretch;display:flex;flex-direction:column;padding-top:12px;position:relative;width:100%;z-index:1}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
- import { KeyboardShortcutIcon as KeyboardShortcutIcon_default, HelpIcon as HelpIcon_default, LogoutIcon as LogoutIcon_default } from "../../node_modules/@impactsmartsuite/impact-icons/dist/index.js";
5
- import default_1$5 from "../../node_modules/@mui/icons-material/ArticleOutlined.js";
6
- import default_1$4 from "../../node_modules/@mui/icons-material/Check.js";
7
- import default_1$1 from "../../node_modules/@mui/icons-material/ChevronRight.js";
8
- import default_1$3 from "../../node_modules/@mui/icons-material/ExpandMore.js";
9
- import default_1 from "../../node_modules/@mui/icons-material/NotificationsOffOutlined.js";
10
- import default_1$2 from "../../node_modules/@mui/icons-material/PaletteOutlined.js";
11
- import default_1$6 from "../../node_modules/@mui/icons-material/SettingsOutlined.js";
4
+ import { LogoutIcon as LogoutIcon_default } from "../../node_modules/@impactsmartsuite/impact-icons/dist/index.js";
5
+ import default_1 from "../../node_modules/@mui/icons-material/PaletteOutlined.js";
6
+ import { getAssetUrl } from "../../utils/assetBase.js";
12
7
  import { Avatar } from "../Avatar/index.js";
13
8
  import { ImpactIcon, impactIconSource } from "../ImpactIcon/index.js";
9
+ import { Popover } from "../Popover/index.js";
10
+ import { ProfileMenuListItem } from "./ProfileMenuListItem.js";
14
11
 
15
12
  import { useTranslation } from "../../i18n/useTranslation.js";
16
- import { useImpactUiTheme } from "../../tokens/useImpactUiTheme.js";
17
- import Popover from "../../node_modules/@mui/material/Popover/Popover.js";
13
+ import { ThemingPanel } from "../ThemingPanel/ThemingPanel.js";
14
+ const PROFILE_MENU_BANNER_URL = getAssetUrl("images/profile-popover-bg.webp");
18
15
  function ProfileMenu({
19
16
  anchorEl,
20
17
  open,
@@ -22,258 +19,121 @@ function ProfileMenu({
22
19
  userName,
23
20
  userEmail,
24
21
  avatarProps,
25
- onMuteNotificationsClick,
26
- onKeyboardShortcutsClick,
27
- onReleaseNotesClick,
28
- onHelpClick,
29
- onAllSettingsClick,
22
+ onMuteNotificationsClick: _onMuteNotificationsClick,
23
+ onKeyboardShortcutsClick: _onKeyboardShortcutsClick,
24
+ onReleaseNotesClick: _onReleaseNotesClick,
25
+ onHelpClick: _onHelpClick,
26
+ onAllSettingsClick: _onAllSettingsClick,
30
27
  onLogoutClick,
28
+ menuItems,
31
29
  className,
32
30
  id,
33
31
  "data-testid": dataTestId
34
32
  }) {
35
33
  const { t } = useTranslation();
36
- const { mode, setMode } = useImpactUiTheme();
37
- const [themesExpanded, setThemesExpanded] = useState(false);
38
- const themeOptions = [
39
- { value: "light", label: t("profileMenu.themeLight") },
40
- { value: "dark", label: t("profileMenu.themeDark") },
41
- { value: "system", label: t("profileMenu.themeSystem") }
42
- ];
34
+ const [themingOpen, setThemingOpen] = useState(false);
43
35
  const handleClose = () => {
44
- setThemesExpanded(false);
45
36
  onClose();
46
37
  };
47
- const handleThemeSelect = (next) => {
48
- setMode(next);
38
+ const openThemingPanel = () => {
39
+ setThemingOpen(true);
40
+ handleClose();
49
41
  };
50
- return /* @__PURE__ */ jsx(
51
- Popover,
52
- {
53
- anchorEl,
54
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
55
- className: `ia-styles ia-profile-menu ${className ?? ""}`.trim(),
56
- "data-testid": dataTestId,
57
- id,
58
- open,
59
- transformOrigin: { vertical: "top", horizontal: "right" },
60
- onClose: handleClose,
61
- children: /* @__PURE__ */ jsxs("div", { className: "ia-profile-menu-container", children: [
62
- /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-banner", children: /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-avatar", children: /* @__PURE__ */ jsx(Avatar, { label: userName, size: "large", type: "withoutPicture", ...avatarProps }) }) }),
63
- /* @__PURE__ */ jsxs("div", { className: "ia-profile-menu-identity", children: [
64
- /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-name", children: userName }),
65
- userEmail != null && /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-email", children: userEmail })
66
- ] }),
67
- /* @__PURE__ */ jsxs("div", { className: "ia-profile-menu-list", children: [
68
- /* @__PURE__ */ jsxs(
42
+ const handleLogout = () => {
43
+ onLogoutClick == null ? void 0 : onLogoutClick();
44
+ handleClose();
45
+ };
46
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
47
+ /* @__PURE__ */ jsx(
48
+ Popover,
49
+ {
50
+ contentOnly: true,
51
+ anchorEl,
52
+ anchorOrigin: { vertical: "bottom", horizontal: "right" },
53
+ className: `ia-styles ia-profile-menu ${className ?? ""}`.trim(),
54
+ "data-testid": dataTestId,
55
+ id,
56
+ open,
57
+ slotProps: { paper: { className: "ia-profile-menu-paper" } },
58
+ transformOrigin: { vertical: "top", horizontal: "right" },
59
+ onClose: () => {
60
+ handleClose();
61
+ },
62
+ children: /* @__PURE__ */ jsxs("div", { className: "ia-profile-menu-container", children: [
63
+ /* @__PURE__ */ jsx(
69
64
  "div",
70
65
  {
71
- className: "ia-profile-menu-item",
72
- role: "menuitem",
73
- tabIndex: 0,
74
- onClick: () => {
75
- onMuteNotificationsClick == null ? void 0 : onMuteNotificationsClick();
76
- },
77
- onKeyDown: (e) => {
78
- if (e.key === "Enter" || e.key === " ") {
79
- e.preventDefault();
80
- onMuteNotificationsClick == null ? void 0 : onMuteNotificationsClick();
81
- }
82
- },
83
- children: [
84
- /* @__PURE__ */ jsx(default_1, { className: "ia-profile-menu-item-icon" }),
85
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: t("profileMenu.muteNotifications") }),
86
- /* @__PURE__ */ jsx(default_1$1, { className: "ia-profile-menu-item-chevron" })
87
- ]
66
+ "aria-hidden": true,
67
+ className: "ia-profile-menu-banner",
68
+ style: {
69
+ "--ia-profile-menu-banner-url": `url(${PROFILE_MENU_BANNER_URL})`
70
+ }
88
71
  }
89
72
  ),
90
- /* @__PURE__ */ jsxs(
91
- "div",
92
- {
93
- "aria-expanded": themesExpanded,
94
- className: `ia-profile-menu-item ia-profile-menu-item-themes ${themesExpanded ? "ia-profile-menu-item-active" : ""}`,
95
- role: "button",
96
- tabIndex: 0,
97
- onClick: () => {
98
- setThemesExpanded((prev) => !prev);
99
- },
100
- onKeyDown: (e) => {
101
- if (e.key === "Enter" || e.key === " ") {
102
- e.preventDefault();
103
- setThemesExpanded((prev) => !prev);
73
+ /* @__PURE__ */ jsxs("div", { className: "ia_profile_main", children: [
74
+ /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-avatar", children: /* @__PURE__ */ jsx(Avatar, { label: userName, size: "large", type: "withoutPicture", ...avatarProps }) }),
75
+ /* @__PURE__ */ jsxs("div", { className: "ia-profile-menu-identity", children: [
76
+ /* @__PURE__ */ jsx("h2", { className: "ia-profile-menu-name", children: userName }),
77
+ userEmail != null && /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-email", children: userEmail })
78
+ ] }),
79
+ /* @__PURE__ */ jsxs("div", { className: "ia-profile-menu-list", children: [
80
+ /* @__PURE__ */ jsx(
81
+ ProfileMenuListItem,
82
+ {
83
+ className: "ia-profile-menu-item-themes",
84
+ icon: /* @__PURE__ */ jsx(default_1, { className: "ia-profile-menu-item-icon", fontSize: "small" }),
85
+ label: t("profileMenu.themes"),
86
+ onActivate: openThemingPanel
104
87
  }
105
- },
106
- children: [
107
- /* @__PURE__ */ jsx(default_1$2, { className: "ia-profile-menu-item-icon" }),
108
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: t("profileMenu.themes") }),
109
- /* @__PURE__ */ jsx(
110
- default_1$3,
111
- {
112
- className: `ia-profile-menu-item-chevron ia-profile-menu-item-chevron-expand ${themesExpanded ? "ia-profile-menu-item-chevron-expanded" : ""}`
113
- }
114
- )
115
- ]
116
- }
117
- ),
118
- themesExpanded && /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-theme-options", role: "radiogroup", children: themeOptions.map((option) => {
119
- const selected = mode === option.value;
120
- return /* @__PURE__ */ jsxs(
121
- "div",
122
- {
123
- "aria-checked": selected,
124
- className: `ia-profile-menu-theme-option ${selected ? "ia-profile-menu-theme-option-selected" : ""}`,
125
- role: "radio",
126
- tabIndex: 0,
127
- onClick: () => {
128
- handleThemeSelect(option.value);
129
- },
130
- onKeyDown: (e) => {
131
- if (e.key === "Enter" || e.key === " ") {
132
- e.preventDefault();
133
- handleThemeSelect(option.value);
88
+ ),
89
+ menuItems == null ? void 0 : menuItems.map((item, index) => /* @__PURE__ */ jsx(
90
+ ProfileMenuListItem,
91
+ {
92
+ disabled: item.disabled,
93
+ icon: item.icon,
94
+ label: item.label,
95
+ onActivate: () => {
96
+ var _a;
97
+ (_a = item.onClick) == null ? void 0 : _a.call(item);
98
+ if (item.closeOnClick !== false) {
99
+ handleClose();
100
+ }
134
101
  }
135
102
  },
136
- children: [
137
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-theme-option-label", children: option.label }),
138
- selected && /* @__PURE__ */ jsx(default_1$4, { className: "ia-profile-menu-theme-option-check" })
139
- ]
140
- },
141
- option.value
142
- );
143
- }) }),
144
- /* @__PURE__ */ jsxs(
145
- "div",
146
- {
147
- className: "ia-profile-menu-item",
148
- role: "menuitem",
149
- tabIndex: 0,
150
- onClick: () => {
151
- onKeyboardShortcutsClick == null ? void 0 : onKeyboardShortcutsClick();
152
- },
153
- onKeyDown: (e) => {
154
- if (e.key === "Enter" || e.key === " ") {
155
- e.preventDefault();
156
- onKeyboardShortcutsClick == null ? void 0 : onKeyboardShortcutsClick();
157
- }
158
- },
159
- children: [
160
- /* @__PURE__ */ jsx(
161
- ImpactIcon,
162
- {
163
- className: "ia-profile-menu-item-icon",
164
- icon: impactIconSource(KeyboardShortcutIcon_default),
165
- size: 20
166
- }
167
- ),
168
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: t("profileMenu.keyboardShortcuts") })
169
- ]
170
- }
171
- ),
172
- /* @__PURE__ */ jsxs(
173
- "div",
174
- {
175
- className: "ia-profile-menu-item",
176
- role: "menuitem",
177
- tabIndex: 0,
178
- onClick: () => {
179
- onReleaseNotesClick == null ? void 0 : onReleaseNotesClick();
180
- },
181
- onKeyDown: (e) => {
182
- if (e.key === "Enter" || e.key === " ") {
183
- e.preventDefault();
184
- onReleaseNotesClick == null ? void 0 : onReleaseNotesClick();
185
- }
186
- },
187
- children: [
188
- /* @__PURE__ */ jsx(default_1$5, { className: "ia-profile-menu-item-icon" }),
189
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: t("profileMenu.releaseNotes") })
190
- ]
191
- }
192
- ),
193
- /* @__PURE__ */ jsxs(
194
- "div",
195
- {
196
- className: "ia-profile-menu-item",
197
- role: "menuitem",
198
- tabIndex: 0,
199
- onClick: () => {
200
- onHelpClick == null ? void 0 : onHelpClick();
201
- },
202
- onKeyDown: (e) => {
203
- if (e.key === "Enter" || e.key === " ") {
204
- e.preventDefault();
205
- onHelpClick == null ? void 0 : onHelpClick();
206
- }
207
- },
208
- children: [
209
- /* @__PURE__ */ jsx(
210
- ImpactIcon,
211
- {
212
- className: "ia-profile-menu-item-icon",
213
- icon: impactIconSource(HelpIcon_default),
214
- size: 20
215
- }
216
- ),
217
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: t("profileMenu.help") })
218
- ]
219
- }
220
- ),
221
- /* @__PURE__ */ jsxs(
222
- "div",
223
- {
224
- className: "ia-profile-menu-item",
225
- role: "menuitem",
226
- tabIndex: 0,
227
- onClick: () => {
228
- onAllSettingsClick == null ? void 0 : onAllSettingsClick();
229
- },
230
- onKeyDown: (e) => {
231
- if (e.key === "Enter" || e.key === " ") {
232
- e.preventDefault();
233
- onAllSettingsClick == null ? void 0 : onAllSettingsClick();
234
- }
235
- },
236
- children: [
237
- /* @__PURE__ */ jsx(default_1$6, { className: "ia-profile-menu-item-icon" }),
238
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: t("profileMenu.allSettings") })
239
- ]
240
- }
241
- )
242
- ] }),
243
- /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-divider" }),
244
- /* @__PURE__ */ jsxs(
245
- "div",
246
- {
247
- className: "ia-profile-menu-item ia-profile-menu-item-logout",
248
- role: "menuitem",
249
- tabIndex: 0,
250
- onClick: () => {
251
- onLogoutClick == null ? void 0 : onLogoutClick();
252
- handleClose();
253
- },
254
- onKeyDown: (e) => {
255
- if (e.key === "Enter" || e.key === " ") {
256
- e.preventDefault();
257
- onLogoutClick == null ? void 0 : onLogoutClick();
258
- handleClose();
259
- }
260
- },
261
- children: [
103
+ item.id ?? `${item.label}-${index}`
104
+ )),
105
+ /* @__PURE__ */ jsx("div", { className: "ia-profile-menu-divider" }),
262
106
  /* @__PURE__ */ jsx(
263
- ImpactIcon,
107
+ ProfileMenuListItem,
264
108
  {
265
- className: "ia-profile-menu-item-icon",
266
- icon: impactIconSource(LogoutIcon_default),
267
- size: 20
109
+ className: "ia-profile-menu-item-logout",
110
+ icon: /* @__PURE__ */ jsx(
111
+ ImpactIcon,
112
+ {
113
+ className: "ia-profile-menu-item-icon",
114
+ icon: impactIconSource(LogoutIcon_default),
115
+ size: 16
116
+ }
117
+ ),
118
+ label: t("profileMenu.logout"),
119
+ onActivate: handleLogout
268
120
  }
269
- ),
270
- /* @__PURE__ */ jsx("span", { className: "ia-profile-menu-item-label", children: t("profileMenu.logout") })
271
- ]
272
- }
273
- )
274
- ] })
275
- }
276
- );
121
+ )
122
+ ] })
123
+ ] })
124
+ ] })
125
+ }
126
+ ),
127
+ /* @__PURE__ */ jsx(
128
+ ThemingPanel,
129
+ {
130
+ open: themingOpen,
131
+ onClose: () => {
132
+ setThemingOpen(false);
133
+ }
134
+ }
135
+ )
136
+ ] });
277
137
  }
278
138
  ProfileMenu.displayName = "ProfileMenu";
279
139
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,sBAAsB,CAAC;AAE9B,YAAY,EACV,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AASxB;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,iBAAiB,EAAE,kBAA0B,EAC7C,MAAM,EACN,KAAK,EACL,KAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAO,EACP,GAAS,EACT,OAAmB,EACnB,aAAwB,EACxB,oBAAoB,EACpB,WAAW,EACX,cAAqB,EACrB,SAAS,EACT,EAAE,EACF,aAAa,EAAE,UAAU,EACzB,GAAG,WAAW,EACf,EAAE,WAAW,+BAyQb;yBA5Re,MAAM"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,sBAAsB,CAAC;AAE9B,YAAY,EACV,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AASxB;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,iBAAiB,EAAE,kBAA0B,EAC7C,MAAM,EACN,KAAK,EACL,KAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAO,EACP,GAAS,EACT,OAAmB,EACnB,aAAwB,EACxB,oBAAoB,EACpB,WAAW,EACX,cAAqB,EACrB,SAAS,EACT,EAAE,EACF,aAAa,EAAE,UAAU,EACzB,GAAG,WAAW,EACf,EAAE,WAAW,+BA0Qb;yBA7Re,MAAM"}
@@ -1,7 +1,8 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var i=document.createElement("style");i.appendChild(document.createTextNode(".slider-container{display:flex;flex-direction:column;gap:2px;min-height:calc(100% + 20px)}.impact_slider_layout{display:flex;gap:16px}.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root{background-color:var(--iu-bg-surface-layer-bg);border:1px solid var(--iu-bg-disabled-2);border-radius:8px;height:32px;width:75px}.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root:focus,.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root:hover{border:1px solid var(--iu-bg-primary)}.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root fieldset{border:none!important}.impact_slider_layout .impact_slider_layout_heading{font-size:22px;font-weight:400;line-height:30.05px}.impact_slider_layout.header-top{flex-direction:column}.impact_slider_layout.header-left{align-items:center;flex-direction:row;gap:32px}.impact_slider_layout.input-position-inline{align-items:flex-end!important;gap:24px}.impact_slider_layout.input-position-inline .impact_slider_main_container{flex:1}.impact_slider_layout.input-position-inline .input_layout_style{flex-shrink:0}.impact_slider_layout.input-position-bottom{flex-direction:column;gap:16px}.impact_slider_layout.input-position-bottom .impact_slider_main_container{width:100%}.impact_slider_layout.input-position-bottom .input_layout_style{align-self:flex-end}.impact_slider_layout .impact_slider_container{width:390px}.impact_slider_layout .impact_slider_container .impact_slider_labelname{color:var(--iu-on-surface-label);display:block;font-size:12px;font-weight:500;margin-bottom:8px;margin-top:8px}.impact_slider_layout .impact_slider_container .impact_slider_main_container{align-items:center;display:flex;gap:16px;position:relative}.impact_slider_layout .impact_slider_container .impact_slider_main_container .impact_slider_threshold_marker{background-color:var(--iu-bg-warning);border-radius:1px;height:8px;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);width:2px;z-index:1}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-root{color:var(--iu-bg-primary);height:4px}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-rail{background:var(--iu-border-disabled);opacity:1}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-thumb:hover{box-shadow:none}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-valueLabel{background-color:var(--iu-on-surface-title);color:var(--iu-bg-surface-layer-bg)}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-valueLabel:before{background-color:var(--iu-on-surface-title)}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-valueLabel .MuiSlider-valueLabelLabel{color:inherit;font-family:Manrope,sans-serif;font-weight:500;line-height:1.2}.impact_slider_layout .impact_slider_container .impact_slider_main_container_disabled{pointer-events:none}.impact_slider_layout .impact_slider_container .impact_slider_main_container_disabled .MuiSlider-root{color:var(--iu-bg-disabled-2);height:4px}.impact_slider_layout .impact_slider_container .impact_slider_main_container_disabled .MuiSlider-rail{background:var(--iu-bg-disabled-2);opacity:1}.impact_slider_layout .impact_slider_disabled .MuiSlider-root{color:var(--iu-border-disabled)!important}.impact_slider_layout .impact_slider_disabled .MuiInputBase-root{background:var(--iu-bg-disabled-1);border:1px solid var(--iu-border-disabled);color:var(--iu-border-disabled)}.impact_slider_layout .impact_slider_disabled .MuiInputBase-root:focus,.impact_slider_layout .impact_slider_disabled .MuiInputBase-root:hover{border:1px solid var(--iu-border-disabled)!important}.impact_slider_layout .impact_slider_disabled .MuiInputBase-root fieldset{border:none!important}.impact_slider_layout .input_layout_style.ranged form{align-items:center;display:flex}.impact_slider_layout .input_layout_style.ranged form .MuiFormControl-root{align-items:center;display:flex;flex-direction:row;flex-grow:1;justify-content:space-between}.impact_slider_layout .input_layout_style.single form{align-items:center;display:flex;justify-content:center}.impact_slider_layout .input_layout_style.single form .MuiFormControl-root{width:120px}.MuiSlider-thumb,.MuiSlider-thumb:before{box-shadow:none!important}.MuiSlider-thumb:active,.MuiSlider-thumb:hover{box-shadow:none!important;z-index:2}.MuiSlider-thumb.Mui-focusVisible{box-shadow:0 0 0 var(--ia-focus-ring-offset,2px) var(--ia-focus-bg,var(--iu-bg-surface-layer-bg)),0 0 0 calc(var(--ia-focus-ring-offset, 2px) + var(--ia-focus-ring-width, 2px)) var(--ia-focus-color,var(--iu-bg-primary))!important;outline:none;transition:box-shadow .15s ease-in-out;z-index:2}.Mui-disabled{pointer-events:none}.Mui-disabled.MuiOutlinedInput-root fieldset,:is(.Mui-disabled.MuiOutlinedInput-root:focus-within,.Mui-disabled.MuiOutlinedInput-root:hover) fieldset{border-color:var(--iu-border-disabled)!important}.slider-info-message{align-items:center;color:var(--iu-bg-error);display:flex;font-size:12px;gap:6px;height:20px;opacity:1;padding-left:91px;transform:translateY(0);transition:opacity .2s ease-out,transform .2s ease-out}.slider-info-message.hidden{opacity:0;pointer-events:none;transform:translateY(-4px)}.slider-info-message .slider-info-icon{flex-shrink:0;font-size:14px}.slider-info-message .slider-info-text{font-weight:500;line-height:16px}.slider-info-placeholder{height:20px;width:100%}")),document.head.appendChild(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var i=document.createElement("style");i.appendChild(document.createTextNode(".slider-container{display:flex;flex-direction:column;gap:2px;min-height:calc(100% + 20px)}.impact_slider_layout{display:flex;gap:16px}.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root{background-color:var(--iu-bg-surface-layer-bg);border:1px solid var(--iu-bg-disabled-2);border-radius:8px;height:32px;width:75px}.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root:focus,.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root:hover{border:1px solid var(--iu-bg-primary)}.impact_slider_layout .input_layout_style .MuiFormControl-root .MuiInputBase-root fieldset{border:none!important}.impact_slider_layout .impact_slider_layout_heading{font-size:22px;font-weight:400;line-height:30.05px}.impact_slider_layout.header-top{flex-direction:column}.impact_slider_layout.header-left{align-items:center;flex-direction:row;gap:32px}.impact_slider_layout.input-position-inline{align-items:flex-end!important;gap:24px}.impact_slider_layout.input-position-inline .impact_slider_main_container{flex:1}.impact_slider_layout.input-position-inline .input_layout_style{flex-shrink:0}.impact_slider_layout.input-position-bottom{flex-direction:column;gap:16px}.impact_slider_layout.input-position-bottom .impact_slider_main_container{width:100%}.impact_slider_layout.input-position-bottom .input_layout_style{align-self:flex-end}.impact_slider_layout .impact_slider_container{width:390px}.impact_slider_layout .impact_slider_container .impact_slider_labelname{color:var(--iu-on-surface-label);display:block;font-size:12px;font-weight:500;margin-bottom:8px;margin-top:8px}.impact_slider_layout .impact_slider_container .impact_slider_main_container{align-items:center;display:flex;gap:16px;position:relative}.impact_slider_layout .impact_slider_container .impact_slider_main_container .impact_slider_threshold_marker{background-color:var(--iu-bg-warning);border-radius:1px;height:8px;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);width:2px;z-index:1}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-root{color:var(--iu-bg-primary);height:4px}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-rail{background:var(--iu-border-disabled);opacity:1}.impact_slider_layout .impact_slider_container .impact_slider_main_container .MuiSlider-thumb:hover{box-shadow:none}.impact_slider_layout .impact_slider_container .impact_slider_main_container_disabled{pointer-events:none}.impact_slider_layout .impact_slider_container .impact_slider_main_container_disabled .MuiSlider-root{color:var(--iu-bg-disabled-2);height:4px}.impact_slider_layout .impact_slider_container .impact_slider_main_container_disabled .MuiSlider-rail{background:var(--iu-bg-disabled-2);opacity:1}.impact_slider_layout .impact_slider_disabled .MuiSlider-root{color:var(--iu-border-disabled)!important}.impact_slider_layout .impact_slider_disabled .MuiInputBase-root{background:var(--iu-bg-disabled-1);border:1px solid var(--iu-border-disabled);color:var(--iu-border-disabled)}.impact_slider_layout .impact_slider_disabled .MuiInputBase-root:focus,.impact_slider_layout .impact_slider_disabled .MuiInputBase-root:hover{border:1px solid var(--iu-border-disabled)!important}.impact_slider_layout .impact_slider_disabled .MuiInputBase-root fieldset{border:none!important}.impact_slider_layout .input_layout_style.ranged form{align-items:center;display:flex}.impact_slider_layout .input_layout_style.ranged form .MuiFormControl-root{align-items:center;display:flex;flex-direction:row;flex-grow:1;justify-content:space-between}.impact_slider_layout .input_layout_style.single form{align-items:center;display:flex;justify-content:center}.impact_slider_layout .input_layout_style.single form .MuiFormControl-root{width:120px}.MuiSlider-thumb,.MuiSlider-thumb:before{box-shadow:none!important}.MuiSlider-thumb:active,.MuiSlider-thumb:hover{box-shadow:none!important;z-index:2}.MuiSlider-thumb.Mui-focusVisible{box-shadow:0 0 0 var(--ia-focus-ring-offset,2px) var(--ia-focus-bg,var(--iu-bg-surface-layer-bg)),0 0 0 calc(var(--ia-focus-ring-offset, 2px) + var(--ia-focus-ring-width, 2px)) var(--ia-focus-color,var(--iu-bg-primary))!important;outline:none;transition:box-shadow .15s ease-in-out;z-index:2}.Mui-disabled{pointer-events:none}.Mui-disabled.MuiOutlinedInput-root fieldset,:is(.Mui-disabled.MuiOutlinedInput-root:focus-within,.Mui-disabled.MuiOutlinedInput-root:hover) fieldset{border-color:var(--iu-border-disabled)!important}.slider-info-message{align-items:center;color:var(--iu-bg-error);display:flex;font-size:12px;gap:6px;height:20px;opacity:1;padding-left:91px;transform:translateY(0);transition:opacity .2s ease-out,transform .2s ease-out}.slider-info-message.hidden{opacity:0;pointer-events:none;transform:translateY(-4px)}.slider-info-message .slider-info-icon{flex-shrink:0;font-size:14px}.slider-info-message .slider-info-text{font-weight:500;line-height:16px}.slider-info-placeholder{height:20px;width:100%}.impact-tooltip-container.impact-slider-value-tooltip.tertiary-tooltip .MuiTooltip-tooltip{border-radius:2px;font-size:12px;line-height:1.33;min-height:unset;padding:4px 12px}")),document.head.appendChild(i)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import { useState, useMemo, useEffect } from "react";
4
4
  import default_1 from "../../node_modules/@mui/icons-material/InfoOutlined.js";
5
+ import { SliderValueLabel } from "./sliderValueLabel.js";
5
6
 
6
7
  import { useTranslation } from "../../i18n/useTranslation.js";
7
8
  import FormControl from "../../node_modules/@mui/material/FormControl/FormControl.js";
@@ -186,6 +187,7 @@ function Slider({
186
187
  disabled,
187
188
  max,
188
189
  min,
190
+ slots: { ...sliderProps.slots, valueLabel: SliderValueLabel },
189
191
  sx: isAboveThreshold ? {
190
192
  color: SLIDER_PRIMARY,
191
193
  "& .MuiSlider-track": {
@@ -0,0 +1,7 @@
1
+ import { SliderValueLabelProps } from '@mui/material/Slider/SliderValueLabel.types';
2
+
3
+ /**
4
+ * MUI Slider value label slot — shows the thumb value in Impact UI Tooltip instead of the default MUI bubble.
5
+ */
6
+ export declare function SliderValueLabel({ children, open, value, valueLabelDisplay, }: SliderValueLabelProps): import("react").JSX.Element | null;
7
+ //# sourceMappingURL=sliderValueLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sliderValueLabel.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/sliderValueLabel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEzF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,iBAAyB,GAC1B,EAAE,qBAAqB,sCAqBvB"}
@@ -0,0 +1,31 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { isValidElement, cloneElement } from "react";
3
+ import { Tooltip } from "../Tooltip/index.js";
4
+ function SliderValueLabel({
5
+ children,
6
+ open,
7
+ value,
8
+ valueLabelDisplay = "off"
9
+ }) {
10
+ if (!isValidElement(children)) {
11
+ return null;
12
+ }
13
+ const labelVisible = valueLabelDisplay === "on" || valueLabelDisplay === "auto" && open;
14
+ return /* @__PURE__ */ jsx(
15
+ Tooltip,
16
+ {
17
+ className: "impact-slider-value-tooltip",
18
+ isHoverEnabled: false,
19
+ open: labelVisible,
20
+ orientation: "top",
21
+ title: value,
22
+ variant: "tertiary",
23
+ children: cloneElement(children, {
24
+ className: children.props.className
25
+ })
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ SliderValueLabel
31
+ };