jfs-components 0.0.79 → 0.0.85

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 (138) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/lib/commonjs/components/AppBar/AppBar.js +70 -6
  3. package/lib/commonjs/components/AreaLineChart/AreaLineChart.js +866 -0
  4. package/lib/commonjs/components/AreaLineChart/chartMath.js +252 -0
  5. package/lib/commonjs/components/Attached/Attached.js +76 -7
  6. package/lib/commonjs/components/BubbleChart/BubbleChart.js +191 -0
  7. package/lib/commonjs/components/BubbleChart/bubblePacking.js +378 -0
  8. package/lib/commonjs/components/Checkbox/Checkbox.js +18 -2
  9. package/lib/commonjs/components/ClusterBubble/ClusterBubble.js +272 -0
  10. package/lib/commonjs/components/Drawer/Drawer.js +6 -1
  11. package/lib/commonjs/components/DropdownInput/DropdownInput.js +30 -6
  12. package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +17 -11
  13. package/lib/commonjs/components/FormField/FormField.js +1 -14
  14. package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +5 -1
  15. package/lib/commonjs/components/ListItem/ListItem.js +6 -11
  16. package/lib/commonjs/components/MessageField/MessageField.js +1 -13
  17. package/lib/commonjs/components/MetricLegendItem/MetricLegendItem.js +7 -1
  18. package/lib/commonjs/components/PaymentFeedback/PaymentFeedback.js +12 -9
  19. package/lib/commonjs/components/PlanComparisonCard/PlanComparisonCard.js +69 -160
  20. package/lib/commonjs/components/Spinner/Spinner.js +217 -0
  21. package/lib/commonjs/components/TextInput/TextInput.js +33 -18
  22. package/lib/commonjs/components/index.js +34 -0
  23. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  24. package/lib/commonjs/icons/components/IconArrowdown.js +19 -0
  25. package/lib/commonjs/icons/components/IconArrowup.js +19 -0
  26. package/lib/commonjs/icons/components/IconChevrondowncircle.js +19 -0
  27. package/lib/commonjs/icons/components/IconChevronleftcircle.js +19 -0
  28. package/lib/commonjs/icons/components/IconChevronrightcircle.js +19 -0
  29. package/lib/commonjs/icons/components/IconChevronupcircle.js +19 -0
  30. package/lib/commonjs/icons/components/IconOsnavback.js +19 -0
  31. package/lib/commonjs/icons/components/IconOsnavcenter.js +19 -0
  32. package/lib/commonjs/icons/components/IconOsnavhome.js +19 -0
  33. package/lib/commonjs/icons/components/IconOsnavtask.js +19 -0
  34. package/lib/commonjs/icons/components/IconSignin.js +19 -0
  35. package/lib/commonjs/icons/components/IconSignout.js +19 -0
  36. package/lib/commonjs/icons/components/index.js +132 -0
  37. package/lib/commonjs/icons/registry.js +2 -2
  38. package/lib/module/components/AppBar/AppBar.js +70 -6
  39. package/lib/module/components/AreaLineChart/AreaLineChart.js +859 -0
  40. package/lib/module/components/AreaLineChart/chartMath.js +242 -0
  41. package/lib/module/components/Attached/Attached.js +76 -7
  42. package/lib/module/components/BubbleChart/BubbleChart.js +185 -0
  43. package/lib/module/components/BubbleChart/bubblePacking.js +370 -0
  44. package/lib/module/components/Checkbox/Checkbox.js +18 -2
  45. package/lib/module/components/ClusterBubble/ClusterBubble.js +267 -0
  46. package/lib/module/components/Drawer/Drawer.js +6 -1
  47. package/lib/module/components/DropdownInput/DropdownInput.js +30 -6
  48. package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +17 -11
  49. package/lib/module/components/FormField/FormField.js +3 -16
  50. package/lib/module/components/FullscreenModal/FullscreenModal.js +5 -1
  51. package/lib/module/components/ListItem/ListItem.js +6 -11
  52. package/lib/module/components/MessageField/MessageField.js +3 -15
  53. package/lib/module/components/MetricLegendItem/MetricLegendItem.js +7 -1
  54. package/lib/module/components/PaymentFeedback/PaymentFeedback.js +13 -9
  55. package/lib/module/components/PlanComparisonCard/PlanComparisonCard.js +72 -160
  56. package/lib/module/components/Spinner/Spinner.js +212 -0
  57. package/lib/module/components/TextInput/TextInput.js +34 -19
  58. package/lib/module/components/index.js +4 -0
  59. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  60. package/lib/module/icons/components/IconArrowdown.js +12 -0
  61. package/lib/module/icons/components/IconArrowup.js +12 -0
  62. package/lib/module/icons/components/IconChevrondowncircle.js +12 -0
  63. package/lib/module/icons/components/IconChevronleftcircle.js +12 -0
  64. package/lib/module/icons/components/IconChevronrightcircle.js +12 -0
  65. package/lib/module/icons/components/IconChevronupcircle.js +12 -0
  66. package/lib/module/icons/components/IconOsnavback.js +12 -0
  67. package/lib/module/icons/components/IconOsnavcenter.js +12 -0
  68. package/lib/module/icons/components/IconOsnavhome.js +12 -0
  69. package/lib/module/icons/components/IconOsnavtask.js +12 -0
  70. package/lib/module/icons/components/IconSignin.js +12 -0
  71. package/lib/module/icons/components/IconSignout.js +12 -0
  72. package/lib/module/icons/components/index.js +12 -0
  73. package/lib/module/icons/registry.js +2 -2
  74. package/lib/typescript/src/components/AppBar/AppBar.d.ts +12 -1
  75. package/lib/typescript/src/components/AreaLineChart/AreaLineChart.d.ts +212 -0
  76. package/lib/typescript/src/components/AreaLineChart/chartMath.d.ts +90 -0
  77. package/lib/typescript/src/components/Attached/Attached.d.ts +19 -16
  78. package/lib/typescript/src/components/BubbleChart/BubbleChart.d.ts +81 -0
  79. package/lib/typescript/src/components/BubbleChart/bubblePacking.d.ts +83 -0
  80. package/lib/typescript/src/components/ClusterBubble/ClusterBubble.d.ts +76 -0
  81. package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +3 -2
  82. package/lib/typescript/src/components/ListItem/ListItem.d.ts +3 -3
  83. package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +7 -1
  84. package/lib/typescript/src/components/PaymentFeedback/PaymentFeedback.d.ts +5 -1
  85. package/lib/typescript/src/components/PlanComparisonCard/PlanComparisonCard.d.ts +10 -8
  86. package/lib/typescript/src/components/Spinner/Spinner.d.ts +45 -0
  87. package/lib/typescript/src/components/index.d.ts +4 -0
  88. package/lib/typescript/src/icons/components/IconArrowdown.d.ts +3 -0
  89. package/lib/typescript/src/icons/components/IconArrowup.d.ts +3 -0
  90. package/lib/typescript/src/icons/components/IconChevrondowncircle.d.ts +3 -0
  91. package/lib/typescript/src/icons/components/IconChevronleftcircle.d.ts +3 -0
  92. package/lib/typescript/src/icons/components/IconChevronrightcircle.d.ts +3 -0
  93. package/lib/typescript/src/icons/components/IconChevronupcircle.d.ts +3 -0
  94. package/lib/typescript/src/icons/components/IconOsnavback.d.ts +3 -0
  95. package/lib/typescript/src/icons/components/IconOsnavcenter.d.ts +3 -0
  96. package/lib/typescript/src/icons/components/IconOsnavhome.d.ts +3 -0
  97. package/lib/typescript/src/icons/components/IconOsnavtask.d.ts +3 -0
  98. package/lib/typescript/src/icons/components/IconSignin.d.ts +3 -0
  99. package/lib/typescript/src/icons/components/IconSignout.d.ts +3 -0
  100. package/lib/typescript/src/icons/components/index.d.ts +12 -0
  101. package/lib/typescript/src/icons/registry.d.ts +1 -1
  102. package/package.json +3 -2
  103. package/src/components/AppBar/AppBar.tsx +92 -12
  104. package/src/components/AreaLineChart/AreaLineChart.tsx +1161 -0
  105. package/src/components/AreaLineChart/chartMath.ts +265 -0
  106. package/src/components/Attached/Attached.tsx +94 -7
  107. package/src/components/BubbleChart/BubbleChart.tsx +319 -0
  108. package/src/components/BubbleChart/bubblePacking.ts +397 -0
  109. package/src/components/Checkbox/Checkbox.tsx +14 -2
  110. package/src/components/ClusterBubble/ClusterBubble.tsx +359 -0
  111. package/src/components/Drawer/Drawer.tsx +4 -0
  112. package/src/components/DropdownInput/DropdownInput.tsx +54 -20
  113. package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +13 -9
  114. package/src/components/FormField/FormField.tsx +3 -19
  115. package/src/components/FullscreenModal/FullscreenModal.tsx +3 -0
  116. package/src/components/ListItem/ListItem.tsx +14 -16
  117. package/src/components/MessageField/MessageField.tsx +3 -18
  118. package/src/components/MetricLegendItem/MetricLegendItem.tsx +20 -6
  119. package/src/components/PaymentFeedback/PaymentFeedback.tsx +15 -8
  120. package/src/components/PlanComparisonCard/PlanComparisonCard.tsx +82 -192
  121. package/src/components/Spinner/Spinner.tsx +273 -0
  122. package/src/components/TextInput/TextInput.tsx +37 -19
  123. package/src/components/index.ts +4 -0
  124. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  125. package/src/icons/components/IconArrowdown.tsx +11 -0
  126. package/src/icons/components/IconArrowup.tsx +11 -0
  127. package/src/icons/components/IconChevrondowncircle.tsx +11 -0
  128. package/src/icons/components/IconChevronleftcircle.tsx +11 -0
  129. package/src/icons/components/IconChevronrightcircle.tsx +11 -0
  130. package/src/icons/components/IconChevronupcircle.tsx +11 -0
  131. package/src/icons/components/IconOsnavback.tsx +11 -0
  132. package/src/icons/components/IconOsnavcenter.tsx +11 -0
  133. package/src/icons/components/IconOsnavhome.tsx +11 -0
  134. package/src/icons/components/IconOsnavtask.tsx +11 -0
  135. package/src/icons/components/IconSignin.tsx +11 -0
  136. package/src/icons/components/IconSignout.tsx +11 -0
  137. package/src/icons/components/index.ts +12 -0
  138. package/src/icons/registry.ts +49 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ 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.0.85] - 2026-06-03
8
+
9
+ - Added `AreaLineChart` — multi-series area/line chart with grid, axes, legend, goal pin, and interactive tooltip; exports `useChart` and compound `ChartGrid` / `ChartXAxis` / `ChartYAxis` / `GoalPin` parts.
10
+ - Added `BubbleChart` — packed bubble cluster layout with sqrt-scaled sizes and collision-aware label placement.
11
+ - Added `ClusterBubble` — single data-viz bubble with inside/outside/auto label placement.
12
+ - `AppBar` — SubPage middle slot uses full-height flex overlay (fixes Android vertical misalignment).
13
+ - `Attached` — token-driven outside border ring on the badge slot.
14
+ - `MetricLegendItem` — new `indicatorShape` prop (`dot` | `line`).
15
+
16
+ ---
17
+
18
+ ## [0.0.84] - 2026-06-02
19
+
20
+ - Added `Spinner` — animated three-segment loading indicator with gravity-based motion and reduced-motion support.
21
+ - Added 12 icons: `ArrowUp`/`ArrowDown`, chevron-in-circle variants, OS nav icons, `SignIn`/`SignOut`.
22
+ - `AppBar` — SubPage middle slot absolutely centered; new `middleSlotWidth` prop.
23
+ - `Attached` — `badgeSize` / `badgeRadius` to enforce a fixed badge box and clip content.
24
+ - `Checkbox` — 44 pt touch target via `hitSlop` instead of oversized visual box.
25
+ - `Drawer` / `FullscreenModal` — `keyboardShouldPersistTaps="handled"` on scroll content.
26
+ - `DropdownInput` — Android popup positioning fix; `menuOffset` defaults to `formField/gap`.
27
+ - `ExpandableCheckbox` — single-line label/checkbox vertical alignment on Android.
28
+ - `FormField` / `MessageField` — input wrapper reverted to `View`.
29
+ - `TextInput` — native uses `View` wrapper for reliable Android focus; web keeps Pressable tap-to-focus.
30
+ - `PaymentFeedback` — `AppearanceSystem` via `modes` drives default capsule color.
31
+ - `PlanComparisonCard` — 1.8fr/1fr flex grid; removed `labelColumnFlex`.
32
+ - `ListItem` — `leading` no longer defaults to `IconCapsule`; omit/`null` renders nothing.
33
+
34
+ ---
35
+
7
36
  ## [0.0.79] - 2026-05-30
8
37
 
9
38
  - Added `Attached` — positions a badge over main content at nine anchor points (corners, edges, center).
@@ -12,10 +12,18 @@ var _NavArrow = _interopRequireDefault(require("../NavArrow/NavArrow"));
12
12
  var _reactUtils = require("../../utils/react-utils");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ // SubPage "slot wrap" geometry, taken directly from the Figma design
16
+ // (node 449:7876). The middle slot is an absolutely-centered box of a fixed
17
+ // size; its inner content (node 3991:4125) is a `flex: 1 0 0; min-width: 1px`
18
+ // item so it fills / shrinks responsively within that box.
19
+ const SUBPAGE_MIDDLE_DEFAULT_WIDTH = 192;
20
+ const SUBPAGE_MIDDLE_HEIGHT = 32;
21
+ const SUBPAGE_MIDDLE_PADDING_HORIZONTAL = 21;
15
22
  function AppBar({
16
23
  type = 'MainPage',
17
24
  leadingSlot,
18
25
  middleSlot,
26
+ middleSlotWidth = SUBPAGE_MIDDLE_DEFAULT_WIDTH,
19
27
  actionsSlot,
20
28
  modes: propModes = _reactUtils.EMPTY_MODES,
21
29
  onLeadingPress,
@@ -117,13 +125,50 @@ function AppBar({
117
125
  children: (0, _reactUtils.cloneChildrenWithModes)(_react.default.Children.toArray(actionsSlot), modes)
118
126
  }) : null;
119
127
 
120
- // When there is no middleSlot we want leading & actions pinned to the
121
- // outer edges, so we apply `space-between` at the wrapper. With a middle
122
- // slot present, the middle (flex: 1) absorbs the remaining space, so
123
- // `space-between` is a no-op.
128
+ // SubPage centers its middle slot via absolute positioning (see Figma
129
+ // "slot wrap"), so it never participates in the row flow. Only MainPage
130
+ // keeps the legacy in-flow middle slot.
131
+ const hasInFlowMiddle = isMain && !!processedMiddle;
132
+
133
+ // With an in-flow middle (MainPage) the middle (flex: 1) absorbs the
134
+ // remaining space, so leading & actions sit at the edges naturally. In all
135
+ // other cases we pin leading & actions to the outer edges with
136
+ // `space-between`; the SubPage middle floats above, centered.
124
137
  const wrapperStyle = {
125
138
  ...containerStyle,
126
- justifyContent: processedMiddle ? 'flex-start' : 'space-between'
139
+ justifyContent: hasInFlowMiddle ? 'flex-start' : 'space-between'
140
+ };
141
+
142
+ // Absolutely-positioned overlay for the SubPage middle slot. Instead of
143
+ // centering a fixed-height box with `top/left: 50%` + transform (which on
144
+ // Android resolves the percentage against an intermediate, content-driven
145
+ // parent height and lands a few px too high), the overlay STRETCHES to fill
146
+ // the whole bar (`top/bottom/left/right: 0`) and centers its content with
147
+ // flexbox. This uses the exact same full-height vertical reference as the
148
+ // leading/actions row (`alignItems: 'center'`), so the middle content always
149
+ // sits on the same line as the back arrow and end slot on every platform.
150
+ const subPageMiddleOverlayStyle = {
151
+ position: 'absolute',
152
+ top: 0,
153
+ left: 0,
154
+ right: 0,
155
+ bottom: 0,
156
+ flexDirection: 'row',
157
+ alignItems: 'center',
158
+ justifyContent: 'center'
159
+ };
160
+
161
+ // Fixed-width clipping box (mirrors the Figma "slot wrap" geometry): keeps the
162
+ // middle content from bleeding under the leading/actions slots while staying
163
+ // centered within the overlay above.
164
+ const subPageMiddleBoxStyle = {
165
+ width: middleSlotWidth,
166
+ height: SUBPAGE_MIDDLE_HEIGHT,
167
+ flexDirection: 'row',
168
+ alignItems: 'center',
169
+ justifyContent: 'center',
170
+ paddingHorizontal: SUBPAGE_MIDDLE_PADDING_HORIZONTAL,
171
+ overflow: 'hidden'
127
172
  };
128
173
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
129
174
  style: [wrapperStyle, style],
@@ -139,7 +184,7 @@ function AppBar({
139
184
  alignItems: 'center'
140
185
  },
141
186
  children: processedLeading
142
- }), processedMiddle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
187
+ }), hasInFlowMiddle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
143
188
  style: {
144
189
  flex: 1,
145
190
  minWidth: 0,
@@ -152,6 +197,25 @@ function AppBar({
152
197
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
153
198
  style: actionsStyle,
154
199
  children: processedActions
200
+ }), isSub && processedMiddle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
201
+ style: subPageMiddleOverlayStyle,
202
+ pointerEvents: "box-none",
203
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
204
+ style: subPageMiddleBoxStyle,
205
+ pointerEvents: "box-none",
206
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
207
+ style: {
208
+ flex: 1,
209
+ minWidth: 1,
210
+ height: '100%',
211
+ flexDirection: 'row',
212
+ alignItems: 'center',
213
+ justifyContent: 'center'
214
+ },
215
+ pointerEvents: "box-none",
216
+ children: processedMiddle
217
+ })
218
+ })
155
219
  })]
156
220
  });
157
221
  }