@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.
Files changed (168) hide show
  1. package/custom-elements.json +5072 -290
  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/dashboard-layout/DashboardLayout.cjs +6 -7
  51. package/dist/dashboard-layout/DashboardLayout.js +9 -10
  52. package/dist/empty-state/EmptyState.cjs +29 -0
  53. package/dist/empty-state/EmptyState.d.cts +69 -0
  54. package/dist/empty-state/EmptyState.d.ts +69 -0
  55. package/dist/empty-state/EmptyState.js +29 -0
  56. package/dist/empty-state/index.cjs +1 -0
  57. package/dist/empty-state/index.d.cts +1 -0
  58. package/dist/empty-state/index.d.ts +1 -0
  59. package/dist/empty-state/index.js +1 -0
  60. package/dist/filter-bar/FilterBar.cjs +44 -0
  61. package/dist/filter-bar/FilterBar.d.cts +110 -0
  62. package/dist/filter-bar/FilterBar.d.ts +110 -0
  63. package/dist/filter-bar/FilterBar.js +44 -0
  64. package/dist/filter-bar/index.cjs +1 -0
  65. package/dist/filter-bar/index.d.cts +1 -0
  66. package/dist/filter-bar/index.d.ts +1 -0
  67. package/dist/filter-bar/index.js +1 -0
  68. package/dist/forgot-password-page/ForgotPasswordPage.cjs +57 -0
  69. package/dist/forgot-password-page/ForgotPasswordPage.d.cts +95 -0
  70. package/dist/forgot-password-page/ForgotPasswordPage.d.ts +95 -0
  71. package/dist/forgot-password-page/ForgotPasswordPage.js +57 -0
  72. package/dist/forgot-password-page/index.cjs +1 -0
  73. package/dist/forgot-password-page/index.d.cts +1 -0
  74. package/dist/forgot-password-page/index.d.ts +1 -0
  75. package/dist/forgot-password-page/index.js +1 -0
  76. package/dist/form-section/FormSection.cjs +28 -0
  77. package/dist/form-section/FormSection.d.cts +63 -0
  78. package/dist/form-section/FormSection.d.ts +63 -0
  79. package/dist/form-section/FormSection.js +28 -0
  80. package/dist/form-section/index.cjs +1 -0
  81. package/dist/form-section/index.d.cts +1 -0
  82. package/dist/form-section/index.d.ts +1 -0
  83. package/dist/form-section/index.js +1 -0
  84. package/dist/index.cjs +1 -1
  85. package/dist/index.d.cts +19 -0
  86. package/dist/index.d.ts +19 -0
  87. package/dist/index.js +1 -1
  88. package/dist/internal/slots.cjs +1 -1
  89. package/dist/internal/slots.d.cts +2 -0
  90. package/dist/internal/slots.d.ts +2 -0
  91. package/dist/internal/slots.js +1 -1
  92. package/dist/notification-center/NotificationCenter.cjs +74 -0
  93. package/dist/notification-center/NotificationCenter.d.cts +147 -0
  94. package/dist/notification-center/NotificationCenter.d.ts +147 -0
  95. package/dist/notification-center/NotificationCenter.js +74 -0
  96. package/dist/notification-center/index.cjs +1 -0
  97. package/dist/notification-center/index.d.cts +1 -0
  98. package/dist/notification-center/index.d.ts +1 -0
  99. package/dist/notification-center/index.js +1 -0
  100. package/dist/onboarding-checklist/OnboardingChecklist.cjs +55 -0
  101. package/dist/onboarding-checklist/OnboardingChecklist.d.cts +89 -0
  102. package/dist/onboarding-checklist/OnboardingChecklist.d.ts +89 -0
  103. package/dist/onboarding-checklist/OnboardingChecklist.js +55 -0
  104. package/dist/onboarding-checklist/index.cjs +1 -0
  105. package/dist/onboarding-checklist/index.d.cts +1 -0
  106. package/dist/onboarding-checklist/index.d.ts +1 -0
  107. package/dist/onboarding-checklist/index.js +1 -0
  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 +63 -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 +63 -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 +275 -9
@@ -0,0 +1,69 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/heading';
3
+ import '@skdx/web-components/text';
4
+ /** Whether a consumer child bound for the default region is still waiting to be placed. */
5
+ /**
6
+ * Placeholder block for a region with nothing to show — no content yet, no
7
+ * results, first use, or disconnected — composing a Heading, a Text
8
+ * description and consumer-supplied icon and actions.
9
+ *
10
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
11
+ * targets: `.skdx-empty-state` on the host, then `__icon`, `__title`,
12
+ * `__description`, `__content` and `__actions`. `data-size` and `data-align`
13
+ * sit on the host for the skin to read.
14
+ *
15
+ * @example
16
+ * ```html
17
+ * <skdx-empty-state
18
+ * title="No invoices yet"
19
+ * description="Invoices you create will show up here."
20
+ * >
21
+ * <svg slot="icon"></svg>
22
+ * <skdx-button slot="actions">Create invoice</skdx-button>
23
+ * </skdx-empty-state>
24
+ * ```
25
+ *
26
+ * @slot - Extra content rendered between the description and the actions region.
27
+ * @slot icon - Decorative illustration or glyph rendered above the title.
28
+ * @slot actions - Primary and secondary controls rendered below the content.
29
+ */
30
+ export declare class SkdxEmptyState extends LitElement {
31
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
32
+ createRenderRoot(): HTMLElement | DocumentFragment;
33
+ /** Heading text naming the empty region, rendered into a derived Heading. */
34
+ title: string;
35
+ /**
36
+ * Supporting copy rendered below the title, explaining why the region is empty.
37
+ * @default undefined — no description region renders.
38
+ */
39
+ description?: string | undefined;
40
+ /**
41
+ * Outline level of the derived title heading, lowered or raised to fit the surrounding outline.
42
+ * @default 3
43
+ */
44
+ headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
45
+ /**
46
+ * Visual size rung, written to `data-size` on the host; the skin scales the icon, spacing and title by it.
47
+ * @default undefined — the skin's own default size.
48
+ */
49
+ size?: 'sm' | 'md' | 'lg' | (string & {}) | undefined;
50
+ /**
51
+ * Text and content alignment rung, written to `data-align` on the host.
52
+ * @default 'center'
53
+ */
54
+ align: 'center' | 'start' | (string & {});
55
+ /** Generated title id, so a consumer can name a surrounding landmark with it. */
56
+ private readonly titleId;
57
+ connectedCallback(): void;
58
+ private region;
59
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
60
+ private hasSlotted;
61
+ private get hasContent();
62
+ protected updated(): void;
63
+ render(): TemplateResult;
64
+ }
65
+ declare global {
66
+ interface HTMLElementTagNameMap {
67
+ 'skdx-empty-state': SkdxEmptyState;
68
+ }
69
+ }
@@ -0,0 +1,29 @@
1
+ var m=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var i=(l,n,e,d)=>{for(var s=d>1?void 0:d?g(n,e):n,h=l.length-1,p;h>=0;h--)(p=l[h])&&(s=(d?p(n,e,s):p(s))||s);return d&&s&&m(n,e,s),s};import{html as a,LitElement as u,nothing as o}from"lit";import{property as r}from"lit/decorators.js";import{customElement as v}from"../internal/define.js";import{hasUnslottedChild as y,placeSlotted as x}from"../internal/slots.js";import"@skdx/web-components/heading";import"@skdx/web-components/text";var c="data-skdx-empty-state-generated",k=0,t=class extends u{constructor(){super(...arguments);this.headingLevel=3;this.align="center";this.titleId=`skdx-empty-state-title-${++k}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>this.requestUpdate())}region(e){return this.querySelector(`.skdx-empty-state__${e}`)}hasSlotted(e){return this.querySelector(`[slot="${e}"]`)!==null}get hasContent(){return y(this,c)||(this.region("content")?.hasChildNodes()??!1)}updated(){this.setAttribute("data-align",this.align),this.size===void 0?this.removeAttribute("data-size"):this.setAttribute("data-size",this.size),x(this,c,{icon:this.region("icon"),actions:this.region("actions")},this.region("content"))}render(){return a`
2
+ ${this.hasSlotted("icon")?a`<div
3
+ class="skdx-empty-state__icon"
4
+ aria-hidden="true"
5
+ data-skdx-empty-state-generated
6
+ ></div>`:o}
7
+ <skdx-heading
8
+ class="skdx-empty-state__title"
9
+ as=${`h${this.headingLevel}`}
10
+ id=${this.titleId}
11
+ data-skdx-empty-state-generated
12
+ >${this.title??""}</skdx-heading
13
+ >
14
+ ${this.description?a`<skdx-text
15
+ class="skdx-empty-state__description"
16
+ as="p"
17
+ .tone=${"muted"}
18
+ data-skdx-empty-state-generated
19
+ >${this.description}</skdx-text
20
+ >`:o}
21
+ ${this.hasContent?a`<div
22
+ class="skdx-empty-state__content"
23
+ data-skdx-empty-state-generated
24
+ ></div>`:o}
25
+ ${this.hasSlotted("actions")?a`<div
26
+ class="skdx-empty-state__actions"
27
+ data-skdx-empty-state-generated
28
+ ></div>`:o}
29
+ `}};i([r({type:String})],t.prototype,"title",2),i([r({type:String})],t.prototype,"description",2),i([r({type:Number,attribute:"heading-level"})],t.prototype,"headingLevel",2),i([r({type:String})],t.prototype,"size",2),i([r({type:String})],t.prototype,"align",2),t=i([v("skdx-empty-state","empty-state","root")],t);export{t as SkdxEmptyState};
@@ -0,0 +1 @@
1
+ "use strict";var p=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var o in t)p(e,o,{get:t[o],enumerable:!0})},k=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of a(t))!d.call(e,m)&&m!==o&&p(e,m,{get:()=>t[m],enumerable:!(r=S(t,m))||r.enumerable});return e};var y=e=>k(p({},"__esModule",{value:!0}),e);var E={};f(E,{SkdxEmptyState:()=>x.SkdxEmptyState});module.exports=y(E);var x=require("./EmptyState.cjs");0&&(module.exports={SkdxEmptyState});
@@ -0,0 +1 @@
1
+ export { SkdxEmptyState } from './EmptyState.cjs';
@@ -0,0 +1 @@
1
+ export { SkdxEmptyState } from './EmptyState.js';
@@ -0,0 +1 @@
1
+ import{SkdxEmptyState as m}from"./EmptyState.js";export{m as SkdxEmptyState};
@@ -0,0 +1,44 @@
1
+ "use strict";var o=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var x=(s,r)=>{for(var e in r)o(s,e,{get:r[e],enumerable:!0})},k=(s,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of g(r))!m.call(s,a)&&a!==e&&o(s,a,{get:()=>r[a],enumerable:!(t=p(r,a))||t.enumerable});return s};var y=s=>k(o({},"__esModule",{value:!0}),s),n=(s,r,e,t)=>{for(var a=t>1?void 0:t?p(r,e):r,u=s.length-1,b;u>=0;u--)(b=s[u])&&(a=(t?b(r,e,a):b(a))||a);return t&&a&&o(r,e,a),a};var S={};x(S,{SkdxFilterBar:()=>l});module.exports=y(S);var i=require("lit"),d=require("lit/decorators.js"),f=require("../internal/define.cjs"),c=require("../internal/events.cjs"),h=require("../internal/slots.cjs"),_=require("@skdx/web-components/button"),L=require("@skdx/web-components/tag-group"),E=require("@skdx/web-components/text-field");var v="data-skdx-filter-bar-generated",l=class extends i.LitElement{constructor(){super(...arguments);this.label="Filters";this.defaultSearchValue="";this.clearSearchLabel="Clear search";this.activeFiltersLabel="Active filters";this.clearLabel="Clear filters";this.handleSearchValueChange=e=>{e.stopPropagation();let t=e.detail;this.uncontrolledSearchValue=t,this.requestUpdate(),(0,c.emit)(this,"search-value-change",{value:t}),this.syncSearchField()};this.handleRemove=e=>{e.stopPropagation();let{index:t}=e.detail,a=(this.activeFilters??[])[t];a&&(0,c.emit)(this,"remove-filter",a)};this.handleClear=()=>{(0,c.emit)(this,"clear")}}createRenderRoot(){return this}get searchText(){return this.searchValue??this.uncontrolledSearchValue??this.defaultSearchValue}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>this.requestUpdate())}region(e){return this.querySelector(`.skdx-filter-bar__${e}`)}hasSlotted(e){return this.querySelector(`[slot="${e}"]`)!==null}get hasFilters(){return(0,h.hasUnslottedChild)(this,v)||(this.region("filters")?.hasChildNodes()??!1)}syncSearchField(){let e=this.querySelector(".skdx-filter-bar__search > skdx-text-field");if(!e)return;let t=this.searchText;e.value!==t&&(e.value=t);let a=e.querySelector("input");a&&a.value!==t&&(a.value=t)}updated(){this.setAttribute("aria-label",this.label),this.syncSearchField(),(0,h.placeSlotted)(this,v,{actions:this.region("actions")},this.region("filters"))}render(){let e=this.activeFilters??[];return i.html`
2
+ ${this.searchLabel?i.html`<div
3
+ class="skdx-filter-bar__search"
4
+ data-skdx-filter-bar-generated
5
+ >
6
+ <skdx-text-field @value-change=${this.handleSearchValueChange}>
7
+ <skdx-text-field-input
8
+ type="search"
9
+ aria-label=${this.searchLabel??i.nothing}
10
+ placeholder=${this.searchPlaceholder??i.nothing}
11
+ ></skdx-text-field-input>
12
+ <skdx-text-field-clear-button
13
+ label=${this.clearSearchLabel}
14
+ ></skdx-text-field-clear-button>
15
+ </skdx-text-field>
16
+ </div>`:i.nothing}
17
+ ${this.hasFilters?i.html`<div
18
+ class="skdx-filter-bar__filters"
19
+ data-skdx-filter-bar-generated
20
+ ></div>`:i.nothing}
21
+ ${this.hasSlotted("actions")?i.html`<div
22
+ class="skdx-filter-bar__actions"
23
+ data-skdx-filter-bar-generated
24
+ ></div>`:i.nothing}
25
+ ${e.length>0?i.html`<div
26
+ class="skdx-filter-bar__active"
27
+ data-skdx-filter-bar-generated
28
+ >
29
+ <skdx-tag-group
30
+ class="skdx-filter-bar__tags"
31
+ aria-label=${this.activeFiltersLabel}
32
+ removable
33
+ .tags=${e.map(t=>({value:t.id,label:t.label}))}
34
+ @remove=${this.handleRemove}
35
+ ></skdx-tag-group>
36
+ <skdx-button
37
+ class="skdx-filter-bar__clear"
38
+ .variant=${"ghost"}
39
+ .size=${"sm"}
40
+ @click=${this.handleClear}
41
+ >${this.clearLabel}</skdx-button
42
+ >
43
+ </div>`:i.nothing}
44
+ `}};n([(0,d.property)({type:String})],l.prototype,"label",2),n([(0,d.property)({type:String,attribute:"search-label"})],l.prototype,"searchLabel",2),n([(0,d.property)({type:String,attribute:"search-placeholder"})],l.prototype,"searchPlaceholder",2),n([(0,d.property)({type:String,attribute:"search-value"})],l.prototype,"searchValue",2),n([(0,d.property)({type:String,attribute:"default-search-value"})],l.prototype,"defaultSearchValue",2),n([(0,d.property)({type:String,attribute:"clear-search-label"})],l.prototype,"clearSearchLabel",2),n([(0,d.property)({attribute:!1})],l.prototype,"activeFilters",2),n([(0,d.property)({type:String,attribute:"active-filters-label"})],l.prototype,"activeFiltersLabel",2),n([(0,d.property)({type:String,attribute:"clear-label"})],l.prototype,"clearLabel",2),l=n([(0,f.customElement)("skdx-filter-bar","filter-bar","root")],l);0&&(module.exports={SkdxFilterBar});
@@ -0,0 +1,110 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/button';
3
+ import '@skdx/web-components/tag-group';
4
+ import '@skdx/web-components/text-field';
5
+ /** One applied filter rendered as a removable tag by `<skdx-filter-bar>`. */
6
+ export interface SkdxFilterBarFilter {
7
+ /** Unique identifier, carried as the tag's value and handed back with `remove-filter`. */
8
+ id: string;
9
+ /** Text rendered on the tag and read by its remove control's accessible name. */
10
+ label: string;
11
+ }
12
+ /** Whether a consumer child bound for the filters region is still waiting to be placed. */
13
+ /**
14
+ * Filtering surface above a table, list, card grid or report: a search field,
15
+ * the consumer's filter controls, the applied filters as removable tags, and a
16
+ * clear action. Composes TextField, TagGroup and Button.
17
+ *
18
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
19
+ * targets: `.skdx-filter-bar` on the host, then `__search`, `__filters`,
20
+ * `__actions`, `__active`, `__tags` and `__clear`.
21
+ *
22
+ * @example
23
+ * ```html
24
+ * <skdx-filter-bar
25
+ * id="bar"
26
+ * search-label="Search invoices"
27
+ * >
28
+ * <skdx-select aria-label="Status"></skdx-select>
29
+ * <skdx-button slot="actions">Save view</skdx-button>
30
+ * </skdx-filter-bar>
31
+ * <script>
32
+ * document.getElementById('bar').activeFilters = [{ id: 'status', label: 'Status: Overdue' }];
33
+ * </script>
34
+ * ```
35
+ *
36
+ * @slot - The consumer's filter controls, laid out in the filters region.
37
+ * @slot actions - Controls rendered at the end of the bar, such as a "Save view" button.
38
+ * @fires search-value-change - Fires with the new text whenever the search field changes, controlled or not.
39
+ * @fires remove-filter - Fires with the removed filter when its tag's remove control is activated.
40
+ * @fires clear - Fires when the clear-filters button is activated while filters are shown.
41
+ */
42
+ export declare class SkdxFilterBar extends LitElement {
43
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
44
+ createRenderRoot(): HTMLElement | DocumentFragment;
45
+ /**
46
+ * Accessible name of the root region, written to `aria-label`.
47
+ * @default 'Filters'
48
+ */
49
+ label: string;
50
+ /**
51
+ * Accessible name of the search field; providing it renders the search region.
52
+ * @default undefined — no search region renders.
53
+ */
54
+ searchLabel?: string | undefined;
55
+ /**
56
+ * Placeholder shown in the empty search field.
57
+ * @default undefined — no placeholder renders.
58
+ */
59
+ searchPlaceholder?: string | undefined;
60
+ /**
61
+ * Current search text, for controlled usage; pair it with `search-value-change`.
62
+ * @default undefined — uncontrolled, tracking its own value internally.
63
+ */
64
+ searchValue?: string | undefined;
65
+ /**
66
+ * Initial search text, for uncontrolled usage — seeds the internally tracked value.
67
+ * @default ''
68
+ */
69
+ defaultSearchValue: string;
70
+ /**
71
+ * Accessible name of the search field's clear button.
72
+ * @default 'Clear search'
73
+ */
74
+ clearSearchLabel: string;
75
+ /**
76
+ * The applied filters, in display order, rendered as removable tags.
77
+ * @default undefined — no active region renders.
78
+ */
79
+ activeFilters?: readonly SkdxFilterBarFilter[] | undefined;
80
+ /**
81
+ * Accessible name of the active-filters tag list.
82
+ * @default 'Active filters'
83
+ */
84
+ activeFiltersLabel: string;
85
+ /**
86
+ * Text rendered on the clear-filters button.
87
+ * @default 'Clear filters'
88
+ */
89
+ clearLabel: string;
90
+ /** What the search field last reported; outranked by `searchValue` whenever the consumer controls the text. */
91
+ private uncontrolledSearchValue?;
92
+ /** The text the search field must show right now, controlled or not. */
93
+ private get searchText();
94
+ connectedCallback(): void;
95
+ private region;
96
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
97
+ private hasSlotted;
98
+ private get hasFilters();
99
+ private syncSearchField;
100
+ private readonly handleSearchValueChange;
101
+ private readonly handleRemove;
102
+ private readonly handleClear;
103
+ protected updated(): void;
104
+ render(): TemplateResult;
105
+ }
106
+ declare global {
107
+ interface HTMLElementTagNameMap {
108
+ 'skdx-filter-bar': SkdxFilterBar;
109
+ }
110
+ }
@@ -0,0 +1,110 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/button';
3
+ import '@skdx/web-components/tag-group';
4
+ import '@skdx/web-components/text-field';
5
+ /** One applied filter rendered as a removable tag by `<skdx-filter-bar>`. */
6
+ export interface SkdxFilterBarFilter {
7
+ /** Unique identifier, carried as the tag's value and handed back with `remove-filter`. */
8
+ id: string;
9
+ /** Text rendered on the tag and read by its remove control's accessible name. */
10
+ label: string;
11
+ }
12
+ /** Whether a consumer child bound for the filters region is still waiting to be placed. */
13
+ /**
14
+ * Filtering surface above a table, list, card grid or report: a search field,
15
+ * the consumer's filter controls, the applied filters as removable tags, and a
16
+ * clear action. Composes TextField, TagGroup and Button.
17
+ *
18
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
19
+ * targets: `.skdx-filter-bar` on the host, then `__search`, `__filters`,
20
+ * `__actions`, `__active`, `__tags` and `__clear`.
21
+ *
22
+ * @example
23
+ * ```html
24
+ * <skdx-filter-bar
25
+ * id="bar"
26
+ * search-label="Search invoices"
27
+ * >
28
+ * <skdx-select aria-label="Status"></skdx-select>
29
+ * <skdx-button slot="actions">Save view</skdx-button>
30
+ * </skdx-filter-bar>
31
+ * <script>
32
+ * document.getElementById('bar').activeFilters = [{ id: 'status', label: 'Status: Overdue' }];
33
+ * </script>
34
+ * ```
35
+ *
36
+ * @slot - The consumer's filter controls, laid out in the filters region.
37
+ * @slot actions - Controls rendered at the end of the bar, such as a "Save view" button.
38
+ * @fires search-value-change - Fires with the new text whenever the search field changes, controlled or not.
39
+ * @fires remove-filter - Fires with the removed filter when its tag's remove control is activated.
40
+ * @fires clear - Fires when the clear-filters button is activated while filters are shown.
41
+ */
42
+ export declare class SkdxFilterBar extends LitElement {
43
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
44
+ createRenderRoot(): HTMLElement | DocumentFragment;
45
+ /**
46
+ * Accessible name of the root region, written to `aria-label`.
47
+ * @default 'Filters'
48
+ */
49
+ label: string;
50
+ /**
51
+ * Accessible name of the search field; providing it renders the search region.
52
+ * @default undefined — no search region renders.
53
+ */
54
+ searchLabel?: string | undefined;
55
+ /**
56
+ * Placeholder shown in the empty search field.
57
+ * @default undefined — no placeholder renders.
58
+ */
59
+ searchPlaceholder?: string | undefined;
60
+ /**
61
+ * Current search text, for controlled usage; pair it with `search-value-change`.
62
+ * @default undefined — uncontrolled, tracking its own value internally.
63
+ */
64
+ searchValue?: string | undefined;
65
+ /**
66
+ * Initial search text, for uncontrolled usage — seeds the internally tracked value.
67
+ * @default ''
68
+ */
69
+ defaultSearchValue: string;
70
+ /**
71
+ * Accessible name of the search field's clear button.
72
+ * @default 'Clear search'
73
+ */
74
+ clearSearchLabel: string;
75
+ /**
76
+ * The applied filters, in display order, rendered as removable tags.
77
+ * @default undefined — no active region renders.
78
+ */
79
+ activeFilters?: readonly SkdxFilterBarFilter[] | undefined;
80
+ /**
81
+ * Accessible name of the active-filters tag list.
82
+ * @default 'Active filters'
83
+ */
84
+ activeFiltersLabel: string;
85
+ /**
86
+ * Text rendered on the clear-filters button.
87
+ * @default 'Clear filters'
88
+ */
89
+ clearLabel: string;
90
+ /** What the search field last reported; outranked by `searchValue` whenever the consumer controls the text. */
91
+ private uncontrolledSearchValue?;
92
+ /** The text the search field must show right now, controlled or not. */
93
+ private get searchText();
94
+ connectedCallback(): void;
95
+ private region;
96
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
97
+ private hasSlotted;
98
+ private get hasFilters();
99
+ private syncSearchField;
100
+ private readonly handleSearchValueChange;
101
+ private readonly handleRemove;
102
+ private readonly handleClear;
103
+ protected updated(): void;
104
+ render(): TemplateResult;
105
+ }
106
+ declare global {
107
+ interface HTMLElementTagNameMap {
108
+ 'skdx-filter-bar': SkdxFilterBar;
109
+ }
110
+ }
@@ -0,0 +1,44 @@
1
+ var p=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var i=(o,n,e,t)=>{for(var a=t>1?void 0:t?v(n,e):n,c=o.length-1,h;c>=0;c--)(h=o[c])&&(a=(t?h(n,e,a):h(a))||a);return t&&a&&p(n,e,a),a};import{html as d,LitElement as f,nothing as s}from"lit";import{property as l}from"lit/decorators.js";import{customElement as g}from"../internal/define.js";import{emit as u}from"../internal/events.js";import{hasUnslottedChild as m,placeSlotted as x}from"../internal/slots.js";import"@skdx/web-components/button";import"@skdx/web-components/tag-group";import"@skdx/web-components/text-field";var b="data-skdx-filter-bar-generated",r=class extends f{constructor(){super(...arguments);this.label="Filters";this.defaultSearchValue="";this.clearSearchLabel="Clear search";this.activeFiltersLabel="Active filters";this.clearLabel="Clear filters";this.handleSearchValueChange=e=>{e.stopPropagation();let t=e.detail;this.uncontrolledSearchValue=t,this.requestUpdate(),u(this,"search-value-change",{value:t}),this.syncSearchField()};this.handleRemove=e=>{e.stopPropagation();let{index:t}=e.detail,a=(this.activeFilters??[])[t];a&&u(this,"remove-filter",a)};this.handleClear=()=>{u(this,"clear")}}createRenderRoot(){return this}get searchText(){return this.searchValue??this.uncontrolledSearchValue??this.defaultSearchValue}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>this.requestUpdate())}region(e){return this.querySelector(`.skdx-filter-bar__${e}`)}hasSlotted(e){return this.querySelector(`[slot="${e}"]`)!==null}get hasFilters(){return m(this,b)||(this.region("filters")?.hasChildNodes()??!1)}syncSearchField(){let e=this.querySelector(".skdx-filter-bar__search > skdx-text-field");if(!e)return;let t=this.searchText;e.value!==t&&(e.value=t);let a=e.querySelector("input");a&&a.value!==t&&(a.value=t)}updated(){this.setAttribute("aria-label",this.label),this.syncSearchField(),x(this,b,{actions:this.region("actions")},this.region("filters"))}render(){let e=this.activeFilters??[];return d`
2
+ ${this.searchLabel?d`<div
3
+ class="skdx-filter-bar__search"
4
+ data-skdx-filter-bar-generated
5
+ >
6
+ <skdx-text-field @value-change=${this.handleSearchValueChange}>
7
+ <skdx-text-field-input
8
+ type="search"
9
+ aria-label=${this.searchLabel??s}
10
+ placeholder=${this.searchPlaceholder??s}
11
+ ></skdx-text-field-input>
12
+ <skdx-text-field-clear-button
13
+ label=${this.clearSearchLabel}
14
+ ></skdx-text-field-clear-button>
15
+ </skdx-text-field>
16
+ </div>`:s}
17
+ ${this.hasFilters?d`<div
18
+ class="skdx-filter-bar__filters"
19
+ data-skdx-filter-bar-generated
20
+ ></div>`:s}
21
+ ${this.hasSlotted("actions")?d`<div
22
+ class="skdx-filter-bar__actions"
23
+ data-skdx-filter-bar-generated
24
+ ></div>`:s}
25
+ ${e.length>0?d`<div
26
+ class="skdx-filter-bar__active"
27
+ data-skdx-filter-bar-generated
28
+ >
29
+ <skdx-tag-group
30
+ class="skdx-filter-bar__tags"
31
+ aria-label=${this.activeFiltersLabel}
32
+ removable
33
+ .tags=${e.map(t=>({value:t.id,label:t.label}))}
34
+ @remove=${this.handleRemove}
35
+ ></skdx-tag-group>
36
+ <skdx-button
37
+ class="skdx-filter-bar__clear"
38
+ .variant=${"ghost"}
39
+ .size=${"sm"}
40
+ @click=${this.handleClear}
41
+ >${this.clearLabel}</skdx-button
42
+ >
43
+ </div>`:s}
44
+ `}};i([l({type:String})],r.prototype,"label",2),i([l({type:String,attribute:"search-label"})],r.prototype,"searchLabel",2),i([l({type:String,attribute:"search-placeholder"})],r.prototype,"searchPlaceholder",2),i([l({type:String,attribute:"search-value"})],r.prototype,"searchValue",2),i([l({type:String,attribute:"default-search-value"})],r.prototype,"defaultSearchValue",2),i([l({type:String,attribute:"clear-search-label"})],r.prototype,"clearSearchLabel",2),i([l({attribute:!1})],r.prototype,"activeFilters",2),i([l({type:String,attribute:"active-filters-label"})],r.prototype,"activeFiltersLabel",2),i([l({type:String,attribute:"clear-label"})],r.prototype,"clearLabel",2),r=i([g("skdx-filter-bar","filter-bar","root")],r);export{r as SkdxFilterBar};
@@ -0,0 +1 @@
1
+ "use strict";var l=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var o=(e,r)=>{for(var i in r)l(e,i,{get:r[i],enumerable:!0})},p=(e,r,i,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of d(r))!k.call(e,t)&&t!==i&&l(e,t,{get:()=>r[t],enumerable:!(x=a(r,t))||x.enumerable});return e};var B=e=>p(l({},"__esModule",{value:!0}),e);var S={};o(S,{SkdxFilterBar:()=>F.SkdxFilterBar});module.exports=B(S);var F=require("./FilterBar.cjs");0&&(module.exports={SkdxFilterBar});
@@ -0,0 +1 @@
1
+ export { SkdxFilterBar, type SkdxFilterBarFilter } from './FilterBar.cjs';
@@ -0,0 +1 @@
1
+ export { SkdxFilterBar, type SkdxFilterBarFilter } from './FilterBar.js';
@@ -0,0 +1 @@
1
+ import{SkdxFilterBar as t}from"./FilterBar.js";export{t as SkdxFilterBar};
@@ -0,0 +1,57 @@
1
+ "use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var b=(o,e)=>{for(var t in e)n(o,t,{get:e[t],enumerable:!0})},v=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of x(e))!k.call(o,s)&&s!==t&&n(o,s,{get:()=>e[s],enumerable:!(a=u(e,s))||a.enumerable});return o};var $=o=>v(n({},"__esModule",{value:!0}),o),l=(o,e,t,a)=>{for(var s=a>1?void 0:a?u(e,t):e,m=o.length-1,c;m>=0;m--)(c=o[m])&&(s=(a?c(e,t,s):c(s))||s);return a&&s&&n(e,t,s),s};var E={};b(E,{SkdxForgotPasswordPage:()=>i});module.exports=$(E);var r=require("lit"),d=require("lit/decorators.js"),h=require("../internal/define.cjs"),f=require("../internal/events.cjs"),p=require("../internal/slots.cjs"),T=require("@skdx/web-components/alert"),w=require("@skdx/web-components/button"),S=require("@skdx/web-components/field"),q=require("@skdx/web-components/form"),C=require("@skdx/web-components/heading"),M=require("@skdx/web-components/text"),R=require("@skdx/web-components/text-field");var g="data-skdx-forgot-password-page-generated",y="data-skdx-forgot-password-page-content",_=0,i=class extends r.LitElement{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 a=t.target?.closest("skdx-form");if(!a)return;t.preventDefault();let s=a.querySelector('[name="email"]');(0,f.emit)(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(`[${y}]`)}get hasContent(){return(0,p.hasUnslottedChild)(this,g)||(this.contentRegion?.hasChildNodes()??!1)}updated(){(0,p.placeSlotted)(this,g,{footer:this.region("footer")},this.contentRegion)}render(){return r.html`
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?r.html`<skdx-alert
13
+ class="skdx-forgot-password-page__error"
14
+ .status=${"danger"}
15
+ >${this.error}</skdx-alert
16
+ >`:r.nothing}
17
+ ${this.description?r.html`<skdx-text
18
+ class="skdx-forgot-password-page__description"
19
+ as="p"
20
+ .tone=${"muted"}
21
+ >${this.description}</skdx-text
22
+ >`:r.nothing}
23
+ ${this.success?r.html`<skdx-alert
24
+ class="skdx-forgot-password-page__success"
25
+ .status=${"success"}
26
+ >${this.success}</skdx-alert
27
+ >`:r.html`<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?r.html`<div data-skdx-forgot-password-page-content></div>`:r.nothing}
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")?r.html`<div class="skdx-forgot-password-page__footer"></div>`:r.nothing}
56
+ </div>
57
+ `}};l([(0,d.property)({type:String})],i.prototype,"title",2),l([(0,d.property)({type:String})],i.prototype,"description",2),l([(0,d.property)({type:String})],i.prototype,"error",2),l([(0,d.property)({type:String})],i.prototype,"success",2),l([(0,d.property)({type:Boolean})],i.prototype,"pending",2),l([(0,d.property)({type:String,attribute:"email-label"})],i.prototype,"emailLabel",2),l([(0,d.property)({type:String,attribute:"submit-label"})],i.prototype,"submitLabel",2),i=l([(0,h.customElement)("skdx-forgot-password-page","forgot-password-page","root")],i);0&&(module.exports={SkdxForgotPasswordPage});
@@ -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
+ }