jfs-components 0.1.50 → 0.1.54

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.
Files changed (93) hide show
  1. package/.cursor/D2C-FLOW.md +94 -0
  2. package/.cursor/D2C-SCREEN.md +119 -0
  3. package/.cursor/commands/D2C.md +101 -0
  4. package/CHANGELOG.md +18 -0
  5. package/lib/commonjs/components/ActionFooter/ActionFooter.js +319 -135
  6. package/lib/commonjs/components/Badge/Badge.js +20 -1
  7. package/lib/commonjs/components/Button/Button.js +139 -47
  8. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +1 -1
  9. package/lib/commonjs/components/Card/Card.js +151 -112
  10. package/lib/commonjs/components/Card/assets/gold-logo-mark.png +0 -0
  11. package/lib/commonjs/components/CategoryCard/CategoryCard.js +97 -63
  12. package/lib/commonjs/components/CategoryCard/assets/sample.png +0 -0
  13. package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +59 -10
  14. package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +132 -49
  15. package/lib/commonjs/components/HelloJioInput/HelloJioInput.js +56 -14
  16. package/lib/commonjs/components/IconCapsule/IconCapsule.js +1 -1
  17. package/lib/commonjs/components/MetricData/MetricData.js +26 -13
  18. package/lib/commonjs/components/MoneyValue/MoneyValue.js +1 -1
  19. package/lib/commonjs/components/Nudge/Nudge.js +1 -1
  20. package/lib/commonjs/components/PdpCcCard/PdpCcCard.js +47 -91
  21. package/lib/commonjs/components/PlanComparisonCard/PlanComparisonCard.js +52 -45
  22. package/lib/commonjs/components/PortfolioHero/PortfolioHero.js +1 -1
  23. package/lib/commonjs/components/Slider/Slider.js +3 -3
  24. package/lib/commonjs/components/TextInput/TextInput.js +26 -8
  25. package/lib/commonjs/components/Tooltip/Tooltip.js +3 -5
  26. package/lib/commonjs/components/index.js +7 -1
  27. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  28. package/lib/commonjs/design-tokens/figma-modes.generated.js +13 -13
  29. package/lib/commonjs/icons/registry.js +1 -1
  30. package/lib/module/components/ActionFooter/ActionFooter.js +322 -138
  31. package/lib/module/components/Badge/Badge.js +20 -1
  32. package/lib/module/components/Button/Button.js +140 -48
  33. package/lib/module/components/ButtonGroup/ButtonGroup.js +1 -1
  34. package/lib/module/components/Card/Card.js +152 -114
  35. package/lib/module/components/Card/assets/gold-logo-mark.png +0 -0
  36. package/lib/module/components/CategoryCard/CategoryCard.js +97 -63
  37. package/lib/module/components/CategoryCard/assets/sample.png +0 -0
  38. package/lib/module/components/CheckboxItem/CheckboxItem.js +59 -10
  39. package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +135 -52
  40. package/lib/module/components/HelloJioInput/HelloJioInput.js +56 -14
  41. package/lib/module/components/IconCapsule/IconCapsule.js +1 -1
  42. package/lib/module/components/MetricData/MetricData.js +26 -14
  43. package/lib/module/components/MoneyValue/MoneyValue.js +1 -1
  44. package/lib/module/components/Nudge/Nudge.js +1 -1
  45. package/lib/module/components/PdpCcCard/PdpCcCard.js +48 -92
  46. package/lib/module/components/PlanComparisonCard/PlanComparisonCard.js +52 -45
  47. package/lib/module/components/PortfolioHero/PortfolioHero.js +1 -1
  48. package/lib/module/components/Slider/Slider.js +3 -3
  49. package/lib/module/components/TextInput/TextInput.js +27 -9
  50. package/lib/module/components/Tooltip/Tooltip.js +3 -5
  51. package/lib/module/components/index.js +1 -1
  52. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  53. package/lib/module/design-tokens/figma-modes.generated.js +13 -13
  54. package/lib/module/icons/registry.js +1 -1
  55. package/lib/typescript/src/components/ActionFooter/ActionFooter.d.ts +50 -21
  56. package/lib/typescript/src/components/Button/Button.d.ts +24 -1
  57. package/lib/typescript/src/components/ButtonGroup/ButtonGroup.d.ts +2 -2
  58. package/lib/typescript/src/components/Card/Card.d.ts +54 -25
  59. package/lib/typescript/src/components/CategoryCard/CategoryCard.d.ts +29 -12
  60. package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +27 -9
  61. package/lib/typescript/src/components/ExpandableCheckbox/ExpandableCheckbox.d.ts +37 -12
  62. package/lib/typescript/src/components/IconCapsule/IconCapsule.d.ts +1 -1
  63. package/lib/typescript/src/components/MetricData/MetricData.d.ts +7 -5
  64. package/lib/typescript/src/components/PdpCcCard/PdpCcCard.d.ts +16 -6
  65. package/lib/typescript/src/components/PlanComparisonCard/PlanComparisonCard.d.ts +9 -2
  66. package/lib/typescript/src/components/index.d.ts +2 -2
  67. package/lib/typescript/src/icons/registry.d.ts +1 -1
  68. package/package.json +4 -2
  69. package/src/components/ActionFooter/ActionFooter.tsx +375 -141
  70. package/src/components/Badge/Badge.tsx +21 -1
  71. package/src/components/Button/Button.tsx +192 -44
  72. package/src/components/ButtonGroup/ButtonGroup.tsx +2 -2
  73. package/src/components/Card/Card.tsx +370 -212
  74. package/src/components/Card/assets/gold-logo-mark.png +0 -0
  75. package/src/components/CategoryCard/CategoryCard.tsx +130 -84
  76. package/src/components/CategoryCard/assets/sample.png +0 -0
  77. package/src/components/CheckboxItem/CheckboxItem.tsx +72 -12
  78. package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +186 -67
  79. package/src/components/HelloJioInput/HelloJioInput.tsx +58 -17
  80. package/src/components/IconCapsule/IconCapsule.tsx +1 -1
  81. package/src/components/MetricData/MetricData.tsx +39 -22
  82. package/src/components/MoneyValue/MoneyValue.tsx +1 -1
  83. package/src/components/Nudge/Nudge.tsx +1 -1
  84. package/src/components/PdpCcCard/PdpCcCard.tsx +41 -92
  85. package/src/components/PlanComparisonCard/PlanComparisonCard.tsx +73 -58
  86. package/src/components/PortfolioHero/PortfolioHero.tsx +1 -1
  87. package/src/components/Slider/Slider.tsx +3 -3
  88. package/src/components/TextInput/TextInput.tsx +26 -9
  89. package/src/components/Tooltip/Tooltip.tsx +3 -5
  90. package/src/components/index.ts +9 -2
  91. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  92. package/src/design-tokens/figma-modes.generated.ts +13 -13
  93. package/src/icons/registry.ts +1 -1
@@ -168,16 +168,23 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(function TextInput({
168
168
  borderColor: '#222',
169
169
  borderWidth: 1
170
170
  } : {};
171
+
172
+ // ⚠️ DO NOT change to an unconditional `lineHeight`, and do NOT put
173
+ // `minHeight: lineHeight` on this single-line input on iOS. Same contract as
174
+ // FormField / SuggestiveSearch — read before "simplifying".
175
+ //
176
+ // facebook/react-native#39145 / #28012: on iOS, a single-line RN TextInput
177
+ // (UITextField) with `lineHeight` > font metrics puts ALL the extra space
178
+ // ABOVE the glyphs, so placeholder/value sink. Android/Web distribute evenly.
179
+ // RN's documented workaround (#39145) and #56774: omit `lineHeight` on
180
+ // single-line iOS inputs — UITextField centers natively — and let the
181
+ // wrapper (`alignItems: 'center'` + padding/icon) own vertical layout.
182
+ // Pinning `lineHeight` to `fontSize` is NOT a substitute; it clips custom
183
+ // font metrics and floats typed text above center.
171
184
  const textInputStyle = {
172
185
  flex: 1,
173
186
  color: textColor,
174
187
  fontSize,
175
- // iOS-only quirk: a single-line RNTextInput with an explicit `lineHeight`
176
- // larger than `fontSize` puts all the extra space ABOVE the glyphs, so the
177
- // text/placeholder sits below center (iOS native font-metrics bug — see
178
- // facebook/react-native#39145 / #28012). The container centers via
179
- // `alignItems: 'center'` + `minHeight`, so omit lineHeight on iOS
180
- // (UITextField centers natively) and keep it on Android/Web where it's fine.
181
188
  ...(_reactNative.Platform.OS === 'ios' ? null : {
182
189
  lineHeight
183
190
  }),
@@ -185,13 +192,24 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(function TextInput({
185
192
  fontWeight,
186
193
  padding: 0,
187
194
  margin: 0,
188
- minHeight: lineHeight,
189
195
  // Remove focus outline for React Native Web
190
196
  outlineStyle: 'none',
191
197
  outlineWidth: 0,
192
198
  outlineColor: 'transparent'
193
199
  };
194
200
 
201
+ // On iOS, strip any consumer `inputStyle.lineHeight` so it can't re-break
202
+ // the native centering contract above.
203
+ const resolvedInputStyle = _reactNative.Platform.OS === 'ios' && inputStyle != null ? (() => {
204
+ const flat = _reactNative.StyleSheet.flatten(inputStyle);
205
+ if (!flat || flat.lineHeight == null) return inputStyle;
206
+ const {
207
+ lineHeight: _ignoredLineHeight,
208
+ ...restStyle
209
+ } = flat;
210
+ return restStyle;
211
+ })() : inputStyle;
212
+
195
213
  // Determine leading element: use provided leading, or default to icon from leadingIconName
196
214
  const leadingElement = leading || /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
197
215
  name: leadingIconName,
@@ -248,7 +266,7 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(function TextInput({
248
266
  placeholderTextColor: placeholderColor,
249
267
  onFocus: handleFocus,
250
268
  onBlur: handleBlur,
251
- style: [textInputStyle, inputStyle],
269
+ style: [textInputStyle, resolvedInputStyle],
252
270
  ...rest
253
271
  }), processedTrailing && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
254
272
  accessibilityElementsHidden: true,
@@ -191,14 +191,12 @@ function TooltipContent({
191
191
  height: windowHeight
192
192
  } = _reactNative.Dimensions.get('window');
193
193
 
194
- // Tokens
194
+ // Tokens — Figma binds Output/Tooltip `radius` + `maxWidth` (not tooltip/*).
195
195
  const bgColor = (0, _figmaVariablesResolver.getVariableByName)('tooltip/background', modes);
196
196
  const paddingH = Number((0, _figmaVariablesResolver.getVariableByName)('tooltip/padding/horizontal', modes));
197
197
  const paddingV = Number((0, _figmaVariablesResolver.getVariableByName)('tooltip/padding/vertical', modes));
198
- // Figma still binds bare local radius/maxWidth; published names are tooltip/*.
199
- // Not yet in Coin Variables export — fall back to Figma values (8 / 280).
200
- const radius = Number((0, _figmaVariablesResolver.getVariableByName)('tooltip/radius', modes) ?? 8);
201
- const maxWidthToken = Number((0, _figmaVariablesResolver.getVariableByName)('tooltip/maxWidth', modes) ?? 280);
198
+ const radius = Number((0, _figmaVariablesResolver.getVariableByName)('radius', modes));
199
+ const maxWidthToken = Number((0, _figmaVariablesResolver.getVariableByName)('maxWidth', modes));
202
200
  const arrowWidth = Number((0, _figmaVariablesResolver.getVariableByName)('tooltip/tipItem/width', modes));
203
201
  const arrowHeight = Number((0, _figmaVariablesResolver.getVariableByName)('tooltip/tipItem/height', modes));
204
202
  const labelColor = (0, _figmaVariablesResolver.getVariableByName)('tooltip/label/color', modes);
@@ -141,6 +141,12 @@ Object.defineProperty(exports, "ButtonGroup", {
141
141
  return _ButtonGroup.default;
142
142
  }
143
143
  });
144
+ Object.defineProperty(exports, "CARD_MEDIA_ASPECT_RATIO", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _Card.CARD_MEDIA_ASPECT_RATIO;
148
+ }
149
+ });
144
150
  Object.defineProperty(exports, "CalendarGlyph", {
145
151
  enumerable: true,
146
152
  get: function () {
@@ -1077,7 +1083,7 @@ var _BottomNav = _interopRequireDefault(require("./BottomNav/BottomNav"));
1077
1083
  var _BottomNavItem = _interopRequireDefault(require("./BottomNavItem/BottomNavItem"));
1078
1084
  var _BrandChip = _interopRequireDefault(require("./BrandChip/BrandChip"));
1079
1085
  var _Button = _interopRequireDefault(require("./Button/Button"));
1080
- var _Card = _interopRequireDefault(require("./Card/Card"));
1086
+ var _Card = _interopRequireWildcard(require("./Card/Card"));
1081
1087
  var _CardAdvisory = _interopRequireDefault(require("./CardAdvisory/CardAdvisory"));
1082
1088
  var _CardBankAccount = _interopRequireDefault(require("./CardBankAccount/CardBankAccount"));
1083
1089
  var _Carousel = _interopRequireDefault(require("./Carousel/Carousel"));