@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.
- package/CHANGELOG.md +7 -0
- package/LICENSE.md +159 -159
- package/README.md +0 -2
- package/out/bundle.css +14 -24
- package/out/complete.css +21 -34
- package/out/complete_configless.css +7 -10
- package/package.json +3 -3
- package/src/assets/icons/ArrowRightSolid.svelte +3 -1
- package/src/assets/icons/arrow-right-solid.svg +5 -1
- package/src/assets/icons/favicon.svg +13 -4
- package/src/assets/logos/nordcode-logo-icon.svg +6 -1
- package/src/assets/logos/nordcode-logo.svg +46 -13
- package/src/modules/dialogs/svelte/dialog.svelte +14 -15
- package/src/modules/dialogs/ts/dialogs.ts +80 -79
- package/src/modules/notifications/js/notifications.js +3 -6
- package/src/modules/notifications/svelte/NotificationTemplate.svelte +0 -2
- package/src/styles/components/buttons.css +29 -43
- package/src/styles/components/dialogs.css +1 -2
- package/src/styles/components/forms.css +3 -7
- package/src/styles/components/gallery.css +12 -8
- package/src/styles/components/inputs/base.css +3 -63
- package/src/styles/components/inputs/segmented.css +4 -8
- package/src/styles/components/inputs/switch.css +1 -3
- package/src/styles/components/notifications.css +1 -2
- package/src/styles/config/config.css +352 -305
- package/src/styles/theme/colors.css +182 -124
- package/src/styles/theme/colors_processed.css +254 -80
- package/src/styles/utils/base.css +2 -13
- package/src/styles/utils/easings.css +312 -292
- package/src/styles/utils/layouts.css +12 -18
- package/src/styles/utils/reset.css +3 -30
- 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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
class="nc-dialog"
|
|
12
|
+
{id}
|
|
13
|
+
data-level="1"
|
|
14
|
+
inert
|
|
16
15
|
>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
4
|
-
const dialogOpeningEvent = new Event('opening')
|
|
5
|
-
const dialogOpenedEvent
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
53
|
+
if (dialog.nodeName === 'DIALOG') {
|
|
54
|
+
dialog.close('dismiss');
|
|
55
|
+
}
|
|
56
|
+
};
|
|
56
57
|
|
|
57
|
-
const dialogClose = async ({target:dialog}) => {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const dialogClose = async ({ target: dialog }) => {
|
|
59
|
+
dialog.setAttribute('inert', '');
|
|
60
|
+
dialog.dispatchEvent(dialogClosingEvent);
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
await animationsComplete(dialog);
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
}
|
|
64
|
+
dialog.dispatchEvent(dialogClosedEvent);
|
|
65
|
+
};
|
|
65
66
|
|
|
66
67
|
// page load dialogs setup
|
|
67
68
|
export async function initDialog(dialog: HTMLDialogElement) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
89
|
-
}
|
|
89
|
+
dialog.removeEventListener('removed', dialogRemoved);
|
|
90
|
+
};
|
|
90
91
|
|
|
91
92
|
// SETUP
|
|
92
93
|
document.querySelectorAll('dialog').forEach((dialog: HTMLDialogElement) => {
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
// sugar up <dialog> elements
|
|
95
|
+
initDialog(dialog);
|
|
95
96
|
|
|
96
|
-
|
|
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
|
-
|
|
102
|
+
const el = e.target as HTMLElement;
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
if (el.hasAttribute('data-dialogtarget')) {
|
|
105
|
+
const dialogId = el.getAttribute('data-dialogtarget');
|
|
106
|
+
if (dialogId) window[dialogId].showModal();
|
|
107
|
+
}
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
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,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:
|
|
164
|
-
calc(var(--_button-offset-distance) / -2) 0 0 var(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
calc(var(--_button-offset-distance) * -1) calc(var(--_button-offset-distance) * -
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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"]
|
|
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"]
|
|
244
|
-
:where(input[type="file"]
|
|
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:
|
|
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
|
-
|
|
39
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var(--gallery-scrollbar-
|
|
61
|
-
|
|
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) {
|
|
@@ -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 {
|