@elliemae/ds-pills 1.61.10 → 1.61.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Pill.js.map +1 -1
- package/cjs/components/PillButton.js.map +1 -1
- package/cjs/components/PillGroup.js.map +1 -1
- package/cjs/components/styled.js.map +1 -1
- package/cjs/components/types/DropdownPill.js.map +1 -1
- package/cjs/components/types/InputPill.js.map +1 -1
- package/cjs/components/types/LabelPill.js.map +1 -1
- package/cjs/components/types/ReadOnlyPill.js.map +1 -1
- package/cjs/components/types/RemovablePill.js.map +1 -1
- package/cjs/components/types/ValuePill.js.map +1 -1
- package/cjs/deprecated/DropdownPill.js.map +1 -1
- package/cjs/deprecated/InputPill.js.map +1 -1
- package/cjs/deprecated/LabeledDropdownPills.js.map +1 -1
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
- package/cjs/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
- package/cjs/deprecated/LabeledDropdownPillsTypes/utils.js.map +1 -1
- package/cjs/deprecated/LabeledPills.js.map +1 -1
- package/cjs/deprecated/OverflowPill.js.map +1 -1
- package/cjs/deprecated/Pill.js.map +1 -1
- package/cjs/deprecated/PillGroup.js.map +1 -1
- package/cjs/deprecated/ReadOnlyPill.js.map +1 -1
- package/cjs/deprecated/RemovablePill.js.map +1 -1
- package/cjs/props.js.map +1 -1
- package/cjs/utils.js.map +1 -1
- package/esm/components/Pill.js.map +1 -1
- package/esm/components/PillButton.js.map +1 -1
- package/esm/components/PillGroup.js.map +1 -1
- package/esm/components/styled.js.map +1 -1
- package/esm/components/types/DropdownPill.js.map +1 -1
- package/esm/components/types/InputPill.js.map +1 -1
- package/esm/components/types/LabelPill.js.map +1 -1
- package/esm/components/types/ReadOnlyPill.js.map +1 -1
- package/esm/components/types/RemovablePill.js.map +1 -1
- package/esm/components/types/ValuePill.js.map +1 -1
- package/esm/deprecated/DropdownPill.js.map +1 -1
- package/esm/deprecated/InputPill.js.map +1 -1
- package/esm/deprecated/LabeledDropdownPills.js.map +1 -1
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.js.map +1 -1
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.js.map +1 -1
- package/esm/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.js.map +1 -1
- package/esm/deprecated/LabeledDropdownPillsTypes/utils.js.map +1 -1
- package/esm/deprecated/LabeledPills.js.map +1 -1
- package/esm/deprecated/OverflowPill.js.map +1 -1
- package/esm/deprecated/Pill.js.map +1 -1
- package/esm/deprecated/PillGroup.js.map +1 -1
- package/esm/deprecated/ReadOnlyPill.js.map +1 -1
- package/esm/deprecated/RemovablePill.js.map +1 -1
- package/esm/props.js.map +1 -1
- package/esm/utils.js.map +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledDropdownMultiPill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.tsx"],"sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\nimport { find } from 'lodash';\nimport { isFunction, addOrRemove } from '@elliemae/ds-utilities';\nimport { RemovablePill } from '../RemovablePill';\nimport { Pill } from '../Pill';\nimport { OverflowPill } from '../OverflowPill';\nimport { DropdownPill } from '../DropdownPill';\n\nexport default function LabeledDropdownMultiPills({\n label,\n options = [],\n value = [],\n onSelect = () => null,\n onRemove = () => null,\n onChange, // if this is defined, then it's calculating the next result onSelect or onRemove\n maxWidth,\n minWidth,\n ...menuProps\n}) {\n const [totalDefaultOptions, setTotalDefaultOptions] = useState(0);\n const [selectedOptions, setSelectedOptions] = useState(value);\n const [allOptions, setAllOptions] = useState(options);\n const [overflowOptions, setOverflowOptions] = useState([]);\n\n const overflowQuantity = 3;\n\n useEffect(() => setSelectedOptions(value), [value]);\n\n useEffect(() => {\n const newOptions = allOptions.filter((option) => option.fixedItem);\n if (newOptions.length > 0) {\n setSelectedOptions(newOptions);\n }\n setTotalDefaultOptions(newOptions.length);\n }, []);\n\n useEffect(() => {\n if (totalDefaultOptions) {\n const newOptions = allOptions.map((opt) => {\n if (selectedOptions.length <= totalDefaultOptions && find(selectedOptions, { id: opt.id })) {\n return { ...opt, fixedItem: true };\n }\n return { ...opt, fixedItem: false };\n });\n\n setAllOptions(newOptions);\n }\n }, [onSelect, onRemove, selectedOptions]);\n\n useEffect(() => {\n if (selectedOptions.length > overflowQuantity) {\n const overflow = selectedOptions.filter((val, index) => index >= overflowQuantity);\n setOverflowOptions(overflow);\n }\n }, [selectedOptions]);\n\n const selectOption = useCallback(\n (option) => {\n if (!option.fixedItem) {\n if (isFunction(onChange)) {\n const nextValue = addOrRemove(selectedOptions, option, (item) => item.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onSelect(option);\n }\n },\n [selectedOptions],\n );\n\n const removeOption = useCallback(\n (option) => {\n if (!option.fixedItem || selectedOptions.length > totalDefaultOptions) {\n if (isFunction(onChange)) {\n const nextValue = selectedOptions.filter((val) => option.id !== val.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onRemove(option);\n }\n },\n [selectedOptions],\n );\n\n const typeOfPill = () => {\n if (selectedOptions.length > totalDefaultOptions) {\n return RemovablePill;\n }\n\n return Pill;\n };\n\n return (\n <>\n <DropdownPill\n {...menuProps}\n focusOnOpen={false}\n label={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: true,\n items: allOptions,\n },\n ]}\n selection={{\n 'multi-selection-views': selectedOptions ? selectedOptions.map((o) => o.id) : '',\n }}\n variant=\"title\"\n />\n {selectedOptions &&\n selectedOptions.map((option, index) => {\n const TypeOfPill = typeOfPill();\n if (index < overflowQuantity) {\n return <TypeOfPill key={option.id} label={option.label} onRemove={() => removeOption(option)} />;\n }\n return null;\n })}\n {selectedOptions && selectedOptions.length > overflowQuantity && (\n <OverflowPill label={`+ ${selectedOptions.length - overflowQuantity}`} options={overflowOptions} />\n )}\n </>\n );\n}\n"],"names":["LabeledDropdownMultiPills","label","options","value","onSelect","onRemove","onChange","maxWidth","minWidth","menuProps","useState","totalDefaultOptions","setTotalDefaultOptions","selectedOptions","setSelectedOptions","allOptions","setAllOptions","overflowOptions","setOverflowOptions","overflowQuantity","useEffect","newOptions","filter","option","fixedItem","length","map","opt","find","id","overflow","val","index","selectOption","useCallback","isFunction","nextValue","addOrRemove","item","removeOption","typeOfPill","RemovablePill","Pill","type","multi","items","o","TypeOfPill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQe,SAASA,yBAAT,OAUZ;
|
|
1
|
+
{"version":3,"file":"LabeledDropdownMultiPill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.tsx"],"sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\nimport { find } from 'lodash';\nimport { isFunction, addOrRemove } from '@elliemae/ds-utilities';\nimport { RemovablePill } from '../RemovablePill';\nimport { Pill } from '../Pill';\nimport { OverflowPill } from '../OverflowPill';\nimport { DropdownPill } from '../DropdownPill';\n\nexport default function LabeledDropdownMultiPills({\n label,\n options = [],\n value = [],\n onSelect = () => null,\n onRemove = () => null,\n onChange, // if this is defined, then it's calculating the next result onSelect or onRemove\n maxWidth,\n minWidth,\n ...menuProps\n}) {\n const [totalDefaultOptions, setTotalDefaultOptions] = useState(0);\n const [selectedOptions, setSelectedOptions] = useState(value);\n const [allOptions, setAllOptions] = useState(options);\n const [overflowOptions, setOverflowOptions] = useState([]);\n\n const overflowQuantity = 3;\n\n useEffect(() => setSelectedOptions(value), [value]);\n\n useEffect(() => {\n const newOptions = allOptions.filter((option) => option.fixedItem);\n if (newOptions.length > 0) {\n setSelectedOptions(newOptions);\n }\n setTotalDefaultOptions(newOptions.length);\n }, []);\n\n useEffect(() => {\n if (totalDefaultOptions) {\n const newOptions = allOptions.map((opt) => {\n if (selectedOptions.length <= totalDefaultOptions && find(selectedOptions, { id: opt.id })) {\n return { ...opt, fixedItem: true };\n }\n return { ...opt, fixedItem: false };\n });\n\n setAllOptions(newOptions);\n }\n }, [onSelect, onRemove, selectedOptions]);\n\n useEffect(() => {\n if (selectedOptions.length > overflowQuantity) {\n const overflow = selectedOptions.filter((val, index) => index >= overflowQuantity);\n setOverflowOptions(overflow);\n }\n }, [selectedOptions]);\n\n const selectOption = useCallback(\n (option) => {\n if (!option.fixedItem) {\n if (isFunction(onChange)) {\n const nextValue = addOrRemove(selectedOptions, option, (item) => item.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onSelect(option);\n }\n },\n [selectedOptions],\n );\n\n const removeOption = useCallback(\n (option) => {\n if (!option.fixedItem || selectedOptions.length > totalDefaultOptions) {\n if (isFunction(onChange)) {\n const nextValue = selectedOptions.filter((val) => option.id !== val.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onRemove(option);\n }\n },\n [selectedOptions],\n );\n\n const typeOfPill = () => {\n if (selectedOptions.length > totalDefaultOptions) {\n return RemovablePill;\n }\n\n return Pill;\n };\n\n return (\n <>\n <DropdownPill\n {...menuProps}\n focusOnOpen={false}\n label={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: true,\n items: allOptions,\n },\n ]}\n selection={{\n 'multi-selection-views': selectedOptions ? selectedOptions.map((o) => o.id) : '',\n }}\n variant=\"title\"\n />\n {selectedOptions &&\n selectedOptions.map((option, index) => {\n const TypeOfPill = typeOfPill();\n if (index < overflowQuantity) {\n return <TypeOfPill key={option.id} label={option.label} onRemove={() => removeOption(option)} />;\n }\n return null;\n })}\n {selectedOptions && selectedOptions.length > overflowQuantity && (\n <OverflowPill label={`+ ${selectedOptions.length - overflowQuantity}`} options={overflowOptions} />\n )}\n </>\n );\n}\n"],"names":["LabeledDropdownMultiPills","label","options","value","onSelect","onRemove","onChange","maxWidth","minWidth","menuProps","useState","totalDefaultOptions","setTotalDefaultOptions","selectedOptions","setSelectedOptions","allOptions","setAllOptions","overflowOptions","setOverflowOptions","overflowQuantity","useEffect","newOptions","filter","option","fixedItem","length","map","opt","find","id","overflow","val","index","selectOption","useCallback","isFunction","nextValue","addOrRemove","item","removeOption","typeOfPill","RemovablePill","Pill","type","multi","items","o","TypeOfPill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQe,SAASA,yBAAT,OAUZ;EAAA,IATDC,KASC,QATDA,KASC;0BARDC,OAQC;MARDA,OAQC,6BARS,EAQT;wBAPDC,KAOC;MAPDA,KAOC,2BAPO,EAOP;2BANDC,QAMC;MANDA,QAMC,8BANU;IAAA,OAAM,IAAN;GAMV;2BALDC,QAKC;MALDA,QAKC,8BALU;IAAA,OAAM,IAAN;GAKV;MAJDC,QAIC,QAJDA,QAIC;MAHDC,QAGC,QAHDA,QAGC;MAFDC,QAEC,QAFDA,QAEC;MADEC,SACF;;EACD,gBAAsDC,QAAQ,CAAC,CAAD,CAA9D;;MAAOC,mBAAP;MAA4BC,sBAA5B;;EACA,iBAA8CF,QAAQ,CAACP,KAAD,CAAtD;;MAAOU,eAAP;MAAwBC,kBAAxB;;EACA,iBAAoCJ,QAAQ,CAACR,OAAD,CAA5C;;MAAOa,UAAP;MAAmBC,aAAnB;;EACA,iBAA8CN,QAAQ,CAAC,EAAD,CAAtD;;MAAOO,eAAP;MAAwBC,kBAAxB;;EAEA,IAAMC,gBAAgB,GAAG,CAAzB;EAEAC,SAAS,CAAC;IAAA,OAAMN,kBAAkB,CAACX,KAAD,CAAxB;GAAD,EAAkC,CAACA,KAAD,CAAlC,CAAT;EAEAiB,SAAS,CAAC,YAAM;IACd,IAAMC,UAAU,GAAGN,UAAU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CAACjB,EAAT;OAApB,CAAH,GAAsC;KAjBlF;IAmBE,OAAO,EAAC;KApBZ,EAsBGhB,eAAe,IACdA,eAAe,CAACa,GAAhB,CAAoB,UAACH,MAAD,EAASS,KAAT,EAAmB;IACrC,IAAMe,UAAU,GAAGP,UAAU,EAA7B;;IACA,IAAIR,KAAK,GAAGb,gBAAZ,EAA8B;MAC5B,oBAAO,oBAAC,UAAD;QAAY,GAAG,EAAEI,MAAM,CAACM,EAAxB;QAA4B,KAAK,EAAEN,MAAM,CAACtB,KAA1C;QAAiD,QAAQ,EAAE;UAAA,OAAMsC,YAAY,CAAChB,MAAD,CAAlB;;QAAlE;;;IAEF,OAAO,IAAP;GALF,CAvBJ,EA8BGV,eAAe,IAAIA,eAAe,CAACY,MAAhB,GAAyBN,gBAA5C,iBACC,oBAAC,YAAD;IAAc,KAAK,cAAON,eAAe,CAACY,MAAhB,GAAyBN,gBAAhC,CAAnB;IAAuE,OAAO,EAAEF;IA/BpF,CADF;AAoCD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledDropdownSinglePill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.tsx"],"sourcesContent":["/* eslint-disable mdx/no-unused-expressions */\n/* eslint-disable no-shadow */\n/* eslint-disable no-unused-expressions */\n/* eslint-disable max-lines */\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';\nimport { InputPill } from '../InputPill';\nimport { Pill } from '../Pill';\nimport { RemovablePill } from '../RemovablePill';\nimport { hasOptionChanged } from './utils';\n\nexport default function 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"],"names":["LabeledDropdownSinglePill","label","labelIsValue","options","value","onSelect","onChange","maxWidth","minWidth","fixed","menuProps","useState","optionValue","setOptionValue","prevOptions","usePrevious","areOptionsEqual","useShouldRecalculate","hasOptionChanged","useEffect","selectedValue","find","option","selected","useLayoutEffect","id","selectOption","useCallback","isFunction","onChangeInputValue","inputValue","target","onChangeInput","removeOption","removedOption","onRemove","newOption","input","renderPill","otherProps","SelectedPill","isString","InputPill","Pill","RemovablePill","e","renderSelection","type","multi","items","closeOnClick","propTypes","PropTypes","string","bool","array","oneOfType","number","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAae,SAASA,yBAAT,OAWZ;
|
|
1
|
+
{"version":3,"file":"LabeledDropdownSinglePill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.tsx"],"sourcesContent":["/* eslint-disable mdx/no-unused-expressions */\n/* eslint-disable no-shadow */\n/* eslint-disable no-unused-expressions */\n/* eslint-disable max-lines */\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';\nimport { InputPill } from '../InputPill';\nimport { Pill } from '../Pill';\nimport { RemovablePill } from '../RemovablePill';\nimport { hasOptionChanged } from './utils';\n\nexport default function 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"],"names":["LabeledDropdownSinglePill","label","labelIsValue","options","value","onSelect","onChange","maxWidth","minWidth","fixed","menuProps","useState","optionValue","setOptionValue","prevOptions","usePrevious","areOptionsEqual","useShouldRecalculate","hasOptionChanged","useEffect","selectedValue","find","option","selected","useLayoutEffect","id","selectOption","useCallback","isFunction","onChangeInputValue","inputValue","target","onChangeInput","removeOption","removedOption","onRemove","newOption","input","renderPill","otherProps","SelectedPill","isString","InputPill","Pill","RemovablePill","e","renderSelection","type","multi","items","closeOnClick","propTypes","PropTypes","string","bool","array","oneOfType","number","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAae,SAASA,yBAAT,OAWZ;EAAA,IAVDC,KAUC,QAVDA,KAUC;+BATDC,YASC;MATDA,YASC,kCATc,KASd;MARDC,OAQC,QARDA,OAQC;MAPDC,KAOC,QAPDA,KAOC;2BANDC,QAMC;MANDA,QAMC,8BANU;IAAA,OAAM,IAAN;GAMV;MALDC,QAKC,QALDA,QAKC;MAJDC,QAIC,QAJDA,QAIC;MAHDC,QAGC,QAHDA,QAGC;wBAFDC,KAEC;MAFDA,KAEC,2BAFO,KAEP;MADEC,SACF;;EACD,gBAAsCC,QAAQ,CAACP,KAAD,CAA9C;;MAAOQ,WAAP;M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CAACK,MAA7B,CAApB,CAR0B;EASpChD,KAAK,EAAE2C,SAAS,CAACE;AATmB,CAAtC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/utils.tsx"],"sourcesContent":["import { 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"],"names":["hasOptionChanged","prevOptions","options","prevOptionsOmited","map","option","omit","optionsOmited","isEqual"],"mappings":";;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,WAAD,EAAcC,OAAd,EAA0B;
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/utils.tsx"],"sourcesContent":["import { 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"],"names":["hasOptionChanged","prevOptions","options","prevOptionsOmited","map","option","omit","optionsOmited","isEqual"],"mappings":";;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,WAAD,EAAcC,OAAd,EAA0B;EACxD,IAAID,WAAW,IAAIC,OAAnB,EAA4B;IAC1B,IAAMC,iBAAiB,GAAGF,WAAW,CAACG,GAAZ,CAAgB,UAACC,MAAD;MAAA,OAAYC,IAAI,CAACD,MAAD,EAAS,CAAC,OAAD,EAAU,eAAV,EAA2B,MAA3B,CAAT,CAAhB;KAAhB,CAA1B;IACA,IAAME,aAAa,GAAGL,OAAO,CAACE,GAAR,CAAY,UAACC,MAAD;MAAA,OAAYC,IAAI,CAACD,MAAD,EAAS,CAAC,OAAD,EAAU,eAAV,EAA2B,MAA3B,CAAT,CAAhB;KAAZ,CAAtB;IAEA,OAAOG,OAAO,CAACL,iBAAD,EAAoBI,aAApB,CAAd;;;EAGF,OAAO,KAAP;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledPills.js","sources":["../../../src/deprecated/LabeledPills.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { PillGroup } from './PillGroup';\nimport { RemovablePill } from './RemovablePill';\nimport { Pill } from './Pill';\n\nfunction LabeledPills({\n children,\n label = '',\n leftAddon,\n onFocusGroupSet,\n onFocusNextGroup,\n onFocusPreviousGroup,\n}) {\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <Pill\n label={label}\n leftAddon={leftAddon}\n variant=\"title\"\n data-testid=\"pill-title\"\n />\n {children}\n </PillGroup>\n );\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([\n PropTypes.instanceOf(Pill),\n PropTypes.instanceOf(RemovablePill),\n ]),\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};\n\nLabeledPills.propTypes = props;\n\nconst DSLabeledPillsWithSchema = describe(LabeledPills);\nDSLabeledPillsWithSchema.propTypes = props;\n\nexport { LabeledPills, DSLabeledPillsWithSchema };\n"],"names":["LabeledPills","children","label","leftAddon","onFocusGroupSet","onFocusNextGroup","onFocusPreviousGroup","props","PropTypes","string","isRequired","description","arrayOf","shape","type","oneOf","instanceOf","Pill","RemovablePill","node","func","propTypes","DSLabeledPillsWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAMA,SAASA,YAAT,OAOG;
|
|
1
|
+
{"version":3,"file":"LabeledPills.js","sources":["../../../src/deprecated/LabeledPills.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { PillGroup } from './PillGroup';\nimport { RemovablePill } from './RemovablePill';\nimport { Pill } from './Pill';\n\nfunction LabeledPills({\n children,\n label = '',\n leftAddon,\n onFocusGroupSet,\n onFocusNextGroup,\n onFocusPreviousGroup,\n}) {\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <Pill\n label={label}\n leftAddon={leftAddon}\n variant=\"title\"\n data-testid=\"pill-title\"\n />\n {children}\n </PillGroup>\n );\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([\n PropTypes.instanceOf(Pill),\n PropTypes.instanceOf(RemovablePill),\n ]),\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};\n\nLabeledPills.propTypes = props;\n\nconst DSLabeledPillsWithSchema = describe(LabeledPills);\nDSLabeledPillsWithSchema.propTypes = props;\n\nexport { LabeledPills, DSLabeledPillsWithSchema };\n"],"names":["LabeledPills","children","label","leftAddon","onFocusGroupSet","onFocusNextGroup","onFocusPreviousGroup","props","PropTypes","string","isRequired","description","arrayOf","shape","type","oneOf","instanceOf","Pill","RemovablePill","node","func","propTypes","DSLabeledPillsWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAMA,SAASA,YAAT,OAOG;EAAA,IANDC,QAMC,QANDA,QAMC;wBALDC,KAKC;MALDA,KAKC,2BALO,EAKP;MAJDC,SAIC,QAJDA,SAIC;MAHDC,eAGC,QAHDA,eAGC;MAFDC,gBAEC,QAFDA,gBAEC;MADDC,oBACC,QADDA,oBACC;EACD,oBACE,oBAAC,SAAD;IACE,eAAe,EAAEF,eADnB;IAEE,gBAAgB,EAAEC,gBAFpB;IAGE,oBAAoB,EAAEC;kBAEtB,oBAAC,IAAD;IACE,KAAK,EAAEJ,KADT;IAEE,SAAS,EAAEC,SAFb;IAGE,OAAO,EAAC,OAHV;IAIE,eAAY;IAThB,EAWGF,QAXH,CADF;AAeD;;AAED,IAAMM,KAAK,GAAG;;EAEZL,KAAK,EAAEM,SAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,CAAwC,iBAAxC,CAFK;;;EAIZV,QAAQ,EAAEO,SAAS,CAACI,OAAV,CACRJ,SAAS,CAACK,KAAV,CAAgB;IACdC,IAAI,EAAEN,SAAS,CAACO,KAAV,CAAgB,CACpBP,SAAS,CAACQ,UAAV,CAAqBC,IAArB,CADoB,EAEpBT,SAAS,CAACQ,UAAV,CAAqBE,aAArB,CAFoB,CAAhB;GADR,CADQ,EAORR,UAPQ,CAOGC,WAPH,CAOe,0BAPf,CAJE;;;EAaZR,SAAS,EAAEK,SAAS,CAACW,IAAV,CAAeR,WAAf,CAA2B,yBAA3B,CAbC;;;EAeZN,gBAAgB,EAAEG,SAAS,CAACY,IAAV,CAAeT,WAAf,CAA2B,2BAA3B,CAfN;;;EAiBZL,oBAAoB,EAAEE,SAAS,CAACY,IAAV,CAAeT,WAAf,CAA2B,2BAA3B,CAjBV;;;EAmBZP,eAAe,EAAEI,SAAS,CAACY,IAAV,CAAeT,WAAf,CAA2B,0BAA3B;AAnBL,CAAd;AAsBAX,YAAY,CAACqB,SAAb,GAAyBd,KAAzB;IAEMe,wBAAwB,GAAGC,QAAQ,CAACvB,YAAD;AACzCsB,wBAAwB,CAACD,SAAzB,GAAqCd,KAArC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverflowPill.js","sources":["../../../src/deprecated/OverflowPill.tsx"],"sourcesContent":["import React, { useRef, useState, useEffect } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport DSTooltip from '@elliemae/ds-tooltip';\nimport { Pill } from './Pill';\n\nfunction 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=\"overflow-pill\"\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(\n 'props to inject to pill wrapper',\n ),\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};\n\nOverflowPill.propTypes = props;\nconst DSOverflowPillWithSchema = describe(OverflowPill);\nDSOverflowPillWithSchema.propTypes = props;\n\nexport { OverflowPill, DSOverflowPillWithSchema };\n"],"names":["OverflowPill","containerProps","label","options","ref","useRef","useState","tooltipIsOpen","setTooltipIsOpen","tooltipText","setTooltipText","useEffect","text","forEach","option","concat","useFocusGroupItem","props","PropTypes","object","description","string","isRequired","array","propTypes","DSOverflowPillWithSchema","describe"],"mappings":";;;;;;;;;;;AAMA,SAASA,YAAT,OAAyE;
|
|
1
|
+
{"version":3,"file":"OverflowPill.js","sources":["../../../src/deprecated/OverflowPill.tsx"],"sourcesContent":["import React, { useRef, useState, useEffect } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport DSTooltip from '@elliemae/ds-tooltip';\nimport { Pill } from './Pill';\n\nfunction 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=\"overflow-pill\"\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(\n 'props to inject to pill wrapper',\n ),\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};\n\nOverflowPill.propTypes = props;\nconst DSOverflowPillWithSchema = describe(OverflowPill);\nDSOverflowPillWithSchema.propTypes = props;\n\nexport { OverflowPill, DSOverflowPillWithSchema };\n"],"names":["OverflowPill","containerProps","label","options","ref","useRef","useState","tooltipIsOpen","setTooltipIsOpen","tooltipText","setTooltipText","useEffect","text","forEach","option","concat","useFocusGroupItem","props","PropTypes","object","description","string","isRequired","array","propTypes","DSOverflowPillWithSchema","describe"],"mappings":";;;;;;;;;;;AAMA,SAASA,YAAT,OAAyE;EAAA,+BAAjDC,cAAiD;MAAjDA,cAAiD,oCAAhC,EAAgC;wBAA5BC,KAA4B;MAA5BA,KAA4B,2BAApB,EAAoB;0BAAhBC,OAAgB;MAAhBA,OAAgB,6BAAN,EAAM;EACvE,IAAMC,GAAG,GAAGC,MAAM,CAAC,IAAD,CAAlB;;EACA,gBAA0CC,QAAQ,CAAC,KAAD,CAAlD;;MAAOC,aAAP;MAAsBC,gBAAtB;;EACA,iBAAsCF,QAAQ,CAAC,EAAD,CAA9C;;MAAOG,WAAP;MAAoBC,cAApB;;EAEAC,SAAS,CAAC,YAAM;IACd,IAAIC,IAAI,GAAG,EAAX;IACAT,OAAO,CAACU,OAAR,CAAgB,UAACC,MAAD,EAAY;MAC1B,IAAI,CAACL,WAAD,IAAgBK,MAAM,KAAKX,OAAO,CAAC,CAAD,CAAtC,EAA2C;QACzCS,IAAI,aAAME,MAAM,CAACZ,KAAb,CAAJ;OADF,MAEO;QACLU,IAAI,GAAGA,IAAI,CAACG,MAAL,aAAiBD,MAAM,CAACZ,KAAxB,EAAP;;KAJJ;IAOAQ,cAAc,CAACE,IAAD,CAAd;GATO,EAUN,CAACT,OAAD,CAVM,CAAT;EAYAa,iBAAiB,CAACZ,GAAD,CAAjB;EAEA,oBACE,oBAAC,SAAD;IACE,MAAM,EAAEG,aADV;IAEE,KAAK,EAAEE,WAFT;IAGE,MAAM,EAAE,EAHV;IAIE,gBAAgB,eACd,oBAAC,IAAD;MACE,SAAS,EAAC,eADZ;MAEE,cAAc,EAAER,cAFlB;MAGE,QAAQ,EAAEG,GAHZ;MAIE,KAAK,EAAEF,KAJT;MAKE,QAAQ,EAAE,CAAC,CALb;MAME,YAAY,EAAE;QAAA,OAAMM,gBAAgB,CAAC,IAAD,CAAtB;OANhB;MAOE,YAAY,EAAE;QAAA,OAAMA,gBAAgB,CAAC,KAAD,CAAtB;;;IAbtB;AAkBD;;AAED,IAAMS,KAAK,GAAG;;EAEZhB,cAAc,EAAEiB,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CACd,iCADc,CAFJ;;;EAMZlB,KAAK,EAAEgB,SAAS,CAACG,MAAV,CAAiBC,UAAjB,CAA4BF,WAA5B,CAAwC,iBAAxC,CANK;;;EAQZjB,OAAO,EAAEe,SAAS,CAACK,KAAV,CAAgBH,WAAhB,CAA4B,wBAA5B;AARG,CAAd;AAWApB,YAAY,CAACwB,SAAb,GAAyBP,KAAzB;IACMQ,wBAAwB,GAAGC,QAAQ,CAAC1B,YAAD;AACzCyB,wBAAwB,CAACD,SAAzB,GAAqCP,KAArC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pill.js","sources":["../../../src/deprecated/Pill.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst pillBlockName = 'pill';\n\nconst PillWrapper = aggregatedClasses('div')(\n pillBlockName,\n null,\n ({ size, variant }) => ({\n [variant]: !!variant,\n [size]: !!size,\n }),\n);\nconst PillLabel = aggregatedClasses('span')(pillBlockName, 'label');\nconst PillAddon = aggregatedClasses('div')(pillBlockName, 'addon');\n\nfunction Pill({\n containerProps = {},\n label = '',\n leftAddon,\n rightAddon,\n variant = 'value',\n size = 'm',\n ...otherProps\n}) {\n return (\n <PillWrapper\n {...containerProps}\n classProps={{ variant, size }}\n {...otherProps}\n >\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(\n 'props to inject to pill wrapper',\n ),\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;\nconst DSPillWithSchema = describe(Pill);\nDSPillWithSchema.propTypes = props;\n\nexport { Pill, DSPillWithSchema };\nexport default Pill;\n"],"names":["pillBlockName","PillWrapper","aggregatedClasses","size","variant","PillLabel","PillAddon","Pill","containerProps","label","leftAddon","rightAddon","otherProps","props","PropTypes","object","description","string","isRequired","oneOf","node","propTypes","DSPillWithSchema","describe"],"mappings":";;;;;;;;AAIA,IAAMA,aAAa,GAAG,MAAtB;AAEA,IAAMC,WAAW,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CAClBF,aADkB,EAElB,IAFkB,EAGlB;
|
|
1
|
+
{"version":3,"file":"Pill.js","sources":["../../../src/deprecated/Pill.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst pillBlockName = 'pill';\n\nconst PillWrapper = aggregatedClasses('div')(\n pillBlockName,\n null,\n ({ size, variant }) => ({\n [variant]: !!variant,\n [size]: !!size,\n }),\n);\nconst PillLabel = aggregatedClasses('span')(pillBlockName, 'label');\nconst PillAddon = aggregatedClasses('div')(pillBlockName, 'addon');\n\nfunction Pill({\n containerProps = {},\n label = '',\n leftAddon,\n rightAddon,\n variant = 'value',\n size = 'm',\n ...otherProps\n}) {\n return (\n <PillWrapper\n {...containerProps}\n classProps={{ variant, size }}\n {...otherProps}\n >\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(\n 'props to inject to pill wrapper',\n ),\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;\nconst DSPillWithSchema = describe(Pill);\nDSPillWithSchema.propTypes = props;\n\nexport { Pill, DSPillWithSchema };\nexport default Pill;\n"],"names":["pillBlockName","PillWrapper","aggregatedClasses","size","variant","PillLabel","PillAddon","Pill","containerProps","label","leftAddon","rightAddon","otherProps","props","PropTypes","object","description","string","isRequired","oneOf","node","propTypes","DSPillWithSchema","describe"],"mappings":";;;;;;;;AAIA,IAAMA,aAAa,GAAG,MAAtB;AAEA,IAAMC,WAAW,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CAClBF,aADkB,EAElB,IAFkB,EAGlB;EAAA;;EAAA,IAAGG,IAAH,QAAGA,IAAH;MAASC,OAAT,QAASA,OAAT;EAAA,0CACGA,OADH,EACa,CAAC,CAACA,OADf,0BAEGD,IAFH,EAEU,CAAC,CAACA,IAFZ;AAAA,CAHkB,CAApB;AAQA,IAAME,SAAS,GAAGH,iBAAiB,CAAC,MAAD,CAAjB,CAA0BF,aAA1B,EAAyC,OAAzC,CAAlB;AACA,IAAMM,SAAS,GAAGJ,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,aAAzB,EAAwC,OAAxC,CAAlB;;AAEA,SAASO,IAAT,QAQG;EAAA,iCAPDC,cAOC;MAPDA,cAOC,qCAPgB,EAOhB;0BANDC,KAMC;MANDA,KAMC,4BANO,EAMP;MALDC,SAKC,SALDA,SAKC;MAJDC,UAIC,SAJDA,UAIC;4BAHDP,OAGC;MAHDA,OAGC,8BAHS,OAGT;yBAFDD,IAEC;MAFDA,IAEC,2BAFM,GAEN;MADES,UACF;;EACD,oBACE,oBAAC,WAAD,eACMJ,cADN;IAEE,UAAU,EAAE;MAAEJ,OAAO,EAAPA,OAAF;MAAWD,IAAI,EAAJA;;KACnBS,UAHN,GAKGF,SAAS,iBAAI,oBAAC,SAAD,QAAYA,SAAZ,CALhB,eAME,oBAAC,SAAD,QAAYD,KAAZ,CANF,EAOGE,UAAU,iBAAI,oBAAC,SAAD,QAAYA,UAAZ,CAPjB,CADF;AAWD;;AAED,IAAME,KAAK,GAAG;;EAEZL,cAAc,EAAEM,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CACd,iCADc,CAFJ;;;EAMZP,KAAK,EAAEK,SAAS,CAACG,MAAV,CAAiBC,UAAjB,CAA4BF,WAA5B,CAAwC,iBAAxC,CANK;;;EAQZb,IAAI,EAAEW,SAAS,CAACK,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,CAAhB,EAA4BH,WAA5B,CAAwC,WAAxC,CARM;;;EAUZZ,OAAO,EAAEU,SAAS,CAACK,KAAV,CAAgB,CAAC,OAAD,EAAU,OAAV,CAAhB,EAAoCH,WAApC,CAAgD,cAAhD,CAVG;;;EAYZN,SAAS,EAAEI,SAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,yBAA3B,CAZC;;;EAcZL,UAAU,EAAEG,SAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,0BAA3B;AAdA,CAAd;AAiBAT,IAAI,CAACc,SAAL,GAAiBR,KAAjB;IACMS,gBAAgB,GAAGC,QAAQ,CAAChB,IAAD;AACjCe,gBAAgB,CAACD,SAAjB,GAA6BR,KAA7B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PillGroup.js","sources":["../../../src/deprecated/PillGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport FocusGroupProvider from '@elliemae/ds-shared/FocusGroup/FocusGroupManager';\n\nconst pillGroupBlockName = 'pill-group';\n\nexport const Container = aggregatedClasses('div')(pillGroupBlockName);\n\nconst PillGroup = ({\n containerProps = {},\n onFocusNextGroup,\n onFocusPreviousGroup,\n onFocusGroupSet,\n children,\n}) => (\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(\n 'props injected to component wrapper',\n ),\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([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]).isRequired.description('pill components'),\n};\n\nPillGroup.propTypes = props;\n\nconst DSPillGroupWithSchema = describe(PillGroup);\nDSPillGroupWithSchema.propTypes = props;\n\nexport { PillGroup, DSPillGroupWithSchema };\n"],"names":["pillGroupBlockName","Container","aggregatedClasses","PillGroup","containerProps","onFocusNextGroup","onFocusPreviousGroup","onFocusGroupSet","children","Tab","props","PropTypes","object","description","func","oneOfType","arrayOf","node","isRequired","propTypes","DSPillGroupWithSchema","describe"],"mappings":";;;;;AAKA,IAAMA,kBAAkB,GAAG,YAA3B;IAEaC,SAAS,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,kBAAzB;;IAEnBG,SAAS,GAAG,SAAZA,SAAY;
|
|
1
|
+
{"version":3,"file":"PillGroup.js","sources":["../../../src/deprecated/PillGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport FocusGroupProvider from '@elliemae/ds-shared/FocusGroup/FocusGroupManager';\n\nconst pillGroupBlockName = 'pill-group';\n\nexport const Container = aggregatedClasses('div')(pillGroupBlockName);\n\nconst PillGroup = ({\n containerProps = {},\n onFocusNextGroup,\n onFocusPreviousGroup,\n onFocusGroupSet,\n children,\n}) => (\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(\n 'props injected to component wrapper',\n ),\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([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]).isRequired.description('pill components'),\n};\n\nPillGroup.propTypes = props;\n\nconst DSPillGroupWithSchema = describe(PillGroup);\nDSPillGroupWithSchema.propTypes = props;\n\nexport { PillGroup, DSPillGroupWithSchema };\n"],"names":["pillGroupBlockName","Container","aggregatedClasses","PillGroup","containerProps","onFocusNextGroup","onFocusPreviousGroup","onFocusGroupSet","children","Tab","props","PropTypes","object","description","func","oneOfType","arrayOf","node","isRequired","propTypes","DSPillGroupWithSchema","describe"],"mappings":";;;;;AAKA,IAAMA,kBAAkB,GAAG,YAA3B;IAEaC,SAAS,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,kBAAzB;;IAEnBG,SAAS,GAAG,SAAZA,SAAY;EAAA,+BAChBC,cADgB;MAChBA,cADgB,oCACC,EADD;MAEhBC,gBAFgB,QAEhBA,gBAFgB;MAGhBC,oBAHgB,QAGhBA,oBAHgB;MAIhBC,eAJgB,QAIhBA,eAJgB;MAKhBC,QALgB,QAKhBA,QALgB;EAAA,oBAOhB,oBAAC,kBAAD;IACE,WAAW,EAAE;MACXC,GAAG,EAAE;KAFT;IAIE,eAAe,EAAEF,eAJnB;IAKE,gBAAgB,EAAEF,gBALpB;IAME,oBAAoB,EAAEC,oBANxB;IAOE,WAAW,EAAC;kBAEZ,oBAAC,SAAD,EAAeF,cAAf,EAAgCI,QAAhC,CATF,CAPgB;AAAA;;AAoBlB,IAAME,KAAK,GAAG;;EAEZN,cAAc,EAAEO,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CACd,qCADc,CAFJ;;;EAMZR,gBAAgB,EAAEM,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,2BAA3B,CANN;;;EAQZP,oBAAoB,EAAEK,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,2BAA3B,CARV;;;EAUZN,eAAe,EAAEI,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,0BAA3B,CAVL;;;EAYZL,QAAQ,EAAEG,SAAS,CAACI,SAAV,CAAoB,CAC5BJ,SAAS,CAACK,OAAV,CAAkBL,SAAS,CAACM,IAA5B,CAD4B,EAE5BN,SAAS,CAACM,IAFkB,CAApB,EAGPC,UAHO,CAGIL,WAHJ,CAGgB,iBAHhB;AAZE,CAAd;AAkBAV,SAAS,CAACgB,SAAV,GAAsBT,KAAtB;IAEMU,qBAAqB,GAAGC,QAAQ,CAAClB,SAAD;AACtCiB,qBAAqB,CAACD,SAAtB,GAAkCT,KAAlC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadOnlyPill.js","sources":["../../../src/deprecated/ReadOnlyPill.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { InfoCircleSmall } from '@elliemae/ds-icons';\nimport DSModal, { MODAL_TYPE_V2 } from '@elliemae/ds-modal';\nimport Popover from '@elliemae/ds-popover';\nimport { Pill } from './Pill';\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 <Popover\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;\n\nconst DSReadOnlyPillWithSchema = describe(ReadOnlyPill);\nDSReadOnlyPillWithSchema.propTypes = props;\n\nexport { ReadOnlyPill, DSReadOnlyPillWithSchema };\n"],"names":["ReadOnlyPill","containerProps","modalContent","label","leftAddon","modalTitle","tooltipText","ref","useRef","useState","isModalOpen","setIsModalOpen","isTooltipOpen","setIsTooltipOpen","toggle","MODAL_TYPE_V2","INFORMATION","props","PropTypes","object","description","string","isRequired","node","propTypes","DSReadOnlyPillWithSchema","describe"],"mappings":";;;;;;;;;;;;IAOMA,YAAY,GAAG,SAAfA,YAAe,OAOf;
|
|
1
|
+
{"version":3,"file":"ReadOnlyPill.js","sources":["../../../src/deprecated/ReadOnlyPill.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { InfoCircleSmall } from '@elliemae/ds-icons';\nimport DSModal, { MODAL_TYPE_V2 } from '@elliemae/ds-modal';\nimport Popover from '@elliemae/ds-popover';\nimport { Pill } from './Pill';\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 <Popover\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;\n\nconst DSReadOnlyPillWithSchema = describe(ReadOnlyPill);\nDSReadOnlyPillWithSchema.propTypes = props;\n\nexport { ReadOnlyPill, DSReadOnlyPillWithSchema };\n"],"names":["ReadOnlyPill","containerProps","modalContent","label","leftAddon","modalTitle","tooltipText","ref","useRef","useState","isModalOpen","setIsModalOpen","isTooltipOpen","setIsTooltipOpen","toggle","MODAL_TYPE_V2","INFORMATION","props","PropTypes","object","description","string","isRequired","node","propTypes","DSReadOnlyPillWithSchema","describe"],"mappings":";;;;;;;;;;;;IAOMA,YAAY,GAAG,SAAfA,YAAe,OAOf;EAAA,+BANJC,cAMI;MANJA,cAMI,oCANa,EAMb;+BALJC,YAKI;MALJA,YAKI,kCALW,EAKX;wBAJJC,KAII;MAJJA,KAII,2BAJI,EAIJ;MAHJC,SAGI,QAHJA,SAGI;6BAFJC,UAEI;MAFJA,UAEI,gCAFS,EAET;8BADJC,WACI;MADJA,WACI,iCADU,EACV;EACJ,IAAMC,GAAG,GAAGC,MAAM,CAAC,IAAD,CAAlB;;EACA,gBAAsCC,QAAQ,CAAC,KAAD,CAA9C;;MAAOC,WAAP;MAAoBC,cAApB;;EACA,iBAA0CF,QAAQ,CAAC,KAAD,CAAlD;;MAAOG,aAAP;MAAsBC,gBAAtB;;EAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,GAAM;IACnBH,c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WAAf,CAA2B,yBAA3B,CANC;;;EAQZlB,YAAY,EAAEgB,SAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,8BAA7B,CARF;;;EAUZf,UAAU,EAAEa,SAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,4BAA7B,CAVA;EAWZd,WAAW,EAAEY,SAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,4BAA7B;AAXD,CAAd;AAcApB,YAAY,CAACwB,SAAb,GAAyBP,KAAzB;IAEMQ,wBAAwB,GAAGC,QAAQ,CAAC1B,YAAD;AACzCyB,wBAAwB,CAACD,SAAzB,GAAqCP,KAArC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemovablePill.js","sources":["../../../src/deprecated/RemovablePill.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport { Pill } from './Pill';\n\nfunction RemovablePill({ containerProps = {}, label = '', onRemove, size = 'm', leftAddon }) {\n const ref = useRef(null);\n const { focusPrevious } = useFocusGroupItem(ref);\n return (\n <Pill\n className=\"removable-pill\"\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};\n\nRemovablePill.propTypes = props;\nconst DSRemovablePillWithSchema = describe(RemovablePill);\nDSRemovablePillWithSchema.propTypes = props;\n\nexport { RemovablePill, DSRemovablePillWithSchema };\n"],"names":["RemovablePill","containerProps","label","onRemove","size","leftAddon","ref","useRef","useFocusGroupItem","focusPrevious","e","key","isFunction","props","PropTypes","object","description","string","isRequired","func","oneOf","node","propTypes","DSRemovablePillWithSchema","describe"],"mappings":";;;;;;;;;;;AAOA,SAASA,aAAT,OAA6F;
|
|
1
|
+
{"version":3,"file":"RemovablePill.js","sources":["../../../src/deprecated/RemovablePill.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport { Pill } from './Pill';\n\nfunction RemovablePill({ containerProps = {}, label = '', onRemove, size = 'm', leftAddon }) {\n const ref = useRef(null);\n const { focusPrevious } = useFocusGroupItem(ref);\n return (\n <Pill\n className=\"removable-pill\"\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};\n\nRemovablePill.propTypes = props;\nconst DSRemovablePillWithSchema = describe(RemovablePill);\nDSRemovablePillWithSchema.propTypes = props;\n\nexport { RemovablePill, DSRemovablePillWithSchema };\n"],"names":["RemovablePill","containerProps","label","onRemove","size","leftAddon","ref","useRef","useFocusGroupItem","focusPrevious","e","key","isFunction","props","PropTypes","object","description","string","isRequired","func","oneOf","node","propTypes","DSRemovablePillWithSchema","describe"],"mappings":";;;;;;;;;;;AAOA,SAASA,aAAT,OAA6F;EAAA,+BAApEC,cAAoE;MAApEA,cAAoE,oCAAnD,EAAmD;wBAA/CC,KAA+C;MAA/CA,KAA+C,2BAAvC,EAAuC;MAAnCC,QAAmC,QAAnCA,QAAmC;uBAAzBC,IAAyB;MAAzBA,IAAyB,0BAAlB,GAAkB;MAAbC,SAAa,QAAbA,SAAa;EAC3F,IAAMC,GAAG,GAAGC,MAAM,CAAC,IAAD,CAAlB;;EACA,yBAA0BC,iBAAiB,CAACF,GAAD,CAA3C;MAAQG,aAAR,sBAAQA,aAAR;;EACA,oBACE,oBAAC,IAAD;IACE,SAAS,EAAC,gBADZ;IAEE,eAAY,gBAFd;IAGE,cAAc,EAAER,cAHlB;IAIE,QAAQ,EAAEK,GAJZ;IAKE,IAAI,EAAEF,IALR;IAME,KAAK,EAAEF,KANT;IAOE,SAAS,EAAEG,SAPb;IAQE,SAAS,EAAE,mBAACK,CAAD,EAAO;MAChB,IAAIA,CAAC,CAACC,GAAF,KAAU,WAAV,IAAyBC,UAAU,CAACT,QAAD,CAAvC,EAAmD;QACjDA,QAAQ;QACR,IAAIS,UAAU,CAACH,aAAD,CAAd,EAA+BA,aAAa;;KAXlD;IAcE,UAAU,eACR,oBAAC,WAAD;MAAa,IAAI,EAAC,QAAlB;MAA2B,eAAY,oBAAvC;MAA4D,SAAS,EAAC,oBAAtE;MAA2F,OAAO,EAAEN;MAfxG;IAiBE,QAAQ,EAAE,CAAC;IAlBf;AAqBD;;AAED,IAAMU,KAAK,GAAG;;EAEZZ,cAAc,EAAEa,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,CAFJ;;;EAIZd,KAAK,EAAEY,SAAS,CAACG,MAAV,CAAiBC,UAAjB,CAA4BF,WAA5B,CAAwC,iBAAxC,CAJK;;;EAMZb,QAAQ,EAAEW,SAAS,CAACK,IAAV,CAAeH,WAAf,CAA2B,uBAA3B,CANE;;;EAQZZ,IAAI,EAAEU,SAAS,CAACM,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,CAAhB,EAA4BJ,WAA5B,CAAwC,WAAxC,CARM;;;EAUZX,SAAS,EAAES,SAAS,CAACO,IAAV,CAAeL,WAAf,CAA2B,yBAA3B;AAVC,CAAd;AAaAhB,aAAa,CAACsB,SAAd,GAA0BT,KAA1B;IACMU,yBAAyB,GAAGC,QAAQ,CAACxB,aAAD;AAC1CuB,yBAAyB,CAACD,SAA1B,GAAsCT,KAAtC;;;;"}
|
package/esm/props.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../src/props.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { PropTypes } from 'react-desc';\nimport { DSInput } from '@elliemae/ds-form';\n\nconst pillTypes = PropTypes.oneOf(['label', 'value', 'input', 'dropdown', 'removable', 'readonly']);\n\nexport const DSPillV2PropTypes = {\n label: PropTypes.string.description('Label to show in the pill').isRequired,\n type: pillTypes.description('The type of pill that you want to render').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)')\n .defaultValue(() => null),\n ariaLabel: PropTypes.string\n .description('Aria label for the pill. If not provided we will use the label')\n .defaultValue(''),\n labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(true),\n tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),\n iconLeft: PropTypes.node.description('A component to show int the left of a readonly pill').defaultValue(null),\n iconRight: PropTypes.node.description('A component to show in the right of a readonly pill').defaultValue(null),\n onRemove: PropTypes.func\n .description('Callback triggered when removing a pill with the close icon')\n .defaultValue(() => null),\n inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),\n onInputChange: PropTypes.func\n .description('Callback triggered when user provides input to the input pill')\n .defaultValue(() => null),\n onInputClear: PropTypes.func\n .description('Callback triggered when the user clears an input pill')\n .defaultValue(() => null),\n inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),\n dropdownProps: PropTypes.object.description('Properties that will be used for the dropdown-menu').defaultValue({}),\n onDropdownClick: PropTypes.func\n .description('Callback when dropdown button is clicked or pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPillButtonPropTypes = {\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n};\n\nexport const DSPillGroupPropTypes = {\n width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the pill group wrapper')\n .defaultValue(() => null),\n};\n\nexport const DSPillV2DefaultProps = {\n innerRef: () => null,\n ariaLabel: '',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: DSInput,\n dropdownProps: {},\n onDropdownClick: () => null,\n};\n\nexport const DSPillButtonDefaultProps = {\n type: 'right',\n width: '100%',\n height: '100%',\n};\n\nexport const DSPillGroupDefaultProps = {\n width: 'fit-content',\n innerRef: () => null,\n};\n"],"names":["pillTypes","PropTypes","oneOf","DSPillV2PropTypes","label","string","description","isRequired","type","innerRef","oneOfType","object","func","defaultValue","ariaLabel","labelTruncated","bool","tooltipValue","iconLeft","node","iconRight","onRemove","inputPlaceholder","onInputChange","onInputClear","inputWidth","number","dropdownProps","onDropdownClick","DSPillButtonPropTypes","width","height","DSPillGroupPropTypes","DSPillV2DefaultProps","inputRender","DSInput","DSPillButtonDefaultProps","DSPillGroupDefaultProps"],"mappings":";;;AAAA;AAIA,IAAMA,SAAS,GAAGC,SAAS,CAACC,KAAV,CAAgB,CAAC,OAAD,EAAU,OAAV,EAAmB,OAAnB,EAA4B,UAA5B,EAAwC,WAAxC,EAAqD,UAArD,CAAhB,CAAlB;IAEaC,iBAAiB,GAAG;
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../src/props.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { PropTypes } from 'react-desc';\nimport { DSInput } from '@elliemae/ds-form';\n\nconst pillTypes = PropTypes.oneOf(['label', 'value', 'input', 'dropdown', 'removable', 'readonly']);\n\nexport const DSPillV2PropTypes = {\n label: PropTypes.string.description('Label to show in the pill').isRequired,\n type: pillTypes.description('The type of pill that you want to render').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)')\n .defaultValue(() => null),\n ariaLabel: PropTypes.string\n .description('Aria label for the pill. If not provided we will use the label')\n .defaultValue(''),\n labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(true),\n tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),\n iconLeft: PropTypes.node.description('A component to show int the left of a readonly pill').defaultValue(null),\n iconRight: PropTypes.node.description('A component to show in the right of a readonly pill').defaultValue(null),\n onRemove: PropTypes.func\n .description('Callback triggered when removing a pill with the close icon')\n .defaultValue(() => null),\n inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),\n onInputChange: PropTypes.func\n .description('Callback triggered when user provides input to the input pill')\n .defaultValue(() => null),\n onInputClear: PropTypes.func\n .description('Callback triggered when the user clears an input pill')\n .defaultValue(() => null),\n inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),\n dropdownProps: PropTypes.object.description('Properties that will be used for the dropdown-menu').defaultValue({}),\n onDropdownClick: PropTypes.func\n .description('Callback when dropdown button is clicked or pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPillButtonPropTypes = {\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n};\n\nexport const DSPillGroupPropTypes = {\n width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the pill group wrapper')\n .defaultValue(() => null),\n};\n\nexport const DSPillV2DefaultProps = {\n innerRef: () => null,\n ariaLabel: '',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: DSInput,\n dropdownProps: {},\n onDropdownClick: () => null,\n};\n\nexport const DSPillButtonDefaultProps = {\n type: 'right',\n width: '100%',\n height: '100%',\n};\n\nexport const DSPillGroupDefaultProps = {\n width: 'fit-content',\n innerRef: () => null,\n};\n"],"names":["pillTypes","PropTypes","oneOf","DSPillV2PropTypes","label","string","description","isRequired","type","innerRef","oneOfType","object","func","defaultValue","ariaLabel","labelTruncated","bool","tooltipValue","iconLeft","node","iconRight","onRemove","inputPlaceholder","onInputChange","onInputClear","inputWidth","number","dropdownProps","onDropdownClick","DSPillButtonPropTypes","width","height","DSPillGroupPropTypes","DSPillV2DefaultProps","inputRender","DSInput","DSPillButtonDefaultProps","DSPillGroupDefaultProps"],"mappings":";;;AAAA;AAIA,IAAMA,SAAS,GAAGC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IAAA,OAAM,IAAN;GAFN;AAFwB;IAOvBoB,oBAAoB,GAAG;EAClCxB,QAAQ,EAAE;IAAA,OAAM,IAAN;GADwB;EAElCK,SAAS,EAAE,EAFuB;EAGlCC,cAAc,EAAE,IAHkB;EAIlCE,YAAY,EAAE,EAJoB;EAKlCC,QAAQ,EAAE,IALwB;EAMlCE,SAAS,EAAE,IANuB;EAOlCC,QAAQ,EAAE;IAAA,OAAM,IAAN;GAPwB;EAQlCC,gBAAgB,EAAE,EARgB;EASlCC,aAAa,EAAE;IAAA,OAAM,IAAN;GATmB;EAUlCC,YAAY,EAAE;IAAA,OAAM,IAAN;GAVoB;EAWlCC,UAAU,EAAE,EAXsB;EAYlCS,WAAW,EAAEC,OAZqB;EAalCR,aAAa,EAAE,EAbmB;EAclCC,eAAe,EAAE;IAAA,OAAM,IAAN;;AAdiB;IAiBvBQ,wBAAwB,GAAG;EACtC5B,IAAI,EAAE,OADgC;EAEtCsB,KAAK,EAAE,MAF+B;EAGtCC,MAAM,EAAE;AAH8B;IAM3BM,uBAAuB,GAAG;EACrCP,KAAK,EAAE,aAD8B;EAErCrB,QAAQ,EAAE;IAAA,OAAM,IAAN;;AAF2B;;;;"}
|
package/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/utils.tsx"],"sourcesContent":["type refInterfaceType = React.MutableRefObject<HTMLElement> | ((_ref: HTMLElement) => void);\n\nexport const setMultipleRefs =\n (...refs: refInterfaceType[]) =>\n (_ref: HTMLElement): void => {\n refs.forEach((ref) => {\n if (!ref || !_ref) return;\n if (typeof ref === 'function') {\n ref(_ref);\n return;\n }\n if (ref) ref.current = _ref;\n });\n };\n"],"names":["setMultipleRefs","refs","_ref","forEach","ref","current"],"mappings":"IAEaA,eAAe,GAC1B,SADWA,eACX;
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/utils.tsx"],"sourcesContent":["type refInterfaceType = React.MutableRefObject<HTMLElement> | ((_ref: HTMLElement) => void);\n\nexport const setMultipleRefs =\n (...refs: refInterfaceType[]) =>\n (_ref: HTMLElement): void => {\n refs.forEach((ref) => {\n if (!ref || !_ref) return;\n if (typeof ref === 'function') {\n ref(_ref);\n return;\n }\n if (ref) ref.current = _ref;\n });\n };\n"],"names":["setMultipleRefs","refs","_ref","forEach","ref","current"],"mappings":"IAEaA,eAAe,GAC1B,SADWA,eACX;EAAA,kCAAIC,IAAJ;IAAIA,IAAJ;;;EAAA,OACA,UAACC,IAAD,EAA6B;IAC3BD,IAAI,CAACE,OAAL,CAAa,UAACC,GAAD,EAAS;MACpB,IAAI,CAACA,GAAD,IAAQ,CAACF,IAAb,EAAmB;;MACnB,IAAI,OAAOE,GAAP,KAAe,UAAnB,EAA+B;QAC7BA,GAAG,CAACF,IAAD,CAAH;QACA;;;MAEF,IAAIE,GAAJ,EAASA,GAAG,CAACC,OAAJ,GAAcH,IAAd;KANX;GAFF;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pills",
|
|
3
|
-
"version": "1.61.
|
|
3
|
+
"version": "1.61.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Pills",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"build": "node ../../scripts/build/build.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-classnames": "1.61.
|
|
20
|
-
"@elliemae/ds-dropdownmenu": "1.61.
|
|
21
|
-
"@elliemae/ds-form": "1.61.
|
|
22
|
-
"@elliemae/ds-grid": "1.61.
|
|
23
|
-
"@elliemae/ds-icons": "1.61.
|
|
24
|
-
"@elliemae/ds-modal": "1.61.
|
|
25
|
-
"@elliemae/ds-popover": "1.61.
|
|
26
|
-
"@elliemae/ds-shared": "1.61.
|
|
27
|
-
"@elliemae/ds-system": "1.61.
|
|
28
|
-
"@elliemae/ds-tooltip": "1.61.
|
|
29
|
-
"@elliemae/ds-utilities": "1.61.
|
|
19
|
+
"@elliemae/ds-classnames": "1.61.13",
|
|
20
|
+
"@elliemae/ds-dropdownmenu": "1.61.13",
|
|
21
|
+
"@elliemae/ds-form": "1.61.13",
|
|
22
|
+
"@elliemae/ds-grid": "1.61.13",
|
|
23
|
+
"@elliemae/ds-icons": "1.61.13",
|
|
24
|
+
"@elliemae/ds-modal": "1.61.13",
|
|
25
|
+
"@elliemae/ds-popover": "1.61.13",
|
|
26
|
+
"@elliemae/ds-shared": "1.61.13",
|
|
27
|
+
"@elliemae/ds-system": "1.61.13",
|
|
28
|
+
"@elliemae/ds-tooltip": "1.61.13",
|
|
29
|
+
"@elliemae/ds-utilities": "1.61.13",
|
|
30
30
|
"prop-types": "~15.7.2",
|
|
31
31
|
"react-desc": "^4.1.2",
|
|
32
32
|
"uid": "^2.0.0"
|