@covalent/components 0.0.0-COVALENT

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 (264) hide show
  1. package/.babelrc +10 -0
  2. package/.eslintrc.json +18 -0
  3. package/.storybook/main.js +34 -0
  4. package/.storybook/manager-head.html +62 -0
  5. package/.storybook/manager.js +1 -0
  6. package/.storybook/preview-head.html +20 -0
  7. package/.storybook/preview.js +20 -0
  8. package/README.md +179 -0
  9. package/component-config.json +313 -0
  10. package/index.html +288 -0
  11. package/jest.config.js +18 -0
  12. package/package.json +315 -0
  13. package/project.json +104 -0
  14. package/public/index.scss +1 -0
  15. package/public/reset.css +128 -0
  16. package/src/action-ribbon/_action-ribbon.theme.scss +90 -0
  17. package/src/action-ribbon/action-ribbon-base.ts +164 -0
  18. package/src/action-ribbon/action-ribbon.scss +20 -0
  19. package/src/action-ribbon/action-ribbon.spec.ts +11 -0
  20. package/src/action-ribbon/action-ribbon.stories.js +78 -0
  21. package/src/action-ribbon/action-ribbon.ts +26 -0
  22. package/src/alert/_alert.theme.scss +116 -0
  23. package/src/alert/alert-base.ts +175 -0
  24. package/src/alert/alert.scss +55 -0
  25. package/src/alert/alert.spec.ts +26 -0
  26. package/src/alert/alert.stories.js +76 -0
  27. package/src/alert/alert.ts +26 -0
  28. package/src/app-shell/app-shell.scss +387 -0
  29. package/src/app-shell/app-shell.stories.js +323 -0
  30. package/src/app-shell/app-shell.ts +388 -0
  31. package/src/badge/badge.scss +60 -0
  32. package/src/badge/badge.spec.ts +40 -0
  33. package/src/badge/badge.stories.js +88 -0
  34. package/src/badge/badge.ts +122 -0
  35. package/src/button/Overview.mdx +160 -0
  36. package/src/button/button.scss +28 -0
  37. package/src/button/button.spec.ts +11 -0
  38. package/src/button/button.stories.js +102 -0
  39. package/src/button/button.ts +17 -0
  40. package/src/card/card-base.ts +69 -0
  41. package/src/card/card.scss +45 -0
  42. package/src/card/card.spec.ts +11 -0
  43. package/src/card/card.ts +21 -0
  44. package/src/card/cards.stories.js +40 -0
  45. package/src/checkbox/checkbox.scss +8 -0
  46. package/src/checkbox/checkbox.spec.ts +11 -0
  47. package/src/checkbox/checkbox.stories.js +61 -0
  48. package/src/checkbox/checkbox.ts +18 -0
  49. package/src/chips/chip-base.ts +276 -0
  50. package/src/chips/chip-set-base.ts +184 -0
  51. package/src/chips/chip-set.scss +15 -0
  52. package/src/chips/chip-set.spec.ts +11 -0
  53. package/src/chips/chip-set.ts +27 -0
  54. package/src/chips/chip.scss +40 -0
  55. package/src/chips/chip.spec.ts +11 -0
  56. package/src/chips/chip.ts +26 -0
  57. package/src/chips/chips.stories.js +81 -0
  58. package/src/circular-progress/circular-progress.spec.ts +11 -0
  59. package/src/circular-progress/circular-progress.stories.js +40 -0
  60. package/src/circular-progress/circular-progress.ts +16 -0
  61. package/src/code-editor/code-editor.scss +20 -0
  62. package/src/code-editor/code-editor.spec.ts +11 -0
  63. package/src/code-editor/code-editor.stories.js +44 -0
  64. package/src/code-editor/code-editor.theme.ts +199 -0
  65. package/src/code-editor/code-editor.ts +231 -0
  66. package/src/code-snippet/code-snippet.scss +126 -0
  67. package/src/code-snippet/code-snippet.spec.ts +11 -0
  68. package/src/code-snippet/code-snippet.stories.js +134 -0
  69. package/src/code-snippet/code-snippet.ts +93 -0
  70. package/src/data-table/_data-table.theme.scss +39 -0
  71. package/src/data-table/data-table.stories.js +24 -0
  72. package/src/data-table/data-table.stories.scss +11 -0
  73. package/src/dialog/Overview.mdx +39 -0
  74. package/src/dialog/dialog.scss +17 -0
  75. package/src/dialog/dialog.spec.ts +11 -0
  76. package/src/dialog/dialog.stories.js +89 -0
  77. package/src/dialog/dialog.ts +44 -0
  78. package/src/drawer/drawer.scss +4 -0
  79. package/src/drawer/drawer.spec.ts +11 -0
  80. package/src/drawer/drawer.ts +18 -0
  81. package/src/empty-state/_empty-state.theme.scss +0 -0
  82. package/src/empty-state/empty-state.scss +67 -0
  83. package/src/empty-state/empty-state.spec.ts +11 -0
  84. package/src/empty-state/empty-state.stories.js +117 -0
  85. package/src/empty-state/empty-state.ts +61 -0
  86. package/src/expansion-panel/Overview.mdx +108 -0
  87. package/src/expansion-panel/expansion-panel-incorrect-example.png +0 -0
  88. package/src/expansion-panel/expansion-panel-item.scss +243 -0
  89. package/src/expansion-panel/expansion-panel-item.ts +95 -0
  90. package/src/expansion-panel/expansion-panel.spec.ts +11 -0
  91. package/src/expansion-panel/expansion-panel.stories.js +76 -0
  92. package/src/expansion-panel/expansion-panel.ts +94 -0
  93. package/src/focused-page/focused-page.scss +113 -0
  94. package/src/focused-page/focused-page.spec.ts +11 -0
  95. package/src/focused-page/focused-page.stories.js +167 -0
  96. package/src/focused-page/focused-page.ts +201 -0
  97. package/src/formfield/formfield.scss +8 -0
  98. package/src/formfield/formfield.spec.ts +11 -0
  99. package/src/formfield/formfield.ts +24 -0
  100. package/src/full-screen-dialog/full-screen-dialog.scss +37 -0
  101. package/src/full-screen-dialog/full-screen-dialog.spec.ts +11 -0
  102. package/src/full-screen-dialog/full-screen-dialog.stories.js +172 -0
  103. package/src/full-screen-dialog/full-screen-dialog.ts +84 -0
  104. package/src/icon/_icon-list.ts +316 -0
  105. package/src/icon/icon-demo.scss +25 -0
  106. package/src/icon/icon-demo.ts +37 -0
  107. package/src/icon/icon.spec.ts +11 -0
  108. package/src/icon/icon.stories.js +55 -0
  109. package/src/icon/icon.ts +16 -0
  110. package/src/icon-button/_icon-button.theme.scss +9 -0
  111. package/src/icon-button/icon-button.scss +12 -0
  112. package/src/icon-button/icon-button.spec.ts +11 -0
  113. package/src/icon-button/icon-button.stories.js +24 -0
  114. package/src/icon-button/icon-button.ts +19 -0
  115. package/src/icon-button-toggle/icon-button-toggle.scss +19 -0
  116. package/src/icon-button-toggle/icon-button-toggle.spec.ts +11 -0
  117. package/src/icon-button-toggle/icon-button-toggle.stories.js +32 -0
  118. package/src/icon-button-toggle/icon-button-toggle.ts +50 -0
  119. package/src/icon-checkbox/icon-check-toggle.ts +64 -0
  120. package/src/icon-checkbox/icon-check.spec.ts +11 -0
  121. package/src/icon-checkbox/icon-checkbox.scss +95 -0
  122. package/src/icon-checkbox/icon-checkbox.stories.js +77 -0
  123. package/src/icon-lockup/icon-lockup.scss +47 -0
  124. package/src/icon-lockup/icon-lockup.spec.ts +11 -0
  125. package/src/icon-lockup/icon-lockup.stories.js +93 -0
  126. package/src/icon-lockup/icon-lockup.ts +125 -0
  127. package/src/icon-radio/icon-radio-toggle.ts +43 -0
  128. package/src/icon-radio/icon-radio.scss +63 -0
  129. package/src/icon-radio/icon-radio.spec.ts +11 -0
  130. package/src/icon-radio/icon-radio.stories.js +23 -0
  131. package/src/index.scss +1 -0
  132. package/src/index.ts +57 -0
  133. package/src/linear-progress/linear-progress.scss +4 -0
  134. package/src/linear-progress/linear-progress.spec.ts +11 -0
  135. package/src/linear-progress/linear-progress.stories.js +43 -0
  136. package/src/linear-progress/linear-progress.ts +18 -0
  137. package/src/list/Overview.mdx +91 -0
  138. package/src/list/_list.theme.scss +100 -0
  139. package/src/list/check-list-item.spec.ts +11 -0
  140. package/src/list/check-list-item.ts +25 -0
  141. package/src/list/list-item.scss +56 -0
  142. package/src/list/list-item.spec.ts +11 -0
  143. package/src/list/list-item.ts +31 -0
  144. package/src/list/list.scss +25 -0
  145. package/src/list/list.stories.js +120 -0
  146. package/src/list/list.ts +23 -0
  147. package/src/list/nav-list-item.scss +159 -0
  148. package/src/list/nav-list-item.ts +223 -0
  149. package/src/list/radio-list-item.ts +25 -0
  150. package/src/menu/menu.scss +3 -0
  151. package/src/menu/menu.spec.ts +11 -0
  152. package/src/menu/menu.stories.js +110 -0
  153. package/src/menu/menu.ts +23 -0
  154. package/src/notebook-cell/notebook-cell.scss +185 -0
  155. package/src/notebook-cell/notebook-cell.spec.ts +11 -0
  156. package/src/notebook-cell/notebook-cell.stories.js +87 -0
  157. package/src/notebook-cell/notebook-cell.ts +300 -0
  158. package/src/radio/radio.scss +3 -0
  159. package/src/radio/radio.spec.ts +11 -0
  160. package/src/radio/radio.stories.js +56 -0
  161. package/src/radio/radio.ts +18 -0
  162. package/src/select/select.scss +16 -0
  163. package/src/select/select.spec.ts +11 -0
  164. package/src/select/select.stories.js +57 -0
  165. package/src/select/select.ts +18 -0
  166. package/src/side-sheet/side-sheet.scss +49 -0
  167. package/src/side-sheet/side-sheet.spec.ts +11 -0
  168. package/src/side-sheet/side-sheet.stories.js +96 -0
  169. package/src/side-sheet/side-sheet.ts +37 -0
  170. package/src/skeleton/_skeleton.styles.scss +24 -0
  171. package/src/skeleton/skeleton.stories.js +77 -0
  172. package/src/slider/slider-range.ts +16 -0
  173. package/src/slider/slider.spec.ts +11 -0
  174. package/src/slider/slider.stories.js +54 -0
  175. package/src/slider/slider.ts +16 -0
  176. package/src/snackbar/snackbar.scss +8 -0
  177. package/src/snackbar/snackbar.spec.ts +11 -0
  178. package/src/snackbar/snackbar.stories.js +42 -0
  179. package/src/snackbar/snackbar.ts +18 -0
  180. package/src/status-dialog/status-dialog.scss +204 -0
  181. package/src/status-dialog/status-dialog.spec.ts +48 -0
  182. package/src/status-dialog/status-dialog.stories.js +136 -0
  183. package/src/status-dialog/status-dialog.ts +188 -0
  184. package/src/status-header/_status-header.theme.scss +79 -0
  185. package/src/status-header/status-header-base.ts +42 -0
  186. package/src/status-header/status-header-item.scss +17 -0
  187. package/src/status-header/status-header-item.spec.ts +11 -0
  188. package/src/status-header/status-header-item.ts +32 -0
  189. package/src/status-header/status-header.scss +57 -0
  190. package/src/status-header/status-header.spec.ts +11 -0
  191. package/src/status-header/status-header.stories.js +114 -0
  192. package/src/status-header/status-header.ts +26 -0
  193. package/src/switch/switch.scss +17 -0
  194. package/src/switch/switch.spec.ts +11 -0
  195. package/src/switch/switch.stories.js +41 -0
  196. package/src/switch/switch.ts +18 -0
  197. package/src/tab/Overview.mdx +38 -0
  198. package/src/tab/tab-bar.spec.ts +11 -0
  199. package/src/tab/tab-bar.ts +16 -0
  200. package/src/tab/tab.scss +10 -0
  201. package/src/tab/tab.spec.ts +11 -0
  202. package/src/tab/tab.stories.js +30 -0
  203. package/src/tab/tab.ts +18 -0
  204. package/src/text-lockup/text-lockup.scss +66 -0
  205. package/src/text-lockup/text-lockup.spec.ts +11 -0
  206. package/src/text-lockup/text-lockup.stories.js +67 -0
  207. package/src/text-lockup/text-lockup.ts +55 -0
  208. package/src/textarea/textarea.spec.ts +11 -0
  209. package/src/textarea/textarea.stories.js +39 -0
  210. package/src/textarea/textarea.ts +19 -0
  211. package/src/textfield/textfield.scss +34 -0
  212. package/src/textfield/textfield.spec.ts +11 -0
  213. package/src/textfield/textfield.stories.js +60 -0
  214. package/src/textfield/textfield.ts +25 -0
  215. package/src/theme/_index.scss +46 -0
  216. package/src/theme/prebuilt/dark-theme.scss +17 -0
  217. package/src/theme/prebuilt/light-theme.scss +17 -0
  218. package/src/toolbar/toolbar.scss +37 -0
  219. package/src/toolbar/toolbar.spec.ts +11 -0
  220. package/src/toolbar/toolbar.stories.js +66 -0
  221. package/src/toolbar/toolbar.ts +27 -0
  222. package/src/tooltip/tooltip.scss +16 -0
  223. package/src/tooltip/tooltip.spec.ts +11 -0
  224. package/src/tooltip/tooltip.stories.js +72 -0
  225. package/src/tooltip/tooltip.ts +185 -0
  226. package/src/top-app-bar/top-app-bar-fixed.ts +23 -0
  227. package/src/top-app-bar/top-app-bar.scss +14 -0
  228. package/src/top-app-bar/top-app-bar.spec.ts +11 -0
  229. package/src/top-app-bar/top-app-bar.stories.js +41 -0
  230. package/src/top-app-bar/top-app-bar.ts +23 -0
  231. package/src/tree-list/tree-list-item.scss +96 -0
  232. package/src/tree-list/tree-list-item.spec.ts +11 -0
  233. package/src/tree-list/tree-list-item.ts +87 -0
  234. package/src/tree-list/tree-list.scss +13 -0
  235. package/src/tree-list/tree-list.spec.ts +11 -0
  236. package/src/tree-list/tree-list.stories.js +151 -0
  237. package/src/tree-list/tree-list.ts +53 -0
  238. package/src/typography/typography.scss +45 -0
  239. package/src/typography/typography.spec.ts +11 -0
  240. package/src/typography/typography.stories.js +23 -0
  241. package/src/typography/typography.ts +27 -0
  242. package/stories/Introduction.mdx +47 -0
  243. package/stories/color-use.mdx +509 -0
  244. package/stories/demos/dialog.component.html +187 -0
  245. package/stories/demos/dialog.component.js +57 -0
  246. package/stories/demos/grid.content.html +99 -0
  247. package/stories/demos/lorem-ipsum.content.html +338 -0
  248. package/stories/demos/material-web.content.html +2125 -0
  249. package/stories/demos/table-column-sorting.content.html +92 -0
  250. package/stories/demos/table-pagination.content.html +139 -0
  251. package/stories/demos/table-progress-indicator.content.html +77 -0
  252. package/stories/demos/table-row-selection.content.html +219 -0
  253. package/stories/demos/table.content.html +64 -0
  254. package/stories/demos/top-app-bar.component.js +57 -0
  255. package/stories/guide-representing-state.mdx +282 -0
  256. package/stories/info-and-help.mdx +484 -0
  257. package/stories/item-detail-and-editing.mdx +529 -0
  258. package/stories/markdown-elements.mdx +194 -0
  259. package/stories/writing-and-naming.mdx +157 -0
  260. package/tsconfig.json +34 -0
  261. package/tsconfig.lib.json +17 -0
  262. package/tsconfig.spec.json +14 -0
  263. package/types.d.ts +15 -0
  264. package/vite.config.js +58 -0
@@ -0,0 +1,509 @@
1
+ import { Canvas, Meta, DocsContainer, Story } from '@storybook/blocks';
2
+
3
+ <Meta
4
+ title="Guides/Color Use"
5
+ parameters={{
6
+ layout: 'fullscreen',
7
+ previewTabs: {
8
+ canvas: { hidden: true },
9
+ },
10
+ }}
11
+ />
12
+
13
+ <style>
14
+ {`
15
+ {/* EXAMPLE */}
16
+
17
+ .textfield-primary {
18
+ --mdc-text-field-outlined-hover-border-color: var(--mdc-theme-primary);
19
+ --mdc-text-field-label-ink-color: var(--mdc-theme-primary);
20
+ --mdc-text-field-fill-color: var(--mdc-theme-primary);
21
+ --mdc-text-field-idle-line-color: var(--mdc-theme-primary);
22
+ --mdc-text-field-hover-line-color: var(--mdc-theme-primary);
23
+ --mdc-text-field-outlined-idle-border-color: var(--mdc-theme-primary);
24
+ --mdc-notched-outline-stroke-width: 2px;
25
+ }
26
+ .textfield-negative {
27
+ --mdc-text-field-outlined-hover-border-color: var(--mdc-theme-negative);
28
+ --mdc-text-field-fill-color: var(--mdc-theme-negative);
29
+ --mdc-text-field-label-ink-color: var(--mdc-theme-negative);
30
+ --mdc-text-field-idle-line-color: var(--mdc-theme-negative);
31
+ --mdc-text-field-hover-line-color: var(--mdc-theme-negative);
32
+ --mdc-text-field-outlined-idle-border-color: var(--mdc-theme-negative);
33
+ --mdc-text-field-focused-label-color: var(--mdc-theme-negative);
34
+ --mdc-notched-outline-stroke-width: 2px;
35
+ --mdc-theme-primary: var(--mdc-theme-negative);
36
+ }
37
+ .exampleContainer {
38
+ display: flex;
39
+ flex-direction: column;
40
+ row-gap: 16px;
41
+ max-width: none;
42
+ padding: 40px;
43
+ justify-self: center;
44
+ justify-content: center;
45
+ align-items: center;
46
+ position: relative;
47
+ }
48
+ .cardContent {
49
+ padding: 16px 16px 56px 16px;
50
+ display: flex;
51
+ flex-direction: column;
52
+ justify-content: center;
53
+ column-gap: 8px;
54
+ max-width: 60%;
55
+ }
56
+ .mdc-layout-grid {
57
+ padding-left: 0;
58
+ padding-bottom: 0;
59
+ }
60
+ .cardContainer {
61
+ display: flex;
62
+ column-gap: 16px;
63
+ }
64
+ div.cardContainer cv-card div {
65
+ padding: 16px 16px 32px;
66
+ }
67
+ .mdc-dialog__header {
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: space-between;
71
+ }
72
+ .dark {
73
+ background-color: #161C1F;
74
+ color: white;
75
+ }
76
+ .darkText cv-button {
77
+ margin-right: 8px;
78
+ }
79
+ .light {
80
+ background-color: #F5F5F5;
81
+ }
82
+ .lightText cv-button {
83
+ margin-right: 8px;
84
+ }
85
+ .dialog {
86
+ width: 440px;
87
+ height: 224px;
88
+ border-radius: 8px;
89
+ position: absolute;
90
+ background-color: var(--mdc-theme-background);
91
+ box-shadow:
92
+ 0px 16px 24px rgba(0, 0, 0, 0.14),
93
+ 0px 6px 30px rgba(0, 0, 0, 0.12),
94
+ 0px 8px 10px rgba(0, 0, 0, 0.2);
95
+ }
96
+ .dialog .dialogContainer {
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: space-between;
100
+ height: 64px;
101
+ padding: 0 16px;
102
+ border-bottom: solid 1px var(--mdc-theme-border)
103
+ }
104
+ .dialogContainer div {
105
+ font-family: var(--mdc-typography-headline6-font-family);
106
+ font-size: var(--mdc-typography-headline6-font-size);
107
+ font-weight: var(--mdc-typography-headline6-font-weight);
108
+ line-height: var(--mdc-typography-headline6-line-height);
109
+ }
110
+ .dialogContent {
111
+ height: calc(224px - 96px);
112
+ display: flex;
113
+ flex-direction: column;
114
+ justify-content: space-between;
115
+ padding: 16px 16px 0 16px;
116
+ }
117
+ .darkDialog {
118
+ background-color: #28353B;
119
+ }
120
+ .dialogActions {
121
+ display: flex;
122
+ justify-content: flex-end;
123
+ }
124
+ {/* FOREGROUND */}
125
+
126
+ .primaryText {
127
+ color: var(--mdc-theme-text-primary-on-background);
128
+ }
129
+ .secondary {
130
+ color: var(--mdc-theme-text-secondary-on-background);
131
+ }
132
+ .disabled {
133
+ color: var(--mdc-theme-text-disabled-on-background);
134
+ }
135
+ .divider {
136
+ width: 200px;
137
+ border-bottom: solid 1px var(--mdc-theme-border);
138
+ }
139
+ .positiveFg {
140
+ color: var(--mdc-theme-positive);
141
+ }
142
+ .cautionFg {
143
+ color: var(--mdc-theme-caution);
144
+ }
145
+ .negativeFg {
146
+ color: var(--mdc-theme-negative);
147
+ }
148
+ .primaryFg {
149
+ color: var(--mdc-theme-primary);
150
+ }
151
+ .emphasisFg {
152
+ color: var(--mdc-theme-emphasis);
153
+ }
154
+
155
+ {/* BACKGROUND */}
156
+
157
+ table tr td:first-of-type div:first-of-type {
158
+ color: var(--mdc-theme-text-primary-on-background);
159
+ }
160
+ table:nth-of-type(2) tr td:nth-of-type(2) div {
161
+ width: 114px;
162
+ height: 56px;
163
+ border-radius: 8px;
164
+ }
165
+ .background {
166
+ background-color: var(--mdc-theme-background);
167
+ border: solid var(--mdc-theme-border) 1px;
168
+ }
169
+ .appbar {}
170
+ .surface {
171
+ background-color: var(--mdc-theme-surface);
172
+ }
173
+ .canvas {
174
+ background-color: var(--mdc-theme-surface-canvas);
175
+ }
176
+ .positive {
177
+ background-color: var(--mdc-theme-surface-positive);
178
+ }
179
+ .positiveHighlight {
180
+ background-color: var(--mdc-theme-surface-positive-highlight);
181
+ }
182
+ .positiveHighlightHover {
183
+ background-color: var(--mdc-theme-surface-positive-highlight-hover);
184
+ }
185
+ .caution {
186
+ background-color: var(--mdc-theme-surface-caution);
187
+ }
188
+ .cautionHighlight {
189
+ background-color: var(--mdc-theme-surface-caution-highlight);
190
+ }
191
+ .cautionHighlightHover {
192
+ background-color: var(--mdc-theme-surface-caution-highlight-hover);
193
+ }
194
+ .negative {
195
+ background-color: var(--mdc-theme-surface-negative);
196
+ }
197
+ .negativeHighlight {
198
+ background-color: var(--mdc-theme-surface-negative-highlight);
199
+ }
200
+ .negativeHighlightHover {
201
+ background-color: var(--mdc-theme-surface-negative-highlight-hover);
202
+ }
203
+ .neutral {
204
+ background-color: var(--mdc-theme-surface-neutral);
205
+ }
206
+ .neutralHighlight {
207
+ background-color: var(--mdc-theme-surface-neutral-highlight);
208
+ }
209
+ .neutralHighlightHover {
210
+ background-color: var(--mdc-theme-surface-neutral-highlight-hover);
211
+ }
212
+
213
+ .primaryHighlight {
214
+ background-color: var(--mdc-theme-surface-primary-highlight);
215
+ }
216
+ .primaryHighlightHover {
217
+ background-color: var(--mdc-theme-surface-primary-highlight-hover);
218
+ }
219
+ .emphasis {
220
+ background-color: var(--mdc-theme-surface-emphasis);
221
+ }
222
+ .emphasisHighlight {
223
+ background-color: var(--mdc-theme-surface-emphasis-highlight);
224
+ }
225
+ .emphasisHighlightHover {
226
+ background-color: var(--mdc-theme-surface-emphasis-highlight-hover);
227
+ }
228
+
229
+ {/* CONFIG COLORS */}
230
+ table:last-of-type tr td:nth-of-type(2) div,
231
+ table:last-of-type tr td:last-of-type div {
232
+ width: 324px;
233
+ height: 56px;
234
+ border-radius: 8px;
235
+ display: flex;
236
+ align-items: center;
237
+ padding-left: 16px;
238
+ color: #FFFFFFDE;
239
+ }
240
+ .cv-teal-500 {
241
+ background-color: #00B2B1;
242
+ }
243
+ .accent-background-light {
244
+ color: var(--mdc-theme-text-primary-on-light) !important;
245
+ background-color: #85DDDC;
246
+ }
247
+ .accent-foreground-light {
248
+ color: var(--mdc-theme-text-primary-on-light) !important;
249
+ background-color: #59CECD;
250
+ }
251
+ .accent-background-dark {
252
+ background-color: #007373;
253
+ }
254
+ .accent-foreground-dark {
255
+ background-color: #045C5C;
256
+ }
257
+ .cv-slate-500 {
258
+ background-color: #616d73;
259
+ }
260
+ .primary-foreground-dark {
261
+ background-color: #43515A;
262
+ }
263
+ .primary-background-dark {
264
+ background-color: #394851;
265
+ }
266
+ .primary-light {
267
+ color: var(--mdc-theme-text-primary-on-light) !important;
268
+ background-color: #AFB6B9;
269
+ }
270
+ .darkBg {
271
+ background-color: #28353B;
272
+ }
273
+ .sbdocs .sbdocs-table tr th {
274
+ font-family: var(--mdc-typography-caption-font-family);
275
+ font-size: var(--mdc-typography-caption-font-size);
276
+ font-weight: var(--mdc-typography-caption-font-weight);
277
+ line-height: var(--mdc-typography-caption-line-height);
278
+ color: var(--mdc-theme-text-secondary-on-background);
279
+ }
280
+ table:last-of-type tr td {
281
+ width: 300px;
282
+ }
283
+ table:last-of-type tr td:last-of-type,
284
+ table:last-of-type tr th:last-of-type {
285
+ background: #28353B;
286
+ color: var(--mdc-theme-text-secondary-on-dark);
287
+ }
288
+ `}
289
+ </style>
290
+
291
+ # Color use
292
+
293
+ ## Basics
294
+
295
+ - Use “foreground” colors for items such as text or icons.
296
+ - When at all possible, use one of our named colors rather than a Material Design color or a hex code.
297
+
298
+ ---
299
+
300
+ ## Naming
301
+
302
+ Colors are named based on function. This prevents errors from accumulating when using color codes directly. It also allows us to update a color in one place and see the results wherever it’s used.
303
+
304
+ ---
305
+
306
+ ## Theming
307
+
308
+ Each color is defined in both a light and dark version. These are designed to work together, and should not be changed. For example, when using the “emphasis” background color in light mode, you cannot use “accent” color in dark mode for the same element.
309
+
310
+ #### Examples
311
+
312
+ <div class="light lightText exampleContainer">
313
+ <cv-card cardTitle="Title" class="card">
314
+ <div slot="card-content" class="cardContent">
315
+ <div>
316
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
317
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
318
+ veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
319
+ commo
320
+ </div>
321
+
322
+ <div class="mdc-layout-grid">
323
+ <div class="mdc-layout-grid__inner">
324
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6" />
325
+
326
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6 textfield-negative" />
327
+
328
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6 textfield-primary" />
329
+
330
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6" />
331
+ </div>
332
+ </div>
333
+ </div>
334
+
335
+ </cv-card>
336
+
337
+ <div class="cardContainer">
338
+ <cv-card cardTitle="Title">
339
+ <div slot="card-content">
340
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
341
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
342
+ veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
343
+ commo
344
+ </div>
345
+ </cv-card>
346
+
347
+ <cv-card cardTitle="Title">
348
+ <div slot="card-content">
349
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
350
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
351
+ veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
352
+ commo
353
+ </div>
354
+ </cv-card>
355
+
356
+ </div>
357
+
358
+ <div class="dialog">
359
+ <div class="dialogContainer">
360
+ <div>Title</div>
361
+ <cv-icon>close</cv-icon>
362
+ </div>
363
+
364
+ <div class="dialogContent">
365
+ <div>
366
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
367
+ tempor incididunt ut labore et dolore magna aliqua.
368
+ </div>
369
+
370
+ <div class="dialogActions">
371
+ <cv-button label="Button text" outlined />
372
+
373
+ <cv-button label="Button text" raised />
374
+ </div>
375
+ </div>
376
+
377
+ </div>
378
+ </div>
379
+
380
+ <div class="dark darkText exampleContainer">
381
+ <cv-card cardTitle="Title" class="card">
382
+ <div slot="card-content" class="cardContent">
383
+ <div>
384
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
385
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
386
+ veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
387
+ commo
388
+ </div>
389
+
390
+ <div class="mdc-layout-grid">
391
+ <div class="mdc-layout-grid__inner">
392
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6" />
393
+
394
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6 textfield-negative" />
395
+
396
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6 textfield-primary" />
397
+
398
+ <cv-textfield label="Label" value="Value" outlined class="mdc-layout-grid__cell--span-6" />
399
+ </div>
400
+ </div>
401
+ </div>
402
+
403
+ <div slot="card-actions" class="mdc-card__action-buttons">
404
+ <cv-button label="Button text" outlined />
405
+
406
+ <cv-button label="Button text" raised />
407
+ </div>
408
+
409
+ </cv-card>
410
+
411
+ <div class="cardContainer">
412
+ <cv-card cardTitle="Title">
413
+ <div slot="card-content">
414
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
415
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
416
+ veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
417
+ commo
418
+ </div>
419
+ </cv-card>
420
+
421
+ <cv-card cardTitle="Title">
422
+ <div slot="card-content">
423
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
424
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
425
+ veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
426
+ commo
427
+ </div>
428
+ </cv-card>
429
+
430
+ </div>
431
+
432
+ <div class="dialog darkDialog">
433
+ <div class="dialogContainer">
434
+ <div>Title</div>
435
+ <cv-icon>close</cv-icon>
436
+ </div>
437
+
438
+ <div class="dialogContent">
439
+ <div>
440
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
441
+ tempor incididunt ut labore et dolore magna aliqua.
442
+ </div>
443
+
444
+ <div class="dialogActions">
445
+ <cv-button label="Button text" outlined />
446
+
447
+ <cv-button label="Button text" raised />
448
+ </div>
449
+ </div>
450
+
451
+ </div>
452
+ </div>
453
+
454
+ ## Color list
455
+
456
+ #### Foreground colors
457
+
458
+ | Name | Example | Light mode hexadecimal color | Dark mode hexadecimal color | Covalent variable name |
459
+ | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------- | --------------------------- | ---------------------------------------- |
460
+ | <div>Text</div> <div>Default text color</div> | <div class="primaryText">Lorem ipsum dolor sit amet</div> | #000000 <br /> 0.87 opacity | #ffffff <br /> 1.00 opacity | --mdc-theme-text-primary-on-background |
461
+ | <div>Secondary text</div> <div>Less emphasized text</div> | <div class="secondary">Lorem ipsum dolor sit amet</div> | #000000 <br /> 0.54 opacity | #ffffff <br /> 0.7 opacity | --mdc-theme-text-secondary-on-background |
462
+ | <div>Disabled text</div> | <div class="disabled">Lorem ipsum dolor sit amet</div> | #000000 <br /> 0.38 opacity | #ffffff <br /> 0.5 opacity | --mdc-theme-text-disabled-on-background |
463
+ | <div>Icon</div><div>Default icon color</div> | <cv-icon>directions_boat</cv-icon> | #000000 <br /> 0.54 opacity | #ffffff <br /> 0.7 opacity | --mdc-theme-text-secondary-on-background |
464
+ | <div>Disabled icon</div> | <cv-icon class="disabled">directions_boat</cv-icon> | #000000 <br /> 0.38 opacity | #ffffff <br /> 0.5 opacity | --mdc-theme-text-disabled-on-background |
465
+ | <div>Divider</div> | <div class="divider" /> | #000000 <br /> 0.12 opacity | #ffffff <br /> 0.2 opacity | --mdc-theme-border |
466
+ | <div>Positive</div> | <div class="positiveFg">Lorem ipsum dolor sit amet</div> <cv-icon class="positiveFg">directions_boat</cv-icon> | #0a7e07 | #42bd41 | --mdc-theme-positive |
467
+ | <div>Caution</div> | <div class="cautionFg">Lorem ipsum dolor sit amet</div> <cv-icon class="cautionFg">directions_boat</cv-icon> | #ff8f00 | #ffb74d | --mdc-theme-caution |
468
+ | <div>Negative</div> | <div class="negativeFg">Lorem ipsum dolor sit amet</div> <cv-icon class="negativeFg">directions_boat</cv-icon> | #b11d00 | #f46f5a | --mdc-theme-negative |
469
+ | <div>Primary</div> | <div class="primaryFg">Lorem ipsum dolor sit amet</div> <cv-icon class="primaryFg">directions_boat</cv-icon> | #007373 | #59cecd | --mdc-theme-primary |
470
+ | <div>Emphasis</div> | <div class="emphasisFg">Lorem ipsum dolor sit amet</div> <cv-icon class="emphasisFg">directions_boat</cv-icon> | #546e7a | #b0bec5 | --mdc-theme-emphasis |
471
+
472
+ #### Background colors
473
+
474
+ | Name | Example | Light mode material color | Light mode hexadecimal color | Dark mode material color | Dark mode hexadecimal Color | Covalent variable name |
475
+ | ------------------------------------------------------------------ | -------------------------------------- | ------------------------- | ---------------------------- | ------------------------ | --------------------------- | -------------------------------------------- |
476
+ | <div>Background</div> <div>The page background</div> | <div class="background" /> | Mat Grey 100 | #f5f5f5 | TD Slate 1500 | #161c1f | --mdc-theme-background |
477
+ | <div>Surface</div> | <div class="surface" /> | Mat White | #ffffff | TD Slate 1100 | #28353b | --mdc-theme-surface |
478
+ | <div>Canvas</div> <div>Editable workspaces like code windows</div> | <div class="canvas" /> | Mat Grey 200 | #eeeeee | TD Slate 1700 | #101314 | --mdc-theme-surface-canvas |
479
+ | <div>Positive</div> | <div class="positive" /> | Mat Green 200 | #a5d6a7 | #336033 | #336033 | --mdc-theme-surface-positive |
480
+ | <div>Positive (highlight)</div> | <div class="positiveHighlight" /> | Positive (10% opaque) | #a5d6a7<br /> 0.1 opacity | Positive (40% opaque) | #336033 <br /> 0.4 opacity | --mdc-theme-surface-positive-highlight |
481
+ | <div>Primary (highlight hover)</div> | <div class="positiveHighlightHover" /> | Positive (20% opaque) | #a5d6a7<br /> 0.2 opacity | Positive (60% opaque) | #336033 <br /> 0.6 opacity | --mdc-theme-surface-positive-highlight-hover |
482
+ | <div>Caution</div> | <div class="caution" /> | Mat Orange 300 | #ffb74d | #704c16 | #704c16 | --mdc-theme-surface-caution |
483
+ | <div>Caution (highlight)</div> | <div class="cautionHighlight" /> | Caution (10% opaque) | #ffb74d<br /> 0.1 opacity | Caution (40% opaque) | #704c16 <br /> 0.4 opacity | --mdc-theme-surface-caution-highlight |
484
+ | <div>Caution (highlight hover)</div> | <div class="cautionHighlightHover" /> | Caution (20% opaque) | #ffb74d <br /> 0.2 opacity | Caution (60% opaque) | #704c16 <br /> 0.6 opacity | --mdc-theme-surface-caution-highlight-hover |
485
+ | <div>Negative</div> | <div class="negative" /> | Mat Red 300 | #e57373 | #883e32 | #883e32 | --mdc-theme-surface-negative |
486
+ | <div>Negative (highlight)</div> | <div class="negativeHighlight" /> | Negative (10% opaque) | #e57373<br /> 0.1 opacity | Negative (40% opaque) | #883e32 <br /> 0.4 opacity | --mdc-theme-surface-negative-highlight |
487
+ | <div>Negative (highlight hover)</div> | <div class="negativeHighlightHover" /> | Negative (20% opaque) | #e57373<br /> 0.2 opacity | Negative (60% opaque) | #883e32 <br /> 0.6 opacity | --mdc-theme-surface-negative-highlight-hover |
488
+ | <div>Neutral</div> | <div class="neutral" /> | Mat Grey 400 | #bdbdbd | TD Slate 800 | #43515a | --mdc-theme-surface-neutral |
489
+ | <div>Neutral (highlight)</div> | <div class="neutralHighlight" /> | Neutral (4% opaque) | #bdbdbd<br /> 0.04 opacity | Neutral (40% opaque) | #43515a <br /> 0.4 opacity | --mdc-theme-surface-neutral-highlight |
490
+ | <div>Neutral (highlight hover)</div> | <div class="neutralHighlightHover" /> | Neutral (8% opaque) | #bdbdbd<br /> 0.08 opacity | Neutral (60% opaque) | #43515a <br /> 0.6 opacity | --mdc-theme-surface-neutral-highlight-hover |
491
+ | <div>Primary</div> | <div class="primary" /> | TD Teal 200 | #85dddc | TD Teal 1200 | #045c5c | --mdc-theme-surface-primary |
492
+ | <div>Primary (highlight)</div> | <div class="primaryHighlight" /> | Primary (10% opaque) | #85dddc <br /> 0.1 opacity | Primary (40% opaque) | #045c5c <br /> 0.4 opacity | --mdc-theme-surface-primary-highlight |
493
+ | <div>Primary (highlight hover)</div> | <div class="primaryHighlightHover" /> | Primary (20% opaque) | #85dddc <br /> 0.2 opacity | Primary (60% opaque) | #045c5c <br /> 0.6 opacity | --mdc-theme-surface-primrary-highlight-hover |
494
+ | <div>Emphasis</div> | <div class="emphasis" /> | TD Slate 200 | #afb6b9 | TD Slate 800 | #43515a | --mdc-theme-surface-emphasis |
495
+ | <div>Emphasis (highlight)</div> | <div class="emphasisHighlight" /> | Emphasis (10% opaque) | #afb6b9 <br /> 0.1 opacity | Emphasis (40% opaque) | #43515a <br /> 0.4 opacity | --mdc-theme-surface-emphasis-highlight |
496
+ | <div>Emphasis (highlight hover)</div> | <div class="emphasisHighlightHover" /> | Emphasis (20% opaque) | #afb6b9 <br /> 0.2 opacity | Emphasis (60% opaque) | #43515a <br /> 0.6 opacity | --mdc-theme-surface-emphasis-highlight-hover |
497
+
498
+ ## Config colors for Material Design
499
+
500
+ You should almost never use these. They're here to explain the initial theme setup in Angular Material. Instead, use the colors above.
501
+
502
+ | Name | Light mode example | Dark mode example |
503
+ | -------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
504
+ | <div>Accent</div> | <div class="cv-teal-500">TD Teal 500</div> | <div class="cv-teal-500">TD Teal 500</div> |
505
+ | <div>Accent (light)</div> | <div class="accent-background-light">Background - Accent</div> | <div class="accent-foreground-light">Foreground - Accent</div> |
506
+ | <div>Accent (dark)</div> | <div class="accent-background-dark">Foreground - Accent</div> | <div class="accent-foreground-dark">Background - Accent</div> |
507
+ | <div>Primary</div> | <div class="cv-slate-500">TD Slate 500</div> | <div class="cv-slate-500">TD Slate 500</div> |
508
+ | <div>Primary (dark)</div> | <div class="primary-foreground-dark">Foreground - Primary</div> | <div class="primary-background-dark">Background - Primary</div> |
509
+ | <div>Primary (light)</div> | <div class="primary-light">Background - Primary</div> | <div class="primary-light">Foreground - Primary</div> |