noph-ui 0.18.13 → 0.18.15
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/dist/button/Button.svelte +1 -1
- package/dist/button/IconButton.svelte +1 -1
- package/dist/button/SegmentedButton.svelte +1 -1
- package/dist/card/Card.svelte +1 -1
- package/dist/checkbox/Checkbox.svelte +14 -7
- package/dist/chip/FilterChip.svelte +1 -1
- package/dist/chip/InputChip.svelte +1 -1
- package/dist/list/Item.svelte +1 -1
- package/dist/navigation-drawer/NavigationDrawerItem.svelte +1 -1
- package/dist/navigation-rail/NavigationRailItem.svelte +1 -1
- package/dist/radio/Radio.svelte +27 -16
- package/dist/select/VirtualList.svelte.d.ts +11 -4
- package/dist/tabs/Tab.svelte +1 -1
- package/package.json +14 -14
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
|
|
216
216
|
.np-segmented-buttons:has(input:focus-visible) {
|
|
217
217
|
outline-style: solid;
|
|
218
|
-
outline-color: var(--np-color-
|
|
218
|
+
outline-color: var(--np-color-secondary);
|
|
219
219
|
outline-width: 3px;
|
|
220
220
|
outline-offset: 2px;
|
|
221
221
|
animation: focusAnimation 0.3s ease forwards;
|
package/dist/card/Card.svelte
CHANGED
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
|
|
185
185
|
.np-card-container:focus-visible {
|
|
186
186
|
outline-style: solid;
|
|
187
|
-
outline-color: var(--np-color-
|
|
187
|
+
outline-color: var(--np-color-secondary);
|
|
188
188
|
outline-width: 3px;
|
|
189
189
|
outline-offset: 2px;
|
|
190
190
|
animation: focusAnimation 0.3s ease forwards;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
element = $bindable(),
|
|
9
9
|
group = $bindable(),
|
|
10
10
|
style,
|
|
11
|
+
onpointerup,
|
|
11
12
|
...attributes
|
|
12
13
|
}: CheckboxProps = $props()
|
|
13
14
|
|
|
@@ -33,22 +34,24 @@
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
})
|
|
37
|
+
let inputEl: HTMLInputElement | undefined = $state()
|
|
36
38
|
</script>
|
|
37
39
|
|
|
38
40
|
<div {style} class={['np-host', attributes.class]} bind:this={element}>
|
|
39
41
|
<div class="np-container">
|
|
40
42
|
<label class="np-input-wrapper">
|
|
43
|
+
{#if !attributes.disabled}
|
|
44
|
+
<Ripple forElement={inputEl} />
|
|
45
|
+
{/if}
|
|
41
46
|
<input
|
|
42
47
|
{...attributes}
|
|
43
48
|
class="np-input"
|
|
44
49
|
type="checkbox"
|
|
45
50
|
bind:indeterminate
|
|
46
51
|
bind:checked
|
|
52
|
+
bind:this={inputEl}
|
|
47
53
|
aria-checked={indeterminate ? 'mixed' : undefined}
|
|
48
54
|
/>
|
|
49
|
-
{#if !attributes.disabled}
|
|
50
|
-
<Ripple />
|
|
51
|
-
{/if}
|
|
52
55
|
</label>
|
|
53
56
|
|
|
54
57
|
<div class="np-outline"></div>
|
|
@@ -89,16 +92,20 @@
|
|
|
89
92
|
}
|
|
90
93
|
.np-input {
|
|
91
94
|
height: 48px;
|
|
95
|
+
width: 48px;
|
|
92
96
|
margin: 0;
|
|
93
97
|
opacity: 0;
|
|
98
|
+
inset: 0;
|
|
99
|
+
top: -4px;
|
|
100
|
+
left: -4px;
|
|
101
|
+
position: absolute;
|
|
94
102
|
outline: none;
|
|
95
|
-
width: 48px;
|
|
96
103
|
cursor: inherit;
|
|
97
104
|
}
|
|
98
105
|
.np-input-wrapper {
|
|
99
|
-
height:
|
|
106
|
+
height: 40px;
|
|
100
107
|
position: absolute;
|
|
101
|
-
width:
|
|
108
|
+
width: 40px;
|
|
102
109
|
z-index: 1;
|
|
103
110
|
border-radius: var(--np-shape-corner-full);
|
|
104
111
|
cursor: inherit;
|
|
@@ -106,7 +113,7 @@
|
|
|
106
113
|
|
|
107
114
|
.np-input-wrapper:has(input:focus-visible) {
|
|
108
115
|
outline-style: solid;
|
|
109
|
-
outline-color: var(--np-color-
|
|
116
|
+
outline-color: var(--np-color-secondary);
|
|
110
117
|
outline-width: 3px;
|
|
111
118
|
outline-offset: 2px;
|
|
112
119
|
animation: focusAnimation 0.3s ease forwards;
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
}
|
|
205
205
|
.np-filter-chip:has(input:focus-visible) {
|
|
206
206
|
outline-style: solid;
|
|
207
|
-
outline-color: var(--np-color-
|
|
207
|
+
outline-color: var(--np-color-secondary);
|
|
208
208
|
outline-width: 3px;
|
|
209
209
|
outline-offset: 2px;
|
|
210
210
|
animation: focusAnimation 0.3s ease forwards;
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
}
|
|
177
177
|
.np-input-chip:focus-visible {
|
|
178
178
|
outline-style: solid;
|
|
179
|
-
outline-color: var(--np-color-
|
|
179
|
+
outline-color: var(--np-color-secondary);
|
|
180
180
|
outline-width: 3px;
|
|
181
181
|
outline-offset: 2px;
|
|
182
182
|
animation: focusAnimation 0.3s ease forwards;
|
package/dist/list/Item.svelte
CHANGED
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
|
|
159
159
|
.np-item:focus-visible {
|
|
160
160
|
outline-style: solid;
|
|
161
|
-
outline-color: var(--np-color-
|
|
161
|
+
outline-color: var(--np-color-secondary);
|
|
162
162
|
outline-width: 3px;
|
|
163
163
|
outline-offset: -3px;
|
|
164
164
|
border-radius: var(--np-shape-corner-extra-small);
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
.np-navigation-drawer-item:focus-visible {
|
|
98
98
|
outline-style: solid;
|
|
99
|
-
outline-color: var(--np-color-
|
|
99
|
+
outline-color: var(--np-color-secondary);
|
|
100
100
|
outline-width: 3px;
|
|
101
101
|
outline-offset: -3px;
|
|
102
102
|
animation: focusAnimation 0.3s ease forwards;
|
package/dist/radio/Radio.svelte
CHANGED
|
@@ -11,18 +11,13 @@
|
|
|
11
11
|
...attributes
|
|
12
12
|
}: RadioProps = $props()
|
|
13
13
|
|
|
14
|
-
let
|
|
14
|
+
let inputEl: HTMLSpanElement | undefined = $state()
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<label {style} class={['np-host', attributes.class]} bind:this={element}>
|
|
18
|
-
{#if group !== undefined}
|
|
19
|
-
<input {...attributes} type="radio" class="np-input" {checked} {defaultChecked} bind:group />
|
|
20
|
-
{:else}
|
|
21
|
-
<input {...attributes} type="radio" class="np-input" {checked} {defaultChecked} />
|
|
22
|
-
{/if}
|
|
23
18
|
<div class="np-container" aria-hidden="true">
|
|
24
19
|
{#if !attributes.disabled}
|
|
25
|
-
<Ripple forElement={
|
|
20
|
+
<Ripple forElement={inputEl} class="np-radio-ripple" />
|
|
26
21
|
{/if}
|
|
27
22
|
<svg class="np-radio-icon" viewBox="0 0 20 20">
|
|
28
23
|
<mask id="1">
|
|
@@ -32,22 +27,42 @@
|
|
|
32
27
|
<circle class="outer circle" cx="10" cy="10" r="10" mask="url(#1)" />
|
|
33
28
|
<circle class="inner circle" cx="10" cy="10" r="5" />
|
|
34
29
|
</svg>
|
|
35
|
-
|
|
30
|
+
{#if group !== undefined}
|
|
31
|
+
<input
|
|
32
|
+
{...attributes}
|
|
33
|
+
bind:this={inputEl}
|
|
34
|
+
type="radio"
|
|
35
|
+
class="np-input"
|
|
36
|
+
{checked}
|
|
37
|
+
{defaultChecked}
|
|
38
|
+
bind:group
|
|
39
|
+
/>
|
|
40
|
+
{:else}
|
|
41
|
+
<input
|
|
42
|
+
{...attributes}
|
|
43
|
+
bind:this={inputEl}
|
|
44
|
+
type="radio"
|
|
45
|
+
class="np-input"
|
|
46
|
+
{checked}
|
|
47
|
+
{defaultChecked}
|
|
48
|
+
/>
|
|
49
|
+
{/if}
|
|
36
50
|
</div>
|
|
37
51
|
</label>
|
|
38
52
|
|
|
39
53
|
<style>
|
|
40
54
|
:global(.np-radio-ripple) {
|
|
41
|
-
border-radius: 50% !important;
|
|
42
55
|
height: 40px;
|
|
43
56
|
inset: unset !important;
|
|
44
57
|
width: 40px;
|
|
45
58
|
}
|
|
46
59
|
.np-input {
|
|
47
60
|
opacity: 0;
|
|
48
|
-
|
|
61
|
+
margin: 0;
|
|
49
62
|
position: absolute;
|
|
50
63
|
cursor: inherit;
|
|
64
|
+
height: 48px;
|
|
65
|
+
width: 48px;
|
|
51
66
|
}
|
|
52
67
|
.np-host {
|
|
53
68
|
margin: max(0px, (48px - var(--np-radio-icon-size, 20px))/2);
|
|
@@ -63,7 +78,7 @@
|
|
|
63
78
|
|
|
64
79
|
.np-host:has(input:focus-visible) .np-container {
|
|
65
80
|
outline-style: solid;
|
|
66
|
-
outline-color: var(--np-color-
|
|
81
|
+
outline-color: var(--np-color-secondary);
|
|
67
82
|
outline-width: 3px;
|
|
68
83
|
outline-offset: 12px;
|
|
69
84
|
border-radius: 50%;
|
|
@@ -88,15 +103,11 @@
|
|
|
88
103
|
.np-container {
|
|
89
104
|
display: flex;
|
|
90
105
|
height: 100%;
|
|
106
|
+
border-radius: var(--np-shape-corner-full);
|
|
91
107
|
place-content: center;
|
|
92
108
|
place-items: center;
|
|
93
109
|
width: 100%;
|
|
94
110
|
}
|
|
95
|
-
.np-touch {
|
|
96
|
-
height: 48px;
|
|
97
|
-
position: absolute;
|
|
98
|
-
width: 48px;
|
|
99
|
-
}
|
|
100
111
|
.np-radio-icon {
|
|
101
112
|
fill: var(--np-radio-icon-color, var(--np-color-on-surface-variant));
|
|
102
113
|
inset: 0px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
declare
|
|
4
|
-
props
|
|
3
|
+
declare function $$render<T>(): {
|
|
4
|
+
props: HTMLAttributes<HTMLDivElement> & {
|
|
5
5
|
items: T[];
|
|
6
6
|
height?: string;
|
|
7
7
|
itemHeight?: number;
|
|
@@ -9,8 +9,15 @@ declare class __sveltets_Render<T> {
|
|
|
9
9
|
end?: number;
|
|
10
10
|
row: Snippet<[T]>;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
exports: {};
|
|
13
|
+
bindings: "start" | "end";
|
|
14
|
+
slots: {};
|
|
15
|
+
events: {};
|
|
16
|
+
};
|
|
17
|
+
declare class __sveltets_Render<T> {
|
|
18
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
19
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
20
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
14
21
|
bindings(): "start" | "end";
|
|
15
22
|
exports(): {};
|
|
16
23
|
}
|
package/dist/tabs/Tab.svelte
CHANGED
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
|
|
213
213
|
.np-tab:focus-visible .focus-area {
|
|
214
214
|
outline-style: solid;
|
|
215
|
-
outline-color: var(--np-color-
|
|
215
|
+
outline-color: var(--np-color-secondary);
|
|
216
216
|
outline-width: 3px;
|
|
217
217
|
outline-offset: -3px;
|
|
218
218
|
animation: focusAnimation 0.3s ease forwards;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noph-ui",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://noph.dev",
|
|
6
6
|
"repository": {
|
|
@@ -53,26 +53,26 @@
|
|
|
53
53
|
"svelte": "^5.32.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@eslint/js": "^9.
|
|
56
|
+
"@eslint/js": "^9.31.0",
|
|
57
57
|
"@material/material-color-utilities": "^0.3.0",
|
|
58
|
-
"@playwright/test": "^1.
|
|
59
|
-
"@sveltejs/adapter-vercel": "^5.
|
|
60
|
-
"@sveltejs/kit": "^2.
|
|
61
|
-
"@sveltejs/package": "^2.
|
|
62
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
58
|
+
"@playwright/test": "^1.54.1",
|
|
59
|
+
"@sveltejs/adapter-vercel": "^5.8.0",
|
|
60
|
+
"@sveltejs/kit": "^2.25.1",
|
|
61
|
+
"@sveltejs/package": "^2.4.0",
|
|
62
|
+
"@sveltejs/vite-plugin-svelte": "^6.1.0",
|
|
63
63
|
"@types/eslint": "^9.6.1",
|
|
64
|
-
"eslint": "^9.
|
|
65
|
-
"eslint-config-prettier": "^10.1.
|
|
66
|
-
"eslint-plugin-svelte": "^3.
|
|
64
|
+
"eslint": "^9.31.0",
|
|
65
|
+
"eslint-config-prettier": "^10.1.8",
|
|
66
|
+
"eslint-plugin-svelte": "^3.11.0",
|
|
67
67
|
"globals": "^16.3.0",
|
|
68
68
|
"prettier": "^3.6.2",
|
|
69
69
|
"prettier-plugin-svelte": "^3.4.0",
|
|
70
70
|
"publint": "^0.3.12",
|
|
71
|
-
"svelte": "^5.
|
|
72
|
-
"svelte-check": "^4.
|
|
71
|
+
"svelte": "^5.36.13",
|
|
72
|
+
"svelte-check": "^4.3.0",
|
|
73
73
|
"typescript": "^5.8.3",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
75
|
-
"vite": "^7.0.
|
|
74
|
+
"typescript-eslint": "^8.38.0",
|
|
75
|
+
"vite": "^7.0.5",
|
|
76
76
|
"vitest": "^3.2.4"
|
|
77
77
|
},
|
|
78
78
|
"svelte": "./dist/index.js",
|