@haiilo/catalyst 0.1.0 → 0.1.1

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 (75) hide show
  1. package/dist/catalyst/{app-globals-622e4f87.js → app-globals-f83c9e4a.js} +24 -6
  2. package/dist/catalyst/cat-button.entry.js +2 -2
  3. package/dist/catalyst/cat-icon.entry.js +1 -1
  4. package/dist/catalyst/cat-menu.entry.js +2957 -0
  5. package/dist/catalyst/cat-spinner.entry.js +1 -1
  6. package/dist/catalyst/catalyst.css +7 -0
  7. package/dist/catalyst/catalyst.esm.js +3 -3
  8. package/dist/{esm/index-72a1bbba.js → catalyst/index-45406d3b.js} +2 -2
  9. package/dist/components/cat-menu.d.ts +11 -0
  10. package/dist/types/components/cat-menu/cat-menu.d.ts +23 -0
  11. package/dist/types/components.d.ts +24 -0
  12. package/package.json +9 -6
  13. package/dist/catalyst/index-72a1bbba.js +0 -3031
  14. package/dist/catalyst/p-17a20657.js +0 -1
  15. package/dist/catalyst/p-582935bb.entry.js +0 -1
  16. package/dist/catalyst/p-f3fad7a0.js +0 -1
  17. package/dist/cjs/app-globals-8908fe44.js +0 -132
  18. package/dist/cjs/app-globals-fe9ff8ba.js +0 -706
  19. package/dist/cjs/cat-button.cjs.entry.js +0 -633
  20. package/dist/cjs/cat-button_3.cjs.entry.js +0 -645
  21. package/dist/cjs/cat-icon-registry-850c538c.js +0 -45
  22. package/dist/cjs/cat-icon-registry-da00f7d6.js +0 -1321
  23. package/dist/cjs/cat-icon.cjs.entry.js +0 -31
  24. package/dist/cjs/cat-spinner.cjs.entry.js +0 -25
  25. package/dist/cjs/catalyst.cjs.js +0 -128
  26. package/dist/cjs/css-shim-3bfdba4f.js +0 -6
  27. package/dist/cjs/dom-8ac1ad03.js +0 -75
  28. package/dist/cjs/index-083488c8.js +0 -3065
  29. package/dist/cjs/index.cjs.js +0 -2
  30. package/dist/cjs/loader.cjs.js +0 -38
  31. package/dist/cjs/shadow-css-41d9783d.js +0 -390
  32. package/dist/collection/collection-manifest.json +0 -15
  33. package/dist/collection/components/cat-button/cat-button.css +0 -284
  34. package/dist/collection/components/cat-button/cat-button.js +0 -568
  35. package/dist/collection/components/cat-icon/cat-icon-registry.js +0 -41
  36. package/dist/collection/components/cat-icon/cat-icon.css +0 -49
  37. package/dist/collection/components/cat-icon/cat-icon.js +0 -89
  38. package/dist/collection/components/cat-spinner/cat-spinner.css +0 -63
  39. package/dist/collection/components/cat-spinner/cat-spinner.js +0 -64
  40. package/dist/collection/index.cdn.js +0 -21
  41. package/dist/collection/index.js +0 -1
  42. package/dist/collection/init.js +0 -8
  43. package/dist/collection/utils/breakpoints.js +0 -11
  44. package/dist/collection/utils/media-matcher.js +0 -54
  45. package/dist/collection/utils/platform.js +0 -49
  46. package/dist/collection/utils/utils.js +0 -3
  47. package/dist/components/cat-button.js +0 -680
  48. package/dist/components/cat-icon-registry.js +0 -43
  49. package/dist/components/cat-icon.js +0 -6
  50. package/dist/components/cat-icon2.js +0 -47
  51. package/dist/components/cat-spinner.js +0 -6
  52. package/dist/components/cat-spinner2.js +0 -40
  53. package/dist/components/index.js +0 -705
  54. package/dist/esm/app-globals-000601ea.js +0 -130
  55. package/dist/esm/app-globals-622e4f87.js +0 -704
  56. package/dist/esm/cat-button.entry.js +0 -629
  57. package/dist/esm/cat-button_3.entry.js +0 -639
  58. package/dist/esm/cat-icon-registry-59da2e37.js +0 -43
  59. package/dist/esm/cat-icon-registry-b66e3f57.js +0 -1294
  60. package/dist/esm/cat-icon.entry.js +0 -27
  61. package/dist/esm/cat-spinner.entry.js +0 -21
  62. package/dist/esm/catalyst.js +0 -126
  63. package/dist/esm/css-shim-20dbffa5.js +0 -4
  64. package/dist/esm/dom-c5ed0ba5.js +0 -73
  65. package/dist/esm/index.js +0 -1
  66. package/dist/esm/loader.js +0 -34
  67. package/dist/esm/polyfills/core-js.js +0 -11
  68. package/dist/esm/polyfills/css-shim.js +0 -1
  69. package/dist/esm/polyfills/dom.js +0 -79
  70. package/dist/esm/polyfills/es5-html-element.js +0 -1
  71. package/dist/esm/polyfills/index.js +0 -34
  72. package/dist/esm/polyfills/system.js +0 -6
  73. package/dist/esm/shadow-css-8c625855.js +0 -388
  74. package/dist/index.cjs.js +0 -1
  75. package/dist/index.js +0 -1
@@ -1,568 +0,0 @@
1
- import { Component, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';
2
- import log from 'loglevel';
3
- import { Breakpoints, isBreakpoint } from '../../utils/breakpoints';
4
- import { MediaMatcher } from '../../utils/media-matcher';
5
- /**
6
- * Buttons are used for interface actions.
7
- *
8
- * @part button - The native anchor or button element.
9
- * @part content - The textual content of the button.
10
- * @part prefix - The prefix icon.
11
- * @part suffix - The suffix icon.
12
- */
13
- export class CatButton {
14
- constructor() {
15
- this._iconOnly = true;
16
- /**
17
- * The rendering style of the button.
18
- */
19
- this.variant = 'filled';
20
- /**
21
- * The color palette of the button.
22
- */
23
- this.color = 'primary';
24
- /**
25
- * The size of the button.
26
- */
27
- this.size = 'm';
28
- /**
29
- * Specifies that the button should be disabled. A disabled button is unusable
30
- * and un-clickable. Corresponds with the native HTML disabled attribute.
31
- */
32
- this.disabled = false;
33
- /**
34
- * Displays the button in a loading state with a spinner. Just like a disabled
35
- * button, an inactive button is unusable and un-clickable. However, it
36
- * retains the current focus state.
37
- */
38
- this.loading = false;
39
- /**
40
- * Allows the button to submit a form.
41
- */
42
- this.submit = false;
43
- /**
44
- * Ellipse overflowing button content.
45
- */
46
- this.ellipsed = true;
47
- /**
48
- * Use round button edges.
49
- */
50
- this.round = false;
51
- /**
52
- * Hide the actual button content and only display the icon.
53
- */
54
- this.iconOnly = false;
55
- /**
56
- * Display the icon as a suffix.
57
- */
58
- this.iconSuffix = false;
59
- }
60
- onIconOnlyChanged(value) {
61
- var _a, _b;
62
- // teardown
63
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
64
- (_a = this.mediaQueryList) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.mediaQueryListener);
65
- this.mediaQueryList = undefined;
66
- this.mediaQueryListener = undefined;
67
- // setup
68
- if (isBreakpoint(value)) {
69
- (_b = this.mediaMatcher) !== null && _b !== void 0 ? _b : (this.mediaMatcher = new MediaMatcher());
70
- this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);
71
- this.mediaQueryListener = (event) => (this._iconOnly = event.matches);
72
- this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
73
- this._iconOnly = this.mediaQueryList.matches;
74
- }
75
- else {
76
- this._iconOnly = value;
77
- }
78
- }
79
- componentWillLoad() {
80
- this.onIconOnlyChanged(this.iconOnly);
81
- }
82
- componentWillRender() {
83
- if (this.isIconButton && !this.a11yLabel) {
84
- log.warn('[A11y] Missing ARIA label on icon button', this);
85
- }
86
- }
87
- haltDisabledEvents(event) {
88
- if (this.disabled || this.loading) {
89
- event.preventDefault();
90
- event.stopImmediatePropagation();
91
- }
92
- }
93
- /**
94
- * Sets focus on the button. Use this method instead of `button.focus()`.
95
- *
96
- * @param options An optional object providing options to control aspects of
97
- * the focusing process.
98
- */
99
- async setFocus(options) {
100
- this.button.focus(options);
101
- }
102
- render() {
103
- var _a;
104
- if (this.url) {
105
- return (h("a", { ref: el => (this.button = el), href: this.disabled ? undefined : this.url, target: this.urlTarget, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, id: this.buttonId, part: "button", class: {
106
- 'cat-button': true,
107
- 'cat-button-icon': this.isIconButton,
108
- 'cat-button-round': this.round,
109
- 'cat-button-loading': this.loading,
110
- 'cat-button-disabled': this.disabled,
111
- 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,
112
- [`cat-button-${this.variant}`]: Boolean(this.variant),
113
- [`cat-button-${this.color}`]: Boolean(this.color),
114
- [`cat-button-${this.size}`]: Boolean(this.size)
115
- }, onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
116
- }
117
- else {
118
- return (h("button", { ref: el => (this.button = el), type: this.submit ? 'submit' : 'button', name: this.name, value: this.value, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : null, "aria-label": this.a11yLabel, id: this.buttonId, part: "button", class: {
119
- 'cat-button': true,
120
- 'cat-button-icon': this.isIconButton,
121
- 'cat-button-round': (_a = this.round) !== null && _a !== void 0 ? _a : this.isIconButton,
122
- 'cat-button-loading': this.loading,
123
- 'cat-button-disabled': this.disabled,
124
- 'cat-button-ellipsed': this.ellipsed && !this.isIconButton,
125
- [`cat-button-${this.variant}`]: Boolean(this.variant),
126
- [`cat-button-${this.color}`]: Boolean(this.color),
127
- [`cat-button-${this.size}`]: Boolean(this.size)
128
- }, onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this) }, this.content));
129
- }
130
- }
131
- get iconSize() {
132
- switch (this.size) {
133
- case 'xs':
134
- return 's';
135
- default:
136
- return 'l';
137
- }
138
- }
139
- get spinnerSize() {
140
- switch (this.size) {
141
- case 'xs':
142
- return 'xs';
143
- default:
144
- return 'm';
145
- }
146
- }
147
- get isIconButton() {
148
- return Boolean(this.icon) && this._iconOnly;
149
- }
150
- get hasPrefixIcon() {
151
- return Boolean(this.icon) && !this._iconOnly && !this.iconSuffix;
152
- }
153
- get hasSuffixIcon() {
154
- return Boolean(this.icon) && !this._iconOnly && this.iconSuffix;
155
- }
156
- get content() {
157
- return [
158
- this.hasPrefixIcon ? (h("cat-icon", { icon: this.icon, size: this.iconSize, class: "cat-button-prefix", part: "prefix" })) : null,
159
- this.isIconButton ? (h("cat-icon", { icon: this.icon, size: this.iconSize })) : (h("span", { class: "cat-button-content", part: "content" },
160
- h("slot", null))),
161
- this.hasSuffixIcon ? (h("cat-icon", { icon: this.icon, size: this.iconSize, class: "cat-button-suffix", part: "suffix" })) : null,
162
- this.loading ? h("cat-spinner", { size: this.spinnerSize }) : null
163
- ];
164
- }
165
- onFocus(event) {
166
- this.catFocus.emit(event);
167
- }
168
- onBlur(event) {
169
- this.catBlur.emit(event);
170
- }
171
- static get is() { return "cat-button"; }
172
- static get encapsulation() { return "shadow"; }
173
- static get originalStyleUrls() { return {
174
- "$": ["cat-button.scss"]
175
- }; }
176
- static get styleUrls() { return {
177
- "$": ["cat-button.css"]
178
- }; }
179
- static get properties() { return {
180
- "variant": {
181
- "type": "string",
182
- "mutable": false,
183
- "complexType": {
184
- "original": "'filled' | 'outlined' | 'text'",
185
- "resolved": "\"filled\" | \"outlined\" | \"text\"",
186
- "references": {}
187
- },
188
- "required": false,
189
- "optional": false,
190
- "docs": {
191
- "tags": [],
192
- "text": "The rendering style of the button."
193
- },
194
- "attribute": "variant",
195
- "reflect": false,
196
- "defaultValue": "'filled'"
197
- },
198
- "color": {
199
- "type": "string",
200
- "mutable": false,
201
- "complexType": {
202
- "original": "'primary' | 'secondary' | 'danger' | 'success' | 'warning'",
203
- "resolved": "\"danger\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
204
- "references": {}
205
- },
206
- "required": false,
207
- "optional": false,
208
- "docs": {
209
- "tags": [],
210
- "text": "The color palette of the button."
211
- },
212
- "attribute": "color",
213
- "reflect": false,
214
- "defaultValue": "'primary'"
215
- },
216
- "size": {
217
- "type": "string",
218
- "mutable": false,
219
- "complexType": {
220
- "original": "'xs' | 's' | 'm' | 'l' | 'xl'",
221
- "resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
222
- "references": {}
223
- },
224
- "required": false,
225
- "optional": false,
226
- "docs": {
227
- "tags": [],
228
- "text": "The size of the button."
229
- },
230
- "attribute": "size",
231
- "reflect": false,
232
- "defaultValue": "'m'"
233
- },
234
- "name": {
235
- "type": "string",
236
- "mutable": false,
237
- "complexType": {
238
- "original": "string",
239
- "resolved": "string | undefined",
240
- "references": {}
241
- },
242
- "required": false,
243
- "optional": true,
244
- "docs": {
245
- "tags": [],
246
- "text": "The name of the button, which gets paired with the button's value when\nsubmitted as part of a form. Corresponds with the native HTML name\nattribute."
247
- },
248
- "attribute": "name",
249
- "reflect": false
250
- },
251
- "value": {
252
- "type": "string",
253
- "mutable": false,
254
- "complexType": {
255
- "original": "string",
256
- "resolved": "string | undefined",
257
- "references": {}
258
- },
259
- "required": false,
260
- "optional": true,
261
- "docs": {
262
- "tags": [],
263
- "text": "The value of the button, which gets paired with the button's name when\nsubmitted as part of a form. Corresponds with the native HTML value\nattribute."
264
- },
265
- "attribute": "value",
266
- "reflect": false
267
- },
268
- "disabled": {
269
- "type": "boolean",
270
- "mutable": false,
271
- "complexType": {
272
- "original": "boolean",
273
- "resolved": "boolean",
274
- "references": {}
275
- },
276
- "required": false,
277
- "optional": false,
278
- "docs": {
279
- "tags": [],
280
- "text": "Specifies that the button should be disabled. A disabled button is unusable\nand un-clickable. Corresponds with the native HTML disabled attribute."
281
- },
282
- "attribute": "disabled",
283
- "reflect": false,
284
- "defaultValue": "false"
285
- },
286
- "loading": {
287
- "type": "boolean",
288
- "mutable": false,
289
- "complexType": {
290
- "original": "boolean",
291
- "resolved": "boolean",
292
- "references": {}
293
- },
294
- "required": false,
295
- "optional": false,
296
- "docs": {
297
- "tags": [],
298
- "text": "Displays the button in a loading state with a spinner. Just like a disabled\nbutton, an inactive button is unusable and un-clickable. However, it\nretains the current focus state."
299
- },
300
- "attribute": "loading",
301
- "reflect": false,
302
- "defaultValue": "false"
303
- },
304
- "submit": {
305
- "type": "boolean",
306
- "mutable": false,
307
- "complexType": {
308
- "original": "boolean",
309
- "resolved": "boolean",
310
- "references": {}
311
- },
312
- "required": false,
313
- "optional": false,
314
- "docs": {
315
- "tags": [],
316
- "text": "Allows the button to submit a form."
317
- },
318
- "attribute": "submit",
319
- "reflect": false,
320
- "defaultValue": "false"
321
- },
322
- "ellipsed": {
323
- "type": "boolean",
324
- "mutable": false,
325
- "complexType": {
326
- "original": "boolean",
327
- "resolved": "boolean",
328
- "references": {}
329
- },
330
- "required": false,
331
- "optional": false,
332
- "docs": {
333
- "tags": [],
334
- "text": "Ellipse overflowing button content."
335
- },
336
- "attribute": "ellipsed",
337
- "reflect": false,
338
- "defaultValue": "true"
339
- },
340
- "round": {
341
- "type": "boolean",
342
- "mutable": false,
343
- "complexType": {
344
- "original": "boolean",
345
- "resolved": "boolean",
346
- "references": {}
347
- },
348
- "required": false,
349
- "optional": false,
350
- "docs": {
351
- "tags": [],
352
- "text": "Use round button edges."
353
- },
354
- "attribute": "round",
355
- "reflect": false,
356
- "defaultValue": "false"
357
- },
358
- "url": {
359
- "type": "string",
360
- "mutable": false,
361
- "complexType": {
362
- "original": "string",
363
- "resolved": "string | undefined",
364
- "references": {}
365
- },
366
- "required": false,
367
- "optional": true,
368
- "docs": {
369
- "tags": [],
370
- "text": "A destination to link to, rendered in the href attribute of a link."
371
- },
372
- "attribute": "url",
373
- "reflect": false
374
- },
375
- "urlTarget": {
376
- "type": "string",
377
- "mutable": false,
378
- "complexType": {
379
- "original": "'_blank' | '_self'",
380
- "resolved": "\"_blank\" | \"_self\" | undefined",
381
- "references": {}
382
- },
383
- "required": false,
384
- "optional": true,
385
- "docs": {
386
- "tags": [],
387
- "text": "Specifies where to open the linked document."
388
- },
389
- "attribute": "url-target",
390
- "reflect": false
391
- },
392
- "icon": {
393
- "type": "string",
394
- "mutable": false,
395
- "complexType": {
396
- "original": "string",
397
- "resolved": "string | undefined",
398
- "references": {}
399
- },
400
- "required": false,
401
- "optional": true,
402
- "docs": {
403
- "tags": [],
404
- "text": "The name of an icon to be displayed in the button."
405
- },
406
- "attribute": "icon",
407
- "reflect": false
408
- },
409
- "iconOnly": {
410
- "type": "any",
411
- "mutable": false,
412
- "complexType": {
413
- "original": "boolean | Breakpoint",
414
- "resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\" | boolean",
415
- "references": {
416
- "Breakpoint": {
417
- "location": "import",
418
- "path": "../../utils/breakpoints"
419
- }
420
- }
421
- },
422
- "required": false,
423
- "optional": false,
424
- "docs": {
425
- "tags": [],
426
- "text": "Hide the actual button content and only display the icon."
427
- },
428
- "attribute": "icon-only",
429
- "reflect": false,
430
- "defaultValue": "false"
431
- },
432
- "iconSuffix": {
433
- "type": "boolean",
434
- "mutable": false,
435
- "complexType": {
436
- "original": "boolean",
437
- "resolved": "boolean",
438
- "references": {}
439
- },
440
- "required": false,
441
- "optional": false,
442
- "docs": {
443
- "tags": [],
444
- "text": "Display the icon as a suffix."
445
- },
446
- "attribute": "icon-suffix",
447
- "reflect": false,
448
- "defaultValue": "false"
449
- },
450
- "buttonId": {
451
- "type": "string",
452
- "mutable": false,
453
- "complexType": {
454
- "original": "string",
455
- "resolved": "string | undefined",
456
- "references": {}
457
- },
458
- "required": false,
459
- "optional": true,
460
- "docs": {
461
- "tags": [],
462
- "text": "Adds a unique identifier for the button. Please note that with this\nparticular component this ID is added inside the web component. If you need\nan ID on the HTML element, use the regular `id` attribute instead."
463
- },
464
- "attribute": "button-id",
465
- "reflect": false
466
- },
467
- "a11yLabel": {
468
- "type": "string",
469
- "mutable": false,
470
- "complexType": {
471
- "original": "string",
472
- "resolved": "string | undefined",
473
- "references": {}
474
- },
475
- "required": false,
476
- "optional": true,
477
- "docs": {
478
- "tags": [],
479
- "text": "Adds accessible label for the button that is only shown for screen\nreaders. Typically, this label text replaces the visible text on the\nbutton for users who use assistive technology."
480
- },
481
- "attribute": "a11y-label",
482
- "reflect": false
483
- }
484
- }; }
485
- static get states() { return {
486
- "_iconOnly": {}
487
- }; }
488
- static get events() { return [{
489
- "method": "catFocus",
490
- "name": "catFocus",
491
- "bubbles": true,
492
- "cancelable": true,
493
- "composed": true,
494
- "docs": {
495
- "tags": [],
496
- "text": "Emitted when the button received focus."
497
- },
498
- "complexType": {
499
- "original": "FocusEvent",
500
- "resolved": "FocusEvent",
501
- "references": {
502
- "FocusEvent": {
503
- "location": "global"
504
- }
505
- }
506
- }
507
- }, {
508
- "method": "catBlur",
509
- "name": "catBlur",
510
- "bubbles": true,
511
- "cancelable": true,
512
- "composed": true,
513
- "docs": {
514
- "tags": [],
515
- "text": "Emitted when the button loses focus."
516
- },
517
- "complexType": {
518
- "original": "FocusEvent",
519
- "resolved": "FocusEvent",
520
- "references": {
521
- "FocusEvent": {
522
- "location": "global"
523
- }
524
- }
525
- }
526
- }]; }
527
- static get methods() { return {
528
- "setFocus": {
529
- "complexType": {
530
- "signature": "(options?: FocusOptions | undefined) => Promise<void>",
531
- "parameters": [{
532
- "tags": [{
533
- "name": "param",
534
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
535
- }],
536
- "text": "An optional object providing options to control aspects of\nthe focusing process."
537
- }],
538
- "references": {
539
- "Promise": {
540
- "location": "global"
541
- },
542
- "FocusOptions": {
543
- "location": "global"
544
- }
545
- },
546
- "return": "Promise<void>"
547
- },
548
- "docs": {
549
- "text": "Sets focus on the button. Use this method instead of `button.focus()`.",
550
- "tags": [{
551
- "name": "param",
552
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
553
- }]
554
- }
555
- }
556
- }; }
557
- static get watchers() { return [{
558
- "propName": "iconOnly",
559
- "methodName": "onIconOnlyChanged"
560
- }]; }
561
- static get listeners() { return [{
562
- "name": "click",
563
- "method": "haltDisabledEvents",
564
- "target": undefined,
565
- "capture": false,
566
- "passive": false
567
- }]; }
568
- }
@@ -1,41 +0,0 @@
1
- export class CatIconRegistry {
2
- constructor() {
3
- this.icons = new Map();
4
- // hide constructor
5
- }
6
- static getInstance() {
7
- if (!CatIconRegistry.instance) {
8
- CatIconRegistry.instance = new CatIconRegistry();
9
- }
10
- return CatIconRegistry.instance;
11
- }
12
- getIcon(name, setName) {
13
- return this.icons.get(this.buildName(name, setName));
14
- }
15
- addIcon(name, data, setName) {
16
- this.icons.set(this.buildName(name, setName), data);
17
- window.dispatchEvent(this.buildEvent('cat-icon-added', { name, setName }));
18
- }
19
- addIcons(icons, setName) {
20
- Object.entries(icons).forEach(([name, data]) => this.icons.set(this.buildName(name, setName), data));
21
- window.dispatchEvent(this.buildEvent('cat-icons-added', { names: Object.keys(icons), setName }));
22
- }
23
- removeIcon(name, setName) {
24
- this.icons.delete(this.buildName(name, setName));
25
- window.dispatchEvent(this.buildEvent('cat-icon-removed', { name, setName }));
26
- }
27
- removeIcons(names, setName) {
28
- names.forEach(name => this.icons.delete(this.buildName(name, setName)));
29
- window.dispatchEvent(this.buildEvent('cat-icons-removed', { names, setName }));
30
- }
31
- buildName(name, setName) {
32
- return setName ? `${setName}:name` : name;
33
- }
34
- buildEvent(name, detail) {
35
- return new CustomEvent(name, {
36
- bubbles: true,
37
- composed: true,
38
- detail
39
- });
40
- }
41
- }
@@ -1,49 +0,0 @@
1
- /**
2
- * Auto-generated file. Do not edit directly.
3
- */
4
- /* stylelint-disable value-keyword-case */
5
- /* stylelint-enable value-keyword-case */
6
- :host {
7
- display: inline-flex;
8
- vertical-align: middle;
9
- /* stylelint-disable property-no-vendor-prefix */
10
- -webkit-user-select: none;
11
- -ms-user-select: none;
12
- user-select: none;
13
- /* stylelint-enable property-no-vendor-prefix */
14
- }
15
- :host[hidden] {
16
- display: none;
17
- }
18
-
19
- span {
20
- display: inline-flex;
21
- }
22
-
23
- svg {
24
- fill: currentColor;
25
- stroke: none;
26
- transform-origin: center center;
27
- width: 1em;
28
- height: 1em;
29
- }
30
-
31
- .cat-icon-xs svg {
32
- font-size: 0.75rem;
33
- }
34
-
35
- .cat-icon-s svg {
36
- font-size: 1rem;
37
- }
38
-
39
- .cat-icon-m svg {
40
- font-size: 1.25rem;
41
- }
42
-
43
- .cat-icon-l svg {
44
- font-size: 1.5rem;
45
- }
46
-
47
- .cat-icon-xl svg {
48
- font-size: 1.75rem;
49
- }