@ds-mo/ui 14.35.0 → 14.36.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 +1105 -187
- 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-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-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 +5 -0
- package/dist/angular/proxies.d.ts +5 -0
- package/dist/angular/proxies.js +5 -0
- 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-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-calendar.d.ts +11 -0
- package/dist/components/ds-calendar.js +2 -0
- package/dist/components/ds-calendar.js.map +1 -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-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-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-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-filter.js +1 -1
- package/dist/components/ds-table-filter.js.map +1 -1
- package/dist/components/ds-table-group.js +1 -1
- package/dist/components/ds-table-preferences.js +1 -1
- package/dist/components/ds-table-preferences.js.map +1 -1
- package/dist/components/ds-table-saved-views.js +1 -1
- package/dist/components/ds-table-saved-views.js.map +1 -1
- package/dist/components/ds-table-search.js +1 -1
- package/dist/components/ds-table-search.js.map +1 -1
- package/dist/components/ds-table-sort.js +1 -1
- package/dist/components/ds-table-sort.js.map +1 -1
- package/dist/components/ds-table-toolbar.js +1 -1
- package/dist/components/ds-table.js +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/{p-CI7VfYC3.js → p-2GVGhrh0.js} +2 -2
- package/dist/components/p-7O-2D29W.js +2 -0
- package/dist/components/p-7O-2D29W.js.map +1 -0
- package/dist/components/{p-CE540WZ7.js → p-8oRkhvjy.js} +2 -2
- package/dist/components/p-B27_chI7.js +2 -0
- package/dist/components/p-B27_chI7.js.map +1 -0
- package/dist/components/{p-xHGqrz_p.js → p-BOhpMUwO.js} +2 -2
- package/dist/components/{p-DdspY23v.js → p-BV5T1hzN.js} +2 -2
- package/dist/components/{p-DTDLlinw.js → p-BWfzaSc3.js} +2 -2
- package/dist/components/{p-CLGtPE0K.js → p-BgLI9JoT.js} +2 -2
- package/dist/components/{p-DGzn4k4h.js → p-C-dHtQMi.js} +2 -2
- package/dist/components/p-C0CE2v5D.js +2 -0
- package/dist/components/{p-yZRXPHDe.js → p-C2JnoaWI.js} +2 -2
- package/dist/components/{p-umAf0fBn.js → p-C4m8y9ki.js} +2 -2
- package/dist/components/{p-CAxDdYjh.js → p-CDJ2Ntcq.js} +2 -2
- package/dist/components/{p-DQQFN2sw.js → p-CMQUuGvl.js} +2 -2
- package/dist/components/{p-BQaO7cg_.js → p-CQ5RwY2C.js} +2 -2
- package/dist/components/p-CQIh2yRP.js +2 -0
- package/dist/components/{p-C1_3CVma.js.map → p-CQIh2yRP.js.map} +1 -1
- package/dist/components/{p-DEGNrPLe.js → p-CWPT3aOB.js} +2 -2
- package/dist/components/p-CWog26I_.js +2 -0
- package/dist/components/p-CWog26I_.js.map +1 -0
- package/dist/components/{p-beRFLHbB.js → p-CaNCGKEJ.js} +2 -2
- package/dist/components/p-CbSUyv5B.js +2 -0
- package/dist/components/{p-BINSI_KF.js.map → p-CbSUyv5B.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-DFjIBS5B.js → p-Ce4zy8q1.js} +2 -2
- package/dist/components/{p-BcdHgPi5.js → p-CeXf9-X3.js} +2 -2
- package/dist/components/{p-omPm8_vx.js → p-Cga6Ex0E.js} +2 -2
- package/dist/components/{p-y06IxxoN.js → p-Cl9phSf0.js} +2 -2
- package/dist/components/{p-Dk-8Ju0Q.js → p-ClJhuG5Y.js} +2 -2
- package/dist/components/{p-BmFeeR4q.js → p-CqW2eyiF.js} +2 -2
- package/dist/components/p-Cus1Sigh.js +2 -0
- package/dist/components/{p-N5SHSVo2.js.map → p-Cus1Sigh.js.map} +1 -1
- package/dist/components/{p-CzbsTZt7.js → p-Cxr0IQjC.js} +2 -2
- package/dist/components/{p-CwqFJMvP.js → p-D7yBIPB6.js} +2 -2
- package/dist/components/p-D8rpKod8.js +2 -0
- package/dist/components/p-D8rpKod8.js.map +1 -0
- package/dist/components/{p-DtLQIMsa.js → p-DBwa1OXP.js} +2 -2
- package/dist/components/{p-BQsVI_vO.js → p-DK9Ex3aY.js} +2 -2
- package/dist/components/{p-CqlBlv55.js → p-DLXXGgmf.js} +2 -2
- package/dist/components/{p-BnzsBNUY.js → p-DVd1TIxi.js} +2 -2
- package/dist/components/p-DZ58Sg5a.js.map +1 -1
- package/dist/components/{p-CZOiTaNa.js → p-DgG9W9N4.js} +2 -2
- package/dist/components/{p-mpk_Mm8_.js → p-DkfM55x8.js} +2 -2
- package/dist/components/p-DkikNSSO.js +2 -0
- package/dist/components/p-DkikNSSO.js.map +1 -0
- package/dist/components/{p-C7CZ9pnP.js → p-Dryt3COt.js} +2 -2
- package/dist/components/{p-eo_pmPqp.js → p-Ds51RgCi.js} +2 -2
- package/dist/components/p-DtkLtKY0.js +2 -0
- package/dist/components/p-DtkLtKY0.js.map +1 -0
- package/dist/components/{p-C8ek-1SP.js → p-DvzI2A_M.js} +2 -2
- package/dist/components/p-J5x-QtlD.js +2 -0
- package/dist/components/{p-beCz9OnD.js.map → p-J5x-QtlD.js.map} +1 -1
- package/dist/components/{p-CSnsz3Eb.js → p-Jaqdfw4E.js} +2 -2
- package/dist/components/p-MQ36mEgn.js +2 -0
- package/dist/components/{p-UAIxh67Q.js.map → p-MQ36mEgn.js.map} +1 -1
- package/dist/components/{p-BnWxbhFP.js → p-PmcUwTQ_.js} +2 -2
- package/dist/components/p-TjXGRPik.js +2 -0
- package/dist/components/{p-B-9fdIWv.js.map → p-TjXGRPik.js.map} +1 -1
- package/dist/components/{p-Cq_Qpe_C.js → p-bM3LH3kc.js} +2 -2
- package/dist/components/{p-BPhbwXOv.js → p-ji09W9el.js} +2 -2
- package/dist/components/{p-n68x-ZKp.js → p-neWTRxmf.js} +2 -2
- package/dist/components/{p-BPlWEidl.js → p-rYePOPbJ.js} +2 -2
- package/dist/components/{p-D44g2Kw1.js → p-su6y4hLK.js} +2 -2
- package/dist/components/p-su6y4hLK.js.map +1 -0
- package/dist/components/{p-DC69DgAR.js → p-tNQ0YulU.js} +2 -2
- package/dist/components/{p-Cwz9TPVS.js → p-x1wf38q3.js} +2 -2
- package/dist/docs/components.json +6485 -3451
- 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 +133 -0
- package/dist/lib/utils/index.js.map +4 -4
- package/dist/mcp-data/registry/bar-title.json +2 -2
- package/dist/mcp-data/registry/button-inverted.json +580 -0
- package/dist/mcp-data/registry/calendar.json +273 -0
- package/dist/mcp-data/registry/card-navigation.json +4 -2
- package/dist/mcp-data/registry/field.json +19 -14
- package/dist/mcp-data/registry/filter-menu.json +6 -10
- 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 +56 -8
- package/dist/mcp-data/registry/registry.json +1118 -185
- package/dist/mcp-data/registry/select.json +63 -7
- package/dist/mcp-data/registry/table-saved-views.json +6 -4
- package/dist/mcp-data/registry/textarea.json +2 -2
- package/dist/mcp-data/registry/time-picker.json +259 -0
- package/dist/react/components.d.ts +5 -0
- package/dist/react/components.js +5 -0
- 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-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-time-picker.d.ts +12 -0
- package/dist/react/ds-time-picker.js +12 -0
- 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/Field/Field.d.ts +7 -2
- package/dist/types/components/FilterMenu/FilterMenu.d.ts +0 -10
- 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/Select/Select.d.ts +8 -1
- package/dist/types/components/TimePicker/TimePicker.d.ts +33 -0
- package/dist/types/components.d.ts +858 -27
- package/dist/types/utils/button-render.d.ts +1 -1
- package/dist/types/utils/clock-time.d.ts +23 -0
- package/dist/types/utils/date-filter-value.d.ts +4 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/vue/components.d.ts +5 -0
- package/dist/vue/components.js +5 -0
- package/dist/vue/ds-button-inverted.d.ts +3 -0
- package/dist/vue/ds-button-inverted.js +33 -0
- package/dist/vue/ds-calendar.d.ts +3 -0
- package/dist/vue/ds-calendar.js +16 -0
- package/dist/vue/ds-input-date.d.ts +3 -0
- 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-time-picker.d.ts +3 -0
- package/dist/vue/ds-time-picker.js +16 -0
- package/package.json +1 -1
- package/dist/components/p-B-9fdIWv.js +0 -2
- 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-Cmj04E5Q.js +0 -2
- package/dist/components/p-Cmj04E5Q.js.map +0 -1
- package/dist/components/p-D44g2Kw1.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-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-beCz9OnD.js +0 -2
- package/dist/types/components/FilterMenu/filter-menu-calendar.d.ts +0 -13
- /package/dist/components/{p-CI7VfYC3.js.map → p-2GVGhrh0.js.map} +0 -0
- /package/dist/components/{p-CE540WZ7.js.map → p-8oRkhvjy.js.map} +0 -0
- /package/dist/components/{p-xHGqrz_p.js.map → p-BOhpMUwO.js.map} +0 -0
- /package/dist/components/{p-DdspY23v.js.map → p-BV5T1hzN.js.map} +0 -0
- /package/dist/components/{p-DTDLlinw.js.map → p-BWfzaSc3.js.map} +0 -0
- /package/dist/components/{p-CLGtPE0K.js.map → p-BgLI9JoT.js.map} +0 -0
- /package/dist/components/{p-DGzn4k4h.js.map → p-C-dHtQMi.js.map} +0 -0
- /package/dist/components/{p-D_u8WhlU.js.map → p-C0CE2v5D.js.map} +0 -0
- /package/dist/components/{p-yZRXPHDe.js.map → p-C2JnoaWI.js.map} +0 -0
- /package/dist/components/{p-umAf0fBn.js.map → p-C4m8y9ki.js.map} +0 -0
- /package/dist/components/{p-CAxDdYjh.js.map → p-CDJ2Ntcq.js.map} +0 -0
- /package/dist/components/{p-DQQFN2sw.js.map → p-CMQUuGvl.js.map} +0 -0
- /package/dist/components/{p-BQaO7cg_.js.map → p-CQ5RwY2C.js.map} +0 -0
- /package/dist/components/{p-DEGNrPLe.js.map → p-CWPT3aOB.js.map} +0 -0
- /package/dist/components/{p-beRFLHbB.js.map → p-CaNCGKEJ.js.map} +0 -0
- /package/dist/components/{p-DFjIBS5B.js.map → p-Ce4zy8q1.js.map} +0 -0
- /package/dist/components/{p-BcdHgPi5.js.map → p-CeXf9-X3.js.map} +0 -0
- /package/dist/components/{p-omPm8_vx.js.map → p-Cga6Ex0E.js.map} +0 -0
- /package/dist/components/{p-y06IxxoN.js.map → p-Cl9phSf0.js.map} +0 -0
- /package/dist/components/{p-Dk-8Ju0Q.js.map → p-ClJhuG5Y.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-CwqFJMvP.js.map → p-D7yBIPB6.js.map} +0 -0
- /package/dist/components/{p-DtLQIMsa.js.map → p-DBwa1OXP.js.map} +0 -0
- /package/dist/components/{p-BQsVI_vO.js.map → p-DK9Ex3aY.js.map} +0 -0
- /package/dist/components/{p-CqlBlv55.js.map → p-DLXXGgmf.js.map} +0 -0
- /package/dist/components/{p-BnzsBNUY.js.map → p-DVd1TIxi.js.map} +0 -0
- /package/dist/components/{p-CZOiTaNa.js.map → p-DgG9W9N4.js.map} +0 -0
- /package/dist/components/{p-mpk_Mm8_.js.map → p-DkfM55x8.js.map} +0 -0
- /package/dist/components/{p-C7CZ9pnP.js.map → p-Dryt3COt.js.map} +0 -0
- /package/dist/components/{p-eo_pmPqp.js.map → p-Ds51RgCi.js.map} +0 -0
- /package/dist/components/{p-C8ek-1SP.js.map → p-DvzI2A_M.js.map} +0 -0
- /package/dist/components/{p-CSnsz3Eb.js.map → p-Jaqdfw4E.js.map} +0 -0
- /package/dist/components/{p-BnWxbhFP.js.map → p-PmcUwTQ_.js.map} +0 -0
- /package/dist/components/{p-Cq_Qpe_C.js.map → p-bM3LH3kc.js.map} +0 -0
- /package/dist/components/{p-BPhbwXOv.js.map → p-ji09W9el.js.map} +0 -0
- /package/dist/components/{p-n68x-ZKp.js.map → p-neWTRxmf.js.map} +0 -0
- /package/dist/components/{p-BPlWEidl.js.map → p-rYePOPbJ.js.map} +0 -0
- /package/dist/components/{p-DC69DgAR.js.map → p-tNQ0YulU.js.map} +0 -0
- /package/dist/components/{p-Cwz9TPVS.js.map → p-x1wf38q3.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ButtonSize, type ButtonVariant } from './button-types';
|
|
2
2
|
interface ButtonContentOptions {
|
|
3
|
-
namespace: 'button-filled' | 'button-unfilled';
|
|
3
|
+
namespace: 'button-filled' | 'button-inverted' | 'button-unfilled';
|
|
4
4
|
variant: ButtonVariant;
|
|
5
5
|
size: ButtonSize;
|
|
6
6
|
label: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ClockPeriod = 'AM' | 'PM';
|
|
2
|
+
export interface ClockTimeParts {
|
|
3
|
+
hour12: number;
|
|
4
|
+
minute: number;
|
|
5
|
+
period: ClockPeriod;
|
|
6
|
+
}
|
|
7
|
+
export declare const CLOCK_HOURS: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
8
|
+
export declare const CLOCK_PERIODS: readonly ClockPeriod[];
|
|
9
|
+
export declare function isClockTime(value: string): boolean;
|
|
10
|
+
export declare function clockMinuteStep(step?: string | number): number;
|
|
11
|
+
export declare function clockMinutes(step?: number, baseMinute?: number): number[];
|
|
12
|
+
export declare function splitClockTime(value: string): ClockTimeParts | null;
|
|
13
|
+
export declare function joinClockTime(parts: ClockTimeParts): string;
|
|
14
|
+
/** Readable 12-hour label for filled clock values such as `09:00` → `9:00 AM`. */
|
|
15
|
+
export declare function formatClockTimeLabel(value: string): string;
|
|
16
|
+
/** Parse a typed clock time: `HH:MM`, `H:MM`, or a 12-hour label such as `9:00 AM`. */
|
|
17
|
+
export declare function parseLooseClockTime(value: string): string;
|
|
18
|
+
export declare function isClockTimeOutOfRange(value: string, min?: string, max?: string): boolean;
|
|
19
|
+
/** Whether a minute-precision clock value aligns to the configured native step. */
|
|
20
|
+
export declare function isClockTimeStepAligned(value: string, step?: string | number, min?: string): boolean;
|
|
21
|
+
/** Move within a finite list without wrapping past the first or last item. */
|
|
22
|
+
export declare function stepBoundedIndex(index: number, offset: number, length: number): number;
|
|
@@ -49,6 +49,10 @@ export type ParsedDateFilterValue = {
|
|
|
49
49
|
kind: 'range';
|
|
50
50
|
} & DateFilterRange);
|
|
51
51
|
export declare function isIsoCalendarDate(value: string): boolean;
|
|
52
|
+
/** Readable calendar date for filled ISO values such as `2026-09-10` → `Sep 10, 2026`. */
|
|
53
|
+
export declare function formatIsoCalendarDateLabel(value: string): string;
|
|
54
|
+
/** Parse a typed calendar date: ISO, `M/D/YYYY`, or a short-month label such as `Sep 10, 2026`. */
|
|
55
|
+
export declare function parseLooseCalendarDate(value: string): string;
|
|
52
56
|
export declare function shiftIsoCalendarDate(value: string, days: number): string;
|
|
53
57
|
export declare function dateFilterRelativeValue(preset: DateFilterRelativePreset): DateFilterRelativeValue;
|
|
54
58
|
export declare function dateFilterRangeValue(start: string, end?: string): DateFilterRangeValue;
|
|
@@ -25,5 +25,7 @@ export { CONTROL_SUPPORTING_TEXT_VARIANT, CONTROL_TEXT_VARIANT } from './control
|
|
|
25
25
|
export type { ControlInsetDepth, ControlSize } from './control-text';
|
|
26
26
|
export { choicePopupMinWidth, resolveChoicePopupAlignOffset } from './choice-popup-alignment';
|
|
27
27
|
export type { ChoicePopupAnchorAlignment } from './choice-popup-alignment';
|
|
28
|
-
export {
|
|
28
|
+
export { CLOCK_HOURS, CLOCK_PERIODS, clockMinuteStep, clockMinutes, formatClockTimeLabel, isClockTime, isClockTimeOutOfRange, isClockTimeStepAligned, joinClockTime, parseLooseClockTime, splitClockTime, stepBoundedIndex, } from './clock-time';
|
|
29
|
+
export type { ClockPeriod, ClockTimeParts } from './clock-time';
|
|
30
|
+
export { DATE_FILTER_RELATIVE_PRESETS, dateFilterRangeValue, dateFilterRelativeValue, formatIsoCalendarDateLabel, isIsoCalendarDate, parseLooseCalendarDate, normalizeDateFilterValue, parseDateFilterValue, resolveDateFilterRange, shiftIsoCalendarDate, } from './date-filter-value';
|
|
29
31
|
export type { DateFilterRange, DateFilterRangeValue, DateFilterRelativePreset, DateFilterRelativeValue, DateFilterValue, ParsedDateFilterValue, } from './date-filter-value';
|
package/dist/lib/utils/index.js
CHANGED
|
@@ -1058,6 +1058,85 @@ function choicePopupMinWidth(anchorWidth, sectionInsetPx) {
|
|
|
1058
1058
|
return anchorWidth + sectionInsetPx * 2;
|
|
1059
1059
|
}
|
|
1060
1060
|
|
|
1061
|
+
// src/wc/utils/clock-time.ts
|
|
1062
|
+
var CLOCK_HOURS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
1063
|
+
var CLOCK_PERIODS = ["AM", "PM"];
|
|
1064
|
+
var CLOCK_TIME_PATTERN = /^\d{2}:\d{2}$/;
|
|
1065
|
+
function isClockTime(value) {
|
|
1066
|
+
if (!CLOCK_TIME_PATTERN.test(value)) return false;
|
|
1067
|
+
const [hour, minute] = value.split(":").map(Number);
|
|
1068
|
+
return hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59;
|
|
1069
|
+
}
|
|
1070
|
+
function clockMinuteStep(step = 60) {
|
|
1071
|
+
const seconds = typeof step === "number" ? step : Number(step);
|
|
1072
|
+
if (!Number.isFinite(seconds) || seconds <= 0) return 1;
|
|
1073
|
+
if (seconds < 60) return 1;
|
|
1074
|
+
return Math.max(1, Math.round(seconds / 60));
|
|
1075
|
+
}
|
|
1076
|
+
function clockMinutes(step = 1, baseMinute = 0) {
|
|
1077
|
+
const stride = Number.isFinite(step) && step > 0 ? Math.floor(step) : 1;
|
|
1078
|
+
const normalizedBase = (Math.floor(baseMinute) % 60 + 60) % 60;
|
|
1079
|
+
const values = /* @__PURE__ */ new Set();
|
|
1080
|
+
for (let offset = 0; offset < 1440; offset += stride) {
|
|
1081
|
+
values.add((normalizedBase + offset) % 60);
|
|
1082
|
+
}
|
|
1083
|
+
return [...values].sort((a, b) => a - b);
|
|
1084
|
+
}
|
|
1085
|
+
function splitClockTime(value) {
|
|
1086
|
+
if (!isClockTime(value)) return null;
|
|
1087
|
+
const [hour24, minute] = value.split(":").map(Number);
|
|
1088
|
+
const period = hour24 >= 12 ? "PM" : "AM";
|
|
1089
|
+
const hour12 = hour24 % 12 === 0 ? 12 : hour24 % 12;
|
|
1090
|
+
return { hour12, minute, period };
|
|
1091
|
+
}
|
|
1092
|
+
function joinClockTime(parts) {
|
|
1093
|
+
const hour24 = parts.period === "AM" ? parts.hour12 === 12 ? 0 : parts.hour12 : parts.hour12 === 12 ? 12 : parts.hour12 + 12;
|
|
1094
|
+
return `${String(hour24).padStart(2, "0")}:${String(parts.minute).padStart(2, "0")}`;
|
|
1095
|
+
}
|
|
1096
|
+
function formatClockTimeLabel(value) {
|
|
1097
|
+
const parts = splitClockTime(value);
|
|
1098
|
+
if (!parts) return "";
|
|
1099
|
+
return `${parts.hour12}:${String(parts.minute).padStart(2, "0")} ${parts.period}`;
|
|
1100
|
+
}
|
|
1101
|
+
function parseLooseClockTime(value) {
|
|
1102
|
+
const trimmed = value.trim();
|
|
1103
|
+
if (!trimmed) return "";
|
|
1104
|
+
if (isClockTime(trimmed)) return trimmed;
|
|
1105
|
+
const twentyFour = trimmed.match(/^(\d{1,2}):(\d{2})$/);
|
|
1106
|
+
if (twentyFour) {
|
|
1107
|
+
const hour = Number(twentyFour[1]);
|
|
1108
|
+
const minute2 = Number(twentyFour[2]);
|
|
1109
|
+
if (hour > 23 || minute2 > 59) return "";
|
|
1110
|
+
return `${String(hour).padStart(2, "0")}:${twentyFour[2]}`;
|
|
1111
|
+
}
|
|
1112
|
+
const meridiem = trimmed.match(/^(\d{1,2})(?::(\d{2}))?\s*([AaPp])\.?[Mm]\.?$/);
|
|
1113
|
+
if (!meridiem) return "";
|
|
1114
|
+
const hour12 = Number(meridiem[1]);
|
|
1115
|
+
const minute = meridiem[2] ? Number(meridiem[2]) : 0;
|
|
1116
|
+
if (hour12 < 1 || hour12 > 12 || minute > 59) return "";
|
|
1117
|
+
const period = meridiem[3].toUpperCase() === "P" ? "PM" : "AM";
|
|
1118
|
+
return joinClockTime({ hour12, minute, period });
|
|
1119
|
+
}
|
|
1120
|
+
function isClockTimeOutOfRange(value, min, max) {
|
|
1121
|
+
if (!isClockTime(value)) return true;
|
|
1122
|
+
if (min && isClockTime(min) && value < min) return true;
|
|
1123
|
+
if (max && isClockTime(max) && value > max) return true;
|
|
1124
|
+
return false;
|
|
1125
|
+
}
|
|
1126
|
+
function isClockTimeStepAligned(value, step = 60, min) {
|
|
1127
|
+
if (!isClockTime(value)) return false;
|
|
1128
|
+
const valueParts = value.split(":").map(Number);
|
|
1129
|
+
const baseParts = min && isClockTime(min) ? min.split(":").map(Number) : [0, 0];
|
|
1130
|
+
const stride = clockMinuteStep(step);
|
|
1131
|
+
const valueMinutes = valueParts[0] * 60 + valueParts[1];
|
|
1132
|
+
const baseMinutes = baseParts[0] * 60 + baseParts[1];
|
|
1133
|
+
return (valueMinutes - baseMinutes) % stride === 0;
|
|
1134
|
+
}
|
|
1135
|
+
function stepBoundedIndex(index, offset, length) {
|
|
1136
|
+
if (length <= 0) return 0;
|
|
1137
|
+
return Math.min(length - 1, Math.max(0, index + offset));
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1061
1140
|
// src/wc/utils/date-filter-value.ts
|
|
1062
1141
|
var DATE_FILTER_RELATIVE_PRESETS = [
|
|
1063
1142
|
{ label: "Today", value: "today", days: 1, offset: 0 },
|
|
@@ -1069,12 +1148,52 @@ var DATE_FILTER_RELATIVE_PRESETS = [
|
|
|
1069
1148
|
{ label: "Last 90 days", value: "last-90-days", days: 90, offset: 0 }
|
|
1070
1149
|
];
|
|
1071
1150
|
var ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
1151
|
+
var ISO_CALENDAR_DATE_LABEL = new Intl.DateTimeFormat("en-US", {
|
|
1152
|
+
month: "short",
|
|
1153
|
+
day: "numeric",
|
|
1154
|
+
year: "numeric",
|
|
1155
|
+
timeZone: "UTC"
|
|
1156
|
+
});
|
|
1072
1157
|
function isIsoCalendarDate(value) {
|
|
1073
1158
|
if (!ISO_DATE_PATTERN.test(value)) return false;
|
|
1074
1159
|
const [year, month, day] = value.split("-").map(Number);
|
|
1075
1160
|
const date = new Date(Date.UTC(year, month - 1, day));
|
|
1076
1161
|
return date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day;
|
|
1077
1162
|
}
|
|
1163
|
+
function formatIsoCalendarDateLabel(value) {
|
|
1164
|
+
if (!isIsoCalendarDate(value)) return "";
|
|
1165
|
+
return ISO_CALENDAR_DATE_LABEL.format(/* @__PURE__ */ new Date(`${value}T00:00:00Z`));
|
|
1166
|
+
}
|
|
1167
|
+
var MONTH_LABELS = [
|
|
1168
|
+
"jan",
|
|
1169
|
+
"feb",
|
|
1170
|
+
"mar",
|
|
1171
|
+
"apr",
|
|
1172
|
+
"may",
|
|
1173
|
+
"jun",
|
|
1174
|
+
"jul",
|
|
1175
|
+
"aug",
|
|
1176
|
+
"sep",
|
|
1177
|
+
"oct",
|
|
1178
|
+
"nov",
|
|
1179
|
+
"dec"
|
|
1180
|
+
];
|
|
1181
|
+
function parseLooseCalendarDate(value) {
|
|
1182
|
+
const trimmed = value.trim();
|
|
1183
|
+
if (!trimmed) return "";
|
|
1184
|
+
if (isIsoCalendarDate(trimmed)) return trimmed;
|
|
1185
|
+
const numeric = trimmed.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
|
|
1186
|
+
if (numeric) {
|
|
1187
|
+
const iso2 = `${numeric[3]}-${numeric[1].padStart(2, "0")}-${numeric[2].padStart(2, "0")}`;
|
|
1188
|
+
return isIsoCalendarDate(iso2) ? iso2 : "";
|
|
1189
|
+
}
|
|
1190
|
+
const labelled = trimmed.match(/^([A-Za-z]{3})\s+(\d{1,2}),\s+(\d{4})$/);
|
|
1191
|
+
if (!labelled) return "";
|
|
1192
|
+
const monthIndex = MONTH_LABELS.indexOf(labelled[1].toLowerCase());
|
|
1193
|
+
if (monthIndex < 0) return "";
|
|
1194
|
+
const iso = `${labelled[3]}-${String(monthIndex + 1).padStart(2, "0")}-${labelled[2].padStart(2, "0")}`;
|
|
1195
|
+
return isIsoCalendarDate(iso) ? iso : "";
|
|
1196
|
+
}
|
|
1078
1197
|
function shiftIsoCalendarDate(value, days) {
|
|
1079
1198
|
if (!isIsoCalendarDate(value)) return "";
|
|
1080
1199
|
const [year, month, day] = value.split("-").map(Number);
|
|
@@ -1117,6 +1236,8 @@ function resolveDateFilterRange(value, referenceDate) {
|
|
|
1117
1236
|
return { start: shiftIsoCalendarDate(end, -(preset.days - 1)), end };
|
|
1118
1237
|
}
|
|
1119
1238
|
export {
|
|
1239
|
+
CLOCK_HOURS,
|
|
1240
|
+
CLOCK_PERIODS,
|
|
1120
1241
|
CONTROL_SUPPORTING_TEXT_VARIANT,
|
|
1121
1242
|
CONTROL_TEXT_VARIANT,
|
|
1122
1243
|
DATE_FILTER_RELATIVE_PRESETS,
|
|
@@ -1137,6 +1258,8 @@ export {
|
|
|
1137
1258
|
cell,
|
|
1138
1259
|
choicePopupMinWidth,
|
|
1139
1260
|
clearCssLengthPxCache,
|
|
1261
|
+
clockMinuteStep,
|
|
1262
|
+
clockMinutes,
|
|
1140
1263
|
computeMetricChange,
|
|
1141
1264
|
controlWidthClass,
|
|
1142
1265
|
cumulativeBins,
|
|
@@ -1145,16 +1268,24 @@ export {
|
|
|
1145
1268
|
defineChart,
|
|
1146
1269
|
densityX,
|
|
1147
1270
|
dot,
|
|
1271
|
+
formatClockTimeLabel,
|
|
1148
1272
|
formatCompactNumber,
|
|
1273
|
+
formatIsoCalendarDateLabel,
|
|
1149
1274
|
formatPercentage,
|
|
1275
|
+
isClockTime,
|
|
1276
|
+
isClockTimeOutOfRange,
|
|
1277
|
+
isClockTimeStepAligned,
|
|
1150
1278
|
isElementTruncated,
|
|
1151
1279
|
isIsoCalendarDate,
|
|
1152
1280
|
isScrollAtEdge,
|
|
1281
|
+
joinClockTime,
|
|
1153
1282
|
lineY,
|
|
1154
1283
|
normalizeDateFilterValue,
|
|
1155
1284
|
normalizeStack,
|
|
1156
1285
|
parseCssTimeMs,
|
|
1157
1286
|
parseDateFilterValue,
|
|
1287
|
+
parseLooseCalendarDate,
|
|
1288
|
+
parseLooseClockTime,
|
|
1158
1289
|
pieLayout,
|
|
1159
1290
|
polar,
|
|
1160
1291
|
prefersReducedMotion,
|
|
@@ -1184,6 +1315,8 @@ export {
|
|
|
1184
1315
|
setRepeatedFormControlValue,
|
|
1185
1316
|
setRequiredValidity,
|
|
1186
1317
|
shiftIsoCalendarDate,
|
|
1318
|
+
splitClockTime,
|
|
1319
|
+
stepBoundedIndex,
|
|
1187
1320
|
textMark,
|
|
1188
1321
|
truncateSvgTextToWidth
|
|
1189
1322
|
};
|