@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/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","React","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","React","propTypes","DSPillV2PropTypes","describe","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,IAAMA,mBAAqE,GAAG;EAC5EC,QAAQ,EAAEC,0CADkE;EAE5EC,KAAK,EAAEC,oCAFqE;EAG5EC,KAAK,EAAEC,oCAHqE;EAI5EC,QAAQ,EAAEC,0CAJkE;EAK5EC,SAAS,EAAEC,4CALiE;EAM5EC,KAAK,EAAEC;AANqE,CAA9E;;IASMC,QAA0C,GAAG,SAA7CA,QAA6C,CAACC,OAAD,EAAW;EAC5D,IAAMC,iBAAiB,GAAGC,2CAA4B,CAACF,OAAD,EAAQG,0BAAR,CAAtD;EACAC,6CAA8B,CAACH,iBAAD,EAAoBI,kBAAkB,CAACC,YAAnB,EAApB,CAA9B;EACA,IAAQC,IAAR,GAAiBN,iBAAjB,CAAQM,IAAR;EACA,IAAMC,aAAa,GAAGtB,mBAAmB,CAACqB,IAAD,CAAzC;EAEA,oBAAOE,wCAAC,aAAD,EAAmBR,iBAAnB,CAAP;AACD;;AAEDF,QAAQ,CAACW,SAAT,GAAqBC,uBAArB;IACMN,kBAAkB,GAAGO,kBAAQ,CAACb,QAAD,CAAR,CAAmBc,WAAnB,CAA+B,MAA/B;AAC3BR,kBAAkB,CAACK,SAAnB,GAA+BC,uBAA/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","React","StyledPillButton","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","React","StyledPillButton","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,OAAD,EAAW;EACnE,IAAMC,iBAAiB,GAAGC,2CAA4B,CAACF,OAAD,EAAQG,8BAAR,CAAtD;EACAC,6CAA8B,CAACH,iBAAD,EAAoBI,sBAAsB,CAACC,YAAvB,EAApB,CAA9B;;EAEA,IAAQC,IAAR,GAAoCN,iBAApC,CAAQM,IAAR;MAAcC,QAAd,GAAoCP,iBAApC,CAAcO,QAAd;MAA2BC,IAA3B,gDAAoCR,iBAApC;;EAEA,oBACES,wCAACC,kCAAD,mCAAsBF,IAAtB;IAA4B,UAAU,EAAC,KAAvC;IAA6C,SAAS,YAAKd,eAAe,CAACY,IAAD,CAApB,cAA8BE,IAAI,CAACG,SAAnC;MACnDJ,QADH,CADF;AAKD;;AAEDT,YAAY,CAACc,SAAb,GAAyBC,2BAAzB;IACMT,sBAAsB,GAAGU,kBAAQ,CAAChB,YAAD,CAAR,CAAuBiB,WAAvB,CAAmC,aAAnC;AAC/BX,sBAAsB,CAACQ,SAAvB,GAAmCC,2BAAnC;;;;;"}
|
|
@@ -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","StyledPillGroup","Children","map","propTypes","DSPillGroupPropTypes","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;IASaA,oBAAoB,gBAAGC,mBAAa,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","StyledPillGroup","Children","map","propTypes","DSPillGroupPropTypes","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;IASaA,oBAAoB,gBAAGC,mBAAa,CAAkD;EACjGC,gBAAgB,EAAE;IAAA,OAAM,IAAN;;AAD+E,CAAlD;;IAI3CC,aAAoD,GAAG,SAAvDA,aAAuD,CAACC,OAAD,EAAW;EACtE,IAAMC,iBAAiB,GAAGC,2CAA4B,CAACF,OAAD,EAAQG,6BAAR,CAAtD;EACAC,6CAA8B,CAACH,iBAAD,EAAoBI,uBAAuB,CAACC,YAAxB,EAApB,CAA9B;EAEA,IAAMC,YAAY,GAAGC,aAAO,CAAC;IAAA,+BAAuBC,OAA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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,UAAhE,qQAQRH,IARQ,EAQQD,KARR,EASQG,YATR,EAUSA,YAVT,EAWWA,YAXX,EAYYA,YAZZ,EAcPD,MAdO;AAAA,CAAtB;;AAkBA,IAAMG,oBAAoB,gBAAGD,UAAH,qMAMJ,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAn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AYM,WAAZ,CAAwBI,OAAnC;AAAA,CAFsB;AAOvC;AACA;;IAEaW,eAAe,gBAAGjB,0BAAM,CAACC,wBAAD,CAAT;EAAA;AAAA,23BACjB;EAAA,IAAGiB,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAf;AAAA,CADiB;AAoE5B;AACA;;IAEaC,qBAAqB,gBAAGnB,0BAAM,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,0BAAM,CAACsB,mBAAD,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","SimpleTruncatedTooltipText","Fragment","StyledDropdownPillWrapper","DSDropdownMenuV2","e","code","current","focus","onClickOutside","width","height","DSPillButton","setMultipleRefs","ChevronSmallDown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAWaA,YAAY,gBAAGC,yBAAK,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","SimpleTruncatedTooltipText","Fragment","StyledDropdownPillWrapper","DSDropdownMenuV2","e","code","current","focus","onClickOut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S,EAAC,qBADZ;IAEE,eAAY,0BAFd;IAGE,QAAQ,EAAEC,qBAAe,CAACnB,UAAD,EAAaH,QAAb,CAH3B;IAIE,cAAYC,SAAS,IAAIJ,KAJ3B;IAKE,IAAI,EAAC,OALP;IAME,OAAO,EAAEK;kBAETP,wCAAC4B,wBAAD;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","StyledInputPillWrapper","setMultipleRefs","DSPillButton","CloseXsmall"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IASaA,SAAS,gBAAGC,yBAAK,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","StyledInputPillWrapper","setMultipleRefs","DSPillButton","CloseXsmall"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IASaA,SAAS,gBAAGC,yBAAK,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,YAAM,CAAc,IAAd,CAAlB;EA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wCAAC6B,kCAAD;IACE,EAAE,EAAEhB,OADN;IAEE,eAAY,oBAFd;IAGE,QAAQ,EAAEL,QAHZ;IAIE,OAAO,EAAEO,gBAJX;IAKE,SAAS,EAAEA,gBALb;IAME,cAAW,aANb;IAOE,IAAI,EAAC;kBAELf,wCAAC8B,mBAAD;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","SimpleTruncatedTooltipText","Fragment","StyledLabelPillWrapper","filter","notFalse"],"mappings":";;;;;;;;;;;;;;;AAAA;IAMaA,SAAS,gBAAGC,yBAAK,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","SimpleTruncatedTooltipText","Fragment","StyledLabelPillWrapper","filter","notFalse"],"mappings":";;;;;;;;;;;;;;;AAAA;IAMaA,SAAS,gBAAGC,yBAAK,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,oBAAkBP,wCAACQ,iDAAD;MAA4B,KAAK,EAAED;MAArD;GADgC,GAEhCP,yBAAK,CAACS,QAFV;EAGA,oBACET,wCAACU,wCAAD;IACE,UAAU,EAAC,QADb;IAEE,SAAS,EAAC,uCAFZ;IAGE,eAAY,iBAHd;IAIE,cAAYL,SAAS,IAAIH,KAJ3B;IAKE,IAAI,EAAE,CAACE,QAAQ,IAAI,aAAb,EAA4B,MAA5B,EAAoCO,MAApC,CAA2C,UAACC,QAAD;MAAA,OAAcA,QAAd;KAA3C,CALR;IAME,MAAM,EAAC,MANT;IAOE,OAAO,EAAER,QAAQ,KAAK;KAErBA,QATH,eAUEJ,wCAAC,aAAD,QAAgBE,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","SimpleTruncatedTooltipText","Fragment","StyledReadonlyPillWrapper","filter","notFalse"],"mappings":";;;;;;;;;;;;;;;AAAA;IAOaA,YAAY,gBAAGC,yBAAK,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","SimpleTruncatedTooltipText","Fragment","StyledReadonlyPillWrapper","filter","notFalse"],"mappings":";;;;;;;;;;;;;;;AAAA;IAOaA,YAAY,gBAAGC,yBAAK,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,oBAAkBV,wCAACW,iDAAD;MAA4B,KAAK,EAAED;MAArD;GADgC,GAEhCV,yBAAK,CAACY,QAFV;EAIA,oBACEZ,wCAACa,2CAAD;IACE,UAAU,EAAC,QADb;IAEE,SAAS,EAAC,0CAFZ;IAGE,eAAY,iBAHd;IAIE,cAAYP,SAAS,IAAIJ,KAJ3B;IAKE,IAAI,EAAE,CAACE,QAAQ,IAAI,aAAb,EAA4BF,KAAK,IAAI,MAArC,EAA6CG,SAAS,IAAI,aAA1D,EAAyES,MAAzE,CAAgF,UAACC,QAAD;MAAA,OAAcA,QAAd;KAAhF,CALR;IAME,MAAM,EAAC,MANT;IAOE,YAAY,EAAEP,YAPhB;IAQE,WAAW,EAAED;KAEZH,QAVH,EAWGF,KAAK,gBAAGF,wCAAC,aAAD,QAAgBE,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","SimpleTruncatedTooltipText","Fragment","onKeyDown","useCallback","e","includes","code","preventDefault","StyledRemovablePillWrapper","DSPillButton","CloseXsmall"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAUaA,aAAa,gBAAGC,yBAAK,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","SimpleTruncatedTooltipText","Fragment","onKeyDown","useCallback","e","includes","code","preventDefault","StyledRemovablePillWrapper","DSPillButton","CloseXsmall"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAUaA,aAAa,gBAAGC,yBAAK,CAACC,IAAN,CAAwB,gBAA8D;EAAA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S,EAAEa,SANb;IAOE,+BAAsBf,KAAtB,CAPF;IAQE,IAAI,EAAC;kBAELF,wCAACyB,mBAAD;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","SimpleTruncatedTooltipText","Fragment","StyledValuePillWrapper","filter","notFalse","DSTooltipV2","StyledSpanWithTooltip"],"mappings":";;;;;;;;;;;;;;;;AAAA;IAOaA,SAAS,gBAAGC,yBAAK,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","SimpleTruncatedTooltipText","Fragment","StyledValuePillWrapper","filter","notFalse","DSTooltipV2","StyledSpanWithTooltip"],"mappings":";;;;;;;;;;;;;;;;AAAA;IAOaA,SAAS,gBAAGC,yBAAK,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,oBAAkBR,wCAACS,iDAAD;MAA4B,KAAK,EAAED;MAArD;GADgC,GAEhCR,yBAAK,CAACU,QAFV;EAIA,oBACEV,wCAACW,wCAAD;IACE,UAAU,EAAC,QADb;IAEE,SAAS,EAAC,uCAFZ;IAGE,eAAY,iBAHd;IAIE,cAAYL,SAAS,IAAIJ,KAJ3B;IAKE,IAAI,EAAE,CAACG,QAAQ,IAAI,aAAb,EAA4B,MAA5B,EAAoCO,MAApC,CAA2C,UAACC,QAAD;MAAA,OAAcA,QAAd;KAA3C,CALR;IAME,MAAM,EAAC,MANT;IAOE,OAAO,EAAER,QAAQ,KAAK;KAErBA,QATH,EAUGD,YAAY,KAAK,EAAjB,gBACCJ,wCAACc,qBAAD;IACE,KAAK,EAAEV,YADT;IAEE,gBAAgB,eACdJ,wCAACe,uCAAD;MAAuB,SAAS,EAAC,uBAAjC;MAAyD,QAAQ,EAAE;OAChEb,KADH;IAJL,gBAUCF,wCAAC,aAAD,QAAgBE,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","React","DSDropdownMenu","className","zIndex","Pill","role","ChevronDown","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","React","DSDropdownMenu","className","zIndex","Pill","role","ChevronDown","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,YAAM,CAAC,IAAD,CAAlB;;EACA,gBAAgCC,cAAQ,EAAxC;;MAAOC,SAAP;MAAkBC,UAAlB;;EACA,yBAAuBC,qCAAiB,CAACL,GAAD,CAAxC;MAAQM,UAAR,sBAAQA,UAAR;;EACA,oBACEC,wCAACC,kCAAD,mCACMT,aADN;IAEE,wBAAwB,EAAEH,wBAF5B;IAGE,QAAQ,EAAEC,QAHZ;IAIE,gBAAgB,MAJlB;IAKE,SAAS,EAAE;MAAEY,SAAS,EAAE,oBAAb;MAAmCC,MAAM,EAAE;KALxD;IAME,QAAQ,EAAEZ,QANZ;IAOE,OAAO,EAAEQ,UAPX;IAQE,aAAa,EAAEH,SARjB;IASE,gBAAgB,eACdI,wCAACI,oBAAD;MACE,eAAY,eADd;MAEE,SAAS,EAAC,eAFZ;MAGE,cAAc;QAAIC,IAAI,EAAE;SAAcpB,cA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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","React","CloseXsmall"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,8BAAiB,CAACC,oBAAD,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","React","CloseXsmall"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,eAAe,GAAGC,8BAAiB,CAACC,oBAAD,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,cAAlB,CADC;;;EAID,QAAQH,IAAR;IACE,KAAK,WAAL;MACEE,WAAW,GAAGC,cAAd;MACA;;IACF,KAAK,WAAL;MACED,WAAW,GAAGE,kBAAd;MACA;;;EAKJ,oBACEC,wCAAC,eAAD;IACE,SAAS,EAAC,YADZ;IAEE,UAAU,EAAE;MAAEX,KAAK,EAALA;KAFhB;IAGE,cAAc,EAAEE,cAHlB;IAIE,KAAK,eACHS,wCAAC,WAAD;MACE,eAAY,YADd;MAEE,QAAQ,EAAEP,QAFZ;MAGE,WAAW,EAAED,WAHf;MAIE,KAAK,EAAEH;OACHO,UALN,EALJ;IAaE,UAAU,EACRP,KAAK,iBAAIW,wCAACC,mBAAD;MAAa,SAAS,EAAC,oBAAvB;MAA4C,eAAY,oBAAxD;MAA6E,OAAO,EAAEP;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","React","PillGroup","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","React","PillGroup","props","PropTypes","oneOf","description","func","oneOfType","string","number","bool","isRequired","arrayOf","shape","id","propTypes","DSLabeledDropdownPillsWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,aAAa,GAAG;EACpBC,MAAM,EAAEC,8DADY;EAEpBC,KAAK,EAAEC,6DAFa;EAGpBC,QAAQ,EAAEC;AAHU,CAAtB;;AAMA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,IAAD;EAAA,OACzBR,aAAa,CAACQ,IAAD,CAAb,IAAuBR,aAAa,CAACC,MADZ;AAAA,CAA3B;;AAGA,SAASQ,oBAAT,OAWG;EAAA,sBAVDC,KAUC;MAVDA,KAUC,2BAVO,EAUP;MATDC,KASC,QATDA,KASC;MARDH,IAQC,QARDA,IAQC;MAPDI,gBAOC,QAPDA,gBAOC;MANDC,oBAMC,QANDA,oBAMC;MALDC,eAKC,QALDA,eAKC;MAJDC,QAIC,QAJDA,QAIC;MAHDC,QAGC,QAHDA,QAGC;MAFDC,KAEC,QAFDA,KAEC;MADEC,SACF;;EACD,IAAMC,SAAS,GAAGZ,kBAAkB,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,CACET,mBAAS,CAACU,KAAV,CAAgB;IACdC,EAAE,EAAEX,mBAAS,CAACK,MADA;IAEdlB,KAAK,EAAEa,mBAAS,CAACK;GAFnB,CADF,CADyB,EAOzBL,mBAAS,CAACU,KAAV,CAAgB;IACdC,EAAE,EAAEX,mBAAS,CAACK,MADA;IAEdlB,KAAK,EAAEa,mBAAS,CAACK;GAFnB,CAPyB,CAApB,EAWJH,WAXI,CAWQ,YAXR;AA1BK,CAAd;AAwCAhB,oBAAoB,CAAC0B,SAArB,GAAiCb,KAAjC;IACMc,gCAAgC,GAAGC,kBAAQ,CAAC5B,oBAAD;AACjD2B,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","React","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","PillGroup","DropdownPill","v","RemovablePill"],"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","React","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","PillGroup","DropdownPill","v","RemovablePill"],"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,CAA7B;;IAEA,IAAIE,MAAM,CAACG,IAAP,KAAgB,SAApB,EAA+B;MAC7B,IAAMC,gBAAgB,GAAGN,OAAO,CAAC,SAAD,CAAhC;MACA,IAAMO,cAAc,GAAGP,OAAO,CAAC,iBAAD,CAA9B;MACA,oBACEQ,wCAAC,gBAAD,mCAAsBN,MAAtB;QAA8B,GAAG,EAAEA,MAAM,CAACO,EAA1C;QAA8C,IAAI,EAAEP;uBAClDM,wCAAC,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H,eAAd,IAAiCA,eAAe,CAAC7B,GAAhB,CAAoB,UAAC4C,CAAD;MAAA,OAAOA,CAAC,CAACpC,EAAT;KAApB,CAAjC,GAAoEqB,eAD5E,CARX;IAWE,oBAAoB,MAXtB;IAYE,OAAO,EAAC;KAjBZ,EAmBGE,KAAK,CAACC,OAAN,CAAcH,eAAd,KACCA,eAAe,CAAC7B,GAAhB,CAAoB,UAACC,MAAD;IAAA,oBAClBM,wCAACsC,sCAAD;MAAe,GAAG,EAAE5C,MAAM,CAACO,EAA3B;MAA+B,KAAK,EAAEP,MAAM,CAACY,KAA7C;MAAoD,QAAQ,EAAE;QAAA,OAAM0B,YAAY,CAACtC,MAAD,CAAlB;;MAD5C;GAApB,CApBJ,CADF;AA0BD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledDropdownMultiPill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.tsx"],"sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\nimport { find } from 'lodash';\nimport { isFunction, addOrRemove } from '@elliemae/ds-utilities';\nimport { RemovablePill } from '../RemovablePill';\nimport { Pill } from '../Pill';\nimport { OverflowPill } from '../OverflowPill';\nimport { DropdownPill } from '../DropdownPill';\n\nexport default function LabeledDropdownMultiPills({\n label,\n options = [],\n value = [],\n onSelect = () => null,\n onRemove = () => null,\n onChange, // if this is defined, then it's calculating the next result onSelect or onRemove\n maxWidth,\n minWidth,\n ...menuProps\n}) {\n const [totalDefaultOptions, setTotalDefaultOptions] = useState(0);\n const [selectedOptions, setSelectedOptions] = useState(value);\n const [allOptions, setAllOptions] = useState(options);\n const [overflowOptions, setOverflowOptions] = useState([]);\n\n const overflowQuantity = 3;\n\n useEffect(() => setSelectedOptions(value), [value]);\n\n useEffect(() => {\n const newOptions = allOptions.filter((option) => option.fixedItem);\n if (newOptions.length > 0) {\n setSelectedOptions(newOptions);\n }\n setTotalDefaultOptions(newOptions.length);\n }, []);\n\n useEffect(() => {\n if (totalDefaultOptions) {\n const newOptions = allOptions.map((opt) => {\n if (selectedOptions.length <= totalDefaultOptions && find(selectedOptions, { id: opt.id })) {\n return { ...opt, fixedItem: true };\n }\n return { ...opt, fixedItem: false };\n });\n\n setAllOptions(newOptions);\n }\n }, [onSelect, onRemove, selectedOptions]);\n\n useEffect(() => {\n if (selectedOptions.length > overflowQuantity) {\n const overflow = selectedOptions.filter((val, index) => index >= overflowQuantity);\n setOverflowOptions(overflow);\n }\n }, [selectedOptions]);\n\n const selectOption = useCallback(\n (option) => {\n if (!option.fixedItem) {\n if (isFunction(onChange)) {\n const nextValue = addOrRemove(selectedOptions, option, (item) => item.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onSelect(option);\n }\n },\n [selectedOptions],\n );\n\n const removeOption = useCallback(\n (option) => {\n if (!option.fixedItem || selectedOptions.length > totalDefaultOptions) {\n if (isFunction(onChange)) {\n const nextValue = selectedOptions.filter((val) => option.id !== val.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onRemove(option);\n }\n },\n [selectedOptions],\n );\n\n const typeOfPill = () => {\n if (selectedOptions.length > totalDefaultOptions) {\n return RemovablePill;\n }\n\n return Pill;\n };\n\n return (\n <>\n <DropdownPill\n {...menuProps}\n focusOnOpen={false}\n label={label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n onSelectMenuItem={selectOption}\n options={[\n {\n ...menuProps,\n type: 'SelectionGroup',\n id: 'multi-selection-views',\n multi: true,\n items: allOptions,\n },\n ]}\n selection={{\n 'multi-selection-views': selectedOptions ? selectedOptions.map((o) => o.id) : '',\n }}\n variant=\"title\"\n />\n {selectedOptions &&\n selectedOptions.map((option, index) => {\n const TypeOfPill = typeOfPill();\n if (index < overflowQuantity) {\n return <TypeOfPill key={option.id} label={option.label} onRemove={() => removeOption(option)} />;\n }\n return null;\n })}\n {selectedOptions && selectedOptions.length > overflowQuantity && (\n <OverflowPill label={`+ ${selectedOptions.length - overflowQuantity}`} options={overflowOptions} />\n )}\n </>\n );\n}\n"],"names":["LabeledDropdownMultiPills","label","options","value","onSelect","onRemove","onChange","maxWidth","minWidth","menuProps","useState","totalDefaultOptions","setTotalDefaultOptions","selectedOptions","setSelectedOptions","allOptions","setAllOptions","overflowOptions","setOverflowOptions","overflowQuantity","useEffect","newOptions","filter","option","fixedItem","length","map","opt","find","id","overflow","val","index","selectOption","useCallback","isFunction","nextValue","addOrRemove","item","removeOption","typeOfPill","RemovablePill","Pill","React","DropdownPill","type","multi","items","o","TypeOfPill","OverflowPill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQe,SAASA,yBAAT,OAUZ;
|
|
1
|
+
{"version":3,"file":"LabeledDropdownMultiPill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownMultiPill.tsx"],"sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\nimport { find } from 'lodash';\nimport { isFunction, addOrRemove } from '@elliemae/ds-utilities';\nimport { RemovablePill } from '../RemovablePill';\nimport { Pill } from '../Pill';\nimport { OverflowPill } from '../OverflowPill';\nimport { DropdownPill } from '../DropdownPill';\n\nexport default function LabeledDropdownMultiPills({\n label,\n options = [],\n value = [],\n onSelect = () => null,\n onRemove = () => null,\n onChange, // if this is defined, then it's calculating the next result onSelect or onRemove\n maxWidth,\n minWidth,\n ...menuProps\n}) {\n const [totalDefaultOptions, setTotalDefaultOptions] = useState(0);\n const [selectedOptions, setSelectedOptions] = useState(value);\n const [allOptions, setAllOptions] = useState(options);\n const [overflowOptions, setOverflowOptions] = useState([]);\n\n const overflowQuantity = 3;\n\n useEffect(() => setSelectedOptions(value), [value]);\n\n useEffect(() => {\n const newOptions = allOptions.filter((option) => option.fixedItem);\n if (newOptions.length > 0) {\n setSelectedOptions(newOptions);\n }\n setTotalDefaultOptions(newOptions.length);\n }, []);\n\n useEffect(() => {\n if (totalDefaultOptions) {\n const newOptions = allOptions.map((opt) => {\n if (selectedOptions.length <= totalDefaultOptions && find(selectedOptions, { id: opt.id })) {\n return { ...opt, fixedItem: true };\n }\n return { ...opt, fixedItem: false };\n });\n\n setAllOptions(newOptions);\n }\n }, [onSelect, onRemove, selectedOptions]);\n\n useEffect(() => {\n if (selectedOptions.length > overflowQuantity) {\n const overflow = selectedOptions.filter((val, index) => index >= overflowQuantity);\n setOverflowOptions(overflow);\n }\n }, [selectedOptions]);\n\n const selectOption = useCallback(\n (option) => {\n if (!option.fixedItem) {\n if (isFunction(onChange)) {\n const nextValue = addOrRemove(selectedOptions, option, (item) => item.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onSelect(option);\n }\n },\n [selectedOptions],\n );\n\n const removeOption = useCallback(\n (option) => {\n if (!option.fixedItem || selectedOptions.length > totalDefaultOptions) {\n if (isFunction(onChange)) {\n const nextValue = selectedOptions.filter((val) => option.id !== val.id);\n setSelectedOptions(nextValue);\n onChange(nextValue);\n }\n onRemove(option);\n }\n },\n [selectedOptions],\n );\n\n const typeOfPill = () => {\n if (selectedOptions.length > totalDefaultOptions) {\n return RemovablePill;\n }\n\n return Pill;\n };\n\n return (\n <>\n <DropdownPill\n {...menuProps}\n focusOnOpen={false}\n label={label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n onSelectMenuItem={selectOption}\n options={[\n {\n ...menuProps,\n type: 'SelectionGroup',\n id: 'multi-selection-views',\n multi: true,\n items: allOptions,\n },\n ]}\n selection={{\n 'multi-selection-views': selectedOptions ? selectedOptions.map((o) => o.id) : '',\n }}\n variant=\"title\"\n />\n {selectedOptions &&\n selectedOptions.map((option, index) => {\n const TypeOfPill = typeOfPill();\n if (index < overflowQuantity) {\n return <TypeOfPill key={option.id} label={option.label} onRemove={() => removeOption(option)} />;\n }\n return null;\n })}\n {selectedOptions && selectedOptions.length > overflowQuantity && (\n <OverflowPill label={`+ ${selectedOptions.length - overflowQuantity}`} options={overflowOptions} />\n )}\n </>\n );\n}\n"],"names":["LabeledDropdownMultiPills","label","options","value","onSelect","onRemove","onChange","maxWidth","minWidth","menuProps","useState","totalDefaultOptions","setTotalDefaultOptions","selectedOptions","setSelectedOptions","allOptions","setAllOptions","overflowOptions","setOverflowOptions","overflowQuantity","useEffect","newOptions","filter","option","fixedItem","length","map","opt","find","id","overflow","val","index","selectOption","useCallback","isFunction","nextValue","addOrRemove","item","removeOption","typeOfPill","RemovablePill","Pill","React","DropdownPill","type","multi","items","o","TypeOfPill","OverflowPill"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQe,SAASA,yBAAT,OAUZ;EAAA,IATDC,KASC,QATDA,KASC;0BARDC,OAQC;MARDA,OAQC,6BARS,EAQT;wBAPDC,KAOC;MAPDA,KAOC,2BAPO,EAOP;2BANDC,QAMC;MANDA,QAMC,8BANU;IAAA,OAAM,IAAN;GAMV;2BALDC,QAKC;MALDA,QAKC,8BALU;IAAA,OAAM,IAAN;GAKV;MAJDC,QAIC,QAJDA,QAIC;MAHDC,QAGC,QAHDA,QAGC;MAFDC,QAEC,QAFDA,QAEC;MADEC,SACF;;EACD,gBAAsDC,cAAQ,CAAC,CAAD,CAA9D;;MAAOC,mBAAP;MAA4BC,sBAA5B;;EACA,iBAA8CF,cAAQ,CAACP,KAAD,CAAtD;;MAAOU,eAAP;MAAwBC,kBAAxB;;EACA,iBAAoCJ,cAAQ,CAACR,OAAD,CAA5C;;MAAOa,UAAP;MAAmBC,aAAnB;;EACA,iBAA8CN,cAAQ,CAAC,EAAD,CAAtD;;MAAOO,eAAP;MAAwBC,kBAAxB;;EAEA,IAAMC,gBAAgB,GAAG,CAAzB;EAEAC,eAAS,CAAC;IAAA,OAAMN,kBAAkB,CAACX,KAAD,CAAxB;GAAD,EAAkC,CAACA,KAAD,CAAlC,CAAT;EAEAiB,eAAS,CAAC,YAAM;IACd,IAAMC,UAAU,GAAGN,UAAU,CAACO,MAAX,CAAkB,UAACC,MAAD;MAAA,OAAYA,MAAM,CAACC,SAAnB;KAAlB,CAAnB;;IACA,IAAIH,U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AAe,IACdA,eAAe,CAACa,GAAhB,CAAoB,UAACH,MAAD,EAASS,KAAT,EAAmB;IACrC,IAAMiB,UAAU,GAAGT,UAAU,EAA7B;;IACA,IAAIR,KAAK,GAAGb,gBAAZ,EAA8B;MAC5B,oBAAOwB,wCAAC,UAAD;QAAY,GAAG,EAAEpB,MAAM,CAACM,EAAxB;QAA4B,KAAK,EAAEN,MAAM,CAACtB,KAA1C;QAAiD,QAAQ,EAAE;UAAA,OAAMsC,YAAY,CAAChB,MAAD,CAAlB;;QAAlE;;;IAEF,OAAO,IAAP;GALF,CAvBJ,EA8BGV,eAAe,IAAIA,eAAe,CAACY,MAAhB,GAAyBN,gBAA5C,iBACCwB,wCAACO,oCAAD;IAAc,KAAK,cAAOrC,eAAe,CAACY,MAAhB,GAAyBN,gBAAhC,CAAnB;IAAuE,OAAO,EAAEF;IA/BpF,CADF;AAoCD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledDropdownSinglePill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.tsx"],"sourcesContent":["/* eslint-disable mdx/no-unused-expressions */\n/* eslint-disable no-shadow */\n/* eslint-disable no-unused-expressions */\n/* eslint-disable max-lines */\nimport React, { useCallback, useState, useEffect, useLayoutEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { isFunction, isString, useShouldRecalculate, usePrevious } from '@elliemae/ds-utilities';\nimport { DropdownPill } from '../DropdownPill';\nimport { InputPill } from '../InputPill';\nimport { Pill } from '../Pill';\nimport { RemovablePill } from '../RemovablePill';\nimport { hasOptionChanged } from './utils';\n\nexport default function LabeledDropdownSinglePill({\n label,\n labelIsValue = false,\n options,\n value,\n onSelect = () => null,\n onChange,\n maxWidth,\n minWidth,\n fixed = false,\n ...menuProps\n}) {\n const [optionValue, setOptionValue] = useState(value);\n const prevOptions = usePrevious(options);\n const areOptionsEqual = useShouldRecalculate(hasOptionChanged(prevOptions, options));\n\n useEffect(() => setOptionValue(value), [value]);\n\n useEffect(() => {\n const selectedValue = options.find((option) => option.selected);\n\n if (selectedValue) {\n setOptionValue(selectedValue);\n } else if (!selectedValue) {\n setOptionValue(options[0]);\n }\n }, [areOptionsEqual]);\n\n useLayoutEffect(() => {\n if (optionValue) {\n const selectedValue = options.find((option) => option.id === optionValue.id);\n setOptionValue(selectedValue);\n }\n }, [options]);\n\n const selectOption = useCallback(\n (option) => {\n if (isFunction(onChange)) {\n onChange(option);\n }\n setOptionValue(option);\n onSelect(option);\n },\n [onChange, onSelect],\n );\n\n const onChangeInputValue = useCallback(\n ({ target: { value: inputValue } }) => {\n const { onChangeInput } = optionValue;\n\n onChangeInput && onChangeInput(inputValue);\n },\n [optionValue],\n );\n\n const removeOption = (removedOption) => {\n const { onRemove } = menuProps;\n const { onChangeInput } = optionValue;\n setOptionValue(null);\n onChangeInput && onChangeInput('');\n const newOption = { ...removedOption, input: '' };\n onRemove && onRemove(newOption, removedOption);\n };\n\n const renderPill = (option, fixed) => {\n const { input, onChangeInput, ...otherProps } = option;\n let SelectedPill;\n if (isString(input)) {\n SelectedPill = InputPill;\n } else if (fixed) {\n SelectedPill = Pill;\n } else {\n SelectedPill = RemovablePill;\n }\n\n return (\n <SelectedPill\n key={option.id}\n label={option.label}\n onChange={onChangeInputValue}\n onRemove={(e) => removeOption(option, e)}\n value={input}\n {...otherProps}\n />\n );\n };\n\n const renderSelection = () => {\n if (!labelIsValue) {\n if (optionValue) return renderPill(optionValue, fixed);\n return <Pill label=\"-\" />;\n }\n };\n\n return (\n <>\n <DropdownPill\n {...menuProps}\n label={!labelIsValue ? label : optionValue?.label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n onSelectMenuItem={selectOption}\n options={[\n {\n ...menuProps,\n type: 'SelectionGroup',\n id: 'multi-selection-views',\n multi: false,\n items: options,\n closeOnClick: true,\n },\n ]}\n selection={{\n 'multi-selection-views': optionValue ? [optionValue?.id] : '',\n }}\n variant=\"title\"\n />\n {renderSelection()}\n </>\n );\n}\n\nLabeledDropdownSinglePill.propTypes = {\n label: PropTypes.string,\n labelIsValue: PropTypes.bool,\n options: PropTypes.array,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onSelect: PropTypes.func,\n onChange: PropTypes.func,\n maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fixed: PropTypes.bool,\n};\n"],"names":["LabeledDropdownSinglePill","label","labelIsValue","options","value","onSelect","onChange","maxWidth","minWidth","fixed","menuProps","useState","optionValue","setOptionValue","prevOptions","usePrevious","areOptionsEqual","useShouldRecalculate","hasOptionChanged","useEffect","selectedValue","find","option","selected","useLayoutEffect","id","selectOption","useCallback","isFunction","onChangeInputValue","inputValue","target","onChangeInput","removeOption","removedOption","onRemove","newOption","input","renderPill","otherProps","SelectedPill","isString","InputPill","Pill","RemovablePill","React","e","renderSelection","DropdownPill","type","multi","items","closeOnClick","propTypes","PropTypes","string","bool","array","oneOfType","number","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAae,SAASA,yBAAT,OAWZ;
|
|
1
|
+
{"version":3,"file":"LabeledDropdownSinglePill.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/LabeledDropdownSinglePill.tsx"],"sourcesContent":["/* eslint-disable mdx/no-unused-expressions */\n/* eslint-disable no-shadow */\n/* eslint-disable no-unused-expressions */\n/* eslint-disable max-lines */\nimport React, { useCallback, useState, useEffect, useLayoutEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { isFunction, isString, useShouldRecalculate, usePrevious } from '@elliemae/ds-utilities';\nimport { DropdownPill } from '../DropdownPill';\nimport { InputPill } from '../InputPill';\nimport { Pill } from '../Pill';\nimport { RemovablePill } from '../RemovablePill';\nimport { hasOptionChanged } from './utils';\n\nexport default function LabeledDropdownSinglePill({\n label,\n labelIsValue = false,\n options,\n value,\n onSelect = () => null,\n onChange,\n maxWidth,\n minWidth,\n fixed = false,\n ...menuProps\n}) {\n const [optionValue, setOptionValue] = useState(value);\n const prevOptions = usePrevious(options);\n const areOptionsEqual = useShouldRecalculate(hasOptionChanged(prevOptions, options));\n\n useEffect(() => setOptionValue(value), [value]);\n\n useEffect(() => {\n const selectedValue = options.find((option) => option.selected);\n\n if (selectedValue) {\n setOptionValue(selectedValue);\n } else if (!selectedValue) {\n setOptionValue(options[0]);\n }\n }, [areOptionsEqual]);\n\n useLayoutEffect(() => {\n if (optionValue) {\n const selectedValue = options.find((option) => option.id === optionValue.id);\n setOptionValue(selectedValue);\n }\n }, [options]);\n\n const selectOption = useCallback(\n (option) => {\n if (isFunction(onChange)) {\n onChange(option);\n }\n setOptionValue(option);\n onSelect(option);\n },\n [onChange, onSelect],\n );\n\n const onChangeInputValue = useCallback(\n ({ target: { value: inputValue } }) => {\n const { onChangeInput } = optionValue;\n\n onChangeInput && onChangeInput(inputValue);\n },\n [optionValue],\n );\n\n const removeOption = (removedOption) => {\n const { onRemove } = menuProps;\n const { onChangeInput } = optionValue;\n setOptionValue(null);\n onChangeInput && onChangeInput('');\n const newOption = { ...removedOption, input: '' };\n onRemove && onRemove(newOption, removedOption);\n };\n\n const renderPill = (option, fixed) => {\n const { input, onChangeInput, ...otherProps } = option;\n let SelectedPill;\n if (isString(input)) {\n SelectedPill = InputPill;\n } else if (fixed) {\n SelectedPill = Pill;\n } else {\n SelectedPill = RemovablePill;\n }\n\n return (\n <SelectedPill\n key={option.id}\n label={option.label}\n onChange={onChangeInputValue}\n onRemove={(e) => removeOption(option, e)}\n value={input}\n {...otherProps}\n />\n );\n };\n\n const renderSelection = () => {\n if (!labelIsValue) {\n if (optionValue) return renderPill(optionValue, fixed);\n return <Pill label=\"-\" />;\n }\n };\n\n return (\n <>\n <DropdownPill\n {...menuProps}\n label={!labelIsValue ? label : optionValue?.label}\n maxWidth={maxWidth}\n minWidth={minWidth}\n onSelectMenuItem={selectOption}\n options={[\n {\n ...menuProps,\n type: 'SelectionGroup',\n id: 'multi-selection-views',\n multi: false,\n items: options,\n closeOnClick: true,\n },\n ]}\n selection={{\n 'multi-selection-views': optionValue ? [optionValue?.id] : '',\n }}\n variant=\"title\"\n />\n {renderSelection()}\n </>\n );\n}\n\nLabeledDropdownSinglePill.propTypes = {\n label: PropTypes.string,\n labelIsValue: PropTypes.bool,\n options: PropTypes.array,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onSelect: PropTypes.func,\n onChange: PropTypes.func,\n maxWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n minWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fixed: PropTypes.bool,\n};\n"],"names":["LabeledDropdownSinglePill","label","labelIsValue","options","value","onSelect","onChange","maxWidth","minWidth","fixed","menuProps","useState","optionValue","setOptionValue","prevOptions","usePrevious","areOptionsEqual","useShouldRecalculate","hasOptionChanged","useEffect","selectedValue","find","option","selected","useLayoutEffect","id","selectOption","useCallback","isFunction","onChangeInputValue","inputValue","target","onChangeInput","removeOption","removedOption","onRemove","newOption","input","renderPill","otherProps","SelectedPill","isString","InputPill","Pill","RemovablePill","React","e","renderSelection","DropdownPill","type","multi","items","closeOnClick","propTypes","PropTypes","string","bool","array","oneOfType","number","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAae,SAASA,yBAAT,OAWZ;EAAA,IAVDC,KAUC,QAVDA,KAUC;+BATDC,YASC;MATDA,YASC,kCATc,KASd;MARDC,OAQC,QARDA,OAQC;MAPDC,KAOC,QAPDA,KAOC;2BANDC,QAMC;MANDA,QAMC,8BANU;IAAA,OAAM,IAAN;GAMV;MALDC,QAKC,QALDA,QAKC;MAJDC,QAIC,QAJDA,QAIC;MAHDC,QAGC,QAHDA,QAGC;wBAFDC,KAEC;MAFDA,KAEC,2BAFO,KAEP;MADEC,SACF;;EACD,gBAAsCC,cAAQ,CAACP,KAAD,CAA9C;;MAAOQ,WAAP;MAAoBC,cAApB;;EACA,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AAX,EAAmBD,6BAAS,CAACK,MAA7B,CAApB,CAR0B;EASpClD,KAAK,EAAE6C,6BAAS,CAACE;AATmB,CAAtC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/utils.tsx"],"sourcesContent":["import { isEqual } from '@elliemae/ds-utilities';\nimport { omit } from 'lodash';\n\nexport const hasOptionChanged = (prevOptions, options) => {\n if (prevOptions && options) {\n const prevOptionsOmited = prevOptions.map((option) => omit(option, ['input', 'onChangeInput', 'mask']));\n const optionsOmited = options.map((option) => omit(option, ['input', 'onChangeInput', 'mask']));\n\n return isEqual(prevOptionsOmited, optionsOmited);\n }\n\n return false;\n};\n"],"names":["hasOptionChanged","prevOptions","options","prevOptionsOmited","map","option","omit","optionsOmited","isEqual"],"mappings":";;;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,WAAD,EAAcC,OAAd,EAA0B;
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/deprecated/LabeledDropdownPillsTypes/utils.tsx"],"sourcesContent":["import { isEqual } from '@elliemae/ds-utilities';\nimport { omit } from 'lodash';\n\nexport const hasOptionChanged = (prevOptions, options) => {\n if (prevOptions && options) {\n const prevOptionsOmited = prevOptions.map((option) => omit(option, ['input', 'onChangeInput', 'mask']));\n const optionsOmited = options.map((option) => omit(option, ['input', 'onChangeInput', 'mask']));\n\n return isEqual(prevOptionsOmited, optionsOmited);\n }\n\n return false;\n};\n"],"names":["hasOptionChanged","prevOptions","options","prevOptionsOmited","map","option","omit","optionsOmited","isEqual"],"mappings":";;;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,WAAD,EAAcC,OAAd,EAA0B;EACxD,IAAID,WAAW,IAAIC,OAAnB,EAA4B;IAC1B,IAAMC,iBAAiB,GAAGF,WAAW,CAACG,GAAZ,CAAgB,UAACC,MAAD;MAAA,OAAYC,WAAI,CAACD,MAAD,EAAS,CAAC,OAAD,EAAU,eAAV,EAA2B,MAA3B,CAAT,CAAhB;KAAhB,CAA1B;IACA,IAAME,aAAa,GAAGL,OAAO,CAACE,GAAR,CAAY,UAACC,MAAD;MAAA,OAAYC,WAAI,CAACD,MAAD,EAAS,CAAC,OAAD,EAAU,eAAV,EAA2B,MAA3B,CAAT,CAAhB;KAAZ,CAAtB;IAEA,OAAOG,mBAAO,CAACL,iBAAD,EAAoBI,aAApB,CAAd;;;EAGF,OAAO,KAAP;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledPills.js","sources":["../../../src/deprecated/LabeledPills.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { PillGroup } from './PillGroup';\nimport { RemovablePill } from './RemovablePill';\nimport { Pill } from './Pill';\n\nfunction LabeledPills({\n children,\n label = '',\n leftAddon,\n onFocusGroupSet,\n onFocusNextGroup,\n onFocusPreviousGroup,\n}) {\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <Pill\n label={label}\n leftAddon={leftAddon}\n variant=\"title\"\n data-testid=\"pill-title\"\n />\n {children}\n </PillGroup>\n );\n}\n\nconst props = {\n /** labeled pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** pill to add the label to */\n children: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf([\n PropTypes.instanceOf(Pill),\n PropTypes.instanceOf(RemovablePill),\n ]),\n }),\n ).isRequired.description('pill to add the label to'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** focus next group callback */\n onFocusNextGroup: PropTypes.func.description('focus next group callback'),\n /** focus prev group callback */\n onFocusPreviousGroup: PropTypes.func.description('focus prev group callback'),\n /** focus group set callback */\n onFocusGroupSet: PropTypes.func.description('focus group set callback'),\n};\n\nLabeledPills.propTypes = props;\n\nconst DSLabeledPillsWithSchema = describe(LabeledPills);\nDSLabeledPillsWithSchema.propTypes = props;\n\nexport { LabeledPills, DSLabeledPillsWithSchema };\n"],"names":["LabeledPills","children","label","leftAddon","onFocusGroupSet","onFocusNextGroup","onFocusPreviousGroup","React","PillGroup","Pill","props","PropTypes","string","isRequired","description","arrayOf","shape","type","oneOf","instanceOf","RemovablePill","node","func","propTypes","DSLabeledPillsWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,SAASA,YAAT,OAOG;
|
|
1
|
+
{"version":3,"file":"LabeledPills.js","sources":["../../../src/deprecated/LabeledPills.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { PillGroup } from './PillGroup';\nimport { RemovablePill } from './RemovablePill';\nimport { Pill } from './Pill';\n\nfunction LabeledPills({\n children,\n label = '',\n leftAddon,\n onFocusGroupSet,\n onFocusNextGroup,\n onFocusPreviousGroup,\n}) {\n return (\n <PillGroup\n onFocusGroupSet={onFocusGroupSet}\n onFocusNextGroup={onFocusNextGroup}\n onFocusPreviousGroup={onFocusPreviousGroup}\n >\n <Pill\n label={label}\n leftAddon={leftAddon}\n variant=\"title\"\n data-testid=\"pill-title\"\n />\n {children}\n </PillGroup>\n );\n}\n\nconst props = {\n /** labeled pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** pill to add the label to */\n children: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf([\n PropTypes.instanceOf(Pill),\n PropTypes.instanceOf(RemovablePill),\n ]),\n }),\n ).isRequired.description('pill to add the label to'),\n /** addon component to left */\n leftAddon: PropTypes.node.description('addon component to left'),\n /** focus next group callback */\n onFocusNextGroup: PropTypes.func.description('focus next group callback'),\n /** focus prev group callback */\n onFocusPreviousGroup: PropTypes.func.description('focus prev group callback'),\n /** focus group set callback */\n onFocusGroupSet: PropTypes.func.description('focus group set callback'),\n};\n\nLabeledPills.propTypes = props;\n\nconst DSLabeledPillsWithSchema = describe(LabeledPills);\nDSLabeledPillsWithSchema.propTypes = props;\n\nexport { LabeledPills, DSLabeledPillsWithSchema };\n"],"names":["LabeledPills","children","label","leftAddon","onFocusGroupSet","onFocusNextGroup","onFocusPreviousGroup","React","PillGroup","Pill","props","PropTypes","string","isRequired","description","arrayOf","shape","type","oneOf","instanceOf","RemovablePill","node","func","propTypes","DSLabeledPillsWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,SAASA,YAAT,OAOG;EAAA,IANDC,QAMC,QANDA,QAMC;wBALDC,KAKC;MALDA,KAKC,2BALO,EAKP;MAJDC,SAIC,QAJDA,SAIC;MAHDC,eAGC,QAHDA,eAGC;MAFDC,gBAEC,QAFDA,gBAEC;MADDC,oBACC,QADDA,oBACC;EACD,oBACEC,wCAACC,8BAAD;IACE,eAAe,EAAEJ,eADnB;IAEE,gBAAgB,EAAEC,gBAFpB;IAGE,oBAAoB,EAAEC;kBAEtBC,wCAACE,oBAAD;IACE,KAAK,EAAEP,KADT;IAEE,SAAS,EAAEC,SAFb;IAGE,OAAO,EAAC,OAHV;IAIE,eAAY;IAThB,EAWGF,QAXH,CADF;AAeD;;AAED,IAAMS,KAAK,GAAG;;EAEZR,KAAK,EAAES,mBAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,CAAwC,iBAAxC,CAFK;;;EAIZb,QAAQ,EAAEU,mBAAS,CAACI,OAAV,CACRJ,mBAAS,CAACK,KAAV,CAAgB;IACdC,IAAI,EAAEN,mBAAS,CAACO,KAAV,CAAgB,CACpBP,mBAAS,CAACQ,UAAV,CAAqBV,oBAArB,CADoB,EAEpBE,mBAAS,CAACQ,UAAV,CAAqBC,sCAArB,CAFoB,CAAhB;GADR,CADQ,EAORP,UAPQ,CAOGC,WAPH,CAOe,0BAPf,CAJE;;;EAaZX,SAAS,EAAEQ,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,yBAA3B,CAbC;;;EAeZT,gBAAgB,EAAEM,mBAAS,CAACW,IAAV,CAAeR,WAAf,CAA2B,2BAA3B,CAfN;;;EAiBZR,oBAAoB,EAAEK,mBAAS,CAACW,IAAV,CAAeR,WAAf,CAA2B,2BAA3B,CAjBV;;;EAmBZV,eAAe,EAAEO,mBAAS,CAACW,IAAV,CAAeR,WAAf,CAA2B,0BAA3B;AAnBL,CAAd;AAsBAd,YAAY,CAACuB,SAAb,GAAyBb,KAAzB;IAEMc,wBAAwB,GAAGC,kBAAQ,CAACzB,YAAD;AACzCwB,wBAAwB,CAACD,SAAzB,GAAqCb,KAArC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverflowPill.js","sources":["../../../src/deprecated/OverflowPill.tsx"],"sourcesContent":["import React, { useRef, useState, useEffect } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport DSTooltip from '@elliemae/ds-tooltip';\nimport { Pill } from './Pill';\n\nfunction OverflowPill({ containerProps = {}, label = '', options = [] }) {\n const ref = useRef(null);\n const [tooltipIsOpen, setTooltipIsOpen] = useState(false);\n const [tooltipText, setTooltipText] = useState('');\n\n useEffect(() => {\n let text = '';\n options.forEach((option) => {\n if (!tooltipText || option === options[0]) {\n text = `${option.label}`;\n } else {\n text = text.concat(`, ${option.label}`);\n }\n });\n setTooltipText(text);\n }, [options]);\n\n useFocusGroupItem(ref);\n\n return (\n <DSTooltip\n isOpen={tooltipIsOpen}\n title={tooltipText}\n zIndex={11}\n triggerComponent={\n <Pill\n className=\"overflow-pill\"\n containerProps={containerProps}\n innerRef={ref}\n label={label}\n tabIndex={-1}\n onMouseEnter={() => setTooltipIsOpen(true)}\n onMouseLeave={() => setTooltipIsOpen(false)}\n />\n }\n />\n );\n}\n\nconst props = {\n /** props to inject to pill wrapper */\n containerProps: PropTypes.object.description(\n 'props to inject to pill wrapper',\n ),\n /** pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** overflow pills options */\n options: PropTypes.array.description('overflow pills options'),\n};\n\nOverflowPill.propTypes = props;\nconst DSOverflowPillWithSchema = describe(OverflowPill);\nDSOverflowPillWithSchema.propTypes = props;\n\nexport { OverflowPill, DSOverflowPillWithSchema };\n"],"names":["OverflowPill","containerProps","label","options","ref","useRef","useState","tooltipIsOpen","setTooltipIsOpen","tooltipText","setTooltipText","useEffect","text","forEach","option","concat","useFocusGroupItem","React","DSTooltip","Pill","props","PropTypes","object","description","string","isRequired","array","propTypes","DSOverflowPillWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,SAASA,YAAT,OAAyE;
|
|
1
|
+
{"version":3,"file":"OverflowPill.js","sources":["../../../src/deprecated/OverflowPill.tsx"],"sourcesContent":["import React, { useRef, useState, useEffect } from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport useFocusGroupItem from '@elliemae/ds-shared/FocusGroup/useFocusGroupItem';\nimport DSTooltip from '@elliemae/ds-tooltip';\nimport { Pill } from './Pill';\n\nfunction OverflowPill({ containerProps = {}, label = '', options = [] }) {\n const ref = useRef(null);\n const [tooltipIsOpen, setTooltipIsOpen] = useState(false);\n const [tooltipText, setTooltipText] = useState('');\n\n useEffect(() => {\n let text = '';\n options.forEach((option) => {\n if (!tooltipText || option === options[0]) {\n text = `${option.label}`;\n } else {\n text = text.concat(`, ${option.label}`);\n }\n });\n setTooltipText(text);\n }, [options]);\n\n useFocusGroupItem(ref);\n\n return (\n <DSTooltip\n isOpen={tooltipIsOpen}\n title={tooltipText}\n zIndex={11}\n triggerComponent={\n <Pill\n className=\"overflow-pill\"\n containerProps={containerProps}\n innerRef={ref}\n label={label}\n tabIndex={-1}\n onMouseEnter={() => setTooltipIsOpen(true)}\n onMouseLeave={() => setTooltipIsOpen(false)}\n />\n }\n />\n );\n}\n\nconst props = {\n /** props to inject to pill wrapper */\n containerProps: PropTypes.object.description(\n 'props to inject to pill wrapper',\n ),\n /** pill text label */\n label: PropTypes.string.isRequired.description('pill text label'),\n /** overflow pills options */\n options: PropTypes.array.description('overflow pills options'),\n};\n\nOverflowPill.propTypes = props;\nconst DSOverflowPillWithSchema = describe(OverflowPill);\nDSOverflowPillWithSchema.propTypes = props;\n\nexport { OverflowPill, DSOverflowPillWithSchema };\n"],"names":["OverflowPill","containerProps","label","options","ref","useRef","useState","tooltipIsOpen","setTooltipIsOpen","tooltipText","setTooltipText","useEffect","text","forEach","option","concat","useFocusGroupItem","React","DSTooltip","Pill","props","PropTypes","object","description","string","isRequired","array","propTypes","DSOverflowPillWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,SAASA,YAAT,OAAyE;EAAA,+BAAjDC,cAAiD;MAAjDA,cAAiD,oCAAhC,EAAgC;wBAA5BC,KAA4B;MAA5BA,KAA4B,2BAApB,EAAoB;0BAAhBC,OAAgB;MAAhBA,OAAgB,6BAAN,EAAM;EACvE,IAAMC,GAAG,GAAGC,YAAM,CAAC,IAAD,CAAlB;;EACA,gBAA0CC,cAAQ,CAAC,KAAD,CAAlD;;MAAOC,aAAP;MAAsBC,gBAAtB;;EACA,iBAAsCF,cAAQ,CAAC,EAAD,CAA9C;;MAAOG,WAAP;MAAoBC,cAApB;;EAEAC,eAAS,CAAC,YAAM;IACd,IAAIC,IAAI,GAAG,EAAX;IACAT,OAAO,CAACU,OAAR,CAAgB,UAACC,MAAD,EAAY;MAC1B,IAAI,CAACL,WAAD,IAAgBK,MAAM,KAAKX,OAAO,CAAC,CAAD,CAAtC,EAA2C;QACzCS,IAAI,aAAME,MAAM,CAACZ,KAAb,CAAJ;OADF,MAEO;QACLU,IAAI,GAAGA,IAAI,CAACG,MAAL,aAAiBD,MAAM,CAACZ,KAAxB,EAAP;;KAJJ;IAOAQ,cAAc,CAACE,IAAD,CAAd;GATO,EAUN,CAACT,OAAD,CAVM,CAAT;EAYAa,qCAAiB,CAACZ,GAAD,CAAjB;EAEA,oBACEa,wCAACC,6BAAD;IACE,MAAM,EAAEX,aADV;IAEE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