Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19.1] Update RC #3313

Merged
merged 10 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[19.1] Removed elements (#3302)
* Remove: Grid deprecated

* Remove: Action icon

* Remove: Empty states deprecated

* Remove: Button mod-icon

* Remove: u-comma

* Remove: u-unit

* Remove: Box shadow deprecated

* Remove: Spacing tshirts

* Clean spacings loop
  • Loading branch information
jeremie-lucca authored Dec 17, 2024
commit 3ae878c48cd6344f155dbba44b4d409b3ab1d6bf
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ In your file styles.scss, add imports files and components you want to import to
@forward '@lucca-front/ng/src/main';

// Import SCSS components
@forward '@lucca-front/scss/src/components/actionIcon';
@forward '@lucca-front/scss/src/components/box';
@forward '@lucca-front/scss/src/components/breadcrumbs';
@forward '@lucca-front/scss/src/components/button';
Expand All @@ -47,7 +46,6 @@ In your file styles.scss, add imports files and components you want to import to
@forward '@lucca-front/scss/src/components/container';
@forward '@lucca-front/scss/src/components/contentSection';
@forward '@lucca-front/scss/src/components/divider';
@forward '@lucca-front/scss/src/components/emptyState';
@forward '@lucca-front/scss/src/components/errorPage';
@forward '@lucca-front/scss/src/components/field';
@forward '@lucca-front/scss/src/components/file';
Expand All @@ -56,7 +54,6 @@ In your file styles.scss, add imports files and components you want to import to
@forward '@lucca-front/scss/src/components/formLabel';
@forward '@lucca-front/scss/src/components/gauge';
@forward '@lucca-front/scss/src/components/grid';
@forward '@lucca-front/scss/src/components/grid';
@forward '@lucca-front/scss/src/components/header';
@forward '@lucca-front/scss/src/components/label';
@forward '@lucca-front/scss/src/components/layout';
Expand Down
2 changes: 1 addition & 1 deletion packages/ng/multi-select/panel/panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<div class="loading">{{intl.loading}}</div>
</div>
<div class="lu-picker-content-add" *ngIf="ctx.shouldDisplayAddOption">
<button class="button mod-text mod-icon palette-product" type="button" (click)="selectInput.emitAddOption()">
<button class="button mod-text mod-withIcon palette-product" type="button" (click)="selectInput.emitAddOption()">
<span aria-hidden="true" class="lucca-icon icon-mathsPlus"></span>
<ng-container *luPortal="selectInput.addOptionLabel" />
</button>
Expand Down
2 changes: 1 addition & 1 deletion packages/ng/simple-select/panel/panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div class="loading">{{intl.loading}}</div>
</div>
<div class="lu-picker-content-add" *ngIf="ctx.shouldDisplayAddOption">
<button class="button mod-text mod-icon palette-product" type="button" (click)="selectInput.emitAddOption()">
<button class="button mod-text mod-withIcon palette-product" type="button" (click)="selectInput.emitAddOption()">
<span aria-hidden="true" class="lucca-icon icon-mathsPlus"></span>
<ng-container *luPortal="selectInput.addOptionLabel" />
</button>
Expand Down
49 changes: 1 addition & 48 deletions packages/scss/src/commons/config.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use 'sass:list';

$importDeprecatedSpacings: true !default;
$isNamespaced: false !default;

$fontFamily: 'SourceSans' !default;
Expand Down Expand Up @@ -494,17 +493,6 @@ $spacings: (
'800': 4rem,
) !default;

$spacingsDeprecated: (
'0': 0,
XXS: 0.25rem,
XS: 0.5rem,
S: 1rem,
M: 1.5rem,
L: 2rem,
XL: 3rem,
XXL: 4rem,
) !default;

$sizes: (
XS: (
fontSize: 0.75rem,
Expand Down Expand Up @@ -550,22 +538,6 @@ $borderRadius: (
'full': 9999px,
) !default;

// $elevations are deprecated
$elevations: (
'1':
'0 1px 2px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent), 0px 2px 8px color-mix(in srgb, var(--palettes-neutral-900) 4%, transparent)',
'2':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 1px 2px color-mix(in srgb, var(--palettes-neutral-900) 2%, transparent), 0 2px 6px color-mix(in srgb, var(--palettes-neutral-900) 5%, transparent)',
'3':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 2px 4px color-mix(in srgb, var(--palettes-neutral-900) 2%, transparent), 0 4px 10px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent)',
'4':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 3px 6px color-mix(in srgb, var(--palettes-neutral-900) 4%, transparent), 0 4px 16px color-mix(in srgb, var(--palettes-neutral-900) 8%, transparent)',
'5':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 4px 8px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent), 0 12px 32px color-mix(in srgb, var(--palettes-neutral-900) 8%, transparent)',
'6':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), -2px 2px 8px color-mix(in srgb, var(--palettes-neutral-900) 4%, transparent), -12px 6px 24px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent)',
);

// opacity is deprecated
$disabled: (
'opacity': 0.4,
Expand Down Expand Up @@ -595,30 +567,11 @@ $loading: (
$textLink: (
color: var(--palettes-product-700),
hover: var(--palettes-product-600),
disabled: var(--palettes-neutral-500),
// disabled token candidate
disabled: var(--palettes-neutral-500), // disabled token candidate
);

// Deprecated

// $boxShadows are deprecated
$boxShadows: (
'XXS':
'0 2px 8px color-mix(in srgb, var(--palettes-neutral-900) 2%, transparent), 0 1px 2px color-mix(in srgb, var(--palettes-neutral-900) 15%, transparent)',
'XS':
'0 1px 2px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent), 0 2px 8px color-mix(in srgb, var(--palettes-neutral-900) 4%, transparent)',
'S':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 1px 2px color-mix(in srgb, var(--palettes-neutral-900) 2%, transparent), 0 2px 6px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent)',
'M':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 2px 4px color-mix(in srgb, var(--palettes-neutral-900) 2%, transparent), 0 4px 10px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent)',
'L':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 3px 6px color-mix(in srgb, var(--palettes-neutral-900) 4%, transparent), 0 4px 16px color-mix(in srgb, var(--palettes-neutral-900) 8%, transparent)',
'XL':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), 0 4px 8px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent), 0 12px 32px color-mix(in srgb, var(--palettes-neutral-900) 8%, transparent)',
'XXL':
'0 0 0 1px color-mix(in srgb, var(--palettes-neutral-900) 3%, transparent), -2px 2px 8px color-mix(in srgb, var(--palettes-neutral-900) 4%, transparent), -12px 6px 24px color-mix(in srgb, var(--palettes-neutral-900) 6%, transparent)',
);

// $colors are deprecated
$colors: (
'white': #ffffff,
Expand Down
28 changes: 9 additions & 19 deletions packages/scss/src/commons/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,30 @@ $overflow: 'hidden', 'auto', 'visible', 'scroll';

/* Tokens */

@mixin spacing($boxModel, $boxDirection, $key, $value, $suffix: '!important', $token: true) {
@if $token {
.pr-u-#{transform.camelize($boxModel)}#{transform.capitalize($boxDirection)}#{transform.capitalize($key)} {
#{$boxModel}#{if($boxDirection == '', '', '-')}#{$boxDirection}: var(--pr-t-spacings-#{$key}) #{$suffix};
}
} @else {
.u-#{transform.camelize($boxModel)}#{transform.capitalize($boxDirection)}#{transform.capitalize($key)} {
#{$boxModel}#{if($boxDirection == '', '', '-')}#{$boxDirection}: var(--spacings-#{$key}) #{$suffix};
}
@mixin spacing($boxModel, $boxDirection, $key, $value, $suffix: '!important') {
.pr-u-#{transform.camelize($boxModel)}#{transform.capitalize($boxDirection)}#{transform.capitalize($key)} {
#{$boxModel}#{if($boxDirection == '', '', '-')}#{$boxDirection}: var(--pr-t-spacings-#{$key}) #{$suffix};
}
}

@mixin spacings($token: true) {
$spacings: config.$spacingsDeprecated;
@if $token {
$spacings: config.$spacings;
}
@mixin spacings() {
@each $boxModel in $boxModel {
@each $boxDirection in $boxDirection {
@each $key, $value in $spacings {
@each $key, $value in config.$spacings {
@if $boxModel != 'border' or $value == 0 {
@include spacing($boxModel, $boxDirection, $key, $value, $token: $token);
@include spacing($boxModel, $boxDirection, $key, $value);
}
}

@if $boxModel == 'margin' {
@include spacing($boxModel, $boxDirection, $key: 'auto', $value: auto, $token: $token);
@include spacing($boxModel, $boxDirection, $key: 'auto', $value: auto);
}
}
}

@each $gap in $gaps {
@each $key, $value in $spacings {
@include spacing($gap, $boxDirection: '', $key: $key, $value: $value, $token: $token);
@each $key, $value in config.$spacings {
@include spacing($gap, $boxDirection: '', $key: $key, $value: $value);
}
}
}
Expand Down
28 changes: 0 additions & 28 deletions packages/scss/src/commons/utils/index.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@use 'sass:list';

@use '@lucca-front/icons/src/commons/core' as transform;

@use '@lucca-front/scss/src/commons/config';
@use '@lucca-front/scss/src/commons/core';

@use '@lucca-front/scss/src/commons/utils/keyframe';
Expand Down Expand Up @@ -245,20 +243,6 @@
color: var(--palettes-neutral-700) !important;
}

// .u-unit is deprecated
.u-unit {
font-size: 0.66em !important;
}

// .u-comma is deprecated
.u-comma {
&:not(:last-child) {
&::after {
content: ', ' !important;
}
}
}

.u-fontWeightRegular {
font-weight: 400 !important;
}
Expand Down Expand Up @@ -286,15 +270,6 @@
font-family: var(--commons-font-family-cursive) !important;
}

@each $elevation in config.$elevations {
$index: list.index(config.$elevations, $elevation);

// .u-elevate* is deprecated
.u-elevate#{$index} {
box-shadow: var(--commons-elevations-elevation-#{$index});
}
}

@include core.classes('float', core.$float);
@include core.classes('vertical-align', core.$verticalAlign);
@include core.classes('white-space', core.$whiteSpace);
Expand Down Expand Up @@ -366,9 +341,6 @@
}

@include core.spacings;
@if (config.$importDeprecatedSpacings) {
@include core.spacings($token: false);
}
@include core.sizes;
@include core.borderRadius;
@include core.palettes;
7 changes: 0 additions & 7 deletions packages/scss/src/commons/vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
}

@include core.cssvars('breakpoints', config.$breakpoints, '-breakAt');
@if (config.$importDeprecatedSpacings) {
@include core.cssvars('spacings', config.$spacingsDeprecated);
--spacings-auto: auto;
}

@include core.cssvars('commons-elevations-elevation', config.$elevations);
@include core.cssvars('commons-boxShadow', config.$boxShadows); // deprecated

@each $key, $map in config.$sizes {
@include core.cssvars('sizes-#{$key}', $map);
Expand Down
36 changes: 0 additions & 36 deletions packages/scss/src/components/actionIcon/component.scss

This file was deleted.

4 changes: 0 additions & 4 deletions packages/scss/src/components/actionIcon/exports.scss

This file was deleted.

40 changes: 0 additions & 40 deletions packages/scss/src/components/actionIcon/index.scss

This file was deleted.

69 changes: 0 additions & 69 deletions packages/scss/src/components/actionIcon/mods.scss

This file was deleted.

Loading
Loading