@buoy-gg/shared-ui 7.0.25 → 7.0.27
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/lib/commonjs/JsModal.js +156 -20
- package/lib/commonjs/JsModal.web.js +85 -39
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +14 -4
- package/lib/commonjs/dataViewer/diffThemes.js +20 -18
- package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +8 -8
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/icons/lucide-icons.js +74 -15
- package/lib/commonjs/index.js +86 -0
- package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +248 -74
- package/lib/commonjs/ui/backgrounds/README.md +102 -20
- package/lib/commonjs/ui/backgrounds/backgroundStore.js +20 -6
- package/lib/commonjs/ui/backgrounds/index.js +91 -1
- package/lib/commonjs/ui/backgrounds/primitives.js +50 -14
- package/lib/commonjs/ui/backgrounds/registry.js +41 -64
- package/lib/commonjs/ui/backgrounds/rng.js +21 -0
- package/lib/commonjs/ui/backgrounds/skyClock.js +45 -0
- package/lib/commonjs/ui/backgrounds/variants/daylight.js +453 -0
- package/lib/commonjs/ui/backgrounds/variants/deepField.js +60 -30
- package/lib/commonjs/ui/backgrounds/variants/hyperspace.js +218 -0
- package/lib/commonjs/ui/backgrounds/variants/liveSky.js +898 -0
- package/lib/commonjs/ui/backgrounds/variants/meteors.js +257 -0
- package/lib/commonjs/ui/backgrounds/variants/moonlight.js +472 -0
- package/lib/commonjs/ui/backgrounds/variants/underwater.js +757 -0
- package/lib/commonjs/ui/components/Badge.js +11 -10
- package/lib/commonjs/ui/components/CompactRow.js +30 -17
- package/lib/commonjs/ui/components/DevToolsCard.js +12 -8
- package/lib/commonjs/ui/components/DynamicFilterView.js +43 -41
- package/lib/commonjs/ui/components/EventStepperFooter.js +38 -10
- package/lib/commonjs/ui/components/FilterComponents.js +11 -11
- package/lib/commonjs/ui/components/ModalHeader.js +13 -13
- package/lib/commonjs/ui/components/SectionHeader.js +3 -1
- package/lib/commonjs/ui/components/StorageTypeBadge.js +3 -2
- package/lib/commonjs/ui/components/TabSelector.js +56 -38
- package/lib/commonjs/ui/components/ValueTypeBadge.js +7 -6
- package/lib/commonjs/ui/components/WindowControls.js +37 -10
- package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +8 -0
- package/lib/commonjs/ui/night/nightTheme.js +120 -0
- package/lib/commonjs/ui/night/primitives.js +498 -0
- package/lib/module/JsModal.js +156 -20
- package/lib/module/JsModal.web.js +83 -39
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +14 -4
- package/lib/module/dataViewer/diffThemes.js +20 -18
- package/lib/module/dataViewer/tree/TreeDiffViewer.js +9 -9
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/icons/lucide-icons.js +74 -15
- package/lib/module/index.js +4 -0
- package/lib/module/ui/backgrounds/BackgroundSwitcher.js +250 -76
- package/lib/module/ui/backgrounds/README.md +102 -20
- package/lib/module/ui/backgrounds/backgroundStore.js +19 -5
- package/lib/module/ui/backgrounds/index.js +11 -2
- package/lib/module/ui/backgrounds/primitives.js +53 -16
- package/lib/module/ui/backgrounds/registry.js +41 -64
- package/lib/module/ui/backgrounds/rng.js +20 -0
- package/lib/module/ui/backgrounds/skyClock.js +39 -0
- package/lib/module/ui/backgrounds/variants/daylight.js +449 -0
- package/lib/module/ui/backgrounds/variants/deepField.js +62 -31
- package/lib/module/ui/backgrounds/variants/hyperspace.js +214 -0
- package/lib/module/ui/backgrounds/variants/liveSky.js +893 -0
- package/lib/module/ui/backgrounds/variants/meteors.js +253 -0
- package/lib/module/ui/backgrounds/variants/moonlight.js +468 -0
- package/lib/module/ui/backgrounds/variants/underwater.js +753 -0
- package/lib/module/ui/components/Badge.js +11 -10
- package/lib/module/ui/components/CompactRow.js +30 -17
- package/lib/module/ui/components/DevToolsCard.js +12 -8
- package/lib/module/ui/components/DynamicFilterView.js +43 -41
- package/lib/module/ui/components/EventStepperFooter.js +38 -10
- package/lib/module/ui/components/FilterComponents.js +11 -11
- package/lib/module/ui/components/ModalHeader.js +13 -13
- package/lib/module/ui/components/SectionHeader.js +3 -1
- package/lib/module/ui/components/StorageTypeBadge.js +3 -2
- package/lib/module/ui/components/TabSelector.js +57 -39
- package/lib/module/ui/components/ValueTypeBadge.js +7 -6
- package/lib/module/ui/components/WindowControls.js +37 -10
- package/lib/module/ui/gameUI/constants/gameUIColors.js +8 -0
- package/lib/module/ui/night/nightTheme.js +116 -0
- package/lib/module/ui/night/primitives.js +485 -0
- package/lib/typescript/commonjs/JsModal.d.ts +18 -0
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/JsModal.web.d.ts +13 -0
- package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +3 -1
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts +12 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
- package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +3 -0
- package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +18 -3
- package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +8 -0
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +6 -0
- package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts +17 -0
- package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts +30 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +19 -4
- package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts +39 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts +41 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts +26 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts +35 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts +51 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +2 -0
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +9 -0
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +4 -2
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +8 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +113 -0
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/night/primitives.d.ts +111 -0
- package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -0
- package/lib/typescript/module/JsModal.d.ts +18 -0
- package/lib/typescript/module/JsModal.d.ts.map +1 -1
- package/lib/typescript/module/JsModal.web.d.ts +13 -0
- package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/diffThemes.d.ts +3 -1
- package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts +12 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
- package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +3 -0
- package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/primitives.d.ts +18 -3
- package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/registry.d.ts +8 -0
- package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/rng.d.ts +6 -0
- package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/skyClock.d.ts +17 -0
- package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/types.d.ts +1 -1
- package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts +30 -0
- package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +19 -4
- package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts +39 -0
- package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts +41 -0
- package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts +26 -0
- package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts +35 -0
- package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts +51 -0
- package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +2 -0
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TabSelector.d.ts +9 -0
- package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/WindowControls.d.ts +4 -2
- package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +8 -0
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/module/ui/night/nightTheme.d.ts +113 -0
- package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -0
- package/lib/typescript/module/ui/night/primitives.d.ts +111 -0
- package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -0
- package/package.json +4 -4
- package/lib/commonjs/ui/backgrounds/variants/lattice.js +0 -579
- package/lib/commonjs/ui/backgrounds/variants/starfield.js +0 -210
- package/lib/module/ui/backgrounds/variants/lattice.js +0 -575
- package/lib/module/ui/backgrounds/variants/starfield.js +0 -206
- package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +0 -33
- package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +0 -12
- package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +0 -33
- package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +0 -12
- package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +0 -1
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NightBadge = NightBadge;
|
|
7
|
+
exports.NightButton = NightButton;
|
|
8
|
+
exports.NightCard = NightCard;
|
|
9
|
+
exports.NightChip = NightChip;
|
|
10
|
+
exports.NightFootnote = NightFootnote;
|
|
11
|
+
exports.NightRows = NightRows;
|
|
12
|
+
exports.NightSectionLabel = NightSectionLabel;
|
|
13
|
+
exports.NightSegmented = NightSegmented;
|
|
14
|
+
exports.NightSeparator = NightSeparator;
|
|
15
|
+
exports.NightSwitch = NightSwitch;
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
var _reactNative = require("react-native");
|
|
18
|
+
var _nightTheme = require("./nightTheme.js");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
/**
|
|
21
|
+
* Night primitives — the building blocks of the Everlights-style surface
|
|
22
|
+
* (see ./nightTheme for the tokens and where the look comes from).
|
|
23
|
+
*
|
|
24
|
+
* The shape they compose to:
|
|
25
|
+
*
|
|
26
|
+
* NightSectionLabel STORAGE ← outside the card, uppercase
|
|
27
|
+
* NightCard ┌──────────────────┐
|
|
28
|
+
* NightRows │ row │ ← hairline-separated children
|
|
29
|
+
* │ ──────────── │
|
|
30
|
+
* │ row │
|
|
31
|
+
* └──────────────────┘
|
|
32
|
+
* NightFootnote Settings persist through…
|
|
33
|
+
*
|
|
34
|
+
* Controls: NightSwitch (the Everlights 56×32 toggle), NightChip (zone-style
|
|
35
|
+
* pill), NightButton (primary = filled accent w/ dark ink, everything else on
|
|
36
|
+
* the #1C1C1C plate), NightSegmented (the All/Day control with the accent
|
|
37
|
+
* underline), NightBadge (small status caps).
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/** Uppercase section label that sits ABOVE a NightCard. */
|
|
41
|
+
function NightSectionLabel({
|
|
42
|
+
children,
|
|
43
|
+
style
|
|
44
|
+
}) {
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
46
|
+
style: [styles.sectionLabel, style],
|
|
47
|
+
children: children
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Explanatory line under a NightCard (or above a CTA, `centered`). */
|
|
52
|
+
function NightFootnote({
|
|
53
|
+
children,
|
|
54
|
+
centered,
|
|
55
|
+
tone = "tertiary",
|
|
56
|
+
style
|
|
57
|
+
}) {
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
59
|
+
style: [styles.footnote, tone === "secondary" ? styles.footnoteSecondary : null, tone === "warning" ? styles.footnoteWarning : null, tone === "danger" ? styles.footnoteDanger : null, centered ? styles.footnoteCentered : null, style],
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** A card: `#0C0C0C`, radius 14, hairline border. `padded` = interior 14. */
|
|
65
|
+
function NightCard({
|
|
66
|
+
children,
|
|
67
|
+
padded,
|
|
68
|
+
style
|
|
69
|
+
}) {
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
71
|
+
style: [styles.card, padded ? styles.cardPadded : null, style],
|
|
72
|
+
children: children
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Hairline separator between rows, inset from the left like iOS. */
|
|
77
|
+
function NightSeparator({
|
|
78
|
+
inset = _nightTheme.night.rowPadH
|
|
79
|
+
}) {
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
81
|
+
style: [styles.separator, {
|
|
82
|
+
marginLeft: inset
|
|
83
|
+
}]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Interleaves a hairline between consecutive children so rows never track
|
|
89
|
+
* their own position. Meant to live inside an unpadded NightCard.
|
|
90
|
+
*/
|
|
91
|
+
function NightRows({
|
|
92
|
+
children,
|
|
93
|
+
inset = _nightTheme.night.rowPadH
|
|
94
|
+
}) {
|
|
95
|
+
const rows = _react.Children.toArray(children);
|
|
96
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
97
|
+
children: rows.map((row, index) =>
|
|
98
|
+
/*#__PURE__*/
|
|
99
|
+
// Children.toArray assigns stable synthetic keys for keyed children.
|
|
100
|
+
(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
101
|
+
children: [index > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(NightSeparator, {
|
|
102
|
+
inset: inset
|
|
103
|
+
}) : null, row]
|
|
104
|
+
}, row.key ?? index))
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Everlights toggle geometry, verbatim.
|
|
109
|
+
const TRACK_W = 56;
|
|
110
|
+
const TRACK_H = 32;
|
|
111
|
+
const THUMB = 22;
|
|
112
|
+
const TRACK_PAD = 5;
|
|
113
|
+
const TRAVEL = TRACK_W - THUMB - TRACK_PAD * 2;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The Everlights 56×32 switch. The thumb slides on the native driver; the
|
|
117
|
+
* colors snap with the state change, which reads fine at this size.
|
|
118
|
+
*/
|
|
119
|
+
function NightSwitch({
|
|
120
|
+
value,
|
|
121
|
+
onValueChange,
|
|
122
|
+
disabled
|
|
123
|
+
}) {
|
|
124
|
+
const progress = (0, _react.useRef)(new _reactNative.Animated.Value(value ? 1 : 0)).current;
|
|
125
|
+
(0, _react.useEffect)(() => {
|
|
126
|
+
_reactNative.Animated.timing(progress, {
|
|
127
|
+
toValue: value ? 1 : 0,
|
|
128
|
+
duration: 200,
|
|
129
|
+
useNativeDriver: true
|
|
130
|
+
}).start();
|
|
131
|
+
}, [value, progress]);
|
|
132
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
133
|
+
activeOpacity: 0.8,
|
|
134
|
+
disabled: disabled,
|
|
135
|
+
onPress: () => onValueChange(!value),
|
|
136
|
+
accessibilityRole: "switch",
|
|
137
|
+
accessibilityState: {
|
|
138
|
+
checked: value,
|
|
139
|
+
disabled
|
|
140
|
+
},
|
|
141
|
+
hitSlop: {
|
|
142
|
+
top: 8,
|
|
143
|
+
bottom: 8,
|
|
144
|
+
left: 8,
|
|
145
|
+
right: 8
|
|
146
|
+
},
|
|
147
|
+
style: [styles.switchTrack, value ? styles.switchTrackOn : null, disabled ? styles.switchDisabled : null],
|
|
148
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
149
|
+
style: [styles.switchThumb, value ? styles.switchThumbOn : null, {
|
|
150
|
+
transform: [{
|
|
151
|
+
translateX: progress.interpolate({
|
|
152
|
+
inputRange: [0, 1],
|
|
153
|
+
outputRange: [0, TRAVEL]
|
|
154
|
+
})
|
|
155
|
+
}]
|
|
156
|
+
}]
|
|
157
|
+
})
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Zone-style pill chip. The fill never changes — selection is signaled by the
|
|
163
|
+
* border and label color only, exactly like the Everlights zone row.
|
|
164
|
+
*/
|
|
165
|
+
function NightChip({
|
|
166
|
+
label,
|
|
167
|
+
selected,
|
|
168
|
+
onPress,
|
|
169
|
+
disabled,
|
|
170
|
+
icon
|
|
171
|
+
}) {
|
|
172
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
173
|
+
activeOpacity: 0.7,
|
|
174
|
+
disabled: disabled || !onPress,
|
|
175
|
+
onPress: onPress,
|
|
176
|
+
style: [styles.chip, selected ? styles.chipSelected : null, disabled ? styles.chipDisabled : null],
|
|
177
|
+
children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
178
|
+
style: [styles.chipText, selected ? styles.chipTextSelected : null],
|
|
179
|
+
children: label
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Everlights button. `primary` fills with the accent and takes DARK ink;
|
|
185
|
+
* every other variant sits on the `#1C1C1C` plate and differs only in label
|
|
186
|
+
* color. `lg` is the fully-rounded 50pt CTA.
|
|
187
|
+
*/
|
|
188
|
+
function NightButton({
|
|
189
|
+
label,
|
|
190
|
+
onPress,
|
|
191
|
+
variant = "secondary",
|
|
192
|
+
size = "lg",
|
|
193
|
+
icon,
|
|
194
|
+
disabled,
|
|
195
|
+
fullWidth = true
|
|
196
|
+
}) {
|
|
197
|
+
const labelColor = variant === "primary" ? _nightTheme.night.color.onAccent : variant === "tertiary" ? _nightTheme.night.color.text : variant === "destructive" ? _nightTheme.night.color.danger : _nightTheme.night.color.accent;
|
|
198
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
199
|
+
activeOpacity: 0.7,
|
|
200
|
+
disabled: disabled,
|
|
201
|
+
onPress: onPress,
|
|
202
|
+
style: [styles.button, size === "md" ? styles.buttonMd : styles.buttonLg, variant === "primary" ? styles.buttonPrimary : variant === "ghost" ? styles.buttonGhost : styles.buttonPlate, fullWidth ? styles.buttonFullWidth : null, disabled ? styles.buttonDisabled : null],
|
|
203
|
+
children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
204
|
+
style: [size === "md" ? styles.buttonTextMd : styles.buttonTextLg, {
|
|
205
|
+
color: labelColor
|
|
206
|
+
}],
|
|
207
|
+
children: label
|
|
208
|
+
})]
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Segmented control: `#050505` track, `#161618` thumb, and the accent
|
|
213
|
+
* underline glow beneath the active label (the Everlights All/Day tabs).
|
|
214
|
+
*
|
|
215
|
+
* THE shared tab control for night-theme tool headers — the dial settings
|
|
216
|
+
* and the network tool both mount this one. `size="sm"` is the compact
|
|
217
|
+
* variant for in-tool headers where the full-height control reads too tall.
|
|
218
|
+
*/
|
|
219
|
+
function NightSegmented({
|
|
220
|
+
tabs,
|
|
221
|
+
activeKey,
|
|
222
|
+
onChange,
|
|
223
|
+
size = "md"
|
|
224
|
+
}) {
|
|
225
|
+
const small = size === "sm";
|
|
226
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
227
|
+
style: styles.segmentTrack,
|
|
228
|
+
children: tabs.map(tab => {
|
|
229
|
+
const active = tab.key === activeKey;
|
|
230
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
231
|
+
activeOpacity: 0.7,
|
|
232
|
+
accessibilityRole: "tab",
|
|
233
|
+
accessibilityState: {
|
|
234
|
+
selected: active
|
|
235
|
+
},
|
|
236
|
+
accessibilityLabel: tab.label,
|
|
237
|
+
onPress: () => onChange(tab.key),
|
|
238
|
+
style: [styles.segment, small ? styles.segmentSm : null, active ? styles.segmentActive : null],
|
|
239
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
240
|
+
style: [styles.segmentText, small ? styles.segmentTextSm : null, active ? styles.segmentTextActive : null],
|
|
241
|
+
children: tab.label
|
|
242
|
+
}), active ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
243
|
+
style: [styles.segmentUnderline, small ? styles.segmentUnderlineSm : null]
|
|
244
|
+
}) : null]
|
|
245
|
+
}, tab.key);
|
|
246
|
+
})
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/** Small uppercase status cap ("FILE SYSTEM", "CONNECTED"). */
|
|
250
|
+
function NightBadge({
|
|
251
|
+
label,
|
|
252
|
+
tone = "neutral"
|
|
253
|
+
}) {
|
|
254
|
+
const fill = tone === "accent" ? styles.badgeAccent : tone === "warning" ? styles.badgeWarning : tone === "danger" ? styles.badgeDanger : tone === "info" ? styles.badgeInfo : styles.badgeNeutral;
|
|
255
|
+
const ink = tone === "accent" ? styles.badgeTextAccent : tone === "warning" ? styles.badgeTextWarning : tone === "danger" ? styles.badgeTextDanger : tone === "info" ? styles.badgeTextInfo : styles.badgeTextNeutral;
|
|
256
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
257
|
+
style: [styles.badge, fill],
|
|
258
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
259
|
+
style: [styles.badgeText, ink],
|
|
260
|
+
children: label
|
|
261
|
+
})
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
const styles = _reactNative.StyleSheet.create({
|
|
265
|
+
sectionLabel: {
|
|
266
|
+
color: _nightTheme.night.color.textSecondary,
|
|
267
|
+
fontSize: _nightTheme.night.font.label,
|
|
268
|
+
fontWeight: "600",
|
|
269
|
+
letterSpacing: _nightTheme.NIGHT_LABEL_TRACKING,
|
|
270
|
+
textTransform: "uppercase",
|
|
271
|
+
marginBottom: 8,
|
|
272
|
+
marginLeft: _nightTheme.night.labelInset
|
|
273
|
+
},
|
|
274
|
+
footnote: {
|
|
275
|
+
color: _nightTheme.night.color.textTertiary,
|
|
276
|
+
fontSize: _nightTheme.night.font.caption,
|
|
277
|
+
fontWeight: "500",
|
|
278
|
+
lineHeight: _nightTheme.night.font.caption * 1.4,
|
|
279
|
+
marginTop: 8,
|
|
280
|
+
marginLeft: _nightTheme.night.labelInset
|
|
281
|
+
},
|
|
282
|
+
footnoteSecondary: {
|
|
283
|
+
color: _nightTheme.night.color.textSecondary
|
|
284
|
+
},
|
|
285
|
+
footnoteWarning: {
|
|
286
|
+
color: _nightTheme.night.color.warning
|
|
287
|
+
},
|
|
288
|
+
footnoteDanger: {
|
|
289
|
+
color: _nightTheme.night.color.danger
|
|
290
|
+
},
|
|
291
|
+
footnoteCentered: {
|
|
292
|
+
textAlign: "center",
|
|
293
|
+
marginLeft: 0
|
|
294
|
+
},
|
|
295
|
+
card: {
|
|
296
|
+
backgroundColor: _nightTheme.night.color.surface,
|
|
297
|
+
borderRadius: _nightTheme.night.radius.card,
|
|
298
|
+
borderWidth: 1,
|
|
299
|
+
borderColor: _nightTheme.night.color.border,
|
|
300
|
+
overflow: "hidden"
|
|
301
|
+
},
|
|
302
|
+
cardPadded: {
|
|
303
|
+
padding: _nightTheme.night.cardPad,
|
|
304
|
+
gap: 10
|
|
305
|
+
},
|
|
306
|
+
separator: {
|
|
307
|
+
height: _reactNative.StyleSheet.hairlineWidth,
|
|
308
|
+
backgroundColor: _nightTheme.night.color.separator
|
|
309
|
+
},
|
|
310
|
+
switchTrack: {
|
|
311
|
+
width: TRACK_W,
|
|
312
|
+
height: TRACK_H,
|
|
313
|
+
borderRadius: TRACK_H / 2,
|
|
314
|
+
borderWidth: 1,
|
|
315
|
+
borderColor: _nightTheme.night.color.fillTertiary,
|
|
316
|
+
backgroundColor: _nightTheme.night.color.surfaceElevated,
|
|
317
|
+
paddingHorizontal: TRACK_PAD,
|
|
318
|
+
justifyContent: "center",
|
|
319
|
+
overflow: "hidden"
|
|
320
|
+
},
|
|
321
|
+
switchTrackOn: {
|
|
322
|
+
backgroundColor: _nightTheme.night.color.accentFill,
|
|
323
|
+
borderColor: _nightTheme.night.color.accentBorderStrong
|
|
324
|
+
},
|
|
325
|
+
switchDisabled: {
|
|
326
|
+
opacity: 0.4
|
|
327
|
+
},
|
|
328
|
+
switchThumb: {
|
|
329
|
+
width: THUMB,
|
|
330
|
+
height: THUMB,
|
|
331
|
+
borderRadius: THUMB / 2,
|
|
332
|
+
backgroundColor: _nightTheme.night.color.knob
|
|
333
|
+
},
|
|
334
|
+
switchThumbOn: {
|
|
335
|
+
backgroundColor: _nightTheme.night.color.accent
|
|
336
|
+
},
|
|
337
|
+
chip: {
|
|
338
|
+
flexDirection: "row",
|
|
339
|
+
alignItems: "center",
|
|
340
|
+
gap: 6,
|
|
341
|
+
paddingHorizontal: 14,
|
|
342
|
+
paddingVertical: 9,
|
|
343
|
+
borderRadius: _nightTheme.night.radius.chip,
|
|
344
|
+
borderWidth: 1.5,
|
|
345
|
+
backgroundColor: _nightTheme.night.color.buttonSurface,
|
|
346
|
+
borderColor: _nightTheme.night.color.fillTertiary
|
|
347
|
+
},
|
|
348
|
+
chipSelected: {
|
|
349
|
+
borderColor: _nightTheme.night.color.accentBorderStrong
|
|
350
|
+
},
|
|
351
|
+
chipDisabled: {
|
|
352
|
+
opacity: 0.4
|
|
353
|
+
},
|
|
354
|
+
chipText: {
|
|
355
|
+
fontSize: _nightTheme.night.font.body,
|
|
356
|
+
fontWeight: "500",
|
|
357
|
+
color: _nightTheme.night.color.textSecondary
|
|
358
|
+
},
|
|
359
|
+
chipTextSelected: {
|
|
360
|
+
color: _nightTheme.night.color.accent
|
|
361
|
+
},
|
|
362
|
+
button: {
|
|
363
|
+
flexDirection: "row",
|
|
364
|
+
alignItems: "center",
|
|
365
|
+
justifyContent: "center",
|
|
366
|
+
gap: 8
|
|
367
|
+
},
|
|
368
|
+
buttonMd: {
|
|
369
|
+
height: 34,
|
|
370
|
+
paddingHorizontal: 16,
|
|
371
|
+
borderRadius: 17
|
|
372
|
+
},
|
|
373
|
+
buttonLg: {
|
|
374
|
+
height: 50,
|
|
375
|
+
paddingHorizontal: 20,
|
|
376
|
+
borderRadius: 25
|
|
377
|
+
},
|
|
378
|
+
buttonPrimary: {
|
|
379
|
+
backgroundColor: _nightTheme.night.color.accent
|
|
380
|
+
},
|
|
381
|
+
buttonPlate: {
|
|
382
|
+
backgroundColor: _nightTheme.night.color.button
|
|
383
|
+
},
|
|
384
|
+
buttonGhost: {
|
|
385
|
+
backgroundColor: "transparent"
|
|
386
|
+
},
|
|
387
|
+
buttonFullWidth: {
|
|
388
|
+
alignSelf: "stretch"
|
|
389
|
+
},
|
|
390
|
+
buttonDisabled: {
|
|
391
|
+
opacity: 0.4
|
|
392
|
+
},
|
|
393
|
+
buttonTextMd: {
|
|
394
|
+
fontSize: 15,
|
|
395
|
+
fontWeight: "600"
|
|
396
|
+
},
|
|
397
|
+
buttonTextLg: {
|
|
398
|
+
fontSize: 17,
|
|
399
|
+
fontWeight: "600"
|
|
400
|
+
},
|
|
401
|
+
segmentTrack: {
|
|
402
|
+
flex: 1,
|
|
403
|
+
flexDirection: "row",
|
|
404
|
+
backgroundColor: _nightTheme.night.color.bg,
|
|
405
|
+
borderRadius: _nightTheme.night.radius.row,
|
|
406
|
+
borderWidth: 1,
|
|
407
|
+
borderColor: _nightTheme.night.color.border,
|
|
408
|
+
padding: 3
|
|
409
|
+
},
|
|
410
|
+
segment: {
|
|
411
|
+
flex: 1,
|
|
412
|
+
paddingVertical: 8,
|
|
413
|
+
alignItems: "center",
|
|
414
|
+
justifyContent: "center",
|
|
415
|
+
borderRadius: _nightTheme.night.radius.segment
|
|
416
|
+
},
|
|
417
|
+
segmentActive: {
|
|
418
|
+
backgroundColor: _nightTheme.night.color.surfaceElevated
|
|
419
|
+
},
|
|
420
|
+
segmentText: {
|
|
421
|
+
fontSize: _nightTheme.night.font.caption,
|
|
422
|
+
fontWeight: "500",
|
|
423
|
+
color: _nightTheme.night.color.textSecondary
|
|
424
|
+
},
|
|
425
|
+
segmentTextActive: {
|
|
426
|
+
fontWeight: "600",
|
|
427
|
+
color: _nightTheme.night.color.text
|
|
428
|
+
},
|
|
429
|
+
segmentUnderline: {
|
|
430
|
+
position: "absolute",
|
|
431
|
+
bottom: 2,
|
|
432
|
+
width: 24,
|
|
433
|
+
height: 2.5,
|
|
434
|
+
borderRadius: 1.25,
|
|
435
|
+
backgroundColor: _nightTheme.night.color.accent,
|
|
436
|
+
shadowColor: _nightTheme.night.color.accent,
|
|
437
|
+
shadowOffset: {
|
|
438
|
+
width: 0,
|
|
439
|
+
height: 0
|
|
440
|
+
},
|
|
441
|
+
shadowOpacity: 0.6,
|
|
442
|
+
shadowRadius: 6
|
|
443
|
+
},
|
|
444
|
+
segmentSm: {
|
|
445
|
+
paddingVertical: 5
|
|
446
|
+
},
|
|
447
|
+
segmentTextSm: {
|
|
448
|
+
fontSize: 12
|
|
449
|
+
},
|
|
450
|
+
segmentUnderlineSm: {
|
|
451
|
+
bottom: 1.5,
|
|
452
|
+
width: 20,
|
|
453
|
+
height: 2,
|
|
454
|
+
borderRadius: 1
|
|
455
|
+
},
|
|
456
|
+
badge: {
|
|
457
|
+
paddingHorizontal: 8,
|
|
458
|
+
paddingVertical: 4,
|
|
459
|
+
borderRadius: _nightTheme.night.radius.badge,
|
|
460
|
+
alignSelf: "flex-start"
|
|
461
|
+
},
|
|
462
|
+
badgeText: {
|
|
463
|
+
fontSize: _nightTheme.night.font.micro,
|
|
464
|
+
fontWeight: "600",
|
|
465
|
+
letterSpacing: 0.5,
|
|
466
|
+
textTransform: "uppercase"
|
|
467
|
+
},
|
|
468
|
+
badgeAccent: {
|
|
469
|
+
backgroundColor: _nightTheme.night.color.accentSoft
|
|
470
|
+
},
|
|
471
|
+
badgeTextAccent: {
|
|
472
|
+
color: _nightTheme.night.color.accent
|
|
473
|
+
},
|
|
474
|
+
badgeWarning: {
|
|
475
|
+
backgroundColor: _nightTheme.night.color.warningSoft
|
|
476
|
+
},
|
|
477
|
+
badgeTextWarning: {
|
|
478
|
+
color: _nightTheme.night.color.warning
|
|
479
|
+
},
|
|
480
|
+
badgeDanger: {
|
|
481
|
+
backgroundColor: _nightTheme.night.color.dangerSoft
|
|
482
|
+
},
|
|
483
|
+
badgeTextDanger: {
|
|
484
|
+
color: _nightTheme.night.color.danger
|
|
485
|
+
},
|
|
486
|
+
badgeInfo: {
|
|
487
|
+
backgroundColor: _nightTheme.night.color.infoSoft
|
|
488
|
+
},
|
|
489
|
+
badgeTextInfo: {
|
|
490
|
+
color: _nightTheme.night.color.info
|
|
491
|
+
},
|
|
492
|
+
badgeNeutral: {
|
|
493
|
+
backgroundColor: _nightTheme.night.color.fillSecondary
|
|
494
|
+
},
|
|
495
|
+
badgeTextNeutral: {
|
|
496
|
+
color: _nightTheme.night.color.textSecondary
|
|
497
|
+
}
|
|
498
|
+
});
|