@cscfi/csc-ui 2.2.3 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/c-autocomplete_34.cjs.entry.js +8 -1
- package/dist/cjs/c-autocomplete_34.cjs.entry.js.map +1 -1
- package/dist/cjs/c-tab-item.cjs.entry.js +2 -1
- package/dist/cjs/c-tab-item.cjs.entry.js.map +1 -1
- package/dist/cjs/csc-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/c-checkbox/c-checkbox.css +1 -1
- package/dist/collection/components/c-switch/c-switch.js +10 -0
- package/dist/collection/components/c-switch/c-switch.js.map +1 -1
- package/dist/collection/components/c-tab-item/c-tab-item.js +2 -1
- package/dist/collection/components/c-tab-item/c-tab-item.js.map +1 -1
- package/dist/components/c-checkbox2.js +1 -1
- package/dist/components/c-checkbox2.js.map +1 -1
- package/dist/components/c-switch.js +9 -0
- package/dist/components/c-switch.js.map +1 -1
- package/dist/components/c-tab-item.js +2 -1
- package/dist/components/c-tab-item.js.map +1 -1
- package/dist/csc-ui/csc-ui.esm.js +1 -1
- package/dist/csc-ui/csc-ui.esm.js.map +1 -1
- package/dist/csc-ui/{p-f71fcb7a.entry.js → p-5dd84926.entry.js} +2 -2
- package/dist/csc-ui/p-5dd84926.entry.js.map +1 -0
- package/dist/csc-ui/p-f6ca71df.entry.js +2 -0
- package/dist/csc-ui/{p-42587422.entry.js.map → p-f6ca71df.entry.js.map} +1 -1
- package/dist/esm/c-autocomplete_34.entry.js +8 -1
- package/dist/esm/c-autocomplete_34.entry.js.map +1 -1
- package/dist/esm/c-tab-item.entry.js +2 -1
- package/dist/esm/c-tab-item.entry.js.map +1 -1
- package/dist/esm/csc-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/c-switch/c-switch.d.ts +1 -0
- package/package.json +1 -1
- package/dist/csc-ui/p-42587422.entry.js +0 -2
- package/dist/csc-ui/p-f71fcb7a.entry.js.map +0 -1
|
@@ -559,7 +559,7 @@ const CCardTitle = class {
|
|
|
559
559
|
};
|
|
560
560
|
CCardTitle.style = cCardTitleCss;
|
|
561
561
|
|
|
562
|
-
const cCheckboxCss = "html{box-sizing:border-box}body{margin:0}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-checkbox-background-color-hover:var(--c-checkbox-background-color-hover, rgba(var(--c-primary-rgb), 0.1));--_c-checkbox-color-active:var(--c-checkbox-color-active, var(--_c-checkbox-color));--_c-checkbox-color-disabled:var(--c-checkbox-color-disabled, var(--c-tertiary-500));--_c-checkbox-color:var(--c-checkbox-color, var(--c-primary-600));--_c-checkbox-color-error:var(--c-error-600)}.c-checkbox{position:relative;width:fit-content}.c-checkbox__label-content{padding-top:
|
|
562
|
+
const cCheckboxCss = "html{box-sizing:border-box}body{margin:0}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-checkbox-background-color-hover:var(--c-checkbox-background-color-hover, rgba(var(--c-primary-rgb), 0.1));--_c-checkbox-color-active:var(--c-checkbox-color-active, var(--_c-checkbox-color));--_c-checkbox-color-disabled:var(--c-checkbox-color-disabled, var(--c-tertiary-500));--_c-checkbox-color:var(--c-checkbox-color, var(--c-primary-600));--_c-checkbox-color-error:var(--c-error-600)}.c-checkbox{position:relative;width:fit-content}.c-checkbox__label-content{padding-top:12px;text-align:left;user-select:none}.c-checkbox__label-content span.required{color:var(--c-error-600)}.c-checkbox--disabled{--_c-checkbox-color:var(--_c-checkbox-color-disabled);--c-error-600:var(--_c-checkbox-color);--_c-checkbox-color-active:var(--_c-checkbox-color-disabled);color:var(--_c-checkbox-color);opacity:0.75}.c-checkbox--disabled .c-checkbox__label{cursor:default}.c-checkbox--error{--_c-checkbox-color:var(--c-error-600);--_c-checkbox-color-active:var(--_c-checkbox-color-error);color:var(--_c-checkbox-color-error)}.c-checkbox input:focus{outline:none}.c-checkbox input:focus+.c-checkbox__label .ripple{outline:2px var(--_c-checkbox-color-active) solid}@supports selector(:focus-visible){.c-checkbox input:focus+.c-checkbox__label .ripple{outline:none}}.c-checkbox input:focus-visible+.c-checkbox__label .ripple{outline:2px var(--_c-checkbox-color-active) solid}.c-checkbox:not(.c-checkbox--disabled) .ripple:hover{background-color:var(--_c-checkbox-background-color-hover)}.c-checkbox .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.c-checkbox input:checked+.c-checkbox__label .ripple::before{background:var(--_c-checkbox-color-active);border-color:var(--_c-checkbox-color-active)}.c-checkbox input:checked+.c-checkbox__label .path{stroke:#ffffff;fill:#ffffff;stroke-dashoffset:0;stroke-width:13;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.c-checkbox__label{cursor:pointer;display:flex;gap:4px;position:relative;user-select:none}.c-checkbox__label svg{height:14px;left:14px;position:absolute;top:14px;width:14px}.c-checkbox__label--indeterminate .path{stroke-dasharray:0 !important;stroke-dashoffset:0 !important;stroke:transparent}.c-checkbox__label .ripple{border-radius:50%;color:var(--_c-checkbox-color-active);display:grid;height:42px;min-width:42px;overflow:hidden;place-content:center;position:relative;transform:translateZ(0);width:42px}.c-checkbox__label .ripple::before{border-radius:2px;border:2px solid var(--_c-checkbox-color);content:\"\";display:inline-block;height:18px;left:12px;position:absolute;top:12px;transition:all 0.25s ease-out;vertical-align:middle;width:18px}";
|
|
563
563
|
|
|
564
564
|
const CCheckbox = class {
|
|
565
565
|
constructor(hostRef) {
|
|
@@ -2375,6 +2375,10 @@ const CSwitch = class {
|
|
|
2375
2375
|
this.required = false;
|
|
2376
2376
|
this.hasLabel = false;
|
|
2377
2377
|
}
|
|
2378
|
+
onValueChange(value) {
|
|
2379
|
+
this.checked = this.trueValue === value;
|
|
2380
|
+
this.internals.setFormValue(this.checked ? this.trueValue.toString() : this.falseValue.toString());
|
|
2381
|
+
}
|
|
2378
2382
|
componentWillLoad() {
|
|
2379
2383
|
this.checked = this.checked || this.value === this.trueValue;
|
|
2380
2384
|
this.internals.setFormValue(this.checked ? this.trueValue.toString() : this.falseValue.toString());
|
|
@@ -2397,6 +2401,9 @@ const CSwitch = class {
|
|
|
2397
2401
|
}
|
|
2398
2402
|
static get formAssociated() { return true; }
|
|
2399
2403
|
get host() { return index.getElement(this); }
|
|
2404
|
+
static get watchers() { return {
|
|
2405
|
+
"value": ["onValueChange"]
|
|
2406
|
+
}; }
|
|
2400
2407
|
};
|
|
2401
2408
|
CSwitch.style = cSwitchCss;
|
|
2402
2409
|
|