@px-ui/core 1.25.0 → 1.26.0
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/menu.d.ts +2 -1
- package/dist/components/menu.d.ts.map +1 -1
- package/dist/components/menu.js +39 -26
- package/dist/tw-styles/dropdown.d.ts +2 -2
- package/dist/tw-styles/dropdown.d.ts.map +1 -1
- package/dist/tw-styles/dropdown.js +1 -1
- package/dist/utils/classnames.d.ts.map +1 -1
- package/dist/utils/classnames.js +29 -5
- package/package.json +1 -1
|
@@ -7,10 +7,11 @@ export declare const triggerVariants: (props?: ({
|
|
|
7
7
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
8
|
export declare const Root: React.FC<Menu.Root.Props>;
|
|
9
9
|
export declare function Trigger({ className, children, size, widthVariant, ...props }: React.ComponentProps<typeof Menu.Trigger> & VariantProps<typeof triggerVariants>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare function Content({ portalProps, positionerProps, popupProps, children, }: React.PropsWithChildren<{
|
|
10
|
+
export declare function Content({ portalProps, positionerProps, popupProps, children, widthVariant, }: React.PropsWithChildren<{
|
|
11
11
|
portalProps?: React.ComponentProps<typeof Menu.Portal>;
|
|
12
12
|
positionerProps?: React.ComponentProps<typeof Menu.Positioner>;
|
|
13
13
|
popupProps?: React.ComponentProps<typeof Menu.Popup>;
|
|
14
|
+
widthVariant?: "trigger" | "fit" | "enforced";
|
|
14
15
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export declare function DropdownIndicator(): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export declare function Item({ className, children, ...props }: React.ComponentProps<typeof Menu.Item>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/components/menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC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AAC,UAAU,CAAC,CAAC;IAC/D,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,CAAC;CAC/C,CAAC,2CA6BD;AAED,wBAAgB,iBAAiB,4CAEhC;AAED,wBAAgB,IAAI,CAAC,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,2CAMxC;AAED,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,2CAO7C;AAED,eAAO,MAAM,KAAK,kFAAa,CAAC;AAEhC,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,UAAU,CAAC,2CAU9C;AAED,eAAO,MAAM,UAAU,kFAAkB,CAAC;AAE1C,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,2CAQ7C;AAED,eAAO,MAAM,WAAW,wFAAe,CAAC;AAExC,eAAO,MAAM,QAAQ,aAAO,CAAC"}
|
package/dist/components/menu.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as r } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import { cn as o } from "../utils/classnames.js";
|
|
3
|
-
import
|
|
4
|
-
import { DROPDOWN_POPUP_CN as p, DROPDOWN_POSITIONER_CN as f, DROPDOWN_ITEM_CN as
|
|
3
|
+
import m from "../icons/chevron-down-icon.js";
|
|
4
|
+
import { DROPDOWN_POPUP_CN as p, DROPDOWN_POSITIONER_CN as f, DROPDOWN_ITEM_CN as u } from "../tw-styles/dropdown.js";
|
|
5
5
|
import { cva as l } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
6
6
|
import { MenuRoot as c } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/root/MenuRoot.js";
|
|
7
7
|
import { MenuGroup as d } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/group/MenuGroup.js";
|
|
8
8
|
import { MenuRadioGroup as x } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/radio-group/MenuRadioGroup.js";
|
|
9
|
-
import { MenuTrigger as
|
|
9
|
+
import { MenuTrigger as s } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/trigger/MenuTrigger.js";
|
|
10
10
|
import * as g from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/index.parts.js";
|
|
11
11
|
import { MenuPortal as N } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/portal/MenuPortal.js";
|
|
12
12
|
import { MenuPositioner as b } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/positioner/MenuPositioner.js";
|
|
13
13
|
import { MenuPopup as w } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/popup/MenuPopup.js";
|
|
14
14
|
import { MenuItem as j } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/item/MenuItem.js";
|
|
15
|
-
import { Separator as
|
|
16
|
-
import { MenuGroupLabel as
|
|
17
|
-
import { MenuRadioItem as
|
|
18
|
-
const
|
|
15
|
+
import { Separator as h } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/separator/Separator.js";
|
|
16
|
+
import { MenuGroupLabel as M } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/group-label/MenuGroupLabel.js";
|
|
17
|
+
import { MenuRadioItem as O } from "../node_modules/.pnpm/@base-ui-components_react@1.0.0-beta.4_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/react/esm/menu/radio-item/MenuRadioItem.js";
|
|
18
|
+
const R = l(
|
|
19
19
|
"gap-2 p-input text-ppx-sm bg-ppx-neutral-1 inline-flex items-center justify-between border border-ppx-neutral-5 text-ppx-foreground not-disabled:not-data-popup-open:hover:bg-ppx-neutral-2 focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ppx-primary-2 data-popup-open:bg-ppx-neutral-3 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
20
20
|
{
|
|
21
21
|
variants: {
|
|
@@ -34,22 +34,22 @@ const O = l(
|
|
|
34
34
|
widthVariant: "fit"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
),
|
|
37
|
+
), $ = c;
|
|
38
38
|
function q({
|
|
39
39
|
className: e,
|
|
40
40
|
children: t,
|
|
41
41
|
size: n,
|
|
42
42
|
widthVariant: a,
|
|
43
|
-
...
|
|
43
|
+
...i
|
|
44
44
|
}) {
|
|
45
45
|
return /* @__PURE__ */ r.jsxs(
|
|
46
|
-
|
|
46
|
+
s,
|
|
47
47
|
{
|
|
48
|
-
className: o(
|
|
49
|
-
...
|
|
48
|
+
className: o(R({ size: n, widthVariant: a }), e),
|
|
49
|
+
...i,
|
|
50
50
|
children: [
|
|
51
51
|
t,
|
|
52
|
-
/* @__PURE__ */ r.jsx(
|
|
52
|
+
/* @__PURE__ */ r.jsx(v, {})
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -58,7 +58,8 @@ function A({
|
|
|
58
58
|
portalProps: e,
|
|
59
59
|
positionerProps: t,
|
|
60
60
|
popupProps: n,
|
|
61
|
-
children: a
|
|
61
|
+
children: a,
|
|
62
|
+
widthVariant: i = "fit"
|
|
62
63
|
}) {
|
|
63
64
|
return /* @__PURE__ */ r.jsx(N, { ...e, children: /* @__PURE__ */ r.jsx(
|
|
64
65
|
b,
|
|
@@ -71,29 +72,34 @@ function A({
|
|
|
71
72
|
w,
|
|
72
73
|
{
|
|
73
74
|
...n,
|
|
74
|
-
className: o(
|
|
75
|
+
className: o(
|
|
76
|
+
p,
|
|
77
|
+
"py-1",
|
|
78
|
+
i === "trigger" ? "w-[var(--anchor-width)]" : i === "fit" ? "w-fit" : i === "enforced" ? "w-[var(--min-width-input)]" : "",
|
|
79
|
+
n == null ? void 0 : n.className
|
|
80
|
+
),
|
|
75
81
|
children: a
|
|
76
82
|
}
|
|
77
83
|
)
|
|
78
84
|
}
|
|
79
85
|
) });
|
|
80
86
|
}
|
|
81
|
-
function
|
|
82
|
-
return /* @__PURE__ */ r.jsx(
|
|
87
|
+
function v() {
|
|
88
|
+
return /* @__PURE__ */ r.jsx(m, { className: "data-popup-open:rotate-180" });
|
|
83
89
|
}
|
|
84
90
|
function F({
|
|
85
91
|
className: e,
|
|
86
92
|
children: t,
|
|
87
93
|
...n
|
|
88
94
|
}) {
|
|
89
|
-
return /* @__PURE__ */ r.jsx(j, { className: o(
|
|
95
|
+
return /* @__PURE__ */ r.jsx(j, { className: o(u, e), ...n, children: t });
|
|
90
96
|
}
|
|
91
97
|
function H({
|
|
92
98
|
className: e,
|
|
93
99
|
...t
|
|
94
100
|
}) {
|
|
95
101
|
return /* @__PURE__ */ r.jsx(
|
|
96
|
-
|
|
102
|
+
h,
|
|
97
103
|
{
|
|
98
104
|
className: o("my-1.5 mx-2 h-px bg-ppx-neutral-5", e),
|
|
99
105
|
...t
|
|
@@ -106,10 +112,10 @@ function K({
|
|
|
106
112
|
...t
|
|
107
113
|
}) {
|
|
108
114
|
return /* @__PURE__ */ r.jsx(
|
|
109
|
-
|
|
115
|
+
M,
|
|
110
116
|
{
|
|
111
117
|
className: o(
|
|
112
|
-
"py-2 px-4 leading-4 cursor-default text-ppx-sm text-ppx-muted-foreground select-none",
|
|
118
|
+
"py-2 px-4 leading-4 cursor-default font-sans-sb text-ppx-sm text-ppx-muted-foreground uppercase select-none",
|
|
113
119
|
e
|
|
114
120
|
),
|
|
115
121
|
...t
|
|
@@ -121,21 +127,28 @@ function Q({
|
|
|
121
127
|
className: e,
|
|
122
128
|
...t
|
|
123
129
|
}) {
|
|
124
|
-
return /* @__PURE__ */ r.jsx(
|
|
130
|
+
return /* @__PURE__ */ r.jsx(
|
|
131
|
+
O,
|
|
132
|
+
{
|
|
133
|
+
className: o(u, e),
|
|
134
|
+
closeOnClick: !0,
|
|
135
|
+
...t
|
|
136
|
+
}
|
|
137
|
+
);
|
|
125
138
|
}
|
|
126
|
-
const X =
|
|
139
|
+
const X = s, Y = g;
|
|
127
140
|
export {
|
|
128
141
|
Y as BaseMenu,
|
|
129
142
|
X as BaseTrigger,
|
|
130
143
|
A as Content,
|
|
131
|
-
|
|
144
|
+
v as DropdownIndicator,
|
|
132
145
|
J as Group,
|
|
133
146
|
K as GroupLabel,
|
|
134
147
|
F as Item,
|
|
135
148
|
P as RadioGroup,
|
|
136
149
|
Q as RadioItem,
|
|
137
|
-
|
|
150
|
+
$ as Root,
|
|
138
151
|
H as Separator,
|
|
139
152
|
q as Trigger,
|
|
140
|
-
|
|
153
|
+
R as triggerVariants
|
|
141
154
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DROPDOWN_ITEM_CN = "gap-2 py-2 pr-8 pl-4 text-ppx-sm flex cursor-default items-center outline-none select-none data-highlighted:bg-ppx-primary-b-1 data-selected:bg-ppx-primary-1! data-
|
|
2
|
-
export declare const DROPDOWN_POPUP_CN = "rounded-ppx-s shadow-xs max-h-[var(--available-height)]
|
|
1
|
+
export declare const DROPDOWN_ITEM_CN = "gap-2 py-2 pr-8 pl-4 text-ppx-sm flex cursor-default items-center outline-none select-none not-data-disabled:data-highlighted:bg-ppx-primary-b-1 data-selected:bg-ppx-primary-1! data-checked:bg-ppx-primary-1! text-ppx-foreground my-0.5 data-disabled:opacity-50";
|
|
2
|
+
export declare const DROPDOWN_POPUP_CN = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] origin-[var(--transform-origin)] overflow-y-auto bg-ppx-background bg-clip-padding shadow-ppx-neutral-5 outline-1 outline-ppx-neutral-5 transition-[transform,scale,opacity] data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[side=none]:data-[ending-style]:transition-none data-[starting-style]:scale-90 data-[starting-style]:opacity-0 data-[side=none]:data-[starting-style]:scale-100 data-[side=none]:data-[starting-style]:opacity-100 data-[side=none]:data-[starting-style]:transition-none group max-w-[var(--available-width)] text-ppx-foreground";
|
|
3
3
|
export declare const DROPDOWN_POSITIONER_CN = "z-10 outline-none";
|
|
4
4
|
//# sourceMappingURL=dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/tw-styles/dropdown.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/tw-styles/dropdown.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wQAC0O,CAAC;AAExQ,eAAO,MAAM,iBAAiB,6mBAC8kB,CAAC;AAE7mB,eAAO,MAAM,sBAAsB,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const a = "gap-2 py-2 pr-8 pl-4 text-ppx-sm flex cursor-default items-center outline-none select-none data-highlighted:bg-ppx-primary-b-1 data-selected:bg-ppx-primary-1! data-
|
|
1
|
+
const a = "gap-2 py-2 pr-8 pl-4 text-ppx-sm flex cursor-default items-center outline-none select-none not-data-disabled:data-highlighted:bg-ppx-primary-b-1 data-selected:bg-ppx-primary-1! data-checked:bg-ppx-primary-1! text-ppx-foreground my-0.5 data-disabled:opacity-50", t = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] origin-[var(--transform-origin)] overflow-y-auto bg-ppx-background bg-clip-padding shadow-ppx-neutral-5 outline-1 outline-ppx-neutral-5 transition-[transform,scale,opacity] data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[side=none]:data-[ending-style]:transition-none data-[starting-style]:scale-90 data-[starting-style]:opacity-0 data-[side=none]:data-[starting-style]:scale-100 data-[side=none]:data-[starting-style]:opacity-100 data-[side=none]:data-[starting-style]:transition-none group max-w-[var(--available-width)] text-ppx-foreground", e = "z-10 outline-none";
|
|
2
2
|
export {
|
|
3
3
|
a as DROPDOWN_ITEM_CN,
|
|
4
4
|
t as DROPDOWN_POPUP_CN,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classnames.d.ts","sourceRoot":"","sources":["../../src/utils/classnames.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"classnames.d.ts","sourceRoot":"","sources":["../../src/utils/classnames.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAiDvD,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,aAAa,UAE1C"}
|
package/dist/utils/classnames.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "../_virtual/index.js";
|
|
2
2
|
import { extendTailwindMerge as s } from "../node_modules/.pnpm/tailwind-merge@3.2.0/node_modules/tailwind-merge/dist/bundle-mjs.js";
|
|
3
3
|
const t = s({
|
|
4
4
|
extend: {
|
|
@@ -16,13 +16,37 @@ const t = s({
|
|
|
16
16
|
"ppx-xs"
|
|
17
17
|
]
|
|
18
18
|
}
|
|
19
|
-
]
|
|
19
|
+
],
|
|
20
|
+
// Add custom height utilities
|
|
21
|
+
h: [{ h: ["stretch-available", "input", "input-s"] }],
|
|
22
|
+
// Add custom min-height utilities
|
|
23
|
+
"min-h": [{ "min-h": ["input", "input-s"] }],
|
|
24
|
+
// Add custom min-width utilities
|
|
25
|
+
"min-w": [{ "min-w": ["input"] }],
|
|
26
|
+
// Add custom padding utilities
|
|
27
|
+
p: [{ p: ["input"] }],
|
|
28
|
+
// Add custom border radius utilities
|
|
29
|
+
rounded: [
|
|
30
|
+
{
|
|
31
|
+
rounded: [
|
|
32
|
+
"ppx-xs",
|
|
33
|
+
"ppx-s",
|
|
34
|
+
"ppx-m",
|
|
35
|
+
"ppx-l",
|
|
36
|
+
"ppx-xl",
|
|
37
|
+
"input",
|
|
38
|
+
"input-s"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
// Add custom font family utilities
|
|
43
|
+
"font-family": [{ font: ["sans-light", "sans-sb", "sans-b"] }]
|
|
20
44
|
}
|
|
21
45
|
}
|
|
22
46
|
});
|
|
23
|
-
function
|
|
24
|
-
return t(
|
|
47
|
+
function e(...p) {
|
|
48
|
+
return t(n(p));
|
|
25
49
|
}
|
|
26
50
|
export {
|
|
27
|
-
|
|
51
|
+
e as cn
|
|
28
52
|
};
|