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
@@ -7,10 +7,18 @@ import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
7
  import NavArrow from '../NavArrow/NavArrow';
8
8
  import { cloneChildrenWithModes, EMPTY_MODES } from '../../utils/react-utils';
9
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ // SubPage "slot wrap" geometry, taken directly from the Figma design
11
+ // (node 449:7876). The middle slot is an absolutely-centered box of a fixed
12
+ // size; its inner content (node 3991:4125) is a `flex: 1 0 0; min-width: 1px`
13
+ // item so it fills / shrinks responsively within that box.
14
+ const SUBPAGE_MIDDLE_DEFAULT_WIDTH = 192;
15
+ const SUBPAGE_MIDDLE_HEIGHT = 32;
16
+ const SUBPAGE_MIDDLE_PADDING_HORIZONTAL = 21;
10
17
  export default function AppBar({
11
18
  type = 'MainPage',
12
19
  leadingSlot,
13
20
  middleSlot,
21
+ middleSlotWidth = SUBPAGE_MIDDLE_DEFAULT_WIDTH,
14
22
  actionsSlot,
15
23
  modes: propModes = EMPTY_MODES,
16
24
  onLeadingPress,
@@ -112,13 +120,50 @@ export default function AppBar({
112
120
  children: cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes)
113
121
  }) : null;
114
122
 
115
- // When there is no middleSlot we want leading & actions pinned to the
116
- // outer edges, so we apply `space-between` at the wrapper. With a middle
117
- // slot present, the middle (flex: 1) absorbs the remaining space, so
118
- // `space-between` is a no-op.
123
+ // SubPage centers its middle slot via absolute positioning (see Figma
124
+ // "slot wrap"), so it never participates in the row flow. Only MainPage
125
+ // keeps the legacy in-flow middle slot.
126
+ const hasInFlowMiddle = isMain && !!processedMiddle;
127
+
128
+ // With an in-flow middle (MainPage) the middle (flex: 1) absorbs the
129
+ // remaining space, so leading & actions sit at the edges naturally. In all
130
+ // other cases we pin leading & actions to the outer edges with
131
+ // `space-between`; the SubPage middle floats above, centered.
119
132
  const wrapperStyle = {
120
133
  ...containerStyle,
121
- justifyContent: processedMiddle ? 'flex-start' : 'space-between'
134
+ justifyContent: hasInFlowMiddle ? 'flex-start' : 'space-between'
135
+ };
136
+
137
+ // Absolutely-positioned overlay for the SubPage middle slot. Instead of
138
+ // centering a fixed-height box with `top/left: 50%` + transform (which on
139
+ // Android resolves the percentage against an intermediate, content-driven
140
+ // parent height and lands a few px too high), the overlay STRETCHES to fill
141
+ // the whole bar (`top/bottom/left/right: 0`) and centers its content with
142
+ // flexbox. This uses the exact same full-height vertical reference as the
143
+ // leading/actions row (`alignItems: 'center'`), so the middle content always
144
+ // sits on the same line as the back arrow and end slot on every platform.
145
+ const subPageMiddleOverlayStyle = {
146
+ position: 'absolute',
147
+ top: 0,
148
+ left: 0,
149
+ right: 0,
150
+ bottom: 0,
151
+ flexDirection: 'row',
152
+ alignItems: 'center',
153
+ justifyContent: 'center'
154
+ };
155
+
156
+ // Fixed-width clipping box (mirrors the Figma "slot wrap" geometry): keeps the
157
+ // middle content from bleeding under the leading/actions slots while staying
158
+ // centered within the overlay above.
159
+ const subPageMiddleBoxStyle = {
160
+ width: middleSlotWidth,
161
+ height: SUBPAGE_MIDDLE_HEIGHT,
162
+ flexDirection: 'row',
163
+ alignItems: 'center',
164
+ justifyContent: 'center',
165
+ paddingHorizontal: SUBPAGE_MIDDLE_PADDING_HORIZONTAL,
166
+ overflow: 'hidden'
122
167
  };
123
168
  return /*#__PURE__*/_jsxs(View, {
124
169
  style: [wrapperStyle, style],
@@ -134,7 +179,7 @@ export default function AppBar({
134
179
  alignItems: 'center'
135
180
  },
136
181
  children: processedLeading
137
- }), processedMiddle && /*#__PURE__*/_jsx(View, {
182
+ }), hasInFlowMiddle && /*#__PURE__*/_jsx(View, {
138
183
  style: {
139
184
  flex: 1,
140
185
  minWidth: 0,
@@ -147,6 +192,25 @@ export default function AppBar({
147
192
  }), /*#__PURE__*/_jsx(View, {
148
193
  style: actionsStyle,
149
194
  children: processedActions
195
+ }), isSub && processedMiddle && /*#__PURE__*/_jsx(View, {
196
+ style: subPageMiddleOverlayStyle,
197
+ pointerEvents: "box-none",
198
+ children: /*#__PURE__*/_jsx(View, {
199
+ style: subPageMiddleBoxStyle,
200
+ pointerEvents: "box-none",
201
+ children: /*#__PURE__*/_jsx(View, {
202
+ style: {
203
+ flex: 1,
204
+ minWidth: 1,
205
+ height: '100%',
206
+ flexDirection: 'row',
207
+ alignItems: 'center',
208
+ justifyContent: 'center'
209
+ },
210
+ pointerEvents: "box-none",
211
+ children: processedMiddle
212
+ })
213
+ })
150
214
  })]
151
215
  });
152
216
  }