@semantic-components/ui 0.66.0 → 0.68.0
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/file-upload/file-upload-dropzone.js +91 -0
- package/esm2022/lib/components/file-upload/file-upload-dropzone.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-item-delete.js +29 -0
- package/esm2022/lib/components/file-upload/file-upload-item-delete.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-item-name.js +20 -0
- package/esm2022/lib/components/file-upload/file-upload-item-name.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-item-preview.js +51 -0
- package/esm2022/lib/components/file-upload/file-upload-item-preview.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-item-progress.js +34 -0
- package/esm2022/lib/components/file-upload/file-upload-item-progress.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-item-size.js +37 -0
- package/esm2022/lib/components/file-upload/file-upload-item-size.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-item.js +29 -0
- package/esm2022/lib/components/file-upload/file-upload-item.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-list.js +20 -0
- package/esm2022/lib/components/file-upload/file-upload-list.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload-trigger.js +66 -0
- package/esm2022/lib/components/file-upload/file-upload-trigger.js.map +1 -0
- package/esm2022/lib/components/file-upload/file-upload.js +118 -0
- package/esm2022/lib/components/file-upload/file-upload.js.map +1 -0
- package/esm2022/lib/components/file-upload/index.js +11 -0
- package/esm2022/lib/components/file-upload/index.js.map +1 -0
- package/esm2022/lib/components/index.js +10 -2
- package/esm2022/lib/components/index.js.map +1 -1
- package/esm2022/lib/components/menu-bar/menu-bar-item.js +12 -4
- package/esm2022/lib/components/menu-bar/menu-bar-item.js.map +1 -1
- package/esm2022/lib/components/native-select/index.js +6 -0
- package/esm2022/lib/components/native-select/index.js.map +1 -0
- package/esm2022/lib/components/native-select/native-select-container.js +20 -0
- package/esm2022/lib/components/native-select/native-select-container.js.map +1 -0
- package/esm2022/lib/components/native-select/native-select-icon.js +20 -0
- package/esm2022/lib/components/native-select/native-select-icon.js.map +1 -0
- package/esm2022/lib/components/native-select/native-select-optgroup.js +20 -0
- package/esm2022/lib/components/native-select/native-select-optgroup.js.map +1 -0
- package/esm2022/lib/components/native-select/native-select-option.js +20 -0
- package/esm2022/lib/components/native-select/native-select-option.js.map +1 -0
- package/esm2022/lib/components/native-select/native-select.js +29 -0
- package/esm2022/lib/components/native-select/native-select.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/index.js +9 -0
- package/esm2022/lib/components/navigation-menu/index.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-content.js +37 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-content.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-grid.js +20 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-grid.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-item.js +118 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-item.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-link.js +22 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-link.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-list.js +20 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-list.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-portal.js +14 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-portal.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger-icon.js +22 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger-icon.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger.js +41 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu-trigger.js.map +1 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu.js +32 -0
- package/esm2022/lib/components/navigation-menu/navigation-menu.js.map +1 -0
- package/esm2022/lib/components/range-slider/index.js +4 -0
- package/esm2022/lib/components/range-slider/index.js.map +1 -0
- package/esm2022/lib/components/range-slider/range-slider-max.js +38 -0
- package/esm2022/lib/components/range-slider/range-slider-max.js.map +1 -0
- package/esm2022/lib/components/range-slider/range-slider-min.js +38 -0
- package/esm2022/lib/components/range-slider/range-slider-min.js.map +1 -0
- package/esm2022/lib/components/range-slider/range-slider-thumb-base.js +24 -0
- package/esm2022/lib/components/range-slider/range-slider-thumb-base.js.map +1 -0
- package/esm2022/lib/components/range-slider/range-slider.js +62 -0
- package/esm2022/lib/components/range-slider/range-slider.js.map +1 -0
- package/esm2022/lib/components/scroll-area/index.js +2 -0
- package/esm2022/lib/components/scroll-area/index.js.map +1 -0
- package/esm2022/lib/components/scroll-area/scroll-area.js +21 -0
- package/esm2022/lib/components/scroll-area/scroll-area.js.map +1 -0
- package/esm2022/lib/components/select/index.js +5 -1
- package/esm2022/lib/components/select/index.js.map +1 -1
- package/esm2022/lib/components/select/select-group-label.js +28 -0
- package/esm2022/lib/components/select/select-group-label.js.map +1 -0
- package/esm2022/lib/components/select/select-group.js +28 -0
- package/esm2022/lib/components/select/select-group.js.map +1 -0
- package/esm2022/lib/components/select/{select-icon.js → select-item-icon.js} +7 -7
- package/esm2022/lib/components/select/select-item-icon.js.map +1 -0
- package/esm2022/lib/components/select/select-list.js +1 -5
- package/esm2022/lib/components/select/select-list.js.map +1 -1
- package/esm2022/lib/components/select/select-popup.js +32 -0
- package/esm2022/lib/components/select/select-popup.js.map +1 -0
- package/esm2022/lib/components/select/select-separator.js +22 -0
- package/esm2022/lib/components/select/select-separator.js.map +1 -0
- package/esm2022/lib/components/select/select-trigger-icon.js +4 -2
- package/esm2022/lib/components/select/select-trigger-icon.js.map +1 -1
- package/esm2022/lib/components/select/select-trigger.js +4 -7
- package/esm2022/lib/components/select/select-trigger.js.map +1 -1
- package/esm2022/lib/components/select/select.js +6 -5
- package/esm2022/lib/components/select/select.js.map +1 -1
- package/esm2022/lib/components/slider/index.js +2 -0
- package/esm2022/lib/components/slider/index.js.map +1 -0
- package/esm2022/lib/components/slider/slider.js +46 -0
- package/esm2022/lib/components/slider/slider.js.map +1 -0
- package/esm2022/lib/components/time-picker/index.js +10 -0
- package/esm2022/lib/components/time-picker/index.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-hours-input.js +67 -0
- package/esm2022/lib/components/time-picker/time-picker-hours-input.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-input.js +26 -0
- package/esm2022/lib/components/time-picker/time-picker-input.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-minutes-input.js +57 -0
- package/esm2022/lib/components/time-picker/time-picker-minutes-input.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-period-am.js +26 -0
- package/esm2022/lib/components/time-picker/time-picker-period-am.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-period-pm.js +26 -0
- package/esm2022/lib/components/time-picker/time-picker-period-pm.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-period.js +46 -0
- package/esm2022/lib/components/time-picker/time-picker-period.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-seconds-input.js +57 -0
- package/esm2022/lib/components/time-picker/time-picker-seconds-input.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker-separator.js +20 -0
- package/esm2022/lib/components/time-picker/time-picker-separator.js.map +1 -0
- package/esm2022/lib/components/time-picker/time-picker.js +58 -0
- package/esm2022/lib/components/time-picker/time-picker.js.map +1 -0
- package/esm2022/lib/components/typography/heading.js +43 -0
- package/esm2022/lib/components/typography/heading.js.map +1 -0
- package/esm2022/lib/components/typography/index.js +2 -0
- package/esm2022/lib/components/typography/index.js.map +1 -0
- package/lib/components/file-upload/file-upload-dropzone.d.ts +15 -0
- package/lib/components/file-upload/file-upload-item-delete.d.ts +10 -0
- package/lib/components/file-upload/file-upload-item-name.d.ts +7 -0
- package/lib/components/file-upload/file-upload-item-preview.d.ts +11 -0
- package/lib/components/file-upload/file-upload-item-progress.d.ts +9 -0
- package/lib/components/file-upload/file-upload-item-size.d.ts +10 -0
- package/lib/components/file-upload/file-upload-item.d.ts +9 -0
- package/lib/components/file-upload/file-upload-list.d.ts +7 -0
- package/lib/components/file-upload/file-upload-trigger.d.ts +11 -0
- package/lib/components/file-upload/file-upload.d.ts +32 -0
- package/lib/components/file-upload/index.d.ts +11 -0
- package/lib/components/index.d.ts +10 -2
- package/lib/components/menu-bar/menu-bar-item.d.ts +1 -0
- package/lib/components/native-select/index.d.ts +5 -0
- package/lib/components/native-select/native-select-container.d.ts +7 -0
- package/lib/components/native-select/native-select-icon.d.ts +7 -0
- package/lib/components/native-select/native-select-optgroup.d.ts +7 -0
- package/lib/components/native-select/native-select-option.d.ts +7 -0
- package/lib/components/native-select/native-select.d.ts +12 -0
- package/lib/components/navigation-menu/index.d.ts +8 -0
- package/lib/components/navigation-menu/navigation-menu-content.d.ts +10 -0
- package/lib/components/navigation-menu/navigation-menu-grid.d.ts +7 -0
- package/lib/components/navigation-menu/navigation-menu-item.d.ts +27 -0
- package/lib/components/navigation-menu/navigation-menu-link.d.ts +8 -0
- package/lib/components/navigation-menu/navigation-menu-list.d.ts +7 -0
- package/lib/components/navigation-menu/navigation-menu-portal.d.ts +7 -0
- package/lib/components/navigation-menu/navigation-menu-trigger-icon.d.ts +8 -0
- package/lib/components/navigation-menu/navigation-menu-trigger.d.ts +12 -0
- package/lib/components/navigation-menu/navigation-menu.d.ts +10 -0
- package/lib/components/range-slider/index.d.ts +3 -0
- package/lib/components/range-slider/range-slider-max.d.ts +10 -0
- package/lib/components/range-slider/range-slider-min.d.ts +10 -0
- package/lib/components/range-slider/range-slider-thumb-base.d.ts +2 -0
- package/lib/components/range-slider/range-slider.d.ts +21 -0
- package/lib/components/scroll-area/index.d.ts +1 -0
- package/lib/components/scroll-area/scroll-area.d.ts +7 -0
- package/lib/components/select/index.d.ts +5 -1
- package/lib/components/select/select-group-label.d.ts +7 -0
- package/lib/components/select/select-group.d.ts +7 -0
- package/lib/components/select/select-item-icon.d.ts +7 -0
- package/lib/components/select/select-list.d.ts +0 -1
- package/lib/components/select/select-popup.d.ts +8 -0
- package/lib/components/select/select-separator.d.ts +7 -0
- package/lib/components/select/select-trigger-icon.d.ts +1 -0
- package/lib/components/select/select-trigger.d.ts +3 -4
- package/lib/components/select/select.d.ts +3 -2
- package/lib/components/slider/index.d.ts +1 -0
- package/lib/components/slider/slider.d.ts +15 -0
- package/lib/components/time-picker/index.d.ts +10 -0
- package/lib/components/time-picker/time-picker-hours-input.d.ts +14 -0
- package/lib/components/time-picker/time-picker-input.d.ts +9 -0
- package/lib/components/time-picker/time-picker-minutes-input.d.ts +12 -0
- package/lib/components/time-picker/time-picker-period-am.d.ts +8 -0
- package/lib/components/time-picker/time-picker-period-pm.d.ts +8 -0
- package/lib/components/time-picker/time-picker-period.d.ts +12 -0
- package/lib/components/time-picker/time-picker-seconds-input.d.ts +12 -0
- package/lib/components/time-picker/time-picker-separator.d.ts +7 -0
- package/lib/components/time-picker/time-picker.d.ts +26 -0
- package/lib/components/typography/heading.d.ts +15 -0
- package/lib/components/typography/index.d.ts +1 -0
- package/package.json +1 -1
- package/esm2022/lib/components/select/select-icon.js.map +0 -1
- package/lib/components/select/select-icon.d.ts +0 -7
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { computed, Directive, inject } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { ScTimePickerPeriod } from './time-picker-period';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class ScTimePickerPeriodPM {
|
|
6
|
+
period = inject(ScTimePickerPeriod);
|
|
7
|
+
class = computed(() => cn('rounded-md px-2 py-1.5 text-sm font-medium transition-colors', this.period.isPM()
|
|
8
|
+
? 'bg-primary text-primary-foreground'
|
|
9
|
+
: 'text-muted-foreground hover:bg-accent'), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriodPM, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.5", type: ScTimePickerPeriodPM, isStandalone: true, selector: "button[scTimePickerPeriodPM]", host: { attributes: { "data-slot": "time-picker-period-pm", "type": "button" }, listeners: { "click": "period.selectPM()" }, properties: { "class": "class()", "disabled": "period.timePicker.disabled()" } }, ngImport: i0 });
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriodPM, decorators: [{
|
|
14
|
+
type: Directive,
|
|
15
|
+
args: [{
|
|
16
|
+
selector: 'button[scTimePickerPeriodPM]',
|
|
17
|
+
host: {
|
|
18
|
+
'data-slot': 'time-picker-period-pm',
|
|
19
|
+
type: 'button',
|
|
20
|
+
'[class]': 'class()',
|
|
21
|
+
'[disabled]': 'period.timePicker.disabled()',
|
|
22
|
+
'(click)': 'period.selectPM()',
|
|
23
|
+
},
|
|
24
|
+
}]
|
|
25
|
+
}] });
|
|
26
|
+
//# sourceMappingURL=time-picker-period-pm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker-period-pm.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-period-pm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;;AAY1D,MAAM,OAAO,oBAAoB;IACZ,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAEpC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,8DAA8D,EAC9D,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QAChB,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,uCAAuC,CAC5C,iDACF,CAAC;uGAVS,oBAAoB;2FAApB,oBAAoB;;2FAApB,oBAAoB;kBAVhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,8BAA8B;oBACxC,IAAI,EAAE;wBACJ,WAAW,EAAE,uBAAuB;wBACpC,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,SAAS;wBACpB,YAAY,EAAE,8BAA8B;wBAC5C,SAAS,EAAE,mBAAmB;qBAC/B;iBACF","sourcesContent":["import { computed, Directive, inject } from '@angular/core';\nimport { cn } from '../../utils';\nimport { ScTimePickerPeriod } from './time-picker-period';\n\n@Directive({\n selector: 'button[scTimePickerPeriodPM]',\n host: {\n 'data-slot': 'time-picker-period-pm',\n type: 'button',\n '[class]': 'class()',\n '[disabled]': 'period.timePicker.disabled()',\n '(click)': 'period.selectPM()',\n },\n})\nexport class ScTimePickerPeriodPM {\n protected readonly period = inject(ScTimePickerPeriod);\n\n protected readonly class = computed(() =>\n cn(\n 'rounded-md px-2 py-1.5 text-sm font-medium transition-colors',\n this.period.isPM()\n ? 'bg-primary text-primary-foreground'\n : 'text-muted-foreground hover:bg-accent',\n ),\n );\n}\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { computed, Directive, inject, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import { SC_TIME_PICKER } from './time-picker';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class ScTimePickerPeriod {
|
|
6
|
+
timePicker = inject(SC_TIME_PICKER);
|
|
7
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
8
|
+
class = computed(() => cn('ml-2 inline-flex rounded-md border border-input bg-background p-0.5', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
9
|
+
isAM = computed(() => {
|
|
10
|
+
const val = this.timePicker.value();
|
|
11
|
+
return val?.period === 'AM' || (!val?.period && (val?.hours ?? 0) < 12);
|
|
12
|
+
}, ...(ngDevMode ? [{ debugName: "isAM" }] : []));
|
|
13
|
+
isPM = computed(() => {
|
|
14
|
+
const val = this.timePicker.value();
|
|
15
|
+
return val?.period === 'PM' || (!val?.period && (val?.hours ?? 0) >= 12);
|
|
16
|
+
}, ...(ngDevMode ? [{ debugName: "isPM" }] : []));
|
|
17
|
+
selectAM() {
|
|
18
|
+
this.timePicker.setPeriod('AM');
|
|
19
|
+
const val = this.timePicker.value();
|
|
20
|
+
if (val && val.hours >= 12) {
|
|
21
|
+
this.timePicker.setHours(val.hours - 12);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
selectPM() {
|
|
25
|
+
this.timePicker.setPeriod('PM');
|
|
26
|
+
const val = this.timePicker.value();
|
|
27
|
+
if (val && val.hours < 12) {
|
|
28
|
+
this.timePicker.setHours(val.hours + 12);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriod, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
32
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePickerPeriod, isStandalone: true, selector: "[scTimePickerPeriod]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "time-picker-period", "role": "group" }, properties: { "class": "class()", "attr.aria-label": "\"Select AM or PM\"" } }, ngImport: i0 });
|
|
33
|
+
}
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriod, decorators: [{
|
|
35
|
+
type: Directive,
|
|
36
|
+
args: [{
|
|
37
|
+
selector: '[scTimePickerPeriod]',
|
|
38
|
+
host: {
|
|
39
|
+
'data-slot': 'time-picker-period',
|
|
40
|
+
'[class]': 'class()',
|
|
41
|
+
role: 'group',
|
|
42
|
+
'[attr.aria-label]': '"Select AM or PM"',
|
|
43
|
+
},
|
|
44
|
+
}]
|
|
45
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
46
|
+
//# sourceMappingURL=time-picker-period.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker-period.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-period.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;;AAW/C,MAAM,OAAO,kBAAkB;IACpB,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAEpC,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,qEAAqE,EACrE,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;IAEO,IAAI,GAAG,QAAQ,CAAC,GAAG,EAAE;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,OAAO,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1E,CAAC,gDAAC,CAAC;IAEM,IAAI,GAAG,QAAQ,CAAC,GAAG,EAAE;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,OAAO,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3E,CAAC,gDAAC,CAAC;IAEH,QAAQ;QACN,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;YAC3B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,GAAG,EAAE,EAAE,CAAC;YAC1B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;uGApCU,kBAAkB;2FAAlB,kBAAkB;;2FAAlB,kBAAkB;kBAT9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;oBAChC,IAAI,EAAE;wBACJ,WAAW,EAAE,oBAAoB;wBACjC,SAAS,EAAE,SAAS;wBACpB,IAAI,EAAE,OAAO;wBACb,mBAAmB,EAAE,mBAAmB;qBACzC;iBACF","sourcesContent":["import { computed, Directive, inject, input } from '@angular/core';\nimport { cn } from '../../utils';\nimport { SC_TIME_PICKER } from './time-picker';\n\n@Directive({\n selector: '[scTimePickerPeriod]',\n host: {\n 'data-slot': 'time-picker-period',\n '[class]': 'class()',\n role: 'group',\n '[attr.aria-label]': '\"Select AM or PM\"',\n },\n})\nexport class ScTimePickerPeriod {\n readonly timePicker = inject(SC_TIME_PICKER);\n\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn(\n 'ml-2 inline-flex rounded-md border border-input bg-background p-0.5',\n this.classInput(),\n ),\n );\n\n readonly isAM = computed(() => {\n const val = this.timePicker.value();\n return val?.period === 'AM' || (!val?.period && (val?.hours ?? 0) < 12);\n });\n\n readonly isPM = computed(() => {\n const val = this.timePicker.value();\n return val?.period === 'PM' || (!val?.period && (val?.hours ?? 0) >= 12);\n });\n\n selectAM(): void {\n this.timePicker.setPeriod('AM');\n const val = this.timePicker.value();\n if (val && val.hours >= 12) {\n this.timePicker.setHours(val.hours - 12);\n }\n }\n\n selectPM(): void {\n this.timePicker.setPeriod('PM');\n const val = this.timePicker.value();\n if (val && val.hours < 12) {\n this.timePicker.setHours(val.hours + 12);\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { computed, Directive, inject } from '@angular/core';
|
|
2
|
+
import { ScTimePickerInput } from './time-picker-input';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ScTimePickerSecondsInput {
|
|
5
|
+
input = inject(ScTimePickerInput);
|
|
6
|
+
timePicker = this.input.timePicker;
|
|
7
|
+
displayValue = computed(() => {
|
|
8
|
+
const val = this.timePicker.value();
|
|
9
|
+
if (!val)
|
|
10
|
+
return '00';
|
|
11
|
+
return (val.seconds ?? 0).toString().padStart(2, '0');
|
|
12
|
+
}, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
|
|
13
|
+
onInput(event) {
|
|
14
|
+
const el = event.target;
|
|
15
|
+
const value = el.value.replace(/\D/g, '');
|
|
16
|
+
const num = parseInt(value, 10);
|
|
17
|
+
if (!isNaN(num)) {
|
|
18
|
+
this.timePicker.setSeconds(Math.min(num, 59));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
onBlur() {
|
|
22
|
+
this.input.focused.set(false);
|
|
23
|
+
}
|
|
24
|
+
onFocus(event) {
|
|
25
|
+
this.input.focused.set(true);
|
|
26
|
+
event.target.select();
|
|
27
|
+
}
|
|
28
|
+
onKeydown(event) {
|
|
29
|
+
if (event.key === 'ArrowUp') {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
const val = this.timePicker.value() || { hours: 0, minutes: 0 };
|
|
32
|
+
this.timePicker.setSeconds((val.seconds ?? 0) >= 59 ? 0 : (val.seconds ?? 0) + 1);
|
|
33
|
+
}
|
|
34
|
+
else if (event.key === 'ArrowDown') {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
const val = this.timePicker.value() || { hours: 0, minutes: 0 };
|
|
37
|
+
this.timePicker.setSeconds((val.seconds ?? 0) <= 0 ? 59 : (val.seconds ?? 0) - 1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerSecondsInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
41
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.5", type: ScTimePickerSecondsInput, isStandalone: true, selector: "input[scTimePickerSecondsInput]", host: { listeners: { "input": "onInput($event)", "blur": "onBlur()", "keydown": "onKeydown($event)", "focus": "onFocus($event)" }, properties: { "value": "displayValue()", "attr.aria-label": "\"Seconds\"" } }, ngImport: i0 });
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerSecondsInput, decorators: [{
|
|
44
|
+
type: Directive,
|
|
45
|
+
args: [{
|
|
46
|
+
selector: 'input[scTimePickerSecondsInput]',
|
|
47
|
+
host: {
|
|
48
|
+
'[value]': 'displayValue()',
|
|
49
|
+
'[attr.aria-label]': '"Seconds"',
|
|
50
|
+
'(input)': 'onInput($event)',
|
|
51
|
+
'(blur)': 'onBlur()',
|
|
52
|
+
'(keydown)': 'onKeydown($event)',
|
|
53
|
+
'(focus)': 'onFocus($event)',
|
|
54
|
+
},
|
|
55
|
+
}]
|
|
56
|
+
}] });
|
|
57
|
+
//# sourceMappingURL=time-picker-seconds-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker-seconds-input.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-seconds-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;;AAaxD,MAAM,OAAO,wBAAwB;IAClB,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAElC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;IAEjC,YAAY,GAAG,QAAQ,CAAC,GAAG,EAAE;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACxD,CAAC,wDAAC,CAAC;IAEO,OAAO,CAAC,KAAY;QAC5B,MAAM,EAAE,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC5C,MAAM,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEhC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAChB,IAAI,CAAC,UAAU,CA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QACJ,CAAC;IACH,CAAC;uGA5CU,wBAAwB;2FAAxB,wBAAwB;;2FAAxB,wBAAwB;kBAXpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,iCAAiC;oBAC3C,IAAI,EAAE;wBACJ,SAAS,EAAE,gBAAgB;wBAC3B,mBAAmB,EAAE,WAAW;wBAChC,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,UAAU;wBACpB,WAAW,EAAE,mBAAmB;wBAChC,SAAS,EAAE,iBAAiB;qBAC7B;iBACF","sourcesContent":["import { computed, Directive, inject } from '@angular/core';\nimport { ScTimePickerInput } from './time-picker-input';\n\n@Directive({\n selector: 'input[scTimePickerSecondsInput]',\n host: {\n '[value]': 'displayValue()',\n '[attr.aria-label]': '\"Seconds\"',\n '(input)': 'onInput($event)',\n '(blur)': 'onBlur()',\n '(keydown)': 'onKeydown($event)',\n '(focus)': 'onFocus($event)',\n },\n})\nexport class ScTimePickerSecondsInput {\n private readonly input = inject(ScTimePickerInput);\n\n private readonly timePicker = this.input.timePicker;\n\n protected readonly displayValue = computed(() => {\n const val = this.timePicker.value();\n if (!val) return '00';\n return (val.seconds ?? 0).toString().padStart(2, '0');\n });\n\n protected onInput(event: Event): void {\n const el = event.target as HTMLInputElement;\n const value = el.value.replace(/\\D/g, '');\n const num = parseInt(value, 10);\n\n if (!isNaN(num)) {\n this.timePicker.setSeconds(Math.min(num, 59));\n }\n }\n\n protected onBlur(): void {\n this.input.focused.set(false);\n }\n\n protected onFocus(event: FocusEvent): void {\n this.input.focused.set(true);\n (event.target as HTMLInputElement).select();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n const val = this.timePicker.value() || { hours: 0, minutes: 0 };\n this.timePicker.setSeconds(\n (val.seconds ?? 0) >= 59 ? 0 : (val.seconds ?? 0) + 1,\n );\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const val = this.timePicker.value() || { hours: 0, minutes: 0 };\n this.timePicker.setSeconds(\n (val.seconds ?? 0) <= 0 ? 59 : (val.seconds ?? 0) - 1,\n );\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { computed, Directive, input } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ScTimePickerSeparator {
|
|
5
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
6
|
+
class = computed(() => cn('text-lg font-medium text-muted-foreground', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePickerSeparator, isStandalone: true, selector: "[scTimePickerSeparator]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "time-picker-separator" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerSeparator, decorators: [{
|
|
11
|
+
type: Directive,
|
|
12
|
+
args: [{
|
|
13
|
+
selector: '[scTimePickerSeparator]',
|
|
14
|
+
host: {
|
|
15
|
+
'data-slot': 'time-picker-separator',
|
|
16
|
+
'[class]': 'class()',
|
|
17
|
+
},
|
|
18
|
+
}]
|
|
19
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
20
|
+
//# sourceMappingURL=time-picker-separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker-separator.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,qBAAqB;IACvB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CAAC,2CAA2C,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,iDACnE,CAAC;uGALS,qBAAqB;2FAArB,qBAAqB;;2FAArB,qBAAqB;kBAPjC,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,IAAI,EAAE;wBACJ,WAAW,EAAE,uBAAuB;wBACpC,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { computed, Directive, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: '[scTimePickerSeparator]',\n host: {\n 'data-slot': 'time-picker-separator',\n '[class]': 'class()',\n },\n})\nexport class ScTimePickerSeparator {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn('text-lg font-medium text-muted-foreground', this.classInput()),\n );\n}\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { computed, Directive, InjectionToken, input, model, } from '@angular/core';
|
|
2
|
+
import { cn } from '../../utils';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export const SC_TIME_PICKER = new InjectionToken('SC_TIME_PICKER');
|
|
5
|
+
export class ScTimePicker {
|
|
6
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
7
|
+
format = input('12h', ...(ngDevMode ? [{ debugName: "format" }] : []));
|
|
8
|
+
showSeconds = input(false, ...(ngDevMode ? [{ debugName: "showSeconds" }] : []));
|
|
9
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
10
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
11
|
+
class = computed(() => cn('inline-flex items-center gap-1', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
12
|
+
formattedTime = computed(() => {
|
|
13
|
+
const val = this.value();
|
|
14
|
+
if (!val)
|
|
15
|
+
return '';
|
|
16
|
+
const hours = this.format() === '12h' ? val.hours % 12 || 12 : val.hours;
|
|
17
|
+
const hoursStr = hours.toString().padStart(2, '0');
|
|
18
|
+
const minutesStr = val.minutes.toString().padStart(2, '0');
|
|
19
|
+
let time = `${hoursStr}:${minutesStr}`;
|
|
20
|
+
if (this.showSeconds() && val.seconds !== undefined) {
|
|
21
|
+
time += `:${val.seconds.toString().padStart(2, '0')}`;
|
|
22
|
+
}
|
|
23
|
+
if (this.format() === '12h' && val.period) {
|
|
24
|
+
time += ` ${val.period}`;
|
|
25
|
+
}
|
|
26
|
+
return time;
|
|
27
|
+
}, ...(ngDevMode ? [{ debugName: "formattedTime" }] : []));
|
|
28
|
+
setHours(hours) {
|
|
29
|
+
const current = this.value() || { hours: 0, minutes: 0 };
|
|
30
|
+
this.value.set({ ...current, hours });
|
|
31
|
+
}
|
|
32
|
+
setMinutes(minutes) {
|
|
33
|
+
const current = this.value() || { hours: 0, minutes: 0 };
|
|
34
|
+
this.value.set({ ...current, minutes });
|
|
35
|
+
}
|
|
36
|
+
setSeconds(seconds) {
|
|
37
|
+
const current = this.value() || { hours: 0, minutes: 0 };
|
|
38
|
+
this.value.set({ ...current, seconds });
|
|
39
|
+
}
|
|
40
|
+
setPeriod(period) {
|
|
41
|
+
const current = this.value() || { hours: 0, minutes: 0 };
|
|
42
|
+
this.value.set({ ...current, period });
|
|
43
|
+
}
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePicker, isStandalone: true, selector: "[scTimePicker]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "data-slot": "time-picker" }, properties: { "class": "class()" } }, providers: [{ provide: SC_TIME_PICKER, useExisting: ScTimePicker }], ngImport: i0 });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePicker, decorators: [{
|
|
48
|
+
type: Directive,
|
|
49
|
+
args: [{
|
|
50
|
+
selector: '[scTimePicker]',
|
|
51
|
+
providers: [{ provide: SC_TIME_PICKER, useExisting: ScTimePicker }],
|
|
52
|
+
host: {
|
|
53
|
+
'data-slot': 'time-picker',
|
|
54
|
+
'[class]': 'class()',
|
|
55
|
+
},
|
|
56
|
+
}]
|
|
57
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
58
|
+
//# sourceMappingURL=time-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACzC,CAAC;uGAlDU,YAAY;2FAAZ,YAAY,s0BANZ,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;;2FAMxD,YAAY;kBARxB,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,cAAc,EAAE,CAAC;oBACnE,IAAI,EAAE;wBACJ,WAAW,EAAE,aAAa;wBAC1B,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import {\n computed,\n Directive,\n InjectionToken,\n input,\n model,\n} from '@angular/core';\nimport { cn } from '../../utils';\n\nexport type ScTimeFormat = '12h' | '24h';\nexport type ScTimePeriod = 'AM' | 'PM';\n\nexport interface ScTimeValue {\n hours: number;\n minutes: number;\n seconds?: number;\n period?: ScTimePeriod;\n}\n\nexport const SC_TIME_PICKER = new InjectionToken<ScTimePicker>(\n 'SC_TIME_PICKER',\n);\n\n@Directive({\n selector: '[scTimePicker]',\n providers: [{ provide: SC_TIME_PICKER, useExisting: ScTimePicker }],\n host: {\n 'data-slot': 'time-picker',\n '[class]': 'class()',\n },\n})\nexport class ScTimePicker {\n readonly classInput = input<string>('', { alias: 'class' });\n readonly format = input<ScTimeFormat>('12h');\n readonly showSeconds = input<boolean>(false);\n readonly disabled = input<boolean>(false);\n readonly value = model<ScTimeValue | null>(null);\n\n protected readonly class = computed(() =>\n cn('inline-flex items-center gap-1', this.classInput()),\n );\n\n readonly formattedTime = computed(() => {\n const val = this.value();\n if (!val) return '';\n\n const hours = this.format() === '12h' ? val.hours % 12 || 12 : val.hours;\n const hoursStr = hours.toString().padStart(2, '0');\n const minutesStr = val.minutes.toString().padStart(2, '0');\n\n let time = `${hoursStr}:${minutesStr}`;\n\n if (this.showSeconds() && val.seconds !== undefined) {\n time += `:${val.seconds.toString().padStart(2, '0')}`;\n }\n\n if (this.format() === '12h' && val.period) {\n time += ` ${val.period}`;\n }\n\n return time;\n });\n\n setHours(hours: number): void {\n const current = this.value() || { hours: 0, minutes: 0 };\n this.value.set({ ...current, hours });\n }\n\n setMinutes(minutes: number): void {\n const current = this.value() || { hours: 0, minutes: 0 };\n this.value.set({ ...current, minutes });\n }\n\n setSeconds(seconds: number): void {\n const current = this.value() || { hours: 0, minutes: 0 };\n this.value.set({ ...current, seconds });\n }\n\n setPeriod(period: ScTimePeriod): void {\n const current = this.value() || { hours: 0, minutes: 0 };\n this.value.set({ ...current, period });\n }\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { computed, Directive, ElementRef, inject, input } from '@angular/core';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { cn } from '../../utils';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export const headingVariants = cva('scroll-m-20 tracking-tight', {
|
|
6
|
+
variants: {
|
|
7
|
+
level: {
|
|
8
|
+
h1: 'text-4xl font-extrabold',
|
|
9
|
+
h2: 'text-3xl font-semibold first:mt-0',
|
|
10
|
+
h3: 'text-2xl font-semibold',
|
|
11
|
+
h4: 'text-xl font-semibold',
|
|
12
|
+
},
|
|
13
|
+
underline: {
|
|
14
|
+
true: 'border-b pb-2',
|
|
15
|
+
false: '',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
underline: false,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export class ScHeading {
|
|
23
|
+
classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
|
|
24
|
+
underline = input(false, ...(ngDevMode ? [{ debugName: "underline" }] : []));
|
|
25
|
+
elementRef = inject(ElementRef);
|
|
26
|
+
class = computed(() => {
|
|
27
|
+
const level = this.elementRef.nativeElement.tagName.toLowerCase();
|
|
28
|
+
return cn(headingVariants({ level, underline: this.underline() }), this.classInput());
|
|
29
|
+
}, ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScHeading, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScHeading, isStandalone: true, selector: "h1[scHeading], h2[scHeading], h3[scHeading], h4[scHeading]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, underline: { classPropertyName: "underline", publicName: "underline", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "heading" }, properties: { "class": "class()" } }, ngImport: i0 });
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScHeading, decorators: [{
|
|
34
|
+
type: Directive,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: 'h1[scHeading], h2[scHeading], h3[scHeading], h4[scHeading]',
|
|
37
|
+
host: {
|
|
38
|
+
'data-slot': 'heading',
|
|
39
|
+
'[class]': 'class()',
|
|
40
|
+
},
|
|
41
|
+
}]
|
|
42
|
+
}], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], underline: [{ type: i0.Input, args: [{ isSignal: true, alias: "underline", required: false }] }] } });
|
|
43
|
+
//# sourceMappingURL=heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/typography/heading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UA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, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\nexport const headingVariants = cva('scroll-m-20 tracking-tight', {\n variants: {\n level: {\n h1: 'text-4xl font-extrabold',\n h2: 'text-3xl font-semibold first:mt-0',\n h3: 'text-2xl font-semibold',\n h4: 'text-xl font-semibold',\n },\n underline: {\n true: 'border-b pb-2',\n false: '',\n },\n },\n defaultVariants: {\n underline: false,\n },\n});\n\nexport type ScHeadingVariants = VariantProps<typeof headingVariants>;\n\n@Directive({\n selector: 'h1[scHeading], h2[scHeading], h3[scHeading], h4[scHeading]',\n host: {\n 'data-slot': 'heading',\n '[class]': 'class()',\n },\n})\nexport class ScHeading {\n readonly classInput = input<string>('', { alias: 'class' });\n readonly underline = input<ScHeadingVariants['underline']>(false);\n\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected readonly class = computed(() => {\n const level =\n this.elementRef.nativeElement.tagName.toLowerCase() as ScHeadingVariants['level'];\n return cn(\n headingVariants({ level, underline: this.underline() }),\n this.classInput(),\n );\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAA0B,MAAM,WAAW,CAAC","sourcesContent":["export { ScHeading, headingVariants, type ScHeadingVariants } from './heading';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScFileUploadDropzone {
|
|
3
|
+
readonly fileUpload: import("@semantic-components/ui").ScFileUpload;
|
|
4
|
+
private readonly elementRef;
|
|
5
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly isDragging: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
8
|
+
openFilePicker(): void;
|
|
9
|
+
onFileSelect(event: Event): void;
|
|
10
|
+
onDragOver(event: DragEvent): void;
|
|
11
|
+
onDragLeave(event: DragEvent): void;
|
|
12
|
+
onDrop(event: DragEvent): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadDropzone, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScFileUploadDropzone, "[scFileUploadDropzone]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScFileUploadItemDelete {
|
|
3
|
+
private readonly fileUpload;
|
|
4
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly fileId: import("@angular/core").InputSignal<string>;
|
|
6
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
7
|
+
onClick(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadItemDelete, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScFileUploadItemDelete, "button[scFileUploadItemDelete]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; "fileId": { "alias": "fileId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScFileUploadItemName {
|
|
3
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
4
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadItemName, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScFileUploadItemName, "[scFileUploadItemName]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ScFileUploadFile } from './file-upload';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ScFileUploadItemPreview {
|
|
4
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly file: import("@angular/core").InputSignal<ScFileUploadFile>;
|
|
6
|
+
protected readonly isImage: import("@angular/core").Signal<boolean>;
|
|
7
|
+
protected readonly previewUrl: import("@angular/core").Signal<string>;
|
|
8
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadItemPreview, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScFileUploadItemPreview, "[scFileUploadItemPreview]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; "file": { "alias": "file"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ScFileUploadFile } from './file-upload';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ScFileUploadItemProgress {
|
|
4
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly file: import("@angular/core").InputSignal<ScFileUploadFile>;
|
|
6
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadItemProgress, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScFileUploadItemProgress, "[scFileUploadItemProgress]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; "file": { "alias": "file"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScFileUploadFile } from './file-upload';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ScFileUploadItemSize {
|
|
4
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly file: import("@angular/core").InputSignal<ScFileUploadFile>;
|
|
6
|
+
protected readonly formattedSize: import("@angular/core").Signal<string>;
|
|
7
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadItemSize, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScFileUploadItemSize, "[scFileUploadItemSize]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; "file": { "alias": "file"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ScFileUploadFile } from './file-upload';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ScFileUploadItem {
|
|
4
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly file: import("@angular/core").InputSignal<ScFileUploadFile>;
|
|
6
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadItem, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScFileUploadItem, "[scFileUploadItem]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; "file": { "alias": "file"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScFileUploadList {
|
|
3
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
4
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadList, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScFileUploadList, "[scFileUploadList]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScFileUploadTrigger {
|
|
3
|
+
readonly fileUpload: import("@semantic-components/ui").ScFileUpload;
|
|
4
|
+
private readonly elementRef;
|
|
5
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
6
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
7
|
+
openFilePicker(): void;
|
|
8
|
+
onFileSelect(event: Event): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUploadTrigger, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScFileUploadTrigger, "button[scFileUploadTrigger]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const SC_FILE_UPLOAD: InjectionToken<ScFileUpload>;
|
|
4
|
+
export interface ScFileUploadFile {
|
|
5
|
+
file: File;
|
|
6
|
+
id: string;
|
|
7
|
+
progress?: number;
|
|
8
|
+
status: 'pending' | 'uploading' | 'complete' | 'error';
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class ScFileUpload {
|
|
12
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
13
|
+
readonly multiple: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
readonly accept: import("@angular/core").InputSignal<string>;
|
|
15
|
+
readonly maxSize: import("@angular/core").InputSignal<number>;
|
|
16
|
+
readonly maxFiles: import("@angular/core").InputSignal<number>;
|
|
17
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
18
|
+
readonly files: import("@angular/core").ModelSignal<ScFileUploadFile[]>;
|
|
19
|
+
readonly filesSelected: import("@angular/core").OutputEmitterRef<File[]>;
|
|
20
|
+
readonly fileRemoved: import("@angular/core").OutputEmitterRef<ScFileUploadFile>;
|
|
21
|
+
readonly error: import("@angular/core").OutputEmitterRef<string>;
|
|
22
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
23
|
+
private generateId;
|
|
24
|
+
addFiles(fileList: FileList | File[]): void;
|
|
25
|
+
removeFile(fileId: string): void;
|
|
26
|
+
updateFileProgress(fileId: string, progress: number): void;
|
|
27
|
+
updateFileStatus(fileId: string, status: ScFileUploadFile['status'], error?: string): void;
|
|
28
|
+
clearFiles(): void;
|
|
29
|
+
private isAcceptedType;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScFileUpload, never>;
|
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScFileUpload, "[scFileUpload]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "files": { "alias": "files"; "required": false; "isSignal": true; }; }, { "files": "filesChange"; "filesSelected": "filesSelected"; "fileRemoved": "fileRemoved"; "error": "error"; }, never, never, true, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { SC_FILE_UPLOAD, ScFileUpload } from './file-upload';
|
|
2
|
+
export type { ScFileUploadFile } from './file-upload';
|
|
3
|
+
export { ScFileUploadDropzone } from './file-upload-dropzone';
|
|
4
|
+
export { ScFileUploadTrigger } from './file-upload-trigger';
|
|
5
|
+
export { ScFileUploadList } from './file-upload-list';
|
|
6
|
+
export { ScFileUploadItem } from './file-upload-item';
|
|
7
|
+
export { ScFileUploadItemPreview } from './file-upload-item-preview';
|
|
8
|
+
export { ScFileUploadItemName } from './file-upload-item-name';
|
|
9
|
+
export { ScFileUploadItemSize } from './file-upload-item-size';
|
|
10
|
+
export { ScFileUploadItemDelete } from './file-upload-item-delete';
|
|
11
|
+
export { ScFileUploadItemProgress } from './file-upload-item-progress';
|
|
@@ -10,13 +10,14 @@ export * from './button';
|
|
|
10
10
|
export * from './button-group';
|
|
11
11
|
export * from './calendar';
|
|
12
12
|
export * from './card';
|
|
13
|
-
export * from './collapsible';
|
|
14
13
|
export * from './checkbox';
|
|
14
|
+
export * from './collapsible';
|
|
15
15
|
export * from './date-picker';
|
|
16
16
|
export * from './dialog';
|
|
17
17
|
export * from './drawer';
|
|
18
18
|
export * from './empty';
|
|
19
19
|
export * from './field';
|
|
20
|
+
export * from './file-upload';
|
|
20
21
|
export * from './hover-card';
|
|
21
22
|
export * from './input';
|
|
22
23
|
export * from './input-group';
|
|
@@ -26,21 +27,28 @@ export * from './label';
|
|
|
26
27
|
export * from './link';
|
|
27
28
|
export * from './menu';
|
|
28
29
|
export * from './menu-bar';
|
|
30
|
+
export * from './native-select';
|
|
31
|
+
export * from './navigation-menu';
|
|
29
32
|
export * from './pagination';
|
|
30
33
|
export * from './popover';
|
|
31
34
|
export * from './progress';
|
|
32
35
|
export * from './radio-group';
|
|
36
|
+
export * from './range-slider';
|
|
37
|
+
export * from './scroll-area';
|
|
33
38
|
export * from './select';
|
|
34
39
|
export * from './separator';
|
|
35
40
|
export * from './sheet';
|
|
36
41
|
export * from './skeleton';
|
|
42
|
+
export * from './slider';
|
|
37
43
|
export * from './spinner';
|
|
38
44
|
export * from './switch';
|
|
39
45
|
export * from './table';
|
|
40
46
|
export * from './tabs';
|
|
41
47
|
export * from './textarea';
|
|
48
|
+
export * from './time-picker';
|
|
49
|
+
export * from './toast';
|
|
42
50
|
export * from './toggle';
|
|
43
51
|
export * from './toggle-group';
|
|
44
52
|
export * from './toolbar';
|
|
45
|
-
export * from './toast';
|
|
46
53
|
export * from './tooltip';
|
|
54
|
+
export * from './typography';
|
|
@@ -8,6 +8,7 @@ export declare class ScMenuBarItem {
|
|
|
8
8
|
readonly overlayOrigin: CdkOverlayOrigin;
|
|
9
9
|
private readonly menuItem;
|
|
10
10
|
protected readonly submenuPortal: import("@angular/core").Signal<ScMenuPortal | undefined>;
|
|
11
|
+
private readonly connectedOverlay;
|
|
11
12
|
private readonly scMenuBar;
|
|
12
13
|
protected readonly rendered: import("@angular/core").Signal<boolean>;
|
|
13
14
|
protected readonly class: import("@angular/core").Signal<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScNativeSelectContainer {
|
|
3
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
4
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScNativeSelectContainer, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScNativeSelectContainer, "div[scNativeSelectContainer]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScNativeSelectIcon {
|
|
3
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
4
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScNativeSelectIcon, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScNativeSelectIcon, "[scNativeSelectIcon]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScNativeSelectOptGroup {
|
|
3
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
4
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScNativeSelectOptGroup, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScNativeSelectOptGroup, "optgroup[scNativeSelectOptgroup]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScNativeSelectOption {
|
|
3
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
4
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScNativeSelectOption, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScNativeSelectOption, "option[scNativeSelectOption]", never, { "classInput": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScNativeSelect {
|
|
3
|
+
private readonly field;
|
|
4
|
+
private readonly fallbackId;
|
|
5
|
+
readonly idInput: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly classInput: import("@angular/core").InputSignal<string>;
|
|
7
|
+
readonly size: import("@angular/core").InputSignal<"default" | "sm">;
|
|
8
|
+
readonly id: import("@angular/core").Signal<string>;
|
|
9
|
+
protected readonly class: import("@angular/core").Signal<string>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScNativeSelect, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScNativeSelect, "select[scNativeSelect]", never, { "idInput": { "alias": "id"; "required": false; "isSignal": true; }; "classInput": { "alias": "class"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ScNavigationMenu } from './navigation-menu';
|
|
2
|
+
export { ScNavigationMenuContent } from './navigation-menu-content';
|
|
3
|
+
export { ScNavigationMenuGrid } from './navigation-menu-grid';
|
|
4
|
+
export { ScNavigationMenuItem } from './navigation-menu-item';
|
|
5
|
+
export { ScNavigationMenuLink } from './navigation-menu-link';
|
|
6
|
+
export { ScNavigationMenuList } from './navigation-menu-list';
|
|
7
|
+
export { ScNavigationMenuPortal } from './navigation-menu-portal';
|
|
8
|
+
export { ScNavigationMenuTrigger } from './navigation-menu-trigger';
|