@hitachivantara/uikit-react-core 3.62.7 → 3.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/AppSwitcher/Action/Action.d.ts +75 -0
  3. package/dist/AppSwitcher/Action/Action.js +304 -0
  4. package/dist/AppSwitcher/Action/Action.js.map +1 -0
  5. package/dist/AppSwitcher/Action/index.d.ts +2 -0
  6. package/dist/AppSwitcher/Action/index.js +14 -0
  7. package/dist/AppSwitcher/Action/index.js.map +1 -0
  8. package/dist/AppSwitcher/Action/styles.js +60 -0
  9. package/dist/AppSwitcher/Action/styles.js.map +1 -0
  10. package/dist/AppSwitcher/AppSwitcher.d.ts +67 -0
  11. package/dist/AppSwitcher/AppSwitcher.js +282 -0
  12. package/dist/AppSwitcher/AppSwitcher.js.map +1 -0
  13. package/dist/AppSwitcher/TitleWithTooltip.js +76 -0
  14. package/dist/AppSwitcher/TitleWithTooltip.js.map +1 -0
  15. package/dist/AppSwitcher/index.d.ts +5 -0
  16. package/dist/AppSwitcher/index.js +24 -0
  17. package/dist/AppSwitcher/index.js.map +1 -0
  18. package/dist/AppSwitcher/styles.js +95 -0
  19. package/dist/AppSwitcher/styles.js.map +1 -0
  20. package/dist/Chart/chartPlotlyOverrides.js +2 -2
  21. package/dist/Chart/chartPlotlyOverrides.js.map +1 -1
  22. package/dist/index.d.ts +3 -0
  23. package/dist/index.js +9 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/legacy/AppSwitcher/Action/Action.d.ts +75 -0
  26. package/dist/legacy/AppSwitcher/Action/Action.js +259 -0
  27. package/dist/legacy/AppSwitcher/Action/Action.js.map +1 -0
  28. package/dist/legacy/AppSwitcher/Action/index.d.ts +2 -0
  29. package/dist/legacy/AppSwitcher/Action/index.js +3 -0
  30. package/dist/legacy/AppSwitcher/Action/index.js.map +1 -0
  31. package/dist/legacy/AppSwitcher/Action/styles.js +52 -0
  32. package/dist/legacy/AppSwitcher/Action/styles.js.map +1 -0
  33. package/dist/legacy/AppSwitcher/AppSwitcher.d.ts +67 -0
  34. package/dist/legacy/AppSwitcher/AppSwitcher.js +260 -0
  35. package/dist/legacy/AppSwitcher/AppSwitcher.js.map +1 -0
  36. package/dist/legacy/AppSwitcher/TitleWithTooltip.js +45 -0
  37. package/dist/legacy/AppSwitcher/TitleWithTooltip.js.map +1 -0
  38. package/dist/legacy/AppSwitcher/index.d.ts +5 -0
  39. package/dist/legacy/AppSwitcher/index.js +3 -0
  40. package/dist/legacy/AppSwitcher/index.js.map +1 -0
  41. package/dist/legacy/AppSwitcher/styles.js +78 -0
  42. package/dist/legacy/AppSwitcher/styles.js.map +1 -0
  43. package/dist/legacy/Chart/chartPlotlyOverrides.js +2 -2
  44. package/dist/legacy/Chart/chartPlotlyOverrides.js.map +1 -1
  45. package/dist/legacy/index.d.ts +3 -0
  46. package/dist/legacy/index.js +1 -0
  47. package/dist/legacy/index.js.map +1 -1
  48. package/dist/modern/AppSwitcher/Action/Action.d.ts +75 -0
  49. package/dist/modern/AppSwitcher/Action/Action.js +242 -0
  50. package/dist/modern/AppSwitcher/Action/Action.js.map +1 -0
  51. package/dist/modern/AppSwitcher/Action/index.d.ts +2 -0
  52. package/dist/modern/AppSwitcher/Action/index.js +3 -0
  53. package/dist/modern/AppSwitcher/Action/index.js.map +1 -0
  54. package/dist/modern/AppSwitcher/Action/styles.js +50 -0
  55. package/dist/modern/AppSwitcher/Action/styles.js.map +1 -0
  56. package/dist/modern/AppSwitcher/AppSwitcher.d.ts +67 -0
  57. package/dist/modern/AppSwitcher/AppSwitcher.js +254 -0
  58. package/dist/modern/AppSwitcher/AppSwitcher.js.map +1 -0
  59. package/dist/modern/AppSwitcher/TitleWithTooltip.js +41 -0
  60. package/dist/modern/AppSwitcher/TitleWithTooltip.js.map +1 -0
  61. package/dist/modern/AppSwitcher/index.d.ts +5 -0
  62. package/dist/modern/AppSwitcher/index.js +3 -0
  63. package/dist/modern/AppSwitcher/index.js.map +1 -0
  64. package/dist/modern/AppSwitcher/styles.js +67 -0
  65. package/dist/modern/AppSwitcher/styles.js.map +1 -0
  66. package/dist/modern/Chart/chartPlotlyOverrides.js +2 -2
  67. package/dist/modern/Chart/chartPlotlyOverrides.js.map +1 -1
  68. package/dist/modern/index.d.ts +3 -0
  69. package/dist/modern/index.js +1 -0
  70. package/dist/modern/index.js.map +1 -1
  71. package/package.json +2 -2
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;;AAEA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAaA;;AACA;;AACA;;AAEA;;AASA;;AAGA;;AACA;;AAGA;;AAGA;;AAIA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAGA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLinechart } from \"./Linechart\";\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;;AAEA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAaA;;AACA;;AACA;;AAEA;;AASA;;AAGA;;AACA;;AAGA;;AAGA;;AAIA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAGA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// components\nexport { default as HvAccordion } from \"./Accordion\";\nexport { default as HvActionsGeneric } from \"./ActionsGeneric\";\nexport { default as HvActionBar } from \"./ActionBar\";\nexport { default as HvAppSwitcher } from \"./AppSwitcher\";\nexport { default as HvAssetInventory } from \"./AssetInventory\";\nexport * from \"./AssetInventory\";\nexport { default as HvAvatar } from \"./Avatar\";\nexport { default as HvBadge } from \"./Badge\";\nexport { default as HvBanner } from \"./Banner\";\nexport * from \"./Banner\";\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvBaseDropdown } from \"./BaseDropdown\";\nexport { default as HvBreadcrumb } from \"./BreadCrumb\";\nexport { default as HvBulkActions } from \"./BulkActions\";\nexport { default as HvButton } from \"./Button\";\nexport { default as HvCard } from \"./Card\";\nexport * from \"./Card\";\nexport * from \"./Calendar\";\nexport { default as HvContainer } from \"./Container\";\nexport { default as HvDatePicker } from \"./DatePicker\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvDropdown } from \"./Dropdown\";\nexport { default as HvDropDownMenu } from \"./DropDownMenu\";\nexport { default as HvEmptyState } from \"./EmptyState\";\nexport { default as HvFilterGroup } from \"./FilterGroup\";\nexport { default as HvFileUploader } from \"./FileUploader\";\nexport * from \"./FileUploader\";\nexport { default as HvFooter } from \"./Footer\";\nexport * from \"./Forms\";\n\nexport { default as HvGrid } from \"./Grid\";\nexport { default as HvGlobalActions } from \"./GlobalActions\";\n\nexport { default as HvHeader } from \"./Header\";\nexport * from \"./Header\";\n\nexport { default as HvBaseInput } from \"./BaseInput\";\nexport { default as HvInput } from \"./Input\";\n\nexport { default as HvKpi } from \"./Kpi\";\n\nexport { default as HvLinechart } from \"./Linechart\";\nexport { default as HvLink } from \"./Link\";\nexport { default as HvListContainer } from \"./ListContainer\";\nexport * from \"./ListContainer\";\n\nexport { default as HvList } from \"./List\";\n\nexport { default as HvSelectionList } from \"./SelectionList\";\n\nexport { default as HvLoading } from \"./Loading\";\nexport { default as HvLogin } from \"./Login\";\nexport { default as HvDialog } from \"./Dialog\";\nexport * from \"./Dialog\";\nexport { default as HvMultiButton } from \"./MultiButton\";\nexport { default as HvPagination } from \"./Pagination\";\n\nexport { default as HvBaseCheckBox } from \"./BaseCheckBox\";\nexport { default as HvCheckBox } from \"./CheckBox\";\nexport { default as HvCheckBoxGroup } from \"./CheckBoxGroup\";\n\nexport { default as HvBaseRadio } from \"./BaseRadio\";\nexport { default as HvRadio } from \"./Radio\";\nexport { default as HvRadioGroup } from \"./RadioGroup\";\n\nexport { default as HvBaseSwitch } from \"./BaseSwitch\";\nexport { default as HvSwitch } from \"./Switch\";\n\nexport { default as HvSnackbar } from \"./Snackbar\";\nexport { default as HvSnackbarContent } from \"./Snackbar/SnackbarContentWrapper\";\nexport { default as HvSnackbarProvider, useHvSnackbar } from \"./Snackbar/SnackbarProvider\";\n\nexport { default as HvTab } from \"./Tab\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvTable } from \"./Table\";\nexport { default as HvTabs } from \"./Tabs\";\nexport { default as HvTextArea } from \"./TextArea\";\nexport { default as HvTagsInput } from \"./TagsInput\";\nexport { default as HvToggleButton } from \"./ToggleButton\";\nexport { default as HvTooltip } from \"./Tooltip\";\nexport { default as HvOverflowTooltip } from \"./OverflowTooltip\";\nexport { default as HvTypography } from \"./Typography\";\nexport { default as HvUserPreferences } from \"./UserPreferences\";\n// TODO refactor the HvUserPreferences subcomponents' names\nexport {\n Actions as HvUserPreferencesActions,\n Action as HvUserPreferencesAction,\n} from \"./UserPreferences\";\nexport {\n Options as HvUserPreferencesOptions,\n Option as HvUserPreferencesOption,\n Group as HvUserPreferencesOptionsGroup,\n Label as HvUserPreferencesOptionsGroupLabel,\n} from \"./UserPreferences\";\n\nexport { default as HvScrollToHorizontal } from \"./ScrollTo/Horizontal\";\nexport { default as HvScrollToVertical } from \"./ScrollTo/Vertical\";\nexport { default as useScrollTo } from \"./ScrollTo/useScrollTo\";\n\nexport { default as HvVerticalNavigation } from \"./VerticalNavigation\";\n// TODO refactor the HvVerticalNavigation subcomponents' names\nexport { Navigation as HvVerticalNavigationTree } from \"./VerticalNavigation\";\nexport { TreeView as HvTreeView, TreeViewItem as HvTreeViewItem } from \"./VerticalNavigation\";\nexport {\n Actions as HvVerticalNavigationActions,\n Action as HvVerticalNavigationAction,\n} from \"./VerticalNavigation\";\n\nexport { default as HvPanel } from \"./Panel\";\n\n// HOCs\nexport { default as withId } from \"./withId\";\nexport { default as withTooltip } from \"./withTooltip\";\n\n// Hooks\nexport { default as useUniqueId } from \"./useUniqueId\";\n\n// theme\nexport { default as hvTheme } from \"./theme\";\nexport { themeBuilder, getTheme } from \"./theme\";\n\n// provider\nexport { default as HvProvider } from \"./Provider\";\nexport * from \"./Provider\";\n\n// utils\nexport * from \"./utils\";\n"],"file":"index.js"}
@@ -0,0 +1,75 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@material-ui/core";
3
+
4
+ export interface HvAppSwitcherActionApplication {
5
+ /**
6
+ * Id of the application.
7
+ */
8
+ id?: string;
9
+ /**
10
+ * Name of the application, this is the value that will be displayed on the component.
11
+ */
12
+ name: string;
13
+ /**
14
+ * The color to be applied to the item's border and to the default icon.
15
+ * You can use either an HEX or color name from the palette.
16
+ */
17
+ color?: string;
18
+ /**
19
+ * URL with the icon location to be used to represent the application.
20
+ * iconUrl will only be used if no iconElement is provided.
21
+ */
22
+ iconUrl?: string;
23
+ /**
24
+ * Element to be added as the icon representing the application.
25
+ * The iconElement will be the primary option to be displayed.
26
+ */
27
+ iconElement?: React.ReactNode;
28
+ /**
29
+ * Small description of the application.
30
+ */
31
+ description?: string;
32
+ /**
33
+ * URL where the application is accesible.
34
+ */
35
+ url?: string;
36
+ /**
37
+ * Defines if the application should be opened in the same tab or in a new one.
38
+ */
39
+ target?: "_top" | "_blank";
40
+ /**
41
+ * If true, the item will be disabled.
42
+ */
43
+ disabled?: boolean;
44
+ /**
45
+ * True when the application is selected, false otherwise.
46
+ */
47
+ isSelected?: boolean;
48
+ }
49
+
50
+ export type HvAppSwitcherActionClassKey =
51
+ | "root"
52
+ | "typography"
53
+ | "selected"
54
+ | "icon"
55
+ | "iconUrl"
56
+ | "title"
57
+ | "iconInfo";
58
+
59
+ export interface HvAppSwitcherActionProps
60
+ extends StandardProps<React.HTMLAttributes<HTMLElement>, HvAppSwitcherActionClassKey> {
61
+ /**
62
+ * The application data to be used to render the Action object.
63
+ */
64
+ application: HvAppSwitcherActionApplication;
65
+ /**
66
+ * Callback triggered when the action is clicked.
67
+ */
68
+ onClickCallback?: (event: MouseEvent, application?: HvAppSwitcherActionApplication) => void;
69
+ /**
70
+ * Must return a boolean stating if the action element is selected or not.
71
+ */
72
+ isSelectedCallback?: (application?: HvAppSwitcherActionApplication) => boolean;
73
+ }
74
+
75
+ export default function HvAppSwitcherAction(props: HvAppSwitcherActionProps): JSX.Element | null;
@@ -0,0 +1,259 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+
6
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
+
8
+ import "core-js/modules/es.function.name.js";
9
+ import "core-js/modules/es.symbol.js";
10
+ import "core-js/modules/es.symbol.description.js";
11
+ import "core-js/modules/es.regexp.exec.js";
12
+ import "core-js/modules/es.string.split.js";
13
+ import "core-js/modules/es.object.keys.js";
14
+ import "core-js/modules/es.array.filter.js";
15
+ import "core-js/modules/es.object.to-string.js";
16
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
17
+ import "core-js/modules/web.dom-collections.for-each.js";
18
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
19
+ import React, { useState } from "react";
20
+ import PropTypes from "prop-types";
21
+ import clsx from "clsx";
22
+ import { useTheme, withStyles } from "@material-ui/core";
23
+ import { Info } from "@hitachivantara/uikit-react-icons";
24
+ import { HvTypography, HvAvatar, HvTooltip, HvListItem } from "../..";
25
+ import styles from "./styles";
26
+ import TitleWithTooltip from "../TitleWithTooltip";
27
+
28
+ var getColor = function getColor(theme, color, defaultColor) {
29
+ return theme.palette[color] || color || defaultColor;
30
+ };
31
+
32
+ var Action = function Action(props) {
33
+ var id = props.id,
34
+ className = props.className,
35
+ classes = props.classes,
36
+ application = props.application,
37
+ _props$onClickCallbac = props.onClickCallback,
38
+ onClickCallback = _props$onClickCallbac === void 0 ? function () {} : _props$onClickCallbac,
39
+ _props$isSelectedCall = props.isSelectedCallback,
40
+ isSelectedCallback = _props$isSelectedCall === void 0 ? function () {
41
+ return false;
42
+ } : _props$isSelectedCall;
43
+ var name = application.name,
44
+ description = application.description,
45
+ disabled = application.disabled,
46
+ iconElement = application.iconElement,
47
+ iconUrl = application.iconUrl,
48
+ url = application.url,
49
+ target = application.target;
50
+ var theme = useTheme();
51
+ var color = disabled ? theme.hv.palette.atmosphere.atmo5 : getColor(theme, application.color, theme.hv.palette.accent.acce1);
52
+
53
+ var _useState = useState(true),
54
+ _useState2 = _slicedToArray(_useState, 2),
55
+ validIconUrl = _useState2[0],
56
+ setValidIconUrl = _useState2[1];
57
+
58
+ var renderApplicationIcon = function renderApplicationIcon() {
59
+ if (iconElement) {
60
+ return iconElement;
61
+ }
62
+
63
+ if (iconUrl && validIconUrl) {
64
+ return /*#__PURE__*/React.createElement("img", {
65
+ className: classes.iconUrl,
66
+ src: iconUrl,
67
+ onError: function onError() {
68
+ setValidIconUrl(false);
69
+ },
70
+ alt: description
71
+ });
72
+ }
73
+
74
+ var brokenTitle = name.split(" ");
75
+ var initials = brokenTitle[0].substring(0, 1) + (brokenTitle[1] ? brokenTitle[1].substring(0, 1) : "");
76
+ return /*#__PURE__*/React.createElement(HvAvatar, {
77
+ size: "SM",
78
+ backgroundColor: color,
79
+ variant: "square"
80
+ }, initials);
81
+ };
82
+
83
+ var isSelected = isSelectedCallback(application);
84
+ /**
85
+ * Handles the onClick event and triggers the appropriate callback if it exists.
86
+ */
87
+
88
+ var handleOnClick = function handleOnClick(event) {
89
+ if (disabled) {
90
+ event.preventDefault();
91
+ return;
92
+ }
93
+
94
+ onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback(event, _objectSpread(_objectSpread({}, application), {}, {
95
+ isSelected: isSelected
96
+ }));
97
+ };
98
+
99
+ var isLink = url != null;
100
+ return /*#__PURE__*/React.createElement(HvListItem, {
101
+ id: id,
102
+ interactive: true,
103
+ tabIndex: 0,
104
+ selected: isSelected,
105
+ disabled: disabled,
106
+ className: clsx(className, classes.root, disabled && classes.disabled, isSelected && classes.selected)
107
+ }, /*#__PURE__*/React.createElement(HvTypography, {
108
+ component: isLink ? "a" : "button",
109
+ href: isLink ? url : undefined,
110
+ target: isLink ? target || "_top" : undefined,
111
+ className: classes.typography,
112
+ onClick: handleOnClick,
113
+ style: {
114
+ borderColor: color
115
+ }
116
+ }, /*#__PURE__*/React.createElement("div", {
117
+ className: classes.icon
118
+ }, renderApplicationIcon()), /*#__PURE__*/React.createElement(TitleWithTooltip, {
119
+ title: name,
120
+ className: classes.title
121
+ }), description && /*#__PURE__*/React.createElement(HvTooltip, {
122
+ disableFocusListener: true,
123
+ disableTouchListener: true,
124
+ title: /*#__PURE__*/React.createElement(HvTypography, null, description)
125
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Info, {
126
+ className: classes.iconInfo,
127
+ role: "img",
128
+ "aria-label": description
129
+ })))));
130
+ };
131
+
132
+ process.env.NODE_ENV !== "production" ? Action.propTypes = {
133
+ /**
134
+ * Identifier to be applied to the root element.
135
+ */
136
+ id: PropTypes.string,
137
+
138
+ /**
139
+ * Class names to be applied to the root element.
140
+ */
141
+ className: PropTypes.string,
142
+
143
+ /**
144
+ * A Jss object used to override or extend the component styles.
145
+ */
146
+ classes: PropTypes.shape({
147
+ /**
148
+ * Styles applied to the component root class.
149
+ */
150
+ root: PropTypes.string,
151
+
152
+ /**
153
+ * Styles applied to the component root class when disabled.
154
+ */
155
+ disabled: PropTypes.string,
156
+
157
+ /**
158
+ * Styles applied to the typography element.
159
+ */
160
+ typography: PropTypes.string,
161
+
162
+ /**
163
+ * Styles applied to the component root class when selected.
164
+ */
165
+ selected: PropTypes.string,
166
+
167
+ /**
168
+ * Styles applied to the icon container.
169
+ */
170
+ icon: PropTypes.string,
171
+
172
+ /**
173
+ * Styles applied to the icon.
174
+ */
175
+ iconUrl: PropTypes.string,
176
+
177
+ /**
178
+ * Styles applied to the action title element.
179
+ */
180
+ title: PropTypes.string,
181
+
182
+ /**
183
+ * Styles applied to the info icon element.
184
+ */
185
+ iconInfo: PropTypes.string
186
+ }).isRequired,
187
+
188
+ /**
189
+ * The application data to be used to render the Action object.
190
+ */
191
+ application: PropTypes.shape({
192
+ /**
193
+ * Id of the application.
194
+ */
195
+ id: PropTypes.string,
196
+
197
+ /**
198
+ * Name of the application, this is the value that will be displayed on the component.
199
+ */
200
+ name: PropTypes.string.isRequired,
201
+
202
+ /**
203
+ * The color to be applied to the item's border and to the default icon.
204
+ * You can use either an HEX or color name from the palette.
205
+ */
206
+ color: PropTypes.string,
207
+
208
+ /**
209
+ * URL with the icon location to be used to represent the application.
210
+ * iconUrl will only be used if no iconElement is provided.
211
+ */
212
+ iconUrl: PropTypes.string,
213
+
214
+ /**
215
+ * Element to be added as the icon representing the application.
216
+ * The iconElement will be the primary option to be displayed.
217
+ */
218
+ iconElement: PropTypes.element,
219
+
220
+ /**
221
+ * Small description of the application.
222
+ */
223
+ description: PropTypes.string,
224
+
225
+ /**
226
+ * URL where the application is accessible.
227
+ */
228
+ url: PropTypes.string,
229
+
230
+ /**
231
+ * Defines if the application should be opened in the same tab or in a new one.
232
+ */
233
+ target: PropTypes.oneOf(["_top", "_blank"]),
234
+
235
+ /**
236
+ * If true, the item will be disabled.
237
+ */
238
+ disabled: PropTypes.bool,
239
+
240
+ /**
241
+ * True when the application is selected, false otherwise.
242
+ */
243
+ isSelected: PropTypes.bool
244
+ }).isRequired,
245
+
246
+ /**
247
+ * Callback triggered when the action is clicked.
248
+ */
249
+ onClickCallback: PropTypes.func,
250
+
251
+ /**
252
+ * Must return a boolean stating if the action element is selected or not.
253
+ */
254
+ isSelectedCallback: PropTypes.func
255
+ } : void 0;
256
+ export default withStyles(styles, {
257
+ name: "HvAppSwitcherAction"
258
+ })(Action);
259
+ //# sourceMappingURL=Action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/AppSwitcher/Action/Action.js"],"names":["React","useState","PropTypes","clsx","useTheme","withStyles","Info","HvTypography","HvAvatar","HvTooltip","HvListItem","styles","TitleWithTooltip","getColor","theme","color","defaultColor","palette","Action","props","id","className","classes","application","onClickCallback","isSelectedCallback","name","description","disabled","iconElement","iconUrl","url","target","hv","atmosphere","atmo5","accent","acce1","validIconUrl","setValidIconUrl","renderApplicationIcon","brokenTitle","split","initials","substring","isSelected","handleOnClick","event","preventDefault","isLink","root","selected","undefined","typography","borderColor","icon","title","iconInfo","propTypes","string","shape","isRequired","element","oneOf","bool","func"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,QAAT,EAAmBC,UAAnB,QAAqC,mBAArC;AAEA,SAASC,IAAT,QAAqB,mCAArB;AACA,SAASC,YAAT,EAAuBC,QAAvB,EAAiCC,SAAjC,EAA4CC,UAA5C,QAA8D,OAA9D;AAEA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,OAAOC,gBAAP,MAA6B,qBAA7B;;AAEA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAQC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AACyD,MA3BI;;AA4B3B;AACJ;AACA;AACI5B,IAAAA,GAAG,EAAE7B,SAAS,CAACyD,MA/BY;;AAgC3B;AACJ;AACA;AACI3B,IAAAA,MAAM,EAAE9B,SAAS,CAAC6D,KAAV,CAAgB,CAAC,MAAD,EAAS,QAAT,CAAhB,CAnCmB;;AAoC3B;AACJ;AACA;AACInC,IAAAA,QAAQ,EAAE1B,SAAS,CAAC8D,IAvCO;;AAwC3B;AACJ;AACA;AACInB,IAAAA,UAAU,EAAE3C,SAAS,CAAC8D;AA3CK,GAAhB,EA4CVH,UA/Fc;;AAiGjB;AACF;AACA;AACErC,EAAAA,eAAe,EAAEtB,SAAS,CAAC+D,IApGV;;AAqGjB;AACF;AACA;AACExC,EAAAA,kBAAkB,EAAEvB,SAAS,CAAC+D;AAxGb,CAAnB;AA2GA,eAAe5D,UAAU,CAACM,MAAD,EAAS;AAAEe,EAAAA,IAAI,EAAE;AAAR,CAAT,CAAV,CAAoDR,MAApD,CAAf","sourcesContent":["import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport clsx from \"clsx\";\nimport { useTheme, withStyles } from \"@material-ui/core\";\n\nimport { Info } from \"@hitachivantara/uikit-react-icons\";\nimport { HvTypography, HvAvatar, HvTooltip, HvListItem } from \"../..\";\n\nimport styles from \"./styles\";\n\nimport TitleWithTooltip from \"../TitleWithTooltip\";\n\nconst getColor = (theme, color, defaultColor) => theme.palette[color] || color || defaultColor;\n\nconst Action = (props) => {\n const {\n id,\n className,\n classes,\n application,\n onClickCallback = () => {},\n isSelectedCallback = () => false,\n } = props;\n\n const { name, description, disabled, iconElement, iconUrl, url, target } = application;\n\n const theme = useTheme();\n const color = disabled\n ? theme.hv.palette.atmosphere.atmo5\n : getColor(theme, application.color, theme.hv.palette.accent.acce1);\n\n const [validIconUrl, setValidIconUrl] = useState(true);\n\n const renderApplicationIcon = () => {\n if (iconElement) {\n return iconElement;\n }\n\n if (iconUrl && validIconUrl) {\n return (\n <img\n className={classes.iconUrl}\n src={iconUrl}\n onError={() => {\n setValidIconUrl(false);\n }}\n alt={description}\n />\n );\n }\n\n const brokenTitle = name.split(\" \");\n const initials =\n brokenTitle[0].substring(0, 1) + (brokenTitle[1] ? brokenTitle[1].substring(0, 1) : \"\");\n\n return (\n <HvAvatar size=\"SM\" backgroundColor={color} variant=\"square\">\n {initials}\n </HvAvatar>\n );\n };\n\n const isSelected = isSelectedCallback(application);\n\n /**\n * Handles the onClick event and triggers the appropriate callback if it exists.\n */\n const handleOnClick = (event) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n onClickCallback?.(event, { ...application, isSelected });\n };\n\n const isLink = url != null;\n\n return (\n <HvListItem\n id={id}\n interactive\n tabIndex={0}\n selected={isSelected}\n disabled={disabled}\n className={clsx(className, classes.root, {\n [classes.disabled]: disabled,\n [classes.selected]: isSelected,\n })}\n >\n <HvTypography\n component={isLink ? \"a\" : \"button\"}\n href={isLink ? url : undefined}\n target={isLink ? target || \"_top\" : undefined}\n className={classes.typography}\n onClick={handleOnClick}\n style={{ borderColor: color }}\n >\n <div className={classes.icon}>{renderApplicationIcon()}</div>\n\n <TitleWithTooltip title={name} className={classes.title} />\n\n {description && (\n <HvTooltip\n disableFocusListener\n disableTouchListener\n title={<HvTypography>{description}</HvTypography>}\n >\n <div>\n <Info className={classes.iconInfo} role=\"img\" aria-label={description} />\n </div>\n </HvTooltip>\n )}\n </HvTypography>\n </HvListItem>\n );\n};\n\nAction.propTypes = {\n /**\n * Identifier to be applied to the root element.\n */\n id: PropTypes.string,\n\n /**\n * Class names to be applied to the root element.\n */\n className: PropTypes.string,\n /**\n * A Jss object used to override or extend the component styles.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the component root class when disabled.\n */\n disabled: PropTypes.string,\n /**\n * Styles applied to the typography element.\n */\n typography: PropTypes.string,\n /**\n * Styles applied to the component root class when selected.\n */\n selected: PropTypes.string,\n /**\n * Styles applied to the icon container.\n */\n icon: PropTypes.string,\n /**\n * Styles applied to the icon.\n */\n iconUrl: PropTypes.string,\n /**\n * Styles applied to the action title element.\n */\n title: PropTypes.string,\n /**\n * Styles applied to the info icon element.\n */\n iconInfo: PropTypes.string,\n }).isRequired,\n\n /**\n * The application data to be used to render the Action object.\n */\n application: PropTypes.shape({\n /**\n * Id of the application.\n */\n id: PropTypes.string,\n /**\n * Name of the application, this is the value that will be displayed on the component.\n */\n name: PropTypes.string.isRequired,\n /**\n * The color to be applied to the item's border and to the default icon.\n * You can use either an HEX or color name from the palette.\n */\n color: PropTypes.string,\n /**\n * URL with the icon location to be used to represent the application.\n * iconUrl will only be used if no iconElement is provided.\n */\n iconUrl: PropTypes.string,\n /**\n * Element to be added as the icon representing the application.\n * The iconElement will be the primary option to be displayed.\n */\n iconElement: PropTypes.element,\n /**\n * Small description of the application.\n */\n description: PropTypes.string,\n /**\n * URL where the application is accessible.\n */\n url: PropTypes.string,\n /**\n * Defines if the application should be opened in the same tab or in a new one.\n */\n target: PropTypes.oneOf([\"_top\", \"_blank\"]),\n /**\n * If true, the item will be disabled.\n */\n disabled: PropTypes.bool,\n /**\n * True when the application is selected, false otherwise.\n */\n isSelected: PropTypes.bool,\n }).isRequired,\n\n /**\n * Callback triggered when the action is clicked.\n */\n onClickCallback: PropTypes.func,\n /**\n * Must return a boolean stating if the action element is selected or not.\n */\n isSelectedCallback: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvAppSwitcherAction\" })(Action);\n"],"file":"Action.js"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./Action";
2
+ export * from "./Action";
@@ -0,0 +1,3 @@
1
+ import Action from "./Action";
2
+ export default Action;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/AppSwitcher/Action/index.js"],"names":["Action"],"mappings":"AAAA,OAAOA,MAAP,MAAmB,UAAnB;AAEA,eAAeA,MAAf","sourcesContent":["import Action from \"./Action\";\n\nexport default Action;\n"],"file":"index.js"}
@@ -0,0 +1,52 @@
1
+ var styles = function styles(theme) {
2
+ return {
3
+ root: {
4
+ width: "100%",
5
+ maxWidth: 280,
6
+ minHeight: 52,
7
+ marginRight: theme.hv.spacing.sm
8
+ },
9
+ disabled: {},
10
+ selected: {},
11
+ typography: {
12
+ display: "flex",
13
+ justifyContent: "flex-start",
14
+ alignItems: "center",
15
+ width: "100%",
16
+ minHeight: 52,
17
+ padding: "6px ".concat(theme.hv.spacing.xs, "px"),
18
+ border: "none",
19
+ borderLeft: "solid 2px ".concat(theme.hv.palette.accent.acce1),
20
+ cursor: "pointer",
21
+ textDecoration: "inherit",
22
+ color: "inherit",
23
+ backgroundColor: "inherit",
24
+ "$disabled &": {
25
+ cursor: "not-allowed"
26
+ }
27
+ },
28
+ icon: {
29
+ display: "flex",
30
+ minWidth: 40,
31
+ justifyContent: "center"
32
+ },
33
+ title: {
34
+ flexGrow: 1,
35
+ margin: "0 ".concat(theme.hv.spacing.xs, "px"),
36
+ textAlign: "left",
37
+ overflow: "hidden",
38
+ whiteSpace: "nowrap",
39
+ textOverflow: "ellipsis",
40
+ color: "inherit"
41
+ },
42
+ iconInfo: {
43
+ minWidth: 32
44
+ },
45
+ iconUrl: {
46
+ width: 32
47
+ }
48
+ };
49
+ };
50
+
51
+ export default styles;
52
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/AppSwitcher/Action/styles.js"],"names":["styles","theme","root","width","maxWidth","minHeight","marginRight","hv","spacing","sm","disabled","selected","typography","display","justifyContent","alignItems","padding","xs","border","borderLeft","palette","accent","acce1","cursor","textDecoration","color","backgroundColor","icon","minWidth","title","flexGrow","margin","textAlign","overflow","whiteSpace","textOverflow","iconInfo","iconUrl"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBC,IAAAA,IAAI,EAAE;AACJC,MAAAA,KAAK,EAAE,MADH;AA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AxCkB;AAqDzBW,IAAAA,QAAQ,EAAE;AACRR,MAAAA,QAAQ,EAAE;AADF,KArDe;AAyDzBS,IAAAA,OAAO,EAAE;AACPlC,MAAAA,KAAK,EAAE;AADA;AAzDgB,GAAZ;AAAA,CAAf;;AA8DA,eAAeH,MAAf","sourcesContent":["const styles = (theme) => ({\n root: {\n width: \"100%\",\n maxWidth: 280,\n minHeight: 52,\n marginRight: theme.hv.spacing.sm,\n },\n disabled: {},\n selected: {},\n\n typography: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n\n width: \"100%\",\n minHeight: 52,\n\n padding: `6px ${theme.hv.spacing.xs}px`,\n\n border: \"none\",\n borderLeft: `solid 2px ${theme.hv.palette.accent.acce1}`,\n\n cursor: \"pointer\",\n\n textDecoration: \"inherit\",\n color: \"inherit\",\n backgroundColor: \"inherit\",\n\n \"$disabled &\": {\n cursor: \"not-allowed\",\n },\n },\n\n icon: {\n display: \"flex\",\n minWidth: 40,\n justifyContent: \"center\",\n },\n\n title: {\n flexGrow: 1,\n margin: `0 ${theme.hv.spacing.xs}px`,\n\n textAlign: \"left\",\n\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n\n color: \"inherit\",\n },\n\n iconInfo: {\n minWidth: 32,\n },\n\n iconUrl: {\n width: 32,\n },\n});\n\nexport default styles;\n"],"file":"styles.js"}
@@ -0,0 +1,67 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@material-ui/core";
3
+
4
+ import { HvAppSwitcherActionApplication } from "./Action";
5
+
6
+ export type HvAppSwitcherClassKey =
7
+ | "root"
8
+ | "single"
9
+ | "dual"
10
+ | "fluid"
11
+ | "title"
12
+ | "actionsContainer"
13
+ | "footerContainer"
14
+ | "closed"
15
+ | "open"
16
+ | "item"
17
+ | "itemSelected"
18
+ | "itemDisabled"
19
+ | "itemTrigger"
20
+ | "itemIcon"
21
+ | "itemTitle"
22
+ | "itemInfoIcon";
23
+
24
+ export interface HvAppSwitcherProps
25
+ extends StandardProps<React.HTMLAttributes<HTMLElement>, HvAppSwitcherClassKey> {
26
+ /**
27
+ * Number of columns to render. One, two, or whatever fits the component's width.
28
+ */
29
+ layout?: "single" | "dual" | "fluid";
30
+
31
+ /**
32
+ * Title to be displayed on the header of the component.
33
+ */
34
+ title?: string;
35
+ /**
36
+ * The list of applications to be used to render the actions on the component.
37
+ */
38
+ applications: HvAppSwitcherActionApplication[];
39
+
40
+ /**
41
+ * Triggered when an action is clicked.
42
+ */
43
+ onActionClickedCallback?: (
44
+ event: MouseEvent,
45
+ application?: HvAppSwitcherActionApplication
46
+ ) => void;
47
+ /**
48
+ * Must return a boolean stating if the action element is selected or not.
49
+ */
50
+ isActionSelectedCallback?: (application?: HvAppSwitcherActionApplication) => boolean;
51
+
52
+ /**
53
+ * Element to be added to the header container, if none is provided a label with the title will be added.
54
+ */
55
+ header?: string | React.ReactNode;
56
+ /**
57
+ * Element to be added to the footer container.
58
+ */
59
+ footer?: string | React.ReactNode;
60
+
61
+ /**
62
+ * Flag stating if the panel is opened or closed.
63
+ */
64
+ isOpen?: boolean;
65
+ }
66
+
67
+ export default function HvAppSwitcher(props: HvAppSwitcherProps): JSX.Element | null;