@semantic-components/ui 0.10.0 → 0.12.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/fesm2022/semantic-components-ui.mjs +2347 -2440
- package/fesm2022/semantic-components-ui.mjs.map +1 -1
- package/index.d.ts +5 -0
- package/lib/components/autocomplete/autocomplete-item.d.ts +18 -0
- package/lib/components/autocomplete/autocomplete-model.d.ts +4 -0
- package/lib/components/autocomplete/autocomplete.d.ts +20 -0
- package/lib/components/autocomplete/index.d.ts +1 -0
- package/lib/components/calendar/calendar.d.ts +33 -0
- package/lib/components/calendar/index.d.ts +1 -0
- package/lib/components/{date-picker → calendar}/month-days.d.ts +3 -1
- package/lib/components/calendar/month-year-header.d.ts +9 -0
- package/lib/components/date-picker/date-input.d.ts +9 -0
- package/lib/components/date-picker/date-picker.d.ts +6 -8
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/editor/editor.d.ts +4 -1
- package/lib/components/full-calendar/full-calendar.d.ts +7 -0
- package/lib/components/full-calendar/index.d.ts +1 -0
- package/lib/components/hover-card/hover-card-trigger-for.d.ts +5 -5
- package/lib/components/input/input.d.ts +1 -0
- package/lib/components/overlay/index.d.ts +1 -0
- package/lib/components/overlay/utils.d.ts +1 -0
- package/lib/components/select/listbox-option.d.ts +8 -0
- package/lib/components/select/listbox.d.ts +7 -0
- package/lib/components/select/option.d.ts +3 -5
- package/lib/components/select/select.d.ts +11 -9
- package/lib/components/sheet/index.d.ts +2 -1
- package/lib/components/sheet/sheet-close.d.ts +10 -0
- package/lib/components/sheet/sheet-config.d.ts +5 -0
- package/lib/components/sheet/sheet-container.d.ts +9 -0
- package/lib/components/sheet/sheet-trigger.d.ts +11 -11
- package/lib/components/sheet/sheet.d.ts +3 -3
- package/lib/components/sidebar/constants.d.ts +3 -0
- package/lib/components/sidebar/index.d.ts +4 -0
- package/lib/components/sidebar/sidebar-mobile.d.ts +13 -0
- package/lib/components/sidebar/sidebar-provider.d.ts +11 -0
- package/lib/components/sidebar/sidebar-state.d.ts +9 -0
- package/lib/components/sidebar/sidebar-toggler.d.ts +8 -0
- package/lib/components/sidebar/sidebar.d.ts +19 -0
- package/lib/components/time-picker/index.d.ts +1 -0
- package/lib/components/time-picker/time-option.d.ts +28 -0
- package/lib/components/time-picker/time-picker-input.d.ts +7 -0
- package/lib/components/time-picker/time-picker.d.ts +97 -0
- package/lib/components/typography/article.d.ts +8 -0
- package/lib/components/typography/heading.d.ts +8 -0
- package/lib/components/typography/index.d.ts +2 -0
- package/lib/utils/css.d.ts +2 -0
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/settings.d.ts +9 -0
- package/package.json +1 -2
- package/lib/components/date-picker/inline-date-picker.d.ts +0 -22
- package/lib/components/date-picker/month-year-header.d.ts +0 -8
- package/lib/components/select/select-state.d.ts +0 -9
- package/lib/components/sheet/sheet-toggler.d.ts +0 -10
- package/lib/components/sheet/sidebar-content.d.ts +0 -7
- /package/lib/components/{date-picker → calendar}/util.d.ts +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { InputSignal, OnDestroy, OutputEmitterRef, Signal, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ScTimeOption } from './time-option';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Time selection option that can be displayed within a `mat-timepicker`.
|
|
6
|
+
*/
|
|
7
|
+
export interface MatTimepickerOption<D = unknown> {
|
|
8
|
+
/** Date value of the option. */
|
|
9
|
+
value: D;
|
|
10
|
+
/** Label to show to the user. */
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
/** Event emitted when a value is selected in the timepicker. */
|
|
14
|
+
export interface MatTimepickerSelected<D> {
|
|
15
|
+
value: D;
|
|
16
|
+
}
|
|
17
|
+
export declare class ScTimePicker implements OnDestroy {
|
|
18
|
+
class: InputSignal<string>;
|
|
19
|
+
classes: Signal<string>;
|
|
20
|
+
private readonly _overlay;
|
|
21
|
+
private readonly _dir;
|
|
22
|
+
private readonly _viewContainerRef;
|
|
23
|
+
private readonly _injector;
|
|
24
|
+
private readonly _isOpen;
|
|
25
|
+
private readonly _activeDescendant;
|
|
26
|
+
private readonly _input;
|
|
27
|
+
private _overlayRef;
|
|
28
|
+
private _portal;
|
|
29
|
+
private readonly _optionsCacheKey;
|
|
30
|
+
private readonly _localeChanges;
|
|
31
|
+
private _onOpenRender;
|
|
32
|
+
protected _panelTemplate: Signal<TemplateRef<unknown>>;
|
|
33
|
+
protected _timeOptions: readonly MatTimepickerOption<string>[];
|
|
34
|
+
protected _options: Signal<readonly ScTimeOption[]>;
|
|
35
|
+
private readonly _keyManager;
|
|
36
|
+
/**
|
|
37
|
+
* Interval between each option in the timepicker. The value can either be an amount of
|
|
38
|
+
* seconds (e.g. 90) or a number with a unit (e.g. 45m). Supported units are `s` for seconds,
|
|
39
|
+
* `m` for minutes or `h` for hours.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Array of pre-defined options that the user can select from, as an alternative to using the
|
|
43
|
+
* `interval` input. An error will be thrown if both `options` and `interval` are specified.
|
|
44
|
+
*/
|
|
45
|
+
readonly options: InputSignal<readonly MatTimepickerOption<string>[] | null>;
|
|
46
|
+
/** Whether the timepicker is open. */
|
|
47
|
+
readonly isOpen: Signal<boolean>;
|
|
48
|
+
/** Emits when the user selects a time. */
|
|
49
|
+
readonly selected: OutputEmitterRef<MatTimepickerSelected<string>>;
|
|
50
|
+
/** Emits when the timepicker is opened. */
|
|
51
|
+
readonly opened: OutputEmitterRef<void>;
|
|
52
|
+
/** Emits when the timepicker is closed. */
|
|
53
|
+
readonly closed: OutputEmitterRef<void>;
|
|
54
|
+
/** ID of the active descendant option. */
|
|
55
|
+
readonly activeDescendant: Signal<string | null>;
|
|
56
|
+
/** Unique ID of the timepicker's panel */
|
|
57
|
+
readonly panelId: string;
|
|
58
|
+
/** Whether ripples within the timepicker should be disabled. */
|
|
59
|
+
/** ARIA label for the timepicker panel. */
|
|
60
|
+
readonly ariaLabel: InputSignal<string | null>;
|
|
61
|
+
/** ID of the label element for the timepicker panel. */
|
|
62
|
+
readonly ariaLabelledby: InputSignal<string | null>;
|
|
63
|
+
/** Whether the timepicker is currently disabled. */
|
|
64
|
+
readonly disabled: Signal<boolean>;
|
|
65
|
+
constructor();
|
|
66
|
+
/** Opens the timepicker. */
|
|
67
|
+
open(): void;
|
|
68
|
+
/** Closes the timepicker. */
|
|
69
|
+
close(): void;
|
|
70
|
+
/** Registers an input with the timepicker. */
|
|
71
|
+
ngOnDestroy(): void;
|
|
72
|
+
/** Selects a specific time value. */
|
|
73
|
+
protected _selectValue(value: string): void;
|
|
74
|
+
/** Gets the value of the `aria-labelledby` attribute. */
|
|
75
|
+
protected _getAriaLabelledby(): string | null;
|
|
76
|
+
/** Creates an overlay reference for the timepicker panel. */
|
|
77
|
+
private _getOverlayRef;
|
|
78
|
+
/** Generates the list of options from which the user can select.. */
|
|
79
|
+
private _generateOptions;
|
|
80
|
+
/**
|
|
81
|
+
* Synchronizes the internal state of the component based on a specific selected date.
|
|
82
|
+
* @param value Currently selected date.
|
|
83
|
+
* @param options Options rendered out in the timepicker.
|
|
84
|
+
* @param fallback Option to set as active if no option is selected.
|
|
85
|
+
*/
|
|
86
|
+
private _syncSelectedState;
|
|
87
|
+
/** Handles keyboard events while the overlay is open. */
|
|
88
|
+
private _handleKeydown;
|
|
89
|
+
/** Sets up the logic that updates the timepicker when the locale changes. */
|
|
90
|
+
private _handleLocaleChanges;
|
|
91
|
+
/**
|
|
92
|
+
* Sets up the logic that updates the timepicker when the state of the connected input changes.
|
|
93
|
+
*/
|
|
94
|
+
private _handleInputStateChanges;
|
|
95
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScTimePicker, never>;
|
|
96
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScTimePicker, "sc-time-picker", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
97
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare const scArticleClasses: import("@angular/core").WritableSignal<string>;
|
|
3
|
+
export declare class ScArticle {
|
|
4
|
+
class: import("@angular/core").InputSignal<string>;
|
|
5
|
+
classes: import("@angular/core").Signal<string>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScArticle, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScArticle, "sc-article", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScHeading {
|
|
3
|
+
level: import("@angular/core").InputSignal<1 | 2 | 3 | 4 | 5 | 6 | null | undefined>;
|
|
4
|
+
class: import("@angular/core").InputSignal<string>;
|
|
5
|
+
classes: import("@angular/core").Signal<string>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScHeading, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScHeading, "h1[sc-heading], h2[sc-heading], h3[sc-heading], h4[sc-heading], h5[sc-heading], h6[sc-heading]", never, { "level": { "alias": "level"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
8
|
+
}
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export * from './css';
|
|
2
|
+
export * from './settings';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ScSettings {
|
|
3
|
+
dateFormatPattern: import("@angular/core").WritableSignal<string>;
|
|
4
|
+
private readonly localeId;
|
|
5
|
+
constructor();
|
|
6
|
+
getDateFormatPattern(localeId: string): string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScSettings, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScSettings>;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semantic-components/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"@angular/core": ">=19.0.0",
|
|
11
11
|
"@angular/cdk": ">=19.0.0",
|
|
12
12
|
"@angular/forms": ">=19.0.0",
|
|
13
|
-
"@angular/router": ">=19.0.0",
|
|
14
13
|
"@tiptap/core": "^2.10.3",
|
|
15
14
|
"@semantic-icons/lucide-icons": "^0.9.0",
|
|
16
15
|
"@tiptap/extension-blockquote": "^2.10.3",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { WeekDayName } from './util';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ScInlineDatePicker implements OnInit {
|
|
5
|
-
private readonly localeId;
|
|
6
|
-
year: import("@angular/core").WritableSignal<number>;
|
|
7
|
-
month: import("@angular/core").WritableSignal<number>;
|
|
8
|
-
weekDaysNames: import("@angular/core").WritableSignal<WeekDayName[]>;
|
|
9
|
-
monthYear: import("@angular/core").Signal<string>;
|
|
10
|
-
monthDays: import("@angular/core").Signal<string[]>;
|
|
11
|
-
firstDayMonth: import("@angular/core").Signal<number>;
|
|
12
|
-
selectedDay: import("@angular/core").WritableSignal<string>;
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
init(): void;
|
|
15
|
-
setSelectedDay(day: string): void;
|
|
16
|
-
private setLocaleDayNames;
|
|
17
|
-
private getFirstDayOfWeek;
|
|
18
|
-
setMonthYear(n: number): void;
|
|
19
|
-
twoDigits(n: number): string;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ScInlineDatePicker, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScInlineDatePicker, "sc-inline-date-picker", never, {}, {}, never, never, true, never>;
|
|
22
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class ScMonthYearHeader {
|
|
3
|
-
classes: import("@angular/core").WritableSignal<string>;
|
|
4
|
-
monthYear: import("@angular/core").InputSignal<string>;
|
|
5
|
-
monthYearChange: import("@angular/core").OutputEmitterRef<number>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ScMonthYearHeader, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScMonthYearHeader, "sc-month-year-header", never, { "monthYear": { "alias": "monthYear"; "required": true; "isSignal": true; }; }, { "monthYearChange": "monthYearChange"; }, never, never, true, never>;
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class ScSelectState {
|
|
3
|
-
selectedValue: import("@angular/core").WritableSignal<string>;
|
|
4
|
-
selectedLabel: import("@angular/core").WritableSignal<string>;
|
|
5
|
-
isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
6
|
-
closeOverlay: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ScSelectState, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ScSelectState>;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ScSheetTrigger } from './sheet-trigger';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ScSheetToggler {
|
|
4
|
-
sidebarState: ScSheetTrigger;
|
|
5
|
-
class: import("@angular/core").InputSignal<string>;
|
|
6
|
-
classes: import("@angular/core").Signal<string>;
|
|
7
|
-
toggle(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ScSheetToggler, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScSheetToggler, "sc-sheet-toggler", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class SidebarContent {
|
|
3
|
-
class: import("@angular/core").InputSignal<string>;
|
|
4
|
-
classes: import("@angular/core").Signal<string>;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarContent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarContent, "app-sidebar-content", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
File without changes
|