@epa-wg/custom-element-dist 0.0.33 → 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.
Files changed (175) hide show
  1. package/.claude/settings.local.json +18 -0
  2. package/.github/workflows/deploy.yml +59 -0
  3. package/.idea/copilot.data.migration.agent.xml +6 -0
  4. package/.idea/copilot.data.migration.ask.xml +6 -0
  5. package/.idea/copilot.data.migration.edit.xml +6 -0
  6. package/.idea/custom-element-dist.iml +2 -0
  7. package/.storybook/main.ts +20 -17
  8. package/.storybook/preview.ts +23 -23
  9. package/README.md +6 -4
  10. package/coverage/block-navigation.js +1 -1
  11. package/coverage/coverage-final.json +4 -3
  12. package/coverage/index.html +34 -19
  13. package/coverage/sorter.js +21 -7
  14. package/coverage/src/custom-element/coverage.svg +1 -1
  15. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  16. package/coverage/src/custom-element/custom-element.js.html +435 -378
  17. package/coverage/src/custom-element/http-request.js/coverage.svg +1 -1
  18. package/coverage/src/custom-element/http-request.js.html +38 -17
  19. package/coverage/src/custom-element/index.html +26 -26
  20. package/coverage/src/custom-element/local-storage.js.html +1 -1
  21. package/coverage/src/custom-element/location-element.js.html +1 -1
  22. package/coverage/src/custom-element/module-url.js.html +1 -1
  23. package/coverage/src/index.html +1 -1
  24. package/coverage/src/material/theme/colors.js/coverage.svg +10 -0
  25. package/coverage/src/material/theme/colors.js.html +217 -0
  26. package/coverage/src/material/theme/coverage.svg +10 -0
  27. package/coverage/src/material/theme/index.html +116 -0
  28. package/coverage/src/mocks/handlers.ts.html +1 -1
  29. package/coverage/src/mocks/index.html +1 -1
  30. package/coverage/src/stories/frame.canvas.ts.html +1 -1
  31. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  32. package/coverage/src/stories/index.html +1 -1
  33. package/coverage/src/stories/testStoryBook.ts.html +12 -12
  34. package/coverage/src/sum.ts.html +1 -1
  35. package/dist/{custom-element-WnOqmEOe.js → custom-element-BoYMoUtP.js} +193 -183
  36. package/dist/custom-element-BqtjrCRF.cjs +97 -0
  37. package/dist/custom-element-bundle.cjs +1 -1
  38. package/dist/custom-element-bundle.js +3 -3
  39. package/dist/demo/a.html +10 -3
  40. package/dist/demo/a.svg +26 -26
  41. package/dist/demo/html-template.html +4 -3
  42. package/dist/demo/s.xml +3856 -67
  43. package/dist/demo/s.xslt +13 -72
  44. package/dist/demo/s1.xml +3706 -0
  45. package/dist/http-request-DSaowcG1.cjs +1 -0
  46. package/dist/{http-request-BOvP4KTl.js → http-request-DTCzZ1gc.js} +15 -9
  47. package/package.json +2 -2
  48. package/public/demo/a.html +10 -3
  49. package/public/demo/a.svg +26 -26
  50. package/public/demo/html-template.html +4 -3
  51. package/public/demo/s.xml +3856 -67
  52. package/public/demo/s.xslt +13 -72
  53. package/public/demo/s1.xml +3706 -0
  54. package/src/custom-element/custom-element.js +28 -9
  55. package/src/custom-element/demo/a.html +10 -3
  56. package/src/custom-element/demo/a.svg +26 -26
  57. package/src/custom-element/demo/html-template.html +4 -3
  58. package/src/custom-element/demo/s.xml +3856 -67
  59. package/src/custom-element/demo/s.xslt +13 -72
  60. package/src/custom-element/demo/s1.xml +3706 -0
  61. package/src/custom-element/http-request.js +7 -0
  62. package/src/custom-element/ide/web-types-dce.json +1 -1
  63. package/src/custom-element/ide/web-types-xsl.json +1 -1
  64. package/src/material/angular.css +987 -987
  65. package/src/material/components/action.html +262 -0
  66. package/src/material/components/autocomplete.html +167 -239
  67. package/src/material/components/badge.html +238 -239
  68. package/src/material/components/dropdown.html +0 -1
  69. package/src/material/components/icon-link.html +160 -161
  70. package/src/material/components/icon.html +251 -252
  71. package/src/material/components/input.html +569 -570
  72. package/src/material/components/menu.html +235 -236
  73. package/src/material/components.html +157 -158
  74. package/src/material/demo.css +36 -36
  75. package/src/material/index.html +109 -110
  76. package/src/material/material.css +356 -356
  77. package/src/material/theme/Base-Principles.md +339 -0
  78. package/src/material/theme/README.md +298 -18
  79. package/src/material/theme/UI Domain Model in web applications.svg +1 -0
  80. package/src/material/theme/User Semantic Theme tokens.svg +1 -0
  81. package/src/material/theme/action-pending-poc.html +62 -0
  82. package/src/material/theme/actions-color.html +141 -0
  83. package/src/material/theme/colors-light.html +631 -0
  84. package/src/material/theme/colors-native.html +51 -0
  85. package/src/material/theme/colors-poc.html +66 -0
  86. package/src/material/theme/colors.html +297 -0
  87. package/src/material/theme/colors.js +44 -0
  88. package/src/material/theme/consumer-theme.css +745 -0
  89. package/src/material/theme/semantic.css +132 -132
  90. package/src/material/theme/style-bug.html +123 -0
  91. package/src/material/theme/theme-data.css +43 -0
  92. package/src/material/theme/theme-data.xhtml +2926 -0
  93. package/src/material/theme/todo.md +274 -0
  94. package/src/material/theme/tokens/action-colors.png +0 -0
  95. package/src/material/theme/tokens/cem-article-illustration-4x1-letterbox-2000x500.png +0 -0
  96. package/src/material/theme/tokens/cem-breakpoints.md +519 -0
  97. package/src/material/theme/tokens/cem-colors.md +715 -0
  98. package/src/material/theme/tokens/cem-consumerflow-typography-matrix.svg +198 -0
  99. package/src/material/theme/tokens/cem-coupling.md +372 -0
  100. package/src/material/theme/tokens/cem-data-vs-reading-numerals.svg +164 -0
  101. package/src/material/theme/tokens/cem-dimension.md +625 -0
  102. package/src/material/theme/tokens/cem-layering.md +562 -0
  103. package/src/material/theme/tokens/cem-m3-parity.md +343 -0
  104. package/src/material/theme/tokens/cem-responsive.md +238 -0
  105. package/src/material/theme/tokens/cem-shape.md +691 -0
  106. package/src/material/theme/tokens/cem-stroke-density-illustration-4to1-v3.svg +102 -0
  107. package/src/material/theme/tokens/cem-stroke.md +480 -0
  108. package/src/material/theme/tokens/cem-timing.md +198 -0
  109. package/src/material/theme/tokens/cem-typography-model-stack.svg +64 -0
  110. package/src/material/theme/tokens/cem-voice-fonts-typography.md +718 -0
  111. package/src/material/theme/tokens/cem-voice-ladder.svg +91 -0
  112. package/src/material/theme/tokens/chips.png +0 -0
  113. package/src/material/theme/tokens/columns-page.png +0 -0
  114. package/src/material/theme/tokens/initials.png +0 -0
  115. package/src/material/theme/tokens/nav-buttons.png +0 -0
  116. package/src/material/theme/tokens/script.png +0 -0
  117. package/src/material/theme/tokens/sufler.png +0 -0
  118. package/src/material/theme/tokens/typography-icons.png +0 -0
  119. package/src/mocks/versions.mock.ts +1 -1
  120. package/src/stories/__screenshots__/dom-merge.test.stories.ts/dom-merge-dom-merge-OrderPreservingOn2ndTransform-1.png +0 -0
  121. package/src/stories/__screenshots__/xslt-conditionals.test.stories.ts/xslt-conditionals-xslt-conditionals-MultipleIfOrderingWorkaround-1.png +0 -0
  122. package/src/stories/dom-merge.test.stories.ts +25 -1
  123. package/src/stories/xslt-conditionals.test.stories.ts +492 -0
  124. package/src/stories/xslt-if.test.stories.ts +89 -0
  125. package/storybook-static/assets/{Color-F6OSRLHC-Cbp293x2.js → Color-F6OSRLHC-CzTOSlqB.js} +1 -1
  126. package/storybook-static/assets/{Configure-BrFr4SLE.js → Configure-7GqRsAoJ.js} +1 -1
  127. package/storybook-static/assets/{DocsRenderer-CFRXHY34-DhHzJiIO.js → DocsRenderer-CFRXHY34-Duc5rSIm.js} +2 -2
  128. package/storybook-static/assets/{attributes.test.stories-Gg9LQTEK.js → attributes.test.stories-DYuxF8h1.js} +1 -1
  129. package/storybook-static/assets/{css.test.stories-B_3ltOrx.js → css.test.stories-LOmvINyb.js} +1 -1
  130. package/storybook-static/assets/{custom-element-CPnvJnn8.js → custom-element-Bwx7otrT.js} +6 -6
  131. package/storybook-static/assets/{dom-merge.test.stories-nQxcgLoM.js → dom-merge.test.stories-CEKhWjaS.js} +47 -6
  132. package/storybook-static/assets/entry-preview-BNCt9WBs.js +26 -0
  133. package/storybook-static/assets/{entry-preview-docs-Dwczwtsc.js → entry-preview-docs-CbF8-81D.js} +2 -2
  134. package/storybook-static/assets/{external-template.test.stories-DZ-rjnfd.js → external-template.test.stories-jHu0wsJ-.js} +1 -1
  135. package/storybook-static/assets/{form.test.stories-DQhPYtMj.js → form.test.stories-CUyUnmwP.js} +1 -1
  136. package/storybook-static/assets/{frame.canvas-ClTqYyMN.js → frame.canvas-E5n9h6j1.js} +1 -1
  137. package/storybook-static/assets/{handlers-CLkps6Nz.js → handlers-F7GUfMqr.js} +1 -1
  138. package/storybook-static/assets/http-request-BWeEEBkP.js +1 -0
  139. package/storybook-static/assets/{http-request.stories-jo0f73nw.js → http-request.stories-wyX5-QOv.js} +1 -1
  140. package/storybook-static/assets/{iframe-CZwRpnn9.js → iframe-BS_DPWl0.js} +11 -11
  141. package/storybook-static/assets/{index-Dr4PwNfd.js → index-CGuyH0k-.js} +87 -87
  142. package/storybook-static/assets/{index-CJQtnF9V.js → index-DB7LLObI.js} +1 -1
  143. package/storybook-static/assets/index-DO1nmyvI.js +11 -0
  144. package/storybook-static/assets/{index-B68YUdzy.js → index-V1EGs-wm.js} +3 -3
  145. package/storybook-static/assets/{local-storage.test.stories-uA5EKRPf.js → local-storage.test.stories-BxOhsf1k.js} +1 -1
  146. package/storybook-static/assets/{location-element.test.stories-Cu-6Elcg.js → location-element.test.stories-DqhvvUoa.js} +1 -1
  147. package/storybook-static/assets/{module-url.test.stories-CD_wusXQ.js → module-url.test.stories-C1gG9G7Y.js} +1 -1
  148. package/storybook-static/assets/{preview-BFlNN3Wj.js → preview-Bn8igYMp.js} +1 -1
  149. package/storybook-static/assets/{preview-CuCH40jj.js → preview-Cwy1XFu2.js} +2 -2
  150. package/storybook-static/assets/{preview-Cm4PPhHS.js → preview-D6sehqkw.js} +1 -1
  151. package/storybook-static/assets/{set-url.test.stories-CY7B9BVZ.js → set-url.test.stories-BKQNdknJ.js} +1 -1
  152. package/storybook-static/assets/{slice-events.test.stories-BVnPXm6e.js → slice-events.test.stories-ChqULCeA.js} +1 -1
  153. package/storybook-static/assets/{slots.test.stories-Dxsa9KdA.js → slots.test.stories-BlyLoCRe.js} +1 -1
  154. package/storybook-static/assets/{version-select.test.stories-Buga1PAa.js → version-select.test.stories-CPGSh1tR.js} +1 -1
  155. package/storybook-static/assets/xslt-conditionals.test.stories-YC6QPqWZ.js +633 -0
  156. package/storybook-static/assets/xslt-if.test.stories-BRSWy2-x.js +71 -0
  157. package/storybook-static/demo/a.html +10 -3
  158. package/storybook-static/demo/a.svg +26 -26
  159. package/storybook-static/demo/html-template.html +4 -3
  160. package/storybook-static/demo/s.xml +3856 -67
  161. package/storybook-static/demo/s.xslt +13 -72
  162. package/storybook-static/demo/s1.xml +3706 -0
  163. package/storybook-static/iframe.html +2 -2
  164. package/storybook-static/index.json +1 -1
  165. package/storybook-static/project.json +1 -1
  166. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +69 -66
  167. package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +62 -59
  168. package/dist/custom-element-6slVaFEs.cjs +0 -97
  169. package/dist/http-request-DPrY7mGh.cjs +0 -1
  170. package/storybook-static/assets/attributes.test.stories-CzWkKw0e.js +0 -1
  171. package/storybook-static/assets/entry-preview-DHVXbf3x.js +0 -26
  172. package/storybook-static/assets/external-template.test.stories-BivZqBTp.js +0 -1
  173. package/storybook-static/assets/http-request-DNq59pnj.js +0 -1
  174. package/storybook-static/assets/index-BwkS7JH_.js +0 -8
  175. package/storybook-static/assets/module-url.test.stories-CTjUAk3J.js +0 -1
@@ -1,18 +1,298 @@
1
- # Semantic theming
2
- Based on https://blog.firsov.net/search/label/Semantic%20Theme
3
-
4
-
5
- # Line thickness, stroke weight
6
- [Typography Guide Part 2: Weight and Width](https://creativebeacon.com/typography-guide-part-2-weight-and-width/)
7
- The different weights can be
8
- * **xx-light** ultra thin or ultra light,
9
- * **x-light** extra light,
10
- * **light**
11
- * **normal** or roman,
12
- * **bold**
13
- * **x-bold** extra bold,
14
- * **xx-bold** ultra bold or black,
15
-
16
- # Text Tracking/Spacing
17
- [wiki](https://en.wikipedia.org/wiki/Letter_spacing),
18
- [units](https://css-tricks.com/keeping-track-letter-spacing-guidelines/)
1
+ # custom-element Material (CEM) - Consumer Semantic theming
2
+ Based on https://blog.firsov.net/search/label/Semantic%20Theme
3
+
4
+ # Basic principles
5
+ [Consumer Semantic Theme tokens](https://github.com/EPA-WG/custom-element-dist/discussions/14)
6
+
7
+ ## Variations limit
8
+ [7 design tockens](https://blog.firsov.net/2025/04/7-ux-design-tokens.html)
9
+ as Pattern Recognition and Short-term Memory Capacity.
10
+
11
+ ## Values proximity
12
+ TBD
13
+
14
+ Potential reasoning
15
+ * The maximized distance across available range. While the base is outlined more of less strictly, how to choose the max value?
16
+ Extreme light conditions like bright or dark surrounding environment, would elevate the need for high contrast.
17
+ By either main light theme palette or availability of high contrast color themes and their automatic switch.
18
+ * Assured difference to guarantee the step recognition as next to each other as in mixed content.
19
+ * Targeted Device capabilities. Some rare devices still have bo be accounted for niche markets.
20
+ The e-paper with black/white, shades of grey, limited color palette better to be accounted for when app serves
21
+ the hand-writing and wanted to be listed in compatible apps list. In addition to color palette, such devices are sensitive to
22
+ the change speed which on its own depends on the color/brightness difference.
23
+
24
+
25
+ # Semantic Colors
26
+
27
+ | `color-` token | | sample |
28
+ |------------------|-----------------------------------------------------------|-----------------|
29
+ | `focus` | main reading background, text color for `focus-invert` | comfort |
30
+ | `focus-invert` | alternative reading background, text color for `focus` | calm |
31
+ | ---------------- | --------------------------------------------------------- | --------------- |
32
+ | `attention` | title,primary action background, current selection | trust |
33
+ | `alert` | alert action background, error message color | danger |
34
+ | `brand-1` | 1st emotional color, mostly for interleaving backgrounds | ? creativity |
35
+ | `brand-2` | 2nd emotional color, mostly for interleaving backgrounds | ? enthusiasm |
36
+ | `brand-3` | 3rd emotional color, mostly for interleaving backgrounds | ? conservative |
37
+
38
+ Semantic colors should be expressed via emotional palette tokens.
39
+ 7 base colors limit.
40
+
41
+ On `theme variant`( light,dark,contrast-dark...) those base colors can have shift to matching variant brightness.
42
+ ## color accent
43
+ The base colors are used in static UX when user interaction not yet engaged. The slight but noticeable base color change is
44
+ used for `elevation` or element state.
45
+ ### Elevation
46
+
47
+ <details>
48
+ <summary> the concept of elevation of surface </summary>
49
+
50
+ In UI design, layer elevation refers to a technique using shadows and layering to create a sense of depth and hierarchy
51
+ between UI elements.
52
+ It helps distinguish elements, like floating action buttons or cards, suggesting which ones are above others.
53
+
54
+ Elevations are essentially surfaces with visual layering that forms the foundation of the UI, creating a canvas
55
+ for other elements like text, icons, and layers with own backgrounds.
56
+
57
+ Any visual grouping like the headers often representing the content hierarchy and along with content can be presented as layers.
58
+
59
+ </details>
60
+
61
+ Layering includes as the visual impression for popping out by adding the shadows, outlines, as the slight surface color change.
62
+ Usually in the direction to opposite brightness ( i.e. for light background the elevated surface would become darker ).
63
+
64
+ The number of elevations usually is limited, but for in-depth incrementally detailed scenes, the number of layers can
65
+ become unlimited. In such case the layer darkening would not work efficiently. Instead, the same brightness color shift
66
+ would give a bigger number of color variations. Which is still limited. To make UI serving unlimited elevations,
67
+ the shifted colors would need a rotation - start the sequence again once reached the last variation in the sequence.
68
+
69
+ <details>
70
+ <summary>Conflict with interleaving sequences</summary>
71
+ while the elevation meant to reflect the difference in hierarchy, the sequential
72
+ same level content needs the distinguishing of the zones in same hierarchy location. The good sample is the article section
73
+ in the list of articles. <br/>
74
+ Usually apps use either elevation or interleaving but not both in same visual content/page/screen.
75
+ What to do if interleaving would be needed on the surface with same elevation?
76
+ There is no golden solution, but other means than color can help there: The elevation would use the popping effect, the
77
+ interleaving sections would be separated by visual separation. The colors then would use the brightness for elevation
78
+ and color shift for interleaving (or wise versa but always keeping the same principle for own presentation ).
79
+ </details>
80
+
81
+ ### element state
82
+
83
+ <details><summary>
84
+ A reflection of element change due to user interaction or result of flow state change
85
+ </summary>
86
+
87
+ </details>
88
+
89
+ #### HTML5 element states by props and pseudo-class
90
+
91
+ | prop | semantic token | description |
92
+ |-----------------|----------------|---------------------------------------------------------------------|
93
+ | default | | base color |
94
+ | checked | selected | |
95
+ | disabled | . | |
96
+ | readonly | . | |
97
+ | contentEditable | editable | editable |
98
+ | required | . | |
99
+ | indeterminate | . | "select all" checkbox when not all of its sub-controls are checked. |
100
+
101
+ | pseudo-class | semantic token | description |
102
+ |---------------|----------------|--------------------------------------------------------------------|
103
+ | active | . | pressed down |
104
+ | focus | . | no visual effect, focus outline is not shown |
105
+ | focus-visible | . | focus triggered by keyboard, triggers outline |
106
+ | hover | . | mouse over |
107
+ | focus-within | . | focus on child element, outline on CE and hide outline on children |
108
+ | target | . | element which matched #id in URL |
109
+ | read-write | editable | is editable by the user |
110
+ | indeterminate | . | no value available |
111
+
112
+ #### transitional states
113
+
114
+ * `pending` usually associated with state change when the component temporary is not available and expected to be resolved
115
+ to another "permanent" state. Applied often to single component(input, button) or group (form, fieldset) during
116
+ data retrieval period or action completion.
117
+ * `in-progress` usually associated with system activities like module loading, often accompanied by "loading..." animation.
118
+
119
+ Both, `pending` and `in-progress`, do not have the HTML5 reflection but implemented by frameworks.
120
+
121
+ ### state, elevation, interleaving colors choice
122
+
123
+ 1. The colors of these categories must not overlap and should be sufficiently distinct to ensure clear differentiation.
124
+ 2. The state begins with "normal" base color and ends with shift which would trigger the reversing the text color.
125
+ ( i.e. if text is black on light background initially, on final `active` state the text would become light as the background
126
+ brightness becomes too dark to keep the text black )
127
+
128
+ <button style="background-color:#abc7ff;color:black">default</button>
129
+ <button style="background-color:#7cabff;color:black">hover</button>
130
+ <button style="background-color:#0074e9;color:white">pressed</button>
131
+
132
+ 3. Interleaving and elevation should not be drastically different and should NOT cross the brightness level which would
133
+ trigger the change of content text color.
134
+
135
+ Example of colors sequence with shift by brightness or color wheel.
136
+
137
+ The tokens sequence in low to more emphasized importance/attention:
138
+
139
+
140
+ | token | bg | light | dark | contrast-dark | contrast-light |
141
+ |----------------|------|--------------------------------------|-------------------------------------|----------------------------------------------|-----------------------------------------------|
142
+ | disabled | | <b class="light disabled">*</b> | <b class="dark disabled">*</b> | <b class="contrast-dark disabled">*</b> | <b class="contrast-light disabled">*</b> |
143
+ | readonly | | <b class="light readonly">*</b> | <b class="dark readonly">*</b> | <b class="contrast-dark readonly">*</b> | <b class="contrast-light readonly">*</b> |
144
+ | editable | ^1 | <b class="light editable">*</b> | <b class="dark editable">*</b> | <b class="contrast-dark editable">*</b> | <b class="contrast-light editable">*</b> |
145
+ | required | no | <b class="light required">*</b> | <b class="dark required">*</b> | <b class="contrast-dark required">*</b> | <b class="contrast-light required">*</b> |
146
+ | default | base | <b class="light default">*</b> | <b class="dark default">*</b> | <b class="contrast-dark default">*</b> | <b class="contrast-light default">*</b> |
147
+ | indeterminate | no | <b class="light target">*</b> | <b class="dark target">*</b> | <b class="contrast-dark target">*</b> | <b class="contrast-light target">*</b> |
148
+ | target | no | <b class="light target">*</b> | <b class="dark target">*</b> | <b class="contrast-dark target">*</b> | <b class="contrast-light target">*</b> |
149
+ | focus-within | no | <b class="light focus-within">*</b> | <b class="dark focus-within">*</b> | <b class="contrast-dark focus-within">*</b> | <b class="contrast-light focus-within">*</b> |
150
+ | focus | no | <b class="light focus">*</b> | <b class="dark focus">*</b> | <b class="contrast-dark focus">*</b> | <b class="contrast-light focus">*</b> |
151
+ | focus-visible | no | <b class="light focus-visible">*</b> | <b class="dark focus-visible">*</b> | <b class="contrast-dark focus-visible">*</b> | <b class="contrast-light focus-visible">*</b> |
152
+ | hover | | <b class="light hover">*</b> | <b class="dark hover">*</b> | <b class="contrast-dark hover">*</b> | <b class="contrast-light hover">*</b> |
153
+ | selected | | <b class="light selected">*</b> | <b class="dark selected">*</b> | <b class="contrast-dark selected">*</b> | <b class="contrast-light selected">*</b> |
154
+ | active | | <b class="light active">*</b> | <b class="dark active">*</b> | <b class="contrast-dark active">*</b> | <b class="contrast-light active">*</b> |
155
+ | pending | ^2 | <b class="light pending">*</b> | <b class="dark pending">*</b> | <b class="contrast-dark pending">*</b> | <b class="contrast-light pending">*</b> |
156
+
157
+ ^1 - `editable`/`:read-write` usually uses decorators but Material Design also applies high contrast background
158
+ ( for light theme it is white on the slightly darker surface ).
159
+
160
+ ^2 - `pending` often accompanied by `in-progress` animation
161
+
162
+ # Emotional Palette
163
+ | `palette-` token | | warmth | sample | system |
164
+ |------------------|--------------------------------------------------------------------|---------|-------------------------|----------------------------|
165
+ | `comfort` | light scene color, the scene is full of object | cool | white | Canvas |
166
+ | | Purity, innocence, cleanliness, peace, coldness or emptiness | | | |
167
+ | `calm` | dark scene color, few objects around | cool | black | CanvasText |
168
+ | | Mystery, elegance, power, evil, mourning, formality, security | | | |
169
+ | `trust` | primary action background, text color for `focus-invert` | cool | blue | Highlight w/ HighlightText |
170
+ | `danger` | Passion, excitement, love, anger, energy, danger | warm | red | N/A |
171
+ | `creativity` | Luxury, creativity, royalty, mystery, but also grief or melancholy | cool | cyan/purple | ButtonFace w/ ButtonText |
172
+ | `enthusiasm` | Warmth, enthusiasm, happiness, optimism, energy | warm | orange( yellow, pink) | Mark w/ MarkText |
173
+ | `conservative` | Natural, earthy, conservative, but also bland or boring | neutral | brown (tan/beige, grey) | GrayText |
174
+ ...
175
+
176
+ Emotional palette should be expressed via branded palette tokens.
177
+ The emotions set supports particular application flow. Limit 7 per flow or SPA.
178
+
179
+ NOTE. SPA( single page application ) usually is not limited to 1 flow. Settings/profile/contacts, etc. are the sample of separate flows even in SPA.
180
+
181
+
182
+ # Branded palette
183
+ The branded palette establishes a set of base colors and their variations, ensuring adherence to accessibility standards.
184
+ These variations should follow a specific color transformation formula that takes accessibility into account, as outlined in the ADA guidelines.
185
+
186
+ Browsers provide a [System colors](https://developer.mozilla.org/en-US/docs/Web/CSS/system-color) as universal
187
+ out-of-the-box branded palette which comply to the user settings on OS level.
188
+
189
+ To promote inclusivity, sibling color values should be sufficiently distinct to ensure easy differentiation,
190
+ particularly for individuals with color blindness or other visual impairments.
191
+ Typically, the formula adjusts brightness levels; however, shifts within the color space is also a viable approach.
192
+
193
+
194
+ The minimal number of base color variations is 7.
195
+
196
+ ## custom-element material branded colors
197
+ | `cem-color` token | definition | emotion intent | semantic intent | sample | angular material |
198
+ |-------------------|---------------|------------------------|-----------------|---------|-----------------------------|
199
+ | `blue-xl` | lightest blue | `comfort`, light scene | reading | #faf9fd | --ng-azure-neutral-98 |
200
+ | | | | | | --mat-sys-surface |
201
+ | `cyan-d` | dark cyan | dark scene | reading | #101414 | --ng-cyan-neutral-6 |
202
+ | | | | | | --mat-sys-surface |
203
+ | `blue` | blue | trust | attention | #005cbb | --ng-azure-40 |
204
+ | | | | | | --mat-sys-primary |
205
+ | `red` | red | danger | alert | #ba1a1a | --ng-error-40 |
206
+ | | | | | | --mat-sys-error |
207
+ | `blue-l` | light blue | conservative | brand-1 | #d7e3ff | --ng-azure-90 |
208
+ | | | | | | --mat-sys-primary-container |
209
+ | `cyan-l` | light cyan | creativity | brand-2 | #adfffe | --ng-cyan-95 |
210
+ | | | | | | --mat-sys-primary-container |
211
+ | `orange-l` | light orange | enthusiasm | brand-3 | #ffdcc7 | --ng-orange-90 |
212
+ | | | | | | |
213
+ ...
214
+
215
+ # Line thickness, stroke weight
216
+
217
+ > **Note:** This section covers **D6 Typography** thickness (font-weight values 100–900). For **D5 Stroke & Separation** tokens (borders, dividers, focus rings), see [`tokens/cem-stroke.md`](./tokens/cem-stroke.md).
218
+
219
+ [Typography Guide Part 2: Weight and Width](https://creativebeacon.com/typography-guide-part-2-weight-and-width/)
220
+ The different weights can be
221
+
222
+ | `thickness-` token | | [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) |
223
+ |--------------------|----------------------|-------------------------------------------------------------------------------|
224
+ | `xx-light` | thin (Hairline) | 100 |
225
+ | `x-light` | extra light, | 200 |
226
+ | `light` | | 300 |
227
+ | `normal` | or roman, regular | 400 |
228
+ | `bold` | medium | 700 |
229
+ | `x-bold` | extra bold, | 800 |
230
+ | `xx-bold` | ultra bold or black, | 900 |
231
+
232
+
233
+
234
+ # Text Tracking/Spacing
235
+ [wiki](https://en.wikipedia.org/wiki/Letter_spacing),
236
+ [units](https://css-tricks.com/keeping-track-letter-spacing-guidelines/)
237
+
238
+ # Typography and Voice
239
+
240
+ See [Voice and Fonts in Typography](tokens/cem-voice-fonts-typography.md) for the complete semantic typography system.
241
+
242
+ Typography tokens are organized into three layers:
243
+ - **Fontography** — font families and feature policies
244
+ - **Typography** — size, line-height, spacing, and layout
245
+ - **Voice** — cross-modal prominence (ink weight + speech prosody)
246
+
247
+ ## Voice-to-Thickness Mapping
248
+
249
+ Voice tokens map to thickness tokens for visual weight:
250
+
251
+ | Voice Level | Thickness Token | Weight | Semantic Use |
252
+ |-------------|-----------------|--------|--------------|
253
+ | `whisper` | `xx-light` | 100 | Minimal emphasis |
254
+ | `soft` | `x-light` | 200 | Subtle, secondary |
255
+ | `gentle` | `light` | 300 | Calm, understated |
256
+ | `regular` | `normal` | 400 | Baseline (default) |
257
+ | `firm` | `bold` | 700 | Confident emphasis |
258
+ | `strong` | `x-bold` | 800 | Strong assertion |
259
+ | `loud` | `xx-bold` | 900 | Maximum impact |
260
+
261
+ All 7 thickness levels are utilized with distinct voice mappings.
262
+
263
+ # Outline
264
+
265
+ > **See also:** [`tokens/cem-stroke.md`](./tokens/cem-stroke.md) for the canonical D5 Stroke & Separation spec, which documents stroke basis (`--cem-stroke-*`), semantic endpoints (`--cem-stroke-boundary`, `--cem-stroke-divider`, `--cem-stroke-focus`), and zebra indicator tokens.
266
+
267
+ | tokens | scope | CSS key | value | comment |
268
+ |-------------------------------------|-------------------------------------------|---------------------------------|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
269
+ | `box-shadow` | `.action` | box-shadow: | var(--cem-action-box-shadow) | base applied to `box-shadow` rule |
270
+ | `box-shadow` | `.action` | --cem-action-box-shadow | 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12) | default, all themes. Button shadow. |
271
+ | `hover` | `.action` | --cem-action-box-shadow-hover | 0px 4px 6px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 2px 4px 0px rgba(0, 0, 0, .12) | default, all themes. Slightly larger shadow on hover |
272
+ | `{STATE}` , ...`active` | `.action` | --cem-action-box-shadow-{STATE} | ... | Subtler shadow for active state |
273
+ | `pending` | `.action` | --cem-action-box-shadow-pending | same as default | Subtler shadow for active state |
274
+ | `hover` | `.action:hover` | --cem-action-box-shadow | var(--cem-action-box-shadow-hover) | state-specific prop |
275
+ | `{STATE}`, ...`active`,`pending` | `.action:{STATE}` | --cem-action-box-shadow | var(--cem-action-box-shadow-{STATE}) | state-specific prop |
276
+ | high contrast | `[data-theme*="cem-theme-contrast-"]` | | | |
277
+ | `box-shadow` | `.action` | --cem-action-box-shadow | var(--cem-action-box-shadow-default) | default in contrast theme |
278
+ | `box-shadow` | `.action` | --cem-action-box-shadow-default | 0 0 0 2px var(--cem-palette-comfort), 0 0 0 4px var(--cem-action-box-shadow-color) | state-specific prop. 2px zebra, inner strip matches main background |
279
+ | `box-shadow` `hover` | `.action` | --cem-action-box-shadow-hover | 0 0 0 4px var(--cem-palette-comfort), 0 0 0 8px var(--cem-action-box-shadow-color) | state-specific prop. Slightly larger shadow on hover |
280
+ | `box-shadow` `hover` | `.action:hover` | --cem-action-box-shadow | var(--cem-action-box-shadow-hover) | colors escalation from default where default is contrast on comfort background |
281
+ | `explicit` `box-shadow` `hover` | `.action.explicit:hover` | --cem-action-box-shadow-color | blue | colors escalation from default where default is contrast on comfort background |
282
+ | `explicit` `box-shadow` `{STATE}` | `.action.explicit[{STATE}]` | --cem-action-box-shadow-color | color elevation by STATE relative to `default` | colors escalation from default where default is contrast on comfort background |
283
+ | `contextual` `box-shadow` `default` | `.action.contextual[ not( all {STATE}) ]` | --cem-action-box-shadow | `none` | hide outline for `default` state |
284
+
285
+ `contextual` does not have an outline in default state for all themes, needs an override rule to set `--cem-action-box-shadow: none`
286
+
287
+ _High contrast mode_ inherits `box-shadow:` css rule from `.action` top level. There are 2 shapes of outline.
288
+ Each has 2 strips "zebra" presentation when closest strip is least visible and outer is most contrast.
289
+
290
+ * default - 2px zebra, used for all states except
291
+ * wide - triggered for real-time actions like hover and pressed (active)
292
+
293
+ The color escalation on the state change is combined with zebra size which requires less color gradations for better contrast.
294
+
295
+ Chromium adds `:focus-visible` outline. Which has to be hidden when `border-box` is in use.
296
+ ```css
297
+ :focus-visible{ outline: -webkit-focus-ring-color auto 1px; }
298
+ ```