@albi_scando/as-design-system-lib 1.9.0 → 1.9.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/dist/as-design-system-lib.es.js +571 -426
- package/dist/as-design-system-lib.umd.js +53 -23
- package/dist/types/main.d.ts +1 -0
- package/dist/types/web-components/buttons/base-button/component.d.ts +6 -0
- package/dist/types/web-components/buttons/close-button/component.d.ts +25 -2
- package/dist/types/web-components/buttons/confirm-button/component.d.ts +23 -2
- package/dist/types/web-components/buttons/next-button/component.d.ts +21 -3
- package/dist/types/web-components/buttons/previous-button/component.d.ts +21 -3
- package/dist/types/web-components/buttons/undo-button/component.d.ts +28 -2
- package/dist/types/web-components/loaders/loader-bars/component.d.ts +34 -6
- package/dist/types/web-components/loaders/loader-bars/main.d.ts +2 -0
- package/dist/types/web-components/loaders/loader-bars/selector.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2,6 +2,20 @@ import { BaseButtonComponent } from '../base-button/component';
|
|
|
2
2
|
/**
|
|
3
3
|
* ConfirmButtonComponent extends BaseButtonComponent with a styled confirm button.
|
|
4
4
|
* It renders a native <button> element directly instead of nesting base-button.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <!-- Standalone (e.g. confirm and close a specific dialog by id) -->
|
|
8
|
+
* <confirm-button commandfor="my-dialog"></confirm-button>
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <!-- Auto-wired inside a dialog: commandfor is resolved automatically -->
|
|
12
|
+
* <confirmation-dialog id="my-dialog">...</confirmation-dialog>
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // JavaScript instantiation
|
|
16
|
+
* const btn = document.createElement('confirm-button');
|
|
17
|
+
* btn.commandfor = 'my-dialog';
|
|
18
|
+
* document.body.appendChild(btn);
|
|
5
19
|
*/
|
|
6
20
|
export declare class ConfirmButtonComponent extends BaseButtonComponent {
|
|
7
21
|
/**
|
|
@@ -17,13 +31,20 @@ export declare class ConfirmButtonComponent extends BaseButtonComponent {
|
|
|
17
31
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
18
32
|
*/
|
|
19
33
|
connectedCallback(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
36
|
+
*/
|
|
37
|
+
disconnectedCallback(): void;
|
|
20
38
|
/**
|
|
21
39
|
* Renders the component's HTML structure.
|
|
22
40
|
*/
|
|
23
41
|
protected _render(): void;
|
|
24
42
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
43
|
+
* Finds the closest parent dialog and sets the `commandfor` attribute to its
|
|
44
|
+
* ID so that clicking the button closes the dialog automatically.
|
|
45
|
+
*
|
|
46
|
+
* Only sets `commandfor` when the button is nested inside a recognised dialog
|
|
47
|
+
* element. When used standalone the caller is responsible for setting it.
|
|
27
48
|
*
|
|
28
49
|
* @returns {void}
|
|
29
50
|
*/
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { BaseButtonComponent } from '../base-button/component';
|
|
2
2
|
/**
|
|
3
|
-
* NextButtonComponent extends BaseButtonComponent with a next/forward navigation
|
|
4
|
-
* Displays a right chevron icon with "Next" tooltip (hidden when
|
|
5
|
-
* Used for navigating to next
|
|
3
|
+
* NextButtonComponent extends BaseButtonComponent with a next/forward navigation
|
|
4
|
+
* button. Displays a right chevron icon with "Next" tooltip (hidden when
|
|
5
|
+
* disabled). Used for navigating to the next item in a list, carousel or
|
|
6
|
+
* paginated view.
|
|
7
|
+
*
|
|
8
|
+
* The component dispatches the standard `click` event which parent components
|
|
9
|
+
* (e.g. `bar-menu`) listen to for navigation logic.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <next-button></next-button>
|
|
13
|
+
* <next-button disabled></next-button>
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // JavaScript instantiation
|
|
17
|
+
* const btn = document.createElement('next-button');
|
|
18
|
+
* btn.disabled = true;
|
|
19
|
+
* document.body.appendChild(btn);
|
|
6
20
|
*/
|
|
7
21
|
export declare class NextButtonComponent extends BaseButtonComponent {
|
|
8
22
|
private static readonly _disabledAttribute;
|
|
@@ -20,6 +34,10 @@ export declare class NextButtonComponent extends BaseButtonComponent {
|
|
|
20
34
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
21
35
|
*/
|
|
22
36
|
connectedCallback(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
39
|
+
*/
|
|
40
|
+
disconnectedCallback(): void;
|
|
23
41
|
/**
|
|
24
42
|
* Lifecycle hook invoked whenever an observed attribute changes.
|
|
25
43
|
* Updates the title visibility based on disabled state.
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { BaseButtonComponent } from '../base-button/component';
|
|
2
2
|
/**
|
|
3
|
-
* PreviousButtonComponent extends BaseButtonComponent with a previous/back
|
|
4
|
-
* Displays a left chevron icon with "Previous" tooltip
|
|
5
|
-
* Used for navigating to previous
|
|
3
|
+
* PreviousButtonComponent extends BaseButtonComponent with a previous/back
|
|
4
|
+
* navigation button. Displays a left chevron icon with "Previous" tooltip
|
|
5
|
+
* (hidden when disabled). Used for navigating to the previous item in a list,
|
|
6
|
+
* carousel or paginated view.
|
|
7
|
+
*
|
|
8
|
+
* The component dispatches the standard `click` event which parent components
|
|
9
|
+
* (e.g. `bar-menu`) listen to for navigation logic.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <previous-button></previous-button>
|
|
13
|
+
* <previous-button disabled></previous-button>
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // JavaScript instantiation
|
|
17
|
+
* const btn = document.createElement('previous-button');
|
|
18
|
+
* btn.disabled = true;
|
|
19
|
+
* document.body.appendChild(btn);
|
|
6
20
|
*/
|
|
7
21
|
export declare class PreviousButtonComponent extends BaseButtonComponent {
|
|
8
22
|
private static readonly _disabledAttribute;
|
|
@@ -20,6 +34,10 @@ export declare class PreviousButtonComponent extends BaseButtonComponent {
|
|
|
20
34
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
21
35
|
*/
|
|
22
36
|
connectedCallback(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
39
|
+
*/
|
|
40
|
+
disconnectedCallback(): void;
|
|
23
41
|
/**
|
|
24
42
|
* Lifecycle hook invoked whenever an observed attribute changes.
|
|
25
43
|
* Updates the title visibility based on disabled state.
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { BaseButtonComponent } from '../base-button/component';
|
|
2
|
+
/**
|
|
3
|
+
* UndoButtonComponent extends BaseButtonComponent with a styled undo/cancel button.
|
|
4
|
+
* It renders a native <button> element and automatically wires itself to close
|
|
5
|
+
* the closest parent dialog (dismissing without confirming).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <!-- Standalone (e.g. undo and close a specific dialog by id) -->
|
|
9
|
+
* <undo-button commandfor="my-dialog"></undo-button>
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <!-- Auto-wired inside a dialog: commandfor is resolved automatically -->
|
|
13
|
+
* <confirmation-dialog id="my-dialog">...</confirmation-dialog>
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // JavaScript instantiation
|
|
17
|
+
* const btn = document.createElement('undo-button');
|
|
18
|
+
* btn.commandfor = 'my-dialog';
|
|
19
|
+
* document.body.appendChild(btn);
|
|
20
|
+
*/
|
|
2
21
|
export declare class UndoButtonComponent extends BaseButtonComponent {
|
|
3
22
|
/**
|
|
4
23
|
* @constructor
|
|
@@ -13,13 +32,20 @@ export declare class UndoButtonComponent extends BaseButtonComponent {
|
|
|
13
32
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
14
33
|
*/
|
|
15
34
|
connectedCallback(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
37
|
+
*/
|
|
38
|
+
disconnectedCallback(): void;
|
|
16
39
|
/**
|
|
17
40
|
* Renders the component's HTML structure.
|
|
18
41
|
*/
|
|
19
42
|
protected _render(): void;
|
|
20
43
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
44
|
+
* Finds the closest parent dialog and sets the `commandfor` attribute to its
|
|
45
|
+
* ID so that clicking the button closes the dialog automatically.
|
|
46
|
+
*
|
|
47
|
+
* Only sets `commandfor` when the button is nested inside a recognised dialog
|
|
48
|
+
* element. When used standalone the caller is responsible for setting it.
|
|
23
49
|
*
|
|
24
50
|
* @returns {void}
|
|
25
51
|
*/
|
|
@@ -1,29 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LoaderBarsComponent is a skeleton-style loading indicator that shows a
|
|
3
|
+
* series of animated shimmer bars while content is being loaded.
|
|
4
|
+
*
|
|
5
|
+
* The component is hidden by default and becomes visible only when the
|
|
6
|
+
* `loading` attribute is set to a truthy value. Use the `label` attribute
|
|
7
|
+
* to customise the loading text shown below the bars.
|
|
8
|
+
*
|
|
9
|
+
* @attr {boolean} loading - When present (or `loading="true"`), the loader
|
|
10
|
+
* is visible. When absent or `loading="false"`, it is hidden.
|
|
11
|
+
* @attr {string} label - Optional loading label text. Defaults to "Loading…"
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <!-- HTML instantiation -->
|
|
15
|
+
* <loader-bars loading></loader-bars>
|
|
16
|
+
* <loader-bars loading label="Fetching data…"></loader-bars>
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // JavaScript instantiation
|
|
20
|
+
* const loader = document.createElement('loader-bars');
|
|
21
|
+
* loader.loading = true;
|
|
22
|
+
* loader.label = 'Fetching data…';
|
|
23
|
+
* document.body.appendChild(loader);
|
|
24
|
+
*/
|
|
1
25
|
export declare class LoaderBarsComponent extends HTMLElement {
|
|
2
26
|
private static readonly _labelAttribute;
|
|
3
27
|
private static readonly _loadingAttribute;
|
|
4
28
|
/**
|
|
5
29
|
* @constructor
|
|
30
|
+
* @ignore
|
|
6
31
|
*/
|
|
7
32
|
constructor();
|
|
8
33
|
/**
|
|
9
34
|
* Specifies which attributes should be observed for changes.
|
|
10
35
|
*/
|
|
11
36
|
static get observedAttributes(): string[];
|
|
37
|
+
get loading(): boolean;
|
|
12
38
|
set loading(value: boolean);
|
|
39
|
+
get label(): string;
|
|
13
40
|
set label(value: string);
|
|
14
41
|
/**
|
|
15
|
-
* Lifecycle hook: component inserted into DOM
|
|
42
|
+
* Lifecycle hook: component inserted into DOM.
|
|
16
43
|
*/
|
|
17
44
|
connectedCallback(): void;
|
|
18
45
|
/**
|
|
19
|
-
* Lifecycle hook:
|
|
46
|
+
* Lifecycle hook: observed attribute changed.
|
|
20
47
|
*/
|
|
48
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
21
49
|
/**
|
|
22
|
-
*
|
|
50
|
+
* Renders the component's Shadow DOM structure.
|
|
23
51
|
*/
|
|
24
|
-
|
|
52
|
+
private _render;
|
|
25
53
|
/**
|
|
26
|
-
*
|
|
54
|
+
* Updates the label text in the shadow DOM.
|
|
27
55
|
*/
|
|
28
|
-
private
|
|
56
|
+
private _updateLabel;
|
|
29
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@albi_scando/as-design-system-lib",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "A library of reusable, strongly typed Web Components built with TypeScript, designed for creating consistent and maintainable user interfaces.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|