@lostgradient/cinder 0.19.1 → 0.21.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/CHANGELOG.md +486 -0
- package/README.md +6 -3
- package/components.json +219 -121
- package/dist/_internal/anchored-overlay.svelte.d.ts +11 -1
- package/dist/_internal/date-value.d.ts +22 -0
- package/dist/_internal/form-field-context.d.ts +1 -1
- package/dist/_internal/form-field-frame.svelte.d.ts +43 -0
- package/dist/_internal/form-field-provider.svelte.d.ts +9 -0
- package/dist/_internal/overlay.d.ts +2 -1
- package/dist/_internal/text-direction-container.d.ts +14 -0
- package/dist/_internal/text-direction-css.d.ts +7 -0
- package/dist/_internal/text-direction.d.ts +6 -1
- package/dist/_internal/tree-autoscroll.svelte.d.ts +27 -0
- package/dist/_internal/tree-filter.svelte.d.ts +37 -0
- package/dist/cli/index.js +63 -414
- package/dist/cli/knowledge.js +391 -0
- package/dist/components/_internal/chart-data-table.svelte.d.ts +15 -0
- package/dist/components/_internal/checkbox-indicator-shell.svelte.d.ts +8 -0
- package/dist/components/_internal/create-command-list-state.svelte.d.ts +24 -2
- package/dist/components/_internal/person-byline.css +29 -0
- package/dist/components/_internal/person-byline.svelte.d.ts +9 -0
- package/dist/components/_internal/section-skeleton.css +45 -0
- package/dist/components/_radio/radio.types.d.ts +1 -1
- package/dist/components/access-gate/access-gate.css +55 -6
- package/dist/components/access-gate/index.js +681 -427
- package/dist/components/accordion-item/accordion-item.css +8 -6
- package/dist/components/alert/alert.schema.js +2 -2
- package/dist/components/alert/alert.types.d.ts +1 -1
- package/dist/components/alert/index.js +3 -3
- package/dist/components/alert-dialog/alert-dialog.schema.js +3 -3
- package/dist/components/alert-dialog/alert-dialog.svelte.d.ts +1 -1
- package/dist/components/alert-dialog/alert-dialog.types.d.ts +2 -2
- package/dist/components/alert-dialog/index.js +771 -171
- package/dist/components/approval-card/approval-card.css +9 -2
- package/dist/components/approval-card/approval-card.schema.js +6 -4
- package/dist/components/approval-card/approval-card.types.d.ts +4 -4
- package/dist/components/approval-card/index.js +2681 -1442
- package/dist/components/area-chart/area-chart.css +4 -3
- package/dist/components/area-chart/area-chart.svelte.d.ts +1 -1
- package/dist/components/area-chart/index.d.ts +1 -0
- package/dist/components/area-chart/index.js +1251 -391
- package/dist/components/autocomplete/autocomplete.css +2 -49
- package/dist/components/autocomplete/autocomplete.schema.js +2 -2
- package/dist/components/autocomplete/autocomplete.types.d.ts +3 -3
- package/dist/components/autocomplete/index.js +1794 -589
- package/dist/components/avatar/avatar.css +0 -2
- package/dist/components/avatar/avatar.schema.js +6 -11
- package/dist/components/avatar/avatar.types.d.ts +1 -1
- package/dist/components/avatar-group/avatar-group.css +3 -1
- package/dist/components/avatar-group/index.js +1287 -360
- package/dist/components/backdrop/backdrop.schema.js +3 -3
- package/dist/components/backdrop/backdrop.types.d.ts +2 -2
- package/dist/components/backdrop/index.js +18 -6
- package/dist/components/badge/badge.css +2 -2
- package/dist/components/badge/badge.schema.js +2 -2
- package/dist/components/badge/badge.types.d.ts +3 -3
- package/dist/components/badge/index.js +296 -77
- package/dist/components/banner/banner.schema.js +6 -4
- package/dist/components/banner/banner.types.d.ts +3 -3
- package/dist/components/banner/index.js +3 -3
- package/dist/components/bar-chart/bar-chart.css +4 -3
- package/dist/components/bar-chart/bar-chart.svelte.d.ts +1 -1
- package/dist/components/bar-chart/index.d.ts +1 -0
- package/dist/components/bar-chart/index.js +1233 -377
- package/dist/components/bento-cell/bento-cell.schema.js +103 -3
- package/dist/components/bento-cell/bento-cell.types.d.ts +3 -2
- package/dist/components/bento-cell/index.js +3 -3
- package/dist/components/bento-grid/bento-grid.css +7 -17
- package/dist/components/bento-grid/bento-grid.schema.js +104 -4
- package/dist/components/bento-grid/bento-grid.types.d.ts +4 -3
- package/dist/components/bento-grid/index.js +44 -98
- package/dist/components/blog-section/blog-section.css +4 -47
- package/dist/components/blog-section/index.js +139 -242
- package/dist/components/breadcrumbs/breadcrumbs.types.d.ts +2 -1
- package/dist/components/breadcrumbs/index.js +14 -10
- package/dist/components/button/button.css +15 -5
- package/dist/components/button/index.js +5 -5
- package/dist/components/button-group/button-group.schema.js +3 -2
- package/dist/components/button-group/button-group.svelte.d.ts +13 -0
- package/dist/components/button-group/button-group.types.d.ts +1 -1
- package/dist/components/button-group/index.js +4 -5
- package/dist/components/calendar/calendar.css +3 -0
- package/dist/components/calendar/calendar.schema.js +9 -5
- package/dist/components/calendar/calendar.types.d.ts +4 -4
- package/dist/components/calendar/index.js +104 -46
- package/dist/components/{cta-section/cta-section.css → call-to-action-section/call-to-action-section.css} +11 -11
- package/dist/components/{cta-section/cta-section.schema.js → call-to-action-section/call-to-action-section.schema.js} +5 -5
- package/dist/components/{cta-section/cta-section.svelte.d.ts → call-to-action-section/call-to-action-section.svelte.d.ts} +5 -5
- package/dist/components/{cta-section/cta-section.types.d.ts → call-to-action-section/call-to-action-section.types.d.ts} +23 -11
- package/dist/components/{floating-action-button/floating-action-button.variables.js → call-to-action-section/call-to-action-section.variables.js} +4 -4
- package/dist/components/call-to-action-section/index.d.ts +5 -0
- package/dist/components/{cta-section → call-to-action-section}/index.js +20 -18
- package/dist/components/callout/callout.css +5 -0
- package/dist/components/capability-gate/capability-gate.schema.js +4 -4
- package/dist/components/capability-gate/capability-gate.types.d.ts +9 -6
- package/dist/components/capability-gate/index.js +8 -8
- package/dist/components/card/card.css +25 -7
- package/dist/components/card/card.schema.js +7 -7
- package/dist/components/card/card.svelte.d.ts +2 -2
- package/dist/components/card/card.types.d.ts +4 -3
- package/dist/components/card/index.js +2 -2
- package/dist/components/carousel/carousel.css +81 -7
- package/dist/components/carousel/carousel.schema.js +43 -2
- package/dist/components/carousel/carousel.svelte.d.ts +25 -4
- package/dist/components/carousel/carousel.types.d.ts +43 -2
- package/dist/components/carousel/carousel.variables.js +7 -2
- package/dist/components/carousel/index.d.ts +1 -1
- package/dist/components/carousel/index.js +2261 -274
- package/dist/components/checkbox/checkbox.css +63 -29
- package/dist/components/checkbox/checkbox.schema.js +7 -7
- package/dist/components/checkbox/checkbox.types.d.ts +4 -4
- package/dist/components/checkbox/index.js +409 -101
- package/dist/components/checkbox-group/checkbox-group.css +7 -9
- package/dist/components/checkbox-group/checkbox-group.types.d.ts +2 -1
- package/dist/components/checkbox-group/index.js +31 -16
- package/dist/components/chip/chip.css +3 -0
- package/dist/components/chip/chip.schema.js +3 -3
- package/dist/components/chip/chip.types.d.ts +6 -6
- package/dist/components/chip/index.js +7 -7
- package/dist/components/choice-grid/choice-grid.css +2 -9
- package/dist/components/choice-grid/choice-grid.schema.js +5 -6
- package/dist/components/choice-grid/choice-grid.types.d.ts +1 -22
- package/dist/components/choice-grid/index.js +41 -19
- package/dist/components/choice-grid-item/choice-grid-item.svelte.d.ts +1 -1
- package/dist/components/click-away-listener/click-away-listener.schema.js +3 -3
- package/dist/components/click-away-listener/click-away-listener.types.d.ts +3 -3
- package/dist/components/click-away-listener/index.js +3 -3
- package/dist/components/code-block/code-block.css +36 -2
- package/dist/components/code-block/code-block.schema.js +10 -2
- package/dist/components/code-block/code-block.types.d.ts +9 -1
- package/dist/components/code-block/index.js +271 -8
- package/dist/components/collapsible/collapsible.css +16 -8
- package/dist/components/collapsible/collapsible.schema.js +2 -2
- package/dist/components/collapsible/collapsible.types.d.ts +1 -1
- package/dist/components/collapsible/index.js +3 -3
- package/dist/components/color-field/color-field.css +3 -1
- package/dist/components/color-field/color-field.schema.js +2 -6
- package/dist/components/color-field/color-field.svelte.d.ts +1 -1
- package/dist/components/color-field/color-field.types.d.ts +2 -5
- package/dist/components/color-field/index.js +763 -338
- package/dist/components/color-picker/color-picker.css +1 -1
- package/dist/components/color-picker/color-picker.schema.js +1 -5
- package/dist/components/color-picker/color-picker.types.d.ts +0 -2
- package/dist/components/color-picker/index.js +16 -28
- package/dist/components/color-swatch-picker/color-swatch-picker.schema.js +2 -6
- package/dist/components/color-swatch-picker/color-swatch-picker.svelte.d.ts +1 -1
- package/dist/components/color-swatch-picker/color-swatch-picker.types.d.ts +1 -3
- package/dist/components/color-swatch-picker/index.js +5 -6
- package/dist/components/combobox/combobox.css +20 -18
- package/dist/components/combobox/combobox.schema.js +3 -3
- package/dist/components/combobox/combobox.svelte.d.ts +2 -2
- package/dist/components/combobox/combobox.types.d.ts +3 -3
- package/dist/components/combobox/index.js +2457 -624
- package/dist/components/command-item/command-item.schema.js +3 -3
- package/dist/components/command-item/command-item.types.d.ts +13 -5
- package/dist/components/command-item/index.js +4 -4
- package/dist/components/command-menu/command-menu-inline-completion.svelte.d.ts +89 -0
- package/dist/components/command-menu/command-menu.css +28 -10
- package/dist/components/command-menu/command-menu.schema.js +14 -6
- package/dist/components/command-menu/command-menu.svelte.d.ts +1 -1
- package/dist/components/command-menu/command-menu.types.d.ts +33 -5
- package/dist/components/command-menu/index.d.ts +1 -1
- package/dist/components/command-menu/index.js +2893 -385
- package/dist/components/command-palette/command-palette.css +4 -2
- package/dist/components/command-palette/command-palette.schema.js +3 -3
- package/dist/components/command-palette/command-palette.types.d.ts +2 -2
- package/dist/components/command-palette/index.js +325 -6
- package/dist/components/confirm-dialog/confirm-dialog.schema.js +3 -3
- package/dist/components/confirm-dialog/confirm-dialog.svelte.d.ts +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.types.d.ts +2 -2
- package/dist/components/confirm-dialog/index.js +1392 -363
- package/dist/components/connection-indicator/connection-indicator.css +5 -4
- package/dist/components/container/container.schema.js +4 -4
- package/dist/components/context-menu/context-menu.schema.js +2 -2
- package/dist/components/context-menu/context-menu.types.d.ts +1 -1
- package/dist/components/context-menu/index.js +2812 -476
- package/dist/components/copy-button/copy-button.css +4 -1
- package/dist/components/copy-button/copy-button.schema.js +6 -1
- package/dist/components/copy-button/copy-button.types.d.ts +2 -0
- package/dist/components/copy-button/index.js +16 -3
- package/dist/components/data-grid/_internal/geometry.d.ts +3 -5
- package/dist/components/data-grid/_internal/selection-model-test-support.svelte.d.ts +4 -0
- package/dist/components/data-grid/_internal/selection-model.svelte.d.ts +4 -2
- package/dist/components/data-grid/data-grid.css +8 -2
- package/dist/components/data-grid/data-grid.schema.js +3 -3
- package/dist/components/data-grid/data-grid.types.d.ts +2 -2
- package/dist/components/data-grid/index.js +53 -33
- package/dist/components/data-table/data-table.svelte.d.ts +1 -1
- package/dist/components/data-table/index.js +1032 -462
- package/dist/components/date-picker/date-picker.css +8 -3
- package/dist/components/date-picker/date-picker.schema.js +5 -1
- package/dist/components/date-picker/date-picker.svelte.d.ts +1 -1
- package/dist/components/date-picker/date-picker.types.d.ts +2 -0
- package/dist/components/date-picker/index.js +2317 -664
- package/dist/components/date-range-field/date-range-field.css +7 -12
- package/dist/components/date-range-field/date-range-field.schema.js +3 -2
- package/dist/components/date-range-field/date-range-field.types.d.ts +10 -13
- package/dist/components/date-range-field/index.js +2428 -873
- package/dist/components/diff-statistics/diff-statistics.css +3 -3
- package/dist/components/diff-statistics/index.js +17 -1
- package/dist/components/drawer/drawer.css +25 -12
- package/dist/components/drawer/index.js +387 -25
- package/dist/components/dropdown/dropdown.css +2 -2
- package/dist/components/dropdown/index.js +2633 -572
- package/dist/components/dropdown-item/index.js +2 -2
- package/dist/components/dropdown-menu/index.js +2262 -288
- package/dist/components/dropdown-trigger/dropdown-trigger.schema.js +2 -2
- package/dist/components/dropdown-trigger/dropdown-trigger.types.d.ts +1 -1
- package/dist/components/dropdown-trigger/index.js +12 -6
- package/dist/components/event-stream-viewer/event-stream-viewer.css +35 -9
- package/dist/components/event-stream-viewer/event-stream-viewer.schema.js +4 -4
- package/dist/components/event-stream-viewer/event-stream-viewer.svelte.d.ts +2 -1
- package/dist/components/event-stream-viewer/event-stream-viewer.types.d.ts +6 -6
- package/dist/components/event-stream-viewer/event-stream-viewer.variables.js +5 -2
- package/dist/components/event-stream-viewer/index.js +749 -634
- package/dist/components/event-timeline/event-timeline-modal.d.ts +5 -0
- package/dist/components/event-timeline/event-timeline.css +192 -5
- package/dist/components/event-timeline/event-timeline.svelte.d.ts +4 -2
- package/dist/components/event-timeline/index.js +3860 -112
- package/dist/components/faceted-filter-bar/faceted-filter-bar.schema.js +6 -6
- package/dist/components/faceted-filter-bar/faceted-filter-bar.types.d.ts +5 -5
- package/dist/components/faceted-filter-bar/index.js +146 -156
- package/dist/components/feature-section/feature-section.css +18 -3
- package/dist/components/feature-section/feature-section.types.d.ts +7 -2
- package/dist/components/feature-section/index.js +3 -3
- package/dist/components/feed/feed.svelte.d.ts +4 -2
- package/dist/components/file-upload/file-upload.schema.js +6 -7
- package/dist/components/file-upload/file-upload.types.d.ts +2 -2
- package/dist/components/file-upload/index.js +3 -3
- package/dist/components/{floating-action-button/floating-action-button.css → floating-action/floating-action.css} +61 -49
- package/dist/components/{floating-action-button/floating-action-button.schema.js → floating-action/floating-action.schema.js} +7 -7
- package/dist/components/{floating-action-button/floating-action-button.svelte.d.ts → floating-action/floating-action.svelte.d.ts} +5 -5
- package/dist/components/{floating-action-button/floating-action-button.types.d.ts → floating-action/floating-action.types.d.ts} +25 -25
- package/dist/components/{stats-section/stats-section.variables.js → floating-action/floating-action.variables.js} +4 -4
- package/dist/components/floating-action/index.d.ts +5 -0
- package/dist/components/{floating-action-button → floating-action}/index.js +18 -18
- package/dist/components/focus-trap/index.js +386 -24
- package/dist/components/footer/footer.css +17 -5
- package/dist/components/form-field/form-field.css +1 -1
- package/dist/components/form-field/form-field.schema.js +7 -3
- package/dist/components/form-field/form-field.types.d.ts +8 -6
- package/dist/components/form-field/index.js +272 -69
- package/dist/components/form-section/form-section.schema.js +2 -2
- package/dist/components/grid/grid.css +21 -0
- package/dist/components/grid/grid.schema.js +108 -2
- package/dist/components/grid/grid.types.d.ts +12 -5
- package/dist/components/grid/index.js +4 -2
- package/dist/components/grid-item/grid-item.schema.js +92 -2
- package/dist/components/grid-item/grid-item.types.d.ts +2 -1
- package/dist/components/grid-list/grid-list.css +2 -11
- package/dist/components/grid-list/grid-list.types.d.ts +1 -1
- package/dist/components/grid-list/grid-list.variables.js +2 -2
- package/dist/components/grid-list/index.js +24 -14
- package/dist/components/hero-section/hero-section.css +88 -5
- package/dist/components/hero-section/hero-section.svelte.d.ts +2 -2
- package/dist/components/hero-section/index.js +119 -70
- package/dist/components/hover-card/hover-card.css +49 -5
- package/dist/components/hover-card/hover-card.schema.js +11 -7
- package/dist/components/hover-card/hover-card.types.d.ts +6 -6
- package/dist/components/hover-card/index.js +1191 -240
- package/dist/components/image/image.schema.js +7 -8
- package/dist/components/image/image.types.d.ts +3 -3
- package/dist/components/image/index.js +5 -5
- package/dist/components/inline-loading/inline-loading.css +2 -2
- package/dist/components/input/index.js +600 -171
- package/dist/components/input/input.css +11 -9
- package/dist/components/input/input.schema.js +18 -4
- package/dist/components/input/input.types.d.ts +13 -4
- package/dist/components/invocation-rule-builder/index.js +3010 -1073
- package/dist/components/invocation-rule-builder/invocation-rule-builder.css +23 -5
- package/dist/components/json-editor/index.js +441 -147
- package/dist/components/json-editor/json-editor.css +39 -5
- package/dist/components/json-editor/json-editor.schema.js +8 -5
- package/dist/components/json-editor/json-editor.types.d.ts +4 -4
- package/dist/components/json-schema-editor/form-view.svelte.d.ts +1 -1
- package/dist/components/json-schema-editor/index.js +3989 -2346
- package/dist/components/json-schema-editor/json-schema-editor-impl.svelte.d.ts +2 -2
- package/dist/components/json-schema-editor/json-schema-editor-state.types.d.ts +2 -2
- package/dist/components/json-schema-editor/json-schema-editor.css +7 -9
- package/dist/components/json-schema-editor/json-schema-editor.schema.js +3 -3
- package/dist/components/json-schema-editor/json-schema-editor.svelte.d.ts +1 -0
- package/dist/components/json-schema-editor/json-schema-editor.types.d.ts +2 -2
- package/dist/components/json-schema-editor/property-editor.svelte.d.ts +1 -1
- package/dist/components/json-schema-editor/property-list.svelte.d.ts +1 -1
- package/dist/components/json-viewer/json-viewer.css +6 -3
- package/dist/components/kanban-board/index.js +674 -528
- package/dist/components/kanban-board/kanban-board-column-reorder.svelte.d.ts +30 -0
- package/dist/components/kanban-board/kanban-board-helpers.d.ts +18 -0
- package/dist/components/kanban-board/kanban-board.css +23 -12
- package/dist/components/kanban-board/kanban-board.schema.js +5 -3
- package/dist/components/kanban-board/kanban-board.types.d.ts +2 -2
- package/dist/components/kanban-board/kanban-board.variables.js +2 -1
- package/dist/components/keyboard-shortcuts/index.js +8 -8
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.css +2 -1
- package/dist/components/label/label.schema.js +5 -6
- package/dist/components/label/label.types.d.ts +1 -1
- package/dist/components/line-chart/index.d.ts +1 -0
- package/dist/components/line-chart/index.js +1271 -411
- package/dist/components/line-chart/line-chart.css +4 -3
- package/dist/components/line-chart/line-chart.svelte.d.ts +1 -1
- package/dist/components/load-more/index.js +71 -18
- package/dist/components/load-more/load-more.schema.js +12 -8
- package/dist/components/load-more/load-more.types.d.ts +7 -7
- package/dist/components/locale-provider/locale-provider.svelte.d.ts +1 -1
- package/dist/components/logo-cloud/index.js +46 -35
- package/dist/components/logo-cloud/logo-cloud.css +6 -23
- package/dist/components/logo-cloud/logo-cloud.variables.js +2 -2
- package/dist/components/marquee/index.js +16 -3
- package/dist/components/marquee/marquee.css +3 -0
- package/dist/components/matrix-chart/index.d.ts +1 -0
- package/dist/components/matrix-chart/index.js +1070 -262
- package/dist/components/matrix-chart/matrix-chart.css +1 -0
- package/dist/components/matrix-chart/matrix-chart.schema.js +12 -7
- package/dist/components/matrix-chart/matrix-chart.types.d.ts +7 -7
- package/dist/components/media-controls/index.js +7 -8
- package/dist/components/media-controls/media-controls.css +2 -2
- package/dist/components/media-controls/media-controls.schema.js +4 -4
- package/dist/components/media-controls/media-controls.types.d.ts +6 -6
- package/dist/components/mega-menu/index.js +2041 -318
- package/dist/components/mega-menu/mega-menu-content.svelte.d.ts +16 -0
- package/dist/components/mega-menu/mega-menu.css +24 -5
- package/dist/components/mega-menu/mega-menu.schema.js +15 -7
- package/dist/components/mega-menu/mega-menu.types.d.ts +9 -7
- package/dist/components/menu-bar/index.js +2981 -893
- package/dist/components/menu-bar/menu-bar.css +11 -2
- package/dist/components/menu-bar/menu-bar.schema.js +3 -2
- package/dist/components/menu-bar/menu-bar.types.d.ts +1 -1
- package/dist/components/meter/index.js +48 -20
- package/dist/components/meter/meter.svelte.d.ts +1 -1
- package/dist/components/meter/meter.types.d.ts +2 -1
- package/dist/components/modal/index.js +730 -132
- package/dist/components/modal/modal.css +64 -26
- package/dist/components/modal/modal.schema.js +3 -3
- package/dist/components/modal/modal.types.d.ts +2 -2
- package/dist/components/multi-select/index.js +4194 -523
- package/dist/components/multi-select/multi-select.css +77 -22
- package/dist/components/multi-select/multi-select.schema.js +2 -2
- package/dist/components/multi-select/multi-select.types.d.ts +1 -1
- package/dist/components/navigation-bar/index.js +3746 -91
- package/dist/components/navigation-bar/navigation-bar-focus.d.ts +16 -0
- package/dist/components/navigation-bar/navigation-bar.css +93 -48
- package/dist/components/navigation-bar/navigation-bar.schema.js +4 -3
- package/dist/components/navigation-bar/navigation-bar.types.d.ts +5 -3
- package/dist/components/navigation-item/index.js +2 -2
- package/dist/components/navigation-item/navigation-item.css +3 -0
- package/dist/components/newsletter-section/index.js +663 -234
- package/dist/components/newsletter-section/newsletter-section.css +1 -1
- package/dist/components/newsletter-section/newsletter-section.svelte.d.ts +2 -2
- package/dist/components/number-input/index.js +341 -294
- package/dist/components/number-input/number-input.css +10 -58
- package/dist/components/number-input/number-input.schema.js +10 -16
- package/dist/components/number-input/number-input.types.d.ts +5 -3
- package/dist/components/page-header/index.js +83 -29
- package/dist/components/page-header/page-header.css +18 -9
- package/dist/components/page-header/page-header.schema.js +10 -5
- package/dist/components/page-header/page-header.svelte.d.ts +2 -2
- package/dist/components/page-header/page-header.types.d.ts +21 -7
- package/dist/components/pagination/pagination.css +3 -0
- package/dist/components/payload-inspector/index.js +632 -476
- package/dist/components/payload-inspector/payload-inspector.css +2 -2
- package/dist/components/permission-matrix/index.js +254 -5
- package/dist/components/permission-matrix/permission-matrix.css +22 -4
- package/dist/components/permission-matrix/permission-matrix.svelte.d.ts +24 -3
- package/dist/components/phone-input/index.js +172 -76
- package/dist/components/phone-input/phone-input.css +37 -56
- package/dist/components/pin-input/pin-input.css +10 -2
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +1509 -278
- package/dist/components/popover/popover.css +9 -9
- package/dist/components/popover/popover.schema.js +16 -2
- package/dist/components/popover/popover.types.d.ts +7 -1
- package/dist/components/portal/index.d.ts +1 -1
- package/dist/components/portal/index.js +830 -57
- package/dist/components/portal/portal.utilities.svelte.d.ts +31 -1
- package/dist/components/pricing-card/index.js +7 -7
- package/dist/components/pricing-card/pricing-card.css +1 -1
- package/dist/components/pricing-card/pricing-card.schema.js +2 -2
- package/dist/components/pricing-card/pricing-card.svelte.d.ts +2 -2
- package/dist/components/pricing-card/pricing-card.types.d.ts +1 -1
- package/dist/components/pricing-section/index.js +8 -8
- package/dist/components/pricing-section/pricing-section.svelte.d.ts +2 -2
- package/dist/components/qr-code/qr-code.css +1 -1
- package/dist/components/radio-group/index.js +406 -124
- package/dist/components/radio-group/radio-group.css +43 -16
- package/dist/components/rating/index.js +69 -57
- package/dist/components/rating/rating.css +1 -1
- package/dist/components/resizable-panels/index.d.ts +1 -1
- package/dist/components/resizable-panels/index.js +11 -9
- package/dist/components/resizable-panels/resizable-panels.schema.js +3 -3
- package/dist/components/resizable-panels/resizable-panels.types.d.ts +4 -4
- package/dist/components/run-step-timeline/index.js +818 -597
- package/dist/components/schedule-builder/index.js +1762 -1263
- package/dist/components/schema-form/index.js +1952 -1320
- package/dist/components/schema-form/schema-form-body.svelte.d.ts +3 -24
- package/dist/components/schema-form/schema-form-state.svelte.d.ts +74 -0
- package/dist/components/schema-form/schema-form.css +1 -1
- package/dist/components/schema-form/schema-form.schema.js +3 -3
- package/dist/components/schema-form/schema-form.svelte.d.ts +3 -24
- package/dist/components/schema-form/schema-form.types.d.ts +3 -3
- package/dist/components/scroll-area/index.js +526 -22
- package/dist/components/scroll-area/scroll-area.css +30 -0
- package/dist/components/scroll-area/scroll-area.schema.js +9 -1
- package/dist/components/scroll-area/scroll-area.types.d.ts +17 -0
- package/dist/components/search-field/index.js +95 -104
- package/dist/components/search-field/search-field.css +3 -85
- package/dist/components/search-field/search-field.schema.js +7 -12
- package/dist/components/search-field/search-field.svelte.d.ts +1 -1
- package/dist/components/search-field/search-field.types.d.ts +4 -7
- package/dist/components/secret-value-field/index.js +324 -123
- package/dist/components/secret-value-field/secret-value-field.css +11 -1
- package/dist/components/secret-value-field/secret-value-field.schema.js +3 -3
- package/dist/components/secret-value-field/secret-value-field.types.d.ts +2 -2
- package/dist/components/segment/index.d.ts +1 -1
- package/dist/components/segmented-control/segmented-control.css +12 -2
- package/dist/components/select/index.js +367 -123
- package/dist/components/select/select.css +4 -1
- package/dist/components/select/select.schema.js +5 -6
- package/dist/components/select/select.types.d.ts +1 -1
- package/dist/components/selectable-row/selectable-row.css +2 -1
- package/dist/components/selection-popover/index.js +1408 -260
- package/dist/components/selection-popover/selection-popover.css +4 -1
- package/dist/components/selection-popover/selection-popover.schema.js +5 -5
- package/dist/components/selection-popover/selection-popover.types.d.ts +4 -4
- package/dist/components/selection-popover/virtual-keyboard-dismissal.svelte.d.ts +34 -0
- package/dist/components/share-card/index.js +5 -5
- package/dist/components/share-card/share-card.schema.js +7 -4
- package/dist/components/share-card/share-card.types.d.ts +5 -5
- package/dist/components/sheet/index.js +390 -28
- package/dist/components/sheet/sheet.css +28 -13
- package/dist/components/sheet/sheet.schema.js +3 -3
- package/dist/components/sheet/sheet.types.d.ts +2 -2
- package/dist/components/shortcut-hint/index.js +3 -3
- package/dist/components/side-navigation/index.js +15 -4
- package/dist/components/side-navigation/side-navigation.svelte.d.ts +5 -3
- package/dist/components/side-navigation-group/index.js +12 -2
- package/dist/components/side-navigation-group/side-navigation-group.schema.js +5 -6
- package/dist/components/side-navigation-group/side-navigation-group.types.d.ts +1 -1
- package/dist/components/side-navigation-item/index.js +2 -2
- package/dist/components/sidebar/index.js +400 -27
- package/dist/components/sidebar/sidebar.css +1 -1
- package/dist/components/slider/index.js +1226 -77
- package/dist/components/slider/slider.css +2 -0
- package/dist/components/slider/slider.schema.js +1 -5
- package/dist/components/slider/slider.svelte.d.ts +1 -1
- package/dist/components/slider/slider.types.d.ts +6 -9
- package/dist/components/sortable-list/index.js +17 -11
- package/dist/components/sortable-list/sortable-list.css +28 -12
- package/dist/components/sortable-list/sortable-list.schema.js +2 -2
- package/dist/components/sortable-list/sortable-list.svelte.d.ts +1 -1
- package/dist/components/sortable-list/sortable-list.types.d.ts +1 -1
- package/dist/components/source-diff-viewer/index.d.ts +2 -1
- package/dist/components/source-diff-viewer/index.js +133 -125
- package/dist/components/source-diff-viewer/source-diff-viewer.binary-notice.d.ts +4 -0
- package/dist/components/source-diff-viewer/source-diff-viewer.css +1 -1
- package/dist/components/source-diff-viewer/source-diff-viewer.git-header-parser.d.ts +8 -0
- package/dist/components/source-diff-viewer/source-diff-viewer.labels.d.ts +3 -0
- package/dist/components/source-diff-viewer/source-diff-viewer.path-normalization.d.ts +11 -0
- package/dist/components/source-diff-viewer/source-diff-viewer.schema.js +2 -2
- package/dist/components/source-diff-viewer/source-diff-viewer.svelte.d.ts +2 -1
- package/dist/components/source-diff-viewer/source-diff-viewer.types.d.ts +1 -1
- package/dist/components/source-diff-viewer/source-diff-viewer.utilities.d.ts +1 -3
- package/dist/components/spectrogram/index.d.ts +1 -0
- package/dist/components/spectrogram/index.js +17 -9
- package/dist/components/spectrum-chart/index.d.ts +1 -0
- package/dist/components/spectrum-chart/index.js +7 -5
- package/dist/components/speed-dial/index.js +3925 -175
- package/dist/components/speed-dial/speed-dial-exit.d.ts +1 -0
- package/dist/components/speed-dial/speed-dial-focus.d.ts +21 -0
- package/dist/components/speed-dial/speed-dial.css +45 -25
- package/dist/components/speed-dial/speed-dial.schema.js +2 -2
- package/dist/components/speed-dial/speed-dial.svelte.d.ts +2 -2
- package/dist/components/speed-dial/speed-dial.types.d.ts +1 -1
- package/dist/components/speed-dial-action/index.js +986 -45
- package/dist/components/speed-dial-action/speed-dial-action.svelte.d.ts +2 -2
- package/dist/components/speed-dial-action/speed-dial-action.types.d.ts +3 -3
- package/dist/components/stacked-list-item/stacked-list-item.css +9 -0
- package/dist/components/statistic/index.d.ts +5 -0
- package/dist/components/{stat → statistic}/index.js +15 -15
- package/dist/components/statistic/statistic.css +81 -0
- package/dist/components/{stat/stat.schema.js → statistic/statistic.schema.js} +6 -6
- package/dist/components/statistic/statistic.svelte.d.ts +18 -0
- package/dist/components/{stat/stat.types.d.ts → statistic/statistic.types.d.ts} +11 -11
- package/dist/components/{stat/stat.variables.js → statistic/statistic.variables.js} +12 -12
- package/dist/components/statistic-group/index.d.ts +12 -0
- package/dist/components/{stat-group → statistic-group}/index.js +20 -20
- package/{src/components/stat-group/stat-group.css → dist/components/statistic-group/statistic-group.css} +27 -27
- package/dist/components/{stat-group/stat-group.schema.js → statistic-group/statistic-group.schema.js} +9 -9
- package/dist/components/statistic-group/statistic-group.svelte.d.ts +18 -0
- package/dist/components/{stat-group/stat-group.types.d.ts → statistic-group/statistic-group.types.d.ts} +14 -14
- package/dist/components/{stat-group/stat-group.variables.js → statistic-group/statistic-group.variables.js} +7 -7
- package/dist/components/statistics-section/index.d.ts +5 -0
- package/dist/components/{stats-section → statistics-section}/index.js +29 -29
- package/dist/components/{stats-section/stats-section.css → statistics-section/statistics-section.css} +7 -7
- package/dist/components/{stats-section/stats-section.schema.js → statistics-section/statistics-section.schema.js} +9 -9
- package/dist/components/statistics-section/statistics-section.svelte.d.ts +19 -0
- package/dist/components/statistics-section/statistics-section.types.d.ts +63 -0
- package/dist/components/{cta-section/cta-section.variables.js → statistics-section/statistics-section.variables.js} +4 -4
- package/dist/components/status-dot/index.js +4 -4
- package/dist/components/status-dot/status-dot.css +3 -3
- package/dist/components/status-dot/status-dot.schema.js +3 -3
- package/dist/components/status-dot/status-dot.types.d.ts +4 -4
- package/dist/components/steps/index.js +20 -7
- package/dist/components/steps/steps.css +1 -0
- package/dist/components/steps/steps.schema.js +9 -5
- package/dist/components/steps/steps.types.d.ts +6 -3
- package/dist/components/tab/index.js +40 -25
- package/dist/components/tab/tab.schema.js +3 -2
- package/dist/components/tab/tab.types.d.ts +3 -2
- package/dist/components/tab-list/index.js +21 -9
- package/dist/components/tab-list/tab-list.types.d.ts +2 -1
- package/dist/components/tab-panel/index.js +21 -8
- package/dist/components/tab-panel/tab-panel.types.d.ts +2 -1
- package/dist/components/table/index.js +295 -33
- package/dist/components/table/table.css +18 -2
- package/dist/components/table/table.schema.js +9 -5
- package/dist/components/table/table.svelte.d.ts +1 -1
- package/dist/components/table/table.types.d.ts +7 -4
- package/dist/components/table-body/index.js +4 -4
- package/dist/components/table-body/table-body.types.d.ts +2 -1
- package/dist/components/table-cell/table-cell.schema.js +5 -3
- package/dist/components/table-cell/table-cell.types.d.ts +2 -1
- package/dist/components/table-header/index.js +18 -9
- package/dist/components/table-header/table-header.schema.js +9 -9
- package/dist/components/table-header/table-header.types.d.ts +41 -13
- package/dist/components/table-header-cell/index.js +2 -2
- package/dist/components/table-header-cell/table-header-cell.schema.js +7 -4
- package/dist/components/table-header-cell/table-header-cell.types.d.ts +3 -2
- package/dist/components/table-of-contents/index.js +271 -233
- package/dist/components/table-of-contents/table-of-contents-active-heading.svelte.d.ts +16 -0
- package/dist/components/table-of-contents/table-of-contents-heading-registry.svelte.d.ts +19 -0
- package/dist/components/table-of-contents/table-of-contents.css +13 -1
- package/dist/components/table-of-contents/table-of-contents.schema.js +3 -2
- package/dist/components/table-of-contents/table-of-contents.svelte.d.ts +2 -1
- package/dist/components/table-of-contents/table-of-contents.types.d.ts +4 -1
- package/dist/components/table-row/index.js +7 -7
- package/dist/components/table-row/table-row.schema.js +3 -3
- package/dist/components/table-row/table-row.types.d.ts +6 -6
- package/dist/components/tabs/index.js +113 -61
- package/dist/components/tabs/tabs.schema.js +10 -3
- package/dist/components/tabs/tabs.types.d.ts +9 -10
- package/dist/components/tag-input/index.js +21 -19
- package/dist/components/tag-input/tag-input.css +1 -1
- package/dist/components/tag-input/tag-input.schema.js +9 -13
- package/dist/components/tag-input/tag-input.svelte.d.ts +8 -1
- package/dist/components/tag-input/tag-input.types.d.ts +8 -12
- package/dist/components/team-section/index.js +1578 -608
- package/dist/components/team-section/team-section.css +2 -43
- package/dist/components/team-section/team-section.schema.js +2 -2
- package/dist/components/team-section/team-section.types.d.ts +2 -2
- package/dist/components/testimonial-section/index.js +236 -331
- package/dist/components/testimonial-section/testimonial-section.css +2 -47
- package/dist/components/textarea/index.js +407 -106
- package/dist/components/textarea/textarea.css +4 -1
- package/dist/components/textarea/textarea.schema.js +7 -8
- package/dist/components/textarea/textarea.types.d.ts +3 -3
- package/dist/components/time-field/index.js +497 -220
- package/dist/components/time-field/time-field.css +33 -8
- package/dist/components/time-field/time-field.schema.js +1 -4
- package/dist/components/time-field/time-field.types.d.ts +0 -3
- package/dist/components/timeline/timeline.svelte.d.ts +6 -5
- package/dist/components/toast-region/index.js +341 -173
- package/dist/components/toggle/index.js +104 -44
- package/dist/components/toggle/toggle.schema.js +6 -1
- package/dist/components/toggle/toggle.types.d.ts +3 -1
- package/dist/components/toolbar/index.js +18 -7
- package/dist/components/tooltip/index.js +1132 -225
- package/dist/components/tooltip/tooltip.css +1 -1
- package/dist/components/tooltip/tooltip.schema.js +9 -4
- package/dist/components/tooltip/tooltip.types.d.ts +21 -3
- package/dist/components/transfer-list/index.js +617 -189
- package/dist/components/transfer-list/transfer-list.css +33 -1
- package/dist/components/tree/index.d.ts +1 -0
- package/dist/components/tree/index.js +1242 -1019
- package/dist/components/tree/tree.schema.js +4 -4
- package/dist/components/tree/tree.svelte.d.ts +3 -1
- package/dist/components/tree/tree.types.d.ts +3 -3
- package/dist/components/tree-item/index.d.ts +1 -0
- package/dist/components/tree-item/index.js +665 -530
- package/dist/components/tree-item/tree-item-async-load.svelte.d.ts +23 -0
- package/dist/components/tree-item/tree-item-drag.svelte.d.ts +35 -0
- package/dist/components/tree-item/tree-item-label-highlight.d.ts +11 -0
- package/dist/components/tree-item/tree-item-rename.svelte.d.ts +43 -0
- package/dist/components/tree-item/tree-item.schema.js +5 -5
- package/dist/components/tree-item/tree-item.types.d.ts +4 -4
- package/dist/components/typography/index.js +3 -3
- package/dist/components/typography/typography.schema.js +2 -2
- package/dist/components/typography/typography.types.d.ts +7 -6
- package/dist/components/virtual-list/index.js +7 -5
- package/dist/components/waveform/index.d.ts +1 -0
- package/dist/components/waveform/index.js +7 -5
- package/dist/index.d.ts +24 -24
- package/dist/index.js +32203 -25375
- package/dist/manifest.meta.d.ts +1 -0
- package/dist/schema-types.d.ts +3 -2
- package/dist/server/components/access-gate/index.js +17 -5
- package/dist/server/components/alert/index.js +2 -2
- package/dist/server/components/alert-dialog/index.js +10 -7
- package/dist/server/components/approval-card/index.js +23 -14
- package/dist/server/components/area-chart/index.js +16 -2
- package/dist/server/components/autocomplete/index.js +9 -7
- package/dist/server/components/avatar-group/index.js +8 -6
- package/dist/server/components/backdrop/index.js +1 -1
- package/dist/server/components/badge/index.js +11 -3
- package/dist/server/components/banner/index.js +1 -1
- package/dist/server/components/bar-chart/index.js +16 -2
- package/dist/server/components/bento-cell/index.js +2 -2
- package/dist/server/components/bento-grid/index.js +3 -4
- package/dist/server/components/blog-section/index.js +3 -4
- package/dist/server/components/breadcrumbs/index.js +1 -1
- package/dist/server/components/button/index.js +2 -2
- package/dist/server/components/button-group/index.js +1 -1
- package/dist/server/components/calendar/index.js +2 -2
- package/dist/server/components/call-to-action-section/index.js +16 -0
- package/dist/server/components/capability-gate/index.js +1 -1
- package/dist/server/components/card/index.js +2 -2
- package/dist/server/components/carousel/index.js +7 -2
- package/dist/server/components/checkbox/index.js +6 -4
- package/dist/server/components/checkbox-group/index.js +1 -1
- package/dist/server/components/chip/index.js +2 -2
- package/dist/server/components/choice-grid/index.js +1 -1
- package/dist/server/components/click-away-listener/index.js +1 -1
- package/dist/server/components/code-block/index.js +6 -4
- package/dist/server/components/collapsible/index.js +2 -2
- package/dist/server/components/color-field/index.js +5 -4
- package/dist/server/components/color-picker/index.js +3 -3
- package/dist/server/components/color-swatch-picker/index.js +3 -3
- package/dist/server/components/combobox/index.js +13 -8
- package/dist/server/components/command-item/index.js +1 -1
- package/dist/server/components/command-menu/index.js +9 -5
- package/dist/server/components/command-palette/index.js +3 -3
- package/dist/server/components/confirm-dialog/index.js +13 -9
- package/dist/server/components/connection-indicator/index.js +5 -3
- package/dist/server/components/context-menu/index.js +11 -9
- package/dist/server/components/copy-button/index.js +5 -3
- package/dist/server/components/data-grid/index.js +1 -1
- package/dist/server/components/data-table/index.js +14 -10
- package/dist/server/components/date-picker/index.js +15 -9
- package/dist/server/components/date-range-field/index.js +14 -9
- package/dist/server/components/diff-statistics/index.js +4 -2
- package/dist/server/components/drawer/index.js +7 -7
- package/dist/server/components/dropdown/index.js +11 -9
- package/dist/server/components/dropdown-item/index.js +2 -2
- package/dist/server/components/dropdown-menu/index.js +8 -6
- package/dist/server/components/dropdown-trigger/index.js +2 -2
- package/dist/server/components/event-stream-viewer/index.js +7 -4
- package/dist/server/components/event-timeline/index.js +12 -2
- package/dist/server/components/faceted-filter-bar/index.js +5 -6
- package/dist/server/components/feature-section/index.js +1 -1
- package/dist/server/components/file-upload/index.js +1 -1
- package/dist/server/components/floating-action/index.js +16 -0
- package/dist/server/components/focus-trap/index.js +4 -4
- package/dist/server/components/form-field/index.js +3 -2
- package/dist/server/components/grid/index.js +1 -1
- package/dist/server/components/grid-list/index.js +1 -1
- package/dist/server/components/hero-section/index.js +3 -2
- package/dist/server/components/hover-card/index.js +7 -4
- package/dist/server/components/icons/index.js +22 -7
- package/dist/server/components/image/index.js +1 -1
- package/dist/server/components/input/index.js +5 -4
- package/dist/server/components/invocation-rule-builder/index.js +16 -8
- package/dist/server/components/json-editor/index.js +5 -2
- package/dist/server/components/json-schema-editor/index.js +32 -19
- package/dist/server/components/kanban-board/index.js +6 -3
- package/dist/server/components/line-chart/index.js +16 -2
- package/dist/server/components/load-more/index.js +1 -1
- package/dist/server/components/logo-cloud/index.js +1 -1
- package/dist/server/components/matrix-chart/index.js +16 -3
- package/dist/server/components/media-controls/index.js +1 -1
- package/dist/server/components/mega-menu/index.js +10 -2
- package/dist/server/components/menu-bar/index.js +12 -7
- package/dist/server/components/meter/index.js +1 -1
- package/dist/server/components/modal/index.js +9 -6
- package/dist/server/components/multi-select/index.js +16 -2
- package/dist/server/components/navigation-bar/index.js +9 -2
- package/dist/server/components/navigation-item/index.js +2 -2
- package/dist/server/components/newsletter-section/index.js +6 -5
- package/dist/server/components/number-input/index.js +8 -4
- package/dist/server/components/page-header/index.js +1 -1
- package/dist/server/components/payload-inspector/index.js +14 -5
- package/dist/server/components/permission-matrix/index.js +7 -3
- package/dist/server/components/phone-input/index.js +1 -1
- package/dist/server/components/popover/index.js +9 -7
- package/dist/server/components/portal/index.js +10 -3
- package/dist/server/components/pricing-card/index.js +3 -3
- package/dist/server/components/pricing-section/index.js +3 -3
- package/dist/server/components/radio-group/index.js +5 -2
- package/dist/server/components/rating/index.js +1 -1
- package/dist/server/components/resizable-panels/index.js +2 -2
- package/dist/server/components/run-step-timeline/index.js +14 -6
- package/dist/server/components/schedule-builder/index.js +14 -8
- package/dist/server/components/schema-form/index.js +15 -8
- package/dist/server/components/scroll-area/index.js +8 -2
- package/dist/server/components/search-field/index.js +3 -4
- package/dist/server/components/secret-value-field/index.js +8 -2
- package/dist/server/components/select/index.js +4 -3
- package/dist/server/components/selection-popover/index.js +7 -5
- package/dist/server/components/share-card/index.js +1 -1
- package/dist/server/components/sheet/index.js +6 -6
- package/dist/server/components/side-navigation/index.js +7 -5
- package/dist/server/components/side-navigation-group/index.js +5 -3
- package/dist/server/components/side-navigation-item/index.js +3 -3
- package/dist/server/components/sidebar/index.js +11 -9
- package/dist/server/components/slider/index.js +2 -2
- package/dist/server/components/sortable-list/index.js +2 -2
- package/dist/server/components/source-diff-viewer/index.js +1 -1
- package/dist/server/components/spectrogram/index.js +2 -2
- package/dist/server/components/spectrum-chart/index.js +2 -2
- package/dist/server/components/speed-dial/index.js +10 -4
- package/dist/server/components/speed-dial-action/index.js +7 -4
- package/dist/server/components/{stat → statistic}/index.js +7 -7
- package/dist/server/components/statistic-group/index.js +17 -0
- package/dist/server/components/statistics-section/index.js +18 -0
- package/dist/server/components/status-dot/index.js +2 -2
- package/dist/server/components/steps/index.js +1 -1
- package/dist/server/components/tab/index.js +2 -2
- package/dist/server/components/tab-list/index.js +2 -2
- package/dist/server/components/tab-panel/index.js +2 -2
- package/dist/server/components/table/index.js +10 -8
- package/dist/server/components/table-body/index.js +2 -2
- package/dist/server/components/table-header/index.js +2 -2
- package/dist/server/components/table-header-cell/index.js +2 -2
- package/dist/server/components/table-of-contents/index.js +1 -1
- package/dist/server/components/table-row/index.js +2 -2
- package/dist/server/components/tabs/index.js +6 -6
- package/dist/server/components/tag-input/index.js +1 -1
- package/dist/server/components/team-section/index.js +10 -7
- package/dist/server/components/testimonial-section/index.js +4 -5
- package/dist/server/components/textarea/index.js +4 -3
- package/dist/server/components/time-field/index.js +4 -3
- package/dist/server/components/toast-region/index.js +8 -2
- package/dist/server/components/toggle/index.js +2 -2
- package/dist/server/components/toolbar/index.js +1 -1
- package/dist/server/components/tooltip/index.js +7 -5
- package/dist/server/components/transfer-list/index.js +10 -2
- package/dist/server/components/tree/index.js +2 -2
- package/dist/server/components/tree-item/index.js +2 -2
- package/dist/server/components/typography/index.js +1 -1
- package/dist/server/components/virtual-list/index.js +2 -2
- package/dist/server/components/waveform/index.js +2 -2
- package/dist/server/index.js +270 -240
- package/dist/server/{index.server-jnyznmzv.js → index.server-0154rjj6.js} +2 -2
- package/dist/server/{index.server-0hjcds3y.js → index.server-01bz4wmw.js} +15 -6
- package/dist/server/{index.server-mz7sqkya.js → index.server-0380jykf.js} +7 -7
- package/dist/server/{index.server-7yq1jgt3.js → index.server-03ndc3td.js} +1 -1
- package/dist/server/{index.server-ez5hp0ya.js → index.server-0j8ttfb3.js} +24 -23
- package/dist/server/{index.server-q5gvb174.js → index.server-0p1z1kbs.js} +10 -10
- package/dist/server/{index.server-vg8t3dkb.js → index.server-0qa6j0gt.js} +4 -4
- package/dist/server/{index.server-4cbqjf14.js → index.server-0qqjq4dh.js} +3 -3
- package/dist/server/{index.server-8gv0tm3r.js → index.server-0qvwymqd.js} +2 -2
- package/dist/server/index.server-0rqytc2f.js +53 -0
- package/dist/server/{index.server-dz1r9xw5.js → index.server-1233sspt.js} +63 -36
- package/dist/server/{index.server-txnxnbd6.js → index.server-1cnz5ax1.js} +32 -6
- package/dist/server/{index.server-mvhf8b7g.js → index.server-1dk15yd2.js} +3 -3
- package/dist/server/{index.server-6zgzghtm.js → index.server-1g3bqz6w.js} +1 -1
- package/dist/server/index.server-1hr2nnvq.js +67 -0
- package/dist/server/index.server-1zhe1vwe.js +70 -0
- package/dist/server/{index.server-49m5nntq.js → index.server-20rc21x2.js} +19 -3
- package/dist/server/index.server-2bvasys0.js +27 -0
- package/dist/server/{index.server-9eccb2fc.js → index.server-2bw5fqwh.js} +73 -66
- package/dist/server/{index.server-rxzp610y.js → index.server-2eb8pcev.js} +22 -4
- package/dist/server/index.server-2h45p8kd.js +410 -0
- package/dist/server/index.server-2k0cnsm4.js +418 -0
- package/dist/server/{index.server-d5a5ccz7.js → index.server-2mwr7vjg.js} +24 -25
- package/dist/server/{index.server-2cyn5sjd.js → index.server-2pst4wcx.js} +1 -1
- package/dist/server/{index.server-pfbzz3x7.js → index.server-2qydtmtp.js} +1 -1
- package/dist/server/{index.server-0svdq2kq.js → index.server-2s7btgxx.js} +9 -10
- package/dist/server/{index.server-h90pjrez.js → index.server-36rjvy9e.js} +1 -1
- package/dist/server/{index.server-kvdrhzr3.js → index.server-3e8n2sry.js} +14 -7
- package/dist/server/{index.server-s0vmsxhj.js → index.server-3f43g1z6.js} +1 -1
- package/dist/server/index.server-3ne3ekqq.js +147 -0
- package/dist/server/{index.server-3f2jzg7q.js → index.server-3tscwcse.js} +15 -18
- package/dist/server/{index.server-0jhra85x.js → index.server-3wekb2fb.js} +8 -4
- package/dist/server/{index.server-dbne33pa.js → index.server-47bbxz3a.js} +10 -3
- package/dist/server/{index.server-m80kp6tm.js → index.server-49g0pm4w.js} +73 -22
- package/dist/server/index.server-4efnbtq1.js +2 -0
- package/dist/server/{index.server-d6j2jmqg.js → index.server-4h8c8xh7.js} +1 -1
- package/dist/server/{index.server-fe98ezq1.js → index.server-4jw1fkcg.js} +6 -6
- package/dist/server/{index.server-szgghcdh.js → index.server-4kqjwvrq.js} +106 -214
- package/dist/server/index.server-4sg50xfn.js +27 -0
- package/dist/server/{index.server-8grn4zd3.js → index.server-4sr9f5r0.js} +122 -55
- package/dist/server/{index.server-jtytqppy.js → index.server-4w0rydct.js} +9 -4
- package/dist/server/{index.server-nq2r5m1r.js → index.server-4ywb3qcm.js} +92 -41
- package/dist/server/{index.server-fe41fvr4.js → index.server-52e4m6b5.js} +1 -1
- package/dist/server/{index.server-nbrd998e.js → index.server-54yr0y08.js} +1 -1
- package/dist/server/index.server-55ehgem8.js +2 -0
- package/dist/server/{index.server-ap53z0a0.js → index.server-5j7v41gy.js} +18 -9
- package/dist/server/{index.server-1vfhzhkj.js → index.server-5schb2vt.js} +4 -4
- package/dist/server/{index.server-x4a15jpm.js → index.server-6184qc69.js} +1 -1
- package/dist/server/{index.server-d3pqthtp.js → index.server-64dvhh7s.js} +12 -6
- package/dist/server/index.server-6771g0q4.js +611 -0
- package/dist/server/{index.server-kt0ncrqs.js → index.server-6c9144ex.js} +1 -1
- package/dist/server/{index.server-c8pmq1tm.js → index.server-6e5cj9hs.js} +7 -5
- package/dist/server/{index.server-9w7qdn8h.js → index.server-6gzzpcyd.js} +1 -4
- package/dist/server/index.server-6n5grdb2.js +78 -0
- package/dist/server/{index.server-8tr30fpp.js → index.server-6z6s8qz8.js} +1 -1
- package/dist/server/{index.server-51t6yebn.js → index.server-70j8j998.js} +12 -2
- package/dist/server/index.server-71zvvayv.js +234 -0
- package/dist/server/{index.server-8b35ekqg.js → index.server-72d0qgdy.js} +6 -6
- package/dist/server/index.server-74c0gw8e.js +12 -0
- package/dist/server/index.server-77p0jy71.js +100 -0
- package/dist/server/{index.server-ks49bprh.js → index.server-79bg6rad.js} +4 -4
- package/dist/server/{index.server-k2tmp4j0.js → index.server-7ae3f1sh.js} +1 -1
- package/dist/server/{index.server-62593nnh.js → index.server-7cwcqhqd.js} +9 -9
- package/dist/server/{index.server-2qdzkapm.js → index.server-7he4va6w.js} +3 -3
- package/dist/server/{index.server-nzgjr724.js → index.server-7kez94sz.js} +22 -11
- package/dist/server/{index.server-gf20dp5p.js → index.server-7mhk40r3.js} +1 -1
- package/dist/server/{index.server-5c8qde3q.js → index.server-7ssngbpa.js} +1 -1
- package/dist/server/{index.server-20km2ga0.js → index.server-7sxx7645.js} +21 -20
- package/dist/server/{index.server-8sybstcc.js → index.server-7wtntdet.js} +230 -156
- package/dist/server/index.server-86hdc1jx.js +12 -0
- package/dist/server/{index.server-b2jaw4ng.js → index.server-8bmwna5v.js} +5 -5
- package/dist/server/{index.server-k1fyyae7.js → index.server-8n17dgbq.js} +1 -1
- package/dist/server/{index.server-8dt36sdm.js → index.server-8s33z1q7.js} +2 -2
- package/dist/server/index.server-8t53gqe7.js +369 -0
- package/dist/server/{index.server-7qak74fg.js → index.server-8w95jmf1.js} +20 -25
- package/dist/server/{index.server-4maxbgsj.js → index.server-91t9mbkx.js} +3 -3
- package/dist/server/{index.server-zp4hjjym.js → index.server-91yqn19v.js} +27 -16
- package/dist/server/{index.server-n0rbn5yf.js → index.server-92sweseg.js} +2 -1
- package/dist/server/index.server-93943z3e.js +9 -0
- package/dist/server/{index.server-rbpvcrr3.js → index.server-9emgn750.js} +1 -1
- package/dist/server/{index.server-ft1xvwqd.js → index.server-9n2bc545.js} +1 -1
- package/dist/server/{index.server-cch0eed5.js → index.server-9pgjw8dv.js} +10 -39
- package/dist/server/{index.server-0chhpkg7.js → index.server-a2zfb135.js} +46 -5
- package/dist/server/{index.server-xanq9ppe.js → index.server-a5w1wy5w.js} +4 -4
- package/dist/server/{index.server-rbd5ys4z.js → index.server-a5zsgn3k.js} +1 -1
- package/dist/server/{index.server-vz9hqkdq.js → index.server-a8gpnzgg.js} +20 -8
- package/dist/server/{index.server-003t81xk.js → index.server-abqbstkt.js} +4 -4
- package/dist/server/{index.server-4rdkwmfb.js → index.server-ampgmpq8.js} +2 -2
- package/dist/server/{index.server-mewms9dg.js → index.server-ayhcc6z5.js} +82 -75
- package/dist/server/{index.server-sf3nk3j2.js → index.server-b7pq5xpd.js} +28 -19
- package/dist/server/index.server-b8m7ej8c.js +477 -0
- package/dist/server/{index.server-9fyy0j4c.js → index.server-bfmd7nf6.js} +16 -25
- package/dist/server/{index.server-x1xxzfvg.js → index.server-bmgnba9v.js} +7 -3
- package/dist/server/{index.server-y2ncgt7p.js → index.server-bsm39gpy.js} +15 -9
- package/dist/server/{index.server-2752sd9e.js → index.server-c2xgjbj7.js} +6 -2
- package/dist/server/{index.server-thp81fc0.js → index.server-c51n35c3.js} +1 -1
- package/dist/server/{index.server-d146g8pr.js → index.server-casqzp4h.js} +61 -66
- package/dist/server/{index.server-vd302sxz.js → index.server-cptwpqbr.js} +73 -72
- package/dist/server/{index.server-38aywdk1.js → index.server-cvc44t4m.js} +5 -5
- package/dist/server/{index.server-7ygdwxre.js → index.server-d04axnt4.js} +18 -7
- package/dist/server/{index.server-thedzn9z.js → index.server-d26jzn2m.js} +34 -38
- package/dist/server/{index.server-pyjzfjfn.js → index.server-d70brw24.js} +8 -8
- package/dist/server/{index.server-rtk7fhjy.js → index.server-d9z0psxj.js} +29 -19
- package/dist/server/{index.server-dmmvwy6p.js → index.server-dfp8jvrr.js} +1 -1
- package/dist/server/index.server-dx5b28qh.js +27 -0
- package/dist/server/index.server-e4f105cg.js +31 -0
- package/dist/server/index.server-e65x21yr.js +2 -0
- package/dist/server/{index.server-z1q7qnb8.js → index.server-e97zrck0.js} +9 -2
- package/dist/server/{index.server-tww47bb6.js → index.server-ec9anf8e.js} +53 -33
- package/dist/server/index.server-epvxcafz.js +2 -0
- package/dist/server/{index.server-d4e6afc0.js → index.server-evrfgzwn.js} +6 -3
- package/dist/server/{index.server-jtgw9d23.js → index.server-eyta8yd2.js} +4 -5
- package/dist/server/{index.server-v73af5rk.js → index.server-f4pxscq5.js} +48 -37
- package/dist/server/{index.server-y4kfz0er.js → index.server-fd3az8g2.js} +4 -4
- package/dist/server/{index.server-t859hsx1.js → index.server-fdpe3vky.js} +5 -5
- package/dist/server/{index.server-nwzrpjc9.js → index.server-ff9zfw15.js} +13 -13
- package/dist/server/{index.server-7scshbcm.js → index.server-fgtqpnva.js} +1 -1
- package/dist/server/index.server-fka21791.js +447 -0
- package/dist/server/{index.server-6mnbznbt.js → index.server-fphvzcfb.js} +2 -2
- package/dist/server/{index.server-ahtaqav5.js → index.server-fv23h844.js} +1 -1
- package/dist/server/{index.server-ezpdsg81.js → index.server-fymevt3c.js} +133 -125
- package/dist/server/{index.server-be9bpqeh.js → index.server-fys5yj23.js} +5 -3
- package/dist/server/{index.server-a9de6h0d.js → index.server-g1z2zgwk.js} +8 -8
- package/dist/server/{index.server-xjnge1yw.js → index.server-g38yys7a.js} +30 -23
- package/dist/server/index.server-gdtg1xg7.js +302 -0
- package/dist/server/{index.server-2qd56bzw.js → index.server-gme23wnx.js} +9 -12
- package/dist/server/{index.server-94b7tjs5.js → index.server-grq89cv5.js} +2 -1
- package/dist/server/index.server-gse6hc5s.js +9 -0
- package/dist/server/{index.server-apyaqxfw.js → index.server-gvk55r2z.js} +1 -1
- package/dist/server/{index.server-v90d8593.js → index.server-h6c6b4sq.js} +14 -8
- package/dist/server/index.server-h6qhx8mw.js +1214 -0
- package/dist/server/index.server-haws3fsj.js +2 -0
- package/dist/server/{index.server-ncdt0xb7.js → index.server-hcpq0x8d.js} +1 -1
- package/dist/server/{index.server-bs4tyzxz.js → index.server-hfccqkjw.js} +1 -1
- package/dist/server/{index.server-2pc5cv6c.js → index.server-hxjkfdp2.js} +1 -1
- package/dist/server/{index.server-psqfjzpc.js → index.server-hzf509s2.js} +32 -16
- package/dist/server/{index.server-geq56xaz.js → index.server-j4akck2w.js} +28 -12
- package/dist/server/{index.server-mda2y5g6.js → index.server-j57zek3p.js} +1 -1
- package/dist/server/index.server-ja3fmd29.js +211 -0
- package/dist/server/index.server-jepjmrcp.js +40 -0
- package/dist/server/{index.server-5npa16n7.js → index.server-jw63k15t.js} +1 -1
- package/dist/server/{index.server-xb9cj0bp.js → index.server-kbtw4pxm.js} +1 -1
- package/dist/server/index.server-kd5bmzfj.js +2 -0
- package/dist/server/{index.server-8xrzkve2.js → index.server-kfem5020.js} +6 -6
- package/dist/server/{index.server-9599zs05.js → index.server-kjv6v7jm.js} +1 -1
- package/dist/server/{index.server-z721a5gp.js → index.server-km7pzejr.js} +23 -14
- package/dist/server/{index.server-tnbaknbp.js → index.server-kmn9zrqn.js} +1 -1
- package/dist/server/index.server-kr3wrv13.js +38 -0
- package/dist/server/index.server-krwbxm8x.js +36 -0
- package/dist/server/{index.server-66amt15s.js → index.server-kszs0qx5.js} +25 -2
- package/dist/server/{index.server-a2hz77tt.js → index.server-m1r7jk3n.js} +9 -20
- package/dist/server/{index.server-2ffw6am1.js → index.server-m9p9vfj1.js} +3 -3
- package/dist/server/{index.server-ww54rv4y.js → index.server-mgvey6vx.js} +118 -105
- package/dist/server/index.server-mhw6yp2x.js +27 -0
- package/dist/server/index.server-mrjns5eb.js +41 -0
- package/dist/server/{index.server-3axwhvt7.js → index.server-msdm0gyk.js} +18 -4
- package/dist/server/{index.server-j150jxcq.js → index.server-msp145ky.js} +1 -1
- package/dist/server/{index.server-9xrqh29s.js → index.server-mvcsfqs9.js} +17 -2
- package/dist/server/{index.server-8tkwdtna.js → index.server-mxgakpfj.js} +6 -6
- package/dist/server/{index.server-64r048av.js → index.server-n63d1ssb.js} +4 -2
- package/dist/server/{index.server-veastatv.js → index.server-nbq0tmx1.js} +26 -16
- package/dist/server/{index.server-9drzqktm.js → index.server-nbspp00m.js} +15 -67
- package/dist/server/{index.server-d77c4vae.js → index.server-ne3hnn6e.js} +3 -3
- package/dist/server/{index.server-0gwr59yw.js → index.server-nj8kk5bv.js} +1 -1
- package/dist/server/{index.server-0gg1njz4.js → index.server-nprmntcb.js} +3 -3
- package/dist/server/{index.server-6rv1rfwq.js → index.server-nqkfm3m7.js} +46 -13
- package/dist/server/{index.server-kvn6cj65.js → index.server-nqz2nrgp.js} +1 -1
- package/dist/server/{index.server-zngmm4tg.js → index.server-p36e1472.js} +3 -3
- package/dist/server/{index.server-894t97kv.js → index.server-pctqr0zf.js} +53 -48
- package/dist/server/{index.server-egzx2kh5.js → index.server-pee1wa4g.js} +8 -6
- package/dist/server/{index.server-0yfgpazx.js → index.server-pwxe9s42.js} +19 -19
- package/dist/server/index.server-q7r53g7z.js +53 -0
- package/dist/server/{index.server-b6jr01st.js → index.server-qjh3vsj8.js} +5 -5
- package/dist/server/index.server-qycjqq8v.js +179 -0
- package/dist/server/index.server-r2z5ds34.js +54 -0
- package/dist/server/{index.server-agsdwg53.js → index.server-r5emexd4.js} +1 -1
- package/dist/server/{index.server-zvrew616.js → index.server-r60akntz.js} +1 -1
- package/dist/server/index.server-rjx8m9en.js +27 -0
- package/dist/server/{index.server-tnecnach.js → index.server-rvaw3nks.js} +8 -12
- package/dist/server/index.server-s6kgtjhh.js +35 -0
- package/dist/server/{index.server-m4wc0170.js → index.server-s6stvh7k.js} +1 -1
- package/dist/server/{index.server-hxveaqg1.js → index.server-scdk1we9.js} +12 -12
- package/dist/server/{index.server-jxseyx33.js → index.server-sfbna82r.js} +1 -1
- package/dist/server/index.server-sgjc9gkq.js +252 -0
- package/dist/server/{index.server-ny0z50m0.js → index.server-sxkkaj8b.js} +33 -5
- package/dist/server/{index.server-pe929n15.js → index.server-sy0vfg2g.js} +11 -3
- package/dist/server/index.server-t2p901p7.js +527 -0
- package/dist/server/{index.server-ghvvqkfc.js → index.server-t8dts351.js} +388 -342
- package/dist/server/{index.server-032p855q.js → index.server-td8rx9dz.js} +5 -5
- package/dist/server/{index.server-3g76h7z7.js → index.server-th1tsad4.js} +62 -26
- package/dist/server/index.server-tmfcgx1j.js +136 -0
- package/dist/server/index.server-tpny5pjk.js +557 -0
- package/dist/server/{index.server-v3vnmjat.js → index.server-trc6xj4s.js} +1 -1
- package/dist/server/{index.server-ng8y854r.js → index.server-tvj0x3qy.js} +49 -39
- package/dist/server/{index.server-n85yz1tm.js → index.server-v12jk4c9.js} +3 -3
- package/dist/server/index.server-v576qshz.js +2 -0
- package/dist/server/index.server-v6b3k6cq.js +15 -0
- package/dist/server/{index.server-g95bk8rc.js → index.server-vcfv93bg.js} +30 -8
- package/dist/server/index.server-vke078fx.js +745 -0
- package/dist/server/{index.server-s4wm4g2a.js → index.server-w2jwyz17.js} +4 -4
- package/dist/server/{index.server-zfx4magq.js → index.server-w5f4ex0f.js} +65 -28
- package/dist/server/{index.server-9w7k8wwk.js → index.server-w8phxx00.js} +179 -143
- package/dist/server/{index.server-hrq85wvg.js → index.server-w96rfs8f.js} +2 -2
- package/dist/server/{index.server-0sx92swg.js → index.server-wbe0dskj.js} +1 -1
- package/dist/server/{index.server-8bm66pm4.js → index.server-wm8957be.js} +10 -10
- package/dist/server/{index.server-yf2jn8cr.js → index.server-wqe8pzw1.js} +8 -7
- package/dist/server/{index.server-c42b462p.js → index.server-wxs2c5d0.js} +92 -65
- package/dist/server/{index.server-gmd6gbwb.js → index.server-x6hbm4je.js} +5 -2
- package/dist/server/index.server-xa8kjs78.js +111 -0
- package/dist/server/{index.server-z754e36a.js → index.server-xap17cfh.js} +1 -1
- package/dist/server/{index.server-xbx230ec.js → index.server-xn6qg9pk.js} +1 -1
- package/dist/server/index.server-xqbes4jd.js +397 -0
- package/dist/server/{index.server-wg6ddzpa.js → index.server-xsh52hjt.js} +9 -4
- package/dist/server/{index.server-nz6jpmkx.js → index.server-y7017ygc.js} +4 -4
- package/dist/server/{index.server-bqjv32nb.js → index.server-y86zyqa9.js} +10 -4
- package/dist/server/{index.server-r82zjq88.js → index.server-y8m06g9p.js} +60 -50
- package/dist/server/index.server-yase1x1a.js +23 -0
- package/dist/server/{index.server-frb9e55d.js → index.server-ybb5ery2.js} +9 -9
- package/dist/server/{index.server-fhrqsg97.js → index.server-yd9shwqq.js} +1 -1
- package/dist/server/{index.server-3qf60xx4.js → index.server-yevngyp5.js} +1 -1
- package/dist/server/{index.server-0qh3v3nq.js → index.server-yhjecwfj.js} +53 -18
- package/dist/server/{index.server-6gbhg9gp.js → index.server-ynt74xb3.js} +9 -2
- package/dist/server/{index.server-d4ft97bx.js → index.server-yvcrg99d.js} +4 -4
- package/dist/server/{index.server-k4mpevmq.js → index.server-ywvrf5rd.js} +1 -1
- package/dist/server/index.server-yyarp1ny.js +2 -0
- package/dist/server/{index.server-yqhww50r.js → index.server-z2fdg8dg.js} +4 -4
- package/dist/server/{index.server-hx91ng7z.js → index.server-z6cygsgg.js} +1 -1
- package/dist/server/index.server-zf0221kw.js +73 -0
- package/dist/server/{index.server-zm04d9eq.js → index.server-zfxb12hm.js} +34 -52
- package/dist/server/{index.server-hcsd5gdb.js → index.server-zgvrg9rm.js} +23 -3
- package/dist/utilities/attachments.d.ts +63 -1
- package/dist/utilities/drag-scroll-physics.d.ts +48 -0
- package/dist/utilities/focus.d.ts +81 -0
- package/dist/utilities/html-element-types.d.ts +19 -0
- package/dist/utilities/sortable-controller.svelte.d.ts +2 -2
- package/dist/utilities/use-drag-scroll.svelte.d.ts +26 -0
- package/dist/utilities/use-drag-scroll.types.d.ts +15 -0
- package/dist/utilities/use-fine-pointer.svelte.d.ts +12 -0
- package/dist/utilities/use-fine-pointer.types.d.ts +4 -0
- package/dist/utilities/value-change.d.ts +3 -2
- package/package.json +166 -169
- package/src/_internal/anchored-overlay.svelte.ts +118 -37
- package/src/_internal/date-value.ts +71 -0
- package/src/_internal/form-field-context.ts +1 -1
- package/src/_internal/form-field-frame.svelte +88 -0
- package/src/_internal/form-field-provider.svelte +7 -0
- package/src/_internal/overlay.ts +2 -1
- package/src/_internal/text-direction-container.ts +317 -0
- package/src/_internal/text-direction-css.ts +1437 -0
- package/src/_internal/text-direction.ts +102 -107
- package/src/_internal/tree-autoscroll.svelte.ts +77 -0
- package/src/_internal/tree-filter.svelte.ts +91 -0
- package/src/components/_internal/chart-data-table.svelte +30 -0
- package/src/components/_internal/checkbox-indicator-shell.svelte +9 -0
- package/src/components/_internal/create-command-list-state.svelte.ts +58 -4
- package/src/components/_internal/person-byline.css +29 -0
- package/src/components/_internal/person-byline.svelte +14 -0
- package/src/components/_internal/section-skeleton.css +45 -0
- package/src/components/_radio/radio.svelte +21 -20
- package/src/components/_radio/radio.types.ts +1 -1
- package/src/components/_sortable-item.svelte +24 -2
- package/src/components/access-gate/access-gate-inline.svelte +22 -0
- package/src/components/access-gate/access-gate.css +55 -6
- package/src/components/access-gate/access-gate.svelte +5 -1
- package/src/components/accordion-item/accordion-item.css +8 -6
- package/src/components/alert/alert.examples.json +2 -2
- package/src/components/alert/alert.schema.json +1 -1
- package/src/components/alert/alert.schema.ts +1 -1
- package/src/components/alert/alert.svelte +2 -2
- package/src/components/alert/alert.types.ts +1 -1
- package/src/components/alert-dialog/alert-dialog.examples.json +2 -2
- package/src/components/alert-dialog/alert-dialog.schema.json +2 -2
- package/src/components/alert-dialog/alert-dialog.schema.ts +2 -2
- package/src/components/alert-dialog/alert-dialog.svelte +4 -4
- package/src/components/alert-dialog/alert-dialog.types.ts +2 -2
- package/src/components/approval-card/approval-card-actions.svelte +4 -3
- package/src/components/approval-card/approval-card.css +9 -2
- package/src/components/approval-card/approval-card.examples.json +2 -2
- package/src/components/approval-card/approval-card.schema.json +5 -3
- package/src/components/approval-card/approval-card.schema.ts +3 -1
- package/src/components/approval-card/approval-card.svelte +8 -8
- package/src/components/approval-card/approval-card.types.ts +4 -4
- package/src/components/area-chart/area-chart.css +4 -3
- package/src/components/area-chart/area-chart.examples.json +6 -0
- package/src/components/area-chart/area-chart.svelte +156 -155
- package/src/components/area-chart/index.ts +1 -0
- package/src/components/autocomplete/autocomplete.css +2 -49
- package/src/components/autocomplete/autocomplete.schema.json +1 -1
- package/src/components/autocomplete/autocomplete.schema.ts +1 -1
- package/src/components/autocomplete/autocomplete.svelte +25 -33
- package/src/components/autocomplete/autocomplete.types.ts +17 -3
- package/src/components/avatar/avatar.css +0 -2
- package/src/components/avatar/avatar.schema.json +5 -10
- package/src/components/avatar/avatar.schema.ts +4 -9
- package/src/components/avatar/avatar.types.ts +1 -1
- package/src/components/avatar-group/avatar-group.css +3 -1
- package/src/components/avatar-group/avatar-group.svelte +46 -17
- package/src/components/backdrop/backdrop.schema.json +2 -2
- package/src/components/backdrop/backdrop.schema.ts +2 -2
- package/src/components/backdrop/backdrop.svelte +16 -4
- package/src/components/backdrop/backdrop.types.ts +2 -2
- package/src/components/badge/badge.css +2 -2
- package/src/components/badge/badge.schema.json +1 -1
- package/src/components/badge/badge.schema.ts +1 -1
- package/src/components/badge/badge.svelte +20 -37
- package/src/components/badge/badge.types.ts +3 -3
- package/src/components/banner/banner.examples.json +1 -1
- package/src/components/banner/banner.schema.json +5 -3
- package/src/components/banner/banner.schema.ts +3 -1
- package/src/components/banner/banner.svelte +2 -2
- package/src/components/banner/banner.types.ts +3 -3
- package/src/components/bar-chart/bar-chart.css +4 -3
- package/src/components/bar-chart/bar-chart.examples.json +6 -0
- package/src/components/bar-chart/bar-chart.svelte +141 -145
- package/src/components/bar-chart/index.ts +1 -0
- package/src/components/bento-cell/bento-cell.schema.json +102 -2
- package/src/components/bento-cell/bento-cell.schema.ts +102 -2
- package/src/components/bento-cell/bento-cell.svelte +2 -2
- package/src/components/bento-cell/bento-cell.types.ts +3 -2
- package/src/components/bento-grid/bento-grid.css +7 -17
- package/src/components/bento-grid/bento-grid.examples.json +1 -1
- package/src/components/bento-grid/bento-grid.schema.json +102 -2
- package/src/components/bento-grid/bento-grid.schema.ts +102 -2
- package/src/components/bento-grid/bento-grid.svelte +16 -48
- package/src/components/bento-grid/bento-grid.types.ts +4 -3
- package/src/components/blog-section/blog-section.css +4 -47
- package/src/components/blog-section/blog-section.svelte +14 -17
- package/src/components/breadcrumbs/breadcrumbs.svelte +11 -3
- package/src/components/breadcrumbs/breadcrumbs.types.ts +2 -1
- package/src/components/button/button.css +15 -5
- package/src/components/button/button.svelte +3 -4
- package/src/components/button-group/button-group.schema.json +2 -1
- package/src/components/button-group/button-group.schema.ts +1 -0
- package/src/components/button-group/button-group.svelte +3 -17
- package/src/components/button-group/button-group.types.ts +1 -1
- package/src/components/calendar/calendar.css +3 -0
- package/src/components/calendar/calendar.schema.json +8 -4
- package/src/components/calendar/calendar.schema.ts +4 -0
- package/src/components/calendar/calendar.svelte +113 -46
- package/src/components/calendar/calendar.types.ts +4 -4
- package/src/components/{cta-section/cta-section.css → call-to-action-section/call-to-action-section.css} +11 -11
- package/src/components/call-to-action-section/call-to-action-section.examples.json +13 -0
- package/src/components/{cta-section/cta-section.schema.json → call-to-action-section/call-to-action-section.schema.json} +1 -1
- package/src/components/{cta-section/cta-section.schema.ts → call-to-action-section/call-to-action-section.schema.ts} +1 -1
- package/src/components/{cta-section/cta-section.svelte → call-to-action-section/call-to-action-section.svelte} +6 -6
- package/src/components/{cta-section/cta-section.types.ts → call-to-action-section/call-to-action-section.types.ts} +23 -11
- package/src/components/call-to-action-section/index.ts +10 -0
- package/src/components/callout/callout.css +5 -0
- package/src/components/capability-gate/capability-gate.examples.json +1 -1
- package/src/components/capability-gate/capability-gate.schema.json +3 -3
- package/src/components/capability-gate/capability-gate.schema.ts +3 -3
- package/src/components/capability-gate/capability-gate.svelte +6 -6
- package/src/components/capability-gate/capability-gate.types.ts +9 -6
- package/src/components/card/card.css +25 -7
- package/src/components/card/card.examples.json +3 -3
- package/src/components/card/card.schema.json +6 -6
- package/src/components/card/card.schema.ts +6 -6
- package/src/components/card/card.svelte +1 -1
- package/src/components/card/card.types.ts +4 -3
- package/src/components/carousel/carousel.css +81 -7
- package/src/components/carousel/carousel.examples.json +6 -0
- package/src/components/carousel/carousel.schema.json +42 -1
- package/src/components/carousel/carousel.schema.ts +49 -1
- package/src/components/carousel/carousel.svelte +573 -69
- package/src/components/carousel/carousel.types.ts +47 -2
- package/src/components/carousel/carousel.variables.json +6 -1
- package/src/components/carousel/carousel.variables.ts +6 -1
- package/src/components/carousel/index.ts +1 -0
- package/src/components/checkbox/checkbox.css +63 -29
- package/src/components/checkbox/checkbox.examples.json +1 -1
- package/src/components/checkbox/checkbox.schema.json +6 -6
- package/src/components/checkbox/checkbox.schema.ts +6 -6
- package/src/components/checkbox/checkbox.svelte +55 -39
- package/src/components/checkbox/checkbox.types.ts +4 -4
- package/src/components/checkbox-group/checkbox-group.css +7 -9
- package/src/components/checkbox-group/checkbox-group.examples.json +6 -0
- package/src/components/checkbox-group/checkbox-group.svelte +9 -2
- package/src/components/checkbox-group/checkbox-group.types.ts +2 -1
- package/src/components/chip/chip.css +3 -0
- package/src/components/chip/chip.examples.json +1 -1
- package/src/components/chip/chip.schema.json +2 -2
- package/src/components/chip/chip.schema.ts +2 -2
- package/src/components/chip/chip.svelte +7 -7
- package/src/components/chip/chip.types.ts +6 -6
- package/src/components/choice-grid/choice-grid.css +2 -9
- package/src/components/choice-grid/choice-grid.schema.json +4 -5
- package/src/components/choice-grid/choice-grid.schema.ts +4 -5
- package/src/components/choice-grid/choice-grid.svelte +12 -9
- package/src/components/choice-grid/choice-grid.types.ts +1 -27
- package/src/components/click-away-listener/click-away-listener.examples.json +1 -1
- package/src/components/click-away-listener/click-away-listener.schema.json +2 -2
- package/src/components/click-away-listener/click-away-listener.schema.ts +2 -2
- package/src/components/click-away-listener/click-away-listener.svelte +2 -2
- package/src/components/click-away-listener/click-away-listener.types.ts +3 -3
- package/src/components/code-block/code-block.css +36 -2
- package/src/components/code-block/code-block.schema.json +5 -1
- package/src/components/code-block/code-block.schema.ts +6 -1
- package/src/components/code-block/code-block.svelte +15 -4
- package/src/components/code-block/code-block.types.ts +9 -1
- package/src/components/collapsible/collapsible.css +16 -8
- package/src/components/collapsible/collapsible.schema.json +1 -1
- package/src/components/collapsible/collapsible.schema.ts +1 -1
- package/src/components/collapsible/collapsible.svelte +2 -2
- package/src/components/collapsible/collapsible.types.ts +1 -1
- package/src/components/color-field/color-field.css +3 -1
- package/src/components/color-field/color-field.examples.json +1 -1
- package/src/components/color-field/color-field.schema.json +1 -5
- package/src/components/color-field/color-field.schema.ts +1 -5
- package/src/components/color-field/color-field.svelte +58 -81
- package/src/components/color-field/color-field.types.ts +2 -5
- package/src/components/color-picker/color-picker.css +1 -1
- package/src/components/color-picker/color-picker.examples.json +3 -3
- package/src/components/color-picker/color-picker.schema.json +0 -4
- package/src/components/color-picker/color-picker.schema.ts +0 -4
- package/src/components/color-picker/color-picker.svelte +12 -24
- package/src/components/color-picker/color-picker.types.ts +0 -2
- package/src/components/color-swatch-picker/color-swatch-picker.schema.json +1 -5
- package/src/components/color-swatch-picker/color-swatch-picker.schema.ts +1 -5
- package/src/components/color-swatch-picker/color-swatch-picker.svelte +4 -7
- package/src/components/color-swatch-picker/color-swatch-picker.types.ts +1 -3
- package/src/components/combobox/combobox.css +20 -18
- package/src/components/combobox/combobox.schema.json +2 -2
- package/src/components/combobox/combobox.schema.ts +2 -2
- package/src/components/combobox/combobox.svelte +190 -84
- package/src/components/combobox/combobox.types.ts +3 -3
- package/src/components/command-item/command-item.schema.json +2 -2
- package/src/components/command-item/command-item.schema.ts +3 -2
- package/src/components/command-item/command-item.svelte +3 -3
- package/src/components/command-item/command-item.types.ts +13 -5
- package/src/components/command-menu/command-menu-inline-completion.svelte.ts +184 -0
- package/src/components/command-menu/command-menu.css +28 -10
- package/src/components/command-menu/command-menu.examples.json +1 -1
- package/src/components/command-menu/command-menu.schema.json +9 -5
- package/src/components/command-menu/command-menu.schema.ts +11 -5
- package/src/components/command-menu/command-menu.svelte +231 -7
- package/src/components/command-menu/command-menu.types.ts +34 -5
- package/src/components/command-menu/index.ts +1 -0
- package/src/components/command-palette/command-palette.css +4 -2
- package/src/components/command-palette/command-palette.examples.json +3 -3
- package/src/components/command-palette/command-palette.schema.json +2 -2
- package/src/components/command-palette/command-palette.schema.ts +2 -2
- package/src/components/command-palette/command-palette.svelte +2 -2
- package/src/components/command-palette/command-palette.types.ts +2 -2
- package/src/components/confirm-dialog/confirm-dialog.examples.json +2 -2
- package/src/components/confirm-dialog/confirm-dialog.schema.json +2 -2
- package/src/components/confirm-dialog/confirm-dialog.schema.ts +2 -2
- package/src/components/confirm-dialog/confirm-dialog.svelte +4 -4
- package/src/components/confirm-dialog/confirm-dialog.types.ts +2 -2
- package/src/components/connection-indicator/connection-indicator.css +5 -4
- package/src/components/container/container.schema.json +3 -3
- package/src/components/container/container.schema.ts +3 -3
- package/src/components/context-menu/context-menu.schema.json +1 -1
- package/src/components/context-menu/context-menu.schema.ts +1 -1
- package/src/components/context-menu/context-menu.svelte +2 -2
- package/src/components/context-menu/context-menu.types.ts +1 -1
- package/src/components/copy-button/copy-button.css +4 -1
- package/src/components/copy-button/copy-button.schema.json +5 -0
- package/src/components/copy-button/copy-button.schema.ts +6 -0
- package/src/components/copy-button/copy-button.svelte +6 -2
- package/src/components/copy-button/copy-button.types.ts +2 -0
- package/src/components/data-grid/_internal/geometry.ts +32 -19
- package/src/components/data-grid/_internal/selection-model-test-support.svelte.ts +15 -0
- package/src/components/data-grid/_internal/selection-model.svelte.ts +15 -12
- package/src/components/data-grid/data-grid.css +8 -2
- package/src/components/data-grid/data-grid.schema.json +2 -2
- package/src/components/data-grid/data-grid.schema.ts +2 -2
- package/src/components/data-grid/data-grid.svelte +3 -3
- package/src/components/data-grid/data-grid.types.ts +2 -2
- package/src/components/date-picker/date-picker.css +8 -3
- package/src/components/date-picker/date-picker.schema.json +4 -0
- package/src/components/date-picker/date-picker.schema.ts +4 -0
- package/src/components/date-picker/date-picker.svelte +101 -73
- package/src/components/date-picker/date-picker.types.ts +2 -0
- package/src/components/date-range-field/date-range-field.css +7 -12
- package/src/components/date-range-field/date-range-field.schema.json +2 -1
- package/src/components/date-range-field/date-range-field.schema.ts +2 -1
- package/src/components/date-range-field/date-range-field.svelte +11 -76
- package/src/components/date-range-field/date-range-field.types.ts +10 -13
- package/src/components/diff-statistics/diff-statistics.css +3 -3
- package/src/components/diff-statistics/diff-statistics.svelte +8 -0
- package/src/components/drawer/drawer.css +25 -12
- package/src/components/drawer/drawer.svelte +5 -1
- package/src/components/dropdown/dropdown.css +2 -2
- package/src/components/dropdown-item/dropdown-item.svelte +1 -1
- package/src/components/dropdown-menu/dropdown-menu.svelte +11 -4
- package/src/components/dropdown-trigger/dropdown-trigger.schema.json +1 -1
- package/src/components/dropdown-trigger/dropdown-trigger.schema.ts +1 -1
- package/src/components/dropdown-trigger/dropdown-trigger.svelte +11 -3
- package/src/components/dropdown-trigger/dropdown-trigger.types.ts +1 -1
- package/src/components/event-stream-viewer/event-stream-viewer.css +35 -9
- package/src/components/event-stream-viewer/event-stream-viewer.examples.json +2 -2
- package/src/components/event-stream-viewer/event-stream-viewer.schema.json +3 -3
- package/src/components/event-stream-viewer/event-stream-viewer.schema.ts +3 -3
- package/src/components/event-stream-viewer/event-stream-viewer.svelte +59 -54
- package/src/components/event-stream-viewer/event-stream-viewer.types.ts +6 -6
- package/src/components/event-stream-viewer/event-stream-viewer.variables.json +1 -1
- package/src/components/event-stream-viewer/event-stream-viewer.variables.ts +4 -1
- package/src/components/event-timeline/event-timeline-modal.ts +64 -0
- package/src/components/event-timeline/event-timeline.css +192 -5
- package/src/components/event-timeline/event-timeline.examples.json +6 -0
- package/src/components/event-timeline/event-timeline.svelte +397 -35
- package/src/components/faceted-filter-bar/faceted-filter-bar.examples.json +2 -2
- package/src/components/faceted-filter-bar/faceted-filter-bar.schema.json +5 -5
- package/src/components/faceted-filter-bar/faceted-filter-bar.schema.ts +5 -5
- package/src/components/faceted-filter-bar/faceted-filter-bar.svelte +18 -19
- package/src/components/faceted-filter-bar/faceted-filter-bar.types.ts +5 -5
- package/src/components/feature-section/feature-section.css +18 -3
- package/src/components/feature-section/feature-section.svelte +1 -1
- package/src/components/feature-section/feature-section.types.ts +10 -2
- package/src/components/feed/feed.svelte +1 -0
- package/src/components/file-upload/file-upload.examples.json +1 -1
- package/src/components/file-upload/file-upload.schema.json +5 -6
- package/src/components/file-upload/file-upload.schema.ts +5 -6
- package/src/components/file-upload/file-upload.svelte +10 -2
- package/src/components/file-upload/file-upload.types.ts +2 -2
- package/src/components/{floating-action-button/floating-action-button.css → floating-action/floating-action.css} +61 -49
- package/src/components/floating-action/floating-action.examples.json +13 -0
- package/src/components/{floating-action-button/floating-action-button.schema.json → floating-action/floating-action.schema.json} +3 -3
- package/src/components/{floating-action-button/floating-action-button.schema.ts → floating-action/floating-action.schema.ts} +3 -3
- package/src/components/{floating-action-button/floating-action-button.svelte → floating-action/floating-action.svelte} +21 -12
- package/src/components/{floating-action-button/floating-action-button.types.ts → floating-action/floating-action.types.ts} +25 -25
- package/src/components/floating-action/index.ts +11 -0
- package/src/components/footer/footer.css +17 -5
- package/src/components/form-field/form-field.css +1 -1
- package/src/components/form-field/form-field.schema.json +6 -2
- package/src/components/form-field/form-field.schema.ts +6 -2
- package/src/components/form-field/form-field.svelte +13 -60
- package/src/components/form-field/form-field.types.ts +8 -6
- package/src/components/form-section/form-section.schema.json +1 -1
- package/src/components/form-section/form-section.schema.ts +1 -1
- package/src/components/grid/grid.css +21 -0
- package/src/components/grid/grid.examples.json +6 -0
- package/src/components/grid/grid.schema.json +106 -1
- package/src/components/grid/grid.schema.ts +107 -1
- package/src/components/grid/grid.svelte +2 -1
- package/src/components/grid/grid.types.ts +12 -5
- package/src/components/grid-item/grid-item.schema.json +91 -1
- package/src/components/grid-item/grid-item.schema.ts +91 -1
- package/src/components/grid-item/grid-item.types.ts +2 -1
- package/src/components/grid-list/grid-list.css +2 -11
- package/src/components/grid-list/grid-list.svelte +8 -5
- package/src/components/grid-list/grid-list.types.ts +1 -1
- package/src/components/grid-list/grid-list.variables.json +1 -1
- package/src/components/grid-list/grid-list.variables.ts +1 -1
- package/src/components/hero-section/hero-section.css +88 -5
- package/src/components/hero-section/hero-section.svelte +4 -1
- package/src/components/hover-card/hover-card.css +49 -5
- package/src/components/hover-card/hover-card.schema.json +10 -6
- package/src/components/hover-card/hover-card.schema.ts +6 -2
- package/src/components/hover-card/hover-card.svelte +68 -6
- package/src/components/hover-card/hover-card.types.ts +6 -6
- package/src/components/image/image.schema.json +6 -7
- package/src/components/image/image.schema.ts +6 -7
- package/src/components/image/image.svelte +3 -3
- package/src/components/image/image.types.ts +3 -3
- package/src/components/inline-loading/inline-loading.css +2 -2
- package/src/components/input/input.css +11 -9
- package/src/components/input/input.schema.json +17 -3
- package/src/components/input/input.schema.ts +18 -3
- package/src/components/input/input.svelte +95 -27
- package/src/components/input/input.types.ts +15 -4
- package/src/components/invocation-rule-builder/invocation-rule-builder.css +23 -5
- package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +8 -4
- package/src/components/json-editor/json-editor.css +39 -5
- package/src/components/json-editor/json-editor.schema.json +7 -4
- package/src/components/json-editor/json-editor.schema.ts +4 -1
- package/src/components/json-editor/json-editor.svelte +30 -8
- package/src/components/json-editor/json-editor.types.ts +4 -4
- package/src/components/json-schema-editor/form-view.svelte +2 -2
- package/src/components/json-schema-editor/json-schema-editor-impl.svelte +5 -5
- package/src/components/json-schema-editor/json-schema-editor-state.svelte.ts +4 -4
- package/src/components/json-schema-editor/json-schema-editor-state.types.ts +2 -2
- package/src/components/json-schema-editor/json-schema-editor.css +7 -9
- package/src/components/json-schema-editor/json-schema-editor.schema.json +2 -2
- package/src/components/json-schema-editor/json-schema-editor.schema.ts +2 -2
- package/src/components/json-schema-editor/json-schema-editor.types.ts +2 -2
- package/src/components/json-schema-editor/property-editor.svelte +6 -6
- package/src/components/json-schema-editor/property-list.svelte +12 -6
- package/src/components/json-viewer/json-viewer.css +6 -3
- package/src/components/kanban-board/kanban-board-column-reorder.svelte.ts +108 -0
- package/src/components/kanban-board/kanban-board-helpers.ts +91 -0
- package/src/components/kanban-board/kanban-board.css +23 -12
- package/src/components/kanban-board/kanban-board.schema.json +4 -2
- package/src/components/kanban-board/kanban-board.schema.ts +2 -0
- package/src/components/kanban-board/kanban-board.svelte +45 -169
- package/src/components/kanban-board/kanban-board.types.ts +2 -2
- package/src/components/kanban-board/kanban-board.variables.json +1 -0
- package/src/components/kanban-board/kanban-board.variables.ts +1 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.css +2 -1
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.svelte +2 -2
- package/src/components/label/label.schema.json +4 -5
- package/src/components/label/label.schema.ts +4 -5
- package/src/components/label/label.types.ts +1 -1
- package/src/components/line-chart/index.ts +1 -0
- package/src/components/line-chart/line-chart.css +4 -3
- package/src/components/line-chart/line-chart.svelte +163 -164
- package/src/components/load-more/load-more.examples.json +2 -2
- package/src/components/load-more/load-more.schema.json +11 -7
- package/src/components/load-more/load-more.schema.ts +7 -3
- package/src/components/load-more/load-more.svelte +77 -15
- package/src/components/load-more/load-more.types.ts +7 -7
- package/src/components/logo-cloud/logo-cloud.css +6 -23
- package/src/components/logo-cloud/logo-cloud.svelte +3 -2
- package/src/components/logo-cloud/logo-cloud.variables.json +1 -1
- package/src/components/logo-cloud/logo-cloud.variables.ts +1 -1
- package/src/components/marquee/marquee.css +3 -0
- package/src/components/marquee/marquee.svelte +20 -2
- package/src/components/matrix-chart/index.ts +1 -0
- package/src/components/matrix-chart/matrix-chart.css +1 -0
- package/src/components/matrix-chart/matrix-chart.schema.json +11 -6
- package/src/components/matrix-chart/matrix-chart.schema.ts +6 -1
- package/src/components/matrix-chart/matrix-chart.svelte +18 -24
- package/src/components/matrix-chart/matrix-chart.types.ts +7 -7
- package/src/components/media-controls/media-controls.css +2 -2
- package/src/components/media-controls/media-controls.examples.json +1 -1
- package/src/components/media-controls/media-controls.schema.json +3 -3
- package/src/components/media-controls/media-controls.schema.ts +3 -3
- package/src/components/media-controls/media-controls.svelte +4 -5
- package/src/components/media-controls/media-controls.types.ts +6 -6
- package/src/components/mega-menu/mega-menu-content.svelte +224 -0
- package/src/components/mega-menu/mega-menu.css +24 -5
- package/src/components/mega-menu/mega-menu.examples.json +1 -1
- package/src/components/mega-menu/mega-menu.schema.json +14 -6
- package/src/components/mega-menu/mega-menu.schema.ts +10 -2
- package/src/components/mega-menu/mega-menu.svelte +188 -113
- package/src/components/mega-menu/mega-menu.types.ts +9 -7
- package/src/components/menu-bar/menu-bar.css +11 -2
- package/src/components/menu-bar/menu-bar.schema.json +2 -1
- package/src/components/menu-bar/menu-bar.schema.ts +1 -0
- package/src/components/menu-bar/menu-bar.svelte +30 -6
- package/src/components/menu-bar/menu-bar.types.ts +1 -1
- package/src/components/meter/meter.svelte +21 -5
- package/src/components/meter/meter.types.ts +7 -1
- package/src/components/modal/modal.css +64 -26
- package/src/components/modal/modal.schema.json +2 -2
- package/src/components/modal/modal.schema.ts +1 -1
- package/src/components/modal/modal.svelte +64 -102
- package/src/components/modal/modal.types.ts +2 -2
- package/src/components/multi-select/multi-select.css +77 -22
- package/src/components/multi-select/multi-select.schema.json +1 -1
- package/src/components/multi-select/multi-select.schema.ts +1 -1
- package/src/components/multi-select/multi-select.svelte +145 -131
- package/src/components/multi-select/multi-select.types.ts +1 -1
- package/src/components/navigation-bar/navigation-bar-focus.ts +117 -0
- package/src/components/navigation-bar/navigation-bar.css +93 -48
- package/src/components/navigation-bar/navigation-bar.examples.json +1 -1
- package/src/components/navigation-bar/navigation-bar.schema.json +3 -2
- package/src/components/navigation-bar/navigation-bar.schema.ts +2 -1
- package/src/components/navigation-bar/navigation-bar.svelte +314 -18
- package/src/components/navigation-bar/navigation-bar.types.ts +5 -3
- package/src/components/navigation-item/navigation-item.css +3 -0
- package/src/components/navigation-item/navigation-item.svelte +1 -1
- package/src/components/newsletter-section/newsletter-section.css +1 -1
- package/src/components/newsletter-section/newsletter-section.svelte +1 -1
- package/src/components/number-input/number-input.css +10 -58
- package/src/components/number-input/number-input.schema.json +9 -15
- package/src/components/number-input/number-input.schema.ts +9 -16
- package/src/components/number-input/number-input.svelte +70 -86
- package/src/components/number-input/number-input.types.ts +5 -2
- package/src/components/page-header/page-header.css +18 -9
- package/src/components/page-header/page-header.examples.json +2 -2
- package/src/components/page-header/page-header.schema.json +9 -4
- package/src/components/page-header/page-header.schema.ts +11 -4
- package/src/components/page-header/page-header.svelte +31 -11
- package/src/components/page-header/page-header.types.ts +25 -7
- package/src/components/pagination/pagination.css +3 -0
- package/src/components/payload-inspector/payload-inspector.css +2 -2
- package/src/components/permission-matrix/permission-matrix.css +22 -4
- package/src/components/permission-matrix/permission-matrix.svelte +12 -7
- package/src/components/phone-input/phone-input.css +37 -56
- package/src/components/phone-input/phone-input.svelte +96 -29
- package/src/components/pin-input/pin-input.css +10 -2
- package/src/components/popover/index.ts +7 -1
- package/src/components/popover/popover.css +9 -9
- package/src/components/popover/popover.examples.json +1 -1
- package/src/components/popover/popover.schema.json +15 -1
- package/src/components/popover/popover.schema.ts +16 -1
- package/src/components/popover/popover.svelte +63 -13
- package/src/components/popover/popover.types.ts +7 -1
- package/src/components/portal/index.ts +5 -1
- package/src/components/portal/portal.svelte +9 -11
- package/src/components/portal/portal.utilities.svelte.ts +885 -31
- package/src/components/pricing-card/pricing-card.css +1 -1
- package/src/components/pricing-card/pricing-card.examples.json +2 -2
- package/src/components/pricing-card/pricing-card.schema.json +1 -1
- package/src/components/pricing-card/pricing-card.schema.ts +1 -1
- package/src/components/pricing-card/pricing-card.svelte +2 -2
- package/src/components/pricing-card/pricing-card.types.ts +1 -1
- package/src/components/pricing-section/pricing-section.svelte +1 -1
- package/src/components/qr-code/qr-code.css +1 -1
- package/src/components/radio-group/radio-group.css +43 -16
- package/src/components/rating/rating.css +1 -1
- package/src/components/rating/rating.svelte +3 -0
- package/src/components/resizable-panels/index.ts +1 -0
- package/src/components/resizable-panels/resizable-panels.schema.json +2 -2
- package/src/components/resizable-panels/resizable-panels.schema.ts +2 -2
- package/src/components/resizable-panels/resizable-panels.svelte +3 -3
- package/src/components/resizable-panels/resizable-panels.types.ts +4 -4
- package/src/components/run-step-timeline/run-step-timeline.svelte +7 -5
- package/src/components/schedule-builder/schedule-builder.svelte +47 -36
- package/src/components/schema-form/schema-form-body.svelte +59 -328
- package/src/components/schema-form/schema-form-state.svelte.ts +353 -0
- package/src/components/schema-form/schema-form.css +1 -1
- package/src/components/schema-form/schema-form.examples.json +1 -1
- package/src/components/schema-form/schema-form.schema.json +2 -2
- package/src/components/schema-form/schema-form.schema.ts +2 -2
- package/src/components/schema-form/schema-form.svelte +2 -2
- package/src/components/schema-form/schema-form.types.ts +3 -6
- package/src/components/scroll-area/scroll-area.css +30 -0
- package/src/components/scroll-area/scroll-area.examples.json +1 -1
- package/src/components/scroll-area/scroll-area.schema.json +8 -0
- package/src/components/scroll-area/scroll-area.schema.ts +10 -0
- package/src/components/scroll-area/scroll-area.svelte +44 -2
- package/src/components/scroll-area/scroll-area.types.ts +17 -0
- package/src/components/search-field/search-field.css +3 -85
- package/src/components/search-field/search-field.examples.json +1 -1
- package/src/components/search-field/search-field.schema.json +6 -11
- package/src/components/search-field/search-field.schema.ts +6 -11
- package/src/components/search-field/search-field.svelte +45 -42
- package/src/components/search-field/search-field.types.ts +4 -7
- package/src/components/secret-value-field/secret-value-field.css +11 -1
- package/src/components/secret-value-field/secret-value-field.examples.json +2 -2
- package/src/components/secret-value-field/secret-value-field.schema.json +2 -2
- package/src/components/secret-value-field/secret-value-field.schema.ts +2 -2
- package/src/components/secret-value-field/secret-value-field.svelte +19 -65
- package/src/components/secret-value-field/secret-value-field.types.ts +2 -2
- package/src/components/segment/index.ts +1 -1
- package/src/components/segmented-control/segmented-control.css +12 -2
- package/src/components/select/select.css +4 -1
- package/src/components/select/select.schema.json +4 -5
- package/src/components/select/select.schema.ts +4 -5
- package/src/components/select/select.svelte +24 -27
- package/src/components/select/select.types.ts +1 -1
- package/src/components/selectable-row/selectable-row.css +2 -1
- package/src/components/selection-popover/selection-popover.css +4 -1
- package/src/components/selection-popover/selection-popover.examples.json +5 -5
- package/src/components/selection-popover/selection-popover.schema.json +4 -4
- package/src/components/selection-popover/selection-popover.schema.ts +4 -4
- package/src/components/selection-popover/selection-popover.svelte +82 -10
- package/src/components/selection-popover/selection-popover.types.ts +4 -4
- package/src/components/selection-popover/virtual-keyboard-dismissal.svelte.ts +264 -0
- package/src/components/share-card/share-card.schema.json +6 -3
- package/src/components/share-card/share-card.schema.ts +3 -0
- package/src/components/share-card/share-card.svelte +6 -6
- package/src/components/share-card/share-card.types.ts +5 -5
- package/src/components/sheet/sheet.css +28 -13
- package/src/components/sheet/sheet.examples.json +1 -1
- package/src/components/sheet/sheet.schema.json +2 -2
- package/src/components/sheet/sheet.schema.ts +2 -2
- package/src/components/sheet/sheet.svelte +3 -3
- package/src/components/sheet/sheet.types.ts +2 -2
- package/src/components/shortcut-hint/shortcut-hint.svelte +1 -1
- package/src/components/side-navigation/side-navigation.svelte +3 -1
- package/src/components/side-navigation-group/side-navigation-group.schema.json +4 -5
- package/src/components/side-navigation-group/side-navigation-group.schema.ts +4 -5
- package/src/components/side-navigation-group/side-navigation-group.svelte +3 -1
- package/src/components/side-navigation-group/side-navigation-group.types.ts +1 -1
- package/src/components/sidebar/sidebar.css +1 -1
- package/src/components/sidebar/sidebar.svelte +12 -2
- package/src/components/slider/slider.css +2 -0
- package/src/components/slider/slider.examples.json +1 -1
- package/src/components/slider/slider.schema.json +0 -4
- package/src/components/slider/slider.schema.ts +0 -4
- package/src/components/slider/slider.svelte +19 -18
- package/src/components/slider/slider.types.ts +6 -9
- package/src/components/sortable-list/sortable-list.css +28 -12
- package/src/components/sortable-list/sortable-list.examples.json +1 -1
- package/src/components/sortable-list/sortable-list.schema.json +1 -1
- package/src/components/sortable-list/sortable-list.schema.ts +1 -1
- package/src/components/sortable-list/sortable-list.svelte +12 -4
- package/src/components/sortable-list/sortable-list.types.ts +1 -1
- package/src/components/source-diff-viewer/index.ts +2 -5
- package/src/components/source-diff-viewer/source-diff-viewer.binary-notice.ts +116 -0
- package/src/components/source-diff-viewer/source-diff-viewer.css +1 -1
- package/src/components/source-diff-viewer/source-diff-viewer.git-header-parser.ts +85 -0
- package/src/components/source-diff-viewer/source-diff-viewer.labels.ts +34 -0
- package/src/components/source-diff-viewer/source-diff-viewer.path-normalization.ts +145 -0
- package/src/components/source-diff-viewer/source-diff-viewer.schema.json +1 -1
- package/src/components/source-diff-viewer/source-diff-viewer.schema.ts +1 -1
- package/src/components/source-diff-viewer/source-diff-viewer.svelte +4 -2
- package/src/components/source-diff-viewer/source-diff-viewer.types.ts +1 -1
- package/src/components/source-diff-viewer/source-diff-viewer.utilities.ts +6 -362
- package/src/components/spectrogram/index.ts +1 -0
- package/src/components/spectrogram/spectrogram.svelte +19 -4
- package/src/components/spectrum-chart/index.ts +1 -0
- package/src/components/speed-dial/speed-dial-exit.ts +121 -0
- package/src/components/speed-dial/speed-dial-focus.ts +96 -0
- package/src/components/speed-dial/speed-dial.css +45 -25
- package/src/components/speed-dial/speed-dial.examples.json +1 -1
- package/src/components/speed-dial/speed-dial.schema.json +1 -1
- package/src/components/speed-dial/speed-dial.schema.ts +1 -1
- package/src/components/speed-dial/speed-dial.svelte +303 -20
- package/src/components/speed-dial/speed-dial.types.ts +1 -1
- package/src/components/speed-dial-action/speed-dial-action.svelte +7 -11
- package/src/components/speed-dial-action/speed-dial-action.types.ts +3 -3
- package/src/components/stacked-list-item/stacked-list-item.css +9 -0
- package/src/components/statistic/index.ts +10 -0
- package/src/components/statistic/statistic.css +81 -0
- package/src/components/{stat/stat.schema.json → statistic/statistic.schema.json} +2 -2
- package/src/components/{stat/stat.schema.ts → statistic/statistic.schema.ts} +2 -2
- package/src/components/{stat/stat.svelte → statistic/statistic.svelte} +10 -8
- package/src/components/{stat/stat.types.ts → statistic/statistic.types.ts} +11 -11
- package/src/components/statistic/statistic.variables.json +10 -0
- package/src/components/statistic/statistic.variables.ts +12 -0
- package/src/components/statistic-group/index.ts +20 -0
- package/{dist/components/stat-group/stat-group.css → src/components/statistic-group/statistic-group.css} +27 -27
- package/src/components/statistic-group/statistic-group.examples.json +37 -0
- package/src/components/{stat-group/stat-group.schema.json → statistic-group/statistic-group.schema.json} +5 -5
- package/src/components/{stat-group/stat-group.schema.ts → statistic-group/statistic-group.schema.ts} +5 -5
- package/src/components/{stat-group/stat-group.svelte → statistic-group/statistic-group.svelte} +1 -1
- package/src/components/{stat-group/stat-group.types.ts → statistic-group/statistic-group.types.ts} +14 -14
- package/src/components/statistic-group/statistic-group.variables.json +5 -0
- package/src/components/statistic-group/statistic-group.variables.ts +7 -0
- package/src/components/statistics-section/index.ts +6 -0
- package/src/components/{stats-section/stats-section.css → statistics-section/statistics-section.css} +7 -7
- package/src/components/statistics-section/statistics-section.examples.json +13 -0
- package/src/components/{stats-section/stats-section.schema.json → statistics-section/statistics-section.schema.json} +5 -5
- package/src/components/{stats-section/stats-section.schema.ts → statistics-section/statistics-section.schema.ts} +5 -5
- package/src/components/{stats-section/stats-section.svelte → statistics-section/statistics-section.svelte} +11 -11
- package/src/components/statistics-section/statistics-section.types.ts +72 -0
- package/src/components/status-dot/status-dot.css +3 -3
- package/src/components/status-dot/status-dot.examples.json +1 -1
- package/src/components/status-dot/status-dot.schema.json +2 -2
- package/src/components/status-dot/status-dot.schema.ts +2 -2
- package/src/components/status-dot/status-dot.svelte +2 -2
- package/src/components/status-dot/status-dot.types.ts +4 -4
- package/src/components/steps/steps.css +1 -0
- package/src/components/steps/steps.schema.json +8 -4
- package/src/components/steps/steps.schema.ts +4 -0
- package/src/components/steps/steps.svelte +2 -1
- package/src/components/steps/steps.types.ts +7 -3
- package/src/components/tab/tab.schema.json +2 -1
- package/src/components/tab/tab.schema.ts +1 -0
- package/src/components/tab/tab.svelte +30 -11
- package/src/components/tab/tab.types.ts +14 -2
- package/src/components/tab-list/tab-list.svelte +2 -1
- package/src/components/tab-list/tab-list.types.ts +2 -1
- package/src/components/tab-panel/tab-panel.svelte +2 -1
- package/src/components/tab-panel/tab-panel.types.ts +2 -1
- package/src/components/table/table.css +18 -2
- package/src/components/table/table.examples.json +1 -1
- package/src/components/table/table.schema.json +8 -4
- package/src/components/table/table.schema.ts +4 -0
- package/src/components/table/table.svelte +4 -2
- package/src/components/table/table.types.ts +7 -4
- package/src/components/table-body/table-body.svelte +2 -2
- package/src/components/table-body/table-body.types.ts +2 -1
- package/src/components/table-cell/table-cell.schema.json +4 -2
- package/src/components/table-cell/table-cell.schema.ts +2 -0
- package/src/components/table-cell/table-cell.types.ts +2 -1
- package/src/components/table-header/table-header.schema.json +8 -8
- package/src/components/table-header/table-header.schema.ts +9 -9
- package/src/components/table-header/table-header.svelte +6 -6
- package/src/components/table-header/table-header.types.ts +48 -13
- package/src/components/table-header-cell/table-header-cell.schema.json +6 -3
- package/src/components/table-header-cell/table-header-cell.schema.ts +3 -0
- package/src/components/table-header-cell/table-header-cell.svelte +1 -1
- package/src/components/table-header-cell/table-header-cell.types.ts +3 -2
- package/src/components/table-of-contents/table-of-contents-active-heading.svelte.ts +158 -0
- package/src/components/table-of-contents/table-of-contents-heading-registry.svelte.ts +253 -0
- package/src/components/table-of-contents/table-of-contents.css +13 -1
- package/src/components/table-of-contents/table-of-contents.schema.json +1 -1
- package/src/components/table-of-contents/table-of-contents.schema.ts +2 -1
- package/src/components/table-of-contents/table-of-contents.svelte +11 -380
- package/src/components/table-of-contents/table-of-contents.types.ts +4 -1
- package/src/components/table-row/table-row.schema.json +2 -2
- package/src/components/table-row/table-row.schema.ts +2 -2
- package/src/components/table-row/table-row.svelte +6 -6
- package/src/components/table-row/table-row.types.ts +6 -6
- package/src/components/tabs/tabs.schema.json +9 -2
- package/src/components/tabs/tabs.schema.ts +7 -0
- package/src/components/tabs/tabs.svelte +71 -25
- package/src/components/tabs/tabs.types.ts +9 -10
- package/src/components/tag-input/tag-input.css +1 -1
- package/src/components/tag-input/tag-input.examples.json +3 -3
- package/src/components/tag-input/tag-input.schema.json +8 -12
- package/src/components/tag-input/tag-input.schema.ts +5 -9
- package/src/components/tag-input/tag-input.svelte +20 -17
- package/src/components/tag-input/tag-input.types.ts +8 -12
- package/src/components/team-section/team-section.css +2 -43
- package/src/components/team-section/team-section.examples.json +1 -1
- package/src/components/team-section/team-section.schema.json +1 -1
- package/src/components/team-section/team-section.schema.ts +1 -1
- package/src/components/team-section/team-section.svelte +20 -18
- package/src/components/team-section/team-section.types.ts +2 -2
- package/src/components/testimonial-section/testimonial-section.css +2 -47
- package/src/components/testimonial-section/testimonial-section.svelte +19 -20
- package/src/components/textarea/textarea.css +4 -1
- package/src/components/textarea/textarea.examples.json +2 -2
- package/src/components/textarea/textarea.schema.json +6 -7
- package/src/components/textarea/textarea.schema.ts +6 -7
- package/src/components/textarea/textarea.svelte +50 -17
- package/src/components/textarea/textarea.types.ts +3 -3
- package/src/components/time-field/time-field.css +33 -8
- package/src/components/time-field/time-field.schema.json +0 -3
- package/src/components/time-field/time-field.schema.ts +0 -3
- package/src/components/time-field/time-field.svelte +37 -20
- package/src/components/time-field/time-field.types.ts +0 -3
- package/src/components/timeline/timeline.svelte +1 -0
- package/src/components/toast-region/toast-region.svelte +12 -32
- package/src/components/toggle/toggle.schema.json +5 -0
- package/src/components/toggle/toggle.schema.ts +5 -0
- package/src/components/toggle/toggle.svelte +41 -24
- package/src/components/toggle/toggle.types.ts +3 -1
- package/src/components/toolbar/toolbar.svelte +26 -6
- package/src/components/tooltip/tooltip.css +1 -1
- package/src/components/tooltip/tooltip.schema.json +8 -3
- package/src/components/tooltip/tooltip.schema.ts +9 -2
- package/src/components/tooltip/tooltip.svelte +126 -28
- package/src/components/tooltip/tooltip.types.ts +21 -3
- package/src/components/transfer-list/transfer-list.css +33 -1
- package/src/components/transfer-list/transfer-list.svelte +17 -10
- package/src/components/tree/index.ts +1 -0
- package/src/components/tree/tree.examples.json +1 -1
- package/src/components/tree/tree.schema.json +3 -3
- package/src/components/tree/tree.schema.ts +3 -3
- package/src/components/tree/tree.svelte +50 -146
- package/src/components/tree/tree.types.ts +3 -3
- package/src/components/tree-item/index.ts +1 -0
- package/src/components/tree-item/tree-item-async-load.svelte.ts +64 -0
- package/src/components/tree-item/tree-item-drag.svelte.ts +129 -0
- package/src/components/tree-item/tree-item-label-highlight.ts +32 -0
- package/src/components/tree-item/tree-item-rename.svelte.ts +154 -0
- package/src/components/tree-item/tree-item.schema.json +4 -4
- package/src/components/tree-item/tree-item.schema.ts +4 -4
- package/src/components/tree-item/tree-item.svelte +75 -336
- package/src/components/tree-item/tree-item.types.ts +4 -4
- package/src/components/typography/typography.examples.json +1 -1
- package/src/components/typography/typography.schema.json +1 -1
- package/src/components/typography/typography.schema.ts +1 -1
- package/src/components/typography/typography.svelte +3 -3
- package/src/components/typography/typography.types.ts +7 -22
- package/src/components/waveform/index.ts +1 -0
- package/src/index.ts +71 -28
- package/src/schema-types.ts +10 -2
- package/src/styles/components/_control-item.css +3 -0
- package/src/styles/components/_field-label.css +1 -1
- package/src/styles/components/_floating-surface.css +0 -55
- package/src/styles/components/_input-frame.css +3 -0
- package/src/styles/components/_row-item.css +53 -0
- package/src/styles/components/_scroll-fade.css +317 -0
- package/src/styles/components/_status-surface.css +21 -1
- package/src/styles/components.css +12 -5
- package/src/styles/index.css +2 -0
- package/src/styles/tokens-base.css +241 -70
- package/src/styles/utilities.css +11 -2
- package/src/utilities/attachments.ts +202 -26
- package/src/utilities/drag-scroll-physics.ts +82 -0
- package/src/utilities/focus.ts +530 -0
- package/src/utilities/html-element-types.ts +48 -0
- package/src/utilities/sortable-controller.svelte.ts +2 -2
- package/src/utilities/use-drag-scroll.svelte.ts +186 -0
- package/src/utilities/use-drag-scroll.types.ts +17 -0
- package/src/utilities/use-fine-pointer.svelte.ts +23 -0
- package/src/utilities/use-fine-pointer.types.ts +4 -0
- package/src/utilities/use-intersection.svelte.ts +4 -3
- package/src/utilities/use-resize-observer.svelte.ts +8 -4
- package/src/utilities/value-change.ts +7 -3
- package/dist/cli/mcp-dependencies.d.ts +0 -4
- package/dist/cli/mcp.d.ts +0 -2
- package/dist/components/copy-button/__test-helpers__/copy-state-wrapper.svelte.d.ts +0 -6
- package/dist/components/copy-button/use-copy-state.svelte.d.ts +0 -57
- package/dist/components/cta-section/index.d.ts +0 -5
- package/dist/components/floating-action-button/index.d.ts +0 -5
- package/dist/components/stat/index.d.ts +0 -5
- package/dist/components/stat/stat.css +0 -81
- package/dist/components/stat/stat.svelte.d.ts +0 -18
- package/dist/components/stat-group/index.d.ts +0 -12
- package/dist/components/stat-group/stat-group.svelte.d.ts +0 -18
- package/dist/components/stats-section/index.d.ts +0 -5
- package/dist/components/stats-section/stats-section.svelte.d.ts +0 -19
- package/dist/components/stats-section/stats-section.types.d.ts +0 -58
- package/dist/server/components/cta-section/index.js +0 -16
- package/dist/server/components/floating-action-button/index.js +0 -16
- package/dist/server/components/stat-group/index.js +0 -17
- package/dist/server/components/stats-section/index.js +0 -18
- package/dist/server/index.server-42qeekwc.js +0 -10
- package/dist/server/index.server-435sj5m6.js +0 -125
- package/dist/server/index.server-4wx0qven.js +0 -221
- package/dist/server/index.server-62mtrvr7.js +0 -111
- package/dist/server/index.server-8c6cck0y.js +0 -247
- package/dist/server/index.server-8s3qm06c.js +0 -15
- package/dist/server/index.server-8xvc73zh.js +0 -169
- package/dist/server/index.server-8zazgeyc.js +0 -95
- package/dist/server/index.server-b4gp066a.js +0 -222
- package/dist/server/index.server-dj47xy3x.js +0 -400
- package/dist/server/index.server-dpw9dc92.js +0 -149
- package/dist/server/index.server-egk5q7aj.js +0 -148
- package/dist/server/index.server-hess6rtb.js +0 -45
- package/dist/server/index.server-psnzdn2g.js +0 -9
- package/dist/server/index.server-r70ezssy.js +0 -145
- package/dist/server/index.server-rsqa7q4a.js +0 -90
- package/dist/server/index.server-sd68dmej.js +0 -169
- package/dist/server/index.server-smw54qtg.js +0 -22
- package/dist/server/index.server-tbyd4re7.js +0 -203
- package/dist/server/index.server-tkrsxwye.js +0 -307
- package/dist/server/index.server-w7a9knxq.js +0 -666
- package/dist/server/index.server-wcadkrpf.js +0 -239
- package/dist/server/index.server-xsdzbgs2.js +0 -110
- package/dist/server/index.server-y35dk7yx.js +0 -9
- package/dist/server/index.server-zsjf8enc.js +0 -53
- package/dist/server/index.server-zwjp26z8.js +0 -21
- package/src/components/copy-button/__test-helpers__/copy-state-wrapper.svelte +0 -21
- package/src/components/copy-button/use-copy-state.svelte.ts +0 -76
- package/src/components/cta-section/cta-section.examples.json +0 -13
- package/src/components/cta-section/index.ts +0 -6
- package/src/components/floating-action-button/floating-action-button.examples.json +0 -13
- package/src/components/floating-action-button/index.ts +0 -11
- package/src/components/stat/index.ts +0 -6
- package/src/components/stat/stat.css +0 -81
- package/src/components/stat/stat.variables.json +0 -10
- package/src/components/stat/stat.variables.ts +0 -12
- package/src/components/stat-group/index.ts +0 -16
- package/src/components/stat-group/stat-group.examples.json +0 -37
- package/src/components/stat-group/stat-group.variables.json +0 -5
- package/src/components/stat-group/stat-group.variables.ts +0 -7
- package/src/components/stats-section/index.ts +0 -6
- package/src/components/stats-section/stats-section.examples.json +0 -13
- package/src/components/stats-section/stats-section.types.ts +0 -61
- /package/dist/components/{cta-section/cta-section.css.d.ts → call-to-action-section/call-to-action-section.css.d.ts} +0 -0
- /package/dist/components/{cta-section/cta-section.schema.d.ts → call-to-action-section/call-to-action-section.schema.d.ts} +0 -0
- /package/dist/components/{cta-section/cta-section.variables.d.ts → call-to-action-section/call-to-action-section.variables.d.ts} +0 -0
- /package/dist/components/{floating-action-button/floating-action-button.css.d.ts → floating-action/floating-action.css.d.ts} +0 -0
- /package/dist/components/{floating-action-button/floating-action-button.schema.d.ts → floating-action/floating-action.schema.d.ts} +0 -0
- /package/dist/components/{floating-action-button/floating-action-button.variables.d.ts → floating-action/floating-action.variables.d.ts} +0 -0
- /package/dist/components/{stat/stat.css.d.ts → statistic/statistic.css.d.ts} +0 -0
- /package/dist/components/{stat/stat.schema.d.ts → statistic/statistic.schema.d.ts} +0 -0
- /package/dist/components/{stat/stat.variables.d.ts → statistic/statistic.variables.d.ts} +0 -0
- /package/dist/components/{stat-group/stat-group.css.d.ts → statistic-group/statistic-group.css.d.ts} +0 -0
- /package/dist/components/{stat-group/stat-group.schema.d.ts → statistic-group/statistic-group.schema.d.ts} +0 -0
- /package/dist/components/{stat-group/stat-group.variables.d.ts → statistic-group/statistic-group.variables.d.ts} +0 -0
- /package/dist/components/{stats-section/stats-section.css.d.ts → statistics-section/statistics-section.css.d.ts} +0 -0
- /package/dist/components/{stats-section/stats-section.schema.d.ts → statistics-section/statistics-section.schema.d.ts} +0 -0
- /package/dist/components/{stats-section/stats-section.variables.d.ts → statistics-section/statistics-section.variables.d.ts} +0 -0
- /package/src/components/{cta-section/cta-section.variables.json → call-to-action-section/call-to-action-section.variables.json} +0 -0
- /package/src/components/{cta-section/cta-section.variables.ts → call-to-action-section/call-to-action-section.variables.ts} +0 -0
- /package/src/components/{floating-action-button/floating-action-button.variables.json → floating-action/floating-action.variables.json} +0 -0
- /package/src/components/{floating-action-button/floating-action-button.variables.ts → floating-action/floating-action.variables.ts} +0 -0
- /package/src/components/{stats-section/stats-section.variables.json → statistics-section/statistics-section.variables.json} +0 -0
- /package/src/components/{stats-section/stats-section.variables.ts → statistics-section/statistics-section.variables.ts} +0 -0
|
@@ -241,7 +241,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
241
241
|
}
|
|
242
242
|
return coords;
|
|
243
243
|
}
|
|
244
|
-
async function detectOverflow(
|
|
244
|
+
async function detectOverflow(state4, options) {
|
|
245
245
|
var _await$platform$isEle;
|
|
246
246
|
if (options === undefined) {
|
|
247
247
|
options = {};
|
|
@@ -253,14 +253,14 @@ async function detectOverflow(state2, options) {
|
|
|
253
253
|
rects,
|
|
254
254
|
elements,
|
|
255
255
|
strategy
|
|
256
|
-
} =
|
|
256
|
+
} = state4;
|
|
257
257
|
const {
|
|
258
258
|
boundary = "clippingAncestors",
|
|
259
259
|
rootBoundary = "viewport",
|
|
260
260
|
elementContext = "floating",
|
|
261
261
|
altBoundary = false,
|
|
262
262
|
padding = 0
|
|
263
|
-
} = evaluate(options,
|
|
263
|
+
} = evaluate(options, state4);
|
|
264
264
|
const paddingObject = getPaddingObject(padding);
|
|
265
265
|
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
266
266
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
@@ -344,19 +344,19 @@ function getRectsByLine(rects) {
|
|
|
344
344
|
}
|
|
345
345
|
return groups.map((rect) => rectToClientRect(getBoundingRect(rect)));
|
|
346
346
|
}
|
|
347
|
-
async function convertValueToCoords(
|
|
347
|
+
async function convertValueToCoords(state4, options) {
|
|
348
348
|
const {
|
|
349
349
|
placement,
|
|
350
350
|
platform,
|
|
351
351
|
elements
|
|
352
|
-
} =
|
|
352
|
+
} = state4;
|
|
353
353
|
const rtl = await (platform.isRTL == null ? undefined : platform.isRTL(elements.floating));
|
|
354
354
|
const side = getSide(placement);
|
|
355
355
|
const alignment = getAlignment(placement);
|
|
356
356
|
const isVertical = getSideAxis(placement) === "y";
|
|
357
357
|
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
358
358
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
359
|
-
const rawValue = evaluate(options,
|
|
359
|
+
const rawValue = evaluate(options, state4);
|
|
360
360
|
let {
|
|
361
361
|
mainAxis,
|
|
362
362
|
crossAxis,
|
|
@@ -418,7 +418,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
418
418
|
x: nextX,
|
|
419
419
|
y: nextY,
|
|
420
420
|
data,
|
|
421
|
-
reset:
|
|
421
|
+
reset: reset3
|
|
422
422
|
} = await fn({
|
|
423
423
|
x,
|
|
424
424
|
y,
|
|
@@ -439,18 +439,18 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
439
439
|
...middlewareData[name],
|
|
440
440
|
...data
|
|
441
441
|
};
|
|
442
|
-
if (
|
|
442
|
+
if (reset3 && resetCount < MAX_RESET_COUNT) {
|
|
443
443
|
resetCount++;
|
|
444
|
-
if (typeof
|
|
445
|
-
if (
|
|
446
|
-
statefulPlacement =
|
|
444
|
+
if (typeof reset3 === "object") {
|
|
445
|
+
if (reset3.placement) {
|
|
446
|
+
statefulPlacement = reset3.placement;
|
|
447
447
|
}
|
|
448
|
-
if (
|
|
449
|
-
rects =
|
|
448
|
+
if (reset3.rects) {
|
|
449
|
+
rects = reset3.rects === true ? await platform.getElementRects({
|
|
450
450
|
reference,
|
|
451
451
|
floating,
|
|
452
452
|
strategy
|
|
453
|
-
}) :
|
|
453
|
+
}) : reset3.rects;
|
|
454
454
|
}
|
|
455
455
|
({
|
|
456
456
|
x,
|
|
@@ -470,7 +470,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
470
470
|
}, arrow = (options) => ({
|
|
471
471
|
name: "arrow",
|
|
472
472
|
options,
|
|
473
|
-
async fn(
|
|
473
|
+
async fn(state4) {
|
|
474
474
|
const {
|
|
475
475
|
x,
|
|
476
476
|
y,
|
|
@@ -479,11 +479,11 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
479
479
|
platform,
|
|
480
480
|
elements,
|
|
481
481
|
middlewareData
|
|
482
|
-
} =
|
|
482
|
+
} = state4;
|
|
483
483
|
const {
|
|
484
484
|
element,
|
|
485
485
|
padding = 0
|
|
486
|
-
} = evaluate(options,
|
|
486
|
+
} = evaluate(options, state4) || {};
|
|
487
487
|
if (element == null) {
|
|
488
488
|
return {};
|
|
489
489
|
}
|
|
@@ -535,7 +535,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
535
535
|
return {
|
|
536
536
|
name: "autoPlacement",
|
|
537
537
|
options,
|
|
538
|
-
async fn(
|
|
538
|
+
async fn(state4) {
|
|
539
539
|
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
540
540
|
const {
|
|
541
541
|
rects,
|
|
@@ -543,16 +543,16 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
543
543
|
placement,
|
|
544
544
|
platform,
|
|
545
545
|
elements
|
|
546
|
-
} =
|
|
546
|
+
} = state4;
|
|
547
547
|
const {
|
|
548
548
|
crossAxis = false,
|
|
549
549
|
alignment,
|
|
550
550
|
allowedPlacements = placements,
|
|
551
551
|
autoAlignment = true,
|
|
552
552
|
...detectOverflowOptions
|
|
553
|
-
} = evaluate(options,
|
|
553
|
+
} = evaluate(options, state4);
|
|
554
554
|
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
555
|
-
const overflow = await platform.detectOverflow(
|
|
555
|
+
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
556
556
|
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? undefined : _middlewareData$autoP.index) || 0;
|
|
557
557
|
const currentPlacement = placements$1[currentIndex];
|
|
558
558
|
if (currentPlacement == null) {
|
|
@@ -610,7 +610,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
610
610
|
return {
|
|
611
611
|
name: "flip",
|
|
612
612
|
options,
|
|
613
|
-
async fn(
|
|
613
|
+
async fn(state4) {
|
|
614
614
|
var _middlewareData$arrow, _middlewareData$flip;
|
|
615
615
|
const {
|
|
616
616
|
placement,
|
|
@@ -619,7 +619,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
619
619
|
initialPlacement,
|
|
620
620
|
platform,
|
|
621
621
|
elements
|
|
622
|
-
} =
|
|
622
|
+
} = state4;
|
|
623
623
|
const {
|
|
624
624
|
mainAxis: checkMainAxis = true,
|
|
625
625
|
crossAxis: checkCrossAxis = true,
|
|
@@ -628,7 +628,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
628
628
|
fallbackAxisSideDirection = "none",
|
|
629
629
|
flipAlignment = true,
|
|
630
630
|
...detectOverflowOptions
|
|
631
|
-
} = evaluate(options,
|
|
631
|
+
} = evaluate(options, state4);
|
|
632
632
|
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
633
633
|
return {};
|
|
634
634
|
}
|
|
@@ -642,7 +642,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
642
642
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
643
643
|
}
|
|
644
644
|
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
645
|
-
const overflow = await platform.detectOverflow(
|
|
645
|
+
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
646
646
|
const overflows = [];
|
|
647
647
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? undefined : _middlewareData$flip.overflows) || [];
|
|
648
648
|
if (checkMainAxis) {
|
|
@@ -714,18 +714,18 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
714
714
|
return {
|
|
715
715
|
name: "hide",
|
|
716
716
|
options,
|
|
717
|
-
async fn(
|
|
717
|
+
async fn(state4) {
|
|
718
718
|
const {
|
|
719
719
|
rects,
|
|
720
720
|
platform
|
|
721
|
-
} =
|
|
721
|
+
} = state4;
|
|
722
722
|
const {
|
|
723
723
|
strategy = "referenceHidden",
|
|
724
724
|
...detectOverflowOptions
|
|
725
|
-
} = evaluate(options,
|
|
725
|
+
} = evaluate(options, state4);
|
|
726
726
|
switch (strategy) {
|
|
727
727
|
case "referenceHidden": {
|
|
728
|
-
const overflow = await platform.detectOverflow(
|
|
728
|
+
const overflow = await platform.detectOverflow(state4, {
|
|
729
729
|
...detectOverflowOptions,
|
|
730
730
|
elementContext: "reference"
|
|
731
731
|
});
|
|
@@ -738,7 +738,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
740
|
case "escaped": {
|
|
741
|
-
const overflow = await platform.detectOverflow(
|
|
741
|
+
const overflow = await platform.detectOverflow(state4, {
|
|
742
742
|
...detectOverflowOptions,
|
|
743
743
|
altBoundary: true
|
|
744
744
|
});
|
|
@@ -763,19 +763,19 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
763
763
|
return {
|
|
764
764
|
name: "inline",
|
|
765
765
|
options,
|
|
766
|
-
async fn(
|
|
766
|
+
async fn(state4) {
|
|
767
767
|
const {
|
|
768
768
|
placement,
|
|
769
769
|
elements,
|
|
770
770
|
rects,
|
|
771
771
|
platform,
|
|
772
772
|
strategy
|
|
773
|
-
} =
|
|
773
|
+
} = state4;
|
|
774
774
|
const {
|
|
775
775
|
padding = 2,
|
|
776
776
|
x,
|
|
777
777
|
y
|
|
778
|
-
} = evaluate(options,
|
|
778
|
+
} = evaluate(options, state4);
|
|
779
779
|
const nativeClientRects = Array.from(await (platform.getClientRects == null ? undefined : platform.getClientRects(elements.reference)) || []);
|
|
780
780
|
const clientRects = getRectsByLine(nativeClientRects);
|
|
781
781
|
const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
|
|
@@ -853,15 +853,15 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
853
853
|
return {
|
|
854
854
|
name: "offset",
|
|
855
855
|
options,
|
|
856
|
-
async fn(
|
|
856
|
+
async fn(state4) {
|
|
857
857
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
858
858
|
const {
|
|
859
859
|
x,
|
|
860
860
|
y,
|
|
861
861
|
placement,
|
|
862
862
|
middlewareData
|
|
863
|
-
} =
|
|
864
|
-
const diffCoords = await convertValueToCoords(
|
|
863
|
+
} = state4;
|
|
864
|
+
const diffCoords = await convertValueToCoords(state4, options);
|
|
865
865
|
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? undefined : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
866
866
|
return {};
|
|
867
867
|
}
|
|
@@ -882,13 +882,13 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
882
882
|
return {
|
|
883
883
|
name: "shift",
|
|
884
884
|
options,
|
|
885
|
-
async fn(
|
|
885
|
+
async fn(state4) {
|
|
886
886
|
const {
|
|
887
887
|
x,
|
|
888
888
|
y,
|
|
889
889
|
placement,
|
|
890
890
|
platform
|
|
891
|
-
} =
|
|
891
|
+
} = state4;
|
|
892
892
|
const {
|
|
893
893
|
mainAxis: checkMainAxis = true,
|
|
894
894
|
crossAxis: checkCrossAxis = false,
|
|
@@ -905,12 +905,12 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
905
905
|
}
|
|
906
906
|
},
|
|
907
907
|
...detectOverflowOptions
|
|
908
|
-
} = evaluate(options,
|
|
908
|
+
} = evaluate(options, state4);
|
|
909
909
|
const coords = {
|
|
910
910
|
x,
|
|
911
911
|
y
|
|
912
912
|
};
|
|
913
|
-
const overflow = await platform.detectOverflow(
|
|
913
|
+
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
914
914
|
const crossAxis = getSideAxis(getSide(placement));
|
|
915
915
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
916
916
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -930,7 +930,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
930
930
|
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
931
931
|
}
|
|
932
932
|
const limitedCoords = limiter.fn({
|
|
933
|
-
...
|
|
933
|
+
...state4,
|
|
934
934
|
[mainAxis]: mainAxisCoord,
|
|
935
935
|
[crossAxis]: crossAxisCoord
|
|
936
936
|
});
|
|
@@ -953,19 +953,19 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
953
953
|
}
|
|
954
954
|
return {
|
|
955
955
|
options,
|
|
956
|
-
fn(
|
|
956
|
+
fn(state4) {
|
|
957
957
|
const {
|
|
958
958
|
x,
|
|
959
959
|
y,
|
|
960
960
|
placement,
|
|
961
961
|
rects,
|
|
962
962
|
middlewareData
|
|
963
|
-
} =
|
|
963
|
+
} = state4;
|
|
964
964
|
const {
|
|
965
965
|
offset: offset2 = 0,
|
|
966
966
|
mainAxis: checkMainAxis = true,
|
|
967
967
|
crossAxis: checkCrossAxis = true
|
|
968
|
-
} = evaluate(options,
|
|
968
|
+
} = evaluate(options, state4);
|
|
969
969
|
const coords = {
|
|
970
970
|
x,
|
|
971
971
|
y
|
|
@@ -974,7 +974,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
974
974
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
975
975
|
let mainAxisCoord = coords[mainAxis];
|
|
976
976
|
let crossAxisCoord = coords[crossAxis];
|
|
977
|
-
const rawOffset = evaluate(offset2,
|
|
977
|
+
const rawOffset = evaluate(offset2, state4);
|
|
978
978
|
const computedOffset = typeof rawOffset === "number" ? {
|
|
979
979
|
mainAxis: rawOffset,
|
|
980
980
|
crossAxis: 0
|
|
@@ -1018,19 +1018,19 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
1018
1018
|
return {
|
|
1019
1019
|
name: "size",
|
|
1020
1020
|
options,
|
|
1021
|
-
async fn(
|
|
1021
|
+
async fn(state4) {
|
|
1022
1022
|
var _state$middlewareData, _state$middlewareData2;
|
|
1023
1023
|
const {
|
|
1024
1024
|
placement,
|
|
1025
1025
|
rects,
|
|
1026
1026
|
platform,
|
|
1027
1027
|
elements
|
|
1028
|
-
} =
|
|
1028
|
+
} = state4;
|
|
1029
1029
|
const {
|
|
1030
1030
|
apply = () => {},
|
|
1031
1031
|
...detectOverflowOptions
|
|
1032
|
-
} = evaluate(options,
|
|
1033
|
-
const overflow = await platform.detectOverflow(
|
|
1032
|
+
} = evaluate(options, state4);
|
|
1033
|
+
const overflow = await platform.detectOverflow(state4, detectOverflowOptions);
|
|
1034
1034
|
const side = getSide(placement);
|
|
1035
1035
|
const alignment = getAlignment(placement);
|
|
1036
1036
|
const isYAxis = getSideAxis(placement) === "y";
|
|
@@ -1051,13 +1051,13 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
1051
1051
|
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
1052
1052
|
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
1053
1053
|
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
1054
|
-
const noShift = !
|
|
1054
|
+
const noShift = !state4.middlewareData.shift;
|
|
1055
1055
|
let availableHeight = overflowAvailableHeight;
|
|
1056
1056
|
let availableWidth = overflowAvailableWidth;
|
|
1057
|
-
if ((_state$middlewareData =
|
|
1057
|
+
if ((_state$middlewareData = state4.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
1058
1058
|
availableWidth = maximumClippingWidth;
|
|
1059
1059
|
}
|
|
1060
|
-
if ((_state$middlewareData2 =
|
|
1060
|
+
if ((_state$middlewareData2 = state4.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
1061
1061
|
availableHeight = maximumClippingHeight;
|
|
1062
1062
|
}
|
|
1063
1063
|
if (noShift && !alignment) {
|
|
@@ -1072,7 +1072,7 @@ var MAX_RESET_COUNT = 50, computePosition = async (reference, floating, config)
|
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
1074
|
await apply({
|
|
1075
|
-
...
|
|
1075
|
+
...state4,
|
|
1076
1076
|
availableWidth,
|
|
1077
1077
|
availableHeight
|
|
1078
1078
|
});
|
|
@@ -1292,10 +1292,10 @@ function getScale(element) {
|
|
|
1292
1292
|
const {
|
|
1293
1293
|
width,
|
|
1294
1294
|
height,
|
|
1295
|
-
$: $
|
|
1295
|
+
$: $7
|
|
1296
1296
|
} = getCssDimensions(domElement);
|
|
1297
|
-
let x = ($
|
|
1298
|
-
let y = ($
|
|
1297
|
+
let x = ($7 ? round(rect.width) : rect.width) / width;
|
|
1298
|
+
let y = ($7 ? round(rect.height) : rect.height) / height;
|
|
1299
1299
|
if (!x || !Number.isFinite(x)) {
|
|
1300
1300
|
x = 1;
|
|
1301
1301
|
}
|
|
@@ -1684,7 +1684,7 @@ function rectsAreEqual(a, b) {
|
|
|
1684
1684
|
function observeMove(element, onMove) {
|
|
1685
1685
|
let io = null;
|
|
1686
1686
|
let timeoutId;
|
|
1687
|
-
const
|
|
1687
|
+
const root3 = getDocumentElement(element);
|
|
1688
1688
|
function cleanup() {
|
|
1689
1689
|
var _io;
|
|
1690
1690
|
clearTimeout(timeoutId);
|
|
@@ -1713,8 +1713,8 @@ function observeMove(element, onMove) {
|
|
|
1713
1713
|
return;
|
|
1714
1714
|
}
|
|
1715
1715
|
const insetTop = floor(top);
|
|
1716
|
-
const insetRight = floor(
|
|
1717
|
-
const insetBottom = floor(
|
|
1716
|
+
const insetRight = floor(root3.clientWidth - (left + width));
|
|
1717
|
+
const insetBottom = floor(root3.clientHeight - (top + height));
|
|
1718
1718
|
const insetLeft = floor(left);
|
|
1719
1719
|
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1720
1720
|
const options = {
|
|
@@ -1744,7 +1744,7 @@ function observeMove(element, onMove) {
|
|
|
1744
1744
|
try {
|
|
1745
1745
|
io = new IntersectionObserver(handleObserve, {
|
|
1746
1746
|
...options,
|
|
1747
|
-
root:
|
|
1747
|
+
root: root3.ownerDocument
|
|
1748
1748
|
});
|
|
1749
1749
|
} catch (_e) {
|
|
1750
1750
|
io = new IntersectionObserver(handleObserve, options);
|
|
@@ -1884,7 +1884,7 @@ var init_floating_ui_dom = __esm(() => {
|
|
|
1884
1884
|
|
|
1885
1885
|
// src/components/portal/portal.svelte
|
|
1886
1886
|
import"svelte/internal/disclose-version";
|
|
1887
|
-
import * as $
|
|
1887
|
+
import * as $3 from "svelte/internal/client";
|
|
1888
1888
|
|
|
1889
1889
|
// src/utilities/class-names.ts
|
|
1890
1890
|
function classNames(...parts) {
|
|
@@ -1892,7 +1892,8 @@ function classNames(...parts) {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
|
|
1894
1894
|
// src/components/portal/portal.utilities.svelte.ts
|
|
1895
|
-
import * as $ from "svelte/internal/client";
|
|
1895
|
+
import * as $2 from "svelte/internal/client";
|
|
1896
|
+
import { untrack } from "svelte";
|
|
1896
1897
|
|
|
1897
1898
|
// ../../node_modules/esm-env/true.js
|
|
1898
1899
|
var true_default = true;
|
|
@@ -1911,6 +1912,21 @@ function readOption(value) {
|
|
|
1911
1912
|
return isOptionGetter(value) ? value() : value;
|
|
1912
1913
|
}
|
|
1913
1914
|
|
|
1915
|
+
// src/utilities/use-reduced-motion.svelte.ts
|
|
1916
|
+
import * as $ from "svelte/internal/client";
|
|
1917
|
+
import { MediaQuery } from "svelte/reactivity";
|
|
1918
|
+
function useReducedMotion() {
|
|
1919
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
1920
|
+
return { current: false };
|
|
1921
|
+
}
|
|
1922
|
+
const query = new MediaQuery("(prefers-reduced-motion: reduce)", false);
|
|
1923
|
+
return {
|
|
1924
|
+
get current() {
|
|
1925
|
+
return query.current;
|
|
1926
|
+
}
|
|
1927
|
+
};
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1914
1930
|
// src/components/portal/portal.utilities.svelte.ts
|
|
1915
1931
|
function resolvePortalTarget(target) {
|
|
1916
1932
|
if (typeof document === "undefined")
|
|
@@ -1928,21 +1944,202 @@ function resolvePortalTarget(target) {
|
|
|
1928
1944
|
return { kind: "unresolved", key: target };
|
|
1929
1945
|
}
|
|
1930
1946
|
}
|
|
1947
|
+
function findNearestOpenTopLayer(source, isModalDialog = (element) => element.matches(":modal")) {
|
|
1948
|
+
const selfTrigger = closestAcrossShadow(source, ".cinder-popover__trigger");
|
|
1949
|
+
let candidate = source;
|
|
1950
|
+
while (candidate) {
|
|
1951
|
+
try {
|
|
1952
|
+
if (candidate.matches("dialog") && isModalDialog(candidate) || candidate.matches("[popover]") && candidate.matches(":popover-open"))
|
|
1953
|
+
return candidate;
|
|
1954
|
+
} catch {}
|
|
1955
|
+
if (candidate !== selfTrigger) {
|
|
1956
|
+
const ownerId = candidate.dataset["cinderPortalOwner"];
|
|
1957
|
+
if (ownerId) {
|
|
1958
|
+
const root = candidate.getRootNode();
|
|
1959
|
+
const localOwner = root instanceof ShadowRoot ? Array.from(root.querySelectorAll("[id]")).find((element) => element.id === ownerId) : root instanceof Document ? root.getElementById(ownerId) : null;
|
|
1960
|
+
const owner = localOwner ?? document.getElementById(ownerId);
|
|
1961
|
+
if (owner instanceof HTMLElement)
|
|
1962
|
+
return owner;
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
const rootNode = candidate.getRootNode();
|
|
1966
|
+
const shadowHost = rootNode instanceof ShadowRoot ? rootNode.host : null;
|
|
1967
|
+
candidate = candidate.parentElement ?? (shadowHost instanceof HTMLElement ? shadowHost : null);
|
|
1968
|
+
}
|
|
1969
|
+
return null;
|
|
1970
|
+
}
|
|
1971
|
+
function getInheritedPortalStyle(source) {
|
|
1972
|
+
if (!source || typeof window === "undefined")
|
|
1973
|
+
return "";
|
|
1974
|
+
const computed = getComputedStyle(source);
|
|
1975
|
+
const hasDirectTypography = source.tagName === "NAV" || source.parentElement === null && [
|
|
1976
|
+
"font-family",
|
|
1977
|
+
"font-size",
|
|
1978
|
+
"font-weight",
|
|
1979
|
+
"line-height",
|
|
1980
|
+
"letter-spacing"
|
|
1981
|
+
].some((property) => source.style.getPropertyValue(property) !== "");
|
|
1982
|
+
const typographySource = hasDirectTypography ? source : source.parentElement ?? source;
|
|
1983
|
+
const typography = getComputedStyle(typographySource);
|
|
1984
|
+
const inherited = document.createElement("div").style;
|
|
1985
|
+
const customPropertyNames = new Set;
|
|
1986
|
+
let customPropertySource = source;
|
|
1987
|
+
while (customPropertySource) {
|
|
1988
|
+
for (const property of Array.from(customPropertySource.style)) {
|
|
1989
|
+
if (property.startsWith("--cinder-"))
|
|
1990
|
+
customPropertyNames.add(property);
|
|
1991
|
+
}
|
|
1992
|
+
customPropertySource = customPropertySource.parentElement ?? getShadowHost(customPropertySource);
|
|
1993
|
+
}
|
|
1994
|
+
for (let index = 0;index < computed.length; index += 1) {
|
|
1995
|
+
const property = computed.item(index);
|
|
1996
|
+
if (property.startsWith("--cinder-"))
|
|
1997
|
+
customPropertyNames.add(property);
|
|
1998
|
+
}
|
|
1999
|
+
for (const property of customPropertyNames) {
|
|
2000
|
+
const value = computed.getPropertyValue(property);
|
|
2001
|
+
if (value)
|
|
2002
|
+
inherited.setProperty(property, value);
|
|
2003
|
+
}
|
|
2004
|
+
const colorScheme = computed.colorScheme || source.style.colorScheme;
|
|
2005
|
+
if (colorScheme) {
|
|
2006
|
+
inherited.setProperty("color-scheme", colorScheme);
|
|
2007
|
+
}
|
|
2008
|
+
if (!source.hasAttribute("dir") && computed.direction) {
|
|
2009
|
+
inherited.setProperty("direction", computed.direction);
|
|
2010
|
+
}
|
|
2011
|
+
for (const property of [
|
|
2012
|
+
"font-family",
|
|
2013
|
+
"font-size",
|
|
2014
|
+
"font-weight",
|
|
2015
|
+
"line-height",
|
|
2016
|
+
"letter-spacing"
|
|
2017
|
+
]) {
|
|
2018
|
+
const value = typography.getPropertyValue(property);
|
|
2019
|
+
if (value)
|
|
2020
|
+
inherited.setProperty(property, value);
|
|
2021
|
+
}
|
|
2022
|
+
for (const property of Array.from(source.style)) {
|
|
2023
|
+
if (!property.startsWith("--cinder-"))
|
|
2024
|
+
continue;
|
|
2025
|
+
const rawValue = source.style.getPropertyValue(property);
|
|
2026
|
+
if (!rawValue.includes("var("))
|
|
2027
|
+
inherited.setProperty(property, rawValue);
|
|
2028
|
+
}
|
|
2029
|
+
if (source.style.colorScheme)
|
|
2030
|
+
inherited.setProperty("color-scheme", source.style.colorScheme);
|
|
2031
|
+
return inherited.cssText;
|
|
2032
|
+
}
|
|
2033
|
+
function createInheritedPortalStyle(source, active) {
|
|
2034
|
+
let style = $2.state("");
|
|
2035
|
+
const reducedMotion = useReducedMotion();
|
|
2036
|
+
$2.user_effect(() => {
|
|
2037
|
+
reducedMotion.current;
|
|
2038
|
+
if (!active()) {
|
|
2039
|
+
$2.set(style, "");
|
|
2040
|
+
return;
|
|
2041
|
+
}
|
|
2042
|
+
const inheritanceSource = source();
|
|
2043
|
+
const syncStyle = () => {
|
|
2044
|
+
$2.set(style, getInheritedPortalStyle(inheritanceSource), true);
|
|
2045
|
+
};
|
|
2046
|
+
syncStyle();
|
|
2047
|
+
const stopObserving = observeInheritedPortalAttributes(inheritanceSource, true, syncStyle);
|
|
2048
|
+
if (typeof window === "undefined")
|
|
2049
|
+
return stopObserving ?? undefined;
|
|
2050
|
+
const mediaQueries = [
|
|
2051
|
+
"(prefers-color-scheme: dark)",
|
|
2052
|
+
"(prefers-contrast: more)",
|
|
2053
|
+
"(forced-colors: active)"
|
|
2054
|
+
].map((query) => window.matchMedia(query));
|
|
2055
|
+
const onMediaChange = () => syncStyle();
|
|
2056
|
+
for (const mediaQuery of mediaQueries)
|
|
2057
|
+
mediaQuery.addEventListener("change", onMediaChange);
|
|
2058
|
+
window.addEventListener("resize", onMediaChange);
|
|
2059
|
+
return () => {
|
|
2060
|
+
stopObserving?.();
|
|
2061
|
+
for (const mediaQuery of mediaQueries)
|
|
2062
|
+
mediaQuery.removeEventListener("change", onMediaChange);
|
|
2063
|
+
window.removeEventListener("resize", onMediaChange);
|
|
2064
|
+
};
|
|
2065
|
+
});
|
|
2066
|
+
return {
|
|
2067
|
+
get style() {
|
|
2068
|
+
return $2.get(style);
|
|
2069
|
+
}
|
|
2070
|
+
};
|
|
2071
|
+
}
|
|
1931
2072
|
function copyInheritedPortalAttributes(element, source, inheritAttributes, fallbackAttributes = {
|
|
1932
2073
|
dir: element.getAttribute("dir"),
|
|
2074
|
+
lang: element.getAttribute("lang"),
|
|
1933
2075
|
dataTheme: element.getAttribute("data-theme"),
|
|
1934
2076
|
theme: element.getAttribute("data-cinder-theme")
|
|
1935
2077
|
}) {
|
|
2078
|
+
const inheritedDirectionAttribute = "data-cinder-portal-inherited-direction";
|
|
1936
2079
|
const preservesExplicitDirection = fallbackAttributes.preserveDirection || element.dataset["cinderExplicitDirection"] === "true";
|
|
1937
|
-
|
|
2080
|
+
let inheritedDir = null;
|
|
2081
|
+
let generatedDirectionFallback = null;
|
|
2082
|
+
if (inheritAttributes && source && !preservesExplicitDirection) {
|
|
2083
|
+
let computedDirection = null;
|
|
2084
|
+
let hasReadComputedDirection = false;
|
|
2085
|
+
const readComputedDirection = () => {
|
|
2086
|
+
if (!hasReadComputedDirection) {
|
|
2087
|
+
computedDirection = typeof getComputedStyle === "function" ? getComputedStyle(source).direction : null;
|
|
2088
|
+
hasReadComputedDirection = true;
|
|
2089
|
+
}
|
|
2090
|
+
return computedDirection;
|
|
2091
|
+
};
|
|
2092
|
+
let directionSource = source;
|
|
2093
|
+
let crossedGeneratedDirectionBoundary = false;
|
|
2094
|
+
while (directionSource) {
|
|
2095
|
+
const matchingDirection = closestAcrossShadow(directionSource, "[dir]");
|
|
2096
|
+
if (!matchingDirection) {
|
|
2097
|
+
directionSource = getShadowHost(directionSource);
|
|
2098
|
+
continue;
|
|
2099
|
+
}
|
|
2100
|
+
if (!matchingDirection.hasAttribute(inheritedDirectionAttribute)) {
|
|
2101
|
+
const explicitDirection = matchingDirection.getAttribute("dir");
|
|
2102
|
+
const normalizedExplicitDirection = explicitDirection?.toLowerCase();
|
|
2103
|
+
if (crossedGeneratedDirectionBoundary) {
|
|
2104
|
+
if (normalizedExplicitDirection === "auto")
|
|
2105
|
+
inheritedDir = "auto";
|
|
2106
|
+
break;
|
|
2107
|
+
}
|
|
2108
|
+
const documentComputedDirection = matchingDirection === document.documentElement && normalizedExplicitDirection !== "auto" ? readComputedDirection() : null;
|
|
2109
|
+
inheritedDir = normalizedExplicitDirection === "auto" ? normalizedExplicitDirection : documentComputedDirection || explicitDirection;
|
|
2110
|
+
break;
|
|
2111
|
+
}
|
|
2112
|
+
const generatedDirection = matchingDirection.getAttribute("dir");
|
|
2113
|
+
generatedDirectionFallback ??= generatedDirection;
|
|
2114
|
+
crossedGeneratedDirectionBoundary = true;
|
|
2115
|
+
directionSource = matchingDirection.parentElement ?? getShadowHost(matchingDirection);
|
|
2116
|
+
}
|
|
2117
|
+
if (inheritedDir === null) {
|
|
2118
|
+
inheritedDir = readComputedDirection() || generatedDirectionFallback;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
1938
2121
|
const nextDir = inheritedDir ?? fallbackAttributes.dir;
|
|
1939
2122
|
if (nextDir) {
|
|
1940
2123
|
element.setAttribute("dir", nextDir);
|
|
2124
|
+
if (!preservesExplicitDirection && inheritedDir !== null) {
|
|
2125
|
+
element.setAttribute(inheritedDirectionAttribute, "true");
|
|
2126
|
+
} else {
|
|
2127
|
+
element.removeAttribute(inheritedDirectionAttribute);
|
|
2128
|
+
}
|
|
1941
2129
|
} else {
|
|
1942
2130
|
element.removeAttribute("dir");
|
|
2131
|
+
element.removeAttribute(inheritedDirectionAttribute);
|
|
2132
|
+
}
|
|
2133
|
+
const preservesExplicitLanguage = fallbackAttributes.preserveLanguage ?? fallbackAttributes.lang !== null;
|
|
2134
|
+
const inheritedLanguage = inheritAttributes && source && !preservesExplicitLanguage ? closestAcrossShadow(source, "[lang]")?.getAttribute("lang") : null;
|
|
2135
|
+
const nextLanguage = inheritedLanguage ?? fallbackAttributes.lang;
|
|
2136
|
+
if (nextLanguage !== null && nextLanguage !== undefined) {
|
|
2137
|
+
element.setAttribute("lang", nextLanguage);
|
|
2138
|
+
} else {
|
|
2139
|
+
element.removeAttribute("lang");
|
|
1943
2140
|
}
|
|
1944
2141
|
const preservesExplicitDataTheme = fallbackAttributes.preserveDataTheme === true;
|
|
1945
|
-
const inheritedDataTheme = inheritAttributes && source && !preservesExplicitDataTheme && fallbackAttributes.dataTheme === null ? source
|
|
2142
|
+
const inheritedDataTheme = inheritAttributes && source && !preservesExplicitDataTheme && fallbackAttributes.dataTheme === null ? closestAcrossShadow(source, "[data-theme]")?.getAttribute("data-theme") : null;
|
|
1946
2143
|
const nextDataTheme = inheritedDataTheme ?? fallbackAttributes.dataTheme;
|
|
1947
2144
|
if (nextDataTheme) {
|
|
1948
2145
|
element.setAttribute("data-theme", nextDataTheme);
|
|
@@ -1950,7 +2147,7 @@ function copyInheritedPortalAttributes(element, source, inheritAttributes, fallb
|
|
|
1950
2147
|
element.removeAttribute("data-theme");
|
|
1951
2148
|
}
|
|
1952
2149
|
const preservesExplicitTheme = fallbackAttributes.preserveTheme === true;
|
|
1953
|
-
const inheritedTheme = inheritAttributes && source && !preservesExplicitTheme && fallbackAttributes.theme === null ? source
|
|
2150
|
+
const inheritedTheme = inheritAttributes && source && !preservesExplicitTheme && fallbackAttributes.theme === null ? closestAcrossShadow(source, "[data-cinder-theme]")?.getAttribute("data-cinder-theme") : null;
|
|
1954
2151
|
const nextTheme = inheritedTheme ?? fallbackAttributes.theme;
|
|
1955
2152
|
if (nextTheme) {
|
|
1956
2153
|
element.setAttribute("data-cinder-theme", nextTheme);
|
|
@@ -1959,33 +2156,585 @@ function copyInheritedPortalAttributes(element, source, inheritAttributes, fallb
|
|
|
1959
2156
|
}
|
|
1960
2157
|
return {
|
|
1961
2158
|
dir: inheritedDir ?? null,
|
|
2159
|
+
lang: inheritedLanguage ?? null,
|
|
1962
2160
|
dataTheme: inheritedDataTheme ?? null,
|
|
1963
2161
|
theme: inheritedTheme ?? null
|
|
1964
2162
|
};
|
|
1965
2163
|
}
|
|
2164
|
+
function redispatchPortaledEvent(event, sourceTarget) {
|
|
2165
|
+
if (!sourceTarget)
|
|
2166
|
+
return false;
|
|
2167
|
+
const originalTarget = event.target;
|
|
2168
|
+
const originalComposedPath = event.composedPath();
|
|
2169
|
+
const eventInit = {
|
|
2170
|
+
bubbles: event.bubbles,
|
|
2171
|
+
cancelable: event.cancelable,
|
|
2172
|
+
composed: event.composed
|
|
2173
|
+
};
|
|
2174
|
+
for (const property of [
|
|
2175
|
+
"view",
|
|
2176
|
+
"key",
|
|
2177
|
+
"code",
|
|
2178
|
+
"location",
|
|
2179
|
+
"repeat",
|
|
2180
|
+
"isComposing",
|
|
2181
|
+
"button",
|
|
2182
|
+
"buttons",
|
|
2183
|
+
"movementX",
|
|
2184
|
+
"movementY",
|
|
2185
|
+
"which",
|
|
2186
|
+
"clientX",
|
|
2187
|
+
"clientY",
|
|
2188
|
+
"screenX",
|
|
2189
|
+
"screenY",
|
|
2190
|
+
"ctrlKey",
|
|
2191
|
+
"shiftKey",
|
|
2192
|
+
"altKey",
|
|
2193
|
+
"metaKey",
|
|
2194
|
+
"relatedTarget",
|
|
2195
|
+
"pointerId",
|
|
2196
|
+
"pointerType",
|
|
2197
|
+
"isPrimary",
|
|
2198
|
+
"detail",
|
|
2199
|
+
"data",
|
|
2200
|
+
"inputType",
|
|
2201
|
+
"dataTransfer",
|
|
2202
|
+
"pressure",
|
|
2203
|
+
"tiltX",
|
|
2204
|
+
"tiltY",
|
|
2205
|
+
"twist",
|
|
2206
|
+
"tangentialPressure",
|
|
2207
|
+
"width",
|
|
2208
|
+
"height"
|
|
2209
|
+
]) {
|
|
2210
|
+
if (property in event)
|
|
2211
|
+
eventInit[property] = Reflect.get(event, property);
|
|
2212
|
+
}
|
|
2213
|
+
let bridgedEvent;
|
|
2214
|
+
try {
|
|
2215
|
+
bridgedEvent = Reflect.construct(event.constructor, [event.type, eventInit]);
|
|
2216
|
+
} catch {
|
|
2217
|
+
bridgedEvent = new Event(event.type, eventInit);
|
|
2218
|
+
}
|
|
2219
|
+
for (const property of ["movementX", "movementY", "which", "width", "height"]) {
|
|
2220
|
+
if (!(property in event))
|
|
2221
|
+
continue;
|
|
2222
|
+
const value = Reflect.get(event, property);
|
|
2223
|
+
if (Reflect.get(bridgedEvent, property) === value)
|
|
2224
|
+
continue;
|
|
2225
|
+
try {
|
|
2226
|
+
Object.defineProperty(bridgedEvent, property, { configurable: true, value });
|
|
2227
|
+
} catch {}
|
|
2228
|
+
}
|
|
2229
|
+
redispatchedPortalEvents.add(bridgedEvent);
|
|
2230
|
+
Object.defineProperty(bridgedEvent, "target", { configurable: true, value: originalTarget });
|
|
2231
|
+
const nativeComposedPath = bridgedEvent.composedPath.bind(bridgedEvent);
|
|
2232
|
+
let dispatchComplete = false;
|
|
2233
|
+
Object.defineProperty(bridgedEvent, "composedPath", {
|
|
2234
|
+
configurable: true,
|
|
2235
|
+
value: () => {
|
|
2236
|
+
return dispatchComplete ? [...originalComposedPath] : nativeComposedPath();
|
|
2237
|
+
}
|
|
2238
|
+
});
|
|
2239
|
+
if (event.defaultPrevented)
|
|
2240
|
+
bridgedEvent.preventDefault();
|
|
2241
|
+
event.stopPropagation();
|
|
2242
|
+
const dispatched = sourceTarget.dispatchEvent(bridgedEvent);
|
|
2243
|
+
dispatchComplete = true;
|
|
2244
|
+
if (!dispatched) {
|
|
2245
|
+
event.preventDefault();
|
|
2246
|
+
}
|
|
2247
|
+
return true;
|
|
2248
|
+
}
|
|
2249
|
+
var redispatchedPortalEvents = new WeakSet;
|
|
2250
|
+
function getShadowHost(element) {
|
|
2251
|
+
const root = element.getRootNode();
|
|
2252
|
+
return root instanceof ShadowRoot && root.host instanceof HTMLElement ? root.host : null;
|
|
2253
|
+
}
|
|
2254
|
+
function closestAcrossShadow(element, selector) {
|
|
2255
|
+
let current = element;
|
|
2256
|
+
while (current) {
|
|
2257
|
+
const match = current.closest(selector);
|
|
2258
|
+
if (match)
|
|
2259
|
+
return match;
|
|
2260
|
+
current = getShadowHost(current);
|
|
2261
|
+
}
|
|
2262
|
+
return null;
|
|
2263
|
+
}
|
|
2264
|
+
function isRedispatchedPortaledEvent(event) {
|
|
2265
|
+
return redispatchedPortalEvents.has(event);
|
|
2266
|
+
}
|
|
2267
|
+
function isEffectivelyDisabled(source) {
|
|
2268
|
+
if (source.matches(":disabled"))
|
|
2269
|
+
return true;
|
|
2270
|
+
const disabledFieldset = source.closest("fieldset[disabled]");
|
|
2271
|
+
if (!disabledFieldset)
|
|
2272
|
+
return false;
|
|
2273
|
+
const firstLegend = disabledFieldset.querySelector(":scope > legend");
|
|
2274
|
+
return !firstLegend?.contains(source);
|
|
2275
|
+
}
|
|
2276
|
+
function isPortalSourceUnavailable(source) {
|
|
2277
|
+
if (isEffectivelyDisabled(source))
|
|
2278
|
+
return true;
|
|
2279
|
+
if (closestAcrossShadow(source, '[hidden], [inert], [aria-hidden="true"]'))
|
|
2280
|
+
return true;
|
|
2281
|
+
if (typeof window === "undefined" || typeof getComputedStyle !== "function")
|
|
2282
|
+
return false;
|
|
2283
|
+
let ancestor = source;
|
|
2284
|
+
while (ancestor) {
|
|
2285
|
+
const computed = getComputedStyle(ancestor);
|
|
2286
|
+
if (computed.display === "none" || computed.visibility === "hidden")
|
|
2287
|
+
return true;
|
|
2288
|
+
ancestor = ancestor.parentElement ?? getShadowHost(ancestor);
|
|
2289
|
+
}
|
|
2290
|
+
return false;
|
|
2291
|
+
}
|
|
2292
|
+
function observePortalSourceAvailability(source, onChange) {
|
|
2293
|
+
if (!source)
|
|
2294
|
+
return () => {};
|
|
2295
|
+
const syncAvailability = () => {
|
|
2296
|
+
onChange(isPortalSourceUnavailable(source));
|
|
2297
|
+
};
|
|
2298
|
+
if (typeof MutationObserver === "undefined") {
|
|
2299
|
+
syncAvailability();
|
|
2300
|
+
return () => {};
|
|
2301
|
+
}
|
|
2302
|
+
const observer = new MutationObserver(syncAvailability);
|
|
2303
|
+
let ancestor = source;
|
|
2304
|
+
while (ancestor) {
|
|
2305
|
+
observer.observe(ancestor, {
|
|
2306
|
+
attributes: true,
|
|
2307
|
+
attributeFilter: [
|
|
2308
|
+
"hidden",
|
|
2309
|
+
"inert",
|
|
2310
|
+
"aria-hidden",
|
|
2311
|
+
"disabled",
|
|
2312
|
+
"class",
|
|
2313
|
+
"style"
|
|
2314
|
+
]
|
|
2315
|
+
});
|
|
2316
|
+
ancestor = ancestor.parentElement ?? getShadowHost(ancestor);
|
|
2317
|
+
}
|
|
2318
|
+
syncAvailability();
|
|
2319
|
+
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(syncAvailability);
|
|
2320
|
+
resizeObserver?.observe(source);
|
|
2321
|
+
return () => {
|
|
2322
|
+
observer.disconnect();
|
|
2323
|
+
resizeObserver?.disconnect();
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
1966
2326
|
function observeInheritedPortalAttributes(source, inheritAttributes, syncAttributes) {
|
|
1967
|
-
if (!inheritAttributes || !source
|
|
2327
|
+
if (!inheritAttributes || !source)
|
|
1968
2328
|
return null;
|
|
1969
|
-
const observer = new MutationObserver(() => {
|
|
2329
|
+
const observer = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
1970
2330
|
syncAttributes();
|
|
1971
2331
|
});
|
|
2332
|
+
const observedElements = [];
|
|
1972
2333
|
function observe(elementToObserve) {
|
|
1973
|
-
if (!elementToObserve || observedElements.includes(elementToObserve))
|
|
2334
|
+
if (!observer || !elementToObserve || observedElements.includes(elementToObserve))
|
|
1974
2335
|
return;
|
|
1975
2336
|
observedElements.push(elementToObserve);
|
|
1976
2337
|
observer.observe(elementToObserve, {
|
|
1977
2338
|
attributes: true,
|
|
1978
|
-
attributeFilter: [
|
|
2339
|
+
attributeFilter: [
|
|
2340
|
+
"class",
|
|
2341
|
+
"style",
|
|
2342
|
+
"dir",
|
|
2343
|
+
"lang",
|
|
2344
|
+
"data-theme",
|
|
2345
|
+
"data-cinder-theme"
|
|
2346
|
+
]
|
|
1979
2347
|
});
|
|
1980
2348
|
}
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
2349
|
+
function rebindObservedElements() {
|
|
2350
|
+
const nextElements = [];
|
|
2351
|
+
let ancestor = source ?? null;
|
|
2352
|
+
while (ancestor) {
|
|
2353
|
+
nextElements.push(ancestor);
|
|
2354
|
+
ancestor = ancestor.parentElement ?? getShadowHost(ancestor);
|
|
2355
|
+
}
|
|
2356
|
+
if (!nextElements.includes(document.documentElement)) {
|
|
2357
|
+
nextElements.push(document.documentElement);
|
|
2358
|
+
}
|
|
2359
|
+
if (observedElements.length === nextElements.length && observedElements.every((element, index) => element === nextElements[index])) {
|
|
2360
|
+
return;
|
|
2361
|
+
}
|
|
2362
|
+
observer?.disconnect();
|
|
2363
|
+
observedElements.length = 0;
|
|
2364
|
+
for (const element of nextElements)
|
|
2365
|
+
observe(element);
|
|
2366
|
+
}
|
|
2367
|
+
rebindObservedElements();
|
|
2368
|
+
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(syncAttributes);
|
|
2369
|
+
resizeObserver?.observe(source);
|
|
2370
|
+
const stopObservingComputedDirection = observeComputedDirection(source, syncAttributes, rebindObservedElements);
|
|
2371
|
+
return () => {
|
|
2372
|
+
observer?.disconnect();
|
|
2373
|
+
resizeObserver?.disconnect();
|
|
2374
|
+
stopObservingComputedDirection();
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
var computedDirectionObservations = new Set;
|
|
2378
|
+
var observedMediaQueries = new Map;
|
|
2379
|
+
var directionInvalidationRoots = new Map;
|
|
2380
|
+
var directionInvalidationEvents = [
|
|
2381
|
+
"focusin",
|
|
2382
|
+
"focusout",
|
|
2383
|
+
"pointerover",
|
|
2384
|
+
"pointerout",
|
|
2385
|
+
"input",
|
|
2386
|
+
"change",
|
|
2387
|
+
"toggle",
|
|
2388
|
+
"pointerdown",
|
|
2389
|
+
"pointerup",
|
|
2390
|
+
"pointercancel",
|
|
2391
|
+
"keydown",
|
|
2392
|
+
"keyup"
|
|
2393
|
+
];
|
|
2394
|
+
var directionInvalidationObserver = null;
|
|
2395
|
+
var directionInvalidationFrame = null;
|
|
2396
|
+
var directionInvalidationDocument = null;
|
|
2397
|
+
var directionInvalidationStarted = false;
|
|
2398
|
+
function invalidateComputedDirections() {
|
|
2399
|
+
if (directionInvalidationFrame !== null || typeof window === "undefined")
|
|
2400
|
+
return;
|
|
2401
|
+
if (typeof window.requestAnimationFrame !== "function") {
|
|
2402
|
+
syncComputedDirections();
|
|
2403
|
+
return;
|
|
2404
|
+
}
|
|
2405
|
+
directionInvalidationFrame = window.requestAnimationFrame(() => {
|
|
2406
|
+
directionInvalidationFrame = null;
|
|
2407
|
+
syncComputedDirections();
|
|
2408
|
+
});
|
|
2409
|
+
}
|
|
2410
|
+
function invalidatePortalDirection() {
|
|
2411
|
+
if (computedDirectionObservations.size === 0)
|
|
2412
|
+
return;
|
|
2413
|
+
refreshMediaQueryObservers();
|
|
2414
|
+
invalidateComputedDirections();
|
|
2415
|
+
}
|
|
2416
|
+
function syncComputedDirections() {
|
|
2417
|
+
const topologyChanges = new Set;
|
|
2418
|
+
for (const current of computedDirectionObservations) {
|
|
2419
|
+
if (!rebindComputedDirectionObservation(current))
|
|
2420
|
+
continue;
|
|
2421
|
+
topologyChanges.add(current);
|
|
2422
|
+
current.rebindInheritedAttributes();
|
|
2423
|
+
}
|
|
2424
|
+
if (topologyChanges.size > 0)
|
|
2425
|
+
refreshMediaQueryObservers();
|
|
2426
|
+
if (typeof getComputedStyle !== "function")
|
|
2427
|
+
return;
|
|
2428
|
+
for (const current of computedDirectionObservations) {
|
|
2429
|
+
const direction = getComputedStyle(current.source).direction;
|
|
2430
|
+
if (direction === current.direction && !topologyChanges.has(current))
|
|
2431
|
+
continue;
|
|
2432
|
+
current.direction = direction;
|
|
2433
|
+
current.sync();
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
function collectMediaQueries(rules, queries) {
|
|
2437
|
+
for (const rule of Array.from(rules)) {
|
|
2438
|
+
const conditionText = Reflect.get(rule, "conditionText");
|
|
2439
|
+
const media = Reflect.get(rule, "media");
|
|
2440
|
+
if (typeof conditionText === "string" && media && typeof media === "object") {
|
|
2441
|
+
queries.add(conditionText);
|
|
2442
|
+
}
|
|
2443
|
+
const mediaText = media && Reflect.get(media, "mediaText");
|
|
2444
|
+
if (typeof mediaText === "string" && mediaText)
|
|
2445
|
+
queries.add(mediaText);
|
|
2446
|
+
const importedStylesheet = Reflect.get(rule, "styleSheet");
|
|
2447
|
+
if (importedStylesheet) {
|
|
2448
|
+
try {
|
|
2449
|
+
const importedMedia = Reflect.get(importedStylesheet, "media");
|
|
2450
|
+
const importedMediaText = importedMedia && Reflect.get(importedMedia, "mediaText");
|
|
2451
|
+
if (typeof importedMediaText === "string" && importedMediaText)
|
|
2452
|
+
queries.add(importedMediaText);
|
|
2453
|
+
const importedRules = Reflect.get(importedStylesheet, "cssRules");
|
|
2454
|
+
if (isCssRuleCollection(importedRules))
|
|
2455
|
+
collectMediaQueries(importedRules, queries);
|
|
2456
|
+
} catch {}
|
|
2457
|
+
}
|
|
2458
|
+
const nestedRules = Reflect.get(rule, "cssRules");
|
|
2459
|
+
if (isCssRuleCollection(nestedRules)) {
|
|
2460
|
+
try {
|
|
2461
|
+
collectMediaQueries(nestedRules, queries);
|
|
2462
|
+
} catch {}
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
function addMediaQueryListener(mediaQuery) {
|
|
2467
|
+
if (typeof mediaQuery.addEventListener === "function") {
|
|
2468
|
+
mediaQuery.addEventListener("change", invalidateComputedDirections);
|
|
2469
|
+
} else {
|
|
2470
|
+
mediaQuery.addListener?.(invalidateComputedDirections);
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
function removeMediaQueryListener(mediaQuery) {
|
|
2474
|
+
if (typeof mediaQuery.removeEventListener === "function") {
|
|
2475
|
+
mediaQuery.removeEventListener("change", invalidateComputedDirections);
|
|
2476
|
+
} else {
|
|
2477
|
+
mediaQuery.removeListener?.(invalidateComputedDirections);
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
function isCssRuleCollection(value) {
|
|
2481
|
+
if (typeof CSSRuleList !== "undefined" && value instanceof CSSRuleList)
|
|
2482
|
+
return true;
|
|
2483
|
+
return typeof value === "object" && value !== null && Symbol.iterator in value;
|
|
2484
|
+
}
|
|
2485
|
+
function refreshMediaQueryObservers() {
|
|
2486
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function")
|
|
2487
|
+
return;
|
|
2488
|
+
const queries = new Set;
|
|
2489
|
+
const roots = new Set([document]);
|
|
2490
|
+
for (const current of computedDirectionObservations) {
|
|
2491
|
+
const root = current.source.getRootNode();
|
|
2492
|
+
if (root instanceof ShadowRoot)
|
|
2493
|
+
roots.add(root);
|
|
2494
|
+
for (const observedRoot of current.roots)
|
|
2495
|
+
roots.add(observedRoot);
|
|
2496
|
+
}
|
|
2497
|
+
for (const root of roots) {
|
|
2498
|
+
const stylesheets = [
|
|
2499
|
+
...Array.from(root.styleSheets ?? []),
|
|
2500
|
+
...Array.from(root.adoptedStyleSheets ?? [])
|
|
2501
|
+
];
|
|
2502
|
+
for (const stylesheet of stylesheets) {
|
|
2503
|
+
try {
|
|
2504
|
+
const mediaText = stylesheet.media?.mediaText;
|
|
2505
|
+
if (mediaText)
|
|
2506
|
+
queries.add(mediaText);
|
|
2507
|
+
collectMediaQueries(stylesheet.cssRules, queries);
|
|
2508
|
+
} catch {}
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
for (const [query, mediaQuery] of observedMediaQueries) {
|
|
2512
|
+
if (queries.has(query))
|
|
2513
|
+
continue;
|
|
2514
|
+
removeMediaQueryListener(mediaQuery);
|
|
2515
|
+
observedMediaQueries.delete(query);
|
|
2516
|
+
}
|
|
2517
|
+
for (const query of queries) {
|
|
2518
|
+
if (observedMediaQueries.has(query))
|
|
2519
|
+
continue;
|
|
2520
|
+
const mediaQuery = window.matchMedia(query);
|
|
2521
|
+
addMediaQueryListener(mediaQuery);
|
|
2522
|
+
observedMediaQueries.set(query, mediaQuery);
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
function startDirectionInvalidationObservers() {
|
|
2526
|
+
if (directionInvalidationStarted || typeof document === "undefined")
|
|
2527
|
+
return;
|
|
2528
|
+
directionInvalidationStarted = true;
|
|
2529
|
+
directionInvalidationDocument = document;
|
|
2530
|
+
directionInvalidationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver((mutations) => {
|
|
2531
|
+
if (mutations.some(isStylesheetMutation)) {
|
|
2532
|
+
refreshMediaQueryObservers();
|
|
2533
|
+
}
|
|
2534
|
+
invalidateComputedDirections();
|
|
2535
|
+
});
|
|
2536
|
+
directionInvalidationObserver?.observe(document.documentElement, {
|
|
2537
|
+
attributes: true,
|
|
2538
|
+
characterData: true,
|
|
2539
|
+
childList: true,
|
|
2540
|
+
subtree: true
|
|
2541
|
+
});
|
|
2542
|
+
document.addEventListener("load", handleStylesheetLoad, true);
|
|
2543
|
+
if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
|
|
2544
|
+
window.addEventListener("resize", invalidateComputedDirections);
|
|
2545
|
+
window.addEventListener("orientationchange", invalidateComputedDirections);
|
|
2546
|
+
window.addEventListener("hashchange", invalidateComputedDirections);
|
|
2547
|
+
for (const event of directionInvalidationEvents) {
|
|
2548
|
+
document.addEventListener(event, invalidateComputedDirections, true);
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
refreshMediaQueryObservers();
|
|
2552
|
+
}
|
|
2553
|
+
function isStylesheetMutation(mutation) {
|
|
2554
|
+
if (mutation.type === "attributes") {
|
|
2555
|
+
return (mutation.target instanceof HTMLStyleElement || isStylesheetLink(mutation.target)) && (mutation.attributeName === "media" || mutation.attributeName === "disabled");
|
|
2556
|
+
}
|
|
2557
|
+
if (mutation.type === "characterData") {
|
|
2558
|
+
return mutation.target.parentElement instanceof HTMLStyleElement;
|
|
2559
|
+
}
|
|
2560
|
+
if (mutation.type !== "childList")
|
|
2561
|
+
return false;
|
|
2562
|
+
if (mutation.target instanceof HTMLStyleElement)
|
|
2563
|
+
return true;
|
|
2564
|
+
return [...mutation.addedNodes, ...mutation.removedNodes].some(containsStylesheetNode);
|
|
2565
|
+
}
|
|
2566
|
+
function containsStylesheetNode(node) {
|
|
2567
|
+
if (node instanceof HTMLStyleElement || isStylesheetLink(node))
|
|
2568
|
+
return true;
|
|
2569
|
+
if (!(node instanceof Element || node instanceof DocumentFragment))
|
|
2570
|
+
return false;
|
|
2571
|
+
return node.querySelector("style") !== null || [...node.querySelectorAll("link")].some(isStylesheetLink);
|
|
2572
|
+
}
|
|
2573
|
+
function isStylesheetLink(node) {
|
|
2574
|
+
return node instanceof HTMLLinkElement && node.rel.split(/\s+/).some((relationship) => relationship.toLowerCase() === "stylesheet");
|
|
2575
|
+
}
|
|
2576
|
+
function observeDirectionShadowRoots(source) {
|
|
2577
|
+
const roots = [];
|
|
2578
|
+
let current = source;
|
|
2579
|
+
while (current) {
|
|
2580
|
+
const root = current.getRootNode();
|
|
2581
|
+
if (root instanceof ShadowRoot) {
|
|
2582
|
+
roots.push(root);
|
|
2583
|
+
const existing = directionInvalidationRoots.get(root);
|
|
2584
|
+
if (existing)
|
|
2585
|
+
existing.count += 1;
|
|
2586
|
+
else {
|
|
2587
|
+
const observer = typeof MutationObserver === "undefined" ? null : new MutationObserver((mutations) => {
|
|
2588
|
+
if (mutations.some(isStylesheetMutation))
|
|
2589
|
+
refreshMediaQueryObservers();
|
|
2590
|
+
invalidateComputedDirections();
|
|
2591
|
+
});
|
|
2592
|
+
observer?.observe(root, {
|
|
2593
|
+
attributes: true,
|
|
2594
|
+
characterData: true,
|
|
2595
|
+
childList: true,
|
|
2596
|
+
subtree: true
|
|
2597
|
+
});
|
|
2598
|
+
root.addEventListener("load", handleStylesheetLoad, true);
|
|
2599
|
+
for (const event of directionInvalidationEvents) {
|
|
2600
|
+
root.addEventListener(event, invalidateComputedDirections, true);
|
|
2601
|
+
}
|
|
2602
|
+
directionInvalidationRoots.set(root, { observer, count: 1 });
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
current = getShadowHost(current);
|
|
2606
|
+
}
|
|
2607
|
+
return roots;
|
|
2608
|
+
}
|
|
2609
|
+
function releaseDirectionShadowRoot(root) {
|
|
2610
|
+
const existing = directionInvalidationRoots.get(root);
|
|
2611
|
+
if (!existing)
|
|
2612
|
+
return;
|
|
2613
|
+
existing.count -= 1;
|
|
2614
|
+
if (existing.count > 0)
|
|
2615
|
+
return;
|
|
2616
|
+
existing.observer?.disconnect();
|
|
2617
|
+
root.removeEventListener("load", handleStylesheetLoad, true);
|
|
2618
|
+
for (const event of directionInvalidationEvents) {
|
|
2619
|
+
root.removeEventListener(event, invalidateComputedDirections, true);
|
|
1986
2620
|
}
|
|
1987
|
-
|
|
1988
|
-
|
|
2621
|
+
directionInvalidationRoots.delete(root);
|
|
2622
|
+
}
|
|
2623
|
+
function stopDirectionInvalidationObservers() {
|
|
2624
|
+
if (computedDirectionObservations.size > 0)
|
|
2625
|
+
return;
|
|
2626
|
+
directionInvalidationStarted = false;
|
|
2627
|
+
directionInvalidationObserver?.disconnect();
|
|
2628
|
+
directionInvalidationObserver = null;
|
|
2629
|
+
directionInvalidationDocument?.removeEventListener("load", handleStylesheetLoad, true);
|
|
2630
|
+
if (typeof window !== "undefined") {
|
|
2631
|
+
window.removeEventListener("resize", invalidateComputedDirections);
|
|
2632
|
+
window.removeEventListener("orientationchange", invalidateComputedDirections);
|
|
2633
|
+
window.removeEventListener("hashchange", invalidateComputedDirections);
|
|
2634
|
+
}
|
|
2635
|
+
for (const event of directionInvalidationEvents) {
|
|
2636
|
+
directionInvalidationDocument?.removeEventListener(event, invalidateComputedDirections, true);
|
|
2637
|
+
}
|
|
2638
|
+
for (const mediaQuery of observedMediaQueries.values()) {
|
|
2639
|
+
removeMediaQueryListener(mediaQuery);
|
|
2640
|
+
}
|
|
2641
|
+
observedMediaQueries.clear();
|
|
2642
|
+
for (const [root, { observer }] of directionInvalidationRoots) {
|
|
2643
|
+
observer?.disconnect();
|
|
2644
|
+
root.removeEventListener("load", handleStylesheetLoad, true);
|
|
2645
|
+
for (const event of directionInvalidationEvents) {
|
|
2646
|
+
root.removeEventListener(event, invalidateComputedDirections, true);
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
directionInvalidationRoots.clear();
|
|
2650
|
+
if (directionInvalidationFrame !== null) {
|
|
2651
|
+
if (typeof window !== "undefined")
|
|
2652
|
+
window.cancelAnimationFrame(directionInvalidationFrame);
|
|
2653
|
+
directionInvalidationFrame = null;
|
|
2654
|
+
}
|
|
2655
|
+
directionInvalidationDocument = null;
|
|
2656
|
+
}
|
|
2657
|
+
function handleStylesheetLoad(event) {
|
|
2658
|
+
const target = event.target;
|
|
2659
|
+
if (target instanceof HTMLStyleElement || target instanceof Node && isStylesheetLink(target)) {
|
|
2660
|
+
refreshMediaQueryObservers();
|
|
2661
|
+
invalidateComputedDirections();
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
function observeComputedDirection(source, sync, rebindInheritedAttributes) {
|
|
2665
|
+
if (typeof getComputedStyle !== "function" || typeof window === "undefined" || typeof document === "undefined") {
|
|
2666
|
+
return () => {};
|
|
2667
|
+
}
|
|
2668
|
+
const observation = {
|
|
2669
|
+
source,
|
|
2670
|
+
direction: getComputedStyle(source).direction,
|
|
2671
|
+
sync,
|
|
2672
|
+
rebindInheritedAttributes,
|
|
2673
|
+
roots: [],
|
|
2674
|
+
resizeObserver: null,
|
|
2675
|
+
resizeObservedElements: []
|
|
2676
|
+
};
|
|
2677
|
+
computedDirectionObservations.add(observation);
|
|
2678
|
+
startDirectionInvalidationObservers();
|
|
2679
|
+
observation.roots = observeDirectionShadowRoots(source);
|
|
2680
|
+
refreshMediaQueryObservers();
|
|
2681
|
+
rebindResizeObservation(observation, collectResizeObservedElements(source));
|
|
2682
|
+
return () => {
|
|
2683
|
+
computedDirectionObservations.delete(observation);
|
|
2684
|
+
observation.resizeObserver?.disconnect();
|
|
2685
|
+
for (const root of observation.roots)
|
|
2686
|
+
releaseDirectionShadowRoot(root);
|
|
2687
|
+
if (computedDirectionObservations.size === 0) {
|
|
2688
|
+
stopDirectionInvalidationObservers();
|
|
2689
|
+
} else {
|
|
2690
|
+
refreshMediaQueryObservers();
|
|
2691
|
+
}
|
|
2692
|
+
};
|
|
2693
|
+
}
|
|
2694
|
+
function collectDirectionShadowRoots(source) {
|
|
2695
|
+
const roots = [];
|
|
2696
|
+
let current = source;
|
|
2697
|
+
while (current) {
|
|
2698
|
+
const root = current.getRootNode();
|
|
2699
|
+
if (root instanceof ShadowRoot && !roots.includes(root))
|
|
2700
|
+
roots.push(root);
|
|
2701
|
+
current = getShadowHost(current);
|
|
2702
|
+
}
|
|
2703
|
+
return roots;
|
|
2704
|
+
}
|
|
2705
|
+
function collectResizeObservedElements(source) {
|
|
2706
|
+
const elements = [];
|
|
2707
|
+
let current = source;
|
|
2708
|
+
while (current) {
|
|
2709
|
+
elements.push(current);
|
|
2710
|
+
current = current.parentElement ?? getShadowHost(current);
|
|
2711
|
+
}
|
|
2712
|
+
return elements;
|
|
2713
|
+
}
|
|
2714
|
+
function rebindResizeObservation(observation, nextElements) {
|
|
2715
|
+
if (observation.resizeObservedElements.length === nextElements.length && observation.resizeObservedElements.every((element, index) => element === nextElements[index]))
|
|
2716
|
+
return false;
|
|
2717
|
+
observation.resizeObserver?.disconnect();
|
|
2718
|
+
observation.resizeObserver = null;
|
|
2719
|
+
observation.resizeObservedElements = nextElements;
|
|
2720
|
+
if (typeof ResizeObserver === "undefined")
|
|
2721
|
+
return true;
|
|
2722
|
+
const resizeObserver = new ResizeObserver(invalidateComputedDirections);
|
|
2723
|
+
for (const element of nextElements)
|
|
2724
|
+
resizeObserver.observe(element);
|
|
2725
|
+
observation.resizeObserver = resizeObserver;
|
|
2726
|
+
return true;
|
|
2727
|
+
}
|
|
2728
|
+
function rebindComputedDirectionObservation(observation) {
|
|
2729
|
+
const nextRoots = collectDirectionShadowRoots(observation.source);
|
|
2730
|
+
const rootsChanged = nextRoots.length !== observation.roots.length || nextRoots.some((root, index) => root !== observation.roots[index]);
|
|
2731
|
+
if (rootsChanged) {
|
|
2732
|
+
for (const root of observation.roots)
|
|
2733
|
+
releaseDirectionShadowRoot(root);
|
|
2734
|
+
observation.roots = observeDirectionShadowRoots(observation.source);
|
|
2735
|
+
}
|
|
2736
|
+
const resizeChanged = rebindResizeObservation(observation, collectResizeObservedElements(observation.source));
|
|
2737
|
+
return rootsChanged || resizeChanged;
|
|
1989
2738
|
}
|
|
1990
2739
|
function createPortalAttachment(options = {}) {
|
|
1991
2740
|
let lastWarnedUnresolvedKey = null;
|
|
@@ -1993,21 +2742,27 @@ function createPortalAttachment(options = {}) {
|
|
|
1993
2742
|
const initialParent = element.parentElement;
|
|
1994
2743
|
const initialAttributes = {
|
|
1995
2744
|
dir: element.getAttribute("dir"),
|
|
2745
|
+
lang: element.getAttribute("lang"),
|
|
1996
2746
|
dataTheme: element.getAttribute("data-theme"),
|
|
1997
2747
|
theme: element.getAttribute("data-cinder-theme")
|
|
1998
2748
|
};
|
|
1999
|
-
const
|
|
2749
|
+
const preserveInitialDirection = options.explicitAttributes === undefined;
|
|
2750
|
+
const managedAttributes = { dir: null, lang: null, dataTheme: null, theme: null };
|
|
2000
2751
|
function currentFallbackAttributes() {
|
|
2001
2752
|
const explicitAttributes = readOption(options.explicitAttributes ?? {});
|
|
2002
2753
|
const explicitDirection = explicitAttributes.dir;
|
|
2754
|
+
const explicitLanguage = explicitAttributes.lang;
|
|
2003
2755
|
const explicitDataTheme = explicitAttributes.dataTheme;
|
|
2004
2756
|
const explicitTheme = explicitAttributes.theme;
|
|
2005
2757
|
const direction = element.getAttribute("dir");
|
|
2758
|
+
const language = element.getAttribute("lang");
|
|
2006
2759
|
const dataTheme = element.getAttribute("data-theme");
|
|
2007
2760
|
const theme = element.getAttribute("data-cinder-theme");
|
|
2008
2761
|
return {
|
|
2009
|
-
dir: explicitDirection !== undefined ? explicitDirection : direction !== managedAttributes.dir ? direction : initialAttributes.dir,
|
|
2010
|
-
preserveDirection: explicitDirection !== undefined,
|
|
2762
|
+
dir: explicitDirection !== undefined ? explicitDirection : direction !== managedAttributes.dir ? direction : preserveInitialDirection ? initialAttributes.dir : null,
|
|
2763
|
+
preserveDirection: explicitDirection !== undefined || preserveInitialDirection && initialAttributes.dir !== null,
|
|
2764
|
+
lang: explicitLanguage !== undefined ? explicitLanguage : language !== managedAttributes.lang ? language : null,
|
|
2765
|
+
preserveLanguage: explicitLanguage !== undefined,
|
|
2011
2766
|
dataTheme: explicitDataTheme !== undefined ? explicitDataTheme : dataTheme !== managedAttributes.dataTheme ? dataTheme : null,
|
|
2012
2767
|
preserveDataTheme: explicitDataTheme !== undefined,
|
|
2013
2768
|
theme: explicitTheme !== undefined ? explicitTheme : theme !== managedAttributes.theme ? theme : null,
|
|
@@ -2017,6 +2772,7 @@ function createPortalAttachment(options = {}) {
|
|
|
2017
2772
|
function syncInheritedAttributes(source, inheritAttributes) {
|
|
2018
2773
|
const nextManagedAttributes = copyInheritedPortalAttributes(element, source, inheritAttributes, currentFallbackAttributes());
|
|
2019
2774
|
managedAttributes.dir = nextManagedAttributes.dir;
|
|
2775
|
+
managedAttributes.lang = nextManagedAttributes.lang;
|
|
2020
2776
|
managedAttributes.dataTheme = nextManagedAttributes.dataTheme;
|
|
2021
2777
|
managedAttributes.theme = nextManagedAttributes.theme;
|
|
2022
2778
|
}
|
|
@@ -2031,38 +2787,51 @@ function createPortalAttachment(options = {}) {
|
|
|
2031
2787
|
return;
|
|
2032
2788
|
anchor.parentNode.insertBefore(element, anchor.nextSibling);
|
|
2033
2789
|
}
|
|
2034
|
-
|
|
2790
|
+
let activeAttributeSource = null;
|
|
2791
|
+
let activeInheritAttributes = false;
|
|
2792
|
+
$2.user_effect(() => {
|
|
2793
|
+
readOption(options.explicitAttributes ?? {});
|
|
2794
|
+
untrack(() => syncInheritedAttributes(activeAttributeSource, activeInheritAttributes));
|
|
2795
|
+
});
|
|
2796
|
+
$2.user_effect(() => {
|
|
2035
2797
|
let stopObservingInheritedAttributes = null;
|
|
2036
2798
|
const disabled = readOption(options.disabled ?? false);
|
|
2037
2799
|
const inheritAttributes = readOption(options.inheritAttributes ?? true);
|
|
2038
2800
|
const targetValue = readOption(options.target ?? null);
|
|
2039
2801
|
const attributeSource = readOption(options.source ?? initialParent) ?? initialParent;
|
|
2040
|
-
const
|
|
2802
|
+
const rawResolved = disabled ? null : resolvePortalTarget(targetValue);
|
|
2803
|
+
const resolved = rawResolved?.kind === "resolved" && (rawResolved.target === element || element.contains(rawResolved.target)) ? { kind: "unresolved", key: "own-wrapper" } : rawResolved;
|
|
2041
2804
|
if (!disabled && resolved?.kind === "resolved") {
|
|
2042
|
-
|
|
2805
|
+
activeAttributeSource = attributeSource;
|
|
2806
|
+
activeInheritAttributes = inheritAttributes;
|
|
2807
|
+
untrack(() => syncInheritedAttributes(attributeSource, inheritAttributes));
|
|
2043
2808
|
stopObservingInheritedAttributes = observeInheritedPortalAttributes(attributeSource, inheritAttributes, () => syncInheritedAttributes(attributeSource, inheritAttributes));
|
|
2044
|
-
resolved.target
|
|
2809
|
+
if (element.parentElement !== resolved.target) {
|
|
2810
|
+
resolved.target.appendChild(element);
|
|
2811
|
+
}
|
|
2045
2812
|
lastWarnedUnresolvedKey = null;
|
|
2046
2813
|
} else if (!disabled && resolved?.kind === "unresolved") {
|
|
2047
2814
|
restoreInline();
|
|
2048
|
-
|
|
2815
|
+
activeAttributeSource = null;
|
|
2816
|
+
activeInheritAttributes = false;
|
|
2817
|
+
untrack(() => syncInheritedAttributes(null, false));
|
|
2049
2818
|
if (lastWarnedUnresolvedKey !== resolved.key) {
|
|
2050
2819
|
devWarn(`[cinder/portal] could not resolve portal target ${JSON.stringify(resolved.key)}.`);
|
|
2051
2820
|
lastWarnedUnresolvedKey = resolved.key;
|
|
2052
2821
|
}
|
|
2053
2822
|
} else if (disabled) {
|
|
2054
2823
|
restoreInline();
|
|
2055
|
-
|
|
2824
|
+
activeAttributeSource = null;
|
|
2825
|
+
activeInheritAttributes = false;
|
|
2826
|
+
untrack(() => syncInheritedAttributes(null, false));
|
|
2056
2827
|
lastWarnedUnresolvedKey = null;
|
|
2057
2828
|
}
|
|
2058
2829
|
return () => {
|
|
2059
2830
|
stopObservingInheritedAttributes?.();
|
|
2060
|
-
if (element.isConnected) {
|
|
2061
|
-
element.remove();
|
|
2062
|
-
}
|
|
2063
2831
|
};
|
|
2064
2832
|
});
|
|
2065
2833
|
return () => {
|
|
2834
|
+
element.remove();
|
|
2066
2835
|
if (anchor && anchor.parentNode) {
|
|
2067
2836
|
anchor.parentNode.removeChild(anchor);
|
|
2068
2837
|
}
|
|
@@ -2081,44 +2850,46 @@ var rest_excludes = new Set([
|
|
|
2081
2850
|
"inheritAttributes",
|
|
2082
2851
|
"children"
|
|
2083
2852
|
]);
|
|
2084
|
-
var root = $
|
|
2853
|
+
var root = $3.from_html(`<div><!></div>`);
|
|
2085
2854
|
function Portal($$anchor, $$props) {
|
|
2086
|
-
$
|
|
2087
|
-
let target = $
|
|
2088
|
-
let hasHydrated = $
|
|
2089
|
-
$
|
|
2090
|
-
$
|
|
2855
|
+
$3.push($$props, true);
|
|
2856
|
+
let target = $3.prop($$props, "target", 3, null), disabled = $3.prop($$props, "disabled", 3, false), inheritAttributes = $3.prop($$props, "inheritAttributes", 3, true), rest = $3.rest_props($$props, rest_excludes);
|
|
2857
|
+
let hasHydrated = $3.state(false);
|
|
2858
|
+
$3.user_effect(() => {
|
|
2859
|
+
$3.set(hasHydrated, true);
|
|
2091
2860
|
});
|
|
2092
|
-
const resolvedTarget = $
|
|
2093
|
-
const shouldRenderChildren = $
|
|
2094
|
-
|
|
2095
|
-
$2.attribute_effect(div, ($0) => ({ class: $0, ...rest }), [() => classNames($$props.class)]);
|
|
2096
|
-
var node = $2.child(div);
|
|
2097
|
-
{
|
|
2098
|
-
var consequent = ($$anchor2) => {
|
|
2099
|
-
var fragment = $2.comment();
|
|
2100
|
-
var node_1 = $2.first_child(fragment);
|
|
2101
|
-
$2.snippet(node_1, () => $$props.children);
|
|
2102
|
-
$2.append($$anchor2, fragment);
|
|
2103
|
-
};
|
|
2104
|
-
$2.if(node, ($$render) => {
|
|
2105
|
-
if ($2.get(shouldRenderChildren))
|
|
2106
|
-
$$render(consequent);
|
|
2107
|
-
});
|
|
2108
|
-
}
|
|
2109
|
-
$2.reset(div);
|
|
2110
|
-
$2.attach(div, () => createPortalAttachment({
|
|
2861
|
+
const resolvedTarget = $3.derived(() => !disabled() ? resolvePortalTarget(target()) : null);
|
|
2862
|
+
const shouldRenderChildren = $3.derived(() => disabled() || $3.get(hasHydrated) && $3.get(resolvedTarget) !== null);
|
|
2863
|
+
const portalAttachment = createPortalAttachment({
|
|
2111
2864
|
target: () => target(),
|
|
2112
2865
|
disabled: () => disabled(),
|
|
2113
2866
|
inheritAttributes: () => inheritAttributes(),
|
|
2114
2867
|
explicitAttributes: () => ({
|
|
2115
2868
|
dir: $$props.dir,
|
|
2869
|
+
lang: $$props.lang,
|
|
2116
2870
|
dataTheme: rest["data-theme"],
|
|
2117
2871
|
theme: rest["data-cinder-theme"]
|
|
2118
2872
|
})
|
|
2119
|
-
})
|
|
2120
|
-
|
|
2121
|
-
$
|
|
2873
|
+
});
|
|
2874
|
+
var div = root();
|
|
2875
|
+
$3.attribute_effect(div, ($0) => ({ class: $0, ...rest }), [() => classNames($$props.class)]);
|
|
2876
|
+
var node = $3.child(div);
|
|
2877
|
+
{
|
|
2878
|
+
var consequent = ($$anchor2) => {
|
|
2879
|
+
var fragment = $3.comment();
|
|
2880
|
+
var node_1 = $3.first_child(fragment);
|
|
2881
|
+
$3.snippet(node_1, () => $$props.children);
|
|
2882
|
+
$3.append($$anchor2, fragment);
|
|
2883
|
+
};
|
|
2884
|
+
$3.if(node, ($$render) => {
|
|
2885
|
+
if ($3.get(shouldRenderChildren))
|
|
2886
|
+
$$render(consequent);
|
|
2887
|
+
});
|
|
2888
|
+
}
|
|
2889
|
+
$3.reset(div);
|
|
2890
|
+
$3.attach(div, () => portalAttachment);
|
|
2891
|
+
$3.append($$anchor, div);
|
|
2892
|
+
$3.pop();
|
|
2122
2893
|
}
|
|
2123
2894
|
|
|
2124
2895
|
// src/components/portal/index.ts
|
|
@@ -2128,8 +2899,8 @@ import"@lostgradient/cinder/combobox/styles";
|
|
|
2128
2899
|
|
|
2129
2900
|
// src/components/combobox/combobox.svelte
|
|
2130
2901
|
import"svelte/internal/disclose-version";
|
|
2131
|
-
import * as $
|
|
2132
|
-
import { untrack as
|
|
2902
|
+
import * as $9 from "svelte/internal/client";
|
|
2903
|
+
import { untrack as untrack3 } from "svelte";
|
|
2133
2904
|
|
|
2134
2905
|
// src/_internal/field-control.ts
|
|
2135
2906
|
function describeId(fieldId, hasDescription) {
|
|
@@ -2190,6 +2961,270 @@ function setFormFieldContext(context) {
|
|
|
2190
2961
|
}
|
|
2191
2962
|
var getFormFieldContext = optionalContext(getFormFieldContextStrict);
|
|
2192
2963
|
|
|
2964
|
+
// src/_internal/form-field-frame.svelte
|
|
2965
|
+
import"svelte/internal/disclose-version";
|
|
2966
|
+
import * as $5 from "svelte/internal/client";
|
|
2967
|
+
|
|
2968
|
+
// src/_internal/form-field-provider.svelte
|
|
2969
|
+
import"svelte/internal/disclose-version";
|
|
2970
|
+
import * as $4 from "svelte/internal/client";
|
|
2971
|
+
function Form_field_provider($$anchor, $$props) {
|
|
2972
|
+
$4.push($$props, true);
|
|
2973
|
+
setFormFieldContext($$props.context);
|
|
2974
|
+
var fragment = $4.comment();
|
|
2975
|
+
var node = $4.first_child(fragment);
|
|
2976
|
+
$4.snippet(node, () => $$props.children);
|
|
2977
|
+
$4.append($$anchor, fragment);
|
|
2978
|
+
$4.pop();
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
// src/_internal/form-field-frame.svelte
|
|
2982
|
+
var rest_excludes2 = new Set([
|
|
2983
|
+
"$$slots",
|
|
2984
|
+
"$$events",
|
|
2985
|
+
"$$legacy",
|
|
2986
|
+
"id",
|
|
2987
|
+
"label",
|
|
2988
|
+
"hideLabel",
|
|
2989
|
+
"description",
|
|
2990
|
+
"error",
|
|
2991
|
+
"required",
|
|
2992
|
+
"disabled",
|
|
2993
|
+
"class",
|
|
2994
|
+
"controlClass",
|
|
2995
|
+
"labelClass",
|
|
2996
|
+
"descriptionClass",
|
|
2997
|
+
"errorClass",
|
|
2998
|
+
"descriptionId",
|
|
2999
|
+
"errorId",
|
|
3000
|
+
"controlLeading",
|
|
3001
|
+
"controlTrailing",
|
|
3002
|
+
"controlNativeDate",
|
|
3003
|
+
"controlDisabled",
|
|
3004
|
+
"controlInvalid",
|
|
3005
|
+
"fullWidth",
|
|
3006
|
+
"errorAlwaysMounted",
|
|
3007
|
+
"control",
|
|
3008
|
+
"before",
|
|
3009
|
+
"after",
|
|
3010
|
+
"message"
|
|
3011
|
+
]);
|
|
3012
|
+
var root2 = $5.from_html(`<span class="cinder-_required-marker" aria-hidden="true">*</span>`);
|
|
3013
|
+
var root_1 = $5.from_html(`<label> <!></label>`);
|
|
3014
|
+
var root_2 = $5.from_html(`<div><!> <!> <!></div>`);
|
|
3015
|
+
var root_3 = $5.from_html(`<p> </p>`);
|
|
3016
|
+
var root_4 = $5.from_html(`<p aria-live="polite"> </p>`);
|
|
3017
|
+
var root_5 = $5.from_html(`<div><!> <!> <!> <!> <!></div>`);
|
|
3018
|
+
function Form_field_frame($$anchor, $$props) {
|
|
3019
|
+
$5.push($$props, true);
|
|
3020
|
+
let hideLabel = $5.prop($$props, "hideLabel", 3, false), required = $5.prop($$props, "required", 3, false), disabled = $5.prop($$props, "disabled", 3, false), controlLeading = $5.prop($$props, "controlLeading", 3, false), controlTrailing = $5.prop($$props, "controlTrailing", 3, false), controlNativeDate = $5.prop($$props, "controlNativeDate", 3, false), controlDisabled = $5.prop($$props, "controlDisabled", 3, false), controlInvalid = $5.prop($$props, "controlInvalid", 3, false), fullWidth = $5.prop($$props, "fullWidth", 3, false), errorAlwaysMounted = $5.prop($$props, "errorAlwaysMounted", 3, false), rest = $5.rest_props($$props, rest_excludes2);
|
|
3021
|
+
const labelId = $5.derived(() => $$props.label ? `${$$props.id}-label` : undefined);
|
|
3022
|
+
const descriptionId = $5.derived(() => $$props.descriptionId ?? describeId($$props.id, !!$$props.description));
|
|
3023
|
+
const errorId2 = $5.derived(() => $$props.errorId ?? errorId($$props.id, !!$$props.error));
|
|
3024
|
+
const describedBy = $5.derived(() => composeDescribedBy($5.get(descriptionId), $5.get(errorId2)));
|
|
3025
|
+
const invalid = $5.derived(() => ariaInvalid(!!$$props.error));
|
|
3026
|
+
const needsControlWrapper = $5.derived(() => !!$$props.controlClass || !!$$props.before || !!$$props.after);
|
|
3027
|
+
const context = {
|
|
3028
|
+
get controlId() {
|
|
3029
|
+
return $$props.id;
|
|
3030
|
+
},
|
|
3031
|
+
get labelId() {
|
|
3032
|
+
return $5.get(labelId);
|
|
3033
|
+
},
|
|
3034
|
+
get describedBy() {
|
|
3035
|
+
return $5.get(describedBy);
|
|
3036
|
+
},
|
|
3037
|
+
get descriptionId() {
|
|
3038
|
+
return $5.get(descriptionId);
|
|
3039
|
+
},
|
|
3040
|
+
get errorId() {
|
|
3041
|
+
return $5.get(errorId2);
|
|
3042
|
+
},
|
|
3043
|
+
get invalid() {
|
|
3044
|
+
return $5.get(invalid);
|
|
3045
|
+
},
|
|
3046
|
+
get required() {
|
|
3047
|
+
return required();
|
|
3048
|
+
},
|
|
3049
|
+
get disabled() {
|
|
3050
|
+
return disabled();
|
|
3051
|
+
}
|
|
3052
|
+
};
|
|
3053
|
+
var div = root_5();
|
|
3054
|
+
$5.attribute_effect(div, ($0) => ({
|
|
3055
|
+
...rest,
|
|
3056
|
+
class: $0,
|
|
3057
|
+
"data-cinder-full-width": fullWidth() ? "" : undefined
|
|
3058
|
+
}), [() => classNames("cinder-form-field", $$props.class)]);
|
|
3059
|
+
var node = $5.child(div);
|
|
3060
|
+
{
|
|
3061
|
+
var consequent_1 = ($$anchor2) => {
|
|
3062
|
+
var label_1 = root_1();
|
|
3063
|
+
var text = $5.child(label_1);
|
|
3064
|
+
var node_1 = $5.sibling(text);
|
|
3065
|
+
{
|
|
3066
|
+
var consequent = ($$anchor3) => {
|
|
3067
|
+
var span = root2();
|
|
3068
|
+
$5.append($$anchor3, span);
|
|
3069
|
+
};
|
|
3070
|
+
$5.if(node_1, ($$render) => {
|
|
3071
|
+
if (required())
|
|
3072
|
+
$$render(consequent);
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
$5.reset(label_1);
|
|
3076
|
+
$5.template_effect(($0) => {
|
|
3077
|
+
$5.set_attribute(label_1, "id", $5.get(labelId));
|
|
3078
|
+
$5.set_attribute(label_1, "for", $$props.id);
|
|
3079
|
+
$5.set_class(label_1, 1, $0);
|
|
3080
|
+
$5.set_attribute(label_1, "data-disabled", disabled() || undefined);
|
|
3081
|
+
$5.set_text(text, `${$$props.label ?? ""} `);
|
|
3082
|
+
}, [
|
|
3083
|
+
() => $5.clsx(classNames("cinder-form-field__label", $$props.labelClass, hideLabel() && "cinder-sr-only"))
|
|
3084
|
+
]);
|
|
3085
|
+
$5.append($$anchor2, label_1);
|
|
3086
|
+
};
|
|
3087
|
+
$5.if(node, ($$render) => {
|
|
3088
|
+
if ($$props.label)
|
|
3089
|
+
$$render(consequent_1);
|
|
3090
|
+
});
|
|
3091
|
+
}
|
|
3092
|
+
var node_2 = $5.sibling(node, 2);
|
|
3093
|
+
{
|
|
3094
|
+
var consequent_4 = ($$anchor2) => {
|
|
3095
|
+
var div_1 = root_2();
|
|
3096
|
+
var node_3 = $5.child(div_1);
|
|
3097
|
+
{
|
|
3098
|
+
var consequent_2 = ($$anchor3) => {
|
|
3099
|
+
var fragment = $5.comment();
|
|
3100
|
+
var node_4 = $5.first_child(fragment);
|
|
3101
|
+
$5.snippet(node_4, () => $$props.before);
|
|
3102
|
+
$5.append($$anchor3, fragment);
|
|
3103
|
+
};
|
|
3104
|
+
$5.if(node_3, ($$render) => {
|
|
3105
|
+
if ($$props.before)
|
|
3106
|
+
$$render(consequent_2);
|
|
3107
|
+
});
|
|
3108
|
+
}
|
|
3109
|
+
var node_5 = $5.sibling(node_3, 2);
|
|
3110
|
+
Form_field_provider(node_5, {
|
|
3111
|
+
get context() {
|
|
3112
|
+
return context;
|
|
3113
|
+
},
|
|
3114
|
+
children: ($$anchor3, $$slotProps) => {
|
|
3115
|
+
var fragment_1 = $5.comment();
|
|
3116
|
+
var node_6 = $5.first_child(fragment_1);
|
|
3117
|
+
$5.snippet(node_6, () => $$props.control);
|
|
3118
|
+
$5.append($$anchor3, fragment_1);
|
|
3119
|
+
},
|
|
3120
|
+
$$slots: { default: true }
|
|
3121
|
+
});
|
|
3122
|
+
var node_7 = $5.sibling(node_5, 2);
|
|
3123
|
+
{
|
|
3124
|
+
var consequent_3 = ($$anchor3) => {
|
|
3125
|
+
var fragment_2 = $5.comment();
|
|
3126
|
+
var node_8 = $5.first_child(fragment_2);
|
|
3127
|
+
$5.snippet(node_8, () => $$props.after);
|
|
3128
|
+
$5.append($$anchor3, fragment_2);
|
|
3129
|
+
};
|
|
3130
|
+
$5.if(node_7, ($$render) => {
|
|
3131
|
+
if ($$props.after)
|
|
3132
|
+
$$render(consequent_3);
|
|
3133
|
+
});
|
|
3134
|
+
}
|
|
3135
|
+
$5.reset(div_1);
|
|
3136
|
+
$5.template_effect(($0) => {
|
|
3137
|
+
$5.set_class(div_1, 1, $0);
|
|
3138
|
+
$5.set_attribute(div_1, "data-leading", controlLeading() ? "" : undefined);
|
|
3139
|
+
$5.set_attribute(div_1, "data-trailing", controlTrailing() ? "" : undefined);
|
|
3140
|
+
$5.set_attribute(div_1, "data-native-date", controlNativeDate() ? "" : undefined);
|
|
3141
|
+
$5.set_attribute(div_1, "data-disabled", controlDisabled() ? "" : undefined);
|
|
3142
|
+
$5.set_attribute(div_1, "data-invalid", controlInvalid() ? "" : undefined);
|
|
3143
|
+
}, [
|
|
3144
|
+
() => $5.clsx(classNames("cinder-form-field__control", $$props.controlClass))
|
|
3145
|
+
]);
|
|
3146
|
+
$5.append($$anchor2, div_1);
|
|
3147
|
+
};
|
|
3148
|
+
var alternate = ($$anchor2) => {
|
|
3149
|
+
Form_field_provider($$anchor2, {
|
|
3150
|
+
get context() {
|
|
3151
|
+
return context;
|
|
3152
|
+
},
|
|
3153
|
+
children: ($$anchor3, $$slotProps) => {
|
|
3154
|
+
var fragment_4 = $5.comment();
|
|
3155
|
+
var node_9 = $5.first_child(fragment_4);
|
|
3156
|
+
$5.snippet(node_9, () => $$props.control);
|
|
3157
|
+
$5.append($$anchor3, fragment_4);
|
|
3158
|
+
},
|
|
3159
|
+
$$slots: { default: true }
|
|
3160
|
+
});
|
|
3161
|
+
};
|
|
3162
|
+
$5.if(node_2, ($$render) => {
|
|
3163
|
+
if ($5.get(needsControlWrapper))
|
|
3164
|
+
$$render(consequent_4);
|
|
3165
|
+
else
|
|
3166
|
+
$$render(alternate, -1);
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
var node_10 = $5.sibling(node_2, 2);
|
|
3170
|
+
{
|
|
3171
|
+
var consequent_5 = ($$anchor2) => {
|
|
3172
|
+
var p = root_3();
|
|
3173
|
+
var text_1 = $5.child(p, true);
|
|
3174
|
+
$5.reset(p);
|
|
3175
|
+
$5.template_effect(($0) => {
|
|
3176
|
+
$5.set_attribute(p, "id", $5.get(descriptionId));
|
|
3177
|
+
$5.set_class(p, 1, $0);
|
|
3178
|
+
$5.set_text(text_1, $$props.description);
|
|
3179
|
+
}, [
|
|
3180
|
+
() => $5.clsx(classNames("cinder-form-field__description", $$props.descriptionClass))
|
|
3181
|
+
]);
|
|
3182
|
+
$5.append($$anchor2, p);
|
|
3183
|
+
};
|
|
3184
|
+
$5.if(node_10, ($$render) => {
|
|
3185
|
+
if ($$props.description)
|
|
3186
|
+
$$render(consequent_5);
|
|
3187
|
+
});
|
|
3188
|
+
}
|
|
3189
|
+
var node_11 = $5.sibling(node_10, 2);
|
|
3190
|
+
{
|
|
3191
|
+
var consequent_6 = ($$anchor2) => {
|
|
3192
|
+
var fragment_5 = $5.comment();
|
|
3193
|
+
var node_12 = $5.first_child(fragment_5);
|
|
3194
|
+
$5.snippet(node_12, () => $$props.message);
|
|
3195
|
+
$5.append($$anchor2, fragment_5);
|
|
3196
|
+
};
|
|
3197
|
+
$5.if(node_11, ($$render) => {
|
|
3198
|
+
if ($$props.message)
|
|
3199
|
+
$$render(consequent_6);
|
|
3200
|
+
});
|
|
3201
|
+
}
|
|
3202
|
+
var node_13 = $5.sibling(node_11, 2);
|
|
3203
|
+
{
|
|
3204
|
+
var consequent_7 = ($$anchor2) => {
|
|
3205
|
+
var p_1 = root_4();
|
|
3206
|
+
var text_2 = $5.child(p_1, true);
|
|
3207
|
+
$5.reset(p_1);
|
|
3208
|
+
$5.template_effect(($0) => {
|
|
3209
|
+
$5.set_attribute(p_1, "id", $5.get(errorId2));
|
|
3210
|
+
$5.set_class(p_1, 1, $0);
|
|
3211
|
+
$5.set_attribute(p_1, "data-cinder-error", $$props.error ? "" : undefined);
|
|
3212
|
+
$5.set_text(text_2, $$props.error ?? "");
|
|
3213
|
+
}, [
|
|
3214
|
+
() => $5.clsx(classNames("cinder-form-field__error", $$props.errorClass))
|
|
3215
|
+
]);
|
|
3216
|
+
$5.append($$anchor2, p_1);
|
|
3217
|
+
};
|
|
3218
|
+
$5.if(node_13, ($$render) => {
|
|
3219
|
+
if ($$props.error || errorAlwaysMounted())
|
|
3220
|
+
$$render(consequent_7);
|
|
3221
|
+
});
|
|
3222
|
+
}
|
|
3223
|
+
$5.reset(div);
|
|
3224
|
+
$5.append($$anchor, div);
|
|
3225
|
+
$5.pop();
|
|
3226
|
+
}
|
|
3227
|
+
|
|
2193
3228
|
// src/_internal/overlay.ts
|
|
2194
3229
|
var escapeStack = [];
|
|
2195
3230
|
function pushEscapeHandler(handler) {
|
|
@@ -2250,26 +3285,273 @@ function captureFocus() {
|
|
|
2250
3285
|
return null;
|
|
2251
3286
|
}
|
|
2252
3287
|
|
|
3288
|
+
// src/components/_internal/create-command-list-state.svelte.ts
|
|
3289
|
+
import * as $6 from "svelte/internal/client";
|
|
3290
|
+
|
|
3291
|
+
// src/utilities/document-order.ts
|
|
3292
|
+
var DOCUMENT_POSITION_PRECEDING = 2;
|
|
3293
|
+
var DOCUMENT_POSITION_FOLLOWING = 4;
|
|
3294
|
+
function inDocumentOrder(items) {
|
|
3295
|
+
const sortedItems = [...items];
|
|
3296
|
+
sortedItems.sort((a, b) => {
|
|
3297
|
+
if (a.node === b.node)
|
|
3298
|
+
return 0;
|
|
3299
|
+
const position = a.node.compareDocumentPosition(b.node);
|
|
3300
|
+
if (position & DOCUMENT_POSITION_FOLLOWING)
|
|
3301
|
+
return -1;
|
|
3302
|
+
if (position & DOCUMENT_POSITION_PRECEDING)
|
|
3303
|
+
return 1;
|
|
3304
|
+
return 0;
|
|
3305
|
+
});
|
|
3306
|
+
return sortedItems;
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3309
|
+
// src/components/_internal/create-command-list-state.svelte.ts
|
|
3310
|
+
class CommandListState {
|
|
3311
|
+
#getListboxId;
|
|
3312
|
+
#autoActivateFirst = true;
|
|
3313
|
+
#registeredListboxId = $6.state("");
|
|
3314
|
+
#registrations = $6.state($6.proxy([]));
|
|
3315
|
+
get registrations() {
|
|
3316
|
+
return $6.get(this.#registrations);
|
|
3317
|
+
}
|
|
3318
|
+
set registrations(value) {
|
|
3319
|
+
$6.set(this.#registrations, value, true);
|
|
3320
|
+
}
|
|
3321
|
+
#registrationsReady = $6.state(false);
|
|
3322
|
+
get registrationsReady() {
|
|
3323
|
+
return $6.get(this.#registrationsReady);
|
|
3324
|
+
}
|
|
3325
|
+
set registrationsReady(value) {
|
|
3326
|
+
$6.set(this.#registrationsReady, value, true);
|
|
3327
|
+
}
|
|
3328
|
+
#itemCounter = 0;
|
|
3329
|
+
#readyCycle = 0;
|
|
3330
|
+
#intendedActiveId = $6.state(null);
|
|
3331
|
+
#enabledIds = $6.derived(() => {
|
|
3332
|
+
return inDocumentOrder(this.registrations).filter((registration) => !registration.getDisabled()).map((registration) => registration.id);
|
|
3333
|
+
});
|
|
3334
|
+
get enabledIds() {
|
|
3335
|
+
return $6.get(this.#enabledIds);
|
|
3336
|
+
}
|
|
3337
|
+
set enabledIds(value) {
|
|
3338
|
+
$6.set(this.#enabledIds, value);
|
|
3339
|
+
}
|
|
3340
|
+
#activeItemId = $6.derived(() => $6.get(this.#intendedActiveId) !== null && this.enabledIds.includes($6.get(this.#intendedActiveId)) ? $6.get(this.#intendedActiveId) : this.#autoActivateFirst ? this.enabledIds[0] ?? null : null);
|
|
3341
|
+
get activeItemId() {
|
|
3342
|
+
return $6.get(this.#activeItemId);
|
|
3343
|
+
}
|
|
3344
|
+
set activeItemId(value) {
|
|
3345
|
+
$6.set(this.#activeItemId, value);
|
|
3346
|
+
}
|
|
3347
|
+
constructor(listboxId, options = {}) {
|
|
3348
|
+
this.#getListboxId = typeof listboxId === "function" ? listboxId : () => listboxId;
|
|
3349
|
+
$6.set(this.#registeredListboxId, this.#getListboxId(), true);
|
|
3350
|
+
this.#autoActivateFirst = options.autoActivateFirst ?? true;
|
|
3351
|
+
}
|
|
3352
|
+
get listboxId() {
|
|
3353
|
+
return $6.get(this.#registeredListboxId);
|
|
3354
|
+
}
|
|
3355
|
+
syncListboxId(nextListboxId = this.#getListboxId()) {
|
|
3356
|
+
const listboxId = nextListboxId;
|
|
3357
|
+
if ($6.get(this.#registeredListboxId) === listboxId)
|
|
3358
|
+
return;
|
|
3359
|
+
$6.set(this.#registeredListboxId, listboxId, true);
|
|
3360
|
+
$6.set(this.#intendedActiveId, null);
|
|
3361
|
+
this.registrations = this.registrations.map((registration, index) => ({
|
|
3362
|
+
...registration,
|
|
3363
|
+
id: updateRegistrationHandleId(registration, `${listboxId}-item-${index + 1}`)
|
|
3364
|
+
}));
|
|
3365
|
+
this.#itemCounter = this.registrations.length;
|
|
3366
|
+
this.refreshRegistrationsReady();
|
|
3367
|
+
}
|
|
3368
|
+
resetActiveItem() {
|
|
3369
|
+
$6.set(this.#intendedActiveId, null);
|
|
3370
|
+
}
|
|
3371
|
+
refreshRegistrationsReady() {
|
|
3372
|
+
this.registrationsReady = false;
|
|
3373
|
+
const cycle = ++this.#readyCycle;
|
|
3374
|
+
queueMicrotask(() => {
|
|
3375
|
+
if (cycle === this.#readyCycle)
|
|
3376
|
+
this.registrationsReady = true;
|
|
3377
|
+
});
|
|
3378
|
+
}
|
|
3379
|
+
scrollActiveItemIntoView() {
|
|
3380
|
+
if (this.activeItemId === null)
|
|
3381
|
+
return;
|
|
3382
|
+
const record = this.registrations.find((registration) => registration.id === this.activeItemId);
|
|
3383
|
+
record?.node.scrollIntoView({ block: "nearest" });
|
|
3384
|
+
}
|
|
3385
|
+
bindDismissal(options) {
|
|
3386
|
+
const releaseEscape = pushEscapeHandler((event) => {
|
|
3387
|
+
if (!options.isOpen() || event?.key !== "Escape")
|
|
3388
|
+
return;
|
|
3389
|
+
event.preventDefault();
|
|
3390
|
+
options.onDismiss(true);
|
|
3391
|
+
});
|
|
3392
|
+
const handlePointerDown = (event) => {
|
|
3393
|
+
const target = event.target;
|
|
3394
|
+
if (options.isOpen() && target instanceof Node && !options.isInside(target)) {
|
|
3395
|
+
options.onDismiss(false);
|
|
3396
|
+
}
|
|
3397
|
+
};
|
|
3398
|
+
const handleFocusIn = (event) => {
|
|
3399
|
+
const target = event.target;
|
|
3400
|
+
if (options.isOpen() && target instanceof Node && !options.isInside(target)) {
|
|
3401
|
+
options.onDismiss(false);
|
|
3402
|
+
}
|
|
3403
|
+
};
|
|
3404
|
+
if (typeof document === "undefined")
|
|
3405
|
+
return releaseEscape;
|
|
3406
|
+
document.addEventListener("mousedown", handlePointerDown, true);
|
|
3407
|
+
document.addEventListener("focusin", handleFocusIn, true);
|
|
3408
|
+
return () => {
|
|
3409
|
+
releaseEscape();
|
|
3410
|
+
document.removeEventListener("mousedown", handlePointerDown, true);
|
|
3411
|
+
document.removeEventListener("focusin", handleFocusIn, true);
|
|
3412
|
+
};
|
|
3413
|
+
}
|
|
3414
|
+
setActiveById(id) {
|
|
3415
|
+
$6.set(this.#intendedActiveId, id, true);
|
|
3416
|
+
}
|
|
3417
|
+
register(input, node) {
|
|
3418
|
+
this.syncListboxId();
|
|
3419
|
+
const id = `${this.listboxId}-item-${++this.#itemCounter}`;
|
|
3420
|
+
const handle = $6.proxy({
|
|
3421
|
+
id,
|
|
3422
|
+
unregister: () => {
|
|
3423
|
+
const index = this.registrations.findIndex((registeredItem) => registeredItem.node === node);
|
|
3424
|
+
if (index !== -1)
|
|
3425
|
+
this.registrations.splice(index, 1);
|
|
3426
|
+
}
|
|
3427
|
+
});
|
|
3428
|
+
const registration = {
|
|
3429
|
+
id,
|
|
3430
|
+
node,
|
|
3431
|
+
handle,
|
|
3432
|
+
getValue: input.getValue,
|
|
3433
|
+
getOnselect: input.getOnselect,
|
|
3434
|
+
getDisabled: input.getDisabled
|
|
3435
|
+
};
|
|
3436
|
+
this.registrations.push(registration);
|
|
3437
|
+
return handle;
|
|
3438
|
+
}
|
|
3439
|
+
syncItems(items) {
|
|
3440
|
+
const previousActiveId = $6.get(this.#intendedActiveId);
|
|
3441
|
+
this.registrations = items.map((item) => ({ ...item, handle: { id: item.id, unregister: () => {} } }));
|
|
3442
|
+
this.#itemCounter = items.length;
|
|
3443
|
+
$6.set(this.#intendedActiveId, items.some((item) => item.id === previousActiveId) ? previousActiveId : null, true);
|
|
3444
|
+
this.refreshRegistrationsReady();
|
|
3445
|
+
}
|
|
3446
|
+
activateItemById(id) {
|
|
3447
|
+
const record = this.registrations.find((registration) => registration.id === id);
|
|
3448
|
+
if (!record || record.getDisabled())
|
|
3449
|
+
return null;
|
|
3450
|
+
record.getOnselect()();
|
|
3451
|
+
return record;
|
|
3452
|
+
}
|
|
3453
|
+
handleKeydown({
|
|
3454
|
+
event,
|
|
3455
|
+
onEnter,
|
|
3456
|
+
onEscape,
|
|
3457
|
+
ignoreModifiedNavigation = false,
|
|
3458
|
+
preventDefaultOnEmptyEnter = false
|
|
3459
|
+
}) {
|
|
3460
|
+
if (event.isComposing || event.keyCode === 229)
|
|
3461
|
+
return false;
|
|
3462
|
+
const isModified = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
|
|
3463
|
+
const ids = this.enabledIds;
|
|
3464
|
+
if (event.key === "ArrowDown") {
|
|
3465
|
+
if (ignoreModifiedNavigation && isModified)
|
|
3466
|
+
return false;
|
|
3467
|
+
event.preventDefault();
|
|
3468
|
+
if (ids.length === 0)
|
|
3469
|
+
return true;
|
|
3470
|
+
const index = this.activeItemId === null ? -1 : ids.indexOf(this.activeItemId);
|
|
3471
|
+
$6.set(this.#intendedActiveId, ids[(index + 1) % ids.length] ?? null, true);
|
|
3472
|
+
return true;
|
|
3473
|
+
}
|
|
3474
|
+
if (event.key === "ArrowUp") {
|
|
3475
|
+
if (ignoreModifiedNavigation && isModified)
|
|
3476
|
+
return false;
|
|
3477
|
+
event.preventDefault();
|
|
3478
|
+
if (ids.length === 0)
|
|
3479
|
+
return true;
|
|
3480
|
+
const index = this.activeItemId === null ? 0 : ids.indexOf(this.activeItemId);
|
|
3481
|
+
$6.set(this.#intendedActiveId, ids[index <= 0 ? ids.length - 1 : index - 1] ?? null, true);
|
|
3482
|
+
return true;
|
|
3483
|
+
}
|
|
3484
|
+
if (event.key === "Home") {
|
|
3485
|
+
if (ignoreModifiedNavigation && isModified)
|
|
3486
|
+
return false;
|
|
3487
|
+
event.preventDefault();
|
|
3488
|
+
$6.set(this.#intendedActiveId, ids[0] ?? null, true);
|
|
3489
|
+
return true;
|
|
3490
|
+
}
|
|
3491
|
+
if (event.key === "End") {
|
|
3492
|
+
if (ignoreModifiedNavigation && isModified)
|
|
3493
|
+
return false;
|
|
3494
|
+
event.preventDefault();
|
|
3495
|
+
$6.set(this.#intendedActiveId, ids[ids.length - 1] ?? null, true);
|
|
3496
|
+
return true;
|
|
3497
|
+
}
|
|
3498
|
+
if (event.key === "Enter") {
|
|
3499
|
+
if (!onEnter)
|
|
3500
|
+
return false;
|
|
3501
|
+
if (this.activeItemId === null && !preventDefaultOnEmptyEnter)
|
|
3502
|
+
return false;
|
|
3503
|
+
event.preventDefault();
|
|
3504
|
+
event.stopPropagation();
|
|
3505
|
+
if (this.activeItemId === null)
|
|
3506
|
+
return true;
|
|
3507
|
+
onEnter?.(this.activeItemId);
|
|
3508
|
+
return true;
|
|
3509
|
+
}
|
|
3510
|
+
if (event.key === "Escape" && onEscape) {
|
|
3511
|
+
event.preventDefault();
|
|
3512
|
+
event.stopPropagation();
|
|
3513
|
+
onEscape();
|
|
3514
|
+
return true;
|
|
3515
|
+
}
|
|
3516
|
+
return false;
|
|
3517
|
+
}
|
|
3518
|
+
createContext(activateItemById = (id) => void this.activateItemById(id)) {
|
|
3519
|
+
const getListboxId = () => this.listboxId;
|
|
3520
|
+
const getActiveItemId = () => this.activeItemId;
|
|
3521
|
+
const register = (input, node) => this.register(input, node);
|
|
3522
|
+
const setActiveById = (id) => this.setActiveById(id);
|
|
3523
|
+
return {
|
|
3524
|
+
get listboxId() {
|
|
3525
|
+
return getListboxId();
|
|
3526
|
+
},
|
|
3527
|
+
get activeItemId() {
|
|
3528
|
+
return getActiveItemId();
|
|
3529
|
+
},
|
|
3530
|
+
register,
|
|
3531
|
+
setActiveById,
|
|
3532
|
+
activateItemById
|
|
3533
|
+
};
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
function createCommandListState(listboxId, options) {
|
|
3537
|
+
return new CommandListState(listboxId, options);
|
|
3538
|
+
}
|
|
3539
|
+
function updateRegistrationHandleId(registration, id) {
|
|
3540
|
+
registration.handle.id = id;
|
|
3541
|
+
return id;
|
|
3542
|
+
}
|
|
3543
|
+
|
|
2253
3544
|
// src/components/popover/popover.svelte
|
|
2254
3545
|
import"svelte/internal/disclose-version";
|
|
2255
|
-
import * as $
|
|
2256
|
-
import { onDestroy, untrack } from "svelte";
|
|
3546
|
+
import * as $8 from "svelte/internal/client";
|
|
3547
|
+
import { onDestroy, untrack as untrack2 } from "svelte";
|
|
2257
3548
|
|
|
2258
3549
|
// src/_internal/anchored-overlay.svelte.ts
|
|
2259
|
-
import * as $
|
|
3550
|
+
import * as $7 from "svelte/internal/client";
|
|
2260
3551
|
var DEFAULT_PLACEMENT = "bottom-start";
|
|
2261
3552
|
var DEFAULT_OFFSET = 8;
|
|
2262
3553
|
var DEFAULT_SHIFT_PADDING = 8;
|
|
2263
3554
|
var DEFAULT_ARROW_PADDING = 6;
|
|
2264
|
-
function getPlacementSide(placement) {
|
|
2265
|
-
if (placement.startsWith("top"))
|
|
2266
|
-
return "top";
|
|
2267
|
-
if (placement.startsWith("right"))
|
|
2268
|
-
return "right";
|
|
2269
|
-
if (placement.startsWith("left"))
|
|
2270
|
-
return "left";
|
|
2271
|
-
return "bottom";
|
|
2272
|
-
}
|
|
2273
3555
|
function getAnchoredOverlayWidthStyle(widthMode, anchorRect) {
|
|
2274
3556
|
if (widthMode === "none")
|
|
2275
3557
|
return "";
|
|
@@ -2286,15 +3568,26 @@ function getAnchoredOverlayWidthStyle(widthMode, anchorRect) {
|
|
|
2286
3568
|
}
|
|
2287
3569
|
return "max-inline-size: min(28rem, calc(100vw - var(--cinder-space-4)));";
|
|
2288
3570
|
}
|
|
2289
|
-
function
|
|
3571
|
+
function getAnchoredOverlayAvailableHeightStyle(availableHeight) {
|
|
3572
|
+
return `${Math.max(0, availableHeight)}px`;
|
|
3573
|
+
}
|
|
3574
|
+
function getAnchoredOverlayMaxBlockSizeStyle(availableHeight, maximumBlockSize) {
|
|
3575
|
+
return `min(${maximumBlockSize}, ${getAnchoredOverlayAvailableHeightStyle(availableHeight)})`;
|
|
3576
|
+
}
|
|
3577
|
+
function applyAnchoredOverlayMaxBlockSize(panel, availableHeight, maximumBlockSize) {
|
|
3578
|
+
const value = getAnchoredOverlayMaxBlockSizeStyle(availableHeight, maximumBlockSize);
|
|
3579
|
+
panel.style.maxBlockSize = value;
|
|
3580
|
+
return value;
|
|
3581
|
+
}
|
|
3582
|
+
function isAnchoredOverlayWriteCurrent(positioningGeneration, latestGeneration, cancelled) {
|
|
3583
|
+
return !cancelled && positioningGeneration === latestGeneration;
|
|
3584
|
+
}
|
|
3585
|
+
function getArrowStyle(data) {
|
|
2290
3586
|
if (!data)
|
|
2291
3587
|
return "";
|
|
2292
|
-
const side = getPlacementSide(placement);
|
|
2293
|
-
const staticSide = { top: "bottom", right: "left", bottom: "top", left: "right" }[side];
|
|
2294
3588
|
return [
|
|
2295
3589
|
data.x != null ? `left: ${data.x}px;` : "",
|
|
2296
|
-
data.y != null ? `top: ${data.y}px;` : ""
|
|
2297
|
-
staticSide ? `${staticSide}: -4px;` : ""
|
|
3590
|
+
data.y != null ? `top: ${data.y}px;` : ""
|
|
2298
3591
|
].filter(Boolean).join(" ");
|
|
2299
3592
|
}
|
|
2300
3593
|
function reportAnchoredOverlaySetupError(error) {
|
|
@@ -2306,25 +3599,43 @@ function reportAnchoredOverlaySetupError(error) {
|
|
|
2306
3599
|
throw error;
|
|
2307
3600
|
}, 0);
|
|
2308
3601
|
}
|
|
3602
|
+
var floatingUiModulePromise;
|
|
3603
|
+
function cacheFloatingUiModule(load) {
|
|
3604
|
+
floatingUiModulePromise ??= load().catch((error) => {
|
|
3605
|
+
floatingUiModulePromise = undefined;
|
|
3606
|
+
throw error;
|
|
3607
|
+
});
|
|
3608
|
+
return floatingUiModulePromise;
|
|
3609
|
+
}
|
|
2309
3610
|
function createAnchoredOverlay(options) {
|
|
2310
|
-
let positionReady = $
|
|
2311
|
-
let positionStyle = $
|
|
2312
|
-
let
|
|
2313
|
-
let
|
|
2314
|
-
$
|
|
3611
|
+
let positionReady = $7.state(false);
|
|
3612
|
+
let positionStyle = $7.state("");
|
|
3613
|
+
let availableHeightStyle = $7.state("");
|
|
3614
|
+
let resolvedPlacement = $7.state($7.proxy(options.placement?.() ?? DEFAULT_PLACEMENT));
|
|
3615
|
+
let arrowStyle = $7.state("");
|
|
3616
|
+
$7.user_effect(() => {
|
|
3617
|
+
const anchor = options.anchor();
|
|
3618
|
+
const panel = options.panel();
|
|
3619
|
+
if (!anchor || !panel)
|
|
3620
|
+
return;
|
|
3621
|
+
cacheFloatingUiModule(() => Promise.resolve().then(() => (init_floating_ui_dom(), exports_floating_ui_dom))).catch(() => {});
|
|
3622
|
+
});
|
|
3623
|
+
$7.user_effect(() => {
|
|
2315
3624
|
if (!options.open()) {
|
|
2316
|
-
$
|
|
2317
|
-
$
|
|
2318
|
-
$
|
|
2319
|
-
$
|
|
3625
|
+
$7.set(positionReady, false);
|
|
3626
|
+
$7.set(positionStyle, "");
|
|
3627
|
+
$7.set(availableHeightStyle, "");
|
|
3628
|
+
$7.set(arrowStyle, "");
|
|
3629
|
+
$7.set(resolvedPlacement, options.placement?.() ?? DEFAULT_PLACEMENT, true);
|
|
2320
3630
|
return;
|
|
2321
3631
|
}
|
|
2322
3632
|
const anchor = options.anchor();
|
|
2323
3633
|
const panel = options.panel();
|
|
2324
3634
|
if (!anchor || !panel) {
|
|
2325
|
-
$
|
|
2326
|
-
$
|
|
2327
|
-
$
|
|
3635
|
+
$7.set(positionReady, false);
|
|
3636
|
+
$7.set(positionStyle, "");
|
|
3637
|
+
$7.set(availableHeightStyle, "");
|
|
3638
|
+
$7.set(arrowStyle, "");
|
|
2328
3639
|
return;
|
|
2329
3640
|
}
|
|
2330
3641
|
const placement = options.placement?.() ?? DEFAULT_PLACEMENT;
|
|
@@ -2333,11 +3644,16 @@ function createAnchoredOverlay(options) {
|
|
|
2333
3644
|
const shiftCrossAxis = options.shiftCrossAxis?.() ?? false;
|
|
2334
3645
|
const arrowPadding = options.arrowPadding?.() ?? DEFAULT_ARROW_PADDING;
|
|
2335
3646
|
const arrow3 = options.arrow?.();
|
|
2336
|
-
const
|
|
3647
|
+
const arrowVisible = options.arrowVisible?.() ?? Boolean(arrow3);
|
|
3648
|
+
const sizeEnabled = options.size?.() ?? false;
|
|
3649
|
+
const sizeMaxBlockSize = options.sizeMaxBlockSize?.() ?? "100%";
|
|
2337
3650
|
const widthMode = options.widthMode?.() ?? "content";
|
|
3651
|
+
const strategyOverride = options.strategy?.();
|
|
3652
|
+
const boundary = options.boundary?.() ?? undefined;
|
|
2338
3653
|
let cancelled = false;
|
|
2339
3654
|
let generation = 0;
|
|
2340
3655
|
let stopAutoUpdate;
|
|
3656
|
+
let boundaryResizeObserver;
|
|
2341
3657
|
(async () => {
|
|
2342
3658
|
const {
|
|
2343
3659
|
arrow: arrowMiddleware,
|
|
@@ -2345,98 +3661,412 @@ function createAnchoredOverlay(options) {
|
|
|
2345
3661
|
computePosition: computePosition3,
|
|
2346
3662
|
flip: flip3,
|
|
2347
3663
|
offset: offsetMiddleware,
|
|
3664
|
+
size: sizeMiddleware,
|
|
2348
3665
|
shift: shift3
|
|
2349
|
-
} = await Promise.resolve().then(() => (init_floating_ui_dom(), exports_floating_ui_dom));
|
|
3666
|
+
} = await cacheFloatingUiModule(() => Promise.resolve().then(() => (init_floating_ui_dom(), exports_floating_ui_dom)));
|
|
2350
3667
|
if (cancelled)
|
|
2351
3668
|
return;
|
|
2352
|
-
const
|
|
2353
|
-
offsetMiddleware(offset3),
|
|
2354
|
-
flip3(),
|
|
2355
|
-
shift3({ padding: shiftPadding, crossAxis: shiftCrossAxis })
|
|
2356
|
-
];
|
|
2357
|
-
if (showArrow && arrow3) {
|
|
2358
|
-
middleware.push(arrowMiddleware({ element: arrow3, padding: arrowPadding }));
|
|
2359
|
-
}
|
|
2360
|
-
stopAutoUpdate = autoUpdate2(anchor, panel, async () => {
|
|
3669
|
+
const updatePosition = async () => {
|
|
2361
3670
|
if (cancelled)
|
|
2362
3671
|
return;
|
|
2363
3672
|
const currentGeneration = ++generation;
|
|
3673
|
+
if (!sizeEnabled) {
|
|
3674
|
+
$7.set(availableHeightStyle, "");
|
|
3675
|
+
panel.style.removeProperty("max-block-size");
|
|
3676
|
+
}
|
|
3677
|
+
const middleware = [
|
|
3678
|
+
offsetMiddleware(offset3),
|
|
3679
|
+
flip3(boundary ? { boundary } : undefined)
|
|
3680
|
+
];
|
|
3681
|
+
if (sizeEnabled) {
|
|
3682
|
+
middleware.push(sizeMiddleware({
|
|
3683
|
+
...boundary ? { boundary } : {},
|
|
3684
|
+
padding: shiftPadding,
|
|
3685
|
+
apply({ availableHeight }) {
|
|
3686
|
+
if (!isAnchoredOverlayWriteCurrent(currentGeneration, generation, cancelled))
|
|
3687
|
+
return;
|
|
3688
|
+
$7.set(availableHeightStyle, applyAnchoredOverlayMaxBlockSize(panel, availableHeight, sizeMaxBlockSize), true);
|
|
3689
|
+
}
|
|
3690
|
+
}));
|
|
3691
|
+
}
|
|
3692
|
+
middleware.push(shift3({
|
|
3693
|
+
...boundary ? { boundary } : {},
|
|
3694
|
+
padding: shiftPadding,
|
|
3695
|
+
crossAxis: shiftCrossAxis
|
|
3696
|
+
}));
|
|
3697
|
+
if (arrowVisible && arrow3) {
|
|
3698
|
+
middleware.push(arrowMiddleware({ element: arrow3, padding: arrowPadding }));
|
|
3699
|
+
}
|
|
2364
3700
|
let result;
|
|
3701
|
+
const strategy = strategyOverride ?? (panel.closest("dialog") ? "absolute" : "fixed");
|
|
2365
3702
|
try {
|
|
2366
|
-
result = await computePosition3(anchor, panel, { placement, middleware, strategy
|
|
3703
|
+
result = await computePosition3(anchor, panel, { placement, middleware, strategy });
|
|
2367
3704
|
} catch {
|
|
2368
3705
|
if (cancelled || currentGeneration !== generation)
|
|
2369
3706
|
return;
|
|
2370
|
-
$
|
|
2371
|
-
$
|
|
2372
|
-
$
|
|
2373
|
-
$
|
|
3707
|
+
$7.set(positionReady, false);
|
|
3708
|
+
$7.set(positionStyle, "");
|
|
3709
|
+
$7.set(arrowStyle, "");
|
|
3710
|
+
$7.set(resolvedPlacement, placement, true);
|
|
2374
3711
|
return;
|
|
2375
3712
|
}
|
|
2376
3713
|
if (cancelled || currentGeneration !== generation)
|
|
2377
3714
|
return;
|
|
2378
3715
|
const widthStyle = getAnchoredOverlayWidthStyle(widthMode, anchor.getBoundingClientRect());
|
|
2379
|
-
$
|
|
2380
|
-
|
|
3716
|
+
$7.set(positionStyle, [
|
|
3717
|
+
`position: ${strategy};`,
|
|
2381
3718
|
`left: ${result.x}px;`,
|
|
2382
3719
|
`top: ${result.y}px;`,
|
|
3720
|
+
$7.get(availableHeightStyle) ? `max-block-size: ${$7.get(availableHeightStyle)};` : "",
|
|
2383
3721
|
widthStyle
|
|
2384
3722
|
].filter(Boolean).join(" "), true);
|
|
2385
|
-
$
|
|
2386
|
-
$
|
|
2387
|
-
$
|
|
2388
|
-
}
|
|
3723
|
+
$7.set(resolvedPlacement, result.placement, true);
|
|
3724
|
+
$7.set(arrowStyle, arrowVisible ? getArrowStyle(result.middlewareData.arrow) : "", true);
|
|
3725
|
+
$7.set(positionReady, true);
|
|
3726
|
+
};
|
|
3727
|
+
stopAutoUpdate = autoUpdate2(anchor, panel, updatePosition);
|
|
3728
|
+
if (boundary && boundary !== anchor && boundary !== panel && typeof ResizeObserver !== "undefined") {
|
|
3729
|
+
boundaryResizeObserver = new ResizeObserver(() => {
|
|
3730
|
+
updatePosition();
|
|
3731
|
+
});
|
|
3732
|
+
boundaryResizeObserver.observe(boundary);
|
|
3733
|
+
}
|
|
2389
3734
|
})().catch((error) => {
|
|
2390
3735
|
if (cancelled)
|
|
2391
3736
|
return;
|
|
2392
|
-
$
|
|
2393
|
-
$
|
|
2394
|
-
$
|
|
2395
|
-
$
|
|
3737
|
+
$7.set(positionReady, false);
|
|
3738
|
+
$7.set(positionStyle, "");
|
|
3739
|
+
$7.set(availableHeightStyle, "");
|
|
3740
|
+
$7.set(arrowStyle, "");
|
|
3741
|
+
$7.set(resolvedPlacement, placement, true);
|
|
2396
3742
|
reportAnchoredOverlaySetupError(error);
|
|
2397
3743
|
});
|
|
2398
3744
|
return () => {
|
|
2399
3745
|
cancelled = true;
|
|
2400
3746
|
stopAutoUpdate?.();
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
$
|
|
2404
|
-
$
|
|
3747
|
+
boundaryResizeObserver?.disconnect();
|
|
3748
|
+
panel.style.removeProperty("max-block-size");
|
|
3749
|
+
$7.set(positionReady, false);
|
|
3750
|
+
$7.set(positionStyle, "");
|
|
3751
|
+
$7.set(availableHeightStyle, "");
|
|
3752
|
+
$7.set(arrowStyle, "");
|
|
3753
|
+
$7.set(resolvedPlacement, placement, true);
|
|
2405
3754
|
};
|
|
2406
3755
|
});
|
|
2407
3756
|
return {
|
|
2408
3757
|
get positionReady() {
|
|
2409
|
-
return $
|
|
3758
|
+
return $7.get(positionReady);
|
|
2410
3759
|
},
|
|
2411
3760
|
get positionStyle() {
|
|
2412
|
-
return $
|
|
3761
|
+
return $7.get(positionStyle);
|
|
2413
3762
|
},
|
|
2414
3763
|
get resolvedPlacement() {
|
|
2415
|
-
return $
|
|
3764
|
+
return $7.get(resolvedPlacement);
|
|
2416
3765
|
},
|
|
2417
3766
|
get arrowStyle() {
|
|
2418
|
-
return $
|
|
3767
|
+
return $7.get(arrowStyle);
|
|
3768
|
+
}
|
|
3769
|
+
};
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
// src/utilities/focus.ts
|
|
3773
|
+
function restoreFocusTo(target) {
|
|
3774
|
+
if (!target)
|
|
3775
|
+
return false;
|
|
3776
|
+
if (typeof document === "undefined")
|
|
3777
|
+
return false;
|
|
3778
|
+
if (!target.isConnected)
|
|
3779
|
+
return false;
|
|
3780
|
+
if (target.ownerDocument !== document)
|
|
3781
|
+
return false;
|
|
3782
|
+
try {
|
|
3783
|
+
target.focus();
|
|
3784
|
+
} catch {
|
|
3785
|
+
return false;
|
|
3786
|
+
}
|
|
3787
|
+
return true;
|
|
3788
|
+
}
|
|
3789
|
+
var sequentialFocusCandidateSelector = [
|
|
3790
|
+
"a[href]",
|
|
3791
|
+
"area[href]",
|
|
3792
|
+
"button",
|
|
3793
|
+
'input:not([type="hidden"])',
|
|
3794
|
+
"select",
|
|
3795
|
+
"textarea",
|
|
3796
|
+
"summary",
|
|
3797
|
+
"frame",
|
|
3798
|
+
"iframe",
|
|
3799
|
+
"audio[controls]",
|
|
3800
|
+
"video[controls]",
|
|
3801
|
+
"embed",
|
|
3802
|
+
"object",
|
|
3803
|
+
"[contenteditable]",
|
|
3804
|
+
"[tabindex]"
|
|
3805
|
+
].join(", ");
|
|
3806
|
+
function getSequentialFocusTargets(root3, range) {
|
|
3807
|
+
if (!root3)
|
|
3808
|
+
return [];
|
|
3809
|
+
const composedElements = collectComposedElements(root3);
|
|
3810
|
+
const relativeIndex = range ? composedElements.indexOf(range.relativeTo) : -1;
|
|
3811
|
+
if (range && relativeIndex === -1)
|
|
3812
|
+
return [];
|
|
3813
|
+
const tierReference = range?.tierReference ?? range?.relativeTo;
|
|
3814
|
+
const positionOf = range ? new Map(composedElements.map((element, index) => [element, index])) : null;
|
|
3815
|
+
const candidates = composedElements.filter(isSequentialFocusTarget).filter((element) => !range || isSequentialFocusTarget(tierReference) && isSequentiallyAfterReference(element, tierReference, range.direction, (positionOf?.get(element) ?? -1) - relativeIndex)).filter((element) => element.matches(sequentialFocusCandidateSelector)).filter(isSequentialCandidate);
|
|
3816
|
+
const radios = [];
|
|
3817
|
+
for (const candidate of candidates) {
|
|
3818
|
+
if (!isRadio(candidate))
|
|
3819
|
+
continue;
|
|
3820
|
+
const rootNode = candidate.getRootNode();
|
|
3821
|
+
const name = candidate.getAttribute("name") ?? "";
|
|
3822
|
+
if (name === "")
|
|
3823
|
+
continue;
|
|
3824
|
+
const form = getFormOwner(candidate);
|
|
3825
|
+
const group = radios.find((entry) => entry.root === rootNode && entry.form === form && entry.name === name);
|
|
3826
|
+
if (!group) {
|
|
3827
|
+
const members = isParentNode(rootNode) ? collectComposedElements(rootNode).filter(isSequentialFocusTarget).filter(isRadio).filter((radio) => radio.getRootNode() === rootNode && radio.getAttribute("name") === name && getFormOwner(radio) === form && isSequentialCandidate(radio)) : [candidate];
|
|
3828
|
+
radios.push({
|
|
3829
|
+
root: rootNode,
|
|
3830
|
+
form,
|
|
3831
|
+
name,
|
|
3832
|
+
members
|
|
3833
|
+
});
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
const inRangeCandidates = new Set(candidates);
|
|
3837
|
+
const radioRepresentatives = new Set(radios.flatMap(({ members }) => {
|
|
3838
|
+
const checked = members.find((radio) => ("checked" in radio) && radio.checked);
|
|
3839
|
+
if (checked)
|
|
3840
|
+
return [checked];
|
|
3841
|
+
const inRangeMembers = range ? members.filter((member) => inRangeCandidates.has(member)) : members;
|
|
3842
|
+
const fallback = range?.direction === "before" ? inRangeMembers.at(-1) : inRangeMembers[0];
|
|
3843
|
+
return fallback ? [fallback] : [];
|
|
3844
|
+
}));
|
|
3845
|
+
const groupedRadios = new Set(radios.flatMap(({ members }) => members));
|
|
3846
|
+
return candidates.filter((candidate) => !isRadio(candidate) || !groupedRadios.has(candidate) || radioRepresentatives.has(candidate)).sort((left, right) => {
|
|
3847
|
+
const leftTabIndex = sequentialTabIndexValue(left);
|
|
3848
|
+
const rightTabIndex = sequentialTabIndexValue(right);
|
|
3849
|
+
if (leftTabIndex === rightTabIndex)
|
|
3850
|
+
return 0;
|
|
3851
|
+
if (leftTabIndex === 0)
|
|
3852
|
+
return 1;
|
|
3853
|
+
if (rightTabIndex === 0)
|
|
3854
|
+
return -1;
|
|
3855
|
+
return leftTabIndex - rightTabIndex;
|
|
3856
|
+
});
|
|
3857
|
+
}
|
|
3858
|
+
function collectComposedElements(root3) {
|
|
3859
|
+
const elements = [];
|
|
3860
|
+
const visited = new Set;
|
|
3861
|
+
const visit = (element, fromSlot = false) => {
|
|
3862
|
+
if (visited.has(element))
|
|
3863
|
+
return;
|
|
3864
|
+
if (!fromSlot && element.assignedSlot)
|
|
3865
|
+
return;
|
|
3866
|
+
visited.add(element);
|
|
3867
|
+
elements.push(element);
|
|
3868
|
+
if (isSlotElement(element)) {
|
|
3869
|
+
if (element.assignedNodes({ flatten: false }).length > 0) {
|
|
3870
|
+
for (const child3 of element.assignedElements({ flatten: true }))
|
|
3871
|
+
visit(child3, true);
|
|
3872
|
+
return;
|
|
3873
|
+
}
|
|
2419
3874
|
}
|
|
3875
|
+
const childRoot = element.shadowRoot ?? element;
|
|
3876
|
+
for (const child3 of Array.from(childRoot.children))
|
|
3877
|
+
visit(child3);
|
|
2420
3878
|
};
|
|
3879
|
+
for (const child3 of Array.from(root3.children))
|
|
3880
|
+
visit(child3);
|
|
3881
|
+
return elements;
|
|
2421
3882
|
}
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
if (
|
|
2428
|
-
return false;
|
|
2429
|
-
if (!target.isConnected)
|
|
3883
|
+
function isSlotElement(element) {
|
|
3884
|
+
return element.localName === "slot" && typeof Reflect.get(element, "assignedElements") === "function" && typeof Reflect.get(element, "assignedNodes") === "function";
|
|
3885
|
+
}
|
|
3886
|
+
function isSequentialCandidate(candidate) {
|
|
3887
|
+
const explicitTabIndexValue = getExplicitTabIndexValue(candidate);
|
|
3888
|
+
if (candidate.matches('input[type="hidden"]'))
|
|
2430
3889
|
return false;
|
|
2431
|
-
if (
|
|
3890
|
+
if (getTabIndexValue(candidate) < 0 || candidate.matches(":disabled") || closestComposed(candidate, "[hidden], [inert]") !== null || !isRendered(candidate))
|
|
2432
3891
|
return false;
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
3892
|
+
if (candidate.matches("summary") && explicitTabIndexValue === null)
|
|
3893
|
+
return isFirstDetailsSummary(candidate) && !isInsideClosedDetails(candidate);
|
|
3894
|
+
if (isInsideClosedDetails(candidate))
|
|
2436
3895
|
return false;
|
|
3896
|
+
return true;
|
|
3897
|
+
}
|
|
3898
|
+
function hasNativeSequentialDefault(element) {
|
|
3899
|
+
return element.matches('button, input:not([type="hidden"]), a[href], area[href], select, textarea, summary, frame, iframe') || element.matches("audio[controls], video[controls], embed[src]") || element.matches("object") && (element.getAttribute("data")?.trim().length ?? 0) > 0 || isHtmlElementNode(element) && isEditingHost(element);
|
|
3900
|
+
}
|
|
3901
|
+
function isRadio(element) {
|
|
3902
|
+
return isHtmlElementNode(element) && element.localName === "input" && element.getAttribute("type")?.toLowerCase() === "radio";
|
|
3903
|
+
}
|
|
3904
|
+
function getFormOwner(element) {
|
|
3905
|
+
const formValue = "form" in element ? Reflect.get(element, "form") : null;
|
|
3906
|
+
return isHtmlElementNode(formValue) ? formValue : null;
|
|
3907
|
+
}
|
|
3908
|
+
function sequentialTabIndexValue(element) {
|
|
3909
|
+
return Math.max(0, getTabIndexValue(element));
|
|
3910
|
+
}
|
|
3911
|
+
function isSequentiallyAfterReference(element, reference, direction, relativePosition) {
|
|
3912
|
+
const referenceTabIndex = getTabIndexValue(reference);
|
|
3913
|
+
const elementTabIndex = getTabIndexValue(element);
|
|
3914
|
+
const referenceIsPositive = referenceTabIndex > 0;
|
|
3915
|
+
const elementIsPositive = elementTabIndex > 0;
|
|
3916
|
+
if (direction === "after") {
|
|
3917
|
+
if (referenceIsPositive) {
|
|
3918
|
+
if (!elementIsPositive)
|
|
3919
|
+
return true;
|
|
3920
|
+
if (elementTabIndex !== referenceTabIndex)
|
|
3921
|
+
return elementTabIndex > referenceTabIndex;
|
|
3922
|
+
return relativePosition > 0;
|
|
3923
|
+
}
|
|
3924
|
+
if (elementIsPositive)
|
|
3925
|
+
return false;
|
|
3926
|
+
return relativePosition > 0;
|
|
3927
|
+
}
|
|
3928
|
+
if (referenceIsPositive) {
|
|
3929
|
+
if (!elementIsPositive)
|
|
3930
|
+
return false;
|
|
3931
|
+
if (elementTabIndex !== referenceTabIndex)
|
|
3932
|
+
return elementTabIndex < referenceTabIndex;
|
|
3933
|
+
return relativePosition < 0;
|
|
3934
|
+
}
|
|
3935
|
+
if (elementIsPositive)
|
|
3936
|
+
return true;
|
|
3937
|
+
return relativePosition < 0;
|
|
3938
|
+
}
|
|
3939
|
+
function getTabIndexValue(element) {
|
|
3940
|
+
return getExplicitTabIndexValue(element) ?? (hasNativeSequentialDefault(element) ? 0 : -1);
|
|
3941
|
+
}
|
|
3942
|
+
function findSequentialEntryTarget(candidates, referenceTabIndex, direction) {
|
|
3943
|
+
if (direction === "after") {
|
|
3944
|
+
if (referenceTabIndex > 0) {
|
|
3945
|
+
return candidates.find((candidate) => getTabIndexValue(candidate) >= referenceTabIndex) ?? null;
|
|
3946
|
+
}
|
|
3947
|
+
return candidates.find((candidate) => getTabIndexValue(candidate) === 0) ?? null;
|
|
3948
|
+
}
|
|
3949
|
+
if (referenceTabIndex === 0)
|
|
3950
|
+
return candidates.at(-1) ?? null;
|
|
3951
|
+
return [...candidates].reverse().find((candidate) => {
|
|
3952
|
+
const candidateTabIndex = getTabIndexValue(candidate);
|
|
3953
|
+
return candidateTabIndex > 0 && candidateTabIndex <= referenceTabIndex;
|
|
3954
|
+
}) ?? null;
|
|
3955
|
+
}
|
|
3956
|
+
function getExplicitTabIndexValue(element) {
|
|
3957
|
+
const rawValue = element.getAttribute("tabindex");
|
|
3958
|
+
if (rawValue !== null) {
|
|
3959
|
+
const match = /^[\t\n\f\r ]*([+-]?\d+)/.exec(rawValue);
|
|
3960
|
+
if (match?.[1]) {
|
|
3961
|
+
const parsedValue = Number(match[1]);
|
|
3962
|
+
return Number.isInteger(parsedValue) && parsedValue >= -2147483648 && parsedValue <= 2147483647 ? parsedValue : -1;
|
|
3963
|
+
}
|
|
3964
|
+
}
|
|
3965
|
+
return null;
|
|
3966
|
+
}
|
|
3967
|
+
function isEditingHost(element) {
|
|
3968
|
+
return hasContentEditableState(element) && !hasContentEditableState(element.parentElement);
|
|
3969
|
+
}
|
|
3970
|
+
function hasContentEditableState(element) {
|
|
3971
|
+
for (let current = element;current; current = current.parentElement) {
|
|
3972
|
+
const value = current.getAttribute("contenteditable")?.toLowerCase();
|
|
3973
|
+
if (value === "" || value === "true" || value === "plaintext-only")
|
|
3974
|
+
return true;
|
|
3975
|
+
if (value === "false")
|
|
3976
|
+
return false;
|
|
3977
|
+
}
|
|
3978
|
+
return false;
|
|
3979
|
+
}
|
|
3980
|
+
function isFirstDetailsSummary(element) {
|
|
3981
|
+
const details = element.parentElement;
|
|
3982
|
+
return details?.tagName === "DETAILS" && Array.from(details.children).find((child3) => child3.tagName === "SUMMARY") === element;
|
|
3983
|
+
}
|
|
3984
|
+
function isInsideClosedDetails(element) {
|
|
3985
|
+
let current = composedParentElement(element);
|
|
3986
|
+
while (current) {
|
|
3987
|
+
const summary = Array.from(current.children).find((child3) => child3.tagName === "SUMMARY");
|
|
3988
|
+
if (current.tagName === "DETAILS" && !current.hasAttribute("open") && !(summary && composedContains(summary, element)))
|
|
3989
|
+
return true;
|
|
3990
|
+
current = composedParentElement(current);
|
|
3991
|
+
}
|
|
3992
|
+
return false;
|
|
3993
|
+
}
|
|
3994
|
+
function composedContains(ancestor, descendant) {
|
|
3995
|
+
for (let current = descendant;current; current = composedParentElement(current)) {
|
|
3996
|
+
if (current === ancestor)
|
|
3997
|
+
return true;
|
|
3998
|
+
}
|
|
3999
|
+
return false;
|
|
4000
|
+
}
|
|
4001
|
+
function closestComposed(element, selector) {
|
|
4002
|
+
let candidate = element;
|
|
4003
|
+
while (candidate) {
|
|
4004
|
+
if (candidate.matches(selector))
|
|
4005
|
+
return candidate;
|
|
4006
|
+
candidate = composedParentElement(candidate);
|
|
4007
|
+
}
|
|
4008
|
+
return null;
|
|
4009
|
+
}
|
|
4010
|
+
function isRendered(element) {
|
|
4011
|
+
if (typeof getComputedStyle !== "function")
|
|
4012
|
+
return true;
|
|
4013
|
+
let candidate = element;
|
|
4014
|
+
while (candidate) {
|
|
4015
|
+
const style = getComputedStyle(candidate);
|
|
4016
|
+
if (style.display === "none" || style.visibility === "hidden" || style.visibility === "collapse")
|
|
4017
|
+
return false;
|
|
4018
|
+
candidate = composedParentElement(candidate);
|
|
2437
4019
|
}
|
|
2438
4020
|
return true;
|
|
2439
4021
|
}
|
|
4022
|
+
function composedParentElement(element) {
|
|
4023
|
+
return assignedSlotFor(element) ?? element.parentElement ?? shadowHost(element.getRootNode());
|
|
4024
|
+
}
|
|
4025
|
+
function assignedSlotFor(element) {
|
|
4026
|
+
if (isElementNode(element.assignedSlot))
|
|
4027
|
+
return element.assignedSlot;
|
|
4028
|
+
const shadowRoot = element.parentElement?.shadowRoot;
|
|
4029
|
+
if (!shadowRoot)
|
|
4030
|
+
return null;
|
|
4031
|
+
for (const slot of shadowRoot.querySelectorAll("slot")) {
|
|
4032
|
+
if (isSlotElement(slot) && slot.assignedElements({ flatten: true }).includes(element)) {
|
|
4033
|
+
return slot;
|
|
4034
|
+
}
|
|
4035
|
+
}
|
|
4036
|
+
return null;
|
|
4037
|
+
}
|
|
4038
|
+
function shadowHost(root3) {
|
|
4039
|
+
if (!("host" in root3))
|
|
4040
|
+
return null;
|
|
4041
|
+
const host = root3.host;
|
|
4042
|
+
return isElementNode(host) ? host : null;
|
|
4043
|
+
}
|
|
4044
|
+
function isElementNode(value) {
|
|
4045
|
+
return Boolean(value && typeof value === "object" && "nodeType" in value && value.nodeType === 1 && "namespaceURI" in value);
|
|
4046
|
+
}
|
|
4047
|
+
function isHtmlElementNode(value) {
|
|
4048
|
+
return isElementNode(value) && value.namespaceURI === "http://www.w3.org/1999/xhtml";
|
|
4049
|
+
}
|
|
4050
|
+
function isSequentialFocusTarget(value) {
|
|
4051
|
+
return isElementNode(value) && (value.namespaceURI === "http://www.w3.org/1999/xhtml" || value.namespaceURI === "http://www.w3.org/2000/svg");
|
|
4052
|
+
}
|
|
4053
|
+
function isParentNode(node) {
|
|
4054
|
+
return "children" in node;
|
|
4055
|
+
}
|
|
4056
|
+
function isSearchableRoot(node) {
|
|
4057
|
+
return "querySelectorAll" in node;
|
|
4058
|
+
}
|
|
4059
|
+
function* composedFocusScopes(anchor) {
|
|
4060
|
+
let referenceNode = anchor;
|
|
4061
|
+
let rootNode = anchor.getRootNode();
|
|
4062
|
+
while (isSearchableRoot(rootNode)) {
|
|
4063
|
+
yield { root: rootNode, anchor: referenceNode };
|
|
4064
|
+
if (!(rootNode instanceof ShadowRoot))
|
|
4065
|
+
return;
|
|
4066
|
+
referenceNode = rootNode.host;
|
|
4067
|
+
rootNode = referenceNode.getRootNode();
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
2440
4070
|
|
|
2441
4071
|
// src/utilities/attachments.ts
|
|
2442
4072
|
function createBodyScrollLock() {
|
|
@@ -2503,36 +4133,118 @@ function overflowFade() {
|
|
|
2503
4133
|
});
|
|
2504
4134
|
};
|
|
2505
4135
|
const resizeObserver = new ResizeObserver(scheduleUpdate);
|
|
2506
|
-
|
|
2507
|
-
const
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
4136
|
+
resizeObserver.observe(node);
|
|
4137
|
+
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(scheduleUpdate);
|
|
4138
|
+
mutationObserver?.observe(node, {
|
|
4139
|
+
childList: true,
|
|
4140
|
+
subtree: true,
|
|
4141
|
+
characterData: true,
|
|
4142
|
+
attributes: true,
|
|
4143
|
+
attributeFilter: ["hidden", "class", "style", "aria-hidden", "src"]
|
|
4144
|
+
});
|
|
4145
|
+
node.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
4146
|
+
update();
|
|
4147
|
+
return () => {
|
|
4148
|
+
if (frame)
|
|
4149
|
+
cancelFrame(frame);
|
|
4150
|
+
resizeObserver.disconnect();
|
|
4151
|
+
mutationObserver?.disconnect();
|
|
4152
|
+
node.removeEventListener("scroll", scheduleUpdate);
|
|
2512
4153
|
};
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
4154
|
+
};
|
|
4155
|
+
}
|
|
4156
|
+
var OVERFLOW_SHADOW_ATTRIBUTE = {
|
|
4157
|
+
inline: "data-cinder-overflows-inline",
|
|
4158
|
+
block: "data-cinder-overflows-block"
|
|
4159
|
+
};
|
|
4160
|
+
function overflowShadow(axis) {
|
|
4161
|
+
const attributeName = OVERFLOW_SHADOW_ATTRIBUTE[axis];
|
|
4162
|
+
return (node) => {
|
|
4163
|
+
if (typeof ResizeObserver === "undefined") {
|
|
4164
|
+
node.removeAttribute(attributeName);
|
|
4165
|
+
return;
|
|
4166
|
+
}
|
|
4167
|
+
const update = () => {
|
|
4168
|
+
const overflows = axis === "inline" ? node.scrollWidth - node.clientWidth > 1 : node.scrollHeight - node.clientHeight > 1;
|
|
4169
|
+
node.toggleAttribute(attributeName, overflows);
|
|
4170
|
+
};
|
|
4171
|
+
const requestFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (callback) => window.setTimeout(() => callback(performance.now()));
|
|
4172
|
+
const cancelFrame = typeof cancelAnimationFrame === "function" ? cancelAnimationFrame : (handle) => window.clearTimeout(handle);
|
|
4173
|
+
let frame = 0;
|
|
4174
|
+
const scheduleUpdate = () => {
|
|
4175
|
+
if (frame)
|
|
4176
|
+
return;
|
|
4177
|
+
frame = requestFrame(() => {
|
|
4178
|
+
frame = 0;
|
|
4179
|
+
update();
|
|
4180
|
+
});
|
|
2524
4181
|
};
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
4182
|
+
const resizeObserver = new ResizeObserver(scheduleUpdate);
|
|
4183
|
+
resizeObserver.observe(node);
|
|
4184
|
+
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(scheduleUpdate);
|
|
4185
|
+
mutationObserver?.observe(node, {
|
|
4186
|
+
childList: true,
|
|
4187
|
+
subtree: true,
|
|
4188
|
+
characterData: true,
|
|
4189
|
+
attributes: true,
|
|
4190
|
+
attributeFilter: ["hidden", "class", "style", "aria-hidden", "src"]
|
|
2529
4191
|
});
|
|
4192
|
+
update();
|
|
4193
|
+
return () => {
|
|
4194
|
+
if (frame)
|
|
4195
|
+
cancelFrame(frame);
|
|
4196
|
+
resizeObserver.disconnect();
|
|
4197
|
+
mutationObserver?.disconnect();
|
|
4198
|
+
};
|
|
4199
|
+
};
|
|
4200
|
+
}
|
|
4201
|
+
var OVERFLOW_FADE_START_ATTRIBUTE = {
|
|
4202
|
+
block: "data-cinder-overflows-start",
|
|
4203
|
+
inline: "data-cinder-overflows-inline-start"
|
|
4204
|
+
};
|
|
4205
|
+
var OVERFLOW_FADE_END_ATTRIBUTE = {
|
|
4206
|
+
block: "data-cinder-overflows",
|
|
4207
|
+
inline: "data-cinder-overflows-inline-end"
|
|
4208
|
+
};
|
|
4209
|
+
function overflowFadeEdges(axis) {
|
|
4210
|
+
const startAttribute = OVERFLOW_FADE_START_ATTRIBUTE[axis];
|
|
4211
|
+
const endAttribute = OVERFLOW_FADE_END_ATTRIBUTE[axis];
|
|
4212
|
+
return (node) => {
|
|
4213
|
+
if (typeof ResizeObserver === "undefined") {
|
|
4214
|
+
node.removeAttribute(startAttribute);
|
|
4215
|
+
node.removeAttribute(endAttribute);
|
|
4216
|
+
return;
|
|
4217
|
+
}
|
|
4218
|
+
const update = () => {
|
|
4219
|
+
const scrollPosition = axis === "block" ? node.scrollTop : node.scrollLeft;
|
|
4220
|
+
const contentExtent = axis === "block" ? node.scrollHeight : node.scrollWidth;
|
|
4221
|
+
const viewportExtent = axis === "block" ? node.clientHeight : node.clientWidth;
|
|
4222
|
+
const overflows = contentExtent - viewportExtent > 1;
|
|
4223
|
+
const atStart = scrollPosition <= 1;
|
|
4224
|
+
const atEnd = scrollPosition + viewportExtent >= contentExtent - 1;
|
|
4225
|
+
node.toggleAttribute(startAttribute, overflows && !atStart);
|
|
4226
|
+
node.toggleAttribute(endAttribute, overflows && !atEnd);
|
|
4227
|
+
};
|
|
4228
|
+
const requestFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (callback) => window.setTimeout(() => callback(performance.now()));
|
|
4229
|
+
const cancelFrame = typeof cancelAnimationFrame === "function" ? cancelAnimationFrame : (handle) => window.clearTimeout(handle);
|
|
4230
|
+
let frame = 0;
|
|
4231
|
+
const scheduleUpdate = () => {
|
|
4232
|
+
if (frame)
|
|
4233
|
+
return;
|
|
4234
|
+
frame = requestFrame(() => {
|
|
4235
|
+
frame = 0;
|
|
4236
|
+
update();
|
|
4237
|
+
});
|
|
4238
|
+
};
|
|
4239
|
+
const resizeObserver = new ResizeObserver(scheduleUpdate);
|
|
4240
|
+
resizeObserver.observe(node);
|
|
4241
|
+
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(scheduleUpdate);
|
|
2530
4242
|
mutationObserver?.observe(node, {
|
|
2531
4243
|
childList: true,
|
|
2532
4244
|
subtree: true,
|
|
2533
4245
|
characterData: true,
|
|
2534
4246
|
attributes: true,
|
|
2535
|
-
attributeFilter: ["hidden", "class", "style", "aria-hidden"]
|
|
4247
|
+
attributeFilter: ["hidden", "class", "style", "aria-hidden", "src"]
|
|
2536
4248
|
});
|
|
2537
4249
|
node.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
2538
4250
|
update();
|
|
@@ -2540,7 +4252,6 @@ function overflowFade() {
|
|
|
2540
4252
|
if (frame)
|
|
2541
4253
|
cancelFrame(frame);
|
|
2542
4254
|
resizeObserver.disconnect();
|
|
2543
|
-
observedElements.clear();
|
|
2544
4255
|
mutationObserver?.disconnect();
|
|
2545
4256
|
node.removeEventListener("scroll", scheduleUpdate);
|
|
2546
4257
|
};
|
|
@@ -2548,14 +4259,14 @@ function overflowFade() {
|
|
|
2548
4259
|
}
|
|
2549
4260
|
|
|
2550
4261
|
// src/components/popover/popover.svelte
|
|
2551
|
-
var
|
|
2552
|
-
var
|
|
2553
|
-
var
|
|
2554
|
-
var
|
|
4262
|
+
var root3 = $8.from_html(`<div class="cinder-popover__trigger"><!></div>`);
|
|
4263
|
+
var root_12 = $8.from_html(`<span class="cinder-popover__arrow" aria-hidden="true"></span>`);
|
|
4264
|
+
var root_22 = $8.from_html(`<div></div> <div tabindex="-1"><!> <!></div>`, 1);
|
|
4265
|
+
var root_32 = $8.from_html(`<!> <!>`, 1);
|
|
2555
4266
|
function Popover($$anchor, $$props) {
|
|
2556
|
-
const generatedPanelId = $
|
|
2557
|
-
$
|
|
2558
|
-
let open = $
|
|
4267
|
+
const generatedPanelId = $8.props_id();
|
|
4268
|
+
$8.push($$props, true);
|
|
4269
|
+
let open = $8.prop($$props, "open", 15, false), placement = $8.prop($$props, "placement", 3, "bottom-start"), offset3 = $8.prop($$props, "offset", 3, 8), arrowVisible = $8.prop($$props, "arrowVisible", 3, false), triggerRef = $8.prop($$props, "triggerRef", 3, null), role = $8.prop($$props, "role", 3, "dialog"), focusManagement = $8.prop($$props, "focusManagement", 3, "panel"), outsideClickIgnoreRefs = $8.prop($$props, "outsideClickIgnoreRefs", 19, () => []), wireTriggerAria = $8.prop($$props, "wireTriggerAria", 3, true), closeOnEscape = $8.prop($$props, "closeOnEscape", 3, true), widthMode = $8.prop($$props, "widthMode", 3, "content");
|
|
2559
4270
|
const FOCUSABLE_SELECTOR = 'button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])';
|
|
2560
4271
|
function findFirstFocusable(container) {
|
|
2561
4272
|
if (!container)
|
|
@@ -2568,80 +4279,110 @@ function Popover($$anchor, $$props) {
|
|
|
2568
4279
|
}
|
|
2569
4280
|
return null;
|
|
2570
4281
|
}
|
|
2571
|
-
let triggerWrapper = $
|
|
2572
|
-
let
|
|
2573
|
-
let
|
|
2574
|
-
|
|
2575
|
-
const
|
|
2576
|
-
const
|
|
2577
|
-
|
|
4282
|
+
let triggerWrapper = $8.state(undefined);
|
|
4283
|
+
let portalScopeElement = $8.state(undefined);
|
|
4284
|
+
let panelElement = $8.state(undefined);
|
|
4285
|
+
let arrowElement = $8.state(undefined);
|
|
4286
|
+
const panelId = $8.derived(() => $$props.id ?? generatedPanelId);
|
|
4287
|
+
const anchorElement = $8.derived(() => triggerRef() && triggerRef().isConnected ? triggerRef() : findFirstFocusable($8.get(triggerWrapper)) ?? null);
|
|
4288
|
+
const resolvedAriaLabel = $8.derived(() => $$props.ariaLabelledby ? undefined : role() === "dialog" ? $$props.label ?? "Popover" : $$props.label);
|
|
4289
|
+
let mounted = $8.state(false);
|
|
2578
4290
|
let capturedFocus = null;
|
|
2579
4291
|
let resolvedAnchorAtOpen = null;
|
|
2580
|
-
let pendingInitialFocus = $
|
|
2581
|
-
let openSessionFocusManagement = $
|
|
4292
|
+
let pendingInitialFocus = $8.state(false);
|
|
4293
|
+
let openSessionFocusManagement = $8.state("panel");
|
|
2582
4294
|
let isDestroyed = false;
|
|
2583
4295
|
onDestroy(() => {
|
|
2584
4296
|
isDestroyed = true;
|
|
2585
4297
|
});
|
|
2586
|
-
const
|
|
2587
|
-
target: () =>
|
|
4298
|
+
const portalScopeAttachment = createPortalAttachment({
|
|
4299
|
+
target: () => {
|
|
4300
|
+
if (!$8.get(anchorElement))
|
|
4301
|
+
return document.body;
|
|
4302
|
+
try {
|
|
4303
|
+
return findNearestOpenTopLayer($8.get(anchorElement)) ?? document.body;
|
|
4304
|
+
} catch {
|
|
4305
|
+
return document.body;
|
|
4306
|
+
}
|
|
4307
|
+
},
|
|
2588
4308
|
inheritAttributes: true,
|
|
2589
|
-
source: () => $
|
|
4309
|
+
source: () => $8.get(anchorElement) ?? null
|
|
4310
|
+
});
|
|
4311
|
+
const panelPortalAttachment = createPortalAttachment({
|
|
4312
|
+
disabled: () => !$8.get(portalScopeElement),
|
|
4313
|
+
target: () => $8.get(portalScopeElement),
|
|
4314
|
+
inheritAttributes: false
|
|
2590
4315
|
});
|
|
4316
|
+
const inheritedPortalStyle = createInheritedPortalStyle(() => $8.get(anchorElement), () => $8.get(mounted) && open());
|
|
2591
4317
|
const anchoredOverlay = createAnchoredOverlay({
|
|
2592
4318
|
open: () => open(),
|
|
2593
|
-
anchor: () => $
|
|
2594
|
-
panel: () => $
|
|
2595
|
-
arrow: () => $
|
|
4319
|
+
anchor: () => $8.get(anchorElement),
|
|
4320
|
+
panel: () => $8.get(panelElement),
|
|
4321
|
+
arrow: () => $8.get(arrowElement),
|
|
2596
4322
|
placement: () => placement(),
|
|
2597
4323
|
offset: () => offset3(),
|
|
2598
|
-
|
|
4324
|
+
arrowVisible: () => arrowVisible(),
|
|
2599
4325
|
widthMode: () => widthMode()
|
|
2600
4326
|
});
|
|
2601
|
-
$
|
|
2602
|
-
$
|
|
4327
|
+
$8.user_effect(() => {
|
|
4328
|
+
$8.set(mounted, true);
|
|
2603
4329
|
});
|
|
2604
|
-
const dismissOnOutsideMousedown = $
|
|
4330
|
+
const dismissOnOutsideMousedown = $8.derived(() => createClickOutside({
|
|
2605
4331
|
handler: () => {
|
|
2606
4332
|
open(false);
|
|
2607
4333
|
},
|
|
2608
4334
|
enabled: () => open(),
|
|
2609
4335
|
eventType: "mousedown",
|
|
2610
4336
|
capture: true,
|
|
2611
|
-
ignoreRefs: [
|
|
4337
|
+
ignoreRefs: [
|
|
4338
|
+
() => resolvedAnchorAtOpen ?? null,
|
|
4339
|
+
() => $8.get(portalScopeElement) ?? null,
|
|
4340
|
+
...outsideClickIgnoreRefs()
|
|
4341
|
+
]
|
|
2612
4342
|
}));
|
|
2613
4343
|
function moveFocusIntoPanel() {
|
|
2614
|
-
if (isDestroyed || !$
|
|
2615
|
-
return;
|
|
2616
|
-
const focusable = findFirstFocusable($
|
|
2617
|
-
|
|
4344
|
+
if (isDestroyed || !$8.get(panelElement))
|
|
4345
|
+
return false;
|
|
4346
|
+
const focusable = $$props.initialFocus?.($8.get(panelElement)) ?? findFirstFocusable($8.get(panelElement));
|
|
4347
|
+
const target = focusable && $8.get(panelElement).contains(focusable) ? focusable : $8.get(panelElement);
|
|
4348
|
+
target.focus();
|
|
4349
|
+
if (document.activeElement === target)
|
|
4350
|
+
return true;
|
|
4351
|
+
const fallback = focusable ? findFirstFocusable($8.get(panelElement)) : null;
|
|
4352
|
+
if (fallback && fallback !== target) {
|
|
4353
|
+
fallback.focus();
|
|
4354
|
+
if (document.activeElement === fallback)
|
|
4355
|
+
return true;
|
|
4356
|
+
}
|
|
4357
|
+
$8.get(panelElement).focus();
|
|
4358
|
+
return document.activeElement === $8.get(panelElement);
|
|
2618
4359
|
}
|
|
2619
|
-
$
|
|
4360
|
+
$8.user_effect(() => {
|
|
2620
4361
|
if (!open())
|
|
2621
4362
|
return;
|
|
2622
|
-
if (!$
|
|
4363
|
+
if (!$8.get(anchorElement))
|
|
2623
4364
|
return;
|
|
2624
|
-
$
|
|
2625
|
-
if ($
|
|
4365
|
+
$8.set(openSessionFocusManagement, untrack2(() => focusManagement()), true);
|
|
4366
|
+
if ($8.get(openSessionFocusManagement) === "panel") {
|
|
2626
4367
|
capturedFocus = captureFocus();
|
|
2627
|
-
$
|
|
4368
|
+
$8.set(pendingInitialFocus, true);
|
|
2628
4369
|
} else {
|
|
2629
4370
|
capturedFocus = null;
|
|
2630
|
-
$
|
|
4371
|
+
$8.set(pendingInitialFocus, false);
|
|
2631
4372
|
}
|
|
2632
|
-
resolvedAnchorAtOpen =
|
|
4373
|
+
resolvedAnchorAtOpen = untrack2(() => $8.get(anchorElement));
|
|
2633
4374
|
const releaseEscape = closeOnEscape() ? pushEscapeHandler(() => {
|
|
2634
4375
|
open(false);
|
|
2635
4376
|
}) : () => {};
|
|
2636
4377
|
return () => {
|
|
2637
4378
|
releaseEscape();
|
|
2638
|
-
$
|
|
4379
|
+
$8.set(pendingInitialFocus, false);
|
|
2639
4380
|
if (isDestroyed) {
|
|
2640
4381
|
capturedFocus = null;
|
|
2641
4382
|
resolvedAnchorAtOpen = null;
|
|
2642
4383
|
return;
|
|
2643
4384
|
}
|
|
2644
|
-
if ($
|
|
4385
|
+
if ($8.get(openSessionFocusManagement) === "panel") {
|
|
2645
4386
|
const candidates = [triggerRef(), resolvedAnchorAtOpen, capturedFocus];
|
|
2646
4387
|
for (const candidate of candidates) {
|
|
2647
4388
|
if (restoreFocusTo(candidate))
|
|
@@ -2652,21 +4393,21 @@ function Popover($$anchor, $$props) {
|
|
|
2652
4393
|
resolvedAnchorAtOpen = null;
|
|
2653
4394
|
};
|
|
2654
4395
|
});
|
|
2655
|
-
$
|
|
4396
|
+
$8.user_effect(() => {
|
|
2656
4397
|
if (isDestroyed)
|
|
2657
4398
|
return;
|
|
2658
|
-
if ($
|
|
4399
|
+
if ($8.get(openSessionFocusManagement) !== "panel")
|
|
2659
4400
|
return;
|
|
2660
|
-
if (!open() || !$
|
|
4401
|
+
if (!open() || !$8.get(panelElement) || !$8.get(anchorElement) || !anchoredOverlay.positionReady || !$8.get(pendingInitialFocus)) {
|
|
2661
4402
|
return;
|
|
2662
4403
|
}
|
|
2663
|
-
moveFocusIntoPanel()
|
|
2664
|
-
|
|
4404
|
+
if (moveFocusIntoPanel())
|
|
4405
|
+
$8.set(pendingInitialFocus, false);
|
|
2665
4406
|
});
|
|
2666
|
-
$
|
|
4407
|
+
$8.user_effect(() => {
|
|
2667
4408
|
if (!open())
|
|
2668
4409
|
return;
|
|
2669
|
-
if (!$
|
|
4410
|
+
if (!$8.get(anchorElement)) {
|
|
2670
4411
|
devWarn("[cinder/popover] open without a trigger anchor. " + "Provide either a `trigger` snippet with a focusable child or a `triggerRef`.");
|
|
2671
4412
|
}
|
|
2672
4413
|
if (role() === "dialog" && !$$props.label && !$$props.ariaLabelledby) {
|
|
@@ -2676,10 +4417,10 @@ function Popover($$anchor, $$props) {
|
|
|
2676
4417
|
devWarn('[cinder/popover] role="listbox" only sets the surface role. ' + 'You must render role="option" children and own selection/keyboard semantics. ' + "See popover.a11y.md §Role.");
|
|
2677
4418
|
}
|
|
2678
4419
|
});
|
|
2679
|
-
$
|
|
4420
|
+
$8.user_effect(() => {
|
|
2680
4421
|
if (!wireTriggerAria())
|
|
2681
4422
|
return;
|
|
2682
|
-
const target = $
|
|
4423
|
+
const target = $8.get(anchorElement);
|
|
2683
4424
|
if (!target)
|
|
2684
4425
|
return;
|
|
2685
4426
|
const prior = {
|
|
@@ -2694,7 +4435,7 @@ function Popover($$anchor, $$props) {
|
|
|
2694
4435
|
else
|
|
2695
4436
|
target.removeAttribute("aria-haspopup");
|
|
2696
4437
|
if (open())
|
|
2697
|
-
target.setAttribute("aria-controls", $
|
|
4438
|
+
target.setAttribute("aria-controls", $8.get(panelId));
|
|
2698
4439
|
else
|
|
2699
4440
|
target.removeAttribute("aria-controls");
|
|
2700
4441
|
return () => {
|
|
@@ -2710,84 +4451,278 @@ function Popover($$anchor, $$props) {
|
|
|
2710
4451
|
}
|
|
2711
4452
|
};
|
|
2712
4453
|
});
|
|
2713
|
-
var fragment =
|
|
2714
|
-
var node = $
|
|
4454
|
+
var fragment = root_32();
|
|
4455
|
+
var node = $8.first_child(fragment);
|
|
2715
4456
|
{
|
|
2716
4457
|
var consequent = ($$anchor2) => {
|
|
2717
|
-
var div =
|
|
2718
|
-
var node_1 = $
|
|
2719
|
-
$
|
|
2720
|
-
$
|
|
2721
|
-
$
|
|
2722
|
-
$
|
|
4458
|
+
var div = root3();
|
|
4459
|
+
var node_1 = $8.child(div);
|
|
4460
|
+
$8.snippet(node_1, () => $$props.trigger);
|
|
4461
|
+
$8.reset(div);
|
|
4462
|
+
$8.bind_this(div, ($$value) => $8.set(triggerWrapper, $$value), () => $8.get(triggerWrapper));
|
|
4463
|
+
$8.template_effect(() => $8.set_attribute(div, "data-cinder-portal-owner", open() ? `${$8.get(panelId)}-scope` : undefined));
|
|
4464
|
+
$8.append($$anchor2, div);
|
|
2723
4465
|
};
|
|
2724
|
-
$
|
|
4466
|
+
$8.if(node, ($$render) => {
|
|
2725
4467
|
if ($$props.trigger)
|
|
2726
4468
|
$$render(consequent);
|
|
2727
4469
|
});
|
|
2728
4470
|
}
|
|
2729
|
-
var node_2 = $
|
|
4471
|
+
var node_2 = $8.sibling(node, 2);
|
|
2730
4472
|
{
|
|
2731
4473
|
var consequent_2 = ($$anchor2) => {
|
|
2732
|
-
var
|
|
2733
|
-
var
|
|
2734
|
-
$
|
|
2735
|
-
|
|
4474
|
+
var fragment_1 = root_22();
|
|
4475
|
+
var div_1 = $8.first_child(fragment_1);
|
|
4476
|
+
$8.bind_this(div_1, ($$value) => $8.set(portalScopeElement, $$value), () => $8.get(portalScopeElement));
|
|
4477
|
+
$8.attach(div_1, () => portalScopeAttachment);
|
|
4478
|
+
var div_2 = $8.sibling(div_1, 2);
|
|
4479
|
+
var node_3 = $8.child(div_2);
|
|
4480
|
+
$8.snippet(node_3, () => $$props.children);
|
|
4481
|
+
var node_4 = $8.sibling(node_3, 2);
|
|
2736
4482
|
{
|
|
2737
4483
|
var consequent_1 = ($$anchor3) => {
|
|
2738
|
-
var span =
|
|
2739
|
-
$
|
|
2740
|
-
$
|
|
2741
|
-
$
|
|
4484
|
+
var span = root_12();
|
|
4485
|
+
$8.bind_this(span, ($$value) => $8.set(arrowElement, $$value), () => $8.get(arrowElement));
|
|
4486
|
+
$8.template_effect(() => $8.set_style(span, anchoredOverlay.arrowStyle));
|
|
4487
|
+
$8.append($$anchor3, span);
|
|
2742
4488
|
};
|
|
2743
|
-
$
|
|
2744
|
-
if (
|
|
4489
|
+
$8.if(node_4, ($$render) => {
|
|
4490
|
+
if (arrowVisible())
|
|
2745
4491
|
$$render(consequent_1);
|
|
2746
4492
|
});
|
|
2747
4493
|
}
|
|
2748
|
-
$
|
|
2749
|
-
$
|
|
2750
|
-
$
|
|
2751
|
-
$
|
|
2752
|
-
$
|
|
2753
|
-
$
|
|
2754
|
-
$
|
|
2755
|
-
$
|
|
2756
|
-
$
|
|
2757
|
-
$
|
|
2758
|
-
$
|
|
2759
|
-
$
|
|
2760
|
-
$
|
|
2761
|
-
$
|
|
4494
|
+
$8.reset(div_2);
|
|
4495
|
+
$8.bind_this(div_2, ($$value) => $8.set(panelElement, $$value), () => $8.get(panelElement));
|
|
4496
|
+
$8.attach(div_2, () => panelPortalAttachment);
|
|
4497
|
+
$8.attach(div_2, () => $8.get(dismissOnOutsideMousedown));
|
|
4498
|
+
$8.template_effect(($0, $1) => {
|
|
4499
|
+
$8.set_attribute(div_1, "id", `${$8.get(panelId)}-scope`);
|
|
4500
|
+
$8.set_class(div_1, 1, $0);
|
|
4501
|
+
$8.set_style(div_1, `display: contents;${inheritedPortalStyle.style}`);
|
|
4502
|
+
$8.set_attribute(div_2, "id", $8.get(panelId));
|
|
4503
|
+
$8.set_attribute(div_2, "role", role());
|
|
4504
|
+
$8.set_attribute(div_2, "aria-label", $8.get(resolvedAriaLabel));
|
|
4505
|
+
$8.set_attribute(div_2, "aria-labelledby", $$props.ariaLabelledby);
|
|
4506
|
+
$8.set_attribute(div_2, "aria-hidden", anchoredOverlay.positionReady ? undefined : "true");
|
|
4507
|
+
$8.set_class(div_2, 1, $1);
|
|
4508
|
+
$8.set_attribute(div_2, "data-cinder-portal-owner", `${$8.get(panelId)}-scope`);
|
|
4509
|
+
$8.set_attribute(div_2, "data-cinder-placement", anchoredOverlay.resolvedPlacement);
|
|
4510
|
+
$8.set_attribute(div_2, "data-cinder-position-ready", anchoredOverlay.positionReady);
|
|
4511
|
+
$8.set_style(div_2, anchoredOverlay.positionStyle);
|
|
2762
4512
|
}, [
|
|
2763
|
-
() => $
|
|
4513
|
+
() => $8.clsx(classNames("cinder-popover__portal-scope", $$props.portalScopeClass)),
|
|
4514
|
+
() => $8.clsx(classNames("cinder-_floating-surface", "cinder-popover", $$props.class))
|
|
2764
4515
|
]);
|
|
2765
|
-
$
|
|
4516
|
+
$8.append($$anchor2, fragment_1);
|
|
2766
4517
|
};
|
|
2767
|
-
$
|
|
2768
|
-
if ($
|
|
4518
|
+
$8.if(node_2, ($$render) => {
|
|
4519
|
+
if ($8.get(mounted) && open() && $8.get(anchorElement))
|
|
2769
4520
|
$$render(consequent_2);
|
|
2770
4521
|
});
|
|
2771
4522
|
}
|
|
2772
|
-
$
|
|
2773
|
-
$
|
|
4523
|
+
$8.append($$anchor, fragment);
|
|
4524
|
+
$8.pop();
|
|
2774
4525
|
}
|
|
2775
4526
|
|
|
2776
4527
|
// src/components/combobox/combobox.svelte
|
|
2777
|
-
var
|
|
2778
|
-
var
|
|
2779
|
-
var
|
|
2780
|
-
var
|
|
2781
|
-
var
|
|
2782
|
-
var
|
|
2783
|
-
var root_6 = $
|
|
2784
|
-
var root_7 = $5.from_html(`<p class="cinder-combobox__description"> </p>`);
|
|
2785
|
-
var root_8 = $5.from_html(`<div><!> <div class="cinder-combobox__control"><input type="text" role="combobox" class="cinder-combobox__input" autocomplete="off" autocorrect="off" spellcheck="false" aria-autocomplete="list"/></div> <!> <!> <div class="cinder-combobox__empty" role="status"> </div> <!> <p class="cinder-combobox__error" aria-live="polite"> </p></div>`);
|
|
4528
|
+
var root4 = $9.from_html(`<input type="hidden"/>`);
|
|
4529
|
+
var root_13 = $9.from_html(`<img class="cinder-combobox__option-avatar" alt="" loading="lazy"/>`);
|
|
4530
|
+
var root_23 = $9.from_html(`<span class="cinder-combobox__option-description"> </span>`);
|
|
4531
|
+
var root_33 = $9.from_html(`<li role="option" class="cinder-_option-row cinder-combobox__option"><!> <span class="cinder-combobox__option-text"><span class="cinder-combobox__option-label"> </span> <!></span></li>`);
|
|
4532
|
+
var root_42 = $9.from_html(`<ul role="presentation" class="cinder-combobox__listbox"></ul>`);
|
|
4533
|
+
var root_52 = $9.from_html(`<div class="cinder-combobox__empty" role="option" aria-disabled="true" aria-selected="false" data-cinder-active="">No results</div>`);
|
|
4534
|
+
var root_6 = $9.from_html(`<div class="cinder-combobox__control"><input type="text" role="combobox" class="cinder-combobox__input" autocomplete="off" autocorrect="off" spellcheck="false" aria-autocomplete="list"/></div> <!> <!> <!> <div class="cinder-combobox__empty-status" role="status"> </div>`, 1);
|
|
2786
4535
|
function Combobox($$anchor, $$props) {
|
|
2787
|
-
$
|
|
2788
|
-
|
|
4536
|
+
$9.push($$props, true);
|
|
4537
|
+
const comboboxControl = ($$anchor2) => {
|
|
4538
|
+
var fragment = root_6();
|
|
4539
|
+
var div = $9.first_child(fragment);
|
|
4540
|
+
var input_1 = $9.child(div);
|
|
4541
|
+
$9.remove_input_defaults(input_1);
|
|
4542
|
+
$9.bind_this(input_1, ($$value) => $9.set(inputElement, $$value), () => $9.get(inputElement));
|
|
4543
|
+
$9.reset(div);
|
|
4544
|
+
var node_1 = $9.sibling(div, 2);
|
|
4545
|
+
{
|
|
4546
|
+
var consequent = ($$anchor3) => {
|
|
4547
|
+
var input_2 = root4();
|
|
4548
|
+
$9.remove_input_defaults(input_2);
|
|
4549
|
+
$9.bind_this(input_2, ($$value) => $9.set(hiddenInputElement, $$value), () => $9.get(hiddenInputElement));
|
|
4550
|
+
$9.template_effect(() => {
|
|
4551
|
+
$9.set_attribute(input_2, "name", $$props.name);
|
|
4552
|
+
$9.set_value(input_2, value());
|
|
4553
|
+
input_2.disabled = $9.get(resolvedDisabled);
|
|
4554
|
+
});
|
|
4555
|
+
$9.append($$anchor3, input_2);
|
|
4556
|
+
};
|
|
4557
|
+
$9.if(node_1, ($$render) => {
|
|
4558
|
+
if ($$props.name)
|
|
4559
|
+
$$render(consequent);
|
|
4560
|
+
});
|
|
4561
|
+
}
|
|
4562
|
+
var node_2 = $9.sibling(node_1, 2);
|
|
4563
|
+
{
|
|
4564
|
+
var consequent_3 = ($$anchor3) => {
|
|
4565
|
+
{
|
|
4566
|
+
let $0 = $9.derived(() => classNames("cinder-combobox", $$props.class));
|
|
4567
|
+
Popover($$anchor3, {
|
|
4568
|
+
get id() {
|
|
4569
|
+
return $9.get(listboxId);
|
|
4570
|
+
},
|
|
4571
|
+
get triggerRef() {
|
|
4572
|
+
return $9.get(inputElement);
|
|
4573
|
+
},
|
|
4574
|
+
role: "listbox",
|
|
4575
|
+
focusManagement: "preserve",
|
|
4576
|
+
wireTriggerAria: false,
|
|
4577
|
+
closeOnEscape: false,
|
|
4578
|
+
widthMode: "match-anchor",
|
|
4579
|
+
get portalScopeClass() {
|
|
4580
|
+
return $9.get($0);
|
|
4581
|
+
},
|
|
4582
|
+
class: "cinder-combobox__panel",
|
|
4583
|
+
get open() {
|
|
4584
|
+
return $9.get(open);
|
|
4585
|
+
},
|
|
4586
|
+
set open($$value) {
|
|
4587
|
+
$9.set(open, $$value, true);
|
|
4588
|
+
},
|
|
4589
|
+
children: ($$anchor4, $$slotProps) => {
|
|
4590
|
+
var ul = root_42();
|
|
4591
|
+
$9.each(ul, 23, () => $9.get(filteredOptions), (option) => option.value, ($$anchor5, option, index) => {
|
|
4592
|
+
var li = root_33();
|
|
4593
|
+
var node_3 = $9.child(li);
|
|
4594
|
+
{
|
|
4595
|
+
var consequent_1 = ($$anchor6) => {
|
|
4596
|
+
var img = root_13();
|
|
4597
|
+
$9.template_effect(() => $9.set_attribute(img, "src", $9.get(option).avatar));
|
|
4598
|
+
$9.append($$anchor6, img);
|
|
4599
|
+
};
|
|
4600
|
+
var d = $9.derived(() => $9.get(option).avatar?.trim());
|
|
4601
|
+
$9.if(node_3, ($$render) => {
|
|
4602
|
+
if ($9.get(d))
|
|
4603
|
+
$$render(consequent_1);
|
|
4604
|
+
});
|
|
4605
|
+
}
|
|
4606
|
+
var span = $9.sibling(node_3, 2);
|
|
4607
|
+
var span_1 = $9.child(span);
|
|
4608
|
+
var text = $9.child(span_1, true);
|
|
4609
|
+
$9.reset(span_1);
|
|
4610
|
+
var node_4 = $9.sibling(span_1, 2);
|
|
4611
|
+
{
|
|
4612
|
+
var consequent_2 = ($$anchor6) => {
|
|
4613
|
+
var span_2 = root_23();
|
|
4614
|
+
var text_1 = $9.child(span_2, true);
|
|
4615
|
+
$9.reset(span_2);
|
|
4616
|
+
$9.template_effect(() => $9.set_text(text_1, $9.get(option).description));
|
|
4617
|
+
$9.append($$anchor6, span_2);
|
|
4618
|
+
};
|
|
4619
|
+
$9.if(node_4, ($$render) => {
|
|
4620
|
+
if ($9.get(option).description)
|
|
4621
|
+
$$render(consequent_2);
|
|
4622
|
+
});
|
|
4623
|
+
}
|
|
4624
|
+
$9.reset(span);
|
|
4625
|
+
$9.reset(li);
|
|
4626
|
+
$9.template_effect(() => {
|
|
4627
|
+
$9.set_attribute(li, "id", `${$$props.id ?? ""}-option-${$9.get(index) ?? ""}`);
|
|
4628
|
+
$9.set_attribute(li, "aria-selected", value() === $9.get(option).value);
|
|
4629
|
+
$9.set_attribute(li, "aria-disabled", $9.get(option).disabled || undefined);
|
|
4630
|
+
$9.set_attribute(li, "aria-label", $9.get(option).description ? `${$9.get(option).label}, ${$9.get(option).description}` : undefined);
|
|
4631
|
+
$9.set_attribute(li, "data-cinder-active", $9.get(index) === $9.get(activeIndex) || undefined);
|
|
4632
|
+
$9.set_text(text, $9.get(option).label);
|
|
4633
|
+
});
|
|
4634
|
+
$9.delegated("mousedown", li, (event2) => {
|
|
4635
|
+
event2.preventDefault();
|
|
4636
|
+
selectOption($9.get(option));
|
|
4637
|
+
});
|
|
4638
|
+
$9.event("mouseenter", li, () => {
|
|
4639
|
+
if ($9.get(option).disabled)
|
|
4640
|
+
return;
|
|
4641
|
+
setActiveIndex($9.get(index));
|
|
4642
|
+
});
|
|
4643
|
+
$9.append($$anchor5, li);
|
|
4644
|
+
});
|
|
4645
|
+
$9.reset(ul);
|
|
4646
|
+
$9.bind_this(ul, ($$value) => $9.set(listboxElement, $$value), () => $9.get(listboxElement));
|
|
4647
|
+
$9.append($$anchor4, ul);
|
|
4648
|
+
},
|
|
4649
|
+
$$slots: { default: true }
|
|
4650
|
+
});
|
|
4651
|
+
}
|
|
4652
|
+
};
|
|
4653
|
+
$9.if(node_2, ($$render) => {
|
|
4654
|
+
if ($9.get(listboxVisible))
|
|
4655
|
+
$$render(consequent_3);
|
|
4656
|
+
});
|
|
4657
|
+
}
|
|
4658
|
+
var node_5 = $9.sibling(node_2, 2);
|
|
4659
|
+
{
|
|
4660
|
+
var consequent_4 = ($$anchor3) => {
|
|
4661
|
+
{
|
|
4662
|
+
let $0 = $9.derived(() => classNames("cinder-combobox", $$props.class));
|
|
4663
|
+
Popover($$anchor3, {
|
|
4664
|
+
get id() {
|
|
4665
|
+
return $9.get(listboxId);
|
|
4666
|
+
},
|
|
4667
|
+
get triggerRef() {
|
|
4668
|
+
return $9.get(inputElement);
|
|
4669
|
+
},
|
|
4670
|
+
role: "listbox",
|
|
4671
|
+
focusManagement: "preserve",
|
|
4672
|
+
wireTriggerAria: false,
|
|
4673
|
+
closeOnEscape: false,
|
|
4674
|
+
widthMode: "match-anchor",
|
|
4675
|
+
get portalScopeClass() {
|
|
4676
|
+
return $9.get($0);
|
|
4677
|
+
},
|
|
4678
|
+
class: "cinder-combobox__empty-panel",
|
|
4679
|
+
get open() {
|
|
4680
|
+
return $9.get(open);
|
|
4681
|
+
},
|
|
4682
|
+
set open($$value) {
|
|
4683
|
+
$9.set(open, $$value, true);
|
|
4684
|
+
},
|
|
4685
|
+
children: ($$anchor4, $$slotProps) => {
|
|
4686
|
+
var div_1 = root_52();
|
|
4687
|
+
$9.append($$anchor4, div_1);
|
|
4688
|
+
},
|
|
4689
|
+
$$slots: { default: true }
|
|
4690
|
+
});
|
|
4691
|
+
}
|
|
4692
|
+
};
|
|
4693
|
+
$9.if(node_5, ($$render) => {
|
|
4694
|
+
if ($9.get(emptyVisible))
|
|
4695
|
+
$$render(consequent_4);
|
|
4696
|
+
});
|
|
4697
|
+
}
|
|
4698
|
+
var div_2 = $9.sibling(node_5, 2);
|
|
4699
|
+
var text_2 = $9.child(div_2, true);
|
|
4700
|
+
$9.reset(div_2);
|
|
4701
|
+
$9.template_effect(($0) => {
|
|
4702
|
+
$9.set_attribute(div, "data-cinder-open", $9.get(open) || undefined);
|
|
4703
|
+
$9.set_attribute(input_1, "id", $$props.id);
|
|
4704
|
+
input_1.disabled = $9.get(resolvedDisabled);
|
|
4705
|
+
input_1.required = $9.get(resolvedRequired);
|
|
4706
|
+
$9.set_attribute(input_1, "placeholder", $$props.placeholder);
|
|
4707
|
+
$9.set_value(input_1, textInputValue());
|
|
4708
|
+
$9.set_attribute(input_1, "aria-label", $0);
|
|
4709
|
+
$9.set_attribute(input_1, "aria-expanded", $9.get(open));
|
|
4710
|
+
$9.set_attribute(input_1, "aria-controls", $9.get(open) ? $9.get(listboxId) : undefined);
|
|
4711
|
+
$9.set_attribute(input_1, "aria-activedescendant", $9.get(activeOptionId));
|
|
4712
|
+
$9.set_attribute(input_1, "aria-invalid", $9.get(field).ariaInvalid);
|
|
4713
|
+
$9.set_attribute(input_1, "aria-required", $9.get(resolvedRequired) || undefined);
|
|
4714
|
+
$9.set_attribute(input_1, "aria-describedby", $9.get(describedBy));
|
|
4715
|
+
$9.set_text(text_2, $9.get(emptyVisible) ? "No results" : "");
|
|
4716
|
+
}, [() => $$props["aria-label"]?.trim() || undefined]);
|
|
4717
|
+
$9.delegated("input", input_1, handleInput);
|
|
4718
|
+
$9.event("focus", input_1, handleFocus);
|
|
4719
|
+
$9.event("blur", input_1, handleBlur);
|
|
4720
|
+
$9.delegated("keydown", input_1, handleKeydown);
|
|
4721
|
+
$9.append($$anchor2, fragment);
|
|
4722
|
+
};
|
|
4723
|
+
let value = $9.prop($$props, "value", 15, ""), textInputValue = $9.prop($$props, "textInputValue", 15, ""), maxVisibleOptions = $9.prop($$props, "maxVisibleOptions", 3, 200), customValueAllowed = $9.prop($$props, "customValueAllowed", 3, false);
|
|
2789
4724
|
const context = getFormFieldContext();
|
|
2790
|
-
const field = $
|
|
4725
|
+
const field = $9.derived(() => resolveFieldControl({
|
|
2791
4726
|
id: $$props.id,
|
|
2792
4727
|
generatedId: $$props.id,
|
|
2793
4728
|
context,
|
|
@@ -2798,23 +4733,24 @@ function Combobox($$anchor, $$props) {
|
|
|
2798
4733
|
required: $$props.required,
|
|
2799
4734
|
disabled: $$props.disabled
|
|
2800
4735
|
}));
|
|
2801
|
-
const resolvedDisabled = $
|
|
2802
|
-
const resolvedRequired = $
|
|
2803
|
-
const describedBy = $
|
|
2804
|
-
const listboxId = $
|
|
2805
|
-
const
|
|
2806
|
-
const
|
|
4736
|
+
const resolvedDisabled = $9.derived(() => $9.get(field).disabled);
|
|
4737
|
+
const resolvedRequired = $9.derived(() => $9.get(field).required);
|
|
4738
|
+
const describedBy = $9.derived(() => $9.get(field).describedBy);
|
|
4739
|
+
const listboxId = $9.derived(() => `${$$props.id}-listbox`);
|
|
4740
|
+
const commandList = createCommandListState(() => $9.get(listboxId), { autoActivateFirst: false });
|
|
4741
|
+
const descriptionId = $9.derived(() => $9.get(field).ownDescriptionId);
|
|
4742
|
+
const stableLocalErrorId = $9.derived(() => context?.errorId === `${$9.get(field).id}-error` ? `${$9.get(field).id}-combobox-error` : `${$9.get(field).id}-error`);
|
|
2807
4743
|
const defaultFilter = (option, query) => {
|
|
2808
4744
|
if (!query)
|
|
2809
4745
|
return true;
|
|
2810
4746
|
const q = query.toLowerCase();
|
|
2811
4747
|
return option.label.toLowerCase().includes(q) || (option.description?.toLowerCase().includes(q) ?? false);
|
|
2812
4748
|
};
|
|
2813
|
-
const filteredOptions = $
|
|
4749
|
+
const filteredOptions = $9.derived(() => {
|
|
2814
4750
|
const fn = $$props.filter ?? defaultFilter;
|
|
2815
4751
|
const matches = [];
|
|
2816
4752
|
for (const option of $$props.options) {
|
|
2817
|
-
if (fn(option,
|
|
4753
|
+
if (fn(option, textInputValue())) {
|
|
2818
4754
|
matches.push(option);
|
|
2819
4755
|
if (matches.length >= maxVisibleOptions())
|
|
2820
4756
|
break;
|
|
@@ -2822,74 +4758,125 @@ function Combobox($$anchor, $$props) {
|
|
|
2822
4758
|
}
|
|
2823
4759
|
return matches;
|
|
2824
4760
|
});
|
|
2825
|
-
let open = $
|
|
2826
|
-
let
|
|
2827
|
-
let
|
|
2828
|
-
let
|
|
2829
|
-
let
|
|
2830
|
-
let
|
|
2831
|
-
let
|
|
2832
|
-
let
|
|
2833
|
-
let
|
|
2834
|
-
let hasStoredInitialValue = $5.state(false);
|
|
4761
|
+
let open = $9.state(false);
|
|
4762
|
+
let inputElement = $9.state(null);
|
|
4763
|
+
let hiddenInputElement = $9.state(null);
|
|
4764
|
+
let listboxElement = $9.state(null);
|
|
4765
|
+
let committedLabel = $9.state("");
|
|
4766
|
+
let initialCustomValue = $9.state("");
|
|
4767
|
+
let hasUserCommittedValue = $9.state(false);
|
|
4768
|
+
let hasExplicitNavigation = $9.state(false);
|
|
4769
|
+
let hasStoredInitialValue = $9.state(false);
|
|
2835
4770
|
let resetSyncTimeout;
|
|
2836
|
-
let initialValue = $
|
|
2837
|
-
const initialInputValue =
|
|
2838
|
-
$
|
|
2839
|
-
if (!$
|
|
2840
|
-
$
|
|
2841
|
-
$
|
|
2842
|
-
}
|
|
2843
|
-
if (allowCustomValue() && !$5.get(hasUserCommittedValue) && value() && !$5.get(initialCustomValue)) {
|
|
2844
|
-
$5.set(initialCustomValue, value(), true);
|
|
4771
|
+
let initialValue = $9.state($9.proxy(untrack3(() => value())));
|
|
4772
|
+
const initialInputValue = untrack3(() => textInputValue());
|
|
4773
|
+
$9.user_pre_effect(() => {
|
|
4774
|
+
if (!$9.get(hasUserCommittedValue) && !$9.get(hasStoredInitialValue) && value()) {
|
|
4775
|
+
$9.set(initialValue, value(), true);
|
|
4776
|
+
$9.set(hasStoredInitialValue, true);
|
|
2845
4777
|
}
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
$5.get(filteredOptions);
|
|
2849
|
-
if ($5.get(activeIndex) >= $5.get(filteredOptions).length) {
|
|
2850
|
-
$5.set(activeIndex, $5.get(filteredOptions).length > 0 ? 0 : -1, true);
|
|
4778
|
+
if (customValueAllowed() && !$9.get(hasUserCommittedValue) && value() && !$9.get(initialCustomValue)) {
|
|
4779
|
+
$9.set(initialCustomValue, value(), true);
|
|
2851
4780
|
}
|
|
2852
4781
|
});
|
|
2853
|
-
$
|
|
4782
|
+
$9.user_effect(() => {
|
|
2854
4783
|
if (!value()) {
|
|
2855
|
-
if (
|
|
2856
|
-
|
|
2857
|
-
$
|
|
4784
|
+
if (untrack3(() => textInputValue()))
|
|
4785
|
+
textInputValue("");
|
|
4786
|
+
$9.set(committedLabel, "");
|
|
2858
4787
|
return;
|
|
2859
4788
|
}
|
|
2860
4789
|
const matched = $$props.options.find((option) => option.value === value());
|
|
2861
4790
|
if (matched) {
|
|
2862
|
-
$
|
|
2863
|
-
if (
|
|
2864
|
-
|
|
4791
|
+
$9.set(committedLabel, matched.label, true);
|
|
4792
|
+
if (untrack3(() => textInputValue()) !== matched.label) {
|
|
4793
|
+
textInputValue(matched.label);
|
|
2865
4794
|
}
|
|
2866
|
-
} else if (
|
|
2867
|
-
if (!$
|
|
2868
|
-
$
|
|
2869
|
-
$
|
|
2870
|
-
if (
|
|
2871
|
-
|
|
4795
|
+
} else if (customValueAllowed()) {
|
|
4796
|
+
if (!$9.get(initialCustomValue))
|
|
4797
|
+
$9.set(initialCustomValue, value(), true);
|
|
4798
|
+
$9.set(committedLabel, value(), true);
|
|
4799
|
+
if (untrack3(() => textInputValue()) !== value())
|
|
4800
|
+
textInputValue(value());
|
|
2872
4801
|
}
|
|
2873
4802
|
});
|
|
2874
4803
|
function handleEscape(event2 = undefined) {
|
|
2875
|
-
const wasOpen = $
|
|
2876
|
-
$
|
|
2877
|
-
if (
|
|
2878
|
-
|
|
2879
|
-
if ($
|
|
2880
|
-
$
|
|
4804
|
+
const wasOpen = $9.get(open);
|
|
4805
|
+
$9.set(open, false);
|
|
4806
|
+
if (textInputValue() !== $9.get(committedLabel)) {
|
|
4807
|
+
textInputValue($9.get(committedLabel));
|
|
4808
|
+
if ($9.get(inputElement))
|
|
4809
|
+
$9.get(inputElement).value = $9.get(committedLabel);
|
|
2881
4810
|
}
|
|
2882
4811
|
if (wasOpen)
|
|
2883
4812
|
event2?.preventDefault();
|
|
2884
4813
|
}
|
|
2885
|
-
$
|
|
2886
|
-
if (!$
|
|
4814
|
+
$9.user_effect(() => {
|
|
4815
|
+
if (!$9.get(open))
|
|
2887
4816
|
return;
|
|
2888
4817
|
const releaseEscape = pushEscapeHandler(handleEscape);
|
|
2889
4818
|
return releaseEscape;
|
|
2890
4819
|
});
|
|
2891
|
-
const listboxVisible = $
|
|
2892
|
-
const
|
|
4820
|
+
const listboxVisible = $9.derived(() => $9.get(open) && $9.get(filteredOptions).length > 0);
|
|
4821
|
+
const emptyVisible = $9.derived(() => $9.get(open) && $9.get(filteredOptions).length === 0);
|
|
4822
|
+
const activeOptionId = $9.derived(() => $9.get(listboxVisible) ? commandList.activeItemId ?? undefined : undefined);
|
|
4823
|
+
const activeIndex = $9.derived(() => commandList.activeItemId === null ? -1 : $9.get(filteredOptions).findIndex((_, index) => `${$$props.id}-option-${index}` === commandList.activeItemId));
|
|
4824
|
+
function firstEnabledFilteredIndex() {
|
|
4825
|
+
return $9.get(filteredOptions).findIndex((option) => !option.disabled);
|
|
4826
|
+
}
|
|
4827
|
+
function enabledFilteredIndexes() {
|
|
4828
|
+
const indexes = [];
|
|
4829
|
+
$9.get(filteredOptions).forEach((option, index) => {
|
|
4830
|
+
if (!option.disabled)
|
|
4831
|
+
indexes.push(index);
|
|
4832
|
+
});
|
|
4833
|
+
return indexes;
|
|
4834
|
+
}
|
|
4835
|
+
function setActiveIndex(index) {
|
|
4836
|
+
if (index < 0)
|
|
4837
|
+
commandList.resetActiveItem();
|
|
4838
|
+
else
|
|
4839
|
+
commandList.setActiveById(`${$$props.id}-option-${index}`);
|
|
4840
|
+
}
|
|
4841
|
+
function moveActive(direction) {
|
|
4842
|
+
const indexes = enabledFilteredIndexes();
|
|
4843
|
+
if (indexes.length === 0)
|
|
4844
|
+
return;
|
|
4845
|
+
if ($9.get(activeIndex) < 0) {
|
|
4846
|
+
setActiveIndex(direction === 1 ? indexes[0] : indexes.at(-1));
|
|
4847
|
+
return;
|
|
4848
|
+
}
|
|
4849
|
+
const currentPosition = indexes.indexOf($9.get(activeIndex));
|
|
4850
|
+
const nextPosition = currentPosition < 0 ? 0 : (currentPosition + direction + indexes.length) % indexes.length;
|
|
4851
|
+
setActiveIndex(indexes[nextPosition]);
|
|
4852
|
+
}
|
|
4853
|
+
function moveToBoundary(direction) {
|
|
4854
|
+
const indexes = enabledFilteredIndexes();
|
|
4855
|
+
setActiveIndex(indexes.length === 0 ? -1 : direction === "start" ? indexes[0] : indexes.at(-1));
|
|
4856
|
+
}
|
|
4857
|
+
$9.user_effect(() => {
|
|
4858
|
+
const listbox = $9.get(listboxElement);
|
|
4859
|
+
if (!listbox || !$9.get(listboxVisible))
|
|
4860
|
+
return;
|
|
4861
|
+
const optionNodes = listbox.querySelectorAll('[role="option"]');
|
|
4862
|
+
commandList.syncItems($9.get(filteredOptions).flatMap((option, index) => {
|
|
4863
|
+
const node = optionNodes[index];
|
|
4864
|
+
return node ? [
|
|
4865
|
+
{
|
|
4866
|
+
id: `${$$props.id}-option-${index}`,
|
|
4867
|
+
node,
|
|
4868
|
+
getValue: () => option.value,
|
|
4869
|
+
getOnselect: () => () => selectOption(option),
|
|
4870
|
+
getDisabled: () => !!option.disabled
|
|
4871
|
+
}
|
|
4872
|
+
] : [];
|
|
4873
|
+
}));
|
|
4874
|
+
});
|
|
4875
|
+
$9.user_effect(() => {
|
|
4876
|
+
if (!$9.get(listboxVisible))
|
|
4877
|
+
return;
|
|
4878
|
+
commandList.scrollActiveItemIntoView();
|
|
4879
|
+
});
|
|
2893
4880
|
function findCommittedOption(rawValue) {
|
|
2894
4881
|
const query = rawValue.trim();
|
|
2895
4882
|
if (!query)
|
|
@@ -2908,60 +4895,60 @@ function Combobox($$anchor, $$props) {
|
|
|
2908
4895
|
}
|
|
2909
4896
|
function handleInput(event2) {
|
|
2910
4897
|
const target = event2.target;
|
|
2911
|
-
|
|
2912
|
-
$
|
|
2913
|
-
|
|
2914
|
-
$
|
|
4898
|
+
textInputValue(target.value);
|
|
4899
|
+
$9.set(open, true);
|
|
4900
|
+
setActiveIndex(firstEnabledFilteredIndex());
|
|
4901
|
+
$9.set(hasExplicitNavigation, false);
|
|
2915
4902
|
}
|
|
2916
4903
|
function handleFocus() {
|
|
2917
|
-
if (!$
|
|
2918
|
-
$
|
|
4904
|
+
if (!$9.get(resolvedDisabled))
|
|
4905
|
+
$9.set(open, true);
|
|
2919
4906
|
}
|
|
2920
4907
|
function handleBlur(event2) {
|
|
2921
4908
|
const next = event2.relatedTarget;
|
|
2922
|
-
if (next && $
|
|
4909
|
+
if (next && $9.get(listboxElement)?.contains(next))
|
|
2923
4910
|
return;
|
|
2924
|
-
if (
|
|
4911
|
+
if (customValueAllowed() && textInputValue().trim() && textInputValue() !== $9.get(committedLabel)) {
|
|
2925
4912
|
commitCustomValue();
|
|
2926
4913
|
return;
|
|
2927
4914
|
}
|
|
2928
|
-
$
|
|
2929
|
-
if (
|
|
2930
|
-
|
|
2931
|
-
if ($
|
|
2932
|
-
$
|
|
4915
|
+
$9.set(open, false);
|
|
4916
|
+
if (textInputValue() !== $9.get(committedLabel)) {
|
|
4917
|
+
textInputValue($9.get(committedLabel));
|
|
4918
|
+
if ($9.get(inputElement))
|
|
4919
|
+
$9.get(inputElement).value = $9.get(committedLabel);
|
|
2933
4920
|
}
|
|
2934
4921
|
}
|
|
2935
4922
|
function selectOption(option) {
|
|
2936
4923
|
if (option.disabled)
|
|
2937
4924
|
return;
|
|
2938
|
-
$
|
|
4925
|
+
$9.set(hasUserCommittedValue, true);
|
|
2939
4926
|
value(option.value);
|
|
2940
|
-
|
|
2941
|
-
$
|
|
2942
|
-
$
|
|
4927
|
+
textInputValue(option.label);
|
|
4928
|
+
$9.set(committedLabel, option.label, true);
|
|
4929
|
+
$9.set(open, false);
|
|
2943
4930
|
$$props.onchange?.(option.value);
|
|
2944
4931
|
}
|
|
2945
4932
|
function commitCustomValue() {
|
|
2946
|
-
const nextValue =
|
|
2947
|
-
if (!
|
|
4933
|
+
const nextValue = textInputValue().trim();
|
|
4934
|
+
if (!customValueAllowed() || !nextValue)
|
|
2948
4935
|
return;
|
|
2949
4936
|
if ($$props.options.some((option) => option.disabled && (option.value === nextValue || option.label === nextValue))) {
|
|
2950
|
-
|
|
2951
|
-
if ($
|
|
2952
|
-
$
|
|
2953
|
-
$
|
|
4937
|
+
textInputValue($9.get(committedLabel));
|
|
4938
|
+
if ($9.get(inputElement))
|
|
4939
|
+
$9.get(inputElement).value = $9.get(committedLabel);
|
|
4940
|
+
$9.set(open, false);
|
|
2954
4941
|
return;
|
|
2955
4942
|
}
|
|
2956
|
-
$
|
|
4943
|
+
$9.set(hasUserCommittedValue, true);
|
|
2957
4944
|
const matched = findCommittedOption(nextValue);
|
|
2958
4945
|
const committedValue = matched?.value ?? nextValue;
|
|
2959
4946
|
const committedText = matched?.label ?? nextValue;
|
|
2960
4947
|
const previousValue = value();
|
|
2961
4948
|
value(committedValue);
|
|
2962
|
-
|
|
2963
|
-
$
|
|
2964
|
-
$
|
|
4949
|
+
textInputValue(committedText);
|
|
4950
|
+
$9.set(committedLabel, committedText, true);
|
|
4951
|
+
$9.set(open, false);
|
|
2965
4952
|
if (committedValue !== previousValue)
|
|
2966
4953
|
$$props.onchange?.(committedValue);
|
|
2967
4954
|
}
|
|
@@ -2972,22 +4959,22 @@ function Combobox($$anchor, $$props) {
|
|
|
2972
4959
|
resetSyncTimeout = undefined;
|
|
2973
4960
|
if (event2.defaultPrevented)
|
|
2974
4961
|
return;
|
|
2975
|
-
const resetValue = $
|
|
4962
|
+
const resetValue = $9.get(hasStoredInitialValue) ? $9.get(initialValue) : customValueAllowed() ? $9.get(initialCustomValue) || $9.get(committedLabel) : "";
|
|
2976
4963
|
value(resetValue);
|
|
2977
4964
|
const matched = $$props.options.find((option) => option.value === resetValue);
|
|
2978
|
-
const nextInputValue = matched?.label ?? (
|
|
2979
|
-
|
|
2980
|
-
$
|
|
2981
|
-
$
|
|
2982
|
-
|
|
2983
|
-
if ($
|
|
2984
|
-
$
|
|
2985
|
-
if ($
|
|
2986
|
-
$
|
|
4965
|
+
const nextInputValue = matched?.label ?? (customValueAllowed() ? resetValue : initialInputValue);
|
|
4966
|
+
textInputValue(nextInputValue);
|
|
4967
|
+
$9.set(committedLabel, matched?.label ?? (customValueAllowed() ? resetValue : ""), true);
|
|
4968
|
+
$9.set(open, false);
|
|
4969
|
+
commandList.resetActiveItem();
|
|
4970
|
+
if ($9.get(inputElement))
|
|
4971
|
+
$9.get(inputElement).value = nextInputValue;
|
|
4972
|
+
if ($9.get(hiddenInputElement))
|
|
4973
|
+
$9.get(hiddenInputElement).value = resetValue;
|
|
2987
4974
|
}, 0);
|
|
2988
4975
|
}
|
|
2989
|
-
$
|
|
2990
|
-
const input = $
|
|
4976
|
+
$9.user_effect(() => {
|
|
4977
|
+
const input = $9.get(hiddenInputElement);
|
|
2991
4978
|
if (input === null)
|
|
2992
4979
|
return;
|
|
2993
4980
|
const form = input.form;
|
|
@@ -3000,39 +4987,39 @@ function Combobox($$anchor, $$props) {
|
|
|
3000
4987
|
}
|
|
3001
4988
|
};
|
|
3002
4989
|
});
|
|
3003
|
-
$
|
|
3004
|
-
$
|
|
4990
|
+
$9.user_effect(() => {
|
|
4991
|
+
$9.get(inputElement)?.setCustomValidity($9.get(resolvedRequired) && !value() || !customValueAllowed() && textInputValue() !== $9.get(committedLabel) ? "Please select an option." : "");
|
|
3005
4992
|
});
|
|
3006
4993
|
function handleKeydown(event2) {
|
|
3007
4994
|
if (event2.key === "ArrowDown") {
|
|
3008
4995
|
event2.preventDefault();
|
|
3009
|
-
$
|
|
3010
|
-
if ($
|
|
4996
|
+
$9.set(open, true);
|
|
4997
|
+
if ($9.get(filteredOptions).length === 0)
|
|
3011
4998
|
return;
|
|
3012
|
-
|
|
3013
|
-
$
|
|
4999
|
+
moveActive(1);
|
|
5000
|
+
$9.set(hasExplicitNavigation, true);
|
|
3014
5001
|
} else if (event2.key === "ArrowUp") {
|
|
3015
5002
|
event2.preventDefault();
|
|
3016
|
-
$
|
|
3017
|
-
if ($
|
|
5003
|
+
$9.set(open, true);
|
|
5004
|
+
if ($9.get(filteredOptions).length === 0)
|
|
3018
5005
|
return;
|
|
3019
|
-
|
|
3020
|
-
$
|
|
5006
|
+
moveActive(-1);
|
|
5007
|
+
$9.set(hasExplicitNavigation, true);
|
|
3021
5008
|
} else if (event2.key === "Home") {
|
|
3022
|
-
if (!$
|
|
5009
|
+
if (!$9.get(open))
|
|
3023
5010
|
return;
|
|
3024
5011
|
event2.preventDefault();
|
|
3025
|
-
|
|
3026
|
-
$
|
|
5012
|
+
moveToBoundary("start");
|
|
5013
|
+
$9.set(hasExplicitNavigation, true);
|
|
3027
5014
|
} else if (event2.key === "End") {
|
|
3028
|
-
if (!$
|
|
5015
|
+
if (!$9.get(open))
|
|
3029
5016
|
return;
|
|
3030
5017
|
event2.preventDefault();
|
|
3031
|
-
|
|
3032
|
-
$
|
|
3033
|
-
} else if (event2.key === "Enter" && $
|
|
3034
|
-
const option = $
|
|
3035
|
-
if (
|
|
5018
|
+
moveToBoundary("end");
|
|
5019
|
+
$9.set(hasExplicitNavigation, true);
|
|
5020
|
+
} else if (event2.key === "Enter" && $9.get(open)) {
|
|
5021
|
+
const option = $9.get(filteredOptions)[$9.get(activeIndex)];
|
|
5022
|
+
if (customValueAllowed() && !($9.get(hasExplicitNavigation) && option)) {
|
|
3036
5023
|
event2.preventDefault();
|
|
3037
5024
|
commitCustomValue();
|
|
3038
5025
|
} else if (option) {
|
|
@@ -3045,203 +5032,49 @@ function Combobox($$anchor, $$props) {
|
|
|
3045
5032
|
handleEscape(event2);
|
|
3046
5033
|
}
|
|
3047
5034
|
}
|
|
3048
|
-
var div = root_8();
|
|
3049
|
-
var node = $5.child(div);
|
|
3050
5035
|
{
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
5036
|
+
let $0 = $9.derived(() => classNames("cinder-combobox", $$props.class));
|
|
5037
|
+
let $1 = $9.derived(() => $9.get(field).ownErrorId ?? $9.get(stableLocalErrorId));
|
|
5038
|
+
Form_field_frame($$anchor, {
|
|
5039
|
+
get id() {
|
|
5040
|
+
return $$props.id;
|
|
5041
|
+
},
|
|
5042
|
+
get label() {
|
|
5043
|
+
return $$props.label;
|
|
5044
|
+
},
|
|
5045
|
+
get description() {
|
|
5046
|
+
return $$props.description;
|
|
5047
|
+
},
|
|
5048
|
+
get error() {
|
|
5049
|
+
return $$props.error;
|
|
5050
|
+
},
|
|
5051
|
+
get required() {
|
|
5052
|
+
return $9.get(resolvedRequired);
|
|
5053
|
+
},
|
|
5054
|
+
get disabled() {
|
|
5055
|
+
return $9.get(resolvedDisabled);
|
|
5056
|
+
},
|
|
5057
|
+
get class() {
|
|
5058
|
+
return $9.get($0);
|
|
5059
|
+
},
|
|
5060
|
+
labelClass: "cinder-combobox__label",
|
|
5061
|
+
descriptionClass: "cinder-combobox__description",
|
|
5062
|
+
errorClass: "cinder-combobox__error",
|
|
5063
|
+
get descriptionId() {
|
|
5064
|
+
return $9.get(descriptionId);
|
|
5065
|
+
},
|
|
5066
|
+
get errorId() {
|
|
5067
|
+
return $9.get($1);
|
|
5068
|
+
},
|
|
5069
|
+
errorAlwaysMounted: true,
|
|
5070
|
+
get control() {
|
|
5071
|
+
return comboboxControl;
|
|
3064
5072
|
}
|
|
3065
|
-
$5.reset(label_1);
|
|
3066
|
-
$5.template_effect(() => {
|
|
3067
|
-
$5.set_attribute(label_1, "for", $$props.id);
|
|
3068
|
-
$5.set_attribute(label_1, "data-disabled", $5.get(resolvedDisabled) || undefined);
|
|
3069
|
-
$5.set_text(text, `${$$props.label ?? ""} `);
|
|
3070
|
-
});
|
|
3071
|
-
$5.append($$anchor2, label_1);
|
|
3072
|
-
};
|
|
3073
|
-
$5.if(node, ($$render) => {
|
|
3074
|
-
if ($$props.label)
|
|
3075
|
-
$$render(consequent_1);
|
|
3076
|
-
});
|
|
3077
|
-
}
|
|
3078
|
-
var div_1 = $5.sibling(node, 2);
|
|
3079
|
-
var input_1 = $5.child(div_1);
|
|
3080
|
-
$5.remove_input_defaults(input_1);
|
|
3081
|
-
$5.bind_this(input_1, ($$value) => $5.set(inputElement, $$value), () => $5.get(inputElement));
|
|
3082
|
-
$5.reset(div_1);
|
|
3083
|
-
var node_2 = $5.sibling(div_1, 2);
|
|
3084
|
-
{
|
|
3085
|
-
var consequent_2 = ($$anchor2) => {
|
|
3086
|
-
var input_2 = root_22();
|
|
3087
|
-
$5.remove_input_defaults(input_2);
|
|
3088
|
-
$5.bind_this(input_2, ($$value) => $5.set(hiddenInputElement, $$value), () => $5.get(hiddenInputElement));
|
|
3089
|
-
$5.template_effect(() => {
|
|
3090
|
-
$5.set_attribute(input_2, "name", $$props.name);
|
|
3091
|
-
$5.set_value(input_2, value());
|
|
3092
|
-
input_2.disabled = $5.get(resolvedDisabled);
|
|
3093
|
-
});
|
|
3094
|
-
$5.append($$anchor2, input_2);
|
|
3095
|
-
};
|
|
3096
|
-
$5.if(node_2, ($$render) => {
|
|
3097
|
-
if ($$props.name)
|
|
3098
|
-
$$render(consequent_2);
|
|
3099
|
-
});
|
|
3100
|
-
}
|
|
3101
|
-
var node_3 = $5.sibling(node_2, 2);
|
|
3102
|
-
{
|
|
3103
|
-
var consequent_5 = ($$anchor2) => {
|
|
3104
|
-
Popover($$anchor2, {
|
|
3105
|
-
get id() {
|
|
3106
|
-
return $5.get(listboxId);
|
|
3107
|
-
},
|
|
3108
|
-
get triggerRef() {
|
|
3109
|
-
return $5.get(inputElement);
|
|
3110
|
-
},
|
|
3111
|
-
role: "listbox",
|
|
3112
|
-
focusManagement: "preserve",
|
|
3113
|
-
wireTriggerAria: false,
|
|
3114
|
-
closeOnEscape: false,
|
|
3115
|
-
widthMode: "match-anchor",
|
|
3116
|
-
class: "cinder-combobox__panel",
|
|
3117
|
-
get open() {
|
|
3118
|
-
return $5.get(open);
|
|
3119
|
-
},
|
|
3120
|
-
set open($$value) {
|
|
3121
|
-
$5.set(open, $$value, true);
|
|
3122
|
-
},
|
|
3123
|
-
children: ($$anchor3, $$slotProps) => {
|
|
3124
|
-
var ul = root_6();
|
|
3125
|
-
$5.each(ul, 23, () => $5.get(filteredOptions), (option) => option.value, ($$anchor4, option, index) => {
|
|
3126
|
-
var li = root_5();
|
|
3127
|
-
var node_4 = $5.child(li);
|
|
3128
|
-
{
|
|
3129
|
-
var consequent_3 = ($$anchor5) => {
|
|
3130
|
-
var img = root_32();
|
|
3131
|
-
$5.template_effect(() => $5.set_attribute(img, "src", $5.get(option).avatar));
|
|
3132
|
-
$5.append($$anchor5, img);
|
|
3133
|
-
};
|
|
3134
|
-
var d = $5.derived(() => $5.get(option).avatar?.trim());
|
|
3135
|
-
$5.if(node_4, ($$render) => {
|
|
3136
|
-
if ($5.get(d))
|
|
3137
|
-
$$render(consequent_3);
|
|
3138
|
-
});
|
|
3139
|
-
}
|
|
3140
|
-
var span_1 = $5.sibling(node_4, 2);
|
|
3141
|
-
var span_2 = $5.child(span_1);
|
|
3142
|
-
var text_1 = $5.child(span_2, true);
|
|
3143
|
-
$5.reset(span_2);
|
|
3144
|
-
var node_5 = $5.sibling(span_2, 2);
|
|
3145
|
-
{
|
|
3146
|
-
var consequent_4 = ($$anchor5) => {
|
|
3147
|
-
var span_3 = root_4();
|
|
3148
|
-
var text_2 = $5.child(span_3, true);
|
|
3149
|
-
$5.reset(span_3);
|
|
3150
|
-
$5.template_effect(() => $5.set_text(text_2, $5.get(option).description));
|
|
3151
|
-
$5.append($$anchor5, span_3);
|
|
3152
|
-
};
|
|
3153
|
-
$5.if(node_5, ($$render) => {
|
|
3154
|
-
if ($5.get(option).description)
|
|
3155
|
-
$$render(consequent_4);
|
|
3156
|
-
});
|
|
3157
|
-
}
|
|
3158
|
-
$5.reset(span_1);
|
|
3159
|
-
$5.reset(li);
|
|
3160
|
-
$5.template_effect(() => {
|
|
3161
|
-
$5.set_attribute(li, "id", `${$$props.id ?? ""}-option-${$5.get(index) ?? ""}`);
|
|
3162
|
-
$5.set_attribute(li, "aria-selected", value() === $5.get(option).value);
|
|
3163
|
-
$5.set_attribute(li, "aria-disabled", $5.get(option).disabled || undefined);
|
|
3164
|
-
$5.set_attribute(li, "aria-label", $5.get(option).description ? `${$5.get(option).label}, ${$5.get(option).description}` : undefined);
|
|
3165
|
-
$5.set_attribute(li, "data-cinder-active", $5.get(index) === $5.get(activeIndex) || undefined);
|
|
3166
|
-
$5.set_text(text_1, $5.get(option).label);
|
|
3167
|
-
});
|
|
3168
|
-
$5.delegated("mousedown", li, (event2) => {
|
|
3169
|
-
event2.preventDefault();
|
|
3170
|
-
selectOption($5.get(option));
|
|
3171
|
-
});
|
|
3172
|
-
$5.event("mouseenter", li, () => {
|
|
3173
|
-
$5.set(activeIndex, $5.get(index), true);
|
|
3174
|
-
});
|
|
3175
|
-
$5.append($$anchor4, li);
|
|
3176
|
-
});
|
|
3177
|
-
$5.reset(ul);
|
|
3178
|
-
$5.bind_this(ul, ($$value) => $5.set(listboxElement, $$value), () => $5.get(listboxElement));
|
|
3179
|
-
$5.append($$anchor3, ul);
|
|
3180
|
-
},
|
|
3181
|
-
$$slots: { default: true }
|
|
3182
|
-
});
|
|
3183
|
-
};
|
|
3184
|
-
$5.if(node_3, ($$render) => {
|
|
3185
|
-
if ($5.get(listboxVisible))
|
|
3186
|
-
$$render(consequent_5);
|
|
3187
|
-
});
|
|
3188
|
-
}
|
|
3189
|
-
var div_2 = $5.sibling(node_3, 2);
|
|
3190
|
-
var text_3 = $5.child(div_2, true);
|
|
3191
|
-
$5.reset(div_2);
|
|
3192
|
-
var node_6 = $5.sibling(div_2, 2);
|
|
3193
|
-
{
|
|
3194
|
-
var consequent_6 = ($$anchor2) => {
|
|
3195
|
-
var p = root_7();
|
|
3196
|
-
var text_4 = $5.child(p, true);
|
|
3197
|
-
$5.reset(p);
|
|
3198
|
-
$5.template_effect(() => {
|
|
3199
|
-
$5.set_attribute(p, "id", $5.get(descriptionId));
|
|
3200
|
-
$5.set_text(text_4, $$props.description);
|
|
3201
|
-
});
|
|
3202
|
-
$5.append($$anchor2, p);
|
|
3203
|
-
};
|
|
3204
|
-
$5.if(node_6, ($$render) => {
|
|
3205
|
-
if ($$props.description)
|
|
3206
|
-
$$render(consequent_6);
|
|
3207
5073
|
});
|
|
3208
5074
|
}
|
|
3209
|
-
|
|
3210
|
-
var text_5 = $5.child(p_1, true);
|
|
3211
|
-
$5.reset(p_1);
|
|
3212
|
-
$5.reset(div);
|
|
3213
|
-
$5.template_effect(($0, $1) => {
|
|
3214
|
-
$5.set_class(div, 1, $0);
|
|
3215
|
-
$5.set_attribute(div_1, "data-cinder-open", $5.get(open) || undefined);
|
|
3216
|
-
$5.set_attribute(input_1, "id", $$props.id);
|
|
3217
|
-
input_1.disabled = $5.get(resolvedDisabled);
|
|
3218
|
-
input_1.required = $5.get(resolvedRequired);
|
|
3219
|
-
$5.set_attribute(input_1, "placeholder", $$props.placeholder);
|
|
3220
|
-
$5.set_value(input_1, inputValue());
|
|
3221
|
-
$5.set_attribute(input_1, "aria-label", $1);
|
|
3222
|
-
$5.set_attribute(input_1, "aria-expanded", $5.get(listboxVisible));
|
|
3223
|
-
$5.set_attribute(input_1, "aria-controls", $5.get(listboxVisible) ? $5.get(listboxId) : undefined);
|
|
3224
|
-
$5.set_attribute(input_1, "aria-activedescendant", $5.get(activeOptionId));
|
|
3225
|
-
$5.set_attribute(input_1, "aria-invalid", $5.get(field).ariaInvalid);
|
|
3226
|
-
$5.set_attribute(input_1, "aria-required", $5.get(resolvedRequired) || undefined);
|
|
3227
|
-
$5.set_attribute(input_1, "aria-describedby", $5.get(describedBy));
|
|
3228
|
-
$5.set_attribute(div_2, "data-cinder-active", $5.get(open) && $5.get(filteredOptions).length === 0 || undefined);
|
|
3229
|
-
$5.set_text(text_3, $5.get(open) && $5.get(filteredOptions).length === 0 ? "No results" : "");
|
|
3230
|
-
$5.set_attribute(p_1, "id", $5.get(field).ownErrorId ?? $5.get(stableLocalErrorId));
|
|
3231
|
-
$5.set_attribute(p_1, "data-cinder-error", !!$$props.error || undefined);
|
|
3232
|
-
$5.set_text(text_5, $$props.error ?? "");
|
|
3233
|
-
}, [
|
|
3234
|
-
() => $5.clsx(classNames("cinder-combobox", $$props.class)),
|
|
3235
|
-
() => $$props["aria-label"]?.trim() || undefined
|
|
3236
|
-
]);
|
|
3237
|
-
$5.delegated("input", input_1, handleInput);
|
|
3238
|
-
$5.event("focus", input_1, handleFocus);
|
|
3239
|
-
$5.event("blur", input_1, handleBlur);
|
|
3240
|
-
$5.delegated("keydown", input_1, handleKeydown);
|
|
3241
|
-
$5.append($$anchor, div);
|
|
3242
|
-
$5.pop();
|
|
5075
|
+
$9.pop();
|
|
3243
5076
|
}
|
|
3244
|
-
$
|
|
5077
|
+
$9.delegate(["input", "keydown", "mousedown"]);
|
|
3245
5078
|
|
|
3246
5079
|
// src/components/combobox/index.ts
|
|
3247
5080
|
var combobox_default = Combobox;
|
|
@@ -3250,4 +5083,4 @@ export {
|
|
|
3250
5083
|
Combobox
|
|
3251
5084
|
};
|
|
3252
5085
|
|
|
3253
|
-
//# debugId=
|
|
5086
|
+
//# debugId=BAF723249519193B64756E2164756E21
|