@luxfi/ui 7.4.11 → 7.4.13
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/dist/alert.cjs +68 -46
- package/dist/alert.js +69 -46
- package/dist/avatar.cjs +49 -47
- package/dist/avatar.js +52 -49
- package/dist/badge.cjs +82 -49
- package/dist/badge.js +83 -50
- package/dist/checkbox.cjs +42 -75
- package/dist/checkbox.js +43 -76
- package/dist/chrome.cjs +3 -7
- package/dist/chrome.js +3 -7
- package/dist/close-button.cjs +3 -7
- package/dist/close-button.js +3 -7
- package/dist/dialog.cjs +3 -7
- package/dist/dialog.js +3 -7
- package/dist/drawer.cjs +3 -7
- package/dist/drawer.js +3 -7
- package/dist/empty-state.cjs +13 -13
- package/dist/empty-state.js +13 -13
- package/dist/expiration-selector.cjs +58 -63
- package/dist/expiration-selector.js +58 -63
- package/dist/greeks-display.cjs +48 -39
- package/dist/greeks-display.js +48 -39
- package/dist/index.cjs +1053 -888
- package/dist/index.js +1054 -889
- package/dist/input-group.cjs +36 -19
- package/dist/input-group.js +37 -19
- package/dist/option-chain.cjs +89 -67
- package/dist/option-chain.js +89 -67
- package/dist/option-position.cjs +88 -85
- package/dist/option-position.js +88 -85
- package/dist/pin-input.cjs +30 -29
- package/dist/pin-input.js +30 -29
- package/dist/pnl-diagram.cjs +20 -20
- package/dist/pnl-diagram.js +20 -20
- package/dist/popover.cjs +3 -7
- package/dist/popover.js +3 -7
- package/dist/progress-circle.cjs +40 -22
- package/dist/progress-circle.d.cts +5 -5
- package/dist/progress-circle.d.ts +5 -5
- package/dist/progress-circle.js +41 -22
- package/dist/progress.cjs +15 -22
- package/dist/progress.d.cts +6 -6
- package/dist/progress.d.ts +6 -6
- package/dist/progress.js +15 -22
- package/dist/radio.cjs +35 -68
- package/dist/radio.d.cts +18 -18
- package/dist/radio.d.ts +18 -18
- package/dist/radio.js +36 -69
- package/dist/rating.cjs +15 -17
- package/dist/rating.js +15 -17
- package/dist/slider.cjs +33 -50
- package/dist/slider.js +34 -51
- package/dist/strategy-builder.cjs +194 -115
- package/dist/strategy-builder.js +194 -115
- package/dist/switch.cjs +48 -55
- package/dist/switch.js +49 -56
- package/dist/tag.cjs +115 -69
- package/dist/tag.js +116 -69
- package/dist/tooltip.cjs +28 -17
- package/dist/tooltip.js +30 -18
- package/package.json +1 -1
- package/src/alert.tsx +78 -45
- package/src/avatar.tsx +54 -38
- package/src/badge.tsx +65 -44
- package/src/checkbox.tsx +70 -89
- package/src/close-button.tsx +3 -8
- package/src/empty-state.tsx +21 -17
- package/src/expiration-selector.tsx +84 -66
- package/src/greeks-display.tsx +59 -51
- package/src/input-group.tsx +38 -24
- package/src/option-chain.tsx +154 -104
- package/src/option-position.tsx +143 -114
- package/src/pin-input.tsx +37 -29
- package/src/pnl-diagram.tsx +36 -28
- package/src/progress-circle.tsx +52 -28
- package/src/progress.tsx +17 -21
- package/src/radio.tsx +56 -76
- package/src/rating.tsx +22 -20
- package/src/slider.tsx +43 -45
- package/src/strategy-builder.tsx +260 -162
- package/src/switch.tsx +63 -64
- package/src/tag.tsx +89 -51
- package/src/tooltip.tsx +21 -13
- package/tokens.css +18 -0
package/dist/checkbox.cjs
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
var gui = require('@hanzo/gui');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
|
-
var tailwindMerge = require('tailwind-merge');
|
|
8
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
7
|
|
|
10
8
|
function _interopNamespace(e) {
|
|
@@ -28,9 +26,6 @@ function _interopNamespace(e) {
|
|
|
28
26
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
27
|
|
|
30
28
|
// src/checkbox.tsx
|
|
31
|
-
function cn(...inputs) {
|
|
32
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
33
|
-
}
|
|
34
29
|
var NOOP = () => {
|
|
35
30
|
};
|
|
36
31
|
var CheckboxGroupContext = React__namespace.createContext(null);
|
|
@@ -46,7 +41,6 @@ var CheckboxGroupBase = React__namespace.forwardRef(
|
|
|
46
41
|
onValueChange,
|
|
47
42
|
orientation = "vertical",
|
|
48
43
|
name: _name,
|
|
49
|
-
className,
|
|
50
44
|
...rest
|
|
51
45
|
} = props;
|
|
52
46
|
const [uncontrolledValue, setUncontrolledValue] = React__namespace.useState(defaultValue ?? []);
|
|
@@ -69,15 +63,13 @@ var CheckboxGroupBase = React__namespace.forwardRef(
|
|
|
69
63
|
}, [isControlled, controlledValue]);
|
|
70
64
|
const ctx = React__namespace.useMemo(() => ({ value, toggle }), [value, toggle]);
|
|
71
65
|
return /* @__PURE__ */ jsxRuntime.jsx(CheckboxGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
-
|
|
66
|
+
gui.View,
|
|
73
67
|
{
|
|
74
68
|
ref,
|
|
75
69
|
role: "group",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
className
|
|
80
|
-
),
|
|
70
|
+
display: "flex",
|
|
71
|
+
flexDirection: orientation === "vertical" ? "column" : "row",
|
|
72
|
+
gap: orientation === "vertical" ? 12 : 32,
|
|
81
73
|
...rest,
|
|
82
74
|
children
|
|
83
75
|
}
|
|
@@ -85,46 +77,22 @@ var CheckboxGroupBase = React__namespace.forwardRef(
|
|
|
85
77
|
}
|
|
86
78
|
);
|
|
87
79
|
var CheckboxGroup2 = CheckboxGroupBase;
|
|
88
|
-
var
|
|
89
|
-
sm: {
|
|
90
|
-
|
|
91
|
-
control: "h-3.5 w-3.5 rounded-sm",
|
|
92
|
-
label: "text-xs",
|
|
93
|
-
icon: "h-3 w-3"
|
|
94
|
-
},
|
|
95
|
-
md: {
|
|
96
|
-
root: "gap-2",
|
|
97
|
-
control: "h-4 w-4 rounded",
|
|
98
|
-
label: "text-sm",
|
|
99
|
-
icon: "h-3.5 w-3.5"
|
|
100
|
-
}
|
|
80
|
+
var SIZE = {
|
|
81
|
+
sm: { rootGap: 6, control: 14, radius: 2, label: 12, icon: 12 },
|
|
82
|
+
md: { rootGap: 8, control: 16, radius: 4, label: 14, icon: 14 }
|
|
101
83
|
};
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
109
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
-
"path",
|
|
111
|
-
{
|
|
112
|
-
d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
|
|
113
|
-
fill: "currentColor"
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
var IndeterminateIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
-
"svg",
|
|
84
|
+
var INK = "var(--color-text-primary)";
|
|
85
|
+
var ON_INK = "var(--color-bg-body)";
|
|
86
|
+
var RESTING_BORDER = "var(--color-input-border)";
|
|
87
|
+
var OUTLINE = "var(--color-gray-500)";
|
|
88
|
+
var CheckIcon = ({ size, color }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
+
"path",
|
|
120
90
|
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
fill: "none",
|
|
124
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
125
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0H12V2H0V0Z", fill: "currentColor" })
|
|
91
|
+
d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
|
|
92
|
+
fill: color
|
|
126
93
|
}
|
|
127
|
-
);
|
|
94
|
+
) });
|
|
95
|
+
var IndeterminateIcon = ({ size, color }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 12 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0H12V2H0V0Z", fill: color }) });
|
|
128
96
|
var CheckboxBase = React__namespace.forwardRef(
|
|
129
97
|
function Checkbox(props, ref) {
|
|
130
98
|
const {
|
|
@@ -142,7 +110,6 @@ var CheckboxBase = React__namespace.forwardRef(
|
|
|
142
110
|
size = "md",
|
|
143
111
|
name,
|
|
144
112
|
required,
|
|
145
|
-
className,
|
|
146
113
|
...rest
|
|
147
114
|
} = props;
|
|
148
115
|
const group = useCheckboxGroupContext();
|
|
@@ -195,18 +162,19 @@ var CheckboxBase = React__namespace.forwardRef(
|
|
|
195
162
|
},
|
|
196
163
|
[readOnly, isControlled, isInGroup, group, value, onCheckedChange, onChange]
|
|
197
164
|
);
|
|
198
|
-
const
|
|
165
|
+
const s = SIZE[size];
|
|
166
|
+
const isChecked = checkedState !== false;
|
|
199
167
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
200
|
-
|
|
168
|
+
gui.Label,
|
|
201
169
|
{
|
|
202
170
|
ref: rootRef,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
171
|
+
unstyled: true,
|
|
172
|
+
flexDirection: "row",
|
|
173
|
+
alignItems: "center",
|
|
174
|
+
gap: s.rootGap,
|
|
175
|
+
cursor: disabled ? "not-allowed" : readOnly ? "default" : "pointer",
|
|
176
|
+
userSelect: "none",
|
|
177
|
+
opacity: disabled ? 0.5 : 1,
|
|
210
178
|
onChange,
|
|
211
179
|
"data-disabled": disabled || void 0,
|
|
212
180
|
"data-readonly": readOnly || void 0,
|
|
@@ -222,26 +190,25 @@ var CheckboxBase = React__namespace.forwardRef(
|
|
|
222
190
|
name,
|
|
223
191
|
value,
|
|
224
192
|
required,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(gui.Checkbox.Indicator, {
|
|
193
|
+
flexShrink: 0,
|
|
194
|
+
alignItems: "center",
|
|
195
|
+
justifyContent: "center",
|
|
196
|
+
width: s.control,
|
|
197
|
+
height: s.control,
|
|
198
|
+
borderRadius: s.radius,
|
|
199
|
+
borderWidth: 2,
|
|
200
|
+
borderColor: isChecked ? INK : RESTING_BORDER,
|
|
201
|
+
backgroundColor: isChecked ? INK : "transparent",
|
|
202
|
+
transition: "quicker",
|
|
203
|
+
focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE, outlineOffset: 2 },
|
|
204
|
+
children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(gui.Checkbox.Indicator, { alignItems: "center", justifyContent: "center", width: s.icon, height: s.icon, children: checkedState === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(IndeterminateIcon, { size: s.icon, color: ON_INK }) : /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: s.icon, color: ON_INK }) })
|
|
237
205
|
}
|
|
238
206
|
),
|
|
239
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
207
|
+
/* @__PURE__ */ jsxRuntime.jsx(gui.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
240
208
|
"input",
|
|
241
209
|
{
|
|
242
210
|
ref: setHiddenInputRef,
|
|
243
211
|
type: "checkbox",
|
|
244
|
-
className: "sr-only",
|
|
245
212
|
checked: checkedState === true,
|
|
246
213
|
disabled,
|
|
247
214
|
readOnly,
|
|
@@ -252,8 +219,8 @@ var CheckboxBase = React__namespace.forwardRef(
|
|
|
252
219
|
onChange: NOOP,
|
|
253
220
|
...inputProps
|
|
254
221
|
}
|
|
255
|
-
),
|
|
256
|
-
children != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
222
|
+
) }),
|
|
223
|
+
children != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: s.label, children })
|
|
257
224
|
]
|
|
258
225
|
}
|
|
259
226
|
);
|
package/dist/checkbox.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Checkbox } from '@hanzo/gui';
|
|
2
|
+
import { View, Label, Checkbox, VisuallyHidden, Text } from '@hanzo/gui';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { clsx } from 'clsx';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
5
|
|
|
8
6
|
// src/checkbox.tsx
|
|
9
|
-
function cn(...inputs) {
|
|
10
|
-
return twMerge(clsx(inputs));
|
|
11
|
-
}
|
|
12
7
|
var NOOP = () => {
|
|
13
8
|
};
|
|
14
9
|
var CheckboxGroupContext = React.createContext(null);
|
|
@@ -24,7 +19,6 @@ var CheckboxGroupBase = React.forwardRef(
|
|
|
24
19
|
onValueChange,
|
|
25
20
|
orientation = "vertical",
|
|
26
21
|
name: _name,
|
|
27
|
-
className,
|
|
28
22
|
...rest
|
|
29
23
|
} = props;
|
|
30
24
|
const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue ?? []);
|
|
@@ -47,15 +41,13 @@ var CheckboxGroupBase = React.forwardRef(
|
|
|
47
41
|
}, [isControlled, controlledValue]);
|
|
48
42
|
const ctx = React.useMemo(() => ({ value, toggle }), [value, toggle]);
|
|
49
43
|
return /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
50
|
-
|
|
44
|
+
View,
|
|
51
45
|
{
|
|
52
46
|
ref,
|
|
53
47
|
role: "group",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
className
|
|
58
|
-
),
|
|
48
|
+
display: "flex",
|
|
49
|
+
flexDirection: orientation === "vertical" ? "column" : "row",
|
|
50
|
+
gap: orientation === "vertical" ? 12 : 32,
|
|
59
51
|
...rest,
|
|
60
52
|
children
|
|
61
53
|
}
|
|
@@ -63,46 +55,22 @@ var CheckboxGroupBase = React.forwardRef(
|
|
|
63
55
|
}
|
|
64
56
|
);
|
|
65
57
|
var CheckboxGroup2 = CheckboxGroupBase;
|
|
66
|
-
var
|
|
67
|
-
sm: {
|
|
68
|
-
|
|
69
|
-
control: "h-3.5 w-3.5 rounded-sm",
|
|
70
|
-
label: "text-xs",
|
|
71
|
-
icon: "h-3 w-3"
|
|
72
|
-
},
|
|
73
|
-
md: {
|
|
74
|
-
root: "gap-2",
|
|
75
|
-
control: "h-4 w-4 rounded",
|
|
76
|
-
label: "text-sm",
|
|
77
|
-
icon: "h-3.5 w-3.5"
|
|
78
|
-
}
|
|
58
|
+
var SIZE = {
|
|
59
|
+
sm: { rootGap: 6, control: 14, radius: 2, label: 12, icon: 12 },
|
|
60
|
+
md: { rootGap: 8, control: 16, radius: 4, label: 14, icon: 14 }
|
|
79
61
|
};
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
87
|
-
children: /* @__PURE__ */ jsx(
|
|
88
|
-
"path",
|
|
89
|
-
{
|
|
90
|
-
d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
|
|
91
|
-
fill: "currentColor"
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
var IndeterminateIcon = ({ className }) => /* @__PURE__ */ jsx(
|
|
97
|
-
"svg",
|
|
62
|
+
var INK = "var(--color-text-primary)";
|
|
63
|
+
var ON_INK = "var(--color-bg-body)";
|
|
64
|
+
var RESTING_BORDER = "var(--color-input-border)";
|
|
65
|
+
var OUTLINE = "var(--color-gray-500)";
|
|
66
|
+
var CheckIcon = ({ size, color }) => /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx(
|
|
67
|
+
"path",
|
|
98
68
|
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
fill: "none",
|
|
102
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
-
children: /* @__PURE__ */ jsx("path", { d: "M0 0H12V2H0V0Z", fill: "currentColor" })
|
|
69
|
+
d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
|
|
70
|
+
fill: color
|
|
104
71
|
}
|
|
105
|
-
);
|
|
72
|
+
) });
|
|
73
|
+
var IndeterminateIcon = ({ size, color }) => /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 12 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M0 0H12V2H0V0Z", fill: color }) });
|
|
106
74
|
var CheckboxBase = React.forwardRef(
|
|
107
75
|
function Checkbox$1(props, ref) {
|
|
108
76
|
const {
|
|
@@ -120,7 +88,6 @@ var CheckboxBase = React.forwardRef(
|
|
|
120
88
|
size = "md",
|
|
121
89
|
name,
|
|
122
90
|
required,
|
|
123
|
-
className,
|
|
124
91
|
...rest
|
|
125
92
|
} = props;
|
|
126
93
|
const group = useCheckboxGroupContext();
|
|
@@ -173,18 +140,19 @@ var CheckboxBase = React.forwardRef(
|
|
|
173
140
|
},
|
|
174
141
|
[readOnly, isControlled, isInGroup, group, value, onCheckedChange, onChange]
|
|
175
142
|
);
|
|
176
|
-
const
|
|
143
|
+
const s = SIZE[size];
|
|
144
|
+
const isChecked = checkedState !== false;
|
|
177
145
|
return /* @__PURE__ */ jsxs(
|
|
178
|
-
|
|
146
|
+
Label,
|
|
179
147
|
{
|
|
180
148
|
ref: rootRef,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
149
|
+
unstyled: true,
|
|
150
|
+
flexDirection: "row",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
gap: s.rootGap,
|
|
153
|
+
cursor: disabled ? "not-allowed" : readOnly ? "default" : "pointer",
|
|
154
|
+
userSelect: "none",
|
|
155
|
+
opacity: disabled ? 0.5 : 1,
|
|
188
156
|
onChange,
|
|
189
157
|
"data-disabled": disabled || void 0,
|
|
190
158
|
"data-readonly": readOnly || void 0,
|
|
@@ -200,26 +168,25 @@ var CheckboxBase = React.forwardRef(
|
|
|
200
168
|
name,
|
|
201
169
|
value,
|
|
202
170
|
required,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
children: icon ?? /* @__PURE__ */ jsx(Checkbox.Indicator, {
|
|
171
|
+
flexShrink: 0,
|
|
172
|
+
alignItems: "center",
|
|
173
|
+
justifyContent: "center",
|
|
174
|
+
width: s.control,
|
|
175
|
+
height: s.control,
|
|
176
|
+
borderRadius: s.radius,
|
|
177
|
+
borderWidth: 2,
|
|
178
|
+
borderColor: isChecked ? INK : RESTING_BORDER,
|
|
179
|
+
backgroundColor: isChecked ? INK : "transparent",
|
|
180
|
+
transition: "quicker",
|
|
181
|
+
focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE, outlineOffset: 2 },
|
|
182
|
+
children: icon ?? /* @__PURE__ */ jsx(Checkbox.Indicator, { alignItems: "center", justifyContent: "center", width: s.icon, height: s.icon, children: checkedState === "indeterminate" ? /* @__PURE__ */ jsx(IndeterminateIcon, { size: s.icon, color: ON_INK }) : /* @__PURE__ */ jsx(CheckIcon, { size: s.icon, color: ON_INK }) })
|
|
215
183
|
}
|
|
216
184
|
),
|
|
217
|
-
/* @__PURE__ */ jsx(
|
|
185
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(
|
|
218
186
|
"input",
|
|
219
187
|
{
|
|
220
188
|
ref: setHiddenInputRef,
|
|
221
189
|
type: "checkbox",
|
|
222
|
-
className: "sr-only",
|
|
223
190
|
checked: checkedState === true,
|
|
224
191
|
disabled,
|
|
225
192
|
readOnly,
|
|
@@ -230,8 +197,8 @@ var CheckboxBase = React.forwardRef(
|
|
|
230
197
|
onChange: NOOP,
|
|
231
198
|
...inputProps
|
|
232
199
|
}
|
|
233
|
-
),
|
|
234
|
-
children != null && /* @__PURE__ */ jsx(
|
|
200
|
+
) }),
|
|
201
|
+
children != null && /* @__PURE__ */ jsx(Text, { fontSize: s.label, children })
|
|
235
202
|
]
|
|
236
203
|
}
|
|
237
204
|
);
|
package/dist/chrome.cjs
CHANGED
|
@@ -59,23 +59,19 @@ var CloseButtonFrame = gui.styled(gui.View, {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
63
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
64
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
65
|
-
"disabled:opacity-40"
|
|
66
|
-
].join(" ");
|
|
67
62
|
var CloseButton = React3__namespace.forwardRef(function CloseButton2(props, ref) {
|
|
68
63
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
69
64
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
70
65
|
CloseButtonFrame,
|
|
71
66
|
{
|
|
72
67
|
ref,
|
|
73
|
-
className
|
|
68
|
+
className,
|
|
74
69
|
...rest,
|
|
75
70
|
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
76
71
|
"svg",
|
|
77
72
|
{
|
|
78
|
-
|
|
73
|
+
width: 20,
|
|
74
|
+
height: 20,
|
|
79
75
|
viewBox: "0 0 20 20",
|
|
80
76
|
fill: "none",
|
|
81
77
|
"aria-hidden": "true",
|
package/dist/chrome.js
CHANGED
|
@@ -38,23 +38,19 @@ var CloseButtonFrame = styled(View, {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
42
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
43
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
44
|
-
"disabled:opacity-40"
|
|
45
|
-
].join(" ");
|
|
46
41
|
var CloseButton = React3.forwardRef(function CloseButton2(props, ref) {
|
|
47
42
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
48
43
|
return /* @__PURE__ */ jsx(
|
|
49
44
|
CloseButtonFrame,
|
|
50
45
|
{
|
|
51
46
|
ref,
|
|
52
|
-
className
|
|
47
|
+
className,
|
|
53
48
|
...rest,
|
|
54
49
|
children: children ?? /* @__PURE__ */ jsx(
|
|
55
50
|
"svg",
|
|
56
51
|
{
|
|
57
|
-
|
|
52
|
+
width: 20,
|
|
53
|
+
height: 20,
|
|
58
54
|
viewBox: "0 0 20 20",
|
|
59
55
|
fill: "none",
|
|
60
56
|
"aria-hidden": "true",
|
package/dist/close-button.cjs
CHANGED
|
@@ -56,23 +56,19 @@ var CloseButtonFrame = gui.styled(gui.View, {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
60
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
61
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
62
|
-
"disabled:opacity-40"
|
|
63
|
-
].join(" ");
|
|
64
59
|
var CloseButton = React__namespace.forwardRef(function CloseButton2(props, ref) {
|
|
65
60
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
66
61
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
62
|
CloseButtonFrame,
|
|
68
63
|
{
|
|
69
64
|
ref,
|
|
70
|
-
className
|
|
65
|
+
className,
|
|
71
66
|
...rest,
|
|
72
67
|
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
68
|
"svg",
|
|
74
69
|
{
|
|
75
|
-
|
|
70
|
+
width: 20,
|
|
71
|
+
height: 20,
|
|
76
72
|
viewBox: "0 0 20 20",
|
|
77
73
|
fill: "none",
|
|
78
74
|
"aria-hidden": "true",
|
package/dist/close-button.js
CHANGED
|
@@ -34,23 +34,19 @@ var CloseButtonFrame = styled(View, {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
38
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
39
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
40
|
-
"disabled:opacity-40"
|
|
41
|
-
].join(" ");
|
|
42
37
|
var CloseButton = React.forwardRef(function CloseButton2(props, ref) {
|
|
43
38
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
44
39
|
return /* @__PURE__ */ jsx(
|
|
45
40
|
CloseButtonFrame,
|
|
46
41
|
{
|
|
47
42
|
ref,
|
|
48
|
-
className
|
|
43
|
+
className,
|
|
49
44
|
...rest,
|
|
50
45
|
children: children ?? /* @__PURE__ */ jsx(
|
|
51
46
|
"svg",
|
|
52
47
|
{
|
|
53
|
-
|
|
48
|
+
width: 20,
|
|
49
|
+
height: 20,
|
|
54
50
|
viewBox: "0 0 20 20",
|
|
55
51
|
fill: "none",
|
|
56
52
|
"aria-hidden": "true",
|
package/dist/dialog.cjs
CHANGED
|
@@ -61,23 +61,19 @@ var CloseButtonFrame = gui.styled(gui.View, {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
65
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
66
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
67
|
-
"disabled:opacity-40"
|
|
68
|
-
].join(" ");
|
|
69
64
|
var CloseButton = React2__namespace.forwardRef(function CloseButton2(props, ref) {
|
|
70
65
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
71
66
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
72
67
|
CloseButtonFrame,
|
|
73
68
|
{
|
|
74
69
|
ref,
|
|
75
|
-
className
|
|
70
|
+
className,
|
|
76
71
|
...rest,
|
|
77
72
|
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
73
|
"svg",
|
|
79
74
|
{
|
|
80
|
-
|
|
75
|
+
width: 20,
|
|
76
|
+
height: 20,
|
|
81
77
|
viewBox: "0 0 20 20",
|
|
82
78
|
fill: "none",
|
|
83
79
|
"aria-hidden": "true",
|
package/dist/dialog.js
CHANGED
|
@@ -39,23 +39,19 @@ var CloseButtonFrame = styled(View, {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
43
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
44
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
45
|
-
"disabled:opacity-40"
|
|
46
|
-
].join(" ");
|
|
47
42
|
var CloseButton = React2.forwardRef(function CloseButton2(props, ref) {
|
|
48
43
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
49
44
|
return /* @__PURE__ */ jsx(
|
|
50
45
|
CloseButtonFrame,
|
|
51
46
|
{
|
|
52
47
|
ref,
|
|
53
|
-
className
|
|
48
|
+
className,
|
|
54
49
|
...rest,
|
|
55
50
|
children: children ?? /* @__PURE__ */ jsx(
|
|
56
51
|
"svg",
|
|
57
52
|
{
|
|
58
|
-
|
|
53
|
+
width: 20,
|
|
54
|
+
height: 20,
|
|
59
55
|
viewBox: "0 0 20 20",
|
|
60
56
|
fill: "none",
|
|
61
57
|
"aria-hidden": "true",
|
package/dist/drawer.cjs
CHANGED
|
@@ -56,23 +56,19 @@ var CloseButtonFrame = gui.styled(gui.View, {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
60
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
61
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
62
|
-
"disabled:opacity-40"
|
|
63
|
-
].join(" ");
|
|
64
59
|
var CloseButton = React3__namespace.forwardRef(function CloseButton2(props, ref) {
|
|
65
60
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
66
61
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
62
|
CloseButtonFrame,
|
|
68
63
|
{
|
|
69
64
|
ref,
|
|
70
|
-
className
|
|
65
|
+
className,
|
|
71
66
|
...rest,
|
|
72
67
|
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
68
|
"svg",
|
|
74
69
|
{
|
|
75
|
-
|
|
70
|
+
width: 20,
|
|
71
|
+
height: 20,
|
|
76
72
|
viewBox: "0 0 20 20",
|
|
77
73
|
fill: "none",
|
|
78
74
|
"aria-hidden": "true",
|
package/dist/drawer.js
CHANGED
|
@@ -35,23 +35,19 @@ var CloseButtonFrame = styled(View, {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
var CLOSE_BUTTON_CLASSES = [
|
|
39
|
-
"text-[var(--closeButton-fg,currentColor)]",
|
|
40
|
-
"hover:text-[var(--hover-color,currentColor)]",
|
|
41
|
-
"disabled:opacity-40"
|
|
42
|
-
].join(" ");
|
|
43
38
|
var CloseButton = React3.forwardRef(function CloseButton2(props, ref) {
|
|
44
39
|
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
45
40
|
return /* @__PURE__ */ jsx(
|
|
46
41
|
CloseButtonFrame,
|
|
47
42
|
{
|
|
48
43
|
ref,
|
|
49
|
-
className
|
|
44
|
+
className,
|
|
50
45
|
...rest,
|
|
51
46
|
children: children ?? /* @__PURE__ */ jsx(
|
|
52
47
|
"svg",
|
|
53
48
|
{
|
|
54
|
-
|
|
49
|
+
width: 20,
|
|
50
|
+
height: 20,
|
|
55
51
|
viewBox: "0 0 20 20",
|
|
56
52
|
fill: "none",
|
|
57
53
|
"aria-hidden": "true",
|
package/dist/empty-state.cjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var gui = require('@hanzo/gui');
|
|
4
5
|
var React = require('react');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var tailwindMerge = require('tailwind-merge');
|
|
7
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
7
|
|
|
9
8
|
function _interopNamespace(e) {
|
|
@@ -27,14 +26,12 @@ function _interopNamespace(e) {
|
|
|
27
26
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
27
|
|
|
29
28
|
// src/empty-state.tsx
|
|
30
|
-
function cn(...inputs) {
|
|
31
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
32
|
-
}
|
|
33
29
|
var apos = "\u2019";
|
|
34
30
|
function upperFirst(str) {
|
|
35
31
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
36
32
|
}
|
|
37
33
|
var ICONS = {};
|
|
34
|
+
var MUTED = "var(--color-text-secondary)";
|
|
38
35
|
var EmptyState = React__namespace.forwardRef(
|
|
39
36
|
function EmptyState2(props, ref) {
|
|
40
37
|
const { title, description, term, type = "query", icon, children, className, ...rest } = props;
|
|
@@ -72,17 +69,20 @@ var EmptyState = React__namespace.forwardRef(
|
|
|
72
69
|
return icon;
|
|
73
70
|
})();
|
|
74
71
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
75
|
-
|
|
72
|
+
gui.XStack,
|
|
76
73
|
{
|
|
77
74
|
ref,
|
|
78
|
-
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
justifyContent: "center",
|
|
77
|
+
paddingVertical: 40,
|
|
78
|
+
className,
|
|
79
79
|
...rest,
|
|
80
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81
|
-
iconContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
-
descriptionContent ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
83
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
85
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { alignItems: "center", gap: 20, children: [
|
|
81
|
+
iconContent && /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { alignItems: "center", justifyContent: "center", children: iconContent }),
|
|
82
|
+
descriptionContent ? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { alignItems: "center", gap: 8, children: [
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, textAlign: "center", color: MUTED, children: descriptionContent })
|
|
85
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
|
|
86
86
|
children
|
|
87
87
|
] })
|
|
88
88
|
}
|