@muraldevkit/ui-toolkit 2.46.0 → 2.47.1-dev.1
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/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -1
- package/dist/components/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +1 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/label/MrlLabel/MrlLabel.d.ts +3 -3
- package/dist/components/form/switch/MrlSwitch/MrlSwitch.d.ts +15 -0
- package/dist/components/form/switch/MrlSwitch/index.d.ts +1 -0
- package/dist/components/form/switch/MrlSwitchStandalone/MrlSwitchStandalone.d.ts +10 -0
- package/dist/components/form/switch/MrlSwitchStandalone/index.d.ts +1 -0
- package/dist/components/form/switch/index.d.ts +2 -0
- package/dist/components/menu/demo/MenuWithIconButtonTrigger.d.ts +19 -0
- package/dist/components/popover/demo/PopoverWithIconButton.d.ts +21 -0
- package/dist/hooks/useTriggerPosition/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/styles/MrlSwitch/module.scss +9 -0
- package/dist/styles/MrlSwitchStandalone/module.scss +81 -0
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@use '@muraldevkit/ds-foundation/src/styles/_mixins' as *;
|
|
2
|
+
.MrlSwitchStandalone {
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
.MrlSwitchStandalone-switch {
|
|
7
|
+
background-color: rgba(var(--mrl-gray-80), 1);
|
|
8
|
+
border-radius: 0.625rem;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
display: block;
|
|
11
|
+
height: var(--mrl-spacing-06);
|
|
12
|
+
width: calc(var(--mrl-spacing-08) + var(--mrl-spacing-02));
|
|
13
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
14
|
+
transition: var(--mrl-duration-02);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.MrlSwitchStandalone-switch-indicator {
|
|
18
|
+
align-content: center;
|
|
19
|
+
background-color: var(--mrl-color-background);
|
|
20
|
+
border-radius: 0.375rem;
|
|
21
|
+
bottom: calc(var(--mrl-spacing-03) - var(--mrl-spacing-02));
|
|
22
|
+
color: var(--mrl-color-background-secondary);
|
|
23
|
+
display: flex;
|
|
24
|
+
height: var(--mrl-spacing-04);
|
|
25
|
+
left: var(--mrl-spacing-02);
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
position: absolute;
|
|
28
|
+
width: var(--mrl-spacing-04);
|
|
29
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
30
|
+
transition: var(--mrl-duration-02) var(--mrl-timing-m1);
|
|
31
|
+
}
|
|
32
|
+
.mrl-svg {
|
|
33
|
+
height: var(--mrl-spacing-04);
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
width: var(--mrl-spacing-04);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.MrlSwitchStandalone-checkbox {
|
|
39
|
+
height: var(--mrl-spacing-06);
|
|
40
|
+
opacity: 0;
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: calc(var(--mrl-spacing-08) + var(--mrl-spacing-02));
|
|
43
|
+
&:hover + .MrlSwitchStandalone-switch {
|
|
44
|
+
background-color: rgba(var(--mrl-gray-90), 1);
|
|
45
|
+
}
|
|
46
|
+
&:active + .MrlSwitchStandalone-switch {
|
|
47
|
+
background-color: rgba(var(--mrl-gray-100), 1);
|
|
48
|
+
}
|
|
49
|
+
&:disabled {
|
|
50
|
+
+ .MrlSwitchStandalone-switch,
|
|
51
|
+
&:hover + .MrlSwitchStandalone-switch {
|
|
52
|
+
background-color: rgba(var(--mrl-gray-40), 1);
|
|
53
|
+
}
|
|
54
|
+
~ .MrlSwitchStandalone-switch-indicator {
|
|
55
|
+
color: rgba(var(--mrl-gray-40), 1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
&:focus-visible + .MrlSwitchStandalone-switch::after {
|
|
59
|
+
@include mrl-focus-pseudo-element;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.MrlSwitchStandalone-checkbox:checked {
|
|
63
|
+
+ .MrlSwitchStandalone-switch {
|
|
64
|
+
background-color: rgba(var(--mrl-blue-70), 1);
|
|
65
|
+
}
|
|
66
|
+
~ .MrlSwitchStandalone-switch-indicator {
|
|
67
|
+
$switch-knob-on-position: calc(var(--mrl-spacing-08) - var(--mrl-spacing-05));
|
|
68
|
+
color: rgba(var(--mrl-blue-70), 1);
|
|
69
|
+
transform: translateX($switch-knob-on-position);
|
|
70
|
+
}
|
|
71
|
+
&:hover + .MrlSwitchStandalone-switch {
|
|
72
|
+
background-color: rgba(var(--mrl-blue-80), 1);
|
|
73
|
+
}
|
|
74
|
+
&:active + .MrlSwitchStandalone-switch {
|
|
75
|
+
background-color: rgba(var(--mrl-blue-90), 1);
|
|
76
|
+
}
|
|
77
|
+
&:disabled + .MrlSwitchStandalone-switch,
|
|
78
|
+
&:disabled:hover + .MrlSwitchStandalone-switch {
|
|
79
|
+
background-color: rgba(var(--mrl-gray-40), 1);
|
|
80
|
+
}
|
|
81
|
+
}
|