@snack-uikit/toggles 0.10.4 → 0.10.5-preview-1f246c4a.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.
- package/dist/cjs/components/Checkbox/Checkbox.js +78 -0
- package/dist/cjs/components/Checkbox/index.js +25 -0
- package/dist/cjs/components/Favorite/Favorite.js +64 -0
- package/dist/cjs/components/Favorite/index.js +25 -0
- package/dist/cjs/components/Radio/Radio.js +50 -0
- package/dist/cjs/components/Radio/index.js +25 -0
- package/dist/cjs/components/Switch/Switch.js +71 -0
- package/dist/cjs/components/Switch/index.js +25 -0
- package/dist/cjs/components/ToggleGroup/ToggleGroup.js +51 -0
- package/dist/cjs/components/ToggleGroup/hooks.js +36 -0
- package/dist/cjs/components/ToggleGroup/index.js +26 -0
- package/dist/cjs/components/TogglePrivate/TogglePrivate.js +77 -0
- package/dist/cjs/components/TogglePrivate/index.js +25 -0
- package/dist/cjs/components/index.js +29 -0
- package/dist/cjs/constants.js +22 -0
- package/dist/cjs/context.js +15 -0
- package/dist/cjs/helperComponents/Spinner/Spinner.js +27 -0
- package/dist/cjs/helperComponents/Spinner/index.js +25 -0
- package/dist/cjs/helperComponents/index.js +25 -0
- package/dist/cjs/index.js +25 -0
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/utils.js +28 -0
- package/dist/esm/components/Checkbox/Checkbox.d.ts +8 -0
- package/dist/esm/components/Checkbox/index.js +1 -0
- package/dist/esm/components/Favorite/Favorite.d.ts +6 -0
- package/dist/esm/components/Favorite/index.js +1 -0
- package/dist/esm/components/Radio/Radio.d.ts +3 -0
- package/dist/esm/components/Radio/index.js +1 -0
- package/dist/esm/components/Switch/Switch.d.ts +7 -0
- package/dist/esm/components/Switch/index.js +1 -0
- package/dist/esm/components/ToggleGroup/ToggleGroup.d.ts +22 -0
- package/dist/esm/components/ToggleGroup/hooks.d.ts +9 -0
- package/dist/esm/components/ToggleGroup/index.js +2 -0
- package/dist/esm/components/TogglePrivate/TogglePrivate.d.ts +20 -0
- package/dist/esm/components/TogglePrivate/index.js +1 -0
- package/dist/esm/components/index.js +5 -0
- package/dist/esm/constants.d.ts +16 -0
- package/dist/esm/context.d.ts +9 -0
- package/dist/esm/helperComponents/Spinner/Spinner.d.ts +1 -0
- package/dist/esm/helperComponents/index.d.ts +1 -0
- package/dist/esm/helperComponents/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/types.d.ts +51 -0
- package/dist/esm/utils.d.ts +3 -0
- package/package.json +9 -7
- package/dist/components/Checkbox/styles.module.css +0 -89
- package/dist/components/Favorite/styles.module.css +0 -50
- package/dist/components/Radio/styles.module.css +0 -90
- package/dist/components/Switch/styles.module.css +0 -159
- package/dist/components/TogglePrivate/styles.module.css +0 -30
- package/dist/components/styles.module.css +0 -0
- package/dist/helperComponents/Spinner/styles.module.css +0 -14
- /package/dist/{components → cjs/components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{components → cjs/components}/Checkbox/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/Favorite/Favorite.d.ts +0 -0
- /package/dist/{components → cjs/components}/Favorite/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/Radio/Radio.d.ts +0 -0
- /package/dist/{components → cjs/components}/Radio/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/Switch/Switch.d.ts +0 -0
- /package/dist/{components → cjs/components}/Switch/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/ToggleGroup/ToggleGroup.d.ts +0 -0
- /package/dist/{components → cjs/components}/ToggleGroup/hooks.d.ts +0 -0
- /package/dist/{components → cjs/components}/ToggleGroup/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/TogglePrivate/TogglePrivate.d.ts +0 -0
- /package/dist/{components → cjs/components}/TogglePrivate/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/index.d.ts +0 -0
- /package/dist/{constants.d.ts → cjs/constants.d.ts} +0 -0
- /package/dist/{context.d.ts → cjs/context.d.ts} +0 -0
- /package/dist/{helperComponents → cjs/helperComponents}/Spinner/Spinner.d.ts +0 -0
- /package/dist/{helperComponents → cjs/helperComponents}/Spinner/index.d.ts +0 -0
- /package/dist/{helperComponents → cjs/helperComponents}/index.d.ts +0 -0
- /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/{types.d.ts → cjs/types.d.ts} +0 -0
- /package/dist/{utils.d.ts → cjs/utils.d.ts} +0 -0
- /package/dist/{components → esm/components}/Checkbox/Checkbox.js +0 -0
- /package/dist/{components/Checkbox/index.js → esm/components/Checkbox/index.d.ts} +0 -0
- /package/dist/{components → esm/components}/Favorite/Favorite.js +0 -0
- /package/dist/{components/Favorite/index.js → esm/components/Favorite/index.d.ts} +0 -0
- /package/dist/{components → esm/components}/Radio/Radio.js +0 -0
- /package/dist/{components/Radio/index.js → esm/components/Radio/index.d.ts} +0 -0
- /package/dist/{components → esm/components}/Switch/Switch.js +0 -0
- /package/dist/{components/Switch/index.js → esm/components/Switch/index.d.ts} +0 -0
- /package/dist/{components → esm/components}/ToggleGroup/ToggleGroup.js +0 -0
- /package/dist/{components → esm/components}/ToggleGroup/hooks.js +0 -0
- /package/dist/{components/ToggleGroup/index.js → esm/components/ToggleGroup/index.d.ts} +0 -0
- /package/dist/{components → esm/components}/TogglePrivate/TogglePrivate.js +0 -0
- /package/dist/{components/TogglePrivate/index.js → esm/components/TogglePrivate/index.d.ts} +0 -0
- /package/dist/{components/index.js → esm/components/index.d.ts} +0 -0
- /package/dist/{constants.js → esm/constants.js} +0 -0
- /package/dist/{context.js → esm/context.js} +0 -0
- /package/dist/{helperComponents → esm/helperComponents}/Spinner/Spinner.js +0 -0
- /package/dist/{helperComponents/Spinner/index.js → esm/helperComponents/Spinner/index.d.ts} +0 -0
- /package/dist/{helperComponents → esm/helperComponents/Spinner}/index.js +0 -0
- /package/dist/{index.js → esm/index.d.ts} +0 -0
- /package/dist/{types.js → esm/types.js} +0 -0
- /package/dist/{utils.js → esm/utils.js} +0 -0
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
.container{
|
|
2
|
-
display:flex;
|
|
3
|
-
align-items:center;
|
|
4
|
-
justify-content:center;
|
|
5
|
-
box-sizing:border-box;
|
|
6
|
-
}
|
|
7
|
-
.container[data-size=s]{
|
|
8
|
-
width:var(--size-toggles-s-container-switch-width, 24px);
|
|
9
|
-
height:var(--size-toggles-s-container, 16px);
|
|
10
|
-
border-radius:var(--radius-toggles-s-box-switch, 16px);
|
|
11
|
-
}
|
|
12
|
-
.container[data-size=m]{
|
|
13
|
-
width:var(--size-toggles-m-container-switch-width, 36px);
|
|
14
|
-
height:var(--size-toggles-m-container, 24px);
|
|
15
|
-
border-radius:var(--radius-toggles-m-box-switch, 16px);
|
|
16
|
-
}
|
|
17
|
-
.container[data-focusvisible=true]{
|
|
18
|
-
outline-width:var(--border-state-focus-s-border-width, 2px);
|
|
19
|
-
outline-style:var(--border-state-focus-s-border-style, solid);
|
|
20
|
-
outline-color:var(--border-state-focus-s-border-color, );
|
|
21
|
-
}
|
|
22
|
-
.container[data-focusvisible=true][data-size=s]{
|
|
23
|
-
outline-offset:var(--border-width-state-focus-s, 2px);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.box{
|
|
27
|
-
position:relative;
|
|
28
|
-
background-color:var(--sys-neutral-decor-activated, #bec2cf);
|
|
29
|
-
}
|
|
30
|
-
.box[data-size=s]{
|
|
31
|
-
width:var(--size-toggles-s-box-switch-width, 24px);
|
|
32
|
-
height:var(--size-toggles-s-box-switch-height, 16px);
|
|
33
|
-
border-radius:var(--radius-toggles-s-box-switch, 16px);
|
|
34
|
-
}
|
|
35
|
-
.box[data-size=m]{
|
|
36
|
-
width:var(--size-toggles-m-box-switch-width, 32px);
|
|
37
|
-
height:var(--size-toggles-m-box-switch-height, 20px);
|
|
38
|
-
border-radius:var(--radius-toggles-m-box-switch, 16px);
|
|
39
|
-
}
|
|
40
|
-
.box[data-hover=true]{
|
|
41
|
-
background-color:var(--sys-neutral-accent-hovered, #6d707f);
|
|
42
|
-
}
|
|
43
|
-
.box[data-disabled=true]{
|
|
44
|
-
background-color:var(--sys-neutral-decor-default, #dde0ea);
|
|
45
|
-
}
|
|
46
|
-
.box[data-checked=true]{
|
|
47
|
-
background-color:var(--sys-primary-accent-default, #794ed3);
|
|
48
|
-
}
|
|
49
|
-
.box[data-checked=true][data-hover=true]{
|
|
50
|
-
background-color:var(--sys-primary-accent-hovered, #6851a6);
|
|
51
|
-
}
|
|
52
|
-
.box[data-checked=true][data-disabled=true]{
|
|
53
|
-
background-color:var(--sys-neutral-decor-default, #dde0ea);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.containerFlag{
|
|
57
|
-
position:absolute;
|
|
58
|
-
left:0;
|
|
59
|
-
display:flex;
|
|
60
|
-
align-items:center;
|
|
61
|
-
justify-content:center;
|
|
62
|
-
transition-timing-function:linear;
|
|
63
|
-
transition-duration:0.1s;
|
|
64
|
-
transition-property:left;
|
|
65
|
-
}
|
|
66
|
-
.containerFlag[data-size=s]{
|
|
67
|
-
width:var(--size-toggles-s-container, 16px);
|
|
68
|
-
height:var(--size-toggles-s-container, 16px);
|
|
69
|
-
}
|
|
70
|
-
.containerFlag[data-size=s][data-checked=true]{
|
|
71
|
-
left:calc(100% - var(--size-toggles-s-container, 16px));
|
|
72
|
-
}
|
|
73
|
-
.containerFlag[data-size=m]{
|
|
74
|
-
width:var(--size-toggles-m-container, 24px);
|
|
75
|
-
height:var(--size-toggles-m-container, 24px);
|
|
76
|
-
}
|
|
77
|
-
.containerFlag[data-size=m][data-checked=true]{
|
|
78
|
-
left:calc(100% - var(--size-toggles-m-container, 24px));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.flag{
|
|
82
|
-
background-color:var(--sys-neutral-background2-level, #ffffff);
|
|
83
|
-
}
|
|
84
|
-
.flag[data-size=s]{
|
|
85
|
-
border-radius:var(--radius-toggles-s-box-switch, 16px);
|
|
86
|
-
width:var(--size-toggles-s-flag-switch, 12px);
|
|
87
|
-
height:var(--size-toggles-s-flag-switch, 12px);
|
|
88
|
-
}
|
|
89
|
-
.flag[data-size=m]{
|
|
90
|
-
border-radius:var(--radius-toggles-m-box-switch, 16px);
|
|
91
|
-
width:var(--size-toggles-m-flag-switch, 16px);
|
|
92
|
-
height:var(--size-toggles-m-flag-switch, 16px);
|
|
93
|
-
}
|
|
94
|
-
.flag[data-focusvisible=true], .flag[data-hover=true]{
|
|
95
|
-
background-color:var(--sys-neutral-on-accent, #ffffff);
|
|
96
|
-
}
|
|
97
|
-
.flag[data-disabled=true]{
|
|
98
|
-
background-color:var(--sys-neutral-background2-level, #ffffff);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.flag_icon_off{
|
|
102
|
-
position:absolute;
|
|
103
|
-
top:50%;
|
|
104
|
-
left:50%;
|
|
105
|
-
transform:translate(-50%, -50%);
|
|
106
|
-
display:flex;
|
|
107
|
-
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
108
|
-
fill:transparent;
|
|
109
|
-
transition:opacity 0.1s linear;
|
|
110
|
-
opacity:1;
|
|
111
|
-
}
|
|
112
|
-
.flag_icon_off[data-hover=true]{
|
|
113
|
-
color:var(--sys-neutral-accent-hovered, #6d707f);
|
|
114
|
-
}
|
|
115
|
-
.flag_icon_off[data-checked=true]{
|
|
116
|
-
color:var(--sys-primary-accent-default, #794ed3);
|
|
117
|
-
}
|
|
118
|
-
.flag_icon_off[data-checked=true][data-hover=true]{
|
|
119
|
-
color:var(--sys-primary-accent-hovered, #6851a6);
|
|
120
|
-
}
|
|
121
|
-
.flag_icon_off[data-disabled=true]{
|
|
122
|
-
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
123
|
-
}
|
|
124
|
-
.flag_icon_off[data-disabled=true][data-hover=true]{
|
|
125
|
-
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
126
|
-
}
|
|
127
|
-
.flag_icon_off[data-checked=true]{
|
|
128
|
-
opacity:0;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.flag_icon_on{
|
|
132
|
-
position:absolute;
|
|
133
|
-
top:50%;
|
|
134
|
-
left:50%;
|
|
135
|
-
transform:translate(-50%, -50%);
|
|
136
|
-
display:flex;
|
|
137
|
-
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
138
|
-
fill:transparent;
|
|
139
|
-
transition:opacity 0.1s linear;
|
|
140
|
-
opacity:0;
|
|
141
|
-
}
|
|
142
|
-
.flag_icon_on[data-hover=true]{
|
|
143
|
-
color:var(--sys-neutral-accent-hovered, #6d707f);
|
|
144
|
-
}
|
|
145
|
-
.flag_icon_on[data-checked=true]{
|
|
146
|
-
color:var(--sys-primary-accent-default, #794ed3);
|
|
147
|
-
}
|
|
148
|
-
.flag_icon_on[data-checked=true][data-hover=true]{
|
|
149
|
-
color:var(--sys-primary-accent-hovered, #6851a6);
|
|
150
|
-
}
|
|
151
|
-
.flag_icon_on[data-disabled=true]{
|
|
152
|
-
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
153
|
-
}
|
|
154
|
-
.flag_icon_on[data-disabled=true][data-hover=true]{
|
|
155
|
-
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
156
|
-
}
|
|
157
|
-
.flag_icon_on[data-checked=true]{
|
|
158
|
-
opacity:1;
|
|
159
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.toggleLayout{
|
|
2
|
-
cursor:pointer;
|
|
3
|
-
position:relative;
|
|
4
|
-
display:inline-flex;
|
|
5
|
-
flex-direction:row;
|
|
6
|
-
flex-grow:0;
|
|
7
|
-
flex-shrink:0;
|
|
8
|
-
align-items:center;
|
|
9
|
-
}
|
|
10
|
-
.toggleLayout[data-disabled=true]{
|
|
11
|
-
cursor:not-allowed;
|
|
12
|
-
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.togglePrivate{
|
|
16
|
-
cursor:pointer;
|
|
17
|
-
position:absolute;
|
|
18
|
-
top:0;
|
|
19
|
-
right:0;
|
|
20
|
-
bottom:0;
|
|
21
|
-
left:0;
|
|
22
|
-
width:100%;
|
|
23
|
-
height:100%;
|
|
24
|
-
margin:0;
|
|
25
|
-
padding:0;
|
|
26
|
-
opacity:0;
|
|
27
|
-
}
|
|
28
|
-
.togglePrivate:disabled{
|
|
29
|
-
cursor:not-allowed;
|
|
30
|
-
}
|
|
File without changes
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
.spinner{
|
|
2
|
-
pointer-events:none;
|
|
3
|
-
width:var(--dimension-2m, 16px);
|
|
4
|
-
height:var(--dimension-2m, 16px);
|
|
5
|
-
animation:spin 1s ease-in-out infinite;
|
|
6
|
-
}
|
|
7
|
-
.spinner > path{
|
|
8
|
-
stroke:currentColor;
|
|
9
|
-
}
|
|
10
|
-
@keyframes spin{
|
|
11
|
-
to{
|
|
12
|
-
transform:rotate(360deg);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|