@openfin/ui-library 0.12.0-alpha.1678961199 → 0.12.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 (41) hide show
  1. package/dist/components/controls/Button/button.d.ts +3 -3
  2. package/dist/components/controls/Button/button.variants.d.ts +4 -4
  3. package/dist/components/controls/ExpandableButton/expandableButton.d.ts +2 -2
  4. package/dist/components/controls/ExpandableButton/expandablePanel.d.ts +1 -1
  5. package/dist/components/controls/Toggle/toggle.d.ts +2 -2
  6. package/dist/components/elements/Badge/badge.d.ts +1 -1
  7. package/dist/components/elements/DropdownMenu/dropdownMenu.d.ts +6 -5
  8. package/dist/components/elements/DropdownMenu/{optionTitle.d.ts → dropdownOptionTitle.d.ts} +2 -2
  9. package/dist/components/elements/DropdownMenu/dropdownOptionsMenu.d.ts +24 -0
  10. package/dist/components/elements/DropdownMenu/index.d.ts +0 -1
  11. package/dist/components/elements/Icon/icon.d.ts +4 -4
  12. package/dist/components/elements/IconWithBadge/iconWithBadge.d.ts +1 -1
  13. package/dist/components/elements/Loader/loader.d.ts +1 -1
  14. package/dist/components/elements/Loader/openfinLoader.d.ts +1 -1
  15. package/dist/components/input/BaseInput/baseInput.d.ts +1 -1
  16. package/dist/components/input/Checkbox/checkbox.d.ts +1 -1
  17. package/dist/components/input/RadioGroup/radioGroup.d.ts +2 -2
  18. package/dist/components/input/RadioInput/radioInput.d.ts +2 -2
  19. package/dist/components/input/TextInput/textInput.d.ts +1 -1
  20. package/dist/components/layout/Box/box.d.ts +1 -1
  21. package/dist/components/layout/Box/types.d.ts +7 -7
  22. package/dist/components/system/HOC/index.d.ts +2 -2
  23. package/dist/components/system/ThemeProvider/lib/config.d.ts +3 -3
  24. package/dist/components/system/ThemeProvider/lib/constants.d.ts +0 -1
  25. package/dist/components/system/ThemeProvider/lib/helpers.d.ts +1 -1
  26. package/dist/components/system/ThemeProvider/lib/palette.d.ts +0 -1
  27. package/dist/components/system/ThemeProvider/lib/types.d.ts +20 -20
  28. package/dist/components/system/ThemeProvider/themeProvider.d.ts +1 -1
  29. package/dist/components/typography/Heading/heading.d.ts +105 -111
  30. package/dist/components/typography/Text/text.d.ts +1 -1
  31. package/dist/hooks/useColorScheme.d.ts +2 -2
  32. package/dist/index.d.ts +0 -3
  33. package/dist/index.js +89 -229
  34. package/dist/index.js.LICENSE.txt +2 -2
  35. package/package.json +4 -11
  36. package/dist/components/elements/Calendar/calendar.d.ts +0 -7
  37. package/dist/components/elements/Calendar/index.d.ts +0 -1
  38. package/dist/components/elements/DropdownMenu/menu.d.ts +0 -62
  39. package/dist/components/input/DateInput/dateInput.d.ts +0 -12
  40. package/dist/components/input/DateInput/index.d.ts +0 -1
  41. package/dist/hooks/useDropdownKeyboardNavigation.d.ts +0 -16
@@ -5,12 +5,12 @@ object-assign
5
5
  */
6
6
 
7
7
  /*!
8
- * focus-trap 7.3.1
8
+ * focus-trap 7.1.0
9
9
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
10
10
  */
11
11
 
12
12
  /*!
13
- * tabbable 6.1.1
13
+ * tabbable 6.0.1
14
14
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
15
15
  */
16
16
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfin/ui-library",
3
3
  "description": "OpenFin UI Component Library",
4
- "version": "0.12.0-alpha.1678961199",
4
+ "version": "0.12.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "github:openfin/ui-library",
@@ -26,15 +26,14 @@
26
26
  "storybook:cache-clear": "rimraf ./node_modules/.cache/storybook"
27
27
  },
28
28
  "peerDependencies": {
29
+ "styled-components": "=>4.4.1 <6.0.0",
29
30
  "@modulz/radix-icons": "=>4.0.0 <5.0.0",
30
31
  "focus-trap-react": "=>10.0.1 <11.0.0",
31
32
  "framer-motion": "=>4.1.5 <5.0.0",
33
+ "tinycolor2": "=>1.4.2 <2.0.0",
32
34
  "react": "=>17.0.1 <18.0.0",
33
- "react-calendar": "=>4.0.0 <5.0.0",
34
35
  "react-dom": "=>17.0.1 <18.0.0",
35
- "require-from-string": "=>2.0.2 <3.0.0",
36
- "styled-components": "=>4.4.1 <6.0.0",
37
- "tinycolor2": "=>1.4.2 <2.0.0"
36
+ "require-from-string": "=>2.0.2 <3.0.0"
38
37
  },
39
38
  "devDependencies": {
40
39
  "@babel/core": "^7.18.6",
@@ -54,7 +53,6 @@
54
53
  "@types/lodash.defaultsdeep": "^4.6.7",
55
54
  "@types/node": "^18.0.0",
56
55
  "@types/react": "^17.0.3",
57
- "@types/react-calendar": "^3.9.0",
58
56
  "@types/react-dom": "^17.0.2",
59
57
  "@types/styled-components": "^5.1.25",
60
58
  "@types/tinycolor2": "^1.4.3",
@@ -63,14 +61,12 @@
63
61
  "babel-loader": "^8.2.5",
64
62
  "copy-webpack-plugin": "^11.0.0",
65
63
  "cross-env": "^7.0.3",
66
- "css-loader": "^6.7.3",
67
64
  "eslint": "^8.18.0",
68
65
  "eslint-config-prettier": "^8.5.0",
69
66
  "eslint-plugin-jest": "^26.5.3",
70
67
  "eslint-plugin-prettier": "^4.0.0",
71
68
  "eslint-plugin-react": "^7.30.0",
72
69
  "file-loader": "^6.2.0",
73
- "identity-obj-proxy": "^3.0.0",
74
70
  "jest": "^28.1.2",
75
71
  "jest-environment-jsdom": "^28.1.2",
76
72
  "prettier": "^2.7.1",
@@ -170,9 +166,6 @@
170
166
  "setupFilesAfterEnv": [
171
167
  "<rootDir>/src/setupTests.ts"
172
168
  ],
173
- "moduleNameMapper": {
174
- "\\.(css)$": "<rootDir>/src/test/mocks/styleMock.js"
175
- },
176
169
  "testEnvironment": "jsdom",
177
170
  "testMatch": [
178
171
  "<rootDir>/src/**/*.test.tsx"
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- export interface CalendarProps {
3
- value: Date;
4
- onChange?: (date: Date) => void;
5
- onDismiss?: () => void;
6
- }
7
- export declare const Calendar: FC<CalendarProps>;
@@ -1 +0,0 @@
1
- export * from './calendar';
@@ -1,62 +0,0 @@
1
- import React from 'react';
2
- export interface MenuOption {
3
- title: string;
4
- value: unknown;
5
- iconUrl?: string;
6
- overrideOnClick?: (value?: MenuOption) => void;
7
- }
8
- /**
9
- * The properties for the Menu component.
10
- */
11
- export interface MenuProps {
12
- /**
13
- * An array of options to be displayed in the menu. The outer array represents the rows of the menu, while the inner arrays represent the columns.
14
- */
15
- options: MenuOption[][];
16
- /**
17
- * The currently selected option in the menu.
18
- */
19
- selected?: MenuOption;
20
- /**
21
- * An ID to associate wrapper component with this Menu.
22
- */
23
- menuId?: string;
24
- /**
25
- * A function to be called to close the menu.
26
- */
27
- handleExpandMenu?: () => void;
28
- /**
29
- * A function to be called when an option in the menu is hovered over.
30
- */
31
- onOptionHover?: (value?: unknown) => void;
32
- /**
33
- * A function to be called when an option in the menu is selected/clicked.
34
- */
35
- onChange: (value: MenuOption) => void;
36
- /**
37
- * Whether the width of the menu should fit its contents
38
- */
39
- fitContent?: boolean;
40
- /**
41
- * The width of the menu, as a CSS string, default to 100% of the parent container.
42
- */
43
- width?: string;
44
- /**
45
- * The height of the menu, as a CSS string.
46
- */
47
- height?: string;
48
- /**
49
- * The text to be displayed as the header of the menu.
50
- */
51
- header?: string;
52
- /**
53
- * The currently focused option in the menu.
54
- */
55
- focusedOption?: MenuOption;
56
- /**
57
- * The menu should be positioned absolutely.
58
- */
59
- absolutePosition?: boolean;
60
- }
61
- export declare const Menu: React.FC<MenuProps>;
62
- export declare const ButtonImage: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
@@ -1,12 +0,0 @@
1
- import { ChangeEventHandler, MouseEventHandler } from 'react';
2
- import { BaseInputProps } from '../BaseInput';
3
- type DateTypeFormat = 'date' | 'time' | 'datetime-local';
4
- interface DateInputProps extends Omit<BaseInputProps, 'value' | 'type'> {
5
- onChange?: ChangeEventHandler<HTMLInputElement>;
6
- onExpand?: MouseEventHandler<HTMLDivElement>;
7
- expanded?: boolean;
8
- value?: string;
9
- type?: DateTypeFormat;
10
- }
11
- export declare const DateInput: import("react").ForwardRefExoticComponent<DateInputProps & import("react").RefAttributes<HTMLInputElement>>;
12
- export {};
@@ -1 +0,0 @@
1
- export * from './dateInput';
@@ -1,16 +0,0 @@
1
- import { KeyboardEvent } from 'react';
2
- import { MenuOption } from '../components/elements/DropdownMenu';
3
- /**
4
- * Hook that handles keyboard navigation and type-to-select functionality of a dropdown menu and returns the focused option.
5
- *
6
- * @param {MenuOption[][]} options - An array of dropdown options, with each nested array representing a row of options.
7
- * @param {MenuOption} selected - The currently selected dropdown option.
8
- * @param {boolean} expandMenu - Whether the dropdown menu is expanded or not.
9
- * @param {(toggle?: boolean) => void} handleExpandMenu - Function to handle toggling the dropdown menu.
10
- * @param {(value: MenuOption) => void} onChange - Function to handle changing the selected option.
11
- * @returns {{ focusedOption: MenuOption, handleKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void }} - The currently focused option and a function to handle keydown events.
12
- */
13
- export declare const useDropdownKeyboardNavigation: (options: MenuOption[][], selected: MenuOption | undefined, expandMenu: boolean, handleExpandMenu: (toggle?: boolean) => void, onChange: (value: MenuOption) => void) => {
14
- focusedOption: MenuOption;
15
- handleKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
16
- };