@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
package/src/erd/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { Erd } from './erd.js';
|
|
2
|
+
export type {
|
|
3
|
+
ErdAccent,
|
|
4
|
+
ErdCardinality,
|
|
5
|
+
ErdChangeDetail,
|
|
6
|
+
ErdChangeReason,
|
|
7
|
+
ErdColumn,
|
|
8
|
+
ErdConnectDetail,
|
|
9
|
+
ErdDeleteDetail,
|
|
10
|
+
ErdEntity,
|
|
11
|
+
ErdFocusDetail,
|
|
12
|
+
ErdMoveDetail,
|
|
13
|
+
ErdRelation,
|
|
14
|
+
ErdSelectDetail,
|
|
15
|
+
ErdToggleDetail,
|
|
16
|
+
ErdViewportDetail,
|
|
17
|
+
} from './erd.js';
|
package/src/field/field.scss
CHANGED
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
--_container-shape-end-start: var(--field-container-shape-end-start, var(--shape-corner-extra-small));
|
|
29
29
|
--_container-shape-end-end: var(--field-container-shape-end-end, var(--shape-corner-extra-small));
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
// The default field gets a fill one step off the cards and panels it usually sits on, so
|
|
32
|
+
// it reads as a field on any surface, not only on the page background. `outlined` stays
|
|
33
|
+
// transparent, as M3 specifies; `filled` uses surface-container-highest.
|
|
34
|
+
--_container-color: var(--field-container-color, var(--color-surface-container-lowest));
|
|
32
35
|
--_outline-width: var(--field-outline-width, 0.0675rem);
|
|
33
36
|
--_outline-color: var(--field-outline-color, var(--color-outline));
|
|
34
37
|
--_input-text-color: var(--field-label-text-color, var(--color-on-surface));
|
|
@@ -119,24 +122,6 @@
|
|
|
119
122
|
min-width: 0;
|
|
120
123
|
padding-inline: var(--spacing-200);
|
|
121
124
|
position: relative;
|
|
122
|
-
|
|
123
|
-
.outlined-label {
|
|
124
|
-
position: absolute;
|
|
125
|
-
top: 0;
|
|
126
|
-
inset-inline-start: 0;
|
|
127
|
-
align-items: center;
|
|
128
|
-
height: 100%;
|
|
129
|
-
width: 100%;
|
|
130
|
-
padding-inline: var(--spacing-200);
|
|
131
|
-
@include mixin.get-typography(body-large);
|
|
132
|
-
color: var(--_input-text-color);
|
|
133
|
-
background-color: var(--_container-color);
|
|
134
|
-
opacity: var(--_container-opacity, 1);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.outlined-slot-container {
|
|
138
|
-
opacity: 0;
|
|
139
|
-
}
|
|
140
125
|
}
|
|
141
126
|
|
|
142
127
|
slot::slotted(*) {
|
|
@@ -236,17 +221,206 @@
|
|
|
236
221
|
--_input-text-color: var(--color-warning);
|
|
237
222
|
}
|
|
238
223
|
|
|
224
|
+
// M3 outlined text field: no container, the outline alone marks the field. The label rests
|
|
225
|
+
// over the empty control in body-large and floats in body-small into a notch in the outline's
|
|
226
|
+
// top edge. The outline is three bordered parts (start, notch, end) rather than a box with a
|
|
227
|
+
// background behind the label, so it works on any surface.
|
|
228
|
+
&.variant-outlined {
|
|
229
|
+
--_container-color: var(--field-container-color, transparent);
|
|
230
|
+
--_outline-width: var(--field-outline-width, 0.0625rem);
|
|
231
|
+
--_label-text-color: var(--field-label-text-color, var(--color-on-surface-variant));
|
|
232
|
+
--_label-motion: var(--duration-short3, 150ms) var(--easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
233
|
+
// The notch starts 12px in and pads the label by 4px each side, so the floating label lines
|
|
234
|
+
// up with the text at 16px. It is never narrower than the start corners.
|
|
235
|
+
--_notch-start: max(
|
|
236
|
+
var(--spacing-150),
|
|
237
|
+
var(--_container-shape-start-start),
|
|
238
|
+
var(--_container-shape-end-start)
|
|
239
|
+
);
|
|
240
|
+
--_notch-padding: var(--spacing-050);
|
|
241
|
+
|
|
242
|
+
&.has-label {
|
|
243
|
+
// Room for the floating label's upper half, so it isn't clipped by a scrolling parent.
|
|
244
|
+
padding-block-start: calc(var(--typography-body-small-line-height) / 2);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.field-body {
|
|
248
|
+
.outline {
|
|
249
|
+
display: flex;
|
|
250
|
+
border: none;
|
|
251
|
+
border-radius: 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.outline-start,
|
|
255
|
+
.outline-notch,
|
|
256
|
+
.outline-end {
|
|
257
|
+
position: relative;
|
|
258
|
+
border: var(--_outline-width) solid var(--_outline-color);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.outline-start {
|
|
262
|
+
flex: none;
|
|
263
|
+
width: var(--_notch-start);
|
|
264
|
+
border-inline-end: none;
|
|
265
|
+
border-start-start-radius: var(--_container-shape-start-start);
|
|
266
|
+
border-end-start-radius: var(--_container-shape-end-start);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Its top edge is drawn by ::before, which shrinks to the center as the label floats in.
|
|
270
|
+
.outline-notch {
|
|
271
|
+
flex: none;
|
|
272
|
+
display: flex;
|
|
273
|
+
max-width: calc(100% - var(--_notch-start) - var(--spacing-200));
|
|
274
|
+
border-block-start: none;
|
|
275
|
+
border-inline: none;
|
|
276
|
+
|
|
277
|
+
&::before {
|
|
278
|
+
content: '';
|
|
279
|
+
position: absolute;
|
|
280
|
+
inset-block-start: 0;
|
|
281
|
+
inset-inline: 0;
|
|
282
|
+
border-block-start: var(--_outline-width) solid var(--_outline-color);
|
|
283
|
+
transition: transform var(--_label-motion);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Sizes the notch: the floating label's text, invisible, with its padding.
|
|
288
|
+
.outline-notch-label {
|
|
289
|
+
visibility: hidden;
|
|
290
|
+
padding-inline: var(--_notch-padding);
|
|
291
|
+
overflow: hidden;
|
|
292
|
+
white-space: nowrap;
|
|
293
|
+
text-overflow: ellipsis;
|
|
294
|
+
@include mixin.get-typography-not-important(body-small);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.outline-end {
|
|
298
|
+
flex: 1;
|
|
299
|
+
border-inline-start: none;
|
|
300
|
+
border-start-end-radius: var(--_container-shape-start-end);
|
|
301
|
+
border-end-end-radius: var(--_container-shape-end-end);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// The label. At rest it sits where the control's text starts, centred on the first line
|
|
305
|
+
// (`--field-label-rest-top`, the middle of the box unless a component sets it); floating, it
|
|
306
|
+
// is centred on the top edge inside the notch.
|
|
307
|
+
.outlined-label {
|
|
308
|
+
position: absolute;
|
|
309
|
+
z-index: 3;
|
|
310
|
+
inset-block-start: var(--field-label-rest-top, 50%);
|
|
311
|
+
inset-inline-start: calc(var(--_input-start, 0px) + var(--spacing-200));
|
|
312
|
+
max-width: calc(
|
|
313
|
+
100% - var(--_input-start, 0px) - var(--_input-end, 0px) - 2 * var(--spacing-200)
|
|
314
|
+
);
|
|
315
|
+
transform: translateY(-50%);
|
|
316
|
+
pointer-events: none;
|
|
317
|
+
overflow: hidden;
|
|
318
|
+
white-space: nowrap;
|
|
319
|
+
text-overflow: ellipsis;
|
|
320
|
+
color: var(--_label-text-color);
|
|
321
|
+
@include mixin.get-typography-not-important(body-large);
|
|
322
|
+
|
|
323
|
+
.required {
|
|
324
|
+
color: var(--color-error);
|
|
325
|
+
padding-inline-start: var(--spacing-025);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&[data-label-ready] .outlined-label {
|
|
330
|
+
transition:
|
|
331
|
+
inset-block-start var(--_label-motion),
|
|
332
|
+
inset-inline-start var(--_label-motion),
|
|
333
|
+
max-width var(--_label-motion),
|
|
334
|
+
font-size var(--_label-motion),
|
|
335
|
+
line-height var(--_label-motion),
|
|
336
|
+
letter-spacing var(--_label-motion);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// The control and its prefix show once the label is out of the way, as in M3.
|
|
340
|
+
.input-wrapper {
|
|
341
|
+
transition: opacity var(--_label-motion);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
&.has-label:not(.label-floating) .field-body .input-wrapper {
|
|
346
|
+
opacity: 0;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&.has-label.label-floating .field-body {
|
|
350
|
+
.outline-notch::before {
|
|
351
|
+
transform: scaleX(0);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.outlined-label {
|
|
355
|
+
inset-block-start: 0;
|
|
356
|
+
inset-inline-start: calc(var(--_notch-start) + var(--_notch-padding));
|
|
357
|
+
max-width: calc(
|
|
358
|
+
100% - var(--_notch-start) - 2 * var(--_notch-padding) - var(--spacing-200)
|
|
359
|
+
);
|
|
360
|
+
@include mixin.get-typography-not-important(body-small);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
&:not(.disabled, .readonly, .focused) .field-body:hover {
|
|
365
|
+
--_outline-color: var(--color-on-surface);
|
|
366
|
+
--_label-text-color: var(--color-on-surface);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
&.focused {
|
|
370
|
+
--_outline-width: 0.125rem;
|
|
371
|
+
--_label-text-color: var(--color-primary);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// M3 keeps the input text on-surface in error; the outline, label and helper turn red.
|
|
375
|
+
&.has-error {
|
|
376
|
+
--_label-text-color: var(--color-error);
|
|
377
|
+
--_input-text-color: var(--color-on-surface);
|
|
378
|
+
|
|
379
|
+
&:not(.disabled, .readonly, .focused) .field-body:hover {
|
|
380
|
+
--_outline-color: var(--color-on-error-container);
|
|
381
|
+
--_label-text-color: var(--color-on-error-container);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
&.has-warning {
|
|
386
|
+
--_label-text-color: var(--color-warning);
|
|
387
|
+
--_input-text-color: var(--color-on-surface);
|
|
388
|
+
|
|
389
|
+
&:not(.disabled, .readonly, .focused, .has-error) .field-body:hover {
|
|
390
|
+
--_outline-color: var(--color-warning);
|
|
391
|
+
--_label-text-color: var(--color-warning);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
239
396
|
|
|
397
|
+
// M3 disabled text field: label, value and helper in on-surface at 38%, the outline in
|
|
398
|
+
// on-surface at 12% and the container in on-surface at 4%. The filled field's bottom line
|
|
399
|
+
// stays at 38%, and the outlined field keeps no container.
|
|
240
400
|
&.disabled {
|
|
241
|
-
.label
|
|
401
|
+
.label,
|
|
402
|
+
.outlined-label {
|
|
242
403
|
opacity: 0.38;
|
|
243
404
|
}
|
|
244
|
-
--
|
|
245
|
-
--
|
|
405
|
+
--_label-text-color: var(--color-on-surface);
|
|
406
|
+
--_input-text-color: color-mix(in srgb, var(--color-on-surface) 38%, transparent);
|
|
407
|
+
--_helper-text-color: var(--color-on-surface);
|
|
246
408
|
--_helper-text-opacity: 0.38;
|
|
409
|
+
--_outline-color: var(--color-on-surface);
|
|
410
|
+
--_outline-opacity: 0.12;
|
|
247
411
|
--_container-color: var(--color-on-surface);
|
|
248
|
-
--_container-opacity: 0.
|
|
412
|
+
--_container-opacity: 0.04;
|
|
249
413
|
cursor: not-allowed;
|
|
414
|
+
|
|
415
|
+
&.variant-filled {
|
|
416
|
+
--_outline-opacity: 0.38;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
&.variant-outlined {
|
|
420
|
+
--_container-color: transparent;
|
|
421
|
+
--_label-text-color: var(--color-on-surface);
|
|
422
|
+
--_input-text-color: color-mix(in srgb, var(--color-on-surface) 38%, transparent);
|
|
423
|
+
}
|
|
250
424
|
}
|
|
251
425
|
|
|
252
426
|
// A value to read, not a control switched off: the text, label and helper stay at full
|
package/src/field/field.ts
CHANGED
|
@@ -18,6 +18,19 @@ import IndividualComponent from '@/IndividualComponent.js';
|
|
|
18
18
|
* box with <code>field-start</code> and <code>field-end</code> slots, and a footer with helper,
|
|
19
19
|
* error or warning text and a character count. Wrap a custom control in it to match the
|
|
20
20
|
* built-in fields.</p>
|
|
21
|
+
* <p>The <code>default</code> variant fills its box with <code>surface-container-lowest</code>, so it
|
|
22
|
+
* stands out on cards and dialogs as well as on the page. <code>outlined</code> has no fill (the
|
|
23
|
+
* outline alone marks it) and <code>filled</code> uses <code>surface-container-highest</code>, as in
|
|
24
|
+
* Material 3. Disabled follows M3: the text at 38%, the outline at 12% and a 4% fill. Read-only
|
|
25
|
+
* keeps the label and value at full contrast in a faint box, so it reads as information.</p>
|
|
26
|
+
* <p>The <code>outlined</code> variant is the M3 outlined text field: its label rests inside the
|
|
27
|
+
* empty field and, on focus or with a value, floats into a notch in the outline's top edge. The
|
|
28
|
+
* outline is drawn in parts (start, notch, end), so the notch needs no background and the field
|
|
29
|
+
* works on any surface. The outline is 1px, 2px while focused.</p>
|
|
30
|
+
*
|
|
31
|
+
* @cssprop --field-container-color - The box's fill. Defaults to `surface-container-lowest` (default variant), `surface-container-highest` (filled) or none (outlined).
|
|
32
|
+
* @cssprop --field-outline-width - The outline's resting width. Defaults to 1px on the outlined variant.
|
|
33
|
+
* @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.
|
|
21
34
|
*
|
|
22
35
|
* @example
|
|
23
36
|
* ```html
|
|
@@ -115,7 +128,26 @@ export class Field extends LitElement {
|
|
|
115
128
|
@query('.field-body')
|
|
116
129
|
readonly fieldBodyElement!: HTMLElement | null;
|
|
117
130
|
|
|
131
|
+
/** The box the control sits in, between the leading and trailing content. */
|
|
132
|
+
@query('.input-wrapper')
|
|
133
|
+
private readonly __inputWrapper!: HTMLElement | null;
|
|
134
|
+
|
|
135
|
+
/** Watches the field and its control box, so the outlined label rests where the text starts. */
|
|
136
|
+
private __resizeObserver?: ResizeObserver;
|
|
137
|
+
|
|
138
|
+
connectedCallback() {
|
|
139
|
+
super.connectedCallback();
|
|
140
|
+
if (this.hasUpdated) this.__observeInputBox();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
disconnectedCallback() {
|
|
144
|
+
super.disconnectedCallback();
|
|
145
|
+
this.__resizeObserver?.disconnect();
|
|
146
|
+
this.__resizeObserver = undefined;
|
|
147
|
+
}
|
|
148
|
+
|
|
118
149
|
firstUpdated() {
|
|
150
|
+
this.__observeInputBox();
|
|
119
151
|
observerSlotChangesWithCallback(
|
|
120
152
|
this.renderRoot.querySelector('.slot-start-wrapper slot'),
|
|
121
153
|
hasContent => {
|
|
@@ -137,24 +169,82 @@ export class Field extends LitElement {
|
|
|
137
169
|
this.host?.focus?.();
|
|
138
170
|
}
|
|
139
171
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
172
|
+
/**
|
|
173
|
+
* Starts watching the field body and the control box. The outlined label rests over the
|
|
174
|
+
* control's text and floats into the outline's notch; the text's start moves with leading
|
|
175
|
+
* content such as an icon, so its inset is measured and handed to the styles.
|
|
176
|
+
*/
|
|
177
|
+
private __observeInputBox() {
|
|
178
|
+
if (typeof ResizeObserver === 'undefined' || this.__resizeObserver) return;
|
|
179
|
+
const body = this.fieldBodyElement;
|
|
180
|
+
const box = this.__inputWrapper;
|
|
181
|
+
if (!body || !box) return;
|
|
182
|
+
this.__resizeObserver = new ResizeObserver(() => this.__measureInputBox());
|
|
183
|
+
this.__resizeObserver.observe(body);
|
|
184
|
+
this.__resizeObserver.observe(box);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** Hands the control box's inline insets to the styles as `--_input-start` and `--_input-end`. */
|
|
188
|
+
private __measureInputBox() {
|
|
189
|
+
const body = this.fieldBodyElement;
|
|
190
|
+
const box = this.__inputWrapper;
|
|
191
|
+
if (!body || !box) return;
|
|
192
|
+
const bodyRect = body.getBoundingClientRect();
|
|
193
|
+
const boxRect = box.getBoundingClientRect();
|
|
194
|
+
const rtl = getComputedStyle(body).direction === 'rtl';
|
|
195
|
+
const start = rtl
|
|
196
|
+
? bodyRect.right - boxRect.right
|
|
197
|
+
: boxRect.left - bodyRect.left;
|
|
198
|
+
const end = rtl
|
|
199
|
+
? boxRect.left - bodyRect.left
|
|
200
|
+
: bodyRect.right - boxRect.right;
|
|
201
|
+
body.style.setProperty('--_input-start', `${Math.max(0, start)}px`);
|
|
202
|
+
body.style.setProperty('--_input-end', `${Math.max(0, end)}px`);
|
|
203
|
+
// Animate the label only after it has its first position, so it doesn't slide into place.
|
|
204
|
+
if (!body.hasAttribute('data-label-ready')) {
|
|
205
|
+
requestAnimationFrame(() => body.setAttribute('data-label-ready', ''));
|
|
149
206
|
}
|
|
150
|
-
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** The label text and required mark, shared by the outlined label and its notch. */
|
|
210
|
+
__renderLabelText() {
|
|
211
|
+
return html`${this.label}${this.required
|
|
212
|
+
? html`<span class="required">*</span>`
|
|
213
|
+
: nothing}`;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The outline. The outlined variant builds it from parts, as Material 3 does: a start segment,
|
|
218
|
+
* a notch as wide as the floating label whose top edge opens while the label floats, and an
|
|
219
|
+
* end segment that takes the remaining width. The label floats into the notch, so the
|
|
220
|
+
* outline needs no background behind the label and works on any surface.
|
|
221
|
+
*/
|
|
222
|
+
__renderOutline() {
|
|
223
|
+
if (this.variant !== 'outlined') return html`<div class="outline"></div>`;
|
|
224
|
+
return html`<div class="outline" aria-hidden="true">
|
|
225
|
+
<div class="outline-start"></div>
|
|
226
|
+
<div class="outline-notch">
|
|
227
|
+
${this.label
|
|
228
|
+
? html`<span class="outline-notch-label"
|
|
229
|
+
>${this.__renderLabelText()}</span
|
|
230
|
+
>`
|
|
231
|
+
: nothing}
|
|
232
|
+
</div>
|
|
233
|
+
<div class="outline-end"></div>
|
|
234
|
+
</div>`;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** The outlined label: resting over the empty control, floating in the notch otherwise. */
|
|
238
|
+
__renderOutlinedLabel() {
|
|
239
|
+
if (this.variant !== 'outlined' || !this.label) return nothing;
|
|
240
|
+
return html`<label class="outlined-label">
|
|
241
|
+
${this.__renderLabelText()}
|
|
242
|
+
<wc-skeleton class="skeleton"></wc-skeleton>
|
|
243
|
+
</label>`;
|
|
151
244
|
}
|
|
152
245
|
|
|
153
246
|
__renderFieldHeader() {
|
|
154
|
-
if (!this.label) return nothing;
|
|
155
|
-
if (this.variant === 'outlined' && !this.populated && !this.focused) {
|
|
156
|
-
return nothing;
|
|
157
|
-
}
|
|
247
|
+
if (!this.label || this.variant === 'outlined') return nothing;
|
|
158
248
|
return html`<div class="field-header">
|
|
159
249
|
<label class="label">
|
|
160
250
|
${this.label}${this.required
|
|
@@ -204,6 +294,8 @@ export class Field extends LitElement {
|
|
|
204
294
|
readonly: this.readonly,
|
|
205
295
|
[`variant-${this.variant}`]: true,
|
|
206
296
|
populated: this.populated,
|
|
297
|
+
'has-label': !!this.label,
|
|
298
|
+
'label-floating': this.populated || this.focused,
|
|
207
299
|
};
|
|
208
300
|
|
|
209
301
|
return html`
|
|
@@ -211,9 +303,10 @@ export class Field extends LitElement {
|
|
|
211
303
|
${this.__renderFieldHeader()}
|
|
212
304
|
|
|
213
305
|
<div class="field-body" @click=${this.__handleClick}>
|
|
214
|
-
|
|
306
|
+
${this.__renderOutline()}
|
|
215
307
|
<div class="background"></div>
|
|
216
308
|
<wc-skeleton class="skeleton"></wc-skeleton>
|
|
309
|
+
${this.__renderOutlinedLabel()}
|
|
217
310
|
|
|
218
311
|
<div class="field-content">
|
|
219
312
|
<div
|
|
@@ -225,7 +318,7 @@ export class Field extends LitElement {
|
|
|
225
318
|
<slot name="field-start"></slot>
|
|
226
319
|
</div>
|
|
227
320
|
|
|
228
|
-
<div class="input-wrapper"
|
|
321
|
+
<div class="input-wrapper"><slot></slot></div>
|
|
229
322
|
|
|
230
323
|
<div
|
|
231
324
|
class=${classMap({
|
|
@@ -8,10 +8,20 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.file-upload {
|
|
11
|
+
// The same fill as a default field, so the zone and the file rows stand out on cards and
|
|
12
|
+
// dialogs as well as on the page.
|
|
11
13
|
--_drop-zone-color: var(
|
|
12
14
|
--file-upload-drop-zone-color,
|
|
13
|
-
var(--color-surface-container-
|
|
15
|
+
var(--color-surface-container-lowest)
|
|
14
16
|
);
|
|
17
|
+
--_file-item-color: var(
|
|
18
|
+
--file-upload-file-item-color,
|
|
19
|
+
var(--color-surface-container-lowest)
|
|
20
|
+
);
|
|
21
|
+
--_file-item-border-color: var(--color-outline-variant, var(--color-outline));
|
|
22
|
+
--_content-color: var(--color-on-surface);
|
|
23
|
+
--_muted-color: var(--color-on-surface-variant);
|
|
24
|
+
--_accent-color: var(--color-primary);
|
|
15
25
|
--_drop-zone-border-color: var(
|
|
16
26
|
--file-upload-drop-zone-border-color,
|
|
17
27
|
var(--color-outline)
|
|
@@ -32,6 +42,23 @@
|
|
|
32
42
|
--_helper-text-color: var(--color-error);
|
|
33
43
|
--_drop-zone-border-color: var(--color-error);
|
|
34
44
|
}
|
|
45
|
+
|
|
46
|
+
// M3 disabled, as on fields: content in on-surface at 38%, outlines in on-surface at 12%
|
|
47
|
+
// and containers in on-surface at 4%.
|
|
48
|
+
&.disabled {
|
|
49
|
+
--_drop-zone-color: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
|
|
50
|
+
--_drop-zone-border-color: color-mix(in srgb, var(--color-on-surface) 12%, transparent);
|
|
51
|
+
--_file-item-color: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
|
|
52
|
+
--_file-item-border-color: color-mix(in srgb, var(--color-on-surface) 12%, transparent);
|
|
53
|
+
--_content-color: color-mix(in srgb, var(--color-on-surface) 38%, transparent);
|
|
54
|
+
--_muted-color: var(--_content-color);
|
|
55
|
+
--_accent-color: var(--_content-color);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// A list to read: the rows keep full contrast in a faint box, like a read-only field.
|
|
59
|
+
&.readonly:not(.disabled) {
|
|
60
|
+
--_file-item-color: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
|
|
61
|
+
}
|
|
35
62
|
}
|
|
36
63
|
|
|
37
64
|
.label {
|
|
@@ -56,7 +83,7 @@
|
|
|
56
83
|
border: 0.0625rem dashed var(--_drop-zone-border-color);
|
|
57
84
|
border-radius: var(--_drop-zone-shape);
|
|
58
85
|
background-color: var(--_drop-zone-color);
|
|
59
|
-
color: var(--color
|
|
86
|
+
color: var(--_content-color);
|
|
60
87
|
text-align: center;
|
|
61
88
|
cursor: pointer;
|
|
62
89
|
outline: none;
|
|
@@ -68,11 +95,11 @@
|
|
|
68
95
|
|
|
69
96
|
.drop-icon {
|
|
70
97
|
--icon-size: 2rem;
|
|
71
|
-
--icon-color: var(--color
|
|
98
|
+
--icon-color: var(--_muted-color);
|
|
72
99
|
}
|
|
73
100
|
|
|
74
101
|
.browse {
|
|
75
|
-
color: var(--color
|
|
102
|
+
color: var(--_accent-color);
|
|
76
103
|
text-decoration: underline;
|
|
77
104
|
}
|
|
78
105
|
|
|
@@ -95,10 +122,9 @@
|
|
|
95
122
|
|
|
96
123
|
.disabled .drop-zone {
|
|
97
124
|
cursor: not-allowed;
|
|
98
|
-
opacity: 0.38;
|
|
99
125
|
|
|
100
126
|
&:hover {
|
|
101
|
-
--_drop-zone-border-color: var(--color-
|
|
127
|
+
--_drop-zone-border-color: color-mix(in srgb, var(--color-on-surface) 12%, transparent);
|
|
102
128
|
}
|
|
103
129
|
}
|
|
104
130
|
|
|
@@ -136,13 +162,14 @@
|
|
|
136
162
|
gap: var(--spacing-150);
|
|
137
163
|
padding: var(--spacing-100) var(--spacing-100) var(--spacing-100)
|
|
138
164
|
var(--spacing-200);
|
|
139
|
-
border: 0.0625rem solid var(--
|
|
165
|
+
border: 0.0625rem solid var(--_file-item-border-color);
|
|
140
166
|
border-radius: var(--shape-corner-small);
|
|
141
|
-
color: var(--
|
|
167
|
+
background-color: var(--_file-item-color);
|
|
168
|
+
color: var(--_content-color);
|
|
142
169
|
|
|
143
170
|
.file-icon {
|
|
144
171
|
--icon-size: 1.5rem;
|
|
145
|
-
--icon-color: var(--color
|
|
172
|
+
--icon-color: var(--_muted-color);
|
|
146
173
|
|
|
147
174
|
flex: none;
|
|
148
175
|
}
|
|
@@ -184,7 +211,7 @@
|
|
|
184
211
|
@include mixin.get-typography(body-small);
|
|
185
212
|
|
|
186
213
|
flex: none;
|
|
187
|
-
color: var(--color
|
|
214
|
+
color: var(--_muted-color);
|
|
188
215
|
}
|
|
189
216
|
|
|
190
217
|
.file-error {
|
|
@@ -124,7 +124,8 @@ let fileUploadCount = 0;
|
|
|
124
124
|
* @fires {CustomEvent<{value: File[]}>} change - Dispatched when files are added or removed; `value` is the accepted files.
|
|
125
125
|
* @fires {CustomEvent<{file: File}>} remove - Dispatched when the person removes a file, before `change`.
|
|
126
126
|
*
|
|
127
|
-
* @cssprop --file-upload-drop-zone-color - Background of the drop zone.
|
|
127
|
+
* @cssprop --file-upload-drop-zone-color - Background of the drop zone. Defaults to `surface-container-lowest`, the fill of a default field.
|
|
128
|
+
* @cssprop --file-upload-file-item-color - Background of each file row. Defaults to `surface-container-lowest`.
|
|
128
129
|
* @cssprop --file-upload-drop-zone-border-color - Dashed border of the drop zone.
|
|
129
130
|
* @cssprop --file-upload-drop-zone-shape - Corner radius of the drop zone.
|
|
130
131
|
* @cssprop --file-upload-drop-zone-min-block-size - Minimum height of the drop zone.
|
|
@@ -200,6 +201,7 @@ export class FileUpload extends BaseInput {
|
|
|
200
201
|
@property({ type: Boolean, reflect: true })
|
|
201
202
|
error = false;
|
|
202
203
|
|
|
204
|
+
/** Error message shown below the component while `error` is set; replaces the help text. */
|
|
203
205
|
@property({ type: String, attribute: 'error-text' })
|
|
204
206
|
errorText = '';
|
|
205
207
|
|
|
@@ -51,6 +51,7 @@ export class FocusRing extends LitElement implements Attachable {
|
|
|
51
51
|
/** When true, the ring animates inward instead of outward (for use inside containers). */
|
|
52
52
|
@property({ type: Boolean, reflect: true }) inward = false;
|
|
53
53
|
|
|
54
|
+
/** The id of the control the ring attaches to, as the `for` attribute. */
|
|
54
55
|
get htmlFor() {
|
|
55
56
|
return this.attachableController.htmlFor;
|
|
56
57
|
}
|
|
@@ -59,6 +60,7 @@ export class FocusRing extends LitElement implements Attachable {
|
|
|
59
60
|
this.attachableController.htmlFor = htmlFor;
|
|
60
61
|
}
|
|
61
62
|
|
|
63
|
+
/** The control the ring attaches to; without `for` or this, it follows its parent. */
|
|
62
64
|
get control() {
|
|
63
65
|
return this.attachableController.control;
|
|
64
66
|
}
|
|
@@ -478,7 +478,7 @@ export const catalog: GenerativeCatalog = {
|
|
|
478
478
|
columns: {
|
|
479
479
|
kind: 'array',
|
|
480
480
|
description:
|
|
481
|
-
'Grid columns configuration. Each column can have: name, label, width, minWidth, maxWidth\
|
|
481
|
+
'Grid columns configuration. Each column can have: name, label, width, minWidth, maxWidth\nand flex (rem and grow factor), fixed, align, type, sortable, wrap, hidden, hideable,\nresizable, reorderable, group, headerTemplate, template; editable, editor, options,\nrequired, min, max, step and validate for inline editing; exportValue; aggregate.',
|
|
482
482
|
},
|
|
483
483
|
data: {
|
|
484
484
|
kind: 'array',
|
|
@@ -515,12 +515,12 @@ export const catalog: GenerativeCatalog = {
|
|
|
515
515
|
emptyStateHeadline: {
|
|
516
516
|
kind: 'string',
|
|
517
517
|
description:
|
|
518
|
-
'Headline text shown when the table has no data. Defaults to Peacock\'s `noItems` string\
|
|
518
|
+
'Headline text shown when the table has no data. Defaults to Peacock\'s `noItems` string\n(`"No items"`).',
|
|
519
519
|
},
|
|
520
520
|
emptyStateDescription: {
|
|
521
521
|
kind: 'string',
|
|
522
522
|
description:
|
|
523
|
-
'Description text shown when the table has no data. Defaults to Peacock\'s\
|
|
523
|
+
'Description text shown when the table has no data. Defaults to Peacock\'s\n`noItemsDescription` string (`"There are no items to display"`).',
|
|
524
524
|
},
|
|
525
525
|
},
|
|
526
526
|
slots: [],
|
|
@@ -577,7 +577,7 @@ export const catalog: GenerativeCatalog = {
|
|
|
577
577
|
kind: 'enum',
|
|
578
578
|
values: ['standard', 'segmented'],
|
|
579
579
|
description:
|
|
580
|
-
'`standard` rows sit on the surface; `segmented` rows each get a\
|
|
580
|
+
'`standard` rows sit on the surface; `segmented` rows each get a\nsurface-container fill, a small gap and rounded outer corners.',
|
|
581
581
|
},
|
|
582
582
|
},
|
|
583
583
|
slots: [],
|
|
@@ -783,12 +783,12 @@ export const catalog: GenerativeCatalog = {
|
|
|
783
783
|
name: {
|
|
784
784
|
kind: 'string',
|
|
785
785
|
description:
|
|
786
|
-
'The identifier for the icon.\
|
|
786
|
+
'The identifier for the icon.\nThis name corresponds to a specific SVG asset in the icon set.',
|
|
787
787
|
},
|
|
788
788
|
label: {
|
|
789
789
|
kind: 'string',
|
|
790
790
|
description:
|
|
791
|
-
'Accessible name for an icon that carries meaning on its own. With a label the icon is\
|
|
791
|
+
'Accessible name for an icon that carries meaning on its own. With a label the icon is\n`role="img"` named by it; without one it is decorative and hidden from assistive technology.',
|
|
792
792
|
},
|
|
793
793
|
},
|
|
794
794
|
slots: [],
|
|
@@ -840,16 +840,17 @@ export const catalog: GenerativeCatalog = {
|
|
|
840
840
|
},
|
|
841
841
|
indeterminate: {
|
|
842
842
|
kind: 'boolean',
|
|
843
|
-
description:
|
|
843
|
+
description:
|
|
844
|
+
'Shows ongoing activity with no known completion, ignoring `value`.',
|
|
844
845
|
},
|
|
845
846
|
label: {
|
|
846
847
|
kind: 'string',
|
|
847
848
|
description:
|
|
848
|
-
'A visible label describing the progress, which also names the progress bar\
|
|
849
|
+
'A visible label describing the progress, which also names the progress bar\n(`aria-labelledby`). Without one the bar is named "Loading" (string `loading`).',
|
|
849
850
|
},
|
|
850
851
|
helperText: {
|
|
851
852
|
kind: 'string',
|
|
852
|
-
description: '',
|
|
853
|
+
description: 'Help text shown below the progress indicator.',
|
|
853
854
|
},
|
|
854
855
|
},
|
|
855
856
|
slots: [],
|
|
@@ -904,13 +905,13 @@ export const catalog: GenerativeCatalog = {
|
|
|
904
905
|
kind: 'enum',
|
|
905
906
|
values: ['primary', 'secondary', 'tertiary', 'danger'],
|
|
906
907
|
description:
|
|
907
|
-
'Preset of `color` and `variant`: `primary` (primary, filled), `secondary` (surface, tonal),\
|
|
908
|
+
'Preset of `color` and `variant`: `primary` (primary, filled), `secondary` (surface, tonal),\n`tertiary` (primary, text), `danger` (danger, filled). A `color` or `variant` set on the\nelement wins over the preset.',
|
|
908
909
|
},
|
|
909
910
|
size: {
|
|
910
911
|
kind: 'enum',
|
|
911
912
|
values: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
912
913
|
description:
|
|
913
|
-
'Button size.\
|
|
914
|
+
'Button size.\nPossible values are `"xs"`, `"sm"`, `"md"`, `"lg"`, `"xl"`. Defaults to `"sm"`.',
|
|
914
915
|
},
|
|
915
916
|
tooltip: {
|
|
916
917
|
kind: 'string',
|