genesys-spark-components 3.28.1 → 3.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
- package/dist/cjs/gux-accordion-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-button-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-list-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-action-toast.cjs.entry.js +1 -1
- package/dist/cjs/gux-advanced-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-badge-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-blank-state-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-multi-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
- package/dist/cjs/gux-button-slot-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
- package/dist/cjs/gux-card-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-column-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-line-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-command-palette-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
- package/dist/cjs/gux-copy-to-clipboard-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/gux-disclosure-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-dismiss-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-dropdown-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-dropdown-multi-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/gux-error-message-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-flyout-menu-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-color.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-number.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-range.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-search.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-select.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-text-like.cjs.entry.js +1 -1
- package/dist/cjs/gux-form-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/gux-icon.cjs.entry.js +1 -1
- package/dist/cjs/gux-list-item-legacy_2.cjs.entry.js +1 -1
- package/dist/cjs/gux-list.cjs.entry.js +8 -51
- package/dist/cjs/gux-list.service-59f2b3e7.js +51 -0
- package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
- package/dist/cjs/gux-loading-message-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-modal.cjs.entry.js +1 -1
- package/dist/cjs/gux-month-calendar.cjs.entry.js +137 -0
- package/dist/cjs/gux-month-list_2.cjs.entry.js +89 -0
- package/dist/cjs/gux-month-picker-beta.cjs.entry.js +222 -0
- package/dist/cjs/gux-notification-toast.cjs.entry.js +1 -1
- package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination-cursor.cjs.entry.js +1 -1
- package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
- package/dist/cjs/gux-panel-frame-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
- package/dist/cjs/gux-popover.cjs.entry.js +1 -1
- package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
- package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
- package/dist/cjs/gux-rating.cjs.entry.js +1 -1
- package/dist/cjs/gux-side-panel-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-simple-toast.cjs.entry.js +1 -1
- package/dist/cjs/gux-skip-navigation-list-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
- package/dist/cjs/gux-switch.cjs.entry.js +1 -1
- package/dist/cjs/gux-table-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
- package/dist/cjs/gux-tag-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-text-highlight.cjs.entry.js +1 -1
- package/dist/cjs/gux-text-label-legacy.cjs.entry.js +1 -1
- package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-time-picker-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-toggle.cjs.entry.js +1 -1
- package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/gux-visualization-beta.cjs.entry.js +1 -1
- package/dist/cjs/index-262c2e3a.js +16 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{usage-tracking-fdbd0b75.js → usage-tracking-a1b34de9.js} +1 -1
- package/dist/cjs/year-month-values-080373aa.js +24 -0
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-calendar.css +78 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-calendar.js +237 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-list/gux-month-list-item/gux-month-list-item.css +52 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-list/gux-month-list-item/gux-month-list-item.js +110 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-list/gux-month-list.css +8 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-calendar/gux-month-list/gux-month-list.js +80 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-picker.css +58 -0
- package/dist/collection/components/beta/gux-month-picker/gux-month-picker.js +313 -0
- package/dist/collection/components/stable/gux-list/gux-list.js +6 -5
- package/dist/collection/components/stable/gux-list/gux-list.service.js +19 -20
- package/dist/collection/utils/date/year-month-values.js +13 -0
- package/dist/collection/utils/dom/after-render.js +3 -0
- package/dist/deploy-info.json +3 -3
- package/dist/esm/genesys-webcomponents.js +1 -1
- package/dist/esm/gux-accordion-legacy.entry.js +1 -1
- package/dist/esm/gux-accordion.entry.js +1 -1
- package/dist/esm/gux-action-button-legacy.entry.js +1 -1
- package/dist/esm/gux-action-button.entry.js +1 -1
- package/dist/esm/gux-action-list-legacy.entry.js +1 -1
- package/dist/esm/gux-action-toast.entry.js +1 -1
- package/dist/esm/gux-advanced-dropdown.entry.js +1 -1
- package/dist/esm/gux-announce-beta.entry.js +1 -1
- package/dist/esm/gux-badge-beta.entry.js +1 -1
- package/dist/esm/gux-blank-state-beta.entry.js +1 -1
- package/dist/esm/gux-breadcrumbs.entry.js +1 -1
- package/dist/esm/gux-button-multi-legacy.entry.js +1 -1
- package/dist/esm/gux-button-multi.entry.js +1 -1
- package/dist/esm/gux-button-slot-beta.entry.js +1 -1
- package/dist/esm/gux-button.entry.js +1 -1
- package/dist/esm/gux-calendar.entry.js +1 -1
- package/dist/esm/gux-card-beta.entry.js +1 -1
- package/dist/esm/gux-chart-column-beta.entry.js +1 -1
- package/dist/esm/gux-chart-donut-beta.entry.js +1 -1
- package/dist/esm/gux-chart-line-beta.entry.js +1 -1
- package/dist/esm/gux-chart-pie-beta.entry.js +1 -1
- package/dist/esm/gux-chart-scatter-plot-beta.entry.js +1 -1
- package/dist/esm/gux-command-palette-legacy.entry.js +1 -1
- package/dist/esm/gux-content-search.entry.js +1 -1
- package/dist/esm/gux-copy-to-clipboard-beta.entry.js +1 -1
- package/dist/esm/gux-date-beta.entry.js +1 -1
- package/dist/esm/gux-date-time-beta.entry.js +1 -1
- package/dist/esm/gux-datepicker.entry.js +1 -1
- package/dist/esm/gux-disclosure-button.entry.js +1 -1
- package/dist/esm/gux-dismiss-button.entry.js +1 -1
- package/dist/esm/gux-dropdown-legacy.entry.js +1 -1
- package/dist/esm/gux-dropdown-multi-beta.entry.js +1 -1
- package/dist/esm/gux-dropdown_3.entry.js +1 -1
- package/dist/esm/gux-error-message-beta.entry.js +1 -1
- package/dist/esm/gux-flyout-menu-beta.entry.js +1 -1
- package/dist/esm/gux-form-field-checkbox.entry.js +1 -1
- package/dist/esm/gux-form-field-color.entry.js +1 -1
- package/dist/esm/gux-form-field-dropdown.entry.js +1 -1
- package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
- package/dist/esm/gux-form-field-legacy.entry.js +1 -1
- package/dist/esm/gux-form-field-number.entry.js +1 -1
- package/dist/esm/gux-form-field-radio.entry.js +1 -1
- package/dist/esm/gux-form-field-range.entry.js +1 -1
- package/dist/esm/gux-form-field-search.entry.js +1 -1
- package/dist/esm/gux-form-field-select.entry.js +1 -1
- package/dist/esm/gux-form-field-text-like.entry.js +1 -1
- package/dist/esm/gux-form-field-textarea.entry.js +1 -1
- package/dist/esm/gux-icon.entry.js +1 -1
- package/dist/esm/gux-list-item-legacy_2.entry.js +1 -1
- package/dist/esm/gux-list.entry.js +8 -51
- package/dist/esm/gux-list.service-66b8540f.js +45 -0
- package/dist/esm/gux-listbox-multi.entry.js +1 -1
- package/dist/esm/gux-loading-message-beta.entry.js +1 -1
- package/dist/esm/gux-modal.entry.js +1 -1
- package/dist/esm/gux-month-calendar.entry.js +133 -0
- package/dist/esm/gux-month-list_2.entry.js +84 -0
- package/dist/esm/gux-month-picker-beta.entry.js +218 -0
- package/dist/esm/gux-notification-toast.entry.js +1 -1
- package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
- package/dist/esm/gux-pagination-beta.entry.js +1 -1
- package/dist/esm/gux-pagination-cursor.entry.js +1 -1
- package/dist/esm/gux-pagination.entry.js +1 -1
- package/dist/esm/gux-panel-frame-legacy.entry.js +1 -1
- package/dist/esm/gux-popover-list.entry.js +1 -1
- package/dist/esm/gux-popover.entry.js +1 -1
- package/dist/esm/gux-radial-loading.entry.js +1 -1
- package/dist/esm/gux-radial-progress.entry.js +1 -1
- package/dist/esm/gux-rating.entry.js +1 -1
- package/dist/esm/gux-side-panel-legacy.entry.js +1 -1
- package/dist/esm/gux-simple-toast.entry.js +1 -1
- package/dist/esm/gux-skip-navigation-list-beta.entry.js +1 -1
- package/dist/esm/gux-sort-control.entry.js +1 -1
- package/dist/esm/gux-switch.entry.js +1 -1
- package/dist/esm/gux-table-beta.entry.js +1 -1
- package/dist/esm/gux-tabs-advanced.entry.js +1 -1
- package/dist/esm/gux-tabs-legacy.entry.js +1 -1
- package/dist/esm/gux-tabs.entry.js +1 -1
- package/dist/esm/gux-tag-beta.entry.js +1 -1
- package/dist/esm/gux-text-highlight.entry.js +1 -1
- package/dist/esm/gux-text-label-legacy.entry.js +1 -1
- package/dist/esm/gux-time-beta.entry.js +1 -1
- package/dist/esm/gux-time-picker-beta.entry.js +1 -1
- package/dist/esm/gux-toggle.entry.js +1 -1
- package/dist/esm/gux-tooltip.entry.js +1 -1
- package/dist/esm/gux-visualization-beta.entry.js +1 -1
- package/dist/esm/index-74e605ae.js +16 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{usage-tracking-46be00a6.js → usage-tracking-3a58b2cb.js} +1 -1
- package/dist/esm/year-month-values-8f78277c.js +19 -0
- package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.ar.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.cs.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.da.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.de.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.es-es.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.es.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.fi.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.fr-ca.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.fr.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.he.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.it.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.ja.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.ko.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.nl.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.no.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.pl.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.pt-br.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.pt-pt.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.ru.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.sv.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.th.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.tr.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.zh-cn.json +1 -1
- package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.zh-tw.json +1 -1
- package/dist/genesys-webcomponents/p-0309337a.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-8af73166.entry.js → p-05d8867d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f26dbeea.entry.js → p-097ebac8.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-6fb51534.entry.js → p-0ac85f85.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8fa57a6e.entry.js → p-0f3b197c.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-14ec6c9c.entry.js → p-1193eea0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-234c5db2.entry.js → p-14252d82.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-79cd1f7c.entry.js → p-147f5ce5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0865de46.entry.js → p-155a7a20.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-2141eaf6.entry.js → p-1665f72d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-931f15f9.entry.js → p-1717f300.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-2c976c87.entry.js → p-186ab617.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-82084612.entry.js → p-1bab4f2d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8a0126f5.entry.js → p-22c9f5fc.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-25ea189a.entry.js +1 -0
- package/dist/genesys-webcomponents/p-26fd3d6f.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-b0e62919.entry.js → p-3110951a.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f181e612.entry.js → p-321ef965.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-3834e291.js +1 -0
- package/dist/genesys-webcomponents/{p-5401dfc0.entry.js → p-41627e97.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-26fc0da4.entry.js → p-43d4998c.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-bc35f447.entry.js → p-45b2e9ab.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-48ba3e1f.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-a729709c.entry.js → p-4a276707.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-aa83200a.entry.js → p-4aed9d1d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d9273500.entry.js → p-4d0dfe2f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-859f8520.entry.js → p-4d0fab65.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-5f5b2b3c.entry.js → p-4f514bc3.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-6b79316e.entry.js → p-50c1f2be.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a0107b6c.entry.js → p-52c0ef2c.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-937a6d91.entry.js → p-5563cdd3.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-b04864d8.entry.js → p-5669156b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-3293bcd4.entry.js → p-598a1c4b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-304e0862.entry.js → p-5aab9b69.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0af6d48d.entry.js → p-5bd6e8e7.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-de096ab1.entry.js → p-6029a142.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-27df379b.entry.js → p-669a61ca.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d0a93fe4.entry.js → p-6bf45984.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-6e435cd2.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-bf9f594a.entry.js → p-6f42eb51.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-6b949537.entry.js → p-6f4bd858.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d7ac501e.entry.js → p-714f65a0.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-316644c4.entry.js → p-71ea36d7.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-cd3d0d81.entry.js → p-74ee2e23.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-76ea901a.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-38ee2e49.entry.js → p-7789513a.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c97a9e26.entry.js → p-79a47484.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8c3a1214.entry.js → p-7effb09b.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-4820e3f0.entry.js → p-8009fdc9.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-813cb992.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-ebf8fc92.entry.js → p-83cc0e17.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-89f07504.entry.js → p-8b1a96cc.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-8d32b63a.entry.js +1 -0
- package/dist/genesys-webcomponents/{p-ae905df6.entry.js → p-8da54237.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d0593bd7.entry.js → p-8e106004.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-3d929811.js → p-967a5d2e.js} +1 -1
- package/dist/genesys-webcomponents/{p-42861cb8.entry.js → p-99898e32.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-ab9af704.entry.js → p-9b2607c2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-3c75f89e.entry.js → p-a6466fec.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a40c1008.entry.js → p-b0b469b7.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-93d81f58.entry.js → p-b1a0e8f9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-fe24975e.entry.js → p-b3fc31d2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-a0ea94b2.entry.js → p-b5ff9be4.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-fb03513b.entry.js → p-b6db9f14.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f7c5034c.entry.js → p-b72ece98.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-1a0cbfe3.entry.js → p-bd5c79d9.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-4e7270a1.entry.js → p-c136bc23.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-01ef9af2.entry.js → p-c5ab5608.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f8b7c0fe.entry.js → p-cb53f5b2.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-f14a7f30.entry.js → p-cbad82d5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-9544d8f1.entry.js → p-ccb85246.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-0b573176.entry.js → p-cfc03ea4.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-41b462cf.entry.js → p-d0d09c10.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-1bcac80e.entry.js → p-d695f246.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-1a883b5f.entry.js → p-de6ad54f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-d445c114.entry.js → p-df4c45b5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-575361b7.entry.js → p-e6eba280.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-45274359.entry.js → p-e84f7077.entry.js} +1 -1
- package/dist/genesys-webcomponents/p-ea91ae27.js +1 -0
- package/dist/genesys-webcomponents/{p-2a2ac7a1.entry.js → p-eab68d2f.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-c7abcf5a.entry.js → p-eb9310a8.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-39ba0b61.entry.js → p-ee80c3b5.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-6f63be2e.entry.js → p-f0b4112d.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-914cdf24.entry.js → p-f4450927.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-7fdff30b.entry.js → p-f858d163.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-80590b7e.entry.js → p-fb9ae052.entry.js} +1 -1
- package/dist/genesys-webcomponents/{p-8724f0d3.entry.js → p-ffe85168.entry.js} +1 -1
- package/dist/stencil-wrapper.js +1 -1
- package/dist/types/components/beta/gux-month-picker/gux-month-calendar/gux-month-calendar.d.ts +45 -0
- package/dist/types/components/beta/gux-month-picker/gux-month-calendar/gux-month-list/gux-month-list-item/gux-month-list-item.d.ts +12 -0
- package/dist/types/components/beta/gux-month-picker/gux-month-calendar/gux-month-list/gux-month-list.d.ts +8 -0
- package/dist/types/components/beta/gux-month-picker/gux-month-picker.d.ts +49 -0
- package/dist/types/components/stable/gux-list/gux-list.service.d.ts +5 -4
- package/dist/types/components.d.ts +114 -0
- package/dist/types/utils/date/year-month-values.d.ts +8 -0
- package/dist/types/utils/dom/after-render.d.ts +1 -0
- package/package.json +1 -1
- package/dist/genesys-webcomponents/p-3e106880.entry.js +0 -1
- package/dist/genesys-webcomponents/p-57d38071.entry.js +0 -1
- package/dist/genesys-webcomponents/p-79929010.entry.js +0 -1
- package/dist/genesys-webcomponents/p-7cdec1aa.entry.js +0 -1
- package/dist/genesys-webcomponents/p-f7ded51b.entry.js +0 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Component, Element, h, Host, Listen, Prop } from '@stencil/core';
|
|
2
|
+
import { getClosestElement } from '../../../../../../utils/dom/get-closest-element';
|
|
3
|
+
export class GuxMonthListItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.disabled = false;
|
|
6
|
+
this.selected = false;
|
|
7
|
+
}
|
|
8
|
+
onMouseup() {
|
|
9
|
+
this.focusParentList();
|
|
10
|
+
}
|
|
11
|
+
onMouseover() {
|
|
12
|
+
this.focusParentList();
|
|
13
|
+
}
|
|
14
|
+
focusParentList() {
|
|
15
|
+
const parentList = getClosestElement('gux-month-list', this.root);
|
|
16
|
+
if (parentList && parentList.shadowRoot.activeElement === null) {
|
|
17
|
+
this.root.blur();
|
|
18
|
+
parentList.focus();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, { role: "listitem", value: this.value },
|
|
23
|
+
h("div", { class: "gux-container" },
|
|
24
|
+
h("button", { class: { 'gux-selected': this.selected }, type: "button", tabIndex: -1, disabled: this.disabled },
|
|
25
|
+
h("slot", null)))));
|
|
26
|
+
}
|
|
27
|
+
static get is() { return "gux-month-list-item"; }
|
|
28
|
+
static get encapsulation() { return "shadow"; }
|
|
29
|
+
static get delegatesFocus() { return true; }
|
|
30
|
+
static get originalStyleUrls() { return {
|
|
31
|
+
"$": ["gux-month-list-item.less"]
|
|
32
|
+
}; }
|
|
33
|
+
static get styleUrls() { return {
|
|
34
|
+
"$": ["gux-month-list-item.css"]
|
|
35
|
+
}; }
|
|
36
|
+
static get properties() { return {
|
|
37
|
+
"value": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "GuxISOYearMonth",
|
|
42
|
+
"resolved": "`${string}-${string}`",
|
|
43
|
+
"references": {
|
|
44
|
+
"GuxISOYearMonth": {
|
|
45
|
+
"location": "import",
|
|
46
|
+
"path": "../../../../../../utils/date/year-month-values"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
},
|
|
56
|
+
"attribute": "value",
|
|
57
|
+
"reflect": false
|
|
58
|
+
},
|
|
59
|
+
"disabled": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "boolean",
|
|
64
|
+
"resolved": "boolean",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": ""
|
|
72
|
+
},
|
|
73
|
+
"attribute": "disabled",
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"defaultValue": "false"
|
|
76
|
+
},
|
|
77
|
+
"selected": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "boolean",
|
|
82
|
+
"resolved": "boolean",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
},
|
|
91
|
+
"attribute": "selected",
|
|
92
|
+
"reflect": false,
|
|
93
|
+
"defaultValue": "false"
|
|
94
|
+
}
|
|
95
|
+
}; }
|
|
96
|
+
static get elementRef() { return "root"; }
|
|
97
|
+
static get listeners() { return [{
|
|
98
|
+
"name": "mouseup",
|
|
99
|
+
"method": "onMouseup",
|
|
100
|
+
"target": undefined,
|
|
101
|
+
"capture": false,
|
|
102
|
+
"passive": true
|
|
103
|
+
}, {
|
|
104
|
+
"name": "mouseover",
|
|
105
|
+
"method": "onMouseover",
|
|
106
|
+
"target": undefined,
|
|
107
|
+
"capture": false,
|
|
108
|
+
"passive": true
|
|
109
|
+
}]; }
|
|
110
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Component, Element, h, Host, Listen, Method } from '@stencil/core';
|
|
2
|
+
import { first, focusMove, last, next, previous } from '../../../../stable/gux-list/gux-list.service';
|
|
3
|
+
const validFocusableItems = ['gux-month-list-item'];
|
|
4
|
+
export class GuxMonthList {
|
|
5
|
+
onKeyDown(event) {
|
|
6
|
+
switch (event.key) {
|
|
7
|
+
case 'ArrowUp':
|
|
8
|
+
event.preventDefault();
|
|
9
|
+
focusMove(this.root, validFocusableItems, -3);
|
|
10
|
+
break;
|
|
11
|
+
case 'ArrowDown':
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
focusMove(this.root, validFocusableItems, 3);
|
|
14
|
+
break;
|
|
15
|
+
case 'ArrowLeft':
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
previous(this.root, validFocusableItems);
|
|
18
|
+
break;
|
|
19
|
+
case 'ArrowRight':
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
next(this.root, validFocusableItems);
|
|
22
|
+
break;
|
|
23
|
+
case 'Home':
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
first(this.root, validFocusableItems);
|
|
26
|
+
break;
|
|
27
|
+
case 'End':
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
last(this.root, validFocusableItems);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
34
|
+
async guxFocusFirstItem() {
|
|
35
|
+
first(this.root, validFocusableItems);
|
|
36
|
+
}
|
|
37
|
+
renderFocusTarget() {
|
|
38
|
+
return (h("span", { tabindex: "1" }));
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return (h(Host, { role: "list" },
|
|
42
|
+
this.renderFocusTarget(),
|
|
43
|
+
h("slot", null)));
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "gux-month-list"; }
|
|
46
|
+
static get encapsulation() { return "shadow"; }
|
|
47
|
+
static get delegatesFocus() { return true; }
|
|
48
|
+
static get originalStyleUrls() { return {
|
|
49
|
+
"$": ["gux-month-list.less"]
|
|
50
|
+
}; }
|
|
51
|
+
static get styleUrls() { return {
|
|
52
|
+
"$": ["gux-month-list.css"]
|
|
53
|
+
}; }
|
|
54
|
+
static get methods() { return {
|
|
55
|
+
"guxFocusFirstItem": {
|
|
56
|
+
"complexType": {
|
|
57
|
+
"signature": "() => Promise<void>",
|
|
58
|
+
"parameters": [],
|
|
59
|
+
"references": {
|
|
60
|
+
"Promise": {
|
|
61
|
+
"location": "global"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"return": "Promise<void>"
|
|
65
|
+
},
|
|
66
|
+
"docs": {
|
|
67
|
+
"text": "",
|
|
68
|
+
"tags": []
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}; }
|
|
72
|
+
static get elementRef() { return "root"; }
|
|
73
|
+
static get listeners() { return [{
|
|
74
|
+
"name": "keydown",
|
|
75
|
+
"method": "onKeyDown",
|
|
76
|
+
"target": undefined,
|
|
77
|
+
"capture": false,
|
|
78
|
+
"passive": false
|
|
79
|
+
}]; }
|
|
80
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
.gux-target {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
padding: 4px 8px 4px 12px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
background-color: #f6f7f9;
|
|
9
|
+
border: 1px solid #6b7585;
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
box-shadow: inset 0 0 4px rgba(32, 41, 55, 0.16);
|
|
12
|
+
}
|
|
13
|
+
.gux-target .gux-display {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
min-width: 100px;
|
|
16
|
+
padding-right: 8px;
|
|
17
|
+
color: #2e394c;
|
|
18
|
+
}
|
|
19
|
+
.gux-target .gux-display .gux-spinner {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
.gux-target .gux-display .gux-spinner:not(:first-child) {
|
|
23
|
+
margin-left: 4px;
|
|
24
|
+
}
|
|
25
|
+
.gux-target .gux-display .gux-spinner:focus {
|
|
26
|
+
background: #deeaff;
|
|
27
|
+
}
|
|
28
|
+
.gux-target .gux-display .gux-spinner.gux-empty {
|
|
29
|
+
color: #596373;
|
|
30
|
+
}
|
|
31
|
+
.gux-target .gux-popup-toggle {
|
|
32
|
+
justify-content: right;
|
|
33
|
+
padding: 2px;
|
|
34
|
+
color: #596373;
|
|
35
|
+
background: transparent;
|
|
36
|
+
border: none;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
}
|
|
39
|
+
.gux-target .gux-popup-toggle:focus {
|
|
40
|
+
outline: none;
|
|
41
|
+
box-shadow: 0 0 0 1px #fdfdfd, 0 0 0 4px #aac9ff;
|
|
42
|
+
}
|
|
43
|
+
.gux-target .gux-popup-toggle:not(:disabled):focus,
|
|
44
|
+
.gux-target .gux-popup-toggle:not(:disabled):hover {
|
|
45
|
+
color: #2e394c;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
}
|
|
48
|
+
.gux-target .gux-popup-toggle gux-icon {
|
|
49
|
+
width: 16px;
|
|
50
|
+
height: 16px;
|
|
51
|
+
}
|
|
52
|
+
.gux-target .gux-popup-toggle.gux-expanded {
|
|
53
|
+
color: #2a60c8;
|
|
54
|
+
}
|
|
55
|
+
.gux-target .gux-popup-toggle.gux-expanded:not(:disabled):focus,
|
|
56
|
+
.gux-target .gux-popup-toggle.gux-expanded:not(:disabled):hover {
|
|
57
|
+
color: #2a60c8;
|
|
58
|
+
}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
8
|
+
import { Component, Element, h, Listen, Prop, State, Watch } from '@stencil/core';
|
|
9
|
+
import { trackComponent } from '../../../usage-tracking';
|
|
10
|
+
import { OnClickOutside } from '../../../utils/decorator/on-click-outside';
|
|
11
|
+
import { buildI18nForComponent, getDesiredLocale } from '../../../i18n';
|
|
12
|
+
import simulateNativeEvent from '../../../utils/dom/simulate-native-event';
|
|
13
|
+
import { afterRender } from '../../../utils/dom/after-render';
|
|
14
|
+
import { getCurrentISOYearMonth, getISOYearMonth, getYearMonthObject } from '../../../utils/date/year-month-values';
|
|
15
|
+
import translationResources from './i18n/en.json';
|
|
16
|
+
const DateTimeFormats = { year: 'numeric', month: 'long' };
|
|
17
|
+
const YearFirstLocales = ['ar', 'he', 'ja', 'ko', 'zh-cn', 'zh-tw'];
|
|
18
|
+
export class GuxMonthPicker {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.disabled = false;
|
|
21
|
+
this.expanded = false;
|
|
22
|
+
}
|
|
23
|
+
onKeyDown(event) {
|
|
24
|
+
switch (event.key) {
|
|
25
|
+
case 'Escape':
|
|
26
|
+
this.expanded = false;
|
|
27
|
+
this.calendarToggleButtonElement.focus();
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
onValueUpdate(newValue) {
|
|
32
|
+
if (this.isOutOfBounds(newValue)) {
|
|
33
|
+
if (this.isBeforeMin(newValue)) {
|
|
34
|
+
this.value = this.min;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.value = this.max;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.value = newValue;
|
|
42
|
+
}
|
|
43
|
+
simulateNativeEvent(this.root, 'input');
|
|
44
|
+
simulateNativeEvent(this.root, 'change');
|
|
45
|
+
}
|
|
46
|
+
onClickOutside() {
|
|
47
|
+
this.expanded = false;
|
|
48
|
+
}
|
|
49
|
+
async componentWillLoad() {
|
|
50
|
+
trackComponent(this.root);
|
|
51
|
+
this.i18n = await buildI18nForComponent(this.root, translationResources);
|
|
52
|
+
this.locale = getDesiredLocale(this.root);
|
|
53
|
+
}
|
|
54
|
+
isOutOfBounds(value) {
|
|
55
|
+
return this.isBeforeMin(value) || this.isAfterMax(value);
|
|
56
|
+
}
|
|
57
|
+
isBeforeMin(value) {
|
|
58
|
+
return this.min && this.min > value;
|
|
59
|
+
}
|
|
60
|
+
isAfterMax(value) {
|
|
61
|
+
return this.max && this.max < value;
|
|
62
|
+
}
|
|
63
|
+
toggleCalendar() {
|
|
64
|
+
this.expanded = !this.expanded;
|
|
65
|
+
if (this.expanded) {
|
|
66
|
+
afterRender(() => {
|
|
67
|
+
void this.monthCalendarElement.guxFocus(this.value);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
onMonthCalendarInput() {
|
|
72
|
+
this.value = this.monthCalendarElement.value;
|
|
73
|
+
this.expanded = false;
|
|
74
|
+
this.calendarToggleButtonElement.focus();
|
|
75
|
+
}
|
|
76
|
+
incrementMonth(delta) {
|
|
77
|
+
if (this.value) {
|
|
78
|
+
const { year: currentYear, month: currentMonth } = getYearMonthObject(this.value);
|
|
79
|
+
const newMonth = (((parseInt(currentMonth) + 11 + delta) % 12) + 1)
|
|
80
|
+
.toString()
|
|
81
|
+
.padStart(2, '0');
|
|
82
|
+
this.value = getISOYearMonth(currentYear, newMonth);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
this.value = getCurrentISOYearMonth();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
incrementYear(delta) {
|
|
89
|
+
if (this.value) {
|
|
90
|
+
const { year: currentYear, month: currentMonth } = getYearMonthObject(this.value);
|
|
91
|
+
const newYear = Math.max(Number(currentYear) + delta, 0).toString();
|
|
92
|
+
this.value = getISOYearMonth(newYear, currentMonth);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.value = getCurrentISOYearMonth();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
onSpinnerKeyDown(event, incrementor, nextFocusElement) {
|
|
99
|
+
switch (event.key) {
|
|
100
|
+
case 'ArrowDown':
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
incrementor(-1);
|
|
103
|
+
break;
|
|
104
|
+
case 'ArrowUp':
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
incrementor(1);
|
|
107
|
+
break;
|
|
108
|
+
case 'ArrowLeft':
|
|
109
|
+
case 'ArrowRight':
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
nextFocusElement.focus();
|
|
112
|
+
break;
|
|
113
|
+
case 'Enter':
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
this.expanded = true;
|
|
116
|
+
afterRender(() => {
|
|
117
|
+
void this.monthCalendarElement.guxFocus(this.value);
|
|
118
|
+
});
|
|
119
|
+
break;
|
|
120
|
+
case ' ':
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
onSpinnerKeyUp(event) {
|
|
126
|
+
event.stopPropagation();
|
|
127
|
+
switch (event.key) {
|
|
128
|
+
case ' ':
|
|
129
|
+
event.preventDefault();
|
|
130
|
+
this.expanded = true;
|
|
131
|
+
afterRender(() => {
|
|
132
|
+
void this.monthCalendarElement.guxFocus(this.value);
|
|
133
|
+
});
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
onSpinnerClick() {
|
|
138
|
+
console.log('onSpinnerClick');
|
|
139
|
+
this.expanded = true;
|
|
140
|
+
}
|
|
141
|
+
getSpinnerLabel(period) {
|
|
142
|
+
if (this.value) {
|
|
143
|
+
const { year, month } = getYearMonthObject(this.value);
|
|
144
|
+
return new Date(Number(year), Number(month) - 1).toLocaleDateString(this.locale, { [period]: DateTimeFormats[period] });
|
|
145
|
+
}
|
|
146
|
+
return this.i18n(period);
|
|
147
|
+
}
|
|
148
|
+
getSpinnerValueNow(period) {
|
|
149
|
+
return this.value ? getYearMonthObject(this.value)[period] : '0';
|
|
150
|
+
}
|
|
151
|
+
getSpinnerValueText() {
|
|
152
|
+
if (this.value) {
|
|
153
|
+
const { year, month } = getYearMonthObject(this.value);
|
|
154
|
+
return new Date(Number(year), Number(month) - 1).toLocaleDateString(this.locale, { year: 'numeric', month: 'long' });
|
|
155
|
+
}
|
|
156
|
+
return this.i18n('unset');
|
|
157
|
+
}
|
|
158
|
+
renderMonthSpinnerButton() {
|
|
159
|
+
return (h("div", { role: "spinbutton", class: {
|
|
160
|
+
'gux-spinner': true,
|
|
161
|
+
'gux-empty': Boolean(!this.value)
|
|
162
|
+
}, tabIndex: this.disabled ? -1 : 0, onKeyDown: (e) => this.onSpinnerKeyDown(e, d => this.incrementMonth(d), this.yearSpinnerElement), onKeyUp: (e) => this.onSpinnerKeyUp(e), onClick: () => this.onSpinnerClick(), ref: (el) => (this.monthSpinnerElement = el), "aria-valuenow": this.getSpinnerValueNow('month'), "aria-valuetext": this.getSpinnerValueText(), "aria-valuemin": "1", "aria-valuemax": "12", "aria-label": this.i18n('month') }, this.getSpinnerLabel('month')));
|
|
163
|
+
}
|
|
164
|
+
renderYearSpinnerButton() {
|
|
165
|
+
return (h("div", { role: "spinbutton", class: {
|
|
166
|
+
'gux-spinner': true,
|
|
167
|
+
'gux-empty': Boolean(!this.value)
|
|
168
|
+
}, tabIndex: this.disabled ? -1 : 0, onKeyDown: (e) => this.onSpinnerKeyDown(e, d => this.incrementYear(d), this.monthSpinnerElement), onKeyUp: (e) => this.onSpinnerKeyUp(e), onClick: () => this.onSpinnerClick(), ref: (el) => (this.yearSpinnerElement = el), "aria-valuenow": this.getSpinnerValueNow('year'), "aria-valuetext": this.getSpinnerValueText(), "aria-valuemin": "0", "aria-label": this.i18n('year') }, this.getSpinnerLabel('year')));
|
|
169
|
+
}
|
|
170
|
+
renderSpinnerButtons() {
|
|
171
|
+
if (YearFirstLocales.includes(this.locale)) {
|
|
172
|
+
return (h("span", { class: "gux-display" },
|
|
173
|
+
this.renderYearSpinnerButton(),
|
|
174
|
+
this.renderMonthSpinnerButton()));
|
|
175
|
+
}
|
|
176
|
+
return (h("span", { class: "gux-display" },
|
|
177
|
+
this.renderMonthSpinnerButton(),
|
|
178
|
+
this.renderYearSpinnerButton()));
|
|
179
|
+
}
|
|
180
|
+
renderCalendarToggleButton() {
|
|
181
|
+
return (h("button", { class: {
|
|
182
|
+
'gux-popup-toggle': true,
|
|
183
|
+
'gux-expanded': this.expanded
|
|
184
|
+
}, ref: (el) => (this.calendarToggleButtonElement = el), type: "button", onClick: () => this.toggleCalendar(), disabled: this.disabled },
|
|
185
|
+
h("gux-icon", { "icon-name": "calendar", "screenreader-text": this.i18n('toggleCalendar') })));
|
|
186
|
+
}
|
|
187
|
+
renderTarget() {
|
|
188
|
+
return (h("div", { class: "gux-target", slot: "target" },
|
|
189
|
+
this.renderSpinnerButtons(),
|
|
190
|
+
this.renderCalendarToggleButton()));
|
|
191
|
+
}
|
|
192
|
+
renderPopup() {
|
|
193
|
+
return (h("gux-month-calendar", { slot: "popup", ref: (el) => (this.monthCalendarElement = el), onInput: () => this.onMonthCalendarInput(), value: this.value, min: this.min, max: this.max }));
|
|
194
|
+
}
|
|
195
|
+
render() {
|
|
196
|
+
return (h("gux-popup", { expanded: this.expanded, disabled: this.disabled },
|
|
197
|
+
this.renderTarget(),
|
|
198
|
+
this.renderPopup()));
|
|
199
|
+
}
|
|
200
|
+
static get is() { return "gux-month-picker-beta"; }
|
|
201
|
+
static get encapsulation() { return "shadow"; }
|
|
202
|
+
static get originalStyleUrls() { return {
|
|
203
|
+
"$": ["gux-month-picker.less"]
|
|
204
|
+
}; }
|
|
205
|
+
static get styleUrls() { return {
|
|
206
|
+
"$": ["gux-month-picker.css"]
|
|
207
|
+
}; }
|
|
208
|
+
static get properties() { return {
|
|
209
|
+
"value": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"mutable": true,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "GuxISOYearMonth",
|
|
214
|
+
"resolved": "`${string}-${string}`",
|
|
215
|
+
"references": {
|
|
216
|
+
"GuxISOYearMonth": {
|
|
217
|
+
"location": "import",
|
|
218
|
+
"path": "../../../utils/date/year-month-values"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "The current selected year and month in ISO8601 format (yyyy-mm)"
|
|
227
|
+
},
|
|
228
|
+
"attribute": "value",
|
|
229
|
+
"reflect": false
|
|
230
|
+
},
|
|
231
|
+
"min": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"mutable": false,
|
|
234
|
+
"complexType": {
|
|
235
|
+
"original": "GuxISOYearMonth",
|
|
236
|
+
"resolved": "`${string}-${string}`",
|
|
237
|
+
"references": {
|
|
238
|
+
"GuxISOYearMonth": {
|
|
239
|
+
"location": "import",
|
|
240
|
+
"path": "../../../utils/date/year-month-values"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": false,
|
|
245
|
+
"optional": false,
|
|
246
|
+
"docs": {
|
|
247
|
+
"tags": [],
|
|
248
|
+
"text": "The min year and month selectable in ISO8601 format (yyyy-mm)"
|
|
249
|
+
},
|
|
250
|
+
"attribute": "min",
|
|
251
|
+
"reflect": false
|
|
252
|
+
},
|
|
253
|
+
"max": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"mutable": false,
|
|
256
|
+
"complexType": {
|
|
257
|
+
"original": "GuxISOYearMonth",
|
|
258
|
+
"resolved": "`${string}-${string}`",
|
|
259
|
+
"references": {
|
|
260
|
+
"GuxISOYearMonth": {
|
|
261
|
+
"location": "import",
|
|
262
|
+
"path": "../../../utils/date/year-month-values"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"required": false,
|
|
267
|
+
"optional": false,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [],
|
|
270
|
+
"text": "The max year and month selectable in ISO8601 format (yyyy-mm)"
|
|
271
|
+
},
|
|
272
|
+
"attribute": "max",
|
|
273
|
+
"reflect": false
|
|
274
|
+
},
|
|
275
|
+
"disabled": {
|
|
276
|
+
"type": "boolean",
|
|
277
|
+
"mutable": false,
|
|
278
|
+
"complexType": {
|
|
279
|
+
"original": "boolean",
|
|
280
|
+
"resolved": "boolean",
|
|
281
|
+
"references": {}
|
|
282
|
+
},
|
|
283
|
+
"required": false,
|
|
284
|
+
"optional": false,
|
|
285
|
+
"docs": {
|
|
286
|
+
"tags": [],
|
|
287
|
+
"text": ""
|
|
288
|
+
},
|
|
289
|
+
"attribute": "disabled",
|
|
290
|
+
"reflect": false,
|
|
291
|
+
"defaultValue": "false"
|
|
292
|
+
}
|
|
293
|
+
}; }
|
|
294
|
+
static get states() { return {
|
|
295
|
+
"expanded": {},
|
|
296
|
+
"locale": {}
|
|
297
|
+
}; }
|
|
298
|
+
static get elementRef() { return "root"; }
|
|
299
|
+
static get watchers() { return [{
|
|
300
|
+
"propName": "value",
|
|
301
|
+
"methodName": "onValueUpdate"
|
|
302
|
+
}]; }
|
|
303
|
+
static get listeners() { return [{
|
|
304
|
+
"name": "keydown",
|
|
305
|
+
"method": "onKeyDown",
|
|
306
|
+
"target": undefined,
|
|
307
|
+
"capture": false,
|
|
308
|
+
"passive": false
|
|
309
|
+
}]; }
|
|
310
|
+
}
|
|
311
|
+
__decorate([
|
|
312
|
+
OnClickOutside({ triggerEvents: 'mousedown' })
|
|
313
|
+
], GuxMonthPicker.prototype, "onClickOutside", null);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, Element, h, Host, Listen, Method } from '@stencil/core';
|
|
2
2
|
import { first, last, next, previous } from './gux-list.service';
|
|
3
3
|
import { trackComponent } from '../../../usage-tracking';
|
|
4
|
+
const validFocusableItems = ['gux-list-item'];
|
|
4
5
|
export class GuxList {
|
|
5
6
|
componentWillLoad() {
|
|
6
7
|
trackComponent(this.root);
|
|
@@ -9,25 +10,25 @@ export class GuxList {
|
|
|
9
10
|
switch (event.key) {
|
|
10
11
|
case 'ArrowUp':
|
|
11
12
|
event.preventDefault();
|
|
12
|
-
previous(this.root);
|
|
13
|
+
previous(this.root, validFocusableItems);
|
|
13
14
|
break;
|
|
14
15
|
case 'Home':
|
|
15
16
|
event.preventDefault();
|
|
16
|
-
first(this.root);
|
|
17
|
+
first(this.root, validFocusableItems);
|
|
17
18
|
break;
|
|
18
19
|
case 'ArrowDown':
|
|
19
20
|
event.preventDefault();
|
|
20
|
-
next(this.root);
|
|
21
|
+
next(this.root, validFocusableItems);
|
|
21
22
|
break;
|
|
22
23
|
case 'End':
|
|
23
24
|
event.preventDefault();
|
|
24
|
-
last(this.root);
|
|
25
|
+
last(this.root, validFocusableItems);
|
|
25
26
|
break;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
29
30
|
async guxFocusFirstItem() {
|
|
30
|
-
first(this.root);
|
|
31
|
+
first(this.root, validFocusableItems);
|
|
31
32
|
}
|
|
32
33
|
renderFocusTarget() {
|
|
33
34
|
return (h("span", { tabindex: "-1" }));
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
const validFocusableItems = ['gux-list-item'];
|
|
2
1
|
function getRootChildren(root) {
|
|
3
2
|
const slot = root.querySelector('slot');
|
|
4
3
|
return slot ? slot.assignedElements() : Array.from(root.children);
|
|
5
4
|
}
|
|
6
|
-
function getGuxListFocusableItems(root) {
|
|
5
|
+
function getGuxListFocusableItems(root, validFocusableItems) {
|
|
7
6
|
return getRootChildren(root).filter(cv => {
|
|
8
7
|
if (validFocusableItems.includes(cv.tagName.toLowerCase())) {
|
|
9
8
|
return !cv.disabled;
|
|
@@ -11,34 +10,34 @@ function getGuxListFocusableItems(root) {
|
|
|
11
10
|
return false;
|
|
12
11
|
});
|
|
13
12
|
}
|
|
14
|
-
function getCurrentFocusIndex(root) {
|
|
15
|
-
return getGuxListFocusableItems(root).findIndex(cv => cv.matches(':focus-within'));
|
|
13
|
+
function getCurrentFocusIndex(root, validFocusableItems) {
|
|
14
|
+
return getGuxListFocusableItems(root, validFocusableItems).findIndex(cv => cv.matches(':focus-within'));
|
|
16
15
|
}
|
|
17
|
-
function focusMove(root, delta) {
|
|
18
|
-
const currentFocusIndex = getCurrentFocusIndex(root);
|
|
19
|
-
const maxIndex = getGuxListFocusableItems(root).length;
|
|
20
|
-
focusIndex(root, (currentFocusIndex + delta) % maxIndex);
|
|
16
|
+
export function focusMove(root, validFocusableItems, delta) {
|
|
17
|
+
const currentFocusIndex = getCurrentFocusIndex(root, validFocusableItems);
|
|
18
|
+
const maxIndex = getGuxListFocusableItems(root, validFocusableItems).length;
|
|
19
|
+
focusIndex(root, validFocusableItems, (currentFocusIndex + delta) % maxIndex);
|
|
21
20
|
}
|
|
22
|
-
function focusIndex(root, focusIndex) {
|
|
21
|
+
function focusIndex(root, validFocusableItems, focusIndex) {
|
|
23
22
|
var _a;
|
|
24
|
-
const items = getGuxListFocusableItems(root);
|
|
23
|
+
const items = getGuxListFocusableItems(root, validFocusableItems);
|
|
25
24
|
while (focusIndex < 0) {
|
|
26
25
|
focusIndex += items.length;
|
|
27
26
|
}
|
|
28
27
|
(_a = items[focusIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
29
28
|
}
|
|
30
|
-
function getLastChildIndex(root) {
|
|
31
|
-
return getGuxListFocusableItems(root).length - 1;
|
|
29
|
+
function getLastChildIndex(root, validFocusableItems) {
|
|
30
|
+
return getGuxListFocusableItems(root, validFocusableItems).length - 1;
|
|
32
31
|
}
|
|
33
|
-
export function first(root) {
|
|
34
|
-
focusIndex(root, 0);
|
|
32
|
+
export function first(root, validFocusableItems) {
|
|
33
|
+
focusIndex(root, validFocusableItems, 0);
|
|
35
34
|
}
|
|
36
|
-
export function last(root) {
|
|
37
|
-
focusIndex(root, getLastChildIndex(root));
|
|
35
|
+
export function last(root, validFocusableItems) {
|
|
36
|
+
focusIndex(root, validFocusableItems, getLastChildIndex(root, validFocusableItems));
|
|
38
37
|
}
|
|
39
|
-
export function next(root) {
|
|
40
|
-
focusMove(root, 1);
|
|
38
|
+
export function next(root, validFocusableItems) {
|
|
39
|
+
focusMove(root, validFocusableItems, 1);
|
|
41
40
|
}
|
|
42
|
-
export function previous(root) {
|
|
43
|
-
focusMove(root, -1);
|
|
41
|
+
export function previous(root, validFocusableItems) {
|
|
42
|
+
focusMove(root, validFocusableItems, -1);
|
|
44
43
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function getISOYearMonth(year, month) {
|
|
2
|
+
return `${year}-${month}`;
|
|
3
|
+
}
|
|
4
|
+
export function getYearMonthObject(yearMonthString) {
|
|
5
|
+
const [year, month] = yearMonthString.split('-');
|
|
6
|
+
return { year, month };
|
|
7
|
+
}
|
|
8
|
+
export function getCurrentISOYearMonth() {
|
|
9
|
+
const newDate = new Date();
|
|
10
|
+
const year = newDate.getFullYear().toString();
|
|
11
|
+
const month = (newDate.getMonth() + 1).toString().padStart(2, '0');
|
|
12
|
+
return getISOYearMonth(year, month);
|
|
13
|
+
}
|