@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/bank.d.cts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _hanzogui_core from '@hanzogui/core';
|
|
3
|
+
import * as _hanzogui_web from '@hanzogui/web';
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
import { GetProps } from '@hanzo/gui';
|
|
6
|
+
|
|
7
|
+
declare const bankColors: {
|
|
8
|
+
readonly bg: "#000000";
|
|
9
|
+
readonly card: "#111111";
|
|
10
|
+
readonly cardBorder: "#222222";
|
|
11
|
+
readonly input: "#1A1A1A";
|
|
12
|
+
readonly inputBorder: "#333333";
|
|
13
|
+
readonly inputFocus: "#555555";
|
|
14
|
+
readonly inputPlaceholder: "#666666";
|
|
15
|
+
readonly text: "#FFFFFF";
|
|
16
|
+
readonly textMuted: "#888888";
|
|
17
|
+
readonly textLabel: "#CCCCCC";
|
|
18
|
+
readonly accent: "#FFFFFF";
|
|
19
|
+
readonly accentPress: "#E0E0E0";
|
|
20
|
+
readonly accentHover: "#F0F0F0";
|
|
21
|
+
readonly error: "#FF4444";
|
|
22
|
+
readonly errorBg: "#1C0A0A";
|
|
23
|
+
readonly errorBorder: "#441111";
|
|
24
|
+
readonly success: "#44FF44";
|
|
25
|
+
readonly successBg: "#0A1C0A";
|
|
26
|
+
readonly successBorder: "#114411";
|
|
27
|
+
readonly divider: "#222222";
|
|
28
|
+
readonly disabled: "#444444";
|
|
29
|
+
};
|
|
30
|
+
declare const BankCard: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
31
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
32
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
33
|
+
type BankCardProps = GetProps<typeof BankCard>;
|
|
34
|
+
declare const BankInput: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
35
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
36
|
+
unstyled?: boolean | undefined;
|
|
37
|
+
invalid?: boolean | undefined;
|
|
38
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
39
|
+
type BankInputProps = GetProps<typeof BankInput> & {
|
|
40
|
+
placeholderTextColor?: string;
|
|
41
|
+
};
|
|
42
|
+
declare const BankButton: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
43
|
+
disabled?: boolean | undefined;
|
|
44
|
+
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
45
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
46
|
+
declare const BankButtonText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
47
|
+
unstyled?: boolean | undefined;
|
|
48
|
+
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
49
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
50
|
+
type BankButtonProps = GetProps<typeof BankButton>;
|
|
51
|
+
declare const BankHeading: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
52
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
53
|
+
unstyled?: boolean | undefined;
|
|
54
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
55
|
+
type BankHeadingProps = GetProps<typeof BankHeading>;
|
|
56
|
+
declare const BankText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
57
|
+
unstyled?: boolean | undefined;
|
|
58
|
+
variant?: "default" | "label" | "link" | "error" | "success" | "muted" | undefined;
|
|
59
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
60
|
+
type BankTextProps = GetProps<typeof BankText>;
|
|
61
|
+
declare function BankField({ label, error, children, }: {
|
|
62
|
+
label?: string;
|
|
63
|
+
error?: string;
|
|
64
|
+
children: React__default.ReactNode;
|
|
65
|
+
}): react_jsx_runtime.JSX.Element;
|
|
66
|
+
declare const BankAlert: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
67
|
+
status?: "error" | "success" | undefined;
|
|
68
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
69
|
+
declare const BankAlertText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
70
|
+
status?: "error" | "success" | undefined;
|
|
71
|
+
unstyled?: boolean | undefined;
|
|
72
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
73
|
+
type BankAlertProps = GetProps<typeof BankAlert>;
|
|
74
|
+
declare const BankPinBox: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
75
|
+
unstyled?: boolean | undefined;
|
|
76
|
+
invalid?: boolean | undefined;
|
|
77
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
78
|
+
type BankPinBoxProps = GetProps<typeof BankPinBox>;
|
|
79
|
+
declare const BankDivider: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
80
|
+
declare const BankPage: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
81
|
+
type BankPageProps = GetProps<typeof BankPage>;
|
|
82
|
+
|
|
83
|
+
export { BankAlert, type BankAlertProps, BankAlertText, BankButton, type BankButtonProps, BankButtonText, BankCard, type BankCardProps, BankDivider, BankField, BankHeading, type BankHeadingProps, BankInput, type BankInputProps, BankPage, type BankPageProps, BankPinBox, type BankPinBoxProps, BankText, type BankTextProps, bankColors };
|
package/dist/bank.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _hanzogui_core from '@hanzogui/core';
|
|
3
|
+
import * as _hanzogui_web from '@hanzogui/web';
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
import { GetProps } from '@hanzo/gui';
|
|
6
|
+
|
|
7
|
+
declare const bankColors: {
|
|
8
|
+
readonly bg: "#000000";
|
|
9
|
+
readonly card: "#111111";
|
|
10
|
+
readonly cardBorder: "#222222";
|
|
11
|
+
readonly input: "#1A1A1A";
|
|
12
|
+
readonly inputBorder: "#333333";
|
|
13
|
+
readonly inputFocus: "#555555";
|
|
14
|
+
readonly inputPlaceholder: "#666666";
|
|
15
|
+
readonly text: "#FFFFFF";
|
|
16
|
+
readonly textMuted: "#888888";
|
|
17
|
+
readonly textLabel: "#CCCCCC";
|
|
18
|
+
readonly accent: "#FFFFFF";
|
|
19
|
+
readonly accentPress: "#E0E0E0";
|
|
20
|
+
readonly accentHover: "#F0F0F0";
|
|
21
|
+
readonly error: "#FF4444";
|
|
22
|
+
readonly errorBg: "#1C0A0A";
|
|
23
|
+
readonly errorBorder: "#441111";
|
|
24
|
+
readonly success: "#44FF44";
|
|
25
|
+
readonly successBg: "#0A1C0A";
|
|
26
|
+
readonly successBorder: "#114411";
|
|
27
|
+
readonly divider: "#222222";
|
|
28
|
+
readonly disabled: "#444444";
|
|
29
|
+
};
|
|
30
|
+
declare const BankCard: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
31
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
32
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
33
|
+
type BankCardProps = GetProps<typeof BankCard>;
|
|
34
|
+
declare const BankInput: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
35
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
36
|
+
unstyled?: boolean | undefined;
|
|
37
|
+
invalid?: boolean | undefined;
|
|
38
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
39
|
+
type BankInputProps = GetProps<typeof BankInput> & {
|
|
40
|
+
placeholderTextColor?: string;
|
|
41
|
+
};
|
|
42
|
+
declare const BankButton: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
43
|
+
disabled?: boolean | undefined;
|
|
44
|
+
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
45
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
46
|
+
declare const BankButtonText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
47
|
+
unstyled?: boolean | undefined;
|
|
48
|
+
variant?: "primary" | "secondary" | "ghost" | undefined;
|
|
49
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
50
|
+
type BankButtonProps = GetProps<typeof BankButton>;
|
|
51
|
+
declare const BankHeading: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
52
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
53
|
+
unstyled?: boolean | undefined;
|
|
54
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
55
|
+
type BankHeadingProps = GetProps<typeof BankHeading>;
|
|
56
|
+
declare const BankText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
57
|
+
unstyled?: boolean | undefined;
|
|
58
|
+
variant?: "default" | "label" | "link" | "error" | "success" | "muted" | undefined;
|
|
59
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
60
|
+
type BankTextProps = GetProps<typeof BankText>;
|
|
61
|
+
declare function BankField({ label, error, children, }: {
|
|
62
|
+
label?: string;
|
|
63
|
+
error?: string;
|
|
64
|
+
children: React__default.ReactNode;
|
|
65
|
+
}): react_jsx_runtime.JSX.Element;
|
|
66
|
+
declare const BankAlert: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {
|
|
67
|
+
status?: "error" | "success" | undefined;
|
|
68
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
69
|
+
declare const BankAlertText: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
70
|
+
status?: "error" | "success" | undefined;
|
|
71
|
+
unstyled?: boolean | undefined;
|
|
72
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
73
|
+
type BankAlertProps = GetProps<typeof BankAlert>;
|
|
74
|
+
declare const BankPinBox: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiTextElement, _hanzogui_core.RNTextNonStyleProps, _hanzogui_web.TextStylePropsBase, {
|
|
75
|
+
unstyled?: boolean | undefined;
|
|
76
|
+
invalid?: boolean | undefined;
|
|
77
|
+
}, _hanzogui_web.StaticConfigPublic>;
|
|
78
|
+
type BankPinBoxProps = GetProps<typeof BankPinBox>;
|
|
79
|
+
declare const BankDivider: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
80
|
+
declare const BankPage: _hanzogui_web.GuiComponent<_hanzogui_web.TamaDefer, _hanzogui_web.GuiElement, _hanzogui_core.RNViewNonStyleProps, _hanzogui_web.StackStyleBase, {}, _hanzogui_web.StaticConfigPublic>;
|
|
81
|
+
type BankPageProps = GetProps<typeof BankPage>;
|
|
82
|
+
|
|
83
|
+
export { BankAlert, type BankAlertProps, BankAlertText, BankButton, type BankButtonProps, BankButtonText, BankCard, type BankCardProps, BankDivider, BankField, BankHeading, type BankHeadingProps, BankInput, type BankInputProps, BankPage, type BankPageProps, BankPinBox, type BankPinBoxProps, BankText, type BankTextProps, bankColors };
|
package/dist/button.cjs
CHANGED
|
@@ -145,11 +145,7 @@ function stripShims(props) {
|
|
|
145
145
|
for (const k of SHIM_PROPS) delete out[k];
|
|
146
146
|
return out;
|
|
147
147
|
}
|
|
148
|
-
var SKELETON_CLASSES =
|
|
149
|
-
"animate-skeleton-shimmer rounded-sm",
|
|
150
|
-
"bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
|
|
151
|
-
"bg-[length:200%_100%]"
|
|
152
|
-
].join(" ");
|
|
148
|
+
var SKELETON_CLASSES = "lux-skeleton rounded-sm";
|
|
153
149
|
var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
|
|
154
150
|
var Skeleton = React2__namespace.forwardRef(
|
|
155
151
|
function Skeleton2(props, ref) {
|
|
@@ -169,7 +165,7 @@ var Skeleton = React2__namespace.forwardRef(
|
|
|
169
165
|
{
|
|
170
166
|
ref,
|
|
171
167
|
"data-loading": true,
|
|
172
|
-
className: cn(SKELETON_CLASSES, "
|
|
168
|
+
className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
|
|
173
169
|
style: mergedStyle,
|
|
174
170
|
...htmlRest,
|
|
175
171
|
children
|
|
@@ -181,7 +177,7 @@ var Skeleton = React2__namespace.forwardRef(
|
|
|
181
177
|
{
|
|
182
178
|
ref,
|
|
183
179
|
"data-loading": true,
|
|
184
|
-
className: cn(SKELETON_CLASSES, children ? "
|
|
180
|
+
className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
|
|
185
181
|
style: mergedStyle,
|
|
186
182
|
...htmlRest,
|
|
187
183
|
children
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const VARIANT_CLASSES: Record<string, string>;
|
|
4
|
+
type ButtonVariant = keyof typeof VARIANT_CLASSES;
|
|
5
|
+
type ButtonSize = '2xs' | 'xs' | 'sm' | 'md';
|
|
6
|
+
interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> {
|
|
7
|
+
readonly variant?: ButtonVariant;
|
|
8
|
+
readonly size?: ButtonSize;
|
|
9
|
+
readonly asChild?: boolean;
|
|
10
|
+
readonly loading?: boolean;
|
|
11
|
+
readonly loadingText?: React.ReactNode;
|
|
12
|
+
readonly loadingSkeleton?: boolean;
|
|
13
|
+
readonly expanded?: boolean;
|
|
14
|
+
readonly selected?: boolean;
|
|
15
|
+
readonly highlighted?: boolean;
|
|
16
|
+
readonly mt?: number | string;
|
|
17
|
+
readonly ml?: number | string;
|
|
18
|
+
readonly mr?: number | string;
|
|
19
|
+
readonly px?: number | string;
|
|
20
|
+
readonly py?: number | string;
|
|
21
|
+
readonly fontWeight?: number | string;
|
|
22
|
+
readonly gap?: number | string;
|
|
23
|
+
readonly flexShrink?: number;
|
|
24
|
+
readonly columnGap?: number | string;
|
|
25
|
+
readonly gridColumn?: number | string;
|
|
26
|
+
readonly gridRow?: string;
|
|
27
|
+
readonly justifySelf?: string;
|
|
28
|
+
readonly alignSelf?: string;
|
|
29
|
+
readonly textStyle?: string;
|
|
30
|
+
readonly h?: string;
|
|
31
|
+
readonly w?: string;
|
|
32
|
+
readonly display?: string;
|
|
33
|
+
readonly borderBottomRightRadius?: number | string;
|
|
34
|
+
readonly borderTopRightRadius?: number | string;
|
|
35
|
+
readonly 'data-call-strategy'?: string;
|
|
36
|
+
}
|
|
37
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
declare function buttonVariants(opts?: {
|
|
39
|
+
variant?: string;
|
|
40
|
+
size?: string;
|
|
41
|
+
}): string;
|
|
42
|
+
interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
}
|
|
44
|
+
declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
interface ButtonGroupRadioProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'onChange'> {
|
|
46
|
+
children: Array<React.ReactElement<ButtonProps>>;
|
|
47
|
+
onChange?: (value: string) => void;
|
|
48
|
+
defaultValue?: string;
|
|
49
|
+
loading?: boolean;
|
|
50
|
+
equalWidth?: boolean;
|
|
51
|
+
variant?: ButtonProps['variant'];
|
|
52
|
+
}
|
|
53
|
+
declare const ButtonGroupRadio: React.ForwardRefExoticComponent<ButtonGroupRadioProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
|
|
55
|
+
export { Button, ButtonGroup, type ButtonGroupProps, ButtonGroupRadio, type ButtonGroupRadioProps, type ButtonProps, buttonVariants };
|
package/dist/button.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const VARIANT_CLASSES: Record<string, string>;
|
|
4
|
+
type ButtonVariant = keyof typeof VARIANT_CLASSES;
|
|
5
|
+
type ButtonSize = '2xs' | 'xs' | 'sm' | 'md';
|
|
6
|
+
interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> {
|
|
7
|
+
readonly variant?: ButtonVariant;
|
|
8
|
+
readonly size?: ButtonSize;
|
|
9
|
+
readonly asChild?: boolean;
|
|
10
|
+
readonly loading?: boolean;
|
|
11
|
+
readonly loadingText?: React.ReactNode;
|
|
12
|
+
readonly loadingSkeleton?: boolean;
|
|
13
|
+
readonly expanded?: boolean;
|
|
14
|
+
readonly selected?: boolean;
|
|
15
|
+
readonly highlighted?: boolean;
|
|
16
|
+
readonly mt?: number | string;
|
|
17
|
+
readonly ml?: number | string;
|
|
18
|
+
readonly mr?: number | string;
|
|
19
|
+
readonly px?: number | string;
|
|
20
|
+
readonly py?: number | string;
|
|
21
|
+
readonly fontWeight?: number | string;
|
|
22
|
+
readonly gap?: number | string;
|
|
23
|
+
readonly flexShrink?: number;
|
|
24
|
+
readonly columnGap?: number | string;
|
|
25
|
+
readonly gridColumn?: number | string;
|
|
26
|
+
readonly gridRow?: string;
|
|
27
|
+
readonly justifySelf?: string;
|
|
28
|
+
readonly alignSelf?: string;
|
|
29
|
+
readonly textStyle?: string;
|
|
30
|
+
readonly h?: string;
|
|
31
|
+
readonly w?: string;
|
|
32
|
+
readonly display?: string;
|
|
33
|
+
readonly borderBottomRightRadius?: number | string;
|
|
34
|
+
readonly borderTopRightRadius?: number | string;
|
|
35
|
+
readonly 'data-call-strategy'?: string;
|
|
36
|
+
}
|
|
37
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
declare function buttonVariants(opts?: {
|
|
39
|
+
variant?: string;
|
|
40
|
+
size?: string;
|
|
41
|
+
}): string;
|
|
42
|
+
interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
}
|
|
44
|
+
declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
interface ButtonGroupRadioProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'onChange'> {
|
|
46
|
+
children: Array<React.ReactElement<ButtonProps>>;
|
|
47
|
+
onChange?: (value: string) => void;
|
|
48
|
+
defaultValue?: string;
|
|
49
|
+
loading?: boolean;
|
|
50
|
+
equalWidth?: boolean;
|
|
51
|
+
variant?: ButtonProps['variant'];
|
|
52
|
+
}
|
|
53
|
+
declare const ButtonGroupRadio: React.ForwardRefExoticComponent<ButtonGroupRadioProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
|
|
55
|
+
export { Button, ButtonGroup, type ButtonGroupProps, ButtonGroupRadio, type ButtonGroupRadioProps, type ButtonProps, buttonVariants };
|
package/dist/button.js
CHANGED
|
@@ -123,11 +123,7 @@ function stripShims(props) {
|
|
|
123
123
|
for (const k of SHIM_PROPS) delete out[k];
|
|
124
124
|
return out;
|
|
125
125
|
}
|
|
126
|
-
var SKELETON_CLASSES =
|
|
127
|
-
"animate-skeleton-shimmer rounded-sm",
|
|
128
|
-
"bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
|
|
129
|
-
"bg-[length:200%_100%]"
|
|
130
|
-
].join(" ");
|
|
126
|
+
var SKELETON_CLASSES = "lux-skeleton rounded-sm";
|
|
131
127
|
var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
|
|
132
128
|
var Skeleton = React2.forwardRef(
|
|
133
129
|
function Skeleton2(props, ref) {
|
|
@@ -147,7 +143,7 @@ var Skeleton = React2.forwardRef(
|
|
|
147
143
|
{
|
|
148
144
|
ref,
|
|
149
145
|
"data-loading": true,
|
|
150
|
-
className: cn(SKELETON_CLASSES, "
|
|
146
|
+
className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
|
|
151
147
|
style: mergedStyle,
|
|
152
148
|
...htmlRest,
|
|
153
149
|
children
|
|
@@ -159,7 +155,7 @@ var Skeleton = React2.forwardRef(
|
|
|
159
155
|
{
|
|
160
156
|
ref,
|
|
161
157
|
"data-loading": true,
|
|
162
|
-
className: cn(SKELETON_CLASSES, children ? "
|
|
158
|
+
className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
|
|
163
159
|
style: mergedStyle,
|
|
164
160
|
...htmlRest,
|
|
165
161
|
children
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** Tri-state, as the Chakra/Radix contract consumers already code against. */
|
|
4
|
+
type CheckedState = boolean | 'indeterminate';
|
|
5
|
+
interface CheckboxGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
value?: Array<string>;
|
|
7
|
+
defaultValue?: Array<string>;
|
|
8
|
+
onValueChange?: (value: Array<string>) => void;
|
|
9
|
+
orientation?: 'vertical' | 'horizontal';
|
|
10
|
+
name?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
18
|
+
rootRef?: React.Ref<HTMLLabelElement>;
|
|
19
|
+
checked?: boolean | 'indeterminate';
|
|
20
|
+
defaultChecked?: boolean;
|
|
21
|
+
onCheckedChange?: (checked: CheckedState) => void;
|
|
22
|
+
onChange?: React.FormEventHandler<HTMLLabelElement>;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
value?: string;
|
|
26
|
+
size?: 'sm' | 'md';
|
|
27
|
+
name?: string;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
|
|
32
|
+
export { Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** Tri-state, as the Chakra/Radix contract consumers already code against. */
|
|
4
|
+
type CheckedState = boolean | 'indeterminate';
|
|
5
|
+
interface CheckboxGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
value?: Array<string>;
|
|
7
|
+
defaultValue?: Array<string>;
|
|
8
|
+
onValueChange?: (value: Array<string>) => void;
|
|
9
|
+
orientation?: 'vertical' | 'horizontal';
|
|
10
|
+
name?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
18
|
+
rootRef?: React.Ref<HTMLLabelElement>;
|
|
19
|
+
checked?: boolean | 'indeterminate';
|
|
20
|
+
defaultChecked?: boolean;
|
|
21
|
+
onCheckedChange?: (checked: CheckedState) => void;
|
|
22
|
+
onChange?: React.FormEventHandler<HTMLLabelElement>;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
value?: string;
|
|
26
|
+
size?: 'sm' | 'md';
|
|
27
|
+
name?: string;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
|
|
32
|
+
export { Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IdentityStatus } from './identity.cjs';
|
|
3
|
+
import './iam.cjs';
|
|
4
|
+
import './white-label.cjs';
|
|
5
|
+
|
|
6
|
+
/** One row in a switcher. */
|
|
7
|
+
interface ChromeItem {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
/** Secondary text, right-aligned — a plan, a count, a shortcut. */
|
|
11
|
+
readonly hint?: string;
|
|
12
|
+
readonly icon?: React.ReactNode;
|
|
13
|
+
readonly selected?: boolean;
|
|
14
|
+
readonly danger?: boolean;
|
|
15
|
+
readonly href?: string;
|
|
16
|
+
readonly onSelect?: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** 1–2 letter monogram — the honest fallback when there is no logo. */
|
|
19
|
+
declare function initials(label: string): string;
|
|
20
|
+
interface SwitcherProps {
|
|
21
|
+
/** Panel heading, drawer title and the trigger's accessible name. */
|
|
22
|
+
readonly title: string;
|
|
23
|
+
/** Trigger label. */
|
|
24
|
+
readonly label: string;
|
|
25
|
+
/** Trigger icon — usually a logo or monogram. */
|
|
26
|
+
readonly icon?: React.ReactNode;
|
|
27
|
+
readonly items: ReadonlyArray<ChromeItem>;
|
|
28
|
+
/** Rows below a separator — create, settings, sign out. */
|
|
29
|
+
readonly footer?: ReadonlyArray<ChromeItem>;
|
|
30
|
+
/** Drives the honest empty states. Defaults to 'ready'. */
|
|
31
|
+
readonly status?: IdentityStatus;
|
|
32
|
+
/** Shown when signed in and the list really is empty. */
|
|
33
|
+
readonly empty?: string;
|
|
34
|
+
/** Shown, as a sign-in action, when nobody is signed in. */
|
|
35
|
+
readonly onSignIn?: () => void;
|
|
36
|
+
readonly signInLabel?: string;
|
|
37
|
+
readonly error?: string | null;
|
|
38
|
+
readonly align?: 'start' | 'end';
|
|
39
|
+
readonly testId?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The ONE switcher. A trigger plus rows, presented as a phone sheet or an
|
|
43
|
+
* anchored menu depending on the viewport — never both, never hand-rolled.
|
|
44
|
+
*/
|
|
45
|
+
declare const Switcher: ({ title, label, icon, items, footer, status, empty, onSignIn, signInLabel, error, align, testId, }: SwitcherProps) => React.ReactElement;
|
|
46
|
+
/** Which organization is this surface acting as. */
|
|
47
|
+
declare const OrgSwitcher: () => React.ReactElement;
|
|
48
|
+
/** Which project inside that organization. */
|
|
49
|
+
declare const ProjectSwitcher: () => React.ReactElement | null;
|
|
50
|
+
interface UserMenuProps {
|
|
51
|
+
/** Extra rows above Sign out — Profile, API keys, whatever the surface has. */
|
|
52
|
+
readonly items?: ReadonlyArray<ChromeItem>;
|
|
53
|
+
}
|
|
54
|
+
/** Who is signed in, and how to stop being signed in. */
|
|
55
|
+
declare const UserMenu: ({ items }: UserMenuProps) => React.ReactElement;
|
|
56
|
+
interface SettingsMenuProps {
|
|
57
|
+
/** The surface's own settings rows. */
|
|
58
|
+
readonly items?: ReadonlyArray<ChromeItem>;
|
|
59
|
+
/** Where "All settings" goes. */
|
|
60
|
+
readonly href?: string;
|
|
61
|
+
}
|
|
62
|
+
/** The surface's settings, in the one place a user looks for them. */
|
|
63
|
+
declare const SettingsMenu: ({ items, href }: SettingsMenuProps) => React.ReactElement;
|
|
64
|
+
interface NavLink {
|
|
65
|
+
readonly href: string;
|
|
66
|
+
readonly label: string;
|
|
67
|
+
readonly active?: boolean;
|
|
68
|
+
}
|
|
69
|
+
interface AppNavProps {
|
|
70
|
+
/** Brand slot — defaults to the host-resolved org name. */
|
|
71
|
+
readonly brand?: React.ReactNode;
|
|
72
|
+
/** Where the brand links to. */
|
|
73
|
+
readonly home?: string;
|
|
74
|
+
readonly links?: ReadonlyArray<NavLink>;
|
|
75
|
+
/** Show the org switcher. Default true. */
|
|
76
|
+
readonly org?: boolean;
|
|
77
|
+
/** Show the project switcher. Default false — most surfaces have no projects. */
|
|
78
|
+
readonly project?: boolean;
|
|
79
|
+
/** Rows for the settings menu; omit the prop to hide the menu. */
|
|
80
|
+
readonly settings?: ReadonlyArray<ChromeItem>;
|
|
81
|
+
/** Extra rows in the user menu. */
|
|
82
|
+
readonly userItems?: ReadonlyArray<ChromeItem>;
|
|
83
|
+
/** Free slot between the links and the right-hand cluster. */
|
|
84
|
+
readonly children?: React.ReactNode;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The ONE nav. Brand, org, project, links, settings, user — in that order, at
|
|
88
|
+
* every surface. On a phone the links collapse into the same sheet the
|
|
89
|
+
* switchers use, so there is no second mobile menu to maintain.
|
|
90
|
+
*/
|
|
91
|
+
declare const AppNav: ({ brand, home, links, org, project, settings, userItems, children, }: AppNavProps) => React.ReactElement;
|
|
92
|
+
|
|
93
|
+
export { AppNav, type AppNavProps, type ChromeItem, type NavLink, OrgSwitcher, ProjectSwitcher, SettingsMenu, type SettingsMenuProps, Switcher, type SwitcherProps, UserMenu, type UserMenuProps, initials };
|
package/dist/chrome.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IdentityStatus } from './identity.js';
|
|
3
|
+
import './iam.js';
|
|
4
|
+
import './white-label.js';
|
|
5
|
+
|
|
6
|
+
/** One row in a switcher. */
|
|
7
|
+
interface ChromeItem {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
/** Secondary text, right-aligned — a plan, a count, a shortcut. */
|
|
11
|
+
readonly hint?: string;
|
|
12
|
+
readonly icon?: React.ReactNode;
|
|
13
|
+
readonly selected?: boolean;
|
|
14
|
+
readonly danger?: boolean;
|
|
15
|
+
readonly href?: string;
|
|
16
|
+
readonly onSelect?: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** 1–2 letter monogram — the honest fallback when there is no logo. */
|
|
19
|
+
declare function initials(label: string): string;
|
|
20
|
+
interface SwitcherProps {
|
|
21
|
+
/** Panel heading, drawer title and the trigger's accessible name. */
|
|
22
|
+
readonly title: string;
|
|
23
|
+
/** Trigger label. */
|
|
24
|
+
readonly label: string;
|
|
25
|
+
/** Trigger icon — usually a logo or monogram. */
|
|
26
|
+
readonly icon?: React.ReactNode;
|
|
27
|
+
readonly items: ReadonlyArray<ChromeItem>;
|
|
28
|
+
/** Rows below a separator — create, settings, sign out. */
|
|
29
|
+
readonly footer?: ReadonlyArray<ChromeItem>;
|
|
30
|
+
/** Drives the honest empty states. Defaults to 'ready'. */
|
|
31
|
+
readonly status?: IdentityStatus;
|
|
32
|
+
/** Shown when signed in and the list really is empty. */
|
|
33
|
+
readonly empty?: string;
|
|
34
|
+
/** Shown, as a sign-in action, when nobody is signed in. */
|
|
35
|
+
readonly onSignIn?: () => void;
|
|
36
|
+
readonly signInLabel?: string;
|
|
37
|
+
readonly error?: string | null;
|
|
38
|
+
readonly align?: 'start' | 'end';
|
|
39
|
+
readonly testId?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The ONE switcher. A trigger plus rows, presented as a phone sheet or an
|
|
43
|
+
* anchored menu depending on the viewport — never both, never hand-rolled.
|
|
44
|
+
*/
|
|
45
|
+
declare const Switcher: ({ title, label, icon, items, footer, status, empty, onSignIn, signInLabel, error, align, testId, }: SwitcherProps) => React.ReactElement;
|
|
46
|
+
/** Which organization is this surface acting as. */
|
|
47
|
+
declare const OrgSwitcher: () => React.ReactElement;
|
|
48
|
+
/** Which project inside that organization. */
|
|
49
|
+
declare const ProjectSwitcher: () => React.ReactElement | null;
|
|
50
|
+
interface UserMenuProps {
|
|
51
|
+
/** Extra rows above Sign out — Profile, API keys, whatever the surface has. */
|
|
52
|
+
readonly items?: ReadonlyArray<ChromeItem>;
|
|
53
|
+
}
|
|
54
|
+
/** Who is signed in, and how to stop being signed in. */
|
|
55
|
+
declare const UserMenu: ({ items }: UserMenuProps) => React.ReactElement;
|
|
56
|
+
interface SettingsMenuProps {
|
|
57
|
+
/** The surface's own settings rows. */
|
|
58
|
+
readonly items?: ReadonlyArray<ChromeItem>;
|
|
59
|
+
/** Where "All settings" goes. */
|
|
60
|
+
readonly href?: string;
|
|
61
|
+
}
|
|
62
|
+
/** The surface's settings, in the one place a user looks for them. */
|
|
63
|
+
declare const SettingsMenu: ({ items, href }: SettingsMenuProps) => React.ReactElement;
|
|
64
|
+
interface NavLink {
|
|
65
|
+
readonly href: string;
|
|
66
|
+
readonly label: string;
|
|
67
|
+
readonly active?: boolean;
|
|
68
|
+
}
|
|
69
|
+
interface AppNavProps {
|
|
70
|
+
/** Brand slot — defaults to the host-resolved org name. */
|
|
71
|
+
readonly brand?: React.ReactNode;
|
|
72
|
+
/** Where the brand links to. */
|
|
73
|
+
readonly home?: string;
|
|
74
|
+
readonly links?: ReadonlyArray<NavLink>;
|
|
75
|
+
/** Show the org switcher. Default true. */
|
|
76
|
+
readonly org?: boolean;
|
|
77
|
+
/** Show the project switcher. Default false — most surfaces have no projects. */
|
|
78
|
+
readonly project?: boolean;
|
|
79
|
+
/** Rows for the settings menu; omit the prop to hide the menu. */
|
|
80
|
+
readonly settings?: ReadonlyArray<ChromeItem>;
|
|
81
|
+
/** Extra rows in the user menu. */
|
|
82
|
+
readonly userItems?: ReadonlyArray<ChromeItem>;
|
|
83
|
+
/** Free slot between the links and the right-hand cluster. */
|
|
84
|
+
readonly children?: React.ReactNode;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The ONE nav. Brand, org, project, links, settings, user — in that order, at
|
|
88
|
+
* every surface. On a phone the links collapse into the same sheet the
|
|
89
|
+
* switchers use, so there is no second mobile menu to maintain.
|
|
90
|
+
*/
|
|
91
|
+
declare const AppNav: ({ brand, home, links, org, project, settings, userItems, children, }: AppNavProps) => React.ReactElement;
|
|
92
|
+
|
|
93
|
+
export { AppNav, type AppNavProps, type ChromeItem, type NavLink, OrgSwitcher, ProjectSwitcher, SettingsMenu, type SettingsMenuProps, Switcher, type SwitcherProps, UserMenu, type UserMenuProps, initials };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface CloseButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> {
|
|
4
|
+
readonly variant?: 'plain';
|
|
5
|
+
readonly size?: 'md';
|
|
6
|
+
}
|
|
7
|
+
declare const CloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
|
|
9
|
+
export { CloseButton, type CloseButtonProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface CloseButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> {
|
|
4
|
+
readonly variant?: 'plain';
|
|
5
|
+
readonly size?: 'md';
|
|
6
|
+
}
|
|
7
|
+
declare const CloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
|
|
9
|
+
export { CloseButton, type CloseButtonProps };
|
package/dist/collapsible.cjs
CHANGED
|
@@ -146,11 +146,7 @@ function stripShims(props) {
|
|
|
146
146
|
for (const k of SHIM_PROPS) delete out[k];
|
|
147
147
|
return out;
|
|
148
148
|
}
|
|
149
|
-
var SKELETON_CLASSES =
|
|
150
|
-
"animate-skeleton-shimmer rounded-sm",
|
|
151
|
-
"bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
|
|
152
|
-
"bg-[length:200%_100%]"
|
|
153
|
-
].join(" ");
|
|
149
|
+
var SKELETON_CLASSES = "lux-skeleton rounded-sm";
|
|
154
150
|
var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
|
|
155
151
|
var Skeleton = React3__namespace.forwardRef(
|
|
156
152
|
function Skeleton2(props, ref) {
|
|
@@ -170,7 +166,7 @@ var Skeleton = React3__namespace.forwardRef(
|
|
|
170
166
|
{
|
|
171
167
|
ref,
|
|
172
168
|
"data-loading": true,
|
|
173
|
-
className: cn(SKELETON_CLASSES, "
|
|
169
|
+
className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
|
|
174
170
|
style: mergedStyle,
|
|
175
171
|
...htmlRest,
|
|
176
172
|
children
|
|
@@ -182,7 +178,7 @@ var Skeleton = React3__namespace.forwardRef(
|
|
|
182
178
|
{
|
|
183
179
|
ref,
|
|
184
180
|
"data-loading": true,
|
|
185
|
-
className: cn(SKELETON_CLASSES, children ? "
|
|
181
|
+
className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
|
|
186
182
|
style: mergedStyle,
|
|
187
183
|
...htmlRest,
|
|
188
184
|
children
|