@openfin/ui-library 0.1.1 → 0.1.2-alpha.1616610935

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 (27) hide show
  1. package/dist/components/controls/Toggle/toggle.js +4 -3
  2. package/dist/components/elements/Icon/openfin/BellIcon.d.ts +6 -0
  3. package/dist/components/elements/Icon/openfin/BellIcon.js +24 -0
  4. package/dist/components/elements/Icon/openfin/OpenFinIcon.d.ts +3 -0
  5. package/dist/components/elements/Icon/openfin/OpenFinIcon.js +3 -0
  6. package/dist/components/elements/Icon/openfin/WorkspaceIcon.d.ts +5 -0
  7. package/dist/components/elements/Icon/openfin/WorkspaceIcon.js +26 -0
  8. package/dist/components/elements/Icon/openfin/index.d.ts +2 -0
  9. package/dist/components/elements/Icon/openfin/index.js +2 -0
  10. package/dist/components/input/RawInput/index.d.ts +1 -0
  11. package/dist/components/input/{Input → RawInput}/index.js +1 -1
  12. package/dist/components/input/RawInput/rawInput.d.ts +6 -0
  13. package/dist/components/input/{Input/input.js → RawInput/rawInput.js} +4 -4
  14. package/dist/components/input/TextInput/textInput.d.ts +5 -2
  15. package/dist/components/input/TextInput/textInput.js +40 -6
  16. package/dist/components/system/GlobalStyles/globalStyles.js +0 -4
  17. package/dist/components/system/HOC/index.d.ts +11 -0
  18. package/dist/components/system/HOC/index.js +25 -0
  19. package/dist/components/system/ThemeProvider/lib/constants.d.ts +3 -2
  20. package/dist/components/system/ThemeProvider/lib/constants.js +1 -1
  21. package/dist/components/system/ThemeProvider/lib/helpers.d.ts +6 -0
  22. package/dist/components/system/ThemeProvider/lib/helpers.js +20 -1
  23. package/dist/index.d.ts +2 -1
  24. package/dist/index.js +2 -1
  25. package/package.json +3 -1
  26. package/dist/components/input/Input/index.d.ts +0 -1
  27. package/dist/components/input/Input/input.d.ts +0 -6
@@ -18,7 +18,7 @@ exports.Toggle = void 0;
18
18
  const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const react_1 = require("react");
20
20
  const styled_components_1 = __importDefault(require("styled-components"));
21
- const Input_1 = require("../../input/Input");
21
+ const RawInput_1 = require("../../input/RawInput");
22
22
  const Box_1 = require("../../layout/Box");
23
23
  const Toggle = (_a) => {
24
24
  var { id, label, labelSide = 'right', type = 'checkbox', onChange = () => { } } = _a, inputProps = __rest(_a, ["id", "label", "labelSide", "type", "onChange"]);
@@ -49,7 +49,8 @@ const InputContainer = styled_components_1.default(Box_1.Box) `
49
49
  border-radius: calc(0.5 * var(--px-toggle));
50
50
 
51
51
  background: ${({ isChecked, theme }) => isChecked ? theme.palette.brandPrimary : theme.palette.inputBg};
52
- transition: background var(--global-transition);
52
+ transition: background var(--global-transition),
53
+ border-color var(--global-transition);
53
54
 
54
55
  &:focus-within {
55
56
  border-color: ${({ theme }) => theme.palette.inputFocused};
@@ -69,7 +70,7 @@ const ToggleKnob = styled_components_1.default.button `
69
70
  transition: left var(--global-transition);
70
71
  pointer-events: none; /* Allow pass-thru for native input */
71
72
  `;
72
- const ToggleInput = styled_components_1.default(Input_1.Input) `
73
+ const ToggleInput = styled_components_1.default(RawInput_1.RawInput) `
73
74
  position: absolute;
74
75
  top: 0;
75
76
  left: 0;
@@ -0,0 +1,6 @@
1
+ import { IconProps } from '@modulz/radix-icons/dist/types';
2
+ /**
3
+ * OVERRIDE!
4
+ * This replaces Radix UI BellIcon
5
+ */
6
+ export declare const BellIcon: ({ color, ...props }: IconProps) => JSX.Element;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.BellIcon = void 0;
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ /**
17
+ * OVERRIDE!
18
+ * This replaces Radix UI BellIcon
19
+ */
20
+ const BellIcon = (_a) => {
21
+ var { color = 'currentColor' } = _a, props = __rest(_a, ["color"]);
22
+ return (jsx_runtime_1.jsx("svg", Object.assign({ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: jsx_runtime_1.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.47306 1.22943C6.5193 1.22943 5.87291 1.98399 5.65371 2.72697C5.65207 2.72932 5.64921 2.73303 5.64485 2.73756C5.6392 2.74342 5.63264 2.74896 5.62599 2.75355C5.61926 2.75819 5.61452 2.7604 5.613 2.76102L5.61265 2.76117C5.05088 2.99251 4.39193 3.36022 3.87697 4.03357C3.35815 4.71196 3.01949 5.65571 3.01945 6.97749L5.65371 2.72697L3.01945 6.97776C3.01866 8.30165 2.87871 9.0313 2.67091 9.53439C2.48879 9.97531 2.24889 10.2658 1.912 10.6738L1.91185 10.674C1.86263 10.7336 1.81135 10.7957 1.75787 10.8612C1.14923 11.606 1.72729 12.6419 2.65986 12.6419H5.09019C5.21191 12.98 5.40726 13.2906 5.66618 13.5495C6.12827 14.0116 6.75499 14.2712 7.40848 14.2712C8.06197 14.2712 8.6887 14.0116 9.15078 13.5495C9.40971 13.2906 9.60505 12.98 9.72678 12.6419H12.2894C13.2234 12.6419 13.792 11.6008 13.1884 10.8613L13.1883 10.8612C13.1348 10.7957 13.0835 10.7336 13.0342 10.674C12.6973 10.2659 12.4574 9.9754 12.2755 9.53451C12.0678 9.03147 11.9282 8.30182 11.9282 6.97776C11.9282 5.65688 11.5891 4.71299 11.0703 4.03433C10.5553 3.36075 9.89652 2.99234 9.33499 2.76115L9.33467 2.76102C9.33409 2.76079 9.32982 2.75888 9.32313 2.75424C9.31655 2.74967 9.30981 2.74394 9.30382 2.7377C9.29875 2.73241 9.29545 2.72803 9.29363 2.72531C9.07264 1.98378 8.42691 1.22943 7.47306 1.22943ZM8.68654 12.6419H6.13042C6.1876 12.7295 6.25403 12.8115 6.3291 12.8866C6.61537 13.1729 7.00363 13.3337 7.40848 13.3337C7.81333 13.3337 8.2016 13.1729 8.48787 12.8866C8.56293 12.8115 8.62937 12.7295 8.68654 12.6419ZM6.55145 2.99716C6.69571 2.50085 7.07121 2.16693 7.47306 2.16693C7.87492 2.16693 8.2505 2.50061 8.3966 2.99785L8.39695 2.99904C8.48499 3.29575 8.72843 3.52538 8.97809 3.62806C9.45625 3.82492 9.94894 4.11119 10.3255 4.60373C10.6982 5.09119 10.9907 5.82486 10.9907 6.97776C10.9907 8.35506 11.1337 9.2255 11.4089 9.89217C11.6483 10.4723 11.9823 10.8749 12.3167 11.278C12.3653 11.3366 12.4139 11.3951 12.4622 11.4542C12.5016 11.5025 12.5046 11.5552 12.4793 11.605C12.4553 11.6524 12.3996 11.7044 12.2894 11.7044H2.65986C2.54604 11.7044 2.48955 11.6509 2.46588 11.6045C2.44119 11.5562 2.44325 11.504 2.4838 11.4544L2.48383 11.4544C2.53215 11.3952 2.58075 11.3366 2.62934 11.2781L2.62946 11.2779C2.96389 10.8748 3.29785 10.4723 3.5374 9.89229C3.81273 9.22571 3.95615 8.35533 3.95695 6.97803V6.97776C3.95695 5.82341 4.24928 5.08999 4.62165 4.60309C4.99792 4.1111 5.49044 3.82537 5.96963 3.62805C6.21661 3.52645 6.46257 3.30002 6.55111 2.99833L6.55145 2.99716Z", fill: color }, void 0) }), void 0));
23
+ };
24
+ exports.BellIcon = BellIcon;
@@ -1,2 +1,5 @@
1
1
  import { IconProps } from '@modulz/radix-icons/dist/types';
2
+ /**
3
+ * OpenFin Icon
4
+ */
2
5
  export declare const OpenFinIcon: ({ color, ...props }: IconProps) => JSX.Element;
@@ -13,6 +13,9 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.OpenFinIcon = void 0;
15
15
  const jsx_runtime_1 = require("react/jsx-runtime");
16
+ /**
17
+ * OpenFin Icon
18
+ */
16
19
  const OpenFinIcon = (_a) => {
17
20
  var { color = 'currentColor' } = _a, props = __rest(_a, ["color"]);
18
21
  return (jsx_runtime_1.jsx("svg", Object.assign({ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: jsx_runtime_1.jsx("path", { d: "M14.2685 5.73916C14.1785 5.64906 14.0817 5.56592 13.979 5.49047L13.9412 5.46429C13.9196 5.44919 13.8984 5.43358 13.8763 5.41898C13.8541 5.40438 13.8284 5.38878 13.8048 5.37418L13.7715 5.35354C13.7418 5.33592 13.7116 5.3193 13.6814 5.30319L13.6638 5.29363C13.3065 5.10618 12.9091 5.00807 12.5057 5.00768C11.8417 5.00715 11.2052 4.74291 10.7362 4.2731C10.2671 3.8033 10.004 3.16642 10.0046 2.50262C10.0065 1.49222 9.39933 0.580219 8.46634 0.191911C7.53335 -0.196397 6.45826 0.015466 5.74244 0.728701C5.02661 1.44194 4.81103 2.51607 5.19621 3.4502C5.5814 4.38433 6.4915 4.99447 7.5021 4.9961C8.16603 4.99664 8.80256 5.26088 9.27161 5.73068C9.74066 6.20049 10.0038 6.83736 10.0031 7.50117C10.0026 8.16497 9.7383 8.80137 9.2684 9.27032C8.7985 9.73928 8.1615 10.0024 7.49756 10.0017C6.83413 10.0022 6.19772 9.73894 5.72865 9.26987C5.25958 8.8008 4.99636 8.16447 4.99703 7.50117C4.99703 6.12155 3.87841 5.00315 2.49852 5.00315C1.11862 5.00315 0 6.12155 0 7.50117C0 8.88078 1.11862 9.99918 2.49852 9.99918C3.87841 9.99918 4.99703 11.1176 4.99703 12.4972C4.99703 13.8795 6.1178 15 7.50033 15C8.88287 15 10.0036 13.8795 10.0036 12.4972C10.0036 11.1176 11.1223 9.99918 12.5021 9.99918C12.9482 9.99948 13.3862 9.88022 13.7705 9.65383C13.8038 9.6342 13.8365 9.61356 13.8712 9.59241L13.8783 9.58788C13.9085 9.56775 13.9387 9.5466 13.9679 9.52546L13.981 9.5164C14.0072 9.49727 14.0314 9.47662 14.0591 9.45598L14.0812 9.43887C14.1054 9.41923 14.1286 9.39859 14.1522 9.37795L14.1779 9.3558C14.2081 9.32862 14.2378 9.30042 14.267 9.27123L14.2716 9.2672C14.3794 9.15887 14.4772 9.04091 14.5636 8.9148C14.5824 8.88761 14.6005 8.86009 14.618 8.83223C15.237 7.84584 15.092 6.56267 14.2685 5.73916Z", fill: color }, void 0) }), void 0));
@@ -0,0 +1,5 @@
1
+ import { IconProps } from '@modulz/radix-icons/dist/types';
2
+ /**
3
+ * OpenFin Workspace Icon
4
+ */
5
+ export declare const WorkspaceIcon: ({ color, ...props }: IconProps) => JSX.Element;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.WorkspaceIcon = void 0;
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ /**
17
+ * OpenFin Workspace Icon
18
+ */
19
+ const WorkspaceIcon = (_a) => {
20
+ var { color = 'currentColor' } = _a, props = __rest(_a, ["color"]);
21
+ return (jsx_runtime_1.jsxs("svg", Object.assign({ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [jsx_runtime_1.jsx("rect", { x: "0.000244141", y: "0.00012207", width: "7.49997", height: "8.74997", rx: "1.16071", fill: color }, void 0),
22
+ jsx_runtime_1.jsx("rect", { x: "9.33048", y: "5.58035", width: "6.33926", height: "8.83925", rx: "0.580355", stroke: color, strokeWidth: "1.16071" }, void 0),
23
+ jsx_runtime_1.jsx("rect", { x: "8.75012", width: "7.49997", height: "3.74999", rx: "1.16071", fill: color }, void 0),
24
+ jsx_runtime_1.jsx("rect", { y: "10", width: "7.49997", height: "4.99998", rx: "1.16071", fill: color }, void 0)] }), void 0));
25
+ };
26
+ exports.WorkspaceIcon = WorkspaceIcon;
@@ -1 +1,3 @@
1
1
  export * from './OpenFinIcon';
2
+ export * from './BellIcon';
3
+ export * from './WorkspaceIcon';
@@ -11,3 +11,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./OpenFinIcon"), exports);
14
+ __exportStar(require("./BellIcon"), exports);
15
+ __exportStar(require("./WorkspaceIcon"), exports);
@@ -0,0 +1 @@
1
+ export * from './rawInput';
@@ -10,4 +10,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./input"), exports);
13
+ __exportStar(require("./rawInput"), exports);
@@ -0,0 +1,6 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export declare type RawInputProps = InputHTMLAttributes<HTMLInputElement>;
3
+ /**
4
+ * Unstyled input extended by other components
5
+ */
6
+ export declare const RawInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Input = void 0;
6
+ exports.RawInput = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  /**
9
- * Unstyled Input extended by other components
9
+ * Unstyled input extended by other components
10
10
  */
11
- exports.Input = styled_components_1.default.input ``;
12
- exports.Input.displayName = 'Input';
11
+ exports.RawInput = styled_components_1.default.input ``;
12
+ exports.RawInput.displayName = 'RawInput';
@@ -1,3 +1,6 @@
1
1
  import { FC, InputHTMLAttributes } from 'react';
2
- export declare type TextInputProps = InputHTMLAttributes<HTMLInputElement>;
3
- export declare const TextInput: import("styled-components").StyledComponent<FC<TextInputProps>, import("styled-components").DefaultTheme, {}, never>;
2
+ export declare type TextInputProps = InputHTMLAttributes<HTMLInputElement> & {
3
+ message?: string;
4
+ label?: string;
5
+ };
6
+ export declare const TextInput: FC;
@@ -17,14 +17,48 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.TextInput = void 0;
18
18
  const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const styled_components_1 = __importDefault(require("styled-components"));
20
- const Input_1 = require("../Input");
21
- const TextInputInner = (_a) => {
22
- var { className } = _a, rest = __rest(_a, ["className"]);
23
- return (jsx_runtime_1.jsx(Input_1.Input, Object.assign({ className: className, type: "text" }, rest), void 0));
24
- };
25
- exports.TextInput = styled_components_1.default(TextInputInner) `
20
+ const RawInput_1 = require("../RawInput");
21
+ const HOC_1 = require("../../system/HOC");
22
+ const Box_1 = require("../../layout/Box");
23
+ const Text_1 = require("../../typography/Text");
24
+ const ThemeProvider_1 = require("../../system/ThemeProvider");
25
+ exports.TextInput = HOC_1.withStatus((_a) => {
26
+ var { className, message, label, status, name } = _a, rest = __rest(_a, ["className", "message", "label", "status", "name"]);
27
+ return (jsx_runtime_1.jsxs(InputContainer, Object.assign({ flexDirection: "column", alignItems: "flex-start" }, { children: [!!label && (jsx_runtime_1.jsx(InputLabel, Object.assign({ as: "label", htmlFor: name, weight: "bold" }, { children: label }), void 0)),
28
+ jsx_runtime_1.jsx(StyledInputField, Object.assign({ className: className, type: "text", name: name, status: status }, rest), void 0),
29
+ !!message && jsx_runtime_1.jsx(InputMessage, Object.assign({ status: status }, { children: message }), void 0)] }), void 0));
30
+ });
31
+ const InputLabel = styled_components_1.default(Text_1.Text) `
32
+ margin-bottom: ${({ theme }) => theme.px.small};
33
+ `;
34
+ const InputMessage = styled_components_1.default(Text_1.Text) `
35
+ color: ${({ theme, status }) => ThemeProvider_1.getStatusColor(theme, status, 'textHelp')};
36
+ margin-top: ${({ theme }) => theme.px.small};
37
+ `;
38
+ const InputContainer = styled_components_1.default(Box_1.Box) `
39
+ font-size: ${({ theme }) => theme.fontSize.base};
40
+ `;
41
+ const StyledInputField = styled_components_1.default(RawInput_1.RawInput) `
26
42
  background: ${({ theme }) => theme.palette.inputBg};
27
43
  border: 1px solid ${({ theme }) => theme.palette.inputBg};
44
+ border-color: ${({ theme, status }) => ThemeProvider_1.getStatusColor(theme, status, 'inputBg')};
45
+ border-radius: ${({ theme }) => theme.radius.small};
28
46
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
29
47
  color: ${({ theme }) => theme.palette.inputColor};
48
+ font-size: ${({ theme }) => theme.fontSize.base};
49
+ padding: ${({ theme }) => `${theme.px.small} ${theme.px.base}`};
50
+ transition: border-color var(--global-transition);
51
+
52
+ &:focus {
53
+ outline: 0;
54
+ border-color: ${({ theme }) => theme.palette.inputFocused};
55
+ }
56
+
57
+ &:disabled {
58
+ cursor: not-allowed;
59
+ }
60
+
61
+ &:disabled::placeholder {
62
+ color: ${({ theme }) => theme.palette.inputDisabled};
63
+ }
30
64
  `;
@@ -22,10 +22,6 @@ exports.GlobalStyles = styled_components_1.createGlobalStyle `
22
22
  box-sizing: border-box;
23
23
  margin: 0;
24
24
  padding: 0;
25
- /**
26
- * Smooths light-on-dark Fonts on Mac
27
- */
28
- -webkit-font-smoothing: antialiased;
29
25
  /**
30
26
  * Prevent browser auto-weighting
31
27
  * @link https://css-tricks.com/almanac/properties/f/font-synthesis/
@@ -0,0 +1,11 @@
1
+ import { ComponentType, FC } from 'react';
2
+ export declare type StatusType = 'success' | 'warning' | 'critical' | 'active';
3
+ export declare type WithStatusProps = {
4
+ status?: StatusType;
5
+ };
6
+ /**
7
+ * withStatus HOC
8
+ * Takes a component and applies the status prop to it.
9
+ * @returns Instantiated component w/ status and other props applied.
10
+ */
11
+ export declare const withStatus: <P extends object>(Component: ComponentType<P>) => FC<P & WithStatusProps>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.withStatus = void 0;
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ /**
17
+ * withStatus HOC
18
+ * Takes a component and applies the status prop to it.
19
+ * @returns Instantiated component w/ status and other props applied.
20
+ */
21
+ const withStatus = (Component) => function withStatus(_a) {
22
+ var { status } = _a, props = __rest(_a, ["status"]);
23
+ return jsx_runtime_1.jsx(Component, Object.assign({ status: status }, props), void 0);
24
+ };
25
+ exports.withStatus = withStatus;
@@ -205,6 +205,8 @@ export declare const Transition: {
205
205
  */
206
206
  export declare const IconSet: {
207
207
  readonly OpenFinIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
208
+ readonly BellIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
209
+ readonly WorkspaceIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
208
210
  readonly ActivityLogIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
209
211
  readonly AlignBaselineIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
210
212
  readonly AlignBottomIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
@@ -229,7 +231,6 @@ export declare const IconSet: {
229
231
  readonly BackpackIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
230
232
  readonly BadgeIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
231
233
  readonly BarChartIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
232
- readonly BellIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
233
234
  readonly BlendingModeIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
234
235
  readonly BookmarkIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
235
236
  readonly BorderAllIcon: ({ color, ...props }: import("@modulz/radix-icons/dist/types").IconProps) => JSX.Element;
@@ -510,7 +511,7 @@ export declare const IconSet: {
510
511
  export declare const IconSize: {
511
512
  readonly xsmall: "8px";
512
513
  readonly small: "12px";
513
- readonly base: "16px";
514
+ readonly base: "15px";
514
515
  readonly large: "20px";
515
516
  readonly xlarge: "24px";
516
517
  readonly xxlarge: "32px";
@@ -248,7 +248,7 @@ exports.IconSet = Object.assign(Object.assign({}, RadixIcons), OpenFinIcons);
248
248
  exports.IconSize = {
249
249
  [exports.Size.xsmall]: exports.UnitPx.small,
250
250
  [exports.Size.small]: exports.UnitPx.base,
251
- [exports.Size.base]: exports.UnitPx.large,
251
+ [exports.Size.base]: '15px',
252
252
  [exports.Size.large]: exports.UnitPx.xlarge,
253
253
  [exports.Size.xlarge]: exports.UnitPx.xxlarge,
254
254
  [exports.Size.xxlarge]: exports.UnitPx.xxxlarge,
@@ -1,4 +1,5 @@
1
1
  import { DefaultTheme, StyledProps } from 'styled-components';
2
+ import { StatusType } from '../../HOC';
2
3
  export declare type ComponentVariants = {
3
4
  [key: string]: {
4
5
  [key: string]: any;
@@ -17,3 +18,8 @@ export declare const getVariantCSS: (variants: ComponentVariants, variantProp: s
17
18
  export declare const getFontFaces: ({ theme }: {
18
19
  theme: DefaultTheme;
19
20
  }) => import("styled-components").FlattenSimpleInterpolation;
21
+ /**
22
+ * Retrive the correct palette value based on the provided status type.
23
+ * Falls back to optionally provided palette key, then to 'inherit'.
24
+ */
25
+ export declare const getStatusColor: (theme: DefaultTheme, status?: StatusType | undefined, defaultKey?: "background1" | "background2" | "background3" | "background4" | "background5" | "background6" | "brandPrimary" | "brandSecondary" | "inputBg" | "inputColor" | "inputPlaceholder" | "inputDisabled" | "inputFocused" | "statusSuccess" | "statusWarning" | "statusCritical" | "statusActive" | "textDefault" | "textHelp" | "textInactive" | undefined) => string;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getFontFaces = exports.getVariantCSS = void 0;
6
+ exports.getStatusColor = exports.getFontFaces = exports.getVariantCSS = void 0;
7
7
  const font_face_base64_1 = __importDefault(require("./font-face-base64"));
8
8
  const font_face_cdn_1 = __importDefault(require("./font-face-cdn"));
9
9
  /**
@@ -29,3 +29,22 @@ const getFontFaces = ({ theme }) => {
29
29
  }
30
30
  };
31
31
  exports.getFontFaces = getFontFaces;
32
+ /**
33
+ * Retrive the correct palette value based on the provided status type.
34
+ * Falls back to optionally provided palette key, then to 'inherit'.
35
+ */
36
+ const getStatusColor = (theme, status, defaultKey) => {
37
+ switch (status) {
38
+ case 'active':
39
+ return theme.palette.statusActive;
40
+ case 'critical':
41
+ return theme.palette.statusCritical;
42
+ case 'warning':
43
+ return theme.palette.statusWarning;
44
+ case 'success':
45
+ return theme.palette.statusSuccess;
46
+ default:
47
+ return defaultKey ? theme.palette[defaultKey] : 'inherit';
48
+ }
49
+ };
50
+ exports.getStatusColor = getStatusColor;
package/dist/index.d.ts CHANGED
@@ -2,7 +2,8 @@ export * from './components/controls/Button';
2
2
  export * from './components/controls/Toggle';
3
3
  export * from './components/elements/Badge';
4
4
  export * from './components/elements/Icon';
5
- export * from './components/input/Input';
5
+ export * from './components/input/RawInput';
6
+ export * from './components/input/TextInput';
6
7
  export * from './components/layout/Box';
7
8
  export * from './components/list/DefinitionList';
8
9
  export * from './components/system/GlobalStyles';
package/dist/index.js CHANGED
@@ -27,7 +27,8 @@ __exportStar(require("./components/controls/Button"), exports);
27
27
  __exportStar(require("./components/controls/Toggle"), exports);
28
28
  __exportStar(require("./components/elements/Badge"), exports);
29
29
  __exportStar(require("./components/elements/Icon"), exports);
30
- __exportStar(require("./components/input/Input"), exports);
30
+ __exportStar(require("./components/input/RawInput"), exports);
31
+ __exportStar(require("./components/input/TextInput"), exports);
31
32
  __exportStar(require("./components/layout/Box"), exports);
32
33
  __exportStar(require("./components/list/DefinitionList"), exports);
33
34
  __exportStar(require("./components/system/GlobalStyles"), exports);
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@openfin/ui-library",
3
3
  "description": "OpenFin UI Component Library",
4
- "version": "0.1.1",
4
+ "version": "0.1.2-alpha.1616610935",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "repository": "github:openfin/ui-library",
8
+ "homepage": "https://openfin-ui.netlify.app",
7
9
  "files": [
8
10
  "dist/**/*"
9
11
  ],
@@ -1 +0,0 @@
1
- export * from './input';
@@ -1,6 +0,0 @@
1
- import { InputHTMLAttributes } from 'react';
2
- export declare type InputProps = InputHTMLAttributes<HTMLInputElement>;
3
- /**
4
- * Unstyled Input extended by other components
5
- */
6
- export declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;