@marianmeres/stuic 2.65.0 → 2.66.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.
@@ -1,4 +1,5 @@
1
1
  <script lang="ts" module>
2
+ import { DevicePointer, twMerge } from "../../index.js";
2
3
  export interface Props {
3
4
  class?: string;
4
5
  strokeWidth?: 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4;
@@ -6,9 +7,13 @@
6
7
  </script>
7
8
 
8
9
  <script lang="ts">
9
- import { twMerge } from "../../index.js";
10
+ let { class: classProps, strokeWidth }: Props = $props();
10
11
 
11
- let { class: classProps, strokeWidth = 3 }: Props = $props();
12
+ const dp = new DevicePointer();
13
+ const auto = $derived(dp.isCoarse ? 3 : 2);
14
+
15
+ // if sw not provided use thicker on mobile
16
+ const _strokeWidth = $derived(strokeWidth ?? auto);
12
17
 
13
18
  // size-6 = 1.5rem = 24px
14
19
  </script>
@@ -16,7 +21,7 @@
16
21
  <svg
17
22
  fill="none"
18
23
  viewBox="0 0 24 24"
19
- stroke-width={strokeWidth}
24
+ stroke-width={_strokeWidth}
20
25
  stroke="currentColor"
21
26
  class={twMerge("inline size-6", classProps)}
22
27
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "2.65.0",
3
+ "version": "2.66.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",