@razorpay/blade 11.11.1 → 11.13.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/Box/BaseBox/baseBoxStyles.js +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/useTaggedInput.js +13 -0
- package/build/lib/native/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/native/components/Input/TextArea/TextArea.js +2 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +2 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +31 -0
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -0
- package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +17 -0
- package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -0
- package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBarFilled.native.js +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBarFilled.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/progressBarTokens.js +6 -2
- package/build/lib/native/components/ProgressBar/progressBarTokens.js.map +1 -1
- package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +1 -1
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/native/components/Tag/tagAnimationConfig.js +1 -2
- package/build/lib/native/components/Tag/tagAnimationConfig.js.map +1 -1
- 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/tokens/global/size.js +1 -1
- package/build/lib/native/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +2 -1
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +8 -2
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +13 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +14 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js +4 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +5 -2
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js +172 -0
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/web/development/components/Input/TextArea/TextArea.js +54 -8
- package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +51 -5
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +140 -0
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -0
- package/build/lib/web/development/components/ProgressBar/CircularProgressLabel.js +38 -0
- package/build/lib/web/development/components/ProgressBar/CircularProgressLabel.js.map +1 -0
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +47 -10
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBarFilled.web.js +6 -6
- package/build/lib/web/development/components/ProgressBar/ProgressBarFilled.web.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/progressBarTokens.js +45 -1
- package/build/lib/web/development/components/ProgressBar/progressBarTokens.js.map +1 -1
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -3
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +5 -6
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/web/development/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/development/components/Tag/tagAnimationConfig.js +4 -2
- package/build/lib/web/development/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +2 -1
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/development/tokens/global/size.js +4 -0
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +2 -1
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +8 -2
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +13 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +14 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js +4 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +5 -2
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js +172 -0
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js.map +1 -0
- package/build/lib/web/production/components/Input/TextArea/TextArea.js +54 -8
- package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +51 -5
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +140 -0
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -0
- package/build/lib/web/production/components/ProgressBar/CircularProgressLabel.js +38 -0
- package/build/lib/web/production/components/ProgressBar/CircularProgressLabel.js.map +1 -0
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +47 -10
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBarFilled.web.js +6 -6
- package/build/lib/web/production/components/ProgressBar/ProgressBarFilled.web.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/progressBarTokens.js +45 -1
- package/build/lib/web/production/components/ProgressBar/progressBarTokens.js.map +1 -1
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -3
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +5 -6
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js +1 -1
- package/build/lib/web/production/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/web/production/components/Tag/tagAnimationConfig.js +4 -2
- package/build/lib/web/production/components/Tag/tagAnimationConfig.js.map +1 -1
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +2 -1
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/production/tokens/global/size.js +4 -0
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/types/components/index.d.ts +30 -8
- package/build/types/components/index.native.d.ts +22 -8
- package/build/types/tokens/index.d.ts +4 -0
- package/build/types/tokens/index.native.d.ts +4 -0
- package/codemods/migrate-progressbar/transformers/__test__/migrate-progressbar.test.ts +28 -0
- package/codemods/migrate-progressbar/transformers/index.ts +89 -0
- package/package.json +1 -1
|
@@ -48,7 +48,8 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
|
|
|
48
48
|
display: '-webkit-box',
|
|
49
49
|
'line-clamp': "".concat(numberOfLines),
|
|
50
50
|
'-webkit-line-clamp': "".concat(numberOfLines),
|
|
51
|
-
'-webkit-box-orient': 'vertical'
|
|
51
|
+
'-webkit-box-orient': 'vertical',
|
|
52
|
+
overflowWrap: 'break-word'
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -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 };\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","concat","_objectSpread","textDecorationColor","margin","padding"],"mappings":";;;;;;;;;;;AAOA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAce;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CAbpCE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,0BAA0B,GAAAA,UAAA;IAAAE,eAAA,GAAAH,IAAA,CAClCI,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,eAAA;IAAAE,aAAA,GAAAL,IAAA,CACnBM,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,aAAA;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J,kBAAkB,CAACT,KAAK,CAACK,UAAU,CAACS,WAAW,CAACnB,UAAU,CAAC,CAAC,CAAA;EACpF,IAAMoB,kBAAkB,GAAGC,iBAAiB,CAC1ChB,KAAK,CAACK,UAAU,CAACY,cAAc,CAACpB,aAAa,CAAC,EAC9CG,KAAK,CAACK,UAAU,CAACC,KAAK,CAACI,IAAI,CAACzB,QAAQ,CACtC,CAAC,CAAA;EACD,IAAIiC,cAAyB,GAAG,EAAE,CAAA;EAClC,IAAIC,eAA0B,GAAG,EAAE,CAAA;EACnC,IAAI3B,aAAa,KAAK4B,SAAS,EAAE;IAC/B,IAAIC,aAAa,EAAE,EAAE;MACnBH,cAAc,GAAG,EAAE,CAAA;AACrB,KAAC,MAAM;AACLA,MAAAA,cAAc,GAAG;AACfI,QAAAA,QAAQ,EAAE,QAAQ;AAClBC,QAAAA,OAAO,EAAE,aAAa;AACtB,QAAA,YAAY,EAAAC,EAAAA,CAAAA,MAAA,CAAKhC,aAAa,CAAE;AAChC,QAAA,oBAAoB,EAAAgC,EAAAA,CAAAA,MAAA,CAAKhC,aAAa,CAAE;AACxC,QAAA,oBAAoB,EAAE,
|
|
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","concat","overflowWrap","_objectSpread","textDecorationColor","margin","padding"],"mapp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A,IAAIhC,SAAS,KAAK2B,SAAS,EAAE;IAC3B,IAAIC,aAAa,EAAE,EAAE;MACnBF,eAAe,GAAG,EAAE,CAAA;AACtB,KAAC,MAAM;AACLA,MAAAA,eAAe,GAAG;AAChB1B,QAAAA,SAAS,EAATA,SAAAA;OACD,CAAA;AACH,KAAA;AACF,GAAA;AAEA,EAAA,OAAAiC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACE7C,IAAAA,KAAK,EAAEoB,SAAS;AAChBlB,IAAAA,UAAU,EAAEqB,eAAe;AAC3BnB,IAAAA,QAAQ,EAAEuB,aAAa;AACvBrB,IAAAA,UAAU,EAAEwB,eAAe;AAC3BtB,IAAAA,SAAS,EAATA,SAAS;AACTE,IAAAA,kBAAkB,EAAlBA,kBAAAA;GACIA,EAAAA,kBAAkB,KAAK,MAAM,IAAI;AACnCoC,IAAAA,mBAAmB,EAAE1B,SAAAA;GACtB,CAAA,EAAA,EAAA,EAAA;AACDN,IAAAA,UAAU,EAAEkB,eAAe;AAC3BhB,IAAAA,aAAa,EAAEkB,kBAAkB;AACjCjB,IAAAA,SAAS,EAATA,SAAS;AACT8B,IAAAA,MAAM,EAAE,CAAC;AACTC,IAAAA,OAAO,EAAE,CAAC;AACV9B,IAAAA,OAAO,EAAPA,OAAAA;GACGmB,EAAAA,cAAc,GACdC,eAAe,CAAA,CAAA;AAEtB;;;;"}
|
|
@@ -16,6 +16,8 @@ var size = {
|
|
|
16
16
|
5: 5,
|
|
17
17
|
/** 6 px */
|
|
18
18
|
6: 6,
|
|
19
|
+
/** 7 px */
|
|
20
|
+
7: 7,
|
|
19
21
|
/** 8 px */
|
|
20
22
|
8: 8,
|
|
21
23
|
/** 10 px */
|
|
@@ -46,6 +48,8 @@ var size = {
|
|
|
46
48
|
56: 56,
|
|
47
49
|
/** 64 px */
|
|
48
50
|
64: 64,
|
|
51
|
+
/** 72 px */
|
|
52
|
+
72: 72,
|
|
49
53
|
/** 100 px */
|
|
50
54
|
100: 100,
|
|
51
55
|
/** 120 px */
|
|
@@ -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 /** 8 px */\n 8: 8,\n /** 10 px */\n 10: 10,\n /** 12 px */\n 12: 12,\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 32: 32,\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 /** 64 px */\n 64: 64,\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 /** 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":"AAAA;AACA;AACA;AACO,IAAMA,IAAI,GAAG;AAClB;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,IAAI,EAAE,IAAI;AACV;AACA,EAAA,IAAI,EAAE,IAAA;AACR;;;;"}
|
|
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 /** 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 32: 32,\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 /** 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 /** 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":"AAAA;AACA;AACA;AACO,IAAMA,IAAI,GAAG;AAClB;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,CAAC,EAAE,CAAC;AACJ;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,EAAE,EAAE,EAAE;AACN;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,GAAG,EAAE,GAAG;AACR;AACA,EAAA,IAAI,EAAE,IAAI;AACV;AACA,EAAA,IAAI,EAAE,IAAA;AACR;;;;"}
|
|
@@ -1283,7 +1283,7 @@ type BaseBoxVisualProps = MakeObjectResponsive<{
|
|
|
1283
1283
|
lineHeight: SpacingValueType;
|
|
1284
1284
|
touchAction: CSSObject['touchAction'];
|
|
1285
1285
|
userSelect: CSSObject['userSelect'];
|
|
1286
|
-
} & PickCSSByPlatform<'border' | 'borderLeft' | 'borderRight' | 'borderTop' | 'borderBottom' | 'opacity' | 'pointerEvents'>>;
|
|
1286
|
+
} & PickCSSByPlatform<'border' | 'borderLeft' | 'borderRight' | 'borderTop' | 'borderBottom' | 'opacity' | 'pointerEvents' | 'cursor'>>;
|
|
1287
1287
|
type BoxVisualProps = MakeObjectResponsive<{
|
|
1288
1288
|
backgroundColor: BackgroundColorString<'surface'> | 'transparent';
|
|
1289
1289
|
}> & {
|
|
@@ -6292,6 +6292,14 @@ type PasswordInputPropsWithLabel = {
|
|
|
6292
6292
|
type PasswordInputProps = (PasswordInputPropsWithA11yLabel | PasswordInputPropsWithLabel) & PasswordInputCommonProps;
|
|
6293
6293
|
declare const PasswordInput: React__default.ForwardRefExoticComponent<PasswordInputProps & React__default.RefAttributes<BladeElementRef>>;
|
|
6294
6294
|
|
|
6295
|
+
type TaggedInputProps = {
|
|
6296
|
+
isTaggedInput?: boolean;
|
|
6297
|
+
tags?: string[];
|
|
6298
|
+
onTagChange?: ({ tags }: {
|
|
6299
|
+
tags: string[];
|
|
6300
|
+
}) => void;
|
|
6301
|
+
};
|
|
6302
|
+
|
|
6295
6303
|
type TextAreaCommonProps = Pick<BaseInputProps, 'label' | 'accessibilityLabel' | 'labelPosition' | 'necessityIndicator' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'onSubmit' | 'value' | 'isDisabled' | 'isRequired' | 'maxCharacters' | 'autoFocus' | 'numberOfLines' | 'testID' | 'size'> & {
|
|
6296
6304
|
/**
|
|
6297
6305
|
* Decides whether to render a clear icon button
|
|
@@ -6301,7 +6309,7 @@ type TextAreaCommonProps = Pick<BaseInputProps, 'label' | 'accessibilityLabel' |
|
|
|
6301
6309
|
* Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`
|
|
6302
6310
|
*/
|
|
6303
6311
|
onClearButtonClick?: () => void;
|
|
6304
|
-
} & StyledPropsBlade;
|
|
6312
|
+
} & TaggedInputProps & StyledPropsBlade;
|
|
6305
6313
|
type TextAreaPropsWithA11yLabel = {
|
|
6306
6314
|
/**
|
|
6307
6315
|
* Label to be shown for the input field
|
|
@@ -6358,7 +6366,7 @@ type TextInputCommonProps = Pick<BaseInputProps, 'label' | 'accessibilityLabel'
|
|
|
6358
6366
|
* @default text
|
|
6359
6367
|
*/
|
|
6360
6368
|
type?: Type;
|
|
6361
|
-
} & StyledPropsBlade;
|
|
6369
|
+
} & TaggedInputProps & StyledPropsBlade;
|
|
6362
6370
|
type TextInputPropsWithA11yLabel = {
|
|
6363
6371
|
/**
|
|
6364
6372
|
* Label to be shown for the input field
|
|
@@ -7062,15 +7070,21 @@ type ProgressBarCommonProps = {
|
|
|
7062
7070
|
* Sets the color of the progress bar which changes the feedback color.
|
|
7063
7071
|
*/
|
|
7064
7072
|
color?: FeedbackColors;
|
|
7073
|
+
/**
|
|
7074
|
+
* Sets the type of the progress bar.
|
|
7075
|
+
* @default 'progress'
|
|
7076
|
+
*/
|
|
7077
|
+
type?: 'meter' | 'progress';
|
|
7065
7078
|
/**
|
|
7066
7079
|
* Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.
|
|
7067
7080
|
*/
|
|
7068
7081
|
label?: string;
|
|
7069
7082
|
/**
|
|
7070
7083
|
* Sets the size of the progress bar.
|
|
7084
|
+
* Note: 'large' size isn't available when the variant is 'linear'.
|
|
7071
7085
|
* @default 'small'
|
|
7072
7086
|
*/
|
|
7073
|
-
size?: 'small' | 'medium';
|
|
7087
|
+
size?: 'small' | 'medium' | 'large';
|
|
7074
7088
|
/**
|
|
7075
7089
|
* Sets the progress value of the progress bar.
|
|
7076
7090
|
* @default 'small'
|
|
@@ -7087,13 +7101,13 @@ type ProgressBarCommonProps = {
|
|
|
7087
7101
|
*/
|
|
7088
7102
|
max?: number;
|
|
7089
7103
|
} & TestID & StyledPropsBlade;
|
|
7090
|
-
type ProgressBarVariant = 'progress' | 'meter';
|
|
7104
|
+
type ProgressBarVariant = 'progress' | 'meter' | 'linear' | 'circular';
|
|
7091
7105
|
type ProgressBarProgressProps = ProgressBarCommonProps & {
|
|
7092
7106
|
/**
|
|
7093
7107
|
* Sets the variant to be rendered for the progress bar.
|
|
7094
7108
|
* @default 'progress'
|
|
7095
7109
|
*/
|
|
7096
|
-
variant?: Extract<ProgressBarVariant, 'progress'>;
|
|
7110
|
+
variant?: Extract<ProgressBarVariant, 'progress' | 'linear' | 'circular'>;
|
|
7097
7111
|
/**
|
|
7098
7112
|
* Sets whether the progress bar is in an indeterminate state.
|
|
7099
7113
|
* @default false
|
|
@@ -7110,7 +7124,7 @@ type ProgressBarMeterProps = ProgressBarCommonProps & {
|
|
|
7110
7124
|
* Sets the variant to be rendered for thr progress bar.
|
|
7111
7125
|
* @default 'progress'
|
|
7112
7126
|
*/
|
|
7113
|
-
variant?: Extract<ProgressBarVariant, 'meter'>;
|
|
7127
|
+
variant?: Extract<ProgressBarVariant, 'meter' | 'linear' | 'circular'>;
|
|
7114
7128
|
/**
|
|
7115
7129
|
* Sets whether the progress bar is in an indeterminate state.
|
|
7116
7130
|
* @default false
|
|
@@ -7123,7 +7137,7 @@ type ProgressBarMeterProps = ProgressBarCommonProps & {
|
|
|
7123
7137
|
showPercentage?: undefined;
|
|
7124
7138
|
};
|
|
7125
7139
|
type ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;
|
|
7126
|
-
declare const ProgressBar: ({ accessibilityLabel, color, isIndeterminate, label, showPercentage, size, value, variant, min, max, testID, ...styledProps }: ProgressBarProps) => ReactElement;
|
|
7140
|
+
declare const ProgressBar: ({ accessibilityLabel, color, type, isIndeterminate, label, showPercentage, size, value, variant, min, max, testID, ...styledProps }: ProgressBarProps) => ReactElement;
|
|
7127
7141
|
|
|
7128
7142
|
type RadioProps = {
|
|
7129
7143
|
/**
|
|
@@ -9520,6 +9534,14 @@ declare const TooltipInteractiveWrapper: styled_components.StyledComponent<"div"
|
|
|
9520
9534
|
readonly l?: "transparent" | "feedback.background.neutral.subtle" | "feedback.background.neutral.intense" | "feedback.background.information.subtle" | "feedback.background.information.intense" | "feedback.background.negative.subtle" | "feedback.background.negative.intense" | "feedback.background.notice.subtle" | "feedback.background.notice.intense" | "feedback.background.positive.subtle" | "feedback.background.positive.intense" | "surface.background.gray.subtle" | "surface.background.gray.moderate" | "surface.background.gray.intense" | "surface.background.primary.subtle" | "surface.background.primary.intense" | "surface.background.sea.subtle" | "surface.background.sea.intense" | "surface.background.cloud.subtle" | "surface.background.cloud.intense" | "interactive.background.neutral.fadedHighlighted" | "interactive.background.neutral.disabled" | "interactive.background.neutral.default" | "interactive.background.neutral.highlighted" | "interactive.background.neutral.faded" | "interactive.background.information.fadedHighlighted" | "interactive.background.information.disabled" | "interactive.background.information.default" | "interactive.background.information.highlighted" | "interactive.background.information.faded" | "interactive.background.negative.fadedHighlighted" | "interactive.background.negative.disabled" | "interactive.background.negative.default" | "interactive.background.negative.highlighted" | "interactive.background.negative.faded" | "interactive.background.notice.fadedHighlighted" | "interactive.background.notice.disabled" | "interactive.background.notice.default" | "interactive.background.notice.highlighted" | "interactive.background.notice.faded" | "interactive.background.positive.fadedHighlighted" | "interactive.background.positive.disabled" | "interactive.background.positive.default" | "interactive.background.positive.highlighted" | "interactive.background.positive.faded" | "interactive.background.staticBlack.fadedHighlighted" | "interactive.background.staticBlack.disabled" | "interactive.background.staticBlack.default" | "interactive.background.staticBlack.highlighted" | "interactive.background.staticBlack.faded" | "interactive.background.staticWhite.fadedHighlighted" | "interactive.background.staticWhite.disabled" | "interactive.background.staticWhite.default" | "interactive.background.staticWhite.highlighted" | "interactive.background.staticWhite.faded" | "interactive.background.gray.fadedHighlighted" | "interactive.background.gray.disabled" | "interactive.background.gray.default" | "interactive.background.gray.highlighted" | "interactive.background.gray.faded" | "interactive.background.primary.fadedHighlighted" | "interactive.background.primary.disabled" | "interactive.background.primary.default" | "interactive.background.primary.highlighted" | "interactive.background.primary.faded" | "overlay.background.subtle" | "overlay.background.moderate" | "popup.background.subtle" | "popup.background.intense" | (string & Record<never, never>) | undefined;
|
|
9521
9535
|
readonly xl?: "transparent" | "feedback.background.neutral.subtle" | "feedback.background.neutral.intense" | "feedback.background.information.subtle" | "feedback.background.information.intense" | "feedback.background.negative.subtle" | "feedback.background.negative.intense" | "feedback.background.notice.subtle" | "feedback.background.notice.intense" | "feedback.background.positive.subtle" | "feedback.background.positive.intense" | "surface.background.gray.subtle" | "surface.background.gray.moderate" | "surface.background.gray.intense" | "surface.background.primary.subtle" | "surface.background.primary.intense" | "surface.background.sea.subtle" | "surface.background.sea.intense" | "surface.background.cloud.subtle" | "surface.background.cloud.intense" | "interactive.background.neutral.fadedHighlighted" | "interactive.background.neutral.disabled" | "interactive.background.neutral.default" | "interactive.background.neutral.highlighted" | "interactive.background.neutral.faded" | "interactive.background.information.fadedHighlighted" | "interactive.background.information.disabled" | "interactive.background.information.default" | "interactive.background.information.highlighted" | "interactive.background.information.faded" | "interactive.background.negative.fadedHighlighted" | "interactive.background.negative.disabled" | "interactive.background.negative.default" | "interactive.background.negative.highlighted" | "interactive.background.negative.faded" | "interactive.background.notice.fadedHighlighted" | "interactive.background.notice.disabled" | "interactive.background.notice.default" | "interactive.background.notice.highlighted" | "interactive.background.notice.faded" | "interactive.background.positive.fadedHighlighted" | "interactive.background.positive.disabled" | "interactive.background.positive.default" | "interactive.background.positive.highlighted" | "interactive.background.positive.faded" | "interactive.background.staticBlack.fadedHighlighted" | "interactive.background.staticBlack.disabled" | "interactive.background.staticBlack.default" | "interactive.background.staticBlack.highlighted" | "interactive.background.staticBlack.faded" | "interactive.background.staticWhite.fadedHighlighted" | "interactive.background.staticWhite.disabled" | "interactive.background.staticWhite.default" | "interactive.background.staticWhite.highlighted" | "interactive.background.staticWhite.faded" | "interactive.background.gray.fadedHighlighted" | "interactive.background.gray.disabled" | "interactive.background.gray.default" | "interactive.background.gray.highlighted" | "interactive.background.gray.faded" | "interactive.background.primary.fadedHighlighted" | "interactive.background.primary.disabled" | "interactive.background.primary.default" | "interactive.background.primary.highlighted" | "interactive.background.primary.faded" | "overlay.background.subtle" | "overlay.background.moderate" | "popup.background.subtle" | "popup.background.intense" | (string & Record<never, never>) | undefined;
|
|
9522
9536
|
};
|
|
9537
|
+
cursor?: csstype.Property.Cursor | {
|
|
9538
|
+
readonly base?: csstype.Property.Cursor | undefined;
|
|
9539
|
+
readonly xs?: csstype.Property.Cursor | undefined;
|
|
9540
|
+
readonly s?: csstype.Property.Cursor | undefined;
|
|
9541
|
+
readonly m?: csstype.Property.Cursor | undefined;
|
|
9542
|
+
readonly l?: csstype.Property.Cursor | undefined;
|
|
9543
|
+
readonly xl?: csstype.Property.Cursor | undefined;
|
|
9544
|
+
} | undefined;
|
|
9523
9545
|
lineHeight: SpacingValueType | {
|
|
9524
9546
|
readonly base?: SpacingValueType | undefined;
|
|
9525
9547
|
readonly xs?: SpacingValueType | undefined;
|
|
@@ -1282,7 +1282,7 @@ type BaseBoxVisualProps = MakeObjectResponsive<{
|
|
|
1282
1282
|
lineHeight: SpacingValueType;
|
|
1283
1283
|
touchAction: CSSObject['touchAction'];
|
|
1284
1284
|
userSelect: CSSObject['userSelect'];
|
|
1285
|
-
} & PickCSSByPlatform<'border' | 'borderLeft' | 'borderRight' | 'borderTop' | 'borderBottom' | 'opacity' | 'pointerEvents'>>;
|
|
1285
|
+
} & PickCSSByPlatform<'border' | 'borderLeft' | 'borderRight' | 'borderTop' | 'borderBottom' | 'opacity' | 'pointerEvents' | 'cursor'>>;
|
|
1286
1286
|
type BoxVisualProps = MakeObjectResponsive<{
|
|
1287
1287
|
backgroundColor: BackgroundColorString<'surface'> | 'transparent';
|
|
1288
1288
|
}> & {
|
|
@@ -5707,6 +5707,14 @@ type PasswordInputPropsWithLabel = {
|
|
|
5707
5707
|
type PasswordInputProps = (PasswordInputPropsWithA11yLabel | PasswordInputPropsWithLabel) & PasswordInputCommonProps;
|
|
5708
5708
|
declare const PasswordInput: React__default.ForwardRefExoticComponent<PasswordInputProps & React__default.RefAttributes<BladeElementRef>>;
|
|
5709
5709
|
|
|
5710
|
+
type TaggedInputProps = {
|
|
5711
|
+
isTaggedInput?: boolean;
|
|
5712
|
+
tags?: string[];
|
|
5713
|
+
onTagChange?: ({ tags }: {
|
|
5714
|
+
tags: string[];
|
|
5715
|
+
}) => void;
|
|
5716
|
+
};
|
|
5717
|
+
|
|
5710
5718
|
type TextAreaCommonProps = Pick<BaseInputProps, 'label' | 'accessibilityLabel' | 'labelPosition' | 'necessityIndicator' | 'validationState' | 'helpText' | 'errorText' | 'successText' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'onSubmit' | 'value' | 'isDisabled' | 'isRequired' | 'maxCharacters' | 'autoFocus' | 'numberOfLines' | 'testID' | 'size'> & {
|
|
5711
5719
|
/**
|
|
5712
5720
|
* Decides whether to render a clear icon button
|
|
@@ -5716,7 +5724,7 @@ type TextAreaCommonProps = Pick<BaseInputProps, 'label' | 'accessibilityLabel' |
|
|
|
5716
5724
|
* Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`
|
|
5717
5725
|
*/
|
|
5718
5726
|
onClearButtonClick?: () => void;
|
|
5719
|
-
} & StyledPropsBlade;
|
|
5727
|
+
} & TaggedInputProps & StyledPropsBlade;
|
|
5720
5728
|
type TextAreaPropsWithA11yLabel = {
|
|
5721
5729
|
/**
|
|
5722
5730
|
* Label to be shown for the input field
|
|
@@ -5773,7 +5781,7 @@ type TextInputCommonProps = Pick<BaseInputProps, 'label' | 'accessibilityLabel'
|
|
|
5773
5781
|
* @default text
|
|
5774
5782
|
*/
|
|
5775
5783
|
type?: Type;
|
|
5776
|
-
} & StyledPropsBlade;
|
|
5784
|
+
} & TaggedInputProps & StyledPropsBlade;
|
|
5777
5785
|
type TextInputPropsWithA11yLabel = {
|
|
5778
5786
|
/**
|
|
5779
5787
|
* Label to be shown for the input field
|
|
@@ -6095,15 +6103,21 @@ type ProgressBarCommonProps = {
|
|
|
6095
6103
|
* Sets the color of the progress bar which changes the feedback color.
|
|
6096
6104
|
*/
|
|
6097
6105
|
color?: FeedbackColors;
|
|
6106
|
+
/**
|
|
6107
|
+
* Sets the type of the progress bar.
|
|
6108
|
+
* @default 'progress'
|
|
6109
|
+
*/
|
|
6110
|
+
type?: 'meter' | 'progress';
|
|
6098
6111
|
/**
|
|
6099
6112
|
* Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.
|
|
6100
6113
|
*/
|
|
6101
6114
|
label?: string;
|
|
6102
6115
|
/**
|
|
6103
6116
|
* Sets the size of the progress bar.
|
|
6117
|
+
* Note: 'large' size isn't available when the variant is 'linear'.
|
|
6104
6118
|
* @default 'small'
|
|
6105
6119
|
*/
|
|
6106
|
-
size?: 'small' | 'medium';
|
|
6120
|
+
size?: 'small' | 'medium' | 'large';
|
|
6107
6121
|
/**
|
|
6108
6122
|
* Sets the progress value of the progress bar.
|
|
6109
6123
|
* @default 'small'
|
|
@@ -6120,13 +6134,13 @@ type ProgressBarCommonProps = {
|
|
|
6120
6134
|
*/
|
|
6121
6135
|
max?: number;
|
|
6122
6136
|
} & TestID & StyledPropsBlade;
|
|
6123
|
-
type ProgressBarVariant = 'progress' | 'meter';
|
|
6137
|
+
type ProgressBarVariant = 'progress' | 'meter' | 'linear' | 'circular';
|
|
6124
6138
|
type ProgressBarProgressProps = ProgressBarCommonProps & {
|
|
6125
6139
|
/**
|
|
6126
6140
|
* Sets the variant to be rendered for the progress bar.
|
|
6127
6141
|
* @default 'progress'
|
|
6128
6142
|
*/
|
|
6129
|
-
variant?: Extract<ProgressBarVariant, 'progress'>;
|
|
6143
|
+
variant?: Extract<ProgressBarVariant, 'progress' | 'linear' | 'circular'>;
|
|
6130
6144
|
/**
|
|
6131
6145
|
* Sets whether the progress bar is in an indeterminate state.
|
|
6132
6146
|
* @default false
|
|
@@ -6143,7 +6157,7 @@ type ProgressBarMeterProps = ProgressBarCommonProps & {
|
|
|
6143
6157
|
* Sets the variant to be rendered for thr progress bar.
|
|
6144
6158
|
* @default 'progress'
|
|
6145
6159
|
*/
|
|
6146
|
-
variant?: Extract<ProgressBarVariant, 'meter'>;
|
|
6160
|
+
variant?: Extract<ProgressBarVariant, 'meter' | 'linear' | 'circular'>;
|
|
6147
6161
|
/**
|
|
6148
6162
|
* Sets whether the progress bar is in an indeterminate state.
|
|
6149
6163
|
* @default false
|
|
@@ -6156,7 +6170,7 @@ type ProgressBarMeterProps = ProgressBarCommonProps & {
|
|
|
6156
6170
|
showPercentage?: undefined;
|
|
6157
6171
|
};
|
|
6158
6172
|
type ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;
|
|
6159
|
-
declare const ProgressBar: ({ accessibilityLabel, color, isIndeterminate, label, showPercentage, size, value, variant, min, max, testID, ...styledProps }: ProgressBarProps) => ReactElement;
|
|
6173
|
+
declare const ProgressBar: ({ accessibilityLabel, color, type, isIndeterminate, label, showPercentage, size, value, variant, min, max, testID, ...styledProps }: ProgressBarProps) => ReactElement;
|
|
6160
6174
|
|
|
6161
6175
|
type RadioProps = {
|
|
6162
6176
|
/**
|
|
@@ -737,6 +737,8 @@ declare const size: {
|
|
|
737
737
|
readonly 5: 5;
|
|
738
738
|
/** 6 px */
|
|
739
739
|
readonly 6: 6;
|
|
740
|
+
/** 7 px */
|
|
741
|
+
readonly 7: 7;
|
|
740
742
|
/** 8 px */
|
|
741
743
|
readonly 8: 8;
|
|
742
744
|
/** 10 px */
|
|
@@ -767,6 +769,8 @@ declare const size: {
|
|
|
767
769
|
readonly 56: 56;
|
|
768
770
|
/** 64 px */
|
|
769
771
|
readonly 64: 64;
|
|
772
|
+
/** 72 px */
|
|
773
|
+
readonly 72: 72;
|
|
770
774
|
/** 100 px */
|
|
771
775
|
readonly 100: 100;
|
|
772
776
|
/** 120 px */
|
|
@@ -737,6 +737,8 @@ declare const size: {
|
|
|
737
737
|
readonly 5: 5;
|
|
738
738
|
/** 6 px */
|
|
739
739
|
readonly 6: 6;
|
|
740
|
+
/** 7 px */
|
|
741
|
+
readonly 7: 7;
|
|
740
742
|
/** 8 px */
|
|
741
743
|
readonly 8: 8;
|
|
742
744
|
/** 10 px */
|
|
@@ -767,6 +769,8 @@ declare const size: {
|
|
|
767
769
|
readonly 56: 56;
|
|
768
770
|
/** 64 px */
|
|
769
771
|
readonly 64: 64;
|
|
772
|
+
/** 72 px */
|
|
773
|
+
readonly 72: 72;
|
|
770
774
|
/** 100 px */
|
|
771
775
|
readonly 100: 100;
|
|
772
776
|
/** 120 px */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { applyTransform } from '@hypermod/utils';
|
|
2
|
+
import * as transformer from '..';
|
|
3
|
+
|
|
4
|
+
it('should migrate the ProgressBar component', async () => {
|
|
5
|
+
const result = await applyTransform(
|
|
6
|
+
transformer,
|
|
7
|
+
`
|
|
8
|
+
const App = () => (
|
|
9
|
+
<>
|
|
10
|
+
<ProgressBar value={20} label="Label" />
|
|
11
|
+
<ProgressBar variant="meter" value={20} label="Label" />
|
|
12
|
+
<ProgressBar variant="progress" value={20} label="Label" />
|
|
13
|
+
</>
|
|
14
|
+
);
|
|
15
|
+
`,
|
|
16
|
+
{ parser: 'tsx' },
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
expect(result).toMatchInlineSnapshot(`
|
|
20
|
+
"const App = () => (
|
|
21
|
+
<>
|
|
22
|
+
<ProgressBar value={20} label="Label" type="progress" />
|
|
23
|
+
<ProgressBar type="meter" value={20} label="Label" />
|
|
24
|
+
<ProgressBar type="progress" value={20} label="Label" />
|
|
25
|
+
</>
|
|
26
|
+
);"
|
|
27
|
+
`);
|
|
28
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Transform } from 'jscodeshift';
|
|
2
|
+
|
|
3
|
+
import { red, isExpression } from '../../brand-refresh/transformers/utils';
|
|
4
|
+
|
|
5
|
+
const transformer: Transform = (file, api, options) => {
|
|
6
|
+
// Don't transform if the file doesn't import `@razorapy/blade/components` because it's not using Blade components
|
|
7
|
+
// Allow the migration test file to be transformed
|
|
8
|
+
if (!file.source.includes('@razorpay/blade/components') && file.path !== undefined) {
|
|
9
|
+
return file.source;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const j = api.jscodeshift;
|
|
13
|
+
const root = j.withParser('tsx')(file.source);
|
|
14
|
+
|
|
15
|
+
// Add type prop if variant prop is not defined
|
|
16
|
+
try {
|
|
17
|
+
root
|
|
18
|
+
.find(j.JSXElement, {
|
|
19
|
+
openingElement: {
|
|
20
|
+
name: {
|
|
21
|
+
name: 'ProgressBar',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
.replaceWith(({ node }) => {
|
|
26
|
+
const variantAttribute = node.openingElement.attributes.find(
|
|
27
|
+
(attribute) => attribute.name?.name === 'variant',
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
if (!variantAttribute) {
|
|
31
|
+
node.openingElement.attributes?.push(
|
|
32
|
+
j.jsxAttribute(j.jsxIdentifier('type'), j.literal('progress')),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return node;
|
|
37
|
+
});
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(
|
|
40
|
+
red(
|
|
41
|
+
`⛔️ ${file.path}: Oops! Ran into an issue while adding the "type" prop to the ProgressBar component.`,
|
|
42
|
+
),
|
|
43
|
+
`\n${red(error.stack)}\n`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Update the variant prop to type prop if defined
|
|
48
|
+
try {
|
|
49
|
+
root
|
|
50
|
+
.find(j.JSXElement, {
|
|
51
|
+
openingElement: {
|
|
52
|
+
name: {
|
|
53
|
+
name: 'ProgressBar',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
.find(j.JSXAttribute, {
|
|
58
|
+
name: {
|
|
59
|
+
name: 'variant',
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
.replaceWith(({ node }) => {
|
|
63
|
+
if (isExpression(node)) {
|
|
64
|
+
console.warn(
|
|
65
|
+
red('\n⛔️ Expression found in the "variant" attribute, please update manually:'),
|
|
66
|
+
red(`${file.path}:${node.loc?.start.line}:${node.loc.start.column}\n`),
|
|
67
|
+
);
|
|
68
|
+
return node;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (node.value?.value === 'progress' || node.value?.value === 'meter') {
|
|
72
|
+
node.name.name = 'type';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return node;
|
|
76
|
+
});
|
|
77
|
+
} catch (error) {
|
|
78
|
+
console.error(
|
|
79
|
+
red(
|
|
80
|
+
`⛔️ ${file.path}: Oops! Ran into an issue while updating the "variant" prop of the ProgressBar component.`,
|
|
81
|
+
),
|
|
82
|
+
`\n${red(error.stack)}\n`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return root.toSource(options.printOptions);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default transformer;
|