@razorpay/blade 11.20.0 → 11.21.0
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/build/lib/native/components/Accordion/AccordionItem.js +1 -1
- package/build/lib/native/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/native/components/Collapsible/Collapsible.js +1 -1
- package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleBody.js +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleBody.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleBodyContent.native.js +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleBodyContent.native.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleLink.js +8 -1
- package/build/lib/native/components/Collapsible/CollapsibleLink.js.map +1 -1
- package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
- package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNav.native.js +17 -0
- package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNavBody.native.js +17 -0
- package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNavFooter.native.js +17 -0
- package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +17 -0
- package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +17 -0
- package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNavLevel.native.js +17 -0
- package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNavSection.native.js +17 -0
- package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -0
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/native/components/index.js +7 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/size.js +1 -1
- package/build/lib/native/tokens/global/size.js.map +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItem.js +1 -0
- package/build/lib/web/development/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/Collapsible.js +4 -2
- package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleBody.js +4 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleBody.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleBodyContent.web.js +4 -2
- package/build/lib/web/development/components/Collapsible/CollapsibleBodyContent.web.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleLink.js +16 -4
- package/build/lib/web/development/components/Collapsible/CollapsibleLink.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/commonStyles.js +5 -1
- package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/Drawer/Drawer.web.js +25 -10
- package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/development/components/Drawer/DrawerContext.js +3 -1
- package/build/lib/web/development/components/Drawer/DrawerContext.js.map +1 -1
- package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js +26 -4
- package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
- package/build/lib/web/development/components/Drawer/StackProvider.js +21 -12
- package/build/lib/web/development/components/Drawer/StackProvider.js.map +1 -1
- package/build/lib/web/development/components/Drawer/index.js +1 -1
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +3 -0
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNav.web.js +360 -0
- package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavBody.web.js +17 -0
- package/build/lib/web/development/components/SideNav/SideNavBody.web.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavContext.js +23 -0
- package/build/lib/web/development/components/SideNav/SideNavContext.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavFooter.web.js +55 -0
- package/build/lib/web/development/components/SideNav/SideNavFooter.web.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js +66 -0
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js +348 -0
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavItems/TooltipifyNavItem.js +22 -0
- package/build/lib/web/development/components/SideNav/SideNavItems/TooltipifyNavItem.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavLevel.web.js +65 -0
- package/build/lib/web/development/components/SideNav/SideNavLevel.web.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNavSection.web.js +141 -0
- package/build/lib/web/development/components/SideNav/SideNavSection.web.js.map +1 -0
- package/build/lib/web/development/components/SideNav/index.js +8 -0
- package/build/lib/web/development/components/SideNav/index.js.map +1 -0
- package/build/lib/web/development/components/SideNav/tokens.js +33 -0
- package/build/lib/web/development/components/SideNav/tokens.js.map +1 -0
- package/build/lib/web/development/components/SkipNav/SkipNav.web.js +11 -3
- package/build/lib/web/development/components/SkipNav/SkipNav.web.js.map +1 -1
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +1 -1
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/development/components/index.js +9 -1
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/size.js +6 -0
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +1 -0
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItem.js +1 -0
- package/build/lib/web/production/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/Collapsible.js +4 -2
- package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleBody.js +4 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleBody.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleBodyContent.web.js +4 -2
- package/build/lib/web/production/components/Collapsible/CollapsibleBodyContent.web.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleLink.js +16 -4
- package/build/lib/web/production/components/Collapsible/CollapsibleLink.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/commonStyles.js +5 -1
- package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/Drawer/Drawer.web.js +25 -10
- package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/production/components/Drawer/DrawerContext.js +3 -1
- package/build/lib/web/production/components/Drawer/DrawerContext.js.map +1 -1
- package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js +26 -4
- package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
- package/build/lib/web/production/components/Drawer/StackProvider.js +21 -12
- package/build/lib/web/production/components/Drawer/StackProvider.js.map +1 -1
- package/build/lib/web/production/components/Drawer/index.js +1 -1
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +3 -0
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNav.web.js +360 -0
- package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavBody.web.js +17 -0
- package/build/lib/web/production/components/SideNav/SideNavBody.web.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavContext.js +23 -0
- package/build/lib/web/production/components/SideNav/SideNavContext.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavFooter.web.js +55 -0
- package/build/lib/web/production/components/SideNav/SideNavFooter.web.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js +66 -0
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js +348 -0
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavItems/TooltipifyNavItem.js +22 -0
- package/build/lib/web/production/components/SideNav/SideNavItems/TooltipifyNavItem.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavLevel.web.js +65 -0
- package/build/lib/web/production/components/SideNav/SideNavLevel.web.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNavSection.web.js +141 -0
- package/build/lib/web/production/components/SideNav/SideNavSection.web.js.map +1 -0
- package/build/lib/web/production/components/SideNav/index.js +8 -0
- package/build/lib/web/production/components/SideNav/index.js.map +1 -0
- package/build/lib/web/production/components/SideNav/tokens.js +33 -0
- package/build/lib/web/production/components/SideNav/tokens.js.map +1 -0
- package/build/lib/web/production/components/SkipNav/SkipNav.web.js +11 -3
- package/build/lib/web/production/components/SkipNav/SkipNav.web.js.map +1 -1
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +1 -1
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/production/components/index.js +9 -1
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/size.js +6 -0
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +1 -0
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/types/components/index.d.ts +1455 -1227
- package/build/types/components/index.native.d.ts +245 -36
- package/build/types/tokens/index.d.ts +6 -0
- package/build/types/tokens/index.native.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SideNavSection.native.js","sources":["../../../../../src/components/SideNav/SideNavSection.native.tsx"],"sourcesContent":["import type { SideNavSectionProps } from './types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst SideNavSection = (_props: SideNavSectionProps): React.ReactElement => {\n throwBladeError({\n message: 'SideNavSection is not yet implemented for native',\n moduleName: 'SideNavSection',\n });\n\n return <Text>SideNavSection Component is not available for Native mobile apps.</Text>;\n};\n\nexport { SideNavSection };\n"],"names":["SideNavSection","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,cAAc,CAAG,SAAjBA,cAAcA,CAAIC,MAA2B,CAAyB,CAC1EC,eAAe,CAAC,CACdC,OAAO,CAAE,kDAAkD,CAC3DC,UAAU,CAAE,gBACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,mEAAiE,CAAM,CAAC,CACvF;;;;"}
|
|
@@ -7,7 +7,7 @@ import { isReactNative } from '../../../utils/platform/isReactNative.js';
|
|
|
7
7
|
import '../../BladeProvider/useTheme.js';
|
|
8
8
|
import { makeLetterSpacing } from '../../../utils/makeLetterSpacing/makeLetterSpacing.js';
|
|
9
9
|
|
|
10
|
-
var getBaseTextStyles=function getBaseTextStyles(_ref){var _ref$color=_ref.color,color=_ref$color===void 0?'surface.text.gray.normal':_ref$color,_ref$fontFamily=_ref.fontFamily,fontFamily=_ref$fontFamily===void 0?'text':_ref$fontFamily,_ref$fontSize=_ref.fontSize,fontSize=_ref$fontSize===void 0?200:_ref$fontSize,_ref$fontWeight=_ref.fontWeight,fontWeight=_ref$fontWeight===void 0?'regular':_ref$fontWeight,_ref$fontStyle=_ref.fontStyle,fontStyle=_ref$fontStyle===void 0?'normal':_ref$fontStyle,_ref$textDecorationLi=_ref.textDecorationLine,textDecorationLine=_ref$textDecorationLi===void 0?'none':_ref$textDecorationLi,numberOfLines=_ref.numberOfLines,wordBreak=_ref.wordBreak,_ref$lineHeight=_ref.lineHeight,lineHeight=_ref$lineHeight===void 0?100:_ref$lineHeight,_ref$letterSpacing=_ref.letterSpacing,letterSpacing=_ref$letterSpacing===void 0?100:_ref$letterSpacing,textAlign=_ref.textAlign,opacity=_ref.opacity,theme=_ref.theme;var textColor=getIn(theme.colors,color);var themeFontFamily=theme.typography.fonts.family[fontFamily];var themeFontSize=makeTypographySize(theme.typography.fonts.size[fontSize]);var themeFontWeight=theme.typography.fonts.weight[fontWeight];var themeLineHeight=makeTypographySize(theme.typography.lineHeights[lineHeight]);var themeLetterSpacing=makeLetterSpacing(theme.typography.letterSpacings[letterSpacing],theme.typography.fonts.size[fontSize]);var truncateStyles={};var wordBreakStyles={};if(numberOfLines!==undefined){if(isReactNative()){truncateStyles={};}else {truncateStyles={overflow:'hidden',display:'-webkit-box','line-clamp':`${numberOfLines}`,'-webkit-line-clamp':`${numberOfLines}`,'-webkit-box-orient':'vertical',overflowWrap:'break-word'};}}if(wordBreak!==undefined){if(isReactNative()){wordBreakStyles={};}else {wordBreakStyles={wordBreak:wordBreak};}}return Object.assign({color:textColor,fontFamily:themeFontFamily,fontSize:themeFontSize,fontWeight:themeFontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine},textDecorationLine!=='none'&&{textDecorationColor:textColor},{lineHeight:themeLineHeight,letterSpacing:themeLetterSpacing,textAlign:textAlign,margin:0,padding:0,opacity:opacity},truncateStyles,wordBreakStyles);};
|
|
10
|
+
var getBaseTextStyles=function getBaseTextStyles(_ref){var _ref$color=_ref.color,color=_ref$color===void 0?'surface.text.gray.normal':_ref$color,_ref$fontFamily=_ref.fontFamily,fontFamily=_ref$fontFamily===void 0?'text':_ref$fontFamily,_ref$fontSize=_ref.fontSize,fontSize=_ref$fontSize===void 0?200:_ref$fontSize,_ref$fontWeight=_ref.fontWeight,fontWeight=_ref$fontWeight===void 0?'regular':_ref$fontWeight,_ref$fontStyle=_ref.fontStyle,fontStyle=_ref$fontStyle===void 0?'normal':_ref$fontStyle,_ref$textDecorationLi=_ref.textDecorationLine,textDecorationLine=_ref$textDecorationLi===void 0?'none':_ref$textDecorationLi,numberOfLines=_ref.numberOfLines,wordBreak=_ref.wordBreak,_ref$lineHeight=_ref.lineHeight,lineHeight=_ref$lineHeight===void 0?100:_ref$lineHeight,_ref$letterSpacing=_ref.letterSpacing,letterSpacing=_ref$letterSpacing===void 0?100:_ref$letterSpacing,textAlign=_ref.textAlign,opacity=_ref.opacity,theme=_ref.theme;var textColor=color==='currentColor'?'currentColor':getIn(theme.colors,color);var themeFontFamily=theme.typography.fonts.family[fontFamily];var themeFontSize=makeTypographySize(theme.typography.fonts.size[fontSize]);var themeFontWeight=theme.typography.fonts.weight[fontWeight];var themeLineHeight=makeTypographySize(theme.typography.lineHeights[lineHeight]);var themeLetterSpacing=makeLetterSpacing(theme.typography.letterSpacings[letterSpacing],theme.typography.fonts.size[fontSize]);var truncateStyles={};var wordBreakStyles={};if(numberOfLines!==undefined){if(isReactNative()){truncateStyles={};}else {truncateStyles={overflow:'hidden',display:'-webkit-box','line-clamp':`${numberOfLines}`,'-webkit-line-clamp':`${numberOfLines}`,'-webkit-box-orient':'vertical',overflowWrap:'break-word'};}}if(wordBreak!==undefined){if(isReactNative()){wordBreakStyles={};}else {wordBreakStyles={wordBreak:wordBreak};}}return Object.assign({color:textColor,fontFamily:themeFontFamily,fontSize:themeFontSize,fontWeight:themeFontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine},textDecorationLine!=='none'&&{textDecorationColor:textColor},{lineHeight:themeLineHeight,letterSpacing:themeLetterSpacing,textAlign:textAlign,margin:0,padding:0,opacity:opacity},truncateStyles,wordBreakStyles);};
|
|
11
11
|
|
|
12
12
|
export { getBaseTextStyles as default };
|
|
13
13
|
//# sourceMappingURL=getBaseTextStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBaseTextStyles.js","sources":["../../../../../../src/components/Typography/BaseText/getBaseTextStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { StyledBaseTextProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { isReactNative } from '~utils';\nimport { makeLetterSpacing } from '~utils/makeLetterSpacing';\n\nconst getBaseTextStyles = ({\n color = 'surface.text.gray.normal',\n fontFamily = 'text',\n fontSize = 200,\n fontWeight = 'regular',\n fontStyle = 'normal',\n textDecorationLine = 'none',\n numberOfLines,\n wordBreak,\n lineHeight = 100,\n letterSpacing = 100,\n textAlign,\n opacity,\n theme,\n}: StyledBaseTextProps): CSSObject => {\n const textColor = getIn(theme.colors, color);\n const themeFontFamily = theme.typography.fonts.family[fontFamily];\n const themeFontSize = makeTypographySize(theme.typography.fonts.size[fontSize]);\n const themeFontWeight = theme.typography.fonts.weight[fontWeight];\n const themeLineHeight = makeTypographySize(theme.typography.lineHeights[lineHeight]);\n const themeLetterSpacing = makeLetterSpacing(\n theme.typography.letterSpacings[letterSpacing],\n theme.typography.fonts.size[fontSize],\n );\n let truncateStyles: CSSObject = {};\n let wordBreakStyles: CSSObject = {};\n if (numberOfLines !== undefined) {\n if (isReactNative()) {\n truncateStyles = {};\n } else {\n truncateStyles = {\n overflow: 'hidden',\n display: '-webkit-box',\n 'line-clamp': `${numberOfLines}`,\n '-webkit-line-clamp': `${numberOfLines}`,\n '-webkit-box-orient': 'vertical',\n overflowWrap: 'break-word',\n };\n }\n }\n if (wordBreak !== undefined) {\n if (isReactNative()) {\n wordBreakStyles = {};\n } else {\n wordBreakStyles = {\n wordBreak,\n };\n }\n }\n\n return {\n color: textColor,\n fontFamily: themeFontFamily,\n fontSize: themeFontSize,\n fontWeight: themeFontWeight,\n fontStyle,\n textDecorationLine,\n ...(textDecorationLine !== 'none' && {\n textDecorationColor: textColor,\n }),\n lineHeight: themeLineHeight,\n letterSpacing: themeLetterSpacing,\n textAlign,\n margin: 0,\n padding: 0,\n opacity,\n ...truncateStyles,\n ...wordBreakStyles,\n };\n};\n\nexport default getBaseTextStyles;\n"],"names":["getBaseTextStyles","_ref","_ref$color","color","_ref$fontFamily","fontFamily","_ref$fontSize","fontSize","_ref$fontWeight","fontWeight","_ref$fontStyle","fontStyle","_ref$textDecorationLi","textDecorationLine","numberOfLines","wordBreak","_ref$lineHeight","lineHeight","_ref$letterSpacing","letterSpacing","textAlign","opacity","theme","textColor","getIn","colors","themeFontFamily","typography","fonts","family","themeFontSize","makeTypographySize","size","themeFontWeight","weight","themeLineHeight","lineHeights","themeLetterSpacing","makeLetterSpacing","letterSpacings","truncateStyles","wordBreakStyles","undefined","isReactNative","overflow","display","overflowWrap","Object","assign","textDecorationColor","margin","padding"],"mappings":";;;;;;;;;AAOM,IAAAA,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,IAAA,CAce,
|
|
1
|
+
{"version":3,"file":"getBaseTextStyles.js","sources":["../../../../../../src/components/Typography/BaseText/getBaseTextStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { StyledBaseTextProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { isReactNative } from '~utils';\nimport { makeLetterSpacing } from '~utils/makeLetterSpacing';\n\nconst getBaseTextStyles = ({\n color = 'surface.text.gray.normal',\n fontFamily = 'text',\n fontSize = 200,\n fontWeight = 'regular',\n fontStyle = 'normal',\n textDecorationLine = 'none',\n numberOfLines,\n wordBreak,\n lineHeight = 100,\n letterSpacing = 100,\n textAlign,\n opacity,\n theme,\n}: StyledBaseTextProps): CSSObject => {\n const textColor = color === 'currentColor' ? 'currentColor' : getIn(theme.colors, color);\n const themeFontFamily = theme.typography.fonts.family[fontFamily];\n const themeFontSize = makeTypographySize(theme.typography.fonts.size[fontSize]);\n const themeFontWeight = theme.typography.fonts.weight[fontWeight];\n const themeLineHeight = makeTypographySize(theme.typography.lineHeights[lineHeight]);\n const themeLetterSpacing = makeLetterSpacing(\n theme.typography.letterSpacings[letterSpacing],\n theme.typography.fonts.size[fontSize],\n );\n let truncateStyles: CSSObject = {};\n let wordBreakStyles: CSSObject = {};\n if (numberOfLines !== undefined) {\n if (isReactNative()) {\n truncateStyles = {};\n } else {\n truncateStyles = {\n overflow: 'hidden',\n display: '-webkit-box',\n 'line-clamp': `${numberOfLines}`,\n '-webkit-line-clamp': `${numberOfLines}`,\n '-webkit-box-orient': 'vertical',\n overflowWrap: 'break-word',\n };\n }\n }\n if (wordBreak !== undefined) {\n if (isReactNative()) {\n wordBreakStyles = {};\n } else {\n wordBreakStyles = {\n wordBreak,\n };\n }\n }\n\n return {\n color: textColor,\n fontFamily: themeFontFamily,\n fontSize: themeFontSize,\n fontWeight: themeFontWeight,\n fontStyle,\n textDecorationLine,\n ...(textDecorationLine !== 'none' && {\n textDecorationColor: textColor,\n }),\n lineHeight: themeLineHeight,\n letterSpacing: themeLetterSpacing,\n textAlign,\n margin: 0,\n padding: 0,\n opacity,\n ...truncateStyles,\n ...wordBreakStyles,\n };\n};\n\nexport default getBaseTextStyles;\n"],"names":["getBaseTextStyles","_ref","_ref$color","color","_ref$fontFamily","fontFamily","_ref$fontSize","fontSize","_ref$fontWeight","fontWeight","_ref$fontStyle","fontStyle","_ref$textDecorationLi","textDecorationLine","numberOfLines","wordBreak","_ref$lineHeight","lineHeight","_ref$letterSpacing","letterSpacing","textAlign","opacity","theme","textColor","getIn","colors","themeFontFamily","typography","fonts","family","themeFontSize","makeTypographySize","size","themeFontWeight","weight","themeLineHeight","lineHeights","themeLetterSpacing","makeLetterSpacing","letterSpacings","truncateStyles","wordBreakStyles","undefined","isReactNative","overflow","display","overflowWrap","Object","assign","textDecorationColor","margin","padding"],"mappings":";;;;;;;;;AAOM,IAAAA,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,IAAA,CAce,CAAAC,IAAAA,UAAA,CAAAD,IAAA,CAbpCE,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,0BAA0B,CAAAA,UAAA,CAAAE,eAAA,CAAAH,IAAA,CAClCI,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAA,KAAA,CAAA,CAAG,MAAM,CAAAA,eAAA,CAAAE,aAAA,CAAAL,IAAA,CACnBM,QAAQ,CAARA,QAAQ,CAAAD,aAAA,GAAA,KAAA,CAAA,CAAG,GAAG,CAAAA,aAAA,CAAAE,eAAA,CAAAP,IAAA,CACdQ,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,eAAA,CAAAE,cAAA,CAAAT,IAAA,CACtBU,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,cAAA,CAAAE,qBAAA,CAAAX,IAAA,CACpBY,kBAAkB,CAAlBA,kBAAkB,CAAAD,qBAAA,GAAA,KAAA,CAAA,CAAG,MAAM,CAAAA,qBAAA,CAC3BE,aAAa,CAAAb,IAAA,CAAba,aAAa,CACbC,SAAS,CAAAd,IAAA,CAATc,SAAS,CAAAC,eAAA,CAAAf,IAAA,CACTgB,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAA,KAAA,CAAA,CAAG,GAAG,CAAAA,eAAA,CAAAE,kBAAA,CAAAjB,IAAA,CAChBkB,aAAa,CAAbA,aAAa,CAAAD,kBAAA,GAAA,KAAA,CAAA,CAAG,GAAG,CAAAA,kBAAA,CACnBE,SAAS,CAAAnB,IAAA,CAATmB,SAAS,CACTC,OAAO,CA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E,CAAE,CACnBF,eAAe,CAAG,EAAE,CACtB,CAAC,KAAM,CACLA,eAAe,CAAG,CAChB1B,SAAS,CAATA,SACF,CAAC,CACH,CACF,CAEA,OAAAgC,MAAA,CAAAC,MAAA,CACE7C,CAAAA,KAAK,CAAEoB,SAAS,CAChBlB,UAAU,CAAEqB,eAAe,CAC3BnB,QAAQ,CAAEuB,aAAa,CACvBrB,UAAU,CAAEwB,eAAe,CAC3BtB,SAAS,CAATA,SAAS,CACTE,kBAAkB,CAAlBA,kBAAkB,CAAA,CACdA,kBAAkB,GAAK,MAAM,EAAI,CACnCoC,mBAAmB,CAAE1B,SACvB,CAAC,EACDN,UAAU,CAAEkB,eAAe,CAC3BhB,aAAa,CAAEkB,kBAAkB,CACjCjB,SAAS,CAATA,SAAS,CACT8B,MAAM,CAAE,CAAC,CACTC,OAAO,CAAE,CAAC,CACV9B,OAAO,CAAPA,OAAO,CACJmB,CAAAA,cAAc,CACdC,eAAe,EAEtB;;;;"}
|
|
@@ -408,6 +408,13 @@ export { PopoverInteractiveWrapper } from './Popover/PopoverInteractiveWrapper.n
|
|
|
408
408
|
export { ProgressBar } from './ProgressBar/ProgressBar.js';
|
|
409
409
|
export { Radio } from './Radio/Radio.js';
|
|
410
410
|
export { RadioGroup } from './Radio/RadioGroup/RadioGroup.js';
|
|
411
|
+
export { SideNav } from './SideNav/SideNav.native.js';
|
|
412
|
+
export { SideNavLink } from './SideNav/SideNavItems/SideNavLink.native.js';
|
|
413
|
+
export { SideNavLevel } from './SideNav/SideNavLevel.native.js';
|
|
414
|
+
export { SideNavSection } from './SideNav/SideNavSection.native.js';
|
|
415
|
+
export { SideNavItem } from './SideNav/SideNavItems/SideNavItem.native.js';
|
|
416
|
+
export { SideNavFooter } from './SideNav/SideNavFooter.native.js';
|
|
417
|
+
export { SideNavBody } from './SideNav/SideNavBody.native.js';
|
|
411
418
|
export { Skeleton } from './Skeleton/Skeleton.js';
|
|
412
419
|
export { SkipNavContent, SkipNavLink } from './SkipNav/SkipNav.native.js';
|
|
413
420
|
export { Spinner } from './Spinner/Spinner/Spinner.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var size={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,10:10,12:12,14:14,15:15,16:16,18:18,20:20,24:24,28:28,30:30,32:32,33:33,36:36,40:40,44:44,48:48,56:56,60:60,64:64,72:72,100:100,120:120,140:140,160:160,176:176,200:200,240:240,300:300,314:314,360:360,400:400,584:584,640:640,760:760,800:800,1024:1024,1136:1136};
|
|
1
|
+
var size={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,10:10,12:12,14:14,15:15,16:16,18:18,20:20,24:24,28:28,30:30,32:32,33:33,36:36,40:40,44:44,48:48,52:52,56:56,60:60,64:64,72:72,100:100,120:120,140:140,160:160,176:176,200:200,240:240,256:256,264:264,300:300,314:314,360:360,400:400,584:584,640:640,760:760,800:800,1024:1024,1136:1136};
|
|
2
2
|
|
|
3
3
|
export { size };
|
|
4
4
|
//# sourceMappingURL=size.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sources":["../../../../../src/tokens/global/size.ts"],"sourcesContent":["/**\n * Size tokens are currently not exposed for users (therefore not available in theme)\n */\nexport const size = {\n /** 0 px */\n 0: 0,\n /** 1 px */\n 1: 1,\n /** 2 px */\n 2: 2,\n /** 3 px */\n 3: 3,\n /** 4 px */\n 4: 4,\n /** 5 px */\n 5: 5,\n /** 6 px */\n 6: 6,\n /** 7 px */\n 7: 7,\n /** 8 px */\n 8: 8,\n /** 10 px */\n 10: 10,\n /** 12 px */\n 12: 12,\n /** 14 px */\n 14: 14,\n /** 15 px */\n 15: 15,\n /** 16 px */\n 16: 16,\n /** 18 px */\n 18: 18,\n /** 20 px */\n 20: 20,\n /** 24 px */\n 24: 24,\n /** 28 px */\n 28: 28,\n /** 32 px */\n 30: 30,\n /** 32 px */\n 32: 32,\n /** 33 px */\n 33: 33,\n /** 36 px */\n 36: 36,\n /** 40 px */\n 40: 40,\n /** 44 px */\n 44: 44,\n /** 48 px */\n 48: 48,\n /** 56 px */\n 56: 56,\n /** 60 px */\n 60: 60,\n /** 64 px */\n 64: 64,\n /** 72 px */\n 72: 72,\n /** 100 px */\n 100: 100,\n /** 120 px */\n 120: 120,\n /** 140 px */\n 140: 140,\n /** 160 px */\n 160: 160,\n /** 176 px */\n 176: 176,\n /** 200 px */\n 200: 200,\n /** 240 px */\n 240: 240,\n /** 300 px */\n 300: 300,\n /** 314 px */\n 314: 314,\n /** 360 px */\n 360: 360,\n /** 400 px */\n 400: 400,\n /** 584 px */\n 584: 584,\n /** 640 px */\n 640: 640,\n /** 760 px */\n 760: 760,\n /** 800 px */\n 800: 800,\n /** 1024 px */\n 1024: 1024,\n /** 1136 px */\n 1136: 1136,\n} as const;\n\nexport type Size = typeof size;\n"],"names":["size"],"mappings":"AAGa,IAAAA,IAAI,CAAG,CAElB,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,IAAI,CAAE,IAAI,CAEV,IAAI,CAAE,IACR;;;;"}
|
|
1
|
+
{"version":3,"file":"size.js","sources":["../../../../../src/tokens/global/size.ts"],"sourcesContent":["/**\n * Size tokens are currently not exposed for users (therefore not available in theme)\n */\nexport const size = {\n /** 0 px */\n 0: 0,\n /** 1 px */\n 1: 1,\n /** 2 px */\n 2: 2,\n /** 3 px */\n 3: 3,\n /** 4 px */\n 4: 4,\n /** 5 px */\n 5: 5,\n /** 6 px */\n 6: 6,\n /** 7 px */\n 7: 7,\n /** 8 px */\n 8: 8,\n /** 10 px */\n 10: 10,\n /** 12 px */\n 12: 12,\n /** 14 px */\n 14: 14,\n /** 15 px */\n 15: 15,\n /** 16 px */\n 16: 16,\n /** 18 px */\n 18: 18,\n /** 20 px */\n 20: 20,\n /** 24 px */\n 24: 24,\n /** 28 px */\n 28: 28,\n /** 32 px */\n 30: 30,\n /** 32 px */\n 32: 32,\n /** 33 px */\n 33: 33,\n /** 36 px */\n 36: 36,\n /** 40 px */\n 40: 40,\n /** 44 px */\n 44: 44,\n /** 48 px */\n 48: 48,\n /** 52 px */\n 52: 52,\n /** 56 px */\n 56: 56,\n /** 60 px */\n 60: 60,\n /** 64 px */\n 64: 64,\n /** 72 px */\n 72: 72,\n /** 100 px */\n 100: 100,\n /** 120 px */\n 120: 120,\n /** 140 px */\n 140: 140,\n /** 160 px */\n 160: 160,\n /** 176 px */\n 176: 176,\n /** 200 px */\n 200: 200,\n /** 240 px */\n 240: 240,\n /** 256 px */\n 256: 256,\n /** 264 px */\n 264: 264,\n /** 300 px */\n 300: 300,\n /** 314 px */\n 314: 314,\n /** 360 px */\n 360: 360,\n /** 400 px */\n 400: 400,\n /** 584 px */\n 584: 584,\n /** 640 px */\n 640: 640,\n /** 760 px */\n 760: 760,\n /** 800 px */\n 800: 800,\n /** 1024 px */\n 1024: 1024,\n /** 1136 px */\n 1136: 1136,\n} as const;\n\nexport type Size = typeof size;\n"],"names":["size"],"mappings":"AAGa,IAAAA,IAAI,CAAG,CAElB,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,IAAI,CAAE,IAAI,CAEV,IAAI,CAAE,IACR;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Avatar:'avatar',AvatarGroup:'avatar-group',Badge:'badge',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',ButtonGroup:'button-group',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',Carousel:'carousel',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Drawer:'drawer',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',DatePicker:'datepicker',Calendar:'calendar',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',OTPInput:'otp-input',PasswordInput:'password-input',SearchInput:'search-input',TextArea:'textarea',TextInput:'textinput',PhoneNumberInput:'phone-number-input',Toast:'toast',ToastContainer:'toast-container',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton',StepGroup:'step-group',StepItem:'step-item'};
|
|
1
|
+
var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Avatar:'avatar',AvatarGroup:'avatar-group',Badge:'badge',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',ButtonGroup:'button-group',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',Carousel:'carousel',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Drawer:'drawer',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',DatePicker:'datepicker',Calendar:'calendar',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',OTPInput:'otp-input',PasswordInput:'password-input',SearchInput:'search-input',TextArea:'textarea',TextInput:'textinput',PhoneNumberInput:'phone-number-input',Toast:'toast',ToastContainer:'toast-container',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SideNav:'sidenav',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton',StepGroup:'step-group',StepItem:'step-item'};
|
|
2
2
|
|
|
3
3
|
export { MetaConstants };
|
|
4
4
|
//# sourceMappingURL=metaConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,cAAc,CAAE,kBAAkB,CAClCC,iBAAiB,CAAE,qBAAqB,CACxCC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ,CAChBC,YAAY,CAAE,cAAc,CAC5BC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,KAAK,CAAE,OAAO,CACdC,GAAG,CAAE,KAAK,CACVC,OAAO,CAAE,UAAU,CACnBC,QAAQ,CAAE,WAAW,CACrBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,UAAU,CAAE,Y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AAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,QAAQ,CAAE,UAAU,CACpBC,SAAS,CAAE,YAAY,CACvBC,QAAQ,CAAE,WACZ;;;;"}
|
|
1
|
+
{"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,cAAc,CAAE,kBAAkB,CAClCC,iBAAiB,CAAE,qBAAqB,CACxCC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ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CC,eAAe,CAAE,kBAAkB,CACnCC,KAAK,CAAE,OAAO,CACdC,SAAS,CAAE,YAAY,CACvBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,kBAAkB,CAAE,sBAAsB,CAC1CC,cAAc,CAAE,iBAAiB,CACjCC,SAAS,CAAE,YAAY,CACvBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,QAAQ,CAAE,UAAU,CACpBC,SAAS,CAAE,YAAY,CACvBC,QAAQ,CAAE,WACZ;;;;"}
|
|
@@ -82,6 +82,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
82
82
|
// Accordion has its own width restrictions
|
|
83
83
|
,
|
|
84
84
|
_shouldApplyWidthRestrictions: false,
|
|
85
|
+
_dangerouslyDisableValidations: true,
|
|
85
86
|
children: [/*#__PURE__*/jsx(AccordionButton, {
|
|
86
87
|
index: _index,
|
|
87
88
|
icon: icon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.js","sources":["../../../../../../src/components/Accordion/AccordionItem.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport React from 'react';\nimport { AccordionButton } from './AccordionButton';\nimport { AccordionItemContext, useAccordion } from './AccordionContext';\nimport { AccordionItemBody } from './AccordionItemBody';\nimport { componentIds } from './componentIds';\nimport { Divider } from '~components/Divider';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { isReactNative } from '~utils';\nimport { Collapsible } from '~components/Collapsible/Collapsible';\nimport { CollapsibleBody } from '~components/Collapsible';\nimport type { TestID } from '~utils/types';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype AccordionItemProps = {\n /**\n * Title text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n title?: string;\n\n /**\n * Body text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n description?: string;\n\n /**\n * Renders a Blade icon as title prefix (requires `showNumberPrefix={false}`)\n *\n * @deprecated Use `leading={<StarIcon size=\"large\" />}` on AccordionItemHeader instead\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n icon?: IconComponent;\n\n /**\n * Slot, renders any custom content\n */\n children?: ReactNode | ReactNode[];\n\n /**\n * Disabled state of the item\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * **Internal:** used for determining numbering, you don't need to pass this,\n * instead pass `showNumberPrefix` to root `Accordion`\n */\n _index?: number;\n} & TestID;\n\nconst AccordionItem = ({\n title,\n description,\n icon,\n children,\n isDisabled,\n _index,\n testID,\n}: AccordionItemProps): ReactElement => {\n const {\n expandedIndex,\n onExpandChange,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n } = useAccordion();\n const isExpanded = expandedIndex === _index;\n const isDefaultExpanded = defaultExpandedIndex === _index;\n const isDeprecatedAPI = Boolean(title) || Boolean(description) || Boolean(icon);\n const [header, body] = React.Children.toArray(children);\n\n if (!isDeprecatedAPI) {\n // Only doing validation in new API. Deprecated API allows everything as AccordionItem children\n const headerComponentId = getComponentId(header);\n const bodyComponentId = getComponentId(body);\n\n if (\n headerComponentId !== componentIds.AccordionItemHeader &&\n bodyComponentId !== componentIds.AccordionItemBody\n ) {\n throwBladeError({\n message:\n 'AccordionItem only allows AccordionItemHeader as first component and AccordionItemBody as second. Check Accordion documentation',\n moduleName: 'AccordionItem',\n });\n }\n }\n\n const isLastItem = _index !== undefined && _index < numberOfItems - 1;\n\n const handleExpandChange = ({ isExpanded }: { isExpanded: boolean }): void => {\n if (isExpanded && typeof _index !== 'undefined') {\n onExpandChange(_index);\n } else {\n onExpandChange(-1);\n }\n };\n\n return (\n <AccordionItemContext.Provider\n value={{\n index: _index,\n isDisabled,\n }}\n >\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItem, testID })}>\n <Collapsible\n isExpanded={isExpanded}\n defaultIsExpanded={isDefaultExpanded}\n onExpandChange={handleExpandChange}\n // Accordion has its own width restrictions\n _shouldApplyWidthRestrictions={false}\n >\n <AccordionButton\n index={_index}\n icon={icon}\n title={title}\n header={header}\n isDisabled={isDisabled}\n isDeprecatedAPI={isDeprecatedAPI}\n />\n <CollapsibleBody\n // Just React Native things, need this 100% so collapsed content flows correctly inside Accordion\n // In new API, AccordionItemBody takes 100% width to avoid issues like this - https://github.com/razorpay/blade/pull/1814\n width={isReactNative() || !isDeprecatedAPI ? '100%' : undefined}\n >\n {isDeprecatedAPI ? (\n <AccordionItemBody _description={description}>{children}</AccordionItemBody>\n ) : (\n body\n )}\n </CollapsibleBody>\n </Collapsible>\n {isLastItem || variant === 'transparent' ? <Divider /> : null}\n </BaseBox>\n </AccordionItemContext.Provider>\n );\n};\n\nexport type { AccordionItemProps };\nexport { AccordionItem };\n"],"names":["AccordionItem","_ref","title","description","icon","children","isDisabled","_index","testID","_useAccordion","useAccordion","expandedIndex","onExpandChange","defaultExpandedIndex","variant","numberOfItems","isExpanded","isDefaultExpanded","isDeprecatedAPI","Boolean","_React$Children$toArr","React","Children","toArray","_React$Children$toArr2","_slicedToArray","header","body","headerComponentId","getComponentId","bodyComponentId","componentIds","AccordionItemHeader","AccordionItemBody","throwBladeError","message","moduleName","isLastItem","undefined","handleExpandChange","_ref2","_jsx","AccordionItemContext","Provider","value","index","_jsxs","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","Collapsible","defaultIsExpanded","_shouldApplyWidthRestrictions","AccordionButton","CollapsibleBody","width","isReactNative","_description","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,C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;
|
|
1
|
+
{"version":3,"file":"AccordionItem.js","sources":["../../../../../../src/components/Accordion/AccordionItem.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport React from 'react';\nimport { AccordionButton } from './AccordionButton';\nimport { AccordionItemContext, useAccordion } from './AccordionContext';\nimport { AccordionItemBody } from './AccordionItemBody';\nimport { componentIds } from './componentIds';\nimport { Divider } from '~components/Divider';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { isReactNative } from '~utils';\nimport { Collapsible } from '~components/Collapsible/Collapsible';\nimport { CollapsibleBody } from '~components/Collapsible';\nimport type { TestID } from '~utils/types';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype AccordionItemProps = {\n /**\n * Title text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n title?: string;\n\n /**\n * Body text content\n *\n * @deprecated Use AccordionItemHeader and AccordionItemBody\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n description?: string;\n\n /**\n * Renders a Blade icon as title prefix (requires `showNumberPrefix={false}`)\n *\n * @deprecated Use `leading={<StarIcon size=\"large\" />}` on AccordionItemHeader instead\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs for new API\n */\n icon?: IconComponent;\n\n /**\n * Slot, renders any custom content\n */\n children?: ReactNode | ReactNode[];\n\n /**\n * Disabled state of the item\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * **Internal:** used for determining numbering, you don't need to pass this,\n * instead pass `showNumberPrefix` to root `Accordion`\n */\n _index?: number;\n} & TestID;\n\nconst AccordionItem = ({\n title,\n description,\n icon,\n children,\n isDisabled,\n _index,\n testID,\n}: AccordionItemProps): ReactElement => {\n const {\n expandedIndex,\n onExpandChange,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n } = useAccordion();\n const isExpanded = expandedIndex === _index;\n const isDefaultExpanded = defaultExpandedIndex === _index;\n const isDeprecatedAPI = Boolean(title) || Boolean(description) || Boolean(icon);\n const [header, body] = React.Children.toArray(children);\n\n if (!isDeprecatedAPI) {\n // Only doing validation in new API. Deprecated API allows everything as AccordionItem children\n const headerComponentId = getComponentId(header);\n const bodyComponentId = getComponentId(body);\n\n if (\n headerComponentId !== componentIds.AccordionItemHeader &&\n bodyComponentId !== componentIds.AccordionItemBody\n ) {\n throwBladeError({\n message:\n 'AccordionItem only allows AccordionItemHeader as first component and AccordionItemBody as second. Check Accordion documentation',\n moduleName: 'AccordionItem',\n });\n }\n }\n\n const isLastItem = _index !== undefined && _index < numberOfItems - 1;\n\n const handleExpandChange = ({ isExpanded }: { isExpanded: boolean }): void => {\n if (isExpanded && typeof _index !== 'undefined') {\n onExpandChange(_index);\n } else {\n onExpandChange(-1);\n }\n };\n\n return (\n <AccordionItemContext.Provider\n value={{\n index: _index,\n isDisabled,\n }}\n >\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItem, testID })}>\n <Collapsible\n isExpanded={isExpanded}\n defaultIsExpanded={isDefaultExpanded}\n onExpandChange={handleExpandChange}\n // Accordion has its own width restrictions\n _shouldApplyWidthRestrictions={false}\n _dangerouslyDisableValidations={true}\n >\n <AccordionButton\n index={_index}\n icon={icon}\n title={title}\n header={header}\n isDisabled={isDisabled}\n isDeprecatedAPI={isDeprecatedAPI}\n />\n <CollapsibleBody\n // Just React Native things, need this 100% so collapsed content flows correctly inside Accordion\n // In new API, AccordionItemBody takes 100% width to avoid issues like this - https://github.com/razorpay/blade/pull/1814\n width={isReactNative() || !isDeprecatedAPI ? '100%' : undefined}\n >\n {isDeprecatedAPI ? (\n <AccordionItemBody _description={description}>{children}</AccordionItemBody>\n ) : (\n body\n )}\n </CollapsibleBody>\n </Collapsible>\n {isLastItem || variant === 'transparent' ? <Divider /> : null}\n </BaseBox>\n </AccordionItemContext.Provider>\n );\n};\n\nexport type { AccordionItemProps };\nexport { AccordionItem };\n"],"names":["AccordionItem","_ref","title","description","icon","children","isDisabled","_index","testID","_useAccordion","useAccordion","expandedIndex","onExpandChange","defaultExpandedIndex","variant","numberOfItems","isExpanded","isDefaultExpanded","isDeprecatedAPI","Boolean","_React$Children$toArr","React","Children","toArray","_React$Children$toArr2","_slicedToArray","header","body","headerComponentId","getComponentId","bodyComponentId","componentIds","AccordionItemHeader","AccordionItemBody","throwBladeError","message","moduleName","isLastItem","undefined","handleExpandChange","_ref2","_jsx","AccordionItemContext","Provider","value","index","_jsxs","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","Collapsible","defaultIsExpanded","_shouldApplyWidthRestrictions","_dangerouslyDisableValidations","AccordionButton","CollapsibleBody","width","isReactNative","_description","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQqB;AAAA,EAAA,IAPtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,UAAU,GAAAL,IAAA,CAAVK,UAAU;IACVC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,MAAM,GAAAP,IAAA,CAANO,MAAM,CAAA;AAEN,EAAA,IAAAC,aAAA,GAMIC,YAAY,EAAE;IALhBC,aAAa,GAAAF,aAAA,CAAbE,aAAa;IACbC,cAAc,GAAAH,aAAA,CAAdG,cAAc;IACdC,oBAAoB,GAAAJ,aAAA,CAApBI,oBAAoB;IACpBC,OAAO,GAAAL,aAAA,CAAPK,OAAO;IACPC,aAAa,GAAAN,aAAA,CAAbM,aAAa,CAAA;AAEf,EAAA,IAAMC,UAAU,GAAGL,aAAa,KAAKJ,MAAM,CAAA;AAC3C,EAAA,I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,OACP,CAAC,EACbU,UAAU,IAAIvB,OAAO,KAAK,aAAa,gBAAG2B,GAAA,CAACoB,OAAO,EAAE,EAAA,CAAC,GAAG,IAAI,CAAA;KACtD,CAAA,CAAA;AAAC,GACmB,CAAC,CAAA;AAEpC;;;;"}
|
|
@@ -22,7 +22,7 @@ import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
|
22
22
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
23
23
|
import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
|
|
24
24
|
|
|
25
|
-
var _excluded = ["children", "direction", "defaultIsExpanded", "isExpanded", "onExpandChange", "testID", "_shouldApplyWidthRestrictions"];
|
|
25
|
+
var _excluded = ["children", "direction", "defaultIsExpanded", "isExpanded", "onExpandChange", "testID", "_shouldApplyWidthRestrictions", "_dangerouslyDisableValidations"];
|
|
26
26
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
28
|
var MIN_WIDTH = makeSize(size[200]);
|
|
@@ -37,6 +37,8 @@ var Collapsible = function Collapsible(_ref) {
|
|
|
37
37
|
testID = _ref.testID,
|
|
38
38
|
_ref$_shouldApplyWidt = _ref._shouldApplyWidthRestrictions,
|
|
39
39
|
_shouldApplyWidthRestrictions = _ref$_shouldApplyWidt === void 0 ? true : _ref$_shouldApplyWidt,
|
|
40
|
+
_ref$_dangerouslyDisa = _ref._dangerouslyDisableValidations,
|
|
41
|
+
_dangerouslyDisableValidations = _ref$_dangerouslyDisa === void 0 ? false : _ref$_dangerouslyDisa,
|
|
40
42
|
styledProps = _objectWithoutProperties(_ref, _excluded);
|
|
41
43
|
var _useState = useState(isExpanded !== null && isExpanded !== void 0 ? isExpanded : defaultIsExpanded),
|
|
42
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -75,7 +77,7 @@ var Collapsible = function Collapsible(_ref) {
|
|
|
75
77
|
}, [isBodyExpanded, direction, handleExpandChange, isExpanded, collapsibleBodyId]);
|
|
76
78
|
if (true) {
|
|
77
79
|
Children.forEach(children, function (child) {
|
|
78
|
-
if (!(isValidAllowedChildren(child, MetaConstants.CollapsibleBody) || isValidAllowedChildren(child, MetaConstants.CollapsibleButton) || isValidAllowedChildren(child, MetaConstants.CollapsibleLink)
|
|
80
|
+
if (!(isValidAllowedChildren(child, MetaConstants.CollapsibleBody) || isValidAllowedChildren(child, MetaConstants.CollapsibleButton) || isValidAllowedChildren(child, MetaConstants.CollapsibleLink)) && !_dangerouslyDisableValidations) {
|
|
79
81
|
throwBladeError({
|
|
80
82
|
message: "only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink",
|
|
81
83
|
moduleName: 'Collapsible'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.js","sources":["../../../../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { Children, useCallback, useRef, useState, useMemo } from 'react';\n\nimport type { CollapsibleContextState } from './CollapsibleContext';\nimport { CollapsibleContext } from './CollapsibleContext';\nimport { MAX_WIDTH, MAX_WIDTH_NO_RESTRICTIONS } from './styles';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { makeSize } from '~utils';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype CollapsibleProps = {\n /**\n * Composes `CollapsibleButton`, `CollapsibleLink`, `CollapsibleBody`\n */\n children: ReactNode;\n\n /**\n * Direction in which the content expands\n *\n * @default bottom\n */\n direction?: 'bottom' | 'top';\n\n /**\n * Expands the collapsible content by default (uncontrolled)\n *\n * @default false\n */\n defaultIsExpanded?: boolean;\n\n /**\n * Expands the collapsible content (controlled)\n *\n * @default undefined\n */\n isExpanded?: boolean;\n\n /**\n * Callback for change in collapsible's expanded state\n *\n * @default undefined\n */\n onExpandChange?: ({ isExpanded }: { isExpanded: boolean }) => void;\n\n /**\n * **Internal**: used to override responsive width restrictions\n */\n _shouldApplyWidthRestrictions?: boolean;\n} & TestID &\n StyledPropsBlade;\n\nconst MIN_WIDTH: BoxProps['minWidth'] = makeSize(size[200]);\n\nconst Collapsible = ({\n children,\n direction = 'bottom',\n defaultIsExpanded = false,\n isExpanded,\n onExpandChange,\n testID,\n _shouldApplyWidthRestrictions = true,\n ...styledProps\n}: CollapsibleProps): ReactElement => {\n const [isBodyExpanded, setIsBodyExpanded] = useState(isExpanded ?? defaultIsExpanded);\n const collapsibleBodyId = useId(MetaConstants.CollapsibleBody);\n\n /**\n * Maintain a ref to the initial value of `defaultExpanded || isExpanded` so changing it has no effect.\n * This will help in determining the correct initial height of collapsing body content\n */\n const initialDefaultExpanded = useRef(Boolean(defaultIsExpanded || isExpanded));\n\n const handleExpandChange = useCallback(\n (nextIsExpanded: boolean) => {\n if (typeof isExpanded !== 'undefined') {\n // controlled\n onExpandChange?.({ isExpanded: nextIsExpanded });\n } else {\n // uncontrolled\n setIsBodyExpanded(nextIsExpanded);\n onExpandChange?.({ isExpanded: nextIsExpanded });\n }\n },\n [onExpandChange, isExpanded],\n );\n\n const contextValue = useMemo<CollapsibleContextState>(\n () => ({\n // controlled behavior if isExpanded is provided\n isExpanded: isExpanded ?? isBodyExpanded,\n onExpandChange: handleExpandChange,\n defaultIsExpanded: initialDefaultExpanded.current,\n direction,\n collapsibleBodyId,\n }),\n [isBodyExpanded, direction, handleExpandChange, isExpanded, collapsibleBodyId],\n );\n\n if (__DEV__) {\n Children.forEach(children, (child) => {\n if (\n !(\n isValidAllowedChildren(child, MetaConstants.CollapsibleBody) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleButton) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleLink)
|
|
1
|
+
{"version":3,"file":"Collapsible.js","sources":["../../../../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { Children, useCallback, useRef, useState, useMemo } from 'react';\n\nimport type { CollapsibleContextState } from './CollapsibleContext';\nimport { CollapsibleContext } from './CollapsibleContext';\nimport { MAX_WIDTH, MAX_WIDTH_NO_RESTRICTIONS } from './styles';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { makeSize } from '~utils';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype CollapsibleProps = {\n /**\n * Composes `CollapsibleButton`, `CollapsibleLink`, `CollapsibleBody`\n */\n children: ReactNode;\n\n /**\n * Direction in which the content expands\n *\n * @default bottom\n */\n direction?: 'bottom' | 'top';\n\n /**\n * Expands the collapsible content by default (uncontrolled)\n *\n * @default false\n */\n defaultIsExpanded?: boolean;\n\n /**\n * Expands the collapsible content (controlled)\n *\n * @default undefined\n */\n isExpanded?: boolean;\n\n /**\n * Callback for change in collapsible's expanded state\n *\n * @default undefined\n */\n onExpandChange?: ({ isExpanded }: { isExpanded: boolean }) => void;\n\n /**\n * **Internal**: disables trigger validations. Used for AccordionButton and SideNavLink internally\n */\n _dangerouslyDisableValidations?: boolean;\n /**\n * **Internal**: used to override responsive width restrictions\n */\n _shouldApplyWidthRestrictions?: boolean;\n} & TestID &\n StyledPropsBlade;\n\nconst MIN_WIDTH: BoxProps['minWidth'] = makeSize(size[200]);\n\nconst Collapsible = ({\n children,\n direction = 'bottom',\n defaultIsExpanded = false,\n isExpanded,\n onExpandChange,\n testID,\n _shouldApplyWidthRestrictions = true,\n _dangerouslyDisableValidations = false,\n ...styledProps\n}: CollapsibleProps): ReactElement => {\n const [isBodyExpanded, setIsBodyExpanded] = useState(isExpanded ?? defaultIsExpanded);\n const collapsibleBodyId = useId(MetaConstants.CollapsibleBody);\n\n /**\n * Maintain a ref to the initial value of `defaultExpanded || isExpanded` so changing it has no effect.\n * This will help in determining the correct initial height of collapsing body content\n */\n const initialDefaultExpanded = useRef(Boolean(defaultIsExpanded || isExpanded));\n\n const handleExpandChange = useCallback(\n (nextIsExpanded: boolean) => {\n if (typeof isExpanded !== 'undefined') {\n // controlled\n onExpandChange?.({ isExpanded: nextIsExpanded });\n } else {\n // uncontrolled\n setIsBodyExpanded(nextIsExpanded);\n onExpandChange?.({ isExpanded: nextIsExpanded });\n }\n },\n [onExpandChange, isExpanded],\n );\n\n const contextValue = useMemo<CollapsibleContextState>(\n () => ({\n // controlled behavior if isExpanded is provided\n isExpanded: isExpanded ?? isBodyExpanded,\n onExpandChange: handleExpandChange,\n defaultIsExpanded: initialDefaultExpanded.current,\n direction,\n collapsibleBodyId,\n }),\n [isBodyExpanded, direction, handleExpandChange, isExpanded, collapsibleBodyId],\n );\n\n if (__DEV__) {\n Children.forEach(children, (child) => {\n if (\n !(\n isValidAllowedChildren(child, MetaConstants.CollapsibleBody) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleButton) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleLink)\n ) &&\n !_dangerouslyDisableValidations\n ) {\n throwBladeError({\n message: `only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,\n moduleName: 'Collapsible',\n });\n }\n });\n }\n\n return (\n <CollapsibleContext.Provider value={contextValue}>\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Collapsible, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={direction === 'bottom' ? 'column' : 'column-reverse'}\n alignItems=\"flex-start\"\n minWidth={_shouldApplyWidthRestrictions ? MIN_WIDTH : makeSize(size[0])}\n maxWidth={_shouldApplyWidthRestrictions ? MAX_WIDTH : MAX_WIDTH_NO_RESTRICTIONS}\n >\n {children}\n </BaseBox>\n </BaseBox>\n </CollapsibleContext.Provider>\n );\n};\n\nexport type { CollapsibleProps };\nexport { Collapsible };\n"],"names":["MIN_WIDTH","makeSize","size","Collapsible","_ref","children","_ref$direction","direction","_ref$defaultIsExpande","defaultIsExpanded","isExpanded","onExpandChange","testID","_ref$_shouldApplyWidt","_shouldApplyWidthRestrictions","_ref$_dangerouslyDisa","_dangerouslyDisableValidations","styledProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isBodyExpanded","setIsBodyExpanded","collapsibleBodyId","useId","MetaConstants","CollapsibleBody","initialDefaultExpanded","useRef","Boolean","handleExpandChange","useCallback","nextIsExpanded","contextValue","useMemo","current","Children","forEach","child","isValidAllowedChildren","CollapsibleButton","CollapsibleLink","throwBladeError","message","moduleName","_jsx","CollapsibleContext","Provider","value","BaseBox","_objectSpread","metaAttribute","name","getStyledProps","display","flexDirection","alignItems","minWidth","maxWidth","MAX_WIDTH","MAX_WIDTH_NO_RESTRICTIONS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,IAAMA,SAA+B,GAAGC,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAE3D,IAAMC,WAAW,GAA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++) { var t =
|
|
|
17
17
|
var _CollapsibleBody = function _CollapsibleBody(_ref) {
|
|
18
18
|
var children = _ref.children,
|
|
19
19
|
testID = _ref.testID,
|
|
20
|
-
width = _ref.width
|
|
20
|
+
width = _ref.width,
|
|
21
|
+
_ref$_hasMargin = _ref._hasMargin,
|
|
22
|
+
_hasMargin = _ref$_hasMargin === void 0 ? true : _ref$_hasMargin;
|
|
21
23
|
var _useCollapsible = useCollapsible(),
|
|
22
24
|
collapsibleBodyId = _useCollapsible.collapsibleBodyId,
|
|
23
25
|
isExpanded = _useCollapsible.isExpanded;
|
|
@@ -32,6 +34,7 @@ var _CollapsibleBody = function _CollapsibleBody(_ref) {
|
|
|
32
34
|
testID: testID
|
|
33
35
|
})), {}, {
|
|
34
36
|
children: /*#__PURE__*/jsx(CollapsibleBodyContent, {
|
|
37
|
+
_hasMargin: _hasMargin,
|
|
35
38
|
children: children
|
|
36
39
|
})
|
|
37
40
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleBody.js","sources":["../../../../../../src/components/Collapsible/CollapsibleBody.tsx"],"sourcesContent":["import type { ReactElement
|
|
1
|
+
{"version":3,"file":"CollapsibleBody.js","sources":["../../../../../../src/components/Collapsible/CollapsibleBody.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { CollapsibleBodyContent } from './CollapsibleBodyContent';\nimport { useCollapsible } from './CollapsibleContext';\nimport type { CollapsibleBodyProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\nconst _CollapsibleBody = ({\n children,\n testID,\n width,\n _hasMargin = true,\n}: CollapsibleBodyProps): ReactElement => {\n const { collapsibleBodyId, isExpanded } = useCollapsible();\n return (\n <BaseBox\n id={collapsibleBodyId}\n width={width}\n {...makeAccessible({ role: 'region', hidden: !isExpanded })}\n {...metaAttribute({ name: MetaConstants.CollapsibleBody, testID })}\n >\n <CollapsibleBodyContent _hasMargin={_hasMargin}>{children}</CollapsibleBodyContent>\n </BaseBox>\n );\n};\n\nconst CollapsibleBody = assignWithoutSideEffects(_CollapsibleBody, {\n componentId: MetaConstants.CollapsibleBody,\n});\n\nexport type { CollapsibleBodyProps };\nexport { CollapsibleBody };\n"],"names":["_CollapsibleBody","_ref","children","testID","width","_ref$_hasMargin","_hasMargin","_useCollapsible","useCollapsible","collapsibleBodyId","isExpanded","_jsx","BaseBox","_objectSpread","id","makeAccessible","role","hidden","metaAttribute","name","MetaConstants","CollapsibleBody","CollapsibleBodyContent","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;AASA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAKoB;AAAA,EAAA,IAJxCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAAC,eAAA,GAAAJ,IAAA,CACLK,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA,CAAA;AAEjB,EAAA,IAAAE,eAAA,GAA0CC,cAAc,EAAE;IAAlDC,iBAAiB,GAAAF,eAAA,CAAjBE,iBAAiB;IAAEC,UAAU,GAAAH,eAAA,CAAVG,UAAU,CAAA;EACrC,oBACEC,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACNC,IAAAA,EAAE,EAAEL,iBAAkB;AACtBL,IAAAA,KAAK,EAAEA,KAAAA;AAAM,GAAA,EACTW,cAAc,CAAC;AAAEC,IAAAA,IAAI,EAAE,QAAQ;AAAEC,IAAAA,MAAM,EAAE,CAACP,UAAAA;GAAY,CAAC,CACvDQ,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACC,eAAe;AAAElB,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAD,QAAA,eAElES,GAAA,CAACW,sBAAsB,EAAA;AAAChB,MAAAA,UAAU,EAAEA,UAAW;AAAAJ,MAAAA,QAAA,EAAEA,QAAAA;KAAiC,CAAA;AAAC,GAAA,CAC5E,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMmB,eAAe,gBAAGE,wBAAwB,CAACvB,gBAAgB,EAAE;EACjEwB,WAAW,EAAEJ,aAAa,CAACC,eAAAA;AAC7B,CAAC;;;;"}
|
|
@@ -50,7 +50,8 @@ var StyledCollapsibleBodyContent = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
52
|
var CollapsibleBodyContent = function CollapsibleBodyContent(_ref) {
|
|
53
|
-
var children = _ref.children
|
|
53
|
+
var children = _ref.children,
|
|
54
|
+
_hasMargin = _ref._hasMargin;
|
|
54
55
|
var _useCollapsible = useCollapsible(),
|
|
55
56
|
isExpanded = _useCollapsible.isExpanded,
|
|
56
57
|
defaultIsExpanded = _useCollapsible.defaultIsExpanded,
|
|
@@ -125,7 +126,8 @@ var CollapsibleBodyContent = function CollapsibleBodyContent(_ref) {
|
|
|
125
126
|
defaultIsExpanded: defaultIsExpanded,
|
|
126
127
|
onTransitionEnd: onTransitionEnd,
|
|
127
128
|
children: /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, getCollapsibleBodyContentBoxProps({
|
|
128
|
-
direction: direction
|
|
129
|
+
direction: direction,
|
|
130
|
+
_hasMargin: _hasMargin
|
|
129
131
|
})), {}, {
|
|
130
132
|
children: children
|
|
131
133
|
}))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleBodyContent.web.js","sources":["../../../../../../src/components/Collapsible/CollapsibleBodyContent.web.tsx"],"sourcesContent":["import type { ReactElement, TransitionEventHandler } from 'react';\nimport { useRef } from 'react';\nimport styled from 'styled-components';\nimport { useCollapsible } from './CollapsibleContext';\nimport type { CollapsibleBodyContentProps } from './types';\nimport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n} from './commonStyles';\nimport { castWebType, makeSize } from '~utils';\nimport { Box } from '~components/Box';\nimport { useDidUpdate } from '~utils/useDidUpdate';\nimport BaseBox from '~components/Box/BaseBox';\n\ntype StyledCollapsibleBodyContentProps = {\n defaultIsExpanded: boolean;\n isExpanded: boolean;\n};\n\n/**\n * We can't animate to and from `auto` height, these are used for imperative css transitions.\n * Overall on expanding height will change as: 0px -> Actual height -> auto\n */\nconst HEIGHT_EXPANDED = 'auto';\nconst HEIGHT_COLLAPSED = '0px';\n\nconst StyledCollapsibleBodyContent = styled(BaseBox)<StyledCollapsibleBodyContentProps>((props) => {\n const { theme, defaultIsExpanded, isExpanded } = props;\n const transitionDuration = castWebType(getTransitionDuration(theme));\n const transitionTimingFunction = castWebType(getTransitionEasing(theme));\n\n return {\n transitionDuration,\n transitionTimingFunction,\n transitionProperty: 'height, opacity',\n opacity: getOpacity({ isExpanded }),\n /**\n * We need height explicitly here for initial styles because the component might be rendered on server,\n * in which case for expanded items this should be `auto` because we don't know the actual pixel value.\n *\n * This is based on `defaultIsExpanded` rather than `isExpanded` because post initial render inline styles take over.\n * Otherwise, changing `height` both here and in inline styles sometimes causes animation flickers due to styles mismatch.\n */\n height: defaultIsExpanded ? HEIGHT_EXPANDED : HEIGHT_COLLAPSED,\n display: defaultIsExpanded ? 'block' : 'none',\n overflowY: 'hidden',\n };\n});\n\nconst CollapsibleBodyContent = ({
|
|
1
|
+
{"version":3,"file":"CollapsibleBodyContent.web.js","sources":["../../../../../../src/components/Collapsible/CollapsibleBodyContent.web.tsx"],"sourcesContent":["import type { ReactElement, TransitionEventHandler } from 'react';\nimport { useRef } from 'react';\nimport styled from 'styled-components';\nimport { useCollapsible } from './CollapsibleContext';\nimport type { CollapsibleBodyContentProps } from './types';\nimport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n} from './commonStyles';\nimport { castWebType, makeSize } from '~utils';\nimport { Box } from '~components/Box';\nimport { useDidUpdate } from '~utils/useDidUpdate';\nimport BaseBox from '~components/Box/BaseBox';\n\ntype StyledCollapsibleBodyContentProps = {\n defaultIsExpanded: boolean;\n isExpanded: boolean;\n};\n\n/**\n * We can't animate to and from `auto` height, these are used for imperative css transitions.\n * Overall on expanding height will change as: 0px -> Actual height -> auto\n */\nconst HEIGHT_EXPANDED = 'auto';\nconst HEIGHT_COLLAPSED = '0px';\n\nconst StyledCollapsibleBodyContent = styled(BaseBox)<StyledCollapsibleBodyContentProps>((props) => {\n const { theme, defaultIsExpanded, isExpanded } = props;\n const transitionDuration = castWebType(getTransitionDuration(theme));\n const transitionTimingFunction = castWebType(getTransitionEasing(theme));\n\n return {\n transitionDuration,\n transitionTimingFunction,\n transitionProperty: 'height, opacity',\n opacity: getOpacity({ isExpanded }),\n /**\n * We need height explicitly here for initial styles because the component might be rendered on server,\n * in which case for expanded items this should be `auto` because we don't know the actual pixel value.\n *\n * This is based on `defaultIsExpanded` rather than `isExpanded` because post initial render inline styles take over.\n * Otherwise, changing `height` both here and in inline styles sometimes causes animation flickers due to styles mismatch.\n */\n height: defaultIsExpanded ? HEIGHT_EXPANDED : HEIGHT_COLLAPSED,\n display: defaultIsExpanded ? 'block' : 'none',\n overflowY: 'hidden',\n };\n});\n\nconst CollapsibleBodyContent = ({\n children,\n _hasMargin,\n}: CollapsibleBodyContentProps): ReactElement => {\n const { isExpanded, defaultIsExpanded, direction } = useCollapsible();\n const collapsibleBodyContentRef = useRef<HTMLDivElement>(null);\n\n /**\n * This effect imperatively updates height to make css transitions work:\n * - for expanded items: auto height -> actual height -> 0px\n * - for collapsed items: 0px -> actual height -> auto height\n * - uses `requestAnimationFrame` to set the styles just before the next repaint\n */\n useDidUpdate(() => {\n const collapsibleBodyContentElement = collapsibleBodyContentRef.current;\n\n if (!collapsibleBodyContentElement) {\n return;\n }\n\n // In collapsed state display is set to none, change it back to block\n collapsibleBodyContentElement.style.display = 'block';\n const actualHeight = collapsibleBodyContentElement.scrollHeight;\n\n if (!isExpanded) {\n // collapse\n requestAnimationFrame(() => {\n collapsibleBodyContentElement.style.height = makeSize(actualHeight);\n\n requestAnimationFrame(() => {\n collapsibleBodyContentElement.style.height = makeSize(0);\n });\n });\n } else {\n // expand\n requestAnimationFrame(() => {\n collapsibleBodyContentElement.style.height = makeSize(0);\n\n requestAnimationFrame(() => {\n collapsibleBodyContentElement.style.height = makeSize(actualHeight);\n\n /**\n * After this we want to wait for the animation to finish\n * before setting the height back to auto\n *\n * `onTransitionEnd` takes over\n */\n });\n });\n }\n }, [isExpanded]);\n\n /**\n * When expanding, waits for the animation to finish first.\n * Then sets the height of expanded item to auto from actual height.\n */\n const onTransitionEnd: TransitionEventHandler = ({ propertyName }) => {\n const collapsibleBodyContentElement = collapsibleBodyContentRef.current;\n if (propertyName === 'height' && collapsibleBodyContentElement) {\n if (isExpanded) {\n // Body content has expanded and finished animating at this point\n requestAnimationFrame(() => {\n collapsibleBodyContentElement.style.height = HEIGHT_EXPANDED;\n });\n } else {\n // Body content has collapsed\n requestAnimationFrame(() => {\n collapsibleBodyContentElement.style.display = 'none';\n });\n }\n }\n };\n\n return (\n <StyledCollapsibleBodyContent\n ref={collapsibleBodyContentRef}\n isExpanded={isExpanded}\n defaultIsExpanded={defaultIsExpanded}\n onTransitionEnd={onTransitionEnd}\n >\n <Box {...getCollapsibleBodyContentBoxProps({ direction, _hasMargin })}>{children}</Box>\n </StyledCollapsibleBodyContent>\n );\n};\n\nexport { CollapsibleBodyContent };\n"],"names":["HEIGHT_EXPANDED","HEIGHT_COLLAPSED","StyledCollapsibleBodyContent","styled","BaseBox","withConfig","displayName","componentId","props","theme","defaultIsExpanded","isExpanded","transitionDuration","castWebType","getTransitionDuration","transitionTimingFunction","getTransitionEasing","transitionProperty","opacity","getOpacity","height","display","overflowY","CollapsibleBodyContent","_ref","children","_hasMargin","_useCollapsible","useCollapsible","direction","collapsibleBodyContentRef","useRef","useDidUpdate","collapsibleBodyContentElement","current","style","actualHeight","scrollHeight","requestAnimationFrame","makeSize","onTransitionEnd","_ref2","propertyName","_jsx","ref","Box","_objectSpread","getCollapsibleBodyContentBoxProps"],"mappings":";;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;AACA,IAAMA,eAAe,GAAG,MAAM,CAAA;AAC9B,IAAMC,gBAAgB,GAAG,KAAK,CAAA;AAE9B,IAAMC,4BAA4B,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yDAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAoC,CAAA,CAAA,UAACC,KAAK,EAAK;AACjG,EAAA,IAAQC,KAAK,GAAoCD,KAAK,CAA9CC,KAAK;IAAEC,iBAAiB,GAAiBF,KAAK,CAAvCE,iBAAiB;IAAEC,UAAU,GAAKH,KAAK,CAApBG,UAAU,CAAA;EAC5C,IAAMC,kBAAkB,GAAGC,WAAW,CAACC,qBAAqB,CAACL,KAAK,CAAC,CAAC,CAAA;EACpE,IAAMM,wBAAwB,GAAGF,WAAW,CAACG,mBAAmB,CAACP,KAAK,CAAC,CAAC,CAAA;EAExE,OAAO;AACLG,IAAAA,kBAAkB,EAAlBA,kBAAkB;AAClBG,IAAAA,wBAAwB,EAAxBA,wBAAwB;AACxBE,IAAAA,kBAAkB,EAAE,iBAAiB;IACrCC,OAAO,EAAEC,UAAU,CAAC;AAAER,MAAAA,UAAU,EAAVA,UAAAA;AAAW,KAAC,CAAC;AACnC;AACJ;AACA;AACA;AACA;AACA;AACA;AACIS,IAAAA,MAAM,EAAEV,iBAAiB,GAAGV,eAAe,GAAGC,gBAAgB;AAC9DoB,IAAAA,OAAO,EAAEX,iBAAiB,GAAG,OAAO,GAAG,MAAM;AAC7CY,IAAAA,SAAS,EAAE,QAAA;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AAAW,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAD,MAAAA,QAAA,EAAGA,QAAAA;KAAc,CAAA,CAAA;AAAC,GAC3D,CAAC,CAAA;AAEnC;;;;"}
|
|
@@ -1,20 +1,30 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
1
3
|
import { useCallback } from 'react';
|
|
2
4
|
import { useCollapsible } from './CollapsibleContext.js';
|
|
3
5
|
import { CollapsibleChevronIcon } from './CollapsibleChevronIcon.web.js';
|
|
4
6
|
import '../../utils/metaAttribute/index.js';
|
|
5
7
|
import '../Link/BaseLink/index.js';
|
|
6
8
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
9
|
+
import '../Box/styledProps/index.js';
|
|
7
10
|
import { jsx } from 'react/jsx-runtime';
|
|
8
11
|
import BaseLink from '../Link/BaseLink/BaseLink.js';
|
|
12
|
+
import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
|
|
9
13
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
10
14
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
11
15
|
|
|
16
|
+
var _excluded = ["children", "size", "color", "isDisabled", "testID", "accessibilityLabel"];
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
19
|
var _CollapsibleLink = function _CollapsibleLink(_ref) {
|
|
13
20
|
var children = _ref.children,
|
|
14
21
|
size = _ref.size,
|
|
22
|
+
_ref$color = _ref.color,
|
|
23
|
+
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
15
24
|
isDisabled = _ref.isDisabled,
|
|
16
25
|
testID = _ref.testID,
|
|
17
|
-
accessibilityLabel = _ref.accessibilityLabel
|
|
26
|
+
accessibilityLabel = _ref.accessibilityLabel,
|
|
27
|
+
styledProps = _objectWithoutProperties(_ref, _excluded);
|
|
18
28
|
var _useCollapsible = useCollapsible(),
|
|
19
29
|
onExpandChange = _useCollapsible.onExpandChange,
|
|
20
30
|
isExpanded = _useCollapsible.isExpanded,
|
|
@@ -22,9 +32,10 @@ var _CollapsibleLink = function _CollapsibleLink(_ref) {
|
|
|
22
32
|
var toggleIsExpanded = useCallback(function () {
|
|
23
33
|
return onExpandChange(!isExpanded);
|
|
24
34
|
}, [onExpandChange, isExpanded]);
|
|
25
|
-
return /*#__PURE__*/jsx(BaseLink, {
|
|
35
|
+
return /*#__PURE__*/jsx(BaseLink, _objectSpread(_objectSpread({
|
|
26
36
|
variant: "button",
|
|
27
37
|
size: size,
|
|
38
|
+
color: color,
|
|
28
39
|
icon: CollapsibleChevronIcon,
|
|
29
40
|
iconPosition: "right",
|
|
30
41
|
isDisabled: isDisabled,
|
|
@@ -34,9 +45,10 @@ var _CollapsibleLink = function _CollapsibleLink(_ref) {
|
|
|
34
45
|
label: accessibilityLabel,
|
|
35
46
|
controls: collapsibleBodyId,
|
|
36
47
|
expanded: isExpanded
|
|
37
|
-
}
|
|
48
|
+
}
|
|
49
|
+
}, getStyledProps(styledProps)), {}, {
|
|
38
50
|
children: children
|
|
39
|
-
});
|
|
51
|
+
}));
|
|
40
52
|
};
|
|
41
53
|
var CollapsibleLink = /*#__PURE__*/assignWithoutSideEffects(_CollapsibleLink, {
|
|
42
54
|
componentId: MetaConstants.CollapsibleLink
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleLink.js","sources":["../../../../../../src/components/Collapsible/CollapsibleLink.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback } from 'react';\nimport { useCollapsible } from './CollapsibleContext';\nimport { CollapsibleChevronIcon } from './CollapsibleChevronIcon';\nimport type { LinkProps } from '~components/Link';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype CollapsibleLinkProps = Pick<\n LinkProps,\n 'size' | 'isDisabled' | 'testID' | 'accessibilityLabel' | 'children'\n
|
|
1
|
+
{"version":3,"file":"CollapsibleLink.js","sources":["../../../../../../src/components/Collapsible/CollapsibleLink.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback } from 'react';\nimport { useCollapsible } from './CollapsibleContext';\nimport { CollapsibleChevronIcon } from './CollapsibleChevronIcon';\nimport type { LinkProps } from '~components/Link';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\n\ntype CollapsibleLinkProps = Pick<\n LinkProps,\n 'color' | 'size' | 'isDisabled' | 'testID' | 'accessibilityLabel' | 'children'\n> &\n StyledPropsBlade;\n\nconst _CollapsibleLink = ({\n children,\n size,\n color = 'primary',\n isDisabled,\n testID,\n accessibilityLabel,\n ...styledProps\n}: CollapsibleLinkProps): ReactElement => {\n const { onExpandChange, isExpanded, collapsibleBodyId } = useCollapsible();\n\n const toggleIsExpanded = useCallback(() => onExpandChange(!isExpanded), [\n onExpandChange,\n isExpanded,\n ]);\n\n return (\n <BaseLink\n variant=\"button\"\n size={size}\n color={color}\n icon={CollapsibleChevronIcon}\n iconPosition=\"right\"\n isDisabled={isDisabled}\n testID={testID}\n onClick={toggleIsExpanded}\n accessibilityProps={{\n label: accessibilityLabel,\n controls: collapsibleBodyId,\n expanded: isExpanded,\n }}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseLink>\n );\n};\n\nconst CollapsibleLink = assignWithoutSideEffects(_CollapsibleLink, {\n componentId: MetaConstants.CollapsibleLink,\n});\n\nexport type { CollapsibleLinkProps };\nexport { CollapsibleLink };\n"],"names":["_CollapsibleLink","_ref","children","size","_ref$color","color","isDisabled","testID","accessibilityLabel","styledProps","_objectWithoutProperties","_excluded","_useCollapsible","useCollapsible","onExpandChange","isExpanded","collapsibleBodyId","toggleIsExpanded","useCallback","_jsx","BaseLink","_objectSpread","variant","icon","CollapsibleChevronIcon","iconPosition","onClick","accessibilityProps","label","controls","expanded","getStyledProps","CollapsibleLink","assignWithoutSideEffects","componentId","MetaConstants"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAQoB;AAAA,EAAA,IAPxCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,UAAA,GAAAH,IAAA,CACJI,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,UAAA;IACjBE,UAAU,GAAAL,IAAA,CAAVK,UAAU;IACVC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,kBAAkB,GAAAP,IAAA,CAAlBO,kBAAkB;AACfC,IAAAA,WAAW,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAEd,EAAA,IAAAC,eAAA,GAA0DC,cAAc,EAAE;IAAlEC,cAAc,GAAAF,eAAA,CAAdE,cAAc;IAAEC,UAAU,GAAAH,eAAA,CAAVG,UAAU;IAAEC,iBAAiB,GAAAJ,eAAA,CAAjBI,iBAAiB,CAAA;EAErD,IAAMC,gBAAgB,GAAGC,WAAW,CAAC,YAAA;AAAA,IAAA,OAAMJ,cAAc,CAAC,CAACC,UAAU,CAAC,CAAA;AAAA,GAAA,EAAE,CACtED,cAAc,EACdC,UAAU,CACX,CAAC,CAAA;AAEF,EAAA,oBACEI,GAAA,CAACC,QAAQ,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACPC,IAAAA,OAAO,EAAC,QAAQ;AAChBnB,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,KAAK,EAAEA,KAAM;AACbkB,IAAAA,IAAI,EAAEC,sBAAuB;AAC7BC,IAAAA,YAAY,EAAC,OAAO;AACpBnB,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,MAAM,EAAEA,MAAO;AACfmB,IAAAA,OAAO,EAAET,gBAAiB;AAC1BU,IAAAA,kBAAkB,EAAE;AAClBC,MAAAA,KAAK,EAAEpB,kBAAkB;AACzBqB,MAAAA,QAAQ,EAAEb,iBAAiB;AAC3Bc,MAAAA,QAAQ,EAAEf,UAAAA;AACZ,KAAA;GACIgB,EAAAA,cAAc,CAACtB,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAP,IAAAA,QAAA,EAE9BA,QAAAA;AAAQ,GAAA,CACD,CAAC,CAAA;AAEf,CAAC,CAAA;AAED,IAAM8B,eAAe,gBAAGC,wBAAwB,CAACjC,gBAAgB,EAAE;EACjEkC,WAAW,EAAEC,aAAa,CAACH,eAAAA;AAC7B,CAAC;;;;"}
|
|
@@ -2,7 +2,11 @@ import '../../utils/index.js';
|
|
|
2
2
|
import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js';
|
|
3
3
|
|
|
4
4
|
var getCollapsibleBodyContentBoxProps = function getCollapsibleBodyContentBoxProps(_ref) {
|
|
5
|
-
var direction = _ref.direction
|
|
5
|
+
var direction = _ref.direction,
|
|
6
|
+
_hasMargin = _ref._hasMargin;
|
|
7
|
+
if (!_hasMargin) {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
6
10
|
return {
|
|
7
11
|
/**
|
|
8
12
|
* Need a margin inside the outside wrapper so this is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonStyles.js","sources":["../../../../../../src/components/Collapsible/commonStyles.ts"],"sourcesContent":["import type { CollapsibleProps } from './Collapsible';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\nimport { makeMotionTime } from '~utils';\n\nconst getCollapsibleBodyContentBoxProps = ({\n direction,\n}: {\n direction: CollapsibleProps['direction'];\n}): BoxProps => ({\n /**\n
|
|
1
|
+
{"version":3,"file":"commonStyles.js","sources":["../../../../../../src/components/Collapsible/commonStyles.ts"],"sourcesContent":["import type { CollapsibleProps } from './Collapsible';\nimport type { CollapsibleBodyProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\nimport { makeMotionTime } from '~utils';\n\nconst getCollapsibleBodyContentBoxProps = ({\n direction,\n _hasMargin,\n}: {\n direction: CollapsibleProps['direction'];\n _hasMargin: CollapsibleBodyProps['_hasMargin'];\n}): BoxProps => {\n if (!_hasMargin) {\n return {};\n }\n\n return {\n /**\n * Need a margin inside the outside wrapper so this is\n * included in height calculations and prevents jank\n */\n marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0',\n marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0',\n };\n};\n\nconst getOpacity = ({ isExpanded }: { isExpanded: boolean }): number => (isExpanded ? 1 : 0.8);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration.xmoderate);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard.effective;\n\nconst getCollapsibleChevronIconTransforms = (): {\n transformExpanded: number;\n transformCollapsed: number;\n} => ({ transformExpanded: -180, transformCollapsed: 0 });\n\nexport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n getCollapsibleChevronIconTransforms,\n};\n"],"names":["getCollapsibleBodyContentBoxProps","_ref","direction","_hasMargin","marginTop","marginBottom","getOpacity","_ref2","isExpanded","getTransitionDuration","theme","makeMotionTime","motion","duration","xmoderate","getTransitionEasing","easing","standard","effective","getCollapsibleChevronIconTransforms","transformExpanded","transformCollapsed"],"mappings":";;;AAMA,IAAMA,iCAAiC,GAAG,SAApCA,iCAAiCA,CAAAC,IAAA,EAMvB;AAAA,EAAA,IALdC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,UAAU,GAAAF,IAAA,CAAVE,UAAU,CAAA;EAKV,IAAI,CAACA,UAAU,EAAE;AACf,IAAA,OAAO,EAAE,CAAA;AACX,GAAA;EAEA,OAAO;AACL;AACJ;AACA;AACA;AACIC,IAAAA,SAAS,EAAEF,SAAS,KAAK,QAAQ,GAAG,WAAW,GAAG,WAAW;AAC7DG,IAAAA,YAAY,EAAEH,SAAS,KAAK,KAAK,GAAG,WAAW,GAAG,WAAA;GACnD,CAAA;AACH,EAAC;AAED,IAAMI,UAAU,GAAG,SAAbA,UAAUA,CAAAC,KAAA,EAAA;AAAA,EAAA,IAAMC,UAAU,GAAAD,KAAA,CAAVC,UAAU,CAAA;AAAA,EAAA,OAAyCA,UAAU,GAAG,CAAC,GAAG,GAAG,CAAA;AAAA,EAAC;;AAE9F;AACA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,EAAA;EAAA,OAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAAA;AAAA,EAAA;;AAE/F;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIL,KAAY,EAAA;EAAA,OAAKA,KAAK,CAACE,MAAM,CAACI,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAA;AAAA,EAAA;AAEpF,IAAMC,mCAAmC,GAAG,SAAtCA,mCAAmCA,GAAA;EAAA,OAGnC;IAAEC,iBAAiB,EAAE,CAAC,GAAG;AAAEC,IAAAA,kBAAkB,EAAE,CAAA;GAAG,CAAA;AAAA;;;;"}
|