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.
@@ -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" bind:this={element}>
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={dashOffset}></circle>
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, {}, "element">;
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" bind:this={element}>
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 class="bar primary-bar" style={progressStyles}>
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, {}, "element">;
2
+ declare const LinearProgress: import("svelte").Component<LinearProgressProps, {}, "">;
3
3
  type LinearProgress = ReturnType<typeof LinearProgress>;
4
4
  export default LinearProgress;
@@ -4,7 +4,6 @@ export interface CircularProgressProps {
4
4
  indeterminate?: boolean;
5
5
  fourColor?: boolean;
6
6
  'aria-label'?: string | undefined | null;
7
- element?: HTMLDivElement;
8
7
  }
9
8
  export interface LinearProgressProps extends CircularProgressProps {
10
9
  buffer?: number;
@@ -20,6 +20,7 @@
20
20
 
21
21
  <style>
22
22
  .vertical {
23
- appearance: slider-vertical;
23
+ writing-mode: vertical-lr;
24
+ direction: rtl;
24
25
  }
25
26
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noph-ui",
3
- "version": "0.31.6",
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": "^9.39.2",
71
+ "@eslint/js": "^10.0.1",
72
72
  "@materialx/material-color-utilities": "^0.4.8",
73
- "@playwright/test": "^1.57.0",
74
- "@sveltejs/adapter-auto": "^7.0.0",
75
- "@sveltejs/kit": "^2.49.4",
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": "^6.2.4",
77
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
78
78
  "@types/eslint": "^9.6.1",
79
- "eslint": "^9.39.2",
79
+ "eslint": "^10.0.2",
80
80
  "eslint-config-prettier": "^10.1.8",
81
- "eslint-plugin-svelte": "^3.14.0",
82
- "globals": "^17.0.0",
83
- "prettier": "^3.7.4",
84
- "prettier-plugin-svelte": "^3.4.1",
85
- "publint": "^0.3.16",
86
- "svelte": "^5.46.3",
87
- "svelte-check": "^4.3.5",
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.53.0",
89
+ "typescript-eslint": "^8.56.1",
90
90
  "vite": "^7.3.1",
91
- "vitest": "^4.0.17"
91
+ "vitest": "^4.0.18"
92
92
  },
93
93
  "svelte": "./dist/index.js",
94
94
  "types": "./dist/index.d.ts",