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

LF Responsive #2875

Open
wants to merge 50 commits into
base: rc
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d59cd81
responsive + container + css vars + story
vvalentin-lucca Jun 5, 2024
d3ed03b
remove mixin
vvalentin-lucca Jun 7, 2024
a9ad9f6
responsive
vvalentin-lucca Jun 20, 2024
abf581e
Merge branch 'rc' into responsive
vvalentin-lucca Jun 20, 2024
4c382bb
wip
vvalentin-lucca Jun 24, 2024
dcdb540
Merge branch 'rc' into responsive
vvalentin-lucca Jul 16, 2024
b2e430d
config
vvalentin-lucca Jul 16, 2024
35f218a
Merge branch 'rc' into responsive
vvalentin-lucca Jul 26, 2024
b2642e7
index
vvalentin-lucca Jul 26, 2024
b7c463b
Merge branch 'rc' into responsive
vvalentin-lucca Jul 26, 2024
5a3d58e
Merge branch 'rc' into responsive
vvalentin-lucca Aug 19, 2024
41b1099
pageHeader narrow
vvalentin-lucca Aug 19, 2024
bbaeaf5
Merge branch 'rc' into responsive
vvalentin-lucca Aug 19, 2024
560c92f
inline-size + readme
vvalentin-lucca Aug 19, 2024
5915e03
debug + stories
vvalentin-lucca Aug 19, 2024
f253a49
renaming vars
vvalentin-lucca Aug 21, 2024
6d58601
remove containers
vvalentin-lucca Aug 21, 2024
879f72a
Merge branch 'rc' into responsive
vvalentin-lucca Aug 21, 2024
b66b671
sample
vvalentin-lucca Aug 21, 2024
5db9293
axis
vvalentin-lucca Aug 21, 2024
ab3adf0
wrappers
vvalentin-lucca Aug 21, 2024
ff40600
footer + responsive + sticky
vvalentin-lucca Aug 22, 2024
7774934
auto-wrapper
vvalentin-lucca Aug 26, 2024
a451494
auto-wrapper 2
vvalentin-lucca Aug 27, 2024
86126d9
default rwd
vvalentin-lucca Oct 11, 2024
27d7534
Merge branch 'rc' into responsive
vvalentin-lucca Oct 11, 2024
8fec2d2
fix build error
jeremie-lucca Oct 14, 2024
f654144
index @use order
jeremie-lucca Oct 14, 2024
4d3c2be
fix double mixin import
jeremie-lucca Oct 14, 2024
91d877e
segmentedControl
vvalentin-lucca Oct 14, 2024
1c104e7
section
vvalentin-lucca Oct 14, 2024
f7bd5da
--amend
vvalentin-lucca Oct 14, 2024
0400337
emptyState
vvalentin-lucca Oct 14, 2024
3e72939
navSide
vvalentin-lucca Oct 14, 2024
9592f2e
replace vars by title import on empty states
jeremie-lucca Oct 14, 2024
4bd024e
fix comment
vvalentin-lucca Oct 14, 2024
3972c9b
fix comment
vvalentin-lucca Oct 14, 2024
058e2a7
storybook parent block
jeremie-lucca Oct 14, 2024
c9dbea1
stories : remove display block
vvalentin-lucca Oct 14, 2024
5997fdf
fix conflicts
jeremie-lucca Oct 15, 2024
b54cd4b
fix cssvar typo
jeremie-lucca Oct 16, 2024
355441a
fix root story selector
jeremie-lucca Oct 16, 2024
d0d0050
fix empty state title component import
jeremie-lucca Oct 16, 2024
b49215b
Merge branch 'rc' into responsive
jeremie-lucca Oct 16, 2024
de590d6
revert @container
vvalentin-lucca Oct 21, 2024
78252f7
Merge branch 'rc' into responsive
jeremie-lucca Oct 21, 2024
be31583
Merge branch 'rc' into responsive
jeremie-lucca Oct 22, 2024
dd1a5b5
fix grid container
vvalentin-lucca Oct 23, 2024
f6379b1
fix conflicts
jeremie-lucca Oct 29, 2024
8e94283
rebase & fix conflicts
jeremie-lucca Dec 20, 2024
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
6 changes: 6 additions & 0 deletions .storybook/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
@import '../packages/scss/src/main-all';
@import '../packages/ng/styles/main';

storybook-root,
[ng-version] {
// Apply block display by default to story root for @container purposes
display: block;
}

.demo-utilityWrapper {
display: flex;
gap: var(--pr-t-spacings-100);
Expand Down
63 changes: 5 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,64 +31,11 @@ In your file styles.scss, add imports files and components you want to import to
@forward '@lucca-front/scss/src/main';
@forward '@lucca-front/ng/src/main';

// Import SCSS components
@forward '@lucca-front/scss/src/components/box';
@forward '@lucca-front/scss/src/components/breadcrumbs';
@forward '@lucca-front/scss/src/components/button';
@forward '@lucca-front/scss/src/components/buttonGroup';
@forward '@lucca-front/scss/src/components/callout';
@forward '@lucca-front/scss/src/components/card';
@forward '@lucca-front/scss/src/components/checkbox';
@forward '@lucca-front/scss/src/components/chip';
@forward '@lucca-front/scss/src/components/clear';
@forward '@lucca-front/scss/src/components/code';
@forward '@lucca-front/scss/src/components/collapse';
@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/errorPage';
@forward '@lucca-front/scss/src/components/field';
@forward '@lucca-front/scss/src/components/file';
@forward '@lucca-front/scss/src/components/filters';
@forward '@lucca-front/scss/src/components/form';
@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/header';
@forward '@lucca-front/scss/src/components/label';
@forward '@lucca-front/scss/src/components/layout';
@forward '@lucca-front/scss/src/components/link';
@forward '@lucca-front/scss/src/components/list';
@forward '@lucca-front/scss/src/components/loading';
@forward '@lucca-front/scss/src/components/main';
@forward '@lucca-front/scss/src/components/menu';
@forward '@lucca-front/scss/src/components/navSide';
@forward '@lucca-front/scss/src/components/notchBox';
@forward '@lucca-front/scss/src/components/pageHeader';
@forward '@lucca-front/scss/src/components/pagination';
@forward '@lucca-front/scss/src/components/progress';
@forward '@lucca-front/scss/src/components/radio';
@forward '@lucca-front/scss/src/components/radioButtons';
@forward '@lucca-front/scss/src/components/section';
@forward '@lucca-front/scss/src/components/sortableList';
@forward '@lucca-front/scss/src/components/statusBadge';
@forward '@lucca-front/scss/src/components/switch';
@forward '@lucca-front/scss/src/components/table';
@forward '@lucca-front/scss/src/components/tableFixed';
@forward '@lucca-front/scss/src/components/tableOfContent';
@forward '@lucca-front/scss/src/components/tableSorted';
@forward '@lucca-front/scss/src/components/tableSticked';
@forward '@lucca-front/scss/src/components/tag';
@forward '@lucca-front/scss/src/components/textfield';
@forward '@lucca-front/scss/src/components/timeline';
@forward '@lucca-front/scss/src/components/timepicker';
@forward '@lucca-front/scss/src/components/title';
@forward '@lucca-front/scss/src/components/titleSection';
@forward '@lucca-front/scss/src/components/toast';
@forward '@lucca-front/scss/src/components/verticalNavigation';
```

Then comment unused components to reduce LF’s distribution size and compilation time.
// Import SCSS components you use to reduce LF’s distribution size and compilation time.
@use '@lucca-front/scss/src/components/componentA';
@use '@lucca-front/scss/src/components/componentB';
@use '@lucca-front/scss/src/components/componentC';
```

To import all components, replace the previous code by the 3 following lines (not recommended):

Expand Down
1 change: 1 addition & 0 deletions packages/icons/src/icon/exports.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@forward 'vars';
@forward 'mods';
@forward 'states';
@forward 'responsive';
@forward 'component';
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lu-comment-block {
display: block;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { COMMENT_BLOCK_INSTANCE, COMMENT_CHAT_INSTANCE } from '../token';
standalone: true,
imports: [NgTemplateOutlet],
templateUrl: './comment-block.component.html',

styleUrl: './comment-block.component.scss',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@use '@lucca-front/scss/src/components/emptyState';

.emptyState-wrapper {
lu-empty-state-page {
display: flex;
flex-direction: column;
flex-grow: 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import { LuSafeExternalSvgPipe } from '@lucca-front/ng/safe-content';
styleUrl: './empty-state-page.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
host: {
class: 'emptyState-wrapper',
},
})
export class EmptyStatePageComponent {
@Input()
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
@use '@lucca-front/scss/src/components/emptyState';

lu-empty-state-section {
display: block;
}
94 changes: 67 additions & 27 deletions packages/scss/src/commons/utils/container.scss
Original file line number Diff line number Diff line change
@@ -1,77 +1,117 @@
@use 'sass:string';
@use '@lucca-front/scss/src/commons/utils/media';

// dans cette page tous les mixins sont des raccourcis vers media.query et media.queries
@mixin auto($containerName) {
*:has(> .#{$containerName}:not(.rwd-disableAutoContainer)) {
container-type: inline-size;
container-name: string.unquote($containerName);
}
}

// dans ce qui suit tous les mixins sont des raccourcis vers media.query et media.queries

// les raccourcis des requêtes simples et multiples

@mixin query($breakpoint, $property: 'width', $max: false, $name: '') {
@include media.query($breakpoint: $breakpoint, $property: $property, $max: $max, $at: 'container', $name: $name) {
@content;
@mixin query($breakpoint, $breakpoint2, $axis: 'width', $inverted: false, $containerName: '') {
// si on breakpoint supplémentaire est passé, c’est queries qu’il faut appeler
@if $breakpoint2 != null {
@include queries(
$breakpoint1: $breakpoint,
$breakpoint2: $breakpoint2,
$axis: $axis,
$at: 'container',
$containerName: $containerName,
$inverted: $inverted
) {
@content;
}
} @else {
@include media.query($breakpoint: $breakpoint, $axis: $axis, $inverted: $inverted, $at: 'container', $containerName: $containerName) {
@content;
}
}
}

@mixin queries($breakpoint1, $breakpoint2, $property: 'width', $name: '') {
@include media.queries($breakpoint1, $breakpoint2, $property: $property, $at: 'container', $name: $name) {
@mixin queries($breakpoint1, $breakpoint2, $inverted: false, $axis: 'width', $containerName: '') {
@include media.queries($breakpoint1, $breakpoint2, $inverted: $inverted, $axis: $axis, $at: 'container', $containerName: $containerName) {
@content;
}
}

// les raccourcis pour min/max/between
// les raccourcis pour min/max/inside/outside

@mixin min($breakpoint, $axis: 'width', $containerName: '') {
@include media.query($breakpoint: $breakpoint, $axis: $axis, $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin min($breakpoint, $property: 'width', $name: '') {
@include media.query($breakpoint: $breakpoint, $property: $property, $at: 'container', $name: $name) {
@mixin max($breakpoint, $axis: 'width', $containerName: '') {
@include media.query($breakpoint, $axis: $axis, $inverted: true, $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin max($breakpoint, $property: 'width', $name: '') {
@include media.query($breakpoint, $property: $property, $max: true, $at: 'container', $name: $name) {
@mixin inside($breakpoint1, $breakpoint2, $axis: 'width', $containerName: '') {
@include media.queries($breakpoint1, $breakpoint2, $axis: $axis, $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin between($breakpoint1, $breakpoint2, $property: 'width', $name: '') {
@include media.queries($breakpoint1, $breakpoint2, $property: $property, $at: 'container', $name: $name) {
@mixin outside($breakpoint1, $breakpoint2, $axis: 'width', $containerName: '') {
@include media.queries($breakpoint1, $breakpoint2, $axis: $axis, $at: 'container', $containerName: $containerName, $inverted: true) {
@content;
}
}

// les raccourcis pour minWidth/maxWidth/betweenWidths
// les raccourcis pour minWidth/maxWidth/insideWidths/outsideWidths

@mixin minWidth($breakpoint, $name: '') {
@include media.query($breakpoint, $at: 'container', $name: $name) {
@mixin minWidth($breakpoint, $containerName: '') {
@include media.query($breakpoint, $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin maxWidth($breakpoint, $name: '') {
@include media.query($breakpoint, $max: true, $at: 'container', $name: $name) {
@mixin maxWidth($breakpoint, $containerName: '') {
@include media.query($breakpoint, $inverted: true, $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin betweenWidths($breakpoint1, $breakpoint2, $name: '') {
@include media.queries($breakpoint1, $breakpoint2, $at: 'container', $name: $name) {
@mixin insideWidths($breakpoint1, $breakpoint2, $containerName: '') {
@include media.queries($breakpoint1, $breakpoint2, $at: 'container', $containerName: $containerName) {
@content;
}
}

// les raccourcis pour minHeight/maxHeight/betweenHeights
@mixin outsideWidths($breakpoint1, $breakpoint2, $containerName: '') {
@include media.queries($breakpoint1, $breakpoint2, $at: 'container', $containerName: $containerName, $inverted: true) {
@content;
}
}

// les raccourcis pour minHeight/maxHeight/insideHeights/outsideHeights

@mixin minHeight($breakpoint, $containerName: '') {
@include media.query($breakpoint, $axis: 'height', $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin minHeight($breakpoint, $name: '') {
@include media.query($breakpoint, $property: 'height', $at: 'container', $name: $name) {
@mixin maxHeight($breakpoint, $containerName: '') {
@include media.query($breakpoint, $inverted: true, $axis: 'height', $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin maxHeight($breakpoint, $name: '') {
@include media.query($breakpoint, $max: true, $property: 'height', $at: 'container', $name: $name) {
@mixin insideHeights($breakpoint1, $breakpoint2, $containerName: '') {
@include media.queries($breakpoint1, $breakpoint2, $axis: 'height', $at: 'container', $containerName: $containerName) {
@content;
}
}

@mixin betweenHeights($breakpoint1, $breakpoint2, $name: '') {
@include media.queries($breakpoint1, $breakpoint2, $property: 'height', $at: 'container', $name: $name) {
@mixin outsideHeights($breakpoint1, $breakpoint2, $containerName: '') {
@include media.queries($breakpoint1, $breakpoint2, $axis: 'height', $at: 'container', $containerName: $containerName, $inverted: true) {
@content;
}
}
Loading