Skip to content

Commit e3bfdf0

Browse files
committed
fix: update deps
2 parents bf17cf3 + 73e66c4 commit e3bfdf0

22 files changed

Lines changed: 1710 additions & 483 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ node_modules/
2828
# Ignore lock
2929
yarn.lock
3030

31-
#dist/
31+
dist/*.zip
32+
3233
*storybook.log
3334
storybook-static
Lines changed: 43 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@
1818
align-items: center;
1919
user-select: none;
2020
vertical-align: top;
21-
22-
&:focus {
23-
outline: none;
24-
background-color: var(--md-sys-color-primary);
25-
color: var(--md-sys-color-on-primary);
26-
}
21+
}
22+
.chip:focus {
23+
outline: none;
24+
background-color: var(--md-sys-color-primary);
25+
color: var(--md-sys-color-on-primary);
2726
}
2827

2928
.chip.outlined {
@@ -62,8 +61,6 @@
6261
background-color: #8888;
6362
}
6463

65-
//--------------------------
66-
6764
.chips {
6865
display: flex;
6966
gap: 4px;
@@ -72,68 +69,58 @@
7269
box-shadow: none;
7370
margin: 0 0 8px 0;
7471
padding: 4px;
75-
// min-height: 45px;
72+
/* min-height: 45px; */
7673
outline: none;
77-
transition: all .3s;
78-
79-
&.focus {
80-
border-bottom: 1px solid var(--md-sys-color-primary);
81-
box-shadow: 0 1px 0 0 var(--md-sys-color-primary);
82-
}
83-
84-
&.input-field {
85-
border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
86-
87-
&:hover {
88-
cursor: text;
89-
}
90-
}
91-
92-
input:not([type]):not(.browser-default).input {
93-
background: none;
94-
border: 0;
95-
color: var(--md-sys-color-on-background);
96-
display: inline-block;
97-
font-size: 16px;
98-
// height: 32px;
99-
// line-height: 32px;
100-
height: 32px;
101-
outline: 0;
102-
margin: 0;
103-
padding: 0;
104-
width: 120px;
105-
width: fit-content;
106-
min-width: 100px;
107-
max-width: 200px;
108-
109-
&:focus {
110-
border: 0;
111-
box-shadow: none;
112-
}
113-
}
74+
transition: all 0.3s;
75+
}
76+
.chips.focus {
77+
border-bottom: 1px solid var(--md-sys-color-primary);
78+
box-shadow: 0 1px 0 0 var(--md-sys-color-primary);
79+
}
80+
.chips.input-field {
81+
border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
82+
}
83+
.chis input:not([type]):not(.browser-default).input {
84+
background: none;
85+
border: 0;
86+
color: var(--md-sys-color-on-background);
87+
display: inline-block;
88+
font-size: 16px;
89+
/* height: 32px;
90+
line-height: 32px; */
91+
height: 32px;
92+
outline: 0;
93+
margin: 0;
94+
padding: 0;
95+
width: 120px;
96+
width: fit-content;
97+
min-width: 100px;
98+
max-width: 200px;
99+
}
114100

115-
// Autocomplete
116-
.autocomplete-content {
117-
margin-top: 0;
118-
margin-bottom: 0;
119-
}
101+
.chis input:not([type]):not(.browser-default).input:focus {
102+
border: 0;
103+
box-shadow: none;
104+
}
105+
.chips.input-field:hover {
106+
cursor: text;
107+
}
108+
.chips .autocomplete-content {
109+
margin-top: 0;
110+
margin-bottom: 0;
120111
}
121112

122-
// Form prefix
123113
.prefix ~ .chips {
124114
margin-left: 3rem;
125115
width: 92%;
126116
width: calc(100% - 3rem);
127117
}
128-
129-
// Form suffix
130118
.suffix ~ .chips {
131119
margin-right: 3rem;
132120
width: 92%;
133121
width: calc(100% - 3rem);
134122
}
135-
136-
.chips:empty ~ label {
123+
.chips:empty ~ label {
137124
font-size: 0.8rem;
138125
transform: translateY(-140%);
139126
}

components/tabs/_tabs.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
background-color: var(--md-sys-color-surface);
1111
margin: 0 auto;
1212
white-space: nowrap;
13+
scrollbar-width: none;
1314

1415
&.tabs-transparent {
1516
background-color: transparent;
@@ -78,12 +79,15 @@
7879
flex-direction: column;
7980
width: 100%;
8081
height: 100%;
81-
min-height: 48px; //needed for only-icons tabs
82+
min-height: 48px; //needed for only-icons tabs
8283
padding: 0 24px;
8384
font-size: 14px;
8485
text-overflow: ellipsis;
86+
user-select: none;
8587
overflow: hidden;
86-
transition: color .28s ease, background-color .28s ease;
88+
transition:
89+
color 0.28s ease,
90+
background-color 0.28s ease;
8791

8892
&.active {
8993
background-color: transparent;

components/tabs/tabs.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ export class Tabs extends Component<TabsOptions> {
119119
_setupEventHandlers() {
120120
window.addEventListener('resize', this._handleWindowResize);
121121
this.el.addEventListener('click', this._handleTabClick);
122+
// map vertical scrolling to horizontal scrolling because no scrollbar is shown on desktop
123+
this.el.addEventListener('wheel', (event) => {
124+
if (event.deltaY !== 0) {
125+
event.preventDefault();
126+
this.el.scrollLeft += event.deltaY * 1;
127+
}
128+
});
122129
}
123130

124131
_removeEventHandlers() {
@@ -304,11 +311,11 @@ export class Tabs extends Component<TabsOptions> {
304311
this._tabWidth = Math.max(this._tabsWidth, this.el.scrollWidth) / this._tabLinks.length;
305312
}
306313

307-
_calcRightPos(el) {
314+
_calcRightPos(el: HTMLElement) {
308315
return Math.ceil(this._tabsWidth - el.offsetLeft - el.getBoundingClientRect().width);
309316
}
310317

311-
_calcLeftPos(el) {
318+
_calcLeftPos(el: HTMLElement) {
312319
return Math.floor(el.offsetLeft);
313320
}
314321

@@ -321,7 +328,7 @@ export class Tabs extends Component<TabsOptions> {
321328
this._animateIndicator(this._index);
322329
}
323330

324-
_animateIndicator(prevIndex) {
331+
_animateIndicator(prevIndex: number) {
325332
let leftDelay = 0,
326333
rightDelay = 0;
327334

0 commit comments

Comments
 (0)