mtrl 0.2.5 → 0.2.7

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.
Files changed (196) hide show
  1. package/index.ts +18 -0
  2. package/package.json +1 -1
  3. package/src/components/badge/_styles.scss +123 -115
  4. package/src/components/badge/api.ts +57 -59
  5. package/src/components/badge/badge.ts +16 -2
  6. package/src/components/badge/config.ts +65 -11
  7. package/src/components/badge/constants.ts +22 -12
  8. package/src/components/badge/features.ts +44 -40
  9. package/src/components/badge/types.ts +42 -30
  10. package/src/components/bottom-app-bar/_styles.scss +103 -0
  11. package/src/components/bottom-app-bar/bottom-app-bar.ts +196 -0
  12. package/src/components/bottom-app-bar/config.ts +73 -0
  13. package/src/components/bottom-app-bar/index.ts +11 -0
  14. package/src/components/bottom-app-bar/types.ts +108 -0
  15. package/src/components/button/_styles.scss +0 -66
  16. package/src/components/button/api.ts +5 -0
  17. package/src/components/button/button.ts +0 -2
  18. package/src/components/button/config.ts +5 -0
  19. package/src/components/button/constants.ts +0 -6
  20. package/src/components/button/index.ts +2 -2
  21. package/src/components/button/types.ts +7 -7
  22. package/src/components/card/_styles.scss +67 -25
  23. package/src/components/card/api.ts +54 -3
  24. package/src/components/card/card.ts +25 -6
  25. package/src/components/card/config.ts +189 -22
  26. package/src/components/card/constants.ts +20 -19
  27. package/src/components/card/content.ts +299 -2
  28. package/src/components/card/features.ts +158 -4
  29. package/src/components/card/index.ts +31 -9
  30. package/src/components/card/types.ts +166 -15
  31. package/src/components/checkbox/_styles.scss +0 -2
  32. package/src/components/chip/chip.ts +1 -9
  33. package/src/components/chip/constants.ts +0 -10
  34. package/src/components/chip/index.ts +1 -1
  35. package/src/components/chip/types.ts +1 -4
  36. package/src/components/datepicker/_styles.scss +358 -0
  37. package/src/components/datepicker/api.ts +272 -0
  38. package/src/components/datepicker/config.ts +144 -0
  39. package/src/components/datepicker/constants.ts +98 -0
  40. package/src/components/datepicker/datepicker.ts +346 -0
  41. package/src/components/datepicker/index.ts +9 -0
  42. package/src/components/datepicker/render.ts +452 -0
  43. package/src/components/datepicker/types.ts +268 -0
  44. package/src/components/datepicker/utils.ts +290 -0
  45. package/src/components/dialog/_styles.scss +174 -128
  46. package/src/components/dialog/api.ts +48 -13
  47. package/src/components/dialog/config.ts +9 -5
  48. package/src/components/dialog/dialog.ts +6 -3
  49. package/src/components/dialog/features.ts +290 -130
  50. package/src/components/dialog/types.ts +7 -4
  51. package/src/components/divider/_styles.scss +57 -0
  52. package/src/components/divider/config.ts +81 -0
  53. package/src/components/divider/divider.ts +37 -0
  54. package/src/components/divider/features.ts +207 -0
  55. package/src/components/divider/index.ts +5 -0
  56. package/src/components/divider/types.ts +55 -0
  57. package/src/components/extended-fab/_styles.scss +267 -0
  58. package/src/components/extended-fab/api.ts +141 -0
  59. package/src/components/extended-fab/config.ts +108 -0
  60. package/src/components/extended-fab/constants.ts +36 -0
  61. package/src/components/extended-fab/extended-fab.ts +125 -0
  62. package/src/components/extended-fab/index.ts +4 -0
  63. package/src/components/extended-fab/types.ts +287 -0
  64. package/src/components/fab/_styles.scss +225 -0
  65. package/src/components/fab/api.ts +97 -0
  66. package/src/components/fab/config.ts +94 -0
  67. package/src/components/fab/constants.ts +41 -0
  68. package/src/components/fab/fab.ts +67 -0
  69. package/src/components/fab/index.ts +4 -0
  70. package/src/components/fab/types.ts +234 -0
  71. package/src/components/navigation/_styles.scss +1 -0
  72. package/src/components/navigation/api.ts +78 -50
  73. package/src/components/navigation/features/items.ts +280 -0
  74. package/src/components/navigation/nav-item.ts +72 -23
  75. package/src/components/navigation/navigation.ts +54 -2
  76. package/src/components/navigation/types.ts +210 -188
  77. package/src/components/progress/_styles.scss +0 -65
  78. package/src/components/progress/config.ts +1 -2
  79. package/src/components/progress/constants.ts +0 -14
  80. package/src/components/progress/index.ts +1 -1
  81. package/src/components/progress/progress.ts +1 -4
  82. package/src/components/progress/types.ts +1 -4
  83. package/src/components/radios/_styles.scss +0 -45
  84. package/src/components/radios/api.ts +85 -60
  85. package/src/components/radios/config.ts +1 -2
  86. package/src/components/radios/constants.ts +0 -9
  87. package/src/components/radios/index.ts +1 -1
  88. package/src/components/radios/radio.ts +34 -11
  89. package/src/components/radios/radios.ts +2 -1
  90. package/src/components/radios/types.ts +1 -7
  91. package/src/components/search/_styles.scss +306 -0
  92. package/src/components/search/api.ts +203 -0
  93. package/src/components/search/config.ts +87 -0
  94. package/src/components/search/constants.ts +21 -0
  95. package/src/components/search/features/index.ts +4 -0
  96. package/src/components/search/features/search.ts +718 -0
  97. package/src/components/search/features/states.ts +165 -0
  98. package/src/components/search/features/structure.ts +198 -0
  99. package/src/components/search/index.ts +10 -0
  100. package/src/components/search/search.ts +52 -0
  101. package/src/components/search/types.ts +163 -0
  102. package/src/components/segmented-button/_styles.scss +117 -0
  103. package/src/components/segmented-button/config.ts +67 -0
  104. package/src/components/segmented-button/constants.ts +42 -0
  105. package/src/components/segmented-button/index.ts +4 -0
  106. package/src/components/segmented-button/segment.ts +155 -0
  107. package/src/components/segmented-button/segmented-button.ts +250 -0
  108. package/src/components/segmented-button/types.ts +219 -0
  109. package/src/components/slider/_styles.scss +221 -168
  110. package/src/components/slider/accessibility.md +59 -0
  111. package/src/components/slider/api.ts +41 -120
  112. package/src/components/slider/config.ts +51 -49
  113. package/src/components/slider/features/handlers.ts +495 -0
  114. package/src/components/slider/features/index.ts +1 -2
  115. package/src/components/slider/features/slider.ts +66 -84
  116. package/src/components/slider/features/states.ts +195 -0
  117. package/src/components/slider/features/structure.ts +141 -184
  118. package/src/components/slider/features/ui.ts +150 -201
  119. package/src/components/slider/index.ts +2 -11
  120. package/src/components/slider/slider.ts +9 -12
  121. package/src/components/slider/types.ts +39 -24
  122. package/src/components/switch/_styles.scss +0 -2
  123. package/src/components/tabs/_styles.scss +346 -154
  124. package/src/components/tabs/api.ts +178 -400
  125. package/src/components/tabs/config.ts +46 -52
  126. package/src/components/tabs/constants.ts +85 -8
  127. package/src/components/tabs/features.ts +403 -0
  128. package/src/components/tabs/index.ts +60 -3
  129. package/src/components/tabs/indicator.ts +285 -0
  130. package/src/components/tabs/responsive.ts +144 -0
  131. package/src/components/tabs/scroll-indicators.ts +149 -0
  132. package/src/components/tabs/state.ts +186 -0
  133. package/src/components/tabs/tab-api.ts +258 -0
  134. package/src/components/tabs/tab.ts +255 -0
  135. package/src/components/tabs/tabs.ts +50 -31
  136. package/src/components/tabs/types.ts +332 -128
  137. package/src/components/tabs/utils.ts +107 -0
  138. package/src/components/textfield/_styles.scss +0 -98
  139. package/src/components/textfield/config.ts +2 -3
  140. package/src/components/textfield/constants.ts +0 -14
  141. package/src/components/textfield/index.ts +2 -2
  142. package/src/components/textfield/textfield.ts +0 -2
  143. package/src/components/textfield/types.ts +1 -4
  144. package/src/components/timepicker/README.md +277 -0
  145. package/src/components/timepicker/_styles.scss +451 -0
  146. package/src/components/timepicker/api.ts +632 -0
  147. package/src/components/timepicker/clockdial.ts +482 -0
  148. package/src/components/timepicker/config.ts +130 -0
  149. package/src/components/timepicker/constants.ts +138 -0
  150. package/src/components/timepicker/index.ts +8 -0
  151. package/src/components/timepicker/render.ts +613 -0
  152. package/src/components/timepicker/timepicker.ts +117 -0
  153. package/src/components/timepicker/types.ts +336 -0
  154. package/src/components/timepicker/utils.ts +241 -0
  155. package/src/components/top-app-bar/_styles.scss +225 -0
  156. package/src/components/top-app-bar/config.ts +83 -0
  157. package/src/components/top-app-bar/index.ts +11 -0
  158. package/src/components/top-app-bar/top-app-bar.ts +316 -0
  159. package/src/components/top-app-bar/types.ts +140 -0
  160. package/src/core/build/_ripple.scss +6 -6
  161. package/src/core/build/ripple.ts +72 -95
  162. package/src/core/compose/component.ts +1 -1
  163. package/src/core/compose/features/badge.ts +79 -0
  164. package/src/core/compose/features/icon.ts +3 -1
  165. package/src/core/compose/features/index.ts +3 -1
  166. package/src/core/compose/features/ripple.ts +4 -1
  167. package/src/core/compose/features/textlabel.ts +26 -2
  168. package/src/core/dom/create.ts +5 -0
  169. package/src/index.ts +9 -0
  170. package/src/styles/abstract/_theme.scss +115 -3
  171. package/src/styles/themes/_autumn.scss +21 -0
  172. package/src/styles/themes/_base-theme.scss +61 -0
  173. package/src/styles/themes/_baseline.scss +58 -0
  174. package/src/styles/themes/_bluekhaki.scss +125 -0
  175. package/src/styles/themes/_brownbeige.scss +125 -0
  176. package/src/styles/themes/_browngreen.scss +125 -0
  177. package/src/styles/themes/_forest.scss +6 -0
  178. package/src/styles/themes/_greenbeige.scss +125 -0
  179. package/src/styles/themes/_material.scss +125 -0
  180. package/src/styles/themes/_ocean.scss +6 -0
  181. package/src/styles/themes/_sageivory.scss +125 -0
  182. package/src/styles/themes/_spring.scss +6 -0
  183. package/src/styles/themes/_summer.scss +5 -0
  184. package/src/styles/themes/_sunset.scss +5 -0
  185. package/src/styles/themes/_tealcaramel.scss +125 -0
  186. package/src/styles/themes/_winter.scss +6 -0
  187. package/src/components/card/actions.ts +0 -48
  188. package/src/components/card/header.ts +0 -88
  189. package/src/components/card/media.ts +0 -52
  190. package/src/components/navigation/features/items.js +0 -192
  191. package/src/components/slider/features/appearance.ts +0 -94
  192. package/src/components/slider/features/disabled.ts +0 -43
  193. package/src/components/slider/features/events.ts +0 -164
  194. package/src/components/slider/features/interactions.ts +0 -261
  195. package/src/components/slider/features/keyboard.ts +0 -112
  196. package/src/core/collection/adapters/mongodb.js +0 -232
@@ -1,9 +1,6 @@
1
1
  // src/components/slider/types.ts
2
2
  import { SLIDER_COLORS, SLIDER_SIZES, SLIDER_EVENTS } from './constants';
3
3
 
4
- /**
5
- * Configuration interface for the Slider component
6
- */
7
4
  export interface SliderConfig {
8
5
  /** Minimum value of the slider */
9
6
  min?: number;
@@ -14,7 +11,7 @@ export interface SliderConfig {
14
11
  /** Current value of the slider */
15
12
  value?: number;
16
13
 
17
- /** Secondary value for range slider (when using two thumbs) */
14
+ /** Secondary value for range slider (when using two handles) */
18
15
  secondValue?: number;
19
16
 
20
17
  /** Step size for discrete slider */
@@ -41,9 +38,21 @@ export interface SliderConfig {
41
38
  /** Whether to snap to steps while dragging (discrete slider) */
42
39
  snapToSteps?: boolean;
43
40
 
44
- /** Whether the slider is a range slider (two thumbs) */
41
+ /** Whether the slider is a range slider (two handles) */
45
42
  range?: boolean;
46
43
 
44
+ /** Label text for the slider */
45
+ label?: string;
46
+
47
+ /** Position of the label (start or end) - defaults to 'start' */
48
+ labelPosition?: 'start' | 'end';
49
+
50
+ /** Icon to display with the slider */
51
+ icon?: string;
52
+
53
+ /** Position of the icon (start or end) */
54
+ iconPosition?: 'start' | 'end';
55
+
47
56
  /** Additional CSS classes */
48
57
  class?: string;
49
58
 
@@ -53,34 +62,28 @@ export interface SliderConfig {
53
62
  };
54
63
  }
55
64
 
56
- /**
57
- * Slider event object
58
- */
59
65
  export interface SliderEvent {
60
- /** Slider component instance */
61
- slider: SliderComponent;
66
+ /** The slider component that triggered the event */
67
+ slider: any;
62
68
 
63
69
  /** Current slider value */
64
70
  value: number;
65
71
 
66
- /** Secondary slider value (for range slider) */
67
- secondValue?: number;
72
+ /** Secondary value (for range sliders) */
73
+ secondValue: number | null;
68
74
 
69
- /** Original event if applicable */
70
- originalEvent?: Event;
75
+ /** Original DOM event if available */
76
+ originalEvent: Event | null;
71
77
 
72
- /** Whether to prevent the default action */
78
+ /** Function to prevent default behavior */
73
79
  preventDefault: () => void;
74
80
 
75
- /** Whether default action was prevented */
81
+ /** Whether default behavior was prevented */
76
82
  defaultPrevented: boolean;
77
83
  }
78
84
 
79
- /**
80
- * Slider component interface
81
- */
82
85
  export interface SliderComponent {
83
- /** Slider element */
86
+ /** The root element of the slider */
84
87
  element: HTMLElement;
85
88
 
86
89
  /** Sets slider value */
@@ -95,16 +98,16 @@ export interface SliderComponent {
95
98
  /** Gets secondary slider value */
96
99
  getSecondValue: () => number | null;
97
100
 
98
- /** Sets slider minimum */
101
+ /** Sets slider minimum value */
99
102
  setMin: (min: number) => SliderComponent;
100
103
 
101
- /** Gets slider minimum */
104
+ /** Gets slider minimum value */
102
105
  getMin: () => number;
103
106
 
104
- /** Sets slider maximum */
107
+ /** Sets slider maximum value */
105
108
  setMax: (max: number) => SliderComponent;
106
109
 
107
- /** Gets slider maximum */
110
+ /** Gets slider maximum value */
108
111
  getMax: () => number;
109
112
 
110
113
  /** Sets slider step size */
@@ -140,6 +143,18 @@ export interface SliderComponent {
140
143
  /** Shows or hides current value while dragging */
141
144
  showCurrentValue: (show: boolean) => SliderComponent;
142
145
 
146
+ /** Sets label text */
147
+ setLabel: (text: string) => SliderComponent;
148
+
149
+ /** Gets label text */
150
+ getLabel: () => string;
151
+
152
+ /** Sets icon HTML */
153
+ setIcon: (iconHtml: string) => SliderComponent;
154
+
155
+ /** Gets icon HTML */
156
+ getIcon: () => string;
157
+
143
158
  /** Adds event listener */
144
159
  on: (event: keyof typeof SLIDER_EVENTS | typeof SLIDER_EVENTS[keyof typeof SLIDER_EVENTS], handler: (event: SliderEvent) => void) => SliderComponent;
145
160
 
@@ -89,8 +89,6 @@ $component: '#{base.$prefix}-switch';
89
89
 
90
90
  // Label position variants
91
91
  &--label-start {
92
- flex-direction: row-reverse;
93
-
94
92
  .#{$component}-label {
95
93
  margin-left: 0;
96
94
  margin-right: 12px;
@@ -5,220 +5,412 @@
5
5
  @use '../../styles/abstract/mixins' as m;
6
6
  @use '../../styles/abstract/theme' as t;
7
7
 
8
- $component: '#{base.$prefix}-tabs';
8
+ $component: '#{base.$prefix}-tab';
9
+ $container: '#{base.$prefix}-tabs';
9
10
 
10
- .#{$component} {
11
- // Base styles
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
- // Tabs list container
19
- &__list {
20
- display: flex;
21
- flex-direction: row;
22
- width: 100%;
23
- position: relative;
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
+ // Primary indicator specific styling
30
+ .#{$container}-indicator {
31
+ height: 4px;
32
+ border-radius: 3px 3px 0 0;
33
+ background-color: t.color('primary');
34
+ }
35
+ }
36
+
37
+ &--secondary {
38
+ min-height: 48px;
39
+ // Tab indicator styling for secondary variant
40
+ .#{$container}-indicator {
41
+ height: 2px;
42
+ border-radius: 0;
43
+ background-color: t.color('on-surface');
44
+ }
45
+ }
46
+
47
+ // Scrollable container
48
+ &--scrollable {
49
+ overflow: hidden;
24
50
 
25
- // Handle scrollable tabs
26
- .#{$component}--scrollable & {
51
+ .#{$container}-scroll {
52
+ display: flex;
27
53
  overflow-x: auto;
28
54
  scrollbar-width: none; // Firefox
29
- -ms-overflow-style: none; // IE/Edge
55
+ -ms-overflow-style: none; // IE and Edge
30
56
 
31
- // Hide scrollbar in WebKit
32
57
  &::-webkit-scrollbar {
33
- display: none;
58
+ display: none; // Chrome, Safari, and Opera
34
59
  }
35
60
  }
36
61
  }
37
62
 
38
- // Individual tab
39
- &__tab {
40
- position: relative;
41
- min-width: 90px;
42
- max-width: 360px;
63
+ // Container divider (5. Divider)
64
+ &-divider {
65
+ position: absolute;
66
+ bottom: 0;
67
+ left: 0;
68
+ right: 0;
69
+ height: 1px;
70
+ background-color: t.color('outline-variant'); // MD3: Outline variant color
71
+ }
72
+
73
+ // Tab indicator styling - base styles
74
+ &-indicator {
75
+ position: absolute;
76
+ bottom: 1px;
77
+ transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
78
+ width 250ms cubic-bezier(0.4, 0, 0.2, 1);
79
+ z-index: 1; // Ensure indicator appears above divider
80
+ }
81
+ }
82
+
83
+ // Individual Tab Styles
84
+ .#{$component} {
85
+ position: relative;
86
+ display: inline-flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ min-width: 90px;
90
+ max-width: 360px;
91
+ padding: 0 16px;
92
+ border: none;
93
+ border-radius: 5px;
94
+ background-color: transparent;
95
+ color: t.color('on-surface-variant');
96
+ cursor: pointer;
97
+ user-select: none;
98
+ flex-shrink: 0;
99
+
100
+ // Typography for label text (4. Label)
101
+ @include m.typography('label-large');
102
+
103
+ // Transition for state changes
104
+ transition:
105
+ background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
106
+ color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
107
+
108
+ // Container heights based on layout
109
+ &--text-only {
43
110
  height: 48px;
44
- padding: 0 16px;
45
- background: transparent;
46
- border: none;
47
- border-radius: 0;
48
- cursor: pointer;
111
+ }
112
+
113
+ &--icon-only {
114
+ height: 48px;
115
+ }
116
+
117
+ &--icon-and-text {
118
+ height: 64px;
119
+ flex-direction: column;
120
+ }
121
+
122
+ // Focus styles (3/7. Focused state)
123
+ &:focus {
49
124
  outline: none;
50
- overflow: hidden;
51
- flex-shrink: 0;
52
- box-sizing: border-box;
125
+ }
126
+
127
+ &:focus-visible {
128
+ outline: 2px solid t.color('primary');
129
+ outline-offset: -2px;
130
+ z-index: 1;
131
+ }
132
+
133
+ // Disabled state
134
+ &--disabled, &:disabled {
135
+ pointer-events: none;
136
+ opacity: 0.38;
137
+ }
138
+
139
+ // Tab Icon (3. Icon - optional)
140
+ &-icon {
141
+ display: flex;
142
+ align-items: center;
143
+ justify-content: center;
144
+ width: 24px;
145
+ height: 24px;
53
146
 
54
- // Typography
55
- @include m.typography('label-large');
56
- font-weight: 500;
147
+ svg {
148
+ width: 100%;
149
+ height: 100%;
150
+ fill: currentColor;
151
+ }
152
+ }
153
+
154
+ // Ensure proper vertical spacing for icon and text
155
+ &--icon-and-text {
156
+ .#{$component}-icon {
157
+ margin-bottom: 4px;
158
+ }
159
+ }
160
+
161
+ // Tab Text (4. Label)
162
+ &-text {
163
+ @include m.truncate;
164
+ max-width: 100%;
57
165
  text-align: center;
58
- color: t.color('on-surface-variant');
166
+ line-height: 1.2;
59
167
 
60
- // Transitions
61
- @include m.motion-transition(
62
- color,
63
- background-color
64
- );
65
-
66
- // Hover state
67
- &:hover:not(:disabled) {
68
- @include m.state-layer(t.color('on-surface'), 'hover');
168
+ .#{$component}--icon-only & {
169
+ @include m.visually-hidden;
69
170
  }
70
-
71
- // Active state
72
- &:active:not(:disabled) {
73
- @include m.state-layer(t.color('on-surface'), 'pressed');
171
+ }
172
+
173
+ // Badge positioning (2. Badge - optional)
174
+ .#{base.$prefix}-badge-wrapper {
175
+ .#{base.$prefix}-badge {
176
+ // Position for different tab layouts
177
+ &--top-right {
178
+ .#{$component}--icon-only & {
179
+ top: 4px;
180
+ right: 4px;
181
+ }
182
+
183
+ .#{$component}--text-only & {
184
+ top: 8px;
185
+ right: 8px;
186
+ }
187
+
188
+ .#{$component}--icon-and-text & {
189
+ top: 4px;
190
+ right: calc(50% - 20px);
191
+ }
192
+ }
74
193
  }
75
-
76
- // Selected state (active tab)
194
+ }
195
+
196
+ // ACTIVE TAB STATES - PRIMARY VARIANT
197
+ .#{$container}--primary & {
198
+ // Active Tab Base State - Apply to primary variant
77
199
  &--active {
78
200
  color: t.color('primary');
201
+
202
+ .#{$component}-icon {
203
+ color: t.color('primary');
204
+ }
205
+
206
+ // Hover state for active tabs
207
+ &:hover, &.#{$component}--hover {
208
+ background-color: t.alpha('primary', 0.08);
209
+ }
210
+
211
+ // Focused state for active tabs
212
+ &:focus-visible, &.#{$component}--focus {
213
+ background-color: t.alpha('primary', 0.1);
214
+ outline-color: t.color('primary');
215
+ }
216
+
217
+ // Pressed state for active tabs
218
+ &:active, &.#{$component}--pressed {
219
+ background-color: t.alpha('primary', 0.12);
220
+ }
79
221
  }
80
222
 
81
- // Focus state
82
- &:focus-visible {
83
- outline: 2px solid t.color('outline');
84
- outline-offset: -2px;
85
- z-index: 1;
86
- }
87
-
88
- // Disabled state
89
- &:disabled {
90
- pointer-events: none;
91
- color: t.alpha('on-surface', 0.38);
92
- cursor: default;
223
+ // Inactive Tabs - Primary variant
224
+ &:not(.#{$component}--active):not(.#{$component}--disabled):not(:disabled) {
225
+ color: t.color('on-surface-variant');
226
+
227
+ // Hover state for inactive tabs
228
+ &:hover, &.#{$component}--hover {
229
+ background-color: t.alpha('on-surface-variant', 0.08);
230
+ }
231
+
232
+ // Focused state for inactive tabs
233
+ &:focus-visible, &.#{$component}--focus {
234
+ background-color: t.alpha('on-surface-variant', 0.1);
235
+ outline-color: t.color('on-surface-variant');
236
+ }
237
+
238
+ // Pressed state for inactive tabs
239
+ &:active, &.#{$component}--pressed {
240
+ background-color: t.alpha('on-surface-variant', 0.12);
241
+ }
93
242
  }
94
-
95
- // Tab content
96
- &-content {
97
- display: flex;
98
- align-items: center;
99
- justify-content: center;
100
- gap: 8px;
101
- width: 100%;
102
- height: 100%;
243
+ }
244
+
245
+ // ACTIVE TAB STATES - SECONDARY VARIANT
246
+ .#{$container}--secondary & {
247
+ // Active Tab - Secondary variant
248
+ &--active {
249
+ color: t.color('on-surface');
250
+
251
+ .#{$component}-icon {
252
+ color: t.color('on-surface');
253
+ }
254
+
255
+ // Hover state for active tabs - secondary
256
+ &:hover, &.#{$component}--hover {
257
+ background-color: t.alpha('on-surface', 0.08);
258
+ }
259
+
260
+ // Focused state for active tabs - secondary
261
+ &:focus-visible, &.#{$component}--focus {
262
+ background-color: t.alpha('on-surface', 0.1);
263
+ outline-color: t.color('on-surface');
264
+ }
265
+
266
+ // Pressed state for active tabs - secondary
267
+ &:active, &.#{$component}--pressed {
268
+ background-color: t.alpha('on-surface', 0.12);
269
+ }
103
270
  }
104
271
 
105
- // Tab icon
106
- &-icon {
107
- display: flex;
108
- align-items: center;
109
- justify-content: center;
110
- width: 18px;
111
- height: 18px;
272
+ // Inactive Tabs - Secondary variant
273
+ &:not(.#{$component}--active):not(.#{$component}--disabled):not(:disabled) {
274
+ color: t.color('on-surface-variant');
275
+
276
+ // Hover state for inactive tabs - secondary
277
+ &:hover, &.#{$component}--hover {
278
+ background-color: t.alpha('on-surface-variant', 0.08);
279
+ }
280
+
281
+ // Focused state for inactive tabs - secondary
282
+ &:focus-visible, &.#{$component}--focus {
283
+ background-color: t.alpha('on-surface-variant', 0.1);
284
+ outline-color: t.color('on-surface-variant');
285
+ }
112
286
 
113
- svg {
114
- width: 18px;
115
- height: 18px;
116
- fill: currentColor;
287
+ // Pressed state for inactive tabs - secondary
288
+ &:active, &.#{$component}--pressed {
289
+ background-color: t.alpha('on-surface-variant', 0.12);
117
290
  }
118
291
  }
292
+ }
293
+
294
+ // Ripple effect styling
295
+ .#{$component}-ripple {
296
+ position: absolute;
297
+ top: 0;
298
+ left: 0;
299
+ right: 0;
300
+ bottom: 0;
301
+ overflow: hidden;
302
+ border-radius: inherit;
303
+ pointer-events: none;
119
304
 
120
- // Tab label
121
- &-label {
122
- @include m.truncate;
305
+ .ripple {
306
+ position: absolute;
307
+ border-radius: 50%;
308
+ transform: scale(0);
309
+ pointer-events: none;
310
+ background-color: currentColor;
311
+ opacity: 0.1;
312
+ transform-origin: center;
123
313
  }
124
314
  }
315
+ }
316
+
317
+ // Tab panel styles
318
+ .#{base.$prefix}-tab-panel {
319
+ padding: 16px;
125
320
 
126
- // Active indicator
127
- &__indicator {
321
+ &[hidden] {
322
+ display: none;
323
+ }
324
+ }
325
+
326
+ // Scroll indicators
327
+ .#{$container} {
328
+ &-scroll-indicator {
128
329
  position: absolute;
330
+ top: 0;
129
331
  bottom: 0;
130
- left: 0;
131
- height: 2px;
132
- background-color: t.color('primary');
133
- transform-origin: left center;
332
+ width: 24px;
333
+ pointer-events: none;
134
334
  z-index: 1;
335
+ opacity: 0;
336
+ transition: opacity 0.2s ease;
135
337
 
136
- .#{$component}--animated & {
137
- transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), width 250ms cubic-bezier(0.4, 0, 0.2, 1);
338
+ &.visible {
339
+ opacity: 1;
138
340
  }
139
341
 
140
- // Hide indicator if specified
141
- .#{$component}--no-indicator & {
142
- display: none;
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
- }
342
+ &--left {
343
+ left: 0;
344
+ background: linear-gradient(to right, t.color('surface'), transparent);
156
345
  }
157
346
 
158
- .#{$component}__indicator {
159
- background-color: t.color('primary');
347
+ &--right {
348
+ right: 0;
349
+ background: linear-gradient(to left, t.color('surface'), transparent);
160
350
  }
161
- }
162
-
163
- // Secondary variant
164
- &--secondary {
165
- .#{$component}__tab {
166
- color: t.color('on-surface-variant');
351
+
352
+ &--shadow {
353
+ &.#{$container}-scroll-indicator--left {
354
+ box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.2);
355
+ background: none;
356
+ }
167
357
 
168
- &--active {
169
- color: t.color('secondary');
358
+ &.#{$container}-scroll-indicator--right {
359
+ box-shadow: -2px 0 4px -2px rgba(0, 0, 0, 0.2);
360
+ background: none;
170
361
  }
171
362
  }
172
-
173
- .#{$component}__indicator {
174
- background-color: t.color('secondary');
175
- }
176
363
  }
177
364
 
178
- // Segmented variant (Material Design 3 segmented buttons style)
179
- &--segmented {
180
- background-color: t.color('surface-container-low');
181
- border-radius: 16px;
182
- padding: 4px;
365
+ &-scroll-button {
366
+ position: absolute;
367
+ top: 50%;
368
+ transform: translateY(-50%);
369
+ width: 40px;
370
+ height: 40px;
371
+ border-radius: 50%;
372
+ background-color: t.color('surface-container-high');
373
+ border: none;
374
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
375
+ display: flex;
376
+ align-items: center;
377
+ justify-content: center;
378
+ cursor: pointer;
379
+ z-index: 2;
380
+
381
+ &:disabled {
382
+ opacity: 0.38;
383
+ cursor: default;
384
+ }
183
385
 
184
- .#{$component}__list {
185
- background-color: transparent;
386
+ svg {
387
+ width: 24px;
388
+ height: 24px;
389
+ fill: t.color('on-surface');
186
390
  }
187
391
 
188
- .#{$component}__tab {
189
- border-radius: 12px;
190
- color: t.color('on-surface');
191
-
192
- &--active {
193
- background-color: t.color('surface');
194
- color: t.color('on-surface');
195
- @include m.elevation(1);
196
- }
392
+ &--left {
393
+ left: 4px;
197
394
  }
198
395
 
199
- .#{$component}__indicator {
200
- display: none;
396
+ &--right {
397
+ right: 4px;
201
398
  }
202
- }
203
-
204
- // Neutral variant
205
- &--neutral {
206
- .#{$component}__tab {
207
- color: t.color('on-surface-variant');
208
-
209
- &--active {
210
- color: t.color('on-surface');
211
- }
399
+
400
+ &:focus {
401
+ outline: none;
212
402
  }
213
403
 
214
- .#{$component}__indicator {
215
- background-color: t.color('on-surface');
404
+ &:focus-visible {
405
+ outline: 2px solid t.color('primary');
216
406
  }
217
407
  }
218
-
219
- // Disabled state
220
- &[aria-disabled="true"] {
221
- pointer-events: none;
222
- opacity: 0.38;
408
+ }
409
+
410
+ // Responsive styles for small screens
411
+ .#{$container}--responsive-small {
412
+ .#{$component} {
413
+ padding: 0 12px;
414
+ min-width: 72px;
223
415
  }
224
416
  }