@elliemae/ds-app-picker 2.1.0-rc.7 → 2.2.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -1,11 +1,36 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var DSAppPicker = require('./DSAppPicker.js');
6
-
7
-
8
-
9
- exports.AppPickerWithSchema = DSAppPicker.AppPickerWithSchema;
10
- exports.DSAppPicker = DSAppPicker.DSAppPicker;
11
- exports["default"] = DSAppPicker.DSAppPicker;
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var src_exports = {};
29
+ __export(src_exports, {
30
+ default: () => import_DSAppPicker.default
31
+ });
32
+ var React = __toESM(require("react"));
33
+ __reExport(src_exports, __toESM(require("./DSAppPicker")));
34
+ var import_DSAppPicker = __toESM(require("./DSAppPicker"));
35
+ module.exports = __toCommonJS(src_exports);
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './DSAppPicker';\n\nexport { default } from './DSAppPicker';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AAEd,yBAAwB;",
6
+ "names": []
7
+ }
package/cjs/propTypes.js CHANGED
@@ -1,25 +1,50 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var reactDesc = require('react-desc');
6
- var dsIcons = require('@elliemae/ds-icons');
7
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var propTypes_exports = {};
29
+ __export(propTypes_exports, {
30
+ propTypes: () => propTypes
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react_desc = __toESM(require("react-desc"));
34
+ var import_ds_icons = __toESM(require("@elliemae/ds-icons"));
8
35
  const propTypes = {
9
- apps: reactDesc.PropTypes.array.description('Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]').isRequired,
10
- customApps: reactDesc.PropTypes.array.description('Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]'),
11
- sectionTitle: reactDesc.PropTypes.string.description('main section title').defaultValue('APPLICATIONS'),
12
- customSectionTitle: reactDesc.PropTypes.string.description('custom section title').defaultValue('CUSTOM APPLICATIONS'),
13
- icon: reactDesc.PropTypes.func.description('trigger button s icon').defaultValue(dsIcons.MenuPicker),
14
- renderTrigger: reactDesc.PropTypes.func.description('Custom trigger component.'),
15
- actionRef: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.func, reactDesc.PropTypes.shape({
16
- current: reactDesc.PropTypes.any
17
- })]).description('Ref containing a focusToIndex method. This method allows you to focus any App inside the AppPicker.'),
18
- isOpen: reactDesc.PropTypes.bool.description('Wether the AppPicker should be open or not.'),
19
- onClose: reactDesc.PropTypes.func.description('Callback function when the AppPicker closes'),
20
- onKeyDown: reactDesc.PropTypes.func.description('OnKeyDown handler callback.'),
21
- onClick: reactDesc.PropTypes.func.description('Custom onClick for Trigger component.'),
22
- onClickOutside: reactDesc.PropTypes.func.description('Callback event when the user clicks outside the App Picker.')
36
+ apps: import_react_desc.PropTypes.array.description("Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]").isRequired,
37
+ customApps: import_react_desc.PropTypes.array.description("Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]"),
38
+ sectionTitle: import_react_desc.PropTypes.string.description("main section title").defaultValue("APPLICATIONS"),
39
+ customSectionTitle: import_react_desc.PropTypes.string.description("custom section title").defaultValue("CUSTOM APPLICATIONS"),
40
+ icon: import_react_desc.PropTypes.func.description("trigger button s icon").defaultValue(import_ds_icons.MenuPicker),
41
+ renderTrigger: import_react_desc.PropTypes.func.description("Custom trigger component."),
42
+ actionRef: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.func, import_react_desc.PropTypes.shape({ current: import_react_desc.PropTypes.any })]).description("Ref containing a focusToIndex method. This method allows you to focus any App inside the AppPicker."),
43
+ isOpen: import_react_desc.PropTypes.bool.description("Wether the AppPicker should be open or not."),
44
+ onClose: import_react_desc.PropTypes.func.description("Callback function when the AppPicker closes"),
45
+ onKeyDown: import_react_desc.PropTypes.func.description("OnKeyDown handler callback."),
46
+ onClick: import_react_desc.PropTypes.func.description("Custom onClick for Trigger component."),
47
+ onClickOutside: import_react_desc.PropTypes.func.description("Callback event when the user clicks outside the App Picker.")
23
48
  };
24
-
25
- exports.propTypes = propTypes;
49
+ module.exports = __toCommonJS(propTypes_exports);
50
+ //# sourceMappingURL=propTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { PropTypes } from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\n\nexport const propTypes = {\n apps: PropTypes.array.description(\n 'Main items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]',\n ).isRequired,\n customApps: PropTypes.array.description(\n 'Custom items. Format: [{ label:string, icon:component, onClick:func, disabled:bool, selected:bool }]',\n ),\n sectionTitle: PropTypes.string.description('main section title').defaultValue('APPLICATIONS'),\n customSectionTitle: PropTypes.string.description('custom section title').defaultValue('CUSTOM APPLICATIONS'),\n icon: PropTypes.func.description('trigger button s icon').defaultValue(MenuPicker),\n renderTrigger: PropTypes.func.description('Custom trigger component.'),\n actionRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'Ref containing a focusToIndex method. This method allows you to focus any App inside the AppPicker.',\n ),\n isOpen: PropTypes.bool.description('Wether the AppPicker should be open or not.'),\n onClose: PropTypes.func.description('Callback function when the AppPicker closes'),\n onKeyDown: PropTypes.func.description('OnKeyDown handler callback.'),\n onClick: PropTypes.func.description('Custom onClick for Trigger component.'),\n onClickOutside: PropTypes.func.description('Callback event when the user clicks outside the App Picker.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAC1B,sBAA2B;AAEpB,MAAM,YAAY;AAAA,EACvB,MAAM,4BAAU,MAAM,YACpB,sGACA;AAAA,EACF,YAAY,4BAAU,MAAM,YAC1B;AAAA,EAEF,cAAc,4BAAU,OAAO,YAAY,sBAAsB,aAAa;AAAA,EAC9E,oBAAoB,4BAAU,OAAO,YAAY,wBAAwB,aAAa;AAAA,EACtF,MAAM,4BAAU,KAAK,YAAY,yBAAyB,aAAa;AAAA,EACvE,eAAe,4BAAU,KAAK,YAAY;AAAA,EAC1C,WAAW,4BAAU,UAAU,CAAC,4BAAU,MAAM,4BAAU,MAAM,EAAE,SAAS,4BAAU,SAAS,YAC5F;AAAA,EAEF,QAAQ,4BAAU,KAAK,YAAY;AAAA,EACnC,SAAS,4BAAU,KAAK,YAAY;AAAA,EACpC,WAAW,4BAAU,KAAK,YAAY;AAAA,EACtC,SAAS,4BAAU,KAAK,YAAY;AAAA,EACpC,gBAAgB,4BAAU,KAAK,YAAY;AAAA;",
6
+ "names": []
7
+ }
package/cjs/styles.js CHANGED
@@ -1,164 +1,190 @@
1
- 'use strict';
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var styles_exports = {};
29
+ __export(styles_exports, {
30
+ StyledChip: () => StyledChip,
31
+ StyledChipLabel: () => StyledChipLabel,
32
+ StyledGrid: () => StyledGrid,
33
+ StyledRow: () => StyledRow,
34
+ StyledSeparator: () => StyledSeparator,
35
+ StyledTitle: () => StyledTitle,
36
+ StyledWrapper: () => StyledWrapper
37
+ });
38
+ var React = __toESM(require("react"));
39
+ var import_ds_system = __toESM(require("@elliemae/ds-system"));
40
+ const StyledTitle = (0, import_ds_system.styled)("h3", { name: "DS-AppPicker", slot: "title" })`
41
+ color: ${({ theme }) => theme.colors.neutral[700]};
42
+ font-size: ${({ theme }) => theme.fontSizes.value[400]};
43
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
44
+ margin: 12px 0 0 0;
45
+ line-height: 1.38;
46
+ text-transform: uppercase;
47
+ `;
48
+ const StyledWrapper = (0, import_ds_system.styled)("ul", { name: "DS-AppPicker", slot: "root" })`
49
+ align-items: center;
50
+ min-width: 308px;
51
+ min-height: 110px;
52
+ max-height: 449px;
53
+ width: 308px;
54
+ overflow-y: auto;
55
+ overflow-x: hidden;
56
+ margin: 0;
57
+ padding: ${({ isOverflow }) => isOverflow ? "0 0 0 16px" : "0 16px"};
58
+ &:focus {
59
+ outline: none;
60
+ }
61
+ `;
62
+ const StyledGrid = (0, import_ds_system.styled)("div", { name: "DS-AppPicker", slot: "grid" })`
63
+ display: flex;
64
+ flex-direction: column;
65
+ justify-content: center;
66
+ align-items: center;
67
+ width: 100%;
68
+ margin: 8px 0;
69
+ `;
70
+ const StyledRow = (0, import_ds_system.styled)("div", { name: "DS-AppPicker", slot: "row" })`
71
+ display: flex;
72
+ width: 100%;
73
+ `;
74
+ const StyledChipLabel = (0, import_ds_system.styled)("p", { name: "DS-AppPicker", slot: "chipLabel" })`
75
+ font-size: ${({ theme }) => theme.fontSizes.label[200]};
76
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
77
+ word-wrap: break-word;
78
+ margin: 0 6px;
79
+ line-height: 1.45;
80
+ width: 100%;
81
+ z-index: 120;
2
82
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
83
+ & span {
84
+ padding-top: 6px;
85
+ }
86
+ `;
87
+ const styledChipSelectedCss = import_ds_system.css`
88
+ color: ${({ theme }) => theme.colors.brand[800]};
89
+ background-color: ${({ theme }) => theme.colors.brand[200]};
4
90
 
5
- var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
6
- var dsSystem = require('@elliemae/ds-system');
91
+ .app-picker__icon {
92
+ fill: ${({ theme }) => theme.colors.brand[800]};
93
+ }
7
94
 
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
95
+ &:before {
96
+ border: 1px solid ${({ theme }) => theme.colors.brand[600]};
97
+ }
9
98
 
10
- var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
99
+ &:focus {
100
+ &:before {
101
+ border: 2px solid ${({ theme }) => theme.colors.brand[800]};
102
+ }
103
+ }
104
+ `;
105
+ const StyledChip = (0, import_ds_system.styled)("button", { name: "DS-AppPicker", slot: "chip" })`
106
+ position: relative;
107
+ display: flex;
108
+ flex-direction: column;
109
+ align-items: center;
110
+ justify-content: center;
111
+ border: none;
112
+ height: 68px;
113
+ width: 92px;
114
+ background-color: #fff;
115
+ color: ${({ theme }) => theme.colors.brand[600]};
116
+ cursor: pointer;
117
+ outline: none;
11
118
 
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
13
- const StyledTitle = dsSystem.styled('h3', {
14
- name: 'DS-AppPicker',
15
- slot: 'title'
16
- })(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n margin: 12px 0 0 0;\n line-height: 1.38;\n text-transform: uppercase;\n"])), _ref => {
17
- let {
18
- theme
19
- } = _ref;
20
- return theme.colors.neutral[700];
21
- }, _ref2 => {
22
- let {
23
- theme
24
- } = _ref2;
25
- return theme.fontSizes.value[400];
26
- }, _ref3 => {
27
- let {
28
- theme
29
- } = _ref3;
30
- return theme.fontWeights.semibold;
31
- });
32
- const StyledWrapper = dsSystem.styled('ul', {
33
- name: 'DS-AppPicker',
34
- slot: 'root'
35
- })(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default["default"](["\n align-items: center;\n min-width: 308px;\n min-height: 110px;\n max-height: 449px;\n width: 308px;\n overflow-y: auto;\n overflow-x: hidden;\n margin: 0;\n padding: ", ";\n &:focus {\n outline: none;\n }\n"])), _ref4 => {
36
- let {
37
- isOverflow
38
- } = _ref4;
39
- return isOverflow ? '0 0 0 16px' : '0 16px';
40
- });
41
- const StyledGrid = dsSystem.styled('div', {
42
- name: 'DS-AppPicker',
43
- slot: 'grid'
44
- })(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default["default"](["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin: 8px 0;\n"])));
45
- const StyledRow = dsSystem.styled('div', {
46
- name: 'DS-AppPicker',
47
- slot: 'row'
48
- })(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral__default["default"](["\n display: flex;\n width: 100%;\n"])));
49
- const StyledChipLabel = dsSystem.styled('p', {
50
- name: 'DS-AppPicker',
51
- slot: 'chipLabel'
52
- })(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral__default["default"](["\n font-size: ", ";\n font-weight: ", ";\n word-wrap: break-word;\n margin: 0 6px;\n line-height: 1.45;\n width: 100%;\n z-index: 120;\n\n & span {\n padding-top: 6px;\n }\n"])), _ref5 => {
53
- let {
54
- theme
55
- } = _ref5;
56
- return theme.fontSizes.label[200];
57
- }, _ref6 => {
58
- let {
59
- theme
60
- } = _ref6;
61
- return theme.fontWeights.semibold;
62
- });
63
- const styledChipSelectedCss = dsSystem.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral__default["default"](["\n color: ", ";\n background-color: ", ";\n\n .app-picker__icon {\n fill: ", ";\n }\n\n &:before {\n border: 1px solid ", ";\n }\n\n &:focus {\n &:before {\n border: 2px solid ", ";\n }\n }\n"])), _ref7 => {
64
- let {
65
- theme
66
- } = _ref7;
67
- return theme.colors.brand[800];
68
- }, _ref8 => {
69
- let {
70
- theme
71
- } = _ref8;
72
- return theme.colors.brand[200];
73
- }, _ref9 => {
74
- let {
75
- theme
76
- } = _ref9;
77
- return theme.colors.brand[800];
78
- }, _ref10 => {
79
- let {
80
- theme
81
- } = _ref10;
82
- return theme.colors.brand[600];
83
- }, _ref11 => {
84
- let {
85
- theme
86
- } = _ref11;
87
- return theme.colors.brand[800];
88
- });
89
- const StyledChip = dsSystem.styled('button', {
90
- name: 'DS-AppPicker',
91
- slot: 'chip'
92
- })(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral__default["default"](["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: none;\n height: 68px;\n width: 92px;\n background-color: #fff;\n color: ", ";\n cursor: pointer;\n outline: none;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid transparent;\n }\n\n & .app-picker__icon {\n fill: ", ";\n height: 28px;\n width: 28px;\n }\n\n & .app-picker__icon svg {\n height: 28px;\n width: 28px;\n }\n\n &:hover {\n color: ", ";\n background-color: ", ";\n .app-picker__icon {\n fill: ", ";\n }\n }\n\n &:focus {\n &:before {\n border-color: ", ";\n }\n }\n\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n\n .app-picker__icon {\n fill: ", ";\n }\n\n &:focus,\n &:hover {\n background-color: #fff;\n cursor: not-allowed;\n &:before {\n border-color: transparent;\n }\n\n ", " {\n color: ", ";\n }\n }\n\n &:hover .app-picker__icon {\n fill: ", ";\n }\n }\n\n ", "\n"])), _ref12 => {
93
- let {
94
- theme
95
- } = _ref12;
96
- return theme.colors.brand[600];
97
- }, _ref13 => {
98
- let {
99
- theme
100
- } = _ref13;
101
- return theme.colors.brand[600];
102
- }, _ref14 => {
103
- let {
104
- theme
105
- } = _ref14;
106
- return theme.colors.brand[800];
107
- }, _ref15 => {
108
- let {
109
- theme
110
- } = _ref15;
111
- return theme.colors.brand[200];
112
- }, _ref16 => {
113
- let {
114
- theme
115
- } = _ref16;
116
- return theme.colors.brand[800];
117
- }, _ref17 => {
118
- let {
119
- theme
120
- } = _ref17;
121
- return theme.colors.brand[800];
122
- }, _ref18 => {
123
- let {
124
- theme
125
- } = _ref18;
126
- return theme.colors.neutral[500];
127
- }, _ref19 => {
128
- let {
129
- theme
130
- } = _ref19;
131
- return theme.colors.neutral[500];
132
- }, StyledChipLabel, _ref20 => {
133
- let {
134
- theme
135
- } = _ref20;
136
- return theme.colors.neutral[500];
137
- }, _ref21 => {
138
- let {
139
- theme
140
- } = _ref21;
141
- return theme.colors.neutral[500];
142
- }, _ref22 => {
143
- let {
144
- selected
145
- } = _ref22;
146
- return !selected ? '' : styledChipSelectedCss;
147
- });
148
- const StyledSeparator = dsSystem.styled('hr', {
149
- name: 'DS-AppPicker',
150
- slot: 'separator'
151
- })(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral__default["default"](["\n border-top: 1px solid ", ";\n border-bottom: none;\n width: 99%;\n margin: 0;\n"])), _ref23 => {
152
- let {
153
- theme
154
- } = _ref23;
155
- return theme.colors.neutral[100];
156
- });
119
+ &:before {
120
+ content: '';
121
+ position: absolute;
122
+ top: 0;
123
+ left: 0;
124
+ width: 100%;
125
+ height: 100%;
126
+ border-radius: 2px;
127
+ border: 2px solid transparent;
128
+ }
129
+
130
+ & .app-picker__icon {
131
+ fill: ${({ theme }) => theme.colors.brand[600]};
132
+ height: 28px;
133
+ width: 28px;
134
+ }
135
+
136
+ & .app-picker__icon svg {
137
+ height: 28px;
138
+ width: 28px;
139
+ }
140
+
141
+ &:hover {
142
+ color: ${({ theme }) => theme.colors.brand[800]};
143
+ background-color: ${({ theme }) => theme.colors.brand[200]};
144
+ .app-picker__icon {
145
+ fill: ${({ theme }) => theme.colors.brand[800]};
146
+ }
147
+ }
148
+
149
+ &:focus {
150
+ &:before {
151
+ border-color: ${({ theme }) => theme.colors.brand[800]};
152
+ }
153
+ }
154
+
155
+ &:disabled {
156
+ color: ${({ theme }) => theme.colors.neutral[500]};
157
+ cursor: not-allowed;
158
+
159
+ .app-picker__icon {
160
+ fill: ${({ theme }) => theme.colors.neutral[500]};
161
+ }
162
+
163
+ &:focus,
164
+ &:hover {
165
+ background-color: #fff;
166
+ cursor: not-allowed;
167
+ &:before {
168
+ border-color: transparent;
169
+ }
170
+
171
+ ${StyledChipLabel} {
172
+ color: ${({ theme }) => theme.colors.neutral[500]};
173
+ }
174
+ }
175
+
176
+ &:hover .app-picker__icon {
177
+ fill: ${({ theme }) => theme.colors.neutral[500]};
178
+ }
179
+ }
157
180
 
158
- exports.StyledChip = StyledChip;
159
- exports.StyledChipLabel = StyledChipLabel;
160
- exports.StyledGrid = StyledGrid;
161
- exports.StyledRow = StyledRow;
162
- exports.StyledSeparator = StyledSeparator;
163
- exports.StyledTitle = StyledTitle;
164
- exports.StyledWrapper = StyledWrapper;
181
+ ${({ selected }) => !selected ? "" : styledChipSelectedCss}
182
+ `;
183
+ const StyledSeparator = (0, import_ds_system.styled)("hr", { name: "DS-AppPicker", slot: "separator" })`
184
+ border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
185
+ border-bottom: none;
186
+ width: 99%;
187
+ margin: 0;
188
+ `;
189
+ module.exports = __toCommonJS(styles_exports);
190
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\n\nexport const StyledTitle = styled('h3', { name: 'DS-AppPicker', slot: 'title' })`\n color: ${({ theme }) => theme.colors.neutral[700]};\n font-size: ${({ theme }) => theme.fontSizes.value[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n margin: 12px 0 0 0;\n line-height: 1.38;\n text-transform: uppercase;\n`;\n\nexport const StyledWrapper = styled('ul', { name: 'DS-AppPicker', slot: 'root' })`\n align-items: center;\n min-width: 308px;\n min-height: 110px;\n max-height: 449px;\n width: 308px;\n overflow-y: auto;\n overflow-x: hidden;\n margin: 0;\n padding: ${({ isOverflow }) => (isOverflow ? '0 0 0 16px' : '0 16px')};\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledGrid = styled('div', { name: 'DS-AppPicker', slot: 'grid' })`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin: 8px 0;\n`;\n\nexport const StyledRow = styled('div', { name: 'DS-AppPicker', slot: 'row' })`\n display: flex;\n width: 100%;\n`;\n\nexport const StyledChipLabel = styled('p', { name: 'DS-AppPicker', slot: 'chipLabel' })`\n font-size: ${({ theme }) => theme.fontSizes.label[200]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n word-wrap: break-word;\n margin: 0 6px;\n line-height: 1.45;\n width: 100%;\n z-index: 120;\n\n & span {\n padding-top: 6px;\n }\n`;\n\nconst styledChipSelectedCss = css`\n color: ${({ theme }) => theme.colors.brand[800]};\n background-color: ${({ theme }) => theme.colors.brand[200]};\n\n .app-picker__icon {\n fill: ${({ theme }) => theme.colors.brand[800]};\n }\n\n &:before {\n border: 1px solid ${({ theme }) => theme.colors.brand[600]};\n }\n\n &:focus {\n &:before {\n border: 2px solid ${({ theme }) => theme.colors.brand[800]};\n }\n }\n`;\n\nexport const StyledChip = styled('button', { name: 'DS-AppPicker', slot: 'chip' })<{ selected: boolean | undefined }>`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: none;\n height: 68px;\n width: 92px;\n background-color: #fff;\n color: ${({ theme }) => theme.colors.brand[600]};\n cursor: pointer;\n outline: none;\n\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid transparent;\n }\n\n & .app-picker__icon {\n fill: ${({ theme }) => theme.colors.brand[600]};\n height: 28px;\n width: 28px;\n }\n\n & .app-picker__icon svg {\n height: 28px;\n width: 28px;\n }\n\n &:hover {\n color: ${({ theme }) => theme.colors.brand[800]};\n background-color: ${({ theme }) => theme.colors.brand[200]};\n .app-picker__icon {\n fill: ${({ theme }) => theme.colors.brand[800]};\n }\n }\n\n &:focus {\n &:before {\n border-color: ${({ theme }) => theme.colors.brand[800]};\n }\n }\n\n &:disabled {\n color: ${({ theme }) => theme.colors.neutral[500]};\n cursor: not-allowed;\n\n .app-picker__icon {\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n\n &:focus,\n &:hover {\n background-color: #fff;\n cursor: not-allowed;\n &:before {\n border-color: transparent;\n }\n\n ${StyledChipLabel} {\n color: ${({ theme }) => theme.colors.neutral[500]};\n }\n }\n\n &:hover .app-picker__icon {\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n }\n\n ${({ selected }) => (!selected ? '' : styledChipSelectedCss)}\n`;\n\nexport const StyledSeparator = styled('hr', { name: 'DS-AppPicker', slot: 'separator' })`\n border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};\n border-bottom: none;\n width: 99%;\n margin: 0;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -1,2 +1,27 @@
1
- 'use strict';
2
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __reExport = (target, module2, copyDefault, desc) => {
9
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
+ for (let key of __getOwnPropNames(module2))
11
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
12
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
13
+ }
14
+ return target;
15
+ };
16
+ var __toESM = (module2, isNodeMode) => {
17
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
+ };
19
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
20
+ return (module2, temp) => {
21
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
22
+ };
23
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
24
+ var AppPickerTypes_exports = {};
25
+ var React = __toESM(require("react"));
26
+ module.exports = __toCommonJS(AppPickerTypes_exports);
27
+ //# sourceMappingURL=AppPickerTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/AppPickerTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { SvgIconType } from '@elliemae/ds-icons';\n\nexport interface AppItemType {\n label: string;\n icon: React.ComponentType<{ className: string; size: string }>;\n onClick: () => void | null;\n disabled?: boolean;\n selected?: boolean;\n}\n\nexport interface AppPickerPropsType {\n apps: AppItemType[];\n customApps: AppItemType[];\n sectionTitle: string;\n customSectionTitle: string;\n icon: SvgIconType;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n actionRef?: React.RefObject<{ focusToIndex: (index: number) => void }>;\n onClick?: (e: MouseEvent) => void;\n onClickOutside?: (e: React.MouseEvent) => void;\n renderTrigger?: React.ComponentType<any>;\n isOpen?: boolean;\n onClose?: () => void;\n triggerRef?: React.RefObject<HTMLButtonElement>;\n}\n\nexport interface AppPickerImplProps {\n apps: AppItemType[];\n customApps: AppItemType[];\n sectionTitle: string;\n customSectionTitle: string;\n close?: () => void;\n onKeyDown: (e: KeyboardEvent) => void;\n wrapperRef: React.RefObject<HTMLUListElement>;\n triggerRef: React.RefObject<HTMLElement>;\n}\n\nexport type DSAppPickerImplType = React.ComponentType<AppPickerImplProps>;\nexport type DSAppPickerType = React.ComponentType<AppPickerPropsType>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
+ "names": []
7
+ }
package/cjs/utils.js CHANGED
@@ -1,18 +1,46 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var utils_exports = {};
29
+ __export(utils_exports, {
30
+ keys: () => keys
31
+ });
32
+ var React = __toESM(require("react"));
5
33
  const keys = {
6
- LEFT: 'ArrowLeft',
7
- UP: 'ArrowUp',
8
- RIGHT: 'ArrowRight',
9
- DOWN: 'ArrowDown',
10
- ENTER: 'Enter',
11
- SPACE: '',
12
- TAB: 'Tab',
13
- ESC: 'Escape',
14
- HOME: 'Home',
15
- END: 'End'
34
+ LEFT: "ArrowLeft",
35
+ UP: "ArrowUp",
36
+ RIGHT: "ArrowRight",
37
+ DOWN: "ArrowDown",
38
+ ENTER: "Enter",
39
+ SPACE: "",
40
+ TAB: "Tab",
41
+ ESC: "Escape",
42
+ HOME: "Home",
43
+ END: "End"
16
44
  };
17
-
18
- exports.keys = keys;
45
+ module.exports = __toCommonJS(utils_exports);
46
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const keys = {\n LEFT: 'ArrowLeft',\n UP: 'ArrowUp',\n RIGHT: 'ArrowRight',\n DOWN: 'ArrowDown',\n ENTER: 'Enter',\n SPACE: '',\n TAB: 'Tab',\n ESC: 'Escape',\n HOME: 'Home',\n END: 'End',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,OAAO;AAAA,EAClB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA;",
6
+ "names": []
7
+ }