@getufy/flint-ui 0.1.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/dist/_shared/decorate-DPS9PT8d.js +9 -0
- package/dist/_shared/flint-accordion-CnXIksxN.js +104 -0
- package/dist/_shared/flint-alert-DNcwWxQL.js +59 -0
- package/dist/_shared/flint-app-bar-CNbq6ggt.js +39 -0
- package/dist/_shared/flint-autocomplete-B1tLM8lN.js +131 -0
- package/dist/_shared/flint-avatar-DSQJv4gX.js +40 -0
- package/dist/_shared/flint-backdrop-BszHm5cJ.js +58 -0
- package/dist/_shared/flint-badge-AzmcBWUq.js +38 -0
- package/dist/_shared/flint-bottom-navigation-B4-3_1w7.js +46 -0
- package/dist/_shared/flint-bottom-navigation-action-CW0ZUZlF.js +44 -0
- package/dist/_shared/flint-box-TbPTowiO.js +60 -0
- package/dist/_shared/flint-breadcrumbs-DjFiMWIj.js +83 -0
- package/dist/_shared/flint-button-DwrmFg7O.js +39 -0
- package/dist/_shared/flint-button-group-CdwiDTLI.js +20 -0
- package/dist/_shared/flint-card-C-j6SYxM.js +33 -0
- package/dist/_shared/flint-card-action-area-07Emwi1d.js +22 -0
- package/dist/_shared/flint-card-actions-C74ZbYNI.js +17 -0
- package/dist/_shared/flint-card-content-C3Gv3Ps5.js +17 -0
- package/dist/_shared/flint-card-header-HxL5TlBx.js +28 -0
- package/dist/_shared/flint-card-media-B1U9TYsC.js +26 -0
- package/dist/_shared/flint-carousel-jwZ5C4e_.js +224 -0
- package/dist/_shared/flint-checkbox-GnuZq0Yy.js +82 -0
- package/dist/_shared/flint-chip-5QF8rU8e.js +86 -0
- package/dist/_shared/flint-circular-progress-CuR8VdqI.js +68 -0
- package/dist/_shared/flint-collapsible-BJ4LwGpz.js +101 -0
- package/dist/_shared/flint-command-DGhby0QI.js +318 -0
- package/dist/_shared/flint-container-CYSq758Y.js +42 -0
- package/dist/_shared/flint-copy-button-Y4yVbPxo.js +142 -0
- package/dist/_shared/flint-date-field-CYSc9ezt.js +288 -0
- package/dist/_shared/flint-date-picker-CmCtDBVO.js +370 -0
- package/dist/_shared/flint-date-range-calendar-BPBdO9n3.js +122 -0
- package/dist/_shared/flint-date-range-picker-DiVjn_ST.js +201 -0
- package/dist/_shared/flint-dialog-CH1ylFUb.js +113 -0
- package/dist/_shared/flint-divider-Boj8Ggbt.js +37 -0
- package/dist/_shared/flint-drawer-BAukflTn.js +79 -0
- package/dist/_shared/flint-empty-Bq8DuJQT.js +75 -0
- package/dist/_shared/flint-fab-D8nKcAan.js +77 -0
- package/dist/_shared/flint-format-date-_jfKYO_2.js +62 -0
- package/dist/_shared/flint-format-number-g8MkggyM.js +68 -0
- package/dist/_shared/flint-grid-ClCXGz3k.js +177 -0
- package/dist/_shared/flint-hover-card-fSMVR0xj.js +125 -0
- package/dist/_shared/flint-image-comparer-DDF_wCjc.js +116 -0
- package/dist/_shared/flint-image-list-CS-XDM0T.js +24 -0
- package/dist/_shared/flint-image-list-item-CE1j29Ay.js +41 -0
- package/dist/_shared/flint-image-list-item-bar-BZfSoVrZ.js +31 -0
- package/dist/_shared/flint-input-BV4Glu8N.js +87 -0
- package/dist/_shared/flint-input-otp-__geY8N4.js +203 -0
- package/dist/_shared/flint-item-XvdemneV.js +114 -0
- package/dist/_shared/flint-kbd-DXSl3YcK.js +31 -0
- package/dist/_shared/flint-linear-progress-B4sGgZrk.js +63 -0
- package/dist/_shared/flint-link-CnzR1CYQ.js +55 -0
- package/dist/_shared/flint-list-DJCPEDre.js +113 -0
- package/dist/_shared/flint-menu-EOF1QvHq.js +207 -0
- package/dist/_shared/flint-menubar-7AuGQli6.js +666 -0
- package/dist/_shared/flint-pagination-D-KNsfjM.js +143 -0
- package/dist/_shared/flint-paper-CArGvvRa.js +27 -0
- package/dist/_shared/flint-radio-B_C3wNRn.js +165 -0
- package/dist/_shared/flint-range-slider-IfXMtey2.js +129 -0
- package/dist/_shared/flint-rating-9FxNfBNa.js +148 -0
- package/dist/_shared/flint-relative-time-BFh5nQqz.js +98 -0
- package/dist/_shared/flint-rich-tree-view-BGUjgeZv.js +383 -0
- package/dist/_shared/flint-scroll-area-Dn9yT7ZU.js +227 -0
- package/dist/_shared/flint-select-Bhc3BR09.js +249 -0
- package/dist/_shared/flint-simple-tree-view-DD3zHLzJ.js +175 -0
- package/dist/_shared/flint-single-input-date-range-field-BVGf6515.js +314 -0
- package/dist/_shared/flint-skeleton-CWFa-PkE.js +54 -0
- package/dist/_shared/flint-slider-CVb_rYPp.js +97 -0
- package/dist/_shared/flint-snackbar-DS5F7oXF.js +102 -0
- package/dist/_shared/flint-sonner-DD_qGTfm.js +230 -0
- package/dist/_shared/flint-speed-dial-DTZ2WaBh.js +259 -0
- package/dist/_shared/flint-stack-GAeGPdLR.js +98 -0
- package/dist/_shared/flint-stepper-DdkEEVXE.js +285 -0
- package/dist/_shared/flint-switch-DN7VI9jT.js +80 -0
- package/dist/_shared/flint-table-DQ--YqEC.js +112 -0
- package/dist/_shared/flint-table-pagination-BrJ56t-r.js +97 -0
- package/dist/_shared/flint-table-sort-label-C4mkQmDM.js +37 -0
- package/dist/_shared/flint-tabs-Do8hU-DT.js +226 -0
- package/dist/_shared/flint-text-field-DlLvuIJW.js +76 -0
- package/dist/_shared/flint-textarea-wDEUC9Bt.js +106 -0
- package/dist/_shared/flint-time-picker-D00w7wjz.js +817 -0
- package/dist/_shared/flint-toggle-DTT9i3J2.js +61 -0
- package/dist/_shared/flint-toggle-button-GmL4rbZa.js +48 -0
- package/dist/_shared/flint-toggle-button-group-Cp9x0wSj.js +52 -0
- package/dist/_shared/flint-tooltip-C9nJvtJi.js +108 -0
- package/dist/_shared/flint-transfer-list-DZsAcF0l.js +173 -0
- package/dist/_shared/flint-tree-item-iMT216uo.js +130 -0
- package/dist/_shared/flint-typography-D0vqF15X.js +66 -0
- package/dist/_shared/flint-visually-hidden-CqgpY__B.js +22 -0
- package/dist/_shared/form-associated-EGIhyHHt.js +20 -0
- package/dist/accordion/flint-accordion.d.ts +61 -0
- package/dist/accordion/flint-accordion.d.ts.map +1 -0
- package/dist/accordion/flint-accordion.js +2 -0
- package/dist/alert/flint-alert.d.ts +35 -0
- package/dist/alert/flint-alert.d.ts.map +1 -0
- package/dist/alert/flint-alert.js +2 -0
- package/dist/app-bar/flint-app-bar.d.ts +20 -0
- package/dist/app-bar/flint-app-bar.d.ts.map +1 -0
- package/dist/app-bar/flint-app-bar.js +2 -0
- package/dist/autocomplete/flint-autocomplete.d.ts +44 -0
- package/dist/autocomplete/flint-autocomplete.d.ts.map +1 -0
- package/dist/autocomplete/flint-autocomplete.js +2 -0
- package/dist/avatar/flint-avatar.d.ts +26 -0
- package/dist/avatar/flint-avatar.d.ts.map +1 -0
- package/dist/avatar/flint-avatar.js +2 -0
- package/dist/backdrop/flint-backdrop.d.ts +28 -0
- package/dist/backdrop/flint-backdrop.d.ts.map +1 -0
- package/dist/backdrop/flint-backdrop.js +2 -0
- package/dist/badge/flint-badge.d.ts +27 -0
- package/dist/badge/flint-badge.d.ts.map +1 -0
- package/dist/badge/flint-badge.js +2 -0
- package/dist/bottom-navigation/flint-bottom-navigation-action.d.ts +34 -0
- package/dist/bottom-navigation/flint-bottom-navigation-action.d.ts.map +1 -0
- package/dist/bottom-navigation/flint-bottom-navigation-action.js +2 -0
- package/dist/bottom-navigation/flint-bottom-navigation.d.ts +30 -0
- package/dist/bottom-navigation/flint-bottom-navigation.d.ts.map +1 -0
- package/dist/bottom-navigation/flint-bottom-navigation.js +2 -0
- package/dist/box/flint-box.d.ts +79 -0
- package/dist/box/flint-box.d.ts.map +1 -0
- package/dist/box/flint-box.js +2 -0
- package/dist/breadcrumbs/flint-breadcrumbs.d.ts +50 -0
- package/dist/breadcrumbs/flint-breadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs/flint-breadcrumbs.js +2 -0
- package/dist/button/flint-button-group.d.ts +12 -0
- package/dist/button/flint-button-group.d.ts.map +1 -0
- package/dist/button/flint-button-group.js +2 -0
- package/dist/button/flint-button.d.ts +19 -0
- package/dist/button/flint-button.d.ts.map +1 -0
- package/dist/button/flint-button.js +2 -0
- package/dist/button/flint-toggle-button-group.d.ts +25 -0
- package/dist/button/flint-toggle-button-group.d.ts.map +1 -0
- package/dist/button/flint-toggle-button-group.js +2 -0
- package/dist/button/flint-toggle-button.d.ts +25 -0
- package/dist/button/flint-toggle-button.d.ts.map +1 -0
- package/dist/button/flint-toggle-button.js +2 -0
- package/dist/card/flint-card-action-area.d.ts +12 -0
- package/dist/card/flint-card-action-area.d.ts.map +1 -0
- package/dist/card/flint-card-action-area.js +2 -0
- package/dist/card/flint-card-actions.d.ts +11 -0
- package/dist/card/flint-card-actions.d.ts.map +1 -0
- package/dist/card/flint-card-actions.js +2 -0
- package/dist/card/flint-card-content.d.ts +11 -0
- package/dist/card/flint-card-content.d.ts.map +1 -0
- package/dist/card/flint-card-content.js +2 -0
- package/dist/card/flint-card-header.d.ts +13 -0
- package/dist/card/flint-card-header.d.ts.map +1 -0
- package/dist/card/flint-card-header.js +2 -0
- package/dist/card/flint-card-media.d.ts +14 -0
- package/dist/card/flint-card-media.d.ts.map +1 -0
- package/dist/card/flint-card-media.js +2 -0
- package/dist/card/flint-card.d.ts +13 -0
- package/dist/card/flint-card.d.ts.map +1 -0
- package/dist/card/flint-card.js +2 -0
- package/dist/carousel/flint-carousel.d.ts +87 -0
- package/dist/carousel/flint-carousel.d.ts.map +1 -0
- package/dist/carousel/flint-carousel.js +2 -0
- package/dist/checkbox/flint-checkbox.d.ts +41 -0
- package/dist/checkbox/flint-checkbox.d.ts.map +1 -0
- package/dist/checkbox/flint-checkbox.js +2 -0
- package/dist/chip/flint-chip.d.ts +34 -0
- package/dist/chip/flint-chip.d.ts.map +1 -0
- package/dist/chip/flint-chip.js +2 -0
- package/dist/collapsible/flint-collapsible.d.ts +80 -0
- package/dist/collapsible/flint-collapsible.d.ts.map +1 -0
- package/dist/collapsible/flint-collapsible.js +2 -0
- package/dist/command/flint-command.d.ts +189 -0
- package/dist/command/flint-command.d.ts.map +1 -0
- package/dist/command/flint-command.js +2 -0
- package/dist/container/flint-container.d.ts +27 -0
- package/dist/container/flint-container.d.ts.map +1 -0
- package/dist/container/flint-container.js +2 -0
- package/dist/copy-button/flint-copy-button.d.ts +55 -0
- package/dist/copy-button/flint-copy-button.d.ts.map +1 -0
- package/dist/copy-button/flint-copy-button.js +2 -0
- package/dist/date-field/flint-date-field.d.ts +82 -0
- package/dist/date-field/flint-date-field.d.ts.map +1 -0
- package/dist/date-field/flint-date-field.js +2 -0
- package/dist/date-picker/flint-date-picker.d.ts +93 -0
- package/dist/date-picker/flint-date-picker.d.ts.map +1 -0
- package/dist/date-picker/flint-date-picker.js +2 -0
- package/dist/date-range-picker/date-range-helpers.d.ts +31 -0
- package/dist/date-range-picker/date-range-helpers.d.ts.map +1 -0
- package/dist/date-range-picker/date-range-helpers.js +128 -0
- package/dist/date-range-picker/flint-date-range-calendar.d.ts +41 -0
- package/dist/date-range-picker/flint-date-range-calendar.d.ts.map +1 -0
- package/dist/date-range-picker/flint-date-range-calendar.js +2 -0
- package/dist/date-range-picker/flint-date-range-picker.d.ts +74 -0
- package/dist/date-range-picker/flint-date-range-picker.d.ts.map +1 -0
- package/dist/date-range-picker/flint-date-range-picker.js +2 -0
- package/dist/date-range-picker/flint-single-input-date-range-field.d.ts +65 -0
- package/dist/date-range-picker/flint-single-input-date-range-field.d.ts.map +1 -0
- package/dist/date-range-picker/flint-single-input-date-range-field.js +2 -0
- package/dist/dialog/flint-dialog.d.ts +76 -0
- package/dist/dialog/flint-dialog.d.ts.map +1 -0
- package/dist/dialog/flint-dialog.js +2 -0
- package/dist/divider/flint-divider.d.ts +24 -0
- package/dist/divider/flint-divider.d.ts.map +1 -0
- package/dist/divider/flint-divider.js +2 -0
- package/dist/drawer/flint-drawer.d.ts +37 -0
- package/dist/drawer/flint-drawer.d.ts.map +1 -0
- package/dist/drawer/flint-drawer.js +2 -0
- package/dist/empty/flint-empty.d.ts +70 -0
- package/dist/empty/flint-empty.d.ts.map +1 -0
- package/dist/empty/flint-empty.js +2 -0
- package/dist/fab/flint-fab.d.ts +25 -0
- package/dist/fab/flint-fab.d.ts.map +1 -0
- package/dist/fab/flint-fab.js +2 -0
- package/dist/flint-range-slider/flint-range-slider.d.ts +56 -0
- package/dist/flint-range-slider/flint-range-slider.d.ts.map +1 -0
- package/dist/flint-range-slider/flint-range-slider.js +2 -0
- package/dist/format-date/flint-format-date.d.ts +89 -0
- package/dist/format-date/flint-format-date.d.ts.map +1 -0
- package/dist/format-date/flint-format-date.js +2 -0
- package/dist/format-number/flint-format-number.d.ts +81 -0
- package/dist/format-number/flint-format-number.d.ts.map +1 -0
- package/dist/format-number/flint-format-number.js +2 -0
- package/dist/grid/flint-grid.d.ts +73 -0
- package/dist/grid/flint-grid.d.ts.map +1 -0
- package/dist/grid/flint-grid.js +2 -0
- package/dist/hover-card/flint-hover-card.d.ts +103 -0
- package/dist/hover-card/flint-hover-card.d.ts.map +1 -0
- package/dist/hover-card/flint-hover-card.js +2 -0
- package/dist/image-comparer/flint-image-comparer.d.ts +50 -0
- package/dist/image-comparer/flint-image-comparer.d.ts.map +1 -0
- package/dist/image-comparer/flint-image-comparer.js +2 -0
- package/dist/image-list/flint-image-list-item-bar.d.ts +26 -0
- package/dist/image-list/flint-image-list-item-bar.d.ts.map +1 -0
- package/dist/image-list/flint-image-list-item-bar.js +2 -0
- package/dist/image-list/flint-image-list-item.d.ts +48 -0
- package/dist/image-list/flint-image-list-item.d.ts.map +1 -0
- package/dist/image-list/flint-image-list-item.js +2 -0
- package/dist/image-list/flint-image-list.d.ts +28 -0
- package/dist/image-list/flint-image-list.d.ts.map +1 -0
- package/dist/image-list/flint-image-list.js +2 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/input/flint-input.d.ts +52 -0
- package/dist/input/flint-input.d.ts.map +1 -0
- package/dist/input/flint-input.js +2 -0
- package/dist/input-otp/flint-input-otp.d.ts +130 -0
- package/dist/input-otp/flint-input-otp.d.ts.map +1 -0
- package/dist/input-otp/flint-input-otp.js +2 -0
- package/dist/item/flint-item.d.ts +151 -0
- package/dist/item/flint-item.d.ts.map +1 -0
- package/dist/item/flint-item.js +2 -0
- package/dist/kbd/flint-kbd.d.ts +47 -0
- package/dist/kbd/flint-kbd.d.ts.map +1 -0
- package/dist/kbd/flint-kbd.js +2 -0
- package/dist/link/flint-link.d.ts +47 -0
- package/dist/link/flint-link.d.ts.map +1 -0
- package/dist/link/flint-link.js +2 -0
- package/dist/list/flint-list.d.ts +78 -0
- package/dist/list/flint-list.d.ts.map +1 -0
- package/dist/list/flint-list.js +2 -0
- package/dist/menu/flint-menu.d.ts +107 -0
- package/dist/menu/flint-menu.d.ts.map +1 -0
- package/dist/menu/flint-menu.js +2 -0
- package/dist/menubar/flint-menubar.d.ts +256 -0
- package/dist/menubar/flint-menubar.d.ts.map +1 -0
- package/dist/menubar/flint-menubar.js +2 -0
- package/dist/mixins/form-associated.d.ts +20 -0
- package/dist/mixins/form-associated.d.ts.map +1 -0
- package/dist/navigation-menu/flint-navigation-menu-content.d.ts +53 -0
- package/dist/navigation-menu/flint-navigation-menu-content.d.ts.map +1 -0
- package/dist/navigation-menu/flint-navigation-menu-content.js +147 -0
- package/dist/navigation-menu/flint-navigation-menu-item.d.ts +47 -0
- package/dist/navigation-menu/flint-navigation-menu-item.d.ts.map +1 -0
- package/dist/navigation-menu/flint-navigation-menu-item.js +109 -0
- package/dist/navigation-menu/flint-navigation-menu-link.d.ts +50 -0
- package/dist/navigation-menu/flint-navigation-menu-link.d.ts.map +1 -0
- package/dist/navigation-menu/flint-navigation-menu-link.js +109 -0
- package/dist/navigation-menu/flint-navigation-menu-list.d.ts +35 -0
- package/dist/navigation-menu/flint-navigation-menu-list.d.ts.map +1 -0
- package/dist/navigation-menu/flint-navigation-menu-list.js +52 -0
- package/dist/navigation-menu/flint-navigation-menu-trigger.d.ts +52 -0
- package/dist/navigation-menu/flint-navigation-menu-trigger.d.ts.map +1 -0
- package/dist/navigation-menu/flint-navigation-menu-trigger.js +190 -0
- package/dist/navigation-menu/flint-navigation-menu.d.ts +42 -0
- package/dist/navigation-menu/flint-navigation-menu.d.ts.map +1 -0
- package/dist/navigation-menu/flint-navigation-menu.js +69 -0
- package/dist/pagination/flint-pagination.d.ts +63 -0
- package/dist/pagination/flint-pagination.d.ts.map +1 -0
- package/dist/pagination/flint-pagination.js +2 -0
- package/dist/paper/flint-paper.d.ts +34 -0
- package/dist/paper/flint-paper.d.ts.map +1 -0
- package/dist/paper/flint-paper.js +2 -0
- package/dist/progress/flint-circular-progress.d.ts +28 -0
- package/dist/progress/flint-circular-progress.d.ts.map +1 -0
- package/dist/progress/flint-circular-progress.js +2 -0
- package/dist/progress/flint-linear-progress.d.ts +26 -0
- package/dist/progress/flint-linear-progress.d.ts.map +1 -0
- package/dist/progress/flint-linear-progress.js +2 -0
- package/dist/radio/flint-radio.d.ts +76 -0
- package/dist/radio/flint-radio.d.ts.map +1 -0
- package/dist/radio/flint-radio.js +2 -0
- package/dist/rating/flint-rating.d.ts +49 -0
- package/dist/rating/flint-rating.d.ts.map +1 -0
- package/dist/rating/flint-rating.js +2 -0
- package/dist/relative-time/flint-relative-time.d.ts +50 -0
- package/dist/relative-time/flint-relative-time.d.ts.map +1 -0
- package/dist/relative-time/flint-relative-time.js +2 -0
- package/dist/resizable/flint-resizable.d.ts +124 -0
- package/dist/resizable/flint-resizable.d.ts.map +1 -0
- package/dist/resizable/flint-resizable.js +346 -0
- package/dist/scroll-area/flint-scroll-area.d.ts +126 -0
- package/dist/scroll-area/flint-scroll-area.d.ts.map +1 -0
- package/dist/scroll-area/flint-scroll-area.js +2 -0
- package/dist/select/flint-select.d.ts +71 -0
- package/dist/select/flint-select.d.ts.map +1 -0
- package/dist/select/flint-select.js +2 -0
- package/dist/skeleton/flint-skeleton.d.ts +47 -0
- package/dist/skeleton/flint-skeleton.d.ts.map +1 -0
- package/dist/skeleton/flint-skeleton.js +2 -0
- package/dist/slider/flint-slider.d.ts +48 -0
- package/dist/slider/flint-slider.d.ts.map +1 -0
- package/dist/slider/flint-slider.js +2 -0
- package/dist/snackbar/flint-snackbar.d.ts +67 -0
- package/dist/snackbar/flint-snackbar.d.ts.map +1 -0
- package/dist/snackbar/flint-snackbar.js +2 -0
- package/dist/sonner/flint-sonner.d.ts +152 -0
- package/dist/sonner/flint-sonner.d.ts.map +1 -0
- package/dist/sonner/flint-sonner.js +2 -0
- package/dist/speed-dial/flint-speed-dial.d.ts +101 -0
- package/dist/speed-dial/flint-speed-dial.d.ts.map +1 -0
- package/dist/speed-dial/flint-speed-dial.js +2 -0
- package/dist/split-panel/flint-split-panel.d.ts +101 -0
- package/dist/split-panel/flint-split-panel.d.ts.map +1 -0
- package/dist/split-panel/flint-split-panel.js +278 -0
- package/dist/stack/flint-stack.d.ts +38 -0
- package/dist/stack/flint-stack.d.ts.map +1 -0
- package/dist/stack/flint-stack.js +2 -0
- package/dist/stepper/flint-stepper.d.ts +122 -0
- package/dist/stepper/flint-stepper.d.ts.map +1 -0
- package/dist/stepper/flint-stepper.js +2 -0
- package/dist/switch/flint-switch.d.ts +44 -0
- package/dist/switch/flint-switch.d.ts.map +1 -0
- package/dist/switch/flint-switch.js +2 -0
- package/dist/table/flint-table-pagination.d.ts +42 -0
- package/dist/table/flint-table-pagination.d.ts.map +1 -0
- package/dist/table/flint-table-pagination.js +2 -0
- package/dist/table/flint-table-sort-label.d.ts +16 -0
- package/dist/table/flint-table-sort-label.d.ts.map +1 -0
- package/dist/table/flint-table-sort-label.js +2 -0
- package/dist/table/flint-table.d.ts +89 -0
- package/dist/table/flint-table.d.ts.map +1 -0
- package/dist/table/flint-table.js +2 -0
- package/dist/tabs/flint-tabs.d.ts +136 -0
- package/dist/tabs/flint-tabs.d.ts.map +1 -0
- package/dist/tabs/flint-tabs.js +2 -0
- package/dist/text-field/flint-text-field.d.ts +40 -0
- package/dist/text-field/flint-text-field.d.ts.map +1 -0
- package/dist/text-field/flint-text-field.js +2 -0
- package/dist/textarea/flint-textarea.d.ts +68 -0
- package/dist/textarea/flint-textarea.d.ts.map +1 -0
- package/dist/textarea/flint-textarea.js +2 -0
- package/dist/time-picker/flint-time-picker.d.ts +230 -0
- package/dist/time-picker/flint-time-picker.d.ts.map +1 -0
- package/dist/time-picker/flint-time-picker.js +2 -0
- package/dist/toggle/flint-toggle.d.ts +43 -0
- package/dist/toggle/flint-toggle.d.ts.map +1 -0
- package/dist/toggle/flint-toggle.js +2 -0
- package/dist/tooltip/flint-tooltip.d.ts +41 -0
- package/dist/tooltip/flint-tooltip.d.ts.map +1 -0
- package/dist/tooltip/flint-tooltip.js +2 -0
- package/dist/transfer-list/flint-transfer-list.d.ts +48 -0
- package/dist/transfer-list/flint-transfer-list.d.ts.map +1 -0
- package/dist/transfer-list/flint-transfer-list.js +2 -0
- package/dist/tree-view/flint-rich-tree-view.d.ts +213 -0
- package/dist/tree-view/flint-rich-tree-view.d.ts.map +1 -0
- package/dist/tree-view/flint-rich-tree-view.js +2 -0
- package/dist/tree-view/flint-simple-tree-view.d.ts +112 -0
- package/dist/tree-view/flint-simple-tree-view.d.ts.map +1 -0
- package/dist/tree-view/flint-simple-tree-view.js +2 -0
- package/dist/tree-view/flint-tree-item.d.ts +67 -0
- package/dist/tree-view/flint-tree-item.d.ts.map +1 -0
- package/dist/tree-view/flint-tree-item.js +2 -0
- package/dist/typography/flint-typography.d.ts +37 -0
- package/dist/typography/flint-typography.d.ts.map +1 -0
- package/dist/typography/flint-typography.js +2 -0
- package/dist/visually-hidden/flint-visually-hidden.d.ts +52 -0
- package/dist/visually-hidden/flint-visually-hidden.d.ts.map +1 -0
- package/dist/visually-hidden/flint-visually-hidden.js +2 -0
- package/package.json +470 -0
- package/src/theme-dark.css +261 -0
- package/src/theme.css +651 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { t as e } from "./decorate-DPS9PT8d.js";
|
|
2
|
+
import { LitElement as t, html as n, nothing as r, unsafeCSS as i } from "lit";
|
|
3
|
+
import { customElement as a, property as o } from "lit/decorators.js";
|
|
4
|
+
import { classMap as s } from "lit/directives/class-map.js";
|
|
5
|
+
//#region src/pagination/flint-pagination.css?inline
|
|
6
|
+
var c = ":host{align-items:center;gap:var(--flint-pagination-gap,4px);font-family:var(--flint-font-family);flex-wrap:wrap;display:inline-flex}nav,ol,li{display:contents}.page-btn{min-width:var(--flint-pagination-btn-size,36px);height:var(--flint-pagination-btn-size,36px);border-radius:var(--flint-pagination-btn-radius,4px);color:var(--flint-text-color);font-family:inherit;font-size:var(--flint-pagination-btn-font-size,.875rem);cursor:pointer;-webkit-user-select:none;user-select:none;box-sizing:border-box;background:0 0;border:none;outline:none;justify-content:center;align-items:center;padding:0 6px;font-weight:400;text-decoration:none;transition:background .15s,color .15s,border-color .15s;display:inline-flex}.page-btn:hover:not(:disabled){background:var(--flint-hover-color)}.page-btn:focus-visible{outline:2px solid var(--flint-pagination-focus-ring-color,var(--flint-primary-color));outline-offset:2px}.page-btn.active{background:var(--flint-pagination-active-bg,var(--flint-primary-color));color:var(--flint-pagination-active-color,var(--flint-text-color-on-primary));font-weight:600}.page-btn:disabled{opacity:var(--flint-pagination-disabled-opacity,.38);cursor:default;pointer-events:none}.page-btn.ellipsis{cursor:default;pointer-events:none;color:var(--flint-text-color-muted)}:host([variant=outlined]) .page-btn{border:1px solid var(--flint-pagination-outlined-border,var(--flint-border-color))}:host([variant=outlined]) .page-btn.active{border-color:var(--flint-pagination-active-bg,var(--flint-primary-color));background:var(--flint-pagination-active-bg,var(--flint-primary-color));color:var(--flint-pagination-active-color,var(--flint-text-color-on-primary))}:host([variant=outlined]) .page-btn:hover:not(:disabled):not(.active){background:var(--flint-pagination-outlined-hover-bg,var(--flint-primary-color-light));border-color:var(--flint-pagination-outlined-hover-border,var(--flint-primary-color))}:host([color=secondary]) .page-btn.active{background:var(--flint-pagination-active-bg-secondary,var(--flint-secondary-color))}:host([color=secondary][variant=outlined]) .page-btn.active{background:var(--flint-pagination-active-bg-secondary,var(--flint-secondary-color));border-color:var(--flint-pagination-active-bg-secondary,var(--flint-secondary-color))}:host([color=standard]) .page-btn.active{background:var(--flint-pagination-active-bg-standard,var(--flint-text-color));color:var(--flint-pagination-active-color,var(--flint-text-color-on-primary))}:host([color=standard][variant=outlined]) .page-btn.active{background:var(--flint-pagination-active-bg-standard,var(--flint-text-color));border-color:var(--flint-pagination-active-bg-standard,var(--flint-text-color));color:var(--flint-pagination-active-color,var(--flint-text-color-on-primary))}:host([shape=rounded]) .page-btn{border-radius:var(--flint-pagination-btn-radius-rounded,8px)}:host([shape=circular]) .page-btn{min-width:var(--flint-pagination-btn-size,36px);aspect-ratio:1;border-radius:50%}:host([size=small]) .page-btn{min-width:var(--flint-pagination-btn-size-sm,28px);height:var(--flint-pagination-btn-size-sm,28px);font-size:var(--flint-pagination-btn-font-size-sm,.8125rem)}:host([size=small][shape=circular]) .page-btn{min-width:var(--flint-pagination-btn-size-sm,28px)}:host([size=large]) .page-btn{min-width:var(--flint-pagination-btn-size-lg,44px);height:var(--flint-pagination-btn-size-lg,44px);font-size:var(--flint-pagination-btn-font-size-lg,.9375rem)}:host([disabled]) .page-btn{opacity:var(--flint-pagination-disabled-opacity,.38);pointer-events:none}svg{display:block}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", l = n`<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"/></svg>`, u = n`<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"/></svg>`, d = n`<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>`, f = n`<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>`, p = n`<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>`;
|
|
7
|
+
function m(e, t) {
|
|
8
|
+
return Array.from({ length: t - e + 1 }, (t, n) => e + n);
|
|
9
|
+
}
|
|
10
|
+
function h(e, t, n, r) {
|
|
11
|
+
let i = m(1, Math.min(r, e)), a = m(Math.max(e - r + 1, r + 1), e), o = Math.max(Math.min(t - n, e - r - n * 2 - 1), r + 2), s = Math.min(Math.max(t + n, r + n * 2 + 2), a.length > 0 ? a[0] - 2 : e - 1), c = [
|
|
12
|
+
...i,
|
|
13
|
+
...o > r + 2 ? ["start-ellipsis"] : r + 1 < e - r ? [r + 1] : [],
|
|
14
|
+
...m(o, s),
|
|
15
|
+
...s < e - r - 1 ? ["end-ellipsis"] : e - r > r ? [e - r] : [],
|
|
16
|
+
...a
|
|
17
|
+
], l = /* @__PURE__ */ new Set();
|
|
18
|
+
return c.filter((e) => {
|
|
19
|
+
let t = String(e);
|
|
20
|
+
return l.has(t) ? !1 : (l.add(t), !0);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
var g = class extends t {
|
|
24
|
+
constructor(...e) {
|
|
25
|
+
super(...e), this.count = 1, this.page = 1, this.defaultPage = 1, this.label = "", this.variant = "text", this.shape = "circular", this.size = "medium", this.color = "primary", this.showFirstButton = !1, this.showLastButton = !1, this.hidePrevButton = !1, this.hideNextButton = !1, this.siblingCount = 1, this.boundaryCount = 1, this.disabled = !1, this._firstUpdate = !0;
|
|
26
|
+
}
|
|
27
|
+
static {
|
|
28
|
+
this.styles = i(c);
|
|
29
|
+
}
|
|
30
|
+
willUpdate() {
|
|
31
|
+
this._firstUpdate && this.defaultPage !== 1 && (this.page = this.defaultPage), this._firstUpdate = !1;
|
|
32
|
+
}
|
|
33
|
+
get _safeCount() {
|
|
34
|
+
return Math.max(1, this.count);
|
|
35
|
+
}
|
|
36
|
+
get _safePage() {
|
|
37
|
+
return Math.min(Math.max(1, this.page), this._safeCount);
|
|
38
|
+
}
|
|
39
|
+
_emit(e) {
|
|
40
|
+
this.dispatchEvent(new CustomEvent("flint-pagination-change", {
|
|
41
|
+
detail: { page: e },
|
|
42
|
+
bubbles: !0,
|
|
43
|
+
composed: !0
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
_go(e) {
|
|
47
|
+
let t = this._safeCount, n = this._safePage;
|
|
48
|
+
e < 1 || e > t || e === n || (this.page = e, this._emit(e));
|
|
49
|
+
}
|
|
50
|
+
_renderNavBtn(e, t, i, a, o, s) {
|
|
51
|
+
return s ? r : n`
|
|
52
|
+
<li>
|
|
53
|
+
<button
|
|
54
|
+
class="page-btn"
|
|
55
|
+
aria-label=${e}
|
|
56
|
+
?disabled=${o || this.disabled}
|
|
57
|
+
@click=${a}
|
|
58
|
+
><slot name=${t}>${i}</slot></button>
|
|
59
|
+
</li>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
let e = this._safeCount, t = this._safePage, i = h(e, t, this.siblingCount, this.boundaryCount);
|
|
64
|
+
return n`
|
|
65
|
+
<nav aria-label=${this.label || "pagination navigation"}>
|
|
66
|
+
<ol>
|
|
67
|
+
${this._renderNavBtn("Go to first page", "first-icon", l, () => this._go(1), t === 1, !this.showFirstButton)}
|
|
68
|
+
${this._renderNavBtn("Go to previous page", "prev-icon", d, () => this._go(t - 1), t === 1, this.hidePrevButton)}
|
|
69
|
+
|
|
70
|
+
${i.map((e) => {
|
|
71
|
+
if (e === "start-ellipsis" || e === "end-ellipsis") return n`
|
|
72
|
+
<li>
|
|
73
|
+
<button class="page-btn ellipsis" tabindex="-1" aria-hidden="true">
|
|
74
|
+
<slot name="ellipsis-icon">${p}</slot>
|
|
75
|
+
</button>
|
|
76
|
+
</li>`;
|
|
77
|
+
let i = e === t;
|
|
78
|
+
return n`
|
|
79
|
+
<li>
|
|
80
|
+
<button
|
|
81
|
+
class=${s({
|
|
82
|
+
"page-btn": !0,
|
|
83
|
+
active: i
|
|
84
|
+
})}
|
|
85
|
+
aria-label=${"Page " + e}
|
|
86
|
+
aria-current=${i ? "page" : r}
|
|
87
|
+
?disabled=${this.disabled}
|
|
88
|
+
@click=${() => this._go(e)}
|
|
89
|
+
>${e}</button>
|
|
90
|
+
</li>
|
|
91
|
+
`;
|
|
92
|
+
})}
|
|
93
|
+
|
|
94
|
+
${this._renderNavBtn("Go to next page", "next-icon", f, () => this._go(t + 1), t === e, this.hideNextButton)}
|
|
95
|
+
${this._renderNavBtn("Go to last page", "last-icon", u, () => this._go(e), t === e, !this.showLastButton)}
|
|
96
|
+
</ol>
|
|
97
|
+
</nav>
|
|
98
|
+
`;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
e([o({ type: Number })], g.prototype, "count", void 0), e([o({ type: Number })], g.prototype, "page", void 0), e([o({
|
|
102
|
+
type: Number,
|
|
103
|
+
attribute: "default-page"
|
|
104
|
+
})], g.prototype, "defaultPage", void 0), e([o({ type: String })], g.prototype, "label", void 0), e([o({
|
|
105
|
+
type: String,
|
|
106
|
+
reflect: !0
|
|
107
|
+
})], g.prototype, "variant", void 0), e([o({
|
|
108
|
+
type: String,
|
|
109
|
+
reflect: !0
|
|
110
|
+
})], g.prototype, "shape", void 0), e([o({
|
|
111
|
+
type: String,
|
|
112
|
+
reflect: !0
|
|
113
|
+
})], g.prototype, "size", void 0), e([o({
|
|
114
|
+
type: String,
|
|
115
|
+
reflect: !0
|
|
116
|
+
})], g.prototype, "color", void 0), e([o({
|
|
117
|
+
type: Boolean,
|
|
118
|
+
reflect: !0,
|
|
119
|
+
attribute: "show-first-button"
|
|
120
|
+
})], g.prototype, "showFirstButton", void 0), e([o({
|
|
121
|
+
type: Boolean,
|
|
122
|
+
reflect: !0,
|
|
123
|
+
attribute: "show-last-button"
|
|
124
|
+
})], g.prototype, "showLastButton", void 0), e([o({
|
|
125
|
+
type: Boolean,
|
|
126
|
+
reflect: !0,
|
|
127
|
+
attribute: "hide-prev-button"
|
|
128
|
+
})], g.prototype, "hidePrevButton", void 0), e([o({
|
|
129
|
+
type: Boolean,
|
|
130
|
+
reflect: !0,
|
|
131
|
+
attribute: "hide-next-button"
|
|
132
|
+
})], g.prototype, "hideNextButton", void 0), e([o({
|
|
133
|
+
type: Number,
|
|
134
|
+
attribute: "sibling-count"
|
|
135
|
+
})], g.prototype, "siblingCount", void 0), e([o({
|
|
136
|
+
type: Number,
|
|
137
|
+
attribute: "boundary-count"
|
|
138
|
+
})], g.prototype, "boundaryCount", void 0), e([o({
|
|
139
|
+
type: Boolean,
|
|
140
|
+
reflect: !0
|
|
141
|
+
})], g.prototype, "disabled", void 0), g = e([a("flint-pagination")], g);
|
|
142
|
+
//#endregion
|
|
143
|
+
export { h as n, g as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as e } from "./decorate-DPS9PT8d.js";
|
|
2
|
+
import { LitElement as t, html as n, unsafeCSS as r } from "lit";
|
|
3
|
+
import { customElement as i, property as a } from "lit/decorators.js";
|
|
4
|
+
//#region src/paper/flint-paper.css?inline
|
|
5
|
+
var o = ":host{box-sizing:border-box;background-color:var(--flint-surface-1);color:var(--flint-text-color);border-radius:var(--flint-border-radius-md);padding:var(--flint-paper-padding,0);border:1px solid #0000;transition:box-shadow .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1),background-color .25s cubic-bezier(.4,0,.2,1);display:block}:host([square]){border-radius:0}:host([variant=outlined]){border:1px solid var(--flint-border-color);box-shadow:none!important}:host([variant=flat]){box-shadow:none;border:none}:host([variant=elevated][elevation=\"0\"]){box-shadow:none}:host([variant=elevated][elevation=\"1\"]){box-shadow:0 2px 4px #0000000d}:host([variant=elevated][elevation=\"2\"]){box-shadow:0 3px 6px #00000012}:host([variant=elevated][elevation=\"3\"]){box-shadow:0 4px 12px #00000014}:host([variant=elevated][elevation=\"4\"]){box-shadow:0 8px 16px #00000017}:host([variant=elevated][elevation=\"6\"]){box-shadow:0 12px 24px #0000001a}:host([variant=elevated][elevation=\"8\"]){box-shadow:0 16px 32px #0000001c}:host([variant=elevated][elevation=\"12\"]){box-shadow:0 20px 40px #0000001f}:host([variant=elevated][elevation=\"16\"]){box-shadow:0 24px 48px #00000021}:host([variant=elevated][elevation=\"24\"]){box-shadow:0 32px 64px #00000026}@media (prefers-color-scheme:dark){:host{background-color:var(--flint-surface-background-flat)}:host([variant=elevated][elevation=\"0\"]){box-shadow:none}:host([variant=elevated][elevation=\"1\"]){box-shadow:0 2px 4px #0000004d}:host([variant=elevated][elevation=\"2\"]){box-shadow:0 3px 6px #00000059}:host([variant=elevated][elevation=\"3\"]){box-shadow:0 4px 12px #0006}:host([variant=elevated][elevation=\"4\"]){box-shadow:0 8px 16px #00000073}:host([variant=elevated][elevation=\"6\"]){box-shadow:0 12px 24px #00000080}:host([variant=elevated][elevation=\"8\"]){box-shadow:0 16px 32px #0000008c}:host([variant=elevated][elevation=\"12\"]){box-shadow:0 20px 40px #0009}:host([variant=elevated][elevation=\"16\"]){box-shadow:0 24px 48px #000000a6}:host([variant=elevated][elevation=\"24\"]){box-shadow:0 32px 64px #000000b3}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", s = class extends t {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.elevation = 1, this.square = !1, this.variant = "elevated";
|
|
8
|
+
}
|
|
9
|
+
static {
|
|
10
|
+
this.styles = r(o);
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return n`<slot></slot>`;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
e([a({
|
|
17
|
+
type: Number,
|
|
18
|
+
reflect: !0
|
|
19
|
+
})], s.prototype, "elevation", void 0), e([a({
|
|
20
|
+
type: Boolean,
|
|
21
|
+
reflect: !0
|
|
22
|
+
})], s.prototype, "square", void 0), e([a({
|
|
23
|
+
type: String,
|
|
24
|
+
reflect: !0
|
|
25
|
+
})], s.prototype, "variant", void 0), s = e([i("flint-paper")], s);
|
|
26
|
+
//#endregion
|
|
27
|
+
export { s as t };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { t as e } from "./decorate-DPS9PT8d.js";
|
|
2
|
+
import { t } from "./form-associated-EGIhyHHt.js";
|
|
3
|
+
import { LitElement as n, html as r, unsafeCSS as i } from "lit";
|
|
4
|
+
import { customElement as a, property as o } from "lit/decorators.js";
|
|
5
|
+
import { classMap as s } from "lit/directives/class-map.js";
|
|
6
|
+
import { ifDefined as c } from "lit/directives/if-defined.js";
|
|
7
|
+
//#region src/radio/flint-radio-group.css?inline
|
|
8
|
+
var l = ":host{font-family:var(--flint-font-family);color:var(--flint-text-color);display:block}:host([disabled]){opacity:var(--flint-radio-disabled-opacity,.5);pointer-events:none}.group-container{gap:var(--flint-radio-group-gap,8px);flex-direction:column;display:flex}:host([orientation=horizontal]) .group-container{flex-flow:wrap}", u = ":host{cursor:pointer;display:inline-block}:host([disabled]){cursor:not-allowed}.wrapper{cursor:pointer;align-items:center;display:inline-flex}.wrapper.disabled{opacity:var(--flint-radio-disabled-opacity,.5);cursor:not-allowed}.radio-circle{width:var(--flint-radio-size,18px);height:var(--flint-radio-size,18px);border:2px solid var(--flint-input-border-color);background-color:var(--flint-surface-1);margin-right:var(--flint-radio-gap,8px);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:border-color .2s,background-color .2s;display:inline-flex;position:relative}:host([size=sm]) .radio-circle{width:var(--flint-radio-size-sm,14px);height:var(--flint-radio-size-sm,14px)}:host([size=lg]) .radio-circle{width:var(--flint-radio-size-lg,22px);height:var(--flint-radio-size-lg,22px)}.wrapper:hover:not(.disabled) .radio-circle,.radio-circle.checked{border-color:var(--flint-primary-color)}.radio-circle:after{content:\"\";width:var(--flint-radio-dot-size,8px);height:var(--flint-radio-dot-size,8px);background-color:var(--flint-primary-color);opacity:0;border-radius:50%;transition:opacity .2s cubic-bezier(.175,.885,.32,1.275),transform .2s cubic-bezier(.175,.885,.32,1.275);transform:scale(.5)}:host([size=sm]) .radio-circle:after{width:var(--flint-radio-dot-size-sm,6px);height:var(--flint-radio-dot-size-sm,6px)}:host([size=lg]) .radio-circle:after{width:var(--flint-radio-dot-size-lg,10px);height:var(--flint-radio-dot-size-lg,10px)}.checked:after{opacity:1;transform:scale(1)}input{opacity:0;width:0;height:0;margin:0;position:absolute}input:focus-visible+.radio-circle{outline:2px solid var(--flint-primary-color);outline-offset:2px;box-shadow:0 0 0 4px var(--flint-primary-focus-ring)}.label{font-size:var(--flint-radio-label-font-size,14px);-webkit-user-select:none;user-select:none;line-height:1.5}:host([size=sm]) .label{font-size:var(--flint-radio-label-font-size-sm,12px)}:host([size=lg]) .label{font-size:var(--flint-radio-label-font-size-lg,16px)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", d = class extends t(n) {
|
|
9
|
+
constructor(...e) {
|
|
10
|
+
super(...e), this.label = "", this.name = "", this.value = "", this.defaultValue = "", this.disabled = !1, this.required = !1, this.orientation = "vertical", this.size = "md", this._handleRadioSelect = (e) => {
|
|
11
|
+
this._onRadioSelect(e);
|
|
12
|
+
}, this._handleKeyDown = (e) => {
|
|
13
|
+
this._onKeyDown(e);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.styles = i(l);
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
super.connectedCallback(), this.addEventListener("flint-radio-select", this._handleRadioSelect), this.addEventListener("keydown", this._handleKeyDown);
|
|
21
|
+
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
super.disconnectedCallback(), this.removeEventListener("flint-radio-select", this._handleRadioSelect), this.removeEventListener("keydown", this._handleKeyDown);
|
|
24
|
+
}
|
|
25
|
+
willUpdate() {
|
|
26
|
+
this._firstUpdate && (this._firstUpdate = !1, this.defaultValue && !this.value && (this.value = this.defaultValue));
|
|
27
|
+
}
|
|
28
|
+
updated(e) {
|
|
29
|
+
(e.has("value") || e.has("name") || e.has("size") || e.has("required")) && this._syncChildren(), (e.has("value") || e.has("name") || e.has("required")) && this._updateFormValue();
|
|
30
|
+
}
|
|
31
|
+
formResetCallback() {
|
|
32
|
+
this.value = this.defaultValue || "", this._updateFormValue();
|
|
33
|
+
}
|
|
34
|
+
_updateFormValue() {
|
|
35
|
+
this._initFormValue(this.value || null), this._initFormValidity(this.required, !this.value, "Please select an option.");
|
|
36
|
+
}
|
|
37
|
+
_getRadios() {
|
|
38
|
+
return Array.from(this.querySelectorAll("flint-radio"));
|
|
39
|
+
}
|
|
40
|
+
_getEnabledRadios() {
|
|
41
|
+
return this._getRadios().filter((e) => !e.disabled);
|
|
42
|
+
}
|
|
43
|
+
_onRadioSelect(e) {
|
|
44
|
+
if (this.disabled) return;
|
|
45
|
+
let { value: t } = e.detail;
|
|
46
|
+
this.value = t, this._syncChildren(), this.dispatchEvent(new CustomEvent("flint-radio-group-change", {
|
|
47
|
+
detail: { value: t },
|
|
48
|
+
bubbles: !0,
|
|
49
|
+
composed: !0
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
_onKeyDown(e) {
|
|
53
|
+
if (this.disabled || ![
|
|
54
|
+
"ArrowDown",
|
|
55
|
+
"ArrowUp",
|
|
56
|
+
"ArrowLeft",
|
|
57
|
+
"ArrowRight"
|
|
58
|
+
].includes(e.key)) return;
|
|
59
|
+
let t = this._getEnabledRadios();
|
|
60
|
+
if (!t.length) return;
|
|
61
|
+
let n = e.composedPath(), r = t.find((e) => n.includes(e)), i = r ? t.indexOf(r) : t.findIndex((e) => e.value === this.value), a = i >= 0 ? i : 0;
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
let o = t[e.key === "ArrowDown" || e.key === "ArrowRight" ? (a + 1) % t.length : (a - 1 + t.length) % t.length];
|
|
64
|
+
o.focus(), this.value = o.value, this._syncChildren(), this.dispatchEvent(new CustomEvent("flint-radio-group-change", {
|
|
65
|
+
detail: { value: this.value },
|
|
66
|
+
bubbles: !0,
|
|
67
|
+
composed: !0
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
_syncChildren() {
|
|
71
|
+
this._getRadios().forEach((e) => {
|
|
72
|
+
e.checked = e.value === this.value, this.name && (e.name = this.name), e.size = this.size, e.required = this.required;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
_handleSlotChange() {
|
|
76
|
+
this._syncChildren();
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
return r`
|
|
80
|
+
<div
|
|
81
|
+
class="group-container"
|
|
82
|
+
role="radiogroup"
|
|
83
|
+
aria-label=${c(this.label || void 0)}
|
|
84
|
+
aria-disabled=${c(this.disabled ? "true" : void 0)}
|
|
85
|
+
aria-required=${c(this.required ? "true" : void 0)}
|
|
86
|
+
>
|
|
87
|
+
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
88
|
+
</div>
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
e([o({ type: String })], d.prototype, "label", void 0), e([o({ type: String })], d.prototype, "name", void 0), e([o({ type: String })], d.prototype, "value", void 0), e([o({
|
|
93
|
+
type: String,
|
|
94
|
+
attribute: "default-value"
|
|
95
|
+
})], d.prototype, "defaultValue", void 0), e([o({
|
|
96
|
+
type: Boolean,
|
|
97
|
+
reflect: !0
|
|
98
|
+
})], d.prototype, "disabled", void 0), e([o({
|
|
99
|
+
type: Boolean,
|
|
100
|
+
reflect: !0
|
|
101
|
+
})], d.prototype, "required", void 0), e([o({
|
|
102
|
+
type: String,
|
|
103
|
+
reflect: !0
|
|
104
|
+
})], d.prototype, "orientation", void 0), e([o({
|
|
105
|
+
type: String,
|
|
106
|
+
reflect: !0
|
|
107
|
+
})], d.prototype, "size", void 0), d = e([a("flint-radio-group")], d);
|
|
108
|
+
var f = class extends n {
|
|
109
|
+
constructor(...e) {
|
|
110
|
+
super(...e), this.checked = !1, this.disabled = !1, this.required = !1, this.name = "", this.value = "", this.label = "", this.size = "md";
|
|
111
|
+
}
|
|
112
|
+
static {
|
|
113
|
+
this.styles = i(u);
|
|
114
|
+
}
|
|
115
|
+
focus(e) {
|
|
116
|
+
this.shadowRoot?.querySelector("input")?.focus(e);
|
|
117
|
+
}
|
|
118
|
+
_handleChange() {
|
|
119
|
+
this.disabled || this.dispatchEvent(new CustomEvent("flint-radio-select", {
|
|
120
|
+
detail: { value: this.value },
|
|
121
|
+
bubbles: !0,
|
|
122
|
+
composed: !0
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
render() {
|
|
126
|
+
return r`
|
|
127
|
+
<label class=${s({
|
|
128
|
+
wrapper: !0,
|
|
129
|
+
disabled: this.disabled
|
|
130
|
+
})}>
|
|
131
|
+
<input
|
|
132
|
+
type="radio"
|
|
133
|
+
.name=${this.name}
|
|
134
|
+
.value=${this.value}
|
|
135
|
+
.checked=${this.checked}
|
|
136
|
+
?disabled=${this.disabled}
|
|
137
|
+
?required=${this.required}
|
|
138
|
+
@change=${this._handleChange}
|
|
139
|
+
>
|
|
140
|
+
<div class=${s({
|
|
141
|
+
"radio-circle": !0,
|
|
142
|
+
checked: this.checked
|
|
143
|
+
})}></div>
|
|
144
|
+
<span class="label">
|
|
145
|
+
${this.label ? this.label : r`<slot></slot>`}
|
|
146
|
+
</span>
|
|
147
|
+
</label>
|
|
148
|
+
`;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
e([o({
|
|
152
|
+
type: Boolean,
|
|
153
|
+
reflect: !0
|
|
154
|
+
})], f.prototype, "checked", void 0), e([o({
|
|
155
|
+
type: Boolean,
|
|
156
|
+
reflect: !0
|
|
157
|
+
})], f.prototype, "disabled", void 0), e([o({
|
|
158
|
+
type: Boolean,
|
|
159
|
+
reflect: !0
|
|
160
|
+
})], f.prototype, "required", void 0), e([o({ type: String })], f.prototype, "name", void 0), e([o({ type: String })], f.prototype, "value", void 0), e([o({ type: String })], f.prototype, "label", void 0), e([o({
|
|
161
|
+
type: String,
|
|
162
|
+
reflect: !0
|
|
163
|
+
})], f.prototype, "size", void 0), f = e([a("flint-radio")], f);
|
|
164
|
+
//#endregion
|
|
165
|
+
export { d as n, f as t };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { t as e } from "./decorate-DPS9PT8d.js";
|
|
2
|
+
import { LitElement as t, html as n, nothing as r, unsafeCSS as i } from "lit";
|
|
3
|
+
import { customElement as a, property as o, state as s } from "lit/decorators.js";
|
|
4
|
+
import { classMap as c } from "lit/directives/class-map.js";
|
|
5
|
+
import { styleMap as l } from "lit/directives/style-map.js";
|
|
6
|
+
import { live as u } from "lit/directives/live.js";
|
|
7
|
+
//#region src/flint-range-slider/flint-range-slider.css?inline
|
|
8
|
+
var d = ":host{font-family:var(--flint-font-family);color:var(--flint-text-color);--flint-range-slider-track-height:6px;--flint-range-slider-thumb-size:20px;--flint-range-slider-track-color:var(--flint-input-border-color);--flint-range-slider-fill-color:var(--flint-primary-color);--flint-range-slider-thumb-color:var(--flint-surface-1);--flint-range-slider-thumb-border:var(--flint-primary-color);padding:12px 0;display:block}:host([size=sm]){--flint-range-slider-track-height:4px;--flint-range-slider-thumb-size:16px}:host([size=lg]){--flint-range-slider-track-height:8px;--flint-range-slider-thumb-size:24px}.slider-wrapper{flex-direction:column;gap:8px;display:flex}.label-row{justify-content:space-between;align-items:center;font-size:14px;font-weight:500;display:flex}.value-display{color:var(--flint-range-slider-fill-color);font-weight:600}.disabled-label{color:var(--flint-text-color-muted)}.track-container{align-items:center;height:28px;margin:4px 0;display:flex;position:relative}.track-base{height:var(--flint-range-slider-track-height);background:var(--flint-range-slider-track-color);border-radius:calc(var(--flint-range-slider-track-height) / 2);pointer-events:none;position:absolute;left:0;right:0}.track-fill{height:var(--flint-range-slider-track-height);background:var(--flint-range-slider-fill-color);border-radius:calc(var(--flint-range-slider-track-height) / 2);pointer-events:none;transition:left 50ms,width 50ms;position:absolute}:host([disabled]) .track-fill{opacity:.5}input[type=range]{appearance:none;width:100%;height:var(--flint-range-slider-track-height);cursor:pointer;pointer-events:none;background:0 0;outline:none;margin:0;position:absolute;left:0;right:0}input[type=range]:disabled{cursor:not-allowed}input[type=range]::-webkit-slider-thumb{pointer-events:all}input[type=range]::-moz-range-thumb{pointer-events:all}input[type=range]::-webkit-slider-thumb{appearance:none;width:var(--flint-range-slider-thumb-size);height:var(--flint-range-slider-thumb-size);background:var(--flint-range-slider-thumb-color);border:2px solid var(--flint-range-slider-thumb-border);box-shadow:var(--flint-shadow-sm);cursor:pointer;border-radius:50%;transition:transform .1s,box-shadow .1s}input[type=range]:focus-visible::-webkit-slider-thumb{outline:2px solid var(--flint-range-slider-fill-color);outline-offset:4px}input[type=range]:not(:disabled):hover::-webkit-slider-thumb{box-shadow:var(--flint-shadow-md);transform:scale(1.1)}input[type=range]:active::-webkit-slider-thumb{transform:scale(.95)}input[type=range]:disabled::-webkit-slider-thumb{cursor:not-allowed;opacity:.5;border-color:var(--flint-range-slider-track-color)}input[type=range]::-moz-range-thumb{width:calc(var(--flint-range-slider-thumb-size) - 2px);height:calc(var(--flint-range-slider-thumb-size) - 2px);background:var(--flint-range-slider-thumb-color);border:2px solid var(--flint-range-slider-thumb-border);box-shadow:var(--flint-shadow-sm);cursor:pointer;border-radius:50%}input[type=range]:disabled::-moz-range-thumb{opacity:.5;border-color:var(--flint-range-slider-track-color)}input[type=range]::-moz-range-track{background:0 0}input.thumb-start{z-index:2}input.thumb-end{z-index:3}input.thumb-start.on-top{z-index:4}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", f = class extends t {
|
|
9
|
+
constructor(...e) {
|
|
10
|
+
super(...e), this.value = [25, 75], this.min = 0, this.max = 100, this.step = 1, this.size = "md", this.disabled = !1, this.label = "", this.showValue = !1, this._activeThumb = "end";
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = i(d);
|
|
14
|
+
}
|
|
15
|
+
updated(e) {
|
|
16
|
+
if (this.step <= 0 && (this.step = 1), e.has("min") || e.has("max")) {
|
|
17
|
+
let e = Math.max(this.min, Math.min(this.max, this._start)), t = Math.max(this.min, Math.min(this.max, this._end));
|
|
18
|
+
(e !== this._start || t !== this._end) && (this.value = [e, t]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
get _start() {
|
|
22
|
+
return this.value[0];
|
|
23
|
+
}
|
|
24
|
+
get _end() {
|
|
25
|
+
return this.value[1];
|
|
26
|
+
}
|
|
27
|
+
_pct(e) {
|
|
28
|
+
return (e - this.min) / (this.max - this.min) * 100;
|
|
29
|
+
}
|
|
30
|
+
_snap(e) {
|
|
31
|
+
let t = Math.round((e - this.min) / this.step) * this.step + this.min;
|
|
32
|
+
return Math.max(this.min, Math.min(this.max, t));
|
|
33
|
+
}
|
|
34
|
+
_handleStartInput(e) {
|
|
35
|
+
let t = e.target, n = this._snap(Number(t.value));
|
|
36
|
+
n > this._end ? (this._activeThumb = "end", this._emit([this._end, n])) : this._emit([n, this._end]);
|
|
37
|
+
}
|
|
38
|
+
_handleEndInput(e) {
|
|
39
|
+
let t = e.target, n = this._snap(Number(t.value));
|
|
40
|
+
n < this._start ? (this._activeThumb = "start", this._emit([n, this._start])) : this._emit([this._start, n]);
|
|
41
|
+
}
|
|
42
|
+
_emit(e) {
|
|
43
|
+
this.value = [...e], this.dispatchEvent(new CustomEvent("flint-range-slider-change", {
|
|
44
|
+
detail: { value: this.value },
|
|
45
|
+
bubbles: !0,
|
|
46
|
+
composed: !0
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
let e = this._pct(this._start), t = this._pct(this._end), i = {
|
|
51
|
+
left: `${e}%`,
|
|
52
|
+
width: `${t - e}%`
|
|
53
|
+
}, a = this._activeThumb === "start" || this._start === this.max;
|
|
54
|
+
return n`
|
|
55
|
+
<div class="slider-wrapper">
|
|
56
|
+
|
|
57
|
+
<div class="label-row">
|
|
58
|
+
${this.label ? n`
|
|
59
|
+
<label class=${c({ "disabled-label": this.disabled })}>
|
|
60
|
+
${this.label}
|
|
61
|
+
</label>
|
|
62
|
+
` : r}
|
|
63
|
+
${this.showValue ? n`
|
|
64
|
+
<span class="value-display">${this._start} – ${this._end}</span>
|
|
65
|
+
` : r}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div class="track-container">
|
|
69
|
+
<div class="track-base"></div>
|
|
70
|
+
<div class="track-fill" style=${l(i)}></div>
|
|
71
|
+
|
|
72
|
+
<!-- Start thumb -->
|
|
73
|
+
<input
|
|
74
|
+
type="range"
|
|
75
|
+
class=${c({
|
|
76
|
+
"thumb-start": !0,
|
|
77
|
+
"on-top": a
|
|
78
|
+
})}
|
|
79
|
+
.min=${this.min.toString()}
|
|
80
|
+
.max=${this.max.toString()}
|
|
81
|
+
.step=${this.step.toString()}
|
|
82
|
+
.value=${u(this._start.toString())}
|
|
83
|
+
?disabled=${this.disabled}
|
|
84
|
+
aria-label=${this.label ? `${this.label} start` : "Range start"}
|
|
85
|
+
aria-valuemin=${this.min}
|
|
86
|
+
aria-valuemax=${this.max}
|
|
87
|
+
aria-valuenow=${this._start}
|
|
88
|
+
@input=${this._handleStartInput}
|
|
89
|
+
@pointerdown=${() => {
|
|
90
|
+
this._activeThumb = "start";
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
|
|
94
|
+
<!-- End thumb -->
|
|
95
|
+
<input
|
|
96
|
+
type="range"
|
|
97
|
+
class="thumb-end"
|
|
98
|
+
.min=${this.min.toString()}
|
|
99
|
+
.max=${this.max.toString()}
|
|
100
|
+
.step=${this.step.toString()}
|
|
101
|
+
.value=${u(this._end.toString())}
|
|
102
|
+
?disabled=${this.disabled}
|
|
103
|
+
aria-label=${this.label ? `${this.label} end` : "Range end"}
|
|
104
|
+
aria-valuemin=${this.min}
|
|
105
|
+
aria-valuemax=${this.max}
|
|
106
|
+
aria-valuenow=${this._end}
|
|
107
|
+
@input=${this._handleEndInput}
|
|
108
|
+
@pointerdown=${() => {
|
|
109
|
+
this._activeThumb = "end";
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
</div>
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
e([o({ attribute: !1 })], f.prototype, "value", void 0), e([o({ type: Number })], f.prototype, "min", void 0), e([o({ type: Number })], f.prototype, "max", void 0), e([o({ type: Number })], f.prototype, "step", void 0), e([o({
|
|
119
|
+
type: String,
|
|
120
|
+
reflect: !0
|
|
121
|
+
})], f.prototype, "size", void 0), e([o({
|
|
122
|
+
type: Boolean,
|
|
123
|
+
reflect: !0
|
|
124
|
+
})], f.prototype, "disabled", void 0), e([o({ type: String })], f.prototype, "label", void 0), e([o({
|
|
125
|
+
type: Boolean,
|
|
126
|
+
attribute: "show-value"
|
|
127
|
+
})], f.prototype, "showValue", void 0), e([s()], f.prototype, "_activeThumb", void 0), f = e([a("flint-range-slider")], f);
|
|
128
|
+
//#endregion
|
|
129
|
+
export { f as t };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { t as e } from "./decorate-DPS9PT8d.js";
|
|
2
|
+
import { LitElement as t, html as n, svg as r, unsafeCSS as i } from "lit";
|
|
3
|
+
import { customElement as a, property as o, state as s } from "lit/decorators.js";
|
|
4
|
+
import { classMap as c } from "lit/directives/class-map.js";
|
|
5
|
+
//#region src/rating/flint-rating.css?inline
|
|
6
|
+
var l = ":host{font-family:var(--flint-font-family);--flint-rating-color:#ffb400;--flint-rating-empty-color:#faaf0033;--flint-rating-size:2rem;font-size:var(--flint-rating-size);display:inline-block}:host([size=sm]){--flint-rating-size:1.25rem}:host([size=md]){--flint-rating-size:2rem}:host([size=lg]){--flint-rating-size:2.75rem}:host([disabled]){opacity:.4;cursor:not-allowed}:host([readonly]) .rating-container{cursor:default}.rating-container{cursor:pointer;gap:.1em;font-size:1em;line-height:1;display:inline-flex;position:relative}.rating-container:focus{outline:none}.star-wrapper{outline:none;transition:transform .1s;display:inline-flex;position:relative}.star-wrapper:focus-visible{box-shadow:0 0 0 2px var(--flint-rating-color);border-radius:2px}.star-wrapper:not(.readonly):not(.disabled):hover{transform:scale(1.1)}svg{width:1em;height:1em;fill:var(--flint-rating-empty-color);stroke:var(--flint-rating-color);stroke-width:1px;transition:fill .2s,stroke .2s;overflow:visible}.active svg{fill:var(--flint-rating-color)}.hover svg{fill:var(--flint-rating-color);opacity:.7}.half svg .star-full{display:none}.half svg .star-half{display:block}.star-half{display:none}.hidden-input{opacity:0;pointer-events:none;width:0;height:0;margin:0;position:absolute}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", u = class extends t {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.value = 0, this.max = 5, this.readonly = !1, this.disabled = !1, this.clearable = !1, this.defaultValue = 0, this.size = "md", this.name = "", this.label = "Rating", this.precision = 1, this._hoverValue = -1, this._firstUpdate = !0;
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.styles = i(l);
|
|
12
|
+
}
|
|
13
|
+
willUpdate(e) {
|
|
14
|
+
this._firstUpdate && this.defaultValue !== 0 && (this.value = this.defaultValue), this._firstUpdate = !1, (e.has("value") || e.has("name")) && this._syncHiddenInput();
|
|
15
|
+
}
|
|
16
|
+
_syncHiddenInput() {
|
|
17
|
+
let e = this.shadowRoot?.querySelector(".hidden-input");
|
|
18
|
+
e && (e.name = this.name, e.value = String(this.value));
|
|
19
|
+
}
|
|
20
|
+
firstUpdated() {
|
|
21
|
+
this._syncHiddenInput();
|
|
22
|
+
}
|
|
23
|
+
_isInteractive() {
|
|
24
|
+
return !this.readonly && !this.disabled;
|
|
25
|
+
}
|
|
26
|
+
_handleMouseEnter(e) {
|
|
27
|
+
this._isInteractive() && (this._hoverValue = e);
|
|
28
|
+
}
|
|
29
|
+
_handleMouseLeave() {
|
|
30
|
+
this._isInteractive() && (this._hoverValue = -1);
|
|
31
|
+
}
|
|
32
|
+
_handleMouseMove(e, t) {
|
|
33
|
+
if (!this._isInteractive() || this.precision !== .5) return;
|
|
34
|
+
let { left: n, width: r } = e.currentTarget.getBoundingClientRect();
|
|
35
|
+
this._hoverValue = e.clientX - n < r / 2 ? t - .5 : t;
|
|
36
|
+
}
|
|
37
|
+
_handleClick(e) {
|
|
38
|
+
this._isInteractive() && (this.value = this.clearable && this.value === e ? 0 : e, this.dispatchEvent(new CustomEvent("flint-rating-change", {
|
|
39
|
+
detail: { value: this.value },
|
|
40
|
+
bubbles: !0,
|
|
41
|
+
composed: !0
|
|
42
|
+
})));
|
|
43
|
+
}
|
|
44
|
+
_handleKeydown(e, t) {
|
|
45
|
+
if (!this._isInteractive()) return;
|
|
46
|
+
let n = this.precision === .5 ? .5 : 1, r = this.value;
|
|
47
|
+
switch (e.key) {
|
|
48
|
+
case "ArrowRight":
|
|
49
|
+
case "ArrowUp":
|
|
50
|
+
e.preventDefault(), r = Math.min(this.max, this.value + n);
|
|
51
|
+
break;
|
|
52
|
+
case "ArrowLeft":
|
|
53
|
+
case "ArrowDown":
|
|
54
|
+
e.preventDefault(), r = Math.max(0, this.value - n);
|
|
55
|
+
break;
|
|
56
|
+
case "Home":
|
|
57
|
+
e.preventDefault(), r = 0;
|
|
58
|
+
break;
|
|
59
|
+
case "End":
|
|
60
|
+
e.preventDefault(), r = this.max;
|
|
61
|
+
break;
|
|
62
|
+
case " ":
|
|
63
|
+
case "Enter":
|
|
64
|
+
e.preventDefault(), this._handleClick(t);
|
|
65
|
+
return;
|
|
66
|
+
default: return;
|
|
67
|
+
}
|
|
68
|
+
r !== this.value && (this.value = r, this.dispatchEvent(new CustomEvent("flint-rating-change", {
|
|
69
|
+
detail: { value: this.value },
|
|
70
|
+
bubbles: !0,
|
|
71
|
+
composed: !0
|
|
72
|
+
})));
|
|
73
|
+
}
|
|
74
|
+
_starSvg(e) {
|
|
75
|
+
let t = "flint-rating-half";
|
|
76
|
+
return r`
|
|
77
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
78
|
+
${e === "half" ? r`
|
|
79
|
+
<defs>
|
|
80
|
+
<linearGradient id="${t}">
|
|
81
|
+
<stop offset="50%" stop-color="var(--flint-rating-color)"></stop>
|
|
82
|
+
<stop offset="50%" stop-color="var(--flint-rating-empty-color)"></stop>
|
|
83
|
+
</linearGradient>
|
|
84
|
+
</defs>
|
|
85
|
+
<path fill="url(#${t})" stroke="var(--flint-rating-color)" stroke-width="1"
|
|
86
|
+
d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
|
|
87
|
+
` : r`
|
|
88
|
+
<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
|
|
89
|
+
`}
|
|
90
|
+
</svg>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
let e = Math.ceil(this.value) || 1, t = [];
|
|
95
|
+
for (let r = 1; r <= this.max; r++) {
|
|
96
|
+
let i = this._hoverValue === -1 ? this.value : this._hoverValue, a = this.precision === .5 && i >= r - .5 && i < r, o = i >= r, s = this._hoverValue !== -1, l;
|
|
97
|
+
l = a ? "half" : o ? "full" : "empty";
|
|
98
|
+
let u = {
|
|
99
|
+
"star-wrapper": !0,
|
|
100
|
+
active: l === "full" && !s,
|
|
101
|
+
hover: l === "full" && s,
|
|
102
|
+
half: l === "half",
|
|
103
|
+
readonly: this.readonly,
|
|
104
|
+
disabled: this.disabled
|
|
105
|
+
};
|
|
106
|
+
t.push(n`
|
|
107
|
+
<span
|
|
108
|
+
class=${c(u)}
|
|
109
|
+
role="radio"
|
|
110
|
+
aria-label="${r} ${r === 1 ? "star" : "stars"}"
|
|
111
|
+
aria-checked=${this.value >= r ? "true" : "false"}
|
|
112
|
+
tabindex=${r === e && !this.disabled ? "0" : "-1"}
|
|
113
|
+
@mouseenter=${() => this._handleMouseEnter(r)}
|
|
114
|
+
@mousemove=${(e) => this._handleMouseMove(e, r)}
|
|
115
|
+
@click=${() => this._handleClick(this._hoverValue === -1 ? r : this._hoverValue)}
|
|
116
|
+
@keydown=${(e) => this._handleKeydown(e, r)}
|
|
117
|
+
>
|
|
118
|
+
${this._starSvg(l)}
|
|
119
|
+
</span>
|
|
120
|
+
`);
|
|
121
|
+
}
|
|
122
|
+
return n`
|
|
123
|
+
<input class="hidden-input" type="hidden" .name=${this.name} .value=${String(this.value)}>
|
|
124
|
+
<div
|
|
125
|
+
class="rating-container"
|
|
126
|
+
role="radiogroup"
|
|
127
|
+
aria-label=${this.label}
|
|
128
|
+
aria-disabled=${this.disabled ? "true" : "false"}
|
|
129
|
+
aria-readonly=${this.readonly ? "true" : "false"}
|
|
130
|
+
@mouseleave=${this._handleMouseLeave}
|
|
131
|
+
>
|
|
132
|
+
${t}
|
|
133
|
+
</div>
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
e([o({ type: Number })], u.prototype, "value", void 0), e([o({ type: Number })], u.prototype, "max", void 0), e([o({
|
|
138
|
+
type: Boolean,
|
|
139
|
+
reflect: !0
|
|
140
|
+
})], u.prototype, "readonly", void 0), e([o({
|
|
141
|
+
type: Boolean,
|
|
142
|
+
reflect: !0
|
|
143
|
+
})], u.prototype, "disabled", void 0), e([o({ type: Boolean })], u.prototype, "clearable", void 0), e([o({ type: Number })], u.prototype, "defaultValue", void 0), e([o({
|
|
144
|
+
type: String,
|
|
145
|
+
reflect: !0
|
|
146
|
+
})], u.prototype, "size", void 0), e([o({ type: String })], u.prototype, "name", void 0), e([o({ type: String })], u.prototype, "label", void 0), e([o({ type: Number })], u.prototype, "precision", void 0), e([s()], u.prototype, "_hoverValue", void 0), u = e([a("flint-rating")], u);
|
|
147
|
+
//#endregion
|
|
148
|
+
export { u as t };
|