@nattstack/ui 0.1.0 → 0.1.1
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/components/button/button-spinner.js +4 -4
- package/dist/components/button/button-spinner.stylex.js +1 -1
- package/dist/components/button/button.d.ts +2 -13
- package/dist/components/button/button.js +10 -32
- package/dist/components/button/button.stylex.js +78 -77
- package/dist/components/button-link/button-link.d.ts +1 -1
- package/dist/components/button-link/button-link.js +8 -12
- package/dist/components/checkbox/checkbox-icon.js +3 -3
- package/dist/components/checkbox/checkbox.d.ts +1 -2
- package/dist/components/checkbox/checkbox.js +8 -7
- package/dist/components/checkbox/checkbox.stylex.js +1 -1
- package/dist/components/cn.js +9 -7
- package/dist/components/column/column.d.ts +1 -2
- package/dist/components/column/column.js +4 -5
- package/dist/components/combobox/combobox-content.js +8 -7
- package/dist/components/combobox/combobox-empty.d.ts +1 -2
- package/dist/components/combobox/combobox-empty.js +6 -5
- package/dist/components/combobox/combobox-group-label.js +5 -4
- package/dist/components/combobox/combobox-group.js +5 -4
- package/dist/components/combobox/combobox-input.d.ts +1 -2
- package/dist/components/combobox/combobox-input.js +13 -12
- package/dist/components/combobox/combobox-input.stylex.js +37 -27
- package/dist/components/combobox/combobox-item.js +9 -8
- package/dist/components/combobox/combobox-list.js +5 -4
- package/dist/components/combobox/combobox-search.d.ts +1 -2
- package/dist/components/combobox/combobox-search.js +10 -9
- package/dist/components/combobox/combobox-separator.js +5 -4
- package/dist/components/combobox/combobox-trigger.js +8 -7
- package/dist/components/combobox/combobox-value.d.ts +1 -2
- package/dist/components/combobox/combobox-value.js +6 -5
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/dialog-responsive/dialog-responsive-backdrop.js +5 -4
- package/dist/components/dialog-responsive/dialog-responsive-bar.js +5 -4
- package/dist/components/dialog-responsive/dialog-responsive-popup.d.ts +1 -2
- package/dist/components/dialog-responsive/dialog-responsive-popup.js +6 -5
- package/dist/components/dialog-responsive/dialog-responsive-portal.js +5 -4
- package/dist/components/dialog-responsive/dialog-responsive-trigger.js +1 -1
- package/dist/components/dialog-responsive/dialog-responsive-viewport.js +5 -4
- package/dist/components/dialog-responsive/dialog-responsive.js +3 -2
- package/dist/components/icon-button/icon-button.d.ts +1 -2
- package/dist/components/icon-button/icon-button.js +9 -20
- package/dist/components/icon-button/icon-button.stylex.js +17 -6
- package/dist/components/index.d.ts +4 -41
- package/dist/components/index.js +2 -39
- package/dist/components/input/input.d.ts +1 -2
- package/dist/components/input/input.js +7 -6
- package/dist/components/input/input.stylex.js +49 -36
- package/dist/components/label/label.d.ts +1 -2
- package/dist/components/label/label.js +4 -5
- package/dist/components/menu/menu-checkbox-item.js +9 -8
- package/dist/components/menu/menu-content.d.ts +1 -2
- package/dist/components/menu/menu-content.js +11 -10
- package/dist/components/menu/menu-group-label.js +5 -4
- package/dist/components/menu/menu-group.js +5 -4
- package/dist/components/menu/menu-item.d.ts +1 -2
- package/dist/components/menu/menu-item.js +6 -5
- package/dist/components/menu/menu-link-item.js +5 -4
- package/dist/components/menu/menu-radio-group.js +5 -4
- package/dist/components/menu/menu-radio-item.js +9 -8
- package/dist/components/menu/menu-separator.js +5 -4
- package/dist/components/menu/menu-submenu-trigger.d.ts +1 -2
- package/dist/components/menu/menu-submenu-trigger.js +8 -7
- package/dist/components/menu/menu-submenu.js +1 -1
- package/dist/components/menu/menu-trigger.js +1 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/otp-field/otp-field-input.d.ts +1 -2
- package/dist/components/otp-field/otp-field-input.js +6 -5
- package/dist/components/otp-field/otp-field.d.ts +1 -2
- package/dist/components/otp-field/otp-field.js +6 -5
- package/dist/components/otp-field/otp-field.stylex.js +1 -1
- package/dist/components/picker/picker-trigger.stylex.js +37 -27
- package/dist/components/row/row.d.ts +1 -2
- package/dist/components/row/row.js +4 -5
- package/dist/components/select/select-content.d.ts +1 -2
- package/dist/components/select/select-content.js +11 -10
- package/dist/components/select/select-group-label.js +5 -4
- package/dist/components/select/select-group.d.ts +1 -2
- package/dist/components/select/select-group.js +6 -5
- package/dist/components/select/select-item.d.ts +1 -2
- package/dist/components/select/select-item.js +10 -9
- package/dist/components/select/select-separator.d.ts +1 -2
- package/dist/components/select/select-separator.js +6 -5
- package/dist/components/select/select-trigger.d.ts +1 -2
- package/dist/components/select/select-trigger.js +9 -8
- package/dist/components/select/select-value.d.ts +1 -2
- package/dist/components/select/select-value.js +6 -5
- package/dist/components/select/select.js +1 -1
- package/dist/components/spacer/spacer.d.ts +1 -2
- package/dist/components/spacer/spacer.js +4 -5
- package/dist/components/stylex.css +4 -4
- package/dist/components/switch/switch.d.ts +1 -2
- package/dist/components/switch/switch.js +8 -7
- package/dist/components/switch/switch.stylex.js +17 -13
- package/dist/components/tabs/tabs-panel.d.ts +1 -2
- package/dist/components/tabs/tabs-panel.js +4 -5
- package/dist/components/tabs/tabs.d.ts +1 -2
- package/dist/components/tabs/tabs.js +4 -5
- package/dist/components/tabs-pill/tabs-pill-indicator.js +5 -4
- package/dist/components/tabs-pill/tabs-pill-list.d.ts +1 -2
- package/dist/components/tabs-pill/tabs-pill-list.js +6 -5
- package/dist/components/tabs-pill/tabs-pill-tab.d.ts +1 -2
- package/dist/components/tabs-pill/tabs-pill-tab.js +8 -7
- package/dist/components/tabs-segmented/tabs-segmented-indicator.js +5 -4
- package/dist/components/tabs-segmented/tabs-segmented-list.d.ts +1 -2
- package/dist/components/tabs-segmented/tabs-segmented-list.js +6 -5
- package/dist/components/tabs-segmented/tabs-segmented-tab.d.ts +1 -2
- package/dist/components/tabs-segmented/tabs-segmented-tab.js +6 -5
- package/dist/components/tabs-underline/tabs-underline-indicator.js +5 -4
- package/dist/components/tabs-underline/tabs-underline-list.d.ts +1 -2
- package/dist/components/tabs-underline/tabs-underline-list.js +6 -5
- package/dist/components/tabs-underline/tabs-underline-tab.d.ts +1 -2
- package/dist/components/tabs-underline/tabs-underline-tab.js +6 -5
- package/dist/components/textarea/textarea.d.ts +1 -2
- package/dist/components/textarea/textarea.js +7 -6
- package/dist/components/toggle-group/toggle-group-item.d.ts +1 -2
- package/dist/components/toggle-group/toggle-group-item.js +6 -5
- package/dist/components/toggle-group/toggle-group.d.ts +1 -2
- package/dist/components/toggle-group/toggle-group.js +6 -5
- package/dist/components/tooltip/tooltip-popup.d.ts +1 -2
- package/dist/components/tooltip/tooltip-popup.js +8 -7
- package/dist/components/tooltip/tooltip-provider.js +1 -1
- package/dist/components/tooltip/tooltip-trigger.js +1 -1
- package/dist/components/tooltip/tooltip.js +3 -2
- package/package.json +3 -2
- package/dist/components/button/button.stylex.d.ts +0 -121
- package/dist/components/checkbox/checkbox.stylex.d.ts +0 -40
- package/dist/components/cn.d.ts +0 -6
- package/dist/components/column/column.stylex.d.ts +0 -10
- package/dist/components/combobox/combobox-empty.stylex.d.ts +0 -13
- package/dist/components/combobox/combobox-input.stylex.d.ts +0 -93
- package/dist/components/combobox/combobox-search.stylex.d.ts +0 -45
- package/dist/components/combobox/combobox-value.stylex.d.ts +0 -14
- package/dist/components/dialog-responsive/dialog-responsive-popup.stylex.d.ts +0 -32
- package/dist/components/icon-button/icon-button.stylex.d.ts +0 -21
- package/dist/components/input/input.stylex.d.ts +0 -66
- package/dist/components/label/label.stylex.d.ts +0 -12
- package/dist/components/menu/menu-content.stylex.d.ts +0 -11
- package/dist/components/menu/menu-item.stylex.d.ts +0 -11
- package/dist/components/menu/menu-submenu-trigger.stylex.d.ts +0 -19
- package/dist/components/otp-field/otp-field-input.stylex.d.ts +0 -25
- package/dist/components/otp-field/otp-field.stylex.d.ts +0 -16
- package/dist/components/picker/picker-group.stylex.d.ts +0 -18
- package/dist/components/picker/picker-item.stylex.d.ts +0 -39
- package/dist/components/picker/picker-popup.stylex.d.ts +0 -36
- package/dist/components/picker/picker-separator.stylex.d.ts +0 -13
- package/dist/components/picker/picker-trigger.stylex.d.ts +0 -60
- package/dist/components/row/row.stylex.d.ts +0 -10
- package/dist/components/select/select-value.stylex.d.ts +0 -14
- package/dist/components/spacer/spacer.stylex.d.ts +0 -9
- package/dist/components/switch/switch.stylex.d.ts +0 -41
- package/dist/components/tabs/tabs-panel.stylex.d.ts +0 -14
- package/dist/components/tabs/tabs.stylex.d.ts +0 -10
- package/dist/components/tabs-pill/tabs-pill-list.stylex.d.ts +0 -13
- package/dist/components/tabs-pill/tabs-pill-tab.stylex.d.ts +0 -44
- package/dist/components/tabs-segmented/tabs-segmented-list.stylex.d.ts +0 -17
- package/dist/components/tabs-segmented/tabs-segmented-tab.stylex.d.ts +0 -28
- package/dist/components/tabs-underline/tabs-underline-list.stylex.d.ts +0 -14
- package/dist/components/tabs-underline/tabs-underline-tab.stylex.d.ts +0 -27
- package/dist/components/textarea/textarea.stylex.d.ts +0 -13
- package/dist/components/toggle-group/toggle-group-item.stylex.d.ts +0 -33
- package/dist/components/toggle-group/toggle-group.stylex.d.ts +0 -11
- package/dist/components/tooltip/tooltip-popup.stylex.d.ts +0 -30
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { cn
|
|
2
|
-
import { comboboxInputStyles } from "./combobox-input.stylex.js";
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
|
+
import { comboboxInputStyles, comboboxInputStylesBy } from "./combobox-input.stylex.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Combobox } from "@base-ui/react";
|
|
5
5
|
//#region src/components/combobox/combobox-input.tsx
|
|
6
6
|
function ComboboxInput(props) {
|
|
7
|
-
const { className
|
|
7
|
+
const { className = "", disabled = false, rounded = false, size = 40, ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(comboboxInputStyles.base, comboboxInputStylesBy.size[size], rounded && comboboxInputStylesBy.rounded.full, className);
|
|
8
9
|
return /* @__PURE__ */ jsxs(Combobox.InputGroup, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "combobox-input-group",
|
|
11
12
|
children: [/* @__PURE__ */ jsx(Combobox.Input, {
|
|
12
|
-
className:
|
|
13
|
-
"data-
|
|
13
|
+
className: cn(comboboxInputStyles.input),
|
|
14
|
+
"data-component": "combobox-input",
|
|
14
15
|
disabled,
|
|
15
16
|
...rest
|
|
16
17
|
}), /* @__PURE__ */ jsx(Combobox.Trigger, {
|
|
17
|
-
className:
|
|
18
|
-
"data-
|
|
18
|
+
className: cn(comboboxInputStyles.trigger),
|
|
19
|
+
"data-component": "combobox-input-trigger",
|
|
19
20
|
disabled,
|
|
20
21
|
tabIndex: -1,
|
|
21
22
|
children: /* @__PURE__ */ jsx(Combobox.Icon, {
|
|
22
|
-
className:
|
|
23
|
-
"data-
|
|
23
|
+
className: cn(comboboxInputStyles.icon),
|
|
24
|
+
"data-component": "combobox-input-icon",
|
|
24
25
|
children: /* @__PURE__ */ jsx("svg", {
|
|
25
26
|
height: "14",
|
|
26
27
|
viewBox: "0 0 18 18",
|
|
@@ -40,4 +41,4 @@ function ComboboxInput(props) {
|
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
//#endregion
|
|
43
|
-
export { ComboboxInput
|
|
44
|
+
export { ComboboxInput };
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
//#region src/components/combobox/combobox-input.stylex.ts
|
|
2
2
|
const comboboxInputStyles = {
|
|
3
|
-
"32": {
|
|
4
|
-
kaIpWk: "xur7f20",
|
|
5
|
-
kZKoxP: "x10w6t97",
|
|
6
|
-
$$css: true
|
|
7
|
-
},
|
|
8
|
-
"36": {
|
|
9
|
-
kaIpWk: "xhpnuu7",
|
|
10
|
-
kZKoxP: "xc9qbxq",
|
|
11
|
-
$$css: true
|
|
12
|
-
},
|
|
13
|
-
"40": {
|
|
14
|
-
kaIpWk: "x1q4ynmn",
|
|
15
|
-
kZKoxP: "x1vqgdyp",
|
|
16
|
-
$$css: true
|
|
17
|
-
},
|
|
18
|
-
"44": {
|
|
19
|
-
kaIpWk: "x1ctf4ec",
|
|
20
|
-
kZKoxP: "xn3w4p2",
|
|
21
|
-
$$css: true
|
|
22
|
-
},
|
|
23
|
-
"48": {
|
|
24
|
-
kaIpWk: "x4pepcl",
|
|
25
|
-
kZKoxP: "xsdox4t",
|
|
26
|
-
$$css: true
|
|
27
|
-
},
|
|
28
3
|
base: {
|
|
29
4
|
kGNEyG: "x6s0dn4",
|
|
30
5
|
kWkggS: "xoepl9e xm4hijy x1h73wb5 xpy517o",
|
|
@@ -76,10 +51,35 @@ const comboboxInputStyles = {
|
|
|
76
51
|
kmVPX3: "x1717udv",
|
|
77
52
|
$$css: true
|
|
78
53
|
},
|
|
79
|
-
|
|
54
|
+
rounded_full: {
|
|
80
55
|
kaIpWk: "x10hpsqq",
|
|
81
56
|
$$css: true
|
|
82
57
|
},
|
|
58
|
+
size_32: {
|
|
59
|
+
kaIpWk: "xur7f20",
|
|
60
|
+
kZKoxP: "x10w6t97",
|
|
61
|
+
$$css: true
|
|
62
|
+
},
|
|
63
|
+
size_36: {
|
|
64
|
+
kaIpWk: "xhpnuu7",
|
|
65
|
+
kZKoxP: "xc9qbxq",
|
|
66
|
+
$$css: true
|
|
67
|
+
},
|
|
68
|
+
size_40: {
|
|
69
|
+
kaIpWk: "x1q4ynmn",
|
|
70
|
+
kZKoxP: "x1vqgdyp",
|
|
71
|
+
$$css: true
|
|
72
|
+
},
|
|
73
|
+
size_44: {
|
|
74
|
+
kaIpWk: "x1ctf4ec",
|
|
75
|
+
kZKoxP: "xn3w4p2",
|
|
76
|
+
$$css: true
|
|
77
|
+
},
|
|
78
|
+
size_48: {
|
|
79
|
+
kaIpWk: "x4pepcl",
|
|
80
|
+
kZKoxP: "xsdox4t",
|
|
81
|
+
$$css: true
|
|
82
|
+
},
|
|
83
83
|
trigger: {
|
|
84
84
|
kGNEyG: "x6s0dn4",
|
|
85
85
|
kWkggS: "xjbqb8w",
|
|
@@ -96,5 +96,15 @@ const comboboxInputStyles = {
|
|
|
96
96
|
$$css: true
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
+
const comboboxInputStylesBy = {
|
|
100
|
+
rounded: { full: comboboxInputStyles.rounded_full },
|
|
101
|
+
size: {
|
|
102
|
+
32: comboboxInputStyles.size_32,
|
|
103
|
+
36: comboboxInputStyles.size_36,
|
|
104
|
+
40: comboboxInputStyles.size_40,
|
|
105
|
+
44: comboboxInputStyles.size_44,
|
|
106
|
+
48: comboboxInputStyles.size_48
|
|
107
|
+
}
|
|
108
|
+
};
|
|
99
109
|
//#endregion
|
|
100
|
-
export { comboboxInputStyles };
|
|
110
|
+
export { comboboxInputStyles, comboboxInputStylesBy };
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { pickerItemStyles } from "../picker/picker-item.stylex.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Combobox } from "@base-ui/react";
|
|
5
5
|
//#region src/components/combobox/combobox-item.tsx
|
|
6
6
|
function ComboboxItem(props) {
|
|
7
|
-
const { children, className
|
|
7
|
+
const { children, className = "", ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(pickerItemStyles.base, className);
|
|
8
9
|
return /* @__PURE__ */ jsxs(Combobox.Item, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "combobox-item",
|
|
11
12
|
...rest,
|
|
12
13
|
children: [/* @__PURE__ */ jsx("span", {
|
|
13
|
-
className:
|
|
14
|
-
"data-
|
|
14
|
+
className: cn(pickerItemStyles.label),
|
|
15
|
+
"data-component": "combobox-item-text",
|
|
15
16
|
children
|
|
16
17
|
}), /* @__PURE__ */ jsx(Combobox.ItemIndicator, {
|
|
17
|
-
className:
|
|
18
|
-
"data-
|
|
18
|
+
className: cn(pickerItemStyles.indicator),
|
|
19
|
+
"data-component": "combobox-item-indicator",
|
|
19
20
|
children: /* @__PURE__ */ jsx("svg", {
|
|
20
21
|
height: "14px",
|
|
21
22
|
viewBox: "0 0 18 18",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { pickerListStyles } from "../picker/picker-list.stylex.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Combobox } from "@base-ui/react";
|
|
5
5
|
//#region src/components/combobox/combobox-list.tsx
|
|
6
6
|
function ComboboxList(props) {
|
|
7
|
-
const { className
|
|
7
|
+
const { className = "", ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(pickerListStyles.base, className);
|
|
8
9
|
return /* @__PURE__ */ jsx(Combobox.List, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "combobox-list",
|
|
11
12
|
...rest
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { comboboxSearchStyles } from "./combobox-search.stylex.js";
|
|
2
1
|
import { Combobox } from "@base-ui/react";
|
|
3
2
|
import { JSX } from "react";
|
|
4
3
|
//#region src/components/combobox/combobox-search.d.ts
|
|
@@ -7,4 +6,4 @@ interface ComboboxSearchProps extends Omit<Combobox.Input.Props, "className" | "
|
|
|
7
6
|
}
|
|
8
7
|
declare function ComboboxSearch(props: ComboboxSearchProps): JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
|
-
export { ComboboxSearch, ComboboxSearchProps
|
|
9
|
+
export { ComboboxSearch, ComboboxSearchProps };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { comboboxSearchStyles } from "./combobox-search.stylex.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Combobox } from "@base-ui/react";
|
|
5
5
|
//#region src/components/combobox/combobox-search.tsx
|
|
6
6
|
function ComboboxSearch(props) {
|
|
7
|
-
const { className
|
|
7
|
+
const { className = "", ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(comboboxSearchStyles.base, className);
|
|
8
9
|
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "combobox-search",
|
|
11
12
|
children: [/* @__PURE__ */ jsx("span", {
|
|
12
|
-
className:
|
|
13
|
-
"data-
|
|
13
|
+
className: cn(comboboxSearchStyles.icon),
|
|
14
|
+
"data-component": "combobox-search-icon",
|
|
14
15
|
children: /* @__PURE__ */ jsxs("svg", {
|
|
15
16
|
height: "18",
|
|
16
17
|
viewBox: "0 0 18 18",
|
|
@@ -33,11 +34,11 @@ function ComboboxSearch(props) {
|
|
|
33
34
|
})]
|
|
34
35
|
})
|
|
35
36
|
}), /* @__PURE__ */ jsx(Combobox.Input, {
|
|
36
|
-
className:
|
|
37
|
-
"data-
|
|
37
|
+
className: cn(comboboxSearchStyles.input),
|
|
38
|
+
"data-component": "combobox-search-input",
|
|
38
39
|
...rest
|
|
39
40
|
})]
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
//#endregion
|
|
43
|
-
export { ComboboxSearch
|
|
44
|
+
export { ComboboxSearch };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { pickerSeparatorStyles } from "../picker/picker-separator.stylex.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Combobox } from "@base-ui/react";
|
|
5
5
|
//#region src/components/combobox/combobox-separator.tsx
|
|
6
6
|
function ComboboxSeparator(props) {
|
|
7
|
-
const { className
|
|
7
|
+
const { className = "", ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(pickerSeparatorStyles.base, className);
|
|
8
9
|
return /* @__PURE__ */ jsx(Combobox.Separator, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "combobox-separator",
|
|
11
12
|
...rest
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { cn
|
|
2
|
-
import { pickerTriggerStyles } from "../picker/picker-trigger.stylex.js";
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
|
+
import { pickerTriggerStyles, pickerTriggerStylesBy } from "../picker/picker-trigger.stylex.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Combobox } from "@base-ui/react";
|
|
5
5
|
//#region src/components/combobox/combobox-trigger.tsx
|
|
6
6
|
function ComboboxTrigger(props) {
|
|
7
|
-
const { children = void 0, className
|
|
7
|
+
const { children = void 0, className = "", rounded = false, size = 40, ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(pickerTriggerStyles.base, pickerTriggerStylesBy.size[size], rounded && pickerTriggerStylesBy.rounded.full, className);
|
|
8
9
|
return /* @__PURE__ */ jsxs(Combobox.Trigger, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "combobox-trigger",
|
|
11
12
|
...rest,
|
|
12
13
|
children: [children, /* @__PURE__ */ jsx(Combobox.Icon, {
|
|
13
|
-
className:
|
|
14
|
-
"data-
|
|
14
|
+
className: cn(pickerTriggerStyles.icon),
|
|
15
|
+
"data-component": "combobox-icon",
|
|
15
16
|
children: /* @__PURE__ */ jsx("svg", {
|
|
16
17
|
height: "14",
|
|
17
18
|
viewBox: "0 0 18 18",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { comboboxValueStyles } from "./combobox-value.stylex.js";
|
|
2
1
|
import { Combobox } from "@base-ui/react";
|
|
3
2
|
import { JSX } from "react";
|
|
4
3
|
//#region src/components/combobox/combobox-value.d.ts
|
|
@@ -7,4 +6,4 @@ interface ComboboxValueProps extends Combobox.Value.Props {
|
|
|
7
6
|
}
|
|
8
7
|
declare function ComboboxValue(props: ComboboxValueProps): JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
|
-
export { ComboboxValue, ComboboxValueProps
|
|
9
|
+
export { ComboboxValue, ComboboxValueProps };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { comboboxValueStyles } from "./combobox-value.stylex.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Combobox } from "@base-ui/react";
|
|
5
5
|
//#region src/components/combobox/combobox-value.tsx
|
|
6
6
|
function ComboboxValue(props) {
|
|
7
|
-
const { children = void 0, className
|
|
7
|
+
const { children = void 0, className = "", placeholder = void 0, ...rest } = props;
|
|
8
8
|
const resolvedChildren = typeof children === "function" ? (selectedValue) => (selectedValue ?? void 0) === void 0 ? placeholder : children(selectedValue) : children;
|
|
9
|
+
const combinedClassName = cn(comboboxValueStyles.base, className);
|
|
9
10
|
return /* @__PURE__ */ jsx("div", {
|
|
10
|
-
className:
|
|
11
|
-
"data-
|
|
11
|
+
className: combinedClassName,
|
|
12
|
+
"data-component": "combobox-value",
|
|
12
13
|
children: /* @__PURE__ */ jsx(Combobox.Value, {
|
|
13
14
|
placeholder,
|
|
14
15
|
...rest,
|
|
@@ -17,4 +18,4 @@ function ComboboxValue(props) {
|
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
//#endregion
|
|
20
|
-
export { ComboboxValue
|
|
21
|
+
export { ComboboxValue };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { dialogResponsiveBackdropStyles } from "./dialog-responsive-backdrop.stylex.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Drawer } from "@base-ui/react";
|
|
5
5
|
//#region src/components/dialog-responsive/dialog-responsive-backdrop.tsx
|
|
6
6
|
function DialogResponsiveBackdrop(props) {
|
|
7
|
-
const { className
|
|
7
|
+
const { className = "", ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(dialogResponsiveBackdropStyles.base, className);
|
|
8
9
|
return /* @__PURE__ */ jsx(Drawer.Backdrop, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "dialog-responsive-backdrop",
|
|
11
12
|
...rest
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { dialogResponsiveBarStyles } from "./dialog-responsive-bar.stylex.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/dialog-responsive/dialog-responsive-bar.tsx
|
|
5
5
|
function DialogResponsiveBar(props) {
|
|
6
|
-
const { className
|
|
6
|
+
const { className = "", ...rest } = props;
|
|
7
|
+
const combinedClassName = cn(dialogResponsiveBarStyles.base, className);
|
|
7
8
|
return /* @__PURE__ */ jsx("div", {
|
|
8
|
-
className:
|
|
9
|
-
"data-
|
|
9
|
+
className: combinedClassName,
|
|
10
|
+
"data-component": "dialog-responsive-bar",
|
|
10
11
|
...rest
|
|
11
12
|
});
|
|
12
13
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { dialogResponsivePopupStyles } from "./dialog-responsive-popup.stylex.js";
|
|
2
1
|
import { Drawer } from "@base-ui/react";
|
|
3
2
|
import { JSX } from "react";
|
|
4
3
|
//#region src/components/dialog-responsive/dialog-responsive-popup.d.ts
|
|
5
4
|
interface DialogResponsivePopupProps extends Drawer.Popup.Props {}
|
|
6
5
|
declare function DialogResponsivePopup(props: DialogResponsivePopupProps): JSX.Element;
|
|
7
6
|
//#endregion
|
|
8
|
-
export { DialogResponsivePopup, DialogResponsivePopupProps
|
|
7
|
+
export { DialogResponsivePopup, DialogResponsivePopupProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { DialogResponsiveBackdrop } from "./dialog-responsive-backdrop.js";
|
|
3
3
|
import { DialogResponsiveBar } from "./dialog-responsive-bar.js";
|
|
4
4
|
import { dialogResponsivePopupStyles } from "./dialog-responsive-popup.stylex.js";
|
|
@@ -8,13 +8,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { Drawer } from "@base-ui/react";
|
|
9
9
|
//#region src/components/dialog-responsive/dialog-responsive-popup.tsx
|
|
10
10
|
function DialogResponsivePopup(props) {
|
|
11
|
-
const { children, className
|
|
11
|
+
const { children, className = "", ...rest } = props;
|
|
12
|
+
const combinedClassName = cn(dialogResponsivePopupStyles.base, className);
|
|
12
13
|
return /* @__PURE__ */ jsxs(DialogResponsivePortal, { children: [/* @__PURE__ */ jsx(DialogResponsiveBackdrop, {}), /* @__PURE__ */ jsx(DialogResponsiveViewport, { children: /* @__PURE__ */ jsxs(Drawer.Popup, {
|
|
13
|
-
className:
|
|
14
|
-
"data-
|
|
14
|
+
className: combinedClassName,
|
|
15
|
+
"data-component": "dialog-responsive-popup",
|
|
15
16
|
...rest,
|
|
16
17
|
children: [/* @__PURE__ */ jsx(DialogResponsiveBar, {}), children]
|
|
17
18
|
}) })] });
|
|
18
19
|
}
|
|
19
20
|
//#endregion
|
|
20
|
-
export { DialogResponsivePopup
|
|
21
|
+
export { DialogResponsivePopup };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { dialogResponsivePortalStyles } from "./dialog-responsive-portal.stylex.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Drawer } from "@base-ui/react";
|
|
5
5
|
//#region src/components/dialog-responsive/dialog-responsive-portal.tsx
|
|
6
6
|
function DialogResponsivePortal(props) {
|
|
7
|
-
const { className
|
|
7
|
+
const { className = "", ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(dialogResponsivePortalStyles.base, className);
|
|
8
9
|
return /* @__PURE__ */ jsx(Drawer.Portal, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "dialog-responsive-portal",
|
|
11
12
|
...rest
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -4,7 +4,7 @@ import { Drawer } from "@base-ui/react";
|
|
|
4
4
|
function DialogResponsiveTrigger(props) {
|
|
5
5
|
const { ...rest } = props;
|
|
6
6
|
return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
7
|
-
"data-
|
|
7
|
+
"data-component": "dialog-responsive-trigger",
|
|
8
8
|
...rest
|
|
9
9
|
});
|
|
10
10
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { cn
|
|
1
|
+
import { cn } from "../cn.js";
|
|
2
2
|
import { dialogResponsiveViewportStyles } from "./dialog-responsive-viewport.stylex.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Drawer } from "@base-ui/react";
|
|
5
5
|
//#region src/components/dialog-responsive/dialog-responsive-viewport.tsx
|
|
6
6
|
function DialogResponsiveViewport(props) {
|
|
7
|
-
const { className
|
|
7
|
+
const { className = "", ...rest } = props;
|
|
8
|
+
const combinedClassName = cn(dialogResponsiveViewportStyles.base, className);
|
|
8
9
|
return /* @__PURE__ */ jsx(Drawer.Viewport, {
|
|
9
|
-
className:
|
|
10
|
-
"data-
|
|
10
|
+
className: combinedClassName,
|
|
11
|
+
"data-component": "dialog-responsive-viewport",
|
|
11
12
|
...rest
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -2,10 +2,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Drawer } from "@base-ui/react";
|
|
3
3
|
//#region src/components/dialog-responsive/dialog-responsive.tsx
|
|
4
4
|
function DialogResponsive(props) {
|
|
5
|
+
const { ...rest } = props;
|
|
5
6
|
return /* @__PURE__ */ jsx(Drawer.Root, {
|
|
6
|
-
"data-
|
|
7
|
+
"data-component": "dialog-responsive",
|
|
7
8
|
swipeDirection: "down",
|
|
8
|
-
...
|
|
9
|
+
...rest
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
12
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ButtonProps } from "../button/button.js";
|
|
2
|
-
import { iconButtonStyles } from "./icon-button.stylex.js";
|
|
3
2
|
import { JSX, ReactNode } from "react";
|
|
4
3
|
//#region src/components/icon-button/icon-button.d.ts
|
|
5
4
|
interface IconButtonProps extends Omit<ButtonProps, "fullWidth" | "iconEnd" | "iconStart" | "label"> {
|
|
@@ -7,4 +6,4 @@ interface IconButtonProps extends Omit<ButtonProps, "fullWidth" | "iconEnd" | "i
|
|
|
7
6
|
}
|
|
8
7
|
declare function IconButton(props: IconButtonProps): JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
|
-
export { IconButton, IconButtonProps
|
|
9
|
+
export { IconButton, IconButtonProps };
|
|
@@ -1,30 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buttonStyles, buttonStylesBy } from "../button/button.stylex.js";
|
|
2
|
+
import { cn } from "../cn.js";
|
|
2
3
|
import { ButtonSpinner } from "../button/button-spinner.js";
|
|
3
|
-
import {
|
|
4
|
-
import { getButtonClassName } from "../button/button.js";
|
|
5
|
-
import { iconButtonStyles } from "./icon-button.stylex.js";
|
|
4
|
+
import { iconButtonStyles, iconButtonStylesBy } from "./icon-button.stylex.js";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
//#region src/components/icon-button/icon-button.tsx
|
|
8
7
|
function IconButton(props) {
|
|
9
|
-
const { className = "", icon = "",
|
|
8
|
+
const { className = "", disabled = false, icon = "", loading = false, rounded = false, size = 40, variant = "primary", ...rest } = props;
|
|
9
|
+
const combinedClassName = cn(buttonStyles.base, buttonStylesBy.rounded[rounded ? "full" : "base"][size], buttonStylesBy.size[size], buttonStylesBy.variant[variant], buttonStylesBy.width.base, (disabled || loading) && buttonStyles.disabled, iconButtonStyles.base, iconButtonStylesBy.size[size], className);
|
|
10
10
|
return /* @__PURE__ */ jsxs("button", {
|
|
11
|
-
className:
|
|
12
|
-
|
|
13
|
-
disabled,
|
|
14
|
-
loading,
|
|
15
|
-
rounded,
|
|
16
|
-
size,
|
|
17
|
-
variant
|
|
18
|
-
}, iconButtonStyles[size]),
|
|
19
|
-
"data-slot": "icon-button",
|
|
11
|
+
className: combinedClassName,
|
|
12
|
+
"data-component": "icon-button",
|
|
20
13
|
disabled: disabled || loading,
|
|
21
|
-
type: "button",
|
|
22
14
|
...rest,
|
|
23
|
-
children: [loading &&
|
|
24
|
-
className: sx(buttonStyles.loadingContent),
|
|
25
|
-
children: icon
|
|
26
|
-
}) : icon]
|
|
15
|
+
children: [!loading && icon, loading && /* @__PURE__ */ jsx(ButtonSpinner, {})]
|
|
27
16
|
});
|
|
28
17
|
}
|
|
29
18
|
//#endregion
|
|
30
|
-
export { IconButton
|
|
19
|
+
export { IconButton };
|
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
//#region src/components/icon-button/icon-button.stylex.ts
|
|
2
2
|
const iconButtonStyles = {
|
|
3
|
-
|
|
3
|
+
base: {
|
|
4
|
+
kg3NbH: "xnjsko4",
|
|
5
|
+
$$css: true
|
|
6
|
+
},
|
|
7
|
+
size_32: {
|
|
4
8
|
kzqmXN: "x1td3qas",
|
|
5
9
|
$$css: true
|
|
6
10
|
},
|
|
7
|
-
|
|
11
|
+
size_36: {
|
|
8
12
|
kzqmXN: "x14qfxbe",
|
|
9
13
|
$$css: true
|
|
10
14
|
},
|
|
11
|
-
|
|
15
|
+
size_40: {
|
|
12
16
|
kzqmXN: "x100vrsf",
|
|
13
17
|
$$css: true
|
|
14
18
|
},
|
|
15
|
-
|
|
19
|
+
size_44: {
|
|
16
20
|
kzqmXN: "x187nhsf",
|
|
17
21
|
$$css: true
|
|
18
22
|
},
|
|
19
|
-
|
|
23
|
+
size_48: {
|
|
20
24
|
kzqmXN: "x1useyqa",
|
|
21
25
|
$$css: true
|
|
22
26
|
}
|
|
23
27
|
};
|
|
28
|
+
const iconButtonStylesBy = { size: {
|
|
29
|
+
32: iconButtonStyles.size_32,
|
|
30
|
+
36: iconButtonStyles.size_36,
|
|
31
|
+
40: iconButtonStyles.size_40,
|
|
32
|
+
44: iconButtonStyles.size_44,
|
|
33
|
+
48: iconButtonStyles.size_48
|
|
34
|
+
} };
|
|
24
35
|
//#endregion
|
|
25
|
-
export { iconButtonStyles };
|
|
36
|
+
export { iconButtonStyles, iconButtonStylesBy };
|