noph-ui 0.31.6 → 0.32.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.
- package/dist/progress/CircularProgress.svelte +3 -5
- package/dist/progress/CircularProgress.svelte.d.ts +1 -1
- package/dist/progress/LinearProgress.svelte +5 -5
- package/dist/progress/LinearProgress.svelte.d.ts +1 -1
- package/dist/progress/types.d.ts +0 -1
- package/dist/slider/Slider.svelte +2 -1
- package/package.json +16 -16
|
@@ -6,14 +6,11 @@
|
|
|
6
6
|
max = 1,
|
|
7
7
|
indeterminate = false,
|
|
8
8
|
fourColor = false,
|
|
9
|
-
element = $bindable(),
|
|
10
9
|
...attributes
|
|
11
10
|
}: CircularProgressProps = $props()
|
|
12
|
-
|
|
13
|
-
let dashOffset = $derived((1 - value / max) * 100)
|
|
14
11
|
</script>
|
|
15
12
|
|
|
16
|
-
<div class="np-container"
|
|
13
|
+
<div class="np-container">
|
|
17
14
|
<div
|
|
18
15
|
{...attributes}
|
|
19
16
|
class={['progress', indeterminate && 'indeterminate', fourColor && 'four-color']}
|
|
@@ -34,7 +31,8 @@
|
|
|
34
31
|
{:else}
|
|
35
32
|
<svg viewBox="0 0 4800 4800">
|
|
36
33
|
<circle class="track" pathLength="100"></circle>
|
|
37
|
-
<circle class="active-track" pathLength="100" stroke-dashoffset={
|
|
34
|
+
<circle class="active-track" pathLength="100" stroke-dashoffset={(1 - value / max) * 100}
|
|
35
|
+
></circle>
|
|
38
36
|
</svg>
|
|
39
37
|
{/if}
|
|
40
38
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { CircularProgressProps } from './types.ts';
|
|
2
|
-
declare const CircularProgress: import("svelte").Component<CircularProgressProps, {}, "
|
|
2
|
+
declare const CircularProgress: import("svelte").Component<CircularProgressProps, {}, "">;
|
|
3
3
|
type CircularProgress = ReturnType<typeof CircularProgress>;
|
|
4
4
|
export default CircularProgress;
|
|
@@ -7,12 +7,9 @@
|
|
|
7
7
|
indeterminate = false,
|
|
8
8
|
fourColor = false,
|
|
9
9
|
buffer = 0,
|
|
10
|
-
element = $bindable(),
|
|
11
10
|
...attributes
|
|
12
11
|
}: LinearProgressProps = $props()
|
|
13
12
|
|
|
14
|
-
let progressStyles = $derived(`transform: scaleX(${(indeterminate ? 1 : value / max) * 100}%)`)
|
|
15
|
-
|
|
16
13
|
let bufferValue = $derived(buffer ?? 0)
|
|
17
14
|
let hasBuffer = $derived(bufferValue > 0)
|
|
18
15
|
|
|
@@ -23,7 +20,7 @@
|
|
|
23
20
|
let hideDots = $derived(indeterminate || !hasBuffer || bufferValue >= max || value >= max)
|
|
24
21
|
</script>
|
|
25
22
|
|
|
26
|
-
<div class="np-container"
|
|
23
|
+
<div class="np-container">
|
|
27
24
|
<div
|
|
28
25
|
{...attributes}
|
|
29
26
|
class={['progress', indeterminate && 'indeterminate', fourColor && 'four-color']}
|
|
@@ -34,7 +31,10 @@
|
|
|
34
31
|
>
|
|
35
32
|
<div class="dots" hidden={hideDots}></div>
|
|
36
33
|
<div class="inactive-track" style={dotStyles}></div>
|
|
37
|
-
<div
|
|
34
|
+
<div
|
|
35
|
+
class="bar primary-bar"
|
|
36
|
+
style={`transform: scaleX(${(indeterminate ? 1 : value / max) * 100}%)`}
|
|
37
|
+
>
|
|
38
38
|
<div class="bar-inner"></div>
|
|
39
39
|
</div>
|
|
40
40
|
<div class="bar secondary-bar">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LinearProgressProps } from './types.ts';
|
|
2
|
-
declare const LinearProgress: import("svelte").Component<LinearProgressProps, {}, "
|
|
2
|
+
declare const LinearProgress: import("svelte").Component<LinearProgressProps, {}, "">;
|
|
3
3
|
type LinearProgress = ReturnType<typeof LinearProgress>;
|
|
4
4
|
export default LinearProgress;
|
package/dist/progress/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noph-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://noph.dev",
|
|
6
6
|
"repository": {
|
|
@@ -68,27 +68,27 @@
|
|
|
68
68
|
"svelte": "^5.40.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@eslint/js": "^
|
|
71
|
+
"@eslint/js": "^10.0.1",
|
|
72
72
|
"@materialx/material-color-utilities": "^0.4.8",
|
|
73
|
-
"@playwright/test": "^1.
|
|
74
|
-
"@sveltejs/adapter-auto": "^7.0.
|
|
75
|
-
"@sveltejs/kit": "^2.
|
|
73
|
+
"@playwright/test": "^1.58.2",
|
|
74
|
+
"@sveltejs/adapter-auto": "^7.0.1",
|
|
75
|
+
"@sveltejs/kit": "^2.53.0",
|
|
76
76
|
"@sveltejs/package": "^2.5.7",
|
|
77
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
77
|
+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
78
78
|
"@types/eslint": "^9.6.1",
|
|
79
|
-
"eslint": "^
|
|
79
|
+
"eslint": "^10.0.2",
|
|
80
80
|
"eslint-config-prettier": "^10.1.8",
|
|
81
|
-
"eslint-plugin-svelte": "^3.
|
|
82
|
-
"globals": "^17.
|
|
83
|
-
"prettier": "^3.
|
|
84
|
-
"prettier-plugin-svelte": "^3.
|
|
85
|
-
"publint": "^0.3.
|
|
86
|
-
"svelte": "^5.
|
|
87
|
-
"svelte-check": "^4.3
|
|
81
|
+
"eslint-plugin-svelte": "^3.15.0",
|
|
82
|
+
"globals": "^17.3.0",
|
|
83
|
+
"prettier": "^3.8.1",
|
|
84
|
+
"prettier-plugin-svelte": "^3.5.0",
|
|
85
|
+
"publint": "^0.3.17",
|
|
86
|
+
"svelte": "^5.53.3",
|
|
87
|
+
"svelte-check": "^4.4.3",
|
|
88
88
|
"typescript": "^5.9.3",
|
|
89
|
-
"typescript-eslint": "^8.
|
|
89
|
+
"typescript-eslint": "^8.56.1",
|
|
90
90
|
"vite": "^7.3.1",
|
|
91
|
-
"vitest": "^4.0.
|
|
91
|
+
"vitest": "^4.0.18"
|
|
92
92
|
},
|
|
93
93
|
"svelte": "./dist/index.js",
|
|
94
94
|
"types": "./dist/index.d.ts",
|