@skdx/web-components-blocks 0.34.0 → 0.36.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.
Files changed (168) hide show
  1. package/custom-elements.json +5076 -294
  2. package/dist/chat-composer/ChatComposer.cjs +41 -0
  3. package/dist/chat-composer/ChatComposer.d.cts +125 -0
  4. package/dist/chat-composer/ChatComposer.d.ts +125 -0
  5. package/dist/chat-composer/ChatComposer.js +41 -0
  6. package/dist/chat-composer/index.cjs +1 -0
  7. package/dist/chat-composer/index.d.cts +1 -0
  8. package/dist/chat-composer/index.d.ts +1 -0
  9. package/dist/chat-composer/index.js +1 -0
  10. package/dist/chat-message/ChatMessage.cjs +26 -0
  11. package/dist/chat-message/ChatMessage.d.cts +74 -0
  12. package/dist/chat-message/ChatMessage.d.ts +74 -0
  13. package/dist/chat-message/ChatMessage.js +26 -0
  14. package/dist/chat-message/index.cjs +1 -0
  15. package/dist/chat-message/index.d.cts +1 -0
  16. package/dist/chat-message/index.d.ts +1 -0
  17. package/dist/chat-message/index.js +1 -0
  18. package/dist/comment/Comment.cjs +26 -0
  19. package/dist/comment/Comment.d.cts +66 -0
  20. package/dist/comment/Comment.d.ts +66 -0
  21. package/dist/comment/Comment.js +26 -0
  22. package/dist/comment/index.cjs +1 -0
  23. package/dist/comment/index.d.cts +1 -0
  24. package/dist/comment/index.d.ts +1 -0
  25. package/dist/comment/index.js +1 -0
  26. package/dist/comment-thread/CommentThread.cjs +27 -0
  27. package/dist/comment-thread/CommentThread.d.cts +67 -0
  28. package/dist/comment-thread/CommentThread.d.ts +67 -0
  29. package/dist/comment-thread/CommentThread.js +27 -0
  30. package/dist/comment-thread/index.cjs +1 -0
  31. package/dist/comment-thread/index.d.cts +1 -0
  32. package/dist/comment-thread/index.d.ts +1 -0
  33. package/dist/comment-thread/index.js +1 -0
  34. package/dist/confirm-dialog/ConfirmDialog.cjs +38 -0
  35. package/dist/confirm-dialog/ConfirmDialog.d.cts +101 -0
  36. package/dist/confirm-dialog/ConfirmDialog.d.ts +101 -0
  37. package/dist/confirm-dialog/ConfirmDialog.js +38 -0
  38. package/dist/confirm-dialog/index.cjs +1 -0
  39. package/dist/confirm-dialog/index.d.cts +1 -0
  40. package/dist/confirm-dialog/index.d.ts +1 -0
  41. package/dist/confirm-dialog/index.js +1 -0
  42. package/dist/conversation-list/ConversationList.cjs +52 -0
  43. package/dist/conversation-list/ConversationList.d.cts +124 -0
  44. package/dist/conversation-list/ConversationList.d.ts +124 -0
  45. package/dist/conversation-list/ConversationList.js +52 -0
  46. package/dist/conversation-list/index.cjs +1 -0
  47. package/dist/conversation-list/index.d.cts +1 -0
  48. package/dist/conversation-list/index.d.ts +1 -0
  49. package/dist/conversation-list/index.js +1 -0
  50. package/dist/empty-state/EmptyState.cjs +29 -0
  51. package/dist/empty-state/EmptyState.d.cts +69 -0
  52. package/dist/empty-state/EmptyState.d.ts +69 -0
  53. package/dist/empty-state/EmptyState.js +29 -0
  54. package/dist/empty-state/index.cjs +1 -0
  55. package/dist/empty-state/index.d.cts +1 -0
  56. package/dist/empty-state/index.d.ts +1 -0
  57. package/dist/empty-state/index.js +1 -0
  58. package/dist/filter-bar/FilterBar.cjs +44 -0
  59. package/dist/filter-bar/FilterBar.d.cts +110 -0
  60. package/dist/filter-bar/FilterBar.d.ts +110 -0
  61. package/dist/filter-bar/FilterBar.js +44 -0
  62. package/dist/filter-bar/index.cjs +1 -0
  63. package/dist/filter-bar/index.d.cts +1 -0
  64. package/dist/filter-bar/index.d.ts +1 -0
  65. package/dist/filter-bar/index.js +1 -0
  66. package/dist/forgot-password-page/ForgotPasswordPage.cjs +57 -0
  67. package/dist/forgot-password-page/ForgotPasswordPage.d.cts +95 -0
  68. package/dist/forgot-password-page/ForgotPasswordPage.d.ts +95 -0
  69. package/dist/forgot-password-page/ForgotPasswordPage.js +57 -0
  70. package/dist/forgot-password-page/index.cjs +1 -0
  71. package/dist/forgot-password-page/index.d.cts +1 -0
  72. package/dist/forgot-password-page/index.d.ts +1 -0
  73. package/dist/forgot-password-page/index.js +1 -0
  74. package/dist/form-section/FormSection.cjs +28 -0
  75. package/dist/form-section/FormSection.d.cts +63 -0
  76. package/dist/form-section/FormSection.d.ts +63 -0
  77. package/dist/form-section/FormSection.js +28 -0
  78. package/dist/form-section/index.cjs +1 -0
  79. package/dist/form-section/index.d.cts +1 -0
  80. package/dist/form-section/index.d.ts +1 -0
  81. package/dist/form-section/index.js +1 -0
  82. package/dist/index.cjs +1 -1
  83. package/dist/index.d.cts +19 -0
  84. package/dist/index.d.ts +19 -0
  85. package/dist/index.js +1 -1
  86. package/dist/internal/slots.cjs +1 -1
  87. package/dist/internal/slots.d.cts +2 -0
  88. package/dist/internal/slots.d.ts +2 -0
  89. package/dist/internal/slots.js +1 -1
  90. package/dist/notification-center/NotificationCenter.cjs +74 -0
  91. package/dist/notification-center/NotificationCenter.d.cts +147 -0
  92. package/dist/notification-center/NotificationCenter.d.ts +147 -0
  93. package/dist/notification-center/NotificationCenter.js +74 -0
  94. package/dist/notification-center/index.cjs +1 -0
  95. package/dist/notification-center/index.d.cts +1 -0
  96. package/dist/notification-center/index.d.ts +1 -0
  97. package/dist/notification-center/index.js +1 -0
  98. package/dist/onboarding-checklist/OnboardingChecklist.cjs +55 -0
  99. package/dist/onboarding-checklist/OnboardingChecklist.d.cts +89 -0
  100. package/dist/onboarding-checklist/OnboardingChecklist.d.ts +89 -0
  101. package/dist/onboarding-checklist/OnboardingChecklist.js +55 -0
  102. package/dist/onboarding-checklist/index.cjs +1 -0
  103. package/dist/onboarding-checklist/index.d.cts +1 -0
  104. package/dist/onboarding-checklist/index.d.ts +1 -0
  105. package/dist/onboarding-checklist/index.js +1 -0
  106. package/dist/page-container/PageContainer.cjs +5 -5
  107. package/dist/page-container/PageContainer.js +2 -2
  108. package/dist/reset-password-page/ResetPasswordPage.cjs +59 -0
  109. package/dist/reset-password-page/ResetPasswordPage.d.cts +104 -0
  110. package/dist/reset-password-page/ResetPasswordPage.d.ts +104 -0
  111. package/dist/reset-password-page/ResetPasswordPage.js +59 -0
  112. package/dist/reset-password-page/index.cjs +1 -0
  113. package/dist/reset-password-page/index.d.cts +1 -0
  114. package/dist/reset-password-page/index.d.ts +1 -0
  115. package/dist/reset-password-page/index.js +1 -0
  116. package/dist/sign-up-page/SignUpPage.cjs +97 -0
  117. package/dist/sign-up-page/SignUpPage.d.cts +133 -0
  118. package/dist/sign-up-page/SignUpPage.d.ts +133 -0
  119. package/dist/sign-up-page/SignUpPage.js +97 -0
  120. package/dist/sign-up-page/index.cjs +1 -0
  121. package/dist/sign-up-page/index.d.cts +1 -0
  122. package/dist/sign-up-page/index.d.ts +1 -0
  123. package/dist/sign-up-page/index.js +1 -0
  124. package/dist/stat-card/StatCard.cjs +61 -0
  125. package/dist/stat-card/StatCard.d.cts +90 -0
  126. package/dist/stat-card/StatCard.d.ts +90 -0
  127. package/dist/stat-card/StatCard.js +61 -0
  128. package/dist/stat-card/index.cjs +1 -0
  129. package/dist/stat-card/index.d.cts +1 -0
  130. package/dist/stat-card/index.d.ts +1 -0
  131. package/dist/stat-card/index.js +1 -0
  132. package/dist/usage-card/UsageCard.cjs +42 -0
  133. package/dist/usage-card/UsageCard.d.cts +81 -0
  134. package/dist/usage-card/UsageCard.d.ts +81 -0
  135. package/dist/usage-card/UsageCard.js +42 -0
  136. package/dist/usage-card/index.cjs +1 -0
  137. package/dist/usage-card/index.d.cts +1 -0
  138. package/dist/usage-card/index.d.ts +1 -0
  139. package/dist/usage-card/index.js +1 -0
  140. package/dist/usage-card/usage.cjs +1 -0
  141. package/dist/usage-card/usage.d.cts +18 -0
  142. package/dist/usage-card/usage.d.ts +18 -0
  143. package/dist/usage-card/usage.js +1 -0
  144. package/dist/user-menu/UserMenu.cjs +30 -0
  145. package/dist/user-menu/UserMenu.d.cts +84 -0
  146. package/dist/user-menu/UserMenu.d.ts +84 -0
  147. package/dist/user-menu/UserMenu.js +30 -0
  148. package/dist/user-menu/index.cjs +1 -0
  149. package/dist/user-menu/index.d.cts +1 -0
  150. package/dist/user-menu/index.d.ts +1 -0
  151. package/dist/user-menu/index.js +1 -0
  152. package/dist/verification-page/VerificationPage.cjs +61 -0
  153. package/dist/verification-page/VerificationPage.d.cts +149 -0
  154. package/dist/verification-page/VerificationPage.d.ts +149 -0
  155. package/dist/verification-page/VerificationPage.js +61 -0
  156. package/dist/verification-page/index.cjs +1 -0
  157. package/dist/verification-page/index.d.cts +1 -0
  158. package/dist/verification-page/index.d.ts +1 -0
  159. package/dist/verification-page/index.js +1 -0
  160. package/dist/workspace-switcher/WorkspaceSwitcher.cjs +69 -0
  161. package/dist/workspace-switcher/WorkspaceSwitcher.d.cts +165 -0
  162. package/dist/workspace-switcher/WorkspaceSwitcher.d.ts +165 -0
  163. package/dist/workspace-switcher/WorkspaceSwitcher.js +69 -0
  164. package/dist/workspace-switcher/index.cjs +1 -0
  165. package/dist/workspace-switcher/index.d.cts +1 -0
  166. package/dist/workspace-switcher/index.d.ts +1 -0
  167. package/dist/workspace-switcher/index.js +1 -0
  168. package/package.json +272 -6
@@ -0,0 +1 @@
1
+ export { SkdxForgotPasswordPage, type SkdxForgotPasswordDetail } from './ForgotPasswordPage.js';
@@ -0,0 +1 @@
1
+ import{SkdxForgotPasswordPage as t}from"./ForgotPasswordPage.js";export{t as SkdxForgotPasswordPage};
@@ -0,0 +1,28 @@
1
+ "use strict";var l=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var b=(i,e)=>{for(var t in e)l(i,t,{get:e[t],enumerable:!0})},k=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of v(e))!x.call(i,r)&&r!==t&&l(i,r,{get:()=>e[r],enumerable:!(n=m(e,r))||n.enumerable});return i};var $=i=>k(l({},"__esModule",{value:!0}),i),o=(i,e,t,n)=>{for(var r=n>1?void 0:n?m(e,t):e,c=i.length-1,p;c>=0;c--)(p=i[c])&&(r=(n?p(e,t,r):p(r))||r);return n&&r&&l(e,t,r),r};var _={};b(_,{SkdxFormSection:()=>s});module.exports=$(_);var d=require("lit"),a=require("lit/decorators.js"),f=require("../internal/define.cjs"),g=require("../internal/slots.cjs"),T=require("@skdx/web-components/heading"),L=require("@skdx/web-components/text");var y="data-skdx-form-section-generated",h=0;function u(i,e,t){t===void 0?i.removeAttribute(e):i.setAttribute(e,t)}var s=class extends d.LitElement{constructor(){super(...arguments);this.headingLevel=2;this.titleId=`skdx-form-section-title-${++h}`;this.descriptionId=`skdx-form-section-description-${h}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-labelledby",this.titleId),queueMicrotask(()=>this.requestUpdate())}region(t){return this.querySelector(`.skdx-form-section__${t}`)}hasSlotted(t){return this.querySelector(`[slot="${t}"], [data-skdx-slot="${t}"]`)!==null}updated(){u(this,"data-variant",this.variant),u(this,"aria-describedby",this.description?this.descriptionId:void 0),(0,g.placeSlotted)(this,y,{actions:this.region("footer")},this.region("content"))}render(){return d.html`
2
+ <div
3
+ class="skdx-form-section__header"
4
+ data-skdx-form-section-generated
5
+ >
6
+ <skdx-heading
7
+ class="skdx-form-section__title"
8
+ as=${`h${this.headingLevel}`}
9
+ id=${this.titleId}
10
+ >${this.title??""}</skdx-heading
11
+ >
12
+ ${this.description?d.html`<skdx-text
13
+ class="skdx-form-section__description"
14
+ as="p"
15
+ .tone=${"muted"}
16
+ id=${this.descriptionId}
17
+ >${this.description}</skdx-text
18
+ >`:d.nothing}
19
+ </div>
20
+ <div
21
+ class="skdx-form-section__content"
22
+ data-skdx-form-section-generated
23
+ ></div>
24
+ ${this.hasSlotted("actions")?d.html`<div
25
+ class="skdx-form-section__footer"
26
+ data-skdx-form-section-generated
27
+ ></div>`:d.nothing}
28
+ `}};o([(0,a.property)({type:String})],s.prototype,"title",2),o([(0,a.property)({type:String})],s.prototype,"description",2),o([(0,a.property)({type:Number,attribute:"heading-level"})],s.prototype,"headingLevel",2),o([(0,a.property)({type:String})],s.prototype,"variant",2),s=o([(0,f.customElement)("skdx-form-section","form-section","root")],s);0&&(module.exports={SkdxFormSection});
@@ -0,0 +1,63 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/heading';
3
+ import '@skdx/web-components/text';
4
+ /**
5
+ * Titled group inside a larger form: a heading, supporting text, the group's
6
+ * fields and a footer for the group's own actions, composing Heading and Text
7
+ * around consumer-supplied fields.
8
+ *
9
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
10
+ * targets: `.skdx-form-section` on the host, then `__header`, `__title`,
11
+ * `__description`, `__content` and `__footer`. `data-variant` sits on the host
12
+ * for the skin to read.
13
+ *
14
+ * @example
15
+ * ```html
16
+ * <skdx-form-section
17
+ * title="Billing address"
18
+ * description="Used for invoices and receipts."
19
+ * >
20
+ * <skdx-text-field label="Street"></skdx-text-field>
21
+ * <skdx-button slot="actions">Save</skdx-button>
22
+ * </skdx-form-section>
23
+ * ```
24
+ *
25
+ * @slot - The group's fields, rendered into the content region.
26
+ * @slot actions - Save, cancel or other controls rendered in the footer below the fields.
27
+ */
28
+ export declare class SkdxFormSection extends LitElement {
29
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
30
+ createRenderRoot(): HTMLElement | DocumentFragment;
31
+ /** Heading text naming the group, rendered into a derived Heading that names the section. */
32
+ title: string;
33
+ /**
34
+ * Supporting copy rendered below the title, explaining the group's fields.
35
+ * @default undefined — no description region renders and `aria-describedby` is omitted.
36
+ */
37
+ description?: string | undefined;
38
+ /**
39
+ * Outline level of the derived title heading, lowered or raised to fit the surrounding form outline.
40
+ * @default 2
41
+ */
42
+ headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
43
+ /**
44
+ * Layout rung written to `data-variant`; `bordered` draws a bounded panel and `split` places the header beside the content.
45
+ * @default undefined — plain, stacked layout.
46
+ */
47
+ variant?: 'bordered' | 'split' | (string & {}) | undefined;
48
+ /** Generated title id, published as the section's `aria-labelledby`. */
49
+ private readonly titleId;
50
+ /** Generated description id, published as the section's `aria-describedby`. */
51
+ private readonly descriptionId;
52
+ connectedCallback(): void;
53
+ private region;
54
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
55
+ private hasSlotted;
56
+ protected updated(): void;
57
+ render(): TemplateResult;
58
+ }
59
+ declare global {
60
+ interface HTMLElementTagNameMap {
61
+ 'skdx-form-section': SkdxFormSection;
62
+ }
63
+ }
@@ -0,0 +1,63 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/heading';
3
+ import '@skdx/web-components/text';
4
+ /**
5
+ * Titled group inside a larger form: a heading, supporting text, the group's
6
+ * fields and a footer for the group's own actions, composing Heading and Text
7
+ * around consumer-supplied fields.
8
+ *
9
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
10
+ * targets: `.skdx-form-section` on the host, then `__header`, `__title`,
11
+ * `__description`, `__content` and `__footer`. `data-variant` sits on the host
12
+ * for the skin to read.
13
+ *
14
+ * @example
15
+ * ```html
16
+ * <skdx-form-section
17
+ * title="Billing address"
18
+ * description="Used for invoices and receipts."
19
+ * >
20
+ * <skdx-text-field label="Street"></skdx-text-field>
21
+ * <skdx-button slot="actions">Save</skdx-button>
22
+ * </skdx-form-section>
23
+ * ```
24
+ *
25
+ * @slot - The group's fields, rendered into the content region.
26
+ * @slot actions - Save, cancel or other controls rendered in the footer below the fields.
27
+ */
28
+ export declare class SkdxFormSection extends LitElement {
29
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
30
+ createRenderRoot(): HTMLElement | DocumentFragment;
31
+ /** Heading text naming the group, rendered into a derived Heading that names the section. */
32
+ title: string;
33
+ /**
34
+ * Supporting copy rendered below the title, explaining the group's fields.
35
+ * @default undefined — no description region renders and `aria-describedby` is omitted.
36
+ */
37
+ description?: string | undefined;
38
+ /**
39
+ * Outline level of the derived title heading, lowered or raised to fit the surrounding form outline.
40
+ * @default 2
41
+ */
42
+ headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
43
+ /**
44
+ * Layout rung written to `data-variant`; `bordered` draws a bounded panel and `split` places the header beside the content.
45
+ * @default undefined — plain, stacked layout.
46
+ */
47
+ variant?: 'bordered' | 'split' | (string & {}) | undefined;
48
+ /** Generated title id, published as the section's `aria-labelledby`. */
49
+ private readonly titleId;
50
+ /** Generated description id, published as the section's `aria-describedby`. */
51
+ private readonly descriptionId;
52
+ connectedCallback(): void;
53
+ private region;
54
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
55
+ private hasSlotted;
56
+ protected updated(): void;
57
+ render(): TemplateResult;
58
+ }
59
+ declare global {
60
+ interface HTMLElementTagNameMap {
61
+ 'skdx-form-section': SkdxFormSection;
62
+ }
63
+ }
@@ -0,0 +1,28 @@
1
+ var u=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var d=(s,t,e,n)=>{for(var r=n>1?void 0:n?f(t,e):t,a=s.length-1,l;a>=0;a--)(l=s[a])&&(r=(n?l(t,e,r):l(r))||r);return n&&r&&u(t,e,r),r};import{html as c,LitElement as g,nothing as p}from"lit";import{property as o}from"lit/decorators.js";import{customElement as v}from"../internal/define.js";import{placeSlotted as x}from"../internal/slots.js";import"@skdx/web-components/heading";import"@skdx/web-components/text";var b="data-skdx-form-section-generated",m=0;function h(s,t,e){e===void 0?s.removeAttribute(t):s.setAttribute(t,e)}var i=class extends g{constructor(){super(...arguments);this.headingLevel=2;this.titleId=`skdx-form-section-title-${++m}`;this.descriptionId=`skdx-form-section-description-${m}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-labelledby",this.titleId),queueMicrotask(()=>this.requestUpdate())}region(e){return this.querySelector(`.skdx-form-section__${e}`)}hasSlotted(e){return this.querySelector(`[slot="${e}"], [data-skdx-slot="${e}"]`)!==null}updated(){h(this,"data-variant",this.variant),h(this,"aria-describedby",this.description?this.descriptionId:void 0),x(this,b,{actions:this.region("footer")},this.region("content"))}render(){return c`
2
+ <div
3
+ class="skdx-form-section__header"
4
+ data-skdx-form-section-generated
5
+ >
6
+ <skdx-heading
7
+ class="skdx-form-section__title"
8
+ as=${`h${this.headingLevel}`}
9
+ id=${this.titleId}
10
+ >${this.title??""}</skdx-heading
11
+ >
12
+ ${this.description?c`<skdx-text
13
+ class="skdx-form-section__description"
14
+ as="p"
15
+ .tone=${"muted"}
16
+ id=${this.descriptionId}
17
+ >${this.description}</skdx-text
18
+ >`:p}
19
+ </div>
20
+ <div
21
+ class="skdx-form-section__content"
22
+ data-skdx-form-section-generated
23
+ ></div>
24
+ ${this.hasSlotted("actions")?c`<div
25
+ class="skdx-form-section__footer"
26
+ data-skdx-form-section-generated
27
+ ></div>`:p}
28
+ `}};d([o({type:String})],i.prototype,"title",2),d([o({type:String})],i.prototype,"description",2),d([o({type:Number,attribute:"heading-level"})],i.prototype,"headingLevel",2),d([o({type:String})],i.prototype,"variant",2),i=d([v("skdx-form-section","form-section","root")],i);export{i as SkdxFormSection};
@@ -0,0 +1 @@
1
+ "use strict";var t=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var i=(r,o)=>{for(var m in o)t(r,m,{get:o[m],enumerable:!0})},k=(r,o,m,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of d(o))!f.call(r,e)&&e!==m&&t(r,e,{get:()=>o[e],enumerable:!(x=c(o,e))||x.enumerable});return r};var n=r=>k(t({},"__esModule",{value:!0}),r);var p={};i(p,{SkdxFormSection:()=>S.SkdxFormSection});module.exports=n(p);var S=require("./FormSection.cjs");0&&(module.exports={SkdxFormSection});
@@ -0,0 +1 @@
1
+ export { SkdxFormSection } from './FormSection.cjs';
@@ -0,0 +1 @@
1
+ export { SkdxFormSection } from './FormSection.js';
@@ -0,0 +1 @@
1
+ import{SkdxFormSection as e}from"./FormSection.js";export{e as SkdxFormSection};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var d=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var p=(a,e)=>{for(var o in e)d(a,o,{get:e[o],enumerable:!0})},m=(a,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!k.call(a,r)&&r!==o&&d(a,r,{get:()=>e[r],enumerable:!(n=S(e,r))||n.enumerable});return a};var y=a=>m(d({},"__esModule",{value:!0}),a);var P={};p(P,{SkdxDashboardLayout:()=>i.SkdxDashboardLayout,SkdxPageContainer:()=>x.SkdxPageContainer,SkdxSignInPage:()=>t.SkdxSignInPage,defaultProviderLabel:()=>t.defaultProviderLabel});module.exports=y(P);var i=require("./dashboard-layout/index.cjs"),x=require("./page-container/index.cjs"),t=require("./sign-in-page/index.cjs");0&&(module.exports={SkdxDashboardLayout,SkdxPageContainer,SkdxSignInPage,defaultProviderLabel});
1
+ "use strict";var i=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var N=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},U=(t,e,r,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of F(e))!L.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(x=v(e,o))||x.enumerable});return t};var B=t=>U(i({},"__esModule",{value:!0}),t);var O={};N(O,{SkdxChatComposer:()=>P.SkdxChatComposer,SkdxChatMessage:()=>h.SkdxChatMessage,SkdxComment:()=>g.SkdxComment,SkdxCommentThread:()=>l.SkdxCommentThread,SkdxConfirmDialog:()=>p.SkdxConfirmDialog,SkdxConversationList:()=>c.SkdxConversationList,SkdxDashboardLayout:()=>d.SkdxDashboardLayout,SkdxEmptyState:()=>k.SkdxEmptyState,SkdxFilterBar:()=>C.SkdxFilterBar,SkdxForgotPasswordPage:()=>b.SkdxForgotPasswordPage,SkdxFormSection:()=>m.SkdxFormSection,SkdxNotificationCenter:()=>y.SkdxNotificationCenter,SkdxOnboardingChecklist:()=>s.SkdxOnboardingChecklist,SkdxPageContainer:()=>S.SkdxPageContainer,SkdxResetPasswordPage:()=>w.SkdxResetPasswordPage,SkdxSignInPage:()=>a.SkdxSignInPage,SkdxSignUpPage:()=>I.SkdxSignUpPage,SkdxStatCard:()=>n.SkdxStatCard,SkdxUsageCard:()=>f.SkdxUsageCard,SkdxUserMenu:()=>D.SkdxUserMenu,SkdxVerificationPage:()=>V.SkdxVerificationPage,SkdxWorkspaceSwitcher:()=>u.SkdxWorkspaceSwitcher,defaultProviderLabel:()=>a.defaultProviderLabel});module.exports=B(O);var d=require("./dashboard-layout/index.cjs"),S=require("./page-container/index.cjs"),a=require("./sign-in-page/index.cjs"),p=require("./confirm-dialog/index.cjs"),k=require("./empty-state/index.cjs"),n=require("./stat-card/index.cjs"),m=require("./form-section/index.cjs"),s=require("./onboarding-checklist/index.cjs"),f=require("./usage-card/index.cjs"),C=require("./filter-bar/index.cjs"),g=require("./comment/index.cjs"),l=require("./comment-thread/index.cjs"),y=require("./notification-center/index.cjs"),c=require("./conversation-list/index.cjs"),h=require("./chat-message/index.cjs"),D=require("./user-menu/index.cjs"),P=require("./chat-composer/index.cjs"),u=require("./workspace-switcher/index.cjs"),I=require("./sign-up-page/index.cjs"),b=require("./forgot-password-page/index.cjs"),w=require("./reset-password-page/index.cjs"),V=require("./verification-page/index.cjs");0&&(module.exports={SkdxChatComposer,SkdxChatMessage,SkdxComment,SkdxCommentThread,SkdxConfirmDialog,SkdxConversationList,SkdxDashboardLayout,SkdxEmptyState,SkdxFilterBar,SkdxForgotPasswordPage,SkdxFormSection,SkdxNotificationCenter,SkdxOnboardingChecklist,SkdxPageContainer,SkdxResetPasswordPage,SkdxSignInPage,SkdxSignUpPage,SkdxStatCard,SkdxUsageCard,SkdxUserMenu,SkdxVerificationPage,SkdxWorkspaceSwitcher,defaultProviderLabel});
package/dist/index.d.cts CHANGED
@@ -1,3 +1,22 @@
1
1
  export { SkdxDashboardLayout, type SkdxDashboardNavigationItem } from './dashboard-layout/index.cjs';
2
2
  export { SkdxPageContainer, type SkdxPageContainerBreadcrumb } from './page-container/index.cjs';
3
3
  export { defaultProviderLabel, SkdxSignInPage, type SkdxSignInDetail, type SkdxSignInProvider, } from './sign-in-page/index.cjs';
4
+ export { SkdxConfirmDialog } from './confirm-dialog/index.cjs';
5
+ export { SkdxEmptyState } from './empty-state/index.cjs';
6
+ export { SkdxStatCard } from './stat-card/index.cjs';
7
+ export { SkdxFormSection } from './form-section/index.cjs';
8
+ export { SkdxOnboardingChecklist, type SkdxOnboardingChecklistItem, type SkdxOnboardingChecklistItemState, } from './onboarding-checklist/index.cjs';
9
+ export { SkdxUsageCard } from './usage-card/index.cjs';
10
+ export { SkdxFilterBar, type SkdxFilterBarFilter } from './filter-bar/index.cjs';
11
+ export { SkdxComment } from './comment/index.cjs';
12
+ export { SkdxCommentThread } from './comment-thread/index.cjs';
13
+ export { SkdxNotificationCenter, type SkdxNotificationCenterItem, type SkdxNotificationCenterReadChangeDetail, type SkdxNotificationCenterSelectDetail, } from './notification-center/index.cjs';
14
+ export { SkdxConversationList, type SkdxConversationListItem, type SkdxConversationListValueChangeDetail, } from './conversation-list/index.cjs';
15
+ export { SkdxChatMessage } from './chat-message/index.cjs';
16
+ export { SkdxUserMenu } from './user-menu/index.cjs';
17
+ export { SkdxChatComposer, type SkdxChatComposerSendDetail, type SkdxChatComposerSubmitKey, type SkdxChatComposerValueChangeDetail, } from './chat-composer/index.cjs';
18
+ export { SkdxWorkspaceSwitcher, type SkdxWorkspaceSwitcherItem, type SkdxWorkspaceSwitcherValueChangeDetail, } from './workspace-switcher/index.cjs';
19
+ export { SkdxSignUpPage, type SkdxSignUpDetail } from './sign-up-page/index.cjs';
20
+ export { SkdxForgotPasswordPage, type SkdxForgotPasswordDetail } from './forgot-password-page/index.cjs';
21
+ export { SkdxResetPasswordPage, type SkdxResetPasswordDetail } from './reset-password-page/index.cjs';
22
+ export { SkdxVerificationPage, type SkdxVerificationDetail, type SkdxVerificationValueChangeDetail, } from './verification-page/index.cjs';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,22 @@
1
1
  export { SkdxDashboardLayout, type SkdxDashboardNavigationItem } from './dashboard-layout/index.js';
2
2
  export { SkdxPageContainer, type SkdxPageContainerBreadcrumb } from './page-container/index.js';
3
3
  export { defaultProviderLabel, SkdxSignInPage, type SkdxSignInDetail, type SkdxSignInProvider, } from './sign-in-page/index.js';
4
+ export { SkdxConfirmDialog } from './confirm-dialog/index.js';
5
+ export { SkdxEmptyState } from './empty-state/index.js';
6
+ export { SkdxStatCard } from './stat-card/index.js';
7
+ export { SkdxFormSection } from './form-section/index.js';
8
+ export { SkdxOnboardingChecklist, type SkdxOnboardingChecklistItem, type SkdxOnboardingChecklistItemState, } from './onboarding-checklist/index.js';
9
+ export { SkdxUsageCard } from './usage-card/index.js';
10
+ export { SkdxFilterBar, type SkdxFilterBarFilter } from './filter-bar/index.js';
11
+ export { SkdxComment } from './comment/index.js';
12
+ export { SkdxCommentThread } from './comment-thread/index.js';
13
+ export { SkdxNotificationCenter, type SkdxNotificationCenterItem, type SkdxNotificationCenterReadChangeDetail, type SkdxNotificationCenterSelectDetail, } from './notification-center/index.js';
14
+ export { SkdxConversationList, type SkdxConversationListItem, type SkdxConversationListValueChangeDetail, } from './conversation-list/index.js';
15
+ export { SkdxChatMessage } from './chat-message/index.js';
16
+ export { SkdxUserMenu } from './user-menu/index.js';
17
+ export { SkdxChatComposer, type SkdxChatComposerSendDetail, type SkdxChatComposerSubmitKey, type SkdxChatComposerValueChangeDetail, } from './chat-composer/index.js';
18
+ export { SkdxWorkspaceSwitcher, type SkdxWorkspaceSwitcherItem, type SkdxWorkspaceSwitcherValueChangeDetail, } from './workspace-switcher/index.js';
19
+ export { SkdxSignUpPage, type SkdxSignUpDetail } from './sign-up-page/index.js';
20
+ export { SkdxForgotPasswordPage, type SkdxForgotPasswordDetail } from './forgot-password-page/index.js';
21
+ export { SkdxResetPasswordPage, type SkdxResetPasswordDetail } from './reset-password-page/index.js';
22
+ export { SkdxVerificationPage, type SkdxVerificationDetail, type SkdxVerificationValueChangeDetail, } from './verification-page/index.js';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{SkdxDashboardLayout as r}from"./dashboard-layout/index.js";import{SkdxPageContainer as t}from"./page-container/index.js";import{defaultProviderLabel as n,SkdxSignInPage as i}from"./sign-in-page/index.js";export{r as SkdxDashboardLayout,t as SkdxPageContainer,i as SkdxSignInPage,n as defaultProviderLabel};
1
+ import{SkdxDashboardLayout as o}from"./dashboard-layout/index.js";import{SkdxPageContainer as a}from"./page-container/index.js";import{defaultProviderLabel as x,SkdxSignInPage as d}from"./sign-in-page/index.js";import{SkdxConfirmDialog as p}from"./confirm-dialog/index.js";import{SkdxEmptyState as n}from"./empty-state/index.js";import{SkdxStatCard as s}from"./stat-card/index.js";import{SkdxFormSection as C}from"./form-section/index.js";import{SkdxOnboardingChecklist as l}from"./onboarding-checklist/index.js";import{SkdxUsageCard as c}from"./usage-card/index.js";import{SkdxFilterBar as D}from"./filter-bar/index.js";import{SkdxComment as u}from"./comment/index.js";import{SkdxCommentThread as b}from"./comment-thread/index.js";import{SkdxNotificationCenter as V}from"./notification-center/index.js";import{SkdxConversationList as F}from"./conversation-list/index.js";import{SkdxChatMessage as N}from"./chat-message/index.js";import{SkdxUserMenu as B}from"./user-menu/index.js";import{SkdxChatComposer as R}from"./chat-composer/index.js";import{SkdxWorkspaceSwitcher as M}from"./workspace-switcher/index.js";import{SkdxSignUpPage as K}from"./sign-up-page/index.js";import{SkdxForgotPasswordPage as j}from"./forgot-password-page/index.js";import{SkdxResetPasswordPage as z}from"./reset-password-page/index.js";import{SkdxVerificationPage as G}from"./verification-page/index.js";export{R as SkdxChatComposer,N as SkdxChatMessage,u as SkdxComment,b as SkdxCommentThread,p as SkdxConfirmDialog,F as SkdxConversationList,o as SkdxDashboardLayout,n as SkdxEmptyState,D as SkdxFilterBar,j as SkdxForgotPasswordPage,C as SkdxFormSection,V as SkdxNotificationCenter,l as SkdxOnboardingChecklist,a as SkdxPageContainer,z as SkdxResetPasswordPage,d as SkdxSignInPage,K as SkdxSignUpPage,s as SkdxStatCard,c as SkdxUsageCard,B as SkdxUserMenu,G as SkdxVerificationPage,M as SkdxWorkspaceSwitcher,x as defaultProviderLabel};
@@ -1 +1 @@
1
- "use strict";var d=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var E=(n,e)=>{for(var o in e)d(n,o,{get:e[o],enumerable:!0})},a=(n,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!u.call(n,t)&&t!==o&&d(n,t,{get:()=>e[t],enumerable:!(l=c(e,t))||l.enumerable});return n};var m=n=>a(d({},"__esModule",{value:!0}),n);var f={};E(f,{placeSlotted:()=>p});module.exports=m(f);function p(n,e,o,l){for(let t of Array.from(n.childNodes)){if(t.nodeType===Node.COMMENT_NODE)continue;if(t.nodeType!==Node.ELEMENT_NODE){t.textContent?.trim()&&l?.append(t);continue}let i=t;if(i.hasAttribute(e))continue;let r=i.getAttribute("slot");(r===null?l:o[r]??null)?.append(i)}}0&&(module.exports={placeSlotted});
1
+ "use strict";var d=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var m=(n,t)=>{for(var e in t)d(n,e,{get:t[e],enumerable:!0})},c=(n,t,e,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of a(t))!u.call(n,o)&&o!==e&&d(n,o,{get:()=>t[o],enumerable:!(l=E(t,o))||l.enumerable});return n};var N=n=>c(d({},"__esModule",{value:!0}),n);var p={};m(p,{hasUnslottedChild:()=>f,placeSlotted:()=>T});module.exports=N(p);function T(n,t,e,l){for(let o of Array.from(n.childNodes)){if(o.nodeType===Node.COMMENT_NODE)continue;if(o.nodeType!==Node.ELEMENT_NODE){o.textContent?.trim()&&l?.append(o);continue}let i=o;if(i.hasAttribute(t))continue;let r=i.getAttribute("slot"),s=r===null?l:e[r]??null;s&&(r!==null&&s.shadowRoot&&(i.removeAttribute("slot"),i.setAttribute("data-skdx-slot",r)),s.append(i))}}function f(n,t){return Array.from(n.childNodes).some(e=>e.nodeType===Node.ELEMENT_NODE?!e.hasAttribute(t)&&!e.hasAttribute("slot"):e.nodeType===Node.TEXT_NODE&&!!e.textContent?.trim())}0&&(module.exports={hasUnslottedChild,placeSlotted});
@@ -7,3 +7,5 @@
7
7
  * @internal
8
8
  */
9
9
  export declare function placeSlotted(host: HTMLElement, marker: string, regions: Readonly<Record<string, HTMLElement | null>>, fallback: HTMLElement | null): void;
10
+ /** Whether the host holds consumer content for the default slot: an element without a `slot` name that the block did not generate, or non-blank text. */
11
+ export declare function hasUnslottedChild(host: HTMLElement, marker: string): boolean;
@@ -7,3 +7,5 @@
7
7
  * @internal
8
8
  */
9
9
  export declare function placeSlotted(host: HTMLElement, marker: string, regions: Readonly<Record<string, HTMLElement | null>>, fallback: HTMLElement | null): void;
10
+ /** Whether the host holds consumer content for the default slot: an element without a `slot` name that the block did not generate, or non-blank text. */
11
+ export declare function hasUnslottedChild(host: HTMLElement, marker: string): boolean;
@@ -1 +1 @@
1
- function c(l,i,d,n){for(let e of Array.from(l.childNodes)){if(e.nodeType===Node.COMMENT_NODE)continue;if(e.nodeType!==Node.ELEMENT_NODE){e.textContent?.trim()&&n?.append(e);continue}let t=e;if(t.hasAttribute(i))continue;let o=t.getAttribute("slot");(o===null?n:d[o]??null)?.append(t)}}export{c as placeSlotted};
1
+ function d(l,i,t,s){for(let e of Array.from(l.childNodes)){if(e.nodeType===Node.COMMENT_NODE)continue;if(e.nodeType!==Node.ELEMENT_NODE){e.textContent?.trim()&&s?.append(e);continue}let n=e;if(n.hasAttribute(i))continue;let o=n.getAttribute("slot"),r=o===null?s:t[o]??null;r&&(o!==null&&r.shadowRoot&&(n.removeAttribute("slot"),n.setAttribute("data-skdx-slot",o)),r.append(n))}}function E(l,i){return Array.from(l.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE?!t.hasAttribute(i)&&!t.hasAttribute("slot"):t.nodeType===Node.TEXT_NODE&&!!t.textContent?.trim())}export{E as hasUnslottedChild,d as placeSlotted};
@@ -0,0 +1,74 @@
1
+ "use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var b=(d,a)=>{for(var e in a)c(d,e,{get:a[e],enumerable:!0})},f=(d,a,e,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of k(a))!g.call(d,i)&&i!==e&&c(d,i,{get:()=>a[i],enumerable:!(n=u(a,i))||n.enumerable});return d};var L=d=>f(c({},"__esModule",{value:!0}),d),s=(d,a,e,n)=>{for(var i=n>1?void 0:n?u(a,e):a,l=d.length-1,p;l>=0;l--)(p=d[l])&&(i=(n?p(a,e,i):p(i))||i);return n&&i&&c(a,e,i),i};var _={};b(_,{SkdxNotificationCenter:()=>r});module.exports=L(_);var t=require("lit"),o=require("lit/decorators.js"),v=require("../internal/define.cjs"),m=require("../internal/events.cjs"),h=require("../internal/slots.cjs"),R=require("@skdx/web-components/button"),T=require("@skdx/web-components/heading"),A=require("@skdx/web-components/skeleton"),O=require("@skdx/web-components/time"),S=require("../empty-state/index.cjs");var x="data-skdx-notification-center-generated",E=["select","read-change","mark-all-read"],$=[0,1,2],y=0,r=class extends t.LitElement{constructor(){super(...arguments);this.title="Notifications";this.headingLevel=2;this.markAllReadLabel="Mark all as read";this.markReadLabel="Mark as read";this.markUnreadLabel="Mark as unread";this.emptyTitle="No notifications";this.loading=!1;this.titleId=`skdx-notification-center-title-${++y}`;this.gated=new Map;this.markAllRead=()=>{(0,m.emit)(this,"mark-all-read")}}createRenderRoot(){return this}addEventListener(e,n,i){super.addEventListener(e,n,i),this.countListener(e,1)}removeEventListener(e,n,i){super.removeEventListener(e,n,i),this.countListener(e,-1)}countListener(e,n){E.includes(e)&&(this.gated.set(e,Math.max(0,(this.gated.get(e)??0)+n)),this.requestUpdate())}handles(e){return(this.gated.get(e)??0)>0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-labelledby",this.titleId),queueMicrotask(()=>this.requestUpdate())}region(e){return this.querySelector(`.skdx-notification-center__${e}`)}hasSlotted(e){return this.querySelector(`[slot="${e}"], [data-skdx-slot="${e}"]`)!==null}updated(){this.setAttribute("aria-busy",String(this.loading)),(0,h.placeSlotted)(this,x,{actions:this.region("actions")},null)}itemBody(e){return t.html`<span class="skdx-notification-center__item-title">${e.title}</span> ${e.description?t.html`<span class="skdx-notification-center__description">${e.description}</span>`:t.nothing}
2
+ ${e.timestamp===void 0?t.nothing:t.html`<skdx-time
3
+ class="skdx-notification-center__time"
4
+ relative
5
+ .value=${e.timestamp}
6
+ .now=${this.now}
7
+ ></skdx-time>`}`}notificationRow(e){let n=this.handles("select"),i=this.handles("read-change");return t.html`<li
8
+ class="skdx-notification-center__item"
9
+ ?data-read=${e.read===!0}
10
+ >
11
+ ${this.renderLeading?t.html`<div
12
+ class="skdx-notification-center__leading"
13
+ aria-hidden="true"
14
+ >
15
+ ${this.renderLeading(e)}
16
+ </div>`:t.nothing}
17
+ ${n?t.html`<button
18
+ class="skdx-notification-center__body"
19
+ type="button"
20
+ @click=${()=>{(0,m.emit)(this,"select",{item:e})}}
21
+ >
22
+ ${this.itemBody(e)}
23
+ </button>`:t.html`<div class="skdx-notification-center__body">${this.itemBody(e)}</div>`}
24
+ ${i||this.renderActions?t.html`<div class="skdx-notification-center__item-actions">
25
+ ${this.renderActions?.(e)}
26
+ ${i?t.html`<skdx-button
27
+ class="skdx-notification-center__read-toggle"
28
+ .size=${"sm"}
29
+ .variant=${"ghost"}
30
+ @click=${()=>{(0,m.emit)(this,"read-change",{item:e,read:e.read!==!0})}}
31
+ >${e.read===!0?this.markUnreadLabel:this.markReadLabel}</skdx-button
32
+ >`:t.nothing}
33
+ </div>`:t.nothing}
34
+ </li>`}content(e){return this.loading?t.html`<div
35
+ class="skdx-notification-center__loading"
36
+ aria-hidden="true"
37
+ data-skdx-notification-center-generated
38
+ >
39
+ ${$.map(()=>t.html`<skdx-skeleton .shape=${"line"}></skdx-skeleton>`)}
40
+ </div>`:e.length===0?t.html`<skdx-empty-state
41
+ class="skdx-notification-center__empty"
42
+ data-skdx-notification-center-generated
43
+ .title=${this.emptyTitle}
44
+ .description=${this.emptyDescription}
45
+ .size=${"sm"}
46
+ ></skdx-empty-state>`:t.html`<ul
47
+ class="skdx-notification-center__list"
48
+ data-skdx-notification-center-generated
49
+ >
50
+ ${e.map(n=>this.notificationRow(n))}
51
+ </ul>`}render(){let e=this.notifications??[],n=e.filter(l=>l.read!==!0).length,i=this.handles("mark-all-read");return t.html`
52
+ <div
53
+ class="skdx-notification-center__header"
54
+ data-skdx-notification-center-generated
55
+ >
56
+ <skdx-heading
57
+ class="skdx-notification-center__title"
58
+ as=${`h${this.headingLevel}`}
59
+ id=${this.titleId}
60
+ >${this.title}</skdx-heading
61
+ >
62
+ ${this.hasSlotted("actions")||i?t.html`<div class="skdx-notification-center__actions">
63
+ ${i?t.html`<skdx-button
64
+ class="skdx-notification-center__mark-all-read"
65
+ .size=${"sm"}
66
+ .variant=${"ghost"}
67
+ ?disabled=${n===0}
68
+ @click=${this.markAllRead}
69
+ >${this.markAllReadLabel}</skdx-button
70
+ >`:t.nothing}
71
+ </div>`:t.nothing}
72
+ </div>
73
+ ${this.content(e)}
74
+ `}};s([(0,o.property)({attribute:!1})],r.prototype,"notifications",2),s([(0,o.property)({type:String})],r.prototype,"title",2),s([(0,o.property)({type:Number,attribute:"heading-level"})],r.prototype,"headingLevel",2),s([(0,o.property)({type:String,attribute:"mark-all-read-label"})],r.prototype,"markAllReadLabel",2),s([(0,o.property)({type:String,attribute:"mark-read-label"})],r.prototype,"markReadLabel",2),s([(0,o.property)({type:String,attribute:"mark-unread-label"})],r.prototype,"markUnreadLabel",2),s([(0,o.property)({type:String,attribute:"empty-title"})],r.prototype,"emptyTitle",2),s([(0,o.property)({type:String,attribute:"empty-description"})],r.prototype,"emptyDescription",2),s([(0,o.property)({type:Boolean})],r.prototype,"loading",2),s([(0,o.property)({attribute:!1})],r.prototype,"now",2),s([(0,o.property)({attribute:!1})],r.prototype,"renderLeading",2),s([(0,o.property)({attribute:!1})],r.prototype,"renderActions",2),r=s([(0,v.customElement)("skdx-notification-center","notification-center","root")],r);0&&(module.exports={SkdxNotificationCenter});
@@ -0,0 +1,147 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/button';
3
+ import '@skdx/web-components/heading';
4
+ import '@skdx/web-components/skeleton';
5
+ import '@skdx/web-components/time';
6
+ import '../empty-state/index.cjs';
7
+ /** One entry of a `<skdx-notification-center>` list — a single notification. */
8
+ export interface SkdxNotificationCenterItem {
9
+ /** Identifier carried back in every event detail, naming which notification was acted on. */
10
+ id: string;
11
+ /** Headline text rendered as the notification's title. */
12
+ title: string;
13
+ /** Supporting copy rendered below the title. @default undefined — no description renders for this item. */
14
+ description?: string;
15
+ /** Instant the notification occurred, rendered into a derived Time. @default undefined — no timestamp renders for this item. */
16
+ timestamp?: Date | string;
17
+ /** Whether the notification has been read, driving `data-read` and the toggle label. @default false */
18
+ read?: boolean;
19
+ }
20
+ /** What a `select` event carries: the notification whose body was activated. */
21
+ export interface SkdxNotificationCenterSelectDetail {
22
+ /** The notification the user activated. */
23
+ item: SkdxNotificationCenterItem;
24
+ }
25
+ /** What a `read-change` event carries: the notification and the read state it is moving to. */
26
+ export interface SkdxNotificationCenterReadChangeDetail {
27
+ /** The notification whose toggle was activated. */
28
+ item: SkdxNotificationCenterItem;
29
+ /** The read state the notification is moving to, the opposite of the one it holds. */
30
+ read: boolean;
31
+ }
32
+ /**
33
+ * Notification list block: read/unread state, timestamps, a leading visual and
34
+ * per-item and mark-all-read actions, rendered as panel content for a Popover,
35
+ * Drawer, Dialog or page — the block owns no overlay of its own.
36
+ *
37
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
38
+ * targets: `.skdx-notification-center` on the host, then `__header`,
39
+ * `__title`, `__actions`, `__mark-all-read`, `__loading`, `__empty`, `__list`,
40
+ * `__item`, `__leading`, `__body`, `__item-title`, `__description`, `__time`,
41
+ * `__item-actions` and `__read-toggle`. `data-read` sits on an item that has
42
+ * been read.
43
+ *
44
+ * @example
45
+ * ```html
46
+ * <skdx-notification-center id="inbox"></skdx-notification-center>
47
+ * <script>
48
+ * const inbox = document.getElementById('inbox');
49
+ * inbox.notifications = [{ id: 'a', title: 'Build finished' }];
50
+ * inbox.addEventListener('select', (event) => open(event.detail.item));
51
+ * </script>
52
+ * ```
53
+ *
54
+ * @slot actions - Header controls rendered beside the mark-all-read button.
55
+ * @fires select - Fires with `{ item }` when a notification body is activated; the body is a button only while a `select` listener is bound on this element.
56
+ * @fires read-change - Fires with `{ item, read }` when a per-item toggle is activated; no toggle renders until a `read-change` listener is bound on this element.
57
+ * @fires mark-all-read - Fires when the mark-all-read button is activated; no such button renders until a `mark-all-read` listener is bound on this element.
58
+ */
59
+ export declare class SkdxNotificationCenter extends LitElement {
60
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
61
+ createRenderRoot(): HTMLElement | DocumentFragment;
62
+ /** The notifications to list, in render order, each with an id, a title and read state. */
63
+ notifications: readonly SkdxNotificationCenterItem[];
64
+ /**
65
+ * Heading text, rendered into a derived Heading that names the section.
66
+ * @default 'Notifications'
67
+ */
68
+ title: string;
69
+ /**
70
+ * Outline level of the derived title heading, lowered or raised to fit the surrounding outline.
71
+ * @default 2
72
+ */
73
+ headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
74
+ /**
75
+ * Text of the mark-all-read button, which renders only while the event is listened for.
76
+ * @default 'Mark all as read'
77
+ */
78
+ markAllReadLabel: string;
79
+ /**
80
+ * Text of a per-item toggle while its notification is unread.
81
+ * @default 'Mark as read'
82
+ */
83
+ markReadLabel: string;
84
+ /**
85
+ * Text of a per-item toggle while its notification is read.
86
+ * @default 'Mark as unread'
87
+ */
88
+ markUnreadLabel: string;
89
+ /**
90
+ * Heading text of the derived EmptyState shown when there is nothing to list.
91
+ * @default 'No notifications'
92
+ */
93
+ emptyTitle: string;
94
+ /**
95
+ * Supporting copy of the derived EmptyState shown when there is nothing to list.
96
+ * @default undefined — the empty state renders its heading alone.
97
+ */
98
+ emptyDescription?: string | undefined;
99
+ /**
100
+ * Swaps the list for a skeleton placeholder region while the notifications load.
101
+ * @default false
102
+ */
103
+ loading: boolean;
104
+ /**
105
+ * Reference instant every item timestamp measures its relative label from.
106
+ * @default undefined — each Time reads the instant once at render.
107
+ */
108
+ now?: Date | number | undefined;
109
+ /**
110
+ * Renders a decorative avatar or icon beside one notification, always `aria-hidden`.
111
+ * @default undefined — no leading region renders.
112
+ */
113
+ renderLeading?: ((item: SkdxNotificationCenterItem) => unknown) | undefined;
114
+ /**
115
+ * Renders extra controls beside one notification's read/unread toggle.
116
+ * @default undefined — no extra per-item controls render.
117
+ */
118
+ renderActions?: ((item: SkdxNotificationCenterItem) => unknown) | undefined;
119
+ /** Generated title id, published as the section's `aria-labelledby`. */
120
+ private readonly titleId;
121
+ /** How many listeners each gated event holds, so the anatomy it drives renders only while one is bound. */
122
+ private readonly gated;
123
+ /** @internal Standard DOM registration, counted so a listener-gated region knows it has one. */
124
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
125
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
126
+ /** @internal Standard DOM removal, counted so a listener-gated region knows it lost one. */
127
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
128
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
129
+ private countListener;
130
+ /** Whether the consumer is listening for `type` on this element, which is what renders its control. */
131
+ private handles;
132
+ connectedCallback(): void;
133
+ private region;
134
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
135
+ private hasSlotted;
136
+ protected updated(): void;
137
+ private readonly markAllRead;
138
+ private itemBody;
139
+ private notificationRow;
140
+ private content;
141
+ render(): TemplateResult;
142
+ }
143
+ declare global {
144
+ interface HTMLElementTagNameMap {
145
+ 'skdx-notification-center': SkdxNotificationCenter;
146
+ }
147
+ }