@celar-ui/svelte 0.2.4 → 0.3.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.
@@ -16,10 +16,9 @@
16
16
 
17
17
  {#if rest.loading}
18
18
  <div class="button-spinner">
19
- <DotSpinner size="24px" color="var(--color-primary--text)" />
19
+ <DotSpinner size="24px" />
20
20
  </div>
21
21
  {/if}
22
22
  {/snippet}
23
23
 
24
24
  <BaseButton {...rest} children={baseChildren} data-button-icon />
25
-
@@ -28,7 +28,7 @@
28
28
 
29
29
  {#if loading}
30
30
  <div class="button-spinner">
31
- <DotSpinner size="24px" color="var(--color-primary--text)" />
31
+ <DotSpinner size="24px" />
32
32
  </div>
33
33
  {/if}
34
34
  {/snippet}
@@ -15,6 +15,7 @@
15
15
  user-select: none;
16
16
  text-decoration: none;
17
17
  -webkit-tap-highlight-color: transparent;
18
+ color: inherit;
18
19
 
19
20
  &:not(:disabled):active {
20
21
  top: 1px;
@@ -39,6 +39,7 @@
39
39
  width: 100%;
40
40
  font-size: inherit;
41
41
  font-family: inherit;
42
+ color: inherit;
42
43
  }
43
44
  [data-text-input] input:focus {
44
45
  outline: none;
@@ -63,11 +64,11 @@
63
64
  }
64
65
  [data-text-input] input::-moz-placeholder {
65
66
  opacity: 1;
66
- color: rgba(var(--color-text--rgb), 0.4);
67
+ color: rgba(var(--color-text--rgb), 0.5);
67
68
  }
68
69
  [data-text-input] input::placeholder {
69
70
  opacity: 1;
70
- color: rgba(var(--color-text--rgb), 0.4);
71
+ color: rgba(var(--color-text--rgb), 0.5);
71
72
  }
72
73
  [data-text-input] [data-text-input-icon] {
73
74
  display: flex;
@@ -87,7 +88,7 @@
87
88
  transition-duration: var(--transition-dur);
88
89
  transition-property: visibility, opacity, top, right, translate;
89
90
  pointer-events: none;
90
- color: rgba(var(--color-text--rgb), 0.4);
91
+ color: rgba(var(--color-text--rgb), 0.5);
91
92
  font-size: smaller;
92
93
  top: 0;
93
94
  right: var(--gap);
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- let { color = 'var(--color-primary--dark)', size }: { color?: string; size?: string } = $props();
2
+ let { color = 'currentColor', size }: { color?: string; size?: string } = $props();
3
3
  </script>
4
4
 
5
5
  <svg viewBox="0 0 57 60" xmlns="http://www.w3.org/2000/svg" stroke={color} style:width={size}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celar-ui/svelte",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "cuikho210",
@@ -29,6 +29,35 @@ $colors-theme: (
29
29
  color-bg-danger: #fff4ef
30
30
  ) !default;
31
31
 
32
+ // Dark theme colors
33
+ $colors-theme-dark: (
34
+ color-primary--text: #fff6f3,
35
+ color-primary--darker: #ffe5dc,
36
+ color-primary--dark: #ff907f,
37
+ color-primary: #d46a5b,
38
+ color-primary--light: #7f201b,
39
+ color-primary--lighter: #570000,
40
+
41
+ color-alt--text: #fff3f7,
42
+ color-alt--darker: #ffe3ec,
43
+ color-alt--dark: #f1afbb,
44
+ color-alt: #c48591,
45
+ color-alt--light: #8f1538,
46
+ color-alt--lighter: #481523,
47
+
48
+ color-text: #efefef,
49
+ color-text-info: #9191a3,
50
+ color-text-success: #7ab8a3,
51
+ color-text-warning: #bfa060,
52
+ color-text-danger: #b36a6a,
53
+
54
+ color-bg: #0a0a0a,
55
+ color-bg-info: #101a3b,
56
+ color-bg-success: #184d3a,
57
+ color-bg-warning: #4a3700,
58
+ color-bg-danger: #3a0007
59
+ ) !default;
60
+
32
61
  $colors-misc: (
33
62
  color-shadow--soft: rgba(0, 0, 0, 0.05),
34
63
  color-shadow--md: rgba(0, 0, 0, 0.075),
@@ -43,3 +72,9 @@ $colors-misc: (
43
72
  @include utils.generate_colors(config.$prefix, $colors-theme);
44
73
  @include utils.add_prefix(config.$prefix, $colors-misc);
45
74
  }
75
+
76
+ @media (prefers-color-scheme: dark) {
77
+ :root {
78
+ @include utils.generate_colors(config.$prefix, $colors-theme-dark);
79
+ }
80
+ }