@elliemae/ds-pills 3.22.0-next.8 → 3.22.0-rc.1
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/deprecated/DropdownPill.js.map +1 -1
- package/dist/cjs/deprecated/InputPill.js.map +1 -1
- package/dist/cjs/deprecated/LabeledDropdownPills.js +4 -0
- package/dist/cjs/deprecated/LabeledDropdownPills.js.map +3 -3
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
- package/dist/cjs/deprecated/LabeledDropdownPillsTypes/utils.js.map +1 -1
- package/dist/cjs/deprecated/LabeledPills.js +13 -2
- package/dist/cjs/deprecated/LabeledPills.js.map +3 -3
- package/dist/cjs/deprecated/OverflowPill.js +5 -3
- package/dist/cjs/deprecated/OverflowPill.js.map +3 -3
- package/dist/cjs/deprecated/Pill.js.map +1 -1
- package/dist/cjs/deprecated/PillGroup.js.map +1 -1
- package/dist/cjs/deprecated/ReadOnlyPill.js.map +1 -1
- package/dist/cjs/deprecated/RemovablePill.js +5 -3
- package/dist/cjs/deprecated/RemovablePill.js.map +3 -3
- package/dist/cjs/deprecated/index.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/deprecated/DropdownPill.js.map +1 -1
- package/dist/esm/deprecated/InputPill.js.map +1 -1
- package/dist/esm/deprecated/LabeledDropdownPills.js +4 -0
- package/dist/esm/deprecated/LabeledDropdownPills.js.map +3 -3
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
- package/dist/esm/deprecated/LabeledDropdownPillsTypes/utils.js.map +1 -1
- package/dist/esm/deprecated/LabeledPills.js +13 -2
- package/dist/esm/deprecated/LabeledPills.js.map +3 -3
- package/dist/esm/deprecated/OverflowPill.js +5 -3
- package/dist/esm/deprecated/OverflowPill.js.map +3 -3
- package/dist/esm/deprecated/Pill.js.map +1 -1
- package/dist/esm/deprecated/PillGroup.js.map +1 -1
- package/dist/esm/deprecated/ReadOnlyPill.js.map +1 -1
- package/dist/esm/deprecated/RemovablePill.js +5 -3
- package/dist/esm/deprecated/RemovablePill.js.map +3 -3
- package/dist/esm/deprecated/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/types/deprecated/LabeledDropdownPills.d.ts +5 -1
- package/dist/types/deprecated/LabeledPills.d.ts +5 -1
- package/dist/types/deprecated/OverflowPill.d.ts +5 -1
- package/dist/types/deprecated/RemovablePill.d.ts +5 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +25 -24
- package/dist/cjs/DSPillDefinitions.js +0 -40
- package/dist/cjs/DSPillDefinitions.js.map +0 -7
- package/dist/cjs/components/Pill.js +0 -60
- package/dist/cjs/components/Pill.js.map +0 -7
- package/dist/cjs/components/PillButton.js +0 -67
- package/dist/cjs/components/PillButton.js.map +0 -7
- package/dist/cjs/components/PillGroup.js +0 -96
- package/dist/cjs/components/PillGroup.js.map +0 -7
- package/dist/cjs/components/index.js +0 -32
- package/dist/cjs/components/index.js.map +0 -7
- package/dist/cjs/components/styled.js +0 -242
- package/dist/cjs/components/styled.js.map +0 -7
- package/dist/cjs/components/types/DropdownPill.js +0 -101
- package/dist/cjs/components/types/DropdownPill.js.map +0 -7
- package/dist/cjs/components/types/InputPill.js +0 -113
- package/dist/cjs/components/types/InputPill.js.map +0 -7
- package/dist/cjs/components/types/LabelPill.js +0 -59
- package/dist/cjs/components/types/LabelPill.js.map +0 -7
- package/dist/cjs/components/types/ReadOnlyPill.js +0 -65
- package/dist/cjs/components/types/ReadOnlyPill.js.map +0 -7
- package/dist/cjs/components/types/RemovablePill.js +0 -108
- package/dist/cjs/components/types/RemovablePill.js.map +0 -7
- package/dist/cjs/components/types/ValuePill.js +0 -63
- package/dist/cjs/components/types/ValuePill.js.map +0 -7
- package/dist/cjs/components/types/index.js +0 -35
- package/dist/cjs/components/types/index.js.map +0 -7
- package/dist/cjs/index.d.js +0 -28
- package/dist/cjs/index.d.js.map +0 -7
- package/dist/cjs/props.js +0 -102
- package/dist/cjs/props.js.map +0 -7
- package/dist/cjs/utils.js +0 -47
- package/dist/cjs/utils.js.map +0 -7
- package/dist/esm/DSPillDefinitions.js +0 -10
- package/dist/esm/DSPillDefinitions.js.map +0 -7
- package/dist/esm/components/Pill.js +0 -30
- package/dist/esm/components/Pill.js.map +0 -7
- package/dist/esm/components/PillButton.js +0 -42
- package/dist/esm/components/PillButton.js.map +0 -7
- package/dist/esm/components/PillGroup.js +0 -71
- package/dist/esm/components/PillGroup.js.map +0 -7
- package/dist/esm/components/index.js +0 -5
- package/dist/esm/components/index.js.map +0 -7
- package/dist/esm/components/styled.js +0 -212
- package/dist/esm/components/styled.js.map +0 -7
- package/dist/esm/components/types/DropdownPill.js +0 -71
- package/dist/esm/components/types/DropdownPill.js.map +0 -7
- package/dist/esm/components/types/InputPill.js +0 -83
- package/dist/esm/components/types/InputPill.js.map +0 -7
- package/dist/esm/components/types/LabelPill.js +0 -29
- package/dist/esm/components/types/LabelPill.js.map +0 -7
- package/dist/esm/components/types/ReadOnlyPill.js +0 -35
- package/dist/esm/components/types/ReadOnlyPill.js.map +0 -7
- package/dist/esm/components/types/RemovablePill.js +0 -78
- package/dist/esm/components/types/RemovablePill.js.map +0 -7
- package/dist/esm/components/types/ValuePill.js +0 -33
- package/dist/esm/components/types/ValuePill.js.map +0 -7
- package/dist/esm/components/types/index.js +0 -8
- package/dist/esm/components/types/index.js.map +0 -7
- package/dist/esm/index.d.js +0 -2
- package/dist/esm/index.d.js.map +0 -7
- package/dist/esm/props.js +0 -72
- package/dist/esm/props.js.map +0 -7
- package/dist/esm/utils.js +0 -17
- package/dist/esm/utils.js.map +0 -7
- package/dist/types/DSPillDefinitions.d.ts +0 -3
- package/dist/types/components/Pill.d.ts +0 -5
- package/dist/types/components/PillButton.d.ts +0 -5
- package/dist/types/components/PillGroup.d.ts +0 -9
- package/dist/types/components/index.d.ts +0 -3
- package/dist/types/components/styled.d.ts +0 -31
- package/dist/types/components/types/DropdownPill.d.ts +0 -3
- package/dist/types/components/types/InputPill.d.ts +0 -3
- package/dist/types/components/types/LabelPill.d.ts +0 -3
- package/dist/types/components/types/ReadOnlyPill.d.ts +0 -3
- package/dist/types/components/types/RemovablePill.d.ts +0 -3
- package/dist/types/components/types/ValuePill.d.ts +0 -3
- package/dist/types/components/types/index.d.ts +0 -6
- package/dist/types/props.d.ts +0 -59
- package/dist/types/tests/DSPill.test.d.ts +0 -1
- package/dist/types/tests/DSPillGroup.test.d.ts +0 -1
- package/dist/types/tests/events/DSPill.events.keyboard.test.d.ts +0 -1
- package/dist/types/tests/events/DSPill.events.test.d.ts +0 -1
- package/dist/types/tests/events/DSPillGroup.events.keyboard.test.d.ts +0 -1
- package/dist/types/tests/events/DSPillGroup.events.test.d.ts +0 -1
- package/dist/types/utils.d.ts +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useCallback, useState, useEffect, useLayoutEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { isFunction, isString, useShouldRecalculate, usePrevious } from '@elliemae/ds-utilities';\nimport { DropdownPill } from '../DropdownPill.js';\nimport { InputPill } from '../InputPill.js';\nimport { Pill } from '../Pill.js';\nimport { RemovablePill } from '../RemovablePill.js';\nimport { hasOptionChanged } from './utils.js';\n\nconst LabeledDropdownSinglePill = ({\n label,\n labelIsValue = false,\n options,\n value,\n onSelect = () => null,\n onChange,\n maxWidth,\n minWidth,\n fixed = false,\n ...menuProps\n}) => {\n const [optionValue, setOptionValue] = useState(value);\n const prevOptions = usePrevious(options);\n const areOptionsEqual = useShouldRecalculate(hasOptionChanged(prevOptions, options));\n\n useEffect(() => setOptionValue(value), [value]);\n\n useEffect(() => {\n const selectedValue = options.find((option) => option.selected);\n\n if (selectedValue) {\n setOptionValue(selectedValue);\n } else if (!selectedValue) {\n setOptionValue(options[0]);\n }\n }, [areOptionsEqual]);\n\n useLayoutEffect(() => {\n if (optionValue) {\n const selectedValue = options.find((option) => option.id === optionValue.id);\n setOptionValue(selectedValue);\n }\n }, [options]);\n\n const selectOption = useCallback(\n (option) => {\n if (isFunction(onChange)) {\n onChange(option);\n }\n setOptionValue(option);\n onSelect(option);\n },\n [onChange, onSelect],\n );\n\n const onChangeInputValue = useCallback(\n ({ target: { value: inputValue } }) => {\n const { onChangeInput } = optionValue;\n\n onChangeInput && onChangeInput(inputValue);\n },\n [optionValue],\n );\n\n const removeOption = (removedOption) => {\n const { onRemove } = menuProps;\n const { onChangeInput } = optionValue;\n setOptionValue(null);\n onChangeInput && onChangeInput('');\n const newOption = { ...removedOption, input: '' };\n onRemove && onRemove(newOption, removedOption);\n };\n\n const renderPill = (option, fixed) => {\n const { input, onChangeInput, ...otherProps } = option;\n let SelectedPill;\n if (isString(input)) {\n SelectedPill = InputPill;\n } else if (fixed) {\n SelectedPill = Pill;\n } else {\n SelectedPill = RemovablePill;\n }\n\n return (\n <SelectedPill\n key={option.id}\n label={option.label}\n onChange={onChangeInputValue}\n onRemove={(e) => removeOption(option, e)}\n value={input}\n {...otherProps}\n />\n );\n };\n\n const renderSelection = () => {\n if (!labelIsValue) {\n if (optionValue) return renderPill(optionValue, fixed);\n return <Pill label=\"-\" />;\n }\n };\n\n return (\n <>\n <DropdownPill\n {...menuProps}\n label={!labelIsValue ? label : optionValue?.label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n onSelectMenuItem={selectOption}\n options={[\n {\n ...menuProps,\n type: 'SelectionGroup',\n id: 'multi-selection-views',\n multi: false,\n items: options,\n closeOnClick: true,\n },\n ]}\n selection={{\n 'multi-selection-views': optionValue ? [optionValue?.id] : '',\n }}\n variant=\"title\"\n />\n {renderSelection()}\n </>\n );\n};\n\nLabeledDropdownSinglePill.propTypes = {\n label: PropTypes.string,\n labelIsValue: PropTypes.bool,\n options: PropTypes.array,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onSelect: PropTypes.func,\n onChange: PropTypes.func,\n maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fixed: PropTypes.bool,\n};\n\nexport { LabeledDropdownSinglePill };\nexport default LabeledDropdownSinglePill;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACyFjB,SAmBF,UAnBE,KAmBF,YAnBE;AArFN,SAAgB,aAAa,UAAU,WAAW,uBAAuB;AACzE,OAAO,eAAe;AACtB,SAAS,YAAY,UAAU,sBAAsB,mBAAmB;AACxE,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AAEjC,MAAM,4BAA4B,CAAC;AAAA,EACjC;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA,WAAW,MAAM;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,cAAc,YAAY,OAAO;AACvC,QAAM,kBAAkB,qBAAqB,iBAAiB,aAAa,OAAO,CAAC;AAEnF,YAAU,MAAM,eAAe,KAAK,GAAG,CAAC,KAAK,CAAC;AAE9C,YAAU,MAAM;AACd,UAAM,gBAAgB,QAAQ,KAAK,CAAC,WAAW,OAAO,QAAQ;AAE9D,QAAI,eAAe;AACjB,qBAAe,aAAa;AAAA,IAC9B,WAAW,CAAC,eAAe;AACzB,qBAAe,QAAQ,CAAC,CAAC;AAAA,IAC3B;AAAA,EACF,GAAG,CAAC,eAAe,CAAC;AAEpB,kBAAgB,MAAM;AACpB,QAAI,aAAa;AACf,YAAM,gBAAgB,QAAQ,KAAK,CAAC,WAAW,OAAO,OAAO,YAAY,EAAE;AAC3E,qBAAe,aAAa;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,QAAM,eAAe;AAAA,IACnB,CAAC,WAAW;AACV,UAAI,WAAW,QAAQ,GAAG;AACxB,iBAAS,MAAM;AAAA,MACjB;AACA,qBAAe,MAAM;AACrB,eAAS,MAAM;AAAA,IACjB;AAAA,IACA,CAAC,UAAU,QAAQ;AAAA,EACrB;AAEA,QAAM,qBAAqB;AAAA,IACzB,CAAC,EAAE,QAAQ,EAAE,OAAO,WAAW,EAAE,MAAM;AACrC,YAAM,EAAE,cAAc,IAAI;AAE1B,uBAAiB,cAAc,UAAU;AAAA,IAC3C;AAAA,IACA,CAAC,WAAW;AAAA,EACd;AAEA,QAAM,eAAe,CAAC,kBAAkB;AACtC,UAAM,EAAE,SAAS,IAAI;AACrB,UAAM,EAAE,cAAc,IAAI;AAC1B,mBAAe,IAAI;AACnB,qBAAiB,cAAc,EAAE;AACjC,UAAM,YAAY,EAAE,GAAG,eAAe,OAAO,GAAG;AAChD,gBAAY,SAAS,WAAW,aAAa;AAAA,EAC/C;AAEA,QAAM,aAAa,CAAC,QAAQA,WAAU;AACpC,UAAM,EAAE,OAAO,eAAe,GAAG,WAAW,IAAI;AAChD,QAAI;AACJ,QAAI,SAAS,KAAK,GAAG;AACnB,qBAAe;AAAA,IACjB,WAAWA,QAAO;AAChB,qBAAe;AAAA,IACjB,OAAO;AACL,qBAAe;AAAA,IACjB;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO,OAAO;AAAA,QACd,UAAU;AAAA,QACV,UAAU,CAAC,MAAM,aAAa,QAAQ,CAAC;AAAA,QACvC,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,MALC,OAAO;AAAA,IAMd;AAAA,EAEJ;AAEA,QAAM,kBAAkB,MAAM;AAC5B,QAAI,CAAC,cAAc;AACjB,UAAI;AAAa,eAAO,WAAW,aAAa,KAAK;AACrD,aAAO,oBAAC,QAAK,OAAM,KAAI;AAAA,IACzB;AAAA,EACF;AAEA,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,OAAO,CAAC,eAAe,QAAQ,aAAa;AAAA,QAC5C;AAAA,QACA;AAAA,QACA,kBAAkB;AAAA,QAClB,SAAS;AAAA,UACP;AAAA,YACE,GAAG;AAAA,YACH,MAAM;AAAA,YACN,IAAI;AAAA,YACJ,OAAO;AAAA,YACP,OAAO;AAAA,YACP,cAAc;AAAA,UAChB;AAAA,QACF;AAAA,QACA,WAAW;AAAA,UACT,yBAAyB,cAAc,CAAC,aAAa,EAAE,IAAI;AAAA,QAC7D;AAAA,QACA,SAAQ;AAAA;AAAA,IACV;AAAA,IACC,gBAAgB;AAAA,KACnB;AAEJ;AAEA,0BAA0B,YAAY;AAAA,EACpC,OAAO,UAAU;AAAA,EACjB,cAAc,UAAU;AAAA,EACxB,SAAS,UAAU;AAAA,EACnB,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EAC/D,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EAClE,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EAClE,OAAO,UAAU;AACnB;AAGA,IAAO,oCAAQ;",
|
|
6
6
|
"names": ["fixed"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/deprecated/LabeledDropdownPillsTypes/utils.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { isEqual } from '@elliemae/ds-utilities';\nimport { omit } from 'lodash';\n\nexport const hasOptionChanged = (prevOptions, options) => {\n if (prevOptions && options) {\n const prevOptionsOmited = prevOptions.map((option) => omit(option, ['input', 'onChangeInput', 'mask']));\n const optionsOmited = options.map((option) => omit(option, ['input', 'onChangeInput', 'mask']));\n\n return isEqual(prevOptionsOmited, optionsOmited);\n }\n\n return false;\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,eAAe;AACxB,SAAS,YAAY;AAEd,MAAM,mBAAmB,CAAC,aAAa,YAAY;AACxD,MAAI,eAAe,SAAS;AAC1B,UAAM,oBAAoB,YAAY,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC,SAAS,iBAAiB,MAAM,CAAC,CAAC;AACtG,UAAM,gBAAgB,QAAQ,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC,SAAS,iBAAiB,MAAM,CAAC,CAAC;AAE9F,WAAO,QAAQ,mBAAmB,aAAa;AAAA,EACjD;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
@@ -4,12 +4,21 @@ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
|
4
4
|
import { PillGroup } from "./PillGroup.js";
|
|
5
5
|
import { RemovablePill } from "./RemovablePill.js";
|
|
6
6
|
import { Pill } from "./Pill.js";
|
|
7
|
-
const LabeledPills = ({
|
|
7
|
+
const LabeledPills = ({
|
|
8
|
+
children,
|
|
9
|
+
label = "",
|
|
10
|
+
leftAddon,
|
|
11
|
+
onFocusGroupSet,
|
|
12
|
+
onFocusNextGroup,
|
|
13
|
+
onFocusPreviousGroup,
|
|
14
|
+
className
|
|
15
|
+
}) => /* @__PURE__ */ jsxs(
|
|
8
16
|
PillGroup,
|
|
9
17
|
{
|
|
10
18
|
onFocusGroupSet,
|
|
11
19
|
onFocusNextGroup,
|
|
12
20
|
onFocusPreviousGroup,
|
|
21
|
+
containerProps: { className },
|
|
13
22
|
children: [
|
|
14
23
|
/* @__PURE__ */ jsx(Pill, { label, leftAddon, variant: "title", "data-testid": "pill-title" }),
|
|
15
24
|
children
|
|
@@ -32,7 +41,9 @@ const props = {
|
|
|
32
41
|
/** focus prev group callback */
|
|
33
42
|
onFocusPreviousGroup: PropTypes.func.description("focus prev group callback"),
|
|
34
43
|
/** focus group set callback */
|
|
35
|
-
onFocusGroupSet: PropTypes.func.description("focus group set callback")
|
|
44
|
+
onFocusGroupSet: PropTypes.func.description("focus group set callback"),
|
|
45
|
+
/** additional className */
|
|
46
|
+
className: PropTypes.string.description("Additional className")
|
|
36
47
|
};
|
|
37
48
|
LabeledPills.propTypes = props;
|
|
38
49
|
LabeledPills.displayName = "LabeledPills";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { PillGroup } from './PillGroup.js';\nimport { RemovablePill } from './RemovablePill.js';\nimport { Pill } from './Pill.js';\n\nconst LabeledPills = ({
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/LabeledPills.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { PillGroup } from './PillGroup.js';\nimport { RemovablePill } from './RemovablePill.js';\nimport { Pill } from './Pill.js';\n\nconst LabeledPills = ({\n children,\n label = '',\n leftAddon,\n onFocusGroupSet,\n onFocusNextGroup,\n onFocusPreviousGroup,\n className,\n}) => (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n containerProps={{ className }}\n >\n <Pill label={label} leftAddon={leftAddon} variant=\"title\" data-testid=\"pill-title\" />\n {children}\n </PillGroup>\n);\n\nconst props = {\n /** labeled pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** pill to add the label to */\n children: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf([PropTypes.instanceOf(Pill), PropTypes.instanceOf(RemovablePill)]),\n }),\n ).isRequired.description('pill to add the label to'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** focus next group callback */\n onFocusNextGroup: PropTypes.func.description('focus next group callback'),\n /** focus prev group callback */\n onFocusPreviousGroup: PropTypes.func.description('focus prev group callback'),\n /** focus group set callback */\n onFocusGroupSet: PropTypes.func.description('focus group set callback'),\n /** additional className */\n className: PropTypes.string.description('Additional className'),\n};\n\nLabeledPills.propTypes = props;\nLabeledPills.displayName = 'LabeledPills';\nconst DSLabeledPillsWithSchema = describe(LabeledPills);\nDSLabeledPillsWithSchema.propTypes = props;\n\nexport { LabeledPills, DSLabeledPillsWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmBrB,SAME,KANF;AAdF,SAAS,WAAW,gBAAgB;AACpC,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AAErB,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,EAAE,UAAU;AAAA,IAE5B;AAAA,0BAAC,QAAK,OAAc,WAAsB,SAAQ,SAAQ,eAAY,cAAa;AAAA,MAClF;AAAA;AAAA;AACH;AAGF,MAAM,QAAQ;AAAA;AAAA,EAEZ,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,UAAU,UAAU;AAAA,IAClB,UAAU,MAAM;AAAA,MACd,MAAM,UAAU,MAAM,CAAC,UAAU,WAAW,IAAI,GAAG,UAAU,WAAW,aAAa,CAAC,CAAC;AAAA,IACzF,CAAC;AAAA,EACH,EAAE,WAAW,YAAY,0BAA0B;AAAA;AAAA,EAEnD,WAAW,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,kBAAkB,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAExE,sBAAsB,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAE5E,iBAAiB,UAAU,KAAK,YAAY,0BAA0B;AAAA;AAAA,EAEtE,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAChE;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY;AACtD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
|
5
5
|
import { useFocusGroupItem } from "@elliemae/ds-shared";
|
|
6
6
|
import { DSTooltip } from "@elliemae/ds-tooltip";
|
|
7
7
|
import { Pill } from "./Pill.js";
|
|
8
|
-
const OverflowPill = ({ containerProps = {}, label = "", options = [] }) => {
|
|
8
|
+
const OverflowPill = ({ containerProps = {}, label = "", options = [], className = "" }) => {
|
|
9
9
|
const ref = useRef(null);
|
|
10
10
|
const [tooltipIsOpen, setTooltipIsOpen] = useState(false);
|
|
11
11
|
const [tooltipText, setTooltipText] = useState("");
|
|
@@ -30,7 +30,7 @@ const OverflowPill = ({ containerProps = {}, label = "", options = [] }) => {
|
|
|
30
30
|
triggerComponent: /* @__PURE__ */ jsx(
|
|
31
31
|
Pill,
|
|
32
32
|
{
|
|
33
|
-
className: "overflow-pill"
|
|
33
|
+
className: `${"overflow-pill"} ${className}`,
|
|
34
34
|
containerProps,
|
|
35
35
|
innerRef: ref,
|
|
36
36
|
label,
|
|
@@ -48,7 +48,9 @@ const props = {
|
|
|
48
48
|
/** pill text label */
|
|
49
49
|
label: PropTypes.string.isRequired.description("pill text label"),
|
|
50
50
|
/** overflow pills options */
|
|
51
|
-
options: PropTypes.array.description("overflow pills options")
|
|
51
|
+
options: PropTypes.array.description("overflow pills options"),
|
|
52
|
+
/** additional className */
|
|
53
|
+
className: PropTypes.string.description("Additional className")
|
|
52
54
|
};
|
|
53
55
|
OverflowPill.propTypes = props;
|
|
54
56
|
OverflowPill.displayName = "OverflowPill";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef, useState, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { useFocusGroupItem } from '@elliemae/ds-shared';\nimport { DSTooltip } from '@elliemae/ds-tooltip';\nimport { Pill } from './Pill.js';\n\nconst OverflowPill = ({ containerProps = {}, label = '', options = [] }) => {\n const ref = useRef(null);\n const [tooltipIsOpen, setTooltipIsOpen] = useState(false);\n const [tooltipText, setTooltipText] = useState('');\n\n useEffect(() => {\n let text = '';\n options.forEach((option) => {\n if (!tooltipText || option === options[0]) {\n text = `${option.label}`;\n } else {\n text = text.concat(`, ${option.label}`);\n }\n });\n setTooltipText(text);\n }, [options]);\n\n useFocusGroupItem(ref);\n\n return (\n <DSTooltip\n isOpen={tooltipIsOpen}\n title={tooltipText}\n zIndex={11}\n triggerComponent={\n <Pill\n className
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACmCf;AA/BR,SAAgB,QAAQ,UAAU,iBAAiB;AACnD,SAAS,WAAW,gBAAgB;AACpC,SAAS,yBAAyB;AAClC,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAErB,MAAM,eAAe,CAAC,EAAE,iBAAiB,CAAC,GAAG,QAAQ,IAAI,UAAU,CAAC,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/OverflowPill.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef, useState, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { useFocusGroupItem } from '@elliemae/ds-shared';\nimport { DSTooltip } from '@elliemae/ds-tooltip';\nimport { Pill } from './Pill.js';\n\nconst OverflowPill = ({ containerProps = {}, label = '', options = [], className = '' }) => {\n const ref = useRef(null);\n const [tooltipIsOpen, setTooltipIsOpen] = useState(false);\n const [tooltipText, setTooltipText] = useState('');\n\n useEffect(() => {\n let text = '';\n options.forEach((option) => {\n if (!tooltipText || option === options[0]) {\n text = `${option.label}`;\n } else {\n text = text.concat(`, ${option.label}`);\n }\n });\n setTooltipText(text);\n }, [options]);\n\n useFocusGroupItem(ref);\n\n return (\n <DSTooltip\n isOpen={tooltipIsOpen}\n title={tooltipText}\n zIndex={11}\n triggerComponent={\n <Pill\n className={`${'overflow-pill'} ${className}`}\n containerProps={containerProps}\n innerRef={ref}\n label={label}\n tabIndex={-1}\n onMouseEnter={() => setTooltipIsOpen(true)}\n onMouseLeave={() => setTooltipIsOpen(false)}\n />\n }\n />\n );\n};\n\nconst props = {\n /** props to inject to pill wrapper */\n containerProps: PropTypes.object.description('props to inject to pill wrapper'),\n /** pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** overflow pills options */\n options: PropTypes.array.description('overflow pills options'),\n /** additional className */\n className: PropTypes.string.description('Additional className'),\n};\n\nOverflowPill.propTypes = props;\nOverflowPill.displayName = 'OverflowPill';\nconst DSOverflowPillWithSchema = describe(OverflowPill);\nDSOverflowPillWithSchema.propTypes = props;\n\nexport { OverflowPill, DSOverflowPillWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmCf;AA/BR,SAAgB,QAAQ,UAAU,iBAAiB;AACnD,SAAS,WAAW,gBAAgB;AACpC,SAAS,yBAAyB;AAClC,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAErB,MAAM,eAAe,CAAC,EAAE,iBAAiB,CAAC,GAAG,QAAQ,IAAI,UAAU,CAAC,GAAG,YAAY,GAAG,MAAM;AAC1F,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AACxD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,EAAE;AAEjD,YAAU,MAAM;AACd,QAAI,OAAO;AACX,YAAQ,QAAQ,CAAC,WAAW;AAC1B,UAAI,CAAC,eAAe,WAAW,QAAQ,CAAC,GAAG;AACzC,eAAO,GAAG,OAAO;AAAA,MACnB,OAAO;AACL,eAAO,KAAK,OAAO,KAAK,OAAO,OAAO;AAAA,MACxC;AAAA,IACF,CAAC;AACD,mBAAe,IAAI;AAAA,EACrB,GAAG,CAAC,OAAO,CAAC;AAEZ,oBAAkB,GAAG;AAErB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,GAAG,mBAAmB;AAAA,UACjC;AAAA,UACA,UAAU;AAAA,UACV;AAAA,UACA,UAAU;AAAA,UACV,cAAc,MAAM,iBAAiB,IAAI;AAAA,UACzC,cAAc,MAAM,iBAAiB,KAAK;AAAA;AAAA,MAC5C;AAAA;AAAA,EAEJ;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,iCAAiC;AAAA;AAAA,EAE9E,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,SAAS,UAAU,MAAM,YAAY,wBAAwB;AAAA;AAAA,EAE7D,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAChE;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY;AACtD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/Pill.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst pillBlockName = 'pill';\n\nconst PillWrapper = aggregatedClasses('div')(pillBlockName, null, ({ size, variant }) => ({\n [variant]: !!variant,\n [size]: !!size,\n}));\nconst PillLabel = aggregatedClasses('span')(pillBlockName, 'label');\nconst PillAddon = aggregatedClasses('div')(pillBlockName, 'addon');\n\nconst Pill = ({\n containerProps = {},\n label = '',\n leftAddon,\n rightAddon,\n variant = 'value',\n size = 'm',\n ...otherProps\n}) => {\n useDeprecateComponent({ componentName: 'ds-pills', version: 'TBD Date: 2023 Q3' });\n\n return (\n <PillWrapper {...containerProps} classProps={{ variant, size }} {...otherProps}>\n {leftAddon && <PillAddon>{leftAddon}</PillAddon>}\n <PillLabel>{label}</PillLabel>\n {rightAddon && <PillAddon>{rightAddon}</PillAddon>}\n </PillWrapper>\n );\n};\n\nconst props = {\n /** props to inject to pill wrapper */\n containerProps: PropTypes.object.description('props to inject to pill wrapper'),\n /** pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** pill size */\n size: PropTypes.oneOf(['m', 'l']).description('pill size'),\n /** pill variant */\n variant: PropTypes.oneOf(['value', 'title']).description('pill variant'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** addon component to right */\n rightAddon: PropTypes.node.description('addon component to right'),\n};\n\nPill.propTypes = props;\nPill.displayName = 'Pill';\nconst DSPillWithSchema = describe(Pill);\nDSPillWithSchema.propTypes = props;\n\nexport { Pill, DSPillWithSchema };\nexport default Pill;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC8BnB,SACgB,KADhB;AAzBJ,SAAS,6BAA6B;AACtC,SAAS,WAAW,gBAAgB;AACpC,SAAS,yBAAyB;AAElC,MAAM,gBAAgB;AAEtB,MAAM,cAAc,kBAAkB,KAAK,EAAE,eAAe,MAAM,CAAC,EAAE,MAAM,QAAQ,OAAO;AAAA,EACxF,CAAC,OAAO,GAAG,CAAC,CAAC;AAAA,EACb,CAAC,IAAI,GAAG,CAAC,CAAC;AACZ,EAAE;AACF,MAAM,YAAY,kBAAkB,MAAM,EAAE,eAAe,OAAO;AAClE,MAAM,YAAY,kBAAkB,KAAK,EAAE,eAAe,OAAO;AAEjE,MAAM,OAAO,CAAC;AAAA,EACZ,iBAAiB,CAAC;AAAA,EAClB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACL,MAAM;AACJ,wBAAsB,EAAE,eAAe,YAAY,SAAS,oBAAoB,CAAC;AAEjF,SACE,qBAAC,eAAa,GAAG,gBAAgB,YAAY,EAAE,SAAS,KAAK,GAAI,GAAG,YACjE;AAAA,iBAAa,oBAAC,aAAW,qBAAU;AAAA,IACpC,oBAAC,aAAW,iBAAM;AAAA,IACjB,cAAc,oBAAC,aAAW,sBAAW;AAAA,KACxC;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,iCAAiC;AAAA;AAAA,EAE9E,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,MAAM,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,WAAW;AAAA;AAAA,EAEzD,SAAS,UAAU,MAAM,CAAC,SAAS,OAAO,CAAC,EAAE,YAAY,cAAc;AAAA;AAAA,EAEvE,WAAW,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,YAAY,UAAU,KAAK,YAAY,0BAA0B;AACnE;AAEA,KAAK,YAAY;AACjB,KAAK,cAAc;AACnB,MAAM,mBAAmB,SAAS,IAAI;AACtC,iBAAiB,YAAY;AAG7B,IAAO,eAAQ;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/PillGroup.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { FocusGroupProvider } from '@elliemae/ds-shared';\n\nconst pillGroupBlockName = 'pill-group';\n\nexport const Container = aggregatedClasses('div')(pillGroupBlockName);\n\nconst PillGroup = ({ containerProps = {}, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, children }) => (\n <FocusGroupProvider\n keyBindings={{\n Tab: 'next',\n }}\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n orientation=\"horizontal\"\n >\n <Container {...containerProps}>{children}</Container>\n </FocusGroupProvider>\n);\n\nconst props = {\n /** props injected to component wrapper */\n containerProps: PropTypes.object.description('props injected to component wrapper'),\n /** focus next group callback */\n onFocusNextGroup: PropTypes.func.description('focus next group callback'),\n /** focus prev group callback */\n onFocusPreviousGroup: PropTypes.func.description('focus prev group callback'),\n /** focus group set callback */\n onFocusGroupSet: PropTypes.func.description('focus group set callback'),\n /** pill components */\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired.description(\n 'pill components',\n ),\n};\n\nPillGroup.propTypes = props;\nPillGroup.displayName = 'PillGroup';\nconst DSPillGroupWithSchema = describe(PillGroup);\nDSPillGroupWithSchema.propTypes = props;\n\nexport { PillGroup, DSPillGroupWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACuBnB;AAlBJ,SAAS,UAAU,iBAAiB;AACpC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AAEnC,MAAM,qBAAqB;AAEpB,MAAM,YAAY,kBAAkB,KAAK,EAAE,kBAAkB;AAEpE,MAAM,YAAY,CAAC,EAAE,iBAAiB,CAAC,GAAG,kBAAkB,sBAAsB,iBAAiB,SAAS,MAC1G;AAAA,EAAC;AAAA;AAAA,IACC,aAAa;AAAA,MACX,KAAK;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAY;AAAA,IAEZ,8BAAC,aAAW,GAAG,gBAAiB,UAAS;AAAA;AAC3C;AAGF,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,kBAAkB,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAExE,sBAAsB,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAE5E,iBAAiB,UAAU,KAAK,YAAY,0BAA0B;AAAA;AAAA,EAEtE,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,GAAG,UAAU,IAAI,CAAC,EAAE,WAAW;AAAA,IAC5F;AAAA,EACF;AACF;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,wBAAwB,SAAS,SAAS;AAChD,sBAAsB,YAAY;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/ReadOnlyPill.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { InfoCircleSmall } from '@elliemae/ds-icons';\nimport { DSModal, MODAL_TYPE_V2 } from '@elliemae/ds-modal';\nimport { DSPopover } from '@elliemae/ds-popover';\nimport { Pill } from './Pill.js';\n\nconst ReadOnlyPill = ({\n containerProps = {},\n modalContent = '',\n label = '',\n leftAddon,\n modalTitle = '',\n tooltipText = '',\n}) => {\n const ref = useRef(null);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n\n const toggle = () => {\n setIsModalOpen(!isModalOpen);\n };\n\n return (\n <>\n <Pill\n data-testid=\"read-only-pill\"\n className=\"removable-pill\"\n containerProps={containerProps}\n innerRef={ref}\n label={label}\n leftAddon={leftAddon}\n rightAddon={\n <DSPopover\n isOpen={tooltipText && isTooltipOpen}\n content={tooltipText}\n placement=\"top\"\n showArrow\n renderTrigger={({ ref }) => (\n <InfoCircleSmall\n role=\"button\"\n data-testid=\"read-only-info-btn\"\n className=\"remove-pill-button\"\n onClick={toggle}\n onMouseEnter={() => setIsTooltipOpen(true)}\n onMouseLeave={() => setIsTooltipOpen(false)}\n color={['brand-primary', '600']}\n innerRef={ref}\n />\n )}\n />\n }\n tabIndex={-1}\n />\n <DSModal\n isOpen={isModalOpen}\n showClose\n shouldCloseOnOverlayClick\n modalTitle={modalTitle}\n modalType={MODAL_TYPE_V2.INFORMATION}\n onClose={toggle}\n version={2}\n >\n {modalContent}\n </DSModal>\n </>\n );\n};\n\nconst props = {\n /** props injected to component wrapper */\n containerProps: PropTypes.object.description('props injected to component wrapper'),\n /** labeled pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** read only pill modal content */\n modalContent: PropTypes.string.description('read only pill modal content'),\n /** read only pill modal title */\n modalTitle: PropTypes.string.description('read only pill modal title'),\n tooltipText: PropTypes.string.description('text to display in tooltip'),\n};\n\nReadOnlyPill.propTypes = props;\nReadOnlyPill.displayName = 'ReadOnlyPill';\nconst DSReadOnlyPillWithSchema = describe(ReadOnlyPill);\nDSReadOnlyPillWithSchema.propTypes = props;\n\nexport { ReadOnlyPill, DSReadOnlyPillWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC4BnB,mBAeU,KAfV;AAxBJ,SAAgB,QAAQ,gBAAgB;AACxC,SAAS,WAAW,gBAAgB;AACpC,SAAS,uBAAuB;AAChC,SAAS,SAAS,qBAAqB;AACvC,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAErB,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,eAAe;AAAA,EACf,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb,cAAc;AAChB,MAAM;AACJ,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AAExD,QAAM,SAAS,MAAM;AACnB,mBAAe,CAAC,WAAW;AAAA,EAC7B;AAEA,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QACZ,WAAU;AAAA,QACV;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,YACE;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ,eAAe;AAAA,YACvB,SAAS;AAAA,YACT,WAAU;AAAA,YACV,WAAS;AAAA,YACT,eAAe,CAAC,EAAE,KAAAA,KAAI,MACpB;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAc,MAAM,iBAAiB,IAAI;AAAA,gBACzC,cAAc,MAAM,iBAAiB,KAAK;AAAA,gBAC1C,OAAO,CAAC,iBAAiB,KAAK;AAAA,gBAC9B,UAAUA;AAAA;AAAA,YACZ;AAAA;AAAA,QAEJ;AAAA,QAEF,UAAU;AAAA;AAAA,IACZ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,WAAS;AAAA,QACT,2BAAyB;AAAA,QACzB;AAAA,QACA,WAAW,cAAc;AAAA,QACzB,SAAS;AAAA,QACT,SAAS;AAAA,QAER;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,WAAW,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,cAAc,UAAU,OAAO,YAAY,8BAA8B;AAAA;AAAA,EAEzE,YAAY,UAAU,OAAO,YAAY,4BAA4B;AAAA,EACrE,aAAa,UAAU,OAAO,YAAY,4BAA4B;AACxE;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAA2B,SAAS,YAAY;AACtD,yBAAyB,YAAY;",
|
|
6
6
|
"names": ["ref"]
|
|
@@ -6,13 +6,13 @@ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
|
6
6
|
import { CloseXsmall } from "@elliemae/ds-icons";
|
|
7
7
|
import { useFocusGroupItem } from "@elliemae/ds-shared";
|
|
8
8
|
import { Pill } from "./Pill.js";
|
|
9
|
-
const RemovablePill = ({ containerProps = {}, label = "", onRemove, size = "m", leftAddon }) => {
|
|
9
|
+
const RemovablePill = ({ containerProps = {}, label = "", onRemove, size = "m", leftAddon, className = "" }) => {
|
|
10
10
|
const ref = useRef(null);
|
|
11
11
|
const { focusPrevious } = useFocusGroupItem(ref);
|
|
12
12
|
return /* @__PURE__ */ jsx(
|
|
13
13
|
Pill,
|
|
14
14
|
{
|
|
15
|
-
className: "removable-pill"
|
|
15
|
+
className: `${"removable-pill"} ${className}`,
|
|
16
16
|
"data-testid": "removable-pill",
|
|
17
17
|
containerProps,
|
|
18
18
|
innerRef: ref,
|
|
@@ -41,7 +41,9 @@ const props = {
|
|
|
41
41
|
/** pill size */
|
|
42
42
|
size: PropTypes.oneOf(["m", "l"]).description("pill size"),
|
|
43
43
|
/** addon component to left */
|
|
44
|
-
leftAddon: PropTypes.node.description("addon component to left")
|
|
44
|
+
leftAddon: PropTypes.node.description("addon component to left"),
|
|
45
|
+
/** additional className */
|
|
46
|
+
className: PropTypes.string.description("Additional className")
|
|
45
47
|
};
|
|
46
48
|
RemovablePill.propTypes = props;
|
|
47
49
|
RemovablePill.displayName = "RemovablePill";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef } from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport { useFocusGroupItem } from '@elliemae/ds-shared';\nimport { Pill } from './Pill.js';\n\nconst RemovablePill = ({ containerProps = {}, label = '', onRemove, size = 'm', leftAddon }) => {\n const ref = useRef(null);\n const { focusPrevious } = useFocusGroupItem(ref);\n return (\n <Pill\n className
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC8Bf;AA1BR,SAAgB,cAAc;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,WAAW,gBAAgB;AACpC,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,YAAY;AAErB,MAAM,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,GAAG,QAAQ,IAAI,UAAU,OAAO,KAAK,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/RemovablePill.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useRef } from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport { useFocusGroupItem } from '@elliemae/ds-shared';\nimport { Pill } from './Pill.js';\n\nconst RemovablePill = ({ containerProps = {}, label = '', onRemove, size = 'm', leftAddon, className = '' }) => {\n const ref = useRef(null);\n const { focusPrevious } = useFocusGroupItem(ref);\n return (\n <Pill\n className={`${'removable-pill'} ${className}`}\n data-testid=\"removable-pill\"\n containerProps={containerProps}\n innerRef={ref}\n size={size}\n label={label}\n leftAddon={leftAddon}\n onKeyDown={(e) => {\n if (e.key === 'Backspace' && isFunction(onRemove)) {\n onRemove();\n if (isFunction(focusPrevious)) focusPrevious();\n }\n }}\n rightAddon={\n <CloseXsmall role=\"button\" data-testid=\"remove-pill-button\" className=\"remove-pill-button\" onClick={onRemove} />\n }\n tabIndex={-1}\n />\n );\n};\n\nconst props = {\n /** props injected to component wrapper */\n containerProps: PropTypes.object.description('props injected to component wrapper'),\n /** labeled pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** remove click callback */\n onRemove: PropTypes.func.description('remove click callback'),\n /** pill size */\n size: PropTypes.oneOf(['m', 'l']).description('pill size'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** additional className */\n className: PropTypes.string.description('Additional className'),\n};\n\nRemovablePill.propTypes = props;\nRemovablePill.displayName = 'RemovablePill';\nconst DSRemovablePillWithSchema = describe(RemovablePill);\nDSRemovablePillWithSchema.propTypes = props;\n\nexport { RemovablePill, DSRemovablePillWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8Bf;AA1BR,SAAgB,cAAc;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,WAAW,gBAAgB;AACpC,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,YAAY;AAErB,MAAM,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,GAAG,QAAQ,IAAI,UAAU,OAAO,KAAK,WAAW,YAAY,GAAG,MAAM;AAC9G,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,EAAE,cAAc,IAAI,kBAAkB,GAAG;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,oBAAoB;AAAA,MAClC,eAAY;AAAA,MACZ;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,CAAC,MAAM;AAChB,YAAI,EAAE,QAAQ,eAAe,WAAW,QAAQ,GAAG;AACjD,mBAAS;AACT,cAAI,WAAW,aAAa;AAAG,0BAAc;AAAA,QAC/C;AAAA,MACF;AAAA,MACA,YACE,oBAAC,eAAY,MAAK,UAAS,eAAY,sBAAqB,WAAU,sBAAqB,SAAS,UAAU;AAAA,MAEhH,UAAU;AAAA;AAAA,EACZ;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,qCAAqC;AAAA;AAAA,EAElF,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA;AAAA,EAEhE,UAAU,UAAU,KAAK,YAAY,uBAAuB;AAAA;AAAA,EAE5D,MAAM,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,WAAW;AAAA;AAAA,EAEzD,WAAW,UAAU,KAAK,YAAY,yBAAyB;AAAA;AAAA,EAE/D,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAChE;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,4BAA4B,SAAS,aAAa;AACxD,0BAA0B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/deprecated/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './Pill.js';\nexport * from './PillGroup.js';\nexport * from './LabeledDropdownPills.js';\nexport * from './LabeledPills.js';\nexport * from './DropdownPill.js';\nexport * from './RemovablePill.js';\nexport * from './ReadOnlyPill.js';\nexport * from './OverflowPill.js';\n\nexport { default } from './Pill.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,WAAAA,gBAAe;",
|
|
6
6
|
"names": ["default"]
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './deprecated/index.js';\nexport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './deprecated/index.js';\nexport { default } from './deprecated/index.js';\nexport * from '@elliemae/ds-pills-v2';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;AACxB,cAAc;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const LabeledDropdownPills: {
|
|
2
|
-
({ label, value, type, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, maxWidth, minWidth, fixed, ...menuProps }: {
|
|
2
|
+
({ label, value, type, onFocusNextGroup, onFocusPreviousGroup, onFocusGroupSet, maxWidth, minWidth, fixed, className, ...menuProps }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
label?: string | undefined;
|
|
5
5
|
value: any;
|
|
@@ -10,6 +10,7 @@ declare const LabeledDropdownPills: {
|
|
|
10
10
|
maxWidth: any;
|
|
11
11
|
minWidth: any;
|
|
12
12
|
fixed: any;
|
|
13
|
+
className: any;
|
|
13
14
|
}): import("react/jsx-runtime.js").JSX.Element;
|
|
14
15
|
propTypes: {
|
|
15
16
|
/** pill type */
|
|
@@ -28,6 +29,8 @@ declare const LabeledDropdownPills: {
|
|
|
28
29
|
fixed: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
29
30
|
/** pill label text */
|
|
30
31
|
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
|
+
/** additional className */
|
|
33
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
34
|
/** pill value */
|
|
32
35
|
value: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
33
36
|
};
|
|
@@ -44,5 +47,6 @@ declare const DSLabeledDropdownPillsWithSchema: import("@elliemae/ds-props-helpe
|
|
|
44
47
|
maxWidth: any;
|
|
45
48
|
minWidth: any;
|
|
46
49
|
fixed: any;
|
|
50
|
+
className: any;
|
|
47
51
|
}>;
|
|
48
52
|
export { LabeledDropdownPills, DSLabeledDropdownPillsWithSchema };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
declare const LabeledPills: {
|
|
2
|
-
({ children, label, leftAddon, onFocusGroupSet, onFocusNextGroup, onFocusPreviousGroup }: {
|
|
2
|
+
({ children, label, leftAddon, onFocusGroupSet, onFocusNextGroup, onFocusPreviousGroup, className, }: {
|
|
3
3
|
children: any;
|
|
4
4
|
label?: string | undefined;
|
|
5
5
|
leftAddon: any;
|
|
6
6
|
onFocusGroupSet: any;
|
|
7
7
|
onFocusNextGroup: any;
|
|
8
8
|
onFocusPreviousGroup: any;
|
|
9
|
+
className: any;
|
|
9
10
|
}): import("react/jsx-runtime.js").JSX.Element;
|
|
10
11
|
propTypes: {
|
|
11
12
|
/** labeled pill text label */
|
|
@@ -20,6 +21,8 @@ declare const LabeledPills: {
|
|
|
20
21
|
onFocusPreviousGroup: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
21
22
|
/** focus group set callback */
|
|
22
23
|
onFocusGroupSet: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
24
|
+
/** additional className */
|
|
25
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
23
26
|
};
|
|
24
27
|
displayName: string;
|
|
25
28
|
};
|
|
@@ -30,5 +33,6 @@ declare const DSLabeledPillsWithSchema: import("@elliemae/ds-props-helpers/dist/
|
|
|
30
33
|
onFocusGroupSet: any;
|
|
31
34
|
onFocusNextGroup: any;
|
|
32
35
|
onFocusPreviousGroup: any;
|
|
36
|
+
className: any;
|
|
33
37
|
}>;
|
|
34
38
|
export { LabeledPills, DSLabeledPillsWithSchema };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const OverflowPill: {
|
|
2
|
-
({ containerProps, label, options }: {
|
|
2
|
+
({ containerProps, label, options, className }: {
|
|
3
3
|
containerProps?: {} | undefined;
|
|
4
4
|
label?: string | undefined;
|
|
5
5
|
options?: never[] | undefined;
|
|
6
|
+
className?: string | undefined;
|
|
6
7
|
}): import("react/jsx-runtime.js").JSX.Element;
|
|
7
8
|
propTypes: {
|
|
8
9
|
/** props to inject to pill wrapper */
|
|
@@ -11,6 +12,8 @@ declare const OverflowPill: {
|
|
|
11
12
|
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
12
13
|
/** overflow pills options */
|
|
13
14
|
options: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
15
|
+
/** additional className */
|
|
16
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
14
17
|
};
|
|
15
18
|
displayName: string;
|
|
16
19
|
};
|
|
@@ -18,5 +21,6 @@ declare const DSOverflowPillWithSchema: import("@elliemae/ds-props-helpers/dist/
|
|
|
18
21
|
containerProps?: {} | undefined;
|
|
19
22
|
label?: string | undefined;
|
|
20
23
|
options?: never[] | undefined;
|
|
24
|
+
className?: string | undefined;
|
|
21
25
|
}>;
|
|
22
26
|
export { OverflowPill, DSOverflowPillWithSchema };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
declare const RemovablePill: {
|
|
2
|
-
({ containerProps, label, onRemove, size, leftAddon }: {
|
|
2
|
+
({ containerProps, label, onRemove, size, leftAddon, className }: {
|
|
3
3
|
containerProps?: {} | undefined;
|
|
4
4
|
label?: string | undefined;
|
|
5
5
|
onRemove: any;
|
|
6
6
|
size?: string | undefined;
|
|
7
7
|
leftAddon: any;
|
|
8
|
+
className?: string | undefined;
|
|
8
9
|
}): import("react/jsx-runtime.js").JSX.Element;
|
|
9
10
|
propTypes: {
|
|
10
11
|
/** props injected to component wrapper */
|
|
@@ -17,6 +18,8 @@ declare const RemovablePill: {
|
|
|
17
18
|
size: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
18
19
|
/** addon component to left */
|
|
19
20
|
leftAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
21
|
+
/** additional className */
|
|
22
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
20
23
|
};
|
|
21
24
|
displayName: string;
|
|
22
25
|
};
|
|
@@ -26,5 +29,6 @@ declare const DSRemovablePillWithSchema: import("@elliemae/ds-props-helpers/dist
|
|
|
26
29
|
onRemove: any;
|
|
27
30
|
size?: string | undefined;
|
|
28
31
|
leftAddon: any;
|
|
32
|
+
className?: string | undefined;
|
|
29
33
|
}>;
|
|
30
34
|
export { RemovablePill, DSRemovablePillWithSchema };
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pills",
|
|
3
|
-
"version": "3.22.0-
|
|
3
|
+
"version": "3.22.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Pills",
|
|
6
6
|
"files": [
|
|
@@ -149,28 +149,29 @@
|
|
|
149
149
|
"dependencies": {
|
|
150
150
|
"prop-types": "~15.8.1",
|
|
151
151
|
"uid": "~2.0.1",
|
|
152
|
-
"@elliemae/ds-button": "3.22.0-
|
|
153
|
-
"@elliemae/ds-
|
|
154
|
-
"@elliemae/ds-
|
|
155
|
-
"@elliemae/ds-
|
|
156
|
-
"@elliemae/ds-
|
|
157
|
-
"@elliemae/ds-
|
|
158
|
-
"@elliemae/ds-
|
|
159
|
-
"@elliemae/ds-
|
|
160
|
-
"@elliemae/ds-shared": "3.22.0-
|
|
161
|
-
"@elliemae/ds-
|
|
162
|
-
"@elliemae/ds-
|
|
163
|
-
"@elliemae/ds-tooltip": "3.22.0-
|
|
164
|
-
"@elliemae/ds-
|
|
165
|
-
"@elliemae/ds-
|
|
166
|
-
"@elliemae/ds-
|
|
152
|
+
"@elliemae/ds-button": "3.22.0-rc.1",
|
|
153
|
+
"@elliemae/ds-form": "3.22.0-rc.1",
|
|
154
|
+
"@elliemae/ds-grid": "3.22.0-rc.1",
|
|
155
|
+
"@elliemae/ds-classnames": "3.22.0-rc.1",
|
|
156
|
+
"@elliemae/ds-icons": "3.22.0-rc.1",
|
|
157
|
+
"@elliemae/ds-dropdownmenu": "3.22.0-rc.1",
|
|
158
|
+
"@elliemae/ds-modal": "3.22.0-rc.1",
|
|
159
|
+
"@elliemae/ds-props-helpers": "3.22.0-rc.1",
|
|
160
|
+
"@elliemae/ds-shared": "3.22.0-rc.1",
|
|
161
|
+
"@elliemae/ds-system": "3.22.0-rc.1",
|
|
162
|
+
"@elliemae/ds-button-v2": "3.22.0-rc.1",
|
|
163
|
+
"@elliemae/ds-truncated-tooltip-text": "3.22.0-rc.1",
|
|
164
|
+
"@elliemae/ds-utilities": "3.22.0-rc.1",
|
|
165
|
+
"@elliemae/ds-pills-v2": "3.22.0-rc.1",
|
|
166
|
+
"@elliemae/ds-popover": "3.22.0-rc.1",
|
|
167
|
+
"@elliemae/ds-tooltip": "3.22.0-rc.1"
|
|
167
168
|
},
|
|
168
169
|
"devDependencies": {
|
|
169
|
-
"@elliemae/pui-cli": "~9.0.0-next.
|
|
170
|
+
"@elliemae/pui-cli": "~9.0.0-next.22",
|
|
170
171
|
"@testing-library/react": "~12.1.3",
|
|
171
172
|
"@testing-library/user-event": "~13.5.0",
|
|
172
173
|
"styled-components": "~5.3.9",
|
|
173
|
-
"@elliemae/ds-monorepo-devops": "3.22.0-
|
|
174
|
+
"@elliemae/ds-monorepo-devops": "3.22.0-rc.1"
|
|
174
175
|
},
|
|
175
176
|
"peerDependencies": {
|
|
176
177
|
"lodash": "^4.17.21",
|
|
@@ -183,14 +184,14 @@
|
|
|
183
184
|
"typeSafety": false
|
|
184
185
|
},
|
|
185
186
|
"scripts": {
|
|
186
|
-
"dev": "cross-env NODE_ENV=development node
|
|
187
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
187
188
|
"test": "pui-cli test --passWithNoTests",
|
|
188
|
-
"lint": "node
|
|
189
|
-
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='
|
|
190
|
-
"dts": "node
|
|
191
|
-
"build": "cross-env NODE_ENV=production node
|
|
189
|
+
"lint": "node ../../../scripts/lint.mjs",
|
|
190
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
|
|
191
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
192
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
192
193
|
"dev:build": "pnpm --filter {.}... build",
|
|
193
194
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
194
|
-
"checkDeps": "npm exec
|
|
195
|
+
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
195
196
|
}
|
|
196
197
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DSPillDefinitions_exports = {};
|
|
30
|
-
__export(DSPillDefinitions_exports, {
|
|
31
|
-
DSPillButtonName: () => DSPillButtonName,
|
|
32
|
-
DSPillGroupName: () => DSPillGroupName,
|
|
33
|
-
DSPillName: () => DSPillName
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(DSPillDefinitions_exports);
|
|
36
|
-
var React = __toESM(require("react"));
|
|
37
|
-
const DSPillName = "DSPill";
|
|
38
|
-
const DSPillButtonName = "DSPillButton";
|
|
39
|
-
const DSPillGroupName = "DSPillGroup";
|
|
40
|
-
//# sourceMappingURL=DSPillDefinitions.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSPillDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const DSPillName = 'DSPill';\n\nexport const DSPillButtonName = 'DSPillButton';\n\nexport const DSPillGroupName = 'DSPillGroup';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAEnB,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var Pill_exports = {};
|
|
30
|
-
__export(Pill_exports, {
|
|
31
|
-
DSPillV2: () => DSPillV2,
|
|
32
|
-
DSPillV2WithSchema: () => DSPillV2WithSchema
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(Pill_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
-
var import_props = require("../props.js");
|
|
39
|
-
var import_types = require("./types/index.js");
|
|
40
|
-
var import_DSPillDefinitions = require("../DSPillDefinitions.js");
|
|
41
|
-
const pillComponentGetter = {
|
|
42
|
-
dropdown: import_types.DropdownPill,
|
|
43
|
-
input: import_types.InputPill,
|
|
44
|
-
label: import_types.LabelPill,
|
|
45
|
-
readonly: import_types.ReadOnlyPill,
|
|
46
|
-
removable: import_types.RemovablePill,
|
|
47
|
-
value: import_types.ValuePill
|
|
48
|
-
};
|
|
49
|
-
const DSPillV2 = (props) => {
|
|
50
|
-
const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_props.DSPillV2DefaultProps);
|
|
51
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefaults, import_props.DSPillV2PropTypes, import_DSPillDefinitions.DSPillName);
|
|
52
|
-
const { type } = propsWithDefaults;
|
|
53
|
-
const PillComponent = pillComponentGetter[type];
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PillComponent, { ...propsWithDefaults });
|
|
55
|
-
};
|
|
56
|
-
DSPillV2.propTypes = import_props.DSPillV2PropTypes;
|
|
57
|
-
DSPillV2.displayName = import_DSPillDefinitions.DSPillName;
|
|
58
|
-
const DSPillV2WithSchema = (0, import_ds_props_helpers.describe)(DSPillV2).description("Pill");
|
|
59
|
-
DSPillV2WithSchema.propTypes = import_props.DSPillV2PropTypes;
|
|
60
|
-
//# sourceMappingURL=Pill.js.map
|