@redvars/peacock 4.0.0 → 4.2.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/{BaseField-CAog9TIc.js → BaseField-_unSNU5x.js} +43 -4
- package/dist/BaseField-_unSNU5x.js.map +1 -0
- package/dist/{BaseInput-CcMfg1Y2.js → BaseInput-DtZH0fPJ.js} +7 -4
- package/dist/BaseInput-DtZH0fPJ.js.map +1 -0
- package/dist/accordion.js.map +1 -1
- package/dist/ai-badge.js +32 -6
- package/dist/ai-badge.js.map +1 -1
- package/dist/ai-summary.js +2 -2
- package/dist/alert.js +2 -2
- package/dist/anchor-nav.js +2 -2
- package/dist/app-shell.js +2 -2
- package/dist/assistant-panel.js +2 -2
- package/dist/assistant-step.js +2 -2
- package/dist/assistant-steps.js +2 -2
- package/dist/avatar-group.js +2 -2
- package/dist/banner.js +2 -2
- package/dist/{base-button-Do2TUy8M.js → base-button-BJMGMcMv.js} +3 -1
- package/dist/base-button-BJMGMcMv.js.map +1 -0
- package/dist/{base-progress-BiLlZVHJ.js → base-progress-D7Nmfh1s.js} +4 -2
- package/dist/base-progress-D7Nmfh1s.js.map +1 -0
- package/dist/bottom-sheet.js +2 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/button-group.js +4 -4
- package/dist/button.js +14 -8
- package/dist/button.js.map +1 -1
- package/dist/calendar.js +2 -2
- package/dist/canvas-base-CWQ4rQ2s.js +788 -0
- package/dist/canvas-base-CWQ4rQ2s.js.map +1 -0
- package/dist/canvas-link-CtgsALq4.js +54 -0
- package/dist/canvas-link-CtgsALq4.js.map +1 -0
- package/dist/{cartesian-chart-C-f1frt0.js → cartesian-chart-CS5yRLfE.js} +3 -2
- package/dist/cartesian-chart-CS5yRLfE.js.map +1 -0
- package/dist/{cb-group-base-DeuCVx3a.js → cb-group-base-CO30uFQZ.js} +2 -2
- package/dist/{cb-group-base-DeuCVx3a.js.map → cb-group-base-CO30uFQZ.js.map} +1 -1
- package/dist/cb-group.js +3 -3
- package/dist/cb-rule.js +3 -3
- package/dist/chart-area.js +5 -4
- package/dist/chart-area.js.map +1 -1
- package/dist/chart-bar.js +5 -4
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-base-C_XKVyhf.js +833 -0
- package/dist/chart-base-C_XKVyhf.js.map +1 -0
- package/dist/chart-doughnut.js +4 -3
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-line.js +5 -4
- package/dist/chart-line.js.map +1 -1
- package/dist/chart-pie.js +4 -3
- package/dist/chart-pie.js.map +1 -1
- package/dist/chat-event.js +152 -0
- package/dist/chat-event.js.map +1 -0
- package/dist/chat-message.js +195 -19
- package/dist/chat-message.js.map +1 -1
- package/dist/chat-thread.js +26 -9
- package/dist/chat-thread.js.map +1 -1
- package/dist/checkbox-group.js +5 -5
- package/dist/checkbox.js +5 -5
- package/dist/chip-set.js +4 -4
- package/dist/chip.js +4 -4
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +6 -5
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +6 -6
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +6 -6
- package/dist/condition-builder.js +3 -3
- package/dist/confirm-dialog.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/currency-field.js +6 -6
- package/dist/custom-elements-jsdocs.json +2330 -397
- package/dist/custom-elements.json +20464 -542
- package/dist/date-field.js +7 -7
- package/dist/date-picker.js +4 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-field.js +7 -7
- package/dist/datetime-field.js +7 -7
- package/dist/dependency-map-layout-5KUueabk.js +1390 -0
- package/dist/dependency-map-layout-5KUueabk.js.map +1 -0
- package/dist/dependency-map.js +1605 -0
- package/dist/dependency-map.js.map +1 -0
- package/dist/description-item.js +2 -2
- package/dist/description-list.js +2 -2
- package/dist/diagram-Va096vj9.js +2029 -0
- package/dist/diagram-Va096vj9.js.map +1 -0
- package/dist/diagram-controls.js +345 -0
- package/dist/diagram-controls.js.map +1 -0
- package/dist/diagram-minimap.js +216 -0
- package/dist/diagram-minimap.js.map +1 -0
- package/dist/diagram.js +20 -0
- package/dist/diagram.js.map +1 -0
- package/dist/diff-viewer.js +2 -2
- package/dist/discussion-activity.js +4 -4
- package/dist/discussion-comment.js +4 -4
- package/dist/{discussion-time-BegaYfhf.js → discussion-time-DqykqvNy.js} +2 -2
- package/dist/{discussion-time-BegaYfhf.js.map → discussion-time-DqykqvNy.js.map} +1 -1
- package/dist/discussion.js +8 -8
- package/dist/{document-editor-BO7QPbO5.js → document-editor-Dc8JeFVB.js} +2 -2
- package/dist/{document-editor-BO7QPbO5.js.map → document-editor-Dc8JeFVB.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +14 -4
- package/dist/draft-card.js.map +1 -1
- package/dist/dropdown-button.js +3 -2
- package/dist/dropdown-button.js.map +1 -1
- package/dist/erd.js +2021 -0
- package/dist/erd.js.map +1 -0
- package/dist/fab.js +4 -4
- package/dist/field.js +257 -43
- package/dist/field.js.map +1 -1
- package/dist/file-upload.js +38 -16
- package/dist/file-upload.js.map +1 -1
- package/dist/filter-bar.js +2 -2
- package/dist/flow.js +27 -970
- package/dist/flow.js.map +1 -1
- package/dist/focus-ring.js +2 -0
- package/dist/focus-ring.js.map +1 -1
- package/dist/{form-associated-D3Tn33s_.js → form-associated-BHbg72PG.js} +3 -1
- package/dist/{form-associated-D3Tn33s_.js.map → form-associated-BHbg72PG.js.map} +1 -1
- package/dist/{form-submitter-DWwv6K9-.js → form-submitter-beG1CXAn.js} +7 -1
- package/dist/{form-submitter-DWwv6K9-.js.map → form-submitter-beG1CXAn.js.map} +1 -1
- package/dist/form.js +3 -3
- package/dist/{generative-view-DmtpDobn.js → generative-view-BKlcuujw.js} +13 -13
- package/dist/generative-view-BKlcuujw.js.map +1 -0
- package/dist/generative-view.js +3 -3
- package/dist/geometry-INg82Lxq.js +305 -0
- package/dist/geometry-INg82Lxq.js.map +1 -0
- package/dist/history-YbTSQZHj.js +45 -0
- package/dist/history-YbTSQZHj.js.map +1 -0
- package/dist/host-CZK7xhzh.js +40 -0
- package/dist/host-CZK7xhzh.js.map +1 -0
- package/dist/html-editor.js +6 -6
- package/dist/{hyperlink-DhE9RlVS.js → hyperlink-DycWPKwU.js} +10 -1
- package/dist/hyperlink-DycWPKwU.js.map +1 -0
- package/dist/{i18n-controller-urcQKYGe.js → i18n-controller-DJHsE1YH.js} +2 -2
- package/dist/{i18n-controller-urcQKYGe.js.map → i18n-controller-DJHsE1YH.js.map} +1 -1
- package/dist/icon-button.js +11 -9
- package/dist/icon-button.js.map +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +42 -22
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +5 -5
- package/dist/json-viewer.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/kbd.js +2 -2
- package/dist/linear-progress.js +3 -3
- package/dist/link-button.js +9 -7
- package/dist/link-button.js.map +1 -1
- package/dist/list-item.js +2 -2
- package/dist/list.js +2 -2
- package/dist/listbox.js +4 -4
- package/dist/loader-full.js +17 -16
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +51 -18
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +6 -6
- package/dist/markers-BFmh1OCz.js +46 -0
- package/dist/markers-BFmh1OCz.js.map +1 -0
- package/dist/measure-controller-Dmc5hZKg.js +89 -0
- package/dist/measure-controller-Dmc5hZKg.js.map +1 -0
- package/dist/mention-input.js +7 -6
- package/dist/mention-input.js.map +1 -1
- package/dist/menu-item.js +3 -2
- package/dist/menu-item.js.map +1 -1
- package/dist/{menu-trigger-controller-DyLpTxM7.js → menu-trigger-controller-CEJq1ugC.js} +11 -14
- package/dist/menu-trigger-controller-CEJq1ugC.js.map +1 -0
- package/dist/menu.js +2 -2
- package/dist/modal.js +2 -2
- package/dist/navigation-bar.js +2 -2
- package/dist/navigation-drawer.js +2 -2
- package/dist/navigation-rail.js +2 -2
- package/dist/notification-center.js +3 -3
- package/dist/number-field.js +7 -6
- package/dist/number-field.js.map +1 -1
- package/dist/option.js +2 -2
- package/dist/page-header.js +2 -2
- package/dist/pagination.js +2 -2
- package/dist/password-field.js +6 -6
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +6 -6
- package/dist/{picker-field-B4DtcJfL.js → picker-field-CUI05sWc.js} +3 -3
- package/dist/{picker-field-B4DtcJfL.js.map → picker-field-CUI05sWc.js.map} +1 -1
- package/dist/pin-input.js +6 -6
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +6 -6
- package/dist/radio-group.js +2 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/radio.js +6 -6
- package/dist/radio.js.map +1 -1
- package/dist/rating.js +6 -5
- package/dist/rating.js.map +1 -1
- package/dist/redvars-loader.js +2 -2
- package/dist/{relative-time-BVQXLuHm.js → relative-time-BNxqvEbg.js} +13 -2
- package/dist/relative-time-BNxqvEbg.js.map +1 -0
- package/dist/relative-time.js +3 -3
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-DLICqof1.js → rich-text-input-N_hqnXej.js} +3 -3
- package/dist/{rich-text-input-DLICqof1.js.map → rich-text-input-N_hqnXej.js.map} +1 -1
- package/dist/ripple.js +2 -0
- package/dist/ripple.js.map +1 -1
- package/dist/{schema-hMt-NRLk.js → schema-Dy0z-80u.js} +2 -2
- package/dist/{schema-hMt-NRLk.js.map → schema-Dy0z-80u.js.map} +1 -1
- package/dist/search.js +5 -5
- package/dist/segmented-button-group.js +1 -1
- package/dist/select.js +8 -8
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +6 -5
- package/dist/signature-pad.js.map +1 -1
- package/dist/slider.js +6 -5
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +109 -21
- package/dist/split-button.js.map +1 -1
- package/dist/src/__internal/ai/suggestion-controller.d.ts +2 -0
- package/dist/src/__internal/diagram/canvas-base.d.ts +105 -0
- package/dist/src/__internal/diagram/canvas-link.d.ts +21 -0
- package/dist/src/__internal/diagram/geometry.d.ts +49 -0
- package/dist/src/__internal/diagram/history.d.ts +17 -0
- package/dist/src/__internal/diagram/host.d.ts +45 -0
- package/dist/src/__internal/diagram/markers.d.ts +16 -0
- package/dist/src/__internal/diagram/measure-controller.d.ts +32 -0
- package/dist/src/__internal/diagram/motion.d.ts +22 -0
- package/dist/src/__internal/diagram/selection.d.ts +20 -0
- package/dist/src/__internal/diagram/types.d.ts +39 -0
- package/dist/src/__internal/diagram/viewport-controller.d.ts +89 -0
- package/dist/src/__internal/i18n/strings.d.ts +155 -0
- package/dist/src/__internal/menu-trigger-controller.d.ts +11 -8
- package/dist/src/__internal/toggle-base.d.ts +8 -0
- package/dist/src/__internal/utils/deprecate.d.ts +3 -3
- package/dist/src/__internal/utils/relative-time.d.ts +5 -0
- package/dist/src/accordion/accordion.d.ts +1 -0
- package/dist/src/ai-badge/ai-badge.d.ts +8 -0
- package/dist/src/button/button/button.d.ts +4 -0
- package/dist/src/chat-message/chat-message.d.ts +51 -10
- package/dist/src/chat-message/index.d.ts +1 -1
- package/dist/src/chat-thread/chat-event.d.ts +37 -0
- package/dist/src/chat-thread/chat-thread.d.ts +7 -4
- package/dist/src/chat-thread/index.d.ts +1 -0
- package/dist/src/code-editor/code-editor.d.ts +1 -0
- package/dist/src/date-picker/date-picker.d.ts +2 -0
- package/dist/src/dependency-map/dependency-map-layout.d.ts +48 -0
- package/dist/src/dependency-map/dependency-map.d.ts +241 -0
- package/dist/src/dependency-map/index.d.ts +2 -0
- package/dist/src/diagram/diagram.d.ts +300 -0
- package/dist/src/diagram/flow.d.ts +53 -0
- package/dist/src/diagram/index.d.ts +4 -0
- package/dist/src/diagram-controls/diagram-controls.d.ts +46 -0
- package/dist/src/diagram-controls/index.d.ts +1 -0
- package/dist/src/diagram-minimap/diagram-minimap.d.ts +39 -0
- package/dist/src/diagram-minimap/index.d.ts +1 -0
- package/dist/src/erd/erd-layout.d.ts +27 -0
- package/dist/src/erd/erd.d.ts +266 -0
- package/dist/src/erd/index.d.ts +2 -0
- package/dist/src/field/field.d.ts +38 -1
- package/dist/src/file-upload/file-upload.d.ts +3 -1
- package/dist/src/focus-ring/focus-ring.d.ts +2 -0
- package/dist/src/index.d.ts +17 -4
- package/dist/src/input/BaseField.d.ts +15 -1
- package/dist/src/input/BaseInput.d.ts +4 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +1 -0
- package/dist/src/number-field/number-field.d.ts +4 -0
- package/dist/src/progress/base-progress.d.ts +3 -0
- package/dist/src/radio/radio-group.d.ts +1 -0
- package/dist/src/rating/rating.d.ts +1 -0
- package/dist/src/ripple/ripple.d.ts +2 -0
- package/dist/src/signature-pad/signature-pad.d.ts +1 -0
- package/dist/src/slider/slider.d.ts +1 -0
- package/dist/src/split-button/split-button.d.ts +7 -2
- package/dist/src/switch/switch.d.ts +1 -0
- package/dist/src/tabs/tab.d.ts +2 -0
- package/dist/src/tabs/tabs.d.ts +1 -0
- package/dist/src/textarea/textarea.d.ts +3 -0
- package/dist/src/time-picker/time-picker.d.ts +2 -0
- package/dist/src/transfer-list/transfer-list.d.ts +1 -0
- package/dist/src/tree-chart/index.d.ts +2 -0
- package/dist/src/tree-chart/tree-chart-layout.d.ts +49 -0
- package/dist/src/tree-chart/tree-chart.d.ts +221 -0
- package/dist/src/workflow/index.d.ts +2 -0
- package/dist/src/workflow/workflow-format.d.ts +5 -0
- package/dist/src/workflow/workflow-model.d.ts +194 -0
- package/dist/src/workflow/workflow.d.ts +313 -0
- package/dist/src/workflow-timeline/index.d.ts +1 -0
- package/dist/src/workflow-timeline/workflow-timeline.d.ts +41 -0
- package/dist/stat.js +2 -2
- package/dist/status-indicator.js +2 -2
- package/dist/step.js +2 -2
- package/dist/stepper.js +2 -2
- package/dist/{strings-DmbqMTfs.js → strings-DnYjGbbc.js} +169 -1
- package/dist/{strings-DmbqMTfs.js.map → strings-DnYjGbbc.js.map} +1 -1
- package/dist/sub-menu.js +2 -2
- package/dist/{suggestion-controller-CW17adxd.js → suggestion-controller-7YRQqkaI.js} +3 -1
- package/dist/{suggestion-controller-CW17adxd.js.map → suggestion-controller-7YRQqkaI.js.map} +1 -1
- package/dist/svg.js +2 -2
- package/dist/switch.js +6 -5
- package/dist/switch.js.map +1 -1
- package/dist/tab.js +1 -0
- package/dist/tab.js.map +1 -1
- package/dist/table.js +50 -11
- package/dist/table.js.map +1 -1
- package/dist/tabs.js +1 -0
- package/dist/tabs.js.map +1 -1
- package/dist/test/diagram-controls.test.d.ts +1 -0
- package/dist/test/diagram-geometry.test.d.ts +1 -0
- package/dist/test/diagram.test.d.ts +1 -0
- package/dist/test/erd.test.d.ts +1 -0
- package/dist/test/toggle-label.test.d.ts +1 -0
- package/dist/test/tree-chart.test.d.ts +1 -0
- package/dist/test/workflow-debug.test.d.ts +1 -0
- package/dist/test/workflow.test.d.ts +1 -0
- package/dist/textarea.js +13 -6
- package/dist/textarea.js.map +1 -1
- package/dist/time-field.js +7 -7
- package/dist/time-picker.js +4 -2
- package/dist/time-picker.js.map +1 -1
- package/dist/timeline-item.js +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{toggle-base-BQO5pjrU.js → toggle-base-CXmFSp3b.js} +19 -3
- package/dist/toggle-base-CXmFSp3b.js.map +1 -0
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +6 -5
- package/dist/transfer-list.js.map +1 -1
- package/dist/{chart-base-B-gOg2Di.js → transform-CxeQFXXB.js} +9 -839
- package/dist/transform-CxeQFXXB.js.map +1 -0
- package/dist/tree-chart.js +1986 -0
- package/dist/tree-chart.js.map +1 -0
- package/dist/tree-item.js +2 -2
- package/dist/tree.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing-indicator.js +2 -2
- package/dist/url-field.js +6 -6
- package/dist/user-menu.js +3 -3
- package/dist/virtual-list.js +2 -2
- package/dist/workflow-format-BsyveyeC.js +34 -0
- package/dist/workflow-format-BsyveyeC.js.map +1 -0
- package/dist/workflow-model-CauduOG2.js +330 -0
- package/dist/workflow-model-CauduOG2.js.map +1 -0
- package/dist/workflow-timeline.js +354 -0
- package/dist/workflow-timeline.js.map +1 -0
- package/dist/workflow.js +3337 -0
- package/dist/workflow.js.map +1 -0
- package/dist/workspace-switcher.js +3 -3
- package/package.json +1 -1
- package/readme.md +44 -2
- package/src/LoaderUtils.ts +9 -2
- package/src/__internal/ai/suggestion-controller.ts +3 -1
- package/src/__internal/diagram/canvas-base.ts +410 -0
- package/src/__internal/diagram/canvas-link.ts +66 -0
- package/src/__internal/diagram/geometry.ts +372 -0
- package/src/__internal/diagram/history.ts +49 -0
- package/src/__internal/diagram/host.ts +76 -0
- package/src/__internal/diagram/markers.ts +56 -0
- package/src/__internal/diagram/measure-controller.ts +104 -0
- package/src/__internal/diagram/motion.ts +89 -0
- package/src/__internal/diagram/selection.ts +69 -0
- package/src/__internal/diagram/types.ts +56 -0
- package/src/__internal/diagram/viewport-controller.ts +494 -0
- package/src/__internal/i18n/strings.ts +207 -0
- package/src/__internal/menu-trigger-controller.ts +11 -15
- package/src/__internal/mixins/field.ts +3 -0
- package/src/__internal/mixins/form-associated.ts +2 -0
- package/src/__internal/mixins/form-submitter.ts +6 -0
- package/src/__internal/mixins/hyperlink.ts +10 -0
- package/src/__internal/toggle-base.ts +16 -0
- package/src/__internal/utils/deprecate.ts +5 -4
- package/src/__internal/utils/relative-time.ts +20 -0
- package/src/accordion/accordion.ts +1 -0
- package/src/ai-badge/ai-badge.scss +8 -0
- package/src/ai-badge/ai-badge.ts +21 -4
- package/src/button/base-button/base-button.ts +2 -0
- package/src/button/button/button-base.scss +9 -2
- package/src/button/button/button-layers.scss +3 -1
- package/src/button/button/button.ts +4 -0
- package/src/chat-message/chat-message.scss +72 -0
- package/src/chat-message/chat-message.ts +137 -18
- package/src/chat-message/index.ts +1 -0
- package/src/chat-thread/chat-event.scss +36 -0
- package/src/chat-thread/chat-event.ts +79 -0
- package/src/chat-thread/chat-thread.scss +4 -1
- package/src/chat-thread/chat-thread.ts +22 -6
- package/src/chat-thread/index.ts +1 -0
- package/src/code-editor/code-editor.ts +1 -0
- package/src/date-picker/date-picker.ts +2 -0
- package/src/dependency-map/dependency-map-layout.ts +505 -0
- package/src/dependency-map/dependency-map.scss +626 -0
- package/src/dependency-map/dependency-map.ts +1280 -0
- package/src/dependency-map/index.ts +16 -0
- package/src/diagram/diagram.scss +513 -0
- package/src/diagram/diagram.ts +1852 -0
- package/src/diagram/flow.ts +81 -0
- package/src/diagram/index.ts +44 -0
- package/src/diagram-controls/diagram-controls.scss +68 -0
- package/src/diagram-controls/diagram-controls.ts +255 -0
- package/src/diagram-controls/index.ts +1 -0
- package/src/diagram-minimap/diagram-minimap.scss +41 -0
- package/src/diagram-minimap/diagram-minimap.ts +149 -0
- package/src/diagram-minimap/index.ts +1 -0
- package/src/draft-card/draft-card.scss +16 -2
- package/src/dropdown-button/dropdown-button.ts +2 -1
- package/src/erd/erd-layout.ts +92 -0
- package/src/erd/erd.scss +636 -0
- package/src/erd/erd.ts +1728 -0
- package/src/erd/index.ts +17 -0
- package/src/field/field.scss +197 -23
- package/src/field/field.ts +109 -16
- package/src/file-upload/file-upload.scss +37 -10
- package/src/file-upload/file-upload.ts +3 -1
- package/src/focus-ring/focus-ring.ts +2 -0
- package/src/generative-view/catalog.generated.ts +12 -11
- package/src/index.ts +123 -3
- package/src/input/BaseField.ts +45 -2
- package/src/input/BaseInput.ts +4 -1
- package/src/loader.ts +29 -0
- package/src/mention-input/mention-input.scss +2 -0
- package/src/menu/menu-item/menu-item.ts +1 -0
- package/src/number-field/number-field.ts +4 -0
- package/src/progress/base-progress.ts +3 -0
- package/src/radio/radio-group.ts +1 -0
- package/src/radio/radio.ts +1 -1
- package/src/rating/rating.ts +1 -0
- package/src/ripple/ripple.ts +2 -0
- package/src/signature-pad/signature-pad.ts +1 -0
- package/src/slider/slider.ts +1 -0
- package/src/split-button/split-button-colors.scss +9 -0
- package/src/split-button/split-button-sizes.scss +32 -5
- package/src/split-button/split-button.scss +61 -8
- package/src/split-button/split-button.ts +15 -8
- package/src/switch/switch.ts +1 -0
- package/src/table/table.scss +57 -9
- package/src/table/table.ts +3 -1
- package/src/tabs/tab.ts +2 -0
- package/src/tabs/tabs.ts +1 -0
- package/src/textarea/textarea.scss +2 -0
- package/src/textarea/textarea.ts +8 -0
- package/src/time-picker/time-picker.ts +2 -0
- package/src/transfer-list/transfer-list.ts +1 -0
- package/src/tree-chart/index.ts +13 -0
- package/src/tree-chart/tree-chart-layout.ts +185 -0
- package/src/tree-chart/tree-chart.scss +377 -0
- package/src/tree-chart/tree-chart.ts +1170 -0
- package/src/workflow/index.ts +35 -0
- package/src/workflow/workflow-format.ts +29 -0
- package/src/workflow/workflow-model.ts +583 -0
- package/src/workflow/workflow.scss +1164 -0
- package/src/workflow/workflow.ts +2674 -0
- package/src/workflow-timeline/index.ts +1 -0
- package/src/workflow-timeline/workflow-timeline.scss +128 -0
- package/src/workflow-timeline/workflow-timeline.ts +238 -0
- package/dist/BaseField-CAog9TIc.js.map +0 -1
- package/dist/BaseInput-CcMfg1Y2.js.map +0 -1
- package/dist/base-button-Do2TUy8M.js.map +0 -1
- package/dist/base-progress-BiLlZVHJ.js.map +0 -1
- package/dist/cartesian-chart-C-f1frt0.js.map +0 -1
- package/dist/chart-base-B-gOg2Di.js.map +0 -1
- package/dist/generative-view-DmtpDobn.js.map +0 -1
- package/dist/hyperlink-DhE9RlVS.js.map +0 -1
- package/dist/menu-trigger-controller-DyLpTxM7.js.map +0 -1
- package/dist/relative-time-BVQXLuHm.js.map +0 -1
- package/dist/src/flow/flow.d.ts +0 -178
- package/dist/src/flow/index.d.ts +0 -2
- package/dist/toggle-base-BQO5pjrU.js.map +0 -1
- package/src/button/button-group/readme.md +0 -23
- package/src/flow/flow.scss +0 -215
- package/src/flow/flow.ts +0 -958
- package/src/flow/index.ts +0 -10
- /package/dist/test/{flow.test.d.ts → dependency-map.test.d.ts} +0 -0
|
@@ -904,6 +904,207 @@ export const defaultStrings = {
|
|
|
904
904
|
/** Label of a confirm dialog's type-to-confirm field, for example "Type acme-prod to confirm". */
|
|
905
905
|
typeToConfirm: (text: string): string => `Type ${text} to confirm`,
|
|
906
906
|
|
|
907
|
+
// ── Diagrams (flow, workflow, tree chart, ERD, dependency map) ──────────
|
|
908
|
+
/** Default accessible name of a diagram canvas. */
|
|
909
|
+
diagramLabel: 'Diagram',
|
|
910
|
+
/** Read with a diagram canvas, from `aria-describedby`. */
|
|
911
|
+
diagramInstructions:
|
|
912
|
+
'Drag the canvas or use the arrow keys to pan. Hold Ctrl or Command and scroll to zoom. Shift+1 fits all content, Home goes back to the start.',
|
|
913
|
+
diagramZoomIn: 'Zoom in',
|
|
914
|
+
diagramZoomOut: 'Zoom out',
|
|
915
|
+
diagramFit: 'Fit to content',
|
|
916
|
+
diagramZoomToSelection: 'Zoom to selection',
|
|
917
|
+
diagramBackToStart: 'Back to start',
|
|
918
|
+
diagramBackToContent: 'Back to content',
|
|
919
|
+
/** Accessible name of the zoom level button, for example "Zoom level, 80%". */
|
|
920
|
+
diagramZoomLevel: (percent: string): string => `Zoom level, ${percent}`,
|
|
921
|
+
diagramUndo: 'Undo',
|
|
922
|
+
diagramRedo: 'Redo',
|
|
923
|
+
diagramControls: 'Diagram controls',
|
|
924
|
+
diagramMinimap: 'Minimap',
|
|
925
|
+
/** Role description of a diagram node, read by screen readers instead of "group". */
|
|
926
|
+
diagramNode: 'node',
|
|
927
|
+
/** Accessible name of a connection, for example "Connection from Start to Review: approve". */
|
|
928
|
+
diagramEdgeLabel: (from: string, to: string, label?: string): string =>
|
|
929
|
+
`Connection from ${from} to ${to}${label ? `: ${label}` : ''}`,
|
|
930
|
+
/** Announced after a node moves, for example "Review moved to 120, 40". */
|
|
931
|
+
diagramMoved: (label: string, x: string, y: string): string =>
|
|
932
|
+
`${label} moved to ${x}, ${y}`,
|
|
933
|
+
/** Announced after a connection is made. */
|
|
934
|
+
diagramConnected: (from: string, to: string): string =>
|
|
935
|
+
`Connected ${from} to ${to}`,
|
|
936
|
+
/** Announced after nodes and connections are deleted. */
|
|
937
|
+
diagramDeleted: (count: number): string =>
|
|
938
|
+
count === 1 ? '1 item deleted' : `${count} items deleted`,
|
|
939
|
+
/** Announced after pasting, for example "3 items pasted". */
|
|
940
|
+
diagramPasted: (count: number): string =>
|
|
941
|
+
count === 1 ? '1 item pasted' : `${count} items pasted`,
|
|
942
|
+
|
|
943
|
+
// ── Workflow ─────────────────────────────────────────────────────────────
|
|
944
|
+
workflowLabel: 'Workflow',
|
|
945
|
+
workflowAddStep: 'Add step',
|
|
946
|
+
workflowAddTrigger: 'Add a trigger',
|
|
947
|
+
workflowSearchSteps: 'Search steps',
|
|
948
|
+
workflowNoSteps: 'No matching steps',
|
|
949
|
+
workflowOnError: 'On error',
|
|
950
|
+
workflowWaitForAll: 'Wait for all',
|
|
951
|
+
workflowEnd: 'End',
|
|
952
|
+
workflowMoreActions: 'More actions',
|
|
953
|
+
workflowDuplicate: 'Duplicate',
|
|
954
|
+
workflowDelete: 'Delete',
|
|
955
|
+
workflowCollapse: 'Collapse',
|
|
956
|
+
workflowExpand: 'Expand',
|
|
957
|
+
workflowOutputs: 'Outputs',
|
|
958
|
+
workflowTools: 'Tools',
|
|
959
|
+
workflowUntil: 'Until',
|
|
960
|
+
/** Summary of a collapsed branch or loop, for example "3 paths, 7 steps". */
|
|
961
|
+
workflowCollapsedSummary: (paths: number, steps: number): string =>
|
|
962
|
+
`${paths === 1 ? '1 path' : `${paths} paths`}, ${steps === 1 ? '1 step' : `${steps} steps`}`,
|
|
963
|
+
/** Label of the problems button, for example "2 problems". */
|
|
964
|
+
workflowProblems: (count: number): string =>
|
|
965
|
+
count === 1 ? '1 problem' : `${count} problems`,
|
|
966
|
+
workflowUnreachable: 'This step never runs: the path before it ends.',
|
|
967
|
+
workflowLoopForEach: 'For each',
|
|
968
|
+
workflowLoopWhile: 'While',
|
|
969
|
+
workflowLoopUntil: 'Repeat until',
|
|
970
|
+
/** Announced after a step is added, for example "Send email added". */
|
|
971
|
+
workflowStepAdded: (name: string): string => `${name} added`,
|
|
972
|
+
workflowStepRemoved: (name: string): string => `${name} removed`,
|
|
973
|
+
workflowStepMoved: (name: string): string => `${name} moved`,
|
|
974
|
+
/** Accessible name of an add-step button, for example "Add step after Look up manager". */
|
|
975
|
+
workflowAddStepAfter: (name: string): string => `Add step after ${name}`,
|
|
976
|
+
workflowAddStepIn: (name: string): string => `Add step in ${name}`,
|
|
977
|
+
|
|
978
|
+
// ── Tree chart ───────────────────────────────────────────────────────────
|
|
979
|
+
treeChartLabel: 'Tree chart',
|
|
980
|
+
treeChartLoading: 'Loading',
|
|
981
|
+
treeChartAddChild: 'Add below',
|
|
982
|
+
treeChartAddSibling: 'Add beside',
|
|
983
|
+
treeChartNewItem: 'New item',
|
|
984
|
+
/** Accessible name of the count chip, for example "Expand Elena Rostova, 4 below". */
|
|
985
|
+
treeChartExpand: (name: string, count: number): string =>
|
|
986
|
+
count ? `Expand ${name}, ${count} below` : `Expand ${name}`,
|
|
987
|
+
treeChartCollapse: (name: string): string => `Collapse ${name}`,
|
|
988
|
+
/** Announced after a drag, for example "Ana Ruiz moved under Elena Rostova". */
|
|
989
|
+
treeChartMoved: (name: string, parent: string): string =>
|
|
990
|
+
parent ? `${name} moved under ${parent}` : `${name} moved to the top`,
|
|
991
|
+
treeChartRemoved: (name: string): string => `${name} removed`,
|
|
992
|
+
/** Announced after a search, for example "3 matches". */
|
|
993
|
+
treeChartMatches: (count: number): string =>
|
|
994
|
+
count === 1 ? '1 match' : `${count} matches`,
|
|
995
|
+
|
|
996
|
+
// ── Dependency map ───────────────────────────────────────────────────────
|
|
997
|
+
dependencyMapLabel: 'Dependency map',
|
|
998
|
+
dependencyMapLegend: 'Legend',
|
|
999
|
+
dependencyMapHealthy: 'Healthy',
|
|
1000
|
+
dependencyMapDegraded: 'Degraded',
|
|
1001
|
+
dependencyMapDown: 'Down',
|
|
1002
|
+
dependencyMapUnknown: 'Unknown',
|
|
1003
|
+
dependencyMapImpact: 'Impact path',
|
|
1004
|
+
dependencyMapTraffic: 'Width = traffic',
|
|
1005
|
+
dependencyMapShowType: (type: string): string => `Show ${type}`,
|
|
1006
|
+
/** A collapsed group's subtitle, for example "8 items". */
|
|
1007
|
+
dependencyMapGroupCount: (count: number): string =>
|
|
1008
|
+
count === 1 ? '1 item' : `${count} items`,
|
|
1009
|
+
/** Label of an aggregated edge between collapsed groups, for example "12 connections". */
|
|
1010
|
+
dependencyMapEdgeCount: (count: number): string =>
|
|
1011
|
+
count === 1 ? '1 connection' : `${count} connections`,
|
|
1012
|
+
dependencyMapExpandGroup: (name: string): string => `Expand ${name}`,
|
|
1013
|
+
dependencyMapCollapseGroup: (name: string): string => `Collapse ${name}`,
|
|
1014
|
+
/** Accessible name of a node, for example "payments-db, PostgreSQL, degraded, 3 upstream, 0 downstream". */
|
|
1015
|
+
dependencyMapNode: (
|
|
1016
|
+
name: string,
|
|
1017
|
+
type: string,
|
|
1018
|
+
status: string,
|
|
1019
|
+
upstream: number,
|
|
1020
|
+
downstream: number,
|
|
1021
|
+
): string =>
|
|
1022
|
+
`${name}${type ? `, ${type}` : ''}${status ? `, ${status}` : ''}, ${upstream} upstream, ${downstream} downstream`,
|
|
1023
|
+
dependencyMapRps: (value: string): string => `${value} req/s`,
|
|
1024
|
+
dependencyMapLatency: (value: string): string => `p95 ${value}`,
|
|
1025
|
+
dependencyMapErrors: (value: string): string => `${value} errors`,
|
|
1026
|
+
|
|
1027
|
+
// ── Entity-relationship diagram ──────────────────────────────────────────
|
|
1028
|
+
erdLabel: 'Entity-relationship diagram',
|
|
1029
|
+
erdPrimaryKey: 'Primary key',
|
|
1030
|
+
erdForeignKey: 'Foreign key',
|
|
1031
|
+
erdNullable: 'Nullable',
|
|
1032
|
+
erdAddColumn: 'Add column',
|
|
1033
|
+
erdRemoveColumn: (name: string): string => `Remove ${name}`,
|
|
1034
|
+
erdTogglePrimaryKey: (name: string): string =>
|
|
1035
|
+
`Toggle primary key on ${name}`,
|
|
1036
|
+
erdCollapse: (name: string): string => `Collapse ${name}`,
|
|
1037
|
+
erdExpand: (name: string): string => `Expand ${name}`,
|
|
1038
|
+
erdRename: 'Rename',
|
|
1039
|
+
erdNewColumn: 'new_column',
|
|
1040
|
+
erdNewEntity: 'new_table',
|
|
1041
|
+
erdCardinality: 'Relationship',
|
|
1042
|
+
erdManyToOne: 'Many to one',
|
|
1043
|
+
erdZeroOrManyToOne: 'Zero or many to one',
|
|
1044
|
+
erdOneToOne: 'One to one',
|
|
1045
|
+
erdZeroOrOneToOne: 'Zero or one to one',
|
|
1046
|
+
erdManyToMany: 'Many to many',
|
|
1047
|
+
/** Summary of a column count, for example "8 columns". */
|
|
1048
|
+
erdColumnCount: (count: number): string =>
|
|
1049
|
+
count === 1 ? '1 column' : `${count} columns`,
|
|
1050
|
+
/** Accessible name of an entity, for example "orders, 8 columns, references customers, referenced by order_items". */
|
|
1051
|
+
erdEntity: (
|
|
1052
|
+
name: string,
|
|
1053
|
+
columns: number,
|
|
1054
|
+
references: string[],
|
|
1055
|
+
referencedBy: string[],
|
|
1056
|
+
): string =>
|
|
1057
|
+
[
|
|
1058
|
+
name,
|
|
1059
|
+
columns === 1 ? '1 column' : `${columns} columns`,
|
|
1060
|
+
references.length ? `references ${references.join(', ')}` : '',
|
|
1061
|
+
referencedBy.length ? `referenced by ${referencedBy.join(', ')}` : '',
|
|
1062
|
+
]
|
|
1063
|
+
.filter(Boolean)
|
|
1064
|
+
.join(', '),
|
|
1065
|
+
/** Announced after a relation is added, for example "orders.customer_id references customers.id". */
|
|
1066
|
+
erdConnected: (from: string, to: string): string =>
|
|
1067
|
+
`${from} references ${to}`,
|
|
1068
|
+
|
|
1069
|
+
// ── Workflow debugging ───────────────────────────────────────────────────
|
|
1070
|
+
workflowDebugBar: 'Debugging',
|
|
1071
|
+
workflowContinue: 'Continue',
|
|
1072
|
+
workflowPause: 'Pause',
|
|
1073
|
+
workflowStepOver: 'Step over',
|
|
1074
|
+
workflowStepInto: 'Step into',
|
|
1075
|
+
workflowRestart: 'Restart',
|
|
1076
|
+
workflowStop: 'Stop',
|
|
1077
|
+
workflowRetryFromHere: 'Retry from here',
|
|
1078
|
+
workflowBreakpoint: 'Breakpoint',
|
|
1079
|
+
workflowToggleBreakpoint: 'Toggle breakpoint',
|
|
1080
|
+
workflowPinData: 'Pin data',
|
|
1081
|
+
workflowUnpinData: 'Unpin data',
|
|
1082
|
+
workflowPinned: 'Data pinned',
|
|
1083
|
+
workflowPreviousIteration: 'Previous iteration',
|
|
1084
|
+
workflowNextIteration: 'Next iteration',
|
|
1085
|
+
/** Iteration picker label, for example "Iteration 3 of 12". */
|
|
1086
|
+
workflowIteration: (index: number, total: number): string =>
|
|
1087
|
+
`Iteration ${index} of ${total}`,
|
|
1088
|
+
/** Short iteration label, for example "3 / 12". */
|
|
1089
|
+
workflowIterationShort: (index: number, total: number): string =>
|
|
1090
|
+
`${index} / ${total}`,
|
|
1091
|
+
workflowRunTimeline: 'Run timeline',
|
|
1092
|
+
/** Status of a step or run, shown on cards and read by screen readers. */
|
|
1093
|
+
workflowStatusQueued: 'Queued',
|
|
1094
|
+
workflowStatusRunning: 'Running',
|
|
1095
|
+
workflowStatusWaiting: 'Waiting',
|
|
1096
|
+
workflowStatusPaused: 'Paused',
|
|
1097
|
+
workflowStatusSuccess: 'Succeeded',
|
|
1098
|
+
workflowStatusFailed: 'Failed',
|
|
1099
|
+
workflowStatusSkipped: 'Skipped',
|
|
1100
|
+
workflowStatusCanceled: 'Canceled',
|
|
1101
|
+
/** Summary of a run, for example "Run 184, Failed, 2 h 15 min". */
|
|
1102
|
+
workflowRunSummary: (id: string, status: string, duration: string): string =>
|
|
1103
|
+
duration ? `Run ${id} · ${status} · ${duration}` : `Run ${id} · ${status}`,
|
|
1104
|
+
/** Announced when the run moves, for example "Send email succeeded". */
|
|
1105
|
+
workflowStepStatus: (name: string, status: string): string =>
|
|
1106
|
+
`${name}: ${status.toLowerCase()}`,
|
|
1107
|
+
|
|
907
1108
|
// ── AI (ADR-030002) ──────────────────────────────────────────────────────
|
|
908
1109
|
/** Label of an AI badge on a value the person hasn't accepted yet. */
|
|
909
1110
|
aiSuggested: 'Suggested',
|
|
@@ -974,6 +1175,12 @@ export const defaultStrings = {
|
|
|
974
1175
|
/** Who wrote a message, read before it. */
|
|
975
1176
|
chatYou: 'You',
|
|
976
1177
|
chatAssistant: 'Assistant',
|
|
1178
|
+
/** Who wrote a message from another person, when it has no `author`. */
|
|
1179
|
+
chatParticipant: 'Participant',
|
|
1180
|
+
/** Where a message came from, for example "via Teams". */
|
|
1181
|
+
chatVia: (channel: string): string => `via ${channel}`,
|
|
1182
|
+
/** Accessible name of the quick replies under a message. */
|
|
1183
|
+
chatQuickReplies: 'Suggested replies',
|
|
977
1184
|
chatCopy: 'Copy',
|
|
978
1185
|
chatRegenerate: 'Try again',
|
|
979
1186
|
chatGoodAnswer: 'Good answer',
|
|
@@ -17,17 +17,22 @@ export interface MenuTriggerOptions {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The menu wiring shared by buttons that open a `wc-menu` (dropdown button, split button):
|
|
20
|
-
* show / close / toggle, Arrow Up / Down on the trigger, the trigger's
|
|
21
|
-
* `aria-expanded
|
|
20
|
+
* show / close / toggle, Arrow Up / Down on the trigger, the open state behind the trigger's
|
|
21
|
+
* `aria-expanded`, and the host's `open` / `close` events (ADR-030001).
|
|
22
22
|
*
|
|
23
23
|
* The menu's own `open` / `close` events are stopped inside the host, which fires its own `open`
|
|
24
|
-
* and `close` instead; `close` carries `detail.reason` from the menu's close event. The host
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* and `close` instead; `close` carries `detail.reason` from the menu's close event. The host
|
|
25
|
+
* renders the menu with `id=${trigger.menuId}`, `@open=${trigger.handleMenuOpen}` and
|
|
26
|
+
* `@close=${trigger.handleMenuClose}`, and the trigger button with `aria-haspopup="menu"`,
|
|
27
|
+
* `aria-expanded=${String(trigger.open)}`, `@click=${trigger.handleTriggerClick}` and
|
|
27
28
|
* `@keydown=${trigger.handleTriggerKeyDown}`.
|
|
29
|
+
*
|
|
30
|
+
* Add `aria-controls=${trigger.menuId}` only when the trigger is a native `<button>` in the same
|
|
31
|
+
* shadow root as the menu. A `wc-button` or `wc-icon-button` renders its `<button>` in its own
|
|
32
|
+
* shadow root, where an ID reference to the menu cannot resolve, so leave `aria-controls` off it.
|
|
28
33
|
*/
|
|
29
34
|
export class MenuTriggerController {
|
|
30
|
-
/** Id for the menu,
|
|
35
|
+
/** Id for the menu, for the `aria-controls` of a native trigger in the same shadow root. */
|
|
31
36
|
readonly menuId: string;
|
|
32
37
|
|
|
33
38
|
private readonly host: ReactiveControllerHost & HTMLElement;
|
|
@@ -50,15 +55,6 @@ export class MenuTriggerController {
|
|
|
50
55
|
return this._open;
|
|
51
56
|
}
|
|
52
57
|
|
|
53
|
-
/** ARIA for the trigger button. */
|
|
54
|
-
get triggerAria(): Record<string, string> {
|
|
55
|
-
return {
|
|
56
|
-
'aria-haspopup': 'menu',
|
|
57
|
-
'aria-expanded': String(this._open),
|
|
58
|
-
'aria-controls': this.menuId,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
58
|
/** Opens the menu, anchored to the host, and focuses its first (or last) item. */
|
|
63
59
|
show(focusTarget: MenuFocusTarget = 'first') {
|
|
64
60
|
const menu = this.options.menu();
|
|
@@ -61,6 +61,7 @@ export function mixinField<T extends BaseInputConstructor>(
|
|
|
61
61
|
/** Label shown above the field; also the control's accessible name. */
|
|
62
62
|
@property({ type: String }) label = '';
|
|
63
63
|
|
|
64
|
+
/** Hint shown inside the empty control. */
|
|
64
65
|
@property({ type: String }) placeholder = '';
|
|
65
66
|
|
|
66
67
|
/** Help text shown below the field. */
|
|
@@ -69,11 +70,13 @@ export function mixinField<T extends BaseInputConstructor>(
|
|
|
69
70
|
/** Shows the field in its error state with `error-text`. */
|
|
70
71
|
@property({ type: Boolean }) error = false;
|
|
71
72
|
|
|
73
|
+
/** Error message shown below the field while `error` is set; replaces the help text. */
|
|
72
74
|
@property({ type: String, attribute: 'error-text' }) errorText = '';
|
|
73
75
|
|
|
74
76
|
/** Shows the field in its warning state with `warning-text`. */
|
|
75
77
|
@property({ type: Boolean }) warning = false;
|
|
76
78
|
|
|
79
|
+
/** Warning message shown below the field while `warning` is set; replaces the help text. */
|
|
77
80
|
@property({ type: String, attribute: 'warning-text' }) warningText = '';
|
|
78
81
|
|
|
79
82
|
/** Visual variant of the field. */
|
|
@@ -196,6 +196,7 @@ export function mixinFormAssociated<
|
|
|
196
196
|
// We don't use Lit's default getter/setter (`noAccessor: true`) because
|
|
197
197
|
// the attributes need to be updated synchronously to work with synchronous
|
|
198
198
|
// form APIs, and Lit updates attributes async by default.
|
|
199
|
+
/** The name the value is submitted under in a form. */
|
|
199
200
|
@property({ noAccessor: true })
|
|
200
201
|
get name() {
|
|
201
202
|
return this.getAttribute('name') ?? '';
|
|
@@ -207,6 +208,7 @@ export function mixinFormAssociated<
|
|
|
207
208
|
// in `attributeChangedCallback()`.
|
|
208
209
|
}
|
|
209
210
|
|
|
211
|
+
/** Disables the control: it can't be focused or changed, and its value isn't submitted. */
|
|
210
212
|
@property({ type: Boolean, noAccessor: true })
|
|
211
213
|
get disabled() {
|
|
212
214
|
return this.hasAttribute('disabled');
|
|
@@ -68,11 +68,17 @@ export function mixinFormSubmitter<
|
|
|
68
68
|
T extends MixinBase<LitElement & WithElementInternals>,
|
|
69
69
|
>(base: T): MixinReturn<T, FormSubmitter> {
|
|
70
70
|
abstract class FormSubmitterElement extends base implements FormSubmitter {
|
|
71
|
+
/**
|
|
72
|
+
* What activating the element does in a form: `"submit"` (default) submits it, `"reset"`
|
|
73
|
+
* resets it and `"button"` does nothing.
|
|
74
|
+
*/
|
|
71
75
|
@property() type = 'submit';
|
|
72
76
|
|
|
77
|
+
/** The value sent with the form, paired with `name`, when this element submits it. */
|
|
73
78
|
@property({ reflect: true }) value = '';
|
|
74
79
|
|
|
75
80
|
// Name attribute must reflect synchronously for form integration.
|
|
81
|
+
/** The name sent with the form, paired with `value`, when this element submits it. */
|
|
76
82
|
get name() {
|
|
77
83
|
return this.getAttribute('name') ?? '';
|
|
78
84
|
}
|
|
@@ -50,13 +50,23 @@ export function mixinHyperlink<T extends MixinBase<LitElement>>(
|
|
|
50
50
|
base: T,
|
|
51
51
|
): MixinReturn<T, Hyperlink> {
|
|
52
52
|
abstract class HyperlinkElement extends base implements Hyperlink {
|
|
53
|
+
/** The URL to link to. When set, the component renders as an `<a>` element. */
|
|
53
54
|
@property() href?: string;
|
|
54
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Where to open the linked URL: `"_self"` (default), `"_blank"`, `"_parent"`, `"_top"` or a
|
|
58
|
+
* frame name. Pair `"_blank"` with `rel="noopener noreferrer"`.
|
|
59
|
+
*/
|
|
55
60
|
@property() target: '_self' | '_parent' | '_blank' | '_top' | string =
|
|
56
61
|
'_self';
|
|
57
62
|
|
|
63
|
+
/** The relationship of the linked URL to the current page, as the native `rel` attribute. */
|
|
58
64
|
@property() rel = '';
|
|
59
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Downloads the linked URL instead of navigating to it; the value is the suggested file
|
|
68
|
+
* name. Only applies with `href`.
|
|
69
|
+
*/
|
|
60
70
|
@property() download = '';
|
|
61
71
|
|
|
62
72
|
// Mixins must have a constructor with `...args: any[]`
|
|
@@ -94,12 +94,14 @@ export default abstract class ToggleBase extends BaseInput {
|
|
|
94
94
|
this.controlTabIndex = this.getAttribute('tabindex') ?? undefined;
|
|
95
95
|
this.removeAttribute('tabindex');
|
|
96
96
|
}
|
|
97
|
+
this.addEventListener('click', this.hostClick);
|
|
97
98
|
window.addEventListener('mouseup', this.windowMouseUp);
|
|
98
99
|
window.addEventListener('keyup', this.windowKeyUp);
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
override disconnectedCallback() {
|
|
102
103
|
super.disconnectedCallback();
|
|
104
|
+
this.removeEventListener('click', this.hostClick);
|
|
103
105
|
window.removeEventListener('mouseup', this.windowMouseUp);
|
|
104
106
|
window.removeEventListener('keyup', this.windowKeyUp);
|
|
105
107
|
}
|
|
@@ -247,6 +249,20 @@ export default abstract class ToggleBase extends BaseInput {
|
|
|
247
249
|
|
|
248
250
|
// ── Private ──────────────────────────────────────────────────────────────
|
|
249
251
|
|
|
252
|
+
/**
|
|
253
|
+
* A click aimed at the host itself, not at something inside it, comes from an external
|
|
254
|
+
* `<label for>`, a wrapping `<label>` or `host.click()`. Forward it to the inner native input, the
|
|
255
|
+
* control the shadow `<label>` activates, so it toggles like a click on the control. Clicks from
|
|
256
|
+
* inside (the control, the shadow label or slotted label content) start elsewhere and are left
|
|
257
|
+
* alone, so a click toggles once.
|
|
258
|
+
*/
|
|
259
|
+
private hostClick = (event: MouseEvent) => {
|
|
260
|
+
if (event.composedPath()[0] !== this) return;
|
|
261
|
+
this.renderRoot
|
|
262
|
+
.querySelector<HTMLInputElement>('.input-native')
|
|
263
|
+
?.click();
|
|
264
|
+
};
|
|
265
|
+
|
|
250
266
|
private windowMouseUp = () => {
|
|
251
267
|
if (this.isActive) this.isActive = false;
|
|
252
268
|
};
|
|
@@ -3,8 +3,8 @@ const warned = new Set<string>();
|
|
|
3
3
|
/**
|
|
4
4
|
* Logs a deprecation warning once per page for each distinct message.
|
|
5
5
|
*
|
|
6
|
-
* Renamed or removed APIs keep working
|
|
7
|
-
* migrate (ADR-030001). Pass the component tag, the old API and its replacement.
|
|
6
|
+
* Renamed or removed APIs keep working until the next major version and call this so consumers
|
|
7
|
+
* see what to migrate (ADR-030001). Pass the component tag, the old API and its replacement.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* deprecate('wc-example', '`old-name`', '`new-name`');
|
|
@@ -13,10 +13,11 @@ export function deprecate(
|
|
|
13
13
|
tag: string,
|
|
14
14
|
oldApi: string,
|
|
15
15
|
replacement?: string,
|
|
16
|
+
removedIn = '5.0',
|
|
16
17
|
): void {
|
|
17
18
|
const message = replacement
|
|
18
|
-
? `[peacock] ${tag}: ${oldApi} is deprecated and will be removed in
|
|
19
|
-
: `[peacock] ${tag}: ${oldApi} is deprecated and will be removed in
|
|
19
|
+
? `[peacock] ${tag}: ${oldApi} is deprecated and will be removed in ${removedIn}. Use ${replacement} instead.`
|
|
20
|
+
: `[peacock] ${tag}: ${oldApi} is deprecated and will be removed in ${removedIn}.`;
|
|
20
21
|
if (warned.has(message)) return;
|
|
21
22
|
warned.add(message);
|
|
22
23
|
// eslint-disable-next-line no-console
|
|
@@ -149,6 +149,26 @@ export function formatAbsoluteDate(
|
|
|
149
149
|
).format(time);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* `date` as a clock time in `locale` ("9:41 AM"), with the date before it when it is not today
|
|
154
|
+
* ("Nov 2, 9:41 AM"), for timestamps in a conversation.
|
|
155
|
+
*/
|
|
156
|
+
export function formatClockTime(
|
|
157
|
+
date: Date | number,
|
|
158
|
+
locale: string,
|
|
159
|
+
now: number = Date.now(),
|
|
160
|
+
): string {
|
|
161
|
+
const time = toTime(date);
|
|
162
|
+
const sameDay =
|
|
163
|
+
new Date(time).toDateString() === new Date(now).toDateString();
|
|
164
|
+
return dateFormat(
|
|
165
|
+
locale,
|
|
166
|
+
sameDay
|
|
167
|
+
? { hour: 'numeric', minute: '2-digit' }
|
|
168
|
+
: { month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' },
|
|
169
|
+
).format(time);
|
|
170
|
+
}
|
|
171
|
+
|
|
152
172
|
/**
|
|
153
173
|
* `date` relative to now ("5 minutes ago"), or, when `absoluteAfter` is set and the date is
|
|
154
174
|
* farther from now than that, an absolute date ("Nov 2").
|
|
@@ -48,6 +48,14 @@
|
|
|
48
48
|
padding-inline-end: var(--spacing-025, 0.125rem);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
:host([icon-only]) .badge {
|
|
52
|
+
padding-inline-start: var(--spacing-050, 0.25rem);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([icon-only]:not([dismissible])) .badge {
|
|
56
|
+
padding-inline-end: var(--spacing-050, 0.25rem);
|
|
57
|
+
}
|
|
58
|
+
|
|
51
59
|
.label {
|
|
52
60
|
display: inline-flex;
|
|
53
61
|
align-items: center;
|
package/src/ai-badge/ai-badge.ts
CHANGED
|
@@ -31,6 +31,9 @@ export type AiBadgeKind = 'suggested' | 'draft' | 'generated';
|
|
|
31
31
|
* and is read as the badge's description. <code>dismissible</code> adds a clear button that fires
|
|
32
32
|
* <code>dismiss</code>; the app then removes the suggestion, discards the draft or hides the
|
|
33
33
|
* summary.</p>
|
|
34
|
+
* <p><code>icon-only</code> keeps just the sparkle where there is no room for the label, such as a
|
|
35
|
+
* narrow field: the label is still read and shows in the tooltip. Fields switch to it on their
|
|
36
|
+
* own when they are narrow.</p>
|
|
34
37
|
* <p>When AI is off for the page (<code>setPeacockAi({ enabled: false })</code>) the badge renders
|
|
35
38
|
* nothing, so a page that still passes AI state in never shows a stale marker.</p>
|
|
36
39
|
* <p>The label is always text, never only the color or the sparkle. Replace it with the default
|
|
@@ -74,6 +77,13 @@ export class AiBadge extends LitElement {
|
|
|
74
77
|
/** Adds a button that clears the output in one action. */
|
|
75
78
|
@property({ type: Boolean, reflect: true }) dismissible = false;
|
|
76
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Shows only the sparkle, for tight spaces such as a narrow field. The label stays the
|
|
82
|
+
* accessible name and shows in the tooltip.
|
|
83
|
+
*/
|
|
84
|
+
@property({ type: Boolean, reflect: true, attribute: 'icon-only' })
|
|
85
|
+
iconOnly = false;
|
|
86
|
+
|
|
77
87
|
/** Per-instance string overrides. */
|
|
78
88
|
@property({ attribute: false }) strings?: Partial<PeacockStrings>;
|
|
79
89
|
|
|
@@ -109,10 +119,17 @@ export class AiBadge extends LitElement {
|
|
|
109
119
|
render() {
|
|
110
120
|
if (!this._ai.available) return nothing;
|
|
111
121
|
const reason = this.reason.trim();
|
|
122
|
+
const { iconOnly } = this;
|
|
123
|
+
// Icon-only, the tooltip says what the sparkle stands for, then why.
|
|
124
|
+
const tooltip = iconOnly
|
|
125
|
+
? [this._label(), reason].filter(Boolean).join('. ')
|
|
126
|
+
: reason;
|
|
112
127
|
// The tooltip sits outside the badge so it doesn't inherit the badge's one-line label styles.
|
|
113
128
|
return html`<span class="badge" part="badge"
|
|
114
|
-
><span class="label" id="label" tabindex=${
|
|
115
|
-
>${sparkle}<
|
|
129
|
+
><span class="label" id="label" tabindex=${tooltip ? 0 : nothing}
|
|
130
|
+
>${sparkle}<span class=${iconOnly ? 'screen-reader-only' : 'text'}
|
|
131
|
+
><slot>${this._label()}</slot></span
|
|
132
|
+
></span
|
|
116
133
|
>${this.dismissible
|
|
117
134
|
? html`<button
|
|
118
135
|
class="dismiss"
|
|
@@ -124,9 +141,9 @@ export class AiBadge extends LitElement {
|
|
|
124
141
|
<wc-icon name="close"></wc-icon>
|
|
125
142
|
</button>`
|
|
126
143
|
: nothing}</span
|
|
127
|
-
>${
|
|
144
|
+
>${tooltip
|
|
128
145
|
? html`<wc-tooltip for="label" placement="bottom-start"
|
|
129
|
-
>${
|
|
146
|
+
>${tooltip}</wc-tooltip
|
|
130
147
|
>`
|
|
131
148
|
: nothing}`;
|
|
132
149
|
}
|
|
@@ -36,9 +36,11 @@ export function mixinBaseButton<
|
|
|
36
36
|
T extends MixinBase<LitElement & WithElementInternals>,
|
|
37
37
|
>(base: T): MixinReturn<T, BaseButton> {
|
|
38
38
|
abstract class BaseButtonElement extends base implements BaseButton {
|
|
39
|
+
/** The visual style of the button, such as `"filled"`, `"tonal"`, `"outlined"` or `"text"`. */
|
|
39
40
|
@property({ type: String, reflect: true })
|
|
40
41
|
variant: string = '';
|
|
41
42
|
|
|
43
|
+
/** The color role of the button, such as `"primary"`, `"surface"` or `"danger"`. */
|
|
42
44
|
@property({ type: String, reflect: true })
|
|
43
45
|
color: string = '';
|
|
44
46
|
|
|
@@ -48,8 +48,15 @@
|
|
|
48
48
|
align-items: center;
|
|
49
49
|
justify-content: center;
|
|
50
50
|
height: var(--button-height);
|
|
51
|
-
padding: 0
|
|
52
|
-
|
|
51
|
+
padding-block: 0;
|
|
52
|
+
padding-inline-start: var(
|
|
53
|
+
--button-container-padding-start,
|
|
54
|
+
var(--button-container-padding, var(--_button-container-padding))
|
|
55
|
+
);
|
|
56
|
+
padding-inline-end: var(
|
|
57
|
+
--button-container-padding-end,
|
|
58
|
+
var(--button-container-padding, var(--_button-container-padding))
|
|
59
|
+
);
|
|
53
60
|
width: 100%;
|
|
54
61
|
|
|
55
62
|
.label {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
// Mixin for the shared transition logic
|
|
4
4
|
@mixin button-transition {
|
|
5
|
-
transition-property:
|
|
5
|
+
transition-property:
|
|
6
|
+
inset, width, height, transform, opacity, border-start-start-radius,
|
|
7
|
+
border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
6
8
|
transition-duration: 200ms;
|
|
7
9
|
transition-timing-function: var(--easing-standard);
|
|
8
10
|
will-change: inset, transform, opacity;
|
|
@@ -50,6 +50,10 @@ export type {
|
|
|
50
50
|
* @cssprop --button-container-shape-end-start - Defines the start position of the button container shape.
|
|
51
51
|
* @cssprop --button-container-shape-end-end - Defines the end position of the button container shape.
|
|
52
52
|
*
|
|
53
|
+
* @cssprop --button-container-padding - Inline padding of the button container, on both sides.
|
|
54
|
+
* @cssprop --button-container-padding-start - Inline-start padding of the button container; overrides `--button-container-padding`.
|
|
55
|
+
* @cssprop --button-container-padding-end - Inline-end padding of the button container; overrides `--button-container-padding`.
|
|
56
|
+
*
|
|
53
57
|
*
|
|
54
58
|
* @cssprop --filled-button-container-color - Color of the filled button container.
|
|
55
59
|
* @cssprop --filled-button-label-text-color - Text color of the filled button label.
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
* @prop --chat-message-bubble-color: Text color of the person's bubble
|
|
15
15
|
*/
|
|
16
16
|
--chat-message-bubble-color: var(--color-on-secondary-container);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @prop --chat-message-participant-background: Background of a participant's bubble
|
|
20
|
+
*/
|
|
21
|
+
--chat-message-participant-background: var(--color-surface-container-high);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @prop --chat-message-participant-color: Text color of a participant's bubble
|
|
25
|
+
*/
|
|
26
|
+
--chat-message-participant-color: var(--color-on-surface);
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
.message {
|
|
@@ -57,6 +67,68 @@
|
|
|
57
67
|
var(--shape-corner-large) var(--shape-corner-extra-small);
|
|
58
68
|
}
|
|
59
69
|
|
|
70
|
+
// A participant's bubble starts the line, so its square corner is at the start.
|
|
71
|
+
.participant .bubble {
|
|
72
|
+
color: var(--chat-message-participant-color);
|
|
73
|
+
background: var(--chat-message-participant-background);
|
|
74
|
+
border-radius: var(--shape-corner-extra-small) var(--shape-corner-large)
|
|
75
|
+
var(--shape-corner-large) var(--shape-corner-large);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host(:dir(rtl)) .participant .bubble {
|
|
79
|
+
border-radius: var(--shape-corner-large) var(--shape-corner-extra-small)
|
|
80
|
+
var(--shape-corner-large) var(--shape-corner-large);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.header {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-wrap: wrap;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: var(--spacing-050, 0.25rem) var(--spacing-100, 0.5rem);
|
|
88
|
+
min-block-size: 1.25rem;
|
|
89
|
+
color: var(--color-on-surface-variant);
|
|
90
|
+
@include mixin.get-typography-not-important(label-medium);
|
|
91
|
+
|
|
92
|
+
&[hidden] {
|
|
93
|
+
display: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.user .header {
|
|
98
|
+
justify-content: flex-end;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// The gap after the header is the body's; pull the bubble closer to its own name.
|
|
102
|
+
.header:not([hidden]) + slot + .bubble,
|
|
103
|
+
.header:not([hidden]) + slot + .content {
|
|
104
|
+
margin-block-start: calc(-1 * var(--spacing-100, 0.5rem));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.author {
|
|
108
|
+
color: var(--color-on-surface);
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.channel::before,
|
|
113
|
+
.time::before {
|
|
114
|
+
margin-inline-end: var(--spacing-100, 0.5rem);
|
|
115
|
+
content: '·';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
::slotted([slot='meta']) {
|
|
119
|
+
flex: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.suggestions {
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-wrap: wrap;
|
|
125
|
+
gap: var(--spacing-100, 0.5rem);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.user .suggestions {
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
}
|
|
131
|
+
|
|
60
132
|
.content {
|
|
61
133
|
min-inline-size: 0;
|
|
62
134
|
}
|