@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":"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","React","props","PropTypes","object","description","string","isRequired","oneOf","node","propTypes","DSPillWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA,IAAMA,aAAa,GAAG,MAAtB;AAEA,IAAMC,WAAW,GAAGC,8BAAiB,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","React","props","PropTypes","object","description","string","isRequired","oneOf","node","propTypes","DSPillWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA,IAAMA,aAAa,GAAG,MAAtB;AAEA,IAAMC,WAAW,GAAGC,8BAAiB,CAAC,KAAD,CAAjB,CAClBF,aADkB,EAElB,IAFkB,EAGlB;EAAA;;EAAA,IAAGG,IAAH,QAAGA,IAAH;MAASC,OAAT,QAASA,OAAT;EAAA,8DACGA,OADH,EACa,CAAC,CAACA,OADf,8CAEGD,IAFH,EAEU,CAAC,CAACA,IAFZ;AAAA,CAHkB,CAApB;AAQA,IAAME,SAAS,GAAGH,8BAAiB,CAAC,MAAD,CAAjB,CAA0BF,aAA1B,EAAyC,OAAzC,CAAlB;AACA,IAAMM,SAAS,GAAGJ,8BAAiB,CAAC,KAAD,CAAjB,CAAyBF,aAAzB,EAAwC,OAAxC,CAAlB;;AAEA,SAASO,IAAT,QAQG;EAAA,iCAPDC,cAOC;MAPDA,cAOC,qCAPgB,EAOhB;0BANDC,KAMC;MANDA,KAMC,4BANO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illGroup.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","React","FocusGroupProvider","Tab","props","PropTypes","object","description","func","oneOfType","arrayOf","node","isRequired","propTypes","DSPillGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,YAA3B;IAEaC,SAAS,GAAGC,8BAAiB,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","React","FocusGroupProvider","Tab","props","PropTypes","object","description","func","oneOfType","arrayOf","node","isRequired","propTypes","DSPillGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;AAKA,IAAMA,kBAAkB,GAAG,YAA3B;IAEaC,SAAS,GAAGC,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lyPill.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","React","Pill","Popover","InfoCircleSmall","DSModal","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","React","Pill","Popover","InfoCircleSmall","DSModal","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,Y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,KAAK,GAAG;;EAEZrB,cAAc,EAAEsB,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,CAFJ;;;EAIZtB,KAAK,EAAEoB,mBAAS,CAACG,MAAV,CAAiBC,UAAjB,CAA4BF,WAA5B,CAAwC,iBAAxC,CAJK;;;EAMZrB,SAAS,EAAEmB,mBAAS,CAACK,IAAV,CAAeH,WAAf,CAA2B,yBAA3B,CANC;;;EAQZvB,YAAY,EAAEqB,mBAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,8BAA7B,CARF;;;EAUZpB,UAAU,EAAEkB,mBAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,4BAA7B,CAVA;EAWZnB,WAAW,EAAEiB,mBAAS,CAACG,MAAV,CAAiBD,WAAjB,CAA6B,4BAA7B;AAXD,CAAd;AAcAzB,YAAY,CAAC6B,SAAb,GAAyBP,KAAzB;IAEMQ,wBAAwB,GAAGC,kBAAQ,CAAC/B,YAAD;AACzC8B,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","React","Pill","e","key","isFunction","CloseXsmall","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","React","Pill","e","key","isFunction","CloseXsmall","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,YAAM,CAAC,IAAD,CAAlB;;EACA,yBAA0BC,qCAAiB,CAACF,GAAD,CAA3C;MAAQG,aAAR,sBAAQA,aAAR;;EACA,oBACEC,wCAACC,oBAAD;IACE,SAAS,EAAC,gBADZ;IAEE,eAAY,gBAFd;IAGE,cAAc,EAAEV,cAHlB;IAIE,QAAQ,EAAEK,GAJZ;IAKE,IAAI,EAAEF,IALR;IAME,KAAK,EAAEF,KANT;IAOE,SAAS,EAAEG,SAPb;IAQE,SAAS,EAAE,mBAACO,CAAD,EAAO;MAChB,IAAIA,CAAC,CAACC,GAAF,KAAU,WAAV,IAAyBC,sBAAU,CAACX,QAAD,CAAvC,EAAmD;QACjDA,QAAQ;QACR,IAAIW,sBAAU,CAACL,aAAD,CAAd,EAA+BA,aAAa;;KAXlD;IAcE,UAAU,eACRC,wCAACK,mBAAD;MAAa,IAAI,EAAC,QAAlB;MAA2B,eAAY,oBAAvC;MAA4D,SAAS,EAAC,oBAAtE;MAA2F,OAAO,EAAEZ;MAfxG;IAiBE,QAAQ,EAAE,CAAC;IAlBf;AAqBD;;AAED,IAAMa,KAAK,GAAG;;EAEZf,cAAc,EAAEgB,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,CAFJ;;;EAIZjB,KAAK,EAAEe,mBAAS,CAACG,MAAV,CAAiBC,UAAjB,CAA4BF,WAA5B,CAAwC,iBAAxC,CAJK;;;EAMZhB,QAAQ,EAAEc,mBAAS,CAACK,IAAV,CAAeH,WAAf,CAA2B,uBAA3B,CANE;;;EAQZf,IAAI,EAAEa,mBAAS,CAACM,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,CAAhB,EAA4BJ,WAA5B,CAAwC,WAAxC,CARM;;;EAUZd,SAAS,EAAEY,mBAAS,CAACO,IAAV,CAAeL,WAAf,CAA2B,yBAA3B;AAVC,CAAd;AAaAnB,aAAa,CAACyB,SAAd,GAA0BT,KAA1B;IACMU,yBAAyB,GAAGC,kBAAQ,CAAC3B,aAAD;AAC1C0B,yBAAyB,CAACD,SAA1B,GAAsCT,KAAtC;;;;;"}
|
package/cjs/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,mBAAS,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,mBAAS,CAACC,KAAV,CAAgB,CAAC,OAAD,EAAU,OAAV,EAAmB,OAAnB,EAA4B,UAA5B,EAAwC,WAAxC,EAAqD,UAArD,CAAhB,CAAlB;IAEaC,iBAAiB,GAAG;EAC/BC,KAAK,EAAEH,mBAAS,CAACI,MAAV,CAAiBC,WAAjB,CAA6B,2BAA7B,EAA0DC,UADlC;EAE/BC,IAAI,EAAER,SAAS,CAACM,WAAV,CAAsB,0CAAtB,EAAkEC,UAFzC;EAG/BE,QAAQ,EAAER,mBAAS,CAACS,SAAV,CAAoB,CAACT,mBAAS,CAACU,MAAX,EAAmBV,mBAAS,CAACW,IAA7B,CAApB,EACPN,WADO,CACK,kGADL,EAEPO,YAFO,CAEM;IAAA,OAAM,IAAN;GAFN,CAHqB;EAM/BC,SAAS,EAAEb,mBAAS,CAACI,MAAV,CACRC,WADQ,CACI,gEADJ,EAERO,YAFQ,CAEK,EAFL,CANoB;EAS/BE,cAAc,EAAEd,mBAAS,CAACe,IAAV,CAAeV,WAAf,CAA2B,qCAA3B,EAAkEO,YAAlE,CAA+E,IAA/E,CATe;EAU/BI,YAAY,EAAEhB,mBAAS,CAACI,MAAV,CAAiBC,WAAjB,CAA6B,+CAA7B,EAA8EO,YAA9E,CAA2F,EAA3F,CAViB;EAW/BK,QAAQ,EAAEjB,mBAAS,CAACkB,IAAV,CAAeb,WAAf,CAA2B,qDAA3B,EAAkFO,YAAlF,CAA+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InterfaceType = 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;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pill.js","sources":["../../../src/components/Pill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSPillProps } from '../index.d';\nimport { DSPillV2DefaultProps, DSPillV2PropTypes } from '../props';\nimport { DropdownPill, LabelPill, ValuePill, InputPill, ReadOnlyPill, RemovablePill } from './types';\n\nconst pillComponentGetter: Record<string, React.ComponentType<DSPillProps>> = {\n dropdown: DropdownPill,\n input: InputPill,\n label: LabelPill,\n readonly: ReadOnlyPill,\n removable: RemovablePill,\n value: ValuePill,\n};\n\nconst DSPillV2: React.ComponentType<DSPillProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillV2DefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2WithSchema.toTypescript());\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.propTypes = DSPillV2PropTypes;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypes;\n\nexport { DSPillV2, DSPillV2WithSchema };\n"],"names":["pillComponentGetter","dropdown","DropdownPill","input","InputPill","label","LabelPill","readonly","ReadOnlyPill","removable","RemovablePill","value","ValuePill","DSPillV2","props","propsWithDefaults","useMemoMergePropsWithDefault","DSPillV2DefaultProps","useValidateTypescriptPropTypes","DSPillV2WithSchema","toTypescript","type","PillComponent","propTypes","DSPillV2PropTypes","describe","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,IAAMA,mBAAqE,GAAG;
|
|
1
|
+
{"version":3,"file":"Pill.js","sources":["../../../src/components/Pill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe } from 'react-desc';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSPillProps } from '../index.d';\nimport { DSPillV2DefaultProps, DSPillV2PropTypes } from '../props';\nimport { DropdownPill, LabelPill, ValuePill, InputPill, ReadOnlyPill, RemovablePill } from './types';\n\nconst pillComponentGetter: Record<string, React.ComponentType<DSPillProps>> = {\n dropdown: DropdownPill,\n input: InputPill,\n label: LabelPill,\n readonly: ReadOnlyPill,\n removable: RemovablePill,\n value: ValuePill,\n};\n\nconst DSPillV2: React.ComponentType<DSPillProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillV2DefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillV2WithSchema.toTypescript());\n const { type } = propsWithDefaults;\n const PillComponent = pillComponentGetter[type];\n\n return <PillComponent {...propsWithDefaults} />;\n};\n\nDSPillV2.propTypes = DSPillV2PropTypes;\nconst DSPillV2WithSchema = describe(DSPillV2).description('Pill');\nDSPillV2WithSchema.propTypes = DSPillV2PropTypes;\n\nexport { DSPillV2, DSPillV2WithSchema };\n"],"names":["pillComponentGetter","dropdown","DropdownPill","input","InputPill","label","LabelPill","readonly","ReadOnlyPill","removable","RemovablePill","value","ValuePill","DSPillV2","props","propsWithDefaults","useMemoMergePropsWithDefault","DSPillV2DefaultProps","useValidateTypescriptPropTypes","DSPillV2WithSchema","toTypescript","type","PillComponent","propTypes","DSPillV2PropTypes","describe","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,IAAMA,mBAAqE,GAAG;EAC5EC,QAAQ,EAAEC,YADkE;EAE5EC,KAAK,EAAEC,SAFqE;EAG5EC,KAAK,EAAEC,SAHqE;EAI5EC,QAAQ,EAAEC,YAJkE;EAK5EC,SAAS,EAAEC,aALiE;EAM5EC,KAAK,EAAEC;AANqE,CAA9E;;IASMC,QAA0C,GAAG,SAA7CA,QAA6C,CAACC,KAAD,EAAW;EAC5D,IAAMC,iBAAiB,GAAGC,4BAA4B,CAACF,KAAD,EAAQG,oBAAR,CAAtD;EACAC,8BAA8B,CAACH,iBAAD,EAAoBI,kBAAkB,CAACC,YAAnB,EAApB,CAA9B;EACA,IAAQC,IAAR,GAAiBN,iBAAjB,CAAQM,IAAR;EACA,IAAMC,aAAa,GAAGtB,mBAAmB,CAACqB,IAAD,CAAzC;EAEA,oBAAO,oBAAC,aAAD,EAAmBN,iBAAnB,CAAP;AACD;;AAEDF,QAAQ,CAACU,SAAT,GAAqBC,iBAArB;IACML,kBAAkB,GAAGM,QAAQ,CAACZ,QAAD,CAAR,CAAmBa,WAAnB,CAA+B,MAA/B;AAC3BP,kBAAkB,CAACI,SAAnB,GAA+BC,iBAA/B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PillButton.js","sources":["../../../src/components/PillButton.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe } from 'react-desc';\nimport { DSButtonPropsT } from '@elliemae/ds-button';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { StyledPillButton } from './styled';\nimport { DSPillButtonDefaultProps, DSPillButtonPropTypes } from '../props';\n\nconst typeToClassName = {\n only: 'ds-pill-button-only',\n left: 'ds-pill-button-left',\n right: 'ds-pill-button-right',\n};\n\nconst DSPillButton: React.ComponentType<DSButtonPropsT> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillButtonDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillButtonWithSchema.toTypescript());\n\n const { type, children, ...rest } = propsWithDefaults;\n\n return (\n <StyledPillButton {...rest} buttonType=\"raw\" className={`${typeToClassName[type]} ${rest.className}`}>\n {children}\n </StyledPillButton>\n );\n};\n\nDSPillButton.propTypes = DSPillButtonPropTypes;\nconst DSPillButtonWithSchema = describe(DSPillButton).description('Pill button');\nDSPillButtonWithSchema.propTypes = DSPillButtonPropTypes;\n\nexport { DSPillButton, DSPillButtonWithSchema };\n"],"names":["typeToClassName","only","left","right","DSPillButton","props","propsWithDefaults","useMemoMergePropsWithDefault","DSPillButtonDefaultProps","useValidateTypescriptPropTypes","DSPillButtonWithSchema","toTypescript","type","children","rest","className","propTypes","DSPillButtonPropTypes","describe","description"],"mappings":";;;;;;;;;;;;;AAQA,IAAMA,eAAe,GAAG;
|
|
1
|
+
{"version":3,"file":"PillButton.js","sources":["../../../src/components/PillButton.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { describe } from 'react-desc';\nimport { DSButtonPropsT } from '@elliemae/ds-button';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { StyledPillButton } from './styled';\nimport { DSPillButtonDefaultProps, DSPillButtonPropTypes } from '../props';\n\nconst typeToClassName = {\n only: 'ds-pill-button-only',\n left: 'ds-pill-button-left',\n right: 'ds-pill-button-right',\n};\n\nconst DSPillButton: React.ComponentType<DSButtonPropsT> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillButtonDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillButtonWithSchema.toTypescript());\n\n const { type, children, ...rest } = propsWithDefaults;\n\n return (\n <StyledPillButton {...rest} buttonType=\"raw\" className={`${typeToClassName[type]} ${rest.className}`}>\n {children}\n </StyledPillButton>\n );\n};\n\nDSPillButton.propTypes = DSPillButtonPropTypes;\nconst DSPillButtonWithSchema = describe(DSPillButton).description('Pill button');\nDSPillButtonWithSchema.propTypes = DSPillButtonPropTypes;\n\nexport { DSPillButton, DSPillButtonWithSchema };\n"],"names":["typeToClassName","only","left","right","DSPillButton","props","propsWithDefaults","useMemoMergePropsWithDefault","DSPillButtonDefaultProps","useValidateTypescriptPropTypes","DSPillButtonWithSchema","toTypescript","type","children","rest","className","propTypes","DSPillButtonPropTypes","describe","description"],"mappings":";;;;;;;;;;;;;AAQA,IAAMA,eAAe,GAAG;EACtBC,IAAI,EAAE,qBADgB;EAEtBC,IAAI,EAAE,qBAFgB;EAGtBC,KAAK,EAAE;AAHe,CAAxB;;IAMMC,YAAiD,GAAG,SAApDA,YAAoD,CAACC,KAAD,EAAW;EACnE,IAAMC,iBAAiB,GAAGC,4BAA4B,CAACF,KAAD,EAAQG,wBAAR,CAAtD;EACAC,8BAA8B,CAACH,iBAAD,EAAoBI,sBAAsB,CAACC,YAAvB,EAApB,CAA9B;;EAEA,IAAQC,IAAR,GAAoCN,iBAApC,CAAQM,IAAR;MAAcC,QAAd,GAAoCP,iBAApC,CAAcO,QAAd;MAA2BC,IAA3B,4BAAoCR,iBAApC;;EAEA,oBACE,oBAAC,gBAAD,eAAsBQ,IAAtB;IAA4B,UAAU,EAAC,KAAvC;IAA6C,SAAS,YAAKd,eAAe,CAACY,IAAD,CAApB,cAA8BE,IAAI,CAACC,SAAnC;MACnDF,QADH,CADF;AAKD;;AAEDT,YAAY,CAACY,SAAb,GAAyBC,qBAAzB;IACMP,sBAAsB,GAAGQ,QAAQ,CAACd,YAAD,CAAR,CAAuBe,WAAvB,CAAmC,aAAnC;AAC/BT,sBAAsB,CAACM,SAAvB,GAAmCC,qBAAnC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PillGroup.js","sources":["../../../src/components/PillGroup.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { createContext, useCallback, useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { DSPillGroupProps } from '../index.d';\nimport { DSPillGroupDefaultProps, DSPillGroupPropTypes } from '../props';\nimport { StyledPillGroup } from './styled';\n\nexport const DSPillGroupV2Context = createContext<{ onKeyboardRemove: (pillUid: string) => void }>({\n onKeyboardRemove: () => null,\n});\n\nconst DSPillGroupV2: React.ComponentType<DSPillGroupProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupV2WithSchema.toTypescript());\n\n const pillGroupUid = useMemo(() => `ds-pill-group-${uid()}`, []);\n const { children, width, innerRef } = propsWithDefaults;\n const onKeyboardRemove = useCallback(\n (pillUid: string) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex > 0) {\n elems[pillIndex - 1].focus();\n } else if (pillIndex + 1 < elems.length) {\n elems[pillIndex + 1].focus();\n }\n },\n [pillGroupUid],\n );\n\n return (\n <DSPillGroupV2Context.Provider value={{ onKeyboardRemove }}>\n <StyledPillGroup\n width={width}\n id={pillGroupUid}\n cols={React.Children.map(children, () => 'auto')}\n gutter=\"2px\"\n ref={innerRef}\n >\n {children}\n </StyledPillGroup>\n </DSPillGroupV2Context.Provider>\n );\n};\n\nDSPillGroupV2.propTypes = DSPillGroupPropTypes;\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n"],"names":["DSPillGroupV2Context","createContext","onKeyboardRemove","DSPillGroupV2","props","propsWithDefaults","useMemoMergePropsWithDefault","DSPillGroupDefaultProps","useValidateTypescriptPropTypes","DSPillGroupV2WithSchema","toTypescript","pillGroupUid","useMemo","uid","children","width","innerRef","useCallback","pillUid","elems","document","querySelectorAll","pillIndex","findIndex","elem","id","focus","length","React","Children","map","propTypes","DSPillGroupPropTypes","describe"],"mappings":";;;;;;;;;;;;IASaA,oBAAoB,gBAAGC,aAAa,CAAkD;
|
|
1
|
+
{"version":3,"file":"PillGroup.js","sources":["../../../src/components/PillGroup.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { createContext, useCallback, useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { DSPillGroupProps } from '../index.d';\nimport { DSPillGroupDefaultProps, DSPillGroupPropTypes } from '../props';\nimport { StyledPillGroup } from './styled';\n\nexport const DSPillGroupV2Context = createContext<{ onKeyboardRemove: (pillUid: string) => void }>({\n onKeyboardRemove: () => null,\n});\n\nconst DSPillGroupV2: React.ComponentType<DSPillGroupProps> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, DSPillGroupDefaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSPillGroupV2WithSchema.toTypescript());\n\n const pillGroupUid = useMemo(() => `ds-pill-group-${uid()}`, []);\n const { children, width, innerRef } = propsWithDefaults;\n const onKeyboardRemove = useCallback(\n (pillUid: string) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex > 0) {\n elems[pillIndex - 1].focus();\n } else if (pillIndex + 1 < elems.length) {\n elems[pillIndex + 1].focus();\n }\n },\n [pillGroupUid],\n );\n\n return (\n <DSPillGroupV2Context.Provider value={{ onKeyboardRemove }}>\n <StyledPillGroup\n width={width}\n id={pillGroupUid}\n cols={React.Children.map(children, () => 'auto')}\n gutter=\"2px\"\n ref={innerRef}\n >\n {children}\n </StyledPillGroup>\n </DSPillGroupV2Context.Provider>\n );\n};\n\nDSPillGroupV2.propTypes = DSPillGroupPropTypes;\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypes;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n"],"names":["DSPillGroupV2Context","createContext","onKeyboardRemove","DSPillGroupV2","props","propsWithDefaults","useMemoMergePropsWithDefault","DSPillGroupDefaultProps","useValidateTypescriptPropTypes","DSPillGroupV2WithSchema","toTypescript","pillGroupUid","useMemo","uid","children","width","innerRef","useCallback","pillUid","elems","document","querySelectorAll","pillIndex","findIndex","elem","id","focus","length","React","Children","map","propTypes","DSPillGroupPropTypes","describe"],"mappings":";;;;;;;;;;;;IASaA,oBAAoB,gBAAGC,aAAa,CAAkD;EACjGC,gBAAgB,EAAE;IAAA,OAAM,IAAN;;AAD+E,CAAlD;;IAI3CC,aAAoD,GAAG,SAAvDA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AAG,EAAEE;KAEJF,QAPH,CADF,CADF;AAaD;;AAEDX,aAAa,CAAC4B,SAAd,GAA0BC,oBAA1B;IACMvB,uBAAuB,GAAGwB,QAAQ,CAAC9B,aAAD;AACxCM,uBAAuB,CAACsB,SAAxB,GAAoCC,oBAApC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/components/styled.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport styled, { css } from 'styled-components';\nimport Grid from '@elliemae/ds-grid';\nimport { DSButtonV2 } from '@elliemae/ds-button';\n\n// =============================================================================\n// Common CSS\n// =============================================================================\n\nconst borderOutside = (color: string, size = 1, zIndex = 2, borderRadius = '12px') => css`\n :after {\n content: ' ';\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n border: ${size}px solid ${color};\n border-top-left-radius: ${borderRadius};\n border-top-right-radius: ${borderRadius};\n border-bottom-left-radius: ${borderRadius};\n border-bottom-right-radius: ${borderRadius};\n pointer-events: none;\n z-index: ${zIndex};\n }\n`;\n\nconst commonPillWrapperCss = css`\n height: 24px;\n position: relative;\n\n width: fit-content;\n\n background-color: ${(props) => props.theme.colors.brand[200]};\n\n outline: none;\n\n white-space: nowrap;\n\n padding: 0px 12px 0 12px;\n border-radius: 12px;\n\n font-size: 13px;\n line-height: 1;\n color: ${(props) => props.theme.colors.brand[800]};\n ${(props) => borderOutside(props.theme.colors.brand[300])};\n`;\n\n// =============================================================================\n// Pills wrappers\n// =============================================================================\n\nexport const StyledLabelPillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n padding-left: ${(props) => (props.hasIcon ? '0px !important' : '12px')};\n`;\n\nexport const StyledValuePillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.regular};\n padding-left: ${(props) => (props.hasIcon ? '0px !important' : '12px')};\n`;\n\nexport const StyledInputPillWrapper = styled(Grid)<{ value: string; inputWidth: number; inputHasFocus: boolean }>`\n ${commonPillWrapperCss}\n\n background: ${(props) => props.theme.colors.neutral['000']};\n padding: 0;\n\n ${({ value, theme }) => borderOutside(value === '' ? theme.colors.neutral[400] : theme.colors.brand[500])}\n\n :focus-within {\n ${(props) => (props.inputHasFocus ? borderOutside(props.theme.colors.brand[700], 2) : '')}\n }\n\n :active {\n ${(props) => (props.inputHasFocus ? borderOutside(props.theme.colors.brand[500]) : '')}\n }\n\n & .em-ds-input {\n outline: none !important;\n border: none !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n height: 100%;\n background: transparent;\n width: ${(props) => `${props.inputWidth + (props.value === '' ? 24 : 0)}px`};\n padding: 0;\n margin: 0 0 0 8px;\n }\n\n & .em-ds-input__tooltip-ref {\n height: 100%;\n }\n`;\n\nexport const StyledDropdownPillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n\n padding: 0 0 0 12px;\n`;\n\nexport const StyledReadonlyPillWrapper = styled(Grid)<{ hasIconRight: boolean; hasIconLeft: boolean }>`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n padding-right: ${(props) => (props.hasIconRight ? '0 !important' : '12px')};\n padding-left: ${(props) => (props.hasIconLeft ? '0 !important' : '12px')};\n`;\n\nexport const StyledRemovablePillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.regular};\n padding: 0 0 0 12px;\n`;\n\n// =============================================================================\n// Pill group\n// =============================================================================\n\nexport const StyledPillGroup = styled(Grid)`\n width: ${({ width }) => width};\n\n // Pill edges\n & .ds-pill-wrapper {\n &:not(:first-of-type) {\n &,\n :after,\n :before,\n .ds-pill-tooltip-value:after {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n }\n }\n &:not(:last-of-type) {\n &,\n :after,\n :before,\n .ds-pill-tooltip-value:after {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n }\n\n // Pill paddings to the left / right\n & .ds-pill-wrapper-label,\n & .ds-pill-wrapper-value,\n & .ds-pill-wrapper-readonly {\n &:not(:first-of-type) {\n padding-left: 8px;\n }\n &:not(:last-of-type) {\n padding-right: 8px;\n }\n }\n\n & .ds-pill-wrapper-removable:not(:first-of-type) {\n padding-left: 8px;\n }\n\n & .ds-pill-wrapper-dropdown:not(:first-of-type) {\n padding-left: 8px;\n }\n\n & .ds-pill-wrapper {\n :not(:first-of-type) {\n .ds-pill-button-left {\n border-radius: 0px;\n }\n .ds-pill-button-only {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n }\n }\n :not(:last-of-type) {\n .ds-pill-button-right {\n border-radius: 0px;\n }\n .ds-pill-button-only {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n }\n`;\n\n// =============================================================================\n// Extra stuff\n// =============================================================================\n\nexport const StyledSpanWithTooltip = styled.span`\n outline: none;\n :focus {\n ${(props) => borderOutside(props.theme.colors.brand[700], 2, 3)}\n }\n`;\n\nexport const StyledPillButton = styled(DSButtonV2)<{ width: string; height: string }>`\n display: grid;\n place-items: center;\n\n position: relative;\n\n padding: 0;\n width: ${(props) => props.width};\n height: ${(props) => props.height};\n\n border-radius: 12px;\n\n :focus {\n ${(props) => borderOutside(props.theme.colors.brand[700], 2, 3, 'inherit')}\n }\n\n cursor: pointer;\n`;\n"],"names":["borderOutside","color","size","zIndex","borderRadius","css","commonPillWrapperCss","props","theme","colors","brand","StyledLabelPillWrapper","styled","Grid","fontWeights","semibold","hasIcon","StyledValuePillWrapper","regular","StyledInputPillWrapper","neutral","value","inputHasFocus","inputWidth","StyledDropdownPillWrapper","StyledReadonlyPillWrapper","hasIconRight","hasIconLeft","StyledRemovablePillWrapper","StyledPillGroup","width","StyledSpanWithTooltip","span","StyledPillButton","DSButtonV2","height"],"mappings":";;;;AAAA;AAMA;AACA;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/components/styled.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport styled, { css } from 'styled-components';\nimport Grid from '@elliemae/ds-grid';\nimport { DSButtonV2 } from '@elliemae/ds-button';\n\n// =============================================================================\n// Common CSS\n// =============================================================================\n\nconst borderOutside = (color: string, size = 1, zIndex = 2, borderRadius = '12px') => css`\n :after {\n content: ' ';\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n border: ${size}px solid ${color};\n border-top-left-radius: ${borderRadius};\n border-top-right-radius: ${borderRadius};\n border-bottom-left-radius: ${borderRadius};\n border-bottom-right-radius: ${borderRadius};\n pointer-events: none;\n z-index: ${zIndex};\n }\n`;\n\nconst commonPillWrapperCss = css`\n height: 24px;\n position: relative;\n\n width: fit-content;\n\n background-color: ${(props) => props.theme.colors.brand[200]};\n\n outline: none;\n\n white-space: nowrap;\n\n padding: 0px 12px 0 12px;\n border-radius: 12px;\n\n font-size: 13px;\n line-height: 1;\n color: ${(props) => props.theme.colors.brand[800]};\n ${(props) => borderOutside(props.theme.colors.brand[300])};\n`;\n\n// =============================================================================\n// Pills wrappers\n// =============================================================================\n\nexport const StyledLabelPillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n padding-left: ${(props) => (props.hasIcon ? '0px !important' : '12px')};\n`;\n\nexport const StyledValuePillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.regular};\n padding-left: ${(props) => (props.hasIcon ? '0px !important' : '12px')};\n`;\n\nexport const StyledInputPillWrapper = styled(Grid)<{ value: string; inputWidth: number; inputHasFocus: boolean }>`\n ${commonPillWrapperCss}\n\n background: ${(props) => props.theme.colors.neutral['000']};\n padding: 0;\n\n ${({ value, theme }) => borderOutside(value === '' ? theme.colors.neutral[400] : theme.colors.brand[500])}\n\n :focus-within {\n ${(props) => (props.inputHasFocus ? borderOutside(props.theme.colors.brand[700], 2) : '')}\n }\n\n :active {\n ${(props) => (props.inputHasFocus ? borderOutside(props.theme.colors.brand[500]) : '')}\n }\n\n & .em-ds-input {\n outline: none !important;\n border: none !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n height: 100%;\n background: transparent;\n width: ${(props) => `${props.inputWidth + (props.value === '' ? 24 : 0)}px`};\n padding: 0;\n margin: 0 0 0 8px;\n }\n\n & .em-ds-input__tooltip-ref {\n height: 100%;\n }\n`;\n\nexport const StyledDropdownPillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n\n padding: 0 0 0 12px;\n`;\n\nexport const StyledReadonlyPillWrapper = styled(Grid)<{ hasIconRight: boolean; hasIconLeft: boolean }>`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n padding-right: ${(props) => (props.hasIconRight ? '0 !important' : '12px')};\n padding-left: ${(props) => (props.hasIconLeft ? '0 !important' : '12px')};\n`;\n\nexport const StyledRemovablePillWrapper = styled(Grid)`\n ${commonPillWrapperCss}\n font-weight: ${(props) => props.theme.fontWeights.regular};\n padding: 0 0 0 12px;\n`;\n\n// =============================================================================\n// Pill group\n// =============================================================================\n\nexport const StyledPillGroup = styled(Grid)`\n width: ${({ width }) => width};\n\n // Pill edges\n & .ds-pill-wrapper {\n &:not(:first-of-type) {\n &,\n :after,\n :before,\n .ds-pill-tooltip-value:after {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n }\n }\n &:not(:last-of-type) {\n &,\n :after,\n :before,\n .ds-pill-tooltip-value:after {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n }\n\n // Pill paddings to the left / right\n & .ds-pill-wrapper-label,\n & .ds-pill-wrapper-value,\n & .ds-pill-wrapper-readonly {\n &:not(:first-of-type) {\n padding-left: 8px;\n }\n &:not(:last-of-type) {\n padding-right: 8px;\n }\n }\n\n & .ds-pill-wrapper-removable:not(:first-of-type) {\n padding-left: 8px;\n }\n\n & .ds-pill-wrapper-dropdown:not(:first-of-type) {\n padding-left: 8px;\n }\n\n & .ds-pill-wrapper {\n :not(:first-of-type) {\n .ds-pill-button-left {\n border-radius: 0px;\n }\n .ds-pill-button-only {\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n }\n }\n :not(:last-of-type) {\n .ds-pill-button-right {\n border-radius: 0px;\n }\n .ds-pill-button-only {\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n }\n`;\n\n// =============================================================================\n// Extra stuff\n// =============================================================================\n\nexport const StyledSpanWithTooltip = styled.span`\n outline: none;\n :focus {\n ${(props) => borderOutside(props.theme.colors.brand[700], 2, 3)}\n }\n`;\n\nexport const StyledPillButton = styled(DSButtonV2)<{ width: string; height: string }>`\n display: grid;\n place-items: center;\n\n position: relative;\n\n padding: 0;\n width: ${(props) => props.width};\n height: ${(props) => props.height};\n\n border-radius: 12px;\n\n :focus {\n ${(props) => borderOutside(props.theme.colors.brand[700], 2, 3, 'inherit')}\n }\n\n cursor: pointer;\n`;\n"],"names":["borderOutside","color","size","zIndex","borderRadius","css","commonPillWrapperCss","props","theme","colors","brand","StyledLabelPillWrapper","styled","Grid","fontWeights","semibold","hasIcon","StyledValuePillWrapper","regular","StyledInputPillWrapper","neutral","value","inputHasFocus","inputWidth","StyledDropdownPillWrapper","StyledReadonlyPillWrapper","hasIconRight","hasIconLeft","StyledRemovablePillWrapper","StyledPillGroup","width","StyledSpanWithTooltip","span","StyledPillButton","DSButtonV2","height"],"mappings":";;;;AAAA;AAMA;AACA;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;EAAA,IAAgBC,IAAhB,uEAAuB,CAAvB;EAAA,IAA0BC,MAA1B,uEAAmC,CAAnC;EAAA,IAAsCC,YAAtC,uEAAqD,MAArD;EAAA,OAAgEC,GAAhE,qQAQRH,IARQ,EAQQD,KARR,EASQG,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AN,GAAoB,cAApB,GAAqC,MAAjD;AAAA,CAJoB;IAOzBC,0BAA0B,gBAAGhB,MAAM,CAACC,IAAD,CAAT;EAAA;AAAA,kDACnCP,oBADmC,EAEtB,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYM,WAAZ,CAAwBI,OAAnC;AAAA,CAFsB;AAOvC;AACA;;IAEaW,eAAe,gBAAGjB,MAAM,CAACC,IAAD,CAAT;EAAA;AAAA,23BACjB;EAAA,IAAGiB,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAf;AAAA,CADiB;AAoE5B;AACA;;IAEaC,qBAAqB,gBAAGnB,MAAM,CAACoB,IAAV;EAAA;AAAA,kCAG5B,UAACzB,KAAD;EAAA,OAAWP,aAAa,CAACO,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAD,EAAgC,CAAhC,EAAmC,CAAnC,CAAxB;AAAA,CAH4B;IAOrBuB,gBAAgB,gBAAGrB,MAAM,CAACsB,UAAD,CAAT;EAAA;AAAA,0IAOlB,UAAC3B,KAAD;EAAA,OAAWA,KAAK,CAACuB,KAAjB;AAAA,CAPkB,EAQjB,UAACvB,KAAD;EAAA,OAAWA,KAAK,CAAC4B,MAAjB;AAAA,CARiB,EAavB,UAAC5B,KAAD;EAAA,OAAWP,aAAa,CAACO,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAD,EAAgC,CAAhC,EAAmC,CAAnC,EAAsC,SAAtC,CAAxB;AAAA,CAbuB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownPill.js","sources":["../../../../src/components/types/DropdownPill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useMemo, useRef } from 'react';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { uid } from 'uid';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { StyledDropdownPillWrapper } from '../styled';\nimport type { DSPillProps } from '../../index.d';\nimport { setMultipleRefs } from '../../utils';\nimport { DSPillButton } from '../PillButton';\n\nexport const DropdownPill = React.memo<DSPillProps>(\n ({ label, labelTruncated, dropdownProps, innerRef, ariaLabel, onDropdownClick }) => {\n const chevronRef = useRef(null);\n\n const pillUid = useMemo(() => `ds-pill-${uid()}`, []);\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledDropdownPillWrapper\n id={pillUid}\n className=\"ds-pill-wrapper ds-pill-wrapper-dropdown\"\n data-testid=\"ds-pill-wrapper\"\n cols={['auto', '24px']}\n gutter=\"2px\"\n alignItems=\"center\"\n justifyItems=\"center\"\n >\n <TextComponent>{label}</TextComponent>\n <DSDropdownMenuV2\n {...dropdownProps}\n onClickOutside={(e) => {\n if (e.code === 'Escape') chevronRef.current.focus();\n if (dropdownProps.onClickOutside) dropdownProps.onClickOutside(e);\n }}\n wrapperStyles={{ width: '100%', height: '100%' }}\n >\n <DSPillButton\n className=\"ds-pill-focus-point\"\n data-testid=\"ds-pill-dropdown-chevron\"\n innerRef={setMultipleRefs(chevronRef, innerRef)}\n aria-label={ariaLabel || label}\n type=\"right\"\n onClick={onDropdownClick}\n >\n <ChevronSmallDown color={['brand-primary', '800']} size=\"s\" />\n </DSPillButton>\n </DSDropdownMenuV2>\n </StyledDropdownPillWrapper>\n );\n },\n);\n"],"names":["DropdownPill","React","memo","label","labelTruncated","dropdownProps","innerRef","ariaLabel","onDropdownClick","chevronRef","useRef","pillUid","useMemo","uid","TextComponent","children","Fragment","e","code","current","focus","onClickOutside","width","height","setMultipleRefs"],"mappings":";;;;;;;;;;;;;;;;;;IAWaA,YAAY,gBAAGC,KAAK,CAACC,IAAN,CAC1B,gBAAoF;
|
|
1
|
+
{"version":3,"file":"DropdownPill.js","sources":["../../../../src/components/types/DropdownPill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useMemo, useRef } from 'react';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { uid } from 'uid';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { StyledDropdownPillWrapper } from '../styled';\nimport type { DSPillProps } from '../../index.d';\nimport { setMultipleRefs } from '../../utils';\nimport { DSPillButton } from '../PillButton';\n\nexport const DropdownPill = React.memo<DSPillProps>(\n ({ label, labelTruncated, dropdownProps, innerRef, ariaLabel, onDropdownClick }) => {\n const chevronRef = useRef(null);\n\n const pillUid = useMemo(() => `ds-pill-${uid()}`, []);\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledDropdownPillWrapper\n id={pillUid}\n className=\"ds-pill-wrapper ds-pill-wrapper-dropdown\"\n data-testid=\"ds-pill-wrapper\"\n cols={['auto', '24px']}\n gutter=\"2px\"\n alignItems=\"center\"\n justifyItems=\"center\"\n >\n <TextComponent>{label}</TextComponent>\n <DSDropdownMenuV2\n {...dropdownProps}\n onClickOutside={(e) => {\n if (e.code === 'Escape') chevronRef.current.focus();\n if (dropdownProps.onClickOutside) dropdownProps.onClickOutside(e);\n }}\n wrapperStyles={{ width: '100%', height: '100%' }}\n >\n <DSPillButton\n className=\"ds-pill-focus-point\"\n data-testid=\"ds-pill-dropdown-chevron\"\n innerRef={setMultipleRefs(chevronRef, innerRef)}\n aria-label={ariaLabel || label}\n type=\"right\"\n onClick={onDropdownClick}\n >\n <ChevronSmallDown color={['brand-primary', '800']} size=\"s\" />\n </DSPillButton>\n </DSDropdownMenuV2>\n </StyledDropdownPillWrapper>\n );\n },\n);\n"],"names":["DropdownPill","React","memo","label","labelTruncated","dropdownProps","innerRef","ariaLabel","onDropdownClick","chevronRef","useRef","pillUid","useMemo","uid","TextComponent","children","Fragment","e","code","current","focus","onClickOutside","width","height","setMultipleRefs"],"mappings":";;;;;;;;;;;;;;;;;;IAWaA,YAAY,gBAAGC,KAAK,CAACC,IAAN,CAC1B,gBAAoF;EAAA,IAAjFC,KAAiF,QAAjFA,KAAiF;MAA1EC,cAA0E,QAA1EA,cAA0E;MAA1DC,aAA0D,QAA1DA,aAA0D;MAA3CC,QAA2C,QAA3CA,QAA2C;MAAjCC,SAAiC,QAAjCA,SAAiC;MAAtBC,eAAsB,QAAtBA,eAAsB;EAClF,IAAMC,UAAU,GAAGC,MAAM,CAAC,IAAD,CAAzB;EAEA,IAAMC,OAAO,GAAGC,OAAO,CAAC;IAAA,yBAAiBC,GAAG,EAApB;GAAD,EAA2B,EAA3B,CAAvB;EAEA,IAAMC,aAAa,GAAGV,cAAc,GAChC;IAAA,IAAGW,QAAH,SAAGA,QAAH;IAAA,oBAAkB,oBAAC,0BAAD;MAA4B,KAAK,EAAEA;MAArD;GADgC,GAEhCd,KAAK,CAACe,QAFV;EAIA,oBACE,oBAAC,yBAAD;IACE,EAAE,EAAEL,OADN;IAEE,SAAS,EAAC,0CAFZ;IAGE,eAAY,iBAHd;IAIE,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CAJR;IAKE,MAAM,EAAC,KALT;IAME,UAAU,EAAC,QANb;IAOE,YAAY,EAAC;kBAEb,oBAAC,aAAD,QAAgBR,KAAhB,CATF,eAUE,oBAAC,gBAAD,eACME,aADN;IAEE,cAAc,EAAE,wBAACY,CAAD,EAAO;MACrB,IAAIA,CAAC,CAACC,IAAF,KAAW,QAAf,EAAyBT,UAAU,CAACU,OAAX,CAAmBC,KAAnB;MACzB,IAAIf,aAAa,CAACgB,cAAlB,EAAkChB,aAAa,CAACgB,cAAd,CAA6BJ,CAA7B;KAJtC;IAME,aAAa,EAAE;MAAEK,KAAK,EAAE,MAAT;MAAiBC,MAAM,EAAE;;mBAExC,oBAAC,YAAD;IACE,SAAS,EAAC,qBADZ;IAEE,eAAY,0BAFd;IAGE,QAAQ,EAAEC,eAAe,CAACf,UAAD,EAAaH,QAAb,CAH3B;IAIE,cAAYC,SAAS,IAAIJ,KAJ3B;IAKE,IAAI,EAAC,OALP;IAME,OAAO,EAAEK;kBAET,oBAAC,gBAAD;IAAkB,KAAK,EAAE,CAAC,eAAD,EAAkB,KAAlB,CAAzB;IAAmD,IAAI,EAAC;IAR1D,CARF,CAVF,CADF;AAgCD,CA1CyB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPill.js","sources":["../../../../src/components/types/InputPill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { uid } from 'uid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledInputPillWrapper } from '../styled';\nimport { setMultipleRefs } from '../../utils';\nimport { DSPillButton } from '../PillButton';\n\nexport const InputPill = React.memo<DSPillProps>(\n ({ label, inputPlaceholder, inputWidth, inputRender, onInputChange, onInputClear, innerRef }) => {\n const ref = useRef<HTMLElement>(null);\n\n const InputComponent = useMemo(() => inputRender, [inputRender]);\n\n const pillUid = useMemo(() => `ds-pill-${uid()}`, []);\n\n const onCloseIconClick: React.MouseEventHandler & React.KeyboardEventHandler = useCallback(\n (e) => {\n if ([undefined, 'Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n onInputClear(e);\n ref.current.focus();\n }\n },\n [onInputClear],\n );\n\n const [inputHasFocus, setInputHasFocus] = useState(false);\n\n return (\n <StyledInputPillWrapper\n className=\"ds-pill-wrapper\"\n data-testid=\"ds-pill-wrapper\"\n cols={label === '' ? ['auto'] : ['auto', '24px']}\n inputWidth={inputWidth}\n value={label}\n inputHasFocus={inputHasFocus}\n >\n <InputComponent\n id={pillUid}\n className=\"ds-pill-focus-point\"\n data-testid=\"ds-pill-input\"\n innerRef={setMultipleRefs(ref, innerRef)}\n value={label}\n onChange={onInputChange}\n placeholder={inputPlaceholder}\n onFocus={() => setInputHasFocus(true)}\n onBlur={() => setInputHasFocus(false)}\n disableTooltip={false}\n />\n {label !== '' && (\n <DSPillButton\n id={pillUid}\n data-testid=\"ds-pill-clear-icon\"\n innerRef={innerRef}\n onClick={onCloseIconClick}\n onKeyDown={onCloseIconClick}\n aria-label=\"Clear input\"\n type=\"right\"\n >\n <CloseXsmall size=\"s\" color={['brand-primary', '700']} />\n </DSPillButton>\n )}\n </StyledInputPillWrapper>\n );\n },\n);\n"],"names":["InputPill","React","memo","label","inputPlaceholder","inputWidth","inputRender","onInputChange","onInputClear","innerRef","ref","useRef","InputComponent","useMemo","pillUid","uid","onCloseIconClick","useCallback","e","undefined","includes","code","preventDefault","current","focus","useState","inputHasFocus","setInputHasFocus","setMultipleRefs"],"mappings":";;;;;;;;;;;;;;;;;IASaA,SAAS,gBAAGC,KAAK,CAACC,IAAN,CACvB,gBAAiG;
|
|
1
|
+
{"version":3,"file":"InputPill.js","sources":["../../../../src/components/types/InputPill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { uid } from 'uid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledInputPillWrapper } from '../styled';\nimport { setMultipleRefs } from '../../utils';\nimport { DSPillButton } from '../PillButton';\n\nexport const InputPill = React.memo<DSPillProps>(\n ({ label, inputPlaceholder, inputWidth, inputRender, onInputChange, onInputClear, innerRef }) => {\n const ref = useRef<HTMLElement>(null);\n\n const InputComponent = useMemo(() => inputRender, [inputRender]);\n\n const pillUid = useMemo(() => `ds-pill-${uid()}`, []);\n\n const onCloseIconClick: React.MouseEventHandler & React.KeyboardEventHandler = useCallback(\n (e) => {\n if ([undefined, 'Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n onInputClear(e);\n ref.current.focus();\n }\n },\n [onInputClear],\n );\n\n const [inputHasFocus, setInputHasFocus] = useState(false);\n\n return (\n <StyledInputPillWrapper\n className=\"ds-pill-wrapper\"\n data-testid=\"ds-pill-wrapper\"\n cols={label === '' ? ['auto'] : ['auto', '24px']}\n inputWidth={inputWidth}\n value={label}\n inputHasFocus={inputHasFocus}\n >\n <InputComponent\n id={pillUid}\n className=\"ds-pill-focus-point\"\n data-testid=\"ds-pill-input\"\n innerRef={setMultipleRefs(ref, innerRef)}\n value={label}\n onChange={onInputChange}\n placeholder={inputPlaceholder}\n onFocus={() => setInputHasFocus(true)}\n onBlur={() => setInputHasFocus(false)}\n disableTooltip={false}\n />\n {label !== '' && (\n <DSPillButton\n id={pillUid}\n data-testid=\"ds-pill-clear-icon\"\n innerRef={innerRef}\n onClick={onCloseIconClick}\n onKeyDown={onCloseIconClick}\n aria-label=\"Clear input\"\n type=\"right\"\n >\n <CloseXsmall size=\"s\" color={['brand-primary', '700']} />\n </DSPillButton>\n )}\n </StyledInputPillWrapper>\n );\n },\n);\n"],"names":["InputPill","React","memo","label","inputPlaceholder","inputWidth","inputRender","onInputChange","onInputClear","innerRef","ref","useRef","InputComponent","useMemo","pillUid","uid","onCloseIconClick","useCallback","e","undefined","includes","code","preventDefault","current","focus","useState","inputHasFocus","setInputHasFocus","setMultipleRefs"],"mappings":";;;;;;;;;;;;;;;;;IASaA,SAAS,gBAAGC,KAAK,CAACC,IAAN,CACvB,gBAAiG;EAAA,IAA9FC,KAA8F,QAA9FA,KAA8F;MAAvFC,gBAAuF,QAAvFA,gBAAuF;MAArEC,UAAqE,QAArEA,UAAqE;MAAzDC,WAAyD,QAAzDA,WAAyD;MAA5CC,aAA4C,QAA5CA,aAA4C;MAA7BC,YAA6B,QAA7BA,YAA6B;MAAfC,QAAe,QAAfA,QAAe;EAC/F,IAAMC,GAAG,GAAGC,MAAM,CAAc,IAAd,CAAlB;EAEA,IAAMC,cAAc,GAAGC,OAAO,CAAC;IAAA,OAAMP,WAAN;GAAD,EAAoB,CAACA,WAAD,CAApB,CAA9B;EAEA,IAAMQ,OAAO,GAAGD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ALb;IAME,cAAW,aANb;IAOE,IAAI,EAAC;kBAEL,oBAAC,WAAD;IAAa,IAAI,EAAC,GAAlB;IAAsB,KAAK,EAAE,CAAC,eAAD,EAAkB,KAAlB;IAT/B,CArBJ,CADF;AAoCD,CAzDsB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelPill.js","sources":["../../../../src/components/types/LabelPill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledLabelPillWrapper } from '../styled';\n\nexport const LabelPill = React.memo<DSPillProps>(({ label, labelTruncated, iconLeft, ariaLabel }) => {\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n return (\n <StyledLabelPillWrapper\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-label\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', 'auto'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIcon={iconLeft !== null}\n >\n {iconLeft}\n <TextComponent>{label}</TextComponent>\n </StyledLabelPillWrapper>\n );\n});\n"],"names":["LabelPill","React","memo","label","labelTruncated","iconLeft","ariaLabel","TextComponent","children","Fragment","filter","notFalse"],"mappings":";;;;;;;AAAA;IAMaA,SAAS,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAAoD;
|
|
1
|
+
{"version":3,"file":"LabelPill.js","sources":["../../../../src/components/types/LabelPill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledLabelPillWrapper } from '../styled';\n\nexport const LabelPill = React.memo<DSPillProps>(({ label, labelTruncated, iconLeft, ariaLabel }) => {\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n return (\n <StyledLabelPillWrapper\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-label\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', 'auto'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIcon={iconLeft !== null}\n >\n {iconLeft}\n <TextComponent>{label}</TextComponent>\n </StyledLabelPillWrapper>\n );\n});\n"],"names":["LabelPill","React","memo","label","labelTruncated","iconLeft","ariaLabel","TextComponent","children","Fragment","filter","notFalse"],"mappings":";;;;;;;AAAA;IAMaA,SAAS,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAAoD;EAAA,IAAjDC,KAAiD,QAAjDA,KAAiD;MAA1CC,cAA0C,QAA1CA,cAA0C;MAA1BC,QAA0B,QAA1BA,QAA0B;MAAhBC,SAAgB,QAAhBA,SAAgB;EACnG,IAAMC,aAAa,GAAGH,cAAc,GAChC;IAAA,IAAGI,QAAH,SAAGA,QAAH;IAAA,oBAAkB,oBAAC,0BAAD;MAA4B,KAAK,EAAEA;MAArD;GADgC,GAEhCP,KAAK,CAACQ,QAFV;EAGA,oBACE,oBAAC,sBAAD;IACE,UAAU,EAAC,QADb;IAEE,SAAS,EAAC,uCAFZ;IAGE,eAAY,iBAHd;IAIE,cAAYH,SAAS,IAAIH,KAJ3B;IAKE,IAAI,EAAE,CAACE,QAAQ,IAAI,aAAb,EAA4B,MAA5B,EAAoCK,MAApC,CAA2C,UAACC,QAAD;MAAA,OAAcA,QAAd;KAA3C,CALR;IAME,MAAM,EAAC,MANT;IAOE,OAAO,EAAEN,QAAQ,KAAK;KAErBA,QATH,eAUE,oBAAC,aAAD,QAAgBF,KAAhB,CAVF,CADF;AAcD,CAlBwB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadOnlyPill.js","sources":["../../../../src/components/types/ReadOnlyPill.tsx"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledReadonlyPillWrapper } from '../styled';\n\nexport const ReadOnlyPill = React.memo<DSPillProps>(({ label, labelTruncated, iconLeft, iconRight, ariaLabel }) => {\n const hasIconLeft = iconLeft !== null || (iconRight !== null && label === '');\n const hasIconRight = iconRight !== null || (iconLeft !== null && label === '');\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledReadonlyPillWrapper\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-readonly\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', label && 'auto', iconRight && 'min-content'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIconRight={hasIconRight}\n hasIconLeft={hasIconLeft}\n >\n {iconLeft}\n {label ? <TextComponent>{label}</TextComponent> : null}\n {iconRight}\n </StyledReadonlyPillWrapper>\n );\n});\n"],"names":["ReadOnlyPill","React","memo","label","labelTruncated","iconLeft","iconRight","ariaLabel","hasIconLeft","hasIconRight","TextComponent","children","Fragment","filter","notFalse"],"mappings":";;;;;;;AAAA;IAOaA,YAAY,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAA+D;
|
|
1
|
+
{"version":3,"file":"ReadOnlyPill.js","sources":["../../../../src/components/types/ReadOnlyPill.tsx"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledReadonlyPillWrapper } from '../styled';\n\nexport const ReadOnlyPill = React.memo<DSPillProps>(({ label, labelTruncated, iconLeft, iconRight, ariaLabel }) => {\n const hasIconLeft = iconLeft !== null || (iconRight !== null && label === '');\n const hasIconRight = iconRight !== null || (iconLeft !== null && label === '');\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledReadonlyPillWrapper\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-readonly\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', label && 'auto', iconRight && 'min-content'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIconRight={hasIconRight}\n hasIconLeft={hasIconLeft}\n >\n {iconLeft}\n {label ? <TextComponent>{label}</TextComponent> : null}\n {iconRight}\n </StyledReadonlyPillWrapper>\n );\n});\n"],"names":["ReadOnlyPill","React","memo","label","labelTruncated","iconLeft","iconRight","ariaLabel","hasIconLeft","hasIconRight","TextComponent","children","Fragment","filter","notFalse"],"mappings":";;;;;;;AAAA;IAOaA,YAAY,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAA+D;EAAA,IAA5DC,KAA4D,QAA5DA,KAA4D;MAArDC,cAAqD,QAArDA,cAAqD;MAArCC,QAAqC,QAArCA,QAAqC;MAA3BC,SAA2B,QAA3BA,SAA2B;MAAhBC,SAAgB,QAAhBA,SAAgB;EACjH,IAAMC,WAAW,GAAGH,QAAQ,KAAK,IAAb,IAAsBC,SAAS,KAAK,IAAd,IAAsBH,KAAK,KAAK,EAA1E;EACA,IAAMM,YAAY,GAAGH,SAAS,KAAK,IAAd,IAAuBD,QAAQ,KAAK,IAAb,IAAqBF,KAAK,KAAK,EAA3E;EAEA,IAAMO,aAAa,GAAGN,cAAc,GAChC;IAAA,IAAGO,QAAH,SAAGA,QAAH;IAAA,oBAAkB,oBAAC,0BAAD;MAA4B,KAAK,EAAEA;MAArD;GADgC,GAEhCV,KAAK,CAACW,QAFV;EAIA,oBACE,oBAAC,yBAAD;IACE,UAAU,EAAC,QADb;IAEE,SAAS,EAAC,0CAFZ;IAGE,eAAY,iBAHd;IAIE,cAAYL,SAAS,IAAIJ,KAJ3B;IAKE,IAAI,EAAE,CAACE,QAAQ,IAAI,aAAb,EAA4BF,KAAK,IAAI,MAArC,EAA6CG,SAAS,IAAI,aAA1D,EAAyEO,MAAzE,CAAgF,UAACC,QAAD;MAAA,OAAcA,QAAd;KAAhF,CALR;IAME,MAAM,EAAC,MANT;IAOE,YAAY,EAAEL,YAPhB;IAQE,WAAW,EAAED;KAEZH,QAVH,EAWGF,KAAK,gBAAG,oBAAC,aAAD,QAAgBA,KAAhB,CAAH,GAA4C,IAXpD,EAYGG,SAZH,CADF;AAgBD,CAxB2B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemovablePill.js","sources":["../../../../src/components/types/RemovablePill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { uid } from 'uid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledRemovablePillWrapper } from '../styled';\nimport { DSPillGroupV2Context } from '../PillGroup';\nimport { DSPillButton } from '../PillButton';\n\nexport const RemovablePill = React.memo<DSPillProps>(({ label, labelTruncated, onRemove, innerRef, ariaLabel }) => {\n const { onKeyboardRemove } = useContext(DSPillGroupV2Context);\n const pillUid = useMemo(() => `ds-pill-${uid()}`, []);\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n const onKeyDown: React.MouseEventHandler & React.KeyboardEventHandler = useCallback(\n (e) => {\n if (['Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n if (onKeyboardRemove) onKeyboardRemove(pillUid);\n onRemove(e);\n }\n },\n [onKeyboardRemove, onRemove, pillUid],\n );\n\n return (\n <StyledRemovablePillWrapper\n cols={['auto', '24px']}\n gutter=\"2px\"\n alignItems=\"center\"\n justifyItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-removable\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n >\n <TextComponent>{label}</TextComponent>\n <DSPillButton\n className=\"ds-pill-focus-point\"\n id={pillUid}\n data-testid=\"ds-pill-close-icon\"\n innerRef={innerRef}\n onClick={onRemove}\n onKeyDown={onKeyDown}\n aria-label={`Remove ${label}`}\n type=\"right\"\n >\n <CloseXsmall size=\"s\" color={['brand-primary', '700']} />\n </DSPillButton>\n </StyledRemovablePillWrapper>\n );\n});\n"],"names":["RemovablePill","React","memo","label","labelTruncated","onRemove","innerRef","ariaLabel","useContext","DSPillGroupV2Context","onKeyboardRemove","pillUid","useMemo","uid","TextComponent","children","Fragment","onKeyDown","useCallback","e","includes","code","preventDefault"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;IAUaA,aAAa,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAA8D;
|
|
1
|
+
{"version":3,"file":"RemovablePill.js","sources":["../../../../src/components/types/RemovablePill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { uid } from 'uid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledRemovablePillWrapper } from '../styled';\nimport { DSPillGroupV2Context } from '../PillGroup';\nimport { DSPillButton } from '../PillButton';\n\nexport const RemovablePill = React.memo<DSPillProps>(({ label, labelTruncated, onRemove, innerRef, ariaLabel }) => {\n const { onKeyboardRemove } = useContext(DSPillGroupV2Context);\n const pillUid = useMemo(() => `ds-pill-${uid()}`, []);\n\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n const onKeyDown: React.MouseEventHandler & React.KeyboardEventHandler = useCallback(\n (e) => {\n if (['Enter', 'Space'].includes(e.code)) {\n e.preventDefault();\n if (onKeyboardRemove) onKeyboardRemove(pillUid);\n onRemove(e);\n }\n },\n [onKeyboardRemove, onRemove, pillUid],\n );\n\n return (\n <StyledRemovablePillWrapper\n cols={['auto', '24px']}\n gutter=\"2px\"\n alignItems=\"center\"\n justifyItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-removable\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n >\n <TextComponent>{label}</TextComponent>\n <DSPillButton\n className=\"ds-pill-focus-point\"\n id={pillUid}\n data-testid=\"ds-pill-close-icon\"\n innerRef={innerRef}\n onClick={onRemove}\n onKeyDown={onKeyDown}\n aria-label={`Remove ${label}`}\n type=\"right\"\n >\n <CloseXsmall size=\"s\" color={['brand-primary', '700']} />\n </DSPillButton>\n </StyledRemovablePillWrapper>\n );\n});\n"],"names":["RemovablePill","React","memo","label","labelTruncated","onRemove","innerRef","ariaLabel","useContext","DSPillGroupV2Context","onKeyboardRemove","pillUid","useMemo","uid","TextComponent","children","Fragment","onKeyDown","useCallback","e","includes","code","preventDefault"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;IAUaA,aAAa,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAA8D;EAAA,IAA3DC,KAA2D,QAA3DA,KAA2D;MAApDC,cAAoD,QAApDA,cAAoD;MAApCC,QAAoC,QAApCA,QAAoC;MAA1BC,QAA0B,QAA1BA,QAA0B;MAAhBC,SAAgB,QAAhBA,SAAgB;;EACjH,kBAA6BC,UAAU,CAACC,oBAAD,CAAvC;MAAQC,gBAAR,eAAQA,gBAAR;;EACA,IAAMC,OAAO,GAAGC,OAAO,CAAC;IAAA,yBAAiBC,GAAG,EAApB;GAAD,EAA2B,EAA3B,CAAvB;EAEA,IAAMC,aAAa,GAAGV,cAAc,GAChC;IAAA,IAAGW,QAAH,SAAGA,QAAH;IAAA,oBAAkB,oBAAC,0BAAD;MAA4B,KAAK,EAAEA;MAArD;GADgC,GAEhCd,KAAK,CAACe,QAFV;EAIA,IAAMC,SAA+D,GAAGC,WAAW,CACjF,UAACC,CAAD,EAAO;IACL,IAAI,CAAC,OAAD,EAAU,OAAV,EAAmBC,QAAnB,CAA4BD,CAAC,CAACE,IAA9B,CAAJ,EAAyC;MACvCF,CAAC,CAACG,cAAF;MACA,IAAIZ,gBAAJ,EAAsBA,gBAAgB,CAACC,OAAD,CAAhB;MACtBN,QAAQ,CAACc,CAAD,CAAR;;GAL6E,EAQjF,CAACT,gBAAD,EAAmBL,QAAnB,EAA6BM,OAA7B,CARiF,CAAnF;EAWA,oBACE,oBAAC,0BAAD;IACE,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADR;IAEE,MAAM,EAAC,KAFT;IAGE,UAAU,EAAC,QAHb;IAIE,YAAY,EAAC,QAJf;IAKE,SAAS,EAAC,2CALZ;IAME,eAAY,iBANd;IAOE,cAAYJ,SAAS,IAAIJ;kBAEzB,oBAAC,aAAD,QAAgBA,KAAhB,CATF,eAUE,oBAAC,YAAD;IACE,SAAS,EAAC,qBADZ;IAEE,EAAE,EAAEQ,OAFN;IAGE,eAAY,oBAHd;IAIE,QAAQ,EAAEL,QAJZ;IAKE,OAAO,EAAED,QALX;IAME,SAAS,EAAEY,SANb;IAOE,+BAAsBd,KAAtB,CAPF;IAQE,IAAI,EAAC;kBAEL,oBAAC,WAAD;IAAa,IAAI,EAAC,GAAlB;IAAsB,KAAK,EAAE,CAAC,eAAD,EAAkB,KAAlB;IAV/B,CAVF,CADF;AAyBD,CA5C4B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValuePill.js","sources":["../../../../src/components/types/ValuePill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { DSTooltipV2 } from '@elliemae/ds-tooltip';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledSpanWithTooltip, StyledValuePillWrapper } from '../styled';\n\nexport const ValuePill = React.memo<DSPillProps>(({ label, labelTruncated, tooltipValue, iconLeft, ariaLabel }) => {\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledValuePillWrapper\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-value\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', 'auto'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIcon={iconLeft !== null}\n >\n {iconLeft}\n {tooltipValue !== '' ? (\n <DSTooltipV2\n title={tooltipValue}\n triggerComponent={\n <StyledSpanWithTooltip className=\"ds-pill-tooltip-value\" tabIndex={0}>\n {label}\n </StyledSpanWithTooltip>\n }\n />\n ) : (\n <TextComponent>{label}</TextComponent>\n )}\n </StyledValuePillWrapper>\n );\n});\n"],"names":["ValuePill","React","memo","label","labelTruncated","tooltipValue","iconLeft","ariaLabel","TextComponent","children","Fragment","filter","notFalse"],"mappings":";;;;;;;;AAAA;IAOaA,SAAS,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAAkE;
|
|
1
|
+
{"version":3,"file":"ValuePill.js","sources":["../../../../src/components/types/ValuePill.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { DSTooltipV2 } from '@elliemae/ds-tooltip';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { DSPillProps } from '../../index.d';\nimport { StyledSpanWithTooltip, StyledValuePillWrapper } from '../styled';\n\nexport const ValuePill = React.memo<DSPillProps>(({ label, labelTruncated, tooltipValue, iconLeft, ariaLabel }) => {\n const TextComponent = labelTruncated\n ? ({ children }) => <SimpleTruncatedTooltipText value={children} />\n : React.Fragment;\n\n return (\n <StyledValuePillWrapper\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-value\"\n data-testid=\"ds-pill-wrapper\"\n aria-label={ariaLabel || label}\n cols={[iconLeft && 'min-content', 'auto'].filter((notFalse) => notFalse)}\n gutter=\"xxxs\"\n hasIcon={iconLeft !== null}\n >\n {iconLeft}\n {tooltipValue !== '' ? (\n <DSTooltipV2\n title={tooltipValue}\n triggerComponent={\n <StyledSpanWithTooltip className=\"ds-pill-tooltip-value\" tabIndex={0}>\n {label}\n </StyledSpanWithTooltip>\n }\n />\n ) : (\n <TextComponent>{label}</TextComponent>\n )}\n </StyledValuePillWrapper>\n );\n});\n"],"names":["ValuePill","React","memo","label","labelTruncated","tooltipValue","iconLeft","ariaLabel","TextComponent","children","Fragment","filter","notFalse"],"mappings":";;;;;;;;AAAA;IAOaA,SAAS,gBAAGC,KAAK,CAACC,IAAN,CAAwB,gBAAkE;EAAA,IAA/DC,KAA+D,QAA/DA,KAA+D;MAAxDC,cAAwD,QAAxDA,cAAwD;MAAxCC,YAAwC,QAAxCA,YAAwC;MAA1BC,QAA0B,QAA1BA,QAA0B;MAAhBC,SAAgB,QAAhBA,SAAgB;EACjH,IAAMC,aAAa,GAAGJ,cAAc,GAChC;IAAA,IAAGK,QAAH,SAAGA,QAAH;IAAA,oBAAkB,oBAAC,0BAAD;MAA4B,KAAK,EAAEA;MAArD;GADgC,GAEhCR,KAAK,CAACS,QAFV;EAIA,oBACE,oBAAC,sBAAD;IACE,UAAU,EAAC,QADb;IAEE,SAAS,EAAC,uCAFZ;IAGE,eAAY,iBAHd;IAIE,cAAYH,SAAS,IAAIJ,KAJ3B;IAKE,IAAI,EAAE,CAACG,QAAQ,IAAI,aAAb,EAA4B,MAA5B,EAAoCK,MAApC,CAA2C,UAACC,QAAD;MAAA,OAAcA,QAAd;KAA3C,CALR;IAME,MAAM,EAAC,MANT;IAOE,OAAO,EAAEN,QAAQ,KAAK;KAErBA,QATH,EAUGD,YAAY,KAAK,EAAjB,gBACC,oBAAC,WAAD;IACE,KAAK,EAAEA,YADT;IAEE,gBAAgB,eACd,oBAAC,qBAAD;MAAuB,SAAS,EAAC,uBAAjC;MAAyD,QAAQ,EAAE;OAChEF,KADH;IAJL,gBAUC,oBAAC,aAAD,QAAgBA,KAAhB,CApBJ,CADF;AAyBD,CA9BwB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownPill.js","sources":["../../../src/deprecated/DropdownPill.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport { Pill } from './Pill';\n\nfunction DropdownPill({\n containerProps = {},\n label = '',\n variant,\n tabIndex = -1,\n closeMenuOnItemSelection = false,\n maxWidth,\n minWidth,\n ...dropdownProps\n}) {\n const ref = useRef(null);\n const [chevronEl, chevronRef] = useState();\n const { focusFirst } = useFocusGroupItem(ref);\n return (\n <DSDropdownMenu\n {...dropdownProps}\n closeMenuOnItemSelection={closeMenuOnItemSelection}\n maxWidth={maxWidth}\n hideIfNotVisible\n menuProps={{ className: 'dropdown-pill-menu', zIndex: 100 }}\n minWidth={minWidth}\n onClose={focusFirst}\n referenceNode={chevronEl}\n triggerComponent={\n <Pill\n data-testid=\"dropdown-pill\"\n className=\"dropdown-pill\"\n containerProps={{ role: 'listbox', ...containerProps }}\n innerRef={ref}\n label={label}\n rightAddon={\n <div ref={chevronRef}>\n <ChevronDown className=\"dropdown-pill-chevron-down\" data-testid=\"dropdown-pill-button\" />\n </div>\n }\n tabIndex={tabIndex}\n variant={variant}\n />\n }\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 /** pill variant */\n variant: PropTypes.oneOf(['value', 'title']).description('pill variant'),\n /** html focus border */\n tabIndex: PropTypes.number.description('html focus order'),\n /** close menu on item selection */\n closeMenuOnItemSelection: PropTypes.bool.description('close menu on item selection'),\n /** pill max width */\n maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('pill max width'),\n /** pill min width */\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('pill min width'),\n};\n\nDropdownPill.propTypes = props;\nconst DSDropdownPillWithSchema = describe(DropdownPill);\nDSDropdownPillWithSchema.propTypes = props;\n\nexport { DropdownPill, DSDropdownPillWithSchema };\n"],"names":["DropdownPill","containerProps","label","variant","tabIndex","closeMenuOnItemSelection","maxWidth","minWidth","dropdownProps","ref","useRef","useState","chevronEl","chevronRef","useFocusGroupItem","focusFirst","className","zIndex","role","props","PropTypes","object","description","string","isRequired","oneOf","number","bool","oneOfType","propTypes","DSDropdownPillWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;AAOA,SAASA,YAAT,OASG;
|
|
1
|
+
{"version":3,"file":"DropdownPill.js","sources":["../../../src/deprecated/DropdownPill.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport { Pill } from './Pill';\n\nfunction DropdownPill({\n containerProps = {},\n label = '',\n variant,\n tabIndex = -1,\n closeMenuOnItemSelection = false,\n maxWidth,\n minWidth,\n ...dropdownProps\n}) {\n const ref = useRef(null);\n const [chevronEl, chevronRef] = useState();\n const { focusFirst } = useFocusGroupItem(ref);\n return (\n <DSDropdownMenu\n {...dropdownProps}\n closeMenuOnItemSelection={closeMenuOnItemSelection}\n maxWidth={maxWidth}\n hideIfNotVisible\n menuProps={{ className: 'dropdown-pill-menu', zIndex: 100 }}\n minWidth={minWidth}\n onClose={focusFirst}\n referenceNode={chevronEl}\n triggerComponent={\n <Pill\n data-testid=\"dropdown-pill\"\n className=\"dropdown-pill\"\n containerProps={{ role: 'listbox', ...containerProps }}\n innerRef={ref}\n label={label}\n rightAddon={\n <div ref={chevronRef}>\n <ChevronDown className=\"dropdown-pill-chevron-down\" data-testid=\"dropdown-pill-button\" />\n </div>\n }\n tabIndex={tabIndex}\n variant={variant}\n />\n }\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 /** pill variant */\n variant: PropTypes.oneOf(['value', 'title']).description('pill variant'),\n /** html focus border */\n tabIndex: PropTypes.number.description('html focus order'),\n /** close menu on item selection */\n closeMenuOnItemSelection: PropTypes.bool.description('close menu on item selection'),\n /** pill max width */\n maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('pill max width'),\n /** pill min width */\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('pill min width'),\n};\n\nDropdownPill.propTypes = props;\nconst DSDropdownPillWithSchema = describe(DropdownPill);\nDSDropdownPillWithSchema.propTypes = props;\n\nexport { DropdownPill, DSDropdownPillWithSchema };\n"],"names":["DropdownPill","containerProps","label","variant","tabIndex","closeMenuOnItemSelection","maxWidth","minWidth","dropdownProps","ref","useRef","useState","chevronEl","chevronRef","useFocusGroupItem","focusFirst","className","zIndex","role","props","PropTypes","object","description","string","isRequired","oneOf","number","bool","oneOfType","propTypes","DSDropdownPillWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;AAOA,SAASA,YAAT,OASG;EAAA,+BARDC,cAQC;MARDA,cAQC,oCARgB,EAQhB;wBAPDC,KAOC;MAPDA,KAOC,2BAPO,EAOP;MANDC,OAMC,QANDA,OAMC;2BALDC,QAKC;MALDA,QAKC,8BALU,CAAC,CAKX;mCAJDC,wBAIC;MAJDA,wBAIC,sCAJ0B,KAI1B;MAHDC,QAGC,QAHDA,QAGC;MAFDC,QAEC,QAFDA,QAEC;MADEC,aACF;;EACD,IAAMC,GAAG,GAAGC,MAAM,CAAC,IA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;;;EAYZhB,QAAQ,EAAEc,SAAS,CAACQ,SAAV,CAAoB,CAACR,SAAS,CAACG,MAAX,EAAmBH,SAAS,CAACM,MAA7B,CAApB,EAA0DJ,WAA1D,CAAsE,gBAAtE,CAZE;;;EAcZf,QAAQ,EAAEa,SAAS,CAACQ,SAAV,CAAoB,CAACR,SAAS,CAACG,MAAX,EAAmBH,SAAS,CAACM,MAA7B,CAApB,EAA0DJ,WAA1D,CAAsE,gBAAtE;AAdE,CAAd;AAiBAtB,YAAY,CAAC6B,SAAb,GAAyBV,KAAzB;IACMW,wBAAwB,GAAGC,QAAQ,CAAC/B,YAAD;AACzC8B,wBAAwB,CAACD,SAAzB,GAAqCV,KAArC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPill.js","sources":["../../../src/deprecated/InputPill.tsx"],"sourcesContent":["import React from 'react';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSInput, DSInputMask } from '@elliemae/ds-form';\nimport { Pill } from './Pill';\n\nconst StyledInputPill = aggregatedClasses(Pill)('input-pill', null, ({ value }) => ({\n value,\n}));\n\nexport function InputPill({\n containerProps = {},\n placeholder = 'Enter Value',\n onChange = () => {},\n onRemove,\n value,\n type,\n ...otherProps\n}) {\n let TypeOfInput = DSInput;\n // TODO: implement the DSTimeInput, see how because it returns a moment()\n // TODO: implement the DSDateInput\n switch (type) {\n case 'inputText':\n TypeOfInput = DSInput;\n break;\n case 'inputMask':\n TypeOfInput = DSInputMask;\n break;\n default:\n break;\n }\n\n return (\n <StyledInputPill\n className=\"input-pill\"\n classProps={{ value }}\n containerProps={containerProps}\n label={\n <TypeOfInput\n data-testid=\"input-pill\"\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n {...otherProps}\n />\n }\n rightAddon={\n value && <CloseXsmall className=\"remove-pill-button\" data-testid=\"remove-pill-button\" onClick={onRemove} />\n }\n tabIndex={-1}\n />\n );\n}\n"],"names":["StyledInputPill","aggregatedClasses","Pill","value","InputPill","containerProps","placeholder","onChange","onRemove","type","otherProps","TypeOfInput","DSInput","DSInputMask"],"mappings":";;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,iBAAiB,CAACC,IAAD,CAAjB,CAAwB,YAAxB,EAAsC,IAAtC,EAA4C;
|
|
1
|
+
{"version":3,"file":"InputPill.js","sources":["../../../src/deprecated/InputPill.tsx"],"sourcesContent":["import React from 'react';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSInput, DSInputMask } from '@elliemae/ds-form';\nimport { Pill } from './Pill';\n\nconst StyledInputPill = aggregatedClasses(Pill)('input-pill', null, ({ value }) => ({\n value,\n}));\n\nexport function InputPill({\n containerProps = {},\n placeholder = 'Enter Value',\n onChange = () => {},\n onRemove,\n value,\n type,\n ...otherProps\n}) {\n let TypeOfInput = DSInput;\n // TODO: implement the DSTimeInput, see how because it returns a moment()\n // TODO: implement the DSDateInput\n switch (type) {\n case 'inputText':\n TypeOfInput = DSInput;\n break;\n case 'inputMask':\n TypeOfInput = DSInputMask;\n break;\n default:\n break;\n }\n\n return (\n <StyledInputPill\n className=\"input-pill\"\n classProps={{ value }}\n containerProps={containerProps}\n label={\n <TypeOfInput\n data-testid=\"input-pill\"\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n {...otherProps}\n />\n }\n rightAddon={\n value && <CloseXsmall className=\"remove-pill-button\" data-testid=\"remove-pill-button\" onClick={onRemove} />\n }\n tabIndex={-1}\n />\n );\n}\n"],"names":["StyledInputPill","aggregatedClasses","Pill","value","InputPill","containerProps","placeholder","onChange","onRemove","type","otherProps","TypeOfInput","DSInput","DSInputMask"],"mappings":";;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,iBAAiB,CAACC,IAAD,CAAjB,CAAwB,YAAxB,EAAsC,IAAtC,EAA4C;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAgB;IAClFA,KAAK,EAALA;GADkE;AAAA,CAA5C,CAAxB;AAIO,SAASC,SAAT,QAQJ;EAAA,iCAPDC,cAOC;MAPDA,cAOC,qCAPgB,EAOhB;gCANDC,WAMC;MANDA,WAMC,kCANa,aAMb;6BALDC,QAKC;MALDA,QAKC,+BALU,YAAM,EAKhB;MAJDC,QAIC,SAJDA,QAIC;MAHDL,KAGC,SAHDA,KAGC;MAFDM,IAEC,SAFDA,IAEC;MADEC,UACF;;EACD,IAAIC,WAAW,GAAGC,OAAlB,CADC;;;EAID,QAAQH,IAAR;IACE,KAAK,WAAL;MACEE,WAAW,GAAGC,OAAd;MACA;;IACF,KAAK,WAAL;MACED,WAAW,GAAGE,WAAd;MACA;;;EAKJ,oBACE,oBAAC,eAAD;IACE,SAAS,EAAC,YADZ;IAEE,UAAU,EAAE;MAAEV,KAAK,EAALA;KAFhB;IAGE,cAAc,EAAEE,cAHlB;IAIE,KAAK,eACH,oBAAC,WAAD;MACE,eAAY,YADd;MAEE,QAAQ,EAAEE,QAFZ;MAGE,WAAW,EAAED,WAHf;MAIE,KAAK,EAAEH;OACHO,UALN,EALJ;IAaE,UAAU,EACRP,KAAK,iBAAI,oBAAC,WAAD;MAAa,SAAS,EAAC,oBAAvB;MAA4C,eAAY,oBAAxD;MAA6E,OAAO,EAAEK;MAdnG;IAgBE,QAAQ,EAAE,CAAC;IAjBf;AAoBD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledDropdownPills.js","sources":["../../../src/deprecated/LabeledDropdownPills.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { PillGroup } from './PillGroup';\nimport LabeledDropdownSinglePill from './LabeledDropdownPillsTypes/LabeledDropdownSinglePill';\nimport LabeledDropdownMultiPills from './LabeledDropdownPillsTypes/LabeledDropdownMultiPill';\nimport LabeledDropdownCascadeMenuPill from './LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill';\n\nconst DropdownPills = {\n single: LabeledDropdownSinglePill,\n multi: LabeledDropdownMultiPills,\n cascaded: LabeledDropdownCascadeMenuPill,\n};\n\nconst createDropdownPill = (type) =>\n DropdownPills[type] || DropdownPills.single;\n\nfunction LabeledDropdownPills({\n label = '',\n value,\n type,\n onFocusNextGroup,\n onFocusPreviousGroup,\n onFocusGroupSet,\n maxWidth,\n minWidth,\n fixed,\n ...menuProps\n}) {\n const Component = createDropdownPill(type);\n\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <Component\n {...menuProps}\n label={label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n value={value}\n fixed={fixed}\n />\n </PillGroup>\n );\n}\n\nconst props = {\n /** pill type */\n type: PropTypes.oneOf(['single', 'multi', 'cascaded']).description(\n 'pill type',\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 max width */\n maxWidth: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).description('pill max width'),\n /** pill min width */\n minWidth: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).description('pill min width'),\n /** fixed pill */\n fixed: PropTypes.bool.description('fixed pill'),\n /** pill label text */\n label: PropTypes.string.isRequired.description('pill label text'),\n /** pill value */\n value: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n }),\n ),\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n }),\n ]).description('pill value'),\n};\n\nLabeledDropdownPills.propTypes = props;\nconst DSLabeledDropdownPillsWithSchema = describe(LabeledDropdownPills);\nDSLabeledDropdownPillsWithSchema.propTypes = props;\n\nexport { LabeledDropdownPills, DSLabeledDropdownPillsWithSchema };\n"],"names":["DropdownPills","single","LabeledDropdownSinglePill","multi","LabeledDropdownMultiPills","cascaded","LabeledDropdownCascadeMenuPill","createDropdownPill","type","LabeledDropdownPills","label","value","onFocusNextGroup","onFocusPreviousGroup","onFocusGroupSet","maxWidth","minWidth","fixed","menuProps","Component","props","PropTypes","oneOf","description","func","oneOfType","string","number","bool","isRequired","arrayOf","shape","id","propTypes","DSLabeledDropdownPillsWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,aAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"LabeledDropdownPills.js","sources":["../../../src/deprecated/LabeledDropdownPills.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { PillGroup } from './PillGroup';\nimport LabeledDropdownSinglePill from './LabeledDropdownPillsTypes/LabeledDropdownSinglePill';\nimport LabeledDropdownMultiPills from './LabeledDropdownPillsTypes/LabeledDropdownMultiPill';\nimport LabeledDropdownCascadeMenuPill from './LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill';\n\nconst DropdownPills = {\n single: LabeledDropdownSinglePill,\n multi: LabeledDropdownMultiPills,\n cascaded: LabeledDropdownCascadeMenuPill,\n};\n\nconst createDropdownPill = (type) =>\n DropdownPills[type] || DropdownPills.single;\n\nfunction LabeledDropdownPills({\n label = '',\n value,\n type,\n onFocusNextGroup,\n onFocusPreviousGroup,\n onFocusGroupSet,\n maxWidth,\n minWidth,\n fixed,\n ...menuProps\n}) {\n const Component = createDropdownPill(type);\n\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <Component\n {...menuProps}\n label={label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n value={value}\n fixed={fixed}\n />\n </PillGroup>\n );\n}\n\nconst props = {\n /** pill type */\n type: PropTypes.oneOf(['single', 'multi', 'cascaded']).description(\n 'pill type',\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 max width */\n maxWidth: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).description('pill max width'),\n /** pill min width */\n minWidth: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]).description('pill min width'),\n /** fixed pill */\n fixed: PropTypes.bool.description('fixed pill'),\n /** pill label text */\n label: PropTypes.string.isRequired.description('pill label text'),\n /** pill value */\n value: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n }),\n ),\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n }),\n ]).description('pill value'),\n};\n\nLabeledDropdownPills.propTypes = props;\nconst DSLabeledDropdownPillsWithSchema = describe(LabeledDropdownPills);\nDSLabeledDropdownPillsWithSchema.propTypes = props;\n\nexport { LabeledDropdownPills, DSLabeledDropdownPillsWithSchema };\n"],"names":["DropdownPills","single","LabeledDropdownSinglePill","multi","LabeledDropdownMultiPills","cascaded","LabeledDropdownCascadeMenuPill","createDropdownPill","type","LabeledDropdownPills","label","value","onFocusNextGroup","onFocusPreviousGroup","onFocusGroupSet","maxWidth","minWidth","fixed","menuProps","Component","props","PropTypes","oneOf","description","func","oneOfType","string","number","bool","isRequired","arrayOf","shape","id","propTypes","DSLabeledDropdownPillsWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,aAAa,GAAG;EACpBC,MAAM,EAAEC,yBADY;EAEpBC,KAAK,EAAEC,yBAFa;EAGpBC,QAAQ,EAAEC;AAHU,CAAtB;;AAMA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,IAAD;EAAA,O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AAEK,SAAS,CAACI,SAAV,CAAoB,CAC5BJ,SAAS,CAACK,MADkB,EAE5BL,SAAS,CAACM,MAFkB,CAApB,EAGPJ,WAHO,CAGK,gBAHL,CAjBE;;;EAsBZN,KAAK,EAAEI,SAAS,CAACO,IAAV,CAAeL,WAAf,CAA2B,YAA3B,CAtBK;;;EAwBZb,KAAK,EAAEW,SAAS,CAACK,MAAV,CAAiBG,UAAjB,CAA4BN,WAA5B,CAAwC,iBAAxC,CAxBK;;;EA0BZZ,KAAK,EAAEU,SAAS,CAACI,SAAV,CAAoB,CACzBJ,SAAS,CAACS,OAAV,CACET,SAAS,CAACU,KAAV,CAAgB;IACdC,EAAE,EAAEX,SAAS,CAACK,MADA;IAEdhB,KAAK,EAAEW,SAAS,CAACK;GAFnB,CADF,CADyB,EAOzBL,SAAS,CAACU,KAAV,CAAgB;IACdC,EAAE,EAAEX,SAAS,CAACK,MADA;IAEdhB,KAAK,EAAEW,SAAS,CAACK;GAFnB,CAPyB,CAApB,EAWJH,WAXI,CAWQ,YAXR;AA1BK,CAAd;AAwCAd,oBAAoB,CAACwB,SAArB,GAAiCb,KAAjC;IACMc,gCAAgC,GAAGC,QAAQ,CAAC1B,oBAAD;AACjDyB,gCAAgC,CAACD,SAAjC,GAA6Cb,KAA7C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledDropdownCascadeMenuPill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.tsx"],"sourcesContent":["import React from 'react';\nimport { isFunction, addOrRemove } from '@elliemae/ds-utilities';\nimport { PillGroup } from '../PillGroup';\nimport { RemovablePill } from '../RemovablePill';\nimport { DropdownPill } from '../DropdownPill';\n\nfunction renderMenuItems(options, factory) {\n return options.map((option, index) => {\n const ItemComponent = factory('radio');\n\n if (option.type === 'submenu') {\n const SubmenuComponent = factory('submenu');\n const ChildComponent = factory('selection-group');\n return (\n <SubmenuComponent {...option} key={option.id} item={option}>\n <ChildComponent\n {...option}\n id={option.id}\n item={option}\n items={option.items}\n itemValueAccessor={(item) => item}\n multi\n />\n </SubmenuComponent>\n );\n }\n\n return <ItemComponent {...option} key={option.id || index} item={option} />;\n });\n}\n\nconst getSubmenuOptionLabelById = (options, id) => {\n const index = options.findIndex((option) => option.id === id);\n return index ? options[index].label : '';\n};\n\nexport default function LabeledDropdownCascadeMenuPill({\n label,\n options,\n value: optionValue,\n onChange,\n onRemove,\n value: selection = {},\n placeholder = '---',\n onFocusNextGroup,\n onFocusPreviousGroup,\n onFocusGroupSet,\n maxWidth,\n minWidth,\n ...menuProps\n}) {\n const selectionId = Object.keys(selection)[0];\n const selectionValues = selection[selectionId] || '';\n const dropdownLabel = Array.isArray(selectionValues)\n ? getSubmenuOptionLabelById(options, selectionId)\n : selectionValues;\n\n const handleSelectChange = ({ item, group }) => {\n if (isFunction(onChange)) {\n const nextSelection = group\n ? {\n [group.id]: addOrRemove([...(selection[group.id] || [])], item, (o) => o.id),\n }\n : {\n [item.id]: item.label,\n };\n onChange(nextSelection);\n }\n };\n\n const removeOption = (option) => {\n if (isFunction(onChange)) {\n const nextSelection = {\n [selectionId]: selectionValues.filter((val) => option.id !== val.id),\n };\n onChange(nextSelection);\n }\n onRemove(option);\n };\n\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <DropdownPill\n {...menuProps}\n itemsRenderer={renderMenuItems}\n label={dropdownLabel || placeholder}\n maxWidth={maxWidth}\n minWidth={minWidth}\n onSelectChange={handleSelectChange}\n options={options}\n selection={{\n [selectionId]: Array.isArray(selectionValues) ? selectionValues.map((v) => v.id) : selectionValues,\n }}\n singleGroupSelection\n variant=\"title\"\n />\n {Array.isArray(selectionValues) &&\n selectionValues.map((option) => (\n <RemovablePill key={option.id} label={option.label} onRemove={() => removeOption(option)} />\n ))}\n </PillGroup>\n );\n}\n"],"names":["renderMenuItems","options","factory","map","option","index","ItemComponent","type","SubmenuComponent","ChildComponent","id","items","item","getSubmenuOptionLabelById","findIndex","label","LabeledDropdownCascadeMenuPill","value","onChange","onRemove","selection","placeholder","onFocusNextGroup","onFocusPreviousGroup","onFocusGroupSet","maxWidth","minWidth","menuProps","selectionId","Object","keys","selectionValues","dropdownLabel","Array","isArray","handleSelectChange","group","isFunction","nextSelection","addOrRemove","o","removeOption","filter","val","v"],"mappings":";;;;;;;;;;;;;;;;;;;;AAMA,SAASA,eAAT,CAAyBC,OAAzB,EAAkCC,OAAlC,EAA2C;
|
|
1
|
+
{"version":3,"file":"LabeledDropdownCascadeMenuPill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownCascadeMenuPill.tsx"],"sourcesContent":["import React from 'react';\nimport { isFunction, addOrRemove } from '@elliemae/ds-utilities';\nimport { PillGroup } from '../PillGroup';\nimport { RemovablePill } from '../RemovablePill';\nimport { DropdownPill } from '../DropdownPill';\n\nfunction renderMenuItems(options, factory) {\n return options.map((option, index) => {\n const ItemComponent = factory('radio');\n\n if (option.type === 'submenu') {\n const SubmenuComponent = factory('submenu');\n const ChildComponent = factory('selection-group');\n return (\n <SubmenuComponent {...option} key={option.id} item={option}>\n <ChildComponent\n {...option}\n id={option.id}\n item={option}\n items={option.items}\n itemValueAccessor={(item) => item}\n multi\n />\n </SubmenuComponent>\n );\n }\n\n return <ItemComponent {...option} key={option.id || index} item={option} />;\n });\n}\n\nconst getSubmenuOptionLabelById = (options, id) => {\n const index = options.findIndex((option) => option.id === id);\n return index ? options[index].label : '';\n};\n\nexport default function LabeledDropdownCascadeMenuPill({\n label,\n options,\n value: optionValue,\n onChange,\n onRemove,\n value: selection = {},\n placeholder = '---',\n onFocusNextGroup,\n onFocusPreviousGroup,\n onFocusGroupSet,\n maxWidth,\n minWidth,\n ...menuProps\n}) {\n const selectionId = Object.keys(selection)[0];\n const selectionValues = selection[selectionId] || '';\n const dropdownLabel = Array.isArray(selectionValues)\n ? getSubmenuOptionLabelById(options, selectionId)\n : selectionValues;\n\n const handleSelectChange = ({ item, group }) => {\n if (isFunction(onChange)) {\n const nextSelection = group\n ? {\n [group.id]: addOrRemove([...(selection[group.id] || [])], item, (o) => o.id),\n }\n : {\n [item.id]: item.label,\n };\n onChange(nextSelection);\n }\n };\n\n const removeOption = (option) => {\n if (isFunction(onChange)) {\n const nextSelection = {\n [selectionId]: selectionValues.filter((val) => option.id !== val.id),\n };\n onChange(nextSelection);\n }\n onRemove(option);\n };\n\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <DropdownPill\n {...menuProps}\n itemsRenderer={renderMenuItems}\n label={dropdownLabel || placeholder}\n maxWidth={maxWidth}\n minWidth={minWidth}\n onSelectChange={handleSelectChange}\n options={options}\n selection={{\n [selectionId]: Array.isArray(selectionValues) ? selectionValues.map((v) => v.id) : selectionValues,\n }}\n singleGroupSelection\n variant=\"title\"\n />\n {Array.isArray(selectionValues) &&\n selectionValues.map((option) => (\n <RemovablePill key={option.id} label={option.label} onRemove={() => removeOption(option)} />\n ))}\n </PillGroup>\n );\n}\n"],"names":["renderMenuItems","options","factory","map","option","index","ItemComponent","type","SubmenuComponent","ChildComponent","id","items","item","getSubmenuOptionLabelById","findIndex","label","LabeledDropdownCascadeMenuPill","value","onChange","onRemove","selection","placeholder","onFocusNextGroup","onFocusPreviousGroup","onFocusGroupSet","maxWidth","minWidth","menuProps","selectionId","Object","keys","selectionValues","dropdownLabel","Array","isArray","handleSelectChange","group","isFunction","nextSelection","addOrRemove","o","removeOption","filter","val","v"],"mappings":";;;;;;;;;;;;;;;;;;;;AAMA,SAASA,eAAT,CAAyBC,OAAzB,EAAkCC,OAAlC,EAA2C;EACzC,OAAOD,OAAO,CAACE,GAAR,CAAY,UAACC,MAAD,EAASC,KAAT,EAAmB;IACpC,IAAMC,aAAa,GAAGJ,OAAO,CAAC,OAAD,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