@elliemae/ds-button-group 1.61.12 → 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/DSButtonGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSButtonGroup.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSButtonGroup.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","import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport {\n dsBasicSizes,\n orientation as buttonGroupOrientation,\n} from '../../../shared-configs/prop-types';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(\n blockName,\n null,\n ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n }),\n);\n\nconst DSButtonGroup = ({\n size,\n buttonType,\n orientation,\n spacing,\n children: buttons,\n containerProps,\n}) => (\n <GroupContainer\n classProps={{\n vertical: orientation === 'vertical',\n horizontal: orientation !== 'vertical',\n spacing,\n }}\n {...containerProps}\n >\n {React.Children.map(\n buttons,\n (button) =>\n React.cloneElement(button, {\n buttonType,\n size,\n // Keeping it this way to allow individual Buttons to override group props\n // [buttonType | size]\n ...button.props,\n }),\n null,\n )}\n </GroupContainer>\n);\n\nDSButtonGroup.defaultProps = {\n size: 'm',\n buttonType: 'secondary',\n orientation: 'horizontal',\n};\n\nconst props = {\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description(\n 'props injected to wrapper of page header',\n ),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description(\n \"['primary', 'secondary', 'text', 'link']\",\n ),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\n \"['horizontal', 'vertical']\",\n ),\n /**\n * ['s', 'm', 'l']\n */\n spacing: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Button group items to show of type DSButton\n */\n children: PropTypes.arrayOf(DSButton).description(\n 'Button group items to show of type DSButton',\n ),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\n\nDSButtonGroup.propTypes = props;\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],"names":["blockName","GroupContainer","aggregatedClasses","vertical","horizontal","spacing","DSButtonGroup","size","buttonType","orientation","buttons","children","containerProps","React","Children","map","button","cloneElement","props","defaultProps","PropTypes","shape","description","oneOf","dsBasicSizes","buttonTypes","buttonGroupOrientation","arrayOf","DSButton","propTypes","DSButtonGroupWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAkE5C;AACO,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC;;;;;AC1DrD,IAAMA,SAAS,GAAG,cAAlB;AAEA,IAAMC,cAAc,GAAGC,8BAAiB,CAAC,KAAD,CAAjB,CACrBF,SADqB,EAErB,IAFqB,EAGrB;
|
|
1
|
+
{"version":3,"file":"DSButtonGroup.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSButtonGroup.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","import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport {\n dsBasicSizes,\n orientation as buttonGroupOrientation,\n} from '../../../shared-configs/prop-types';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(\n blockName,\n null,\n ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n }),\n);\n\nconst DSButtonGroup = ({\n size,\n buttonType,\n orientation,\n spacing,\n children: buttons,\n containerProps,\n}) => (\n <GroupContainer\n classProps={{\n vertical: orientation === 'vertical',\n horizontal: orientation !== 'vertical',\n spacing,\n }}\n {...containerProps}\n >\n {React.Children.map(\n buttons,\n (button) =>\n React.cloneElement(button, {\n buttonType,\n size,\n // Keeping it this way to allow individual Buttons to override group props\n // [buttonType | size]\n ...button.props,\n }),\n null,\n )}\n </GroupContainer>\n);\n\nDSButtonGroup.defaultProps = {\n size: 'm',\n buttonType: 'secondary',\n orientation: 'horizontal',\n};\n\nconst props = {\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description(\n 'props injected to wrapper of page header',\n ),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description(\n \"['primary', 'secondary', 'text', 'link']\",\n ),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\n \"['horizontal', 'vertical']\",\n ),\n /**\n * ['s', 'm', 'l']\n */\n spacing: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Button group items to show of type DSButton\n */\n children: PropTypes.arrayOf(DSButton).description(\n 'Button group items to show of type DSButton',\n ),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\n\nDSButtonGroup.propTypes = props;\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],"names":["blockName","GroupContainer","aggregatedClasses","vertical","horizontal","spacing","DSButtonGroup","size","buttonType","orientation","buttons","children","containerProps","React","Children","map","button","cloneElement","props","defaultProps","PropTypes","shape","description","oneOf","dsBasicSizes","buttonTypes","buttonG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WAAW,EAAE;AAHc,CAA7B;AAMA,IAAMS,KAAK,GAAG;;EAEZN,cAAc,EAAEQ,mBAAS,CAACC,KAAV,CAAgB,EAAhB,EAAoBC,WAApB,CACd,0CADc,CAFJ;;;AAMd;AACA;EACEf,IAAI,EAAEa,mBAAS,CAACG,KAAV,CAAgBC,YAAhB,EAA8BF,WAA9B,CAA0C,iBAA1C,CARM;;;AAUd;AACA;EACEd,UAAU,EAAEY,mBAAS,CAACG,KAAV,CAAgBE,oBAAhB,EAA6BH,WAA7B,CACV,0CADU,CAZA;;;AAgBd;AACA;EACEb,WAAW,EAAEW,mBAAS,CAACG,KAAV,CAAgBG,WAAhB,EAAwCJ,WAAxC,CACX,4BADW,CAlBD;;;AAsBd;AACA;EACEjB,OAAO,EAAEe,mBAAS,CAACG,KAAV,CAAgBC,YAAhB,EAA8BF,WAA9B,CAA0C,iBAA1C,CAxBG;;;AA0Bd;AACA;EACEX,QAAQ,EAAES,mBAAS,CAACO,OAAV,CAAkBC,4BAAlB,EAA4BN,WAA5B,CACR,6CADQ;AA5BE,CAAd;AAiCAhB,aAAa,CAACa,YAAd,GAA6BA,yBAA7B;AAEAb,aAAa,CAACuB,SAAd,GAA0BX,KAA1B;IAEMY,uBAAuB,GAAGC,kBAAQ,CAACzB,aAAD;AAExCwB,uBAAuB,CAACD,SAAxB,GAAoCX,KAApC;;;;;;"}
|
package/cjs/defaultProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n"],"names":["defaultProps","spacing","children","containerProps"],"mappings":";;;;IAAaA,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n"],"names":["defaultProps","spacing","children","containerProps"],"mappings":";;;;IAAaA,YAAY,GAAG;EAC1BC,OAAO,EAAE,IADiB;EAE1BC,QAAQ,EAAE,EAFgB;EAG1BC,cAAc,EAAE;AAHU;;;;"}
|
package/esm/DSButtonGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSButtonGroup.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSButtonGroup.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","import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport {\n dsBasicSizes,\n orientation as buttonGroupOrientation,\n} from '../../../shared-configs/prop-types';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(\n blockName,\n null,\n ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n }),\n);\n\nconst DSButtonGroup = ({\n size,\n buttonType,\n orientation,\n spacing,\n children: buttons,\n containerProps,\n}) => (\n <GroupContainer\n classProps={{\n vertical: orientation === 'vertical',\n horizontal: orientation !== 'vertical',\n spacing,\n }}\n {...containerProps}\n >\n {React.Children.map(\n buttons,\n (button) =>\n React.cloneElement(button, {\n buttonType,\n size,\n // Keeping it this way to allow individual Buttons to override group props\n // [buttonType | size]\n ...button.props,\n }),\n null,\n )}\n </GroupContainer>\n);\n\nDSButtonGroup.defaultProps = {\n size: 'm',\n buttonType: 'secondary',\n orientation: 'horizontal',\n};\n\nconst props = {\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description(\n 'props injected to wrapper of page header',\n ),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description(\n \"['primary', 'secondary', 'text', 'link']\",\n ),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\n \"['horizontal', 'vertical']\",\n ),\n /**\n * ['s', 'm', 'l']\n */\n spacing: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Button group items to show of type DSButton\n */\n children: PropTypes.arrayOf(DSButton).description(\n 'Button group items to show of type DSButton',\n ),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\n\nDSButtonGroup.propTypes = props;\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],"names":["blockName","GroupContainer","aggregatedClasses","vertical","horizontal","spacing","DSButtonGroup","size","buttonType","orientation","buttons","children","containerProps","React","Children","map","button","cloneElement","props","defaultProps","PropTypes","shape","description","oneOf","dsBasicSizes","buttonTypes","buttonGroupOrientation","arrayOf","DSButton","propTypes","DSButtonGroupWithSchema","describe"],"mappings":";;;;;;;;AAAA;AACO,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAkE5C;AACO,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC;;;;;AC1DrD,IAAMA,SAAS,GAAG,cAAlB;AAEA,IAAMC,cAAc,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CACrBF,SADqB,EAErB,IAFqB,EAGrB;
|
|
1
|
+
{"version":3,"file":"DSButtonGroup.js","sources":["../../../../shared-configs/prop-types.js","../../src/DSButtonGroup.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","import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSButton, { buttonTypes } from '@elliemae/ds-button';\nimport {\n dsBasicSizes,\n orientation as buttonGroupOrientation,\n} from '../../../shared-configs/prop-types';\nimport { defaultProps } from './defaultProps';\n\nconst blockName = 'button-group';\n\nconst GroupContainer = aggregatedClasses('div')(\n blockName,\n null,\n ({ vertical, horizontal, spacing }) => ({\n vertical,\n horizontal,\n [spacing]: spacing,\n }),\n);\n\nconst DSButtonGroup = ({\n size,\n buttonType,\n orientation,\n spacing,\n children: buttons,\n containerProps,\n}) => (\n <GroupContainer\n classProps={{\n vertical: orientation === 'vertical',\n horizontal: orientation !== 'vertical',\n spacing,\n }}\n {...containerProps}\n >\n {React.Children.map(\n buttons,\n (button) =>\n React.cloneElement(button, {\n buttonType,\n size,\n // Keeping it this way to allow individual Buttons to override group props\n // [buttonType | size]\n ...button.props,\n }),\n null,\n )}\n </GroupContainer>\n);\n\nDSButtonGroup.defaultProps = {\n size: 'm',\n buttonType: 'secondary',\n orientation: 'horizontal',\n};\n\nconst props = {\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description(\n 'props injected to wrapper of page header',\n ),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * ['primary', 'secondary', 'text', 'link']\n */\n buttonType: PropTypes.oneOf(buttonTypes).description(\n \"['primary', 'secondary', 'text', 'link']\",\n ),\n /**\n * ['horizontal', 'vertical']\n */\n orientation: PropTypes.oneOf(buttonGroupOrientation).description(\n \"['horizontal', 'vertical']\",\n ),\n /**\n * ['s', 'm', 'l']\n */\n spacing: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Button group items to show of type DSButton\n */\n children: PropTypes.arrayOf(DSButton).description(\n 'Button group items to show of type DSButton',\n ),\n};\n\nDSButtonGroup.defaultProps = defaultProps;\n\nDSButtonGroup.propTypes = props;\n\nconst DSButtonGroupWithSchema = describe(DSButtonGroup);\n\nDSButtonGroupWithSchema.propTypes = props;\n\nexport { DSButtonGroup, DSButtonGroupWithSchema };\nexport default DSButtonGroup;\n"],"names":["blockName","GroupContainer","aggregatedClasses","vertical","horizontal","spacing","DSButtonGroup","size","buttonType","orientation","buttons","children","containerProps","React","Children","map","button","cloneElement","props","defaultProps","PropTypes","shape","description","oneOf","dsBasicSizes","buttonTypes","buttonGroupOrientation","arrayOf","DSButton","propTypes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,GAAG;;EAEZN,cAAc,EAAEQ,SAAS,CAACC,KAAV,CAAgB,EAAhB,EAAoBC,WAApB,CACd,0CADc,CAFJ;;;AAMd;AACA;EACEf,IAAI,EAAEa,SAAS,CAACG,KAAV,CAAgBC,YAAhB,EAA8BF,WAA9B,CAA0C,iBAA1C,CARM;;;AAUd;AACA;EACEd,UAAU,EAAEY,SAAS,CAACG,KAAV,CAAgBE,WAAhB,EAA6BH,WAA7B,CACV,0CADU,CAZA;;;AAgBd;AACA;EACEb,WAAW,EAAEW,SAAS,CAACG,KAAV,CAAgBG,WAAhB,EAAwCJ,WAAxC,CACX,4BADW,CAlBD;;;AAsBd;AACA;EACEjB,OAAO,EAAEe,SAAS,CAACG,KAAV,CAAgBC,YAAhB,EAA8BF,WAA9B,CAA0C,iBAA1C,CAxBG;;;AA0Bd;AACA;EACEX,QAAQ,EAAES,SAAS,CAACO,OAAV,CAAkBC,QAAlB,EAA4BN,WAA5B,CACR,6CADQ;AA5BE,CAAd;AAiCAhB,aAAa,CAACa,YAAd,GAA6BA,YAA7B;AAEAb,aAAa,CAACuB,SAAd,GAA0BX,KAA1B;IAEMY,uBAAuB,GAAGC,QAAQ,CAACzB,aAAD;AAExCwB,uBAAuB,CAACD,SAAxB,GAAoCX,KAApC;;;;"}
|
package/esm/defaultProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n"],"names":["defaultProps","spacing","children","containerProps"],"mappings":"IAAaA,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["export const defaultProps = {\n spacing: null,\n children: [],\n containerProps: {},\n};\n"],"names":["defaultProps","spacing","children","containerProps"],"mappings":"IAAaA,YAAY,GAAG;EAC1BC,OAAO,EAAE,IADiB;EAE1BC,QAAQ,EAAE,EAFgB;EAG1BC,cAAc,EAAE;AAHU;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-button-group",
|
|
3
|
-
"version": "1.61.
|
|
3
|
+
"version": "1.61.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Button Group",
|
|
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-button": "1.61.
|
|
20
|
-
"@elliemae/ds-classnames": "1.61.
|
|
19
|
+
"@elliemae/ds-button": "1.61.13",
|
|
20
|
+
"@elliemae/ds-classnames": "1.61.13",
|
|
21
21
|
"react-desc": "^4.1.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|