@cngx/ui 0.0.1-rc.0 → 0.1.0-rc.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.
Files changed (60) hide show
  1. package/README.md +22 -48
  2. package/action-button/README.md +9 -11
  3. package/empty-state/README.md +11 -26
  4. package/feedback/README.md +3 -3
  5. package/fesm2022/cngx-ui-action-button.mjs +30 -26
  6. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  7. package/fesm2022/cngx-ui-empty-state.mjs +26 -21
  8. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  9. package/fesm2022/cngx-ui-feedback.mjs +498 -261
  10. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  11. package/fesm2022/cngx-ui-layout.mjs +32 -5
  12. package/fesm2022/cngx-ui-layout.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-mat-stepper.mjs +119 -297
  14. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-mat-tabs.mjs +455 -120
  16. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-material.mjs +14 -3
  18. package/fesm2022/cngx-ui-material.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-overlay.mjs +22 -3
  20. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  21. package/fesm2022/cngx-ui-sidenav.mjs +107 -28
  22. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  23. package/fesm2022/cngx-ui-skeleton.mjs +61 -20
  24. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-speak.mjs +14 -5
  26. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-stepper.mjs +659 -163
  28. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  29. package/fesm2022/cngx-ui-tabs.mjs +306 -55
  30. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  31. package/fesm2022/cngx-ui.mjs +2 -1
  32. package/fesm2022/cngx-ui.mjs.map +1 -1
  33. package/layout/README.md +9 -44
  34. package/mat-stepper/README.md +37 -17
  35. package/mat-tabs/README.md +13 -13
  36. package/mat-tabs/styles/mat-tabs.css +357 -213
  37. package/material/README.md +19 -19
  38. package/overlay/README.md +11 -11
  39. package/package.json +7 -6
  40. package/sidenav/README.md +4 -19
  41. package/skeleton/README.md +3 -17
  42. package/speak/README.md +15 -15
  43. package/stepper/README.md +213 -5
  44. package/tabs/README.md +22 -4
  45. package/theming/system-tokens.css +29 -0
  46. package/types/cngx-ui-action-button.d.ts +28 -13
  47. package/types/cngx-ui-empty-state.d.ts +21 -9
  48. package/types/cngx-ui-feedback.d.ts +437 -121
  49. package/types/cngx-ui-layout.d.ts +38 -8
  50. package/types/cngx-ui-mat-stepper.d.ts +100 -134
  51. package/types/cngx-ui-mat-tabs.d.ts +291 -84
  52. package/types/cngx-ui-material.d.ts +12 -1
  53. package/types/cngx-ui-overlay.d.ts +25 -4
  54. package/types/cngx-ui-sidenav.d.ts +106 -12
  55. package/types/cngx-ui-skeleton.d.ts +62 -8
  56. package/types/cngx-ui-speak.d.ts +10 -2
  57. package/types/cngx-ui-stepper.d.ts +390 -57
  58. package/types/cngx-ui-tabs.d.ts +182 -18
  59. package/types/cngx-ui.d.ts +1 -0
  60. package/speak/speak-button-theme.scss +0 -78
@@ -3,15 +3,15 @@ import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component
3
3
  import { nextUid } from '@cngx/core/utils';
4
4
 
5
5
  /**
6
- * Empty-state display atom for grids, tables, lists, and dashboards.
6
+ * Empty-state display organism for grids, tables, lists, and dashboards.
7
7
  *
8
8
  * Communicates why a view is empty and what the user can do next.
9
9
  * Supports three UX contexts via the parent's `emptyReason`:
10
- * - **first-use** — onboarding, show what's possible
11
- * - **no-results** — recovery, offer filter reset or search change
12
- * - **cleared** — confirmation, everything is done
10
+ * - **first-use** - onboarding, show what's possible
11
+ * - **no-results** - recovery, offer filter reset or search change
12
+ * - **cleared** - confirmation, everything is done
13
13
  *
14
- * Icon is provided via the `[cngxEmptyStateIcon]` content slot — no Material
14
+ * Icon is provided via the `[cngxEmptyStateIcon]` content slot - no Material
15
15
  * dependency. Consumers project `<mat-icon>`, `<svg>`, or any icon system.
16
16
  *
17
17
  * ```html
@@ -20,22 +20,34 @@ import { nextUid } from '@cngx/core/utils';
20
20
  * <button cngxEmptyStateAction (click)="resetSearch()">Reset</button>
21
21
  * </cngx-empty-state>
22
22
  * ```
23
+ *
24
+ * @category ui/empty-state
25
+ * @docsKind primary
26
+ * @wcag AA
27
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/empty-state/empty-state.component.ts
28
+ * @since 0.1.0
29
+ * @relatedTo CngxAsyncState, CngxSkeletonContainer
30
+ * <example-url>http://localhost:4200/#/ui/empty-state/default-no-icon-projected</example-url>
31
+ * <example-url>http://localhost:4200/#/ui/empty-state/inside-a-card-grid</example-url>
32
+ * <example-url>http://localhost:4200/#/ui/empty-state/inside-a-list</example-url>
33
+ * <example-url>http://localhost:4200/#/ui/empty-state/inside-a-table</example-url>
34
+ * <example-url>http://localhost:4200/#/ui/empty-state/with-custom-icon-actions</example-url>
23
35
  */
24
36
  class CngxEmptyState {
25
37
  uid = nextUid('cngx-empty');
26
- /** Primary message — what state the user is in. */
38
+ /** Primary message - what state the user is in. */
27
39
  title = input.required(...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
28
- /** Supporting detail — clarifies context and suggests next steps. */
40
+ /** Supporting detail - clarifies context and suggests next steps. */
29
41
  description = input(undefined, ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
30
- /** Bind an async state — auto-hides when data is not empty. */
42
+ /** Bind an async state - auto-hides when data is not empty. */
31
43
  state = input(undefined, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
32
- /** @internal — hidden when state is bound and data is not empty or still loading. */
44
+ /** @internal - hidden when state is bound and data is not empty or still loading. */
33
45
  shouldHide = computed(() => {
34
46
  const s = this.state();
35
47
  if (!s) {
36
48
  return false;
37
49
  }
38
- // Hide during loading (skeleton handles that phase) and when data is present
50
+ // Skeleton owns the loading phase; defer until data resolves.
39
51
  return s.isLoading() || !s.isEmpty();
40
52
  }, ...(ngDevMode ? [{ debugName: "shouldHide" }] : /* istanbul ignore next */ []));
41
53
  /** @internal */
@@ -74,24 +86,18 @@ class CngxEmptyState {
74
86
  <ng-content select="[cngxEmptyStateAction]" />
75
87
  </div>
76
88
  <ng-content select="[cngxEmptyStateSecondary]" />
77
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
89
+ `, isInline: true, styles: ["@layer cngx.tokens{@property --cngx-empty-gap{syntax: \"*\"; inherits: false; initial-value: 16px;}@property --cngx-empty-padding{syntax: \"*\"; inherits: false; initial-value: 48px;}@property --cngx-empty-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.34 .005 290);}@property --cngx-empty-icon-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.34 .005 290);}@property --cngx-empty-title-size{syntax: \"*\"; inherits: false; initial-value: 1.125rem;}@property --cngx-empty-title-weight{syntax: \"<number>\"; inherits: false; initial-value: 500;}@property --cngx-empty-title-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.18 .005 290);}@property --cngx-empty-desc-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}:root{--cngx-empty-color: var(--cngx-color-text, oklch(.34 .005 290));--cngx-empty-icon-color: var(--cngx-color-text, oklch(.34 .005 290));--cngx-empty-title-color: var(--cngx-color-text, oklch(.18 .005 290))}}@layer cngx.components{@scope(.cngx-empty-state){:scope{display:flex;flex-direction:column;align-items:center;gap:var(--cngx-empty-gap, var(--cngx-space-md, 16px));padding:var(--cngx-empty-padding, var(--cngx-space-xl, 48px)) var(--cngx-space-md, 16px);text-align:center;color:var(--cngx-empty-color, var(--cngx-color-text, oklch(.34 .005 290)))}.cngx-empty-state__icon-slot:not(:empty)+.cngx-empty-state__default-icon{display:none}.cngx-empty-state__default-icon{color:var(--cngx-empty-icon-color, var(--cngx-color-text, oklch(.34 .005 290)));opacity:.5}.cngx-empty-state__icon-slot:empty{display:none}.cngx-empty-state__title{margin:0;font-size:var(--cngx-empty-title-size, 1.125rem);font-weight:var(--cngx-empty-title-weight, 500);color:var(--cngx-empty-title-color, var(--cngx-color-text, oklch(.18 .005 290)))}.cngx-empty-state__description{margin:0;font-size:var(--cngx-empty-desc-size, .875rem);line-height:1.5;max-width:40ch}.cngx-empty-state__actions{display:flex;gap:var(--cngx-space-sm, 8px);margin-top:var(--cngx-space-sm, 8px)}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
78
90
  }
79
91
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxEmptyState, decorators: [{
80
92
  type: Component,
81
- args: [{
82
- selector: 'cngx-empty-state',
83
- standalone: true,
84
- changeDetection: ChangeDetectionStrategy.OnPush,
85
- encapsulation: ViewEncapsulation.None,
86
- host: {
93
+ args: [{ selector: 'cngx-empty-state', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
87
94
  class: 'cngx-empty-state',
88
95
  role: 'status',
89
96
  'aria-live': 'polite',
90
97
  '[attr.aria-labelledby]': 'titleId',
91
98
  '[attr.aria-describedby]': 'description() ? descriptionId : null',
92
99
  '[attr.hidden]': 'shouldHide() || null',
93
- },
94
- template: `
100
+ }, template: `
95
101
  <div class="cngx-empty-state__icon-slot">
96
102
  <ng-content select="[cngxEmptyStateIcon]" />
97
103
  </div>
@@ -122,8 +128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
122
128
  <ng-content select="[cngxEmptyStateAction]" />
123
129
  </div>
124
130
  <ng-content select="[cngxEmptyStateSecondary]" />
125
- `,
126
- }]
131
+ `, styles: ["@layer cngx.tokens{@property --cngx-empty-gap{syntax: \"*\"; inherits: false; initial-value: 16px;}@property --cngx-empty-padding{syntax: \"*\"; inherits: false; initial-value: 48px;}@property --cngx-empty-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.34 .005 290);}@property --cngx-empty-icon-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.34 .005 290);}@property --cngx-empty-title-size{syntax: \"*\"; inherits: false; initial-value: 1.125rem;}@property --cngx-empty-title-weight{syntax: \"<number>\"; inherits: false; initial-value: 500;}@property --cngx-empty-title-color{syntax: \"<color>\"; inherits: true; initial-value: oklch(.18 .005 290);}@property --cngx-empty-desc-size{syntax: \"*\"; inherits: false; initial-value: .875rem;}:root{--cngx-empty-color: var(--cngx-color-text, oklch(.34 .005 290));--cngx-empty-icon-color: var(--cngx-color-text, oklch(.34 .005 290));--cngx-empty-title-color: var(--cngx-color-text, oklch(.18 .005 290))}}@layer cngx.components{@scope(.cngx-empty-state){:scope{display:flex;flex-direction:column;align-items:center;gap:var(--cngx-empty-gap, var(--cngx-space-md, 16px));padding:var(--cngx-empty-padding, var(--cngx-space-xl, 48px)) var(--cngx-space-md, 16px);text-align:center;color:var(--cngx-empty-color, var(--cngx-color-text, oklch(.34 .005 290)))}.cngx-empty-state__icon-slot:not(:empty)+.cngx-empty-state__default-icon{display:none}.cngx-empty-state__default-icon{color:var(--cngx-empty-icon-color, var(--cngx-color-text, oklch(.34 .005 290)));opacity:.5}.cngx-empty-state__icon-slot:empty{display:none}.cngx-empty-state__title{margin:0;font-size:var(--cngx-empty-title-size, 1.125rem);font-weight:var(--cngx-empty-title-weight, 500);color:var(--cngx-empty-title-color, var(--cngx-color-text, oklch(.18 .005 290)))}.cngx-empty-state__description{margin:0;font-size:var(--cngx-empty-desc-size, .875rem);line-height:1.5;max-width:40ch}.cngx-empty-state__actions{display:flex;gap:var(--cngx-space-sm, 8px);margin-top:var(--cngx-space-sm, 8px)}}}\n"] }]
127
132
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }] } });
128
133
 
129
134
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cngx-ui-empty-state.mjs","sources":["../../../projects/ui/empty-state/empty-state.component.ts","../../../projects/ui/empty-state/public-api.ts","../../../projects/ui/empty-state/cngx-ui-empty-state.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { type CngxAsyncState, nextUid } from '@cngx/core/utils';\n\n/**\n * Empty-state display atom for grids, tables, lists, and dashboards.\n *\n * Communicates why a view is empty and what the user can do next.\n * Supports three UX contexts via the parent's `emptyReason`:\n * - **first-use** — onboarding, show what's possible\n * - **no-results** — recovery, offer filter reset or search change\n * - **cleared** — confirmation, everything is done\n *\n * Icon is provided via the `[cngxEmptyStateIcon]` content slot — no Material\n * dependency. Consumers project `<mat-icon>`, `<svg>`, or any icon system.\n *\n * ```html\n * <cngx-empty-state title=\"No results\" description=\"Try a different search term\">\n * <mat-icon cngxEmptyStateIcon>search_off</mat-icon>\n * <button cngxEmptyStateAction (click)=\"resetSearch()\">Reset</button>\n * </cngx-empty-state>\n * ```\n */\n@Component({\n selector: 'cngx-empty-state',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-empty-state',\n role: 'status',\n 'aria-live': 'polite',\n '[attr.aria-labelledby]': 'titleId',\n '[attr.aria-describedby]': 'description() ? descriptionId : null',\n '[attr.hidden]': 'shouldHide() || null',\n },\n template: `\n <div class=\"cngx-empty-state__icon-slot\">\n <ng-content select=\"[cngxEmptyStateIcon]\" />\n </div>\n <svg\n class=\"cngx-empty-state__default-icon\"\n aria-hidden=\"true\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M21 8V21H3V8\" />\n <path d=\"M1 3h22v5H1z\" />\n <path d=\"M10 12h4\" />\n </svg>\n <ng-content select=\"[cngxEmptyStateIllustration]\" />\n <h3 [id]=\"titleId\" class=\"cngx-empty-state__title\">{{ title() }}</h3>\n @if (description()) {\n <p [id]=\"descriptionId\" class=\"cngx-empty-state__description\">\n {{ description() }}\n </p>\n }\n <div class=\"cngx-empty-state__actions\">\n <ng-content select=\"[cngxEmptyStateAction]\" />\n </div>\n <ng-content select=\"[cngxEmptyStateSecondary]\" />\n `,\n})\nexport class CngxEmptyState {\n private readonly uid = nextUid('cngx-empty');\n\n /** Primary message — what state the user is in. */\n readonly title = input.required<string>();\n\n /** Supporting detail — clarifies context and suggests next steps. */\n readonly description = input<string | undefined>(undefined);\n\n /** Bind an async state — auto-hides when data is not empty. */\n readonly state = input<CngxAsyncState<unknown> | undefined>(undefined);\n\n /** @internal — hidden when state is bound and data is not empty or still loading. */\n protected readonly shouldHide = computed(() => {\n const s = this.state();\n if (!s) {\n return false;\n }\n // Hide during loading (skeleton handles that phase) and when data is present\n return s.isLoading() || !s.isEmpty();\n });\n\n /** @internal */\n protected readonly titleId = `${this.uid}-title`;\n /** @internal */\n protected readonly descriptionId = `${this.uid}-desc`;\n}\n","/**\n * @module @cngx/ui/empty-state\n */\n\nexport { CngxEmptyState } from './empty-state.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AASA;;;;;;;;;;;;;;;;;;AAkBG;MA+CU,cAAc,CAAA;AACR,IAAA,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC;;AAGnC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAGhC,IAAA,WAAW,GAAG,KAAK,CAAqB,SAAS,kFAAC;;AAGlD,IAAA,K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A,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,EAAA,sBAAA,EAAA,SAAA,EAAA,uBAAA,EAAA,sCAAA,EAAA,aAAA,EAAA,sBAAA,EAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAjCf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEU,cAAc,EAAA,UAAA,EAAA,CAAA;kBA9C1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,WAAW,EAAE,QAAQ;AACrB,wBAAA,wBAAwB,EAAE,SAAS;AACnC,wBAAA,yBAAyB,EAAE,sCAAsC;AACjE,wBAAA,eAAe,EAAE,sBAAsB;AACxC,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BT,EAAA,CAAA;AACF,iBAAA;;;ACzED;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"cngx-ui-empty-state.mjs","sources":["../../../projects/ui/empty-state/empty-state.component.ts","../../../projects/ui/empty-state/public-api.ts","../../../projects/ui/empty-state/cngx-ui-empty-state.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { type CngxAsyncState, nextUid } from '@cngx/core/utils';\n\n/**\n * Empty-state display organism for grids, tables, lists, and dashboards.\n *\n * Communicates why a view is empty and what the user can do next.\n * Supports three UX contexts via the parent's `emptyReason`:\n * - **first-use** - onboarding, show what's possible\n * - **no-results** - recovery, offer filter reset or search change\n * - **cleared** - confirmation, everything is done\n *\n * Icon is provided via the `[cngxEmptyStateIcon]` content slot - no Material\n * dependency. Consumers project `<mat-icon>`, `<svg>`, or any icon system.\n *\n * ```html\n * <cngx-empty-state title=\"No results\" description=\"Try a different search term\">\n * <mat-icon cngxEmptyStateIcon>search_off</mat-icon>\n * <button cngxEmptyStateAction (click)=\"resetSearch()\">Reset</button>\n * </cngx-empty-state>\n * ```\n *\n * @category ui/empty-state\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/empty-state/empty-state.component.ts\n * @since 0.1.0\n * @relatedTo CngxAsyncState, CngxSkeletonContainer\n * <example-url>http://localhost:4200/#/ui/empty-state/default-no-icon-projected</example-url>\n * <example-url>http://localhost:4200/#/ui/empty-state/inside-a-card-grid</example-url>\n * <example-url>http://localhost:4200/#/ui/empty-state/inside-a-list</example-url>\n * <example-url>http://localhost:4200/#/ui/empty-state/inside-a-table</example-url>\n * <example-url>http://localhost:4200/#/ui/empty-state/with-custom-icon-actions</example-url>\n */\n@Component({\n selector: 'cngx-empty-state',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'cngx-empty-state',\n role: 'status',\n 'aria-live': 'polite',\n '[attr.aria-labelledby]': 'titleId',\n '[attr.aria-describedby]': 'description() ? descriptionId : null',\n '[attr.hidden]': 'shouldHide() || null',\n },\n template: `\n <div class=\"cngx-empty-state__icon-slot\">\n <ng-content select=\"[cngxEmptyStateIcon]\" />\n </div>\n <svg\n class=\"cngx-empty-state__default-icon\"\n aria-hidden=\"true\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M21 8V21H3V8\" />\n <path d=\"M1 3h22v5H1z\" />\n <path d=\"M10 12h4\" />\n </svg>\n <ng-content select=\"[cngxEmptyStateIllustration]\" />\n <h3 [id]=\"titleId\" class=\"cngx-empty-state__title\">{{ title() }}</h3>\n @if (description()) {\n <p [id]=\"descriptionId\" class=\"cngx-empty-state__description\">\n {{ description() }}\n </p>\n }\n <div class=\"cngx-empty-state__actions\">\n <ng-content select=\"[cngxEmptyStateAction]\" />\n </div>\n <ng-content select=\"[cngxEmptyStateSecondary]\" />\n `,\n styleUrls: ['./empty-state.component.css'],\n})\nexport class CngxEmptyState {\n private readonly uid = nextUid('cngx-empty');\n\n /** Primary message - what state the user is in. */\n readonly title = input.required<string>();\n\n /** Supporting detail - clarifies context and suggests next steps. */\n readonly description = input<string | undefined>(undefined);\n\n /** Bind an async state - auto-hides when data is not empty. */\n readonly state = input<CngxAsyncState<unknown> | undefined>(undefined);\n\n /** @internal - hidden when state is bound and data is not empty or still loading. */\n protected readonly shouldHide = computed(() => {\n const s = this.state();\n if (!s) {\n return false;\n }\n // Skeleton owns the loading phase; defer until data resolves.\n return s.isLoading() || !s.isEmpty();\n });\n\n /** @internal */\n protected readonly titleId = `${this.uid}-title`;\n /** @internal */\n protected readonly descriptionId = `${this.uid}-desc`;\n}\n","/**\n * @module @cngx/ui/empty-state\n */\n\nexport { CngxEmptyState } from './empty-state.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;MAgDU,cAAc,CAAA;AACR,IAAA,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC;;AAGnC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAGhC,IAAA,WAAW,GAAG,KAAK,CAAqB,SAAS,kFAAC;;AAGlD,IAAA,KAAK,G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