@px-ui/core 1.24.0 → 1.25.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.js +6 -6
- package/dist/components/progress.d.ts +13 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +81 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -36
- package/dist/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/progress/indicator/ProgressIndicator.js +33 -0
- package/dist/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/progress/label/ProgressLabel.js +29 -0
- package/dist/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/progress/root/ProgressRoot.js +61 -0
- package/dist/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/progress/root/ProgressRootContext.js +13 -0
- package/dist/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/progress/root/ProgressRootDataAttributes.js +6 -0
- package/dist/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/progress/root/stateAttributesMapping.js +15 -0
- package/dist/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/progress/track/ProgressTrack.js +23 -0
- package/dist/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/progress/value/ProgressValue.js +29 -0
- package/dist/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/utils/formatNumber.js +19 -0
- package/dist/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/utils/valueToPercent.js +6 -0
- package/dist/tw-styles/dropdown.d.ts +1 -1
- package/dist/tw-styles/dropdown.d.ts.map +1 -1
- package/dist/tw-styles/dropdown.js +1 -1
- package/package.json +5 -1
package/dist/components/menu.js
CHANGED
|
@@ -10,8 +10,8 @@ import { MenuTrigger as u } from "../node_modules/.pnpm/@base-ui-components_reac
|
|
|
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
|
-
import { MenuPopup as
|
|
14
|
-
import { MenuItem as
|
|
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
|
+
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
15
|
import { Separator 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/separator/Separator.js";
|
|
16
16
|
import { MenuGroupLabel 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/menu/group-label/MenuGroupLabel.js";
|
|
17
17
|
import { MenuRadioItem as R } 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";
|
|
@@ -68,10 +68,10 @@ function A({
|
|
|
68
68
|
...t,
|
|
69
69
|
className: o(f, t == null ? void 0 : t.className),
|
|
70
70
|
children: /* @__PURE__ */ r.jsx(
|
|
71
|
-
|
|
71
|
+
w,
|
|
72
72
|
{
|
|
73
|
-
className: o(p, n == null ? void 0 : n.className),
|
|
74
73
|
...n,
|
|
74
|
+
className: o(p, "min-w-auto", n == null ? void 0 : n.className),
|
|
75
75
|
children: a
|
|
76
76
|
}
|
|
77
77
|
)
|
|
@@ -86,7 +86,7 @@ function F({
|
|
|
86
86
|
children: t,
|
|
87
87
|
...n
|
|
88
88
|
}) {
|
|
89
|
-
return /* @__PURE__ */ r.jsx(
|
|
89
|
+
return /* @__PURE__ */ r.jsx(j, { className: o(i, e), ...n, children: t });
|
|
90
90
|
}
|
|
91
91
|
function H({
|
|
92
92
|
className: e,
|
|
@@ -109,7 +109,7 @@ function K({
|
|
|
109
109
|
h,
|
|
110
110
|
{
|
|
111
111
|
className: o(
|
|
112
|
-
"py-2 px-4 leading-4 cursor-default text-ppx-
|
|
112
|
+
"py-2 px-4 leading-4 cursor-default text-ppx-sm text-ppx-muted-foreground select-none",
|
|
113
113
|
e
|
|
114
114
|
),
|
|
115
115
|
...t
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Progress } from '@base-ui-components/react/progress';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare const progressTrackVariants: (props?: ({
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
export declare const Root: React.ForwardRefExoticComponent<Progress.Root.Props & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare function Track({ className, size, children, ...props }: React.ComponentProps<typeof Progress.Track> & VariantProps<typeof progressTrackVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Indicator({ className, ...props }: React.ComponentProps<typeof Progress.Indicator>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function Label({ className, ...props }: React.ComponentProps<typeof Progress.Label>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Value({ className, ...props }: React.ComponentProps<typeof Progress.Value>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,QAAA,MAAM,qBAAqB;;mFAc1B,CAAC;AAKF,eAAO,MAAM,IAAI,4FAAgB,CAAC;AAElC,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,GAC5C,YAAY,CAAC,OAAO,qBAAqB,CAAC,2CAS3C;AAED,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,SAAS,CAAC,2CAOjD;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,2CAO7C;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,2CAO7C"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { j as t } from "../_virtual/jsx-runtime.js";
|
|
2
|
+
import { cn as e } from "../utils/classnames.js";
|
|
3
|
+
import { cva as n } from "../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { ProgressRoot as i } 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/progress/root/ProgressRoot.js";
|
|
5
|
+
import { ProgressTrack as l } 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/progress/track/ProgressTrack.js";
|
|
6
|
+
import { ProgressIndicator 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/progress/indicator/ProgressIndicator.js";
|
|
7
|
+
import { ProgressLabel as f } 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/progress/label/ProgressLabel.js";
|
|
8
|
+
import { ProgressValue as p } 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/progress/value/ProgressValue.js";
|
|
9
|
+
const u = n(
|
|
10
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-ppx-neutral-3",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-2",
|
|
15
|
+
sm: "h-1.5",
|
|
16
|
+
lg: "h-3"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
size: "default"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
), k = i;
|
|
24
|
+
function v({
|
|
25
|
+
className: r,
|
|
26
|
+
size: o,
|
|
27
|
+
children: s,
|
|
28
|
+
...a
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ t.jsx(
|
|
31
|
+
l,
|
|
32
|
+
{
|
|
33
|
+
className: e(u({ size: o }), r),
|
|
34
|
+
...a,
|
|
35
|
+
children: s
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function N({
|
|
40
|
+
className: r,
|
|
41
|
+
...o
|
|
42
|
+
}) {
|
|
43
|
+
return /* @__PURE__ */ t.jsx(
|
|
44
|
+
m,
|
|
45
|
+
{
|
|
46
|
+
className: e("h-full w-full flex-1 transition-all duration-300 ease-in-out bg-ppx-primary-b-5", r),
|
|
47
|
+
...o
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function V({
|
|
52
|
+
className: r,
|
|
53
|
+
...o
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ t.jsx(
|
|
56
|
+
f,
|
|
57
|
+
{
|
|
58
|
+
className: e("text-ppx-sm font-medium text-ppx-foreground", r),
|
|
59
|
+
...o
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
function w({
|
|
64
|
+
className: r,
|
|
65
|
+
...o
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ t.jsx(
|
|
68
|
+
p,
|
|
69
|
+
{
|
|
70
|
+
className: e("text-ppx-sm font-bold text-ppx-primary-b-5 flex-shrink-0", r),
|
|
71
|
+
...o
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
N as Indicator,
|
|
77
|
+
V as Label,
|
|
78
|
+
k as Root,
|
|
79
|
+
v as Track,
|
|
80
|
+
w as Value
|
|
81
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * as Popover from './components/popover';
|
|
|
3
3
|
export * as Combobox from './components/combobox';
|
|
4
4
|
export * as Select from './components/select';
|
|
5
5
|
export * as Menu from './components/menu';
|
|
6
|
+
export * as Progress from './components/progress';
|
|
6
7
|
export * as InputGroup from './components/input-group';
|
|
7
8
|
export * as SegmentedControl from './components/segmented-control';
|
|
8
9
|
export * as Tabs from './components/tabs';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,gBAAgB,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,kBAAkB,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAGlE,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAGlD,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,54 +4,56 @@ import * as t from "./components/popover.js";
|
|
|
4
4
|
import * as p from "./components/combobox.js";
|
|
5
5
|
import * as e from "./components/select.js";
|
|
6
6
|
import * as m from "./components/menu.js";
|
|
7
|
-
import * as a from "./components/
|
|
8
|
-
import * as s from "./components/
|
|
9
|
-
import * as x from "./components/
|
|
10
|
-
import * as i from "./components/
|
|
11
|
-
import * as f from "./components/
|
|
12
|
-
import * as n from "./components/block-
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
7
|
+
import * as a from "./components/progress.js";
|
|
8
|
+
import * as s from "./components/input-group.js";
|
|
9
|
+
import * as x from "./components/segmented-control.js";
|
|
10
|
+
import * as i from "./components/tabs.js";
|
|
11
|
+
import * as f from "./components/tooltip.js";
|
|
12
|
+
import * as n from "./components/block-checkbox-group.js";
|
|
13
|
+
import * as u from "./components/block-radio-group.js";
|
|
14
|
+
import { Button as l, buttonVariants as d } from "./components/button.js";
|
|
15
|
+
import { Checkbox as k } from "./components/checkbox.js";
|
|
15
16
|
import { Label as v } from "./components/label.js";
|
|
16
17
|
import { TextInput as I } from "./components/text-input.js";
|
|
17
|
-
import { Input as
|
|
18
|
-
import { Textarea as
|
|
19
|
-
import { Avatar as
|
|
20
|
-
import { AvatarGroup as
|
|
18
|
+
import { Input as A } from "./components/input.js";
|
|
19
|
+
import { Textarea as S } from "./components/textarea.js";
|
|
20
|
+
import { Avatar as B, AvatarImpl as O } from "./components/avatar.js";
|
|
21
|
+
import { AvatarGroup as P } from "./components/avatar-group.js";
|
|
21
22
|
import { Spinner as y } from "./components/spinner.js";
|
|
22
23
|
import { Switch as M } from "./components/switch.js";
|
|
23
|
-
import { RadioGroup as
|
|
24
|
-
import { defineLoadOptions as
|
|
25
|
-
import { useIntersectionObserver as
|
|
26
|
-
import { cn as
|
|
24
|
+
import { RadioGroup as j, RadioGroupItem as q } from "./components/radio-group.js";
|
|
25
|
+
import { defineLoadOptions as E, useAsyncOptions as F } from "./hooks/use-async-options.js";
|
|
26
|
+
import { useIntersectionObserver as J } from "./hooks/use-intersection-observer.js";
|
|
27
|
+
import { cn as N } from "./utils/classnames.js";
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
B as Avatar,
|
|
30
|
+
P as AvatarGroup,
|
|
31
|
+
O as AvatarImpl,
|
|
32
|
+
n as BlockCheckboxGroup,
|
|
33
|
+
u as BlockRadioGroup,
|
|
34
|
+
l as Button,
|
|
35
|
+
k as Checkbox,
|
|
35
36
|
p as Combobox,
|
|
36
37
|
r as Dialog,
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
A as Input,
|
|
39
|
+
s as InputGroup,
|
|
39
40
|
v as Label,
|
|
40
41
|
m as Menu,
|
|
41
42
|
t as Popover,
|
|
42
|
-
|
|
43
|
-
j as
|
|
44
|
-
|
|
43
|
+
a as Progress,
|
|
44
|
+
j as RadioGroup,
|
|
45
|
+
q as RadioGroupItem,
|
|
46
|
+
x as SegmentedControl,
|
|
45
47
|
e as Select,
|
|
46
48
|
y as Spinner,
|
|
47
49
|
M as Switch,
|
|
48
|
-
|
|
50
|
+
i as Tabs,
|
|
49
51
|
I as TextInput,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
S as Textarea,
|
|
53
|
+
f as Tooltip,
|
|
54
|
+
d as buttonVariants,
|
|
55
|
+
N as cn,
|
|
56
|
+
E as defineLoadOptions,
|
|
57
|
+
F as useAsyncOptions,
|
|
58
|
+
J as useIntersectionObserver
|
|
57
59
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { useRenderElement as u } from "../../utils/useRenderElement.js";
|
|
3
|
+
import { valueToPercent as c } from "../../utils/valueToPercent.js";
|
|
4
|
+
import { useProgressRootContext as p } from "../root/ProgressRootContext.js";
|
|
5
|
+
import { progressStateAttributesMapping as f } from "../root/stateAttributesMapping.js";
|
|
6
|
+
const d = /* @__PURE__ */ n.forwardRef(function(r, s) {
|
|
7
|
+
const {
|
|
8
|
+
render: N,
|
|
9
|
+
className: P,
|
|
10
|
+
...o
|
|
11
|
+
} = r, {
|
|
12
|
+
max: i,
|
|
13
|
+
min: a,
|
|
14
|
+
value: e,
|
|
15
|
+
state: l
|
|
16
|
+
} = p(), t = Number.isFinite(e) && e !== null ? c(e, a, i) : null, m = n.useCallback(() => t == null ? {} : {
|
|
17
|
+
insetInlineStart: 0,
|
|
18
|
+
height: "inherit",
|
|
19
|
+
width: `${t}%`
|
|
20
|
+
}, [t]);
|
|
21
|
+
return u("div", r, {
|
|
22
|
+
state: l,
|
|
23
|
+
ref: s,
|
|
24
|
+
props: [{
|
|
25
|
+
style: m()
|
|
26
|
+
}, o],
|
|
27
|
+
stateAttributesMapping: f
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
process.env.NODE_ENV !== "production" && (d.displayName = "ProgressIndicator");
|
|
31
|
+
export {
|
|
32
|
+
d as ProgressIndicator
|
|
33
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { useIsoLayoutEffect as p } from "../../../../../../../@base-ui-components_utils@0.1.2_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/utils/esm/useIsoLayoutEffect.js";
|
|
3
|
+
import { useBaseUiId as m } from "../../utils/useBaseUiId.js";
|
|
4
|
+
import { useRenderElement as f } from "../../utils/useRenderElement.js";
|
|
5
|
+
import { useProgressRootContext as d } from "../root/ProgressRootContext.js";
|
|
6
|
+
import { progressStateAttributesMapping as u } from "../root/stateAttributesMapping.js";
|
|
7
|
+
const c = /* @__PURE__ */ i.forwardRef(function(t, s) {
|
|
8
|
+
const {
|
|
9
|
+
render: g,
|
|
10
|
+
className: b,
|
|
11
|
+
id: o,
|
|
12
|
+
...n
|
|
13
|
+
} = t, e = m(o), {
|
|
14
|
+
setLabelId: r,
|
|
15
|
+
state: a
|
|
16
|
+
} = d();
|
|
17
|
+
return p(() => (r(e), () => r(void 0)), [e, r]), f("span", t, {
|
|
18
|
+
state: a,
|
|
19
|
+
ref: s,
|
|
20
|
+
props: [{
|
|
21
|
+
id: e
|
|
22
|
+
}, n],
|
|
23
|
+
stateAttributesMapping: u
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
process.env.NODE_ENV !== "production" && (c.displayName = "ProgressLabel");
|
|
27
|
+
export {
|
|
28
|
+
c as ProgressLabel
|
|
29
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { useLatestRef as P } from "../../../../../../../@base-ui-components_utils@0.1.2_@types_react@19.2.0_react-dom@19.2.0_react@19.2.0/node_modules/@base-ui-components/utils/esm/useLatestRef.js";
|
|
3
|
+
import { formatNumber as f } from "../../utils/formatNumber.js";
|
|
4
|
+
import { useRenderElement as V } from "../../utils/useRenderElement.js";
|
|
5
|
+
import { ProgressRootContext as A } from "./ProgressRootContext.js";
|
|
6
|
+
import { progressStateAttributesMapping as E } from "./stateAttributesMapping.js";
|
|
7
|
+
import { j as M } from "../../../../../../../../../_virtual/jsx-runtime.js";
|
|
8
|
+
function j(r, e, s) {
|
|
9
|
+
return r == null ? "" : s ? f(r, e, s) : f(r / 100, e, {
|
|
10
|
+
style: "percent"
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function y(r, e) {
|
|
14
|
+
return e == null ? "indeterminate progress" : r || `${e}%`;
|
|
15
|
+
}
|
|
16
|
+
const w = /* @__PURE__ */ n.forwardRef(function(e, s) {
|
|
17
|
+
const {
|
|
18
|
+
format: p,
|
|
19
|
+
getAriaValueText: c = y,
|
|
20
|
+
locale: d,
|
|
21
|
+
max: a = 100,
|
|
22
|
+
min: i = 0,
|
|
23
|
+
value: t,
|
|
24
|
+
render: D,
|
|
25
|
+
className: I,
|
|
26
|
+
...g
|
|
27
|
+
} = e, [x, l] = n.useState(), R = P(p);
|
|
28
|
+
let o = "indeterminate";
|
|
29
|
+
Number.isFinite(t) && (o = t === a ? "complete" : "progressing");
|
|
30
|
+
const u = j(t, d, R.current), m = n.useMemo(() => ({
|
|
31
|
+
status: o
|
|
32
|
+
}), [o]), b = {
|
|
33
|
+
"aria-labelledby": x,
|
|
34
|
+
"aria-valuemax": a,
|
|
35
|
+
"aria-valuemin": i,
|
|
36
|
+
"aria-valuenow": t ?? void 0,
|
|
37
|
+
"aria-valuetext": c(u, t),
|
|
38
|
+
role: "progressbar"
|
|
39
|
+
}, v = n.useMemo(() => ({
|
|
40
|
+
formattedValue: u,
|
|
41
|
+
max: a,
|
|
42
|
+
min: i,
|
|
43
|
+
setLabelId: l,
|
|
44
|
+
state: m,
|
|
45
|
+
status: o,
|
|
46
|
+
value: t
|
|
47
|
+
}), [u, a, i, l, m, o, t]), N = V("div", e, {
|
|
48
|
+
state: m,
|
|
49
|
+
ref: s,
|
|
50
|
+
props: [b, g],
|
|
51
|
+
stateAttributesMapping: E
|
|
52
|
+
});
|
|
53
|
+
return /* @__PURE__ */ M.jsx(A.Provider, {
|
|
54
|
+
value: v,
|
|
55
|
+
children: N
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
process.env.NODE_ENV !== "production" && (w.displayName = "ProgressRoot");
|
|
59
|
+
export {
|
|
60
|
+
w as ProgressRoot
|
|
61
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
const e = /* @__PURE__ */ t.createContext(void 0);
|
|
3
|
+
process.env.NODE_ENV !== "production" && (e.displayName = "ProgressRootContext");
|
|
4
|
+
function s() {
|
|
5
|
+
const o = t.useContext(e);
|
|
6
|
+
if (o === void 0)
|
|
7
|
+
throw new Error("Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.");
|
|
8
|
+
return o;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
e as ProgressRootContext,
|
|
12
|
+
s as useProgressRootContext
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProgressRootDataAttributes as r } from "./ProgressRootDataAttributes.js";
|
|
2
|
+
const i = {
|
|
3
|
+
status(t) {
|
|
4
|
+
return t === "progressing" ? {
|
|
5
|
+
[r.progressing]: ""
|
|
6
|
+
} : t === "complete" ? {
|
|
7
|
+
[r.complete]: ""
|
|
8
|
+
} : t === "indeterminate" ? {
|
|
9
|
+
[r.indeterminate]: ""
|
|
10
|
+
} : null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as progressStateAttributesMapping
|
|
15
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { useRenderElement as n } from "../../utils/useRenderElement.js";
|
|
3
|
+
import { useProgressRootContext as a } from "../root/ProgressRootContext.js";
|
|
4
|
+
import { progressStateAttributesMapping as p } from "../root/stateAttributesMapping.js";
|
|
5
|
+
const i = /* @__PURE__ */ o.forwardRef(function(e, r) {
|
|
6
|
+
const {
|
|
7
|
+
render: c,
|
|
8
|
+
className: f,
|
|
9
|
+
...t
|
|
10
|
+
} = e, {
|
|
11
|
+
state: s
|
|
12
|
+
} = a();
|
|
13
|
+
return n("div", e, {
|
|
14
|
+
state: s,
|
|
15
|
+
ref: r,
|
|
16
|
+
props: t,
|
|
17
|
+
stateAttributesMapping: p
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
process.env.NODE_ENV !== "production" && (i.displayName = "ProgressTrack");
|
|
21
|
+
export {
|
|
22
|
+
i as ProgressTrack
|
|
23
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { useRenderElement as m } from "../../utils/useRenderElement.js";
|
|
3
|
+
import { useProgressRootContext as p } from "../root/ProgressRootContext.js";
|
|
4
|
+
import { progressStateAttributesMapping as f } from "../root/stateAttributesMapping.js";
|
|
5
|
+
const c = /* @__PURE__ */ u.forwardRef(function(t, s) {
|
|
6
|
+
const {
|
|
7
|
+
className: g,
|
|
8
|
+
render: V,
|
|
9
|
+
children: r,
|
|
10
|
+
...n
|
|
11
|
+
} = t, {
|
|
12
|
+
value: e,
|
|
13
|
+
formattedValue: o,
|
|
14
|
+
state: a
|
|
15
|
+
} = p(), l = e == null ? "indeterminate" : o, i = e == null ? null : o;
|
|
16
|
+
return m("span", t, {
|
|
17
|
+
state: a,
|
|
18
|
+
ref: s,
|
|
19
|
+
props: [{
|
|
20
|
+
"aria-hidden": !0,
|
|
21
|
+
children: typeof r == "function" ? r(l, e) : i
|
|
22
|
+
}, n],
|
|
23
|
+
stateAttributesMapping: f
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
process.env.NODE_ENV !== "production" && (c.displayName = "ProgressValue");
|
|
27
|
+
export {
|
|
28
|
+
c as ProgressValue
|
|
29
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const c = /* @__PURE__ */ new Map();
|
|
2
|
+
function f(t, r) {
|
|
3
|
+
const n = JSON.stringify({
|
|
4
|
+
locale: t,
|
|
5
|
+
options: r
|
|
6
|
+
}), e = c.get(n);
|
|
7
|
+
if (e)
|
|
8
|
+
return e;
|
|
9
|
+
const o = new Intl.NumberFormat(t, r);
|
|
10
|
+
return c.set(n, o), o;
|
|
11
|
+
}
|
|
12
|
+
function m(t, r, n) {
|
|
13
|
+
return t == null ? "" : f(r, n).format(t);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
c as cache,
|
|
17
|
+
m as formatNumber,
|
|
18
|
+
f as getFormatter
|
|
19
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
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-highlighted:bg-ppx-primary-b-1 data-checked:bg-ppx-primary-1! text-ppx-foreground my-0.5";
|
|
2
|
-
export declare const DROPDOWN_POPUP_CN = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] min-w-input 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
|
|
2
|
+
export declare const DROPDOWN_POPUP_CN = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] min-w-input 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 w-[max(var(--anchor-width),250px)] max-w-[var(--available-width)] text-ppx-foreground py-2";
|
|
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,iQACmO,CAAC;AAEjQ,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/tw-styles/dropdown.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,iQACmO,CAAC;AAEjQ,eAAO,MAAM,iBAAiB,iqBACkoB,CAAC;AAEjqB,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-highlighted:bg-ppx-primary-b-1 data-checked:bg-ppx-primary-1! text-ppx-foreground my-0.5", t = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] min-w-input 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
|
|
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-highlighted:bg-ppx-primary-b-1 data-checked:bg-ppx-primary-1! text-ppx-foreground my-0.5", t = "rounded-ppx-s shadow-xs max-h-[var(--available-height)] min-w-input 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 w-[max(var(--anchor-width),250px)] max-w-[var(--available-width)] text-ppx-foreground py-2", e = "z-10 outline-none";
|
|
2
2
|
export {
|
|
3
3
|
a as DROPDOWN_ITEM_CN,
|
|
4
4
|
t as DROPDOWN_POPUP_CN,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@px-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"description": "A modern React component library built with Tailwind CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -99,6 +99,10 @@
|
|
|
99
99
|
"types": "./dist/components/radio-group.d.ts",
|
|
100
100
|
"import": "./dist/components/radio-group.js"
|
|
101
101
|
},
|
|
102
|
+
"./progress": {
|
|
103
|
+
"types": "./dist/components/progress.d.ts",
|
|
104
|
+
"import": "./dist/components/progress.js"
|
|
105
|
+
},
|
|
102
106
|
"./block-checkbox-group": {
|
|
103
107
|
"types": "./dist/components/block-checkbox-group.d.ts",
|
|
104
108
|
"import": "./dist/components/block-checkbox-group.js"
|