jfs-components 0.1.49 → 0.1.50
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/CHANGELOG.md +7 -0
- package/lib/commonjs/components/CardCTA/CardCTA.js +7 -4
- package/lib/commonjs/components/CardFeedback/CardFeedback.js +1 -1
- package/lib/commonjs/components/CategoryCard/CategoryCard.js +4 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js +4 -6
- package/lib/commonjs/components/CircularProgressBarDoted/CircularProgressBarDoted.js +12 -9
- package/lib/commonjs/components/DonutChartSummary/DonutChartSummary.js +7 -2
- package/lib/commonjs/components/ProductMerchandisingCard/ProductMerchandisingCard.js +3 -1
- package/lib/commonjs/components/ProductOverview/ProductOverview.js +2 -2
- package/lib/commonjs/components/Radio/Radio.js +5 -3
- package/lib/commonjs/components/SavingsGoalSummary/SavingsGoalSummary.js +2 -2
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +1 -1
- package/lib/commonjs/components/SegmentedTrack/SegmentedTrack.js +1 -1
- package/lib/commonjs/components/Slider/Slider.js +3 -2
- package/lib/commonjs/components/StatusHero/StatusHero.js +1 -1
- package/lib/commonjs/components/Tooltip/Tooltip.js +4 -2
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/design-tokens/figma-modes.generated.js +31 -28
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/CardCTA/CardCTA.js +7 -4
- package/lib/module/components/CardFeedback/CardFeedback.js +1 -1
- package/lib/module/components/CategoryCard/CategoryCard.js +4 -4
- package/lib/module/components/Checkbox/Checkbox.js +4 -6
- package/lib/module/components/CircularProgressBarDoted/CircularProgressBarDoted.js +12 -9
- package/lib/module/components/DonutChartSummary/DonutChartSummary.js +7 -2
- package/lib/module/components/ProductMerchandisingCard/ProductMerchandisingCard.js +3 -1
- package/lib/module/components/ProductOverview/ProductOverview.js +2 -2
- package/lib/module/components/Radio/Radio.js +5 -3
- package/lib/module/components/SavingsGoalSummary/SavingsGoalSummary.js +2 -2
- package/lib/module/components/SegmentedControl/SegmentedControl.js +1 -1
- package/lib/module/components/SegmentedTrack/SegmentedTrack.js +1 -1
- package/lib/module/components/Slider/Slider.js +3 -2
- package/lib/module/components/StatusHero/StatusHero.js +1 -1
- package/lib/module/components/Tooltip/Tooltip.js +4 -2
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/design-tokens/figma-modes.generated.js +31 -28
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +4 -1
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/CardCTA/CardCTA.tsx +7 -4
- package/src/components/CardFeedback/CardFeedback.tsx +1 -1
- package/src/components/CategoryCard/CategoryCard.tsx +4 -4
- package/src/components/Checkbox/Checkbox.tsx +4 -6
- package/src/components/CircularProgressBarDoted/CircularProgressBarDoted.tsx +12 -9
- package/src/components/DonutChartSummary/DonutChartSummary.tsx +6 -6
- package/src/components/ProductMerchandisingCard/ProductMerchandisingCard.tsx +3 -1
- package/src/components/ProductOverview/ProductOverview.tsx +2 -2
- package/src/components/Radio/Radio.tsx +8 -3
- package/src/components/SavingsGoalSummary/SavingsGoalSummary.tsx +3 -3
- package/src/components/SegmentedControl/SegmentedControl.tsx +1 -1
- package/src/components/SegmentedTrack/SegmentedTrack.tsx +1 -2
- package/src/components/Slider/Slider.tsx +3 -2
- package/src/components/StatusHero/StatusHero.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +4 -2
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/design-tokens/figma-modes.generated.ts +31 -28
- package/src/icons/registry.ts +1 -1
|
@@ -70,7 +70,8 @@ function CardCTA({
|
|
|
70
70
|
const radius = getVariableByName('cardCTA/radius', modes);
|
|
71
71
|
const borderSize = getVariableByName('cardCTA/border/size', modes);
|
|
72
72
|
const borderColor = getVariableByName('cardCTA/border/color', modes);
|
|
73
|
-
const
|
|
73
|
+
const leftPaddingLeft = getVariableByName('cardCTA/left-wrap/padding/left', modes);
|
|
74
|
+
const leftPaddingRight = getVariableByName('cardCTA/left-wrap/padding/right', modes);
|
|
74
75
|
const leftPaddingV = getVariableByName('cardCTA/left-wrap/padding/vertical', modes);
|
|
75
76
|
const leftGap = getVariableByName('cardCTA/left-wrap/gap', modes);
|
|
76
77
|
const rightPaddingH = getVariableByName('cardCTA/right-wrap/padding/horizontal', modes);
|
|
@@ -216,7 +217,8 @@ function CardCTA({
|
|
|
216
217
|
flexShrink: 1,
|
|
217
218
|
flexBasis: 0,
|
|
218
219
|
minWidth: 0,
|
|
219
|
-
|
|
220
|
+
paddingLeft: leftPaddingLeft,
|
|
221
|
+
paddingRight: leftPaddingRight,
|
|
220
222
|
paddingVertical: leftPaddingV,
|
|
221
223
|
gap: leftGap,
|
|
222
224
|
alignItems: 'flex-start',
|
|
@@ -248,7 +250,7 @@ function CardCTA({
|
|
|
248
250
|
// space allows and can never collapse below its content.
|
|
249
251
|
const iconCapsuleModes = {
|
|
250
252
|
...modes,
|
|
251
|
-
'
|
|
253
|
+
'Icon Capsule Size': 'M',
|
|
252
254
|
Emphasis: 'Medium',
|
|
253
255
|
AppearanceBrand: 'Secondary'
|
|
254
256
|
};
|
|
@@ -307,7 +309,8 @@ function CardCTA({
|
|
|
307
309
|
};
|
|
308
310
|
const sipWrapStyle = {
|
|
309
311
|
width: '100%',
|
|
310
|
-
|
|
312
|
+
paddingLeft: leftPaddingLeft,
|
|
313
|
+
paddingRight: leftPaddingRight,
|
|
311
314
|
paddingVertical: leftPaddingV,
|
|
312
315
|
gap: leftGap,
|
|
313
316
|
alignItems: 'flex-start',
|
|
@@ -56,10 +56,10 @@ function resolveCategoryCardTokens(modes, active) {
|
|
|
56
56
|
const backgroundColor = active ? activeBackground : idleBackground;
|
|
57
57
|
const imageSize = toNumber(getVariableByName('cardTab/image/width', resolvedModes), 36);
|
|
58
58
|
const imageRadius = toNumber(getVariableByName('image/radius', resolvedModes), 0);
|
|
59
|
-
const fontFamily = getVariableByName('
|
|
60
|
-
const fontSize = toNumber(getVariableByName('
|
|
61
|
-
const lineHeight = toNumber(getVariableByName('
|
|
62
|
-
const fontWeight = toFontWeight(getVariableByName('
|
|
59
|
+
const fontFamily = getVariableByName('label/fontFamily', resolvedModes) ?? 'JioType Var';
|
|
60
|
+
const fontSize = toNumber(getVariableByName('label/fontSize', resolvedModes), 12);
|
|
61
|
+
const lineHeight = toNumber(getVariableByName('label/lineHeight', resolvedModes), Math.round(fontSize * 1.3));
|
|
62
|
+
const fontWeight = toFontWeight(getVariableByName('label/fontWeight', resolvedModes), '500');
|
|
63
63
|
const labelColor = getVariableByName('cardTab/label/color', resolvedModes) ?? '#000000';
|
|
64
64
|
return {
|
|
65
65
|
containerStyle: {
|
|
@@ -102,8 +102,8 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox({
|
|
|
102
102
|
const idleStroke = getVariableByName('checkbox/idle/stroke/color', modes) ?? '#666666';
|
|
103
103
|
const hoverFill = getVariableByName('checkbox/hover/fill/color', modes) ?? 'rgba(0,0,0,0.1)';
|
|
104
104
|
const hoverStroke = getVariableByName('checkbox/hover/stroke/color', modes) ?? '#666666';
|
|
105
|
-
const
|
|
106
|
-
const hoverShadow = getVariableByName('hover/
|
|
105
|
+
const hoverSpread = getVariableByName('checkbox/hover/spread/effect1', modes) ?? 4;
|
|
106
|
+
const hoverShadow = getVariableByName('checkbox/hover/shadow/color', modes) ?? 'rgba(0,0,0,0.1)';
|
|
107
107
|
const selectedFill = getVariableByName('checkbox/selected/fill/color', modes) ?? '#cea15a';
|
|
108
108
|
const selectedStroke = getVariableByName('checkbox/selected/stroke/color', modes) ?? '#0d0d0d';
|
|
109
109
|
const selectedMarkColor = getVariableByName('checkbox/selected/mark/color', modes) ?? '#0f0d0a';
|
|
@@ -115,8 +115,6 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox({
|
|
|
115
115
|
const disabledActiveBg = getVariableByName('checkbox/disabledActive/background/color', modes) ?? '#f6d19a';
|
|
116
116
|
const disabledActiveBorder = getVariableByName('checkbox/disabledActive/border/color', modes) ?? '#f6d19a';
|
|
117
117
|
const disabledActiveMark = getVariableByName('checkbox/disabledActive/mark/color', modes) ?? '#474d54';
|
|
118
|
-
const selectedHoverShadow = getVariableByName('selected/hover/boxShadow', modes) ?? 'rgba(0,0,0,0.1)';
|
|
119
|
-
const hoverShadowSize = getVariableByName('hover/boxShadow/size', modes) ?? 4;
|
|
120
118
|
const handlePress = useCallback(() => {
|
|
121
119
|
if (disabled) return;
|
|
122
120
|
const next = !isChecked;
|
|
@@ -161,7 +159,7 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox({
|
|
|
161
159
|
...base,
|
|
162
160
|
backgroundColor: selectedFill,
|
|
163
161
|
borderColor: selectedStroke,
|
|
164
|
-
...boxShadow(`0px 0px 0px ${
|
|
162
|
+
...boxShadow(`0px 0px 0px ${hoverSpread}px ${hoverShadow}`)
|
|
165
163
|
};
|
|
166
164
|
}
|
|
167
165
|
if (isChecked) {
|
|
@@ -184,7 +182,7 @@ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox({
|
|
|
184
182
|
...base,
|
|
185
183
|
backgroundColor: hoverFill,
|
|
186
184
|
borderColor: hoverStroke,
|
|
187
|
-
...boxShadow(`0px 0px 0px ${
|
|
185
|
+
...boxShadow(`0px 0px 0px ${hoverSpread}px ${hoverShadow}`)
|
|
188
186
|
};
|
|
189
187
|
}
|
|
190
188
|
return {
|
|
@@ -82,18 +82,21 @@ function CircularProgressBarDoted({
|
|
|
82
82
|
const scoreTierWidth = toNumber(getVariableByName('circularProgressBarDoted/scoreTier/width', modes), 116);
|
|
83
83
|
const scoreTrendGap = toNumber(getVariableByName('circularProgressBarDoted/scoreTrend/gap', modes), 2);
|
|
84
84
|
const scoreTrendHeight = toNumber(getVariableByName('circularProgressBarDoted/scoreTrend/height', modes), 24);
|
|
85
|
-
const typographyFontFamily = getVariableByName('Typography/Font Family', modes);
|
|
86
85
|
const labelColor = getVariableByName('circularProgressBarDoted/label/color', modes);
|
|
87
|
-
const labelFontSize = toNumber(getVariableByName('
|
|
88
|
-
const
|
|
86
|
+
const labelFontSize = toNumber(getVariableByName('circularProgressBarDoted/label/fontSize', modes), 12);
|
|
87
|
+
const labelFontFamily = getVariableByName('circularProgressBarDoted/label/fontFamily', modes);
|
|
88
|
+
const labelLineHeight = toNumber(getVariableByName('circularProgressBarDoted/label/lineHeight', modes), 15.6);
|
|
89
|
+
const labelFontWeight = toFontWeight(getVariableByName('circularProgressBarDoted/label/fontWeight', modes), '400');
|
|
89
90
|
const scoreColor = getVariableByName('circularProgressBarDoted/scoreLabel/color', modes);
|
|
90
91
|
const scoreFontSize = toNumber(getVariableByName('circularProgressBarDoted/scoreLabel/fontSize', modes), 56);
|
|
91
92
|
const scoreFontFamily = getVariableByName('circularProgressBarDoted/scoreLabel/fontFamily', modes);
|
|
92
93
|
const scoreLineHeight = toNumber(getVariableByName('circularProgressBarDoted/scoreLabel/lineHeight', modes), 56);
|
|
93
94
|
const scoreFontWeight = toFontWeight(getVariableByName('circularProgressBarDoted/scoreLabel/fontWeight', modes), '900');
|
|
94
95
|
const tierColor = getVariableByName('circularProgressBarDoted/tierLabel/color', modes);
|
|
95
|
-
const tierFontSize = toNumber(getVariableByName('
|
|
96
|
-
const
|
|
96
|
+
const tierFontSize = toNumber(getVariableByName('circularProgressBarDoted/tierLabel/fontSize', modes), 16);
|
|
97
|
+
const tierFontFamily = getVariableByName('circularProgressBarDoted/tierLabel/fontFamily', modes);
|
|
98
|
+
const tierLineHeight = toNumber(getVariableByName('circularProgressBarDoted/tierLabel/lineHeight', modes), 20.8);
|
|
99
|
+
const tierFontWeight = toFontWeight(getVariableByName('circularProgressBarDoted/tierLabel/fontWeight', modes), '700');
|
|
97
100
|
const iconColor = getVariableByName('circularProgressBarDoted/icon/color', modes);
|
|
98
101
|
const iconSize = toNumber(getVariableByName('circularProgressBarDoted/icon/size', modes), 24);
|
|
99
102
|
const dots = useMemo(() => Array.from({
|
|
@@ -154,10 +157,10 @@ function CircularProgressBarDoted({
|
|
|
154
157
|
};
|
|
155
158
|
const computedLabelStyle = {
|
|
156
159
|
color: labelColor,
|
|
157
|
-
fontFamily:
|
|
160
|
+
fontFamily: labelFontFamily,
|
|
158
161
|
fontSize: labelFontSize,
|
|
159
162
|
fontWeight: labelFontWeight,
|
|
160
|
-
lineHeight:
|
|
163
|
+
lineHeight: labelLineHeight,
|
|
161
164
|
textAlign: 'center'
|
|
162
165
|
};
|
|
163
166
|
const computedScoreLabelStyle = {
|
|
@@ -170,10 +173,10 @@ function CircularProgressBarDoted({
|
|
|
170
173
|
};
|
|
171
174
|
const computedTierLabelStyle = {
|
|
172
175
|
color: tierColor,
|
|
173
|
-
fontFamily:
|
|
176
|
+
fontFamily: tierFontFamily,
|
|
174
177
|
fontSize: tierFontSize,
|
|
175
178
|
fontWeight: tierFontWeight,
|
|
176
|
-
lineHeight:
|
|
179
|
+
lineHeight: tierLineHeight,
|
|
177
180
|
textAlign: 'center'
|
|
178
181
|
};
|
|
179
182
|
const resolvedScoreLabel = String(Math.round(normalizedValue));
|
|
@@ -87,8 +87,13 @@ function DonutChartSummary({
|
|
|
87
87
|
...globalModes,
|
|
88
88
|
...propModes
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
|
|
91
|
+
// Figma DonutChartSummary (4203:51713) does not expose component-level
|
|
92
|
+
// gap variables — layout uses unbound 16px (donut→legend) and 8px
|
|
93
|
+
// (legend rows). Nested `textWrap/gap` / `metricLegendItem/gap` belong
|
|
94
|
+
// to child components and are not substitutes.
|
|
95
|
+
const gap = 16;
|
|
96
|
+
const legendGap = 8;
|
|
92
97
|
const resolvedItems = items && items.length > 0 ? items : DEFAULT_ITEMS;
|
|
93
98
|
const segments = resolvedItems.map((item, index) => ({
|
|
94
99
|
key: item.key ?? `segment-${index}`,
|
|
@@ -328,7 +328,9 @@ function resolveTokens(modes) {
|
|
|
328
328
|
const titleColor = asStr(getVariableByName('productMerchandisingcard/footer/title/font/color', modes), '#ffffff');
|
|
329
329
|
const titleSize = asNum(getVariableByName('productMerchandisingcard/footer/title/fontsize', modes), 14);
|
|
330
330
|
const titleFamily = asStr(getVariableByName('productMerchandisingcard/footer/title/fontfamily', modes), 'JioType Var');
|
|
331
|
-
|
|
331
|
+
// No `productMerchandisingcard/footer/title/fontweight` in Coin Variables (Figma
|
|
332
|
+
// binds 700). `typography/title/fontWeight/high` is 800; use body/high (=700).
|
|
333
|
+
const titleWeight = asStr(getVariableByName('typography/body/fontWeight/high', modes), '700');
|
|
332
334
|
const subtitleColor = asStr(getVariableByName('productMerchandisingcard/footer/subtitle/font/color', modes), '#c5bcb5');
|
|
333
335
|
const subtitleSize = asNum(getVariableByName('productMerchandisingcard/footer/subtitle/fontsize', modes), 12);
|
|
334
336
|
const subtitleFamily = asStr(getVariableByName('productMerchandisingcard/footer/subtitle/fontfamily', modes), 'JioType Var');
|
|
@@ -30,12 +30,12 @@ const ProductOverview = ({
|
|
|
30
30
|
const padding = getVariableByName('productOverview/padding', modes) ?? 24;
|
|
31
31
|
const gap = getVariableByName('productOverview/gap', modes) ?? 12;
|
|
32
32
|
const background = getVariableByName('productOverview/background', modes) ?? '#ffffff';
|
|
33
|
-
const productNameColor = getVariableByName('
|
|
33
|
+
const productNameColor = getVariableByName('text/appearance/high/color', modes) ?? '#0d0d0f';
|
|
34
34
|
const productNameFontFamily = getVariableByName('productOverview/productName/fontFamily', modes) ?? 'JioType Var';
|
|
35
35
|
const productNameFontSize = getVariableByName('productOverview/productName/fontSize', modes) ?? 26;
|
|
36
36
|
const productNameFontWeight = getVariableByName('productOverview/productName/fontWeight', modes) ?? 900;
|
|
37
37
|
const productNameLineHeight = getVariableByName('productOverview/productName/lineHeight', modes) ?? 26;
|
|
38
|
-
const descriptionColor = getVariableByName('
|
|
38
|
+
const descriptionColor = getVariableByName('text/appearance/medium/color', modes) ?? '#1a1c1f';
|
|
39
39
|
const descriptionFontFamily = getVariableByName('productOverview/description/fontFamily', modes) ?? 'JioType Var';
|
|
40
40
|
const descriptionFontSize = getVariableByName('productOverview/description/fontSize', modes) ?? 14;
|
|
41
41
|
const descriptionFontWeight = getVariableByName('productOverview/description/fontWeight', modes) ?? 500;
|
|
@@ -81,7 +81,9 @@ export const Radio = /*#__PURE__*/forwardRef(function Radio({
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// Border Color
|
|
84
|
-
|
|
84
|
+
// Coin Variables has no `radio/focus/border/color` — focus indication is
|
|
85
|
+
// the yellow boxShadow ring; stroke reuses the published idle border.
|
|
86
|
+
let borderColorVar = visualState === 'focus' && !selected ? 'radio/idle/border/color' : `${prefix}/border/color`;
|
|
85
87
|
|
|
86
88
|
// Border Width
|
|
87
89
|
let borderWidthVar = `${prefix}/border/size`;
|
|
@@ -139,7 +141,6 @@ export const Radio = /*#__PURE__*/forwardRef(function Radio({
|
|
|
139
141
|
getVariableByName('radio/selector/size');
|
|
140
142
|
getVariableByName('radio/width');
|
|
141
143
|
getVariableByName('radio/height');
|
|
142
|
-
getVariableByName('radio/background/color');
|
|
143
144
|
getVariableByName('radio/hover/background/color');
|
|
144
145
|
getVariableByName('radio/hover/border/color');
|
|
145
146
|
getVariableByName('radio/hover/boxShadow/size');
|
|
@@ -153,13 +154,14 @@ export const Radio = /*#__PURE__*/forwardRef(function Radio({
|
|
|
153
154
|
getVariableByName('radio/hoverSelected/shadow/color');
|
|
154
155
|
getVariableByName('radio/hoverSelected/selector/background/color');
|
|
155
156
|
getVariableByName('radio/focus/background/color');
|
|
156
|
-
getVariableByName('radio/focus/border/color');
|
|
157
157
|
getVariableByName('radio/focus/border/size');
|
|
158
158
|
getVariableByName('radio/focus/boxShadow/size');
|
|
159
159
|
getVariableByName('radio/focus/shadow/color');
|
|
160
160
|
getVariableByName('radio/focusSelected/background/color');
|
|
161
|
+
getVariableByName('radio/focusSelected/border/color');
|
|
161
162
|
getVariableByName('radio/focusSelected/selector/background/color');
|
|
162
163
|
getVariableByName('radio/focusSelected/border/size');
|
|
164
|
+
getVariableByName('radio/focusSelected/shadow/color');
|
|
163
165
|
getVariableByName('radio/disabled/radio/disabled/border/size');
|
|
164
166
|
getVariableByName('radio/disabled/background/color');
|
|
165
167
|
getVariableByName('radio/disabled/border/color');
|
|
@@ -123,7 +123,7 @@ function SavingsGoalSummary({
|
|
|
123
123
|
// ~1.2x so descenders never clip on native (same guard `Title` uses).
|
|
124
124
|
const valueLineHeight = Math.max(valueRawLineHeight, Math.ceil(valueFontSize * 1.2));
|
|
125
125
|
const valueFontWeight = String(getVariableByName('savingsGoalSummary/value/fontWeight', mergedModes) ?? 900);
|
|
126
|
-
const valueColor = getVariableByName('
|
|
126
|
+
const valueColor = getVariableByName('text/appearance/high/color', mergedModes) ?? '#0d0d0f';
|
|
127
127
|
|
|
128
128
|
// Caption ("Credit usage") typography — `savingsGoalSummary/label/*`
|
|
129
129
|
// (Figma 12 / 400). Only rendered when a `label` is supplied.
|
|
@@ -131,7 +131,7 @@ function SavingsGoalSummary({
|
|
|
131
131
|
const labelFontFamily = getVariableByName('savingsGoalSummary/label/fontFamily', mergedModes) ?? 'JioType Var';
|
|
132
132
|
const labelLineHeight = getVariableByName('savingsGoalSummary/label/lineHeight', mergedModes) ?? 16;
|
|
133
133
|
const labelFontWeight = String(getVariableByName('savingsGoalSummary/label/fontWeight', mergedModes) ?? 400);
|
|
134
|
-
const labelColor = getVariableByName('
|
|
134
|
+
const labelColor = getVariableByName('text/appearance/medium/color', mergedModes) ?? '#1a1c1f';
|
|
135
135
|
const labelNode = label == null || label === false ? null : typeof label === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
136
136
|
style: [{
|
|
137
137
|
color: labelColor,
|
|
@@ -104,7 +104,7 @@ function SegmentedControl({
|
|
|
104
104
|
}, [isControlled, onSelectionChange]);
|
|
105
105
|
const gap = getVariableByName('segmentedControl/gap', modes) ?? 8;
|
|
106
106
|
const background = getVariableByName('segmentedControl/background', modes) ?? '#f6f3ff';
|
|
107
|
-
const radius = getVariableByName('
|
|
107
|
+
const radius = getVariableByName('segment/radius', modes) ?? 20;
|
|
108
108
|
const containerStyle = {
|
|
109
109
|
flexDirection: 'row',
|
|
110
110
|
alignItems: 'center',
|
|
@@ -90,7 +90,7 @@ function SegmentedTrack({
|
|
|
90
90
|
...propModes
|
|
91
91
|
};
|
|
92
92
|
const trackHeight = getVariableByName('segmentedTrack/height', modes) ?? 24;
|
|
93
|
-
const trackRadius =
|
|
93
|
+
const trackRadius = trackHeight / 2;
|
|
94
94
|
const renderedSegments = renderSegments({
|
|
95
95
|
segments,
|
|
96
96
|
children,
|
|
@@ -386,8 +386,9 @@ function resolveTokens(modes) {
|
|
|
386
386
|
const tooltipBackground = asStr(getVariableByName('tooltip/background', modes), '#0f0d0a');
|
|
387
387
|
const tooltipPaddingH = asNum(getVariableByName('tooltip/padding/horizontal', modes), 12);
|
|
388
388
|
const tooltipPaddingV = asNum(getVariableByName('tooltip/padding/vertical', modes), 8);
|
|
389
|
-
|
|
390
|
-
const
|
|
389
|
+
// Not yet in Coin Variables export (Figma still binds bare local radius/maxWidth).
|
|
390
|
+
const tooltipRadius = asNum(getVariableByName('tooltip/radius', modes), 8);
|
|
391
|
+
const tooltipMaxWidth = asNum(getVariableByName('tooltip/maxWidth', modes), 280);
|
|
391
392
|
const tipWidth = asNum(getVariableByName('tooltip/tipItem/width', modes), 16);
|
|
392
393
|
const tipHeight = asNum(getVariableByName('tooltip/tipItem/height', modes), 8);
|
|
393
394
|
const tooltipLabelColor = asStr(getVariableByName('tooltip/label/color', modes), '#ffffff');
|
|
@@ -188,8 +188,10 @@ export function TooltipContent({
|
|
|
188
188
|
const bgColor = getVariableByName('tooltip/background', modes);
|
|
189
189
|
const paddingH = Number(getVariableByName('tooltip/padding/horizontal', modes));
|
|
190
190
|
const paddingV = Number(getVariableByName('tooltip/padding/vertical', modes));
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
// Figma still binds bare local radius/maxWidth; published names are tooltip/*.
|
|
192
|
+
// Not yet in Coin Variables export — fall back to Figma values (8 / 280).
|
|
193
|
+
const radius = Number(getVariableByName('tooltip/radius', modes) ?? 8);
|
|
194
|
+
const maxWidthToken = Number(getVariableByName('tooltip/maxWidth', modes) ?? 280);
|
|
193
195
|
const arrowWidth = Number(getVariableByName('tooltip/tipItem/width', modes));
|
|
194
196
|
const arrowHeight = Number(getVariableByName('tooltip/tipItem/height', modes));
|
|
195
197
|
const labelColor = getVariableByName('tooltip/label/color', modes);
|