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.
@@ -67,28 +67,33 @@ function ListItem({
67
67
  webAccessibilityProps,
68
68
  ...rest
69
69
  }) {
70
+ const resolvedModes = {
71
+ ...modes,
72
+ "Context": "ListItem"
73
+ };
74
+
70
75
  // Resolve container spacing tokens
71
- const gap = getVariableByName('listItem/gap', modes) ?? 8;
72
- const paddingTop = getVariableByName('listItem/padding/top', modes) ?? 0;
73
- const paddingBottom = getVariableByName('listItem/padding/bottom', modes) ?? 0;
74
- const paddingLeft = getVariableByName('listItem/padding/left', modes) ?? 0;
75
- const paddingRight = getVariableByName('listItem/padding/right', modes) ?? 0;
76
- const textWrapGap = getVariableByName('listItem/text wrap', modes) ?? 0;
76
+ const gap = getVariableByName('listItem/gap', resolvedModes) ?? 8;
77
+ const paddingTop = getVariableByName('listItem/padding/top', resolvedModes) ?? 0;
78
+ const paddingBottom = getVariableByName('listItem/padding/bottom', resolvedModes) ?? 0;
79
+ const paddingLeft = getVariableByName('listItem/padding/left', resolvedModes) ?? 0;
80
+ const paddingRight = getVariableByName('listItem/padding/right', resolvedModes) ?? 0;
81
+ const textWrapGap = getVariableByName('listItem/text wrap', resolvedModes) ?? 0;
77
82
 
78
83
  // Title typography (horizontal layout)
79
- const titleColor = getVariableByName('listItem/title/color', modes) || '#0f0d0a';
80
- const titleFontSize = getVariableByName('listItem/title/fontSize', modes) || 14;
81
- const titleLineHeight = getVariableByName('listItem/title/lineHeight', modes) || 16;
82
- const titleFontFamily = getVariableByName('listItem/title/fontFamily', modes) || 'System';
83
- const titleFontWeightRaw = getVariableByName('listItem/title/fontWeight', modes) || 700;
84
+ const titleColor = getVariableByName('listItem/title/color', resolvedModes) || '#0f0d0a';
85
+ const titleFontSize = getVariableByName('listItem/title/fontSize', resolvedModes) || 14;
86
+ const titleLineHeight = getVariableByName('listItem/title/lineHeight', resolvedModes) || 16;
87
+ const titleFontFamily = getVariableByName('listItem/title/fontFamily', resolvedModes) || 'System';
88
+ const titleFontWeightRaw = getVariableByName('listItem/title/fontWeight', resolvedModes) || 700;
84
89
  const titleFontWeight = typeof titleFontWeightRaw === 'number' ? titleFontWeightRaw.toString() : titleFontWeightRaw;
85
90
 
86
91
  // Support text typography (used in both layouts)
87
- const supportColor = getVariableByName('listItem/supportText/color', modes) || '#1f1a14';
88
- const supportFontSize = getVariableByName('listItem/supportText/fontSize', modes) || 12;
89
- const supportLineHeight = getVariableByName('listItem/supportText/lineHeight', modes) || 14;
90
- const supportFontFamily = getVariableByName('listItem/supportText/fontFamily', modes) || 'System';
91
- const supportFontWeightRaw = getVariableByName('listItem/supportText/fontWeight', modes) || 500;
92
+ const supportColor = getVariableByName('listItem/supportText/color', resolvedModes) || '#1f1a14';
93
+ const supportFontSize = getVariableByName('listItem/supportText/fontSize', resolvedModes) || 12;
94
+ const supportLineHeight = getVariableByName('listItem/supportText/lineHeight', resolvedModes) || 14;
95
+ const supportFontFamily = getVariableByName('listItem/supportText/fontFamily', resolvedModes) || 'System';
96
+ const supportFontWeightRaw = getVariableByName('listItem/supportText/fontWeight', resolvedModes) || 500;
92
97
  const supportFontWeight = typeof supportFontWeightRaw === 'number' ? supportFontWeightRaw.toString() : supportFontWeightRaw;
93
98
  const baseContainerStyle = {
94
99
  paddingTop,
@@ -153,16 +158,16 @@ function ListItem({
153
158
  });
154
159
 
155
160
  // Process leading slot to pass modes to children
156
- const processedLeading = leading ? cloneChildrenWithModes(React.Children.toArray(leading), modes) : [];
161
+ const processedLeading = leading ? cloneChildrenWithModes(React.Children.toArray(leading), resolvedModes) : [];
157
162
  // Extract single element if array has one element, otherwise use array
158
163
  const leadingElement = processedLeading.length > 0 ? processedLeading.length === 1 ? processedLeading[0] : processedLeading : /*#__PURE__*/_jsx(IconCapsule, {
159
- modes: modes,
164
+ modes: resolvedModes,
160
165
  accessibilityLabel: undefined
161
166
  });
162
167
  const renderSupportContent = () => {
163
168
  if (supportSlot) {
164
169
  // Process supportSlot to pass modes to children
165
- const processedSupportSlot = cloneChildrenWithModes(React.Children.toArray(supportSlot), modes);
170
+ const processedSupportSlot = cloneChildrenWithModes(React.Children.toArray(supportSlot), resolvedModes);
166
171
  // Extract single element if array has one element, otherwise use array
167
172
  return processedSupportSlot.length === 1 ? processedSupportSlot[0] : processedSupportSlot;
168
173
  }
@@ -182,7 +187,7 @@ function ListItem({
182
187
  if (layout === 'Horizontal') {
183
188
  // Process endSlot to pass modes to children
184
189
  // Force Context: 'ListItem' - this value can never be overridden by external modes
185
- const processedEndSlot = endSlot ? cloneChildrenWithModes(React.Children.toArray(endSlot), modes, {
190
+ const processedEndSlot = endSlot ? cloneChildrenWithModes(React.Children.toArray(endSlot), resolvedModes, {
186
191
  "Context": 'ListItem'
187
192
  }) : [];
188
193
  // Extract single element if array has one element, otherwise use array
@@ -205,7 +210,7 @@ function ListItem({
205
210
  children: trailingContent
206
211
  }) : null, navArrow && /*#__PURE__*/_jsx(NavArrow, {
207
212
  direction: "Forward",
208
- modes: modes
213
+ modes: resolvedModes
209
214
  })]
210
215
  });
211
216
  if (onPress) {
@@ -60,7 +60,7 @@ function Section({
60
60
  } : {};
61
61
  // Resolve section container tokens
62
62
  const backgroundColor = getVariableByName('section/background/color', modes) || '#ffffff';
63
- const gap = getVariableByName('section/gap', modes) || 12;
63
+ const gap = getVariableByName('slot/gap', modes) || 12;
64
64
  const paddingHorizontal = getVariableByName('section/padding/horizontal', modes) || 12;
65
65
  const paddingVertical = getVariableByName('section/padding/vertical', modes) || 16;
66
66
  const radius = getVariableByName('section/radius', modes) || 12;