@skdx/web-components-blocks 0.1.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +5072 -290
- package/dist/chat-composer/ChatComposer.cjs +41 -0
- package/dist/chat-composer/ChatComposer.d.cts +125 -0
- package/dist/chat-composer/ChatComposer.d.ts +125 -0
- package/dist/chat-composer/ChatComposer.js +41 -0
- package/dist/chat-composer/index.cjs +1 -0
- package/dist/chat-composer/index.d.cts +1 -0
- package/dist/chat-composer/index.d.ts +1 -0
- package/dist/chat-composer/index.js +1 -0
- package/dist/chat-message/ChatMessage.cjs +26 -0
- package/dist/chat-message/ChatMessage.d.cts +74 -0
- package/dist/chat-message/ChatMessage.d.ts +74 -0
- package/dist/chat-message/ChatMessage.js +26 -0
- package/dist/chat-message/index.cjs +1 -0
- package/dist/chat-message/index.d.cts +1 -0
- package/dist/chat-message/index.d.ts +1 -0
- package/dist/chat-message/index.js +1 -0
- package/dist/comment/Comment.cjs +26 -0
- package/dist/comment/Comment.d.cts +66 -0
- package/dist/comment/Comment.d.ts +66 -0
- package/dist/comment/Comment.js +26 -0
- package/dist/comment/index.cjs +1 -0
- package/dist/comment/index.d.cts +1 -0
- package/dist/comment/index.d.ts +1 -0
- package/dist/comment/index.js +1 -0
- package/dist/comment-thread/CommentThread.cjs +27 -0
- package/dist/comment-thread/CommentThread.d.cts +67 -0
- package/dist/comment-thread/CommentThread.d.ts +67 -0
- package/dist/comment-thread/CommentThread.js +27 -0
- package/dist/comment-thread/index.cjs +1 -0
- package/dist/comment-thread/index.d.cts +1 -0
- package/dist/comment-thread/index.d.ts +1 -0
- package/dist/comment-thread/index.js +1 -0
- package/dist/confirm-dialog/ConfirmDialog.cjs +38 -0
- package/dist/confirm-dialog/ConfirmDialog.d.cts +101 -0
- package/dist/confirm-dialog/ConfirmDialog.d.ts +101 -0
- package/dist/confirm-dialog/ConfirmDialog.js +38 -0
- package/dist/confirm-dialog/index.cjs +1 -0
- package/dist/confirm-dialog/index.d.cts +1 -0
- package/dist/confirm-dialog/index.d.ts +1 -0
- package/dist/confirm-dialog/index.js +1 -0
- package/dist/conversation-list/ConversationList.cjs +52 -0
- package/dist/conversation-list/ConversationList.d.cts +124 -0
- package/dist/conversation-list/ConversationList.d.ts +124 -0
- package/dist/conversation-list/ConversationList.js +52 -0
- package/dist/conversation-list/index.cjs +1 -0
- package/dist/conversation-list/index.d.cts +1 -0
- package/dist/conversation-list/index.d.ts +1 -0
- package/dist/conversation-list/index.js +1 -0
- package/dist/dashboard-layout/DashboardLayout.cjs +6 -7
- package/dist/dashboard-layout/DashboardLayout.js +9 -10
- package/dist/empty-state/EmptyState.cjs +29 -0
- package/dist/empty-state/EmptyState.d.cts +69 -0
- package/dist/empty-state/EmptyState.d.ts +69 -0
- package/dist/empty-state/EmptyState.js +29 -0
- package/dist/empty-state/index.cjs +1 -0
- package/dist/empty-state/index.d.cts +1 -0
- package/dist/empty-state/index.d.ts +1 -0
- package/dist/empty-state/index.js +1 -0
- package/dist/filter-bar/FilterBar.cjs +44 -0
- package/dist/filter-bar/FilterBar.d.cts +110 -0
- package/dist/filter-bar/FilterBar.d.ts +110 -0
- package/dist/filter-bar/FilterBar.js +44 -0
- package/dist/filter-bar/index.cjs +1 -0
- package/dist/filter-bar/index.d.cts +1 -0
- package/dist/filter-bar/index.d.ts +1 -0
- package/dist/filter-bar/index.js +1 -0
- package/dist/forgot-password-page/ForgotPasswordPage.cjs +57 -0
- package/dist/forgot-password-page/ForgotPasswordPage.d.cts +95 -0
- package/dist/forgot-password-page/ForgotPasswordPage.d.ts +95 -0
- package/dist/forgot-password-page/ForgotPasswordPage.js +57 -0
- package/dist/forgot-password-page/index.cjs +1 -0
- package/dist/forgot-password-page/index.d.cts +1 -0
- package/dist/forgot-password-page/index.d.ts +1 -0
- package/dist/forgot-password-page/index.js +1 -0
- package/dist/form-section/FormSection.cjs +28 -0
- package/dist/form-section/FormSection.d.cts +63 -0
- package/dist/form-section/FormSection.d.ts +63 -0
- package/dist/form-section/FormSection.js +28 -0
- package/dist/form-section/index.cjs +1 -0
- package/dist/form-section/index.d.cts +1 -0
- package/dist/form-section/index.d.ts +1 -0
- package/dist/form-section/index.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1 -1
- package/dist/internal/slots.cjs +1 -1
- package/dist/internal/slots.d.cts +2 -0
- package/dist/internal/slots.d.ts +2 -0
- package/dist/internal/slots.js +1 -1
- package/dist/notification-center/NotificationCenter.cjs +74 -0
- package/dist/notification-center/NotificationCenter.d.cts +147 -0
- package/dist/notification-center/NotificationCenter.d.ts +147 -0
- package/dist/notification-center/NotificationCenter.js +74 -0
- package/dist/notification-center/index.cjs +1 -0
- package/dist/notification-center/index.d.cts +1 -0
- package/dist/notification-center/index.d.ts +1 -0
- package/dist/notification-center/index.js +1 -0
- package/dist/onboarding-checklist/OnboardingChecklist.cjs +55 -0
- package/dist/onboarding-checklist/OnboardingChecklist.d.cts +89 -0
- package/dist/onboarding-checklist/OnboardingChecklist.d.ts +89 -0
- package/dist/onboarding-checklist/OnboardingChecklist.js +55 -0
- package/dist/onboarding-checklist/index.cjs +1 -0
- package/dist/onboarding-checklist/index.d.cts +1 -0
- package/dist/onboarding-checklist/index.d.ts +1 -0
- package/dist/onboarding-checklist/index.js +1 -0
- package/dist/reset-password-page/ResetPasswordPage.cjs +59 -0
- package/dist/reset-password-page/ResetPasswordPage.d.cts +104 -0
- package/dist/reset-password-page/ResetPasswordPage.d.ts +104 -0
- package/dist/reset-password-page/ResetPasswordPage.js +59 -0
- package/dist/reset-password-page/index.cjs +1 -0
- package/dist/reset-password-page/index.d.cts +1 -0
- package/dist/reset-password-page/index.d.ts +1 -0
- package/dist/reset-password-page/index.js +1 -0
- package/dist/sign-up-page/SignUpPage.cjs +97 -0
- package/dist/sign-up-page/SignUpPage.d.cts +133 -0
- package/dist/sign-up-page/SignUpPage.d.ts +133 -0
- package/dist/sign-up-page/SignUpPage.js +97 -0
- package/dist/sign-up-page/index.cjs +1 -0
- package/dist/sign-up-page/index.d.cts +1 -0
- package/dist/sign-up-page/index.d.ts +1 -0
- package/dist/sign-up-page/index.js +1 -0
- package/dist/stat-card/StatCard.cjs +61 -0
- package/dist/stat-card/StatCard.d.cts +90 -0
- package/dist/stat-card/StatCard.d.ts +90 -0
- package/dist/stat-card/StatCard.js +61 -0
- package/dist/stat-card/index.cjs +1 -0
- package/dist/stat-card/index.d.cts +1 -0
- package/dist/stat-card/index.d.ts +1 -0
- package/dist/stat-card/index.js +1 -0
- package/dist/usage-card/UsageCard.cjs +42 -0
- package/dist/usage-card/UsageCard.d.cts +81 -0
- package/dist/usage-card/UsageCard.d.ts +81 -0
- package/dist/usage-card/UsageCard.js +42 -0
- package/dist/usage-card/index.cjs +1 -0
- package/dist/usage-card/index.d.cts +1 -0
- package/dist/usage-card/index.d.ts +1 -0
- package/dist/usage-card/index.js +1 -0
- package/dist/usage-card/usage.cjs +1 -0
- package/dist/usage-card/usage.d.cts +18 -0
- package/dist/usage-card/usage.d.ts +18 -0
- package/dist/usage-card/usage.js +1 -0
- package/dist/user-menu/UserMenu.cjs +30 -0
- package/dist/user-menu/UserMenu.d.cts +84 -0
- package/dist/user-menu/UserMenu.d.ts +84 -0
- package/dist/user-menu/UserMenu.js +30 -0
- package/dist/user-menu/index.cjs +1 -0
- package/dist/user-menu/index.d.cts +1 -0
- package/dist/user-menu/index.d.ts +1 -0
- package/dist/user-menu/index.js +1 -0
- package/dist/verification-page/VerificationPage.cjs +63 -0
- package/dist/verification-page/VerificationPage.d.cts +149 -0
- package/dist/verification-page/VerificationPage.d.ts +149 -0
- package/dist/verification-page/VerificationPage.js +63 -0
- package/dist/verification-page/index.cjs +1 -0
- package/dist/verification-page/index.d.cts +1 -0
- package/dist/verification-page/index.d.ts +1 -0
- package/dist/verification-page/index.js +1 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.cjs +69 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.d.cts +165 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.d.ts +165 -0
- package/dist/workspace-switcher/WorkspaceSwitcher.js +69 -0
- package/dist/workspace-switcher/index.cjs +1 -0
- package/dist/workspace-switcher/index.d.cts +1 -0
- package/dist/workspace-switcher/index.d.ts +1 -0
- package/dist/workspace-switcher/index.js +1 -0
- package/package.json +275 -9
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
import '@skdx/web-components/alert';
|
|
3
|
+
import '@skdx/web-components/button';
|
|
4
|
+
import '@skdx/web-components/field';
|
|
5
|
+
import '@skdx/web-components/form';
|
|
6
|
+
import '@skdx/web-components/heading';
|
|
7
|
+
import '@skdx/web-components/text';
|
|
8
|
+
import '@skdx/web-components/text-field';
|
|
9
|
+
/** What a `request-reset` event carries: the address the reset link should be sent to. */
|
|
10
|
+
export interface SkdxForgotPasswordDetail {
|
|
11
|
+
/** The address the reset link should be sent to, as typed. */
|
|
12
|
+
email: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Forgot-password block: a description, one email field and a submit button,
|
|
16
|
+
* replaced entirely by a success alert once the request is accepted.
|
|
17
|
+
*
|
|
18
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
19
|
+
* targets: `.skdx-forgot-password-page` on the host, then `__panel`,
|
|
20
|
+
* `__title`, `__description`, `__error`, `__success`, `__form`, `__field`,
|
|
21
|
+
* `__submit` and `__footer`.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```html
|
|
25
|
+
* <skdx-forgot-password-page
|
|
26
|
+
* id="forgot"
|
|
27
|
+
* description="We will email you a link to choose a new password."
|
|
28
|
+
* ></skdx-forgot-password-page>
|
|
29
|
+
* <script>
|
|
30
|
+
* document
|
|
31
|
+
* .getElementById('forgot')
|
|
32
|
+
* .addEventListener('request-reset', (event) => console.log(event.detail.email));
|
|
33
|
+
* </script>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @slot - Extra fields rendered inside the form, above the submit button.
|
|
37
|
+
* @slot footer - Navigation below the form, such as a link back to the sign-in page.
|
|
38
|
+
* @fires request-reset - Fires with `{ email }` when the form submits with an address that passes constraint validation.
|
|
39
|
+
*/
|
|
40
|
+
export declare class SkdxForgotPasswordPage extends LitElement {
|
|
41
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
42
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
43
|
+
/**
|
|
44
|
+
* Heading text, rendered into a derived `<h1>` that names the section.
|
|
45
|
+
* @default 'Reset your password'
|
|
46
|
+
*/
|
|
47
|
+
title: string;
|
|
48
|
+
/**
|
|
49
|
+
* Supporting copy rendered below the title, explaining what the reset link does.
|
|
50
|
+
* @default undefined — no description region renders.
|
|
51
|
+
*/
|
|
52
|
+
description?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Message rendered into a derived error Alert above the form. The block never clears it.
|
|
55
|
+
* @default undefined — no error region renders.
|
|
56
|
+
*/
|
|
57
|
+
error?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Confirmation rendered into a derived success Alert that replaces the form entirely.
|
|
60
|
+
* @default undefined — the form renders instead.
|
|
61
|
+
*/
|
|
62
|
+
success?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Marks the request in flight, making the submit button busy while the email field stays editable.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
pending: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Label of the email field the reset link is requested for.
|
|
70
|
+
* @default 'Email'
|
|
71
|
+
*/
|
|
72
|
+
emailLabel: string;
|
|
73
|
+
/**
|
|
74
|
+
* Text of the form's submit button.
|
|
75
|
+
* @default 'Send reset link'
|
|
76
|
+
*/
|
|
77
|
+
submitLabel: string;
|
|
78
|
+
/** Generated title id, published as the section's `aria-labelledby`. */
|
|
79
|
+
private readonly titleId;
|
|
80
|
+
connectedCallback(): void;
|
|
81
|
+
disconnectedCallback(): void;
|
|
82
|
+
/** Whether the consumer supplied content for `name` — still true once it has been moved in. */
|
|
83
|
+
private hasSlotted;
|
|
84
|
+
private region;
|
|
85
|
+
private get contentRegion();
|
|
86
|
+
private get hasContent();
|
|
87
|
+
protected updated(): void;
|
|
88
|
+
private readonly handleSubmit;
|
|
89
|
+
render(): TemplateResult;
|
|
90
|
+
}
|
|
91
|
+
declare global {
|
|
92
|
+
interface HTMLElementTagNameMap {
|
|
93
|
+
'skdx-forgot-password-page': SkdxForgotPasswordPage;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var u=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var r=(n,l,t,i)=>{for(var s=i>1?void 0:i?g(l,t):l,p=n.length-1,m;p>=0;p--)(m=n[p])&&(s=(i?m(l,t,s):m(s))||s);return i&&s&&u(l,t,s),s};import{html as o,LitElement as h,nothing as d}from"lit";import{property as a}from"lit/decorators.js";import{customElement as f}from"../internal/define.js";import{emit as x}from"../internal/events.js";import{hasUnslottedChild as k,placeSlotted as b}from"../internal/slots.js";import"@skdx/web-components/alert";import"@skdx/web-components/button";import"@skdx/web-components/field";import"@skdx/web-components/form";import"@skdx/web-components/heading";import"@skdx/web-components/text";import"@skdx/web-components/text-field";var c="data-skdx-forgot-password-page-generated",v="data-skdx-forgot-password-page-content",$=0,e=class extends h{constructor(){super(...arguments);this.title="Reset your password";this.pending=!1;this.emailLabel="Email";this.submitLabel="Send reset link";this.titleId=`skdx-forgot-password-page-title-${++$}`;this.handleSubmit=t=>{let i=t.target?.closest("skdx-form");if(!i)return;t.preventDefault();let s=i.querySelector('[name="email"]');x(this,"request-reset",{email:s?.value??""})}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-labelledby",this.titleId),this.addEventListener("submit",this.handleSubmit),queueMicrotask(()=>this.requestUpdate())}disconnectedCallback(){this.removeEventListener("submit",this.handleSubmit),super.disconnectedCallback()}hasSlotted(t){return this.querySelector(`[slot="${t}"]`)!==null}region(t){return this.querySelector(`.skdx-forgot-password-page__${t}`)}get contentRegion(){return this.querySelector(`[${v}]`)}get hasContent(){return k(this,c)||(this.contentRegion?.hasChildNodes()??!1)}updated(){b(this,c,{footer:this.region("footer")},this.contentRegion)}render(){return o`
|
|
2
|
+
<div
|
|
3
|
+
class="skdx-forgot-password-page__panel"
|
|
4
|
+
data-skdx-forgot-password-page-generated
|
|
5
|
+
>
|
|
6
|
+
<skdx-heading
|
|
7
|
+
class="skdx-forgot-password-page__title"
|
|
8
|
+
as="h1"
|
|
9
|
+
id=${this.titleId}
|
|
10
|
+
>${this.title}</skdx-heading
|
|
11
|
+
>
|
|
12
|
+
${this.error?o`<skdx-alert
|
|
13
|
+
class="skdx-forgot-password-page__error"
|
|
14
|
+
.status=${"danger"}
|
|
15
|
+
>${this.error}</skdx-alert
|
|
16
|
+
>`:d}
|
|
17
|
+
${this.description?o`<skdx-text
|
|
18
|
+
class="skdx-forgot-password-page__description"
|
|
19
|
+
as="p"
|
|
20
|
+
.tone=${"muted"}
|
|
21
|
+
>${this.description}</skdx-text
|
|
22
|
+
>`:d}
|
|
23
|
+
${this.success?o`<skdx-alert
|
|
24
|
+
class="skdx-forgot-password-page__success"
|
|
25
|
+
.status=${"success"}
|
|
26
|
+
>${this.success}</skdx-alert
|
|
27
|
+
>`:o`<skdx-form class="skdx-forgot-password-page__form">
|
|
28
|
+
<form>
|
|
29
|
+
<skdx-field
|
|
30
|
+
class="skdx-forgot-password-page__field"
|
|
31
|
+
label=${this.emailLabel}
|
|
32
|
+
required
|
|
33
|
+
>
|
|
34
|
+
<skdx-text-field
|
|
35
|
+
name="email"
|
|
36
|
+
type="email"
|
|
37
|
+
required
|
|
38
|
+
>
|
|
39
|
+
<skdx-text-field-input
|
|
40
|
+
type="email"
|
|
41
|
+
autocomplete="email"
|
|
42
|
+
></skdx-text-field-input>
|
|
43
|
+
</skdx-text-field>
|
|
44
|
+
</skdx-field>
|
|
45
|
+
${this.hasContent?o`<div data-skdx-forgot-password-page-content></div>`:d}
|
|
46
|
+
<skdx-button
|
|
47
|
+
class="skdx-forgot-password-page__submit"
|
|
48
|
+
type="submit"
|
|
49
|
+
?loading=${this.pending}
|
|
50
|
+
?disabled=${this.pending}
|
|
51
|
+
>${this.submitLabel}</skdx-button
|
|
52
|
+
>
|
|
53
|
+
</form>
|
|
54
|
+
</skdx-form>`}
|
|
55
|
+
${this.hasSlotted("footer")?o`<div class="skdx-forgot-password-page__footer"></div>`:d}
|
|
56
|
+
</div>
|
|
57
|
+
`}};r([a({type:String})],e.prototype,"title",2),r([a({type:String})],e.prototype,"description",2),r([a({type:String})],e.prototype,"error",2),r([a({type:String})],e.prototype,"success",2),r([a({type:Boolean})],e.prototype,"pending",2),r([a({type:String,attribute:"email-label"})],e.prototype,"emailLabel",2),r([a({type:String,attribute:"submit-label"})],e.prototype,"submitLabel",2),e=r([f("skdx-forgot-password-page","forgot-password-page","root")],e);export{e as SkdxForgotPasswordPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var k=(r,o)=>{for(var a in o)d(r,a,{get:o[a],enumerable:!0})},p=(r,o,a,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of x(o))!P.call(r,t)&&t!==a&&d(r,t,{get:()=>o[t],enumerable:!(e=g(o,t))||e.enumerable});return r};var w=r=>p(d({},"__esModule",{value:!0}),r);var F={};k(F,{SkdxForgotPasswordPage:()=>s.SkdxForgotPasswordPage});module.exports=w(F);var s=require("./ForgotPasswordPage.cjs");0&&(module.exports={SkdxForgotPasswordPage});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SkdxForgotPasswordPage, type SkdxForgotPasswordDetail } from './ForgotPasswordPage.cjs';
|
|
@@ -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 b=Object.prototype.hasOwnProperty;var x=(i,e)=>{for(var t in e)l(i,t,{get:e[t],enumerable:!0})},k=(i,e,t,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of v(e))!b.call(i,r)&&r!==t&&l(i,r,{get:()=>e[r],enumerable:!(d=m(e,r))||d.enumerable});return i};var y=i=>k(l({},"__esModule",{value:!0}),i),o=(i,e,t,d)=>{for(var r=d>1?void 0:d?m(e,t):e,c=i.length-1,p;c>=0;c--)(p=i[c])&&(r=(d?p(e,t,r):p(r))||r);return d&&r&&l(e,t,r),r};var _={};x(_,{SkdxFormSection:()=>s});module.exports=y(_);var n=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 $="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 n.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}"]`)!==null}updated(){u(this,"data-variant",this.variant),u(this,"aria-describedby",this.description?this.descriptionId:void 0),(0,g.placeSlotted)(this,$,{actions:this.region("footer")},this.region("content"))}render(){return n.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?n.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
|
+
>`:n.nothing}
|
|
19
|
+
</div>
|
|
20
|
+
<div
|
|
21
|
+
class="skdx-form-section__content"
|
|
22
|
+
data-skdx-form-section-generated
|
|
23
|
+
></div>
|
|
24
|
+
${this.hasSlotted("actions")?n.html`<div
|
|
25
|
+
class="skdx-form-section__footer"
|
|
26
|
+
data-skdx-form-section-generated
|
|
27
|
+
></div>`:n.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 n=(s,t,e,d)=>{for(var r=d>1?void 0:d?f(t,e):t,a=s.length-1,l;a>=0;a--)(l=s[a])&&(r=(d?l(t,e,r):l(r))||r);return d&&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 b}from"../internal/slots.js";import"@skdx/web-components/heading";import"@skdx/web-components/text";var x="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}"]`)!==null}updated(){h(this,"data-variant",this.variant),h(this,"aria-describedby",this.description?this.descriptionId:void 0),b(this,x,{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
|
+
`}};n([o({type:String})],i.prototype,"title",2),n([o({type:String})],i.prototype,"description",2),n([o({type:Number,attribute:"heading-level"})],i.prototype,"headingLevel",2),n([o({type:String})],i.prototype,"variant",2),i=n([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
|
|
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
|
|
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};
|
package/dist/internal/slots.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var m=(n,e)=>{for(var t in e)i(n,t,{get:e[t],enumerable:!0})},u=(n,e,t,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of d(e))!a.call(n,o)&&o!==t&&i(n,o,{get:()=>e[o],enumerable:!(l=E(e,o))||l.enumerable});return n};var N=n=>u(i({},"__esModule",{value:!0}),n);var p={};m(p,{hasUnslottedChild:()=>c,placeSlotted:()=>T});module.exports=N(p);function T(n,e,t,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 r=o;if(r.hasAttribute(e))continue;let s=r.getAttribute("slot");(s===null?l:t[s]??null)?.append(r)}}function c(n,e){return Array.from(n.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE?!t.hasAttribute(e)&&!t.hasAttribute("slot"):t.nodeType===Node.TEXT_NODE&&!!t.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;
|
package/dist/internal/slots.d.ts
CHANGED
|
@@ -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;
|
package/dist/internal/slots.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function E(n,o,e,r){for(let t of Array.from(n.childNodes)){if(t.nodeType===Node.COMMENT_NODE)continue;if(t.nodeType!==Node.ELEMENT_NODE){t.textContent?.trim()&&r?.append(t);continue}let l=t;if(l.hasAttribute(o))continue;let i=l.getAttribute("slot");(i===null?r:e[i]??null)?.append(l)}}function d(n,o){return Array.from(n.childNodes).some(e=>e.nodeType===Node.ELEMENT_NODE?!e.hasAttribute(o)&&!e.hasAttribute("slot"):e.nodeType===Node.TEXT_NODE&&!!e.textContent?.trim())}export{d as hasUnslottedChild,E 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}"]`)!==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});
|