Skip to content

Commit

Permalink
Merge pull request #5690 from pat270/LPS-198267
Browse files Browse the repository at this point in the history
feat(@clayui/css): Sidebar adds sidebar-sm
  • Loading branch information
matuzalemsteles authored Oct 13, 2023
2 parents 7636c27 + 43ec7ec commit 10eb0df
Show file tree
Hide file tree
Showing 8 changed files with 577 additions and 2 deletions.
460 changes: 460 additions & 0 deletions clayui.com/content/docs/components/markup-sidebar.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion packages/clay-css/src/scss/cadmin/components/_panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@

// Panel Group Sizes

.panel-group-sm {
%clay-panel-group-sm {
.panel {
@include clay-panel-variant($cadmin-panel-group-sm);
}
Expand All @@ -288,6 +288,10 @@
}
}

.panel-group-sm {
@extend %clay-panel-group-sm;
}

// Panel Variants

.panel-secondary {
Expand Down
4 changes: 4 additions & 0 deletions packages/clay-css/src/scss/cadmin/variables/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ $cadmin-btn-sizes: map-deep-merge(
(
btn-xs: (
font-size: 0.75rem,
line-height: 1.5,
padding-bottom: 0.125rem,
padding-left: 0.5rem,
padding-right: 0.5rem,
Expand All @@ -218,6 +219,9 @@ $cadmin-btn-sizes: map-deep-merge(
btn-section: (
font-size: 0.375rem,
),
lexicon-icon: (
font-size: inherit,
),
),
btn-lg: $cadmin-btn-lg,
btn-sm: $cadmin-btn-sm,
Expand Down
38 changes: 38 additions & 0 deletions packages/clay-css/src/scss/cadmin/variables/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,43 @@ $cadmin-sidebar: map-deep-merge(
$cadmin-sidebar
);

// Sidebar Sm

$cadmin-sidebar-sm: () !default;
$cadmin-sidebar-sm: map-deep-merge(
(
font-size: 0.875rem,
panel-group: (
extend: '%clay-panel-group-sm',
),
btn: (
extend: '%clay-btn-sm',
'&.btn-xs': (
extend: '%clay-btn-xs',
),
'&.btn-monospaced': (
extend: '%clay-btn-monospaced-sm',
),
'&.btn-monospaced.btn-xs': (
extend: '%clay-btn-monospaced-xs',
),
),
form-control: (
extend: '%clay-form-control-sm',
),
form-control-select: (
extend: '%clay-select-form-control-sm',
),
form-control-tag-group: (
extend: '%clay-form-control-tag-group-sm',
),
input-group: (
extend: '%clay-input-group-sm',
),
),
$cadmin-sidebar-sm
);

// Sidebar Light

$cadmin-sidebar-light-navigation-bar: () !default;
Expand Down Expand Up @@ -260,6 +297,7 @@ $cadmin-sidebar-dark: map-deep-merge(
$cadmin-sidebar-palette: () !default;
$cadmin-sidebar-palette: map-deep-merge(
(
sidebar-sm: $cadmin-sidebar-sm,
sidebar-light: $cadmin-sidebar-light,
sidebar-dark: $cadmin-sidebar-dark,
sidebar-dark-l2: (
Expand Down
6 changes: 5 additions & 1 deletion packages/clay-css/src/scss/components/_panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@

// Panel Group Sizes

.panel-group-sm {
%clay-panel-group-sm {
.panel {
@include clay-panel-variant($panel-group-sm);
}
Expand All @@ -329,6 +329,10 @@
}
}

.panel-group-sm {
@extend %clay-panel-group-sm;
}

// Panel Variants

.panel-secondary {
Expand Down
25 changes: 25 additions & 0 deletions packages/clay-css/src/scss/mixins/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,31 @@
map-get($map, component-navigation-bar)
);
}

.panel-group {
@include clay-map-to-css(map-get($map, panel-group));
}

.btn {
@include clay-map-to-css(map-get($map, btn));
}

.form-control {
@include clay-map-to-css(map-get($map, form-control));
}

select.form-control,
.form-control-select {
@include clay-map-to-css(map-get($map, form-control-select));
}

.form-control-tag-group {
@include clay-map-to-css(map-get($map, form-control-tag-group));
}

.input-group {
@include clay-map-to-css(map-get($map, input-group));
}
}
}
}
4 changes: 4 additions & 0 deletions packages/clay-css/src/scss/variables/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ $btn-sizes: map-deep-merge(
(
btn-xs: (
font-size: 0.75rem,
line-height: 1.5,
padding-bottom: 0.125rem,
padding-left: 0.5rem,
padding-right: 0.5rem,
Expand All @@ -215,6 +216,9 @@ $btn-sizes: map-deep-merge(
btn-section: (
font-size: 0.375rem,
),
lexicon-icon: (
font-size: inherit,
),
),
btn-lg: $btn-lg,
btn-sm: $btn-sm,
Expand Down
36 changes: 36 additions & 0 deletions packages/clay-css/src/scss/variables/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,41 @@ $sidebar-light-navigation-bar: map-deep-merge(
$sidebar-light-navigation-bar
);

$sidebar-sm: () !default;
$sidebar-sm: map-deep-merge(
(
font-size: 0.875rem,
panel-group: (
extend: '%clay-panel-group-sm',
),
btn: (
extend: '%clay-btn-sm',
'&.btn-xs': (
extend: '%clay-btn-xs',
),
'&.btn-monospaced': (
extend: '%clay-btn-monospaced-sm',
),
'&.btn-monospaced.btn-xs': (
extend: '%clay-btn-monospaced-xs',
),
),
form-control: (
extend: '%clay-form-control-sm',
),
form-control-select: (
extend: '%clay-select-form-control-sm',
),
form-control-tag-group: (
extend: '%clay-form-control-tag-group-sm',
),
input-group: (
extend: '%clay-input-group-sm',
),
),
$sidebar-sm
);

$sidebar-light: () !default;
$sidebar-light: map-deep-merge(
(
Expand Down Expand Up @@ -266,6 +301,7 @@ $sidebar-dark: map-deep-merge(
$sidebar-palette: () !default;
$sidebar-palette: map-deep-merge(
(
sidebar-sm: $sidebar-sm,
sidebar-light: $sidebar-light,
sidebar-dark: $sidebar-dark,
sidebar-dark-l2: (
Expand Down

0 comments on commit 10eb0df

Please sign in to comment.