@ds-mo/ui 14.35.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.package-ready.json +1 -1
- package/dist/agent-patterns.json +1 -1
- package/dist/agent.json +5733 -4656
- package/dist/angular/ds-button-inverted.d.ts +17 -0
- package/dist/angular/ds-button-inverted.js +46 -0
- package/dist/angular/ds-calendar.d.ts +15 -0
- package/dist/angular/ds-calendar.js +43 -0
- package/dist/angular/ds-conversation-list.d.ts +1 -1
- package/dist/angular/ds-conversation-list.js +3 -4
- package/dist/angular/ds-data-customize.d.ts +18 -0
- package/dist/angular/ds-data-customize.js +46 -0
- package/dist/angular/ds-data-filter.d.ts +50 -0
- package/dist/angular/{ds-table-filter.js → ds-data-filter.js} +10 -10
- package/dist/angular/ds-data-group.d.ts +29 -0
- package/dist/angular/{ds-table-group.js → ds-data-group.js} +10 -10
- package/dist/angular/ds-data-preferences.d.ts +39 -0
- package/dist/angular/{ds-table-preferences.js → ds-data-preferences.js} +15 -15
- package/dist/angular/ds-data-saved-views.d.ts +49 -0
- package/dist/angular/{ds-table-saved-views.js → ds-data-saved-views.js} +10 -10
- package/dist/angular/ds-data-search.d.ts +20 -0
- package/dist/angular/{ds-table-search.js → ds-data-search.js} +12 -12
- package/dist/angular/ds-data-sort.d.ts +16 -0
- package/dist/angular/{ds-table-sort.js → ds-data-sort.js} +12 -12
- package/dist/angular/ds-data-toolbar.d.ts +12 -0
- package/dist/angular/{ds-table-toolbar.js → ds-data-toolbar.js} +10 -10
- package/dist/angular/ds-field.d.ts +1 -1
- package/dist/angular/ds-field.js +1 -1
- package/dist/angular/ds-input-date.d.ts +15 -0
- package/dist/angular/ds-input-date.js +43 -0
- package/dist/angular/ds-input-time.d.ts +15 -0
- package/dist/angular/ds-input-time.js +43 -0
- package/dist/angular/ds-input.d.ts +1 -1
- package/dist/angular/ds-input.js +3 -3
- package/dist/angular/ds-select.d.ts +1 -1
- package/dist/angular/ds-select.js +3 -3
- package/dist/angular/ds-table.d.ts +7 -7
- package/dist/angular/ds-table.js +6 -6
- package/dist/angular/ds-time-picker.d.ts +15 -0
- package/dist/angular/ds-time-picker.js +43 -0
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +13 -7
- package/dist/angular/proxies.d.ts +13 -7
- package/dist/angular/proxies.js +13 -7
- package/dist/angular/text-value-accessor.d.ts +1 -1
- package/dist/angular/text-value-accessor.js +2 -2
- package/dist/components/ds-agent-activity.js +1 -1
- package/dist/components/ds-agent-questionnaire.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-agent-source-list.js +1 -1
- package/dist/components/ds-agent-tool-call.js +1 -1
- package/dist/components/ds-attachment-list.js +1 -1
- package/dist/components/ds-avatar.js +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-action.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-page-title.js +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-breadcrumb.js +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-inverted.d.ts +11 -0
- package/dist/components/ds-button-inverted.js +2 -0
- package/dist/components/ds-button-inverted.js.map +1 -0
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/{ds-table-search.d.ts → ds-calendar.d.ts} +4 -4
- package/dist/components/ds-calendar.js +2 -0
- package/dist/components/ds-card-action-center.js +1 -1
- package/dist/components/ds-card-chart.js +1 -1
- package/dist/components/ds-card-navigation.js +1 -1
- package/dist/components/ds-card-navigation.js.map +1 -1
- package/dist/components/ds-card-overview.js +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-settings-scope.js +1 -1
- package/dist/components/ds-card-settings-scope.js.map +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.js +1 -1
- package/dist/components/ds-conversation-list-item.js +1 -1
- package/dist/components/ds-conversation-list-item.js.map +1 -1
- package/dist/components/ds-conversation-list-section.js +1 -1
- package/dist/components/ds-conversation-list.js +1 -1
- package/dist/components/ds-conversation-list.js.map +1 -1
- package/dist/components/ds-data-customize.d.ts +11 -0
- package/dist/components/ds-data-customize.js +2 -0
- package/dist/components/ds-data-customize.js.map +1 -0
- package/dist/components/{ds-table-group.d.ts → ds-data-filter.d.ts} +4 -4
- package/dist/components/ds-data-filter.js +2 -0
- package/dist/components/ds-data-filter.js.map +1 -0
- package/dist/components/{ds-table-sort.d.ts → ds-data-group.d.ts} +4 -4
- package/dist/components/ds-data-group.js +2 -0
- package/dist/components/ds-data-group.js.map +1 -0
- package/dist/components/{ds-table-saved-views.d.ts → ds-data-preferences.d.ts} +4 -4
- package/dist/components/ds-data-preferences.js +2 -0
- package/dist/components/ds-data-preferences.js.map +1 -0
- package/dist/components/ds-data-saved-views.d.ts +11 -0
- package/dist/components/ds-data-saved-views.js +2 -0
- package/dist/components/ds-data-saved-views.js.map +1 -0
- package/dist/components/ds-data-search.d.ts +11 -0
- package/dist/components/ds-data-search.js +2 -0
- package/dist/components/ds-data-search.js.map +1 -0
- package/dist/components/ds-data-sort.d.ts +11 -0
- package/dist/components/ds-data-sort.js +2 -0
- package/dist/components/ds-data-sort.js.map +1 -0
- package/dist/components/{ds-table-filter.d.ts → ds-data-toolbar.d.ts} +4 -4
- package/dist/components/ds-data-toolbar.js +2 -0
- package/dist/components/ds-data-toolbar.js.map +1 -0
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-filter-menu.js +1 -1
- package/dist/components/ds-icon.js +1 -1
- package/dist/components/ds-input-date.d.ts +11 -0
- package/dist/components/ds-input-date.js +2 -0
- package/dist/components/ds-input-date.js.map +1 -0
- package/dist/components/ds-input-time.d.ts +11 -0
- package/dist/components/ds-input-time.js +2 -0
- package/dist/components/ds-input-time.js.map +1 -0
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-actions.js +1 -1
- package/dist/components/ds-message-bubble.js +1 -1
- package/dist/components/ds-message-bubble.js.map +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-composer.js.map +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message.js +1 -1
- package/dist/components/ds-mobile-bar-nav.js +1 -1
- package/dist/components/ds-mobile-header.js +1 -1
- package/dist/components/ds-mobile-section-switcher.js +1 -1
- package/dist/components/ds-mobile-sheet-nav.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-pagination.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-paper-texture.js +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-score.js +1 -1
- package/dist/components/ds-scroll-overlay.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-slider.js.map +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-textarea.js +1 -1
- package/dist/components/ds-textarea.js.map +1 -1
- package/dist/components/ds-time-picker.d.ts +11 -0
- package/dist/components/ds-time-picker.js +2 -0
- package/dist/components/ds-time-picker.js.map +1 -0
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-tooltip-chart.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/components/p-0FYD2bev.js +2 -0
- package/dist/components/p-0FYD2bev.js.map +1 -0
- package/dist/components/p-0qY_HDId.js +2 -0
- package/dist/components/{p-D_u8WhlU.js.map → p-0qY_HDId.js.map} +1 -1
- package/dist/components/{p-BQsVI_vO.js → p-5URekSny.js} +2 -2
- package/dist/components/{p-eo_pmPqp.js → p-7V1AhetH.js} +2 -2
- package/dist/components/{p-yZRXPHDe.js → p-8yBdCXCn.js} +2 -2
- package/dist/components/p-BKZdqJQB.js +2 -0
- package/dist/components/p-BKZdqJQB.js.map +1 -0
- package/dist/components/p-BYrBU_U9.js +2 -0
- package/dist/components/p-BYrBU_U9.js.map +1 -0
- package/dist/components/{p-D44g2Kw1.js → p-BciTtTwx.js} +2 -2
- package/dist/components/p-BciTtTwx.js.map +1 -0
- package/dist/components/{p-CZOiTaNa.js → p-BeNa6tw5.js} +2 -2
- package/dist/components/{p-CZOiTaNa.js.map → p-BeNa6tw5.js.map} +1 -1
- package/dist/components/p-BgQMEHRa.js +2 -0
- package/dist/components/{p-CwqFJMvP.js.map → p-BgQMEHRa.js.map} +1 -1
- package/dist/components/{p-BQaO7cg_.js → p-BhJXmuRA.js} +2 -2
- package/dist/components/{p-n68x-ZKp.js → p-Bm7rqs3C.js} +2 -2
- package/dist/components/{p-DdspY23v.js → p-Bn8I7iw6.js} +2 -2
- package/dist/components/{p-BnWxbhFP.js → p-Bpd6YCo4.js} +2 -2
- package/dist/components/{p-B-9fdIWv.js → p-C-3YqeTb.js} +2 -2
- package/dist/components/{p-umAf0fBn.js → p-CD4DZPy_.js} +2 -2
- package/dist/components/p-CElUM-xU.js +2 -0
- package/dist/components/p-CElUM-xU.js.map +1 -0
- package/dist/components/{p-CuwopElg.js → p-CGidq1iC.js} +2 -2
- package/dist/components/p-CNxvnQ6A.js +2 -0
- package/dist/components/p-CNxvnQ6A.js.map +1 -0
- package/dist/components/{p-CI7VfYC3.js → p-CUcUHwI3.js} +2 -2
- package/dist/components/p-CYzFfFcH.js +2 -0
- package/dist/components/{p-BINSI_KF.js.map → p-CYzFfFcH.js.map} +1 -1
- package/dist/components/{p-Dhw_W8nk.js → p-Cc3ZUQlJ.js} +2 -2
- package/dist/components/p-Cc3ZUQlJ.js.map +1 -0
- package/dist/components/p-CdgOLWX9.js +2 -0
- package/dist/components/p-CdgOLWX9.js.map +1 -0
- package/dist/components/{p-BcdHgPi5.js → p-CeXf9-X3.js} +2 -2
- package/dist/components/{p-CSnsz3Eb.js → p-CiH4GG6r.js} +2 -2
- package/dist/components/{p-y06IxxoN.js → p-CiJ1WR11.js} +2 -2
- package/dist/components/p-CmexIVnE.js +2 -0
- package/dist/components/{p-N5SHSVo2.js.map → p-CmexIVnE.js.map} +1 -1
- package/dist/components/{p-BmFeeR4q.js → p-CqW2eyiF.js} +2 -2
- package/dist/components/{p-CzbsTZt7.js → p-Cxr0IQjC.js} +2 -2
- package/dist/components/{p-CqlBlv55.js → p-CzIpquvw.js} +2 -2
- package/dist/components/{p-DC69DgAR.js → p-D0y7Sja6.js} +2 -2
- package/dist/components/{p-Cwz9TPVS.js → p-D1vQGJzc.js} +2 -2
- package/dist/components/{p-Cwz9TPVS.js.map → p-D1vQGJzc.js.map} +1 -1
- package/dist/components/{p-C7CZ9pnP.js → p-D6Wl3dRO.js} +2 -2
- package/dist/components/{p-BPhbwXOv.js → p-D922f6Tb.js} +2 -2
- package/dist/components/{p-beRFLHbB.js → p-DHICPS4n.js} +2 -2
- package/dist/components/{p-omPm8_vx.js → p-DOAybCp0.js} +2 -2
- package/dist/components/{p-DEGNrPLe.js → p-DVINzOoK.js} +2 -2
- package/dist/components/{p-DEGNrPLe.js.map → p-DVINzOoK.js.map} +1 -1
- package/dist/components/p-DVOjjuXc.js +2 -0
- package/dist/components/p-DVOjjuXc.js.map +1 -0
- package/dist/components/p-Di5FH7eh.js +2 -0
- package/dist/components/p-Di5FH7eh.js.map +1 -0
- package/dist/components/p-DjkUFlDW.js +2 -0
- package/dist/components/p-DjkUFlDW.js.map +1 -0
- package/dist/components/{p-BnzsBNUY.js → p-Dn9QHL4O.js} +2 -2
- package/dist/components/{p-DGzn4k4h.js → p-Do2FJd1y.js} +2 -2
- package/dist/components/{p-DTDLlinw.js → p-DpoTwJAR.js} +2 -2
- package/dist/components/{p-Dk-8Ju0Q.js → p-Dpr2y6_S.js} +2 -2
- package/dist/components/{p-Dk-8Ju0Q.js.map → p-Dpr2y6_S.js.map} +1 -1
- package/dist/components/p-Dw9sE6Iw.js +2 -0
- package/dist/components/p-Dw9sE6Iw.js.map +1 -0
- package/dist/components/{p-CLGtPE0K.js → p-DwbcNDJF.js} +2 -2
- package/dist/components/p-Dzndkdx5.js +2 -0
- package/dist/components/{p-xHGqrz_p.js.map → p-Dzndkdx5.js.map} +1 -1
- package/dist/components/{p-C8ek-1SP.js → p-E5W27Fu_.js} +2 -2
- package/dist/components/{p-mpk_Mm8_.js → p-FIBCluwV.js} +2 -2
- package/dist/components/{p-DQQFN2sw.js → p-IEq_06J0.js} +2 -2
- package/dist/components/{p-DQQFN2sw.js.map → p-IEq_06J0.js.map} +1 -1
- package/dist/components/{p-CE540WZ7.js → p-MG4lcN0D.js} +2 -2
- package/dist/components/p-Nc76seSq.js +2 -0
- package/dist/components/p-Nc76seSq.js.map +1 -0
- package/dist/components/{p-DtLQIMsa.js → p-ZhP2tVmM.js} +2 -2
- package/dist/components/p-aD5cw_m2.js +2 -0
- package/dist/components/p-aD5cw_m2.js.map +1 -0
- package/dist/components/p-etifxiDc.js +2 -0
- package/dist/components/{p-beCz9OnD.js.map → p-etifxiDc.js.map} +1 -1
- package/dist/components/p-kDZ0sEII.js +2 -0
- package/dist/components/p-kDZ0sEII.js.map +1 -0
- package/dist/components/{p-BPlWEidl.js → p-ljbw3UMZ.js} +2 -2
- package/dist/components/{p-DZ58Sg5a.js → p-vfCu7XSc.js} +2 -2
- package/dist/components/p-vfCu7XSc.js.map +1 -0
- package/dist/components/{p-DFjIBS5B.js → p-xdmJCPCg.js} +2 -2
- package/dist/components/{p-CAxDdYjh.js → p-xtGGIZmU.js} +2 -2
- package/dist/docs/components.json +18102 -14568
- package/dist/lib/components/Icon/flag-icon-catalog.d.ts +2 -0
- package/dist/lib/components/Icon/icon-cache.d.ts +36 -4
- package/dist/lib/components/Icon/map-icon-catalog.d.ts +2 -0
- package/dist/lib/shell/index.js +2 -2
- package/dist/lib/shell/index.js.map +1 -1
- package/dist/lib/utils/button-render.d.ts +1 -1
- package/dist/lib/utils/clock-time.d.ts +22 -0
- package/dist/lib/utils/date-filter-value.d.ts +4 -0
- package/dist/lib/utils/index.d.ts +3 -1
- package/dist/lib/utils/index.js +201 -5
- package/dist/lib/utils/index.js.map +4 -4
- package/dist/mcp-data/registry/agent-activity.json +2 -2
- package/dist/mcp-data/registry/agent-questionnaire.json +2 -2
- package/dist/mcp-data/registry/agent-response.json +1 -1
- package/dist/mcp-data/registry/agent-source-list.json +1 -1
- package/dist/mcp-data/registry/agent-tool-call.json +2 -2
- package/dist/mcp-data/registry/attachment-list.json +1 -1
- package/dist/mcp-data/registry/avatar.json +1 -1
- package/dist/mcp-data/registry/badge.json +1 -1
- package/dist/mcp-data/registry/banner.json +1 -1
- package/dist/mcp-data/registry/bar-action.json +1 -1
- package/dist/mcp-data/registry/bar-nav.json +1 -1
- package/dist/mcp-data/registry/bar-page-title.json +1 -1
- package/dist/mcp-data/registry/bar-title.json +3 -3
- package/dist/mcp-data/registry/bar-workflow.json +1 -1
- package/dist/mcp-data/registry/breadcrumb.json +1 -1
- package/dist/mcp-data/registry/button-filled.json +1 -1
- package/dist/mcp-data/registry/button-inverted.json +580 -0
- package/dist/mcp-data/registry/button-unfilled.json +1 -1
- package/dist/mcp-data/registry/calendar.json +273 -0
- package/dist/mcp-data/registry/card-action-center.json +1 -1
- package/dist/mcp-data/registry/card-chart.json +1 -1
- package/dist/mcp-data/registry/card-navigation.json +5 -3
- package/dist/mcp-data/registry/card-overview.json +1 -1
- package/dist/mcp-data/registry/card-setting.json +1 -1
- package/dist/mcp-data/registry/card-settings-scope.json +1 -1
- package/dist/mcp-data/registry/chart-legend.json +1 -1
- package/dist/mcp-data/registry/chart.json +1 -1
- package/dist/mcp-data/registry/checkbox.json +1 -1
- package/dist/mcp-data/registry/chip.json +1 -1
- package/dist/mcp-data/registry/code-block.json +1 -1
- package/dist/mcp-data/registry/conversation-list-item.json +1 -1
- package/dist/mcp-data/registry/conversation-list-section.json +1 -1
- package/dist/mcp-data/registry/conversation-list.json +10 -32
- package/dist/mcp-data/registry/data-customize.json +374 -0
- package/dist/mcp-data/registry/{table-filter.json → data-filter.json} +33 -33
- package/dist/mcp-data/registry/data-group.json +358 -0
- package/dist/mcp-data/registry/data-preferences.json +566 -0
- package/dist/mcp-data/registry/data-saved-views.json +433 -0
- package/dist/mcp-data/registry/data-search.json +367 -0
- package/dist/mcp-data/registry/data-sort.json +254 -0
- package/dist/mcp-data/registry/data-toolbar.json +181 -0
- package/dist/mcp-data/registry/divider.json +1 -1
- package/dist/mcp-data/registry/empty-state.json +1 -1
- package/dist/mcp-data/registry/field.json +20 -15
- package/dist/mcp-data/registry/filter-menu.json +7 -11
- package/dist/mcp-data/registry/icon.json +13 -7
- package/dist/mcp-data/registry/input-date.json +516 -0
- package/dist/mcp-data/registry/input-time.json +535 -0
- package/dist/mcp-data/registry/input.json +57 -9
- package/dist/mcp-data/registry/loader.json +1 -1
- package/dist/mcp-data/registry/markdown.json +1 -1
- package/dist/mcp-data/registry/menu.json +3 -3
- package/dist/mcp-data/registry/message-actions.json +1 -1
- package/dist/mcp-data/registry/message-bubble.json +1 -1
- package/dist/mcp-data/registry/message-composer.json +2 -2
- package/dist/mcp-data/registry/message-scroller.json +1 -1
- package/dist/mcp-data/registry/message.json +1 -1
- package/dist/mcp-data/registry/mobile-bar-nav.json +2 -2
- package/dist/mcp-data/registry/mobile-header.json +1 -1
- package/dist/mcp-data/registry/mobile-section-switcher.json +1 -1
- package/dist/mcp-data/registry/mobile-sheet-nav.json +2 -2
- package/dist/mcp-data/registry/modal.json +1 -1
- package/dist/mcp-data/registry/pagination.json +1 -1
- package/dist/mcp-data/registry/panel-nav.json +1 -1
- package/dist/mcp-data/registry/panel-sub-nav.json +1 -1
- package/dist/mcp-data/registry/panel-tool-header.json +1 -1
- package/dist/mcp-data/registry/panel-tool-search.json +1 -1
- package/dist/mcp-data/registry/panel-tools.json +3 -3
- package/dist/mcp-data/registry/paper-texture.json +1 -1
- package/dist/mcp-data/registry/radio.json +1 -1
- package/dist/mcp-data/registry/registry.json +5911 -4816
- package/dist/mcp-data/registry/score.json +1 -1
- package/dist/mcp-data/registry/scroll-overlay.json +1 -1
- package/dist/mcp-data/registry/select.json +64 -8
- package/dist/mcp-data/registry/shell-app.json +1 -1
- package/dist/mcp-data/registry/shell-page.json +1 -1
- package/dist/mcp-data/registry/shell-tools.json +1 -1
- package/dist/mcp-data/registry/skeleton.json +1 -1
- package/dist/mcp-data/registry/slider.json +1 -1
- package/dist/mcp-data/registry/swatch-picker.json +1 -1
- package/dist/mcp-data/registry/switch.json +1 -1
- package/dist/mcp-data/registry/tab-group.json +1 -1
- package/dist/mcp-data/registry/table.json +71 -71
- package/dist/mcp-data/registry/tag.json +1 -1
- package/dist/mcp-data/registry/text.json +1 -1
- package/dist/mcp-data/registry/textarea.json +3 -3
- package/dist/mcp-data/registry/time-picker.json +259 -0
- package/dist/mcp-data/registry/toast.json +1 -1
- package/dist/mcp-data/registry/tooltip-chart.json +1 -1
- package/dist/mcp-data/registry/tooltip.json +1 -1
- package/dist/mcp-data/registry/typing-indicator.json +1 -1
- package/dist/react/components.d.ts +13 -7
- package/dist/react/components.js +13 -7
- package/dist/react/ds-button-inverted.d.ts +13 -0
- package/dist/react/ds-button-inverted.js +15 -0
- package/dist/react/ds-calendar.d.ts +12 -0
- package/dist/react/ds-calendar.js +12 -0
- package/dist/react/ds-data-customize.d.ts +13 -0
- package/dist/react/ds-data-customize.js +15 -0
- package/dist/react/ds-data-filter.d.ts +18 -0
- package/dist/react/{ds-table-filter.js → ds-data-filter.js} +5 -5
- package/dist/react/ds-data-group.d.ts +14 -0
- package/dist/react/{ds-table-group.js → ds-data-group.js} +5 -5
- package/dist/react/ds-data-preferences.d.ts +21 -0
- package/dist/react/{ds-table-preferences.js → ds-data-preferences.js} +6 -6
- package/dist/react/ds-data-saved-views.d.ts +17 -0
- package/dist/react/{ds-table-saved-views.js → ds-data-saved-views.js} +5 -5
- package/dist/react/ds-data-search.d.ts +14 -0
- package/dist/react/{ds-table-search.js → ds-data-search.js} +5 -5
- package/dist/react/ds-data-sort.d.ts +12 -0
- package/dist/react/ds-data-sort.js +12 -0
- package/dist/react/{ds-table-toolbar.d.ts → ds-data-toolbar.d.ts} +3 -3
- package/dist/react/ds-data-toolbar.js +12 -0
- package/dist/react/ds-field.d.ts +1 -1
- package/dist/react/ds-input-date.d.ts +12 -0
- package/dist/react/ds-input-date.js +12 -0
- package/dist/react/ds-input-time.d.ts +12 -0
- package/dist/react/ds-input-time.js +12 -0
- package/dist/react/ds-table.d.ts +3 -3
- package/dist/react/ds-table.js +1 -1
- package/dist/react/ds-time-picker.d.ts +12 -0
- package/dist/react/ds-time-picker.js +12 -0
- package/dist/styles/table.css +11 -11
- package/dist/types/components/BarTitle/BarTitle.d.ts +1 -0
- package/dist/types/components/BarTitle/bar-title-action-chrome.d.ts +2 -0
- package/dist/types/components/ButtonInverted/ButtonInverted.d.ts +83 -0
- package/dist/types/components/ButtonInverted/index.d.ts +2 -0
- package/dist/types/components/Calendar/Calendar.d.ts +32 -0
- package/dist/types/components/Calendar/calendar-grid.d.ts +19 -0
- package/dist/types/components/ConversationList/ConversationList.d.ts +0 -7
- package/dist/types/components/DataCustomize/DataCustomize.d.ts +67 -0
- package/dist/types/components/{TableFilter/TableFilter.d.ts → DataFilter/DataFilter.d.ts} +2 -2
- package/dist/types/components/{TableGroup/TableGroup.d.ts → DataGroup/DataGroup.d.ts} +8 -8
- package/dist/types/components/{TablePreferences/TablePreferences.d.ts → DataPreferences/DataPreferences.d.ts} +29 -13
- package/dist/types/components/{TableSavedViews/TableSavedViews.d.ts → DataSavedViews/DataSavedViews.d.ts} +10 -10
- package/dist/types/components/DataSavedViews/data-saved-views-types.d.ts +24 -0
- package/dist/types/components/DataSavedViews/index.d.ts +2 -0
- package/dist/types/components/{TableSearch/TableSearch.d.ts → DataSearch/DataSearch.d.ts} +6 -6
- package/dist/types/components/{TableSearch/table-search-model.d.ts → DataSearch/data-search-model.d.ts} +6 -6
- package/dist/types/components/{TableSearch/table-search-types.d.ts → DataSearch/data-search-types.d.ts} +3 -3
- package/dist/types/components/{TableSort/TableSort.d.ts → DataSort/DataSort.d.ts} +7 -6
- package/dist/types/components/DataSort/data-sort-menu.d.ts +15 -0
- package/dist/types/components/{TableToolbar/TableToolbar.d.ts → DataToolbar/DataToolbar.d.ts} +3 -3
- package/dist/types/components/Field/Field.d.ts +7 -2
- package/dist/types/components/FilterMenu/FilterMenu.d.ts +0 -10
- package/dist/types/components/Icon/icon-cache.d.ts +36 -4
- package/dist/types/components/Icon/map-icon-catalog.d.ts +3 -0
- package/dist/types/components/Input/Input.d.ts +10 -0
- package/dist/types/components/InputDate/InputDate.d.ts +78 -0
- package/dist/types/components/InputTime/InputTime.d.ts +80 -0
- package/dist/types/components/PanelTools/PanelTools.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +8 -1
- package/dist/types/components/Table/Table.d.ts +9 -9
- package/dist/types/components/Table/index.d.ts +1 -1
- package/dist/types/components/Table/table-action-menu.d.ts +1 -1
- package/dist/types/components/Table/table-body-renderer.d.ts +2 -2
- package/dist/types/components/Table/table-column-customizer.d.ts +9 -9
- package/dist/types/components/Table/table-group-load-controller.d.ts +2 -2
- package/dist/types/components/Table/table-model.d.ts +7 -7
- package/dist/types/components/Table/table-render-model.d.ts +3 -3
- package/dist/types/components/Table/table-types.d.ts +17 -36
- package/dist/types/components/Table/table-virtual-model.d.ts +2 -2
- package/dist/types/components/TimePicker/TimePicker.d.ts +33 -0
- package/dist/types/components.d.ts +5461 -4433
- package/dist/types/utils/button-render.d.ts +1 -1
- package/dist/types/utils/clock-time.d.ts +23 -0
- package/dist/types/utils/data-field.d.ts +38 -0
- package/dist/types/utils/date-filter-value.d.ts +4 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/list-customizer.d.ts +38 -0
- package/dist/types/utils/table-caption-compact.d.ts +1 -1
- package/dist/vue/components.d.ts +13 -7
- package/dist/vue/components.js +13 -7
- package/dist/vue/ds-button-inverted.d.ts +3 -0
- package/dist/vue/ds-button-inverted.js +33 -0
- package/dist/vue/{ds-table-sort.d.ts → ds-calendar.d.ts} +1 -1
- package/dist/vue/ds-calendar.js +16 -0
- package/dist/vue/ds-conversation-list.js +1 -3
- package/dist/vue/ds-data-customize.d.ts +3 -0
- package/dist/vue/ds-data-customize.js +23 -0
- package/dist/vue/{ds-table-group.d.ts → ds-data-filter.d.ts} +1 -1
- package/dist/vue/{ds-table-filter.js → ds-data-filter.js} +2 -2
- package/dist/vue/{ds-table-filter.d.ts → ds-data-group.d.ts} +1 -1
- package/dist/vue/{ds-table-group.js → ds-data-group.js} +2 -2
- package/dist/vue/{ds-table-saved-views.d.ts → ds-data-preferences.d.ts} +1 -1
- package/dist/vue/{ds-table-preferences.js → ds-data-preferences.js} +10 -7
- package/dist/vue/ds-data-saved-views.d.ts +3 -0
- package/dist/vue/{ds-table-saved-views.js → ds-data-saved-views.js} +2 -2
- package/dist/vue/{ds-table-search.d.ts → ds-data-search.d.ts} +1 -1
- package/dist/vue/{ds-table-search.js → ds-data-search.js} +3 -3
- package/dist/vue/ds-data-sort.d.ts +3 -0
- package/dist/vue/{ds-table-sort.js → ds-data-sort.js} +3 -3
- package/dist/vue/ds-data-toolbar.d.ts +3 -0
- package/dist/vue/ds-data-toolbar.js +9 -0
- package/dist/vue/{ds-table-preferences.d.ts → ds-input-date.d.ts} +1 -1
- package/dist/vue/ds-input-date.js +31 -0
- package/dist/vue/ds-input-time.d.ts +3 -0
- package/dist/vue/ds-input-time.js +32 -0
- package/dist/vue/ds-input.js +2 -0
- package/dist/vue/ds-select.js +3 -0
- package/dist/vue/ds-table.js +4 -4
- package/dist/vue/ds-time-picker.d.ts +3 -0
- package/dist/vue/ds-time-picker.js +16 -0
- package/package.json +3 -3
- package/dist/angular/ds-table-filter.d.ts +0 -50
- package/dist/angular/ds-table-group.d.ts +0 -29
- package/dist/angular/ds-table-preferences.d.ts +0 -39
- package/dist/angular/ds-table-saved-views.d.ts +0 -49
- package/dist/angular/ds-table-search.d.ts +0 -20
- package/dist/angular/ds-table-sort.d.ts +0 -16
- package/dist/angular/ds-table-toolbar.d.ts +0 -12
- package/dist/components/ds-table-filter.js +0 -2
- package/dist/components/ds-table-filter.js.map +0 -1
- package/dist/components/ds-table-group.js +0 -2
- package/dist/components/ds-table-preferences.d.ts +0 -11
- package/dist/components/ds-table-preferences.js +0 -2
- package/dist/components/ds-table-preferences.js.map +0 -1
- package/dist/components/ds-table-saved-views.js +0 -2
- package/dist/components/ds-table-saved-views.js.map +0 -1
- package/dist/components/ds-table-search.js +0 -2
- package/dist/components/ds-table-search.js.map +0 -1
- package/dist/components/ds-table-sort.js +0 -2
- package/dist/components/ds-table-sort.js.map +0 -1
- package/dist/components/ds-table-toolbar.d.ts +0 -11
- package/dist/components/ds-table-toolbar.js +0 -2
- package/dist/components/ds-table-toolbar.js.map +0 -1
- package/dist/components/p-BINSI_KF.js +0 -2
- package/dist/components/p-BbfBvMRR.js +0 -2
- package/dist/components/p-BbfBvMRR.js.map +0 -1
- package/dist/components/p-C1_3CVma.js +0 -2
- package/dist/components/p-C1_3CVma.js.map +0 -1
- package/dist/components/p-CKarsuR2.js +0 -2
- package/dist/components/p-CKarsuR2.js.map +0 -1
- package/dist/components/p-Cea7rROU.js +0 -2
- package/dist/components/p-Cea7rROU.js.map +0 -1
- package/dist/components/p-Cmj04E5Q.js +0 -2
- package/dist/components/p-Cmj04E5Q.js.map +0 -1
- package/dist/components/p-Cq_Qpe_C.js +0 -2
- package/dist/components/p-Cq_Qpe_C.js.map +0 -1
- package/dist/components/p-CwqFJMvP.js +0 -2
- package/dist/components/p-D44g2Kw1.js.map +0 -1
- package/dist/components/p-DZ58Sg5a.js.map +0 -1
- package/dist/components/p-D_u8WhlU.js +0 -2
- package/dist/components/p-Dhw_W8nk.js.map +0 -1
- package/dist/components/p-FPZbS19l.js +0 -2
- package/dist/components/p-FPZbS19l.js.map +0 -1
- package/dist/components/p-KBrC9IG4.js +0 -2
- package/dist/components/p-KBrC9IG4.js.map +0 -1
- package/dist/components/p-N5SHSVo2.js +0 -2
- package/dist/components/p-QjkufCcn.js +0 -2
- package/dist/components/p-QjkufCcn.js.map +0 -1
- package/dist/components/p-UAIxh67Q.js +0 -2
- package/dist/components/p-UAIxh67Q.js.map +0 -1
- package/dist/components/p-beCz9OnD.js +0 -2
- package/dist/components/p-xHGqrz_p.js +0 -2
- package/dist/mcp-data/registry/table-group.json +0 -358
- package/dist/mcp-data/registry/table-preferences.json +0 -511
- package/dist/mcp-data/registry/table-saved-views.json +0 -431
- package/dist/mcp-data/registry/table-search.json +0 -366
- package/dist/mcp-data/registry/table-sort.json +0 -253
- package/dist/mcp-data/registry/table-toolbar.json +0 -180
- package/dist/react/ds-table-filter.d.ts +0 -18
- package/dist/react/ds-table-group.d.ts +0 -14
- package/dist/react/ds-table-preferences.d.ts +0 -21
- package/dist/react/ds-table-saved-views.d.ts +0 -17
- package/dist/react/ds-table-search.d.ts +0 -14
- package/dist/react/ds-table-sort.d.ts +0 -12
- package/dist/react/ds-table-sort.js +0 -12
- package/dist/react/ds-table-toolbar.js +0 -12
- package/dist/types/components/FilterMenu/filter-menu-calendar.d.ts +0 -13
- package/dist/types/components/TableSavedViews/index.d.ts +0 -2
- package/dist/types/components/TableSavedViews/table-saved-views-types.d.ts +0 -24
- package/dist/types/components/TableSort/table-sort-menu.d.ts +0 -15
- package/dist/vue/ds-table-toolbar.d.ts +0 -3
- package/dist/vue/ds-table-toolbar.js +0 -9
- /package/dist/components/{ds-table-group.js.map → ds-calendar.js.map} +0 -0
- /package/dist/components/{p-BQsVI_vO.js.map → p-5URekSny.js.map} +0 -0
- /package/dist/components/{p-eo_pmPqp.js.map → p-7V1AhetH.js.map} +0 -0
- /package/dist/components/{p-yZRXPHDe.js.map → p-8yBdCXCn.js.map} +0 -0
- /package/dist/components/{p-BQaO7cg_.js.map → p-BhJXmuRA.js.map} +0 -0
- /package/dist/components/{p-n68x-ZKp.js.map → p-Bm7rqs3C.js.map} +0 -0
- /package/dist/components/{p-DdspY23v.js.map → p-Bn8I7iw6.js.map} +0 -0
- /package/dist/components/{p-BnWxbhFP.js.map → p-Bpd6YCo4.js.map} +0 -0
- /package/dist/components/{p-B-9fdIWv.js.map → p-C-3YqeTb.js.map} +0 -0
- /package/dist/components/{p-umAf0fBn.js.map → p-CD4DZPy_.js.map} +0 -0
- /package/dist/components/{p-CuwopElg.js.map → p-CGidq1iC.js.map} +0 -0
- /package/dist/components/{p-CI7VfYC3.js.map → p-CUcUHwI3.js.map} +0 -0
- /package/dist/components/{p-BcdHgPi5.js.map → p-CeXf9-X3.js.map} +0 -0
- /package/dist/components/{p-CSnsz3Eb.js.map → p-CiH4GG6r.js.map} +0 -0
- /package/dist/components/{p-y06IxxoN.js.map → p-CiJ1WR11.js.map} +0 -0
- /package/dist/components/{p-BmFeeR4q.js.map → p-CqW2eyiF.js.map} +0 -0
- /package/dist/components/{p-CzbsTZt7.js.map → p-Cxr0IQjC.js.map} +0 -0
- /package/dist/components/{p-CqlBlv55.js.map → p-CzIpquvw.js.map} +0 -0
- /package/dist/components/{p-DC69DgAR.js.map → p-D0y7Sja6.js.map} +0 -0
- /package/dist/components/{p-C7CZ9pnP.js.map → p-D6Wl3dRO.js.map} +0 -0
- /package/dist/components/{p-BPhbwXOv.js.map → p-D922f6Tb.js.map} +0 -0
- /package/dist/components/{p-beRFLHbB.js.map → p-DHICPS4n.js.map} +0 -0
- /package/dist/components/{p-omPm8_vx.js.map → p-DOAybCp0.js.map} +0 -0
- /package/dist/components/{p-BnzsBNUY.js.map → p-Dn9QHL4O.js.map} +0 -0
- /package/dist/components/{p-DGzn4k4h.js.map → p-Do2FJd1y.js.map} +0 -0
- /package/dist/components/{p-DTDLlinw.js.map → p-DpoTwJAR.js.map} +0 -0
- /package/dist/components/{p-CLGtPE0K.js.map → p-DwbcNDJF.js.map} +0 -0
- /package/dist/components/{p-C8ek-1SP.js.map → p-E5W27Fu_.js.map} +0 -0
- /package/dist/components/{p-mpk_Mm8_.js.map → p-FIBCluwV.js.map} +0 -0
- /package/dist/components/{p-CE540WZ7.js.map → p-MG4lcN0D.js.map} +0 -0
- /package/dist/components/{p-DtLQIMsa.js.map → p-ZhP2tVmM.js.map} +0 -0
- /package/dist/components/{p-BPlWEidl.js.map → p-ljbw3UMZ.js.map} +0 -0
- /package/dist/components/{p-DFjIBS5B.js.map → p-xdmJCPCg.js.map} +0 -0
- /package/dist/components/{p-CAxDdYjh.js.map → p-xtGGIZmU.js.map} +0 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "input-date",
|
|
4
|
+
"title": "InputDate",
|
|
5
|
+
"description": "Form-associated calendar date field that reuses Input density, focus, validation, and field composition, with a typeable value and a Calendar picker.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/input-date",
|
|
11
|
+
"source": "src/wc/components/InputDate/InputDate.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "general",
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"summary": "Form-associated calendar date field that reuses Input density, focus, validation, and field composition, with a typeable value and a Calendar picker.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"A user must enter or edit a calendar date as an ISO date string.",
|
|
19
|
+
"The date must participate in native, Angular, React, or Vue form state.",
|
|
20
|
+
"The control should match Input geometry, typography, and field composition rather than a one-off native date input."
|
|
21
|
+
],
|
|
22
|
+
"avoidWhen": [
|
|
23
|
+
"The value is freeform text, a number, or a search query.",
|
|
24
|
+
"The value is a clock time without a calendar date.",
|
|
25
|
+
"The user chooses a predefined relative range such as last 7 days."
|
|
26
|
+
],
|
|
27
|
+
"alternatives": [
|
|
28
|
+
{
|
|
29
|
+
"when": "The value is one line of text, email, search, or an exact number.",
|
|
30
|
+
"component": "component:ds-input",
|
|
31
|
+
"reason": "Input owns those native types, adornments, search clearing, and numeric stepping."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"when": "The value is a clock time.",
|
|
35
|
+
"component": "component:ds-input-time",
|
|
36
|
+
"reason": "InputTime owns clock time form values and the TimePicker."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"when": "The user chooses a relative or bounded date range from presets.",
|
|
40
|
+
"component": "component:ds-filter-menu",
|
|
41
|
+
"reason": "FilterMenu owns relative date presets and range selection rather than a single calendar date."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"when": "The month grid is needed without a form field.",
|
|
45
|
+
"component": "component:ds-calendar",
|
|
46
|
+
"reason": "Calendar owns the shared month grid and can select a single date or a range."
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"commonlyComposedWith": [
|
|
50
|
+
"component:ds-field",
|
|
51
|
+
"component:ds-calendar",
|
|
52
|
+
"component:ds-button-unfilled",
|
|
53
|
+
"component:ds-icon",
|
|
54
|
+
"component:ds-text",
|
|
55
|
+
"component:ds-input-time"
|
|
56
|
+
],
|
|
57
|
+
"accessibility": [
|
|
58
|
+
"Provide a persistent visible label through the owning field or an external native label.",
|
|
59
|
+
"The text field remains the keyboard and assistive-technology value control. Users can type an ISO date, a numeric M/D/YYYY date, or a short-month label such as Sep 10, 2026.",
|
|
60
|
+
"The trailing calendar button is a named disclosure that opens a non-modal calendar dialog. It shares the field's density, uses the single inset recipe, and reports expanded state while the picker is open.",
|
|
61
|
+
"Filled values keep YYYY-MM-DD as the form value. Visible text uses a short-month calendar label such as Sep 10, 2026 so the field does not show ISO chrome. That label reuses Input's value typography and text-container inset.",
|
|
62
|
+
"Error text is associated with the text field and announced as an alert when the invalid state is rendered.",
|
|
63
|
+
"Read-only fields remain focusable and submittable while preventing edits; inactive or disabled fields leave the tab order and are omitted from form submission."
|
|
64
|
+
],
|
|
65
|
+
"states": [
|
|
66
|
+
"Every size applies the shared control-density recipe, including md body-medium text, across frame height, inline padding, icon zones, and radius.",
|
|
67
|
+
"The normal field boundary uses the shared secondary inset border. Focus promotes it to the thicker bold-brand inset stroke, while error uses the thicker bold-negative inset stroke without changing geometry. When hasBorder is false, supporting error copy insets to the field's text origin rather than the resting border box.",
|
|
68
|
+
"The host exposes focused, filled, dirty, touched, invalid, disabled, read-only, and required data attributes for Field integration and diagnostics.",
|
|
69
|
+
"The trailing calendar action is an unfilled icon button of the same density as the field, borderless and square, with the single inset recipe so the 4px height reduction insets it equally from the field's top, end, and bottom edges. It does not replace the field label or the submitted date value. Inactive or disabled fields apply that treatment on the host only, so the nested button is not faded a second time.",
|
|
70
|
+
"Activating the calendar button opens the shared Calendar grid in a choice-popup dialog anchored to the field's end edge, beside the trailing calendar action. Choosing a day commits that date and closes the dialog. Typing in the field commits a parsed date without requiring the picker. Invalid typed text reverts to the last committed value on blur."
|
|
71
|
+
],
|
|
72
|
+
"responsiveBehavior": [
|
|
73
|
+
"Form fields normally fill their parent; use hug width only in a compact toolbar or filter layout with an explicit width constraint.",
|
|
74
|
+
"Choose density from the containing layout: md for ordinary forms, lg for a touch-primary layout, and sm or xs only where surrounding controls use the same compact recipe.",
|
|
75
|
+
"The calendar dialog uses the shared choice-popup recipe with the same 4px sm chrome inset as choice lists, aligns to the field's end edge, flips when the field collides with the overlay boundary, and stays in the top layer."
|
|
76
|
+
],
|
|
77
|
+
"frameworkCaveats": {
|
|
78
|
+
"customElements": [
|
|
79
|
+
"Listen for dsChange for user edits. The detail is the ISO calendar date string YYYY-MM-DD.",
|
|
80
|
+
"Use the form attribute on the host when associating a date field rendered outside its owning form."
|
|
81
|
+
],
|
|
82
|
+
"react": [
|
|
83
|
+
"Use DsInputDate, bind value for controlled application state, and handle onDsChange."
|
|
84
|
+
],
|
|
85
|
+
"vue": [
|
|
86
|
+
"Use DsInputDate with v-model for the value, and listen for dsChange."
|
|
87
|
+
],
|
|
88
|
+
"angular": [
|
|
89
|
+
"Import DsInputDate with TextValueAccessor when integrating with Angular Forms."
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"references": [
|
|
93
|
+
{
|
|
94
|
+
"label": "Storybook examples",
|
|
95
|
+
"path": "src/wc/components/InputDate/InputDate.stories.ts"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"label": "Cross-browser form and accessibility coverage",
|
|
99
|
+
"path": "tests/e2e/forms.spec.ts"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"api": {
|
|
104
|
+
"props": {
|
|
105
|
+
"ariaDescribedby": {
|
|
106
|
+
"type": "string | undefined",
|
|
107
|
+
"resolvedType": "string | undefined",
|
|
108
|
+
"attribute": "aria-describedby",
|
|
109
|
+
"required": false,
|
|
110
|
+
"mutable": false
|
|
111
|
+
},
|
|
112
|
+
"ariaLabel": {
|
|
113
|
+
"type": "string | null",
|
|
114
|
+
"resolvedType": "null | string",
|
|
115
|
+
"attribute": "aria-label",
|
|
116
|
+
"default": "null",
|
|
117
|
+
"required": false,
|
|
118
|
+
"mutable": false
|
|
119
|
+
},
|
|
120
|
+
"ariaLabelledby": {
|
|
121
|
+
"type": "string | undefined",
|
|
122
|
+
"resolvedType": "string | undefined",
|
|
123
|
+
"attribute": "aria-labelledby",
|
|
124
|
+
"required": false,
|
|
125
|
+
"mutable": false
|
|
126
|
+
},
|
|
127
|
+
"autoFocus": {
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"resolvedType": "boolean",
|
|
130
|
+
"attribute": "auto-focus",
|
|
131
|
+
"default": "false",
|
|
132
|
+
"required": false,
|
|
133
|
+
"mutable": false
|
|
134
|
+
},
|
|
135
|
+
"disabled": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"resolvedType": "boolean",
|
|
138
|
+
"attribute": "disabled",
|
|
139
|
+
"default": "false",
|
|
140
|
+
"required": false,
|
|
141
|
+
"mutable": false
|
|
142
|
+
},
|
|
143
|
+
"error": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"resolvedType": "boolean",
|
|
146
|
+
"attribute": "error",
|
|
147
|
+
"default": "false",
|
|
148
|
+
"required": false,
|
|
149
|
+
"mutable": false
|
|
150
|
+
},
|
|
151
|
+
"errorMessage": {
|
|
152
|
+
"type": "string | undefined",
|
|
153
|
+
"resolvedType": "string | undefined",
|
|
154
|
+
"attribute": "error-message",
|
|
155
|
+
"required": false,
|
|
156
|
+
"mutable": false
|
|
157
|
+
},
|
|
158
|
+
"form": {
|
|
159
|
+
"type": "string | undefined",
|
|
160
|
+
"resolvedType": "string | undefined",
|
|
161
|
+
"attribute": "form",
|
|
162
|
+
"required": false,
|
|
163
|
+
"mutable": false
|
|
164
|
+
},
|
|
165
|
+
"hasBorder": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"resolvedType": "boolean",
|
|
168
|
+
"attribute": "has-border",
|
|
169
|
+
"default": "true",
|
|
170
|
+
"required": false,
|
|
171
|
+
"mutable": false
|
|
172
|
+
},
|
|
173
|
+
"hasInteractionFill": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"resolvedType": "boolean",
|
|
176
|
+
"attribute": "has-interaction-fill",
|
|
177
|
+
"default": "true",
|
|
178
|
+
"required": false,
|
|
179
|
+
"mutable": false
|
|
180
|
+
},
|
|
181
|
+
"inputId": {
|
|
182
|
+
"type": "string | undefined",
|
|
183
|
+
"resolvedType": "string | undefined",
|
|
184
|
+
"attribute": "input-id",
|
|
185
|
+
"required": false,
|
|
186
|
+
"mutable": false
|
|
187
|
+
},
|
|
188
|
+
"isInactive": {
|
|
189
|
+
"type": "boolean",
|
|
190
|
+
"resolvedType": "boolean",
|
|
191
|
+
"attribute": "is-inactive",
|
|
192
|
+
"default": "false",
|
|
193
|
+
"required": false,
|
|
194
|
+
"mutable": false
|
|
195
|
+
},
|
|
196
|
+
"max": {
|
|
197
|
+
"type": "string | undefined",
|
|
198
|
+
"resolvedType": "string | undefined",
|
|
199
|
+
"attribute": "max",
|
|
200
|
+
"required": false,
|
|
201
|
+
"mutable": false
|
|
202
|
+
},
|
|
203
|
+
"min": {
|
|
204
|
+
"type": "string | undefined",
|
|
205
|
+
"resolvedType": "string | undefined",
|
|
206
|
+
"attribute": "min",
|
|
207
|
+
"required": false,
|
|
208
|
+
"mutable": false
|
|
209
|
+
},
|
|
210
|
+
"name": {
|
|
211
|
+
"type": "string | undefined",
|
|
212
|
+
"resolvedType": "string | undefined",
|
|
213
|
+
"attribute": "name",
|
|
214
|
+
"required": false,
|
|
215
|
+
"mutable": false
|
|
216
|
+
},
|
|
217
|
+
"readOnly": {
|
|
218
|
+
"type": "boolean",
|
|
219
|
+
"resolvedType": "boolean",
|
|
220
|
+
"attribute": "read-only",
|
|
221
|
+
"default": "false",
|
|
222
|
+
"required": false,
|
|
223
|
+
"mutable": false
|
|
224
|
+
},
|
|
225
|
+
"required": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"resolvedType": "boolean",
|
|
228
|
+
"attribute": "required",
|
|
229
|
+
"default": "false",
|
|
230
|
+
"required": false,
|
|
231
|
+
"mutable": false
|
|
232
|
+
},
|
|
233
|
+
"requiredMessage": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"resolvedType": "string",
|
|
236
|
+
"attribute": "required-message",
|
|
237
|
+
"default": "'This field is required.'",
|
|
238
|
+
"required": false,
|
|
239
|
+
"mutable": false
|
|
240
|
+
},
|
|
241
|
+
"size": {
|
|
242
|
+
"type": "InputDateSize",
|
|
243
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\" | \"xs\"",
|
|
244
|
+
"attribute": "size",
|
|
245
|
+
"default": "'md'",
|
|
246
|
+
"required": false,
|
|
247
|
+
"mutable": false
|
|
248
|
+
},
|
|
249
|
+
"value": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"resolvedType": "string",
|
|
252
|
+
"attribute": "value",
|
|
253
|
+
"default": "''",
|
|
254
|
+
"required": false,
|
|
255
|
+
"mutable": true
|
|
256
|
+
},
|
|
257
|
+
"width": {
|
|
258
|
+
"type": "InputDateWidth",
|
|
259
|
+
"resolvedType": "\"fill\" | \"hug\"",
|
|
260
|
+
"attribute": "width",
|
|
261
|
+
"default": "'fill'",
|
|
262
|
+
"required": false,
|
|
263
|
+
"mutable": false
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"events": [
|
|
267
|
+
{
|
|
268
|
+
"name": "dsChange",
|
|
269
|
+
"detail": "string",
|
|
270
|
+
"bubbles": true,
|
|
271
|
+
"cancelable": true,
|
|
272
|
+
"composed": true
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"methods": [
|
|
276
|
+
{
|
|
277
|
+
"name": "setFocus",
|
|
278
|
+
"signature": "setFocus() => Promise<void>"
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"slots": []
|
|
282
|
+
},
|
|
283
|
+
"props": {
|
|
284
|
+
"ariaDescribedby": {
|
|
285
|
+
"type": "string | undefined",
|
|
286
|
+
"resolvedType": "string | undefined",
|
|
287
|
+
"attribute": "aria-describedby",
|
|
288
|
+
"required": false,
|
|
289
|
+
"mutable": false
|
|
290
|
+
},
|
|
291
|
+
"ariaLabel": {
|
|
292
|
+
"type": "string | null",
|
|
293
|
+
"resolvedType": "null | string",
|
|
294
|
+
"attribute": "aria-label",
|
|
295
|
+
"default": "null",
|
|
296
|
+
"required": false,
|
|
297
|
+
"mutable": false
|
|
298
|
+
},
|
|
299
|
+
"ariaLabelledby": {
|
|
300
|
+
"type": "string | undefined",
|
|
301
|
+
"resolvedType": "string | undefined",
|
|
302
|
+
"attribute": "aria-labelledby",
|
|
303
|
+
"required": false,
|
|
304
|
+
"mutable": false
|
|
305
|
+
},
|
|
306
|
+
"autoFocus": {
|
|
307
|
+
"type": "boolean",
|
|
308
|
+
"resolvedType": "boolean",
|
|
309
|
+
"attribute": "auto-focus",
|
|
310
|
+
"default": "false",
|
|
311
|
+
"required": false,
|
|
312
|
+
"mutable": false
|
|
313
|
+
},
|
|
314
|
+
"disabled": {
|
|
315
|
+
"type": "boolean",
|
|
316
|
+
"resolvedType": "boolean",
|
|
317
|
+
"attribute": "disabled",
|
|
318
|
+
"default": "false",
|
|
319
|
+
"required": false,
|
|
320
|
+
"mutable": false
|
|
321
|
+
},
|
|
322
|
+
"error": {
|
|
323
|
+
"type": "boolean",
|
|
324
|
+
"resolvedType": "boolean",
|
|
325
|
+
"attribute": "error",
|
|
326
|
+
"default": "false",
|
|
327
|
+
"required": false,
|
|
328
|
+
"mutable": false
|
|
329
|
+
},
|
|
330
|
+
"errorMessage": {
|
|
331
|
+
"type": "string | undefined",
|
|
332
|
+
"resolvedType": "string | undefined",
|
|
333
|
+
"attribute": "error-message",
|
|
334
|
+
"required": false,
|
|
335
|
+
"mutable": false
|
|
336
|
+
},
|
|
337
|
+
"form": {
|
|
338
|
+
"type": "string | undefined",
|
|
339
|
+
"resolvedType": "string | undefined",
|
|
340
|
+
"attribute": "form",
|
|
341
|
+
"required": false,
|
|
342
|
+
"mutable": false
|
|
343
|
+
},
|
|
344
|
+
"hasBorder": {
|
|
345
|
+
"type": "boolean",
|
|
346
|
+
"resolvedType": "boolean",
|
|
347
|
+
"attribute": "has-border",
|
|
348
|
+
"default": "true",
|
|
349
|
+
"required": false,
|
|
350
|
+
"mutable": false
|
|
351
|
+
},
|
|
352
|
+
"hasInteractionFill": {
|
|
353
|
+
"type": "boolean",
|
|
354
|
+
"resolvedType": "boolean",
|
|
355
|
+
"attribute": "has-interaction-fill",
|
|
356
|
+
"default": "true",
|
|
357
|
+
"required": false,
|
|
358
|
+
"mutable": false
|
|
359
|
+
},
|
|
360
|
+
"inputId": {
|
|
361
|
+
"type": "string | undefined",
|
|
362
|
+
"resolvedType": "string | undefined",
|
|
363
|
+
"attribute": "input-id",
|
|
364
|
+
"required": false,
|
|
365
|
+
"mutable": false
|
|
366
|
+
},
|
|
367
|
+
"isInactive": {
|
|
368
|
+
"type": "boolean",
|
|
369
|
+
"resolvedType": "boolean",
|
|
370
|
+
"attribute": "is-inactive",
|
|
371
|
+
"default": "false",
|
|
372
|
+
"required": false,
|
|
373
|
+
"mutable": false
|
|
374
|
+
},
|
|
375
|
+
"max": {
|
|
376
|
+
"type": "string | undefined",
|
|
377
|
+
"resolvedType": "string | undefined",
|
|
378
|
+
"attribute": "max",
|
|
379
|
+
"required": false,
|
|
380
|
+
"mutable": false
|
|
381
|
+
},
|
|
382
|
+
"min": {
|
|
383
|
+
"type": "string | undefined",
|
|
384
|
+
"resolvedType": "string | undefined",
|
|
385
|
+
"attribute": "min",
|
|
386
|
+
"required": false,
|
|
387
|
+
"mutable": false
|
|
388
|
+
},
|
|
389
|
+
"name": {
|
|
390
|
+
"type": "string | undefined",
|
|
391
|
+
"resolvedType": "string | undefined",
|
|
392
|
+
"attribute": "name",
|
|
393
|
+
"required": false,
|
|
394
|
+
"mutable": false
|
|
395
|
+
},
|
|
396
|
+
"readOnly": {
|
|
397
|
+
"type": "boolean",
|
|
398
|
+
"resolvedType": "boolean",
|
|
399
|
+
"attribute": "read-only",
|
|
400
|
+
"default": "false",
|
|
401
|
+
"required": false,
|
|
402
|
+
"mutable": false
|
|
403
|
+
},
|
|
404
|
+
"required": {
|
|
405
|
+
"type": "boolean",
|
|
406
|
+
"resolvedType": "boolean",
|
|
407
|
+
"attribute": "required",
|
|
408
|
+
"default": "false",
|
|
409
|
+
"required": false,
|
|
410
|
+
"mutable": false
|
|
411
|
+
},
|
|
412
|
+
"requiredMessage": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"resolvedType": "string",
|
|
415
|
+
"attribute": "required-message",
|
|
416
|
+
"default": "'This field is required.'",
|
|
417
|
+
"required": false,
|
|
418
|
+
"mutable": false
|
|
419
|
+
},
|
|
420
|
+
"size": {
|
|
421
|
+
"type": "InputDateSize",
|
|
422
|
+
"resolvedType": "\"lg\" | \"md\" | \"sm\" | \"xs\"",
|
|
423
|
+
"attribute": "size",
|
|
424
|
+
"default": "'md'",
|
|
425
|
+
"required": false,
|
|
426
|
+
"mutable": false
|
|
427
|
+
},
|
|
428
|
+
"value": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"resolvedType": "string",
|
|
431
|
+
"attribute": "value",
|
|
432
|
+
"default": "''",
|
|
433
|
+
"required": false,
|
|
434
|
+
"mutable": true
|
|
435
|
+
},
|
|
436
|
+
"width": {
|
|
437
|
+
"type": "InputDateWidth",
|
|
438
|
+
"resolvedType": "\"fill\" | \"hug\"",
|
|
439
|
+
"attribute": "width",
|
|
440
|
+
"default": "'fill'",
|
|
441
|
+
"required": false,
|
|
442
|
+
"mutable": false
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
"events": [
|
|
446
|
+
{
|
|
447
|
+
"name": "dsChange",
|
|
448
|
+
"detail": "string",
|
|
449
|
+
"bubbles": true,
|
|
450
|
+
"cancelable": true,
|
|
451
|
+
"composed": true
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"methods": [
|
|
455
|
+
{
|
|
456
|
+
"name": "setFocus",
|
|
457
|
+
"signature": "setFocus() => Promise<void>"
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"slots": [],
|
|
461
|
+
"exports": {
|
|
462
|
+
"customElement": "ds-input-date",
|
|
463
|
+
"react": "DsInputDate",
|
|
464
|
+
"vue": "DsInputDate",
|
|
465
|
+
"angular": "DsInputDate"
|
|
466
|
+
},
|
|
467
|
+
"consumption": {
|
|
468
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
469
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
470
|
+
"customElements": {
|
|
471
|
+
"import": "import '@ds-mo/ui/dist/components/ds-input-date.js';",
|
|
472
|
+
"example": "<ds-input-date></ds-input-date>"
|
|
473
|
+
},
|
|
474
|
+
"react": {
|
|
475
|
+
"import": "import { DsInputDate } from '@ds-mo/ui/react';",
|
|
476
|
+
"example": "<DsInputDate />"
|
|
477
|
+
},
|
|
478
|
+
"vue": {
|
|
479
|
+
"import": "import { DsInputDate } from '@ds-mo/ui/vue';",
|
|
480
|
+
"example": "<DsInputDate />"
|
|
481
|
+
},
|
|
482
|
+
"angular": {
|
|
483
|
+
"import": "import { DsInputDate } from '@ds-mo/ui/angular/ds-input-date';",
|
|
484
|
+
"example": "<ds-input-date></ds-input-date>"
|
|
485
|
+
},
|
|
486
|
+
"peerDependencies": {
|
|
487
|
+
"required": [
|
|
488
|
+
"@ds-mo/tokens ^6.5.1",
|
|
489
|
+
"@ds-mo/icons ^8.1.0"
|
|
490
|
+
],
|
|
491
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"dependencies": [
|
|
496
|
+
"@ds-mo/ui",
|
|
497
|
+
"@ds-mo/tokens"
|
|
498
|
+
],
|
|
499
|
+
"registryDependencies": [
|
|
500
|
+
"button-unfilled",
|
|
501
|
+
"calendar",
|
|
502
|
+
"text"
|
|
503
|
+
],
|
|
504
|
+
"files": [
|
|
505
|
+
{
|
|
506
|
+
"path": "src/wc/components/InputDate/InputDate.css",
|
|
507
|
+
"content": "@import '../../utils/datetime-input-control.css';\n@import '../../utils/choice-popup.css';\n@import '../../utils/chrome-layout.css';\n\n.input-date-popup.ds-choice-popup {\n --ds-calendar-padding: 0;\n padding: var(--dimension-space-050);\n}\n",
|
|
508
|
+
"type": "registry:ui"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"path": "src/wc/components/InputDate/InputDate.tsx",
|
|
512
|
+
"content": "import {\n AttachInternals,\n Component,\n Element,\n Prop,\n State,\n Event,\n EventEmitter,\n Listen,\n Method,\n Watch,\n h,\n Host,\n} from '@stencil/core';\nimport {\n controlWidthClass,\n CONTROL_TEXT_VARIANT,\n DEFAULT_REQUIRED_MESSAGE,\n formatIsoCalendarDateLabel,\n isIsoCalendarDate,\n parseLooseCalendarDate,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n restoreStringFormState,\n setFormControlValue,\n TOKEN_DEFAULTS,\n type ControlSize,\n type ControlWidth,\n} from '../../utils';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { AnchoredOverlayInteractionController } from '../../utils/anchored-overlay-interaction-controller';\nimport { resolveAnchoredOverlayBoundaryRect } from '../../utils/anchored-overlay-boundary';\n\nexport type InputDateSize = ControlSize;\nexport type InputDateWidth = ControlWidth;\n\nlet idCounter = 0;\n\nconst INVALID_DATE_MESSAGE = 'Enter a valid date.';\nconst DATE_BEFORE_MIN_MESSAGE = 'Date is before the minimum allowed date.';\nconst DATE_AFTER_MAX_MESSAGE = 'Date is after the maximum allowed date.';\n\n@Component({\n tag: 'ds-input-date',\n styleUrl: 'InputDate.css',\n scoped: true,\n formAssociated: true,\n})\nexport class InputDate {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n private generatedId = `ds-input-date-${++idCounter}`;\n private errorId = `${this.generatedId}-error`;\n private popupId = `${this.generatedId}-popup`;\n\n @Prop({ mutable: true }) value: string = '';\n @Prop({ reflect: true }) name: string | undefined;\n @Prop({ reflect: true }) form: string | undefined;\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n @Prop() min: string | undefined;\n @Prop() max: string | undefined;\n @Prop() size: InputDateSize = 'md';\n @Prop() width: InputDateWidth = 'fill';\n @Prop() hasBorder: boolean = true;\n @Prop() hasInteractionFill: boolean = true;\n @Prop() isInactive: boolean = false;\n @Prop() autoFocus: boolean = false;\n @Prop() error: boolean = false;\n @Prop() errorMessage: string | undefined;\n @Prop() inputId: string | undefined;\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n @Prop({ attribute: 'aria-describedby' }) ariaDescribedby: string | undefined;\n\n @Event() dsChange!: EventEmitter<string>;\n\n private initialValue = '';\n private inputEl?: HTMLInputElement;\n private controlEl?: HTMLElement;\n private calendarButton?: HTMLDsButtonUnfilledElement;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n @State() private formDisabled = false;\n @State() private focused = false;\n @State() private touched = false;\n @State() private draftText = '';\n @State() private open = false;\n @State() private shouldRender = false;\n @State() private closing = false;\n @State() private positionReady = false;\n @State() private pos = { x: 0, y: 0 };\n\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.controlEl ?? null,\n getPopup: () => this.el.querySelector<HTMLElement>('.input-date-popup'),\n getOwnerDocument: () => this.el.ownerDocument,\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const sectionInsetPx = resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n return {\n anchorRect: anchor.getBoundingClientRect(),\n popupWidth: popup.offsetWidth || this.popupFallbackWidth,\n popupHeight: popup.offsetHeight || this.popupFallbackHeight,\n side: 'bottom',\n align: 'end',\n sideOffsetPx: resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050),\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: 'end',\n alignOffsetPx: 0,\n sectionInsetPx,\n anchorAlignment: 'popup-frame',\n }),\n viewportPadPx: resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050),\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n collisionRect: resolveAnchoredOverlayBoundaryRect(anchor),\n };\n },\n apply: ({ x, y }) => {\n this.pos = { x, y };\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n observeResize: true,\n topLayer: true,\n });\n private readonly interaction = new AnchoredOverlayInteractionController({\n getAnchor: () => this.controlEl ?? null,\n getPopup: () => this.el.querySelector<HTMLElement>('.input-date-popup'),\n getOwnerDocument: () => this.el.ownerDocument,\n onOutsideActivation: () => this.closePicker(false),\n });\n\n private get popupFallbackWidth(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthXs, TOKEN_DEFAULTS.menuWidthXs);\n }\n\n private get popupFallbackHeight(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private get formInactive(): boolean {\n return this.isInactive || this.disabled || this.formDisabled;\n }\n\n private get pickerInactive(): boolean {\n return this.formInactive || this.readOnly;\n }\n\n private get hasConstraintError(): boolean {\n if (!this.value) return false;\n if (!isIsoCalendarDate(this.value)) return true;\n if (this.min && isIsoCalendarDate(this.min) && this.value < this.min) return true;\n if (this.max && isIsoCalendarDate(this.max) && this.value > this.max) return true;\n return false;\n }\n\n private get isInvalid(): boolean {\n return (\n this.error ||\n (!this.formInactive &&\n ((this.required && this.value.length === 0) || this.hasConstraintError))\n );\n }\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.syncFormValue();\n }\n\n disconnectedCallback() {\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('value')\n @Watch('required')\n @Watch('requiredMessage')\n @Watch('min')\n @Watch('max')\n syncFormValue() {\n const inactive = this.formInactive;\n setFormControlValue(this.internals, this.value, { inactive });\n const flags: ValidityStateFlags = {};\n let message = '';\n if (!inactive) {\n if (this.required && this.value.length === 0) {\n flags.valueMissing = true;\n message = this.requiredMessage;\n } else if (this.value && !isIsoCalendarDate(this.value)) {\n flags.badInput = true;\n message = INVALID_DATE_MESSAGE;\n } else if (this.value && this.min && isIsoCalendarDate(this.min) && this.value < this.min) {\n flags.rangeUnderflow = true;\n message = DATE_BEFORE_MIN_MESSAGE;\n } else if (this.value && this.max && isIsoCalendarDate(this.max) && this.value > this.max) {\n flags.rangeOverflow = true;\n message = DATE_AFTER_MAX_MESSAGE;\n }\n }\n this.internals.setValidity(flags, message);\n }\n\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('readOnly')\n onInteractionStateChange() {\n this.syncFormValue();\n if (this.pickerInactive && this.shouldRender) this.closePicker(false);\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.onInteractionStateChange();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n this.draftText = this.displayValue;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.value = restoreStringFormState(state);\n this.draftText = this.displayValue;\n }\n\n @Method()\n async setFocus() {\n this.inputEl?.focus();\n }\n\n @Listen('keydown')\n handleHostKeyDown(event: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n this.closePicker('button');\n return;\n }\n if (event.key !== 'Tab') return;\n const popup = this.el.querySelector<HTMLElement>('.input-date-popup');\n if (!popup || !event.composedPath().includes(popup)) return;\n if (!this.interaction.tabLeavesPopup(event)) return;\n event.preventDefault();\n this.closePicker(false);\n this.interaction.moveFocusAfterTab(event.shiftKey);\n }\n\n private get displayValue(): string {\n return formatIsoCalendarDateLabel(this.value);\n }\n\n private parseDraft(text: string): string | null {\n const trimmed = text.trim();\n if (!trimmed) return '';\n const iso = parseLooseCalendarDate(trimmed);\n if (!iso) return null;\n if (this.min && isIsoCalendarDate(this.min) && iso < this.min) return null;\n if (this.max && isIsoCalendarDate(this.max) && iso > this.max) return null;\n return iso;\n }\n\n private commitIso(iso: string, emit = true) {\n if (this.value !== iso) {\n this.value = iso;\n if (emit) this.dsChange.emit(iso);\n }\n this.draftText = formatIsoCalendarDateLabel(iso);\n }\n\n private teardownListeners() {\n this.position.unobserve();\n this.interaction.disconnect();\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private openPicker() {\n const inactive = this.isInactive || this.disabled || this.formDisabled || this.readOnly;\n if (inactive || this.open) return;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.open = true;\n this.teardownListeners();\n this.interaction.connect();\n this.position.observe();\n this.position.schedule();\n }\n\n private closePicker(restore: 'input' | 'button' | false) {\n if (!this.shouldRender || this.closing) return;\n this.open = false;\n this.position.cancel();\n this.closing = true;\n this.interaction.disconnect();\n this.position.unobserve();\n if (restore === 'input') this.inputEl?.focus();\n if (restore === 'button') void this.calendarButton?.setFocus();\n const duration = resolveMotionTimeMs(\n TOKEN_DEFAULTS.motionShort2,\n TOKEN_DEFAULTS.animationDurationShort3\n );\n if (duration <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => this.finishClose(), duration);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.input-date-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.closeTimer = null;\n }\n\n private togglePicker = () => {\n if (this.isInactive || this.disabled || this.formDisabled || this.readOnly) return;\n if (this.open) this.closePicker('button');\n else this.openPicker();\n };\n\n private handleInput = (event: Event) => {\n if (this.pickerInactive) return;\n this.draftText = (event.target as HTMLInputElement).value;\n const parsed = this.parseDraft(this.draftText);\n if (parsed === null) return;\n this.commitIso(parsed);\n };\n\n private handleFocus = () => {\n this.draftText = this.displayValue || this.value;\n this.focused = true;\n };\n\n private handleBlur = () => {\n this.focused = false;\n this.touched = true;\n if (this.pickerInactive) {\n this.draftText = this.displayValue;\n return;\n }\n const parsed = this.parseDraft(this.draftText);\n if (parsed === null) {\n this.draftText = this.displayValue;\n return;\n }\n this.commitIso(parsed);\n };\n\n private handleCalendarChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n if (this.pickerInactive) return;\n const parsed = this.parseDraft(event.detail);\n if (parsed === null) return;\n this.commitIso(parsed);\n this.closePicker('input');\n };\n\n render() {\n const inputId = this.inputId ?? this.generatedId;\n const inactive = this.formInactive;\n const pickerInactive = this.pickerInactive;\n const filled = this.value.length > 0;\n const dirty = this.value !== this.initialValue;\n const showError = this.error && Boolean(this.errorMessage);\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const textClass = `ds-text--${textVariant.replace('text-', '')}`;\n const describedBy =\n [this.ariaDescribedby, showError ? this.errorId : undefined].filter(Boolean).join(' ') ||\n undefined;\n const popupStyle = {\n position: 'fixed',\n left: '0',\n top: '0',\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: 'var(--dimension-z-index-floating)',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n return (\n <Host\n class={{\n 'input-host': true,\n 'ds-field-stack': true,\n 'ds-field-stack--supporting-inset': !this.hasBorder,\n 'ds-control-inactive': inactive,\n [`ds-control--${this.size}`]: true,\n ...controlWidthClass(this.width),\n }}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-invalid={this.isInvalid ? '' : undefined}\n data-filled={filled ? '' : undefined}\n data-focused={this.focused ? '' : undefined}\n data-dirty={dirty ? '' : undefined}\n data-touched={this.touched ? '' : undefined}\n >\n <div\n ref={element => {\n this.controlEl = element;\n }}\n class={{\n 'input-control': true,\n 'ds-control-frame': true,\n 'input-control--bordered': this.hasBorder,\n 'input-control--error': this.hasBorder && this.error,\n 'ds-interaction-fill': this.hasInteractionFill,\n [`ds-control--${this.size}`]: true,\n }}\n >\n <input\n ref={element => {\n this.inputEl = element;\n }}\n type=\"text\"\n id={inputId}\n value={this.focused ? this.draftText : this.displayValue}\n disabled={inactive}\n readOnly={this.readOnly}\n required={this.required}\n autoFocus={this.autoFocus}\n autoComplete=\"off\"\n spellcheck={false}\n class={{\n 'native-input': true,\n 'native-input--align-start': true,\n 'ds-control-label-box': true,\n [textClass]: true,\n 'ds-text--regular': true,\n }}\n aria-label={this.ariaLabel}\n aria-labelledby={this.ariaLabelledby}\n aria-describedby={describedBy}\n aria-invalid={this.isInvalid ? 'true' : undefined}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n <ds-button-unfilled\n ref={element => {\n this.calendarButton = element as HTMLDsButtonUnfilledElement | undefined;\n }}\n class=\"input-control__datetime-action\"\n variant=\"icon\"\n size={this.size}\n icon=\"Calendar\"\n hasBorder={false}\n isInset\n isInactive={pickerInactive}\n ariaLabel=\"Choose date\"\n haspopup=\"dialog\"\n expanded={this.open}\n surfaceOpen={this.open || this.closing}\n controls={this.open ? this.popupId : undefined}\n onDsClick={this.togglePicker}\n />\n </div>\n {this.shouldRender ? (\n <div\n id={this.popupId}\n popover=\"manual\"\n class={{\n 'input-date-popup': true,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n 'ds-chrome-column': true,\n 'ds-chrome-space--sm': true,\n }}\n style={popupStyle}\n role=\"dialog\"\n aria-label=\"Choose date\"\n >\n <ds-calendar\n selectionMode=\"single\"\n value={this.value}\n min={this.min}\n max={this.max}\n isInactive={pickerInactive}\n autoFocus\n onDsChange={this.handleCalendarChange}\n />\n </div>\n ) : null}\n {showError && (\n <ds-text\n class=\"error-text\"\n as=\"div\"\n variant=\"text-body-small\"\n color=\"negative\"\n textId={this.errorId}\n role=\"alert\"\n >\n {this.errorMessage}\n </ds-text>\n )}\n </Host>\n );\n }\n}\n",
|
|
513
|
+
"type": "registry:ui"
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
}
|