@empathyco/x-design-system 0.0.2-alpha.2 → 0.0.2-alpha.20
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/attach.css +55 -0
- package/dist/components/badge.css +18 -122
- package/dist/components/button-group.css +25 -0
- package/dist/components/button.css +277 -0
- package/dist/components/filter-facet.css +129 -0
- package/dist/components/highlight.css +9 -0
- package/dist/components/icon.css +72 -0
- package/dist/components/index.css +16 -0
- package/dist/components/input-group.css +202 -0
- package/dist/components/input.css +82 -0
- package/dist/components/picture.css +27 -0
- package/dist/components/progress-bar.css +30 -0
- package/dist/components/scroll.css +27 -0
- package/dist/components/sliding-panel.css +141 -0
- package/dist/components/suggestion-group.css +121 -0
- package/dist/components/suggestion.css +53 -0
- package/dist/components/tag.css +195 -0
- package/dist/components/typography.css +74 -0
- package/dist/demo/assets/index-CpUa8rRK.css +1 -0
- package/dist/demo/assets/index-DS7bAgX8.js +1 -0
- package/dist/demo/index.html +2 -2
- package/dist/theme.css +37 -22
- package/dist/variants.css +5 -1
- package/package.json +6 -5
- package/dist/demo/assets/index-BTAoZXit.js +0 -1
- package/dist/demo/assets/index-DJ1imPdg.css +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* Base */
|
|
2
|
+
@utility icon {
|
|
3
|
+
@apply xds:flex xds:items-center xds:justify-center xds:flex-none;
|
|
4
|
+
@apply xds:font-family-icon xds:w-auto xds:aspect-square;
|
|
5
|
+
vector-effect: non-scaling-stroke;
|
|
6
|
+
|
|
7
|
+
/* `@apply xds:icon-md;` can not be use here because cause circular dependency. */
|
|
8
|
+
@apply xds:h-16 xds:text-[14px];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Offset */
|
|
12
|
+
/* This utility can be used like:
|
|
13
|
+
* @utility suggestion {
|
|
14
|
+
* & .xds\:icon {
|
|
15
|
+
* @apply xds:icon-offset;
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
@utility icon-offset {
|
|
20
|
+
--iconVerticalOffset: calc(50% - 0.5ex - 1px);
|
|
21
|
+
font-size: initial;
|
|
22
|
+
transform: translateY(var(--iconVerticalOffset, 0));
|
|
23
|
+
margin-top: calc(var(--iconVerticalOffset) * -1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Sizes */
|
|
27
|
+
@utility icon-sm {
|
|
28
|
+
@apply xds:h-8;
|
|
29
|
+
@apply xds:text-[7px];
|
|
30
|
+
}
|
|
31
|
+
@utility icon-md {
|
|
32
|
+
@apply xds:h-16;
|
|
33
|
+
@apply xds:text-[14px];
|
|
34
|
+
}
|
|
35
|
+
@utility icon-lg {
|
|
36
|
+
@apply xds:h-24;
|
|
37
|
+
@apply xds:text-[20px];
|
|
38
|
+
}
|
|
39
|
+
@utility icon-xl {
|
|
40
|
+
@apply xds:h-32;
|
|
41
|
+
@apply xds:text-[28px];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Sharp */
|
|
45
|
+
@utility icon-sharp {
|
|
46
|
+
& > * {
|
|
47
|
+
stroke-linecap: square;
|
|
48
|
+
stroke-linejoin: miter;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Stroke width */
|
|
53
|
+
@utility icon-stroke-width-* {
|
|
54
|
+
& > * {
|
|
55
|
+
stroke-width: --value(--stroke-width- *);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Colors */
|
|
60
|
+
@utility icon-* {
|
|
61
|
+
color: --value(--color- *);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Background colors */
|
|
65
|
+
@utility icon-bg-* {
|
|
66
|
+
& > [stroke='#fff'] {
|
|
67
|
+
stroke: --value(--color- *);
|
|
68
|
+
}
|
|
69
|
+
& > [fill='#fff'] {
|
|
70
|
+
fill: --value(--color- *);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1 +1,17 @@
|
|
|
1
|
+
@import './attach.css';
|
|
1
2
|
@import './badge.css';
|
|
3
|
+
@import './button.css';
|
|
4
|
+
@import './button-group.css';
|
|
5
|
+
@import './filter-facet.css';
|
|
6
|
+
@import './highlight.css';
|
|
7
|
+
@import './icon.css';
|
|
8
|
+
@import './input.css';
|
|
9
|
+
@import './input-group.css';
|
|
10
|
+
@import './picture.css';
|
|
11
|
+
@import './progress-bar.css';
|
|
12
|
+
@import './scroll.css';
|
|
13
|
+
@import './sliding-panel.css';
|
|
14
|
+
@import './suggestion.css';
|
|
15
|
+
@import './suggestion-group.css';
|
|
16
|
+
@import './tag.css';
|
|
17
|
+
@import './typography.css';
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* Base */
|
|
2
|
+
@utility input-group {
|
|
3
|
+
@apply xds:input;
|
|
4
|
+
@apply xds:flex xds:flex-row xds:flex-nowrap xds:items-center xds:content-center;
|
|
5
|
+
@apply xds:ps-0 xds:pe-0 xds:gap-8 xds:overflow-hidden;
|
|
6
|
+
@apply xds:border-neutral-25 xds:bg-neutral-10 xds:text-neutral-50;
|
|
7
|
+
|
|
8
|
+
& > :first-child:not(.xds\:input-group-button-primary) {
|
|
9
|
+
@apply xds:ms-16;
|
|
10
|
+
}
|
|
11
|
+
& > :last-child:not(.xds\:input-group-button-primary) {
|
|
12
|
+
@apply xds:me-16;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
& > .xds\:input,
|
|
16
|
+
& > input {
|
|
17
|
+
@apply xds:flex-1 xds:min-w-0 xds:p-0 xds:border-0;
|
|
18
|
+
@apply xds:bg-transparent xds:text-inherit xds:outline-none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Sizes */
|
|
23
|
+
@utility input-group-sm {
|
|
24
|
+
@apply xds:input-sm;
|
|
25
|
+
|
|
26
|
+
& > .xds\:input-group-button {
|
|
27
|
+
@apply xds:text-xs;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
& > .xds\:input-group-button-primary {
|
|
31
|
+
@apply xds:text-sm;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
& > .xds\:input-group-button-rectangle {
|
|
35
|
+
@apply xds:ps-12 xds:pe-12;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
@utility input-group-md {
|
|
39
|
+
@apply xds:input-md;
|
|
40
|
+
|
|
41
|
+
& > .xds\:input-group-button {
|
|
42
|
+
@apply xds:text-sm;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& > .xds\:input-group-button-primary {
|
|
46
|
+
@apply xds:text-sm;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
& > .xds\:input-group-button-rectangle {
|
|
50
|
+
@apply xds:ps-16 xds:pe-16;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
@utility input-group-lg {
|
|
54
|
+
@apply xds:input-lg;
|
|
55
|
+
|
|
56
|
+
& > .xds\:input-group-button {
|
|
57
|
+
@apply xds:text-sm;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
& > .xds\:input-group-button-primary {
|
|
61
|
+
@apply xds:text-md;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& > .xds\:input-group-button-rectangle {
|
|
65
|
+
@apply xds:ps-20 xds:pe-20;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Line */
|
|
70
|
+
@utility input-group-line {
|
|
71
|
+
@apply xds:input-line;
|
|
72
|
+
|
|
73
|
+
@variant disabled {
|
|
74
|
+
@apply xds:bg-none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
& > .xds\:input-group-button {
|
|
78
|
+
@apply xds:h-32;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.xds\:input-group-sm {
|
|
82
|
+
@apply xds:pb-4;
|
|
83
|
+
|
|
84
|
+
& > .xds\:input-group-button {
|
|
85
|
+
@apply xds:h-28;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
& > .xds\:input-group-button-primary:first-child {
|
|
90
|
+
@apply xds:border-s;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
& > .xds\:input-group-button-primary:first-child {
|
|
94
|
+
@apply xds:border-e;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Input Group Button */
|
|
99
|
+
@utility input-group-button {
|
|
100
|
+
@apply xds:button;
|
|
101
|
+
@apply xds:h-full xds:p-0 xds:aspect-square;
|
|
102
|
+
@apply xds:font-regular xds:text-sm;
|
|
103
|
+
@apply xds:border-transparent xds:bg-transparent xds:text-neutral-50;
|
|
104
|
+
|
|
105
|
+
@variant hover-active-focus {
|
|
106
|
+
@apply xds:border-transparent xds:bg-transparent xds:text-neutral-75;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@variant disabled {
|
|
110
|
+
@apply xds:border-neutral-10 xds:bg-neutral-10 xds:text-neutral-25;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Input Group Primary Button */
|
|
115
|
+
@utility input-group-button-primary {
|
|
116
|
+
@apply xds:border-0 xds:border-l-1 xds:bg-neutral-90 xds:border-neutral-90 xds:text-neutral-0;
|
|
117
|
+
|
|
118
|
+
@variant hover-active-focus {
|
|
119
|
+
@apply xds:bg-neutral-75 xds:border-neutral-75;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:first-child {
|
|
123
|
+
@apply xds:border-s-0 xds:ms-0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:last-child {
|
|
127
|
+
@apply xds:border-e-0 xds:me-0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Input Group Rectangle Button */
|
|
132
|
+
@utility input-group-button-rectangle {
|
|
133
|
+
@apply xds:ps-16 xds:pe-16 xds:aspect-auto;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Input Group Outlined Button */
|
|
137
|
+
@utility input-group-button-outlined {
|
|
138
|
+
@apply xds:bg-neutral-0 xds:border-neutral-90 xds:text-neutral-90;
|
|
139
|
+
|
|
140
|
+
@variant hover-active-focus {
|
|
141
|
+
@apply xds:bg-neutral-90 xds:border-neutral-90 xds:text-neutral-0;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Input Group Ghost Button */
|
|
146
|
+
@utility input-group-button-ghost {
|
|
147
|
+
@apply xds:bg-transparent xds:border-transparent xds:text-neutral-90;
|
|
148
|
+
|
|
149
|
+
@variant hover-active-focus {
|
|
150
|
+
@apply xds:bg-neutral-10 xds:border-neutral-10 xds:text-neutral-90;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Input Group Colors */
|
|
155
|
+
@utility input-group-* {
|
|
156
|
+
border-color: --value(--color- * -50);
|
|
157
|
+
|
|
158
|
+
@variant focus {
|
|
159
|
+
border-color: --value(--color- * -75);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&.xds\:input-group-line {
|
|
163
|
+
background-image: linear-gradient(--value(--color- * -50), --value(--color- * -50));
|
|
164
|
+
|
|
165
|
+
@variant focus {
|
|
166
|
+
box-shadow: 0 2px 0 -0.5px --value(--color- * -25);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
& > .xds\:input-group-button-primary {
|
|
171
|
+
@apply xds:text-neutral-0;
|
|
172
|
+
background-color: --value(--color- * -50);
|
|
173
|
+
border-color: --value(--color- * -50);
|
|
174
|
+
|
|
175
|
+
@variant hover-active-focus {
|
|
176
|
+
background-color: --value(--color- * -75);
|
|
177
|
+
border-color: --value(--color- * -75);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
& > .xds\:input-group-button-outlined {
|
|
182
|
+
@apply xds:bg-neutral-0 xds:border-y-0;
|
|
183
|
+
border-color: --value(--color- * -50);
|
|
184
|
+
color: --value(--color- * -50);
|
|
185
|
+
|
|
186
|
+
@variant hover-active-focus {
|
|
187
|
+
@apply xds:text-neutral-0;
|
|
188
|
+
background-color: --value(--color- * -50);
|
|
189
|
+
border-color: --value(--color- * -50);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
& > .xds\:input-group-button-ghost {
|
|
194
|
+
@apply xds:bg-transparent xds:border-transparent;
|
|
195
|
+
color: --value(--color- * -50);
|
|
196
|
+
|
|
197
|
+
@variant hover-active-focus {
|
|
198
|
+
@apply xds:bg-neutral-10 xds:border-neutral-10;
|
|
199
|
+
color: --value(--color- * -75);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* Base */
|
|
2
|
+
@utility input {
|
|
3
|
+
@apply xds:ps-16 xds:pe-16 xds:font-regular xds:cursor-text xds:text-ellipsis;
|
|
4
|
+
@apply xds:border-1 xds:border-neutral-90;
|
|
5
|
+
@apply xds:bg-neutral-0 xds:text-neutral-90;
|
|
6
|
+
|
|
7
|
+
/* `@apply xds:input-md;` can not be use here because cause circular dependency. */
|
|
8
|
+
@apply xds:h-40 xds:text-md;
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
@apply xds:border-neutral-50;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@variant focus {
|
|
15
|
+
@apply xds:border-neutral-50 xds:outline-2 xds:outline-neutral-25;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@variant disabled {
|
|
19
|
+
@apply xds:border-neutral-25 xds:bg-neutral-10 xds:text-neutral-50;
|
|
20
|
+
@apply xds:cursor-not-allowed;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&::placeholder {
|
|
24
|
+
@apply xds:text-neutral-50 xds:font-family-main xds:font-regular;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Sizes */
|
|
29
|
+
@utility input-sm {
|
|
30
|
+
@apply xds:h-32 xds:text-sm;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@utility input-md {
|
|
34
|
+
@apply xds:h-40 xds:text-base;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@utility input-lg {
|
|
38
|
+
@apply xds:h-48 xds:text-base;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Line */
|
|
42
|
+
@utility input-line {
|
|
43
|
+
@apply xds:border-0 xds:border-b-neutral-90;
|
|
44
|
+
@apply xds:bg-bottom xds:bg-size-[100%_1px] xds:bg-no-repeat;
|
|
45
|
+
background-image: linear-gradient(var(--xds-color-neutral-90), var(--xds-color-neutral-90));
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
@apply xds:bg-size-[100%_2px];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@variant focus {
|
|
52
|
+
@apply xds:bg-size-[100%_2px] xds:text-neutral-90 xds:outline-none;
|
|
53
|
+
@apply xds:shadow-[0_2px_0_-0.5px] xds:shadow-neutral-25;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@variant disabled {
|
|
57
|
+
@apply xds:bg-neutral-10;
|
|
58
|
+
background-image: linear-gradient(var(--xds-color-neutral-25), var(--xds-color-neutral-25));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Colors */
|
|
63
|
+
@utility input-* {
|
|
64
|
+
border-color: --value(--color- * -50);
|
|
65
|
+
|
|
66
|
+
&.xds\:input-line {
|
|
67
|
+
background-image: linear-gradient(--value(--color- * -50), --value(--color- * -50));
|
|
68
|
+
|
|
69
|
+
@variant focus {
|
|
70
|
+
box-shadow: 0 2px 0 -0.5px --value(--color- * -25);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
border-color: --value(--color- * -75);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@variant focus {
|
|
79
|
+
border-color: --value(--color- * -75);
|
|
80
|
+
outline-color: --value(--color- * -25);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@utility picture {
|
|
2
|
+
@apply xds:block xds:aspect-ratio-default xds:overflow-hidden;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@utility picture-image {
|
|
6
|
+
@apply xds:aspect-ratio-default xds:object-contain xds:w-full xds:h-full;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@utility picture-zoom {
|
|
10
|
+
& > .xds\:picture-image {
|
|
11
|
+
@apply xds:transition-transform xds:duration-300 xds:ease-out;
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
@apply xds:scale-110;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@utility picture-overlay {
|
|
20
|
+
&:hover {
|
|
21
|
+
@apply xds:mix-blend-multiply;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
& > .xds\:picture-image:hover {
|
|
25
|
+
mask-image: linear-gradient(to top, transparent 20%, var(--xds-color-neutral-100));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* Base */
|
|
2
|
+
@utility progress-bar {
|
|
3
|
+
@apply xds:rounded-sm;
|
|
4
|
+
@apply xds:inline-block;
|
|
5
|
+
@apply xds:bg-neutral-25;
|
|
6
|
+
@apply xds:overflow-hidden;
|
|
7
|
+
|
|
8
|
+
/* `@apply xds:progress-bar-md;` can not be use here because cause circular dependency. */
|
|
9
|
+
@apply xds:h-4;
|
|
10
|
+
|
|
11
|
+
& > .xds\:progress-bar-fill {
|
|
12
|
+
@apply xds:h-full;
|
|
13
|
+
@apply xds:bg-neutral-50;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Sizes */
|
|
18
|
+
@utility progress-bar-md {
|
|
19
|
+
@apply xds:h-4;
|
|
20
|
+
}
|
|
21
|
+
@utility progress-bar-lg {
|
|
22
|
+
@apply xds:h-8;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Colors */
|
|
26
|
+
@utility progress-bar-* {
|
|
27
|
+
& > .xds\:progress-bar-fill {
|
|
28
|
+
background-color: --value(--color- * -50);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@utility scroll {
|
|
2
|
+
@apply xds:overflow-y-scroll xds:min-h-0;
|
|
3
|
+
|
|
4
|
+
@media (hover: hover) and (pointer: fine) {
|
|
5
|
+
&:hover {
|
|
6
|
+
--xds-color-thumb-scroll-bar: var(--xds-color-thumb-scroll-bar-hover);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Firefox */
|
|
10
|
+
scrollbar-width: auto;
|
|
11
|
+
scrollbar-color: var(--xds-color-thumb-scroll-bar) var(--xds-color-background-scroll-bar);
|
|
12
|
+
|
|
13
|
+
/* WebKit */
|
|
14
|
+
&::-webkit-scrollbar {
|
|
15
|
+
@apply xds:w-4.25;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&::-webkit-scrollbar-thumb {
|
|
19
|
+
@apply xds:bg-clip-content xds:bg-(--xds-color-thumb-scroll-bar);
|
|
20
|
+
@apply xds:border-4 xds:border-transparent xds:rounded-3xl;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&::-webkit-scrollbar-track {
|
|
24
|
+
@apply xds:bg-(--xds-color-background-scroll-bar);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* Base */
|
|
2
|
+
@utility sliding-panel {
|
|
3
|
+
@apply xds:flex xds:flex-row xds:flex-nowrap xds:items-center xds:relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Fade */
|
|
7
|
+
@utility sliding-panel-fade {
|
|
8
|
+
--xds-sliding-panel-fade-spacing: var(--xds-spacing-80);
|
|
9
|
+
mask: linear-gradient(
|
|
10
|
+
to right,
|
|
11
|
+
transparent calc(0.43 * var(--xds-sliding-panel-fade-spacing)),
|
|
12
|
+
rgba(0, 0, 0, 0.8) calc(0.67 * var(--xds-sliding-panel-fade-spacing)),
|
|
13
|
+
black var(--xds-sliding-panel-fade-spacing),
|
|
14
|
+
rgba(0, 0, 0, 0.8) calc(100% - 0.67 * var(--xds-sliding-panel-fade-spacing)),
|
|
15
|
+
transparent calc(100% - 0.43 * var(--xds-sliding-panel-fade-spacing))
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Fade Sizes */
|
|
20
|
+
@utility sliding-panel-fade-sm {
|
|
21
|
+
@apply xds:sliding-panel-fade;
|
|
22
|
+
--xds-sliding-panel-fade-spacing: var(--xds-spacing-40);
|
|
23
|
+
}
|
|
24
|
+
@utility sliding-panel-fade-md {
|
|
25
|
+
@apply xds:sliding-panel-fade;
|
|
26
|
+
--xds-sliding-panel-fade-spacing: var(--xds-spacing-80);
|
|
27
|
+
}
|
|
28
|
+
@utility sliding-panel-fade-lg {
|
|
29
|
+
@apply xds:sliding-panel-fade;
|
|
30
|
+
--xds-sliding-panel-fade-spacing: var(--xds-spacing-160);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Buttons */
|
|
34
|
+
@utility sliding-panel-button {
|
|
35
|
+
@apply xds:button;
|
|
36
|
+
@apply xds:absolute xds:z-1;
|
|
37
|
+
@apply xds:transition-all xds:ease-out xds:duration-200 xds:translate-x-0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@utility sliding-panel-button-left {
|
|
41
|
+
@apply xds:left-0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@utility sliding-panel-button-right {
|
|
45
|
+
@apply xds:right-0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Buttons on hover */
|
|
49
|
+
@utility sliding-panel-show-buttons-on-hover {
|
|
50
|
+
& > .xds\:sliding-panel-button-left {
|
|
51
|
+
@apply xds:opacity-0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& > .xds\:sliding-panel-button-right {
|
|
55
|
+
@apply xds:opacity-0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
&:not(.xds\:sliding-panel-at-start) > .xds\:sliding-panel-button-left,
|
|
60
|
+
&:not(.xds\:sliding-panel-at-end) > .xds\:sliding-panel-button-right {
|
|
61
|
+
@apply xds:opacity-100 xds:pointer-events-auto;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Button positions */
|
|
67
|
+
@utility sliding-panel-buttons-center {
|
|
68
|
+
& > .xds\:sliding-panel-button-left {
|
|
69
|
+
@apply xds:-translate-x-1/2;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& > .xds\:sliding-panel-button-right {
|
|
73
|
+
@apply xds:translate-x-1/2;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@utility sliding-panel-buttons-outside {
|
|
78
|
+
& > .xds\:sliding-panel-button-left {
|
|
79
|
+
@apply xds:-translate-x-full;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
& > .xds\:sliding-panel-button-right {
|
|
83
|
+
@apply xds:translate-x-full;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Fade positions */
|
|
88
|
+
@utility sliding-panel-fade-position {
|
|
89
|
+
--xds-sliding-panel-fade-spacing: var(--xds-spacing-80);
|
|
90
|
+
--xds-sliding-panel-fade-direction: to left;
|
|
91
|
+
mask: linear-gradient(
|
|
92
|
+
var(--xds-sliding-panel-fade-direction),
|
|
93
|
+
transparent calc(0.43 * var(--xds-sliding-panel-fade-spacing)),
|
|
94
|
+
rgba(0, 0, 0, 0.8) calc(0.67 * var(--xds-sliding-panel-fade-spacing)),
|
|
95
|
+
black var(--xds-sliding-panel-fade-spacing)
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
@utility sliding-panel-at-start {
|
|
99
|
+
& > .xds\:sliding-panel-button-left {
|
|
100
|
+
@apply xds:opacity-0 xds:pointer-events-none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
& > .xds\:sliding-panel-fade-sm {
|
|
104
|
+
@apply xds:sliding-panel-fade-position;
|
|
105
|
+
--xds-spacing-sliding-fade: var(--xds-spacing-40);
|
|
106
|
+
}
|
|
107
|
+
& > .xds\:sliding-panel-fade,
|
|
108
|
+
& > .xds\:sliding-panel-fade-md {
|
|
109
|
+
@apply xds:sliding-panel-fade-position;
|
|
110
|
+
}
|
|
111
|
+
& > .xds\:sliding-panel-fade-lg {
|
|
112
|
+
@apply xds:sliding-panel-fade-position;
|
|
113
|
+
--xds-spacing-sliding-fade: var(--xds-spacing-160);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.xds\:sliding-panel-at-end > .xds\:sliding-panel-fade {
|
|
117
|
+
mask: none;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@utility sliding-panel-at-end {
|
|
122
|
+
& > .xds\:sliding-panel-button-right {
|
|
123
|
+
@apply xds:opacity-0 xds:pointer-events-none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
& > .xds\:sliding-panel-fade-sm {
|
|
127
|
+
@apply xds:sliding-panel-fade-position;
|
|
128
|
+
--xds-spacing-sliding-fade: var(--xds-spacing-40);
|
|
129
|
+
--xds-sliding-panel-fade-direction: to right;
|
|
130
|
+
}
|
|
131
|
+
& > .xds\:sliding-panel-fade,
|
|
132
|
+
& > .xds\:sliding-panel-fade-md {
|
|
133
|
+
@apply xds:sliding-panel-fade-position;
|
|
134
|
+
--xds-sliding-panel-fade-direction: to right;
|
|
135
|
+
}
|
|
136
|
+
& > .xds\:sliding-panel-fade-lg {
|
|
137
|
+
@apply xds:sliding-panel-fade-position;
|
|
138
|
+
--xds-spacing-sliding-fade: var(--xds-spacing-160);
|
|
139
|
+
--xds-sliding-panel-fade-direction: to right;
|
|
140
|
+
}
|
|
141
|
+
}
|