@luxfi/ui 7.4.5 → 7.4.7
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/accordion.d.cts +74 -0
- package/dist/accordion.d.ts +74 -0
- package/dist/alert.cjs +3 -7
- package/dist/alert.d.cts +30 -0
- package/dist/alert.d.ts +30 -0
- package/dist/alert.js +3 -7
- package/dist/auth.cjs +481 -0
- package/dist/auth.d.cts +80 -0
- package/dist/auth.d.ts +80 -0
- package/dist/auth.js +456 -0
- package/dist/avatar.d.cts +25 -0
- package/dist/avatar.d.ts +25 -0
- package/dist/badge.cjs +4 -8
- package/dist/badge.d.cts +19 -0
- package/dist/badge.d.ts +19 -0
- package/dist/badge.js +4 -8
- package/dist/bank.d.cts +83 -0
- package/dist/bank.d.ts +83 -0
- package/dist/button.cjs +3 -7
- package/dist/button.d.cts +55 -0
- package/dist/button.d.ts +55 -0
- package/dist/button.js +3 -7
- package/dist/checkbox.d.cts +32 -0
- package/dist/checkbox.d.ts +32 -0
- package/dist/chrome.d.cts +93 -0
- package/dist/chrome.d.ts +93 -0
- package/dist/close-button.d.cts +9 -0
- package/dist/close-button.d.ts +9 -0
- package/dist/collapsible.cjs +3 -7
- package/dist/collapsible.d.cts +23 -0
- package/dist/collapsible.d.ts +23 -0
- package/dist/collapsible.js +3 -7
- package/dist/color-mode.d.cts +25 -0
- package/dist/color-mode.d.ts +25 -0
- package/dist/dialog.d.cts +118 -0
- package/dist/dialog.d.ts +118 -0
- package/dist/drawer.d.cts +36 -0
- package/dist/drawer.d.ts +36 -0
- package/dist/empty-state.d.cts +13 -0
- package/dist/empty-state.d.ts +13 -0
- package/dist/expiration-selector.d.cts +16 -0
- package/dist/expiration-selector.d.ts +16 -0
- package/dist/field.d.cts +24 -0
- package/dist/field.d.ts +24 -0
- package/dist/greeks-display.d.cts +14 -0
- package/dist/greeks-display.d.ts +14 -0
- package/dist/gui.d.cts +2 -0
- package/dist/gui.d.ts +2 -0
- package/dist/heading.d.cts +10 -0
- package/dist/heading.d.ts +10 -0
- package/dist/iam.d.cts +65 -0
- package/dist/iam.d.ts +65 -0
- package/dist/icon-button.cjs +3 -7
- package/dist/icon-button.d.cts +33 -0
- package/dist/icon-button.d.ts +33 -0
- package/dist/icon-button.js +3 -7
- package/dist/icons.cjs +0 -1
- package/dist/icons.d.cts +1 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +0 -1
- package/dist/identity.d.cts +64 -0
- package/dist/identity.d.ts +64 -0
- package/dist/image.cjs +3 -7
- package/dist/image.d.cts +57 -0
- package/dist/image.d.ts +57 -0
- package/dist/image.js +3 -7
- package/dist/index.cjs +9 -8
- package/dist/index.d.cts +64 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +9 -9
- package/dist/input-group.d.cts +17 -0
- package/dist/input-group.d.ts +17 -0
- package/dist/input.d.cts +17 -0
- package/dist/input.d.ts +17 -0
- package/dist/link.cjs +3 -7
- package/dist/link.d.cts +37 -0
- package/dist/link.d.ts +37 -0
- package/dist/link.js +3 -7
- package/dist/lux.config.d.cts +433 -0
- package/dist/lux.config.d.ts +433 -0
- package/dist/menu.d.cts +84 -0
- package/dist/menu.d.ts +84 -0
- package/dist/next.cjs +11 -1
- package/dist/next.d.cts +32 -0
- package/dist/next.d.ts +32 -0
- package/dist/next.js +11 -1
- package/dist/option-chain.d.cts +37 -0
- package/dist/option-chain.d.ts +37 -0
- package/dist/option-position.d.cts +29 -0
- package/dist/option-position.d.ts +29 -0
- package/dist/pin-input.d.cts +25 -0
- package/dist/pin-input.d.ts +25 -0
- package/dist/pnl-diagram.d.cts +11 -0
- package/dist/pnl-diagram.d.ts +11 -0
- package/dist/popover.d.cts +73 -0
- package/dist/popover.d.ts +73 -0
- package/dist/progress-circle.d.cts +47 -0
- package/dist/progress-circle.d.ts +47 -0
- package/dist/progress.d.cts +28 -0
- package/dist/progress.d.ts +28 -0
- package/dist/provider.d.cts +25 -0
- package/dist/provider.d.ts +25 -0
- package/dist/radio.d.cts +53 -0
- package/dist/radio.d.ts +53 -0
- package/dist/rating.d.cts +14 -0
- package/dist/rating.d.ts +14 -0
- package/dist/select.cjs +3 -7
- package/dist/select.d.cts +130 -0
- package/dist/select.d.ts +130 -0
- package/dist/select.js +3 -7
- package/dist/separator.d.cts +13 -0
- package/dist/separator.d.ts +13 -0
- package/dist/skeleton.cjs +8 -7
- package/dist/skeleton.d.cts +76 -0
- package/dist/skeleton.d.ts +76 -0
- package/dist/skeleton.js +8 -8
- package/dist/slider.d.cts +24 -0
- package/dist/slider.d.ts +24 -0
- package/dist/strategy-builder.d.cts +26 -0
- package/dist/strategy-builder.d.ts +26 -0
- package/dist/switch.d.cts +27 -0
- package/dist/switch.d.ts +27 -0
- package/dist/table.cjs +3 -7
- package/dist/table.d.cts +107 -0
- package/dist/table.d.ts +107 -0
- package/dist/table.js +3 -7
- package/dist/tabs.d.cts +78 -0
- package/dist/tabs.d.ts +78 -0
- package/dist/tag.cjs +4 -8
- package/dist/tag.d.cts +21 -0
- package/dist/tag.d.ts +21 -0
- package/dist/tag.js +4 -8
- package/dist/textarea.d.cts +13 -0
- package/dist/textarea.d.ts +13 -0
- package/dist/toaster.d.cts +29 -0
- package/dist/toaster.d.ts +29 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.cts +38 -0
- package/dist/tooltip.d.ts +38 -0
- package/dist/tooltip.js +1 -1
- package/dist/use-narrow.d.cts +12 -0
- package/dist/use-narrow.d.ts +12 -0
- package/dist/utils.d.cts +5 -0
- package/dist/utils.d.ts +5 -0
- package/dist/vite.cjs +4 -3
- package/dist/vite.d.cts +29 -0
- package/dist/vite.d.ts +29 -0
- package/dist/vite.js +4 -3
- package/dist/white-label.d.cts +59 -0
- package/dist/white-label.d.ts +59 -0
- package/package.json +12 -2
- package/src/auth.tsx +198 -0
- package/src/engine.ts +24 -3
- package/src/index.ts +1 -1
- package/src/next.ts +10 -0
- package/src/skeleton.tsx +36 -7
- package/src/tooltip.tsx +13 -5
- package/src/vite.ts +4 -9
- package/tokens.css +828 -317
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type TabsVariant = 'solid' | 'secondary' | 'segmented' | 'unstyled';
|
|
5
|
+
type TabsSize = 'sm' | 'md' | 'free';
|
|
6
|
+
interface TabsProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'onValueChange'> {
|
|
7
|
+
/** Visual variant. Default: "solid". */
|
|
8
|
+
variant?: TabsVariant;
|
|
9
|
+
/** Size preset. Default: "md". */
|
|
10
|
+
size?: TabsSize;
|
|
11
|
+
/** Stretch triggers to fill the list width. */
|
|
12
|
+
fitted?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Chakra-compat. Radix mounts lazily by default (content only
|
|
15
|
+
* renders when active). Kept so call-sites don't break at compile time.
|
|
16
|
+
*/
|
|
17
|
+
lazyMount?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Chakra-compat. Radix unmounts inactive content by default.
|
|
20
|
+
* Kept so call-sites don't break at compile time.
|
|
21
|
+
*/
|
|
22
|
+
unmountOnExit?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Chakra-compatible value-change handler.
|
|
25
|
+
* Accepts both `(details: { value: string }) => void` (Chakra convention)
|
|
26
|
+
* and `(value: string) => void` (Radix convention).
|
|
27
|
+
*/
|
|
28
|
+
onValueChange?: ((details: {
|
|
29
|
+
value: string;
|
|
30
|
+
}) => void) | ((value: string) => void);
|
|
31
|
+
}
|
|
32
|
+
declare const TabsRoot: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
loop?: boolean;
|
|
36
|
+
flexWrap?: string;
|
|
37
|
+
alignItems?: string;
|
|
38
|
+
whiteSpace?: string;
|
|
39
|
+
bgColor?: string;
|
|
40
|
+
marginBottom?: number | string;
|
|
41
|
+
mx?: string | Record<string, string>;
|
|
42
|
+
px?: string | Record<string, string>;
|
|
43
|
+
w?: string | Record<string, string>;
|
|
44
|
+
overflowX?: string | Record<string, string>;
|
|
45
|
+
overscrollBehaviorX?: string;
|
|
46
|
+
css?: Record<string, unknown>;
|
|
47
|
+
position?: string;
|
|
48
|
+
boxShadow?: string | Record<string, string>;
|
|
49
|
+
top?: number | string;
|
|
50
|
+
zIndex?: string | Record<string, string>;
|
|
51
|
+
}
|
|
52
|
+
declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
interface TabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Trigger>, 'dir'> {
|
|
54
|
+
scrollSnapAlign?: string;
|
|
55
|
+
flexShrink?: number;
|
|
56
|
+
bgColor?: string | Record<string, string>;
|
|
57
|
+
w?: string;
|
|
58
|
+
py?: string;
|
|
59
|
+
borderRadius?: string;
|
|
60
|
+
fontWeight?: string;
|
|
61
|
+
color?: string;
|
|
62
|
+
_hover?: Record<string, string>;
|
|
63
|
+
position?: string;
|
|
64
|
+
top?: string;
|
|
65
|
+
left?: string;
|
|
66
|
+
visibility?: string;
|
|
67
|
+
}
|
|
68
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
69
|
+
interface TabsContentProps extends React.ComponentPropsWithoutRef<typeof RadixTabs.Content> {
|
|
70
|
+
padding?: number | string;
|
|
71
|
+
}
|
|
72
|
+
declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
interface TabsCounterProps {
|
|
74
|
+
count?: number | null;
|
|
75
|
+
}
|
|
76
|
+
declare const TabsCounter: ({ count }: TabsCounterProps) => React.ReactElement | null;
|
|
77
|
+
|
|
78
|
+
export { TabsContent, type TabsContentProps, TabsCounter, type TabsCounterProps, TabsList, type TabsListProps, type TabsProps, TabsRoot, TabsTrigger, type TabsTriggerProps };
|
package/dist/tag.cjs
CHANGED
|
@@ -208,11 +208,7 @@ function stripShims(props) {
|
|
|
208
208
|
for (const k of SHIM_PROPS) delete out[k];
|
|
209
209
|
return out;
|
|
210
210
|
}
|
|
211
|
-
var SKELETON_CLASSES =
|
|
212
|
-
"animate-skeleton-shimmer rounded-sm",
|
|
213
|
-
"bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
|
|
214
|
-
"bg-[length:200%_100%]"
|
|
215
|
-
].join(" ");
|
|
211
|
+
var SKELETON_CLASSES = "lux-skeleton rounded-sm";
|
|
216
212
|
var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
|
|
217
213
|
var Skeleton = React4__namespace.forwardRef(
|
|
218
214
|
function Skeleton2(props, ref) {
|
|
@@ -232,7 +228,7 @@ var Skeleton = React4__namespace.forwardRef(
|
|
|
232
228
|
{
|
|
233
229
|
ref,
|
|
234
230
|
"data-loading": true,
|
|
235
|
-
className: cn(SKELETON_CLASSES, "
|
|
231
|
+
className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
|
|
236
232
|
style: mergedStyle,
|
|
237
233
|
...htmlRest,
|
|
238
234
|
children
|
|
@@ -244,7 +240,7 @@ var Skeleton = React4__namespace.forwardRef(
|
|
|
244
240
|
{
|
|
245
241
|
ref,
|
|
246
242
|
"data-loading": true,
|
|
247
|
-
className: cn(SKELETON_CLASSES, children ? "
|
|
243
|
+
className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
|
|
248
244
|
style: mergedStyle,
|
|
249
245
|
...htmlRest,
|
|
250
246
|
children
|
|
@@ -375,7 +371,7 @@ var Tooltip = React4__namespace.forwardRef(
|
|
|
375
371
|
{
|
|
376
372
|
ref: triggerRef,
|
|
377
373
|
asChild: true,
|
|
378
|
-
...isMobile ? {
|
|
374
|
+
...isMobile ? { onClick: handleTriggerClick } : {},
|
|
379
375
|
...triggerProps,
|
|
380
376
|
children
|
|
381
377
|
}
|
package/dist/tag.d.cts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type TagVariant = 'subtle' | 'clickable' | 'filter' | 'select';
|
|
4
|
+
type TagSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface TagProps extends Omit<React.ComponentPropsWithRef<'span'>, 'size'> {
|
|
6
|
+
readonly variant?: TagVariant;
|
|
7
|
+
readonly size?: TagSize;
|
|
8
|
+
readonly startElement?: React.ReactNode;
|
|
9
|
+
readonly endElement?: React.ReactNode;
|
|
10
|
+
readonly endElementProps?: React.HTMLAttributes<HTMLSpanElement>;
|
|
11
|
+
readonly label?: string;
|
|
12
|
+
readonly onClose?: VoidFunction;
|
|
13
|
+
readonly closable?: boolean;
|
|
14
|
+
readonly truncated?: boolean;
|
|
15
|
+
readonly loading?: boolean;
|
|
16
|
+
readonly selected?: boolean;
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
|
|
21
|
+
export { Tag, type TagProps };
|
package/dist/tag.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type TagVariant = 'subtle' | 'clickable' | 'filter' | 'select';
|
|
4
|
+
type TagSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
interface TagProps extends Omit<React.ComponentPropsWithRef<'span'>, 'size'> {
|
|
6
|
+
readonly variant?: TagVariant;
|
|
7
|
+
readonly size?: TagSize;
|
|
8
|
+
readonly startElement?: React.ReactNode;
|
|
9
|
+
readonly endElement?: React.ReactNode;
|
|
10
|
+
readonly endElementProps?: React.HTMLAttributes<HTMLSpanElement>;
|
|
11
|
+
readonly label?: string;
|
|
12
|
+
readonly onClose?: VoidFunction;
|
|
13
|
+
readonly closable?: boolean;
|
|
14
|
+
readonly truncated?: boolean;
|
|
15
|
+
readonly loading?: boolean;
|
|
16
|
+
readonly selected?: boolean;
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
|
|
21
|
+
export { Tag, type TagProps };
|
package/dist/tag.js
CHANGED
|
@@ -186,11 +186,7 @@ function stripShims(props) {
|
|
|
186
186
|
for (const k of SHIM_PROPS) delete out[k];
|
|
187
187
|
return out;
|
|
188
188
|
}
|
|
189
|
-
var SKELETON_CLASSES =
|
|
190
|
-
"animate-skeleton-shimmer rounded-sm",
|
|
191
|
-
"bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
|
|
192
|
-
"bg-[length:200%_100%]"
|
|
193
|
-
].join(" ");
|
|
189
|
+
var SKELETON_CLASSES = "lux-skeleton rounded-sm";
|
|
194
190
|
var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
|
|
195
191
|
var Skeleton = React4.forwardRef(
|
|
196
192
|
function Skeleton2(props, ref) {
|
|
@@ -210,7 +206,7 @@ var Skeleton = React4.forwardRef(
|
|
|
210
206
|
{
|
|
211
207
|
ref,
|
|
212
208
|
"data-loading": true,
|
|
213
|
-
className: cn(SKELETON_CLASSES, "
|
|
209
|
+
className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
|
|
214
210
|
style: mergedStyle,
|
|
215
211
|
...htmlRest,
|
|
216
212
|
children
|
|
@@ -222,7 +218,7 @@ var Skeleton = React4.forwardRef(
|
|
|
222
218
|
{
|
|
223
219
|
ref,
|
|
224
220
|
"data-loading": true,
|
|
225
|
-
className: cn(SKELETON_CLASSES, children ? "
|
|
221
|
+
className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
|
|
226
222
|
style: mergedStyle,
|
|
227
223
|
...htmlRest,
|
|
228
224
|
children
|
|
@@ -353,7 +349,7 @@ var Tooltip = React4.forwardRef(
|
|
|
353
349
|
{
|
|
354
350
|
ref: triggerRef,
|
|
355
351
|
asChild: true,
|
|
356
|
-
...isMobile ? {
|
|
352
|
+
...isMobile ? { onClick: handleTriggerClick } : {},
|
|
357
353
|
...triggerProps,
|
|
358
354
|
children
|
|
359
355
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | '2xl';
|
|
4
|
+
type TextareaVariant = 'outline' | 'filled' | 'unstyled';
|
|
5
|
+
interface TextareaProps extends Omit<React__default.ComponentPropsWithRef<'textarea'>, 'size'> {
|
|
6
|
+
readonly size?: TextareaSize;
|
|
7
|
+
readonly variant?: TextareaVariant;
|
|
8
|
+
/** Tamagui / React-Native convention — bridged to native `onChange` (see Input). */
|
|
9
|
+
readonly onChangeText?: (text: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Textarea: React__default.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
12
|
+
|
|
13
|
+
export { Textarea, type TextareaProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | '2xl';
|
|
4
|
+
type TextareaVariant = 'outline' | 'filled' | 'unstyled';
|
|
5
|
+
interface TextareaProps extends Omit<React__default.ComponentPropsWithRef<'textarea'>, 'size'> {
|
|
6
|
+
readonly size?: TextareaSize;
|
|
7
|
+
readonly variant?: TextareaVariant;
|
|
8
|
+
/** Tamagui / React-Native convention — bridged to native `onChange` (see Input). */
|
|
9
|
+
readonly onChangeText?: (text: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Textarea: React__default.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
12
|
+
|
|
13
|
+
export { Textarea, type TextareaProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface ToastOptions {
|
|
4
|
+
readonly id?: string | number;
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
readonly type?: 'info' | 'warning' | 'success' | 'error' | 'loading';
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
readonly action?: {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
readonly onStatusChange?: (details: {
|
|
14
|
+
readonly status: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function create(opts: ToastOptions): string | number;
|
|
18
|
+
declare function update(id: string | number, opts: ToastOptions): void;
|
|
19
|
+
declare const toaster: {
|
|
20
|
+
readonly create: typeof create;
|
|
21
|
+
readonly success: (opts: ToastOptions) => string | number;
|
|
22
|
+
readonly error: (opts: ToastOptions) => string | number;
|
|
23
|
+
readonly loading: (opts: ToastOptions) => string | number;
|
|
24
|
+
readonly update: typeof update;
|
|
25
|
+
readonly remove: (id: string | number) => string | number;
|
|
26
|
+
};
|
|
27
|
+
declare const Toaster: React__default.FC;
|
|
28
|
+
|
|
29
|
+
export { Toaster, toaster };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface ToastOptions {
|
|
4
|
+
readonly id?: string | number;
|
|
5
|
+
readonly title?: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
readonly type?: 'info' | 'warning' | 'success' | 'error' | 'loading';
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
readonly action?: {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
readonly onStatusChange?: (details: {
|
|
14
|
+
readonly status: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function create(opts: ToastOptions): string | number;
|
|
18
|
+
declare function update(id: string | number, opts: ToastOptions): void;
|
|
19
|
+
declare const toaster: {
|
|
20
|
+
readonly create: typeof create;
|
|
21
|
+
readonly success: (opts: ToastOptions) => string | number;
|
|
22
|
+
readonly error: (opts: ToastOptions) => string | number;
|
|
23
|
+
readonly loading: (opts: ToastOptions) => string | number;
|
|
24
|
+
readonly update: typeof update;
|
|
25
|
+
readonly remove: (id: string | number) => string | number;
|
|
26
|
+
};
|
|
27
|
+
declare const Toaster: React__default.FC;
|
|
28
|
+
|
|
29
|
+
export { Toaster, toaster };
|
package/dist/tooltip.cjs
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
showArrow?: boolean;
|
|
6
|
+
portalled?: boolean;
|
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
|
8
|
+
content: React.ReactNode;
|
|
9
|
+
contentProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
triggerProps?: React.HTMLAttributes<HTMLButtonElement>;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
disableOnMobile?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
variant?: string;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
onOpenChange?: (details: {
|
|
18
|
+
open: boolean;
|
|
19
|
+
}) => void;
|
|
20
|
+
closeDelay?: number;
|
|
21
|
+
openDelay?: number;
|
|
22
|
+
interactive?: boolean;
|
|
23
|
+
lazyMount?: boolean;
|
|
24
|
+
unmountOnExit?: boolean;
|
|
25
|
+
positioning?: {
|
|
26
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
27
|
+
overflowPadding?: number;
|
|
28
|
+
offset?: {
|
|
29
|
+
mainAxis?: number;
|
|
30
|
+
crossAxis?: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
closeOnClick?: boolean;
|
|
34
|
+
closeOnPointerDown?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
|
|
38
|
+
export { Tooltip, type TooltipProps };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
showArrow?: boolean;
|
|
6
|
+
portalled?: boolean;
|
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
|
8
|
+
content: React.ReactNode;
|
|
9
|
+
contentProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
10
|
+
triggerProps?: React.HTMLAttributes<HTMLButtonElement>;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
disableOnMobile?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
variant?: string;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
onOpenChange?: (details: {
|
|
18
|
+
open: boolean;
|
|
19
|
+
}) => void;
|
|
20
|
+
closeDelay?: number;
|
|
21
|
+
openDelay?: number;
|
|
22
|
+
interactive?: boolean;
|
|
23
|
+
lazyMount?: boolean;
|
|
24
|
+
unmountOnExit?: boolean;
|
|
25
|
+
positioning?: {
|
|
26
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
27
|
+
overflowPadding?: number;
|
|
28
|
+
offset?: {
|
|
29
|
+
mainAxis?: number;
|
|
30
|
+
crossAxis?: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
closeOnClick?: boolean;
|
|
34
|
+
closeOnPointerDown?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
|
|
38
|
+
export { Tooltip, type TooltipProps };
|
package/dist/tooltip.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Below this the UI is a phone: menus become sheets, drawers drag. */
|
|
2
|
+
declare const NARROW_PX = 640;
|
|
3
|
+
/** Below this the pointer is a finger: hover-only affordances are suppressed. */
|
|
4
|
+
declare const TOUCH_PX = 1024;
|
|
5
|
+
/** True while the viewport is narrower than `px`. */
|
|
6
|
+
declare function useBelow(px: number): boolean;
|
|
7
|
+
/** Phone-sized: present menus as sheets. */
|
|
8
|
+
declare const useIsNarrow: () => boolean;
|
|
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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Below this the UI is a phone: menus become sheets, drawers drag. */
|
|
2
|
+
declare const NARROW_PX = 640;
|
|
3
|
+
/** Below this the pointer is a finger: hover-only affordances are suppressed. */
|
|
4
|
+
declare const TOUCH_PX = 1024;
|
|
5
|
+
/** True while the viewport is narrower than `px`. */
|
|
6
|
+
declare function useBelow(px: number): boolean;
|
|
7
|
+
/** Phone-sized: present menus as sheets. */
|
|
8
|
+
declare const useIsNarrow: () => boolean;
|
|
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 };
|
package/dist/utils.d.cts
ADDED
package/dist/utils.d.ts
ADDED
package/dist/vite.cjs
CHANGED
|
@@ -73,14 +73,15 @@ var GUI_DEFINES = {
|
|
|
73
73
|
"process.env.EXPO_OS": JSON.stringify("web"),
|
|
74
74
|
"process.env.IS_WEB": JSON.stringify("true")
|
|
75
75
|
};
|
|
76
|
-
|
|
77
|
-
// src/vite.ts
|
|
78
|
-
var DEDUPE = [
|
|
76
|
+
var ENGINE_DEDUPE = [
|
|
79
77
|
"react",
|
|
80
78
|
"react-dom",
|
|
81
79
|
"@tanstack/react-query",
|
|
82
80
|
...GUI_PACKAGES
|
|
83
81
|
];
|
|
82
|
+
|
|
83
|
+
// src/vite.ts
|
|
84
|
+
var DEDUPE = ENGINE_DEDUPE;
|
|
84
85
|
var INCLUDE = [
|
|
85
86
|
"react-native-web",
|
|
86
87
|
"@react-native/normalize-color",
|
package/dist/vite.d.cts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface LuxUiViteOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Extra packages to keep to a single physical copy. React, the gui engine and
|
|
4
|
+
* TanStack Query are always deduped.
|
|
5
|
+
*/
|
|
6
|
+
readonly dedupe?: ReadonlyArray<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Extra packages to pre-bundle. The engine, react-native-web and the CJS-only
|
|
9
|
+
* colour helper are always included.
|
|
10
|
+
*/
|
|
11
|
+
readonly include?: ReadonlyArray<string>;
|
|
12
|
+
}
|
|
13
|
+
/** Minimal structural shape of a Vite plugin — avoids a hard `vite` type dep. */
|
|
14
|
+
interface LuxUiVitePlugin {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly config: () => {
|
|
17
|
+
define: Record<string, string>;
|
|
18
|
+
resolve: {
|
|
19
|
+
alias: Record<string, string>;
|
|
20
|
+
dedupe: Array<string>;
|
|
21
|
+
};
|
|
22
|
+
optimizeDeps: {
|
|
23
|
+
include: Array<string>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
declare function luxUi(options?: LuxUiViteOptions): LuxUiVitePlugin;
|
|
28
|
+
|
|
29
|
+
export { type LuxUiViteOptions, luxUi };
|
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface LuxUiViteOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Extra packages to keep to a single physical copy. React, the gui engine and
|
|
4
|
+
* TanStack Query are always deduped.
|
|
5
|
+
*/
|
|
6
|
+
readonly dedupe?: ReadonlyArray<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Extra packages to pre-bundle. The engine, react-native-web and the CJS-only
|
|
9
|
+
* colour helper are always included.
|
|
10
|
+
*/
|
|
11
|
+
readonly include?: ReadonlyArray<string>;
|
|
12
|
+
}
|
|
13
|
+
/** Minimal structural shape of a Vite plugin — avoids a hard `vite` type dep. */
|
|
14
|
+
interface LuxUiVitePlugin {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly config: () => {
|
|
17
|
+
define: Record<string, string>;
|
|
18
|
+
resolve: {
|
|
19
|
+
alias: Record<string, string>;
|
|
20
|
+
dedupe: Array<string>;
|
|
21
|
+
};
|
|
22
|
+
optimizeDeps: {
|
|
23
|
+
include: Array<string>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
declare function luxUi(options?: LuxUiViteOptions): LuxUiVitePlugin;
|
|
28
|
+
|
|
29
|
+
export { type LuxUiViteOptions, luxUi };
|
package/dist/vite.js
CHANGED
|
@@ -71,14 +71,15 @@ var GUI_DEFINES = {
|
|
|
71
71
|
"process.env.EXPO_OS": JSON.stringify("web"),
|
|
72
72
|
"process.env.IS_WEB": JSON.stringify("true")
|
|
73
73
|
};
|
|
74
|
-
|
|
75
|
-
// src/vite.ts
|
|
76
|
-
var DEDUPE = [
|
|
74
|
+
var ENGINE_DEDUPE = [
|
|
77
75
|
"react",
|
|
78
76
|
"react-dom",
|
|
79
77
|
"@tanstack/react-query",
|
|
80
78
|
...GUI_PACKAGES
|
|
81
79
|
];
|
|
80
|
+
|
|
81
|
+
// src/vite.ts
|
|
82
|
+
var DEDUPE = ENGINE_DEDUPE;
|
|
82
83
|
var INCLUDE = [
|
|
83
84
|
"react-native-web",
|
|
84
85
|
"@react-native/normalize-color",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare const LUX_BRAND: {
|
|
2
|
+
readonly lux: "#7000FF";
|
|
3
|
+
readonly zoo: "#6C5EFB";
|
|
4
|
+
readonly hanzo: "#EA580C";
|
|
5
|
+
readonly pars: "#1C3879";
|
|
6
|
+
readonly bootnode: "#3B82F6";
|
|
7
|
+
};
|
|
8
|
+
declare const PARS_GOLD = "#C8A45C";
|
|
9
|
+
type LuxBrand = keyof typeof LUX_BRAND;
|
|
10
|
+
type Org = LuxBrand;
|
|
11
|
+
interface OrgIdentity {
|
|
12
|
+
/** Org id — also the gui child-theme suffix (`dark_lux`, `dark_zoo`, …). */
|
|
13
|
+
readonly org: Org;
|
|
14
|
+
/** Display name for chrome (header, title, sign-in copy). */
|
|
15
|
+
readonly name: string;
|
|
16
|
+
/** Canonical apex domain. */
|
|
17
|
+
readonly domain: string;
|
|
18
|
+
/** IAM/OIDC host. The issuer is `https://` + this. */
|
|
19
|
+
readonly iamDomain: string;
|
|
20
|
+
/** Brand accent hex — the same value the gui child-theme row is built from. */
|
|
21
|
+
readonly accent: string;
|
|
22
|
+
/** Foreground used on top of the accent. */
|
|
23
|
+
readonly accentForeground: string;
|
|
24
|
+
}
|
|
25
|
+
declare const ORGS: Readonly<Record<Org, OrgIdentity>>;
|
|
26
|
+
declare const DEFAULT_ORG: Org;
|
|
27
|
+
interface WhiteLabel extends OrgIdentity {
|
|
28
|
+
/** Hostname the identity was resolved from, port stripped, lowercased. */
|
|
29
|
+
readonly host: string;
|
|
30
|
+
/** App slug taken from the hostname — `mpc.lux.cloud` → `mpc`. */
|
|
31
|
+
readonly app: string;
|
|
32
|
+
/** gui child-theme row to hand GuiProvider — `dark_lux`, `dark_zoo`, … */
|
|
33
|
+
readonly theme: string;
|
|
34
|
+
/** OIDC issuer — `https://lux.id`. */
|
|
35
|
+
readonly issuer: string;
|
|
36
|
+
/** IAM client id, `<org>-<app>` per the fleet naming scheme — `lux-mpc`. */
|
|
37
|
+
readonly clientId: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Resolve the full white-label identity from a Host header value.
|
|
41
|
+
*
|
|
42
|
+
* Pure and total: an unknown or missing host falls back to the Lux row rather
|
|
43
|
+
* than throwing, so a preview URL or a health probe never blanks the UI.
|
|
44
|
+
*
|
|
45
|
+
* resolveWhiteLabel('mpc.lux.network') // org lux, clientId lux-mpc, issuer https://lux.id
|
|
46
|
+
* resolveWhiteLabel('zoo.cloud') // org zoo, clientId zoo-cloud, issuer https://zoolabs.id
|
|
47
|
+
* resolveWhiteLabel('cloud.pars.network') // org pars, clientId pars-app, issuer https://pars.id
|
|
48
|
+
*/
|
|
49
|
+
declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
|
|
50
|
+
/**
|
|
51
|
+
* The current host in a browser, or '' during SSR / prerender.
|
|
52
|
+
* Server code must pass `req.headers.host` to resolveWhiteLabel explicitly —
|
|
53
|
+
* there is no ambient request here, and guessing would bake in a brand.
|
|
54
|
+
*/
|
|
55
|
+
declare function currentHost(): string;
|
|
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
|
+
export { DEFAULT_ORG, LUX_BRAND, type LuxBrand, type Org, type OrgIdentity, PARS_GOLD, type WhiteLabel, currentHost, orgIdentity, ORGS as orgs, resolveWhiteLabel };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare const LUX_BRAND: {
|
|
2
|
+
readonly lux: "#7000FF";
|
|
3
|
+
readonly zoo: "#6C5EFB";
|
|
4
|
+
readonly hanzo: "#EA580C";
|
|
5
|
+
readonly pars: "#1C3879";
|
|
6
|
+
readonly bootnode: "#3B82F6";
|
|
7
|
+
};
|
|
8
|
+
declare const PARS_GOLD = "#C8A45C";
|
|
9
|
+
type LuxBrand = keyof typeof LUX_BRAND;
|
|
10
|
+
type Org = LuxBrand;
|
|
11
|
+
interface OrgIdentity {
|
|
12
|
+
/** Org id — also the gui child-theme suffix (`dark_lux`, `dark_zoo`, …). */
|
|
13
|
+
readonly org: Org;
|
|
14
|
+
/** Display name for chrome (header, title, sign-in copy). */
|
|
15
|
+
readonly name: string;
|
|
16
|
+
/** Canonical apex domain. */
|
|
17
|
+
readonly domain: string;
|
|
18
|
+
/** IAM/OIDC host. The issuer is `https://` + this. */
|
|
19
|
+
readonly iamDomain: string;
|
|
20
|
+
/** Brand accent hex — the same value the gui child-theme row is built from. */
|
|
21
|
+
readonly accent: string;
|
|
22
|
+
/** Foreground used on top of the accent. */
|
|
23
|
+
readonly accentForeground: string;
|
|
24
|
+
}
|
|
25
|
+
declare const ORGS: Readonly<Record<Org, OrgIdentity>>;
|
|
26
|
+
declare const DEFAULT_ORG: Org;
|
|
27
|
+
interface WhiteLabel extends OrgIdentity {
|
|
28
|
+
/** Hostname the identity was resolved from, port stripped, lowercased. */
|
|
29
|
+
readonly host: string;
|
|
30
|
+
/** App slug taken from the hostname — `mpc.lux.cloud` → `mpc`. */
|
|
31
|
+
readonly app: string;
|
|
32
|
+
/** gui child-theme row to hand GuiProvider — `dark_lux`, `dark_zoo`, … */
|
|
33
|
+
readonly theme: string;
|
|
34
|
+
/** OIDC issuer — `https://lux.id`. */
|
|
35
|
+
readonly issuer: string;
|
|
36
|
+
/** IAM client id, `<org>-<app>` per the fleet naming scheme — `lux-mpc`. */
|
|
37
|
+
readonly clientId: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Resolve the full white-label identity from a Host header value.
|
|
41
|
+
*
|
|
42
|
+
* Pure and total: an unknown or missing host falls back to the Lux row rather
|
|
43
|
+
* than throwing, so a preview URL or a health probe never blanks the UI.
|
|
44
|
+
*
|
|
45
|
+
* resolveWhiteLabel('mpc.lux.network') // org lux, clientId lux-mpc, issuer https://lux.id
|
|
46
|
+
* resolveWhiteLabel('zoo.cloud') // org zoo, clientId zoo-cloud, issuer https://zoolabs.id
|
|
47
|
+
* resolveWhiteLabel('cloud.pars.network') // org pars, clientId pars-app, issuer https://pars.id
|
|
48
|
+
*/
|
|
49
|
+
declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
|
|
50
|
+
/**
|
|
51
|
+
* The current host in a browser, or '' during SSR / prerender.
|
|
52
|
+
* Server code must pass `req.headers.host` to resolveWhiteLabel explicitly —
|
|
53
|
+
* there is no ambient request here, and guessing would bake in a brand.
|
|
54
|
+
*/
|
|
55
|
+
declare function currentHost(): string;
|
|
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
|
+
export { DEFAULT_ORG, LUX_BRAND, type LuxBrand, type Org, type OrgIdentity, PARS_GOLD, type WhiteLabel, currentHost, orgIdentity, ORGS as orgs, resolveWhiteLabel };
|