@vielzeug/refine 1.1.3 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion-item.cjs +4 -4
- package/dist/accordion-item.cjs.map +1 -1
- package/dist/accordion-item.js +41 -41
- package/dist/accordion-item.js.map +1 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.cjs.map +1 -1
- package/dist/accordion.js +21 -21
- package/dist/accordion.js.map +1 -1
- package/dist/alert.cjs +5 -5
- package/dist/alert.cjs.map +1 -1
- package/dist/alert.js +21 -21
- package/dist/alert.js.map +1 -1
- package/dist/async.cjs +10 -10
- package/dist/async.cjs.map +1 -1
- package/dist/async.js +27 -27
- package/dist/async.js.map +1 -1
- package/dist/avatar.cjs +2 -2
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.js +30 -30
- package/dist/avatar.js.map +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.cjs.map +1 -1
- package/dist/badge.js +1 -1
- package/dist/box.cjs +1 -1
- package/dist/box.cjs.map +1 -1
- package/dist/box.js +1 -1
- package/dist/breadcrumb.cjs +2 -2
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.js +20 -20
- package/dist/breadcrumb.js.map +1 -1
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.cjs.map +1 -1
- package/dist/button-group.js +7 -7
- package/dist/button-group.js.map +1 -1
- package/dist/button.cjs +6 -6
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +47 -45
- package/dist/button.js.map +1 -1
- package/dist/calendar.cjs +28 -28
- package/dist/calendar.cjs.map +1 -1
- package/dist/calendar.js +93 -91
- package/dist/calendar.js.map +1 -1
- package/dist/card.cjs +6 -6
- package/dist/card.cjs.map +1 -1
- package/dist/card.js +35 -34
- package/dist/card.js.map +1 -1
- package/dist/carousel.cjs +19 -19
- package/dist/carousel.cjs.map +1 -1
- package/dist/carousel.js +111 -111
- package/dist/carousel.js.map +1 -1
- package/dist/chat-message.cjs +47 -0
- package/dist/chat-message.cjs.map +1 -0
- package/dist/chat-message.js +121 -0
- package/dist/chat-message.js.map +1 -0
- package/dist/checkbox-group.cjs +9 -9
- package/dist/checkbox-group.cjs.map +1 -1
- package/dist/checkbox-group.js +54 -52
- package/dist/checkbox-group.js.map +1 -1
- package/dist/checkbox.cjs +4 -4
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.js +39 -37
- package/dist/checkbox.js.map +1 -1
- package/dist/chip.cjs +14 -14
- package/dist/chip.cjs.map +1 -1
- package/dist/chip.js +43 -43
- package/dist/chip.js.map +1 -1
- package/dist/code-window.cjs +1 -1
- package/dist/code-window.cjs.map +1 -1
- package/dist/code-window.js +1 -1
- package/dist/combobox.cjs +25 -25
- package/dist/combobox.cjs.map +1 -1
- package/dist/combobox.js +181 -179
- package/dist/combobox.js.map +1 -1
- package/dist/command-palette.cjs +62 -0
- package/dist/command-palette.cjs.map +1 -0
- package/dist/command-palette.js +179 -0
- package/dist/command-palette.js.map +1 -0
- package/dist/content/avatar/{avatar-group.css?inline.cjs → avatar-group.css.cjs} +1 -1
- package/dist/content/avatar/avatar-group.css.cjs.map +1 -0
- package/dist/content/avatar/{avatar-group.css?inline.js → avatar-group.css.js} +1 -1
- package/dist/content/avatar/avatar-group.css.js.map +1 -0
- package/dist/content/avatar/{avatar.css?inline.cjs → avatar.css.cjs} +1 -1
- package/dist/content/avatar/avatar.css.cjs.map +1 -0
- package/dist/content/avatar/{avatar.css?inline.js → avatar.css.js} +1 -1
- package/dist/content/avatar/avatar.css.js.map +1 -0
- package/dist/content/breadcrumb/{breadcrumb-item.css?inline.cjs → breadcrumb-item.css.cjs} +1 -1
- package/dist/content/breadcrumb/breadcrumb-item.css.cjs.map +1 -0
- package/dist/content/breadcrumb/{breadcrumb-item.css?inline.js → breadcrumb-item.css.js} +1 -1
- package/dist/content/breadcrumb/breadcrumb-item.css.js.map +1 -0
- package/dist/content/breadcrumb/{breadcrumb.css?inline.cjs → breadcrumb.css.cjs} +1 -1
- package/dist/content/breadcrumb/breadcrumb.css.cjs.map +1 -0
- package/dist/content/breadcrumb/{breadcrumb.css?inline.js → breadcrumb.css.js} +1 -1
- package/dist/content/breadcrumb/breadcrumb.css.js.map +1 -0
- package/dist/content/card/card.css.cjs +2 -0
- package/dist/content/card/card.css.cjs.map +1 -0
- package/dist/content/card/card.css.js +6 -0
- package/dist/content/card/card.css.js.map +1 -0
- package/dist/content/carousel/carousel-slide.cjs +1 -1
- package/dist/content/carousel/carousel-slide.cjs.map +1 -1
- package/dist/content/carousel/{carousel-slide.css?inline.cjs → carousel-slide.css.cjs} +1 -1
- package/dist/content/carousel/carousel-slide.css.cjs.map +1 -0
- package/dist/content/carousel/{carousel-slide.css?inline.js → carousel-slide.css.js} +1 -1
- package/dist/content/carousel/carousel-slide.css.js.map +1 -0
- package/dist/content/carousel/carousel-slide.js +7 -7
- package/dist/content/carousel/carousel-slide.js.map +1 -1
- package/dist/content/carousel/{carousel.css?inline.cjs → carousel.css.cjs} +1 -1
- package/dist/content/carousel/carousel.css.cjs.map +1 -0
- package/dist/content/carousel/{carousel.css?inline.js → carousel.css.js} +1 -1
- package/dist/content/carousel/carousel.css.js.map +1 -0
- package/dist/content/chat-message/chat-message.css.cjs +2 -0
- package/dist/content/chat-message/chat-message.css.cjs.map +1 -0
- package/dist/content/chat-message/chat-message.css.js +6 -0
- package/dist/content/chat-message/chat-message.css.js.map +1 -0
- package/dist/content/chat-message/chat-message.d.ts +87 -0
- package/dist/content/chat-message/chat-message.d.ts.map +1 -0
- package/dist/content/code-window/{code-window.css?inline.cjs → code-window.css.cjs} +1 -1
- package/dist/content/code-window/code-window.css.cjs.map +1 -0
- package/dist/content/code-window/{code-window.css?inline.js → code-window.css.js} +1 -1
- package/dist/content/code-window/code-window.css.js.map +1 -0
- package/dist/content/copy-command/{copy-command.css?inline.cjs → copy-command.css.cjs} +1 -1
- package/dist/content/copy-command/copy-command.css.cjs.map +1 -0
- package/dist/content/copy-command/{copy-command.css?inline.js → copy-command.css.js} +1 -1
- package/dist/content/copy-command/copy-command.css.js.map +1 -0
- package/dist/content/icon/icon.css.cjs +2 -0
- package/dist/content/icon/icon.css.cjs.map +1 -0
- package/dist/content/icon/icon.css.js +6 -0
- package/dist/content/icon/icon.css.js.map +1 -0
- package/dist/content/index.d.ts +2 -0
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/pagination/{pagination.css?inline.cjs → pagination.css.cjs} +1 -1
- package/dist/content/pagination/pagination.css.cjs.map +1 -0
- package/dist/content/pagination/{pagination.css?inline.js → pagination.css.js} +1 -1
- package/dist/content/pagination/pagination.css.js.map +1 -0
- package/dist/content/separator/{separator.css?inline.cjs → separator.css.cjs} +1 -1
- package/dist/content/separator/separator.css.cjs.map +1 -0
- package/dist/content/separator/{separator.css?inline.js → separator.css.js} +1 -1
- package/dist/content/separator/separator.css.js.map +1 -0
- package/dist/content/table/{table.css?inline.cjs → table.css.cjs} +1 -1
- package/dist/content/table/table.css.cjs.map +1 -0
- package/dist/content/table/{table.css?inline.js → table.css.js} +1 -1
- package/dist/content/table/table.css.js.map +1 -0
- package/dist/content/text/{text.css?inline.cjs → text.css.cjs} +1 -1
- package/dist/content/text/text.css.cjs.map +1 -0
- package/dist/content/text/{text.css?inline.js → text.css.js} +1 -1
- package/dist/content/text/text.css.js.map +1 -0
- package/dist/copy-command.cjs +5 -5
- package/dist/copy-command.cjs.map +1 -1
- package/dist/copy-command.js +25 -25
- package/dist/copy-command.js.map +1 -1
- package/dist/custom-elements.json +4463 -3727
- package/dist/datagrid.cjs +109 -109
- package/dist/datagrid.cjs.map +1 -1
- package/dist/datagrid.js +194 -194
- package/dist/datagrid.js.map +1 -1
- package/dist/date-picker.cjs +40 -40
- package/dist/date-picker.cjs.map +1 -1
- package/dist/date-picker.js +116 -114
- package/dist/date-picker.js.map +1 -1
- package/dist/dialog.cjs +5 -5
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.js +28 -28
- package/dist/dialog.js.map +1 -1
- package/dist/disclosure/accordion/{accordion.css?inline.cjs → accordion.css.cjs} +1 -1
- package/dist/disclosure/accordion/accordion.css.cjs.map +1 -0
- package/dist/disclosure/accordion/{accordion.css?inline.js → accordion.css.js} +1 -1
- package/dist/disclosure/accordion/accordion.css.js.map +1 -0
- package/dist/disclosure/accordion-item/{accordion-item.css?inline.cjs → accordion-item.css.cjs} +1 -1
- package/dist/disclosure/accordion-item/accordion-item.css.cjs.map +1 -0
- package/dist/disclosure/accordion-item/{accordion-item.css?inline.js → accordion-item.css.js} +1 -1
- package/dist/disclosure/accordion-item/accordion-item.css.js.map +1 -0
- package/dist/disclosure/tab-item/{tab-item.css?inline.cjs → tab-item.css.cjs} +1 -1
- package/dist/disclosure/tab-item/tab-item.css.cjs.map +1 -0
- package/dist/disclosure/tab-item/{tab-item.css?inline.js → tab-item.css.js} +1 -1
- package/dist/disclosure/tab-item/tab-item.css.js.map +1 -0
- package/dist/disclosure/tab-panel/{tab-panel.css?inline.cjs → tab-panel.css.cjs} +1 -1
- package/dist/disclosure/tab-panel/tab-panel.css.cjs.map +1 -0
- package/dist/disclosure/tab-panel/{tab-panel.css?inline.js → tab-panel.css.js} +1 -1
- package/dist/disclosure/tab-panel/tab-panel.css.js.map +1 -0
- package/dist/disclosure/tabs/{tabs.css?inline.cjs → tabs.css.cjs} +1 -1
- package/dist/disclosure/tabs/tabs.css.cjs.map +1 -0
- package/dist/disclosure/tabs/{tabs.css?inline.js → tabs.css.js} +1 -1
- package/dist/disclosure/tabs/tabs.css.js.map +1 -0
- package/dist/drawer.cjs +9 -9
- package/dist/drawer.cjs.map +1 -1
- package/dist/drawer.js +80 -80
- package/dist/drawer.js.map +1 -1
- package/dist/feedback/alert/{alert.css?inline.cjs → alert.css.cjs} +1 -1
- package/dist/feedback/alert/alert.css.cjs.map +1 -0
- package/dist/feedback/alert/{alert.css?inline.js → alert.css.js} +1 -1
- package/dist/feedback/alert/alert.css.js.map +1 -0
- package/dist/feedback/async/{async.css?inline.cjs → async.css.cjs} +1 -1
- package/dist/feedback/async/async.css.cjs.map +1 -0
- package/dist/feedback/async/{async.css?inline.js → async.css.js} +1 -1
- package/dist/feedback/async/async.css.js.map +1 -0
- package/dist/feedback/badge/{badge.css?inline.cjs → badge.css.cjs} +1 -1
- package/dist/feedback/badge/badge.css.cjs.map +1 -0
- package/dist/feedback/badge/{badge.css?inline.js → badge.css.js} +1 -1
- package/dist/feedback/badge/badge.css.js.map +1 -0
- package/dist/feedback/chip/{chip.css?inline.cjs → chip.css.cjs} +1 -1
- package/dist/feedback/chip/chip.css.cjs.map +1 -0
- package/dist/feedback/chip/{chip.css?inline.js → chip.css.js} +1 -1
- package/dist/feedback/chip/chip.css.js.map +1 -0
- package/dist/feedback/index.d.ts +2 -0
- package/dist/feedback/index.d.ts.map +1 -1
- package/dist/feedback/password-strength/{password-strength.css?inline.cjs → password-strength.css.cjs} +1 -1
- package/dist/feedback/password-strength/password-strength.css.cjs.map +1 -0
- package/dist/feedback/password-strength/{password-strength.css?inline.js → password-strength.css.js} +1 -1
- package/dist/feedback/password-strength/password-strength.css.js.map +1 -0
- package/dist/feedback/progress/{progress.css?inline.cjs → progress.css.cjs} +1 -1
- package/dist/feedback/progress/progress.css.cjs.map +1 -0
- package/dist/feedback/progress/{progress.css?inline.js → progress.css.js} +1 -1
- package/dist/feedback/progress/progress.css.js.map +1 -0
- package/dist/feedback/skeleton/{skeleton.css?inline.cjs → skeleton.css.cjs} +1 -1
- package/dist/feedback/skeleton/skeleton.css.cjs.map +1 -0
- package/dist/feedback/skeleton/{skeleton.css?inline.js → skeleton.css.js} +1 -1
- package/dist/feedback/skeleton/skeleton.css.js.map +1 -0
- package/dist/feedback/toast/toast.css.cjs +2 -0
- package/dist/feedback/toast/toast.css.cjs.map +1 -0
- package/dist/feedback/toast/toast.css.js +6 -0
- package/dist/feedback/toast/toast.css.js.map +1 -0
- package/dist/feedback/toast/toast.d.ts.map +1 -1
- package/dist/feedback/typing-indicator/typing-indicator.css.cjs +2 -0
- package/dist/feedback/typing-indicator/typing-indicator.css.cjs.map +1 -0
- package/dist/feedback/typing-indicator/typing-indicator.css.js +6 -0
- package/dist/feedback/typing-indicator/typing-indicator.css.js.map +1 -0
- package/dist/feedback/typing-indicator/typing-indicator.d.ts +42 -0
- package/dist/feedback/typing-indicator/typing-indicator.d.ts.map +1 -0
- package/dist/file-input.cjs +56 -34
- package/dist/file-input.cjs.map +1 -1
- package/dist/file-input.js +143 -104
- package/dist/file-input.js.map +1 -1
- package/dist/form.cjs +3 -3
- package/dist/form.cjs.map +1 -1
- package/dist/form.js +28 -25
- package/dist/form.js.map +1 -1
- package/dist/grid-item.cjs +1 -1
- package/dist/grid-item.cjs.map +1 -1
- package/dist/grid-item.js +19 -19
- package/dist/grid-item.js.map +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/grid.cjs.map +1 -1
- package/dist/grid.js +48 -48
- package/dist/grid.js.map +1 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.js +26 -26
- package/dist/icon.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +52 -49
- package/dist/input.cjs +25 -25
- package/dist/input.cjs.map +1 -1
- package/dist/input.js +75 -73
- package/dist/input.js.map +1 -1
- package/dist/inputs/button/button.css.cjs +2 -0
- package/dist/inputs/button/button.css.cjs.map +1 -0
- package/dist/inputs/button/button.css.js +6 -0
- package/dist/inputs/button/button.css.js.map +1 -0
- package/dist/inputs/button/button.d.ts.map +1 -1
- package/dist/inputs/button-group/{button-group.css?inline.cjs → button-group.css.cjs} +1 -1
- package/dist/inputs/button-group/button-group.css.cjs.map +1 -0
- package/dist/inputs/button-group/{button-group.css?inline.js → button-group.css.js} +1 -1
- package/dist/inputs/button-group/button-group.css.js.map +1 -0
- package/dist/inputs/calendar/{calendar.css?inline.cjs → calendar.css.cjs} +1 -1
- package/dist/inputs/calendar/calendar.css.cjs.map +1 -0
- package/dist/inputs/calendar/{calendar.css?inline.js → calendar.css.js} +1 -1
- package/dist/inputs/calendar/calendar.css.js.map +1 -0
- package/dist/inputs/calendar/calendar.d.ts.map +1 -1
- package/dist/inputs/checkbox/{checkbox.css?inline.cjs → checkbox.css.cjs} +2 -2
- package/dist/inputs/checkbox/checkbox.css.cjs.map +1 -0
- package/dist/inputs/checkbox/{checkbox.css?inline.js → checkbox.css.js} +2 -2
- package/dist/inputs/checkbox/checkbox.css.js.map +1 -0
- package/dist/inputs/checkbox/checkbox.d.ts.map +1 -1
- package/dist/inputs/checkbox-group/{checkbox-group.css?inline.cjs → checkbox-group.css.cjs} +2 -2
- package/dist/inputs/checkbox-group/checkbox-group.css.cjs.map +1 -0
- package/dist/inputs/checkbox-group/{checkbox-group.css?inline.js → checkbox-group.css.js} +2 -2
- package/dist/inputs/checkbox-group/checkbox-group.css.js.map +1 -0
- package/dist/inputs/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/dist/inputs/combobox/{combobox.css?inline.cjs → combobox.css.cjs} +1 -1
- package/dist/inputs/combobox/combobox.css.cjs.map +1 -0
- package/dist/inputs/combobox/{combobox.css?inline.js → combobox.css.js} +1 -1
- package/dist/inputs/combobox/combobox.css.js.map +1 -0
- package/dist/inputs/combobox/combobox.d.ts.map +1 -1
- package/dist/inputs/datagrid/{datagrid.css?inline.cjs → datagrid.css.cjs} +1 -1
- package/dist/inputs/datagrid/datagrid.css.cjs.map +1 -0
- package/dist/inputs/datagrid/{datagrid.css?inline.js → datagrid.css.js} +1 -1
- package/dist/inputs/datagrid/datagrid.css.js.map +1 -0
- package/dist/inputs/date-picker/{date-picker.css?inline.cjs → date-picker.css.cjs} +1 -1
- package/dist/inputs/date-picker/date-picker.css.cjs.map +1 -0
- package/dist/inputs/date-picker/{date-picker.css?inline.js → date-picker.css.js} +1 -1
- package/dist/inputs/date-picker/date-picker.css.js.map +1 -0
- package/dist/inputs/date-picker/date-picker.d.ts.map +1 -1
- package/dist/inputs/file-input/file-input.css.cjs +2 -0
- package/dist/inputs/file-input/file-input.css.cjs.map +1 -0
- package/dist/inputs/file-input/file-input.css.js +6 -0
- package/dist/inputs/file-input/file-input.css.js.map +1 -0
- package/dist/inputs/file-input/file-input.d.ts +9 -0
- package/dist/inputs/file-input/file-input.d.ts.map +1 -1
- package/dist/inputs/form/{form.css?inline.cjs → form.css.cjs} +1 -1
- package/dist/inputs/form/form.css.cjs.map +1 -0
- package/dist/inputs/form/{form.css?inline.js → form.css.js} +1 -1
- package/dist/inputs/form/form.css.js.map +1 -0
- package/dist/inputs/input/input.css.cjs +2 -0
- package/dist/inputs/input/input.css.cjs.map +1 -0
- package/dist/inputs/input/input.css.js +6 -0
- package/dist/inputs/input/input.css.js.map +1 -0
- package/dist/inputs/input/input.d.ts.map +1 -1
- package/dist/inputs/number-input/{number-input.css?inline.cjs → number-input.css.cjs} +1 -1
- package/dist/inputs/number-input/number-input.css.cjs.map +1 -0
- package/dist/inputs/number-input/{number-input.css?inline.js → number-input.css.js} +1 -1
- package/dist/inputs/number-input/number-input.css.js.map +1 -0
- package/dist/inputs/otp-input/{otp-input.css?inline.cjs → otp-input.css.cjs} +2 -2
- package/dist/inputs/otp-input/otp-input.css.cjs.map +1 -0
- package/dist/inputs/otp-input/{otp-input.css?inline.js → otp-input.css.js} +2 -2
- package/dist/inputs/otp-input/otp-input.css.js.map +1 -0
- package/dist/inputs/otp-input/otp-input.d.ts.map +1 -1
- package/dist/inputs/radio/{radio.css?inline.cjs → radio.css.cjs} +2 -2
- package/dist/inputs/radio/radio.css.cjs.map +1 -0
- package/dist/inputs/radio/{radio.css?inline.js → radio.css.js} +2 -2
- package/dist/inputs/radio/radio.css.js.map +1 -0
- package/dist/inputs/radio/radio.d.ts.map +1 -1
- package/dist/inputs/radio-group/{radio-group.css?inline.cjs → radio-group.css.cjs} +2 -2
- package/dist/inputs/radio-group/radio-group.css.cjs.map +1 -0
- package/dist/inputs/radio-group/{radio-group.css?inline.js → radio-group.css.js} +2 -2
- package/dist/inputs/radio-group/radio-group.css.js.map +1 -0
- package/dist/inputs/radio-group/radio-group.d.ts.map +1 -1
- package/dist/inputs/rating/{rating.css?inline.cjs → rating.css.cjs} +2 -2
- package/dist/inputs/rating/rating.css.cjs.map +1 -0
- package/dist/inputs/rating/{rating.css?inline.js → rating.css.js} +2 -2
- package/dist/inputs/rating/rating.css.js.map +1 -0
- package/dist/inputs/rating/rating.d.ts.map +1 -1
- package/dist/inputs/select/{select.css?inline.cjs → select.css.cjs} +1 -1
- package/dist/inputs/select/select.css.cjs.map +1 -0
- package/dist/inputs/select/{select.css?inline.js → select.css.js} +1 -1
- package/dist/inputs/select/select.css.js.map +1 -0
- package/dist/inputs/select/select.d.ts.map +1 -1
- package/dist/inputs/shared/field-binding.cjs +1 -1
- package/dist/inputs/shared/field-binding.cjs.map +1 -1
- package/dist/inputs/shared/field-binding.d.ts +1 -2
- package/dist/inputs/shared/field-binding.d.ts.map +1 -1
- package/dist/inputs/shared/field-binding.js +3 -2
- package/dist/inputs/shared/field-binding.js.map +1 -1
- package/dist/inputs/shared/form-context.cjs +1 -1
- package/dist/inputs/shared/form-context.cjs.map +1 -1
- package/dist/inputs/shared/form-context.d.ts +4 -4
- package/dist/inputs/shared/form-context.d.ts.map +1 -1
- package/dist/inputs/shared/form-context.js +10 -10
- package/dist/inputs/shared/form-context.js.map +1 -1
- package/dist/inputs/slider/{slider.css?inline.cjs → slider.css.cjs} +2 -2
- package/dist/inputs/slider/slider.css.cjs.map +1 -0
- package/dist/inputs/slider/{slider.css?inline.js → slider.css.js} +2 -2
- package/dist/inputs/slider/slider.css.js.map +1 -0
- package/dist/inputs/slider/slider.d.ts.map +1 -1
- package/dist/inputs/switch/{switch.css?inline.cjs → switch.css.cjs} +2 -2
- package/dist/inputs/switch/switch.css.cjs.map +1 -0
- package/dist/inputs/switch/{switch.css?inline.js → switch.css.js} +2 -2
- package/dist/inputs/switch/switch.css.js.map +1 -0
- package/dist/inputs/switch/switch.d.ts.map +1 -1
- package/dist/inputs/textarea/textarea.css.cjs +2 -0
- package/dist/inputs/textarea/textarea.css.cjs.map +1 -0
- package/dist/inputs/textarea/textarea.css.js +6 -0
- package/dist/inputs/textarea/textarea.css.js.map +1 -0
- package/dist/inputs/textarea/textarea.d.ts.map +1 -1
- package/dist/inputs/time-picker/{time-picker.css?inline.cjs → time-picker.css.cjs} +1 -1
- package/dist/inputs/time-picker/time-picker.css.cjs.map +1 -0
- package/dist/inputs/time-picker/{time-picker.css?inline.js → time-picker.css.js} +1 -1
- package/dist/inputs/time-picker/time-picker.css.js.map +1 -0
- package/dist/inputs/time-picker/time-picker.d.ts.map +1 -1
- package/dist/keymap/dist/_dev.cjs +2 -0
- package/dist/keymap/dist/_dev.cjs.map +1 -0
- package/dist/keymap/dist/_dev.js +4 -0
- package/dist/keymap/dist/_dev.js.map +1 -0
- package/dist/keymap/dist/format.cjs +1 -0
- package/dist/keymap/dist/format.js +1 -0
- package/dist/keymap/dist/index.cjs +1 -0
- package/dist/keymap/dist/index.js +4 -0
- package/dist/keymap/dist/keymap.cjs +2 -0
- package/dist/keymap/dist/keymap.cjs.map +1 -0
- package/dist/keymap/dist/keymap.js +221 -0
- package/dist/keymap/dist/keymap.js.map +1 -0
- package/dist/keymap/dist/layer.cjs +1 -0
- package/dist/keymap/dist/layer.js +1 -0
- package/dist/layout/box/{box.css?inline.cjs → box.css.cjs} +1 -1
- package/dist/layout/box/box.css.cjs.map +1 -0
- package/dist/layout/box/{box.css?inline.js → box.css.js} +1 -1
- package/dist/layout/box/box.css.js.map +1 -0
- package/dist/layout/grid/{grid.css?inline.cjs → grid.css.cjs} +1 -1
- package/dist/layout/grid/grid.css.cjs.map +1 -0
- package/dist/layout/grid/{grid.css?inline.js → grid.css.js} +1 -1
- package/dist/layout/grid/grid.css.js.map +1 -0
- package/dist/layout/grid-item/{grid-item.css?inline.cjs → grid-item.css.cjs} +1 -1
- package/dist/layout/grid-item/grid-item.css.cjs.map +1 -0
- package/dist/layout/grid-item/{grid-item.css?inline.js → grid-item.css.js} +1 -1
- package/dist/layout/grid-item/grid-item.css.js.map +1 -0
- package/dist/layout/navbar/navbar.css.cjs +2 -0
- package/dist/layout/navbar/navbar.css.cjs.map +1 -0
- package/dist/layout/navbar/navbar.css.js +6 -0
- package/dist/layout/navbar/navbar.css.js.map +1 -0
- package/dist/layout/navbar/navbar.d.ts.map +1 -1
- package/dist/layout/sidebar/{sidebar-group.css?inline.cjs → sidebar-group.css.cjs} +1 -1
- package/dist/layout/sidebar/sidebar-group.css.cjs.map +1 -0
- package/dist/layout/sidebar/{sidebar-group.css?inline.js → sidebar-group.css.js} +1 -1
- package/dist/layout/sidebar/sidebar-group.css.js.map +1 -0
- package/dist/layout/sidebar/{sidebar-item.css?inline.cjs → sidebar-item.css.cjs} +1 -1
- package/dist/layout/sidebar/sidebar-item.css.cjs.map +1 -0
- package/dist/layout/sidebar/{sidebar-item.css?inline.js → sidebar-item.css.js} +1 -1
- package/dist/layout/sidebar/sidebar-item.css.js.map +1 -0
- package/dist/layout/sidebar/sidebar.css.cjs +2 -0
- package/dist/layout/sidebar/sidebar.css.cjs.map +1 -0
- package/dist/layout/sidebar/sidebar.css.js +6 -0
- package/dist/layout/sidebar/sidebar.css.js.map +1 -0
- package/dist/layout/sidebar/sidebar.d.ts.map +1 -1
- package/dist/menu.cjs +5 -5
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.js +85 -85
- package/dist/menu.js.map +1 -1
- package/dist/navbar.cjs +15 -15
- package/dist/navbar.cjs.map +1 -1
- package/dist/navbar.js +127 -127
- package/dist/navbar.js.map +1 -1
- package/dist/number-input.cjs +11 -11
- package/dist/number-input.cjs.map +1 -1
- package/dist/number-input.js +69 -69
- package/dist/number-input.js.map +1 -1
- package/dist/ore/dist/_dev.cjs.map +1 -1
- package/dist/ore/dist/_dev.js.map +1 -1
- package/dist/ore/dist/base-element.cjs +1 -1
- package/dist/ore/dist/base-element.cjs.map +1 -1
- package/dist/ore/dist/base-element.js +37 -35
- package/dist/ore/dist/base-element.js.map +1 -1
- package/dist/ore/dist/context.cjs +1 -1
- package/dist/ore/dist/context.cjs.map +1 -1
- package/dist/ore/dist/context.js +6 -33
- package/dist/ore/dist/context.js.map +1 -1
- package/dist/ore/dist/define.cjs.map +1 -1
- package/dist/ore/dist/define.js.map +1 -1
- package/dist/ore/dist/directives/raw.cjs +1 -1
- package/dist/ore/dist/directives/raw.cjs.map +1 -1
- package/dist/ore/dist/directives/raw.js +20 -17
- package/dist/ore/dist/directives/raw.js.map +1 -1
- package/dist/ore/dist/directives/when.cjs +1 -1
- package/dist/ore/dist/directives/when.cjs.map +1 -1
- package/dist/ore/dist/directives/when.js +29 -24
- package/dist/ore/dist/directives/when.js.map +1 -1
- package/dist/ore/dist/errors.cjs +2 -2
- package/dist/ore/dist/errors.cjs.map +1 -1
- package/dist/ore/dist/errors.js +12 -3
- package/dist/ore/dist/errors.js.map +1 -1
- package/dist/ore/dist/forms/context.cjs +2 -0
- package/dist/ore/dist/forms/context.cjs.map +1 -0
- package/dist/ore/dist/forms/context.js +6 -0
- package/dist/ore/dist/forms/context.js.map +1 -0
- package/dist/ore/dist/forms/field.cjs +2 -0
- package/dist/ore/dist/forms/field.cjs.map +1 -0
- package/dist/ore/dist/forms/field.js +35 -0
- package/dist/ore/dist/forms/field.js.map +1 -0
- package/dist/ore/dist/forms.cjs +1 -0
- package/dist/ore/dist/forms.js +3 -0
- package/dist/ore/dist/props.cjs +1 -1
- package/dist/ore/dist/props.cjs.map +1 -1
- package/dist/ore/dist/props.js +29 -27
- package/dist/ore/dist/props.js.map +1 -1
- package/dist/ore/dist/runtime.cjs +1 -1
- package/dist/ore/dist/runtime.cjs.map +1 -1
- package/dist/ore/dist/runtime.js +13 -23
- package/dist/ore/dist/runtime.js.map +1 -1
- package/dist/ore/dist/testing/render-hook.cjs +1 -1
- package/dist/ore/dist/testing/render-hook.js +0 -1
- package/dist/ore/dist/utils/dom.cjs +1 -1
- package/dist/ore/dist/utils/dom.cjs.map +1 -1
- package/dist/ore/dist/utils/dom.js +2 -6
- package/dist/ore/dist/utils/dom.js.map +1 -1
- package/dist/otp-input.cjs +9 -9
- package/dist/otp-input.cjs.map +1 -1
- package/dist/otp-input.js +70 -68
- package/dist/otp-input.js.map +1 -1
- package/dist/overlay/command-palette/command-palette-items.cjs +2 -0
- package/dist/overlay/command-palette/command-palette-items.cjs.map +1 -0
- package/dist/overlay/command-palette/command-palette-items.d.ts +22 -0
- package/dist/overlay/command-palette/command-palette-items.d.ts.map +1 -0
- package/dist/overlay/command-palette/command-palette-items.js +55 -0
- package/dist/overlay/command-palette/command-palette-items.js.map +1 -0
- package/dist/overlay/command-palette/command-palette.css.cjs +2 -0
- package/dist/overlay/command-palette/command-palette.css.cjs.map +1 -0
- package/dist/overlay/command-palette/command-palette.css.js +6 -0
- package/dist/overlay/command-palette/command-palette.css.js.map +1 -0
- package/dist/overlay/command-palette/command-palette.d.ts +72 -0
- package/dist/overlay/command-palette/command-palette.d.ts.map +1 -0
- package/dist/overlay/command-palette/command-palette.types.d.ts +76 -0
- package/dist/overlay/command-palette/command-palette.types.d.ts.map +1 -0
- package/dist/overlay/dialog/{dialog.css?inline.cjs → dialog.css.cjs} +1 -1
- package/dist/overlay/dialog/dialog.css.cjs.map +1 -0
- package/dist/overlay/dialog/{dialog.css?inline.js → dialog.css.js} +1 -1
- package/dist/overlay/dialog/dialog.css.js.map +1 -0
- package/dist/overlay/drawer/{drawer.css?inline.cjs → drawer.css.cjs} +1 -1
- package/dist/overlay/drawer/drawer.css.cjs.map +1 -0
- package/dist/overlay/drawer/{drawer.css?inline.js → drawer.css.js} +1 -1
- package/dist/overlay/drawer/drawer.css.js.map +1 -0
- package/dist/overlay/drawer/drawer.d.ts.map +1 -1
- package/dist/overlay/index.d.ts +2 -0
- package/dist/overlay/index.d.ts.map +1 -1
- package/dist/overlay/menu/{menu-item.css?inline.cjs → menu-item.css.cjs} +1 -1
- package/dist/overlay/menu/menu-item.css.cjs.map +1 -0
- package/dist/overlay/menu/{menu-item.css?inline.js → menu-item.css.js} +1 -1
- package/dist/overlay/menu/menu-item.css.js.map +1 -0
- package/dist/overlay/menu/{menu-separator.css?inline.cjs → menu-separator.css.cjs} +1 -1
- package/dist/overlay/menu/menu-separator.css.cjs.map +1 -0
- package/dist/overlay/menu/{menu-separator.css?inline.js → menu-separator.css.js} +1 -1
- package/dist/overlay/menu/menu-separator.css.js.map +1 -0
- package/dist/overlay/menu/menu.css.cjs +2 -0
- package/dist/overlay/menu/menu.css.cjs.map +1 -0
- package/dist/overlay/menu/menu.css.js +6 -0
- package/dist/overlay/menu/menu.css.js.map +1 -0
- package/dist/overlay/menu/menu.d.ts.map +1 -1
- package/dist/overlay/popover/{popover.css?inline.cjs → popover.css.cjs} +1 -1
- package/dist/overlay/popover/popover.css.cjs.map +1 -0
- package/dist/overlay/popover/{popover.css?inline.js → popover.css.js} +1 -1
- package/dist/overlay/popover/popover.css.js.map +1 -0
- package/dist/overlay/popover/popover.d.ts.map +1 -1
- package/dist/overlay/tooltip/{tooltip.css?inline.cjs → tooltip.css.cjs} +1 -1
- package/dist/overlay/tooltip/tooltip.css.cjs.map +1 -0
- package/dist/overlay/tooltip/{tooltip.css?inline.js → tooltip.css.js} +1 -1
- package/dist/overlay/tooltip/tooltip.css.js.map +1 -0
- package/dist/pagination.cjs +12 -12
- package/dist/pagination.cjs.map +1 -1
- package/dist/pagination.js +39 -38
- package/dist/pagination.js.map +1 -1
- package/dist/password-strength.cjs +8 -8
- package/dist/password-strength.cjs.map +1 -1
- package/dist/password-strength.js +34 -34
- package/dist/password-strength.js.map +1 -1
- package/dist/popover.cjs +4 -4
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.js +30 -30
- package/dist/popover.js.map +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.cjs.map +1 -1
- package/dist/progress.js +30 -30
- package/dist/progress.js.map +1 -1
- package/dist/radio-group.cjs +11 -11
- package/dist/radio-group.cjs.map +1 -1
- package/dist/radio-group.js +67 -63
- package/dist/radio-group.js.map +1 -1
- package/dist/radio.cjs +4 -4
- package/dist/radio.cjs.map +1 -1
- package/dist/radio.js +69 -67
- package/dist/radio.js.map +1 -1
- package/dist/rating.cjs +4 -4
- package/dist/rating.cjs.map +1 -1
- package/dist/rating.js +57 -55
- package/dist/rating.js.map +1 -1
- package/dist/refine.cjs +753 -623
- package/dist/refine.cjs.map +1 -1
- package/dist/refine.iife.js +742 -612
- package/dist/refine.iife.js.map +1 -1
- package/dist/refine.js +777 -647
- package/dist/refine.js.map +1 -1
- package/dist/select.cjs +37 -37
- package/dist/select.cjs.map +1 -1
- package/dist/select.js +130 -128
- package/dist/select.js.map +1 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.cjs.map +1 -1
- package/dist/separator.js +1 -1
- package/dist/sidebar.cjs +22 -22
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.js +135 -135
- package/dist/sidebar.js.map +1 -1
- package/dist/skeleton.cjs +2 -2
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.js +28 -28
- package/dist/skeleton.js.map +1 -1
- package/dist/slider.cjs +13 -13
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.js +142 -140
- package/dist/slider.js.map +1 -1
- package/dist/styles/mixins/animation.css.cjs +0 -3
- package/dist/styles/mixins/animation.css.cjs.map +1 -1
- package/dist/styles/mixins/animation.css.d.ts +12 -4
- package/dist/styles/mixins/animation.css.d.ts.map +1 -1
- package/dist/styles/mixins/animation.css.js +0 -3
- package/dist/styles/mixins/animation.css.js.map +1 -1
- package/dist/styles/mixins/variants.css.cjs.map +1 -1
- package/dist/styles/mixins/variants.css.d.ts +7 -2
- package/dist/styles/mixins/variants.css.d.ts.map +1 -1
- package/dist/styles/mixins/variants.css.js.map +1 -1
- package/dist/styles/theme.css +341 -132
- package/dist/switch.cjs +4 -4
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.js +35 -33
- package/dist/switch.js.map +1 -1
- package/dist/tab-item.cjs +5 -5
- package/dist/tab-item.cjs.map +1 -1
- package/dist/tab-item.js +25 -25
- package/dist/tab-item.js.map +1 -1
- package/dist/tab-panel.cjs +6 -6
- package/dist/tab-panel.cjs.map +1 -1
- package/dist/tab-panel.js +24 -24
- package/dist/tab-panel.js.map +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.cjs.map +1 -1
- package/dist/table.js +36 -35
- package/dist/table.js.map +1 -1
- package/dist/tabs.cjs +3 -3
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.js +61 -61
- package/dist/tabs.js.map +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.cjs.map +1 -1
- package/dist/text.js +16 -16
- package/dist/text.js.map +1 -1
- package/dist/textarea.cjs +15 -15
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.js +67 -65
- package/dist/textarea.js.map +1 -1
- package/dist/time-picker.cjs +31 -31
- package/dist/time-picker.cjs.map +1 -1
- package/dist/time-picker.js +115 -113
- package/dist/time-picker.js.map +1 -1
- package/dist/toast.cjs +14 -14
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.js +85 -85
- package/dist/toast.js.map +1 -1
- package/dist/tooltip.cjs +5 -5
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.js +55 -55
- package/dist/tooltip.js.map +1 -1
- package/dist/typing-indicator.cjs +8 -0
- package/dist/typing-indicator.cjs.map +1 -0
- package/dist/typing-indicator.js +49 -0
- package/dist/typing-indicator.js.map +1 -0
- package/package.json +31 -8
- package/dist/content/avatar/avatar-group.css?inline.cjs.map +0 -1
- package/dist/content/avatar/avatar-group.css?inline.js.map +0 -1
- package/dist/content/avatar/avatar.css?inline.cjs.map +0 -1
- package/dist/content/avatar/avatar.css?inline.js.map +0 -1
- package/dist/content/breadcrumb/breadcrumb-item.css?inline.cjs.map +0 -1
- package/dist/content/breadcrumb/breadcrumb-item.css?inline.js.map +0 -1
- package/dist/content/breadcrumb/breadcrumb.css?inline.cjs.map +0 -1
- package/dist/content/breadcrumb/breadcrumb.css?inline.js.map +0 -1
- package/dist/content/card/card.css?inline.cjs +0 -2
- package/dist/content/card/card.css?inline.cjs.map +0 -1
- package/dist/content/card/card.css?inline.js +0 -6
- package/dist/content/card/card.css?inline.js.map +0 -1
- package/dist/content/carousel/carousel-slide.css?inline.cjs.map +0 -1
- package/dist/content/carousel/carousel-slide.css?inline.js.map +0 -1
- package/dist/content/carousel/carousel.css?inline.cjs.map +0 -1
- package/dist/content/carousel/carousel.css?inline.js.map +0 -1
- package/dist/content/code-window/code-window.css?inline.cjs.map +0 -1
- package/dist/content/code-window/code-window.css?inline.js.map +0 -1
- package/dist/content/copy-command/copy-command.css?inline.cjs.map +0 -1
- package/dist/content/copy-command/copy-command.css?inline.js.map +0 -1
- package/dist/content/icon/icon.css?inline.cjs +0 -2
- package/dist/content/icon/icon.css?inline.cjs.map +0 -1
- package/dist/content/icon/icon.css?inline.js +0 -6
- package/dist/content/icon/icon.css?inline.js.map +0 -1
- package/dist/content/pagination/pagination.css?inline.cjs.map +0 -1
- package/dist/content/pagination/pagination.css?inline.js.map +0 -1
- package/dist/content/separator/separator.css?inline.cjs.map +0 -1
- package/dist/content/separator/separator.css?inline.js.map +0 -1
- package/dist/content/table/table.css?inline.cjs.map +0 -1
- package/dist/content/table/table.css?inline.js.map +0 -1
- package/dist/content/text/text.css?inline.cjs.map +0 -1
- package/dist/content/text/text.css?inline.js.map +0 -1
- package/dist/disclosure/accordion/accordion.css?inline.cjs.map +0 -1
- package/dist/disclosure/accordion/accordion.css?inline.js.map +0 -1
- package/dist/disclosure/accordion-item/accordion-item.css?inline.cjs.map +0 -1
- package/dist/disclosure/accordion-item/accordion-item.css?inline.js.map +0 -1
- package/dist/disclosure/tab-item/tab-item.css?inline.cjs.map +0 -1
- package/dist/disclosure/tab-item/tab-item.css?inline.js.map +0 -1
- package/dist/disclosure/tab-panel/tab-panel.css?inline.cjs.map +0 -1
- package/dist/disclosure/tab-panel/tab-panel.css?inline.js.map +0 -1
- package/dist/disclosure/tabs/tabs.css?inline.cjs.map +0 -1
- package/dist/disclosure/tabs/tabs.css?inline.js.map +0 -1
- package/dist/feedback/alert/alert.css?inline.cjs.map +0 -1
- package/dist/feedback/alert/alert.css?inline.js.map +0 -1
- package/dist/feedback/async/async.css?inline.cjs.map +0 -1
- package/dist/feedback/async/async.css?inline.js.map +0 -1
- package/dist/feedback/badge/badge.css?inline.cjs.map +0 -1
- package/dist/feedback/badge/badge.css?inline.js.map +0 -1
- package/dist/feedback/chip/chip.css?inline.cjs.map +0 -1
- package/dist/feedback/chip/chip.css?inline.js.map +0 -1
- package/dist/feedback/password-strength/password-strength.css?inline.cjs.map +0 -1
- package/dist/feedback/password-strength/password-strength.css?inline.js.map +0 -1
- package/dist/feedback/progress/progress.css?inline.cjs.map +0 -1
- package/dist/feedback/progress/progress.css?inline.js.map +0 -1
- package/dist/feedback/skeleton/skeleton.css?inline.cjs.map +0 -1
- package/dist/feedback/skeleton/skeleton.css?inline.js.map +0 -1
- package/dist/feedback/toast/toast.css?inline.cjs +0 -2
- package/dist/feedback/toast/toast.css?inline.cjs.map +0 -1
- package/dist/feedback/toast/toast.css?inline.js +0 -6
- package/dist/feedback/toast/toast.css?inline.js.map +0 -1
- package/dist/inputs/button/button.css?inline.cjs +0 -2
- package/dist/inputs/button/button.css?inline.cjs.map +0 -1
- package/dist/inputs/button/button.css?inline.js +0 -6
- package/dist/inputs/button/button.css?inline.js.map +0 -1
- package/dist/inputs/button-group/button-group.css?inline.cjs.map +0 -1
- package/dist/inputs/button-group/button-group.css?inline.js.map +0 -1
- package/dist/inputs/calendar/calendar.css?inline.cjs.map +0 -1
- package/dist/inputs/calendar/calendar.css?inline.js.map +0 -1
- package/dist/inputs/checkbox/checkbox.css?inline.cjs.map +0 -1
- package/dist/inputs/checkbox/checkbox.css?inline.js.map +0 -1
- package/dist/inputs/checkbox-group/checkbox-group.css?inline.cjs.map +0 -1
- package/dist/inputs/checkbox-group/checkbox-group.css?inline.js.map +0 -1
- package/dist/inputs/combobox/combobox.css?inline.cjs.map +0 -1
- package/dist/inputs/combobox/combobox.css?inline.js.map +0 -1
- package/dist/inputs/datagrid/datagrid.css?inline.cjs.map +0 -1
- package/dist/inputs/datagrid/datagrid.css?inline.js.map +0 -1
- package/dist/inputs/date-picker/date-picker.css?inline.cjs.map +0 -1
- package/dist/inputs/date-picker/date-picker.css?inline.js.map +0 -1
- package/dist/inputs/file-input/file-input.css?inline.cjs +0 -2
- package/dist/inputs/file-input/file-input.css?inline.cjs.map +0 -1
- package/dist/inputs/file-input/file-input.css?inline.js +0 -6
- package/dist/inputs/file-input/file-input.css?inline.js.map +0 -1
- package/dist/inputs/form/form.css?inline.cjs.map +0 -1
- package/dist/inputs/form/form.css?inline.js.map +0 -1
- package/dist/inputs/input/input.css?inline.cjs +0 -2
- package/dist/inputs/input/input.css?inline.cjs.map +0 -1
- package/dist/inputs/input/input.css?inline.js +0 -6
- package/dist/inputs/input/input.css?inline.js.map +0 -1
- package/dist/inputs/number-input/number-input.css?inline.cjs.map +0 -1
- package/dist/inputs/number-input/number-input.css?inline.js.map +0 -1
- package/dist/inputs/otp-input/otp-input.css?inline.cjs.map +0 -1
- package/dist/inputs/otp-input/otp-input.css?inline.js.map +0 -1
- package/dist/inputs/radio/radio.css?inline.cjs.map +0 -1
- package/dist/inputs/radio/radio.css?inline.js.map +0 -1
- package/dist/inputs/radio-group/radio-group.css?inline.cjs.map +0 -1
- package/dist/inputs/radio-group/radio-group.css?inline.js.map +0 -1
- package/dist/inputs/rating/rating.css?inline.cjs.map +0 -1
- package/dist/inputs/rating/rating.css?inline.js.map +0 -1
- package/dist/inputs/select/select.css?inline.cjs.map +0 -1
- package/dist/inputs/select/select.css?inline.js.map +0 -1
- package/dist/inputs/slider/slider.css?inline.cjs.map +0 -1
- package/dist/inputs/slider/slider.css?inline.js.map +0 -1
- package/dist/inputs/switch/switch.css?inline.cjs.map +0 -1
- package/dist/inputs/switch/switch.css?inline.js.map +0 -1
- package/dist/inputs/textarea/textarea.css?inline.cjs +0 -2
- package/dist/inputs/textarea/textarea.css?inline.cjs.map +0 -1
- package/dist/inputs/textarea/textarea.css?inline.js +0 -6
- package/dist/inputs/textarea/textarea.css?inline.js.map +0 -1
- package/dist/inputs/time-picker/time-picker.css?inline.cjs.map +0 -1
- package/dist/inputs/time-picker/time-picker.css?inline.js.map +0 -1
- package/dist/layout/box/box.css?inline.cjs.map +0 -1
- package/dist/layout/box/box.css?inline.js.map +0 -1
- package/dist/layout/grid/grid.css?inline.cjs.map +0 -1
- package/dist/layout/grid/grid.css?inline.js.map +0 -1
- package/dist/layout/grid-item/grid-item.css?inline.cjs.map +0 -1
- package/dist/layout/grid-item/grid-item.css?inline.js.map +0 -1
- package/dist/layout/navbar/navbar.css?inline.cjs +0 -2
- package/dist/layout/navbar/navbar.css?inline.cjs.map +0 -1
- package/dist/layout/navbar/navbar.css?inline.js +0 -6
- package/dist/layout/navbar/navbar.css?inline.js.map +0 -1
- package/dist/layout/sidebar/sidebar-group.css?inline.cjs.map +0 -1
- package/dist/layout/sidebar/sidebar-group.css?inline.js.map +0 -1
- package/dist/layout/sidebar/sidebar-item.css?inline.cjs.map +0 -1
- package/dist/layout/sidebar/sidebar-item.css?inline.js.map +0 -1
- package/dist/layout/sidebar/sidebar.css?inline.cjs +0 -2
- package/dist/layout/sidebar/sidebar.css?inline.cjs.map +0 -1
- package/dist/layout/sidebar/sidebar.css?inline.js +0 -6
- package/dist/layout/sidebar/sidebar.css?inline.js.map +0 -1
- package/dist/ore/dist/aria.cjs +0 -2
- package/dist/ore/dist/aria.cjs.map +0 -1
- package/dist/ore/dist/aria.js +0 -37
- package/dist/ore/dist/aria.js.map +0 -1
- package/dist/ore/dist/context-bag.cjs +0 -2
- package/dist/ore/dist/context-bag.cjs.map +0 -1
- package/dist/ore/dist/context-bag.js +0 -28
- package/dist/ore/dist/context-bag.js.map +0 -1
- package/dist/ore/dist/host-bind.cjs +0 -2
- package/dist/ore/dist/host-bind.cjs.map +0 -1
- package/dist/ore/dist/host-bind.js +0 -60
- package/dist/ore/dist/host-bind.js.map +0 -1
- package/dist/ore/dist/slots.cjs +0 -2
- package/dist/ore/dist/slots.cjs.map +0 -1
- package/dist/ore/dist/slots.js +0 -61
- package/dist/ore/dist/slots.js.map +0 -1
- package/dist/ore/dist/utils/aria.cjs +0 -2
- package/dist/ore/dist/utils/aria.cjs.map +0 -1
- package/dist/ore/dist/utils/aria.js +0 -6
- package/dist/ore/dist/utils/aria.js.map +0 -1
- package/dist/ore/dist/utils/emit.cjs +0 -2
- package/dist/ore/dist/utils/emit.cjs.map +0 -1
- package/dist/ore/dist/utils/emit.js +0 -16
- package/dist/ore/dist/utils/emit.js.map +0 -1
- package/dist/overlay/dialog/dialog.css?inline.cjs.map +0 -1
- package/dist/overlay/dialog/dialog.css?inline.js.map +0 -1
- package/dist/overlay/drawer/drawer.css?inline.cjs.map +0 -1
- package/dist/overlay/drawer/drawer.css?inline.js.map +0 -1
- package/dist/overlay/menu/menu-item.css?inline.cjs.map +0 -1
- package/dist/overlay/menu/menu-item.css?inline.js.map +0 -1
- package/dist/overlay/menu/menu-separator.css?inline.cjs.map +0 -1
- package/dist/overlay/menu/menu-separator.css?inline.js.map +0 -1
- package/dist/overlay/menu/menu.css?inline.cjs +0 -2
- package/dist/overlay/menu/menu.css?inline.cjs.map +0 -1
- package/dist/overlay/menu/menu.css?inline.js +0 -6
- package/dist/overlay/menu/menu.css?inline.js.map +0 -1
- package/dist/overlay/popover/popover.css?inline.cjs.map +0 -1
- package/dist/overlay/popover/popover.css?inline.js.map +0 -1
- package/dist/overlay/tooltip/tooltip.css?inline.cjs.map +0 -1
- package/dist/overlay/tooltip/tooltip.css?inline.js.map +0 -1
package/dist/carousel.js
CHANGED
|
@@ -1,163 +1,163 @@
|
|
|
1
1
|
import { warn as e } from "./_dev.js";
|
|
2
2
|
import { createSwipeControl as t } from "./headless/swipe.js";
|
|
3
3
|
import { announce as n } from "./headless/announcer.js";
|
|
4
|
-
import r from "./content/carousel/carousel.css
|
|
4
|
+
import r from "./content/carousel/carousel.css.js";
|
|
5
5
|
import { CAROUSEL_SLIDE_TAG as i } from "./content/carousel/carousel-slide.js";
|
|
6
|
-
import {
|
|
7
|
-
import { computed as
|
|
6
|
+
import { bind as a, define as o, getHost as s, html as c, onMounted as l, prop as u, useEmit as d } from "@vielzeug/ore";
|
|
7
|
+
import { computed as f, signal as p, watch as m } from "@vielzeug/ripple";
|
|
8
8
|
//#region src/content/carousel/carousel.ts
|
|
9
|
-
var
|
|
9
|
+
var h = "ore-carousel", g = (e, t) => {
|
|
10
10
|
let n = e.length;
|
|
11
11
|
e.forEach((e, r) => {
|
|
12
12
|
let i = r === t;
|
|
13
13
|
e.toggleAttribute("data-active", i), e.setAttribute("aria-hidden", String(!i)), e.setAttribute("aria-label", e.getAttribute("aria-label") ?? `Slide ${r + 1} of ${n}`), e.removeAttribute("data-gallery-visible"), e.toggleAttribute("data-before", r < t), e.toggleAttribute("data-after", r > t);
|
|
14
14
|
});
|
|
15
|
-
},
|
|
15
|
+
}, _ = (e, t) => {
|
|
16
16
|
let n = e.length;
|
|
17
17
|
e.forEach((e, r) => {
|
|
18
18
|
let i = r === t;
|
|
19
19
|
e.toggleAttribute("data-active", i), e.setAttribute("aria-hidden", String(!i)), e.setAttribute("aria-label", e.getAttribute("aria-label") ?? `Slide ${r + 1} of ${n}`), e.removeAttribute("data-gallery-visible"), e.removeAttribute("data-before"), e.removeAttribute("data-after");
|
|
20
20
|
});
|
|
21
|
-
},
|
|
21
|
+
}, v = (e, t) => {
|
|
22
22
|
let n = e.length;
|
|
23
23
|
e.forEach((e, r) => {
|
|
24
24
|
let i = r === t, a = t > 0 && r === t - 1, o = t < n - 1 && r === t + 1;
|
|
25
25
|
e.toggleAttribute("data-active", i), e.setAttribute("aria-hidden", String(!i)), e.setAttribute("aria-label", e.getAttribute("aria-label") ?? `Slide ${r + 1} of ${n}`), e.removeAttribute("data-before"), e.removeAttribute("data-after"), e.toggleAttribute("data-gallery-visible", i || a || o);
|
|
26
26
|
});
|
|
27
|
-
},
|
|
27
|
+
}, y = (e, t) => {
|
|
28
28
|
e.forEach((e, n) => {
|
|
29
29
|
e.toggleAttribute("data-active", n === t), e.setAttribute("aria-hidden", "false"), e.removeAttribute("data-before"), e.removeAttribute("data-after"), e.removeAttribute("data-gallery-visible");
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
o(h, {
|
|
33
33
|
props: {
|
|
34
|
-
autoplay:
|
|
35
|
-
"autoplay-interval":
|
|
36
|
-
color:
|
|
37
|
-
label:
|
|
38
|
-
loop:
|
|
39
|
-
"marquee-duration":
|
|
40
|
-
orientation:
|
|
41
|
-
"show-controls":
|
|
42
|
-
"show-indicators":
|
|
43
|
-
"slide-index":
|
|
44
|
-
variant:
|
|
34
|
+
autoplay: u.bool(!1),
|
|
35
|
+
"autoplay-interval": u.number(5e3),
|
|
36
|
+
color: u.string(),
|
|
37
|
+
label: u.string("Carousel"),
|
|
38
|
+
loop: u.bool(!0),
|
|
39
|
+
"marquee-duration": u.number(10),
|
|
40
|
+
orientation: u.string("horizontal"),
|
|
41
|
+
"show-controls": u.bool(!0),
|
|
42
|
+
"show-indicators": u.bool(!0),
|
|
43
|
+
"slide-index": u.number(0),
|
|
44
|
+
variant: u.string("default")
|
|
45
45
|
},
|
|
46
|
-
setup(r
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
let r =
|
|
46
|
+
setup(r) {
|
|
47
|
+
let i = s(), o = d(), u = p(r["slide-index"].value ?? 0), h = f(() => r.variant.value === "marquee"), b = null, x = Array.from(i.querySelectorAll(":scope > ore-carousel-slide")), S = p(x.length), C = () => {
|
|
48
|
+
x = Array.from(i.querySelectorAll(":scope > ore-carousel-slide")), S.value = x.length;
|
|
49
|
+
}, w = f(() => r.orientation.value !== "vertical"), T = f(() => r.loop.value !== !1), E = f(() => r["show-controls"].value !== !1), D = f(() => r["show-indicators"].value !== !1), O = f(() => T.value || u.value > 0), k = f(() => T.value || u.value < S.value - 1), A = null, j = (e, t = !0) => {
|
|
50
|
+
let r = S.value;
|
|
51
51
|
if (r === 0) return;
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
typeof e == "number" && e !==
|
|
52
|
+
let a = T.value ? (e % r + r) % r : Math.max(0, Math.min(e, r - 1));
|
|
53
|
+
a !== u.value && (u.value = a, i.setAttribute("slide-index", String(a)), o("change", { index: a }), A?.seekTo(a, x), t && n(x[a]?.getAttribute("aria-label") ?? `Slide ${a + 1} of ${r}`));
|
|
54
|
+
}, M = () => j(u.value - 1), N = () => j(u.value + 1);
|
|
55
|
+
m(r["slide-index"], (e) => {
|
|
56
|
+
typeof e == "number" && e !== u.value && j(e, !1);
|
|
57
57
|
});
|
|
58
|
-
let
|
|
58
|
+
let P = () => {
|
|
59
59
|
let e = r.variant.value ?? "default", t = r.orientation.value ?? "horizontal";
|
|
60
|
-
|
|
60
|
+
x.forEach((n) => {
|
|
61
61
|
n.setAttribute("data-variant", e), n.setAttribute("data-orientation", t);
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
m(f(() => ({
|
|
65
65
|
orientation: r.orientation.value,
|
|
66
66
|
variant: r.variant.value
|
|
67
|
-
})),
|
|
68
|
-
let
|
|
69
|
-
default:
|
|
70
|
-
fade:
|
|
71
|
-
filmstrip:
|
|
72
|
-
gallery:
|
|
73
|
-
marquee:
|
|
74
|
-
},
|
|
67
|
+
})), P, { immediate: !0 });
|
|
68
|
+
let F = {
|
|
69
|
+
default: g,
|
|
70
|
+
fade: g,
|
|
71
|
+
filmstrip: _,
|
|
72
|
+
gallery: v,
|
|
73
|
+
marquee: y
|
|
74
|
+
}, I = () => {
|
|
75
75
|
let e = r.variant.value ?? "default";
|
|
76
|
-
|
|
76
|
+
F[e](x, u.value);
|
|
77
77
|
};
|
|
78
|
-
u
|
|
79
|
-
let
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
78
|
+
m(u, I, { immediate: !0 });
|
|
79
|
+
let L = () => {
|
|
80
|
+
b === null && (b = setInterval(N, r["autoplay-interval"].value ?? 5e3));
|
|
81
|
+
}, R = () => {
|
|
82
|
+
b !== null && (clearInterval(b), b = null);
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
m(f(() => ({
|
|
85
85
|
enabled: r.autoplay.value,
|
|
86
86
|
interval: r["autoplay-interval"].value
|
|
87
87
|
})), ({ enabled: e }) => {
|
|
88
|
-
|
|
88
|
+
R(), e && L();
|
|
89
89
|
});
|
|
90
|
-
let
|
|
91
|
-
let t =
|
|
92
|
-
e.key === n ? (e.preventDefault(),
|
|
93
|
-
},
|
|
94
|
-
axis: () =>
|
|
90
|
+
let z = (e) => {
|
|
91
|
+
let t = w.value, n = t ? "ArrowLeft" : "ArrowUp", r = t ? "ArrowRight" : "ArrowDown";
|
|
92
|
+
e.key === n ? (e.preventDefault(), M()) : e.key === r ? (e.preventDefault(), N()) : e.key === "Home" ? (e.preventDefault(), j(0)) : e.key === "End" && (e.preventDefault(), j(S.value - 1));
|
|
93
|
+
}, B = t({
|
|
94
|
+
axis: () => w.value ? "x" : "y",
|
|
95
95
|
onCommit: (e) => {
|
|
96
|
-
e.distance < 0 ?
|
|
96
|
+
e.distance < 0 ? N() : M();
|
|
97
97
|
},
|
|
98
98
|
threshold: () => 48
|
|
99
99
|
});
|
|
100
|
-
|
|
100
|
+
a({
|
|
101
101
|
attr: {
|
|
102
102
|
"aria-label": () => r.label.value ?? "Carousel",
|
|
103
103
|
"aria-roledescription": () => "carousel",
|
|
104
104
|
orientation: () => r.orientation.value ?? "horizontal",
|
|
105
105
|
role: () => "region",
|
|
106
|
-
style: () => `touch-action:${
|
|
106
|
+
style: () => `touch-action:${w.value ? "pan-y" : "pan-x"}`,
|
|
107
107
|
variant: () => r.variant.value ?? "default"
|
|
108
108
|
},
|
|
109
109
|
on: {
|
|
110
110
|
focusin: () => {
|
|
111
|
-
|
|
111
|
+
R();
|
|
112
112
|
},
|
|
113
113
|
focusout: () => {
|
|
114
|
-
r.autoplay.value &&
|
|
114
|
+
r.autoplay.value && L();
|
|
115
115
|
},
|
|
116
|
-
keydown:
|
|
117
|
-
pointercancel: (e) =>
|
|
116
|
+
keydown: z,
|
|
117
|
+
pointercancel: (e) => B.handlePointerCancel(e),
|
|
118
118
|
pointerdown: (e) => {
|
|
119
|
-
e.composedPath().some((e) => e instanceof HTMLElement && (e.tagName === "BUTTON" || e.tagName === "ORE-BUTTON" || e.tagName === "ORE-PROGRESS")) ||
|
|
119
|
+
e.composedPath().some((e) => e instanceof HTMLElement && (e.tagName === "BUTTON" || e.tagName === "ORE-BUTTON" || e.tagName === "ORE-PROGRESS")) || B.handlePointerDown(e);
|
|
120
120
|
},
|
|
121
121
|
pointerenter: () => {
|
|
122
|
-
|
|
122
|
+
R();
|
|
123
123
|
},
|
|
124
124
|
pointerleave: () => {
|
|
125
|
-
r.autoplay.value &&
|
|
125
|
+
r.autoplay.value && L();
|
|
126
126
|
},
|
|
127
|
-
pointermove: (e) =>
|
|
128
|
-
pointerup: (e) =>
|
|
127
|
+
pointermove: (e) => B.handlePointerMove(e),
|
|
128
|
+
pointerup: (e) => B.handlePointerUp(e)
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
let
|
|
132
|
-
let n = r.orientation.value ?? "horizontal",
|
|
133
|
-
|
|
134
|
-
let o =
|
|
131
|
+
let V = (t) => {
|
|
132
|
+
let n = r.orientation.value ?? "horizontal", a = n !== "vertical";
|
|
133
|
+
h.value && r.loop.value === !1 && e("ore-carousel: loop=\"false\" on the marquee variant stops the scroll animation rather than disabling navigation wrap-around. Navigation in marquee always loops. This is different from loop=\"false\" on other variants.");
|
|
134
|
+
let o = x.map((e) => {
|
|
135
135
|
let r = e.cloneNode(!0);
|
|
136
136
|
return r.setAttribute("aria-hidden", "true"), r.setAttribute("data-variant", "marquee"), r.setAttribute("data-orientation", n), r.setAttribute("data-marquee-clone", ""), t.appendChild(r), r;
|
|
137
137
|
});
|
|
138
|
-
t.style.setProperty("--_marquee-duration", `${r["marquee-duration"].value ?? 10}s`),
|
|
138
|
+
t.style.setProperty("--_marquee-duration", `${r["marquee-duration"].value ?? 10}s`), T.value || t.style.setProperty("animation-iteration-count", "1");
|
|
139
139
|
let s = !1, c = () => {
|
|
140
140
|
s = !0, t.style.setProperty("animation-play-state", "paused");
|
|
141
141
|
}, l = () => {
|
|
142
142
|
s = !1, t.style.removeProperty("animation-play-state");
|
|
143
143
|
};
|
|
144
|
-
|
|
144
|
+
i.addEventListener("mouseenter", c), i.addEventListener("mouseleave", l);
|
|
145
145
|
let u = null;
|
|
146
146
|
return {
|
|
147
147
|
cleanup: () => {
|
|
148
|
-
u !== null && clearTimeout(u), u = null, o.forEach((e) => e.remove()), t.style.removeProperty("transition"), t.style.removeProperty("transform"), t.style.removeProperty("animation"), t.style.removeProperty("--_marquee-duration"), t.style.removeProperty("animation-iteration-count"), t.style.removeProperty("animation-delay"), t.style.removeProperty("animation-play-state"),
|
|
148
|
+
u !== null && clearTimeout(u), u = null, o.forEach((e) => e.remove()), t.style.removeProperty("transition"), t.style.removeProperty("transform"), t.style.removeProperty("animation"), t.style.removeProperty("--_marquee-duration"), t.style.removeProperty("animation-iteration-count"), t.style.removeProperty("animation-delay"), t.style.removeProperty("animation-play-state"), i.removeEventListener("mouseenter", c), i.removeEventListener("mouseleave", l);
|
|
149
149
|
},
|
|
150
150
|
seekTo: (e, n) => {
|
|
151
151
|
let o = n[e];
|
|
152
152
|
if (!o) return;
|
|
153
|
-
let c =
|
|
153
|
+
let c = a ? o.offsetLeft : o.offsetTop, l = a ? t.scrollWidth / 2 : t.scrollHeight / 2, d = r["marquee-duration"].value ?? 10, f = l > 0 ? -(c / l * d) : 0;
|
|
154
154
|
if (u !== null && (clearTimeout(u), u = null, t.style.removeProperty("transition")), l === 0) {
|
|
155
155
|
t.style.setProperty("animation-delay", `${f}s`), s || t.style.removeProperty("animation-play-state");
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
let p = parseFloat(getComputedStyle(
|
|
158
|
+
let p = parseFloat(getComputedStyle(i).getPropertyValue("--carousel-transition-duration") || "0.35") * 1e3 || 350, m = a ? `translateX(-${c}px)` : `translateY(-${c}px)`;
|
|
159
159
|
t.getBoundingClientRect();
|
|
160
|
-
let h = getComputedStyle(t).transform.match(/matrix\(([^)]+)\)/)?.[1].split(",").map(Number), g =
|
|
160
|
+
let h = getComputedStyle(t).transform.match(/matrix\(([^)]+)\)/)?.[1].split(",").map(Number), g = a ? h?.[4] ?? 0 : h?.[5] ?? 0, _ = a ? `translateX(${g}px)` : `translateY(${g}px)`;
|
|
161
161
|
t.style.setProperty("animation", "none"), t.style.setProperty("transform", _), requestAnimationFrame(() => {
|
|
162
162
|
t.style.setProperty("transition", `transform ${p}ms ease-in-out`), t.style.setProperty("transform", m), u = setTimeout(() => {
|
|
163
163
|
u = null, t.style.removeProperty("transition"), t.style.removeProperty("transform"), t.style.removeProperty("animation"), t.style.setProperty("animation-delay", `${f}s`), s && t.style.setProperty("animation-play-state", "paused");
|
|
@@ -166,25 +166,25 @@ a(d, {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
|
-
|
|
170
|
-
let e =
|
|
171
|
-
|
|
169
|
+
l(() => {
|
|
170
|
+
let e = i.shadowRoot, t = e.querySelector(".track"), n = e.querySelector("slot"), a = () => {
|
|
171
|
+
C(), P(), I(), h.value && (A?.cleanup(), A = V(t));
|
|
172
172
|
};
|
|
173
|
-
return n.addEventListener("slotchange",
|
|
173
|
+
return n.addEventListener("slotchange", a), m(f(() => ({
|
|
174
174
|
duration: r["marquee-duration"].value,
|
|
175
|
-
isMarquee:
|
|
175
|
+
isMarquee: h.value,
|
|
176
176
|
loop: r.loop.value,
|
|
177
177
|
orientation: r.orientation.value
|
|
178
178
|
})), ({ isMarquee: e }) => {
|
|
179
|
-
|
|
180
|
-
}, { immediate: !0 }), r.autoplay.value &&
|
|
181
|
-
|
|
179
|
+
A?.cleanup(), A = e ? V(t) : null;
|
|
180
|
+
}, { immediate: !0 }), r.autoplay.value && L(), () => {
|
|
181
|
+
R(), B.dispose(), n.removeEventListener("slotchange", a), A?.cleanup();
|
|
182
182
|
};
|
|
183
183
|
});
|
|
184
|
-
let
|
|
185
|
-
(
|
|
186
|
-
},
|
|
187
|
-
let n =
|
|
184
|
+
let H = (e) => {
|
|
185
|
+
(i.shadowRoot?.querySelector(`.indicator[data-index="${e}"]`))?.focus();
|
|
186
|
+
}, U = (e, t) => {
|
|
187
|
+
let n = S.value, r;
|
|
188
188
|
switch (e.key) {
|
|
189
189
|
case "ArrowDown":
|
|
190
190
|
case "ArrowRight":
|
|
@@ -202,8 +202,8 @@ a(d, {
|
|
|
202
202
|
break;
|
|
203
203
|
default: return;
|
|
204
204
|
}
|
|
205
|
-
e.preventDefault(),
|
|
206
|
-
},
|
|
205
|
+
e.preventDefault(), j(r), H(r);
|
|
206
|
+
}, W = () => E.value ? c`<div class="controls" part="controls">
|
|
207
207
|
<ore-button
|
|
208
208
|
class="nav-btn prev-btn"
|
|
209
209
|
part="prev-btn"
|
|
@@ -212,12 +212,12 @@ a(d, {
|
|
|
212
212
|
rounded
|
|
213
213
|
icon-only
|
|
214
214
|
aria-label="Previous slide"
|
|
215
|
-
:disabled=${() =>
|
|
215
|
+
:disabled=${() => O.value ? void 0 : !0}
|
|
216
216
|
@click=${(e) => {
|
|
217
|
-
e.stopPropagation(),
|
|
217
|
+
e.stopPropagation(), M();
|
|
218
218
|
}}>
|
|
219
219
|
<ore-icon
|
|
220
|
-
:name=${() =>
|
|
220
|
+
:name=${() => w.value ? "chevron-left" : "chevron-up"}
|
|
221
221
|
size="16"
|
|
222
222
|
stroke-width="2"
|
|
223
223
|
aria-hidden="true"></ore-icon>
|
|
@@ -230,51 +230,51 @@ a(d, {
|
|
|
230
230
|
rounded
|
|
231
231
|
icon-only
|
|
232
232
|
aria-label="Next slide"
|
|
233
|
-
:disabled=${() =>
|
|
233
|
+
:disabled=${() => k.value ? void 0 : !0}
|
|
234
234
|
@click=${(e) => {
|
|
235
|
-
e.stopPropagation(),
|
|
235
|
+
e.stopPropagation(), N();
|
|
236
236
|
}}>
|
|
237
237
|
<ore-icon
|
|
238
|
-
:name=${() =>
|
|
238
|
+
:name=${() => w.value ? "chevron-right" : "chevron-down"}
|
|
239
239
|
size="16"
|
|
240
240
|
stroke-width="2"
|
|
241
241
|
aria-hidden="true"></ore-icon>
|
|
242
242
|
</ore-button>
|
|
243
|
-
</div>` :
|
|
244
|
-
return
|
|
243
|
+
</div>` : c``;
|
|
244
|
+
return c`
|
|
245
245
|
<div class="track" part="track" :aria-live=${() => r.autoplay.value ? "off" : "polite"}>
|
|
246
246
|
<slot></slot>
|
|
247
247
|
</div>
|
|
248
248
|
|
|
249
|
-
${() =>
|
|
250
|
-
${() => Array.from({ length:
|
|
249
|
+
${() => D.value && S.value > 1 && !h.value ? c`<div class="indicators" part="indicators" role="tablist" aria-label="Slide indicators">
|
|
250
|
+
${() => Array.from({ length: S.value }, (e, t) => c`<button
|
|
251
251
|
type="button"
|
|
252
252
|
role="tab"
|
|
253
253
|
data-index="${t}"
|
|
254
|
-
:class=${() => `indicator${!
|
|
255
|
-
:aria-selected=${() => String(!
|
|
256
|
-
:tabindex=${() => !
|
|
254
|
+
:class=${() => `indicator${!h.value && t === u.value ? " indicator-active" : ""}`}
|
|
255
|
+
:aria-selected=${() => String(!h.value && t === u.value)}
|
|
256
|
+
:tabindex=${() => !h.value && t === u.value ? "0" : "-1"}
|
|
257
257
|
aria-label="${`Go to slide ${t + 1}`}"
|
|
258
|
-
@click=${() =>
|
|
259
|
-
@keydown=${(e) =>
|
|
258
|
+
@click=${() => j(t)}
|
|
259
|
+
@keydown=${(e) => U(e, t)}>
|
|
260
260
|
<ore-progress
|
|
261
261
|
aria-hidden="true"
|
|
262
262
|
tabindex="-1"
|
|
263
263
|
:color=${() => r.color.value}
|
|
264
|
-
:type=${() =>
|
|
265
|
-
:value=${() => !
|
|
264
|
+
:type=${() => w.value ? "linear" : "vertical"}
|
|
265
|
+
:value=${() => !h.value && t === u.value ? 100 : 0}
|
|
266
266
|
:style=${() => {
|
|
267
|
-
let e =
|
|
268
|
-
return `--carousel-timeout:${r["autoplay-interval"].value ?? 5e3};--carousel-animation-name:${!
|
|
267
|
+
let e = w.value ? "carousel-fill" : "carousel-fill-v";
|
|
268
|
+
return `--carousel-timeout:${r["autoplay-interval"].value ?? 5e3};--carousel-animation-name:${!h.value && t === u.value && r.autoplay.value ? e : "none"}`;
|
|
269
269
|
}}></ore-progress>
|
|
270
270
|
</button>`)}
|
|
271
|
-
${
|
|
272
|
-
</div>` :
|
|
271
|
+
${W}
|
|
272
|
+
</div>` : c`${W}`}
|
|
273
273
|
`;
|
|
274
274
|
},
|
|
275
275
|
styles: [r]
|
|
276
276
|
});
|
|
277
277
|
//#endregion
|
|
278
|
-
export { i as CAROUSEL_SLIDE_TAG,
|
|
278
|
+
export { i as CAROUSEL_SLIDE_TAG, h as CAROUSEL_TAG };
|
|
279
279
|
|
|
280
280
|
//# sourceMappingURL=carousel.js.map
|
package/dist/carousel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","names":[],"sources":["../src/content/carousel/carousel.ts"],"sourcesContent":["import { define, html, prop } from '@vielzeug/ore';\nimport { computed, signal, watch } from '@vielzeug/ripple';\n\nimport type { ThemeColor } from '../../types';\n\nimport { warn } from '../../_dev';\nimport '../../content/icon/icon';\nimport '../../feedback/progress/progress';\nimport { announce, createSwipeControl } from '../../headless';\nimport componentStyles from './carousel.css?inline';\nimport './carousel-slide';\n\nexport { CAROUSEL_SLIDE_TAG } from './carousel-slide';\n\n// ── Types ──────────────────────────────────────────────────────────────────────\n\nexport type CarouselOrientation = 'horizontal' | 'vertical';\nexport type CarouselVariant = 'default' | 'fade' | 'filmstrip' | 'gallery' | 'marquee';\n\nexport type OreCarouselEvents = {\n /** Fired when the active slide changes. */\n change: { index: number };\n};\n\nexport type OreCarouselProps = {\n /**\n * Whether to advance slides automatically. Defaults to `false`.\n * Opt in explicitly — autoplay on by default is a WCAG 2.1 SC 2.2.2 violation for many use cases.\n */\n autoplay?: boolean;\n /** Interval in milliseconds between automatic slide advances. Defaults to `5000`. */\n 'autoplay-interval'?: number;\n /** Theme color passed to the prev/next navigation buttons. */\n color?: ThemeColor;\n /** Accessible label for the carousel region. */\n label?: string;\n /**\n * Whether the carousel loops from the last slide back to the first. Defaults to `true`.\n *\n * > **Note for `marquee` variant:** `loop=\"false\"` runs the scroll animation once then stops,\n * > rather than controlling navigation wrap-around (marquee navigation always loops).\n * > If you intend to stop wrapping navigation in another variant, use `loop` there as expected.\n */\n loop?: boolean;\n /**\n * Duration in seconds for one full marquee loop cycle. Defaults to `10`.\n * Shorter values = faster scroll; longer values = slower scroll.\n */\n 'marquee-duration'?: number;\n /** Carousel orientation. Defaults to `'horizontal'`. */\n orientation?: CarouselOrientation;\n /** Show next/prev navigation buttons. Defaults to `true`. */\n 'show-controls'?: boolean;\n /** Show dot/indicator navigation. Defaults to `true`. */\n 'show-indicators'?: boolean;\n /** Index of the currently active slide (zero-based). Defaults to `0`. */\n 'slide-index'?: number;\n /**\n * Layout variant.\n * - `'default'` — slides translate in/out (default)\n * - `'fade'` — slides crossfade; no movement\n * - `'filmstrip'` — all slides visible side-by-side; active expands\n * - `'gallery'` — active slide fills the majority; adjacent slides show as thumbnails\n * - `'marquee'` — continuous auto-scroll ticker; `loop` controls whether it repeats\n */\n variant?: CarouselVariant;\n};\n\n// ── Internal marquee instance type ────────────────────────────────────────────\n\ntype MarqueeInstance = {\n cleanup: () => void;\n seekTo: (index: number, slideSnapshot: HTMLElement[]) => void;\n};\n\n/**\n * An accessible, keyboard-navigable carousel / slideshow with optional\n * autoplay, swipe support, and indicator dots.\n *\n * Place `<ore-carousel-slide>` elements as direct children.\n *\n * @element ore-carousel\n * @element ore-carousel-slide - Child element for individual slides\n *\n * @attr {string} color - Theme color for navigation buttons: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'\n * @attr {boolean} autoplay - Advance slides automatically (default false)\n * @attr {number} autoplay-interval - Milliseconds between automatic advances (default 5000)\n * @attr {string} label - Accessible label for the carousel region\n * @attr {boolean} loop - Loop from last slide to first (default true); in marquee mode: repeat vs run-once\n * @attr {string} orientation - 'horizontal' (default) | 'vertical'\n * @attr {string} variant - 'default' | 'fade' | 'filmstrip' | 'gallery' | 'marquee'\n * @attr {boolean} show-controls - Show prev/next buttons (default true)\n * @attr {boolean} show-indicators - Show indicator dots (default true)\n * @attr {number} slide-index - Active slide index (zero-based, default 0)\n * @attr {number} marquee-duration - Loop cycle duration in seconds for marquee variant (default 10)\n *\n * @fires change - Fires when the active slide changes. detail: { index: number }\n *\n * @slot - Place `<ore-carousel-slide>` elements here\n *\n * @cssprop --carousel-bg - Slide area background\n * @cssprop --carousel-radius - Border radius of the carousel\n * @cssprop --carousel-dot-bg - Inactive indicator color (default: var(--color-contrast-300))\n * @cssprop --carousel-dot-active-bg - Active indicator / fill color (default: var(--color-contrast-700))\n * @cssprop --carousel-transition-duration - Slide transition duration (default 0.35s; 0s under prefers-reduced-motion). Also controls marquee seek animation duration.\n * @cssprop --carousel-min-height - Minimum height when no explicit height is set (default 240px)\n * @cssprop --carousel-filmstrip-inactive - Width (horizontal) or height (vertical) of inactive slides in filmstrip mode\n * @cssprop --carousel-filmstrip-gap - Gap between slides in filmstrip mode\n * @cssprop --carousel-gallery-thumbnail - Width (horizontal) or height (vertical) of thumbnail slides in gallery mode (default var(--size-24))\n * @cssprop --carousel-gallery-gap - Gap between slides in gallery mode (default var(--size-2))\n * @cssprop --carousel-marquee-gap - Gap between slides in marquee mode (default var(--size-4))\n *\n * @part track - The scrolling slide track element\n * @part controls - The prev/next button container\n * @part indicators - The indicator dots container\n * @part prev-btn - The previous-slide button\n * @part next-btn - The next-slide button\n *\n * @example\n * ```html\n * <ore-carousel label=\"Product highlights\" loop>\n * <ore-carousel-slide>Slide 1</ore-carousel-slide>\n * <ore-carousel-slide>Slide 2</ore-carousel-slide>\n * <ore-carousel-slide>Slide 3</ore-carousel-slide>\n * </ore-carousel>\n * ```\n */\nexport const CAROUSEL_TAG = 'ore-carousel' as const;\n\n// ── Slide-state sync helpers ──────────────────────────────────────────────────\n// Each function handles exactly one variant's attribute bookkeeping.\n// Called from a dispatch table in syncActiveState.\n\nconst syncDefaultSlides = (slides: HTMLElement[], current: number): void => {\n const count = slides.length;\n\n slides.forEach((slide, i) => {\n const active = i === current;\n\n slide.toggleAttribute('data-active', active);\n slide.setAttribute('aria-hidden', String(!active));\n slide.setAttribute('aria-label', slide.getAttribute('aria-label') ?? `Slide ${i + 1} of ${count}`);\n slide.removeAttribute('data-gallery-visible');\n slide.toggleAttribute('data-before', i < current);\n slide.toggleAttribute('data-after', i > current);\n });\n};\n\nconst syncFilmstripSlides = (slides: HTMLElement[], current: number): void => {\n const count = slides.length;\n\n slides.forEach((slide, i) => {\n const active = i === current;\n\n slide.toggleAttribute('data-active', active);\n slide.setAttribute('aria-hidden', String(!active));\n slide.setAttribute('aria-label', slide.getAttribute('aria-label') ?? `Slide ${i + 1} of ${count}`);\n slide.removeAttribute('data-gallery-visible');\n slide.removeAttribute('data-before');\n slide.removeAttribute('data-after');\n });\n};\n\nconst syncGallerySlides = (slides: HTMLElement[], current: number): void => {\n const count = slides.length;\n\n slides.forEach((slide, i) => {\n const active = i === current;\n const isPrev = current > 0 && i === current - 1;\n const isNext = current < count - 1 && i === current + 1;\n\n slide.toggleAttribute('data-active', active);\n slide.setAttribute('aria-hidden', String(!active));\n slide.setAttribute('aria-label', slide.getAttribute('aria-label') ?? `Slide ${i + 1} of ${count}`);\n slide.removeAttribute('data-before');\n slide.removeAttribute('data-after');\n slide.toggleAttribute('data-gallery-visible', active || isPrev || isNext);\n });\n};\n\nconst syncMarqueeSlides = (slides: HTMLElement[], current: number): void => {\n slides.forEach((slide, i) => {\n slide.toggleAttribute('data-active', i === current);\n slide.setAttribute('aria-hidden', 'false');\n slide.removeAttribute('data-before');\n slide.removeAttribute('data-after');\n slide.removeAttribute('data-gallery-visible');\n });\n};\n\n// ── ore-carousel ──────────────────────────────────────────────────────────────\n\ndefine<OreCarouselProps, OreCarouselEvents>(CAROUSEL_TAG, {\n props: {\n autoplay: prop.bool(false),\n 'autoplay-interval': prop.number(5000),\n color: prop.string<ThemeColor>(),\n label: prop.string('Carousel'),\n loop: prop.bool(true),\n 'marquee-duration': prop.number(10),\n orientation: prop.string<CarouselOrientation>('horizontal'),\n 'show-controls': prop.bool(true),\n 'show-indicators': prop.bool(true),\n 'slide-index': prop.number(0),\n variant: prop.string<CarouselVariant>('default'),\n },\n\n setup(props, { bind, el, emit, onMounted }) {\n // ── State ────────────────────────────────────────────────────────────────\n\n const activeIndex = signal<number>(props['slide-index'].value ?? 0);\n const isMarquee = computed(() => props.variant.value === 'marquee');\n let autoplayTimer: ReturnType<typeof setInterval> | null = null;\n\n // Slide cache — populated immediately, refreshed on slotchange.\n let slides: HTMLElement[] = Array.from(el.querySelectorAll<HTMLElement>(':scope > ore-carousel-slide'));\n const slideCount = signal(slides.length);\n\n const refreshSlides = (): void => {\n slides = Array.from(el.querySelectorAll<HTMLElement>(':scope > ore-carousel-slide'));\n slideCount.value = slides.length;\n };\n\n const isHorizontal = computed(() => props.orientation.value !== 'vertical');\n const looping = computed(() => props.loop.value !== false);\n const showControls = computed(() => props['show-controls'].value !== false);\n const showIndicators = computed(() => props['show-indicators'].value !== false);\n\n const canGoPrev = computed(() => looping.value || activeIndex.value > 0);\n const canGoNext = computed(() => looping.value || activeIndex.value < slideCount.value - 1);\n\n // ── Navigation ───────────────────────────────────────────────────────────\n\n // marqueeInstance is set in onMounted; accessed here via module-level ref\n // stored on the setup closure. No separate side-channel variable needed.\n let marqueeInstance: MarqueeInstance | null = null;\n\n const goTo = (index: number, announce_: boolean = true): void => {\n const count = slideCount.value;\n\n if (count === 0) return;\n\n const next = looping.value ? ((index % count) + count) % count : Math.max(0, Math.min(index, count - 1));\n\n if (next === activeIndex.value) return;\n\n activeIndex.value = next;\n el.setAttribute('slide-index', String(next));\n emit('change', { index: next });\n // Pass current slides snapshot so seekTo never reads a stale closure.\n marqueeInstance?.seekTo(next, slides);\n\n if (announce_) {\n announce(slides[next]?.getAttribute('aria-label') ?? `Slide ${next + 1} of ${count}`);\n }\n };\n\n const prev = (): void => goTo(activeIndex.value - 1);\n const next = (): void => goTo(activeIndex.value + 1);\n\n // ── Sync prop → state ────────────────────────────────────────────────────\n\n watch(props['slide-index'], (v) => {\n if (typeof v === 'number' && v !== activeIndex.value) goTo(v, false);\n });\n\n // ── Sync variant + orientation → slides ──────────────────────────────────\n\n const syncSlideVariants = (): void => {\n const variant = props.variant.value ?? 'default';\n const orientation = props.orientation.value ?? 'horizontal';\n\n slides.forEach((slide) => {\n slide.setAttribute('data-variant', variant);\n slide.setAttribute('data-orientation', orientation);\n });\n };\n\n watch(\n computed(() => ({ orientation: props.orientation.value, variant: props.variant.value })),\n syncSlideVariants,\n { immediate: true },\n );\n\n // ── Sync active index → slides — dispatch table ───────────────────────────\n\n const syncTable: Record<CarouselVariant, (slides: HTMLElement[], current: number) => void> = {\n default: syncDefaultSlides,\n fade: syncDefaultSlides,\n filmstrip: syncFilmstripSlides,\n gallery: syncGallerySlides,\n marquee: syncMarqueeSlides,\n };\n\n const syncActiveState = (): void => {\n const variant = (props.variant.value ?? 'default') as CarouselVariant;\n\n syncTable[variant](slides, activeIndex.value);\n };\n\n watch(activeIndex, syncActiveState, { immediate: true });\n\n // ── Autoplay ─────────────────────────────────────────────────────────────\n\n const startAutoplay = (): void => {\n if (autoplayTimer !== null) return;\n\n autoplayTimer = setInterval(next, props['autoplay-interval'].value ?? 5000);\n };\n\n const stopAutoplay = (): void => {\n if (autoplayTimer !== null) {\n clearInterval(autoplayTimer);\n autoplayTimer = null;\n }\n };\n\n watch(\n computed(() => ({ enabled: props.autoplay.value, interval: props['autoplay-interval'].value })),\n ({ enabled }) => {\n stopAutoplay();\n\n if (enabled) startAutoplay();\n },\n );\n\n // ── Keyboard navigation ──────────────────────────────────────────────────\n\n const handleKeydown = (e: KeyboardEvent): void => {\n const isH = isHorizontal.value;\n const prevKey = isH ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = isH ? 'ArrowRight' : 'ArrowDown';\n\n if (e.key === prevKey) {\n e.preventDefault();\n prev();\n } else if (e.key === nextKey) {\n e.preventDefault();\n next();\n } else if (e.key === 'Home') {\n e.preventDefault();\n goTo(0);\n } else if (e.key === 'End') {\n e.preventDefault();\n goTo(slideCount.value - 1);\n }\n };\n\n // ── Swipe ────────────────────────────────────────────────────────────────\n\n const swipe = createSwipeControl({\n axis: () => (isHorizontal.value ? 'x' : 'y'),\n onCommit: (detail) => {\n if (detail.distance < 0) next();\n else prev();\n },\n threshold: () => 48,\n });\n\n // ── Host bindings ────────────────────────────────────────────────────────\n\n bind({\n attr: {\n 'aria-label': () => props.label.value ?? 'Carousel',\n 'aria-roledescription': () => 'carousel',\n orientation: () => props.orientation.value ?? 'horizontal',\n role: () => 'region',\n style: () => `touch-action:${isHorizontal.value ? 'pan-y' : 'pan-x'}`,\n variant: () => props.variant.value ?? 'default',\n },\n on: {\n focusin: () => {\n stopAutoplay();\n },\n focusout: () => {\n if (props.autoplay.value) startAutoplay();\n },\n keydown: handleKeydown,\n pointercancel: (e: PointerEvent) => swipe.handlePointerCancel(e),\n pointerdown: (e: PointerEvent) => {\n const path = e.composedPath();\n const onButton = path.some(\n (n) =>\n n instanceof HTMLElement &&\n (n.tagName === 'BUTTON' || n.tagName === 'ORE-BUTTON' || n.tagName === 'ORE-PROGRESS'),\n );\n\n if (!onButton) swipe.handlePointerDown(e);\n },\n pointerenter: () => {\n stopAutoplay();\n },\n pointerleave: () => {\n if (props.autoplay.value) startAutoplay();\n },\n pointermove: (e: PointerEvent) => swipe.handlePointerMove(e),\n pointerup: (e: PointerEvent) => swipe.handlePointerUp(e),\n },\n });\n\n // ── Marquee ───────────────────────────────────────────────────────────────\n // Clones slides for a seamless loop. Seek uses WAAPI when available\n // (all modern browsers) so it can be cancelled cleanly. Falls back to\n // instant negative-delay repositioning in environments without WAAPI\n // (e.g. jsdom in tests).\n\n const setupMarquee = (track: HTMLElement): MarqueeInstance => {\n const orientation = props.orientation.value ?? 'horizontal';\n const horizontal = orientation !== 'vertical';\n\n if (isMarquee.value && props.loop.value === false) {\n warn(\n 'ore-carousel: loop=\"false\" on the marquee variant stops the scroll animation rather than ' +\n 'disabling navigation wrap-around. Navigation in marquee always loops. ' +\n 'This is different from loop=\"false\" on other variants.',\n );\n }\n\n const clones = slides.map((s) => {\n const clone = s.cloneNode(true) as HTMLElement;\n\n clone.setAttribute('aria-hidden', 'true');\n clone.setAttribute('data-variant', 'marquee');\n clone.setAttribute('data-orientation', orientation);\n clone.setAttribute('data-marquee-clone', '');\n track.appendChild(clone);\n\n return clone;\n });\n\n track.style.setProperty('--_marquee-duration', `${props['marquee-duration'].value ?? 10}s`);\n\n if (!looping.value) {\n track.style.setProperty('animation-iteration-count', '1');\n }\n\n let isHovered = false;\n\n const pause = (): void => {\n isHovered = true;\n track.style.setProperty('animation-play-state', 'paused');\n };\n\n const resume = (): void => {\n isHovered = false;\n track.style.removeProperty('animation-play-state');\n };\n\n // mouseenter/mouseleave fire only when the pointer crosses the host\n // boundary — never when moving between children (e.g. onto controls).\n // This means clicking buttons never accidentally resumes the animation.\n el.addEventListener('mouseenter', pause);\n el.addEventListener('mouseleave', resume);\n\n // ── Seek ──────────────────────────────────────────────────────────────\n // Smoothly slides to the target position using a CSS transition on the\n // inline transform (the CSS keyframe animation is paused throughout so\n // there is no compositing conflict). On transitionend, switches back to\n // the keyframe animation via a negative animation-delay.\n\n let seekTimer: ReturnType<typeof setTimeout> | null = null;\n\n const seekTo = (index: number, slideSnapshot: HTMLElement[]): void => {\n const slide = slideSnapshot[index];\n\n if (!slide) return;\n\n const targetOffset = horizontal ? slide.offsetLeft : slide.offsetTop;\n const halfSize = horizontal ? track.scrollWidth / 2 : track.scrollHeight / 2;\n const cycleDuration = props['marquee-duration'].value ?? 10;\n const delay = halfSize > 0 ? -((targetOffset / halfSize) * cycleDuration) : 0;\n\n // Cancel any in-flight seek timer.\n if (seekTimer !== null) {\n clearTimeout(seekTimer);\n seekTimer = null;\n // Snap the previous transition to its end state immediately.\n track.style.removeProperty('transition');\n }\n\n // No layout (jsdom): instant seek with no visual transition.\n if (halfSize === 0) {\n track.style.setProperty('animation-delay', `${delay}s`);\n\n if (!isHovered) {\n track.style.removeProperty('animation-play-state');\n }\n\n return;\n }\n\n const seekMs =\n parseFloat(getComputedStyle(el).getPropertyValue('--carousel-transition-duration') || '0.35') * 1000 || 350;\n\n const targetTransform = horizontal ? `translateX(-${targetOffset}px)` : `translateY(-${targetOffset}px)`;\n\n // 1. Read the current visual position from the live animation, then\n // kill the animation entirely so nothing else drives transform.\n // getBoundingClientRect() flushes layout so the matrix is current.\n void track.getBoundingClientRect();\n\n const computedTransform = getComputedStyle(track).transform;\n const matrixValues = computedTransform\n .match(/matrix\\(([^)]+)\\)/)?.[1]\n .split(',')\n .map(Number);\n const frozenOffset = horizontal ? (matrixValues?.[4] ?? 0) : (matrixValues?.[5] ?? 0);\n const frozenTransform = horizontal ? `translateX(${frozenOffset}px)` : `translateY(${frozenOffset}px)`;\n\n // Stop the CSS animation — inline transform is now the sole driver.\n track.style.setProperty('animation', 'none');\n track.style.setProperty('transform', frozenTransform);\n\n // 2. Next frame: apply transition and slide to target.\n requestAnimationFrame(() => {\n track.style.setProperty('transition', `transform ${seekMs}ms ease-in-out`);\n track.style.setProperty('transform', targetTransform);\n\n // 3. After the transition completes, restore the keyframe animation\n // at the correct position via negative animation-delay.\n seekTimer = setTimeout(() => {\n seekTimer = null;\n track.style.removeProperty('transition');\n track.style.removeProperty('transform');\n track.style.removeProperty('animation');\n track.style.setProperty('animation-delay', `${delay}s`);\n\n if (isHovered) {\n track.style.setProperty('animation-play-state', 'paused');\n }\n }, seekMs);\n });\n };\n\n return {\n cleanup: () => {\n if (seekTimer !== null) clearTimeout(seekTimer);\n\n seekTimer = null;\n clones.forEach((c) => c.remove());\n track.style.removeProperty('transition');\n track.style.removeProperty('transform');\n track.style.removeProperty('animation');\n track.style.removeProperty('--_marquee-duration');\n track.style.removeProperty('animation-iteration-count');\n track.style.removeProperty('animation-delay');\n track.style.removeProperty('animation-play-state');\n el.removeEventListener('mouseenter', pause);\n el.removeEventListener('mouseleave', resume);\n },\n seekTo,\n };\n };\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n onMounted(() => {\n const shadowRoot = el.shadowRoot!;\n const track = shadowRoot.querySelector<HTMLElement>('.track')!;\n const slot = shadowRoot.querySelector<HTMLSlotElement>('slot')!;\n\n // slotchange replaces MutationObserver — fires exactly when assigned\n // nodes change, scoped to this component's slot, no polling overhead.\n const onSlotChange = (): void => {\n refreshSlides();\n syncSlideVariants();\n syncActiveState();\n\n if (isMarquee.value) {\n marqueeInstance?.cleanup();\n marqueeInstance = setupMarquee(track);\n }\n };\n\n slot.addEventListener('slotchange', onSlotChange);\n\n watch(\n computed(() => ({\n duration: props['marquee-duration'].value,\n isMarquee: isMarquee.value,\n loop: props.loop.value,\n orientation: props.orientation.value,\n })),\n ({ isMarquee: active }) => {\n marqueeInstance?.cleanup();\n marqueeInstance = active ? setupMarquee(track) : null;\n },\n { immediate: true },\n );\n\n if (props.autoplay.value) {\n startAutoplay();\n }\n\n return () => {\n stopAutoplay();\n swipe.dispose();\n slot.removeEventListener('slotchange', onSlotChange);\n marqueeInstance?.cleanup();\n };\n });\n\n // ── Template ─────────────────────────────────────────────────────────────\n\n const focusIndicator = (index: number): void => {\n const dot = el.shadowRoot?.querySelector<HTMLElement>(`.indicator[data-index=\"${index}\"]`);\n\n dot?.focus();\n };\n\n const handleIndicatorKeydown = (e: KeyboardEvent, i: number): void => {\n const count = slideCount.value;\n let target: number | undefined;\n\n switch (e.key) {\n case 'ArrowDown':\n case 'ArrowRight':\n target = (i + 1) % count;\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n target = (i - 1 + count) % count;\n break;\n case 'End':\n target = count - 1;\n break;\n case 'Home':\n target = 0;\n break;\n default:\n return;\n }\n\n e.preventDefault();\n goTo(target);\n focusIndicator(target);\n };\n\n const renderControls = () =>\n showControls.value\n ? html`<div class=\"controls\" part=\"controls\">\n <ore-button\n class=\"nav-btn prev-btn\"\n part=\"prev-btn\"\n variant=\"ghost\"\n :color=${() => props.color.value}\n rounded\n icon-only\n aria-label=\"Previous slide\"\n :disabled=${() => (!canGoPrev.value ? true : undefined)}\n @click=${(e: Event) => {\n e.stopPropagation();\n prev();\n }}>\n <ore-icon\n :name=${() => (isHorizontal.value ? 'chevron-left' : 'chevron-up')}\n size=\"16\"\n stroke-width=\"2\"\n aria-hidden=\"true\"></ore-icon>\n </ore-button>\n <ore-button\n class=\"nav-btn next-btn\"\n part=\"next-btn\"\n variant=\"ghost\"\n :color=${() => props.color.value}\n rounded\n icon-only\n aria-label=\"Next slide\"\n :disabled=${() => (!canGoNext.value ? true : undefined)}\n @click=${(e: Event) => {\n e.stopPropagation();\n next();\n }}>\n <ore-icon\n :name=${() => (isHorizontal.value ? 'chevron-right' : 'chevron-down')}\n size=\"16\"\n stroke-width=\"2\"\n aria-hidden=\"true\"></ore-icon>\n </ore-button>\n </div>`\n : html``;\n\n return html`\n <div class=\"track\" part=\"track\" :aria-live=${() => (props.autoplay.value ? 'off' : 'polite')}>\n <slot></slot>\n </div>\n\n ${() =>\n showIndicators.value && slideCount.value > 1 && !isMarquee.value\n ? html`<div class=\"indicators\" part=\"indicators\" role=\"tablist\" aria-label=\"Slide indicators\">\n ${() =>\n Array.from(\n { length: slideCount.value },\n (_, i) =>\n html`<button\n type=\"button\"\n role=\"tab\"\n data-index=\"${i}\"\n :class=${() =>\n `indicator${!isMarquee.value && i === activeIndex.value ? ' indicator-active' : ''}`}\n :aria-selected=${() => String(!isMarquee.value && i === activeIndex.value)}\n :tabindex=${() => (!isMarquee.value && i === activeIndex.value ? '0' : '-1')}\n aria-label=\"${`Go to slide ${i + 1}`}\"\n @click=${() => goTo(i)}\n @keydown=${(e: KeyboardEvent) => handleIndicatorKeydown(e, i)}>\n <ore-progress\n aria-hidden=\"true\"\n tabindex=\"-1\"\n :color=${() => props.color.value}\n :type=${() => (isHorizontal.value ? 'linear' : 'vertical')}\n :value=${() => (!isMarquee.value && i === activeIndex.value ? 100 : 0)}\n :style=${() => {\n const fillAnim = isHorizontal.value ? 'carousel-fill' : 'carousel-fill-v';\n\n return `--carousel-timeout:${props['autoplay-interval'].value ?? 5000};--carousel-animation-name:${!isMarquee.value && i === activeIndex.value && props.autoplay.value ? fillAnim : 'none'}`;\n }}></ore-progress>\n </button>`,\n )}\n ${renderControls}\n </div>`\n : html`${renderControls}`}\n `;\n },\n styles: [componentStyles],\n});\n"],"mappings":";;;;;;;;AA+HA,IAAa,IAAe,gBAMtB,KAAqB,GAAuB,MAA0B;CAC1E,IAAM,IAAQ,EAAO;CAErB,EAAO,SAAS,GAAO,MAAM;EAC3B,IAAM,IAAS,MAAM;EAOrB,AALA,EAAM,gBAAgB,eAAe,CAAM,GAC3C,EAAM,aAAa,eAAe,OAAO,CAAC,CAAM,CAAC,GACjD,EAAM,aAAa,cAAc,EAAM,aAAa,YAAY,KAAK,SAAS,IAAI,EAAE,MAAM,GAAO,GACjG,EAAM,gBAAgB,sBAAsB,GAC5C,EAAM,gBAAgB,eAAe,IAAI,CAAO,GAChD,EAAM,gBAAgB,cAAc,IAAI,CAAO;CACjD,CAAC;AACH,GAEM,KAAuB,GAAuB,MAA0B;CAC5E,IAAM,IAAQ,EAAO;CAErB,EAAO,SAAS,GAAO,MAAM;EAC3B,IAAM,IAAS,MAAM;EAOrB,AALA,EAAM,gBAAgB,eAAe,CAAM,GAC3C,EAAM,aAAa,eAAe,OAAO,CAAC,CAAM,CAAC,GACjD,EAAM,aAAa,cAAc,EAAM,aAAa,YAAY,KAAK,SAAS,IAAI,EAAE,MAAM,GAAO,G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AAW,QAAQ,KAAK,CAAC,EAAU,QACvD,CAAI;sBAEA,MAAM,KACJ,EAAE,QAAQ,EAAW,MAAM,IAC1B,GAAG,MACF,CAAI;;;oCAGY,EAAE;qCAEd,YAAY,CAAC,EAAU,SAAS,MAAM,EAAY,QAAQ,sBAAsB,KAAK;6CAChE,OAAO,CAAC,EAAU,SAAS,MAAM,EAAY,KAAK,EAAE;wCACxD,CAAC,EAAU,SAAS,MAAM,EAAY,QAAQ,MAAM,KAAM;oCAC/D,eAAe,IAAI,IAAI;qCACtB,EAAK,CAAC,EAAE;kCACX,MAAqB,EAAuB,GAAG,CAAC,EAAE;;;;uCAI7C,EAAM,MAAM,MAAM;sCAClB,EAAa,QAAQ,WAAW,WAAY;uCAC3C,CAAC,EAAU,SAAS,MAAM,EAAY,QAAQ,MAAM,EAAG;uCACxD;GACb,IAAM,IAAW,EAAa,QAAQ,kBAAkB;GAExD,OAAO,sBAAsB,EAAM,oBAAoB,CAAC,SAAS,IAAK,6BAA6B,CAAC,EAAU,SAAS,MAAM,EAAY,SAAS,EAAM,SAAS,QAAQ,IAAW;EACtL,EAAE;8BAEV,EAAE;gBACF,EAAe;sBAEnB,CAAI,GAAG,IAAiB;;CAElC;CACA,QAAQ,CAAC,CAAe;AAC1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"carousel.js","names":[],"sources":["../src/content/carousel/carousel.ts"],"sourcesContent":["import { define, html, prop, bind, getHost, onMounted, useEmit } from '@vielzeug/ore';\nimport { computed, signal, watch } from '@vielzeug/ripple';\n\nimport type { ThemeColor } from '../../types';\n\nimport { warn } from '../../_dev';\nimport '../../content/icon/icon';\nimport '../../feedback/progress/progress';\nimport { announce, createSwipeControl } from '../../headless';\nimport componentStyles from './carousel.css?inline';\nimport './carousel-slide';\n\nexport { CAROUSEL_SLIDE_TAG } from './carousel-slide';\n\n// ── Types ──────────────────────────────────────────────────────────────────────\n\nexport type CarouselOrientation = 'horizontal' | 'vertical';\nexport type CarouselVariant = 'default' | 'fade' | 'filmstrip' | 'gallery' | 'marquee';\n\nexport type OreCarouselEvents = {\n /** Fired when the active slide changes. */\n change: { index: number };\n};\n\nexport type OreCarouselProps = {\n /**\n * Whether to advance slides automatically. Defaults to `false`.\n * Opt in explicitly — autoplay on by default is a WCAG 2.1 SC 2.2.2 violation for many use cases.\n */\n autoplay?: boolean;\n /** Interval in milliseconds between automatic slide advances. Defaults to `5000`. */\n 'autoplay-interval'?: number;\n /** Theme color passed to the prev/next navigation buttons. */\n color?: ThemeColor;\n /** Accessible label for the carousel region. */\n label?: string;\n /**\n * Whether the carousel loops from the last slide back to the first. Defaults to `true`.\n *\n * > **Note for `marquee` variant:** `loop=\"false\"` runs the scroll animation once then stops,\n * > rather than controlling navigation wrap-around (marquee navigation always loops).\n * > If you intend to stop wrapping navigation in another variant, use `loop` there as expected.\n */\n loop?: boolean;\n /**\n * Duration in seconds for one full marquee loop cycle. Defaults to `10`.\n * Shorter values = faster scroll; longer values = slower scroll.\n */\n 'marquee-duration'?: number;\n /** Carousel orientation. Defaults to `'horizontal'`. */\n orientation?: CarouselOrientation;\n /** Show next/prev navigation buttons. Defaults to `true`. */\n 'show-controls'?: boolean;\n /** Show dot/indicator navigation. Defaults to `true`. */\n 'show-indicators'?: boolean;\n /** Index of the currently active slide (zero-based). Defaults to `0`. */\n 'slide-index'?: number;\n /**\n * Layout variant.\n * - `'default'` — slides translate in/out (default)\n * - `'fade'` — slides crossfade; no movement\n * - `'filmstrip'` — all slides visible side-by-side; active expands\n * - `'gallery'` — active slide fills the majority; adjacent slides show as thumbnails\n * - `'marquee'` — continuous auto-scroll ticker; `loop` controls whether it repeats\n */\n variant?: CarouselVariant;\n};\n\n// ── Internal marquee instance type ────────────────────────────────────────────\n\ntype MarqueeInstance = {\n cleanup: () => void;\n seekTo: (index: number, slideSnapshot: HTMLElement[]) => void;\n};\n\n/**\n * An accessible, keyboard-navigable carousel / slideshow with optional\n * autoplay, swipe support, and indicator dots.\n *\n * Place `<ore-carousel-slide>` elements as direct children.\n *\n * @element ore-carousel\n * @element ore-carousel-slide - Child element for individual slides\n *\n * @attr {string} color - Theme color for navigation buttons: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'\n * @attr {boolean} autoplay - Advance slides automatically (default false)\n * @attr {number} autoplay-interval - Milliseconds between automatic advances (default 5000)\n * @attr {string} label - Accessible label for the carousel region\n * @attr {boolean} loop - Loop from last slide to first (default true); in marquee mode: repeat vs run-once\n * @attr {string} orientation - 'horizontal' (default) | 'vertical'\n * @attr {string} variant - 'default' | 'fade' | 'filmstrip' | 'gallery' | 'marquee'\n * @attr {boolean} show-controls - Show prev/next buttons (default true)\n * @attr {boolean} show-indicators - Show indicator dots (default true)\n * @attr {number} slide-index - Active slide index (zero-based, default 0)\n * @attr {number} marquee-duration - Loop cycle duration in seconds for marquee variant (default 10)\n *\n * @fires change - Fires when the active slide changes. detail: { index: number }\n *\n * @slot - Place `<ore-carousel-slide>` elements here\n *\n * @cssprop --carousel-bg - Slide area background\n * @cssprop --carousel-radius - Border radius of the carousel\n * @cssprop --carousel-dot-bg - Inactive indicator color (default: var(--color-contrast-300))\n * @cssprop --carousel-dot-active-bg - Active indicator / fill color (default: var(--color-contrast-700))\n * @cssprop --carousel-transition-duration - Slide transition duration (default 0.35s; 0s under prefers-reduced-motion). Also controls marquee seek animation duration.\n * @cssprop --carousel-min-height - Minimum height when no explicit height is set (default 240px)\n * @cssprop --carousel-filmstrip-inactive - Width (horizontal) or height (vertical) of inactive slides in filmstrip mode\n * @cssprop --carousel-filmstrip-gap - Gap between slides in filmstrip mode\n * @cssprop --carousel-gallery-thumbnail - Width (horizontal) or height (vertical) of thumbnail slides in gallery mode (default var(--size-24))\n * @cssprop --carousel-gallery-gap - Gap between slides in gallery mode (default var(--size-2))\n * @cssprop --carousel-marquee-gap - Gap between slides in marquee mode (default var(--size-4))\n *\n * @part track - The scrolling slide track element\n * @part controls - The prev/next button container\n * @part indicators - The indicator dots container\n * @part prev-btn - The previous-slide button\n * @part next-btn - The next-slide button\n *\n * @example\n * ```html\n * <ore-carousel label=\"Product highlights\" loop>\n * <ore-carousel-slide>Slide 1</ore-carousel-slide>\n * <ore-carousel-slide>Slide 2</ore-carousel-slide>\n * <ore-carousel-slide>Slide 3</ore-carousel-slide>\n * </ore-carousel>\n * ```\n */\nexport const CAROUSEL_TAG = 'ore-carousel' as const;\n\n// ── Slide-state sync helpers ──────────────────────────────────────────────────\n// Each function handles exactly one variant's attribute bookkeeping.\n// Called from a dispatch table in syncActiveState.\n\nconst syncDefaultSlides = (slides: HTMLElement[], current: number): void => {\n const count = slides.length;\n\n slides.forEach((slide, i) => {\n const active = i === current;\n\n slide.toggleAttribute('data-active', active);\n slide.setAttribute('aria-hidden', String(!active));\n slide.setAttribute('aria-label', slide.getAttribute('aria-label') ?? `Slide ${i + 1} of ${count}`);\n slide.removeAttribute('data-gallery-visible');\n slide.toggleAttribute('data-before', i < current);\n slide.toggleAttribute('data-after', i > current);\n });\n};\n\nconst syncFilmstripSlides = (slides: HTMLElement[], current: number): void => {\n const count = slides.length;\n\n slides.forEach((slide, i) => {\n const active = i === current;\n\n slide.toggleAttribute('data-active', active);\n slide.setAttribute('aria-hidden', String(!active));\n slide.setAttribute('aria-label', slide.getAttribute('aria-label') ?? `Slide ${i + 1} of ${count}`);\n slide.removeAttribute('data-gallery-visible');\n slide.removeAttribute('data-before');\n slide.removeAttribute('data-after');\n });\n};\n\nconst syncGallerySlides = (slides: HTMLElement[], current: number): void => {\n const count = slides.length;\n\n slides.forEach((slide, i) => {\n const active = i === current;\n const isPrev = current > 0 && i === current - 1;\n const isNext = current < count - 1 && i === current + 1;\n\n slide.toggleAttribute('data-active', active);\n slide.setAttribute('aria-hidden', String(!active));\n slide.setAttribute('aria-label', slide.getAttribute('aria-label') ?? `Slide ${i + 1} of ${count}`);\n slide.removeAttribute('data-before');\n slide.removeAttribute('data-after');\n slide.toggleAttribute('data-gallery-visible', active || isPrev || isNext);\n });\n};\n\nconst syncMarqueeSlides = (slides: HTMLElement[], current: number): void => {\n slides.forEach((slide, i) => {\n slide.toggleAttribute('data-active', i === current);\n slide.setAttribute('aria-hidden', 'false');\n slide.removeAttribute('data-before');\n slide.removeAttribute('data-after');\n slide.removeAttribute('data-gallery-visible');\n });\n};\n\n// ── ore-carousel ──────────────────────────────────────────────────────────────\n\ndefine<OreCarouselProps>(CAROUSEL_TAG, {\n props: {\n autoplay: prop.bool(false),\n 'autoplay-interval': prop.number(5000),\n color: prop.string<ThemeColor>(),\n label: prop.string('Carousel'),\n loop: prop.bool(true),\n 'marquee-duration': prop.number(10),\n orientation: prop.string<CarouselOrientation>('horizontal'),\n 'show-controls': prop.bool(true),\n 'show-indicators': prop.bool(true),\n 'slide-index': prop.number(0),\n variant: prop.string<CarouselVariant>('default'),\n },\n\n setup(props) {\n const el = getHost();\n const emit = useEmit<OreCarouselEvents>();\n\n // ── State ────────────────────────────────────────────────────────────────\n\n const activeIndex = signal<number>(props['slide-index'].value ?? 0);\n const isMarquee = computed(() => props.variant.value === 'marquee');\n let autoplayTimer: ReturnType<typeof setInterval> | null = null;\n\n // Slide cache — populated immediately, refreshed on slotchange.\n let slides: HTMLElement[] = Array.from(el.querySelectorAll<HTMLElement>(':scope > ore-carousel-slide'));\n const slideCount = signal(slides.length);\n\n const refreshSlides = (): void => {\n slides = Array.from(el.querySelectorAll<HTMLElement>(':scope > ore-carousel-slide'));\n slideCount.value = slides.length;\n };\n\n const isHorizontal = computed(() => props.orientation.value !== 'vertical');\n const looping = computed(() => props.loop.value !== false);\n const showControls = computed(() => props['show-controls'].value !== false);\n const showIndicators = computed(() => props['show-indicators'].value !== false);\n\n const canGoPrev = computed(() => looping.value || activeIndex.value > 0);\n const canGoNext = computed(() => looping.value || activeIndex.value < slideCount.value - 1);\n\n // ── Navigation ───────────────────────────────────────────────────────────\n\n // marqueeInstance is set in onMounted; accessed here via module-level ref\n // stored on the setup closure. No separate side-channel variable needed.\n let marqueeInstance: MarqueeInstance | null = null;\n\n const goTo = (index: number, announce_: boolean = true): void => {\n const count = slideCount.value;\n\n if (count === 0) return;\n\n const next = looping.value ? ((index % count) + count) % count : Math.max(0, Math.min(index, count - 1));\n\n if (next === activeIndex.value) return;\n\n activeIndex.value = next;\n el.setAttribute('slide-index', String(next));\n emit('change', { index: next });\n // Pass current slides snapshot so seekTo never reads a stale closure.\n marqueeInstance?.seekTo(next, slides);\n\n if (announce_) {\n announce(slides[next]?.getAttribute('aria-label') ?? `Slide ${next + 1} of ${count}`);\n }\n };\n\n const prev = (): void => goTo(activeIndex.value - 1);\n const next = (): void => goTo(activeIndex.value + 1);\n\n // ── Sync prop → state ────────────────────────────────────────────────────\n\n watch(props['slide-index'], (v) => {\n if (typeof v === 'number' && v !== activeIndex.value) goTo(v, false);\n });\n\n // ── Sync variant + orientation → slides ──────────────────────────────────\n\n const syncSlideVariants = (): void => {\n const variant = props.variant.value ?? 'default';\n const orientation = props.orientation.value ?? 'horizontal';\n\n slides.forEach((slide) => {\n slide.setAttribute('data-variant', variant);\n slide.setAttribute('data-orientation', orientation);\n });\n };\n\n watch(\n computed(() => ({ orientation: props.orientation.value, variant: props.variant.value })),\n syncSlideVariants,\n { immediate: true },\n );\n\n // ── Sync active index → slides — dispatch table ───────────────────────────\n\n const syncTable: Record<CarouselVariant, (slides: HTMLElement[], current: number) => void> = {\n default: syncDefaultSlides,\n fade: syncDefaultSlides,\n filmstrip: syncFilmstripSlides,\n gallery: syncGallerySlides,\n marquee: syncMarqueeSlides,\n };\n\n const syncActiveState = (): void => {\n const variant = (props.variant.value ?? 'default') as CarouselVariant;\n\n syncTable[variant](slides, activeIndex.value);\n };\n\n watch(activeIndex, syncActiveState, { immediate: true });\n\n // ── Autoplay ─────────────────────────────────────────────────────────────\n\n const startAutoplay = (): void => {\n if (autoplayTimer !== null) return;\n\n autoplayTimer = setInterval(next, props['autoplay-interval'].value ?? 5000);\n };\n\n const stopAutoplay = (): void => {\n if (autoplayTimer !== null) {\n clearInterval(autoplayTimer);\n autoplayTimer = null;\n }\n };\n\n watch(\n computed(() => ({ enabled: props.autoplay.value, interval: props['autoplay-interval'].value })),\n ({ enabled }) => {\n stopAutoplay();\n\n if (enabled) startAutoplay();\n },\n );\n\n // ── Keyboard navigation ──────────────────────────────────────────────────\n\n const handleKeydown = (e: KeyboardEvent): void => {\n const isH = isHorizontal.value;\n const prevKey = isH ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = isH ? 'ArrowRight' : 'ArrowDown';\n\n if (e.key === prevKey) {\n e.preventDefault();\n prev();\n } else if (e.key === nextKey) {\n e.preventDefault();\n next();\n } else if (e.key === 'Home') {\n e.preventDefault();\n goTo(0);\n } else if (e.key === 'End') {\n e.preventDefault();\n goTo(slideCount.value - 1);\n }\n };\n\n // ── Swipe ────────────────────────────────────────────────────────────────\n\n const swipe = createSwipeControl({\n axis: () => (isHorizontal.value ? 'x' : 'y'),\n onCommit: (detail) => {\n if (detail.distance < 0) next();\n else prev();\n },\n threshold: () => 48,\n });\n\n // ── Host bindings ────────────────────────────────────────────────────────\n\n bind({\n attr: {\n 'aria-label': () => props.label.value ?? 'Carousel',\n 'aria-roledescription': () => 'carousel',\n orientation: () => props.orientation.value ?? 'horizontal',\n role: () => 'region',\n style: () => `touch-action:${isHorizontal.value ? 'pan-y' : 'pan-x'}`,\n variant: () => props.variant.value ?? 'default',\n },\n on: {\n focusin: () => {\n stopAutoplay();\n },\n focusout: () => {\n if (props.autoplay.value) startAutoplay();\n },\n keydown: handleKeydown,\n pointercancel: (e: PointerEvent) => swipe.handlePointerCancel(e),\n pointerdown: (e: PointerEvent) => {\n const path = e.composedPath();\n const onButton = path.some(\n (n) =>\n n instanceof HTMLElement &&\n (n.tagName === 'BUTTON' || n.tagName === 'ORE-BUTTON' || n.tagName === 'ORE-PROGRESS'),\n );\n\n if (!onButton) swipe.handlePointerDown(e);\n },\n pointerenter: () => {\n stopAutoplay();\n },\n pointerleave: () => {\n if (props.autoplay.value) startAutoplay();\n },\n pointermove: (e: PointerEvent) => swipe.handlePointerMove(e),\n pointerup: (e: PointerEvent) => swipe.handlePointerUp(e),\n },\n });\n\n // ── Marquee ───────────────────────────────────────────────────────────────\n // Clones slides for a seamless loop. Seek uses WAAPI when available\n // (all modern browsers) so it can be cancelled cleanly. Falls back to\n // instant negative-delay repositioning in environments without WAAPI\n // (e.g. jsdom in tests).\n\n const setupMarquee = (track: HTMLElement): MarqueeInstance => {\n const orientation = props.orientation.value ?? 'horizontal';\n const horizontal = orientation !== 'vertical';\n\n if (isMarquee.value && props.loop.value === false) {\n warn(\n 'ore-carousel: loop=\"false\" on the marquee variant stops the scroll animation rather than ' +\n 'disabling navigation wrap-around. Navigation in marquee always loops. ' +\n 'This is different from loop=\"false\" on other variants.',\n );\n }\n\n const clones = slides.map((s) => {\n const clone = s.cloneNode(true) as HTMLElement;\n\n clone.setAttribute('aria-hidden', 'true');\n clone.setAttribute('data-variant', 'marquee');\n clone.setAttribute('data-orientation', orientation);\n clone.setAttribute('data-marquee-clone', '');\n track.appendChild(clone);\n\n return clone;\n });\n\n track.style.setProperty('--_marquee-duration', `${props['marquee-duration'].value ?? 10}s`);\n\n if (!looping.value) {\n track.style.setProperty('animation-iteration-count', '1');\n }\n\n let isHovered = false;\n\n const pause = (): void => {\n isHovered = true;\n track.style.setProperty('animation-play-state', 'paused');\n };\n\n const resume = (): void => {\n isHovered = false;\n track.style.removeProperty('animation-play-state');\n };\n\n // mouseenter/mouseleave fire only when the pointer crosses the host\n // boundary — never when moving between children (e.g. onto controls).\n // This means clicking buttons never accidentally resumes the animation.\n el.addEventListener('mouseenter', pause);\n el.addEventListener('mouseleave', resume);\n\n // ── Seek ──────────────────────────────────────────────────────────────\n // Smoothly slides to the target position using a CSS transition on the\n // inline transform (the CSS keyframe animation is paused throughout so\n // there is no compositing conflict). On transitionend, switches back to\n // the keyframe animation via a negative animation-delay.\n\n let seekTimer: ReturnType<typeof setTimeout> | null = null;\n\n const seekTo = (index: number, slideSnapshot: HTMLElement[]): void => {\n const slide = slideSnapshot[index];\n\n if (!slide) return;\n\n const targetOffset = horizontal ? slide.offsetLeft : slide.offsetTop;\n const halfSize = horizontal ? track.scrollWidth / 2 : track.scrollHeight / 2;\n const cycleDuration = props['marquee-duration'].value ?? 10;\n const delay = halfSize > 0 ? -((targetOffset / halfSize) * cycleDuration) : 0;\n\n // Cancel any in-flight seek timer.\n if (seekTimer !== null) {\n clearTimeout(seekTimer);\n seekTimer = null;\n // Snap the previous transition to its end state immediately.\n track.style.removeProperty('transition');\n }\n\n // No layout (jsdom): instant seek with no visual transition.\n if (halfSize === 0) {\n track.style.setProperty('animation-delay', `${delay}s`);\n\n if (!isHovered) {\n track.style.removeProperty('animation-play-state');\n }\n\n return;\n }\n\n const seekMs =\n parseFloat(getComputedStyle(el).getPropertyValue('--carousel-transition-duration') || '0.35') * 1000 || 350;\n\n const targetTransform = horizontal ? `translateX(-${targetOffset}px)` : `translateY(-${targetOffset}px)`;\n\n // 1. Read the current visual position from the live animation, then\n // kill the animation entirely so nothing else drives transform.\n // getBoundingClientRect() flushes layout so the matrix is current.\n void track.getBoundingClientRect();\n\n const computedTransform = getComputedStyle(track).transform;\n const matrixValues = computedTransform\n .match(/matrix\\(([^)]+)\\)/)?.[1]\n .split(',')\n .map(Number);\n const frozenOffset = horizontal ? (matrixValues?.[4] ?? 0) : (matrixValues?.[5] ?? 0);\n const frozenTransform = horizontal ? `translateX(${frozenOffset}px)` : `translateY(${frozenOffset}px)`;\n\n // Stop the CSS animation — inline transform is now the sole driver.\n track.style.setProperty('animation', 'none');\n track.style.setProperty('transform', frozenTransform);\n\n // 2. Next frame: apply transition and slide to target.\n requestAnimationFrame(() => {\n track.style.setProperty('transition', `transform ${seekMs}ms ease-in-out`);\n track.style.setProperty('transform', targetTransform);\n\n // 3. After the transition completes, restore the keyframe animation\n // at the correct position via negative animation-delay.\n seekTimer = setTimeout(() => {\n seekTimer = null;\n track.style.removeProperty('transition');\n track.style.removeProperty('transform');\n track.style.removeProperty('animation');\n track.style.setProperty('animation-delay', `${delay}s`);\n\n if (isHovered) {\n track.style.setProperty('animation-play-state', 'paused');\n }\n }, seekMs);\n });\n };\n\n return {\n cleanup: () => {\n if (seekTimer !== null) clearTimeout(seekTimer);\n\n seekTimer = null;\n clones.forEach((c) => c.remove());\n track.style.removeProperty('transition');\n track.style.removeProperty('transform');\n track.style.removeProperty('animation');\n track.style.removeProperty('--_marquee-duration');\n track.style.removeProperty('animation-iteration-count');\n track.style.removeProperty('animation-delay');\n track.style.removeProperty('animation-play-state');\n el.removeEventListener('mouseenter', pause);\n el.removeEventListener('mouseleave', resume);\n },\n seekTo,\n };\n };\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n onMounted(() => {\n const shadowRoot = el.shadowRoot!;\n const track = shadowRoot.querySelector<HTMLElement>('.track')!;\n const slot = shadowRoot.querySelector<HTMLSlotElement>('slot')!;\n\n // slotchange replaces MutationObserver — fires exactly when assigned\n // nodes change, scoped to this component's slot, no polling overhead.\n const onSlotChange = (): void => {\n refreshSlides();\n syncSlideVariants();\n syncActiveState();\n\n if (isMarquee.value) {\n marqueeInstance?.cleanup();\n marqueeInstance = setupMarquee(track);\n }\n };\n\n slot.addEventListener('slotchange', onSlotChange);\n\n watch(\n computed(() => ({\n duration: props['marquee-duration'].value,\n isMarquee: isMarquee.value,\n loop: props.loop.value,\n orientation: props.orientation.value,\n })),\n ({ isMarquee: active }) => {\n marqueeInstance?.cleanup();\n marqueeInstance = active ? setupMarquee(track) : null;\n },\n { immediate: true },\n );\n\n if (props.autoplay.value) {\n startAutoplay();\n }\n\n return () => {\n stopAutoplay();\n swipe.dispose();\n slot.removeEventListener('slotchange', onSlotChange);\n marqueeInstance?.cleanup();\n };\n });\n\n // ── Template ─────────────────────────────────────────────────────────────\n\n const focusIndicator = (index: number): void => {\n const dot = el.shadowRoot?.querySelector<HTMLElement>(`.indicator[data-index=\"${index}\"]`);\n\n dot?.focus();\n };\n\n const handleIndicatorKeydown = (e: KeyboardEvent, i: number): void => {\n const count = slideCount.value;\n let target: number | undefined;\n\n switch (e.key) {\n case 'ArrowDown':\n case 'ArrowRight':\n target = (i + 1) % count;\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n target = (i - 1 + count) % count;\n break;\n case 'End':\n target = count - 1;\n break;\n case 'Home':\n target = 0;\n break;\n default:\n return;\n }\n\n e.preventDefault();\n goTo(target);\n focusIndicator(target);\n };\n\n const renderControls = () =>\n showControls.value\n ? html`<div class=\"controls\" part=\"controls\">\n <ore-button\n class=\"nav-btn prev-btn\"\n part=\"prev-btn\"\n variant=\"ghost\"\n :color=${() => props.color.value}\n rounded\n icon-only\n aria-label=\"Previous slide\"\n :disabled=${() => (!canGoPrev.value ? true : undefined)}\n @click=${(e: Event) => {\n e.stopPropagation();\n prev();\n }}>\n <ore-icon\n :name=${() => (isHorizontal.value ? 'chevron-left' : 'chevron-up')}\n size=\"16\"\n stroke-width=\"2\"\n aria-hidden=\"true\"></ore-icon>\n </ore-button>\n <ore-button\n class=\"nav-btn next-btn\"\n part=\"next-btn\"\n variant=\"ghost\"\n :color=${() => props.color.value}\n rounded\n icon-only\n aria-label=\"Next slide\"\n :disabled=${() => (!canGoNext.value ? true : undefined)}\n @click=${(e: Event) => {\n e.stopPropagation();\n next();\n }}>\n <ore-icon\n :name=${() => (isHorizontal.value ? 'chevron-right' : 'chevron-down')}\n size=\"16\"\n stroke-width=\"2\"\n aria-hidden=\"true\"></ore-icon>\n </ore-button>\n </div>`\n : html``;\n\n return html`\n <div class=\"track\" part=\"track\" :aria-live=${() => (props.autoplay.value ? 'off' : 'polite')}>\n <slot></slot>\n </div>\n\n ${() =>\n showIndicators.value && slideCount.value > 1 && !isMarquee.value\n ? html`<div class=\"indicators\" part=\"indicators\" role=\"tablist\" aria-label=\"Slide indicators\">\n ${() =>\n Array.from(\n { length: slideCount.value },\n (_, i) =>\n html`<button\n type=\"button\"\n role=\"tab\"\n data-index=\"${i}\"\n :class=${() =>\n `indicator${!isMarquee.value && i === activeIndex.value ? ' indicator-active' : ''}`}\n :aria-selected=${() => String(!isMarquee.value && i === activeIndex.value)}\n :tabindex=${() => (!isMarquee.value && i === activeIndex.value ? '0' : '-1')}\n aria-label=\"${`Go to slide ${i + 1}`}\"\n @click=${() => goTo(i)}\n @keydown=${(e: KeyboardEvent) => handleIndicatorKeydown(e, i)}>\n <ore-progress\n aria-hidden=\"true\"\n tabindex=\"-1\"\n :color=${() => props.color.value}\n :type=${() => (isHorizontal.value ? 'linear' : 'vertical')}\n :value=${() => (!isMarquee.value && i === activeIndex.value ? 100 : 0)}\n :style=${() => {\n const fillAnim = isHorizontal.value ? 'carousel-fill' : 'carousel-fill-v';\n\n return `--carousel-timeout:${props['autoplay-interval'].value ?? 5000};--carousel-animation-name:${!isMarquee.value && i === activeIndex.value && props.autoplay.value ? fillAnim : 'none'}`;\n }}></ore-progress>\n </button>`,\n )}\n ${renderControls}\n </div>`\n : html`${renderControls}`}\n `;\n },\n styles: [componentStyles],\n});\n"],"mappings":";;;;;;;;AA+HA,IAAa,IAAe,gBAMtB,KAAqB,GAAuB,MAA0B;CAC1E,IAAM,IAAQ,EAAO;CAErB,EAAO,SAAS,GAAO,MAAM;EAC3B,IAAM,IAAS,MAAM;EAOrB,AALA,EAAM,gBAAgB,eAAe,CAAM,GAC3C,EAAM,aAAa,eAAe,OAAO,CAAC,CAAM,CAAC,GACjD,EAAM,aAAa,cAAc,EAAM,aAAa,YAAY,KAAK,SAAS,IAAI,EAAE,MAAM,GAAO,GACjG,EAAM,gBAAgB,sBAAsB,GAC5C,EAAM,gBAAgB,eAAe,IAAI,CAAO,GAChD,EAAM,gBAAgB,cAAc,IAAI,CAAO;CACjD,CAAC;AACH,GAEM,KAAuB,GAAuB,MAA0B;CAC5E,IAAM,IAAQ,EAAO;CAErB,EAAO,SAAS,GAAO,MAAM;EAC3B,IAAM,IAAS,MAAM;EAOrB,AALA,EAAM,gBAAgB,eAAe,CAAM,GAC3C,EAAM,aAAa,eAAe,OAAO,CAAC,CAAM,CAA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