ropav 0.6.0 → 0.8.0
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/README.md +32 -9
- package/dist/components/accordion/index.d.ts +2 -190
- package/dist/components/accordion/index.js +1 -12
- package/dist/components/alert/alert-indicator.js +1 -1
- package/dist/components/alert/index.d.ts +2 -131
- package/dist/components/alert/index.js +1 -10
- package/dist/components/alert-dialog/alert-dialog-close.js +1 -1
- package/dist/components/alert-dialog/alert-dialog-heading.js +2 -2
- package/dist/components/alert-dialog/alert-dialog.types.d.ts +1 -1
- package/dist/components/alert-dialog/index.d.ts +2 -296
- package/dist/components/alert-dialog/index.js +1 -17
- package/dist/components/autocomplete/autocomplete-popover.js +2 -2
- package/dist/components/autocomplete/autocomplete-root.js +1 -1
- package/dist/components/autocomplete/index.d.ts +2 -250
- package/dist/components/autocomplete/index.js +1 -12
- package/dist/components/avatar/avatar.context.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +2 -101
- package/dist/components/avatar/index.js +1 -8
- package/dist/components/badge/badge-anchor.js +5 -4
- package/dist/components/badge/badge-auto-label.d.ts +2 -14
- package/dist/components/badge/badge-auto-label.js +3 -16
- package/dist/components/badge/badge-root.js +2 -2
- package/dist/components/badge/badge.types.d.ts +4 -4
- package/dist/components/badge/index.d.ts +2 -95
- package/dist/components/badge/index.js +1 -8
- package/dist/components/breadcrumbs/breadcrumbs-item.js +2 -2
- package/dist/components/breadcrumbs/breadcrumbs.types.d.ts +2 -2
- package/dist/components/breadcrumbs/index.d.ts +2 -90
- package/dist/components/breadcrumbs/index.js +1 -7
- package/dist/components/button/index.d.ts +2 -61
- package/dist/components/button/index.js +1 -4
- package/dist/components/button-group/index.d.ts +2 -72
- package/dist/components/button-group/index.js +1 -7
- package/dist/components/calendar/calendar-grid-body.js +2 -2
- package/dist/components/calendar/calendar-grid-header.js +1 -1
- package/dist/components/calendar/calendar-grid.js +2 -1
- package/dist/components/calendar/calendar-root.d.ts +1 -1
- package/dist/components/calendar/calendar-root.js +13 -13
- package/dist/components/calendar/calendar.context.js +1 -1
- package/dist/components/calendar/calendar.types.d.ts +3 -1
- package/dist/components/calendar/index.d.ts +2 -422
- package/dist/components/calendar/index.js +1 -27
- package/dist/components/calendar-year-picker/calendar-year-picker-cell.js +15 -11
- package/dist/components/calendar-year-picker/calendar-year-picker-grid-body.js +9 -10
- package/dist/components/calendar-year-picker/calendar-year-picker-grid.js +36 -32
- package/dist/components/calendar-year-picker/calendar-year-picker-trigger-heading.js +1 -1
- package/dist/components/calendar-year-picker/calendar-year-picker-trigger.js +1 -1
- package/dist/components/calendar-year-picker/calendar-year-picker.context.d.ts +26 -8
- package/dist/components/calendar-year-picker/calendar-year-picker.context.js +2 -2
- package/dist/components/calendar-year-picker/calendar-year-picker.types.d.ts +8 -1
- package/dist/components/calendar-year-picker/index.d.ts +0 -134
- package/dist/components/calendar-year-picker/index.js +1 -11
- package/dist/components/card/index.d.ts +2 -152
- package/dist/components/card/index.js +1 -11
- package/dist/components/checkbox/index.d.ts +2 -146
- package/dist/components/checkbox/index.js +1 -9
- package/dist/components/checkbox-group/index.d.ts +2 -77
- package/dist/components/checkbox-group/index.js +1 -4
- package/dist/components/chip/chip-auto-label.d.ts +3 -19
- package/dist/components/chip/chip-auto-label.js +4 -21
- package/dist/components/chip/chip-root.js +2 -2
- package/dist/components/chip/chip.types.d.ts +2 -2
- package/dist/components/chip/index.d.ts +2 -72
- package/dist/components/chip/index.js +1 -7
- package/dist/components/close-button/index.d.ts +2 -55
- package/dist/components/close-button/index.js +1 -4
- package/dist/components/color-area/index.d.ts +2 -100
- package/dist/components/color-area/index.js +1 -7
- package/dist/components/color-field/color-field-root.js +1 -1
- package/dist/components/color-field/index.d.ts +2 -175
- package/dist/components/color-field/index.js +1 -14
- package/dist/components/color-input-group/index.d.ts +2 -115
- package/dist/components/color-input-group/index.js +1 -9
- package/dist/components/color-picker/color-picker-popover.js +2 -2
- package/dist/components/color-picker/index.d.ts +2 -110
- package/dist/components/color-picker/index.js +1 -8
- package/dist/components/color-slider/index.d.ts +2 -138
- package/dist/components/color-slider/index.js +1 -9
- package/dist/components/color-swatch/index.d.ts +2 -59
- package/dist/components/color-swatch/index.js +1 -4
- package/dist/components/color-swatch-picker/color-swatch-picker-item.js +1 -1
- package/dist/components/color-swatch-picker/index.d.ts +2 -129
- package/dist/components/color-swatch-picker/index.js +1 -9
- package/dist/components/combo-box/combo-box-popover.js +2 -2
- package/dist/components/combo-box/combo-box.types.d.ts +1 -1
- package/dist/components/combo-box/index.d.ts +2 -229
- package/dist/components/combo-box/index.js +1 -10
- package/dist/components/date-field/date-field-root.js +2 -2
- package/dist/components/date-field/index.d.ts +2 -241
- package/dist/components/date-field/index.js +1 -12
- package/dist/components/date-input-group/use-date-segment.js +1 -1
- package/dist/components/date-picker/date-picker-popover.js +2 -2
- package/dist/components/date-picker/date-picker-root.js +6 -3
- package/dist/components/date-picker/index.d.ts +2 -186
- package/dist/components/date-picker/index.js +1 -9
- package/dist/components/date-range-picker/date-range-picker-popover.js +2 -2
- package/dist/components/date-range-picker/date-range-picker-root.js +6 -3
- package/dist/components/date-range-picker/index.d.ts +2 -209
- package/dist/components/date-range-picker/index.js +1 -10
- package/dist/components/description/index.d.ts +2 -45
- package/dist/components/description/index.js +1 -4
- package/dist/components/disclosure/disclosure-root.js +3 -3
- package/dist/components/disclosure/index.d.ts +2 -163
- package/dist/components/disclosure/index.js +1 -11
- package/dist/components/disclosure-group/index.d.ts +2 -57
- package/dist/components/disclosure-group/index.js +1 -4
- package/dist/components/drawer/drawer-close.js +1 -1
- package/dist/components/drawer/drawer-dialog.js +1 -1
- package/dist/components/drawer/drawer-heading.js +2 -2
- package/dist/components/drawer/drawer.types.d.ts +1 -1
- package/dist/components/drawer/index.d.ts +2 -291
- package/dist/components/drawer/index.js +1 -17
- package/dist/components/drop-zone/index.d.ts +2 -80
- package/dist/components/drop-zone/index.js +1 -7
- package/dist/components/dropdown/dropdown-popover.js +2 -2
- package/dist/components/dropdown/index.d.ts +2 -265
- package/dist/components/dropdown/index.js +1 -23
- package/dist/components/empty-state/index.d.ts +2 -45
- package/dist/components/empty-state/index.js +1 -4
- package/dist/components/error-message/index.d.ts +2 -45
- package/dist/components/error-message/index.js +1 -4
- package/dist/components/field-error/field-error-root.js +2 -2
- package/dist/components/field-error/index.d.ts +2 -66
- package/dist/components/field-error/index.js +1 -7
- package/dist/components/fieldset/index.d.ts +2 -110
- package/dist/components/fieldset/index.js +1 -9
- package/dist/components/form/index.d.ts +2 -49
- package/dist/components/form/index.js +1 -4
- package/dist/components/header/index.d.ts +2 -45
- package/dist/components/header/index.js +1 -4
- package/dist/components/i18n-provider/index.d.ts +2 -2
- package/dist/components/i18n-provider/index.js +1 -1
- package/dist/components/icons/icon-overlay-arrow.js +1 -1
- package/dist/components/input/index.d.ts +2 -51
- package/dist/components/input/index.js +1 -4
- package/dist/components/input-group/index.d.ts +2 -141
- package/dist/components/input-group/index.js +1 -10
- package/dist/components/input-otp/index.d.ts +2 -151
- package/dist/components/input-otp/index.js +1 -9
- package/dist/components/kbd/index.d.ts +2 -86
- package/dist/components/kbd/index.js +1 -8
- package/dist/components/label/index.d.ts +2 -51
- package/dist/components/label/index.js +1 -4
- package/dist/components/link/index.d.ts +2 -94
- package/dist/components/link/index.js +1 -7
- package/dist/components/list-box/index.d.ts +2 -191
- package/dist/components/list-box/index.js +1 -14
- package/dist/components/list-box/list-box-drop-indicator.js +2 -2
- package/dist/components/list-box/list-box-root.js +4 -4
- package/dist/components/list-box-item/index.d.ts +2 -74
- package/dist/components/list-box-item/index.js +1 -7
- package/dist/components/list-box-item/list-box-item-root.js +2 -2
- package/dist/components/list-box-section/index.d.ts +2 -47
- package/dist/components/list-box-section/index.js +1 -4
- package/dist/components/menu/index.d.ts +2 -83
- package/dist/components/menu/index.js +1 -4
- package/dist/components/menu-item/index.d.ts +2 -96
- package/dist/components/menu-item/index.js +1 -8
- package/dist/components/menu-item/menu-item-root.js +2 -2
- package/dist/components/menu-section/index.d.ts +2 -63
- package/dist/components/menu-section/index.js +1 -4
- package/dist/components/meter/index.d.ts +2 -127
- package/dist/components/meter/index.js +1 -9
- package/dist/components/meter/meter.types.d.ts +2 -0
- package/dist/components/modal/index.d.ts +2 -296
- package/dist/components/modal/index.js +1 -17
- package/dist/components/modal/modal-close.js +1 -1
- package/dist/components/modal/modal-heading.js +2 -2
- package/dist/components/modal/modal.context.d.ts +2 -2
- package/dist/components/modal/modal.types.d.ts +1 -1
- package/dist/components/number-field/index.d.ts +2 -186
- package/dist/components/number-field/index.js +1 -10
- package/dist/components/number-field/number-field-decrement-button.js +1 -1
- package/dist/components/number-field/number-field-increment-button.js +1 -1
- package/dist/components/overlay/overlay-slots.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +2 -244
- package/dist/components/pagination/index.js +1 -15
- package/dist/components/pagination/pagination-next.js +4 -1
- package/dist/components/pagination/pagination-previous.js +4 -1
- package/dist/components/popover/index.d.ts +2 -172
- package/dist/components/popover/index.js +1 -11
- package/dist/components/popover/popover-arrow.js +2 -2
- package/dist/components/popover/popover-content.js +2 -2
- package/dist/components/popover/popover-heading.js +2 -2
- package/dist/components/popover/popover.types.d.ts +1 -1
- package/dist/components/progress-bar/index.d.ts +2 -133
- package/dist/components/progress-bar/index.js +1 -9
- package/dist/components/progress-bar/progress-bar.types.d.ts +2 -0
- package/dist/components/progress-circle/index.d.ts +2 -124
- package/dist/components/progress-circle/index.js +1 -9
- package/dist/components/progress-circle/progress-circle.types.d.ts +2 -0
- package/dist/components/radio/index.d.ts +2 -120
- package/dist/components/radio/index.js +1 -9
- package/dist/components/radio-group/index.d.ts +2 -79
- package/dist/components/radio-group/index.js +1 -4
- package/dist/components/range-calendar/index.d.ts +2 -424
- package/dist/components/range-calendar/index.js +1 -27
- package/dist/components/range-calendar/range-calendar-cell.js +4 -2
- package/dist/components/range-calendar/range-calendar-grid-body.js +2 -2
- package/dist/components/range-calendar/range-calendar-grid-header.js +1 -1
- package/dist/components/range-calendar/range-calendar-grid.js +2 -1
- package/dist/components/range-calendar/range-calendar-root.d.ts +3 -3
- package/dist/components/range-calendar/range-calendar-root.js +13 -13
- package/dist/components/range-calendar/range-calendar.context.d.ts +1 -1
- package/dist/components/range-calendar/range-calendar.context.js +1 -1
- package/dist/components/range-calendar/range-calendar.types.d.ts +3 -1
- package/dist/components/router-provider/index.d.ts +2 -2
- package/dist/components/router-provider/index.js +1 -1
- package/dist/components/scroll-shadow/index.d.ts +2 -69
- package/dist/components/scroll-shadow/index.js +1 -4
- package/dist/components/search-field/index.d.ts +2 -195
- package/dist/components/search-field/index.js +1 -10
- package/dist/components/search-field/search-field-clear-button.js +5 -5
- package/dist/components/segmented-control/index.d.ts +2 -126
- package/dist/components/segmented-control/index.js +1 -9
- package/dist/components/select/index.d.ts +2 -202
- package/dist/components/select/index.js +1 -10
- package/dist/components/select/select-popover.js +2 -2
- package/dist/components/select/select-value.js +1 -1
- package/dist/components/separator/index.d.ts +2 -41
- package/dist/components/separator/index.js +1 -4
- package/dist/components/sidebar/index.d.ts +2 -520
- package/dist/components/sidebar/index.js +1 -25
- package/dist/components/sidebar/sidebar-content.js +2 -2
- package/dist/components/sidebar/sidebar-item-tooltip.js +2 -2
- package/dist/components/sidebar/sidebar-panel.js +1 -0
- package/dist/components/sidebar/sidebar-rail.js +1 -0
- package/dist/components/sidebar/sidebar-root.js +23 -5
- package/dist/components/sidebar/sidebar.state.d.ts +3 -0
- package/dist/components/sidebar/sidebar.state.js +5 -0
- package/dist/components/sidebar/sidebar.types.d.ts +2 -2
- package/dist/components/skeleton/index.d.ts +2 -47
- package/dist/components/skeleton/index.js +1 -4
- package/dist/components/slider/index.d.ts +2 -180
- package/dist/components/slider/index.js +1 -11
- package/dist/components/spinner/index.d.ts +2 -41
- package/dist/components/spinner/index.js +1 -4
- package/dist/components/splitter/index.d.ts +2 -134
- package/dist/components/splitter/index.js +1 -8
- package/dist/components/surface/index.d.ts +2 -47
- package/dist/components/surface/index.js +1 -4
- package/dist/components/switch/index.d.ts +2 -165
- package/dist/components/switch/index.js +1 -10
- package/dist/components/switch-group/index.d.ts +2 -47
- package/dist/components/switch-group/index.js +1 -4
- package/dist/components/table/index.d.ts +2 -442
- package/dist/components/table/index.js +1 -23
- package/dist/components/table/table-body.js +9 -9
- package/dist/components/table/table-cell.js +3 -3
- package/dist/components/table/table-column.js +4 -4
- package/dist/components/table/table-content.js +3 -3
- package/dist/components/table/table-drag-handle.js +1 -1
- package/dist/components/table/table-drop-indicator.js +9 -7
- package/dist/components/table/table-header.js +4 -4
- package/dist/components/table/table-load-more.js +5 -5
- package/dist/components/table/table-row.js +4 -4
- package/dist/components/table/table.context.d.ts +2 -2
- package/dist/components/table/table.types.d.ts +3 -3
- package/dist/components/tabs/index.d.ts +2 -189
- package/dist/components/tabs/index.js +1 -12
- package/dist/components/tabs/tabs-list-container.js +2 -2
- package/dist/components/tag/index.d.ts +2 -76
- package/dist/components/tag/index.js +1 -7
- package/dist/components/tag/tag-remove-button.js +2 -2
- package/dist/components/tag-group/index.d.ts +2 -93
- package/dist/components/tag-group/index.js +1 -7
- package/dist/components/textarea/index.d.ts +2 -51
- package/dist/components/textarea/index.js +1 -4
- package/dist/components/textfield/index.d.ts +2 -109
- package/dist/components/textfield/index.js +1 -4
- package/dist/components/time-field/index.d.ts +2 -233
- package/dist/components/time-field/index.js +1 -12
- package/dist/components/toast/index.d.ts +2 -216
- package/dist/components/toast/index.js +1 -15
- package/dist/components/toast/toast-action-button.js +2 -2
- package/dist/components/toast/toast-default-content.js +1 -1
- package/dist/components/toast/toast-queue.d.ts +1 -1
- package/dist/components/toast/toast-queue.js +1 -1
- package/dist/components/toast/toast-root.js +1 -1
- package/dist/components/toast/toast.types.d.ts +3 -3
- package/dist/components/toggle-button/index.d.ts +2 -65
- package/dist/components/toggle-button/index.js +1 -4
- package/dist/components/toggle-button-group/index.d.ts +2 -82
- package/dist/components/toggle-button-group/index.js +1 -7
- package/dist/components/toolbar/index.d.ts +2 -49
- package/dist/components/toolbar/index.js +1 -4
- package/dist/components/tooltip/index.d.ts +2 -136
- package/dist/components/tooltip/index.js +1 -9
- package/dist/components/tooltip/tooltip-arrow.js +2 -2
- package/dist/components/tooltip/tooltip-root.js +1 -1
- package/dist/components/tooltip/tooltip.types.d.ts +1 -1
- package/dist/components/typography/code.js +2 -2
- package/dist/components/typography/heading.js +2 -2
- package/dist/components/typography/index.d.ts +2 -1269
- package/dist/components/typography/index.js +1 -10
- package/dist/components/typography/paragraph.js +2 -2
- package/dist/components/typography/typography-root.js +2 -2
- package/dist/composables/use-calendar-grid.js +2 -1
- package/dist/composables/use-calendar-year-picker.js +12 -3
- package/dist/composables/use-color-field.js +1 -1
- package/dist/composables/use-color-slider.d.ts +1 -1
- package/dist/composables/use-color-slider.js +1 -1
- package/dist/composables/use-press.d.ts +10 -0
- package/dist/composables/use-press.js +27 -2
- package/dist/composables/use-prevent-scroll.d.ts +11 -5
- package/dist/composables/use-prevent-scroll.js +11 -5
- package/dist/composables/use-range-calendar.js +2 -1
- package/dist/composables/use-text-field.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +110 -111
- package/dist/ropav.min.css +2 -0
- package/dist/styles-no-preflight.css +3 -0
- package/dist/styles-overrides.css +15 -0
- package/dist/styles.css +1 -16
- package/dist/utils/auto-label.d.ts +24 -0
- package/dist/utils/auto-label.js +48 -0
- package/dist/utils/block.js +11 -1
- package/dist/utils/calendar-systems.d.ts +14 -0
- package/dist/utils/calendar-systems.js +2 -0
- package/dist/utils/calendar.d.ts +14 -5
- package/dist/utils/calendar.js +18 -21
- package/dist/utils/compose.d.ts +4 -6
- package/dist/utils/compose.js +4 -6
- package/dist/utils/dnd-list-drop-target-delegate.d.ts +19 -1
- package/dist/utils/dnd-list-drop-target-delegate.js +37 -6
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/virtualizer-list-layout.d.ts +8 -0
- package/dist/utils/virtualizer-list-layout.js +12 -2
- package/dist/utils/virtualizer-table-layout.d.ts +1 -0
- package/dist/utils/virtualizer-table-layout.js +3 -0
- package/dist/version.js +1 -1
- package/package.json +11 -5
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rules layered on top of `@ropav/styles` rather than merged into it, so each one stays
|
|
3
|
+
* separately deletable once `packages/styles` folds it in.
|
|
4
|
+
*/
|
|
5
|
+
@layer components {
|
|
6
|
+
/**
|
|
7
|
+
* A vertical group stacks along the block axis, so its cross axis is the one that decides
|
|
8
|
+
* button width. `.rp-button` is `w-fit`, which would leave each button as wide as its own
|
|
9
|
+
* label and centred against the widest one - a ragged left and right edge. `min-width`
|
|
10
|
+
* squares them up without overriding the fixed width an icon-only button relies on.
|
|
11
|
+
*/
|
|
12
|
+
.rp-button-group--vertical .rp-button {
|
|
13
|
+
@apply min-w-full;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/styles.css
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
@import "@ropav/styles";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Rules layered on top of `@ropav/styles` rather than merged into it, so each one stays
|
|
5
|
-
* separately deletable once `packages/styles` folds it in.
|
|
6
|
-
*/
|
|
7
|
-
@layer components {
|
|
8
|
-
/**
|
|
9
|
-
* A vertical group stacks along the block axis, so its cross axis is the one that decides
|
|
10
|
-
* button width. `.button` is `w-fit`, which would leave each button as wide as its own
|
|
11
|
-
* label and centred against the widest one - a ragged left and right edge. `min-width`
|
|
12
|
-
* squares them up without overriding the fixed width an icon-only button relies on.
|
|
13
|
-
*/
|
|
14
|
-
.button-group--vertical .button {
|
|
15
|
-
@apply min-w-full;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
2
|
+
@import "./styles-overrides.css";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* A component that renders its children, wrapping them in `Label` when they are only text - the
|
|
4
|
+
* equivalent of React's `typeof children === "string" || typeof children === "number"`.
|
|
5
|
+
*
|
|
6
|
+
* Written as a factory rather than an SFC because only a hand-written `setup` gets to hold the
|
|
7
|
+
* children; an SFC's `<slot />` is inserted before there is anywhere to intervene. That costs it
|
|
8
|
+
* the dual compilation a `.vue` file gets, so both branches are spelled out here and picked once,
|
|
9
|
+
* on whether this bundle has a Vapor runtime at all.
|
|
10
|
+
*
|
|
11
|
+
* **Vapor.** The slot has already rendered by the time it returns its block, so inspecting that
|
|
12
|
+
* block preserves its effects and lets the exact same text nodes move into the label. It is
|
|
13
|
+
* called once and the very block it returns is what gets inserted, so nothing renders twice and
|
|
14
|
+
* no effect is registered and thrown away - the actual hazard with slots in Vapor, rather than
|
|
15
|
+
* reading them at all. A slot forwarded from a VDOM host is the exception: it is filled only on
|
|
16
|
+
* insertion, so there is nothing to inspect and bare text goes unwrapped.
|
|
17
|
+
*
|
|
18
|
+
* **Server.** Renders the children and leaves them alone. A server cannot tell whether the
|
|
19
|
+
* browser will hydrate this as Vapor or as VDOM, and wrapping guesses at one of them; passing
|
|
20
|
+
* through matches a VDOM caller exactly, and matches a Vapor caller for every form in which the
|
|
21
|
+
* label is written out - which is every documented one. The case it gives up is a Vapor caller
|
|
22
|
+
* handing it bare text, and that is where a server-side wrap would have to come back.
|
|
23
|
+
*/
|
|
24
|
+
export declare const createAutoLabel: (Label: Component, name: string) => Component;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { flattenBlock, isTextOnlyBlock } from "./block.js";
|
|
2
|
+
import * as Vue from "vue";
|
|
3
|
+
//#region src/utils/auto-label.ts
|
|
4
|
+
/**
|
|
5
|
+
* The namespace import is load-bearing and must not be rewritten to a named one.
|
|
6
|
+
*
|
|
7
|
+
* `createComponent` and `defineVaporComponent` come from the Vapor runtime, which only the
|
|
8
|
+
* esm-bundler build re-exports. A bundler externalising `vue` for SSR resolves the node entry,
|
|
9
|
+
* and a named import of a binding it does not have is a link-time `SyntaxError` - thrown before
|
|
10
|
+
* any guard could run, so no `import.meta.env.SSR` branch can reach it. A namespace read yields
|
|
11
|
+
* `undefined` instead, which is what lets the two branches below be chosen at module scope.
|
|
12
|
+
*/
|
|
13
|
+
var { createComponent: createComponent$1, defineComponent, defineVaporComponent: defineVaporComponent$1 } = Vue;
|
|
14
|
+
/**
|
|
15
|
+
* A component that renders its children, wrapping them in `Label` when they are only text - the
|
|
16
|
+
* equivalent of React's `typeof children === "string" || typeof children === "number"`.
|
|
17
|
+
*
|
|
18
|
+
* Written as a factory rather than an SFC because only a hand-written `setup` gets to hold the
|
|
19
|
+
* children; an SFC's `<slot />` is inserted before there is anywhere to intervene. That costs it
|
|
20
|
+
* the dual compilation a `.vue` file gets, so both branches are spelled out here and picked once,
|
|
21
|
+
* on whether this bundle has a Vapor runtime at all.
|
|
22
|
+
*
|
|
23
|
+
* **Vapor.** The slot has already rendered by the time it returns its block, so inspecting that
|
|
24
|
+
* block preserves its effects and lets the exact same text nodes move into the label. It is
|
|
25
|
+
* called once and the very block it returns is what gets inserted, so nothing renders twice and
|
|
26
|
+
* no effect is registered and thrown away - the actual hazard with slots in Vapor, rather than
|
|
27
|
+
* reading them at all. A slot forwarded from a VDOM host is the exception: it is filled only on
|
|
28
|
+
* insertion, so there is nothing to inspect and bare text goes unwrapped.
|
|
29
|
+
*
|
|
30
|
+
* **Server.** Renders the children and leaves them alone. A server cannot tell whether the
|
|
31
|
+
* browser will hydrate this as Vapor or as VDOM, and wrapping guesses at one of them; passing
|
|
32
|
+
* through matches a VDOM caller exactly, and matches a Vapor caller for every form in which the
|
|
33
|
+
* label is written out - which is every documented one. The case it gives up is a Vapor caller
|
|
34
|
+
* handing it bare text, and that is where a server-side wrap would have to come back.
|
|
35
|
+
*/
|
|
36
|
+
var createAutoLabel = (Label, name) => defineVaporComponent$1 ? defineVaporComponent$1((_props, { slots }) => {
|
|
37
|
+
const block = slots["default"]?.();
|
|
38
|
+
if (block === void 0 || !isTextOnlyBlock(flattenBlock(block))) return block ?? [];
|
|
39
|
+
return createComponent$1(Label, null, { default: () => block });
|
|
40
|
+
}, { name }) : defineComponent({
|
|
41
|
+
name,
|
|
42
|
+
setup: (_props, { slots }) => () => {
|
|
43
|
+
const vnodes = slots["default"]?.();
|
|
44
|
+
return vnodes !== void 0 && vnodes.length === 1 ? vnodes[0] : vnodes;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
//#endregion
|
|
48
|
+
export { createAutoLabel };
|
package/dist/utils/block.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Vue from "vue";
|
|
2
2
|
//#region src/utils/block.ts
|
|
3
3
|
/**
|
|
4
|
+
* The namespace import is load-bearing and must not be rewritten to a named one.
|
|
5
|
+
*
|
|
6
|
+
* `isFragment` and `isVaporComponent` come from the Vapor runtime, which only the esm-bundler
|
|
7
|
+
* build re-exports. A bundler externalising `vue` for SSR resolves the node entry, and a named
|
|
8
|
+
* import of a binding it does not have is a link-time `SyntaxError` — thrown before any guard
|
|
9
|
+
* could run. A namespace read simply yields `undefined`, which is all this file needs: every
|
|
10
|
+
* function below is reached from a Vapor render, and a server has none.
|
|
11
|
+
*/
|
|
12
|
+
var { isFragment, isVaporComponent } = Vue;
|
|
13
|
+
/**
|
|
4
14
|
* The DOM nodes a Vapor block resolves to, in document order.
|
|
5
15
|
*
|
|
6
16
|
* A slot function hands back a block rather than a node: a single node for one child, an
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createCalendar } from "@internationalized/date";
|
|
2
|
+
/**
|
|
3
|
+
* The factory that can build any calendar system, for an app serving a locale that uses one.
|
|
4
|
+
*
|
|
5
|
+
* The calendars, fields and pickers default to Gregorian instead. A factory that answers for any
|
|
6
|
+
* identifier has to carry the arithmetic for every system behind it, none of which a Gregorian
|
|
7
|
+
* locale ever reads, and nothing about a static default can be dropped by a build. Passing this
|
|
8
|
+
* back opts into the lot:
|
|
9
|
+
*
|
|
10
|
+
* ```vue
|
|
11
|
+
* <DatePicker :create-calendar="createCalendar" />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export { createCalendar };
|
package/dist/utils/calendar.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Calendar, DateDuration, DateValue } from "@internationalized/date";
|
|
2
|
+
import { CalendarDate } from "@internationalized/date";
|
|
2
3
|
/** The day a week can be told to start on, spelled the way `@internationalized/date` spells it. */
|
|
3
4
|
export type DayOfWeek = "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat";
|
|
4
5
|
/** How wide a weekday name is written. */
|
|
5
6
|
export type WeekdayStyle = "narrow" | "short" | "long";
|
|
7
|
+
/** How wide a weekday name is written when nothing asks for a width. */
|
|
8
|
+
export declare const DEFAULT_WEEKDAY_STYLE: WeekdayStyle;
|
|
6
9
|
/** Whether a date falls outside the allowed range. */
|
|
7
10
|
export declare const isDateInvalid: (date: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null) => boolean;
|
|
8
11
|
/**
|
|
@@ -30,12 +33,18 @@ export declare const previousAvailableDate: (date: CalendarDate, minValue: DateV
|
|
|
30
33
|
/** Whether two visible durations span the same thing. */
|
|
31
34
|
export declare const isEqualDuration: (a: DateDuration, b: DateDuration) => boolean;
|
|
32
35
|
/**
|
|
33
|
-
*
|
|
36
|
+
* Default bounds spanning 1900 to 2099, expressed in `calendar`'s own year numbering.
|
|
34
37
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
38
|
+
* Both ends are built Gregorian and converted rather than assembled from a year number, because a
|
|
39
|
+
* `CalendarDate` counts its year from the start of an era: Japanese 1900 is the 1900th year of
|
|
40
|
+
* Reiwa, two millennia out. A fixed offset per system cannot stand in for the conversion either,
|
|
41
|
+
* since an era can turn over inside the span — 1900 is Meiji, 2026 is Reiwa — and a year is not
|
|
42
|
+
* the same length in every calendar.
|
|
37
43
|
*/
|
|
38
|
-
export declare const
|
|
44
|
+
export declare const getDefaultYearBounds: (calendar: Calendar) => {
|
|
45
|
+
maxValue: CalendarDate;
|
|
46
|
+
minValue: CalendarDate;
|
|
47
|
+
};
|
|
39
48
|
/**
|
|
40
49
|
* Every year start from `start` to `end` inclusive.
|
|
41
50
|
*
|
package/dist/utils/calendar.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { isSameDay, maxDate, minDate, startOfMonth, startOfWeek, startOfYear, toCalendarDate } from "@internationalized/date";
|
|
1
|
+
import { CalendarDate, isSameDay, maxDate, minDate, startOfMonth, startOfWeek, startOfYear, toCalendar, toCalendarDate } from "@internationalized/date";
|
|
2
2
|
//#region src/utils/calendar.ts
|
|
3
|
+
/** How wide a weekday name is written when nothing asks for a width. */
|
|
4
|
+
var DEFAULT_WEEKDAY_STYLE = "short";
|
|
3
5
|
/** Whether a date falls outside the allowed range. */
|
|
4
6
|
var isDateInvalid = (date, minValue, maxValue) => minValue != null && date.compare(minValue) < 0 || maxValue != null && date.compare(maxValue) > 0;
|
|
5
7
|
/**
|
|
@@ -74,27 +76,22 @@ var previousAvailableDate = (date, minValue, isDateUnavailable) => {
|
|
|
74
76
|
};
|
|
75
77
|
/** Whether two visible durations span the same thing. */
|
|
76
78
|
var isEqualDuration = (a, b) => a === b || a.days === b.days && a.weeks === b.weeks && a.months === b.months && a.years === b.years;
|
|
79
|
+
/** The stretch of real time the default bounds cover, written as Gregorian years. */
|
|
80
|
+
var DEFAULT_MIN_YEAR = 1900;
|
|
81
|
+
var DEFAULT_MAX_YEAR = 2099;
|
|
77
82
|
/**
|
|
78
|
-
*
|
|
83
|
+
* Default bounds spanning 1900 to 2099, expressed in `calendar`'s own year numbering.
|
|
79
84
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
85
|
+
* Both ends are built Gregorian and converted rather than assembled from a year number, because a
|
|
86
|
+
* `CalendarDate` counts its year from the start of an era: Japanese 1900 is the 1900th year of
|
|
87
|
+
* Reiwa, two millennia out. A fixed offset per system cannot stand in for the conversion either,
|
|
88
|
+
* since an era can turn over inside the span — 1900 is Meiji, 2026 is Reiwa — and a year is not
|
|
89
|
+
* the same length in every calendar.
|
|
82
90
|
*/
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
case "ethioaa": return -8;
|
|
88
|
-
case "coptic": return -284;
|
|
89
|
-
case "hebrew": return 3760;
|
|
90
|
-
case "indian": return -78;
|
|
91
|
-
case "islamic-civil":
|
|
92
|
-
case "islamic-tbla":
|
|
93
|
-
case "islamic-umalqura": return -579;
|
|
94
|
-
case "persian": return -600;
|
|
95
|
-
default: return 0;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
91
|
+
var getDefaultYearBounds = (calendar) => ({
|
|
92
|
+
maxValue: toCalendar(new CalendarDate(DEFAULT_MAX_YEAR, 12, 31), calendar),
|
|
93
|
+
minValue: toCalendar(new CalendarDate(DEFAULT_MIN_YEAR, 1, 1), calendar)
|
|
94
|
+
});
|
|
98
95
|
/**
|
|
99
96
|
* Every year start from `start` to `end` inclusive.
|
|
100
97
|
*
|
|
@@ -112,7 +109,7 @@ var getYearRange = (start, end) => {
|
|
|
112
109
|
return years;
|
|
113
110
|
};
|
|
114
111
|
/** The weekday names above a day view, starting from the week `start` falls in. */
|
|
115
|
-
var getDayViewWeekDayLabels = (start, locale, firstDayOfWeek, weekdayStyle =
|
|
112
|
+
var getDayViewWeekDayLabels = (start, locale, firstDayOfWeek, weekdayStyle = DEFAULT_WEEKDAY_STYLE, timeZone = "UTC") => {
|
|
116
113
|
const formatter = new Intl.DateTimeFormat(locale, {
|
|
117
114
|
timeZone,
|
|
118
115
|
weekday: weekdayStyle
|
|
@@ -162,4 +159,4 @@ var getDayViewGridRows = (start, end, locale, firstDayOfWeek) => {
|
|
|
162
159
|
return rows;
|
|
163
160
|
};
|
|
164
161
|
//#endregion
|
|
165
|
-
export { alignCenter, alignEnd, alignStart, constrainStart, constrainValue, getDayViewGridRows, getDayViewWeekDayLabels,
|
|
162
|
+
export { DEFAULT_WEEKDAY_STYLE, alignCenter, alignEnd, alignStart, constrainStart, constrainValue, getDayViewGridRows, getDayViewWeekDayLabels, getDefaultYearBounds, getYearRange, isDateInvalid, isEqualDuration, previousAvailableDate };
|
package/dist/utils/compose.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolve a `tv()` slot function into a class string,
|
|
2
|
+
* Resolve a `tv()` slot function into a class string, appending a caller `class`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `class` rather than `className`: `tv()` accepts either, and `class` is the Vue idiom.
|
|
4
|
+
* The slot function owns the slot's own classes, so a caller class goes through it rather
|
|
5
|
+
* than around it. Declaring `class` as a prop is what takes it out of Vue's attribute
|
|
6
|
+
* fallthrough in the first place, leaving each part to place it.
|
|
9
7
|
*
|
|
10
8
|
* @example
|
|
11
9
|
* ```ts
|
package/dist/utils/compose.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
//#region src/utils/compose.ts
|
|
2
2
|
/**
|
|
3
|
-
* Resolve a `tv()` slot function into a class string,
|
|
3
|
+
* Resolve a `tv()` slot function into a class string, appending a caller `class`.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `class` rather than `className`: `tv()` accepts either, and `class` is the Vue idiom.
|
|
5
|
+
* The slot function owns the slot's own classes, so a caller class goes through it rather
|
|
6
|
+
* than around it. Declaring `class` as a prop is what takes it out of Vue's attribute
|
|
7
|
+
* fallthrough in the first place, leaving each part to place it.
|
|
10
8
|
*
|
|
11
9
|
* @example
|
|
12
10
|
* ```ts
|
|
@@ -27,6 +27,8 @@ export declare class ListDropTargetDelegate implements DropTargetDelegate {
|
|
|
27
27
|
private layout;
|
|
28
28
|
private orientation;
|
|
29
29
|
protected direction: "ltr" | "rtl";
|
|
30
|
+
/** The element found for each key, kept between calls and rechecked as each one is read. */
|
|
31
|
+
private elements;
|
|
30
32
|
constructor(collection: DragCollection, element: ShallowRef<HTMLElement | null>, options?: ListDropTargetDelegateOptions);
|
|
31
33
|
private getPrimaryStart;
|
|
32
34
|
private getPrimaryEnd;
|
|
@@ -44,11 +46,27 @@ export declare class ListDropTargetDelegate implements DropTargetDelegate {
|
|
|
44
46
|
*/
|
|
45
47
|
private resolveWithinItem;
|
|
46
48
|
/**
|
|
47
|
-
*
|
|
49
|
+
* Look up the element rendering a key, reusing what an earlier call found.
|
|
50
|
+
*
|
|
51
|
+
* The search above reads a handful of keys, but the map behind it is built from *every*
|
|
52
|
+
* element the container holds — for a table, every cell as well as every row. A drag asks for
|
|
53
|
+
* a target on each `dragover`, up to the display's refresh rate, so building that map per call
|
|
54
|
+
* costs more than the search it feeds.
|
|
55
|
+
*
|
|
56
|
+
* Keeping it means the DOM can move on without it, so every entry is rechecked as it is read,
|
|
57
|
+
* against the same conditions that put it there. A stale or missing one rebuilds the map —
|
|
58
|
+
* once per call, since a key the collection has and the DOM does not would otherwise rebuild
|
|
59
|
+
* it at every step of the search.
|
|
60
|
+
*/
|
|
61
|
+
private createElementLookup;
|
|
62
|
+
/**
|
|
63
|
+
* Which elements carry a key.
|
|
48
64
|
*
|
|
49
65
|
* Scoped by `data-collection` when the container declares one, so a nested collection's rows
|
|
50
66
|
* are not mistaken for this one's. Both attributes are already emitted by `ListBoxItem` and
|
|
51
67
|
* `TableRow`.
|
|
52
68
|
*/
|
|
69
|
+
private getElementSelector;
|
|
70
|
+
/** Map each item key to the element currently rendering it. */
|
|
53
71
|
private buildElementMap;
|
|
54
72
|
}
|
|
@@ -18,6 +18,8 @@ var ListDropTargetDelegate = class {
|
|
|
18
18
|
layout;
|
|
19
19
|
orientation;
|
|
20
20
|
direction;
|
|
21
|
+
/** The element found for each key, kept between calls and rechecked as each one is read. */
|
|
22
|
+
elements = /* @__PURE__ */ new Map();
|
|
21
23
|
constructor(collection, element, options = {}) {
|
|
22
24
|
this.collection = collection;
|
|
23
25
|
this.element = element;
|
|
@@ -57,14 +59,14 @@ var ListDropTargetDelegate = class {
|
|
|
57
59
|
const isPrimaryRTL = this.orientation === "horizontal" && this.direction === "rtl";
|
|
58
60
|
const isSecondaryRTL = this.layout === "grid" && this.orientation === "vertical" && this.direction === "rtl";
|
|
59
61
|
const isFlowRTL = this.layout === "stack" ? isPrimaryRTL : isSecondaryRTL;
|
|
60
|
-
const
|
|
62
|
+
const findElement = this.createElementLookup(container);
|
|
61
63
|
let low = 0;
|
|
62
64
|
let high = items.length;
|
|
63
65
|
while (low < high) {
|
|
64
66
|
const mid = Math.floor((low + high) / 2);
|
|
65
67
|
const key = items[mid];
|
|
66
68
|
if (key == null) break;
|
|
67
|
-
const element =
|
|
69
|
+
const element = findElement(String(key));
|
|
68
70
|
if (!element) break;
|
|
69
71
|
const rect = element.getBoundingClientRect();
|
|
70
72
|
const update = (isGreater) => {
|
|
@@ -79,7 +81,7 @@ var ListDropTargetDelegate = class {
|
|
|
79
81
|
}
|
|
80
82
|
const key = items[Math.min(low, items.length - 1)];
|
|
81
83
|
if (key == null) return { type: "root" };
|
|
82
|
-
const rect =
|
|
84
|
+
const rect = findElement(String(key))?.getBoundingClientRect();
|
|
83
85
|
return {
|
|
84
86
|
dropPosition: (rect != null && (primary < this.getPrimaryStart(rect) || Math.abs(flow - this.getFlowStart(rect)) < Math.abs(flow - this.getFlowEnd(rect)))) === isFlowRTL ? "after" : "before",
|
|
85
87
|
key,
|
|
@@ -136,15 +138,44 @@ var ListDropTargetDelegate = class {
|
|
|
136
138
|
return target;
|
|
137
139
|
}
|
|
138
140
|
/**
|
|
139
|
-
*
|
|
141
|
+
* Look up the element rendering a key, reusing what an earlier call found.
|
|
142
|
+
*
|
|
143
|
+
* The search above reads a handful of keys, but the map behind it is built from *every*
|
|
144
|
+
* element the container holds — for a table, every cell as well as every row. A drag asks for
|
|
145
|
+
* a target on each `dragover`, up to the display's refresh rate, so building that map per call
|
|
146
|
+
* costs more than the search it feeds.
|
|
147
|
+
*
|
|
148
|
+
* Keeping it means the DOM can move on without it, so every entry is rechecked as it is read,
|
|
149
|
+
* against the same conditions that put it there. A stale or missing one rebuilds the map —
|
|
150
|
+
* once per call, since a key the collection has and the DOM does not would otherwise rebuild
|
|
151
|
+
* it at every step of the search.
|
|
152
|
+
*/
|
|
153
|
+
createElementLookup(container) {
|
|
154
|
+
const selector = this.getElementSelector(container);
|
|
155
|
+
let isRebuilt = false;
|
|
156
|
+
return (key) => {
|
|
157
|
+
const element = this.elements.get(key);
|
|
158
|
+
if (element?.dataset["key"] === key && element.matches(selector) && container.contains(element)) return element;
|
|
159
|
+
if (!isRebuilt) {
|
|
160
|
+
isRebuilt = true;
|
|
161
|
+
this.elements = this.buildElementMap(container, selector);
|
|
162
|
+
}
|
|
163
|
+
return this.elements.get(key);
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Which elements carry a key.
|
|
140
168
|
*
|
|
141
169
|
* Scoped by `data-collection` when the container declares one, so a nested collection's rows
|
|
142
170
|
* are not mistaken for this one's. Both attributes are already emitted by `ListBoxItem` and
|
|
143
171
|
* `TableRow`.
|
|
144
172
|
*/
|
|
145
|
-
|
|
173
|
+
getElementSelector(container) {
|
|
146
174
|
const collectionId = container.dataset["collection"];
|
|
147
|
-
|
|
175
|
+
return collectionId ? `[data-collection="${CSS.escape(collectionId)}"]` : "[data-key]";
|
|
176
|
+
}
|
|
177
|
+
/** Map each item key to the element currently rendering it. */
|
|
178
|
+
buildElementMap(container, selector) {
|
|
148
179
|
const map = /* @__PURE__ */ new Map();
|
|
149
180
|
for (const element of container.querySelectorAll(selector)) if (element instanceof HTMLElement && element.dataset["key"] != null) map.set(element.dataset["key"], element);
|
|
150
181
|
return map;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./aria-hide-outside.js";
|
|
|
2
2
|
export * from "./assertion.js";
|
|
3
3
|
export * from "./block.js";
|
|
4
4
|
export * from "./calendar.js";
|
|
5
|
+
export * from "./calendar-systems.js";
|
|
5
6
|
export * from "./color.js";
|
|
6
7
|
export * from "./color-types.js";
|
|
7
8
|
export * from "./compose.js";
|
|
@@ -67,6 +67,14 @@ export declare class ListLayout<Options extends ListLayoutOptions = ListLayoutOp
|
|
|
67
67
|
protected snapVisibleRect(rect: Rect): Rect;
|
|
68
68
|
/** Every layout info inside `rect`, snapped to whole rows, parents before children. */
|
|
69
69
|
getVisibleLayoutInfos(rect: Rect): LayoutInfo[];
|
|
70
|
+
/**
|
|
71
|
+
* The same, read off the rendered set as it stands rather than laying one out.
|
|
72
|
+
*
|
|
73
|
+
* Asking `getVisibleLayoutInfos` a question moves the window to whatever was asked about, so a
|
|
74
|
+
* caller with a rectangle narrower than the window — a drop resolving a point — would shrink
|
|
75
|
+
* the rendered set to the width of its own question and prune everything else away.
|
|
76
|
+
*/
|
|
77
|
+
protected getRenderedLayoutInfos(rect: Rect): LayoutInfo[];
|
|
70
78
|
update(context: InvalidationContext<Options>): void;
|
|
71
79
|
shouldInvalidateLayoutOptions(newOptions: Options, oldOptions: Options): boolean;
|
|
72
80
|
/**
|
|
@@ -92,10 +92,20 @@ var ListLayout = class extends Layout {
|
|
|
92
92
|
getVisibleLayoutInfos(rect) {
|
|
93
93
|
const searchRect = this.snapVisibleRect(rect);
|
|
94
94
|
this.layoutFor(searchRect);
|
|
95
|
+
return this.getRenderedLayoutInfos(searchRect);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The same, read off the rendered set as it stands rather than laying one out.
|
|
99
|
+
*
|
|
100
|
+
* Asking `getVisibleLayoutInfos` a question moves the window to whatever was asked about, so a
|
|
101
|
+
* caller with a rectangle narrower than the window — a drop resolving a point — would shrink
|
|
102
|
+
* the rendered set to the width of its own question and prune everything else away.
|
|
103
|
+
*/
|
|
104
|
+
getRenderedLayoutInfos(rect) {
|
|
95
105
|
const result = [];
|
|
96
106
|
const addNodes = (nodes) => {
|
|
97
107
|
for (const node of nodes) {
|
|
98
|
-
if (!this.isVisible(node,
|
|
108
|
+
if (!this.isVisible(node, rect)) continue;
|
|
99
109
|
result.push(node.layoutInfo);
|
|
100
110
|
addNodes(node.children);
|
|
101
111
|
}
|
|
@@ -393,7 +403,7 @@ var ListLayout = class extends Layout {
|
|
|
393
403
|
const searchRect = new Rect(pointX, Math.max(0, pointY - this.gap), 1, Math.max(1, this.gap * 2));
|
|
394
404
|
let key = null;
|
|
395
405
|
let minDistance = Infinity;
|
|
396
|
-
for (const candidate of this.
|
|
406
|
+
for (const candidate of this.getRenderedLayoutInfos(searchRect)) {
|
|
397
407
|
if (!this.isDropCandidate(candidate) || !candidate.rect.intersects(searchRect)) continue;
|
|
398
408
|
const distance = Math.min(Math.abs(candidate.rect.y - pointY), Math.abs(candidate.rect.maxY - pointY));
|
|
399
409
|
if (distance < minDistance) {
|
|
@@ -29,6 +29,7 @@ export declare class TableLayout<Options extends TableLayoutOptions = TableLayou
|
|
|
29
29
|
* and nothing to clamp against.
|
|
30
30
|
*/
|
|
31
31
|
getVisibleLayoutInfos(rect: Rect): LayoutInfo[];
|
|
32
|
+
protected getRenderedLayoutInfos(): LayoutInfo[];
|
|
32
33
|
private addVisibleLayoutInfos;
|
|
33
34
|
protected getEstimatedRowHeight(): number;
|
|
34
35
|
protected buildCollection(): LayoutNode[];
|
|
@@ -62,6 +62,9 @@ var TableLayout = class extends ListLayout {
|
|
|
62
62
|
*/
|
|
63
63
|
getVisibleLayoutInfos(rect) {
|
|
64
64
|
this.layoutFor(this.snapVisibleRect(rect));
|
|
65
|
+
return this.getRenderedLayoutInfos();
|
|
66
|
+
}
|
|
67
|
+
getRenderedLayoutInfos() {
|
|
65
68
|
const result = [];
|
|
66
69
|
for (const node of this.rootNodes) {
|
|
67
70
|
result.push(node.layoutInfo);
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ropav",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "🚀 Beautiful and modern Vue UI library built with Vapor Mode and Tailwind CSS 4.0.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"type": "module",
|
|
30
|
-
"sideEffects":
|
|
30
|
+
"sideEffects": [
|
|
31
|
+
"*.css"
|
|
32
|
+
],
|
|
31
33
|
"main": "./dist/index.js",
|
|
32
34
|
"module": "./dist/index.js",
|
|
33
35
|
"types": "./dist/index.d.ts",
|
|
@@ -41,6 +43,11 @@
|
|
|
41
43
|
"style": "./dist/styles.css",
|
|
42
44
|
"default": "./dist/styles.css"
|
|
43
45
|
},
|
|
46
|
+
"./styles/no-preflight": {
|
|
47
|
+
"style": "./dist/styles-no-preflight.css",
|
|
48
|
+
"default": "./dist/styles-no-preflight.css"
|
|
49
|
+
},
|
|
50
|
+
"./styles/bundled.css": "./dist/ropav.min.css",
|
|
44
51
|
"./accordion": {
|
|
45
52
|
"import": "./dist/components/accordion/index.js",
|
|
46
53
|
"types": "./dist/components/accordion/index.d.ts"
|
|
@@ -409,11 +416,10 @@
|
|
|
409
416
|
"@internationalized/date": "3.12.4",
|
|
410
417
|
"@internationalized/number": "3.6.8",
|
|
411
418
|
"@internationalized/string": "3.2.10",
|
|
412
|
-
"
|
|
413
|
-
"@ropav/styles": "0.6.0"
|
|
419
|
+
"@ropav/styles": "0.8.0"
|
|
414
420
|
},
|
|
415
421
|
"peerDependencies": {
|
|
416
422
|
"tailwindcss": ">=4.0.0",
|
|
417
|
-
"vue": "^3.6.0-rc.
|
|
423
|
+
"vue": "^3.6.0-rc.7"
|
|
418
424
|
}
|
|
419
425
|
}
|