@nectary/components 0.41.1 → 0.42.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 (139) hide show
  1. package/accordion/index.js +0 -16
  2. package/accordion/types.d.ts +9 -1
  3. package/accordion-item/index.js +0 -24
  4. package/accordion-item/types.d.ts +18 -3
  5. package/action-menu/index.js +1 -45
  6. package/action-menu-option/index.js +0 -18
  7. package/alert/index.js +0 -10
  8. package/alert/types.d.ts +6 -0
  9. package/avatar/index.js +57 -20
  10. package/avatar/types.d.ts +25 -7
  11. package/avatar/utils.d.ts +10 -2
  12. package/avatar/utils.js +23 -2
  13. package/badge/index.d.ts +11 -0
  14. package/badge/index.js +140 -0
  15. package/badge/types.d.ts +38 -0
  16. package/badge/utils.d.ts +11 -0
  17. package/badge/utils.js +23 -0
  18. package/button/index.js +0 -18
  19. package/card/index.js +0 -16
  20. package/card/types.d.ts +15 -3
  21. package/card-container/index.js +0 -1
  22. package/chat/index.js +0 -1
  23. package/chat-block/index.js +0 -19
  24. package/chat-block/types.d.ts +16 -4
  25. package/chat-bubble/index.js +0 -9
  26. package/chat-bubble/types.d.ts +6 -0
  27. package/checkbox/index.js +0 -23
  28. package/chip/index.js +16 -25
  29. package/chip/utils.d.ts +3 -0
  30. package/chip/utils.js +11 -0
  31. package/color-menu/index.js +8 -86
  32. package/color-menu/utils.js +0 -4
  33. package/color-swatch/index.js +17 -17
  34. package/color-swatch/types.d.ts +2 -2
  35. package/color-swatch/utils.d.ts +3 -0
  36. package/color-swatch/utils.js +11 -0
  37. package/date-picker/index.js +1 -50
  38. package/date-picker/utils.js +0 -7
  39. package/dialog/index.js +1 -17
  40. package/field/index.js +0 -19
  41. package/file-drop/index.js +0 -40
  42. package/file-drop/utils.js +0 -6
  43. package/file-picker/index.js +0 -17
  44. package/file-picker/utils.js +0 -1
  45. package/file-status/index.js +0 -12
  46. package/grid/index.js +0 -1
  47. package/grid-item/index.js +0 -9
  48. package/help-tooltip/index.js +0 -14
  49. package/horizontal-stepper/index.js +0 -12
  50. package/horizontal-stepper-item/index.js +0 -14
  51. package/icon-button/index.js +0 -15
  52. package/icons/create-icon-class.js +0 -2
  53. package/icons-branded/create-icon-class.js +0 -8
  54. package/icons-channel/create-icon-class.js +0 -6
  55. package/illustrations/create-illustration-class.js +0 -11
  56. package/inline-alert/index.js +0 -14
  57. package/input/index.js +0 -37
  58. package/link/index.js +0 -25
  59. package/list/index.js +0 -2
  60. package/list-item/index.js +0 -2
  61. package/logo/create-logo-class.js +0 -9
  62. package/package.json +3 -1
  63. package/pagination/index.js +0 -31
  64. package/pop/index.js +26 -68
  65. package/pop/utils.js +0 -1
  66. package/popover/index.js +0 -33
  67. package/popover/utils.js +0 -2
  68. package/progress/index.js +0 -10
  69. package/radio/index.js +0 -30
  70. package/radio-option/index.js +0 -20
  71. package/segment/index.js +0 -15
  72. package/segment-collapse/index.js +0 -13
  73. package/segmented-control/index.js +0 -12
  74. package/segmented-control-option/index.js +0 -18
  75. package/segmented-icon-control/index.js +0 -16
  76. package/segmented-icon-control-option/index.js +0 -14
  77. package/select-button/index.js +0 -23
  78. package/select-menu/index.js +1 -63
  79. package/select-menu-option/index.js +0 -14
  80. package/spinner/index.js +0 -4
  81. package/stop-events/index.js +0 -5
  82. package/table/index.js +0 -2
  83. package/table-body/index.js +0 -2
  84. package/table-cell/index.js +0 -4
  85. package/table-head/index.js +0 -2
  86. package/table-head-cell/index.js +0 -11
  87. package/table-row/index.js +0 -6
  88. package/tabs/index.js +0 -30
  89. package/tabs-option/index.js +0 -19
  90. package/tag/index.js +18 -21
  91. package/tag/utils.d.ts +3 -0
  92. package/tag/utils.js +11 -0
  93. package/text/index.js +1 -12
  94. package/textarea/index.js +0 -40
  95. package/theme/avatar.css +25 -0
  96. package/theme/badge.css +15 -0
  97. package/theme/chip.css +53 -0
  98. package/theme/color-swatch.css +65 -0
  99. package/{utils → theme}/colors.d.ts +0 -1
  100. package/{utils → theme}/colors.js +0 -1
  101. package/theme/elevation.css +7 -0
  102. package/theme/fonts.css +76 -0
  103. package/theme/fonts.json +79 -0
  104. package/theme/palette.css +90 -0
  105. package/theme/shapes.css +7 -0
  106. package/theme/tag.css +53 -0
  107. package/theme/typography.css +16 -0
  108. package/theme.css +13 -209
  109. package/tile-control/index.js +0 -24
  110. package/tile-control-option/index.js +0 -18
  111. package/time-picker/index.js +2 -51
  112. package/time-picker/utils.js +0 -18
  113. package/title/index.js +1 -12
  114. package/title/utils.js +0 -5
  115. package/toast/index.js +0 -19
  116. package/toast-manager/index.js +0 -27
  117. package/toggle/index.js +0 -23
  118. package/tooltip/index.js +0 -27
  119. package/tooltip/utils.js +0 -4
  120. package/utils/animation.js +0 -20
  121. package/utils/context.js +0 -6
  122. package/utils/index.d.ts +1 -0
  123. package/utils/index.js +11 -52
  124. package/vertical-stepper/index.js +0 -12
  125. package/vertical-stepper-item/index.js +0 -14
  126. package/avatar-badge/index.d.ts +0 -11
  127. package/avatar-badge/index.js +0 -38
  128. package/avatar-badge/types.d.ts +0 -8
  129. package/avatar-status/index.d.ts +0 -11
  130. package/avatar-status/index.js +0 -37
  131. package/avatar-status/types.d.ts +0 -9
  132. package/avatar-status/types.js +0 -1
  133. package/avatar-status/utils.d.ts +0 -5
  134. package/avatar-status/utils.js +0 -6
  135. package/chat-avatar/index.d.ts +0 -12
  136. package/chat-avatar/index.js +0 -52
  137. package/chat-avatar/types.d.ts +0 -12
  138. package/chat-avatar/types.js +0 -1
  139. /package/{avatar-badge → badge}/types.js +0 -0
package/theme/tag.css ADDED
@@ -0,0 +1,53 @@
1
+ :root,
2
+ :host {
3
+ --sinch-tag-color-default-bg: var(--sinch-color-snow-500);
4
+ --sinch-tag-color-default-fg: var(--sinch-color-stormy-500);
5
+ --sinch-tag-color-light-blue-bg: var(--sinch-color-night-200);
6
+ --sinch-tag-color-light-blue-fg: var(--sinch-color-night-700);
7
+ --sinch-tag-color-light-brown-bg: var(--sinch-color-mud-200);
8
+ --sinch-tag-color-light-brown-fg: var(--sinch-color-mud-700);
9
+ --sinch-tag-color-light-gray-bg: var(--sinch-color-dirt-200);
10
+ --sinch-tag-color-light-gray-fg: var(--sinch-color-dirt-700);
11
+ --sinch-tag-color-light-green-bg: var(--sinch-color-grass-200);
12
+ --sinch-tag-color-light-green-fg: var(--sinch-color-grass-700);
13
+ --sinch-tag-color-light-orange-bg: var(--sinch-color-orange-200);
14
+ --sinch-tag-color-light-orange-fg: var(--sinch-color-orange-700);
15
+ --sinch-tag-color-light-pink-bg: var(--sinch-color-candy-200);
16
+ --sinch-tag-color-light-pink-fg: var(--sinch-color-candy-700);
17
+ --sinch-tag-color-light-violet-bg: var(--sinch-color-violet-200);
18
+ --sinch-tag-color-light-violet-fg: var(--sinch-color-violet-700);
19
+ --sinch-tag-color-light-yellow-bg: var(--sinch-color-bolt-200);
20
+ --sinch-tag-color-light-yellow-fg: var(--sinch-color-bolt-700);
21
+ --sinch-tag-color-dark-blue-bg: var(--sinch-color-night-700);
22
+ --sinch-tag-color-dark-blue-fg: var(--sinch-color-night-200);
23
+ --sinch-tag-color-dark-brown-bg: var(--sinch-color-mud-700);
24
+ --sinch-tag-color-dark-brown-fg: var(--sinch-color-mud-200);
25
+ --sinch-tag-color-dark-gray-bg: var(--sinch-color-dirt-700);
26
+ --sinch-tag-color-dark-gray-fg: var(--sinch-color-dirt-200);
27
+ --sinch-tag-color-dark-green-bg: var(--sinch-color-grass-700);
28
+ --sinch-tag-color-dark-green-fg: var(--sinch-color-grass-200);
29
+ --sinch-tag-color-dark-orange-bg: var(--sinch-color-orange-700);
30
+ --sinch-tag-color-dark-orange-fg: var(--sinch-color-orange-200);
31
+ --sinch-tag-color-dark-pink-bg: var(--sinch-color-candy-700);
32
+ --sinch-tag-color-dark-pink-fg: var(--sinch-color-candy-200);
33
+ --sinch-tag-color-dark-violet-bg: var(--sinch-color-violet-700);
34
+ --sinch-tag-color-dark-violet-fg: var(--sinch-color-violet-200);
35
+ --sinch-tag-color-dark-yellow-bg: var(--sinch-color-bolt-700);
36
+ --sinch-tag-color-dark-yellow-fg: var(--sinch-color-bolt-200);
37
+ --sinch-tag-color-blue-bg: var(--sinch-color-night-400);
38
+ --sinch-tag-color-blue-fg: var(--sinch-color-snow-100);
39
+ --sinch-tag-color-brown-bg: var(--sinch-color-mud-400);
40
+ --sinch-tag-color-brown-fg: var(--sinch-color-snow-100);
41
+ --sinch-tag-color-gray-bg: var(--sinch-color-dirt-400);
42
+ --sinch-tag-color-gray-fg: var(--sinch-color-snow-100);
43
+ --sinch-tag-color-green-bg: var(--sinch-color-grass-400);
44
+ --sinch-tag-color-green-fg: var(--sinch-color-stormy-500);
45
+ --sinch-tag-color-orange-bg: var(--sinch-color-orange-400);
46
+ --sinch-tag-color-orange-fg: var(--sinch-color-stormy-500);
47
+ --sinch-tag-color-pink-bg: var(--sinch-color-candy-400);
48
+ --sinch-tag-color-pink-fg: var(--sinch-color-stormy-500);
49
+ --sinch-tag-color-violet-bg: var(--sinch-color-violet-400);
50
+ --sinch-tag-color-violet-fg: var(--sinch-color-stormy-500);
51
+ --sinch-tag-color-yellow-bg: var(--sinch-color-bolt-400);
52
+ --sinch-tag-color-yellow-fg: var(--sinch-color-stormy-500);
53
+ }
@@ -0,0 +1,16 @@
1
+ :root,
2
+ :host {
3
+ --sinch-font-family: "Gilroy", "Arial", "sans-serif";
4
+ --sinch-font-weight-emphasized: 600;
5
+ --sinch-font-title-xl: 600 40px/48px var(--sinch-font-family);
6
+ --sinch-font-title-l: 600 24px/32px var(--sinch-font-family);
7
+ --sinch-font-title-m: 600 20px/24px var(--sinch-font-family);
8
+ --sinch-font-title-s: 600 16px/24px var(--sinch-font-family);
9
+ --sinch-font-title-xs: 600 14px/22px var(--sinch-font-family);
10
+ --sinch-font-text-m: 400 16px/24px var(--sinch-font-family);
11
+ --sinch-font-text-s: 400 14px/22px var(--sinch-font-family);
12
+ --sinch-font-text-xs: 400 12px/20px var(--sinch-font-family);
13
+ --sinch-font-text-xxs: 400 10px/16px var(--sinch-font-family);
14
+ --sinch-font-mono-family: "DM Mono", "monospace";
15
+ --sinch-font-mono-text-s: 400 16px/24px var(--sinch-font-mono-family);
16
+ }
package/theme.css CHANGED
@@ -1,96 +1,20 @@
1
+ @import "theme/palette.css";
2
+ @import "theme/fonts.css";
3
+ @import "theme/typography.css";
4
+ @import "theme/shapes.css";
5
+ @import "theme/elevation.css";
6
+
7
+ /* Components */
8
+ @import "theme/avatar.css";
9
+ @import "theme/badge.css";
10
+ @import "theme/chip.css";
11
+ @import "theme/color-swatch.css";
12
+ @import "theme/tag.css";
13
+
1
14
  :root,
2
15
  :host {
3
16
  --sinch-theme: 1;
4
17
 
5
- /* Colors */
6
- --sinch-color-honey-700: #CC8800;
7
- --sinch-color-honey-600: #FFAA00;
8
- --sinch-color-honey-500: #FFBE3C;
9
- --sinch-color-honey-400: #FFCC66;
10
- --sinch-color-honey-300: #FFDF9E;
11
- --sinch-color-honey-200: #FCECCB;
12
- --sinch-color-honey-100: #FFF7E6;
13
- --sinch-color-tropical-700: #003D3D;
14
- --sinch-color-tropical-600: #005757;
15
- --sinch-color-tropical-500: #007171;
16
- --sinch-color-tropical-400: #059688;
17
- --sinch-color-tropical-300: #66AAAA;
18
- --sinch-color-tropical-200: #A7D5C2;
19
- --sinch-color-tropical-100: #DCEDE1;
20
- --sinch-color-tropical-50: #E5F1F1;
21
- --sinch-color-stormy-700: #000000;
22
- --sinch-color-stormy-600: #171717;
23
- --sinch-color-stormy-500: #242424;
24
- --sinch-color-stormy-400: #595959;
25
- --sinch-color-stormy-300: #767676;
26
- --sinch-color-stormy-200: #8C8C8C;
27
- --sinch-color-stormy-100: #A6A6A6;
28
- --sinch-color-ocean-700: #1B3E65;
29
- --sinch-color-ocean-600: #1686CB;
30
- --sinch-color-ocean-500: #3AA7EA;
31
- --sinch-color-ocean-400: #6EBBEE;
32
- --sinch-color-ocean-300: #A1D5F5;
33
- --sinch-color-ocean-200: #C8E6F9;
34
- --sinch-color-ocean-100: #DEF2FF;
35
- --sinch-color-ocean-50: #F3FAFE;
36
- --sinch-color-snow-700: #CCCCCC;
37
- --sinch-color-snow-600: #D9D9D9;
38
- --sinch-color-snow-500: #E0E0E0;
39
- --sinch-color-snow-400: #F2F2F2;
40
- --sinch-color-snow-200: #F8F8F8;
41
- --sinch-color-snow-100: #FFFFFF;
42
- --sinch-color-raspberry-700: #882024;
43
- --sinch-color-raspberry-600: #D13D42;
44
- --sinch-color-raspberry-500: #EF5858;
45
- --sinch-color-raspberry-400: #F38686;
46
- --sinch-color-raspberry-300: #FFB8B8;
47
- --sinch-color-raspberry-200: #FBD5D5;
48
- --sinch-color-raspberry-100: #FFE8E4;
49
- --sinch-color-raspberry-50: #FFF6F5;
50
- --sinch-color-night-700: #1223a1;
51
- --sinch-color-night-400: #3247E9;
52
- --sinch-color-night-200: #D1D6FA;
53
- --sinch-color-grass-700: #006602;
54
- --sinch-color-grass-400: #39B93D;
55
- --sinch-color-grass-200: #B4E4B5;
56
- --sinch-color-dirt-700: #363230;
57
- --sinch-color-dirt-400: #828282;
58
- --sinch-color-dirt-200: #E0DDDC;
59
- --sinch-color-candy-700: #981b77;
60
- --sinch-color-candy-400: #E467C3;
61
- --sinch-color-candy-200: #F6CBEA;
62
- --sinch-color-mud-700: #6d4e46;
63
- --sinch-color-mud-400: #8B6559;
64
- --sinch-color-mud-200: #D7C6C1;
65
- --sinch-color-orange-700: #974302;
66
- --sinch-color-orange-400: #FF8C34;
67
- --sinch-color-orange-200: #FFD4B3;
68
- --sinch-color-bolt-700: #805500;
69
- --sinch-color-bolt-400: #FFBE3C;
70
- --sinch-color-bolt-200: #FFE6B3;
71
- --sinch-color-violet-700: #4F1B98;
72
- --sinch-color-violet-400: #9E67E4;
73
- --sinch-color-violet-200: #DECBF6;
74
- --sinch-color-error-700: #882024;
75
- --sinch-color-error-500: #D13D42;
76
- --sinch-color-error-200: #FBD5D5;
77
- --sinch-color-success-700: #275D33;
78
- --sinch-color-success-500: #46A65A;
79
- --sinch-color-success-200: #D7F1D8;
80
- --sinch-color-informative-700: #003B7E;
81
- --sinch-color-informative-500: #2071CE;
82
- --sinch-color-informative-200: #D5E5F8;
83
- --sinch-color-warning-700: #9C2E00;
84
- --sinch-color-warning-500: #F35B1C;
85
- --sinch-color-warning-200: #FFE8D6;
86
- --sinch-color-skin-tone-0: #FFCC4D;
87
- --sinch-color-skin-tone-10: #F7DECE;
88
- --sinch-color-skin-tone-20: #F3D2A2;
89
- --sinch-color-skin-tone-30: #D4AB88;
90
- --sinch-color-skin-tone-40: #AF7E57;
91
- --sinch-color-skin-tone-50: #7C533E;
92
- --sinch-color-transparent: transparent;
93
-
94
18
  /* Contextual */
95
19
  --sinch-color-bg-primary-light: var(--sinch-color-snow-100);
96
20
  --sinch-color-bg-primary-contrast: var(--sinch-color-snow-200);
@@ -114,93 +38,6 @@
114
38
  --sinch-color-border-focus: var(--sinch-color-ocean-500);
115
39
  --sinch-color-border-invalid: var(--sinch-color-raspberry-600);
116
40
 
117
- /* Color Map */
118
- --sinch-color-map-light-blue-bg: var(--sinch-color-night-200);
119
- --sinch-color-map-light-blue-fg: var(--sinch-color-night-700);
120
- --sinch-color-map-light-brown-bg: var(--sinch-color-mud-200);
121
- --sinch-color-map-light-brown-fg: var(--sinch-color-mud-700);
122
- --sinch-color-map-light-gray-bg: var(--sinch-color-dirt-200);
123
- --sinch-color-map-light-gray-fg: var(--sinch-color-dirt-700);
124
- --sinch-color-map-light-green-bg: var(--sinch-color-grass-200);
125
- --sinch-color-map-light-green-fg: var(--sinch-color-grass-700);
126
- --sinch-color-map-light-orange-bg: var(--sinch-color-orange-200);
127
- --sinch-color-map-light-orange-fg: var(--sinch-color-orange-700);
128
- --sinch-color-map-light-pink-bg: var(--sinch-color-candy-200);
129
- --sinch-color-map-light-pink-fg: var(--sinch-color-candy-700);
130
- --sinch-color-map-light-violet-bg: var(--sinch-color-violet-200);
131
- --sinch-color-map-light-violet-fg: var(--sinch-color-violet-700);
132
- --sinch-color-map-light-yellow-bg: var(--sinch-color-bolt-200);
133
- --sinch-color-map-light-yellow-fg: var(--sinch-color-bolt-700);
134
- --sinch-color-map-dark-blue-bg: var(--sinch-color-night-700);
135
- --sinch-color-map-dark-blue-fg: var(--sinch-color-night-200);
136
- --sinch-color-map-dark-brown-bg: var(--sinch-color-mud-700);
137
- --sinch-color-map-dark-brown-fg: var(--sinch-color-mud-200);
138
- --sinch-color-map-dark-gray-bg: var(--sinch-color-dirt-700);
139
- --sinch-color-map-dark-gray-fg: var(--sinch-color-dirt-200);
140
- --sinch-color-map-dark-green-bg: var(--sinch-color-grass-700);
141
- --sinch-color-map-dark-green-fg: var(--sinch-color-grass-200);
142
- --sinch-color-map-dark-orange-bg: var(--sinch-color-orange-700);
143
- --sinch-color-map-dark-orange-fg: var(--sinch-color-orange-200);
144
- --sinch-color-map-dark-pink-bg: var(--sinch-color-candy-700);
145
- --sinch-color-map-dark-pink-fg: var(--sinch-color-candy-200);
146
- --sinch-color-map-dark-violet-bg: var(--sinch-color-violet-700);
147
- --sinch-color-map-dark-violet-fg: var(--sinch-color-violet-200);
148
- --sinch-color-map-dark-yellow-bg: var(--sinch-color-bolt-700);
149
- --sinch-color-map-dark-yellow-fg: var(--sinch-color-bolt-200);
150
- --sinch-color-map-blue-bg: var(--sinch-color-night-400);
151
- --sinch-color-map-blue-fg: var(--sinch-color-snow-100);
152
- --sinch-color-map-brown-bg: var(--sinch-color-mud-400);
153
- --sinch-color-map-brown-fg: var(--sinch-color-snow-100);
154
- --sinch-color-map-gray-bg: var(--sinch-color-dirt-400);
155
- --sinch-color-map-gray-fg: var(--sinch-color-snow-100);
156
- --sinch-color-map-green-bg: var(--sinch-color-grass-400);
157
- --sinch-color-map-green-fg: var(--sinch-color-stormy-500);
158
- --sinch-color-map-orange-bg: var(--sinch-color-orange-400);
159
- --sinch-color-map-orange-fg: var(--sinch-color-stormy-500);
160
- --sinch-color-map-pink-bg: var(--sinch-color-candy-400);
161
- --sinch-color-map-pink-fg: var(--sinch-color-stormy-500);
162
- --sinch-color-map-violet-bg: var(--sinch-color-violet-400);
163
- --sinch-color-map-violet-fg: var(--sinch-color-stormy-500);
164
- --sinch-color-map-yellow-bg: var(--sinch-color-bolt-400);
165
- --sinch-color-map-yellow-fg: var(--sinch-color-stormy-500);
166
- --sinch-color-map-skin-tone-0-bg: var(--sinch-color-skin-tone-0);
167
- --sinch-color-map-skin-tone-0-fg: var(--sinch-color-stormy-500);
168
- --sinch-color-map-skin-tone-10-bg: var(--sinch-color-skin-tone-10);
169
- --sinch-color-map-skin-tone-10-fg: var(--sinch-color-stormy-500);
170
- --sinch-color-map-skin-tone-20-bg: var(--sinch-color-skin-tone-20);
171
- --sinch-color-map-skin-tone-20-fg: var(--sinch-color-stormy-500);
172
- --sinch-color-map-skin-tone-30-bg: var(--sinch-color-skin-tone-30);
173
- --sinch-color-map-skin-tone-30-fg: var(--sinch-color-stormy-500);
174
- --sinch-color-map-skin-tone-40-bg: var(--sinch-color-skin-tone-40);
175
- --sinch-color-map-skin-tone-40-fg: var(--sinch-color-stormy-500);
176
- --sinch-color-map-skin-tone-50-bg: var(--sinch-color-skin-tone-50);
177
- --sinch-color-map-skin-tone-50-fg: var(--sinch-color-snow-100);
178
-
179
- /* Typography */
180
- --sinch-font-family: "Gilroy", "Arial", "sans-serif";
181
- --sinch-font-weight-emphasized: 600;
182
- --sinch-font-title-xl: 600 40px/48px var(--sinch-font-family);
183
- --sinch-font-title-l: 600 24px/32px var(--sinch-font-family);
184
- --sinch-font-title-m: 600 20px/24px var(--sinch-font-family);
185
- --sinch-font-title-s: 600 16px/24px var(--sinch-font-family);
186
- --sinch-font-title-xs: 600 14px/22px var(--sinch-font-family);
187
- --sinch-font-text-m: 400 16px/24px var(--sinch-font-family);
188
- --sinch-font-text-s: 400 14px/22px var(--sinch-font-family);
189
- --sinch-font-text-xs: 400 12px/20px var(--sinch-font-family);
190
- --sinch-font-text-xxs: 400 10px/16px var(--sinch-font-family);
191
-
192
- /* Shapes */
193
- --sinch-shape-radius-xs: 2px;
194
- --sinch-shape-radius-s: 4px;
195
- --sinch-shape-radius-m: 8px;
196
- --sinch-shape-radius-l: 12px;
197
-
198
- /* Elevation */
199
- --sinch-elevation-level-0: 0 0 0 0 rgba(10, 39, 61, 0.1);
200
- --sinch-elevation-level-1: 1px 2px 6px rgba(10, 39, 61, 0.1);
201
- --sinch-elevation-level-2: 1px 4px 8px rgba(10, 39, 61, 0.1);
202
- --sinch-elevation-level-3: 1px 6px 12px rgba(10, 39, 61, 0.15);
203
-
204
41
  /* Deprecated */
205
42
  --sinch-font-hero: 700 56px/72px var(--sinch-font-family);
206
43
  --sinch-font-body: 400 16px/24px var(--sinch-font-family);
@@ -209,36 +46,3 @@
209
46
  --sinch-font-extra-small-text: 400 12px/20px var(--sinch-font-family);
210
47
  --sinch-font-monospace: 400 16px/24px "monospace";
211
48
  }
212
-
213
- @font-face {
214
- font-family: "Gilroy";
215
- font-weight: 400;
216
- font-style: normal;
217
- font-display: swap;
218
- src:
219
- local("Gilroy-Regular"),
220
- url("https://d2vu40klajma73.cloudfront.net/Gilroy-Regular.woff2") format("woff2"),
221
- url("https://d2vu40klajma73.cloudfront.net/Gilroy-Regular.woff") format("woff");
222
- }
223
-
224
- @font-face {
225
- font-family: "Gilroy";
226
- font-weight: 600;
227
- font-style: normal;
228
- font-display: swap;
229
- src:
230
- local("Gilroy-SemiBold"),
231
- url("https://d2vu40klajma73.cloudfront.net/Gilroy-SemiBold.woff2") format("woff2"),
232
- url("https://d2vu40klajma73.cloudfront.net/Gilroy-SemiBold.woff") format("woff");
233
- }
234
-
235
- @font-face {
236
- font-family: "Gilroy";
237
- font-weight: 700;
238
- font-style: normal;
239
- font-display: swap;
240
- src:
241
- local("Gilroy-Bold"),
242
- url("https://d2vu40klajma73.cloudfront.net/Gilroy-Bold.woff2") format("woff2"),
243
- url("https://d2vu40klajma73.cloudfront.net/Gilroy-Bold.woff") format("woff");
244
- }
@@ -4,92 +4,74 @@ const template = document.createElement('template');
4
4
  template.innerHTML = templateHTML;
5
5
  defineCustomElement('sinch-tile-control', class extends NectaryElement {
6
6
  #$slot;
7
-
8
7
  constructor() {
9
8
  super();
10
9
  const shadowRoot = this.attachShadow();
11
10
  shadowRoot.appendChild(template.content.cloneNode(true));
12
11
  this.#$slot = shadowRoot.querySelector('slot');
13
12
  }
14
-
15
13
  connectedCallback() {
16
14
  this.setAttribute('role', 'tablist');
17
15
  this.#$slot.addEventListener('option-change', this.#onOptionChange);
18
16
  this.#$slot.addEventListener('slotchange', this.#onSlotChange);
19
17
  this.addEventListener('-change', this.#onChangeReactHandler);
20
18
  }
21
-
22
19
  disconnectedCallback() {
23
20
  this.#$slot.removeEventListener('option-change', this.#onOptionChange);
24
21
  this.#$slot.removeEventListener('slotchange', this.#onSlotChange);
25
22
  this.removeEventListener('-change', this.#onChangeReactHandler);
26
23
  }
27
-
28
24
  static get observedAttributes() {
29
25
  return ['value', 'small', 'multiple'];
30
26
  }
31
-
32
27
  get nodeName() {
33
28
  return 'select';
34
29
  }
35
-
36
30
  set value(value) {
37
31
  updateAttribute(this, 'value', value);
38
32
  }
39
-
40
33
  get value() {
41
34
  return getAttribute(this, 'value', '');
42
35
  }
43
-
44
36
  set small(isSmall) {
45
37
  updateBooleanAttribute(this, 'small', isSmall);
46
38
  }
47
-
48
39
  get small() {
49
40
  return getBooleanAttribute(this, 'small');
50
41
  }
51
-
52
42
  set multiple(isMultiple) {
53
43
  updateBooleanAttribute(this, 'multiple', isMultiple);
54
44
  }
55
-
56
45
  get multiple() {
57
46
  return getBooleanAttribute(this, 'multiple');
58
47
  }
59
-
60
48
  set cols(value) {
61
49
  updateIntegerAttribute(this, 'cols', value);
62
50
  }
63
-
64
51
  get cols() {
65
52
  return getIntegerAttribute(this, 'cols', 1);
66
53
  }
67
-
68
54
  attributeChangedCallback(name, oldVal, newVal) {
69
55
  if (oldVal === newVal) {
70
56
  return;
71
57
  }
72
-
73
58
  switch (name) {
74
59
  case 'value':
75
60
  {
76
61
  this.#onValueChange(newVal ?? '');
77
62
  break;
78
63
  }
79
-
80
64
  case 'small':
81
65
  {
82
66
  this.#onSmallChange();
83
67
  break;
84
68
  }
85
-
86
69
  case 'multiple':
87
70
  {
88
71
  this.#onValueChange(this.value);
89
72
  }
90
73
  }
91
74
  }
92
-
93
75
  #onSlotChange = () => {
94
76
  this.#onValueChange(this.value);
95
77
  this.#onSmallChange();
@@ -107,33 +89,27 @@ defineCustomElement('sinch-tile-control', class extends NectaryElement {
107
89
  detail
108
90
  }));
109
91
  };
110
-
111
92
  #onValueChange(csv) {
112
93
  if (this.multiple) {
113
94
  const values = getCsvSet(csv);
114
-
115
95
  for (const $option of this.#$slot.assignedElements()) {
116
96
  const isChecked = !getBooleanAttribute($option, 'disabled') && values.has(getAttribute($option, 'value', ''));
117
97
  updateBooleanAttribute($option, 'data-checked', isChecked);
118
98
  }
119
99
  } else {
120
100
  const value = getFirstCsvValue(csv);
121
-
122
101
  for (const $option of this.#$slot.assignedElements()) {
123
102
  const isChecked = !getBooleanAttribute($option, 'disabled') && value === getAttribute($option, 'value', '');
124
103
  updateBooleanAttribute($option, 'data-checked', isChecked);
125
104
  }
126
105
  }
127
106
  }
128
-
129
107
  #onSmallChange() {
130
108
  const isSmall = this.small;
131
-
132
109
  for (const $opt of this.#$slot.assignedElements()) {
133
110
  updateBooleanAttribute($opt, 'data-small', isSmall);
134
111
  }
135
112
  }
136
-
137
113
  #onChangeReactHandler = e => {
138
114
  getReactEventHandler(this, 'on-change')?.(e);
139
115
  };
@@ -5,7 +5,6 @@ template.innerHTML = templateHTML;
5
5
  defineCustomElement('sinch-tile-control-option', class extends NectaryElement {
6
6
  #$button;
7
7
  #$text;
8
-
9
8
  constructor() {
10
9
  super();
11
10
  const shadowRoot = this.attachShadow();
@@ -13,7 +12,6 @@ defineCustomElement('sinch-tile-control-option', class extends NectaryElement {
13
12
  this.#$button = shadowRoot.querySelector('button');
14
13
  this.#$text = shadowRoot.querySelector('#text');
15
14
  }
16
-
17
15
  connectedCallback() {
18
16
  this.setAttribute('role', 'tab');
19
17
  this.#$button.addEventListener('click', this.#onButtonClick);
@@ -22,7 +20,6 @@ defineCustomElement('sinch-tile-control-option', class extends NectaryElement {
22
20
  this.addEventListener('-focus', this.#onFocusReactHandler);
23
21
  this.addEventListener('-blur', this.#onBlurReactHandler);
24
22
  }
25
-
26
23
  disconnectedCallback() {
27
24
  this.#$button.removeEventListener('click', this.#onButtonClick);
28
25
  this.#$button.removeEventListener('focus', this.#onButtonFocus);
@@ -30,29 +27,24 @@ defineCustomElement('sinch-tile-control-option', class extends NectaryElement {
30
27
  this.removeEventListener('-focus', this.#onFocusReactHandler);
31
28
  this.removeEventListener('-blur', this.#onBlurReactHandler);
32
29
  }
33
-
34
30
  static get observedAttributes() {
35
31
  return ['data-checked', 'text', 'disabled'];
36
32
  }
37
-
38
33
  attributeChangedCallback(name, oldVal, newVal) {
39
34
  if (oldVal === newVal) {
40
35
  return;
41
36
  }
42
-
43
37
  switch (name) {
44
38
  case 'text':
45
39
  {
46
40
  this.#$text.textContent = newVal;
47
41
  break;
48
42
  }
49
-
50
43
  case 'data-checked':
51
44
  {
52
45
  updateExplicitBooleanAttribute(this, 'aria-selected', isAttrTrue(newVal));
53
46
  break;
54
47
  }
55
-
56
48
  case 'disabled':
57
49
  {
58
50
  this.#$button.disabled = isAttrTrue(newVal);
@@ -60,43 +52,33 @@ defineCustomElement('sinch-tile-control-option', class extends NectaryElement {
60
52
  }
61
53
  }
62
54
  }
63
-
64
55
  set value(value) {
65
56
  updateAttribute(this, 'value', value);
66
57
  }
67
-
68
58
  get value() {
69
59
  return getAttribute(this, 'value', '');
70
60
  }
71
-
72
61
  set disabled(isDisabled) {
73
62
  updateBooleanAttribute(this, 'disabled', isDisabled);
74
63
  }
75
-
76
64
  get disabled() {
77
65
  return getBooleanAttribute(this, 'disabled');
78
66
  }
79
-
80
67
  set text(value) {
81
68
  updateAttribute(this, 'text', value);
82
69
  }
83
-
84
70
  get text() {
85
71
  return getAttribute(this, 'text', '');
86
72
  }
87
-
88
73
  get focusable() {
89
74
  return true;
90
75
  }
91
-
92
76
  focus() {
93
77
  this.#$button.focus();
94
78
  }
95
-
96
79
  blur() {
97
80
  this.#$button.blur();
98
81
  }
99
-
100
82
  #onButtonClick = e => {
101
83
  e.stopPropagation();
102
84
  this.dispatchEvent(new CustomEvent('option-change', {