@albi_scando/as-design-system-lib 1.8.2 → 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.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @see CloseButtonComponent selector
3
+ */
4
+ export declare const selector = "close-button";
@@ -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
- * It finds the closest parent dialog and
26
- * sets the commandfor attribute to its ID.
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 button.
4
- * Displays a right chevron icon with "Next" tooltip (hidden when disabled).
5
- * Used for navigating to next elements in a list or carousel.
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 navigation button.
4
- * Displays a left chevron icon with "Previous" tooltip (hidden when disabled).
5
- * Used for navigating to previous elements in a list or carousel.
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
- * It finds the closest parent dialog and
22
- * sets the commandfor attribute to its ID.
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: component removed from DOM
46
+ * Lifecycle hook: observed attribute changed.
20
47
  */
48
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
21
49
  /**
22
- * Lifecycle hook: observed attribute changed
50
+ * Renders the component's Shadow DOM structure.
23
51
  */
24
- attributeChangedCallback(name: string, _oldValue: string | null, _newValue: string | null): void;
52
+ private _render;
25
53
  /**
26
- * Render the component's Shadow DOM structure
54
+ * Updates the label text in the shadow DOM.
27
55
  */
28
- private _render;
56
+ private _updateLabel;
29
57
  }
@@ -0,0 +1,2 @@
1
+ export { LoaderBarsComponent } from './component';
2
+ export { selector } from './selector';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @see BarMenuComponent selector.
2
+ * @see LoaderBarsComponent selector.
3
3
  */
4
- export declare const selector = "bar-menu";
4
+ export declare const selector = "loader-bars";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@albi_scando/as-design-system-lib",
3
- "version": "1.8.2",
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": {
@@ -55,8 +55,8 @@
55
55
  "@semantic-release/git": "^10.0.1",
56
56
  "@semantic-release/github": "^12.0.3",
57
57
  "@semantic-release/npm": "^13.1.3",
58
- "@storybook/addon-docs": "10.3.3",
59
- "@storybook/html-vite": "10.3.3",
58
+ "@storybook/addon-docs": "10.3.5",
59
+ "@storybook/html-vite": "10.3.5",
60
60
  "@types/node": "^25.2.1",
61
61
  "@types/numeric": "^1.2.6",
62
62
  "@vitest/coverage-v8": "^4.0.18",
@@ -69,7 +69,7 @@
69
69
  "eslint-plugin-prettier": "^5.5.5",
70
70
  "eslint-plugin-regexp": "^3.0.0",
71
71
  "eslint-plugin-security": "^3.0.1",
72
- "eslint-plugin-storybook": "10.3.3",
72
+ "eslint-plugin-storybook": "10.3.5",
73
73
  "globals": "^17.3.0",
74
74
  "http-server": "^14.1.1",
75
75
  "husky": "^9.1.7",
@@ -77,7 +77,7 @@
77
77
  "prettier": "3.8.1",
78
78
  "sass": "^1.97.3",
79
79
  "semantic-release": "^25.0.3",
80
- "storybook": "10.3.3",
80
+ "storybook": "10.3.5",
81
81
  "typedoc": "^0.28.16",
82
82
  "typescript": "^5.9.3",
83
83
  "typescript-eslint": "^8.54.0",