@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,53 @@
1
+ import * as React from 'react';
2
+
3
+ declare const SIZE_CLASSES: {
4
+ readonly xs: {
5
+ readonly root: "gap-1.5";
6
+ readonly control: "h-3 w-3";
7
+ readonly indicator: "h-1.5 w-1.5";
8
+ readonly label: "text-xs";
9
+ };
10
+ readonly sm: {
11
+ readonly root: "gap-1.5";
12
+ readonly control: "h-3.5 w-3.5";
13
+ readonly indicator: "h-1.5 w-1.5";
14
+ readonly label: "text-xs";
15
+ };
16
+ readonly md: {
17
+ readonly root: "gap-2";
18
+ readonly control: "h-4 w-4";
19
+ readonly indicator: "h-2 w-2";
20
+ readonly label: "text-sm";
21
+ };
22
+ readonly lg: {
23
+ readonly root: "gap-2.5";
24
+ readonly control: "h-5 w-5";
25
+ readonly indicator: "h-2.5 w-2.5";
26
+ readonly label: "text-base";
27
+ };
28
+ };
29
+ type RadioSize = keyof typeof SIZE_CLASSES;
30
+ interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir'> {
31
+ name?: string;
32
+ required?: boolean;
33
+ disabled?: boolean;
34
+ readOnly?: boolean;
35
+ orientation?: 'horizontal' | 'vertical';
36
+ loop?: boolean;
37
+ defaultValue?: string;
38
+ value?: string | null;
39
+ onValueChange?: (details: {
40
+ value: string | null;
41
+ }) => void;
42
+ size?: RadioSize;
43
+ }
44
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
45
+ interface RadioProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
46
+ rootRef?: React.Ref<HTMLLabelElement>;
47
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
48
+ value: string;
49
+ disabled?: boolean;
50
+ }
51
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
52
+
53
+ export { Radio, RadioGroup, type RadioGroupProps, type RadioProps };
@@ -0,0 +1,53 @@
1
+ import * as React from 'react';
2
+
3
+ declare const SIZE_CLASSES: {
4
+ readonly xs: {
5
+ readonly root: "gap-1.5";
6
+ readonly control: "h-3 w-3";
7
+ readonly indicator: "h-1.5 w-1.5";
8
+ readonly label: "text-xs";
9
+ };
10
+ readonly sm: {
11
+ readonly root: "gap-1.5";
12
+ readonly control: "h-3.5 w-3.5";
13
+ readonly indicator: "h-1.5 w-1.5";
14
+ readonly label: "text-xs";
15
+ };
16
+ readonly md: {
17
+ readonly root: "gap-2";
18
+ readonly control: "h-4 w-4";
19
+ readonly indicator: "h-2 w-2";
20
+ readonly label: "text-sm";
21
+ };
22
+ readonly lg: {
23
+ readonly root: "gap-2.5";
24
+ readonly control: "h-5 w-5";
25
+ readonly indicator: "h-2.5 w-2.5";
26
+ readonly label: "text-base";
27
+ };
28
+ };
29
+ type RadioSize = keyof typeof SIZE_CLASSES;
30
+ interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir'> {
31
+ name?: string;
32
+ required?: boolean;
33
+ disabled?: boolean;
34
+ readOnly?: boolean;
35
+ orientation?: 'horizontal' | 'vertical';
36
+ loop?: boolean;
37
+ defaultValue?: string;
38
+ value?: string | null;
39
+ onValueChange?: (details: {
40
+ value: string | null;
41
+ }) => void;
42
+ size?: RadioSize;
43
+ }
44
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
45
+ interface RadioProps extends Omit<React.ComponentPropsWithoutRef<'label'>, 'onChange'> {
46
+ rootRef?: React.Ref<HTMLLabelElement>;
47
+ inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
48
+ value: string;
49
+ disabled?: boolean;
50
+ }
51
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
52
+
53
+ export { Radio, RadioGroup, type RadioGroupProps, type RadioProps };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
4
+ count?: number;
5
+ label?: string | Array<string>;
6
+ defaultValue?: number;
7
+ onValueChange?: ({ value }: {
8
+ value: number;
9
+ }) => void;
10
+ readOnly?: boolean;
11
+ }
12
+ declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { Rating, type RatingProps };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ interface RatingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
4
+ count?: number;
5
+ label?: string | Array<string>;
6
+ defaultValue?: number;
7
+ onValueChange?: ({ value }: {
8
+ value: number;
9
+ }) => void;
10
+ readOnly?: boolean;
11
+ }
12
+ declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { Rating, type RatingProps };
package/dist/select.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 = React2__namespace.forwardRef(
156
152
  function Skeleton2(props, ref) {
@@ -170,7 +166,7 @@ var Skeleton = React2__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 = React2__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
@@ -0,0 +1,130 @@
1
+ import * as RadixSelect from '@radix-ui/react-select';
2
+ import * as React from 'react';
3
+
4
+ interface ListCollection<T> {
5
+ items: Array<T>;
6
+ }
7
+ declare function createListCollection<T>(config: {
8
+ items: Array<T>;
9
+ }): ListCollection<T>;
10
+ type ViewMode = 'default' | 'compact';
11
+ interface SelectOption<Value extends string = string> {
12
+ label: string;
13
+ renderLabel?: (place: 'item' | 'value-text') => React.ReactNode;
14
+ value: Value;
15
+ icon?: React.ReactNode;
16
+ afterElement?: React.ReactNode;
17
+ }
18
+ interface SelectRootProps {
19
+ children?: React.ReactNode;
20
+ collection?: ListCollection<SelectOption>;
21
+ defaultValue?: Array<string>;
22
+ value?: Array<string>;
23
+ onValueChange?: (details: {
24
+ value: Array<string>;
25
+ items: Array<SelectOption>;
26
+ }) => void;
27
+ onInteractOutside?: () => void;
28
+ name?: string;
29
+ disabled?: boolean;
30
+ readOnly?: boolean;
31
+ required?: boolean;
32
+ invalid?: boolean;
33
+ size?: 'sm' | 'lg';
34
+ variant?: string;
35
+ open?: boolean;
36
+ defaultOpen?: boolean;
37
+ onOpenChange?: (open: boolean) => void;
38
+ positioning?: {
39
+ sameWidth?: boolean;
40
+ offset?: {
41
+ mainAxis?: number;
42
+ crossAxis?: number;
43
+ };
44
+ };
45
+ lazyMount?: boolean;
46
+ unmountOnExit?: boolean;
47
+ asChild?: boolean;
48
+ className?: string;
49
+ style?: React.CSSProperties;
50
+ w?: string | Record<string, string>;
51
+ maxW?: string | Record<string, string>;
52
+ minW?: string | Record<string, string>;
53
+ hideFrom?: string;
54
+ }
55
+ declare const SelectRoot: React.ForwardRefExoticComponent<SelectRootProps & React.RefAttributes<HTMLDivElement>>;
56
+ interface SelectControlProps {
57
+ children?: React.ReactNode;
58
+ noIndicator?: boolean;
59
+ triggerProps?: React.ComponentPropsWithoutRef<typeof RadixSelect.Trigger> & {
60
+ asChild?: boolean;
61
+ px?: string | number;
62
+ className?: string;
63
+ };
64
+ loading?: boolean;
65
+ defaultValue?: Array<string>;
66
+ className?: string;
67
+ style?: React.CSSProperties;
68
+ }
69
+ declare const SelectControl: React.ForwardRefExoticComponent<SelectControlProps & React.RefAttributes<HTMLButtonElement>>;
70
+ interface SelectClearTriggerProps {
71
+ className?: string;
72
+ }
73
+ declare const SelectClearTrigger: React.ForwardRefExoticComponent<SelectClearTriggerProps & React.RefAttributes<HTMLButtonElement>>;
74
+ interface SelectContentProps {
75
+ children?: React.ReactNode;
76
+ portalled?: boolean;
77
+ portalRef?: React.RefObject<HTMLElement>;
78
+ className?: string;
79
+ style?: React.CSSProperties;
80
+ }
81
+ declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
82
+ interface SelectItemProps {
83
+ item: SelectOption;
84
+ children?: React.ReactNode;
85
+ className?: string;
86
+ }
87
+ declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
88
+ interface SelectValueTextProps {
89
+ children?: (items: Array<SelectOption>) => React.ReactNode;
90
+ placeholder?: string;
91
+ size?: SelectRootProps['size'];
92
+ required?: boolean;
93
+ invalid?: boolean;
94
+ errorText?: string;
95
+ mode?: ViewMode;
96
+ className?: string;
97
+ style?: React.CSSProperties;
98
+ }
99
+ declare const SelectValueText: React.ForwardRefExoticComponent<SelectValueTextProps & React.RefAttributes<HTMLSpanElement>>;
100
+ interface SelectItemGroupProps {
101
+ children?: React.ReactNode;
102
+ label: React.ReactNode;
103
+ className?: string;
104
+ }
105
+ declare const SelectItemGroup: React.ForwardRefExoticComponent<SelectItemGroupProps & React.RefAttributes<HTMLDivElement>>;
106
+ declare const SelectLabel: React.ForwardRefExoticComponent<RadixSelect.SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
107
+ declare const SelectItemText: React.ForwardRefExoticComponent<RadixSelect.SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
108
+ interface SelectProps extends SelectRootProps {
109
+ collection: ListCollection<SelectOption>;
110
+ placeholder: string;
111
+ portalled?: boolean;
112
+ loading?: boolean;
113
+ errorText?: string;
114
+ contentProps?: SelectContentProps;
115
+ contentHeader?: React.ReactNode;
116
+ itemFilter?: (item: SelectOption) => boolean;
117
+ mode?: ViewMode;
118
+ }
119
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
120
+ interface SelectAsyncProps extends Omit<SelectProps, 'collection'> {
121
+ placeholder: string;
122
+ portalled?: boolean;
123
+ loading?: boolean;
124
+ loadOptions: (input: string, currentValue: Array<string>) => Promise<ListCollection<SelectOption>>;
125
+ extraControls?: React.ReactNode;
126
+ mode?: ViewMode;
127
+ }
128
+ declare const SelectAsync: React.ForwardRefExoticComponent<SelectAsyncProps & React.RefAttributes<HTMLDivElement>>;
129
+
130
+ export { type ListCollection, Select, SelectAsync, type SelectAsyncProps, SelectClearTrigger, type SelectClearTriggerProps, SelectContent, type SelectContentProps, SelectControl, type SelectControlProps, SelectItem, SelectItemGroup, type SelectItemProps, SelectItemText, SelectLabel, type SelectOption, type SelectProps, SelectRoot, type SelectRootProps, SelectValueText, type ViewMode, createListCollection };
@@ -0,0 +1,130 @@
1
+ import * as RadixSelect from '@radix-ui/react-select';
2
+ import * as React from 'react';
3
+
4
+ interface ListCollection<T> {
5
+ items: Array<T>;
6
+ }
7
+ declare function createListCollection<T>(config: {
8
+ items: Array<T>;
9
+ }): ListCollection<T>;
10
+ type ViewMode = 'default' | 'compact';
11
+ interface SelectOption<Value extends string = string> {
12
+ label: string;
13
+ renderLabel?: (place: 'item' | 'value-text') => React.ReactNode;
14
+ value: Value;
15
+ icon?: React.ReactNode;
16
+ afterElement?: React.ReactNode;
17
+ }
18
+ interface SelectRootProps {
19
+ children?: React.ReactNode;
20
+ collection?: ListCollection<SelectOption>;
21
+ defaultValue?: Array<string>;
22
+ value?: Array<string>;
23
+ onValueChange?: (details: {
24
+ value: Array<string>;
25
+ items: Array<SelectOption>;
26
+ }) => void;
27
+ onInteractOutside?: () => void;
28
+ name?: string;
29
+ disabled?: boolean;
30
+ readOnly?: boolean;
31
+ required?: boolean;
32
+ invalid?: boolean;
33
+ size?: 'sm' | 'lg';
34
+ variant?: string;
35
+ open?: boolean;
36
+ defaultOpen?: boolean;
37
+ onOpenChange?: (open: boolean) => void;
38
+ positioning?: {
39
+ sameWidth?: boolean;
40
+ offset?: {
41
+ mainAxis?: number;
42
+ crossAxis?: number;
43
+ };
44
+ };
45
+ lazyMount?: boolean;
46
+ unmountOnExit?: boolean;
47
+ asChild?: boolean;
48
+ className?: string;
49
+ style?: React.CSSProperties;
50
+ w?: string | Record<string, string>;
51
+ maxW?: string | Record<string, string>;
52
+ minW?: string | Record<string, string>;
53
+ hideFrom?: string;
54
+ }
55
+ declare const SelectRoot: React.ForwardRefExoticComponent<SelectRootProps & React.RefAttributes<HTMLDivElement>>;
56
+ interface SelectControlProps {
57
+ children?: React.ReactNode;
58
+ noIndicator?: boolean;
59
+ triggerProps?: React.ComponentPropsWithoutRef<typeof RadixSelect.Trigger> & {
60
+ asChild?: boolean;
61
+ px?: string | number;
62
+ className?: string;
63
+ };
64
+ loading?: boolean;
65
+ defaultValue?: Array<string>;
66
+ className?: string;
67
+ style?: React.CSSProperties;
68
+ }
69
+ declare const SelectControl: React.ForwardRefExoticComponent<SelectControlProps & React.RefAttributes<HTMLButtonElement>>;
70
+ interface SelectClearTriggerProps {
71
+ className?: string;
72
+ }
73
+ declare const SelectClearTrigger: React.ForwardRefExoticComponent<SelectClearTriggerProps & React.RefAttributes<HTMLButtonElement>>;
74
+ interface SelectContentProps {
75
+ children?: React.ReactNode;
76
+ portalled?: boolean;
77
+ portalRef?: React.RefObject<HTMLElement>;
78
+ className?: string;
79
+ style?: React.CSSProperties;
80
+ }
81
+ declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
82
+ interface SelectItemProps {
83
+ item: SelectOption;
84
+ children?: React.ReactNode;
85
+ className?: string;
86
+ }
87
+ declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
88
+ interface SelectValueTextProps {
89
+ children?: (items: Array<SelectOption>) => React.ReactNode;
90
+ placeholder?: string;
91
+ size?: SelectRootProps['size'];
92
+ required?: boolean;
93
+ invalid?: boolean;
94
+ errorText?: string;
95
+ mode?: ViewMode;
96
+ className?: string;
97
+ style?: React.CSSProperties;
98
+ }
99
+ declare const SelectValueText: React.ForwardRefExoticComponent<SelectValueTextProps & React.RefAttributes<HTMLSpanElement>>;
100
+ interface SelectItemGroupProps {
101
+ children?: React.ReactNode;
102
+ label: React.ReactNode;
103
+ className?: string;
104
+ }
105
+ declare const SelectItemGroup: React.ForwardRefExoticComponent<SelectItemGroupProps & React.RefAttributes<HTMLDivElement>>;
106
+ declare const SelectLabel: React.ForwardRefExoticComponent<RadixSelect.SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
107
+ declare const SelectItemText: React.ForwardRefExoticComponent<RadixSelect.SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
108
+ interface SelectProps extends SelectRootProps {
109
+ collection: ListCollection<SelectOption>;
110
+ placeholder: string;
111
+ portalled?: boolean;
112
+ loading?: boolean;
113
+ errorText?: string;
114
+ contentProps?: SelectContentProps;
115
+ contentHeader?: React.ReactNode;
116
+ itemFilter?: (item: SelectOption) => boolean;
117
+ mode?: ViewMode;
118
+ }
119
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
120
+ interface SelectAsyncProps extends Omit<SelectProps, 'collection'> {
121
+ placeholder: string;
122
+ portalled?: boolean;
123
+ loading?: boolean;
124
+ loadOptions: (input: string, currentValue: Array<string>) => Promise<ListCollection<SelectOption>>;
125
+ extraControls?: React.ReactNode;
126
+ mode?: ViewMode;
127
+ }
128
+ declare const SelectAsync: React.ForwardRefExoticComponent<SelectAsyncProps & React.RefAttributes<HTMLDivElement>>;
129
+
130
+ export { type ListCollection, Select, SelectAsync, type SelectAsyncProps, SelectClearTrigger, type SelectClearTriggerProps, SelectContent, type SelectContentProps, SelectControl, type SelectControlProps, SelectItem, SelectItemGroup, type SelectItemProps, SelectItemText, SelectLabel, type SelectOption, type SelectProps, SelectRoot, type SelectRootProps, SelectValueText, type ViewMode, createListCollection };
package/dist/select.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,13 @@
1
+ import React__default from 'react';
2
+
3
+ type Orientation = 'horizontal' | 'vertical';
4
+ type Variant = 'solid' | 'dashed' | 'dotted';
5
+ type Size = 'xs' | 'sm' | 'md' | 'lg';
6
+ interface SeparatorProps extends React__default.HTMLAttributes<HTMLHRElement> {
7
+ readonly orientation?: Orientation;
8
+ readonly variant?: Variant;
9
+ readonly size?: Size;
10
+ }
11
+ declare const Separator: React__default.ForwardRefExoticComponent<SeparatorProps & React__default.RefAttributes<HTMLHRElement>>;
12
+
13
+ export { Separator, type SeparatorProps };
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+
3
+ type Orientation = 'horizontal' | 'vertical';
4
+ type Variant = 'solid' | 'dashed' | 'dotted';
5
+ type Size = 'xs' | 'sm' | 'md' | 'lg';
6
+ interface SeparatorProps extends React__default.HTMLAttributes<HTMLHRElement> {
7
+ readonly orientation?: Orientation;
8
+ readonly variant?: Variant;
9
+ readonly size?: Size;
10
+ }
11
+ declare const Separator: React__default.ForwardRefExoticComponent<SeparatorProps & React__default.RefAttributes<HTMLHRElement>>;
12
+
13
+ export { Separator, type SeparatorProps };
package/dist/skeleton.cjs CHANGED
@@ -144,11 +144,7 @@ function stripShims(props) {
144
144
  for (const k of SHIM_PROPS) delete out[k];
145
145
  return out;
146
146
  }
147
- var SKELETON_CLASSES = [
148
- "animate-skeleton-shimmer rounded-sm",
149
- "bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
150
- "bg-[length:200%_100%]"
151
- ].join(" ");
147
+ var SKELETON_CLASSES = "lux-skeleton rounded-sm";
152
148
  var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
153
149
  var Skeleton = React__namespace.forwardRef(
154
150
  function Skeleton2(props, ref) {
@@ -168,7 +164,7 @@ var Skeleton = React__namespace.forwardRef(
168
164
  {
169
165
  ref,
170
166
  "data-loading": true,
171
- className: cn(SKELETON_CLASSES, "text-transparent [&_*]:invisible", cls),
167
+ className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
172
168
  style: mergedStyle,
173
169
  ...htmlRest,
174
170
  children
@@ -180,7 +176,7 @@ var Skeleton = React__namespace.forwardRef(
180
176
  {
181
177
  ref,
182
178
  "data-loading": true,
183
- className: cn(SKELETON_CLASSES, children ? "text-transparent [&_*]:invisible" : "min-h-5", cls),
179
+ className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
184
180
  style: mergedStyle,
185
181
  ...htmlRest,
186
182
  children
@@ -217,7 +213,12 @@ var SkeletonText = React__namespace.forwardRef(
217
213
  )) });
218
214
  }
219
215
  );
216
+ function LoadingBar({ loading = true }) {
217
+ if (!loading) return null;
218
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lux-loading", role: "progressbar", "aria-busy": "true", "aria-label": "Loading" });
219
+ }
220
220
 
221
+ exports.LoadingBar = LoadingBar;
221
222
  exports.Skeleton = Skeleton;
222
223
  exports.SkeletonCircle = SkeletonCircle;
223
224
  exports.SkeletonText = SkeletonText;
@@ -0,0 +1,76 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> {
5
+ readonly loading: boolean | undefined;
6
+ /** When true, the Skeleton wraps its single child element instead of adding a wrapper div. */
7
+ readonly asChild?: boolean;
8
+ readonly w?: any;
9
+ readonly h?: any;
10
+ readonly minW?: any;
11
+ readonly maxW?: any;
12
+ readonly display?: string;
13
+ readonly flexGrow?: number;
14
+ readonly flexShrink?: number;
15
+ readonly flexBasis?: string;
16
+ readonly fontWeight?: number | string;
17
+ readonly textStyle?: string;
18
+ readonly borderRadius?: string;
19
+ readonly alignSelf?: string;
20
+ readonly alignItems?: string;
21
+ readonly justifyContent?: string;
22
+ readonly color?: string;
23
+ readonly mt?: number | string;
24
+ readonly mb?: number | string;
25
+ readonly ml?: number | string;
26
+ readonly mr?: number | string;
27
+ readonly height?: string;
28
+ readonly overflow?: string;
29
+ readonly whiteSpace?: string;
30
+ readonly textOverflow?: string;
31
+ readonly textTransform?: string;
32
+ readonly gap?: number | string;
33
+ readonly gridTemplateColumns?: string;
34
+ readonly minWidth?: string;
35
+ readonly boxSize?: number | string;
36
+ readonly py?: number | string;
37
+ readonly px?: number | string;
38
+ readonly p?: number | string;
39
+ readonly hideBelow?: string;
40
+ readonly as?: React.ElementType;
41
+ readonly fontSize?: string;
42
+ readonly flexWrap?: React.CSSProperties['flexWrap'];
43
+ readonly wordBreak?: React.CSSProperties['wordBreak'];
44
+ readonly lineHeight?: string;
45
+ readonly marginRight?: string;
46
+ readonly position?: React.CSSProperties['position'];
47
+ readonly background?: string;
48
+ }
49
+ declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
50
+ interface SkeletonCircleProps extends React.HTMLAttributes<HTMLDivElement> {
51
+ readonly size?: string | number;
52
+ readonly loading?: boolean;
53
+ }
54
+ declare const SkeletonCircle: React.ForwardRefExoticComponent<SkeletonCircleProps & React.RefAttributes<HTMLDivElement>>;
55
+ interface SkeletonTextProps extends React.HTMLAttributes<HTMLDivElement> {
56
+ readonly noOfLines?: number;
57
+ readonly loading?: boolean;
58
+ }
59
+ declare const SkeletonText: React.ForwardRefExoticComponent<SkeletonTextProps & React.RefAttributes<HTMLDivElement>>;
60
+ /**
61
+ * The page-level "work is in flight" signal — one animated element, however
62
+ * many skeletons are on screen. Mount it while any request is outstanding.
63
+ *
64
+ * It is `position: fixed` and 2px tall, so it is out of flow: it cannot shift
65
+ * layout (CLS 0) and it cannot tint content. Under prefers-reduced-motion the
66
+ * sweep stops and the track stays lit, so the state is still legible.
67
+ *
68
+ * This is what replaces a bare spinner. A spinner says "something is
69
+ * happening somewhere"; a skeleton plus this bar says "here is the shape of
70
+ * what is coming, and it is still coming".
71
+ */
72
+ declare function LoadingBar({ loading }: {
73
+ readonly loading?: boolean;
74
+ }): react_jsx_runtime.JSX.Element | null;
75
+
76
+ export { LoadingBar, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps };