@elliemae/ds-app-picker 3.0.0-next.61 → 3.0.0-next.64
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/dist/cjs/AppPickerImpl.js +46 -29
- package/dist/cjs/AppPickerImpl.js.map +2 -2
- package/dist/cjs/DSAppPicker.js +4 -4
- package/dist/cjs/DSAppPicker.js.map +2 -2
- package/dist/cjs/styles.js +37 -41
- package/dist/cjs/styles.js.map +2 -2
- package/dist/cjs/types/AppPickerTypes.js.map +1 -1
- package/dist/esm/AppPickerImpl.js +50 -33
- package/dist/esm/AppPickerImpl.js.map +2 -2
- package/dist/esm/DSAppPicker.js +3 -3
- package/dist/esm/DSAppPicker.js.map +2 -2
- package/dist/esm/styles.js +37 -41
- package/dist/esm/styles.js.map +2 -2
- package/package.json +1 -1
|
@@ -52,7 +52,6 @@ module.exports = __toCommonJS(AppPickerImpl_exports);
|
|
|
52
52
|
var React = __toESM(require("react"));
|
|
53
53
|
var import_react = __toESM(require("react"));
|
|
54
54
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
55
|
-
var import_lodash = require("lodash");
|
|
56
55
|
var import_utils = require("./utils");
|
|
57
56
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
58
57
|
var import_styles = require("./styles");
|
|
@@ -105,7 +104,7 @@ const AppPickerImpl = ({
|
|
|
105
104
|
break;
|
|
106
105
|
}
|
|
107
106
|
};
|
|
108
|
-
const handleOnClick = (0, import_react.useCallback)((
|
|
107
|
+
const handleOnClick = (0, import_react.useCallback)((app) => (e) => {
|
|
109
108
|
if (app.onClick)
|
|
110
109
|
app.onClick(e, app);
|
|
111
110
|
}, []);
|
|
@@ -116,55 +115,73 @@ const AppPickerImpl = ({
|
|
|
116
115
|
close();
|
|
117
116
|
}
|
|
118
117
|
}, [onKeyDown, close]);
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
const formattedRows =
|
|
122
|
-
key: index
|
|
123
|
-
}, row.map((app, key) => {
|
|
118
|
+
const totalAppsLenght = (0, import_react.useMemo)(() => apps.length + customApps.length, []);
|
|
119
|
+
const buildRows = (0, import_react.useCallback)((appList, prevIndex = 0, title) => {
|
|
120
|
+
const formattedRows = appList.map((app, index) => {
|
|
124
121
|
const _a = app, { label, disabled, selected, icon: Icon, id } = _a, otherProps = __objRest(_a, ["label", "disabled", "selected", "icon", "id"]);
|
|
125
|
-
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledChip, __spreadValues({
|
|
126
|
-
key,
|
|
127
|
-
onClick:
|
|
122
|
+
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledListItem, null, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledChip, __spreadValues({
|
|
123
|
+
key: index,
|
|
124
|
+
onClick: handleOnClick(app),
|
|
128
125
|
onKeyDown: handleKeyDown,
|
|
129
126
|
"data-testid": "app-picker__chip",
|
|
130
127
|
"aria-disabled": disabled,
|
|
131
128
|
disabled,
|
|
132
129
|
selected,
|
|
133
130
|
"aria-selected": selected,
|
|
134
|
-
"aria-setsize":
|
|
135
|
-
"aria-posinset":
|
|
136
|
-
id
|
|
131
|
+
"aria-setsize": totalAppsLenght,
|
|
132
|
+
"aria-posinset": index + prevIndex,
|
|
133
|
+
id,
|
|
134
|
+
"aria-label": `${label}. ${title}`
|
|
137
135
|
}, (0, import_ds_utilities.getDataProps)(otherProps)), /* @__PURE__ */ import_react.default.createElement(Icon, {
|
|
138
136
|
className: "app-picker__icon",
|
|
139
137
|
size: "m"
|
|
140
138
|
}), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledChipLabel, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
|
|
141
139
|
value: label,
|
|
142
140
|
placement: "bottom"
|
|
143
|
-
})));
|
|
144
|
-
})
|
|
141
|
+
}))));
|
|
142
|
+
});
|
|
145
143
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, formattedRows);
|
|
146
|
-
};
|
|
147
|
-
const AppsRows = () => buildRows(apps, 1);
|
|
148
|
-
const CustomRows = () => buildRows(customApps, apps.length);
|
|
144
|
+
}, []);
|
|
145
|
+
const AppsRows = (0, import_react.useMemo)(() => buildRows(apps, 1, sectionTitle), []);
|
|
146
|
+
const CustomRows = (0, import_react.useMemo)(() => buildRows(customApps, apps.length, customSectionTitle), []);
|
|
147
|
+
const layout = (0, import_react.useMemo)(() => {
|
|
148
|
+
const cols = ["repeat(3, 92px)"];
|
|
149
|
+
let appsRows = 0;
|
|
150
|
+
let customRows = 0;
|
|
151
|
+
let rows = [];
|
|
152
|
+
if (apps.length > 0) {
|
|
153
|
+
appsRows = apps.length / 3;
|
|
154
|
+
rows.push("68px", `repeat(${appsRows}, 68px})`);
|
|
155
|
+
}
|
|
156
|
+
if (customApps.length > 0) {
|
|
157
|
+
customRows = customApps.length / 3;
|
|
158
|
+
rows.push("9px", "68px", `repeat(${customRows}, 68px})`);
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
rows,
|
|
162
|
+
cols
|
|
163
|
+
};
|
|
164
|
+
}, []);
|
|
149
165
|
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledWrapper, {
|
|
150
166
|
role: "listbox",
|
|
151
167
|
ref: wrapperRef,
|
|
152
168
|
onKeyDown: handleOnKeyDownWrapper,
|
|
153
169
|
"data-testid": "app-picker__wrapper",
|
|
154
|
-
isOverflow
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
isOverflow,
|
|
171
|
+
cols: layout.cols,
|
|
172
|
+
rows: layout.rows,
|
|
173
|
+
forwardedAs: "ul"
|
|
174
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledListItemFullRow, {
|
|
157
175
|
"aria-hidden": true
|
|
158
|
-
},
|
|
159
|
-
"data-testid": "app-picker__main-
|
|
160
|
-
},
|
|
176
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTitle, {
|
|
177
|
+
"data-testid": "app-picker__main-title"
|
|
178
|
+
}, sectionTitle)), AppsRows, customApps.length > 0 && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledListItemFullRow, {
|
|
161
179
|
"aria-hidden": true
|
|
162
|
-
}), /* @__PURE__ */ import_react.default.createElement(import_styles.
|
|
163
|
-
"data-testid": "app-picker__custom-title",
|
|
180
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledSeparator, null)), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledListItemFullRow, {
|
|
164
181
|
"aria-hidden": true
|
|
165
|
-
},
|
|
166
|
-
"data-testid": "app-picker__custom-
|
|
167
|
-
},
|
|
182
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTitle, {
|
|
183
|
+
"data-testid": "app-picker__custom-title"
|
|
184
|
+
}, customSectionTitle)), CustomRows));
|
|
168
185
|
};
|
|
169
186
|
var AppPickerImpl_default = AppPickerImpl;
|
|
170
187
|
//# 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-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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,
|
|
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, useMemo } 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 StyledSeparator,\n StyledListItemFullRow,\n StyledListItem,\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(\n (app) => (e: React.MouseEvent) => {\n if (app.onClick) app.onClick(e, app);\n },\n [],\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 totalAppsLenght = useMemo(() => apps.length + customApps.length, []);\n\n const buildRows = useCallback((appList: AppItemType[], prevIndex = 0, title: string): JSX.Element => {\n const formattedRows = appList.map((app, index) => {\n const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;\n\n return (\n <StyledListItem>\n <StyledChip\n key={index}\n onClick={handleOnClick(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={totalAppsLenght}\n aria-posinset={index + prevIndex}\n id={id}\n aria-label={`${label}. ${title}`}\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 </StyledListItem>\n );\n });\n\n return <>{formattedRows}</>;\n }, []);\n\n const AppsRows = useMemo(() => buildRows(apps, 1, sectionTitle), []);\n const CustomRows = useMemo(() => buildRows(customApps, apps.length, customSectionTitle), []);\n\n const layout = useMemo(() => {\n const cols = ['repeat(3, 92px)'];\n let appsRows = 0;\n let customRows = 0;\n let rows = [];\n if (apps.length > 0) {\n appsRows = apps.length / 3;\n rows.push('68px', `repeat(${appsRows}, 68px})`);\n }\n if (customApps.length > 0) {\n customRows = customApps.length / 3;\n rows.push('9px', '68px', `repeat(${customRows}, 68px})`);\n }\n return {\n rows,\n cols,\n };\n }, []);\n\n return (\n <StyledWrapper\n role=\"listbox\"\n ref={wrapperRef}\n onKeyDown={handleOnKeyDownWrapper}\n data-testid=\"app-picker__wrapper\"\n isOverflow={isOverflow}\n cols={layout.cols}\n rows={layout.rows}\n forwardedAs=\"ul\"\n >\n <StyledListItemFullRow aria-hidden>\n <StyledTitle data-testid=\"app-picker__main-title\">{sectionTitle}</StyledTitle>\n </StyledListItemFullRow>\n {AppsRows}\n {customApps.length > 0 && (\n <>\n <StyledListItemFullRow aria-hidden>\n <StyledSeparator />\n </StyledListItemFullRow>\n <StyledListItemFullRow aria-hidden>\n <StyledTitle data-testid=\"app-picker__custom-title\">{customSectionTitle}</StyledTitle>\n </StyledListItemFullRow>\n {CustomRows}\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,mBAA+D;AAC/D,0BAA6B;AAE7B,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,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eAAY;AAAA,KAA0B,YAAa,CAClE,GACC,UACA,WAAW,SAAS,KACnB,wFACE,mDAAC;AAAA,IAAsB,eAAW;AAAA,KAChC,mDAAC,mCAAgB,CACnB,GACA,mDAAC;AAAA,IAAsB,eAAW;AAAA,KAChC,mDAAC;AAAA,IAAY,eAAY;AAAA,KAA4B,kBAAmB,CAC1E,GACC,UACH,CAEJ;AAEJ;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/DSAppPicker.js
CHANGED
|
@@ -27,11 +27,10 @@ __export(DSAppPicker_exports, {
|
|
|
27
27
|
module.exports = __toCommonJS(DSAppPicker_exports);
|
|
28
28
|
var React = __toESM(require("react"));
|
|
29
29
|
var import_react = __toESM(require("react"));
|
|
30
|
-
var import_react_desc = require("react-desc");
|
|
31
30
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
32
31
|
var import_ds_button = require("@elliemae/ds-button");
|
|
33
|
-
var import_ds_popover = __toESM(require("@elliemae/ds-popover"));
|
|
34
32
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
33
|
+
var import_ds_popover = __toESM(require("@elliemae/ds-popover"));
|
|
35
34
|
var import_AppPickerImpl = __toESM(require("./AppPickerImpl"));
|
|
36
35
|
var import_propTypes = require("./propTypes");
|
|
37
36
|
const DSAppPicker = ({
|
|
@@ -105,6 +104,8 @@ const DSAppPicker = ({
|
|
|
105
104
|
"data-testid": "app-picker__button",
|
|
106
105
|
id: "app-picker__button",
|
|
107
106
|
buttonType: "icon",
|
|
107
|
+
"aria-haspopup": "true",
|
|
108
|
+
"aria-expanded": open || isOpen,
|
|
108
109
|
innerRef: (0, import_ds_utilities.mergeRefs)(ref, defaultTriggerRef),
|
|
109
110
|
onClick: (e) => {
|
|
110
111
|
onClick(e);
|
|
@@ -126,8 +127,7 @@ const DSAppPicker = ({
|
|
|
126
127
|
}
|
|
127
128
|
});
|
|
128
129
|
};
|
|
129
|
-
|
|
130
|
-
const AppPickerWithSchema = (0, import_react_desc.describe)(DSAppPicker);
|
|
130
|
+
const AppPickerWithSchema = (0, import_ds_utilities.describe)(DSAppPicker);
|
|
131
131
|
AppPickerWithSchema.propTypes = import_propTypes.propTypes;
|
|
132
132
|
var DSAppPicker_default = DSAppPicker;
|
|
133
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 {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmD;
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect, useRef } from 'react';\nimport {} from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport { describe, mergeRefs } from '@elliemae/ds-utilities';\nimport DSPopover from '@elliemae/ds-popover';\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 aria-haspopup=\"true\"\n aria-expanded={open || isOpen}\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\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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M;AAC1B,QAAI,OAAO,WAAW,WAAW;AAC/B,cAAQ,MAAM;AAAA,IAChB,OAAO;AACL,cAAQ,KAAK;AAAA,IACf;AACA,YAAQ;AAAA,EACV;AAEA,QAAM,uBAAuB,CAAC,MAAkB;AAC9C,YAAQ,KAAK;AACb,YAAQ;AACR,mBAAe,CAAC;AAAA,EAClB;AAEA,QAAM,mBAAmB,MACvB,mDAAC;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,mDAAC;AAAA,IACC,eAAY;AAAA,IACZ,IAAG;AAAA,IACH,YAAW;AAAA,IACX,iBAAc;AAAA,IACd,iBAAe,QAAQ;AAAA,IACvB,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,MAAM,sBAAsB,kCAAS,WAAW;AAChD,oBAAoB,YAAY;AAGhC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styles.js
CHANGED
|
@@ -22,8 +22,8 @@ var styles_exports = {};
|
|
|
22
22
|
__export(styles_exports, {
|
|
23
23
|
StyledChip: () => StyledChip,
|
|
24
24
|
StyledChipLabel: () => StyledChipLabel,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
StyledListItem: () => StyledListItem,
|
|
26
|
+
StyledListItemFullRow: () => StyledListItemFullRow,
|
|
27
27
|
StyledSeparator: () => StyledSeparator,
|
|
28
28
|
StyledTitle: () => StyledTitle,
|
|
29
29
|
StyledWrapper: () => StyledWrapper
|
|
@@ -31,15 +31,26 @@ __export(styles_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(styles_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_ds_system = require("@elliemae/ds-system");
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
35
|
+
const styledChipSelectedSetter = import_ds_system.css`
|
|
36
|
+
color: ${({ theme }) => theme.colors.brand[800]};
|
|
37
|
+
background-color: ${({ theme }) => theme.colors.brand[200]};
|
|
38
|
+
|
|
39
|
+
.app-picker__icon {
|
|
40
|
+
fill: ${({ theme }) => theme.colors.brand[800]};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:before {
|
|
44
|
+
border: 1px solid ${({ theme }) => theme.colors.brand[600]};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:focus {
|
|
48
|
+
&:before {
|
|
49
|
+
border: 2px solid ${({ theme }) => theme.colors.brand[800]};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
41
52
|
`;
|
|
42
|
-
const StyledWrapper = (0, import_ds_system.styled)(
|
|
53
|
+
const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: "DS-AppPicker", slot: "root" })`
|
|
43
54
|
align-items: center;
|
|
44
55
|
min-width: 308px;
|
|
45
56
|
min-height: 110px;
|
|
@@ -48,22 +59,25 @@ const StyledWrapper = (0, import_ds_system.styled)("ul", { name: "DS-AppPicker",
|
|
|
48
59
|
overflow-y: auto;
|
|
49
60
|
overflow-x: hidden;
|
|
50
61
|
margin: 0;
|
|
51
|
-
padding: ${({ isOverflow }) => isOverflow ? "0 0
|
|
62
|
+
padding: ${({ isOverflow }) => isOverflow ? "0 0 8px 16px" : "0 16px 8px 16px"};
|
|
52
63
|
&:focus {
|
|
53
64
|
outline: none;
|
|
54
65
|
}
|
|
55
66
|
`;
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
justify-content: center;
|
|
60
|
-
align-items: center;
|
|
61
|
-
width: 100%;
|
|
62
|
-
margin: 8px 0;
|
|
67
|
+
const StyledListItem = import_ds_system.styled.li`
|
|
68
|
+
list-style: none;
|
|
63
69
|
`;
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
const StyledListItemFullRow = import_ds_system.styled.li`
|
|
71
|
+
list-style: none;
|
|
72
|
+
grid-column: 1/4;
|
|
73
|
+
`;
|
|
74
|
+
const StyledTitle = (0, import_ds_system.styled)("h3", { name: "DS-AppPicker", slot: "title" })`
|
|
75
|
+
color: ${({ theme }) => theme.colors.neutral[700]};
|
|
76
|
+
font-size: ${({ theme }) => theme.fontSizes.value[400]};
|
|
77
|
+
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
78
|
+
margin: 12px 0 8px 0;
|
|
79
|
+
line-height: 1.385;
|
|
80
|
+
text-transform: uppercase;
|
|
67
81
|
`;
|
|
68
82
|
const StyledChipLabel = (0, import_ds_system.styled)("p", { name: "DS-AppPicker", slot: "chipLabel" })`
|
|
69
83
|
font-size: ${({ theme }) => theme.fontSizes.label[200]};
|
|
@@ -78,24 +92,6 @@ const StyledChipLabel = (0, import_ds_system.styled)("p", { name: "DS-AppPicker"
|
|
|
78
92
|
padding-top: 6px;
|
|
79
93
|
}
|
|
80
94
|
`;
|
|
81
|
-
const styledChipSelectedCss = import_ds_system.css`
|
|
82
|
-
color: ${({ theme }) => theme.colors.brand[800]};
|
|
83
|
-
background-color: ${({ theme }) => theme.colors.brand[200]};
|
|
84
|
-
|
|
85
|
-
.app-picker__icon {
|
|
86
|
-
fill: ${({ theme }) => theme.colors.brand[800]};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&:before {
|
|
90
|
-
border: 1px solid ${({ theme }) => theme.colors.brand[600]};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&:focus {
|
|
94
|
-
&:before {
|
|
95
|
-
border: 2px solid ${({ theme }) => theme.colors.brand[800]};
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
`;
|
|
99
95
|
const StyledChip = (0, import_ds_system.styled)("button", { name: "DS-AppPicker", slot: "chip" })`
|
|
100
96
|
position: relative;
|
|
101
97
|
display: flex;
|
|
@@ -172,12 +168,12 @@ const StyledChip = (0, import_ds_system.styled)("button", { name: "DS-AppPicker"
|
|
|
172
168
|
}
|
|
173
169
|
}
|
|
174
170
|
|
|
175
|
-
${({ selected }) => !selected ? "" :
|
|
171
|
+
${({ selected }) => !selected ? "" : styledChipSelectedSetter}
|
|
176
172
|
`;
|
|
177
173
|
const StyledSeparator = (0, import_ds_system.styled)("hr", { name: "DS-AppPicker", slot: "separator" })`
|
|
178
174
|
border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
|
|
179
175
|
border-bottom: none;
|
|
180
176
|
width: 99%;
|
|
181
|
-
margin: 0;
|
|
177
|
+
margin: 8px 0 0 0;
|
|
182
178
|
`;
|
|
183
179
|
//# sourceMappingURL=styles.js.map
|
package/dist/cjs/styles.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,uBAA4B;AAErB,MAAM,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable max-lines */\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst styledChipSelectedSetter = 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 StyledWrapper = styled(Grid, { 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 8px 16px' : '0 16px 8px 16px')};\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledListItem = styled.li`\n list-style: none;\n`;\n\nexport const StyledListItemFullRow = styled.li`\n list-style: none;\n grid-column: 1/4;\n`;\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 8px 0;\n line-height: 1.385;\n text-transform: uppercase;\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\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 ? '' : styledChipSelectedSetter)}\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: 8px 0 0 0;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,uBAA4B;AAC5B,qBAAqB;AAErB,MA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AAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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"],
|
|
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 isOverflow: boolean;\n}\n\nexport type DSAppPickerImplType = React.ComponentType<AppPickerImplProps>;\nexport type DSAppPickerType = React.ComponentType<AppPickerPropsType>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -27,9 +27,8 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
return target;
|
|
28
28
|
};
|
|
29
29
|
import * as React from "react";
|
|
30
|
-
import React2, { useEffect, useCallback, useRef } from "react";
|
|
30
|
+
import React2, { useEffect, useCallback, useRef, useMemo } from "react";
|
|
31
31
|
import { getDataProps } from "@elliemae/ds-utilities";
|
|
32
|
-
import { chunk } from "lodash";
|
|
33
32
|
import { keys } from "./utils";
|
|
34
33
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
35
34
|
import {
|
|
@@ -37,9 +36,9 @@ import {
|
|
|
37
36
|
StyledChip,
|
|
38
37
|
StyledChipLabel,
|
|
39
38
|
StyledTitle,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
StyledSeparator,
|
|
40
|
+
StyledListItemFullRow,
|
|
41
|
+
StyledListItem
|
|
43
42
|
} from "./styles";
|
|
44
43
|
const AppPickerImpl = ({
|
|
45
44
|
apps = [],
|
|
@@ -90,7 +89,7 @@ const AppPickerImpl = ({
|
|
|
90
89
|
break;
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
|
-
const handleOnClick = useCallback((
|
|
92
|
+
const handleOnClick = useCallback((app) => (e) => {
|
|
94
93
|
if (app.onClick)
|
|
95
94
|
app.onClick(e, app);
|
|
96
95
|
}, []);
|
|
@@ -101,55 +100,73 @@ const AppPickerImpl = ({
|
|
|
101
100
|
close();
|
|
102
101
|
}
|
|
103
102
|
}, [onKeyDown, close]);
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
const formattedRows =
|
|
107
|
-
key: index
|
|
108
|
-
}, row.map((app, key) => {
|
|
103
|
+
const totalAppsLenght = useMemo(() => apps.length + customApps.length, []);
|
|
104
|
+
const buildRows = useCallback((appList, prevIndex = 0, title) => {
|
|
105
|
+
const formattedRows = appList.map((app, index) => {
|
|
109
106
|
const _a = app, { label, disabled, selected, icon: Icon, id } = _a, otherProps = __objRest(_a, ["label", "disabled", "selected", "icon", "id"]);
|
|
110
|
-
return /* @__PURE__ */ React2.createElement(StyledChip, __spreadValues({
|
|
111
|
-
key,
|
|
112
|
-
onClick:
|
|
107
|
+
return /* @__PURE__ */ React2.createElement(StyledListItem, null, /* @__PURE__ */ React2.createElement(StyledChip, __spreadValues({
|
|
108
|
+
key: index,
|
|
109
|
+
onClick: handleOnClick(app),
|
|
113
110
|
onKeyDown: handleKeyDown,
|
|
114
111
|
"data-testid": "app-picker__chip",
|
|
115
112
|
"aria-disabled": disabled,
|
|
116
113
|
disabled,
|
|
117
114
|
selected,
|
|
118
115
|
"aria-selected": selected,
|
|
119
|
-
"aria-setsize":
|
|
120
|
-
"aria-posinset":
|
|
121
|
-
id
|
|
116
|
+
"aria-setsize": totalAppsLenght,
|
|
117
|
+
"aria-posinset": index + prevIndex,
|
|
118
|
+
id,
|
|
119
|
+
"aria-label": `${label}. ${title}`
|
|
122
120
|
}, getDataProps(otherProps)), /* @__PURE__ */ React2.createElement(Icon, {
|
|
123
121
|
className: "app-picker__icon",
|
|
124
122
|
size: "m"
|
|
125
123
|
}), /* @__PURE__ */ React2.createElement(StyledChipLabel, null, /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
|
|
126
124
|
value: label,
|
|
127
125
|
placement: "bottom"
|
|
128
|
-
})));
|
|
129
|
-
})
|
|
126
|
+
}))));
|
|
127
|
+
});
|
|
130
128
|
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, formattedRows);
|
|
131
|
-
};
|
|
132
|
-
const AppsRows = () => buildRows(apps, 1);
|
|
133
|
-
const CustomRows = () => buildRows(customApps, apps.length);
|
|
129
|
+
}, []);
|
|
130
|
+
const AppsRows = useMemo(() => buildRows(apps, 1, sectionTitle), []);
|
|
131
|
+
const CustomRows = useMemo(() => buildRows(customApps, apps.length, customSectionTitle), []);
|
|
132
|
+
const layout = useMemo(() => {
|
|
133
|
+
const cols = ["repeat(3, 92px)"];
|
|
134
|
+
let appsRows = 0;
|
|
135
|
+
let customRows = 0;
|
|
136
|
+
let rows = [];
|
|
137
|
+
if (apps.length > 0) {
|
|
138
|
+
appsRows = apps.length / 3;
|
|
139
|
+
rows.push("68px", `repeat(${appsRows}, 68px})`);
|
|
140
|
+
}
|
|
141
|
+
if (customApps.length > 0) {
|
|
142
|
+
customRows = customApps.length / 3;
|
|
143
|
+
rows.push("9px", "68px", `repeat(${customRows}, 68px})`);
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
rows,
|
|
147
|
+
cols
|
|
148
|
+
};
|
|
149
|
+
}, []);
|
|
134
150
|
return /* @__PURE__ */ React2.createElement(StyledWrapper, {
|
|
135
151
|
role: "listbox",
|
|
136
152
|
ref: wrapperRef,
|
|
137
153
|
onKeyDown: handleOnKeyDownWrapper,
|
|
138
154
|
"data-testid": "app-picker__wrapper",
|
|
139
|
-
isOverflow
|
|
140
|
-
|
|
141
|
-
|
|
155
|
+
isOverflow,
|
|
156
|
+
cols: layout.cols,
|
|
157
|
+
rows: layout.rows,
|
|
158
|
+
forwardedAs: "ul"
|
|
159
|
+
}, /* @__PURE__ */ React2.createElement(StyledListItemFullRow, {
|
|
142
160
|
"aria-hidden": true
|
|
143
|
-
},
|
|
144
|
-
"data-testid": "app-picker__main-
|
|
145
|
-
},
|
|
161
|
+
}, /* @__PURE__ */ React2.createElement(StyledTitle, {
|
|
162
|
+
"data-testid": "app-picker__main-title"
|
|
163
|
+
}, sectionTitle)), AppsRows, customApps.length > 0 && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(StyledListItemFullRow, {
|
|
146
164
|
"aria-hidden": true
|
|
147
|
-
}), /* @__PURE__ */ React2.createElement(
|
|
148
|
-
"data-testid": "app-picker__custom-title",
|
|
165
|
+
}, /* @__PURE__ */ React2.createElement(StyledSeparator, null)), /* @__PURE__ */ React2.createElement(StyledListItemFullRow, {
|
|
149
166
|
"aria-hidden": true
|
|
150
|
-
},
|
|
151
|
-
"data-testid": "app-picker__custom-
|
|
152
|
-
},
|
|
167
|
+
}, /* @__PURE__ */ React2.createElement(StyledTitle, {
|
|
168
|
+
"data-testid": "app-picker__custom-title"
|
|
169
|
+
}, customSectionTitle)), CustomRows));
|
|
153
170
|
};
|
|
154
171
|
var AppPickerImpl_default = AppPickerImpl;
|
|
155
172
|
export {
|
|
@@ -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-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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACGA;AACA;
|
|
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, useMemo } 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 StyledSeparator,\n StyledListItemFullRow,\n StyledListItem,\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(\n (app) => (e: React.MouseEvent) => {\n if (app.onClick) app.onClick(e, app);\n },\n [],\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 totalAppsLenght = useMemo(() => apps.length + customApps.length, []);\n\n const buildRows = useCallback((appList: AppItemType[], prevIndex = 0, title: string): JSX.Element => {\n const formattedRows = appList.map((app, index) => {\n const { label, disabled, selected, icon: Icon, id, ...otherProps } = app;\n\n return (\n <StyledListItem>\n <StyledChip\n key={index}\n onClick={handleOnClick(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={totalAppsLenght}\n aria-posinset={index + prevIndex}\n id={id}\n aria-label={`${label}. ${title}`}\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 </StyledListItem>\n );\n });\n\n return <>{formattedRows}</>;\n }, []);\n\n const AppsRows = useMemo(() => buildRows(apps, 1, sectionTitle), []);\n const CustomRows = useMemo(() => buildRows(customApps, apps.length, customSectionTitle), []);\n\n const layout = useMemo(() => {\n const cols = ['repeat(3, 92px)'];\n let appsRows = 0;\n let customRows = 0;\n let rows = [];\n if (apps.length > 0) {\n appsRows = apps.length / 3;\n rows.push('68px', `repeat(${appsRows}, 68px})`);\n }\n if (customApps.length > 0) {\n customRows = customApps.length / 3;\n rows.push('9px', '68px', `repeat(${customRows}, 68px})`);\n }\n return {\n rows,\n cols,\n };\n }, []);\n\n return (\n <StyledWrapper\n role=\"listbox\"\n ref={wrapperRef}\n onKeyDown={handleOnKeyDownWrapper}\n data-testid=\"app-picker__wrapper\"\n isOverflow={isOverflow}\n cols={layout.cols}\n rows={layout.rows}\n forwardedAs=\"ul\"\n >\n <StyledListItemFullRow aria-hidden>\n <StyledTitle data-testid=\"app-picker__main-title\">{sectionTitle}</StyledTitle>\n </StyledListItemFullRow>\n {AppsRows}\n {customApps.length > 0 && (\n <>\n <StyledListItemFullRow aria-hidden>\n <StyledSeparator />\n </StyledListItemFullRow>\n <StyledListItemFullRow aria-hidden>\n <StyledTitle data-testid=\"app-picker__custom-title\">{customSectionTitle}</StyledTitle>\n </StyledListItemFullRow>\n {CustomRows}\n </>\n )}\n </StyledWrapper>\n );\n};\n\nexport default AppPickerImpl;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACGA;AACA;AAEA;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,YA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ACC,UACH,CAEJ;AAEJ;AAEA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSAppPicker.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React2, { useState, useEffect, useRef } from "react";
|
|
3
|
-
import { describe } from "react-desc";
|
|
4
3
|
import { MenuPicker } from "@elliemae/ds-icons";
|
|
5
4
|
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
5
|
+
import { describe, mergeRefs } from "@elliemae/ds-utilities";
|
|
6
6
|
import DSPopover from "@elliemae/ds-popover";
|
|
7
|
-
import { mergeRefs } from "@elliemae/ds-utilities";
|
|
8
7
|
import AppPickerImpl from "./AppPickerImpl";
|
|
9
8
|
import { propTypes } from "./propTypes";
|
|
10
9
|
const DSAppPicker = ({
|
|
@@ -78,6 +77,8 @@ const DSAppPicker = ({
|
|
|
78
77
|
"data-testid": "app-picker__button",
|
|
79
78
|
id: "app-picker__button",
|
|
80
79
|
buttonType: "icon",
|
|
80
|
+
"aria-haspopup": "true",
|
|
81
|
+
"aria-expanded": open || isOpen,
|
|
81
82
|
innerRef: mergeRefs(ref, defaultTriggerRef),
|
|
82
83
|
onClick: (e) => {
|
|
83
84
|
onClick(e);
|
|
@@ -99,7 +100,6 @@ const DSAppPicker = ({
|
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
};
|
|
102
|
-
DSAppPicker.propTypes = propTypes;
|
|
103
103
|
const AppPickerWithSchema = describe(DSAppPicker);
|
|
104
104
|
AppPickerWithSchema.propTypes = propTypes;
|
|
105
105
|
var DSAppPicker_default = DSAppPicker;
|
|
@@ -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 {
|
|
5
|
-
"mappings": "AAAA;ACAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useEffect, useRef } from 'react';\nimport {} from 'react-desc';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport { describe, mergeRefs } from '@elliemae/ds-utilities';\nimport DSPopover from '@elliemae/ds-popover';\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 aria-haspopup=\"true\"\n aria-expanded={open || isOpen}\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\nconst AppPickerWithSchema = describe(DSAppPicker);\nAppPickerWithSchema.propTypes = propTypes;\n\nexport { DSAppPicker, AppPickerWithSchema };\nexport default DSAppPicker;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,cAA+B,CAAC;AAAA,EACpC,OAAO,CAAC;AAAA,EACR,aAAa,CAAC;AAAA,EACd,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,MAAM,OAAO,MAAM,qCAAC;AAAA,IAAW,MAAM,CAAC,iBAAiB,GAAG;AAAA,IAAG,MAAK;AAAA,GAAI;AAAA,EACtE;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,SAAS,KAAK;AACtC,QAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;AAClD,QAAM,aAAa,OAAyB,IAAI;A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AAA,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,MAAM,sBAAsB,SAAS,WAAW;AAChD,oBAAoB,YAAY;AAGhC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styles.js
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { styled, css } from "@elliemae/ds-system";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
const styledChipSelectedSetter = css`
|
|
5
|
+
color: ${({ theme }) => theme.colors.brand[800]};
|
|
6
|
+
background-color: ${({ theme }) => theme.colors.brand[200]};
|
|
7
|
+
|
|
8
|
+
.app-picker__icon {
|
|
9
|
+
fill: ${({ theme }) => theme.colors.brand[800]};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:before {
|
|
13
|
+
border: 1px solid ${({ theme }) => theme.colors.brand[600]};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:focus {
|
|
17
|
+
&:before {
|
|
18
|
+
border: 2px solid ${({ theme }) => theme.colors.brand[800]};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
10
21
|
`;
|
|
11
|
-
const StyledWrapper = styled(
|
|
22
|
+
const StyledWrapper = styled(Grid, { name: "DS-AppPicker", slot: "root" })`
|
|
12
23
|
align-items: center;
|
|
13
24
|
min-width: 308px;
|
|
14
25
|
min-height: 110px;
|
|
@@ -17,22 +28,25 @@ const StyledWrapper = styled("ul", { name: "DS-AppPicker", slot: "root" })`
|
|
|
17
28
|
overflow-y: auto;
|
|
18
29
|
overflow-x: hidden;
|
|
19
30
|
margin: 0;
|
|
20
|
-
padding: ${({ isOverflow }) => isOverflow ? "0 0
|
|
31
|
+
padding: ${({ isOverflow }) => isOverflow ? "0 0 8px 16px" : "0 16px 8px 16px"};
|
|
21
32
|
&:focus {
|
|
22
33
|
outline: none;
|
|
23
34
|
}
|
|
24
35
|
`;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
justify-content: center;
|
|
29
|
-
align-items: center;
|
|
30
|
-
width: 100%;
|
|
31
|
-
margin: 8px 0;
|
|
36
|
+
const StyledListItem = styled.li`
|
|
37
|
+
list-style: none;
|
|
32
38
|
`;
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
const StyledListItemFullRow = styled.li`
|
|
40
|
+
list-style: none;
|
|
41
|
+
grid-column: 1/4;
|
|
42
|
+
`;
|
|
43
|
+
const StyledTitle = styled("h3", { name: "DS-AppPicker", slot: "title" })`
|
|
44
|
+
color: ${({ theme }) => theme.colors.neutral[700]};
|
|
45
|
+
font-size: ${({ theme }) => theme.fontSizes.value[400]};
|
|
46
|
+
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
47
|
+
margin: 12px 0 8px 0;
|
|
48
|
+
line-height: 1.385;
|
|
49
|
+
text-transform: uppercase;
|
|
36
50
|
`;
|
|
37
51
|
const StyledChipLabel = styled("p", { name: "DS-AppPicker", slot: "chipLabel" })`
|
|
38
52
|
font-size: ${({ theme }) => theme.fontSizes.label[200]};
|
|
@@ -47,24 +61,6 @@ const StyledChipLabel = styled("p", { name: "DS-AppPicker", slot: "chipLabel" })
|
|
|
47
61
|
padding-top: 6px;
|
|
48
62
|
}
|
|
49
63
|
`;
|
|
50
|
-
const styledChipSelectedCss = css`
|
|
51
|
-
color: ${({ theme }) => theme.colors.brand[800]};
|
|
52
|
-
background-color: ${({ theme }) => theme.colors.brand[200]};
|
|
53
|
-
|
|
54
|
-
.app-picker__icon {
|
|
55
|
-
fill: ${({ theme }) => theme.colors.brand[800]};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&:before {
|
|
59
|
-
border: 1px solid ${({ theme }) => theme.colors.brand[600]};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:focus {
|
|
63
|
-
&:before {
|
|
64
|
-
border: 2px solid ${({ theme }) => theme.colors.brand[800]};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
64
|
const StyledChip = styled("button", { name: "DS-AppPicker", slot: "chip" })`
|
|
69
65
|
position: relative;
|
|
70
66
|
display: flex;
|
|
@@ -141,19 +137,19 @@ const StyledChip = styled("button", { name: "DS-AppPicker", slot: "chip" })`
|
|
|
141
137
|
}
|
|
142
138
|
}
|
|
143
139
|
|
|
144
|
-
${({ selected }) => !selected ? "" :
|
|
140
|
+
${({ selected }) => !selected ? "" : styledChipSelectedSetter}
|
|
145
141
|
`;
|
|
146
142
|
const StyledSeparator = styled("hr", { name: "DS-AppPicker", slot: "separator" })`
|
|
147
143
|
border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
|
|
148
144
|
border-bottom: none;
|
|
149
145
|
width: 99%;
|
|
150
|
-
margin: 0;
|
|
146
|
+
margin: 8px 0 0 0;
|
|
151
147
|
`;
|
|
152
148
|
export {
|
|
153
149
|
StyledChip,
|
|
154
150
|
StyledChipLabel,
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
StyledListItem,
|
|
152
|
+
StyledListItemFullRow,
|
|
157
153
|
StyledSeparator,
|
|
158
154
|
StyledTitle,
|
|
159
155
|
StyledWrapper
|
package/dist/esm/styles.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
|
|
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';\
|
|
5
|
-
"mappings": "AAAA;ACEA;
|
|
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';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst styledChipSelectedSetter = 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 StyledWrapper = styled(Grid, { 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 8px 16px' : '0 16px 8px 16px')};\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledListItem = styled.li`\n list-style: none;\n`;\n\nexport const StyledListItemFullRow = styled.li`\n list-style: none;\n grid-column: 1/4;\n`;\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 8px 0;\n line-height: 1.385;\n text-transform: uppercase;\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\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 ? '' : styledChipSelectedSetter)}\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: 8px 0 0 0;\n`;\n"],
|
|
5
|
+
"mappings": "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