@luxfi/ui 7.4.14 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/dist/accordion.d.ts +10 -12
- package/dist/accordion.d.ts.map +1 -0
- package/dist/alert.cjs +7 -11
- package/dist/alert.d.ts +4 -5
- package/dist/alert.d.ts.map +1 -0
- package/dist/alert.js +1 -5
- package/dist/auth.d.ts +11 -13
- package/dist/auth.d.ts.map +1 -0
- package/dist/avatar.d.ts +5 -6
- package/dist/avatar.d.ts.map +1 -0
- package/dist/badge.cjs +7 -11
- package/dist/badge.d.ts +7 -8
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +1 -5
- package/dist/bank.d.ts +38 -43
- package/dist/bank.d.ts.map +1 -0
- package/dist/button.cjs +7 -23
- package/dist/button.d.ts +8 -13
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +2 -17
- package/dist/checkbox.d.ts +6 -7
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/chrome.cjs +4 -8
- package/dist/chrome.d.ts +15 -19
- package/dist/chrome.d.ts.map +1 -0
- package/dist/chrome.js +1 -5
- package/dist/close-button.d.ts +3 -5
- package/dist/close-button.d.ts.map +1 -0
- package/dist/collapsible.cjs +19 -23
- package/dist/collapsible.d.ts +11 -13
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +1 -5
- package/dist/color-mode.d.ts +7 -9
- package/dist/color-mode.d.ts.map +1 -0
- package/dist/dialog.cjs +7 -11
- package/dist/dialog.d.ts +50 -54
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +1 -5
- package/dist/drawer.d.ts +33 -38
- package/dist/drawer.d.ts.map +1 -0
- package/dist/empty-state.d.ts +4 -6
- package/dist/empty-state.d.ts.map +1 -0
- package/dist/engine.d.ts +35 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/expiration-selector.d.ts +4 -6
- package/dist/expiration-selector.d.ts.map +1 -0
- package/dist/field.d.ts +5 -7
- package/dist/field.d.ts.map +1 -0
- package/dist/greeks-display.d.ts +3 -5
- package/dist/greeks-display.d.ts.map +1 -0
- package/dist/gui.d.ts +1 -1
- package/dist/gui.d.ts.map +1 -0
- package/dist/heading.cjs +12 -3
- package/dist/heading.d.ts +4 -6
- package/dist/heading.d.ts.map +1 -0
- package/dist/heading.js +12 -3
- package/dist/iam.d.ts +10 -12
- package/dist/iam.d.ts.map +1 -0
- package/dist/icon-button.cjs +7 -11
- package/dist/icon-button.d.ts +4 -5
- package/dist/icon-button.d.ts.map +1 -0
- package/dist/icon-button.js +1 -5
- package/dist/icons.d.ts +1 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/identity.d.ts +9 -11
- package/dist/identity.d.ts.map +1 -0
- package/dist/image.cjs +8 -12
- package/dist/image.d.ts +10 -11
- package/dist/image.d.ts.map +1 -0
- package/dist/image.js +1 -5
- package/dist/index.cjs +89 -91
- package/dist/index.d.ts +86 -60
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -33
- package/dist/ink.d.ts +14 -0
- package/dist/ink.d.ts.map +1 -0
- package/dist/input-group.d.ts +4 -6
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input.cjs +5 -5
- package/dist/input.d.ts +8 -9
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +5 -5
- package/dist/link.cjs +19 -23
- package/dist/link.d.ts +9 -11
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +1 -5
- package/dist/lux.config.cjs +2 -0
- package/dist/lux.config.d.ts +785 -240
- package/dist/lux.config.d.ts.map +1 -0
- package/dist/lux.config.js +2 -0
- package/dist/menu.d.ts +30 -31
- package/dist/menu.d.ts.map +1 -0
- package/dist/next.d.ts +5 -7
- package/dist/next.d.ts.map +1 -0
- package/dist/option-chain.d.ts +6 -8
- package/dist/option-chain.d.ts.map +1 -0
- package/dist/option-position.d.ts +4 -6
- package/dist/option-position.d.ts.map +1 -0
- package/dist/pin-input.cjs +1 -1
- package/dist/pin-input.d.ts +3 -5
- package/dist/pin-input.d.ts.map +1 -0
- package/dist/pin-input.js +1 -1
- package/dist/pnl-diagram.d.ts +5 -6
- package/dist/pnl-diagram.d.ts.map +1 -0
- package/dist/popover.cjs +9 -13
- package/dist/popover.d.ts +24 -25
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +1 -5
- package/dist/progress-circle.cjs +2 -6
- package/dist/progress-circle.d.ts +8 -9
- package/dist/progress-circle.d.ts.map +1 -0
- package/dist/progress-circle.js +1 -5
- package/dist/progress.d.ts +3 -4
- package/dist/progress.d.ts.map +1 -0
- package/dist/provider.cjs +2 -0
- package/dist/provider.d.ts +8 -10
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +2 -0
- package/dist/radio.d.ts +6 -7
- package/dist/radio.d.ts.map +1 -0
- package/dist/rating.d.ts +3 -5
- package/dist/rating.d.ts.map +1 -0
- package/dist/select.cjs +16 -20
- package/dist/select.d.ts +38 -41
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +1 -5
- package/dist/separator.d.ts +5 -6
- package/dist/separator.d.ts.map +1 -0
- package/dist/skeleton.cjs +7 -11
- package/dist/skeleton.d.ts +9 -12
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/skeleton.js +1 -5
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +3 -5
- package/dist/slider.d.ts.map +1 -0
- package/dist/slider.js +1 -1
- package/dist/strategy-builder.d.ts +6 -8
- package/dist/strategy-builder.d.ts.map +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +3 -5
- package/dist/switch.d.ts.map +1 -0
- package/dist/switch.js +1 -1
- package/dist/table.cjs +30 -34
- package/dist/table.d.ts +23 -25
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +1 -5
- package/dist/tabs.d.ts +12 -13
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tag.cjs +7 -11
- package/dist/tag.d.ts +4 -5
- package/dist/tag.d.ts.map +1 -0
- package/dist/tag.js +1 -5
- package/dist/textarea.cjs +10 -10
- package/dist/textarea.d.ts +5 -6
- package/dist/textarea.d.ts.map +1 -0
- package/dist/textarea.js +10 -10
- package/dist/toaster.d.ts +4 -5
- package/dist/toaster.d.ts.map +1 -0
- package/dist/tooltip.d.ts +3 -5
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/use-narrow.d.ts +6 -7
- package/dist/use-narrow.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils.cjs +6 -7
- package/dist/utils.d.ts +13 -5
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +1 -9
- package/dist/vite.d.ts +3 -3
- package/dist/vite.d.ts.map +1 -0
- package/dist/white-label.d.ts +12 -12
- package/dist/white-label.d.ts.map +1 -0
- package/package.json +32 -26
- package/src/button.tsx +0 -18
- package/src/heading.tsx +12 -3
- package/src/index.ts +0 -1
- package/src/input.tsx +6 -6
- package/src/lux.config.ts +19 -0
- package/src/pin-input.tsx +1 -1
- package/src/slider.tsx +1 -1
- package/src/switch.tsx +1 -1
- package/src/textarea.tsx +6 -6
- package/src/utils/cn.ts +3 -7
- package/src/utils.ts +12 -6
- package/tokens.css +11 -0
- package/dist/accordion.d.cts +0 -41
- package/dist/alert.d.cts +0 -30
- package/dist/auth.d.cts +0 -80
- package/dist/avatar.d.cts +0 -25
- package/dist/badge.d.cts +0 -19
- package/dist/bank.d.cts +0 -83
- package/dist/button.d.cts +0 -55
- package/dist/checkbox.d.cts +0 -32
- package/dist/chrome.d.cts +0 -93
- package/dist/close-button.d.cts +0 -9
- package/dist/collapsible.d.cts +0 -24
- package/dist/color-mode.d.cts +0 -25
- package/dist/dialog.d.cts +0 -118
- package/dist/drawer.d.cts +0 -69
- package/dist/empty-state.d.cts +0 -13
- package/dist/expiration-selector.d.cts +0 -16
- package/dist/field.d.cts +0 -23
- package/dist/greeks-display.d.cts +0 -14
- package/dist/gui.d.cts +0 -2
- package/dist/heading.d.cts +0 -8
- package/dist/iam.d.cts +0 -65
- package/dist/icon-button.d.cts +0 -37
- package/dist/icons.d.cts +0 -1
- package/dist/identity.d.cts +0 -64
- package/dist/image.d.cts +0 -57
- package/dist/index.d.cts +0 -60
- package/dist/input-group.d.cts +0 -17
- package/dist/input.d.cts +0 -37
- package/dist/link.d.cts +0 -37
- package/dist/lux.config.d.cts +0 -433
- package/dist/menu.d.cts +0 -68
- package/dist/next.d.cts +0 -32
- package/dist/option-chain.d.cts +0 -37
- package/dist/option-position.d.cts +0 -29
- package/dist/pin-input.d.cts +0 -25
- package/dist/pnl-diagram.d.cts +0 -11
- package/dist/popover.d.cts +0 -73
- package/dist/progress-circle.d.cts +0 -47
- package/dist/progress.d.cts +0 -28
- package/dist/provider.d.cts +0 -25
- package/dist/radio.d.cts +0 -53
- package/dist/rating.d.cts +0 -14
- package/dist/select.d.cts +0 -161
- package/dist/separator.d.cts +0 -13
- package/dist/skeleton.d.cts +0 -76
- package/dist/slider.d.cts +0 -24
- package/dist/strategy-builder.d.cts +0 -26
- package/dist/switch.d.cts +0 -27
- package/dist/table.d.cts +0 -107
- package/dist/tabs.d.cts +0 -34
- package/dist/tag.d.cts +0 -21
- package/dist/textarea.d.cts +0 -13
- package/dist/toaster.d.cts +0 -28
- package/dist/tooltip.d.cts +0 -38
- package/dist/use-narrow.d.cts +0 -12
- package/dist/utils.d.cts +0 -5
- package/dist/vite.d.cts +0 -29
- package/dist/white-label.d.cts +0 -59
package/dist/textarea.cjs
CHANGED
|
@@ -11,11 +11,11 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
11
11
|
|
|
12
12
|
// src/textarea.tsx
|
|
13
13
|
var SIZE = {
|
|
14
|
-
xs: { height: 24, paddingHorizontal: 8, fontSize:
|
|
15
|
-
sm: { height: 32, paddingHorizontal: 12, fontSize:
|
|
16
|
-
md: { height: 40, paddingHorizontal: 16, fontSize:
|
|
17
|
-
lg: { height: 48, paddingHorizontal: 16, fontSize:
|
|
18
|
-
"2xl": { height: 56, paddingHorizontal: 16, fontSize:
|
|
14
|
+
xs: { height: 24, paddingHorizontal: 8, fontSize: "$1", borderRadius: 4 },
|
|
15
|
+
sm: { height: 32, paddingHorizontal: 12, fontSize: "$3", borderRadius: 6 },
|
|
16
|
+
md: { height: 40, paddingHorizontal: 16, fontSize: "$5", borderRadius: 6 },
|
|
17
|
+
lg: { height: 48, paddingHorizontal: 16, fontSize: "$6", borderRadius: 8 },
|
|
18
|
+
"2xl": { height: 56, paddingHorizontal: 16, fontSize: "$7", borderRadius: 8 }
|
|
19
19
|
};
|
|
20
20
|
var VARIANT = {
|
|
21
21
|
outline: { borderWidth: 1, borderStyle: "solid" },
|
|
@@ -58,11 +58,11 @@ var Input = React__default.default.forwardRef(
|
|
|
58
58
|
);
|
|
59
59
|
Input.displayName = "Input";
|
|
60
60
|
var SIZE2 = {
|
|
61
|
-
xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize:
|
|
62
|
-
sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize:
|
|
63
|
-
md: { paddingHorizontal: 16, paddingVertical: 8, fontSize:
|
|
64
|
-
lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize:
|
|
65
|
-
"2xl": { paddingHorizontal: 16, paddingVertical: 12, fontSize:
|
|
61
|
+
xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: "$1", borderRadius: 4 },
|
|
62
|
+
sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: "$3", borderRadius: 6 },
|
|
63
|
+
md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: "$5", borderRadius: 6 },
|
|
64
|
+
lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize: "$6", borderRadius: 8 },
|
|
65
|
+
"2xl": { paddingHorizontal: 16, paddingVertical: 12, fontSize: "$7", borderRadius: 8 }
|
|
66
66
|
};
|
|
67
67
|
var Textarea = React__default.default.forwardRef(
|
|
68
68
|
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
package/dist/textarea.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
3
2
|
type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | '2xl';
|
|
4
3
|
type TextareaVariant = 'outline' | 'filled' | 'unstyled';
|
|
5
|
-
interface TextareaProps extends Omit<
|
|
4
|
+
export interface TextareaProps extends Omit<React.ComponentPropsWithRef<'textarea'>, 'size'> {
|
|
6
5
|
readonly size?: TextareaSize;
|
|
7
6
|
readonly variant?: TextareaVariant;
|
|
8
7
|
/** Tamagui / React-Native convention — bridged to native `onChange` (see Input). */
|
|
9
8
|
readonly onChangeText?: (text: string) => void;
|
|
10
9
|
}
|
|
11
|
-
declare const Textarea:
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../src/textarea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AACtD,KAAK,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC1F,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IAEnC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAWD,eAAO,MAAM,QAAQ,wGAuBpB,CAAC"}
|
package/dist/textarea.js
CHANGED
|
@@ -5,11 +5,11 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
5
5
|
|
|
6
6
|
// src/textarea.tsx
|
|
7
7
|
var SIZE = {
|
|
8
|
-
xs: { height: 24, paddingHorizontal: 8, fontSize:
|
|
9
|
-
sm: { height: 32, paddingHorizontal: 12, fontSize:
|
|
10
|
-
md: { height: 40, paddingHorizontal: 16, fontSize:
|
|
11
|
-
lg: { height: 48, paddingHorizontal: 16, fontSize:
|
|
12
|
-
"2xl": { height: 56, paddingHorizontal: 16, fontSize:
|
|
8
|
+
xs: { height: 24, paddingHorizontal: 8, fontSize: "$1", borderRadius: 4 },
|
|
9
|
+
sm: { height: 32, paddingHorizontal: 12, fontSize: "$3", borderRadius: 6 },
|
|
10
|
+
md: { height: 40, paddingHorizontal: 16, fontSize: "$5", borderRadius: 6 },
|
|
11
|
+
lg: { height: 48, paddingHorizontal: 16, fontSize: "$6", borderRadius: 8 },
|
|
12
|
+
"2xl": { height: 56, paddingHorizontal: 16, fontSize: "$7", borderRadius: 8 }
|
|
13
13
|
};
|
|
14
14
|
var VARIANT = {
|
|
15
15
|
outline: { borderWidth: 1, borderStyle: "solid" },
|
|
@@ -52,11 +52,11 @@ var Input = React.forwardRef(
|
|
|
52
52
|
);
|
|
53
53
|
Input.displayName = "Input";
|
|
54
54
|
var SIZE2 = {
|
|
55
|
-
xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize:
|
|
56
|
-
sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize:
|
|
57
|
-
md: { paddingHorizontal: 16, paddingVertical: 8, fontSize:
|
|
58
|
-
lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize:
|
|
59
|
-
"2xl": { paddingHorizontal: 16, paddingVertical: 12, fontSize:
|
|
55
|
+
xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: "$1", borderRadius: 4 },
|
|
56
|
+
sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: "$3", borderRadius: 6 },
|
|
57
|
+
md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: "$5", borderRadius: 6 },
|
|
58
|
+
lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize: "$6", borderRadius: 8 },
|
|
59
|
+
"2xl": { paddingHorizontal: 16, paddingVertical: 12, fontSize: "$7", borderRadius: 8 }
|
|
60
60
|
};
|
|
61
61
|
var Textarea = React.forwardRef(
|
|
62
62
|
({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
|
package/dist/toaster.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
2
|
type ToastType = 'info' | 'warning' | 'success' | 'error' | 'loading';
|
|
4
3
|
interface ToastOptions {
|
|
5
4
|
readonly id?: string | number;
|
|
@@ -15,7 +14,7 @@ interface ToastOptions {
|
|
|
15
14
|
readonly status: string;
|
|
16
15
|
}) => void;
|
|
17
16
|
}
|
|
18
|
-
declare const toaster: {
|
|
17
|
+
export declare const toaster: {
|
|
19
18
|
readonly create: (opts: ToastOptions) => string | number;
|
|
20
19
|
readonly success: (opts: ToastOptions) => string | number;
|
|
21
20
|
readonly error: (opts: ToastOptions) => string | number;
|
|
@@ -23,6 +22,6 @@ declare const toaster: {
|
|
|
23
22
|
readonly update: (id: string | number, opts: ToastOptions) => void;
|
|
24
23
|
readonly remove: (id: string | number) => void;
|
|
25
24
|
};
|
|
26
|
-
declare const Toaster: React.FC;
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
export declare const Toaster: React.FC;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=toaster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../src/toaster.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtE,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAC3E,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC1E;AA0CD,eAAO,MAAM,OAAO;4BAbE,YAAY,KAAG,MAAM,GAAG,MAAM;6BAelC,YAAY;2BACd,YAAY;6BACV,YAAY;0BATV,MAAM,GAAG,MAAM,QAAQ,YAAY,KAAG,IAAI;0BAf1C,MAAM,GAAG,MAAM,KAAG,IAAI;CA2BhC,CAAC;AA2DX,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAW3B,CAAC"}
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
interface TooltipProps {
|
|
2
|
+
export interface TooltipProps {
|
|
4
3
|
selected?: boolean;
|
|
5
4
|
showArrow?: boolean;
|
|
6
5
|
portalled?: boolean;
|
|
@@ -33,6 +32,5 @@ interface TooltipProps {
|
|
|
33
32
|
closeOnClick?: boolean;
|
|
34
33
|
closeOnPointerDown?: boolean;
|
|
35
34
|
}
|
|
36
|
-
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
|
|
38
|
-
export { Tooltip, type TooltipProps };
|
|
35
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IACpD,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,cAAc,GAAG,YAAY,GAAG,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAC;QACpK,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,MAAM,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACpD,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,OAAO,qFAuJnB,CAAC"}
|
package/dist/use-narrow.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/** Below this the UI is a phone: menus become sheets, drawers drag. */
|
|
2
|
-
declare const NARROW_PX = 640;
|
|
2
|
+
export declare const NARROW_PX = 640;
|
|
3
3
|
/** Below this the pointer is a finger: hover-only affordances are suppressed. */
|
|
4
|
-
declare const TOUCH_PX = 1024;
|
|
4
|
+
export declare const TOUCH_PX = 1024;
|
|
5
5
|
/** True while the viewport is narrower than `px`. */
|
|
6
|
-
declare function useBelow(px: number): boolean;
|
|
6
|
+
export declare function useBelow(px: number): boolean;
|
|
7
7
|
/** Phone-sized: present menus as sheets. */
|
|
8
|
-
declare const useIsNarrow: () => boolean;
|
|
8
|
+
export declare const useIsNarrow: () => boolean;
|
|
9
9
|
/** Touch-sized: no hover, so hover-only affordances must not be the only path. */
|
|
10
|
-
declare const useIsTouch: () => boolean;
|
|
11
|
-
|
|
12
|
-
export { NARROW_PX, TOUCH_PX, useBelow, useIsNarrow, useIsTouch };
|
|
10
|
+
export declare const useIsTouch: () => boolean;
|
|
11
|
+
//# sourceMappingURL=use-narrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-narrow.d.ts","sourceRoot":"","sources":["../src/use-narrow.ts"],"names":[],"mappings":"AAgBA,uEAAuE;AACvE,eAAO,MAAM,SAAS,MAAM,CAAC;AAE7B,iFAAiF;AACjF,eAAO,MAAM,QAAQ,OAAO,CAAC;AAE7B,qDAAqD;AACrD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAU5C;AAED,4CAA4C;AAC5C,eAAO,MAAM,WAAW,QAAO,OAA8B,CAAC;AAE9D,kFAAkF;AAClF,eAAO,MAAM,UAAU,QAAO,OAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/utils.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
3
|
+
var ui = require('@hanzo/ui');
|
|
5
4
|
|
|
6
|
-
// src/utils.ts
|
|
7
|
-
function cn(...inputs) {
|
|
8
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
9
|
-
}
|
|
10
5
|
|
|
11
|
-
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "cn", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return ui.cn; }
|
|
10
|
+
});
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `cn` — re-exported from @hanzo/ui, which is where the one implementation now
|
|
3
|
+
* lives.
|
|
4
|
+
*
|
|
5
|
+
* There were two of them in this package (here and utils/cn.ts), both calling
|
|
6
|
+
* `twMerge(clsx(...))`. twMerge exists to resolve conflicts BETWEEN Tailwind
|
|
7
|
+
* utilities, and there are none left to resolve: this package renders through
|
|
8
|
+
* @hanzo/gui style props, and a class name here is only a stable handle a host
|
|
9
|
+
* may select on. So it was resolving conflicts in a vocabulary nothing writes,
|
|
10
|
+
* at the cost of two dependencies.
|
|
11
|
+
*/
|
|
12
|
+
export { cn, type ClassValue } from '@hanzo/ui';
|
|
13
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/utils.js
CHANGED
package/dist/vite.d.ts
CHANGED
|
@@ -24,6 +24,6 @@ interface LuxUiVitePlugin {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
declare function luxUi(options?: LuxUiViteOptions): LuxUiVitePlugin;
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
export declare function luxUi(options?: LuxUiViteOptions): LuxUiVitePlugin;
|
|
28
|
+
export type { LuxUiViteOptions };
|
|
29
|
+
//# sourceMappingURL=vite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAkBA,UAAU,gBAAgB;IACxB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,iFAAiF;AACjF,UAAU,eAAe;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/B,OAAO,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;SAAE,CAAC;QAClE,YAAY,EAAE;YAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;SAAE,CAAC;KAC1C,CAAC;CACH;AAiBD,wBAAgB,KAAK,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAgBrE;AAED,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
package/dist/white-label.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
declare const LUX_BRAND: {
|
|
1
|
+
export declare const LUX_BRAND: {
|
|
2
2
|
readonly lux: "#7000FF";
|
|
3
3
|
readonly zoo: "#6C5EFB";
|
|
4
4
|
readonly hanzo: "#EA580C";
|
|
5
5
|
readonly pars: "#1C3879";
|
|
6
6
|
readonly bootnode: "#3B82F6";
|
|
7
7
|
};
|
|
8
|
-
declare const PARS_GOLD = "#C8A45C";
|
|
9
|
-
type LuxBrand = keyof typeof LUX_BRAND;
|
|
10
|
-
type Org = LuxBrand;
|
|
11
|
-
interface OrgIdentity {
|
|
8
|
+
export declare const PARS_GOLD = "#C8A45C";
|
|
9
|
+
export type LuxBrand = keyof typeof LUX_BRAND;
|
|
10
|
+
export type Org = LuxBrand;
|
|
11
|
+
export interface OrgIdentity {
|
|
12
12
|
/** Org id — also the gui child-theme suffix (`dark_lux`, `dark_zoo`, …). */
|
|
13
13
|
readonly org: Org;
|
|
14
14
|
/** Display name for chrome (header, title, sign-in copy). */
|
|
@@ -23,8 +23,8 @@ interface OrgIdentity {
|
|
|
23
23
|
readonly accentForeground: string;
|
|
24
24
|
}
|
|
25
25
|
declare const ORGS: Readonly<Record<Org, OrgIdentity>>;
|
|
26
|
-
declare const DEFAULT_ORG: Org;
|
|
27
|
-
interface WhiteLabel extends OrgIdentity {
|
|
26
|
+
export declare const DEFAULT_ORG: Org;
|
|
27
|
+
export interface WhiteLabel extends OrgIdentity {
|
|
28
28
|
/** Hostname the identity was resolved from, port stripped, lowercased. */
|
|
29
29
|
readonly host: string;
|
|
30
30
|
/** App slug taken from the hostname — `mpc.lux.cloud` → `mpc`. */
|
|
@@ -46,14 +46,14 @@ interface WhiteLabel extends OrgIdentity {
|
|
|
46
46
|
* resolveWhiteLabel('zoo.cloud') // org zoo, clientId zoo-cloud, issuer https://zoolabs.id
|
|
47
47
|
* resolveWhiteLabel('cloud.pars.network') // org pars, clientId pars-app, issuer https://pars.id
|
|
48
48
|
*/
|
|
49
|
-
declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
|
|
49
|
+
export declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
|
|
50
50
|
/**
|
|
51
51
|
* The current host in a browser, or '' during SSR / prerender.
|
|
52
52
|
* Server code must pass `req.headers.host` to resolveWhiteLabel explicitly —
|
|
53
53
|
* there is no ambient request here, and guessing would bake in a brand.
|
|
54
54
|
*/
|
|
55
|
-
declare function currentHost(): string;
|
|
55
|
+
export declare function currentHost(): string;
|
|
56
56
|
/** Identity for the org id itself, for the rare surface that is not host-routed. */
|
|
57
|
-
declare function orgIdentity(org: Org): OrgIdentity;
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
export declare function orgIdentity(org: Org): OrgIdentity;
|
|
58
|
+
export { ORGS as orgs };
|
|
59
|
+
//# sourceMappingURL=white-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"white-label.d.ts","sourceRoot":"","sources":["../src/white-label.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,SAAS;;;;;;CAQZ,CAAC;AAEX,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAE9C,MAAM,MAAM,GAAG,GAAG,QAAQ,CAAC;AAE3B,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAGD,QAAA,MAAM,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,CAmD5C,CAAC;AAkCF,eAAO,MAAM,WAAW,EAAE,GAAW,CAAC;AAEtC,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AA0DD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU,CAclE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAEjD;AAED,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxfi/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Cross-platform UI components on @hanzo/gui. Native mobile + web.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -296,30 +296,24 @@
|
|
|
296
296
|
"types": "./dist/*.d.ts"
|
|
297
297
|
}
|
|
298
298
|
},
|
|
299
|
-
"scripts": {
|
|
300
|
-
"build": "tsup",
|
|
301
|
-
"build:check": "tsc --noEmit",
|
|
302
|
-
"clean": "rm -rf dist",
|
|
303
|
-
"dev": "tsup --watch",
|
|
304
|
-
"harness": "vite --config harness/vite.config.ts",
|
|
305
|
-
"test": "playwright test"
|
|
306
|
-
},
|
|
307
299
|
"dependencies": {
|
|
300
|
+
"@hanzogui/config": "^8.1.1",
|
|
308
301
|
"@uidotdev/usehooks": "^2.4.1",
|
|
309
|
-
"clsx": "^2.1.1",
|
|
310
302
|
"es-toolkit": "^1.31.0",
|
|
311
303
|
"lucide-react": "^1.27.0",
|
|
312
|
-
"
|
|
304
|
+
"@hanzo/ui": "^8.7.5"
|
|
313
305
|
},
|
|
314
306
|
"peerDependencies": {
|
|
315
|
-
"@hanzo/
|
|
307
|
+
"@hanzo/appearance": "^0.1.4",
|
|
308
|
+
"@hanzo/design": "^0.5.1",
|
|
309
|
+
"@hanzo/gui": "^8.1.1",
|
|
316
310
|
"@hanzo/iam": "^0.13.8",
|
|
317
|
-
"@
|
|
318
|
-
"@hanzogui/
|
|
319
|
-
"@hanzogui/core": "^
|
|
320
|
-
"@hanzogui/lucide-icons-2": "^
|
|
321
|
-
"@hanzogui/themes": "^
|
|
322
|
-
"@hanzogui/web": "^
|
|
311
|
+
"@hanzo/ui": "^8.7.5",
|
|
312
|
+
"@hanzogui/colors": "^8.1.1",
|
|
313
|
+
"@hanzogui/core": "^8.1.1",
|
|
314
|
+
"@hanzogui/lucide-icons-2": "^8.1.1",
|
|
315
|
+
"@hanzogui/themes": "^8.1.1",
|
|
316
|
+
"@hanzogui/web": "^8.1.1",
|
|
323
317
|
"@tanstack/react-query": "^5.76.0",
|
|
324
318
|
"react": ">=19",
|
|
325
319
|
"react-dom": ">=19"
|
|
@@ -345,13 +339,16 @@
|
|
|
345
339
|
}
|
|
346
340
|
},
|
|
347
341
|
"devDependencies": {
|
|
348
|
-
"@hanzo/
|
|
342
|
+
"@hanzo/appearance": "0.1.4",
|
|
343
|
+
"@hanzo/design": "^0.5.21",
|
|
344
|
+
"@hanzo/gui": "8.1.1",
|
|
349
345
|
"@hanzo/iam": "^0.13.8",
|
|
350
|
-
"@
|
|
351
|
-
"@hanzogui/
|
|
352
|
-
"@hanzogui/
|
|
353
|
-
"@hanzogui/
|
|
354
|
-
"@hanzogui/
|
|
346
|
+
"@hanzo/ui": "^8.3.3",
|
|
347
|
+
"@hanzogui/colors": "8.1.1",
|
|
348
|
+
"@hanzogui/config": "8.1.1",
|
|
349
|
+
"@hanzogui/core": "8.1.1",
|
|
350
|
+
"@hanzogui/themes": "8.1.1",
|
|
351
|
+
"@hanzogui/web": "8.1.1",
|
|
355
352
|
"@playwright/test": "^1.58",
|
|
356
353
|
"@tailwindcss/vite": "^4",
|
|
357
354
|
"@types/react": "^19.0.0",
|
|
@@ -363,6 +360,15 @@
|
|
|
363
360
|
"tailwindcss": "^4",
|
|
364
361
|
"tsup": "^8.5.0",
|
|
365
362
|
"typescript": "^5.9.3",
|
|
366
|
-
"vite": "^8"
|
|
363
|
+
"vite": "^8",
|
|
364
|
+
"@types/node": "^22.10.6"
|
|
365
|
+
},
|
|
366
|
+
"scripts": {
|
|
367
|
+
"build": "tsup --no-dts && tsc -p tsconfig.json --noEmit false --emitDeclarationOnly --declaration --outDir dist",
|
|
368
|
+
"build:check": "tsc --noEmit",
|
|
369
|
+
"clean": "rm -rf dist",
|
|
370
|
+
"dev": "tsup --watch",
|
|
371
|
+
"harness": "vite --config harness/vite.config.ts",
|
|
372
|
+
"test": "playwright test"
|
|
367
373
|
}
|
|
368
|
-
}
|
|
374
|
+
}
|
package/src/button.tsx
CHANGED
|
@@ -369,24 +369,6 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
369
369
|
},
|
|
370
370
|
);
|
|
371
371
|
|
|
372
|
-
// ---------------------------------------------------------------------------
|
|
373
|
-
// buttonVariants — compatibility shim for consumers that call buttonVariants()
|
|
374
|
-
// Returns the className string for a given variant + size combo.
|
|
375
|
-
// ---------------------------------------------------------------------------
|
|
376
|
-
|
|
377
|
-
const SIZE_CLASSES: Record<string, string> = {
|
|
378
|
-
'2xs': 'px-2 h-5 min-w-5 text-xs rounded-sm gap-1',
|
|
379
|
-
xs: 'px-2 h-6 min-w-6 text-sm rounded-sm gap-1',
|
|
380
|
-
sm: 'px-3 h-8 min-w-8 text-sm rounded-md gap-1',
|
|
381
|
-
md: 'px-3 h-10 min-w-10 text-base rounded-md gap-2',
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
export function buttonVariants(opts?: { variant?: string; size?: string }): string {
|
|
385
|
-
const v = opts?.variant ?? 'solid';
|
|
386
|
-
const s = opts?.size ?? 'md';
|
|
387
|
-
return [BASE_CLASSES, VARIANT_CLASSES[v] ?? '', SIZE_CLASSES[s] ?? ''].filter(Boolean).join(' ');
|
|
388
|
-
}
|
|
389
|
-
|
|
390
372
|
// ---------------------------------------------------------------------------
|
|
391
373
|
// ButtonGroup
|
|
392
374
|
// ---------------------------------------------------------------------------
|
package/src/heading.tsx
CHANGED
|
@@ -21,9 +21,18 @@ export interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'> {
|
|
|
21
21
|
const TAG = { '1': H1, '2': H2, '3': H3 } as const;
|
|
22
22
|
|
|
23
23
|
const RAMP = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
// Tokens, not numbers. `$n` publishes as `var(--text-*, <px>)` through the
|
|
25
|
+
// shared config, and @hanzo/design multiplies `--text-*` by `--type-scale` —
|
|
26
|
+
// so these three lines are what lets a person's type-size setting reach a
|
|
27
|
+
// heading at all. Written as `18` they would render identically today and
|
|
28
|
+
// never move again.
|
|
29
|
+
//
|
|
30
|
+
// lineHeight is deliberately absent: gui derives it from the resolved size,
|
|
31
|
+
// so it scales WITH the text. A fixed 24 next to an adjustable size is how
|
|
32
|
+
// you get 32px text in a 24px box.
|
|
33
|
+
'1': { fontSize: '$6', $lg: { fontSize: '$10', letterSpacing: -0.5 } },
|
|
34
|
+
'2': { fontSize: '$5', $lg: { fontSize: '$8' } },
|
|
35
|
+
'3': { fontSize: '$3', fontWeight: '600', $lg: { fontSize: '$6', fontWeight: '500' } },
|
|
27
36
|
} as const;
|
|
28
37
|
|
|
29
38
|
export const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(
|
package/src/index.ts
CHANGED
package/src/input.tsx
CHANGED
|
@@ -26,12 +26,12 @@ export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, '
|
|
|
26
26
|
readonly onChangeText?: (text: string) => void;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export const SIZE: Record<InputSize, Record<string,
|
|
30
|
-
xs: { height: 24, paddingHorizontal: 8, fontSize:
|
|
31
|
-
sm: { height: 32, paddingHorizontal: 12, fontSize:
|
|
32
|
-
md: { height: 40, paddingHorizontal: 16, fontSize:
|
|
33
|
-
lg: { height: 48, paddingHorizontal: 16, fontSize:
|
|
34
|
-
'2xl': { height: 56, paddingHorizontal: 16, fontSize:
|
|
29
|
+
export const SIZE: Record<InputSize, Record<string, unknown>> = {
|
|
30
|
+
xs: { height: 24, paddingHorizontal: 8, fontSize: '$1', borderRadius: 4 },
|
|
31
|
+
sm: { height: 32, paddingHorizontal: 12, fontSize: '$3', borderRadius: 6 },
|
|
32
|
+
md: { height: 40, paddingHorizontal: 16, fontSize: '$5', borderRadius: 6 },
|
|
33
|
+
lg: { height: 48, paddingHorizontal: 16, fontSize: '$6', borderRadius: 8 },
|
|
34
|
+
'2xl': { height: 56, paddingHorizontal: 16, fontSize: '$7', borderRadius: 8 },
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export const VARIANT: Record<InputVariant, Record<string, unknown>> = {
|
package/src/lux.config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { createGui } from '@hanzo/gui';
|
|
4
|
+
import { config as hanzoConfig } from '@hanzo/ui/gui-config';
|
|
4
5
|
import { defaultConfig } from '@hanzogui/config/v5';
|
|
5
6
|
import { animations } from '@hanzogui/config/v5-css';
|
|
6
7
|
|
|
@@ -60,8 +61,26 @@ export const luxThemes = {
|
|
|
60
61
|
// the motion — one wiring for the whole fleet, not one per app.
|
|
61
62
|
// Native surfaces can swap `@hanzogui/config/v5-css` for `/v5-rn` without
|
|
62
63
|
// touching a component: the transition token names are identical.
|
|
64
|
+
// The type ramp comes from @hanzo/ui's shared config, not from v5's literals.
|
|
65
|
+
//
|
|
66
|
+
// That config publishes gui's `$n` font ladder as `var(--text-*, <px>)` rather
|
|
67
|
+
// than as numbers, and @hanzo/design's ramp multiplies `--text-*` by
|
|
68
|
+
// `--type-scale` — the knob @hanzo/appearance writes onto <html>. gui resolves
|
|
69
|
+
// a size in JS and applies it INLINE, and an inline style outranks every
|
|
70
|
+
// stylesheet, so a custom property is the only thing that can reach a
|
|
71
|
+
// `fontSize="$n"` call site at all. Taking v5's ladder instead would render
|
|
72
|
+
// identically today and be frozen forever: a person's type-size setting would
|
|
73
|
+
// have nothing to move.
|
|
74
|
+
//
|
|
75
|
+
// The px literal survives as each var()'s fallback, so a Lux surface that
|
|
76
|
+
// mounts no token layer still renders at the intended size.
|
|
77
|
+
//
|
|
78
|
+
// Only TYPE is on that ramp upstream — `space` and `radius` arrive as numbers,
|
|
79
|
+
// so density is not adjustable yet. That is a gap in the shared config, not
|
|
80
|
+
// something to paper over here with a private scale.
|
|
63
81
|
export const config = createGui({
|
|
64
82
|
...defaultConfig,
|
|
83
|
+
...hanzoConfig,
|
|
65
84
|
animations,
|
|
66
85
|
settings: {
|
|
67
86
|
...defaultConfig.settings,
|
package/src/pin-input.tsx
CHANGED
|
@@ -39,7 +39,7 @@ const BOX = {
|
|
|
39
39
|
hoverStyle: { borderColor: 'var(--color-input-border-hover)' as never },
|
|
40
40
|
focusStyle: {
|
|
41
41
|
borderColor: 'var(--color-input-border-focus)' as never,
|
|
42
|
-
boxShadow: '
|
|
42
|
+
boxShadow: 'var(--shadow-md)',
|
|
43
43
|
},
|
|
44
44
|
disabledStyle: { opacity: 0.4 },
|
|
45
45
|
};
|
package/src/slider.tsx
CHANGED
|
@@ -119,7 +119,7 @@ export const Slider = React.forwardRef<HTMLSpanElement, SliderProps>(
|
|
|
119
119
|
borderWidth={ 2 }
|
|
120
120
|
borderColor={ ACTIVE }
|
|
121
121
|
backgroundColor={ WHITE }
|
|
122
|
-
boxShadow="
|
|
122
|
+
boxShadow="var(--shadow-sm)"
|
|
123
123
|
transition="quick"
|
|
124
124
|
hoverStyle={{ borderColor: ACTIVE_HOVER }}
|
|
125
125
|
focusStyle={{ outlineWidth: 2, outlineStyle: 'solid', outlineColor: ACTIVE, outlineOffset: 2 }}
|
package/src/switch.tsx
CHANGED
|
@@ -123,7 +123,7 @@ const SwitchBase = React.forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
123
123
|
height={ s.thumb }
|
|
124
124
|
borderRadius={ 9999 }
|
|
125
125
|
backgroundColor={ WHITE }
|
|
126
|
-
boxShadow="
|
|
126
|
+
boxShadow="var(--shadow-sm)"
|
|
127
127
|
>
|
|
128
128
|
{ thumbLabel && (
|
|
129
129
|
<Text width="100%" height="100%" textAlign="center" fontSize={ 8 }>
|
package/src/textarea.tsx
CHANGED
|
@@ -19,12 +19,12 @@ export interface TextareaProps extends Omit<React.ComponentPropsWithRef<'textare
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/** Same ramp as Input, but a textarea is sized by padding, not by height. */
|
|
22
|
-
const SIZE: Record<TextareaSize, Record<string,
|
|
23
|
-
xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize:
|
|
24
|
-
sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize:
|
|
25
|
-
md: { paddingHorizontal: 16, paddingVertical: 8, fontSize:
|
|
26
|
-
lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize:
|
|
27
|
-
'2xl': { paddingHorizontal: 16, paddingVertical: 12, fontSize:
|
|
22
|
+
const SIZE: Record<TextareaSize, Record<string, unknown>> = {
|
|
23
|
+
xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: '$1', borderRadius: 4 },
|
|
24
|
+
sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: '$3', borderRadius: 6 },
|
|
25
|
+
md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: '$5', borderRadius: 6 },
|
|
26
|
+
lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize: '$6', borderRadius: 8 },
|
|
27
|
+
'2xl': { paddingHorizontal: 16, paddingVertical: 12, fontSize: '$7', borderRadius: 8 },
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
package/src/utils/cn.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export function cn(...inputs: Array<ClassValue>): string {
|
|
6
|
-
return twMerge(clsx(inputs));
|
|
7
|
-
}
|
|
1
|
+
// The one `cn` lives in @hanzo/ui; ../utils re-exports it. This path is kept
|
|
2
|
+
// because call sites import it, and it must not become a second copy.
|
|
3
|
+
export { cn, type ClassValue } from '@hanzo/ui'
|
package/src/utils.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `cn` — re-exported from @hanzo/ui, which is where the one implementation now
|
|
3
|
+
* lives.
|
|
4
|
+
*
|
|
5
|
+
* There were two of them in this package (here and utils/cn.ts), both calling
|
|
6
|
+
* `twMerge(clsx(...))`. twMerge exists to resolve conflicts BETWEEN Tailwind
|
|
7
|
+
* utilities, and there are none left to resolve: this package renders through
|
|
8
|
+
* @hanzo/gui style props, and a class name here is only a stable handle a host
|
|
9
|
+
* may select on. So it was resolving conflicts in a vocabulary nothing writes,
|
|
10
|
+
* at the cost of two dependencies.
|
|
11
|
+
*/
|
|
12
|
+
export { cn, type ClassValue } from '@hanzo/ui'
|
package/tokens.css
CHANGED
|
@@ -427,6 +427,12 @@
|
|
|
427
427
|
--chakra-colors-whiteAlpha-100: var(--color-whiteAlpha-100);
|
|
428
428
|
|
|
429
429
|
/* --- Shadows --- */
|
|
430
|
+
/* The two elevation steps small controls need — a switch thumb, a slider
|
|
431
|
+
handle, a focused pin cell. They were inlined at their LIGHT values in
|
|
432
|
+
three components, so those rendered a barely-visible black shadow on a
|
|
433
|
+
black canvas. A shadow is a theme value like any colour. */
|
|
434
|
+
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
435
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
430
436
|
--shadow-action-bar: 0 4px 4px -4px rgb(0 0 0 / 10%), 0 2px 4px -4px rgb(0 0 0 / 6%);
|
|
431
437
|
--shadow-popover: 0px 15px 50px -12px rgba(0, 0, 0, 0.25);
|
|
432
438
|
--shadow-drawer: 0px 4px 6px -2px rgba(0, 0, 0, 0.05), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
@@ -692,6 +698,11 @@
|
|
|
692
698
|
--color-graph-line: var(--lux-paper-48);
|
|
693
699
|
--color-graph-gradient-start: rgba(255, 255, 255, 0.15);
|
|
694
700
|
--color-graph-gradient-stop: rgba(255, 255, 255, 0);
|
|
701
|
+
/* On a dark canvas a 5%-black shadow is invisible, so the small steps carry
|
|
702
|
+
a hairline rim as well as depth — the rim is what actually separates a
|
|
703
|
+
control from the surface behind it. */
|
|
704
|
+
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
|
|
705
|
+
--shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
|
|
695
706
|
--shadow-drawer: 0px 15px 40px 0px rgba(0, 0, 0, 0.4), 0px 5px 10px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
|
|
696
707
|
|
|
697
708
|
/* --- Skeleton --- */
|