@aceshooting/lyra-ui 2.12.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -2
- package/custom-elements.json +36931 -20053
- package/dist/components/badge/badge.class.d.ts +21 -0
- package/dist/components/badge/badge.class.d.ts.map +1 -0
- package/dist/components/badge/badge.class.js +29 -0
- package/dist/components/badge/badge.class.js.map +1 -0
- package/dist/components/badge/badge.d.ts +2 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +5 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.styles.d.ts +2 -0
- package/dist/components/badge/badge.styles.d.ts.map +1 -0
- package/dist/components/badge/badge.styles.js +10 -0
- package/dist/components/badge/badge.styles.js.map +1 -0
- package/dist/components/badge/tag.class.d.ts +10 -0
- package/dist/components/badge/tag.class.d.ts.map +1 -0
- package/dist/components/badge/tag.class.js +5 -0
- package/dist/components/badge/tag.class.js.map +1 -0
- package/dist/components/badge/tag.d.ts +2 -0
- package/dist/components/badge/tag.d.ts.map +1 -0
- package/dist/components/badge/tag.js +5 -0
- package/dist/components/badge/tag.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.class.d.ts +22 -0
- package/dist/components/breadcrumb/breadcrumb-item.class.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.class.js +40 -0
- package/dist/components/breadcrumb/breadcrumb-item.class.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-item.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.class.d.ts +20 -0
- package/dist/components/breadcrumb/breadcrumb.class.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.class.js +29 -0
- package/dist/components/breadcrumb/breadcrumb.class.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +5 -0
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +8 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js.map +1 -0
- package/dist/components/button-group/button-group.class.d.ts +25 -0
- package/dist/components/button-group/button-group.class.d.ts.map +1 -0
- package/dist/components/button-group/button-group.class.js +39 -0
- package/dist/components/button-group/button-group.class.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +2 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/button-group.js +5 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/button-group/button-group.styles.d.ts +2 -0
- package/dist/components/button-group/button-group.styles.d.ts.map +1 -0
- package/dist/components/button-group/button-group.styles.js +33 -0
- package/dist/components/button-group/button-group.styles.js.map +1 -0
- package/dist/components/callout/callout.class.d.ts +39 -0
- package/dist/components/callout/callout.class.d.ts.map +1 -0
- package/dist/components/callout/callout.class.js +85 -0
- package/dist/components/callout/callout.class.js.map +1 -0
- package/dist/components/callout/callout.d.ts +2 -0
- package/dist/components/callout/callout.d.ts.map +1 -0
- package/dist/components/callout/callout.js +5 -0
- package/dist/components/callout/callout.js.map +1 -0
- package/dist/components/callout/callout.styles.d.ts +2 -0
- package/dist/components/callout/callout.styles.d.ts.map +1 -0
- package/dist/components/callout/callout.styles.js +16 -0
- package/dist/components/callout/callout.styles.js.map +1 -0
- package/dist/components/carousel/carousel-item.class.d.ts +21 -0
- package/dist/components/carousel/carousel-item.class.d.ts.map +1 -0
- package/dist/components/carousel/carousel-item.class.js +19 -0
- package/dist/components/carousel/carousel-item.class.js.map +1 -0
- package/dist/components/carousel/carousel-item.d.ts +2 -0
- package/dist/components/carousel/carousel-item.d.ts.map +1 -0
- package/dist/components/carousel/carousel-item.js +5 -0
- package/dist/components/carousel/carousel-item.js.map +1 -0
- package/dist/components/carousel/carousel-item.styles.d.ts +2 -0
- package/dist/components/carousel/carousel-item.styles.d.ts.map +1 -0
- package/dist/components/carousel/carousel-item.styles.js +12 -0
- package/dist/components/carousel/carousel-item.styles.js.map +1 -0
- package/dist/components/carousel/carousel.class.d.ts +61 -0
- package/dist/components/carousel/carousel.class.d.ts.map +1 -0
- package/dist/components/carousel/carousel.class.js +223 -0
- package/dist/components/carousel/carousel.class.js.map +1 -0
- package/dist/components/carousel/carousel.d.ts +3 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -0
- package/dist/components/carousel/carousel.js +5 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/carousel/carousel.styles.d.ts +2 -0
- package/dist/components/carousel/carousel.styles.d.ts.map +1 -0
- package/dist/components/carousel/carousel.styles.js +81 -0
- package/dist/components/carousel/carousel.styles.js.map +1 -0
- package/dist/components/color-picker/color-picker.class.d.ts +46 -0
- package/dist/components/color-picker/color-picker.class.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.class.js +81 -0
- package/dist/components/color-picker/color-picker.class.js.map +1 -0
- package/dist/components/color-picker/color-picker.d.ts +2 -0
- package/dist/components/color-picker/color-picker.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.js +5 -0
- package/dist/components/color-picker/color-picker.js.map +1 -0
- package/dist/components/color-picker/color-picker.styles.d.ts +2 -0
- package/dist/components/color-picker/color-picker.styles.d.ts.map +1 -0
- package/dist/components/color-picker/color-picker.styles.js +9 -0
- package/dist/components/color-picker/color-picker.styles.js.map +1 -0
- package/dist/components/details/accordion-item.class.d.ts +10 -0
- package/dist/components/details/accordion-item.class.d.ts.map +1 -0
- package/dist/components/details/accordion-item.class.js +5 -0
- package/dist/components/details/accordion-item.class.js.map +1 -0
- package/dist/components/details/accordion-item.d.ts +2 -0
- package/dist/components/details/accordion-item.d.ts.map +1 -0
- package/dist/components/details/accordion-item.js +5 -0
- package/dist/components/details/accordion-item.js.map +1 -0
- package/dist/components/details/accordion.class.d.ts +23 -0
- package/dist/components/details/accordion.class.d.ts.map +1 -0
- package/dist/components/details/accordion.class.js +48 -0
- package/dist/components/details/accordion.class.js.map +1 -0
- package/dist/components/details/accordion.d.ts +2 -0
- package/dist/components/details/accordion.d.ts.map +1 -0
- package/dist/components/details/accordion.js +5 -0
- package/dist/components/details/accordion.js.map +1 -0
- package/dist/components/details/details.class.d.ts +33 -0
- package/dist/components/details/details.class.d.ts.map +1 -0
- package/dist/components/details/details.class.js +63 -0
- package/dist/components/details/details.class.js.map +1 -0
- package/dist/components/details/details.d.ts +2 -0
- package/dist/components/details/details.d.ts.map +1 -0
- package/dist/components/details/details.js +5 -0
- package/dist/components/details/details.js.map +1 -0
- package/dist/components/details/details.styles.d.ts +2 -0
- package/dist/components/details/details.styles.d.ts.map +1 -0
- package/dist/components/details/details.styles.js +13 -0
- package/dist/components/details/details.styles.js.map +1 -0
- package/dist/components/divider/divider.class.d.ts +20 -0
- package/dist/components/divider/divider.class.d.ts.map +1 -0
- package/dist/components/divider/divider.class.js +28 -0
- package/dist/components/divider/divider.class.js.map +1 -0
- package/dist/components/divider/divider.d.ts +2 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/divider/divider.js +5 -0
- package/dist/components/divider/divider.js.map +1 -0
- package/dist/components/divider/divider.styles.d.ts +2 -0
- package/dist/components/divider/divider.styles.d.ts.map +1 -0
- package/dist/components/divider/divider.styles.js +8 -0
- package/dist/components/divider/divider.styles.js.map +1 -0
- package/dist/components/drawer/drawer.class.d.ts +26 -0
- package/dist/components/drawer/drawer.class.d.ts.map +1 -0
- package/dist/components/drawer/drawer.class.js +34 -0
- package/dist/components/drawer/drawer.class.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +3 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.js +5 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/drawer.styles.d.ts +2 -0
- package/dist/components/drawer/drawer.styles.d.ts.map +1 -0
- package/dist/components/drawer/drawer.styles.js +73 -0
- package/dist/components/drawer/drawer.styles.js.map +1 -0
- package/dist/components/format/format-bytes.class.d.ts +21 -0
- package/dist/components/format/format-bytes.class.d.ts.map +1 -0
- package/dist/components/format/format-bytes.class.js +46 -0
- package/dist/components/format/format-bytes.class.js.map +1 -0
- package/dist/components/format/format-bytes.d.ts +2 -0
- package/dist/components/format/format-bytes.d.ts.map +1 -0
- package/dist/components/format/format-bytes.js +5 -0
- package/dist/components/format/format-bytes.js.map +1 -0
- package/dist/components/format/format-date.class.d.ts +25 -0
- package/dist/components/format/format-date.class.d.ts.map +1 -0
- package/dist/components/format/format-date.class.js +59 -0
- package/dist/components/format/format-date.class.js.map +1 -0
- package/dist/components/format/format-date.d.ts +2 -0
- package/dist/components/format/format-date.d.ts.map +1 -0
- package/dist/components/format/format-date.js +5 -0
- package/dist/components/format/format-date.js.map +1 -0
- package/dist/components/format/format-number.class.d.ts +24 -0
- package/dist/components/format/format-number.class.d.ts.map +1 -0
- package/dist/components/format/format-number.class.js +58 -0
- package/dist/components/format/format-number.class.js.map +1 -0
- package/dist/components/format/format-number.d.ts +2 -0
- package/dist/components/format/format-number.d.ts.map +1 -0
- package/dist/components/format/format-number.js +5 -0
- package/dist/components/format/format-number.js.map +1 -0
- package/dist/components/format/format.styles.d.ts +2 -0
- package/dist/components/format/format.styles.d.ts.map +1 -0
- package/dist/components/format/format.styles.js +3 -0
- package/dist/components/format/format.styles.js.map +1 -0
- package/dist/components/format/relative-time.class.d.ts +29 -0
- package/dist/components/format/relative-time.class.d.ts.map +1 -0
- package/dist/components/format/relative-time.class.js +62 -0
- package/dist/components/format/relative-time.class.js.map +1 -0
- package/dist/components/format/relative-time.d.ts +2 -0
- package/dist/components/format/relative-time.d.ts.map +1 -0
- package/dist/components/format/relative-time.js +5 -0
- package/dist/components/format/relative-time.js.map +1 -0
- package/dist/components/image-comparer/image-comparer.class.d.ts +43 -0
- package/dist/components/image-comparer/image-comparer.class.d.ts.map +1 -0
- package/dist/components/image-comparer/image-comparer.class.js +92 -0
- package/dist/components/image-comparer/image-comparer.class.js.map +1 -0
- package/dist/components/image-comparer/image-comparer.d.ts +3 -0
- package/dist/components/image-comparer/image-comparer.d.ts.map +1 -0
- package/dist/components/image-comparer/image-comparer.js +5 -0
- package/dist/components/image-comparer/image-comparer.js.map +1 -0
- package/dist/components/image-comparer/image-comparer.styles.d.ts +2 -0
- package/dist/components/image-comparer/image-comparer.styles.d.ts.map +1 -0
- package/dist/components/image-comparer/image-comparer.styles.js +70 -0
- package/dist/components/image-comparer/image-comparer.styles.js.map +1 -0
- package/dist/components/input/input.class.d.ts +12 -3
- package/dist/components/input/input.class.d.ts.map +1 -1
- package/dist/components/input/input.class.js +35 -2
- package/dist/components/input/input.class.js.map +1 -1
- package/dist/components/input/number-input.class.d.ts +17 -0
- package/dist/components/input/number-input.class.d.ts.map +1 -0
- package/dist/components/input/number-input.class.js +18 -0
- package/dist/components/input/number-input.class.js.map +1 -0
- package/dist/components/input/number-input.d.ts +2 -0
- package/dist/components/input/number-input.d.ts.map +1 -0
- package/dist/components/input/number-input.js +5 -0
- package/dist/components/input/number-input.js.map +1 -0
- package/dist/components/input/time-input.class.d.ts +16 -0
- package/dist/components/input/time-input.class.d.ts.map +1 -0
- package/dist/components/input/time-input.class.js +17 -0
- package/dist/components/input/time-input.class.js.map +1 -0
- package/dist/components/input/time-input.d.ts +2 -0
- package/dist/components/input/time-input.d.ts.map +1 -0
- package/dist/components/input/time-input.js +5 -0
- package/dist/components/input/time-input.js.map +1 -0
- package/dist/components/intersection-observer/intersection-observer.class.d.ts +37 -0
- package/dist/components/intersection-observer/intersection-observer.class.d.ts.map +1 -0
- package/dist/components/intersection-observer/intersection-observer.class.js +77 -0
- package/dist/components/intersection-observer/intersection-observer.class.js.map +1 -0
- package/dist/components/intersection-observer/intersection-observer.d.ts +2 -0
- package/dist/components/intersection-observer/intersection-observer.d.ts.map +1 -0
- package/dist/components/intersection-observer/intersection-observer.js +5 -0
- package/dist/components/intersection-observer/intersection-observer.js.map +1 -0
- package/dist/components/intersection-observer/intersection-observer.styles.d.ts +2 -0
- package/dist/components/intersection-observer/intersection-observer.styles.d.ts.map +1 -0
- package/dist/components/intersection-observer/intersection-observer.styles.js +8 -0
- package/dist/components/intersection-observer/intersection-observer.styles.js.map +1 -0
- package/dist/components/menu/dropdown-item.class.d.ts +18 -0
- package/dist/components/menu/dropdown-item.class.d.ts.map +1 -0
- package/dist/components/menu/dropdown-item.class.js +13 -0
- package/dist/components/menu/dropdown-item.class.js.map +1 -0
- package/dist/components/menu/dropdown-item.d.ts +2 -0
- package/dist/components/menu/dropdown-item.d.ts.map +1 -0
- package/dist/components/menu/dropdown-item.js +5 -0
- package/dist/components/menu/dropdown-item.js.map +1 -0
- package/dist/components/mutation-observer/mutation-observer.class.d.ts +40 -0
- package/dist/components/mutation-observer/mutation-observer.class.d.ts.map +1 -0
- package/dist/components/mutation-observer/mutation-observer.class.js +96 -0
- package/dist/components/mutation-observer/mutation-observer.class.js.map +1 -0
- package/dist/components/mutation-observer/mutation-observer.d.ts +2 -0
- package/dist/components/mutation-observer/mutation-observer.d.ts.map +1 -0
- package/dist/components/mutation-observer/mutation-observer.js +5 -0
- package/dist/components/mutation-observer/mutation-observer.js.map +1 -0
- package/dist/components/mutation-observer/mutation-observer.styles.d.ts +2 -0
- package/dist/components/mutation-observer/mutation-observer.styles.d.ts.map +1 -0
- package/dist/components/mutation-observer/mutation-observer.styles.js +8 -0
- package/dist/components/mutation-observer/mutation-observer.styles.js.map +1 -0
- package/dist/components/overlay/dropdown.class.d.ts +21 -0
- package/dist/components/overlay/dropdown.class.d.ts.map +1 -0
- package/dist/components/overlay/dropdown.class.js +18 -0
- package/dist/components/overlay/dropdown.class.js.map +1 -0
- package/dist/components/overlay/dropdown.d.ts +2 -0
- package/dist/components/overlay/dropdown.d.ts.map +1 -0
- package/dist/components/overlay/dropdown.js +5 -0
- package/dist/components/overlay/dropdown.js.map +1 -0
- package/dist/components/overlay/overlay.styles.d.ts +3 -0
- package/dist/components/overlay/overlay.styles.d.ts.map +1 -0
- package/dist/components/overlay/overlay.styles.js +29 -0
- package/dist/components/overlay/overlay.styles.js.map +1 -0
- package/dist/components/overlay/popover.class.d.ts +48 -0
- package/dist/components/overlay/popover.class.d.ts.map +1 -0
- package/dist/components/overlay/popover.class.js +132 -0
- package/dist/components/overlay/popover.class.js.map +1 -0
- package/dist/components/overlay/popover.d.ts +2 -0
- package/dist/components/overlay/popover.d.ts.map +1 -0
- package/dist/components/overlay/popover.js +5 -0
- package/dist/components/overlay/popover.js.map +1 -0
- package/dist/components/overlay/tooltip.class.d.ts +41 -0
- package/dist/components/overlay/tooltip.class.d.ts.map +1 -0
- package/dist/components/overlay/tooltip.class.js +118 -0
- package/dist/components/overlay/tooltip.class.js.map +1 -0
- package/dist/components/overlay/tooltip.d.ts +2 -0
- package/dist/components/overlay/tooltip.d.ts.map +1 -0
- package/dist/components/overlay/tooltip.js +5 -0
- package/dist/components/overlay/tooltip.js.map +1 -0
- package/dist/components/progress/progress-bar.class.d.ts +30 -0
- package/dist/components/progress/progress-bar.class.d.ts.map +1 -0
- package/dist/components/progress/progress-bar.class.js +61 -0
- package/dist/components/progress/progress-bar.class.js.map +1 -0
- package/dist/components/progress/progress-bar.d.ts +2 -0
- package/dist/components/progress/progress-bar.d.ts.map +1 -0
- package/dist/components/progress/progress-bar.js +5 -0
- package/dist/components/progress/progress-bar.js.map +1 -0
- package/dist/components/progress/progress-ring.class.d.ts +27 -0
- package/dist/components/progress/progress-ring.class.d.ts.map +1 -0
- package/dist/components/progress/progress-ring.class.js +59 -0
- package/dist/components/progress/progress-ring.class.js.map +1 -0
- package/dist/components/progress/progress-ring.d.ts +2 -0
- package/dist/components/progress/progress-ring.d.ts.map +1 -0
- package/dist/components/progress/progress-ring.js +5 -0
- package/dist/components/progress/progress-ring.js.map +1 -0
- package/dist/components/progress/progress.styles.d.ts +3 -0
- package/dist/components/progress/progress.styles.d.ts.map +1 -0
- package/dist/components/progress/progress.styles.js +23 -0
- package/dist/components/progress/progress.styles.js.map +1 -0
- package/dist/components/radio/radio-group.class.d.ts +49 -0
- package/dist/components/radio/radio-group.class.d.ts.map +1 -0
- package/dist/components/radio/radio-group.class.js +137 -0
- package/dist/components/radio/radio-group.class.js.map +1 -0
- package/dist/components/radio/radio-group.d.ts +2 -0
- package/dist/components/radio/radio-group.d.ts.map +1 -0
- package/dist/components/radio/radio-group.js +5 -0
- package/dist/components/radio/radio-group.js.map +1 -0
- package/dist/components/radio/radio-group.styles.d.ts +2 -0
- package/dist/components/radio/radio-group.styles.d.ts.map +1 -0
- package/dist/components/radio/radio-group.styles.js +11 -0
- package/dist/components/radio/radio-group.styles.js.map +1 -0
- package/dist/components/radio/radio.class.d.ts +97 -0
- package/dist/components/radio/radio.class.d.ts.map +1 -0
- package/dist/components/radio/radio.class.js +159 -0
- package/dist/components/radio/radio.class.js.map +1 -0
- package/dist/components/radio/radio.d.ts +2 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio/radio.js +5 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/radio/radio.styles.d.ts +2 -0
- package/dist/components/radio/radio.styles.d.ts.map +1 -0
- package/dist/components/radio/radio.styles.js +57 -0
- package/dist/components/radio/radio.styles.js.map +1 -0
- package/dist/components/rating/rating.class.d.ts +34 -0
- package/dist/components/rating/rating.class.d.ts.map +1 -0
- package/dist/components/rating/rating.class.js +92 -0
- package/dist/components/rating/rating.class.js.map +1 -0
- package/dist/components/rating/rating.d.ts +2 -0
- package/dist/components/rating/rating.d.ts.map +1 -0
- package/dist/components/rating/rating.js +5 -0
- package/dist/components/rating/rating.js.map +1 -0
- package/dist/components/rating/rating.styles.d.ts +2 -0
- package/dist/components/rating/rating.styles.d.ts.map +1 -0
- package/dist/components/rating/rating.styles.js +10 -0
- package/dist/components/rating/rating.styles.js.map +1 -0
- package/dist/components/resize-observer/resize-observer.class.d.ts +37 -0
- package/dist/components/resize-observer/resize-observer.class.d.ts.map +1 -0
- package/dist/components/resize-observer/resize-observer.class.js +74 -0
- package/dist/components/resize-observer/resize-observer.class.js.map +1 -0
- package/dist/components/resize-observer/resize-observer.d.ts +2 -0
- package/dist/components/resize-observer/resize-observer.d.ts.map +1 -0
- package/dist/components/resize-observer/resize-observer.js +5 -0
- package/dist/components/resize-observer/resize-observer.js.map +1 -0
- package/dist/components/resize-observer/resize-observer.styles.d.ts +2 -0
- package/dist/components/resize-observer/resize-observer.styles.d.ts.map +1 -0
- package/dist/components/resize-observer/resize-observer.styles.js +11 -0
- package/dist/components/resize-observer/resize-observer.styles.js.map +1 -0
- package/dist/components/scroller/scroller.class.d.ts +54 -0
- package/dist/components/scroller/scroller.class.d.ts.map +1 -0
- package/dist/components/scroller/scroller.class.js +138 -0
- package/dist/components/scroller/scroller.class.js.map +1 -0
- package/dist/components/scroller/scroller.d.ts +2 -0
- package/dist/components/scroller/scroller.d.ts.map +1 -0
- package/dist/components/scroller/scroller.js +5 -0
- package/dist/components/scroller/scroller.js.map +1 -0
- package/dist/components/scroller/scroller.styles.d.ts +2 -0
- package/dist/components/scroller/scroller.styles.d.ts.map +1 -0
- package/dist/components/scroller/scroller.styles.js +94 -0
- package/dist/components/scroller/scroller.styles.js.map +1 -0
- package/dist/components/spinner/spinner.class.d.ts +24 -0
- package/dist/components/spinner/spinner.class.d.ts.map +1 -0
- package/dist/components/spinner/spinner.class.js +41 -0
- package/dist/components/spinner/spinner.class.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +2 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +5 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/spinner/spinner.styles.d.ts +2 -0
- package/dist/components/spinner/spinner.styles.d.ts.map +1 -0
- package/dist/components/spinner/spinner.styles.js +17 -0
- package/dist/components/spinner/spinner.styles.js.map +1 -0
- package/dist/components/table/table.class.d.ts +87 -0
- package/dist/components/table/table.class.d.ts.map +1 -1
- package/dist/components/table/table.class.js +403 -113
- package/dist/components/table/table.class.js.map +1 -1
- package/dist/components/table/table.styles.d.ts.map +1 -1
- package/dist/components/table/table.styles.js +56 -0
- package/dist/components/table/table.styles.js.map +1 -1
- package/dist/components/textarea/textarea.class.d.ts +6 -2
- package/dist/components/textarea/textarea.class.d.ts.map +1 -1
- package/dist/components/textarea/textarea.class.js +6 -2
- package/dist/components/textarea/textarea.class.js.map +1 -1
- package/dist/components/zoomable-frame/zoomable-frame.class.d.ts +48 -0
- package/dist/components/zoomable-frame/zoomable-frame.class.d.ts.map +1 -0
- package/dist/components/zoomable-frame/zoomable-frame.class.js +115 -0
- package/dist/components/zoomable-frame/zoomable-frame.class.js.map +1 -0
- package/dist/components/zoomable-frame/zoomable-frame.d.ts +3 -0
- package/dist/components/zoomable-frame/zoomable-frame.d.ts.map +1 -0
- package/dist/components/zoomable-frame/zoomable-frame.js +5 -0
- package/dist/components/zoomable-frame/zoomable-frame.js.map +1 -0
- package/dist/components/zoomable-frame/zoomable-frame.styles.d.ts +2 -0
- package/dist/components/zoomable-frame/zoomable-frame.styles.d.ts.map +1 -0
- package/dist/components/zoomable-frame/zoomable-frame.styles.js +77 -0
- package/dist/components/zoomable-frame/zoomable-frame.styles.js.map +1 -0
- package/dist/internal/localization.d.ts +1 -1
- package/dist/internal/localization.d.ts.map +1 -1
- package/dist/internal/localization.js +25 -0
- package/dist/internal/localization.js.map +1 -1
- package/dist/internal/root-registration-allowlist.d.ts +1 -1
- package/dist/internal/root-registration-allowlist.d.ts.map +1 -1
- package/dist/internal/root-registration-allowlist.js +36 -0
- package/dist/internal/root-registration-allowlist.js.map +1 -1
- package/dist/lyra.d.ts +93 -0
- package/dist/lyra.d.ts.map +1 -1
- package/dist/lyra.js +72 -0
- package/dist/lyra.js.map +1 -1
- package/dist/testing/happy-dom-shims.d.ts +5 -1
- package/dist/testing/happy-dom-shims.d.ts.map +1 -1
- package/dist/testing/happy-dom-shims.js +7 -1
- package/dist/testing/happy-dom-shims.js.map +1 -1
- package/llms-full.txt +441 -8
- package/llms.txt +13 -0
- package/package.json +73 -1
|
@@ -13,6 +13,8 @@ import { isRtl } from '../../internal/rtl.js';
|
|
|
13
13
|
import { styles } from './table.styles.js';
|
|
14
14
|
import { chevronIcon } from '../../internal/icons.js';
|
|
15
15
|
import '../empty/empty.class.js';
|
|
16
|
+
import '../pagination/pagination.js';
|
|
17
|
+
import '../spinner/spinner.js';
|
|
16
18
|
/** Interactive elements a nested `cell()` template may render (e.g. an
|
|
17
19
|
* actions-column button). Clicks/keydowns landing on one of these — or
|
|
18
20
|
* bubbling up through one — must not be re-interpreted as row/column
|
|
@@ -103,6 +105,24 @@ function closestInteractive(target, boundary) {
|
|
|
103
105
|
* on activation, mirroring `sortKey`/`selectedKey`'s existing
|
|
104
106
|
* presentational-only convention.
|
|
105
107
|
*
|
|
108
|
+
* Selection is opt-in through the `selectionMode` property. Use `single` or
|
|
109
|
+
* `multiple` to self-manage row selection; the default `none` remains
|
|
110
|
+
* presentational. `selectedKeys` contains the raw keys selected in multiple
|
|
111
|
+
* mode.
|
|
112
|
+
*
|
|
113
|
+
* `filterable` adds a compact search field above the grid. `filterText` is
|
|
114
|
+
* controlled and emits `lyra-filter-change`; `filter` can provide a typed
|
|
115
|
+
* predicate, otherwise the row is matched against its JSON representation.
|
|
116
|
+
* `pageSize` enables controlled pagination through the existing
|
|
117
|
+
* `<lyra-pagination>` primitive. Client mode slices `rows`; server mode
|
|
118
|
+
* renders the supplied page unchanged while using `totalItems` for the
|
|
119
|
+
* navigation summary. `loading` keeps the table shell busy and renders an
|
|
120
|
+
* indeterminate spinner.
|
|
121
|
+
* Columns with `editable: true` open a native text/number editor on
|
|
122
|
+
* double-click and emit `lyra-cell-edit`; row mutation remains consumer-owned.
|
|
123
|
+
* `groupBy` inserts non-focusable group header rows before each group; use
|
|
124
|
+
* `groupLabel` when the raw group key needs custom content.
|
|
125
|
+
*
|
|
106
126
|
* @customElement lyra-table
|
|
107
127
|
* @event lyra-sort - A sortable header was activated. `detail: { key }`.
|
|
108
128
|
* @event lyra-row-click - A row was activated. `detail: { row }`.
|
|
@@ -117,6 +137,10 @@ function closestInteractive(target, boundary) {
|
|
|
117
137
|
* `detail: { row, key }`. Fired only when `expandedContent` is set and
|
|
118
138
|
* the row passes `canExpand`; does not itself mutate `expandedKeys` — the
|
|
119
139
|
* consumer updates it and passes the new value back in.
|
|
140
|
+
* @event lyra-selection-change - Opt-in row selection changed. `detail: { keys }`.
|
|
141
|
+
* @event lyra-filter-change - The filter field changed. `detail: { text }`.
|
|
142
|
+
* @event lyra-page-change - A pagination control requested a page. `detail: { page }`.
|
|
143
|
+
* @event lyra-cell-edit - An inline editor committed a value. `detail: { row, key, value }`.
|
|
120
144
|
* @csspart base - The root wrapper around the `<table>` and its footer controls.
|
|
121
145
|
* @csspart table - The `<table role="grid">` element.
|
|
122
146
|
* @csspart head - The `<thead>` element.
|
|
@@ -126,6 +150,9 @@ function closestInteractive(target, boundary) {
|
|
|
126
150
|
* @csspart foot - The `<tfoot>`, only rendered when at least one column defines `footer`.
|
|
127
151
|
* @csspart footer-row - The single footer row.
|
|
128
152
|
* @csspart footer-cell - A single footer cell.
|
|
153
|
+
* @csspart cell-editor - The native inline cell editor, shown after a double-click on an editable cell.
|
|
154
|
+
* @csspart group-row - A non-focusable group header row.
|
|
155
|
+
* @csspart group-cell - The group header cell.
|
|
129
156
|
* @csspart more-button - The "load more" control, shown when `hasMore` is true.
|
|
130
157
|
* @csspart sort-icon - The chevron shown in the active sortable column's header cell.
|
|
131
158
|
* @csspart reveal-columns-button - The button that toggles `priority`-hidden columns back into view.
|
|
@@ -138,6 +165,11 @@ function closestInteractive(target, boundary) {
|
|
|
138
165
|
* row whose key is in `expandedKeys`.
|
|
139
166
|
* @csspart expanded-cell - The single `colspan`-spanning `<td>` inside
|
|
140
167
|
* `expanded-row`, containing `expandedContent(row)`.
|
|
168
|
+
* @csspart group-row - A non-focusable group header row.
|
|
169
|
+
* @csspart group-cell - The full-width group header cell.
|
|
170
|
+
* @csspart filter - The optional row-filter input.
|
|
171
|
+
* @csspart loading - The loading-state wrapper.
|
|
172
|
+
* @csspart pagination - The optional pagination component.
|
|
141
173
|
*/
|
|
142
174
|
export class LyraTable extends LyraElement {
|
|
143
175
|
constructor() {
|
|
@@ -147,6 +179,21 @@ export class LyraTable extends LyraElement {
|
|
|
147
179
|
this.sortKey = '';
|
|
148
180
|
this.sortDir = 'asc';
|
|
149
181
|
this.selectedKey = null;
|
|
182
|
+
this.selectionMode = 'none';
|
|
183
|
+
this.selectedKeys = new Set();
|
|
184
|
+
this.filterable = false;
|
|
185
|
+
this.filterText = '';
|
|
186
|
+
this.filterLabel = '';
|
|
187
|
+
this.filterPlaceholder = '';
|
|
188
|
+
this.loading = false;
|
|
189
|
+
this.loadingLabel = '';
|
|
190
|
+
/** Set to a positive value to enable the controlled pagination footer. */
|
|
191
|
+
this.pageSize = 0;
|
|
192
|
+
/** Controlled current page used when `pageSize` is positive. */
|
|
193
|
+
this.page = 1;
|
|
194
|
+
/** Total item count for server pagination; `-1` derives it from filtered rows. */
|
|
195
|
+
this.totalItems = -1;
|
|
196
|
+
this.paginationMode = 'client';
|
|
150
197
|
/** Consumer-owned open/closed state, keyed the same way as `rowKey`/
|
|
151
198
|
* `selectedKey`. The table never mutates this itself — it only reads it
|
|
152
199
|
* to decide which rows currently render `expandedContent`; toggle it in
|
|
@@ -188,9 +235,41 @@ export class LyraTable extends LyraElement {
|
|
|
188
235
|
* clicked/navigated to, at which point `focusedRowKey()` falls back to
|
|
189
236
|
* `selectedKey` (if it matches a row) or the first row. */
|
|
190
237
|
this.activeRowKey = null;
|
|
238
|
+
this.editingCell = null;
|
|
191
239
|
this.rowsByKey = new Map();
|
|
192
240
|
this.columnsByKey = new Map();
|
|
193
241
|
this.observedHeaders = new Set();
|
|
242
|
+
this.onFilterInput = (event) => {
|
|
243
|
+
const input = event.currentTarget;
|
|
244
|
+
this.filterText = input.value;
|
|
245
|
+
this.emit('lyra-filter-change', { text: this.filterText });
|
|
246
|
+
};
|
|
247
|
+
this.onPaginationChange = (event) => {
|
|
248
|
+
event.stopPropagation();
|
|
249
|
+
this.emit('lyra-page-change', event.detail);
|
|
250
|
+
};
|
|
251
|
+
this.onEditorKeyDown = (event, rowKey, columnKey) => {
|
|
252
|
+
event.stopPropagation();
|
|
253
|
+
if (event.key === 'Enter') {
|
|
254
|
+
event.preventDefault();
|
|
255
|
+
this.commitEdit(event, rowKey, columnKey);
|
|
256
|
+
}
|
|
257
|
+
else if (event.key === 'Escape') {
|
|
258
|
+
event.preventDefault();
|
|
259
|
+
this.editingCell = null;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
this.onTableDoubleClick = (event) => {
|
|
263
|
+
const target = event.target;
|
|
264
|
+
const table = event.currentTarget;
|
|
265
|
+
if (closestInteractive(target, table))
|
|
266
|
+
return;
|
|
267
|
+
const cell = target.closest('[part="cell"][data-col-key]');
|
|
268
|
+
const row = target.closest('[data-row-key]');
|
|
269
|
+
if (cell && row?.dataset.rowKey && cell.dataset.colKey) {
|
|
270
|
+
this.startEditing(row.dataset.rowKey, cell.dataset.colKey);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
194
273
|
this.toggleColumns = () => {
|
|
195
274
|
this.showAllColumns = !this.showAllColumns;
|
|
196
275
|
this.emit('lyra-columns-revealed', { revealed: this.showAllColumns });
|
|
@@ -310,6 +389,43 @@ export class LyraTable extends LyraElement {
|
|
|
310
389
|
keyOf(row, index) {
|
|
311
390
|
return this.rowKey ? this.rowKey(row) : index;
|
|
312
391
|
}
|
|
392
|
+
matchingEntries() {
|
|
393
|
+
const text = this.filterText.trim();
|
|
394
|
+
if (text === '')
|
|
395
|
+
return this.rows.map((row, index) => ({ row, index }));
|
|
396
|
+
const normalized = text.toLocaleLowerCase(this.effectiveLocale);
|
|
397
|
+
return this.rows.flatMap((row, index) => {
|
|
398
|
+
const matches = this.filter
|
|
399
|
+
? this.filter(row, text)
|
|
400
|
+
: JSON.stringify(row).toLocaleLowerCase(this.effectiveLocale).includes(normalized);
|
|
401
|
+
return matches ? [{ row, index }] : [];
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
get normalizedPageSize() {
|
|
405
|
+
return Number.isFinite(this.pageSize) ? Math.max(0, Math.trunc(this.pageSize)) : 0;
|
|
406
|
+
}
|
|
407
|
+
get matchingTotalItems() {
|
|
408
|
+
if (Number.isFinite(this.totalItems) && this.totalItems >= 0)
|
|
409
|
+
return Math.trunc(this.totalItems);
|
|
410
|
+
return this.matchingEntries().length;
|
|
411
|
+
}
|
|
412
|
+
get pageCount() {
|
|
413
|
+
const pageSize = this.normalizedPageSize;
|
|
414
|
+
return pageSize > 0 ? Math.ceil(this.matchingTotalItems / pageSize) : 0;
|
|
415
|
+
}
|
|
416
|
+
get appliedPage() {
|
|
417
|
+
if (this.pageCount === 0)
|
|
418
|
+
return 1;
|
|
419
|
+
const page = Number.isFinite(this.page) ? Math.trunc(this.page) : 1;
|
|
420
|
+
return Math.min(this.pageCount, Math.max(1, page));
|
|
421
|
+
}
|
|
422
|
+
renderedEntries() {
|
|
423
|
+
const entries = this.matchingEntries();
|
|
424
|
+
if (this.normalizedPageSize === 0 || this.paginationMode === 'server')
|
|
425
|
+
return entries;
|
|
426
|
+
const start = (this.appliedPage - 1) * this.normalizedPageSize;
|
|
427
|
+
return entries.slice(start, start + this.normalizedPageSize);
|
|
428
|
+
}
|
|
313
429
|
/** The header cell that currently owns `tabindex="0"`. */
|
|
314
430
|
focusedColKey() {
|
|
315
431
|
const visible = this.visibleHeaders();
|
|
@@ -330,11 +446,22 @@ export class LyraTable extends LyraElement {
|
|
|
330
446
|
if (this.rowsByKey.has(selected))
|
|
331
447
|
return selected;
|
|
332
448
|
}
|
|
333
|
-
|
|
449
|
+
const first = this.renderedEntries()[0];
|
|
450
|
+
return first ? encodeKey(this.keyOf(first.row, first.index)) : null;
|
|
334
451
|
}
|
|
335
452
|
willUpdate(changed) {
|
|
336
|
-
if (changed.has('rows') ||
|
|
337
|
-
|
|
453
|
+
if (changed.has('rows') ||
|
|
454
|
+
changed.has('rowKey') ||
|
|
455
|
+
changed.has('filterText') ||
|
|
456
|
+
changed.has('filter') ||
|
|
457
|
+
changed.has('page') ||
|
|
458
|
+
changed.has('pageSize') ||
|
|
459
|
+
changed.has('paginationMode') ||
|
|
460
|
+
changed.has('totalItems')) {
|
|
461
|
+
this.rowsByKey = new Map(this.renderedEntries().map((entry) => [
|
|
462
|
+
encodeKey(this.keyOf(entry.row, entry.index)),
|
|
463
|
+
entry,
|
|
464
|
+
]));
|
|
338
465
|
}
|
|
339
466
|
if (changed.has('columns')) {
|
|
340
467
|
this.columnsByKey = new Map(this.columns.map((c) => [c.key, c]));
|
|
@@ -411,6 +538,11 @@ export class LyraTable extends LyraElement {
|
|
|
411
538
|
if (base)
|
|
412
539
|
this.observeBase(base);
|
|
413
540
|
this.observeHeaders();
|
|
541
|
+
if (changed.has('editingCell') && this.editingCell) {
|
|
542
|
+
queueMicrotask(() => {
|
|
543
|
+
this.renderRoot.querySelector('[part="cell-editor"]')?.focus();
|
|
544
|
+
});
|
|
545
|
+
}
|
|
414
546
|
// Deferred to a microtask rather than called synchronously here: a real
|
|
415
547
|
// priority-hidden transition mutates the reactive `columnsHidden`
|
|
416
548
|
// property, and doing that from inside this same updated() call stack
|
|
@@ -429,14 +561,50 @@ export class LyraTable extends LyraElement {
|
|
|
429
561
|
}
|
|
430
562
|
activateRow(key) {
|
|
431
563
|
this.activeRowKey = key;
|
|
432
|
-
const
|
|
433
|
-
if (
|
|
434
|
-
|
|
564
|
+
const entry = this.rowsByKey.get(key);
|
|
565
|
+
if (entry === undefined)
|
|
566
|
+
return;
|
|
567
|
+
const { row, index } = entry;
|
|
568
|
+
this.emit('lyra-row-click', { row });
|
|
569
|
+
if (this.selectionMode === 'single') {
|
|
570
|
+
this.selectedKey = this.keyOf(row, index);
|
|
571
|
+
this.emit('lyra-selection-change', { keys: this.selectedKey === null ? [] : [this.selectedKey] });
|
|
572
|
+
}
|
|
573
|
+
else if (this.selectionMode === 'multiple') {
|
|
574
|
+
const rawKey = this.keyOf(row, index);
|
|
575
|
+
const next = new Set(this.selectedKeys);
|
|
576
|
+
if (next.has(rawKey))
|
|
577
|
+
next.delete(rawKey);
|
|
578
|
+
else
|
|
579
|
+
next.add(rawKey);
|
|
580
|
+
this.selectedKeys = next;
|
|
581
|
+
this.emit('lyra-selection-change', { keys: [...next] });
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
editorValue(row, column) {
|
|
585
|
+
const value = column.editValue?.(row) ?? row[column.key] ?? '';
|
|
586
|
+
return String(value);
|
|
587
|
+
}
|
|
588
|
+
startEditing(rowKey, columnKey) {
|
|
589
|
+
const column = this.columnsByKey.get(columnKey);
|
|
590
|
+
if (!column?.editable || !this.rowsByKey.has(rowKey))
|
|
591
|
+
return;
|
|
592
|
+
this.editingCell = { rowKey, columnKey };
|
|
593
|
+
}
|
|
594
|
+
commitEdit(event, rowKey, columnKey) {
|
|
595
|
+
const input = event.currentTarget;
|
|
596
|
+
const entry = this.rowsByKey.get(rowKey);
|
|
597
|
+
const column = this.columnsByKey.get(columnKey);
|
|
598
|
+
if (!entry || !column?.editable)
|
|
599
|
+
return;
|
|
600
|
+
const value = column.editType === 'number' && input.value !== '' ? Number(input.value) : input.value;
|
|
601
|
+
this.emit('lyra-cell-edit', { row: entry.row, key: columnKey, value });
|
|
602
|
+
this.editingCell = null;
|
|
435
603
|
}
|
|
436
604
|
activateExpandToggle(key) {
|
|
437
|
-
const
|
|
438
|
-
if (
|
|
439
|
-
this.emit('lyra-row-expand-toggle', { row, key });
|
|
605
|
+
const entry = this.rowsByKey.get(encodeKey(key));
|
|
606
|
+
if (entry !== undefined)
|
|
607
|
+
this.emit('lyra-row-expand-toggle', { row: entry.row, key });
|
|
440
608
|
}
|
|
441
609
|
/** Header cells currently in the tab sequence — excludes columns hidden by
|
|
442
610
|
* a `priority`-driven `@container` rule (table.styles.ts), so Left/Right/
|
|
@@ -548,7 +716,17 @@ export class LyraTable extends LyraElement {
|
|
|
548
716
|
description=${this.noColumnsDescription}
|
|
549
717
|
></lyra-empty>`;
|
|
550
718
|
}
|
|
551
|
-
if (this.
|
|
719
|
+
if (this.loading) {
|
|
720
|
+
return html `<div part="base" aria-busy="true">
|
|
721
|
+
<div part="loading" role="status" aria-live="polite">
|
|
722
|
+
<lyra-spinner label-placement="after" accessible-label=${this.localize('tableLoading', this.loadingLabel || undefined)}>
|
|
723
|
+
${this.localize('tableLoading', this.loadingLabel || undefined)}
|
|
724
|
+
</lyra-spinner>
|
|
725
|
+
</div>
|
|
726
|
+
</div>`;
|
|
727
|
+
}
|
|
728
|
+
const matchingEntries = this.matchingEntries();
|
|
729
|
+
if (this.rows.length === 0 && !this.filterable && this.normalizedPageSize === 0) {
|
|
552
730
|
return html `<lyra-empty
|
|
553
731
|
heading=${this.localize('noData', this.emptyHeading || undefined)}
|
|
554
732
|
description=${this.emptyDescription}
|
|
@@ -558,114 +736,167 @@ export class LyraTable extends LyraElement {
|
|
|
558
736
|
const focusedRow = this.focusedRowKey();
|
|
559
737
|
const hasColumnWidths = this.columns.some((col) => col.width);
|
|
560
738
|
const hasExpand = Boolean(this.expandedContent);
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
data-align=${col.align ?? 'start'}
|
|
589
|
-
data-priority=${col.priority ?? nothing}
|
|
590
|
-
data-sticky=${stickyDirection(col.sticky) ?? nothing}
|
|
591
|
-
?data-sortable=${col.sortable}
|
|
592
|
-
aria-sort=${col.sortable ? ariaSort : nothing}
|
|
593
|
-
tabindex=${col.key === focusedCol ? '0' : '-1'}
|
|
594
|
-
>
|
|
595
|
-
${col.headerCell ? col.headerCell(col) : col.label}
|
|
596
|
-
${active
|
|
597
|
-
? html `<span part="sort-icon" data-dir=${this.sortDir} aria-hidden="true"
|
|
598
|
-
>${chevronIcon()}</span
|
|
599
|
-
>`
|
|
739
|
+
const renderedEntries = this.renderedEntries();
|
|
740
|
+
const hasPagination = this.normalizedPageSize > 0;
|
|
741
|
+
const filterLabel = this.localize('tableFilterLabel', this.filterLabel || undefined);
|
|
742
|
+
const filterPlaceholder = this.localize('tableFilterPlaceholder', this.filterPlaceholder || undefined);
|
|
743
|
+
const tableContent = renderedEntries.length === 0
|
|
744
|
+
? html `<lyra-empty
|
|
745
|
+
compact
|
|
746
|
+
heading=${this.localize('noData', this.emptyHeading || undefined)}
|
|
747
|
+
description=${this.emptyDescription}
|
|
748
|
+
></lyra-empty>`
|
|
749
|
+
: html `<table
|
|
750
|
+
part="table"
|
|
751
|
+
role="grid"
|
|
752
|
+
aria-label=${this.getAttribute('aria-label') || nothing}
|
|
753
|
+
?data-has-column-widths=${hasColumnWidths}
|
|
754
|
+
@click=${this.onTableClick}
|
|
755
|
+
@keydown=${this.onTableKeyDown}
|
|
756
|
+
@dblclick=${this.onTableDoubleClick}
|
|
757
|
+
>
|
|
758
|
+
<colgroup>
|
|
759
|
+
${hasExpand ? html `<col style=${styleMap({ 'inline-size': '2.5rem' })} />` : nothing}
|
|
760
|
+
${this.columns.map((col) => html `<col style=${styleMap({ 'inline-size': col.width, 'min-inline-size': col.minWidth })} />`)}
|
|
761
|
+
</colgroup>
|
|
762
|
+
<thead part="head">
|
|
763
|
+
<tr role="row">
|
|
764
|
+
${hasExpand
|
|
765
|
+
? html `<th part="header-cell" data-row-expand-toggle aria-hidden="true"></th>`
|
|
600
766
|
: nothing}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
data-row-key=${encodeKey(key)}
|
|
616
|
-
aria-selected=${selected ? 'true' : 'false'}
|
|
617
|
-
tabindex=${encodeKey(key) === focusedRow ? '0' : '-1'}
|
|
767
|
+
${this.columns.map((col) => {
|
|
768
|
+
const active = Boolean(col.sortable) && this.sortKey === col.key;
|
|
769
|
+
const ariaSort = active ? (this.sortDir === 'asc' ? 'ascending' : 'descending') : 'none';
|
|
770
|
+
return html `<th
|
|
771
|
+
part="header-cell"
|
|
772
|
+
role="columnheader"
|
|
773
|
+
scope="col"
|
|
774
|
+
data-col-key=${col.key}
|
|
775
|
+
data-align=${col.align ?? 'start'}
|
|
776
|
+
data-priority=${col.priority ?? nothing}
|
|
777
|
+
data-sticky=${stickyDirection(col.sticky) ?? nothing}
|
|
778
|
+
?data-sortable=${col.sortable}
|
|
779
|
+
aria-sort=${col.sortable ? ariaSort : nothing}
|
|
780
|
+
tabindex=${col.key === focusedCol ? '0' : '-1'}
|
|
618
781
|
>
|
|
619
|
-
${
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
part="row-expand-toggle"
|
|
625
|
-
aria-expanded=${String(rowExpanded)}
|
|
626
|
-
aria-label=${this.localize(rowExpanded ? 'collapse' : 'expand')}
|
|
627
|
-
@click=${() => this.activateExpandToggle(key)}
|
|
628
|
-
>
|
|
629
|
-
<span part="row-expand-icon" aria-hidden="true">${chevronIcon()}</span>
|
|
630
|
-
</button>`
|
|
631
|
-
: nothing}
|
|
632
|
-
</td>`
|
|
782
|
+
${col.headerCell ? col.headerCell(col) : col.label}
|
|
783
|
+
${active
|
|
784
|
+
? html `<span part="sort-icon" data-dir=${this.sortDir} aria-hidden="true"
|
|
785
|
+
>${chevronIcon()}</span
|
|
786
|
+
>`
|
|
633
787
|
: nothing}
|
|
788
|
+
</th>`;
|
|
789
|
+
})}
|
|
790
|
+
</tr>
|
|
791
|
+
</thead>
|
|
792
|
+
<tbody>
|
|
793
|
+
${repeat(renderedEntries, (entry) => this.keyOf(entry.row, entry.index), (entry, entryIndex) => {
|
|
794
|
+
const { row, index } = entry;
|
|
795
|
+
const key = this.keyOf(row, index);
|
|
796
|
+
const selected = (this.selectedKey !== null && this.selectedKey === key) || this.selectedKeys.has(key);
|
|
797
|
+
const canExpandRow = hasExpand && (this.canExpand ? this.canExpand(row) : true);
|
|
798
|
+
const rowExpanded = canExpandRow && this.expandedKeys.has(key);
|
|
799
|
+
const groupKey = this.groupBy?.(row);
|
|
800
|
+
const previousGroupKey = entryIndex > 0 ? this.groupBy?.(renderedEntries[entryIndex - 1].row) : undefined;
|
|
801
|
+
const isNewGroup = this.groupBy !== undefined && (entryIndex === 0 || groupKey !== previousGroupKey);
|
|
802
|
+
return [
|
|
803
|
+
isNewGroup
|
|
804
|
+
? html `<tr part="group-row" role="row">
|
|
805
|
+
<td
|
|
806
|
+
part="group-cell"
|
|
807
|
+
role="gridcell"
|
|
808
|
+
colspan=${this.columns.length + (hasExpand ? 1 : 0)}
|
|
809
|
+
>
|
|
810
|
+
${this.groupLabel
|
|
811
|
+
? this.groupLabel(groupKey, renderedEntries
|
|
812
|
+
.filter((candidate) => this.groupBy?.(candidate.row) === groupKey)
|
|
813
|
+
.map((candidate) => candidate.row))
|
|
814
|
+
: String(groupKey)}
|
|
815
|
+
</td>
|
|
816
|
+
</tr>`
|
|
817
|
+
: nothing,
|
|
818
|
+
html `<tr
|
|
819
|
+
part="row"
|
|
820
|
+
role="row"
|
|
821
|
+
data-row-key=${encodeKey(key)}
|
|
822
|
+
aria-selected=${selected ? 'true' : 'false'}
|
|
823
|
+
tabindex=${encodeKey(key) === focusedRow ? '0' : '-1'}
|
|
824
|
+
>
|
|
825
|
+
${hasExpand
|
|
826
|
+
? html `<td part="expand-toggle-cell">
|
|
827
|
+
${canExpandRow
|
|
828
|
+
? html `<button
|
|
829
|
+
type="button"
|
|
830
|
+
part="row-expand-toggle"
|
|
831
|
+
aria-expanded=${String(rowExpanded)}
|
|
832
|
+
aria-label=${this.localize(rowExpanded ? 'collapse' : 'expand')}
|
|
833
|
+
@click=${() => this.activateExpandToggle(key)}
|
|
834
|
+
>
|
|
835
|
+
<span part="row-expand-icon" aria-hidden="true">${chevronIcon()}</span>
|
|
836
|
+
</button>`
|
|
837
|
+
: nothing}
|
|
838
|
+
</td>`
|
|
839
|
+
: nothing}
|
|
840
|
+
${this.columns.map((col) => html `<td
|
|
841
|
+
part="cell"
|
|
842
|
+
role="gridcell"
|
|
843
|
+
data-col-key=${col.key}
|
|
844
|
+
data-align=${col.align ?? 'start'}
|
|
845
|
+
data-priority=${col.priority ?? nothing}
|
|
846
|
+
data-sticky=${stickyDirection(col.sticky) ?? nothing}
|
|
847
|
+
style=${col.cellStyle ? styleMap(col.cellStyle(row) ?? {}) : nothing}
|
|
848
|
+
>
|
|
849
|
+
${this.editingCell?.rowKey === encodeKey(key) && this.editingCell.columnKey === col.key
|
|
850
|
+
? html `<input
|
|
851
|
+
part="cell-editor"
|
|
852
|
+
type=${col.editType ?? 'text'}
|
|
853
|
+
.value=${this.editorValue(row, col)}
|
|
854
|
+
aria-label=${this.localize('tableEditCell', undefined, { column: col.label })}
|
|
855
|
+
@change=${(event) => this.commitEdit(event, encodeKey(key), col.key)}
|
|
856
|
+
@keydown=${(event) => this.onEditorKeyDown(event, encodeKey(key), col.key)}
|
|
857
|
+
/>`
|
|
858
|
+
: col.cell(row)}
|
|
859
|
+
</td>`)}
|
|
860
|
+
</tr>`,
|
|
861
|
+
rowExpanded
|
|
862
|
+
? html `<tr part="expanded-row" role="row">
|
|
863
|
+
<td part="expanded-cell" role="gridcell" colspan=${this.columns.length + (hasExpand ? 1 : 0)}>
|
|
864
|
+
${this.expandedContent?.(row)}
|
|
865
|
+
</td>
|
|
866
|
+
</tr>`
|
|
867
|
+
: nothing,
|
|
868
|
+
];
|
|
869
|
+
})}
|
|
870
|
+
</tbody>
|
|
871
|
+
${this.columns.some((c) => c.footer)
|
|
872
|
+
? html `<tfoot part="foot">
|
|
873
|
+
<tr part="footer-row">
|
|
874
|
+
${hasExpand ? html `<td part="footer-cell" aria-hidden="true"></td>` : nothing}
|
|
634
875
|
${this.columns.map((col) => html `<td
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
? html `<tfoot part="foot">
|
|
658
|
-
<tr part="footer-row">
|
|
659
|
-
${hasExpand ? html `<td part="footer-cell" aria-hidden="true"></td>` : nothing}
|
|
660
|
-
${this.columns.map((col) => html `<td
|
|
661
|
-
part="footer-cell"
|
|
662
|
-
data-col-key=${col.key}
|
|
663
|
-
data-align=${col.align ?? 'start'}
|
|
664
|
-
>${col.footer?.(this.rows) ?? ''}</td>`)}
|
|
665
|
-
</tr>
|
|
666
|
-
</tfoot>`
|
|
876
|
+
part="footer-cell"
|
|
877
|
+
data-col-key=${col.key}
|
|
878
|
+
data-align=${col.align ?? 'start'}
|
|
879
|
+
>${col.footer?.(matchingEntries.map((entry) => entry.row)) ?? ''}</td>`)}
|
|
880
|
+
</tr>
|
|
881
|
+
</tfoot>`
|
|
882
|
+
: nothing}
|
|
883
|
+
</table>`;
|
|
884
|
+
return html `
|
|
885
|
+
<div part="base" ?data-force-visible=${this.showAllColumns} aria-busy="false">
|
|
886
|
+
${this.filterable
|
|
887
|
+
? html `<label part="filter-label">
|
|
888
|
+
${filterLabel}
|
|
889
|
+
<input
|
|
890
|
+
part="filter"
|
|
891
|
+
type="search"
|
|
892
|
+
.value=${this.filterText}
|
|
893
|
+
placeholder=${filterPlaceholder}
|
|
894
|
+
aria-label=${filterLabel}
|
|
895
|
+
@input=${this.onFilterInput}
|
|
896
|
+
/>
|
|
897
|
+
</label>`
|
|
667
898
|
: nothing}
|
|
668
|
-
|
|
899
|
+
${tableContent}
|
|
669
900
|
${this.columnsHidden
|
|
670
901
|
? html `<button
|
|
671
902
|
part="reveal-columns-button"
|
|
@@ -687,6 +918,17 @@ export class LyraTable extends LyraElement {
|
|
|
687
918
|
${this.localize('loadMore', this.moreLabel || undefined)}
|
|
688
919
|
</button>`
|
|
689
920
|
: nothing}
|
|
921
|
+
${hasPagination
|
|
922
|
+
? html `<lyra-pagination
|
|
923
|
+
part="pagination"
|
|
924
|
+
.page=${this.page}
|
|
925
|
+
.pageSize=${this.normalizedPageSize}
|
|
926
|
+
.totalItems=${this.matchingTotalItems}
|
|
927
|
+
.strings=${this.strings}
|
|
928
|
+
hide-summary
|
|
929
|
+
@lyra-page-change=${this.onPaginationChange}
|
|
930
|
+
></lyra-pagination>`
|
|
931
|
+
: nothing}
|
|
690
932
|
</div>
|
|
691
933
|
`;
|
|
692
934
|
}
|
|
@@ -709,6 +951,51 @@ __decorate([
|
|
|
709
951
|
__decorate([
|
|
710
952
|
property({ attribute: false })
|
|
711
953
|
], LyraTable.prototype, "selectedKey", void 0);
|
|
954
|
+
__decorate([
|
|
955
|
+
property({ reflect: true, attribute: 'selection-mode' })
|
|
956
|
+
], LyraTable.prototype, "selectionMode", void 0);
|
|
957
|
+
__decorate([
|
|
958
|
+
property({ attribute: false })
|
|
959
|
+
], LyraTable.prototype, "selectedKeys", void 0);
|
|
960
|
+
__decorate([
|
|
961
|
+
property({ type: Boolean, reflect: true })
|
|
962
|
+
], LyraTable.prototype, "filterable", void 0);
|
|
963
|
+
__decorate([
|
|
964
|
+
property({ attribute: 'filter-text' })
|
|
965
|
+
], LyraTable.prototype, "filterText", void 0);
|
|
966
|
+
__decorate([
|
|
967
|
+
property({ attribute: false })
|
|
968
|
+
], LyraTable.prototype, "filter", void 0);
|
|
969
|
+
__decorate([
|
|
970
|
+
property({ attribute: 'filter-label' })
|
|
971
|
+
], LyraTable.prototype, "filterLabel", void 0);
|
|
972
|
+
__decorate([
|
|
973
|
+
property({ attribute: 'filter-placeholder' })
|
|
974
|
+
], LyraTable.prototype, "filterPlaceholder", void 0);
|
|
975
|
+
__decorate([
|
|
976
|
+
property({ type: Boolean, reflect: true })
|
|
977
|
+
], LyraTable.prototype, "loading", void 0);
|
|
978
|
+
__decorate([
|
|
979
|
+
property({ attribute: 'loading-label' })
|
|
980
|
+
], LyraTable.prototype, "loadingLabel", void 0);
|
|
981
|
+
__decorate([
|
|
982
|
+
property({ attribute: false })
|
|
983
|
+
], LyraTable.prototype, "groupBy", void 0);
|
|
984
|
+
__decorate([
|
|
985
|
+
property({ attribute: false })
|
|
986
|
+
], LyraTable.prototype, "groupLabel", void 0);
|
|
987
|
+
__decorate([
|
|
988
|
+
property({ type: Number, attribute: 'page-size' })
|
|
989
|
+
], LyraTable.prototype, "pageSize", void 0);
|
|
990
|
+
__decorate([
|
|
991
|
+
property({ type: Number, reflect: true })
|
|
992
|
+
], LyraTable.prototype, "page", void 0);
|
|
993
|
+
__decorate([
|
|
994
|
+
property({ type: Number, attribute: 'total-items' })
|
|
995
|
+
], LyraTable.prototype, "totalItems", void 0);
|
|
996
|
+
__decorate([
|
|
997
|
+
property({ reflect: true, attribute: 'pagination-mode' })
|
|
998
|
+
], LyraTable.prototype, "paginationMode", void 0);
|
|
712
999
|
__decorate([
|
|
713
1000
|
property({ attribute: false })
|
|
714
1001
|
], LyraTable.prototype, "expandedContent", void 0);
|
|
@@ -754,4 +1041,7 @@ __decorate([
|
|
|
754
1041
|
__decorate([
|
|
755
1042
|
state()
|
|
756
1043
|
], LyraTable.prototype, "activeRowKey", void 0);
|
|
1044
|
+
__decorate([
|
|
1045
|
+
state()
|
|
1046
|
+
], LyraTable.prototype, "editingCell", void 0);
|
|
757
1047
|
//# sourceMappingURL=table.class.js.map
|