@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,42 @@
|
|
|
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
|
+
import { classMap as o } from "lit/directives/class-map.js";
|
|
5
|
+
//#region src/container/flint-container.css?inline
|
|
6
|
+
var s = ":host{display:block}.container{box-sizing:border-box;width:100%;padding-left:var(--flint-container-padding,16px);padding-right:var(--flint-container-padding,16px);margin-left:auto;margin-right:auto}@media (min-width:600px){.container{padding-left:var(--flint-container-padding-sm,24px);padding-right:var(--flint-container-padding-sm,24px)}}.disable-gutters{padding-left:0;padding-right:0}.max-width-xs{max-width:var(--flint-container-xs,444px)}.max-width-sm{max-width:var(--flint-container-sm,600px)}.max-width-md{max-width:var(--flint-container-md,900px)}.max-width-lg{max-width:var(--flint-container-lg,1200px)}.max-width-xl{max-width:var(--flint-container-xl,1536px)}.fixed{max-width:var(--flint-container-xs,444px)}@media (min-width:600px){.fixed{max-width:var(--flint-container-sm,600px)}}@media (min-width:900px){.fixed{max-width:var(--flint-container-md,900px)}}@media (min-width:1200px){.fixed{max-width:var(--flint-container-lg,1200px)}}@media (min-width:1536px){.fixed{max-width:var(--flint-container-xl,1536px)}}@media (min-width:600px){.fixed.max-width-xs{max-width:var(--flint-container-xs,444px)}}@media (min-width:900px){.fixed.max-width-sm{max-width:var(--flint-container-sm,600px)}}@media (min-width:1200px){.fixed.max-width-md{max-width:var(--flint-container-md,900px)}}@media (min-width:1536px){.fixed.max-width-lg{max-width:var(--flint-container-lg,1200px)}}", c = class extends t {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.maxWidth = "lg", this.disableGutters = !1, this.fixed = !1;
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.styles = r(s);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return n`
|
|
15
|
+
<div class=${o({
|
|
16
|
+
container: !0,
|
|
17
|
+
[`max-width-${this.maxWidth}`]: this.maxWidth !== !1,
|
|
18
|
+
"disable-gutters": this.disableGutters,
|
|
19
|
+
fixed: this.fixed
|
|
20
|
+
})}>
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
e([a({
|
|
27
|
+
attribute: "max-width",
|
|
28
|
+
reflect: !0,
|
|
29
|
+
converter: {
|
|
30
|
+
fromAttribute: (e) => e === null || e === "false" ? !1 : e,
|
|
31
|
+
toAttribute: (e) => e === !1 ? null : e
|
|
32
|
+
}
|
|
33
|
+
})], c.prototype, "maxWidth", void 0), e([a({
|
|
34
|
+
type: Boolean,
|
|
35
|
+
attribute: "disable-gutters",
|
|
36
|
+
reflect: !0
|
|
37
|
+
})], c.prototype, "disableGutters", void 0), e([a({
|
|
38
|
+
type: Boolean,
|
|
39
|
+
reflect: !0
|
|
40
|
+
})], c.prototype, "fixed", void 0), c = e([i("flint-container")], c);
|
|
41
|
+
//#endregion
|
|
42
|
+
export { c as t };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { t as e } from "./decorate-DPS9PT8d.js";
|
|
2
|
+
import { LitElement as t, html as n, nothing as r, svg as i, unsafeCSS as a } from "lit";
|
|
3
|
+
import { customElement as o, property as s } from "lit/decorators.js";
|
|
4
|
+
import { classMap as c } from "lit/directives/class-map.js";
|
|
5
|
+
//#region src/copy-button/flint-copy-button.css?inline
|
|
6
|
+
var l = ":host{--flint-copy-button-size:32px;--flint-copy-button-icon-size:16px;font-family:var(--flint-font-family);display:inline-block}:host([disabled]){cursor:not-allowed}.copy-button{width:var(--flint-copy-button-size);height:var(--flint-copy-button-size);border:1px solid var(--flint-border-color);border-radius:var(--flint-border-radius-md);background:var(--flint-surface-1);color:var(--flint-text-color-muted);cursor:pointer;justify-content:center;align-items:center;padding:0;transition:color .15s,background-color .15s,border-color .15s;display:inline-flex;position:relative}.copy-button:hover:not(:disabled){background:var(--flint-hover-color);color:var(--flint-text-color)}.copy-button:active:not(:disabled){background:var(--flint-active-color)}.copy-button:focus-visible{outline:2px solid var(--flint-primary-color);outline-offset:2px}.copy-button:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.icon{width:var(--flint-copy-button-icon-size);height:var(--flint-copy-button-icon-size);justify-content:center;align-items:center;display:flex}.icon svg{width:100%;height:100%}.icon--success{color:var(--flint-copy-button-success-color,var(--flint-success-color))}.icon--error{color:var(--flint-copy-button-error-color,var(--flint-error-color))}.tooltip{z-index:10;border-radius:var(--flint-border-radius-sm);background:var(--flint-tooltip-bg);color:var(--flint-tooltip-text-color);white-space:nowrap;pointer-events:none;opacity:0;padding:4px 8px;font-size:.75rem;line-height:1;transition:opacity .15s;position:absolute}.tooltip--visible{opacity:1}.tooltip--top{bottom:calc(100% + 6px);left:50%;transform:translate(-50%)}.tooltip--bottom{top:calc(100% + 6px);left:50%;transform:translate(-50%)}.tooltip--left{top:50%;right:calc(100% + 6px);transform:translateY(-50%)}.tooltip--right{top:50%;left:calc(100% + 6px);transform:translateY(-50%)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", u = 0, d = i`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5"></rect><path d="M10.5 5.5V3a1.5 1.5 0 0 0-1.5-1.5H3A1.5 1.5 0 0 0 1.5 3v6A1.5 1.5 0 0 0 3 10.5h2.5"></path></svg>`, f = i`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="3.5 8.5 6.5 11.5 12.5 4.5"></polyline></svg>`, p = i`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="4" x2="12" y2="12"></line><line x1="12" y1="4" x2="4" y2="12"></line></svg>`, m = class extends t {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.value = "", this.from = "", this.disabled = !1, this.copyLabel = "Copy", this.successLabel = "Copied!", this.errorLabel = "Error", this.feedbackDuration = 1e3, this.tooltipPlacement = "top", this._state = "idle", this._feedbackTimer = null, this._showTooltip = !1, this._tooltipId = `flint-copy-tooltip-${u++}`;
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.styles = a(l);
|
|
12
|
+
}
|
|
13
|
+
disconnectedCallback() {
|
|
14
|
+
super.disconnectedCallback(), this._feedbackTimer !== null && (clearTimeout(this._feedbackTimer), this._feedbackTimer = null);
|
|
15
|
+
}
|
|
16
|
+
_resolveFromValue() {
|
|
17
|
+
let e = this.from.match(/^(.+)\[(.+)\]$/);
|
|
18
|
+
if (e) {
|
|
19
|
+
let t = document.getElementById(e[1]);
|
|
20
|
+
return t ? t.getAttribute(e[2]) : null;
|
|
21
|
+
}
|
|
22
|
+
let t = this.from.match(/^(.+)\.(.+)$/);
|
|
23
|
+
if (t) {
|
|
24
|
+
let e = document.getElementById(t[1]);
|
|
25
|
+
if (!e) return null;
|
|
26
|
+
let n = e[t[2]];
|
|
27
|
+
return n == null ? null : String(n);
|
|
28
|
+
}
|
|
29
|
+
let n = document.getElementById(this.from);
|
|
30
|
+
return n ? n.textContent : null;
|
|
31
|
+
}
|
|
32
|
+
_getTextToCopy() {
|
|
33
|
+
return this.from ? this._resolveFromValue() ?? "" : this.value;
|
|
34
|
+
}
|
|
35
|
+
async _handleClick() {
|
|
36
|
+
if (this.disabled) return;
|
|
37
|
+
let e = this._getTextToCopy();
|
|
38
|
+
if (!e) {
|
|
39
|
+
this._showFeedback("error"), this.dispatchEvent(new CustomEvent("flint-copy-error", {
|
|
40
|
+
detail: { reason: "empty" },
|
|
41
|
+
bubbles: !0,
|
|
42
|
+
composed: !0
|
|
43
|
+
}));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
await navigator.clipboard.writeText(e), this._showFeedback("success"), this.dispatchEvent(new CustomEvent("flint-copy", {
|
|
48
|
+
detail: { value: e },
|
|
49
|
+
bubbles: !0,
|
|
50
|
+
composed: !0
|
|
51
|
+
}));
|
|
52
|
+
} catch {
|
|
53
|
+
this._showFeedback("error"), this.dispatchEvent(new CustomEvent("flint-copy-error", {
|
|
54
|
+
detail: { reason: "clipboard" },
|
|
55
|
+
bubbles: !0,
|
|
56
|
+
composed: !0
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
_showFeedback(e) {
|
|
61
|
+
this._feedbackTimer !== null && clearTimeout(this._feedbackTimer), this._state = e, this._showTooltip = !0, this.requestUpdate(), this._feedbackTimer = setTimeout(() => {
|
|
62
|
+
this._state = "idle", this._showTooltip = !1, this._feedbackTimer = null, this.requestUpdate();
|
|
63
|
+
}, this.feedbackDuration);
|
|
64
|
+
}
|
|
65
|
+
_handleMouseEnter() {
|
|
66
|
+
this._state === "idle" && (this._showTooltip = !0, this.requestUpdate());
|
|
67
|
+
}
|
|
68
|
+
_handleMouseLeave() {
|
|
69
|
+
this._state === "idle" && (this._showTooltip = !1, this.requestUpdate());
|
|
70
|
+
}
|
|
71
|
+
_handleFocus() {
|
|
72
|
+
this._state === "idle" && (this._showTooltip = !0, this.requestUpdate());
|
|
73
|
+
}
|
|
74
|
+
_handleBlur() {
|
|
75
|
+
this._state === "idle" && (this._showTooltip = !1, this.requestUpdate());
|
|
76
|
+
}
|
|
77
|
+
_renderIcon() {
|
|
78
|
+
switch (this._state) {
|
|
79
|
+
case "success": return n`<span class="icon icon--success" part="success-icon"><slot name="success-icon">${f}</slot></span>`;
|
|
80
|
+
case "error": return n`<span class="icon icon--error" part="error-icon"><slot name="error-icon">${p}</slot></span>`;
|
|
81
|
+
default: return n`<span class="icon" part="copy-icon"><slot name="copy-icon">${d}</slot></span>`;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
_getTooltipLabel() {
|
|
85
|
+
switch (this._state) {
|
|
86
|
+
case "success": return this.successLabel;
|
|
87
|
+
case "error": return this.errorLabel;
|
|
88
|
+
default: return this.copyLabel;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
let e = this._getTooltipLabel();
|
|
93
|
+
return n`
|
|
94
|
+
<button
|
|
95
|
+
class="copy-button"
|
|
96
|
+
part="button"
|
|
97
|
+
aria-label=${e || r}
|
|
98
|
+
aria-describedby=${this._showTooltip && e ? this._tooltipId : r}
|
|
99
|
+
?disabled=${this.disabled}
|
|
100
|
+
@click=${this._handleClick}
|
|
101
|
+
@mouseenter=${this._handleMouseEnter}
|
|
102
|
+
@mouseleave=${this._handleMouseLeave}
|
|
103
|
+
@focus=${this._handleFocus}
|
|
104
|
+
@blur=${this._handleBlur}
|
|
105
|
+
>
|
|
106
|
+
${this._renderIcon()}
|
|
107
|
+
${e ? n`
|
|
108
|
+
<span
|
|
109
|
+
id=${this._tooltipId}
|
|
110
|
+
class=${c({
|
|
111
|
+
tooltip: !0,
|
|
112
|
+
"tooltip--visible": this._showTooltip,
|
|
113
|
+
[`tooltip--${this.tooltipPlacement}`]: !0
|
|
114
|
+
})}
|
|
115
|
+
role="tooltip"
|
|
116
|
+
>${e}</span>
|
|
117
|
+
` : r}
|
|
118
|
+
</button>
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
e([s({ type: String })], m.prototype, "value", void 0), e([s({ type: String })], m.prototype, "from", void 0), e([s({
|
|
123
|
+
type: Boolean,
|
|
124
|
+
reflect: !0
|
|
125
|
+
})], m.prototype, "disabled", void 0), e([s({
|
|
126
|
+
type: String,
|
|
127
|
+
attribute: "copy-label"
|
|
128
|
+
})], m.prototype, "copyLabel", void 0), e([s({
|
|
129
|
+
type: String,
|
|
130
|
+
attribute: "success-label"
|
|
131
|
+
})], m.prototype, "successLabel", void 0), e([s({
|
|
132
|
+
type: String,
|
|
133
|
+
attribute: "error-label"
|
|
134
|
+
})], m.prototype, "errorLabel", void 0), e([s({
|
|
135
|
+
type: Number,
|
|
136
|
+
attribute: "feedback-duration"
|
|
137
|
+
})], m.prototype, "feedbackDuration", void 0), e([s({
|
|
138
|
+
type: String,
|
|
139
|
+
attribute: "tooltip-placement"
|
|
140
|
+
})], m.prototype, "tooltipPlacement", void 0), m = e([o("flint-copy-button")], m);
|
|
141
|
+
//#endregion
|
|
142
|
+
export { m as t };
|
|
@@ -0,0 +1,288 @@
|
|
|
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
|
+
//#region src/date-field/flint-date-field.css?inline
|
|
6
|
+
var l = ":host{font-family:var(--flint-font-family);display:inline-block}.field-label{letter-spacing:.01em;color:var(--flint-text-color-muted);margin-bottom:5px;font-size:.75rem;font-weight:500;transition:color .15s;display:block}:host([error]) .field-label{color:var(--flint-error-color)}.field-label.focused{color:var(--flint-primary-color)}:host([error]) .field-label.focused{color:var(--flint-error-color)}.field-container{background:var(--flint-input-bg);border:1.5px solid var(--flint-border-color);border-radius:var(--flint-border-radius-md);cursor:text;box-sizing:border-box;align-items:center;gap:4px;min-width:200px;height:44px;padding:0 10px;transition:border-color .15s,box-shadow .15s;display:inline-flex;position:relative}.field-container.focused{border-color:var(--flint-primary-color);box-shadow:0 0 0 3px var(--flint-primary-focus-ring)}:host([error]) .field-container{border-color:var(--flint-error-color)}:host([error]) .field-container.focused{box-shadow:0 0 0 3px var(--flint-error-focus-ring)}:host([disabled]) .field-container{background:var(--flint-input-disabled-bg);border-color:var(--flint-border-color);cursor:not-allowed}:host([readonly]) .field-container{cursor:default}.segments{outline:none;flex:1;align-items:center;gap:1px;min-height:100%;display:flex}.segment{font-variant-numeric:tabular-nums;color:var(--flint-text-color);cursor:text;-webkit-user-select:none;user-select:none;border-radius:4px;justify-content:center;align-items:center;min-width:2ch;padding:2px 4px;font-size:.9375rem;line-height:1;transition:background .1s;display:inline-flex}.segment.placeholder{color:var(--flint-input-placeholder-color)}.segment.active{background:var(--flint-primary-color);color:var(--flint-text-color-on-primary);border-radius:3px}:host([disabled]) .segment{color:var(--flint-text-color-muted)}:host([disabled]) .segment.active{background:var(--flint-border-color);color:var(--flint-text-color-muted)}.segment-year{min-width:4ch}.separator{color:var(--flint-text-color-muted);pointer-events:none;font-size:.9375rem;line-height:1}.field-actions{align-items:center;gap:2px;margin-left:auto;display:flex}.icon-btn{cursor:pointer;width:24px;height:24px;color:var(--flint-text-color-muted);background:0 0;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-size:.875rem;transition:background .12s,color .12s;display:flex}.icon-btn:hover{background:var(--flint-hover-color);color:var(--flint-text-color)}:host([disabled]) .icon-btn{pointer-events:none;opacity:0}.helper{color:var(--flint-text-color-muted);margin-top:5px;font-size:.75rem;display:block}:host([error]) .helper{color:var(--flint-error-color)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/date-field/flint-date-field.ts
|
|
9
|
+
function u(e, t, n) {
|
|
10
|
+
return Math.min(Math.max(e, t), n);
|
|
11
|
+
}
|
|
12
|
+
function d(e, t) {
|
|
13
|
+
return e < 1 || e > 12 ? 31 : new Date(t || 2e3, e, 0).getDate();
|
|
14
|
+
}
|
|
15
|
+
function f(e) {
|
|
16
|
+
if (!e) return {
|
|
17
|
+
m: null,
|
|
18
|
+
d: null,
|
|
19
|
+
y: null
|
|
20
|
+
};
|
|
21
|
+
let t = e.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
22
|
+
return t ? {
|
|
23
|
+
y: parseInt(t[1]),
|
|
24
|
+
m: parseInt(t[2]),
|
|
25
|
+
d: parseInt(t[3])
|
|
26
|
+
} : {
|
|
27
|
+
m: null,
|
|
28
|
+
d: null,
|
|
29
|
+
y: null
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function p(e, t, n) {
|
|
33
|
+
return e === null || t === null || n === null ? "" : `${String(n).padStart(4, "0")}-${String(e).padStart(2, "0")}-${String(t).padStart(2, "0")}`;
|
|
34
|
+
}
|
|
35
|
+
var m = [
|
|
36
|
+
"month",
|
|
37
|
+
"day",
|
|
38
|
+
"year"
|
|
39
|
+
], h = class extends t {
|
|
40
|
+
constructor(...e) {
|
|
41
|
+
super(...e), this.value = "", this.label = "", this.name = "", this.min = "", this.max = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this._internals = this.attachInternals(), this._month = null, this._day = null, this._year = null, this._active = null, this._focused = !1, this._buf = "";
|
|
42
|
+
}
|
|
43
|
+
static {
|
|
44
|
+
this.formAssociated = !0;
|
|
45
|
+
}
|
|
46
|
+
static {
|
|
47
|
+
this.styles = i(l);
|
|
48
|
+
}
|
|
49
|
+
willUpdate(e) {
|
|
50
|
+
if (e.has("value")) {
|
|
51
|
+
let { m: e, d: t, y: n } = f(this.value);
|
|
52
|
+
this._month = e, this._day = t, this._year = n;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
updated() {
|
|
56
|
+
this._syncFormValue();
|
|
57
|
+
}
|
|
58
|
+
clear() {
|
|
59
|
+
this._month = null, this._day = null, this._year = null, this._buf = "", this._internals.setFormValue?.(null), this.dispatchEvent(new CustomEvent("flint-date-field-clear", {
|
|
60
|
+
bubbles: !0,
|
|
61
|
+
composed: !0
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
_syncFormValue() {
|
|
65
|
+
let e = p(this._month, this._day, this._year) || null;
|
|
66
|
+
this._internals.setFormValue?.(e);
|
|
67
|
+
}
|
|
68
|
+
_setActive(e) {
|
|
69
|
+
this.disabled || this.readonly || (this._commitPartialBuffer(), this._active = e, this._buf = "");
|
|
70
|
+
}
|
|
71
|
+
_commitPartialBuffer() {
|
|
72
|
+
if (!this._buf || !this._active) return;
|
|
73
|
+
let e = parseInt(this._buf);
|
|
74
|
+
if (!isNaN(e)) {
|
|
75
|
+
if (this._active === "month" && e >= 1 && e <= 12) this._month = e;
|
|
76
|
+
else if (this._active === "day") {
|
|
77
|
+
let t = d(this._month ?? 1, this._year ?? 2e3);
|
|
78
|
+
e >= 1 && e <= t && (this._day = e);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
_nextSegment() {
|
|
83
|
+
if (!this._active) {
|
|
84
|
+
this._setActive("month");
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let e = m.indexOf(this._active);
|
|
88
|
+
e < m.length - 1 && this._setActive(m[e + 1]);
|
|
89
|
+
}
|
|
90
|
+
_prevSegment() {
|
|
91
|
+
if (!this._active) return;
|
|
92
|
+
let e = m.indexOf(this._active);
|
|
93
|
+
e > 0 && this._setActive(m[e - 1]);
|
|
94
|
+
}
|
|
95
|
+
_canGoNext() {
|
|
96
|
+
return this._active ? m.indexOf(this._active) < m.length - 1 : !0;
|
|
97
|
+
}
|
|
98
|
+
_canGoPrev() {
|
|
99
|
+
return this._active ? m.indexOf(this._active) > 0 : !1;
|
|
100
|
+
}
|
|
101
|
+
_handleDigit(e) {
|
|
102
|
+
this._active || this._setActive("month");
|
|
103
|
+
let t = this._active, n = this._buf + String(e);
|
|
104
|
+
if (t === "month") if (n.length === 1) e >= 2 && e <= 9 ? (this._month = e, this._buf = "", this._nextSegment()) : this._buf = n;
|
|
105
|
+
else {
|
|
106
|
+
let t = parseInt(n);
|
|
107
|
+
t >= 1 && t <= 12 ? (this._month = t, this._buf = "", this._nextSegment()) : (this._buf = String(e), e >= 2 && e <= 9 && (this._month = e, this._buf = "", this._nextSegment()));
|
|
108
|
+
}
|
|
109
|
+
else if (t === "day") {
|
|
110
|
+
let t = d(this._month ?? 1, this._year ?? 2e3);
|
|
111
|
+
if (n.length === 1) e >= 4 && e <= 9 ? (this._day = e, this._buf = "", this._nextSegment()) : this._buf = n;
|
|
112
|
+
else {
|
|
113
|
+
let r = parseInt(n);
|
|
114
|
+
r >= 1 && r <= t ? (this._day = r, this._buf = "", this._nextSegment()) : (this._buf = String(e), e >= 4 && e <= 9 && (this._day = e, this._buf = "", this._nextSegment()));
|
|
115
|
+
}
|
|
116
|
+
} else this._buf = n.slice(-4), this._buf.length === 4 && (this._year = parseInt(this._buf), this._buf = "", this._checkAndEmit());
|
|
117
|
+
}
|
|
118
|
+
_adjust(e) {
|
|
119
|
+
let t = this._active;
|
|
120
|
+
if (t) {
|
|
121
|
+
if (this._buf = "", t === "month") this._month = u((this._month ?? (e > 0 ? 0 : 13)) + e, 1, 12), this._day !== null && (this._day = u(this._day, 1, d(this._month, this._year ?? 2e3)));
|
|
122
|
+
else if (t === "day") {
|
|
123
|
+
let t = d(this._month ?? 1, this._year ?? 2e3);
|
|
124
|
+
this._day = u((this._day ?? (e > 0 ? 0 : t + 1)) + e, 1, t);
|
|
125
|
+
} else this._year = u((this._year ?? (/* @__PURE__ */ new Date()).getFullYear()) + e, 1, 9999);
|
|
126
|
+
this._checkAndEmit();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
_checkAndEmit() {
|
|
130
|
+
let e = p(this._month, this._day, this._year);
|
|
131
|
+
e && e !== this.value && (this.value = e, this.dispatchEvent(new CustomEvent("flint-date-field-change", {
|
|
132
|
+
detail: { value: e },
|
|
133
|
+
bubbles: !0,
|
|
134
|
+
composed: !0
|
|
135
|
+
})));
|
|
136
|
+
}
|
|
137
|
+
_handleKeyDown(e) {
|
|
138
|
+
if (!(this.disabled || this.readonly)) {
|
|
139
|
+
if (e.key >= "0" && e.key <= "9") {
|
|
140
|
+
e.preventDefault(), e.stopPropagation(), this._active || this._setActive("month"), this._handleDigit(parseInt(e.key));
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
switch (e.key) {
|
|
144
|
+
case "ArrowLeft":
|
|
145
|
+
e.preventDefault(), e.stopPropagation(), this._prevSegment();
|
|
146
|
+
break;
|
|
147
|
+
case "ArrowRight":
|
|
148
|
+
case "/":
|
|
149
|
+
e.preventDefault(), e.stopPropagation(), this._nextSegment();
|
|
150
|
+
break;
|
|
151
|
+
case "ArrowUp":
|
|
152
|
+
e.preventDefault(), e.stopPropagation(), this._active || this._setActive("month"), this._adjust(1);
|
|
153
|
+
break;
|
|
154
|
+
case "ArrowDown":
|
|
155
|
+
e.preventDefault(), e.stopPropagation(), this._active || this._setActive("month"), this._adjust(-1);
|
|
156
|
+
break;
|
|
157
|
+
case "Tab":
|
|
158
|
+
!e.shiftKey && this._canGoNext() ? (e.preventDefault(), e.stopPropagation(), this._nextSegment()) : e.shiftKey && this._canGoPrev() && (e.preventDefault(), e.stopPropagation(), this._prevSegment());
|
|
159
|
+
break;
|
|
160
|
+
case "Backspace":
|
|
161
|
+
case "Delete":
|
|
162
|
+
e.preventDefault(), e.stopPropagation(), this._buf = "", this._active === "month" && (this._month = null), this._active === "day" && (this._day = null), this._active === "year" && (this._year = null);
|
|
163
|
+
break;
|
|
164
|
+
case "Escape":
|
|
165
|
+
e.preventDefault(), e.stopPropagation(), this.clear();
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
_handleFocus() {
|
|
171
|
+
this._focused = !0, this._active || this._setActive("month");
|
|
172
|
+
}
|
|
173
|
+
_handleBlur(e) {
|
|
174
|
+
this.shadowRoot?.contains(e.relatedTarget) || (this._commitPartialBuffer(), this._focused = !1, this._active = null, this._buf = "");
|
|
175
|
+
}
|
|
176
|
+
_handleContainerClick(e) {
|
|
177
|
+
this.disabled || this.readonly || e.target.classList.contains("segments") && (this._setActive("month"), (this.shadowRoot?.querySelector(".segments"))?.focus());
|
|
178
|
+
}
|
|
179
|
+
_segmentText(e) {
|
|
180
|
+
let t = this._active === e && !this.disabled;
|
|
181
|
+
return e === "month" ? t && this._buf ? {
|
|
182
|
+
text: this._buf.padEnd(2, "_"),
|
|
183
|
+
isPlaceholder: !1
|
|
184
|
+
} : this._month === null ? {
|
|
185
|
+
text: "MM",
|
|
186
|
+
isPlaceholder: !0
|
|
187
|
+
} : {
|
|
188
|
+
text: String(this._month).padStart(2, "0"),
|
|
189
|
+
isPlaceholder: !1
|
|
190
|
+
} : e === "day" ? t && this._buf ? {
|
|
191
|
+
text: this._buf.padEnd(2, "_"),
|
|
192
|
+
isPlaceholder: !1
|
|
193
|
+
} : this._day === null ? {
|
|
194
|
+
text: "DD",
|
|
195
|
+
isPlaceholder: !0
|
|
196
|
+
} : {
|
|
197
|
+
text: String(this._day).padStart(2, "0"),
|
|
198
|
+
isPlaceholder: !1
|
|
199
|
+
} : t && this._buf ? {
|
|
200
|
+
text: this._buf.padEnd(4, "_"),
|
|
201
|
+
isPlaceholder: !1
|
|
202
|
+
} : this._year === null ? {
|
|
203
|
+
text: "YYYY",
|
|
204
|
+
isPlaceholder: !0
|
|
205
|
+
} : {
|
|
206
|
+
text: String(this._year).padStart(4, "0"),
|
|
207
|
+
isPlaceholder: !1
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
_hasValue() {
|
|
211
|
+
return this._month !== null || this._day !== null || this._year !== null;
|
|
212
|
+
}
|
|
213
|
+
render() {
|
|
214
|
+
let e = c({
|
|
215
|
+
"field-label": !0,
|
|
216
|
+
focused: this._focused
|
|
217
|
+
}), t = c({
|
|
218
|
+
"field-container": !0,
|
|
219
|
+
focused: this._focused
|
|
220
|
+
}), i = (e, t = "") => {
|
|
221
|
+
let { text: r, isPlaceholder: i } = this._segmentText(e);
|
|
222
|
+
return n`<span
|
|
223
|
+
class=${c({
|
|
224
|
+
segment: !0,
|
|
225
|
+
[e]: !0,
|
|
226
|
+
active: this._active === e,
|
|
227
|
+
placeholder: i,
|
|
228
|
+
[`segment-${e}`]: !0,
|
|
229
|
+
[t]: !!t
|
|
230
|
+
})}
|
|
231
|
+
@click=${(t) => {
|
|
232
|
+
t.stopPropagation(), this._setActive(e), (this.shadowRoot?.querySelector(".segments"))?.focus();
|
|
233
|
+
}}
|
|
234
|
+
>${r}</span>`;
|
|
235
|
+
};
|
|
236
|
+
return n`
|
|
237
|
+
${this.label ? n`<label class=${e}>${this.label}</label>` : r}
|
|
238
|
+
|
|
239
|
+
<div class=${t} @click=${this._handleContainerClick}>
|
|
240
|
+
|
|
241
|
+
<div
|
|
242
|
+
class="segments"
|
|
243
|
+
role="group"
|
|
244
|
+
aria-label=${this.label || "Date"}
|
|
245
|
+
tabindex=${this.disabled ? -1 : 0}
|
|
246
|
+
@keydown=${this._handleKeyDown}
|
|
247
|
+
@focus=${this._handleFocus}
|
|
248
|
+
@blur=${this._handleBlur}
|
|
249
|
+
>
|
|
250
|
+
${i("month")}
|
|
251
|
+
<span class="separator">/</span>
|
|
252
|
+
${i("day")}
|
|
253
|
+
<span class="separator">/</span>
|
|
254
|
+
${i("year", "segment-year")}
|
|
255
|
+
</div>
|
|
256
|
+
|
|
257
|
+
<div class="field-actions">
|
|
258
|
+
${this._hasValue() && !this.disabled && !this.readonly ? n`
|
|
259
|
+
<button class="icon-btn" aria-label="Clear date" tabindex="-1"
|
|
260
|
+
@click=${(e) => {
|
|
261
|
+
e.stopPropagation(), this.clear();
|
|
262
|
+
}}>✕</button>
|
|
263
|
+
` : r}
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
${this.helperText ? n`<small class="helper">${this.helperText}</small>` : r}
|
|
268
|
+
`;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
e([o({ type: String })], h.prototype, "value", void 0), e([o({ type: String })], h.prototype, "label", void 0), e([o({
|
|
272
|
+
type: String,
|
|
273
|
+
reflect: !0
|
|
274
|
+
})], h.prototype, "name", void 0), e([o({ type: String })], h.prototype, "min", void 0), e([o({ type: String })], h.prototype, "max", void 0), e([o({
|
|
275
|
+
type: Boolean,
|
|
276
|
+
reflect: !0
|
|
277
|
+
})], h.prototype, "disabled", void 0), e([o({
|
|
278
|
+
type: Boolean,
|
|
279
|
+
reflect: !0
|
|
280
|
+
})], h.prototype, "readonly", void 0), e([o({
|
|
281
|
+
type: Boolean,
|
|
282
|
+
reflect: !0
|
|
283
|
+
})], h.prototype, "error", void 0), e([o({
|
|
284
|
+
type: String,
|
|
285
|
+
attribute: "helper-text"
|
|
286
|
+
})], h.prototype, "helperText", void 0), e([s()], h.prototype, "_month", void 0), e([s()], h.prototype, "_day", void 0), e([s()], h.prototype, "_year", void 0), e([s()], h.prototype, "_active", void 0), e([s()], h.prototype, "_focused", void 0), e([s()], h.prototype, "_buf", void 0), h = e([a("flint-date-field")], h);
|
|
287
|
+
//#endregion
|
|
288
|
+
export { h as t };
|