@revolist/ui 4.0.1-rc → 4.0.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.
- package/LICENSE +21 -0
- package/MIGRATION.md +36 -0
- package/OWNERSHIP.md +32 -32
- package/README.md +405 -264
- package/_button.scss +6 -2
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/calendar-DJqiFwFT.js +258 -0
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
- package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
- package/_chunks/choice-chips-yr6Uzmof.js +126 -0
- package/_chunks/clock-BOhPNlW3.js +4 -0
- package/_chunks/color-palette-DMJUChWC.js +92 -0
- package/_chunks/{color-picker-BRv-__AM.js → color-picker-CMWxQlWt.js} +61 -56
- package/_chunks/component-DyWiItBR.js +878 -0
- package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BKd7U8OW.js} +0 -12
- package/_chunks/configurator-actions-DCodxcUw.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/control-CbOYUakE.js +118 -0
- package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
- package/_chunks/controls-DD1qvPfE.js +650 -0
- package/_chunks/{date-control-CYCkb1aQ.js → date-control-XI2cpKI_.js} +21 -21
- package/_chunks/date-time-CGJdC1Qa.js +807 -0
- package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
- package/_chunks/dialog.parts-CJ3FVxC9.js +131 -0
- package/_chunks/duration-CBJWK82T.js +272 -0
- package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-B-qtIwx1.js +288 -0
- package/_chunks/field-context-D57PnBbH.js +5 -0
- package/_chunks/framework-mount-Bk4O_T7T.js +54 -0
- package/_chunks/hooks.module-CG3gN83z.js +157 -0
- package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
- package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-C7i5gsKI.js +267 -0
- package/_chunks/native-Blr3byjO.js +32 -0
- package/_chunks/native-control-B9MNibfa.js +649 -0
- package/_chunks/{number-input-NnH57J4j.js → number-input-CgbZes5B.js} +89 -89
- package/_chunks/picker-DqpjDC90.js +122 -0
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/popup-C35Isk7p.js +378 -0
- package/_chunks/preact.module-BBM36DnO.js +290 -0
- package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-WDrfiluf.js} +10 -10
- package/_chunks/render-m5eMMwFR.js +83 -0
- package/_chunks/reorder-list-C4HSda4n.js +59 -0
- package/_chunks/request-trail-SHynDFdM.js +762 -0
- package/_chunks/rich-text-CtjqRvv8.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
- package/_chunks/selection-list-tooltips-BtWjpP6M.js +41 -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/_dialog.scss +55 -21
- package/_form.scss +71 -21
- package/_legend.scss +25 -7
- package/_shared/data-query/index.d.ts +2 -2
- package/_shared/data-query/load-options.d.ts +2 -2
- package/_variables.scss +34 -32
- 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/_view-switcher.scss +6 -0
- package/activity-message.d.ts +2 -2
- package/activity-message.js +16 -16
- package/ai/_chat.scss +227 -0
- package/ai/_style.scss +170 -39
- package/ai/chat.d.ts +65 -0
- package/ai/components.d.ts +35 -6
- package/ai/index.d.ts +3 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +59 -6
- package/ai/prompt-history.d.ts +13 -0
- package/ai/request-trail.d.ts +9 -3
- 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 +27 -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.d.ts +1 -1
- package/angular/angular.js +13 -10
- package/assignee/assignee.scss +28 -6
- 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/avatar.style.scss +23 -6
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +42 -41
- package/badge.d.ts +1 -1
- package/badge.view.d.ts +8 -0
- package/brush-range/_brush-range.scss +55 -49
- package/brush-range/component.d.ts +2 -4
- package/brush-range/component.js +19 -19
- package/buttons/delete-button.d.ts +2 -1
- package/buttons/delete-button.js +1 -1
- package/buttons/delete-button.style.scss +6 -2
- package/buttons/remove-button.d.ts +2 -2
- package/buttons/remove-button.js +3 -3
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +3 -2
- package/buttons/svg-button.js +23 -23
- package/calendar/_calendar.scss +27 -26
- 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 +34 -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/cell-input.scss +3 -7
- package/cell-visuals/badge.style.scss +6 -3
- package/cell-visuals/bar-chart.style.scss +2 -1
- package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
- package/cell-visuals/progress-line.style.scss +1 -4
- package/cell-visuals/sparkline.style.scss +2 -1
- package/cell-visuals/timeline.style.css +4 -2
- package/checkbox/checkbox.scss +6 -24
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.js +9 -9
- package/choice-chips/index.d.ts +4 -2
- 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-palette.style.scss +88 -25
- package/color-palette/color-picker.d.ts +1 -1
- package/color-palette/color-picker.js +2 -2
- package/color-palette/color-picker.style.scss +23 -10
- 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 +42 -29
- 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 +63 -0
- package/configurator-drop-zone.d.ts +39 -0
- package/configurator-drop-zone.js +66 -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-attributes.js +7 -7
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +31 -26
- package/controls.d.ts +23 -11
- package/controls.js +4 -3
- package/core/editor-commit.d.ts +1 -1
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +5 -1
- 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/selection-list-tooltips.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/date-control.d.ts +2 -2
- package/date-time/field.d.ts +4 -3
- package/date-time/index.js +1 -1
- package/date-time/picker.d.ts +1 -1
- package/date-time/style.scss +242 -39
- package/date-time/time-control.d.ts +1 -1
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +6 -2
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +53 -53
- 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/_distribution-chart.scss +113 -77
- 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 +2 -2
- 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 +5 -1
- package/dropdown/editor-dropdown.style.scss +54 -16
- package/dropdown/index.d.ts +1 -1
- package/dropdown/index.js +3 -4
- package/dropdown/lookup-field.d.ts +6 -1
- package/dropdown/lookup-field.js +42 -41
- package/dropdown/popup.d.ts +2 -2
- 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 +5 -5
- package/editor-layout/index.js +43 -38
- package/editor-layout/style.scss +82 -18
- package/field-configurator.d.ts +40 -2
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/field-reorder.hook.js +32 -32
- package/fieldset.d.ts +3 -0
- package/filter/filters/slider/_single-slider.scss +57 -38
- package/filter/filters/slider/_slider.scss +41 -33
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/preact.js +3 -3
- package/filter/filters/slider/runtime.js +49 -22
- 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 -2
- package/filter-controls.js +29 -30
- package/form-controls/field-context.d.ts +5 -0
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +17 -22
- package/form-controls/presentation.d.ts +2 -2
- package/form-controls/presentation.js +59 -51
- package/formatting/comparison-preview.d.ts +1 -1
- package/formatting/icon-controls.d.ts +1 -1
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +106 -100
- package/formatting/inspector-section.d.ts +1 -1
- package/formatting/styles.scss +14 -57
- package/formatting/typography-controls.d.ts +1 -1
- package/framework-mount.d.ts +1 -1
- package/framework.js +237 -226
- package/history-controls.d.ts +14 -0
- package/history-controls.js +27 -0
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/icons/icon.d.ts +2 -2
- package/icons/icon.js +1 -1
- package/legend.d.ts +2 -2
- 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 -13
- package/native-control.js +3 -26
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native-styles.scss +6 -2
- package/native.d.ts +3 -3
- package/native.js +49 -45
- package/number-input/index.d.ts +2 -2
- package/number-input/index.js +1 -1
- package/package.json +88 -15
- package/pagination.d.ts +3 -0
- package/pagination.js +50 -40
- package/pdf-viewer/component.d.ts +1 -1
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/header.d.ts +2 -2
- package/pdf-viewer/index.d.ts +2 -2
- package/pdf-viewer/index.js +13 -13
- package/pdf-viewer/search-bar.d.ts +2 -2
- package/pdf-viewer/status.d.ts +2 -2
- package/pdf-viewer/style.scss +205 -45
- package/pdf-viewer/toolbar.d.ts +1 -1
- package/pickers.d.ts +6 -2
- package/preact-mount.d.ts +1 -1
- package/preact-mount.js +2 -2
- package/preact.d.ts +15 -10
- package/preact.js +109 -64
- package/progress/_bar.scss +9 -3
- package/progress/_circular.scss +2 -1
- package/rating-choice.d.ts +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +5 -3
- package/react-control.d.ts +1 -0
- package/react.d.ts +20 -11
- package/react.js +72 -88
- package/reorder-list.d.ts +2 -2
- package/reorder-list.js +1 -1
- package/reorder-list.scss +59 -17
- 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 +68 -66
- package/resource-picker/resource-picker.scss +66 -35
- package/rich-text/engine.d.ts +17 -19
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +11 -7
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +6 -3
- package/rich-text/render-model.d.ts +4 -5
- package/rich-text/style.scss +295 -55
- package/rich-text/syntax.d.ts +5 -2
- package/rich-text/toolbar.d.ts +7 -7
- package/rich-text/translations.d.ts +5 -15
- package/search-input/index.js +12 -12
- package/search-input/native.d.ts +21 -2
- package/segmented-switch/index.d.ts +1 -1
- package/segmented-switch/index.js +1 -1
- package/select.d.ts +22 -0
- package/select.js +1 -0
- package/selection-list.d.ts +1 -0
- package/selection-list.js +3 -1
- package/status-feedback/exit-snapshot.js +1 -1
- package/status-feedback/index.js +2 -2
- package/status-feedback/popover.js +9 -9
- package/status-feedback/render.d.ts +2 -2
- package/status-feedback/render.js +3 -44
- package/status-feedback/status-feedback.scss +130 -34
- package/status-feedback/types.d.ts +4 -0
- package/status-feedback/use-auto-dismiss.d.ts +3 -0
- package/styles/_activity-message.scss +24 -7
- package/styles/_alert.scss +78 -17
- package/styles/_cell-editor-frame.scss +11 -0
- package/styles/_compositions.scss +404 -82
- package/styles/_control.scss +42 -12
- package/styles/_disclosure.scss +15 -5
- package/styles/_editor-counter.scss +16 -6
- package/styles/_editor-slider.scss +8 -4
- package/styles/_field-configurator.scss +321 -23
- package/styles/_fields-grid.scss +49 -0
- package/styles/_filter-controls.scss +10 -2
- package/styles/_icon-action.scss +48 -15
- package/styles/_loading.scss +12 -3
- package/styles/_motion.scss +32 -9
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +376 -116
- package/styles/_theme.scss +130 -86
- package/styles/_thresholds.scss +28 -25
- package/styles/_time-grid.scss +8 -3
- package/styles/_tokens.scss +6 -1
- package/styles/configurator-actions.scss +241 -0
- package/styles/pagination.css +213 -0
- package/styles/{legacy-rating.css → rating.css} +8 -3
- package/styles.css +1 -1
- package/styles.scss +3 -5
- package/surfaces.d.ts +38 -2
- package/surfaces.js +37 -134
- package/svelte/UiComponent.server.js +1 -48
- package/svelte/UiComponent.svelte +44 -32
- package/svelte.d.ts +1 -1
- package/svelte.js +33 -68
- package/switch/index.js +3 -2
- package/time-grid.d.ts +1 -2
- package/time-grid.js +43 -42
- package/timeline-track/_style.scss +96 -24
- 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/view-switcher.d.ts +23 -0
- package/vue-adapter.d.ts +1 -1
- package/vue.d.ts +160 -144
- package/vue.js +149 -178
- 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-palette-BmZ7kH9R.js +0 -94
- package/_chunks/component-D4PH5UZT.js +0 -859
- package/_chunks/control-tooltip-BCNzQCXE.js +0 -100
- package/_chunks/controls-NEL5tDaz.js +0 -615
- 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/editor-popup-B7fu_A_T.js +0 -81
- 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/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 -12
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/react-native-select.d.ts +0 -6
- package/search-input/native.view.d.ts +0 -21
- package/styles/legacy-pagination.css +0 -112
- package/surfaces.view.d.ts +0 -63
- package/vue-native-select.d.ts +0 -9
package/field-reorder.hook.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as e, r as t, t as n } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
import { fieldDropIndex as r, fieldListDropIndex as i, reorderFields as a } from "./field-reorder.js";
|
|
3
3
|
//#region src/field-reorder.hook.ts
|
|
4
|
-
function o(
|
|
5
|
-
let s =
|
|
6
|
-
count:
|
|
4
|
+
function o(a, o) {
|
|
5
|
+
let s = n({
|
|
6
|
+
count: a,
|
|
7
7
|
...o
|
|
8
8
|
});
|
|
9
9
|
s.current = {
|
|
10
|
-
count:
|
|
10
|
+
count: a,
|
|
11
11
|
...o
|
|
12
12
|
};
|
|
13
|
-
let c =
|
|
13
|
+
let c = n(null), l = n(null), [u, d] = e(null), f = () => {
|
|
14
14
|
c.current = null, l.current = null, d(null);
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
t(() => {
|
|
17
17
|
(o.enabled === !1 || o.active === !1) && f();
|
|
18
18
|
}, [o.enabled, o.active]);
|
|
19
|
-
let p = (e) => s.current.enabled !== !1 && (s.current.canDrop?.(e) ?? !0), m = (
|
|
20
|
-
let
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
return e
|
|
19
|
+
let p = (e) => s.current.enabled !== !1 && (s.current.canDrop?.(e) ?? !0), m = (e, t) => {
|
|
20
|
+
let n = e.currentTarget;
|
|
21
|
+
if (t !== void 0) {
|
|
22
|
+
let i = n.getBoundingClientRect();
|
|
23
|
+
return r(e.clientY, i.top, i.height, t, l.current);
|
|
24
24
|
}
|
|
25
|
-
let a = Array.from(
|
|
26
|
-
return
|
|
25
|
+
let a = Array.from(n.querySelectorAll(":scope > .rv-configurator-field-row, :scope > .rv-configurator-field-list > .rv-configurator-field-row"));
|
|
26
|
+
return i(e.clientY, a.map((e) => e.getBoundingClientRect()), l.current, s.current.count);
|
|
27
27
|
}, h = (e, t, n) => {
|
|
28
28
|
p(e) ? (e.preventDefault(), e.stopPropagation(), l.current = n ?? m(e, t), d(l.current), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), s.current.onDragOver?.(e)) : (l.current = null, d(null));
|
|
29
29
|
}, g = (e, t, n) => {
|
|
@@ -37,7 +37,7 @@ function o(n, o) {
|
|
|
37
37
|
}, _ = (e) => {
|
|
38
38
|
if (u !== null && (c.current === null || u !== c.current && u !== c.current + 1)) {
|
|
39
39
|
if (u === e) return "before";
|
|
40
|
-
if (u ===
|
|
40
|
+
if (u === a && e === a - 1) return "after";
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
return {
|
|
@@ -67,41 +67,41 @@ function o(n, o) {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function s(
|
|
71
|
-
let l =
|
|
72
|
-
items:
|
|
73
|
-
onChange:
|
|
70
|
+
function s(r, i, s = !0, c = {}) {
|
|
71
|
+
let l = n({
|
|
72
|
+
items: r,
|
|
73
|
+
onChange: i,
|
|
74
74
|
enabled: s,
|
|
75
75
|
...c
|
|
76
76
|
});
|
|
77
77
|
l.current = {
|
|
78
|
-
items:
|
|
79
|
-
onChange:
|
|
78
|
+
items: r,
|
|
79
|
+
onChange: i,
|
|
80
80
|
enabled: s,
|
|
81
81
|
...c
|
|
82
82
|
};
|
|
83
|
-
let [u, d] =
|
|
83
|
+
let [u, d] = e(null), f = n(null), p = () => {
|
|
84
84
|
let e = f.current, t = l.current;
|
|
85
85
|
return !e || !t.enabled || e.items.length !== t.items.length || e.items.some((e, n) => e !== t.items[n]) ? (f.current = null, null) : e;
|
|
86
|
-
}, m = o(
|
|
86
|
+
}, m = o(r.length, {
|
|
87
87
|
enabled: s,
|
|
88
88
|
canDrop: () => !!p(),
|
|
89
89
|
onDrop(e) {
|
|
90
90
|
let t = p();
|
|
91
91
|
if (!t) return;
|
|
92
92
|
f.current = null, d(null);
|
|
93
|
-
let
|
|
94
|
-
|
|
93
|
+
let n = a(l.current.items, t.from, e);
|
|
94
|
+
n !== l.current.items && (l.current.onChange(n), l.current.onMove?.(t.items[t.from]));
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
|
-
|
|
97
|
+
t(() => {
|
|
98
98
|
p() || (m.clear(), d(null));
|
|
99
|
-
}, [
|
|
99
|
+
}, [r, s]);
|
|
100
100
|
let h = (e, t) => {
|
|
101
|
-
let
|
|
102
|
-
if (!
|
|
103
|
-
let
|
|
104
|
-
|
|
101
|
+
let n = l.current;
|
|
102
|
+
if (!n.enabled) return;
|
|
103
|
+
let r = a(n.items, e, t);
|
|
104
|
+
r !== n.items && (n.onChange(r), n.onMove?.(n.items[e]));
|
|
105
105
|
};
|
|
106
106
|
return {
|
|
107
107
|
move: h,
|
package/fieldset.d.ts
ADDED
|
@@ -1,45 +1,64 @@
|
|
|
1
1
|
/** One scalar thumb/track presentation for native, Stencil and Preact consumers. */
|
|
2
2
|
@mixin presentation {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
appearance: none;
|
|
4
|
+
position: static;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: var(--slider-thumb-size, 20px);
|
|
7
|
+
margin: 0;
|
|
8
|
+
border: 0;
|
|
9
|
+
border-radius: 0;
|
|
10
|
+
background: linear-gradient(
|
|
11
11
|
to right,
|
|
12
|
-
var(--range-color, var(--rv-ui-accent)) 0
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
var(--range-color, var(--rv-ui-accent)) 0
|
|
13
|
+
var(--rv-single-slider-value, 0%),
|
|
14
|
+
var(--slider-color, var(--rv-ui-border)) var(--rv-single-slider-value, 0%)
|
|
15
|
+
100%
|
|
16
|
+
)
|
|
17
|
+
center / 100% var(--slider-track-height, 4px) no-repeat;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
pointer-events: auto;
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
border-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
&::-webkit-slider-thumb {
|
|
22
|
+
appearance: none;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
width: var(--slider-thumb-size, 20px);
|
|
25
|
+
height: var(--slider-thumb-size, 20px);
|
|
26
|
+
border: 3px solid
|
|
27
|
+
var(--slider-thumb-border, var(--range-color, var(--rv-ui-accent)));
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
background: var(
|
|
30
|
+
--slider-thumb-bg,
|
|
31
|
+
var(--revo-grid-filter-control-thumb-bg, var(--rv-ui-surface))
|
|
32
|
+
);
|
|
33
|
+
box-shadow: 0 1px 3px var(--rv-ui-shadow);
|
|
34
|
+
transition: box-shadow var(--rv-ui-motion-fast, 120ms)
|
|
35
|
+
var(--rv-ui-motion-ease, ease);
|
|
36
|
+
pointer-events: all;
|
|
37
|
+
}
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
border-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
&::-moz-range-thumb {
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
width: var(--slider-thumb-size, 20px);
|
|
42
|
+
height: var(--slider-thumb-size, 20px);
|
|
43
|
+
border: 3px solid
|
|
44
|
+
var(--slider-thumb-border, var(--range-color, var(--rv-ui-accent)));
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
background: var(
|
|
47
|
+
--slider-thumb-bg,
|
|
48
|
+
var(--revo-grid-filter-control-thumb-bg, var(--rv-ui-surface))
|
|
49
|
+
);
|
|
50
|
+
box-shadow: 0 1px 3px var(--rv-ui-shadow);
|
|
51
|
+
transition: box-shadow var(--rv-ui-motion-fast, 120ms)
|
|
52
|
+
var(--rv-ui-motion-ease, ease);
|
|
53
|
+
pointer-events: all;
|
|
54
|
+
}
|
|
42
55
|
|
|
43
|
-
&:disabled {
|
|
44
|
-
|
|
56
|
+
&:disabled {
|
|
57
|
+
opacity: 0.55;
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
}
|
|
60
|
+
&:focus-visible {
|
|
61
|
+
outline: 2px solid var(--range-color, var(--rv-ui-accent));
|
|
62
|
+
outline-offset: 2px;
|
|
63
|
+
}
|
|
45
64
|
}
|
|
@@ -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);
|
|
@@ -72,7 +55,11 @@
|
|
|
72
55
|
top: 0;
|
|
73
56
|
margin: 0;
|
|
74
57
|
border-radius: 999px;
|
|
75
|
-
background: linear-gradient(
|
|
58
|
+
background: linear-gradient(
|
|
59
|
+
var(--slider-color, var(--rv-ui-border)),
|
|
60
|
+
var(--slider-color, var(--rv-ui-border))
|
|
61
|
+
)
|
|
62
|
+
center / 100% 4px no-repeat;
|
|
76
63
|
pointer-events: none;
|
|
77
64
|
|
|
78
65
|
&:focus-visible {
|
|
@@ -85,41 +72,59 @@
|
|
|
85
72
|
z-index: 1;
|
|
86
73
|
}
|
|
87
74
|
|
|
88
|
-
$size: 24px;
|
|
89
|
-
|
|
90
75
|
&::-webkit-slider-thumb {
|
|
91
76
|
-webkit-appearance: none;
|
|
92
77
|
pointer-events: all;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
width: var(--slider-thumb-size, 20px);
|
|
80
|
+
height: var(--slider-thumb-size, 20px);
|
|
81
|
+
background-color: var(
|
|
82
|
+
--revo-grid-filter-control-thumb-bg,
|
|
83
|
+
var(--rv-ui-surface)
|
|
84
|
+
);
|
|
85
|
+
border: var(--slider-thumb-border-width, 3px) solid
|
|
86
|
+
var(--range-color, var(--rv-ui-accent));
|
|
97
87
|
border-radius: 50%;
|
|
98
88
|
box-shadow: 0 1px 3px var(--rv-ui-shadow);
|
|
99
|
-
transition: box-shadow var(--rv-ui-motion-fast, 120ms)
|
|
89
|
+
transition: box-shadow var(--rv-ui-motion-fast, 120ms)
|
|
90
|
+
var(--rv-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1));
|
|
100
91
|
cursor: pointer;
|
|
101
92
|
|
|
102
93
|
&:hover {
|
|
103
|
-
background: var(
|
|
94
|
+
background: var(
|
|
95
|
+
--revo-grid-filter-control-thumb-bg,
|
|
96
|
+
var(--rv-ui-surface)
|
|
97
|
+
);
|
|
104
98
|
}
|
|
105
99
|
|
|
106
100
|
&:active {
|
|
107
101
|
box-shadow:
|
|
108
102
|
0 1px 3px var(--rv-ui-shadow),
|
|
109
|
-
0 0 0 4px
|
|
103
|
+
0 0 0 4px
|
|
104
|
+
color-mix(
|
|
105
|
+
in srgb,
|
|
106
|
+
var(--range-color, var(--rv-ui-accent)) 18%,
|
|
107
|
+
transparent
|
|
108
|
+
);
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
&::-moz-range-thumb {
|
|
114
113
|
-webkit-appearance: none;
|
|
115
114
|
pointer-events: all;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
width: var(--slider-thumb-size, 20px);
|
|
117
|
+
height: var(--slider-thumb-size, 20px);
|
|
118
|
+
background-color: var(
|
|
119
|
+
--revo-grid-filter-control-thumb-bg,
|
|
120
|
+
var(--rv-ui-surface)
|
|
121
|
+
);
|
|
122
|
+
border: var(--slider-thumb-border-width, 3px) solid
|
|
123
|
+
var(--range-color, var(--rv-ui-accent));
|
|
120
124
|
border-radius: 50%;
|
|
121
125
|
box-shadow: 0 1px 3px var(--rv-ui-shadow);
|
|
122
|
-
transition: box-shadow var(--rv-ui-motion-fast, 120ms)
|
|
126
|
+
transition: box-shadow var(--rv-ui-motion-fast, 120ms)
|
|
127
|
+
var(--rv-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1));
|
|
123
128
|
cursor: pointer;
|
|
124
129
|
}
|
|
125
130
|
}
|
|
@@ -129,4 +134,7 @@
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
|
|
132
|
-
.rv-single-slider:disabled {
|
|
137
|
+
.rv-single-slider:disabled {
|
|
138
|
+
opacity: 0.55;
|
|
139
|
+
cursor: not-allowed;
|
|
140
|
+
}
|
|
@@ -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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as e } from "../../../_chunks/preact.module-BBM36DnO.js";
|
|
2
|
+
import { renderRangeSlider as t } from "./component.js";
|
|
3
3
|
//#region src/filter/filters/slider/preact.tsx
|
|
4
4
|
function n(n) {
|
|
5
|
-
return e
|
|
5
|
+
return t(e, n);
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as PreactRangeSlider };
|
|
@@ -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,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "../../../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { n as t } from "../../../_chunks/native-control-B9MNibfa.js";
|
|
3
3
|
//#region src/filter/filters/slider/single.tsx
|
|
4
|
-
function
|
|
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;
|
|
6
|
-
return /* @__PURE__ */ t
|
|
6
|
+
return /* @__PURE__ */ e(t, {
|
|
7
7
|
class: `rv-single-slider ${c}`.trim(),
|
|
8
8
|
id: s,
|
|
9
9
|
type: "range",
|
|
@@ -21,43 +21,43 @@ function r({ min: n, max: r, value: i, step: a = 1, disabled: o = !1, id: s, cla
|
|
|
21
21
|
onChange: (e) => p?.(Number(e.currentTarget.value), e)
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
class: `rv-slider-field rv-slider-field--${
|
|
28
|
-
style:
|
|
24
|
+
function r({ label: t, layout: r = "inline", valuePlacement: i = "end", formatValue: a = String, ticks: o, accentColor: s, ...c }) {
|
|
25
|
+
let l = a(c.value), u = c.max > c.min ? Math.max(0, Math.min(100, (c.value - c.min) / (c.max - c.min) * 100)) : 0, d = o && Number.isFinite(o) ? Math.max(2, Math.min(101, Math.floor(o))) : 0;
|
|
26
|
+
return /* @__PURE__ */ e("label", {
|
|
27
|
+
class: `rv-slider-field rv-slider-field--${r} rv-slider-field--${i}${c.disabled ? " is-disabled" : ""}`,
|
|
28
|
+
style: s ? { "--rv-slider-field-accent": s } : void 0,
|
|
29
29
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ e("span", {
|
|
31
31
|
class: "rv-slider-field__label",
|
|
32
|
-
children:
|
|
32
|
+
children: t
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ e("span", {
|
|
35
35
|
class: "rv-slider-field__track",
|
|
36
|
-
style: { "--rv-slider-field-position": `${
|
|
36
|
+
style: { "--rv-slider-field-position": `${u / 100}` },
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
...
|
|
40
|
-
ariaValueText:
|
|
38
|
+
/* @__PURE__ */ e(n, {
|
|
39
|
+
...c,
|
|
40
|
+
ariaValueText: c.ariaValueText ?? l
|
|
41
41
|
}),
|
|
42
|
-
|
|
42
|
+
d > 0 && /* @__PURE__ */ e("span", {
|
|
43
43
|
class: "rv-slider-field__ticks",
|
|
44
44
|
"aria-hidden": "true",
|
|
45
|
-
children: Array.from({ length:
|
|
45
|
+
children: Array.from({ length: d }, (t, n) => /* @__PURE__ */ e("i", {}, n))
|
|
46
46
|
}),
|
|
47
|
-
|
|
47
|
+
i === "thumb" && /* @__PURE__ */ e("span", {
|
|
48
48
|
class: "rv-slider-field__thumb-value",
|
|
49
49
|
"aria-hidden": "true",
|
|
50
|
-
children:
|
|
50
|
+
children: l
|
|
51
51
|
})
|
|
52
52
|
]
|
|
53
53
|
}),
|
|
54
|
-
|
|
54
|
+
i === "end" && /* @__PURE__ */ e("span", {
|
|
55
55
|
class: "rv-slider-field__value rv-badge rv-badge--inline",
|
|
56
56
|
"aria-hidden": "true",
|
|
57
|
-
children:
|
|
57
|
+
children: l
|
|
58
58
|
})
|
|
59
59
|
]
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
|
-
export {
|
|
63
|
+
export { n as SingleValueSlider, r as SliderField };
|
package/filter-badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ComponentChildren, JSX } from 'preact';
|
|
1
|
+
import { h, ComponentChildren, JSX } from './_vendor/preact/src/index';
|
|
2
2
|
import { FilterChipProps } from './form-controls/presentation';
|
|
3
3
|
/** Shared click-only details action; consumers provide localized labels. */
|
|
4
4
|
export declare function FilterBadgeInfoButton(props: Omit<JSX.IntrinsicElements['button'], 'children'>): h.JSX.Element;
|
package/filter-badge.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
|
|
2
|
+
import { a as t } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
3
|
+
import { t as n } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
+
import { n as r, t as i } from "./_chunks/choice-chips-yr6Uzmof.js";
|
|
4
5
|
//#region src/filter-badge.tsx
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
...
|
|
6
|
+
function a(e) {
|
|
7
|
+
return /* @__PURE__ */ n(r, {
|
|
8
|
+
...e,
|
|
8
9
|
type: "button",
|
|
9
|
-
class: `rv-filter-badge-info ${
|
|
10
|
+
class: `rv-filter-badge-info ${e.className ?? e.class ?? ""}`.trim()
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
return /* @__PURE__ */ i
|
|
15
|
-
...
|
|
13
|
+
function o({ label: r, details: o, detailsLabel: s, descriptionId: c, className: l = "", ...u }) {
|
|
14
|
+
let d = t(), f = c ?? `rv-filter-badge-${d}`;
|
|
15
|
+
return /* @__PURE__ */ n(i, {
|
|
16
|
+
...u,
|
|
16
17
|
selected: !0,
|
|
17
|
-
className: `rv-filter-badge ${
|
|
18
|
-
info:
|
|
19
|
-
"aria-label":
|
|
20
|
-
"aria-describedby":
|
|
21
|
-
"data-tooltip":
|
|
18
|
+
className: `rv-filter-badge ${l}`.trim(),
|
|
19
|
+
info: o ? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n(a, {
|
|
20
|
+
"aria-label": s,
|
|
21
|
+
"aria-describedby": f,
|
|
22
|
+
"data-tooltip": o,
|
|
22
23
|
"tooltip-position": "bottom"
|
|
23
|
-
}), /* @__PURE__ */
|
|
24
|
+
}), /* @__PURE__ */ n("span", {
|
|
24
25
|
class: "rv-filter-badge-description",
|
|
25
|
-
id:
|
|
26
|
-
children:
|
|
26
|
+
id: f,
|
|
27
|
+
children: o
|
|
27
28
|
})] }) : void 0,
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
+
children: /* @__PURE__ */ n("span", {
|
|
29
30
|
class: "rv-filter-badge-label",
|
|
30
|
-
children:
|
|
31
|
+
children: r
|
|
31
32
|
})
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
//#endregion
|
|
35
|
-
export {
|
|
36
|
+
export { o as FilterBadge, a as FilterBadgeInfoButton };
|
package/filter-controls.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ComponentChildren, JSX } from 'preact';
|
|
1
|
+
import { h, ComponentChildren, JSX } from './_vendor/preact/src/index';
|
|
2
2
|
/** A selected action with a trailing, caller-formatted summary. */
|
|
3
3
|
export declare function OptionButton({ label, detail, selected, className, detailClassName, ...props }: Omit<JSX.IntrinsicElements['button'], 'className' | 'children'> & {
|
|
4
4
|
label: ComponentChildren;
|
|
@@ -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;
|