@plexui/ui 0.61.1 → 0.62.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.
Files changed (84) hide show
  1. package/dist/es/components/Accordion/Accordion.js +21 -2
  2. package/dist/es/components/Accordion/Accordion.js.map +1 -1
  3. package/dist/es/components/Button/NavigationButton.js +1 -1
  4. package/dist/es/components/Button/NavigationButton.js.map +1 -1
  5. package/dist/es/components/Dialog/Dialog.js +51 -3
  6. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  7. package/dist/es/components/Dialog/sheetDrag.js +45 -12
  8. package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
  9. package/dist/es/components/Field/Field.js +3 -1
  10. package/dist/es/components/Field/Field.js.map +1 -1
  11. package/dist/es/components/Icon/svg/Array.js +3 -3
  12. package/dist/es/components/Icon/svg/Array.js.map +1 -1
  13. package/dist/es/components/Icon/svg/Boolean.js +3 -3
  14. package/dist/es/components/Icon/svg/Boolean.js.map +1 -1
  15. package/dist/es/components/Icon/svg/Clipboard.js +3 -3
  16. package/dist/es/components/Icon/svg/Clipboard.js.map +1 -1
  17. package/dist/es/components/Icon/svg/Comment.js +3 -3
  18. package/dist/es/components/Icon/svg/Comment.js.map +1 -1
  19. package/dist/es/components/Icon/svg/Error.js +3 -3
  20. package/dist/es/components/Icon/svg/Error.js.map +1 -1
  21. package/dist/es/components/Icon/svg/Function.js +3 -3
  22. package/dist/es/components/Icon/svg/Function.js.map +1 -1
  23. package/dist/es/components/Icon/svg/Number.js +3 -3
  24. package/dist/es/components/Icon/svg/Number.js.map +1 -1
  25. package/dist/es/components/Icon/svg/Object.js +3 -3
  26. package/dist/es/components/Icon/svg/Object.js.map +1 -1
  27. package/dist/es/components/Icon/svg/Report.js +3 -3
  28. package/dist/es/components/Icon/svg/Report.js.map +1 -1
  29. package/dist/es/components/Icon/svg/Storage.js +3 -3
  30. package/dist/es/components/Icon/svg/Storage.js.map +1 -1
  31. package/dist/es/components/Icon/svg/String.js +3 -3
  32. package/dist/es/components/Icon/svg/String.js.map +1 -1
  33. package/dist/es/components/Icon/svg/Text.js +3 -3
  34. package/dist/es/components/Icon/svg/Text.js.map +1 -1
  35. package/dist/es/components/Menu/Menu.js +22 -1
  36. package/dist/es/components/Menu/Menu.js.map +1 -1
  37. package/dist/es/components/PlexUIProvider/PlexUIProvider.js +40 -6
  38. package/dist/es/components/PlexUIProvider/PlexUIProvider.js.map +1 -1
  39. package/dist/es/components/PlexUIProvider/androidRipple.js +98 -0
  40. package/dist/es/components/PlexUIProvider/androidRipple.js.map +1 -0
  41. package/dist/es/components/PlexUIProvider/index.js.map +1 -1
  42. package/dist/es/components/Select/Select.js +217 -39
  43. package/dist/es/components/Select/Select.js.map +1 -1
  44. package/dist/es/components/Sidebar/Sidebar.js +6 -3
  45. package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
  46. package/dist/es/components/Sidebar/index.js +1 -1
  47. package/dist/es/components/Sidebar/index.js.map +1 -1
  48. package/dist/es/components/Toolbar/Toolbar.js +230 -5
  49. package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
  50. package/dist/es/components/Toolbar/index.js.map +1 -1
  51. package/dist/es/lib/accordionMotion.js +144 -0
  52. package/dist/es/lib/accordionMotion.js.map +1 -0
  53. package/dist/es/lib/fieldRow.js +73 -1
  54. package/dist/es/lib/fieldRow.js.map +1 -1
  55. package/dist/es/lib/presentMotion.js +151 -0
  56. package/dist/es/lib/presentMotion.js.map +1 -0
  57. package/dist/es/styles/android.css +1 -0
  58. package/dist/types/components/Accordion/Accordion.d.ts +1 -1
  59. package/dist/types/components/Button/NavigationButton.d.ts +8 -1
  60. package/dist/types/components/Field/Field.d.ts +3 -0
  61. package/dist/types/components/Icon/svg/Array.d.ts +2 -2
  62. package/dist/types/components/Icon/svg/Boolean.d.ts +2 -2
  63. package/dist/types/components/Icon/svg/Clipboard.d.ts +2 -2
  64. package/dist/types/components/Icon/svg/Comment.d.ts +2 -2
  65. package/dist/types/components/Icon/svg/Error.d.ts +2 -2
  66. package/dist/types/components/Icon/svg/Function.d.ts +2 -2
  67. package/dist/types/components/Icon/svg/Number.d.ts +2 -2
  68. package/dist/types/components/Icon/svg/Object.d.ts +2 -2
  69. package/dist/types/components/Icon/svg/Report.d.ts +2 -2
  70. package/dist/types/components/Icon/svg/Storage.d.ts +2 -2
  71. package/dist/types/components/Icon/svg/String.d.ts +2 -2
  72. package/dist/types/components/Icon/svg/Text.d.ts +2 -2
  73. package/dist/types/components/PlexUIProvider/PlexUIProvider.d.ts +10 -3
  74. package/dist/types/components/PlexUIProvider/androidRipple.d.ts +9 -0
  75. package/dist/types/components/PlexUIProvider/index.d.ts +1 -1
  76. package/dist/types/components/Select/Select.d.ts +24 -0
  77. package/dist/types/components/Sidebar/Sidebar.d.ts +8 -0
  78. package/dist/types/components/Sidebar/index.d.ts +2 -2
  79. package/dist/types/components/Toolbar/Toolbar.d.ts +16 -1
  80. package/dist/types/components/Toolbar/index.d.ts +1 -1
  81. package/dist/types/lib/accordionMotion.d.ts +20 -0
  82. package/dist/types/lib/fieldRow.d.ts +14 -0
  83. package/dist/types/lib/presentMotion.d.ts +46 -0
  84. package/package.json +2 -2
@@ -0,0 +1,151 @@
1
+ /**
2
+ * How a phone overlay comes and goes as on iOS 27.2: a sheet grows out of the button that opened it and shrinks back
3
+ * into it as it closes, on SwiftUI's spring(duration: 0.33, bounce: 0.2); a sheet the finger lets go of carries on at
4
+ * the finger's speed, to its rest or off the screen. The CSS springs (--spring-sheet, --spring-menu) are these springs
5
+ * sampled; a released sheet needs one that starts at the finger's speed, which only a runtime sample has.
6
+ */
7
+ export const SHEET_SPRING = { duration: 0.33, bounce: 0.2 };
8
+ /** A released sheet does not overshoot: past its rest it would lift off the bottom of the screen. */
9
+ export const SHEET_RELEASE_SPRING = { duration: 0.33, bounce: 0 };
10
+ export const MENU_SPRING = { duration: 0.21, bounce: 0.2 };
11
+ /** The time these springs take to settle within 0.001, as --spring-sheet-duration and --spring-menu-duration. */
12
+ export const SHEET_SPRING_MS = 495;
13
+ export const MENU_SPRING_MS = 325;
14
+ /** The longest a sheet takes to leave: back into its button, or off the screen from a finger's release. */
15
+ export const SHEET_EXIT_MS = 500;
16
+ const STEP = 1 / 2000;
17
+ const SAMPLE = 1 / 120;
18
+ const LONGEST = 2;
19
+ /**
20
+ * A spring as a CSS easing and the time it takes to settle. `velocity` is the start speed in units of the whole move
21
+ * per second: a finger at 1 px/ms with 200 px left to go is 5. `stopAtEnd` keeps it from passing its end, as a sheet
22
+ * let go of toward its rest must not lift off the bottom of the screen however fast it comes.
23
+ */
24
+ export function springEasing({ duration, bounce }, velocity = 0, stopAtEnd = false) {
25
+ const stiffness = (2 * Math.PI / duration) ** 2;
26
+ const damping = (4 * Math.PI * (1 - bounce)) / duration;
27
+ let x = 0;
28
+ let v = velocity;
29
+ let t = 0;
30
+ let settled = 0;
31
+ const samples = [[0, 0]];
32
+ let nextSample = SAMPLE;
33
+ while (t < LONGEST) {
34
+ v += (-stiffness * (x - 1) - damping * v) * STEP;
35
+ x += v * STEP;
36
+ t += STEP;
37
+ if (stopAtEnd && x >= 1) {
38
+ x = 1;
39
+ v = 0;
40
+ }
41
+ if (Math.abs(x - 1) > 0.001 || Math.abs(v) > 0.01)
42
+ settled = t;
43
+ if (t >= nextSample) {
44
+ samples.push([t, x]);
45
+ nextSample += SAMPLE;
46
+ }
47
+ if (t - settled > 0.3)
48
+ break;
49
+ }
50
+ const total = Math.max(settled, SAMPLE);
51
+ const points = samples.filter(([time]) => time < total).map(([time, value]) => {
52
+ const share = `${Math.round((time / total) * 1000) / 10}%`;
53
+ return `${Math.round(value * 1000) / 1000} ${share}`;
54
+ });
55
+ points[0] = "0";
56
+ return { easing: `linear(${[...points, "1"].join(", ")})`, ms: Math.round(total * 1000) };
57
+ }
58
+ // The control last pressed, by a finger, a pointer or a key: the button a sheet opened from. A menu item is no source:
59
+ // its menu closes as the sheet comes, so the sheet slides up as one from a menu does on iOS.
60
+ const PRESSABLE = "button, a[href], [role='button'], [role='tab'], summary";
61
+ let lastPress = null;
62
+ const watched = new WeakSet();
63
+ const remember = (event) => {
64
+ if (event instanceof KeyboardEvent && event.key !== "Enter" && event.key !== " ")
65
+ return;
66
+ const target = event.target;
67
+ const element = target instanceof Element ? target.closest(PRESSABLE) : null;
68
+ lastPress = element && !element.closest("[role='menu'], [role='listbox']") ? { element, time: event.timeStamp } : null;
69
+ };
70
+ /** Starts noting what each press lands on, once per document. */
71
+ export function watchPresentationSources(doc) {
72
+ if (!doc || watched.has(doc))
73
+ return;
74
+ watched.add(doc);
75
+ doc.addEventListener("pointerdown", remember, { capture: true, passive: true });
76
+ doc.addEventListener("keydown", remember, { capture: true, passive: true });
77
+ }
78
+ /** The control pressed just now, which an overlay opening now opens from, if any. */
79
+ export function presentationSource(doc) {
80
+ if (!doc || !lastPress)
81
+ return null;
82
+ const view = doc.defaultView;
83
+ const recent = view && view.performance.now() - lastPress.time < 1000;
84
+ return recent && lastPress.element.isConnected && lastPress.element.ownerDocument === doc ? lastPress.element : null;
85
+ }
86
+ const toPixels = (value, size) => {
87
+ if (!value)
88
+ return size / 2;
89
+ const number = Number.parseFloat(value);
90
+ if (!Number.isFinite(number))
91
+ return size / 2;
92
+ return value.endsWith("%") ? (number / 100) * size : number;
93
+ };
94
+ /**
95
+ * The transform that lays the panel, at its rest, over the source: the panel grows out of it from there. Null when
96
+ * the source is gone, has no size, lies off the screen or inside the panel: the panel then comes as it would alone.
97
+ */
98
+ export function sourceTransform(panel, source) {
99
+ if (!source?.isConnected || panel.contains(source))
100
+ return null;
101
+ const view = panel.ownerDocument.defaultView;
102
+ if (!view)
103
+ return null;
104
+ const from = source.getBoundingClientRect();
105
+ if (!from.width || !from.height)
106
+ return null;
107
+ if (from.bottom <= 0 || from.right <= 0 || from.top >= view.innerHeight || from.left >= view.innerWidth)
108
+ return null;
109
+ // The rest is the panel without the transform of its entrance, its exit or a drag, nor of one under way: its layout
110
+ // box, which transforms leave alone, inside its offset parent (the dialog's layer, which nothing transforms).
111
+ const parent = panel.offsetParent instanceof view.HTMLElement ? panel.offsetParent : null;
112
+ const base = parent?.getBoundingClientRect();
113
+ const to = base
114
+ ? new view.DOMRect(base.left + parent.clientLeft + panel.offsetLeft, base.top + parent.clientTop + panel.offsetTop, panel.offsetWidth, panel.offsetHeight)
115
+ : panel.getBoundingClientRect();
116
+ const [originX, originY] = view.getComputedStyle(panel).transformOrigin.split(" ");
117
+ if (!to.width || !to.height)
118
+ return null;
119
+ const ox = to.left + toPixels(originX, to.width);
120
+ const oy = to.top + toPixels(originY, to.height);
121
+ const sx = from.width / to.width;
122
+ const sy = from.height / to.height;
123
+ const tx = from.left - ox - sx * (to.left - ox);
124
+ const ty = from.top - oy - sy * (to.top - oy);
125
+ const round = (value) => Math.round(value * 1000) / 1000;
126
+ return `translate(${round(tx)}px, ${round(ty)}px) scale(${round(sx)}, ${round(sy)})`;
127
+ }
128
+ /**
129
+ * A phone menu covers its button, its corner on the button's (menuTriggerCover.ts), and grows from its transform
130
+ * origin, which Radix puts at that corner: the scale that makes it the button's size there is all it takes. Sizes are
131
+ * the boxes' own, so this holds before the menu is placed.
132
+ */
133
+ export function sourceScale(panel, source) {
134
+ if (!source?.isConnected || panel.contains(source))
135
+ return null;
136
+ if (!panel.offsetWidth || !panel.offsetHeight || !source.offsetWidth || !source.offsetHeight)
137
+ return null;
138
+ const round = (value) => Math.round(value * 1000) / 1000;
139
+ return `scale(${round(source.offsetWidth / panel.offsetWidth)}, ${round(source.offsetHeight / panel.offsetHeight)})`;
140
+ }
141
+ /** Whether a phone overlay may grow out of its button: not with reduced motion, nor in the Plex Android look. */
142
+ export function growsFromButton(element) {
143
+ const doc = element?.ownerDocument ?? (typeof document === "undefined" ? undefined : document);
144
+ const view = doc?.defaultView;
145
+ if (!doc || !view)
146
+ return false;
147
+ if (view.matchMedia?.("(prefers-reduced-motion: reduce)").matches)
148
+ return false;
149
+ return !(element ?? doc.documentElement).closest("[data-platform='android']");
150
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IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,YAAY;QAAE,OAAO,IAAI,CAAA;IACzG,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;IAChE,OAAO,SAAS,KAAK,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAA;AACtH,CAAC;AAED,iHAAiH;AACjH,MAAM,UAAU,eAAe,CAAC,OAAmC;IACjE,MAAM,GAAG,GAAG,OAAO,EAAE,aAAa,IAAI,CAAC,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IAC9F,MAAM,IAAI,GAAG,GAAG,EAAE,WAAW,CAAA;IAC7B,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IAC/B,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC/E,OAAO,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAA;AAC/E,CAAC","sourcesContent":["/**\n * How a phone overlay comes and goes as on iOS 27.2: a sheet grows out of the button that opened it and shrinks back\n * into it as it closes, on SwiftUI's spring(duration: 0.33, bounce: 0.2); a sheet the finger lets go of carries on at\n * the finger's speed, to its rest or off the screen. The CSS springs (--spring-sheet, --spring-menu) are these springs\n * sampled; a released sheet needs one that starts at the finger's speed, which only a runtime sample has.\n */\n\n/** SwiftUI's spring(duration:bounce:) with mass 1 */\nexport type Spring = { duration: number; bounce: number }\n\nexport const SHEET_SPRING: Spring = { duration: 0.33, bounce: 0.2 }\n/** A released sheet does not overshoot: past its rest it would lift off the bottom of the screen. */\nexport const SHEET_RELEASE_SPRING: Spring = { duration: 0.33, bounce: 0 }\nexport const MENU_SPRING: Spring = { duration: 0.21, bounce: 0.2 }\n/** The time these springs take to settle within 0.001, as --spring-sheet-duration and --spring-menu-duration. */\nexport const SHEET_SPRING_MS = 495\nexport const MENU_SPRING_MS = 325\n/** The longest a sheet takes to leave: back into its button, or off the screen from a finger's release. */\nexport const SHEET_EXIT_MS = 500\n\nconst STEP = 1 / 2000\nconst SAMPLE = 1 / 120\nconst LONGEST = 2\n\n/**\n * A spring as a CSS easing and the time it takes to settle. `velocity` is the start speed in units of the whole move\n * per second: a finger at 1 px/ms with 200 px left to go is 5. `stopAtEnd` keeps it from passing its end, as a sheet\n * let go of toward its rest must not lift off the bottom of the screen however fast it comes.\n */\nexport function springEasing(\n { duration, bounce }: Spring,\n velocity = 0,\n stopAtEnd = false,\n): { easing: string; ms: number } {\n const stiffness = (2 * Math.PI / duration) ** 2\n const damping = (4 * Math.PI * (1 - bounce)) / duration\n let x = 0\n let v = velocity\n let t = 0\n let settled = 0\n const samples: [number, number][] = [[0, 0]]\n let nextSample = SAMPLE\n while (t < LONGEST) {\n v += (-stiffness * (x - 1) - damping * v) * STEP\n x += v * STEP\n t += STEP\n if (stopAtEnd && x >= 1) {\n x = 1\n v = 0\n }\n if (Math.abs(x - 1) > 0.001 || Math.abs(v) > 0.01) settled = t\n if (t >= nextSample) {\n samples.push([t, x])\n nextSample += SAMPLE\n }\n if (t - settled > 0.3) break\n }\n const total = Math.max(settled, SAMPLE)\n const points = samples.filter(([time]) => time < total).map(([time, value]) => {\n const share = `${Math.round((time / total) * 1000) / 10}%`\n return `${Math.round(value * 1000) / 1000} ${share}`\n })\n points[0] = \"0\"\n return { easing: `linear(${[...points, \"1\"].join(\", \")})`, ms: Math.round(total * 1000) }\n}\n\n// The control last pressed, by a finger, a pointer or a key: the button a sheet opened from. A menu item is no source:\n// its menu closes as the sheet comes, so the sheet slides up as one from a menu does on iOS.\nconst PRESSABLE = \"button, a[href], [role='button'], [role='tab'], summary\"\nlet lastPress: { element: Element; time: number } | null = null\nconst watched = new WeakSet<Document>()\n\nconst remember = (event: Event) => {\n if (event instanceof KeyboardEvent && event.key !== \"Enter\" && event.key !== \" \") return\n const target = event.target\n const element = target instanceof Element ? target.closest(PRESSABLE) : null\n lastPress = element && !element.closest(\"[role='menu'], [role='listbox']\") ? { element, time: event.timeStamp } : null\n}\n\n/** Starts noting what each press lands on, once per document. */\nexport function watchPresentationSources(doc: Document | undefined) {\n if (!doc || watched.has(doc)) return\n watched.add(doc)\n doc.addEventListener(\"pointerdown\", remember, { capture: true, passive: true })\n doc.addEventListener(\"keydown\", remember, { capture: true, passive: true })\n}\n\n/** The control pressed just now, which an overlay opening now opens from, if any. */\nexport function presentationSource(doc: Document | undefined): Element | null {\n if (!doc || !lastPress) return null\n const view = doc.defaultView\n const recent = view && view.performance.now() - lastPress.time < 1000\n return recent && lastPress.element.isConnected && lastPress.element.ownerDocument === doc ? lastPress.element : null\n}\n\nconst toPixels = (value: string | undefined, size: number) => {\n if (!value) return size / 2\n const number = Number.parseFloat(value)\n if (!Number.isFinite(number)) return size / 2\n return value.endsWith(\"%\") ? (number / 100) * size : number\n}\n\n/**\n * The transform that lays the panel, at its rest, over the source: the panel grows out of it from there. Null when\n * the source is gone, has no size, lies off the screen or inside the panel: the panel then comes as it would alone.\n */\nexport function sourceTransform(panel: HTMLElement, source: Element | null): string | null {\n if (!source?.isConnected || panel.contains(source)) return null\n const view = panel.ownerDocument.defaultView\n if (!view) return null\n const from = source.getBoundingClientRect()\n if (!from.width || !from.height) return null\n if (from.bottom <= 0 || from.right <= 0 || from.top >= view.innerHeight || from.left >= view.innerWidth) return null\n // The rest is the panel without the transform of its entrance, its exit or a drag, nor of one under way: its layout\n // box, which transforms leave alone, inside its offset parent (the dialog's layer, which nothing transforms).\n const parent = panel.offsetParent instanceof view.HTMLElement ? panel.offsetParent : null\n const base = parent?.getBoundingClientRect()\n const to = base\n ? new view.DOMRect(\n base.left + parent!.clientLeft + panel.offsetLeft,\n base.top + parent!.clientTop + panel.offsetTop,\n panel.offsetWidth,\n panel.offsetHeight,\n )\n : panel.getBoundingClientRect()\n const [originX, originY] = view.getComputedStyle(panel).transformOrigin.split(\" \")\n if (!to.width || !to.height) return null\n const ox = to.left + toPixels(originX, to.width)\n const oy = to.top + toPixels(originY, to.height)\n const sx = from.width / to.width\n const sy = from.height / to.height\n const tx = from.left - ox - sx * (to.left - ox)\n const ty = from.top - oy - sy * (to.top - oy)\n const round = (value: number) => Math.round(value * 1000) / 1000\n return `translate(${round(tx)}px, ${round(ty)}px) scale(${round(sx)}, ${round(sy)})`\n}\n\n/**\n * A phone menu covers its button, its corner on the button's (menuTriggerCover.ts), and grows from its transform\n * origin, which Radix puts at that corner: the scale that makes it the button's size there is all it takes. Sizes are\n * the boxes' own, so this holds before the menu is placed.\n */\nexport function sourceScale(panel: HTMLElement, source: HTMLElement | null): string | null {\n if (!source?.isConnected || panel.contains(source)) return null\n if (!panel.offsetWidth || !panel.offsetHeight || !source.offsetWidth || !source.offsetHeight) return null\n const round = (value: number) => Math.round(value * 1000) / 1000\n return `scale(${round(source.offsetWidth / panel.offsetWidth)}, ${round(source.offsetHeight / panel.offsetHeight)})`\n}\n\n/** Whether a phone overlay may grow out of its button: not with reduced motion, nor in the Plex Android look. */\nexport function growsFromButton(element: Element | null | undefined): boolean {\n const doc = element?.ownerDocument ?? (typeof document === \"undefined\" ? undefined : document)\n const view = doc?.defaultView\n if (!doc || !view) return false\n if (view.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) return false\n return !(element ?? doc.documentElement).closest(\"[data-platform='android']\")\n}\n"]}
@@ -0,0 +1 @@
1
+ @import "@plexui/styles/styles/android.css";
@@ -3,7 +3,7 @@ import { Accordion as RadixAccordion } from "radix-ui";
3
3
  export type AccordionProps = ComponentProps<typeof RadixAccordion.Root> & {
4
4
  className?: string;
5
5
  };
6
- declare const AccordionRoot: ({ className, ...restProps }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const AccordionRoot: ({ className, ref, ...restProps }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export type AccordionItemProps = ComponentProps<typeof RadixAccordion.Item> & {
8
8
  className?: string;
9
9
  };
@@ -3,6 +3,13 @@ import { type NavigationAction } from "./NavigationGlyph.js";
3
3
  export type NavigationButtonProps = Omit<ButtonProps, "children" | "uniform" | "pill" | "iconSize"> & {
4
4
  /** Visual role only; the caller owns navigation, dismissal and submission. */
5
5
  action: NavigationAction;
6
+ /**
7
+ * The text of confirm where it is drawn as a text pill (the Plex Android look's top bar): a short word, one or two
8
+ * at most (Done, Save, Apply). The accessible name stays in `aria-label`, which falls back to it. iOS draws confirm
9
+ * as a check circle and shows no text, nor do back and close.
10
+ * @default "Done"
11
+ */
12
+ label?: string;
6
13
  };
7
14
  /** A semantic Button with a shared toolbar target and a role-specific glyph. */
8
- export declare const NavigationButton: ({ action, color, variant, mobileMaterial, size, className, ...props }: NavigationButtonProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const NavigationButton: ({ action, label, color, variant, mobileMaterial, size, className, ...props }: NavigationButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -67,6 +67,9 @@ export type FieldProps = {
67
67
  * Layout direction of label and control.
68
68
  * - "vertical": label stacked above control (default)
69
69
  * - "horizontal": label beside control
70
+ * In the Plex Android look a vertical `row` whose control is an Input or a Textarea is a field
71
+ * of an input card: the label stands in the empty field as its hint and floats over the value once the
72
+ * field has the focus or a value, with a line under the field.
70
73
  * @default "horizontal" on a `row` with a visible label, else "vertical"
71
74
  */
72
75
  orientation?: "vertical" | "horizontal";
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Array: {
2
+ declare const ArrayIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Array;
6
+ export default ArrayIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Boolean: {
2
+ declare const BooleanIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Boolean;
6
+ export default BooleanIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Clipboard: {
2
+ declare const ClipboardIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Clipboard;
6
+ export default ClipboardIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Comment: {
2
+ declare const CommentIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Comment;
6
+ export default CommentIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Error: {
2
+ declare const ErrorIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Error;
6
+ export default ErrorIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Function: {
2
+ declare const FunctionIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Function;
6
+ export default FunctionIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Number: {
2
+ declare const NumberIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Number;
6
+ export default NumberIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Object: {
2
+ declare const ObjectIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Object;
6
+ export default ObjectIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Report: {
2
+ declare const ReportIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Report;
6
+ export default ReportIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Storage: {
2
+ declare const StorageIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Storage;
6
+ export default StorageIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const String: {
2
+ declare const StringIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default String;
6
+ export default StringIcon;
@@ -1,6 +1,6 @@
1
1
  import type { SVGProps } from "react";
2
- declare const Text: {
2
+ declare const TextIcon: {
3
3
  (props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
- export default Text;
6
+ export default TextIcon;
@@ -1,12 +1,19 @@
1
1
  import { type ComponentType, type ForwardRefExoticComponent, type ReactNode } from "react";
2
+ /**
3
+ * The phone look of the components (with `@plexui/styles/styles/touch.css`): `"ios"` draws iOS 26, `"android"` the
4
+ * Plex Android look, `"auto"` the Android look on an Android browser and iOS elsewhere.
5
+ */
6
+ export type PlexUIPlatform = "auto" | "ios" | "android";
2
7
  /**
3
8
  * Shared context for all Plex UI components - wrap your app in this
4
9
  * provider to use Plex UI components.
5
10
  *
6
- * It's pretty thin right now, we only use it to hold onto the component you
7
- * use for rendering Links, but it could be expanded in the future.
11
+ * It holds the component you use for rendering Links and picks the phone
12
+ * look (`platform`).
8
13
  */
9
- export declare function PlexUIProvider({ children, linkComponent, }: {
14
+ export declare function PlexUIProvider({ children, linkComponent, platform, }: {
10
15
  children: ReactNode;
11
16
  linkComponent: ComponentType<any> | ForwardRefExoticComponent<any> | "a";
17
+ /** The phone look: iOS 26, the Plex Android look, or `"auto"` (Android on an Android browser) */
18
+ platform?: PlexUIPlatform;
12
19
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The press of the Plex Android look: a ripple, as Android's RippleDrawable draws one (its timing and colors are in
3
+ * `@plexui/styles/styles/android.css`). PlexUIProvider listens for presses while the platform is Android; a press
4
+ * gives the control under the finger where its circle starts and how far it grows, as custom properties, and
5
+ * restarts its animation (`data-ripple`). The styles decide which controls draw it, in what shape and color. The same
6
+ * file is in @plexui/vue.
7
+ */
8
+ /** Starts the ripple on the document; the returned function stops it once every caller has. */
9
+ export declare function installAndroidRipple(): () => void;
@@ -1 +1 @@
1
- export { PlexUIProvider } from "./PlexUIProvider.js";
1
+ export { PlexUIProvider, type PlexUIPlatform } from "./PlexUIProvider.js";
@@ -253,6 +253,30 @@ export type SelectProps<T extends Option> = (SingleSelectProps<T> | MultiSelectP
253
253
  open: boolean;
254
254
  onToggle: () => void;
255
255
  }) => ReactNode;
256
+ /**
257
+ * What a press opens on Android: the Plex Android look (`data-platform="android"` on the document's root) in a
258
+ * window 767px wide or narrower. `dialog`, Android's choice dialog: the setting's name over a row for each option,
259
+ * and Cancel. With one choice a row has a radio, and a press on it chooses it and closes the dialog; a `multiple`
260
+ * select has a checkbox in each row and OK, which applies the rows checked. `menu`, the popup of the options. iOS
261
+ * and a desktop always open the menu.
262
+ * @default "dialog", or "menu" for a `multiple` select
263
+ */
264
+ picker?: "dialog" | "menu";
265
+ /**
266
+ * Android: the title of the picker dialog (`picker="dialog"`), the setting's name.
267
+ * @default the field's label (`aria-labelledby`), else `aria-label`
268
+ */
269
+ title?: string;
270
+ /**
271
+ * Android: the button that closes the picker dialog (`picker="dialog"`) with no change.
272
+ * @default Cancel
273
+ */
274
+ cancelLabel?: string;
275
+ /**
276
+ * Android: the button of a `multiple` select's picker dialog (`picker="dialog"`) that applies the rows checked.
277
+ * @default OK
278
+ */
279
+ okLabel?: string;
256
280
  };
257
281
  export declare const Select: <T extends Option>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
258
282
  type SelectTriggerProps = {
@@ -45,6 +45,11 @@ export type SidebarGroupLabelProps = ComponentProps<"span"> & {
45
45
  * @default "lg"
46
46
  */
47
47
  size?: "sm" | "lg";
48
+ /**
49
+ * Starts the label 12px in, at the rows' text. Off, it starts at the group's edge: a label over a panel of fields.
50
+ * @default true
51
+ */
52
+ inset?: boolean;
48
53
  };
49
54
  export declare const SidebarGroupLabel: import("react").ForwardRefExoticComponent<Omit<SidebarGroupLabelProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
50
55
  export type SidebarGroupActionProps = ComponentProps<"div">;
@@ -114,6 +119,9 @@ export type SidebarMenuSubButtonProps = ComponentProps<"button"> & {
114
119
  indent?: 0 | 1 | 2 | 3;
115
120
  };
116
121
  export declare const SidebarMenuSubButton: import("react").ForwardRefExoticComponent<Omit<SidebarMenuSubButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
122
+ export type SidebarMenuSubButtonLabelProps = ComponentProps<"span">;
123
+ /** The text of a SidebarMenuSubButton: it fills the row, starts at its start and ends in an ellipsis. */
124
+ export declare const SidebarMenuSubButtonLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
117
125
  export type SidebarSeparatorProps = ComponentProps<"hr">;
118
126
  export declare const SidebarSeparator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & import("react").RefAttributes<HTMLHRElement>>;
119
127
  export type SidebarCardProps = ComponentProps<"div"> & {
@@ -1,4 +1,4 @@
1
- export { Sidebar, SidebarCard, SidebarCardContent, SidebarCardFooter, SidebarCardHeader, SidebarCardTitle, SidebarCardTitleLink, SidebarContent, SidebarFooter, SidebarFooterLinks, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuButtonIcon, SidebarMenuButtonLabel, SidebarMenuChevron, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarMobile, SidebarMobileFooter, SidebarMobileHeader, SidebarMobileMenuButton, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from "./Sidebar.js";
2
- export type { SidebarCardContentProps, SidebarCardFooterProps, SidebarCardHeaderProps, SidebarCardProps, SidebarCardTitleLinkProps, SidebarCardTitleProps, SidebarCollapsible, SidebarContentProps, SidebarFooterLinksProps, SidebarFooterProps, SidebarGroupActionProps, SidebarGroupContentProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderProps, SidebarInputProps, SidebarInsetProps, SidebarLayoutProps, SidebarMenuActionProps, SidebarMenuBadgeProps, SidebarMenuButtonIconProps, SidebarMenuButtonLabelProps, SidebarMenuButtonProps, SidebarMenuChevronProps, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeletonProps, SidebarMenuSubButtonProps, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarMobileFooterProps, SidebarMobileHeaderProps, SidebarMobileMenuButtonProps, SidebarMobileProps, SidebarProps, SidebarRailProps, SidebarSeparatorProps, SidebarSide, SidebarTriggerProps, SidebarProviderVariant, SidebarVariant, } from "./Sidebar.js";
1
+ export { Sidebar, SidebarCard, SidebarCardContent, SidebarCardFooter, SidebarCardHeader, SidebarCardTitle, SidebarCardTitleLink, SidebarContent, SidebarFooter, SidebarFooterLinks, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuButtonIcon, SidebarMenuButtonLabel, SidebarMenuChevron, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubButtonLabel, SidebarMenuSubItem, SidebarMobile, SidebarMobileFooter, SidebarMobileHeader, SidebarMobileMenuButton, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from "./Sidebar.js";
2
+ export type { SidebarCardContentProps, SidebarCardFooterProps, SidebarCardHeaderProps, SidebarCardProps, SidebarCardTitleLinkProps, SidebarCardTitleProps, SidebarCollapsible, SidebarContentProps, SidebarFooterLinksProps, SidebarFooterProps, SidebarGroupActionProps, SidebarGroupContentProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderProps, SidebarInputProps, SidebarInsetProps, SidebarLayoutProps, SidebarMenuActionProps, SidebarMenuBadgeProps, SidebarMenuButtonIconProps, SidebarMenuButtonLabelProps, SidebarMenuButtonProps, SidebarMenuChevronProps, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeletonProps, SidebarMenuSubButtonProps, SidebarMenuSubButtonLabelProps, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarMobileFooterProps, SidebarMobileHeaderProps, SidebarMobileMenuButtonProps, SidebarMobileProps, SidebarProps, SidebarRailProps, SidebarSeparatorProps, SidebarSide, SidebarTriggerProps, SidebarProviderVariant, SidebarVariant, } from "./Sidebar.js";
3
3
  export type { SidebarContextValue, SidebarProviderProps, SidebarState } from "./useSidebarContext.js";
4
4
  export { SIDEBAR_CONSTANTS } from "./useSidebarContext.js";
@@ -1,5 +1,14 @@
1
1
  import { type HTMLAttributes, type ReactNode, type Ref } from "react";
2
2
  export type ToolbarPlacement = "top" | "bottom";
3
+ /**
4
+ * Where a screen's search field stands (`Toolbar.Content search`):
5
+ * - `"bottom"`: the field itself, in the bar it is written in: in a bottom bar, in reach of the thumb, as iOS 26 places a
6
+ * screen's search
7
+ * - `"top"`: a search button first among the top bar's trailing actions; pressed, it grows into the field over the bar,
8
+ * the bar's leading action turns into a back arrow that closes it, and a Sheet goes full screen on Android
9
+ * - `"auto"`: the platform's place, the bottom on iOS and the top in the Plex Android look (`data-platform="android"`)
10
+ */
11
+ export type ToolbarSearchPlacement = "auto" | "top" | "bottom";
3
12
  /** Title layouts of the phone top bar. */
4
13
  export type ToolbarTitleStyle = "inline" | "large" | "compact-large" | "compact-medium";
5
14
  export type ToolbarTitleAlign = "center" | "start";
@@ -83,9 +92,15 @@ declare namespace ToolbarTrailing {
83
92
  export type ToolbarContentProps = ToolbarSlotProps & {
84
93
  /** Stretch between the leading and trailing items, as a search field does. */
85
94
  fill?: boolean;
95
+ /**
96
+ * Marks the content as the screen's search field (an `Input`) and sets where it stands (`ToolbarSearchPlacement`):
97
+ * write it in the bottom bar, and at the top it becomes a search button of the top bar beside it, a Page's or a
98
+ * Sheet's, that opens the field over that bar. `true` is `"auto"`: the bottom on iOS, the top on Android.
99
+ */
100
+ search?: boolean | ToolbarSearchPlacement;
86
101
  };
87
102
  /** Custom middle content: a search field, a segmented control or a single centered action. */
88
- declare function ToolbarContent({ fill, className, ...restProps }: ToolbarContentProps): import("react/jsx-runtime").JSX.Element;
103
+ declare function ToolbarContent({ fill, search, className, ...restProps }: ToolbarContentProps): import("react/jsx-runtime").JSX.Element;
89
104
  declare namespace ToolbarContent {
90
105
  var displayName: string;
91
106
  }
@@ -1 +1 @@
1
- export { Toolbar, ToolbarHostContext, type BarBackground, type BarBackgroundAlias, type ToolbarBackground, type ToolbarContentProps, type ToolbarHost, type ToolbarPlacement, type ToolbarProps, type ToolbarSlotProps, type ToolbarTitleAlign, type ToolbarTitleProps, type ToolbarTitleStyle, } from "./Toolbar.js";
1
+ export { Toolbar, ToolbarHostContext, type BarBackground, type BarBackgroundAlias, type ToolbarBackground, type ToolbarContentProps, type ToolbarHost, type ToolbarPlacement, type ToolbarProps, type ToolbarSearchPlacement, type ToolbarSlotProps, type ToolbarTitleAlign, type ToolbarTitleProps, type ToolbarTitleStyle, } from "./Toolbar.js";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * An Accordion item opens and closes as an iOS 27.2 DisclosureGroup: the panel takes its height at once, its content
3
+ * shows through a clip that grows down from the trigger (the CSS keyframes of the panel), and what follows the item
4
+ * slides down into place, or up when it closes, by a transform. The page lays out once per toggle, not once a frame.
5
+ *
6
+ * The panel's `data-state` changing (or an open panel being inserted, as `asChild` does) is the toggle: a
7
+ * MutationObserver sees it after the framework has updated the DOM and before the frame paints, so the panel's height
8
+ * is known and what follows can be moved back to where it was, then let go. Each move is added to what the element
9
+ * already does (`composite: "add"`), so one item closing while another opens, a nested item inside a moving one, or a
10
+ * quick second toggle all sum to where the layout puts things. Time and curve are the panel's
11
+ * `--accordion-motion-duration` and `--accordion-motion-easing`, which its keyframes use too. With reduced motion,
12
+ * or a zero duration, nothing moves.
13
+ */
14
+ type Classes = {
15
+ root: string;
16
+ item: string;
17
+ content: string;
18
+ };
19
+ export declare function attachAccordionMotion(root: HTMLElement, classes: Classes): () => void;
20
+ export {};
@@ -12,3 +12,17 @@ export declare const FieldColumnsContext: import("react").Context<boolean>;
12
12
  export declare const useFieldColumns: () => boolean;
13
13
  /** The control's own `pill`, or else the shape of its row. */
14
14
  export declare const useFieldRowPill: (pill: boolean | undefined) => boolean;
15
+ /**
16
+ * In the Plex Android look a text field under its label (a vertical `Field row` with the label shown) is a field of
17
+ * an input card: the label stands in the field while it is empty, which the styles tell by `:placeholder-shown`. That
18
+ * needs a placeholder, so there a field without one gets a blank one; elsewhere (iOS, the desktop) nothing is added.
19
+ * `start` gives it and follows the platform and the field's own placeholder, `sync` checks again after a render,
20
+ * `stop` takes it back.
21
+ */
22
+ export declare function blankPlaceholder(controlId: () => string): {
23
+ start: () => void;
24
+ sync: () => void;
25
+ stop: () => void;
26
+ };
27
+ /** `blankPlaceholder` for a Field: on while `active` (a vertical row with its label shown). */
28
+ export declare function useBlankPlaceholder(controlId: string, active: boolean): void;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * How a phone overlay comes and goes as on iOS 27.2: a sheet grows out of the button that opened it and shrinks back
3
+ * into it as it closes, on SwiftUI's spring(duration: 0.33, bounce: 0.2); a sheet the finger lets go of carries on at
4
+ * the finger's speed, to its rest or off the screen. The CSS springs (--spring-sheet, --spring-menu) are these springs
5
+ * sampled; a released sheet needs one that starts at the finger's speed, which only a runtime sample has.
6
+ */
7
+ /** SwiftUI's spring(duration:bounce:) with mass 1 */
8
+ export type Spring = {
9
+ duration: number;
10
+ bounce: number;
11
+ };
12
+ export declare const SHEET_SPRING: Spring;
13
+ /** A released sheet does not overshoot: past its rest it would lift off the bottom of the screen. */
14
+ export declare const SHEET_RELEASE_SPRING: Spring;
15
+ export declare const MENU_SPRING: Spring;
16
+ /** The time these springs take to settle within 0.001, as --spring-sheet-duration and --spring-menu-duration. */
17
+ export declare const SHEET_SPRING_MS = 495;
18
+ export declare const MENU_SPRING_MS = 325;
19
+ /** The longest a sheet takes to leave: back into its button, or off the screen from a finger's release. */
20
+ export declare const SHEET_EXIT_MS = 500;
21
+ /**
22
+ * A spring as a CSS easing and the time it takes to settle. `velocity` is the start speed in units of the whole move
23
+ * per second: a finger at 1 px/ms with 200 px left to go is 5. `stopAtEnd` keeps it from passing its end, as a sheet
24
+ * let go of toward its rest must not lift off the bottom of the screen however fast it comes.
25
+ */
26
+ export declare function springEasing({ duration, bounce }: Spring, velocity?: number, stopAtEnd?: boolean): {
27
+ easing: string;
28
+ ms: number;
29
+ };
30
+ /** Starts noting what each press lands on, once per document. */
31
+ export declare function watchPresentationSources(doc: Document | undefined): void;
32
+ /** The control pressed just now, which an overlay opening now opens from, if any. */
33
+ export declare function presentationSource(doc: Document | undefined): Element | null;
34
+ /**
35
+ * The transform that lays the panel, at its rest, over the source: the panel grows out of it from there. Null when
36
+ * the source is gone, has no size, lies off the screen or inside the panel: the panel then comes as it would alone.
37
+ */
38
+ export declare function sourceTransform(panel: HTMLElement, source: Element | null): string | null;
39
+ /**
40
+ * A phone menu covers its button, its corner on the button's (menuTriggerCover.ts), and grows from its transform
41
+ * origin, which Radix puts at that corner: the scale that makes it the button's size there is all it takes. Sizes are
42
+ * the boxes' own, so this holds before the menu is placed.
43
+ */
44
+ export declare function sourceScale(panel: HTMLElement, source: HTMLElement | null): string | null;
45
+ /** Whether a phone overlay may grow out of its button: not with reduced motion, nor in the Plex Android look. */
46
+ export declare function growsFromButton(element: Element | null | undefined): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/ui",
3
- "version": "0.61.1",
3
+ "version": "0.62.1",
4
4
  "description": "Modern design system for building high-quality applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -99,7 +99,7 @@
99
99
  "@maskito/core": "^5.2.2",
100
100
  "@maskito/kit": "^5.2.2",
101
101
  "@maskito/react": "^5.2.2",
102
- "@plexui/styles": "^0.16.6",
102
+ "@plexui/styles": "^0.17.0",
103
103
  "@radix-ui/react-dismissable-layer": "1.2.1",
104
104
  "@radix-ui/react-focus-guards": "1.2.0",
105
105
  "@radix-ui/react-focus-scope": "1.3.1",