@redvars/peacock 4.0.0 → 4.1.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-BMumJpkW.js} +6 -3
- package/dist/BaseField-BMumJpkW.js.map +1 -0
- package/dist/{BaseInput-CcMfg1Y2.js → BaseInput-mWdyYv27.js} +6 -3
- package/dist/BaseInput-mWdyYv27.js.map +1 -0
- package/dist/accordion.js.map +1 -1
- package/dist/ai-badge.js +2 -2
- 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-CvLVSjuy.js} +4 -2
- package/dist/base-progress-CvLVSjuy.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 +3 -3
- package/dist/calendar.js +2 -2
- package/dist/canvas-base-BTQMEVn_.js +788 -0
- package/dist/canvas-base-BTQMEVn_.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-DM1FC_XT.js} +3 -2
- package/dist/cartesian-chart-DM1FC_XT.js.map +1 -0
- package/dist/{cb-group-base-DeuCVx3a.js → cb-group-base-B6fa4Lll.js} +2 -2
- package/dist/{cb-group-base-DeuCVx3a.js.map → cb-group-base-B6fa4Lll.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-Dhxuw_Mw.js +833 -0
- package/dist/chart-base-Dhxuw_Mw.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-message.js +2 -2
- package/dist/chat-thread.js +2 -2
- package/dist/checkbox-group.js +4 -4
- package/dist/checkbox.js +4 -4
- package/dist/chip-set.js +3 -3
- package/dist/chip.js +4 -4
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +5 -4
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +5 -5
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +5 -5
- 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 +5 -5
- package/dist/custom-elements-jsdocs.json +2115 -336
- package/dist/custom-elements.json +19483 -615
- package/dist/date-field.js +6 -6
- package/dist/date-picker.js +4 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-field.js +6 -6
- package/dist/datetime-field.js +6 -6
- 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-2r11KySs.js +2029 -0
- package/dist/diagram-2r11KySs.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 +2 -2
- package/dist/discussion-comment.js +2 -2
- package/dist/discussion.js +5 -5
- package/dist/{document-editor-BO7QPbO5.js → document-editor-BnEugM3E.js} +2 -2
- package/dist/{document-editor-BO7QPbO5.js.map → document-editor-BnEugM3E.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +2 -2
- 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 +37 -15
- 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 +2 -2
- package/dist/{generative-view-DmtpDobn.js → generative-view-BgOcLRXr.js} +13 -13
- package/dist/generative-view-BgOcLRXr.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 +5 -5
- 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-Cp43HjJl.js} +2 -2
- package/dist/{i18n-controller-urcQKYGe.js.map → i18n-controller-Cp43HjJl.js.map} +1 -1
- package/dist/icon-button.js +4 -4
- package/dist/image.js +2 -2
- package/dist/index.js +37 -18
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +4 -4
- 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 +2 -2
- package/dist/list-item.js +2 -2
- package/dist/list.js +2 -2
- package/dist/listbox.js +3 -3
- package/dist/loader-full.js +13 -13
- package/dist/loader.js +44 -15
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +5 -5
- 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 +6 -5
- 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.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 +2 -2
- package/dist/number-field.js +6 -5
- 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 +5 -5
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +5 -5
- package/dist/{picker-field-B4DtcJfL.js → picker-field-dTlIMAQn.js} +3 -3
- package/dist/{picker-field-B4DtcJfL.js.map → picker-field-dTlIMAQn.js.map} +1 -1
- package/dist/pin-input.js +5 -5
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +5 -5
- package/dist/radio-group.js +1 -0
- package/dist/radio-group.js.map +1 -1
- package/dist/radio.js +5 -5
- package/dist/radio.js.map +1 -1
- package/dist/rating.js +5 -4
- package/dist/rating.js.map +1 -1
- package/dist/redvars-loader.js +2 -2
- package/dist/relative-time.js +2 -2
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-DLICqof1.js → rich-text-input-DM_BOzgk.js} +3 -3
- package/dist/{rich-text-input-DLICqof1.js.map → rich-text-input-DM_BOzgk.js.map} +1 -1
- package/dist/ripple.js +2 -0
- package/dist/ripple.js.map +1 -1
- package/dist/{schema-hMt-NRLk.js → schema-B8g30A_n.js} +2 -2
- package/dist/{schema-hMt-NRLk.js.map → schema-B8g30A_n.js.map} +1 -1
- package/dist/search.js +4 -4
- package/dist/segmented-button-group.js +1 -1
- package/dist/select.js +7 -7
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +5 -4
- package/dist/signature-pad.js.map +1 -1
- package/dist/slider.js +5 -4
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +2 -2
- 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 +149 -0
- package/dist/src/__internal/toggle-base.d.ts +8 -0
- package/dist/src/__internal/utils/deprecate.d.ts +3 -3
- package/dist/src/accordion/accordion.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 +15 -2
- package/dist/src/input/BaseField.d.ts +3 -0
- package/dist/src/input/BaseInput.d.ts +3 -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/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 +1 -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-BJPuhKJk.js} +163 -1
- package/dist/{strings-DmbqMTfs.js.map → strings-BJPuhKJk.js.map} +1 -1
- package/dist/sub-menu.js +2 -2
- package/dist/svg.js +2 -2
- package/dist/switch.js +5 -4
- package/dist/switch.js.map +1 -1
- package/dist/tab.js +1 -0
- package/dist/tab.js.map +1 -1
- package/dist/table.js +2 -2
- 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 +7 -5
- package/dist/textarea.js.map +1 -1
- package/dist/time-field.js +6 -6
- 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-BlaHalfS.js} +19 -3
- package/dist/toggle-base-BlaHalfS.js.map +1 -0
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +5 -4
- 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 +5 -5
- package/dist/user-menu.js +2 -2
- 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 +2 -2
- package/package.json +1 -1
- package/readme.md +44 -2
- package/src/LoaderUtils.ts +9 -2
- 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 +201 -0
- 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/accordion/accordion.ts +1 -0
- package/src/button/base-button/base-button.ts +2 -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/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 +121 -2
- package/src/input/BaseField.ts +3 -0
- package/src/input/BaseInput.ts +3 -0
- package/src/loader.ts +25 -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/switch/switch.ts +1 -0
- 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 +1 -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/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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Diagram controls
|
|
4
|
+
* @tag wc-diagram-controls
|
|
5
|
+
* @rawTag diagram-controls
|
|
6
|
+
* @summary Zoom, fit, back-to-start and undo buttons for a diagram canvas such as `wc-diagram`.
|
|
7
|
+
*
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>Put it in a canvas's <code>controls</code> slot, or anywhere on the page with <code>for</code> set
|
|
10
|
+
* to the canvas's id. It shows zoom out, the zoom level, zoom in, fit to content and back to start;
|
|
11
|
+
* undo and redo join them when the canvas is <code>editable</code>. The zoom level opens a menu with
|
|
12
|
+
* 50%, 100%, 200%, fit, zoom to selection and back to start.</p>
|
|
13
|
+
* <p>It is a <code>toolbar</code>: Tab reaches it once and the arrow keys move between its buttons.</p>
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <wc-diagram style="height: 400px">
|
|
18
|
+
* <wc-diagram-controls slot="controls"></wc-diagram-controls>
|
|
19
|
+
* </wc-diagram>
|
|
20
|
+
* ```
|
|
21
|
+
* @tags data
|
|
22
|
+
*/
|
|
23
|
+
export declare class DiagramControls extends LitElement {
|
|
24
|
+
static styles: import("lit").CSSResultGroup[];
|
|
25
|
+
/** Id of the canvas to control, when the controls are not inside it. */
|
|
26
|
+
for: string;
|
|
27
|
+
/** Lays the buttons out in a row or a column. */
|
|
28
|
+
orientation: 'horizontal' | 'vertical';
|
|
29
|
+
/** Leaves out undo and redo even when the canvas is editable. */
|
|
30
|
+
hideHistory: boolean;
|
|
31
|
+
private _zoom;
|
|
32
|
+
private _canUndo;
|
|
33
|
+
private _canRedo;
|
|
34
|
+
private _editable;
|
|
35
|
+
private readonly _menu?;
|
|
36
|
+
private readonly _zoomButton?;
|
|
37
|
+
private readonly i18n;
|
|
38
|
+
private readonly roving;
|
|
39
|
+
private readonly link;
|
|
40
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
41
|
+
private sync;
|
|
42
|
+
private percent;
|
|
43
|
+
private openMenu;
|
|
44
|
+
private onMenuActivate;
|
|
45
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DiagramControls } from './diagram-controls.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Diagram minimap
|
|
4
|
+
* @tag wc-diagram-minimap
|
|
5
|
+
* @rawTag diagram-minimap
|
|
6
|
+
* @summary A small overview of a diagram canvas that shows where the view is and moves it.
|
|
7
|
+
*
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>Put it in a canvas's <code>minimap</code> slot, or anywhere with <code>for</code> set to the
|
|
10
|
+
* canvas's id. It draws every node as a box and the part of the canvas in view as a rectangle,
|
|
11
|
+
* wherever the view has wandered. Click to fly there, or drag to move the view.</p>
|
|
12
|
+
* <p>The minimap is a pointer shortcut; keyboard users pan the canvas itself with the arrow keys.</p>
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <wc-diagram style="height: 400px">
|
|
17
|
+
* <wc-diagram-minimap slot="minimap"></wc-diagram-minimap>
|
|
18
|
+
* </wc-diagram>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @cssprop --diagram-minimap-width - Width. Defaults to 200px.
|
|
22
|
+
* @cssprop --diagram-minimap-height - Height. Defaults to 132px.
|
|
23
|
+
* @tags data
|
|
24
|
+
*/
|
|
25
|
+
export declare class DiagramMinimap extends LitElement {
|
|
26
|
+
static styles: import("lit").CSSResultGroup[];
|
|
27
|
+
/** Id of the canvas to show, when the minimap is not inside it. */
|
|
28
|
+
for: string;
|
|
29
|
+
private _overview?;
|
|
30
|
+
private readonly i18n;
|
|
31
|
+
private readonly link;
|
|
32
|
+
private drag?;
|
|
33
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
34
|
+
private toCanvas;
|
|
35
|
+
private onPointerDown;
|
|
36
|
+
private onPointerMove;
|
|
37
|
+
private onPointerUp;
|
|
38
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DiagramMinimap } from './diagram-minimap.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DiagramPoint } from '../__internal/diagram/types.js';
|
|
2
|
+
export interface ErdLayoutEntity {
|
|
3
|
+
id: string;
|
|
4
|
+
height: number;
|
|
5
|
+
/** A fixed top-left corner (set by the app or by dragging). */
|
|
6
|
+
pinned?: DiagramPoint;
|
|
7
|
+
}
|
|
8
|
+
export interface ErdLayoutRelation {
|
|
9
|
+
/** The entity holding the foreign key. */
|
|
10
|
+
source: string;
|
|
11
|
+
/** The entity it references. */
|
|
12
|
+
target: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ErdLayoutOptions {
|
|
15
|
+
width: number;
|
|
16
|
+
/** Space between columns. */
|
|
17
|
+
columnGap?: number;
|
|
18
|
+
/** Space between entities in a column. */
|
|
19
|
+
rowGap?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Places entities in columns, referenced tables to the left of the tables that reference them,
|
|
23
|
+
* ordered to keep relations short. Columns are stacked with each entity's real height and centred
|
|
24
|
+
* on one line. Entities with no relations go in a grid after the last column. Returns top-left
|
|
25
|
+
* corners.
|
|
26
|
+
*/
|
|
27
|
+
export declare function layoutEntities(entities: ErdLayoutEntity[], relations: ErdLayoutRelation[], options: ErdLayoutOptions): Map<string, DiagramPoint>;
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { type PropertyValues } from 'lit';
|
|
2
|
+
import { DiagramCanvasElement } from '../__internal/diagram/canvas-base.js';
|
|
3
|
+
import type { DiagramOverview } from '../__internal/diagram/host.js';
|
|
4
|
+
import type { DiagramPoint, DiagramRect, DiagramViewportDetail } from '../__internal/diagram/types.js';
|
|
5
|
+
/** Crow's-foot cardinality at one end of a relation. */
|
|
6
|
+
export type ErdCardinality = 'one' | 'zero-or-one' | 'many' | 'one-or-many' | 'zero-or-many';
|
|
7
|
+
export type ErdAccent = 'primary' | 'tertiary' | 'blue' | 'green' | 'orange' | 'purple' | 'red' | 'yellow' | 'neutral';
|
|
8
|
+
export interface ErdColumn {
|
|
9
|
+
name: string;
|
|
10
|
+
/** The data type, for example `uuid` or `varchar(120)`. */
|
|
11
|
+
type?: string;
|
|
12
|
+
/** Part of the primary key. */
|
|
13
|
+
pk?: boolean;
|
|
14
|
+
nullable?: boolean;
|
|
15
|
+
unique?: boolean;
|
|
16
|
+
/** Shown as the row's tooltip. */
|
|
17
|
+
comment?: string;
|
|
18
|
+
}
|
|
19
|
+
/** A table, view or other entity. */
|
|
20
|
+
export interface ErdEntity {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
/** Shown before the name, and what the `schema` filter matches. */
|
|
24
|
+
schema?: string;
|
|
25
|
+
/** Material Symbols name for the header tile. Defaults to `table`. */
|
|
26
|
+
icon?: string;
|
|
27
|
+
accent?: ErdAccent;
|
|
28
|
+
columns: ErdColumn[];
|
|
29
|
+
/** Starts collapsed to its header. */
|
|
30
|
+
collapsed?: boolean;
|
|
31
|
+
/** A fixed top-left corner, in canvas pixels. Entities without one are laid out automatically. */
|
|
32
|
+
position?: DiagramPoint;
|
|
33
|
+
comment?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A reference from `source` (the entity holding the foreign key) to `target` (the entity it
|
|
37
|
+
* references). With column names the line joins those rows; without, the headers.
|
|
38
|
+
*/
|
|
39
|
+
export interface ErdRelation {
|
|
40
|
+
id: string;
|
|
41
|
+
source: string;
|
|
42
|
+
sourceColumn?: string;
|
|
43
|
+
target: string;
|
|
44
|
+
targetColumn?: string;
|
|
45
|
+
/** How many `source` rows point at one `target` row. Defaults to `many`. */
|
|
46
|
+
sourceCardinality?: ErdCardinality;
|
|
47
|
+
/** How many `target` rows one `source` row points at. Defaults to `one`. */
|
|
48
|
+
targetCardinality?: ErdCardinality;
|
|
49
|
+
label?: string;
|
|
50
|
+
}
|
|
51
|
+
export type ErdChangeReason = 'move' | 'rename' | 'entity-add' | 'column-add' | 'column-remove' | 'column-update' | 'connect' | 'cardinality' | 'delete' | 'undo' | 'redo';
|
|
52
|
+
/** Detail of `select`. */
|
|
53
|
+
export interface ErdSelectDetail {
|
|
54
|
+
id: string;
|
|
55
|
+
kind: 'entity' | 'relation';
|
|
56
|
+
entity?: ErdEntity;
|
|
57
|
+
relation?: ErdRelation;
|
|
58
|
+
}
|
|
59
|
+
/** Detail of `entity-move`. */
|
|
60
|
+
export interface ErdMoveDetail {
|
|
61
|
+
id: string;
|
|
62
|
+
position: DiagramPoint;
|
|
63
|
+
}
|
|
64
|
+
/** Detail of `toggle`. */
|
|
65
|
+
export interface ErdToggleDetail {
|
|
66
|
+
id: string;
|
|
67
|
+
collapsed: boolean;
|
|
68
|
+
}
|
|
69
|
+
/** Detail of `connect`. Cancel it to keep the relation from being added. */
|
|
70
|
+
export interface ErdConnectDetail {
|
|
71
|
+
relation: ErdRelation;
|
|
72
|
+
}
|
|
73
|
+
/** Detail of `delete`. Cancel it to keep the items. */
|
|
74
|
+
export interface ErdDeleteDetail {
|
|
75
|
+
entities: string[];
|
|
76
|
+
relations: string[];
|
|
77
|
+
}
|
|
78
|
+
/** Detail of `change`. */
|
|
79
|
+
export interface ErdChangeDetail {
|
|
80
|
+
entities: ErdEntity[];
|
|
81
|
+
relations: ErdRelation[];
|
|
82
|
+
reason: ErdChangeReason;
|
|
83
|
+
}
|
|
84
|
+
/** Detail of `focus-change`. */
|
|
85
|
+
export interface ErdFocusDetail {
|
|
86
|
+
id: string | null;
|
|
87
|
+
hops: number;
|
|
88
|
+
}
|
|
89
|
+
/** Detail of `viewport-change`. */
|
|
90
|
+
export type ErdViewportDetail = DiagramViewportDetail;
|
|
91
|
+
/**
|
|
92
|
+
* @label ERD
|
|
93
|
+
* @tag wc-erd
|
|
94
|
+
* @rawTag erd
|
|
95
|
+
* @summary An entity-relationship diagram: tables with their columns, joined by crow's-foot relations.
|
|
96
|
+
*
|
|
97
|
+
* @overview
|
|
98
|
+
* <p>Set <code>entities</code> (each with <code>columns</code>) and <code>relations</code>. A relation
|
|
99
|
+
* runs from the entity holding the foreign key (<code>source</code>, <code>sourceColumn</code>) to the
|
|
100
|
+
* one it references (<code>target</code>, <code>targetColumn</code>), and its ends show crow's-foot
|
|
101
|
+
* cardinality (many to one by default). Lines join the column rows and route at right angles. Primary
|
|
102
|
+
* keys show a key, foreign keys a link. Hover an entity or a column to highlight what it is joined to.</p>
|
|
103
|
+
* <p>Entities without a <code>position</code> are laid out automatically: referenced tables to the left
|
|
104
|
+
* of the tables that reference them. Collapse an entity to its header with the chevron (or Shift+Enter);
|
|
105
|
+
* the layout closes the gap. <code>schema</code> shows one schema, and <code>focused-node</code> with
|
|
106
|
+
* <code>hops</code> shows one entity's neighbourhood (press F on an entity). Zoomed far out, rows
|
|
107
|
+
* become bars.</p>
|
|
108
|
+
* <p>With <code>editable</code>: double-click a name or type to rename it (F2 on an entity), add and
|
|
109
|
+
* remove columns, click a row's key to toggle the primary key, drag the ring at a row's end onto
|
|
110
|
+
* another row to add a relation and pick its cardinality, and delete with Delete. Every edit fires
|
|
111
|
+
* <code>change</code> with the new <code>entities</code> and <code>relations</code>; undo with Ctrl+Z.</p>
|
|
112
|
+
* <p>Entities are one tab stop: arrow keys move to the nearest entity in that direction, Enter selects.
|
|
113
|
+
* The canvas is infinite like <code>wc-diagram</code>, with the <code>controls</code> and
|
|
114
|
+
* <code>minimap</code> slots.</p>
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```html
|
|
118
|
+
* <wc-erd id="schema" style="height: 480px"></wc-erd>
|
|
119
|
+
* <script>
|
|
120
|
+
* const erd = document.getElementById('schema');
|
|
121
|
+
* erd.entities = [
|
|
122
|
+
* { id: 'customers', name: 'customers', columns: [
|
|
123
|
+
* { name: 'id', type: 'uuid', pk: true }, { name: 'email', type: 'text' }] },
|
|
124
|
+
* { id: 'orders', name: 'orders', columns: [
|
|
125
|
+
* { name: 'id', type: 'uuid', pk: true }, { name: 'customer_id', type: 'uuid' }] }
|
|
126
|
+
* ];
|
|
127
|
+
* erd.relations = [
|
|
128
|
+
* { id: 'r1', source: 'orders', sourceColumn: 'customer_id', target: 'customers', targetColumn: 'id' }
|
|
129
|
+
* ];
|
|
130
|
+
* </script>
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* @slot controls - A `wc-diagram-controls`, shown at the bottom start corner.
|
|
134
|
+
* @slot minimap - A `wc-diagram-minimap`, shown at the bottom end corner.
|
|
135
|
+
*
|
|
136
|
+
* @fires {CustomEvent<ErdSelectDetail>} select - An entity or relation was chosen. Detail contains `{ id, kind, entity, relation }`.
|
|
137
|
+
* @fires {CustomEvent<ErdMoveDetail>} entity-move - A dragged entity was dropped. Detail contains `{ id, position }`.
|
|
138
|
+
* @fires {CustomEvent<ErdToggleDetail>} toggle - An entity was collapsed or expanded. Detail contains `{ id, collapsed }`.
|
|
139
|
+
* @fires {CustomEvent<ErdConnectDetail>} connect - A relation is about to be added by dragging. Cancelable. Detail contains `{ relation }`.
|
|
140
|
+
* @fires {CustomEvent<ErdDeleteDetail>} delete - Entities or relations are about to be deleted. Cancelable. Detail contains `{ entities, relations }`.
|
|
141
|
+
* @fires {CustomEvent<ErdChangeDetail>} change - An edit was made. Detail contains `{ entities, relations, reason }`.
|
|
142
|
+
* @fires {CustomEvent<ErdFocusDetail>} focus-change - Focus mode was turned on or off with the keyboard. Detail contains `{ id, hops }`.
|
|
143
|
+
* @fires {CustomEvent<ErdViewportDetail>} viewport-change - Once per frame while the camera moves and once when it settles. Detail contains `{ x, y, zoom, settled }`.
|
|
144
|
+
*
|
|
145
|
+
* @cssprop --erd-relation-color - Colour of relations. Defaults to outline.
|
|
146
|
+
* @cssprop --erd-highlight-color - Colour of highlighted relations and rows. Defaults to primary.
|
|
147
|
+
* @cssprop --erd-background - Canvas background. Defaults to surface-container-lowest.
|
|
148
|
+
* @tags data
|
|
149
|
+
*/
|
|
150
|
+
export declare class Erd extends DiagramCanvasElement {
|
|
151
|
+
static styles: import("lit").CSSResultGroup[];
|
|
152
|
+
entities: ErdEntity[];
|
|
153
|
+
relations: ErdRelation[];
|
|
154
|
+
/** Shows only the entities of this schema. */
|
|
155
|
+
schema: string;
|
|
156
|
+
/** Shows only the entities within `hops` relations of this entity. */
|
|
157
|
+
focusedNode: string;
|
|
158
|
+
/** How far focus mode reaches. */
|
|
159
|
+
hops: number;
|
|
160
|
+
/** Id of the selected entity or relation. */
|
|
161
|
+
selected: string;
|
|
162
|
+
private _collapsed;
|
|
163
|
+
private _hover?;
|
|
164
|
+
private _focusId;
|
|
165
|
+
private _editing?;
|
|
166
|
+
private _picker?;
|
|
167
|
+
private _connecting?;
|
|
168
|
+
private _announcement;
|
|
169
|
+
private _fresh;
|
|
170
|
+
private readonly _viewportEl?;
|
|
171
|
+
private readonly history;
|
|
172
|
+
private visible;
|
|
173
|
+
private visibleIds;
|
|
174
|
+
private byId;
|
|
175
|
+
private positions;
|
|
176
|
+
private overrides;
|
|
177
|
+
private pinned;
|
|
178
|
+
private layoutKey;
|
|
179
|
+
private seen;
|
|
180
|
+
private stopGlide?;
|
|
181
|
+
private drag?;
|
|
182
|
+
disconnectedCallback(): void;
|
|
183
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
184
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
185
|
+
get canUndo(): boolean;
|
|
186
|
+
get canRedo(): boolean;
|
|
187
|
+
undo(): void;
|
|
188
|
+
redo(): void;
|
|
189
|
+
/** Lays every entity out again, forgetting dragged and given positions. */
|
|
190
|
+
autoLayout(): void;
|
|
191
|
+
collapse(id: string): void;
|
|
192
|
+
expand(id: string): void;
|
|
193
|
+
collapseAll(): void;
|
|
194
|
+
expandAll(): void;
|
|
195
|
+
/** Selects an entity as a click would and brings it into view. */
|
|
196
|
+
selectEntity(id: string): void;
|
|
197
|
+
/** Adds an entity at the centre of the view (or at its `position`) and starts renaming it. */
|
|
198
|
+
addEntity(entity?: Partial<ErdEntity>): ErdEntity;
|
|
199
|
+
/** Adds a relation as a drag would, firing the cancelable `connect` first. Returns whether it was added. */
|
|
200
|
+
addRelation(relation: Omit<ErdRelation, 'id'> & {
|
|
201
|
+
id?: string;
|
|
202
|
+
}): boolean;
|
|
203
|
+
/** Deletes entities (with their relations) and relations, firing the cancelable `delete` first. */
|
|
204
|
+
deleteItems(ids: string[]): void;
|
|
205
|
+
protected viewportElement(): HTMLElement | undefined;
|
|
206
|
+
protected contentBounds(): DiagramRect | undefined;
|
|
207
|
+
protected selectionRects(): DiagramRect[];
|
|
208
|
+
protected itemRect(id: string): DiagramRect | undefined;
|
|
209
|
+
protected firstItemRect(): DiagramRect | undefined;
|
|
210
|
+
protected overviewItems(): DiagramOverview['items'];
|
|
211
|
+
protected isBackground(target: EventTarget | null): boolean;
|
|
212
|
+
protected onBackgroundClick(): void;
|
|
213
|
+
private snapshot;
|
|
214
|
+
private restore;
|
|
215
|
+
private commit;
|
|
216
|
+
private updateEntity;
|
|
217
|
+
private uniqueId;
|
|
218
|
+
private markFresh;
|
|
219
|
+
private computeVisible;
|
|
220
|
+
private heightOf;
|
|
221
|
+
private runLayout;
|
|
222
|
+
private glide;
|
|
223
|
+
private topLeft;
|
|
224
|
+
private rectOf;
|
|
225
|
+
/** The y of a column row's middle, or the header's when the row is hidden or missing. */
|
|
226
|
+
private rowY;
|
|
227
|
+
private foreignKeys;
|
|
228
|
+
private related;
|
|
229
|
+
/** Relations and rows lit by the hovered entity or column. */
|
|
230
|
+
private highlight;
|
|
231
|
+
private announce;
|
|
232
|
+
private selectItem;
|
|
233
|
+
private moveFocusTo;
|
|
234
|
+
private toggle;
|
|
235
|
+
private get canEdit();
|
|
236
|
+
private startEdit;
|
|
237
|
+
private finishEdit;
|
|
238
|
+
private addColumn;
|
|
239
|
+
private removeColumn;
|
|
240
|
+
private togglePrimaryKey;
|
|
241
|
+
private setCardinality;
|
|
242
|
+
private toCanvas;
|
|
243
|
+
private onEntityKeyDown;
|
|
244
|
+
private onViewportKeyDown;
|
|
245
|
+
private onEntityPointerDown;
|
|
246
|
+
private onDragMove;
|
|
247
|
+
private onDragUp;
|
|
248
|
+
private onPortPointerDown;
|
|
249
|
+
/** The row (or entity header) under a screen point. */
|
|
250
|
+
private rowAt;
|
|
251
|
+
private entityElement;
|
|
252
|
+
private renderMarker;
|
|
253
|
+
/**
|
|
254
|
+
* A route between facing sides that avoids the entities in between: when the plain elbow would
|
|
255
|
+
* cross one, the line turns in the gap next to each end and runs along the nearest free channel.
|
|
256
|
+
* Returns `undefined` when the plain elbow is clear or no channel is found.
|
|
257
|
+
*/
|
|
258
|
+
private routeAround;
|
|
259
|
+
private renderRelations;
|
|
260
|
+
private renderPreview;
|
|
261
|
+
private renderInput;
|
|
262
|
+
private renderRow;
|
|
263
|
+
private renderEntity;
|
|
264
|
+
private renderPicker;
|
|
265
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
266
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Erd } from './erd.js';
|
|
2
|
+
export type { ErdAccent, ErdCardinality, ErdChangeDetail, ErdChangeReason, ErdColumn, ErdConnectDetail, ErdDeleteDetail, ErdEntity, ErdFocusDetail, ErdMoveDetail, ErdRelation, ErdSelectDetail, ErdToggleDetail, ErdViewportDetail, } from './erd.js';
|
|
@@ -10,6 +10,19 @@ import { LitElement, nothing } from 'lit';
|
|
|
10
10
|
* box with <code>field-start</code> and <code>field-end</code> slots, and a footer with helper,
|
|
11
11
|
* error or warning text and a character count. Wrap a custom control in it to match the
|
|
12
12
|
* built-in fields.</p>
|
|
13
|
+
* <p>The <code>default</code> variant fills its box with <code>surface-container-lowest</code>, so it
|
|
14
|
+
* stands out on cards and dialogs as well as on the page. <code>outlined</code> has no fill (the
|
|
15
|
+
* outline alone marks it) and <code>filled</code> uses <code>surface-container-highest</code>, as in
|
|
16
|
+
* Material 3. Disabled follows M3: the text at 38%, the outline at 12% and a 4% fill. Read-only
|
|
17
|
+
* keeps the label and value at full contrast in a faint box, so it reads as information.</p>
|
|
18
|
+
* <p>The <code>outlined</code> variant is the M3 outlined text field: its label rests inside the
|
|
19
|
+
* empty field and, on focus or with a value, floats into a notch in the outline's top edge. The
|
|
20
|
+
* outline is drawn in parts (start, notch, end), so the notch needs no background and the field
|
|
21
|
+
* works on any surface. The outline is 1px, 2px while focused.</p>
|
|
22
|
+
*
|
|
23
|
+
* @cssprop --field-container-color - The box's fill. Defaults to `surface-container-lowest` (default variant), `surface-container-highest` (filled) or none (outlined).
|
|
24
|
+
* @cssprop --field-outline-width - The outline's resting width. Defaults to 1px on the outlined variant.
|
|
25
|
+
* @cssprop --field-label-rest-top - Where the outlined label's resting line is centred, from the top of the box. Defaults to the middle; multi-line fields set it to their first line.
|
|
13
26
|
*
|
|
14
27
|
* @example
|
|
15
28
|
* ```html
|
|
@@ -63,9 +76,33 @@ export declare class Field extends LitElement {
|
|
|
63
76
|
slotEndHasContent: boolean;
|
|
64
77
|
/** The bordered field container; used to anchor popups such as a select menu. */
|
|
65
78
|
readonly fieldBodyElement: HTMLElement | null;
|
|
79
|
+
/** The box the control sits in, between the leading and trailing content. */
|
|
80
|
+
private readonly __inputWrapper;
|
|
81
|
+
/** Watches the field and its control box, so the outlined label rests where the text starts. */
|
|
82
|
+
private __resizeObserver?;
|
|
83
|
+
connectedCallback(): void;
|
|
84
|
+
disconnectedCallback(): void;
|
|
66
85
|
firstUpdated(): void;
|
|
67
86
|
__handleClick(): void;
|
|
68
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Starts watching the field body and the control box. The outlined label rests over the
|
|
89
|
+
* control's text and floats into the outline's notch; the text's start moves with leading
|
|
90
|
+
* content such as an icon, so its inset is measured and handed to the styles.
|
|
91
|
+
*/
|
|
92
|
+
private __observeInputBox;
|
|
93
|
+
/** Hands the control box's inline insets to the styles as `--_input-start` and `--_input-end`. */
|
|
94
|
+
private __measureInputBox;
|
|
95
|
+
/** The label text and required mark, shared by the outlined label and its notch. */
|
|
96
|
+
__renderLabelText(): import("lit-html").TemplateResult<1>;
|
|
97
|
+
/**
|
|
98
|
+
* The outline. The outlined variant builds it from parts, as Material 3 does: a start segment,
|
|
99
|
+
* a notch as wide as the floating label whose top edge opens while the label floats, and an
|
|
100
|
+
* end segment that takes the remaining width. The label floats into the notch, so the
|
|
101
|
+
* outline needs no background behind the label and works on any surface.
|
|
102
|
+
*/
|
|
103
|
+
__renderOutline(): import("lit-html").TemplateResult<1>;
|
|
104
|
+
/** The outlined label: resting over the empty control, floating in the notch otherwise. */
|
|
105
|
+
__renderOutlinedLabel(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
69
106
|
__renderFieldHeader(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
70
107
|
__renderFieldFooter(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
71
108
|
__renderHelperText(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
@@ -63,7 +63,8 @@ export declare function matchesAccept(file: File, accept: string): boolean;
|
|
|
63
63
|
* @fires {CustomEvent<{value: File[]}>} change - Dispatched when files are added or removed; `value` is the accepted files.
|
|
64
64
|
* @fires {CustomEvent<{file: File}>} remove - Dispatched when the person removes a file, before `change`.
|
|
65
65
|
*
|
|
66
|
-
* @cssprop --file-upload-drop-zone-color - Background of the drop zone.
|
|
66
|
+
* @cssprop --file-upload-drop-zone-color - Background of the drop zone. Defaults to `surface-container-lowest`, the fill of a default field.
|
|
67
|
+
* @cssprop --file-upload-file-item-color - Background of each file row. Defaults to `surface-container-lowest`.
|
|
67
68
|
* @cssprop --file-upload-drop-zone-border-color - Dashed border of the drop zone.
|
|
68
69
|
* @cssprop --file-upload-drop-zone-shape - Corner radius of the drop zone.
|
|
69
70
|
* @cssprop --file-upload-drop-zone-min-block-size - Minimum height of the drop zone.
|
|
@@ -110,6 +111,7 @@ export declare class FileUpload extends BaseInput {
|
|
|
110
111
|
helperText: string;
|
|
111
112
|
/** Shows the component in its error state with `error-text`. */
|
|
112
113
|
error: boolean;
|
|
114
|
+
/** Error message shown below the component while `error` is set; replaces the help text. */
|
|
113
115
|
errorText: string;
|
|
114
116
|
/** Locale for file sizes and percentages; defaults to the nearest `lang`. */
|
|
115
117
|
locale?: string;
|
|
@@ -33,8 +33,10 @@ export declare class FocusRing extends LitElement implements Attachable {
|
|
|
33
33
|
visible: boolean;
|
|
34
34
|
/** When true, the ring animates inward instead of outward (for use inside containers). */
|
|
35
35
|
inward: boolean;
|
|
36
|
+
/** The id of the control the ring attaches to, as the `for` attribute. */
|
|
36
37
|
get htmlFor(): string | null;
|
|
37
38
|
set htmlFor(htmlFor: string | null);
|
|
39
|
+
/** The control the ring attaches to; without `for` or this, it follows its parent. */
|
|
38
40
|
get control(): HTMLElement | null;
|
|
39
41
|
set control(control: HTMLElement | null);
|
|
40
42
|
private readonly attachableController;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -211,7 +211,20 @@ export type { IllustrationArt, IllustrationName, } from './illustration/index.js
|
|
|
211
211
|
export type { DiscussionCommentDetail, DiscussionCopyLinkDetail, DiscussionEditDetail, DiscussionSubmitDetail, } from './discussion/index.js';
|
|
212
212
|
export { Calendar, CalendarColumnView, CalendarMonthView, } from './calendar/index.js';
|
|
213
213
|
export type { CalendarViewType, EventType, CalendarDateChangeDetail, } from './calendar/index.js';
|
|
214
|
-
export {
|
|
215
|
-
export
|
|
214
|
+
export { Diagram } from './diagram/index.js';
|
|
215
|
+
export { Flow } from './diagram/index.js';
|
|
216
|
+
export { DiagramControls } from './diagram-controls/index.js';
|
|
217
|
+
export { Workflow, WORKFLOW_LOGIC_STEPS } from './workflow/index.js';
|
|
218
|
+
export { WorkflowTimeline } from './workflow-timeline/index.js';
|
|
219
|
+
export { TreeChart } from './tree-chart/index.js';
|
|
220
|
+
export type { TreeChartAccent, TreeChartAddDetail, TreeChartChangeDetail, TreeChartChangeReason, TreeChartDeleteDetail, TreeChartItem, TreeChartItemDetail, TreeChartOrientation, TreeChartReparentDetail, TreeChartViewportDetail, } from './tree-chart/index.js';
|
|
221
|
+
export { DependencyMap } from './dependency-map/index.js';
|
|
222
|
+
export type { DependencyMapEdge, DependencyMapFilter, DependencyMapFilterDetail, DependencyMapFocusDetail, DependencyMapGroup, DependencyMapGroupDetail, DependencyMapImpact, DependencyMapLayout, DependencyMapMoveDetail, DependencyMapNode, DependencyMapSelectDetail, DependencyMapStatus, DependencyMapViewportDetail, } from './dependency-map/index.js';
|
|
223
|
+
export { Erd } from './erd/index.js';
|
|
224
|
+
export type { ErdAccent, ErdCardinality, ErdChangeDetail, ErdChangeReason, ErdColumn, ErdConnectDetail, ErdDeleteDetail, ErdEntity, ErdFocusDetail, ErdMoveDetail, ErdRelation, ErdSelectDetail, ErdToggleDetail, ErdViewportDetail, } from './erd/index.js';
|
|
225
|
+
export type { WorkflowBreakpointDetail, WorkflowDebugAction, WorkflowDebugActionDetail, WorkflowIterationDetail, WorkflowMode, WorkflowRun, WorkflowRunStep, WorkflowRunStepStatus, WorkflowAccent, WorkflowActionStep, WorkflowAssignee, WorkflowBranchStep, WorkflowChangeDetail, WorkflowChangeReason, WorkflowDeleteDetail, WorkflowDensity, WorkflowDirection, WorkflowEndStep, WorkflowField, WorkflowListRef, WorkflowLoopStep, WorkflowOutput, WorkflowPath, WorkflowProblem, WorkflowSelectDetail, WorkflowStep, WorkflowStepAddDetail, WorkflowStepType, WorkflowTool, WorkflowValue, WorkflowViewportDetail, WorkflowWaitStep, } from './workflow/index.js';
|
|
226
|
+
export { DiagramMinimap } from './diagram-minimap/index.js';
|
|
227
|
+
export type { DiagramNode, DiagramEdge, DiagramStrokeVariant, DiagramConnectDetail, DiagramHandlePosition, DiagramNodeMoveDetail, DiagramPoint, DiagramSelectDetail, DiagramChangeDetail, DiagramChangeReason, DiagramConnector, DiagramDeleteDetail, DiagramEdgeType, DiagramIntent, DiagramMarker, DiagramPort, DiagramStartPosition, DiagramView, DiagramViewportDetail, } from './diagram/index.js';
|
|
228
|
+
export type { FlowNode, FlowEdge, FlowStrokeVariant, FlowConnectDetail, FlowHandlePosition, FlowNodeMoveDetail, FlowSelectDetail, FlowChangeDetail, FlowChangeReason, FlowConnector, FlowDeleteDetail, FlowEdgeType, FlowIntent, FlowMarker, FlowPort, FlowStartPosition, FlowView, FlowViewportDetail, } from './diagram/index.js';
|
|
216
229
|
export { ConditionBuilder, CbGroup, CbRule, CbDivider, } from './condition-builder/index.js';
|
|
217
230
|
export type { CbGroupValue, CbNodeValue, CbOperator, CbRuleMoveDetail, CbRuleRemoveDetail, CbRuleValue, ConditionBuilderDescribeDetail, } from './condition-builder/index.js';
|
|
@@ -33,14 +33,17 @@ export interface FieldRenderOptions {
|
|
|
33
33
|
export default abstract class BaseField extends BaseInput {
|
|
34
34
|
/** Label shown above the field; also the control's accessible name. */
|
|
35
35
|
label: string;
|
|
36
|
+
/** Hint shown inside the empty control. */
|
|
36
37
|
placeholder: string;
|
|
37
38
|
/** Help text shown below the field. */
|
|
38
39
|
helperText: string;
|
|
39
40
|
/** Shows the field in its error state with `error-text`. */
|
|
40
41
|
error: boolean;
|
|
42
|
+
/** Error message shown below the field while `error` is set; replaces the help text. */
|
|
41
43
|
errorText: string;
|
|
42
44
|
/** Shows the field in its warning state with `warning-text`. */
|
|
43
45
|
warning: boolean;
|
|
46
|
+
/** Warning message shown below the field while `warning` is set; replaces the help text. */
|
|
44
47
|
warningText: string;
|
|
45
48
|
/** Visual variant of the field. */
|
|
46
49
|
variant: 'default' | 'filled' | 'outlined';
|
|
@@ -43,8 +43,11 @@ declare const BaseInput_base: import("../__internal/mixins/mixin.js").MixinRetur
|
|
|
43
43
|
export default abstract class BaseInput extends BaseInput_base {
|
|
44
44
|
/** Each control declares its own `value` (a property, or an accessor such as Switch's). */
|
|
45
45
|
abstract value?: any;
|
|
46
|
+
/** Shows the value but stops the user changing it; unlike `disabled`, it stays focusable and is submitted. */
|
|
46
47
|
readonly: boolean;
|
|
48
|
+
/** Requires a value before the form can submit. */
|
|
47
49
|
required: boolean;
|
|
50
|
+
/** Shows a loading placeholder in place of the control. */
|
|
48
51
|
skeleton: boolean;
|
|
49
52
|
/**
|
|
50
53
|
* Holds data that must never reach a model, such as a salary or a bank account: the control
|
|
@@ -67,6 +67,7 @@ export declare class MenuItem extends MenuItem_base {
|
|
|
67
67
|
connectedCallback(): void;
|
|
68
68
|
disconnectedCallback(): void;
|
|
69
69
|
protected updated(): void;
|
|
70
|
+
/** The item's tab index, managed by the parent menu's roving focus and applied to the inner control. */
|
|
70
71
|
get tabIndex(): number;
|
|
71
72
|
set tabIndex(value: number);
|
|
72
73
|
/** Whether the item shows something in its leading column. */
|
|
@@ -27,9 +27,13 @@ import { type ControlValidity } from '../input/BaseInput.js';
|
|
|
27
27
|
export declare class NumberField extends BaseField {
|
|
28
28
|
static styles: import("lit").CSSResultGroup[];
|
|
29
29
|
value?: number;
|
|
30
|
+
/** The largest value allowed. */
|
|
30
31
|
max?: number;
|
|
32
|
+
/** The smallest value allowed. */
|
|
31
33
|
min?: number;
|
|
34
|
+
/** How much the value changes per step, and the granularity a valid value must match. */
|
|
32
35
|
step?: number;
|
|
36
|
+
/** Whether the browser may autofill the field: `"on"` or `"off"` (default). */
|
|
33
37
|
autocomplete: 'on' | 'off';
|
|
34
38
|
/** Shows buttons that step the value down and up. */
|
|
35
39
|
stepper: boolean;
|
|
@@ -10,13 +10,16 @@ export declare class BaseProgress extends BaseProgress_base {
|
|
|
10
10
|
value?: number;
|
|
11
11
|
/** The value at which the task is complete. Defaults to `100`. */
|
|
12
12
|
max: number;
|
|
13
|
+
/** Shows ongoing activity with no known completion, ignoring `value`. */
|
|
13
14
|
indeterminate: boolean;
|
|
14
15
|
/**
|
|
15
16
|
* A visible label describing the progress, which also names the progress bar
|
|
16
17
|
* (`aria-labelledby`). Without one the bar is named "Loading" (string `loading`).
|
|
17
18
|
*/
|
|
18
19
|
label?: string;
|
|
20
|
+
/** Help text shown below the progress indicator. */
|
|
19
21
|
helperText?: string;
|
|
22
|
+
/** Lays out the label and the indicator on one line instead of stacking them. */
|
|
20
23
|
inline: boolean;
|
|
21
24
|
/** Peacock's strings, for the fallback accessible name. */
|
|
22
25
|
protected readonly i18n: I18nController;
|
|
@@ -56,6 +56,7 @@ export declare class RadioGroup extends LitElement {
|
|
|
56
56
|
helperText: string;
|
|
57
57
|
/** Shows the group in its error state with `error-text`. */
|
|
58
58
|
error: boolean;
|
|
59
|
+
/** Error message shown below the group while `error` is set; replaces the help text. */
|
|
59
60
|
errorText: string;
|
|
60
61
|
/** Holds data that must never reach a model: the group takes no suggestions. */
|
|
61
62
|
sensitive: boolean;
|
|
@@ -61,6 +61,7 @@ export declare class Rating extends BaseInput {
|
|
|
61
61
|
helperText: string;
|
|
62
62
|
/** Shows the rating in its error state with `error-text`. */
|
|
63
63
|
error: boolean;
|
|
64
|
+
/** Error message shown below the rating while `error` is set; replaces the help text. */
|
|
64
65
|
errorText: string;
|
|
65
66
|
/** Size of the stars: `sm` (default), `md` or `lg`. */
|
|
66
67
|
size: Size;
|
|
@@ -62,8 +62,10 @@ export declare class Ripple extends LitElement implements Attachable {
|
|
|
62
62
|
private rippleStartEvent?;
|
|
63
63
|
/** Bound reference to `handleEvent` passed to `addEventListener` / `removeEventListener`. */
|
|
64
64
|
private readonly _boundHandleEvent;
|
|
65
|
+
/** The id of the control the ripple attaches to, as the `for` attribute. */
|
|
65
66
|
get htmlFor(): string | null;
|
|
66
67
|
set htmlFor(htmlFor: string | null);
|
|
68
|
+
/** The control whose presses show the ripple; without `for` or this, it follows its parent. */
|
|
67
69
|
get control(): HTMLElement | null;
|
|
68
70
|
set control(control: HTMLElement | null);
|
|
69
71
|
private readonly attachableController;
|
|
@@ -63,6 +63,7 @@ export declare class SignaturePad extends BaseInput {
|
|
|
63
63
|
helperText: string;
|
|
64
64
|
/** Shows the pad in its error state with `error-text`. */
|
|
65
65
|
error: boolean;
|
|
66
|
+
/** Error message shown below the pad while `error` is set; replaces the help text. */
|
|
66
67
|
errorText: string;
|
|
67
68
|
/** Whether the person is drawing or typing their name. */
|
|
68
69
|
private mode;
|
|
@@ -56,6 +56,7 @@ export declare class Slider extends BaseInput {
|
|
|
56
56
|
helperText: string;
|
|
57
57
|
/** Shows the slider in its error state with `error-text`. */
|
|
58
58
|
error: boolean;
|
|
59
|
+
/** Error message shown below the slider while `error` is set; replaces the help text. */
|
|
59
60
|
errorText: string;
|
|
60
61
|
/** Size of the track and thumb: `sm` (default), `md` or `lg`. */
|
|
61
62
|
size: Size;
|
|
@@ -31,6 +31,7 @@ export declare class Switch extends ToggleBase {
|
|
|
31
31
|
* If true, the toggle has rounded corners. Defaults to `true`.
|
|
32
32
|
*/
|
|
33
33
|
rounded: boolean;
|
|
34
|
+
/** Shows a check icon in the handle when on and a close icon when off. */
|
|
34
35
|
withIcon: boolean;
|
|
35
36
|
protected valueMissingText(): string;
|
|
36
37
|
private keyDownHandler;
|
package/dist/src/tabs/tab.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare class Tab extends LitElement {
|
|
|
30
30
|
static styles: import("lit").CSSResultGroup[];
|
|
31
31
|
/** Whether this is the chosen tab. Reflects to `aria-selected` (or `aria-current` on a link tab). */
|
|
32
32
|
selected: boolean;
|
|
33
|
+
/** Disables the tab: it can't be selected. */
|
|
33
34
|
disabled: boolean;
|
|
34
35
|
/** Why the tab is disabled; read to screen reader users. */
|
|
35
36
|
disabledReason: string;
|
|
@@ -43,6 +44,7 @@ export declare class Tab extends LitElement {
|
|
|
43
44
|
* Sets or retrieves the window or frame at which to target content.
|
|
44
45
|
*/
|
|
45
46
|
target: string;
|
|
47
|
+
/** The URL to link to. When set, the tab renders as a link for page navigation. */
|
|
46
48
|
href?: string;
|
|
47
49
|
/**
|
|
48
50
|
* Sets the delay for throttle in milliseconds. When unset (default), no throttle is applied.
|