@photon-ai/pho-ui 2.5.0 → 2.7.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/chunks/IconChevronDown-CZilB71T.js +11 -0
- package/dist/chunks/IconChevronDown-CZilB71T.js.map +1 -0
- package/dist/chunks/IconSearch-BKAHkLyX.js +14 -0
- package/dist/chunks/IconSearch-BKAHkLyX.js.map +1 -0
- package/dist/chunks/animated-height-CCO-Ocoz.js +48 -0
- package/dist/chunks/animated-height-CCO-Ocoz.js.map +1 -0
- package/dist/chunks/basic-page-DR5szOOs.js +1373 -0
- package/dist/chunks/basic-page-DR5szOOs.js.map +1 -0
- package/dist/chunks/{button-DNNs5RsT.js → button-CdqS_t5a.js} +62 -65
- package/dist/chunks/button-CdqS_t5a.js.map +1 -0
- package/dist/chunks/checkbox-Cdm08HWG.js +129 -0
- package/dist/chunks/checkbox-Cdm08HWG.js.map +1 -0
- package/dist/chunks/{choice-card-CunOnY9l.js → choice-card-BVNP1NB6.js} +2 -2
- package/dist/chunks/{choice-card-CunOnY9l.js.map → choice-card-BVNP1NB6.js.map} +1 -1
- package/dist/chunks/data-table-DwbPU0zt.js +2970 -0
- package/dist/chunks/data-table-DwbPU0zt.js.map +1 -0
- package/dist/chunks/{dialog-8SRNi_rv.js → dialog-BxKACOj5.js} +4 -4
- package/dist/chunks/{dialog-8SRNi_rv.js.map → dialog-BxKACOj5.js.map} +1 -1
- package/dist/chunks/{error-Crs-wqMC.js → error-D0yoFxCv.js} +2 -2
- package/dist/chunks/{error-Crs-wqMC.js.map → error-D0yoFxCv.js.map} +1 -1
- package/dist/chunks/is-react-component-DSnjtBmo.js +10 -0
- package/dist/chunks/is-react-component-DSnjtBmo.js.map +1 -0
- package/dist/chunks/link-provider-DXzDQ08N.js +24 -0
- package/dist/chunks/link-provider-DXzDQ08N.js.map +1 -0
- package/dist/chunks/rolldown-runtime-DG5F_Nuu.js +27 -0
- package/dist/chunks/{scroll-area-Bu7egArU.js → scroll-area-BO-9PMM7.js} +27 -26
- package/dist/chunks/scroll-area-BO-9PMM7.js.map +1 -0
- package/dist/chunks/sidebar-DVzZsCts.js +223 -0
- package/dist/chunks/sidebar-DVzZsCts.js.map +1 -0
- package/dist/chunks/skeleton-DwjSl4vC.js +18 -0
- package/dist/chunks/skeleton-DwjSl4vC.js.map +1 -0
- package/dist/chunks/{toast-DoXaRPIZ.js → toast-iSf6NuAS.js} +43 -45
- package/dist/chunks/toast-iSf6NuAS.js.map +1 -0
- package/dist/chunks/use-press-pulse-IbNstUT0.js +58 -0
- package/dist/chunks/use-press-pulse-IbNstUT0.js.map +1 -0
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox.js +4 -126
- package/dist/components/command.js +54 -57
- package/dist/components/command.js.map +1 -1
- package/dist/components/data-table.js +11 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/error.js +1 -1
- package/dist/components/phone-input.js +609 -616
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/radio-group.js +2 -2
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +35 -39
- package/dist/components/select.js.map +1 -1
- package/dist/components/skeleton.js +2 -15
- package/dist/components/toast.js +1 -1
- package/dist/index.js +94 -73
- package/dist/motion.js +89 -0
- package/dist/motion.js.map +1 -0
- package/dist/primitives/accordion.js +1 -1
- package/dist/primitives/alert-dialog.js +1 -1
- package/dist/primitives/autocomplete.js +1 -1
- package/dist/primitives/avatar.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/checkbox.js +1 -1
- package/dist/primitives/collapsible.js +1 -1
- package/dist/primitives/combobox.js +1 -1
- package/dist/primitives/context-menu.js +1 -1
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/direction-provider.js +1 -1
- package/dist/primitives/drawer.js +1 -1
- package/dist/primitives/field.js +1 -1
- package/dist/primitives/fieldset.js +1 -1
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu.js +1 -1
- package/dist/primitives/menubar.js +1 -1
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +1 -1
- package/dist/primitives/number-field.js +1 -1
- package/dist/primitives/otp-field.js +1 -1
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/preview-card.js +1 -1
- package/dist/primitives/progress.js +1 -1
- package/dist/primitives/radio-group.js +1 -1
- package/dist/primitives/radio.js +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/separator.js +1 -1
- package/dist/primitives/slider.js +1 -1
- package/dist/primitives/switch.js +1 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/primitives/toast.js +1 -1
- package/dist/primitives/toggle-group.js +1 -1
- package/dist/primitives/toggle.js +1 -1
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives/tooltip.js +1 -1
- package/dist/primitives.js +3 -3
- package/dist/sections/basic-page.js +16 -14
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/data-table/data-table.d.ts +227 -0
- package/dist/src/components/data-table/index.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/motion/index.d.ts +149 -0
- package/dist/src/sections/basic-page/basic-page.d.ts +63 -14
- package/dist/src/sections/basic-page/index.d.ts +1 -0
- package/dist/utils.js +13 -12
- package/package.json +10 -1
- package/dist/chunks/animated-height-C2eQstGy.js +0 -51
- package/dist/chunks/animated-height-C2eQstGy.js.map +0 -1
- package/dist/chunks/basic-page-w6ftlo0h.js +0 -1284
- package/dist/chunks/basic-page-w6ftlo0h.js.map +0 -1
- package/dist/chunks/button-DNNs5RsT.js.map +0 -1
- package/dist/chunks/link-provider-9TFNyDqO.js +0 -28
- package/dist/chunks/link-provider-9TFNyDqO.js.map +0 -1
- package/dist/chunks/rolldown-runtime-wKSmTnsc.js +0 -22
- package/dist/chunks/scroll-area-Bu7egArU.js.map +0 -1
- package/dist/chunks/sidebar-DvB-G0BP.js +0 -231
- package/dist/chunks/sidebar-DvB-G0BP.js.map +0 -1
- package/dist/chunks/toast-DoXaRPIZ.js.map +0 -1
- package/dist/chunks/use-press-pulse-8iorQPsh.js +0 -62
- package/dist/chunks/use-press-pulse-8iorQPsh.js.map +0 -1
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/skeleton.js.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as o } from "./createReactComponent-BqCmnqfX.js";
|
|
3
|
+
var e = [["path", {
|
|
4
|
+
d: "M6 9l6 6l6 -6",
|
|
5
|
+
key: "svg-0"
|
|
6
|
+
}]], t = o("outline", "chevron-down", "ChevronDown", e);
|
|
7
|
+
export {
|
|
8
|
+
t
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=IconChevronDown-CZilB71T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconChevronDown-CZilB71T.js","names":[],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.46.0_react@19.2.8/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.46.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M6 9l6 6l6 -6\", \"key\": \"svg-0\" }]];\nconst IconChevronDown = createReactComponent(\"outline\", \"chevron-down\", \"ChevronDown\", __iconNode);\n\nexport { __iconNode, IconChevronDown as default };\n//# sourceMappingURL=IconChevronDown.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;AASA,IAAM,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAiB,KAAO;AAAQ,CAAC,CAAC,GAChE,IAAkB,EAAqB,WAAW,gBAAgB,eAAe,CAAU"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./createReactComponent-BqCmnqfX.js";
|
|
3
|
+
var a = [["path", {
|
|
4
|
+
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",
|
|
5
|
+
key: "svg-0"
|
|
6
|
+
}], ["path", {
|
|
7
|
+
d: "M21 21l-6 -6",
|
|
8
|
+
key: "svg-1"
|
|
9
|
+
}]], o = e("outline", "search", "Search", a);
|
|
10
|
+
export {
|
|
11
|
+
o as t
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=IconSearch-BKAHkLyX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconSearch-BKAHkLyX.js","names":[],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.46.0_react@19.2.8/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.46.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 21l-6 -6\", \"key\": \"svg-1\" }]];\nconst IconSearch = createReactComponent(\"outline\", \"search\", \"Search\", __iconNode);\n\nexport { __iconNode, IconSearch as default };\n//# sourceMappingURL=IconSearch.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;AASA,IAAM,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAwC,KAAO;AAAQ,CAAC,GAAG,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAgB,KAAO;AAAQ,CAAC,CAAC,GAC1I,IAAa,EAAqB,WAAW,UAAU,UAAU,CAAU"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { SPRING_SETTLE as v } from "../motion.js";
|
|
3
|
+
import { useEffect as R, useRef as a } from "react";
|
|
4
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
5
|
+
import { animate as x, motion as S, useMotionValue as g, useReducedMotion as E } from "motion/react";
|
|
6
|
+
var H = v;
|
|
7
|
+
function N({ className: d, transition: r, children: p }) {
|
|
8
|
+
const s = a(null), i = a(null), t = g("auto"), c = E();
|
|
9
|
+
return R(() => {
|
|
10
|
+
const h = s.current, o = i.current;
|
|
11
|
+
if (!h || !o) return;
|
|
12
|
+
let e = null;
|
|
13
|
+
const u = new ResizeObserver((b) => {
|
|
14
|
+
const l = b[0]?.borderBoxSize?.[0], n = l ? l.blockSize : o.offsetHeight, f = t.get();
|
|
15
|
+
if (f === "auto" || c) {
|
|
16
|
+
e?.stop(), e = null, t.set(n);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
!e && Math.abs(f - n) < 0.5 || (e?.stop(), e = x(t, n, {
|
|
20
|
+
...r ?? H,
|
|
21
|
+
onComplete: () => {
|
|
22
|
+
e = null;
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
return u.observe(o), () => {
|
|
27
|
+
u.disconnect(), e?.stop();
|
|
28
|
+
};
|
|
29
|
+
}, [
|
|
30
|
+
t,
|
|
31
|
+
c,
|
|
32
|
+
r
|
|
33
|
+
]), /* @__PURE__ */ m(S.div, {
|
|
34
|
+
ref: s,
|
|
35
|
+
className: "min-h-0 overflow-hidden",
|
|
36
|
+
style: { height: t },
|
|
37
|
+
children: /* @__PURE__ */ m("div", {
|
|
38
|
+
ref: i,
|
|
39
|
+
className: d,
|
|
40
|
+
children: p
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
N as t
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=animated-height-CCO-Ocoz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animated-height-CCO-Ocoz.js","names":[],"sources":["../../src/utils/animated-height.tsx"],"sourcesContent":["import { useEffect, useRef, type ReactNode } from \"react\";\nimport { SPRING_SETTLE } from \"../motion\";\nimport {\n animate,\n motion,\n useMotionValue,\n useReducedMotion,\n type ValueAnimationTransition,\n} from \"motion/react\";\n\n/**\n * Height spring for container-size transitions — same feel as the onboarding /\n * invite card and BasicPage footer reveal: quick, critically damped (no\n * overshoot that would flash clipped content).\n */\nconst HEIGHT_SPRING = SPRING_SETTLE;\n\n/**\n * Animates its own height to follow the measured height of `children`, so\n * content swaps (search filtering, skeleton → data) glide instead of jumping.\n * Honors `prefers-reduced-motion` by snapping height with no spring.\n */\nexport function AnimatedHeight({\n className,\n transition,\n children,\n}: {\n className?: string;\n /** Spring override for the height follow. @default the Command spring */\n transition?: ValueAnimationTransition<number | \"auto\">;\n children: ReactNode;\n}) {\n const containerRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const height = useMotionValue<number | \"auto\">(\"auto\");\n const reduceMotion = useReducedMotion();\n\n useEffect(() => {\n const container = containerRef.current;\n const content = contentRef.current;\n if (!container || !content) return;\n\n let animation: ReturnType<typeof animate> | null = null;\n\n const observer = new ResizeObserver((entries) => {\n const box = entries[0]?.borderBoxSize?.[0];\n const next = box ? box.blockSize : content.offsetHeight;\n const current = height.get();\n if (current === \"auto\" || reduceMotion) {\n animation?.stop();\n animation = null;\n height.set(next);\n return;\n }\n if (!animation && Math.abs(current - next) < 0.5) return;\n animation?.stop();\n animation = animate(height, next, {\n ...(transition ?? HEIGHT_SPRING),\n onComplete: () => {\n animation = null;\n },\n });\n });\n observer.observe(content);\n\n return () => {\n observer.disconnect();\n animation?.stop();\n };\n }, [height, reduceMotion, transition]);\n\n return (\n <motion.div\n ref={containerRef}\n // Stack (and other flex parents) set `min-height: auto` on children,\n // which sizes to content and swallows the height spring. Clip and\n // allow shrinking so the measured height can actually animate.\n className=\"min-h-0 overflow-hidden\"\n style={{ height }}\n >\n <div ref={contentRef} className={className}>\n {children}\n </div>\n </motion.div>\n );\n}\n"],"mappings":";;;;;AAeA,IAAM,IAAgB;AAOtB,SAAgB,EAAe,EAC7B,WAAA,GACA,YAAA,GACA,UAAA,EAAA,GAMC;AACD,QAAM,IAAe,EAAuB,IAAI,GAC1C,IAAa,EAAuB,IAAI,GACxC,IAAS,EAAgC,MAAM,GAC/C,IAAe,EAAiB;AAEtC,SAAA,EAAA,MAAgB;AACd,UAAM,IAAY,EAAa,SACzB,IAAU,EAAW;AAC3B,QAAI,CAAC,KAAa,CAAC,EAAS;AAE5B,QAAI,IAA+C;AAEnD,UAAM,IAAW,IAAI,eAAA,CAAgB,MAAY;AAC/C,YAAM,IAAM,EAAQ,CAAA,GAAI,gBAAgB,CAAA,GAClC,IAAO,IAAM,EAAI,YAAY,EAAQ,cACrC,IAAU,EAAO,IAAI;AAC3B,UAAI,MAAY,UAAU,GAAc;AACtC,QAAA,GAAW,KAAK,GAChB,IAAY,MACZ,EAAO,IAAI,CAAI;AACf;AAAA,MACF;AACA,MAAI,CAAC,KAAa,KAAK,IAAI,IAAU,CAAI,IAAI,QAC7C,GAAW,KAAK,GAChB,IAAY,EAAQ,GAAQ,GAAM;AAAA,QAChC,GAAI,KAAc;AAAA,QAClB,YAAA,MAAkB;AAChB,UAAA,IAAY;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AACD,WAAA,EAAS,QAAQ,CAAO,GAExB,MAAa;AACX,MAAA,EAAS,WAAW,GACpB,GAAW,KAAK;AAAA,IAClB;AAAA,EACF,GAAG;AAAA,IAAC;AAAA,IAAQ;AAAA,IAAc;AAAA,EAAU,CAAC,GAGnC,gBAAA,EAAC,EAAO,KAAR;AAAA,IACE,KAAK;AAAA,IAIL,WAAU;AAAA,IACV,OAAO,EAAE,QAAA,EAAO;AAAA,IAEhB,UAAA,gBAAA,EAAC,OAAD;AAAA,MAAK,KAAK;AAAA,MAAuB,WAAA;AAAA,MAC9B,UAAA;AAAA,IACE,CAAA;AAAA,EACK,CAAA;AAEhB"}
|