ngx-core-components 0.0.8 → 0.1.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/README.md +193 -13
- package/barcodes/barcode/barcode.component.d.ts +19 -0
- package/barcodes/index.d.ts +5 -0
- package/barcodes/public-api.d.ts +2 -0
- package/barcodes/qr-code/qr-code.component.d.ts +17 -0
- package/buttons/button/button.component.d.ts +17 -0
- package/buttons/button-group/button-group.component.d.ts +8 -0
- package/buttons/chip/chip.component.d.ts +19 -0
- package/buttons/dropdown-button/dropdown-button.component.d.ts +21 -0
- package/buttons/index.d.ts +5 -0
- package/buttons/public-api.d.ts +9 -0
- package/buttons/split-button/split-button.component.d.ts +22 -0
- package/feedback/badge/badge.component.d.ts +13 -0
- package/feedback/index.d.ts +5 -0
- package/feedback/notification/notification.service.d.ts +39 -0
- package/feedback/progress-bar/progress-bar.component.d.ts +15 -0
- package/feedback/public-api.d.ts +8 -0
- package/feedback/skeleton/skeleton.component.d.ts +11 -0
- package/fesm2022/ngx-core-components-barcodes.mjs +222 -0
- package/fesm2022/ngx-core-components-barcodes.mjs.map +1 -0
- package/fesm2022/ngx-core-components-buttons.mjs +255 -0
- package/fesm2022/ngx-core-components-buttons.mjs.map +1 -0
- package/fesm2022/ngx-core-components-feedback.mjs +286 -0
- package/fesm2022/ngx-core-components-feedback.mjs.map +1 -0
- package/fesm2022/ngx-core-components-inputs.mjs +634 -1
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-layout.mjs +407 -0
- package/fesm2022/ngx-core-components-layout.mjs.map +1 -0
- package/fesm2022/ngx-core-components-navigation.mjs +184 -0
- package/fesm2022/ngx-core-components-navigation.mjs.map +1 -0
- package/fesm2022/ngx-core-components.mjs +6 -1
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/inputs/color-picker/color-picker.component.d.ts +14 -0
- package/inputs/date-range-picker/date-range-picker.component.d.ts +24 -0
- package/inputs/numeric-textbox/numeric-textbox.component.d.ts +19 -0
- package/inputs/public-api.d.ts +8 -0
- package/inputs/rating/rating.component.d.ts +14 -0
- package/inputs/slider/slider.component.d.ts +26 -0
- package/inputs/switch/switch.component.d.ts +12 -0
- package/inputs/textarea/textarea.component.d.ts +18 -0
- package/inputs/time-picker/time-picker.component.d.ts +20 -0
- package/layout/accordion/accordion.component.d.ts +17 -0
- package/layout/card/card.component.d.ts +16 -0
- package/layout/index.d.ts +5 -0
- package/layout/public-api.d.ts +8 -0
- package/layout/splitter/splitter.component.d.ts +14 -0
- package/layout/stepper/stepper.component.d.ts +20 -0
- package/layout/tab-strip/tab-strip.component.d.ts +22 -0
- package/navigation/breadcrumb/breadcrumb.component.d.ts +14 -0
- package/navigation/index.d.ts +5 -0
- package/navigation/menu/menu.component.d.ts +20 -0
- package/navigation/public-api.d.ts +4 -0
- package/package.json +21 -1
- package/public-api.d.ts +10 -0
|
@@ -1307,6 +1307,639 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1307
1307
|
args: ['document:click', ['$event']]
|
|
1308
1308
|
}] } });
|
|
1309
1309
|
|
|
1310
|
+
class SliderComponent {
|
|
1311
|
+
label = input('');
|
|
1312
|
+
min = input(0);
|
|
1313
|
+
max = input(100);
|
|
1314
|
+
step = input(1);
|
|
1315
|
+
value = signal(0);
|
|
1316
|
+
low = signal(20);
|
|
1317
|
+
high = signal(80);
|
|
1318
|
+
range = input(false);
|
|
1319
|
+
disabled = input(false);
|
|
1320
|
+
showValue = input(true);
|
|
1321
|
+
showTicks = input(false);
|
|
1322
|
+
valueChange = output();
|
|
1323
|
+
rangeChange = output();
|
|
1324
|
+
pct = computed(() => {
|
|
1325
|
+
const min = this.min();
|
|
1326
|
+
const max = this.max();
|
|
1327
|
+
const denom = Math.max(1, max - min);
|
|
1328
|
+
return ((this.clamp(this.value(), min, max) - min) / denom) * 100;
|
|
1329
|
+
});
|
|
1330
|
+
lowPct = computed(() => {
|
|
1331
|
+
const min = this.min();
|
|
1332
|
+
const max = this.max();
|
|
1333
|
+
const denom = Math.max(1, max - min);
|
|
1334
|
+
return ((this.clamp(this.low(), min, max) - min) / denom) * 100;
|
|
1335
|
+
});
|
|
1336
|
+
highPct = computed(() => {
|
|
1337
|
+
const min = this.min();
|
|
1338
|
+
const max = this.max();
|
|
1339
|
+
const denom = Math.max(1, max - min);
|
|
1340
|
+
return 100 - (((this.clamp(this.high(), min, max) - min) / denom) * 100);
|
|
1341
|
+
});
|
|
1342
|
+
clamp(v, min, max) {
|
|
1343
|
+
return Math.min(max, Math.max(min, v));
|
|
1344
|
+
}
|
|
1345
|
+
stepSize() {
|
|
1346
|
+
const step = this.step();
|
|
1347
|
+
return Number.isFinite(step) && step > 0 ? step : 1;
|
|
1348
|
+
}
|
|
1349
|
+
onInput(e) {
|
|
1350
|
+
const target = e.target;
|
|
1351
|
+
const next = this.clamp(+target.value, this.min(), this.max());
|
|
1352
|
+
target.value = String(next);
|
|
1353
|
+
this.value.set(next);
|
|
1354
|
+
this.valueChange.emit(next);
|
|
1355
|
+
}
|
|
1356
|
+
onLow(e) {
|
|
1357
|
+
const target = e.target;
|
|
1358
|
+
const min = this.min();
|
|
1359
|
+
const max = this.max();
|
|
1360
|
+
const step = this.stepSize();
|
|
1361
|
+
const currentHigh = this.clamp(this.high(), min, max);
|
|
1362
|
+
const upperBound = this.clamp(currentHigh - step, min, max);
|
|
1363
|
+
const nextLow = this.clamp(+target.value, min, upperBound);
|
|
1364
|
+
target.value = String(nextLow);
|
|
1365
|
+
this.low.set(nextLow);
|
|
1366
|
+
if (currentHigh !== this.high()) {
|
|
1367
|
+
this.high.set(currentHigh);
|
|
1368
|
+
}
|
|
1369
|
+
this.rangeChange.emit([nextLow, currentHigh]);
|
|
1370
|
+
}
|
|
1371
|
+
onHigh(e) {
|
|
1372
|
+
const target = e.target;
|
|
1373
|
+
const min = this.min();
|
|
1374
|
+
const max = this.max();
|
|
1375
|
+
const step = this.stepSize();
|
|
1376
|
+
const currentLow = this.clamp(this.low(), min, max);
|
|
1377
|
+
const lowerBound = this.clamp(currentLow + step, min, max);
|
|
1378
|
+
const nextHigh = this.clamp(+target.value, lowerBound, max);
|
|
1379
|
+
target.value = String(nextHigh);
|
|
1380
|
+
this.high.set(nextHigh);
|
|
1381
|
+
if (currentLow !== this.low()) {
|
|
1382
|
+
this.low.set(currentLow);
|
|
1383
|
+
}
|
|
1384
|
+
this.rangeChange.emit([currentLow, nextHigh]);
|
|
1385
|
+
}
|
|
1386
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1387
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: SliderComponent, isStandalone: true, selector: "ngx-slider", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, showTicks: { classPropertyName: "showTicks", publicName: "showTicks", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", rangeChange: "rangeChange" }, ngImport: i0, template: `
|
|
1388
|
+
<div class="ngx-slider">
|
|
1389
|
+
@if (label()) { <label class="slider-label">{{ label() }}@if (showValue()) { <span class="slider-value">{{ range() ? (low() + ' – ' + high()) : value() }}</span> }</label> }
|
|
1390
|
+
<div class="slider-track-wrap">
|
|
1391
|
+
@if (!range()) {
|
|
1392
|
+
<input type="range" class="slider-input" [min]="min()" [max]="max()" [step]="step()" [value]="value()" [disabled]="disabled()" (input)="onInput($event)" />
|
|
1393
|
+
<div class="slider-fill" [style.width.%]="pct()"></div>
|
|
1394
|
+
} @else {
|
|
1395
|
+
<div class="slider-range-container">
|
|
1396
|
+
<input type="range" class="slider-input slider-low" [min]="min()" [max]="max()" [step]="step()" [value]="low()" [disabled]="disabled()" (input)="onLow($event)" />
|
|
1397
|
+
<input type="range" class="slider-input slider-high" [min]="min()" [max]="max()" [step]="step()" [value]="high()" [disabled]="disabled()" (input)="onHigh($event)" />
|
|
1398
|
+
<div class="slider-fill-range" [style.left.%]="lowPct()" [style.right.%]="highPct()"></div>
|
|
1399
|
+
</div>
|
|
1400
|
+
}
|
|
1401
|
+
</div>
|
|
1402
|
+
@if (showTicks()) {
|
|
1403
|
+
<div class="slider-ticks">
|
|
1404
|
+
<span>{{ min() }}</span><span>{{ max() }}</span>
|
|
1405
|
+
</div>
|
|
1406
|
+
}
|
|
1407
|
+
</div>
|
|
1408
|
+
`, isInline: true, styles: [":host{display:block}.ngx-slider{width:100%}.slider-label{display:flex;justify-content:space-between;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:8px}.slider-value{font-weight:400;color:var(--ngx-input-text, #212529)}.slider-track-wrap{position:relative;padding:10px 0}.slider-input{width:100%;-webkit-appearance:none;appearance:none;height:5px;background:transparent;border-radius:4px;outline:none;cursor:pointer;position:relative;z-index:5}.slider-input::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--ngx-slider-thumb, #1a73e8);cursor:pointer;box-shadow:0 2px 6px #1a73e84d;border:2px solid #fff;transition:all .2s ease}.slider-input::-webkit-slider-thumb:hover{box-shadow:0 3px 10px #1a73e866;transform:scale(1.1)}.slider-input::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--ngx-slider-thumb, #1a73e8);cursor:pointer;box-shadow:0 2px 6px #1a73e84d;border:2px solid #fff;transition:all .2s ease}.slider-input::-moz-range-thumb:hover{box-shadow:0 3px 10px #1a73e866;transform:scale(1.1)}.slider-input::-moz-range-track{background:transparent;border:none}.slider-input:disabled{opacity:.5;cursor:not-allowed}.slider-range-container{position:relative;height:20px;margin:8px 0}.slider-range-container:before{content:\"\";position:absolute;height:5px;background:var(--ngx-slider-track, #dee2e6);border-radius:4px;width:100%;top:50%;left:0;transform:translateY(-50%);z-index:1}.slider-range-container .slider-input{position:absolute;top:50%;left:0;transform:translateY(-50%);margin:0}.slider-range-container .slider-input::-webkit-slider-runnable-track{height:5px;background:transparent;border:none}.slider-fill{position:absolute;height:5px;background:linear-gradient(90deg,var(--ngx-slider-thumb, #1a73e8),var(--ngx-slider-thumb, #1a73e8));border-radius:4px;bottom:10px;left:0;pointer-events:none;z-index:2}.slider-fill-range{position:absolute;height:5px;background:linear-gradient(90deg,var(--ngx-slider-thumb, #1a73e8),var(--ngx-slider-thumb, #1a73e8));border-radius:4px;top:50%;transform:translateY(-50%);pointer-events:none;z-index:3}.slider-input.slider-low{position:relative;z-index:5}.slider-input.slider-high{position:relative;z-index:4}.slider-ticks{display:flex;justify-content:space-between;font-size:10px;color:#adb5bd;margin-top:4px;padding:0 5px}\n"] });
|
|
1409
|
+
}
|
|
1410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SliderComponent, decorators: [{
|
|
1411
|
+
type: Component,
|
|
1412
|
+
args: [{ selector: 'ngx-slider', standalone: true, template: `
|
|
1413
|
+
<div class="ngx-slider">
|
|
1414
|
+
@if (label()) { <label class="slider-label">{{ label() }}@if (showValue()) { <span class="slider-value">{{ range() ? (low() + ' – ' + high()) : value() }}</span> }</label> }
|
|
1415
|
+
<div class="slider-track-wrap">
|
|
1416
|
+
@if (!range()) {
|
|
1417
|
+
<input type="range" class="slider-input" [min]="min()" [max]="max()" [step]="step()" [value]="value()" [disabled]="disabled()" (input)="onInput($event)" />
|
|
1418
|
+
<div class="slider-fill" [style.width.%]="pct()"></div>
|
|
1419
|
+
} @else {
|
|
1420
|
+
<div class="slider-range-container">
|
|
1421
|
+
<input type="range" class="slider-input slider-low" [min]="min()" [max]="max()" [step]="step()" [value]="low()" [disabled]="disabled()" (input)="onLow($event)" />
|
|
1422
|
+
<input type="range" class="slider-input slider-high" [min]="min()" [max]="max()" [step]="step()" [value]="high()" [disabled]="disabled()" (input)="onHigh($event)" />
|
|
1423
|
+
<div class="slider-fill-range" [style.left.%]="lowPct()" [style.right.%]="highPct()"></div>
|
|
1424
|
+
</div>
|
|
1425
|
+
}
|
|
1426
|
+
</div>
|
|
1427
|
+
@if (showTicks()) {
|
|
1428
|
+
<div class="slider-ticks">
|
|
1429
|
+
<span>{{ min() }}</span><span>{{ max() }}</span>
|
|
1430
|
+
</div>
|
|
1431
|
+
}
|
|
1432
|
+
</div>
|
|
1433
|
+
`, styles: [":host{display:block}.ngx-slider{width:100%}.slider-label{display:flex;justify-content:space-between;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:8px}.slider-value{font-weight:400;color:var(--ngx-input-text, #212529)}.slider-track-wrap{position:relative;padding:10px 0}.slider-input{width:100%;-webkit-appearance:none;appearance:none;height:5px;background:transparent;border-radius:4px;outline:none;cursor:pointer;position:relative;z-index:5}.slider-input::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--ngx-slider-thumb, #1a73e8);cursor:pointer;box-shadow:0 2px 6px #1a73e84d;border:2px solid #fff;transition:all .2s ease}.slider-input::-webkit-slider-thumb:hover{box-shadow:0 3px 10px #1a73e866;transform:scale(1.1)}.slider-input::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--ngx-slider-thumb, #1a73e8);cursor:pointer;box-shadow:0 2px 6px #1a73e84d;border:2px solid #fff;transition:all .2s ease}.slider-input::-moz-range-thumb:hover{box-shadow:0 3px 10px #1a73e866;transform:scale(1.1)}.slider-input::-moz-range-track{background:transparent;border:none}.slider-input:disabled{opacity:.5;cursor:not-allowed}.slider-range-container{position:relative;height:20px;margin:8px 0}.slider-range-container:before{content:\"\";position:absolute;height:5px;background:var(--ngx-slider-track, #dee2e6);border-radius:4px;width:100%;top:50%;left:0;transform:translateY(-50%);z-index:1}.slider-range-container .slider-input{position:absolute;top:50%;left:0;transform:translateY(-50%);margin:0}.slider-range-container .slider-input::-webkit-slider-runnable-track{height:5px;background:transparent;border:none}.slider-fill{position:absolute;height:5px;background:linear-gradient(90deg,var(--ngx-slider-thumb, #1a73e8),var(--ngx-slider-thumb, #1a73e8));border-radius:4px;bottom:10px;left:0;pointer-events:none;z-index:2}.slider-fill-range{position:absolute;height:5px;background:linear-gradient(90deg,var(--ngx-slider-thumb, #1a73e8),var(--ngx-slider-thumb, #1a73e8));border-radius:4px;top:50%;transform:translateY(-50%);pointer-events:none;z-index:3}.slider-input.slider-low{position:relative;z-index:5}.slider-input.slider-high{position:relative;z-index:4}.slider-ticks{display:flex;justify-content:space-between;font-size:10px;color:#adb5bd;margin-top:4px;padding:0 5px}\n"] }]
|
|
1434
|
+
}] });
|
|
1435
|
+
|
|
1436
|
+
class SwitchComponent {
|
|
1437
|
+
checked = signal(false);
|
|
1438
|
+
onLabel = input('On');
|
|
1439
|
+
offLabel = input('Off');
|
|
1440
|
+
size = input('md');
|
|
1441
|
+
disabled = input(false);
|
|
1442
|
+
checkedChange = output();
|
|
1443
|
+
toggle() { this.checked.update(v => !v); this.checkedChange.emit(this.checked()); }
|
|
1444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1445
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: SwitchComponent, isStandalone: true, selector: "ngx-switch", inputs: { onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: true, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, ngImport: i0, template: `
|
|
1446
|
+
<label class="ngx-switch" [class.switch-disabled]="disabled()">
|
|
1447
|
+
<span class="switch-off-label">{{ offLabel() }}</span>
|
|
1448
|
+
<span class="switch-track" [class.checked]="checked()" [class]="'size-' + size()" (click)="toggle()">
|
|
1449
|
+
<span class="switch-thumb"></span>
|
|
1450
|
+
</span>
|
|
1451
|
+
<span class="switch-on-label">{{ onLabel() }}</span>
|
|
1452
|
+
</label>
|
|
1453
|
+
`, isInline: true, styles: [":host{display:inline-block}.ngx-switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.switch-disabled{opacity:.5;pointer-events:none}.switch-track{position:relative;border-radius:999px;background:var(--ngx-switch-off, #dee2e6);transition:background .2s;flex-shrink:0;cursor:pointer}.switch-track.size-sm{width:32px;height:18px}.switch-track.size-md{width:42px;height:24px}.switch-track.size-lg{width:54px;height:30px}.switch-track.checked{background:var(--ngx-switch-on, #1a73e8)}.switch-thumb{position:absolute;top:2px;left:2px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transition:transform .2s;pointer-events:none}.size-sm .switch-thumb{width:14px;height:14px}.size-md .switch-thumb{width:20px;height:20px}.size-lg .switch-thumb{width:26px;height:26px}.size-sm.checked .switch-thumb{transform:translate(14px)}.size-md.checked .switch-thumb{transform:translate(18px)}.size-lg.checked .switch-thumb{transform:translate(24px)}.switch-off-label,.switch-on-label{font-size:13px;color:var(--ngx-input-label, #495057)}\n"] });
|
|
1454
|
+
}
|
|
1455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
1456
|
+
type: Component,
|
|
1457
|
+
args: [{ selector: 'ngx-switch', standalone: true, template: `
|
|
1458
|
+
<label class="ngx-switch" [class.switch-disabled]="disabled()">
|
|
1459
|
+
<span class="switch-off-label">{{ offLabel() }}</span>
|
|
1460
|
+
<span class="switch-track" [class.checked]="checked()" [class]="'size-' + size()" (click)="toggle()">
|
|
1461
|
+
<span class="switch-thumb"></span>
|
|
1462
|
+
</span>
|
|
1463
|
+
<span class="switch-on-label">{{ onLabel() }}</span>
|
|
1464
|
+
</label>
|
|
1465
|
+
`, styles: [":host{display:inline-block}.ngx-switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.switch-disabled{opacity:.5;pointer-events:none}.switch-track{position:relative;border-radius:999px;background:var(--ngx-switch-off, #dee2e6);transition:background .2s;flex-shrink:0;cursor:pointer}.switch-track.size-sm{width:32px;height:18px}.switch-track.size-md{width:42px;height:24px}.switch-track.size-lg{width:54px;height:30px}.switch-track.checked{background:var(--ngx-switch-on, #1a73e8)}.switch-thumb{position:absolute;top:2px;left:2px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transition:transform .2s;pointer-events:none}.size-sm .switch-thumb{width:14px;height:14px}.size-md .switch-thumb{width:20px;height:20px}.size-lg .switch-thumb{width:26px;height:26px}.size-sm.checked .switch-thumb{transform:translate(14px)}.size-md.checked .switch-thumb{transform:translate(18px)}.size-lg.checked .switch-thumb{transform:translate(24px)}.switch-off-label,.switch-on-label{font-size:13px;color:var(--ngx-input-label, #495057)}\n"] }]
|
|
1466
|
+
}] });
|
|
1467
|
+
|
|
1468
|
+
class RatingComponent {
|
|
1469
|
+
max = input(5);
|
|
1470
|
+
label = input('');
|
|
1471
|
+
readonly = input(false);
|
|
1472
|
+
showValue = input(false);
|
|
1473
|
+
current = signal(0);
|
|
1474
|
+
hovered = signal(0);
|
|
1475
|
+
ratingChange = output();
|
|
1476
|
+
stars = () => Array.from({ length: this.max() }, (_, i) => i + 1);
|
|
1477
|
+
setRating(star) { if (!this.readonly()) {
|
|
1478
|
+
this.current.set(star);
|
|
1479
|
+
this.ratingChange.emit(star);
|
|
1480
|
+
} }
|
|
1481
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1482
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: RatingComponent, isStandalone: true, selector: "ngx-rating", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ratingChange: "ratingChange" }, ngImport: i0, template: `
|
|
1483
|
+
<div class="ngx-rating" [attr.aria-label]="label() + ' rating: ' + current() + ' of ' + max()">
|
|
1484
|
+
@if (label()) { <span class="rating-label">{{ label() }}</span> }
|
|
1485
|
+
<div class="rating-stars">
|
|
1486
|
+
@for (star of stars(); track star) {
|
|
1487
|
+
<button
|
|
1488
|
+
class="rating-star"
|
|
1489
|
+
[class.filled]="(hovered() || current()) >= star"
|
|
1490
|
+
[class.hovered]="hovered() >= star"
|
|
1491
|
+
[disabled]="readonly()"
|
|
1492
|
+
type="button"
|
|
1493
|
+
[attr.aria-label]="'Rate ' + star"
|
|
1494
|
+
(mouseenter)="hovered.set(star)"
|
|
1495
|
+
(mouseleave)="hovered.set(0)"
|
|
1496
|
+
(click)="setRating(star)"
|
|
1497
|
+
>{{ (hovered() || current()) >= star ? '★' : '☆' }}</button>
|
|
1498
|
+
}
|
|
1499
|
+
</div>
|
|
1500
|
+
@if (showValue()) { <span class="rating-value">{{ current() }}/{{ max() }}</span> }
|
|
1501
|
+
</div>
|
|
1502
|
+
`, isInline: true, styles: [":host{display:inline-block}.ngx-rating{display:inline-flex;align-items:center;gap:8px}.rating-label{font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057)}.rating-stars{display:flex;gap:2px}.rating-star{background:none;border:none;cursor:pointer;font-size:22px;padding:0;line-height:1;color:var(--ngx-rating-empty, #dee2e6);transition:color .1s,transform .1s}.rating-star.filled{color:var(--ngx-rating-filled, #f39c12)}.rating-star.hovered{color:var(--ngx-rating-hover, #f1c40f);transform:scale(1.15)}.rating-star:disabled{cursor:default}.rating-value{font-size:12px;color:#6c757d}\n"] });
|
|
1503
|
+
}
|
|
1504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RatingComponent, decorators: [{
|
|
1505
|
+
type: Component,
|
|
1506
|
+
args: [{ selector: 'ngx-rating', standalone: true, template: `
|
|
1507
|
+
<div class="ngx-rating" [attr.aria-label]="label() + ' rating: ' + current() + ' of ' + max()">
|
|
1508
|
+
@if (label()) { <span class="rating-label">{{ label() }}</span> }
|
|
1509
|
+
<div class="rating-stars">
|
|
1510
|
+
@for (star of stars(); track star) {
|
|
1511
|
+
<button
|
|
1512
|
+
class="rating-star"
|
|
1513
|
+
[class.filled]="(hovered() || current()) >= star"
|
|
1514
|
+
[class.hovered]="hovered() >= star"
|
|
1515
|
+
[disabled]="readonly()"
|
|
1516
|
+
type="button"
|
|
1517
|
+
[attr.aria-label]="'Rate ' + star"
|
|
1518
|
+
(mouseenter)="hovered.set(star)"
|
|
1519
|
+
(mouseleave)="hovered.set(0)"
|
|
1520
|
+
(click)="setRating(star)"
|
|
1521
|
+
>{{ (hovered() || current()) >= star ? '★' : '☆' }}</button>
|
|
1522
|
+
}
|
|
1523
|
+
</div>
|
|
1524
|
+
@if (showValue()) { <span class="rating-value">{{ current() }}/{{ max() }}</span> }
|
|
1525
|
+
</div>
|
|
1526
|
+
`, styles: [":host{display:inline-block}.ngx-rating{display:inline-flex;align-items:center;gap:8px}.rating-label{font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057)}.rating-stars{display:flex;gap:2px}.rating-star{background:none;border:none;cursor:pointer;font-size:22px;padding:0;line-height:1;color:var(--ngx-rating-empty, #dee2e6);transition:color .1s,transform .1s}.rating-star.filled{color:var(--ngx-rating-filled, #f39c12)}.rating-star.hovered{color:var(--ngx-rating-hover, #f1c40f);transform:scale(1.15)}.rating-star:disabled{cursor:default}.rating-value{font-size:12px;color:#6c757d}\n"] }]
|
|
1527
|
+
}] });
|
|
1528
|
+
|
|
1529
|
+
class NumericTextBoxComponent {
|
|
1530
|
+
label = input('');
|
|
1531
|
+
min = input(-Infinity);
|
|
1532
|
+
max = input(Infinity);
|
|
1533
|
+
step = input(1);
|
|
1534
|
+
value = signal(0);
|
|
1535
|
+
disabled = input(false);
|
|
1536
|
+
placeholder = input('');
|
|
1537
|
+
prefix = input('');
|
|
1538
|
+
suffix = input('');
|
|
1539
|
+
focused = signal(false);
|
|
1540
|
+
valueChange = output();
|
|
1541
|
+
onChange(e) { const v = +e.target.value; this.setValue(v); }
|
|
1542
|
+
spin(dir) { this.setValue(this.value() + dir * this.step()); }
|
|
1543
|
+
setValue(v) { const clamped = Math.max(this.min(), Math.min(this.max(), v)); this.value.set(clamped); this.valueChange.emit(clamped); }
|
|
1544
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NumericTextBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1545
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: NumericTextBoxComponent, isStandalone: true, selector: "ngx-numeric-textbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
1546
|
+
<div class="ngx-numeric" [class.disabled]="disabled()">
|
|
1547
|
+
@if (label()) { <label class="numeric-label">{{ label() }}</label> }
|
|
1548
|
+
<div class="numeric-input-wrap" [class.focused]="focused()">
|
|
1549
|
+
@if (prefix()) { <span class="numeric-prefix">{{ prefix() }}</span> }
|
|
1550
|
+
<input
|
|
1551
|
+
type="number" class="numeric-input"
|
|
1552
|
+
[min]="min()" [max]="max()" [step]="step()"
|
|
1553
|
+
[value]="value()" [disabled]="disabled()" [placeholder]="placeholder()"
|
|
1554
|
+
(focus)="focused.set(true)" (blur)="focused.set(false)"
|
|
1555
|
+
(change)="onChange($event)"
|
|
1556
|
+
/>
|
|
1557
|
+
@if (suffix()) { <span class="numeric-suffix">{{ suffix() }}</span> }
|
|
1558
|
+
<div class="numeric-spin">
|
|
1559
|
+
<button class="spin-btn" type="button" [disabled]="disabled() || value() >= max()" (click)="spin(1)">▲</button>
|
|
1560
|
+
<button class="spin-btn" type="button" [disabled]="disabled() || value() <= min()" (click)="spin(-1)">▼</button>
|
|
1561
|
+
</div>
|
|
1562
|
+
</div>
|
|
1563
|
+
</div>
|
|
1564
|
+
`, isInline: true, styles: [":host{display:block}.ngx-numeric{width:100%}.numeric-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.numeric-input-wrap{display:flex;align-items:center;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);background:var(--ngx-input-bg, #fff);overflow:hidden;transition:border-color .15s}.numeric-input-wrap.focused{border-color:var(--ngx-input-focus, #1a73e8);box-shadow:0 0 0 2px #1a73e826}.disabled .numeric-input-wrap{opacity:.5}.numeric-input{flex:1;padding:8px 10px;border:none;background:transparent;font-size:14px;color:var(--ngx-input-text, #212529);outline:none;min-width:0;-moz-appearance:textfield}.numeric-input::-webkit-outer-spin-button,.numeric-input::-webkit-inner-spin-button{-webkit-appearance:none}.numeric-prefix,.numeric-suffix{padding:0 8px;color:#6c757d;font-size:12px;flex-shrink:0}.numeric-spin{display:flex;flex-direction:column;border-left:1px solid var(--ngx-input-border, #ced4da)}.spin-btn{border:none;background:transparent;cursor:pointer;font-size:8px;padding:3px 7px;color:#6c757d;flex:1;line-height:1}.spin-btn:hover:not(:disabled){background:#f1f3f5}.spin-btn:disabled{opacity:.4;cursor:not-allowed}\n"] });
|
|
1565
|
+
}
|
|
1566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NumericTextBoxComponent, decorators: [{
|
|
1567
|
+
type: Component,
|
|
1568
|
+
args: [{ selector: 'ngx-numeric-textbox', standalone: true, template: `
|
|
1569
|
+
<div class="ngx-numeric" [class.disabled]="disabled()">
|
|
1570
|
+
@if (label()) { <label class="numeric-label">{{ label() }}</label> }
|
|
1571
|
+
<div class="numeric-input-wrap" [class.focused]="focused()">
|
|
1572
|
+
@if (prefix()) { <span class="numeric-prefix">{{ prefix() }}</span> }
|
|
1573
|
+
<input
|
|
1574
|
+
type="number" class="numeric-input"
|
|
1575
|
+
[min]="min()" [max]="max()" [step]="step()"
|
|
1576
|
+
[value]="value()" [disabled]="disabled()" [placeholder]="placeholder()"
|
|
1577
|
+
(focus)="focused.set(true)" (blur)="focused.set(false)"
|
|
1578
|
+
(change)="onChange($event)"
|
|
1579
|
+
/>
|
|
1580
|
+
@if (suffix()) { <span class="numeric-suffix">{{ suffix() }}</span> }
|
|
1581
|
+
<div class="numeric-spin">
|
|
1582
|
+
<button class="spin-btn" type="button" [disabled]="disabled() || value() >= max()" (click)="spin(1)">▲</button>
|
|
1583
|
+
<button class="spin-btn" type="button" [disabled]="disabled() || value() <= min()" (click)="spin(-1)">▼</button>
|
|
1584
|
+
</div>
|
|
1585
|
+
</div>
|
|
1586
|
+
</div>
|
|
1587
|
+
`, styles: [":host{display:block}.ngx-numeric{width:100%}.numeric-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.numeric-input-wrap{display:flex;align-items:center;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);background:var(--ngx-input-bg, #fff);overflow:hidden;transition:border-color .15s}.numeric-input-wrap.focused{border-color:var(--ngx-input-focus, #1a73e8);box-shadow:0 0 0 2px #1a73e826}.disabled .numeric-input-wrap{opacity:.5}.numeric-input{flex:1;padding:8px 10px;border:none;background:transparent;font-size:14px;color:var(--ngx-input-text, #212529);outline:none;min-width:0;-moz-appearance:textfield}.numeric-input::-webkit-outer-spin-button,.numeric-input::-webkit-inner-spin-button{-webkit-appearance:none}.numeric-prefix,.numeric-suffix{padding:0 8px;color:#6c757d;font-size:12px;flex-shrink:0}.numeric-spin{display:flex;flex-direction:column;border-left:1px solid var(--ngx-input-border, #ced4da)}.spin-btn{border:none;background:transparent;cursor:pointer;font-size:8px;padding:3px 7px;color:#6c757d;flex:1;line-height:1}.spin-btn:hover:not(:disabled){background:#f1f3f5}.spin-btn:disabled{opacity:.4;cursor:not-allowed}\n"] }]
|
|
1588
|
+
}] });
|
|
1589
|
+
|
|
1590
|
+
class TextareaComponent {
|
|
1591
|
+
label = input('');
|
|
1592
|
+
placeholder = input('');
|
|
1593
|
+
rows = input(4);
|
|
1594
|
+
maxlength = input(0);
|
|
1595
|
+
disabled = input(false);
|
|
1596
|
+
autoResize = input(false);
|
|
1597
|
+
hint = input('');
|
|
1598
|
+
error = input('');
|
|
1599
|
+
value = signal('');
|
|
1600
|
+
focused = signal(false);
|
|
1601
|
+
charCount = computed(() => this.value().length);
|
|
1602
|
+
valueChange = output();
|
|
1603
|
+
onInput(e) { const v = e.target.value; this.value.set(v); this.valueChange.emit(v); }
|
|
1604
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1605
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TextareaComponent, isStandalone: true, selector: "ngx-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
1606
|
+
<div class="ngx-textarea-wrap" [class.has-error]="error()">
|
|
1607
|
+
@if (label()) { <label class="textarea-label">{{ label() }}</label> }
|
|
1608
|
+
<textarea
|
|
1609
|
+
class="ngx-textarea"
|
|
1610
|
+
[rows]="rows()"
|
|
1611
|
+
[placeholder]="placeholder()"
|
|
1612
|
+
[disabled]="disabled()"
|
|
1613
|
+
[attr.maxlength]="maxlength() > 0 ? maxlength() : null"
|
|
1614
|
+
[value]="value()"
|
|
1615
|
+
[class.auto-resize]="autoResize()"
|
|
1616
|
+
(input)="onInput($event)"
|
|
1617
|
+
(focus)="focused.set(true)"
|
|
1618
|
+
(blur)="focused.set(false)"
|
|
1619
|
+
></textarea>
|
|
1620
|
+
<div class="textarea-footer">
|
|
1621
|
+
@if (error()) { <span class="textarea-error">{{ error() }}</span> }
|
|
1622
|
+
@else if (hint()) { <span class="textarea-hint">{{ hint() }}</span> }
|
|
1623
|
+
@else { <span></span> }
|
|
1624
|
+
@if (maxlength() > 0) { <span class="textarea-counter" [class.near-limit]="charCount() > maxlength() * 0.8">{{ charCount() }}/{{ maxlength() }}</span> }
|
|
1625
|
+
</div>
|
|
1626
|
+
</div>
|
|
1627
|
+
`, isInline: true, styles: [":host{display:block}.ngx-textarea-wrap{width:100%}.textarea-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.ngx-textarea{width:100%;padding:10px 12px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);background:var(--ngx-input-bg, #fff);color:var(--ngx-input-text, #212529);font-size:14px;font-family:inherit;resize:vertical;transition:border-color .15s;outline:none;box-sizing:border-box}.ngx-textarea:focus{border-color:var(--ngx-input-focus, #1a73e8);box-shadow:0 0 0 2px #1a73e826}.ngx-textarea:disabled{opacity:.5;cursor:not-allowed}.has-error .ngx-textarea{border-color:var(--ngx-input-error, #e74c3c)}.textarea-footer{display:flex;justify-content:space-between;align-items:center;margin-top:4px;font-size:11px}.textarea-error{color:var(--ngx-input-error, #e74c3c)}.textarea-hint,.textarea-counter{color:#6c757d}.textarea-counter.near-limit{color:#e74c3c}\n"] });
|
|
1628
|
+
}
|
|
1629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
1630
|
+
type: Component,
|
|
1631
|
+
args: [{ selector: 'ngx-textarea', standalone: true, template: `
|
|
1632
|
+
<div class="ngx-textarea-wrap" [class.has-error]="error()">
|
|
1633
|
+
@if (label()) { <label class="textarea-label">{{ label() }}</label> }
|
|
1634
|
+
<textarea
|
|
1635
|
+
class="ngx-textarea"
|
|
1636
|
+
[rows]="rows()"
|
|
1637
|
+
[placeholder]="placeholder()"
|
|
1638
|
+
[disabled]="disabled()"
|
|
1639
|
+
[attr.maxlength]="maxlength() > 0 ? maxlength() : null"
|
|
1640
|
+
[value]="value()"
|
|
1641
|
+
[class.auto-resize]="autoResize()"
|
|
1642
|
+
(input)="onInput($event)"
|
|
1643
|
+
(focus)="focused.set(true)"
|
|
1644
|
+
(blur)="focused.set(false)"
|
|
1645
|
+
></textarea>
|
|
1646
|
+
<div class="textarea-footer">
|
|
1647
|
+
@if (error()) { <span class="textarea-error">{{ error() }}</span> }
|
|
1648
|
+
@else if (hint()) { <span class="textarea-hint">{{ hint() }}</span> }
|
|
1649
|
+
@else { <span></span> }
|
|
1650
|
+
@if (maxlength() > 0) { <span class="textarea-counter" [class.near-limit]="charCount() > maxlength() * 0.8">{{ charCount() }}/{{ maxlength() }}</span> }
|
|
1651
|
+
</div>
|
|
1652
|
+
</div>
|
|
1653
|
+
`, styles: [":host{display:block}.ngx-textarea-wrap{width:100%}.textarea-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.ngx-textarea{width:100%;padding:10px 12px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);background:var(--ngx-input-bg, #fff);color:var(--ngx-input-text, #212529);font-size:14px;font-family:inherit;resize:vertical;transition:border-color .15s;outline:none;box-sizing:border-box}.ngx-textarea:focus{border-color:var(--ngx-input-focus, #1a73e8);box-shadow:0 0 0 2px #1a73e826}.ngx-textarea:disabled{opacity:.5;cursor:not-allowed}.has-error .ngx-textarea{border-color:var(--ngx-input-error, #e74c3c)}.textarea-footer{display:flex;justify-content:space-between;align-items:center;margin-top:4px;font-size:11px}.textarea-error{color:var(--ngx-input-error, #e74c3c)}.textarea-hint,.textarea-counter{color:#6c757d}.textarea-counter.near-limit{color:#e74c3c}\n"] }]
|
|
1654
|
+
}] });
|
|
1655
|
+
|
|
1656
|
+
const COLORS = [
|
|
1657
|
+
'#000000', '#434343', '#666666', '#999999', '#b7b7b7', '#cccccc', '#d9d9d9', '#ffffff',
|
|
1658
|
+
'#ff0000', '#ff9900', '#ffff00', '#00ff00', '#00ffff', '#4a86e8', '#0000ff', '#9900ff',
|
|
1659
|
+
'#ff00ff', '#e06666', '#f6b26b', '#ffd966', '#93c47d', '#76d7ea', '#6fa8dc', '#8e7cc3',
|
|
1660
|
+
'#c27ba0', '#ea9999', '#f9cb9c', '#ffe599', '#b6d7a8', '#a2c4c9', '#9fc5e8', '#b4a7d6',
|
|
1661
|
+
];
|
|
1662
|
+
class ColorPickerComponent {
|
|
1663
|
+
label = input('');
|
|
1664
|
+
value = signal('#1a73e8');
|
|
1665
|
+
open = signal(false);
|
|
1666
|
+
colorChange = output();
|
|
1667
|
+
colors = COLORS;
|
|
1668
|
+
pick(color) { this.value.set(color); this.colorChange.emit(color); this.open.set(false); }
|
|
1669
|
+
onHexInput(e) { const v = e.target.value; if (/^[0-9a-fA-F]{6}$/.test(v))
|
|
1670
|
+
this.pick('#' + v); }
|
|
1671
|
+
toggleOpen() { this.open.update(v => !v); }
|
|
1672
|
+
onNativeInput(e) { const v = e.target.value; if (v)
|
|
1673
|
+
this.pick(v); }
|
|
1674
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1675
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ColorPickerComponent, isStandalone: true, selector: "ngx-color-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: `
|
|
1676
|
+
<div class="ngx-color-picker">
|
|
1677
|
+
@if (label()) { <label class="cp-label">{{ label() }}</label> }
|
|
1678
|
+
<div class="cp-trigger" (click)="toggleOpen()">
|
|
1679
|
+
<span class="cp-swatch" [style.background]="value()"></span>
|
|
1680
|
+
<span class="cp-hex">{{ value() }}</span>
|
|
1681
|
+
<span class="cp-arrow">▾</span>
|
|
1682
|
+
</div>
|
|
1683
|
+
@if (open()) {
|
|
1684
|
+
<div class="cp-panel">
|
|
1685
|
+
<div class="cp-swatches">
|
|
1686
|
+
@for (c of colors; track c) {
|
|
1687
|
+
<button class="cp-swatch-btn" [style.background]="c" [class.selected]="value() === c" [attr.title]="c" (click)="pick(c)"></button>
|
|
1688
|
+
}
|
|
1689
|
+
</div>
|
|
1690
|
+
<div class="cp-hex-row">
|
|
1691
|
+
<span class="cp-hex-label">#</span>
|
|
1692
|
+
<input class="cp-hex-input" type="text" [value]="value().replace('#','')" maxlength="6" placeholder="rrggbb" (change)="onHexInput($event)" />
|
|
1693
|
+
<input class="cp-native" type="color" [value]="value()" (input)="onNativeInput($event)" />
|
|
1694
|
+
</div>
|
|
1695
|
+
</div>
|
|
1696
|
+
}
|
|
1697
|
+
</div>
|
|
1698
|
+
`, isInline: true, styles: [":host{display:inline-block;position:relative}.ngx-color-picker{position:relative}.cp-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.cp-trigger{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);cursor:pointer;background:var(--ngx-input-bg, #fff);font-size:13px}.cp-swatch{width:18px;height:18px;border-radius:3px;border:1px solid rgba(0,0,0,.15);flex-shrink:0}.cp-hex{color:var(--ngx-input-text, #212529);font-family:monospace}.cp-arrow{font-size:10px;color:#6c757d}.cp-panel{position:absolute;top:calc(100% + 4px);left:0;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:8px;box-shadow:0 8px 32px #00000026;z-index:1000;padding:12px;min-width:200px}.cp-swatches{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;margin-bottom:10px}.cp-swatch-btn{width:20px;height:20px;border:1px solid rgba(0,0,0,.12);border-radius:3px;cursor:pointer;padding:0}.cp-swatch-btn.selected{outline:2px solid #1a73e8;outline-offset:1px}.cp-hex-row{display:flex;align-items:center;gap:4px}.cp-hex-label{color:#6c757d;font-weight:600}.cp-hex-input{flex:1;padding:5px 8px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:4px;font-size:13px;font-family:monospace;outline:none}.cp-native{width:28px;height:28px;border:none;padding:0;cursor:pointer;background:none;border-radius:4px}\n"] });
|
|
1699
|
+
}
|
|
1700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
1701
|
+
type: Component,
|
|
1702
|
+
args: [{ selector: 'ngx-color-picker', standalone: true, template: `
|
|
1703
|
+
<div class="ngx-color-picker">
|
|
1704
|
+
@if (label()) { <label class="cp-label">{{ label() }}</label> }
|
|
1705
|
+
<div class="cp-trigger" (click)="toggleOpen()">
|
|
1706
|
+
<span class="cp-swatch" [style.background]="value()"></span>
|
|
1707
|
+
<span class="cp-hex">{{ value() }}</span>
|
|
1708
|
+
<span class="cp-arrow">▾</span>
|
|
1709
|
+
</div>
|
|
1710
|
+
@if (open()) {
|
|
1711
|
+
<div class="cp-panel">
|
|
1712
|
+
<div class="cp-swatches">
|
|
1713
|
+
@for (c of colors; track c) {
|
|
1714
|
+
<button class="cp-swatch-btn" [style.background]="c" [class.selected]="value() === c" [attr.title]="c" (click)="pick(c)"></button>
|
|
1715
|
+
}
|
|
1716
|
+
</div>
|
|
1717
|
+
<div class="cp-hex-row">
|
|
1718
|
+
<span class="cp-hex-label">#</span>
|
|
1719
|
+
<input class="cp-hex-input" type="text" [value]="value().replace('#','')" maxlength="6" placeholder="rrggbb" (change)="onHexInput($event)" />
|
|
1720
|
+
<input class="cp-native" type="color" [value]="value()" (input)="onNativeInput($event)" />
|
|
1721
|
+
</div>
|
|
1722
|
+
</div>
|
|
1723
|
+
}
|
|
1724
|
+
</div>
|
|
1725
|
+
`, styles: [":host{display:inline-block;position:relative}.ngx-color-picker{position:relative}.cp-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.cp-trigger{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);cursor:pointer;background:var(--ngx-input-bg, #fff);font-size:13px}.cp-swatch{width:18px;height:18px;border-radius:3px;border:1px solid rgba(0,0,0,.15);flex-shrink:0}.cp-hex{color:var(--ngx-input-text, #212529);font-family:monospace}.cp-arrow{font-size:10px;color:#6c757d}.cp-panel{position:absolute;top:calc(100% + 4px);left:0;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:8px;box-shadow:0 8px 32px #00000026;z-index:1000;padding:12px;min-width:200px}.cp-swatches{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;margin-bottom:10px}.cp-swatch-btn{width:20px;height:20px;border:1px solid rgba(0,0,0,.12);border-radius:3px;cursor:pointer;padding:0}.cp-swatch-btn.selected{outline:2px solid #1a73e8;outline-offset:1px}.cp-hex-row{display:flex;align-items:center;gap:4px}.cp-hex-label{color:#6c757d;font-weight:600}.cp-hex-input{flex:1;padding:5px 8px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:4px;font-size:13px;font-family:monospace;outline:none}.cp-native{width:28px;height:28px;border:none;padding:0;cursor:pointer;background:none;border-radius:4px}\n"] }]
|
|
1726
|
+
}] });
|
|
1727
|
+
|
|
1728
|
+
class TimePickerComponent {
|
|
1729
|
+
label = input('');
|
|
1730
|
+
use12h = input(false);
|
|
1731
|
+
hour = signal(9);
|
|
1732
|
+
min = signal(0);
|
|
1733
|
+
ampm = signal('AM');
|
|
1734
|
+
focused = signal(false);
|
|
1735
|
+
timeChange = output();
|
|
1736
|
+
hours = this.use12h() ? Array.from({ length: 12 }, (_, i) => i + 1) : Array.from({ length: 24 }, (_, i) => i);
|
|
1737
|
+
minutes = Array.from({ length: 60 }, (_, i) => i);
|
|
1738
|
+
displayHour = () => this.use12h() ? ((this.hour() % 12) || 12) : this.hour();
|
|
1739
|
+
pad = (n) => n.toString().padStart(2, '0');
|
|
1740
|
+
onHour(e) { this.hour.set(+e.target.value); this.emit(); }
|
|
1741
|
+
onMin(e) { this.min.set(+e.target.value); this.emit(); }
|
|
1742
|
+
onAmPm(e) { this.ampm.set(e.target.value); this.emit(); }
|
|
1743
|
+
emit() { this.timeChange.emit(`${this.pad(this.hour())}:${this.pad(this.min())}`); }
|
|
1744
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1745
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TimePickerComponent, isStandalone: true, selector: "ngx-time-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, use12h: { classPropertyName: "use12h", publicName: "use12h", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { timeChange: "timeChange" }, ngImport: i0, template: `
|
|
1746
|
+
<div class="ngx-time-picker">
|
|
1747
|
+
@if (label()) { <label class="tp-label">{{ label() }}</label> }
|
|
1748
|
+
<div class="tp-input-wrap" [class.focused]="focused()">
|
|
1749
|
+
<select class="tp-select" (change)="onHour($event)" (focus)="focused.set(true)" (blur)="focused.set(false)">
|
|
1750
|
+
@for (h of hours; track h) {
|
|
1751
|
+
<option [value]="h" [selected]="h === displayHour()">{{ pad(h) }}</option>
|
|
1752
|
+
}
|
|
1753
|
+
</select>
|
|
1754
|
+
<span class="tp-sep">:</span>
|
|
1755
|
+
<select class="tp-select" (change)="onMin($event)">
|
|
1756
|
+
@for (m of minutes; track m) {
|
|
1757
|
+
<option [value]="m" [selected]="m === min()">{{ pad(m) }}</option>
|
|
1758
|
+
}
|
|
1759
|
+
</select>
|
|
1760
|
+
@if (use12h()) {
|
|
1761
|
+
<select class="tp-select tp-ampm" (change)="onAmPm($event)">
|
|
1762
|
+
<option [selected]="ampm() === 'AM'">AM</option>
|
|
1763
|
+
<option [selected]="ampm() === 'PM'">PM</option>
|
|
1764
|
+
</select>
|
|
1765
|
+
}
|
|
1766
|
+
</div>
|
|
1767
|
+
</div>
|
|
1768
|
+
`, isInline: true, styles: [":host{display:inline-block}.tp-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.tp-input-wrap{display:inline-flex;align-items:center;gap:2px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);background:var(--ngx-input-bg, #fff);padding:4px 10px;transition:border-color .15s}.tp-input-wrap.focused{border-color:var(--ngx-input-focus, #1a73e8);box-shadow:0 0 0 2px #1a73e826}.tp-select{border:none;background:transparent;font-size:14px;color:var(--ngx-input-text, #212529);outline:none;cursor:pointer;font-family:inherit}.tp-sep{color:#adb5bd;font-weight:700}.tp-ampm{margin-left:6px}\n"] });
|
|
1769
|
+
}
|
|
1770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
1771
|
+
type: Component,
|
|
1772
|
+
args: [{ selector: 'ngx-time-picker', standalone: true, template: `
|
|
1773
|
+
<div class="ngx-time-picker">
|
|
1774
|
+
@if (label()) { <label class="tp-label">{{ label() }}</label> }
|
|
1775
|
+
<div class="tp-input-wrap" [class.focused]="focused()">
|
|
1776
|
+
<select class="tp-select" (change)="onHour($event)" (focus)="focused.set(true)" (blur)="focused.set(false)">
|
|
1777
|
+
@for (h of hours; track h) {
|
|
1778
|
+
<option [value]="h" [selected]="h === displayHour()">{{ pad(h) }}</option>
|
|
1779
|
+
}
|
|
1780
|
+
</select>
|
|
1781
|
+
<span class="tp-sep">:</span>
|
|
1782
|
+
<select class="tp-select" (change)="onMin($event)">
|
|
1783
|
+
@for (m of minutes; track m) {
|
|
1784
|
+
<option [value]="m" [selected]="m === min()">{{ pad(m) }}</option>
|
|
1785
|
+
}
|
|
1786
|
+
</select>
|
|
1787
|
+
@if (use12h()) {
|
|
1788
|
+
<select class="tp-select tp-ampm" (change)="onAmPm($event)">
|
|
1789
|
+
<option [selected]="ampm() === 'AM'">AM</option>
|
|
1790
|
+
<option [selected]="ampm() === 'PM'">PM</option>
|
|
1791
|
+
</select>
|
|
1792
|
+
}
|
|
1793
|
+
</div>
|
|
1794
|
+
</div>
|
|
1795
|
+
`, styles: [":host{display:inline-block}.tp-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.tp-input-wrap{display:inline-flex;align-items:center;gap:2px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);background:var(--ngx-input-bg, #fff);padding:4px 10px;transition:border-color .15s}.tp-input-wrap.focused{border-color:var(--ngx-input-focus, #1a73e8);box-shadow:0 0 0 2px #1a73e826}.tp-select{border:none;background:transparent;font-size:14px;color:var(--ngx-input-text, #212529);outline:none;cursor:pointer;font-family:inherit}.tp-sep{color:#adb5bd;font-weight:700}.tp-ampm{margin-left:6px}\n"] }]
|
|
1796
|
+
}] });
|
|
1797
|
+
|
|
1798
|
+
class DateRangePickerComponent {
|
|
1799
|
+
label = input('');
|
|
1800
|
+
startDate = signal('');
|
|
1801
|
+
endDate = signal('');
|
|
1802
|
+
open = signal(false);
|
|
1803
|
+
picking = signal('start');
|
|
1804
|
+
viewMonth = signal(new Date().getMonth());
|
|
1805
|
+
viewYear = signal(new Date().getFullYear());
|
|
1806
|
+
rangeChange = output();
|
|
1807
|
+
weekDays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
1808
|
+
monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
1809
|
+
monthName(m) { return this.monthNames[m]; }
|
|
1810
|
+
toggleOpen() { this.open.update(v => !v); }
|
|
1811
|
+
prevMonth(e) { e.stopPropagation(); if (this.viewMonth() === 0) {
|
|
1812
|
+
this.viewMonth.set(11);
|
|
1813
|
+
this.viewYear.update(y => y - 1);
|
|
1814
|
+
}
|
|
1815
|
+
else
|
|
1816
|
+
this.viewMonth.update(m => m - 1); }
|
|
1817
|
+
nextMonth(e) { e.stopPropagation(); if (this.viewMonth() === 11) {
|
|
1818
|
+
this.viewMonth.set(0);
|
|
1819
|
+
this.viewYear.update(y => y + 1);
|
|
1820
|
+
}
|
|
1821
|
+
else
|
|
1822
|
+
this.viewMonth.update(m => m + 1); }
|
|
1823
|
+
calendarDays = computed(() => {
|
|
1824
|
+
const y = this.viewYear(), m = this.viewMonth();
|
|
1825
|
+
const first = new Date(y, m, 1).getDay();
|
|
1826
|
+
const days = [];
|
|
1827
|
+
const today = new Date();
|
|
1828
|
+
today.setHours(0, 0, 0, 0);
|
|
1829
|
+
const s = this.startDate() ? new Date(this.startDate()) : null;
|
|
1830
|
+
const e = this.endDate() ? new Date(this.endDate()) : null;
|
|
1831
|
+
for (let i = 0; i < 42; i++) {
|
|
1832
|
+
const date = new Date(y, m, i - first + 1);
|
|
1833
|
+
date.setHours(0, 0, 0, 0);
|
|
1834
|
+
const ds = date.toISOString().split('T')[0];
|
|
1835
|
+
days.push({
|
|
1836
|
+
key: ds, date, inMonth: date.getMonth() === m,
|
|
1837
|
+
isToday: date.getTime() === today.getTime(),
|
|
1838
|
+
isStart: s ? date.getTime() === s.getTime() : false,
|
|
1839
|
+
isEnd: e ? date.getTime() === e.getTime() : false,
|
|
1840
|
+
inRange: s && e ? date > s && date < e : false
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
return days;
|
|
1844
|
+
});
|
|
1845
|
+
selectDay(date, e) {
|
|
1846
|
+
e.stopPropagation();
|
|
1847
|
+
const ds = date.toISOString().split('T')[0];
|
|
1848
|
+
if (this.picking() === 'start') {
|
|
1849
|
+
this.startDate.set(ds);
|
|
1850
|
+
this.endDate.set('');
|
|
1851
|
+
this.picking.set('end');
|
|
1852
|
+
}
|
|
1853
|
+
else {
|
|
1854
|
+
if (date >= new Date(this.startDate())) {
|
|
1855
|
+
this.endDate.set(ds);
|
|
1856
|
+
this.picking.set('start');
|
|
1857
|
+
this.rangeChange.emit({ start: this.startDate(), end: ds });
|
|
1858
|
+
this.open.set(false);
|
|
1859
|
+
}
|
|
1860
|
+
else {
|
|
1861
|
+
this.startDate.set(ds);
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1866
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: DateRangePickerComponent, isStandalone: true, selector: "ngx-date-range-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rangeChange: "rangeChange" }, ngImport: i0, template: `
|
|
1867
|
+
<div class="ngx-date-range-picker">
|
|
1868
|
+
@if (label()) { <label class="drp-label">{{ label() }}</label> }
|
|
1869
|
+
<div class="drp-inputs" (click)="toggleOpen()">
|
|
1870
|
+
<input class="drp-input" type="text" readonly [value]="startDate()" placeholder="Start date" />
|
|
1871
|
+
<span class="drp-sep">→</span>
|
|
1872
|
+
<input class="drp-input" type="text" readonly [value]="endDate()" placeholder="End date" />
|
|
1873
|
+
<span class="drp-icon">📅</span>
|
|
1874
|
+
</div>
|
|
1875
|
+
@if (open()) {
|
|
1876
|
+
<div class="drp-calendar-wrap">
|
|
1877
|
+
<div class="drp-calendar">
|
|
1878
|
+
<div class="cal-header">
|
|
1879
|
+
<button class="cal-nav" (click)="prevMonth($event)">‹</button>
|
|
1880
|
+
<span class="cal-title">{{ monthName(viewMonth()) }} {{ viewYear() }}</span>
|
|
1881
|
+
<button class="cal-nav" (click)="nextMonth($event)">›</button>
|
|
1882
|
+
</div>
|
|
1883
|
+
<div class="cal-grid">
|
|
1884
|
+
@for (day of weekDays; track day) { <div class="cal-weekday">{{ day }}</div> }
|
|
1885
|
+
@for (cell of calendarDays(); track cell.key) {
|
|
1886
|
+
<div
|
|
1887
|
+
class="cal-day"
|
|
1888
|
+
[class.other-month]="!cell.inMonth"
|
|
1889
|
+
[class.in-range]="cell.inRange"
|
|
1890
|
+
[class.range-start]="cell.isStart"
|
|
1891
|
+
[class.range-end]="cell.isEnd"
|
|
1892
|
+
[class.today]="cell.isToday"
|
|
1893
|
+
(click)="selectDay(cell.date, $event)"
|
|
1894
|
+
>{{ cell.date.getDate() }}</div>
|
|
1895
|
+
}
|
|
1896
|
+
</div>
|
|
1897
|
+
</div>
|
|
1898
|
+
</div>
|
|
1899
|
+
}
|
|
1900
|
+
</div>
|
|
1901
|
+
`, isInline: true, styles: [":host{display:block;position:relative}.drp-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.drp-inputs{display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);cursor:pointer;background:var(--ngx-input-bg, #fff)}.drp-input{border:none;background:transparent;font-size:13px;color:var(--ngx-input-text, #212529);outline:none;cursor:pointer;width:90px}.drp-sep{color:#adb5bd}.drp-icon{font-size:14px}.drp-calendar-wrap{position:absolute;top:calc(100% + 4px);left:0;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:8px;box-shadow:0 8px 32px #00000026;z-index:1000;padding:12px}.cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.cal-nav{background:none;border:1px solid #dee2e6;border-radius:4px;cursor:pointer;padding:3px 8px;font-size:14px}.cal-title{font-weight:600;font-size:13px}.cal-grid{display:grid;grid-template-columns:repeat(7,32px);gap:2px}.cal-weekday{text-align:center;font-size:10px;font-weight:700;color:#adb5bd;padding:4px 0}.cal-day{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:12px;border-radius:4px;cursor:pointer;transition:background .1s}.cal-day:hover{background:#f1f3f5}.cal-day.other-month{color:#ced4da}.cal-day.in-range{background:#e8f0fe;color:#1a73e8}.cal-day.range-start,.cal-day.range-end{background:#1a73e8;color:#fff;border-radius:50%}.cal-day.today{font-weight:700;border:1px solid #1a73e8}\n"] });
|
|
1902
|
+
}
|
|
1903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DateRangePickerComponent, decorators: [{
|
|
1904
|
+
type: Component,
|
|
1905
|
+
args: [{ selector: 'ngx-date-range-picker', standalone: true, template: `
|
|
1906
|
+
<div class="ngx-date-range-picker">
|
|
1907
|
+
@if (label()) { <label class="drp-label">{{ label() }}</label> }
|
|
1908
|
+
<div class="drp-inputs" (click)="toggleOpen()">
|
|
1909
|
+
<input class="drp-input" type="text" readonly [value]="startDate()" placeholder="Start date" />
|
|
1910
|
+
<span class="drp-sep">→</span>
|
|
1911
|
+
<input class="drp-input" type="text" readonly [value]="endDate()" placeholder="End date" />
|
|
1912
|
+
<span class="drp-icon">📅</span>
|
|
1913
|
+
</div>
|
|
1914
|
+
@if (open()) {
|
|
1915
|
+
<div class="drp-calendar-wrap">
|
|
1916
|
+
<div class="drp-calendar">
|
|
1917
|
+
<div class="cal-header">
|
|
1918
|
+
<button class="cal-nav" (click)="prevMonth($event)">‹</button>
|
|
1919
|
+
<span class="cal-title">{{ monthName(viewMonth()) }} {{ viewYear() }}</span>
|
|
1920
|
+
<button class="cal-nav" (click)="nextMonth($event)">›</button>
|
|
1921
|
+
</div>
|
|
1922
|
+
<div class="cal-grid">
|
|
1923
|
+
@for (day of weekDays; track day) { <div class="cal-weekday">{{ day }}</div> }
|
|
1924
|
+
@for (cell of calendarDays(); track cell.key) {
|
|
1925
|
+
<div
|
|
1926
|
+
class="cal-day"
|
|
1927
|
+
[class.other-month]="!cell.inMonth"
|
|
1928
|
+
[class.in-range]="cell.inRange"
|
|
1929
|
+
[class.range-start]="cell.isStart"
|
|
1930
|
+
[class.range-end]="cell.isEnd"
|
|
1931
|
+
[class.today]="cell.isToday"
|
|
1932
|
+
(click)="selectDay(cell.date, $event)"
|
|
1933
|
+
>{{ cell.date.getDate() }}</div>
|
|
1934
|
+
}
|
|
1935
|
+
</div>
|
|
1936
|
+
</div>
|
|
1937
|
+
</div>
|
|
1938
|
+
}
|
|
1939
|
+
</div>
|
|
1940
|
+
`, styles: [":host{display:block;position:relative}.drp-label{display:block;font-size:12px;font-weight:600;color:var(--ngx-input-label, #495057);margin-bottom:4px}.drp-inputs{display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 6px);cursor:pointer;background:var(--ngx-input-bg, #fff)}.drp-input{border:none;background:transparent;font-size:13px;color:var(--ngx-input-text, #212529);outline:none;cursor:pointer;width:90px}.drp-sep{color:#adb5bd}.drp-icon{font-size:14px}.drp-calendar-wrap{position:absolute;top:calc(100% + 4px);left:0;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:8px;box-shadow:0 8px 32px #00000026;z-index:1000;padding:12px}.cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.cal-nav{background:none;border:1px solid #dee2e6;border-radius:4px;cursor:pointer;padding:3px 8px;font-size:14px}.cal-title{font-weight:600;font-size:13px}.cal-grid{display:grid;grid-template-columns:repeat(7,32px);gap:2px}.cal-weekday{text-align:center;font-size:10px;font-weight:700;color:#adb5bd;padding:4px 0}.cal-day{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:12px;border-radius:4px;cursor:pointer;transition:background .1s}.cal-day:hover{background:#f1f3f5}.cal-day.other-month{color:#ced4da}.cal-day.in-range{background:#e8f0fe;color:#1a73e8}.cal-day.range-start,.cal-day.range-end{background:#1a73e8;color:#fff;border-radius:50%}.cal-day.today{font-weight:700;border:1px solid #1a73e8}\n"] }]
|
|
1941
|
+
}] });
|
|
1942
|
+
|
|
1310
1943
|
/*
|
|
1311
1944
|
* Public API Surface — secondary entry point: ngx-core-components/inputs
|
|
1312
1945
|
*/
|
|
@@ -1316,5 +1949,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1316
1949
|
* Generated bundle index. Do not edit.
|
|
1317
1950
|
*/
|
|
1318
1951
|
|
|
1319
|
-
export { AutocompleteComponent, CheckboxComponent, DatePickerComponent, DropdownComponent, MultiSelectComponent, RadioGroupComponent, TextBoxComponent };
|
|
1952
|
+
export { AutocompleteComponent, CheckboxComponent, ColorPickerComponent, DatePickerComponent, DateRangePickerComponent, DropdownComponent, MultiSelectComponent, NumericTextBoxComponent, RadioGroupComponent, RatingComponent, SliderComponent, SwitchComponent, TextBoxComponent, TextareaComponent, TimePickerComponent };
|
|
1320
1953
|
//# sourceMappingURL=ngx-core-components-inputs.mjs.map
|