jfs-components 0.1.58 → 0.1.59

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 CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [0.1.59] - 2026-07-28
8
+
9
+ - `CardFinancialCondition` — ship Figma source defaults for `AppearanceBrand: Neutral`, `Context: Nudge&Alert`, and `Nudge padding: None` (merge order: component defaults → global theme → caller `modes`). Stories aligned to the same defaults.
10
+
7
11
  ## [0.1.58] - 2026-07-27
8
12
 
9
13
  - `TextInput` / `InputSearch` — restore iOS single-line vertical centering (FormField pattern): row owns height via `minHeight` + `paddingVertical: 0`; omit `lineHeight` on the field on iOS so placeholder and typed text stay centered (RN #39145 / #56774).
@@ -16,6 +16,14 @@ var _Nudge = _interopRequireDefault(require("../Nudge/Nudge"));
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
19
+ // Match the Figma source defaults: Neutral brand, Nudge&Alert context, and
20
+ // no nudge padding. Caller / global modes merge on top so any key can still
21
+ // be overridden per-instance.
22
+ const COMPONENT_DEFAULT_MODES = Object.freeze({
23
+ AppearanceBrand: 'Neutral',
24
+ Context: 'Nudge&Alert',
25
+ 'Nudge padding': 'None'
26
+ });
19
27
  const toNumber = (value, fallback) => {
20
28
  if (typeof value === 'number') {
21
29
  return Number.isFinite(value) ? value : fallback;
@@ -134,7 +142,9 @@ function CardFinancialCondition({
134
142
  const {
135
143
  modes: globalModes
136
144
  } = (0, _JFSThemeProvider.useTokens)();
137
- const modes = (0, _react.useMemo)(() => globalModes === _reactUtils.EMPTY_MODES && propModes === _reactUtils.EMPTY_MODES ? _reactUtils.EMPTY_MODES : {
145
+ // Merge order: component defaults global theme caller props.
146
+ const modes = (0, _react.useMemo)(() => globalModes === _reactUtils.EMPTY_MODES && propModes === _reactUtils.EMPTY_MODES ? COMPONENT_DEFAULT_MODES : {
147
+ ...COMPONENT_DEFAULT_MODES,
138
148
  ...globalModes,
139
149
  ...propModes
140
150
  }, [globalModes, propModes]);