@nordcode/ui 2.0.4 → 2.0.6

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 (32) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE.md +159 -159
  3. package/README.md +0 -2
  4. package/out/bundle.css +14 -24
  5. package/out/complete.css +21 -34
  6. package/out/complete_configless.css +7 -10
  7. package/package.json +3 -3
  8. package/src/assets/icons/ArrowRightSolid.svelte +3 -1
  9. package/src/assets/icons/arrow-right-solid.svg +5 -1
  10. package/src/assets/icons/favicon.svg +13 -4
  11. package/src/assets/logos/nordcode-logo-icon.svg +6 -1
  12. package/src/assets/logos/nordcode-logo.svg +46 -13
  13. package/src/modules/dialogs/svelte/dialog.svelte +14 -15
  14. package/src/modules/dialogs/ts/dialogs.ts +80 -79
  15. package/src/modules/notifications/js/notifications.js +3 -6
  16. package/src/modules/notifications/svelte/NotificationTemplate.svelte +0 -2
  17. package/src/styles/components/buttons.css +29 -43
  18. package/src/styles/components/dialogs.css +1 -2
  19. package/src/styles/components/forms.css +3 -7
  20. package/src/styles/components/gallery.css +12 -8
  21. package/src/styles/components/inputs/base.css +3 -63
  22. package/src/styles/components/inputs/segmented.css +4 -8
  23. package/src/styles/components/inputs/switch.css +1 -3
  24. package/src/styles/components/notifications.css +1 -2
  25. package/src/styles/config/config.css +352 -305
  26. package/src/styles/theme/colors.css +182 -124
  27. package/src/styles/theme/colors_processed.css +254 -80
  28. package/src/styles/utils/base.css +2 -13
  29. package/src/styles/utils/easings.css +312 -292
  30. package/src/styles/utils/layouts.css +12 -18
  31. package/src/styles/utils/reset.css +3 -30
  32. package/transform.js +1 -1
@@ -7,21 +7,20 @@ interface DialogProps {
7
7
  let { heading, id }: DialogProps = $props();
8
8
  </script>
9
9
 
10
-
11
10
  <dialog
12
- class="nc-dialog"
13
- {id}
14
- data-level="1"
15
- inert
11
+ class="nc-dialog"
12
+ {id}
13
+ data-level="1"
14
+ inert
16
15
  >
17
- <form method="dialog" class="dialog-container">
18
- <div class="dialog-header">
19
- <h2 class="dialog-title">{heading}</h2>
20
- <button data-closes-dialog>×</button>
21
- </div>
22
- <div class="dialog-content">
23
- <slot />
24
- <button data-opens-dialog="dialog-2">Show me the next dialog</button>
25
- </div>
26
- </form>
16
+ <form method="dialog" class="dialog-container">
17
+ <div class="dialog-header">
18
+ <h2 class="dialog-title">{heading}</h2>
19
+ <button data-closes-dialog>×</button>
20
+ </div>
21
+ <div class="dialog-content">
22
+ <slot />
23
+ <button data-opens-dialog="dialog-2">Show me the next dialog</button>
24
+ </div>
25
+ </form>
27
26
  </dialog>
@@ -1,111 +1,112 @@
1
1
  // custom events to be added to <dialog>
2
- const dialogClosingEvent = new Event('closing')
3
- const dialogClosedEvent = new Event('closed')
4
- const dialogOpeningEvent = new Event('opening')
5
- const dialogOpenedEvent = new Event('opened')
6
- const dialogRemovedEvent = new Event('removed')
2
+ const dialogClosingEvent = new Event('closing');
3
+ const dialogClosedEvent = new Event('closed');
4
+ const dialogOpeningEvent = new Event('opening');
5
+ const dialogOpenedEvent = new Event('opened');
6
+ const dialogRemovedEvent = new Event('removed');
7
7
 
8
8
  // track opening
9
9
  const dialogAttrObserver = new MutationObserver((mutations, observer) => {
10
- mutations.forEach(async mutation => {
11
- if (mutation.attributeName === 'open') {
12
- const dialog = mutation.target as HTMLDialogElement;
13
-
14
- const isOpen = dialog.hasAttribute('open')
15
- if (!isOpen) return
16
-
17
- dialog.removeAttribute('inert')
18
-
19
- // set focus
20
- const focusTarget = dialog.querySelector('[autofocus]') as HTMLDialogElement;
21
- focusTarget
22
- ? focusTarget?.focus()
23
- : dialog?.querySelector('button')?.focus()
24
-
25
- dialog.dispatchEvent(dialogOpeningEvent)
26
- await animationsComplete(dialog)
27
- dialog.dispatchEvent(dialogOpenedEvent)
28
- }
29
- })
30
- })
10
+ mutations.forEach(async mutation => {
11
+ if (mutation.attributeName === 'open') {
12
+ const dialog = mutation.target as HTMLDialogElement;
13
+
14
+ const isOpen = dialog.hasAttribute('open');
15
+ if (!isOpen) return;
16
+
17
+ dialog.removeAttribute('inert');
18
+
19
+ // set focus
20
+ const focusTarget = dialog.querySelector('[autofocus]') as HTMLDialogElement;
21
+ focusTarget
22
+ ? focusTarget?.focus()
23
+ : dialog?.querySelector('button')?.focus();
24
+
25
+ dialog.dispatchEvent(dialogOpeningEvent);
26
+ await animationsComplete(dialog);
27
+ dialog.dispatchEvent(dialogOpenedEvent);
28
+ }
29
+ });
30
+ });
31
31
 
32
32
  // track deletion
33
33
  const dialogDeleteObserver = new MutationObserver((mutations, observer) => {
34
- mutations.forEach(mutation => {
35
- mutation.removedNodes.forEach(removedNode => {
36
- if (removedNode.nodeName === 'DIALOG') {
37
- removedNode.removeEventListener('click', lightDismiss)
38
- removedNode.removeEventListener('close', dialogClose)
39
- removedNode.dispatchEvent(dialogRemovedEvent)
40
- }
41
- })
42
- })
43
- })
34
+ mutations.forEach(mutation => {
35
+ mutation.removedNodes.forEach(removedNode => {
36
+ if (removedNode.nodeName === 'DIALOG') {
37
+ removedNode.removeEventListener('click', lightDismiss);
38
+ removedNode.removeEventListener('close', dialogClose);
39
+ removedNode.dispatchEvent(dialogRemovedEvent);
40
+ }
41
+ });
42
+ });
43
+ });
44
44
 
45
45
  // wait for all dialog animations to complete their promises
46
46
  const animationsComplete = (element: HTMLDialogElement) =>
47
- Promise.allSettled(
48
- element.getAnimations().map((animation: Animation) =>
49
- animation.finished))
47
+ Promise.allSettled(
48
+ element.getAnimations().map((animation: Animation) => animation.finished),
49
+ );
50
50
 
51
51
  // click outside the dialog handler
52
52
  const lightDismiss = ({ target: dialog }) => {
53
- if (dialog.nodeName === 'DIALOG')
54
- dialog.close('dismiss')
55
- }
53
+ if (dialog.nodeName === 'DIALOG') {
54
+ dialog.close('dismiss');
55
+ }
56
+ };
56
57
 
57
- const dialogClose = async ({target:dialog}) => {
58
- dialog.setAttribute('inert', '')
59
- dialog.dispatchEvent(dialogClosingEvent)
58
+ const dialogClose = async ({ target: dialog }) => {
59
+ dialog.setAttribute('inert', '');
60
+ dialog.dispatchEvent(dialogClosingEvent);
60
61
 
61
- await animationsComplete(dialog)
62
+ await animationsComplete(dialog);
62
63
 
63
- dialog.dispatchEvent(dialogClosedEvent)
64
- }
64
+ dialog.dispatchEvent(dialogClosedEvent);
65
+ };
65
66
 
66
67
  // page load dialogs setup
67
68
  export async function initDialog(dialog: HTMLDialogElement) {
68
- dialog.addEventListener('click', lightDismiss)
69
- dialog.addEventListener('close', dialogClose)
70
-
71
- dialogAttrObserver.observe(dialog, {
72
- attributes: true,
73
- })
74
-
75
- dialogDeleteObserver.observe(document.body, {
76
- attributes: false,
77
- subtree: false,
78
- childList: true,
79
- })
80
-
81
- // remove visibility:hidden style
82
- // prevent page load @keyframes playing
83
- await animationsComplete(dialog);
84
- // dialog.style.removeProperty('visibility');
69
+ dialog.addEventListener('click', lightDismiss);
70
+ dialog.addEventListener('close', dialogClose);
71
+
72
+ dialogAttrObserver.observe(dialog, {
73
+ attributes: true,
74
+ });
75
+
76
+ dialogDeleteObserver.observe(document.body, {
77
+ attributes: false,
78
+ subtree: false,
79
+ childList: true,
80
+ });
81
+
82
+ // remove visibility:hidden style
83
+ // prevent page load @keyframes playing
84
+ await animationsComplete(dialog);
85
+ // dialog.style.removeProperty('visibility');
85
86
  }
86
87
 
87
88
  const dialogRemoved = ({ target: dialog }) => {
88
- dialog.removeEventListener('removed', dialogRemoved)
89
- }
89
+ dialog.removeEventListener('removed', dialogRemoved);
90
+ };
90
91
 
91
92
  // SETUP
92
93
  document.querySelectorAll('dialog').forEach((dialog: HTMLDialogElement) => {
93
- // sugar up <dialog> elements
94
- initDialog(dialog);
94
+ // sugar up <dialog> elements
95
+ initDialog(dialog);
95
96
 
96
- dialog.addEventListener('removed', dialogRemoved, { once: true });
97
+ dialog.addEventListener('removed', dialogRemoved, { once: true });
97
98
  });
98
99
 
99
100
  const htmlEl = document.documentElement;
100
101
  htmlEl?.addEventListener('click', (e: MouseEvent) => {
101
- const el = e.target as HTMLElement;
102
+ const el = e.target as HTMLElement;
102
103
 
103
- if (el.hasAttribute('data-dialogtarget')) {
104
- const dialogId = el.getAttribute('data-dialogtarget');
105
- if (dialogId) window[dialogId].showModal();
106
- }
104
+ if (el.hasAttribute('data-dialogtarget')) {
105
+ const dialogId = el.getAttribute('data-dialogtarget');
106
+ if (dialogId) window[dialogId].showModal();
107
+ }
107
108
 
108
- if (el.hasAttribute('data-closes-dialog')) {
109
- (el as HTMLButtonElement)?.closest('dialog')?.close('close');
110
- }
111
- });
109
+ if (el.hasAttribute('data-closes-dialog')) {
110
+ (el as HTMLButtonElement)?.closest('dialog')?.close('close');
111
+ }
112
+ });
@@ -49,19 +49,16 @@ const getNotificationTemplate = () => document.querySelector(Selector.notificati
49
49
  const getNotificationCenter = () => document.querySelector(Selector.notificationCenter);
50
50
 
51
51
  /** @type {function(): NodeListOf<HTMLButtonElement>} */
52
- const getNotificationCenterToggle = () =>
53
- document.querySelectorAll(Selector.notificationCenterToggle);
52
+ const getNotificationCenterToggle = () => document.querySelectorAll(Selector.notificationCenterToggle);
54
53
 
55
54
  /** @type {function(): HTMLOutputElement | null} */
56
55
  const getNotificationOutput = () => document.querySelector(Selector.notificationOutput);
57
56
 
58
57
  /** @type {function(): NodeListOf<HTMLButtonElement>} */
59
- const getNotificationCenterDismissAll = () =>
60
- document.querySelectorAll(Selector.notificationCenterDismissAll);
58
+ const getNotificationCenterDismissAll = () => document.querySelectorAll(Selector.notificationCenterDismissAll);
61
59
 
62
60
  /** @type {function(): HTMLElement | null} */
63
- const getNotificationCenterContainer = () =>
64
- document.querySelector(Selector.notificationCenterContainer);
61
+ const getNotificationCenterContainer = () => document.querySelector(Selector.notificationCenterContainer);
65
62
 
66
63
  /**
67
64
  * Create a unique id for a notification
@@ -1,8 +1,6 @@
1
1
  <script>
2
-
3
2
  </script>
4
3
 
5
-
6
4
  <template id="nc-notification">
7
5
  <div class="nc-notification">
8
6
  <p class="nc-notification-title"></p>
@@ -1,15 +1,5 @@
1
1
  @layer components.buttons {
2
- :where(
3
- button:not([class]),
4
- button[type]:not([class]),
5
- input[type="button"]:not([class]),
6
- input[type="submit"]:not([class]),
7
- input[type="reset"]:not([class]),
8
- input[type="file"]:not([class]),
9
- input[type="file"]:not([class])::-webkit-file-upload-button,
10
- input[type="file"]:not([class])::file-selector-button,
11
- .nc-button
12
- ) {
2
+ :where(button:not([class]), button[type]:not([class]), input[type="button"]:not([class]), input[type="submit"]:not([class]), input[type="reset"]:not([class]), input[type="file"], input[type="file"]::-webkit-file-upload-button, input[type="file"]::file-selector-button, .nc-button) {
13
3
  --_button-background: var(--button-background, var(--surface-hover));
14
4
  --_button-color: var(--button-color, var(--text-hover));
15
5
  --_button-border-color: var(--button-border-color, var(--surface-hover));
@@ -51,22 +41,13 @@
51
41
  text-decoration: unset;
52
42
  box-shadow: var(--_button-box-shadow);
53
43
  user-select: none;
54
- text-box: cap alphabetic;
55
44
  -webkit-tap-highlight-color: transparent;
56
45
  -webkit-touch-callout: none;
57
46
 
58
47
  line-height: var(--line-height-base);
59
48
  }
60
49
 
61
- :where(
62
- button:not([class]),
63
- button[type]:not([class]),
64
- input[type="button"]:not([class]),
65
- input[type="submit"]:not([class]),
66
- input[type="reset"]:not([class]),
67
- .nc-button
68
- ) {
69
-
50
+ :where(button:not([class]), button[type]:not([class]), input[type="button"]:not([class]), input[type="submit"]:not([class]), input[type="reset"]:not([class]), .nc-button) {
70
51
  &:hover {
71
52
  background: var(--_button-background-hover);
72
53
  color: var(--_button-color-hover);
@@ -160,18 +141,24 @@
160
141
  var(--_button-offset-distance-hover)
161
142
  );
162
143
 
163
- --button-box-shadow: calc(var(--_button-offset-distance) / -2)
164
- calc(var(--_button-offset-distance) / -2) 0 0 var(--shadow-color),
165
- calc(var(--_button-offset-distance) * -1) calc(var(--_button-offset-distance) * -1)
166
- 0 0 var(--shadow-color), calc(var(--_button-offset-distance) * -1)
167
- calc(var(--_button-offset-distance) * -1) calc(var(--_button-offset-distance) * -2)
168
- 0 var(--shadow-color);
169
-
170
- --button-hover-shadow: calc(var(--_button-offset-distance-hover) * -1)
171
- calc(var(--_button-offset-distance-hover) * -1) 0 0 var(--shadow-color),
172
- calc(var(--_button-offset-distance-hover) * -1)
173
- calc(var(--_button-offset-distance-hover) * -1)
174
- calc(var(--_button-offset-distance-hover) / -2) 0 var(--shadow-color);
144
+ --button-box-shadow:
145
+ calc(var(--_button-offset-distance) / -2) calc(var(--_button-offset-distance) / -2) 0 0 var(
146
+ --shadow-color
147
+ ),
148
+ calc(var(--_button-offset-distance) * -1) calc(var(--_button-offset-distance) * -1) 0 0 var(
149
+ --shadow-color
150
+ ),
151
+ calc(var(--_button-offset-distance) * -1) calc(var(--_button-offset-distance) * -1) calc(
152
+ var(--_button-offset-distance) * -2
153
+ ) 0 var(--shadow-color);
154
+
155
+ --button-hover-shadow:
156
+ calc(var(--_button-offset-distance-hover) * -1) calc(var(--_button-offset-distance-hover) * -1) 0 0 var(
157
+ --shadow-color
158
+ ),
159
+ calc(var(--_button-offset-distance-hover) * -1) calc(var(--_button-offset-distance-hover) * -1) calc(
160
+ var(--_button-offset-distance-hover) / -2
161
+ ) 0 var(--shadow-color);
175
162
 
176
163
  inset-block-start: calc(var(--_button-offset-distance) * -1);
177
164
  inset-inline-start: calc(var(--_button-offset-distance) * -1);
@@ -191,10 +178,10 @@
191
178
  }
192
179
 
193
180
  /*
194
- * If there is no text node for the button,
195
- * it is assumed that an `aria-label` is that
196
- * and the button will be styled as an icon button.
197
- */
181
+ * If there is no text node for the button,
182
+ * it is assumed that an `aria-label` is that
183
+ * and the button will be styled as an icon button.
184
+ */
198
185
 
199
186
  &[aria-label],
200
187
  &.-icon {
@@ -230,27 +217,26 @@
230
217
  }
231
218
  }
232
219
 
233
- :where(input[type="file"]:not([class])) {
220
+ :where(input[type="file"]) {
234
221
  color: var(--_input-color);
235
222
  background-color: var(--_input-background);
236
223
  border: var(--_input-border);
237
224
  min-block-size: var(--control-height-base);
238
225
  padding-inline-end: var(--contol-spacing-near, 0.5em);
239
- padding-inline-start: 0;
226
+ padding-inline-start: 0 !important;
240
227
  border-radius: var(--_input-border-radius);
241
228
  }
242
229
 
243
- :where(input[type="file"]:not([class]))::-webkit-file-upload-button,
244
- :where(input[type="file"]:not([class]))::file-selector-button {
230
+ :where(input[type="file"])::-webkit-file-upload-button,
231
+ :where(input[type="file"])::file-selector-button {
245
232
  background-color: var(--_button-background);
246
233
  color: var(--_button-color);
247
234
  padding-inline: var(--_button-padding-inline);
248
235
  margin-inline-end: var(--contol-spacing-near, 0.5em);
249
236
  cursor: pointer;
250
237
  box-shadow: none;
251
- min-block-size: calc(var(--control-height-base) - var(--border-width-thin));
238
+ min-block-size: 100%;
252
239
  border: none;
253
- border-inline-end: var(--border-width-thin) solid var(--color-border-base);
254
240
  transform: none;
255
241
  inset-block-start: 0;
256
242
  inset-inline-start: 0;
@@ -13,8 +13,7 @@
13
13
  --_dialog-radius: 0;
14
14
  display: block;
15
15
  z-index: var(--layer-important);
16
- animation: close-dialog var(--_dialog-transition-duration) cubic-bezier(0.7, 0, 1, 1)
17
- forwards;
16
+ animation: close-dialog var(--_dialog-transition-duration) cubic-bezier(0.7, 0, 1, 1) forwards;
18
17
  transition: opacity var(--_dialog-transition-duration) cubic-bezier(0.7, 0, 1, 1);
19
18
  position: fixed;
20
19
  inset: 0;
@@ -34,13 +34,9 @@
34
34
  }
35
35
  }
36
36
 
37
- :where(
38
- :is(fieldset:not([class]), .nc-fieldset):has(
39
- :is(.nc-legend + .nc-hint, legend:not([class]) + .nc-hint)
40
- )
41
- > :is(legend:not([class]), .nc-legend)
42
- + .nc-hint
43
- ) {
37
+ :where(:is(fieldset:not([class]), .nc-fieldset):has(:is(.nc-legend + .nc-hint, legend:not([class]) + .nc-hint))
38
+ > :is(legend:not([class]), .nc-legend)
39
+ + .nc-hint) {
44
40
  --nc-legend-spacing: var(--control-spacing-tiny, 0.25em);
45
41
  margin-block: var(--control-spacing-base, 0.75em);
46
42
  }
@@ -51,14 +51,18 @@
51
51
  background-color: var(--gallery-scrollbar-bg, var(--color-surface-emphasis));
52
52
  background-image: linear-gradient(
53
53
  var(--gallery-scrollbar-bg, var(--color-surface-emphasis)) 0,
54
- var(--gallery-scrollbar-bg, var(--color-surface-emphasis))
55
- calc(var(--gallery-scrollbar-height, var(--spacing-base)) * 0.25),
56
- var(--gallery-scrollbar-fg, var(--color-text-on-emphasis))
57
- calc(var(--gallery-scrollbar-height, var(--spacing-base)) * 0.25),
58
- var(--gallery-scrollbar-fg, var(--color-text-on-emphasis))
59
- calc(var(--gallery-scrollbar-height, var(--spacing-base)) * 0.75),
60
- var(--gallery-scrollbar-bg, var(--color-surface-emphasis))
61
- calc(var(--gallery-scrollbar-height, var(--spacing-base)) * 0.75)
54
+ var(--gallery-scrollbar-bg, var(--color-surface-emphasis)) calc(
55
+ var(--gallery-scrollbar-height, var(--spacing-base)) * 0.25
56
+ ),
57
+ var(--gallery-scrollbar-fg, var(--color-text-on-emphasis)) calc(
58
+ var(--gallery-scrollbar-height, var(--spacing-base)) * 0.25
59
+ ),
60
+ var(--gallery-scrollbar-fg, var(--color-text-on-emphasis)) calc(
61
+ var(--gallery-scrollbar-height, var(--spacing-base)) * 0.75
62
+ ),
63
+ var(--gallery-scrollbar-bg, var(--color-surface-emphasis)) calc(
64
+ var(--gallery-scrollbar-height, var(--spacing-base)) * 0.75
65
+ )
62
66
  );
63
67
  }
64
68
  }
@@ -10,41 +10,7 @@
10
10
  align-items: center;
11
11
  }
12
12
 
13
- :where(
14
- input[type="text"],
15
- input[type="email"],
16
- input[type="password"],
17
- input[type="number"],
18
- input[type="url"],
19
- input[type="search"],
20
- input[type="date"],
21
- input[type="month"],
22
- input[type="week"],
23
- input[type="text"],
24
- input[type="datetime"],
25
- input[type="datetime-local"],
26
- input[type="time"],
27
- input[type="tel"],
28
- input[type="color"],
29
- input[type="file"],
30
- input[type="checkbox"],
31
- input[type="radio"],
32
- textarea,
33
- select,
34
- .nc-input,
35
- .nc-select,
36
- .nc-textarea,
37
- .nc-input-checkbox,
38
- .nc-input-radio,
39
- .nc-input-label,
40
- .nc-input-color,
41
- .nc-input-field,
42
- .nc-input-error,
43
- .nc-checkbox-wrapper,
44
- .nc-input-switch,
45
- .nc-radio-field,
46
- .nc-checkbox-field
47
- ) {
13
+ :where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="search"], input[type="date"], input[type="month"], input[type="week"], input[type="text"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="tel"], input[type="color"], input[type="file"], input[type="checkbox"], input[type="radio"], textarea, select, .nc-input, .nc-select, .nc-textarea, .nc-input-checkbox, .nc-input-radio, .nc-input-label, .nc-input-color, .nc-input-field, .nc-input-error, .nc-checkbox-wrapper, .nc-input-switch, .nc-radio-field, .nc-checkbox-field) {
48
14
  --_input-background: var(--input-background, var(--color-surface-subtle));
49
15
  --_input-background-active: var(--input-background-active, var(--color-surface-base));
50
16
  --_input-color: var(--input-color, var(--color-text-base));
@@ -66,27 +32,7 @@
66
32
  --_input-hover-background: var(--input-hover-background, var(--color-brand-primary-hover));
67
33
  }
68
34
 
69
- :where(
70
- input[type="text"],
71
- input[type="email"],
72
- input[type="password"],
73
- input[type="number"],
74
- input[type="url"],
75
- input[type="search"],
76
- input[type="date"],
77
- input[type="month"],
78
- input[type="week"],
79
- input[type="text"],
80
- input[type="datetime"],
81
- input[type="datetime-local"],
82
- input[type="time"],
83
- input[type="tel"],
84
- input[type="color"],
85
- input[type="file"],
86
- textarea,
87
- select,
88
- .nc-input
89
- ) {
35
+ :where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="search"], input[type="date"], input[type="month"], input[type="week"], input[type="text"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="tel"], input[type="color"], input[type="file"], textarea, select, .nc-input) {
90
36
  font: inherit;
91
37
  letter-spacing: inherit;
92
38
  word-spacing: inherit;
@@ -147,13 +93,7 @@
147
93
  field-sizing: content;
148
94
  }
149
95
 
150
- :where(
151
- input[type="checkbox"]:not([class]),
152
- input[type="radio"]:not([class]),
153
- .nc-input-checkbox,
154
- .nc-input-radio,
155
- .nc-input-switch
156
- ) {
96
+ :where(input[type="checkbox"]:not([class]), input[type="radio"]:not([class]), .nc-input-checkbox, .nc-input-radio, .nc-input-switch) {
157
97
  inline-size: 1lh;
158
98
  block-size: 1lh;
159
99
  padding: 0;
@@ -59,13 +59,11 @@
59
59
  }
60
60
 
61
61
  &:first-child {
62
- border-radius: var(--_segmented-control-border-radius)
63
- var(--_segmented-control-border-radius) 0 0;
62
+ border-radius: var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0 0;
64
63
  }
65
64
 
66
65
  &:last-child {
67
- border-radius: 0 0 var(--_segmented-control-border-radius)
68
- var(--_segmented-control-border-radius);
66
+ border-radius: 0 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius);
69
67
  }
70
68
 
71
69
  &:not(:last-child) {
@@ -100,13 +98,11 @@
100
98
 
101
99
  > label {
102
100
  &:first-child {
103
- border-radius: var(--_segmented-control-border-radius) 0 0
104
- var(--_segmented-control-border-radius);
101
+ border-radius: var(--_segmented-control-border-radius) 0 0 var(--_segmented-control-border-radius);
105
102
  }
106
103
 
107
104
  &:last-child {
108
- border-radius: 0 var(--_segmented-control-border-radius)
109
- var(--_segmented-control-border-radius) 0;
105
+ border-radius: 0 var(--_segmented-control-border-radius) var(--_segmented-control-border-radius) 0;
110
106
  }
111
107
 
112
108
  &:not(:last-child) {
@@ -34,9 +34,7 @@
34
34
  }
35
35
 
36
36
  &:checked:before {
37
- transform: translateX(
38
- calc(var(--_switch-width) - var(--_switch-height) + var(--_thumb-margin))
39
- );
37
+ transform: translateX(calc(var(--_switch-width) - var(--_switch-height) + var(--_thumb-margin)));
40
38
  }
41
39
  }
42
40
  }
@@ -108,8 +108,7 @@
108
108
  }
109
109
 
110
110
  :where(.nc-notification.-closing) {
111
- animation: remove-notification var(--transition-duration-base) cubic-bezier(0.7, 0, 1, 1)
112
- forwards;
111
+ animation: remove-notification var(--transition-duration-base) cubic-bezier(0.7, 0, 1, 1) forwards;
113
112
  }
114
113
 
115
114
  @keyframes pop-in {