@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,339 @@
|
|
|
1
|
+
# Principles for Color & Outline‑Based Action Separation
|
|
2
|
+
|
|
3
|
+
> Scope: applies to components styled by `consumer-theme.css` following guidance in `src/material/theme/README.md`.
|
|
4
|
+
> States follow the `cem-action-state` listing from `src/material/theme/theme-data.xhtml`.
|
|
5
|
+
|
|
6
|
+
> **See also:** [`tokens/cem-stroke.md`](./tokens/cem-stroke.md) for the canonical D5 Stroke & Separation spec,
|
|
7
|
+
> which documents the stroke basis, semantic endpoints, and zebra indicator tokens in the CEM token framework.
|
|
8
|
+
|
|
9
|
+
## 1) Goals
|
|
10
|
+
|
|
11
|
+
* **Separation of concerns**: use **background color** for non-outline states; use **outline zebra** for **selection-, focus-, and target-intent**.
|
|
12
|
+
* **Theming-first**: variables map cleanly across `Native`, `Light`, `Dark`, `contrast-light`, `contrast-dark`.
|
|
13
|
+
* **System-aware**: in the `Native` theme, prefer system colors (`SelectedItem`, `SelectedItemText`, `Canvas`, `CanvasText`).
|
|
14
|
+
* **Accessible by default**: stripe contrast ≥ 3:1 at 1px/45° (or ≥ 4.5:1 for 2+ px optical width) against the adjacent stripe.
|
|
15
|
+
* **Non-invasive**: outlines never occlude content; backgrounds never mimic zebra for the three outline states.
|
|
16
|
+
|
|
17
|
+
## 2) State Model
|
|
18
|
+
|
|
19
|
+
* **Background-driven**: `default`, `hover`, `active`, `pending`, `disabled`.
|
|
20
|
+
* **Outline-driven (zebra)**: `selected`, `focused`, `target`.
|
|
21
|
+
* **Pending** uses **animated background**; outline, if present, remains the outline style for the corresponding intent.
|
|
22
|
+
|
|
23
|
+
### 2.1 `cem-action-state` map (exact list from `theme-data.xhtml`)
|
|
24
|
+
|
|
25
|
+
| `cem-action-state` | Tokens | Complimentary token | Description |
|
|
26
|
+
| ------------------ | ------------------------- | ------------------- | --------------------------------------------------- |
|
|
27
|
+
| disabled | color font marker | color-text | Disabled — greyed out |
|
|
28
|
+
| readonly | color outline font marker | color-text | Readonly — underline grayed in Material Design |
|
|
29
|
+
| editable | color outline font marker | color-text | Editable — underlined in Material Design |
|
|
30
|
+
| required | outline font marker | color-text | Required — often marked by star |
|
|
31
|
+
| default | color outline font marker | color-text | Default — baseline state (outlined or underlined) |
|
|
32
|
+
| indeterminate | color outline font marker | color-text | Indeterminate — partial/"select all" checkbox state |
|
|
33
|
+
| target | outline font marker | color-text | Target — element pointed by URL |
|
|
34
|
+
| focus | outline font marker | color-text | Focus — input focus outline |
|
|
35
|
+
| hover | color outline font marker | color-text | Hover — keyboard navigation highlight |
|
|
36
|
+
| selected | color font marker | color-text | Selected — menu/radio checked |
|
|
37
|
+
| active | color outline font marker | color-text | Active — pressed, darkest background emphasis |
|
|
38
|
+
| pending | color outline font marker | color-text | Pending — after active, action in progress |
|
|
39
|
+
|
|
40
|
+
**Rule of thumb**
|
|
41
|
+
|
|
42
|
+
* Only `selected`, `focused`, and `target` use the **zebra-outline** driver across themes.
|
|
43
|
+
* All other states are **background-driven**; in `contrast-*` modes, backgrounds are neutralized and stripes take over state signaling (see §4.4).
|
|
44
|
+
|
|
45
|
+
## 3) Visual Language
|
|
46
|
+
|
|
47
|
+
### 3.1 Background (non-outline states)
|
|
48
|
+
|
|
49
|
+
* Tokens (example names used below):
|
|
50
|
+
|
|
51
|
+
* `--cem-action-explicit-default-background`
|
|
52
|
+
* `--cem-action-explicit-hover-background`
|
|
53
|
+
* `--cem-action-explicit-active-background`
|
|
54
|
+
* `--cem-action-disabled-background`
|
|
55
|
+
* Semantic overlays (optional): `--cem-palette-comfort` (base surface), `--cem-palette-calm`, etc.
|
|
56
|
+
|
|
57
|
+
### 3.2 Outline Zebra (selection/focus/target)
|
|
58
|
+
|
|
59
|
+
* Zebra is a **striped outline** drawn outside the element box. It would use a zebra strip with own color for `selected`, `focused`, `target` (and base color for contrast theme), 3 and 4 strips accordingly.
|
|
60
|
+
* when zebra is not applicable, the action shown with 3D border look matching the button in browser. This border is reactive to the hover and active states. On hover widening the border outline and on press inverting the shadow direction.
|
|
61
|
+
* **Parameters** (per state, per theme):
|
|
62
|
+
|
|
63
|
+
* `--cem-zebra-strip-size`: 2 px. Recommended **2px** normal density; **1px** in compact UIs; ? **4px** for focus-visible.
|
|
64
|
+
* `--cem-zebra-color-1` , 2, 3, 4 the interleaving colors.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
> Implementation note: in default implementation the outline is implemented by `box-shadow`; Otherwise realize zebra outline via an **outline + border-image** or **mask‑composited pseudo-element** to keep backgrounds independent:
|
|
69
|
+
|
|
70
|
+
* Use `::after` positioned as an **outer ring** (via negative spread) and `mask: conic-gradient(...)` or `background: repeating-linear-gradient(...)`.
|
|
71
|
+
* Keep `pointer-events: none;` and respect `outline-offset`.
|
|
72
|
+
|
|
73
|
+
### 3.3 Required Marker (required)
|
|
74
|
+
|
|
75
|
+
uses a prefix/suffix marker like `*` (no zebra/background changes) with tokens and CSS hooks.
|
|
76
|
+
|
|
77
|
+
### 3.4 Animated or image background (pending)
|
|
78
|
+
|
|
79
|
+
**animated** or **image** backgrounds for temporary unavailable state like uploading in progress.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 4) Theme Recipes
|
|
84
|
+
|
|
85
|
+
Below are **per-theme stripe characteristics**. Each block defines **selected**, **focused**, and **target** zebra parameters, plus background mapping for other states. Variables reference either system colors or design tokens.
|
|
86
|
+
|
|
87
|
+
### 4.1 Native
|
|
88
|
+
|
|
89
|
+
**Intent**: honor OS/browser selection & canvas colors.
|
|
90
|
+
|
|
91
|
+
* **Focused (zebra)**
|
|
92
|
+
|
|
93
|
+
* `--cem-zebra-color-1: CanvasText;` focus-visible
|
|
94
|
+
* `--cem-zebra-color-1: Canvas;` unfocused
|
|
95
|
+
|
|
96
|
+
* **Selected (zebra)**
|
|
97
|
+
|
|
98
|
+
* `--cem-zebra-color-2: SelectedItem;` selected
|
|
99
|
+
* `--cem-zebra-color-2: SelectedItemText;` unselected
|
|
100
|
+
|
|
101
|
+
* **Target (zebra)**
|
|
102
|
+
|
|
103
|
+
* `--cem-zebra-color-3: SelectedItem;` marked by URL #
|
|
104
|
+
* `--cem-zebra-color-3: Canvas;` not marked
|
|
105
|
+
|
|
106
|
+
* **Background states**
|
|
107
|
+
|
|
108
|
+
* `default`: `--cem-palette-comfort` over `Canvas`.
|
|
109
|
+
* `hover`: slightly raised mix of comfort vs. accent (≥ 1.2× contrast vs default).
|
|
110
|
+
* `active`: darken by ~8–12% from hover.
|
|
111
|
+
* `pending`: **animated** (see §5) over the current background.
|
|
112
|
+
* `disabled`: reduce chroma + set text to `GrayText`; maintain ≥ 3:1 against surface.
|
|
113
|
+
|
|
114
|
+
**Fallbacks**: when system colors unavailable, map to tokens:
|
|
115
|
+
|
|
116
|
+
* `SelectedItem → var(--cem-accent-600)`; `SelectedItemText → var(--cem-ink-on-accent)`
|
|
117
|
+
* `Canvas → var(--cem-surface)`; `CanvasText → var(--cem-ink-strong)`
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### 4.2 Light, Dark (emotional palette backgrounds)
|
|
122
|
+
|
|
123
|
+
**Intent**: use emotional palette base and extreme tokens for background-driven states. Text tokens flip (`*-text-x`) when contrast requires.
|
|
124
|
+
|
|
125
|
+
* **Focused (zebra)**
|
|
126
|
+
|
|
127
|
+
* `--cem-zebra-color-1: var(--cem-palette-comfort-text, CanvasText)` focus-visible
|
|
128
|
+
* `--cem-zebra-color-1: var(--cem-invisible, --cem-palette-comfort)` unfocused
|
|
129
|
+
|
|
130
|
+
* **Selected (zebra)**
|
|
131
|
+
|
|
132
|
+
* `--cem-zebra-color-2: var(--cem-palette-trust, SelectedItem)` selected, blue
|
|
133
|
+
* `--cem-zebra-color-2: var(--cem-invisible, --cem-palette-comfort)` unselected, invisible
|
|
134
|
+
|
|
135
|
+
* **Target (zebra)**
|
|
136
|
+
|
|
137
|
+
* `--cem-zebra-color-3: var(--cem-palette-enthusiasm, SelectedItem)` marked by URL #
|
|
138
|
+
* `--cem-zebra-color-3: var(--cem-invisible, --cem-palette-comfort)` unfocused
|
|
139
|
+
|
|
140
|
+
* **Background states**
|
|
141
|
+
|
|
142
|
+
total 7 background-bound states: default and 3 states bellow and above.
|
|
143
|
+
|
|
144
|
+
From `disabled` toward `default` ( 3 states ) the conservative variation via `color-mix` goes towards base emotional color
|
|
145
|
+
***disabled*** color-mix(in srgb, var(--cem-palette-conservative ) 30%, var(--cem-palette-conservative-x ))
|
|
146
|
+
**readonly** color-mix(in srgb, var(--cem-palette-creativity ) 80%, var(--cem-palette-creativity-x ))
|
|
147
|
+
**editable** color-mix(in srgb, var(--cem-palette-creativity ) 90%, var(--cem-palette-creativity-x ))
|
|
148
|
+
***default*** var(--cem-palette-creativity )\
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
From `default` toward `active` (3 states) the colors intensify by `color-mix` and percent toward extreme variation on same emotional palette color.
|
|
152
|
+
***default*** var(--cem-palette-creativity )
|
|
153
|
+
***indeterminate*** : color-mix(in srgb, var(--cem-palette-creativity ) 90%, var(--cem-palette-creativity-x ))
|
|
154
|
+
***hover*** color-mix(in srgb, var(--cem-palette-creativity ) 70%, var(--cem-palette-creativity-x ))
|
|
155
|
+
***active*** color-mix(in srgb, var(--cem-palette-creativity ) 5%, var(--cem-palette-creativity-x ))\
|
|
156
|
+
|
|
157
|
+
> Note: `*-text-x` tokens invert automatically if background contrast falls below threshold (too dark in light theme or too light in dark theme).
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### 4.3 Dark
|
|
162
|
+
|
|
163
|
+
uses same tokens from emotional palette. The light and dark values are provided by `light-dark` CSS function over branded palette color `xl` and `xd` variations ( extra light and extra dark )\
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
--cem-palette-comfort: light-dark(var(--cem-color-cyan-xl), var(--cem-color-cyan-xd))
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The switch is done by the system or enforced by css rules
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
color-scheme: light;
|
|
173
|
+
color-scheme: dark;
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
### 4.4 High Contrast — `contrast-light` & `contrast-dark`
|
|
179
|
+
|
|
180
|
+
**Intent**: replace **all backgrounds** with zebra for state signaling; base surface remains `--cem-palette-comfort` (or `Canvas` in Native-like HC). The **main zebra stripe should match the *****************************************************************default***************************************************************** background** (e.g., `--cem-action-explicit-default-background`) to preserve color semantics.
|
|
181
|
+
|
|
182
|
+
> Rule: **Backgrounds become neutral surface**, stripes carry intent.
|
|
183
|
+
|
|
184
|
+
`--cem-zebra-color-1` would match the intent base color and variations as in background for light/dark theme.
|
|
185
|
+
other `--cem-zebra-color-x` would be shifted by 1 zebra stripes of base palettes.
|
|
186
|
+
I.e. `--cem-zebra-color-2` selected, `--cem-zebra-color-3` focus, `--cem-zebra-color-3` target.
|
|
187
|
+
|
|
188
|
+
**contrast-light**
|
|
189
|
+
|
|
190
|
+
* Base surface: `--cem-palette-comfort` (or `Canvas`).
|
|
191
|
+
* For **all states**:
|
|
192
|
+
|
|
193
|
+
* `--cem-hc-zebra-main: var(--cem-action-explicit-default-background);`
|
|
194
|
+
* `--cem-hc-zebra-alt: var(--cem-ink-strong);` (ensures ≥ 7:1 against surface)
|
|
195
|
+
* Apply zebra to **outline**; **suppress background color** to base surface.
|
|
196
|
+
|
|
197
|
+
**contrast-dark**
|
|
198
|
+
|
|
199
|
+
* Base surface: dark comfort: `--cem-palette-comfort-dark` (or `Canvas` under forced colors).
|
|
200
|
+
* For **all states**:
|
|
201
|
+
|
|
202
|
+
* `--cem-hc-zebra-main: var(--cem-action-explicit-default-background-dark);`
|
|
203
|
+
* `--cem-hc-zebra-alt: var(--cem-ink-on-surface);` (ensures ≥ 7:1)
|
|
204
|
+
|
|
205
|
+
**State differentiation in HC** (applies to both light/dark):
|
|
206
|
+
|
|
207
|
+
* **selected**: thicker outline (**+1px**).
|
|
208
|
+
* **focused**: keep size 8px, colors `Canvas`/`CanvasText` when available; otherwise `main/alt` with reduced motion.
|
|
209
|
+
* **target**: pulse opacity of zebra (not movement) for 1–2s when revealed.
|
|
210
|
+
* **hover/active**: adjust **stripe duty** (hover: 0.4, active: 0.6) rather than background.
|
|
211
|
+
* **pending**: animate **phase shift** of zebra (see §5) instead of background fill.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 5) Pending State Animation (background‑based)
|
|
216
|
+
|
|
217
|
+
* Pattern: `repeating-linear-gradient(var(--cem-pending-angle, 45deg), color-stop-1, color-stop-1 <duty*size>, color-stop-2 0, color-stop-2 <size>)`.
|
|
218
|
+
* Colors: `--cem-pending-color-1` / `--cem-pending-color-2` chosen from the action’s default bg ± contrast bump.
|
|
219
|
+
* Motion: translate background position **120–160% per 2s** (prefers-reduced-motion: reduce to 10% and stop on focus).
|
|
220
|
+
* Ensure **outline zebra remains visible** above the animated background (z-index layering through pseudo-element ordering).
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 6) CSS Reference Snippets
|
|
225
|
+
|
|
226
|
+
### 6.1 Zebra Outline via Pseudo‑Element
|
|
227
|
+
|
|
228
|
+
```css
|
|
229
|
+
.cem-outline-zebra {
|
|
230
|
+
position: relative;
|
|
231
|
+
outline: none; /* avoid double rings */
|
|
232
|
+
}
|
|
233
|
+
.cem-outline-zebra::after {
|
|
234
|
+
content: "";
|
|
235
|
+
position: absolute;
|
|
236
|
+
inset: calc(-1 * var(--cem-zebra-thickness, 3px));
|
|
237
|
+
border-radius: calc(var(--cem-zebra-radius, 8px) + var(--cem-zebra-thickness, 3px));
|
|
238
|
+
pointer-events: none;
|
|
239
|
+
background:
|
|
240
|
+
repeating-linear-gradient(
|
|
241
|
+
var(--cem-zebra-angle,45deg),
|
|
242
|
+
var(--cem-zebra-color-1, Canvas), 0,
|
|
243
|
+
var(--cem-zebra-color-1, Canvas) calc(var(--cem-zebra-size,6px) * var(--cem-zebra-duty,.5)),
|
|
244
|
+
var(--cem-zebra-color-2, CanvasText) 0,
|
|
245
|
+
var(--cem-zebra-color-2, CanvasText) var(--cem-zebra-size,6px)
|
|
246
|
+
);
|
|
247
|
+
-webkit-mask:
|
|
248
|
+
radial-gradient(circle, transparent calc(100% - var(--cem-zebra-thickness,3px)), black 0);
|
|
249
|
+
mask:
|
|
250
|
+
radial-gradient(circle, transparent calc(100% - var(--cem-zebra-thickness,3px)), black 0);
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### 6.2 Pending Background Animation
|
|
255
|
+
|
|
256
|
+
```css
|
|
257
|
+
.cem-pending {
|
|
258
|
+
--cem-pending-color-1: color-mix(in oklab, var(--cem-action-explicit-default-background), black 6%);
|
|
259
|
+
--cem-pending-color-2: color-mix(in oklab, var(--cem-action-explicit-default-background), white 6%);
|
|
260
|
+
background:
|
|
261
|
+
repeating-linear-gradient(
|
|
262
|
+
var(--cem-pending-angle, 45deg),
|
|
263
|
+
var(--cem-pending-color-1), 0,
|
|
264
|
+
var(--cem-pending-color-1) 8px,
|
|
265
|
+
var(--cem-pending-color-2) 0,
|
|
266
|
+
var(--cem-pending-color-2) 16px
|
|
267
|
+
);
|
|
268
|
+
background-size: 200% 200%;
|
|
269
|
+
animation: cem-pending-shift 2s linear infinite;
|
|
270
|
+
}
|
|
271
|
+
@media (prefers-reduced-motion: reduce) {
|
|
272
|
+
.cem-pending { animation: none; }
|
|
273
|
+
}
|
|
274
|
+
@keyframes cem-pending-shift {
|
|
275
|
+
to { background-position: 160% 0; }
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### 6.3 High‑Contrast Forcing
|
|
280
|
+
|
|
281
|
+
```css
|
|
282
|
+
.cem-contrast { /* toggled for contrast-light or contrast-dark */
|
|
283
|
+
--cem-surface: var(--cem-palette-comfort, Canvas);
|
|
284
|
+
background: var(--cem-surface) !important; /* backgrounds neutralized */
|
|
285
|
+
}
|
|
286
|
+
.cem-contrast.cem-outline-zebra::after {
|
|
287
|
+
--cem-zebra-color-1: var(--cem-hc-zebra-main);
|
|
288
|
+
--cem-zebra-color-2: var(--cem-hc-zebra-alt);
|
|
289
|
+
--cem-zebra-thickness: 4px;
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## 7) Accessibility & QA
|
|
296
|
+
|
|
297
|
+
* Confirm **adjacent-stripe contrast** (WCAG 2.2) and **text vs. base surface**.
|
|
298
|
+
* Support **forced-colors**: map stripe tokens to `SelectedItem`/`SelectedItemText`/`Canvas`/`CanvasText` where possible.
|
|
299
|
+
* Respect `` to prevent clipping in dense layouts.
|
|
300
|
+
* Provide **RTL-aware angle**: flip to `-45deg` under `:dir(rtl)`.
|
|
301
|
+
* Provide **token fallbacks** for legacy browsers.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## 8) Token Summary (suggested)
|
|
306
|
+
|
|
307
|
+
```css
|
|
308
|
+
:root {
|
|
309
|
+
/* Base */
|
|
310
|
+
--cem-surface: Canvas;
|
|
311
|
+
--cem-ink-strong: CanvasText;
|
|
312
|
+
--cem-accent-600: #2a7af7; /* example */
|
|
313
|
+
--cem-ink-on-accent: white;
|
|
314
|
+
--cem-action-explicit-default-background: #e8f0fe;
|
|
315
|
+
--cem-action-explicit-default-background-dark: #14325f;
|
|
316
|
+
|
|
317
|
+
/* Zebra defaults */
|
|
318
|
+
--cem-zebra-angle: 45deg;
|
|
319
|
+
--cem-zebra-size: 6px;
|
|
320
|
+
--cem-zebra-duty: .5;
|
|
321
|
+
--cem-zebra-thickness: 3px;
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## 9) Migration Notes for `consumer-theme.css`
|
|
328
|
+
|
|
329
|
+
* Apply `.cem-outline-zebra` to components requiring `selected`, `focused`, `target` rings.
|
|
330
|
+
* Set tokens per theme scope (`.cem-theme-native`, `.cem-theme-light`, `.cem-theme-dark`, `.cem-theme-contrast-light`, `.cem-theme-contrast-dark`).
|
|
331
|
+
* Ensure `pending` keeps animated background while preserving zebra outline on top (pseudo-element stacking index).
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
**Outcome**: States are unambiguous: **color fills** for general interaction; **zebra outlines** for selection/focus/targets; **HC modes** rely solely on zebra for state signaling while base surfaces remain constant.
|
|
336
|
+
|
|
337
|
+
## 10) Source of truth
|
|
338
|
+
|
|
339
|
+
The declarative schema is defined in `theme-data.xhtml` file. It is translated to css by `theme-generate.html` into `consumer-theme.css` CLI TBD.
|