@synergy-design-system/components 1.0.2 → 1.1.0

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 (92) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/chunk.2FN5DTS6.js +67 -0
  3. package/dist/chunks/chunk.2FN5DTS6.js.map +7 -0
  4. package/dist/chunks/{chunk.W5GPJ6ZR.js → chunk.43IE6Z7Q.js} +2 -2
  5. package/dist/chunks/{chunk.U2NJG6GX.js → chunk.5D2VBXTP.js} +2 -2
  6. package/dist/chunks/{chunk.U7R4EV7C.js → chunk.5DHO22JT.js} +6 -6
  7. package/dist/chunks/chunk.6WUVZQ3H.js +12 -0
  8. package/dist/chunks/chunk.6WUVZQ3H.js.map +7 -0
  9. package/dist/chunks/{chunk.M5DMOLZK.js → chunk.7LGURT5X.js} +2 -2
  10. package/dist/chunks/{chunk.PHG2CETE.js → chunk.7NADL2IT.js} +2 -2
  11. package/dist/chunks/{chunk.MB5S3IM7.js → chunk.7ODKEYK3.js} +2 -2
  12. package/dist/chunks/chunk.A7ZVGGIT.js +137 -0
  13. package/dist/chunks/chunk.A7ZVGGIT.js.map +7 -0
  14. package/dist/chunks/{chunk.3NY33MCF.js → chunk.BBI3HWRM.js} +3 -3
  15. package/dist/chunks/{chunk.DUAFHNTR.js → chunk.CIYOYCTY.js} +2 -2
  16. package/dist/chunks/{chunk.5SKPG6DM.js → chunk.EEG4VWBU.js} +2 -2
  17. package/dist/chunks/{chunk.IFPM2NRM.js → chunk.EXMVZ32W.js} +2 -2
  18. package/dist/chunks/{chunk.D7KU5L75.js → chunk.ICDHGCRE.js} +2 -2
  19. package/dist/chunks/{chunk.HZERAHZP.js → chunk.JEEPLCYY.js} +7 -7
  20. package/dist/chunks/{chunk.WVYTLFNV.js → chunk.JSGAT7FF.js} +2 -2
  21. package/dist/chunks/{chunk.P3O63FHH.js → chunk.L6QCO373.js} +2 -2
  22. package/dist/chunks/{chunk.FJGYV3Y3.js → chunk.OEII5257.js} +2 -2
  23. package/dist/chunks/chunk.OJF7KL44.js +67 -0
  24. package/dist/chunks/chunk.OJF7KL44.js.map +7 -0
  25. package/dist/chunks/{chunk.XVJVR3MD.js → chunk.OVS5OKTW.js} +3 -3
  26. package/dist/chunks/{chunk.B7KNRAHG.js → chunk.P3EPUBB3.js} +3 -3
  27. package/dist/chunks/{chunk.7MTLFTYG.js → chunk.QP2S2MDN.js} +2 -2
  28. package/dist/chunks/{chunk.SUNIN43Y.js → chunk.RAJNSJOZ.js} +2 -2
  29. package/dist/chunks/{chunk.MUOAKBT3.js → chunk.S424QLI7.js} +2 -2
  30. package/dist/chunks/{chunk.MUOAKBT3.js.map → chunk.S424QLI7.js.map} +1 -1
  31. package/dist/chunks/{chunk.G3EPLUES.js → chunk.UU5CELZK.js} +2 -2
  32. package/dist/chunks/{chunk.JVSVQG6I.js → chunk.V3UXMJRA.js} +2 -2
  33. package/dist/components/button/button.component.js +5 -5
  34. package/dist/components/button/button.js +6 -6
  35. package/dist/components/button-group/button-group.component.js +2 -2
  36. package/dist/components/button-group/button-group.js +3 -3
  37. package/dist/components/checkbox/checkbox.component.js +3 -3
  38. package/dist/components/checkbox/checkbox.js +4 -4
  39. package/dist/components/icon/icon.component.js +2 -2
  40. package/dist/components/icon/icon.js +3 -3
  41. package/dist/components/icon-button/icon-button.component.d.ts +63 -0
  42. package/dist/components/icon-button/icon-button.component.js +20 -0
  43. package/dist/components/icon-button/icon-button.component.js.map +7 -0
  44. package/dist/components/icon-button/icon-button.custom.styles.d.ts +2 -0
  45. package/dist/components/icon-button/icon-button.custom.styles.js +8 -0
  46. package/dist/components/icon-button/icon-button.custom.styles.js.map +7 -0
  47. package/dist/components/icon-button/icon-button.d.ts +8 -0
  48. package/dist/components/icon-button/icon-button.js +21 -0
  49. package/dist/components/icon-button/icon-button.js.map +7 -0
  50. package/dist/components/icon-button/icon-button.styles.d.ts +2 -0
  51. package/dist/components/icon-button/icon-button.styles.js +10 -0
  52. package/dist/components/icon-button/icon-button.styles.js.map +7 -0
  53. package/dist/components/input/input.component.js +4 -4
  54. package/dist/components/input/input.js +5 -5
  55. package/dist/components/radio/radio.component.js +3 -3
  56. package/dist/components/radio/radio.js +4 -4
  57. package/dist/components/radio-button/radio-button.component.js +2 -2
  58. package/dist/components/radio-button/radio-button.js +3 -3
  59. package/dist/components/radio-group/radio-group.component.js +3 -3
  60. package/dist/components/radio-group/radio-group.js +4 -4
  61. package/dist/components/spinner/spinner.component.js +2 -2
  62. package/dist/components/switch/switch.component.js +2 -2
  63. package/dist/components/switch/switch.js +3 -3
  64. package/dist/components/textarea/textarea.component.js +2 -2
  65. package/dist/components/textarea/textarea.js +3 -3
  66. package/dist/custom-elements.json +314 -1
  67. package/dist/synergy.d.ts +1 -0
  68. package/dist/synergy.js +42 -35
  69. package/dist/vscode.html-custom-data.json +76 -0
  70. package/dist/web-types.json +142 -1
  71. package/package.json +13 -13
  72. /package/dist/chunks/{chunk.W5GPJ6ZR.js.map → chunk.43IE6Z7Q.js.map} +0 -0
  73. /package/dist/chunks/{chunk.U2NJG6GX.js.map → chunk.5D2VBXTP.js.map} +0 -0
  74. /package/dist/chunks/{chunk.U7R4EV7C.js.map → chunk.5DHO22JT.js.map} +0 -0
  75. /package/dist/chunks/{chunk.M5DMOLZK.js.map → chunk.7LGURT5X.js.map} +0 -0
  76. /package/dist/chunks/{chunk.PHG2CETE.js.map → chunk.7NADL2IT.js.map} +0 -0
  77. /package/dist/chunks/{chunk.MB5S3IM7.js.map → chunk.7ODKEYK3.js.map} +0 -0
  78. /package/dist/chunks/{chunk.3NY33MCF.js.map → chunk.BBI3HWRM.js.map} +0 -0
  79. /package/dist/chunks/{chunk.DUAFHNTR.js.map → chunk.CIYOYCTY.js.map} +0 -0
  80. /package/dist/chunks/{chunk.5SKPG6DM.js.map → chunk.EEG4VWBU.js.map} +0 -0
  81. /package/dist/chunks/{chunk.IFPM2NRM.js.map → chunk.EXMVZ32W.js.map} +0 -0
  82. /package/dist/chunks/{chunk.D7KU5L75.js.map → chunk.ICDHGCRE.js.map} +0 -0
  83. /package/dist/chunks/{chunk.HZERAHZP.js.map → chunk.JEEPLCYY.js.map} +0 -0
  84. /package/dist/chunks/{chunk.WVYTLFNV.js.map → chunk.JSGAT7FF.js.map} +0 -0
  85. /package/dist/chunks/{chunk.P3O63FHH.js.map → chunk.L6QCO373.js.map} +0 -0
  86. /package/dist/chunks/{chunk.FJGYV3Y3.js.map → chunk.OEII5257.js.map} +0 -0
  87. /package/dist/chunks/{chunk.XVJVR3MD.js.map → chunk.OVS5OKTW.js.map} +0 -0
  88. /package/dist/chunks/{chunk.B7KNRAHG.js.map → chunk.P3EPUBB3.js.map} +0 -0
  89. /package/dist/chunks/{chunk.7MTLFTYG.js.map → chunk.QP2S2MDN.js.map} +0 -0
  90. /package/dist/chunks/{chunk.SUNIN43Y.js.map → chunk.RAJNSJOZ.js.map} +0 -0
  91. /package/dist/chunks/{chunk.G3EPLUES.js.map → chunk.UU5CELZK.js.map} +0 -0
  92. /package/dist/chunks/{chunk.JVSVQG6I.js.map → chunk.V3UXMJRA.js.map} +0 -0
package/README.md CHANGED
@@ -113,8 +113,8 @@ import type { SynButton, SynInvalidEvent } from '@synergy-design-system/componen
113
113
 
114
114
  // Example 2: Load the type from the syn-button dir directly.
115
115
  // In this case you will have to load the event type from another file!
116
- import type { SynButton } from '@synergy-design-system/components/components/button/button';
117
- import type { SynInvalidEvent } from '@synergy-design-system/components/events/syn-invalid';
116
+ import type { SynButton } from '@synergy-design-system/components/components/button/button.component';
117
+ import type { SynInvalidEvent } from '@synergy-design-system/components/events/events';
118
118
 
119
119
  document.addEventListener('load', () => {
120
120
  const loadedSynButtons = document.querySelectorAll<SynButton>('syn-button');
@@ -0,0 +1,67 @@
1
+ import {
2
+ icon_button_custom_styles_default
3
+ } from "./chunk.OJF7KL44.js";
4
+ import {
5
+ component_styles_default
6
+ } from "./chunk.O7USYXBT.js";
7
+
8
+ // src/components/icon-button/icon-button.styles.ts
9
+ import { css } from "lit";
10
+ var icon_button_styles_default = css`
11
+ /* stylelint-disable */
12
+ ${component_styles_default}
13
+
14
+ :host {
15
+ display: inline-block;
16
+ color: var(--syn-color-neutral-600);
17
+ }
18
+
19
+ .icon-button {
20
+ flex: 0 0 auto;
21
+ display: flex;
22
+ align-items: center;
23
+ background: none;
24
+ border: none;
25
+ border-radius: var(--syn-border-radius-medium);
26
+ font-size: inherit;
27
+ color: inherit;
28
+ padding: var(--syn-spacing-x-small);
29
+ cursor: pointer;
30
+ transition: var(--syn-transition-x-fast) color;
31
+ -webkit-appearance: none;
32
+ }
33
+
34
+ .icon-button:hover:not(.icon-button--disabled),
35
+ .icon-button:focus-visible:not(.icon-button--disabled) {
36
+ color: var(--syn-color-primary-600);
37
+ }
38
+
39
+ .icon-button:active:not(.icon-button--disabled) {
40
+ color: var(--syn-color-primary-700);
41
+ }
42
+
43
+ .icon-button:focus {
44
+ outline: none;
45
+ }
46
+
47
+ .icon-button--disabled {
48
+ opacity: 0.5;
49
+ cursor: not-allowed;
50
+ }
51
+
52
+ .icon-button:focus-visible {
53
+ outline: var(--syn-focus-ring);
54
+ outline-offset: var(--syn-focus-ring-offset);
55
+ }
56
+
57
+ .icon-button__icon {
58
+ pointer-events: none;
59
+ }
60
+
61
+ ${icon_button_custom_styles_default}
62
+ `;
63
+
64
+ export {
65
+ icon_button_styles_default
66
+ };
67
+ //# sourceMappingURL=chunk.2FN5DTS6.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/icon-button/icon-button.styles.ts"],
4
+ "sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { css } from 'lit';\nimport customStyles from './icon-button.custom.styles.js';\nimport componentStyles from '../../styles/component.styles.js';\n\nexport default css`\n\t/* stylelint-disable */\n ${componentStyles}\n\n :host {\n display: inline-block;\n color: var(--syn-color-neutral-600);\n }\n\n .icon-button {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n background: none;\n border: none;\n border-radius: var(--syn-border-radius-medium);\n font-size: inherit;\n color: inherit;\n padding: var(--syn-spacing-x-small);\n cursor: pointer;\n transition: var(--syn-transition-x-fast) color;\n -webkit-appearance: none;\n }\n\n .icon-button:hover:not(.icon-button--disabled),\n .icon-button:focus-visible:not(.icon-button--disabled) {\n color: var(--syn-color-primary-600);\n }\n\n .icon-button:active:not(.icon-button--disabled) {\n color: var(--syn-color-primary-700);\n }\n\n .icon-button:focus {\n outline: none;\n }\n\n .icon-button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .icon-button:focus-visible {\n outline: var(--syn-focus-ring);\n outline-offset: var(--syn-focus-ring-offset);\n }\n\n .icon-button__icon {\n pointer-events: none;\n }\n\n ${customStyles}\n`;\n\n"],
5
+ "mappings": ";;;;;;;;AAMA,SAAS,WAAW;AAIpB,IAAO,6BAAQ;AAAA;AAAA,IAEX,wBAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiDf,iCAAY;AAAA;",
6
+ "names": []
7
+ }
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk.VZ7S7YYN.js";
16
16
  import {
17
17
  SynergyElement
18
- } from "./chunk.MUOAKBT3.js";
18
+ } from "./chunk.S424QLI7.js";
19
19
  import {
20
20
  __decorateClass
21
21
  } from "./chunk.DJOAQ4JU.js";
@@ -357,4 +357,4 @@ __decorateClass([
357
357
  export {
358
358
  SynTextarea
359
359
  };
360
- //# sourceMappingURL=chunk.W5GPJ6ZR.js.map
360
+ //# sourceMappingURL=chunk.43IE6Z7Q.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynRadioGroup
3
- } from "./chunk.3NY33MCF.js";
3
+ } from "./chunk.BBI3HWRM.js";
4
4
 
5
5
  // src/components/radio-group/radio-group.ts
6
6
  var radio_group_default = SynRadioGroup;
@@ -9,4 +9,4 @@ SynRadioGroup.define("syn-radio-group");
9
9
  export {
10
10
  radio_group_default
11
11
  };
12
- //# sourceMappingURL=chunk.U2NJG6GX.js.map
12
+ //# sourceMappingURL=chunk.5D2VBXTP.js.map
@@ -4,24 +4,24 @@ import {
4
4
  import {
5
5
  defaultValue
6
6
  } from "./chunk.WFAJR3FN.js";
7
- import {
8
- LocalizeController
9
- } from "./chunk.R6VNLE6N.js";
10
7
  import {
11
8
  HasSlotController
12
9
  } from "./chunk.XGXFE6IF.js";
10
+ import {
11
+ LocalizeController
12
+ } from "./chunk.R6VNLE6N.js";
13
13
  import {
14
14
  FormControlController
15
15
  } from "./chunk.P2LNG2PZ.js";
16
16
  import {
17
17
  SynIcon
18
- } from "./chunk.PHG2CETE.js";
18
+ } from "./chunk.7NADL2IT.js";
19
19
  import {
20
20
  watch
21
21
  } from "./chunk.VZ7S7YYN.js";
22
22
  import {
23
23
  SynergyElement
24
- } from "./chunk.MUOAKBT3.js";
24
+ } from "./chunk.S424QLI7.js";
25
25
  import {
26
26
  __decorateClass
27
27
  } from "./chunk.DJOAQ4JU.js";
@@ -477,4 +477,4 @@ __decorateClass([
477
477
  export {
478
478
  SynInput
479
479
  };
480
- //# sourceMappingURL=chunk.U7R4EV7C.js.map
480
+ //# sourceMappingURL=chunk.5DHO22JT.js.map
@@ -0,0 +1,12 @@
1
+ import {
2
+ SynIconButton
3
+ } from "./chunk.A7ZVGGIT.js";
4
+
5
+ // src/components/icon-button/icon-button.ts
6
+ var icon_button_default = SynIconButton;
7
+ SynIconButton.define("syn-icon-button");
8
+
9
+ export {
10
+ icon_button_default
11
+ };
12
+ //# sourceMappingURL=chunk.6WUVZQ3H.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/icon-button/icon-button.ts"],
4
+ "sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport SynIconButton from './icon-button.component.js';\n\nexport * from './icon-button.component.js';\nexport default SynIconButton;\n\nSynIconButton.define('syn-icon-button');\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'syn-icon-button': SynIconButton;\n }\n}\n"],
5
+ "mappings": ";;;;;AASA,IAAO,sBAAQ;AAEf,cAAc,OAAO,iBAAiB;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynInput
3
- } from "./chunk.U7R4EV7C.js";
3
+ } from "./chunk.5DHO22JT.js";
4
4
 
5
5
  // src/components/input/input.ts
6
6
  var input_default = SynInput;
@@ -9,4 +9,4 @@ SynInput.define("syn-input");
9
9
  export {
10
10
  input_default
11
11
  };
12
- //# sourceMappingURL=chunk.M5DMOLZK.js.map
12
+ //# sourceMappingURL=chunk.7LGURT5X.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk.RSONAU45.js";
12
12
  import {
13
13
  SynergyElement
14
- } from "./chunk.MUOAKBT3.js";
14
+ } from "./chunk.S424QLI7.js";
15
15
  import {
16
16
  __decorateClass
17
17
  } from "./chunk.DJOAQ4JU.js";
@@ -172,4 +172,4 @@ __decorateClass([
172
172
  export {
173
173
  SynIcon
174
174
  };
175
- //# sourceMappingURL=chunk.PHG2CETE.js.map
175
+ //# sourceMappingURL=chunk.7NADL2IT.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk.VZ7S7YYN.js";
10
10
  import {
11
11
  SynergyElement
12
- } from "./chunk.MUOAKBT3.js";
12
+ } from "./chunk.S424QLI7.js";
13
13
  import {
14
14
  __decorateClass
15
15
  } from "./chunk.DJOAQ4JU.js";
@@ -124,4 +124,4 @@ __decorateClass([
124
124
  export {
125
125
  SynRadioButton
126
126
  };
127
- //# sourceMappingURL=chunk.MB5S3IM7.js.map
127
+ //# sourceMappingURL=chunk.7ODKEYK3.js.map
@@ -0,0 +1,137 @@
1
+ import {
2
+ icon_button_styles_default
3
+ } from "./chunk.2FN5DTS6.js";
4
+ import {
5
+ SynIcon
6
+ } from "./chunk.7NADL2IT.js";
7
+ import {
8
+ SynergyElement
9
+ } from "./chunk.S424QLI7.js";
10
+ import {
11
+ __decorateClass
12
+ } from "./chunk.DJOAQ4JU.js";
13
+
14
+ // src/components/icon-button/icon-button.component.ts
15
+ import { classMap } from "lit/directives/class-map.js";
16
+ import { html, literal } from "lit/static-html.js";
17
+ import { ifDefined } from "lit/directives/if-defined.js";
18
+ import { property, query, state } from "lit/decorators.js";
19
+ var SynIconButton = class extends SynergyElement {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.hasFocus = false;
23
+ this.label = "";
24
+ this.size = "inherit";
25
+ this.color = "currentColor";
26
+ this.disabled = false;
27
+ }
28
+ handleBlur() {
29
+ this.hasFocus = false;
30
+ this.emit("syn-blur");
31
+ }
32
+ handleFocus() {
33
+ this.hasFocus = true;
34
+ this.emit("syn-focus");
35
+ }
36
+ handleClick(event) {
37
+ if (this.disabled) {
38
+ event.preventDefault();
39
+ event.stopPropagation();
40
+ }
41
+ }
42
+ /** Simulates a click on the icon button. */
43
+ click() {
44
+ this.button.click();
45
+ }
46
+ /** Sets focus on the icon button. */
47
+ focus(options) {
48
+ this.button.focus(options);
49
+ }
50
+ /** Removes focus from the icon button. */
51
+ blur() {
52
+ this.button.blur();
53
+ }
54
+ render() {
55
+ const isLink = this.href ? true : false;
56
+ const tag = isLink ? literal`a` : literal`button`;
57
+ return html`
58
+ <${tag}
59
+ part="base"
60
+ class=${classMap({
61
+ "icon-button": true,
62
+ "icon-button--disabled": !isLink && this.disabled,
63
+ "icon-button--focused": this.hasFocus,
64
+ "icon-button--small": this.size === "small",
65
+ "icon-button--medium": this.size === "medium",
66
+ "icon-button--large": this.size === "large",
67
+ "icon-button--primary": this.color === "primary",
68
+ "icon-button--neutral": this.color === "neutral"
69
+ })}
70
+ ?disabled=${ifDefined(isLink ? void 0 : this.disabled)}
71
+ type=${ifDefined(isLink ? void 0 : "button")}
72
+ href=${ifDefined(isLink ? this.href : void 0)}
73
+ target=${ifDefined(isLink ? this.target : void 0)}
74
+ download=${ifDefined(isLink ? this.download : void 0)}
75
+ rel=${ifDefined(isLink && this.target ? "noreferrer noopener" : void 0)}
76
+ role=${ifDefined(isLink ? void 0 : "button")}
77
+ aria-disabled=${this.disabled ? "true" : "false"}
78
+ aria-label="${this.label}"
79
+ tabindex=${this.disabled ? "-1" : "0"}
80
+ @blur=${this.handleBlur}
81
+ @focus=${this.handleFocus}
82
+ @click=${this.handleClick}
83
+ >
84
+ <syn-icon
85
+ class="icon-button__icon"
86
+ name=${ifDefined(this.name)}
87
+ library=${ifDefined(this.library)}
88
+ src=${ifDefined(this.src)}
89
+ aria-hidden="true"
90
+ ></syn-icon>
91
+ </${tag}>
92
+ `;
93
+ }
94
+ };
95
+ SynIconButton.styles = icon_button_styles_default;
96
+ SynIconButton.dependencies = { "syn-icon": SynIcon };
97
+ __decorateClass([
98
+ query(".icon-button")
99
+ ], SynIconButton.prototype, "button", 2);
100
+ __decorateClass([
101
+ state()
102
+ ], SynIconButton.prototype, "hasFocus", 2);
103
+ __decorateClass([
104
+ property()
105
+ ], SynIconButton.prototype, "name", 2);
106
+ __decorateClass([
107
+ property()
108
+ ], SynIconButton.prototype, "library", 2);
109
+ __decorateClass([
110
+ property()
111
+ ], SynIconButton.prototype, "src", 2);
112
+ __decorateClass([
113
+ property()
114
+ ], SynIconButton.prototype, "href", 2);
115
+ __decorateClass([
116
+ property()
117
+ ], SynIconButton.prototype, "target", 2);
118
+ __decorateClass([
119
+ property()
120
+ ], SynIconButton.prototype, "download", 2);
121
+ __decorateClass([
122
+ property()
123
+ ], SynIconButton.prototype, "label", 2);
124
+ __decorateClass([
125
+ property({ reflect: true })
126
+ ], SynIconButton.prototype, "size", 2);
127
+ __decorateClass([
128
+ property({ reflect: true })
129
+ ], SynIconButton.prototype, "color", 2);
130
+ __decorateClass([
131
+ property({ type: Boolean, reflect: true })
132
+ ], SynIconButton.prototype, "disabled", 2);
133
+
134
+ export {
135
+ SynIconButton
136
+ };
137
+ //# sourceMappingURL=chunk.A7ZVGGIT.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/icon-button/icon-button.component.ts"],
4
+ "sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html, literal } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport styles from './icon-button.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.\n * @documentation https://synergy.style/components/icon-button\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @event syn-blur - Emitted when the icon button loses focus.\n * @event syn-focus - Emitted when the icon button gains focus.\n *\n * @csspart base - The component's base wrapper.\n */\nexport default class SynIconButton extends SynergyElement {\n static styles: CSSResultGroup = styles;\n static dependencies = { 'syn-icon': SynIcon };\n\n @query('.icon-button') button: HTMLButtonElement | HTMLLinkElement;\n\n @state() private hasFocus = false;\n\n /** The name of the icon to draw. Available names depend on the icon library being used. */\n @property() name?: string;\n\n /** The name of a registered custom icon library. */\n @property() library?: string;\n\n /**\n * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\n * can result in XSS attacks.\n */\n @property() src?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @property() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @property() download?: string;\n\n /**\n * A description that gets read by assistive devices. For optimal accessibility, you should always include a label\n * that describes what the icon button does.\n */\n @property() label = '';\n\n /** The icon button's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' | 'inherit' = 'inherit';\n\n /**\n * The color of the icon button.\n * The default \"currentColor\" makes it possible to easily style the icon button from outside without any CSS variables.\n */\n @property({ reflect: true }) color: 'currentColor' | 'primary' | 'neutral' = 'currentColor';\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleClick(event: MouseEvent) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** Simulates a click on the icon button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the icon button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the icon button. */\n blur() {\n this.button.blur();\n }\n\n render() {\n const isLink = this.href ? true : false;\n const tag = isLink ? literal`a` : literal`button`;\n\n /* eslint-disable lit/binding-positions, lit/no-invalid-html */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n 'icon-button': true,\n 'icon-button--disabled': !isLink && this.disabled,\n 'icon-button--focused': this.hasFocus,\n 'icon-button--small': this.size === 'small',\n 'icon-button--medium': this.size === 'medium',\n 'icon-button--large': this.size === 'large',\n 'icon-button--primary': this.color === 'primary',\n 'icon-button--neutral': this.color === 'neutral'\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : 'button')}\n href=${ifDefined(isLink ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(isLink && this.target ? 'noreferrer noopener' : undefined)}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-label=\"${this.label}\"\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n >\n <syn-icon\n class=\"icon-button__icon\"\n name=${ifDefined(this.name)}\n library=${ifDefined(this.library)}\n src=${ifDefined(this.src)}\n aria-hidden=\"true\"\n ></syn-icon>\n </${tag}>\n `;\n }\n}\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk.VZ7S7YYN.js";
16
16
  import {
17
17
  SynButtonGroup
18
- } from "./chunk.5SKPG6DM.js";
18
+ } from "./chunk.EEG4VWBU.js";
19
19
  import {
20
20
  SynergyElement
21
- } from "./chunk.MUOAKBT3.js";
21
+ } from "./chunk.S424QLI7.js";
22
22
  import {
23
23
  __decorateClass
24
24
  } from "./chunk.DJOAQ4JU.js";
@@ -348,4 +348,4 @@ __decorateClass([
348
348
  export {
349
349
  SynRadioGroup
350
350
  };
351
- //# sourceMappingURL=chunk.3NY33MCF.js.map
351
+ //# sourceMappingURL=chunk.BBI3HWRM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynButtonGroup
3
- } from "./chunk.5SKPG6DM.js";
3
+ } from "./chunk.EEG4VWBU.js";
4
4
 
5
5
  // src/components/button-group/button-group.ts
6
6
  var button_group_default = SynButtonGroup;
@@ -9,4 +9,4 @@ SynButtonGroup.define("syn-button-group");
9
9
  export {
10
10
  button_group_default
11
11
  };
12
- //# sourceMappingURL=chunk.DUAFHNTR.js.map
12
+ //# sourceMappingURL=chunk.CIYOYCTY.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynergyElement
3
- } from "./chunk.MUOAKBT3.js";
3
+ } from "./chunk.S424QLI7.js";
4
4
  import {
5
5
  button_group_styles_default
6
6
  } from "./chunk.4ZURABYO.js";
@@ -83,4 +83,4 @@ function findButton(el) {
83
83
  export {
84
84
  SynButtonGroup
85
85
  };
86
- //# sourceMappingURL=chunk.5SKPG6DM.js.map
86
+ //# sourceMappingURL=chunk.EEG4VWBU.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.R6VNLE6N.js";
7
7
  import {
8
8
  SynergyElement
9
- } from "./chunk.MUOAKBT3.js";
9
+ } from "./chunk.S424QLI7.js";
10
10
 
11
11
  // src/components/spinner/spinner.component.ts
12
12
  import { html } from "lit";
@@ -29,4 +29,4 @@ SynSpinner.styles = spinner_styles_default;
29
29
  export {
30
30
  SynSpinner
31
31
  };
32
- //# sourceMappingURL=chunk.IFPM2NRM.js.map
32
+ //# sourceMappingURL=chunk.EXMVZ32W.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynSwitch
3
- } from "./chunk.SUNIN43Y.js";
3
+ } from "./chunk.RAJNSJOZ.js";
4
4
 
5
5
  // src/components/switch/switch.ts
6
6
  var switch_default = SynSwitch;
@@ -9,4 +9,4 @@ SynSwitch.define("syn-switch");
9
9
  export {
10
10
  switch_default
11
11
  };
12
- //# sourceMappingURL=chunk.D7KU5L75.js.map
12
+ //# sourceMappingURL=chunk.ICDHGCRE.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  SynSpinner
3
- } from "./chunk.IFPM2NRM.js";
4
- import {
5
- LocalizeController
6
- } from "./chunk.R6VNLE6N.js";
3
+ } from "./chunk.EXMVZ32W.js";
7
4
  import {
8
5
  HasSlotController
9
6
  } from "./chunk.XGXFE6IF.js";
7
+ import {
8
+ LocalizeController
9
+ } from "./chunk.R6VNLE6N.js";
10
10
  import {
11
11
  FormControlController,
12
12
  validValidityState
13
13
  } from "./chunk.P2LNG2PZ.js";
14
14
  import {
15
15
  SynIcon
16
- } from "./chunk.PHG2CETE.js";
16
+ } from "./chunk.7NADL2IT.js";
17
17
  import {
18
18
  watch
19
19
  } from "./chunk.VZ7S7YYN.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk.YTS5TRJZ.js";
23
23
  import {
24
24
  SynergyElement
25
- } from "./chunk.MUOAKBT3.js";
25
+ } from "./chunk.S424QLI7.js";
26
26
  import {
27
27
  __decorateClass
28
28
  } from "./chunk.DJOAQ4JU.js";
@@ -277,4 +277,4 @@ __decorateClass([
277
277
  export {
278
278
  SynButton
279
279
  };
280
- //# sourceMappingURL=chunk.HZERAHZP.js.map
280
+ //# sourceMappingURL=chunk.JEEPLCYY.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynRadioButton
3
- } from "./chunk.MB5S3IM7.js";
3
+ } from "./chunk.7ODKEYK3.js";
4
4
 
5
5
  // src/components/radio-button/radio-button.ts
6
6
  var radio_button_default = SynRadioButton;
@@ -9,4 +9,4 @@ SynRadioButton.define("syn-radio-button");
9
9
  export {
10
10
  radio_button_default
11
11
  };
12
- //# sourceMappingURL=chunk.WVYTLFNV.js.map
12
+ //# sourceMappingURL=chunk.JSGAT7FF.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynButton
3
- } from "./chunk.HZERAHZP.js";
3
+ } from "./chunk.JEEPLCYY.js";
4
4
 
5
5
  // src/components/button/button.ts
6
6
  var button_default = SynButton;
@@ -9,4 +9,4 @@ SynButton.define("syn-button");
9
9
  export {
10
10
  button_default
11
11
  };
12
- //# sourceMappingURL=chunk.P3O63FHH.js.map
12
+ //# sourceMappingURL=chunk.L6QCO373.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynTextarea
3
- } from "./chunk.W5GPJ6ZR.js";
3
+ } from "./chunk.43IE6Z7Q.js";
4
4
 
5
5
  // src/components/textarea/textarea.ts
6
6
  var textarea_default = SynTextarea;
@@ -9,4 +9,4 @@ SynTextarea.define("syn-textarea");
9
9
  export {
10
10
  textarea_default
11
11
  };
12
- //# sourceMappingURL=chunk.FJGYV3Y3.js.map
12
+ //# sourceMappingURL=chunk.OEII5257.js.map
@@ -0,0 +1,67 @@
1
+ // src/components/icon-button/icon-button.custom.styles.ts
2
+ import { css } from "lit";
3
+ var icon_button_custom_styles_default = css`
4
+ .icon-button {
5
+ color: currentColor;
6
+ font-size: inherit;
7
+ }
8
+
9
+ /* Color variants */
10
+ .icon-button--neutral,
11
+ .icon-button--neutral:focus-visible:not(.icon-button--disabled):not(:hover) {
12
+ color: var(--syn-color-neutral-950);
13
+ }
14
+
15
+ .icon-button--primary,
16
+ .icon-button--primary:focus-visible:not(.icon-button--disabled) {
17
+ color: var(--syn-color-primary-600);
18
+ }
19
+
20
+ .icon-button--primary:hover:not(.icon-button--disabled) {
21
+ color: var(--syn-color-primary-900);
22
+ }
23
+
24
+ .icon-button--primary:active:not(.icon-button--disabled) {
25
+ color: var(--syn-color-primary-950);
26
+ }
27
+
28
+ .icon-button--disabled {
29
+ color: var(--syn-color-neutral-400);
30
+ }
31
+
32
+ /* Remove round borders */
33
+ .icon-button:focus-visible {
34
+ border-radius: var(--syn-border-radius-none);
35
+ }
36
+
37
+
38
+ /* Sizes */
39
+ .icon-button--small {
40
+ font-size: var(--syn-font-size-medium);
41
+ }
42
+
43
+ .icon-button--medium {
44
+ font-size: var(--syn-font-size-x-large);
45
+
46
+ }
47
+
48
+ .icon-button--large {
49
+ font-size: var(--syn-font-size-2x-large);
50
+ }
51
+
52
+ /* Force user to set "label" prop */
53
+ .icon-button[aria-label=""] {
54
+ border: var(--syn-border-width-large) var(--syn-color-error-600) solid;
55
+ }
56
+
57
+ .icon-button[aria-label=""]::after {
58
+ content: "Set label prop for a11y to get rid of this text and border!";
59
+ font-size: var(--syn-font-size-2x-small);
60
+ margin-left: var(--syn-spacing-2x-small);
61
+ }
62
+ `;
63
+
64
+ export {
65
+ icon_button_custom_styles_default
66
+ };
67
+ //# sourceMappingURL=chunk.OJF7KL44.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/icon-button/icon-button.custom.styles.ts"],
4
+ "sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n .icon-button {\n color: currentColor;\n font-size: inherit;\n }\n\n /* Color variants */\n .icon-button--neutral,\n .icon-button--neutral:focus-visible:not(.icon-button--disabled):not(:hover) {\n color: var(--syn-color-neutral-950);\n }\n\n .icon-button--primary,\n .icon-button--primary:focus-visible:not(.icon-button--disabled) {\n color: var(--syn-color-primary-600);\n }\n\n .icon-button--primary:hover:not(.icon-button--disabled) {\n color: var(--syn-color-primary-900);\n }\n\n .icon-button--primary:active:not(.icon-button--disabled) {\n color: var(--syn-color-primary-950);\n }\n\n .icon-button--disabled {\n color: var(--syn-color-neutral-400);\n }\n\n /* Remove round borders */\n .icon-button:focus-visible {\n border-radius: var(--syn-border-radius-none);\n }\n\n\n /* Sizes */\n .icon-button--small {\n font-size: var(--syn-font-size-medium);\n }\n\n .icon-button--medium {\n font-size: var(--syn-font-size-x-large);\n\n }\n\n .icon-button--large {\n font-size: var(--syn-font-size-2x-large);\n }\n\n /* Force user to set \"label\" prop */\n .icon-button[aria-label=\"\"] {\n border: var(--syn-border-width-large) var(--syn-color-error-600) solid;\n }\n\n .icon-button[aria-label=\"\"]::after {\n content: \"Set label prop for a11y to get rid of this text and border!\";\n font-size: var(--syn-font-size-2x-small);\n margin-left: var(--syn-spacing-2x-small);\n }\n`;\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,oCAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk.P2LNG2PZ.js";
10
10
  import {
11
11
  SynIcon
12
- } from "./chunk.PHG2CETE.js";
12
+ } from "./chunk.7NADL2IT.js";
13
13
  import {
14
14
  watch
15
15
  } from "./chunk.VZ7S7YYN.js";
16
16
  import {
17
17
  SynergyElement
18
- } from "./chunk.MUOAKBT3.js";
18
+ } from "./chunk.S424QLI7.js";
19
19
  import {
20
20
  __decorateClass
21
21
  } from "./chunk.DJOAQ4JU.js";
@@ -221,4 +221,4 @@ __decorateClass([
221
221
  export {
222
222
  SynCheckbox
223
223
  };
224
- //# sourceMappingURL=chunk.XVJVR3MD.js.map
224
+ //# sourceMappingURL=chunk.OVS5OKTW.js.map