mtrl 0.2.4 → 0.2.6
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/package.json +6 -3
- package/src/components/badge/_styles.scss +9 -9
- package/src/components/button/_styles.scss +0 -56
- package/src/components/button/button.ts +0 -2
- package/src/components/button/constants.ts +0 -6
- package/src/components/button/index.ts +2 -2
- package/src/components/button/types.ts +1 -7
- package/src/components/card/_styles.scss +67 -25
- package/src/components/card/api.ts +54 -3
- package/src/components/card/card.ts +33 -2
- package/src/components/card/config.ts +143 -21
- package/src/components/card/constants.ts +20 -19
- package/src/components/card/content.ts +299 -2
- package/src/components/card/features.ts +155 -4
- package/src/components/card/index.ts +31 -9
- package/src/components/card/types.ts +138 -15
- package/src/components/chip/chip.ts +1 -9
- package/src/components/chip/constants.ts +0 -10
- package/src/components/chip/index.ts +1 -1
- package/src/components/chip/types.ts +1 -4
- package/src/components/progress/_styles.scss +0 -65
- package/src/components/progress/config.ts +1 -2
- package/src/components/progress/constants.ts +0 -14
- package/src/components/progress/index.ts +1 -1
- package/src/components/progress/progress.ts +1 -4
- package/src/components/progress/types.ts +1 -4
- package/src/components/radios/_styles.scss +0 -45
- package/src/components/radios/api.ts +85 -60
- package/src/components/radios/config.ts +1 -2
- package/src/components/radios/constants.ts +0 -9
- package/src/components/radios/index.ts +1 -1
- package/src/components/radios/radio.ts +34 -11
- package/src/components/radios/radios.ts +2 -1
- package/src/components/radios/types.ts +1 -7
- package/src/components/slider/_styles.scss +193 -281
- package/src/components/slider/accessibility.md +59 -0
- package/src/components/slider/api.ts +36 -101
- package/src/components/slider/config.ts +29 -78
- package/src/components/slider/constants.ts +12 -8
- package/src/components/slider/features/appearance.ts +1 -47
- package/src/components/slider/features/disabled.ts +41 -16
- package/src/components/slider/features/interactions.ts +166 -26
- package/src/components/slider/features/keyboard.ts +125 -6
- package/src/components/slider/features/structure.ts +182 -195
- package/src/components/slider/features/ui.ts +234 -303
- package/src/components/slider/index.ts +11 -1
- package/src/components/slider/slider.ts +1 -1
- package/src/components/slider/types.ts +10 -25
- package/src/components/tabs/_styles.scss +285 -155
- package/src/components/tabs/api.ts +178 -400
- package/src/components/tabs/config.ts +46 -52
- package/src/components/tabs/constants.ts +85 -8
- package/src/components/tabs/features.ts +401 -0
- package/src/components/tabs/index.ts +60 -3
- package/src/components/tabs/indicator.ts +225 -0
- package/src/components/tabs/responsive.ts +144 -0
- package/src/components/tabs/scroll-indicators.ts +149 -0
- package/src/components/tabs/state.ts +186 -0
- package/src/components/tabs/tab-api.ts +258 -0
- package/src/components/tabs/tab.ts +255 -0
- package/src/components/tabs/tabs.ts +50 -31
- package/src/components/tabs/types.ts +324 -128
- package/src/components/tabs/utils.ts +107 -0
- package/src/components/textfield/_styles.scss +0 -98
- package/src/components/textfield/config.ts +2 -3
- package/src/components/textfield/constants.ts +0 -14
- package/src/components/textfield/index.ts +2 -2
- package/src/components/textfield/textfield.ts +0 -2
- package/src/components/textfield/types.ts +1 -4
- package/src/core/compose/component.ts +1 -1
- package/src/core/compose/features/badge.ts +79 -0
- package/src/core/compose/features/index.ts +3 -1
- package/src/styles/abstract/_theme.scss +106 -2
- package/src/components/card/actions.ts +0 -48
- package/src/components/card/header.ts +0 -88
- package/src/components/card/media.ts +0 -52
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
// src/components/slider/index.ts
|
|
2
|
+
|
|
3
|
+
// Export main component creator
|
|
2
4
|
export { default } from './slider';
|
|
5
|
+
|
|
6
|
+
// Export constants
|
|
3
7
|
export {
|
|
4
8
|
SLIDER_COLORS,
|
|
5
9
|
SLIDER_SIZES,
|
|
6
10
|
SLIDER_ORIENTATIONS,
|
|
7
11
|
SLIDER_EVENTS
|
|
8
12
|
} from './constants';
|
|
9
|
-
|
|
13
|
+
|
|
14
|
+
// Export types for TypeScript users
|
|
15
|
+
export type {
|
|
16
|
+
SliderConfig,
|
|
17
|
+
SliderComponent,
|
|
18
|
+
SliderEvent
|
|
19
|
+
} from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/slider/slider.ts
|
|
2
|
-
import { pipe } from '../../core/compose';
|
|
2
|
+
import { pipe } from '../../core/compose/pipe';
|
|
3
3
|
import { createBase, withElement } from '../../core/compose/component';
|
|
4
4
|
import { withEvents, withLifecycle } from '../../core/compose/features';
|
|
5
5
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/slider/types.ts
|
|
2
|
-
import { SLIDER_COLORS, SLIDER_SIZES,
|
|
2
|
+
import { SLIDER_COLORS, SLIDER_SIZES, SLIDER_EVENTS } from './constants';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration interface for the Slider component
|
|
@@ -24,26 +24,20 @@ export interface SliderConfig {
|
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
|
|
26
26
|
/** Color variant of the slider */
|
|
27
|
-
color?: keyof typeof SLIDER_COLORS | SLIDER_COLORS;
|
|
27
|
+
color?: keyof typeof SLIDER_COLORS | typeof SLIDER_COLORS[keyof typeof SLIDER_COLORS];
|
|
28
28
|
|
|
29
29
|
/** Size variant of the slider */
|
|
30
|
-
size?: keyof typeof SLIDER_SIZES | SLIDER_SIZES;
|
|
31
|
-
|
|
32
|
-
/** Orientation of the slider */
|
|
33
|
-
orientation?: keyof typeof SLIDER_ORIENTATIONS | SLIDER_ORIENTATIONS;
|
|
30
|
+
size?: keyof typeof SLIDER_SIZES | typeof SLIDER_SIZES[keyof typeof SLIDER_SIZES];
|
|
34
31
|
|
|
35
32
|
/** Whether to show tick marks */
|
|
36
33
|
ticks?: boolean;
|
|
37
34
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
35
|
+
/** Format function for displayed values */
|
|
36
|
+
valueFormatter?: (value: number) => string;
|
|
40
37
|
|
|
41
38
|
/** Whether to show the current value while dragging */
|
|
42
39
|
showValue?: boolean;
|
|
43
40
|
|
|
44
|
-
/** Format function for displayed values */
|
|
45
|
-
valueFormatter?: (value: number) => string;
|
|
46
|
-
|
|
47
41
|
/** Whether to snap to steps while dragging (discrete slider) */
|
|
48
42
|
snapToSteps?: boolean;
|
|
49
43
|
|
|
@@ -55,7 +49,7 @@ export interface SliderConfig {
|
|
|
55
49
|
|
|
56
50
|
/** Event handlers for slider events */
|
|
57
51
|
on?: {
|
|
58
|
-
[key in keyof typeof SLIDER_EVENTS]?: (event: SliderEvent) => void;
|
|
52
|
+
[key in keyof typeof SLIDER_EVENTS | typeof SLIDER_EVENTS[keyof typeof SLIDER_EVENTS]]?: (event: SliderEvent) => void;
|
|
59
53
|
};
|
|
60
54
|
}
|
|
61
55
|
|
|
@@ -129,37 +123,28 @@ export interface SliderComponent {
|
|
|
129
123
|
isDisabled: () => boolean;
|
|
130
124
|
|
|
131
125
|
/** Sets slider color */
|
|
132
|
-
setColor: (color: keyof typeof SLIDER_COLORS | SLIDER_COLORS) => SliderComponent;
|
|
126
|
+
setColor: (color: keyof typeof SLIDER_COLORS | typeof SLIDER_COLORS[keyof typeof SLIDER_COLORS]) => SliderComponent;
|
|
133
127
|
|
|
134
128
|
/** Gets slider color */
|
|
135
129
|
getColor: () => string;
|
|
136
130
|
|
|
137
131
|
/** Sets slider size */
|
|
138
|
-
setSize: (size: keyof typeof SLIDER_SIZES | SLIDER_SIZES) => SliderComponent;
|
|
132
|
+
setSize: (size: keyof typeof SLIDER_SIZES | typeof SLIDER_SIZES[keyof typeof SLIDER_SIZES]) => SliderComponent;
|
|
139
133
|
|
|
140
134
|
/** Gets slider size */
|
|
141
135
|
getSize: () => string;
|
|
142
136
|
|
|
143
|
-
/** Sets slider orientation */
|
|
144
|
-
setOrientation: (orientation: keyof typeof SLIDER_ORIENTATIONS | SLIDER_ORIENTATIONS) => SliderComponent;
|
|
145
|
-
|
|
146
|
-
/** Gets slider orientation */
|
|
147
|
-
getOrientation: () => string;
|
|
148
|
-
|
|
149
137
|
/** Shows or hides tick marks */
|
|
150
138
|
showTicks: (show: boolean) => SliderComponent;
|
|
151
139
|
|
|
152
|
-
/** Shows or hides tick labels */
|
|
153
|
-
showTickLabels: (show: boolean | string[]) => SliderComponent;
|
|
154
|
-
|
|
155
140
|
/** Shows or hides current value while dragging */
|
|
156
141
|
showCurrentValue: (show: boolean) => SliderComponent;
|
|
157
142
|
|
|
158
143
|
/** Adds event listener */
|
|
159
|
-
on: (event: keyof typeof SLIDER_EVENTS | SLIDER_EVENTS, handler: (event: SliderEvent) => void) => SliderComponent;
|
|
144
|
+
on: (event: keyof typeof SLIDER_EVENTS | typeof SLIDER_EVENTS[keyof typeof SLIDER_EVENTS], handler: (event: SliderEvent) => void) => SliderComponent;
|
|
160
145
|
|
|
161
146
|
/** Removes event listener */
|
|
162
|
-
off: (event: keyof typeof SLIDER_EVENTS | SLIDER_EVENTS, handler: (event: SliderEvent) => void) => SliderComponent;
|
|
147
|
+
off: (event: keyof typeof SLIDER_EVENTS | typeof SLIDER_EVENTS[keyof typeof SLIDER_EVENTS], handler: (event: SliderEvent) => void) => SliderComponent;
|
|
163
148
|
|
|
164
149
|
/** Destroys the slider component and cleans up resources */
|
|
165
150
|
destroy: () => void;
|
|
@@ -5,220 +5,350 @@
|
|
|
5
5
|
@use '../../styles/abstract/mixins' as m;
|
|
6
6
|
@use '../../styles/abstract/theme' as t;
|
|
7
7
|
|
|
8
|
-
$component: '#{base.$prefix}-
|
|
8
|
+
$component: '#{base.$prefix}-tab';
|
|
9
|
+
$container: '#{base.$prefix}-tabs';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
// Tabs Container Styles (1. Container)
|
|
12
|
+
.#{$container} {
|
|
12
13
|
position: relative;
|
|
13
14
|
display: flex;
|
|
14
15
|
flex-direction: column;
|
|
15
16
|
width: 100%;
|
|
17
|
+
background-color: t.color('surface'); // MD3: Surface color
|
|
16
18
|
box-sizing: border-box;
|
|
17
19
|
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
// Basic container sizing
|
|
21
|
+
&--primary {
|
|
22
|
+
min-height: 48px;
|
|
23
|
+
|
|
24
|
+
// Tab container with icons and text needs more space
|
|
25
|
+
&:has(.#{$component}--icon-and-text) {
|
|
26
|
+
min-height: 64px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--secondary {
|
|
31
|
+
min-height: 48px;
|
|
32
|
+
// Tab indicator styling
|
|
33
|
+
.#{$container}-indicator {
|
|
34
|
+
height: 2px;
|
|
35
|
+
border-radius: 0;
|
|
36
|
+
background-color: t.color('on-surface');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Scrollable container
|
|
41
|
+
&--scrollable {
|
|
42
|
+
overflow: hidden;
|
|
24
43
|
|
|
25
|
-
|
|
26
|
-
|
|
44
|
+
.#{$container}-scroll {
|
|
45
|
+
display: flex;
|
|
27
46
|
overflow-x: auto;
|
|
28
47
|
scrollbar-width: none; // Firefox
|
|
29
|
-
-ms-overflow-style: none; // IE
|
|
48
|
+
-ms-overflow-style: none; // IE and Edge
|
|
30
49
|
|
|
31
|
-
// Hide scrollbar in WebKit
|
|
32
50
|
&::-webkit-scrollbar {
|
|
33
|
-
display: none;
|
|
51
|
+
display: none; // Chrome, Safari, and Opera
|
|
34
52
|
}
|
|
35
53
|
}
|
|
36
54
|
}
|
|
37
55
|
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
position:
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
// Container divider (5. Divider)
|
|
57
|
+
&-divider {
|
|
58
|
+
position: absolute;
|
|
59
|
+
bottom: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
height: 1px;
|
|
63
|
+
background-color: t.color('outline-variant'); // MD3: Outline variant color
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Tab indicator styling
|
|
67
|
+
&-indicator {
|
|
68
|
+
position: absolute;
|
|
69
|
+
bottom: 1px;
|
|
70
|
+
height: 4px;
|
|
71
|
+
background-color: t.color('primary');
|
|
72
|
+
border-radius: 3px 3px 0 0;
|
|
73
|
+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
74
|
+
width 250ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
75
|
+
z-index: 1; // Ensure indicator appears above divider
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Individual Tab Styles
|
|
80
|
+
.#{$component} {
|
|
81
|
+
position: relative;
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
min-width: 90px;
|
|
86
|
+
max-width: 360px;
|
|
87
|
+
padding: 0 16px;
|
|
88
|
+
border: none;
|
|
89
|
+
border-radius: 5px;
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
color: t.color('on-surface-variant');
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
user-select: none;
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
|
|
96
|
+
// Typography for label text (4. Label)
|
|
97
|
+
@include m.typography('label-large');
|
|
98
|
+
|
|
99
|
+
// Transition for state changes
|
|
100
|
+
transition:
|
|
101
|
+
background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
|
|
102
|
+
color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
103
|
+
|
|
104
|
+
// Container heights based on layout
|
|
105
|
+
&--text-only {
|
|
43
106
|
height: 48px;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&--icon-only {
|
|
110
|
+
height: 48px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&--icon-and-text {
|
|
114
|
+
height: 64px;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Focus styles (3/7. Focused state)
|
|
119
|
+
&:focus {
|
|
49
120
|
outline: none;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:focus-visible {
|
|
124
|
+
outline: 2px solid t.color('primary');
|
|
125
|
+
outline-offset: 0;
|
|
126
|
+
z-index: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Disabled state
|
|
130
|
+
&:disabled, &[disabled], &--disabled {
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
opacity: 0.38;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Tab Icon (3. Icon - optional)
|
|
136
|
+
&-icon {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
width: 24px;
|
|
141
|
+
height: 24px;
|
|
65
142
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
143
|
+
svg {
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
fill: currentColor;
|
|
69
147
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Ensure proper vertical spacing for icon and text
|
|
151
|
+
&--icon-and-text {
|
|
152
|
+
.#{$component}-icon {
|
|
153
|
+
margin-bottom: 4px;
|
|
74
154
|
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Tab Text (4. Label)
|
|
158
|
+
&-text {
|
|
159
|
+
@include m.truncate;
|
|
160
|
+
max-width: 100%;
|
|
161
|
+
text-align: center;
|
|
162
|
+
line-height: 1.2;
|
|
75
163
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
color: t.color('primary');
|
|
164
|
+
.#{$component}--icon-only & {
|
|
165
|
+
@include m.visually-hidden;
|
|
79
166
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Badge positioning (2. Badge - optional)
|
|
170
|
+
.#{base.$prefix}-badge-wrapper {
|
|
171
|
+
.#{base.$prefix}-badge {
|
|
172
|
+
// Position for different tab layouts
|
|
173
|
+
&--top-right {
|
|
174
|
+
.#{$component}--icon-only & {
|
|
175
|
+
top: 4px;
|
|
176
|
+
right: 4px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.#{$component}--text-only & {
|
|
180
|
+
top: 8px;
|
|
181
|
+
right: 8px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.#{$component}--icon-and-text & {
|
|
185
|
+
top: 4px;
|
|
186
|
+
right: calc(50% - 20px);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
86
189
|
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Active Tab - Apply to both primary and secondary
|
|
193
|
+
&--active {
|
|
194
|
+
color: t.color('primary'); // MD3: Primary color
|
|
87
195
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
pointer-events: none;
|
|
91
|
-
color: t.alpha('on-surface', 0.38);
|
|
92
|
-
cursor: default;
|
|
196
|
+
.#{$component}-icon {
|
|
197
|
+
color: t.color('primary'); // MD3: Primary color
|
|
93
198
|
}
|
|
94
199
|
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
align-items: center;
|
|
99
|
-
justify-content: center;
|
|
100
|
-
gap: 8px;
|
|
101
|
-
width: 100%;
|
|
102
|
-
height: 100%;
|
|
200
|
+
// Hover state for active tabs
|
|
201
|
+
&:hover:not(:disabled):not([disabled]) {
|
|
202
|
+
background-color: t.alpha('primary', 0.08);
|
|
103
203
|
}
|
|
104
204
|
|
|
105
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
205
|
+
// Pressed state for active tabs
|
|
206
|
+
&:active:not(:disabled):not([disabled]) {
|
|
207
|
+
background-color: t.alpha('primary', 0.12);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Secondary variant overrides
|
|
212
|
+
.#{$container}--secondary & {
|
|
213
|
+
&--active {
|
|
214
|
+
color: t.color('on-surface');
|
|
112
215
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
height: 18px;
|
|
116
|
-
fill: currentColor;
|
|
216
|
+
.#{$component}-icon {
|
|
217
|
+
color: t.color('on-surface');
|
|
117
218
|
}
|
|
118
219
|
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Hover state for inactive tabs
|
|
223
|
+
&:hover:not(:disabled):not(&--active):not([disabled]) {
|
|
224
|
+
background-color: t.alpha('on-surface-variant', 0.08);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Pressed state for inactive tabs
|
|
228
|
+
&:active:not(:disabled):not([disabled]):not(&--active) {
|
|
229
|
+
background-color: t.alpha('on-surface-variant', 0.12);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Ripple effect styling
|
|
233
|
+
.#{$component}-ripple {
|
|
234
|
+
position: absolute;
|
|
235
|
+
top: 0;
|
|
236
|
+
left: 0;
|
|
237
|
+
right: 0;
|
|
238
|
+
bottom: 0;
|
|
239
|
+
overflow: hidden;
|
|
240
|
+
border-radius: inherit;
|
|
241
|
+
pointer-events: none;
|
|
119
242
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
243
|
+
.ripple {
|
|
244
|
+
position: absolute;
|
|
245
|
+
border-radius: 50%;
|
|
246
|
+
transform: scale(0);
|
|
247
|
+
pointer-events: none;
|
|
248
|
+
background-color: currentColor;
|
|
249
|
+
opacity: 0.1;
|
|
250
|
+
transform-origin: center;
|
|
123
251
|
}
|
|
124
252
|
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Tab panel styles
|
|
256
|
+
.#{base.$prefix}-tab-panel {
|
|
257
|
+
padding: 16px;
|
|
125
258
|
|
|
126
|
-
|
|
127
|
-
|
|
259
|
+
&[hidden] {
|
|
260
|
+
display: none;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Scroll indicators
|
|
265
|
+
.#{$container} {
|
|
266
|
+
&-scroll-indicator {
|
|
128
267
|
position: absolute;
|
|
268
|
+
top: 0;
|
|
129
269
|
bottom: 0;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
background-color: t.color('primary');
|
|
133
|
-
transform-origin: left center;
|
|
270
|
+
width: 24px;
|
|
271
|
+
pointer-events: none;
|
|
134
272
|
z-index: 1;
|
|
273
|
+
opacity: 0;
|
|
274
|
+
transition: opacity 0.2s ease;
|
|
135
275
|
|
|
136
|
-
|
|
137
|
-
|
|
276
|
+
&.visible {
|
|
277
|
+
opacity: 1;
|
|
138
278
|
}
|
|
139
279
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Variants
|
|
147
|
-
|
|
148
|
-
// Primary variant (default)
|
|
149
|
-
&--primary {
|
|
150
|
-
.#{$component}__tab {
|
|
151
|
-
color: t.color('on-surface-variant');
|
|
152
|
-
|
|
153
|
-
&--active {
|
|
154
|
-
color: t.color('primary');
|
|
155
|
-
}
|
|
280
|
+
&--left {
|
|
281
|
+
left: 0;
|
|
282
|
+
background: linear-gradient(to right, t.color('surface'), transparent);
|
|
156
283
|
}
|
|
157
284
|
|
|
158
|
-
|
|
159
|
-
|
|
285
|
+
&--right {
|
|
286
|
+
right: 0;
|
|
287
|
+
background: linear-gradient(to left, t.color('surface'), transparent);
|
|
160
288
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
289
|
+
|
|
290
|
+
&--shadow {
|
|
291
|
+
&.#{$container}-scroll-indicator--left {
|
|
292
|
+
box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.2);
|
|
293
|
+
background: none;
|
|
294
|
+
}
|
|
167
295
|
|
|
168
|
-
|
|
169
|
-
|
|
296
|
+
&.#{$container}-scroll-indicator--right {
|
|
297
|
+
box-shadow: -2px 0 4px -2px rgba(0, 0, 0, 0.2);
|
|
298
|
+
background: none;
|
|
170
299
|
}
|
|
171
300
|
}
|
|
172
|
-
|
|
173
|
-
.#{$component}__indicator {
|
|
174
|
-
background-color: t.color('secondary');
|
|
175
|
-
}
|
|
176
301
|
}
|
|
177
302
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
303
|
+
&-scroll-button {
|
|
304
|
+
position: absolute;
|
|
305
|
+
top: 50%;
|
|
306
|
+
transform: translateY(-50%);
|
|
307
|
+
width: 40px;
|
|
308
|
+
height: 40px;
|
|
309
|
+
border-radius: 50%;
|
|
310
|
+
background-color: t.color('surface-container-high');
|
|
311
|
+
border: none;
|
|
312
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
|
|
313
|
+
display: flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
justify-content: center;
|
|
316
|
+
cursor: pointer;
|
|
317
|
+
z-index: 2;
|
|
183
318
|
|
|
184
|
-
|
|
185
|
-
|
|
319
|
+
&:disabled {
|
|
320
|
+
opacity: 0.38;
|
|
321
|
+
cursor: default;
|
|
186
322
|
}
|
|
187
323
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
&--active {
|
|
193
|
-
background-color: t.color('surface');
|
|
194
|
-
color: t.color('on-surface');
|
|
195
|
-
@include m.elevation(1);
|
|
196
|
-
}
|
|
324
|
+
svg {
|
|
325
|
+
width: 24px;
|
|
326
|
+
height: 24px;
|
|
327
|
+
fill: t.color('on-surface');
|
|
197
328
|
}
|
|
198
329
|
|
|
199
|
-
|
|
200
|
-
|
|
330
|
+
&--left {
|
|
331
|
+
left: 4px;
|
|
201
332
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
&--neutral {
|
|
206
|
-
.#{$component}__tab {
|
|
207
|
-
color: t.color('on-surface-variant');
|
|
208
|
-
|
|
209
|
-
&--active {
|
|
210
|
-
color: t.color('on-surface');
|
|
211
|
-
}
|
|
333
|
+
|
|
334
|
+
&--right {
|
|
335
|
+
right: 4px;
|
|
212
336
|
}
|
|
213
337
|
|
|
214
|
-
|
|
215
|
-
|
|
338
|
+
&:focus {
|
|
339
|
+
outline: none;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&:focus-visible {
|
|
343
|
+
outline: 2px solid t.color('primary');
|
|
216
344
|
}
|
|
217
345
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// Responsive styles for small screens
|
|
349
|
+
.#{$container}--responsive-small {
|
|
350
|
+
.#{$component} {
|
|
351
|
+
padding: 0 12px;
|
|
352
|
+
min-width: 72px;
|
|
223
353
|
}
|
|
224
354
|
}
|