shirkasoft-ui-components 1.3.15 → 1.4.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/README.md +447 -71
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +11 -11
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +914 -0
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +901 -753
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +5 -5
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +16 -9
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +646 -0
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-knob.mjs +44 -17
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +16 -16
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +42 -31
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +79 -29
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +50 -23
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +4 -4
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +163 -102
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +21 -23
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +9 -9
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +63 -30
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +280 -0
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs +180 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +10 -22
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +60 -53
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +29 -11
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +22 -11
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +9 -10
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/package.json +33 -3
- package/src/baseline.css +2472 -0
- package/src/theme.css +15 -543
- package/src/themes/ocean.css +56 -0
- package/src/themes/sunset.css +55 -0
- package/src/themes/violet.css +25 -0
- package/src/tokens.css +612 -0
- package/types/shirkasoft-ui-components-button.d.ts +1 -1
- package/types/shirkasoft-ui-components-config.d.ts +368 -0
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +2 -1
- package/types/shirkasoft-ui-components-date-picker.d.ts +276 -224
- package/types/shirkasoft-ui-components-fieldset.d.ts +2 -1
- package/types/shirkasoft-ui-components-file-upload.d.ts +11 -5
- package/types/shirkasoft-ui-components-icons.d.ts +1422 -0
- package/types/shirkasoft-ui-components-knob.d.ts +28 -7
- package/types/shirkasoft-ui-components-modal.d.ts +11 -7
- package/types/shirkasoft-ui-components-notification.d.ts +2 -1
- package/types/shirkasoft-ui-components-price-input.d.ts +37 -9
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +3 -3
- package/types/shirkasoft-ui-components-select.d.ts +24 -8
- package/types/shirkasoft-ui-components-sidebar.d.ts +2 -1
- package/types/shirkasoft-ui-components-table.d.ts +91 -80
- package/types/shirkasoft-ui-components-tag.d.ts +1 -1
- package/types/shirkasoft-ui-components-text-field.d.ts +29 -13
- package/types/shirkasoft-ui-components-theme-picker.d.ts +83 -0
- package/types/shirkasoft-ui-components-theme.d.ts +88 -0
- package/types/shirkasoft-ui-components-timeline.d.ts +5 -4
- package/types/shirkasoft-ui-components-toggle.d.ts +20 -13
- package/types/shirkasoft-ui-components-tooltip.d.ts +6 -0
- package/types/shirkasoft-ui-components-utils.d.ts +16 -6
- package/types/shirkasoft-ui-components-wizard.d.ts +4 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { FormCheckboxControl } from '@angular/forms/signals';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Shirkasoft UI Components.
|
|
@@ -9,20 +10,25 @@ import { ControlValueAccessor } from '@angular/forms';
|
|
|
9
10
|
/**
|
|
10
11
|
* Switch / checkbox component that implements ControlValueAccessor so it can
|
|
11
12
|
* be used with reactive and template-driven forms.
|
|
13
|
+
*
|
|
14
|
+
* It also implements the Angular Signal Forms `FormCheckboxControl` contract
|
|
15
|
+
* through its `checked` model, so it works with `[formField]` as well.
|
|
12
16
|
*/
|
|
13
|
-
declare class ToggleComponent implements ControlValueAccessor {
|
|
17
|
+
declare class ToggleComponent implements ControlValueAccessor, FormCheckboxControl {
|
|
14
18
|
/** Text displayed next to the control. */
|
|
15
19
|
label: _angular_core.InputSignal<string>;
|
|
16
20
|
/** Visual style: 'toggle' (switch) or 'checkbox'. Defaults to 'toggle'. */
|
|
17
21
|
mode: _angular_core.InputSignal<"toggle" | "checkbox">;
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Checked state. Two-way bindable with `[(checked)]`; also the model that
|
|
24
|
+
* Signal Forms binds to. The implicit `checkedChange` output fires with the
|
|
25
|
+
* new value whenever the user toggles the control.
|
|
26
|
+
*/
|
|
27
|
+
checked: _angular_core.ModelSignal<boolean>;
|
|
22
28
|
/** Disables the control (also settable through reactive forms). */
|
|
23
29
|
disabled: _angular_core.InputSignal<boolean>;
|
|
24
|
-
/**
|
|
25
|
-
|
|
30
|
+
/** Emitted on blur so Signal Forms can mark the field as touched. */
|
|
31
|
+
touch: _angular_core.OutputEmitterRef<void>;
|
|
26
32
|
/** Reactive disabled state. */
|
|
27
33
|
_disabled: _angular_core.WritableSignal<boolean>;
|
|
28
34
|
/** Disabled through the `disabled` input or the form control. */
|
|
@@ -31,7 +37,6 @@ declare class ToggleComponent implements ControlValueAccessor {
|
|
|
31
37
|
private onChange;
|
|
32
38
|
/** Callback notified when the control loses focus or is touched. */
|
|
33
39
|
private onTouched;
|
|
34
|
-
constructor();
|
|
35
40
|
/** Sets the value from the form control. */
|
|
36
41
|
writeValue(value: any): void;
|
|
37
42
|
/** Registers the callback invoked on value changes (ControlValueAccessor). */
|
|
@@ -40,15 +45,17 @@ declare class ToggleComponent implements ControlValueAccessor {
|
|
|
40
45
|
registerOnTouched(fn: any): void;
|
|
41
46
|
/** Reflects the disabled state of the form control. */
|
|
42
47
|
setDisabledState(isDisabled: boolean): void;
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
* marks the control as touched and emits `checkedChange`.
|
|
46
|
-
*/
|
|
48
|
+
/** Marks the control as touched when focus leaves it. */
|
|
49
|
+
onBlur(): void;
|
|
47
50
|
/** Space/Enter toggles the focused switch or checkbox. */
|
|
48
51
|
onKeydown(event: KeyboardEvent): void;
|
|
52
|
+
/**
|
|
53
|
+
* Inverts the current value (unless disabled), notifies the form control and
|
|
54
|
+
* marks the control as touched. The `checked` model emits `checkedChange`.
|
|
55
|
+
*/
|
|
49
56
|
toggle(): void;
|
|
50
57
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToggleComponent, never>;
|
|
51
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToggleComponent, "shk-toggle", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "
|
|
58
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToggleComponent, "shk-toggle", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "touch": "touch"; }, never, never, true, never>;
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
export { ToggleComponent };
|
|
@@ -30,6 +30,12 @@ declare class TooltipComponent implements OnDestroy {
|
|
|
30
30
|
onMouseEnter(): void;
|
|
31
31
|
/** Hides the tooltip on mouseleave. */
|
|
32
32
|
onMouseLeave(): void;
|
|
33
|
+
/** Also opens on keyboard focus, so icon-only triggers are readable. */
|
|
34
|
+
onFocusIn(): void;
|
|
35
|
+
/** Closes when the focus leaves the trigger. */
|
|
36
|
+
onFocusOut(): void;
|
|
37
|
+
/** Opens the tooltip when there is text to show. */
|
|
38
|
+
private open;
|
|
33
39
|
/** Creates and positions the tooltip element on `document.body`. */
|
|
34
40
|
private show;
|
|
35
41
|
/** Computes the tooltip position, clamped to the viewport. */
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import { IconNode } from 'shirkasoft-ui-components/icons';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
|
|
3
|
-
/** Maps the icon names used across the library to their
|
|
4
|
-
declare const ICONS: Record<string,
|
|
4
|
+
/** Maps the icon names used across the library to their SVG data. */
|
|
5
|
+
declare const ICONS: Record<string, IconNode>;
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* True when `icon` is a per-item resolver function such as `(row) => 'pencil'`.
|
|
8
|
+
*
|
|
9
|
+
* Classes are functions too, but must never be called: a v1 `@lucide/angular`
|
|
10
|
+
* component passed by an app that has not migrated yet would throw
|
|
11
|
+
* "Class constructor cannot be invoked without 'new'". Those fall through to
|
|
12
|
+
* `getIcon()`, which renders the fallback icon instead.
|
|
13
|
+
*/
|
|
14
|
+
declare function isIconResolver(icon: unknown): icon is (...args: any[]) => unknown;
|
|
15
|
+
/**
|
|
16
|
+
* Resolves the icon passed to a component into SVG data.
|
|
17
|
+
* Accepts a registered string name or an icon node array.
|
|
8
18
|
*/
|
|
9
|
-
declare function getIcon(icon?: any, fallback?: any):
|
|
19
|
+
declare function getIcon(icon?: any, fallback?: any): IconNode | null;
|
|
10
20
|
|
|
11
21
|
/**
|
|
12
22
|
* Shirkasoft UI Components.
|
|
@@ -49,4 +59,4 @@ declare class PortalDirective {
|
|
|
49
59
|
static ɵdir: i0.ɵɵDirectiveDeclaration<PortalDirective, "[shkPortal]", never, {}, {}, never, never, true, never>;
|
|
50
60
|
}
|
|
51
61
|
|
|
52
|
-
export { ICONS, PortalDirective, getIcon, portalToBody };
|
|
62
|
+
export { ICONS, PortalDirective, getIcon, isIconResolver, portalToBody };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { TemplateRef } from '@angular/core';
|
|
3
4
|
|
|
@@ -5,7 +6,7 @@ import { TemplateRef } from '@angular/core';
|
|
|
5
6
|
interface WizardStep {
|
|
6
7
|
id: string | number;
|
|
7
8
|
label: string;
|
|
8
|
-
/** Optional
|
|
9
|
+
/** Optional icon (name or `IconNode` data) rendered inside the step circle. */
|
|
9
10
|
icon?: string;
|
|
10
11
|
/** Overrides the primary footer button label for this step. */
|
|
11
12
|
primaryLabel?: string;
|
|
@@ -30,7 +31,7 @@ declare class ShkWizardStepContent {
|
|
|
30
31
|
* content templates declared with `shkWizardStepContent`.
|
|
31
32
|
*/
|
|
32
33
|
declare class WizardComponent {
|
|
33
|
-
protected getIcon: (name: any) =>
|
|
34
|
+
protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
|
|
34
35
|
/** Steps definition shown in the stepper and used to resolve step content. */
|
|
35
36
|
steps: _angular_core.InputSignal<WizardStep[]>;
|
|
36
37
|
/** Active step id. Two-way bindable with [(currentStep)]. Null resolves to the first step. */
|
|
@@ -42,7 +43,7 @@ declare class WizardComponent {
|
|
|
42
43
|
/** Shows the round back button in the header. */
|
|
43
44
|
showBackButton: _angular_core.InputSignal<boolean>;
|
|
44
45
|
backTooltip: _angular_core.InputSignal<string>;
|
|
45
|
-
/** Optional
|
|
46
|
+
/** Optional icon (name or `IconNode` data) shown before the title. */
|
|
46
47
|
headerIcon: _angular_core.InputSignal<string>;
|
|
47
48
|
/** Shows the progress stepper (hide it for edit mode, like wac-app does). */
|
|
48
49
|
showStepper: _angular_core.InputSignal<boolean>;
|