@elliemae/ds-app-picker 3.0.0-next.6 → 3.0.0-next.60

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.
@@ -18,7 +18,6 @@ var __spreadValues = (a, b) => {
18
18
  }
19
19
  return a;
20
20
  };
21
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
21
  var __objRest = (source, exclude) => {
23
22
  var target = {};
24
23
  for (var prop in source)
@@ -35,29 +34,24 @@ var __export = (target, all) => {
35
34
  for (var name in all)
36
35
  __defProp(target, name, { get: all[name], enumerable: true });
37
36
  };
38
- var __reExport = (target, module2, copyDefault, desc) => {
39
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
40
- for (let key of __getOwnPropNames(module2))
41
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
42
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
37
+ var __copyProps = (to, from, except, desc) => {
38
+ if (from && typeof from === "object" || typeof from === "function") {
39
+ for (let key of __getOwnPropNames(from))
40
+ if (!__hasOwnProp.call(to, key) && key !== except)
41
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
42
  }
44
- return target;
45
- };
46
- var __toESM = (module2, isNodeMode) => {
47
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
43
+ return to;
48
44
  };
49
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
50
- return (module2, temp) => {
51
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
52
- };
53
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
45
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
46
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
54
47
  var AppPickerImpl_exports = {};
55
48
  __export(AppPickerImpl_exports, {
56
49
  default: () => AppPickerImpl_default
57
50
  });
51
+ module.exports = __toCommonJS(AppPickerImpl_exports);
58
52
  var React = __toESM(require("react"));
59
53
  var import_react = __toESM(require("react"));
60
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
54
+ var import_ds_utilities = require("@elliemae/ds-utilities");
61
55
  var import_lodash = require("lodash");
62
56
  var import_utils = require("./utils");
63
57
  var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
@@ -140,7 +134,7 @@ const AppPickerImpl = ({
140
134
  "aria-setsize": apps.length + customApps.length,
141
135
  "aria-posinset": key + prevIndex,
142
136
  id
143
- }, (0, import_ds_props_helpers.getDataProps)(otherProps)), /* @__PURE__ */ import_react.default.createElement(Icon, {
137
+ }, (0, import_ds_utilities.getDataProps)(otherProps)), /* @__PURE__ */ import_react.default.createElement(Icon, {
144
138
  className: "app-picker__icon",
145
139
  size: "m"
146
140
  }), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledChipLabel, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
@@ -173,5 +167,4 @@ const AppPickerImpl = ({
173
167
  }, /* @__PURE__ */ import_react.default.createElement(CustomRows, null))));
174
168
  };
175
169
  var AppPickerImpl_default = AppPickerImpl;
176
- module.exports = __toCommonJS(AppPickerImpl_exports);
177
170
  //# sourceMappingURL=AppPickerImpl.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/AppPickerImpl.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\nimport React, { useEffect, useCallback, useRef } from 'react';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\nimport { chunk } from 'lodash';\nimport { keys } from './utils';\nimport { AppItemType, DSAppPickerImplType } from './types/AppPickerTypes';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledWrapper,\n StyledChip,\n StyledChipLabel,\n StyledTitle,\n StyledGrid,\n StyledRow,\n StyledSeparator,\n} from './styles';\n\nconst AppPickerImpl: DSAppPickerImplType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n close = () => null,\n wrapperRef,\n onKeyDown,\n triggerRef,\n isOverflow,\n}) => {\n const allFocusableButtons = useRef<HTMLButtonElement[]>([]);\n const selectedButton = useRef<number | null>(null);\n\n useEffect(() => {\n wrapperRef?.current?.querySelectorAll('button').forEach((e, index) => {\n if (!e.hasAttribute('disabled')) {\n allFocusableButtons?.current?.push(e);\n }\n if (e.getAttribute('aria-selected') === 'true') {\n selectedButton.current = index;\n }\n });\n\n if (selectedButton.current) {\n wrapperRef?.current?.querySelectorAll('button')[selectedButton.current].focus();\n } else {\n allFocusableButtons?.current[0]?.focus();\n }\n }, [wrapperRef]);\n\n // eslint-disable-next-line max-statements\n const handleKeyDown = (e: React.KeyboardEvent) => {\n switch (e.key) {\n case keys.ESC:\n triggerRef?.current?.focus();\n close();\n break;\n case keys.TAB:\n if (e.shiftKey) {\n if (e.target === allFocusableButtons.current[0]) {\n e.preventDefault();\n allFocusableButtons?.current[allFocusableButtons.current.length - 1]?.focus();\n }\n } else if (e.target === allFocusableButtons.current[allFocusableButtons.current.length - 1]) {\n e.preventDefault();\n allFocusableButtons?.current[0]?.focus();\n }\n break;\n default:\n break;\n }\n };\n\n const handleOnClick = useCallback((e, app) => {\n if (app.onClick) app.onClick(e, app);\n }, []);\n\n const handleOnKeyDownWrapper = useCallback(\n (e) => {\n if (onKeyDown) onKeyDown(e);\n if (!onKeyDown && e.key === keys.ESC) {\n close();\n }\n },\n [onKeyDown, close],\n );\n\n const buildRows = (appList: AppItemType[], prevIndex = 0): JSX.Element => {\n const rows = chunk(appList, 3); // divides array in subarrays of 3 items\n const formattedRows = rows.map((row, index) => (\n <StyledRow key={index}>\n {row.map((app, key) => {\n const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;\n return (\n <StyledChip\n key={key}\n onClick={(e) => handleOnClick(e, app)}\n onKeyDown={handleKeyDown}\n data-testid=\"app-picker__chip\"\n aria-disabled={disabled}\n disabled={disabled}\n selected={selected}\n aria-selected={selected}\n aria-setsize={apps.length + customApps.length}\n aria-posinset={key + prevIndex}\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon className=\"app-picker__icon\" size=\"m\" />\n <StyledChipLabel>\n <SimpleTruncatedTooltipText value={label} placement=\"bottom\" />\n </StyledChipLabel>\n </StyledChip>\n );\n })}\n </StyledRow>\n ));\n return <>{formattedRows}</>;\n };\n\n const AppsRows = () => buildRows(apps, 1);\n const CustomRows = () => buildRows(customApps, apps.length);\n\n return (\n <StyledWrapper\n role=\"listbox\"\n ref={wrapperRef}\n onKeyDown={handleOnKeyDownWrapper}\n data-testid=\"app-picker__wrapper\"\n isOverflow={isOverflow}\n >\n <StyledTitle data-testid=\"app-picker__main-title\" aria-hidden>\n {sectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__main-grid\">\n <AppsRows />\n </StyledGrid>\n {!!customApps.length && (\n <>\n <StyledSeparator aria-hidden />\n <StyledTitle data-testid=\"app-picker__custom-title\" aria-hidden>\n {customSectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__custom-grid\">\n <CustomRows />\n </StyledGrid>\n </>\n )}\n </StyledWrapper>\n );\n};\n\nexport default AppPickerImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AA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ACZ,wFACE,mDAAC,+BAAD;AAAA,IAAiB,eAAW;AAAA,MAC5B,mDAAC,2BAAD;AAAA,IAAa,eAAY;AAAA,IAA2B,eAAW;AAAA,KAC5D,qBAEH,mDAAC,0BAAD;AAAA,IAAY,eAAY;AAAA,KACtB,mDAAC,YAAD;AAAA;AAQZ,IAAO,wBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\nimport React, { useEffect, useCallback, useRef } from 'react';\nimport { getDataProps } from '@elliemae/ds-utilities';\nimport { chunk } from 'lodash';\nimport { keys } from './utils';\nimport { AppItemType, DSAppPickerImplType } from './types/AppPickerTypes';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledWrapper,\n StyledChip,\n StyledChipLabel,\n StyledTitle,\n StyledGrid,\n StyledRow,\n StyledSeparator,\n} from './styles';\n\nconst AppPickerImpl: DSAppPickerImplType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n close = () => null,\n wrapperRef,\n onKeyDown,\n triggerRef,\n isOverflow,\n}) => {\n const allFocusableButtons = useRef<HTMLButtonElement[]>([]);\n const selectedButton = useRef<number | null>(null);\n\n useEffect(() => {\n wrapperRef?.current?.querySelectorAll('button').forEach((e, index) => {\n if (!e.hasAttribute('disabled')) {\n allFocusableButtons?.current?.push(e);\n }\n if (e.getAttribute('aria-selected') === 'true') {\n selectedButton.current = index;\n }\n });\n\n if (selectedButton.current) {\n wrapperRef?.current?.querySelectorAll('button')[selectedButton.current].focus();\n } else {\n allFocusableButtons?.current[0]?.focus();\n }\n }, [wrapperRef]);\n\n // eslint-disable-next-line max-statements\n const handleKeyDown = (e: React.KeyboardEvent) => {\n switch (e.key) {\n case keys.ESC:\n triggerRef?.current?.focus();\n close();\n break;\n case keys.TAB:\n if (e.shiftKey) {\n if (e.target === allFocusableButtons.current[0]) {\n e.preventDefault();\n allFocusableButtons?.current[allFocusableButtons.current.length - 1]?.focus();\n }\n } else if (e.target === allFocusableButtons.current[allFocusableButtons.current.length - 1]) {\n e.preventDefault();\n allFocusableButtons?.current[0]?.focus();\n }\n break;\n default:\n break;\n }\n };\n\n const handleOnClick = useCallback((e, app) => {\n if (app.onClick) app.onClick(e, app);\n }, []);\n\n const handleOnKeyDownWrapper = useCallback(\n (e) => {\n if (onKeyDown) onKeyDown(e);\n if (!onKeyDown && e.key === keys.ESC) {\n close();\n }\n },\n [onKeyDown, close],\n );\n\n const buildRows = (appList: AppItemType[], prevIndex = 0): JSX.Element => {\n const rows = chunk(appList, 3); // divides array in subarrays of 3 items\n const formattedRows = rows.map((row, index) => (\n <StyledRow key={index}>\n {row.map((app, key) => {\n const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;\n return (\n <StyledChip\n key={key}\n onClick={(e) => handleOnClick(e, app)}\n onKeyDown={handleKeyDown}\n data-testid=\"app-picker__chip\"\n aria-disabled={disabled}\n disabled={disabled}\n selected={selected}\n aria-selected={selected}\n aria-setsize={apps.length + customApps.length}\n aria-posinset={key + prevIndex}\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon className=\"app-picker__icon\" size=\"m\" />\n <StyledChipLabel>\n <SimpleTruncatedTooltipText value={label} placement=\"bottom\" />\n </StyledChipLabel>\n </StyledChip>\n );\n })}\n </StyledRow>\n ));\n return <>{formattedRows}</>;\n };\n\n const AppsRows = () => buildRows(apps, 1);\n const CustomRows = () => buildRows(customApps, apps.length);\n\n return (\n <StyledWrapper\n role=\"listbox\"\n ref={wrapperRef}\n onKeyDown={handleOnKeyDownWrapper}\n data-testid=\"app-picker__wrapper\"\n isOverflow={isOverflow}\n >\n <StyledTitle data-testid=\"app-picker__main-title\" aria-hidden>\n {sectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__main-grid\">\n <AppsRows />\n </StyledGrid>\n {!!customApps.length && (\n <>\n <StyledSeparator aria-hidden />\n <StyledTitle data-testid=\"app-picker__custom-title\" aria-hidden>\n {customSectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__custom-grid\">\n <CustomRows />\n </StyledGrid>\n </>\n )}\n </StyledWrapper>\n );\n};\n\nexport default AppPickerImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAsD;AACtD,0BAA6B;AAC7B,oBAAsB;AACtB,mBAAqB;AAErB,uCAA2C;AAC3C,oBAQO;AAEP,MAAM,gBAAqC,CAAC;AAAA,EAC1C,OAAO,CAAC;AAAA,EACR,aAAa,CAAC;AAAA,EACd,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,QAAQ,MAAM;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM,sBAAsB,yBAA4B,CAAC,CAAC;AAC1D,QAAM,iBAAiB,yBAAsB,IAAI;AAEjD,8BAAU,MAAM;AACd,gBAAY,SAAS,iBAAiB,QAAQ,EAAE,QAAQ,CAAC,GAAG,UAAU;AACpE,UAAI,CAAC,EAAE,aAAa,UAAU,GAAG;AAC/B,6BAAqB,SAAS,KAAK,CAAC;AAAA,MACtC;AACA,UAAI,EAAE,aAAa,eAAe,MAAM,QAAQ;AAC9C,uBAAe,UAAU;AAAA,MAC3B;AAAA,IACF,CAAC;AAED,QAAI,eAAe,SAAS;AAC1B,kBAAY,SAAS,iBAAiB,QAAQ,EAAE,eAAe,SAAS,MAAM;AAAA,IAChF,OAAO;AACL,2BAAqB,QAAQ,IAAI,MAAM;AAAA,IACzC;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAGf,QAAM,gBAAgB,CAAC,MAA2B;AAChD,YAAQ,EAAE;AAAA,WACH,kBAAK;AACR,oBAAY,SAAS,MAAM;AAC3B,cAAM;AACN;AA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,IAE3B,mDAAC;AAAA,QAAK,WAAU;AAAA,QAAmB,MAAK;AAAA,OAAI,GAC5C,mDAAC,qCACC,mDAAC;AAAA,QAA2B,OAAO;AAAA,QAAO,WAAU;AAAA,OAAS,CAC/D,CACF;AAAA,IAEJ,CAAC,CACH,CACD;AACD,WAAO,wFAAG,aAAc;AAAA,EAC1B;AAEA,QAAM,WAAW,MAAM,UAAU,MAAM,CAAC;AACxC,QAAM,aAAa,MAAM,UAAU,YAAY,KAAK,MAAM;AAE1D,SACE,mDAAC;AAAA,IACC,MAAK;AAAA,IACL,KAAK;AAAA,IACL,WAAW;AAAA,IACX,eAAY;AAAA,IACZ;AAAA,KAEA,mDAAC;AAAA,IAAY,eAAY;AAAA,IAAyB,eAAW;AAAA,KAC1D,YACH,GACA,mDAAC;AAAA,IAAW,eAAY;AAAA,KACtB,mDAAC,cAAS,CACZ,GACC,CAAC,CAAC,WAAW,UACZ,wFACE,mDAAC;AAAA,IAAgB,eAAW;AAAA,GAAC,GAC7B,mDAAC;AAAA,IAAY,eAAY;AAAA,IAA2B,eAAW;AAAA,KAC5D,kBACH,GACA,mDAAC;AAAA,IAAW,eAAY;AAAA,KACtB,mDAAC,gBAAW,CACd,CACF,CAEJ;AAEJ;AAEA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -4,38 +4,32 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var DSAppPicker_exports = {};
29
22
  __export(DSAppPicker_exports, {
30
23
  AppPickerWithSchema: () => AppPickerWithSchema,
31
24
  DSAppPicker: () => DSAppPicker,
32
25
  default: () => DSAppPicker_default
33
26
  });
27
+ module.exports = __toCommonJS(DSAppPicker_exports);
34
28
  var React = __toESM(require("react"));
35
29
  var import_react = __toESM(require("react"));
36
30
  var import_react_desc = require("react-desc");
37
31
  var import_ds_icons = require("@elliemae/ds-icons");
38
- var import_ds_button = __toESM(require("@elliemae/ds-button"));
32
+ var import_ds_button = require("@elliemae/ds-button");
39
33
  var import_ds_popover = __toESM(require("@elliemae/ds-popover"));
40
34
  var import_ds_utilities = require("@elliemae/ds-utilities");
41
35
  var import_AppPickerImpl = __toESM(require("./AppPickerImpl"));
@@ -107,17 +101,16 @@ const DSAppPicker = ({
107
101
  triggerRef: triggerRef || defaultTriggerRef,
108
102
  isOverflow
109
103
  });
110
- const RenderTrigger = renderTrigger || (({ ref }) => /* @__PURE__ */ import_react.default.createElement(import_ds_button.default, {
104
+ const RenderTrigger = renderTrigger || (({ ref }) => /* @__PURE__ */ import_react.default.createElement(import_ds_button.DSButtonV2, {
111
105
  "data-testid": "app-picker__button",
112
106
  id: "app-picker__button",
113
- buttonType: "text",
114
- icon: /* @__PURE__ */ import_react.default.createElement(Icon, null),
107
+ buttonType: "icon",
115
108
  innerRef: (0, import_ds_utilities.mergeRefs)(ref, defaultTriggerRef),
116
109
  onClick: (e) => {
117
110
  onClick(e);
118
111
  setOpen(true);
119
112
  }
120
- }));
113
+ }, /* @__PURE__ */ import_react.default.createElement(Icon, null)));
121
114
  return /* @__PURE__ */ import_react.default.createElement(import_ds_popover.default, {
122
115
  content: /* @__PURE__ */ import_react.default.createElement(AppPickerContent, null),
123
116
  isOpen: typeof isOpen === "boolean" ? isOpen : open,
@@ -137,5 +130,4 @@ DSAppPicker.propTypes = import_propTypes.propTypes;
137
130
  const AppPickerWithSchema = (0, import_react_desc.describe)(DSAppPicker);
138
131
  AppPickerWithSchema.propTypes = import_propTypes.propTypes;
139
132
  var DSAppPicker_default = DSAppPicker;
140
- module.exports = __toCommonJS(DSAppPicker_exports);
141
133
  //# sourceMappingURL=DSAppPicker.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSAppPicker.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react';\nimport { describe } from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport DSPopover from '@elliemae/ds-popover';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport AppPickerImpl from './AppPickerImpl';\nimport { propTypes } from './propTypes';\nimport type { DSAppPickerType } from './types/AppPickerTypes';\n\nconst DSAppPicker: DSAppPickerType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n icon: Icon = () => <MenuPicker fill={['brand-primary', 700]} size=\"m\" />,\n renderTrigger,\n isOpen,\n onClose = () => null,\n actionRef,\n onKeyDown,\n onClick = () => null,\n onClickOutside = () => null,\n triggerRef,\n}) => {\n const [open, setOpen] = useState(false);\n const [isOverflow, setIsOverflow] = useState(false);\n const wrapperRef = useRef<HTMLUListElement>(null);\n const defaultTriggerRef = useRef(null);\n\n useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToIndex = (index) => {\n if (wrapperRef.current) {\n const parent = wrapperRef.current;\n const buttons = [...parent.querySelectorAll('button')];\n buttons[index].focus();\n }\n };\n }\n }, [actionRef, apps, customApps]);\n\n useEffect(() => {\n setTimeout(() => {\n if (wrapperRef.current) {\n const { scrollHeight, clientHeight } = wrapperRef.current;\n if (scrollHeight > clientHeight) return setIsOverflow(true);\n }\n return setIsOverflow(false);\n });\n }, [isOpen, open]);\n\n const handleOnClose = () => {\n if (typeof isOpen === 'boolean') {\n setOpen(isOpen);\n } else {\n setOpen(false);\n }\n onClose();\n };\n\n const handleOnClickOutside = (e: MouseEvent) => {\n setOpen(false);\n onClose();\n onClickOutside(e);\n };\n\n const AppPickerContent = () => (\n <AppPickerImpl\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n close={handleOnClose}\n wrapperRef={wrapperRef}\n onKeyDown={onKeyDown}\n triggerRef={triggerRef || defaultTriggerRef}\n isOverflow={isOverflow}\n />\n );\n\n const RenderTrigger =\n renderTrigger ||\n (({ ref }) => (\n <DSButton\n data-testid=\"app-picker__button\"\n id=\"app-picker__button\"\n buttonType=\"text\"\n icon={<Icon />}\n innerRef={mergeRefs(ref, defaultTriggerRef)}\n onClick={(e) => {\n onClick(e);\n setOpen(true);\n }}\n />\n ));\n\n return (\n <DSPopover\n content={<AppPickerContent />}\n isOpen={typeof isOpen === 'boolean' ? isOpen : open}\n onClickOutside={handleOnClickOutside}\n placement=\"bottom\"\n interactionType=\"click\"\n renderTrigger={RenderTrigger}\n showArrow\n style={{\n padding: '0',\n maxWidth: '1000px',\n width: 'fit-content',\n }}\n />\n );\n};\n\nDSAppPicker.propTypes = propTypes;\n\nconst AppPickerWithSchema = describe(DSAppPicker);\nAppPickerWithSchema.propTypes = propTypes;\n\nexport { DSAppPicker, AppPickerWithSchema };\nexport default DSAppPicker;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmD;AACnD,wBAAyB;AACzB,sBAA2B;AAC3B,uBAAqB;AACrB,wBAAsB;AACtB,0BAA0B;AAC1B,2BAA0B;AAC1B,uBAA0B;AAG1B,MAAM,cAA+B,CAAC;AAAA,EACpC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,MAAM,OAAO,MAAM,mDAAC,4BAAD;AAAA,IAAY,MAAM,CAAC,iBAAiB;AAAA,IAAM,MAAK;AAAA;AAAA,EAClE;AAAA,EACA;AAAA,EACA,UAAU,MAAM;AAAA,EAChB;AAAA,EACA;AAAA,EACA,UAAU,MAAM;AAAA,EAChB,iBAAiB,MAAM;AAAA,EACvB;AAAA,MACI;AACJ,QAAM,CAAC,MAAM,WAAW,2BAAS;AACjC,QAAM,CAAC,YAAY,iBAAiB,2BAAS;AAC7C,QAAM,aAAa,yBAAyB;AAC5C,QAAM,oBAAoB,yBAAO;AAEjC,8BAAU,MAAM;AACd,QAAI,aAAa,UAAU,SAAS;AAClC,gBAAU,QAAQ,eAAe,CAAC,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AAMf,YAAY,YAAY;AAExB,MAAM,sBAAsB,gCAAS;AACrC,oBAAoB,YAAY;AAGhC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react';\nimport { describe } from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport DSPopover from '@elliemae/ds-popover';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport AppPickerImpl from './AppPickerImpl';\nimport { propTypes } from './propTypes';\nimport type { DSAppPickerType } from './types/AppPickerTypes';\n\nconst DSAppPicker: DSAppPickerType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n icon: Icon = () => <MenuPicker fill={['brand-primary', 700]} size=\"m\" />,\n renderTrigger,\n isOpen,\n onClose = () => null,\n actionRef,\n onKeyDown,\n onClick = () => null,\n onClickOutside = () => null,\n triggerRef,\n}) => {\n const [open, setOpen] = useState(false);\n const [isOverflow, setIsOverflow] = useState(false);\n const wrapperRef = useRef<HTMLUListElement>(null);\n const defaultTriggerRef = useRef(null);\n\n useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToIndex = (index) => {\n if (wrapperRef.current) {\n const parent = wrapperRef.current;\n const buttons = [...parent.querySelectorAll('button')];\n buttons[index].focus();\n }\n };\n }\n }, [actionRef, apps, customApps]);\n\n useEffect(() => {\n setTimeout(() => {\n if (wrapperRef.current) {\n const { scrollHeight, clientHeight } = wrapperRef.current;\n if (scrollHeight > clientHeight) return setIsOverflow(true);\n }\n return setIsOverflow(false);\n });\n }, [isOpen, open]);\n\n const handleOnClose = () => {\n if (typeof isOpen === 'boolean') {\n setOpen(isOpen);\n } else {\n setOpen(false);\n }\n onClose();\n };\n\n const handleOnClickOutside = (e: MouseEvent) => {\n setOpen(false);\n onClose();\n onClickOutside(e);\n };\n\n const AppPickerContent = () => (\n <AppPickerImpl\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n close={handleOnClose}\n wrapperRef={wrapperRef}\n onKeyDown={onKeyDown}\n triggerRef={triggerRef || defaultTriggerRef}\n isOverflow={isOverflow}\n />\n );\n const RenderTrigger =\n renderTrigger ||\n (({ ref }) => (\n <DSButtonV2\n data-testid=\"app-picker__button\"\n id=\"app-picker__button\"\n buttonType=\"icon\"\n innerRef={mergeRefs(ref, defaultTriggerRef)}\n onClick={(e) => {\n onClick(e);\n setOpen(true);\n }}\n >\n <Icon />\n </DSButtonV2>\n ));\n\n return (\n <DSPopover\n content={<AppPickerContent />}\n isOpen={typeof isOpen === 'boolean' ? isOpen : open}\n onClickOutside={handleOnClickOutside}\n placement=\"bottom\"\n interactionType=\"click\"\n renderTrigger={RenderTrigger}\n showArrow\n style={{\n padding: '0',\n maxWidth: '1000px',\n width: 'fit-content',\n }}\n />\n );\n};\n\nDSAppPicker.propTypes = propTypes;\n\nconst AppPickerWithSchema = describe(DSAppPicker);\nAppPickerWithSchema.propTypes = propTypes;\n\nexport { DSAppPicker, AppPickerWithSchema };\nexport default DSAppPicker;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmD;AACnD,wBAAyB;AACzB,sBAA2B;AAC3B,uBAA2B;AAC3B,wBAAsB;AACtB,0BAA0B;AAC1B,2BAA0B;AAC1B,uBAA0B;AAG1B,MAAM,cAA+B,CAAC;AAAA,EACpC,OAAO,CAAC;AAAA,EACR,aAAa,CAAC;AAAA,EACd,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,MAAM,OAAO,MAAM,mDAAC;AAAA,IAAW,MAAM,CAAC,iBAAiB,GAAG;AAAA,IAAG,MAAK;AAAA,GAAI;AAAA,EACtE;AAAA,EACA;AAAA,EACA,UAAU,MAAM;AAAA,EAChB;AAAA,EACA;AAAA,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,eAAY;AAAA,IACZ,IAAG;AAAA,IACH,YAAW;AAAA,IACX,UAAU,mCAAU,KAAK,iBAAiB;AAAA,IAC1C,SAAS,CAAC,MAAM;AACd,cAAQ,CAAC;AACT,cAAQ,IAAI;AAAA,IACd;AAAA,KAEA,mDAAC,UAAK,CACR;AAGJ,SACE,mDAAC;AAAA,IACC,SAAS,mDAAC,sBAAiB;AAAA,IAC3B,QAAQ,OAAO,WAAW,YAAY,SAAS;AAAA,IAC/C,gBAAgB;AAAA,IAChB,WAAU;AAAA,IACV,iBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,WAAS;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,IACT;AAAA,GACF;AAEJ;AAEA,YAAY,YAAY;AAExB,MAAM,sBAAsB,gCAAS,WAAW;AAChD,oBAAoB,YAAY;AAGhC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
22
  var src_exports = {};
29
23
  __export(src_exports, {
30
24
  default: () => import_DSAppPicker.default
31
25
  });
26
+ module.exports = __toCommonJS(src_exports);
32
27
  var React = __toESM(require("react"));
33
- __reExport(src_exports, require("./DSAppPicker"));
28
+ __reExport(src_exports, require("./DSAppPicker"), module.exports);
34
29
  var import_DSAppPicker = __toESM(require("./DSAppPicker"));
35
- module.exports = __toCommonJS(src_exports);
36
30
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,0BAAd;AAEA,yBAAwB;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var propTypes_exports = {};
29
22
  __export(propTypes_exports, {
30
23
  propTypes: () => propTypes
31
24
  });
25
+ module.exports = __toCommonJS(propTypes_exports);
32
26
  var React = __toESM(require("react"));
33
27
  var import_react_desc = require("react-desc");
34
28
  var import_ds_icons = require("@elliemae/ds-icons");
@@ -46,5 +40,4 @@ const propTypes = {
46
40
  onClick: import_react_desc.PropTypes.func.description("Custom onClick for Trigger component."),
47
41
  onClickOutside: import_react_desc.PropTypes.func.description("Callback event when the user clicks outside the App Picker.")
48
42
  };
49
- module.exports = __toCommonJS(propTypes_exports);
50
43
  //# sourceMappingURL=propTypes.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAC1B,sBAA2B;AAEpB,MAAM,YAAY;AAAA,EACvB,MAAM,4BAAU,MAAM,YACpB,oGACF,EAAE;AAAA,EACF,YAAY,4BAAU,MAAM,YAC1B,sGACF;AAAA,EACA,cAAc,4BAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,cAAc;AAAA,EAC5F,oBAAoB,4BAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,qBAAqB;AAAA,EAC3G,MAAM,4BAAU,KAAK,YAAY,uBAAuB,EAAE,aAAa,0BAAU;AAAA,EACjF,eAAe,4BAAU,KAAK,YAAY,2BAA2B;AAAA,EACrE,WAAW,4BAAU,UAAU,CAAC,4BAAU,MAAM,4BAAU,MAAM,EAAE,SAAS,4BAAU,IAAI,CAAC,CAAC,CAAC,EAAE,YAC5F,qGACF;AAAA,EACA,QAAQ,4BAAU,KAAK,YAAY,6CAA6C;AAAA,EAChF,SAAS,4BAAU,KAAK,YAAY,6CAA6C;AAAA,EACjF,WAAW,4BAAU,KAAK,YAAY,6BAA6B;AAAA,EACnE,SAAS,4BAAU,KAAK,YAAY,uCAAuC;AAAA,EAC3E,gBAAgB,4BAAU,KAAK,YAAY,6DAA6D;AAC1G;",
6
6
  "names": []
7
7
  }
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var styles_exports = {};
29
22
  __export(styles_exports, {
30
23
  StyledChip: () => StyledChip,
@@ -35,6 +28,7 @@ __export(styles_exports, {
35
28
  StyledTitle: () => StyledTitle,
36
29
  StyledWrapper: () => StyledWrapper
37
30
  });
31
+ module.exports = __toCommonJS(styles_exports);
38
32
  var React = __toESM(require("react"));
39
33
  var import_ds_system = require("@elliemae/ds-system");
40
34
  const StyledTitle = (0, import_ds_system.styled)("h3", { name: "DS-AppPicker", slot: "title" })`
@@ -186,5 +180,4 @@ const StyledSeparator = (0, import_ds_system.styled)("hr", { name: "DS-AppPicker
186
180
  width: 99%;
187
181
  margin: 0;
188
182
  `;
189
- module.exports = __toCommonJS(styles_exports);
190
183
  //# sourceMappingURL=styles.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,uBAA4B;AAErB,MAAM,cAAc,6BAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM;AAAA,WAC3D,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,eAChC,CA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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAgBjC,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWjC,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA,wBACvB,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA,cAE5C,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM1B,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,aAK3C,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,cAInC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAW1C;AAAA,iBACS,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,cAKvC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,IAI9C,CAAC,EAAE,eAAgB,CAAC,WAAW,KAAK;AAAA;AAGjC,MAAM,kBAAkB,6BAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,YAAY,CAAC;AAAA,0BAC7D,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -4,24 +4,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
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 });
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from))
10
+ if (!__hasOwnProp.call(to, key) && key !== except)
11
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
12
  }
14
- return target;
13
+ return to;
15
14
  };
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);
15
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
16
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
17
  var AppPickerTypes_exports = {};
25
- var React = __toESM(require("react"));
26
18
  module.exports = __toCommonJS(AppPickerTypes_exports);
19
+ var React = __toESM(require("react"));
27
20
  //# sourceMappingURL=AppPickerTypes.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/AppPickerTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
package/dist/cjs/utils.js CHANGED
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
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 });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
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);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var utils_exports = {};
29
22
  __export(utils_exports, {
30
23
  keys: () => keys
31
24
  });
25
+ module.exports = __toCommonJS(utils_exports);
32
26
  var React = __toESM(require("react"));
33
27
  const keys = {
34
28
  LEFT: "ArrowLeft",
@@ -42,5 +36,4 @@ const keys = {
42
36
  HOME: "Home",
43
37
  END: "End"
44
38
  };
45
- module.exports = __toCommonJS(utils_exports);
46
39
  //# sourceMappingURL=utils.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;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;AACP;",
6
6
  "names": []
7
7
  }
@@ -28,7 +28,7 @@ var __objRest = (source, exclude) => {
28
28
  };
29
29
  import * as React from "react";
30
30
  import React2, { useEffect, useCallback, useRef } from "react";
31
- import { getDataProps } from "@elliemae/ds-props-helpers";
31
+ import { getDataProps } from "@elliemae/ds-utilities";
32
32
  import { chunk } from "lodash";
33
33
  import { keys } from "./utils";
34
34
  import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/AppPickerImpl.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\nimport React, { useEffect, useCallback, useRef } from 'react';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\nimport { chunk } from 'lodash';\nimport { keys } from './utils';\nimport { AppItemType, DSAppPickerImplType } from './types/AppPickerTypes';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledWrapper,\n StyledChip,\n StyledChipLabel,\n StyledTitle,\n StyledGrid,\n StyledRow,\n StyledSeparator,\n} from './styles';\n\nconst AppPickerImpl: DSAppPickerImplType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n close = () => null,\n wrapperRef,\n onKeyDown,\n triggerRef,\n isOverflow,\n}) => {\n const allFocusableButtons = useRef<HTMLButtonElement[]>([]);\n const selectedButton = useRef<number | null>(null);\n\n useEffect(() => {\n wrapperRef?.current?.querySelectorAll('button').forEach((e, index) => {\n if (!e.hasAttribute('disabled')) {\n allFocusableButtons?.current?.push(e);\n }\n if (e.getAttribute('aria-selected') === 'true') {\n selectedButton.current = index;\n }\n });\n\n if (selectedButton.current) {\n wrapperRef?.current?.querySelectorAll('button')[selectedButton.current].focus();\n } else {\n allFocusableButtons?.current[0]?.focus();\n }\n }, [wrapperRef]);\n\n // eslint-disable-next-line max-statements\n const handleKeyDown = (e: React.KeyboardEvent) => {\n switch (e.key) {\n case keys.ESC:\n triggerRef?.current?.focus();\n close();\n break;\n case keys.TAB:\n if (e.shiftKey) {\n if (e.target === allFocusableButtons.current[0]) {\n e.preventDefault();\n allFocusableButtons?.current[allFocusableButtons.current.length - 1]?.focus();\n }\n } else if (e.target === allFocusableButtons.current[allFocusableButtons.current.length - 1]) {\n e.preventDefault();\n allFocusableButtons?.current[0]?.focus();\n }\n break;\n default:\n break;\n }\n };\n\n const handleOnClick = useCallback((e, app) => {\n if (app.onClick) app.onClick(e, app);\n }, []);\n\n const handleOnKeyDownWrapper = useCallback(\n (e) => {\n if (onKeyDown) onKeyDown(e);\n if (!onKeyDown && e.key === keys.ESC) {\n close();\n }\n },\n [onKeyDown, close],\n );\n\n const buildRows = (appList: AppItemType[], prevIndex = 0): JSX.Element => {\n const rows = chunk(appList, 3); // divides array in subarrays of 3 items\n const formattedRows = rows.map((row, index) => (\n <StyledRow key={index}>\n {row.map((app, key) => {\n const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;\n return (\n <StyledChip\n key={key}\n onClick={(e) => handleOnClick(e, app)}\n onKeyDown={handleKeyDown}\n data-testid=\"app-picker__chip\"\n aria-disabled={disabled}\n disabled={disabled}\n selected={selected}\n aria-selected={selected}\n aria-setsize={apps.length + customApps.length}\n aria-posinset={key + prevIndex}\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon className=\"app-picker__icon\" size=\"m\" />\n <StyledChipLabel>\n <SimpleTruncatedTooltipText value={label} placement=\"bottom\" />\n </StyledChipLabel>\n </StyledChip>\n );\n })}\n </StyledRow>\n ));\n return <>{formattedRows}</>;\n };\n\n const AppsRows = () => buildRows(apps, 1);\n const CustomRows = () => buildRows(customApps, apps.length);\n\n return (\n <StyledWrapper\n role=\"listbox\"\n ref={wrapperRef}\n onKeyDown={handleOnKeyDownWrapper}\n data-testid=\"app-picker__wrapper\"\n isOverflow={isOverflow}\n >\n <StyledTitle data-testid=\"app-picker__main-title\" aria-hidden>\n {sectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__main-grid\">\n <AppsRows />\n </StyledGrid>\n {!!customApps.length && (\n <>\n <StyledSeparator aria-hidden />\n <StyledTitle data-testid=\"app-picker__custom-title\" aria-hidden>\n {customSectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__custom-grid\">\n <CustomRows />\n </StyledGrid>\n </>\n )}\n </StyledWrapper>\n );\n};\n\nexport default AppPickerImpl;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACGA;AACA;AACA;AACA;AAE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A,IAAa,eAAY;AAAA,IAA2B,eAAW;AAAA,KAC5D,qBAEH,qCAAC,YAAD;AAAA,IAAY,eAAY;AAAA,KACtB,qCAAC,YAAD;AAAA;AAQZ,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\nimport React, { useEffect, useCallback, useRef } from 'react';\nimport { getDataProps } from '@elliemae/ds-utilities';\nimport { chunk } from 'lodash';\nimport { keys } from './utils';\nimport { AppItemType, DSAppPickerImplType } from './types/AppPickerTypes';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledWrapper,\n StyledChip,\n StyledChipLabel,\n StyledTitle,\n StyledGrid,\n StyledRow,\n StyledSeparator,\n} from './styles';\n\nconst AppPickerImpl: DSAppPickerImplType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n close = () => null,\n wrapperRef,\n onKeyDown,\n triggerRef,\n isOverflow,\n}) => {\n const allFocusableButtons = useRef<HTMLButtonElement[]>([]);\n const selectedButton = useRef<number | null>(null);\n\n useEffect(() => {\n wrapperRef?.current?.querySelectorAll('button').forEach((e, index) => {\n if (!e.hasAttribute('disabled')) {\n allFocusableButtons?.current?.push(e);\n }\n if (e.getAttribute('aria-selected') === 'true') {\n selectedButton.current = index;\n }\n });\n\n if (selectedButton.current) {\n wrapperRef?.current?.querySelectorAll('button')[selectedButton.current].focus();\n } else {\n allFocusableButtons?.current[0]?.focus();\n }\n }, [wrapperRef]);\n\n // eslint-disable-next-line max-statements\n const handleKeyDown = (e: React.KeyboardEvent) => {\n switch (e.key) {\n case keys.ESC:\n triggerRef?.current?.focus();\n close();\n break;\n case keys.TAB:\n if (e.shiftKey) {\n if (e.target === allFocusableButtons.current[0]) {\n e.preventDefault();\n allFocusableButtons?.current[allFocusableButtons.current.length - 1]?.focus();\n }\n } else if (e.target === allFocusableButtons.current[allFocusableButtons.current.length - 1]) {\n e.preventDefault();\n allFocusableButtons?.current[0]?.focus();\n }\n break;\n default:\n break;\n }\n };\n\n const handleOnClick = useCallback((e, app) => {\n if (app.onClick) app.onClick(e, app);\n }, []);\n\n const handleOnKeyDownWrapper = useCallback(\n (e) => {\n if (onKeyDown) onKeyDown(e);\n if (!onKeyDown && e.key === keys.ESC) {\n close();\n }\n },\n [onKeyDown, close],\n );\n\n const buildRows = (appList: AppItemType[], prevIndex = 0): JSX.Element => {\n const rows = chunk(appList, 3); // divides array in subarrays of 3 items\n const formattedRows = rows.map((row, index) => (\n <StyledRow key={index}>\n {row.map((app, key) => {\n const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;\n return (\n <StyledChip\n key={key}\n onClick={(e) => handleOnClick(e, app)}\n onKeyDown={handleKeyDown}\n data-testid=\"app-picker__chip\"\n aria-disabled={disabled}\n disabled={disabled}\n selected={selected}\n aria-selected={selected}\n aria-setsize={apps.length + customApps.length}\n aria-posinset={key + prevIndex}\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon className=\"app-picker__icon\" size=\"m\" />\n <StyledChipLabel>\n <SimpleTruncatedTooltipText value={label} placement=\"bottom\" />\n </StyledChipLabel>\n </StyledChip>\n );\n })}\n </StyledRow>\n ));\n return <>{formattedRows}</>;\n };\n\n const AppsRows = () => buildRows(apps, 1);\n const CustomRows = () => buildRows(customApps, apps.length);\n\n return (\n <StyledWrapper\n role=\"listbox\"\n ref={wrapperRef}\n onKeyDown={handleOnKeyDownWrapper}\n data-testid=\"app-picker__wrapper\"\n isOverflow={isOverflow}\n >\n <StyledTitle data-testid=\"app-picker__main-title\" aria-hidden>\n {sectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__main-grid\">\n <AppsRows />\n </StyledGrid>\n {!!customApps.length && (\n <>\n <StyledSeparator aria-hidden />\n <StyledTitle data-testid=\"app-picker__custom-title\" aria-hidden>\n {customSectionTitle}\n </StyledTitle>\n <StyledGrid data-testid=\"app-picker__custom-grid\">\n <CustomRows />\n </StyledGrid>\n </>\n )}\n </StyledWrapper>\n );\n};\n\nexport default AppPickerImpl;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACGA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,MAAM,gBAAqC,CAAC;AAAA,EAC1C,OAAO,CAAC;AAAA,EACR,aAAa,CAAC;AAAA,EACd,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,QAAQ,MAAM;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM,sBAAsB,OAA4B,CAAC,CAAC;AAC1D,QAAM,iBAAiB,OAAsB,IAAI;AAEjD,YAAU,MAAM;AACd,gBAAY,SAAS,iBAAiB,QAAQ,EAAE,QAAQ,CAAC,GAAG,UAAU;AACpE,UAAI,CAAC,EAAE,aAAa,UAAU,GAAG;AAC/B,6BAAqB,SAAS,KAAK,CAAC;AAAA,MACtC;AACA,UAAI,EAAE,aAAa,eAAe,MAAM,QAAQ;AAC9C,uBAAe,UAAU;AAAA,MAC3B;AAAA,IACF,CAAC;AAED,QAAI,eAAe,SAAS;AAC1B,kBAAY,SAAS,iBAAiB,QAAQ,EAAE,eAAe,SAAS,MAAM;AAAA,IAChF,OAAO;AACL,2BAAqB,QAAQ,IAAI,MAAM;AAAA,IACzC;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAGf,QAAM,gBAAgB,CAAC,MAA2B;AAChD,YAAQ,EAAE;AAAA,WACH,KAAK;AACR,oBAAY,SAAS,MAAM;AAC3B,cAAM;AACN;AAAA,WACG,KAAK;AACR,YAAI,EAAE,UAAU;AACd,cAAI,EAAE,WAAW,oBAAoB,QAAQ,IAAI;AAC/C,cAAE,eAAe;AACjB,iCAAqB,QAAQ,oBAAoB,QAAQ,SAAS,IAAI,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A,IAEJ,CAAC,CACH,CACD;AACD,WAAO,4DAAG,aAAc;AAAA,EAC1B;AAEA,QAAM,WAAW,MAAM,UAAU,MAAM,CAAC;AACxC,QAAM,aAAa,MAAM,UAAU,YAAY,KAAK,MAAM;AAE1D,SACE,qCAAC;AAAA,IACC,MAAK;AAAA,IACL,KAAK;AAAA,IACL,WAAW;AAAA,IACX,eAAY;AAAA,IACZ;AAAA,KAEA,qCAAC;AAAA,IAAY,eAAY;AAAA,IAAyB,eAAW;AAAA,KAC1D,YACH,GACA,qCAAC;AAAA,IAAW,eAAY;AAAA,KACtB,qCAAC,cAAS,CACZ,GACC,CAAC,CAAC,WAAW,UACZ,4DACE,qCAAC;AAAA,IAAgB,eAAW;AAAA,GAAC,GAC7B,qCAAC;AAAA,IAAY,eAAY;AAAA,IAA2B,eAAW;AAAA,KAC5D,kBACH,GACA,qCAAC;AAAA,IAAW,eAAY;AAAA,KACtB,qCAAC,gBAAW,CACd,CACF,CAEJ;AAEJ;AAEA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import React2, { useState, useEffect, useRef } from "react";
3
3
  import { describe } from "react-desc";
4
4
  import { MenuPicker } from "@elliemae/ds-icons";
5
- import DSButton from "@elliemae/ds-button";
5
+ import { DSButtonV2 } from "@elliemae/ds-button";
6
6
  import DSPopover from "@elliemae/ds-popover";
7
7
  import { mergeRefs } from "@elliemae/ds-utilities";
8
8
  import AppPickerImpl from "./AppPickerImpl";
@@ -74,17 +74,16 @@ const DSAppPicker = ({
74
74
  triggerRef: triggerRef || defaultTriggerRef,
75
75
  isOverflow
76
76
  });
77
- const RenderTrigger = renderTrigger || (({ ref }) => /* @__PURE__ */ React2.createElement(DSButton, {
77
+ const RenderTrigger = renderTrigger || (({ ref }) => /* @__PURE__ */ React2.createElement(DSButtonV2, {
78
78
  "data-testid": "app-picker__button",
79
79
  id: "app-picker__button",
80
- buttonType: "text",
81
- icon: /* @__PURE__ */ React2.createElement(Icon, null),
80
+ buttonType: "icon",
82
81
  innerRef: mergeRefs(ref, defaultTriggerRef),
83
82
  onClick: (e) => {
84
83
  onClick(e);
85
84
  setOpen(true);
86
85
  }
87
- }));
86
+ }, /* @__PURE__ */ React2.createElement(Icon, null)));
88
87
  return /* @__PURE__ */ React2.createElement(DSPopover, {
89
88
  content: /* @__PURE__ */ React2.createElement(AppPickerContent, null),
90
89
  isOpen: typeof isOpen === "boolean" ? isOpen : open,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSAppPicker.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useEffect, useRef } from 'react';\nimport { describe } from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport DSPopover from '@elliemae/ds-popover';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport AppPickerImpl from './AppPickerImpl';\nimport { propTypes } from './propTypes';\nimport type { DSAppPickerType } from './types/AppPickerTypes';\n\nconst DSAppPicker: DSAppPickerType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n icon: Icon = () => <MenuPicker fill={['brand-primary', 700]} size=\"m\" />,\n renderTrigger,\n isOpen,\n onClose = () => null,\n actionRef,\n onKeyDown,\n onClick = () => null,\n onClickOutside = () => null,\n triggerRef,\n}) => {\n const [open, setOpen] = useState(false);\n const [isOverflow, setIsOverflow] = useState(false);\n const wrapperRef = useRef<HTMLUListElement>(null);\n const defaultTriggerRef = useRef(null);\n\n useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToIndex = (index) => {\n if (wrapperRef.current) {\n const parent = wrapperRef.current;\n const buttons = [...parent.querySelectorAll('button')];\n buttons[index].focus();\n }\n };\n }\n }, [actionRef, apps, customApps]);\n\n useEffect(() => {\n setTimeout(() => {\n if (wrapperRef.current) {\n const { scrollHeight, clientHeight } = wrapperRef.current;\n if (scrollHeight > clientHeight) return setIsOverflow(true);\n }\n return setIsOverflow(false);\n });\n }, [isOpen, open]);\n\n const handleOnClose = () => {\n if (typeof isOpen === 'boolean') {\n setOpen(isOpen);\n } else {\n setOpen(false);\n }\n onClose();\n };\n\n const handleOnClickOutside = (e: MouseEvent) => {\n setOpen(false);\n onClose();\n onClickOutside(e);\n };\n\n const AppPickerContent = () => (\n <AppPickerImpl\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n close={handleOnClose}\n wrapperRef={wrapperRef}\n onKeyDown={onKeyDown}\n triggerRef={triggerRef || defaultTriggerRef}\n isOverflow={isOverflow}\n />\n );\n\n const RenderTrigger =\n renderTrigger ||\n (({ ref }) => (\n <DSButton\n data-testid=\"app-picker__button\"\n id=\"app-picker__button\"\n buttonType=\"text\"\n icon={<Icon />}\n innerRef={mergeRefs(ref, defaultTriggerRef)}\n onClick={(e) => {\n onClick(e);\n setOpen(true);\n }}\n />\n ));\n\n return (\n <DSPopover\n content={<AppPickerContent />}\n isOpen={typeof isOpen === 'boolean' ? isOpen : open}\n onClickOutside={handleOnClickOutside}\n placement=\"bottom\"\n interactionType=\"click\"\n renderTrigger={RenderTrigger}\n showArrow\n style={{\n padding: '0',\n maxWidth: '1000px',\n width: 'fit-content',\n }}\n />\n );\n};\n\nDSAppPicker.propTypes = propTypes;\n\nconst AppPickerWithSchema = describe(DSAppPicker);\nAppPickerWithSchema.propTypes = propTypes;\n\nexport { DSAppPicker, AppPickerWithSchema };\nexport default DSAppPicker;\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,cAA+B,CAAC;AAAA,EACpC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,MAAM,OAAO,MAAM,qCAAC,YAAD;AAAA,IAAY,MAAM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AAC,MAAD;AAAA,IACN,UAAU,UAAU,KAAK;AAAA,IACzB,SAAS,CAAC,MAAM;AACd,cAAQ;AACR,cAAQ;AAAA;AAAA;AAKhB,SACE,qCAAC,WAAD;AAAA,IACE,SAAS,qCAAC,kBAAD;AAAA,IACT,QAAQ,OAAO,WAAW,YAAY,SAAS;AAAA,IAC/C,gBAAgB;AAAA,IAChB,WAAU;AAAA,IACV,iBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,WAAS;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA;AAAA;AAAA;AAMf,YAAY,YAAY;AAExB,MAAM,sBAAsB,SAAS;AACrC,oBAAoB,YAAY;AAGhC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useEffect, useRef } from 'react';\nimport { describe } from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport DSPopover from '@elliemae/ds-popover';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport AppPickerImpl from './AppPickerImpl';\nimport { propTypes } from './propTypes';\nimport type { DSAppPickerType } from './types/AppPickerTypes';\n\nconst DSAppPicker: DSAppPickerType = ({\n apps = [],\n customApps = [],\n sectionTitle = 'APPLICATIONS',\n customSectionTitle = 'CUSTOM APPLICATIONS',\n icon: Icon = () => <MenuPicker fill={['brand-primary', 700]} size=\"m\" />,\n renderTrigger,\n isOpen,\n onClose = () => null,\n actionRef,\n onKeyDown,\n onClick = () => null,\n onClickOutside = () => null,\n triggerRef,\n}) => {\n const [open, setOpen] = useState(false);\n const [isOverflow, setIsOverflow] = useState(false);\n const wrapperRef = useRef<HTMLUListElement>(null);\n const defaultTriggerRef = useRef(null);\n\n useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToIndex = (index) => {\n if (wrapperRef.current) {\n const parent = wrapperRef.current;\n const buttons = [...parent.querySelectorAll('button')];\n buttons[index].focus();\n }\n };\n }\n }, [actionRef, apps, customApps]);\n\n useEffect(() => {\n setTimeout(() => {\n if (wrapperRef.current) {\n const { scrollHeight, clientHeight } = wrapperRef.current;\n if (scrollHeight > clientHeight) return setIsOverflow(true);\n }\n return setIsOverflow(false);\n });\n }, [isOpen, open]);\n\n const handleOnClose = () => {\n if (typeof isOpen === 'boolean') {\n setOpen(isOpen);\n } else {\n setOpen(false);\n }\n onClose();\n };\n\n const handleOnClickOutside = (e: MouseEvent) => {\n setOpen(false);\n onClose();\n onClickOutside(e);\n };\n\n const AppPickerContent = () => (\n <AppPickerImpl\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n close={handleOnClose}\n wrapperRef={wrapperRef}\n onKeyDown={onKeyDown}\n triggerRef={triggerRef || defaultTriggerRef}\n isOverflow={isOverflow}\n />\n );\n const RenderTrigger =\n renderTrigger ||\n (({ ref }) => (\n <DSButtonV2\n data-testid=\"app-picker__button\"\n id=\"app-picker__button\"\n buttonType=\"icon\"\n innerRef={mergeRefs(ref, defaultTriggerRef)}\n onClick={(e) => {\n onClick(e);\n setOpen(true);\n }}\n >\n <Icon />\n </DSButtonV2>\n ));\n\n return (\n <DSPopover\n content={<AppPickerContent />}\n isOpen={typeof isOpen === 'boolean' ? isOpen : open}\n onClickOutside={handleOnClickOutside}\n placement=\"bottom\"\n interactionType=\"click\"\n renderTrigger={RenderTrigger}\n showArrow\n style={{\n padding: '0',\n maxWidth: '1000px',\n width: 'fit-content',\n }}\n />\n );\n};\n\nDSAppPicker.propTypes = propTypes;\n\nconst AppPickerWithSchema = describe(DSAppPicker);\nAppPickerWithSchema.propTypes = propTypes;\n\nexport { DSAppPicker, AppPickerWithSchema };\nexport default DSAppPicker;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,cAA+B,CAAC;AAAA,EACpC,OAAO,CAAC;AAAA,EACR,aA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EA,QAAM,mBAAmB,MACvB,qCAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,YAAY,cAAc;AAAA,IAC1B;AAAA,GACF;AAEF,QAAM,gBACJ,iBACC,EAAC,EAAE,UACF,qCAAC;AAAA,IACC,eAAY;AAAA,IACZ,IAAG;AAAA,IACH,YAAW;AAAA,IACX,UAAU,UAAU,KAAK,iBAAiB;AAAA,IAC1C,SAAS,CAAC,MAAM;AACd,cAAQ,CAAC;AACT,cAAQ,IAAI;AAAA,IACd;AAAA,KAEA,qCAAC,UAAK,CACR;AAGJ,SACE,qCAAC;AAAA,IACC,SAAS,qCAAC,sBAAiB;AAAA,IAC3B,QAAQ,OAAO,WAAW,YAAY,SAAS;AAAA,IAC/C,gBAAgB;AAAA,IAChB,WAAU;AAAA,IACV,iBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,WAAS;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,IACT;AAAA,GACF;AAEJ;AAEA,YAAY,YAAY;AAExB,MAAM,sBAAsB,SAAS,WAAW;AAChD,oBAAoB,YAAY;AAGhC,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/propTypes.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAA;AACA;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM,UAAU,MAAM,YACpB,sGACA;AAAA,EACF,YAAY,UAAU,MAAM,YAC1B;AAAA,EAEF,cAAc,UAAU,OAAO,YAAY,sBAAsB,aAAa;AAAA,EAC9E,oBAAoB,UAAU,OAAO,YAAY,wBAAwB,aAAa;AAAA,EACtF,MAAM,UAAU,KAAK,YAAY,yBAAyB,aAAa;AAAA,EACvE,eAAe,UAAU,KAAK,YAAY;AAAA,EAC1C,WAAW,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,SAAS,YAC5F;AAAA,EAEF,QAAQ,UAAU,KAAK,YAAY;AAAA,EACnC,SAAS,UAAU,KAAK,YAAY;AAAA,EACpC,WAAW,UAAU,KAAK,YAAY;AAAA,EACtC,SAAS,UAAU,KAAK,YAAY;AAAA,EACpC,gBAAgB,UAAU,KAAK,YAAY;AAAA;",
5
+ "mappings": "AAAA;ACAA;AACA;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM,UAAU,MAAM,YACpB,oGACF,EAAE;AAAA,EACF,YAAY,UAAU,MAAM,YAC1B,sGACF;AAAA,EACA,cAAc,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,cAAc;AAAA,EAC5F,oBAAoB,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,qBAAqB;AAAA,EAC3G,MAAM,UAAU,KAAK,YAAY,uBAAuB,EAAE,aAAa,UAAU;AAAA,EACjF,eAAe,UAAU,KAAK,YAAY,2BAA2B;AAAA,EACrE,WAAW,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,YAC5F,qGACF;AAAA,EACA,QAAQ,UAAU,KAAK,YAAY,6CAA6C;AAAA,EAChF,SAAS,UAAU,KAAK,YAAY,6CAA6C;AAAA,EACjF,WAAW,UAAU,KAAK,YAAY,6BAA6B;AAAA,EACnE,SAAS,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAC3E,gBAAgB,UAAU,KAAK,YAAY,6DAA6D;AAC1G;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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"],
5
- "mappings": "AAAA;ACEA;AAEO,MAAM,cAAc,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM;AAAA,WAC3D,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,eAChC,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA,iBACnC,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAM3C,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAS3D,CAAC,EAAE,iBAAkB,aAAa,eAAe;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,aAAa,OAAO,OAAO,EAAE,MAAM,gBAAgB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/D,MAAM,YAAY,OAAO,OAAO,EAAE,MAAM,gBAAgB,MAAM;AAAA;AAAA;AAAA;AAK9D,MAAM,kBAAkB,OAAO,KAAK,EAAE,MAAM,gBAAgB,MAAM;AAAA,eAC1D,CAAC,EAAE,YAAY,MAAM,UAAU,MAAM;AAAA,iBACnC,CAAC,EAAE,YAAY,MAAM,YAAY;AAAA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AAQ;AAAA;AAAA;AAAA;AAAA,IAI9C,CAAC,EAAE,eAAgB,CAAC,WAAW,KAAK;AAAA;AAGjC,MAAM,kBAAkB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,YAAY,CAAC;AAAA,0BAC7D,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/utils.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAO,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;",
5
+ "mappings": "AAAA;ACAO,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;AACP;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-app-picker",
3
- "version": "3.0.0-next.6",
3
+ "version": "3.0.0-next.60",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - App Picker",
6
6
  "files": [
@@ -58,18 +58,24 @@
58
58
  "reportFile": "tests.xml",
59
59
  "indent": 4
60
60
  },
61
+ "scripts": {
62
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
63
+ "test": "node ../../scripts/testing/test.mjs",
64
+ "lint": "node ../../scripts/lint.mjs",
65
+ "dts": "node ../../scripts/dts.mjs",
66
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
67
+ },
61
68
  "dependencies": {
62
- "@elliemae/ds-button": "3.0.0-next.6",
63
- "@elliemae/ds-icons": "3.0.0-next.6",
64
- "@elliemae/ds-popover": "3.0.0-next.6",
65
- "@elliemae/ds-props-helpers": "3.0.0-next.6",
66
- "@elliemae/ds-system": "3.0.0-next.6",
67
- "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.6",
68
- "@elliemae/ds-utilities": "3.0.0-next.6",
69
+ "@elliemae/ds-button": "workspace:*",
70
+ "@elliemae/ds-icons": "workspace:*",
71
+ "@elliemae/ds-popover": "workspace:*",
72
+ "@elliemae/ds-system": "workspace:*",
73
+ "@elliemae/ds-truncated-tooltip-text": "workspace:*",
74
+ "@elliemae/ds-utilities": "workspace:*",
69
75
  "react-desc": "^4.1.3"
70
76
  },
71
77
  "devDependencies": {
72
- "@testing-library/jest-dom": "~5.15.1",
78
+ "@testing-library/jest-dom": "~5.16.2",
73
79
  "@testing-library/react": "~12.1.2"
74
80
  },
75
81
  "peerDependencies": {
@@ -80,12 +86,5 @@
80
86
  "publishConfig": {
81
87
  "access": "public",
82
88
  "typeSafety": false
83
- },
84
- "scripts": {
85
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
86
- "test": "node ../../scripts/testing/test.mjs",
87
- "lint": "node ../../scripts/lint.mjs",
88
- "dts": "node ../../scripts/dts.mjs",
89
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
90
89
  }
91
- }
90
+ }