@react-cupertino-ui/alert 2.0.2 → 2.0.3

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/index.scss CHANGED
@@ -1,5 +1,5 @@
1
- @use "@/styles/mixins/glass" as glass;
2
- @use "@/styles/mixins/animations" as motion;
1
+ @use "./styles/mixins/glass" as glass;
2
+ @use "./styles/mixins/animations" as motion;
3
3
 
4
4
  .react-cupertino-ui-alert {
5
5
  --alert-accent: var(--color-blue, #0a84ff);
@@ -0,0 +1,21 @@
1
+ @mixin spring-transition($property: all, $duration: var(--spring-duration, 500ms)) {
2
+ transition-property: $property;
3
+ transition-duration: $duration;
4
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
5
+ }
6
+
7
+ @mixin pressable($scale: 0.97) {
8
+ will-change: transform;
9
+ transition: transform var(--pressable-duration, 220ms)
10
+ cubic-bezier(0.2, 0, 0.2, 1),
11
+ filter var(--pressable-duration, 220ms) cubic-bezier(0.2, 0, 0.2, 1);
12
+
13
+ &:active {
14
+ transform: scale($scale);
15
+ filter: brightness(0.98);
16
+ }
17
+ }
18
+
19
+ @mixin elevate($shadow: var(--glass-shadow, 0 8px 32px rgba(0, 0, 0, 0.12))) {
20
+ box-shadow: $shadow;
21
+ }
@@ -0,0 +1,76 @@
1
+ $glass-default-blur: var(--glass-blur, 40px);
2
+ $glass-default-saturation: var(--glass-saturation, 180%);
3
+ $glass-light-border: var(--glass-border, rgba(255, 255, 255, 0.18));
4
+ $glass-dark-border: var(--glass-border-dark, rgba(255, 255, 255, 0.12));
5
+ $glass-shadow: var(--glass-shadow, 0 8px 32px rgba(0, 0, 0, 0.12));
6
+ $glass-highlight: var(
7
+ --glass-highlight,
8
+ linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 55%)
9
+ );
10
+
11
+ @mixin glass-panel($mode: light, $blur: $glass-default-blur, $opacity: null) {
12
+ $surface-opacity: $opacity;
13
+ $background: null;
14
+ $border-color: null;
15
+
16
+ @if $mode == dark {
17
+ $bg-opacity: $surface-opacity;
18
+ @if $surface-opacity == null {
19
+ $bg-opacity: var(--glass-opacity-dark, 0.45);
20
+ }
21
+ $background: rgba(16, 16, 16, $bg-opacity);
22
+ $border-color: $glass-dark-border;
23
+ } @else {
24
+ $bg-opacity: $surface-opacity;
25
+ @if $surface-opacity == null {
26
+ $bg-opacity: var(--glass-opacity, 0.7);
27
+ }
28
+ $background: rgba(255, 255, 255, $bg-opacity);
29
+ $border-color: $glass-light-border;
30
+ }
31
+
32
+ background: $background;
33
+ backdrop-filter: blur($blur) saturate($glass-default-saturation);
34
+ -webkit-backdrop-filter: blur($blur) saturate($glass-default-saturation);
35
+ border: 1px solid $border-color;
36
+ box-shadow: $glass-shadow;
37
+ position: relative;
38
+ overflow: hidden;
39
+
40
+ &::before {
41
+ content: "";
42
+ position: absolute;
43
+ inset: 0;
44
+ background: $glass-highlight;
45
+ border-radius: inherit;
46
+ opacity: var(--glass-highlight-opacity, 0.95);
47
+ pointer-events: none;
48
+ mix-blend-mode: screen;
49
+ }
50
+ }
51
+
52
+ @mixin glass-border($mode: light) {
53
+ $border-color: $glass-light-border;
54
+ @if $mode == dark {
55
+ $border-color: $glass-dark-border;
56
+ }
57
+ border: 1px solid $border-color;
58
+ box-shadow: $glass-shadow;
59
+ }
60
+
61
+ @mixin glass-refraction($angle: 135deg) {
62
+ &::after {
63
+ content: "";
64
+ position: absolute;
65
+ inset: 0;
66
+ background: linear-gradient(
67
+ $angle,
68
+ rgba(255, 255, 255, 0.3) 0%,
69
+ rgba(255, 255, 255, 0.1) 28%,
70
+ transparent 60%
71
+ );
72
+ border-radius: inherit;
73
+ pointer-events: none;
74
+ mix-blend-mode: soft-light;
75
+ }
76
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-cupertino-ui/alert",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Alert component from React Cupertino UI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",