Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/npm_and_yarn/develop/jquery-3.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lubber-de authored May 14, 2023
2 parents 1b9f72d + 8c329ba commit 3e52345
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 7 deletions.
66 changes: 61 additions & 5 deletions src/definitions/modules/checkbox.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@
cursor: auto;
position: relative;
display: block;
padding-left: @labelDistance;
outline: none;
font-size: @labelFontSize;
}

.ui.checkbox:not(.invisible) label {
padding-left: @labelDistance;
}

.ui.checkbox label::before {
position: absolute;
top: 0;
Expand Down Expand Up @@ -130,8 +133,8 @@
background: @checkboxHoverBackground;
border-color: @checkboxHoverBorderColor;
}
.ui.checkbox label:hover,
.ui.checkbox + label:hover {
.ui.checkbox:not(.invisible) label:hover,
.ui.checkbox:not(.invisible) + label:hover {
color: @labelHoverColor;
}

Expand All @@ -146,7 +149,7 @@
.ui.checkbox label:active::after {
color: @checkboxPressedColor;
}
.ui.checkbox input:active ~ label {
.ui.checkbox:not(.invisible) input:active ~ label {
color: @labelPressedColor;
}

Expand All @@ -161,7 +164,7 @@
.ui.checkbox input:focus ~ label::after {
color: @checkboxFocusCheckColor;
}
.ui.checkbox input:focus ~ label {
.ui.checkbox:not(.invisible) input:focus ~ label {
color: @labelFocusColor;
}

Expand Down Expand Up @@ -652,6 +655,59 @@
}
}
}
& when (@variationCheckboxInvisible) {
/* --------------
Invisible
--------------- */

.ui.invisible.checkbox {
&:not(.compact) {
display: block;
}
& input {
left: -99999px;
position: absolute;
}
& label::before,
& label::after {
display: none;
}
& label {
transition: @invisibleCheckboxLabelTransition;
}
}
.ui.ui.ui.ui.ui.invisible.checkbox input:not(:checked) {
& + label {
background: @invisibleCheckboxBackground;
border-color: @invisibleCheckboxBorderColor;
box-shadow: @invisibleCheckboxBoxShadow;
color: @invisibleCheckboxColor;
}
&:not(:hover):focus + label:not(.image) {
box-shadow: @invisibleCheckboxFocusBoxShadow;
}
& + label.image,
.basic& + label {
box-shadow: none;
}
}

.ui.invisible.checkbox input:not(:checked) {
& + label.image {
opacity: @invisibleCheckboxImageOpacityUnchecked;
filter: @invisibleCheckboxImageFilterUnchecked;
}
&:not(:hover):focus + label.image {
opacity: @invisibleCheckboxImageOpacityFocus;
}
& when (@variationCheckboxDisabled) {
&[disabled] + label.image,
.disabled& + label.image {
opacity: @invisibleCheckboxImageOpacityUncheckedDisabled;
}
}
}
}

/* --------------------
Size
Expand Down
6 changes: 4 additions & 2 deletions src/definitions/modules/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
module.bind.events();

if (settings.history && !initializedHistory) {
module.initializeHistory();
settings.history = module.initializeHistory();
initializedHistory = true;
}

Expand All @@ -109,7 +109,7 @@
module.debug('No active tab detected, setting tab active', activeTab);
module.changeTab(activeTab);
}
if (activeTab !== null && settings.history) {
if (activeTab !== null && settings.history && settings.historyType === 'state') {
var autoUpdate = $.address.autoUpdate();
$.address.autoUpdate(false);
$.address.value(activeTab);
Expand Down Expand Up @@ -202,6 +202,8 @@
$.address
.bind('change', module.event.history.change)
;

return true;
},

event: {
Expand Down
1 change: 1 addition & 0 deletions src/themes/default/globals/variation.variables
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@
@variationCheckboxDisabled: true;
@variationCheckboxReadonly: true;
@variationCheckboxInverted: true;
@variationCheckboxInvisible: true;
@variationCheckboxRadio: true;
@variationCheckboxSlider: true;
@variationCheckboxToggle: true;
Expand Down
12 changes: 12 additions & 0 deletions src/themes/default/modules/checkbox.variables
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,18 @@
Variations
-------------------- */

/* Invisible */
@invisibleCheckboxLabelTransition: all @defaultDuration @defaultEasing;
@invisibleCheckboxBackground: transparent;
@invisibleCheckboxBorderColor: transparent;
@invisibleCheckboxColor: inherit;
@invisibleCheckboxBoxShadow: 0 0 0 @borderWidth @borderColor inset;
@invisibleCheckboxFocusBoxShadow: 0 0 0 @borderWidth @selectedBorderColor inset;
@invisibleCheckboxImageOpacityUnchecked: 0.5;
@invisibleCheckboxImageOpacityUncheckedDisabled: @invisibleCheckboxImageOpacityUnchecked * @disabledCheckboxOpacity;
@invisibleCheckboxImageOpacityFocus: 0.75;
@invisibleCheckboxImageFilterUnchecked: grayscale(1);

/* Inverted */
@checkboxInvertedHoverBackground: @black;

Expand Down

0 comments on commit 3e52345

Please sign in to comment.