jfs-components 0.1.51 → 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.
- package/CHANGELOG.md +11 -0
- package/lib/commonjs/components/ActionFooter/ActionFooter.js +319 -135
- package/lib/commonjs/components/Badge/Badge.js +20 -1
- package/lib/commonjs/components/Button/Button.js +139 -47
- package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +1 -1
- package/lib/commonjs/components/Card/Card.js +151 -112
- package/lib/commonjs/components/Card/assets/gold-logo-mark.png +0 -0
- package/lib/commonjs/components/CategoryCard/CategoryCard.js +97 -63
- package/lib/commonjs/components/CategoryCard/assets/sample.png +0 -0
- package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +59 -10
- package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +132 -49
- package/lib/commonjs/components/HelloJioInput/HelloJioInput.js +56 -14
- package/lib/commonjs/components/IconCapsule/IconCapsule.js +1 -1
- package/lib/commonjs/components/MetricData/MetricData.js +26 -13
- package/lib/commonjs/components/MoneyValue/MoneyValue.js +1 -1
- package/lib/commonjs/components/Nudge/Nudge.js +1 -1
- package/lib/commonjs/components/PdpCcCard/PdpCcCard.js +47 -91
- package/lib/commonjs/components/PlanComparisonCard/PlanComparisonCard.js +52 -45
- package/lib/commonjs/components/PortfolioHero/PortfolioHero.js +1 -1
- package/lib/commonjs/components/Slider/Slider.js +3 -3
- package/lib/commonjs/components/TextInput/TextInput.js +26 -8
- package/lib/commonjs/components/Tooltip/Tooltip.js +3 -5
- package/lib/commonjs/components/index.js +7 -1
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/design-tokens/figma-modes.generated.js +13 -13
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/ActionFooter/ActionFooter.js +322 -138
- package/lib/module/components/Badge/Badge.js +20 -1
- package/lib/module/components/Button/Button.js +140 -48
- package/lib/module/components/ButtonGroup/ButtonGroup.js +1 -1
- package/lib/module/components/Card/Card.js +152 -114
- package/lib/module/components/Card/assets/gold-logo-mark.png +0 -0
- package/lib/module/components/CategoryCard/CategoryCard.js +97 -63
- package/lib/module/components/CategoryCard/assets/sample.png +0 -0
- package/lib/module/components/CheckboxItem/CheckboxItem.js +59 -10
- package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +135 -52
- package/lib/module/components/HelloJioInput/HelloJioInput.js +56 -14
- package/lib/module/components/IconCapsule/IconCapsule.js +1 -1
- package/lib/module/components/MetricData/MetricData.js +26 -14
- package/lib/module/components/MoneyValue/MoneyValue.js +1 -1
- package/lib/module/components/Nudge/Nudge.js +1 -1
- package/lib/module/components/PdpCcCard/PdpCcCard.js +48 -92
- package/lib/module/components/PlanComparisonCard/PlanComparisonCard.js +52 -45
- package/lib/module/components/PortfolioHero/PortfolioHero.js +1 -1
- package/lib/module/components/Slider/Slider.js +3 -3
- package/lib/module/components/TextInput/TextInput.js +27 -9
- package/lib/module/components/Tooltip/Tooltip.js +3 -5
- package/lib/module/components/index.js +1 -1
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/design-tokens/figma-modes.generated.js +13 -13
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/components/ActionFooter/ActionFooter.d.ts +50 -21
- package/lib/typescript/src/components/Button/Button.d.ts +24 -1
- package/lib/typescript/src/components/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/lib/typescript/src/components/Card/Card.d.ts +54 -25
- package/lib/typescript/src/components/CategoryCard/CategoryCard.d.ts +29 -12
- package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +27 -9
- package/lib/typescript/src/components/ExpandableCheckbox/ExpandableCheckbox.d.ts +37 -12
- package/lib/typescript/src/components/IconCapsule/IconCapsule.d.ts +1 -1
- package/lib/typescript/src/components/MetricData/MetricData.d.ts +7 -5
- package/lib/typescript/src/components/PdpCcCard/PdpCcCard.d.ts +16 -6
- package/lib/typescript/src/components/PlanComparisonCard/PlanComparisonCard.d.ts +9 -2
- package/lib/typescript/src/components/index.d.ts +2 -2
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/ActionFooter/ActionFooter.tsx +375 -141
- package/src/components/Badge/Badge.tsx +21 -1
- package/src/components/Button/Button.tsx +192 -44
- package/src/components/ButtonGroup/ButtonGroup.tsx +2 -2
- package/src/components/Card/Card.tsx +370 -212
- package/src/components/Card/assets/gold-logo-mark.png +0 -0
- package/src/components/CategoryCard/CategoryCard.tsx +130 -84
- package/src/components/CategoryCard/assets/sample.png +0 -0
- package/src/components/CheckboxItem/CheckboxItem.tsx +72 -12
- package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +186 -67
- package/src/components/HelloJioInput/HelloJioInput.tsx +58 -17
- package/src/components/IconCapsule/IconCapsule.tsx +1 -1
- package/src/components/MetricData/MetricData.tsx +39 -22
- package/src/components/MoneyValue/MoneyValue.tsx +1 -1
- package/src/components/Nudge/Nudge.tsx +1 -1
- package/src/components/PdpCcCard/PdpCcCard.tsx +41 -92
- package/src/components/PlanComparisonCard/PlanComparisonCard.tsx +73 -58
- package/src/components/PortfolioHero/PortfolioHero.tsx +1 -1
- package/src/components/Slider/Slider.tsx +3 -3
- package/src/components/TextInput/TextInput.tsx +26 -9
- package/src/components/Tooltip/Tooltip.tsx +3 -5
- package/src/components/index.ts +9 -2
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/design-tokens/figma-modes.generated.ts +13 -13
- 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,
|
|
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
|
-
|
|
199
|
-
|
|
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 =
|
|
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"));
|