This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

53
node_modules/ng-zorro-antd/switch/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,53 @@
import { Direction } from '@angular/cdk/bidi';
import * as i0 from '@angular/core';
import { AfterViewInit, OnInit, ElementRef, TemplateRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
import { OnChangeType, OnTouchedType, NzSizeDSType } from 'ng-zorro-antd/core/types';
declare class NzSwitchComponent implements ControlValueAccessor, AfterViewInit, OnInit {
readonly _nzModuleName: NzConfigKey;
nzConfigService: NzConfigService;
private el;
private ngZone;
private cdr;
private focusMonitor;
private directionality;
private destroyRef;
isChecked: boolean;
onChange: OnChangeType;
onTouched: OnTouchedType;
switchElement: ElementRef<HTMLElement>;
nzLoading: boolean;
nzDisabled: boolean;
nzControl: boolean;
nzCheckedChildren: string | TemplateRef<void> | null;
nzUnCheckedChildren: string | TemplateRef<void> | null;
nzSize: NzSizeDSType;
nzId: string | null;
dir: Direction;
private isNzDisableFirstChange;
updateValue(value: boolean): void;
focus(): void;
blur(): void;
constructor();
ngOnInit(): void;
ngAfterViewInit(): void;
writeValue(value: boolean): void;
registerOnChange(fn: OnChangeType): void;
registerOnTouched(fn: OnTouchedType): void;
setDisabledState(disabled: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzSwitchComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzSwitchComponent, "nz-switch", ["nzSwitch"], { "nzLoading": { "alias": "nzLoading"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzControl": { "alias": "nzControl"; "required": false; }; "nzCheckedChildren": { "alias": "nzCheckedChildren"; "required": false; }; "nzUnCheckedChildren": { "alias": "nzUnCheckedChildren"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzId": { "alias": "nzId"; "required": false; }; }, {}, never, never, true, never>;
static ngAcceptInputType_nzLoading: unknown;
static ngAcceptInputType_nzDisabled: unknown;
static ngAcceptInputType_nzControl: unknown;
}
declare class NzSwitchModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzSwitchModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzSwitchModule, never, [typeof NzSwitchComponent], [typeof NzSwitchComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzSwitchModule>;
}
export { NzSwitchComponent, NzSwitchModule };

3
node_modules/ng-zorro-antd/switch/package.json generated vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"module": "../fesm2022/ng-zorro-antd-switch.mjs"
}

2
node_modules/ng-zorro-antd/switch/style/entry.less generated vendored Normal file
View File

@@ -0,0 +1,2 @@
@import './index.less';
@import './patch.less';

151
node_modules/ng-zorro-antd/switch/style/index.css generated vendored Normal file
View File

@@ -0,0 +1,151 @@
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
.ant-switch {
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: 'tnum';
position: relative;
display: inline-block;
box-sizing: border-box;
min-width: 44px;
height: 22px;
line-height: 22px;
vertical-align: middle;
background-color: rgba(0, 0, 0, 0.25);
border: 0;
border-radius: 100px;
cursor: pointer;
transition: all 0.2s;
user-select: none;
}
.ant-switch:focus {
outline: 0;
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}
.ant-switch-checked:focus {
box-shadow: 0 0 0 2px #e6f7ff;
}
.ant-switch:focus:hover {
box-shadow: none;
}
.ant-switch-checked {
background-color: #1890ff;
}
.ant-switch-loading,
.ant-switch-disabled {
cursor: not-allowed;
opacity: 0.4;
}
.ant-switch-loading *,
.ant-switch-disabled * {
box-shadow: none;
cursor: not-allowed;
}
.ant-switch-inner {
display: block;
margin: 0 7px 0 25px;
color: #fff;
font-size: 12px;
transition: margin 0.2s;
}
.ant-switch-checked .ant-switch-inner {
margin: 0 25px 0 7px;
}
.ant-switch-handle {
position: absolute;
top: 2px;
left: 2px;
width: 18px;
height: 18px;
transition: all 0.2s ease-in-out;
}
.ant-switch-handle::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #fff;
border-radius: 9px;
box-shadow: 0 2px 4px 0 rgba(0, 35, 11, 0.2);
transition: all 0.2s ease-in-out;
content: '';
}
.ant-switch-checked .ant-switch-handle {
left: calc(100% - 18px - 2px);
}
.ant-switch:not(.ant-switch-disabled):active .ant-switch-handle::before {
right: -30%;
left: 0;
}
.ant-switch:not(.ant-switch-disabled):active.ant-switch-checked .ant-switch-handle::before {
right: 0;
left: -30%;
}
.ant-switch-loading-icon.anticon {
position: relative;
top: 2px;
color: rgba(0, 0, 0, 0.65);
vertical-align: top;
}
.ant-switch-checked .ant-switch-loading-icon {
color: #1890ff;
}
.ant-switch-small {
min-width: 28px;
height: 16px;
line-height: 16px;
}
.ant-switch-small .ant-switch-inner {
margin: 0 5px 0 18px;
font-size: 12px;
}
.ant-switch-small .ant-switch-handle {
width: 12px;
height: 12px;
}
.ant-switch-small .ant-switch-loading-icon {
top: 1.5px;
font-size: 9px;
}
.ant-switch-small.ant-switch-checked .ant-switch-inner {
margin: 0 18px 0 5px;
}
.ant-switch-small.ant-switch-checked .ant-switch-handle {
left: calc(100% - 12px - 2px);
}
.ant-switch-rtl {
direction: rtl;
}
.ant-switch-rtl .ant-switch-inner {
margin: 0 25px 0 7px;
}
.ant-switch-rtl .ant-switch-handle {
right: 2px;
left: auto;
}
.ant-switch-rtl:not(.ant-switch-rtl-disabled):active .ant-switch-handle::before {
right: 0;
left: -30%;
}
.ant-switch-rtl:not(.ant-switch-rtl-disabled):active.ant-switch-checked .ant-switch-handle::before {
right: -30%;
left: 0;
}
.ant-switch-rtl.ant-switch-checked .ant-switch-inner {
margin: 0 7px 0 25px;
}
.ant-switch-rtl.ant-switch-checked .ant-switch-handle {
right: calc(100% - 18px - 2px);
}
.ant-switch-rtl.ant-switch-small.ant-switch-checked .ant-switch-handle {
right: calc(100% - 12px - 2px);
}
nz-switch {
display: inline-block;
}

154
node_modules/ng-zorro-antd/switch/style/index.less generated vendored Normal file
View File

@@ -0,0 +1,154 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@switch-prefix-cls: ~'@{ant-prefix}-switch';
@switch-duration: 0.2s;
@switch-pin-size: @switch-height - 4px;
@switch-sm-pin-size: @switch-sm-height - 4px;
.@{switch-prefix-cls} {
.reset-component();
position: relative;
display: inline-block;
box-sizing: border-box;
min-width: @switch-min-width;
height: @switch-height;
line-height: @switch-height;
vertical-align: middle;
background-color: @disabled-color;
border: 0;
border-radius: 100px;
cursor: pointer;
transition: all @switch-duration;
user-select: none;
&:focus {
outline: 0;
box-shadow: 0 0 0 2px fade(@disabled-color, 10%);
}
&-checked:focus {
box-shadow: 0 0 0 2px @primary-1;
}
&:focus:hover {
box-shadow: none;
}
&-checked {
background-color: @switch-color;
}
&-loading,
&-disabled {
cursor: not-allowed;
opacity: @switch-disabled-opacity;
* {
box-shadow: none;
cursor: not-allowed;
}
}
// ========================= Inner ==========================
&-inner {
display: block;
margin: 0 @switch-inner-margin-min 0 @switch-inner-margin-max;
color: @text-color-inverse;
font-size: @font-size-sm;
transition: margin @switch-duration;
}
&-checked &-inner {
margin: 0 @switch-inner-margin-max 0 @switch-inner-margin-min;
}
// ========================= Handle =========================
&-handle {
position: absolute;
top: @switch-padding;
left: @switch-padding;
width: @switch-pin-size;
height: @switch-pin-size;
transition: all @switch-duration ease-in-out;
&::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: @switch-bg;
border-radius: (@switch-pin-size / 2);
box-shadow: 0 2px 4px 0 @switch-shadow-color;
transition: all @switch-duration ease-in-out;
content: '';
}
}
&-checked &-handle {
left: calc(100% - @switch-pin-size - @switch-padding);
}
&:not(&-disabled):active {
.@{switch-prefix-cls}-handle::before {
right: -30%;
left: 0;
}
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-handle::before {
right: 0;
left: -30%;
}
}
}
// ======================== Loading =========================
&-loading-icon.@{iconfont-css-prefix} {
position: relative;
top: ((@switch-pin-size - @font-size-base) / 2);
color: rgba(0, 0, 0, 0.65);
vertical-align: top;
}
&-checked &-loading-icon {
color: @switch-color;
}
// ========================== Size ==========================
&-small {
min-width: @switch-sm-min-width;
height: @switch-sm-height;
line-height: @switch-sm-height;
.@{switch-prefix-cls}-inner {
margin: 0 @switch-sm-inner-margin-min 0 @switch-sm-inner-margin-max;
font-size: @font-size-sm;
}
.@{switch-prefix-cls}-handle {
width: @switch-sm-pin-size;
height: @switch-sm-pin-size;
}
.@{switch-prefix-cls}-loading-icon {
top: ((@switch-sm-pin-size - 9px) / 2);
font-size: 9px;
}
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-inner {
margin: 0 @switch-sm-inner-margin-max 0 @switch-sm-inner-margin-min;
}
.@{switch-prefix-cls}-handle {
left: calc(100% - @switch-sm-pin-size - @switch-padding);
}
}
}
}
@import './rtl';

View File

@@ -0,0 +1 @@
.ant-switch{margin:0;padding:0;color:rgba(0,0,0,.85);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:'tnum';position:relative;display:inline-block;box-sizing:border-box;min-width:44px;height:22px;line-height:22px;vertical-align:middle;background-color:rgba(0,0,0,.25);border:0;border-radius:100px;cursor:pointer;transition:all .2s;user-select:none}.ant-switch:focus{outline:0;box-shadow:0 0 0 2px rgba(0,0,0,.1)}.ant-switch-checked:focus{box-shadow:0 0 0 2px #e6f7ff}.ant-switch:focus:hover{box-shadow:none}.ant-switch-checked{background-color:#1890ff}.ant-switch-disabled,.ant-switch-loading{cursor:not-allowed;opacity:.4}.ant-switch-disabled *,.ant-switch-loading *{box-shadow:none;cursor:not-allowed}.ant-switch-inner{display:block;margin:0 7px 0 25px;color:#fff;font-size:12px;transition:margin .2s}.ant-switch-checked .ant-switch-inner{margin:0 25px 0 7px}.ant-switch-handle{position:absolute;top:2px;left:2px;width:18px;height:18px;transition:all .2s ease-in-out}.ant-switch-handle::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#fff;border-radius:9px;box-shadow:0 2px 4px 0 rgba(0,35,11,.2);transition:all .2s ease-in-out;content:''}.ant-switch-checked .ant-switch-handle{left:calc(100% - 18px - 2px)}.ant-switch:not(.ant-switch-disabled):active .ant-switch-handle::before{right:-30%;left:0}.ant-switch:not(.ant-switch-disabled):active.ant-switch-checked .ant-switch-handle::before{right:0;left:-30%}.ant-switch-loading-icon.anticon{position:relative;top:2px;color:rgba(0,0,0,.65);vertical-align:top}.ant-switch-checked .ant-switch-loading-icon{color:#1890ff}.ant-switch-small{min-width:28px;height:16px;line-height:16px}.ant-switch-small .ant-switch-inner{margin:0 5px 0 18px;font-size:12px}.ant-switch-small .ant-switch-handle{width:12px;height:12px}.ant-switch-small .ant-switch-loading-icon{top:1.5px;font-size:9px}.ant-switch-small.ant-switch-checked .ant-switch-inner{margin:0 18px 0 5px}.ant-switch-small.ant-switch-checked .ant-switch-handle{left:calc(100% - 12px - 2px)}.ant-switch-rtl{direction:rtl}.ant-switch-rtl .ant-switch-inner{margin:0 25px 0 7px}.ant-switch-rtl .ant-switch-handle{right:2px;left:auto}.ant-switch-rtl:not(.ant-switch-rtl-disabled):active .ant-switch-handle::before{right:0;left:-30%}.ant-switch-rtl:not(.ant-switch-rtl-disabled):active.ant-switch-checked .ant-switch-handle::before{right:-30%;left:0}.ant-switch-rtl.ant-switch-checked .ant-switch-inner{margin:0 7px 0 25px}.ant-switch-rtl.ant-switch-checked .ant-switch-handle{right:calc(100% - 18px - 2px)}.ant-switch-rtl.ant-switch-small.ant-switch-checked .ant-switch-handle{right:calc(100% - 12px - 2px)}nz-switch{display:inline-block}

3
node_modules/ng-zorro-antd/switch/style/patch.less generated vendored Normal file
View File

@@ -0,0 +1,3 @@
nz-switch {
display: inline-block;
}

52
node_modules/ng-zorro-antd/switch/style/rtl.less generated vendored Normal file
View File

@@ -0,0 +1,52 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@switch-prefix-cls: ~'@{ant-prefix}-switch';
@switch-pin-size: @switch-height - 4px;
@switch-sm-pin-size: @switch-sm-height - 4px;
.@{switch-prefix-cls}-rtl {
direction: rtl;
.@{switch-prefix-cls}-inner {
margin: 0 @switch-inner-margin-max 0 @switch-inner-margin-min;
}
.@{switch-prefix-cls}-handle {
right: @switch-padding;
left: auto;
}
&:not(&-disabled):active {
.@{switch-prefix-cls}-handle::before {
right: 0;
left: -30%;
}
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-handle::before {
right: -30%;
left: 0;
}
}
}
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-inner {
margin: 0 @switch-inner-margin-min 0 @switch-inner-margin-max;
}
.@{switch-prefix-cls}-handle {
right: calc(100% - @switch-pin-size - @switch-padding);
}
}
&.@{switch-prefix-cls}-small {
&.@{switch-prefix-cls}-checked {
.@{switch-prefix-cls}-handle {
right: calc(100% - @switch-sm-pin-size - @switch-padding);
}
}
}
}