@btndprojects/loam-ui-native 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +55 -2
- package/dist/accordion/index.js +3 -0
- package/dist/adaptive/index.js +2 -0
- package/dist/alert/index.js +3 -0
- package/dist/analyzer/index.js +6 -0
- package/dist/announcement/index.js +6 -0
- package/dist/audio-player/index.js +3 -0
- package/dist/avatar/index.js +3 -0
- package/dist/avatar-group/index.js +3 -0
- package/dist/badge/index.js +5 -0
- package/dist/banner/index.js +2 -0
- package/dist/board/index.js +7 -0
- package/dist/button/index.js +5 -0
- package/dist/camera-permission/index.js +13 -0
- package/dist/capture-result/index.js +18 -0
- package/dist/card/index.js +4 -0
- package/dist/card-form/index.js +10 -0
- package/dist/carousel/index.js +2 -0
- package/dist/chart/index.js +6 -0
- package/dist/charts/index.js +7 -0
- package/dist/checkbox/index.js +7 -0
- package/dist/checklist/index.js +10 -0
- package/dist/checkout/index.js +13 -0
- package/dist/chip/index.js +7 -0
- package/dist/chunk-223Q2T2Q.js +229 -0
- package/dist/chunk-2A5NIQAK.js +254 -0
- package/dist/chunk-2GK6PHGE.js +363 -0
- package/dist/chunk-2WUTXHMU.js +1 -0
- package/dist/chunk-2ZZ7TDJ4.js +324 -0
- package/dist/chunk-35OFI3JG.js +499 -0
- package/dist/chunk-3ARE4TES.js +195 -0
- package/dist/chunk-3ECPOSKO.js +1 -0
- package/dist/chunk-3ENTMPQY.js +229 -0
- package/dist/chunk-3HJH6FF4.js +98 -0
- package/dist/chunk-3NMD74ZU.js +4 -0
- package/dist/chunk-3WPW4KUN.js +182 -0
- package/dist/chunk-423B7SPN.js +993 -0
- package/dist/chunk-47FWHGUN.js +394 -0
- package/dist/chunk-4BXMXBJO.js +141 -0
- package/dist/chunk-4DS5ZWVC.js +83 -0
- package/dist/chunk-4GBOGOTV.js +295 -0
- package/dist/chunk-4SZYY6AN.js +99 -0
- package/dist/chunk-4YIP3CWS.js +237 -0
- package/dist/chunk-4YQOR7JM.js +204 -0
- package/dist/chunk-4ZAHCY44.js +177 -0
- package/dist/chunk-52X2VYTD.js +228 -0
- package/dist/chunk-5P26LBDL.js +1 -0
- package/dist/chunk-5XLRYDAX.js +1 -0
- package/dist/chunk-5YNTNN5A.js +177 -0
- package/dist/chunk-6HT2LP62.js +504 -0
- package/dist/chunk-6N33LFQA.js +35 -0
- package/dist/chunk-6X6PQ443.js +432 -0
- package/dist/chunk-7CFF4HXS.js +126 -0
- package/dist/chunk-7O2FMUPT.js +755 -0
- package/dist/chunk-AI4DWZCD.js +162 -0
- package/dist/chunk-AWJOCGFZ.js +213 -0
- package/dist/chunk-AZRX6SAC.js +285 -0
- package/dist/chunk-B54QE2FN.js +1 -0
- package/dist/chunk-BC475SJH.js +1 -0
- package/dist/chunk-BEDBFJND.js +202 -0
- package/dist/chunk-BTTFCMKG.js +166 -0
- package/dist/chunk-BV3B2HYZ.js +1635 -0
- package/dist/chunk-C2NTXVWM.js +98 -0
- package/dist/chunk-CDRZHT42.js +424 -0
- package/dist/chunk-CJ5EOYZE.js +62 -0
- package/dist/chunk-CUMUNPXY.js +128 -0
- package/dist/chunk-CUS3ZSCU.js +1 -0
- package/dist/chunk-CYRBHQQZ.js +411 -0
- package/dist/chunk-DHWADYZX.js +144 -0
- package/dist/chunk-DKCSPATL.js +1 -0
- package/dist/chunk-DM5QUKKO.js +326 -0
- package/dist/chunk-DYBH2I6W.js +1 -0
- package/dist/chunk-DZ255O2F.js +1 -0
- package/dist/chunk-E35BPSGW.js +1 -0
- package/dist/chunk-EJBDRVIH.js +166 -0
- package/dist/chunk-F43NP42L.js +1 -0
- package/dist/chunk-F5XNPWS7.js +1024 -0
- package/dist/chunk-FMYDDECK.js +1521 -0
- package/dist/chunk-G3HOYSF7.js +1 -0
- package/dist/chunk-GDKZTW34.js +395 -0
- package/dist/chunk-GL7B2DOW.js +134 -0
- package/dist/chunk-GNNJ4GCC.js +471 -0
- package/dist/chunk-GNZ56EUI.js +1 -0
- package/dist/chunk-H6NIOQHK.js +346 -0
- package/dist/chunk-H6PC7RDA.js +1 -0
- package/dist/chunk-HET4LLMX.js +129 -0
- package/dist/chunk-HPPW424V.js +334 -0
- package/dist/chunk-HQOQIBJI.js +1 -0
- package/dist/chunk-HU2EQNRZ.js +44 -0
- package/dist/chunk-HZ6CNMAF.js +870 -0
- package/dist/chunk-IIQTAY3J.js +715 -0
- package/dist/chunk-ITTYJZWX.js +271 -0
- package/dist/chunk-IVNRBPGC.js +1018 -0
- package/dist/chunk-J4KLDGI4.js +1 -0
- package/dist/chunk-J7Q7VCVC.js +254 -0
- package/dist/chunk-JDEOITQ2.js +1 -0
- package/dist/chunk-JNH2TYIN.js +96 -0
- package/dist/chunk-JNY4ZHAR.js +634 -0
- package/dist/chunk-JRLTGLN4.js +1 -0
- package/dist/chunk-JTRJJLKL.js +1 -0
- package/dist/chunk-JUAMLEHX.js +379 -0
- package/dist/chunk-JXJB2X6M.js +131 -0
- package/dist/chunk-KMI5ML5I.js +262 -0
- package/dist/chunk-KTAC4MGE.js +4 -0
- package/dist/chunk-LAECSR4H.js +178 -0
- package/dist/chunk-LK4BCSGX.js +1 -0
- package/dist/chunk-LOE5YNN3.js +470 -0
- package/dist/chunk-LRJNDEIA.js +302 -0
- package/dist/chunk-LSS54GLJ.js +116 -0
- package/dist/chunk-LZLHELAG.js +137 -0
- package/dist/chunk-M2LUXGKZ.js +1 -0
- package/dist/chunk-MOUJOP55.js +425 -0
- package/dist/chunk-N32RGOA5.js +159 -0
- package/dist/chunk-N5ZNE2YE.js +1 -0
- package/dist/chunk-NBNCBML6.js +1 -0
- package/dist/chunk-NKB7BZYK.js +167 -0
- package/dist/chunk-NQYBUO3K.js +1795 -0
- package/dist/chunk-NY2U3PBI.js +59 -0
- package/dist/chunk-O4AEHWII.js +464 -0
- package/dist/chunk-O7AE6DAF.js +146 -0
- package/dist/chunk-OETCUXQP.js +134 -0
- package/dist/chunk-OOPPQH27.js +179 -0
- package/dist/chunk-OPXFZ4Y5.js +204 -0
- package/dist/chunk-P23EQNRQ.js +338 -0
- package/dist/chunk-PJXUJYS6.js +248 -0
- package/dist/chunk-PNWUWOBF.js +1 -0
- package/dist/chunk-PUPM2YGF.js +376 -0
- package/dist/chunk-PZXZJBMP.js +620 -0
- package/dist/chunk-Q72LJOVE.js +169 -0
- package/dist/chunk-QCDXZBC5.js +247 -0
- package/dist/chunk-QDYDBCFP.js +197 -0
- package/dist/chunk-QJJ6MADV.js +274 -0
- package/dist/chunk-QKXCPTFS.js +349 -0
- package/dist/chunk-QWCMU5B2.js +860 -0
- package/dist/chunk-RIBDXGUG.js +108 -0
- package/dist/chunk-RJQOOHT2.js +214 -0
- package/dist/chunk-RNGLIHFA.js +191 -0
- package/dist/chunk-RQ3HASCC.js +6 -0
- package/dist/chunk-RSOJT5YW.js +124 -0
- package/dist/chunk-RTIKSY6A.js +1 -0
- package/dist/chunk-RUZHTGKB.js +237 -0
- package/dist/chunk-RW6ZL2FQ.js +284 -0
- package/dist/chunk-S7F6XLTK.js +540 -0
- package/dist/chunk-SBMNWWBV.js +155 -0
- package/dist/chunk-SDTQPRRB.js +1 -0
- package/dist/chunk-SYNOJOQO.js +377 -0
- package/dist/chunk-T753XT36.js +1 -0
- package/dist/chunk-TKQYWZ5V.js +196 -0
- package/dist/chunk-TKVFVF5D.js +95 -0
- package/dist/chunk-TOXAGRDQ.js +144 -0
- package/dist/chunk-TUTI5HOZ.js +112 -0
- package/dist/chunk-U7TFM2JA.js +140 -0
- package/dist/chunk-UC2WGUP3.js +627 -0
- package/dist/chunk-UWFLYMAR.js +1126 -0
- package/dist/chunk-UWSZB7BJ.js +1 -0
- package/dist/chunk-UYG5L34B.js +87 -0
- package/dist/chunk-VBOXAEPI.js +336 -0
- package/dist/chunk-VCDBXW5H.js +188 -0
- package/dist/chunk-VCXPHHDS.js +1 -0
- package/dist/chunk-VEAYTRPX.js +414 -0
- package/dist/chunk-VFCUIDRT.js +1 -0
- package/dist/chunk-VQHPQEUH.js +273 -0
- package/dist/chunk-VXDZFJGP.js +874 -0
- package/dist/chunk-WS56BL3D.js +1 -0
- package/dist/chunk-WSW6ZFAQ.js +98 -0
- package/dist/chunk-XNUVB5OL.js +375 -0
- package/dist/chunk-XOSCY2CW.js +242 -0
- package/dist/chunk-XXXEFXY5.js +99 -0
- package/dist/chunk-Y5CSSPV4.js +1 -0
- package/dist/chunk-Y6DU4J47.js +1 -0
- package/dist/chunk-YC6WORFL.js +535 -0
- package/dist/chunk-YDGVJETP.js +60 -0
- package/dist/chunk-YF4NSSMT.js +366 -0
- package/dist/chunk-YG3ZJHGU.js +223 -0
- package/dist/chunk-YIJ55TBC.js +1 -0
- package/dist/chunk-YKZ4RZZF.js +1 -0
- package/dist/chunk-YLLCXTMC.js +37 -0
- package/dist/chunk-YTA74UZR.js +1 -0
- package/dist/chunk-YTFKPRUK.js +845 -0
- package/dist/chunk-Z7H7VSFZ.js +323 -0
- package/dist/chunk-ZK2H4O5P.js +1 -0
- package/dist/chunk-ZVFE5QGU.js +524 -0
- package/dist/coachmark/index.js +4 -0
- package/dist/code-block/index.js +4 -0
- package/dist/color-field/index.js +7 -0
- package/dist/commerce/index.js +20 -0
- package/dist/connectivity/index.js +2 -0
- package/dist/context-menu/index.js +5 -0
- package/dist/copy-button/index.js +3 -0
- package/dist/data-grid/index.js +24 -0
- package/dist/date-range-picker/index.js +13 -0
- package/dist/description-list/index.js +2 -0
- package/dist/dialog/index.js +3 -0
- package/dist/empty-state/index.js +3 -0
- package/dist/error-summary/index.js +3 -0
- package/dist/fab/index.js +2 -0
- package/dist/file-upload/index.js +9 -0
- package/dist/filter-bar/index.js +8 -0
- package/dist/flow-run/index.js +14 -0
- package/dist/form/index.js +3 -0
- package/dist/gallery/index.js +2 -0
- package/dist/header/index.js +5 -0
- package/dist/hold-to-confirm/index.js +4 -0
- package/dist/index.d.ts +22883 -0
- package/dist/index.js +158 -0
- package/dist/infinite-list/index.js +2 -0
- package/dist/inline-edit/index.js +5 -0
- package/dist/input/index.js +5 -0
- package/dist/interactions/index.js +2 -0
- package/dist/invoice/index.js +10 -0
- package/dist/kbd/index.js +1 -0
- package/dist/keyboard/index.js +3 -0
- package/dist/list-row/index.js +7 -0
- package/dist/log-viewer/index.js +2 -0
- package/dist/map-view/index.js +3 -0
- package/dist/markdown/index.js +6 -0
- package/dist/metric/index.js +4 -0
- package/dist/money/index.js +3 -0
- package/dist/nav-drawer/index.js +2 -0
- package/dist/navigation/index.js +2 -0
- package/dist/notification-center/index.js +16 -0
- package/dist/number-roll/index.js +3 -0
- package/dist/one-handed/index.js +5 -0
- package/dist/os-surfaces/index.js +3 -0
- package/dist/otp/index.js +7 -0
- package/dist/page-header/index.js +1 -0
- package/dist/payment-method/index.js +12 -0
- package/dist/payment-status/index.js +16 -0
- package/dist/permission/index.js +2 -0
- package/dist/picker/index.js +7 -0
- package/dist/progress/index.js +5 -0
- package/dist/pull-to-refresh/index.js +4 -0
- package/dist/radio-group/index.js +6 -0
- package/dist/rating/index.js +2 -0
- package/dist/receivables/index.js +20 -0
- package/dist/refund/index.js +16 -0
- package/dist/save-status/index.js +3 -0
- package/dist/scroll-area/index.js +1 -0
- package/dist/search-bar/index.js +5 -0
- package/dist/segmented-control/index.js +5 -0
- package/dist/sheet/index.js +4 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/slider/index.js +5 -0
- package/dist/spinner/index.js +2 -0
- package/dist/split-button/index.js +7 -0
- package/dist/spotlight/index.js +2 -0
- package/dist/stage-timeline/index.js +4 -0
- package/dist/status-dot/index.js +2 -0
- package/dist/stepper/index.js +6 -0
- package/dist/streaming-text/index.js +3 -0
- package/dist/survey/index.js +19 -0
- package/dist/switch/index.js +5 -0
- package/dist/system-state/index.js +4 -0
- package/dist/tab-bar/index.js +2 -0
- package/dist/tabs/index.js +2 -0
- package/dist/textarea/index.js +6 -0
- package/dist/thinking/index.js +2 -0
- package/dist/timeline/index.js +4 -0
- package/dist/toast/index.js +2 -0
- package/dist/toolbar/index.js +2 -0
- package/dist/tour/index.js +11 -0
- package/dist/truncation-notice/index.js +2 -0
- package/dist/update-notice/index.js +11 -0
- package/dist/video-player/index.js +2 -0
- package/dist/viewfinder/index.js +5 -0
- package/dist/widget/index.js +4 -0
- package/dist/wizard/index.js +6 -0
- package/package.json +76 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { useThinkingPulse } from './chunk-XXXEFXY5.js';
|
|
2
|
+
import { NODE_STATE_WORD, NODE_STATE_ICON, NODE_STATE_SHAPE } from './chunk-YLLCXTMC.js';
|
|
3
|
+
import { Icon } from './chunk-TKVFVF5D.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { View, Text, ScrollView, Animated, Easing } from 'react-native';
|
|
6
|
+
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var NODE_BOX = { sm: 28, md: 36, lg: 44 };
|
|
10
|
+
var NODE_ICON = { sm: 14, md: 18, lg: 22 };
|
|
11
|
+
function StageNode({
|
|
12
|
+
state,
|
|
13
|
+
size,
|
|
14
|
+
pulse
|
|
15
|
+
}) {
|
|
16
|
+
const { styles } = useStyles(sheet, { state });
|
|
17
|
+
const theme = useLoamTheme();
|
|
18
|
+
const box = NODE_BOX[size];
|
|
19
|
+
const pulseStyle = useThinkingPulse(pulse);
|
|
20
|
+
const glyphColor = state === "pending" ? theme.color.text3 : theme.status[state];
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
Animated.View,
|
|
23
|
+
{
|
|
24
|
+
style: [
|
|
25
|
+
styles.node,
|
|
26
|
+
{ width: box, height: box, borderRadius: shapeRadius(state, theme.radius.full) },
|
|
27
|
+
pulseStyle
|
|
28
|
+
],
|
|
29
|
+
children: /* @__PURE__ */ jsx(Icon, { name: NODE_STATE_ICON[state], size: NODE_ICON[size], color: glyphColor })
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function shapeRadius(state, full) {
|
|
34
|
+
return NODE_STATE_SHAPE[state] === "round" ? full : 8;
|
|
35
|
+
}
|
|
36
|
+
function Connector({
|
|
37
|
+
from,
|
|
38
|
+
orientation,
|
|
39
|
+
motion
|
|
40
|
+
}) {
|
|
41
|
+
const { styles } = useStyles(sheet);
|
|
42
|
+
const theme = useLoamTheme();
|
|
43
|
+
const horizontal = orientation === "horizontal";
|
|
44
|
+
const completed = from === "done";
|
|
45
|
+
const animate = motion === "full" && completed && !theme.reduceMotion;
|
|
46
|
+
const grow = React.useRef(new Animated.Value(animate ? 0 : 1)).current;
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
if (!animate) {
|
|
49
|
+
grow.setValue(completed ? 1 : 0);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const anim = Animated.timing(grow, {
|
|
53
|
+
toValue: 1,
|
|
54
|
+
duration: theme.motion.expand.duration,
|
|
55
|
+
easing: Easing.bezier(...theme.motion.expand.easing),
|
|
56
|
+
useNativeDriver: true
|
|
57
|
+
});
|
|
58
|
+
anim.start();
|
|
59
|
+
return () => anim.stop();
|
|
60
|
+
}, [animate, completed, grow, theme.motion.expand.duration, theme.motion.expand.easing]);
|
|
61
|
+
const fillStyle = horizontal ? { transform: [{ scaleX: completed ? grow : 0 }] } : { transform: [{ scaleY: completed ? grow : 0 }] };
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
View,
|
|
64
|
+
{
|
|
65
|
+
accessibilityElementsHidden: true,
|
|
66
|
+
importantForAccessibility: "no-hide-descendants",
|
|
67
|
+
style: horizontal ? styles.trackH : styles.trackV,
|
|
68
|
+
children: /* @__PURE__ */ jsx(
|
|
69
|
+
Animated.View,
|
|
70
|
+
{
|
|
71
|
+
style: [
|
|
72
|
+
horizontal ? styles.fillH : styles.fillV,
|
|
73
|
+
{ backgroundColor: theme.color.accent },
|
|
74
|
+
fillStyle
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function StageTimeline({
|
|
82
|
+
stages,
|
|
83
|
+
orientation = "horizontal",
|
|
84
|
+
size = "md",
|
|
85
|
+
motion = "full",
|
|
86
|
+
style,
|
|
87
|
+
testID
|
|
88
|
+
}) {
|
|
89
|
+
const { styles } = useStyles(sheet, { size });
|
|
90
|
+
const theme = useLoamTheme();
|
|
91
|
+
const horizontal = orientation === "horizontal";
|
|
92
|
+
const lastIndex = stages.length - 1;
|
|
93
|
+
const pulseOn = motion === "full" && !theme.reduceMotion;
|
|
94
|
+
const items = stages.map((stage, index) => {
|
|
95
|
+
const isWorking = stage.state === "working";
|
|
96
|
+
const name = `${stage.label}: ${NODE_STATE_WORD[stage.state]}`;
|
|
97
|
+
const next = stages[index + 1];
|
|
98
|
+
const showConnector = index < lastIndex && next !== void 0;
|
|
99
|
+
const currentAttr = isWorking ? { "aria-current": "step" } : {};
|
|
100
|
+
if (horizontal) {
|
|
101
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
102
|
+
/* @__PURE__ */ jsxs(
|
|
103
|
+
View,
|
|
104
|
+
{
|
|
105
|
+
role: "listitem",
|
|
106
|
+
accessibilityRole: "text",
|
|
107
|
+
accessibilityLabel: name,
|
|
108
|
+
"aria-label": name,
|
|
109
|
+
...currentAttr,
|
|
110
|
+
style: styles.stageH,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ jsx(StageNode, { state: stage.state, size, pulse: isWorking && pulseOn }),
|
|
113
|
+
/* @__PURE__ */ jsx(Text, { style: styles.label, numberOfLines: 2, children: stage.label }),
|
|
114
|
+
stage.detail ? /* @__PURE__ */ jsx(Text, { style: styles.detail, numberOfLines: 1, children: stage.detail }) : null
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
showConnector ? /* @__PURE__ */ jsx(Connector, { from: stage.state, orientation, motion }) : null
|
|
119
|
+
] }, stage.id);
|
|
120
|
+
}
|
|
121
|
+
return /* @__PURE__ */ jsxs(
|
|
122
|
+
View,
|
|
123
|
+
{
|
|
124
|
+
role: "listitem",
|
|
125
|
+
accessibilityRole: "text",
|
|
126
|
+
accessibilityLabel: name,
|
|
127
|
+
"aria-label": name,
|
|
128
|
+
...currentAttr,
|
|
129
|
+
style: styles.stageV,
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ jsxs(View, { style: styles.railV, children: [
|
|
132
|
+
/* @__PURE__ */ jsx(StageNode, { state: stage.state, size, pulse: isWorking && pulseOn }),
|
|
133
|
+
showConnector ? /* @__PURE__ */ jsx(Connector, { from: stage.state, orientation, motion }) : null
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.textV, showConnector && { paddingBottom: theme.space.s5 }], children: [
|
|
136
|
+
/* @__PURE__ */ jsx(Text, { style: styles.label, children: stage.label }),
|
|
137
|
+
stage.detail ? /* @__PURE__ */ jsx(Text, { style: styles.detail, children: stage.detail }) : null
|
|
138
|
+
] })
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
stage.id
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
if (horizontal) {
|
|
145
|
+
return /* @__PURE__ */ jsx(
|
|
146
|
+
ScrollView,
|
|
147
|
+
{
|
|
148
|
+
horizontal: true,
|
|
149
|
+
showsHorizontalScrollIndicator: false,
|
|
150
|
+
focusable: true,
|
|
151
|
+
role: "list",
|
|
152
|
+
accessibilityRole: "list",
|
|
153
|
+
testID,
|
|
154
|
+
contentContainerStyle: styles.rowH,
|
|
155
|
+
style,
|
|
156
|
+
children: items
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
return /* @__PURE__ */ jsx(View, { role: "list", accessibilityRole: "list", testID, style: [styles.colV, style], children: items });
|
|
161
|
+
}
|
|
162
|
+
var sheet = createStyleSheet((theme) => ({
|
|
163
|
+
rowH: { flexDirection: "row", alignItems: "flex-start" },
|
|
164
|
+
colV: { flexDirection: "column", alignSelf: "flex-start" },
|
|
165
|
+
stageH: {
|
|
166
|
+
alignItems: "center",
|
|
167
|
+
paddingHorizontal: theme.space.s2,
|
|
168
|
+
gap: theme.space.s2,
|
|
169
|
+
// A stable column width so labels line up and the row scrolls predictably.
|
|
170
|
+
variants: {
|
|
171
|
+
size: {
|
|
172
|
+
sm: { width: theme.space[84] },
|
|
173
|
+
md: { width: theme.space[96] },
|
|
174
|
+
lg: { width: theme.space[112] }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
stageV: { flexDirection: "row", alignItems: "stretch", gap: theme.space.s3 },
|
|
179
|
+
railV: { alignItems: "center" },
|
|
180
|
+
textV: { flexShrink: 1, gap: theme.space.s1, paddingTop: theme.space[2] },
|
|
181
|
+
// The node ring: the soft tint fill + full-tone border. The border tone is
|
|
182
|
+
// per-state (below); the soft fill likewise. Shape (radius) is set inline.
|
|
183
|
+
node: {
|
|
184
|
+
alignItems: "center",
|
|
185
|
+
justifyContent: "center",
|
|
186
|
+
borderWidth: theme.borderWidth.thick,
|
|
187
|
+
variants: {
|
|
188
|
+
state: {
|
|
189
|
+
working: {
|
|
190
|
+
backgroundColor: theme.status.workingSoft,
|
|
191
|
+
borderColor: theme.status.working
|
|
192
|
+
},
|
|
193
|
+
waiting: {
|
|
194
|
+
backgroundColor: theme.status.waitingSoft,
|
|
195
|
+
borderColor: theme.status.waiting
|
|
196
|
+
},
|
|
197
|
+
done: { backgroundColor: theme.status.doneSoft, borderColor: theme.status.done },
|
|
198
|
+
crashed: {
|
|
199
|
+
backgroundColor: theme.status.crashedSoft,
|
|
200
|
+
borderColor: theme.status.crashed
|
|
201
|
+
},
|
|
202
|
+
conflict: {
|
|
203
|
+
backgroundColor: theme.status.conflictSoft,
|
|
204
|
+
borderColor: theme.status.conflict
|
|
205
|
+
},
|
|
206
|
+
pending: {
|
|
207
|
+
backgroundColor: theme.color.surface2,
|
|
208
|
+
borderColor: theme.color.borderStrong
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
label: {
|
|
214
|
+
fontFamily: theme.font.sans,
|
|
215
|
+
fontWeight: theme.fontWeight.semibold,
|
|
216
|
+
color: theme.color.text,
|
|
217
|
+
fontSize: theme.type.footnote.fontSize,
|
|
218
|
+
lineHeight: theme.type.footnote.lineHeight,
|
|
219
|
+
letterSpacing: theme.type.footnote.letterSpacing
|
|
220
|
+
},
|
|
221
|
+
detail: {
|
|
222
|
+
fontFamily: theme.font.sans,
|
|
223
|
+
color: theme.color.text2,
|
|
224
|
+
fontSize: theme.type.caption1.fontSize,
|
|
225
|
+
lineHeight: theme.type.caption1.lineHeight,
|
|
226
|
+
letterSpacing: theme.type.caption1.letterSpacing
|
|
227
|
+
},
|
|
228
|
+
// Connector track (muted) + fill (accent, scaled). Horizontal aligns to the
|
|
229
|
+
// node centre via a top margin (½ of the md node box − ½ rail); vertical runs
|
|
230
|
+
// down the rail column and stretches to the next node.
|
|
231
|
+
trackH: {
|
|
232
|
+
height: theme.space[2],
|
|
233
|
+
minWidth: theme.space[40],
|
|
234
|
+
flexShrink: 1,
|
|
235
|
+
marginTop: theme.space[17],
|
|
236
|
+
marginHorizontal: theme.space.s1,
|
|
237
|
+
borderRadius: theme.radius[2],
|
|
238
|
+
backgroundColor: theme.color.borderStrong,
|
|
239
|
+
overflow: "hidden"
|
|
240
|
+
},
|
|
241
|
+
trackV: {
|
|
242
|
+
width: theme.space[2],
|
|
243
|
+
minHeight: theme.space[24],
|
|
244
|
+
flex: 1,
|
|
245
|
+
marginVertical: theme.space.s1,
|
|
246
|
+
borderRadius: theme.radius[2],
|
|
247
|
+
backgroundColor: theme.color.borderStrong,
|
|
248
|
+
overflow: "hidden"
|
|
249
|
+
},
|
|
250
|
+
fillH: { height: "100%", width: "100%", transformOrigin: "left" },
|
|
251
|
+
fillV: { height: "100%", width: "100%", transformOrigin: "top" }
|
|
252
|
+
}));
|
|
253
|
+
|
|
254
|
+
export { StageTimeline };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Icon } from './chunk-TKVFVF5D.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { ScrollView, Pressable, View } from 'react-native';
|
|
4
|
+
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Toolbar({
|
|
8
|
+
children,
|
|
9
|
+
accessibilityLabel,
|
|
10
|
+
overflow = "wrap",
|
|
11
|
+
density = "comfortable",
|
|
12
|
+
justify = "start",
|
|
13
|
+
onMorePress
|
|
14
|
+
}) {
|
|
15
|
+
const { styles } = useStyles(sheet, { density, justify });
|
|
16
|
+
const theme = useLoamTheme();
|
|
17
|
+
if (overflow === "scroll" || overflow === "menu") {
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
ScrollView,
|
|
20
|
+
{
|
|
21
|
+
horizontal: true,
|
|
22
|
+
showsHorizontalScrollIndicator: false,
|
|
23
|
+
accessibilityRole: "toolbar",
|
|
24
|
+
accessibilityLabel,
|
|
25
|
+
style: styles.scrollRoot,
|
|
26
|
+
contentContainerStyle: styles.scrollContent,
|
|
27
|
+
children: [
|
|
28
|
+
children,
|
|
29
|
+
overflow === "menu" ? /* @__PURE__ */ jsx(
|
|
30
|
+
Pressable,
|
|
31
|
+
{
|
|
32
|
+
accessibilityRole: "button",
|
|
33
|
+
accessibilityLabel: "More",
|
|
34
|
+
onPress: onMorePress,
|
|
35
|
+
hitSlop: 8,
|
|
36
|
+
style: styles.more,
|
|
37
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", size: theme.icon.md, color: theme.color.text })
|
|
38
|
+
}
|
|
39
|
+
) : null
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ jsx(View, { accessibilityRole: "toolbar", accessibilityLabel, style: styles.wrapRoot, children });
|
|
45
|
+
}
|
|
46
|
+
var sheet = createStyleSheet((theme) => ({
|
|
47
|
+
// A wrapping row. `toolbarH` sets the resting height of a single-line strip;
|
|
48
|
+
// extra lines grow it naturally.
|
|
49
|
+
wrapRoot: {
|
|
50
|
+
flexDirection: "row",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
flexWrap: "wrap",
|
|
53
|
+
minHeight: theme.layout.toolbarH,
|
|
54
|
+
paddingHorizontal: theme.space.s1,
|
|
55
|
+
variants: {
|
|
56
|
+
density: {
|
|
57
|
+
comfortable: { gap: theme.space.s2, paddingVertical: theme.space.s1 },
|
|
58
|
+
compact: { gap: theme.space.s1, paddingVertical: 0 }
|
|
59
|
+
},
|
|
60
|
+
justify: {
|
|
61
|
+
start: { justifyContent: "flex-start" },
|
|
62
|
+
between: { justifyContent: "space-between" }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
// The scroll container itself must not grow to fill its parent's cross axis,
|
|
67
|
+
// so `flexGrow: 0` keeps it toolbar-height.
|
|
68
|
+
scrollRoot: {
|
|
69
|
+
minHeight: theme.layout.toolbarH,
|
|
70
|
+
flexGrow: 0
|
|
71
|
+
},
|
|
72
|
+
// `justify` has no meaning on a horizontally-scrolling content row (it sizes
|
|
73
|
+
// to its content), so this style intentionally omits that variant group.
|
|
74
|
+
scrollContent: {
|
|
75
|
+
flexDirection: "row",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
paddingHorizontal: theme.space.s1,
|
|
78
|
+
variants: {
|
|
79
|
+
density: {
|
|
80
|
+
comfortable: { gap: theme.space.s2 },
|
|
81
|
+
compact: { gap: theme.space.s1 }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
// The trailing "More" affordance for `overflow="menu"`. A real ≥44pt target
|
|
86
|
+
// (`tapMin`), squared off.
|
|
87
|
+
more: {
|
|
88
|
+
minWidth: theme.tapMin,
|
|
89
|
+
minHeight: theme.tapMin,
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
justifyContent: "center",
|
|
92
|
+
borderRadius: theme.radius.md
|
|
93
|
+
}
|
|
94
|
+
}));
|
|
95
|
+
|
|
96
|
+
export { Toolbar };
|