@tet/tet-components 1.4.145-production → 1.4.145-testing
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/cjs/{http-codes-oHpK-Vsh.js → http-codes-D7ffzpYW.js} +1 -1
- package/dist/cjs/{index-puzHM5yZ.js → index-BL_zVDFC.js} +9 -1
- package/dist/cjs/{index-t4WNVvo_.js → index-Dzs7Nkbj.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{product-comparison-DAR6p-NV.js → product-comparison-DUzqZuWv.js} +1 -1
- package/dist/cjs/{string-CL-wkThZ.js → string-D0kCSyUd.js} +4 -0
- package/dist/cjs/tet-accordion.cjs.entry.js +1 -1
- package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +4 -4
- package/dist/cjs/tet-address-offers-view.cjs.entry.js +4 -4
- package/dist/cjs/tet-address-offers_5.cjs.entry.js +6 -6
- package/dist/cjs/tet-assembler.cjs.entry.js +4 -4
- package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/tet-autocomplete_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +4 -4
- package/dist/cjs/tet-b2b-configurator.cjs.entry.js +5 -5
- package/dist/cjs/tet-banner-nav.cjs.entry.js +4 -4
- package/dist/cjs/tet-bar-graph.cjs.entry.js +1 -1
- package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-compare-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-button.cjs.entry.js +1 -1
- package/dist/cjs/tet-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-carousel.cjs.entry.js +4 -4
- package/dist/cjs/tet-checkbox_3.cjs.entry.js +1 -1
- package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +4 -4
- package/dist/cjs/tet-cloud-configurator.cjs.entry.js +4 -4
- package/dist/cjs/tet-colors.cjs.entry.js +1 -1
- package/dist/cjs/tet-compare-card-v2.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-card-v3.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-components.cjs.js +2 -2
- package/dist/cjs/tet-container_2.cjs.entry.js +2 -2
- package/dist/cjs/tet-countdown.cjs.entry.js +1 -1
- package/dist/cjs/tet-counter.cjs.entry.js +1 -1
- package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +387 -0
- package/dist/cjs/tet-datepicker.cjs.entry.js +132 -0
- package/dist/cjs/tet-dialog.cjs.entry.js +4 -4
- package/dist/cjs/tet-display.cjs.entry.js +1 -1
- package/dist/cjs/tet-divider.cjs.entry.js +1 -1
- package/dist/cjs/tet-dynamic-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-expandable-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/tet-feedback-form.cjs.entry.js +4 -4
- package/dist/cjs/tet-filter.cjs.entry.js +1 -1
- package/dist/cjs/tet-floating-block.cjs.entry.js +1 -1
- package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
- package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
- package/dist/cjs/tet-grid.cjs.entry.js +1 -1
- package/dist/cjs/tet-icon.cjs.entry.js +2 -2
- package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
- package/dist/cjs/tet-input.cjs.entry.js +4 -4
- package/dist/cjs/tet-layout.cjs.entry.js +1 -1
- package/dist/cjs/tet-link-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-link.cjs.entry.js +1 -1
- package/dist/cjs/tet-menu-mobile.cjs.entry.js +1 -1
- package/dist/cjs/tet-menu.cjs.entry.js +1 -1
- package/dist/cjs/tet-mini-compare-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +4 -4
- package/dist/cjs/tet-navigation-mobile.cjs.entry.js +4 -4
- package/dist/cjs/tet-news-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-notification.cjs.entry.js +1 -1
- package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/tet-position.cjs.entry.js +1 -1
- package/dist/cjs/tet-price-view.cjs.entry.js +1 -1
- package/dist/cjs/tet-radio-blocks.cjs.entry.js +1 -1
- package/dist/cjs/tet-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/tet-range-slider.cjs.entry.js +1 -1
- package/dist/cjs/tet-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card-group.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card.cjs.entry.js +4 -4
- package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
- package/dist/cjs/tet-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tet-stepper-input.cjs.entry.js +4 -4
- package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
- package/dist/cjs/tet-sticky-offer.cjs.entry.js +1 -1
- package/dist/cjs/tet-support-search.cjs.entry.js +2 -2
- package/dist/cjs/tet-switch.cjs.entry.js +1 -1
- package/dist/cjs/tet-table.cjs.entry.js +1 -1
- package/dist/cjs/tet-tag_2.cjs.entry.js +4 -4
- package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-text.cjs.entry.js +1 -1
- package/dist/cjs/tet-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +4 -4
- package/dist/cjs/{translations-D5zHdnnh.js → translations-Uvcq4kv8.js} +2 -2
- package/dist/cjs/{typecheck-Do6mN8Vg.js → typecheck--Bs-bZ_K.js} +2 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.css +393 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.css +455 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.css +382 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.css +382 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/tet-datepicker.css +380 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-Crh1Z4Ao.js → p-5kTi8PjH.js} +1 -1
- package/dist/components/{p-CQSDHF3e.js → p-B4CDhWR6.js} +1 -1
- package/dist/components/{p-Bs7YjXl3.js → p-B5shOn6R.js} +1 -1
- package/dist/components/{p-BDEIj3j6.js → p-B9bE6qY-.js} +1 -1
- package/dist/components/{p-BrziWUeN.js → p-BAkWN1D6.js} +1 -1
- package/dist/components/p-BDPxVbYN.js +1 -0
- package/dist/components/{p-Bds52Hqu.js → p-BGrd_jXc.js} +1 -1
- package/dist/components/p-BKlEhiGf.js +1 -0
- package/dist/components/{p-MACZHbLY.js → p-BN2sV9-A.js} +1 -1
- package/dist/components/{p-Bxw_FbaE.js → p-BPQNPw6e.js} +1 -1
- package/dist/components/{p-CDZEVf7C.js → p-BSgeKEN8.js} +1 -1
- package/dist/components/{p-Djfnw8Q3.js → p-BTSQyL7G.js} +1 -1
- package/dist/components/{p-BRAnHkTt.js → p-BY4VWk_A.js} +1 -1
- package/dist/components/{p-B-szIY3U.js → p-BebUippY.js} +1 -1
- package/dist/components/{p-Du7-7CWb.js → p-BkFKgYOW.js} +1 -1
- package/dist/components/{p-fUGNvavt.js → p-Br4jWI9B.js} +1 -1
- package/dist/components/{p-B73cnklL.js → p-BrD5Af4p.js} +1 -1
- package/dist/components/{p-CKR9yWin.js → p-BtMYZdep.js} +1 -1
- package/dist/components/{p-C2it2KVO.js → p-C-TWSM4z.js} +1 -1
- package/dist/components/{p-CU66IBVN.js → p-C31HYpo5.js} +1 -1
- package/dist/components/{p-BWivglmk.js → p-CDDvHWDu.js} +1 -1
- package/dist/components/{p-CAN26IpG.js → p-CH_CJUiq.js} +1 -1
- package/dist/components/{p-CORlnisI.js → p-CLtgu35N.js} +1 -1
- package/dist/components/p-CNsxz-TF.js +1 -0
- package/dist/components/{p-1-gOR9lC.js → p-COVrKFTj.js} +1 -1
- package/dist/components/p-CUOgW7ZG.js +1 -0
- package/dist/components/{p-u1z4RZIA.js → p-CY1tO1HE.js} +1 -1
- package/dist/components/{p-D2tq3Qs4.js → p-CbqipjNj.js} +1 -1
- package/dist/components/p-Cdi7KDBd.js +1 -0
- package/dist/components/p-Cef0hbKH.js +1 -0
- package/dist/components/{p-B1aYwHJw.js → p-Cn_UPY3P.js} +1 -1
- package/dist/components/p-CoQ-OVcl.js +1 -0
- package/dist/components/{p-BhNwCgFv.js → p-Cy7tiOgd.js} +1 -1
- package/dist/components/{p-DU8lYjbh.js → p-CzRzXWH6.js} +1 -1
- package/dist/components/p-D0GJDW-O.js +1 -0
- package/dist/components/{p-3dRoKfHO.js → p-D6kNR-cR.js} +1 -1
- package/dist/components/{p-DnuQvpFp.js → p-DIqowNgr.js} +1 -1
- package/dist/components/{p-HZVWt9O0.js → p-DT8tgMUV.js} +1 -1
- package/dist/components/p-DTeQFROq.js +1 -0
- package/dist/components/p-DeyD67la.js +1 -0
- package/dist/components/{p-DcpRqRvh.js → p-DsTbwBba.js} +1 -1
- package/dist/components/{p-DA2dABq-.js → p-JZAHJ9gF.js} +1 -1
- package/dist/components/{p-c5bfjvCu.js → p-Jzy65bod.js} +1 -1
- package/dist/components/{p-BMzA8V9P.js → p-KagFBuv9.js} +1 -1
- package/dist/components/{p-Ck3YL66m.js → p-NAR5FXDl.js} +1 -1
- package/dist/components/{p-B4HwH3Yk.js → p-PYYBcx0f.js} +1 -1
- package/dist/components/{p-T0IODFGL.js → p-SprieIc0.js} +1 -1
- package/dist/components/{p-Cxj5bWkg.js → p-UVdgsuUF.js} +1 -1
- package/dist/components/{p-BKb5pnVY.js → p-ZPHtvw0Z.js} +1 -1
- package/dist/components/p-iksDLWwk.js +1 -0
- package/dist/{tet-components/p-OiVa1VV1.js → components/p-lEX8wezw.js} +1 -1
- package/dist/components/{p-BxqIYMTA.js → p-m0PlnnJG.js} +1 -1
- package/dist/components/{p-Bt1rxkXS.js → p-uriK4wxp.js} +1 -1
- package/dist/components/{p-CSeIckFV.js → p-vLpvVmb8.js} +1 -1
- package/dist/components/{p-C8PhwAQB.js → p-zWNDOP2j.js} +1 -1
- package/dist/components/tet-accordion.js +1 -1
- package/dist/components/tet-address-offers-filters-products.js +1 -1
- package/dist/components/tet-address-offers-filters.js +1 -1
- package/dist/components/tet-address-offers-view.js +1 -1
- package/dist/components/tet-address-offers.js +1 -1
- package/dist/components/tet-address-search.js +1 -1
- package/dist/components/tet-assembler.js +1 -1
- package/dist/components/tet-asset-availability-addresses.js +1 -1
- package/dist/components/tet-autocomplete-dropdown.js +1 -1
- package/dist/components/tet-autocomplete.js +1 -1
- package/dist/components/tet-availability-contact-form.js +1 -1
- package/dist/components/tet-b2b-check-out-form.js +1 -1
- package/dist/components/tet-b2b-compare-card.js +1 -1
- package/dist/components/tet-b2b-configurator-cart.js +1 -1
- package/dist/components/tet-b2b-configurator.js +1 -1
- package/dist/components/tet-banner-nav.js +1 -1
- package/dist/components/tet-bar-graph.js +1 -1
- package/dist/components/tet-border-radius.js +1 -1
- package/dist/components/tet-business-card.js +1 -1
- package/dist/components/tet-business-compare-card.js +1 -1
- package/dist/components/tet-business-navigation.js +1 -1
- package/dist/components/tet-business-round-stepper.js +1 -1
- package/dist/components/tet-business-summary-card.js +1 -1
- package/dist/components/tet-button.js +1 -1
- package/dist/components/tet-card-list.js +1 -1
- package/dist/components/tet-carousel.js +1 -1
- package/dist/components/tet-checkbox.js +1 -1
- package/dist/components/tet-cloud-application-form-dialog.js +1 -1
- package/dist/components/tet-cloud-configurator.js +1 -1
- package/dist/components/tet-colors.js +1 -1
- package/dist/components/tet-compare-card-v2.js +1 -1
- package/dist/components/tet-compare-card-v3.js +1 -1
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +1 -1
- package/dist/components/tet-compare-cards.js +1 -1
- package/dist/components/tet-container.js +1 -1
- package/dist/components/tet-countdown.js +1 -1
- package/dist/components/tet-counter.js +1 -1
- package/dist/components/tet-datepicker-header.d.ts +11 -0
- package/dist/components/tet-datepicker-header.js +1 -0
- package/dist/components/tet-datepicker-month-view.d.ts +11 -0
- package/dist/components/tet-datepicker-month-view.js +1 -0
- package/dist/components/tet-datepicker-multi-year-view.d.ts +11 -0
- package/dist/components/tet-datepicker-multi-year-view.js +1 -0
- package/dist/components/tet-datepicker-year-view.d.ts +11 -0
- package/dist/components/tet-datepicker-year-view.js +1 -0
- package/dist/components/tet-datepicker.d.ts +11 -0
- package/dist/components/tet-datepicker.js +1 -0
- package/dist/components/tet-dialog.js +1 -1
- package/dist/components/tet-display.js +1 -1
- package/dist/components/tet-divider.js +1 -1
- package/dist/components/tet-dropdown.js +1 -1
- package/dist/components/tet-dynamic-card.js +1 -1
- package/dist/components/tet-expandable-input.js +1 -1
- package/dist/components/tet-expansion-panel.js +1 -1
- package/dist/components/tet-feedback-form.js +1 -1
- package/dist/components/tet-filter.js +1 -1
- package/dist/components/tet-floating-block.js +1 -1
- package/dist/components/tet-font-weight.js +1 -1
- package/dist/components/tet-fonts.js +1 -1
- package/dist/components/tet-grid.js +1 -1
- package/dist/components/tet-icon.js +1 -1
- package/dist/components/tet-inline-message.js +1 -1
- package/dist/components/tet-input.js +1 -1
- package/dist/components/tet-layout.js +1 -1
- package/dist/components/tet-link-card-list.js +1 -1
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-loader.js +1 -1
- package/dist/components/tet-menu-mobile.js +1 -1
- package/dist/components/tet-menu.js +1 -1
- package/dist/components/tet-mini-compare-card.js +1 -1
- package/dist/components/tet-multi-step-dialog.js +1 -1
- package/dist/components/tet-navigation-mobile.js +1 -1
- package/dist/components/tet-news-card-list.js +1 -1
- package/dist/components/tet-notification.js +1 -1
- package/dist/components/tet-number-input.js +1 -1
- package/dist/components/tet-placeholder.js +1 -1
- package/dist/components/tet-position.js +1 -1
- package/dist/components/tet-price-view.js +1 -1
- package/dist/components/tet-radio-blocks.js +1 -1
- package/dist/components/tet-radio.js +1 -1
- package/dist/components/tet-range-slider.js +1 -1
- package/dist/components/tet-round-stepper.js +1 -1
- package/dist/components/tet-selection-list.js +1 -1
- package/dist/components/tet-snicker-card-group.js +1 -1
- package/dist/components/tet-snicker-card.js +1 -1
- package/dist/components/tet-spacing.js +1 -1
- package/dist/components/tet-spinner.js +1 -1
- package/dist/components/tet-stepper-input.js +1 -1
- package/dist/components/tet-stepper-v3.js +1 -1
- package/dist/components/tet-sticky-offer.js +1 -1
- package/dist/components/tet-support-search.js +1 -1
- package/dist/components/tet-switch.js +1 -1
- package/dist/components/tet-tab-content.js +1 -1
- package/dist/components/tet-tab-header.js +1 -1
- package/dist/components/tet-table.js +1 -1
- package/dist/components/tet-tag-group.js +1 -1
- package/dist/components/tet-tag.js +1 -1
- package/dist/components/tet-text-list.js +1 -1
- package/dist/components/tet-text.js +1 -1
- package/dist/components/tet-textarea.js +1 -1
- package/dist/components/tet-thank-you-view-v3.js +1 -1
- package/dist/components/tet-tooltip.js +1 -1
- package/dist/esm/{http-codes-Db3nijH5.js → http-codes-BQGPgOl6.js} +1 -1
- package/dist/esm/{index-Pqdi2xbP.js → index-BGB6gNkz.js} +9 -1
- package/dist/esm/{index-BwDyy0_n.js → index-DScZlZas.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{product-comparison-dUap5wKc.js → product-comparison-DUVV7BFR.js} +1 -1
- package/dist/esm/{string-C9BlrGW8.js → string-D0GJDW-O.js} +4 -1
- package/dist/esm/tet-accordion.entry.js +1 -1
- package/dist/esm/tet-address-offers-filters-products_2.entry.js +4 -4
- package/dist/esm/tet-address-offers-view.entry.js +4 -4
- package/dist/esm/tet-address-offers_5.entry.js +6 -6
- package/dist/esm/tet-assembler.entry.js +4 -4
- package/dist/esm/tet-autocomplete-dropdown.entry.js +2 -2
- package/dist/esm/tet-autocomplete_2.entry.js +3 -3
- package/dist/esm/tet-b2b-check-out-form_5.entry.js +4 -4
- package/dist/esm/tet-b2b-configurator.entry.js +5 -5
- package/dist/esm/tet-banner-nav.entry.js +4 -4
- package/dist/esm/tet-bar-graph.entry.js +1 -1
- package/dist/esm/tet-border-radius.entry.js +1 -1
- package/dist/esm/tet-business-card.entry.js +1 -1
- package/dist/esm/tet-business-compare-card.entry.js +1 -1
- package/dist/esm/tet-business-round-stepper.entry.js +1 -1
- package/dist/esm/tet-button.entry.js +1 -1
- package/dist/esm/tet-card-list.entry.js +1 -1
- package/dist/esm/tet-carousel.entry.js +4 -4
- package/dist/esm/tet-checkbox_3.entry.js +1 -1
- package/dist/esm/tet-cloud-application-form-dialog.entry.js +4 -4
- package/dist/esm/tet-cloud-configurator.entry.js +4 -4
- package/dist/esm/tet-colors.entry.js +1 -1
- package/dist/esm/tet-compare-card-v2.entry.js +3 -3
- package/dist/esm/tet-compare-card-v3.entry.js +3 -3
- package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
- package/dist/esm/tet-compare-cards_2.entry.js +3 -3
- package/dist/esm/tet-components.js +3 -3
- package/dist/esm/tet-container_2.entry.js +2 -2
- package/dist/esm/tet-countdown.entry.js +1 -1
- package/dist/esm/tet-counter.entry.js +1 -1
- package/dist/esm/tet-datepicker-header_4.entry.js +382 -0
- package/dist/esm/tet-datepicker.entry.js +130 -0
- package/dist/esm/tet-dialog.entry.js +4 -4
- package/dist/esm/tet-display.entry.js +1 -1
- package/dist/esm/tet-divider.entry.js +1 -1
- package/dist/esm/tet-dynamic-card.entry.js +1 -1
- package/dist/esm/tet-expandable-input.entry.js +1 -1
- package/dist/esm/tet-expansion-panel.entry.js +1 -1
- package/dist/esm/tet-feedback-form.entry.js +4 -4
- package/dist/esm/tet-filter.entry.js +1 -1
- package/dist/esm/tet-floating-block.entry.js +1 -1
- package/dist/esm/tet-font-weight.entry.js +1 -1
- package/dist/esm/tet-fonts.entry.js +1 -1
- package/dist/esm/tet-grid.entry.js +1 -1
- package/dist/esm/tet-icon.entry.js +2 -2
- package/dist/esm/tet-inline-message.entry.js +1 -1
- package/dist/esm/tet-input.entry.js +4 -4
- package/dist/esm/tet-layout.entry.js +1 -1
- package/dist/esm/tet-link-card-list.entry.js +1 -1
- package/dist/esm/tet-link.entry.js +1 -1
- package/dist/esm/tet-menu-mobile.entry.js +1 -1
- package/dist/esm/tet-menu.entry.js +1 -1
- package/dist/esm/tet-mini-compare-card.entry.js +1 -1
- package/dist/esm/tet-multi-step-dialog.entry.js +4 -4
- package/dist/esm/tet-navigation-mobile.entry.js +4 -4
- package/dist/esm/tet-news-card-list.entry.js +1 -1
- package/dist/esm/tet-notification.entry.js +1 -1
- package/dist/esm/tet-number-input.entry.js +1 -1
- package/dist/esm/tet-placeholder.entry.js +1 -1
- package/dist/esm/tet-position.entry.js +1 -1
- package/dist/esm/tet-price-view.entry.js +1 -1
- package/dist/esm/tet-radio-blocks.entry.js +1 -1
- package/dist/esm/tet-radio_2.entry.js +1 -1
- package/dist/esm/tet-range-slider.entry.js +1 -1
- package/dist/esm/tet-round-stepper.entry.js +1 -1
- package/dist/esm/tet-snicker-card-group.entry.js +1 -1
- package/dist/esm/tet-snicker-card.entry.js +4 -4
- package/dist/esm/tet-spacing.entry.js +1 -1
- package/dist/esm/tet-spinner.entry.js +1 -1
- package/dist/esm/tet-stepper-input.entry.js +4 -4
- package/dist/esm/tet-stepper-v3.entry.js +1 -1
- package/dist/esm/tet-sticky-offer.entry.js +1 -1
- package/dist/esm/tet-support-search.entry.js +2 -2
- package/dist/esm/tet-switch.entry.js +1 -1
- package/dist/esm/tet-table.entry.js +1 -1
- package/dist/esm/tet-tag_2.entry.js +4 -4
- package/dist/esm/tet-text-list.entry.js +1 -1
- package/dist/esm/tet-text.entry.js +1 -1
- package/dist/esm/tet-textarea.entry.js +1 -1
- package/dist/esm/tet-thank-you-view-v3.entry.js +4 -4
- package/dist/esm/{translations-86O17evG.js → translations-Dc2OQnbI.js} +2 -2
- package/dist/esm/{typecheck-CaZKtSyx.js → typecheck-Bvqcvhjw.js} +2 -1
- package/dist/tet-components/{p-0a797489.entry.js → p-01336e7a.entry.js} +1 -1
- package/dist/tet-components/{p-15f89973.entry.js → p-06d237de.entry.js} +1 -1
- package/dist/tet-components/{p-90a100c9.entry.js → p-085ec974.entry.js} +1 -1
- package/dist/tet-components/{p-3118407c.entry.js → p-138b551e.entry.js} +1 -1
- package/dist/tet-components/{p-bd8c9038.entry.js → p-19525e17.entry.js} +1 -1
- package/dist/tet-components/{p-bb153e77.entry.js → p-1be85243.entry.js} +1 -1
- package/dist/tet-components/{p-ade5a79e.entry.js → p-1be8a5bc.entry.js} +1 -1
- package/dist/tet-components/{p-a250431b.entry.js → p-20f6ad3e.entry.js} +1 -1
- package/dist/tet-components/{p-eaf808b1.entry.js → p-24058988.entry.js} +1 -1
- package/dist/tet-components/{p-85b03cbb.entry.js → p-27f233a6.entry.js} +1 -1
- package/dist/tet-components/{p-7c068242.entry.js → p-2cfcf7df.entry.js} +1 -1
- package/dist/tet-components/{p-e9cfabb4.entry.js → p-304026be.entry.js} +1 -1
- package/dist/tet-components/p-35e3a3ec.entry.js +1 -0
- package/dist/tet-components/{p-99d22e9f.entry.js → p-3698d8ff.entry.js} +1 -1
- package/dist/tet-components/{p-21744507.entry.js → p-37c83d33.entry.js} +1 -1
- package/dist/tet-components/{p-70358487.entry.js → p-3996e0b7.entry.js} +1 -1
- package/dist/tet-components/{p-2f1fb5d8.entry.js → p-3af65955.entry.js} +1 -1
- package/dist/tet-components/{p-56a273b2.entry.js → p-3bf29f89.entry.js} +1 -1
- package/dist/tet-components/{p-86ea31b9.entry.js → p-3ce7cda9.entry.js} +1 -1
- package/dist/tet-components/{p-21beac4f.entry.js → p-3d845492.entry.js} +1 -1
- package/dist/tet-components/{p-eac98a86.entry.js → p-3f533c77.entry.js} +1 -1
- package/dist/tet-components/{p-5c3cf41b.entry.js → p-4215dec8.entry.js} +1 -1
- package/dist/tet-components/{p-93d9beb5.entry.js → p-499bf719.entry.js} +1 -1
- package/dist/tet-components/{p-b0073cd0.entry.js → p-49ba40a1.entry.js} +1 -1
- package/dist/tet-components/{p-69f6bb43.entry.js → p-4e018c17.entry.js} +1 -1
- package/dist/tet-components/{p-6552a315.entry.js → p-56f99297.entry.js} +1 -1
- package/dist/tet-components/{p-65e5e233.entry.js → p-597ccbc1.entry.js} +1 -1
- package/dist/tet-components/{p-9d3a45b0.entry.js → p-5bac849e.entry.js} +1 -1
- package/dist/tet-components/{p-2156320e.entry.js → p-5e458bfa.entry.js} +1 -1
- package/dist/tet-components/{p-2b3f3308.entry.js → p-632d382c.entry.js} +1 -1
- package/dist/tet-components/{p-b784c084.entry.js → p-67bb4d53.entry.js} +1 -1
- package/dist/tet-components/{p-06f3d072.entry.js → p-6946ba58.entry.js} +1 -1
- package/dist/tet-components/{p-21c16e26.entry.js → p-6c28d6ac.entry.js} +1 -1
- package/dist/tet-components/{p-a13e3112.entry.js → p-6eb089d0.entry.js} +1 -1
- package/dist/tet-components/{p-90adc88e.entry.js → p-71fa80d7.entry.js} +1 -1
- package/dist/tet-components/{p-a18c847c.entry.js → p-7ac2babd.entry.js} +1 -1
- package/dist/tet-components/{p-2c5dbd08.entry.js → p-7bccaeee.entry.js} +1 -1
- package/dist/tet-components/{p-6787e552.entry.js → p-7e2fa50e.entry.js} +1 -1
- package/dist/tet-components/{p-fbc66ce6.entry.js → p-830d6a1b.entry.js} +1 -1
- package/dist/tet-components/{p-1ffa8779.entry.js → p-83be5dad.entry.js} +1 -1
- package/dist/tet-components/{p-ceeb117f.entry.js → p-8ab2df2d.entry.js} +1 -1
- package/dist/tet-components/{p-79023631.entry.js → p-8eed24d3.entry.js} +1 -1
- package/dist/tet-components/{p-1fb1fb6e.entry.js → p-915b2507.entry.js} +1 -1
- package/dist/tet-components/{p-47ae783d.entry.js → p-9183aa09.entry.js} +1 -1
- package/dist/tet-components/{p-ee4d3c5a.entry.js → p-96438761.entry.js} +1 -1
- package/dist/tet-components/{p-1c80a10d.entry.js → p-973193d0.entry.js} +1 -1
- package/dist/tet-components/{p-b1ff106f.entry.js → p-9761bc72.entry.js} +1 -1
- package/dist/tet-components/{p-67963996.entry.js → p-97ce6978.entry.js} +1 -1
- package/dist/tet-components/{p-a2445052.entry.js → p-9ae4f442.entry.js} +1 -1
- package/dist/tet-components/{p-e7f235e2.entry.js → p-9b13b128.entry.js} +1 -1
- package/dist/tet-components/{p-c92abc74.entry.js → p-9d7fbd42.entry.js} +1 -1
- package/dist/tet-components/p-BGB6gNkz.js +3 -0
- package/dist/tet-components/p-Bvqcvhjw.js +1 -0
- package/dist/tet-components/p-BzLFf73g.js +1 -0
- package/dist/tet-components/p-C1XJmhDH.js +1 -0
- package/dist/tet-components/p-D0GJDW-O.js +1 -0
- package/dist/tet-components/{p-CZm2B2F9.js → p-DX1IQAn5.js} +1 -1
- package/dist/tet-components/{p-B7QSqkXs.js → p-DbJll7nz.js} +1 -1
- package/dist/tet-components/{p-ae0e6cc0.entry.js → p-a74562c2.entry.js} +1 -1
- package/dist/tet-components/{p-1c2fce79.entry.js → p-aae1bc5a.entry.js} +1 -1
- package/dist/tet-components/{p-87f9641e.entry.js → p-b4f3985e.entry.js} +1 -1
- package/dist/tet-components/{p-b26635f1.entry.js → p-b5e665c7.entry.js} +1 -1
- package/dist/tet-components/{p-12844c69.entry.js → p-b7263345.entry.js} +1 -1
- package/dist/tet-components/{p-9f706c0c.entry.js → p-b86022d7.entry.js} +1 -1
- package/dist/tet-components/{p-4e4becf7.entry.js → p-be2a472c.entry.js} +1 -1
- package/dist/tet-components/p-c0c302fe.entry.js +1 -0
- package/dist/tet-components/{p-2095c5ec.entry.js → p-c27be82c.entry.js} +1 -1
- package/dist/tet-components/{p-25e53d91.entry.js → p-c37ccaaa.entry.js} +1 -1
- package/dist/tet-components/{p-3503843f.entry.js → p-c44052cb.entry.js} +1 -1
- package/dist/tet-components/{p-2ec8266d.entry.js → p-c541b10f.entry.js} +1 -1
- package/dist/tet-components/{p-9f50d96f.entry.js → p-c9e434c1.entry.js} +1 -1
- package/dist/tet-components/{p-5e4c67c6.entry.js → p-c9f14568.entry.js} +1 -1
- package/dist/tet-components/{p-817159e1.entry.js → p-cd7efc99.entry.js} +1 -1
- package/dist/tet-components/{p-c53f8537.entry.js → p-cdb8c877.entry.js} +1 -1
- package/dist/tet-components/{p-14b861d1.entry.js → p-cfdad238.entry.js} +1 -1
- package/dist/tet-components/{p-dd6aa7e3.entry.js → p-d2bb410e.entry.js} +1 -1
- package/dist/tet-components/{p-c0ef380b.entry.js → p-d8b4261d.entry.js} +1 -1
- package/dist/tet-components/{p-1846ecd0.entry.js → p-df68eb4e.entry.js} +1 -1
- package/dist/tet-components/{p-dccf260d.entry.js → p-e2d4e5c3.entry.js} +1 -1
- package/dist/tet-components/{p-8e86b22c.entry.js → p-e564d494.entry.js} +1 -1
- package/dist/tet-components/{p-66c3e3df.entry.js → p-e7e18cc4.entry.js} +1 -1
- package/dist/tet-components/{p-88dae177.entry.js → p-ec4710dd.entry.js} +1 -1
- package/dist/tet-components/{p-b74913d9.entry.js → p-ee489b61.entry.js} +1 -1
- package/dist/tet-components/{p-c496b9a7.entry.js → p-f21e5e14.entry.js} +1 -1
- package/dist/tet-components/{p-04fc4fe5.entry.js → p-f5d610ea.entry.js} +1 -1
- package/dist/tet-components/{p-94d24a08.entry.js → p-fcfc7424.entry.js} +1 -1
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.d.ts +21 -0
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.d.ts +45 -0
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.d.ts +20 -0
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.d.ts +20 -0
- package/dist/types/components/simple/inputs/tet-datepicker/tet-datepicker.d.ts +47 -0
- package/dist/types/components.d.ts +383 -0
- package/package.json +1 -1
- package/dist/components/p-BVVamOdB.js +0 -1
- package/dist/components/p-BdMiAoro.js +0 -1
- package/dist/components/p-CWuhYFDW.js +0 -1
- package/dist/components/p-DYckaPWn.js +0 -1
- package/dist/components/p-DdrqRtAK.js +0 -1
- package/dist/components/p-_2UzwYR8.js +0 -1
- package/dist/tet-components/p-BxMAl4Ol.js +0 -1
- package/dist/tet-components/p-C9BlrGW8.js +0 -1
- package/dist/tet-components/p-CaZKtSyx.js +0 -1
- package/dist/tet-components/p-Pqdi2xbP.js +0 -3
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BL_zVDFC.js');
|
|
4
|
+
var string = require('./string-D0kCSyUd.js');
|
|
5
|
+
var typecheck = require('./typecheck--Bs-bZ_K.js');
|
|
6
|
+
|
|
7
|
+
const DATEPICKER_WEEK_DAYS = ['P.', 'Ot.', 'Tr.', 'Ce.', 'Pk.', 'Se.', 'Sv.'];
|
|
8
|
+
const DATEPICKER_MONTHS = [
|
|
9
|
+
'Janvāris',
|
|
10
|
+
'Februāris',
|
|
11
|
+
'Marts',
|
|
12
|
+
'Aprīlis',
|
|
13
|
+
'Maijs',
|
|
14
|
+
'Jūnijs',
|
|
15
|
+
'Jūlijs',
|
|
16
|
+
'Augusts',
|
|
17
|
+
'Septembris',
|
|
18
|
+
'Oktobris',
|
|
19
|
+
'Novembris',
|
|
20
|
+
'Decembris'
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const subtractYears = (date, years) => {
|
|
24
|
+
date.setFullYear(date.getFullYear() - years);
|
|
25
|
+
return date;
|
|
26
|
+
};
|
|
27
|
+
const addYears = (date, years) => {
|
|
28
|
+
date.setFullYear(date.getFullYear() + years);
|
|
29
|
+
return date;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const tetDatepickerHeaderCss = () => `:host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{display:block;-webkit-tap-highlight-color:transparent}.header{display:flex;justify-content:space-between;align-items:center;height:3rem;user-select:none}.header .control-button{padding:0.5rem 1rem;border-radius:1.5rem;cursor:pointer}.header .control-button .chevron-down{--icon-size:1.2rem;position:relative;top:-0.125rem;margin-left:0.5rem}.header .control-button:hover{background:var(--interaction-state-gray)}.header .icon-container{display:flex;justify-content:center;align-items:center;max-width:3rem;max-height:3rem;width:100%;height:100%;border-radius:1.5rem;cursor:pointer}.header .icon-container:hover{background:rgb(235, 237, 239)}.header .icon-container .arrow-right,.header .icon-container .arrow-left{--icon-size:1.2rem}`;
|
|
33
|
+
|
|
34
|
+
const TetDatepickerHeader = class {
|
|
35
|
+
constructor(hostRef) {
|
|
36
|
+
index.registerInstance(this, hostRef);
|
|
37
|
+
this.internalDateChanged = index.createEvent(this, "internalDateChanged");
|
|
38
|
+
this.datepickerViewChanged = index.createEvent(this, "datepickerViewChanged");
|
|
39
|
+
}
|
|
40
|
+
/** The selected locale. */
|
|
41
|
+
locale;
|
|
42
|
+
/** The selected date. */
|
|
43
|
+
selectedDate;
|
|
44
|
+
/** Separate internal date to handle date browsing. */
|
|
45
|
+
internalDate;
|
|
46
|
+
/** Current datepicker view */
|
|
47
|
+
datepickerView;
|
|
48
|
+
/** Event that will be emitted when the internal date will change. */
|
|
49
|
+
internalDateChanged;
|
|
50
|
+
/** Event that will be emitted when the datepicker view will change. */
|
|
51
|
+
datepickerViewChanged;
|
|
52
|
+
getControlButtonDate = () => {
|
|
53
|
+
const fullYear = this.internalDate.getFullYear();
|
|
54
|
+
const monthNameFormatter = new Intl.DateTimeFormat(this.locale, { month: 'long' });
|
|
55
|
+
const monthName = string.capitalize(monthNameFormatter.format(this.internalDate));
|
|
56
|
+
return `${monthName} ${fullYear}`;
|
|
57
|
+
};
|
|
58
|
+
subtractDates() {
|
|
59
|
+
let newDate;
|
|
60
|
+
if (this.datepickerView === 'multi-year') {
|
|
61
|
+
newDate = subtractYears(this.internalDate, 12);
|
|
62
|
+
}
|
|
63
|
+
if (this.datepickerView === 'year') {
|
|
64
|
+
newDate = subtractYears(this.internalDate, 1);
|
|
65
|
+
}
|
|
66
|
+
if (this.datepickerView === 'month') {
|
|
67
|
+
newDate = new Date(this.internalDate.getFullYear(), this.internalDate.getMonth() - 1, 1);
|
|
68
|
+
}
|
|
69
|
+
this.internalDateChanged.emit(newDate);
|
|
70
|
+
}
|
|
71
|
+
addDates() {
|
|
72
|
+
let newDate;
|
|
73
|
+
if (this.datepickerView === 'multi-year') {
|
|
74
|
+
newDate = addYears(this.internalDate, 12);
|
|
75
|
+
}
|
|
76
|
+
if (this.datepickerView === 'year') {
|
|
77
|
+
newDate = addYears(this.internalDate, 1);
|
|
78
|
+
}
|
|
79
|
+
if (this.datepickerView === 'month') {
|
|
80
|
+
newDate = new Date(this.internalDate.getFullYear(), this.internalDate.getMonth() + 1, 1);
|
|
81
|
+
}
|
|
82
|
+
this.internalDateChanged.emit(newDate);
|
|
83
|
+
}
|
|
84
|
+
changeDatepickerView = () => {
|
|
85
|
+
let view;
|
|
86
|
+
if (this.datepickerView === 'month') {
|
|
87
|
+
view = 'multi-year';
|
|
88
|
+
}
|
|
89
|
+
if (this.datepickerView === 'year' || this.datepickerView === 'multi-year') {
|
|
90
|
+
view = 'month';
|
|
91
|
+
}
|
|
92
|
+
this.datepickerViewChanged.emit(view);
|
|
93
|
+
};
|
|
94
|
+
render() {
|
|
95
|
+
return (index.h("div", { key: 'f9ded7080afd62e27b776ea487a6dff3ff11849c', class: "header" }, this.datepickerView !== 'year'
|
|
96
|
+
? (index.h("div", { class: "icon-container", onClick: () => this.subtractDates() }, index.h("tet-icon", { class: "arrow-left", name: "tc-arrow-left" })))
|
|
97
|
+
: index.h("div", null), index.h("div", { key: '0fc34633a46329e428c9449112a3a332363fba52', class: "control-button", onClick: () => this.changeDatepickerView() }, this.getControlButtonDate(), index.h("tet-icon", { key: '6854d7c2c577568425ecaf0faba756195461f506', class: "chevron-down", name: this.datepickerView === 'month' ? 'tc-chevron-down' : 'tc-chevron-up' })), this.datepickerView !== 'year'
|
|
98
|
+
? (index.h("div", { class: "icon-container", onClick: () => this.addDates() }, index.h("tet-icon", { class: "arrow-left", name: "tc-arrow-right" })))
|
|
99
|
+
: index.h("div", null)));
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
TetDatepickerHeader.style = tetDatepickerHeaderCss();
|
|
103
|
+
|
|
104
|
+
const tetDatepickerMonthViewCss = () => `:host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{display:block;-webkit-tap-highlight-color:transparent}.weekday-header{display:grid;grid-template-columns:repeat(7, 1fr)}.weekday-header .day{display:flex;justify-content:center;align-items:center;height:100%;width:100%;aspect-ratio:1/1}.month-dates{display:grid;grid-template-columns:repeat(7, 1fr);row-gap:0.25rem;font:500 0.875rem/1.25rem "Inter", "Gilroy, Arial, sans-serif"}.month-dates .date-container{border:dashed transparent;border-width:0.09375rem 0}.month-dates .date-container.range-start{border-radius:5rem 0 0 5rem;border-color:rgb(10, 11, 13)}.month-dates .date-container.range-start .date{background:rgb(10, 11, 13);color:var(--text-color-primary-light) !important}.month-dates .date-container.range-start .date:hover{background:rgb(153, 160, 174) !important}.month-dates .date-container.range-start.in-range-selected{border-color:transparent}.month-dates .date-container.range-start.range-end{background:transparent}.month-dates .date-container.range-end{border-radius:0 5rem 5rem 0;border-color:rgb(10, 11, 13)}.month-dates .date-container.range-end .date{background:rgb(10, 11, 13);color:var(--text-color-primary-light) !important}.month-dates .date-container.range-end .date:hover{background:rgb(153, 160, 174) !important}.month-dates .date-container.range-end.in-range-selected{border-color:transparent}.month-dates .date-container.in-range{border-color:rgb(10, 11, 13)}.month-dates .date-container.in-range-selected{background:rgb(215, 219, 224)}.month-dates .date-container.in-range-selected .date{color:rgb(67, 75, 86)}.month-dates .date-container.in-range-hover{border-radius:0 5rem 5rem 0;border-color:rgb(10, 11, 13)}.month-dates .date-container.in-range-hover .date:hover{color:var(--text-color-primary-light);background:rgb(153, 160, 174) !important}.month-dates .preview-date{display:flex;justify-content:center;align-items:center;height:100%;width:100%;aspect-ratio:1/1;color:rgb(153, 160, 174)}.month-dates .date{display:flex;justify-content:center;align-items:center;height:100%;width:100%;aspect-ratio:1/1;border-radius:5rem;cursor:pointer}.month-dates .date.current:not(.month-dates .date.selected,.month-dates .date:active){border:0.09375rem solid rgb(153, 160, 174)}.month-dates .date:active,.month-dates .date.selected{color:var(--text-color-primary-light);background:rgb(10, 11, 13)}.month-dates .date:hover:not(.month-dates .date.selected,.month-dates .date:active){background:var(--interaction-state-gray)}`;
|
|
105
|
+
|
|
106
|
+
const TetDatepickerMonthView = class {
|
|
107
|
+
constructor(hostRef) {
|
|
108
|
+
index.registerInstance(this, hostRef);
|
|
109
|
+
this.internalDateChanged = index.createEvent(this, "internalDateChanged");
|
|
110
|
+
this.dateChanged = index.createEvent(this, "dateChanged");
|
|
111
|
+
this.datepickerClosed = index.createEvent(this, "datepickerClosed");
|
|
112
|
+
this.rangeDateSet = index.createEvent(this, "rangeDateSet");
|
|
113
|
+
}
|
|
114
|
+
days = DATEPICKER_WEEK_DAYS;
|
|
115
|
+
currentDate;
|
|
116
|
+
previousMonthPreviewDates = [];
|
|
117
|
+
monthDates = [];
|
|
118
|
+
nextMonthPreviewDates = [];
|
|
119
|
+
/** The range dates that are being used for range picking mode. */
|
|
120
|
+
rangeDates;
|
|
121
|
+
/** Date used in range picker mode after setting range start to identify which date is currently hovered over. */
|
|
122
|
+
inRangeHoverDate;
|
|
123
|
+
/** The currently selected date. */
|
|
124
|
+
selectedDate;
|
|
125
|
+
/** Separate internal date to handle date browsing. */
|
|
126
|
+
internalDate;
|
|
127
|
+
/** Determines whether the current datepicker logic is set up for range picking. */
|
|
128
|
+
rangePickerMode = false;
|
|
129
|
+
/** Event that will be emitted when the internal date will change. */
|
|
130
|
+
internalDateChanged;
|
|
131
|
+
/** Event that will be emitted when date will change. */
|
|
132
|
+
dateChanged;
|
|
133
|
+
/** Event that will be emitted when the datepicker will be closed. */
|
|
134
|
+
datepickerClosed;
|
|
135
|
+
/** Event that will be emitted when one of the range dates will be set. */
|
|
136
|
+
rangeDateSet;
|
|
137
|
+
handleDateChange() {
|
|
138
|
+
this.previousMonthPreviewDates = this.getPreviousMonthPreviewDates();
|
|
139
|
+
this.monthDates = this.getDaysInMonth(this.internalDate.getMonth(), this.internalDate.getFullYear());
|
|
140
|
+
this.nextMonthPreviewDates = this.getNextMonthPreviewDates();
|
|
141
|
+
}
|
|
142
|
+
componentWillLoad() {
|
|
143
|
+
this.currentDate = new Date();
|
|
144
|
+
this.previousMonthPreviewDates = this.getPreviousMonthPreviewDates();
|
|
145
|
+
this.monthDates = this.getDaysInMonth(this.internalDate.getMonth(), this.internalDate.getFullYear());
|
|
146
|
+
this.nextMonthPreviewDates = this.getNextMonthPreviewDates();
|
|
147
|
+
}
|
|
148
|
+
getDaysInMonth = (month, year) => {
|
|
149
|
+
const date = new Date(year, month, 1);
|
|
150
|
+
const days = [];
|
|
151
|
+
while (date.getMonth() === month) {
|
|
152
|
+
days.push(new Date(date));
|
|
153
|
+
date.setDate(date.getDate() + 1);
|
|
154
|
+
}
|
|
155
|
+
return days;
|
|
156
|
+
};
|
|
157
|
+
getPreviousMonthPreviewDates = () => {
|
|
158
|
+
const firstMonthDay = new Date(this.internalDate.getFullYear(), this.internalDate.getMonth(), 1);
|
|
159
|
+
let previousMonthPreviewDays = firstMonthDay.getDay() - 1;
|
|
160
|
+
// An exception - sundays have zero index.
|
|
161
|
+
// Meaning that they actually would have negative preview days from the previous month, if using the existing logic.
|
|
162
|
+
if (previousMonthPreviewDays === -1) {
|
|
163
|
+
previousMonthPreviewDays = 6;
|
|
164
|
+
}
|
|
165
|
+
return this.getPreviousMonthLastDates(previousMonthPreviewDays);
|
|
166
|
+
};
|
|
167
|
+
getNextMonthPreviewDates = () => {
|
|
168
|
+
const currentDateCount = this.monthDates.length + this.previousMonthPreviewDates.length;
|
|
169
|
+
const nextMonthPreviewDays = 7 - currentDateCount % 7;
|
|
170
|
+
// If all rows are full, do not render additional preview date fields.
|
|
171
|
+
if (nextMonthPreviewDays === 7) {
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
return Array.from({ length: nextMonthPreviewDays }).map((_, day) => day + 1);
|
|
175
|
+
};
|
|
176
|
+
getPreviousMonthLastDates = (lastDays) => {
|
|
177
|
+
const previousMonthPreviewDays = [];
|
|
178
|
+
if (!lastDays) {
|
|
179
|
+
return previousMonthPreviewDays;
|
|
180
|
+
}
|
|
181
|
+
const previousMonthLastDate = new Date(this.internalDate.getFullYear(), this.internalDate.getMonth(), 0);
|
|
182
|
+
const previousMonthLastPreviewDay = (previousMonthLastDate.getDate() - lastDays) + 1;
|
|
183
|
+
Array.from({ length: lastDays }).forEach((_, days) => {
|
|
184
|
+
const previousMonth = this.internalDate.getMonth() - 1;
|
|
185
|
+
const date = new Date(this.internalDate.getFullYear(), previousMonth, previousMonthLastPreviewDay + days);
|
|
186
|
+
previousMonthPreviewDays.push(date);
|
|
187
|
+
});
|
|
188
|
+
return previousMonthPreviewDays;
|
|
189
|
+
};
|
|
190
|
+
isCurrentDate(date) {
|
|
191
|
+
return date.toDateString() === this.currentDate.toDateString();
|
|
192
|
+
}
|
|
193
|
+
isSelectedDate = (date) => {
|
|
194
|
+
if (this.rangePickerMode || typecheck.isUndefinedOrNull(this.selectedDate)) {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
return date.toDateString() === this.selectedDate.toDateString();
|
|
198
|
+
};
|
|
199
|
+
handleDateSelection = (date) => {
|
|
200
|
+
const newDate = new Date(date);
|
|
201
|
+
this.internalDateChanged.emit(newDate);
|
|
202
|
+
if (!this.rangePickerMode) {
|
|
203
|
+
this.datepickerClosed.emit(true);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const isSelectedDateRangeEnd = this.isRangeEnd(date);
|
|
207
|
+
const isSelectedBeforeRangeStartDate = date.getTime() < this.rangeDates?.startDate?.getTime();
|
|
208
|
+
if (this.rangeDates.startDate && this.rangeDates.endDate || isSelectedBeforeRangeStartDate) {
|
|
209
|
+
this.rangeDateSet.emit({ date: newDate, position: 0 });
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (this.rangeDates.startDate && !isSelectedDateRangeEnd) {
|
|
213
|
+
this.rangeDateSet.emit({ date: newDate, position: 1 });
|
|
214
|
+
this.datepickerClosed.emit(true);
|
|
215
|
+
}
|
|
216
|
+
if (typecheck.isUndefinedOrNull(this.rangeDates.startDate) && typecheck.isUndefinedOrNull(this.rangeDates.endDate)) {
|
|
217
|
+
this.rangeDateSet.emit({ date: newDate, position: 0 });
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
isRangeStart = (date) => {
|
|
221
|
+
return date.toDateString() === this.rangeDates?.startDate?.toDateString();
|
|
222
|
+
};
|
|
223
|
+
isRangeEnd = (date) => {
|
|
224
|
+
return date.toDateString() === this.rangeDates?.endDate?.toDateString();
|
|
225
|
+
};
|
|
226
|
+
isSelectedInRange = (date) => {
|
|
227
|
+
const isDateInStartRange = date.getTime() >= this.rangeDates?.startDate?.getTime();
|
|
228
|
+
const isDateInEndRange = date.getTime() <= this.rangeDates?.endDate?.getTime();
|
|
229
|
+
return isDateInStartRange && isDateInEndRange;
|
|
230
|
+
};
|
|
231
|
+
isInRange = (date) => {
|
|
232
|
+
const isRangeStartAndEndSet = this.rangeDates.startDate && this.rangeDates.endDate;
|
|
233
|
+
if (!this.rangePickerMode || typecheck.isUndefinedOrNull(this.rangeDates.startDate) || isRangeStartAndEndSet) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
const isDatePastRangeStart = date.getTime() > this.rangeDates?.startDate?.getTime();
|
|
237
|
+
const isDateInHoverRange = date.getTime() <= this.inRangeHoverDate?.getTime();
|
|
238
|
+
return isDatePastRangeStart && isDateInHoverRange;
|
|
239
|
+
};
|
|
240
|
+
setInRangeHover = (date, event) => {
|
|
241
|
+
const isRangeStartAndEndSet = this.rangeDates.startDate && this.rangeDates.endDate;
|
|
242
|
+
if (!this.rangePickerMode || typecheck.isUndefinedOrNull(this.rangeDates.startDate) || isRangeStartAndEndSet) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
const element = event.target;
|
|
246
|
+
const isDatePastRangeStart = date.getTime() > this.rangeDates?.startDate?.getTime();
|
|
247
|
+
if (isDatePastRangeStart) {
|
|
248
|
+
element.classList.add('in-range-hover');
|
|
249
|
+
this.inRangeHoverDate = date;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
removeInRangeHover = (event) => {
|
|
253
|
+
const element = event.target;
|
|
254
|
+
element.classList.contains('in-range-hover') && element.classList.remove('in-range-hover');
|
|
255
|
+
this.inRangeHoverDate = null;
|
|
256
|
+
};
|
|
257
|
+
getDateContainerClasses = (date) => {
|
|
258
|
+
return {
|
|
259
|
+
'date-container': true,
|
|
260
|
+
'range-start': this.isRangeStart(date),
|
|
261
|
+
'in-range': this.isInRange(date),
|
|
262
|
+
'in-range-selected': this.isSelectedInRange(date),
|
|
263
|
+
'range-end': this.isRangeEnd(date)
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
getDateClasses = (date) => {
|
|
267
|
+
return {
|
|
268
|
+
date: true,
|
|
269
|
+
current: this.isCurrentDate(date),
|
|
270
|
+
selected: this.isSelectedDate(date)
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
render() {
|
|
274
|
+
return (index.h(index.Host, { key: 'e3e7369a51d97d88d28a66545848f915902c239b' }, index.h("div", { key: '79fd22e0542d4bb1d3dca9a027a38732568adf1e', class: "weekday-header" }, this.days.map((day) => index.h("div", { class: "day" }, day))), index.h("div", { key: '417e6eee4ff8505998ecd432a9607010057d748e', class: "month-dates" }, this.previousMonthPreviewDates.map((date) => index.h("div", { class: "date-container" }, index.h("div", { class: "preview-date" }, date.getDate()))), this.monthDates.map(date => index.h("div", { class: this.getDateContainerClasses(date), onPointerEnter: (event) => this.setInRangeHover(date, event), onPointerLeave: (event) => this.removeInRangeHover(event) }, index.h("div", { class: this.getDateClasses(date), onClick: () => this.handleDateSelection(date) }, date.getDate()))), this.nextMonthPreviewDates.map((date) => index.h("div", { class: "date-container" }, index.h("div", { class: "preview-date" }, date))))));
|
|
275
|
+
}
|
|
276
|
+
static get watchers() { return {
|
|
277
|
+
"internalDate": [{
|
|
278
|
+
"handleDateChange": 0
|
|
279
|
+
}]
|
|
280
|
+
}; }
|
|
281
|
+
};
|
|
282
|
+
TetDatepickerMonthView.style = tetDatepickerMonthViewCss();
|
|
283
|
+
|
|
284
|
+
const tetDatepickerMultiYearViewCss = () => `:host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{display:block;-webkit-tap-highlight-color:transparent}.container{display:grid;grid-template-columns:repeat(3, 1fr);row-gap:2rem;column-gap:0.25rem;margin:1.25rem 0 0.75rem;font:500 0.875rem/1.25rem "Inter", "Gilroy, Arial, sans-serif"}.container .year{display:flex;width:100%;height:2.875rem;align-items:center;justify-content:center;border-radius:1.5rem;cursor:pointer}.container .year.current:not(.container .year.selected,.container .year:active){border:0.09375rem solid rgb(153, 160, 174)}.container .year:active,.container .year.selected{color:var(--text-color-primary-light);background:rgb(10, 11, 13)}.container .year:hover:not(.container .year.selected,.container .year:active){background:var(--interaction-state-gray)}`;
|
|
285
|
+
|
|
286
|
+
const TetDatepickerMultiYearView = class {
|
|
287
|
+
constructor(hostRef) {
|
|
288
|
+
index.registerInstance(this, hostRef);
|
|
289
|
+
this.internalDateChanged = index.createEvent(this, "internalDateChanged");
|
|
290
|
+
this.datepickerViewChanged = index.createEvent(this, "datepickerViewChanged");
|
|
291
|
+
}
|
|
292
|
+
years = [];
|
|
293
|
+
/** Selected Date. */
|
|
294
|
+
selectedDate;
|
|
295
|
+
/** Internal Date. */
|
|
296
|
+
internalDate;
|
|
297
|
+
/** Internal date changed event. */
|
|
298
|
+
internalDateChanged;
|
|
299
|
+
/** Datepicker view changed event. */
|
|
300
|
+
datepickerViewChanged;
|
|
301
|
+
handleInternalDateChange(date) {
|
|
302
|
+
this.years = this.getYears(date);
|
|
303
|
+
}
|
|
304
|
+
componentWillLoad() {
|
|
305
|
+
this.years = this.getYears(this.internalDate);
|
|
306
|
+
}
|
|
307
|
+
getYears = (date) => {
|
|
308
|
+
const startYear = date.getFullYear();
|
|
309
|
+
return Array.from({ length: 12 }, (_, index) => startYear + index);
|
|
310
|
+
};
|
|
311
|
+
handleYearSelection = (year) => {
|
|
312
|
+
const newDate = new Date(this.internalDate.setFullYear(year));
|
|
313
|
+
this.internalDateChanged.emit(newDate);
|
|
314
|
+
this.datepickerViewChanged.emit('year');
|
|
315
|
+
};
|
|
316
|
+
isSelectedYear = (year) => {
|
|
317
|
+
return this.selectedDate?.getFullYear() === year;
|
|
318
|
+
};
|
|
319
|
+
getYearClasses = (year) => {
|
|
320
|
+
const currentYear = new Date().getFullYear();
|
|
321
|
+
return { year: true, current: year === currentYear, selected: this.isSelectedYear(year) };
|
|
322
|
+
};
|
|
323
|
+
render() {
|
|
324
|
+
return (index.h("div", { key: '03c2b00f5549cbd3e500c0063152d3861f74ff2c', class: "container" }, this.years.map((year) => index.h("div", { class: this.getYearClasses(year), onClick: () => this.handleYearSelection(year) }, year))));
|
|
325
|
+
}
|
|
326
|
+
static get watchers() { return {
|
|
327
|
+
"internalDate": [{
|
|
328
|
+
"handleInternalDateChange": 0
|
|
329
|
+
}]
|
|
330
|
+
}; }
|
|
331
|
+
};
|
|
332
|
+
TetDatepickerMultiYearView.style = tetDatepickerMultiYearViewCss();
|
|
333
|
+
|
|
334
|
+
const tetDatepickerYearViewCss = () => `:host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{display:block;-webkit-tap-highlight-color:transparent}.container{display:grid;grid-template-columns:repeat(3, 1fr);row-gap:2rem;column-gap:0.25rem;margin:1.25rem 0.5rem 0.75rem 0;font:500 0.875rem/1.25rem "Inter", "Gilroy, Arial, sans-serif"}.container .month{display:flex;width:100%;height:2.875rem;align-items:center;justify-content:center;border-radius:1.5rem;cursor:pointer}.container .month.current:not(.container .month.selected,.container .month:active){border:0.09375rem solid rgb(153, 160, 174)}.container .month:active,.container .month.selected{color:var(--text-color-primary-light);background:rgb(10, 11, 13)}.container .month:hover:not(.container .month.selected,.container .month:active){background:var(--interaction-state-gray)}`;
|
|
335
|
+
|
|
336
|
+
const TetDatepickerYearView = class {
|
|
337
|
+
constructor(hostRef) {
|
|
338
|
+
index.registerInstance(this, hostRef);
|
|
339
|
+
this.internalDateChanged = index.createEvent(this, "internalDateChanged");
|
|
340
|
+
this.datepickerViewChanged = index.createEvent(this, "datepickerViewChanged");
|
|
341
|
+
}
|
|
342
|
+
months = DATEPICKER_MONTHS;
|
|
343
|
+
todayDate;
|
|
344
|
+
/** The selected date. */
|
|
345
|
+
selectedDate;
|
|
346
|
+
/** Separate internal date to handle date browsing. */
|
|
347
|
+
internalDate;
|
|
348
|
+
/** Event that will be emitted when the internal date will change. */
|
|
349
|
+
internalDateChanged;
|
|
350
|
+
/** Event that will be emitted when the datepicker view will change. */
|
|
351
|
+
datepickerViewChanged;
|
|
352
|
+
componentWillLoad() {
|
|
353
|
+
this.todayDate = new Date();
|
|
354
|
+
}
|
|
355
|
+
isCurrentMonth(monthIndex) {
|
|
356
|
+
return this.todayDate.getMonth() === monthIndex;
|
|
357
|
+
}
|
|
358
|
+
handleMonthSelection = (monthIndex) => {
|
|
359
|
+
const newDate = new Date(this.internalDate.setMonth(monthIndex));
|
|
360
|
+
this.internalDateChanged.emit(newDate);
|
|
361
|
+
this.datepickerViewChanged.emit('month');
|
|
362
|
+
};
|
|
363
|
+
isMonthSelected = (monthIndex) => {
|
|
364
|
+
if (typecheck.isUndefinedOrNull(this.selectedDate)) {
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
367
|
+
const isSameYear = this.selectedDate.getFullYear() === this.internalDate.getFullYear();
|
|
368
|
+
const isSameMonth = this.selectedDate.getMonth() === monthIndex;
|
|
369
|
+
return isSameYear && isSameMonth;
|
|
370
|
+
};
|
|
371
|
+
getMonthClasses = (monthIndex) => {
|
|
372
|
+
return {
|
|
373
|
+
month: true,
|
|
374
|
+
current: this.isCurrentMonth(monthIndex),
|
|
375
|
+
selected: this.isMonthSelected(monthIndex)
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
render() {
|
|
379
|
+
return (index.h("div", { key: '8968d573ef922b5ae1e1fc5e3f3bede1cca24fc3', class: "container" }, this.months.map((month, index$1) => index.h("div", { class: "month-container" }, index.h("div", { class: this.getMonthClasses(index$1), onClick: () => this.handleMonthSelection(index$1) }, month)))));
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
TetDatepickerYearView.style = tetDatepickerYearViewCss();
|
|
383
|
+
|
|
384
|
+
exports.tet_datepicker_header = TetDatepickerHeader;
|
|
385
|
+
exports.tet_datepicker_month_view = TetDatepickerMonthView;
|
|
386
|
+
exports.tet_datepicker_multi_year_view = TetDatepickerMultiYearView;
|
|
387
|
+
exports.tet_datepicker_year_view = TetDatepickerYearView;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BL_zVDFC.js');
|
|
4
|
+
var typecheck = require('./typecheck--Bs-bZ_K.js');
|
|
5
|
+
|
|
6
|
+
const tetDatepickerCss = () => `:host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{display:block;--light-theme-elevation-3:0 0.0625rem 0.125rem rgba(10, 11, 13, 0.05), 0 0.3125rem 0.6875rem rgba(10, 11, 13, 0.12);--text-color-primary-light:#f6f7f8;--interaction-state-gray:rgba(89, 99, 115, 0.08)}.overlay{position:fixed;z-index:100;inset:0}.overlay-effect{background:rgba(10, 11, 13, 0.4)}.overlay.closed{display:none}.overlay .container{max-width:22rem;min-height:20rem;height:auto;width:100%;background:rgb(255, 255, 255);border:0.0625rem solid rgb(192, 197, 206);box-shadow:var(--light-theme-elevation-3);border-radius:0.875rem;padding:0.5rem;position:absolute}`;
|
|
7
|
+
|
|
8
|
+
const TetDatepicker = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
this.dateChanged = index.createEvent(this, "dateChanged");
|
|
12
|
+
this.rangeDatesChanged = index.createEvent(this, "rangeDatesChanged");
|
|
13
|
+
}
|
|
14
|
+
datepickerContainer;
|
|
15
|
+
get el() { return index.getElement(this); }
|
|
16
|
+
/** The locale that is being used in to format the control button text. */
|
|
17
|
+
locale = 'lv-LV';
|
|
18
|
+
/** Determines whether to display modal like overlay for the datepicker. */
|
|
19
|
+
overlayEffect = false;
|
|
20
|
+
/** Determines whether the current datepicker logic is set up for range picking. */
|
|
21
|
+
rangePickerMode = false;
|
|
22
|
+
/** Determines if the datepicker is open. */
|
|
23
|
+
isOpen = false;
|
|
24
|
+
/** The currently selected date. Initially, can be passed as a default date. */
|
|
25
|
+
date;
|
|
26
|
+
/** Current datepicker view. */
|
|
27
|
+
datepickerView = 'month';
|
|
28
|
+
/** Range dates that are being used when `rangePickerMode` is turned on. */
|
|
29
|
+
rangeDates = {};
|
|
30
|
+
/** Separate internal date to handle date browsing. (to not emit event on date browsing but only on date selection) */
|
|
31
|
+
internalDate;
|
|
32
|
+
/** Event that will be emitted when date will change. */
|
|
33
|
+
dateChanged;
|
|
34
|
+
/** Event that will be emitted when at least one of the range dates will change. */
|
|
35
|
+
rangeDatesChanged;
|
|
36
|
+
handleDateChanged(event) {
|
|
37
|
+
this.date = event.detail;
|
|
38
|
+
}
|
|
39
|
+
/** Toggles the datepicker `isOpen` attribute. */
|
|
40
|
+
async toggleIsOpen() {
|
|
41
|
+
this.isOpen = !this.isOpen;
|
|
42
|
+
}
|
|
43
|
+
handleDatepickerViewChanged(event) {
|
|
44
|
+
this.datepickerView = event.detail;
|
|
45
|
+
}
|
|
46
|
+
handleInternalDateChanged({ detail }) {
|
|
47
|
+
this.internalDate = new Date(detail);
|
|
48
|
+
}
|
|
49
|
+
handleRangeDateSet({ detail: { date, position } }) {
|
|
50
|
+
if (position === 0) {
|
|
51
|
+
this.rangeDates.startDate = new Date(date);
|
|
52
|
+
this.rangeDates.endDate = null;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.rangeDates.endDate = new Date(date);
|
|
56
|
+
}
|
|
57
|
+
this.rangeDates = { ...this.rangeDates };
|
|
58
|
+
}
|
|
59
|
+
handleDatepickerClosed() {
|
|
60
|
+
if (!this.rangePickerMode) {
|
|
61
|
+
this.date = new Date(this.internalDate);
|
|
62
|
+
}
|
|
63
|
+
this.isOpen = false;
|
|
64
|
+
}
|
|
65
|
+
onWindowResize() {
|
|
66
|
+
this.positionDatepicker();
|
|
67
|
+
}
|
|
68
|
+
onWindowScroll() {
|
|
69
|
+
this.positionDatepicker();
|
|
70
|
+
}
|
|
71
|
+
componentWillLoad() {
|
|
72
|
+
if (typecheck.isUndefinedOrNull(this.date)) {
|
|
73
|
+
this.internalDate = new Date();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.date = new Date(this.date);
|
|
77
|
+
this.internalDate = new Date(this.date);
|
|
78
|
+
}
|
|
79
|
+
componentDidLoad() {
|
|
80
|
+
this.positionDatepicker();
|
|
81
|
+
}
|
|
82
|
+
handleDateChange(newDate) {
|
|
83
|
+
this.dateChanged.emit(newDate);
|
|
84
|
+
}
|
|
85
|
+
handleRangeDateChange(newDates) {
|
|
86
|
+
this.rangeDatesChanged.emit(newDates);
|
|
87
|
+
}
|
|
88
|
+
isMobileScreenSize = () => {
|
|
89
|
+
return window.innerWidth <= 499;
|
|
90
|
+
};
|
|
91
|
+
positionDatepicker = () => {
|
|
92
|
+
const boundElementPosition = this.el.previousElementSibling.getBoundingClientRect();
|
|
93
|
+
const mobileDatepickerWidth = `${boundElementPosition.width}px`;
|
|
94
|
+
const desktopDatepickerWidth = '22rem';
|
|
95
|
+
const topOffsetInPx = 8;
|
|
96
|
+
if (this.isMobileScreenSize()) {
|
|
97
|
+
this.datepickerContainer.style.maxWidth = mobileDatepickerWidth;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
this.datepickerContainer.style.maxWidth = desktopDatepickerWidth;
|
|
101
|
+
}
|
|
102
|
+
this.datepickerContainer.style.left = `${boundElementPosition.left}px`;
|
|
103
|
+
this.datepickerContainer.style.top = `${boundElementPosition.bottom + topOffsetInPx}px`;
|
|
104
|
+
};
|
|
105
|
+
handleDatepickerClose = (event) => {
|
|
106
|
+
event.preventDefault();
|
|
107
|
+
event.stopPropagation();
|
|
108
|
+
if (event.target === event.currentTarget) {
|
|
109
|
+
this.isOpen = false;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
getOverlayClasses = () => {
|
|
113
|
+
return { overlay: true, closed: !this.isOpen, 'overlay-effect': this.overlayEffect };
|
|
114
|
+
};
|
|
115
|
+
render() {
|
|
116
|
+
return (index.h("div", { key: 'acce2fbc7d54bbcdb4410581d9f6bc6667aa0d2c', class: this.getOverlayClasses(), onClick: this.handleDatepickerClose }, index.h("div", { key: '0c8d388af9d7cbe8b3d3ec303217b10e52a91ffd', class: "container", ref: (el) => this.datepickerContainer = el }, index.h("tet-datepicker-header", { key: '4cefe3b29bead3c72a9c7342aa1a278767cf87b9', selectedDate: this.date, internalDate: this.internalDate, locale: this.locale, datepickerView: this.datepickerView }), this.datepickerView === 'month' &&
|
|
117
|
+
index.h("tet-datepicker-month-view", { key: 'a2a8a1e040d283ec54b7fb479ba907ff028f16bc', selectedDate: this.date, internalDate: this.internalDate, rangePickerMode: this.rangePickerMode, rangeDates: this.rangeDates }), this.datepickerView === 'multi-year' &&
|
|
118
|
+
index.h("tet-datepicker-multi-year-view", { key: '6af036908892b25750daa38f166026c30ca09b6d', selectedDate: this.date, internalDate: this.internalDate }), this.datepickerView === 'year' &&
|
|
119
|
+
index.h("tet-datepicker-year-view", { key: 'ab893a06d2e225a287be0d96ca068443c897396e', selectedDate: this.date, internalDate: this.internalDate }))));
|
|
120
|
+
}
|
|
121
|
+
static get watchers() { return {
|
|
122
|
+
"date": [{
|
|
123
|
+
"handleDateChange": 0
|
|
124
|
+
}],
|
|
125
|
+
"rangeDates": [{
|
|
126
|
+
"handleRangeDateChange": 0
|
|
127
|
+
}]
|
|
128
|
+
}; }
|
|
129
|
+
};
|
|
130
|
+
TetDatepicker.style = tetDatepickerCss();
|
|
131
|
+
|
|
132
|
+
exports.tet_datepicker = TetDatepicker;
|