@revolist/ui 4.0.1-rc → 4.0.3-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/LICENSE +21 -0
- package/README.md +345 -262
- package/_chunks/calendar-xpZ0v3xf.js +258 -0
- package/_chunks/chart-frame-Cmc7xU1i.js +130 -0
- package/_chunks/choice-chips-CHQTUdLs.js +110 -0
- package/_chunks/clock-BOhPNlW3.js +4 -0
- package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-D8vyPfld.js} +41 -41
- package/_chunks/color-picker-CudqPYZo.js +138 -0
- package/_chunks/component-C_T2VN5u.js +863 -0
- package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BMOOmqx5.js} +0 -4
- package/_chunks/control-AHKXD5Eu.js +93 -0
- package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-uscKfAnV.js} +29 -29
- package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
- package/_chunks/{controls-NEL5tDaz.js → controls-DsNi8V8I.js} +229 -214
- package/_chunks/{date-control-CYCkb1aQ.js → date-control-DrVFX13g.js} +21 -21
- package/_chunks/date-time-qIhp5vaX.js +768 -0
- package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
- package/_chunks/dialog.parts-CKGkC5zP.js +134 -0
- package/_chunks/duration-CL68Em0o.js +272 -0
- package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
- package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-WDdtVDNA.js} +8 -8
- package/_chunks/field-context-D57PnBbH.js +5 -0
- package/_chunks/framework-mount--RTLIqE-.js +54 -0
- package/_chunks/history-controls-B3u3INEK.js +27 -0
- package/_chunks/hooks.module-CG3gN83z.js +157 -0
- package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
- package/_chunks/mount-DQ1cpppK.js +257 -0
- package/_chunks/native-control-C_yok8_-.js +605 -0
- package/_chunks/native.view-ByyZ1CT5.js +32 -0
- package/_chunks/{number-input-NnH57J4j.js → number-input-BKwA5FnM.js} +89 -89
- package/_chunks/picker-h1P5RUgp.js +122 -0
- package/_chunks/popup-CT2uD3go.js +367 -0
- package/_chunks/preact.module-BBM36DnO.js +290 -0
- package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-DZgmaic0.js} +10 -10
- package/_chunks/render-m5eMMwFR.js +83 -0
- package/_chunks/reorder-list-CSlqAGHw.js +59 -0
- package/_chunks/request-trail-DSlFix6i.js +618 -0
- package/_chunks/rich-text-CH7gIqOS.js +636 -0
- package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
- package/_form.scss +1 -1
- package/_vendor/preact/LICENSE +21 -0
- package/_vendor/preact/compat/src/index.d.ts +353 -0
- package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
- package/_vendor/preact/compat/src/suspense.d.ts +19 -0
- package/_vendor/preact/hooks/src/index.d.ts +145 -0
- package/_vendor/preact/src/dom.d.ts +2548 -0
- package/_vendor/preact/src/index.d.ts +373 -0
- package/_vendor/preact/src/jsx.d.ts +2958 -0
- package/activity-message.d.ts +1 -1
- package/activity-message.js +16 -16
- package/ai/_chat.scss +195 -0
- package/ai/_style.scss +105 -34
- package/ai/chat.d.ts +63 -0
- package/ai/components.d.ts +20 -4
- package/ai/index.d.ts +2 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +30 -1
- package/ai/prompt-history.d.ts +13 -0
- package/ai/request-trail.d.ts +1 -1
- package/ai/transcript.d.ts +25 -0
- package/ai/translation-context.d.ts +1 -1
- package/ai/translations.d.ts +1 -1
- package/alert.d.ts +2 -2
- package/angular/angular.js +0 -3
- package/assignee/field.d.ts +2 -2
- package/assignee/index.js +86 -87
- package/assignee/layout.d.ts +2 -2
- package/assignee/picker.d.ts +1 -1
- package/avatar/index.js +25 -25
- package/avatar/index.view.d.ts +1 -1
- package/brush-range/component.d.ts +1 -1
- package/brush-range/component.js +30 -30
- package/buttons/delete-button.d.ts +2 -1
- package/buttons/delete-button.js +1 -1
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.js +3 -3
- package/buttons/svg-button.d.ts +2 -1
- package/buttons/svg-button.js +35 -35
- package/calendar/_calendar.scss +7 -2
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.js +1 -1
- package/calendar/caption.d.ts +1 -1
- package/calendar/day.d.ts +1 -1
- package/calendar/day.js +4 -4
- package/calendar/header.d.ts +1 -1
- package/calendar/header.js +35 -35
- package/calendar/index.js +2 -2
- package/calendar/month-grid.d.ts +1 -1
- package/calendar/month-grid.js +37 -37
- package/calendar/picker.d.ts +1 -1
- package/calendar/types.d.ts +1 -1
- package/calendar/year-grid.d.ts +1 -1
- package/calendar/year-grid.js +12 -12
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.js +9 -9
- package/choice-chips/index.d.ts +1 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.d.ts +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-picker.d.ts +1 -1
- package/color-palette/color-picker.js +2 -2
- package/component-catalog.d.ts +34 -23
- package/control-attributes.js +7 -7
- package/control-presentation.js +18 -18
- package/controls.d.ts +12 -10
- package/controls.js +3 -3
- package/core/editor-commit.d.ts +1 -1
- package/core/editor-popup.d.ts +1 -1
- package/core/editor-popup.js +1 -1
- package/date-time/date-control.d.ts +1 -1
- package/date-time/field.d.ts +2 -2
- package/date-time/index.js +1 -1
- package/date-time/picker.d.ts +1 -1
- package/date-time/style.scss +4 -4
- package/date-time/time-control.d.ts +1 -1
- package/date-time/time-selection.d.ts +1 -1
- package/date-time/types.d.ts +1 -1
- package/dialog/dialog-action-footer.view.d.ts +1 -1
- package/dialog/dialog.dom.js +52 -52
- package/dialog/dialog.parts.d.ts +18 -18
- package/dialog/dialog.parts.js +1 -1
- package/dialog/dialog.preact.d.ts +1 -1
- package/dialog/dialog.preact.js +6 -6
- package/distribution-chart/area-chart.d.ts +1 -1
- package/distribution-chart/area-chart.js +25 -25
- package/distribution-chart/bar-chart.d.ts +6 -3
- package/distribution-chart/bar-chart.js +10 -6
- package/distribution-chart/chart-frame.d.ts +3 -2
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/index.js +6 -6
- package/distribution-chart/line-chart.d.ts +1 -1
- package/distribution-chart/line-chart.js +9 -9
- package/distribution-chart/types.d.ts +1 -1
- package/dropdown/content.d.ts +3 -2
- package/dropdown/content.js +1 -141
- package/dropdown/control.d.ts +14 -0
- package/dropdown/control.js +1 -0
- package/dropdown/control.view.d.ts +6 -0
- package/dropdown/dropdown.service.d.ts +1 -1
- package/dropdown/dropdown.service.js +9 -9
- package/dropdown/dropdown.types.d.ts +4 -0
- package/dropdown/editor-dropdown.style.scss +37 -9
- package/dropdown/index.d.ts +1 -1
- package/dropdown/index.js +3 -4
- package/dropdown/lookup-field.d.ts +1 -1
- package/dropdown/lookup-field.js +41 -41
- package/dropdown/popup.d.ts +1 -1
- package/dropdown/popup.js +1 -140
- package/duration/controls.d.ts +1 -1
- package/duration/index.d.ts +2 -2
- package/duration/index.js +1 -1
- package/duration/style.scss +1 -1
- package/editor-actions.d.ts +1 -1
- package/editor-actions.js +21 -20
- package/editor-layout/index.d.ts +1 -1
- package/editor-layout/index.js +27 -27
- package/field-configurator.d.ts +1 -1
- package/field-configurator.js +93 -93
- package/field-reorder.hook.js +32 -32
- package/fieldset.d.ts +3 -0
- package/filter/filters/slider/preact.js +3 -3
- package/filter/filters/slider/single.d.ts +1 -1
- package/filter/filters/slider/single.js +23 -23
- package/filter-badge.d.ts +1 -1
- package/filter-badge.js +23 -22
- package/filter-controls.d.ts +1 -1
- package/filter-controls.js +30 -30
- package/form-controls/field-context.d.ts +5 -0
- package/form-controls/index.js +16 -21
- package/form-controls/index.view.d.ts +2 -4
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +59 -51
- package/formatting/comparison-preview.d.ts +1 -1
- package/formatting/control-tooltip.d.ts +1 -1
- package/formatting/icon-controls.d.ts +1 -1
- package/formatting/index.js +105 -100
- package/formatting/inspector-section.d.ts +1 -1
- package/formatting/typography-controls.d.ts +1 -1
- package/framework-mount.d.ts +1 -1
- package/framework.js +215 -207
- package/history-controls.d.ts +14 -0
- package/history-controls.js +1 -0
- package/icons/icon.d.ts +1 -1
- package/icons/icon.js +1 -1
- package/legend.d.ts +1 -1
- package/legend.js +12 -12
- package/masked-input/index.d.ts +1 -1
- package/masked-input/index.js +109 -109
- package/native-control.d.ts +14 -12
- package/native-control.js +3 -26
- package/native-styles.css +1 -1
- package/native.js +40 -39
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +18 -14
- package/pagination.d.ts +3 -0
- package/pagination.js +43 -33
- package/pdf-viewer/component.d.ts +1 -1
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/header.d.ts +1 -1
- package/pdf-viewer/index.js +13 -13
- package/pdf-viewer/search-bar.d.ts +1 -1
- package/pdf-viewer/status.d.ts +1 -1
- package/pdf-viewer/style.scss +3 -4
- package/pdf-viewer/toolbar.d.ts +1 -1
- package/pickers.d.ts +1 -1
- package/preact-mount.d.ts +1 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +2 -0
- package/preact.js +62 -62
- package/rating-choice.d.ts +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +1 -1
- package/react-control.d.ts +0 -1
- package/react-control.js +2 -2
- package/react.d.ts +13 -3
- package/react.js +71 -88
- package/reorder-list.d.ts +1 -1
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-avatar.d.ts +1 -1
- package/resource-picker/resource-picker-avatar.js +14 -14
- package/resource-picker/resource-picker-option.d.ts +1 -1
- package/resource-picker/resource-picker-option.js +28 -28
- package/resource-picker/resource-picker-popup.d.ts +1 -1
- package/resource-picker/resource-picker-popup.js +3 -3
- package/resource-picker/resource-picker.d.ts +1 -1
- package/resource-picker/resource-picker.js +88 -88
- package/resource-picker/resource-picker.scss +6 -3
- package/rich-text/engine.d.ts +16 -19
- package/rich-text/index.d.ts +7 -7
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +4 -3
- package/rich-text/render-model.d.ts +4 -5
- package/rich-text/style.scss +3 -12
- package/rich-text/toolbar.d.ts +7 -7
- package/rich-text/translations.d.ts +3 -15
- package/search-input/index.js +12 -12
- package/segmented-switch/index.d.ts +1 -1
- package/segmented-switch/index.js +1 -1
- package/select.d.ts +20 -0
- package/select.js +1 -0
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/index.js +2 -2
- package/status-feedback/popover.js +10 -10
- package/status-feedback/render.d.ts +2 -2
- package/status-feedback/render.js +3 -44
- package/status-feedback/status-feedback.scss +7 -0
- package/status-feedback/types.d.ts +4 -0
- package/status-feedback/use-auto-dismiss.d.ts +3 -0
- package/styles/_compositions.scss +3 -1
- package/styles/_control.scss +12 -4
- package/styles/_primitives.scss +9 -8
- package/styles.css +1 -1
- package/surfaces.js +49 -49
- package/svelte/UiComponent.server.js +1 -48
- package/svelte/UiComponent.svelte +0 -21
- package/svelte.js +33 -68
- package/switch/index.js +15 -15
- package/time-grid.d.ts +1 -1
- package/time-grid.js +58 -58
- package/timeline-track/component.d.ts +5 -1
- package/timeline-track/index.js +91 -74
- package/timeline-track/model.d.ts +9 -0
- package/timeline-track/model.js +10 -1
- package/ui.css +1 -1
- package/vue-adapter.d.ts +1 -1
- package/vue.d.ts +138 -119
- package/vue.js +150 -174
- package/_chunks/calendar-BsDxCYhI.js +0 -248
- package/_chunks/chart-frame-BvxbmEU9.js +0 -126
- package/_chunks/choice-chips-0HfOnK_4.js +0 -110
- package/_chunks/color-picker-BRv-__AM.js +0 -138
- package/_chunks/component-D4PH5UZT.js +0 -859
- package/_chunks/date-time-DjucJmbc.js +0 -769
- package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
- package/_chunks/dropdown-CkGQBm1Q.js +0 -357
- package/_chunks/duration-BCaktcvz.js +0 -270
- package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
- package/_chunks/framework-mount-BKIOsvY-.js +0 -54
- package/_chunks/mount-0-8opf1j.js +0 -90
- package/_chunks/native.view-8q_nwQ7x.js +0 -32
- package/_chunks/picker-oazJ7sO_.js +0 -121
- package/_chunks/reorder-list-BV3kZXso.js +0 -59
- package/_chunks/request-trail-D0oVzdRd.js +0 -347
- package/_chunks/rich-text-2Rla349o.js +0 -477
- package/react-native-select.d.ts +0 -6
- package/rich-text/syntax.d.ts +0 -2
- package/vue-native-select.d.ts +0 -9
package/dialog/dialog.preact.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as e } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
import { attachDialogDrag as t } from "./dialog.drag.js";
|
|
3
3
|
//#region src/dialog/dialog.preact.ts
|
|
4
4
|
function n({ targetRef: n, handleRef: r, enabled: i = !0 }) {
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
if (i &&
|
|
8
|
-
target:
|
|
5
|
+
e(() => {
|
|
6
|
+
let e = n.current, a = r.current;
|
|
7
|
+
if (i && e && a) return t({
|
|
8
|
+
target: e,
|
|
9
9
|
handle: a
|
|
10
10
|
});
|
|
11
11
|
}, [
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as e } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
import { t } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { i as n, n as r, r as i, t as a } from "../_chunks/chart-frame-Cmc7xU1i.js";
|
|
4
4
|
//#region src/distribution-chart/area-chart.tsx
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
let r =
|
|
5
|
+
function o(o) {
|
|
6
|
+
let s = `rv-area-${e().replace(/[^a-zA-Z0-9_-]/g, "")}`, { points: c } = i(o.data), l = o.data.some((e) => e.selected !== void 0), u = c.slice(1).map((e, t) => {
|
|
7
|
+
let r = c[t], i = n(r, e, o.interpolation);
|
|
8
8
|
return {
|
|
9
|
-
key:
|
|
10
|
-
selected: !
|
|
9
|
+
key: o.data[t].key,
|
|
10
|
+
selected: !l || !!(o.data[t].selected && o.data[t + 1].selected),
|
|
11
11
|
line: i,
|
|
12
|
-
area: `${i} L ${
|
|
12
|
+
area: `${i} L ${e.x} 100 L ${r.x} 100 Z`
|
|
13
13
|
};
|
|
14
14
|
});
|
|
15
|
-
return /* @__PURE__ */ a
|
|
16
|
-
...
|
|
15
|
+
return /* @__PURE__ */ t(a, {
|
|
16
|
+
...o,
|
|
17
17
|
variant: "area",
|
|
18
|
-
positions:
|
|
19
|
-
renderDatum: () =>
|
|
18
|
+
positions: c,
|
|
19
|
+
renderDatum: () => o.showPoints === !1 ? null : /* @__PURE__ */ t("span", {
|
|
20
20
|
class: "rv-distribution-chart__point",
|
|
21
21
|
"aria-hidden": "true"
|
|
22
22
|
}),
|
|
23
|
-
children:
|
|
24
|
-
let
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
id: `${
|
|
23
|
+
children: c.length > 0 && /* @__PURE__ */ t(r, { children: [o.areaFill === "gradient" && /* @__PURE__ */ t("defs", { children: [!0, !1].map((e) => {
|
|
24
|
+
let n = e ? "var(--rv-distribution-accent, var(--rv-ui-accent))" : "var(--rv-distribution-muted, var(--rv-ui-border))";
|
|
25
|
+
return /* @__PURE__ */ t("linearGradient", {
|
|
26
|
+
id: `${s}${e ? "" : "-muted"}`,
|
|
27
27
|
gradientUnits: "userSpaceOnUse",
|
|
28
28
|
x1: "0",
|
|
29
29
|
y1: "8",
|
|
30
30
|
x2: "0",
|
|
31
31
|
y2: "100",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
32
|
+
children: [/* @__PURE__ */ t("stop", {
|
|
33
33
|
offset: "0%",
|
|
34
|
-
"stop-color":
|
|
34
|
+
"stop-color": n,
|
|
35
35
|
"stop-opacity": "0.4"
|
|
36
|
-
}), /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ t("stop", {
|
|
37
37
|
offset: "100%",
|
|
38
|
-
"stop-color":
|
|
38
|
+
"stop-color": n,
|
|
39
39
|
"stop-opacity": "0.02"
|
|
40
40
|
})]
|
|
41
41
|
}, String(e));
|
|
42
|
-
}) }),
|
|
42
|
+
}) }), u.map((e) => /* @__PURE__ */ t("g", { children: [/* @__PURE__ */ t("path", {
|
|
43
43
|
class: `rv-distribution-chart__area${e.selected ? " is-selected" : ""}`,
|
|
44
44
|
d: e.area,
|
|
45
|
-
style:
|
|
46
|
-
}), /* @__PURE__ */
|
|
45
|
+
style: o.areaFill === "gradient" ? { fill: `url(#${s}${e.selected ? "" : "-muted"})` } : void 0
|
|
46
|
+
}), /* @__PURE__ */ t("path", {
|
|
47
47
|
class: `rv-distribution-chart__series rv-distribution-chart__segment${e.selected ? " is-selected" : ""}`,
|
|
48
48
|
d: e.line,
|
|
49
49
|
"vector-effect": "non-scaling-stroke"
|
|
@@ -51,4 +51,4 @@ function s(s) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
export {
|
|
54
|
+
export { o as AreaChart };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { h } from 'preact';
|
|
2
|
-
import { StandaloneChartProps } from './types';
|
|
3
|
-
export
|
|
1
|
+
import { h } from '../_vendor/preact/src/index';
|
|
2
|
+
import { DistributionChartDatum, StandaloneChartProps } from './types';
|
|
3
|
+
export interface BarChartProps extends StandaloneChartProps {
|
|
4
|
+
/** CSS color or per-bar rule. Return undefined to retain the theme color. */
|
|
5
|
+
readonly barColor?: string | ((datum: DistributionChartDatum, index: number) => string | undefined);
|
|
6
|
+
}
|
|
4
7
|
/** Compact bar chart, independent of sliders, filters and grid instances. */
|
|
5
8
|
export declare function BarChart(props: BarChartProps): h.JSX.Element;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { r as t, t as n } from "../_chunks/chart-frame-Cmc7xU1i.js";
|
|
3
3
|
//#region src/distribution-chart/bar-chart.tsx
|
|
4
4
|
function r(r) {
|
|
5
|
-
let { values: i, max: a } =
|
|
6
|
-
return /* @__PURE__ */ n
|
|
5
|
+
let { values: i, max: a } = t(r.data), o = r.data.map((e, t) => typeof r.barColor == "function" ? r.barColor(e, t) : r.barColor);
|
|
6
|
+
return /* @__PURE__ */ e(n, {
|
|
7
7
|
...r,
|
|
8
|
+
datumColors: o,
|
|
8
9
|
variant: "bar",
|
|
9
|
-
renderDatum: (
|
|
10
|
+
renderDatum: (t, n) => /* @__PURE__ */ e("span", {
|
|
10
11
|
class: "rv-distribution-chart__bar",
|
|
11
|
-
style: {
|
|
12
|
+
style: {
|
|
13
|
+
backgroundColor: o[n],
|
|
14
|
+
height: `${Math.max(3, i[n] / a * 100)}%`
|
|
15
|
+
},
|
|
12
16
|
"aria-hidden": "true"
|
|
13
17
|
})
|
|
14
18
|
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { h, ComponentChildren } from 'preact';
|
|
1
|
+
import { h, ComponentChildren } from '../_vendor/preact/src/index';
|
|
2
2
|
import { DistributionChartDatum, DistributionChartType, StandaloneChartProps } from './types';
|
|
3
3
|
export interface ChartPoint {
|
|
4
4
|
readonly x: number;
|
|
5
5
|
readonly y: number;
|
|
6
6
|
}
|
|
7
7
|
/** Shared accessibility, focus and tooltip lifecycle for the chart primitives. */
|
|
8
|
-
export declare function ChartFrame({ data, ariaLabel, variant, height, className, showGrid, showLabels, showValues, legend, formatValue, tooltip, tooltipIndicator, renderTooltip, positions, renderDatum, children }: StandaloneChartProps & {
|
|
8
|
+
export declare function ChartFrame({ data, ariaLabel, variant, height, className, showGrid, showLabels, showValues, legend, formatValue, tooltip, tooltipIndicator, renderTooltip, positions, datumColors, renderDatum, children }: StandaloneChartProps & {
|
|
9
9
|
variant: DistributionChartType;
|
|
10
10
|
positions?: readonly ChartPoint[];
|
|
11
|
+
datumColors?: readonly (string | undefined)[];
|
|
11
12
|
renderDatum: (datum: DistributionChartDatum, index: number) => ComponentChildren;
|
|
12
13
|
children?: ComponentChildren;
|
|
13
14
|
}): h.JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { BarChart as t } from "./bar-chart.js";
|
|
3
|
+
import { LineChart as n } from "./line-chart.js";
|
|
4
|
+
import { AreaChart as r } from "./area-chart.js";
|
|
5
5
|
//#region src/distribution-chart/index.tsx
|
|
6
6
|
function i({ type: i = "bar", ...a }) {
|
|
7
|
-
return
|
|
7
|
+
return e(i === "line" ? n : i === "area" ? r : t, { ...a });
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { r as AreaChart, t as BarChart, i as DistributionChart, n as LineChart };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { i as t, n, r, t as i } from "../_chunks/chart-frame-Cmc7xU1i.js";
|
|
3
3
|
//#region src/distribution-chart/line-chart.tsx
|
|
4
4
|
function a(a) {
|
|
5
|
-
let { points: o } =
|
|
6
|
-
return /* @__PURE__ */ i
|
|
5
|
+
let { points: o } = r(a.data);
|
|
6
|
+
return /* @__PURE__ */ e(i, {
|
|
7
7
|
...a,
|
|
8
8
|
variant: "line",
|
|
9
9
|
positions: o,
|
|
10
|
-
renderDatum: () => a.showPoints === !1 ? null : /* @__PURE__ */
|
|
10
|
+
renderDatum: () => a.showPoints === !1 ? null : /* @__PURE__ */ e("span", {
|
|
11
11
|
class: "rv-distribution-chart__point",
|
|
12
12
|
"aria-hidden": "true"
|
|
13
13
|
}),
|
|
14
|
-
children: o.length > 0 && /* @__PURE__ */
|
|
15
|
-
class: `rv-distribution-chart__series rv-distribution-chart__segment${a.data[
|
|
16
|
-
d:
|
|
14
|
+
children: o.length > 0 && /* @__PURE__ */ e(n, { children: o.slice(1).map((n, r) => /* @__PURE__ */ e("path", {
|
|
15
|
+
class: `rv-distribution-chart__series rv-distribution-chart__segment${a.data[r].selected && a.data[r + 1].selected ? " is-selected" : ""}`,
|
|
16
|
+
d: t(o[r], n, a.interpolation),
|
|
17
17
|
"vector-effect": "non-scaling-stroke"
|
|
18
|
-
}, a.data[
|
|
18
|
+
}, a.data[r].key)) })
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
package/dropdown/content.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ComponentChildren, RefObject } from 'preact';
|
|
1
|
+
import { h, ComponentChildren, RefObject } from '../_vendor/preact/src/index';
|
|
2
2
|
import { DropdownConfig, DropdownOption } from './dropdown.types';
|
|
3
3
|
import { RemoteDropdownState, DropdownRemoteText } from './remote';
|
|
4
4
|
type DropdownContentProps<T = any> = {
|
|
@@ -16,7 +16,7 @@ type DropdownContentProps<T = any> = {
|
|
|
16
16
|
theme?: string | null;
|
|
17
17
|
optionIdPrefix: string;
|
|
18
18
|
};
|
|
19
|
-
export declare function DropdownPopupContent<T = any>({ options, selectedValues, remote, value, onChange, config, multiSelect, search, searchPlaceholder, listboxId, searchId, renderOption, renderNoResults, onClose, theme, }: {
|
|
19
|
+
export declare function DropdownPopupContent<T = any>({ options, selectedValues, remote, value, onChange, config, multiSelect, search, searchPlaceholder, listboxId, searchId, renderOption, renderNoResults, onClose, onTabNavigation, theme, }: {
|
|
20
20
|
options: DropdownOption<T>[];
|
|
21
21
|
selectedValues?: DropdownOption<T>[];
|
|
22
22
|
remote?: RemoteDropdownState<T> & {
|
|
@@ -36,6 +36,7 @@ export declare function DropdownPopupContent<T = any>({ options, selectedValues,
|
|
|
36
36
|
renderOption?: (h: any, option: DropdownOption<T>, isSelected: boolean) => ComponentChildren;
|
|
37
37
|
renderNoResults?: (h: any) => ComponentChildren;
|
|
38
38
|
onClose: (focusNext?: boolean) => void;
|
|
39
|
+
onTabNavigation?: () => void;
|
|
39
40
|
theme?: string | null;
|
|
40
41
|
}): h.JSX.Element;
|
|
41
42
|
export declare function DropdownContent<T = any>({ options, filteredOptions, multiSelect, focusedIndex, selectedOptions, onKeyDown, onSelect, onFocusChange, renderOption, renderNoResults, dropdownListRef, theme, optionIdPrefix, }: DropdownContentProps<T>): h.JSX.Element;
|
package/dropdown/content.js
CHANGED
|
@@ -1,141 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { useDropdownService as t } from "./dropdown.service.js";
|
|
3
|
-
import { h as n } from "preact";
|
|
4
|
-
import { Fragment as r, jsx as i, jsxs as a } from "preact/jsx-runtime";
|
|
5
|
-
import { useCallback as o, useEffect as s, useRef as c } from "preact/compat";
|
|
6
|
-
//#region src/dropdown/content.tsx
|
|
7
|
-
function l({ options: n, selectedValues: r, remote: o, value: l, onChange: d, config: f, multiSelect: p, search: m, searchPlaceholder: h, listboxId: g, searchId: _, renderOption: v, renderNoResults: y, onClose: b, theme: x }) {
|
|
8
|
-
let S = c(null), C = c(null), w = c(null), { searchValue: T, focusedIndex: E, selectedOptions: D, filteredOptions: O, handleSelect: k, handleKeyDown: A, handleSearchChange: j, setFocusedIndex: M } = t(n, l, d, f, b, o && {
|
|
9
|
-
selected: r ?? [],
|
|
10
|
-
search: o.search
|
|
11
|
-
}), N = E >= 0 && E < O.length && !O[E].disabled ? `${g}-option-${E}` : void 0;
|
|
12
|
-
return s(() => {
|
|
13
|
-
if (!f.autoFocus) return;
|
|
14
|
-
let e = () => {
|
|
15
|
-
m && S.current ? S.current.focus({ preventScroll: !0 }) : C.current?.focus({ preventScroll: !0 });
|
|
16
|
-
}, t = C.current?.ownerDocument.defaultView ?? (typeof window < "u" ? window : void 0);
|
|
17
|
-
if (!t) return;
|
|
18
|
-
e();
|
|
19
|
-
let n = t.setTimeout(e, 0), r = t.requestAnimationFrame(e), i = t.setTimeout(e, 16);
|
|
20
|
-
return () => {
|
|
21
|
-
t.clearTimeout(n), t.cancelAnimationFrame(r), t.clearTimeout(i);
|
|
22
|
-
};
|
|
23
|
-
}, [f.autoFocus, m]), /* @__PURE__ */ a("div", {
|
|
24
|
-
ref: C,
|
|
25
|
-
className: "dropdown-listbox",
|
|
26
|
-
"data-theme": x ?? "default",
|
|
27
|
-
role: "listbox",
|
|
28
|
-
id: g,
|
|
29
|
-
"aria-multiselectable": p,
|
|
30
|
-
"aria-activedescendant": N,
|
|
31
|
-
tabIndex: -1,
|
|
32
|
-
"aria-busy": o?.loading,
|
|
33
|
-
onScrollCapture: (e) => {
|
|
34
|
-
let t = e.target;
|
|
35
|
-
o && t.scrollHeight - t.scrollTop - t.clientHeight < 48 && o.loadMore();
|
|
36
|
-
},
|
|
37
|
-
onKeyUp: (e) => e.stopPropagation(),
|
|
38
|
-
onKeyDown: (e) => {
|
|
39
|
-
e.stopPropagation(), e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), b(!1)) : e.key === "Tab" ? (e.preventDefault(), e.stopPropagation(), f.closeOnTab && b(!0)) : (e.key !== " " || e.target !== S.current) && A(e);
|
|
40
|
-
},
|
|
41
|
-
children: [
|
|
42
|
-
m && /* @__PURE__ */ i("div", {
|
|
43
|
-
className: "dropdown-search",
|
|
44
|
-
children: /* @__PURE__ */ i("input", {
|
|
45
|
-
ref: S,
|
|
46
|
-
type: "text",
|
|
47
|
-
id: _,
|
|
48
|
-
className: `dropdown-search-input ${x ? `theme-${x}` : ""}`,
|
|
49
|
-
placeholder: h,
|
|
50
|
-
value: T,
|
|
51
|
-
onChange: j,
|
|
52
|
-
onInput: j,
|
|
53
|
-
"aria-label": f.searchAriaLabel ?? "Search options"
|
|
54
|
-
})
|
|
55
|
-
}),
|
|
56
|
-
o?.loading && /* @__PURE__ */ i("div", {
|
|
57
|
-
role: "status",
|
|
58
|
-
children: o.text.loading
|
|
59
|
-
}),
|
|
60
|
-
o?.error && /* @__PURE__ */ a("div", {
|
|
61
|
-
role: "alert",
|
|
62
|
-
children: [
|
|
63
|
-
o.text.error,
|
|
64
|
-
" ",
|
|
65
|
-
/* @__PURE__ */ i(e, {
|
|
66
|
-
onClick: o.retry,
|
|
67
|
-
children: o.text.retry
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ i(u, {
|
|
72
|
-
options: n,
|
|
73
|
-
filteredOptions: O,
|
|
74
|
-
multiSelect: p,
|
|
75
|
-
focusedIndex: E,
|
|
76
|
-
selectedOptions: D,
|
|
77
|
-
onKeyDown: A,
|
|
78
|
-
onSelect: k,
|
|
79
|
-
onFocusChange: M,
|
|
80
|
-
renderOption: v,
|
|
81
|
-
renderNoResults: o ? () => o.loading || o.error ? null : o.text.empty : y,
|
|
82
|
-
dropdownListRef: w,
|
|
83
|
-
theme: x,
|
|
84
|
-
optionIdPrefix: g
|
|
85
|
-
}),
|
|
86
|
-
o?.hasMore && /* @__PURE__ */ i(e, {
|
|
87
|
-
disabled: o.loading,
|
|
88
|
-
onClick: o.loadMore,
|
|
89
|
-
children: o.text.loadMore
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function u({ options: e, filteredOptions: t, multiSelect: s, focusedIndex: c, selectedOptions: l, onKeyDown: u, onSelect: d, onFocusChange: f, renderOption: p, renderNoResults: m, dropdownListRef: h, theme: g, optionIdPrefix: _ }) {
|
|
95
|
-
let v = o((e) => l.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [l]), y = o((e, t) => {
|
|
96
|
-
let r = v(e), o = c === t;
|
|
97
|
-
return /* @__PURE__ */ i("li", {
|
|
98
|
-
id: `${_}-option-${t}`,
|
|
99
|
-
role: "option",
|
|
100
|
-
"aria-selected": r,
|
|
101
|
-
"aria-disabled": e.disabled,
|
|
102
|
-
tabIndex: -1,
|
|
103
|
-
className: `dropdown-option ${r ? "selected" : ""} ${o ? "focused" : ""} ${e.disabled ? "disabled" : ""} ${g ? `theme-${g}` : ""}`,
|
|
104
|
-
onClick: () => d(e),
|
|
105
|
-
onMouseEnter: () => {
|
|
106
|
-
e.disabled || f(t);
|
|
107
|
-
},
|
|
108
|
-
children: p ? p(n, e, r) : /* @__PURE__ */ a("div", {
|
|
109
|
-
className: "option-content",
|
|
110
|
-
children: [s && /* @__PURE__ */ i("input", {
|
|
111
|
-
type: "checkbox",
|
|
112
|
-
checked: r,
|
|
113
|
-
readOnly: !0,
|
|
114
|
-
disabled: e.disabled,
|
|
115
|
-
tabIndex: -1,
|
|
116
|
-
"aria-hidden": "true"
|
|
117
|
-
}), /* @__PURE__ */ i("span", { children: e.label })]
|
|
118
|
-
})
|
|
119
|
-
}, `${e.label}-${t}`);
|
|
120
|
-
}, [
|
|
121
|
-
c,
|
|
122
|
-
d,
|
|
123
|
-
v,
|
|
124
|
-
s,
|
|
125
|
-
p,
|
|
126
|
-
f,
|
|
127
|
-
g
|
|
128
|
-
]);
|
|
129
|
-
return /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i("ul", {
|
|
130
|
-
ref: h,
|
|
131
|
-
className: "dropdown-options",
|
|
132
|
-
role: "presentation",
|
|
133
|
-
tabIndex: -1,
|
|
134
|
-
children: t.length > 0 ? t.map(y) : /* @__PURE__ */ i("li", {
|
|
135
|
-
className: "no-results",
|
|
136
|
-
children: m ? m(n) : /* @__PURE__ */ i("span", { children: "No results found" })
|
|
137
|
-
})
|
|
138
|
-
}) });
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
export { u as DropdownContent, l as DropdownPopupContent };
|
|
1
|
+
export { f as DropdownContent, p as DropdownPopupContent } from "../_chunks/native-control-C_yok8_-.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DropdownOption, DropdownProps } from './dropdown.types';
|
|
2
|
+
/** Application-owned state for DOM consumers of the shared Dropdown. */
|
|
3
|
+
export interface DropdownControl<T = string> {
|
|
4
|
+
readonly element: HTMLDivElement;
|
|
5
|
+
value: T;
|
|
6
|
+
source: DropdownOption<T>[];
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
onChange?: (value: T) => void;
|
|
9
|
+
update(props: Partial<DropdownProps<T>>): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare function createDropdownControl<T = string>(document: Document, initial: DropdownProps<T>): DropdownControl<T>;
|
|
13
|
+
/** Lifecycle boundary for Stencil/other VNode factories that cannot render Preact components. */
|
|
14
|
+
export declare function renderDropdownControl<T>(h: (tag: any, props: any, ...children: any[]) => T, props: DropdownProps): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as createDropdownControl, n as renderDropdownControl } from "../_chunks/control-AHKXD5Eu.js";
|
|
@@ -14,6 +14,6 @@ export declare function useDropdownService<T = any>(options: DropdownOption<T>[]
|
|
|
14
14
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
15
15
|
handleSearchChange: (e: DropdownInputEvent) => void;
|
|
16
16
|
isOptionSelected: (option: DropdownOption<T>) => boolean;
|
|
17
|
-
setFocusedIndex: import('preact/hooks').Dispatch<import('preact/hooks').StateUpdater<number>>;
|
|
17
|
+
setFocusedIndex: import('../_vendor/preact/hooks/src/index').Dispatch<import('../_vendor/preact/hooks/src/index').StateUpdater<number>>;
|
|
18
18
|
};
|
|
19
19
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e, i as t, n, o as r, t as i } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
2
2
|
//#region src/dropdown/dropdown.service.ts
|
|
3
3
|
var a = (e, t) => e.label.toLowerCase().includes(t.toLowerCase()), o = (e, t, n) => {
|
|
4
4
|
if (n === "none") return 0;
|
|
@@ -12,8 +12,8 @@ function s(e, t, n) {
|
|
|
12
12
|
return r ? [r] : [];
|
|
13
13
|
}
|
|
14
14
|
function c(c, l, u, d = {}, f, p) {
|
|
15
|
-
let { search: m = !1, filterFunction: h = a, sortDirection: g = "none", sortFunction: _ = o, multiSelect: v = !1, autocomplete: y = !1, initialSearch: b = "" } = d, [x, S] =
|
|
16
|
-
|
|
15
|
+
let { search: m = !1, filterFunction: h = a, sortDirection: g = "none", sortFunction: _ = o, multiSelect: v = !1, autocomplete: y = !1, initialSearch: b = "" } = d, [x, S] = t(b), [C, w] = t(-1), [T, E] = t(() => s(c, l, v)), D = i(!1);
|
|
16
|
+
e(() => {
|
|
17
17
|
E(p?.selected ?? s(c, l, v));
|
|
18
18
|
}, [
|
|
19
19
|
l,
|
|
@@ -34,9 +34,9 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
34
34
|
_,
|
|
35
35
|
!!p
|
|
36
36
|
]);
|
|
37
|
-
|
|
37
|
+
e(() => {
|
|
38
38
|
D.current = !1, S(b);
|
|
39
|
-
}, [b]),
|
|
39
|
+
}, [b]), e(() => {
|
|
40
40
|
O.length ? w((e) => {
|
|
41
41
|
if (D.current && e >= 0 && e < O.length && !O[e].disabled) return e;
|
|
42
42
|
let t = O.findIndex((e) => !e.disabled && T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)));
|
|
@@ -47,7 +47,7 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
47
47
|
return e >= 0 && e < O.length && !O[e].disabled ? e : t >= 0 ? t : O.findIndex((e) => !e.disabled);
|
|
48
48
|
}) : w(-1);
|
|
49
49
|
}, [O, T]);
|
|
50
|
-
let k =
|
|
50
|
+
let k = r((e) => {
|
|
51
51
|
if (!e.disabled) {
|
|
52
52
|
if (v) {
|
|
53
53
|
let t = T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), n;
|
|
@@ -74,7 +74,7 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
74
74
|
selectedOptions: T,
|
|
75
75
|
filteredOptions: O,
|
|
76
76
|
handleSelect: k,
|
|
77
|
-
handleKeyDown:
|
|
77
|
+
handleKeyDown: r((e) => {
|
|
78
78
|
switch (e.key) {
|
|
79
79
|
case "Escape":
|
|
80
80
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -93,11 +93,11 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
93
93
|
C,
|
|
94
94
|
k
|
|
95
95
|
]),
|
|
96
|
-
handleSearchChange:
|
|
96
|
+
handleSearchChange: r((e) => {
|
|
97
97
|
let t = e.currentTarget.value;
|
|
98
98
|
t !== x && (D.current = !1, S(t), p?.search(t), w(-1));
|
|
99
99
|
}, [p, x]),
|
|
100
|
-
isOptionSelected:
|
|
100
|
+
isOptionSelected: r((e) => T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [T]),
|
|
101
101
|
setFocusedIndex: w
|
|
102
102
|
};
|
|
103
103
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from '../_vendor/preact/src/index';
|
|
1
2
|
import { DropdownDataSource, DropdownRemoteText } from './remote';
|
|
2
3
|
export type { DropdownDataSource, DropdownRemoteText, LookupId, LookupCursor } from './remote';
|
|
3
4
|
export type DropdownRenderable = any;
|
|
@@ -43,6 +44,8 @@ export type DropdownConfig<T = any> = {
|
|
|
43
44
|
initialSearch?: string;
|
|
44
45
|
/** Close the dropdown when Tab is pressed inside the open popup. */
|
|
45
46
|
closeOnTab?: boolean;
|
|
47
|
+
/** Dismiss then let the browser Tab from the trigger (standalone fields). */
|
|
48
|
+
nativeTabNavigation?: boolean;
|
|
46
49
|
portalTarget?: HTMLElement | null;
|
|
47
50
|
topLayer?: boolean;
|
|
48
51
|
ariaLabel?: string;
|
|
@@ -66,6 +69,7 @@ export interface DropdownEnvironment {
|
|
|
66
69
|
}
|
|
67
70
|
export type DropdownProps<T = any> = {
|
|
68
71
|
environment?: DropdownEnvironment;
|
|
72
|
+
triggerAttributes?: JSX.HTMLAttributes<HTMLDivElement>;
|
|
69
73
|
source: DropdownOption<T>[];
|
|
70
74
|
/** Optional application-owned remote search and ID resolver. Values must be string/number IDs. */
|
|
71
75
|
dataSource?: DropdownDataSource<T>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use '../styles/motion';
|
|
2
2
|
@use '../styles/palette';
|
|
3
|
+
@use '../styles/control';
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
// Mixins
|
|
@@ -86,7 +87,7 @@ revo-grid,
|
|
|
86
87
|
justify-content: center;
|
|
87
88
|
margin: 0;
|
|
88
89
|
position: absolute;
|
|
89
|
-
|
|
90
|
+
inset-inline-end: var(--rv-dropdown-arrow-right);
|
|
90
91
|
top: 50%;
|
|
91
92
|
transform: translateY(-50%);
|
|
92
93
|
transition: transform var(--rv-ui-motion-normal, 160ms) var(--rv-ui-motion-ease, ease-out);
|
|
@@ -112,8 +113,8 @@ revo-grid,
|
|
|
112
113
|
align-items: center;
|
|
113
114
|
min-width: 0;
|
|
114
115
|
overflow: hidden;
|
|
115
|
-
padding-
|
|
116
|
-
padding-
|
|
116
|
+
padding-inline-start: 5px;
|
|
117
|
+
padding-inline-end: var(--rv-dropdown-value-right-space);
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
.selected-value {
|
|
@@ -125,8 +126,8 @@ revo-grid,
|
|
|
125
126
|
max-width: 100%;
|
|
126
127
|
min-width: 0;
|
|
127
128
|
overflow: hidden;
|
|
128
|
-
padding-
|
|
129
|
-
padding-
|
|
129
|
+
padding-inline-start: 5px;
|
|
130
|
+
padding-inline-end: var(--rv-dropdown-value-right-space);
|
|
130
131
|
text-overflow: ellipsis;
|
|
131
132
|
white-space: nowrap;
|
|
132
133
|
width: 100%;
|
|
@@ -146,7 +147,7 @@ revo-grid,
|
|
|
146
147
|
background-color: var(--rv-dropdown-container-tag-background);
|
|
147
148
|
border-radius: 3px;
|
|
148
149
|
padding: 2px 6px;
|
|
149
|
-
padding-
|
|
150
|
+
padding-inline-end: 0;
|
|
150
151
|
font-size: 14px;
|
|
151
152
|
|
|
152
153
|
}
|
|
@@ -158,7 +159,7 @@ revo-grid,
|
|
|
158
159
|
max-width: 100%;
|
|
159
160
|
min-width: 0;
|
|
160
161
|
overflow: hidden;
|
|
161
|
-
padding-
|
|
162
|
+
padding-inline-end: var(--rv-dropdown-value-right-space);
|
|
162
163
|
text-overflow: ellipsis;
|
|
163
164
|
white-space: nowrap;
|
|
164
165
|
width: 100%;
|
|
@@ -247,6 +248,7 @@ revo-grid,
|
|
|
247
248
|
background-color: var(--rv-dropdown-menu-background);
|
|
248
249
|
|
|
249
250
|
.dropdown-option {
|
|
251
|
+
box-sizing: border-box;
|
|
250
252
|
display: flex;
|
|
251
253
|
min-height: 38px;
|
|
252
254
|
align-items: center;
|
|
@@ -255,7 +257,7 @@ revo-grid,
|
|
|
255
257
|
font-size: 14px;
|
|
256
258
|
font-weight: 400;
|
|
257
259
|
list-style: none;
|
|
258
|
-
padding:
|
|
260
|
+
padding: 8px 10px;
|
|
259
261
|
cursor: pointer;
|
|
260
262
|
user-select: none;
|
|
261
263
|
margin: 1px 0;
|
|
@@ -289,7 +291,7 @@ revo-grid,
|
|
|
289
291
|
@include flex-center;
|
|
290
292
|
gap: 8px;
|
|
291
293
|
width: 100%;
|
|
292
|
-
|
|
294
|
+
min-width: 0;
|
|
293
295
|
}
|
|
294
296
|
.no-results {
|
|
295
297
|
padding: 12px;
|
|
@@ -306,3 +308,29 @@ revo-grid,
|
|
|
306
308
|
opacity: 1;
|
|
307
309
|
}
|
|
308
310
|
}
|
|
311
|
+
|
|
312
|
+
// Standalone controls share Dropdown behavior with grid editors and have form chrome.
|
|
313
|
+
.dropdown-container.rv-select {
|
|
314
|
+
height: auto;
|
|
315
|
+
min-width: 0;
|
|
316
|
+
.dropdown-trigger {
|
|
317
|
+
@include control.action-size;
|
|
318
|
+
padding-inline-end: 24px;
|
|
319
|
+
border: 1px solid var(--rv-ui-border);
|
|
320
|
+
border-radius: var(--rv-control-radius, 8px);
|
|
321
|
+
background: var(--rv-ui-surface-sunken);
|
|
322
|
+
color: var(--rv-ui-text);
|
|
323
|
+
&:focus-visible { outline: 2px solid var(--rv-ui-accent); outline-offset: 1px; }
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// Standalone controls own the padding once; grid editors retain their compact insets.
|
|
328
|
+
.dropdown-container:is(.rv-select, .rv-combobox, .rv-multi-select) .dropdown-trigger {
|
|
329
|
+
--rv-dropdown-arrow-size: 9px;
|
|
330
|
+
--rv-dropdown-arrow-right: 12px;
|
|
331
|
+
padding-inline-end: 32px;
|
|
332
|
+
> .selected-value,
|
|
333
|
+
> .selected-values {
|
|
334
|
+
padding-inline: 0;
|
|
335
|
+
}
|
|
336
|
+
}
|
package/dropdown/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { DropdownPopupProps } from './popup';
|
|
|
6
6
|
/**
|
|
7
7
|
* Dropdown component
|
|
8
8
|
*/
|
|
9
|
-
export declare function Dropdown<T = any>({ source: localSource, dataSource, dataContext, remoteText, value, onChange, placeholder, disabled, name, id, className, style, config, renderContent, renderOption, renderValue, renderPlaceholder, renderSelectedValue, renderNoResults, onClose, beforeOutsideClose, environment, }: DropdownProps<T>): any;
|
|
9
|
+
export declare function Dropdown<T = any>({ source: localSource, triggerAttributes, dataSource, dataContext, remoteText, value, onChange, placeholder, disabled, name, id, className, style, config, renderContent, renderOption, renderValue, renderPlaceholder, renderSelectedValue, renderNoResults, onClose, beforeOutsideClose, environment, }: DropdownProps<T>): any;
|
|
10
10
|
/**
|
|
11
11
|
* Define the dropdown component
|
|
12
12
|
* @param el - The element to render the dropdown
|
package/dropdown/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export { r as Dropdown, e as DropdownPopup, i as DropdownPopupContent, t as defineDropdown, n as destroyDropdown };
|
|
1
|
+
import { d as e, l as t, p as n, u as r } from "../_chunks/native-control-C_yok8_-.js";
|
|
2
|
+
import { t as i } from "../_chunks/popup-CT2uD3go.js";
|
|
3
|
+
export { t as Dropdown, i as DropdownPopup, n as DropdownPopupContent, r as defineDropdown, e as destroyDropdown };
|