@redvars/peacock 3.4.0 → 3.5.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 (200) hide show
  1. package/dist/assets/styles.css +1 -1
  2. package/dist/assets/styles.css.map +1 -1
  3. package/dist/banner.js +202 -0
  4. package/dist/banner.js.map +1 -0
  5. package/dist/bottom-sheet.js +2 -2
  6. package/dist/{button-COYCtuA8.js → button-DMN1dPAg.js} +58 -75
  7. package/dist/button-DMN1dPAg.js.map +1 -0
  8. package/dist/{button-group-DsXquZQn.js → button-group-CX9CUUXk.js} +9 -14
  9. package/dist/button-group-CX9CUUXk.js.map +1 -0
  10. package/dist/button-group.js +8 -5
  11. package/dist/button-group.js.map +1 -1
  12. package/dist/button.js +7 -4
  13. package/dist/button.js.map +1 -1
  14. package/dist/card.js +15 -5
  15. package/dist/card.js.map +1 -1
  16. package/dist/chart-bar.js +2 -2
  17. package/dist/chart-bar.js.map +1 -1
  18. package/dist/chart-doughnut.js.map +1 -1
  19. package/dist/chart-pie.js.map +1 -1
  20. package/dist/chart-stacked-bar.js +2 -2
  21. package/dist/chart-stacked-bar.js.map +1 -1
  22. package/dist/{class-map-3TAnCMAX.js → class-map-YU7g0o3B.js} +2 -2
  23. package/dist/{class-map-3TAnCMAX.js.map → class-map-YU7g0o3B.js.map} +1 -1
  24. package/dist/clock.js.map +1 -1
  25. package/dist/code-editor.js +4 -4
  26. package/dist/code-editor.js.map +1 -1
  27. package/dist/code-highlighter.js +3 -3
  28. package/dist/code-highlighter.js.map +1 -1
  29. package/dist/custom-elements-jsdocs.json +2918 -1379
  30. package/dist/custom-elements.json +2783 -1054
  31. package/dist/directive-ZPhl09Yt.js +9 -0
  32. package/dist/directive-ZPhl09Yt.js.map +1 -0
  33. package/dist/dispatch-event-utils-CuEqjlPT.js +127 -0
  34. package/dist/dispatch-event-utils-CuEqjlPT.js.map +1 -0
  35. package/dist/fab-C5Nzxk0E.js +497 -0
  36. package/dist/fab-C5Nzxk0E.js.map +1 -0
  37. package/dist/fab.js +11 -0
  38. package/dist/fab.js.map +1 -0
  39. package/dist/index.js +17 -9
  40. package/dist/index.js.map +1 -1
  41. package/dist/{observe-theme-change-DKAIv5BB.js → is-dark-mode-DicqGkCJ.js} +6 -2
  42. package/dist/is-dark-mode-DicqGkCJ.js.map +1 -0
  43. package/dist/notification.js +417 -0
  44. package/dist/notification.js.map +1 -0
  45. package/dist/number-counter.js +2 -2
  46. package/dist/number-counter.js.map +1 -1
  47. package/dist/observe-slot-change-BGJfgg2E.js +31 -0
  48. package/dist/observe-slot-change-BGJfgg2E.js.map +1 -0
  49. package/dist/peacock-loader.js +32 -9
  50. package/dist/peacock-loader.js.map +1 -1
  51. package/dist/search.js +452 -0
  52. package/dist/search.js.map +1 -0
  53. package/dist/{select-C3XAzenC.js → select-4pl4XBj7.js} +778 -374
  54. package/dist/select-4pl4XBj7.js.map +1 -0
  55. package/dist/side-sheet.js +2 -2
  56. package/dist/spread-B5cgadZl.js +32 -0
  57. package/dist/spread-B5cgadZl.js.map +1 -0
  58. package/dist/src/__base_element/BaseHyperlink.d.ts +20 -0
  59. package/dist/src/__utils/cache-fetch.d.ts +1 -0
  60. package/dist/src/__utils/is-dark-mode.d.ts +1 -0
  61. package/dist/src/__utils/is-in-viewport.d.ts +1 -0
  62. package/dist/src/__utils/observe-slot-change.d.ts +1 -0
  63. package/dist/src/__utils/sanitize-svg.d.ts +1 -0
  64. package/dist/src/__utils/throttle.d.ts +4 -0
  65. package/dist/src/accordion/accordion-item.d.ts +33 -9
  66. package/dist/src/accordion/accordion.d.ts +21 -5
  67. package/dist/src/banner/banner.d.ts +47 -0
  68. package/dist/src/banner/index.d.ts +1 -0
  69. package/dist/src/button/BaseButton.d.ts +6 -13
  70. package/dist/src/button/button-group/button-group.d.ts +2 -2
  71. package/dist/src/empty-state/empty-state.d.ts +1 -1
  72. package/dist/src/fab/fab.d.ts +111 -0
  73. package/dist/src/fab/index.d.ts +1 -0
  74. package/dist/src/index.d.ts +5 -0
  75. package/dist/src/link/link.d.ts +3 -10
  76. package/dist/src/menu/menu/menu.d.ts +3 -2
  77. package/dist/src/menu/sub-menu/sub-menu.d.ts +1 -0
  78. package/dist/src/notification/index.d.ts +1 -0
  79. package/dist/src/notification/notification.d.ts +69 -0
  80. package/dist/src/pagination/pagination.d.ts +8 -1
  81. package/dist/src/search/index.d.ts +1 -0
  82. package/dist/src/search/search.d.ts +76 -0
  83. package/dist/src/select/select.d.ts +3 -5
  84. package/dist/src/slider/slider.d.ts +4 -0
  85. package/dist/src/snackbar/snackbar.d.ts +14 -1
  86. package/dist/src/toolbar/index.d.ts +1 -0
  87. package/dist/src/toolbar/toolbar.d.ts +86 -0
  88. package/dist/{style-map-CRFEoCEg.js → style-map-DVmWOuYy.js} +2 -2
  89. package/dist/{style-map-CRFEoCEg.js.map → style-map-DVmWOuYy.js.map} +1 -1
  90. package/dist/test/banner.test.d.ts +1 -0
  91. package/dist/test/search.test.d.ts +1 -0
  92. package/dist/test/toolbar.test.d.ts +1 -0
  93. package/dist/throttle-C7ZAPqtu.js +24 -0
  94. package/dist/throttle-C7ZAPqtu.js.map +1 -0
  95. package/dist/toolbar.js +306 -0
  96. package/dist/toolbar.js.map +1 -0
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/dist/{unsafe-html-D3GHRaGQ.js → unsafe-html-BsGUjx94.js} +2 -2
  99. package/dist/{unsafe-html-D3GHRaGQ.js.map → unsafe-html-BsGUjx94.js.map} +1 -1
  100. package/package.json +1 -1
  101. package/readme.md +2 -2
  102. package/scss/styles.scss +4 -0
  103. package/src/__base_element/BaseHyperlink.ts +42 -0
  104. package/src/__base_element/README.md +19 -0
  105. package/src/__utils/cache-fetch.ts +65 -0
  106. package/src/__utils/is-dark-mode.ts +3 -0
  107. package/src/__utils/is-in-viewport.ts +6 -0
  108. package/src/__utils/observe-slot-change.ts +38 -0
  109. package/src/__utils/sanitize-svg.ts +27 -0
  110. package/src/__utils/throttle.ts +27 -0
  111. package/src/accordion/accordion-item.scss +136 -65
  112. package/src/accordion/accordion-item.ts +117 -44
  113. package/src/accordion/accordion.scss +24 -5
  114. package/src/accordion/accordion.ts +29 -23
  115. package/src/accordion/demo/index.html +74 -35
  116. package/src/banner/banner.scss +87 -0
  117. package/src/banner/banner.ts +107 -0
  118. package/src/banner/index.ts +1 -0
  119. package/src/button/BaseButton.ts +14 -27
  120. package/src/button/button/button-colors.scss +14 -14
  121. package/src/button/button/button.ts +6 -5
  122. package/src/button/button-group/button-group.ts +3 -3
  123. package/src/button/icon-button/icon-button.ts +4 -11
  124. package/src/card/card.ts +41 -31
  125. package/src/chart-bar/chart-bar.ts +1 -1
  126. package/src/chart-bar/chart-stacked-bar.ts +3 -1
  127. package/src/chart-doughnut/chart-doughnut.ts +1 -1
  128. package/src/chart-pie/chart-pie.ts +1 -1
  129. package/src/checkbox/checkbox.ts +1 -1
  130. package/src/clock/clock.ts +1 -1
  131. package/src/code-editor/code-editor.ts +4 -4
  132. package/src/code-highlighter/code-highlighter.ts +2 -2
  133. package/src/date-picker/date-picker.ts +5 -2
  134. package/src/divider/divider.ts +3 -1
  135. package/src/empty-state/empty-state.scss +7 -9
  136. package/src/empty-state/empty-state.ts +1 -1
  137. package/src/fab/fab-colors.scss +49 -0
  138. package/src/fab/fab-sizes.scss +47 -0
  139. package/src/fab/fab.scss +137 -0
  140. package/src/fab/fab.ts +285 -0
  141. package/src/fab/index.ts +1 -0
  142. package/src/field/field.ts +3 -1
  143. package/src/icon/datasource.ts +1 -1
  144. package/src/icon/icon.ts +3 -1
  145. package/src/image/image.ts +3 -2
  146. package/src/index.ts +5 -0
  147. package/src/input/input.ts +5 -2
  148. package/src/link/link.ts +2 -15
  149. package/src/menu/menu/menu.scss +7 -0
  150. package/src/menu/menu/menu.ts +7 -4
  151. package/src/menu/sub-menu/sub-menu.ts +1 -0
  152. package/src/notification/index.ts +1 -0
  153. package/src/notification/notification.scss +201 -0
  154. package/src/notification/notification.ts +206 -0
  155. package/src/number-counter/number-counter.ts +3 -1
  156. package/src/number-field/number-field.ts +4 -2
  157. package/src/pagination/pagination.scss +33 -24
  158. package/src/pagination/pagination.ts +113 -60
  159. package/src/peacock-loader.ts +20 -0
  160. package/src/radio/radio.ts +3 -1
  161. package/src/search/index.ts +1 -0
  162. package/src/search/search-colors.scss +14 -0
  163. package/src/search/search.scss +204 -0
  164. package/src/search/search.ts +240 -0
  165. package/src/select/option.ts +1 -1
  166. package/src/select/select.scss +5 -0
  167. package/src/select/select.ts +71 -37
  168. package/src/slider/slider.scss +19 -0
  169. package/src/slider/slider.ts +30 -19
  170. package/src/snackbar/snackbar.scss +62 -31
  171. package/src/snackbar/snackbar.ts +92 -12
  172. package/src/switch/switch.ts +3 -1
  173. package/src/table/table.ts +3 -1
  174. package/src/tabs/tab.ts +6 -3
  175. package/src/textarea/textarea.ts +4 -2
  176. package/src/time-picker/time-picker.ts +4 -2
  177. package/src/toolbar/index.ts +1 -0
  178. package/src/toolbar/toolbar-colors.scss +16 -0
  179. package/src/toolbar/toolbar.scss +165 -0
  180. package/src/toolbar/toolbar.ts +137 -0
  181. package/dist/button-COYCtuA8.js.map +0 -1
  182. package/dist/button-group-DsXquZQn.js.map +0 -1
  183. package/dist/directive-Cuw6h7YA.js +0 -9
  184. package/dist/directive-Cuw6h7YA.js.map +0 -1
  185. package/dist/dispatch-event-utils-B4odODQf.js +0 -277
  186. package/dist/dispatch-event-utils-B4odODQf.js.map +0 -1
  187. package/dist/observe-theme-change-DKAIv5BB.js.map +0 -1
  188. package/dist/select-C3XAzenC.js.map +0 -1
  189. package/dist/src/styleMixins.css.d.ts +0 -9
  190. package/dist/src/utils.d.ts +0 -9
  191. package/src/styleMixins.css.ts +0 -55
  192. package/src/utils.ts +0 -193
  193. /package/dist/src/{spread.d.ts → __directive/spread.d.ts} +0 -0
  194. /package/dist/src/{utils → __utils}/copy-to-clipboard.d.ts +0 -0
  195. /package/dist/src/{utils → __utils}/dispatch-event-utils.d.ts +0 -0
  196. /package/dist/src/{utils → __utils}/observe-theme-change.d.ts +0 -0
  197. /package/src/{spread.ts → __directive/spread.ts} +0 -0
  198. /package/src/{utils → __utils}/copy-to-clipboard.ts +0 -0
  199. /package/src/{utils → __utils}/dispatch-event-utils.ts +0 -0
  200. /package/src/{utils → __utils}/observe-theme-change.ts +0 -0
@@ -10,6 +10,7 @@ let subMenuIdCounter = 0;
10
10
  * @label Sub Menu
11
11
  * @tag wc-sub-menu
12
12
  * @rawTag sub-menu
13
+ * @parentRawTag menu
13
14
  * @summary Connects a menu item to a nested menu.
14
15
  */
15
16
  export class SubMenu extends LitElement {
@@ -0,0 +1 @@
1
+ export { Notification } from './notification.js';
@@ -0,0 +1,201 @@
1
+ @use '../../scss/mixin';
2
+
3
+ @include mixin.base-styles;
4
+
5
+ :host {
6
+ --notification-container-color: var(--color-primary-container);
7
+ --notification-text-color: var(--color-on-primary-container);
8
+ --notification-leading-icon-color: var(--color-on-primary-container);
9
+ --notification-accent-color: var(--color-primary);
10
+ --notification-border-radius: var(--shape-corner-medium);
11
+
12
+ display: block;
13
+ }
14
+
15
+ :host(:not([inline])) {
16
+ width: min(100%, 28rem);
17
+ }
18
+
19
+ .notification {
20
+ align-items: flex-start;
21
+ background: var(--notification-container-color);
22
+ border-inline-start: 4px solid var(--notification-accent-color);
23
+ border-radius: var(--notification-border-radius);
24
+ color: var(--notification-text-color);
25
+ display: grid;
26
+ gap: var(--spacing-100);
27
+ grid-template-columns: auto 1fr auto;
28
+ padding: var(--spacing-150) var(--spacing-100) var(--spacing-150) var(--spacing-150);
29
+ }
30
+
31
+ .state-icon {
32
+ align-items: center;
33
+ color: var(--notification-leading-icon-color);
34
+ display: inline-flex;
35
+ justify-content: center;
36
+ min-height: 2rem;
37
+
38
+ --icon-size: 1.25rem;
39
+ --icon-color: var(--notification-leading-icon-color);
40
+ }
41
+
42
+ .content {
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: var(--spacing-100);
46
+ min-width: 0;
47
+ }
48
+
49
+ .content-text {
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: var(--spacing-025);
53
+ min-width: 0;
54
+ }
55
+
56
+ .title {
57
+ @include mixin.get-typography(label-large);
58
+ color: var(--notification-text-color);
59
+ overflow-wrap: anywhere;
60
+ }
61
+
62
+ .subtitle {
63
+ @include mixin.get-typography(body-medium);
64
+ color: var(--notification-text-color);
65
+ opacity: 0.88;
66
+ overflow-wrap: anywhere;
67
+ }
68
+
69
+ .title ::slotted(*),
70
+ .subtitle ::slotted(*) {
71
+ margin: 0;
72
+ }
73
+
74
+ .actions {
75
+ display: inline-flex;
76
+ gap: var(--spacing-100);
77
+ }
78
+
79
+ .action {
80
+ --outlined-button-label-text-color: var(--notification-text-color);
81
+ --outlined-button-outline-color: color-mix(in srgb, var(--notification-text-color) 40%, transparent);
82
+ --text-button-label-text-color: var(--notification-text-color);
83
+ }
84
+
85
+ .close-button-container {
86
+ display: inline-flex;
87
+ }
88
+
89
+ .close-button {
90
+ --text-button-label-text-color: var(--notification-text-color);
91
+ }
92
+
93
+ .notification.inline {
94
+ align-items: center;
95
+ }
96
+
97
+ .notification.inline .content {
98
+ align-items: center;
99
+ display: flex;
100
+ flex-direction: row;
101
+ gap: var(--spacing-150);
102
+ }
103
+
104
+ .notification.inline .content-text {
105
+ display: inline;
106
+ flex: 1;
107
+ }
108
+
109
+ .notification.inline .title,
110
+ .notification.inline .subtitle,
111
+ .notification.inline .title ::slotted(*),
112
+ .notification.inline .subtitle ::slotted(*) {
113
+ display: inline;
114
+ }
115
+
116
+ .notification:not(.has-subtitle) {
117
+ align-items: center;
118
+ }
119
+
120
+ .notification:not(.has-subtitle) .content {
121
+ gap: 0;
122
+ }
123
+
124
+ .notification.variant-info {
125
+ --notification-container-color: var(--color-primary-container);
126
+ --notification-text-color: var(--color-on-primary-container);
127
+ --notification-leading-icon-color: var(--color-on-primary-container);
128
+ --notification-accent-color: var(--color-primary);
129
+ }
130
+
131
+ .notification.variant-success {
132
+ --notification-container-color: var(--color-success-container);
133
+ --notification-text-color: var(--color-on-success-container);
134
+ --notification-leading-icon-color: var(--color-on-success-container);
135
+ --notification-accent-color: var(--color-success);
136
+ }
137
+
138
+ .notification.variant-warning {
139
+ --notification-container-color: var(--color-warning-container);
140
+ --notification-text-color: var(--color-on-warning-container);
141
+ --notification-leading-icon-color: var(--color-on-warning-container);
142
+ --notification-accent-color: var(--color-warning);
143
+ }
144
+
145
+ .notification.variant-error {
146
+ --notification-container-color: var(--color-error-container);
147
+ --notification-text-color: var(--color-on-error-container);
148
+ --notification-leading-icon-color: var(--color-on-error-container);
149
+ --notification-accent-color: var(--color-error);
150
+ }
151
+
152
+ .notification.high-contrast {
153
+ --notification-container-color: var(--color-inverse-surface);
154
+ --notification-text-color: var(--color-inverse-on-surface);
155
+ --notification-leading-icon-color: var(--color-inverse-on-surface);
156
+ }
157
+
158
+ .notification.high-contrast.variant-info {
159
+ --notification-accent-color: var(--color-primary);
160
+ }
161
+
162
+ .notification.high-contrast.variant-success {
163
+ --notification-accent-color: var(--color-success);
164
+ }
165
+
166
+ .notification.high-contrast.variant-warning {
167
+ --notification-accent-color: var(--color-warning);
168
+ }
169
+
170
+ .notification.high-contrast.variant-error {
171
+ --notification-accent-color: var(--color-error);
172
+ }
173
+
174
+ @media (max-width: 640px) {
175
+ :host(:not([inline])) {
176
+ width: 100%;
177
+ }
178
+
179
+ .notification.inline {
180
+ align-items: flex-start;
181
+ }
182
+
183
+ .notification.inline .content {
184
+ align-items: flex-start;
185
+ flex-direction: column;
186
+ gap: var(--spacing-100);
187
+ }
188
+
189
+ .notification.inline .content-text {
190
+ display: flex;
191
+ flex-direction: column;
192
+ gap: var(--spacing-025);
193
+ }
194
+
195
+ .notification.inline .title,
196
+ .notification.inline .subtitle,
197
+ .notification.inline .title ::slotted(*),
198
+ .notification.inline .subtitle ::slotted(*) {
199
+ display: initial;
200
+ }
201
+ }
@@ -0,0 +1,206 @@
1
+ import { LitElement, html, nothing } from 'lit';
2
+ import { property, state } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+
5
+ import IndividualComponent from '@/IndividualComponent.js';
6
+ import styles from './notification.scss';
7
+
8
+ type NotificationVariant = 'success' | 'error' | 'info' | 'warning';
9
+
10
+ const VARIANT_LABELS: Record<NotificationVariant, string> = {
11
+ success: 'Success',
12
+ error: 'Error',
13
+ info: 'Information',
14
+ warning: 'Warning',
15
+ };
16
+
17
+ const VARIANT_ICONS: Record<NotificationVariant, string> = {
18
+ success: 'check_circle',
19
+ error: 'error',
20
+ info: 'info',
21
+ warning: 'warning',
22
+ };
23
+
24
+ /**
25
+ * @label Notification
26
+ * @tag wc-notification
27
+ * @rawTag notification
28
+ * @summary Notifications communicate contextual status, errors, warnings, and success messages.
29
+ *
30
+ * @cssprop --notification-container-color - Surface color for the notification container.
31
+ * @cssprop --notification-text-color - Label and supporting text color.
32
+ * @cssprop --notification-leading-icon-color - Leading state icon color.
33
+ * @cssprop --notification-accent-color - Start border color for status emphasis.
34
+ * @cssprop --notification-border-radius - Border radius of the notification container.
35
+ *
36
+ * @fires {CustomEvent} notification-dismiss - Fired when the notification is dismissed.
37
+ * @fires {CustomEvent} notification-action-click - Fired when the action button is clicked.
38
+ *
39
+ * @example
40
+ * ```html
41
+ * <wc-notification variant="success" action="Undo" dismissible>
42
+ * <span slot="title">Record saved</span>
43
+ * </wc-notification>
44
+ * ```
45
+ * @tags display, feedback
46
+ */
47
+ @IndividualComponent
48
+ export class Notification extends LitElement {
49
+ static styles = [styles];
50
+
51
+ /**
52
+ * If true, content and actions are laid out in a single row.
53
+ */
54
+ @property({ type: Boolean, reflect: true }) inline = false;
55
+
56
+ /**
57
+ * The visual variant of the notification.
58
+ */
59
+ @property({ type: String, reflect: true })
60
+ variant: NotificationVariant = 'info';
61
+
62
+ /**
63
+ * Enables a high contrast appearance.
64
+ */
65
+ @property({ type: Boolean, reflect: true, attribute: 'high-contrast' })
66
+ highContrast = false;
67
+
68
+ /**
69
+ * If true, renders a dismiss icon button.
70
+ */
71
+ @property({ type: Boolean, reflect: true }) dismissible = false;
72
+
73
+ /**
74
+ * Action label text. When provided, an action button is shown.
75
+ */
76
+ @property({ type: String }) action = '';
77
+
78
+ /**
79
+ * If true, the host controls visibility when dismissed.
80
+ */
81
+ @property({ type: Boolean, reflect: true }) managed = false;
82
+
83
+ @state() private isHidden = false;
84
+
85
+ @state() private hasSubtitle = false;
86
+
87
+ /**
88
+ * Programmatically reveals the notification.
89
+ */
90
+ show() {
91
+ this.isHidden = false;
92
+ }
93
+
94
+ /**
95
+ * Programmatically dismisses the notification.
96
+ */
97
+ dismiss() {
98
+ this.hideAndEmitDismiss('programmatic');
99
+ }
100
+
101
+ private get variantIcon() {
102
+ return VARIANT_ICONS[this.variant];
103
+ }
104
+
105
+ private get variantLabel() {
106
+ return VARIANT_LABELS[this.variant];
107
+ }
108
+
109
+ private emitActionClick() {
110
+ this.dispatchEvent(
111
+ new CustomEvent('notification-action-click', {
112
+ bubbles: true,
113
+ composed: true,
114
+ }),
115
+ );
116
+ }
117
+
118
+ private hideAndEmitDismiss(reason: 'dismiss' | 'programmatic') {
119
+ if (!this.managed) {
120
+ this.isHidden = true;
121
+ }
122
+
123
+ this.dispatchEvent(
124
+ new CustomEvent('notification-dismiss', {
125
+ detail: { reason },
126
+ bubbles: true,
127
+ composed: true,
128
+ }),
129
+ );
130
+ }
131
+
132
+ private handleSubtitleSlotChange(event: Event) {
133
+ const slot = event.target as HTMLSlotElement;
134
+ this.hasSubtitle = slot
135
+ .assignedNodes({ flatten: true })
136
+ .some(node => node.textContent?.trim());
137
+ }
138
+
139
+ render() {
140
+ if (this.isHidden) {
141
+ return nothing;
142
+ }
143
+
144
+ return html`
145
+ <div
146
+ class=${classMap({
147
+ notification: true,
148
+ inline: this.inline,
149
+ 'high-contrast': this.highContrast,
150
+ 'has-subtitle': this.hasSubtitle,
151
+ [`variant-${this.variant}`]: true,
152
+ })}
153
+ role="alert"
154
+ aria-live="polite"
155
+ aria-label=${this.variantLabel}
156
+ >
157
+ <div class="state-icon" aria-hidden="true">
158
+ <slot name="icon">
159
+ <wc-icon name=${this.variantIcon}></wc-icon>
160
+ </slot>
161
+ </div>
162
+
163
+ <div class="content">
164
+ <div class="content-text">
165
+ <div class="title">
166
+ <slot name="title"></slot>
167
+ <slot></slot>
168
+ </div>
169
+
170
+ <div class="subtitle">
171
+ <slot name="subtitle" @slotchange=${this.handleSubtitleSlotChange}></slot>
172
+ </div>
173
+ </div>
174
+
175
+ ${this.action
176
+ ? html`<div class="actions">
177
+ <wc-button
178
+ class="action"
179
+ size="sm"
180
+ variant=${this.inline ? 'text' : 'outlined'}
181
+ @click=${this.emitActionClick}
182
+ >
183
+ ${this.action}
184
+ </wc-button>
185
+ </div>`
186
+ : nothing}
187
+ </div>
188
+
189
+ ${this.dismissible
190
+ ? html`<div class="close-button-container">
191
+ <wc-icon-button
192
+ class="close-button"
193
+ variant="text"
194
+ size="sm"
195
+ aria-label="Close notification"
196
+ name="close"
197
+ @click=${() => {
198
+ this.hideAndEmitDismiss('dismiss');
199
+ }}
200
+ ></wc-icon-button>
201
+ </div>`
202
+ : nothing}
203
+ </div>
204
+ `;
205
+ }
206
+ }
@@ -1,7 +1,9 @@
1
1
  import { html, LitElement, nothing } from 'lit';
2
2
  import { property } from 'lit/decorators.js';
3
3
  import { styleMap } from 'lit/directives/style-map.js';
4
- import IndividualComponent from 'src/IndividualComponent.js';
4
+
5
+ import IndividualComponent from '@/IndividualComponent.js';
6
+
5
7
  import styles from './number-counter.scss';
6
8
 
7
9
  /**
@@ -1,10 +1,12 @@
1
1
  import { html, nothing } from 'lit';
2
2
  import { property, query, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
- import { redispatchEvent } from 'src/utils/dispatch-event-utils.js';
4
+
5
+ import { redispatchEvent } from '@/__utils/dispatch-event-utils.js';
6
+ import { spread } from '@/__directive/spread.js';
7
+
5
8
  import BaseInput from '../input/BaseInput.js';
6
9
  import styles from './number-field.scss';
7
- import { spread } from '../spread.js';
8
10
 
9
11
  /**
10
12
  * @label Number Field
@@ -7,44 +7,48 @@
7
7
  }
8
8
 
9
9
  .pagination {
10
- background: var(--color-surface, #fff);
11
10
  display: flex;
12
11
  align-items: center;
12
+ justify-content: flex-end;
13
+ gap: var(--spacing-200, 1rem);
14
+ background: var(--color-surface, #fff);
15
+ padding: var(--spacing-150, 0.75rem) var(--spacing-200, 1rem);
13
16
 
14
- .page-sizes-select {
15
- margin-inline-start: var(--spacing-100, 0.5rem);
17
+ @media (max-width: 48rem) {
18
+ flex-wrap: wrap;
19
+ justify-content: space-between;
20
+ row-gap: var(--spacing-100, 0.5rem);
16
21
  }
17
22
 
18
- .page-size-label {
19
- display: flex;
23
+ .page-size {
24
+ display: inline-flex;
20
25
  align-items: center;
21
26
  gap: var(--spacing-100, 0.5rem);
22
- @include mixin.get-typography-not-important('body-medium');
27
+ min-inline-size: max-content;
28
+ }
29
+
30
+ .page-size-label {
31
+ @include mixin.get-typography-not-important('body-small');
23
32
  color: var(--color-on-surface-variant);
24
33
  white-space: nowrap;
25
34
  }
26
35
 
27
36
  .page-size-select {
28
- border: 1px solid var(--color-outline-variant);
29
- background: var(--color-surface, #fff);
30
- color: var(--color-on-surface);
31
- padding: var(--spacing-050, 0.25rem) var(--spacing-100, 0.5rem);
32
- cursor: pointer;
33
- outline: none;
34
- height: 2.5rem;
35
-
36
- @include mixin.get-typography-not-important('body-medium');
37
-
38
- &:focus {
39
- outline: 2px solid var(--color-primary);
40
- }
37
+ inline-size: 5.5rem;
38
+ min-inline-size: 5.5rem;
39
+ --field-container-height: 2.5rem;
41
40
  }
42
41
 
43
42
  .pagination-item-count {
44
- margin-inline-start: var(--spacing-150, 0.75rem);
45
- flex: 1;
43
+ margin-inline-start: auto;
46
44
  display: flex;
47
45
  align-items: center;
46
+
47
+ @media (max-width: 48rem) {
48
+ order: 3;
49
+ margin-inline-start: 0;
50
+ inline-size: 100%;
51
+ }
48
52
  }
49
53
 
50
54
  .pagination-text {
@@ -52,8 +56,13 @@
52
56
  color: var(--color-on-surface-variant);
53
57
  }
54
58
 
55
- .arrows {
56
- --border-radius: 0;
57
- --button-height: calc(2.5rem - 2px);
59
+ .pagination-actions {
60
+ display: inline-flex;
61
+ align-items: center;
62
+ gap: var(--spacing-025, 0.125rem);
63
+ }
64
+
65
+ .nav-button {
66
+ --button-container-shape: 999px;
58
67
  }
59
68
  }