@epa-wg/custom-element-dist 0.0.32 → 0.0.34
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/.claude/settings.local.json +18 -0
- package/.github/workflows/deploy.yml +59 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/custom-element-dist.iml +2 -0
- package/.storybook/main.ts +20 -21
- package/.storybook/preview.ts +23 -25
- package/README.md +6 -4
- package/coverage/block-navigation.js +1 -1
- package/coverage/coverage-final.json +8 -18
- package/coverage/index.html +45 -30
- package/coverage/sorter.js +21 -7
- package/coverage/src/custom-element/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js.html +687 -480
- package/coverage/src/custom-element/http-request.js/coverage.svg +1 -1
- package/coverage/src/custom-element/http-request.js.html +39 -18
- package/coverage/src/custom-element/index.html +35 -35
- package/coverage/src/custom-element/local-storage.js.html +1 -1
- package/coverage/src/custom-element/location-element.js.html +31 -31
- package/coverage/src/custom-element/module-url.js/coverage.svg +1 -1
- package/coverage/src/custom-element/module-url.js.html +20 -20
- package/coverage/src/index.html +1 -1
- package/coverage/src/{stories/local-storage.test.stories.ts → material/theme/colors.js}/coverage.svg +1 -1
- package/coverage/src/material/theme/colors.js.html +217 -0
- package/coverage/src/{stories/location-element.test.stories.ts → material/theme}/coverage.svg +1 -1
- package/coverage/src/material/theme/index.html +116 -0
- package/coverage/src/mocks/handlers.ts.html +1 -1
- package/coverage/src/mocks/index.html +1 -1
- package/coverage/src/stories/coverage.svg +1 -1
- package/coverage/src/stories/{external-template.test.stories.ts → frame.canvas.ts}/coverage.svg +1 -1
- package/coverage/src/stories/frame.canvas.ts.html +175 -0
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +14 -179
- package/coverage/src/stories/testStoryBook.ts.html +12 -12
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-BoYMoUtP.js +619 -0
- package/dist/custom-element-BqtjrCRF.cjs +97 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +3 -3
- package/dist/demo/a.html +10 -3
- package/dist/demo/a.svg +26 -26
- package/dist/demo/attributes.html +153 -0
- package/dist/demo/external-templates-sb-6.html +42 -0
- package/dist/demo/external-templates-sb-7.html +42 -0
- package/dist/demo/html-template.html +5 -4
- package/dist/demo/module-url-sb-2.html +46 -0
- package/dist/demo/module-url-sb-4.html +48 -0
- package/dist/demo/module-url-sb-5.html +53 -0
- package/dist/demo/s.xml +3859 -7
- package/dist/demo/s.xslt +13 -48
- package/dist/demo/s1.xml +3706 -0
- package/dist/demo/ss.html +13 -4
- package/dist/http-request-DSaowcG1.cjs +1 -0
- package/dist/{http-request-BOvP4KTl.js → http-request-DTCzZ1gc.js} +15 -9
- package/dist/mockServiceWorker.js +31 -8
- package/package.json +25 -26
- package/public/demo/a.html +10 -3
- package/public/demo/a.svg +26 -26
- package/public/demo/attributes.html +153 -0
- package/public/demo/external-templates-sb-6.html +42 -0
- package/public/demo/external-templates-sb-7.html +42 -0
- package/public/demo/html-template.html +5 -4
- package/public/demo/module-url-sb-2.html +46 -0
- package/public/demo/module-url-sb-4.html +48 -0
- package/public/demo/module-url-sb-5.html +53 -0
- package/public/demo/s.xml +3859 -7
- package/public/demo/s.xslt +13 -48
- package/public/demo/s1.xml +3706 -0
- package/public/demo/ss.html +13 -4
- package/public/mockServiceWorker.js +31 -8
- package/src/custom-element/custom-element.d.ts +4 -0
- package/src/custom-element/custom-element.js +119 -50
- package/src/custom-element/demo/a.html +10 -3
- package/src/custom-element/demo/a.svg +26 -26
- package/src/custom-element/demo/attributes.html +153 -0
- package/src/custom-element/demo/html-template.html +5 -4
- package/src/custom-element/demo/s.xml +3859 -7
- package/src/custom-element/demo/s.xslt +13 -48
- package/src/custom-element/demo/s1.xml +3706 -0
- package/src/custom-element/demo/ss.html +13 -4
- package/src/custom-element/http-request.js +7 -0
- package/src/custom-element/ide/web-types-dce.json +1 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/custom-element/index.html +1 -1
- package/src/material/angular.css +987 -987
- package/src/material/components/action.html +262 -0
- package/src/material/components/autocomplete.html +167 -239
- package/src/material/components/badge.html +239 -0
- package/src/material/components/dropdown.html +7 -13
- package/src/material/components/icon-link.html +160 -160
- package/src/material/components/icon.html +252 -0
- package/src/material/components/input.html +569 -362
- package/src/material/components/menu.html +235 -234
- package/src/material/components.html +157 -121
- package/src/material/demo.css +36 -36
- package/src/material/index.html +109 -110
- package/src/material/material.css +356 -356
- package/src/material/theme/Base-Principles.md +339 -0
- package/src/material/theme/README.md +298 -18
- package/src/material/theme/UI Domain Model in web applications.svg +1 -0
- package/src/material/theme/User Semantic Theme tokens.svg +1 -0
- package/src/material/theme/action-pending-poc.html +62 -0
- package/src/material/theme/actions-color.html +141 -0
- package/src/material/theme/colors-light.html +631 -0
- package/src/material/theme/colors-native.html +51 -0
- package/src/material/theme/colors-poc.html +66 -0
- package/src/material/theme/colors.html +297 -0
- package/src/material/theme/colors.js +44 -0
- package/src/material/theme/consumer-theme.css +745 -0
- package/src/material/theme/semantic.css +132 -113
- package/src/material/theme/style-bug.html +123 -0
- package/src/material/theme/theme-data.css +43 -0
- package/src/material/theme/theme-data.xhtml +2926 -0
- package/src/material/theme/todo.md +274 -0
- package/src/material/theme/tokens/action-colors.png +0 -0
- package/src/material/theme/tokens/cem-article-illustration-4x1-letterbox-2000x500.png +0 -0
- package/src/material/theme/tokens/cem-breakpoints.md +519 -0
- package/src/material/theme/tokens/cem-colors.md +715 -0
- package/src/material/theme/tokens/cem-consumerflow-typography-matrix.svg +198 -0
- package/src/material/theme/tokens/cem-coupling.md +372 -0
- package/src/material/theme/tokens/cem-data-vs-reading-numerals.svg +164 -0
- package/src/material/theme/tokens/cem-dimension.md +625 -0
- package/src/material/theme/tokens/cem-layering.md +562 -0
- package/src/material/theme/tokens/cem-m3-parity.md +343 -0
- package/src/material/theme/tokens/cem-responsive.md +238 -0
- package/src/material/theme/tokens/cem-shape.md +691 -0
- package/src/material/theme/tokens/cem-stroke-density-illustration-4to1-v3.svg +102 -0
- package/src/material/theme/tokens/cem-stroke.md +480 -0
- package/src/material/theme/tokens/cem-timing.md +198 -0
- package/src/material/theme/tokens/cem-typography-model-stack.svg +64 -0
- package/src/material/theme/tokens/cem-voice-fonts-typography.md +718 -0
- package/src/material/theme/tokens/cem-voice-ladder.svg +91 -0
- package/src/material/theme/tokens/chips.png +0 -0
- package/src/material/theme/tokens/columns-page.png +0 -0
- package/src/material/theme/tokens/initials.png +0 -0
- package/src/material/theme/tokens/nav-buttons.png +0 -0
- package/src/material/theme/tokens/script.png +0 -0
- package/src/material/theme/tokens/sufler.png +0 -0
- package/src/material/theme/tokens/typography-icons.png +0 -0
- package/src/mocks/versions.mock.ts +1 -1
- package/src/stories/__screenshots__/attributes.test.stories.ts +1 -0
- package/src/stories/__screenshots__/dom-merge.test.stories.ts/dom-merge-dom-merge-OrderPreservingOn2ndTransform-1.png +0 -0
- package/src/stories/__screenshots__/external-template.test.stories.ts +1 -0
- package/src/stories/__screenshots__/module-url.test.stories.ts +1 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-definition-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-runtime-change-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-cloneAs-el-newTag--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---3.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mix-to-from--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-definition-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-runtime-change-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-cloneAs-el-newTag--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-headers-and-response-status-and-headers-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-delayed--5-seconds-response-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-error-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---3.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mix-to-from--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-url-and-slice-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-url-change-1.png +0 -0
- package/src/stories/__screenshots__/xslt-conditionals.test.stories.ts/xslt-conditionals-xslt-conditionals-MultipleIfOrderingWorkaround-1.png +0 -0
- package/src/stories/attributes.test.stories.ts +83 -17
- package/src/stories/dom-merge.test.stories.ts +25 -1
- package/src/stories/external-template.test.stories.ts +16 -14
- package/src/stories/frame.canvas.ts +31 -0
- package/src/stories/module-url.test.stories.ts +29 -61
- package/src/stories/xslt-conditionals.test.stories.ts +492 -0
- package/src/stories/xslt-if.test.stories.ts +89 -0
- package/storybook-static/assets/Color-F6OSRLHC-CzTOSlqB.js +1 -0
- package/storybook-static/assets/Configure-7GqRsAoJ.js +165 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-Duc5rSIm.js +2 -0
- package/storybook-static/assets/{attributes.test.stories-D1X6EBrd.js → attributes.test.stories-DYuxF8h1.js} +109 -38
- package/storybook-static/assets/{css.test.stories-Cp_g2hE1.js → css.test.stories-LOmvINyb.js} +1 -1
- package/storybook-static/assets/custom-element-Bwx7otrT.js +97 -0
- package/storybook-static/assets/{dom-merge.test.stories-hbpdCka0.js → dom-merge.test.stories-CEKhWjaS.js} +47 -6
- package/storybook-static/assets/entry-preview-BNCt9WBs.js +26 -0
- package/storybook-static/assets/entry-preview-docs-CbF8-81D.js +2 -0
- package/storybook-static/assets/{external-template.test.stories-BK89h6sk.js → external-template.test.stories-jHu0wsJ-.js} +38 -40
- package/storybook-static/assets/{form.test.stories-BfoLe_rw.js → form.test.stories-CUyUnmwP.js} +1 -1
- package/storybook-static/assets/frame.canvas-E5n9h6j1.js +1 -0
- package/storybook-static/assets/{handlers-yVPwH_Nz.js → handlers-F7GUfMqr.js} +17 -14
- package/storybook-static/assets/http-request-BWeEEBkP.js +1 -0
- package/storybook-static/assets/{http-request.stories-CBFJS2Ws.js → http-request.stories-wyX5-QOv.js} +1 -1
- package/storybook-static/assets/iframe-BS_DPWl0.js +199 -0
- package/storybook-static/assets/index-CGuyH0k-.js +240 -0
- package/storybook-static/assets/index-DB7LLObI.js +1 -0
- package/storybook-static/assets/index-DO1nmyvI.js +11 -0
- package/storybook-static/assets/index-V1EGs-wm.js +621 -0
- package/storybook-static/assets/{local-storage.test.stories-C0Yzy6Am.js → local-storage.test.stories-BxOhsf1k.js} +1 -1
- package/storybook-static/assets/{location-element.test.stories-DNFrEu5A.js → location-element.test.stories-DqhvvUoa.js} +1 -1
- package/storybook-static/assets/module-url.test.stories-C1gG9G7Y.js +142 -0
- package/storybook-static/assets/preview-1xJJ3sKE.js +1 -0
- package/storybook-static/assets/preview-Bn8igYMp.js +1 -0
- package/storybook-static/assets/preview-CTOeX_lO.js +1 -0
- package/storybook-static/assets/preview-Cwy1XFu2.js +2 -0
- package/storybook-static/assets/preview-D6sehqkw.js +50 -0
- package/storybook-static/assets/preview-DfTudP20.js +1 -0
- package/storybook-static/assets/{set-url.test.stories-BBfLxv2u.js → set-url.test.stories-BKQNdknJ.js} +1 -1
- package/storybook-static/assets/{slice-events.test.stories-HcXF8XQI.js → slice-events.test.stories-ChqULCeA.js} +1 -1
- package/storybook-static/assets/{slots.test.stories-i6mnIFM2.js → slots.test.stories-BlyLoCRe.js} +1 -1
- package/storybook-static/assets/{version-select.test.stories-BsUFH6Va.js → version-select.test.stories-CPGSh1tR.js} +1 -1
- package/storybook-static/assets/xslt-conditionals.test.stories-YC6QPqWZ.js +633 -0
- package/storybook-static/assets/xslt-if.test.stories-BRSWy2-x.js +71 -0
- package/storybook-static/demo/a.html +10 -3
- package/storybook-static/demo/a.svg +26 -26
- package/storybook-static/demo/attributes.html +153 -0
- package/storybook-static/demo/external-templates-sb-6.html +42 -0
- package/storybook-static/demo/external-templates-sb-7.html +42 -0
- package/storybook-static/demo/html-template.html +5 -4
- package/storybook-static/demo/module-url-sb-2.html +46 -0
- package/storybook-static/demo/module-url-sb-4.html +48 -0
- package/storybook-static/demo/module-url-sb-5.html +53 -0
- package/storybook-static/demo/s.xml +3859 -7
- package/storybook-static/demo/s.xslt +13 -48
- package/storybook-static/demo/s1.xml +3706 -0
- package/storybook-static/demo/ss.html +13 -4
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/index.html +6 -10
- package/storybook-static/index.json +1 -1
- package/storybook-static/mockServiceWorker.js +31 -8
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +394 -0
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +233 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-9/manager-bundle.js +58 -58
- package/storybook-static/sb-manager/globals-module-info.js +9 -0
- package/storybook-static/sb-manager/globals-runtime.js +10719 -10473
- package/storybook-static/sb-manager/runtime.js +4944 -6321
- package/coverage/src/stories/attributes.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/attributes.test.stories.ts.html +0 -814
- package/coverage/src/stories/css.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/css.test.stories.ts.html +0 -460
- package/coverage/src/stories/dom-merge.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/dom-merge.test.stories.ts.html +0 -706
- package/coverage/src/stories/external-template.test.stories.ts.html +0 -865
- package/coverage/src/stories/form.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/form.test.stories.ts.html +0 -661
- package/coverage/src/stories/local-storage.test.stories.ts.html +0 -1315
- package/coverage/src/stories/location-element.test.stories.ts.html +0 -523
- package/coverage/src/stories/module-url.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/module-url.test.stories.ts.html +0 -640
- package/coverage/src/stories/set-url.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/set-url.test.stories.ts.html +0 -433
- package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/slice-events.test.stories.ts.html +0 -952
- package/coverage/src/stories/slots.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/slots.test.stories.ts.html +0 -742
- package/coverage/src/stories/version-select.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/version-select.test.stories.ts.html +0 -397
- package/dist/custom-element-D2wf_rqP.js +0 -576
- package/dist/custom-element-Dtzhbjkc.cjs +0 -97
- package/dist/http-request-DPrY7mGh.cjs +0 -1
- package/storybook-static/assets/Color-F6OSRLHC-BU3iy8jH.js +0 -1
- package/storybook-static/assets/Configure-DN6ifayP.js +0 -165
- package/storybook-static/assets/DocsRenderer-CFRXHY34-BaVEufDj.js +0 -2
- package/storybook-static/assets/custom-element-uuAtIYWS.js +0 -97
- package/storybook-static/assets/entry-preview-DHVXbf3x.js +0 -26
- package/storybook-static/assets/entry-preview-docs-BbcIMweR.js +0 -2
- package/storybook-static/assets/http-request-DNq59pnj.js +0 -1
- package/storybook-static/assets/iframe-CJEL_4Nu.js +0 -2
- package/storybook-static/assets/index-BcZLpTeD.js +0 -8
- package/storybook-static/assets/index-CxRwF5Or.js +0 -234
- package/storybook-static/assets/index-D-8MO0q_.js +0 -1
- package/storybook-static/assets/index-D5fBh-7N.js +0 -1
- package/storybook-static/assets/index-DM-KBPdl.js +0 -1
- package/storybook-static/assets/index-RSFf30w1.js +0 -1
- package/storybook-static/assets/index-SnjB5uV8.js +0 -769
- package/storybook-static/assets/module-url.test.stories-CXibF5Ta.js +0 -208
- package/storybook-static/assets/preview-BhhEZcNS.js +0 -1
- package/storybook-static/assets/preview-Bnd0XhaF.js +0 -52
- package/storybook-static/assets/preview-CNKoaWES.js +0 -1
- package/storybook-static/assets/preview-DAeyCMnM.js +0 -1
- package/storybook-static/assets/preview-DHPc-V4N.js +0 -1
- package/storybook-static/assets/preview-DJMlNTk8.js +0 -2
- package/storybook-static/assets/preview-DYzi3Z2p.js +0 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +0 -333
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +0 -40
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +0 -391
- package/storybook-static/sb-addons/links-1/manager-bundle.js +0 -3
- package/storybook-static/sb-preview/globals.js +0 -33
- package/storybook-static/sb-preview/runtime.js +0 -7174
- package/test-runner-jest.config.js +0 -15
- /package/storybook-static/sb-addons/{essentials-actions-3 → essentials-actions-2}/manager-bundle.js.LEGAL.txt +0 -0
- /package/storybook-static/sb-addons/{essentials-controls-2 → essentials-controls-1}/manager-bundle.js.LEGAL.txt +0 -0
- /package/storybook-static/sb-addons/{links-1 → essentials-docs-3}/manager-bundle.js.LEGAL.txt +0 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
3
|
+
<head>
|
|
4
|
+
<!--
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Action State
|
|
9
|
+
* default, normal, no state
|
|
10
|
+
* hover
|
|
11
|
+
* pressed
|
|
12
|
+
* focused
|
|
13
|
+
* focus forced by keyboard
|
|
14
|
+
* selected
|
|
15
|
+
* disabled
|
|
16
|
+
|
|
17
|
+
Action variation
|
|
18
|
+
* default, normal, secondary
|
|
19
|
+
* primary, emphasized
|
|
20
|
+
* alternate flow
|
|
21
|
+
* danger
|
|
22
|
+
* ghost
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
-->
|
|
26
|
+
<meta charset="UTF-8">
|
|
27
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
|
|
28
|
+
<title>Components - custom-element - Material Design</title>
|
|
29
|
+
<link href="../../custom-element/demo/wc-square.svg" rel="icon"/>
|
|
30
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
|
|
31
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=shift" /> <link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css"
|
|
32
|
+
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" rel="stylesheet"/>
|
|
33
|
+
|
|
34
|
+
<script type="importmap">
|
|
35
|
+
{
|
|
36
|
+
"imports": {
|
|
37
|
+
"@epa-wg/": "../../"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
<script src="../../custom-element/module-url.js" type="module"></script>
|
|
42
|
+
<script src="../../custom-element/custom-element.js" type="module"></script>
|
|
43
|
+
<style>
|
|
44
|
+
@import "../angular.css";
|
|
45
|
+
@import "../material.css";
|
|
46
|
+
@import "../theme/semantic.css";
|
|
47
|
+
@import "../theme/consumer-theme.css";
|
|
48
|
+
@import "../demo.css";
|
|
49
|
+
main{
|
|
50
|
+
display: flex; flex-wrap: wrap;
|
|
51
|
+
gap: 3rem;
|
|
52
|
+
padding: 5rem;
|
|
53
|
+
&>p{ min-width: 90%; }
|
|
54
|
+
html-demo-element
|
|
55
|
+
{ overflow: visible;
|
|
56
|
+
[slot="legend"]{ border-radius: 1rem 1rem 0 0; }
|
|
57
|
+
[slot="description"]{ padding: 0 1rem 1rem 1rem; dd{ padding: 0 !important;margin: 0; }}
|
|
58
|
+
[slot="description"] dd{ padding: 0; }
|
|
59
|
+
[slot="demo"]{ display: flex; gap: 2rem; align-items: center; justify-content: center;}
|
|
60
|
+
}
|
|
61
|
+
var{ color: darkgreen; font-weight: bold; }
|
|
62
|
+
flex-3x{ display: inline-flex; flex-wrap: wrap;gap:3rem; max-width:12rem;}
|
|
63
|
+
cem-action{display: inline-block;}
|
|
64
|
+
</style>
|
|
65
|
+
</head>
|
|
66
|
+
<!--
|
|
67
|
+
ToDO
|
|
68
|
+
* docs w/ how to use
|
|
69
|
+
-->
|
|
70
|
+
<body>
|
|
71
|
+
<template id="cem-action">
|
|
72
|
+
<attribute name="text"
|
|
73
|
+
aria-description="button text content. "
|
|
74
|
+
></attribute>
|
|
75
|
+
<attribute name="dot"
|
|
76
|
+
aria-description="attribute defines the small dot presentation without visible text. Default 'true' "
|
|
77
|
+
></attribute>
|
|
78
|
+
<attribute name="color"
|
|
79
|
+
aria-description="semantic colors. Default is 'primary'. Values: primary|secondary|success|alert"
|
|
80
|
+
></attribute>
|
|
81
|
+
<attribute name="align"
|
|
82
|
+
aria-description="Vertical & horizontal align. Default is 'top right'. Values: top|middle|bottom|left|center|right"
|
|
83
|
+
></attribute>
|
|
84
|
+
<attribute name="invisible"
|
|
85
|
+
aria-description="Boolean. Default is 'false'. Values: true|false"
|
|
86
|
+
></attribute>
|
|
87
|
+
<style>
|
|
88
|
+
& button{
|
|
89
|
+
display: flex; align-items: center; justify-content: center; gap:1em;
|
|
90
|
+
background-color: var(--cem-action-background-color);
|
|
91
|
+
color: var(--cem-action-color);
|
|
92
|
+
width: 100%;
|
|
93
|
+
}
|
|
94
|
+
&[color="secondary"]>*>dd{ background-color: var(--cem-action-color-secondary); }
|
|
95
|
+
&[color="success"]>*>dd{ background-color: var(--cem-action-color-success); }
|
|
96
|
+
&[color="alert"]>*>dd{ background-color: var(--cem-action-color-alert); }
|
|
97
|
+
|
|
98
|
+
</style>
|
|
99
|
+
<button><slot>{text}</slot></button>
|
|
100
|
+
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<custom-element hidden src="#cem-action" tag="cem-action"></custom-element>
|
|
104
|
+
<custom-element hidden src="./icon-link.html#cem-icon-link" tag="cem-icon-link"></custom-element>
|
|
105
|
+
<custom-element hidden src="./icon.html#cem-icon" tag="cem-icon"></custom-element>
|
|
106
|
+
|
|
107
|
+
<header class="cem-theme-teal">
|
|
108
|
+
<custom-element src="../index.html#nav-head"></custom-element>
|
|
109
|
+
</header>
|
|
110
|
+
<main>
|
|
111
|
+
<aside>
|
|
112
|
+
<p><code>cem-action</code> is button-looking component from <custom-element> Material suite based on the
|
|
113
|
+
<a href="https://m3.material.io/components/buttons/overview">Material Design specification for buttons</a>.<br/>
|
|
114
|
+
Action triggers the flow by changing the data <var>slice</var> or following the <var>href</var> attribute URL.
|
|
115
|
+
Inspired by <a href="https://mui.com/material-ui/react-button/">MUI</a>
|
|
116
|
+
</p>
|
|
117
|
+
<h1>Attributes</h1>
|
|
118
|
+
<div> <code>text</code> optional attribute defines the text inside the button.</div>
|
|
119
|
+
<div> <code>class</code> specific: <var>cem-bend-sharp</var>, <var>cem-bend-smooth</var>(default), <var>cem-bend-round</var>.</div>
|
|
120
|
+
<div> <code>href</code> TBD</div>
|
|
121
|
+
<div> <code>slice</code> TBD</div>
|
|
122
|
+
</aside>
|
|
123
|
+
|
|
124
|
+
<html-demo-element legend="Typical use">
|
|
125
|
+
<template>
|
|
126
|
+
<cem-action text="text in attribute" ></cem-action>
|
|
127
|
+
<cem-action> with icon <cem-icon image="search" ></cem-icon> </cem-action>
|
|
128
|
+
<cem-action class="cem-bend-sharp"> square border </cem-action>
|
|
129
|
+
<cem-action class="cem-bend-round"> round border </cem-action>
|
|
130
|
+
<cem-action class="cem-bend-round">
|
|
131
|
+
<cem-icon image="🛒"></cem-icon>
|
|
132
|
+
<div>round border <br/> multiline</div>
|
|
133
|
+
</cem-action>
|
|
134
|
+
</template>
|
|
135
|
+
</html-demo-element>
|
|
136
|
+
|
|
137
|
+
<html-demo-element legend="Bend">
|
|
138
|
+
<p slot="description">
|
|
139
|
+
Corner shape is defined by <var>--cem-bend</var>
|
|
140
|
+
</p>
|
|
141
|
+
<template></template>
|
|
142
|
+
<custom-element>
|
|
143
|
+
<template>
|
|
144
|
+
<style>
|
|
145
|
+
&>*{ display: flex; gap: 1rem; margin: 1rem; flex-wrap: wrap; justify-content: center;}
|
|
146
|
+
cem-action:first-of-type,cem-action:first-of-type+*{ width: 100%; text-align: center; }
|
|
147
|
+
</style>
|
|
148
|
+
<cem-action class="{//bend}" > default </cem-action>
|
|
149
|
+
<div class="material-symbols-outlined">shift</div>
|
|
150
|
+
<cem-action class="cem-bend-sharp" slice="bend" slice-event="click" slice-value="'cem-bend-sharp'"> square </cem-action>
|
|
151
|
+
<cem-action class="cem-bend-smooth" slice="bend" slice-event="click" slice-value="'cem-bend-smooth'"> smooth </cem-action>
|
|
152
|
+
<cem-action class="cem-bend-round" slice="bend" slice-event="click" slice-value="'cem-bend-round'"> round </cem-icon> </cem-action>
|
|
153
|
+
|
|
154
|
+
</template>
|
|
155
|
+
</custom-element>
|
|
156
|
+
</html-demo-element>
|
|
157
|
+
|
|
158
|
+
<html-demo-element legend="Variations">
|
|
159
|
+
<p slot="description">
|
|
160
|
+
|
|
161
|
+
</p>
|
|
162
|
+
<template>
|
|
163
|
+
<cem-action text="0" color="secondary"> <cem-icon image="far fa-envelope"></cem-icon> </cem-action>
|
|
164
|
+
<cem-action text="999+" > <cem-icon image="🛒" vertical="middle"></cem-icon> </cem-action>
|
|
165
|
+
<cem-action text="999+" dot > <cem-icon image="notifications" vertical="middle"></cem-icon> </cem-action>
|
|
166
|
+
</template>
|
|
167
|
+
</html-demo-element>
|
|
168
|
+
|
|
169
|
+
<html-demo-element legend="color attribute">
|
|
170
|
+
<p slot="description">
|
|
171
|
+
Semantic colors
|
|
172
|
+
</p>
|
|
173
|
+
<template>
|
|
174
|
+
<cem-action text="0" > <cem-icon image="✉"></cem-icon> </cem-action>
|
|
175
|
+
<cem-action text="1" color="primary" > <cem-icon image="✉"></cem-icon> </cem-action>
|
|
176
|
+
<cem-action text="2" color="secondary"> <cem-icon image="✉"></cem-icon> </cem-action>
|
|
177
|
+
<cem-action text="3" color="success" > <cem-icon image="✉"></cem-icon> </cem-action>
|
|
178
|
+
<cem-action text="4" color="alert" > <cem-icon image="✉"></cem-icon> </cem-action>
|
|
179
|
+
</template>
|
|
180
|
+
</html-demo-element>
|
|
181
|
+
|
|
182
|
+
<html-demo-element legend="custom color">
|
|
183
|
+
<p slot="description">
|
|
184
|
+
Override by CE
|
|
185
|
+
</p>
|
|
186
|
+
<template>
|
|
187
|
+
<custom-element>
|
|
188
|
+
<template>
|
|
189
|
+
<style>
|
|
190
|
+
&
|
|
191
|
+
{ --cem-action-text-color:red;
|
|
192
|
+
--cem-action-color:#FF08;
|
|
193
|
+
--cem-action-border: 1px blue solid;
|
|
194
|
+
cem-action dd{box-shadow: -2px 3px 8px blue;}
|
|
195
|
+
}
|
|
196
|
+
</style>
|
|
197
|
+
<cem-action text="123"> CUSTOM COLOR </cem-action>
|
|
198
|
+
</template>
|
|
199
|
+
</custom-element>
|
|
200
|
+
</template>
|
|
201
|
+
</html-demo-element>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<html-demo-element legend="invisible attribute">
|
|
205
|
+
<p slot="description">
|
|
206
|
+
hides button, animated
|
|
207
|
+
</p>
|
|
208
|
+
<template>
|
|
209
|
+
<custom-element>
|
|
210
|
+
<template>
|
|
211
|
+
<label>
|
|
212
|
+
<input type="checkbox" slice="is-checked" value="on" />
|
|
213
|
+
invisible</label>
|
|
214
|
+
<cem-action text="1" >
|
|
215
|
+
<if test="/datadom/slice/is-checked = 'on'">
|
|
216
|
+
<attribute name="invisible">on</attribute>
|
|
217
|
+
</if>
|
|
218
|
+
<cem-icon image="mail" ></cem-icon>
|
|
219
|
+
</cem-action>
|
|
220
|
+
|
|
221
|
+
<cem-action dot>
|
|
222
|
+
<if test="/datadom/slice/is-checked = 'on'">
|
|
223
|
+
<attribute name="invisible">on</attribute>
|
|
224
|
+
</if>
|
|
225
|
+
<cem-icon image="mail" ></cem-icon>
|
|
226
|
+
</cem-action>
|
|
227
|
+
</template>
|
|
228
|
+
</custom-element>
|
|
229
|
+
</template>
|
|
230
|
+
</html-demo-element>
|
|
231
|
+
|
|
232
|
+
<html-demo-element legend="align attribute">
|
|
233
|
+
<p slot="description">
|
|
234
|
+
sets vertical( top, middle, bottom ) and horizontal( left, center, right) button align.<br/>
|
|
235
|
+
Default is right top.
|
|
236
|
+
</p>
|
|
237
|
+
<template>
|
|
238
|
+
<flex-3x>
|
|
239
|
+
<cem-action text="1" align="left top" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
240
|
+
<cem-action text="2" align="center top" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
241
|
+
<cem-action text="3" align="right top" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
242
|
+
|
|
243
|
+
<cem-action text="4" align="left middle" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
244
|
+
<cem-action text="5" align="center middle" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
245
|
+
<cem-action text="6" align="right middle" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
246
|
+
|
|
247
|
+
<cem-action text="7" align="left bottom" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
248
|
+
<cem-action text="8" align="center bottom" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
249
|
+
<cem-action text="9" align="right bottom" ><cem-icon image="mail" ></cem-icon></cem-action>
|
|
250
|
+
</flex-3x>
|
|
251
|
+
</template>
|
|
252
|
+
</html-demo-element>
|
|
253
|
+
|
|
254
|
+
</main>
|
|
255
|
+
<footer>
|
|
256
|
+
<hr/>
|
|
257
|
+
<a href="../../LICENSE"> Code and documentation licensed under an Apache License 2.0 </a>
|
|
258
|
+
</footer>
|
|
259
|
+
<script src="https://unpkg.com/html-demo-element@1.0.8/html-demo-element.js" type="module"></script>
|
|
260
|
+
|
|
261
|
+
</body>
|
|
262
|
+
</html>
|