@razorpay/blade 11.13.1 → 11.15.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/Alert/Alert.js +1 -1
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- 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/Box/Box.js +1 -1
- package/build/lib/native/components/Box/Box.js.map +1 -1
- package/build/lib/native/components/Box/styledProps/getStyledProps.js +1 -1
- package/build/lib/native/components/Box/styledProps/getStyledProps.js.map +1 -1
- package/build/lib/native/components/Indicator/Indicator.js +1 -1
- package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/native/components/StepGroup/StepGroup.native.js +17 -0
- package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -0
- package/build/lib/native/components/StepGroup/StepGroupContext.js +6 -0
- package/build/lib/native/components/StepGroup/StepGroupContext.js.map +1 -0
- package/build/lib/native/components/StepGroup/StepItem.native.js +17 -0
- package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -0
- package/build/lib/native/components/StepGroup/StepItemMarker.js +15 -0
- package/build/lib/native/components/StepGroup/StepItemMarker.js.map +1 -0
- package/build/lib/native/components/StepGroup/tokens.js +8 -0
- package/build/lib/native/components/StepGroup/tokens.js.map +1 -0
- package/build/lib/native/components/index.js +3 -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/Alert/Alert.js +5 -4
- package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +7 -2
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +17 -5
- 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/Box/Box.js +5 -0
- package/build/lib/web/development/components/Box/Box.js.map +1 -1
- package/build/lib/web/development/components/Box/styledProps/getStyledProps.js +2 -1
- package/build/lib/web/development/components/Box/styledProps/getStyledProps.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js +138 -0
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/StepGroupContext.js +15 -0
- package/build/lib/web/development/components/StepGroup/StepGroupContext.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/StepItem.web.js +224 -0
- package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/StepItemMarker.js +65 -0
- package/build/lib/web/development/components/StepGroup/StepItemMarker.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/StepLine.web.js +336 -0
- package/build/lib/web/development/components/StepGroup/StepLine.web.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/componentIds.js +7 -0
- package/build/lib/web/development/components/StepGroup/componentIds.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/index.js +4 -0
- package/build/lib/web/development/components/StepGroup/index.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/tokens.js +62 -0
- package/build/lib/web/development/components/StepGroup/tokens.js.map +1 -0
- package/build/lib/web/development/components/index.js +4 -0
- package/build/lib/web/development/components/index.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/development/utils/metaAttribute/metaConstants.js +3 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/utils/omitPropsFromHTML/index.js +1 -1
- package/build/lib/web/development/utils/omitPropsFromHTML/index.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +5 -4
- package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +7 -2
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +17 -5
- 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/Box/Box.js +5 -0
- package/build/lib/web/production/components/Box/Box.js.map +1 -1
- package/build/lib/web/production/components/Box/styledProps/getStyledProps.js +2 -1
- package/build/lib/web/production/components/Box/styledProps/getStyledProps.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js +138 -0
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/StepGroupContext.js +15 -0
- package/build/lib/web/production/components/StepGroup/StepGroupContext.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/StepItem.web.js +224 -0
- package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/StepItemMarker.js +65 -0
- package/build/lib/web/production/components/StepGroup/StepItemMarker.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/StepLine.web.js +336 -0
- package/build/lib/web/production/components/StepGroup/StepLine.web.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/componentIds.js +7 -0
- package/build/lib/web/production/components/StepGroup/componentIds.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/index.js +4 -0
- package/build/lib/web/production/components/StepGroup/index.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/tokens.js +62 -0
- package/build/lib/web/production/components/StepGroup/tokens.js.map +1 -0
- package/build/lib/web/production/components/index.js +4 -0
- package/build/lib/web/production/components/index.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/lib/web/production/utils/metaAttribute/metaConstants.js +3 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/utils/omitPropsFromHTML/index.js +1 -1
- package/build/lib/web/production/utils/omitPropsFromHTML/index.js.map +1 -1
- package/build/types/components/index.d.ts +1907 -79
- package/build/types/components/index.native.d.ts +948 -94
- package/build/types/tokens/index.d.ts +4 -0
- package/build/types/tokens/index.native.d.ts +4 -0
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Indicator.js","sources":["../../../../../../src/components/Indicator/Indicator.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback } from 'react';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport Svg from '~components/Icons/_Svg';\nimport Circle from '~components/Icons/_Svg/Circle';\nimport { Text } from '~components/Typography';\nimport { size as sizeToken } from '~tokens/global';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype IndicatorCommonProps = {\n /**\n * Sets the color tone\n *\n * @default neutral\n */\n color?: FeedbackColors;\n\n /**\n * Size of the indicator\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype IndicatorWithoutA11yLabel = {\n /**\n * A text label to show alongside the indicator dot\n */\n children: StringChildrenType;\n\n /**\n * a11y label for screen readers\n */\n accessibilityLabel?: string;\n};\n\ntype IndicatorWithA11yLabel = {\n /**\n * a11y label for screen readers\n */\n accessibilityLabel: string;\n\n /**\n * A text label to show alongside the indicator dot\n */\n children?: StringChildrenType;\n};\n\ntype IndicatorProps = IndicatorCommonProps & (IndicatorWithA11yLabel | IndicatorWithoutA11yLabel);\n\ntype Dimensions = {\n svgSize: number;\n textSize: 'small' | 'medium';\n};\n\nconst Indicator = ({\n accessibilityLabel,\n children,\n size = 'medium',\n color = 'neutral',\n testID,\n ...styledProps\n}: IndicatorProps): ReactElement => {\n const { theme } = useTheme();\n const childrenString = getStringFromReactText(children);\n\n const fillColor
|
|
1
|
+
{"version":3,"file":"Indicator.js","sources":["../../../../../../src/components/Indicator/Indicator.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback } from 'react';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport Svg from '~components/Icons/_Svg';\nimport Circle from '~components/Icons/_Svg/Circle';\nimport { Text } from '~components/Typography';\nimport { size as sizeToken } from '~tokens/global';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype IndicatorCommonProps = {\n /**\n * Sets the color tone\n *\n * @default neutral\n */\n color?: FeedbackColors | 'primary';\n\n /**\n * Size of the indicator\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype IndicatorWithoutA11yLabel = {\n /**\n * A text label to show alongside the indicator dot\n */\n children: StringChildrenType;\n\n /**\n * a11y label for screen readers\n */\n accessibilityLabel?: string;\n};\n\ntype IndicatorWithA11yLabel = {\n /**\n * a11y label for screen readers\n */\n accessibilityLabel: string;\n\n /**\n * A text label to show alongside the indicator dot\n */\n children?: StringChildrenType;\n};\n\ntype IndicatorProps = IndicatorCommonProps & (IndicatorWithA11yLabel | IndicatorWithoutA11yLabel);\n\ntype Dimensions = {\n svgSize: number;\n textSize: 'small' | 'medium';\n};\n\nconst Indicator = ({\n accessibilityLabel,\n children,\n size = 'medium',\n color = 'neutral',\n testID,\n ...styledProps\n}: IndicatorProps): ReactElement => {\n const { theme } = useTheme();\n const childrenString = getStringFromReactText(children);\n\n const fillColor =\n color === 'primary'\n ? theme.colors.surface.background.primary.intense\n : theme.colors.feedback.background[color].intense;\n const getDimension = useCallback((): Dimensions => {\n switch (size) {\n case 'small':\n return { svgSize: sizeToken[6], textSize: 'small' };\n case 'large':\n return { svgSize: sizeToken[10], textSize: 'medium' };\n default:\n return { svgSize: sizeToken[8], textSize: 'medium' };\n }\n }, [size]);\n const dimensions = getDimension();\n\n const isWeb = !isReactNative();\n const a11yProps = makeAccessible({\n label: accessibilityLabel ?? childrenString,\n ...(isWeb && { role: 'status' }),\n });\n\n return (\n <BaseBox\n display={(isWeb ? 'inline-flex' : 'flex') as never}\n {...a11yProps}\n {...metaAttribute({ name: MetaConstants.Indicator, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Svg\n width={String(dimensions.svgSize)}\n height={String(dimensions.svgSize)}\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n >\n <Circle cx=\"5\" cy=\"5\" r=\"5\" fill={fillColor} />\n </Svg>\n <BaseBox marginLeft=\"spacing.2\">\n <Text\n weight=\"medium\"\n color=\"surface.text.gray.subtle\"\n textAlign=\"left\"\n size={dimensions.textSize}\n >\n {children}\n </Text>\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { IndicatorProps };\nexport { Indicator };\n"],"names":["Indicator","_ref","accessibilityLabel","children","_ref$size","size","_ref$color","color","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","childrenString","getStringFromReactText","fillColor","colors","surface","background","primary","intense","feedback","getDimension","useCallback","svgSize","sizeToken","textSize","dimensions","isWeb","isReactNative","a11yProps","makeAccessible","_objectSpread","label","role","_jsx","BaseBox","display","metaAttribute","name","MetaConstants","getStyledProps","_jsxs","flexDirection","alignItems","Svg","width","String","height","viewBox","fill","Circle","cx","cy","r","marginLeft","Text","weight","textAlign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAOqB;AAAA,EAAA,IANlCC,kBAAkB,GAAAD,IAAA,CAAlBC,kBAAkB;IAClBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,SAAA,GAAAH,IAAA,CACRI,IAAI;AAAJA,IAAAA,MAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IAAAE,UAAA,GAAAL,IAAA,CACfM,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,UAAA;IACjBE,MAAM,GAAAP,IAAA,CAANO,MAAM;AACHC,IAAAA,WAAW,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAEd,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AACb,EAAA,IAAMC,cAAc,GAAGC,sBAAsB,CAACb,QAAQ,CAAC,CAAA;AAEvD,EAAA,IAAMc,SAAS,GACbV,KAAK,KAAK,SAAS,GACfO,KAAK,CAACI,MAAM,CAACC,OAAO,CAACC,UAAU,CAACC,OAAO,CAACC,OAAO,GAC/CR,KAAK,CAACI,MAA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A;AAAO,GAAC,CAAC,CAAA,EACxDmC,cAAc,CAAClC,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAN,QAAA,eAE/ByC,IAAA,CAACN,OAAO,EAAA;AAACC,MAAAA,OAAO,EAAC,MAAM;AAACM,MAAAA,aAAa,EAAC,KAAK;AAACC,MAAAA,UAAU,EAAC,QAAQ;MAAA3C,QAAA,EAAA,cAC7DkC,GAAA,CAACU,GAAG,EAAA;AACFC,QAAAA,KAAK,EAAEC,MAAM,CAACpB,UAAU,CAACH,OAAO,CAAE;AAClCwB,QAAAA,MAAM,EAAED,MAAM,CAACpB,UAAU,CAACH,OAAO,CAAE;AACnCyB,QAAAA,OAAO,EAAC,WAAW;AACnBC,QAAAA,IAAI,EAAC,MAAM;QAAAjD,QAAA,eAEXkC,GAAA,CAACgB,MAAM,EAAA;AAACC,UAAAA,EAAE,EAAC,GAAG;AAACC,UAAAA,EAAE,EAAC,GAAG;AAACC,UAAAA,CAAC,EAAC,GAAG;AAACJ,UAAAA,IAAI,EAAEnC,SAAAA;SAAY,CAAA;AAAC,OAC5C,CAAC,eACNoB,GAAA,CAACC,OAAO,EAAA;AAACmB,QAAAA,UAAU,EAAC,WAAW;QAAAtD,QAAA,eAC7BkC,GAAA,CAACqB,IAAI,EAAA;AACHC,UAAAA,MAAM,EAAC,QAAQ;AACfpD,UAAAA,KAAK,EAAC,0BAA0B;AAChCqD,UAAAA,SAAS,EAAC,MAAM;UAChBvD,IAAI,EAAEwB,UAAU,CAACD,QAAS;AAAAzB,UAAAA,QAAA,EAEzBA,QAAAA;SACG,CAAA;AAAC,OACA,CAAC,CAAA;KACH,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd;;;;"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { useStepGroup, StepGroupContext } from './StepGroupContext.js';
|
|
5
|
+
import { componentIds } from './componentIds.js';
|
|
6
|
+
import '../Box/BaseBox/index.js';
|
|
7
|
+
import '../Box/styledProps/index.js';
|
|
8
|
+
import '../../utils/isValidAllowedChildren/index.js';
|
|
9
|
+
import '../../utils/assignWithoutSideEffects/index.js';
|
|
10
|
+
import '../../utils/metaAttribute/index.js';
|
|
11
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
|
+
import { getComponentId } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
|
|
13
|
+
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
14
|
+
import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
|
|
15
|
+
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
16
|
+
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
17
|
+
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
18
|
+
|
|
19
|
+
var _excluded = ["_nestingLevel", "children"],
|
|
20
|
+
_excluded2 = ["size", "orientation", "children", "testID", "_nestingLevel", "width", "minWidth", "maxWidth"];
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
var useChildrenWithIndexes = function useChildrenWithIndexes(_ref) {
|
|
24
|
+
var _nestingLevel = _ref._nestingLevel,
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
parentStepGroupProps = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
var _useStepGroup = useStepGroup(),
|
|
28
|
+
totalItemsFromPreviousParent = _useStepGroup.totalItemsInParentGroupCount;
|
|
29
|
+
var totalIndex = 0;
|
|
30
|
+
var traverseGroupAndAddIndex = function traverseGroupAndAddIndex(groupChildrenProp) {
|
|
31
|
+
var nestingLevelOfGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
32
|
+
var stepItemIndex = 0;
|
|
33
|
+
return React__default.Children.map(groupChildrenProp, function (child, index) {
|
|
34
|
+
var componentId = getComponentId(child);
|
|
35
|
+
if (componentId === componentIds.StepItem) {
|
|
36
|
+
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
37
|
+
_index: stepItemIndex++,
|
|
38
|
+
_totalIndex: totalIndex++,
|
|
39
|
+
_nestingLevel: nestingLevelOfGroup,
|
|
40
|
+
key: index
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (componentId === componentIds.StepGroup && nestingLevelOfGroup < 3) {
|
|
44
|
+
return /*#__PURE__*/React__default.cloneElement(child, _objectSpread(_objectSpread({}, parentStepGroupProps), {}, {
|
|
45
|
+
children: traverseGroupAndAddIndex(child.props.children, nestingLevelOfGroup + 1),
|
|
46
|
+
_nestingLevel: nestingLevelOfGroup + 1
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
return child;
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
var childrenWithIndex = React__default.useMemo(function () {
|
|
53
|
+
return _nestingLevel === 0 ? traverseGroupAndAddIndex(children) : children;
|
|
54
|
+
},
|
|
55
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
|
+
[children, _nestingLevel]);
|
|
57
|
+
var totalItemsInParentGroupCount = _nestingLevel === 0 ? totalIndex : totalItemsFromPreviousParent;
|
|
58
|
+
return {
|
|
59
|
+
childrenWithIndex: childrenWithIndex,
|
|
60
|
+
totalItemsInParentGroupCount: totalItemsInParentGroupCount
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
var _StepGroup = function _StepGroup(_ref2) {
|
|
64
|
+
var _ref2$size = _ref2.size,
|
|
65
|
+
size = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
66
|
+
_ref2$orientation = _ref2.orientation,
|
|
67
|
+
orientation = _ref2$orientation === void 0 ? 'vertical' : _ref2$orientation,
|
|
68
|
+
children = _ref2.children,
|
|
69
|
+
testID = _ref2.testID,
|
|
70
|
+
_ref2$_nestingLevel = _ref2._nestingLevel,
|
|
71
|
+
_nestingLevel = _ref2$_nestingLevel === void 0 ? 0 : _ref2$_nestingLevel,
|
|
72
|
+
width = _ref2.width,
|
|
73
|
+
minWidth = _ref2.minWidth,
|
|
74
|
+
maxWidth = _ref2.maxWidth,
|
|
75
|
+
styledProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
76
|
+
var itemsInGroupCount = React__default.Children.count(children);
|
|
77
|
+
var _useChildrenWithIndex = useChildrenWithIndexes({
|
|
78
|
+
children: children,
|
|
79
|
+
size: size,
|
|
80
|
+
orientation: orientation,
|
|
81
|
+
_nestingLevel: _nestingLevel
|
|
82
|
+
}),
|
|
83
|
+
childrenWithIndex = _useChildrenWithIndex.childrenWithIndex,
|
|
84
|
+
totalItemsInParentGroupCount = _useChildrenWithIndex.totalItemsInParentGroupCount;
|
|
85
|
+
var contextValue = React__default.useMemo(function () {
|
|
86
|
+
return {
|
|
87
|
+
size: size,
|
|
88
|
+
orientation: orientation,
|
|
89
|
+
itemsInGroupCount: itemsInGroupCount,
|
|
90
|
+
totalItemsInParentGroupCount: totalItemsInParentGroupCount
|
|
91
|
+
};
|
|
92
|
+
}, [size, orientation, itemsInGroupCount, totalItemsInParentGroupCount]);
|
|
93
|
+
var isHorizontal = orientation === 'horizontal';
|
|
94
|
+
var defaultWidth = isHorizontal ? '100%' : undefined;
|
|
95
|
+
return /*#__PURE__*/jsx(StepGroupContext.Provider, {
|
|
96
|
+
value: contextValue,
|
|
97
|
+
children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({}, getStyledProps(styledProps)), {}, {
|
|
98
|
+
display: "inline-flex",
|
|
99
|
+
maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : '100%',
|
|
100
|
+
minWidth: minWidth,
|
|
101
|
+
width: width !== null && width !== void 0 ? width : defaultWidth,
|
|
102
|
+
padding: _nestingLevel === 0 ? 'spacing.4' : undefined,
|
|
103
|
+
overflowX: orientation === 'horizontal' ? 'auto' : undefined,
|
|
104
|
+
flexDirection: orientation === 'vertical' ? 'column' : 'row'
|
|
105
|
+
}, metaAttribute({
|
|
106
|
+
name: MetaConstants.StepGroup,
|
|
107
|
+
testID: testID
|
|
108
|
+
})), {}, {
|
|
109
|
+
children: childrenWithIndex
|
|
110
|
+
}))
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* ## StepGroup
|
|
116
|
+
*
|
|
117
|
+
* Step Group visualises sequential processes with a consistent structure. It can be interactive, guiding users through steps, or function as a timeline for reference.
|
|
118
|
+
*
|
|
119
|
+
* ### Usage
|
|
120
|
+
*
|
|
121
|
+
* ```jsx
|
|
122
|
+
* <StepGroup orientation="vertical" size="medium">
|
|
123
|
+
* <StepItem title="Personal Details" />
|
|
124
|
+
* <StepItem title="Business Details" />
|
|
125
|
+
* </StepGroup>
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* ---
|
|
129
|
+
*
|
|
130
|
+
* Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}
|
|
131
|
+
*/
|
|
132
|
+
var StepGroup = /*#__PURE__*/assignWithoutSideEffects(_StepGroup, {
|
|
133
|
+
componentId: componentIds.StepGroup,
|
|
134
|
+
displayName: componentIds.StepGroup
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export { StepGroup };
|
|
138
|
+
//# sourceMappingURL=StepGroup.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepGroup.web.js","sources":["../../../../../../src/components/StepGroup/StepGroup.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { StepGroupContextType, StepGroupProps } from './types';\nimport { StepGroupContext, useStepGroup } from './StepGroupContext';\nimport { componentIds } from './componentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst useChildrenWithIndexes = ({\n _nestingLevel,\n children,\n ...parentStepGroupProps\n}: Pick<StepGroupProps, 'children' | '_nestingLevel' | 'size' | 'orientation'>): {\n childrenWithIndex: React.ReactNode;\n totalItemsInParentGroupCount: number;\n} => {\n const { totalItemsInParentGroupCount: totalItemsFromPreviousParent } = useStepGroup();\n\n let totalIndex = 0;\n const traverseGroupAndAddIndex = (\n groupChildrenProp: StepGroupProps['children'],\n nestingLevelOfGroup = 0,\n ): React.ReactNode => {\n let stepItemIndex = 0;\n return React.Children.map(groupChildrenProp, (child, index) => {\n const componentId = getComponentId(child);\n if (componentId === componentIds.StepItem) {\n return React.cloneElement(child, {\n _index: stepItemIndex++,\n _totalIndex: totalIndex++,\n _nestingLevel: nestingLevelOfGroup,\n key: index,\n });\n }\n\n if (componentId === componentIds.StepGroup && nestingLevelOfGroup < 3) {\n return React.cloneElement(child, {\n ...parentStepGroupProps,\n children: traverseGroupAndAddIndex(child.props.children, nestingLevelOfGroup + 1),\n _nestingLevel: nestingLevelOfGroup + 1,\n });\n }\n\n return child;\n });\n };\n\n const childrenWithIndex: React.ReactNode = React.useMemo(\n () => (_nestingLevel === 0 ? traverseGroupAndAddIndex(children) : children),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [children, _nestingLevel],\n );\n\n const totalItemsInParentGroupCount =\n _nestingLevel === 0 ? totalIndex : totalItemsFromPreviousParent;\n\n return { childrenWithIndex, totalItemsInParentGroupCount };\n};\n\nconst _StepGroup = ({\n size = 'medium',\n orientation = 'vertical',\n children,\n testID,\n _nestingLevel = 0,\n width,\n minWidth,\n maxWidth,\n ...styledProps\n}: StepGroupProps): React.ReactElement => {\n const itemsInGroupCount = React.Children.count(children);\n const { childrenWithIndex, totalItemsInParentGroupCount } = useChildrenWithIndexes({\n children,\n size,\n orientation,\n _nestingLevel,\n });\n const contextValue = React.useMemo<StepGroupContextType>(\n () => ({\n size,\n orientation,\n itemsInGroupCount,\n totalItemsInParentGroupCount,\n }),\n [size, orientation, itemsInGroupCount, totalItemsInParentGroupCount],\n );\n\n const isHorizontal = orientation === 'horizontal';\n const defaultWidth = isHorizontal ? '100%' : undefined;\n\n return (\n <StepGroupContext.Provider value={contextValue}>\n <BaseBox\n {...getStyledProps(styledProps)}\n display=\"inline-flex\"\n maxWidth={maxWidth ?? '100%'}\n minWidth={minWidth}\n width={width ?? defaultWidth}\n padding={_nestingLevel === 0 ? 'spacing.4' : undefined}\n overflowX={orientation === 'horizontal' ? 'auto' : undefined}\n flexDirection={orientation === 'vertical' ? 'column' : 'row'}\n {...metaAttribute({ name: MetaConstants.StepGroup, testID })}\n >\n {childrenWithIndex}\n </BaseBox>\n </StepGroupContext.Provider>\n );\n};\n\n/**\n * ## StepGroup\n *\n * Step Group visualises sequential processes with a consistent structure. It can be interactive, guiding users through steps, or function as a timeline for reference.\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem title=\"Personal Details\" />\n * <StepItem title=\"Business Details\" />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepGroup = assignWithoutSideEffects(_StepGroup, {\n componentId: componentIds.StepGroup,\n displayName: componentIds.StepGroup,\n});\n\nexport { StepGroup };\n"],"names":["useChildrenWithIndexes","_ref","_nestingLevel","children","parentStepGroupProps","_objectWithoutProperties","_excluded","_useStepGroup","useStepGroup","totalItemsFromPreviousParent","totalItemsInParentGroupCount","totalIndex","traverseGroupAndAddIndex","groupChildrenProp","nestingLevelOfGroup","arguments","length","undefined","stepItemIndex","React","Children","map","child","index","componentId","getComponentId","componentIds","StepItem","cloneElement","_index","_totalIndex","key","StepGroup","_objectSpread","props","childrenWithIndex","useMemo","_StepGroup","_ref2","_ref2$size","size","_ref2$orientation","orientation","testID","_ref2$_nestingLevel","width","minWidth","maxWidth","styledProps","_excluded2","itemsInGroupCount","count","_useChildrenWithIndex","contextValue","isHorizontal","defaultWidth","_jsx","StepGroupContext","Provider","value","BaseBox","getStyledProps","display","padding","overflowX","flexDirection","metaAttribute","name","MetaConstants","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,IAAA,EAOvB;AAAA,EAAA,IANHC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AACLC,IAAAA,oBAAoB,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAKvB,EAAA,IAAAC,aAAA,GAAuEC,YAAY,EAAE;IAA/CC,4BAA4B,GAAAF,aAAA,CAA1DG,4BAA4B,CAAA;EAEpC,IAAIC,UAAU,GAAG,CAAC,CAAA;AAClB,EAAA,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAC5BC,iBAA6C,EAEzB;AAAA,IAAA,IADpBC,mBAAmB,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,CAAC,CAAA;IAEvB,IAAIG,aAAa,GAAG,CAAC,CAAA;AACrB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EC,IAAI,EAAEC,aAAa,CAACpC,SAAS;AAAEW,MAAAA,MAAM,EAANA,MAAAA;AAAO,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAxC,MAAAA,QAAA,EAE3DgC,iBAAAA;KACM,CAAA,CAAA;AAAC,GACe,CAAC,CAAA;AAEhC,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMH,SAAS,gBAAGqC,wBAAwB,CAAChC,UAAU,EAAE;EACrDb,WAAW,EAAEE,YAAY,CAACM,SAAS;EACnCsC,WAAW,EAAE5C,YAAY,CAACM,SAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
var StepGroupContext = /*#__PURE__*/React__default.createContext({
|
|
4
|
+
itemsInGroupCount: 0,
|
|
5
|
+
totalItemsInParentGroupCount: 0,
|
|
6
|
+
size: 'medium',
|
|
7
|
+
orientation: 'vertical'
|
|
8
|
+
});
|
|
9
|
+
var useStepGroup = function useStepGroup() {
|
|
10
|
+
var stepGroupContext = React__default.useContext(StepGroupContext);
|
|
11
|
+
return stepGroupContext;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { StepGroupContext, useStepGroup };
|
|
15
|
+
//# sourceMappingURL=StepGroupContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepGroupContext.js","sources":["../../../../../../src/components/StepGroup/StepGroupContext.tsx"],"sourcesContent":["import React from 'react';\nimport type { StepGroupContextType } from './types';\n\nconst StepGroupContext = React.createContext<StepGroupContextType>({\n itemsInGroupCount: 0,\n totalItemsInParentGroupCount: 0,\n size: 'medium',\n orientation: 'vertical',\n});\n\nconst useStepGroup = (): StepGroupContextType => {\n const stepGroupContext = React.useContext(StepGroupContext);\n\n return stepGroupContext;\n};\n\nexport { useStepGroup, StepGroupContext };\n"],"names":["StepGroupContext","React","createContext","itemsInGroupCount","totalItemsInParentGroupCount","size","orientation","useStepGroup","stepGroupContext","useContext"],"mappings":";;AAGA,IAAMA,gBAAgB,gBAAGC,cAAK,CAACC,aAAa,CAAuB;AACjEC,EAAAA,iBAAiB,EAAE,CAAC;AACpBC,EAAAA,4BAA4B,EAAE,CAAC;AAC/BC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC,EAAC;AAEF,IAAMC,YAAY,GAAG,SAAfA,YAAYA,GAA+B;AAC/C,EAAA,IAAMC,gBAAgB,GAAGP,cAAK,CAACQ,UAAU,CAACT,gBAAgB,CAAC,CAAA;AAE3D,EAAA,OAAOQ,gBAAgB,CAAA;AACzB;;;;"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { StepLine } from './StepLine.web.js';
|
|
5
|
+
import { useStepGroup } from './StepGroupContext.js';
|
|
6
|
+
import { componentIds } from './componentIds.js';
|
|
7
|
+
import { stepItemHeaderTokens, itemLineGap } from './tokens.js';
|
|
8
|
+
import '../Box/index.js';
|
|
9
|
+
import '../Typography/index.js';
|
|
10
|
+
import '../../utils/assignWithoutSideEffects/index.js';
|
|
11
|
+
import '../Box/BaseBox/index.js';
|
|
12
|
+
import '../../utils/index.js';
|
|
13
|
+
import '../../tokens/global/index.js';
|
|
14
|
+
import '../../utils/getFocusRingStyles/index.js';
|
|
15
|
+
import getIn from '../../utils/lodashButBetter/get.js';
|
|
16
|
+
import '../../utils/logger/index.js';
|
|
17
|
+
import '../../utils/metaAttribute/index.js';
|
|
18
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
19
|
+
import { makeSpace } from '../../utils/makeSpace/makeSpace.js';
|
|
20
|
+
import { getFocusRingStyles } from '../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
|
|
21
|
+
import { throwBladeError } from '../../utils/logger/logger.js';
|
|
22
|
+
import { Box } from '../Box/Box.js';
|
|
23
|
+
import { Text } from '../Typography/Text/Text.js';
|
|
24
|
+
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
25
|
+
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
26
|
+
import { size } from '../../tokens/global/size.js';
|
|
27
|
+
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
28
|
+
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
29
|
+
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
30
|
+
|
|
31
|
+
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; }
|
|
32
|
+
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; }
|
|
33
|
+
var InteractiveItemHeaderBox = /*#__PURE__*/styled.button.withConfig({
|
|
34
|
+
displayName: "StepItemweb__InteractiveItemHeaderBox",
|
|
35
|
+
componentId: "x6btk4-0"
|
|
36
|
+
})(function (props) {
|
|
37
|
+
return {
|
|
38
|
+
padding: "".concat(makeSpace(getIn(props.theme, props.paddingY)), " ").concat(makeSpace(getIn(props.theme, props.paddingX))),
|
|
39
|
+
cursor: 'pointer',
|
|
40
|
+
display: 'inline-block',
|
|
41
|
+
textDecoration: 'none',
|
|
42
|
+
border: 'none',
|
|
43
|
+
textAlign: 'inherit',
|
|
44
|
+
backgroundColor: props.isSelected ? props.theme.colors.interactive.background.primary.faded : props.theme.colors.transparent,
|
|
45
|
+
borderRadius: props.theme.border.radius.medium,
|
|
46
|
+
width: '100%',
|
|
47
|
+
transition: "background-color ".concat(props.theme.motion.duration.xquick, " ").concat(props.theme.motion.easing.standard.effective),
|
|
48
|
+
':hover': {
|
|
49
|
+
backgroundColor: props.isSelected ? props.theme.colors.interactive.background.primary.fadedHighlighted : props.theme.colors.interactive.background.gray.fadedHighlighted
|
|
50
|
+
},
|
|
51
|
+
':focus-visible': _objectSpread({}, getFocusRingStyles({
|
|
52
|
+
theme: props.theme
|
|
53
|
+
}))
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
var getStepTypeFromIndex = function getStepTypeFromIndex(_ref) {
|
|
57
|
+
var _index = _ref._index,
|
|
58
|
+
_nestingLevel = _ref._nestingLevel,
|
|
59
|
+
itemsCount = _ref.itemsCount;
|
|
60
|
+
if (_nestingLevel === 0) {
|
|
61
|
+
return 'default';
|
|
62
|
+
}
|
|
63
|
+
if (itemsCount === 1) {
|
|
64
|
+
return 'single-item';
|
|
65
|
+
}
|
|
66
|
+
if (_index === 0) {
|
|
67
|
+
return 'start';
|
|
68
|
+
}
|
|
69
|
+
if (_index === itemsCount - 1) {
|
|
70
|
+
return 'end';
|
|
71
|
+
}
|
|
72
|
+
return 'middle';
|
|
73
|
+
};
|
|
74
|
+
var _StepItem = function _StepItem(_ref2) {
|
|
75
|
+
var title = _ref2.title,
|
|
76
|
+
timestamp = _ref2.timestamp,
|
|
77
|
+
description = _ref2.description,
|
|
78
|
+
_ref2$stepProgress = _ref2.stepProgress,
|
|
79
|
+
stepProgress = _ref2$stepProgress === void 0 ? 'none' : _ref2$stepProgress,
|
|
80
|
+
marker = _ref2.marker,
|
|
81
|
+
trailing = _ref2.trailing,
|
|
82
|
+
isSelected = _ref2.isSelected,
|
|
83
|
+
href = _ref2.href,
|
|
84
|
+
target = _ref2.target,
|
|
85
|
+
onClick = _ref2.onClick,
|
|
86
|
+
children = _ref2.children,
|
|
87
|
+
_ref2$_index = _ref2._index,
|
|
88
|
+
_index = _ref2$_index === void 0 ? 0 : _ref2$_index,
|
|
89
|
+
_ref2$_totalIndex = _ref2._totalIndex,
|
|
90
|
+
_totalIndex = _ref2$_totalIndex === void 0 ? 0 : _ref2$_totalIndex,
|
|
91
|
+
_ref2$_nestingLevel = _ref2._nestingLevel,
|
|
92
|
+
_nestingLevel = _ref2$_nestingLevel === void 0 ? 0 : _ref2$_nestingLevel;
|
|
93
|
+
var _useStepGroup = useStepGroup(),
|
|
94
|
+
itemsCount = _useStepGroup.itemsInGroupCount,
|
|
95
|
+
totalItemsInParentGroupCount = _useStepGroup.totalItemsInParentGroupCount,
|
|
96
|
+
orientation = _useStepGroup.orientation,
|
|
97
|
+
size$1 = _useStepGroup.size;
|
|
98
|
+
var stepType = React__default.useMemo(function () {
|
|
99
|
+
return getStepTypeFromIndex({
|
|
100
|
+
_index: _index,
|
|
101
|
+
_nestingLevel: _nestingLevel,
|
|
102
|
+
itemsCount: itemsCount
|
|
103
|
+
});
|
|
104
|
+
}, [_index, _nestingLevel, itemsCount]);
|
|
105
|
+
var itemRef = React__default.useRef(null);
|
|
106
|
+
var isFirstItem = _totalIndex === 0;
|
|
107
|
+
var isLastItem = _totalIndex === totalItemsInParentGroupCount - 1;
|
|
108
|
+
var isInteractive = Boolean(href) || Boolean(onClick);
|
|
109
|
+
var isVertical = orientation === 'vertical';
|
|
110
|
+
if (true) {
|
|
111
|
+
if (trailing && orientation === 'horizontal') {
|
|
112
|
+
throwBladeError({
|
|
113
|
+
message: 'trailing is not allowed in horizontal StepGroup',
|
|
114
|
+
moduleName: 'StepItem'
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (_nestingLevel >= 1 && orientation === 'horizontal') {
|
|
118
|
+
throwBladeError({
|
|
119
|
+
message: 'Nested StepGroup components are not allowed in horizontal orientation',
|
|
120
|
+
moduleName: 'StepItem'
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
var stepItemHeaderJSX = /*#__PURE__*/jsxs(Box, {
|
|
125
|
+
display: "flex",
|
|
126
|
+
flexDirection: "row",
|
|
127
|
+
justifyContent: "space-between",
|
|
128
|
+
gap: "spacing.4",
|
|
129
|
+
children: [/*#__PURE__*/jsxs(Box, {
|
|
130
|
+
children: [/*#__PURE__*/jsx(Text, {
|
|
131
|
+
size: stepItemHeaderTokens[size$1].title,
|
|
132
|
+
color: "surface.text.gray.subtle",
|
|
133
|
+
weight: "semibold",
|
|
134
|
+
children: title
|
|
135
|
+
}), /*#__PURE__*/jsx(Text, {
|
|
136
|
+
size: stepItemHeaderTokens[size$1].timestamp,
|
|
137
|
+
marginY: "spacing.2",
|
|
138
|
+
color: "surface.text.gray.muted",
|
|
139
|
+
variant: "caption",
|
|
140
|
+
children: timestamp
|
|
141
|
+
}), /*#__PURE__*/jsx(Text, {
|
|
142
|
+
size: stepItemHeaderTokens[size$1].description,
|
|
143
|
+
color: "surface.text.gray.muted",
|
|
144
|
+
children: description
|
|
145
|
+
})]
|
|
146
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
147
|
+
children: trailing
|
|
148
|
+
})]
|
|
149
|
+
});
|
|
150
|
+
var stepItemHeaderPaddings = {
|
|
151
|
+
paddingY: 'spacing.3',
|
|
152
|
+
paddingX: 'spacing.4'
|
|
153
|
+
};
|
|
154
|
+
return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread({
|
|
155
|
+
display: "flex",
|
|
156
|
+
flexDirection: isVertical ? 'row' : 'column',
|
|
157
|
+
gap: itemLineGap[size$1],
|
|
158
|
+
className: "step-item step-index-".concat(_index, " step-nesting-level-").concat(_nestingLevel),
|
|
159
|
+
textAlign: isVertical ? 'left' : 'center',
|
|
160
|
+
alignItems: isVertical ? undefined : 'center',
|
|
161
|
+
minWidth: isVertical ? undefined : "min(".concat(makeSize(size['120']), ", 100%)"),
|
|
162
|
+
width: isVertical ? '100%' : undefined,
|
|
163
|
+
flex: isVertical ? undefined : '1'
|
|
164
|
+
}, metaAttribute({
|
|
165
|
+
name: MetaConstants.StepItem
|
|
166
|
+
})), {}, {
|
|
167
|
+
ref: itemRef,
|
|
168
|
+
children: [/*#__PURE__*/jsx(StepLine, {
|
|
169
|
+
shouldShowStartBranch: !isFirstItem,
|
|
170
|
+
shouldShowEndBranch: !isLastItem,
|
|
171
|
+
stepType: stepType,
|
|
172
|
+
marker: marker,
|
|
173
|
+
stepProgress: stepProgress
|
|
174
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
175
|
+
marginTop: "spacing.3",
|
|
176
|
+
flex: "1",
|
|
177
|
+
marginRight: isVertical ? undefined : undefined,
|
|
178
|
+
children: [isInteractive ? /*#__PURE__*/jsx(InteractiveItemHeaderBox, _objectSpread(_objectSpread({}, stepItemHeaderPaddings), {}, {
|
|
179
|
+
as: href ? 'a' : 'button',
|
|
180
|
+
href: href,
|
|
181
|
+
target: target,
|
|
182
|
+
isSelected: isSelected,
|
|
183
|
+
onClick: onClick,
|
|
184
|
+
children: stepItemHeaderJSX
|
|
185
|
+
})) : /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, stepItemHeaderPaddings), {}, {
|
|
186
|
+
children: stepItemHeaderJSX
|
|
187
|
+
})), children ? /*#__PURE__*/jsx(Box, {
|
|
188
|
+
paddingX: "spacing.4",
|
|
189
|
+
paddingY: "spacing.3",
|
|
190
|
+
children: children
|
|
191
|
+
}) : null]
|
|
192
|
+
})]
|
|
193
|
+
}));
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* ## StepItem
|
|
198
|
+
*
|
|
199
|
+
* Component meant to be used inside the StepGroup parent component
|
|
200
|
+
*
|
|
201
|
+
* ### Usage
|
|
202
|
+
*
|
|
203
|
+
* ```jsx
|
|
204
|
+
* <StepGroup orientation="vertical" size="medium">
|
|
205
|
+
* <StepItem
|
|
206
|
+
* title="Personal Details"
|
|
207
|
+
* timestamp="Thu 15th Oct'23 | 12:00pm"
|
|
208
|
+
* description="Fill your personal details here"
|
|
209
|
+
* marker={<StepItemIndicator color="negative" />}
|
|
210
|
+
* />
|
|
211
|
+
* </StepGroup>
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* ---
|
|
215
|
+
*
|
|
216
|
+
* Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}
|
|
217
|
+
*/
|
|
218
|
+
var StepItem = /*#__PURE__*/assignWithoutSideEffects(_StepItem, {
|
|
219
|
+
componentId: componentIds.StepItem,
|
|
220
|
+
displayName: componentIds.StepItem
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
export { StepItem, StepLine };
|
|
224
|
+
//# sourceMappingURL=StepItem.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepItem.web.js","sources":["../../../../../../src/components/StepGroup/StepItem.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { StepLine } from './StepLine';\nimport type { StepLineProps } from './StepLine';\nimport { useStepGroup } from './StepGroupContext';\nimport type {\n InteractiveItemHeaderProps,\n StepGroupContextType,\n StepGroupProps,\n StepItemProps,\n} from './types';\nimport { componentIds } from './componentIds';\nimport { itemLineGap, stepItemHeaderTokens } from './tokens';\nimport { Box } from '~components/Box';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeSize, makeSpace } from '~utils';\nimport { size as sizeTokens } from '~tokens/global';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { throwBladeError } from '~utils/logger';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\ntype GetStepTypeFromIndexProps = {\n _index: StepItemProps['_index'];\n _nestingLevel: StepGroupProps['_nestingLevel'];\n itemsCount: StepGroupContextType['itemsInGroupCount'];\n};\n\nconst InteractiveItemHeaderBox = styled.button<InteractiveItemHeaderProps>((props) => {\n return {\n padding: `${makeSpace(getIn(props.theme, props.paddingY))} ${makeSpace(\n getIn(props.theme, props.paddingX),\n )}`,\n cursor: 'pointer',\n display: 'inline-block',\n textDecoration: 'none',\n border: 'none',\n textAlign: 'inherit',\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.faded\n : props.theme.colors.transparent,\n borderRadius: props.theme.border.radius.medium,\n width: '100%',\n transition: `background-color ${props.theme.motion.duration.xquick} ${props.theme.motion.easing.standard.effective}`,\n ':hover': {\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.fadedHighlighted\n : props.theme.colors.interactive.background.gray.fadedHighlighted,\n },\n ':focus-visible': {\n ...getFocusRingStyles({ theme: props.theme }),\n },\n };\n});\n\nconst getStepTypeFromIndex = ({\n _index,\n _nestingLevel,\n itemsCount,\n}: GetStepTypeFromIndexProps): StepLineProps['stepType'] => {\n if (_nestingLevel === 0) {\n return 'default';\n }\n\n if (itemsCount === 1) {\n return 'single-item';\n }\n\n if (_index === 0) {\n return 'start';\n }\n\n if (_index === itemsCount - 1) {\n return 'end';\n }\n\n return 'middle';\n};\n\nconst _StepItem = ({\n title,\n timestamp,\n description,\n stepProgress = 'none',\n marker,\n trailing,\n isSelected,\n href,\n target,\n onClick,\n children,\n _index = 0,\n _totalIndex = 0,\n _nestingLevel = 0,\n}: StepItemProps): React.ReactElement => {\n const {\n itemsInGroupCount: itemsCount,\n totalItemsInParentGroupCount,\n orientation,\n size,\n } = useStepGroup();\n const stepType = React.useMemo(\n () => getStepTypeFromIndex({ _index, _nestingLevel, itemsCount }),\n [_index, _nestingLevel, itemsCount],\n );\n\n const itemRef = React.useRef<HTMLDivElement>(null);\n\n const isFirstItem = _totalIndex === 0;\n const isLastItem = _totalIndex === totalItemsInParentGroupCount - 1;\n const isInteractive = Boolean(href) || Boolean(onClick);\n const isVertical = orientation === 'vertical';\n\n if (__DEV__) {\n if (trailing && orientation === 'horizontal') {\n throwBladeError({\n message: 'trailing is not allowed in horizontal StepGroup',\n moduleName: 'StepItem',\n });\n }\n\n if (_nestingLevel >= 1 && orientation === 'horizontal') {\n throwBladeError({\n message: 'Nested StepGroup components are not allowed in horizontal orientation',\n moduleName: 'StepItem',\n });\n }\n }\n\n const stepItemHeaderJSX = (\n <Box display=\"flex\" flexDirection=\"row\" justifyContent=\"space-between\" gap=\"spacing.4\">\n <Box>\n <Text\n size={stepItemHeaderTokens[size].title}\n color=\"surface.text.gray.subtle\"\n weight=\"semibold\"\n >\n {title}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].timestamp}\n marginY=\"spacing.2\"\n color=\"surface.text.gray.muted\"\n variant=\"caption\"\n >\n {timestamp}\n </Text>\n <Text size={stepItemHeaderTokens[size].description} color=\"surface.text.gray.muted\">\n {description}\n </Text>\n </Box>\n <Box>{trailing}</Box>\n </Box>\n );\n\n const stepItemHeaderPaddings: Omit<InteractiveItemHeaderProps, 'isSelected'> = {\n paddingY: 'spacing.3',\n paddingX: 'spacing.4',\n } as const;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isVertical ? 'row' : 'column'}\n gap={itemLineGap[size]}\n className={`step-item step-index-${_index} step-nesting-level-${_nestingLevel}`}\n textAlign={isVertical ? 'left' : 'center'}\n alignItems={isVertical ? undefined : 'center'}\n minWidth={isVertical ? undefined : `min(${makeSize(sizeTokens['120'])}, 100%)`}\n width={isVertical ? '100%' : undefined}\n flex={isVertical ? undefined : '1'}\n {...metaAttribute({ name: MetaConstants.StepItem })}\n ref={itemRef}\n >\n <StepLine\n shouldShowStartBranch={!isFirstItem}\n shouldShowEndBranch={!isLastItem}\n stepType={stepType}\n marker={marker}\n stepProgress={stepProgress}\n />\n <Box marginTop=\"spacing.3\" flex=\"1\" marginRight={isVertical ? undefined : undefined}>\n {isInteractive ? (\n <InteractiveItemHeaderBox\n {...stepItemHeaderPaddings}\n as={href ? 'a' : 'button'}\n href={href}\n target={target}\n isSelected={isSelected}\n onClick={onClick}\n >\n {stepItemHeaderJSX}\n </InteractiveItemHeaderBox>\n ) : (\n <Box {...stepItemHeaderPaddings}>{stepItemHeaderJSX}</Box>\n )}\n {children ? (\n <Box paddingX=\"spacing.4\" paddingY=\"spacing.3\">\n {children}\n </Box>\n ) : null}\n </Box>\n </BaseBox>\n );\n};\n\n/**\n * ## StepItem\n *\n * Component meant to be used inside the StepGroup parent component\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem\n * title=\"Personal Details\"\n * timestamp=\"Thu 15th Oct'23 | 12:00pm\"\n * description=\"Fill your personal details here\"\n * marker={<StepItemIndicator color=\"negative\" />}\n * />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepItem = assignWithoutSideEffects(_StepItem, {\n componentId: componentIds.StepItem,\n displayName: componentIds.StepItem,\n});\n\nexport { StepLine, StepItem };\n"],"names":["InteractiveItemHeaderBox","styled","button","withConfig","displayName","componentId","props","padding","concat","makeSpace","getIn","theme","paddingY","paddingX","cursor","display","textDecoration","border","textAlign","backgroundColor","isSelected","colors","interactive","background","primary","faded","transparent","borderRadius","radius","medium","width","transition","motion","duration","xquick","easing","standard","effective","fadedHighlighted","gray","_objectSpread","getFocusRingStyles","getStepTypeFromIndex","_ref","_index","_nestingLevel","itemsCount","_StepItem","_ref2","title","timestamp","description","_ref2$stepProgress","stepProgress","marker","trailing","href","target","onClick","children","_ref2$_index","_ref2$_totalIndex","_totalIndex","_ref2$_nestingLevel","_useStepGroup","useStepGroup","itemsInGroupCount","totalItemsInParentGroupCount","orientation","size","stepType","React","useMemo","itemRef","useRef","isFirstItem","isLastItem","isInteractive","Boolean","isVertical","throwBladeError","message","moduleName","stepItemHeaderJSX","_jsxs","Box","flexDirection","justifyContent","gap","_jsx","Text","stepItemHeaderTokens","color","weight","marginY","variant","stepItemHeaderPaddings","BaseBox","itemLineGap","className","alignItems","undefined","minWidth","makeSize","sizeTokens","flex","metaAttribute","name","MetaConstants","StepItem","ref","StepLine","shouldShowStartBranch","shouldShowEndBranch","marginTop","marginRight","as","assignWithoutSideEffects","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAMA,wBAAwB,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,uCAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAA6B,CAAA,CAAA,UAACC,KAAK,EAAK;EACpF,OAAO;AACLC,IAAAA,OAAO,EAAAC,EAAAA,CAAAA,MAAA,CAAKC,SAAS,CAACC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACM,QAAQ,CAAC,CAAC,EAAAJ,GAAAA,CAAAA,CAAAA,MAAA,CAAIC,SAAS,CACpEC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACO,QAAQ,CACnC,CAAC,CAAE;AACHC,IAAAA,MAAM,EAAE,SAAS;AACjBC,IAAAA,OAAO,EAAE,cAAc;AACvBC,IAAAA,cAAc,EAAE,MAAM;AACtBC,IAAAA,MAAM,EAAE,MAAM;AACdC,IAAAA,SAAS,EAAE,SAAS;IACpBC,eAAe,EAAEb,KAAK,CAACc,UAAU,GAC7Bd,KAAK,CAACK,KAAK,CAACU,MAAM,CAACC,WAAW,CAACC,UAAU,CAACC,OAAO,CAACC,KAAK,GACvDnB,KAAK,CAACK,KAAK,CAACU,MAAM,CAACK,WAAW;IAClCC,YAAY,EAAErB,KAAK,CAACK,KAAK,CAACM,MAAM,CAACW,MAAM,CAACC,MAAM;AAC9CC,IAAAA,KAAK,EAAE,MAAM;IACbC,UAAU,EAAA,mBAAA,CAAAvB,MAAA,CAAsBF,KAAK,CAACK,KAAK,CAACqB,MAAM,CAACC,QAAQ,CAACC,MAAM,EAAA,GA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,QAAA,EAEhBwB,iBAAAA;OACuB,CAAA,CAAC,gBAE3BM,GAAA,CAACJ,GAAG,EAAA7C,aAAA,CAAAA,aAAA,CAAA,EAAA,EAAKwD,sBAAsB,CAAA,EAAA,EAAA,EAAA;AAAArC,QAAAA,QAAA,EAAGwB,iBAAAA;AAAiB,OAAA,CAAM,CAC1D,EACAxB,QAAQ,gBACP8B,GAAA,CAACJ,GAAG,EAAA;AAACxE,QAAAA,QAAQ,EAAC,WAAW;AAACD,QAAAA,QAAQ,EAAC,WAAW;AAAA+C,QAAAA,QAAA,EAC3CA,QAAAA;OACE,CAAC,GACJ,IAAI,CAAA;AAAA,KACL,CAAC,CAAA;AAAA,GAAA,CACC,CAAC,CAAA;AAEd,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMkD,QAAQ,gBAAGQ,wBAAwB,CAACtE,SAAS,EAAE;EACnD1C,WAAW,EAAEiH,YAAY,CAACT,QAAQ;EAClCzG,WAAW,EAAEkH,YAAY,CAACT,QAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useStepGroup } from './StepGroupContext.js';
|
|
2
|
+
import { getMarkerLineSpacings, iconSizeTokens } from './tokens.js';
|
|
3
|
+
import '../Box/BaseBox/index.js';
|
|
4
|
+
import '../Indicator/index.js';
|
|
5
|
+
import '../../utils/index.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
8
|
+
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
9
|
+
import { Indicator } from '../Indicator/Indicator.js';
|
|
10
|
+
|
|
11
|
+
var MarkerBackgroundCircle = function MarkerBackgroundCircle(_ref) {
|
|
12
|
+
var color = _ref.color,
|
|
13
|
+
size = _ref.size,
|
|
14
|
+
margin = _ref.margin,
|
|
15
|
+
children = _ref.children;
|
|
16
|
+
return /*#__PURE__*/jsx(BaseBox, {
|
|
17
|
+
backgroundColor: color === 'primary' ? 'surface.background.primary.subtle' : "feedback.background.".concat(color, ".subtle"),
|
|
18
|
+
display: "flex",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
height: size,
|
|
22
|
+
width: size,
|
|
23
|
+
borderRadius: "round",
|
|
24
|
+
margin: margin,
|
|
25
|
+
children: children
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var StepItemIndicator = function StepItemIndicator(_ref2) {
|
|
29
|
+
var color = _ref2.color;
|
|
30
|
+
var _useStepGroup = useStepGroup(),
|
|
31
|
+
size = _useStepGroup.size;
|
|
32
|
+
var spacingTokens = getMarkerLineSpacings(size);
|
|
33
|
+
return /*#__PURE__*/jsx(MarkerBackgroundCircle, {
|
|
34
|
+
color: color,
|
|
35
|
+
size: makeSize(spacingTokens.markerBackgroundSize),
|
|
36
|
+
margin: makeSize(spacingTokens.markerMargin),
|
|
37
|
+
children: /*#__PURE__*/jsx(Indicator, {
|
|
38
|
+
position: "relative",
|
|
39
|
+
marginLeft: "spacing.2",
|
|
40
|
+
color: color,
|
|
41
|
+
size: size,
|
|
42
|
+
accessibilityLabel: "".concat(color, " indicator")
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var StepItemIcon = function StepItemIcon(_ref3) {
|
|
47
|
+
var Icon = _ref3.icon,
|
|
48
|
+
_ref3$color = _ref3.color,
|
|
49
|
+
color = _ref3$color === void 0 ? 'neutral' : _ref3$color;
|
|
50
|
+
var _useStepGroup2 = useStepGroup(),
|
|
51
|
+
size = _useStepGroup2.size;
|
|
52
|
+
var spacingTokens = getMarkerLineSpacings(size);
|
|
53
|
+
return /*#__PURE__*/jsx(MarkerBackgroundCircle, {
|
|
54
|
+
color: color,
|
|
55
|
+
size: makeSize(spacingTokens.markerBackgroundSize),
|
|
56
|
+
margin: makeSize(spacingTokens.markerMargin),
|
|
57
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
58
|
+
size: iconSizeTokens[size],
|
|
59
|
+
color: color === 'primary' ? 'surface.icon.primary.normal' : "feedback.icon.".concat(color, ".intense")
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { StepItemIcon, StepItemIndicator };
|
|
65
|
+
//# sourceMappingURL=StepItemMarker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepItemMarker.js","sources":["../../../../../../src/components/StepGroup/StepItemMarker.tsx"],"sourcesContent":["import { useStepGroup } from './StepGroupContext';\nimport { getMarkerLineSpacings, iconSizeTokens } from './tokens';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport type { IndicatorProps } from '~components/Indicator';\nimport { Indicator } from '~components/Indicator';\nimport { makeSize } from '~utils';\n\ntype MarkerBackgroundCircleProps = {\n color: IndicatorProps['color'];\n size: BaseBoxProps['width'];\n margin: BaseBoxProps['margin'];\n children: BaseBoxProps['children'];\n};\n\nconst MarkerBackgroundCircle = ({\n color,\n size,\n margin,\n children,\n}: MarkerBackgroundCircleProps): React.ReactElement => {\n return (\n <BaseBox\n backgroundColor={\n color === 'primary'\n ? 'surface.background.primary.subtle'\n : `feedback.background.${color}.subtle`\n }\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n height={size}\n width={size}\n borderRadius=\"round\"\n margin={margin}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst StepItemIndicator = ({ color }: { color: IndicatorProps['color'] }): React.ReactElement => {\n const { size } = useStepGroup();\n const spacingTokens = getMarkerLineSpacings(size);\n\n return (\n <MarkerBackgroundCircle\n color={color}\n size={makeSize(spacingTokens.markerBackgroundSize)}\n margin={makeSize(spacingTokens.markerMargin)}\n >\n <Indicator\n position=\"relative\"\n marginLeft=\"spacing.2\"\n color={color}\n size={size}\n accessibilityLabel={`${color} indicator`}\n />\n </MarkerBackgroundCircle>\n );\n};\n\ntype StepItemIconProps = {\n icon: IconComponent;\n color: IndicatorProps['color'];\n};\n\nconst StepItemIcon = ({ icon: Icon, color = 'neutral' }: StepItemIconProps): React.ReactElement => {\n const { size } = useStepGroup();\n const spacingTokens = getMarkerLineSpacings(size);\n\n return (\n <MarkerBackgroundCircle\n color={color}\n size={makeSize(spacingTokens.markerBackgroundSize)}\n margin={makeSize(spacingTokens.markerMargin)}\n >\n <Icon\n size={iconSizeTokens[size]}\n color={\n color === 'primary' ? 'surface.icon.primary.normal' : `feedback.icon.${color}.intense`\n }\n />\n </MarkerBackgroundCircle>\n );\n};\n\nexport { StepItemIndicator, StepItemIcon };\n"],"names":["MarkerBackgroundCircle","_ref","color","size","margin","children","_jsx","BaseBox","backgroundColor","concat","display","alignItems","justifyContent","height","width","borderRadius","StepItemIndicator","_ref2","_useStepGroup","useStepGroup","spacingTokens","getMarkerLineSpacings","makeSize","markerBackgroundSize","markerMargin","Indicator","position","marginLeft","accessibilityLabel","StepItemIcon","_ref3","Icon","icon","_ref3$color","_useStepGroup2","iconSizeTokens"],"mappings":";;;;;;;;;;AAgBA,IAAMA,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,IAAA,EAK2B;AAAA,EAAA,IAJrDC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ,CAAA;EAER,oBACEC,GAAA,CAACC,OAAO,EAAA;IACNC,eAAe,EACbN,KAAK,KAAK,SAAS,GACf,mCAAmC,GAAAO,sBAAAA,CAAAA,MAAA,CACZP,KAAK,EACjC,SAAA,CAAA;AACDQ,IAAAA,OAAO,EAAC,MAAM;AACdC,IAAAA,UAAU,EAAC,QAAQ;AACnBC,IA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