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.
- package/CHANGELOG.md +29 -0
- package/lib/commonjs/components/AppBar/AppBar.js +70 -6
- package/lib/commonjs/components/AreaLineChart/AreaLineChart.js +866 -0
- package/lib/commonjs/components/AreaLineChart/chartMath.js +252 -0
- package/lib/commonjs/components/Attached/Attached.js +76 -7
- package/lib/commonjs/components/BubbleChart/BubbleChart.js +191 -0
- package/lib/commonjs/components/BubbleChart/bubblePacking.js +378 -0
- package/lib/commonjs/components/Checkbox/Checkbox.js +18 -2
- package/lib/commonjs/components/ClusterBubble/ClusterBubble.js +272 -0
- package/lib/commonjs/components/Drawer/Drawer.js +6 -1
- package/lib/commonjs/components/DropdownInput/DropdownInput.js +30 -6
- package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +17 -11
- package/lib/commonjs/components/FormField/FormField.js +1 -14
- package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +5 -1
- package/lib/commonjs/components/ListItem/ListItem.js +6 -11
- package/lib/commonjs/components/MessageField/MessageField.js +1 -13
- package/lib/commonjs/components/MetricLegendItem/MetricLegendItem.js +7 -1
- package/lib/commonjs/components/PaymentFeedback/PaymentFeedback.js +12 -9
- package/lib/commonjs/components/PlanComparisonCard/PlanComparisonCard.js +69 -160
- package/lib/commonjs/components/Spinner/Spinner.js +217 -0
- package/lib/commonjs/components/TextInput/TextInput.js +33 -18
- package/lib/commonjs/components/index.js +34 -0
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/icons/components/IconArrowdown.js +19 -0
- package/lib/commonjs/icons/components/IconArrowup.js +19 -0
- package/lib/commonjs/icons/components/IconChevrondowncircle.js +19 -0
- package/lib/commonjs/icons/components/IconChevronleftcircle.js +19 -0
- package/lib/commonjs/icons/components/IconChevronrightcircle.js +19 -0
- package/lib/commonjs/icons/components/IconChevronupcircle.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavback.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavcenter.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavhome.js +19 -0
- package/lib/commonjs/icons/components/IconOsnavtask.js +19 -0
- package/lib/commonjs/icons/components/IconSignin.js +19 -0
- package/lib/commonjs/icons/components/IconSignout.js +19 -0
- package/lib/commonjs/icons/components/index.js +132 -0
- package/lib/commonjs/icons/registry.js +2 -2
- package/lib/module/components/AppBar/AppBar.js +70 -6
- package/lib/module/components/AreaLineChart/AreaLineChart.js +859 -0
- package/lib/module/components/AreaLineChart/chartMath.js +242 -0
- package/lib/module/components/Attached/Attached.js +76 -7
- package/lib/module/components/BubbleChart/BubbleChart.js +185 -0
- package/lib/module/components/BubbleChart/bubblePacking.js +370 -0
- package/lib/module/components/Checkbox/Checkbox.js +18 -2
- package/lib/module/components/ClusterBubble/ClusterBubble.js +267 -0
- package/lib/module/components/Drawer/Drawer.js +6 -1
- package/lib/module/components/DropdownInput/DropdownInput.js +30 -6
- package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +17 -11
- package/lib/module/components/FormField/FormField.js +3 -16
- package/lib/module/components/FullscreenModal/FullscreenModal.js +5 -1
- package/lib/module/components/ListItem/ListItem.js +6 -11
- package/lib/module/components/MessageField/MessageField.js +3 -15
- package/lib/module/components/MetricLegendItem/MetricLegendItem.js +7 -1
- package/lib/module/components/PaymentFeedback/PaymentFeedback.js +13 -9
- package/lib/module/components/PlanComparisonCard/PlanComparisonCard.js +72 -160
- package/lib/module/components/Spinner/Spinner.js +212 -0
- package/lib/module/components/TextInput/TextInput.js +34 -19
- package/lib/module/components/index.js +4 -0
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/icons/components/IconArrowdown.js +12 -0
- package/lib/module/icons/components/IconArrowup.js +12 -0
- package/lib/module/icons/components/IconChevrondowncircle.js +12 -0
- package/lib/module/icons/components/IconChevronleftcircle.js +12 -0
- package/lib/module/icons/components/IconChevronrightcircle.js +12 -0
- package/lib/module/icons/components/IconChevronupcircle.js +12 -0
- package/lib/module/icons/components/IconOsnavback.js +12 -0
- package/lib/module/icons/components/IconOsnavcenter.js +12 -0
- package/lib/module/icons/components/IconOsnavhome.js +12 -0
- package/lib/module/icons/components/IconOsnavtask.js +12 -0
- package/lib/module/icons/components/IconSignin.js +12 -0
- package/lib/module/icons/components/IconSignout.js +12 -0
- package/lib/module/icons/components/index.js +12 -0
- package/lib/module/icons/registry.js +2 -2
- package/lib/typescript/src/components/AppBar/AppBar.d.ts +12 -1
- package/lib/typescript/src/components/AreaLineChart/AreaLineChart.d.ts +212 -0
- package/lib/typescript/src/components/AreaLineChart/chartMath.d.ts +90 -0
- package/lib/typescript/src/components/Attached/Attached.d.ts +19 -16
- package/lib/typescript/src/components/BubbleChart/BubbleChart.d.ts +81 -0
- package/lib/typescript/src/components/BubbleChart/bubblePacking.d.ts +83 -0
- package/lib/typescript/src/components/ClusterBubble/ClusterBubble.d.ts +76 -0
- package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +3 -2
- package/lib/typescript/src/components/ListItem/ListItem.d.ts +3 -3
- package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +7 -1
- package/lib/typescript/src/components/PaymentFeedback/PaymentFeedback.d.ts +5 -1
- package/lib/typescript/src/components/PlanComparisonCard/PlanComparisonCard.d.ts +10 -8
- package/lib/typescript/src/components/Spinner/Spinner.d.ts +45 -0
- package/lib/typescript/src/components/index.d.ts +4 -0
- package/lib/typescript/src/icons/components/IconArrowdown.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconArrowup.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevrondowncircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevronleftcircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevronrightcircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconChevronupcircle.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavback.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavcenter.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavhome.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconOsnavtask.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconSignin.d.ts +3 -0
- package/lib/typescript/src/icons/components/IconSignout.d.ts +3 -0
- package/lib/typescript/src/icons/components/index.d.ts +12 -0
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +3 -2
- package/src/components/AppBar/AppBar.tsx +92 -12
- package/src/components/AreaLineChart/AreaLineChart.tsx +1161 -0
- package/src/components/AreaLineChart/chartMath.ts +265 -0
- package/src/components/Attached/Attached.tsx +94 -7
- package/src/components/BubbleChart/BubbleChart.tsx +319 -0
- package/src/components/BubbleChart/bubblePacking.ts +397 -0
- package/src/components/Checkbox/Checkbox.tsx +14 -2
- package/src/components/ClusterBubble/ClusterBubble.tsx +359 -0
- package/src/components/Drawer/Drawer.tsx +4 -0
- package/src/components/DropdownInput/DropdownInput.tsx +54 -20
- package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +13 -9
- package/src/components/FormField/FormField.tsx +3 -19
- package/src/components/FullscreenModal/FullscreenModal.tsx +3 -0
- package/src/components/ListItem/ListItem.tsx +14 -16
- package/src/components/MessageField/MessageField.tsx +3 -18
- package/src/components/MetricLegendItem/MetricLegendItem.tsx +20 -6
- package/src/components/PaymentFeedback/PaymentFeedback.tsx +15 -8
- package/src/components/PlanComparisonCard/PlanComparisonCard.tsx +82 -192
- package/src/components/Spinner/Spinner.tsx +273 -0
- package/src/components/TextInput/TextInput.tsx +37 -19
- package/src/components/index.ts +4 -0
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/icons/components/IconArrowdown.tsx +11 -0
- package/src/icons/components/IconArrowup.tsx +11 -0
- package/src/icons/components/IconChevrondowncircle.tsx +11 -0
- package/src/icons/components/IconChevronleftcircle.tsx +11 -0
- package/src/icons/components/IconChevronrightcircle.tsx +11 -0
- package/src/icons/components/IconChevronupcircle.tsx +11 -0
- package/src/icons/components/IconOsnavback.tsx +11 -0
- package/src/icons/components/IconOsnavcenter.tsx +11 -0
- package/src/icons/components/IconOsnavhome.tsx +11 -0
- package/src/icons/components/IconOsnavtask.tsx +11 -0
- package/src/icons/components/IconSignin.tsx +11 -0
- package/src/icons/components/IconSignout.tsx +11 -0
- package/src/icons/components/index.ts +12 -0
- 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
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
|
|
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:
|
|
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
|
-
}),
|
|
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
|
}
|