@titan-design/react-ui 0.1.0 → 0.2.5
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/README.md +47 -1
- package/dist/{chunk-MGW37MPO.mjs → chunk-UXVRPOME.mjs} +173 -3
- package/dist/chunk-UXVRPOME.mjs.map +1 -0
- package/dist/index.d.mts +101 -12
- package/dist/index.d.ts +101 -12
- package/dist/index.js +1267 -468
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +734 -112
- package/dist/index.mjs.map +1 -1
- package/dist/theme/index.d.mts +86 -1
- package/dist/theme/index.d.ts +86 -1
- package/dist/theme/index.js +166 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +1 -1
- package/package.json +22 -6
- package/src/components/custom/DateTime/DateTime.stories.tsx +180 -0
- package/src/components/custom/DateTime/DateTime.test.tsx +152 -0
- package/src/components/custom/DateTime/DateTime.tsx +235 -0
- package/src/components/custom/DateTime/index.ts +2 -0
- package/src/components/custom/EmptyState/EmptyState.stories.tsx +99 -0
- package/src/components/custom/EmptyState/EmptyState.test.tsx +106 -0
- package/src/components/custom/EmptyState/EmptyState.tsx +68 -0
- package/src/components/custom/EmptyState/index.ts +2 -0
- package/src/components/custom/Metric/Metric.stories.tsx +133 -0
- package/src/components/custom/Metric/Metric.test.tsx +120 -0
- package/src/components/custom/Metric/Metric.tsx +92 -0
- package/src/components/custom/Metric/index.ts +2 -0
- package/src/components/custom/Sidebar/Sidebar.stories.tsx +227 -0
- package/src/components/custom/Sidebar/Sidebar.test.tsx +185 -0
- package/src/components/custom/Sidebar/Sidebar.tsx +257 -0
- package/src/components/custom/Sidebar/index.ts +18 -0
- package/src/components/custom/Table/Table.stories.tsx +481 -0
- package/src/components/custom/Table/Table.test.tsx +531 -0
- package/src/components/custom/Table/Table.tsx +696 -0
- package/src/components/custom/Table/index.ts +22 -0
- package/src/components/custom/Typography/Typography.stories.tsx +153 -0
- package/src/components/custom/Typography/Typography.test.tsx +107 -0
- package/src/components/custom/Typography/Typography.tsx +218 -0
- package/src/components/custom/Typography/index.ts +19 -0
- package/src/components/custom/Workout/RestTimer.stories.tsx +71 -0
- package/src/components/custom/Workout/RestTimer.test.tsx +145 -0
- package/src/components/custom/Workout/RestTimer.tsx +172 -0
- package/src/components/custom/Workout/SupersetWrapper.stories.tsx +144 -0
- package/src/components/custom/Workout/SupersetWrapper.test.tsx +130 -0
- package/src/components/custom/Workout/SupersetWrapper.tsx +63 -0
- package/src/components/custom/Workout/index.ts +2 -0
- package/src/components/custom/index.ts +9 -0
- package/src/components/custom/stepper/Stepper.stories.tsx +245 -0
- package/src/components/custom/stepper/Stepper.test.tsx +230 -0
- package/src/components/custom/stepper/Stepper.tsx +250 -0
- package/src/components/custom/stepper/index.ts +10 -0
- package/src/components/index.ts +5 -0
- package/src/components/ui/alert/Alert.stories.tsx +154 -0
- package/src/components/ui/alert/Alert.test.tsx +202 -0
- package/src/components/ui/alert/Alert.tsx +170 -0
- package/src/components/ui/alert/index.ts +8 -0
- package/src/components/ui/autocomplete/Autocomplete.stories.tsx +299 -0
- package/src/components/ui/autocomplete/Autocomplete.test.tsx +247 -0
- package/src/components/ui/autocomplete/Autocomplete.tsx +332 -0
- package/src/components/ui/autocomplete/index.ts +2 -0
- package/src/components/ui/avatar/Avatar.stories.tsx +105 -0
- package/src/components/ui/avatar/Avatar.test.tsx +152 -0
- package/src/components/ui/avatar/Avatar.tsx +176 -0
- package/src/components/ui/avatar/index.ts +2 -0
- package/src/components/ui/badge/Badge.stories.tsx +100 -0
- package/src/components/ui/badge/Badge.test.tsx +103 -0
- package/src/components/ui/badge/Badge.tsx +119 -0
- package/src/components/ui/badge/index.ts +3 -0
- package/src/components/ui/breadcrumbs/Breadcrumbs.stories.tsx +70 -0
- package/src/components/ui/breadcrumbs/Breadcrumbs.test.tsx +156 -0
- package/src/components/ui/breadcrumbs/Breadcrumbs.tsx +127 -0
- package/src/components/ui/breadcrumbs/index.ts +2 -0
- package/src/components/ui/button/Button.stories.tsx +216 -0
- package/src/components/ui/button/Button.test.tsx +132 -0
- package/src/components/ui/button/Button.tsx +297 -0
- package/src/components/ui/button/index.ts +10 -0
- package/src/components/ui/card/Card.stories.tsx +443 -0
- package/src/components/ui/card/Card.test.tsx +294 -0
- package/src/components/ui/card/Card.tsx +401 -0
- package/src/components/ui/card/index.ts +20 -0
- package/src/components/ui/checkbox/Checkbox.stories.tsx +126 -0
- package/src/components/ui/checkbox/Checkbox.test.tsx +152 -0
- package/src/components/ui/checkbox/Checkbox.tsx +163 -0
- package/src/components/ui/checkbox/index.ts +2 -0
- package/src/components/ui/chip/Chip.stories.tsx +112 -0
- package/src/components/ui/chip/Chip.test.tsx +119 -0
- package/src/components/ui/chip/Chip.tsx +151 -0
- package/src/components/ui/chip/index.ts +2 -0
- package/src/components/ui/collapse/Collapse.stories.tsx +313 -0
- package/src/components/ui/collapse/Collapse.test.tsx +298 -0
- package/src/components/ui/collapse/Collapse.tsx +275 -0
- package/src/components/ui/collapse/index.ts +18 -0
- package/src/components/ui/data-row/DataRow.stories.tsx +78 -0
- package/src/components/ui/data-row/DataRow.test.tsx +78 -0
- package/src/components/ui/data-row/DataRow.tsx +29 -0
- package/src/components/ui/data-row/index.ts +2 -0
- package/src/components/ui/divider/Divider.stories.tsx +71 -0
- package/src/components/ui/divider/Divider.test.tsx +55 -0
- package/src/components/ui/divider/Divider.tsx +37 -0
- package/src/components/ui/divider/index.ts +2 -0
- package/src/components/ui/drawer/Drawer.stories.tsx +228 -0
- package/src/components/ui/drawer/Drawer.test.tsx +142 -0
- package/src/components/ui/drawer/Drawer.tsx +228 -0
- package/src/components/ui/drawer/index.ts +9 -0
- package/src/components/ui/form-field/FormField.stories.tsx +260 -0
- package/src/components/ui/form-field/FormField.test.tsx +280 -0
- package/src/components/ui/form-field/FormField.tsx +308 -0
- package/src/components/ui/form-field/index.ts +2 -0
- package/src/components/ui/help-tip/HelpTip.stories.tsx +250 -0
- package/src/components/ui/help-tip/HelpTip.test.tsx +198 -0
- package/src/components/ui/help-tip/HelpTip.tsx +229 -0
- package/src/components/ui/help-tip/index.ts +2 -0
- package/src/components/ui/icon-box/IconBox.stories.tsx +139 -0
- package/src/components/ui/icon-box/IconBox.test.tsx +120 -0
- package/src/components/ui/icon-box/IconBox.tsx +57 -0
- package/src/components/ui/icon-box/index.ts +1 -0
- package/src/components/ui/index.ts +38 -0
- package/src/components/ui/indicator/Indicator.stories.tsx +74 -0
- package/src/components/ui/indicator/Indicator.test.tsx +55 -0
- package/src/components/ui/indicator/Indicator.tsx +73 -0
- package/src/components/ui/indicator/index.ts +2 -0
- package/src/components/ui/input/Input.stories.tsx +192 -0
- package/src/components/ui/input/Input.test.tsx +86 -0
- package/src/components/ui/input/Input.tsx +273 -0
- package/src/components/ui/input/index.ts +2 -0
- package/src/components/ui/link/Link.stories.tsx +78 -0
- package/src/components/ui/link/Link.test.tsx +94 -0
- package/src/components/ui/link/Link.tsx +86 -0
- package/src/components/ui/link/index.ts +2 -0
- package/src/components/ui/list-item/ListItem.stories.tsx +146 -0
- package/src/components/ui/list-item/ListItem.test.tsx +128 -0
- package/src/components/ui/list-item/ListItem.tsx +89 -0
- package/src/components/ui/list-item/index.ts +14 -0
- package/src/components/ui/menu/Menu.stories.tsx +180 -0
- package/src/components/ui/menu/Menu.test.tsx +353 -0
- package/src/components/ui/menu/Menu.tsx +222 -0
- package/src/components/ui/menu/index.ts +2 -0
- package/src/components/ui/modal/Modal.stories.tsx +350 -0
- package/src/components/ui/modal/Modal.test.tsx +159 -0
- package/src/components/ui/modal/Modal.tsx +254 -0
- package/src/components/ui/modal/index.ts +19 -0
- package/src/components/ui/pill/Pill.stories.tsx +71 -0
- package/src/components/ui/pill/Pill.test.tsx +69 -0
- package/src/components/ui/pill/Pill.tsx +104 -0
- package/src/components/ui/pill/index.ts +2 -0
- package/src/components/ui/popover/Popover.stories.tsx +190 -0
- package/src/components/ui/popover/Popover.test.tsx +419 -0
- package/src/components/ui/popover/Popover.tsx +237 -0
- package/src/components/ui/popover/index.ts +2 -0
- package/src/components/ui/progress/Progress.stories.tsx +190 -0
- package/src/components/ui/progress/Progress.test.tsx +210 -0
- package/src/components/ui/progress/Progress.tsx +339 -0
- package/src/components/ui/progress/index.ts +9 -0
- package/src/components/ui/radio/Radio.stories.tsx +199 -0
- package/src/components/ui/radio/Radio.test.tsx +166 -0
- package/src/components/ui/radio/Radio.tsx +200 -0
- package/src/components/ui/radio/index.ts +2 -0
- package/src/components/ui/section/Section.stories.tsx +111 -0
- package/src/components/ui/section/Section.test.tsx +121 -0
- package/src/components/ui/section/Section.tsx +52 -0
- package/src/components/ui/section/index.ts +6 -0
- package/src/components/ui/select/Select.stories.tsx +286 -0
- package/src/components/ui/select/Select.test.tsx +200 -0
- package/src/components/ui/select/Select.tsx +243 -0
- package/src/components/ui/select/index.ts +2 -0
- package/src/components/ui/skeleton/Skeleton.stories.tsx +153 -0
- package/src/components/ui/skeleton/Skeleton.test.tsx +162 -0
- package/src/components/ui/skeleton/Skeleton.tsx +229 -0
- package/src/components/ui/skeleton/index.ts +16 -0
- package/src/components/ui/spinner/Spinner.stories.tsx +67 -0
- package/src/components/ui/spinner/Spinner.test.tsx +67 -0
- package/src/components/ui/spinner/Spinner.tsx +72 -0
- package/src/components/ui/spinner/index.ts +2 -0
- package/src/components/ui/stack/Stack.stories.tsx +127 -0
- package/src/components/ui/stack/Stack.test.tsx +184 -0
- package/src/components/ui/stack/Stack.tsx +76 -0
- package/src/components/ui/stack/index.ts +2 -0
- package/src/components/ui/surface/Surface.stories.tsx +91 -0
- package/src/components/ui/surface/Surface.test.tsx +63 -0
- package/src/components/ui/surface/Surface.tsx +51 -0
- package/src/components/ui/surface/index.ts +1 -0
- package/src/components/ui/switch/Switch.stories.tsx +111 -0
- package/src/components/ui/switch/Switch.test.tsx +112 -0
- package/src/components/ui/switch/Switch.tsx +103 -0
- package/src/components/ui/switch/index.ts +2 -0
- package/src/components/ui/tabs/Tabs.stories.tsx +213 -0
- package/src/components/ui/tabs/Tabs.test.tsx +192 -0
- package/src/components/ui/tabs/Tabs.tsx +253 -0
- package/src/components/ui/tabs/index.ts +16 -0
- package/src/components/ui/toast/Toast.stories.tsx +255 -0
- package/src/components/ui/toast/Toast.test.tsx +207 -0
- package/src/components/ui/toast/Toast.tsx +327 -0
- package/src/components/ui/toast/index.ts +9 -0
- package/src/components/ui/toolbar-button/ToolbarButton.stories.tsx +415 -0
- package/src/components/ui/toolbar-button/ToolbarButton.test.tsx +224 -0
- package/src/components/ui/toolbar-button/ToolbarButton.tsx +307 -0
- package/src/components/ui/toolbar-button/index.ts +7 -0
- package/src/components/ui/tooltip/Tooltip.stories.tsx +126 -0
- package/src/components/ui/tooltip/Tooltip.test.tsx +262 -0
- package/src/components/ui/tooltip/Tooltip.tsx +234 -0
- package/src/components/ui/tooltip/index.ts +2 -0
- package/src/index.ts +10 -0
- package/src/stories/PresetShowcase.stories.tsx +462 -0
- package/src/stories/ThemePresets.stories.tsx +85 -0
- package/src/test/setup.ts +19 -0
- package/src/theme/Colors.stories.tsx +258 -0
- package/src/theme/config.ts +193 -0
- package/src/theme/elevation.stories.tsx +346 -0
- package/src/theme/elevation.test.ts +27 -0
- package/src/theme/elevation.ts +567 -0
- package/src/theme/global.css +129 -1
- package/src/theme/index.ts +40 -0
- package/src/theme/presets/apply.ts +97 -0
- package/src/theme/presets/audiobook.ts +93 -0
- package/src/theme/presets/default.ts +6 -0
- package/src/theme/presets/index.ts +4 -0
- package/src/theme/presets/presets.test.ts +51 -0
- package/src/theme/presets/types.ts +76 -0
- package/src/theme/shadows.stories.tsx +523 -0
- package/src/theme/shadows.ts +439 -0
- package/src/theme/tokens/index.ts +2 -0
- package/src/theme/tokens/primitives.ts +354 -0
- package/src/theme/tokens/semantic.ts +381 -0
- package/src/types/jest-axe.d.ts +16 -0
- package/src/types/nativewind.d.ts +54 -0
- package/src/utils/avatar-color.test.ts +30 -0
- package/src/utils/avatar-color.ts +20 -0
- package/src/utils/cn.ts +14 -0
- package/src/utils/colors.ts +140 -0
- package/src/utils/form.ts +188 -0
- package/src/utils/index.ts +29 -0
- package/src/utils/useTheme.ts +72 -0
- package/src/web-jsx/jsx-dev-runtime.ts +28 -0
- package/src/web-jsx/jsx-runtime.ts +41 -0
- package/tailwind.config.js +53 -3
- package/dist/chunk-MGW37MPO.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -10,10 +10,34 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
10
10
|
|
|
11
11
|
var React24__default = /*#__PURE__*/_interopDefault(React24);
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
14
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
15
|
+
}) : x)(function(x) {
|
|
16
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
17
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
18
|
+
});
|
|
14
19
|
function cn(...inputs) {
|
|
15
20
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
16
21
|
}
|
|
22
|
+
function wrapJsx(fn) {
|
|
23
|
+
return function(type, props, ...rest) {
|
|
24
|
+
if (props && typeof props.className === "string" && props.className) {
|
|
25
|
+
const cn2 = props.className;
|
|
26
|
+
const cssStyle = { $$css: true, [cn2]: cn2 };
|
|
27
|
+
const existing = props.style;
|
|
28
|
+
props = {
|
|
29
|
+
...props,
|
|
30
|
+
style: existing ? [cssStyle, existing] : cssStyle
|
|
31
|
+
};
|
|
32
|
+
delete props.className;
|
|
33
|
+
}
|
|
34
|
+
return fn(type, props, ...rest);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
var jsx = wrapJsx(jsxRuntime.jsx);
|
|
38
|
+
var jsxs = wrapJsx(jsxRuntime.jsxs);
|
|
39
|
+
|
|
40
|
+
// src/components/ui/alert/Alert.tsx
|
|
17
41
|
var statusColors = {
|
|
18
42
|
success: {
|
|
19
43
|
subtle: "bg-status-success-subtle",
|
|
@@ -62,7 +86,7 @@ function Alert({
|
|
|
62
86
|
}) {
|
|
63
87
|
const colors = statusColors[status];
|
|
64
88
|
const isSolid = variant === "solid";
|
|
65
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ jsxs(
|
|
66
90
|
reactNative.View,
|
|
67
91
|
{
|
|
68
92
|
accessibilityRole: "alert",
|
|
@@ -73,7 +97,7 @@ function Alert({
|
|
|
73
97
|
),
|
|
74
98
|
...props,
|
|
75
99
|
children: [
|
|
76
|
-
showIcon && /* @__PURE__ */
|
|
100
|
+
showIcon && /* @__PURE__ */ jsx(reactNative.View, { className: "mr-3 mt-0.5", children: icon || /* @__PURE__ */ jsx(
|
|
77
101
|
reactNative.Text,
|
|
78
102
|
{
|
|
79
103
|
className: cn(
|
|
@@ -83,15 +107,15 @@ function Alert({
|
|
|
83
107
|
children: defaultIcons[status]
|
|
84
108
|
}
|
|
85
109
|
) }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
onClose && /* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-1", children }),
|
|
111
|
+
onClose && /* @__PURE__ */ jsx(
|
|
88
112
|
reactNative.Pressable,
|
|
89
113
|
{
|
|
90
114
|
onPress: onClose,
|
|
91
115
|
accessibilityRole: "button",
|
|
92
116
|
accessibilityLabel: "Close alert",
|
|
93
117
|
className: "ml-2 p-1 rounded web:hover:bg-black/10 active:bg-black/20",
|
|
94
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-lg", isSolid ? "text-white/70" : "text-text-secondary"), children: "\xD7" })
|
|
95
119
|
}
|
|
96
120
|
)
|
|
97
121
|
]
|
|
@@ -99,10 +123,10 @@ function Alert({
|
|
|
99
123
|
);
|
|
100
124
|
}
|
|
101
125
|
function AlertTitle({ children, className }) {
|
|
102
|
-
return /* @__PURE__ */
|
|
126
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: cn("font-semibold text-text-primary mb-1", className), children });
|
|
103
127
|
}
|
|
104
128
|
function AlertDescription({ children, className }) {
|
|
105
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-sm text-text-secondary", className), children });
|
|
106
130
|
}
|
|
107
131
|
|
|
108
132
|
// src/theme/tokens/primitives.ts
|
|
@@ -830,6 +854,50 @@ var buttonSizes = {
|
|
|
830
854
|
function getSemanticColors(mode) {
|
|
831
855
|
return mode === "dark" ? semanticColorsDark : semanticColorsLight;
|
|
832
856
|
}
|
|
857
|
+
|
|
858
|
+
// src/components/ui/button/Button.tsx
|
|
859
|
+
var textColorMap = {
|
|
860
|
+
solid: {
|
|
861
|
+
primary: "#FFFFFF",
|
|
862
|
+
secondary: "#FFFFFF",
|
|
863
|
+
success: "#FFFFFF",
|
|
864
|
+
error: "#FFFFFF",
|
|
865
|
+
warning: "#FFFFFF",
|
|
866
|
+
info: "#FFFFFF"
|
|
867
|
+
},
|
|
868
|
+
outline: {
|
|
869
|
+
primary: semanticColorsDark["brand-primary"],
|
|
870
|
+
secondary: semanticColorsDark["brand-secondary"],
|
|
871
|
+
success: semanticColorsDark["status-success"],
|
|
872
|
+
error: semanticColorsDark["status-error"],
|
|
873
|
+
warning: semanticColorsDark["status-warning"],
|
|
874
|
+
info: semanticColorsDark["status-info"]
|
|
875
|
+
},
|
|
876
|
+
ghost: {
|
|
877
|
+
primary: semanticColorsDark["brand-primary"],
|
|
878
|
+
secondary: semanticColorsDark["brand-secondary"],
|
|
879
|
+
success: semanticColorsDark["status-success"],
|
|
880
|
+
error: semanticColorsDark["status-error"],
|
|
881
|
+
warning: semanticColorsDark["status-warning"],
|
|
882
|
+
info: semanticColorsDark["status-info"]
|
|
883
|
+
},
|
|
884
|
+
link: {
|
|
885
|
+
primary: semanticColorsDark["brand-primary"],
|
|
886
|
+
secondary: semanticColorsDark["brand-secondary"],
|
|
887
|
+
success: semanticColorsDark["status-success"],
|
|
888
|
+
error: semanticColorsDark["status-error"],
|
|
889
|
+
warning: semanticColorsDark["status-warning"],
|
|
890
|
+
info: semanticColorsDark["status-info"]
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
var borderColorMap = {
|
|
894
|
+
primary: semanticColorsDark["brand-primary"],
|
|
895
|
+
secondary: semanticColorsDark["brand-secondary"],
|
|
896
|
+
success: semanticColorsDark["status-success"],
|
|
897
|
+
error: semanticColorsDark["status-error"],
|
|
898
|
+
warning: semanticColorsDark["status-warning"],
|
|
899
|
+
info: semanticColorsDark["status-info"]
|
|
900
|
+
};
|
|
833
901
|
var variantStyles = {
|
|
834
902
|
solid: {
|
|
835
903
|
primary: "bg-brand-primary active:bg-brand-primary-dark active:scale-[0.98] web:hover:bg-brand-primary-dark web:active:scale-[0.98]",
|
|
@@ -927,7 +995,13 @@ var Button = React24.forwardRef(function Button2({
|
|
|
927
995
|
...props
|
|
928
996
|
}, ref) {
|
|
929
997
|
const disabled = isDisabled || isLoading;
|
|
930
|
-
|
|
998
|
+
const inlineStyle = {
|
|
999
|
+
color: textColorMap[variant][color]
|
|
1000
|
+
};
|
|
1001
|
+
if (variant === "outline") {
|
|
1002
|
+
inlineStyle.borderColor = borderColorMap[color];
|
|
1003
|
+
}
|
|
1004
|
+
return /* @__PURE__ */ jsxs(
|
|
931
1005
|
reactNative.Pressable,
|
|
932
1006
|
{
|
|
933
1007
|
ref,
|
|
@@ -949,9 +1023,10 @@ var Button = React24.forwardRef(function Button2({
|
|
|
949
1023
|
variant === "link" && "px-0 py-0 min-h-0",
|
|
950
1024
|
className
|
|
951
1025
|
),
|
|
1026
|
+
style: inlineStyle,
|
|
952
1027
|
...props,
|
|
953
1028
|
children: [
|
|
954
|
-
isLoading && /* @__PURE__ */
|
|
1029
|
+
isLoading && /* @__PURE__ */ jsx(
|
|
955
1030
|
reactNative.ActivityIndicator,
|
|
956
1031
|
{
|
|
957
1032
|
size: "small",
|
|
@@ -959,7 +1034,7 @@ var Button = React24.forwardRef(function Button2({
|
|
|
959
1034
|
className: "mr-2"
|
|
960
1035
|
}
|
|
961
1036
|
),
|
|
962
|
-
isLoading && loadingText ? /* @__PURE__ */
|
|
1037
|
+
isLoading && loadingText ? /* @__PURE__ */ jsx(
|
|
963
1038
|
reactNative.Text,
|
|
964
1039
|
{
|
|
965
1040
|
className: cn(
|
|
@@ -967,6 +1042,7 @@ var Button = React24.forwardRef(function Button2({
|
|
|
967
1042
|
textSizeStyles[size],
|
|
968
1043
|
textStyles[variant][color]
|
|
969
1044
|
),
|
|
1045
|
+
style: { color: textColorMap[variant][color] },
|
|
970
1046
|
children: loadingText
|
|
971
1047
|
}
|
|
972
1048
|
) : children
|
|
@@ -975,13 +1051,13 @@ var Button = React24.forwardRef(function Button2({
|
|
|
975
1051
|
);
|
|
976
1052
|
});
|
|
977
1053
|
function ButtonText({ children, className }) {
|
|
978
|
-
return /* @__PURE__ */
|
|
1054
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: cn("font-semibold text-inherit", className), children });
|
|
979
1055
|
}
|
|
980
1056
|
function ButtonIcon({ as: Icon, size = 16, className }) {
|
|
981
|
-
return /* @__PURE__ */
|
|
1057
|
+
return /* @__PURE__ */ jsx(Icon, { size, className: cn("text-inherit", className) });
|
|
982
1058
|
}
|
|
983
1059
|
function ButtonSpinner({ className }) {
|
|
984
|
-
return /* @__PURE__ */
|
|
1060
|
+
return /* @__PURE__ */ jsx(reactNative.ActivityIndicator, { size: "small", className: cn("text-inherit", className) });
|
|
985
1061
|
}
|
|
986
1062
|
var sizeStyles2 = {
|
|
987
1063
|
sm: "h-8 px-3 text-sm",
|
|
@@ -1044,12 +1120,12 @@ var Input = React24.forwardRef(function Input2({
|
|
|
1044
1120
|
};
|
|
1045
1121
|
const showError = isInvalid && errorMessage;
|
|
1046
1122
|
const showHelper = !showError && helperText;
|
|
1047
|
-
return /* @__PURE__ */
|
|
1048
|
-
label && /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("w-full", className), children: [
|
|
1124
|
+
label && /* @__PURE__ */ jsxs(reactNative.Text, { className: "mb-1.5 text-sm font-medium text-text-primary", children: [
|
|
1049
1125
|
label,
|
|
1050
|
-
isRequired && /* @__PURE__ */
|
|
1126
|
+
isRequired && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-status-error ml-0.5", children: "*" })
|
|
1051
1127
|
] }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1128
|
+
/* @__PURE__ */ jsxs(
|
|
1053
1129
|
reactNative.View,
|
|
1054
1130
|
{
|
|
1055
1131
|
className: cn(
|
|
@@ -1062,8 +1138,8 @@ var Input = React24.forwardRef(function Input2({
|
|
|
1062
1138
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
1063
1139
|
),
|
|
1064
1140
|
children: [
|
|
1065
|
-
leftElement && /* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1141
|
+
leftElement && /* @__PURE__ */ jsx(reactNative.View, { className: cn("pl-3 pr-1", multiline && "pt-3"), children: leftElement }),
|
|
1142
|
+
/* @__PURE__ */ jsx(
|
|
1067
1143
|
reactNative.TextInput,
|
|
1068
1144
|
{
|
|
1069
1145
|
ref,
|
|
@@ -1088,35 +1164,35 @@ var Input = React24.forwardRef(function Input2({
|
|
|
1088
1164
|
...props
|
|
1089
1165
|
}
|
|
1090
1166
|
),
|
|
1091
|
-
rightElement && /* @__PURE__ */
|
|
1167
|
+
rightElement && /* @__PURE__ */ jsx(reactNative.View, { className: cn("pl-1 pr-3", multiline && "pt-3"), children: rightElement })
|
|
1092
1168
|
]
|
|
1093
1169
|
}
|
|
1094
1170
|
),
|
|
1095
|
-
showHelper && /* @__PURE__ */
|
|
1096
|
-
showError && /* @__PURE__ */
|
|
1171
|
+
showHelper && /* @__PURE__ */ jsx(reactNative.Text, { className: "mt-1.5 text-xs text-text-secondary", children: helperText }),
|
|
1172
|
+
showError && /* @__PURE__ */ jsx(reactNative.Text, { className: "mt-1.5 text-xs text-status-error", children: errorMessage })
|
|
1097
1173
|
] });
|
|
1098
1174
|
});
|
|
1099
1175
|
function InputGroup({ children, className }) {
|
|
1100
|
-
return /* @__PURE__ */
|
|
1176
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-col gap-4", className), children });
|
|
1101
1177
|
}
|
|
1102
1178
|
var PasswordInput = React24.forwardRef(function PasswordInput2({ showIcon, hideIcon, ...props }, ref) {
|
|
1103
1179
|
const [isVisible, setIsVisible] = React24.useState(false);
|
|
1104
1180
|
const toggleVisibility = () => setIsVisible(!isVisible);
|
|
1105
|
-
const defaultShowIcon = /* @__PURE__ */
|
|
1106
|
-
/* @__PURE__ */
|
|
1107
|
-
/* @__PURE__ */
|
|
1181
|
+
const defaultShowIcon = /* @__PURE__ */ jsxs(reactNative.View, { className: "w-5 h-5 items-center justify-center", children: [
|
|
1182
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "w-3 h-3 rounded-full border-2 border-text-secondary" }),
|
|
1183
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "absolute w-1.5 h-1.5 rounded-full bg-text-secondary" })
|
|
1108
1184
|
] });
|
|
1109
|
-
const defaultHideIcon = /* @__PURE__ */
|
|
1110
|
-
/* @__PURE__ */
|
|
1111
|
-
/* @__PURE__ */
|
|
1112
|
-
/* @__PURE__ */
|
|
1185
|
+
const defaultHideIcon = /* @__PURE__ */ jsxs(reactNative.View, { className: "w-5 h-5 items-center justify-center", children: [
|
|
1186
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "w-3 h-3 rounded-full border-2 border-text-secondary" }),
|
|
1187
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "absolute w-1.5 h-1.5 rounded-full bg-text-secondary" }),
|
|
1188
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "absolute w-5 h-0.5 bg-text-secondary rotate-45" })
|
|
1113
1189
|
] });
|
|
1114
|
-
return /* @__PURE__ */
|
|
1190
|
+
return /* @__PURE__ */ jsx(
|
|
1115
1191
|
Input,
|
|
1116
1192
|
{
|
|
1117
1193
|
ref,
|
|
1118
1194
|
secureTextEntry: !isVisible,
|
|
1119
|
-
rightElement: /* @__PURE__ */
|
|
1195
|
+
rightElement: /* @__PURE__ */ jsx(
|
|
1120
1196
|
reactNative.Pressable,
|
|
1121
1197
|
{
|
|
1122
1198
|
onPress: toggleVisibility,
|
|
@@ -1902,6 +1978,169 @@ function getGlowShadow(color, intensity = "medium") {
|
|
|
1902
1978
|
}
|
|
1903
1979
|
});
|
|
1904
1980
|
}
|
|
1981
|
+
|
|
1982
|
+
// src/theme/presets/apply.ts
|
|
1983
|
+
function colorKeyToVar(key) {
|
|
1984
|
+
return `--color-${key}`;
|
|
1985
|
+
}
|
|
1986
|
+
function applyColorOverrides(colors, root) {
|
|
1987
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
1988
|
+
if (value !== void 0) {
|
|
1989
|
+
root.style.setProperty(colorKeyToVar(key), value);
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
function applyFontOverrides(fonts, root) {
|
|
1994
|
+
const fontVarMap = {
|
|
1995
|
+
sans: "--font-family-sans",
|
|
1996
|
+
body: "--font-family-body",
|
|
1997
|
+
heading: "--font-family-heading",
|
|
1998
|
+
mono: "--font-family-mono"
|
|
1999
|
+
};
|
|
2000
|
+
for (const [key, value] of Object.entries(fonts)) {
|
|
2001
|
+
if (value !== void 0 && fontVarMap[key]) {
|
|
2002
|
+
root.style.setProperty(fontVarMap[key], value);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
function injectFontImport(url) {
|
|
2007
|
+
if (typeof document === "undefined") return;
|
|
2008
|
+
const existing = document.querySelector(`link[href="${url}"]`);
|
|
2009
|
+
if (existing) return;
|
|
2010
|
+
const link = document.createElement("link");
|
|
2011
|
+
link.rel = "stylesheet";
|
|
2012
|
+
link.href = url;
|
|
2013
|
+
document.head.appendChild(link);
|
|
2014
|
+
}
|
|
2015
|
+
function applyThemePreset(preset) {
|
|
2016
|
+
if (typeof document === "undefined") {
|
|
2017
|
+
return () => {
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
const root = document.documentElement;
|
|
2021
|
+
const removals = [];
|
|
2022
|
+
if (preset.fontImport) {
|
|
2023
|
+
injectFontImport(preset.fontImport);
|
|
2024
|
+
}
|
|
2025
|
+
const isLight = root.classList.contains("light");
|
|
2026
|
+
const modeColors = isLight ? preset.colors?.light : preset.colors?.dark;
|
|
2027
|
+
if (modeColors) {
|
|
2028
|
+
const previousValues = {};
|
|
2029
|
+
for (const key of Object.keys(modeColors)) {
|
|
2030
|
+
previousValues[colorKeyToVar(key)] = root.style.getPropertyValue(colorKeyToVar(key)) || null;
|
|
2031
|
+
}
|
|
2032
|
+
applyColorOverrides(modeColors, root);
|
|
2033
|
+
removals.push(() => {
|
|
2034
|
+
for (const [varName, prev] of Object.entries(previousValues)) {
|
|
2035
|
+
if (prev === null) {
|
|
2036
|
+
root.style.removeProperty(varName);
|
|
2037
|
+
} else {
|
|
2038
|
+
root.style.setProperty(varName, prev);
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
if (preset.fonts) {
|
|
2044
|
+
applyFontOverrides(preset.fonts, root);
|
|
2045
|
+
}
|
|
2046
|
+
if (preset.rootClasses) {
|
|
2047
|
+
for (const cls of preset.rootClasses) {
|
|
2048
|
+
root.classList.add(cls);
|
|
2049
|
+
}
|
|
2050
|
+
removals.push(() => {
|
|
2051
|
+
for (const cls of preset.rootClasses) {
|
|
2052
|
+
root.classList.remove(cls);
|
|
2053
|
+
}
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
return () => {
|
|
2057
|
+
for (const remove of removals) {
|
|
2058
|
+
remove();
|
|
2059
|
+
}
|
|
2060
|
+
};
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
// src/theme/presets/default.ts
|
|
2064
|
+
var defaultPreset = {
|
|
2065
|
+
name: "default",
|
|
2066
|
+
description: "Titan Design System default theme \u2014 orange accent, steel secondary"
|
|
2067
|
+
};
|
|
2068
|
+
|
|
2069
|
+
// src/theme/presets/audiobook.ts
|
|
2070
|
+
var audiobookPreset = {
|
|
2071
|
+
name: "audiobook",
|
|
2072
|
+
description: "Warm copper/patina theme with editorial typography",
|
|
2073
|
+
fontImport: "https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap",
|
|
2074
|
+
fonts: {
|
|
2075
|
+
sans: "'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif",
|
|
2076
|
+
body: "'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif",
|
|
2077
|
+
heading: "'Newsreader', 'Libre Baskerville', Georgia, serif",
|
|
2078
|
+
mono: "'JetBrains Mono', 'SF Mono', 'Fira Code', monospace"
|
|
2079
|
+
},
|
|
2080
|
+
colors: {
|
|
2081
|
+
dark: {
|
|
2082
|
+
// Brand: Copper accent
|
|
2083
|
+
"brand-primary": "#d4782a",
|
|
2084
|
+
"brand-primary-light": "#e8944a",
|
|
2085
|
+
"brand-primary-dark": "#9a4a15",
|
|
2086
|
+
"brand-primary-subtle": "rgba(212, 120, 42, 0.12)",
|
|
2087
|
+
"brand-primary-hover": "#e8944a",
|
|
2088
|
+
"brand-primary-active": "#f5b070",
|
|
2089
|
+
// Brand secondary: Patina/verdigris
|
|
2090
|
+
"brand-secondary": "#3a9b8a",
|
|
2091
|
+
"brand-secondary-light": "#55baa7",
|
|
2092
|
+
"brand-secondary-dark": "#1f5c52",
|
|
2093
|
+
"brand-secondary-subtle": "rgba(58, 155, 138, 0.12)",
|
|
2094
|
+
"brand-secondary-hover": "#55baa7",
|
|
2095
|
+
"brand-secondary-active": "#7ed4c4",
|
|
2096
|
+
"on-brand-primary": "#FFFFFF",
|
|
2097
|
+
"on-brand-secondary": "#FFFFFF",
|
|
2098
|
+
// Status colors (audiobook's warmer status palette)
|
|
2099
|
+
"status-success": "#5fb870",
|
|
2100
|
+
"status-error": "#d85c4a",
|
|
2101
|
+
"status-warning": "#d4a43a",
|
|
2102
|
+
"status-info": "#5a8fd4",
|
|
2103
|
+
// Text: warm off-whites
|
|
2104
|
+
"text-primary": "#f4f3f1",
|
|
2105
|
+
"text-secondary": "#b5b3af",
|
|
2106
|
+
"text-tertiary": "#7a7875",
|
|
2107
|
+
// Surfaces: warm charcoals (not pure gray)
|
|
2108
|
+
"surface-base": "#101114",
|
|
2109
|
+
"surface-elevated": "#15171c",
|
|
2110
|
+
"surface-raised": "#1a1d24",
|
|
2111
|
+
"surface-overlay": "#15171c",
|
|
2112
|
+
"surface-input": "#15171c",
|
|
2113
|
+
// Backgrounds
|
|
2114
|
+
"background-base": "#0a0b0d",
|
|
2115
|
+
"background-default": "#101114",
|
|
2116
|
+
"background-subtle": "#1a1d24",
|
|
2117
|
+
// Borders
|
|
2118
|
+
"border-default": "rgba(255, 255, 255, 0.06)",
|
|
2119
|
+
"border-subtle": "rgba(255, 255, 255, 0.03)",
|
|
2120
|
+
"border-strong": "#2d323d",
|
|
2121
|
+
"border-focus": "#d4782a",
|
|
2122
|
+
"border-input": "#2d323d",
|
|
2123
|
+
"border-input-hover": "#454c5c",
|
|
2124
|
+
"border-input-focus": "#d4782a",
|
|
2125
|
+
"border-input-error": "#d85c4a",
|
|
2126
|
+
// Interactive
|
|
2127
|
+
"interactive-hover": "rgba(255, 255, 255, 0.04)",
|
|
2128
|
+
"interactive-focus": "rgba(255, 255, 255, 0.12)",
|
|
2129
|
+
"interactive-active": "rgba(255, 255, 255, 0.16)",
|
|
2130
|
+
"interactive-selected": "rgba(255, 255, 255, 0.08)",
|
|
2131
|
+
"divider": "rgba(255, 255, 255, 0.06)",
|
|
2132
|
+
// Glow RGB values for shadow utilities
|
|
2133
|
+
"brand-primary-rgb": "212, 120, 42",
|
|
2134
|
+
"brand-secondary-rgb": "58, 155, 138",
|
|
2135
|
+
"status-success-rgb": "95, 184, 112",
|
|
2136
|
+
"status-error-rgb": "216, 92, 74",
|
|
2137
|
+
"status-warning-rgb": "212, 164, 58",
|
|
2138
|
+
"status-info-rgb": "90, 143, 212",
|
|
2139
|
+
"background-base-rgb": "10, 11, 13"
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
rootClasses: ["atmosphere-warm", "grain"]
|
|
2143
|
+
};
|
|
1905
2144
|
function getTheme() {
|
|
1906
2145
|
if (typeof document === "undefined") return "dark";
|
|
1907
2146
|
return document.documentElement.classList.contains("light") ? "light" : "dark";
|
|
@@ -1940,13 +2179,17 @@ function getServerSnapshot() {
|
|
|
1940
2179
|
function useTheme() {
|
|
1941
2180
|
return React24.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
1942
2181
|
}
|
|
2182
|
+
|
|
2183
|
+
// src/components/ui/card/Card.tsx
|
|
1943
2184
|
var variantStyles3 = {
|
|
1944
2185
|
elevated: "",
|
|
1945
2186
|
// Will be set dynamically via elevation system
|
|
1946
2187
|
outline: "border-2 border-border-strong",
|
|
1947
2188
|
// Thicker border with stronger contrast
|
|
1948
|
-
filled: ""
|
|
2189
|
+
filled: "",
|
|
1949
2190
|
// Will be set dynamically via elevation system
|
|
2191
|
+
accent: "border border-border-default",
|
|
2192
|
+
subtle: "border border-border-subtle"
|
|
1950
2193
|
};
|
|
1951
2194
|
function Card({
|
|
1952
2195
|
variant = "elevated",
|
|
@@ -1956,6 +2199,8 @@ function Card({
|
|
|
1956
2199
|
onPress,
|
|
1957
2200
|
borderColor,
|
|
1958
2201
|
bgColor,
|
|
2202
|
+
accentColor,
|
|
2203
|
+
accentWidth,
|
|
1959
2204
|
className,
|
|
1960
2205
|
children,
|
|
1961
2206
|
style,
|
|
@@ -1969,28 +2214,31 @@ function Card({
|
|
|
1969
2214
|
const theme = useTheme();
|
|
1970
2215
|
const elevationLevel = React24.useMemo(() => {
|
|
1971
2216
|
const validated = getValidatedElevation("card", elevation);
|
|
1972
|
-
if (variant === "outline") {
|
|
2217
|
+
if (variant === "outline" || variant === "accent" || variant === "subtle") {
|
|
1973
2218
|
return 1;
|
|
1974
2219
|
}
|
|
1975
2220
|
return validated;
|
|
1976
2221
|
}, [variant, elevation]);
|
|
1977
2222
|
const baseColor = React24.useMemo(() => getBaseSurfaceColor(theme), [theme]);
|
|
1978
2223
|
const surfaceColor = React24.useMemo(() => {
|
|
1979
|
-
if (variant === "outline" && theme === "light") {
|
|
2224
|
+
if ((variant === "outline" || variant === "accent") && theme === "light") {
|
|
1980
2225
|
return "#FAFAFA";
|
|
1981
2226
|
}
|
|
2227
|
+
if (variant === "subtle") {
|
|
2228
|
+
return getElevationSurface(baseColor, 0, theme);
|
|
2229
|
+
}
|
|
1982
2230
|
return getElevationSurface(baseColor, elevationLevel, theme);
|
|
1983
2231
|
}, [baseColor, elevationLevel, theme, variant]);
|
|
1984
2232
|
const shadowStyle = React24.useMemo(() => {
|
|
1985
2233
|
const shouldHover = isHovered && isClickable;
|
|
1986
2234
|
return getElevationShadow(baseColor, elevationLevel, theme, shouldHover);
|
|
1987
2235
|
}, [baseColor, elevationLevel, theme, isHovered, isClickable]);
|
|
1988
|
-
const cardContent = isLoading ? /* @__PURE__ */
|
|
1989
|
-
skeletonHasHeader && /* @__PURE__ */
|
|
1990
|
-
/* @__PURE__ */
|
|
1991
|
-
/* @__PURE__ */
|
|
2236
|
+
const cardContent = isLoading ? /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
2237
|
+
skeletonHasHeader && /* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
2238
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "h-5 w-1/3 bg-interactive-disabled rounded" }),
|
|
2239
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "mt-2 h-4 w-2/3 bg-interactive-disabled rounded" })
|
|
1992
2240
|
] }),
|
|
1993
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ jsx(CardContent, { children: Array.from({ length: skeletonContentLines }).map((_, i) => /* @__PURE__ */ jsx(
|
|
1994
2242
|
reactNative.View,
|
|
1995
2243
|
{
|
|
1996
2244
|
className: cn(
|
|
@@ -2000,7 +2248,7 @@ function Card({
|
|
|
2000
2248
|
},
|
|
2001
2249
|
i
|
|
2002
2250
|
)) }),
|
|
2003
|
-
skeletonHasFooter && /* @__PURE__ */
|
|
2251
|
+
skeletonHasFooter && /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(reactNative.View, { className: "h-9 w-24 bg-interactive-disabled rounded" }) })
|
|
2004
2252
|
] }) : children;
|
|
2005
2253
|
const baseClassName = cn(
|
|
2006
2254
|
"rounded-lg overflow-hidden relative",
|
|
@@ -2012,19 +2260,26 @@ function Card({
|
|
|
2012
2260
|
isLoading && "pointer-events-none animate-pulse",
|
|
2013
2261
|
className
|
|
2014
2262
|
);
|
|
2263
|
+
const accentStyle = React24.useMemo(() => variant === "accent" ? {
|
|
2264
|
+
borderLeftWidth: accentWidth ?? 3,
|
|
2265
|
+
borderLeftColor: accentColor ?? "var(--color-brand-primary)"
|
|
2266
|
+
} : {}, [variant, accentWidth, accentColor]);
|
|
2015
2267
|
const mergedStyle = React24.useMemo(() => {
|
|
2016
2268
|
const elevationStyle = {
|
|
2017
2269
|
backgroundColor: bgColor || surfaceColor,
|
|
2018
|
-
|
|
2270
|
+
borderRadius: 8,
|
|
2271
|
+
overflow: "hidden",
|
|
2272
|
+
...shadowStyle,
|
|
2273
|
+
...accentStyle
|
|
2019
2274
|
};
|
|
2020
2275
|
if (borderColor) {
|
|
2021
2276
|
elevationStyle.borderColor = borderColor;
|
|
2022
2277
|
}
|
|
2023
2278
|
if (!style) return elevationStyle;
|
|
2024
|
-
return [
|
|
2025
|
-
}, [style, surfaceColor, shadowStyle, borderColor, bgColor]);
|
|
2279
|
+
return [elevationStyle, style];
|
|
2280
|
+
}, [style, surfaceColor, shadowStyle, borderColor, bgColor, accentStyle]);
|
|
2026
2281
|
if (isClickable) {
|
|
2027
|
-
return /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ jsx(
|
|
2028
2283
|
reactNative.Pressable,
|
|
2029
2284
|
{
|
|
2030
2285
|
onPress,
|
|
@@ -2038,13 +2293,13 @@ function Card({
|
|
|
2038
2293
|
}
|
|
2039
2294
|
);
|
|
2040
2295
|
}
|
|
2041
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: baseClassName, style: mergedStyle, ...props, children: cardContent });
|
|
2042
2297
|
}
|
|
2043
2298
|
function CardHeader({ children, className }) {
|
|
2044
|
-
return /* @__PURE__ */
|
|
2299
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("px-6 py-6", className), children });
|
|
2045
2300
|
}
|
|
2046
2301
|
function CardTitle({ children, className }) {
|
|
2047
|
-
return /* @__PURE__ */
|
|
2302
|
+
return /* @__PURE__ */ jsx(
|
|
2048
2303
|
reactNative.Text,
|
|
2049
2304
|
{
|
|
2050
2305
|
accessibilityRole: "header",
|
|
@@ -2054,13 +2309,13 @@ function CardTitle({ children, className }) {
|
|
|
2054
2309
|
);
|
|
2055
2310
|
}
|
|
2056
2311
|
function CardDescription({ children, className }) {
|
|
2057
|
-
return /* @__PURE__ */
|
|
2312
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: cn("mt-1.5 text-sm text-text-secondary", className), children });
|
|
2058
2313
|
}
|
|
2059
2314
|
function CardContent({ children, className }) {
|
|
2060
|
-
return /* @__PURE__ */
|
|
2315
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("px-6 py-4", className), children });
|
|
2061
2316
|
}
|
|
2062
2317
|
function CardFooter({ children, className }) {
|
|
2063
|
-
return /* @__PURE__ */
|
|
2318
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("px-6 py-4 flex-row items-center gap-2", className), children });
|
|
2064
2319
|
}
|
|
2065
2320
|
function CardSkeleton({
|
|
2066
2321
|
hasHeader = true,
|
|
@@ -2068,12 +2323,12 @@ function CardSkeleton({
|
|
|
2068
2323
|
contentLines = 3,
|
|
2069
2324
|
className
|
|
2070
2325
|
}) {
|
|
2071
|
-
return /* @__PURE__ */
|
|
2072
|
-
hasHeader && /* @__PURE__ */
|
|
2073
|
-
/* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ jsxs(Card, { variant: "elevated", elevation: 2, className: cn("animate-pulse", className), children: [
|
|
2327
|
+
hasHeader && /* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
2328
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "h-5 w-1/3 bg-interactive-disabled rounded" }),
|
|
2329
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "mt-2 h-4 w-2/3 bg-interactive-disabled rounded" })
|
|
2075
2330
|
] }),
|
|
2076
|
-
/* @__PURE__ */
|
|
2331
|
+
/* @__PURE__ */ jsx(CardContent, { children: Array.from({ length: contentLines }).map((_, i) => /* @__PURE__ */ jsx(
|
|
2077
2332
|
reactNative.View,
|
|
2078
2333
|
{
|
|
2079
2334
|
className: cn(
|
|
@@ -2083,9 +2338,60 @@ function CardSkeleton({
|
|
|
2083
2338
|
},
|
|
2084
2339
|
i
|
|
2085
2340
|
)) }),
|
|
2086
|
-
hasFooter && /* @__PURE__ */
|
|
2341
|
+
hasFooter && /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(reactNative.View, { className: "h-9 w-24 bg-interactive-disabled rounded" }) })
|
|
2087
2342
|
] });
|
|
2088
2343
|
}
|
|
2344
|
+
var sizeStyles3 = {
|
|
2345
|
+
xs: "w-1 h-1",
|
|
2346
|
+
sm: "w-1.5 h-1.5",
|
|
2347
|
+
md: "w-2 h-2",
|
|
2348
|
+
lg: "w-2.5 h-2.5"
|
|
2349
|
+
};
|
|
2350
|
+
var colorStyles = {
|
|
2351
|
+
default: "bg-text-tertiary",
|
|
2352
|
+
primary: "bg-brand-primary",
|
|
2353
|
+
success: "bg-status-success",
|
|
2354
|
+
error: "bg-status-error",
|
|
2355
|
+
warning: "bg-status-warning",
|
|
2356
|
+
info: "bg-status-info"
|
|
2357
|
+
};
|
|
2358
|
+
function Indicator({
|
|
2359
|
+
size = "sm",
|
|
2360
|
+
color = "default",
|
|
2361
|
+
customColor,
|
|
2362
|
+
glow = false,
|
|
2363
|
+
ring = false,
|
|
2364
|
+
className,
|
|
2365
|
+
style,
|
|
2366
|
+
...props
|
|
2367
|
+
}) {
|
|
2368
|
+
const dynamicStyle = {
|
|
2369
|
+
...typeof style === "object" ? style : {},
|
|
2370
|
+
...customColor ? { backgroundColor: customColor } : {},
|
|
2371
|
+
...glow && !customColor ? {} : {},
|
|
2372
|
+
...glow && customColor ? { boxShadow: `0 0 6px ${customColor}` } : {}
|
|
2373
|
+
};
|
|
2374
|
+
return /* @__PURE__ */ jsx(
|
|
2375
|
+
reactNative.View,
|
|
2376
|
+
{
|
|
2377
|
+
className: cn(
|
|
2378
|
+
"rounded-full shrink-0",
|
|
2379
|
+
sizeStyles3[size],
|
|
2380
|
+
!customColor && colorStyles[color],
|
|
2381
|
+
ring && "border-2 border-background-base",
|
|
2382
|
+
glow && !customColor && color === "success" && "shadow-[0_0_6px_rgba(20,184,166,0.6)]",
|
|
2383
|
+
glow && !customColor && color === "error" && "shadow-[0_0_6px_rgba(239,68,68,0.6)]",
|
|
2384
|
+
glow && !customColor && color === "warning" && "shadow-[0_0_6px_rgba(245,158,11,0.6)]",
|
|
2385
|
+
glow && !customColor && color === "primary" && "shadow-[0_0_6px_rgba(255,121,0,0.6)]",
|
|
2386
|
+
className
|
|
2387
|
+
),
|
|
2388
|
+
style: Object.keys(dynamicStyle).length > 0 ? dynamicStyle : style,
|
|
2389
|
+
...props
|
|
2390
|
+
}
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
// src/components/ui/badge/Badge.tsx
|
|
2089
2395
|
var variantColorStyles = {
|
|
2090
2396
|
solid: {
|
|
2091
2397
|
default: "bg-border-strong text-text-inverse",
|
|
@@ -2115,7 +2421,7 @@ var variantColorStyles = {
|
|
|
2115
2421
|
info: "border border-status-info text-status-info"
|
|
2116
2422
|
}
|
|
2117
2423
|
};
|
|
2118
|
-
var
|
|
2424
|
+
var sizeStyles4 = {
|
|
2119
2425
|
sm: "px-1.5 py-0.5 text-xs",
|
|
2120
2426
|
md: "px-2 py-0.5 text-xs",
|
|
2121
2427
|
lg: "px-2.5 py-1 text-sm"
|
|
@@ -2124,26 +2430,38 @@ function Badge({
|
|
|
2124
2430
|
variant = "subtle",
|
|
2125
2431
|
color = "default",
|
|
2126
2432
|
size = "md",
|
|
2433
|
+
dot,
|
|
2434
|
+
dotColor,
|
|
2127
2435
|
className,
|
|
2128
2436
|
children,
|
|
2129
2437
|
...props
|
|
2130
2438
|
}) {
|
|
2131
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ jsxs(
|
|
2132
2440
|
reactNative.View,
|
|
2133
2441
|
{
|
|
2134
2442
|
className: cn(
|
|
2135
2443
|
"inline-flex items-center justify-center rounded-full font-medium",
|
|
2136
2444
|
variantColorStyles[variant][color],
|
|
2137
|
-
|
|
2445
|
+
sizeStyles4[size],
|
|
2138
2446
|
className
|
|
2139
2447
|
),
|
|
2140
2448
|
...props,
|
|
2141
|
-
children:
|
|
2449
|
+
children: [
|
|
2450
|
+
dot && /* @__PURE__ */ jsx(
|
|
2451
|
+
Indicator,
|
|
2452
|
+
{
|
|
2453
|
+
size: "xs",
|
|
2454
|
+
color: dotColor ?? (color === "default" || color === "secondary" ? "default" : color),
|
|
2455
|
+
className: "mr-0.5"
|
|
2456
|
+
}
|
|
2457
|
+
),
|
|
2458
|
+
typeof children === "string" ? /* @__PURE__ */ jsx(reactNative.Text, { className: "text-inherit font-medium", children }) : children
|
|
2459
|
+
]
|
|
2142
2460
|
}
|
|
2143
2461
|
);
|
|
2144
2462
|
}
|
|
2145
2463
|
function BadgeText({ children, className }) {
|
|
2146
|
-
return /* @__PURE__ */
|
|
2464
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-inherit font-medium", className), children });
|
|
2147
2465
|
}
|
|
2148
2466
|
var sizeMap = {
|
|
2149
2467
|
sm: "small",
|
|
@@ -2170,14 +2488,14 @@ function Spinner({
|
|
|
2170
2488
|
className,
|
|
2171
2489
|
...props
|
|
2172
2490
|
}) {
|
|
2173
|
-
return /* @__PURE__ */
|
|
2491
|
+
return /* @__PURE__ */ jsx(
|
|
2174
2492
|
reactNative.View,
|
|
2175
2493
|
{
|
|
2176
2494
|
accessibilityRole: "progressbar",
|
|
2177
2495
|
accessibilityLabel: label,
|
|
2178
2496
|
className: cn("items-center justify-center", containerSizes[size], className),
|
|
2179
2497
|
...props,
|
|
2180
|
-
children: /* @__PURE__ */
|
|
2498
|
+
children: /* @__PURE__ */ jsx(
|
|
2181
2499
|
reactNative.ActivityIndicator,
|
|
2182
2500
|
{
|
|
2183
2501
|
size: sizeMap[size],
|
|
@@ -2187,7 +2505,33 @@ function Spinner({
|
|
|
2187
2505
|
}
|
|
2188
2506
|
);
|
|
2189
2507
|
}
|
|
2190
|
-
|
|
2508
|
+
|
|
2509
|
+
// src/utils/avatar-color.ts
|
|
2510
|
+
var AVATAR_COLORS = [
|
|
2511
|
+
"#FF6B6B",
|
|
2512
|
+
"#4ECDC4",
|
|
2513
|
+
"#45B7D1",
|
|
2514
|
+
"#96CEB4",
|
|
2515
|
+
"#FFEAA7",
|
|
2516
|
+
"#DDA0DD",
|
|
2517
|
+
"#98D8C8"
|
|
2518
|
+
];
|
|
2519
|
+
function avatarColor(name) {
|
|
2520
|
+
let hash = 0;
|
|
2521
|
+
for (let i = 0; i < name.length; i++) {
|
|
2522
|
+
hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
2523
|
+
}
|
|
2524
|
+
return AVATAR_COLORS[Math.abs(hash) % AVATAR_COLORS.length];
|
|
2525
|
+
}
|
|
2526
|
+
function getInitials(name) {
|
|
2527
|
+
const parts = name.trim().split(/\s+/);
|
|
2528
|
+
if (parts.length === 0) return "?";
|
|
2529
|
+
if (parts.length === 1) return parts[0][0]?.toUpperCase() ?? "?";
|
|
2530
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
// src/components/ui/avatar/Avatar.tsx
|
|
2534
|
+
var sizeStyles5 = {
|
|
2191
2535
|
xs: { container: "w-6 h-6", text: "text-xs", image: "w-6 h-6" },
|
|
2192
2536
|
sm: { container: "w-8 h-8", text: "text-xs", image: "w-8 h-8" },
|
|
2193
2537
|
md: { container: "w-10 h-10", text: "text-sm", image: "w-10 h-10" },
|
|
@@ -2200,31 +2544,35 @@ function Avatar({
|
|
|
2200
2544
|
source,
|
|
2201
2545
|
fallback,
|
|
2202
2546
|
alt,
|
|
2547
|
+
colorFromName,
|
|
2203
2548
|
className,
|
|
2204
2549
|
...props
|
|
2205
2550
|
}) {
|
|
2206
|
-
const styles2 =
|
|
2551
|
+
const styles2 = sizeStyles5[size];
|
|
2207
2552
|
const hasImage = source !== void 0;
|
|
2208
|
-
|
|
2553
|
+
const resolvedFallback = fallback ?? (colorFromName ? getInitials(colorFromName) : void 0);
|
|
2554
|
+
const nameColor = colorFromName ? avatarColor(colorFromName) : void 0;
|
|
2555
|
+
return /* @__PURE__ */ jsx(
|
|
2209
2556
|
reactNative.View,
|
|
2210
2557
|
{
|
|
2211
2558
|
accessibilityRole: "image",
|
|
2212
|
-
accessibilityLabel: alt ||
|
|
2559
|
+
accessibilityLabel: alt || resolvedFallback || "Avatar",
|
|
2213
2560
|
className: cn(
|
|
2214
2561
|
"items-center justify-center rounded-full overflow-hidden",
|
|
2215
|
-
"bg-border-strong",
|
|
2562
|
+
!nameColor && "bg-border-strong",
|
|
2216
2563
|
styles2.container,
|
|
2217
2564
|
className
|
|
2218
2565
|
),
|
|
2566
|
+
style: nameColor ? { backgroundColor: nameColor } : void 0,
|
|
2219
2567
|
...props,
|
|
2220
|
-
children: hasImage ? /* @__PURE__ */
|
|
2568
|
+
children: hasImage ? /* @__PURE__ */ jsx(
|
|
2221
2569
|
reactNative.Image,
|
|
2222
2570
|
{
|
|
2223
2571
|
source,
|
|
2224
2572
|
className: cn("rounded-full", styles2.image),
|
|
2225
2573
|
accessibilityLabel: alt
|
|
2226
2574
|
}
|
|
2227
|
-
) :
|
|
2575
|
+
) : resolvedFallback ? /* @__PURE__ */ jsx(reactNative.Text, { className: cn("font-semibold text-text-inverse", styles2.text), children: resolvedFallback }) : /* @__PURE__ */ jsx(reactNative.View, { className: "w-full h-full bg-surface-raised" })
|
|
2228
2576
|
}
|
|
2229
2577
|
);
|
|
2230
2578
|
}
|
|
@@ -2235,7 +2583,7 @@ var badgeColors = {
|
|
|
2235
2583
|
default: "bg-border-strong"
|
|
2236
2584
|
};
|
|
2237
2585
|
function AvatarBadge({ color = "success", className }) {
|
|
2238
|
-
return /* @__PURE__ */
|
|
2586
|
+
return /* @__PURE__ */ jsx(
|
|
2239
2587
|
reactNative.View,
|
|
2240
2588
|
{
|
|
2241
2589
|
className: cn(
|
|
@@ -2255,8 +2603,8 @@ function AvatarGroup({
|
|
|
2255
2603
|
const childArray = React24__default.default.Children.toArray(children);
|
|
2256
2604
|
const visibleChildren = max ? childArray.slice(0, max) : childArray;
|
|
2257
2605
|
const remainingCount = max ? Math.max(0, childArray.length - max) : 0;
|
|
2258
|
-
return /* @__PURE__ */
|
|
2259
|
-
visibleChildren.map((child, index) => /* @__PURE__ */
|
|
2606
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row", className), children: [
|
|
2607
|
+
visibleChildren.map((child, index) => /* @__PURE__ */ jsx(
|
|
2260
2608
|
reactNative.View,
|
|
2261
2609
|
{
|
|
2262
2610
|
className: cn(
|
|
@@ -2267,15 +2615,15 @@ function AvatarGroup({
|
|
|
2267
2615
|
},
|
|
2268
2616
|
index
|
|
2269
2617
|
)),
|
|
2270
|
-
remainingCount > 0 && /* @__PURE__ */
|
|
2618
|
+
remainingCount > 0 && /* @__PURE__ */ jsx(
|
|
2271
2619
|
reactNative.View,
|
|
2272
2620
|
{
|
|
2273
2621
|
className: cn(
|
|
2274
2622
|
"border-2 border-surface-base rounded-full -ml-2",
|
|
2275
2623
|
"items-center justify-center bg-surface-raised",
|
|
2276
|
-
|
|
2624
|
+
sizeStyles5[size].container
|
|
2277
2625
|
),
|
|
2278
|
-
children: /* @__PURE__ */
|
|
2626
|
+
children: /* @__PURE__ */ jsxs(reactNative.Text, { className: cn("font-semibold text-text-secondary", sizeStyles5[size].text), children: [
|
|
2279
2627
|
"+",
|
|
2280
2628
|
remainingCount
|
|
2281
2629
|
] })
|
|
@@ -2288,7 +2636,7 @@ function Divider({
|
|
|
2288
2636
|
className,
|
|
2289
2637
|
...props
|
|
2290
2638
|
}) {
|
|
2291
|
-
return /* @__PURE__ */
|
|
2639
|
+
return /* @__PURE__ */ jsx(
|
|
2292
2640
|
reactNative.View,
|
|
2293
2641
|
{
|
|
2294
2642
|
accessibilityRole: "none",
|
|
@@ -2301,7 +2649,7 @@ function Divider({
|
|
|
2301
2649
|
}
|
|
2302
2650
|
);
|
|
2303
2651
|
}
|
|
2304
|
-
var
|
|
2652
|
+
var sizeStyles6 = {
|
|
2305
2653
|
sm: { box: "w-4 h-4", icon: "w-2.5 h-2.5", label: "text-sm" },
|
|
2306
2654
|
md: { box: "w-5 h-5", icon: "w-3 h-3", label: "text-base" },
|
|
2307
2655
|
lg: { box: "w-6 h-6", icon: "w-3.5 h-3.5", label: "text-lg" }
|
|
@@ -2319,13 +2667,13 @@ var Checkbox = React24.forwardRef(function Checkbox2({
|
|
|
2319
2667
|
className,
|
|
2320
2668
|
...props
|
|
2321
2669
|
}, ref) {
|
|
2322
|
-
const styles2 =
|
|
2670
|
+
const styles2 = sizeStyles6[size];
|
|
2323
2671
|
const handlePress = () => {
|
|
2324
2672
|
if (!isDisabled) {
|
|
2325
2673
|
onCheckedChange?.(!isChecked);
|
|
2326
2674
|
}
|
|
2327
2675
|
};
|
|
2328
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ jsxs(
|
|
2329
2677
|
reactNative.Pressable,
|
|
2330
2678
|
{
|
|
2331
2679
|
ref,
|
|
@@ -2344,7 +2692,7 @@ var Checkbox = React24.forwardRef(function Checkbox2({
|
|
|
2344
2692
|
),
|
|
2345
2693
|
...props,
|
|
2346
2694
|
children: [
|
|
2347
|
-
/* @__PURE__ */
|
|
2695
|
+
/* @__PURE__ */ jsxs(
|
|
2348
2696
|
reactNative.View,
|
|
2349
2697
|
{
|
|
2350
2698
|
className: cn(
|
|
@@ -2355,14 +2703,14 @@ var Checkbox = React24.forwardRef(function Checkbox2({
|
|
|
2355
2703
|
!isDisabled && "web:hover:border-brand-primary"
|
|
2356
2704
|
),
|
|
2357
2705
|
children: [
|
|
2358
|
-
isChecked && !isIndeterminate && /* @__PURE__ */
|
|
2359
|
-
isIndeterminate && /* @__PURE__ */
|
|
2706
|
+
isChecked && !isIndeterminate && /* @__PURE__ */ jsx(reactNative.View, { className: cn("bg-white rounded-sm", styles2.icon), children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-brand-primary font-bold text-center leading-none", children: "\u2713" }) }),
|
|
2707
|
+
isIndeterminate && /* @__PURE__ */ jsx(reactNative.View, { className: cn("bg-white h-0.5 w-2/3 rounded") })
|
|
2360
2708
|
]
|
|
2361
2709
|
}
|
|
2362
2710
|
),
|
|
2363
|
-
(label || helperText) && /* @__PURE__ */
|
|
2364
|
-
label && /* @__PURE__ */
|
|
2365
|
-
helperText && /* @__PURE__ */
|
|
2711
|
+
(label || helperText) && /* @__PURE__ */ jsxs(reactNative.View, { className: "flex-1", children: [
|
|
2712
|
+
label && /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-text-primary font-medium", styles2.label), children: label }),
|
|
2713
|
+
helperText && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-xs text-text-secondary mt-0.5", children: helperText })
|
|
2366
2714
|
] })
|
|
2367
2715
|
]
|
|
2368
2716
|
}
|
|
@@ -2374,9 +2722,9 @@ function CheckboxGroup({
|
|
|
2374
2722
|
orientation = "vertical",
|
|
2375
2723
|
className
|
|
2376
2724
|
}) {
|
|
2377
|
-
return /* @__PURE__ */
|
|
2378
|
-
label && /* @__PURE__ */
|
|
2379
|
-
/* @__PURE__ */
|
|
2725
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("gap-1", className), children: [
|
|
2726
|
+
label && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm font-medium text-text-primary mb-2", children: label }),
|
|
2727
|
+
/* @__PURE__ */ jsx(
|
|
2380
2728
|
reactNative.View,
|
|
2381
2729
|
{
|
|
2382
2730
|
className: cn(
|
|
@@ -2387,7 +2735,7 @@ function CheckboxGroup({
|
|
|
2387
2735
|
)
|
|
2388
2736
|
] });
|
|
2389
2737
|
}
|
|
2390
|
-
var
|
|
2738
|
+
var sizeStyles7 = {
|
|
2391
2739
|
sm: { track: "w-8 h-4", thumb: "w-3 h-3", translate: "translate-x-4" },
|
|
2392
2740
|
md: { track: "w-10 h-5", thumb: "w-4 h-4", translate: "translate-x-5" },
|
|
2393
2741
|
lg: { track: "w-12 h-6", thumb: "w-5 h-5", translate: "translate-x-6" }
|
|
@@ -2402,13 +2750,13 @@ var Switch = React24.forwardRef(function Switch2({
|
|
|
2402
2750
|
className,
|
|
2403
2751
|
...props
|
|
2404
2752
|
}, ref) {
|
|
2405
|
-
const styles2 =
|
|
2753
|
+
const styles2 = sizeStyles7[size];
|
|
2406
2754
|
const handlePress = () => {
|
|
2407
2755
|
if (!isDisabled) {
|
|
2408
2756
|
onCheckedChange?.(!isChecked);
|
|
2409
2757
|
}
|
|
2410
2758
|
};
|
|
2411
|
-
const switchElement = /* @__PURE__ */
|
|
2759
|
+
const switchElement = /* @__PURE__ */ jsx(
|
|
2412
2760
|
reactNative.View,
|
|
2413
2761
|
{
|
|
2414
2762
|
className: cn(
|
|
@@ -2416,7 +2764,7 @@ var Switch = React24.forwardRef(function Switch2({
|
|
|
2416
2764
|
styles2.track,
|
|
2417
2765
|
isChecked ? "bg-brand-primary" : "bg-border-strong"
|
|
2418
2766
|
),
|
|
2419
|
-
children: /* @__PURE__ */
|
|
2767
|
+
children: /* @__PURE__ */ jsx(
|
|
2420
2768
|
reactNative.View,
|
|
2421
2769
|
{
|
|
2422
2770
|
className: cn(
|
|
@@ -2428,7 +2776,7 @@ var Switch = React24.forwardRef(function Switch2({
|
|
|
2428
2776
|
)
|
|
2429
2777
|
}
|
|
2430
2778
|
);
|
|
2431
|
-
return /* @__PURE__ */
|
|
2779
|
+
return /* @__PURE__ */ jsxs(
|
|
2432
2780
|
reactNative.Pressable,
|
|
2433
2781
|
{
|
|
2434
2782
|
ref,
|
|
@@ -2444,15 +2792,15 @@ var Switch = React24.forwardRef(function Switch2({
|
|
|
2444
2792
|
),
|
|
2445
2793
|
...props,
|
|
2446
2794
|
children: [
|
|
2447
|
-
label && labelPosition === "left" && /* @__PURE__ */
|
|
2795
|
+
label && labelPosition === "left" && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-primary font-medium", children: label }),
|
|
2448
2796
|
switchElement,
|
|
2449
|
-
label && labelPosition === "right" && /* @__PURE__ */
|
|
2797
|
+
label && labelPosition === "right" && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-primary font-medium", children: label })
|
|
2450
2798
|
]
|
|
2451
2799
|
}
|
|
2452
2800
|
);
|
|
2453
2801
|
});
|
|
2454
2802
|
var ModalContext = React24.createContext({ size: "md", scrollBehavior: "outside" });
|
|
2455
|
-
var
|
|
2803
|
+
var sizeStyles8 = {
|
|
2456
2804
|
xs: "max-w-xs",
|
|
2457
2805
|
sm: "max-w-sm",
|
|
2458
2806
|
md: "max-w-md",
|
|
@@ -2477,7 +2825,7 @@ function Modal({
|
|
|
2477
2825
|
onClose();
|
|
2478
2826
|
}
|
|
2479
2827
|
};
|
|
2480
|
-
const backdropContent = /* @__PURE__ */
|
|
2828
|
+
const backdropContent = /* @__PURE__ */ jsx(
|
|
2481
2829
|
reactNative.Pressable,
|
|
2482
2830
|
{
|
|
2483
2831
|
onPress: handleBackdropPress,
|
|
@@ -2489,7 +2837,7 @@ function Modal({
|
|
|
2489
2837
|
children
|
|
2490
2838
|
}
|
|
2491
2839
|
);
|
|
2492
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ jsx(ModalContext.Provider, { value: { onClose, size, scrollBehavior }, children: /* @__PURE__ */ jsx(
|
|
2493
2841
|
reactNative.Modal,
|
|
2494
2842
|
{
|
|
2495
2843
|
visible: isOpen,
|
|
@@ -2497,7 +2845,7 @@ function Modal({
|
|
|
2497
2845
|
animationType,
|
|
2498
2846
|
onRequestClose: onClose,
|
|
2499
2847
|
...props,
|
|
2500
|
-
children: scrollBehavior === "outside" ? /* @__PURE__ */
|
|
2848
|
+
children: scrollBehavior === "outside" ? /* @__PURE__ */ jsx(
|
|
2501
2849
|
reactNative.ScrollView,
|
|
2502
2850
|
{
|
|
2503
2851
|
contentContainerStyle: { flexGrow: 1 },
|
|
@@ -2510,16 +2858,16 @@ function Modal({
|
|
|
2510
2858
|
}
|
|
2511
2859
|
function ModalContent({ children, className }) {
|
|
2512
2860
|
const { size } = React24.useContext(ModalContext);
|
|
2513
|
-
return /* @__PURE__ */
|
|
2861
|
+
return /* @__PURE__ */ jsx(
|
|
2514
2862
|
reactNative.Pressable,
|
|
2515
2863
|
{
|
|
2516
2864
|
onPress: (e) => e.stopPropagation(),
|
|
2517
|
-
children: /* @__PURE__ */
|
|
2865
|
+
children: /* @__PURE__ */ jsx(
|
|
2518
2866
|
reactNative.View,
|
|
2519
2867
|
{
|
|
2520
2868
|
className: cn(
|
|
2521
2869
|
"bg-surface-elevated rounded-lg shadow-xl w-full",
|
|
2522
|
-
|
|
2870
|
+
sizeStyles8[size],
|
|
2523
2871
|
className
|
|
2524
2872
|
),
|
|
2525
2873
|
children
|
|
@@ -2529,10 +2877,10 @@ function ModalContent({ children, className }) {
|
|
|
2529
2877
|
);
|
|
2530
2878
|
}
|
|
2531
2879
|
function ModalHeader({ children, className }) {
|
|
2532
|
-
return /* @__PURE__ */
|
|
2880
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-row items-center justify-between px-6 py-4 border-b border-divider", className), children });
|
|
2533
2881
|
}
|
|
2534
2882
|
function ModalTitle({ children, className }) {
|
|
2535
|
-
return /* @__PURE__ */
|
|
2883
|
+
return /* @__PURE__ */ jsx(
|
|
2536
2884
|
reactNative.Text,
|
|
2537
2885
|
{
|
|
2538
2886
|
accessibilityRole: "header",
|
|
@@ -2543,7 +2891,7 @@ function ModalTitle({ children, className }) {
|
|
|
2543
2891
|
}
|
|
2544
2892
|
function ModalCloseButton({ className }) {
|
|
2545
2893
|
const { onClose } = React24.useContext(ModalContext);
|
|
2546
|
-
return /* @__PURE__ */
|
|
2894
|
+
return /* @__PURE__ */ jsx(
|
|
2547
2895
|
reactNative.Pressable,
|
|
2548
2896
|
{
|
|
2549
2897
|
onPress: onClose,
|
|
@@ -2553,14 +2901,14 @@ function ModalCloseButton({ className }) {
|
|
|
2553
2901
|
"p-1 rounded-md web:hover:bg-interactive-hover active:bg-interactive-active",
|
|
2554
2902
|
className
|
|
2555
2903
|
),
|
|
2556
|
-
children: /* @__PURE__ */
|
|
2904
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-secondary text-xl leading-none", children: "\xD7" })
|
|
2557
2905
|
}
|
|
2558
2906
|
);
|
|
2559
2907
|
}
|
|
2560
2908
|
function ModalBody({ children, maxHeight, className }) {
|
|
2561
2909
|
const { scrollBehavior } = React24.useContext(ModalContext);
|
|
2562
2910
|
if (scrollBehavior === "inside") {
|
|
2563
|
-
return /* @__PURE__ */
|
|
2911
|
+
return /* @__PURE__ */ jsx(
|
|
2564
2912
|
reactNative.ScrollView,
|
|
2565
2913
|
{
|
|
2566
2914
|
className: cn("px-6 py-4", className),
|
|
@@ -2570,10 +2918,10 @@ function ModalBody({ children, maxHeight, className }) {
|
|
|
2570
2918
|
}
|
|
2571
2919
|
);
|
|
2572
2920
|
}
|
|
2573
|
-
return /* @__PURE__ */
|
|
2921
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("px-6 py-4", className), children });
|
|
2574
2922
|
}
|
|
2575
2923
|
function ModalFooter({ children, className }) {
|
|
2576
|
-
return /* @__PURE__ */
|
|
2924
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-row items-center justify-end gap-2 px-6 py-4 border-t border-divider", className), children });
|
|
2577
2925
|
}
|
|
2578
2926
|
function Skeleton({
|
|
2579
2927
|
variant = "text",
|
|
@@ -2603,7 +2951,7 @@ function Skeleton({
|
|
|
2603
2951
|
if (width && !height) finalHeight = width;
|
|
2604
2952
|
if (height && !width) finalWidth = height;
|
|
2605
2953
|
}
|
|
2606
|
-
return /* @__PURE__ */
|
|
2954
|
+
return /* @__PURE__ */ jsx(
|
|
2607
2955
|
reactNative.View,
|
|
2608
2956
|
{
|
|
2609
2957
|
accessibilityRole: "none",
|
|
@@ -2633,7 +2981,7 @@ function SkeletonText({
|
|
|
2633
2981
|
animation = "pulse",
|
|
2634
2982
|
className
|
|
2635
2983
|
}) {
|
|
2636
|
-
return /* @__PURE__ */
|
|
2984
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("gap-2", className), style: { gap }, children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsx(
|
|
2637
2985
|
Skeleton,
|
|
2638
2986
|
{
|
|
2639
2987
|
variant: "text",
|
|
@@ -2648,7 +2996,7 @@ function SkeletonCircle({
|
|
|
2648
2996
|
animation = "pulse",
|
|
2649
2997
|
className
|
|
2650
2998
|
}) {
|
|
2651
|
-
return /* @__PURE__ */
|
|
2999
|
+
return /* @__PURE__ */ jsx(
|
|
2652
3000
|
Skeleton,
|
|
2653
3001
|
{
|
|
2654
3002
|
variant: "circle",
|
|
@@ -2666,8 +3014,8 @@ function SkeletonCard({
|
|
|
2666
3014
|
animation = "pulse",
|
|
2667
3015
|
className
|
|
2668
3016
|
}) {
|
|
2669
|
-
return /* @__PURE__ */
|
|
2670
|
-
hasImage && /* @__PURE__ */
|
|
3017
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("rounded-lg overflow-hidden bg-surface-elevated", className), children: [
|
|
3018
|
+
hasImage && /* @__PURE__ */ jsx(
|
|
2671
3019
|
Skeleton,
|
|
2672
3020
|
{
|
|
2673
3021
|
variant: "rect",
|
|
@@ -2676,9 +3024,9 @@ function SkeletonCard({
|
|
|
2676
3024
|
animation
|
|
2677
3025
|
}
|
|
2678
3026
|
),
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2681
|
-
/* @__PURE__ */
|
|
3027
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "p-4 gap-3", children: [
|
|
3028
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "70%", animation }),
|
|
3029
|
+
/* @__PURE__ */ jsx(SkeletonText, { lines, animation })
|
|
2682
3030
|
] })
|
|
2683
3031
|
] });
|
|
2684
3032
|
}
|
|
@@ -2689,9 +3037,9 @@ function SkeletonListItem({
|
|
|
2689
3037
|
animation = "pulse",
|
|
2690
3038
|
className
|
|
2691
3039
|
}) {
|
|
2692
|
-
return /* @__PURE__ */
|
|
2693
|
-
hasAvatar && /* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row items-center gap-3 p-3", className), children: [
|
|
3041
|
+
hasAvatar && /* @__PURE__ */ jsx(SkeletonCircle, { size: avatarSize, animation }),
|
|
3042
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-1", children: /* @__PURE__ */ jsx(SkeletonText, { lines, animation }) })
|
|
2695
3043
|
] });
|
|
2696
3044
|
}
|
|
2697
3045
|
var TabsContext = React24.createContext({
|
|
@@ -2719,7 +3067,7 @@ function Tabs({
|
|
|
2719
3067
|
}
|
|
2720
3068
|
onChange?.(newIndex);
|
|
2721
3069
|
};
|
|
2722
|
-
return /* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { activeIndex, setActiveIndex, variant, orientation }, children: /* @__PURE__ */ jsx(
|
|
2723
3071
|
reactNative.View,
|
|
2724
3072
|
{
|
|
2725
3073
|
className: cn(
|
|
@@ -2738,7 +3086,7 @@ function TabList({ children, className }) {
|
|
|
2738
3086
|
enclosed: "bg-surface-raised rounded-lg p-1",
|
|
2739
3087
|
"soft-rounded": "bg-surface-raised rounded-full p-1"
|
|
2740
3088
|
};
|
|
2741
|
-
const content = /* @__PURE__ */
|
|
3089
|
+
const content = /* @__PURE__ */ jsx(
|
|
2742
3090
|
reactNative.View,
|
|
2743
3091
|
{
|
|
2744
3092
|
className: cn(
|
|
@@ -2755,7 +3103,7 @@ function TabList({ children, className }) {
|
|
|
2755
3103
|
}
|
|
2756
3104
|
);
|
|
2757
3105
|
if (orientation === "horizontal") {
|
|
2758
|
-
return /* @__PURE__ */
|
|
3106
|
+
return /* @__PURE__ */ jsx(
|
|
2759
3107
|
reactNative.ScrollView,
|
|
2760
3108
|
{
|
|
2761
3109
|
horizontal: true,
|
|
@@ -2791,7 +3139,7 @@ function Tab({
|
|
|
2791
3139
|
isActive ? "bg-brand-primary text-white" : "text-text-secondary web:hover:text-text-primary"
|
|
2792
3140
|
)
|
|
2793
3141
|
};
|
|
2794
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ jsx(
|
|
2795
3143
|
reactNative.Pressable,
|
|
2796
3144
|
{
|
|
2797
3145
|
accessibilityRole: "tab",
|
|
@@ -2804,7 +3152,7 @@ function Tab({
|
|
|
2804
3152
|
isDisabled && "opacity-50 cursor-not-allowed",
|
|
2805
3153
|
className
|
|
2806
3154
|
),
|
|
2807
|
-
children: /* @__PURE__ */
|
|
3155
|
+
children: /* @__PURE__ */ jsx(
|
|
2808
3156
|
reactNative.Text,
|
|
2809
3157
|
{
|
|
2810
3158
|
className: cn(
|
|
@@ -2819,7 +3167,7 @@ function Tab({
|
|
|
2819
3167
|
}
|
|
2820
3168
|
function TabPanels({ children, className }) {
|
|
2821
3169
|
const { activeIndex } = React24.useContext(TabsContext);
|
|
2822
|
-
return /* @__PURE__ */
|
|
3170
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-1", className), children: React24__default.default.Children.map(children, (child, index) => {
|
|
2823
3171
|
if (React24__default.default.isValidElement(child) && index === activeIndex) {
|
|
2824
3172
|
return child;
|
|
2825
3173
|
}
|
|
@@ -2827,9 +3175,9 @@ function TabPanels({ children, className }) {
|
|
|
2827
3175
|
}) });
|
|
2828
3176
|
}
|
|
2829
3177
|
function TabPanel({ children, className }) {
|
|
2830
|
-
return /* @__PURE__ */
|
|
3178
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("py-4", className), children });
|
|
2831
3179
|
}
|
|
2832
|
-
var
|
|
3180
|
+
var colorStyles2 = {
|
|
2833
3181
|
default: {
|
|
2834
3182
|
solid: "bg-neutral-600 text-white",
|
|
2835
3183
|
subtle: "bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-200",
|
|
@@ -2866,7 +3214,7 @@ var colorStyles = {
|
|
|
2866
3214
|
outline: "border border-status-info text-status-info"
|
|
2867
3215
|
}
|
|
2868
3216
|
};
|
|
2869
|
-
var
|
|
3217
|
+
var sizeStyles9 = {
|
|
2870
3218
|
sm: { container: "px-2 py-0.5 rounded", text: "text-xs", deleteButton: "ml-1 -mr-0.5" },
|
|
2871
3219
|
md: { container: "px-3 py-1 rounded-md", text: "text-sm", deleteButton: "ml-1.5 -mr-1" },
|
|
2872
3220
|
lg: { container: "px-4 py-1.5 rounded-md", text: "text-base", deleteButton: "ml-2 -mr-1" }
|
|
@@ -2883,12 +3231,12 @@ function Chip({
|
|
|
2883
3231
|
children,
|
|
2884
3232
|
...props
|
|
2885
3233
|
}) {
|
|
2886
|
-
const sizes =
|
|
3234
|
+
const sizes = sizeStyles9[size];
|
|
2887
3235
|
const isClickable = !!onPress;
|
|
2888
|
-
const content = /* @__PURE__ */
|
|
2889
|
-
leftElement && /* @__PURE__ */
|
|
2890
|
-
/* @__PURE__ */
|
|
2891
|
-
onDelete && /* @__PURE__ */
|
|
3236
|
+
const content = /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
3237
|
+
leftElement && /* @__PURE__ */ jsx(reactNative.View, { className: "mr-1.5", children: leftElement }),
|
|
3238
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: cn("font-medium", sizes.text), children }),
|
|
3239
|
+
onDelete && /* @__PURE__ */ jsx(
|
|
2892
3240
|
reactNative.Pressable,
|
|
2893
3241
|
{
|
|
2894
3242
|
onPress: (e) => {
|
|
@@ -2902,20 +3250,20 @@ function Chip({
|
|
|
2902
3250
|
sizes.deleteButton,
|
|
2903
3251
|
"rounded-full p-0.5 web:hover:bg-black/10 active:bg-black/20"
|
|
2904
3252
|
),
|
|
2905
|
-
children: /* @__PURE__ */
|
|
3253
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-xs leading-none", children: "\xD7" })
|
|
2906
3254
|
}
|
|
2907
3255
|
)
|
|
2908
3256
|
] });
|
|
2909
3257
|
const baseClassName = cn(
|
|
2910
3258
|
"flex-row items-center",
|
|
2911
3259
|
sizes.container,
|
|
2912
|
-
|
|
3260
|
+
colorStyles2[color][variant],
|
|
2913
3261
|
isClickable && "web:cursor-pointer web:hover:opacity-80 active:opacity-70",
|
|
2914
3262
|
isDisabled && "opacity-50 cursor-not-allowed",
|
|
2915
3263
|
className
|
|
2916
3264
|
);
|
|
2917
3265
|
if (isClickable) {
|
|
2918
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ jsx(
|
|
2919
3267
|
reactNative.Pressable,
|
|
2920
3268
|
{
|
|
2921
3269
|
onPress,
|
|
@@ -2927,9 +3275,9 @@ function Chip({
|
|
|
2927
3275
|
}
|
|
2928
3276
|
);
|
|
2929
3277
|
}
|
|
2930
|
-
return /* @__PURE__ */
|
|
3278
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: baseClassName, ...props, children: content });
|
|
2931
3279
|
}
|
|
2932
|
-
var
|
|
3280
|
+
var colorStyles3 = {
|
|
2933
3281
|
default: "text-text-link",
|
|
2934
3282
|
primary: "text-brand-primary",
|
|
2935
3283
|
secondary: "text-brand-secondary",
|
|
@@ -2955,19 +3303,19 @@ function Link({
|
|
|
2955
3303
|
if (isDisabled) return;
|
|
2956
3304
|
onPress?.();
|
|
2957
3305
|
};
|
|
2958
|
-
return /* @__PURE__ */
|
|
3306
|
+
return /* @__PURE__ */ jsx(
|
|
2959
3307
|
reactNative.Pressable,
|
|
2960
3308
|
{
|
|
2961
3309
|
onPress: handlePress,
|
|
2962
3310
|
disabled: isDisabled,
|
|
2963
3311
|
accessibilityRole: "link",
|
|
2964
3312
|
accessibilityHint: isExternal ? "Opens in new window" : void 0,
|
|
2965
|
-
children: /* @__PURE__ */
|
|
3313
|
+
children: /* @__PURE__ */ jsxs(
|
|
2966
3314
|
reactNative.Text,
|
|
2967
3315
|
{
|
|
2968
3316
|
className: cn(
|
|
2969
3317
|
"font-medium",
|
|
2970
|
-
|
|
3318
|
+
colorStyles3[color],
|
|
2971
3319
|
underlineStyles[underline],
|
|
2972
3320
|
isDisabled && "opacity-50 cursor-not-allowed",
|
|
2973
3321
|
"web:cursor-pointer active:opacity-70",
|
|
@@ -2983,8 +3331,16 @@ function Link({
|
|
|
2983
3331
|
}
|
|
2984
3332
|
);
|
|
2985
3333
|
}
|
|
3334
|
+
var createPortal;
|
|
3335
|
+
if (reactNative.Platform.OS === "web") {
|
|
3336
|
+
try {
|
|
3337
|
+
createPortal = __require("react-dom").createPortal;
|
|
3338
|
+
} catch {
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
2986
3341
|
function Tooltip({
|
|
2987
3342
|
label,
|
|
3343
|
+
content,
|
|
2988
3344
|
children,
|
|
2989
3345
|
placement = "top",
|
|
2990
3346
|
openDelay = 0,
|
|
@@ -2992,11 +3348,48 @@ function Tooltip({
|
|
|
2992
3348
|
hasArrow = true,
|
|
2993
3349
|
isDisabled = false,
|
|
2994
3350
|
className,
|
|
3351
|
+
usePortal: usePortalProp = false,
|
|
2995
3352
|
...props
|
|
2996
3353
|
}) {
|
|
2997
3354
|
const [isVisible, setIsVisible] = React24.useState(false);
|
|
3355
|
+
const [portalPos, setPortalPos] = React24.useState(null);
|
|
2998
3356
|
const openTimeoutRef = React24.useRef(null);
|
|
2999
3357
|
const closeTimeoutRef = React24.useRef(null);
|
|
3358
|
+
const triggerRef = React24.useRef(null);
|
|
3359
|
+
const isPortalMode = usePortalProp && reactNative.Platform.OS === "web" && !!createPortal;
|
|
3360
|
+
React24.useEffect(() => {
|
|
3361
|
+
if (!isVisible || !isPortalMode || !triggerRef.current) return;
|
|
3362
|
+
const node = triggerRef.current;
|
|
3363
|
+
const id = requestAnimationFrame(() => {
|
|
3364
|
+
const rect = node.getBoundingClientRect();
|
|
3365
|
+
const gap = 8;
|
|
3366
|
+
const cardinal = placement.split("-")[0];
|
|
3367
|
+
const positions = {
|
|
3368
|
+
top: {
|
|
3369
|
+
top: rect.top - gap,
|
|
3370
|
+
left: rect.left + rect.width / 2,
|
|
3371
|
+
transform: "translate(-50%, -100%)"
|
|
3372
|
+
},
|
|
3373
|
+
bottom: {
|
|
3374
|
+
top: rect.bottom + gap,
|
|
3375
|
+
left: rect.left + rect.width / 2,
|
|
3376
|
+
transform: "translate(-50%, 0%)"
|
|
3377
|
+
},
|
|
3378
|
+
left: {
|
|
3379
|
+
top: rect.top + rect.height / 2,
|
|
3380
|
+
left: rect.left - gap,
|
|
3381
|
+
transform: "translate(-100%, -50%)"
|
|
3382
|
+
},
|
|
3383
|
+
right: {
|
|
3384
|
+
top: rect.top + rect.height / 2,
|
|
3385
|
+
left: rect.right + gap,
|
|
3386
|
+
transform: "translate(0%, -50%)"
|
|
3387
|
+
}
|
|
3388
|
+
};
|
|
3389
|
+
setPortalPos(positions[cardinal] ?? positions.top);
|
|
3390
|
+
});
|
|
3391
|
+
return () => cancelAnimationFrame(id);
|
|
3392
|
+
}, [isVisible, isPortalMode, placement]);
|
|
3000
3393
|
const clearTimeouts = () => {
|
|
3001
3394
|
if (openTimeoutRef.current) clearTimeout(openTimeoutRef.current);
|
|
3002
3395
|
if (closeTimeoutRef.current) clearTimeout(closeTimeoutRef.current);
|
|
@@ -3038,8 +3431,42 @@ function Tooltip({
|
|
|
3038
3431
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
3039
3432
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
3040
3433
|
};
|
|
3041
|
-
|
|
3042
|
-
/* @__PURE__ */
|
|
3434
|
+
const tooltipContent = /* @__PURE__ */ jsxs(reactNative.View, { className: "bg-neutral-800 px-3 py-2 rounded-md shadow-lg max-w-xs", children: [
|
|
3435
|
+
content ?? /* @__PURE__ */ jsx(reactNative.Text, { className: "text-white text-sm", children: label }),
|
|
3436
|
+
hasArrow && /* @__PURE__ */ jsx(
|
|
3437
|
+
reactNative.View,
|
|
3438
|
+
{
|
|
3439
|
+
className: cn(
|
|
3440
|
+
"absolute w-0 h-0 border-4",
|
|
3441
|
+
arrowStyles2[placement]
|
|
3442
|
+
)
|
|
3443
|
+
}
|
|
3444
|
+
)
|
|
3445
|
+
] });
|
|
3446
|
+
const renderPortalTooltip = () => {
|
|
3447
|
+
if (!isVisible || !isPortalMode || !createPortal) return null;
|
|
3448
|
+
return createPortal(
|
|
3449
|
+
/* @__PURE__ */ jsx(
|
|
3450
|
+
"div",
|
|
3451
|
+
{
|
|
3452
|
+
style: {
|
|
3453
|
+
position: "fixed",
|
|
3454
|
+
top: portalPos?.top ?? 0,
|
|
3455
|
+
left: portalPos?.left ?? 0,
|
|
3456
|
+
transform: portalPos?.transform ?? "translate(-50%, -100%)",
|
|
3457
|
+
zIndex: 1e4,
|
|
3458
|
+
pointerEvents: "none"
|
|
3459
|
+
},
|
|
3460
|
+
"data-testid": "tooltip-portal",
|
|
3461
|
+
className,
|
|
3462
|
+
children: tooltipContent
|
|
3463
|
+
}
|
|
3464
|
+
),
|
|
3465
|
+
document.body
|
|
3466
|
+
);
|
|
3467
|
+
};
|
|
3468
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: "relative", ref: triggerRef, ...props, children: [
|
|
3469
|
+
/* @__PURE__ */ jsx(
|
|
3043
3470
|
reactNative.Pressable,
|
|
3044
3471
|
{
|
|
3045
3472
|
onHoverIn: show,
|
|
@@ -3050,27 +3477,16 @@ function Tooltip({
|
|
|
3050
3477
|
children
|
|
3051
3478
|
}
|
|
3052
3479
|
),
|
|
3053
|
-
isVisible && /* @__PURE__ */
|
|
3480
|
+
isPortalMode ? renderPortalTooltip() : isVisible && /* @__PURE__ */ jsx(
|
|
3054
3481
|
reactNative.View,
|
|
3055
3482
|
{
|
|
3056
3483
|
className: cn(
|
|
3057
|
-
"absolute z-50",
|
|
3484
|
+
"absolute z-50 web:animate-fade-in",
|
|
3058
3485
|
tooltipPositionStyles[placement],
|
|
3059
3486
|
className
|
|
3060
3487
|
),
|
|
3061
3488
|
pointerEvents: "none",
|
|
3062
|
-
children:
|
|
3063
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: "text-white text-sm", children: label }),
|
|
3064
|
-
hasArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3065
|
-
reactNative.View,
|
|
3066
|
-
{
|
|
3067
|
-
className: cn(
|
|
3068
|
-
"absolute w-0 h-0 border-4",
|
|
3069
|
-
arrowStyles2[placement]
|
|
3070
|
-
)
|
|
3071
|
-
}
|
|
3072
|
-
)
|
|
3073
|
-
] })
|
|
3489
|
+
children: tooltipContent
|
|
3074
3490
|
}
|
|
3075
3491
|
)
|
|
3076
3492
|
] });
|
|
@@ -3097,11 +3513,11 @@ function Collapse({
|
|
|
3097
3513
|
}
|
|
3098
3514
|
onToggle?.(newState);
|
|
3099
3515
|
};
|
|
3100
|
-
return /* @__PURE__ */
|
|
3516
|
+
return /* @__PURE__ */ jsx(CollapseContext.Provider, { value: { isOpen, toggle }, children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("w-full", className), ...props, children }) });
|
|
3101
3517
|
}
|
|
3102
3518
|
function CollapseButton({ children, className }) {
|
|
3103
3519
|
const { isOpen, toggle } = React24.useContext(CollapseContext);
|
|
3104
|
-
return /* @__PURE__ */
|
|
3520
|
+
return /* @__PURE__ */ jsxs(
|
|
3105
3521
|
reactNative.Pressable,
|
|
3106
3522
|
{
|
|
3107
3523
|
onPress: toggle,
|
|
@@ -3114,7 +3530,7 @@ function CollapseButton({ children, className }) {
|
|
|
3114
3530
|
),
|
|
3115
3531
|
children: [
|
|
3116
3532
|
children,
|
|
3117
|
-
/* @__PURE__ */
|
|
3533
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-text-secondary transition-transform", isOpen && "rotate-180"), children: "\u25BC" })
|
|
3118
3534
|
]
|
|
3119
3535
|
}
|
|
3120
3536
|
);
|
|
@@ -3122,7 +3538,7 @@ function CollapseButton({ children, className }) {
|
|
|
3122
3538
|
function CollapseContent({ children, className }) {
|
|
3123
3539
|
const { isOpen } = React24.useContext(CollapseContext);
|
|
3124
3540
|
if (!isOpen) return null;
|
|
3125
|
-
return /* @__PURE__ */
|
|
3541
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("overflow-hidden", className), children });
|
|
3126
3542
|
}
|
|
3127
3543
|
var AccordionContext = React24.createContext({
|
|
3128
3544
|
openIndices: /* @__PURE__ */ new Set(),
|
|
@@ -3152,7 +3568,7 @@ function Accordion({
|
|
|
3152
3568
|
return newSet;
|
|
3153
3569
|
});
|
|
3154
3570
|
};
|
|
3155
|
-
return /* @__PURE__ */
|
|
3571
|
+
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { openIndices, toggleIndex, allowMultiple }, children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("w-full divide-y divide-border-default", className), ...props, children: React24__default.default.Children.map(children, (child, index) => {
|
|
3156
3572
|
if (React24__default.default.isValidElement(child)) {
|
|
3157
3573
|
return React24__default.default.cloneElement(child, { index });
|
|
3158
3574
|
}
|
|
@@ -3162,7 +3578,7 @@ function Accordion({
|
|
|
3162
3578
|
function AccordionItem({ index = 0, children, className }) {
|
|
3163
3579
|
const { openIndices, toggleIndex } = React24.useContext(AccordionContext);
|
|
3164
3580
|
const isOpen = openIndices.has(index);
|
|
3165
|
-
return /* @__PURE__ */
|
|
3581
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className, children: React24__default.default.Children.map(children, (child) => {
|
|
3166
3582
|
if (React24__default.default.isValidElement(child)) {
|
|
3167
3583
|
return React24__default.default.cloneElement(child, {
|
|
3168
3584
|
isOpen,
|
|
@@ -3178,7 +3594,7 @@ function AccordionButton({
|
|
|
3178
3594
|
children,
|
|
3179
3595
|
className
|
|
3180
3596
|
}) {
|
|
3181
|
-
return /* @__PURE__ */
|
|
3597
|
+
return /* @__PURE__ */ jsxs(
|
|
3182
3598
|
reactNative.Pressable,
|
|
3183
3599
|
{
|
|
3184
3600
|
onPress: onToggle,
|
|
@@ -3190,15 +3606,15 @@ function AccordionButton({
|
|
|
3190
3606
|
className
|
|
3191
3607
|
),
|
|
3192
3608
|
children: [
|
|
3193
|
-
/* @__PURE__ */
|
|
3194
|
-
/* @__PURE__ */
|
|
3609
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-primary font-medium", children }),
|
|
3610
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-text-secondary transition-transform", isOpen && "rotate-180"), children: "\u25BC" })
|
|
3195
3611
|
]
|
|
3196
3612
|
}
|
|
3197
3613
|
);
|
|
3198
3614
|
}
|
|
3199
3615
|
function AccordionPanel({ isOpen = false, children, className }) {
|
|
3200
3616
|
if (!isOpen) return null;
|
|
3201
|
-
return /* @__PURE__ */
|
|
3617
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("pb-4 px-1", className), children });
|
|
3202
3618
|
}
|
|
3203
3619
|
function Breadcrumbs({
|
|
3204
3620
|
separator = "/",
|
|
@@ -3214,19 +3630,19 @@ function Breadcrumbs({
|
|
|
3214
3630
|
const lastItems = items.slice(-Math.floor(maxItems / 2));
|
|
3215
3631
|
displayItems = [
|
|
3216
3632
|
firstItem,
|
|
3217
|
-
/* @__PURE__ */
|
|
3633
|
+
/* @__PURE__ */ jsx(BreadcrumbEllipsis, {}, "ellipsis"),
|
|
3218
3634
|
...lastItems
|
|
3219
3635
|
];
|
|
3220
3636
|
}
|
|
3221
|
-
return /* @__PURE__ */
|
|
3637
|
+
return /* @__PURE__ */ jsx(
|
|
3222
3638
|
reactNative.View,
|
|
3223
3639
|
{
|
|
3224
3640
|
accessibilityRole: "none",
|
|
3225
3641
|
className: cn("flex-row items-center flex-wrap", className),
|
|
3226
3642
|
...props,
|
|
3227
|
-
children: displayItems.map((child, index) => /* @__PURE__ */
|
|
3643
|
+
children: displayItems.map((child, index) => /* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row items-center", children: [
|
|
3228
3644
|
child,
|
|
3229
|
-
index < displayItems.length - 1 && /* @__PURE__ */
|
|
3645
|
+
index < displayItems.length - 1 && /* @__PURE__ */ jsx(reactNative.Text, { className: "mx-2 text-text-tertiary text-sm", children: separator })
|
|
3230
3646
|
] }, index))
|
|
3231
3647
|
}
|
|
3232
3648
|
);
|
|
@@ -3239,7 +3655,7 @@ function BreadcrumbItem({
|
|
|
3239
3655
|
children
|
|
3240
3656
|
}) {
|
|
3241
3657
|
if (isCurrentPage) {
|
|
3242
|
-
return /* @__PURE__ */
|
|
3658
|
+
return /* @__PURE__ */ jsx(
|
|
3243
3659
|
reactNative.Text,
|
|
3244
3660
|
{
|
|
3245
3661
|
accessibilityRole: "text",
|
|
@@ -3249,13 +3665,13 @@ function BreadcrumbItem({
|
|
|
3249
3665
|
}
|
|
3250
3666
|
);
|
|
3251
3667
|
}
|
|
3252
|
-
return /* @__PURE__ */
|
|
3668
|
+
return /* @__PURE__ */ jsx(
|
|
3253
3669
|
reactNative.Pressable,
|
|
3254
3670
|
{
|
|
3255
3671
|
onPress,
|
|
3256
3672
|
accessibilityRole: "link",
|
|
3257
3673
|
accessibilityHint: href,
|
|
3258
|
-
children: /* @__PURE__ */
|
|
3674
|
+
children: /* @__PURE__ */ jsx(
|
|
3259
3675
|
reactNative.Text,
|
|
3260
3676
|
{
|
|
3261
3677
|
className: cn(
|
|
@@ -3271,48 +3687,90 @@ function BreadcrumbItem({
|
|
|
3271
3687
|
);
|
|
3272
3688
|
}
|
|
3273
3689
|
function BreadcrumbEllipsis() {
|
|
3274
|
-
return /* @__PURE__ */
|
|
3690
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-tertiary", children: "..." });
|
|
3275
3691
|
}
|
|
3276
3692
|
var PopoverContext = React24.createContext({
|
|
3277
3693
|
isOpen: false,
|
|
3278
3694
|
setIsOpen: () => {
|
|
3279
3695
|
},
|
|
3280
|
-
placement: "bottom"
|
|
3696
|
+
placement: "bottom",
|
|
3697
|
+
triggerMode: "click",
|
|
3698
|
+
handleHoverIn: () => {
|
|
3699
|
+
},
|
|
3700
|
+
handleHoverOut: () => {
|
|
3701
|
+
}
|
|
3281
3702
|
});
|
|
3282
3703
|
function Popover({
|
|
3283
3704
|
placement = "bottom",
|
|
3284
3705
|
isOpen: controlledIsOpen,
|
|
3285
3706
|
onOpenChange,
|
|
3286
3707
|
closeOnClickOutside = true,
|
|
3708
|
+
triggerMode = "click",
|
|
3709
|
+
closeDelay = 150,
|
|
3287
3710
|
className,
|
|
3288
3711
|
children,
|
|
3289
3712
|
...props
|
|
3290
3713
|
}) {
|
|
3291
3714
|
const [internalIsOpen, setInternalIsOpen] = React24.useState(false);
|
|
3292
3715
|
const isOpen = controlledIsOpen ?? internalIsOpen;
|
|
3293
|
-
const
|
|
3716
|
+
const closeTimerRef = React24.useRef(null);
|
|
3717
|
+
const setIsOpen = React24.useCallback((open) => {
|
|
3294
3718
|
if (controlledIsOpen === void 0) {
|
|
3295
3719
|
setInternalIsOpen(open);
|
|
3296
3720
|
}
|
|
3297
3721
|
onOpenChange?.(open);
|
|
3298
|
-
};
|
|
3299
|
-
|
|
3722
|
+
}, [controlledIsOpen, onOpenChange]);
|
|
3723
|
+
const handleHoverIn = React24.useCallback(() => {
|
|
3724
|
+
if (triggerMode !== "hover") return;
|
|
3725
|
+
if (closeTimerRef.current) {
|
|
3726
|
+
clearTimeout(closeTimerRef.current);
|
|
3727
|
+
closeTimerRef.current = null;
|
|
3728
|
+
}
|
|
3729
|
+
setIsOpen(true);
|
|
3730
|
+
}, [triggerMode, setIsOpen]);
|
|
3731
|
+
const handleHoverOut = React24.useCallback(() => {
|
|
3732
|
+
if (triggerMode !== "hover") return;
|
|
3733
|
+
closeTimerRef.current = setTimeout(() => {
|
|
3734
|
+
setIsOpen(false);
|
|
3735
|
+
closeTimerRef.current = null;
|
|
3736
|
+
}, closeDelay);
|
|
3737
|
+
}, [triggerMode, closeDelay, setIsOpen]);
|
|
3738
|
+
return /* @__PURE__ */ jsx(
|
|
3739
|
+
PopoverContext.Provider,
|
|
3740
|
+
{
|
|
3741
|
+
value: { isOpen, setIsOpen, placement, triggerMode, handleHoverIn, handleHoverOut },
|
|
3742
|
+
children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("relative", className), ...props, children })
|
|
3743
|
+
}
|
|
3744
|
+
);
|
|
3300
3745
|
}
|
|
3301
3746
|
function PopoverTrigger({ children, className }) {
|
|
3302
|
-
const { isOpen, setIsOpen } = React24.useContext(PopoverContext);
|
|
3303
|
-
|
|
3747
|
+
const { isOpen, setIsOpen, triggerMode, handleHoverIn, handleHoverOut } = React24.useContext(PopoverContext);
|
|
3748
|
+
const hoverProps = triggerMode === "hover" ? {
|
|
3749
|
+
onHoverIn: handleHoverIn,
|
|
3750
|
+
onHoverOut: handleHoverOut,
|
|
3751
|
+
onMouseEnter: handleHoverIn,
|
|
3752
|
+
onMouseLeave: handleHoverOut
|
|
3753
|
+
} : {};
|
|
3754
|
+
return /* @__PURE__ */ jsx(
|
|
3304
3755
|
reactNative.Pressable,
|
|
3305
3756
|
{
|
|
3306
3757
|
onPress: () => setIsOpen(!isOpen),
|
|
3307
3758
|
accessibilityRole: "button",
|
|
3308
3759
|
accessibilityState: { expanded: isOpen },
|
|
3309
3760
|
className,
|
|
3761
|
+
...hoverProps,
|
|
3310
3762
|
children
|
|
3311
3763
|
}
|
|
3312
3764
|
);
|
|
3313
3765
|
}
|
|
3766
|
+
var SPACER_STYLES = {
|
|
3767
|
+
top: { left: 0, right: 0, bottom: 0, height: 8, transform: "translateY(100%)" },
|
|
3768
|
+
bottom: { left: 0, right: 0, top: 0, height: 8, transform: "translateY(-100%)" },
|
|
3769
|
+
left: { top: 0, bottom: 0, right: 0, width: 8, transform: "translateX(100%)" },
|
|
3770
|
+
right: { top: 0, bottom: 0, left: 0, width: 8, transform: "translateX(-100%)" }
|
|
3771
|
+
};
|
|
3314
3772
|
function PopoverContent({ children, className }) {
|
|
3315
|
-
const { isOpen, setIsOpen, placement } = React24.useContext(PopoverContext);
|
|
3773
|
+
const { isOpen, setIsOpen, placement, triggerMode, handleHoverIn, handleHoverOut } = React24.useContext(PopoverContext);
|
|
3316
3774
|
if (!isOpen) return null;
|
|
3317
3775
|
const placementStyles3 = {
|
|
3318
3776
|
top: "bottom-full left-0 mb-2",
|
|
@@ -3320,8 +3778,14 @@ function PopoverContent({ children, className }) {
|
|
|
3320
3778
|
left: "right-full top-0 mr-2",
|
|
3321
3779
|
right: "left-full top-0 ml-2"
|
|
3322
3780
|
};
|
|
3323
|
-
|
|
3324
|
-
|
|
3781
|
+
const hoverProps = triggerMode === "hover" ? {
|
|
3782
|
+
onHoverIn: handleHoverIn,
|
|
3783
|
+
onHoverOut: handleHoverOut,
|
|
3784
|
+
onMouseEnter: handleHoverIn,
|
|
3785
|
+
onMouseLeave: handleHoverOut
|
|
3786
|
+
} : {};
|
|
3787
|
+
return /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
3788
|
+
/* @__PURE__ */ jsx(
|
|
3325
3789
|
reactNative.Pressable,
|
|
3326
3790
|
{
|
|
3327
3791
|
onPress: () => setIsOpen(false),
|
|
@@ -3329,7 +3793,7 @@ function PopoverContent({ children, className }) {
|
|
|
3329
3793
|
style: { position: "absolute" }
|
|
3330
3794
|
}
|
|
3331
3795
|
),
|
|
3332
|
-
/* @__PURE__ */
|
|
3796
|
+
/* @__PURE__ */ jsxs(
|
|
3333
3797
|
reactNative.View,
|
|
3334
3798
|
{
|
|
3335
3799
|
className: cn(
|
|
@@ -3339,14 +3803,30 @@ function PopoverContent({ children, className }) {
|
|
|
3339
3803
|
placementStyles3[placement],
|
|
3340
3804
|
className
|
|
3341
3805
|
),
|
|
3342
|
-
|
|
3806
|
+
...hoverProps,
|
|
3807
|
+
children: [
|
|
3808
|
+
triggerMode === "hover" && /* @__PURE__ */ jsx(
|
|
3809
|
+
"div",
|
|
3810
|
+
{
|
|
3811
|
+
style: {
|
|
3812
|
+
position: "absolute",
|
|
3813
|
+
pointerEvents: "auto",
|
|
3814
|
+
background: "transparent",
|
|
3815
|
+
...SPACER_STYLES[placement]
|
|
3816
|
+
},
|
|
3817
|
+
onMouseEnter: handleHoverIn,
|
|
3818
|
+
onMouseLeave: handleHoverOut
|
|
3819
|
+
}
|
|
3820
|
+
),
|
|
3821
|
+
children
|
|
3822
|
+
]
|
|
3343
3823
|
}
|
|
3344
3824
|
)
|
|
3345
3825
|
] });
|
|
3346
3826
|
}
|
|
3347
3827
|
function PopoverCloseButton({ children, className }) {
|
|
3348
3828
|
const { setIsOpen } = React24.useContext(PopoverContext);
|
|
3349
|
-
return /* @__PURE__ */
|
|
3829
|
+
return /* @__PURE__ */ jsx(
|
|
3350
3830
|
reactNative.Pressable,
|
|
3351
3831
|
{
|
|
3352
3832
|
onPress: () => setIsOpen(false),
|
|
@@ -3380,11 +3860,11 @@ function Menu({
|
|
|
3380
3860
|
onOpenChange?.(open);
|
|
3381
3861
|
};
|
|
3382
3862
|
const closeMenu = () => setIsOpen(false);
|
|
3383
|
-
return /* @__PURE__ */
|
|
3863
|
+
return /* @__PURE__ */ jsx(MenuContext.Provider, { value: { isOpen, setIsOpen, closeMenu }, children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("relative", className), ...props, children }) });
|
|
3384
3864
|
}
|
|
3385
3865
|
function MenuTrigger({ children, className }) {
|
|
3386
3866
|
const { isOpen, setIsOpen } = React24.useContext(MenuContext);
|
|
3387
|
-
return /* @__PURE__ */
|
|
3867
|
+
return /* @__PURE__ */ jsx(
|
|
3388
3868
|
reactNative.Pressable,
|
|
3389
3869
|
{
|
|
3390
3870
|
onPress: () => setIsOpen(!isOpen),
|
|
@@ -3398,8 +3878,8 @@ function MenuTrigger({ children, className }) {
|
|
|
3398
3878
|
function MenuList({ children, className }) {
|
|
3399
3879
|
const { isOpen, setIsOpen } = React24.useContext(MenuContext);
|
|
3400
3880
|
if (!isOpen) return null;
|
|
3401
|
-
return /* @__PURE__ */
|
|
3402
|
-
/* @__PURE__ */
|
|
3881
|
+
return /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
3882
|
+
/* @__PURE__ */ jsx(
|
|
3403
3883
|
reactNative.Pressable,
|
|
3404
3884
|
{
|
|
3405
3885
|
onPress: () => setIsOpen(false),
|
|
@@ -3407,7 +3887,7 @@ function MenuList({ children, className }) {
|
|
|
3407
3887
|
style: { position: "absolute" }
|
|
3408
3888
|
}
|
|
3409
3889
|
),
|
|
3410
|
-
/* @__PURE__ */
|
|
3890
|
+
/* @__PURE__ */ jsx(
|
|
3411
3891
|
reactNative.View,
|
|
3412
3892
|
{
|
|
3413
3893
|
className: cn(
|
|
@@ -3436,7 +3916,7 @@ function MenuItem({
|
|
|
3436
3916
|
onPress?.();
|
|
3437
3917
|
closeMenu();
|
|
3438
3918
|
};
|
|
3439
|
-
return /* @__PURE__ */
|
|
3919
|
+
return /* @__PURE__ */ jsxs(
|
|
3440
3920
|
reactNative.Pressable,
|
|
3441
3921
|
{
|
|
3442
3922
|
onPress: handlePress,
|
|
@@ -3450,8 +3930,8 @@ function MenuItem({
|
|
|
3450
3930
|
className
|
|
3451
3931
|
),
|
|
3452
3932
|
children: [
|
|
3453
|
-
icon && /* @__PURE__ */
|
|
3454
|
-
/* @__PURE__ */
|
|
3933
|
+
icon && /* @__PURE__ */ jsx(reactNative.View, { className: "mr-3", children: icon }),
|
|
3934
|
+
/* @__PURE__ */ jsx(
|
|
3455
3935
|
reactNative.Text,
|
|
3456
3936
|
{
|
|
3457
3937
|
className: cn(
|
|
@@ -3466,11 +3946,11 @@ function MenuItem({
|
|
|
3466
3946
|
);
|
|
3467
3947
|
}
|
|
3468
3948
|
function MenuDivider({ className }) {
|
|
3469
|
-
return /* @__PURE__ */
|
|
3949
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("h-px bg-border-default my-1", className) });
|
|
3470
3950
|
}
|
|
3471
3951
|
function MenuGroup({ label, children, className }) {
|
|
3472
|
-
return /* @__PURE__ */
|
|
3473
|
-
label && /* @__PURE__ */
|
|
3952
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className, children: [
|
|
3953
|
+
label && /* @__PURE__ */ jsx(reactNative.Text, { className: "px-4 py-2 text-xs font-semibold text-text-secondary uppercase", children: label }),
|
|
3474
3954
|
children
|
|
3475
3955
|
] });
|
|
3476
3956
|
}
|
|
@@ -3494,6 +3974,7 @@ function Select({
|
|
|
3494
3974
|
isDisabled = false,
|
|
3495
3975
|
isInvalid = false,
|
|
3496
3976
|
options,
|
|
3977
|
+
variant = "default",
|
|
3497
3978
|
className,
|
|
3498
3979
|
...props
|
|
3499
3980
|
}) {
|
|
@@ -3532,8 +4013,8 @@ function Select({
|
|
|
3532
4013
|
}
|
|
3533
4014
|
};
|
|
3534
4015
|
const hasValue = isMulti ? values.length > 0 : value !== null && value !== void 0;
|
|
3535
|
-
return /* @__PURE__ */
|
|
3536
|
-
/* @__PURE__ */
|
|
4016
|
+
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: { value, isMulti, isOpen, setIsOpen, selectValue, isSelected }, children: /* @__PURE__ */ jsxs(reactNative.View, { className: cn("relative w-full", className), ...props, children: [
|
|
4017
|
+
/* @__PURE__ */ jsxs(
|
|
3537
4018
|
reactNative.Pressable,
|
|
3538
4019
|
{
|
|
3539
4020
|
onPress: () => !isDisabled && setIsOpen(!isOpen),
|
|
@@ -3542,14 +4023,14 @@ function Select({
|
|
|
3542
4023
|
accessibilityState: { expanded: isOpen, disabled: isDisabled },
|
|
3543
4024
|
className: cn(
|
|
3544
4025
|
"flex-row items-center justify-between px-4 py-2.5 rounded-md border",
|
|
3545
|
-
"bg-surface-base",
|
|
3546
|
-
isInvalid ? "border-border-input-error" : "border-border-input",
|
|
4026
|
+
variant === "filled" ? "bg-black/30" : "bg-surface-base",
|
|
4027
|
+
isInvalid ? "border-border-input-error" : variant === "filled" ? "border-border-subtle" : "border-border-input",
|
|
3547
4028
|
!isDisabled && !isInvalid && "web:hover:border-border-input-hover",
|
|
3548
4029
|
isOpen && "border-border-input-focus",
|
|
3549
4030
|
isDisabled && "opacity-50 cursor-not-allowed"
|
|
3550
4031
|
),
|
|
3551
4032
|
children: [
|
|
3552
|
-
/* @__PURE__ */
|
|
4033
|
+
/* @__PURE__ */ jsx(
|
|
3553
4034
|
reactNative.Text,
|
|
3554
4035
|
{
|
|
3555
4036
|
className: cn(
|
|
@@ -3559,8 +4040,8 @@ function Select({
|
|
|
3559
4040
|
children: getDisplayValue()
|
|
3560
4041
|
}
|
|
3561
4042
|
),
|
|
3562
|
-
/* @__PURE__ */
|
|
3563
|
-
hasValue && /* @__PURE__ */
|
|
4043
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row items-center gap-2", children: [
|
|
4044
|
+
hasValue && /* @__PURE__ */ jsx(
|
|
3564
4045
|
reactNative.Pressable,
|
|
3565
4046
|
{
|
|
3566
4047
|
onPress: (e) => {
|
|
@@ -3568,16 +4049,16 @@ function Select({
|
|
|
3568
4049
|
clearValue();
|
|
3569
4050
|
},
|
|
3570
4051
|
className: "p-1",
|
|
3571
|
-
children: /* @__PURE__ */
|
|
4052
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-secondary text-xs", children: "\xD7" })
|
|
3572
4053
|
}
|
|
3573
4054
|
),
|
|
3574
|
-
/* @__PURE__ */
|
|
4055
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-text-secondary", isOpen && "rotate-180"), children: "\u25BC" })
|
|
3575
4056
|
] })
|
|
3576
4057
|
]
|
|
3577
4058
|
}
|
|
3578
4059
|
),
|
|
3579
|
-
isOpen && /* @__PURE__ */
|
|
3580
|
-
/* @__PURE__ */
|
|
4060
|
+
isOpen && /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
4061
|
+
/* @__PURE__ */ jsx(
|
|
3581
4062
|
reactNative.Pressable,
|
|
3582
4063
|
{
|
|
3583
4064
|
onPress: () => setIsOpen(false),
|
|
@@ -3585,7 +4066,7 @@ function Select({
|
|
|
3585
4066
|
style: { position: "absolute" }
|
|
3586
4067
|
}
|
|
3587
4068
|
),
|
|
3588
|
-
/* @__PURE__ */
|
|
4069
|
+
/* @__PURE__ */ jsx(
|
|
3589
4070
|
reactNative.View,
|
|
3590
4071
|
{
|
|
3591
4072
|
className: cn(
|
|
@@ -3593,7 +4074,7 @@ function Select({
|
|
|
3593
4074
|
"bg-surface-elevated rounded-md shadow-lg border border-border-default",
|
|
3594
4075
|
"max-h-60 overflow-hidden"
|
|
3595
4076
|
),
|
|
3596
|
-
children: /* @__PURE__ */
|
|
4077
|
+
children: /* @__PURE__ */ jsx(reactNative.ScrollView, { className: "py-1", children: options.map((option) => /* @__PURE__ */ jsx(SelectOption, { option }, option.value)) })
|
|
3597
4078
|
}
|
|
3598
4079
|
)
|
|
3599
4080
|
] })
|
|
@@ -3602,7 +4083,7 @@ function Select({
|
|
|
3602
4083
|
function SelectOption({ option }) {
|
|
3603
4084
|
const { selectValue, isSelected, isMulti } = React24.useContext(SelectContext);
|
|
3604
4085
|
const selected = isSelected(option.value);
|
|
3605
|
-
return /* @__PURE__ */
|
|
4086
|
+
return /* @__PURE__ */ jsxs(
|
|
3606
4087
|
reactNative.Pressable,
|
|
3607
4088
|
{
|
|
3608
4089
|
onPress: () => !option.isDisabled && selectValue(option.value),
|
|
@@ -3616,17 +4097,17 @@ function SelectOption({ option }) {
|
|
|
3616
4097
|
option.isDisabled && "opacity-50 cursor-not-allowed"
|
|
3617
4098
|
),
|
|
3618
4099
|
children: [
|
|
3619
|
-
isMulti && /* @__PURE__ */
|
|
4100
|
+
isMulti && /* @__PURE__ */ jsx(
|
|
3620
4101
|
reactNative.View,
|
|
3621
4102
|
{
|
|
3622
4103
|
className: cn(
|
|
3623
4104
|
"w-4 h-4 mr-3 rounded border",
|
|
3624
4105
|
selected ? "bg-brand-primary border-brand-primary" : "border-border-strong"
|
|
3625
4106
|
),
|
|
3626
|
-
children: selected && /* @__PURE__ */
|
|
4107
|
+
children: selected && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-white text-xs text-center", children: "\u2713" })
|
|
3627
4108
|
}
|
|
3628
4109
|
),
|
|
3629
|
-
/* @__PURE__ */
|
|
4110
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-sm", selected && !isMulti ? "text-brand-primary font-medium" : "text-text-primary"), children: option.label })
|
|
3630
4111
|
]
|
|
3631
4112
|
}
|
|
3632
4113
|
);
|
|
@@ -3639,7 +4120,7 @@ var ToolbarButtonContext = React24.createContext({
|
|
|
3639
4120
|
var BUTTON_BG = "#3C3C3C";
|
|
3640
4121
|
var MENU_BG = "#2C2C2C";
|
|
3641
4122
|
var hoverColors = getHoverColors(BUTTON_BG, "medium");
|
|
3642
|
-
var
|
|
4123
|
+
var sizeStyles10 = {
|
|
3643
4124
|
sm: "px-2 py-1 min-h-[26px]",
|
|
3644
4125
|
md: "px-2.5 py-1 min-h-[30px]",
|
|
3645
4126
|
lg: "px-3 py-1.5 min-h-[36px]"
|
|
@@ -3699,8 +4180,8 @@ function ToolbarButton({
|
|
|
3699
4180
|
};
|
|
3700
4181
|
}
|
|
3701
4182
|
};
|
|
3702
|
-
return /* @__PURE__ */
|
|
3703
|
-
/* @__PURE__ */
|
|
4183
|
+
return /* @__PURE__ */ jsx(ToolbarButtonContext.Provider, { value: { isOpen, setIsOpen }, children: /* @__PURE__ */ jsxs(reactNative.View, { className: "relative", ...props, children: [
|
|
4184
|
+
/* @__PURE__ */ jsxs(
|
|
3704
4185
|
reactNative.Pressable,
|
|
3705
4186
|
{
|
|
3706
4187
|
onPress: handlePress,
|
|
@@ -3716,7 +4197,7 @@ function ToolbarButton({
|
|
|
3716
4197
|
"flex-row items-center justify-center rounded",
|
|
3717
4198
|
"web:transition-all web:duration-150 web:cursor-pointer",
|
|
3718
4199
|
// Size
|
|
3719
|
-
|
|
4200
|
+
sizeStyles10[size],
|
|
3720
4201
|
// Disabled
|
|
3721
4202
|
isDisabled && "opacity-40 web:cursor-default web:pointer-events-none",
|
|
3722
4203
|
className
|
|
@@ -3728,7 +4209,7 @@ function ToolbarButton({
|
|
|
3728
4209
|
}
|
|
3729
4210
|
],
|
|
3730
4211
|
children: [
|
|
3731
|
-
icon && /* @__PURE__ */
|
|
4212
|
+
icon && /* @__PURE__ */ jsx(reactNative.View, { className: "w-5 h-5 items-center justify-center", children: React24__default.default.isValidElement(icon) ? React24__default.default.cloneElement(icon, {
|
|
3732
4213
|
size: 20,
|
|
3733
4214
|
width: 20,
|
|
3734
4215
|
height: 20,
|
|
@@ -3739,7 +4220,7 @@ function ToolbarButton({
|
|
|
3739
4220
|
height: 20
|
|
3740
4221
|
}
|
|
3741
4222
|
}) : icon }),
|
|
3742
|
-
showLabel && /* @__PURE__ */
|
|
4223
|
+
showLabel && /* @__PURE__ */ jsx(
|
|
3743
4224
|
reactNative.Text,
|
|
3744
4225
|
{
|
|
3745
4226
|
className: cn(
|
|
@@ -3755,8 +4236,8 @@ function ToolbarButton({
|
|
|
3755
4236
|
]
|
|
3756
4237
|
}
|
|
3757
4238
|
),
|
|
3758
|
-
menuContent && isOpen && /* @__PURE__ */
|
|
3759
|
-
/* @__PURE__ */
|
|
4239
|
+
menuContent && isOpen && /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
4240
|
+
/* @__PURE__ */ jsx(
|
|
3760
4241
|
reactNative.Pressable,
|
|
3761
4242
|
{
|
|
3762
4243
|
onPress: handleClose,
|
|
@@ -3764,7 +4245,7 @@ function ToolbarButton({
|
|
|
3764
4245
|
className: "z-40"
|
|
3765
4246
|
}
|
|
3766
4247
|
),
|
|
3767
|
-
/* @__PURE__ */
|
|
4248
|
+
/* @__PURE__ */ jsx(
|
|
3768
4249
|
reactNative.View,
|
|
3769
4250
|
{
|
|
3770
4251
|
className: cn(
|
|
@@ -3801,7 +4282,7 @@ function ToolbarButtonGroup({
|
|
|
3801
4282
|
children,
|
|
3802
4283
|
...props
|
|
3803
4284
|
}) {
|
|
3804
|
-
return /* @__PURE__ */
|
|
4285
|
+
return /* @__PURE__ */ jsx(
|
|
3805
4286
|
reactNative.View,
|
|
3806
4287
|
{
|
|
3807
4288
|
className: cn(
|
|
@@ -3839,7 +4320,7 @@ function RadioGroup({
|
|
|
3839
4320
|
children,
|
|
3840
4321
|
...props
|
|
3841
4322
|
}) {
|
|
3842
|
-
return /* @__PURE__ */
|
|
4323
|
+
return /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: { value, onChange, name, isDisabled, size, color }, children: /* @__PURE__ */ jsxs(
|
|
3843
4324
|
reactNative.View,
|
|
3844
4325
|
{
|
|
3845
4326
|
className: cn(className),
|
|
@@ -3847,8 +4328,8 @@ function RadioGroup({
|
|
|
3847
4328
|
accessibilityLabel: label,
|
|
3848
4329
|
...props,
|
|
3849
4330
|
children: [
|
|
3850
|
-
label && /* @__PURE__ */
|
|
3851
|
-
/* @__PURE__ */
|
|
4331
|
+
label && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm font-medium text-text-primary mb-2", children: label }),
|
|
4332
|
+
/* @__PURE__ */ jsx(
|
|
3852
4333
|
reactNative.View,
|
|
3853
4334
|
{
|
|
3854
4335
|
className: cn(
|
|
@@ -3867,7 +4348,7 @@ var sizeConfig = {
|
|
|
3867
4348
|
md: { outer: "w-5 h-5", inner: "w-2.5 h-2.5", text: "text-base" },
|
|
3868
4349
|
lg: { outer: "w-6 h-6", inner: "w-3 h-3", text: "text-lg" }
|
|
3869
4350
|
};
|
|
3870
|
-
var
|
|
4351
|
+
var colorStyles4 = {
|
|
3871
4352
|
primary: { checked: "border-brand-primary bg-brand-primary", unchecked: "border-border-strong" },
|
|
3872
4353
|
secondary: { checked: "border-brand-secondary bg-brand-secondary", unchecked: "border-border-strong" },
|
|
3873
4354
|
success: { checked: "border-status-success bg-status-success", unchecked: "border-border-strong" },
|
|
@@ -3892,13 +4373,13 @@ function Radio({
|
|
|
3892
4373
|
const color = radioColor ?? groupColor ?? "primary";
|
|
3893
4374
|
const isChecked = selectedValue === value;
|
|
3894
4375
|
const { outer, inner, text } = sizeConfig[size];
|
|
3895
|
-
const { checked, unchecked } =
|
|
4376
|
+
const { checked, unchecked } = colorStyles4[color];
|
|
3896
4377
|
const handlePress = () => {
|
|
3897
4378
|
if (!isDisabled) {
|
|
3898
4379
|
onChange(value);
|
|
3899
4380
|
}
|
|
3900
4381
|
};
|
|
3901
|
-
return /* @__PURE__ */
|
|
4382
|
+
return /* @__PURE__ */ jsxs(
|
|
3902
4383
|
reactNative.Pressable,
|
|
3903
4384
|
{
|
|
3904
4385
|
onPress: handlePress,
|
|
@@ -3912,7 +4393,7 @@ function Radio({
|
|
|
3912
4393
|
),
|
|
3913
4394
|
...props,
|
|
3914
4395
|
children: [
|
|
3915
|
-
/* @__PURE__ */
|
|
4396
|
+
/* @__PURE__ */ jsx(
|
|
3916
4397
|
reactNative.View,
|
|
3917
4398
|
{
|
|
3918
4399
|
className: cn(
|
|
@@ -3922,15 +4403,15 @@ function Radio({
|
|
|
3922
4403
|
isChecked ? checked : unchecked,
|
|
3923
4404
|
!isDisabled && !isChecked && "web:hover:border-brand-primary"
|
|
3924
4405
|
),
|
|
3925
|
-
children: isChecked && /* @__PURE__ */
|
|
4406
|
+
children: isChecked && /* @__PURE__ */ jsx(reactNative.View, { className: cn("rounded-full bg-white", inner) })
|
|
3926
4407
|
}
|
|
3927
4408
|
),
|
|
3928
|
-
children && /* @__PURE__ */
|
|
4409
|
+
children && /* @__PURE__ */ jsx(reactNative.Text, { className: cn("ml-2 text-text-primary", text), children })
|
|
3929
4410
|
]
|
|
3930
4411
|
}
|
|
3931
4412
|
);
|
|
3932
4413
|
}
|
|
3933
|
-
var
|
|
4414
|
+
var sizeStyles11 = {
|
|
3934
4415
|
left: {
|
|
3935
4416
|
sm: "w-64",
|
|
3936
4417
|
md: "w-80",
|
|
@@ -3984,46 +4465,46 @@ function Drawer({
|
|
|
3984
4465
|
onClose();
|
|
3985
4466
|
}
|
|
3986
4467
|
};
|
|
3987
|
-
return /* @__PURE__ */
|
|
4468
|
+
return /* @__PURE__ */ jsx(
|
|
3988
4469
|
reactNative.Modal,
|
|
3989
4470
|
{
|
|
3990
4471
|
visible: isOpen,
|
|
3991
4472
|
transparent: true,
|
|
3992
4473
|
animationType: "fade",
|
|
3993
4474
|
onRequestClose: onClose,
|
|
3994
|
-
children: /* @__PURE__ */
|
|
3995
|
-
/* @__PURE__ */
|
|
4475
|
+
children: /* @__PURE__ */ jsxs(reactNative.View, { className: "flex-1", children: [
|
|
4476
|
+
/* @__PURE__ */ jsx(
|
|
3996
4477
|
reactNative.Pressable,
|
|
3997
4478
|
{
|
|
3998
4479
|
onPress: handleOverlayPress,
|
|
3999
4480
|
className: "absolute inset-0 bg-black/50"
|
|
4000
4481
|
}
|
|
4001
4482
|
),
|
|
4002
|
-
/* @__PURE__ */
|
|
4483
|
+
/* @__PURE__ */ jsxs(
|
|
4003
4484
|
reactNative.View,
|
|
4004
4485
|
{
|
|
4005
4486
|
className: cn(
|
|
4006
4487
|
"absolute bg-surface-elevated shadow-2xl",
|
|
4007
4488
|
placementStyles[placement],
|
|
4008
|
-
|
|
4489
|
+
sizeStyles11[placement][size],
|
|
4009
4490
|
className
|
|
4010
4491
|
),
|
|
4011
4492
|
accessibilityRole: "dialog",
|
|
4012
4493
|
...props,
|
|
4013
4494
|
children: [
|
|
4014
|
-
(title || showCloseButton) && /* @__PURE__ */
|
|
4015
|
-
title && /* @__PURE__ */
|
|
4016
|
-
showCloseButton && /* @__PURE__ */
|
|
4495
|
+
(title || showCloseButton) && /* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row items-center justify-between px-4 py-3 border-b border-border-default", children: [
|
|
4496
|
+
title && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-lg font-semibold text-text-primary", children: title }),
|
|
4497
|
+
showCloseButton && /* @__PURE__ */ jsx(
|
|
4017
4498
|
reactNative.Pressable,
|
|
4018
4499
|
{
|
|
4019
4500
|
onPress: onClose,
|
|
4020
4501
|
className: "p-2 -m-2 rounded-full web:hover:bg-interactive-hover",
|
|
4021
4502
|
accessibilityLabel: "Close drawer",
|
|
4022
|
-
children: /* @__PURE__ */
|
|
4503
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-secondary text-xl", children: "\xD7" })
|
|
4023
4504
|
}
|
|
4024
4505
|
)
|
|
4025
4506
|
] }),
|
|
4026
|
-
/* @__PURE__ */
|
|
4507
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-1", children })
|
|
4027
4508
|
]
|
|
4028
4509
|
}
|
|
4029
4510
|
)
|
|
@@ -4032,7 +4513,7 @@ function Drawer({
|
|
|
4032
4513
|
);
|
|
4033
4514
|
}
|
|
4034
4515
|
function DrawerHeader({ className, children, ...props }) {
|
|
4035
|
-
return /* @__PURE__ */
|
|
4516
|
+
return /* @__PURE__ */ jsx(
|
|
4036
4517
|
reactNative.View,
|
|
4037
4518
|
{
|
|
4038
4519
|
className: cn("px-4 py-3 border-b border-border-default", className),
|
|
@@ -4043,7 +4524,7 @@ function DrawerHeader({ className, children, ...props }) {
|
|
|
4043
4524
|
}
|
|
4044
4525
|
function DrawerBody({ scrollable = true, className, children, ...props }) {
|
|
4045
4526
|
if (scrollable) {
|
|
4046
|
-
return /* @__PURE__ */
|
|
4527
|
+
return /* @__PURE__ */ jsx(
|
|
4047
4528
|
reactNative.ScrollView,
|
|
4048
4529
|
{
|
|
4049
4530
|
className: cn("flex-1 p-4", className),
|
|
@@ -4052,10 +4533,10 @@ function DrawerBody({ scrollable = true, className, children, ...props }) {
|
|
|
4052
4533
|
}
|
|
4053
4534
|
);
|
|
4054
4535
|
}
|
|
4055
|
-
return /* @__PURE__ */
|
|
4536
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-1 p-4", className), ...props, children });
|
|
4056
4537
|
}
|
|
4057
4538
|
function DrawerFooter({ className, children, ...props }) {
|
|
4058
|
-
return /* @__PURE__ */
|
|
4539
|
+
return /* @__PURE__ */ jsx(
|
|
4059
4540
|
reactNative.View,
|
|
4060
4541
|
{
|
|
4061
4542
|
className: cn(
|
|
@@ -4076,12 +4557,12 @@ var colorVarMap = {
|
|
|
4076
4557
|
warning: "var(--color-status-warning)",
|
|
4077
4558
|
info: "var(--color-status-info)"
|
|
4078
4559
|
};
|
|
4079
|
-
var
|
|
4560
|
+
var sizeStyles12 = {
|
|
4080
4561
|
sm: "h-1",
|
|
4081
4562
|
md: "h-2",
|
|
4082
4563
|
lg: "h-3"
|
|
4083
4564
|
};
|
|
4084
|
-
var
|
|
4565
|
+
var colorStyles5 = {
|
|
4085
4566
|
primary: "bg-brand-primary",
|
|
4086
4567
|
secondary: "bg-brand-secondary",
|
|
4087
4568
|
success: "bg-status-success",
|
|
@@ -4106,38 +4587,45 @@ function Progress({
|
|
|
4106
4587
|
showValue = false,
|
|
4107
4588
|
formatValue = (v, m) => `${Math.round(v / m * 100)}%`,
|
|
4108
4589
|
label,
|
|
4590
|
+
trackWidth,
|
|
4591
|
+
customColor,
|
|
4109
4592
|
className,
|
|
4110
4593
|
...props
|
|
4111
4594
|
}) {
|
|
4112
4595
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
4113
|
-
return /* @__PURE__ */
|
|
4114
|
-
(label || showValue) && /* @__PURE__ */
|
|
4115
|
-
label && /* @__PURE__ */
|
|
4116
|
-
showValue && !isIndeterminate && /* @__PURE__ */
|
|
4596
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("w-full", className), ...props, children: [
|
|
4597
|
+
(label || showValue) && /* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row justify-between items-center mb-1", children: [
|
|
4598
|
+
label && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-secondary", children: label }),
|
|
4599
|
+
showValue && !isIndeterminate && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm font-medium text-text-primary", children: formatValue(value, max) })
|
|
4117
4600
|
] }),
|
|
4118
|
-
/* @__PURE__ */
|
|
4601
|
+
/* @__PURE__ */ jsx(
|
|
4119
4602
|
reactNative.View,
|
|
4120
4603
|
{
|
|
4121
4604
|
className: cn(
|
|
4122
|
-
"
|
|
4605
|
+
"rounded-full overflow-hidden",
|
|
4606
|
+
trackWidth ? void 0 : "w-full",
|
|
4123
4607
|
trackColorStyles[color],
|
|
4124
|
-
|
|
4608
|
+
sizeStyles12[size]
|
|
4125
4609
|
),
|
|
4610
|
+
style: trackWidth ? { width: trackWidth } : void 0,
|
|
4126
4611
|
accessibilityRole: "progressbar",
|
|
4127
4612
|
accessibilityValue: {
|
|
4128
4613
|
min: 0,
|
|
4129
4614
|
max,
|
|
4130
4615
|
now: isIndeterminate ? void 0 : value
|
|
4131
4616
|
},
|
|
4132
|
-
children: /* @__PURE__ */
|
|
4617
|
+
children: /* @__PURE__ */ jsx(
|
|
4133
4618
|
reactNative.View,
|
|
4134
4619
|
{
|
|
4135
4620
|
className: cn(
|
|
4136
4621
|
"h-full rounded-full",
|
|
4137
|
-
|
|
4622
|
+
!customColor && colorStyles5[color],
|
|
4138
4623
|
isIndeterminate && "animate-pulse w-1/3"
|
|
4139
4624
|
),
|
|
4140
|
-
style:
|
|
4625
|
+
style: {
|
|
4626
|
+
...isIndeterminate ? {} : { width: `${percentage}%` },
|
|
4627
|
+
...customColor ? { backgroundColor: customColor } : {}
|
|
4628
|
+
}
|
|
4141
4629
|
}
|
|
4142
4630
|
)
|
|
4143
4631
|
}
|
|
@@ -4157,7 +4645,11 @@ function CircularProgress({
|
|
|
4157
4645
|
...props
|
|
4158
4646
|
}) {
|
|
4159
4647
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
4160
|
-
|
|
4648
|
+
const radius = (size - strokeWidth) / 2;
|
|
4649
|
+
const circumference = 2 * Math.PI * radius;
|
|
4650
|
+
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
4651
|
+
const center = size / 2;
|
|
4652
|
+
return /* @__PURE__ */ jsxs(
|
|
4161
4653
|
reactNative.View,
|
|
4162
4654
|
{
|
|
4163
4655
|
className: cn("items-center justify-center", className),
|
|
@@ -4170,41 +4662,59 @@ function CircularProgress({
|
|
|
4170
4662
|
},
|
|
4171
4663
|
...props,
|
|
4172
4664
|
children: [
|
|
4173
|
-
/* @__PURE__ */
|
|
4665
|
+
/* @__PURE__ */ jsx(
|
|
4174
4666
|
reactNative.View,
|
|
4175
4667
|
{
|
|
4176
|
-
className: cn(
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4668
|
+
className: cn(isIndeterminate && "animate-spin"),
|
|
4669
|
+
style: { width: size, height: size },
|
|
4670
|
+
children: /* @__PURE__ */ jsxs(
|
|
4671
|
+
"svg",
|
|
4672
|
+
{
|
|
4673
|
+
width: size,
|
|
4674
|
+
height: size,
|
|
4675
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
4676
|
+
style: { position: "absolute" },
|
|
4677
|
+
children: [
|
|
4678
|
+
/* @__PURE__ */ jsx(
|
|
4679
|
+
"circle",
|
|
4680
|
+
{
|
|
4681
|
+
cx: center,
|
|
4682
|
+
cy: center,
|
|
4683
|
+
r: radius,
|
|
4684
|
+
fill: "none",
|
|
4685
|
+
stroke: "var(--color-border-default)",
|
|
4686
|
+
strokeWidth
|
|
4687
|
+
}
|
|
4688
|
+
),
|
|
4689
|
+
/* @__PURE__ */ jsx(
|
|
4690
|
+
"circle",
|
|
4691
|
+
{
|
|
4692
|
+
cx: center,
|
|
4693
|
+
cy: center,
|
|
4694
|
+
r: radius,
|
|
4695
|
+
fill: "none",
|
|
4696
|
+
stroke: colorVarMap[color],
|
|
4697
|
+
strokeWidth,
|
|
4698
|
+
strokeLinecap: "round",
|
|
4699
|
+
strokeDasharray: circumference,
|
|
4700
|
+
strokeDashoffset: isIndeterminate ? circumference * 0.75 : strokeDashoffset,
|
|
4701
|
+
transform: `rotate(-90 ${center} ${center})`,
|
|
4702
|
+
style: { transition: "stroke-dashoffset 300ms cubic-bezier(0.22, 1, 0.36, 1)" }
|
|
4703
|
+
}
|
|
4704
|
+
)
|
|
4705
|
+
]
|
|
4706
|
+
}
|
|
4707
|
+
)
|
|
4185
4708
|
}
|
|
4186
4709
|
),
|
|
4187
|
-
/* @__PURE__ */
|
|
4188
|
-
reactNative.
|
|
4710
|
+
showValue && !isIndeterminate && /* @__PURE__ */ jsx(
|
|
4711
|
+
reactNative.Text,
|
|
4189
4712
|
{
|
|
4190
|
-
className:
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
isIndeterminate && "animate-spin"
|
|
4194
|
-
),
|
|
4195
|
-
style: {
|
|
4196
|
-
width: size,
|
|
4197
|
-
height: size,
|
|
4198
|
-
borderWidth: strokeWidth,
|
|
4199
|
-
borderColor: "transparent",
|
|
4200
|
-
borderTopColor: colorVarMap[color],
|
|
4201
|
-
borderRightColor: percentage > 25 ? colorVarMap[color] : "transparent",
|
|
4202
|
-
borderBottomColor: percentage > 50 ? colorVarMap[color] : "transparent",
|
|
4203
|
-
borderLeftColor: percentage > 75 ? colorVarMap[color] : "transparent"
|
|
4204
|
-
}
|
|
4713
|
+
className: "text-xs font-semibold text-text-primary absolute",
|
|
4714
|
+
style: { fontSize: Math.max(size * 0.22, 10) },
|
|
4715
|
+
children: formatValue(value, max)
|
|
4205
4716
|
}
|
|
4206
|
-
)
|
|
4207
|
-
showValue && !isIndeterminate && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { className: "text-xs font-semibold text-text-primary", children: formatValue(value, max) })
|
|
4717
|
+
)
|
|
4208
4718
|
]
|
|
4209
4719
|
}
|
|
4210
4720
|
);
|
|
@@ -4224,30 +4734,30 @@ function ProgressSteps({
|
|
|
4224
4734
|
...props
|
|
4225
4735
|
}) {
|
|
4226
4736
|
const { dot, connector } = stepSizeStyles[size];
|
|
4227
|
-
return /* @__PURE__ */
|
|
4228
|
-
/* @__PURE__ */
|
|
4229
|
-
/* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("w-full", className), ...props, children: [
|
|
4738
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-row items-center", children: Array.from({ length: totalSteps }).map((_, index) => /* @__PURE__ */ jsxs(React24__default.default.Fragment, { children: [
|
|
4739
|
+
/* @__PURE__ */ jsx(
|
|
4230
4740
|
reactNative.View,
|
|
4231
4741
|
{
|
|
4232
4742
|
className: cn(
|
|
4233
4743
|
"rounded-full",
|
|
4234
4744
|
dot,
|
|
4235
|
-
index <= currentStep ?
|
|
4745
|
+
index <= currentStep ? colorStyles5[color] : "bg-border-strong"
|
|
4236
4746
|
)
|
|
4237
4747
|
}
|
|
4238
4748
|
),
|
|
4239
|
-
index < totalSteps - 1 && /* @__PURE__ */
|
|
4749
|
+
index < totalSteps - 1 && /* @__PURE__ */ jsx(
|
|
4240
4750
|
reactNative.View,
|
|
4241
4751
|
{
|
|
4242
4752
|
className: cn(
|
|
4243
4753
|
"flex-1 mx-1",
|
|
4244
4754
|
connector,
|
|
4245
|
-
index < currentStep ?
|
|
4755
|
+
index < currentStep ? colorStyles5[color] : "bg-border-strong"
|
|
4246
4756
|
)
|
|
4247
4757
|
}
|
|
4248
4758
|
)
|
|
4249
4759
|
] }, index)) }),
|
|
4250
|
-
labels && labels.length > 0 && /* @__PURE__ */
|
|
4760
|
+
labels && labels.length > 0 && /* @__PURE__ */ jsx(reactNative.View, { className: "flex-row mt-2", children: labels.map((label, index) => /* @__PURE__ */ jsx(
|
|
4251
4761
|
reactNative.Text,
|
|
4252
4762
|
{
|
|
4253
4763
|
className: cn(
|
|
@@ -4298,9 +4808,9 @@ function ToastProvider({
|
|
|
4298
4808
|
const removeAllToasts = React24.useCallback(() => {
|
|
4299
4809
|
setToasts([]);
|
|
4300
4810
|
}, []);
|
|
4301
|
-
return /* @__PURE__ */
|
|
4811
|
+
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { toasts, addToast, removeToast, removeAllToasts }, children: [
|
|
4302
4812
|
children,
|
|
4303
|
-
/* @__PURE__ */
|
|
4813
|
+
/* @__PURE__ */ jsx(
|
|
4304
4814
|
reactNative.View,
|
|
4305
4815
|
{
|
|
4306
4816
|
className: cn(
|
|
@@ -4308,7 +4818,7 @@ function ToastProvider({
|
|
|
4308
4818
|
positionStyles[position]
|
|
4309
4819
|
),
|
|
4310
4820
|
pointerEvents: "box-none",
|
|
4311
|
-
children: toasts.map((toast) => /* @__PURE__ */
|
|
4821
|
+
children: toasts.map((toast) => /* @__PURE__ */ jsx(
|
|
4312
4822
|
ToastItem,
|
|
4313
4823
|
{
|
|
4314
4824
|
...toast,
|
|
@@ -4374,7 +4884,7 @@ function ToastItem({
|
|
|
4374
4884
|
return () => clearTimeout(timer);
|
|
4375
4885
|
}
|
|
4376
4886
|
}, [duration, onClose]);
|
|
4377
|
-
return /* @__PURE__ */
|
|
4887
|
+
return /* @__PURE__ */ jsx(
|
|
4378
4888
|
reactNative.View,
|
|
4379
4889
|
{
|
|
4380
4890
|
className: cn(
|
|
@@ -4383,19 +4893,19 @@ function ToastItem({
|
|
|
4383
4893
|
border
|
|
4384
4894
|
),
|
|
4385
4895
|
accessibilityRole: "alert",
|
|
4386
|
-
children: /* @__PURE__ */
|
|
4387
|
-
/* @__PURE__ */
|
|
4388
|
-
/* @__PURE__ */
|
|
4389
|
-
/* @__PURE__ */
|
|
4390
|
-
description && /* @__PURE__ */
|
|
4896
|
+
children: /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row items-start p-3", bg), children: [
|
|
4897
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: cn("w-6 h-6 items-center justify-center mr-3"), children: /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-lg", iconColors[status]), children: icon }) }),
|
|
4898
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-1", children: [
|
|
4899
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm font-semibold text-text-primary", children: title }),
|
|
4900
|
+
description && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-secondary mt-0.5", children: description })
|
|
4391
4901
|
] }),
|
|
4392
|
-
isClosable && /* @__PURE__ */
|
|
4902
|
+
isClosable && /* @__PURE__ */ jsx(
|
|
4393
4903
|
reactNative.Pressable,
|
|
4394
4904
|
{
|
|
4395
4905
|
onPress: onClose,
|
|
4396
4906
|
className: "p-1 -m-1 rounded web:hover:bg-interactive-hover",
|
|
4397
4907
|
accessibilityLabel: "Close toast",
|
|
4398
|
-
children: /* @__PURE__ */
|
|
4908
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-tertiary text-lg", children: "\xD7" })
|
|
4399
4909
|
}
|
|
4400
4910
|
)
|
|
4401
4911
|
] })
|
|
@@ -4413,7 +4923,7 @@ function Toast({
|
|
|
4413
4923
|
...props
|
|
4414
4924
|
}) {
|
|
4415
4925
|
const { bg, border, icon } = statusStyles[status];
|
|
4416
|
-
return /* @__PURE__ */
|
|
4926
|
+
return /* @__PURE__ */ jsx(
|
|
4417
4927
|
reactNative.View,
|
|
4418
4928
|
{
|
|
4419
4929
|
className: cn(
|
|
@@ -4424,19 +4934,19 @@ function Toast({
|
|
|
4424
4934
|
),
|
|
4425
4935
|
accessibilityRole: "alert",
|
|
4426
4936
|
...props,
|
|
4427
|
-
children: /* @__PURE__ */
|
|
4428
|
-
showIcon && /* @__PURE__ */
|
|
4429
|
-
/* @__PURE__ */
|
|
4430
|
-
/* @__PURE__ */
|
|
4431
|
-
description && /* @__PURE__ */
|
|
4937
|
+
children: /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row items-start p-3", bg), children: [
|
|
4938
|
+
showIcon && /* @__PURE__ */ jsx(reactNative.View, { className: "w-6 h-6 items-center justify-center mr-3", children: /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-lg", iconColors[status]), children: icon }) }),
|
|
4939
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-1", children: [
|
|
4940
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm font-semibold text-text-primary", children: title }),
|
|
4941
|
+
description && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-secondary mt-0.5", children: description })
|
|
4432
4942
|
] }),
|
|
4433
|
-
isClosable && onClose && /* @__PURE__ */
|
|
4943
|
+
isClosable && onClose && /* @__PURE__ */ jsx(
|
|
4434
4944
|
reactNative.Pressable,
|
|
4435
4945
|
{
|
|
4436
4946
|
onPress: onClose,
|
|
4437
4947
|
className: "p-1 -m-1 rounded web:hover:bg-interactive-hover",
|
|
4438
4948
|
accessibilityLabel: "Close toast",
|
|
4439
|
-
children: /* @__PURE__ */
|
|
4949
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-tertiary text-lg", children: "\xD7" })
|
|
4440
4950
|
}
|
|
4441
4951
|
)
|
|
4442
4952
|
] })
|
|
@@ -4524,13 +5034,13 @@ function Autocomplete({
|
|
|
4524
5034
|
const showMinCharsMessage = inputValue.length > 0 && inputValue.length < minChars;
|
|
4525
5035
|
const showNoResults = !isLoading && inputValue.length >= minChars && filteredOptions.length === 0;
|
|
4526
5036
|
const showOptions = isOpen && !showMinCharsMessage && filteredOptions.length > 0;
|
|
4527
|
-
return /* @__PURE__ */
|
|
4528
|
-
label && /* @__PURE__ */
|
|
5037
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("w-full", className), ...props, children: [
|
|
5038
|
+
label && /* @__PURE__ */ jsxs(reactNative.Text, { className: "text-sm font-medium text-text-primary mb-1", children: [
|
|
4529
5039
|
label,
|
|
4530
|
-
isRequired && /* @__PURE__ */
|
|
5040
|
+
isRequired && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-status-error ml-0.5", children: "*" })
|
|
4531
5041
|
] }),
|
|
4532
|
-
/* @__PURE__ */
|
|
4533
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "relative", children: [
|
|
5043
|
+
/* @__PURE__ */ jsxs(
|
|
4534
5044
|
reactNative.View,
|
|
4535
5045
|
{
|
|
4536
5046
|
className: cn(
|
|
@@ -4541,7 +5051,7 @@ function Autocomplete({
|
|
|
4541
5051
|
isDisabled && "opacity-50"
|
|
4542
5052
|
),
|
|
4543
5053
|
children: [
|
|
4544
|
-
/* @__PURE__ */
|
|
5054
|
+
/* @__PURE__ */ jsx(
|
|
4545
5055
|
reactNative.TextInput,
|
|
4546
5056
|
{
|
|
4547
5057
|
value: inputValue,
|
|
@@ -4558,20 +5068,20 @@ function Autocomplete({
|
|
|
4558
5068
|
...inputProps
|
|
4559
5069
|
}
|
|
4560
5070
|
),
|
|
4561
|
-
isClearable && value && !isDisabled && /* @__PURE__ */
|
|
5071
|
+
isClearable && value && !isDisabled && /* @__PURE__ */ jsx(
|
|
4562
5072
|
reactNative.Pressable,
|
|
4563
5073
|
{
|
|
4564
5074
|
onPress: handleClear,
|
|
4565
5075
|
className: "p-2",
|
|
4566
5076
|
accessibilityLabel: "Clear selection",
|
|
4567
|
-
children: /* @__PURE__ */
|
|
5077
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-tertiary", children: "\xD7" })
|
|
4568
5078
|
}
|
|
4569
5079
|
),
|
|
4570
|
-
isLoading && /* @__PURE__ */
|
|
5080
|
+
isLoading && /* @__PURE__ */ jsx(reactNative.View, { className: "p-2", children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-tertiary animate-spin", children: "\u27F3" }) })
|
|
4571
5081
|
]
|
|
4572
5082
|
}
|
|
4573
5083
|
),
|
|
4574
|
-
isOpen && /* @__PURE__ */
|
|
5084
|
+
isOpen && /* @__PURE__ */ jsx(
|
|
4575
5085
|
reactNative.View,
|
|
4576
5086
|
{
|
|
4577
5087
|
className: cn(
|
|
@@ -4579,15 +5089,15 @@ function Autocomplete({
|
|
|
4579
5089
|
"bg-surface-elevated rounded-md shadow-lg border border-border-default",
|
|
4580
5090
|
"max-h-60 overflow-hidden"
|
|
4581
5091
|
),
|
|
4582
|
-
children: /* @__PURE__ */
|
|
4583
|
-
showMinCharsMessage && /* @__PURE__ */
|
|
4584
|
-
isLoading && /* @__PURE__ */
|
|
4585
|
-
showNoResults && /* @__PURE__ */
|
|
5092
|
+
children: /* @__PURE__ */ jsxs(reactNative.ScrollView, { className: "py-1", children: [
|
|
5093
|
+
showMinCharsMessage && /* @__PURE__ */ jsx(reactNative.Text, { className: "px-3 py-2 text-sm text-text-tertiary", children: minCharsText || `Type at least ${minChars} characters` }),
|
|
5094
|
+
isLoading && /* @__PURE__ */ jsx(reactNative.Text, { className: "px-3 py-2 text-sm text-text-tertiary", children: loadingText }),
|
|
5095
|
+
showNoResults && /* @__PURE__ */ jsx(reactNative.Text, { className: "px-3 py-2 text-sm text-text-tertiary", children: noOptionsText }),
|
|
4586
5096
|
showOptions && filteredOptions.map((option, index) => {
|
|
4587
5097
|
const isHighlighted = index === highlightedIndex;
|
|
4588
5098
|
const isSelected = option.value === value;
|
|
4589
5099
|
if (renderOption) {
|
|
4590
|
-
return /* @__PURE__ */
|
|
5100
|
+
return /* @__PURE__ */ jsx(
|
|
4591
5101
|
reactNative.Pressable,
|
|
4592
5102
|
{
|
|
4593
5103
|
onPress: () => handleSelectOption(option),
|
|
@@ -4597,7 +5107,7 @@ function Autocomplete({
|
|
|
4597
5107
|
String(option.value)
|
|
4598
5108
|
);
|
|
4599
5109
|
}
|
|
4600
|
-
return /* @__PURE__ */
|
|
5110
|
+
return /* @__PURE__ */ jsxs(
|
|
4601
5111
|
reactNative.Pressable,
|
|
4602
5112
|
{
|
|
4603
5113
|
onPress: () => handleSelectOption(option),
|
|
@@ -4610,7 +5120,7 @@ function Autocomplete({
|
|
|
4610
5120
|
!option.isDisabled && "web:hover:bg-interactive-hover"
|
|
4611
5121
|
),
|
|
4612
5122
|
children: [
|
|
4613
|
-
/* @__PURE__ */
|
|
5123
|
+
/* @__PURE__ */ jsx(
|
|
4614
5124
|
reactNative.Text,
|
|
4615
5125
|
{
|
|
4616
5126
|
className: cn(
|
|
@@ -4620,7 +5130,7 @@ function Autocomplete({
|
|
|
4620
5130
|
children: option.label
|
|
4621
5131
|
}
|
|
4622
5132
|
),
|
|
4623
|
-
option.description && /* @__PURE__ */
|
|
5133
|
+
option.description && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-xs text-text-tertiary mt-0.5", children: option.description })
|
|
4624
5134
|
]
|
|
4625
5135
|
},
|
|
4626
5136
|
String(option.value)
|
|
@@ -4630,7 +5140,7 @@ function Autocomplete({
|
|
|
4630
5140
|
}
|
|
4631
5141
|
)
|
|
4632
5142
|
] }),
|
|
4633
|
-
(helperText || errorMessage) && /* @__PURE__ */
|
|
5143
|
+
(helperText || errorMessage) && /* @__PURE__ */ jsx(
|
|
4634
5144
|
reactNative.Text,
|
|
4635
5145
|
{
|
|
4636
5146
|
className: cn(
|
|
@@ -4642,12 +5152,12 @@ function Autocomplete({
|
|
|
4642
5152
|
)
|
|
4643
5153
|
] });
|
|
4644
5154
|
}
|
|
4645
|
-
var
|
|
5155
|
+
var sizeStyles13 = {
|
|
4646
5156
|
sm: { icon: "w-3.5 h-3.5 text-xs", text: "text-xs" },
|
|
4647
5157
|
md: { icon: "w-4 h-4 text-sm", text: "text-sm" },
|
|
4648
5158
|
lg: { icon: "w-5 h-5 text-base", text: "text-base" }
|
|
4649
5159
|
};
|
|
4650
|
-
var
|
|
5160
|
+
var colorStyles6 = {
|
|
4651
5161
|
default: "text-text-tertiary",
|
|
4652
5162
|
primary: "text-brand-primary",
|
|
4653
5163
|
secondary: "text-text-secondary",
|
|
@@ -4686,7 +5196,7 @@ function HelpTip({
|
|
|
4686
5196
|
}) {
|
|
4687
5197
|
const [internalIsOpen, setInternalIsOpen] = React24.useState(false);
|
|
4688
5198
|
const isOpen = controlledIsOpen ?? internalIsOpen;
|
|
4689
|
-
const { icon: iconSize, text: textSize } =
|
|
5199
|
+
const { icon: iconSize, text: textSize } = sizeStyles13[size];
|
|
4690
5200
|
const handlePress = () => {
|
|
4691
5201
|
if (controlledIsOpen === void 0) {
|
|
4692
5202
|
setInternalIsOpen((prev) => !prev);
|
|
@@ -4702,8 +5212,8 @@ function HelpTip({
|
|
|
4702
5212
|
setInternalIsOpen(false);
|
|
4703
5213
|
}
|
|
4704
5214
|
};
|
|
4705
|
-
return /* @__PURE__ */
|
|
4706
|
-
/* @__PURE__ */
|
|
5215
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("relative inline-flex", className), ...props, children: [
|
|
5216
|
+
/* @__PURE__ */ jsx(
|
|
4707
5217
|
reactNative.Pressable,
|
|
4708
5218
|
{
|
|
4709
5219
|
onPress: handlePress,
|
|
@@ -4715,15 +5225,15 @@ function HelpTip({
|
|
|
4715
5225
|
className: cn(
|
|
4716
5226
|
"items-center justify-center rounded-full",
|
|
4717
5227
|
"border border-current",
|
|
4718
|
-
|
|
5228
|
+
colorStyles6[color],
|
|
4719
5229
|
iconSize,
|
|
4720
5230
|
"web:hover:opacity-80 web:cursor-help",
|
|
4721
5231
|
iconClassName
|
|
4722
5232
|
),
|
|
4723
|
-
children: /* @__PURE__ */
|
|
5233
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: cn("font-semibold", iconSize, colorStyles6[color]), children: iconMap[icon] })
|
|
4724
5234
|
}
|
|
4725
5235
|
),
|
|
4726
|
-
isOpen && /* @__PURE__ */
|
|
5236
|
+
isOpen && /* @__PURE__ */ jsxs(
|
|
4727
5237
|
reactNative.View,
|
|
4728
5238
|
{
|
|
4729
5239
|
className: cn(
|
|
@@ -4736,8 +5246,8 @@ function HelpTip({
|
|
|
4736
5246
|
),
|
|
4737
5247
|
style: { maxWidth },
|
|
4738
5248
|
children: [
|
|
4739
|
-
typeof content === "string" ? /* @__PURE__ */
|
|
4740
|
-
hasArrow && /* @__PURE__ */
|
|
5249
|
+
typeof content === "string" ? /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-text-primary", textSize), children: content }) : content,
|
|
5250
|
+
hasArrow && /* @__PURE__ */ jsx(
|
|
4741
5251
|
reactNative.View,
|
|
4742
5252
|
{
|
|
4743
5253
|
className: cn(
|
|
@@ -4760,12 +5270,12 @@ function LabelWithHelp({
|
|
|
4760
5270
|
className,
|
|
4761
5271
|
...props
|
|
4762
5272
|
}) {
|
|
4763
|
-
return /* @__PURE__ */
|
|
4764
|
-
/* @__PURE__ */
|
|
5273
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row items-center gap-1", className), ...props, children: [
|
|
5274
|
+
/* @__PURE__ */ jsxs(reactNative.Text, { className: "text-sm font-medium text-text-primary", children: [
|
|
4765
5275
|
label,
|
|
4766
|
-
isRequired && /* @__PURE__ */
|
|
5276
|
+
isRequired && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-status-error ml-0.5", children: "*" })
|
|
4767
5277
|
] }),
|
|
4768
|
-
/* @__PURE__ */
|
|
5278
|
+
/* @__PURE__ */ jsx(HelpTip, { content: helpContent, size: helpSize })
|
|
4769
5279
|
] });
|
|
4770
5280
|
}
|
|
4771
5281
|
var labelSizeStyles = {
|
|
@@ -4793,7 +5303,7 @@ function FormField({
|
|
|
4793
5303
|
const fieldId = React24__default.default.useId();
|
|
4794
5304
|
const helperId = `${fieldId}-helper`;
|
|
4795
5305
|
const errorId = `${fieldId}-error`;
|
|
4796
|
-
return /* @__PURE__ */
|
|
5306
|
+
return /* @__PURE__ */ jsxs(
|
|
4797
5307
|
reactNative.View,
|
|
4798
5308
|
{
|
|
4799
5309
|
className: cn(
|
|
@@ -4804,7 +5314,7 @@ function FormField({
|
|
|
4804
5314
|
),
|
|
4805
5315
|
...props,
|
|
4806
5316
|
children: [
|
|
4807
|
-
label && /* @__PURE__ */
|
|
5317
|
+
label && /* @__PURE__ */ jsxs(
|
|
4808
5318
|
reactNative.View,
|
|
4809
5319
|
{
|
|
4810
5320
|
className: cn(
|
|
@@ -4813,7 +5323,7 @@ function FormField({
|
|
|
4813
5323
|
),
|
|
4814
5324
|
style: isHorizontal && labelWidth ? { width: labelWidth } : void 0,
|
|
4815
5325
|
children: [
|
|
4816
|
-
/* @__PURE__ */
|
|
5326
|
+
/* @__PURE__ */ jsxs(
|
|
4817
5327
|
reactNative.Text,
|
|
4818
5328
|
{
|
|
4819
5329
|
className: cn(
|
|
@@ -4822,15 +5332,15 @@ function FormField({
|
|
|
4822
5332
|
),
|
|
4823
5333
|
children: [
|
|
4824
5334
|
label,
|
|
4825
|
-
isRequired && /* @__PURE__ */
|
|
5335
|
+
isRequired && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-status-error ml-0.5", children: "*" })
|
|
4826
5336
|
]
|
|
4827
5337
|
}
|
|
4828
5338
|
),
|
|
4829
|
-
helpContent && /* @__PURE__ */
|
|
5339
|
+
helpContent && /* @__PURE__ */ jsx(reactNative.View, { className: "ml-1", children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-tertiary text-xs", children: "\u2139" }) })
|
|
4830
5340
|
]
|
|
4831
5341
|
}
|
|
4832
5342
|
),
|
|
4833
|
-
/* @__PURE__ */
|
|
5343
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: cn(isHorizontal && "flex-1"), children: [
|
|
4834
5344
|
React24__default.default.Children.map(children, (child) => {
|
|
4835
5345
|
if (React24__default.default.isValidElement(child)) {
|
|
4836
5346
|
const childProps = child.props;
|
|
@@ -4848,7 +5358,7 @@ function FormField({
|
|
|
4848
5358
|
}
|
|
4849
5359
|
return child;
|
|
4850
5360
|
}),
|
|
4851
|
-
(helperText || errorMessage) && /* @__PURE__ */
|
|
5361
|
+
(helperText || errorMessage) && /* @__PURE__ */ jsx(
|
|
4852
5362
|
reactNative.Text,
|
|
4853
5363
|
{
|
|
4854
5364
|
id: isInvalid ? errorId : helperId,
|
|
@@ -4871,7 +5381,7 @@ function FormSection({
|
|
|
4871
5381
|
children,
|
|
4872
5382
|
...props
|
|
4873
5383
|
}) {
|
|
4874
|
-
return /* @__PURE__ */
|
|
5384
|
+
return /* @__PURE__ */ jsxs(
|
|
4875
5385
|
reactNative.View,
|
|
4876
5386
|
{
|
|
4877
5387
|
className: cn("w-full", className),
|
|
@@ -4879,11 +5389,11 @@ function FormSection({
|
|
|
4879
5389
|
accessibilityLabel: title,
|
|
4880
5390
|
...props,
|
|
4881
5391
|
children: [
|
|
4882
|
-
(title || description) && /* @__PURE__ */
|
|
4883
|
-
title && /* @__PURE__ */
|
|
4884
|
-
description && /* @__PURE__ */
|
|
5392
|
+
(title || description) && /* @__PURE__ */ jsxs(reactNative.View, { className: "mb-4", children: [
|
|
5393
|
+
title && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-lg font-semibold text-text-primary", children: title }),
|
|
5394
|
+
description && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-secondary mt-1", children: description })
|
|
4885
5395
|
] }),
|
|
4886
|
-
/* @__PURE__ */
|
|
5396
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "gap-4", children })
|
|
4887
5397
|
]
|
|
4888
5398
|
}
|
|
4889
5399
|
);
|
|
@@ -4900,7 +5410,7 @@ function FormActions({
|
|
|
4900
5410
|
children,
|
|
4901
5411
|
...props
|
|
4902
5412
|
}) {
|
|
4903
|
-
return /* @__PURE__ */
|
|
5413
|
+
return /* @__PURE__ */ jsx(
|
|
4904
5414
|
reactNative.View,
|
|
4905
5415
|
{
|
|
4906
5416
|
className: cn(
|
|
@@ -4925,7 +5435,7 @@ function FormRow({
|
|
|
4925
5435
|
children,
|
|
4926
5436
|
...props
|
|
4927
5437
|
}) {
|
|
4928
|
-
return /* @__PURE__ */
|
|
5438
|
+
return /* @__PURE__ */ jsx(
|
|
4929
5439
|
reactNative.View,
|
|
4930
5440
|
{
|
|
4931
5441
|
className: cn("flex-row items-start", gapStyles3[gap], className),
|
|
@@ -4968,7 +5478,7 @@ function Stack({
|
|
|
4968
5478
|
children,
|
|
4969
5479
|
...props
|
|
4970
5480
|
}) {
|
|
4971
|
-
return /* @__PURE__ */
|
|
5481
|
+
return /* @__PURE__ */ jsx(
|
|
4972
5482
|
reactNative.View,
|
|
4973
5483
|
{
|
|
4974
5484
|
className: cn(
|
|
@@ -4985,30 +5495,30 @@ function Stack({
|
|
|
4985
5495
|
);
|
|
4986
5496
|
}
|
|
4987
5497
|
function HStack(props) {
|
|
4988
|
-
return /* @__PURE__ */
|
|
5498
|
+
return /* @__PURE__ */ jsx(Stack, { ...props, className: cn("flex-row", props.className) });
|
|
4989
5499
|
}
|
|
4990
5500
|
function VStack(props) {
|
|
4991
|
-
return /* @__PURE__ */
|
|
5501
|
+
return /* @__PURE__ */ jsx(Stack, { ...props, className: cn("flex-col", props.className) });
|
|
4992
5502
|
}
|
|
4993
5503
|
function Section({ className, children, ...props }) {
|
|
4994
|
-
return /* @__PURE__ */
|
|
5504
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("mb-6", className), ...props, children });
|
|
4995
5505
|
}
|
|
4996
5506
|
function SectionHeader({ title, subtitle, trailing, className }) {
|
|
4997
|
-
return /* @__PURE__ */
|
|
4998
|
-
/* @__PURE__ */
|
|
4999
|
-
/* @__PURE__ */
|
|
5000
|
-
subtitle && /* @__PURE__ */
|
|
5507
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row items-center justify-between mb-3 px-1", className), children: [
|
|
5508
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-1", children: [
|
|
5509
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm font-semibold text-text-secondary uppercase tracking-wider", children: title }),
|
|
5510
|
+
subtitle && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-xs text-text-tertiary mt-0.5", children: subtitle })
|
|
5001
5511
|
] }),
|
|
5002
|
-
trailing && /* @__PURE__ */
|
|
5512
|
+
trailing && /* @__PURE__ */ jsx(reactNative.View, { children: trailing })
|
|
5003
5513
|
] });
|
|
5004
5514
|
}
|
|
5005
5515
|
function SectionContent({ className, children, ...props }) {
|
|
5006
|
-
return /* @__PURE__ */
|
|
5516
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn(className), ...props, children });
|
|
5007
5517
|
}
|
|
5008
5518
|
function DataRow({ label, value, valueClassName, className, ...props }) {
|
|
5009
|
-
return /* @__PURE__ */
|
|
5010
|
-
/* @__PURE__ */
|
|
5011
|
-
typeof value === "string" ? /* @__PURE__ */
|
|
5519
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-row items-center justify-between py-2", className), ...props, children: [
|
|
5520
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-secondary", children: label }),
|
|
5521
|
+
typeof value === "string" ? /* @__PURE__ */ jsx(reactNative.Text, { className: cn("text-sm font-medium text-text-primary", valueClassName), children: value }) : /* @__PURE__ */ jsx(reactNative.View, { className: cn(valueClassName), children: value })
|
|
5012
5522
|
] });
|
|
5013
5523
|
}
|
|
5014
5524
|
var colorClasses = {
|
|
@@ -5034,12 +5544,12 @@ function IconBox({
|
|
|
5034
5544
|
}) {
|
|
5035
5545
|
const colors = colorClasses[color];
|
|
5036
5546
|
const sizes = sizeClasses[size];
|
|
5037
|
-
return /* @__PURE__ */
|
|
5547
|
+
return /* @__PURE__ */ jsx(
|
|
5038
5548
|
reactNative.View,
|
|
5039
5549
|
{
|
|
5040
5550
|
className: cn("items-center justify-center", colors.bg, sizes.box, className),
|
|
5041
5551
|
...props,
|
|
5042
|
-
children: /* @__PURE__ */
|
|
5552
|
+
children: /* @__PURE__ */ jsx(Icon, { size: sizes.iconSize, className: colors.icon })
|
|
5043
5553
|
}
|
|
5044
5554
|
);
|
|
5045
5555
|
}
|
|
@@ -5057,7 +5567,7 @@ function Surface({
|
|
|
5057
5567
|
const surfaceColor = getElevationSurface(baseColor, elevation, theme);
|
|
5058
5568
|
const shadowStyle = getElevationShadow(baseColor, elevation, theme);
|
|
5059
5569
|
const glowStyle = glowColor ? getGlowShadow(glowColor, glowIntensity) : {};
|
|
5060
|
-
return /* @__PURE__ */
|
|
5570
|
+
return /* @__PURE__ */ jsx(
|
|
5061
5571
|
reactNative.View,
|
|
5062
5572
|
{
|
|
5063
5573
|
className: cn("rounded-2xl", className),
|
|
@@ -5075,7 +5585,7 @@ function Surface({
|
|
|
5075
5585
|
function ListItem({ className, children, onPress, ...props }) {
|
|
5076
5586
|
const Container = onPress ? reactNative.Pressable : reactNative.View;
|
|
5077
5587
|
const containerProps = onPress ? { onPress, ...props } : props;
|
|
5078
|
-
return /* @__PURE__ */
|
|
5588
|
+
return /* @__PURE__ */ jsx(
|
|
5079
5589
|
Container,
|
|
5080
5590
|
{
|
|
5081
5591
|
className: cn("flex-row items-center py-3 px-4 min-h-[48px]", className),
|
|
@@ -5085,19 +5595,19 @@ function ListItem({ className, children, onPress, ...props }) {
|
|
|
5085
5595
|
);
|
|
5086
5596
|
}
|
|
5087
5597
|
function ListItemIcon({ icon: Icon, className, ...props }) {
|
|
5088
|
-
return /* @__PURE__ */
|
|
5598
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("mr-3 items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx(Icon, { size: 20, className: "text-text-secondary" }) });
|
|
5089
5599
|
}
|
|
5090
5600
|
function ListItemContent({ title, subtitle, className, ...props }) {
|
|
5091
|
-
return /* @__PURE__ */
|
|
5092
|
-
/* @__PURE__ */
|
|
5093
|
-
subtitle && /* @__PURE__ */
|
|
5601
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("flex-1 justify-center", className), ...props, children: [
|
|
5602
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm font-medium text-text-primary", children: title }),
|
|
5603
|
+
subtitle && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-xs text-text-secondary mt-0.5", children: subtitle })
|
|
5094
5604
|
] });
|
|
5095
5605
|
}
|
|
5096
5606
|
function ListItemTrailing({ className, children, ...props }) {
|
|
5097
|
-
return /* @__PURE__ */
|
|
5607
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("ml-3 items-center justify-center", className), ...props, children });
|
|
5098
5608
|
}
|
|
5099
5609
|
function ListItemDivider({ inset = true, className, ...props }) {
|
|
5100
|
-
return /* @__PURE__ */
|
|
5610
|
+
return /* @__PURE__ */ jsx(
|
|
5101
5611
|
reactNative.View,
|
|
5102
5612
|
{
|
|
5103
5613
|
className: cn("h-px bg-divider", inset ? "ml-14" : "", className),
|
|
@@ -5105,6 +5615,63 @@ function ListItemDivider({ inset = true, className, ...props }) {
|
|
|
5105
5615
|
}
|
|
5106
5616
|
);
|
|
5107
5617
|
}
|
|
5618
|
+
var variantColorStyles2 = {
|
|
5619
|
+
subtle: {
|
|
5620
|
+
default: "bg-surface-raised border-border-subtle text-text-secondary",
|
|
5621
|
+
primary: "bg-brand-primary/10 border-brand-primary/25 text-brand-primary",
|
|
5622
|
+
secondary: "bg-brand-secondary/10 border-brand-secondary/25 text-brand-secondary",
|
|
5623
|
+
success: "bg-status-success/10 border-status-success/25 text-status-success",
|
|
5624
|
+
error: "bg-status-error/10 border-status-error/25 text-status-error",
|
|
5625
|
+
warning: "bg-status-warning/10 border-status-warning/25 text-status-warning",
|
|
5626
|
+
info: "bg-status-info/10 border-status-info/25 text-status-info"
|
|
5627
|
+
},
|
|
5628
|
+
outline: {
|
|
5629
|
+
default: "border-border-default text-text-secondary",
|
|
5630
|
+
primary: "border-brand-primary text-brand-primary",
|
|
5631
|
+
secondary: "border-brand-secondary text-brand-secondary",
|
|
5632
|
+
success: "border-status-success text-status-success",
|
|
5633
|
+
error: "border-status-error text-status-error",
|
|
5634
|
+
warning: "border-status-warning text-status-warning",
|
|
5635
|
+
info: "border-status-info text-status-info"
|
|
5636
|
+
}
|
|
5637
|
+
};
|
|
5638
|
+
var sizeStyles14 = {
|
|
5639
|
+
xs: { container: "px-1 py-px", text: "text-[9px]" },
|
|
5640
|
+
sm: { container: "px-2 py-0.5", text: "text-[10px]" },
|
|
5641
|
+
md: { container: "px-2 py-1", text: "text-[10px]" }
|
|
5642
|
+
};
|
|
5643
|
+
function Pill({
|
|
5644
|
+
children,
|
|
5645
|
+
variant = "subtle",
|
|
5646
|
+
color = "default",
|
|
5647
|
+
size = "sm",
|
|
5648
|
+
rounded = true,
|
|
5649
|
+
leftElement,
|
|
5650
|
+
onPress,
|
|
5651
|
+
className,
|
|
5652
|
+
...props
|
|
5653
|
+
}) {
|
|
5654
|
+
const containerClasses = cn(
|
|
5655
|
+
"flex-row items-center gap-1 border self-start shrink-0",
|
|
5656
|
+
rounded ? "rounded-full" : "rounded",
|
|
5657
|
+
variantColorStyles2[variant][color],
|
|
5658
|
+
sizeStyles14[size].container,
|
|
5659
|
+
className
|
|
5660
|
+
);
|
|
5661
|
+
const textClasses = cn(
|
|
5662
|
+
"font-heading font-semibold",
|
|
5663
|
+
sizeStyles14[size].text,
|
|
5664
|
+
"text-inherit"
|
|
5665
|
+
);
|
|
5666
|
+
const content = /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
5667
|
+
leftElement,
|
|
5668
|
+
typeof children === "string" ? /* @__PURE__ */ jsx(reactNative.Text, { className: textClasses, children }) : children
|
|
5669
|
+
] });
|
|
5670
|
+
if (onPress) {
|
|
5671
|
+
return /* @__PURE__ */ jsx(reactNative.Pressable, { onPress, className: containerClasses, ...props, children: content });
|
|
5672
|
+
}
|
|
5673
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: containerClasses, ...props, children: content });
|
|
5674
|
+
}
|
|
5108
5675
|
var variantStyles4 = {
|
|
5109
5676
|
h1: "font-heading text-5xl font-bold leading-tight",
|
|
5110
5677
|
h2: "font-heading text-4xl font-bold leading-tight",
|
|
@@ -5120,7 +5687,7 @@ var variantStyles4 = {
|
|
|
5120
5687
|
overline: "font-body text-xs font-semibold uppercase tracking-widest leading-relaxed",
|
|
5121
5688
|
button: "font-sans text-sm font-semibold leading-relaxed"
|
|
5122
5689
|
};
|
|
5123
|
-
var
|
|
5690
|
+
var colorStyles7 = {
|
|
5124
5691
|
primary: "text-text-primary",
|
|
5125
5692
|
secondary: "text-text-secondary",
|
|
5126
5693
|
tertiary: "text-text-tertiary",
|
|
@@ -5170,14 +5737,14 @@ function Typography({
|
|
|
5170
5737
|
} else if (shouldTruncate) {
|
|
5171
5738
|
numLines = 1;
|
|
5172
5739
|
}
|
|
5173
|
-
return /* @__PURE__ */
|
|
5740
|
+
return /* @__PURE__ */ jsx(
|
|
5174
5741
|
reactNative.Text,
|
|
5175
5742
|
{
|
|
5176
5743
|
accessibilityRole: isHeading ? "header" : "text",
|
|
5177
5744
|
numberOfLines: numLines,
|
|
5178
5745
|
className: cn(
|
|
5179
5746
|
variantStyles4[variant],
|
|
5180
|
-
color !== "inherit" &&
|
|
5747
|
+
color !== "inherit" && colorStyles7[color],
|
|
5181
5748
|
align && alignStyles2[align],
|
|
5182
5749
|
shouldTruncate && "truncate",
|
|
5183
5750
|
marginBottomStyles[mb],
|
|
@@ -5190,19 +5757,19 @@ function Typography({
|
|
|
5190
5757
|
}
|
|
5191
5758
|
function Heading({ level = 1, ...props }) {
|
|
5192
5759
|
const variant = `h${level}`;
|
|
5193
|
-
return /* @__PURE__ */
|
|
5760
|
+
return /* @__PURE__ */ jsx(Typography, { variant, ...props });
|
|
5194
5761
|
}
|
|
5195
5762
|
function Paragraph({ small = false, ...props }) {
|
|
5196
|
-
return /* @__PURE__ */
|
|
5763
|
+
return /* @__PURE__ */ jsx(Typography, { variant: small ? "body2" : "body1", ...props });
|
|
5197
5764
|
}
|
|
5198
5765
|
function Caption(props) {
|
|
5199
|
-
return /* @__PURE__ */
|
|
5766
|
+
return /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", ...props });
|
|
5200
5767
|
}
|
|
5201
5768
|
function Label(props) {
|
|
5202
|
-
return /* @__PURE__ */
|
|
5769
|
+
return /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", ...props });
|
|
5203
5770
|
}
|
|
5204
5771
|
function Overline(props) {
|
|
5205
|
-
return /* @__PURE__ */
|
|
5772
|
+
return /* @__PURE__ */ jsx(Typography, { variant: "overline", color: "secondary", ...props });
|
|
5206
5773
|
}
|
|
5207
5774
|
var SidebarContext = React24.createContext({
|
|
5208
5775
|
isCollapsed: false
|
|
@@ -5218,7 +5785,7 @@ function Sidebar({
|
|
|
5218
5785
|
...props
|
|
5219
5786
|
}) {
|
|
5220
5787
|
const currentWidth = isCollapsed ? collapsedWidth : width;
|
|
5221
|
-
return /* @__PURE__ */
|
|
5788
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: { isCollapsed, activeItem, onItemSelect }, children: /* @__PURE__ */ jsx(
|
|
5222
5789
|
reactNative.View,
|
|
5223
5790
|
{
|
|
5224
5791
|
style: { width: currentWidth },
|
|
@@ -5232,10 +5799,10 @@ function Sidebar({
|
|
|
5232
5799
|
) });
|
|
5233
5800
|
}
|
|
5234
5801
|
function SidebarHeader({ children, className }) {
|
|
5235
|
-
return /* @__PURE__ */
|
|
5802
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("px-4 py-4 border-b border-border-subtle", className), children });
|
|
5236
5803
|
}
|
|
5237
5804
|
function SidebarContent({ children, className }) {
|
|
5238
|
-
return /* @__PURE__ */
|
|
5805
|
+
return /* @__PURE__ */ jsx(
|
|
5239
5806
|
reactNative.ScrollView,
|
|
5240
5807
|
{
|
|
5241
5808
|
className: cn("flex-1", className),
|
|
@@ -5245,13 +5812,13 @@ function SidebarContent({ children, className }) {
|
|
|
5245
5812
|
);
|
|
5246
5813
|
}
|
|
5247
5814
|
function SidebarFooter({ children, className }) {
|
|
5248
|
-
return /* @__PURE__ */
|
|
5815
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("px-2 py-4 border-t border-border-subtle", className), children });
|
|
5249
5816
|
}
|
|
5250
5817
|
function SidebarSection({ title, children, className }) {
|
|
5251
5818
|
const { isCollapsed } = React24.useContext(SidebarContext);
|
|
5252
|
-
return /* @__PURE__ */
|
|
5253
|
-
title && !isCollapsed && /* @__PURE__ */
|
|
5254
|
-
/* @__PURE__ */
|
|
5819
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("px-2 py-2", className), children: [
|
|
5820
|
+
title && !isCollapsed && /* @__PURE__ */ jsx(reactNative.Text, { className: "px-3 py-2 text-xs font-semibold uppercase tracking-wider text-text-tertiary", children: title }),
|
|
5821
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "gap-0.5", children })
|
|
5255
5822
|
] });
|
|
5256
5823
|
}
|
|
5257
5824
|
function SidebarItem({
|
|
@@ -5271,7 +5838,7 @@ function SidebarItem({
|
|
|
5271
5838
|
onItemSelect?.(id);
|
|
5272
5839
|
onPress?.(e);
|
|
5273
5840
|
};
|
|
5274
|
-
return /* @__PURE__ */
|
|
5841
|
+
return /* @__PURE__ */ jsxs(
|
|
5275
5842
|
reactNative.Pressable,
|
|
5276
5843
|
{
|
|
5277
5844
|
accessibilityRole: "button",
|
|
@@ -5286,7 +5853,7 @@ function SidebarItem({
|
|
|
5286
5853
|
),
|
|
5287
5854
|
...props,
|
|
5288
5855
|
children: [
|
|
5289
|
-
Icon && /* @__PURE__ */
|
|
5856
|
+
Icon && /* @__PURE__ */ jsx(
|
|
5290
5857
|
Icon,
|
|
5291
5858
|
{
|
|
5292
5859
|
size: 20,
|
|
@@ -5295,8 +5862,8 @@ function SidebarItem({
|
|
|
5295
5862
|
)
|
|
5296
5863
|
}
|
|
5297
5864
|
),
|
|
5298
|
-
!isCollapsed && /* @__PURE__ */
|
|
5299
|
-
/* @__PURE__ */
|
|
5865
|
+
!isCollapsed && /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
5866
|
+
/* @__PURE__ */ jsx(
|
|
5300
5867
|
reactNative.Text,
|
|
5301
5868
|
{
|
|
5302
5869
|
numberOfLines: 1,
|
|
@@ -5307,15 +5874,15 @@ function SidebarItem({
|
|
|
5307
5874
|
children: label
|
|
5308
5875
|
}
|
|
5309
5876
|
),
|
|
5310
|
-
badge && /* @__PURE__ */
|
|
5311
|
-
hasChildren && /* @__PURE__ */
|
|
5877
|
+
badge && /* @__PURE__ */ jsx(reactNative.View, { className: "ml-auto", children: badge }),
|
|
5878
|
+
hasChildren && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-tertiary ml-1", children: isExpanded ? "\u25BC" : "\u25B6" })
|
|
5312
5879
|
] })
|
|
5313
5880
|
]
|
|
5314
5881
|
}
|
|
5315
5882
|
);
|
|
5316
5883
|
}
|
|
5317
5884
|
function SidebarDivider({ className }) {
|
|
5318
|
-
return /* @__PURE__ */
|
|
5885
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("h-px mx-4 my-2 bg-border-subtle", className) });
|
|
5319
5886
|
}
|
|
5320
5887
|
var TableContext = React24.createContext({
|
|
5321
5888
|
sortDirection: null,
|
|
@@ -5338,7 +5905,7 @@ function Table({
|
|
|
5338
5905
|
children,
|
|
5339
5906
|
...props
|
|
5340
5907
|
}) {
|
|
5341
|
-
return /* @__PURE__ */
|
|
5908
|
+
return /* @__PURE__ */ jsx(
|
|
5342
5909
|
TableContext.Provider,
|
|
5343
5910
|
{
|
|
5344
5911
|
value: {
|
|
@@ -5351,12 +5918,12 @@ function Table({
|
|
|
5351
5918
|
selectable,
|
|
5352
5919
|
allRowIds: rowIds
|
|
5353
5920
|
},
|
|
5354
|
-
children: /* @__PURE__ */
|
|
5921
|
+
children: /* @__PURE__ */ jsx(reactNative.View, { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsx(reactNative.ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, children: /* @__PURE__ */ jsx(reactNative.View, { className: "w-full min-w-full", children: isLoading ? /* @__PURE__ */ jsx(TableLoadingSkeleton, { rowCount: loadingRowCount }) : children }) }) })
|
|
5355
5922
|
}
|
|
5356
5923
|
);
|
|
5357
5924
|
}
|
|
5358
5925
|
function TableHeader({ children, className }) {
|
|
5359
|
-
return /* @__PURE__ */
|
|
5926
|
+
return /* @__PURE__ */ jsx(
|
|
5360
5927
|
reactNative.View,
|
|
5361
5928
|
{
|
|
5362
5929
|
accessibilityRole: "none",
|
|
@@ -5366,7 +5933,7 @@ function TableHeader({ children, className }) {
|
|
|
5366
5933
|
);
|
|
5367
5934
|
}
|
|
5368
5935
|
function TableBody({ children, className }) {
|
|
5369
|
-
return /* @__PURE__ */
|
|
5936
|
+
return /* @__PURE__ */ jsx(reactNative.View, { accessibilityRole: "none", className, children });
|
|
5370
5937
|
}
|
|
5371
5938
|
function TableRow({
|
|
5372
5939
|
isSelected = false,
|
|
@@ -5375,7 +5942,7 @@ function TableRow({
|
|
|
5375
5942
|
children,
|
|
5376
5943
|
...props
|
|
5377
5944
|
}) {
|
|
5378
|
-
return /* @__PURE__ */
|
|
5945
|
+
return /* @__PURE__ */ jsx(
|
|
5379
5946
|
reactNative.View,
|
|
5380
5947
|
{
|
|
5381
5948
|
accessibilityRole: "none",
|
|
@@ -5413,8 +5980,8 @@ function TableHeaderCell({
|
|
|
5413
5980
|
center: "justify-center",
|
|
5414
5981
|
right: "justify-end"
|
|
5415
5982
|
};
|
|
5416
|
-
const content = /* @__PURE__ */
|
|
5417
|
-
/* @__PURE__ */
|
|
5983
|
+
const content = /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
5984
|
+
/* @__PURE__ */ jsx(
|
|
5418
5985
|
reactNative.Text,
|
|
5419
5986
|
{
|
|
5420
5987
|
className: cn(
|
|
@@ -5424,10 +5991,10 @@ function TableHeaderCell({
|
|
|
5424
5991
|
children
|
|
5425
5992
|
}
|
|
5426
5993
|
),
|
|
5427
|
-
isSortable && /* @__PURE__ */
|
|
5994
|
+
isSortable && /* @__PURE__ */ jsx(reactNative.Text, { className: cn("ml-1 text-xs", isSorted ? "text-text-primary" : "text-text-tertiary"), children: isSorted ? sortDirection === "asc" ? "\u2191" : "\u2193" : "\u2195" })
|
|
5428
5995
|
] });
|
|
5429
5996
|
if (isSortable) {
|
|
5430
|
-
return /* @__PURE__ */
|
|
5997
|
+
return /* @__PURE__ */ jsx(
|
|
5431
5998
|
reactNative.Pressable,
|
|
5432
5999
|
{
|
|
5433
6000
|
accessibilityRole: "button",
|
|
@@ -5445,7 +6012,7 @@ function TableHeaderCell({
|
|
|
5445
6012
|
}
|
|
5446
6013
|
);
|
|
5447
6014
|
}
|
|
5448
|
-
return /* @__PURE__ */
|
|
6015
|
+
return /* @__PURE__ */ jsx(
|
|
5449
6016
|
reactNative.View,
|
|
5450
6017
|
{
|
|
5451
6018
|
style: width ? { width } : { flex: 1 },
|
|
@@ -5470,7 +6037,7 @@ function TableCell({
|
|
|
5470
6037
|
center: "items-center",
|
|
5471
6038
|
right: "items-end"
|
|
5472
6039
|
};
|
|
5473
|
-
return /* @__PURE__ */
|
|
6040
|
+
return /* @__PURE__ */ jsx(
|
|
5474
6041
|
reactNative.View,
|
|
5475
6042
|
{
|
|
5476
6043
|
style: width ? { width } : { flex: 1 },
|
|
@@ -5480,7 +6047,7 @@ function TableCell({
|
|
|
5480
6047
|
className
|
|
5481
6048
|
),
|
|
5482
6049
|
...props,
|
|
5483
|
-
children: typeof children === "string" ? /* @__PURE__ */
|
|
6050
|
+
children: typeof children === "string" ? /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-primary", children }) : children
|
|
5484
6051
|
}
|
|
5485
6052
|
);
|
|
5486
6053
|
}
|
|
@@ -5498,7 +6065,7 @@ function TablePagination({
|
|
|
5498
6065
|
const endItem = Math.min((page + 1) * pageSize, totalItems);
|
|
5499
6066
|
const canGoPrevious = page > 0;
|
|
5500
6067
|
const canGoNext = page < totalPages - 1;
|
|
5501
|
-
return /* @__PURE__ */
|
|
6068
|
+
return /* @__PURE__ */ jsxs(
|
|
5502
6069
|
reactNative.View,
|
|
5503
6070
|
{
|
|
5504
6071
|
className: cn(
|
|
@@ -5506,9 +6073,9 @@ function TablePagination({
|
|
|
5506
6073
|
className
|
|
5507
6074
|
),
|
|
5508
6075
|
children: [
|
|
5509
|
-
/* @__PURE__ */
|
|
5510
|
-
/* @__PURE__ */
|
|
5511
|
-
/* @__PURE__ */
|
|
6076
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row items-center gap-2", children: [
|
|
6077
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-secondary", children: "Rows per page:" }),
|
|
6078
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-row gap-1", children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx(
|
|
5512
6079
|
reactNative.Pressable,
|
|
5513
6080
|
{
|
|
5514
6081
|
onPress: () => onPageSizeChange?.(size),
|
|
@@ -5516,7 +6083,7 @@ function TablePagination({
|
|
|
5516
6083
|
"px-2 py-1 rounded",
|
|
5517
6084
|
pageSize === size ? "bg-brand-primary-subtle text-brand-primary" : "text-text-secondary web:hover:bg-interactive-hover"
|
|
5518
6085
|
),
|
|
5519
|
-
children: /* @__PURE__ */
|
|
6086
|
+
children: /* @__PURE__ */ jsx(
|
|
5520
6087
|
reactNative.Text,
|
|
5521
6088
|
{
|
|
5522
6089
|
className: cn(
|
|
@@ -5530,16 +6097,16 @@ function TablePagination({
|
|
|
5530
6097
|
size
|
|
5531
6098
|
)) })
|
|
5532
6099
|
] }),
|
|
5533
|
-
/* @__PURE__ */
|
|
5534
|
-
/* @__PURE__ */
|
|
6100
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row items-center gap-4", children: [
|
|
6101
|
+
/* @__PURE__ */ jsxs(reactNative.Text, { className: "text-sm text-text-secondary", children: [
|
|
5535
6102
|
startItem,
|
|
5536
6103
|
"-",
|
|
5537
6104
|
endItem,
|
|
5538
6105
|
" of ",
|
|
5539
6106
|
totalItems
|
|
5540
6107
|
] }),
|
|
5541
|
-
/* @__PURE__ */
|
|
5542
|
-
/* @__PURE__ */
|
|
6108
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row gap-1", children: [
|
|
6109
|
+
/* @__PURE__ */ jsx(
|
|
5543
6110
|
reactNative.Pressable,
|
|
5544
6111
|
{
|
|
5545
6112
|
disabled: !canGoPrevious,
|
|
@@ -5549,10 +6116,10 @@ function TablePagination({
|
|
|
5549
6116
|
"p-2 rounded",
|
|
5550
6117
|
canGoPrevious ? "web:hover:bg-interactive-hover active:bg-interactive-active" : "opacity-50"
|
|
5551
6118
|
),
|
|
5552
|
-
children: /* @__PURE__ */
|
|
6119
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-secondary", children: "\u2190" })
|
|
5553
6120
|
}
|
|
5554
6121
|
),
|
|
5555
|
-
/* @__PURE__ */
|
|
6122
|
+
/* @__PURE__ */ jsx(
|
|
5556
6123
|
reactNative.Pressable,
|
|
5557
6124
|
{
|
|
5558
6125
|
disabled: !canGoNext,
|
|
@@ -5562,7 +6129,7 @@ function TablePagination({
|
|
|
5562
6129
|
"p-2 rounded",
|
|
5563
6130
|
canGoNext ? "web:hover:bg-interactive-hover active:bg-interactive-active" : "opacity-50"
|
|
5564
6131
|
),
|
|
5565
|
-
children: /* @__PURE__ */
|
|
6132
|
+
children: /* @__PURE__ */ jsx(reactNative.Text, { className: "text-text-secondary", children: "\u2192" })
|
|
5566
6133
|
}
|
|
5567
6134
|
)
|
|
5568
6135
|
] })
|
|
@@ -5626,9 +6193,9 @@ function useTable({
|
|
|
5626
6193
|
};
|
|
5627
6194
|
}
|
|
5628
6195
|
function TableLoadingSkeleton({ rowCount }) {
|
|
5629
|
-
return /* @__PURE__ */
|
|
5630
|
-
/* @__PURE__ */
|
|
5631
|
-
/* @__PURE__ */
|
|
6196
|
+
return /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
6197
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { isHoverable: false, children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx(reactNative.View, { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ jsx(reactNative.View, { className: "h-4 w-20 bg-interactive-disabled rounded animate-pulse" }) }, i)) }) }),
|
|
6198
|
+
/* @__PURE__ */ jsx(TableBody, { children: Array.from({ length: rowCount }).map((_, rowIndex) => /* @__PURE__ */ jsx(TableRow, { isHoverable: false, children: [1, 2, 3, 4].map((colIndex) => /* @__PURE__ */ jsx(reactNative.View, { className: "flex-1 px-4 py-3.5", children: /* @__PURE__ */ jsx(
|
|
5632
6199
|
reactNative.View,
|
|
5633
6200
|
{
|
|
5634
6201
|
className: "h-4 bg-interactive-disabled rounded animate-pulse",
|
|
@@ -5645,7 +6212,7 @@ function EmptyState({
|
|
|
5645
6212
|
className,
|
|
5646
6213
|
...props
|
|
5647
6214
|
}) {
|
|
5648
|
-
return /* @__PURE__ */
|
|
6215
|
+
return /* @__PURE__ */ jsxs(
|
|
5649
6216
|
reactNative.View,
|
|
5650
6217
|
{
|
|
5651
6218
|
className: cn(
|
|
@@ -5654,10 +6221,10 @@ function EmptyState({
|
|
|
5654
6221
|
),
|
|
5655
6222
|
...props,
|
|
5656
6223
|
children: [
|
|
5657
|
-
Icon && /* @__PURE__ */
|
|
5658
|
-
/* @__PURE__ */
|
|
5659
|
-
description && /* @__PURE__ */
|
|
5660
|
-
action && /* @__PURE__ */
|
|
6224
|
+
Icon && /* @__PURE__ */ jsx(reactNative.View, { className: "mb-4 p-4 rounded-full bg-background-subtle", children: /* @__PURE__ */ jsx(Icon, { size: 32, className: "text-text-tertiary" }) }),
|
|
6225
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: "text-lg font-semibold text-text-primary text-center mb-2", children: title }),
|
|
6226
|
+
description && /* @__PURE__ */ jsx(reactNative.Text, { className: "text-sm text-text-secondary text-center max-w-xs mb-6", children: description }),
|
|
6227
|
+
action && /* @__PURE__ */ jsx(reactNative.View, { className: "mt-2", children: action })
|
|
5661
6228
|
]
|
|
5662
6229
|
}
|
|
5663
6230
|
);
|
|
@@ -5673,7 +6240,7 @@ function Stepper({
|
|
|
5673
6240
|
children,
|
|
5674
6241
|
...props
|
|
5675
6242
|
}) {
|
|
5676
|
-
return /* @__PURE__ */
|
|
6243
|
+
return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { activeStep, orientation }, children: /* @__PURE__ */ jsx(
|
|
5677
6244
|
reactNative.View,
|
|
5678
6245
|
{
|
|
5679
6246
|
className: cn(
|
|
@@ -5683,9 +6250,9 @@ function Stepper({
|
|
|
5683
6250
|
...props,
|
|
5684
6251
|
children: React24__default.default.Children.map(children, (child, index) => {
|
|
5685
6252
|
if (React24__default.default.isValidElement(child)) {
|
|
5686
|
-
return /* @__PURE__ */
|
|
6253
|
+
return /* @__PURE__ */ jsxs(jsxRuntime.Fragment, { children: [
|
|
5687
6254
|
React24__default.default.cloneElement(child, { index }),
|
|
5688
|
-
index < React24__default.default.Children.count(children) - 1 && /* @__PURE__ */
|
|
6255
|
+
index < React24__default.default.Children.count(children) - 1 && /* @__PURE__ */ jsx(StepConnector, { index })
|
|
5689
6256
|
] });
|
|
5690
6257
|
}
|
|
5691
6258
|
return child;
|
|
@@ -5697,7 +6264,7 @@ function StepConnector({ index }) {
|
|
|
5697
6264
|
const { activeStep, orientation } = React24.useContext(StepperContext);
|
|
5698
6265
|
const isCompleted = index < activeStep;
|
|
5699
6266
|
if (orientation === "horizontal") {
|
|
5700
|
-
return /* @__PURE__ */
|
|
6267
|
+
return /* @__PURE__ */ jsx(
|
|
5701
6268
|
reactNative.View,
|
|
5702
6269
|
{
|
|
5703
6270
|
className: cn(
|
|
@@ -5707,7 +6274,7 @@ function StepConnector({ index }) {
|
|
|
5707
6274
|
}
|
|
5708
6275
|
);
|
|
5709
6276
|
}
|
|
5710
|
-
return /* @__PURE__ */
|
|
6277
|
+
return /* @__PURE__ */ jsx(
|
|
5711
6278
|
reactNative.View,
|
|
5712
6279
|
{
|
|
5713
6280
|
className: cn(
|
|
@@ -5720,7 +6287,7 @@ function StepConnector({ index }) {
|
|
|
5720
6287
|
function Step({ index = 0, status, className, children }) {
|
|
5721
6288
|
const { activeStep, orientation } = React24.useContext(StepperContext);
|
|
5722
6289
|
const derivedStatus = status || (index < activeStep ? "completed" : index === activeStep ? "active" : "upcoming");
|
|
5723
|
-
return /* @__PURE__ */
|
|
6290
|
+
return /* @__PURE__ */ jsx(
|
|
5724
6291
|
reactNative.View,
|
|
5725
6292
|
{
|
|
5726
6293
|
className: cn(
|
|
@@ -5751,7 +6318,7 @@ function StepIndicator({
|
|
|
5751
6318
|
upcoming: "bg-surface-base border-border-strong",
|
|
5752
6319
|
error: "bg-status-error border-status-error"
|
|
5753
6320
|
};
|
|
5754
|
-
return /* @__PURE__ */
|
|
6321
|
+
return /* @__PURE__ */ jsx(
|
|
5755
6322
|
reactNative.View,
|
|
5756
6323
|
{
|
|
5757
6324
|
className: cn(
|
|
@@ -5759,7 +6326,7 @@ function StepIndicator({
|
|
|
5759
6326
|
statusStyles2[status],
|
|
5760
6327
|
className
|
|
5761
6328
|
),
|
|
5762
|
-
children: icon || /* @__PURE__ */
|
|
6329
|
+
children: icon || /* @__PURE__ */ jsx(
|
|
5763
6330
|
reactNative.Text,
|
|
5764
6331
|
{
|
|
5765
6332
|
className: cn(
|
|
@@ -5774,7 +6341,7 @@ function StepIndicator({
|
|
|
5774
6341
|
}
|
|
5775
6342
|
function StepLabel({ status = "upcoming", className, children }) {
|
|
5776
6343
|
const { orientation } = React24.useContext(StepperContext);
|
|
5777
|
-
return /* @__PURE__ */
|
|
6344
|
+
return /* @__PURE__ */ jsx(
|
|
5778
6345
|
reactNative.Text,
|
|
5779
6346
|
{
|
|
5780
6347
|
className: cn(
|
|
@@ -5789,9 +6356,9 @@ function StepLabel({ status = "upcoming", className, children }) {
|
|
|
5789
6356
|
}
|
|
5790
6357
|
function StepContent({ status = "upcoming", className, children }) {
|
|
5791
6358
|
if (status !== "active") return null;
|
|
5792
|
-
return /* @__PURE__ */
|
|
6359
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("ml-11 mt-2 pb-4", className), children });
|
|
5793
6360
|
}
|
|
5794
|
-
var
|
|
6361
|
+
var colorStyles8 = {
|
|
5795
6362
|
primary: "text-text-primary",
|
|
5796
6363
|
secondary: "text-text-secondary",
|
|
5797
6364
|
tertiary: "text-text-tertiary",
|
|
@@ -5922,10 +6489,10 @@ function DateTime({
|
|
|
5922
6489
|
...props
|
|
5923
6490
|
}) {
|
|
5924
6491
|
if (value === null || value === void 0) {
|
|
5925
|
-
return /* @__PURE__ */
|
|
6492
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: cn(colorStyles8[color], className), ...props, children: fallback });
|
|
5926
6493
|
}
|
|
5927
6494
|
const formattedDate = formatDate(value, format, isUTC);
|
|
5928
|
-
return /* @__PURE__ */
|
|
6495
|
+
return /* @__PURE__ */ jsx(reactNative.Text, { className: cn(colorStyles8[color], className), ...props, children: formattedDate });
|
|
5929
6496
|
}
|
|
5930
6497
|
function formatDateTime(value, format = "datetime", isUTC = false, fallback = "-") {
|
|
5931
6498
|
if (value === null || value === void 0) {
|
|
@@ -5958,13 +6525,13 @@ function Metric({
|
|
|
5958
6525
|
...props
|
|
5959
6526
|
}) {
|
|
5960
6527
|
const styles2 = sizeConfig2[size];
|
|
5961
|
-
return /* @__PURE__ */
|
|
5962
|
-
/* @__PURE__ */
|
|
5963
|
-
/* @__PURE__ */
|
|
5964
|
-
unit && /* @__PURE__ */
|
|
5965
|
-
trend && /* @__PURE__ */
|
|
6528
|
+
return /* @__PURE__ */ jsxs(reactNative.View, { className: cn("items-center", className), ...props, children: [
|
|
6529
|
+
/* @__PURE__ */ jsxs(reactNative.View, { className: "flex-row items-baseline gap-1", children: [
|
|
6530
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: cn(styles2.value, "text-text-primary"), children: value }),
|
|
6531
|
+
unit && /* @__PURE__ */ jsx(reactNative.Text, { className: cn(styles2.unit, "text-text-tertiary"), children: unit }),
|
|
6532
|
+
trend && /* @__PURE__ */ jsx(reactNative.Text, { className: cn(styles2.unit, trendColors[trend]), children: trendArrows[trend] })
|
|
5966
6533
|
] }),
|
|
5967
|
-
/* @__PURE__ */
|
|
6534
|
+
/* @__PURE__ */ jsx(reactNative.Text, { className: cn(styles2.label, "text-text-secondary mt-1"), children: label })
|
|
5968
6535
|
] });
|
|
5969
6536
|
}
|
|
5970
6537
|
function MetricGroup({
|
|
@@ -5973,9 +6540,9 @@ function MetricGroup({
|
|
|
5973
6540
|
...props
|
|
5974
6541
|
}) {
|
|
5975
6542
|
const items = React24__default.default.Children.toArray(children);
|
|
5976
|
-
return /* @__PURE__ */
|
|
5977
|
-
/* @__PURE__ */
|
|
5978
|
-
i < items.length - 1 && /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsx(reactNative.View, { className: cn("flex-row items-center", className), ...props, children: items.map((child, i) => /* @__PURE__ */ jsxs(React24__default.default.Fragment, { children: [
|
|
6544
|
+
/* @__PURE__ */ jsx(reactNative.View, { className: "flex-1 items-center", children: child }),
|
|
6545
|
+
i < items.length - 1 && /* @__PURE__ */ jsx(
|
|
5979
6546
|
reactNative.View,
|
|
5980
6547
|
{
|
|
5981
6548
|
className: "w-px h-8 bg-divider mx-2",
|
|
@@ -5984,6 +6551,231 @@ function MetricGroup({
|
|
|
5984
6551
|
)
|
|
5985
6552
|
] }, i)) });
|
|
5986
6553
|
}
|
|
6554
|
+
function RestTimer({
|
|
6555
|
+
totalSeconds,
|
|
6556
|
+
elapsedMs,
|
|
6557
|
+
onSkip,
|
|
6558
|
+
onAddTime,
|
|
6559
|
+
nextSetInfo,
|
|
6560
|
+
visible
|
|
6561
|
+
}) {
|
|
6562
|
+
if (!visible) return null;
|
|
6563
|
+
const remainingMs = Math.max(0, totalSeconds * 1e3 - elapsedMs);
|
|
6564
|
+
const remainingSec = Math.ceil(remainingMs / 1e3);
|
|
6565
|
+
const minutes = Math.floor(remainingSec / 60);
|
|
6566
|
+
const seconds = remainingSec % 60;
|
|
6567
|
+
const timeDisplay = `${minutes}:${String(seconds).padStart(2, "0")}`;
|
|
6568
|
+
const progressPct = Math.min(100, elapsedMs / (totalSeconds * 1e3) * 100);
|
|
6569
|
+
return /* @__PURE__ */ jsxs(
|
|
6570
|
+
reactNative.View,
|
|
6571
|
+
{
|
|
6572
|
+
style: {
|
|
6573
|
+
width: "100%",
|
|
6574
|
+
backgroundColor: "#1C1C1C",
|
|
6575
|
+
borderTopWidth: 1,
|
|
6576
|
+
borderTopColor: "#1F1F1F",
|
|
6577
|
+
paddingVertical: 12,
|
|
6578
|
+
paddingHorizontal: 16
|
|
6579
|
+
},
|
|
6580
|
+
accessibilityRole: "timer",
|
|
6581
|
+
accessibilityLabel: `Rest timer, ${remainingSec} seconds remaining`,
|
|
6582
|
+
testID: "rest-timer",
|
|
6583
|
+
children: [
|
|
6584
|
+
/* @__PURE__ */ jsxs(
|
|
6585
|
+
reactNative.View,
|
|
6586
|
+
{
|
|
6587
|
+
style: {
|
|
6588
|
+
flexDirection: "row",
|
|
6589
|
+
justifyContent: "space-between",
|
|
6590
|
+
alignItems: "center",
|
|
6591
|
+
marginBottom: 8
|
|
6592
|
+
},
|
|
6593
|
+
children: [
|
|
6594
|
+
/* @__PURE__ */ jsxs(reactNative.View, { style: { flexDirection: "column" }, children: [
|
|
6595
|
+
/* @__PURE__ */ jsx(
|
|
6596
|
+
reactNative.Text,
|
|
6597
|
+
{
|
|
6598
|
+
style: {
|
|
6599
|
+
fontSize: 11,
|
|
6600
|
+
fontFamily: "Inter, sans-serif",
|
|
6601
|
+
fontWeight: "600",
|
|
6602
|
+
textTransform: "uppercase",
|
|
6603
|
+
letterSpacing: 1,
|
|
6604
|
+
color: "#9CA3AF"
|
|
6605
|
+
},
|
|
6606
|
+
testID: "rest-timer-label",
|
|
6607
|
+
children: "REST"
|
|
6608
|
+
}
|
|
6609
|
+
),
|
|
6610
|
+
nextSetInfo != null && /* @__PURE__ */ jsx(
|
|
6611
|
+
reactNative.Text,
|
|
6612
|
+
{
|
|
6613
|
+
style: {
|
|
6614
|
+
fontSize: 11,
|
|
6615
|
+
fontFamily: "Inter, sans-serif",
|
|
6616
|
+
color: "#6B7280",
|
|
6617
|
+
marginTop: 2
|
|
6618
|
+
},
|
|
6619
|
+
testID: "rest-timer-next-set",
|
|
6620
|
+
children: nextSetInfo
|
|
6621
|
+
}
|
|
6622
|
+
)
|
|
6623
|
+
] }),
|
|
6624
|
+
/* @__PURE__ */ jsx(
|
|
6625
|
+
reactNative.Text,
|
|
6626
|
+
{
|
|
6627
|
+
style: {
|
|
6628
|
+
fontSize: 28,
|
|
6629
|
+
fontFamily: '"Space Grotesk", sans-serif',
|
|
6630
|
+
fontWeight: "700",
|
|
6631
|
+
color: "#F3F4F6",
|
|
6632
|
+
fontVariant: ["tabular-nums"],
|
|
6633
|
+
letterSpacing: -0.5
|
|
6634
|
+
},
|
|
6635
|
+
testID: "rest-timer-time",
|
|
6636
|
+
children: timeDisplay
|
|
6637
|
+
}
|
|
6638
|
+
)
|
|
6639
|
+
]
|
|
6640
|
+
}
|
|
6641
|
+
),
|
|
6642
|
+
/* @__PURE__ */ jsx(
|
|
6643
|
+
reactNative.View,
|
|
6644
|
+
{
|
|
6645
|
+
style: {
|
|
6646
|
+
height: 3,
|
|
6647
|
+
backgroundColor: "#1F1F1F",
|
|
6648
|
+
borderRadius: 2,
|
|
6649
|
+
marginBottom: 12
|
|
6650
|
+
},
|
|
6651
|
+
testID: "rest-timer-progress-track",
|
|
6652
|
+
children: /* @__PURE__ */ jsx(
|
|
6653
|
+
reactNative.View,
|
|
6654
|
+
{
|
|
6655
|
+
style: {
|
|
6656
|
+
height: "100%",
|
|
6657
|
+
backgroundColor: "#FF7900",
|
|
6658
|
+
borderRadius: 2,
|
|
6659
|
+
width: `${progressPct}%`
|
|
6660
|
+
},
|
|
6661
|
+
testID: "rest-timer-progress-fill"
|
|
6662
|
+
}
|
|
6663
|
+
)
|
|
6664
|
+
}
|
|
6665
|
+
),
|
|
6666
|
+
/* @__PURE__ */ jsxs(reactNative.View, { style: { flexDirection: "row", gap: 8 }, children: [
|
|
6667
|
+
/* @__PURE__ */ jsx(
|
|
6668
|
+
reactNative.Pressable,
|
|
6669
|
+
{
|
|
6670
|
+
onPress: onAddTime,
|
|
6671
|
+
style: {
|
|
6672
|
+
backgroundColor: "rgba(255,255,255,0.06)",
|
|
6673
|
+
paddingVertical: 8,
|
|
6674
|
+
paddingHorizontal: 20,
|
|
6675
|
+
borderRadius: 8
|
|
6676
|
+
},
|
|
6677
|
+
accessibilityRole: "button",
|
|
6678
|
+
accessibilityLabel: "Add 30 seconds",
|
|
6679
|
+
testID: "rest-timer-add-time",
|
|
6680
|
+
children: /* @__PURE__ */ jsx(
|
|
6681
|
+
reactNative.Text,
|
|
6682
|
+
{
|
|
6683
|
+
style: {
|
|
6684
|
+
fontSize: 11,
|
|
6685
|
+
fontFamily: "Inter, sans-serif",
|
|
6686
|
+
fontWeight: "600",
|
|
6687
|
+
color: "#9CA3AF"
|
|
6688
|
+
},
|
|
6689
|
+
children: "+30s"
|
|
6690
|
+
}
|
|
6691
|
+
)
|
|
6692
|
+
}
|
|
6693
|
+
),
|
|
6694
|
+
/* @__PURE__ */ jsx(
|
|
6695
|
+
reactNative.Pressable,
|
|
6696
|
+
{
|
|
6697
|
+
onPress: onSkip,
|
|
6698
|
+
style: {
|
|
6699
|
+
backgroundColor: "rgba(255,121,0,0.12)",
|
|
6700
|
+
paddingVertical: 8,
|
|
6701
|
+
paddingHorizontal: 20,
|
|
6702
|
+
borderRadius: 8
|
|
6703
|
+
},
|
|
6704
|
+
accessibilityRole: "button",
|
|
6705
|
+
accessibilityLabel: "Skip rest",
|
|
6706
|
+
testID: "rest-timer-skip",
|
|
6707
|
+
children: /* @__PURE__ */ jsx(
|
|
6708
|
+
reactNative.Text,
|
|
6709
|
+
{
|
|
6710
|
+
style: {
|
|
6711
|
+
fontSize: 11,
|
|
6712
|
+
fontFamily: "Inter, sans-serif",
|
|
6713
|
+
fontWeight: "600",
|
|
6714
|
+
color: "#FF7900"
|
|
6715
|
+
},
|
|
6716
|
+
children: "Skip"
|
|
6717
|
+
}
|
|
6718
|
+
)
|
|
6719
|
+
}
|
|
6720
|
+
)
|
|
6721
|
+
] })
|
|
6722
|
+
]
|
|
6723
|
+
}
|
|
6724
|
+
);
|
|
6725
|
+
}
|
|
6726
|
+
var DEFAULTS = {
|
|
6727
|
+
label: "SS",
|
|
6728
|
+
color: "#FF7900",
|
|
6729
|
+
bgBase: "#101010"
|
|
6730
|
+
};
|
|
6731
|
+
function SupersetWrapper({
|
|
6732
|
+
label = DEFAULTS.label,
|
|
6733
|
+
color = DEFAULTS.color,
|
|
6734
|
+
children
|
|
6735
|
+
}) {
|
|
6736
|
+
return /* @__PURE__ */ jsxs(
|
|
6737
|
+
reactNative.View,
|
|
6738
|
+
{
|
|
6739
|
+
style: {
|
|
6740
|
+
position: "relative",
|
|
6741
|
+
borderLeftWidth: 3,
|
|
6742
|
+
borderLeftColor: color,
|
|
6743
|
+
paddingLeft: 8,
|
|
6744
|
+
marginHorizontal: 12,
|
|
6745
|
+
marginBottom: 8,
|
|
6746
|
+
overflow: "visible"
|
|
6747
|
+
},
|
|
6748
|
+
accessibilityRole: "group",
|
|
6749
|
+
accessibilityLabel: `Superset: ${label}`,
|
|
6750
|
+
testID: "superset-wrapper",
|
|
6751
|
+
children: [
|
|
6752
|
+
/* @__PURE__ */ jsx(
|
|
6753
|
+
reactNative.Text,
|
|
6754
|
+
{
|
|
6755
|
+
style: {
|
|
6756
|
+
position: "absolute",
|
|
6757
|
+
top: -1,
|
|
6758
|
+
left: -3,
|
|
6759
|
+
fontSize: 9,
|
|
6760
|
+
fontFamily: "Inter, sans-serif",
|
|
6761
|
+
fontWeight: "700",
|
|
6762
|
+
backgroundColor: color,
|
|
6763
|
+
color: DEFAULTS.bgBase,
|
|
6764
|
+
paddingVertical: 2,
|
|
6765
|
+
paddingHorizontal: 6,
|
|
6766
|
+
borderBottomRightRadius: 4,
|
|
6767
|
+
letterSpacing: 0.5,
|
|
6768
|
+
zIndex: 2
|
|
6769
|
+
},
|
|
6770
|
+
testID: "superset-label",
|
|
6771
|
+
children: label
|
|
6772
|
+
}
|
|
6773
|
+
),
|
|
6774
|
+
/* @__PURE__ */ jsx(reactNative.View, { style: { gap: 2 }, testID: "superset-children", children })
|
|
6775
|
+
]
|
|
6776
|
+
}
|
|
6777
|
+
);
|
|
6778
|
+
}
|
|
5987
6779
|
|
|
5988
6780
|
// src/utils/colors.ts
|
|
5989
6781
|
function getStatusColor(status) {
|
|
@@ -6182,6 +6974,7 @@ exports.HStack = HStack;
|
|
|
6182
6974
|
exports.Heading = Heading;
|
|
6183
6975
|
exports.HelpTip = HelpTip;
|
|
6184
6976
|
exports.IconBox = IconBox;
|
|
6977
|
+
exports.Indicator = Indicator;
|
|
6185
6978
|
exports.Input = Input;
|
|
6186
6979
|
exports.InputGroup = InputGroup;
|
|
6187
6980
|
exports.Label = Label;
|
|
@@ -6210,6 +7003,7 @@ exports.ModalTitle = ModalTitle;
|
|
|
6210
7003
|
exports.Overline = Overline;
|
|
6211
7004
|
exports.Paragraph = Paragraph;
|
|
6212
7005
|
exports.PasswordInput = PasswordInput;
|
|
7006
|
+
exports.Pill = Pill;
|
|
6213
7007
|
exports.Popover = Popover;
|
|
6214
7008
|
exports.PopoverCloseButton = PopoverCloseButton;
|
|
6215
7009
|
exports.PopoverContent = PopoverContent;
|
|
@@ -6218,6 +7012,7 @@ exports.Progress = Progress;
|
|
|
6218
7012
|
exports.ProgressSteps = ProgressSteps;
|
|
6219
7013
|
exports.Radio = Radio;
|
|
6220
7014
|
exports.RadioGroup = RadioGroup;
|
|
7015
|
+
exports.RestTimer = RestTimer;
|
|
6221
7016
|
exports.Section = Section;
|
|
6222
7017
|
exports.SectionContent = SectionContent;
|
|
6223
7018
|
exports.SectionHeader = SectionHeader;
|
|
@@ -6236,11 +7031,12 @@ exports.SkeletonListItem = SkeletonListItem;
|
|
|
6236
7031
|
exports.SkeletonText = SkeletonText;
|
|
6237
7032
|
exports.Spinner = Spinner;
|
|
6238
7033
|
exports.Stack = Stack;
|
|
6239
|
-
exports.Step = Step;
|
|
6240
7034
|
exports.StepContent = StepContent;
|
|
6241
7035
|
exports.StepIndicator = StepIndicator;
|
|
6242
7036
|
exports.StepLabel = StepLabel;
|
|
6243
7037
|
exports.Stepper = Stepper;
|
|
7038
|
+
exports.StepperStep = Step;
|
|
7039
|
+
exports.SupersetWrapper = SupersetWrapper;
|
|
6244
7040
|
exports.Surface = Surface;
|
|
6245
7041
|
exports.Switch = Switch;
|
|
6246
7042
|
exports.Tab = Tab;
|
|
@@ -6263,6 +7059,8 @@ exports.Tooltip = Tooltip;
|
|
|
6263
7059
|
exports.Typography = Typography;
|
|
6264
7060
|
exports.VStack = VStack;
|
|
6265
7061
|
exports.alpha = alpha;
|
|
7062
|
+
exports.applyThemePreset = applyThemePreset;
|
|
7063
|
+
exports.audiobookPreset = audiobookPreset;
|
|
6266
7064
|
exports.buttonSizes = buttonSizes;
|
|
6267
7065
|
exports.cn = cn;
|
|
6268
7066
|
exports.componentElevationRanges = componentElevationRanges;
|
|
@@ -6275,6 +7073,7 @@ exports.createRaisedHoverShadow = createRaisedHoverShadow;
|
|
|
6275
7073
|
exports.createRaisedShadow = createRaisedShadow;
|
|
6276
7074
|
exports.darkThemeCSSVars = darkThemeCSSVars;
|
|
6277
7075
|
exports.darken = darken;
|
|
7076
|
+
exports.defaultPreset = defaultPreset;
|
|
6278
7077
|
exports.discreteRainbow = discreteRainbow;
|
|
6279
7078
|
exports.elevationSystem = elevationSystem;
|
|
6280
7079
|
exports.formatDateTime = formatDateTime;
|