@cscfi/csc-ui 2.1.13 → 2.2.1
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 +36 -6
- package/dist/cjs/c-autocomplete_34.cjs.entry.js.map +1 -1
- package/dist/cjs/c-data-table.cjs.entry.js +2 -2
- package/dist/cjs/c-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/c-tab.cjs.entry.js +2 -2
- package/dist/cjs/c-tab.cjs.entry.js.map +1 -1
- package/dist/collection/components/c-card-title/c-card-title.css +21 -0
- package/dist/collection/components/c-card-title/c-card-title.js +31 -1
- package/dist/collection/components/c-card-title/c-card-title.js.map +1 -1
- package/dist/collection/components/c-data-table/c-data-table.css +4 -2
- package/dist/collection/components/c-data-table/c-data-table.js +1 -1
- package/dist/collection/components/c-data-table/c-data-table.js.map +1 -1
- package/dist/collection/components/c-select/c-select.js +6 -4
- package/dist/collection/components/c-select/c-select.js.map +1 -1
- package/dist/collection/components/c-tab/c-tab.css +9 -3
- package/dist/collection/components/c-tab/c-tab.js +1 -1
- package/dist/collection/components/c-tab/c-tab.js.map +1 -1
- package/dist/components/c-card-title.js +30 -2
- package/dist/components/c-card-title.js.map +1 -1
- package/dist/components/c-data-table.js +2 -2
- package/dist/components/c-data-table.js.map +1 -1
- package/dist/components/c-select.js +6 -4
- package/dist/components/c-select.js.map +1 -1
- package/dist/components/c-tab.js +2 -2
- package/dist/components/c-tab.js.map +1 -1
- package/dist/csc-ui/csc-ui.esm.js +1 -1
- package/dist/csc-ui/p-42587422.entry.js +2 -0
- package/dist/csc-ui/p-42587422.entry.js.map +1 -0
- package/dist/csc-ui/p-8b9952b9.entry.js +2 -0
- package/dist/csc-ui/p-8b9952b9.entry.js.map +1 -0
- package/dist/csc-ui/p-ce88995f.entry.js +2 -0
- package/dist/csc-ui/p-ce88995f.entry.js.map +1 -0
- package/dist/esm/c-autocomplete_34.entry.js +36 -6
- package/dist/esm/c-autocomplete_34.entry.js.map +1 -1
- package/dist/esm/c-data-table.entry.js +2 -2
- package/dist/esm/c-data-table.entry.js.map +1 -1
- package/dist/esm/c-tab.entry.js +2 -2
- package/dist/esm/c-tab.entry.js.map +1 -1
- package/dist/types/components/c-card-title/c-card-title.d.ts +11 -0
- package/package.json +1 -1
- package/dist/csc-ui/p-0471fd59.entry.js +0 -2
- package/dist/csc-ui/p-0471fd59.entry.js.map +0 -1
- package/dist/csc-ui/p-f057fdea.entry.js +0 -2
- package/dist/csc-ui/p-f057fdea.entry.js.map +0 -1
- package/dist/csc-ui/p-f69e744e.entry.js +0 -2
- package/dist/csc-ui/p-f69e744e.entry.js.map +0 -1
|
@@ -519,15 +519,43 @@ const CCardContent = class {
|
|
|
519
519
|
};
|
|
520
520
|
CCardContent.style = cCardContentCss;
|
|
521
521
|
|
|
522
|
-
const cCardTitleCss = "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-card-title-color:var(--c-card-title-color, var(--c-text-system));--_c-card-title-underline-color:var(--c-card-title-underline-color, var(--c-primary-600));color:var(--_c-card-title-color);padding-inline:var(--_c-card-gap, 24px);display:block;font-family:var(--c-font-family);font-size:1rem;font-weight:500;text-transform:uppercase}.c-card-title__underline{background-color:var(--_c-card-title-underline-color);border-radius:4px;height:4px;margin-top:10px;width:44px}";
|
|
522
|
+
const cCardTitleCss = "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-card-title-color:var(--c-card-title-color, var(--c-text-system));--_c-card-title-underline-color:var(--c-card-title-underline-color, var(--c-primary-600));color:var(--_c-card-title-color);padding-inline:var(--_c-card-gap, 24px);display:block;font-family:var(--c-font-family);font-size:1rem;font-weight:500;text-transform:uppercase}.c-card-title__header p{margin:0}.c-card-title--actions{display:flex;flex-wrap:wrap;align-items:start;flex:0 0 auto;gap:8px}.c-card-title--actions.c-card-title--wrapped .c-card-title__actions{justify-content:start}.c-card-title__underline{background-color:var(--_c-card-title-underline-color);border-radius:4px;height:4px;margin-top:10px;width:44px}.c-card-title__actions{justify-content:end;align-items:center;display:flex;flex-wrap:wrap-reverse;gap:8px;flex:1}";
|
|
523
523
|
|
|
524
524
|
const CCardTitle = class {
|
|
525
525
|
constructor(hostRef) {
|
|
526
526
|
index.registerInstance(this, hostRef);
|
|
527
|
+
this._slotHasContent = false;
|
|
528
|
+
this._isWrapped = false;
|
|
529
|
+
}
|
|
530
|
+
_handleResize() {
|
|
531
|
+
if (!this._headerElement || !this._actionsElement)
|
|
532
|
+
return;
|
|
533
|
+
this._isWrapped =
|
|
534
|
+
this._headerElement.getBoundingClientRect().top <
|
|
535
|
+
this._actionsElement.getBoundingClientRect().top;
|
|
536
|
+
this._wrapperElement.classList.toggle('c-card-title--wrapped', this._isWrapped);
|
|
537
|
+
}
|
|
538
|
+
componentWillLoad() {
|
|
539
|
+
this._slotHasContent = !!this.hostElement.querySelector('[slot="actions"]');
|
|
540
|
+
}
|
|
541
|
+
componentDidLoad() {
|
|
542
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
543
|
+
this._handleResize();
|
|
544
|
+
});
|
|
545
|
+
this._resizeObserver.observe(this.hostElement);
|
|
546
|
+
}
|
|
547
|
+
disconnectedCallback() {
|
|
548
|
+
var _a;
|
|
549
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
527
550
|
}
|
|
528
551
|
render() {
|
|
529
|
-
|
|
552
|
+
const classes = {
|
|
553
|
+
'c-card-title': true,
|
|
554
|
+
'c-card-title--actions': this._slotHasContent,
|
|
555
|
+
};
|
|
556
|
+
return (index.h("header", { class: classes, ref: (el) => (this._wrapperElement = el) }, index.h("div", { class: "c-card-title__header", ref: (el) => (this._headerElement = el) }, index.h("p", null, index.h("slot", null)), index.h("div", { class: "c-card-title__underline" })), this._slotHasContent && (index.h("div", { class: "c-card-title__actions", ref: (el) => (this._actionsElement = el) }, index.h("slot", { name: "actions" })))));
|
|
530
557
|
}
|
|
558
|
+
get hostElement() { return index.getElement(this); }
|
|
531
559
|
};
|
|
532
560
|
CCardTitle.style = cCardTitleCss;
|
|
533
561
|
|
|
@@ -1996,10 +2024,12 @@ const CSelect = class {
|
|
|
1996
2024
|
}
|
|
1997
2025
|
return item.value === this.value;
|
|
1998
2026
|
});
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2027
|
+
if (selection) {
|
|
2028
|
+
this._setCurrentIndex({
|
|
2029
|
+
name: selection.name,
|
|
2030
|
+
value: selection.value.toString(),
|
|
2031
|
+
});
|
|
2032
|
+
}
|
|
2003
2033
|
}
|
|
2004
2034
|
_renderLoader() {
|
|
2005
2035
|
return index.h("c-spinner", { color: "var(--_c-autocomplete-active-color)", size: 20 });
|