@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,172 @@
1
+ import './full-screen-dialog';
2
+ import '../dialog/dialog';
3
+ import '../button/button';
4
+ import '../toolbar/toolbar';
5
+ import '../icon-button/icon-button';
6
+ import '../icon-button-toggle/icon-button-toggle';
7
+ import '../icon-radio/icon-radio-toggle';
8
+ import '../typography/typography';
9
+ import '../icon/icon';
10
+
11
+ export default {
12
+ title: 'Components/Full-screen dialog',
13
+ argTypes: {},
14
+ args: {
15
+ helpOpen: false,
16
+ helpResizable: false,
17
+ open: false,
18
+ escapeKeyAction: 'close',
19
+ },
20
+ };
21
+
22
+ const Template = ({ helpOpen, helpResizable, open, escapeKeyAction }) => {
23
+ document.addEventListener(
24
+ 'DOMContentLoaded',
25
+ () => {
26
+ const button = document.body.querySelector('#dialog-button');
27
+ const helpToggleButton = document.body.querySelector('.help-toggle');
28
+ const fullscreenCloseButton = document.body.querySelector(
29
+ '.full-screen-dialog-close'
30
+ );
31
+ button.addEventListener('click', () => {
32
+ const dialog = document.body.querySelector('#dialog1');
33
+ dialog.open = true;
34
+ });
35
+
36
+ helpToggleButton.addEventListener('click', () => {
37
+ const dialog = document.body.querySelector('#dialog1');
38
+ dialog.helpOpen = !dialog.helpOpen;
39
+ });
40
+
41
+ fullscreenCloseButton.addEventListener('click', () => {
42
+ const dialog = document.body.querySelector('#dialog1');
43
+ dialog.open = false;
44
+ });
45
+ },
46
+ { once: true }
47
+ );
48
+
49
+ return `
50
+ <cv-button id="dialog-button" raised>Open full-screen dialog</cv-button>
51
+ <cv-full-screen-dialog id="dialog1" scrimClickAction="" ${
52
+ open ? ' open' : ''
53
+ } escapeKeyAction="${escapeKeyAction}"${
54
+ helpResizable ? ' helpResizable' : ''
55
+ }${helpOpen ? ' helpOpen' : ''}>
56
+ <!-- Content to be rendered in the full-screen dialog component -->
57
+ <!-- Replace with any content as desired -->
58
+
59
+ <cv-toolbar>
60
+ <span slot="title">
61
+ Connect data source
62
+ </span>
63
+ <cv-icon-button-toggle onIcon="help" offIcon="help" class="help-toggle"
64
+ slot="actionItems"></cv-icon-button-toggle>
65
+ <cv-icon-button icon="close" class="full-screen-dialog-close"
66
+ slot="actionItems"></cv-icon-button>
67
+ </cv-toolbar>
68
+ <div style="display:flex; gap: 3rem; flex-wrap: wrap; padding: 2rem 1rem 1.5rem; max-width: 1200px">
69
+ <div>
70
+ <div style="display:flex;">
71
+ <span>
72
+ <cv-icon-button-toggle onIcon="info" offIcon="info" toggledOn></cv-icon-button-toggle>
73
+ </span>
74
+ <div style="display: inline-block; margin: 0 0 1rem 1rem;">
75
+ <cv-typography scale="subtitle1">
76
+ Select model
77
+ </cv-typography>
78
+ <cv-typography scale="caption">
79
+ Select the industry data model for your organization
80
+ </cv-typography>
81
+ </div>
82
+ </div>
83
+ <div style="display:flex; margin-top: 1rem;">
84
+ <span>
85
+ <cv-icon-button-toggle onIcon="info" offIcon="info" toggledOn></cv-icon-button-toggle>
86
+ </span>
87
+ <div style="display: inline-block; margin: 0 0 1rem 1rem;">
88
+ <cv-typography scale="subtitle1">
89
+ Review details
90
+ </cv-typography>
91
+ <cv-typography scale="caption">
92
+ Preview the selected model and sample schema
93
+ </cv-typography>
94
+ </div>
95
+ </div>
96
+ <div style="display:flex; margin-top: 1rem;">
97
+ <span>
98
+ <cv-icon-button-toggle onIcon="info" offIcon="info" toggledOn></cv-icon-button-toggle>
99
+ </span>
100
+ <div style="display: inline-block; margin: 0 0 1rem 1rem;">
101
+ <cv-typography scale="subtitle1">
102
+ Install
103
+ </cv-typography>
104
+ <cv-typography scale="caption">
105
+ Acknowledge creation of database and install
106
+ </cv-typography>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div
111
+ style="display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 1rem; flex: 1">
112
+ <cv-radio-icon>
113
+ <cv-icon slot="icon">work</cv-icon>
114
+ <div slot="text">Balanced</div>
115
+ <div slot="text">Every week</div>
116
+ </cv-radio-icon>
117
+ <cv-radio-icon>
118
+ <cv-icon slot="icon">work</cv-icon>
119
+ <div slot="text">Balanced</div>
120
+ <div slot="text">Every week</div>
121
+ </cv-radio-icon>
122
+ <cv-radio-icon>
123
+ <cv-icon slot="icon">work</cv-icon>
124
+ <div slot="text">Balanced</div>
125
+ <div slot="text">Every week</div>
126
+ </cv-radio-icon>
127
+ <cv-radio-icon>
128
+ <cv-icon slot="icon">work</cv-icon>
129
+ <div slot="text">Balanced</div>
130
+ <div slot="text">Every week</div>
131
+ </cv-radio-icon>
132
+ </div>
133
+ </div>
134
+ <!-- Content rendered in the help section of the component -->
135
+ <!-- Replace with any content as desired -->
136
+ <div slot="help">
137
+ <cv-toolbar sticky>
138
+ <span slot="title" style="padding-left: 4px;">Help</span>
139
+ <cv-icon-button slot="actionItems" icon="undock" covalent-icons></cv-icon-button>
140
+ </cv-toolbar>
141
+ <div style="padding: 16px">
142
+ <cv-typography scale="headline5">
143
+ Ultricies nunc massa, id ut felis sed varius accumsan platea.
144
+ </cv-typography>
145
+ <br />
146
+ <cv-typography scale="body1">
147
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
148
+ tincidunt lectus risus, id aliquet mi congue sed.
149
+ </cv-typography>
150
+ <br />
151
+ <cv-typography scale="body1">
152
+ Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
153
+ pouere cubilia curae; Phasellus tincidunt eros arcu, sollicitudin
154
+ laoreet urna aliquet eget.
155
+ </cv-typography>
156
+ <br />
157
+ <cv-typography scale="body1">
158
+ Phasellus porta sed libero vel vulputate. Quisque non nisl sem.
159
+ Pellentesque nec pretium magna, et vestibulum neque. Mauris molestie
160
+ eros quis nisi pretium,
161
+ </cv-typography>
162
+ <br />
163
+ <cv-typography scale="body1">
164
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
165
+ tincidunt lectus risus, id aliquet mi congue sed.
166
+ </cv-typography>
167
+ </div>
168
+ </div>
169
+ </cv-full-screen-dialog>`;
170
+ };
171
+
172
+ export const Basic = Template.bind({});
@@ -0,0 +1,84 @@
1
+ import { css, html, TemplateResult, unsafeCSS } from 'lit';
2
+ import { customElement, property } from 'lit/decorators.js';
3
+ import styles from './full-screen-dialog.scss?inline';
4
+ import CovalentDialog from '../dialog/dialog';
5
+ import '../focused-page/focused-page';
6
+
7
+ /**
8
+ * Full-screen Dialog
9
+ *
10
+ * @slot - This element has a slot
11
+ */
12
+
13
+ @customElement('cv-full-screen-dialog')
14
+ export class CovalentFullscreenDialog extends CovalentDialog {
15
+ static override styles = [
16
+ css`
17
+ ${unsafeCSS(CovalentDialog.styles)} ${unsafeCSS(styles)}
18
+ `,
19
+ ];
20
+
21
+ /**
22
+ * Whether the help section is open or not
23
+ */
24
+ @property({ type: Boolean, reflect: true })
25
+ helpOpen = false;
26
+
27
+ /**
28
+ * Whether the help section is resizable
29
+ */
30
+ @property({ type: Boolean, reflect: true })
31
+ helpResizable = false;
32
+
33
+ /**
34
+ * Since the default, action slots of mdc-dialog have been replaced with the focused page component,
35
+ * override this method to return focused page as the initial focus element
36
+ */
37
+ protected override getInitialFocusEl(): HTMLElement | null {
38
+ const initFocusSelector = `[${this.initialFocusAttribute}]`;
39
+
40
+ // only search light DOM. This typically handles all the cases
41
+ const lightDomQs = this.querySelector(initFocusSelector);
42
+
43
+ if (lightDomQs) {
44
+ return lightDomQs as HTMLElement;
45
+ }
46
+
47
+ const focusedPage = this.renderRoot.querySelector('cv-focused-page');
48
+ return focusedPage;
49
+ }
50
+
51
+ protected override render(): TemplateResult<1> {
52
+ return html` <div
53
+ class="mdc-dialog"
54
+ role="alertdialog"
55
+ aria-modal="true"
56
+ aria-labelledby="title"
57
+ aria-describedby="content"
58
+ >
59
+ <div class="mdc-dialog__container">
60
+ <div class="mdc-dialog__surface">
61
+ <div id="content" class="mdc-dialog__content">
62
+ <cv-focused-page
63
+ .helpOpen="${this.helpOpen}"
64
+ .helpResizable="${this.helpResizable}"
65
+ .hideTopBorder="${true}"
66
+ >
67
+ <slot></slot>
68
+ <slot name="help" slot="help"> </slot>
69
+ </cv-focused-page>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <div class="mdc-dialog__scrim"></div>
74
+ </div>`;
75
+ }
76
+ }
77
+
78
+ declare global {
79
+ interface HTMLElementTagNameMap {
80
+ 'cv-full-screen-dialog': CovalentFullscreenDialog;
81
+ }
82
+ }
83
+
84
+ export default CovalentFullscreenDialog;
@@ -0,0 +1,316 @@
1
+ // eslint-disable-next-line @nx/enforce-module-boundaries
2
+ import * as iconList from '../../../icons/material-codepoints.json';
3
+
4
+ export const MAT_ICON_LIST = Object.keys(iconList);
5
+
6
+ export const COV_ICON_LIST = [
7
+ 'advanced_sql',
8
+ 'advanced_sql_outlined',
9
+ 'alias_arrow',
10
+ 'alias_arrow_outlined',
11
+ 'api',
12
+ 'api_outlined',
13
+ 'api_ondark',
14
+ 'application',
15
+ 'application_outlined',
16
+ 'attribution',
17
+ 'attribution_outlined',
18
+ 'auto_refresh_off',
19
+ 'auto_refresh_off_outlined',
20
+ 'auto_refresh_on',
21
+ 'auto_refresh_on_outlined',
22
+ 'autorefresh_pause',
23
+ 'autorefresh_pause_outlined',
24
+ 'autorenew_on',
25
+ 'autorenew_on_outlined',
26
+ 'autorenew_off',
27
+ 'autorenew_off_outlined',
28
+ 'branch',
29
+ 'branch_outlined',
30
+ 'bucket',
31
+ 'bucket_outlined',
32
+ 'cluster_analysis',
33
+ 'cluster_analysis_outlined',
34
+ 'code_deployed',
35
+ 'code_deployed_outlined',
36
+ 'code_deployed_retired',
37
+ 'code_deployed_retired_outlined',
38
+ 'code_fork',
39
+ 'code_fork_outlined',
40
+ 'column',
41
+ 'column_outlined',
42
+ 'compute_cluster',
43
+ 'compute_cluster_outlined',
44
+ 'compute_cluster_group',
45
+ 'compute_cluster_group_outlined',
46
+ 'compute_groups',
47
+ 'compute_groups_outlined',
48
+ 'compute_profile',
49
+ 'compute_profile_outlined',
50
+ 'compute_profile_dark',
51
+ 'compute_profile_light',
52
+ 'connected_identity',
53
+ 'connected_identity_outlined',
54
+ 'created_document',
55
+ 'created_document_outlined',
56
+ 'data_management',
57
+ 'data_management_outlined',
58
+ 'data_preparation',
59
+ 'data_preparation_outlined',
60
+ 'data_protection',
61
+ 'data_protection_outlined',
62
+ 'data_sharing',
63
+ 'data_sharing_outlined',
64
+ 'data_source',
65
+ 'data_source_outlined',
66
+ 'data_source_type_amazon',
67
+ 'data_source_type_amazon_outlined',
68
+ 'data_source_type_azure',
69
+ 'data_source_type_azure_outlined',
70
+ 'data_source_type_cloudera',
71
+ 'data_source_type_cloudera_outlined',
72
+ 'data_source_type_hdinsight',
73
+ 'data_source_type_hdinsight_outlined',
74
+ 'data_source_type_microsoft',
75
+ 'data_source_type_microsoft_outlined',
76
+ 'data_source_type_teradata',
77
+ 'data_source_type_teradata_outlined',
78
+ 'data_transformation_services',
79
+ 'data_transformation_services_outlined',
80
+ 'database',
81
+ 'database_outlined',
82
+ 'database_changed',
83
+ 'database_changed_outlined',
84
+ 'database_edit',
85
+ 'database_edit_outlined',
86
+ 'database_foreign',
87
+ 'database_foreign_outlined',
88
+ 'database_lab',
89
+ 'database_lab_outlined',
90
+ 'database_none',
91
+ 'database_none_outlined',
92
+ 'database_search',
93
+ 'database_search_outlined',
94
+ 'database_synced',
95
+ 'database_synced_outlined',
96
+ 'database_unreachable',
97
+ 'database_unreachable_outlined',
98
+ 'disconnect',
99
+ 'dock_right',
100
+ 'dock_right_outlined',
101
+ 'engine',
102
+ 'engine_outlined',
103
+ 'engine_sql',
104
+ 'engine_sql_outlined',
105
+ 'file',
106
+ 'file_outlined',
107
+ 'file_changed',
108
+ 'file_changed_outlined',
109
+ 'file_edit',
110
+ 'file_edit_outlined',
111
+ 'file_foreign',
112
+ 'file_foreign_outlined',
113
+ 'file_lab',
114
+ 'file_lab_outlined',
115
+ 'file_search',
116
+ 'file_search_outlined',
117
+ 'file_synced',
118
+ 'file_synced_outlined',
119
+ 'filter_clear',
120
+ 'filter_clear_outlined',
121
+ 'formula',
122
+ 'formula_outlined',
123
+ 'lab',
124
+ 'lab_outlined',
125
+ 'loader_dots',
126
+ 'machine_learning',
127
+ 'machine_learning_outlined',
128
+ 'machine_learning_ondark',
129
+ 'managed_services',
130
+ 'managed_services_outlined',
131
+ 'merge',
132
+ 'merge_outlined',
133
+ 'model',
134
+ 'model_outlined',
135
+ 'model_ondark',
136
+ 'model_configuration',
137
+ 'model_configuration_outlined',
138
+ 'model_configuration_ondark',
139
+ 'no_results',
140
+ 'no_results_outlined',
141
+ 'node_branch',
142
+ 'node_merge',
143
+ 'node_notification',
144
+ 'node_notification_outlined',
145
+ 'node_notification_ondark',
146
+ 'nos',
147
+ 'nos_outlined',
148
+ 'object_browser_view',
149
+ 'object_browser_view_outlined',
150
+ 'object_storage',
151
+ 'object_storage_outlined',
152
+ 'object_storage_ondark',
153
+ 'operations',
154
+ 'operations_outlined',
155
+ 'operators_divide',
156
+ 'operators_divide_outlined',
157
+ 'operators_equals',
158
+ 'operators_equals_outlined',
159
+ 'operators_greater_than',
160
+ 'operators_greater_than_outlined',
161
+ 'operators_greater_than_or_equal',
162
+ 'operators_greater_than_or_equal_outlined',
163
+ 'operators_less_than',
164
+ 'operators_less_than_outlined',
165
+ 'operators_less_than_or_equal',
166
+ 'operators_less_than_or_equal_outlined',
167
+ 'operators_multiply',
168
+ 'operators_multiply_outlined',
169
+ 'operators_not_equal',
170
+ 'operators_not_equal_outlined',
171
+ 'operators_parentheses',
172
+ 'operators_parentheses_outlined',
173
+ 'operators_parenthesis_left',
174
+ 'operators_parenthesis_left_outlined',
175
+ 'operators_parenthesis_right',
176
+ 'operators_parenthesis_right_outlined',
177
+ 'operators_subtract',
178
+ 'operators_subtract_outlined',
179
+ 'pinned',
180
+ 'pin_outlined',
181
+ 'placeholder',
182
+ 'placeholder_outlined',
183
+ 'primary_cluster',
184
+ 'primary_cluster_outlined',
185
+ 'product_analyst',
186
+ 'product_analyst_outlined',
187
+ 'product_appcenter',
188
+ 'product_appcenter_outlined',
189
+ 'product_console',
190
+ 'product_console_outlined',
191
+ 'product_cx',
192
+ 'product_cx_outlined',
193
+ 'product_editor',
194
+ 'product_editor_outlined',
195
+ 'product_jupyterhub',
196
+ 'product_jupyterhub_outlined',
197
+ 'product_modelops',
198
+ 'product_modelops_outlined',
199
+ 'product_outbound_campaign_manager',
200
+ 'product_outbound_campaign_manager_outlined',
201
+ 'product_querygrid',
202
+ 'product_querygrid_outlined',
203
+ 'product_streams',
204
+ 'product_streams_outlined',
205
+ 'product_vantage',
206
+ 'product_vantage_outlined',
207
+ 'product_viewpoint',
208
+ 'product_viewpoint_outlined',
209
+ 'professional_services',
210
+ 'professional_services_outlined',
211
+ 'report',
212
+ 'report_outlined',
213
+ 'resize_northeast',
214
+ 'resize_northeast_outlined',
215
+ 'resize_northwest',
216
+ 'resize_northwest_outlined',
217
+ 'resize_southeast',
218
+ 'resize_southeast_outlined',
219
+ 'resize_southwest',
220
+ 'resize_southwest_outlined',
221
+ 'row',
222
+ 'row_outlined',
223
+ 'rules',
224
+ 'rules_outlined',
225
+ 'rules_ondark',
226
+ 'rules_insert',
227
+ 'rules_insert_outlined',
228
+ 'rules_insert_ondark',
229
+ 'rules_select',
230
+ 'rules_select_outlined',
231
+ 'rules_select_ondark',
232
+ 'sankey',
233
+ 'sankey_outlined',
234
+ 'script',
235
+ 'script_outlined',
236
+ 'script_ondark',
237
+ 'script_macro',
238
+ 'script_macro_ondark',
239
+ 'script_management',
240
+ 'script_management_outlined',
241
+ 'script_sql',
242
+ 'script_sql_outlined',
243
+ 'script_sql_ondark',
244
+ 'script_stored_procedure',
245
+ 'script_stored_procedure_outlined',
246
+ 'script_stored_procedure_ondark',
247
+ 'segmentation',
248
+ 'segmentation_outlined',
249
+ 'server',
250
+ 'server_outlined',
251
+ 'server_changed',
252
+ 'server_changed_outlined',
253
+ 'server_edit',
254
+ 'server_edit_outlined',
255
+ 'server_foreign',
256
+ 'server_foreign_outlined',
257
+ 'server_lab',
258
+ 'server_lab_outlined',
259
+ 'server_search',
260
+ 'server_search_outlined',
261
+ 'server_synced',
262
+ 'server_synced_outlined',
263
+ 'server_workspace',
264
+ 'server_workspace_outlined',
265
+ 'sftp',
266
+ 'sftp_outlined',
267
+ 'sftp_ondark',
268
+ 'slack',
269
+ 'state_cancelled',
270
+ 'state_cancelled_outlined',
271
+ 'state_caution',
272
+ 'state_caution_outlined',
273
+ 'state_changed',
274
+ 'state_changed_outlined',
275
+ 'state_negative',
276
+ 'state_negative_outlined',
277
+ 'state_paused',
278
+ 'state_paused_outlined',
279
+ 'state_positive',
280
+ 'state_positive_outlined',
281
+ 'table',
282
+ 'table_outlined',
283
+ 'table_changed',
284
+ 'table_changed_outlined',
285
+ 'table_edit',
286
+ 'table_edit_outlined',
287
+ 'table_foreign',
288
+ 'table_foreign_outlined',
289
+ 'table_lab',
290
+ 'table_lab_outlined',
291
+ 'table_search',
292
+ 'table_search_outlined',
293
+ 'table_synced',
294
+ 'table_synced_outlined',
295
+ 'teradata',
296
+ 'teradata_outlined',
297
+ 'teradata_nocircle',
298
+ 'teradata_nobackground',
299
+ 'teradata_nobackground_outlined',
300
+ 'text_analysis',
301
+ 'text_analysis_outlined',
302
+ 'undock',
303
+ 'undock_outlined',
304
+ 'user_defined_function',
305
+ 'user_defined_function_outlined',
306
+ 'variable',
307
+ 'variable_outlined',
308
+ 'variable_ondark',
309
+ 'view_sankey',
310
+ 'wand',
311
+ 'wand_outlined',
312
+ 'workflow',
313
+ 'workflow_outlined',
314
+ ];
315
+
316
+ export default COV_ICON_LIST;
@@ -0,0 +1,25 @@
1
+ :host {
2
+ --mdc-icon-font: 'covalent-icons';
3
+ }
4
+
5
+ .icon-grid {
6
+ display: flex;
7
+ flex-wrap: wrap; /* Enables wrapping to new rows */
8
+ gap: 24px; /* Space between items */
9
+ justify-content: start; /* Align items to the left */
10
+ }
11
+
12
+ .icon-container {
13
+ margin: 20px 5px;
14
+ text-align: center;
15
+ width: 200px;
16
+
17
+ cv-icon {
18
+ margin-bottom: 16px;
19
+ font-size: 24px;
20
+ }
21
+ }
22
+
23
+ .wrap {
24
+ word-wrap: break-word;
25
+ }
@@ -0,0 +1,37 @@
1
+ import { LitElement, css, html, unsafeCSS } from 'lit';
2
+ import { customElement } from 'lit/decorators.js';
3
+ import COV_ICON_LIST from './_icon-list';
4
+ import styles from './icon-demo.scss?inline';
5
+ import './icon';
6
+ import '../typography/typography';
7
+
8
+ @customElement('cv-icon-demo')
9
+ export class CovalentIconDemo extends LitElement {
10
+ static override styles = [
11
+ css`
12
+ ${unsafeCSS(styles)}
13
+ `,
14
+ ];
15
+
16
+ render() {
17
+ return html`<div class="icon-grid">
18
+ ${COV_ICON_LIST.map(
19
+ (icon) =>
20
+ html`<div class="icon-container">
21
+ <cv-icon>${icon}</cv-icon>
22
+ <cv-typography scale="caption">
23
+ <div class="wrap">${icon}</div>
24
+ </cv-typography>
25
+ </div>`
26
+ )}
27
+ </div>`;
28
+ }
29
+ }
30
+
31
+ declare global {
32
+ interface HTMLElementTagNameMap {
33
+ 'cv-icon-demo': CovalentIconDemo;
34
+ }
35
+ }
36
+
37
+ export default CovalentIconDemo;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @vitest-environment jsdom
3
+ */
4
+ import { it, describe, expect } from 'vitest';
5
+ import { CovalentIcon } from './icon';
6
+
7
+ describe('Icon', () => {
8
+ it('should work', () => {
9
+ expect(new CovalentIcon()).toBeDefined();
10
+ });
11
+ });