@okta/odyssey-react-mui 1.27.1 → 1.28.1

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 (221) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{Button.js → Buttons/BaseButton.js} +11 -10
  3. package/dist/Buttons/BaseButton.js.map +1 -0
  4. package/dist/{MenuButton.js → Buttons/BaseMenuButton.js} +30 -10
  5. package/dist/Buttons/BaseMenuButton.js.map +1 -0
  6. package/dist/Buttons/Button.js +24 -0
  7. package/dist/Buttons/Button.js.map +1 -0
  8. package/dist/Buttons/ButtonContext.js.map +1 -0
  9. package/dist/Buttons/MenuButton.js +25 -0
  10. package/dist/Buttons/MenuButton.js.map +1 -0
  11. package/dist/Buttons/MenuContext.js.map +1 -0
  12. package/dist/Buttons/MenuItem.js.map +1 -0
  13. package/dist/Buttons/index.js +18 -0
  14. package/dist/Buttons/index.js.map +1 -0
  15. package/dist/Card.js +1 -2
  16. package/dist/Card.js.map +1 -1
  17. package/dist/DataTable/DataTable.js +1 -2
  18. package/dist/DataTable/DataTable.js.map +1 -1
  19. package/dist/DataTable/DataTableRowActions.js +1 -2
  20. package/dist/DataTable/DataTableRowActions.js.map +1 -1
  21. package/dist/DataTable/DataTableSettings.js +1 -2
  22. package/dist/DataTable/DataTableSettings.js.map +1 -1
  23. package/dist/Dialog.js +1 -1
  24. package/dist/Dialog.js.map +1 -1
  25. package/dist/Drawer.js +1 -1
  26. package/dist/Drawer.js.map +1 -1
  27. package/dist/FileUploader/FileUploader.js +1 -1
  28. package/dist/FileUploader/FileUploader.js.map +1 -1
  29. package/dist/Form.js.map +1 -1
  30. package/dist/Pagination/Pagination.js +1 -1
  31. package/dist/Pagination/Pagination.js.map +1 -1
  32. package/dist/Toast.js +1 -1
  33. package/dist/Toast.js.map +1 -1
  34. package/dist/index.js +1 -3
  35. package/dist/index.js.map +1 -1
  36. package/dist/index.scss +1 -1
  37. package/dist/labs/AppSwitcher/AppSwitcher.js +76 -0
  38. package/dist/labs/AppSwitcher/AppSwitcher.js.map +1 -0
  39. package/dist/labs/AppSwitcher/AppSwitcherApp.js +112 -0
  40. package/dist/labs/AppSwitcher/AppSwitcherApp.js.map +1 -0
  41. package/dist/labs/{SideNav → AppSwitcher}/OktaAura.js +16 -3
  42. package/dist/labs/AppSwitcher/OktaAura.js.map +1 -0
  43. package/dist/labs/AppSwitcher/index.js +13 -0
  44. package/dist/labs/AppSwitcher/index.js.map +1 -0
  45. package/dist/labs/AppTile.js +102 -65
  46. package/dist/labs/AppTile.js.map +1 -1
  47. package/dist/labs/DataFilters.js +1 -1
  48. package/dist/labs/DataFilters.js.map +1 -1
  49. package/dist/labs/DataTable.js.map +1 -1
  50. package/dist/labs/DataTablePagination.js +1 -1
  51. package/dist/labs/DataTablePagination.js.map +1 -1
  52. package/dist/labs/DataView/BulkActionsMenu.js +1 -2
  53. package/dist/labs/DataView/BulkActionsMenu.js.map +1 -1
  54. package/dist/labs/DataView/DataCard.js +53 -42
  55. package/dist/labs/DataView/DataCard.js.map +1 -1
  56. package/dist/labs/DataView/DataView.js +1 -1
  57. package/dist/labs/DataView/DataView.js.map +1 -1
  58. package/dist/labs/DataView/LayoutSwitcher.js +1 -2
  59. package/dist/labs/DataView/LayoutSwitcher.js.map +1 -1
  60. package/dist/labs/DataView/RowActions.js +1 -1
  61. package/dist/labs/DataView/RowActions.js.map +1 -1
  62. package/dist/labs/DataView/TableLayoutContent.js +1 -2
  63. package/dist/labs/DataView/TableLayoutContent.js.map +1 -1
  64. package/dist/labs/DataView/TableSettings.js +1 -2
  65. package/dist/labs/DataView/TableSettings.js.map +1 -1
  66. package/dist/labs/DatePicker.js +1 -1
  67. package/dist/labs/DatePicker.js.map +1 -1
  68. package/dist/labs/SideNav/SideNav.js +5 -4
  69. package/dist/labs/SideNav/SideNav.js.map +1 -1
  70. package/dist/labs/TopNav/UserProfile.js +16 -3
  71. package/dist/labs/TopNav/UserProfile.js.map +1 -1
  72. package/dist/labs/TopNav/UserProfileMenuButton.js +41 -0
  73. package/dist/labs/TopNav/UserProfileMenuButton.js.map +1 -0
  74. package/dist/labs/TopNav/index.js +1 -0
  75. package/dist/labs/TopNav/index.js.map +1 -1
  76. package/dist/labs/UiShell/UiShell.js +6 -5
  77. package/dist/labs/UiShell/UiShell.js.map +1 -1
  78. package/dist/labs/UiShell/UiShellContent.js +53 -13
  79. package/dist/labs/UiShell/UiShellContent.js.map +1 -1
  80. package/dist/labs/UiShell/renderUiShell.js +4 -0
  81. package/dist/labs/UiShell/renderUiShell.js.map +1 -1
  82. package/dist/labs/index.js +1 -0
  83. package/dist/labs/index.js.map +1 -1
  84. package/dist/src/{Button.d.ts → Buttons/BaseButton.d.ts} +12 -34
  85. package/dist/src/Buttons/BaseButton.d.ts.map +1 -0
  86. package/dist/src/{MenuButton.d.ts → Buttons/BaseMenuButton.d.ts} +37 -14
  87. package/dist/src/Buttons/BaseMenuButton.d.ts.map +1 -0
  88. package/dist/src/Buttons/Button.d.ts +16 -0
  89. package/dist/src/Buttons/Button.d.ts.map +1 -0
  90. package/dist/src/Buttons/ButtonContext.d.ts.map +1 -0
  91. package/dist/src/Buttons/MenuButton.d.ts +17 -0
  92. package/dist/src/Buttons/MenuButton.d.ts.map +1 -0
  93. package/dist/src/Buttons/MenuContext.d.ts.map +1 -0
  94. package/dist/src/{MenuItem.d.ts → Buttons/MenuItem.d.ts} +1 -1
  95. package/dist/src/Buttons/MenuItem.d.ts.map +1 -0
  96. package/dist/src/Buttons/index.d.ts +18 -0
  97. package/dist/src/Buttons/index.d.ts.map +1 -0
  98. package/dist/src/Card.d.ts +1 -2
  99. package/dist/src/Card.d.ts.map +1 -1
  100. package/dist/src/DataTable/DataTable.d.ts +1 -1
  101. package/dist/src/DataTable/DataTable.d.ts.map +1 -1
  102. package/dist/src/DataTable/DataTableRowActions.d.ts +1 -2
  103. package/dist/src/DataTable/DataTableRowActions.d.ts.map +1 -1
  104. package/dist/src/DataTable/DataTableSettings.d.ts.map +1 -1
  105. package/dist/src/Dialog.d.ts +1 -1
  106. package/dist/src/Dialog.d.ts.map +1 -1
  107. package/dist/src/Drawer.d.ts +1 -1
  108. package/dist/src/Drawer.d.ts.map +1 -1
  109. package/dist/src/Form.d.ts +1 -1
  110. package/dist/src/Form.d.ts.map +1 -1
  111. package/dist/src/index.d.ts +1 -3
  112. package/dist/src/index.d.ts.map +1 -1
  113. package/dist/src/labs/AppSwitcher/AppSwitcher.d.ts +20 -0
  114. package/dist/src/labs/AppSwitcher/AppSwitcher.d.ts.map +1 -0
  115. package/dist/src/labs/AppSwitcher/AppSwitcherApp.d.ts +24 -0
  116. package/dist/src/labs/AppSwitcher/AppSwitcherApp.d.ts.map +1 -0
  117. package/dist/src/labs/AppSwitcher/OktaAura.d.ts.map +1 -0
  118. package/dist/src/labs/AppSwitcher/index.d.ts +13 -0
  119. package/dist/src/labs/AppSwitcher/index.d.ts.map +1 -0
  120. package/dist/src/labs/AppTile.d.ts +6 -4
  121. package/dist/src/labs/AppTile.d.ts.map +1 -1
  122. package/dist/src/labs/DataTable.d.ts +1 -1
  123. package/dist/src/labs/DataTable.d.ts.map +1 -1
  124. package/dist/src/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
  125. package/dist/src/labs/DataView/DataCard.d.ts +1 -2
  126. package/dist/src/labs/DataView/DataCard.d.ts.map +1 -1
  127. package/dist/src/labs/DataView/LayoutSwitcher.d.ts.map +1 -1
  128. package/dist/src/labs/DataView/RowActions.d.ts +1 -2
  129. package/dist/src/labs/DataView/RowActions.d.ts.map +1 -1
  130. package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  131. package/dist/src/labs/DataView/TableSettings.d.ts.map +1 -1
  132. package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -1
  133. package/dist/src/labs/TopNav/UserProfile.d.ts +5 -1
  134. package/dist/src/labs/TopNav/UserProfile.d.ts.map +1 -1
  135. package/dist/src/labs/TopNav/UserProfileMenuButton.d.ts +17 -0
  136. package/dist/src/labs/TopNav/UserProfileMenuButton.d.ts.map +1 -0
  137. package/dist/src/labs/TopNav/index.d.ts +1 -0
  138. package/dist/src/labs/TopNav/index.d.ts.map +1 -1
  139. package/dist/src/labs/UiShell/UiShell.d.ts +2 -2
  140. package/dist/src/labs/UiShell/UiShell.d.ts.map +1 -1
  141. package/dist/src/labs/UiShell/UiShellContent.d.ts +19 -2
  142. package/dist/src/labs/UiShell/UiShellContent.d.ts.map +1 -1
  143. package/dist/src/labs/UiShell/renderUiShell.d.ts +2 -2
  144. package/dist/src/labs/UiShell/renderUiShell.d.ts.map +1 -1
  145. package/dist/src/labs/index.d.ts +1 -0
  146. package/dist/src/labs/index.d.ts.map +1 -1
  147. package/dist/src/theme/components.d.ts.map +1 -1
  148. package/dist/src/web-component/renderReactInWebComponent.d.ts +2 -2
  149. package/dist/src/web-component/renderReactInWebComponent.d.ts.map +1 -1
  150. package/dist/theme/components.js +24 -26
  151. package/dist/theme/components.js.map +1 -1
  152. package/dist/tsconfig.production.tsbuildinfo +1 -1
  153. package/dist/web-component/renderReactInWebComponent.js +6 -7
  154. package/dist/web-component/renderReactInWebComponent.js.map +1 -1
  155. package/package.json +3 -3
  156. package/src/{Button.tsx → Buttons/BaseButton.tsx} +48 -68
  157. package/src/{MenuButton.tsx → Buttons/BaseMenuButton.tsx} +94 -32
  158. package/src/Buttons/Button.tsx +30 -0
  159. package/src/Buttons/MenuButton.tsx +35 -0
  160. package/src/{MenuItem.tsx → Buttons/MenuItem.tsx} +1 -1
  161. package/src/Buttons/index.ts +22 -0
  162. package/src/Card.tsx +1 -3
  163. package/src/DataTable/DataTable.tsx +1 -2
  164. package/src/DataTable/DataTableRowActions.tsx +1 -3
  165. package/src/DataTable/DataTableSettings.tsx +1 -2
  166. package/src/Dialog.tsx +1 -1
  167. package/src/Drawer.tsx +1 -1
  168. package/src/FileUploader/FileUploader.tsx +1 -1
  169. package/src/Form.tsx +1 -1
  170. package/src/Pagination/Pagination.test.tsx +58 -36
  171. package/src/Pagination/Pagination.tsx +1 -1
  172. package/src/Toast.tsx +1 -1
  173. package/src/index.ts +1 -3
  174. package/src/labs/AppSwitcher/AppSwitcher.tsx +94 -0
  175. package/src/labs/AppSwitcher/AppSwitcherApp.tsx +146 -0
  176. package/src/labs/{SideNav → AppSwitcher}/OktaAura.tsx +19 -4
  177. package/src/labs/AppSwitcher/index.ts +13 -0
  178. package/src/labs/AppTile.tsx +171 -85
  179. package/src/labs/DataFilters.tsx +1 -1
  180. package/src/labs/DataTable.tsx +1 -1
  181. package/src/labs/DataTablePagination.tsx +1 -1
  182. package/src/labs/DataView/BulkActionsMenu.tsx +1 -2
  183. package/src/labs/DataView/DataCard.tsx +56 -31
  184. package/src/labs/DataView/DataView.tsx +1 -1
  185. package/src/labs/DataView/LayoutSwitcher.tsx +1 -2
  186. package/src/labs/DataView/RowActions.tsx +1 -3
  187. package/src/labs/DataView/TableLayoutContent.tsx +1 -2
  188. package/src/labs/DataView/TableSettings.tsx +1 -2
  189. package/src/labs/DatePicker.tsx +1 -1
  190. package/src/labs/SideNav/SideNav.tsx +10 -4
  191. package/src/labs/TopNav/UserProfile.tsx +26 -2
  192. package/src/labs/TopNav/UserProfileMenuButton.tsx +57 -0
  193. package/src/labs/TopNav/index.ts +1 -0
  194. package/src/labs/UiShell/UiShell.test.tsx +23 -38
  195. package/src/labs/UiShell/UiShell.tsx +14 -6
  196. package/src/labs/UiShell/UiShellContent.tsx +85 -16
  197. package/src/labs/UiShell/renderUiShell.test.tsx +21 -15
  198. package/src/labs/UiShell/renderUiShell.tsx +8 -1
  199. package/src/labs/index.ts +1 -0
  200. package/src/theme/components.tsx +24 -27
  201. package/src/web-component/renderReactInWebComponent.ts +10 -5
  202. package/dist/Button.js.map +0 -1
  203. package/dist/ButtonContext.js.map +0 -1
  204. package/dist/MenuButton.js.map +0 -1
  205. package/dist/MenuContext.js.map +0 -1
  206. package/dist/MenuItem.js.map +0 -1
  207. package/dist/labs/SideNav/OktaAura.js.map +0 -1
  208. package/dist/src/Button.d.ts.map +0 -1
  209. package/dist/src/ButtonContext.d.ts.map +0 -1
  210. package/dist/src/MenuButton.d.ts.map +0 -1
  211. package/dist/src/MenuContext.d.ts.map +0 -1
  212. package/dist/src/MenuItem.d.ts.map +0 -1
  213. package/dist/src/labs/SideNav/OktaAura.d.ts.map +0 -1
  214. /package/dist/{ButtonContext.js → Buttons/ButtonContext.js} +0 -0
  215. /package/dist/{MenuContext.js → Buttons/MenuContext.js} +0 -0
  216. /package/dist/{MenuItem.js → Buttons/MenuItem.js} +0 -0
  217. /package/dist/src/{ButtonContext.d.ts → Buttons/ButtonContext.d.ts} +0 -0
  218. /package/dist/src/{MenuContext.d.ts → Buttons/MenuContext.d.ts} +0 -0
  219. /package/dist/src/labs/{SideNav → AppSwitcher}/OktaAura.d.ts +0 -0
  220. /package/src/{ButtonContext.tsx → Buttons/ButtonContext.tsx} +0 -0
  221. /package/src/{MenuContext.ts → Buttons/MenuContext.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.28.1](https://github.com/okta/odyssey/compare/v1.28.0...v1.28.1) (2024-12-02)
7
+
8
+ **Note:** Version bump only for package @okta/odyssey-react-mui
9
+
10
+ ## [1.28.0](https://github.com/okta/odyssey/compare/v1.27.1...v1.28.0) (2024-11-25)
11
+
12
+ ### Features
13
+
14
+ - adds app switcher lab component ([#2416](https://github.com/okta/odyssey/issues/2416)) ([1b48073](https://github.com/okta/odyssey/commit/1b480738d1c91823f496aa0ff41d678edb76f655))
15
+ - better first-render options for UiShell ([#2422](https://github.com/okta/odyssey/issues/2422)) ([c49b233](https://github.com/okta/odyssey/commit/c49b23360dafa1fdcaab696f1c6bd8fdae63891e))
16
+ - new popoverContent feature for MenuButton, plus UserProfileMenuButton ([#2414](https://github.com/okta/odyssey/issues/2414)) ([5647ec9](https://github.com/okta/odyssey/commit/5647ec91826662195ed09eb81e0d05d3ce6057a1))
17
+
18
+ ### Bug Fixes
19
+
20
+ - bug in SideNav when sideNavItems comes delayed ([#2419](https://github.com/okta/odyssey/issues/2419)) ([bce2083](https://github.com/okta/odyssey/commit/bce20836db6763b013178a9c4d8784cec6eb5e93))
21
+ - the UiShell should not have gray background or padding in app area ([#2428](https://github.com/okta/odyssey/issues/2428)) ([973e0f5](https://github.com/okta/odyssey/commit/973e0f53c64fc7f21c03f2776871b26338a0676c))
22
+
6
23
  ## [1.27.1](https://github.com/okta/odyssey/compare/v1.27.0...v1.27.1) (2024-11-18)
7
24
 
8
25
  ### Bug Fixes
@@ -11,14 +11,14 @@ import _Button from "@mui/material/Button";
11
11
  * See the License for the specific language governing permissions and limitations under the License.
12
12
  */
13
13
  import { memo, useCallback, useImperativeHandle, useMemo, useRef } from "react";
14
- import { useButton } from "./ButtonContext.js";
15
- import { MuiPropsContext, useMuiProps } from "./MuiPropsContext.js";
16
- import { Tooltip } from "./Tooltip.js";
14
+ import { useButton } from "../Buttons/index.js";
15
+ import { MuiPropsContext, useMuiProps } from "../MuiPropsContext.js";
16
+ import { Tooltip } from "../Tooltip.js";
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
18
  export const buttonSizeValues = ["small", "medium", "large"];
19
19
  export const buttonTypeValues = ["button", "submit", "reset"];
20
20
  export const buttonVariantValues = ["primary", "secondary", "danger", "dangerSecondary", "floating", "floatingAction"];
21
- const Button = ({
21
+ const BaseButton = ({
22
22
  ariaControls,
23
23
  ariaDescribedBy,
24
24
  ariaExpanded,
@@ -32,6 +32,7 @@ const Button = ({
32
32
  isDisabled,
33
33
  isFullWidth: isFullWidthProp,
34
34
  label = "",
35
+ children,
35
36
  onClick,
36
37
  size = "medium",
37
38
  startIcon,
@@ -80,9 +81,9 @@ const Button = ({
80
81
  translate: translate,
81
82
  type: type,
82
83
  variant: variant,
83
- children: label
84
+ children: children ?? label
84
85
  });
85
- }, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, endIcon, href, id, isDisabled, isFullWidth, label, onClick, size, startIcon, tabIndex, testId, translate, type, variant]);
86
+ }, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, endIcon, href, id, isDisabled, isFullWidth, label, children, onClick, size, startIcon, tabIndex, testId, translate, type, variant]);
86
87
  if (tooltipText) {
87
88
  return _jsx(Tooltip, {
88
89
  ariaType: "description",
@@ -95,7 +96,7 @@ const Button = ({
95
96
  }
96
97
  return renderButton(muiProps);
97
98
  };
98
- const MemoizedButton = memo(Button);
99
- MemoizedButton.displayName = "Button";
100
- export { MemoizedButton as Button };
101
- //# sourceMappingURL=Button.js.map
99
+ const MemoizedBaseButton = memo(BaseButton);
100
+ MemoizedBaseButton.displayName = "BaseButton";
101
+ export { MemoizedBaseButton as BaseButton };
102
+ //# sourceMappingURL=BaseButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseButton.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","useButton","MuiPropsContext","useMuiProps","Tooltip","jsx","_jsx","buttonSizeValues","buttonTypeValues","buttonVariantValues","BaseButton","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","endIcon","href","id","isDisabled","isFullWidth","isFullWidthProp","label","children","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","localButtonRef","buttonContext","focus","current","renderButton","_Button","disabled","fullWidth","ref","element","ariaType","placement","text","Consumer","MemoizedBaseButton","displayName"],"sources":["../../src/Buttons/BaseButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Button as MuiButton } from \"@mui/material\";\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport { useButton } from \"../Buttons\";\nimport type { HtmlProps } from \"../HtmlProps\";\nimport { FocusHandle } from \"../inputUtils\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"../MuiPropsContext\";\nimport { Tooltip } from \"../Tooltip\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type BaseButtonProps = {\n /**\n * The ref forwarded to the Button\n */\n buttonRef?: React.RefObject<FocusHandle>;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * Determines whether the Button is disabled\n */\n isDisabled?: boolean;\n /**\n * Determines whether the Button should take up the full available width\n */\n isFullWidth?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The type of the HTML button element\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * The variant of the Button\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The contents of the button. Only available internal to Odyssey here in BaseButton. If set, label is ignored.\n */\n children?: ReactNode;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The text content of the Button\n */\n label?: string;\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. Button) will\n// want to omit children, which they cannot do from the combined union type. Instead, they should\n// omit from BaseButtonProps, then union with the AdditionalBaseButtonProps (as seen in Button)\nexport type AdditionalBaseButtonProps = Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n>;\n\nconst BaseButton = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n label = \"\",\n children,\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: BaseButtonProps & AdditionalBaseButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to\n // \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n disabled={isDisabled}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={onClick}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {children ?? label}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth,\n label,\n children,\n onClick,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedBaseButton = memo(BaseButton);\nMemoizedBaseButton.displayName = \"BaseButton\";\n\nexport { MemoizedBaseButton as BaseButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAEEA,IAAI,EAGJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAAC,SAENC,SAAS;AAAA,SAIhBC,eAAe,EAEfC,WAAW;AAAA,SAEJC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEhB,OAAO,MAAMC,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AACrE,OAAO,MAAMC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAU;AACtE,OAAO,MAAMC,mBAAmB,GAAG,CACjC,SAAS,EACT,WAAW,EACX,QAAQ,EACR,i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AAU"}
@@ -1,3 +1,4 @@
1
+ import _Popover from "@mui/material/Popover";
1
2
  import _Menu from "@mui/material/Menu";
2
3
  /*!
3
4
  * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
@@ -12,30 +13,36 @@ import _Menu from "@mui/material/Menu";
12
13
  */
13
14
 
14
15
  import { memo, useCallback, useMemo, useState } from "react";
15
- import { Button, useUniqueId } from "./index.js";
16
- import { ChevronDownIcon, MoreIcon } from "./icons.generated/index.js";
16
+ import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
17
+ import { Box, useUniqueId } from "../index.js";
18
+ import { BaseButton } from "./BaseButton.js";
19
+ import { ChevronDownIcon, MoreIcon } from "../icons.generated/index.js";
17
20
  import { MenuContext } from "./MenuContext.js";
18
21
  import { jsx as _jsx } from "react/jsx-runtime";
19
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
23
  export const menuAlignmentValues = ["left", "right"];
21
- const MenuButton = ({
24
+ const BaseMenuButton = ({
22
25
  ariaLabel,
23
26
  ariaLabelledBy,
24
27
  ariaDescribedBy,
28
+ buttonChildren,
25
29
  buttonLabel = "",
26
30
  buttonVariant = "secondary",
27
31
  children,
32
+ popoverContent,
28
33
  shouldCloseOnSelect = true,
29
34
  endIcon: endIconProp,
30
35
  id: idOverride,
31
36
  isDisabled,
32
37
  isOverflow,
33
38
  menuAlignment = "left",
39
+ omitEndIcon = false,
34
40
  size,
35
41
  testId,
36
42
  tooltipText,
37
43
  translate
38
44
  }) => {
45
+ const odysseyDesignTokens = useOdysseyDesignTokens();
39
46
  const [anchorEl, setAnchorEl] = useState(null);
40
47
  const isOpen = Boolean(anchorEl);
41
48
  const closeMenu = useCallback(() => {
@@ -53,7 +60,7 @@ const MenuButton = ({
53
60
  openMenu,
54
61
  shouldCloseOnSelect
55
62
  }), [closeMenu, openMenu, shouldCloseOnSelect]);
56
- const endIcon = endIconProp ? endIconProp : isOverflow ? _jsx(MoreIcon, {}) : _jsx(ChevronDownIcon, {});
63
+ const endIcon = omitEndIcon ? undefined : endIconProp ? endIconProp : isOverflow ? _jsx(MoreIcon, {}) : _jsx(ChevronDownIcon, {});
57
64
  const anchorOrigin = useMemo(() => ({
58
65
  horizontal: menuAlignment,
59
66
  vertical: "bottom"
@@ -63,7 +70,7 @@ const MenuButton = ({
63
70
  vertical: "top"
64
71
  }), [menuAlignment]);
65
72
  return _jsxs("div", {
66
- children: [_jsx(Button, {
73
+ children: [_jsx(BaseButton, {
67
74
  ariaControls: isOpen ? `${uniqueId}-menu` : undefined,
68
75
  ariaExpanded: isOpen ? "true" : undefined,
69
76
  ariaHasPopup: "true",
@@ -75,12 +82,13 @@ const MenuButton = ({
75
82
  id: `${uniqueId}-button`,
76
83
  isDisabled: isDisabled,
77
84
  label: buttonLabel,
85
+ children: buttonChildren,
78
86
  onClick: openMenu,
79
87
  size: size,
80
88
  tooltipText: tooltipText,
81
89
  translate: translate,
82
90
  variant: buttonVariant
83
- }), _jsx(_Menu, {
91
+ }), children && _jsx(_Menu, {
84
92
  anchorOrigin: anchorOrigin,
85
93
  transformOrigin: transformOrigin,
86
94
  anchorEl: anchorEl,
@@ -92,10 +100,22 @@ const MenuButton = ({
92
100
  value: providerValue,
93
101
  children: children
94
102
  })
103
+ }), popoverContent && _jsx(_Popover, {
104
+ open: isOpen,
105
+ anchorEl: anchorEl,
106
+ onClose: closeMenu,
107
+ anchorOrigin: anchorOrigin,
108
+ transformOrigin: transformOrigin,
109
+ children: _jsx(Box, {
110
+ sx: {
111
+ padding: odysseyDesignTokens.Spacing4
112
+ },
113
+ children: popoverContent
114
+ })
95
115
  })]
96
116
  });
97
117
  };
98
- const MemoizedMenuButton = memo(MenuButton);
99
- MemoizedMenuButton.displayName = "MenuButton";
100
- export { MemoizedMenuButton as MenuButton };
101
- //# sourceMappingURL=MenuButton.js.map
118
+ const MemoizedBaseMenuButton = memo(BaseMenuButton);
119
+ MemoizedBaseMenuButton.displayName = "BaseMenuButton";
120
+ export { MemoizedBaseMenuButton as BaseMenuButton };
121
+ //# sourceMappingURL=BaseMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseMenuButton.js","names":["memo","useCallback","useMemo","useState","useOdysseyDesignTokens","Box","useUniqueId","BaseButton","ChevronDownIcon","MoreIcon","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","BaseMenuButton","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonChildren","buttonLabel","buttonVariant","children","popoverContent","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isDisabled","isOverflow","menuAlignment","omitEndIcon","size","testId","tooltipText","translate","odysseyDesignTokens","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","undefined","anchorOrigin","horizontal","vertical","transformOrigin","ariaControls","ariaExpanded","ariaHasPopup","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","_Popover","sx","padding","Spacing4","MemoizedBaseMenuButton","displayName"],"sources":["../../src/Buttons/BaseMenuButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n memo,\n type ReactElement,\n useCallback,\n useMemo,\n useState,\n ReactNode,\n} from \"react\";\nimport {\n Menu as MuiMenu,\n Popover as MuiPopover,\n PopoverOrigin,\n} from \"@mui/material\";\n\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext\";\nimport { Box, buttonSizeValues, buttonVariantValues, useUniqueId } from \"..\";\nimport { BaseButton } from \"./BaseButton\";\nimport { ChevronDownIcon, MoreIcon } from \"../icons.generated\";\nimport { FieldComponentProps } from \"../FieldComponentProps\";\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"../NullElement\";\nimport type { HtmlProps } from \"../HtmlProps\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\n\nexport type BaseMenuButtonProps = {\n /**\n * The button children for the triggering Button. Only available internal to Odyssey here in BaseMenuButton. If set, buttonLabel is ignored.\n */\n buttonChildren?: ReactNode;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * Whether to omit the endIcon if not set (rather than use a default value for it based on overflow)\n */\n omitEndIcon?: boolean;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. MenuButton) will\n// want to omit buttonChildren, which they cannot do from the combined union type. Instead, they should\n// omit from BaseMenuButtonProps, then union with the AdditionalBaseMenuButtonProps (as seen in MenuButton)\nexport type AdditionalBaseMenuButtonProps = Pick<\n HtmlProps,\n \"ariaDescribedBy\" | \"ariaLabel\" | \"ariaLabelledBy\" | \"testId\" | \"translate\"\n> &\n Pick<FieldComponentProps, \"isDisabled\"> &\n (\n | { buttonLabel: string }\n | (Required<Pick<HtmlProps, \"ariaLabelledBy\">> &\n Partial<Pick<HtmlProps, \"ariaLabel\">> & {\n buttonLabel?: undefined | \"\";\n })\n | (Required<Pick<HtmlProps, \"ariaLabel\">> &\n Partial<Pick<HtmlProps, \"ariaLabelledBy\">> & {\n buttonLabel?: undefined | \"\";\n })\n ) &\n (\n | {\n /**\n * The <MenuItem> components within the Menu.\n */\n children: ReactNode | NullElement;\n /**\n * popoverConten is disallowed if children are present\n */\n popoverContent?: never;\n }\n | {\n /**\n * children is disallowed if popoverContent is present\n */\n children?: never;\n /**\n * The content for the popover that is triggered on click.\n */\n popoverContent: ReactNode | NullElement;\n }\n );\n\nconst BaseMenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonChildren,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n popoverContent,\n shouldCloseOnSelect = true,\n endIcon: endIconProp,\n id: idOverride,\n isDisabled,\n isOverflow,\n menuAlignment = \"left\",\n omitEndIcon = false,\n size,\n testId,\n tooltipText,\n translate,\n}: BaseMenuButtonProps & AdditionalBaseMenuButtonProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId],\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect],\n );\n\n const endIcon = omitEndIcon ? undefined : endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n return (\n <div>\n <BaseButton\n ariaControls={isOpen ? `${uniqueId}-menu` : undefined}\n ariaExpanded={isOpen ? \"true\" : undefined}\n ariaHasPopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n testId={testId}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n isDisabled={isDisabled}\n label={buttonLabel}\n children={buttonChildren}\n onClick={openMenu}\n size={size}\n tooltipText={tooltipText}\n translate={translate}\n variant={buttonVariant}\n />\n\n {children && (\n <MuiMenu\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n )}\n\n {popoverContent && (\n <MuiPopover\n open={isOpen}\n anchorEl={anchorEl}\n onClose={closeMenu}\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n >\n <Box\n sx={{\n padding: odysseyDesignTokens.Spacing4,\n }}\n >\n {popoverContent}\n </Box>\n </MuiPopover>\n )}\n </div>\n );\n};\n\nconst MemoizedBaseMenuButton = memo(BaseMenuButton);\nMemoizedBaseMenuButton.displayName = \"BaseMenuButton\";\n\nexport { MemoizedBaseMenuButton as BaseMenuButton };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,IAAI,EAEJC,WAAW,EACXC,OAAO,EACPC,QAAQ,QAEH,OAAO;AAAC,SAONC,sBAAsB;AAAA,SACtBC,GAAG,EAAyCC,WAAW;AAAA,SACvDC,UAAU;AAAA,SACVC,eAAe,EAAEC,QAAQ;AAAA,SAEzBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,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Aa,EAAEd,aAAc;MAC7Be,OAAO,EAAEpB,SAAU;MACnBqB,IAAI,EAAEvB,MAAO;MAAAlB,QAAA,EAEbX,IAAA,CAACF,WAAW,CAACuD,QAAQ;QAACC,KAAK,EAAEjB,aAAc;QAAA1B,QAAA,EACxCA;MAAQ,CACW;IAAC,CAChB,CACV,EAEAC,cAAc,IACbZ,IAAA,CAAAuD,QAAA;MACEH,IAAI,EAAEvB,MAAO;MACbF,QAAQ,EAAEA,QAAS;MACnBwB,OAAO,EAAEpB,SAAU;MACnBQ,YAAY,EAAEA,YAAa;MAC3BG,eAAe,EAAEA,eAAgB;MAAA/B,QAAA,EAEjCX,IAAA,CAACP,GAAG;QACF+D,EAAE,EAAE;UACFC,OAAO,EAAE/B,mBAAmB,CAACgC;QAC/B,CAAE;QAAA/C,QAAA,EAEDC;MAAc,CACZ;IAAC,CACI,CACb;EAAA,CACE,CAAC;AAEV,CAAC;AAED,MAAM+C,sBAAsB,GAAGvE,IAAI,CAACgB,cAAc,CAAC;AACnDuD,sBAAsB,CAACC,WAAW,GAAG,gBAAgB;AAErD,SAASD,sBAAsB,IAAIvD,cAAc"}
@@ -0,0 +1,24 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { memo } from "react";
14
+ import { BaseButton } from "./BaseButton.js";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ const Button = props => {
17
+ return _jsx(BaseButton, {
18
+ ...props
19
+ });
20
+ };
21
+ const MemoizedButton = memo(Button);
22
+ MemoizedButton.displayName = "Button";
23
+ export { MemoizedButton as Button };
24
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","names":["memo","BaseButton","jsx","_jsx","Button","props","MemoizedButton","displayName"],"sources":["../../src/Buttons/Button.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\nimport {\n AdditionalBaseButtonProps,\n BaseButton,\n BaseButtonProps,\n} from \"./BaseButton\";\n\nexport type ButtonProps = Omit<BaseButtonProps, \"children\"> &\n AdditionalBaseButtonProps;\n\nconst Button = (props: ButtonProps) => {\n return <BaseButton {...props} />;\n};\n\nconst MemoizedButton = memo(Button);\nMemoizedButton.displayName = \"Button\";\n\nexport { MemoizedButton as Button };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAG3BC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOZ,MAAMC,MAAM,GAAIC,KAAkB,IAAK;EACrC,OAAOF,IAAA,CAACF,UAAU;IAAA,GAAKI;EAAK,CAAG,CAAC;AAClC,CAAC;AAED,MAAMC,cAAc,GAAGN,IAAI,CAACI,MAAM,CAAC;AACnCE,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIF,MAAM"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonContext.js","names":["createContext","useContext","ButtonContext","isFullWidth","useButton"],"sources":["../../src/Buttons/ButtonContext.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { createContext, useContext } from \"react\";\n\nexport type ButtonContextValue = {\n isFullWidth: boolean;\n};\n\nexport const ButtonContext = createContext<ButtonContextValue>({\n isFullWidth: false,\n});\n\nexport const useButton = () => useContext(ButtonContext);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAMjD,OAAO,MAAMC,aAAa,GAAGF,aAAa,CAAqB;EAC7DG,WAAW,EAAE;AACf,CAAC,CAAC;AAEF,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAMH,UAAU,CAACC,aAAa,CAAC"}
@@ -0,0 +1,25 @@
1
+ /*!
2
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { memo } from "react";
14
+ import { BaseMenuButton } from "./BaseMenuButton.js";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ export const menuAlignmentValues = ["left", "right"];
17
+ const MenuButton = props => {
18
+ return _jsx(BaseMenuButton, {
19
+ ...props
20
+ });
21
+ };
22
+ const MemoizedMenuButton = memo(MenuButton);
23
+ MemoizedMenuButton.displayName = "MenuButton";
24
+ export { MemoizedMenuButton as MenuButton };
25
+ //# sourceMappingURL=MenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuButton.js","names":["memo","BaseMenuButton","jsx","_jsx","menuAlignmentValues","MenuButton","props","MemoizedMenuButton","displayName"],"sources":["../../src/Buttons/MenuButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\nimport {\n AdditionalBaseMenuButtonProps,\n BaseMenuButton,\n BaseMenuButtonProps,\n} from \"./BaseMenuButton\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\n\nexport type MenuButtonProps = Omit<\n BaseMenuButtonProps,\n \"buttonChildren\" | \"omitEndIcon\"\n> &\n AdditionalBaseMenuButtonProps;\n\nconst MenuButton = (props: MenuButtonProps) => {\n return <BaseMenuButton {...props} />;\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAG3BC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIhB,OAAO,MAAMC,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU;AAQ7D,MAAMC,UAAU,GAAIC,KAAsB,IAAK;EAC7C,OAAOH,IAAA,CAACF,cAAc;IAAA,GAAKK;EAAK,CAAG,CAAC;AACtC,CAAC;AAED,MAAMC,kBAAkB,GAAGP,IAAI,CAACK,UAAU,CAAC;AAC3CE,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIF,UAAU"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuContext.js","names":["createContext","MenuContext","closeMenu","openMenu","shouldCloseOnSelect"],"sources":["../../src/Buttons/MenuContext.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { MouseEventHandler, createContext } from \"react\";\n\nexport type MenuContextType = {\n closeMenu: () => void;\n openMenu: MouseEventHandler<HTMLElement>;\n shouldCloseOnSelect: boolean;\n};\n\nexport const MenuContext = createContext<MenuContextType>({\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n closeMenu: () => {},\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n openMenu: () => {},\n shouldCloseOnSelect: true,\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAA4BA,aAAa,QAAQ,OAAO;AAQxD,OAAO,MAAMC,WAAW,GAAGD,aAAa,CAAkB;EAExDE,SAAS,EAAEA,CAAA,KAAM,CAAC,CAAC;EAEnBC,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClBC,mBAAmB,EAAE;AACvB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","children","hasInitialFocus","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","shouldCloseOnSelect","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","tabIndex","MemoizedMenuItem","displayName"],"sources":["../../src/Buttons/MenuItem.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, useCallback, useContext, type ReactNode } from \"react\";\n\nimport { MenuContext } from \"./MenuContext\";\nimport type { HtmlProps } from \"../HtmlProps\";\n\nexport type MenuItemProps = {\n /**\n * The content of the menu item.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item will be visually marked as selected.\n */\n isSelected?: boolean;\n /**\n * If `true`, the menu item will be visually marked as disabled.\n */\n isDisabled?: boolean;\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * The variant of the menu item.\n * - \"default\": The default variant.\n * - \"destructive\": A variant indicating a destructive action.\n */\n variant?: \"default\" | \"destructive\";\n} & Pick<HtmlProps, \"testId\">;\n\nconst MenuItem = ({\n children,\n hasInitialFocus,\n isSelected,\n isDisabled,\n onClick: onClickProp,\n testId,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu, shouldCloseOnSelect } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n if (shouldCloseOnSelect) {\n closeMenu();\n }\n },\n [onClickProp, closeMenu, shouldCloseOnSelect],\n );\n\n return (\n <MuiMenuItem\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n data-se={testId}\n disabled={isDisabled}\n onClick={onClick}\n selected={isSelected}\n value={value}\n tabIndex={0}\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAE7DC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoCpB,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,QAAQ;EACRC,eAAe;EACfC,UAAU;EACVC,UAAU;EACVC,OAAO,EAAEC,WAAW;EACpBC,MAAM;EACNC,KAAK;EACLC,OAAO,GAAG;AACG,CAAC,KAAK;EACnB,MAAM;IAAEC,SAAS;IAAEC;EAAoB,CAAC,GAAGf,UAAU,CAACC,WAAW,CAAC;EAElE,MAAMQ,OAAO,GAAGV,WAAW,CACxBiB,KAAK,IAAK;IACTN,WAAW,GAAGM,KAAK,CAAC;IACpB,IAAID,mBAAmB,EAAE;MACvBD,SAAS,CAAC,CAAC;IACb;EACF,CAAC,EACD,CAACJ,WAAW,EAAEI,SAAS,EAAEC,mBAAmB,CAC9C,CAAC;EAED,OACEZ,IAAA,CAAAc,SAAA;IAEEC,SAAS,EAAEZ,eAAgB;IAC3Ba,SAAS,EACPN,OAAO,KAAK,aAAa,GACpB,GAAEhB,eAAe,CAACuB,IAAK,cAAa,GACrCC,SACL;IACD,WAASV,MAAO;IAChBW,QAAQ,EAAEd,UAAW;IACrBC,OAAO,EAAEA,OAAQ;IACjBc,QAAQ,EAAEhB,UAAW;IACrBK,KAAK,EAAEA,KAAM;IACbY,QAAQ,EAAE,CAAE;IAAAnB,QAAA,EAEXA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMoB,gBAAgB,GAAG3B,IAAI,CAACM,QAAQ,CAAC;AACvCqB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIrB,QAAQ"}
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+ export { buttonSizeValues, buttonTypeValues, buttonVariantValues } from "./BaseButton.js";
13
+ export * from "./Button.js";
14
+ export * from "./ButtonContext.js";
15
+ export { menuAlignmentValues } from "./BaseMenuButton.js";
16
+ export * from "./MenuButton.js";
17
+ export * from "./MenuItem.js";
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["buttonSizeValues","buttonTypeValues","buttonVariantValues","menuAlignmentValues"],"sources":["../../src/Buttons/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport {\n buttonSizeValues,\n buttonTypeValues,\n buttonVariantValues,\n} from \"./BaseButton\";\nexport * from \"./Button\";\nexport * from \"./ButtonContext\";\nexport { menuAlignmentValues } from \"./BaseMenuButton\";\nexport * from \"./MenuButton\";\nexport * from \"./MenuItem\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaEA,gBAAgB,EAChBC,gBAAgB,EAChBC,mBAAmB;AAAA;AAAA;AAAA,SAIZC,mBAAmB;AAAA;AAAA"}
package/dist/Card.js CHANGED
@@ -15,9 +15,8 @@ import _CardActions from "@mui/material/CardActions";
15
15
 
16
16
  import { memo, useMemo, useEffect } from "react";
17
17
  import styled from "@emotion/styled";
18
- import { ButtonContext } from "./ButtonContext.js";
18
+ import { ButtonContext, MenuButton } from "./Buttons/index.js";
19
19
  import { MoreIcon } from "./icons.generated/index.js";
20
- import { MenuButton } from "./MenuButton.js";
21
20
  import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext.js";
22
21
  import { Heading5, Paragraph, Support } from "./Typography.js";
23
22
  import { Box } from "./Box.js";
package/dist/Card.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","names":["memo","useMemo","useEffect","styled","ButtonContext","MoreIcon","MenuButton","useOdysseyDesignTokens","Heading5","Paragraph","Support","Box","jsx","_jsx","jsxs","_jsxs","CARD_IMAGE_HEIGHT","ImageContainer","shouldForwardProp","prop","odysseyDesignTokens","hasMenuButtonChildren","display","alignItems","maxHeight","height","marginBlockEnd","Spacing5","paddingRight","MenuButtonContainer","position","right","Spacing3","top","CardContentContainer","buttonProviderValue","isFullWidth","Card","button","description","image","menuButtonChildren","onClick","overline","title","cardContent","children","Boolean","component","color","_CardActions","Provider","value","_Card","className","_CardActionArea","endIcon","ariaLabel","buttonVariant","menuAlignment","size","tooltipText","MemoizedCard","displayName","Tile","props","console","warn","MemoizedTile"],"sources":["../src/Card.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MouseEventHandler,\n ReactElement,\n memo,\n useMemo,\n useEffect,\n} from \"react\";\nimport {\n Card as MuiCard,\n CardActions as MuiCardActions,\n CardActionArea as MuiCardActionArea,\n} from \"@mui/material\";\nimport styled from \"@emotion/styled\";\n\nimport { Button } from \"./Button\";\nimport { ButtonContext } from \"./ButtonContext\";\nimport { MoreIcon } from \"./icons.generated\";\nimport { MenuButton, MenuButtonProps } from \"./MenuButton\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { Heading5, Paragraph, Support } from \"./Typography\";\nimport { Box } from \"./Box\";\n\nexport const CARD_IMAGE_HEIGHT = \"64px\";\n\nexport type CardProps = {\n description?: string;\n image?: ReactElement;\n overline?: string;\n title?: string;\n} & (\n | {\n onClick: MouseEventHandler;\n button?: never;\n menuButtonChildren?: never;\n }\n | {\n onClick?: never;\n button?: ReactElement<typeof Button>;\n menuButtonChildren?: MenuButtonProps[\"children\"];\n }\n);\n\nconst ImageContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasMenuButtonChildren\",\n})<{\n odysseyDesignTokens: DesignTokens;\n hasMenuButtonChildren: boolean;\n}>(({ odysseyDesignTokens, hasMenuButtonChildren }) => ({\n display: \"flex\",\n alignItems: \"flex-start\",\n maxHeight: CARD_IMAGE_HEIGHT,\n height: CARD_IMAGE_HEIGHT,\n marginBlockEnd: odysseyDesignTokens.Spacing5,\n paddingRight: hasMenuButtonChildren ? odysseyDesignTokens.Spacing5 : 0,\n}));\n\nconst MenuButtonContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n position: \"absolute\",\n right: odysseyDesignTokens.Spacing3,\n top: odysseyDesignTokens.Spacing3,\n}));\n\nconst CardContentContainer = styled(\"div\")(() => ({\n display: \"flex\",\n}));\n\nconst buttonProviderValue = { isFullWidth: true };\n\nconst Card = ({\n button,\n description,\n image,\n menuButtonChildren,\n onClick,\n overline,\n title,\n}: CardProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const cardContent = useMemo(\n () => (\n <CardContentContainer>\n <Box>\n {image && (\n <ImageContainer\n odysseyDesignTokens={odysseyDesignTokens}\n hasMenuButtonChildren={Boolean(menuButtonChildren)}\n >\n {image}\n </ImageContainer>\n )}\n\n {overline && <Support component=\"div\">{overline}</Support>}\n {title && <Heading5 component=\"div\">{title}</Heading5>}\n {description && (\n <Paragraph color=\"textSecondary\">{description}</Paragraph>\n )}\n\n {button && (\n <MuiCardActions>\n <ButtonContext.Provider value={buttonProviderValue}>\n {button}\n </ButtonContext.Provider>\n </MuiCardActions>\n )}\n </Box>\n </CardContentContainer>\n ),\n [\n button,\n description,\n image,\n menuButtonChildren,\n overline,\n title,\n odysseyDesignTokens,\n ],\n );\n\n return (\n <MuiCard className={onClick ? \"isClickable\" : \"\"}>\n {onClick ? (\n <MuiCardActionArea onClick={onClick}>{cardContent}</MuiCardActionArea>\n ) : (\n cardContent\n )}\n\n {menuButtonChildren && (\n <MenuButtonContainer odysseyDesignTokens={odysseyDesignTokens}>\n <MenuButton\n endIcon={<MoreIcon />}\n ariaLabel=\"Card menu\"\n buttonVariant=\"floating\"\n menuAlignment=\"right\"\n size=\"small\"\n tooltipText=\"Actions\"\n >\n {menuButtonChildren}\n </MenuButton>\n </MenuButtonContainer>\n )}\n </MuiCard>\n );\n};\n\nconst MemoizedCard = memo(Card);\nMemoizedCard.displayName = \"Card\";\n\n/**\n * @deprecated The 'Tile' component is now called 'Card'. Please update your references as 'Tile' will be deprecated soon.\n */\nconst Tile = (props: CardProps) => {\n useEffect(() => {\n console.warn(\n \"Warning: The 'Tile' component is now called 'Card'. Please update your references as 'Tile' will be deprecated soon.\",\n );\n }, []);\n\n return <MemoizedCard {...props} />;\n};\n\nconst MemoizedTile = memo(Tile);\nMemoizedTile.displayName = \"Tile\";\n\nexport { MemoizedCard as Card, MemoizedTile as Tile };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,IAAI,EACJC,OAAO,EACPC,SAAS,QACJ,OAAO;AAMd,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAG5BC,aAAa;AAAA,SACbC,QAAQ;AAAA,SACRC,UAAU;AAAA,SAGjBC,sBAAsB;AAAA,SAEfC,QAAQ,EAAEC,SAAS,EAAEC,OAAO;AAAA,SAC5BC,GAAG;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEZ,OAAO,MAAMC,iBAAiB,GAAG,MAAM;AAoBvC,MAAMC,cAAc,GAAGd,MAAM,CAAC,KAAK,EAAE;EACnCe,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAAIA,IAAI,KAAK;AAC/C,CAAC,CAAC,CAGC,CAAC;EAAEC,mBAAmB;EAAEC;AAAsB,CAAC,MAAM;EACtDC,OAAO,EAAE,MAAM;EACfC,UA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IC,KAAgB,IAAK;EACjC/D,SAAS,CAAC,MAAM;IACdgE,OAAO,CAACC,IAAI,CACV,sHACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOtD,IAAA,CAACiD,YAAY;IAAA,GAAKG;EAAK,CAAG,CAAC;AACpC,CAAC;AAED,MAAMG,YAAY,GAAGpE,IAAI,CAACgE,IAAI,CAAC;AAC/BI,YAAY,CAACL,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIzB,IAAI,EAAE+B,YAAY,IAAIJ,IAAI"}
1
+ {"version":3,"file":"Card.js","names":["memo","useMemo","useEffect","styled","ButtonContext","MenuButton","MoreIcon","useOdysseyDesignTokens","Heading5","Paragraph","Support","Box","jsx","_jsx","jsxs","_jsxs","CARD_IMAGE_HEIGHT","ImageContainer","shouldForwardProp","prop","odysseyDesignTokens","hasMenuButtonChildren","display","alignItems","maxHeight","height","marginBlockEnd","Spacing5","paddingRight","MenuButtonContainer","position","right","Spacing3","top","CardContentContainer","buttonProviderValue","isFullWidth","Card","button","description","image","menuButtonChildren","onClick","overline","title","cardContent","children","Boolean","component","color","_CardActions","Provider","value","_Card","className","_CardActionArea","endIcon","ariaLabel","buttonVariant","menuAlignment","size","tooltipText","MemoizedCard","displayName","Tile","props","console","warn","MemoizedTile"],"sources":["../src/Card.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MouseEventHandler,\n ReactElement,\n memo,\n useMemo,\n useEffect,\n} from \"react\";\nimport {\n Card as MuiCard,\n CardActions as MuiCardActions,\n CardActionArea as MuiCardActionArea,\n} from \"@mui/material\";\nimport styled from \"@emotion/styled\";\n\nimport { Button, ButtonContext, MenuButton, MenuButtonProps } from \"./Buttons\";\nimport { MoreIcon } from \"./icons.generated\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { Heading5, Paragraph, Support } from \"./Typography\";\nimport { Box } from \"./Box\";\n\nexport const CARD_IMAGE_HEIGHT = \"64px\";\n\nexport type CardProps = {\n description?: string;\n image?: ReactElement;\n overline?: string;\n title?: string;\n} & (\n | {\n onClick: MouseEventHandler;\n button?: never;\n menuButtonChildren?: never;\n }\n | {\n onClick?: never;\n button?: ReactElement<typeof Button>;\n menuButtonChildren?: MenuButtonProps[\"children\"];\n }\n);\n\nconst ImageContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasMenuButtonChildren\",\n})<{\n odysseyDesignTokens: DesignTokens;\n hasMenuButtonChildren: boolean;\n}>(({ odysseyDesignTokens, hasMenuButtonChildren }) => ({\n display: \"flex\",\n alignItems: \"flex-start\",\n maxHeight: CARD_IMAGE_HEIGHT,\n height: CARD_IMAGE_HEIGHT,\n marginBlockEnd: odysseyDesignTokens.Spacing5,\n paddingRight: hasMenuButtonChildren ? odysseyDesignTokens.Spacing5 : 0,\n}));\n\nconst MenuButtonContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n position: \"absolute\",\n right: odysseyDesignTokens.Spacing3,\n top: odysseyDesignTokens.Spacing3,\n}));\n\nconst CardContentContainer = styled(\"div\")(() => ({\n display: \"flex\",\n}));\n\nconst buttonProviderValue = { isFullWidth: true };\n\nconst Card = ({\n button,\n description,\n image,\n menuButtonChildren,\n onClick,\n overline,\n title,\n}: CardProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const cardContent = useMemo(\n () => (\n <CardContentContainer>\n <Box>\n {image && (\n <ImageContainer\n odysseyDesignTokens={odysseyDesignTokens}\n hasMenuButtonChildren={Boolean(menuButtonChildren)}\n >\n {image}\n </ImageContainer>\n )}\n\n {overline && <Support component=\"div\">{overline}</Support>}\n {title && <Heading5 component=\"div\">{title}</Heading5>}\n {description && (\n <Paragraph color=\"textSecondary\">{description}</Paragraph>\n )}\n\n {button && (\n <MuiCardActions>\n <ButtonContext.Provider value={buttonProviderValue}>\n {button}\n </ButtonContext.Provider>\n </MuiCardActions>\n )}\n </Box>\n </CardContentContainer>\n ),\n [\n button,\n description,\n image,\n menuButtonChildren,\n overline,\n title,\n odysseyDesignTokens,\n ],\n );\n\n return (\n <MuiCard className={onClick ? \"isClickable\" : \"\"}>\n {onClick ? (\n <MuiCardActionArea onClick={onClick}>{cardContent}</MuiCardActionArea>\n ) : (\n cardContent\n )}\n\n {menuButtonChildren && (\n <MenuButtonContainer odysseyDesignTokens={odysseyDesignTokens}>\n <MenuButton\n endIcon={<MoreIcon />}\n ariaLabel=\"Card menu\"\n buttonVariant=\"floating\"\n menuAlignment=\"right\"\n size=\"small\"\n tooltipText=\"Actions\"\n >\n {menuButtonChildren}\n </MenuButton>\n </MenuButtonContainer>\n )}\n </MuiCard>\n );\n};\n\nconst MemoizedCard = memo(Card);\nMemoizedCard.displayName = \"Card\";\n\n/**\n * @deprecated The 'Tile' component is now called 'Card'. Please update your references as 'Tile' will be deprecated soon.\n */\nconst Tile = (props: CardProps) => {\n useEffect(() => {\n console.warn(\n \"Warning: The 'Tile' component is now called 'Card'. Please update your references as 'Tile' will be deprecated soon.\",\n );\n }, []);\n\n return <MemoizedCard {...props} />;\n};\n\nconst MemoizedTile = memo(Tile);\nMemoizedTile.displayName = \"Tile\";\n\nexport { MemoizedCard as Card, MemoizedTile as Tile };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,IAAI,E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OAAQ;MAAAI,QAAA,EAAED;IAAW,CAAoB,CAAC,GAEtEA,WACD,EAEAJ,kBAAkB,IACjB5B,IAAA,CAACgB,mBAAmB;MAACT,mBAAmB,EAAEA,mBAAoB;MAAA0B,QAAA,EAC5DjC,IAAA,CAACR,UAAU;QACTmD,OAAO,EAAE3C,IAAA,CAACP,QAAQ,IAAE,CAAE;QACtBmD,SAAS,EAAC,WAAW;QACrBC,aAAa,EAAC,UAAU;QACxBC,aAAa,EAAC,OAAO;QACrBC,IAAI,EAAC,OAAO;QACZC,WAAW,EAAC,SAAS;QAAAf,QAAA,EAEpBL;MAAkB,CACT;IAAC,CACM,CACtB;EAAA,CACM,CAAC;AAEd,CAAC;AAED,MAAMqB,YAAY,GAAG9D,IAAI,CAACqC,IAAI,CAAC;AAC/ByB,YAAY,CAACC,WAAW,GAAG,MAAM;AAKjC,MAAMC,IAAI,GAAIC,KAAgB,IAAK;EACjC/D,SAAS,CAAC,MAAM;IACdgE,OAAO,CAACC,IAAI,CACV,sHACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOtD,IAAA,CAACiD,YAAY;IAAA,GAAKG;EAAK,CAAG,CAAC;AACpC,CAAC;AAED,MAAMG,YAAY,GAAGpE,IAAI,CAACgE,IAAI,CAAC;AAC/BI,YAAY,CAACL,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIzB,IAAI,EAAE+B,YAAY,IAAIJ,IAAI"}
@@ -20,13 +20,12 @@ import { DataFilters } from "../labs/DataFilters.js";
20
20
  import { DataTableRowActions } from "./DataTableRowActions.js";
21
21
  import { useRowReordering } from "./useRowReordering.js";
22
22
  import { DataTableSettings } from "./DataTableSettings.js";
23
- import { MenuButton } from "../MenuButton.js";
24
23
  import { Box } from "../Box.js";
25
24
  import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
26
25
  import { useScrollIndication } from "./useScrollIndication.js";
27
26
  import styled from "@emotion/styled";
28
27
  import { EmptyState } from "../EmptyState.js";
29
- import { Button } from "../Button.js";
28
+ import { Button, MenuButton } from "../Buttons/index.js";
30
29
  import { Callout } from "../Callout.js";
31
30
  import { jsx as _jsx } from "react/jsx-runtime";
32
31
  import { jsxs as _jsxs } from "react/jsx-runtime";