@elliemae/ds-read-more 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.
@@ -1 +1 @@
1
- {"version":3,"file":"DSReadMore.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSReadMore.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nexport const dsBasicSizes = ['s', 'm', 'l'];\n\nexport const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\n\nexport const iconSizes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];\n\nexport const iconColors = [\n ['neutral', '900'],\n ['neutral', '0'],\n ['danger', '900'],\n ['warning', '500'],\n ['success', '900'],\n ['brand-primary', '600'],\n];\n\nexport const CHECKBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus',\n ACTIVE: 'variant-active',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\nexport const checkboxVariants = [\n CHECKBOX_VARIANT.DEFAULT,\n CHECKBOX_VARIANT.FOCUS,\n CHECKBOX_VARIANT.ACTIVE,\n CHECKBOX_VARIANT.DISABLED,\n CHECKBOX_VARIANT.ERROR,\n];\n\nexport const COMBOBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus-input',\n FOCUS_ICON: 'variant-focus-icon',\n ACTIVE: 'variant-active-input',\n ACTIVE_ICON: 'variant-active-icon',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\n\nexport const comboBoxVariants = [\n COMBOBOX_VARIANT.DEFAULT,\n COMBOBOX_VARIANT.FOCUS,\n COMBOBOX_VARIANT.FOCUS_ICON,\n COMBOBOX_VARIANT.ACTIVE,\n COMBOBOX_VARIANT.ACTIVE_ICON,\n COMBOBOX_VARIANT.DISABLED,\n COMBOBOX_VARIANT.ERROR,\n];\n\nexport const sizeVariants = {\n S: 's',\n M: 'm',\n L: 'l',\n};\n\nexport const position = {\n LEFT: 'left',\n RIGHT: 'right',\n CENTER: 'center',\n};\n\nexport const fontColor = {\n NEUTRAL500: 'neutral500',\n NEUTRAL700: 'neutral700',\n};\n\nexport const orientation = ['horizontal', 'vertical'];\n\nexport const orientationVariants = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n};\n","/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes } from '../../../shared-configs/prop-types';\nimport { MoreLessButton } from './MoreLessButton';\n\nconst Text = styled.span`\n display: -webkit-box;\n -webkit-line-clamp: ${({ lines, expanded }) => (expanded ? 'unset' : lines)};\n -webkit-box-orient: vertical;\n -webkit-hyphens: auto;\n -moz-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-all;\n`;\n\nconst DSReadMore = ({\n lines = 2,\n more = 'more',\n less = 'less',\n onMore = () => null,\n onLess = () => null,\n content,\n buttonType = 'link',\n size = 's',\n ellipsis = '...',\n}) => {\n const ref = useRef();\n const [showButton, setShowButton] = useState(false);\n const [expanded, setExpanded] = useState(false);\n\n // offsetHeight + 2 takes into consideration any size of the button\n const overflows = ({ offsetHeight, scrollHeight }) =>\n offsetHeight + 2 < scrollHeight;\n\n // Searchs the optimum cut on the text to have the button in the same line\n const binSearchTextOverflow = (element, parent) => {\n const text = element.innerText;\n let left = 1;\n let right = text.length;\n let textEnd = 0;\n while (left <= right) {\n const middle = (left + right) / 2;\n element.innerText = content.slice(0, middle);\n if (overflows(parent)) right = middle - 1;\n else {\n left = middle + 1;\n textEnd = middle;\n }\n }\n element.innerText = content.slice(0, textEnd);\n };\n\n useLayoutEffect(() => {\n const textElement = ref.current;\n const parentElement = ref.current?.parentElement;\n if (parentElement) {\n textElement.innerText = content;\n setShowButton(expanded || overflows(parentElement));\n if (!expanded && overflows(parentElement)) {\n binSearchTextOverflow(textElement, parentElement);\n }\n }\n }, [lines, content, expanded, showButton, more, less]);\n\n const toggleExpanded = (newExpanded) => {\n setExpanded(newExpanded);\n if (newExpanded) onMore();\n else onLess();\n };\n\n return (\n <Text lines={lines} expanded={expanded}>\n <span ref={ref} data-testid=\"ds-read_more-text\">\n {content}\n </span>\n {showButton && (\n <span>\n <MoreLessButton\n expanded={expanded}\n label={expanded ? less : more}\n onClick={() => toggleExpanded(!expanded)}\n buttonType={buttonType}\n size={size}\n ellipsis={ellipsis}\n />\n </span>\n )}\n </Text>\n );\n};\n\nconst DSReadMoreProps = {\n /** Ammount of lines after you want to display an ellipsis + more/less button */\n lines: PropTypes.number\n .description(\n 'Ammount of lines after you want to display an ellipsis + more/less button',\n )\n .defaultValue(2),\n /** Label which will appear on the 'More' button */\n more: PropTypes.string\n .description(\"Label which will appear on the 'More' button\")\n .defaultValue('more'),\n /** Label which will appear on the 'Less' button */\n less: PropTypes.string\n .description(\"Label which will appear on the 'Less' button\")\n .defaultValue('less'),\n /** Function which will execute when the user click the 'More' button */\n onMore: PropTypes.func.description(\n \"Function which will execute when the user click the 'More' button\",\n ),\n /** Function which will execute when the user click the 'Less' button */\n onLess: PropTypes.func.description(\n \"Function which will execute when the user click the 'Less' button\",\n ),\n /** The text content you want displayed */\n content: PropTypes.string.isRequired.description(\n 'The text content you want displayed',\n ),\n\n /** 'The type of button for more/less button' */\n buttonType: PropTypes.oneOf(buttonTypes)\n .description('The type for the more/less button')\n .defaultValue('link'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes)\n .description('Size of the button')\n .defaultValue('s'),\n\n /** The text you want to appear when truncating */\n ellipsis: PropTypes.string\n .description('The text you want to appear when truncating')\n .defaultValue('...'),\n};\n\nDSReadMore.propTypes = DSReadMoreProps;\n\nconst DSReadMoreWithSchema = describe(DSReadMore).description(\n 'ReadMore component',\n);\n\nDSReadMoreWithSchema.propTypes = DSReadMoreProps;\n\nexport { DSReadMore, DSReadMoreWithSchema };\nexport default DSReadMore;\n"],"names":["Text","styled","span","lines","expanded","DSReadMore","more","less","onMore","onLess","content","buttonType","size","ellipsis","ref","useRef","useState","showButton","setShowButton","setExpanded","overflows","offsetHeight","scrollHeight","binSearchTextOverflow","element","parent","text","innerText","left","right","length","textEnd","middle","slice","useLayoutEffect","textElement","current","parentElement","toggleExpanded","newExpanded","React","MoreLessButton","DSReadMoreProps","PropTypes","number","description","defaultValue","string","func","isRequired","oneOf","buttonTypes","dsBasicSizes","propTypes","DSReadMoreWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;;ACO3C,IAAMA,IAAI,gBAAGC,0BAAM,CAACC,IAAV;AAAA;AAAA,2KAEc;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,QAAV,QAAUA,QAAV;AAAA,SAA0BA,QAAQ,GAAG,OAAH,GAAaD,KAA/C;AAAA,CAFd,CAAV;;IAWME,UAAU,GAAG,SAAbA,UAAa,QAUb;AAAA,0BATJF,KASI;AAAA,MATJA,KASI,4BATI,CASJ;AAAA,yBARJG,IAQI;AAAA,MARJA,IAQI,2BARG,MAQH;AAAA,yBAPJC,IAOI;AAAA,MAPJA,IAOI,2BAPG,MAOH;AAAA,2BANJC,MAMI;AAAA,MANJA,MAMI,6BANK;AAAA,WAAM,IAAN;AAAA,GAML;AAAA,2BALJC,MAKI;AAAA,MALJA,MAKI,6BALK;AAAA,WAAM,IAAN;AAAA,GAKL;AAAA,MAJJC,OAII,SAJJA,OAII;AAAA,+BAHJC,UAGI;AAAA,MAHJA,UAGI,iCAHS,MAGT;AAAA,yBAFJC,IAEI;AAAA,MAFJA,IAEI,2BAFG,GAEH;AAAA,6BADJC,QACI;AAAA,MADJA,QACI,+BADO,KACP;AACJ,MAAMC,GAAG,GAAGC,YAAM,EAAlB;;AACA,kBAAoCC,cAAQ,CAAC,KAAD,CAA5C;AAAA;AAAA,MAAOC,UAAP;A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HC,YAFG,CAEU,MAFV,CARgB;;AAWtB;AACAvC,EAAAA,IAAI,EAAEoC,mBAAS,CAACI,MAAV,CACHF,WADG,CACS,8CADT,EAEHC,YAFG,CAEU,MAFV,CAZgB;;AAetB;AACAtC,EAAAA,MAAM,EAAEmC,mBAAS,CAACK,IAAV,CAAeH,WAAf,CACN,mEADM,CAhBc;;AAmBtB;AACApC,EAAAA,MAAM,EAAEkC,mBAAS,CAACK,IAAV,CAAeH,WAAf,CACN,mEADM,CApBc;;AAuBtB;AACAnC,EAAAA,OAAO,EAAEiC,mBAAS,CAACI,MAAV,CAAiBE,UAAjB,CAA4BJ,WAA5B,CACP,qCADO,CAxBa;;AA4BtB;AACAlC,EAAAA,UAAU,EAAEgC,mBAAS,CAACO,KAAV,CAAgBC,oBAAhB,EACTN,WADS,CACG,mCADH,EAETC,YAFS,CAEI,MAFJ,CA7BU;;AAgCtB;AACF;AACA;AACElC,EAAAA,IAAI,EAAE+B,mBAAS,CAACO,KAAV,CAAgBE,YAAhB,EACHP,WADG,CACS,oBADT,EAEHC,YAFG,CAEU,GAFV,CAnCgB;;AAuCtB;AACAjC,EAAAA,QAAQ,EAAE8B,mBAAS,CAACI,MAAV,CACPF,WADO,CACK,6CADL,EAEPC,YAFO,CAEM,KAFN;AAxCY,CAAxB;AA6CAzC,UAAU,CAACgD,SAAX,GAAuBX,eAAvB;IAEMY,oBAAoB,GAAGC,kBAAQ,CAAClD,UAAD,CAAR,CAAqBwC,WAArB,CAC3B,oBAD2B;AAI7BS,oBAAoB,CAACD,SAArB,GAAiCX,eAAjC;;;;;;"}
1
+ {"version":3,"file":"DSReadMore.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSReadMore.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nexport const dsBasicSizes = ['s', 'm', 'l'];\n\nexport const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\n\nexport const iconSizes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];\n\nexport const iconColors = [\n ['neutral', '900'],\n ['neutral', '0'],\n ['danger', '900'],\n ['warning', '500'],\n ['success', '900'],\n ['brand-primary', '600'],\n];\n\nexport const CHECKBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus',\n ACTIVE: 'variant-active',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\nexport const checkboxVariants = [\n CHECKBOX_VARIANT.DEFAULT,\n CHECKBOX_VARIANT.FOCUS,\n CHECKBOX_VARIANT.ACTIVE,\n CHECKBOX_VARIANT.DISABLED,\n CHECKBOX_VARIANT.ERROR,\n];\n\nexport const COMBOBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus-input',\n FOCUS_ICON: 'variant-focus-icon',\n ACTIVE: 'variant-active-input',\n ACTIVE_ICON: 'variant-active-icon',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\n\nexport const comboBoxVariants = [\n COMBOBOX_VARIANT.DEFAULT,\n COMBOBOX_VARIANT.FOCUS,\n COMBOBOX_VARIANT.FOCUS_ICON,\n COMBOBOX_VARIANT.ACTIVE,\n COMBOBOX_VARIANT.ACTIVE_ICON,\n COMBOBOX_VARIANT.DISABLED,\n COMBOBOX_VARIANT.ERROR,\n];\n\nexport const sizeVariants = {\n S: 's',\n M: 'm',\n L: 'l',\n};\n\nexport const position = {\n LEFT: 'left',\n RIGHT: 'right',\n CENTER: 'center',\n};\n\nexport const fontColor = {\n NEUTRAL500: 'neutral500',\n NEUTRAL700: 'neutral700',\n};\n\nexport const orientation = ['horizontal', 'vertical'];\n\nexport const orientationVariants = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n};\n","/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes } from '../../../shared-configs/prop-types';\nimport { MoreLessButton } from './MoreLessButton';\n\nconst Text = styled.span`\n display: -webkit-box;\n -webkit-line-clamp: ${({ lines, expanded }) => (expanded ? 'unset' : lines)};\n -webkit-box-orient: vertical;\n -webkit-hyphens: auto;\n -moz-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-all;\n`;\n\nconst DSReadMore = ({\n lines = 2,\n more = 'more',\n less = 'less',\n onMore = () => null,\n onLess = () => null,\n content,\n buttonType = 'link',\n size = 's',\n ellipsis = '...',\n}) => {\n const ref = useRef();\n const [showButton, setShowButton] = useState(false);\n const [expanded, setExpanded] = useState(false);\n\n // offsetHeight + 2 takes into consideration any size of the button\n const overflows = ({ offsetHeight, scrollHeight }) =>\n offsetHeight + 2 < scrollHeight;\n\n // Searchs the optimum cut on the text to have the button in the same line\n const binSearchTextOverflow = (element, parent) => {\n const text = element.innerText;\n let left = 1;\n let right = text.length;\n let textEnd = 0;\n while (left <= right) {\n const middle = (left + right) / 2;\n element.innerText = content.slice(0, middle);\n if (overflows(parent)) right = middle - 1;\n else {\n left = middle + 1;\n textEnd = middle;\n }\n }\n element.innerText = content.slice(0, textEnd);\n };\n\n useLayoutEffect(() => {\n const textElement = ref.current;\n const parentElement = ref.current?.parentElement;\n if (parentElement) {\n textElement.innerText = content;\n setShowButton(expanded || overflows(parentElement));\n if (!expanded && overflows(parentElement)) {\n binSearchTextOverflow(textElement, parentElement);\n }\n }\n }, [lines, content, expanded, showButton, more, less]);\n\n const toggleExpanded = (newExpanded) => {\n setExpanded(newExpanded);\n if (newExpanded) onMore();\n else onLess();\n };\n\n return (\n <Text lines={lines} expanded={expanded}>\n <span ref={ref} data-testid=\"ds-read_more-text\">\n {content}\n </span>\n {showButton && (\n <span>\n <MoreLessButton\n expanded={expanded}\n label={expanded ? less : more}\n onClick={() => toggleExpanded(!expanded)}\n buttonType={buttonType}\n size={size}\n ellipsis={ellipsis}\n />\n </span>\n )}\n </Text>\n );\n};\n\nconst DSReadMoreProps = {\n /** Ammount of lines after you want to display an ellipsis + more/less button */\n lines: PropTypes.number\n .description(\n 'Ammount of lines after you want to display an ellipsis + more/less button',\n )\n .defaultValue(2),\n /** Label which will appear on the 'More' button */\n more: PropTypes.string\n .description(\"Label which will appear on the 'More' button\")\n .defaultValue('more'),\n /** Label which will appear on the 'Less' button */\n less: PropTypes.string\n .description(\"Label which will appear on the 'Less' button\")\n .defaultValue('less'),\n /** Function which will execute when the user click the 'More' button */\n onMore: PropTypes.func.description(\n \"Function which will execute when the user click the 'More' button\",\n ),\n /** Function which will execute when the user click the 'Less' button */\n onLess: PropTypes.func.description(\n \"Function which will execute when the user click the 'Less' button\",\n ),\n /** The text content you want displayed */\n content: PropTypes.string.isRequired.description(\n 'The text content you want displayed',\n ),\n\n /** 'The type of button for more/less button' */\n buttonType: PropTypes.oneOf(buttonTypes)\n .description('The type for the more/less button')\n .defaultValue('link'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes)\n .description('Size of the button')\n .defaultValue('s'),\n\n /** The text you want to appear when truncating */\n ellipsis: PropTypes.string\n .description('The text you want to appear when truncating')\n .defaultValue('...'),\n};\n\nDSReadMore.propTypes = DSReadMoreProps;\n\nconst DSReadMoreWithSchema = describe(DSReadMore).description(\n 'ReadMore component',\n);\n\nDSReadMoreWithSchema.propTypes = DSReadMoreProps;\n\nexport { DSReadMore, DSReadMoreWithSchema };\nexport default DSReadMore;\n"],"names":["Text","styled","span","lines","expanded","DSReadMore","more","less","onMore","onLess","content","buttonType","size","ellipsis","ref","useRef","useState","showButton","setShowButton","setExpanded","overflows","offsetHeight","scrollHeight","binSearchTextOverflow","element","parent","text","innerText","left","right","length","textEnd","middle","slice","useLayoutEffect","textElement","current","parentElement","toggleExpanded","newExpanded","React","MoreLessButton","DSReadMoreProps","PropTypes","number","description","defaultValue","string","func","isRequired","oneOf","buttonTypes","dsBasicSizes","propTypes","DSReadMoreWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,G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,CAAxB;AA6CAzC,UAAU,CAACgD,SAAX,GAAuBX,eAAvB;IAEMY,oBAAoB,GAAGC,kBAAQ,CAAClD,UAAD,CAAR,CAAqBwC,WAArB,CAC3B,oBAD2B;AAI7BS,oBAAoB,CAACD,SAArB,GAAiCX,eAAjC;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MoreLessButton.js","sources":["../../src/MoreLessButton.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\n\nconst MoreLessButton = ({\n expanded,\n label,\n onClick,\n buttonType,\n size,\n ellipsis,\n}) => (\n <span>\n {expanded ? ' ' : ellipsis}\n <DSButton\n buttonType={buttonType}\n labelText={label}\n onClick={onClick}\n size={size}\n data-testid=\"ds-read_more-button\"\n />\n </span>\n);\n\nconst MoreLessButtonProps = {\n expanded: PropTypes.boolean,\n label: PropTypes.string,\n onClick: PropTypes.func,\n buttonType: PropTypes.string,\n size: PropTypes.string,\n ellipsis: PropTypes.string,\n};\n\nMoreLessButton.propTypes = MoreLessButtonProps;\n\nexport { MoreLessButton };\n"],"names":["MoreLessButton","expanded","label","onClick","buttonType","size","ellipsis","React","DSButton","MoreLessButtonProps","PropTypes","boolean","string","func","propTypes"],"mappings":";;;;;;;;;;;;;IAIMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,MACrBC,QADqB,QACrBA,QADqB;AAAA,MAErBC,KAFqB,QAErBA,KAFqB;AAAA,MAGrBC,OAHqB,QAGrBA,OAHqB;AAAA,MAIrBC,UAJqB,QAIrBA,UAJqB;AAAA,MAKrBC,IALqB,QAKrBA,IALqB;AAAA,MAMrBC,QANqB,QAMrBA,QANqB;AAAA,sBAQrBC,sDACGN,QAAQ,GAAG,GAAH,GAASK,QADpB,eAEEC,wCAACC,4BAAD;AACE,IAAA,UAAU,EAAEJ,UADd;AAEE,IAAA,SAAS,EAAEF,KAFb;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,IAAI,EAAEE,IAJR;AAKE,mBAAY;AALd,IAFF,CARqB;AAAA;;AAoBvB,IAAMI,mBAAmB,GAAG;AAC1BR,EAAAA,QAAQ,EAAES,mBAAS,CAACC,OADM;AAE1BT,EAAAA,KAAK,EAAEQ,mBAAS,CAACE,MAFS;AAG1BT,EAAAA,OAAO,EAAEO,mBAAS,CAACG,IAHO;AAI1BT,EAAAA,UAAU,EAAEM,mBAAS,CAACE,MAJI;AAK1BP,EAAAA,IAAI,EAAEK,mBAAS,CAACE,MALU;AAM1BN,EAAAA,QAAQ,EAAEI,mBAAS,CAACE;AANM,CAA5B;AASAZ,cAAc,CAACc,SAAf,GAA2BL,mBAA3B;;;;"}
1
+ {"version":3,"file":"MoreLessButton.js","sources":["../../src/MoreLessButton.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\n\nconst MoreLessButton = ({\n expanded,\n label,\n onClick,\n buttonType,\n size,\n ellipsis,\n}) => (\n <span>\n {expanded ? ' ' : ellipsis}\n <DSButton\n buttonType={buttonType}\n labelText={label}\n onClick={onClick}\n size={size}\n data-testid=\"ds-read_more-button\"\n />\n </span>\n);\n\nconst MoreLessButtonProps = {\n expanded: PropTypes.boolean,\n label: PropTypes.string,\n onClick: PropTypes.func,\n buttonType: PropTypes.string,\n size: PropTypes.string,\n ellipsis: PropTypes.string,\n};\n\nMoreLessButton.propTypes = MoreLessButtonProps;\n\nexport { MoreLessButton };\n"],"names":["MoreLessButton","expanded","label","onClick","buttonType","size","ellipsis","React","DSButton","MoreLessButtonProps","PropTypes","boolean","string","func","propTypes"],"mappings":";;;;;;;;;;;;;IAIMA,cAAc,GAAG,SAAjBA,cAAiB;EAAA,IACrBC,QADqB,QACrBA,QADqB;MAErBC,KAFqB,QAErBA,KAFqB;MAGrBC,OAHqB,QAGrBA,OAHqB;MAIrBC,UAJqB,QAIrBA,UAJqB;MAKrBC,IALqB,QAKrBA,IALqB;MAMrBC,QANqB,QAMrBA,QANqB;EAAA,oBAQrBC,sDACGN,QAAQ,GAAG,GAAH,GAASK,QADpB,eAEEC,wCAACC,4BAAD;IACE,UAAU,EAAEJ,UADd;IAEE,SAAS,EAAEF,KAFb;IAGE,OAAO,EAAEC,OAHX;IAIE,IAAI,EAAEE,IAJR;IAKE,eAAY;IAPhB,CARqB;AAAA;;AAoBvB,IAAMI,mBAAmB,GAAG;EAC1BR,QAAQ,EAAES,mBAAS,CAACC,OADM;EAE1BT,KAAK,EAAEQ,mBAAS,CAACE,MAFS;EAG1BT,OAAO,EAAEO,mBAAS,CAACG,IAHO;EAI1BT,UAAU,EAAEM,mBAAS,CAACE,MAJI;EAK1BP,IAAI,EAAEK,mBAAS,CAACE,MALU;EAM1BN,QAAQ,EAAEI,mBAAS,CAACE;AANM,CAA5B;AASAZ,cAAc,CAACc,SAAf,GAA2BL,mBAA3B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DSReadMore.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSReadMore.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nexport const dsBasicSizes = ['s', 'm', 'l'];\n\nexport const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\n\nexport const iconSizes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];\n\nexport const iconColors = [\n ['neutral', '900'],\n ['neutral', '0'],\n ['danger', '900'],\n ['warning', '500'],\n ['success', '900'],\n ['brand-primary', '600'],\n];\n\nexport const CHECKBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus',\n ACTIVE: 'variant-active',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\nexport const checkboxVariants = [\n CHECKBOX_VARIANT.DEFAULT,\n CHECKBOX_VARIANT.FOCUS,\n CHECKBOX_VARIANT.ACTIVE,\n CHECKBOX_VARIANT.DISABLED,\n CHECKBOX_VARIANT.ERROR,\n];\n\nexport const COMBOBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus-input',\n FOCUS_ICON: 'variant-focus-icon',\n ACTIVE: 'variant-active-input',\n ACTIVE_ICON: 'variant-active-icon',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\n\nexport const comboBoxVariants = [\n COMBOBOX_VARIANT.DEFAULT,\n COMBOBOX_VARIANT.FOCUS,\n COMBOBOX_VARIANT.FOCUS_ICON,\n COMBOBOX_VARIANT.ACTIVE,\n COMBOBOX_VARIANT.ACTIVE_ICON,\n COMBOBOX_VARIANT.DISABLED,\n COMBOBOX_VARIANT.ERROR,\n];\n\nexport const sizeVariants = {\n S: 's',\n M: 'm',\n L: 'l',\n};\n\nexport const position = {\n LEFT: 'left',\n RIGHT: 'right',\n CENTER: 'center',\n};\n\nexport const fontColor = {\n NEUTRAL500: 'neutral500',\n NEUTRAL700: 'neutral700',\n};\n\nexport const orientation = ['horizontal', 'vertical'];\n\nexport const orientationVariants = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n};\n","/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes } from '../../../shared-configs/prop-types';\nimport { MoreLessButton } from './MoreLessButton';\n\nconst Text = styled.span`\n display: -webkit-box;\n -webkit-line-clamp: ${({ lines, expanded }) => (expanded ? 'unset' : lines)};\n -webkit-box-orient: vertical;\n -webkit-hyphens: auto;\n -moz-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-all;\n`;\n\nconst DSReadMore = ({\n lines = 2,\n more = 'more',\n less = 'less',\n onMore = () => null,\n onLess = () => null,\n content,\n buttonType = 'link',\n size = 's',\n ellipsis = '...',\n}) => {\n const ref = useRef();\n const [showButton, setShowButton] = useState(false);\n const [expanded, setExpanded] = useState(false);\n\n // offsetHeight + 2 takes into consideration any size of the button\n const overflows = ({ offsetHeight, scrollHeight }) =>\n offsetHeight + 2 < scrollHeight;\n\n // Searchs the optimum cut on the text to have the button in the same line\n const binSearchTextOverflow = (element, parent) => {\n const text = element.innerText;\n let left = 1;\n let right = text.length;\n let textEnd = 0;\n while (left <= right) {\n const middle = (left + right) / 2;\n element.innerText = content.slice(0, middle);\n if (overflows(parent)) right = middle - 1;\n else {\n left = middle + 1;\n textEnd = middle;\n }\n }\n element.innerText = content.slice(0, textEnd);\n };\n\n useLayoutEffect(() => {\n const textElement = ref.current;\n const parentElement = ref.current?.parentElement;\n if (parentElement) {\n textElement.innerText = content;\n setShowButton(expanded || overflows(parentElement));\n if (!expanded && overflows(parentElement)) {\n binSearchTextOverflow(textElement, parentElement);\n }\n }\n }, [lines, content, expanded, showButton, more, less]);\n\n const toggleExpanded = (newExpanded) => {\n setExpanded(newExpanded);\n if (newExpanded) onMore();\n else onLess();\n };\n\n return (\n <Text lines={lines} expanded={expanded}>\n <span ref={ref} data-testid=\"ds-read_more-text\">\n {content}\n </span>\n {showButton && (\n <span>\n <MoreLessButton\n expanded={expanded}\n label={expanded ? less : more}\n onClick={() => toggleExpanded(!expanded)}\n buttonType={buttonType}\n size={size}\n ellipsis={ellipsis}\n />\n </span>\n )}\n </Text>\n );\n};\n\nconst DSReadMoreProps = {\n /** Ammount of lines after you want to display an ellipsis + more/less button */\n lines: PropTypes.number\n .description(\n 'Ammount of lines after you want to display an ellipsis + more/less button',\n )\n .defaultValue(2),\n /** Label which will appear on the 'More' button */\n more: PropTypes.string\n .description(\"Label which will appear on the 'More' button\")\n .defaultValue('more'),\n /** Label which will appear on the 'Less' button */\n less: PropTypes.string\n .description(\"Label which will appear on the 'Less' button\")\n .defaultValue('less'),\n /** Function which will execute when the user click the 'More' button */\n onMore: PropTypes.func.description(\n \"Function which will execute when the user click the 'More' button\",\n ),\n /** Function which will execute when the user click the 'Less' button */\n onLess: PropTypes.func.description(\n \"Function which will execute when the user click the 'Less' button\",\n ),\n /** The text content you want displayed */\n content: PropTypes.string.isRequired.description(\n 'The text content you want displayed',\n ),\n\n /** 'The type of button for more/less button' */\n buttonType: PropTypes.oneOf(buttonTypes)\n .description('The type for the more/less button')\n .defaultValue('link'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes)\n .description('Size of the button')\n .defaultValue('s'),\n\n /** The text you want to appear when truncating */\n ellipsis: PropTypes.string\n .description('The text you want to appear when truncating')\n .defaultValue('...'),\n};\n\nDSReadMore.propTypes = DSReadMoreProps;\n\nconst DSReadMoreWithSchema = describe(DSReadMore).description(\n 'ReadMore component',\n);\n\nDSReadMoreWithSchema.propTypes = DSReadMoreProps;\n\nexport { DSReadMore, DSReadMoreWithSchema };\nexport default DSReadMore;\n"],"names":["Text","styled","span","lines","expanded","DSReadMore","more","less","onMore","onLess","content","buttonType","size","ellipsis","ref","useRef","useState","showButton","setShowButton","setExpanded","overflows","offsetHeight","scrollHeight","binSearchTextOverflow","element","parent","text","innerText","left","right","length","textEnd","middle","slice","useLayoutEffect","textElement","current","parentElement","toggleExpanded","newExpanded","DSReadMoreProps","PropTypes","number","description","defaultValue","string","func","isRequired","oneOf","buttonTypes","dsBasicSizes","propTypes","DSReadMoreWithSchema","describe"],"mappings":";;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;;ACO3C,IAAMA,IAAI,gBAAGC,MAAM,CAACC,IAAV;AAAA;AAAA,2KAEc;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,QAAV,QAAUA,QAAV;AAAA,SAA0BA,QAAQ,GAAG,OAAH,GAAaD,KAA/C;AAAA,CAFd,CAAV;;IAWME,UAAU,GAAG,SAAbA,UAAa,QAUb;AAAA,0BATJF,KASI;AAAA,MATJA,KASI,4BATI,CASJ;AAAA,yBARJG,IAQI;AAAA,MARJA,IAQI,2BARG,MAQH;AAAA,yBAPJC,IAOI;AAAA,MAPJA,IAOI,2BAPG,MAOH;AAAA,2BANJC,MAMI;AAAA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AAvB;IAEMY,oBAAoB,GAAGC,QAAQ,CAAChD,UAAD,CAAR,CAAqBsC,WAArB,CAC3B,oBAD2B;AAI7BS,oBAAoB,CAACD,SAArB,GAAiCX,eAAjC;;;;"}
1
+ {"version":3,"file":"DSReadMore.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSReadMore.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nexport const dsBasicSizes = ['s', 'm', 'l'];\n\nexport const sizes = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\n\nexport const iconSizes = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];\n\nexport const iconColors = [\n ['neutral', '900'],\n ['neutral', '0'],\n ['danger', '900'],\n ['warning', '500'],\n ['success', '900'],\n ['brand-primary', '600'],\n];\n\nexport const CHECKBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus',\n ACTIVE: 'variant-active',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\nexport const checkboxVariants = [\n CHECKBOX_VARIANT.DEFAULT,\n CHECKBOX_VARIANT.FOCUS,\n CHECKBOX_VARIANT.ACTIVE,\n CHECKBOX_VARIANT.DISABLED,\n CHECKBOX_VARIANT.ERROR,\n];\n\nexport const COMBOBOX_VARIANT = {\n DEFAULT: 'variant-default',\n FOCUS: 'variant-focus-input',\n FOCUS_ICON: 'variant-focus-icon',\n ACTIVE: 'variant-active-input',\n ACTIVE_ICON: 'variant-active-icon',\n DISABLED: 'variant-disabled',\n ERROR: 'variant-error',\n};\n\nexport const comboBoxVariants = [\n COMBOBOX_VARIANT.DEFAULT,\n COMBOBOX_VARIANT.FOCUS,\n COMBOBOX_VARIANT.FOCUS_ICON,\n COMBOBOX_VARIANT.ACTIVE,\n COMBOBOX_VARIANT.ACTIVE_ICON,\n COMBOBOX_VARIANT.DISABLED,\n COMBOBOX_VARIANT.ERROR,\n];\n\nexport const sizeVariants = {\n S: 's',\n M: 'm',\n L: 'l',\n};\n\nexport const position = {\n LEFT: 'left',\n RIGHT: 'right',\n CENTER: 'center',\n};\n\nexport const fontColor = {\n NEUTRAL500: 'neutral500',\n NEUTRAL700: 'neutral700',\n};\n\nexport const orientation = ['horizontal', 'vertical'];\n\nexport const orientationVariants = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n};\n","/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { buttonTypes } from '@elliemae/ds-button';\nimport { dsBasicSizes } from '../../../shared-configs/prop-types';\nimport { MoreLessButton } from './MoreLessButton';\n\nconst Text = styled.span`\n display: -webkit-box;\n -webkit-line-clamp: ${({ lines, expanded }) => (expanded ? 'unset' : lines)};\n -webkit-box-orient: vertical;\n -webkit-hyphens: auto;\n -moz-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-all;\n`;\n\nconst DSReadMore = ({\n lines = 2,\n more = 'more',\n less = 'less',\n onMore = () => null,\n onLess = () => null,\n content,\n buttonType = 'link',\n size = 's',\n ellipsis = '...',\n}) => {\n const ref = useRef();\n const [showButton, setShowButton] = useState(false);\n const [expanded, setExpanded] = useState(false);\n\n // offsetHeight + 2 takes into consideration any size of the button\n const overflows = ({ offsetHeight, scrollHeight }) =>\n offsetHeight + 2 < scrollHeight;\n\n // Searchs the optimum cut on the text to have the button in the same line\n const binSearchTextOverflow = (element, parent) => {\n const text = element.innerText;\n let left = 1;\n let right = text.length;\n let textEnd = 0;\n while (left <= right) {\n const middle = (left + right) / 2;\n element.innerText = content.slice(0, middle);\n if (overflows(parent)) right = middle - 1;\n else {\n left = middle + 1;\n textEnd = middle;\n }\n }\n element.innerText = content.slice(0, textEnd);\n };\n\n useLayoutEffect(() => {\n const textElement = ref.current;\n const parentElement = ref.current?.parentElement;\n if (parentElement) {\n textElement.innerText = content;\n setShowButton(expanded || overflows(parentElement));\n if (!expanded && overflows(parentElement)) {\n binSearchTextOverflow(textElement, parentElement);\n }\n }\n }, [lines, content, expanded, showButton, more, less]);\n\n const toggleExpanded = (newExpanded) => {\n setExpanded(newExpanded);\n if (newExpanded) onMore();\n else onLess();\n };\n\n return (\n <Text lines={lines} expanded={expanded}>\n <span ref={ref} data-testid=\"ds-read_more-text\">\n {content}\n </span>\n {showButton && (\n <span>\n <MoreLessButton\n expanded={expanded}\n label={expanded ? less : more}\n onClick={() => toggleExpanded(!expanded)}\n buttonType={buttonType}\n size={size}\n ellipsis={ellipsis}\n />\n </span>\n )}\n </Text>\n );\n};\n\nconst DSReadMoreProps = {\n /** Ammount of lines after you want to display an ellipsis + more/less button */\n lines: PropTypes.number\n .description(\n 'Ammount of lines after you want to display an ellipsis + more/less button',\n )\n .defaultValue(2),\n /** Label which will appear on the 'More' button */\n more: PropTypes.string\n .description(\"Label which will appear on the 'More' button\")\n .defaultValue('more'),\n /** Label which will appear on the 'Less' button */\n less: PropTypes.string\n .description(\"Label which will appear on the 'Less' button\")\n .defaultValue('less'),\n /** Function which will execute when the user click the 'More' button */\n onMore: PropTypes.func.description(\n \"Function which will execute when the user click the 'More' button\",\n ),\n /** Function which will execute when the user click the 'Less' button */\n onLess: PropTypes.func.description(\n \"Function which will execute when the user click the 'Less' button\",\n ),\n /** The text content you want displayed */\n content: PropTypes.string.isRequired.description(\n 'The text content you want displayed',\n ),\n\n /** 'The type of button for more/less button' */\n buttonType: PropTypes.oneOf(buttonTypes)\n .description('The type for the more/less button')\n .defaultValue('link'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes)\n .description('Size of the button')\n .defaultValue('s'),\n\n /** The text you want to appear when truncating */\n ellipsis: PropTypes.string\n .description('The text you want to appear when truncating')\n .defaultValue('...'),\n};\n\nDSReadMore.propTypes = DSReadMoreProps;\n\nconst DSReadMoreWithSchema = describe(DSReadMore).description(\n 'ReadMore component',\n);\n\nDSReadMoreWithSchema.propTypes = DSReadMoreProps;\n\nexport { DSReadMore, DSReadMoreWithSchema };\nexport default DSReadMore;\n"],"names":["Text","styled","span","lines","expanded","DSReadMore","more","less","onMore","onLess","content","buttonType","size","ellipsis","ref","useRef","useState","showButton","setShowButton","setExpanded","overflows","offsetHeight","scrollHeight","binSearchTextOverflow","element","parent","text","innerText","left","right","length","textEnd","middle","slice","useLayoutEffect","textElement","current","parentElement","toggleExpanded","newExpanded","DSReadMoreProps","PropTypes","number","description","defaultValue","string","func","isRequired","oneOf","buttonTypes","dsBasicSizes","propTypes","DSReadMoreWithSchema","describe"],"mappings":";;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;;ACO3C,IAAMA,IAAI,gBAAGC,MAAM,CAACC,IAAV;EAAA;AAAA,2KAEc;EAAA,IAAGC,KAAH,QAAGA,KAAH;MAAUC,QAAV,QAAUA,QAAV;EAAA,OAA0BA,QAAQ,GAAG,OAAH,GAAaD,KAA/C;AAAA,CAFd,CAAV;;IAWME,UAAU,GAAG,SAAbA,UAAa,QAUb;EAAA,wBATJF,KASI;MATJA,KASI,4BATI,CASJ;yBARJG,IAQI;MARJA,IAQI,2BARG,MAQH;yBAPJC,IAOI;MAPJA,IAOI,2BAPG,MAOH;2BANJC,MAMI;MANJA,MAMI,6BANK;IAAA,OAAM,IAAN;GAML;2BALJC,MAKI;MALJA,MAKI,6BALK;IAAA,OAAM,IAAN;GAKL;MAJJC,OAII,SAJJA,OAII;+BAHJC,UAGI;MAHJA,UAGI,iCAHS,MAGT;yBAFJC,IAEI;MAFJA,IAEI,2BAFG,GAEH;6BADJC,QACI;MADJA,QACI,+BADO,KACP;EACJ,IAAMC,GAAG,GAAGC,MAAM,EAAlB;;EACA,gBAAoCC,QAAQ,CAAC,KAAD,CAA5C;;MAAOC,UAAP;MAAmBC,aAAnB;;EACA,iBAAgCF,QAAQ,CAAC,KAAD,CAAxC;;MAAOZ,QAAP;MAAiBe,WAAjB,iBAHI;;;EAMJ,IAAMC,SAAS,GAAG,SAAZA,SAAY;IAA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BtBhC,UAAU,EAAE8B,SAAS,CAACO,KAAV,CAAgBC,WAAhB,EACTN,WADS,CACG,mCADH,EAETC,YAFS,CAEI,MAFJ,CA7BU;;;AAiCxB;AACA;EACEhC,IAAI,EAAE6B,SAAS,CAACO,KAAV,CAAgBE,YAAhB,EACHP,WADG,CACS,oBADT,EAEHC,YAFG,CAEU,GAFV,CAnCgB;;;EAwCtB/B,QAAQ,EAAE4B,SAAS,CAACI,MAAV,CACPF,WADO,CACK,6CADL,EAEPC,YAFO,CAEM,KAFN;AAxCY,CAAxB;AA6CAvC,UAAU,CAAC8C,SAAX,GAAuBX,eAAvB;IAEMY,oBAAoB,GAAGC,QAAQ,CAAChD,UAAD,CAAR,CAAqBsC,WAArB,CAC3B,oBAD2B;AAI7BS,oBAAoB,CAACD,SAArB,GAAiCX,eAAjC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MoreLessButton.js","sources":["../../src/MoreLessButton.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\n\nconst MoreLessButton = ({\n expanded,\n label,\n onClick,\n buttonType,\n size,\n ellipsis,\n}) => (\n <span>\n {expanded ? ' ' : ellipsis}\n <DSButton\n buttonType={buttonType}\n labelText={label}\n onClick={onClick}\n size={size}\n data-testid=\"ds-read_more-button\"\n />\n </span>\n);\n\nconst MoreLessButtonProps = {\n expanded: PropTypes.boolean,\n label: PropTypes.string,\n onClick: PropTypes.func,\n buttonType: PropTypes.string,\n size: PropTypes.string,\n ellipsis: PropTypes.string,\n};\n\nMoreLessButton.propTypes = MoreLessButtonProps;\n\nexport { MoreLessButton };\n"],"names":["MoreLessButton","expanded","label","onClick","buttonType","size","ellipsis","MoreLessButtonProps","PropTypes","boolean","string","func","propTypes"],"mappings":";;;;IAIMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,MACrBC,QADqB,QACrBA,QADqB;AAAA,MAErBC,KAFqB,QAErBA,KAFqB;AAAA,MAGrBC,OAHqB,QAGrBA,OAHqB;AAAA,MAIrBC,UAJqB,QAIrBA,UAJqB;AAAA,MAKrBC,IALqB,QAKrBA,IALqB;AAAA,MAMrBC,QANqB,QAMrBA,QANqB;AAAA,sBAQrB,kCACGL,QAAQ,GAAG,GAAH,GAASK,QADpB,eAEE,oBAAC,QAAD;AACE,IAAA,UAAU,EAAEF,UADd;AAEE,IAAA,SAAS,EAAEF,KAFb;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,IAAI,EAAEE,IAJR;AAKE,mBAAY;AALd,IAFF,CARqB;AAAA;;AAoBvB,IAAME,mBAAmB,GAAG;AAC1BN,EAAAA,QAAQ,EAAEO,SAAS,CAACC,OADM;AAE1BP,EAAAA,KAAK,EAAEM,SAAS,CAACE,MAFS;AAG1BP,EAAAA,OAAO,EAAEK,SAAS,CAACG,IAHO;AAI1BP,EAAAA,UAAU,EAAEI,SAAS,CAACE,MAJI;AAK1BL,EAAAA,IAAI,EAAEG,SAAS,CAACE,MALU;AAM1BJ,EAAAA,QAAQ,EAAEE,SAAS,CAACE;AANM,CAA5B;AASAV,cAAc,CAACY,SAAf,GAA2BL,mBAA3B;;;;"}
1
+ {"version":3,"file":"MoreLessButton.js","sources":["../../src/MoreLessButton.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport DSButton from '@elliemae/ds-button';\n\nconst MoreLessButton = ({\n expanded,\n label,\n onClick,\n buttonType,\n size,\n ellipsis,\n}) => (\n <span>\n {expanded ? ' ' : ellipsis}\n <DSButton\n buttonType={buttonType}\n labelText={label}\n onClick={onClick}\n size={size}\n data-testid=\"ds-read_more-button\"\n />\n </span>\n);\n\nconst MoreLessButtonProps = {\n expanded: PropTypes.boolean,\n label: PropTypes.string,\n onClick: PropTypes.func,\n buttonType: PropTypes.string,\n size: PropTypes.string,\n ellipsis: PropTypes.string,\n};\n\nMoreLessButton.propTypes = MoreLessButtonProps;\n\nexport { MoreLessButton };\n"],"names":["MoreLessButton","expanded","label","onClick","buttonType","size","ellipsis","MoreLessButtonProps","PropTypes","boolean","string","func","propTypes"],"mappings":";;;;IAIMA,cAAc,GAAG,SAAjBA,cAAiB;EAAA,IACrBC,QADqB,QACrBA,QADqB;MAErBC,KAFqB,QAErBA,KAFqB;MAGrBC,OAHqB,QAGrBA,OAHqB;MAIrBC,UAJqB,QAIrBA,UAJqB;MAKrBC,IALqB,QAKrBA,IALqB;MAMrBC,QANqB,QAMrBA,QANqB;EAAA,oBAQrB,kCACGL,QAAQ,GAAG,GAAH,GAASK,QADpB,eAEE,oBAAC,QAAD;IACE,UAAU,EAAEF,UADd;IAEE,SAAS,EAAEF,KAFb;IAGE,OAAO,EAAEC,OAHX;IAIE,IAAI,EAAEE,IAJR;IAKE,eAAY;IAPhB,CARqB;AAAA;;AAoBvB,IAAME,mBAAmB,GAAG;EAC1BN,QAAQ,EAAEO,SAAS,CAACC,OADM;EAE1BP,KAAK,EAAEM,SAAS,CAACE,MAFS;EAG1BP,OAAO,EAAEK,SAAS,CAACG,IAHO;EAI1BP,UAAU,EAAEI,SAAS,CAACE,MAJI;EAK1BL,IAAI,EAAEG,SAAS,CAACE,MALU;EAM1BJ,QAAQ,EAAEE,SAAS,CAACE;AANM,CAA5B;AASAV,cAAc,CAACY,SAAf,GAA2BL,mBAA3B;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-read-more",
3
- "version": "1.61.10",
3
+ "version": "1.61.13",
4
4
  "license": "MIT",
5
5
  "description": "Ellie Mae - Dim Sum - Read More",
6
6
  "module": "esm/index.js",
@@ -16,8 +16,8 @@
16
16
  "build": "node ../../scripts/build/build.js"
17
17
  },
18
18
  "dependencies": {
19
- "@elliemae/ds-basic": "1.61.10",
20
- "@elliemae/ds-button": "1.61.10",
19
+ "@elliemae/ds-basic": "1.61.13",
20
+ "@elliemae/ds-button": "1.61.13",
21
21
  "react-desc": "^4.1.2"
22
22
  },
23
23
  "devDependencies": {