@revolist/ui 4.0.4-rc → 4.0.6-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +36 -0
- package/OWNERSHIP.md +10 -10
- package/README.md +22 -4
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/badge.view-D30pMUfi.js +14 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-QWDyYzdo.js} +19 -19
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/check-BwI7iCAm.js +4 -0
- package/_chunks/choice-chips-A6WR-WJe.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
- package/_chunks/color-picker-BK4W1nd6.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-CMkF17YZ.js} +281 -265
- package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
- package/_chunks/configurator-actions-By8WSL2m.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/{control-AHKXD5Eu.js → control-mlH7l0Uq.js} +42 -17
- package/_chunks/{controls-DsNi8V8I.js → controls-FUU-MUKC.js} +171 -186
- package/_chunks/{date-control-DrVFX13g.js → date-control-Dup_P3w5.js} +1 -1
- package/_chunks/{date-time-qIhp5vaX.js → date-time-9z6pAG5T.js} +317 -278
- package/_chunks/dialog.parts-Bi7YbXqS.js +131 -0
- package/_chunks/{duration-CL68Em0o.js → duration-D7oRjsmP.js} +5 -5
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-BCINdXpU.js +223 -0
- package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
- package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-Cw2zk58T.js +266 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
- package/_chunks/native-control-pFMuHf3G.js +644 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-DqXV6vgP.js} +7 -7
- package/_chunks/{picker-h1P5RUgp.js → picker-gEGTu1Ki.js} +2 -2
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/{popup-CT2uD3go.js → popup-C35Isk7p.js} +115 -104
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-DbxdUJr-.js} +1 -1
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B0_13Sja.js} +1 -1
- package/_chunks/request-trail-CCSK6TJA.js +753 -0
- package/_chunks/rich-text-5rnc8lpI.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
- package/_chunks/tooltip-D4xkio5G.js +54 -0
- package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
- package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
- package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
- package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
- package/_variables.scss +33 -32
- package/ai/_chat.scss +28 -3
- package/ai/_style.scss +55 -2
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +13 -2
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +17 -1
- package/ai/results/_style.scss +83 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +2 -0
- package/ai/translations.d.ts +1 -1
- package/assignee/assignee.scss +5 -1
- package/assignee/index.js +2 -2
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.view.d.ts +8 -0
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +27 -27
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +16 -16
- package/calendar/_calendar.scss +2 -2
- package/calendar/calendar.js +1 -1
- package/calendar/index.js +2 -2
- package/checkbox/checkbox.scss +1 -22
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +1 -1
- package/color-palette/color-picker.js +2 -2
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/component-catalog.d.ts +9 -7
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +61 -0
- package/configurator-drop-zone.d.ts +38 -0
- package/configurator-drop-zone.js +64 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +1 -2
- package/controls.js +4 -3
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +4 -0
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/attach.d.ts +1 -1
- package/date-time/field.d.ts +3 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +64 -7
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +5 -1
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +9 -9
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/distribution-chart/_distribution-chart.scss +12 -54
- package/distribution-chart/area-chart.js +1 -1
- package/distribution-chart/bar-chart.js +1 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/line-chart.js +1 -1
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/editor-dropdown.style.scss +5 -0
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.d.ts +5 -0
- package/dropdown/lookup-field.js +2 -1
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +1 -1
- package/field-configurator.d.ts +27 -0
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/filter/filters/slider/_slider.scss +8 -25
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/runtime.js +49 -22
- package/filter/filters/slider/single.js +1 -1
- package/filter-badge.js +1 -1
- package/filter-controls.d.ts +0 -1
- package/filter-controls.js +5 -6
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +7 -7
- package/form-controls/presentation.js +12 -12
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +22 -21
- package/formatting/styles.scss +2 -47
- package/framework.js +226 -222
- package/history-controls.js +27 -1
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/masked-input/index.js +1 -1
- package/native-control.d.ts +1 -2
- package/native-control.js +1 -1
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native.js +46 -43
- package/number-input/index.js +1 -1
- package/package.json +36 -1
- package/pagination.js +11 -11
- package/pdf-viewer/index.js +1 -1
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +8 -6
- package/preact.js +71 -64
- package/rating-choice.js +1 -1
- package/react-control.d.ts +2 -0
- package/react-control.js +2 -2
- package/react.d.ts +5 -6
- package/react.js +68 -66
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-popup.js +1 -1
- package/resource-picker/resource-picker.js +4 -4
- package/rich-text/engine.d.ts +1 -0
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +4 -0
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +2 -0
- package/rich-text/style.scss +165 -70
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/translations.d.ts +2 -0
- package/search-input/index.js +1 -1
- package/search-input/native.d.ts +21 -2
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/popover.js +4 -4
- package/styles/_alert.scss +18 -4
- package/styles/_compositions.scss +3 -3
- package/styles/_editor-slider.scss +0 -2
- package/styles/_field-configurator.scss +147 -0
- package/styles/_fields-grid.scss +37 -0
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +28 -19
- package/styles/configurator-actions.scss +141 -0
- package/styles/{legacy-pagination.css → pagination.css} +19 -2
- package/styles.css +1 -1
- package/styles.scss +2 -2
- package/surfaces.d.ts +36 -2
- package/surfaces.js +35 -132
- package/svelte.js +3 -3
- package/switch/index.js +15 -14
- package/time-grid.d.ts +0 -1
- package/time-grid.js +38 -37
- package/timeline-track/index.js +2 -2
- package/ui.css +1 -1
- package/vue.d.ts +26 -30
- package/vue.js +117 -121
- package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
- package/_chunks/choice-chips-CHQTUdLs.js +0 -110
- package/_chunks/color-picker-CudqPYZo.js +0 -138
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
- package/_chunks/editor-popup-WDdtVDNA.js +0 -81
- package/_chunks/history-controls-B3u3INEK.js +0 -27
- package/_chunks/mount-DQ1cpppK.js +0 -257
- package/_chunks/native-control-C_yok8_-.js +0 -605
- package/_chunks/request-trail-DSlFix6i.js +0 -618
- package/_chunks/rich-text-CH7gIqOS.js +0 -636
- package/avatar/index.view.d.ts +0 -25
- package/color-palette/native.view.d.ts +0 -15
- package/control-presentation.view.d.ts +0 -8
- package/dialog/dialog-action-footer.view.d.ts +0 -20
- package/dialog/dialog.dom.view.d.ts +0 -15
- package/form-controls/index.view.d.ts +0 -10
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/search-input/native.view.d.ts +0 -21
- package/surfaces.view.d.ts +0 -63
- /package/styles/{legacy-rating.css → rating.css} +0 -0
package/dropdown/popup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentChildren, RefObject } from '../_vendor/preact/src/index';
|
|
2
2
|
export type DropdownPopupProps = {
|
|
3
3
|
onPointerRelease?: (event: MouseEvent | TouchEvent) => void;
|
|
4
4
|
triggerRef: RefObject<HTMLDivElement>;
|
|
@@ -24,4 +24,4 @@ export type DropdownPopupProps = {
|
|
|
24
24
|
* @param theme - The theme of the dropdown
|
|
25
25
|
* @param dropdownMenuId - The id of the dropdown menu
|
|
26
26
|
*/
|
|
27
|
-
export declare function DropdownPopup({ onPointerRelease, triggerRef, children, portalTarget, theme, dropdownMenuId, popupClassName, closeOnClickOutside, onClose, align, matchTriggerWidth, maxHeight, observePopupResize, topLayer, }: DropdownPopupProps):
|
|
27
|
+
export declare function DropdownPopup({ onPointerRelease, triggerRef, children, portalTarget, theme, dropdownMenuId, popupClassName, closeOnClickOutside, onClose, align, matchTriggerWidth, maxHeight, observePopupResize, topLayer, }: DropdownPopupProps): import('../_vendor/preact/src/index').VNode<any>;
|
package/dropdown/popup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DropdownPopup } from "../_chunks/popup-
|
|
1
|
+
export { t as DropdownPopup } from "../_chunks/popup-C35Isk7p.js";
|
package/duration/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DurationDraft, n as DurationField } from "../_chunks/duration-
|
|
1
|
+
export { t as DurationDraft, n as DurationField } from "../_chunks/duration-D7oRjsmP.js";
|
package/editor-actions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
|
|
2
2
|
import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { n } from "./_chunks/controls-
|
|
3
|
+
import { t as n } from "./_chunks/controls-FUU-MUKC.js";
|
|
4
4
|
//#region src/editor-actions.tsx
|
|
5
5
|
var r = {
|
|
6
6
|
apply: "Apply",
|
package/field-configurator.d.ts
CHANGED
|
@@ -74,16 +74,43 @@ export declare function FieldDropIndicator({ position, index, className, }: {
|
|
|
74
74
|
className?: string;
|
|
75
75
|
}): h.JSX.Element;
|
|
76
76
|
export interface CollapsibleSectionProps {
|
|
77
|
+
/** Heading displayed in the keyboard-accessible expand/collapse trigger. */
|
|
77
78
|
title: ComponentChildren;
|
|
79
|
+
/** Supporting text displayed above the expanded content. */
|
|
78
80
|
description?: ComponentChildren;
|
|
81
|
+
/** Expand initially. Later toggles are owned by the native disclosure. */
|
|
79
82
|
defaultOpen?: boolean;
|
|
83
|
+
/** Section content; stays mounted when collapsed to preserve drafts. */
|
|
80
84
|
children: ComponentChildren;
|
|
85
|
+
/** Additional CSS classes on the outer disclosure. */
|
|
81
86
|
className?: string;
|
|
87
|
+
/** Additional CSS classes on the summary trigger. */
|
|
82
88
|
summaryClassName?: string;
|
|
89
|
+
/** Additional CSS classes on the content container. */
|
|
83
90
|
contentClassName?: string;
|
|
91
|
+
/** Additional CSS classes on the supporting description. */
|
|
84
92
|
descriptionClassName?: string;
|
|
85
93
|
/** Host policies can wrap the native details without owning its presentation. */
|
|
86
94
|
renderRoot?: (props: JSX.IntrinsicElements['details']) => ComponentChildren;
|
|
87
95
|
}
|
|
88
96
|
/** Native disclosure; collapsed content stays mounted to preserve draft edits. */
|
|
89
97
|
export declare function CollapsibleSection({ title, description, defaultOpen, children, className, summaryClassName, contentClassName, descriptionClassName, renderRoot, }: CollapsibleSectionProps): ComponentChildren;
|
|
98
|
+
export interface ConfiguratorCompactItem {
|
|
99
|
+
id: string;
|
|
100
|
+
label: string;
|
|
101
|
+
icon?: string;
|
|
102
|
+
count?: number;
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
/** Activate the corresponding product tab when reopening. */
|
|
105
|
+
onOpen?: () => void;
|
|
106
|
+
}
|
|
107
|
+
/** Shared panel shell. Collapsing preserves mounted controls and their drafts. */
|
|
108
|
+
export declare function ConfiguratorPanel({ panelRef, standalone, children, compactItems, compact, onExpand, ...props }: Omit<JSX.HTMLAttributes<HTMLDivElement>, 'ref'> & {
|
|
109
|
+
panelRef?: import('./_vendor/preact/src/index').Ref<HTMLDivElement>;
|
|
110
|
+
standalone?: boolean;
|
|
111
|
+
compactItems?: readonly ConfiguratorCompactItem[];
|
|
112
|
+
/** Presentation state is owned by the host; the panel adds no toggle button. */
|
|
113
|
+
compact?: boolean;
|
|
114
|
+
onExpand?: () => void;
|
|
115
|
+
}): h.JSX.Element;
|
|
116
|
+
export { createFieldExpansion, fieldExpansionIds, recordFieldExpansion, type FieldExpansionState } from './field-expansion';
|
package/field-configurator.js
CHANGED
|
@@ -1,170 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { n as i } from "./_chunks/delete-button-CW9vjLnk.js";
|
|
6
|
-
import { RemoveButton as a } from "./buttons/remove-button.js";
|
|
7
|
-
import { t as o } from "./_chunks/chevron-right-sxHQMSkq.js";
|
|
8
|
-
import { DisclosureSummary as s } from "./form-controls/presentation.js";
|
|
9
|
-
import { fieldDropIndex as c, reorderFields as l } from "./field-reorder.js";
|
|
10
|
-
import { useFieldDropTarget as u, useFieldReorder as d } from "./field-reorder.hook.js";
|
|
11
|
-
//#region src/field-configurator.tsx
|
|
12
|
-
function f({ svg: e, className: t = "" }) {
|
|
13
|
-
return /* @__PURE__ */ n(r, {
|
|
14
|
-
svg: e,
|
|
15
|
-
className: `rv-configurator-icon ${t}`
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function p({ children: e, className: t = "", ...r }) {
|
|
19
|
-
return /* @__PURE__ */ n(s, {
|
|
20
|
-
...r,
|
|
21
|
-
className: `rv-configurator-summary ${t}`,
|
|
22
|
-
iconPosition: "after",
|
|
23
|
-
icon: /* @__PURE__ */ n(f, { svg: o }),
|
|
24
|
-
children: e
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function m({ title: e, count: t, children: r, className: i = "" }) {
|
|
28
|
-
return /* @__PURE__ */ n("details", {
|
|
29
|
-
class: `rv-configurator-available-fields ${i}`,
|
|
30
|
-
open: !0,
|
|
31
|
-
children: [/* @__PURE__ */ n(p, { children: [e, t != null && /* @__PURE__ */ n("span", {
|
|
32
|
-
class: "rv-configurator-field-count",
|
|
33
|
-
children: t
|
|
34
|
-
})] }), /* @__PURE__ */ n("div", {
|
|
35
|
-
class: "rv-configurator-library-content",
|
|
36
|
-
children: r
|
|
37
|
-
})]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function h({ children: e, actions: t, className: r = "" }) {
|
|
41
|
-
return /* @__PURE__ */ n("div", {
|
|
42
|
-
class: `rv-configurator-zone-heading ${r}`,
|
|
43
|
-
children: [/* @__PURE__ */ n("span", {
|
|
44
|
-
class: "rv-configurator-zone-label",
|
|
45
|
-
children: e
|
|
46
|
-
}), t && /* @__PURE__ */ n("span", {
|
|
47
|
-
class: "rv-configurator-zone-actions",
|
|
48
|
-
children: t
|
|
49
|
-
})]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function g({ heading: e, actions: t, headingClassName: r, className: i = "", children: a, ...o }) {
|
|
53
|
-
return /* @__PURE__ */ n("section", {
|
|
54
|
-
...o,
|
|
55
|
-
className: `rv-configurator-zone ${i}`,
|
|
56
|
-
children: [/* @__PURE__ */ n(h, {
|
|
57
|
-
className: r,
|
|
58
|
-
actions: t,
|
|
59
|
-
children: e
|
|
60
|
-
}), a]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function _({ empty: e, placeholder: t, className: r = "", children: i, ...a }) {
|
|
64
|
-
return /* @__PURE__ */ n("ul", {
|
|
65
|
-
...a,
|
|
66
|
-
className: `rv-configurator-field-list ${e ? "empty" : ""} ${r}`,
|
|
67
|
-
children: e ? /* @__PURE__ */ n("li", {
|
|
68
|
-
className: "rv-configurator-empty-zone empty",
|
|
69
|
-
children: t
|
|
70
|
-
}) : i
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function v({ className: e = "", children: t, indicator: r, dropPosition: i, ...a }) {
|
|
74
|
-
return /* @__PURE__ */ n("li", {
|
|
75
|
-
...a,
|
|
76
|
-
className: `rv-configurator-field rv-configurator-field-row ${e}`,
|
|
77
|
-
children: [
|
|
78
|
-
r ?? (i && /* @__PURE__ */ n(D, { position: i })),
|
|
79
|
-
/* @__PURE__ */ n("span", {
|
|
80
|
-
className: "rv-configurator-drag-handle",
|
|
81
|
-
"aria-hidden": "true"
|
|
82
|
-
}),
|
|
83
|
-
t
|
|
84
|
-
]
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function y({ icon: e, children: t, className: r = "" }) {
|
|
88
|
-
return /* @__PURE__ */ n("span", {
|
|
89
|
-
class: `rv-configurator-field-content ${r}`,
|
|
90
|
-
children: [e, /* @__PURE__ */ n("span", {
|
|
91
|
-
class: "rv-configurator-field-caption",
|
|
92
|
-
children: t
|
|
93
|
-
})]
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function b({ as: t = "div", children: n, className: r = "", ...i }) {
|
|
97
|
-
return e(t, {
|
|
98
|
-
...i,
|
|
99
|
-
class: `rv-configurator-field ${r}`
|
|
100
|
-
}, n);
|
|
101
|
-
}
|
|
102
|
-
function x({ children: e, ...t }) {
|
|
103
|
-
return /* @__PURE__ */ n("div", {
|
|
104
|
-
...t,
|
|
105
|
-
className: `rv-configurator-library-list ${t.className ?? ""}`,
|
|
106
|
-
children: e
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function S({ label: e, icon: t, actions: r, contentClassName: i, ...a }) {
|
|
110
|
-
return /* @__PURE__ */ n(v, {
|
|
111
|
-
...a,
|
|
112
|
-
children: [/* @__PURE__ */ n(y, {
|
|
113
|
-
className: i,
|
|
114
|
-
icon: t,
|
|
115
|
-
children: e
|
|
116
|
-
}), r]
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
function C({ children: e, className: t = "", ...r }) {
|
|
120
|
-
return /* @__PURE__ */ n("div", {
|
|
121
|
-
...r,
|
|
122
|
-
className: `rv-configurator-field-actions ${t}`,
|
|
123
|
-
children: e
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function w({ children: e, active: t = !1, label: r, className: i = "" }) {
|
|
127
|
-
return /* @__PURE__ */ n("span", {
|
|
128
|
-
className: `rv-configurator-status-badge ${i}`,
|
|
129
|
-
"data-active": t ? "true" : void 0,
|
|
130
|
-
title: r,
|
|
131
|
-
"aria-label": r,
|
|
132
|
-
children: e
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
function T(e) {
|
|
136
|
-
return /* @__PURE__ */ n(a, {
|
|
137
|
-
...e,
|
|
138
|
-
className: `rv-configurator-remove-button ${e.className ?? ""}`
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
function E() {
|
|
142
|
-
return /* @__PURE__ */ n(r, { svg: i });
|
|
143
|
-
}
|
|
144
|
-
function D({ position: e, index: t, className: r = "" }) {
|
|
145
|
-
return /* @__PURE__ */ n("span", {
|
|
146
|
-
className: `rv-configurator-drop-indicator ${r}`,
|
|
147
|
-
"data-position": e,
|
|
148
|
-
"data-drop-index": t,
|
|
149
|
-
"aria-hidden": "true"
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
function O({ title: e, description: r, defaultOpen: i = !1, children: a, className: o = "", summaryClassName: s = "", contentClassName: c = "", descriptionClassName: l = "", renderRoot: u }) {
|
|
153
|
-
let d = t(i), f = {
|
|
154
|
-
class: `rv-collapsible-section rv-configurator-section ${o}`.trim(),
|
|
155
|
-
open: d.current,
|
|
156
|
-
children: [/* @__PURE__ */ n(p, {
|
|
157
|
-
className: s,
|
|
158
|
-
children: e
|
|
159
|
-
}), /* @__PURE__ */ n("div", {
|
|
160
|
-
class: `rv-collapsible-section__content ${c}`.trim(),
|
|
161
|
-
children: [r && /* @__PURE__ */ n("p", {
|
|
162
|
-
class: `rv-collapsible-section__description ${l}`.trim(),
|
|
163
|
-
children: r
|
|
164
|
-
}), a]
|
|
165
|
-
})]
|
|
166
|
-
};
|
|
167
|
-
return u ? u(f) : /* @__PURE__ */ n("details", { ...f });
|
|
168
|
-
}
|
|
169
|
-
//#endregion
|
|
170
|
-
export { O as CollapsibleSection, C as FieldActions, y as FieldContent, D as FieldDropIndicator, g as FieldGroup, h as FieldGroupHeading, f as FieldIcon, b as FieldItem, m as FieldLibrary, x as FieldLibraryList, _ as FieldList, T as FieldRemoveButton, E as FieldRemoveIcon, v as FieldRow, w as FieldStatusBadge, p as FieldSummary, S as SelectedField, c as fieldDropIndex, l as reorderFields, u as useFieldDropTarget, d as useFieldReorder };
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "./_chunks/field-configurator-BCINdXpU.js";
|
|
2
|
+
import { fieldDropIndex as x, reorderFields as S } from "./field-reorder.js";
|
|
3
|
+
import { useFieldDropTarget as C, useFieldReorder as w } from "./field-reorder.hook.js";
|
|
4
|
+
export { g as CollapsibleSection, d as ConfiguratorPanel, m as FieldActions, c as FieldContent, t as FieldDropIndicator, f as FieldGroup, h as FieldGroupHeading, r as FieldIcon, l as FieldItem, _ as FieldLibrary, i as FieldLibraryList, a as FieldList, p as FieldRemoveButton, u as FieldRemoveIcon, s as FieldRow, o as FieldStatusBadge, e as FieldSummary, v as SelectedField, b as createFieldExpansion, x as fieldDropIndex, n as fieldExpansionIds, y as recordFieldExpansion, S as reorderFields, C as useFieldDropTarget, w as useFieldReorder };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Expansion overlay shared by nested field libraries; searching never overwrites it. */
|
|
2
|
+
export interface FieldExpansionState {
|
|
3
|
+
known: Set<string>;
|
|
4
|
+
expanded: Set<string>;
|
|
5
|
+
collapsed: Set<string>;
|
|
6
|
+
}
|
|
7
|
+
export declare function createFieldExpansion(): FieldExpansionState;
|
|
8
|
+
export declare function fieldExpansionIds(state: FieldExpansionState, ids: readonly string[], searching: boolean): Set<string>;
|
|
9
|
+
export declare function recordFieldExpansion(state: FieldExpansionState, expanded: Iterable<unknown>): void;
|
|
@@ -17,23 +17,6 @@
|
|
|
17
17
|
color: var(--text-color, var(--rv-ui-text-muted));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.slider-tooltip {
|
|
21
|
-
position: absolute;
|
|
22
|
-
top: -40px;
|
|
23
|
-
transform: translateX(-50%);
|
|
24
|
-
background: var(--tooltip-bg, var(--rv-ui-text));
|
|
25
|
-
color: var(--tooltip-color, var(--rv-ui-surface));
|
|
26
|
-
padding: 2px 6px;
|
|
27
|
-
border-radius: 3px;
|
|
28
|
-
font-size: 12px;
|
|
29
|
-
line-height: 18px;
|
|
30
|
-
opacity: 0;
|
|
31
|
-
transition: opacity var(--rv-ui-motion-fast, 120ms) var(--rv-ui-motion-ease, cubic-bezier(.2, 0, 0, 1));
|
|
32
|
-
pointer-events: none;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
z-index: 10;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
20
|
.range-inputs {
|
|
38
21
|
display: grid;
|
|
39
22
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
@@ -85,15 +68,14 @@
|
|
|
85
68
|
z-index: 1;
|
|
86
69
|
}
|
|
87
70
|
|
|
88
|
-
$size: 24px;
|
|
89
|
-
|
|
90
71
|
&::-webkit-slider-thumb {
|
|
91
72
|
-webkit-appearance: none;
|
|
92
73
|
pointer-events: all;
|
|
93
|
-
|
|
94
|
-
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
width: var(--slider-thumb-size, 20px);
|
|
76
|
+
height: var(--slider-thumb-size, 20px);
|
|
95
77
|
background-color: var(--revo-grid-filter-control-thumb-bg, var(--rv-ui-surface));
|
|
96
|
-
border: 3px solid var(--range-color, var(--rv-ui-accent));
|
|
78
|
+
border: var(--slider-thumb-border-width, 3px) solid var(--range-color, var(--rv-ui-accent));
|
|
97
79
|
border-radius: 50%;
|
|
98
80
|
box-shadow: 0 1px 3px var(--rv-ui-shadow);
|
|
99
81
|
transition: box-shadow var(--rv-ui-motion-fast, 120ms) var(--rv-ui-motion-ease, cubic-bezier(.2, 0, 0, 1));
|
|
@@ -113,10 +95,11 @@
|
|
|
113
95
|
&::-moz-range-thumb {
|
|
114
96
|
-webkit-appearance: none;
|
|
115
97
|
pointer-events: all;
|
|
116
|
-
|
|
117
|
-
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
width: var(--slider-thumb-size, 20px);
|
|
100
|
+
height: var(--slider-thumb-size, 20px);
|
|
118
101
|
background-color: var(--revo-grid-filter-control-thumb-bg, var(--rv-ui-surface));
|
|
119
|
-
border: 3px solid var(--range-color, var(--rv-ui-accent));
|
|
102
|
+
border: var(--slider-thumb-border-width, 3px) solid var(--range-color, var(--rv-ui-accent));
|
|
120
103
|
border-radius: 50%;
|
|
121
104
|
box-shadow: 0 1px 3px var(--rv-ui-shadow);
|
|
122
105
|
transition: box-shadow var(--rv-ui-motion-fast, 120ms) var(--rv-ui-motion-ease, cubic-bezier(.2, 0, 0, 1));
|
|
@@ -12,6 +12,7 @@ function l(r, s) {
|
|
|
12
12
|
let l = [], { minInt: u, maxInt: d, fromValueInt: f, toValueInt: p } = s.state;
|
|
13
13
|
return s.showTooltips && l.push(r("div", {
|
|
14
14
|
className: "slider-tooltip",
|
|
15
|
+
hidden: !0,
|
|
15
16
|
ref: (e) => s.refs.fromTooltip = e
|
|
16
17
|
})), l.push(r("input", {
|
|
17
18
|
ref: (e) => {
|
|
@@ -33,6 +34,7 @@ function l(r, s) {
|
|
|
33
34
|
onMouseOut: () => s.showTooltips && s.refs.fromTooltip && i(s.refs.fromTooltip)
|
|
34
35
|
})), s.showTooltips && l.push(r("div", {
|
|
35
36
|
className: "slider-tooltip",
|
|
37
|
+
hidden: !0,
|
|
36
38
|
ref: (e) => s.refs.toTooltip = e
|
|
37
39
|
})), l.push(r("input", {
|
|
38
40
|
ref: (e) => {
|
|
@@ -1,27 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e, r as t, t as n } from "../../../_chunks/top-layer-popup-CNSDdfJV.js";
|
|
2
|
+
import { n as r, t as i } from "../../../_chunks/tooltip-owner-DjdvqKzz.js";
|
|
3
|
+
import { createControlId as a } from "../../../core/control-id.js";
|
|
4
|
+
import { toSliderRange as o, unscaleSliderValue as s } from "./logic.js";
|
|
2
5
|
//#region src/filter/filters/slider/runtime.ts
|
|
3
|
-
function
|
|
4
|
-
return
|
|
6
|
+
function c(e) {
|
|
7
|
+
return o(Number(e.refs.fromSlider?.value ?? e.state.fromValueInt), Number(e.refs.toSlider?.value ?? e.state.toValueInt), e.scaleFactor);
|
|
5
8
|
}
|
|
6
|
-
function
|
|
7
|
-
let { fromValue: t, toValue:
|
|
8
|
-
e.refs.fromLabel && (e.refs.fromLabel.textContent =
|
|
9
|
+
function l(e) {
|
|
10
|
+
let { fromValue: t, toValue: n } = c(e), r = e.formatFromValue(t), i = e.formatToValue(n);
|
|
11
|
+
e.refs.fromLabel && (e.refs.fromLabel.textContent = r), e.refs.toLabel && (e.refs.toLabel.textContent = i), e.refs.fromInput && (e.refs.fromInput.value = e.formatInputValue(t)), e.refs.toInput && (e.refs.toInput.value = e.formatInputValue(n)), e.refs.fromSlider?.setAttribute("aria-valuetext", r), e.refs.toSlider?.setAttribute("aria-valuetext", i);
|
|
9
12
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
var u = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
function d(n, r, o, c, l = 100) {
|
|
15
|
+
if (r.textContent = c(s(Number(n.value), l)), e(r), !u.has(r)) {
|
|
16
|
+
r.id ||= a("rv-tooltip");
|
|
17
|
+
let e = n.getAttribute("aria-describedby");
|
|
18
|
+
n.setAttribute("aria-describedby", [e, r.id].filter(Boolean).join(" ")), r.hidden = !1, Object.assign(r.style, {
|
|
19
|
+
position: "fixed",
|
|
20
|
+
inset: "auto",
|
|
21
|
+
margin: "0",
|
|
22
|
+
transform: "none"
|
|
23
|
+
});
|
|
24
|
+
let o = t(r, "block"), s = n.ownerDocument.defaultView?.MutationObserver, c = s ? new s(() => {
|
|
25
|
+
n.isConnected || p(r);
|
|
26
|
+
}) : void 0;
|
|
27
|
+
c?.observe(n.ownerDocument, {
|
|
28
|
+
childList: !0,
|
|
29
|
+
subtree: !0
|
|
30
|
+
}), u.set(r, {
|
|
31
|
+
mode: o,
|
|
32
|
+
slider: n,
|
|
33
|
+
original: e,
|
|
34
|
+
disconnect: () => c?.disconnect()
|
|
35
|
+
}), i(n.ownerDocument, r, () => p(r));
|
|
36
|
+
}
|
|
37
|
+
let d = o.maxInt - o.minInt || 1, m = (Number(n.value) - o.minInt) / d * 100, h = r.parentElement?.getBoundingClientRect(), g = r.getBoundingClientRect();
|
|
38
|
+
h && g ? (r.style.left = `${h.left + f(m, h.width, g.width) - g.width / 2}px`, r.style.top = `${Math.max(8, h.top - g.height - 8)}px`) : r.style.left = `${m}%`, r.style.opacity = "1";
|
|
14
39
|
}
|
|
15
|
-
function
|
|
40
|
+
function f(e, t, n, r = 8) {
|
|
16
41
|
let i = n / 2, a = r + i, o = t - r - i;
|
|
17
42
|
if (a > o) return t / 2;
|
|
18
43
|
let s = Math.min(Math.max(e, 0), 100) / 100 * t;
|
|
19
44
|
return Math.min(Math.max(s, a), o);
|
|
20
45
|
}
|
|
21
|
-
function
|
|
46
|
+
function p(e) {
|
|
22
47
|
e.style.opacity = "0";
|
|
48
|
+
let t = u.get(e);
|
|
49
|
+
t && (t.disconnect?.(), n(e, t.mode), e.hidden = !0, t.original === null ? t.slider.removeAttribute("aria-describedby") : t.slider.setAttribute("aria-describedby", t.original), u.delete(e), r(e.ownerDocument, e));
|
|
23
50
|
}
|
|
24
|
-
function
|
|
51
|
+
function m(e, t, n) {
|
|
25
52
|
let r = getComputedStyle(n), i = r.getPropertyValue("--slider-color").trim() || r.getPropertyValue("--rv-ui-border").trim() || "var(--rv-ui-border)", a = r.getPropertyValue("--range-color").trim() || r.getPropertyValue("--rv-ui-accent").trim() || "var(--rv-ui-accent)", o = parseInt(t.max, 10) - parseInt(t.min, 10) || 1, s = parseInt(e.value, 10) - parseInt(e.min, 10), c = parseInt(t.value, 10) - parseInt(t.min, 10), l = s / o * 100, u = c / o * 100;
|
|
26
53
|
n.style.background = `linear-gradient(
|
|
27
54
|
to right,
|
|
@@ -32,20 +59,20 @@ function s(e, t, n) {
|
|
|
32
59
|
${i} ${u}%,
|
|
33
60
|
${i} 100%) center / 100% 4px no-repeat`;
|
|
34
61
|
}
|
|
35
|
-
function
|
|
62
|
+
function h(e) {
|
|
36
63
|
let { fromSlider: t, toSlider: n } = e.refs;
|
|
37
|
-
t && n && (
|
|
64
|
+
t && n && (m(t, n, n), l(e));
|
|
38
65
|
}
|
|
39
|
-
function
|
|
66
|
+
function g(e) {
|
|
40
67
|
e.refs.toSlider && (e.refs.toSlider.style.zIndex = Number(e.refs.toSlider.value) <= e.state.minInt ? "2" : "0");
|
|
41
68
|
}
|
|
42
|
-
function
|
|
43
|
-
e.onRangeChange(
|
|
69
|
+
function _(e) {
|
|
70
|
+
e.onRangeChange(c(e));
|
|
44
71
|
}
|
|
45
|
-
function
|
|
46
|
-
e.onRangeCommit?.(
|
|
72
|
+
function v(e) {
|
|
73
|
+
e.onRangeCommit?.(c(e));
|
|
47
74
|
}
|
|
48
|
-
function
|
|
75
|
+
function y(e) {
|
|
49
76
|
e.metaKey || e.ctrlKey || [
|
|
50
77
|
"ArrowDown",
|
|
51
78
|
"ArrowLeft",
|
|
@@ -60,4 +87,4 @@ function f(e) {
|
|
|
60
87
|
].includes(e.key) || /^[\d.,-]$/.test(e.key) || e.preventDefault();
|
|
61
88
|
}
|
|
62
89
|
//#endregion
|
|
63
|
-
export {
|
|
90
|
+
export { _ as emitRangeChange, v as emitRangeCommit, m as fillSlider, c as getCurrentRange, f as getTooltipCenterPosition, p as hideTooltip, y as preventInvalidNumberKey, g as setToggleAccessible, l as syncRangeText, h as syncVisuals, d as updateTooltip };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
-
import { n as t } from "../../../_chunks/native-control-
|
|
2
|
+
import { n as t } from "../../../_chunks/native-control-pFMuHf3G.js";
|
|
3
3
|
//#region src/filter/filters/slider/single.tsx
|
|
4
4
|
function n({ min: n, max: r, value: i, step: a = 1, disabled: o = !1, id: s, className: c = "", ariaLabel: l, ariaValueText: u, ariaDescribedBy: d, onChange: f, onCommit: p, onKeyDown: m }) {
|
|
5
5
|
let h = r - n, g = h > 0 ? Math.max(0, Math.min(100, (i - n) / h * 100)) : 0;
|
package/filter-badge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
|
|
2
2
|
import { a as t } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
3
3
|
import { t as n } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
-
import { n as r, t as i } from "./_chunks/choice-chips-
|
|
4
|
+
import { n as r, t as i } from "./_chunks/choice-chips-A6WR-WJe.js";
|
|
5
5
|
//#region src/filter-badge.tsx
|
|
6
6
|
function a(e) {
|
|
7
7
|
return /* @__PURE__ */ n(r, {
|
package/filter-controls.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare function OptionButton({ label, detail, selected, className, detai
|
|
|
7
7
|
className?: string;
|
|
8
8
|
detailClassName?: string;
|
|
9
9
|
}): h.JSX.Element;
|
|
10
|
-
export { Legend, type LegendItem } from './legend';
|
|
11
10
|
/** Caller supplies highlighting; UI owns overlay geometry and scroll synchronization. */
|
|
12
11
|
export declare function HighlightedTextInput({ highlight, className, inputClassName, highlightClassName, ...props }: Omit<JSX.IntrinsicElements['textarea'], 'className'> & {
|
|
13
12
|
highlight: ComponentChildren;
|
package/filter-controls.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
2
2
|
import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { a as n, t as r } from "./_chunks/native-control-
|
|
4
|
-
import { Legend as i } from "./legend.js";
|
|
3
|
+
import { a as n, t as r } from "./_chunks/native-control-pFMuHf3G.js";
|
|
5
4
|
//#region src/filter-controls.tsx
|
|
6
|
-
function
|
|
5
|
+
function i({ label: e, detail: n, selected: i, className: a = "", detailClassName: o = "", ...s }) {
|
|
7
6
|
return /* @__PURE__ */ t(r, {
|
|
8
7
|
...s,
|
|
9
8
|
class: `rv-option-button ${a}`,
|
|
@@ -14,7 +13,7 @@ function a({ label: e, detail: n, selected: i, className: a = "", detailClassNam
|
|
|
14
13
|
})]
|
|
15
14
|
});
|
|
16
15
|
}
|
|
17
|
-
function
|
|
16
|
+
function a({ highlight: r, className: i = "", inputClassName: a = "", highlightClassName: o = "", ...s }) {
|
|
18
17
|
let c = e(null);
|
|
19
18
|
return /* @__PURE__ */ t("div", {
|
|
20
19
|
class: `rv-highlighted-input ${i}`,
|
|
@@ -34,7 +33,7 @@ function o({ highlight: r, className: i = "", inputClassName: a = "", highlightC
|
|
|
34
33
|
})]
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
|
-
function
|
|
36
|
+
function o({ children: e, className: n = "", label: r }) {
|
|
38
37
|
return /* @__PURE__ */ t("div", {
|
|
39
38
|
role: "group",
|
|
40
39
|
"aria-label": r,
|
|
@@ -43,4 +42,4 @@ function s({ children: e, className: n = "", label: r }) {
|
|
|
43
42
|
});
|
|
44
43
|
}
|
|
45
44
|
//#endregion
|
|
46
|
-
export {
|
|
45
|
+
export { a as HighlightedTextInput, o as InlineFieldGroup, i as OptionButton };
|
package/form-controls/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface FormFieldOptions {
|
|
2
|
+
readonly label: string;
|
|
3
|
+
readonly control: HTMLElement;
|
|
4
|
+
readonly hint?: string;
|
|
5
|
+
readonly className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createFormField(document: Document, options: FormFieldOptions): HTMLLabelElement;
|
|
8
|
+
export declare function createTextControl(document: Document, placeholder: string): HTMLInputElement;
|
|
9
|
+
/** DOM counterpart of Dropdown; callers own its lifetime. */
|
|
10
|
+
export { createDropdownControl } from '../dropdown/control';
|
package/form-controls/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as r } from "../_chunks/control-
|
|
5
|
-
//#region src/form-controls/index.
|
|
6
|
-
function i(
|
|
7
|
-
return n
|
|
2
|
+
import { createPreactElement as t } from "../preact-mount.js";
|
|
3
|
+
import { n } from "../_chunks/native-control-pFMuHf3G.js";
|
|
4
|
+
import { t as r } from "../_chunks/control-mlH7l0Uq.js";
|
|
5
|
+
//#region src/form-controls/index.tsx
|
|
6
|
+
function i(n, r) {
|
|
7
|
+
return t(n, /* @__PURE__ */ e("label", {
|
|
8
8
|
class: ["rv-field", r.className].filter(Boolean).join(" "),
|
|
9
9
|
children: [
|
|
10
10
|
/* @__PURE__ */ e("span", {
|
|
@@ -25,7 +25,7 @@ function i(t, r) {
|
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
function a(r, i) {
|
|
28
|
-
return
|
|
28
|
+
return t(r, /* @__PURE__ */ e(n, {
|
|
29
29
|
type: "text",
|
|
30
30
|
placeholder: i
|
|
31
31
|
}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as e, o as t, u as n } from "../_chunks/preact.module-BBM36DnO.js";
|
|
2
2
|
import { i as r, s as i } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
3
3
|
import { t as a } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { createControlId as o } from "../core/control-id.js";
|
|
5
|
+
import { t as s } from "../_chunks/field-context-D57PnBbH.js";
|
|
6
|
+
import { nativeControlTag as c } from "../control-presentation.js";
|
|
7
7
|
//#region src/form-controls/presentation.tsx
|
|
8
8
|
function l({ children: e, removeLabel: t, onRemove: n, className: r = "", removeClassName: i = "", role: o }) {
|
|
9
9
|
return /* @__PURE__ */ a("span", {
|
|
@@ -34,9 +34,9 @@ function u({ label: e, children: t, hint: n, hintId: r, labelId: i = r ? `${r}-l
|
|
|
34
34
|
}) : null
|
|
35
35
|
];
|
|
36
36
|
}
|
|
37
|
-
function d({ label: e, children: t, hint: n, hintId:
|
|
38
|
-
let [h] = r(() =>
|
|
39
|
-
return /* @__PURE__ */ a(
|
|
37
|
+
function d({ label: e, children: t, hint: n, hintId: c, labelId: l, controlId: d, className: f = "", class: p, ...m }) {
|
|
38
|
+
let [h] = r(() => o("rv-field")), g = i(s), _ = c ?? `rv-field-hint-${h}`, v = l ?? `${_}-label`;
|
|
39
|
+
return /* @__PURE__ */ a(s.Provider, {
|
|
40
40
|
value: {
|
|
41
41
|
disabled: g.disabled,
|
|
42
42
|
labelId: v,
|
|
@@ -64,21 +64,21 @@ function f(r, i, a) {
|
|
|
64
64
|
if (Array.isArray(r)) return r.map((e) => f(e, i, a));
|
|
65
65
|
if (!n(r)) return r;
|
|
66
66
|
if (r.type === e) return t(r, { children: f(r.props.children, i, a) });
|
|
67
|
-
let o =
|
|
67
|
+
let o = c(r.type);
|
|
68
68
|
if (!o) return r;
|
|
69
|
-
let
|
|
69
|
+
let s = r;
|
|
70
70
|
if ([
|
|
71
71
|
"input",
|
|
72
72
|
"select",
|
|
73
73
|
"textarea"
|
|
74
74
|
].includes(o)) {
|
|
75
|
-
let e = new Set(`${
|
|
76
|
-
return t(
|
|
75
|
+
let e = new Set(`${s.props["aria-describedby"] ?? ""} ${i}`.trim().split(/\s+/));
|
|
76
|
+
return t(s, {
|
|
77
77
|
"aria-describedby": [...e].join(" "),
|
|
78
|
-
"aria-labelledby":
|
|
78
|
+
"aria-labelledby": s.props["aria-labelledby"] ?? (s.props["aria-label"] ? void 0 : a)
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
return t(
|
|
81
|
+
return t(s, { children: f(s.props.children, i, a) });
|
|
82
82
|
}
|
|
83
83
|
function p({ children: e, icon: t, iconClassName: n = "", iconPosition: r = "before", className: i = "", class: o, ...s }) {
|
|
84
84
|
let c = t == null ? null : /* @__PURE__ */ a("span", {
|
package/formatting/index.d.ts
CHANGED