otimus-library 0.2.51 → 0.2.53
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/esm2022/lib/components/oc-tabs/oc-tabs.component.mjs +3 -3
- package/esm2022/lib/components/oc-toggle/oc-toggle.component.mjs +7 -4
- package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +90 -64
- package/fesm2022/otimus-library.mjs +97 -68
- package/fesm2022/otimus-library.mjs.map +1 -1
- package/lib/components/oc-tabs/oc-tabs.component.d.ts +1 -1
- package/lib/components/oc-toggle/oc-toggle.component.d.ts +2 -1
- package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +10 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, Input, Directive,
|
|
2
|
+
import { Injectable, Component, Input, Directive, ViewEncapsulation, ContentChild, HostBinding, EventEmitter, Output, ChangeDetectionStrategy, ViewChild, forwardRef, ContentChildren } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2$1 from '@angular/platform-browser';
|
|
@@ -196,23 +196,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
196
196
|
}] } });
|
|
197
197
|
|
|
198
198
|
class OcTooltipDirective {
|
|
199
|
-
constructor(elRef, renderer) {
|
|
199
|
+
constructor(elRef, renderer, zone, cdr) {
|
|
200
200
|
this.elRef = elRef;
|
|
201
201
|
this.renderer = renderer;
|
|
202
|
+
this.zone = zone;
|
|
203
|
+
this.cdr = cdr;
|
|
202
204
|
this.content = '';
|
|
203
205
|
this.side = 'mouse';
|
|
204
|
-
this.created = false;
|
|
205
206
|
this.tooltip = null;
|
|
206
|
-
this.
|
|
207
|
+
this.moveScheduled = false;
|
|
208
|
+
this.zone.runOutsideAngular(() => {
|
|
209
|
+
this.setupEvents();
|
|
210
|
+
});
|
|
207
211
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
setupEvents() {
|
|
213
|
+
this.elRef.nativeElement.addEventListener('mouseover', (e) => this.onMouseOver(e));
|
|
214
|
+
this.elRef.nativeElement.addEventListener('mousemove', (e) => this.onMouseMove(e));
|
|
215
|
+
this.elRef.nativeElement.addEventListener('mouseout', (e) => this.onMouseOut(e));
|
|
216
|
+
}
|
|
217
|
+
createTooltip() {
|
|
218
|
+
if (!this.tooltip) {
|
|
219
|
+
this.tooltip = this.renderer.createElement('div');
|
|
220
|
+
this.renderer.addClass(this.tooltip, 'oc-tooltip');
|
|
221
|
+
this.renderer.setStyle(this.tooltip, 'position', 'absolute');
|
|
222
|
+
this.renderer.setStyle(this.tooltip, 'pointer-events', 'none');
|
|
223
|
+
this.renderer.setStyle(this.tooltip, 'z-index', '1000');
|
|
224
|
+
this.renderer.setStyle(this.tooltip, 'display', 'none');
|
|
225
|
+
this.renderer.appendChild(document.body, this.tooltip);
|
|
211
226
|
}
|
|
212
|
-
this.tooltip =
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
215
|
-
this.content = this.content.replace('>', ' style="margin: 0">');
|
|
227
|
+
this.tooltip.innerHTML = '';
|
|
228
|
+
const isHTML = new DOMParser().parseFromString(this.content, 'text/html').body.children.length > 0;
|
|
229
|
+
if (isHTML) {
|
|
216
230
|
this.renderer.setProperty(this.tooltip, 'innerHTML', this.content);
|
|
217
231
|
}
|
|
218
232
|
else {
|
|
@@ -220,74 +234,95 @@ class OcTooltipDirective {
|
|
|
220
234
|
this.renderer.appendChild(this.tooltip, text);
|
|
221
235
|
this.renderer.setStyle(this.tooltip, 'color', '#7E8485');
|
|
222
236
|
}
|
|
223
|
-
this.renderer.addClass(this.tooltip, 'oc-tooltip');
|
|
224
237
|
if (this.side === 'mouse') {
|
|
225
238
|
this.renderer.addClass(this.tooltip, 'mouse-tracking');
|
|
226
239
|
}
|
|
227
|
-
this.renderer.setStyle(this.tooltip, 'position', 'absolute');
|
|
228
|
-
this.renderer.setStyle(this.tooltip, 'pointer-events', 'none');
|
|
229
|
-
this.renderer.setStyle(this.tooltip, 'z-index', '1000');
|
|
230
|
-
document.body.appendChild(this.tooltip);
|
|
231
|
-
this.created = true;
|
|
232
240
|
return this.tooltip;
|
|
233
241
|
}
|
|
234
242
|
onMouseOver(event) {
|
|
235
|
-
if (!this.content)
|
|
243
|
+
if (!this.content)
|
|
236
244
|
return;
|
|
245
|
+
if (!this.tooltip)
|
|
246
|
+
this.createTooltip();
|
|
247
|
+
this.renderer.setStyle(this.tooltip, 'display', 'block');
|
|
248
|
+
if (this.side === 'mouse') {
|
|
249
|
+
this.updateTooltipPosition(event);
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
this.positionTooltipFixed();
|
|
237
253
|
}
|
|
238
|
-
this.
|
|
239
|
-
this.updateTooltipPosition(event);
|
|
254
|
+
this.cdr.markForCheck();
|
|
240
255
|
}
|
|
241
256
|
onMouseMove(event) {
|
|
242
|
-
if (this.tooltip)
|
|
243
|
-
|
|
257
|
+
if (!this.tooltip || this.side !== 'mouse')
|
|
258
|
+
return;
|
|
259
|
+
if (!this.moveScheduled) {
|
|
260
|
+
this.moveScheduled = true;
|
|
261
|
+
requestAnimationFrame(() => {
|
|
244
262
|
this.updateTooltipPosition(event);
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.positionTooltipFixed();
|
|
248
|
-
}
|
|
263
|
+
this.moveScheduled = false;
|
|
264
|
+
});
|
|
249
265
|
}
|
|
250
266
|
}
|
|
251
|
-
|
|
267
|
+
onMouseOut(event) {
|
|
268
|
+
if (this.tooltip &&
|
|
269
|
+
event.relatedTarget instanceof Node &&
|
|
270
|
+
this.tooltip.contains(event.relatedTarget)) {
|
|
271
|
+
return; // evita flicker se mouse entra no tooltip
|
|
272
|
+
}
|
|
252
273
|
if (this.tooltip) {
|
|
253
|
-
this.renderer.setStyle(this.tooltip, '
|
|
254
|
-
this.renderer.setStyle(this.tooltip, 'top', `${event.pageY + 12}px`);
|
|
274
|
+
this.renderer.setStyle(this.tooltip, 'display', 'none');
|
|
255
275
|
}
|
|
276
|
+
this.cdr.markForCheck();
|
|
277
|
+
}
|
|
278
|
+
updateTooltipPosition(event) {
|
|
279
|
+
if (!this.tooltip)
|
|
280
|
+
return;
|
|
281
|
+
const left = event.pageX + 12;
|
|
282
|
+
const top = event.pageY + 12;
|
|
283
|
+
this.renderer.setStyle(this.tooltip, 'left', `${left}px`);
|
|
284
|
+
this.renderer.setStyle(this.tooltip, 'top', `${top}px`);
|
|
256
285
|
}
|
|
257
286
|
positionTooltipFixed() {
|
|
258
|
-
if (!this.tooltip)
|
|
287
|
+
if (!this.tooltip)
|
|
259
288
|
return;
|
|
260
|
-
}
|
|
261
289
|
const rect = this.elRef.nativeElement.getBoundingClientRect();
|
|
262
290
|
const width = this.elRef.nativeElement.offsetWidth;
|
|
263
291
|
const height = this.elRef.nativeElement.offsetHeight;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
292
|
+
const scrollX = window.scrollX;
|
|
293
|
+
const scrollY = window.scrollY;
|
|
294
|
+
let left = 0;
|
|
295
|
+
let top = 0;
|
|
296
|
+
switch (this.side) {
|
|
297
|
+
case 'right':
|
|
298
|
+
left = scrollX + rect.right + 10;
|
|
299
|
+
top = scrollY + rect.top + height / 2;
|
|
300
|
+
break;
|
|
301
|
+
case 'left':
|
|
302
|
+
left = scrollX + rect.left - this.tooltip.offsetWidth - 10;
|
|
303
|
+
top = scrollY + rect.top + height / 2;
|
|
304
|
+
break;
|
|
305
|
+
case 'upon':
|
|
306
|
+
case 'top':
|
|
307
|
+
left = scrollX + rect.left + width / 2;
|
|
308
|
+
top = scrollY + rect.top - this.tooltip.offsetHeight - 10;
|
|
309
|
+
break;
|
|
310
|
+
case 'bottom':
|
|
311
|
+
left = scrollX + rect.left + width / 2;
|
|
312
|
+
top = scrollY + rect.bottom + 10;
|
|
313
|
+
break;
|
|
279
314
|
}
|
|
315
|
+
this.renderer.setStyle(this.tooltip, 'left', `${left}px`);
|
|
316
|
+
this.renderer.setStyle(this.tooltip, 'top', `${top}px`);
|
|
280
317
|
}
|
|
281
|
-
|
|
282
|
-
if (this.tooltip) {
|
|
283
|
-
|
|
284
|
-
this.created = false;
|
|
318
|
+
ngOnDestroy() {
|
|
319
|
+
if (this.tooltip && this.tooltip.parentNode) {
|
|
320
|
+
this.tooltip.parentNode.removeChild(this.tooltip);
|
|
285
321
|
this.tooltip = null;
|
|
286
322
|
}
|
|
287
|
-
this.mouseingInterval = null;
|
|
288
323
|
}
|
|
289
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OcTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
290
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: OcTooltipDirective, isStandalone: true, selector: "[ocTooltip]", inputs: { content: "content", side: "side" },
|
|
324
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OcTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
325
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: OcTooltipDirective, isStandalone: true, selector: "[ocTooltip]", inputs: { content: "content", side: "side" }, ngImport: i0 }); }
|
|
291
326
|
}
|
|
292
327
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OcTooltipDirective, decorators: [{
|
|
293
328
|
type: Directive,
|
|
@@ -295,19 +330,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
295
330
|
selector: '[ocTooltip]',
|
|
296
331
|
standalone: true,
|
|
297
332
|
}]
|
|
298
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { content: [{
|
|
333
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { content: [{
|
|
299
334
|
type: Input
|
|
300
335
|
}], side: [{
|
|
301
336
|
type: Input
|
|
302
|
-
}], onMouseOver: [{
|
|
303
|
-
type: HostListener,
|
|
304
|
-
args: ['mouseover', ['$event']]
|
|
305
|
-
}], onMouseMove: [{
|
|
306
|
-
type: HostListener,
|
|
307
|
-
args: ['mousemove', ['$event']]
|
|
308
|
-
}], onMouseOut: [{
|
|
309
|
-
type: HostListener,
|
|
310
|
-
args: ['mouseout']
|
|
311
337
|
}] } });
|
|
312
338
|
|
|
313
339
|
class OcInputComponent {
|
|
@@ -1218,6 +1244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1218
1244
|
class OcToggleComponent {
|
|
1219
1245
|
constructor() {
|
|
1220
1246
|
this._ocChecked = false;
|
|
1247
|
+
this.ocSize = 'medium';
|
|
1221
1248
|
this.ocColor = 'green';
|
|
1222
1249
|
this.ocCheckedChange = new EventEmitter();
|
|
1223
1250
|
}
|
|
@@ -1232,12 +1259,14 @@ class OcToggleComponent {
|
|
|
1232
1259
|
this.ocChecked = !this.ocChecked;
|
|
1233
1260
|
}
|
|
1234
1261
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OcToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1235
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OcToggleComponent, isStandalone: true, selector: "oc-toggle", inputs: { ocChecked: "ocChecked", ocColor: "ocColor" }, outputs: { ocCheckedChange: "ocCheckedChange" }, ngImport: i0, template: "<label class=\"switch\">\n <input [checked]=\"ocChecked\" (click)=\"toggleChecked()\" type=\"checkbox\">\n <span class=\"slider round\" [ngClass]=\"[ocColor]\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:60px;height:33px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;
|
|
1262
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OcToggleComponent, isStandalone: true, selector: "oc-toggle", inputs: { ocSize: "ocSize", ocChecked: "ocChecked", ocColor: "ocColor" }, outputs: { ocCheckedChange: "ocCheckedChange" }, ngImport: i0, template: "<label class=\"switch\" [ngClass]=\"{\n large: ocSize ==='large',\n medium: ocSize ==='medium',\n}\">\n <input [checked]=\"ocChecked\" (click)=\"toggleChecked()\" type=\"checkbox\">\n <span class=\"slider round\" [ngClass]=\"[ocColor]\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:48px;height:28px}.switch input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translate(18px);box-shadow:0 0 16px #00dda3}.switch input:checked+.slider.purple:before{box-shadow:0 0 16px #7866e9}.switch.large{width:60px;height:33px}.switch.large input:checked+.slider:before{-webkit-transform:translateX(25px);-ms-transform:translateX(25px);transform:translate(25px)}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border:1px solid #ffffff}.slider:before{position:absolute;content:\"\";height:21px;width:21px;left:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s;bottom:2.5px}.switch.large .slider:before{height:26px;width:26px}input:checked+.slider.purple{background-color:#5505a2}input:checked+.slider.green{background-color:#00dda3}input:focus+.slider{box-shadow:0 0 1px #00dda3}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1236
1263
|
}
|
|
1237
1264
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OcToggleComponent, decorators: [{
|
|
1238
1265
|
type: Component,
|
|
1239
|
-
args: [{ selector: 'oc-toggle', standalone: true, imports: [CommonModule], template: "<label class=\"switch\">\n <input [checked]=\"ocChecked\" (click)=\"toggleChecked()\" type=\"checkbox\">\n <span class=\"slider round\" [ngClass]=\"[ocColor]\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:60px;height:33px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;
|
|
1240
|
-
}], propDecorators: {
|
|
1266
|
+
args: [{ selector: 'oc-toggle', standalone: true, imports: [CommonModule], template: "<label class=\"switch\" [ngClass]=\"{\n large: ocSize ==='large',\n medium: ocSize ==='medium',\n}\">\n <input [checked]=\"ocChecked\" (click)=\"toggleChecked()\" type=\"checkbox\">\n <span class=\"slider round\" [ngClass]=\"[ocColor]\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:48px;height:28px}.switch input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translate(18px);box-shadow:0 0 16px #00dda3}.switch input:checked+.slider.purple:before{box-shadow:0 0 16px #7866e9}.switch.large{width:60px;height:33px}.switch.large input:checked+.slider:before{-webkit-transform:translateX(25px);-ms-transform:translateX(25px);transform:translate(25px)}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border:1px solid #ffffff}.slider:before{position:absolute;content:\"\";height:21px;width:21px;left:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s;bottom:2.5px}.switch.large .slider:before{height:26px;width:26px}input:checked+.slider.purple{background-color:#5505a2}input:checked+.slider.green{background-color:#00dda3}input:focus+.slider{box-shadow:0 0 1px #00dda3}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}\n"] }]
|
|
1267
|
+
}], propDecorators: { ocSize: [{
|
|
1268
|
+
type: Input
|
|
1269
|
+
}], ocChecked: [{
|
|
1241
1270
|
type: Input
|
|
1242
1271
|
}], ocColor: [{
|
|
1243
1272
|
type: Input
|
|
@@ -1415,11 +1444,11 @@ class OcTabsComponent {
|
|
|
1415
1444
|
this.ocClick.emit();
|
|
1416
1445
|
}
|
|
1417
1446
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OcTabsComponent, deps: [{ token: StyleThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1418
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OcTabsComponent, isStandalone: true, selector: "oc-tabs", inputs: { ocStyle: "ocStyle" }, outputs: { ocClick: "ocClick" }, queries: [{ propertyName: "ocTabs", predicate: OcTabComponent }], ngImport: i0, template: "<div class=\"oc-tabs\" [ngClass]=\"{\n shui: ocStyle === 'shui'\n}\">\n <div class=\"row\">\n @for(tab of ocTabs; track $index) {\n <button [ngClass]=\"{\n 'oc-selected': tab.tabIndex === activeTabIndex\n }\" class=\"oc-tab\" (click)=\"selectTab(tab.tabIndex); \n handleTabClick()\" type=\"button\">{{tab.ocTitle}}</button>\n }\n </div>\n <ng-content></ng-content>\n</div>", styles: [".oc-tabs .row{display:flex;gap:1px}.oc-tab{border:none;padding:.75rem 1.3rem;cursor:pointer;border-radius:8px 8px 0 0;background-color:transparent;border-bottom:2px solid #f7f7f7;transition:.15s ease;color:#7e8485}.oc-tab:hover{background-color:#f8f9ff}.oc-tab.oc-selected{border-bottom:2px solid #5505a2;background-color:#f8f9ff;color:#5505a2}.row{max-width:100%;transform:rotateX(180deg);overflow-x:auto}.row .oc-tab{transform:rotateX(180deg)}::-webkit-scrollbar{height:3px}.oc-tabs.shui .row{display:flex;gap:1rem}.oc-tabs.shui .oc-tab{border-bottom:3px solid transparent;font-weight:600;color:#00000080}.oc-tabs.shui .oc-tab:hover{background-color:transparent;border-bottom:3px solid #0169b2}.oc-tabs.shui .oc-tab.oc-selected{border-bottom:3px solid #0169b2;background-color:transparent;color:#00000080}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1447
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OcTabsComponent, isStandalone: true, selector: "oc-tabs", inputs: { ocStyle: "ocStyle" }, outputs: { ocClick: "ocClick" }, queries: [{ propertyName: "ocTabs", predicate: OcTabComponent }], ngImport: i0, template: "<div class=\"oc-tabs\" [ngClass]=\"{\n shui: ocStyle === 'shui'\n}\">\n <div class=\"row\">\n @for(tab of ocTabs; track $index) {\n <button [ngClass]=\"{\n 'oc-selected': tab.tabIndex === activeTabIndex\n }\" class=\"oc-tab\" (click)=\"selectTab(tab.tabIndex); \n handleTabClick()\" type=\"button\">{{tab.ocTitle}}</button>\n }\n <div class=\"row-content\">\n <ng-content select=\"[row]\"></ng-content>\n </div>\n </div>\n <ng-content></ng-content>\n</div>", styles: [".oc-tabs .row{display:flex;gap:1px}.oc-tab{border:none;padding:.75rem 1.3rem;cursor:pointer;border-radius:8px 8px 0 0;background-color:transparent;border-bottom:2px solid #f7f7f7;transition:.15s ease;color:#7e8485}.oc-tab:hover{background-color:#f8f9ff}.oc-tab.oc-selected{border-bottom:2px solid #5505a2;background-color:#f8f9ff;color:#5505a2}.row{max-width:100%;transform:rotateX(180deg);overflow-x:auto}.row .oc-tab{transform:rotateX(180deg);white-space:nowrap}.row .row-content{width:100%;transform:rotateX(180deg)}::-webkit-scrollbar{height:3px}.oc-tabs.shui .row{display:flex;gap:1rem}.oc-tabs.shui .oc-tab{border-bottom:3px solid transparent;font-weight:600;color:#00000080}.oc-tabs.shui .oc-tab:hover{background-color:transparent;border-bottom:3px solid #0169b2}.oc-tabs.shui .oc-tab.oc-selected{border-bottom:3px solid #0169b2;background-color:transparent;color:#00000080}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1419
1448
|
}
|
|
1420
1449
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OcTabsComponent, decorators: [{
|
|
1421
1450
|
type: Component,
|
|
1422
|
-
args: [{ selector: 'oc-tabs', standalone: true, imports: [CommonModule], template: "<div class=\"oc-tabs\" [ngClass]=\"{\n shui: ocStyle === 'shui'\n}\">\n <div class=\"row\">\n @for(tab of ocTabs; track $index) {\n <button [ngClass]=\"{\n 'oc-selected': tab.tabIndex === activeTabIndex\n }\" class=\"oc-tab\" (click)=\"selectTab(tab.tabIndex); \n handleTabClick()\" type=\"button\">{{tab.ocTitle}}</button>\n }\n </div>\n <ng-content></ng-content>\n</div>", styles: [".oc-tabs .row{display:flex;gap:1px}.oc-tab{border:none;padding:.75rem 1.3rem;cursor:pointer;border-radius:8px 8px 0 0;background-color:transparent;border-bottom:2px solid #f7f7f7;transition:.15s ease;color:#7e8485}.oc-tab:hover{background-color:#f8f9ff}.oc-tab.oc-selected{border-bottom:2px solid #5505a2;background-color:#f8f9ff;color:#5505a2}.row{max-width:100%;transform:rotateX(180deg);overflow-x:auto}.row .oc-tab{transform:rotateX(180deg)}::-webkit-scrollbar{height:3px}.oc-tabs.shui .row{display:flex;gap:1rem}.oc-tabs.shui .oc-tab{border-bottom:3px solid transparent;font-weight:600;color:#00000080}.oc-tabs.shui .oc-tab:hover{background-color:transparent;border-bottom:3px solid #0169b2}.oc-tabs.shui .oc-tab.oc-selected{border-bottom:3px solid #0169b2;background-color:transparent;color:#00000080}\n"] }]
|
|
1451
|
+
args: [{ selector: 'oc-tabs', standalone: true, imports: [CommonModule], template: "<div class=\"oc-tabs\" [ngClass]=\"{\n shui: ocStyle === 'shui'\n}\">\n <div class=\"row\">\n @for(tab of ocTabs; track $index) {\n <button [ngClass]=\"{\n 'oc-selected': tab.tabIndex === activeTabIndex\n }\" class=\"oc-tab\" (click)=\"selectTab(tab.tabIndex); \n handleTabClick()\" type=\"button\">{{tab.ocTitle}}</button>\n }\n <div class=\"row-content\">\n <ng-content select=\"[row]\"></ng-content>\n </div>\n </div>\n <ng-content></ng-content>\n</div>", styles: [".oc-tabs .row{display:flex;gap:1px}.oc-tab{border:none;padding:.75rem 1.3rem;cursor:pointer;border-radius:8px 8px 0 0;background-color:transparent;border-bottom:2px solid #f7f7f7;transition:.15s ease;color:#7e8485}.oc-tab:hover{background-color:#f8f9ff}.oc-tab.oc-selected{border-bottom:2px solid #5505a2;background-color:#f8f9ff;color:#5505a2}.row{max-width:100%;transform:rotateX(180deg);overflow-x:auto}.row .oc-tab{transform:rotateX(180deg);white-space:nowrap}.row .row-content{width:100%;transform:rotateX(180deg)}::-webkit-scrollbar{height:3px}.oc-tabs.shui .row{display:flex;gap:1rem}.oc-tabs.shui .oc-tab{border-bottom:3px solid transparent;font-weight:600;color:#00000080}.oc-tabs.shui .oc-tab:hover{background-color:transparent;border-bottom:3px solid #0169b2}.oc-tabs.shui .oc-tab.oc-selected{border-bottom:3px solid #0169b2;background-color:transparent;color:#00000080}\n"] }]
|
|
1423
1452
|
}], ctorParameters: () => [{ type: StyleThemeService }], propDecorators: { ocTabs: [{
|
|
1424
1453
|
type: ContentChildren,
|
|
1425
1454
|
args: [OcTabComponent]
|