@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/styles.scss
CHANGED
|
@@ -21,12 +21,9 @@
|
|
|
21
21
|
@use './styles/editor-slider';
|
|
22
22
|
@use './styles/editor-counter';
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
24
|
@use './progress/circular';
|
|
27
|
-
@use './styles/
|
|
28
|
-
@use './styles/
|
|
29
|
-
|
|
25
|
+
@use './styles/rating.css';
|
|
26
|
+
@use './styles/pagination.css';
|
|
30
27
|
|
|
31
28
|
@use './distribution-chart/distribution-chart';
|
|
32
29
|
@use './brush-range/brush-range';
|
|
@@ -40,6 +37,7 @@
|
|
|
40
37
|
@use './styles/activity-message';
|
|
41
38
|
@use './styles/motion';
|
|
42
39
|
|
|
40
|
+
@use './view-switcher';
|
|
43
41
|
|
|
44
42
|
@include slider.styles;
|
|
45
43
|
|
package/surfaces.d.ts
CHANGED
|
@@ -1,2 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import { DialogHandle, DialogOpenOptions } from './dialog/dialog.types';
|
|
2
|
+
export interface DialogEnvironment {
|
|
3
|
+
beforeMount?: (root: HTMLElement) => void;
|
|
4
|
+
onOpen?: (options: DialogOpenOptions) => void;
|
|
5
|
+
restoreFocus?: (explicit?: HTMLElement, previous?: HTMLElement) => void;
|
|
6
|
+
}
|
|
7
|
+
/** Standalone modal lifecycle. Integration hooks belong to the host application. */
|
|
8
|
+
export declare class DialogController {
|
|
9
|
+
private readonly document;
|
|
10
|
+
private readonly environment;
|
|
11
|
+
private active?;
|
|
12
|
+
constructor(document: Document, environment?: DialogEnvironment);
|
|
13
|
+
get isOpen(): boolean;
|
|
14
|
+
open(options: DialogOpenOptions): DialogHandle;
|
|
15
|
+
close(root?: HTMLElement): void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
18
|
+
export { PopoverController, TooltipController, createTooltipElement, type PopoverOptions, } from './core/popover-controller';
|
|
19
|
+
/** Keyboard behavior for menu surfaces; activation stays on native buttons. */
|
|
20
|
+
export declare function attachMenuKeyboard(menu: HTMLElement, onClose?: () => void, options?: {
|
|
21
|
+
closeOnEscape?: boolean;
|
|
22
|
+
}): () => void;
|
|
23
|
+
export interface ResizeOptions {
|
|
24
|
+
value: number;
|
|
25
|
+
min?: number;
|
|
26
|
+
max?: number;
|
|
27
|
+
step?: number;
|
|
28
|
+
label: string;
|
|
29
|
+
/** Rejects a proposed width without changing the handle's current value. */
|
|
30
|
+
acceptValue?: (value: number) => boolean;
|
|
31
|
+
onChange: (value: number) => void;
|
|
32
|
+
direction?: 'ltr' | 'rtl';
|
|
33
|
+
}
|
|
34
|
+
/** Width resize controller. An options reader keeps controlled updates from interrupting a drag. */
|
|
35
|
+
export declare function attachResizeHandle(handle: HTMLElement, options: ResizeOptions | (() => ResizeOptions)): () => void;
|
|
36
|
+
export { useTooltip, ControlTooltip } from './core/tooltip';
|
|
37
|
+
export { prepareTooltipSurface, ensureTooltipStyles, } from './core/tooltip-surface';
|
|
38
|
+
export { TooltipText } from './core/tooltip-text';
|
package/surfaces.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { createDialogElements as
|
|
7
|
-
import { attachDialogDrag as
|
|
8
|
-
import {
|
|
9
|
-
//#region src/surfaces.
|
|
10
|
-
var
|
|
1
|
+
import { releasePreactElement as e } from "./preact-mount.js";
|
|
2
|
+
import { c as t, s as n } from "./_chunks/top-layer-popup-CNSDdfJV.js";
|
|
3
|
+
import { inheritUiMotion as r } from "./core/motion.js";
|
|
4
|
+
import { n as i, r as a, t as o } from "./_chunks/popover-controller-D-AvKQ7B.js";
|
|
5
|
+
import { r as s, t as c } from "./_chunks/tooltip-D4xkio5G.js";
|
|
6
|
+
import { createDialogElements as l, getDialogFocusableElements as u, trapDialogFocus as d } from "./dialog/dialog.dom.js";
|
|
7
|
+
import { attachDialogDrag as f } from "./dialog/dialog.drag.js";
|
|
8
|
+
import { t as p } from "./_chunks/tooltip-text-BXsUEmBH.js";
|
|
9
|
+
//#region src/surfaces.tsx
|
|
10
|
+
var m = /* @__PURE__ */ new WeakMap(), h = class {
|
|
11
11
|
document;
|
|
12
12
|
environment;
|
|
13
13
|
active;
|
|
@@ -17,33 +17,33 @@ var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = cl
|
|
|
17
17
|
get isOpen() {
|
|
18
18
|
return !!this.active;
|
|
19
19
|
}
|
|
20
|
-
open(
|
|
20
|
+
open(t) {
|
|
21
21
|
this.close();
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
let
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
|
|
22
|
+
let n = this.document, i = n.activeElement, a = !1, o, s, c = m.get(n) ?? [];
|
|
23
|
+
m.set(n, c);
|
|
24
|
+
let p = () => {
|
|
25
|
+
if (a) return;
|
|
26
|
+
a = !0, o?.(), s?.(), e(h.root);
|
|
27
|
+
let n = c.indexOf(h.root), r = n === c.length - 1;
|
|
28
|
+
n !== -1 && c.splice(n, 1), this.active?.root === h.root && (this.active = void 0);
|
|
29
29
|
try {
|
|
30
|
-
|
|
30
|
+
t.onClose?.();
|
|
31
31
|
} finally {
|
|
32
|
-
|
|
32
|
+
r && (this.environment.restoreFocus ? this.environment.restoreFocus(t.returnFocus, i ?? void 0) : [t.returnFocus, i].find((e) => e?.isConnected)?.focus?.({ preventScroll: !0 }));
|
|
33
33
|
}
|
|
34
|
-
}, h =
|
|
34
|
+
}, h = l(n, t, p), g = {
|
|
35
35
|
...h,
|
|
36
|
-
close:
|
|
36
|
+
close: p
|
|
37
37
|
};
|
|
38
|
-
return this.environment.beforeMount?.(h.root),
|
|
39
|
-
e.target === h.root &&
|
|
38
|
+
return this.environment.beforeMount?.(h.root), s = r(t.returnFocus ?? i, h.root), h.root.addEventListener("mousedown", (e) => {
|
|
39
|
+
e.target === h.root && c.at(-1) === h.root && p();
|
|
40
40
|
}), h.root.addEventListener("keydown", (e) => {
|
|
41
|
-
|
|
42
|
-
}),
|
|
41
|
+
c.at(-1) === h.root && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), p()) : e.key === "Tab" && d(h.root, e));
|
|
42
|
+
}), n.body.append(h.root), c.push(h.root), t.draggable !== !1 && (o = f({
|
|
43
43
|
target: h.surface,
|
|
44
44
|
handle: h.header
|
|
45
|
-
})), this.active = g, this.environment.onOpen?.(
|
|
46
|
-
!
|
|
45
|
+
})), this.active = g, this.environment.onOpen?.(t), queueMicrotask(() => {
|
|
46
|
+
!a && c.at(-1) === h.root && (u(h.root)[0] ?? h.root).focus({ preventScroll: !0 });
|
|
47
47
|
}), g;
|
|
48
48
|
}
|
|
49
49
|
close(e) {
|
|
@@ -52,123 +52,26 @@ var f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = cl
|
|
|
52
52
|
destroy() {
|
|
53
53
|
this.close();
|
|
54
54
|
}
|
|
55
|
-
}, h = class {
|
|
56
|
-
active;
|
|
57
|
-
get isOpen() {
|
|
58
|
-
return !!this.active;
|
|
59
|
-
}
|
|
60
|
-
open(t) {
|
|
61
|
-
this.close(!1);
|
|
62
|
-
let { anchor: n, content: r } = t, s = n.ownerDocument, c = s.defaultView, l = f.get(s) ?? [];
|
|
63
|
-
f.set(s, l);
|
|
64
|
-
let u = r.parentNode, d = r.nextSibling, p = r.hidden, m = r.getAttribute("style"), h = r.getAttribute("popover"), g = o(n, r), _ = () => {
|
|
65
|
-
if (!n.isConnected) {
|
|
66
|
-
b(!1);
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
let t = e(n.getBoundingClientRect(), r.getBoundingClientRect(), {
|
|
70
|
-
width: s.documentElement.clientWidth || c?.innerWidth || 0,
|
|
71
|
-
height: s.documentElement.clientHeight || c?.innerHeight || 0
|
|
72
|
-
});
|
|
73
|
-
Object.assign(r.style, {
|
|
74
|
-
left: `${t.left}px`,
|
|
75
|
-
top: `${t.top}px`
|
|
76
|
-
});
|
|
77
|
-
}, v, y = !1, b = (e = t.restoreFocus !== !1) => {
|
|
78
|
-
if (y) return;
|
|
79
|
-
y = !0, s.removeEventListener("pointerdown", x, !0), s.removeEventListener("keydown", S), c?.removeEventListener("resize", _), s.removeEventListener("scroll", _, !0), C?.disconnect();
|
|
80
|
-
let a = l.indexOf(r);
|
|
81
|
-
a !== -1 && l.splice(a, 1), i(r, v), g(), u?.isConnected ? u.insertBefore(r, d?.parentNode === u ? d : null) : r.remove(), m === null ? r.removeAttribute("style") : r.setAttribute("style", m), r.hidden = p, h === null ? r.removeAttribute("popover") : r.setAttribute("popover", h), this.active?.content === r && (this.active = void 0), e && n.isConnected && n.focus({ preventScroll: !0 }), t.onClose?.();
|
|
82
|
-
}, x = (e) => {
|
|
83
|
-
if (l.at(-1) !== r) return;
|
|
84
|
-
let i = e.composedPath();
|
|
85
|
-
t.closeOnOutside !== !1 && !i.includes(n) && !i.includes(r) && b(!1);
|
|
86
|
-
}, S = (e) => {
|
|
87
|
-
l.at(-1) === r && e.key === "Escape" && t.closeOnEscape !== !1 && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), b());
|
|
88
|
-
};
|
|
89
|
-
(t.appendTo ?? s.body).append(r), r.hidden = !1, Object.assign(r.style, {
|
|
90
|
-
position: "fixed",
|
|
91
|
-
inset: "auto",
|
|
92
|
-
margin: "0"
|
|
93
|
-
}), v = a(r, t.display ?? "block");
|
|
94
|
-
let C = c?.ResizeObserver ? new c.ResizeObserver(_) : void 0;
|
|
95
|
-
return C?.observe(n), C?.observe(r), this.active = {
|
|
96
|
-
content: r,
|
|
97
|
-
close: b,
|
|
98
|
-
position: _
|
|
99
|
-
}, l.push(r), s.addEventListener("pointerdown", x, !0), s.addEventListener("keydown", S), c?.addEventListener("resize", _), s.addEventListener("scroll", _, !0), _(), {
|
|
100
|
-
close: b,
|
|
101
|
-
refresh: _
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
refresh() {
|
|
105
|
-
this.active?.position();
|
|
106
|
-
}
|
|
107
|
-
close(e) {
|
|
108
|
-
this.active?.close(e);
|
|
109
|
-
}
|
|
110
|
-
destroy() {
|
|
111
|
-
this.close(!1);
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
function g(e, n = "grid-tooltip") {
|
|
115
|
-
return t(e, /* @__PURE__ */ d("div", {
|
|
116
|
-
id: r("rv-tooltip"),
|
|
117
|
-
class: n,
|
|
118
|
-
role: "tooltip",
|
|
119
|
-
hidden: !0
|
|
120
|
-
}));
|
|
121
|
-
}
|
|
122
|
-
var _ = /* @__PURE__ */ new WeakMap(), v = class {
|
|
123
|
-
popover = new h();
|
|
124
|
-
release;
|
|
125
|
-
bind(e, t, r = {}) {
|
|
126
|
-
this.destroy();
|
|
127
|
-
let i = g(e.ownerDocument, "rv-tooltip");
|
|
128
|
-
i.textContent = t;
|
|
129
|
-
let a = () => {
|
|
130
|
-
_.get(e.ownerDocument) === o && _.delete(e.ownerDocument);
|
|
131
|
-
}, o = () => {
|
|
132
|
-
a(), this.popover.close(!1), i.hidden = !0, e.setAttribute("aria-describedby", s ?? ""), s === null && e.removeAttribute("aria-describedby");
|
|
133
|
-
}, s = e.getAttribute("aria-describedby"), c = r.trigger === "click", l = e.getAttribute("aria-expanded");
|
|
134
|
-
c && e.setAttribute("aria-expanded", "false");
|
|
135
|
-
let u = () => {
|
|
136
|
-
this.popover.isOpen || (_.get(e.ownerDocument)?.(), _.set(e.ownerDocument, o), i.hidden = !1, c && e.setAttribute("aria-expanded", "true"), e.setAttribute("aria-describedby", [s, i.id].filter(Boolean).join(" ")), this.popover.open({
|
|
137
|
-
anchor: e,
|
|
138
|
-
content: i,
|
|
139
|
-
restoreFocus: !1,
|
|
140
|
-
onClose: () => {
|
|
141
|
-
a(), i.hidden = !0, c && e.setAttribute("aria-expanded", "false"), s === null ? e.removeAttribute("aria-describedby") : e.setAttribute("aria-describedby", s);
|
|
142
|
-
}
|
|
143
|
-
}));
|
|
144
|
-
}, d = () => this.popover.isOpen ? o() : u();
|
|
145
|
-
return c ? e.addEventListener("click", d) : (e.addEventListener("pointerenter", u), e.addEventListener("pointerleave", o), e.addEventListener("focus", u), e.addEventListener("blur", o)), this.release = () => {
|
|
146
|
-
o(), e.removeEventListener("click", d), c && (l === null ? e.removeAttribute("aria-expanded") : e.setAttribute("aria-expanded", l)), e.removeEventListener("pointerenter", u), e.removeEventListener("pointerleave", o), e.removeEventListener("focus", u), e.removeEventListener("blur", o), n(i);
|
|
147
|
-
}, () => this.destroy();
|
|
148
|
-
}
|
|
149
|
-
destroy() {
|
|
150
|
-
this.release?.(), this.release = void 0, this.popover.destroy();
|
|
151
|
-
}
|
|
152
55
|
};
|
|
153
|
-
function
|
|
154
|
-
let
|
|
155
|
-
let
|
|
56
|
+
function g(e, t = () => {}, n = {}) {
|
|
57
|
+
let r = (r) => {
|
|
58
|
+
let i = Array.from(e.querySelectorAll("[role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]")).filter((t) => t.closest("[role=\"menu\"]") === e && t.getAttribute("aria-disabled") !== "true" && !t.hasAttribute("disabled") && !t.hidden), a = i.indexOf(e.ownerDocument.activeElement);
|
|
156
59
|
[
|
|
157
60
|
"ArrowDown",
|
|
158
61
|
"ArrowUp",
|
|
159
62
|
"Home",
|
|
160
63
|
"End"
|
|
161
|
-
].includes(
|
|
64
|
+
].includes(r.key) && i.length ? (r.preventDefault(), r.stopPropagation(), i[r.key === "Home" ? 0 : r.key === "End" ? i.length - 1 : (a + (r.key === "ArrowUp" ? -1 : 1) + i.length) % i.length]?.focus()) : r.key === "Escape" && n.closeOnEscape !== !1 && (r.preventDefault(), r.stopPropagation(), t());
|
|
162
65
|
};
|
|
163
|
-
return e.addEventListener("keydown",
|
|
66
|
+
return e.addEventListener("keydown", r), () => e.removeEventListener("keydown", r);
|
|
164
67
|
}
|
|
165
|
-
function
|
|
68
|
+
function _(e, t) {
|
|
166
69
|
let n = typeof t == "function" ? t : () => t, r = n().value, i = r, a = () => {
|
|
167
70
|
let e = n();
|
|
168
71
|
return e.value !== i && (i = e.value, r = e.value), e;
|
|
169
72
|
}, o = () => {}, s = (t) => {
|
|
170
|
-
let n = a();
|
|
171
|
-
|
|
73
|
+
let n = a(), i = Math.min(n.max ?? Infinity, Math.max(n.min ?? 0, t));
|
|
74
|
+
n.acceptValue?.(i) !== !1 && (r = i, e.setAttribute("aria-valuenow", String(r)), n.onChange(r));
|
|
172
75
|
}, c = n();
|
|
173
76
|
e.setAttribute("role", "separator"), e.setAttribute("aria-orientation", "vertical"), e.setAttribute("aria-label", c.label), e.tabIndex = 0, e.setAttribute("aria-valuenow", String(r)), c.min !== void 0 && e.setAttribute("aria-valuemin", String(c.min)), c.max !== void 0 && e.setAttribute("aria-valuemax", String(c.max));
|
|
174
77
|
let l = (e) => {
|
|
@@ -195,4 +98,4 @@ function b(e, t) {
|
|
|
195
98
|
};
|
|
196
99
|
}
|
|
197
100
|
//#endregion
|
|
198
|
-
export {
|
|
101
|
+
export { c as ControlTooltip, h as DialogController, o as PopoverController, i as TooltipController, p as TooltipText, g as attachMenuKeyboard, _ as attachResizeHandle, a as createTooltipElement, n as ensureTooltipStyles, t as prepareTooltipSurface, s as useTooltip };
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
withFrameworkContent
|
|
9
9
|
} from '../framework.js';
|
|
10
10
|
|
|
11
|
-
import { controlAttributes } from '../control-attributes.js';
|
|
12
|
-
|
|
13
11
|
export default function UiComponent($$renderer, $$props) {
|
|
14
12
|
$$renderer.component(($$renderer) => {
|
|
15
13
|
let {
|
|
@@ -47,52 +45,7 @@ export default function UiComponent($$renderer, $$props) {
|
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
props.onChange?.(event);
|
|
52
|
-
|
|
53
|
-
if (event.defaultPrevented) return;
|
|
54
|
-
|
|
55
|
-
const value = event.currentTarget.value;
|
|
56
|
-
|
|
57
|
-
props.onValueChange?.(value);
|
|
58
|
-
onValueChange?.(value);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
let selectProps = $.derived(() => {
|
|
62
|
-
const { onChange, onValueChange, ...rest } = props;
|
|
63
|
-
|
|
64
|
-
return controlAttributes('select', rest);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
$$renderer.push(`<span style="display: contents"${$.attr('data-rv-svelte-host', component)}></span> `);
|
|
68
|
-
|
|
69
|
-
if (component === 'NativeSelect') {
|
|
70
|
-
$$renderer.push('<!--[0-->');
|
|
71
|
-
|
|
72
|
-
$$renderer.select(
|
|
73
|
-
{ ...selectProps(), onchange: nativeChange },
|
|
74
|
-
($$renderer) => {
|
|
75
|
-
if (children) {
|
|
76
|
-
$$renderer.push('<!--[0-->');
|
|
77
|
-
children($$renderer, {});
|
|
78
|
-
$$renderer.push(`<!---->`);
|
|
79
|
-
} else {
|
|
80
|
-
$$renderer.push('<!--[-1-->');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
$$renderer.push(`<!--]-->`);
|
|
84
|
-
},
|
|
85
|
-
void 0,
|
|
86
|
-
void 0,
|
|
87
|
-
void 0,
|
|
88
|
-
void 0,
|
|
89
|
-
true
|
|
90
|
-
);
|
|
91
|
-
} else {
|
|
92
|
-
$$renderer.push('<!--[-1-->');
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
$$renderer.push(`<!--]--> <!--[-->`);
|
|
48
|
+
$$renderer.push(`<span style="display: contents"${$.attr('data-rv-svelte-host', component)}></span> <!--[-->`);
|
|
96
49
|
|
|
97
50
|
const each_array = $.ensure_array_like(targets);
|
|
98
51
|
|
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount, untrack, type Snippet } from 'svelte';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
uiComponents,
|
|
5
|
+
componentModels,
|
|
6
|
+
createFrameworkMount,
|
|
7
|
+
withFrameworkContent,
|
|
8
|
+
type UiContentTarget,
|
|
9
|
+
type UiFrameworkMount,
|
|
10
|
+
} from '../framework';
|
|
5
11
|
import type { SvelteUiProps } from '../svelte-props';
|
|
6
12
|
|
|
7
|
-
let {
|
|
13
|
+
let {
|
|
14
|
+
component,
|
|
15
|
+
props = {},
|
|
16
|
+
children,
|
|
17
|
+
slots = {},
|
|
18
|
+
onValueChange,
|
|
19
|
+
onUiEvent,
|
|
20
|
+
}: SvelteUiProps = $props();
|
|
8
21
|
type Content = Snippet<[Record<string, unknown>]>;
|
|
9
22
|
let host: HTMLSpanElement;
|
|
10
23
|
let targets = $state.raw<UiContentTarget<Content>[]>([]);
|
|
11
24
|
let mount = $state.raw<UiFrameworkMount<Content>>();
|
|
12
25
|
onMount(() => {
|
|
13
|
-
const current = createFrameworkMount<Content>(host, next => {
|
|
26
|
+
const current = createFrameworkMount<Content>(host, (next) => {
|
|
27
|
+
targets = next;
|
|
28
|
+
});
|
|
14
29
|
mount = current;
|
|
15
|
-
return () => {
|
|
30
|
+
return () => {
|
|
31
|
+
current.destroy();
|
|
32
|
+
};
|
|
16
33
|
});
|
|
17
34
|
$effect(() => {
|
|
18
35
|
const next = { ...props };
|
|
@@ -21,13 +38,12 @@
|
|
|
21
38
|
const change = onValueChange;
|
|
22
39
|
const event = onUiEvent;
|
|
23
40
|
const renderer = mount;
|
|
24
|
-
if (name === 'NativeSelect') {
|
|
25
|
-
untrack(() => { renderer?.render(() => null, {}); });
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
41
|
const model = componentModels[name];
|
|
29
|
-
const callbacks = new Set([
|
|
30
|
-
|
|
42
|
+
const callbacks = new Set([
|
|
43
|
+
...Object.keys(next).filter((key) => /^on[A-Z]/.test(key)),
|
|
44
|
+
'onClose',
|
|
45
|
+
...(model ? [model.callback] : []),
|
|
46
|
+
]);
|
|
31
47
|
for (const key of callbacks) {
|
|
32
48
|
const original = next[key];
|
|
33
49
|
next[key] = (...args: unknown[]) => {
|
|
@@ -37,34 +53,30 @@
|
|
|
37
53
|
return result;
|
|
38
54
|
};
|
|
39
55
|
}
|
|
40
|
-
untrack(() =>
|
|
41
|
-
(
|
|
56
|
+
untrack(() =>
|
|
57
|
+
renderer?.render(uiComponents[name], next, (props, content) =>
|
|
58
|
+
withFrameworkContent(name, props, contents, content),
|
|
59
|
+
),
|
|
60
|
+
);
|
|
42
61
|
});
|
|
43
62
|
function portal(node: HTMLElement, target: HTMLElement) {
|
|
44
63
|
target.appendChild(node);
|
|
45
|
-
return {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const value = (event.currentTarget as HTMLSelectElement).value;
|
|
51
|
-
props.onValueChange?.(value);
|
|
52
|
-
onValueChange?.(value);
|
|
64
|
+
return {
|
|
65
|
+
update(next: HTMLElement) {
|
|
66
|
+
next.appendChild(node);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
53
69
|
}
|
|
54
|
-
let selectProps = $derived.by(() => {
|
|
55
|
-
const { onChange, onValueChange, ...rest } = props;
|
|
56
|
-
return controlAttributes('select', rest);
|
|
57
|
-
});
|
|
58
70
|
</script>
|
|
59
71
|
|
|
60
|
-
<span bind:this={host} style="display: contents" data-rv-svelte-host={component}
|
|
61
|
-
|
|
62
|
-
<select {...selectProps} onchange={nativeChange}>
|
|
63
|
-
{#if children}{@render children({})}{/if}
|
|
64
|
-
</select>
|
|
65
|
-
{/if}
|
|
72
|
+
<span bind:this={host} style="display: contents" data-rv-svelte-host={component}
|
|
73
|
+
></span>
|
|
66
74
|
{#each targets as target (target.id)}
|
|
67
|
-
<span
|
|
75
|
+
<span
|
|
76
|
+
use:portal={target.element}
|
|
77
|
+
style="display: contents"
|
|
78
|
+
data-rv-svelte-content
|
|
79
|
+
>
|
|
68
80
|
{@render target.content(target.scope)}
|
|
69
81
|
</span>
|
|
70
82
|
{/each}
|
package/svelte.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export type { SvelteUiProps } from './svelte-props';
|
|
|
5
5
|
export type { UiComponentName, UiComponentProps } from './component-catalog';
|
|
6
6
|
export type { PdfViewerProps, PdfViewerText } from './pdf-viewer/component';
|
|
7
7
|
export type { PdfViewerToolbarProps } from './pdf-viewer/toolbar';
|
|
8
|
-
export type { PdfViewerButton, PdfViewerButtonOptions, PdfViewerToolbarOptions, PdfViewerToolbarConfig } from './pdf-viewer/toolbar-options';
|
|
8
|
+
export type { PdfViewerButton, PdfViewerButtonOptions, PdfViewerToolbarOptions, PdfViewerToolbarConfig, } from './pdf-viewer/toolbar-options';
|
|
9
9
|
export { defaultPdfViewerText } from './pdf-viewer/translations';
|
package/svelte.js
CHANGED
|
@@ -1,93 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { uiComponents as a } from "./framework.js";
|
|
1
|
+
import { i as e } from "./_chunks/component-DyWiItBR.js";
|
|
2
|
+
import { t } from "./_chunks/component-metadata-BKd7U8OW.js";
|
|
3
|
+
import { n, t as r } from "./_chunks/framework-mount-Bk4O_T7T.js";
|
|
4
|
+
import { uiComponents as i } from "./framework.js";
|
|
6
5
|
import "svelte/internal/disclose-version";
|
|
7
|
-
import * as
|
|
8
|
-
import { onMount as
|
|
6
|
+
import * as a from "svelte/internal/client";
|
|
7
|
+
import { onMount as o, untrack as s } from "svelte";
|
|
9
8
|
//#region src/svelte/UiComponent.svelte
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let e =
|
|
16
|
-
|
|
9
|
+
var c = a.from_html("<span style=\"display: contents\" data-rv-svelte-content=\"\"><!></span>"), l = a.from_html("<span style=\"display: contents\"></span> <!>", 1);
|
|
10
|
+
function u(e, u) {
|
|
11
|
+
a.push(u, !0);
|
|
12
|
+
let d = a.prop(u, "props", 19, () => ({})), f = a.prop(u, "slots", 19, () => ({})), p, m = a.state([]), h = a.state(void 0);
|
|
13
|
+
o(() => {
|
|
14
|
+
let e = r(p, (e) => {
|
|
15
|
+
a.set(m, e);
|
|
17
16
|
});
|
|
18
|
-
return
|
|
17
|
+
return a.set(h, e), () => {
|
|
19
18
|
e.destroy();
|
|
20
19
|
};
|
|
21
|
-
}),
|
|
22
|
-
let e = { ...
|
|
23
|
-
...
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
if (t === "NativeSelect") {
|
|
27
|
-
c(() => {
|
|
28
|
-
u?.render(() => null, {});
|
|
29
|
-
});
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
let d = n[t], f = /* @__PURE__ */ new Set([
|
|
20
|
+
}), a.user_effect(() => {
|
|
21
|
+
let e = { ...d() }, r = u.component, o = {
|
|
22
|
+
...f(),
|
|
23
|
+
...u.children ? { default: u.children } : {}
|
|
24
|
+
}, c = u.onValueChange, l = u.onUiEvent, p = a.get(h), m = t[r], g = /* @__PURE__ */ new Set([
|
|
33
25
|
...Object.keys(e).filter((e) => /^on[A-Z]/.test(e)),
|
|
34
26
|
"onClose",
|
|
35
|
-
...
|
|
27
|
+
...m ? [m.callback] : []
|
|
36
28
|
]);
|
|
37
|
-
for (let t of
|
|
29
|
+
for (let t of g) {
|
|
38
30
|
let n = e[t];
|
|
39
31
|
e[t] = (...e) => {
|
|
40
32
|
let r = n?.(...e);
|
|
41
|
-
return t ===
|
|
33
|
+
return t === m?.callback && c?.(e[0]), l?.({
|
|
42
34
|
name: t,
|
|
43
35
|
args: e
|
|
44
36
|
}), r;
|
|
45
37
|
};
|
|
46
38
|
}
|
|
47
|
-
|
|
39
|
+
s(() => p?.render(i[r], e, (e, t) => n(r, e, o, t)));
|
|
48
40
|
});
|
|
49
|
-
function
|
|
41
|
+
function g(e, t) {
|
|
50
42
|
return t.appendChild(e), { update(t) {
|
|
51
43
|
t.appendChild(e);
|
|
52
44
|
} };
|
|
53
45
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return e("select", r);
|
|
62
|
-
});
|
|
63
|
-
var S = f(), C = o.first_child(S);
|
|
64
|
-
o.bind_this(C, (e) => g = e, () => g);
|
|
65
|
-
var w = o.sibling(C, 2), T = (e) => {
|
|
66
|
-
var t = u();
|
|
67
|
-
o.attribute_effect(t, () => ({
|
|
68
|
-
...o.get(x),
|
|
69
|
-
onchange: b
|
|
70
|
-
})), o.customizable_select(t, () => {
|
|
71
|
-
var e = o.child(t), n = l(), r = o.first_child(n), i = (e) => {
|
|
72
|
-
var t = o.comment(), n = o.first_child(t);
|
|
73
|
-
o.snippet(n, () => p.children, () => ({})), o.append(e, t);
|
|
74
|
-
};
|
|
75
|
-
o.if(r, (e) => {
|
|
76
|
-
p.children && e(i);
|
|
77
|
-
}), o.append(e, n);
|
|
78
|
-
}), o.append(e, t);
|
|
79
|
-
};
|
|
80
|
-
o.if(w, (e) => {
|
|
81
|
-
p.component === "NativeSelect" && e(T);
|
|
82
|
-
});
|
|
83
|
-
var E = o.sibling(w, 2);
|
|
84
|
-
o.each(E, 17, () => o.get(_), (e) => e.id, (e, t) => {
|
|
85
|
-
var n = d(), r = o.child(n);
|
|
86
|
-
o.snippet(r, () => o.get(t).content, () => o.get(t).scope), o.reset(n), o.action(n, (e, t) => y?.(e, t), () => o.get(t).element), o.append(e, n);
|
|
87
|
-
}), o.template_effect(() => o.set_attribute(C, "data-rv-svelte-host", p.component)), o.append(t, S), o.pop();
|
|
46
|
+
var _ = l(), v = a.first_child(_);
|
|
47
|
+
a.bind_this(v, (e) => p = e, () => p);
|
|
48
|
+
var y = a.sibling(v, 2);
|
|
49
|
+
a.each(y, 17, () => a.get(m), (e) => e.id, (e, t) => {
|
|
50
|
+
var n = c(), r = a.child(n);
|
|
51
|
+
a.snippet(r, () => a.get(t).content, () => a.get(t).scope), a.reset(n), a.action(n, (e, t) => g?.(e, t), () => a.get(t).element), a.append(e, n);
|
|
52
|
+
}), a.template_effect(() => a.set_attribute(v, "data-rv-svelte-host", u.component)), a.append(e, _), a.pop();
|
|
88
53
|
}
|
|
89
54
|
//#endregion
|
|
90
55
|
//#region src/svelte.ts
|
|
91
|
-
var
|
|
56
|
+
var d = u;
|
|
92
57
|
//#endregion
|
|
93
|
-
export {
|
|
58
|
+
export { d as UiComponent, e as defaultPdfViewerText };
|
package/switch/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { t } from "../_chunks/native-control-B9MNibfa.js";
|
|
2
3
|
//#region src/switch/index.tsx
|
|
3
4
|
function n({ checked: n, onChange: r, label: i, ariaLabel: a, className: o = "", disabled: s = !1, labelPosition: c = "before", title: l, testId: u }) {
|
|
4
5
|
let d = /* @__PURE__ */ e("span", {
|
|
@@ -9,7 +10,7 @@ function n({ checked: n, onChange: r, label: i, ariaLabel: a, className: o = "",
|
|
|
9
10
|
"aria-hidden": "true",
|
|
10
11
|
children: /* @__PURE__ */ e("span", { class: "rv-switch-thumb" })
|
|
11
12
|
});
|
|
12
|
-
return /* @__PURE__ */ t
|
|
13
|
+
return /* @__PURE__ */ e(t, {
|
|
13
14
|
type: "button",
|
|
14
15
|
class: `rv-switch ${o}`.trim(),
|
|
15
16
|
role: "switch",
|
package/time-grid.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, RefObject } from 'preact';
|
|
1
|
+
import { h, RefObject } from './_vendor/preact/src/index';
|
|
2
2
|
export interface TimeGridWorkingHours {
|
|
3
3
|
readonly startHour: number;
|
|
4
4
|
readonly endHour: number;
|
|
@@ -11,7 +11,6 @@ export interface TimeGridDayLabel {
|
|
|
11
11
|
}
|
|
12
12
|
export interface TimeGridProps {
|
|
13
13
|
readonly disabled?: boolean;
|
|
14
|
-
readonly legacyClassPrefix?: string;
|
|
15
14
|
readonly days: readonly TimeGridDayLabel[];
|
|
16
15
|
readonly cells: ReadonlySet<string>;
|
|
17
16
|
readonly focused: string;
|