@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.
Files changed (159) hide show
  1. package/dist/accordion.d.cts +74 -0
  2. package/dist/accordion.d.ts +74 -0
  3. package/dist/alert.cjs +3 -7
  4. package/dist/alert.d.cts +30 -0
  5. package/dist/alert.d.ts +30 -0
  6. package/dist/alert.js +3 -7
  7. package/dist/auth.cjs +481 -0
  8. package/dist/auth.d.cts +80 -0
  9. package/dist/auth.d.ts +80 -0
  10. package/dist/auth.js +456 -0
  11. package/dist/avatar.d.cts +25 -0
  12. package/dist/avatar.d.ts +25 -0
  13. package/dist/badge.cjs +4 -8
  14. package/dist/badge.d.cts +19 -0
  15. package/dist/badge.d.ts +19 -0
  16. package/dist/badge.js +4 -8
  17. package/dist/bank.d.cts +83 -0
  18. package/dist/bank.d.ts +83 -0
  19. package/dist/button.cjs +3 -7
  20. package/dist/button.d.cts +55 -0
  21. package/dist/button.d.ts +55 -0
  22. package/dist/button.js +3 -7
  23. package/dist/checkbox.d.cts +32 -0
  24. package/dist/checkbox.d.ts +32 -0
  25. package/dist/chrome.d.cts +93 -0
  26. package/dist/chrome.d.ts +93 -0
  27. package/dist/close-button.d.cts +9 -0
  28. package/dist/close-button.d.ts +9 -0
  29. package/dist/collapsible.cjs +3 -7
  30. package/dist/collapsible.d.cts +23 -0
  31. package/dist/collapsible.d.ts +23 -0
  32. package/dist/collapsible.js +3 -7
  33. package/dist/color-mode.d.cts +25 -0
  34. package/dist/color-mode.d.ts +25 -0
  35. package/dist/dialog.d.cts +118 -0
  36. package/dist/dialog.d.ts +118 -0
  37. package/dist/drawer.d.cts +36 -0
  38. package/dist/drawer.d.ts +36 -0
  39. package/dist/empty-state.d.cts +13 -0
  40. package/dist/empty-state.d.ts +13 -0
  41. package/dist/expiration-selector.d.cts +16 -0
  42. package/dist/expiration-selector.d.ts +16 -0
  43. package/dist/field.d.cts +24 -0
  44. package/dist/field.d.ts +24 -0
  45. package/dist/greeks-display.d.cts +14 -0
  46. package/dist/greeks-display.d.ts +14 -0
  47. package/dist/gui.d.cts +2 -0
  48. package/dist/gui.d.ts +2 -0
  49. package/dist/heading.d.cts +10 -0
  50. package/dist/heading.d.ts +10 -0
  51. package/dist/iam.d.cts +65 -0
  52. package/dist/iam.d.ts +65 -0
  53. package/dist/icon-button.cjs +3 -7
  54. package/dist/icon-button.d.cts +33 -0
  55. package/dist/icon-button.d.ts +33 -0
  56. package/dist/icon-button.js +3 -7
  57. package/dist/icons.cjs +0 -1
  58. package/dist/icons.d.cts +1 -0
  59. package/dist/icons.d.ts +1 -0
  60. package/dist/icons.js +0 -1
  61. package/dist/identity.d.cts +64 -0
  62. package/dist/identity.d.ts +64 -0
  63. package/dist/image.cjs +3 -7
  64. package/dist/image.d.cts +57 -0
  65. package/dist/image.d.ts +57 -0
  66. package/dist/image.js +3 -7
  67. package/dist/index.cjs +9 -8
  68. package/dist/index.d.cts +64 -0
  69. package/dist/index.d.ts +64 -0
  70. package/dist/index.js +9 -9
  71. package/dist/input-group.d.cts +17 -0
  72. package/dist/input-group.d.ts +17 -0
  73. package/dist/input.d.cts +17 -0
  74. package/dist/input.d.ts +17 -0
  75. package/dist/link.cjs +3 -7
  76. package/dist/link.d.cts +37 -0
  77. package/dist/link.d.ts +37 -0
  78. package/dist/link.js +3 -7
  79. package/dist/lux.config.d.cts +433 -0
  80. package/dist/lux.config.d.ts +433 -0
  81. package/dist/menu.d.cts +84 -0
  82. package/dist/menu.d.ts +84 -0
  83. package/dist/next.cjs +11 -1
  84. package/dist/next.d.cts +32 -0
  85. package/dist/next.d.ts +32 -0
  86. package/dist/next.js +11 -1
  87. package/dist/option-chain.d.cts +37 -0
  88. package/dist/option-chain.d.ts +37 -0
  89. package/dist/option-position.d.cts +29 -0
  90. package/dist/option-position.d.ts +29 -0
  91. package/dist/pin-input.d.cts +25 -0
  92. package/dist/pin-input.d.ts +25 -0
  93. package/dist/pnl-diagram.d.cts +11 -0
  94. package/dist/pnl-diagram.d.ts +11 -0
  95. package/dist/popover.d.cts +73 -0
  96. package/dist/popover.d.ts +73 -0
  97. package/dist/progress-circle.d.cts +47 -0
  98. package/dist/progress-circle.d.ts +47 -0
  99. package/dist/progress.d.cts +28 -0
  100. package/dist/progress.d.ts +28 -0
  101. package/dist/provider.d.cts +25 -0
  102. package/dist/provider.d.ts +25 -0
  103. package/dist/radio.d.cts +53 -0
  104. package/dist/radio.d.ts +53 -0
  105. package/dist/rating.d.cts +14 -0
  106. package/dist/rating.d.ts +14 -0
  107. package/dist/select.cjs +3 -7
  108. package/dist/select.d.cts +130 -0
  109. package/dist/select.d.ts +130 -0
  110. package/dist/select.js +3 -7
  111. package/dist/separator.d.cts +13 -0
  112. package/dist/separator.d.ts +13 -0
  113. package/dist/skeleton.cjs +8 -7
  114. package/dist/skeleton.d.cts +76 -0
  115. package/dist/skeleton.d.ts +76 -0
  116. package/dist/skeleton.js +8 -8
  117. package/dist/slider.d.cts +24 -0
  118. package/dist/slider.d.ts +24 -0
  119. package/dist/strategy-builder.d.cts +26 -0
  120. package/dist/strategy-builder.d.ts +26 -0
  121. package/dist/switch.d.cts +27 -0
  122. package/dist/switch.d.ts +27 -0
  123. package/dist/table.cjs +3 -7
  124. package/dist/table.d.cts +107 -0
  125. package/dist/table.d.ts +107 -0
  126. package/dist/table.js +3 -7
  127. package/dist/tabs.d.cts +78 -0
  128. package/dist/tabs.d.ts +78 -0
  129. package/dist/tag.cjs +4 -8
  130. package/dist/tag.d.cts +21 -0
  131. package/dist/tag.d.ts +21 -0
  132. package/dist/tag.js +4 -8
  133. package/dist/textarea.d.cts +13 -0
  134. package/dist/textarea.d.ts +13 -0
  135. package/dist/toaster.d.cts +29 -0
  136. package/dist/toaster.d.ts +29 -0
  137. package/dist/tooltip.cjs +1 -1
  138. package/dist/tooltip.d.cts +38 -0
  139. package/dist/tooltip.d.ts +38 -0
  140. package/dist/tooltip.js +1 -1
  141. package/dist/use-narrow.d.cts +12 -0
  142. package/dist/use-narrow.d.ts +12 -0
  143. package/dist/utils.d.cts +5 -0
  144. package/dist/utils.d.ts +5 -0
  145. package/dist/vite.cjs +4 -3
  146. package/dist/vite.d.cts +29 -0
  147. package/dist/vite.d.ts +29 -0
  148. package/dist/vite.js +4 -3
  149. package/dist/white-label.d.cts +59 -0
  150. package/dist/white-label.d.ts +59 -0
  151. package/package.json +12 -2
  152. package/src/auth.tsx +198 -0
  153. package/src/engine.ts +24 -3
  154. package/src/index.ts +1 -1
  155. package/src/next.ts +10 -0
  156. package/src/skeleton.tsx +36 -7
  157. package/src/tooltip.tsx +13 -5
  158. package/src/vite.ts +4 -9
  159. package/tokens.css +828 -317
@@ -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, "text-transparent [&_*]:invisible", cls),
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 ? "text-transparent [&_*]:invisible" : "min-h-5", cls),
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 };
@@ -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, "text-transparent [&_*]:invisible", cls),
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 ? "text-transparent [&_*]:invisible" : "min-h-5", cls),
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 };
@@ -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 };
@@ -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, "text-transparent [&_*]:invisible", cls),
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 ? "text-transparent [&_*]:invisible" : "min-h-5", cls),
181
+ className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
186
182
  style: mergedStyle,
187
183
  ...htmlRest,
188
184
  children