Skip to content

Commit 39bfce5

Browse files
committed
chore(many): run lint
1 parent e795c61 commit 39bfce5

File tree

7 files changed

+137
-127
lines changed

7 files changed

+137
-127
lines changed

core/src/components/chip/chip.base.scss

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@
197197
}
198198

199199
::slotted(ion-icon:first-child) {
200-
@include mixins.margin(vars.$chip-icon-first-child-margin, vars.$chip-icon-first-child-margin-end, $start: vars.$chip-icon-first-child-margin);
200+
@include mixins.margin(
201+
vars.$chip-icon-first-child-margin,
202+
vars.$chip-icon-first-child-margin-end,
203+
$start: vars.$chip-icon-first-child-margin
204+
);
201205
}
202206

203207
::slotted(ion-icon:last-child) {
@@ -213,10 +217,17 @@
213217
}
214218

215219
::slotted(ion-avatar:first-child) {
216-
@include mixins.margin(vars.$chip-avatar-first-child-margin-vertical, $end: vars.$chip-avatar-first-child-margin-end, $start: vars.$chip-avatar-first-child-margin-start);
220+
@include mixins.margin(
221+
vars.$chip-avatar-first-child-margin-vertical,
222+
$end: vars.$chip-avatar-first-child-margin-end,
223+
$start: vars.$chip-avatar-first-child-margin-start
224+
);
217225
}
218226

219227
::slotted(ion-avatar:last-child) {
220-
@include mixins.margin(vars.$chip-avatar-last-child-margin-vertical, $end: vars.$chip-avatar-last-child-margin-end, $start: vars.$chip-avatar-last-child-margin-start);
228+
@include mixins.margin(
229+
vars.$chip-avatar-last-child-margin-vertical,
230+
$end: vars.$chip-avatar-last-child-margin-end,
231+
$start: vars.$chip-avatar-last-child-margin-start
232+
);
221233
}
222-

core/src/components/chip/chip.base.vars.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@ $chip-avatar-last-child-margin-vertical: var(--ion-chip-avatar-last-child-margin
146146
$chip-avatar-last-child-margin-start: var(--ion-chip-avatar-last-child-margin-start);
147147

148148
/// @prop - Avatar margin end for last child
149-
$chip-avatar-last-child-margin-end: var(--ion-chip-avatar-last-child-margin-end);
149+
$chip-avatar-last-child-margin-end: var(--ion-chip-avatar-last-child-margin-end);

core/src/themes/ios/default.tokens.ts

Lines changed: 102 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const colors = {
1010
backgroundColorRgb: 'var(--ion-background-color-rgb, 255, 255, 255)',
1111
textColor: 'var(--ion-text-color, #000)',
1212
textColorRgb: 'var(--ion-text-color-rgb, 0, 0, 0)',
13-
}
13+
};
1414

1515
const fontSizes = {
1616
chipBase: 14,
17-
}
17+
};
1818

1919
export const defaultTheme: DefaultTheme = {
2020
...baseDefaultTheme,
@@ -84,119 +84,118 @@ export const defaultTheme: DefaultTheme = {
8484
xxxxl: 'var(--ion-radii-full)',
8585
},
8686

87-
8887
components: {
89-
IonChip: {
90-
margin: '4px',
91-
paddingVertical: '6px',
92-
paddingHorizontal: '12px',
93-
94-
// Sizes
95-
size: {
96-
small: {
97-
height: '24px',
98-
fontSize: clamp('12px', `${(fontSizes.chipBase - 2) / 16}rem`, '20px'),
99-
},
100-
medium: {
101-
height: '32px',
102-
fontSize: clamp('13px', `${fontSizes.chipBase / 16}rem`, '22px'),
103-
},
104-
large: {
105-
height: '32px',
106-
fontSize: clamp('14px', `${(fontSizes.chipBase + 2) / 16}rem`, '24px'),
107-
},
88+
IonChip: {
89+
margin: '4px',
90+
paddingVertical: '6px',
91+
paddingHorizontal: '12px',
92+
93+
// Sizes
94+
size: {
95+
small: {
96+
height: '24px',
97+
fontSize: clamp('12px', `${(fontSizes.chipBase - 2) / 16}rem`, '20px'),
10898
},
109-
110-
// States
111-
state: {
112-
disabled: {
113-
opacity: '0.4',
114-
},
115-
focus: {
116-
bg: rgba(colors.textColorRgb, 0.16),
117-
semanticBg: currentColor('base', 0.12),
118-
outlineBg: rgba(colors.textColorRgb, 0.04),
119-
},
120-
activated: {
121-
bg: rgba(colors.textColorRgb, 0.2),
122-
semanticBg: currentColor('base', 0.16),
123-
},
124-
hover: {
125-
bg: rgba(colors.textColorRgb, 0.16),
126-
semanticBg: currentColor('base', 0.12),
127-
outlineBg: rgba(colors.textColorRgb, 0.04),
128-
},
99+
medium: {
100+
height: '32px',
101+
fontSize: clamp('13px', `${fontSizes.chipBase / 16}rem`, '22px'),
129102
},
130-
131-
// Shapes
132-
shape: {
133-
soft: {
134-
borderRadius: 'var(--ion-radii-250)',
135-
},
136-
round: {
137-
borderRadius: 'var(--ion-radii-full)',
138-
},
139-
rectangular: {
140-
borderRadius: 'var(--ion-radii-0)',
141-
},
103+
large: {
104+
height: '32px',
105+
fontSize: clamp('14px', `${(fontSizes.chipBase + 2) / 16}rem`, '24px'),
142106
},
143-
144-
// Hues
145-
hue: {
146-
bold: {
147-
bg: rgba(colors.textColorRgb, 0.12),
148-
color: rgba(colors.textColorRgb, 0.87),
149-
150-
outline: {
151-
borderColor: rgba(colors.textColorRgb, 0.32),
152-
},
153-
154-
// Any of the semantic colors like primary, secondary, etc.
155-
semantic: {
156-
bgAlpha: '0.08',
157-
color: currentColor('shade'),
158-
159-
outline: {
160-
borderColor: currentColor('base', 0.32),
161-
}
162-
},
107+
},
108+
109+
// States
110+
state: {
111+
disabled: {
112+
opacity: '0.4',
113+
},
114+
focus: {
115+
bg: rgba(colors.textColorRgb, 0.16),
116+
semanticBg: currentColor('base', 0.12),
117+
outlineBg: rgba(colors.textColorRgb, 0.04),
118+
},
119+
activated: {
120+
bg: rgba(colors.textColorRgb, 0.2),
121+
semanticBg: currentColor('base', 0.16),
122+
},
123+
hover: {
124+
bg: rgba(colors.textColorRgb, 0.16),
125+
semanticBg: currentColor('base', 0.12),
126+
outlineBg: rgba(colors.textColorRgb, 0.04),
127+
},
128+
},
129+
130+
// Shapes
131+
shape: {
132+
soft: {
133+
borderRadius: 'var(--ion-radii-250)',
134+
},
135+
round: {
136+
borderRadius: 'var(--ion-radii-full)',
137+
},
138+
rectangular: {
139+
borderRadius: 'var(--ion-radii-0)',
140+
},
141+
},
142+
143+
// Hues
144+
hue: {
145+
bold: {
146+
bg: rgba(colors.textColorRgb, 0.12),
147+
color: rgba(colors.textColorRgb, 0.87),
148+
149+
outline: {
150+
borderColor: rgba(colors.textColorRgb, 0.32),
163151
},
164-
subtle: {
165-
bg: rgba(colors.textColorRgb, 0.04),
166-
color: rgba(colors.textColorRgb, 0.87),
167-
152+
153+
// Any of the semantic colors like primary, secondary, etc.
154+
semantic: {
155+
bgAlpha: '0.08',
156+
color: currentColor('shade'),
157+
168158
outline: {
169-
borderColor: rgba(colors.textColorRgb, 0.32),
159+
borderColor: currentColor('base', 0.32),
170160
},
171161
},
172162
},
173-
174-
// Variants
175-
variant: {
163+
subtle: {
164+
bg: rgba(colors.textColorRgb, 0.04),
165+
color: rgba(colors.textColorRgb, 0.87),
166+
176167
outline: {
177-
borderWidth: '1px',
178-
bg: 'transparent',
168+
borderColor: rgba(colors.textColorRgb, 0.32),
179169
},
180170
},
181-
182-
icon: {
183-
size: `${20 / fontSizes.chipBase}em`,
184-
color: rgba(colors.textColorRgb, 0.54),
185-
firstChildMargin: '-4px',
186-
firstChildMarginEnd: '8px',
187-
lastChildMargin: '-4px',
188-
lastChildMarginStart: '8px',
189-
},
190-
191-
avatar: {
192-
size: `${24 / fontSizes.chipBase}em`,
193-
firstChildMarginVertical: '-4px',
194-
firstChildMarginStart: '-8px',
195-
firstChildMarginEnd: '8px',
196-
lastChildMarginVertical: '-4px',
197-
lastChildMarginStart: '8px',
198-
lastChildMarginEnd: '-8px',
171+
},
172+
173+
// Variants
174+
variant: {
175+
outline: {
176+
borderWidth: '1px',
177+
bg: 'transparent',
199178
},
200179
},
201-
}
180+
181+
icon: {
182+
size: `${20 / fontSizes.chipBase}em`,
183+
color: rgba(colors.textColorRgb, 0.54),
184+
firstChildMargin: '-4px',
185+
firstChildMarginEnd: '8px',
186+
lastChildMargin: '-4px',
187+
lastChildMarginStart: '8px',
188+
},
189+
190+
avatar: {
191+
size: `${24 / fontSizes.chipBase}em`,
192+
firstChildMarginVertical: '-4px',
193+
firstChildMarginStart: '-8px',
194+
firstChildMarginEnd: '8px',
195+
lastChildMarginVertical: '-4px',
196+
lastChildMarginStart: '8px',
197+
lastChildMarginEnd: '-8px',
198+
},
199+
},
200+
},
202201
};

core/src/themes/md/default.tokens.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const colors = {
1010
backgroundColorRgb: 'var(--ion-background-color-rgb, 255, 255, 255)',
1111
textColor: 'var(--ion-text-color, #000)',
1212
textColorRgb: 'var(--ion-text-color-rgb, 0, 0, 0)',
13-
}
13+
};
1414

1515
const fontSizes = {
1616
chipBase: 14,
17-
}
17+
};
1818

1919
export const defaultTheme: DefaultTheme = {
2020
...baseDefaultTheme,
@@ -162,7 +162,7 @@ export const defaultTheme: DefaultTheme = {
162162

163163
outline: {
164164
borderColor: currentColor('base', 0.32),
165-
}
165+
},
166166
},
167167
},
168168
subtle: {
@@ -202,5 +202,5 @@ export const defaultTheme: DefaultTheme = {
202202
lastChildMarginEnd: '-8px',
203203
},
204204
},
205-
}
205+
},
206206
};

core/src/themes/mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@use "./functions.string" as string;
2-
@use 'sass:meta';
2+
@use "sass:meta";
33

44
/**
55
* A heuristic that applies CSS to tablet

core/src/themes/themes.interfaces.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ type Components = {
326326

327327
outline: {
328328
borderColor: string;
329-
}
329+
};
330330

331331
// Any of the semantic colors like primary, secondary, etc.
332332
semantic: {
@@ -335,7 +335,7 @@ type Components = {
335335

336336
outline: {
337337
borderColor: string;
338-
}
338+
};
339339
};
340340
};
341341
subtle: {
@@ -344,7 +344,7 @@ type Components = {
344344

345345
outline: {
346346
borderColor: string;
347-
}
347+
};
348348
};
349349
};
350350

@@ -381,4 +381,4 @@ type Components = {
381381
IonTabBar?: any;
382382
IonModal?: any;
383383
IonToolbar?: any;
384-
};
384+
};

core/src/utils/test/theme.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -562,18 +562,18 @@ describe('generateComponentsThemeCSS', () => {
562562
const components = {
563563
IonChip: {
564564
hue: {
565-
subtle: {
566-
bg: 'red',
567-
color: 'white',
568-
borderColor: 'black',
569-
},
570-
bold: {
571-
bg: 'blue',
572-
color: 'white',
573-
borderColor: 'black',
565+
subtle: {
566+
bg: 'red',
567+
color: 'white',
568+
borderColor: 'black',
569+
},
570+
bold: {
571+
bg: 'blue',
572+
color: 'white',
573+
borderColor: 'black',
574+
},
574575
},
575576
},
576-
}
577577
};
578578

579579
const css = generateComponentsThemeCSS(components).replace(/\s/g, '');

0 commit comments

Comments
 (0)