@plexui/vue 0.41.1 → 0.42.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 (87) hide show
  1. package/dist/es/components/Accordion/Accordion.js +18 -0
  2. package/dist/es/components/Accordion/Accordion.js.map +1 -1
  3. package/dist/es/components/Button/NavigationButton.js +13 -2
  4. package/dist/es/components/Button/NavigationButton.js.map +1 -1
  5. package/dist/es/components/Dialog/Dialog.js +47 -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 +32 -3
  10. package/dist/es/components/Field/Field.js.map +1 -1
  11. package/dist/es/components/Icon/svg/Array.js +4 -4
  12. package/dist/es/components/Icon/svg/Array.js.map +1 -1
  13. package/dist/es/components/Icon/svg/Boolean.js +4 -4
  14. package/dist/es/components/Icon/svg/Boolean.js.map +1 -1
  15. package/dist/es/components/Icon/svg/Clipboard.js +4 -4
  16. package/dist/es/components/Icon/svg/Clipboard.js.map +1 -1
  17. package/dist/es/components/Icon/svg/Comment.js +4 -4
  18. package/dist/es/components/Icon/svg/Comment.js.map +1 -1
  19. package/dist/es/components/Icon/svg/Error.js +4 -4
  20. package/dist/es/components/Icon/svg/Error.js.map +1 -1
  21. package/dist/es/components/Icon/svg/Function.js +4 -4
  22. package/dist/es/components/Icon/svg/Function.js.map +1 -1
  23. package/dist/es/components/Icon/svg/Number.js +4 -4
  24. package/dist/es/components/Icon/svg/Number.js.map +1 -1
  25. package/dist/es/components/Icon/svg/Object.js +4 -4
  26. package/dist/es/components/Icon/svg/Object.js.map +1 -1
  27. package/dist/es/components/Icon/svg/Report.js +4 -4
  28. package/dist/es/components/Icon/svg/Report.js.map +1 -1
  29. package/dist/es/components/Icon/svg/Storage.js +4 -4
  30. package/dist/es/components/Icon/svg/Storage.js.map +1 -1
  31. package/dist/es/components/Icon/svg/String.js +4 -4
  32. package/dist/es/components/Icon/svg/String.js.map +1 -1
  33. package/dist/es/components/Icon/svg/Text.js +4 -4
  34. package/dist/es/components/Icon/svg/Text.js.map +1 -1
  35. package/dist/es/components/Menu/Menu.js +29 -2
  36. package/dist/es/components/Menu/Menu.js.map +1 -1
  37. package/dist/es/components/PlexUIProvider/PlexUIProvider.js +43 -3
  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 +364 -22
  43. package/dist/es/components/Select/Select.js.map +1 -1
  44. package/dist/es/components/Sidebar/Sidebar.js +8 -1
  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 +276 -17
  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 +54 -0
  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/types/components/Button/NavigationButton.d.ts +30 -1
  58. package/dist/types/components/ContextMenu/ContextMenu.d.ts +8 -8
  59. package/dist/types/components/Field/Field.d.ts +12 -2
  60. package/dist/types/components/FloatingLabelSelect/FloatingLabelSelect.d.ts +1 -1
  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 +20 -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 +51 -0
  77. package/dist/types/components/Sidebar/Sidebar.d.ts +20 -0
  78. package/dist/types/components/Sidebar/index.d.ts +2 -2
  79. package/dist/types/components/Sidebar/useSidebarContext.d.ts +1 -1
  80. package/dist/types/components/TabBar/TabBar.d.ts +4 -4
  81. package/dist/types/components/Toast/Toaster.d.ts +1 -1
  82. package/dist/types/components/Toolbar/Toolbar.d.ts +49 -12
  83. package/dist/types/components/Toolbar/index.d.ts +1 -1
  84. package/dist/types/lib/accordionMotion.d.ts +20 -0
  85. package/dist/types/lib/fieldRow.d.ts +12 -0
  86. package/dist/types/lib/presentMotion.d.ts +46 -0
  87. package/package.json +2 -2
@@ -1,6 +1,8 @@
1
1
  import { isPhoneLayout } from "../../lib/phoneLayout.js";
2
+ import { SHEET_EXIT_MS, SHEET_RELEASE_SPRING, springEasing } from "../../lib/presentMotion.js";
2
3
  // A bottom sheet follows the finger. A drag from its top 44px moves it 1:1, never up. Past 30% of its
3
- // height, or at 0.5px/ms, it closes; otherwise it returns. Buttons in that strip keep their press.
4
+ // height, or at 0.5px/ms, it closes; otherwise it returns. Either way it goes on at the finger's speed, on a spring
5
+ // that starts at it, as a sheet let go of does on iOS. Buttons in that strip keep their press.
4
6
  // As on iOS, a pull down that starts anywhere else moves the sheet too once the content under the finger is at
5
7
  // its top: the first move decides, down and mostly vertical with every scroller under the finger at its top
6
8
  // takes the sheet; up, sideways, a move another handler took, a field, a control that pans by itself or a
@@ -21,6 +23,11 @@ const EXITING = "[data-exiting], [data-exiting-active]";
21
23
  // A sheet at its full height says so: a sheet under it then steps back, as one presented from a sheet does on iOS.
22
24
  // A shorter sheet leaves the one under it in place, as a medium detent does.
23
25
  const FULL = "data-sheet-full";
26
+ // A sheet that grew out of its button would shrink back into it; one let go of leaves down instead (Dialog sets it).
27
+ const PRESENTED_FROM = "data-presented-from";
28
+ const EXIT_DURATION = "--dialog-exit-duration";
29
+ const EXIT_EASING = "--dialog-exit-easing";
30
+ const reducedMotion = (view) => Boolean(view.matchMedia?.("(prefers-reduced-motion: reduce)").matches);
24
31
  const watchFullHeight = (panel, view) => {
25
32
  if (!view.ResizeObserver)
26
33
  return () => { };
@@ -68,20 +75,27 @@ export const attachSheetDrag = (panel, close) => {
68
75
  stopSettling();
69
76
  clearInline();
70
77
  panel.style.removeProperty(DRAG_TRANSFORM);
78
+ panel.style.removeProperty(EXIT_DURATION);
79
+ panel.style.removeProperty(EXIT_EASING);
71
80
  };
72
81
  const onSettled = (event) => {
73
82
  if (event.target === panel && event.propertyName === "transform")
74
83
  clear();
75
84
  };
76
- const returnToRest = () => {
85
+ // `from` is where the sheet is let go of, `velocity` the finger's speed down in px/ms: the sheet starts back at it.
86
+ const returnToRest = (from = 0, velocity = 0) => {
77
87
  stopSettling();
78
- if (view.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
88
+ if (reducedMotion(view)) {
79
89
  clear();
80
90
  return;
81
91
  }
82
- panel.style.transition = "transform var(--motion-enter) var(--cubic-enter)";
92
+ // Back up is the way to rest: a finger still going down starts it the other way.
93
+ const spring = springEasing(SHEET_RELEASE_SPRING, from > 0 ? (-velocity * 1000) / from : 0, true);
94
+ panel.style.transition = `transform ${spring.ms}ms ${spring.easing}`;
83
95
  panel.style.transform = "";
84
96
  panel.style.removeProperty(DRAG_TRANSFORM);
97
+ panel.style.removeProperty(EXIT_DURATION);
98
+ panel.style.removeProperty(EXIT_EASING);
85
99
  const durationText = view.getComputedStyle(panel).transitionDuration;
86
100
  const duration = Number.parseFloat(durationText) * (durationText.endsWith("ms") ? 1 : 1000);
87
101
  if (duration === 0) {
@@ -170,29 +184,48 @@ export const attachSheetDrag = (panel, close) => {
170
184
  if (fromContent && travelled > DECIDE && event.cancelable)
171
185
  event.preventDefault();
172
186
  fromContent = false;
173
- // A finger that rested before lifting is no flick.
174
- const flick = speed > CLOSE_SPEED && event.timeStamp - lastTime < REST;
187
+ // A finger that rested before lifting is no flick, and gives the sheet no speed.
188
+ const moving = event.timeStamp - lastTime < REST;
189
+ const velocity = moving ? speed : 0;
190
+ const flick = speed > CLOSE_SPEED && moving;
175
191
  startY = null;
176
192
  if (travelled <= 0) {
177
193
  clear();
178
194
  return;
179
195
  }
180
- if (travelled > panel.getBoundingClientRect().height * CLOSE_SHARE || flick) {
196
+ const height = panel.getBoundingClientRect().height;
197
+ if (travelled > height * CLOSE_SHARE || flick) {
181
198
  // The normal/exit-start CSS states retain this exact release position.
182
199
  // No inline transform or transition may mask the active CSS exit.
183
200
  panel.style.setProperty(DRAG_TRANSFORM, `translateY(${travelled}px)`);
184
201
  clearInline();
202
+ // The rest of the way down goes on at the finger's speed, within the time the dialog gives its exit
203
+ const presentedFrom = panel.hasAttribute(PRESENTED_FROM);
204
+ panel.removeAttribute(PRESENTED_FROM);
205
+ if (!reducedMotion(view)) {
206
+ const left = Math.max(1, height - travelled);
207
+ const spring = springEasing(SHEET_RELEASE_SPRING, (Math.max(0, velocity) * 1000) / left, true);
208
+ panel.style.setProperty(EXIT_DURATION, `${Math.min(spring.ms, SHEET_EXIT_MS)}ms`);
209
+ panel.style.setProperty(EXIT_EASING, spring.easing);
210
+ }
185
211
  // An owner can veto close. Register before close, which can detach us.
186
212
  settleTimer = view.setTimeout(() => {
187
213
  settleTimer = undefined;
188
- if (panel.isConnected && !panel.closest(EXITING))
189
- returnToRest();
214
+ if (!panel.isConnected || panel.closest(EXITING))
215
+ return;
216
+ // An owner that kept the dialog open without saying so: it still goes back into its button later
217
+ if (presentedFrom)
218
+ panel.setAttribute(PRESENTED_FROM, "");
219
+ returnToRest(travelled, velocity);
190
220
  }, SETTLE);
191
- if (close(event) === false)
192
- returnToRest();
221
+ if (close(event) === false) {
222
+ if (presentedFrom)
223
+ panel.setAttribute(PRESENTED_FROM, "");
224
+ returnToRest(travelled, velocity);
225
+ }
193
226
  return;
194
227
  }
195
- returnToRest();
228
+ returnToRest(travelled, velocity);
196
229
  };
197
230
  const onCancel = () => {
198
231
  startY = null;
@@ -1 +1 @@
1
- {"version":3,"file":"sheetDrag.js","sourceRoot":"","sources":["../../../../src/components/Dialog/sheetDrag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,sGAAsG;AACtG,mGAAmG;AACnG,+GAA+G;AAC/G,4GAA4G;AAC5G,0GAA0G;AAC1G,sFAAsF;AACtF,MAAM,IAAI,GAAG,EAAE,CAAA;AACf,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,IAAI,GAAG,GAAG,CAAA;AAChB,MAAM,MAAM,GAAG,GAAG,CAAA;AAClB,MAAM,WAAW,GAAG,qDAAqD,CAAA;AACzE,MAAM,QAAQ,GAAG,4FAA4F,CAAA;AAC7G,6GAA6G;AAC7G,MAAM,MAAM,GAAG,CAAC,CAAA;AAChB,yFAAyF;AACzF,MAAM,IAAI,GAAG,GAAG,CAAA;AAChB,MAAM,cAAc,GAAG,+BAA+B,CAAA;AACtD,MAAM,OAAO,GAAG,uCAAuC,CAAA;AACvD,mHAAmH;AACnH,6EAA6E;AAC7E,MAAM,IAAI,GAAG,iBAAiB,CAAA;AAE9B,MAAM,eAAe,GAAG,CAAC,KAAkB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EAAE,CAAC,CAAA;IAC/D,KAAK,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;IACzC,KAAK,CAAC,gBAAgB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;IAE/C,OAAO,GAAG,EAAE;QACV,WAAW,EAAE,CAAA;QACb,aAAa,EAAE,UAAU,EAAE,CAAA;QAC3B,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;QAChD,KAAK,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;QAC9C,KAAK,CAAC,mBAAmB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QAC5C,KAAK,CAAC,mBAAmB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;QAClD,MAAM,GAAG,IAAI,CAAA;QACb,OAAO,GAAG,IAAI,CAAA;QACd,KAAK,EAAE,CAAA;IACT,CAAC,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { isPhoneLayout } from \"../../lib/phoneLayout.js\"\n\n// A bottom sheet follows the finger. A drag from its top 44px moves it 1:1, never up. Past 30% of its\n// height, or at 0.5px/ms, it closes; otherwise it returns. Buttons in that strip keep their press.\n// As on iOS, a pull down that starts anywhere else moves the sheet too once the content under the finger is at\n// its top: the first move decides, down and mostly vertical with every scroller under the finger at its top\n// takes the sheet; up, sideways, a move another handler took, a field, a control that pans by itself or a\n// finger that rested first (a hold: Sortable, a context menu) stays with the content.\nconst GRIP = 44\nconst CLOSE_SHARE = 0.3\nconst CLOSE_SPEED = 0.5\nconst REST = 100\nconst SETTLE = 400\nconst INTERACTIVE = \"a, button, input, select, textarea, [role='button']\"\nconst EDITABLE = \"input, textarea, select, [contenteditable]:not([contenteditable='false']), [role='slider']\"\n// The move that settles which way the finger goes, under the browser's own slop so it can still be cancelled\nconst DECIDE = 4\n// A finger that rests this long holds (a Sortable row, a context menu) rather than pulls\nconst HOLD = 200\nconst DRAG_TRANSFORM = \"--dialog-panel-drag-transform\"\nconst EXITING = \"[data-exiting], [data-exiting-active]\"\n// A sheet at its full height says so: a sheet under it then steps back, as one presented from a sheet does on iOS.\n// A shorter sheet leaves the one under it in place, as a medium detent does.\nconst FULL = \"data-sheet-full\"\n\nconst watchFullHeight = (panel: HTMLElement, view: Window & typeof globalThis) => {\n if (!view.ResizeObserver) return () => {}\n const update = () => {\n const max = Number.parseFloat(view.getComputedStyle(panel).maxHeight)\n const full = Number.isFinite(max) && panel.offsetHeight >= max - 1\n if (full !== panel.hasAttribute(FULL)) panel.toggleAttribute(FULL, full)\n }\n const observer = new view.ResizeObserver(update)\n // Its height with the border, as `offsetHeight` reads it\n observer.observe(panel, { box: \"border-box\" })\n update()\n return () => {\n observer.disconnect()\n panel.removeAttribute(FULL)\n }\n}\n\n/** `close` returns false when the owner keeps the dialog open: the sheet then returns at once. */\nexport const attachSheetDrag = (panel: HTMLElement, close: (event: TouchEvent) => boolean | void) => {\n const view = panel.ownerDocument.defaultView\n if (!view) return () => {}\n const unwatchFull = watchFullHeight(panel, view)\n let startY: number | null = null\n // A touch in the content that may become a pull, until its first move says which way it goes\n let pending: { x: number; y: number; time: number; target: Element } | null = null\n // The pull began in the content: its release must not press what lies under the finger\n let fromContent = false\n let lastY = 0\n let lastTime = 0\n let speed = 0\n let settleTimer: number | undefined\n\n const stopSettling = () => {\n if (settleTimer !== undefined) view.clearTimeout(settleTimer)\n settleTimer = undefined\n panel.removeEventListener(\"transitionend\", onSettled)\n }\n const clearInline = () => {\n panel.style.transition = \"\"\n panel.style.transform = \"\"\n }\n const clear = () => {\n stopSettling()\n clearInline()\n panel.style.removeProperty(DRAG_TRANSFORM)\n }\n const onSettled = (event: TransitionEvent) => {\n if (event.target === panel && event.propertyName === \"transform\") clear()\n }\n const returnToRest = () => {\n stopSettling()\n if (view.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches) {\n clear()\n return\n }\n panel.style.transition = \"transform var(--motion-enter) var(--cubic-enter)\"\n panel.style.transform = \"\"\n panel.style.removeProperty(DRAG_TRANSFORM)\n const durationText = view.getComputedStyle(panel).transitionDuration\n const duration = Number.parseFloat(durationText) * (durationText.endsWith(\"ms\") ? 1 : 1000)\n if (duration === 0) {\n clear()\n return\n }\n panel.addEventListener(\"transitionend\", onSettled)\n // A theme can lengthen the token or remove the transition altogether.\n // This cleanup must not cut a valid longer transition at the veto timeout.\n settleTimer = view.setTimeout(clear, Math.max(SETTLE, Number.isFinite(duration) ? duration : 0))\n }\n\n const begin = (clientY: number, time: number) => {\n stopSettling()\n startY = clientY\n lastY = clientY\n lastTime = time\n speed = 0\n }\n\n // Every element from the target up to the panel: one that can scroll up, or pans by itself, keeps the move.\n const contentTakes = (target: Element) => {\n for (let element: Element | null = target; element; element = element.parentElement) {\n if (element.scrollTop > 0) return true\n const touchAction = view.getComputedStyle(element).touchAction\n if (touchAction && touchAction !== \"auto\" && touchAction !== \"manipulation\" && !touchAction.includes(\"pan-y\")) return true\n if (element === panel) break\n }\n return false\n }\n\n const onStart = (event: TouchEvent) => {\n pending = null\n fromContent = false\n const phone = isPhoneLayout(panel)\n if (event.touches.length !== 1 || !phone || panel.closest(EXITING)) return\n const { clientX, clientY } = event.touches[0]\n const target = event.target instanceof view.Element ? event.target : null\n if (clientY - panel.getBoundingClientRect().top <= GRIP) {\n if (target?.closest(INTERACTIVE)) return\n begin(clientY, event.timeStamp)\n return\n }\n if (!target || target.closest(EDITABLE)) return\n pending = { x: clientX, y: clientY, time: event.timeStamp, target }\n }\n\n // The first move of a touch in the content: a pull down from the top takes the sheet from here on.\n const decide = (event: TouchEvent, touch: Touch) => {\n const start = pending!\n const dx = touch.clientX - start.x\n const dy = touch.clientY - start.y\n if (Math.max(Math.abs(dx), Math.abs(dy)) < DECIDE) return\n pending = null\n if (event.defaultPrevented || !event.cancelable || event.timeStamp - start.time > HOLD) return\n if (dy <= 0 || Math.abs(dx) > dy || contentTakes(start.target)) return\n fromContent = true\n begin(start.y, start.time)\n }\n\n const onMove = (event: TouchEvent) => {\n const touch = event.touches[0]\n if (startY === null && pending && touch) decide(event, touch)\n if (startY === null || !touch) return\n event.preventDefault()\n const { clientY } = touch\n speed = (clientY - lastY) / Math.max(1, event.timeStamp - lastTime)\n lastY = clientY\n lastTime = event.timeStamp\n panel.style.transition = \"none\"\n panel.style.transform = `translateY(${Math.max(0, clientY - startY)}px)`\n }\n\n const onEnd = (event: TouchEvent) => {\n pending = null\n if (startY === null) return\n const travelled = lastY - startY\n // A pull from the content ends where it lifted, not in a press of the row under it. A finger that barely\n // moved keeps its tap.\n if (fromContent && travelled > DECIDE && event.cancelable) event.preventDefault()\n fromContent = false\n // A finger that rested before lifting is no flick.\n const flick = speed > CLOSE_SPEED && event.timeStamp - lastTime < REST\n startY = null\n if (travelled <= 0) {\n clear()\n return\n }\n if (travelled > panel.getBoundingClientRect().height * CLOSE_SHARE || flick) {\n // The normal/exit-start CSS states retain this exact release position.\n // No inline transform or transition may mask the active CSS exit.\n panel.style.setProperty(DRAG_TRANSFORM, `translateY(${travelled}px)`)\n clearInline()\n // An owner can veto close. Register before close, which can detach us.\n settleTimer = view.setTimeout(() => {\n settleTimer = undefined\n if (panel.isConnected && !panel.closest(EXITING)) returnToRest()\n }, SETTLE)\n if (close(event) === false) returnToRest()\n return\n }\n returnToRest()\n }\n\n const onCancel = () => {\n startY = null\n pending = null\n fromContent = false\n clear()\n }\n\n // A retained panel can reopen before its exit completes. Its new entrance\n // must return to rest, not finish at the old gesture's release offset.\n const dialog = panel.closest(\"[data-plex-dialog]\")\n const stateObserver = dialog ? new view.MutationObserver((records) => {\n if (panel.style.getPropertyValue(DRAG_TRANSFORM) &&\n dialog.getAttribute(\"data-state\") === \"open\" &&\n records.some((record) => record.oldValue === \"closed\")) clear()\n }) : undefined\n stateObserver?.observe(dialog ?? panel, {\n attributes: true, attributeFilter: [\"data-state\"], attributeOldValue: true,\n })\n\n panel.addEventListener(\"touchstart\", onStart, { passive: true })\n panel.addEventListener(\"touchmove\", onMove, { passive: false })\n panel.addEventListener(\"touchend\", onEnd)\n panel.addEventListener(\"touchcancel\", onCancel)\n\n return () => {\n unwatchFull()\n stateObserver?.disconnect()\n panel.removeEventListener(\"touchstart\", onStart)\n panel.removeEventListener(\"touchmove\", onMove)\n panel.removeEventListener(\"touchend\", onEnd)\n panel.removeEventListener(\"touchcancel\", onCancel)\n startY = null\n pending = null\n clear()\n }\n}\n"]}
1
+ {"version":3,"file":"sheetDrag.js","sourceRoot":"","sources":["../../../../src/components/Dialog/sheetDrag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9F,sGAAsG;AACtG,oHAAoH;AACpH,+FAA+F;AAC/F,+GAA+G;AAC/G,4GAA4G;AAC5G,0GAA0G;AAC1G,sFAAsF;AACtF,MAAM,IAAI,GAAG,EAAE,CAAA;AACf,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,IAAI,GAAG,GAAG,CAAA;AAChB,MAAM,MAAM,GAAG,GAAG,CAAA;AAClB,MAAM,WAAW,GAAG,qDAAqD,CAAA;AACzE,MAAM,QAAQ,GAAG,4FAA4F,CAAA;AAC7G,6GAA6G;AAC7G,MAAM,MAAM,GAAG,CAAC,CAAA;AAChB,yFAAyF;AACzF,MAAM,IAAI,GAAG,GAAG,CAAA;AAChB,MAAM,cAAc,GAAG,+BAA+B,CAAA;AACtD,MAAM,OAAO,GAAG,uCAAuC,CAAA;AACvD,mHAAmH;AACnH,6EAA6E;AAC7E,MAAM,IAAI,GAAG,iBAAiB,CAAA;AAC9B,qHAAqH;AACrH,MAAM,cAAc,GAAG,qBAAqB,CAAA;AAC5C,MAAM,aAAa,GAAG,wBAAwB,CAAA;AAC9C,MAAM,WAAW,GAAG,sBAAsB,CAAA;AAE1C,MAAM,aAAa,GAAG,CAAC,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springEasing } from \"../../lib/presentMotion.js\"\n\n// A bottom sheet follows the finger. A drag from its top 44px moves it 1:1, never up. Past 30% of its\n// height, or at 0.5px/ms, it closes; otherwise it returns. Either way it goes on at the finger's speed, on a spring\n// that starts at it, as a sheet let go of does on iOS. Buttons in that strip keep their press.\n// As on iOS, a pull down that starts anywhere else moves the sheet too once the content under the finger is at\n// its top: the first move decides, down and mostly vertical with every scroller under the finger at its top\n// takes the sheet; up, sideways, a move another handler took, a field, a control that pans by itself or a\n// finger that rested first (a hold: Sortable, a context menu) stays with the content.\nconst GRIP = 44\nconst CLOSE_SHARE = 0.3\nconst CLOSE_SPEED = 0.5\nconst REST = 100\nconst SETTLE = 400\nconst INTERACTIVE = \"a, button, input, select, textarea, [role='button']\"\nconst EDITABLE = \"input, textarea, select, [contenteditable]:not([contenteditable='false']), [role='slider']\"\n// The move that settles which way the finger goes, under the browser's own slop so it can still be cancelled\nconst DECIDE = 4\n// A finger that rests this long holds (a Sortable row, a context menu) rather than pulls\nconst HOLD = 200\nconst DRAG_TRANSFORM = \"--dialog-panel-drag-transform\"\nconst EXITING = \"[data-exiting], [data-exiting-active]\"\n// A sheet at its full height says so: a sheet under it then steps back, as one presented from a sheet does on iOS.\n// A shorter sheet leaves the one under it in place, as a medium detent does.\nconst FULL = \"data-sheet-full\"\n// A sheet that grew out of its button would shrink back into it; one let go of leaves down instead (Dialog sets it).\nconst PRESENTED_FROM = \"data-presented-from\"\nconst EXIT_DURATION = \"--dialog-exit-duration\"\nconst EXIT_EASING = \"--dialog-exit-easing\"\n\nconst reducedMotion = (view: Window) => Boolean(view.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches)\n\nconst watchFullHeight = (panel: HTMLElement, view: Window & typeof globalThis) => {\n if (!view.ResizeObserver) return () => {}\n const update = () => {\n const max = Number.parseFloat(view.getComputedStyle(panel).maxHeight)\n const full = Number.isFinite(max) && panel.offsetHeight >= max - 1\n if (full !== panel.hasAttribute(FULL)) panel.toggleAttribute(FULL, full)\n }\n const observer = new view.ResizeObserver(update)\n // Its height with the border, as `offsetHeight` reads it\n observer.observe(panel, { box: \"border-box\" })\n update()\n return () => {\n observer.disconnect()\n panel.removeAttribute(FULL)\n }\n}\n\n/** `close` returns false when the owner keeps the dialog open: the sheet then returns at once. */\nexport const attachSheetDrag = (panel: HTMLElement, close: (event: TouchEvent) => boolean | void) => {\n const view = panel.ownerDocument.defaultView\n if (!view) return () => {}\n const unwatchFull = watchFullHeight(panel, view)\n let startY: number | null = null\n // A touch in the content that may become a pull, until its first move says which way it goes\n let pending: { x: number; y: number; time: number; target: Element } | null = null\n // The pull began in the content: its release must not press what lies under the finger\n let fromContent = false\n let lastY = 0\n let lastTime = 0\n let speed = 0\n let settleTimer: number | undefined\n\n const stopSettling = () => {\n if (settleTimer !== undefined) view.clearTimeout(settleTimer)\n settleTimer = undefined\n panel.removeEventListener(\"transitionend\", onSettled)\n }\n const clearInline = () => {\n panel.style.transition = \"\"\n panel.style.transform = \"\"\n }\n const clear = () => {\n stopSettling()\n clearInline()\n panel.style.removeProperty(DRAG_TRANSFORM)\n panel.style.removeProperty(EXIT_DURATION)\n panel.style.removeProperty(EXIT_EASING)\n }\n const onSettled = (event: TransitionEvent) => {\n if (event.target === panel && event.propertyName === \"transform\") clear()\n }\n // `from` is where the sheet is let go of, `velocity` the finger's speed down in px/ms: the sheet starts back at it.\n const returnToRest = (from = 0, velocity = 0) => {\n stopSettling()\n if (reducedMotion(view)) {\n clear()\n return\n }\n // Back up is the way to rest: a finger still going down starts it the other way.\n const spring = springEasing(SHEET_RELEASE_SPRING, from > 0 ? (-velocity * 1000) / from : 0, true)\n panel.style.transition = `transform ${spring.ms}ms ${spring.easing}`\n panel.style.transform = \"\"\n panel.style.removeProperty(DRAG_TRANSFORM)\n panel.style.removeProperty(EXIT_DURATION)\n panel.style.removeProperty(EXIT_EASING)\n const durationText = view.getComputedStyle(panel).transitionDuration\n const duration = Number.parseFloat(durationText) * (durationText.endsWith(\"ms\") ? 1 : 1000)\n if (duration === 0) {\n clear()\n return\n }\n panel.addEventListener(\"transitionend\", onSettled)\n // A theme can lengthen the token or remove the transition altogether.\n // This cleanup must not cut a valid longer transition at the veto timeout.\n settleTimer = view.setTimeout(clear, Math.max(SETTLE, Number.isFinite(duration) ? duration : 0))\n }\n\n const begin = (clientY: number, time: number) => {\n stopSettling()\n startY = clientY\n lastY = clientY\n lastTime = time\n speed = 0\n }\n\n // Every element from the target up to the panel: one that can scroll up, or pans by itself, keeps the move.\n const contentTakes = (target: Element) => {\n for (let element: Element | null = target; element; element = element.parentElement) {\n if (element.scrollTop > 0) return true\n const touchAction = view.getComputedStyle(element).touchAction\n if (touchAction && touchAction !== \"auto\" && touchAction !== \"manipulation\" && !touchAction.includes(\"pan-y\")) return true\n if (element === panel) break\n }\n return false\n }\n\n const onStart = (event: TouchEvent) => {\n pending = null\n fromContent = false\n const phone = isPhoneLayout(panel)\n if (event.touches.length !== 1 || !phone || panel.closest(EXITING)) return\n const { clientX, clientY } = event.touches[0]\n const target = event.target instanceof view.Element ? event.target : null\n if (clientY - panel.getBoundingClientRect().top <= GRIP) {\n if (target?.closest(INTERACTIVE)) return\n begin(clientY, event.timeStamp)\n return\n }\n if (!target || target.closest(EDITABLE)) return\n pending = { x: clientX, y: clientY, time: event.timeStamp, target }\n }\n\n // The first move of a touch in the content: a pull down from the top takes the sheet from here on.\n const decide = (event: TouchEvent, touch: Touch) => {\n const start = pending!\n const dx = touch.clientX - start.x\n const dy = touch.clientY - start.y\n if (Math.max(Math.abs(dx), Math.abs(dy)) < DECIDE) return\n pending = null\n if (event.defaultPrevented || !event.cancelable || event.timeStamp - start.time > HOLD) return\n if (dy <= 0 || Math.abs(dx) > dy || contentTakes(start.target)) return\n fromContent = true\n begin(start.y, start.time)\n }\n\n const onMove = (event: TouchEvent) => {\n const touch = event.touches[0]\n if (startY === null && pending && touch) decide(event, touch)\n if (startY === null || !touch) return\n event.preventDefault()\n const { clientY } = touch\n speed = (clientY - lastY) / Math.max(1, event.timeStamp - lastTime)\n lastY = clientY\n lastTime = event.timeStamp\n panel.style.transition = \"none\"\n panel.style.transform = `translateY(${Math.max(0, clientY - startY)}px)`\n }\n\n const onEnd = (event: TouchEvent) => {\n pending = null\n if (startY === null) return\n const travelled = lastY - startY\n // A pull from the content ends where it lifted, not in a press of the row under it. A finger that barely\n // moved keeps its tap.\n if (fromContent && travelled > DECIDE && event.cancelable) event.preventDefault()\n fromContent = false\n // A finger that rested before lifting is no flick, and gives the sheet no speed.\n const moving = event.timeStamp - lastTime < REST\n const velocity = moving ? speed : 0\n const flick = speed > CLOSE_SPEED && moving\n startY = null\n if (travelled <= 0) {\n clear()\n return\n }\n const height = panel.getBoundingClientRect().height\n if (travelled > height * CLOSE_SHARE || flick) {\n // The normal/exit-start CSS states retain this exact release position.\n // No inline transform or transition may mask the active CSS exit.\n panel.style.setProperty(DRAG_TRANSFORM, `translateY(${travelled}px)`)\n clearInline()\n // The rest of the way down goes on at the finger's speed, within the time the dialog gives its exit\n const presentedFrom = panel.hasAttribute(PRESENTED_FROM)\n panel.removeAttribute(PRESENTED_FROM)\n if (!reducedMotion(view)) {\n const left = Math.max(1, height - travelled)\n const spring = springEasing(SHEET_RELEASE_SPRING, (Math.max(0, velocity) * 1000) / left, true)\n panel.style.setProperty(EXIT_DURATION, `${Math.min(spring.ms, SHEET_EXIT_MS)}ms`)\n panel.style.setProperty(EXIT_EASING, spring.easing)\n }\n // An owner can veto close. Register before close, which can detach us.\n settleTimer = view.setTimeout(() => {\n settleTimer = undefined\n if (!panel.isConnected || panel.closest(EXITING)) return\n // An owner that kept the dialog open without saying so: it still goes back into its button later\n if (presentedFrom) panel.setAttribute(PRESENTED_FROM, \"\")\n returnToRest(travelled, velocity)\n }, SETTLE)\n if (close(event) === false) {\n if (presentedFrom) panel.setAttribute(PRESENTED_FROM, \"\")\n returnToRest(travelled, velocity)\n }\n return\n }\n returnToRest(travelled, velocity)\n }\n\n const onCancel = () => {\n startY = null\n pending = null\n fromContent = false\n clear()\n }\n\n // A retained panel can reopen before its exit completes. Its new entrance\n // must return to rest, not finish at the old gesture's release offset.\n const dialog = panel.closest(\"[data-plex-dialog]\")\n const stateObserver = dialog ? new view.MutationObserver((records) => {\n if (panel.style.getPropertyValue(DRAG_TRANSFORM) &&\n dialog.getAttribute(\"data-state\") === \"open\" &&\n records.some((record) => record.oldValue === \"closed\")) clear()\n }) : undefined\n stateObserver?.observe(dialog ?? panel, {\n attributes: true, attributeFilter: [\"data-state\"], attributeOldValue: true,\n })\n\n panel.addEventListener(\"touchstart\", onStart, { passive: true })\n panel.addEventListener(\"touchmove\", onMove, { passive: false })\n panel.addEventListener(\"touchend\", onEnd)\n panel.addEventListener(\"touchcancel\", onCancel)\n\n return () => {\n unwatchFull()\n stateObserver?.disconnect()\n panel.removeEventListener(\"touchstart\", onStart)\n panel.removeEventListener(\"touchmove\", onMove)\n panel.removeEventListener(\"touchend\", onEnd)\n panel.removeEventListener(\"touchcancel\", onCancel)\n startY = null\n pending = null\n clear()\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import clsx, {} from "clsx";
2
- import { Comment, Fragment, Static, Text, camelize, cloneVNode, defineComponent, h, isVNode, mergeProps, useId, } from "vue";
2
+ import { Comment, Fragment, Static, Text, camelize, cloneVNode, defineComponent, h, isVNode, mergeProps, onBeforeUnmount, onMounted, onUpdated, useId, } from "vue";
3
3
  import { FieldError } from "../FieldError/index.js";
4
- import { provideFieldRow } from "../../lib/fieldRow.js";
4
+ import { blankPlaceholder, provideFieldRow } from "../../lib/fieldRow.js";
5
5
  import { hasContent } from "../../lib/slotContent.js";
6
6
  import s from "@plexui/styles/components/Field/Field.module.css";
7
7
  // Vue port of packages/ui/src/components/Field/Field.tsx.
@@ -152,7 +152,12 @@ const FieldComponent = defineComponent({
152
152
  size: String,
153
153
  /** Shows a required asterisk after the label. Visual only: no `required` attribute. @default false */
154
154
  required: { type: Boolean, default: false },
155
- /** Layout direction of label and control. @default "horizontal" on a `row` with a visible label, else "vertical" */
155
+ /**
156
+ * Layout direction of label and control. In the Plex Android look a vertical `row` whose control is
157
+ * an Input or a Textarea is a field of an input card: the label stands in the empty field as its hint and floats
158
+ * over the value once the field has the focus or a value, with a line under the field.
159
+ * @default "horizontal" on a `row` with a visible label, else "vertical"
160
+ */
156
161
  orientation: String,
157
162
  /** One line of a FieldGroup. Its non-interactive area focuses the text editor or activates the choice control or popup trigger. @default false */
158
163
  row: { type: Boolean, default: false },
@@ -168,6 +173,28 @@ const FieldComponent = defineComponent({
168
173
  const generatedId = useId();
169
174
  let forwardingRowClick = false;
170
175
  provideFieldRow(() => !!props.row && (props.orientation ?? (props.hideLabel ? "vertical" : "horizontal")) === "horizontal");
176
+ // In the Plex Android look a text field under its shown label floats the label in its place while it is empty
177
+ let blankControlId = "";
178
+ let blankActive = false;
179
+ let blank = null;
180
+ const syncBlank = () => {
181
+ if (blankActive && !blank) {
182
+ blank = blankPlaceholder(() => blankControlId);
183
+ blank.start();
184
+ }
185
+ else if (!blankActive && blank) {
186
+ blank.stop();
187
+ blank = null;
188
+ }
189
+ else
190
+ blank?.sync();
191
+ };
192
+ onMounted(syncBlank);
193
+ onUpdated(syncBlank);
194
+ onBeforeUnmount(() => {
195
+ blank?.stop();
196
+ blank = null;
197
+ });
171
198
  return () => {
172
199
  const { required, row, opticallyAlign } = props;
173
200
  const orientation = props.orientation ?? (row && !props.hideLabel ? "horizontal" : "vertical");
@@ -203,6 +230,8 @@ const FieldComponent = defineComponent({
203
230
  resolvedChildren = child ? [cloneWithFieldProps(child, { ...fieldChildProps, id: controlId }, labelId)] : nodes;
204
231
  }
205
232
  const size = props.size ?? (CONTROL_SIZES.has(childSize) ? childSize : "md");
233
+ blankControlId = controlId;
234
+ blankActive = !!row && orientation === "vertical" && !props.hideLabel;
206
235
  const icon = row && slots.icon ? slots.icon() : null;
207
236
  const labelAction = slots.labelAction ? slots.labelAction() : props.labelAction;
208
237
  const hasLabelAction = slots.labelAction ? hasContent(labelAction) : !!labelAction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C,YAAY;oBAChB,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,CAAC,WAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;iBAC3G,CAAC;gBACF,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE;oBAC7B,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,gBAAgB,CAAC;oBAChD,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,YAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;iBACrF,CAAC;gBACF,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;aAC7E,CACF,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAOF,mFAAmF;AACnF,MAAM,CAAC,MAAM,KAAK,GAAG,cAA4E,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport {\n Comment,\n Fragment,\n Static,\n Text,\n camelize,\n cloneVNode,\n defineComponent,\n h,\n isVNode,\n mergeProps,\n useId,\n type PropType,\n type SlotsType,\n type VNode,\n type VNodeArrayChildren,\n type VNodeChild,\n} from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { FieldError } from \"../FieldError/index.js\"\nimport { provideFieldRow } from \"../../lib/fieldRow.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/Field/Field.module.css\"\n\n// Vue port of packages/ui/src/components/Field/Field.tsx.\n//\n// - `label`, `description` and `errorMessage` take a string prop or a slot of\n// the same name (the slot wins), like React's ReactNode props.\n// - Children: React accepts an element, which Field clones with the field\n// props, or a render prop `(fieldProps) => ReactNode`, which it leaves alone.\n// Both are the default slot here, which receives the field props:\n// - a slot that reads them (`v-slot=\"fieldProps\"` + `v-bind=\"fieldProps\"`,\n// `v-slot=\"{ id }\"`, `(fieldProps) => h(...)`) is the render prop: its\n// content renders as it is.\n// - a slot that does not read them and holds exactly one element or\n// component gets it cloned like React's `cloneElement`: `opticallyAlign`\n// replaces the child's own, the child's own `id` stays and the label's\n// `for` follows it, `aria-describedby` is joined after the child's own\n// ids, and an explicit `aria-invalid` on the child wins. Template\n// comments do not count as children (JSX comments); the\n// placeholder of a `v-if` that renders nothing does, like `{false}` in a\n// React children array, so `<A v-if=\"x\" /><Input />` is not cloned.\n// - anything else (text, several roots, a `v-for` list) renders as it is,\n// like a React child that is not a single element.\n// - content a wrapper forwards with `<slot />` counts as its own roots, as\n// React's `children` passed on to Field are the elements themselves.\n// - As in React only `class` reaches the root element; other attributes are\n// dropped. On a `row` they all reach it, as React's rest props do.\n\n// What a row's press can reach: a form control, a popup trigger, a choice\nconst ROW_CONTROL = 'input:not([type=\"hidden\"]):not([aria-hidden=\"true\"]), textarea, select, button, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"combobox\"]'\n\n/** The one control inside a wrapper that took the Field's id; a control nested in another (a clear button in a\n * trigger) counts as part of it. */\nfunction soleRowControl(wrapper: HTMLElement): HTMLElement | null {\n const found = Array.from(wrapper.querySelectorAll<HTMLElement>(ROW_CONTROL))\n const outer = found.filter((element) => !found.some((other) => other !== element && other.contains(element)))\n return outer.length === 1 ? outer[0] : null\n}\n\nexport type FieldChildProps = {\n id: string\n /** The label's id. Bind it to a control that the label's `for` cannot name, such as a Select trigger. */\n \"aria-labelledby\"?: string\n \"aria-describedby\"?: string\n \"aria-invalid\"?: boolean\n opticallyAlign?: \"start\" | \"end\"\n}\n\ntype Props = Record<string, unknown>\n\nconst CONTROL_SIZES: ReadonlySet<unknown> = new Set([\"3xs\", \"2xs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"2xl\", \"3xl\"])\n\n/** The slot props, recording whether the slot read them (the render-prop form). */\nconst trackUse = (target: FieldChildProps) => {\n const state = { used: false }\n const proxy = new Proxy(target, {\n get(object, key, receiver) {\n state.used = true\n return Reflect.get(object, key, receiver)\n },\n has(object, key) {\n state.used = true\n return Reflect.has(object, key)\n },\n ownKeys(object) {\n state.used = true\n return Reflect.ownKeys(object)\n },\n getOwnPropertyDescriptor(object, key) {\n state.used = true\n return Reflect.getOwnPropertyDescriptor(object, key)\n },\n })\n return { proxy, state }\n}\n\n/** Like React's `isValidElement` for a slot root: an element or a component. */\nconst isElementVNode = (node: VNode) => {\n const { type } = node\n if (type === Fragment || type === Text || type === Comment || type === Static) return false\n if (typeof type === \"object\" && type !== null && (\"__isTeleport\" in type || \"__isSuspense\" in type)) return false\n return true\n}\n\n/**\n * Template comments (`<!-- note -->`) are no children, like JSX comments.\n * The empty placeholder of a `v-if` that renders nothing (or of a `false`\n * child) still counts, like `{false}` in a React children array.\n */\nconst isTemplateComment = (node: VNodeArrayChildren[number]) =>\n isVNode(node) && node.type === Comment && !!node.children && node.children !== \"v-if\"\n\n/**\n * Unwraps content forwarded through a wrapper's `<slot />`: the fragment\n * `renderSlot` creates, keyed `_<slot name>`.\n */\nconst unwrapForwardedSlots = (nodes: VNodeArrayChildren): VNodeArrayChildren =>\n nodes.flatMap((node) =>\n isVNode(node) &&\n node.type === Fragment &&\n typeof node.key === \"string\" &&\n node.key.startsWith(\"_\") &&\n Array.isArray(node.children)\n ? unwrapForwardedSlots(node.children)\n : [node],\n )\n\n/** The one element a non-render-prop slot holds, if it holds exactly one. */\nconst singleElement = (nodes: VNodeArrayChildren): VNode | undefined => {\n const roots = unwrapForwardedSlots(nodes).filter((node) => !isTemplateComment(node))\n if (roots.length !== 1) return undefined\n const [root] = roots\n return isVNode(root) && isElementVNode(root) ? root : undefined\n}\n\n/** A child prop under its attribute name or its camelCase prop name. */\nconst childProp = (props: Props, name: string) => props[name] ?? props[camelize(name)]\n\n/**\n * `cloneElement(child, fieldProps)` with React Field's merging rules. A child\n * without its own name (`aria-label`, `aria-labelledby`, `label`, a `#label`\n * slot) is also labelled by the field's label, which names triggers `for`\n * cannot reach.\n */\nconst cloneWithFieldProps = (child: VNode, fieldChildProps: FieldChildProps, labelId: string): VNode => {\n const own: Props = { ...(child.props ?? {}) }\n const childDescribedBy = childProp(own, \"aria-describedby\") as string | undefined\n const childInvalid = childProp(own, \"aria-invalid\")\n const childSlots = child.children\n const childNamed =\n childProp(own, \"aria-label\") != null ||\n childProp(own, \"aria-labelledby\") != null ||\n own.label != null ||\n (childSlots != null && typeof childSlots === \"object\" && !Array.isArray(childSlots) && \"label\" in childSlots)\n\n const overrides: Props = {\n ...fieldChildProps,\n // Merge with the child's own associations instead of overwriting them\n \"aria-describedby\": [childDescribedBy, fieldChildProps[\"aria-describedby\"]].filter(Boolean).join(\" \") || undefined,\n \"aria-invalid\": childInvalid ?? fieldChildProps[\"aria-invalid\"],\n ...(!childNamed && { \"aria-labelledby\": labelId }),\n }\n\n // One spelling per prop, so the field's value is the one that applies\n for (const key of Object.keys(overrides)) {\n for (const spelling of [key, camelize(key), key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)]) {\n delete own[spelling]\n }\n }\n\n return cloneVNode({ ...child, props: own } as VNode, overrides)\n}\n\nconst FieldComponent = defineComponent({\n name: \"Field\",\n inheritAttrs: false,\n props: {\n /** Label text for the field (or the `label` slot) */\n label: String,\n /**\n * Hides the label from view; it still names the control. On a `row` the value or placeholder\n * then starts at the row's edge, as an iOS cell that shows only its value, so the row is\n * vertical unless `orientation` says otherwise. @default false\n */\n hideLabel: { type: Boolean, default: false },\n /** Helper text below the label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n /**\n * Error message below the control (or the `errorMessage` slot). When set,\n * the control gets `aria-invalid=\"true\"`. Rendered with FieldError.\n */\n errorMessage: String,\n /** Content at the end of the label row, such as a link that acts on the field (or the `labelAction` slot) */\n labelAction: String,\n /** Font size of the label, to match the control's size. @default the child control's `size`, else \"md\" */\n size: String as PropType<ControlSize>,\n /** Shows a required asterisk after the label. Visual only: no `required` attribute. @default false */\n required: { type: Boolean, default: false },\n /** Layout direction of label and control. @default \"horizontal\" on a `row` with a visible label, else \"vertical\" */\n orientation: String as PropType<\"vertical\" | \"horizontal\">,\n /** One line of a FieldGroup. Its non-interactive area focuses the text editor or activates the choice control or popup trigger. @default false */\n row: { type: Boolean, default: false },\n /** On a `row`, the control takes the rest of the line after the label. @default false */\n fill: { type: Boolean, default: false },\n /** Overrides the generated id set on the control and the label's `for`. A child's own `id` wins over both. */\n id: String,\n /** Optically aligns the control's text with surrounding content; passed to the control. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n },\n slots: Object as SlotsType<{\n /** The control. Read the props to render them yourself (React's render prop). */\n default?: (fieldProps: FieldChildProps) => VNodeChild\n label?: () => VNodeChild\n labelAction?: () => VNodeChild\n /** On a `row`, a control at the end of the row, such as a button that adds to a list on a `fill` row. On a row whose\n * control is a radio (an info button after a network or a VPN) the radio's mark leads in the icon column. */\n action?: () => VNodeChild\n /** On a `row`, a symbol or an app's picture before the label, as an iOS cell's image (React's `icon`). */\n icon?: () => VNodeChild\n description?: () => VNodeChild\n errorMessage?: () => VNodeChild\n }>,\n setup(props, { attrs, slots }) {\n const generatedId = useId()\n let forwardingRowClick = false\n\n provideFieldRow(() => !!props.row && (props.orientation ?? (props.hideLabel ? \"vertical\" : \"horizontal\")) === \"horizontal\")\n\n return () => {\n const { required, row, opticallyAlign } = props\n const orientation = props.orientation ?? (row && !props.hideLabel ? \"horizontal\" : \"vertical\")\n const fieldId = props.id || `field-${generatedId}`\n const labelId = `${fieldId}-label`\n\n const description = slots.description ? slots.description() : props.description\n const hasDescription = slots.description ? hasContent(description as VNodeArrayChildren) : !!description\n const errorMessage = slots.errorMessage ? slots.errorMessage() : props.errorMessage\n const hasError = slots.errorMessage ? hasContent(errorMessage as VNodeArrayChildren) : !!errorMessage\n\n const descriptionId = hasDescription ? `${fieldId}-description` : undefined\n const errorId = hasError ? `${fieldId}-error` : undefined\n\n // Build aria-describedby from description + error IDs\n const ariaDescribedBy = [descriptionId, errorId].filter(Boolean).join(\" \") || undefined\n const invalid = hasError\n\n // Props to inject into the child control\n const fieldChildProps: FieldChildProps = {\n \"id\": fieldId,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": invalid || undefined,\n ...(opticallyAlign && { opticallyAlign }),\n }\n\n // Resolve the children\n let resolvedChildren: VNodeArrayChildren | undefined\n let childSize: unknown\n // The control's id, which the label's `for` has to match\n let controlId = fieldId\n if (slots.default) {\n const { proxy, state } = trackUse({ ...fieldChildProps, \"aria-labelledby\": labelId })\n const nodes = slots.default(proxy) as VNodeArrayChildren\n const child = state.used ? undefined : singleElement(nodes)\n childSize = child?.props?.size\n controlId = (child?.props?.id as string | undefined) || fieldId\n resolvedChildren = child ? [cloneWithFieldProps(child, { ...fieldChildProps, id: controlId }, labelId)] : nodes\n }\n const size = props.size ?? (CONTROL_SIZES.has(childSize) ? (childSize as ControlSize) : \"md\")\n\n const icon = row && slots.icon ? slots.icon() : null\n const labelAction = slots.labelAction ? slots.labelAction() : props.labelAction\n const hasLabelAction = slots.labelAction ? hasContent(labelAction as VNodeArrayChildren) : !!labelAction\n const labelElement = h(\"label\", { class: s.Label, id: labelId, for: controlId }, [\n slots.label ? slots.label() : props.label,\n required ? h(\"span\", { \"class\": s.RequiredIndicator, \"aria-hidden\": \"true\" }, \"*\") : null,\n ])\n\n return h(\n \"div\",\n mergeProps({\n ...(row && { ...attrs, onClick: undefined }),\n \"class\": clsx(s.Field, attrs.class as ClassValue),\n \"data-slot\": \"field\",\n \"data-size\": size,\n \"data-orientation\": orientation,\n \"data-optically-align\": opticallyAlign,\n \"data-row\": row ? \"\" : undefined,\n \"data-fill\": props.fill ? \"\" : undefined,\n \"data-label-hidden\": props.hideLabel ? \"\" : undefined,\n }, row ? {\n onClick: (event: MouseEvent) => {\n if (forwardingRowClick) return\n for (const handler of Array.isArray(attrs.onClick) ? attrs.onClick : [attrs.onClick]) {\n if (typeof handler === \"function\") handler(event)\n }\n if (event.defaultPrevented) return\n const target = event.target\n const root = event.currentTarget\n // The linked control keeps its state and keyboard behavior. Nested\n // actions, including a Select's clear button, keep their own click.\n if (!(target instanceof Element) || !(root instanceof HTMLElement) ||\n target.closest(\"[data-row]\") !== root ||\n target.closest('button, a, input, select, textarea, [role=\"button\"], [role=\"link\"], [contenteditable]:not([contenteditable=\"false\"])')) return\n const linkedControl = root.ownerDocument.getElementById(controlId)\n if (!linkedControl || linkedControl.closest(\"[data-row]\") !== root) return\n // Select's linked form proxy is inside its popup trigger. An\n // ordinary input never delegates to a sibling Unit popup.\n const direct = linkedControl.matches('input[aria-hidden=\"true\"]')\n ? linkedControl.closest<HTMLElement>(':is(button, [role=\"button\"])[aria-haspopup]:not([aria-haspopup=\"false\"])') ?? linkedControl\n : linkedControl\n // A product's own wrapper may take the id (a row component around a Select): the row then reaches the one\n // control inside it, as an iOS cell does; with two controls, or none, the press stays on the row.\n const control = direct === linkedControl && !linkedControl.matches(ROW_CONTROL) ? soleRowControl(linkedControl) : direct\n // A control of a row nested in the wrapper belongs to that row\n if (!control || control.closest(\"[data-row]\") !== root) return\n if (control.matches(':disabled, [disabled], [data-disabled], [aria-disabled=\"true\"], [data-loading], [aria-busy=\"true\"]')) return\n const label = target.closest(\"label\")\n // Native label activation stays native; span popup triggers need\n // forwarding from the Field's own label as well as its whitespace.\n if (label && (label.htmlFor !== linkedControl.id || label.control === linkedControl)) return\n // The row is the hit area for its plain editor. Focus only: a synthetic\n // click would also run input actions or disturb native text selection.\n if (control.matches('textarea, input:not([type]), input[type=\"text\"], input[type=\"email\"], input[type=\"password\"], input[type=\"search\"], input[type=\"tel\"], input[type=\"url\"], input[type=\"number\"]') &&\n !control.matches('[hidden], [aria-hidden=\"true\"]')) {\n control.focus({ preventScroll: true })\n return\n }\n if (!control.matches('button[role=\"radio\"], button[role=\"checkbox\"], button[role=\"switch\"], input[type=\"radio\"], input[type=\"checkbox\"], :is(button, [role=\"button\"])[aria-haspopup]:not([aria-haspopup=\"false\"])')) return\n forwardingRowClick = true\n try {\n control.focus({ preventScroll: true })\n control.click()\n } finally {\n // Form controls can bubble their hidden input click after the render flush.\n queueMicrotask(() => { forwardingRowClick = false })\n }\n },\n } : {}),\n [\n icon && hasContent(icon as VNodeArrayChildren) ? h(\"div\", { class: s.Icon, \"aria-hidden\": \"true\" }, [icon as VNodeChild]) : null,\n h(\"div\", { class: s.LabelGroup }, [\n hasLabelAction\n ? h(\"div\", { class: s.LabelRow }, [labelElement, h(\"div\", { class: s.LabelAction }, [labelAction as VNodeChild])])\n : labelElement,\n hasDescription ? h(\"div\", { class: s.Description, id: descriptionId }, [description as VNodeChild]) : null,\n ]),\n h(\"div\", { class: s.Content }, [\n h(\"div\", { class: s.Control }, resolvedChildren),\n hasError ? h(FieldError, { id: errorId }, () => [errorMessage as VNodeChild]) : null,\n ]),\n row && slots.action ? h(\"div\", { class: s.Action }, [slots.action()]) : null,\n ],\n )\n }\n },\n})\n\ntype FieldOwnProps = InstanceType<typeof FieldComponent>[\"$props\"]\n\n/** Field props; `class` reaches the root element. */\nexport type FieldProps = FieldOwnProps & { class?: ClassValue }\n\n/** Form field wrapper with label, description, error and accessibility linking. */\nexport const Field = FieldComponent as typeof FieldComponent & { new (): { $props: FieldProps } }\n"]}
1
+ {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../../src/components/Field/Field.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,eAAe,EACf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C,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;aAC7E,CACF,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAOF,mFAAmF;AACnF,MAAM,CAAC,MAAM,KAAK,GAAG,cAA4E,CAAA","sourcesContent":["import clsx, { type ClassValue } from \"clsx\"\nimport {\n Comment,\n Fragment,\n Static,\n Text,\n camelize,\n cloneVNode,\n defineComponent,\n h,\n isVNode,\n mergeProps,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n useId,\n type PropType,\n type SlotsType,\n type VNode,\n type VNodeArrayChildren,\n type VNodeChild,\n} from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { FieldError } from \"../FieldError/index.js\"\nimport { blankPlaceholder, provideFieldRow } from \"../../lib/fieldRow.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport s from \"@plexui/styles/components/Field/Field.module.css\"\n\n// Vue port of packages/ui/src/components/Field/Field.tsx.\n//\n// - `label`, `description` and `errorMessage` take a string prop or a slot of\n// the same name (the slot wins), like React's ReactNode props.\n// - Children: React accepts an element, which Field clones with the field\n// props, or a render prop `(fieldProps) => ReactNode`, which it leaves alone.\n// Both are the default slot here, which receives the field props:\n// - a slot that reads them (`v-slot=\"fieldProps\"` + `v-bind=\"fieldProps\"`,\n// `v-slot=\"{ id }\"`, `(fieldProps) => h(...)`) is the render prop: its\n// content renders as it is.\n// - a slot that does not read them and holds exactly one element or\n// component gets it cloned like React's `cloneElement`: `opticallyAlign`\n// replaces the child's own, the child's own `id` stays and the label's\n// `for` follows it, `aria-describedby` is joined after the child's own\n// ids, and an explicit `aria-invalid` on the child wins. Template\n// comments do not count as children (JSX comments); the\n// placeholder of a `v-if` that renders nothing does, like `{false}` in a\n// React children array, so `<A v-if=\"x\" /><Input />` is not cloned.\n// - anything else (text, several roots, a `v-for` list) renders as it is,\n// like a React child that is not a single element.\n// - content a wrapper forwards with `<slot />` counts as its own roots, as\n// React's `children` passed on to Field are the elements themselves.\n// - As in React only `class` reaches the root element; other attributes are\n// dropped. On a `row` they all reach it, as React's rest props do.\n\n// What a row's press can reach: a form control, a popup trigger, a choice\nconst ROW_CONTROL = 'input:not([type=\"hidden\"]):not([aria-hidden=\"true\"]), textarea, select, button, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"combobox\"]'\n\n/** The one control inside a wrapper that took the Field's id; a control nested in another (a clear button in a\n * trigger) counts as part of it. */\nfunction soleRowControl(wrapper: HTMLElement): HTMLElement | null {\n const found = Array.from(wrapper.querySelectorAll<HTMLElement>(ROW_CONTROL))\n const outer = found.filter((element) => !found.some((other) => other !== element && other.contains(element)))\n return outer.length === 1 ? outer[0] : null\n}\n\nexport type FieldChildProps = {\n id: string\n /** The label's id. Bind it to a control that the label's `for` cannot name, such as a Select trigger. */\n \"aria-labelledby\"?: string\n \"aria-describedby\"?: string\n \"aria-invalid\"?: boolean\n opticallyAlign?: \"start\" | \"end\"\n}\n\ntype Props = Record<string, unknown>\n\nconst CONTROL_SIZES: ReadonlySet<unknown> = new Set([\"3xs\", \"2xs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"2xl\", \"3xl\"])\n\n/** The slot props, recording whether the slot read them (the render-prop form). */\nconst trackUse = (target: FieldChildProps) => {\n const state = { used: false }\n const proxy = new Proxy(target, {\n get(object, key, receiver) {\n state.used = true\n return Reflect.get(object, key, receiver)\n },\n has(object, key) {\n state.used = true\n return Reflect.has(object, key)\n },\n ownKeys(object) {\n state.used = true\n return Reflect.ownKeys(object)\n },\n getOwnPropertyDescriptor(object, key) {\n state.used = true\n return Reflect.getOwnPropertyDescriptor(object, key)\n },\n })\n return { proxy, state }\n}\n\n/** Like React's `isValidElement` for a slot root: an element or a component. */\nconst isElementVNode = (node: VNode) => {\n const { type } = node\n if (type === Fragment || type === Text || type === Comment || type === Static) return false\n if (typeof type === \"object\" && type !== null && (\"__isTeleport\" in type || \"__isSuspense\" in type)) return false\n return true\n}\n\n/**\n * Template comments (`<!-- note -->`) are no children, like JSX comments.\n * The empty placeholder of a `v-if` that renders nothing (or of a `false`\n * child) still counts, like `{false}` in a React children array.\n */\nconst isTemplateComment = (node: VNodeArrayChildren[number]) =>\n isVNode(node) && node.type === Comment && !!node.children && node.children !== \"v-if\"\n\n/**\n * Unwraps content forwarded through a wrapper's `<slot />`: the fragment\n * `renderSlot` creates, keyed `_<slot name>`.\n */\nconst unwrapForwardedSlots = (nodes: VNodeArrayChildren): VNodeArrayChildren =>\n nodes.flatMap((node) =>\n isVNode(node) &&\n node.type === Fragment &&\n typeof node.key === \"string\" &&\n node.key.startsWith(\"_\") &&\n Array.isArray(node.children)\n ? unwrapForwardedSlots(node.children)\n : [node],\n )\n\n/** The one element a non-render-prop slot holds, if it holds exactly one. */\nconst singleElement = (nodes: VNodeArrayChildren): VNode | undefined => {\n const roots = unwrapForwardedSlots(nodes).filter((node) => !isTemplateComment(node))\n if (roots.length !== 1) return undefined\n const [root] = roots\n return isVNode(root) && isElementVNode(root) ? root : undefined\n}\n\n/** A child prop under its attribute name or its camelCase prop name. */\nconst childProp = (props: Props, name: string) => props[name] ?? props[camelize(name)]\n\n/**\n * `cloneElement(child, fieldProps)` with React Field's merging rules. A child\n * without its own name (`aria-label`, `aria-labelledby`, `label`, a `#label`\n * slot) is also labelled by the field's label, which names triggers `for`\n * cannot reach.\n */\nconst cloneWithFieldProps = (child: VNode, fieldChildProps: FieldChildProps, labelId: string): VNode => {\n const own: Props = { ...(child.props ?? {}) }\n const childDescribedBy = childProp(own, \"aria-describedby\") as string | undefined\n const childInvalid = childProp(own, \"aria-invalid\")\n const childSlots = child.children\n const childNamed =\n childProp(own, \"aria-label\") != null ||\n childProp(own, \"aria-labelledby\") != null ||\n own.label != null ||\n (childSlots != null && typeof childSlots === \"object\" && !Array.isArray(childSlots) && \"label\" in childSlots)\n\n const overrides: Props = {\n ...fieldChildProps,\n // Merge with the child's own associations instead of overwriting them\n \"aria-describedby\": [childDescribedBy, fieldChildProps[\"aria-describedby\"]].filter(Boolean).join(\" \") || undefined,\n \"aria-invalid\": childInvalid ?? fieldChildProps[\"aria-invalid\"],\n ...(!childNamed && { \"aria-labelledby\": labelId }),\n }\n\n // One spelling per prop, so the field's value is the one that applies\n for (const key of Object.keys(overrides)) {\n for (const spelling of [key, camelize(key), key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)]) {\n delete own[spelling]\n }\n }\n\n return cloneVNode({ ...child, props: own } as VNode, overrides)\n}\n\nconst FieldComponent = defineComponent({\n name: \"Field\",\n inheritAttrs: false,\n props: {\n /** Label text for the field (or the `label` slot) */\n label: String,\n /**\n * Hides the label from view; it still names the control. On a `row` the value or placeholder\n * then starts at the row's edge, as an iOS cell that shows only its value, so the row is\n * vertical unless `orientation` says otherwise. @default false\n */\n hideLabel: { type: Boolean, default: false },\n /** Helper text below the label, linked via `aria-describedby` (or the `description` slot) */\n description: String,\n /**\n * Error message below the control (or the `errorMessage` slot). When set,\n * the control gets `aria-invalid=\"true\"`. Rendered with FieldError.\n */\n errorMessage: String,\n /** Content at the end of the label row, such as a link that acts on the field (or the `labelAction` slot) */\n labelAction: String,\n /** Font size of the label, to match the control's size. @default the child control's `size`, else \"md\" */\n size: String as PropType<ControlSize>,\n /** Shows a required asterisk after the label. Visual only: no `required` attribute. @default false */\n required: { type: Boolean, default: false },\n /**\n * Layout direction of label and control. In the Plex Android look a vertical `row` whose control is\n * an Input or a Textarea is a field of an input card: the label stands in the empty field as its hint and floats\n * over the value once the field has the focus or a value, with a line under the field.\n * @default \"horizontal\" on a `row` with a visible label, else \"vertical\"\n */\n orientation: String as PropType<\"vertical\" | \"horizontal\">,\n /** One line of a FieldGroup. Its non-interactive area focuses the text editor or activates the choice control or popup trigger. @default false */\n row: { type: Boolean, default: false },\n /** On a `row`, the control takes the rest of the line after the label. @default false */\n fill: { type: Boolean, default: false },\n /** Overrides the generated id set on the control and the label's `for`. A child's own `id` wins over both. */\n id: String,\n /** Optically aligns the control's text with surrounding content; passed to the control. */\n opticallyAlign: String as PropType<\"start\" | \"end\">,\n },\n slots: Object as SlotsType<{\n /** The control. Read the props to render them yourself (React's render prop). */\n default?: (fieldProps: FieldChildProps) => VNodeChild\n label?: () => VNodeChild\n labelAction?: () => VNodeChild\n /** On a `row`, a control at the end of the row, such as a button that adds to a list on a `fill` row. On a row whose\n * control is a radio (an info button after a network or a VPN) the radio's mark leads in the icon column. */\n action?: () => VNodeChild\n /** On a `row`, a symbol or an app's picture before the label, as an iOS cell's image (React's `icon`). */\n icon?: () => VNodeChild\n description?: () => VNodeChild\n errorMessage?: () => VNodeChild\n }>,\n setup(props, { attrs, slots }) {\n const generatedId = useId()\n let forwardingRowClick = false\n\n provideFieldRow(() => !!props.row && (props.orientation ?? (props.hideLabel ? \"vertical\" : \"horizontal\")) === \"horizontal\")\n\n // In the Plex Android look a text field under its shown label floats the label in its place while it is empty\n let blankControlId = \"\"\n let blankActive = false\n let blank: ReturnType<typeof blankPlaceholder> | null = null\n const syncBlank = () => {\n if (blankActive && !blank) {\n blank = blankPlaceholder(() => blankControlId)\n blank.start()\n } else if (!blankActive && blank) {\n blank.stop()\n blank = null\n } else blank?.sync()\n }\n onMounted(syncBlank)\n onUpdated(syncBlank)\n onBeforeUnmount(() => {\n blank?.stop()\n blank = null\n })\n\n return () => {\n const { required, row, opticallyAlign } = props\n const orientation = props.orientation ?? (row && !props.hideLabel ? \"horizontal\" : \"vertical\")\n const fieldId = props.id || `field-${generatedId}`\n const labelId = `${fieldId}-label`\n\n const description = slots.description ? slots.description() : props.description\n const hasDescription = slots.description ? hasContent(description as VNodeArrayChildren) : !!description\n const errorMessage = slots.errorMessage ? slots.errorMessage() : props.errorMessage\n const hasError = slots.errorMessage ? hasContent(errorMessage as VNodeArrayChildren) : !!errorMessage\n\n const descriptionId = hasDescription ? `${fieldId}-description` : undefined\n const errorId = hasError ? `${fieldId}-error` : undefined\n\n // Build aria-describedby from description + error IDs\n const ariaDescribedBy = [descriptionId, errorId].filter(Boolean).join(\" \") || undefined\n const invalid = hasError\n\n // Props to inject into the child control\n const fieldChildProps: FieldChildProps = {\n \"id\": fieldId,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": invalid || undefined,\n ...(opticallyAlign && { opticallyAlign }),\n }\n\n // Resolve the children\n let resolvedChildren: VNodeArrayChildren | undefined\n let childSize: unknown\n // The control's id, which the label's `for` has to match\n let controlId = fieldId\n if (slots.default) {\n const { proxy, state } = trackUse({ ...fieldChildProps, \"aria-labelledby\": labelId })\n const nodes = slots.default(proxy) as VNodeArrayChildren\n const child = state.used ? undefined : singleElement(nodes)\n childSize = child?.props?.size\n controlId = (child?.props?.id as string | undefined) || fieldId\n resolvedChildren = child ? [cloneWithFieldProps(child, { ...fieldChildProps, id: controlId }, labelId)] : nodes\n }\n const size = props.size ?? (CONTROL_SIZES.has(childSize) ? (childSize as ControlSize) : \"md\")\n blankControlId = controlId\n blankActive = !!row && orientation === \"vertical\" && !props.hideLabel\n\n const icon = row && slots.icon ? slots.icon() : null\n const labelAction = slots.labelAction ? slots.labelAction() : props.labelAction\n const hasLabelAction = slots.labelAction ? hasContent(labelAction as VNodeArrayChildren) : !!labelAction\n const labelElement = h(\"label\", { class: s.Label, id: labelId, for: controlId }, [\n slots.label ? slots.label() : props.label,\n required ? h(\"span\", { \"class\": s.RequiredIndicator, \"aria-hidden\": \"true\" }, \"*\") : null,\n ])\n\n return h(\n \"div\",\n mergeProps({\n ...(row && { ...attrs, onClick: undefined }),\n \"class\": clsx(s.Field, attrs.class as ClassValue),\n \"data-slot\": \"field\",\n \"data-size\": size,\n \"data-orientation\": orientation,\n \"data-optically-align\": opticallyAlign,\n \"data-row\": row ? \"\" : undefined,\n \"data-fill\": props.fill ? \"\" : undefined,\n \"data-label-hidden\": props.hideLabel ? \"\" : undefined,\n }, row ? {\n onClick: (event: MouseEvent) => {\n if (forwardingRowClick) return\n for (const handler of Array.isArray(attrs.onClick) ? attrs.onClick : [attrs.onClick]) {\n if (typeof handler === \"function\") handler(event)\n }\n if (event.defaultPrevented) return\n const target = event.target\n const root = event.currentTarget\n // The linked control keeps its state and keyboard behavior. Nested\n // actions, including a Select's clear button, keep their own click.\n if (!(target instanceof Element) || !(root instanceof HTMLElement) ||\n target.closest(\"[data-row]\") !== root ||\n target.closest('button, a, input, select, textarea, [role=\"button\"], [role=\"link\"], [contenteditable]:not([contenteditable=\"false\"])')) return\n const linkedControl = root.ownerDocument.getElementById(controlId)\n if (!linkedControl || linkedControl.closest(\"[data-row]\") !== root) return\n // Select's linked form proxy is inside its popup trigger. An\n // ordinary input never delegates to a sibling Unit popup.\n const direct = linkedControl.matches('input[aria-hidden=\"true\"]')\n ? linkedControl.closest<HTMLElement>(':is(button, [role=\"button\"])[aria-haspopup]:not([aria-haspopup=\"false\"])') ?? linkedControl\n : linkedControl\n // A product's own wrapper may take the id (a row component around a Select): the row then reaches the one\n // control inside it, as an iOS cell does; with two controls, or none, the press stays on the row.\n const control = direct === linkedControl && !linkedControl.matches(ROW_CONTROL) ? soleRowControl(linkedControl) : direct\n // A control of a row nested in the wrapper belongs to that row\n if (!control || control.closest(\"[data-row]\") !== root) return\n if (control.matches(':disabled, [disabled], [data-disabled], [aria-disabled=\"true\"], [data-loading], [aria-busy=\"true\"]')) return\n const label = target.closest(\"label\")\n // Native label activation stays native; span popup triggers need\n // forwarding from the Field's own label as well as its whitespace.\n if (label && (label.htmlFor !== linkedControl.id || label.control === linkedControl)) return\n // The row is the hit area for its plain editor. Focus only: a synthetic\n // click would also run input actions or disturb native text selection.\n if (control.matches('textarea, input:not([type]), input[type=\"text\"], input[type=\"email\"], input[type=\"password\"], input[type=\"search\"], input[type=\"tel\"], input[type=\"url\"], input[type=\"number\"]') &&\n !control.matches('[hidden], [aria-hidden=\"true\"]')) {\n control.focus({ preventScroll: true })\n return\n }\n if (!control.matches('button[role=\"radio\"], button[role=\"checkbox\"], button[role=\"switch\"], input[type=\"radio\"], input[type=\"checkbox\"], :is(button, [role=\"button\"])[aria-haspopup]:not([aria-haspopup=\"false\"])')) return\n forwardingRowClick = true\n try {\n control.focus({ preventScroll: true })\n control.click()\n } finally {\n // Form controls can bubble their hidden input click after the render flush.\n queueMicrotask(() => { forwardingRowClick = false })\n }\n },\n } : {}),\n [\n icon && hasContent(icon as VNodeArrayChildren) ? h(\"div\", { class: s.Icon, \"aria-hidden\": \"true\" }, [icon as VNodeChild]) : null,\n h(\"div\", { class: s.LabelGroup }, [\n hasLabelAction\n ? h(\"div\", { class: s.LabelRow }, [labelElement, h(\"div\", { class: s.LabelAction }, [labelAction as VNodeChild])])\n : labelElement,\n hasDescription ? h(\"div\", { class: s.Description, id: descriptionId }, [description as VNodeChild]) : null,\n ]),\n h(\"div\", { class: s.Content }, [\n h(\"div\", { class: s.Control }, resolvedChildren),\n hasError ? h(FieldError, { id: errorId }, () => [errorMessage as VNodeChild]) : null,\n ]),\n row && slots.action ? h(\"div\", { class: s.Action }, [slots.action()]) : null,\n ],\n )\n }\n },\n})\n\ntype FieldOwnProps = InstanceType<typeof FieldComponent>[\"$props\"]\n\n/** Field props; `class` reaches the root element. */\nexport type FieldProps = FieldOwnProps & { class?: ClassValue }\n\n/** Form field wrapper with label, description, error and accessibility linking. */\nexport const Field = FieldComponent as typeof FieldComponent & { new (): { $props: FieldProps } }\n"]}
@@ -1,10 +1,10 @@
1
1
  // Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Array.tsx. Do not edit.
2
2
  import { h } from "vue";
3
- const Array = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
3
+ const ArrayIcon = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
4
4
  h("path", { d: "M3 16.8V7.2C3 6.657 2.999 6.188 3.03 5.805C3.063 5.409 3.134 5.016 3.327 4.638C3.61453 4.07407 4.07307 3.61553 4.637 3.328C5.016 3.134 5.409 3.063 5.805 3.03C6.188 3 6.657 3 7.2 3H8C8.26522 3 8.51957 3.10536 8.70711 3.2929C8.89465 3.48043 9 3.73479 9 4C9 4.26522 8.89465 4.51957 8.70711 4.70711C8.51957 4.89465 8.26522 5 8 5H7.2C6.624 5 6.251 5.001 5.968 5.024C5.696 5.047 5.595 5.084 5.546 5.109C5.35785 5.20488 5.20488 5.35785 5.109 5.546C5.084 5.596 5.047 5.696 5.024 5.968C5.001 6.25 5 6.624 5 7.2V16.8C5 17.376 5.001 17.749 5.024 18.032C5.047 18.304 5.084 18.405 5.109 18.454C5.205 18.642 5.358 18.794 5.546 18.891C5.596 18.916 5.696 18.953 5.968 18.976C6.251 18.999 6.624 19 7.2 19H8C8.26522 19 8.51957 19.1054 8.70711 19.2929C8.89465 19.4804 9 19.7348 9 20C9 20.2652 8.89465 20.5196 8.70711 20.7071C8.51957 20.8946 8.26522 21 8 21H7.2C6.657 21 6.188 21.001 5.805 20.97C5.409 20.937 5.016 20.866 4.638 20.673C4.07407 20.3855 3.61553 19.9269 3.328 19.363C3.134 18.984 3.063 18.591 3.03 18.195C3 17.812 3 17.343 3 16.8ZM19 16.8V7.2C19 6.624 18.999 6.251 18.976 5.968C18.953 5.696 18.916 5.595 18.891 5.546C18.7952 5.35781 18.6422 5.20482 18.454 5.109C18.404 5.084 18.304 5.047 18.032 5.024C17.6218 5.00107 17.2108 4.99306 16.8 5H16C15.7348 5 15.4804 4.89465 15.2929 4.70711C15.1054 4.51957 15 4.26522 15 4C15 3.73479 15.1054 3.48043 15.2929 3.2929C15.4804 3.10536 15.7348 3 16 3H16.8C17.343 3 17.812 2.999 18.195 3.03C18.591 3.063 18.984 3.134 19.362 3.327C19.9259 3.61453 20.3845 4.07307 20.672 4.637C20.866 5.016 20.937 5.409 20.97 5.805C21.001 6.188 21 6.657 21 7.2V16.8C21 17.343 21.001 17.812 20.97 18.195C20.937 18.591 20.866 18.984 20.673 19.362C20.3855 19.9259 19.9269 20.3845 19.363 20.672C18.984 20.866 18.591 20.937 18.195 20.97C17.812 21.001 17.343 21 16.8 21H16C15.7348 21 15.4804 20.8946 15.2929 20.7071C15.1054 20.5196 15 20.2652 15 20C15 19.7348 15.1054 19.4804 15.2929 19.2929C15.4804 19.1054 15.7348 19 16 19H16.8C17.376 19 17.749 18.999 18.032 18.976C18.304 18.953 18.405 18.916 18.454 18.891C18.6422 18.7952 18.7952 18.6422 18.891 18.454C18.916 18.404 18.953 18.304 18.976 18.032C18.999 17.749 19 17.376 19 16.8Z", fill: "currentColor" }),
5
5
  ]);
6
- Array.displayName = "Array";
6
+ ArrayIcon.displayName = "Array";
7
7
  // Every attribute goes through `props` above, overriding the defaults
8
- Array.inheritAttrs = false;
9
- export default Array;
8
+ ArrayIcon.inheritAttrs = false;
9
+ export default ArrayIcon;
10
10
  //# sourceMappingURL=Array.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Array.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Array.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,KAAK,GAAuC,CAAC,KAAK,EAAE,EAAE,CAC1D,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,0lEAA0lE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CACnoE,CAAC,CAAA;AACJ,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAC3B,sEAAsE;AACtE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAA;AAC1B,eAAe,KAAK,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Array.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst Array: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M3 16.8V7.2C3 6.657 2.999 6.188 3.03 5.805C3.063 5.409 3.134 5.016 3.327 4.638C3.61453 4.07407 4.07307 3.61553 4.637 3.328C5.016 3.134 5.409 3.063 5.805 3.03C6.188 3 6.657 3 7.2 3H8C8.26522 3 8.51957 3.10536 8.70711 3.2929C8.89465 3.48043 9 3.73479 9 4C9 4.26522 8.89465 4.51957 8.70711 4.70711C8.51957 4.89465 8.26522 5 8 5H7.2C6.624 5 6.251 5.001 5.968 5.024C5.696 5.047 5.595 5.084 5.546 5.109C5.35785 5.20488 5.20488 5.35785 5.109 5.546C5.084 5.596 5.047 5.696 5.024 5.968C5.001 6.25 5 6.624 5 7.2V16.8C5 17.376 5.001 17.749 5.024 18.032C5.047 18.304 5.084 18.405 5.109 18.454C5.205 18.642 5.358 18.794 5.546 18.891C5.596 18.916 5.696 18.953 5.968 18.976C6.251 18.999 6.624 19 7.2 19H8C8.26522 19 8.51957 19.1054 8.70711 19.2929C8.89465 19.4804 9 19.7348 9 20C9 20.2652 8.89465 20.5196 8.70711 20.7071C8.51957 20.8946 8.26522 21 8 21H7.2C6.657 21 6.188 21.001 5.805 20.97C5.409 20.937 5.016 20.866 4.638 20.673C4.07407 20.3855 3.61553 19.9269 3.328 19.363C3.134 18.984 3.063 18.591 3.03 18.195C3 17.812 3 17.343 3 16.8ZM19 16.8V7.2C19 6.624 18.999 6.251 18.976 5.968C18.953 5.696 18.916 5.595 18.891 5.546C18.7952 5.35781 18.6422 5.20482 18.454 5.109C18.404 5.084 18.304 5.047 18.032 5.024C17.6218 5.00107 17.2108 4.99306 16.8 5H16C15.7348 5 15.4804 4.89465 15.2929 4.70711C15.1054 4.51957 15 4.26522 15 4C15 3.73479 15.1054 3.48043 15.2929 3.2929C15.4804 3.10536 15.7348 3 16 3H16.8C17.343 3 17.812 2.999 18.195 3.03C18.591 3.063 18.984 3.134 19.362 3.327C19.9259 3.61453 20.3845 4.07307 20.672 4.637C20.866 5.016 20.937 5.409 20.97 5.805C21.001 6.188 21 6.657 21 7.2V16.8C21 17.343 21.001 17.812 20.97 18.195C20.937 18.591 20.866 18.984 20.673 19.362C20.3855 19.9259 19.9269 20.3845 19.363 20.672C18.984 20.866 18.591 20.937 18.195 20.97C17.812 21.001 17.343 21 16.8 21H16C15.7348 21 15.4804 20.8946 15.2929 20.7071C15.1054 20.5196 15 20.2652 15 20C15 19.7348 15.1054 19.4804 15.2929 19.2929C15.4804 19.1054 15.7348 19 16 19H16.8C17.376 19 17.749 18.999 18.032 18.976C18.304 18.953 18.405 18.916 18.454 18.891C18.6422 18.7952 18.7952 18.6422 18.891 18.454C18.916 18.404 18.953 18.304 18.976 18.032C18.999 17.749 19 17.376 19 16.8Z\", fill: \"currentColor\" }),\n ])\nArray.displayName = \"Array\"\n// Every attribute goes through `props` above, overriding the defaults\nArray.inheritAttrs = false\nexport default Array\n"]}
1
+ {"version":3,"file":"Array.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Array.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,SAAS,GAAuC,CAAC,KAAK,EAAE,EAAE,CAC9D,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,0lEAA0lE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CACnoE,CAAC,CAAA;AACJ,SAAS,CAAC,WAAW,GAAG,OAAO,CAAA;AAC/B,sEAAsE;AACtE,SAAS,CAAC,YAAY,GAAG,KAAK,CAAA;AAC9B,eAAe,SAAS,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Array.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst ArrayIcon: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M3 16.8V7.2C3 6.657 2.999 6.188 3.03 5.805C3.063 5.409 3.134 5.016 3.327 4.638C3.61453 4.07407 4.07307 3.61553 4.637 3.328C5.016 3.134 5.409 3.063 5.805 3.03C6.188 3 6.657 3 7.2 3H8C8.26522 3 8.51957 3.10536 8.70711 3.2929C8.89465 3.48043 9 3.73479 9 4C9 4.26522 8.89465 4.51957 8.70711 4.70711C8.51957 4.89465 8.26522 5 8 5H7.2C6.624 5 6.251 5.001 5.968 5.024C5.696 5.047 5.595 5.084 5.546 5.109C5.35785 5.20488 5.20488 5.35785 5.109 5.546C5.084 5.596 5.047 5.696 5.024 5.968C5.001 6.25 5 6.624 5 7.2V16.8C5 17.376 5.001 17.749 5.024 18.032C5.047 18.304 5.084 18.405 5.109 18.454C5.205 18.642 5.358 18.794 5.546 18.891C5.596 18.916 5.696 18.953 5.968 18.976C6.251 18.999 6.624 19 7.2 19H8C8.26522 19 8.51957 19.1054 8.70711 19.2929C8.89465 19.4804 9 19.7348 9 20C9 20.2652 8.89465 20.5196 8.70711 20.7071C8.51957 20.8946 8.26522 21 8 21H7.2C6.657 21 6.188 21.001 5.805 20.97C5.409 20.937 5.016 20.866 4.638 20.673C4.07407 20.3855 3.61553 19.9269 3.328 19.363C3.134 18.984 3.063 18.591 3.03 18.195C3 17.812 3 17.343 3 16.8ZM19 16.8V7.2C19 6.624 18.999 6.251 18.976 5.968C18.953 5.696 18.916 5.595 18.891 5.546C18.7952 5.35781 18.6422 5.20482 18.454 5.109C18.404 5.084 18.304 5.047 18.032 5.024C17.6218 5.00107 17.2108 4.99306 16.8 5H16C15.7348 5 15.4804 4.89465 15.2929 4.70711C15.1054 4.51957 15 4.26522 15 4C15 3.73479 15.1054 3.48043 15.2929 3.2929C15.4804 3.10536 15.7348 3 16 3H16.8C17.343 3 17.812 2.999 18.195 3.03C18.591 3.063 18.984 3.134 19.362 3.327C19.9259 3.61453 20.3845 4.07307 20.672 4.637C20.866 5.016 20.937 5.409 20.97 5.805C21.001 6.188 21 6.657 21 7.2V16.8C21 17.343 21.001 17.812 20.97 18.195C20.937 18.591 20.866 18.984 20.673 19.362C20.3855 19.9259 19.9269 20.3845 19.363 20.672C18.984 20.866 18.591 20.937 18.195 20.97C17.812 21.001 17.343 21 16.8 21H16C15.7348 21 15.4804 20.8946 15.2929 20.7071C15.1054 20.5196 15 20.2652 15 20C15 19.7348 15.1054 19.4804 15.2929 19.2929C15.4804 19.1054 15.7348 19 16 19H16.8C17.376 19 17.749 18.999 18.032 18.976C18.304 18.953 18.405 18.916 18.454 18.891C18.6422 18.7952 18.7952 18.6422 18.891 18.454C18.916 18.404 18.953 18.304 18.976 18.032C18.999 17.749 19 17.376 19 16.8Z\", fill: \"currentColor\" }),\n ])\nArrayIcon.displayName = \"Array\"\n// Every attribute goes through `props` above, overriding the defaults\nArrayIcon.inheritAttrs = false\nexport default ArrayIcon\n"]}
@@ -1,10 +1,10 @@
1
1
  // Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Boolean.tsx. Do not edit.
2
2
  import { h } from "vue";
3
- const Boolean = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
3
+ const BooleanIcon = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
4
4
  h("path", { d: "M15.2 3C16.024 3 16.702 2.999 17.252 3.044C17.814 3.09 18.332 3.188 18.816 3.436C19.5686 3.81955 20.1805 4.43143 20.564 5.184C20.812 5.669 20.91 6.186 20.956 6.748C21.001 7.298 21 7.976 21 8.8V15.2C21 16.024 21.001 16.702 20.956 17.252C20.91 17.814 20.812 18.332 20.564 18.816C20.1804 19.5685 19.5685 20.1804 18.816 20.564C18.331 20.812 17.814 20.91 17.252 20.956C16.702 21.001 16.024 21 15.2 21H8.8C7.976 21 7.298 21.001 6.748 20.956C6.186 20.91 5.668 20.812 5.184 20.564C4.43143 20.1805 3.81955 19.5686 3.436 18.816C3.188 18.331 3.09 17.814 3.044 17.252C2.999 16.702 3 16.024 3 15.2V8.8C3 7.976 2.999 7.298 3.044 6.748C3.09 6.186 3.188 5.668 3.436 5.184C3.81955 4.43143 4.43143 3.81955 5.184 3.436C5.669 3.188 6.186 3.09 6.748 3.044C7.298 2.999 7.976 3 8.8 3H15.2ZM8.8 5C7.943 5 7.361 5 6.911 5.037C6.473 5.073 6.248 5.138 6.091 5.217C5.71491 5.40918 5.40932 5.71548 5.218 6.092C5.138 6.248 5.073 6.472 5.038 6.912C5 7.361 5 7.942 5 8.8V15.2C5 16.057 5 16.639 5.037 17.089C5.073 17.527 5.138 17.752 5.217 17.909C5.31276 18.0956 5.43728 18.2661 5.586 18.414L18.414 5.586C18.2657 5.43755 18.0949 5.31336 17.908 5.218C17.752 5.138 17.528 5.073 17.088 5.038C16.639 5 16.058 5 15.2 5H8.8Z", fill: "currentColor" }),
5
5
  ]);
6
- Boolean.displayName = "Boolean";
6
+ BooleanIcon.displayName = "Boolean";
7
7
  // Every attribute goes through `props` above, overriding the defaults
8
- Boolean.inheritAttrs = false;
9
- export default Boolean;
8
+ BooleanIcon.inheritAttrs = false;
9
+ export default BooleanIcon;
10
10
  //# sourceMappingURL=Boolean.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Boolean.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Boolean.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,OAAO,GAAuC,CAAC,KAAK,EAAE,EAAE,CAC5D,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,mqCAAmqC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CAC5sC,CAAC,CAAA;AACJ,OAAO,CAAC,WAAW,GAAG,SAAS,CAAA;AAC/B,sEAAsE;AACtE,OAAO,CAAC,YAAY,GAAG,KAAK,CAAA;AAC5B,eAAe,OAAO,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Boolean.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst Boolean: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M15.2 3C16.024 3 16.702 2.999 17.252 3.044C17.814 3.09 18.332 3.188 18.816 3.436C19.5686 3.81955 20.1805 4.43143 20.564 5.184C20.812 5.669 20.91 6.186 20.956 6.748C21.001 7.298 21 7.976 21 8.8V15.2C21 16.024 21.001 16.702 20.956 17.252C20.91 17.814 20.812 18.332 20.564 18.816C20.1804 19.5685 19.5685 20.1804 18.816 20.564C18.331 20.812 17.814 20.91 17.252 20.956C16.702 21.001 16.024 21 15.2 21H8.8C7.976 21 7.298 21.001 6.748 20.956C6.186 20.91 5.668 20.812 5.184 20.564C4.43143 20.1805 3.81955 19.5686 3.436 18.816C3.188 18.331 3.09 17.814 3.044 17.252C2.999 16.702 3 16.024 3 15.2V8.8C3 7.976 2.999 7.298 3.044 6.748C3.09 6.186 3.188 5.668 3.436 5.184C3.81955 4.43143 4.43143 3.81955 5.184 3.436C5.669 3.188 6.186 3.09 6.748 3.044C7.298 2.999 7.976 3 8.8 3H15.2ZM8.8 5C7.943 5 7.361 5 6.911 5.037C6.473 5.073 6.248 5.138 6.091 5.217C5.71491 5.40918 5.40932 5.71548 5.218 6.092C5.138 6.248 5.073 6.472 5.038 6.912C5 7.361 5 7.942 5 8.8V15.2C5 16.057 5 16.639 5.037 17.089C5.073 17.527 5.138 17.752 5.217 17.909C5.31276 18.0956 5.43728 18.2661 5.586 18.414L18.414 5.586C18.2657 5.43755 18.0949 5.31336 17.908 5.218C17.752 5.138 17.528 5.073 17.088 5.038C16.639 5 16.058 5 15.2 5H8.8Z\", fill: \"currentColor\" }),\n ])\nBoolean.displayName = \"Boolean\"\n// Every attribute goes through `props` above, overriding the defaults\nBoolean.inheritAttrs = false\nexport default Boolean\n"]}
1
+ {"version":3,"file":"Boolean.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Boolean.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,WAAW,GAAuC,CAAC,KAAK,EAAE,EAAE,CAChE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,mqCAAmqC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CAC5sC,CAAC,CAAA;AACJ,WAAW,CAAC,WAAW,GAAG,SAAS,CAAA;AACnC,sEAAsE;AACtE,WAAW,CAAC,YAAY,GAAG,KAAK,CAAA;AAChC,eAAe,WAAW,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Boolean.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst BooleanIcon: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M15.2 3C16.024 3 16.702 2.999 17.252 3.044C17.814 3.09 18.332 3.188 18.816 3.436C19.5686 3.81955 20.1805 4.43143 20.564 5.184C20.812 5.669 20.91 6.186 20.956 6.748C21.001 7.298 21 7.976 21 8.8V15.2C21 16.024 21.001 16.702 20.956 17.252C20.91 17.814 20.812 18.332 20.564 18.816C20.1804 19.5685 19.5685 20.1804 18.816 20.564C18.331 20.812 17.814 20.91 17.252 20.956C16.702 21.001 16.024 21 15.2 21H8.8C7.976 21 7.298 21.001 6.748 20.956C6.186 20.91 5.668 20.812 5.184 20.564C4.43143 20.1805 3.81955 19.5686 3.436 18.816C3.188 18.331 3.09 17.814 3.044 17.252C2.999 16.702 3 16.024 3 15.2V8.8C3 7.976 2.999 7.298 3.044 6.748C3.09 6.186 3.188 5.668 3.436 5.184C3.81955 4.43143 4.43143 3.81955 5.184 3.436C5.669 3.188 6.186 3.09 6.748 3.044C7.298 2.999 7.976 3 8.8 3H15.2ZM8.8 5C7.943 5 7.361 5 6.911 5.037C6.473 5.073 6.248 5.138 6.091 5.217C5.71491 5.40918 5.40932 5.71548 5.218 6.092C5.138 6.248 5.073 6.472 5.038 6.912C5 7.361 5 7.942 5 8.8V15.2C5 16.057 5 16.639 5.037 17.089C5.073 17.527 5.138 17.752 5.217 17.909C5.31276 18.0956 5.43728 18.2661 5.586 18.414L18.414 5.586C18.2657 5.43755 18.0949 5.31336 17.908 5.218C17.752 5.138 17.528 5.073 17.088 5.038C16.639 5 16.058 5 15.2 5H8.8Z\", fill: \"currentColor\" }),\n ])\nBooleanIcon.displayName = \"Boolean\"\n// Every attribute goes through `props` above, overriding the defaults\nBooleanIcon.inheritAttrs = false\nexport default BooleanIcon\n"]}
@@ -1,10 +1,10 @@
1
1
  // Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Clipboard.tsx. Do not edit.
2
2
  import { h } from "vue";
3
- const Clipboard = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
3
+ const ClipboardIcon = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
4
4
  h("path", { d: "M12.0001 3.5C10.8955 3.5 10.0001 4.39543 10.0001 5.5H14.0001C14.0001 4.39543 13.1047 3.5 12.0001 3.5ZM8.53463 3.50105C9.2261 2.30487 10.5191 1.5 12.0001 1.5C13.4811 1.5 14.7741 2.30487 15.4656 3.50105C15.8379 3.50314 16.164 3.50933 16.4485 3.52772C16.8932 3.55647 17.3051 3.61797 17.7038 3.7735C18.7459 4.18001 19.5701 5.00425 19.9766 6.04631C20.1321 6.44501 20.1936 6.85693 20.2224 7.3016C20.2501 7.73064 20.2501 8.25411 20.2501 8.88827V15.7413C20.2501 16.5463 20.2501 17.2106 20.2059 17.7518C20.16 18.3139 20.0614 18.8306 19.8141 19.316C19.4306 20.0686 18.8187 20.6805 18.0661 21.064C17.5807 21.3113 17.064 21.4099 16.5019 21.4558C15.9608 21.5 15.2964 21.5 14.4914 21.5H9.50868C8.70372 21.5 8.03936 21.5 7.49817 21.4558C6.93608 21.4099 6.41937 21.3113 5.93404 21.064C5.18139 20.6805 4.56947 20.0686 4.18597 19.316C3.93868 18.8306 3.84012 18.3139 3.79419 17.7518C3.74998 17.2106 3.74999 16.5463 3.75 15.7413V8.88839C3.74999 8.25418 3.74999 7.73066 3.77773 7.30159C3.80648 6.85688 3.86799 6.44492 4.02355 6.0462C4.43005 5.00423 5.25423 4.18005 6.2962 3.77355C6.69492 3.61799 7.10688 3.55648 7.55159 3.52773C7.83615 3.50933 8.16225 3.50314 8.53463 3.50105ZM8.00013 5.5092C7.88438 5.51259 7.77867 5.51722 7.68064 5.52356C7.33211 5.5461 7.15025 5.58717 7.0231 5.63677C6.50212 5.84002 6.09003 6.25212 5.88677 6.7731C5.83717 6.90025 5.7961 7.08211 5.77356 7.43064C5.75049 7.78751 5.75 8.24611 5.75 8.92082V15.7C5.75 16.5566 5.75078 17.1389 5.78755 17.589C5.82337 18.0274 5.8883 18.2516 5.96799 18.408C6.15973 18.7843 6.4657 19.0903 6.84202 19.282C6.99842 19.3617 7.22262 19.4266 7.66104 19.4624C8.11113 19.4992 8.69342 19.5 9.55 19.5H14.4501C15.3067 19.5 15.889 19.4992 16.3391 19.4624C16.7775 19.4266 17.0017 19.3617 17.1581 19.282C17.5344 19.0903 17.8404 18.7843 18.0321 18.408C18.1118 18.2516 18.1767 18.0274 18.2126 17.589C18.2493 17.1389 18.2501 16.5566 18.2501 15.7V8.92071C18.2501 8.24605 18.2496 7.78748 18.2266 7.43064C18.204 7.08215 18.163 6.90029 18.1134 6.77315C17.9101 6.25213 17.498 5.84 16.977 5.63675C16.8498 5.58716 16.668 5.54609 16.3195 5.52356C16.2215 5.51722 16.1158 5.51259 16.0001 5.5092C15.9951 6.60954 15.1016 7.5 14.0001 7.5H10.0001C8.89861 7.5 8.00509 6.60954 8.00013 5.5092Z", fill: "currentColor" }),
5
5
  ]);
6
- Clipboard.displayName = "Clipboard";
6
+ ClipboardIcon.displayName = "Clipboard";
7
7
  // Every attribute goes through `props` above, overriding the defaults
8
- Clipboard.inheritAttrs = false;
9
- export default Clipboard;
8
+ ClipboardIcon.inheritAttrs = false;
9
+ export default ClipboardIcon;
10
10
  //# sourceMappingURL=Clipboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Clipboard.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Clipboard.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,SAAS,GAAuC,CAAC,KAAK,EAAE,EAAE,CAC9D,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,upEAAupE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CAChsE,CAAC,CAAA;AACJ,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AACnC,sEAAsE;AACtE,SAAS,CAAC,YAAY,GAAG,KAAK,CAAA;AAC9B,eAAe,SAAS,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Clipboard.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst Clipboard: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M12.0001 3.5C10.8955 3.5 10.0001 4.39543 10.0001 5.5H14.0001C14.0001 4.39543 13.1047 3.5 12.0001 3.5ZM8.53463 3.50105C9.2261 2.30487 10.5191 1.5 12.0001 1.5C13.4811 1.5 14.7741 2.30487 15.4656 3.50105C15.8379 3.50314 16.164 3.50933 16.4485 3.52772C16.8932 3.55647 17.3051 3.61797 17.7038 3.7735C18.7459 4.18001 19.5701 5.00425 19.9766 6.04631C20.1321 6.44501 20.1936 6.85693 20.2224 7.3016C20.2501 7.73064 20.2501 8.25411 20.2501 8.88827V15.7413C20.2501 16.5463 20.2501 17.2106 20.2059 17.7518C20.16 18.3139 20.0614 18.8306 19.8141 19.316C19.4306 20.0686 18.8187 20.6805 18.0661 21.064C17.5807 21.3113 17.064 21.4099 16.5019 21.4558C15.9608 21.5 15.2964 21.5 14.4914 21.5H9.50868C8.70372 21.5 8.03936 21.5 7.49817 21.4558C6.93608 21.4099 6.41937 21.3113 5.93404 21.064C5.18139 20.6805 4.56947 20.0686 4.18597 19.316C3.93868 18.8306 3.84012 18.3139 3.79419 17.7518C3.74998 17.2106 3.74999 16.5463 3.75 15.7413V8.88839C3.74999 8.25418 3.74999 7.73066 3.77773 7.30159C3.80648 6.85688 3.86799 6.44492 4.02355 6.0462C4.43005 5.00423 5.25423 4.18005 6.2962 3.77355C6.69492 3.61799 7.10688 3.55648 7.55159 3.52773C7.83615 3.50933 8.16225 3.50314 8.53463 3.50105ZM8.00013 5.5092C7.88438 5.51259 7.77867 5.51722 7.68064 5.52356C7.33211 5.5461 7.15025 5.58717 7.0231 5.63677C6.50212 5.84002 6.09003 6.25212 5.88677 6.7731C5.83717 6.90025 5.7961 7.08211 5.77356 7.43064C5.75049 7.78751 5.75 8.24611 5.75 8.92082V15.7C5.75 16.5566 5.75078 17.1389 5.78755 17.589C5.82337 18.0274 5.8883 18.2516 5.96799 18.408C6.15973 18.7843 6.4657 19.0903 6.84202 19.282C6.99842 19.3617 7.22262 19.4266 7.66104 19.4624C8.11113 19.4992 8.69342 19.5 9.55 19.5H14.4501C15.3067 19.5 15.889 19.4992 16.3391 19.4624C16.7775 19.4266 17.0017 19.3617 17.1581 19.282C17.5344 19.0903 17.8404 18.7843 18.0321 18.408C18.1118 18.2516 18.1767 18.0274 18.2126 17.589C18.2493 17.1389 18.2501 16.5566 18.2501 15.7V8.92071C18.2501 8.24605 18.2496 7.78748 18.2266 7.43064C18.204 7.08215 18.163 6.90029 18.1134 6.77315C17.9101 6.25213 17.498 5.84 16.977 5.63675C16.8498 5.58716 16.668 5.54609 16.3195 5.52356C16.2215 5.51722 16.1158 5.51259 16.0001 5.5092C15.9951 6.60954 15.1016 7.5 14.0001 7.5H10.0001C8.89861 7.5 8.00509 6.60954 8.00013 5.5092Z\", fill: \"currentColor\" }),\n ])\nClipboard.displayName = \"Clipboard\"\n// Every attribute goes through `props` above, overriding the defaults\nClipboard.inheritAttrs = false\nexport default Clipboard\n"]}
1
+ {"version":3,"file":"Clipboard.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Clipboard.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,aAAa,GAAuC,CAAC,KAAK,EAAE,EAAE,CAClE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,upEAAupE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CAChsE,CAAC,CAAA;AACJ,aAAa,CAAC,WAAW,GAAG,WAAW,CAAA;AACvC,sEAAsE;AACtE,aAAa,CAAC,YAAY,GAAG,KAAK,CAAA;AAClC,eAAe,aAAa,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Clipboard.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst ClipboardIcon: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M12.0001 3.5C10.8955 3.5 10.0001 4.39543 10.0001 5.5H14.0001C14.0001 4.39543 13.1047 3.5 12.0001 3.5ZM8.53463 3.50105C9.2261 2.30487 10.5191 1.5 12.0001 1.5C13.4811 1.5 14.7741 2.30487 15.4656 3.50105C15.8379 3.50314 16.164 3.50933 16.4485 3.52772C16.8932 3.55647 17.3051 3.61797 17.7038 3.7735C18.7459 4.18001 19.5701 5.00425 19.9766 6.04631C20.1321 6.44501 20.1936 6.85693 20.2224 7.3016C20.2501 7.73064 20.2501 8.25411 20.2501 8.88827V15.7413C20.2501 16.5463 20.2501 17.2106 20.2059 17.7518C20.16 18.3139 20.0614 18.8306 19.8141 19.316C19.4306 20.0686 18.8187 20.6805 18.0661 21.064C17.5807 21.3113 17.064 21.4099 16.5019 21.4558C15.9608 21.5 15.2964 21.5 14.4914 21.5H9.50868C8.70372 21.5 8.03936 21.5 7.49817 21.4558C6.93608 21.4099 6.41937 21.3113 5.93404 21.064C5.18139 20.6805 4.56947 20.0686 4.18597 19.316C3.93868 18.8306 3.84012 18.3139 3.79419 17.7518C3.74998 17.2106 3.74999 16.5463 3.75 15.7413V8.88839C3.74999 8.25418 3.74999 7.73066 3.77773 7.30159C3.80648 6.85688 3.86799 6.44492 4.02355 6.0462C4.43005 5.00423 5.25423 4.18005 6.2962 3.77355C6.69492 3.61799 7.10688 3.55648 7.55159 3.52773C7.83615 3.50933 8.16225 3.50314 8.53463 3.50105ZM8.00013 5.5092C7.88438 5.51259 7.77867 5.51722 7.68064 5.52356C7.33211 5.5461 7.15025 5.58717 7.0231 5.63677C6.50212 5.84002 6.09003 6.25212 5.88677 6.7731C5.83717 6.90025 5.7961 7.08211 5.77356 7.43064C5.75049 7.78751 5.75 8.24611 5.75 8.92082V15.7C5.75 16.5566 5.75078 17.1389 5.78755 17.589C5.82337 18.0274 5.8883 18.2516 5.96799 18.408C6.15973 18.7843 6.4657 19.0903 6.84202 19.282C6.99842 19.3617 7.22262 19.4266 7.66104 19.4624C8.11113 19.4992 8.69342 19.5 9.55 19.5H14.4501C15.3067 19.5 15.889 19.4992 16.3391 19.4624C16.7775 19.4266 17.0017 19.3617 17.1581 19.282C17.5344 19.0903 17.8404 18.7843 18.0321 18.408C18.1118 18.2516 18.1767 18.0274 18.2126 17.589C18.2493 17.1389 18.2501 16.5566 18.2501 15.7V8.92071C18.2501 8.24605 18.2496 7.78748 18.2266 7.43064C18.204 7.08215 18.163 6.90029 18.1134 6.77315C17.9101 6.25213 17.498 5.84 16.977 5.63675C16.8498 5.58716 16.668 5.54609 16.3195 5.52356C16.2215 5.51722 16.1158 5.51259 16.0001 5.5092C15.9951 6.60954 15.1016 7.5 14.0001 7.5H10.0001C8.89861 7.5 8.00509 6.60954 8.00013 5.5092Z\", fill: \"currentColor\" }),\n ])\nClipboardIcon.displayName = \"Clipboard\"\n// Every attribute goes through `props` above, overriding the defaults\nClipboardIcon.inheritAttrs = false\nexport default ClipboardIcon\n"]}
@@ -1,10 +1,10 @@
1
1
  // Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Comment.tsx. Do not edit.
2
2
  import { h } from "vue";
3
- const Comment = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
3
+ const CommentIcon = (props) => h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props }, [
4
4
  h("path", { d: "M8.25681 3H15.7394C16.5444 2.99999 17.2087 2.99998 17.7499 3.04419C18.312 3.09012 18.8287 3.18868 19.3141 3.43597C20.0667 3.81947 20.6786 4.43139 21.0621 5.18404C21.3094 5.66937 21.408 6.18608 21.4539 6.74817C21.4981 7.28936 21.4981 7.95372 21.4981 8.75868V14.7135C21.4981 14.7501 21.4981 14.7861 21.4981 14.8216C21.4984 15.4471 21.4986 15.9109 21.4136 16.3179C21.0885 17.8743 19.8724 19.0904 18.316 19.4155C17.909 19.5005 17.4452 19.5003 16.8198 19.5C16.7842 19.5 16.7482 19.5 16.7116 19.5C16.4464 19.5 16.3688 19.5008 16.2971 19.5066C15.9916 19.5315 15.696 19.6262 15.433 19.7835C15.3713 19.8204 15.3077 19.8649 15.0919 20.019L13.5093 21.1495C13.4863 21.1659 13.4627 21.1829 13.4385 21.2004C13.1832 21.3843 12.8629 21.6152 12.4892 21.7099C12.1669 21.7915 11.8293 21.7915 11.507 21.7099C11.1333 21.6152 10.813 21.3843 10.5577 21.2004C10.5335 21.1829 10.5099 21.1659 10.4869 21.1495L8.9043 20.019C8.68849 19.8649 8.62494 19.8204 8.56317 19.7835C8.30018 19.6262 8.00456 19.5315 7.69915 19.5066C7.6274 19.5008 7.54986 19.5 7.28465 19.5C7.24805 19.5 7.212 19.5 7.17646 19.5C6.55106 19.5003 6.08718 19.5005 5.68025 19.4155C4.12381 19.0904 2.90772 17.8743 2.58261 16.3179C2.49761 15.9109 2.49781 15.4471 2.49808 14.8216C2.49809 14.7861 2.49811 14.7501 2.49811 14.7135V8.7587C2.49809 7.95373 2.49808 7.28937 2.5423 6.74817C2.58823 6.18608 2.68679 5.66937 2.93408 5.18404C3.31757 4.43139 3.9295 3.81947 4.68214 3.43597C5.16748 3.18868 5.68418 3.09012 6.24628 3.04419C6.78748 2.99998 7.45184 2.99999 8.25681 3ZM6.40914 5.03755C5.97073 5.07337 5.74653 5.1383 5.59013 5.21799C5.2138 5.40973 4.90784 5.7157 4.71609 6.09202C4.6364 6.24842 4.57148 6.47262 4.53566 6.91104C4.49888 7.36113 4.49811 7.94342 4.49811 8.8V14.7135C4.49811 15.4948 4.50343 15.7321 4.54036 15.9089C4.70291 16.6871 5.31096 17.2952 6.08918 17.4577C6.26596 17.4947 6.50333 17.5 7.28465 17.5H7.31905C7.53532 17.5 7.69861 17.4999 7.86159 17.5132C8.47242 17.563 9.06364 17.7525 9.58962 18.067C9.72996 18.1509 9.86282 18.2458 10.0388 18.3716L11.6494 19.522C11.8276 19.6493 11.921 19.7154 11.9916 19.7588C11.9938 19.7602 11.996 19.7615 11.9981 19.7628C12.0002 19.7615 12.0024 19.7602 12.0046 19.7588C12.0752 19.7154 12.1686 19.6493 12.3469 19.522L13.9574 18.3716C14.1334 18.2458 14.2663 18.1509 14.4066 18.067C14.9326 17.7525 15.5238 17.563 16.1346 17.5132C16.2976 17.4999 16.4609 17.5 16.6772 17.5H16.7116C17.4929 17.5 17.7302 17.4947 17.907 17.4577C18.6853 17.2952 19.2933 16.6871 19.4559 15.9089C19.4928 15.7321 19.4981 15.4948 19.4981 14.7135V8.8C19.4981 7.94342 19.4973 7.36113 19.4606 6.91104C19.4247 6.47262 19.3598 6.24842 19.2801 6.09202C19.0884 5.7157 18.7824 5.40973 18.4061 5.21799C18.2497 5.1383 18.0255 5.07337 17.5871 5.03755C17.137 5.00078 16.5547 5 15.6981 5H8.29811C7.44153 5 6.85923 5.00078 6.40914 5.03755ZM8.00006 9C8.00006 8.44772 8.44777 8 9.00006 8H15.0001C15.5523 8 16.0001 8.44772 16.0001 9C16.0001 9.55229 15.5523 10 15.0001 10H9.00006C8.44777 10 8.00006 9.55229 8.00006 9ZM7.99811 13C7.99811 12.4477 8.44582 12 8.99811 12H11.9981C12.5504 12 12.9981 12.4477 12.9981 13C12.9981 13.5523 12.5504 14 11.9981 14H8.99811C8.44582 14 7.99811 13.5523 7.99811 13Z", fill: "currentColor" }),
5
5
  ]);
6
- Comment.displayName = "Comment";
6
+ CommentIcon.displayName = "Comment";
7
7
  // Every attribute goes through `props` above, overriding the defaults
8
- Comment.inheritAttrs = false;
9
- export default Comment;
8
+ CommentIcon.inheritAttrs = false;
9
+ export default CommentIcon;
10
10
  //# sourceMappingURL=Comment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Comment.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Comment.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,OAAO,GAAuC,CAAC,KAAK,EAAE,EAAE,CAC5D,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,+jGAA+jG,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CACxmG,CAAC,CAAA;AACJ,OAAO,CAAC,WAAW,GAAG,SAAS,CAAA;AAC/B,sEAAsE;AACtE,OAAO,CAAC,YAAY,GAAG,KAAK,CAAA;AAC5B,eAAe,OAAO,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Comment.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst Comment: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M8.25681 3H15.7394C16.5444 2.99999 17.2087 2.99998 17.7499 3.04419C18.312 3.09012 18.8287 3.18868 19.3141 3.43597C20.0667 3.81947 20.6786 4.43139 21.0621 5.18404C21.3094 5.66937 21.408 6.18608 21.4539 6.74817C21.4981 7.28936 21.4981 7.95372 21.4981 8.75868V14.7135C21.4981 14.7501 21.4981 14.7861 21.4981 14.8216C21.4984 15.4471 21.4986 15.9109 21.4136 16.3179C21.0885 17.8743 19.8724 19.0904 18.316 19.4155C17.909 19.5005 17.4452 19.5003 16.8198 19.5C16.7842 19.5 16.7482 19.5 16.7116 19.5C16.4464 19.5 16.3688 19.5008 16.2971 19.5066C15.9916 19.5315 15.696 19.6262 15.433 19.7835C15.3713 19.8204 15.3077 19.8649 15.0919 20.019L13.5093 21.1495C13.4863 21.1659 13.4627 21.1829 13.4385 21.2004C13.1832 21.3843 12.8629 21.6152 12.4892 21.7099C12.1669 21.7915 11.8293 21.7915 11.507 21.7099C11.1333 21.6152 10.813 21.3843 10.5577 21.2004C10.5335 21.1829 10.5099 21.1659 10.4869 21.1495L8.9043 20.019C8.68849 19.8649 8.62494 19.8204 8.56317 19.7835C8.30018 19.6262 8.00456 19.5315 7.69915 19.5066C7.6274 19.5008 7.54986 19.5 7.28465 19.5C7.24805 19.5 7.212 19.5 7.17646 19.5C6.55106 19.5003 6.08718 19.5005 5.68025 19.4155C4.12381 19.0904 2.90772 17.8743 2.58261 16.3179C2.49761 15.9109 2.49781 15.4471 2.49808 14.8216C2.49809 14.7861 2.49811 14.7501 2.49811 14.7135V8.7587C2.49809 7.95373 2.49808 7.28937 2.5423 6.74817C2.58823 6.18608 2.68679 5.66937 2.93408 5.18404C3.31757 4.43139 3.9295 3.81947 4.68214 3.43597C5.16748 3.18868 5.68418 3.09012 6.24628 3.04419C6.78748 2.99998 7.45184 2.99999 8.25681 3ZM6.40914 5.03755C5.97073 5.07337 5.74653 5.1383 5.59013 5.21799C5.2138 5.40973 4.90784 5.7157 4.71609 6.09202C4.6364 6.24842 4.57148 6.47262 4.53566 6.91104C4.49888 7.36113 4.49811 7.94342 4.49811 8.8V14.7135C4.49811 15.4948 4.50343 15.7321 4.54036 15.9089C4.70291 16.6871 5.31096 17.2952 6.08918 17.4577C6.26596 17.4947 6.50333 17.5 7.28465 17.5H7.31905C7.53532 17.5 7.69861 17.4999 7.86159 17.5132C8.47242 17.563 9.06364 17.7525 9.58962 18.067C9.72996 18.1509 9.86282 18.2458 10.0388 18.3716L11.6494 19.522C11.8276 19.6493 11.921 19.7154 11.9916 19.7588C11.9938 19.7602 11.996 19.7615 11.9981 19.7628C12.0002 19.7615 12.0024 19.7602 12.0046 19.7588C12.0752 19.7154 12.1686 19.6493 12.3469 19.522L13.9574 18.3716C14.1334 18.2458 14.2663 18.1509 14.4066 18.067C14.9326 17.7525 15.5238 17.563 16.1346 17.5132C16.2976 17.4999 16.4609 17.5 16.6772 17.5H16.7116C17.4929 17.5 17.7302 17.4947 17.907 17.4577C18.6853 17.2952 19.2933 16.6871 19.4559 15.9089C19.4928 15.7321 19.4981 15.4948 19.4981 14.7135V8.8C19.4981 7.94342 19.4973 7.36113 19.4606 6.91104C19.4247 6.47262 19.3598 6.24842 19.2801 6.09202C19.0884 5.7157 18.7824 5.40973 18.4061 5.21799C18.2497 5.1383 18.0255 5.07337 17.5871 5.03755C17.137 5.00078 16.5547 5 15.6981 5H8.29811C7.44153 5 6.85923 5.00078 6.40914 5.03755ZM8.00006 9C8.00006 8.44772 8.44777 8 9.00006 8H15.0001C15.5523 8 16.0001 8.44772 16.0001 9C16.0001 9.55229 15.5523 10 15.0001 10H9.00006C8.44777 10 8.00006 9.55229 8.00006 9ZM7.99811 13C7.99811 12.4477 8.44582 12 8.99811 12H11.9981C12.5504 12 12.9981 12.4477 12.9981 13C12.9981 13.5523 12.5504 14 11.9981 14H8.99811C8.44582 14 7.99811 13.5523 7.99811 13Z\", fill: \"currentColor\" }),\n ])\nComment.displayName = \"Comment\"\n// Every attribute goes through `props` above, overriding the defaults\nComment.inheritAttrs = false\nexport default Comment\n"]}
1
+ {"version":3,"file":"Comment.js","sourceRoot":"","sources":["../../../../../src/components/Icon/svg/Comment.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,OAAO,EAAE,CAAC,EAAgD,MAAM,KAAK,CAAA;AAErE,MAAM,WAAW,GAAuC,CAAC,KAAK,EAAE,EAAE,CAChE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE;IACrH,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,+jGAA+jG,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;CACxmG,CAAC,CAAA;AACJ,WAAW,CAAC,WAAW,GAAG,SAAS,CAAA;AACnC,sEAAsE;AACtE,WAAW,CAAC,YAAY,GAAG,KAAK,CAAA;AAChC,eAAe,WAAW,CAAA","sourcesContent":["// Generated by scripts/build-vue-icons.mjs from packages/ui/src/components/Icon/svg/Comment.tsx. Do not edit.\nimport { h, type FunctionalComponent, type SVGAttributes } from \"vue\"\n\nconst CommentIcon: FunctionalComponent<SVGAttributes> = (props) =>\n h(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"currentColor\", \"aria-hidden\": \"true\", ...props }, [\n h(\"path\", { d: \"M8.25681 3H15.7394C16.5444 2.99999 17.2087 2.99998 17.7499 3.04419C18.312 3.09012 18.8287 3.18868 19.3141 3.43597C20.0667 3.81947 20.6786 4.43139 21.0621 5.18404C21.3094 5.66937 21.408 6.18608 21.4539 6.74817C21.4981 7.28936 21.4981 7.95372 21.4981 8.75868V14.7135C21.4981 14.7501 21.4981 14.7861 21.4981 14.8216C21.4984 15.4471 21.4986 15.9109 21.4136 16.3179C21.0885 17.8743 19.8724 19.0904 18.316 19.4155C17.909 19.5005 17.4452 19.5003 16.8198 19.5C16.7842 19.5 16.7482 19.5 16.7116 19.5C16.4464 19.5 16.3688 19.5008 16.2971 19.5066C15.9916 19.5315 15.696 19.6262 15.433 19.7835C15.3713 19.8204 15.3077 19.8649 15.0919 20.019L13.5093 21.1495C13.4863 21.1659 13.4627 21.1829 13.4385 21.2004C13.1832 21.3843 12.8629 21.6152 12.4892 21.7099C12.1669 21.7915 11.8293 21.7915 11.507 21.7099C11.1333 21.6152 10.813 21.3843 10.5577 21.2004C10.5335 21.1829 10.5099 21.1659 10.4869 21.1495L8.9043 20.019C8.68849 19.8649 8.62494 19.8204 8.56317 19.7835C8.30018 19.6262 8.00456 19.5315 7.69915 19.5066C7.6274 19.5008 7.54986 19.5 7.28465 19.5C7.24805 19.5 7.212 19.5 7.17646 19.5C6.55106 19.5003 6.08718 19.5005 5.68025 19.4155C4.12381 19.0904 2.90772 17.8743 2.58261 16.3179C2.49761 15.9109 2.49781 15.4471 2.49808 14.8216C2.49809 14.7861 2.49811 14.7501 2.49811 14.7135V8.7587C2.49809 7.95373 2.49808 7.28937 2.5423 6.74817C2.58823 6.18608 2.68679 5.66937 2.93408 5.18404C3.31757 4.43139 3.9295 3.81947 4.68214 3.43597C5.16748 3.18868 5.68418 3.09012 6.24628 3.04419C6.78748 2.99998 7.45184 2.99999 8.25681 3ZM6.40914 5.03755C5.97073 5.07337 5.74653 5.1383 5.59013 5.21799C5.2138 5.40973 4.90784 5.7157 4.71609 6.09202C4.6364 6.24842 4.57148 6.47262 4.53566 6.91104C4.49888 7.36113 4.49811 7.94342 4.49811 8.8V14.7135C4.49811 15.4948 4.50343 15.7321 4.54036 15.9089C4.70291 16.6871 5.31096 17.2952 6.08918 17.4577C6.26596 17.4947 6.50333 17.5 7.28465 17.5H7.31905C7.53532 17.5 7.69861 17.4999 7.86159 17.5132C8.47242 17.563 9.06364 17.7525 9.58962 18.067C9.72996 18.1509 9.86282 18.2458 10.0388 18.3716L11.6494 19.522C11.8276 19.6493 11.921 19.7154 11.9916 19.7588C11.9938 19.7602 11.996 19.7615 11.9981 19.7628C12.0002 19.7615 12.0024 19.7602 12.0046 19.7588C12.0752 19.7154 12.1686 19.6493 12.3469 19.522L13.9574 18.3716C14.1334 18.2458 14.2663 18.1509 14.4066 18.067C14.9326 17.7525 15.5238 17.563 16.1346 17.5132C16.2976 17.4999 16.4609 17.5 16.6772 17.5H16.7116C17.4929 17.5 17.7302 17.4947 17.907 17.4577C18.6853 17.2952 19.2933 16.6871 19.4559 15.9089C19.4928 15.7321 19.4981 15.4948 19.4981 14.7135V8.8C19.4981 7.94342 19.4973 7.36113 19.4606 6.91104C19.4247 6.47262 19.3598 6.24842 19.2801 6.09202C19.0884 5.7157 18.7824 5.40973 18.4061 5.21799C18.2497 5.1383 18.0255 5.07337 17.5871 5.03755C17.137 5.00078 16.5547 5 15.6981 5H8.29811C7.44153 5 6.85923 5.00078 6.40914 5.03755ZM8.00006 9C8.00006 8.44772 8.44777 8 9.00006 8H15.0001C15.5523 8 16.0001 8.44772 16.0001 9C16.0001 9.55229 15.5523 10 15.0001 10H9.00006C8.44777 10 8.00006 9.55229 8.00006 9ZM7.99811 13C7.99811 12.4477 8.44582 12 8.99811 12H11.9981C12.5504 12 12.9981 12.4477 12.9981 13C12.9981 13.5523 12.5504 14 11.9981 14H8.99811C8.44582 14 7.99811 13.5523 7.99811 13Z\", fill: \"currentColor\" }),\n ])\nCommentIcon.displayName = \"Comment\"\n// Every attribute goes through `props` above, overriding the defaults\nCommentIcon.inheritAttrs = false\nexport default CommentIcon\n"]}