1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

feat: Add language selector dropdown to navbar (#2526)

This commit is contained in:
Paweł Kuna
2025-11-02 20:49:13 +01:00
committed by GitHub
parent 6e656ad1de
commit 8d8727f587
16 changed files with 238 additions and 96 deletions

View File

@@ -302,6 +302,7 @@ $backdrops: (
$border-width: 1px !default;
$border-width-wide: 2px !default;
$border-radius-xs: 2px !default;
$border-radius-sm: 4px !default;
$border-radius: 6px !default;
$border-radius-lg: 8px !default;
@@ -309,6 +310,7 @@ $border-radius-pill: 100rem !default;
$border-radiuses: (
0: 0,
xs: $border-radius-xs,
sm: $border-radius-sm,
md: $border-radius,
lg: $border-radius-lg,
@@ -365,6 +367,7 @@ $avatar-sizes: (
icon-size: 0.75rem,
status-size: 0.375rem,
brand-size: 0.75rem,
border-radius: $border-radius-xs,
),
"sm": (
size: 2rem,
@@ -740,7 +743,7 @@ $dropdown-divider-margin-y: var(--#{$prefix}spacer-2) !default;
$tooltip-bg: var(--#{$prefix}bg-surface-inverted) !default;
$tooltip-color: var(--#{$prefix}text-inverted) !default;
$tooltip-padding-y: var(--#{$prefix}spacer-1) !default;
$tooltip-padding-x: var(--#{$prefix}spacer-3) !default;
$tooltip-padding-x: var(--#{$prefix}spacer-2) !default;
// Loader
$loader-size: 2.5rem !default;
@@ -1026,7 +1029,7 @@ $legend-border-radius: var(--#{$prefix}border-radius-sm) !default;
// Flags
$flag-box-shadow: var(--#{$prefix}shadow-border) !default;
$flag-border-radius: var(--#{$prefix}border-radius) !default;
$flag-border-radius: var(--#{$prefix}border-radius-sm) !default;
$flag-sizes: $avatar-sizes !default;
// Payments

View File

@@ -63,6 +63,10 @@
--#{$prefix}avatar-icon-size: #{map.get($size, icon-size)};
--#{$prefix}avatar-brand-size: #{map.get($size, brand-size)};
@if map.has-key($size, border-radius) {
border-radius: map.get($size, border-radius);
}
.badge:empty {
width: map.get($size, status-size);
height: map.get($size, status-size);

View File

@@ -1,4 +1,7 @@
.dropdown-menu {
--#{$prefix}dropdown-item-gap: .5rem;
--#{$prefix}dropdown-item-icon-size: #{$icon-size};
--#{$prefix}dropdown-item-icon-color: var(--#{$prefix}tertiary);
user-select: none;
background-clip: border-box;
@@ -19,21 +22,17 @@
align-items: center;
margin: 0;
line-height: $line-height-base;
gap: .5rem;
gap: var(--#{$prefix}dropdown-item-gap);
}
.dropdown-item-icon {
width: $icon-size !important;
height: $icon-size !important;
margin-right: .5rem;
color: var(--#{$prefix}secondary);
opacity: $text-secondary-opacity;
width: var(--#{$prefix}dropdown-item-icon-size) !important;
height: var(--#{$prefix}dropdown-item-icon-size) !important;
color: var(--#{$prefix}dropdown-item-icon-color);
text-align: center;
}
.dropdown-item-indicator {
margin-right: .5rem;
margin-left: -.25rem;
height: 1.25rem;
display: inline-flex;
line-height: 1;

View File

@@ -7,7 +7,7 @@ $countries: (
.flag {
position: relative;
display: inline-block;
height: $avatar-size;
width: $avatar-size;
aspect-ratio: 1.33333;
background: no-repeat center/cover;
box-shadow: $flag-box-shadow;
@@ -28,6 +28,10 @@ $countries: (
@each $flag-size, $size in $flag-sizes {
.flag-#{$flag-size} {
height: map.get($size, size);
width: map.get($size, size);
@if map.has-key($size, border-radius) {
border-radius: map.get($size, border-radius);
}
}
}