jfs-components 0.0.51 → 0.0.53
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/lib/commonjs/components/ListItem/ListItem.js +26 -21
- package/lib/commonjs/components/Section/Section.js +1 -1
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +26 -21
- package/lib/module/components/Section/Section.js +1 -1
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/ListItem/ListItem.tsx +23 -21
- package/src/components/Section/Section.tsx +1 -1
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/icons/registry.ts +1 -1
|
@@ -73,28 +73,33 @@ function ListItem({
|
|
|
73
73
|
webAccessibilityProps,
|
|
74
74
|
...rest
|
|
75
75
|
}) {
|
|
76
|
+
const resolvedModes = {
|
|
77
|
+
...modes,
|
|
78
|
+
"Context": "ListItem"
|
|
79
|
+
};
|
|
80
|
+
|
|
76
81
|
// Resolve container spacing tokens
|
|
77
|
-
const gap = (0, _figmaVariablesResolver.getVariableByName)('listItem/gap',
|
|
78
|
-
const paddingTop = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/top',
|
|
79
|
-
const paddingBottom = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/bottom',
|
|
80
|
-
const paddingLeft = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/left',
|
|
81
|
-
const paddingRight = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/right',
|
|
82
|
-
const textWrapGap = (0, _figmaVariablesResolver.getVariableByName)('listItem/text wrap',
|
|
82
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('listItem/gap', resolvedModes) ?? 8;
|
|
83
|
+
const paddingTop = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/top', resolvedModes) ?? 0;
|
|
84
|
+
const paddingBottom = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/bottom', resolvedModes) ?? 0;
|
|
85
|
+
const paddingLeft = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/left', resolvedModes) ?? 0;
|
|
86
|
+
const paddingRight = (0, _figmaVariablesResolver.getVariableByName)('listItem/padding/right', resolvedModes) ?? 0;
|
|
87
|
+
const textWrapGap = (0, _figmaVariablesResolver.getVariableByName)('listItem/text wrap', resolvedModes) ?? 0;
|
|
83
88
|
|
|
84
89
|
// Title typography (horizontal layout)
|
|
85
|
-
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/color',
|
|
86
|
-
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontSize',
|
|
87
|
-
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/lineHeight',
|
|
88
|
-
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontFamily',
|
|
89
|
-
const titleFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontWeight',
|
|
90
|
+
const titleColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/color', resolvedModes) || '#0f0d0a';
|
|
91
|
+
const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontSize', resolvedModes) || 14;
|
|
92
|
+
const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/lineHeight', resolvedModes) || 16;
|
|
93
|
+
const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontFamily', resolvedModes) || 'System';
|
|
94
|
+
const titleFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('listItem/title/fontWeight', resolvedModes) || 700;
|
|
90
95
|
const titleFontWeight = typeof titleFontWeightRaw === 'number' ? titleFontWeightRaw.toString() : titleFontWeightRaw;
|
|
91
96
|
|
|
92
97
|
// Support text typography (used in both layouts)
|
|
93
|
-
const supportColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/color',
|
|
94
|
-
const supportFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontSize',
|
|
95
|
-
const supportLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/lineHeight',
|
|
96
|
-
const supportFontFamily = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontFamily',
|
|
97
|
-
const supportFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontWeight',
|
|
98
|
+
const supportColor = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/color', resolvedModes) || '#1f1a14';
|
|
99
|
+
const supportFontSize = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontSize', resolvedModes) || 12;
|
|
100
|
+
const supportLineHeight = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/lineHeight', resolvedModes) || 14;
|
|
101
|
+
const supportFontFamily = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontFamily', resolvedModes) || 'System';
|
|
102
|
+
const supportFontWeightRaw = (0, _figmaVariablesResolver.getVariableByName)('listItem/supportText/fontWeight', resolvedModes) || 500;
|
|
98
103
|
const supportFontWeight = typeof supportFontWeightRaw === 'number' ? supportFontWeightRaw.toString() : supportFontWeightRaw;
|
|
99
104
|
const baseContainerStyle = {
|
|
100
105
|
paddingTop,
|
|
@@ -159,16 +164,16 @@ function ListItem({
|
|
|
159
164
|
});
|
|
160
165
|
|
|
161
166
|
// Process leading slot to pass modes to children
|
|
162
|
-
const processedLeading = leading ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(leading),
|
|
167
|
+
const processedLeading = leading ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(leading), resolvedModes) : [];
|
|
163
168
|
// Extract single element if array has one element, otherwise use array
|
|
164
169
|
const leadingElement = processedLeading.length > 0 ? processedLeading.length === 1 ? processedLeading[0] : processedLeading : /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
|
|
165
|
-
modes:
|
|
170
|
+
modes: resolvedModes,
|
|
166
171
|
accessibilityLabel: undefined
|
|
167
172
|
});
|
|
168
173
|
const renderSupportContent = () => {
|
|
169
174
|
if (supportSlot) {
|
|
170
175
|
// Process supportSlot to pass modes to children
|
|
171
|
-
const processedSupportSlot = (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(supportSlot),
|
|
176
|
+
const processedSupportSlot = (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(supportSlot), resolvedModes);
|
|
172
177
|
// Extract single element if array has one element, otherwise use array
|
|
173
178
|
return processedSupportSlot.length === 1 ? processedSupportSlot[0] : processedSupportSlot;
|
|
174
179
|
}
|
|
@@ -188,7 +193,7 @@ function ListItem({
|
|
|
188
193
|
if (layout === 'Horizontal') {
|
|
189
194
|
// Process endSlot to pass modes to children
|
|
190
195
|
// Force Context: 'ListItem' - this value can never be overridden by external modes
|
|
191
|
-
const processedEndSlot = endSlot ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(endSlot),
|
|
196
|
+
const processedEndSlot = endSlot ? (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(endSlot), resolvedModes, {
|
|
192
197
|
"Context": 'ListItem'
|
|
193
198
|
}) : [];
|
|
194
199
|
// Extract single element if array has one element, otherwise use array
|
|
@@ -211,7 +216,7 @@ function ListItem({
|
|
|
211
216
|
children: trailingContent
|
|
212
217
|
}) : null, navArrow && /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavArrow.default, {
|
|
213
218
|
direction: "Forward",
|
|
214
|
-
modes:
|
|
219
|
+
modes: resolvedModes
|
|
215
220
|
})]
|
|
216
221
|
});
|
|
217
222
|
if (onPress) {
|
|
@@ -66,7 +66,7 @@ function Section({
|
|
|
66
66
|
} : {};
|
|
67
67
|
// Resolve section container tokens
|
|
68
68
|
const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('section/background/color', modes) || '#ffffff';
|
|
69
|
-
const gap = (0, _figmaVariablesResolver.getVariableByName)('
|
|
69
|
+
const gap = (0, _figmaVariablesResolver.getVariableByName)('slot/gap', modes) || 12;
|
|
70
70
|
const paddingHorizontal = (0, _figmaVariablesResolver.getVariableByName)('section/padding/horizontal', modes) || 12;
|
|
71
71
|
const paddingVertical = (0, _figmaVariablesResolver.getVariableByName)('section/padding/vertical', modes) || 16;
|
|
72
72
|
const radius = (0, _figmaVariablesResolver.getVariableByName)('section/radius', modes) || 12;
|