@skdx/web-components-blocks 0.34.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 (166) hide show
  1. package/custom-elements.json +5067 -285
  2. package/dist/chat-composer/ChatComposer.cjs +41 -0
  3. package/dist/chat-composer/ChatComposer.d.cts +125 -0
  4. package/dist/chat-composer/ChatComposer.d.ts +125 -0
  5. package/dist/chat-composer/ChatComposer.js +41 -0
  6. package/dist/chat-composer/index.cjs +1 -0
  7. package/dist/chat-composer/index.d.cts +1 -0
  8. package/dist/chat-composer/index.d.ts +1 -0
  9. package/dist/chat-composer/index.js +1 -0
  10. package/dist/chat-message/ChatMessage.cjs +26 -0
  11. package/dist/chat-message/ChatMessage.d.cts +74 -0
  12. package/dist/chat-message/ChatMessage.d.ts +74 -0
  13. package/dist/chat-message/ChatMessage.js +26 -0
  14. package/dist/chat-message/index.cjs +1 -0
  15. package/dist/chat-message/index.d.cts +1 -0
  16. package/dist/chat-message/index.d.ts +1 -0
  17. package/dist/chat-message/index.js +1 -0
  18. package/dist/comment/Comment.cjs +26 -0
  19. package/dist/comment/Comment.d.cts +66 -0
  20. package/dist/comment/Comment.d.ts +66 -0
  21. package/dist/comment/Comment.js +26 -0
  22. package/dist/comment/index.cjs +1 -0
  23. package/dist/comment/index.d.cts +1 -0
  24. package/dist/comment/index.d.ts +1 -0
  25. package/dist/comment/index.js +1 -0
  26. package/dist/comment-thread/CommentThread.cjs +27 -0
  27. package/dist/comment-thread/CommentThread.d.cts +67 -0
  28. package/dist/comment-thread/CommentThread.d.ts +67 -0
  29. package/dist/comment-thread/CommentThread.js +27 -0
  30. package/dist/comment-thread/index.cjs +1 -0
  31. package/dist/comment-thread/index.d.cts +1 -0
  32. package/dist/comment-thread/index.d.ts +1 -0
  33. package/dist/comment-thread/index.js +1 -0
  34. package/dist/confirm-dialog/ConfirmDialog.cjs +38 -0
  35. package/dist/confirm-dialog/ConfirmDialog.d.cts +101 -0
  36. package/dist/confirm-dialog/ConfirmDialog.d.ts +101 -0
  37. package/dist/confirm-dialog/ConfirmDialog.js +38 -0
  38. package/dist/confirm-dialog/index.cjs +1 -0
  39. package/dist/confirm-dialog/index.d.cts +1 -0
  40. package/dist/confirm-dialog/index.d.ts +1 -0
  41. package/dist/confirm-dialog/index.js +1 -0
  42. package/dist/conversation-list/ConversationList.cjs +52 -0
  43. package/dist/conversation-list/ConversationList.d.cts +124 -0
  44. package/dist/conversation-list/ConversationList.d.ts +124 -0
  45. package/dist/conversation-list/ConversationList.js +52 -0
  46. package/dist/conversation-list/index.cjs +1 -0
  47. package/dist/conversation-list/index.d.cts +1 -0
  48. package/dist/conversation-list/index.d.ts +1 -0
  49. package/dist/conversation-list/index.js +1 -0
  50. package/dist/empty-state/EmptyState.cjs +29 -0
  51. package/dist/empty-state/EmptyState.d.cts +69 -0
  52. package/dist/empty-state/EmptyState.d.ts +69 -0
  53. package/dist/empty-state/EmptyState.js +29 -0
  54. package/dist/empty-state/index.cjs +1 -0
  55. package/dist/empty-state/index.d.cts +1 -0
  56. package/dist/empty-state/index.d.ts +1 -0
  57. package/dist/empty-state/index.js +1 -0
  58. package/dist/filter-bar/FilterBar.cjs +44 -0
  59. package/dist/filter-bar/FilterBar.d.cts +110 -0
  60. package/dist/filter-bar/FilterBar.d.ts +110 -0
  61. package/dist/filter-bar/FilterBar.js +44 -0
  62. package/dist/filter-bar/index.cjs +1 -0
  63. package/dist/filter-bar/index.d.cts +1 -0
  64. package/dist/filter-bar/index.d.ts +1 -0
  65. package/dist/filter-bar/index.js +1 -0
  66. package/dist/forgot-password-page/ForgotPasswordPage.cjs +57 -0
  67. package/dist/forgot-password-page/ForgotPasswordPage.d.cts +95 -0
  68. package/dist/forgot-password-page/ForgotPasswordPage.d.ts +95 -0
  69. package/dist/forgot-password-page/ForgotPasswordPage.js +57 -0
  70. package/dist/forgot-password-page/index.cjs +1 -0
  71. package/dist/forgot-password-page/index.d.cts +1 -0
  72. package/dist/forgot-password-page/index.d.ts +1 -0
  73. package/dist/forgot-password-page/index.js +1 -0
  74. package/dist/form-section/FormSection.cjs +28 -0
  75. package/dist/form-section/FormSection.d.cts +63 -0
  76. package/dist/form-section/FormSection.d.ts +63 -0
  77. package/dist/form-section/FormSection.js +28 -0
  78. package/dist/form-section/index.cjs +1 -0
  79. package/dist/form-section/index.d.cts +1 -0
  80. package/dist/form-section/index.d.ts +1 -0
  81. package/dist/form-section/index.js +1 -0
  82. package/dist/index.cjs +1 -1
  83. package/dist/index.d.cts +19 -0
  84. package/dist/index.d.ts +19 -0
  85. package/dist/index.js +1 -1
  86. package/dist/internal/slots.cjs +1 -1
  87. package/dist/internal/slots.d.cts +2 -0
  88. package/dist/internal/slots.d.ts +2 -0
  89. package/dist/internal/slots.js +1 -1
  90. package/dist/notification-center/NotificationCenter.cjs +74 -0
  91. package/dist/notification-center/NotificationCenter.d.cts +147 -0
  92. package/dist/notification-center/NotificationCenter.d.ts +147 -0
  93. package/dist/notification-center/NotificationCenter.js +74 -0
  94. package/dist/notification-center/index.cjs +1 -0
  95. package/dist/notification-center/index.d.cts +1 -0
  96. package/dist/notification-center/index.d.ts +1 -0
  97. package/dist/notification-center/index.js +1 -0
  98. package/dist/onboarding-checklist/OnboardingChecklist.cjs +55 -0
  99. package/dist/onboarding-checklist/OnboardingChecklist.d.cts +89 -0
  100. package/dist/onboarding-checklist/OnboardingChecklist.d.ts +89 -0
  101. package/dist/onboarding-checklist/OnboardingChecklist.js +55 -0
  102. package/dist/onboarding-checklist/index.cjs +1 -0
  103. package/dist/onboarding-checklist/index.d.cts +1 -0
  104. package/dist/onboarding-checklist/index.d.ts +1 -0
  105. package/dist/onboarding-checklist/index.js +1 -0
  106. package/dist/reset-password-page/ResetPasswordPage.cjs +59 -0
  107. package/dist/reset-password-page/ResetPasswordPage.d.cts +104 -0
  108. package/dist/reset-password-page/ResetPasswordPage.d.ts +104 -0
  109. package/dist/reset-password-page/ResetPasswordPage.js +59 -0
  110. package/dist/reset-password-page/index.cjs +1 -0
  111. package/dist/reset-password-page/index.d.cts +1 -0
  112. package/dist/reset-password-page/index.d.ts +1 -0
  113. package/dist/reset-password-page/index.js +1 -0
  114. package/dist/sign-up-page/SignUpPage.cjs +97 -0
  115. package/dist/sign-up-page/SignUpPage.d.cts +133 -0
  116. package/dist/sign-up-page/SignUpPage.d.ts +133 -0
  117. package/dist/sign-up-page/SignUpPage.js +97 -0
  118. package/dist/sign-up-page/index.cjs +1 -0
  119. package/dist/sign-up-page/index.d.cts +1 -0
  120. package/dist/sign-up-page/index.d.ts +1 -0
  121. package/dist/sign-up-page/index.js +1 -0
  122. package/dist/stat-card/StatCard.cjs +61 -0
  123. package/dist/stat-card/StatCard.d.cts +90 -0
  124. package/dist/stat-card/StatCard.d.ts +90 -0
  125. package/dist/stat-card/StatCard.js +61 -0
  126. package/dist/stat-card/index.cjs +1 -0
  127. package/dist/stat-card/index.d.cts +1 -0
  128. package/dist/stat-card/index.d.ts +1 -0
  129. package/dist/stat-card/index.js +1 -0
  130. package/dist/usage-card/UsageCard.cjs +42 -0
  131. package/dist/usage-card/UsageCard.d.cts +81 -0
  132. package/dist/usage-card/UsageCard.d.ts +81 -0
  133. package/dist/usage-card/UsageCard.js +42 -0
  134. package/dist/usage-card/index.cjs +1 -0
  135. package/dist/usage-card/index.d.cts +1 -0
  136. package/dist/usage-card/index.d.ts +1 -0
  137. package/dist/usage-card/index.js +1 -0
  138. package/dist/usage-card/usage.cjs +1 -0
  139. package/dist/usage-card/usage.d.cts +18 -0
  140. package/dist/usage-card/usage.d.ts +18 -0
  141. package/dist/usage-card/usage.js +1 -0
  142. package/dist/user-menu/UserMenu.cjs +30 -0
  143. package/dist/user-menu/UserMenu.d.cts +84 -0
  144. package/dist/user-menu/UserMenu.d.ts +84 -0
  145. package/dist/user-menu/UserMenu.js +30 -0
  146. package/dist/user-menu/index.cjs +1 -0
  147. package/dist/user-menu/index.d.cts +1 -0
  148. package/dist/user-menu/index.d.ts +1 -0
  149. package/dist/user-menu/index.js +1 -0
  150. package/dist/verification-page/VerificationPage.cjs +63 -0
  151. package/dist/verification-page/VerificationPage.d.cts +149 -0
  152. package/dist/verification-page/VerificationPage.d.ts +149 -0
  153. package/dist/verification-page/VerificationPage.js +63 -0
  154. package/dist/verification-page/index.cjs +1 -0
  155. package/dist/verification-page/index.d.cts +1 -0
  156. package/dist/verification-page/index.d.ts +1 -0
  157. package/dist/verification-page/index.js +1 -0
  158. package/dist/workspace-switcher/WorkspaceSwitcher.cjs +69 -0
  159. package/dist/workspace-switcher/WorkspaceSwitcher.d.cts +165 -0
  160. package/dist/workspace-switcher/WorkspaceSwitcher.d.ts +165 -0
  161. package/dist/workspace-switcher/WorkspaceSwitcher.js +69 -0
  162. package/dist/workspace-switcher/index.cjs +1 -0
  163. package/dist/workspace-switcher/index.d.cts +1 -0
  164. package/dist/workspace-switcher/index.d.ts +1 -0
  165. package/dist/workspace-switcher/index.js +1 -0
  166. package/package.json +272 -6
@@ -0,0 +1,97 @@
1
+ var b=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var r=(n,d,e,i)=>{for(var s=i>1?void 0:i?k(d,e):d,o=n.length-1,p;o>=0;o--)(p=n[o])&&(s=(i?p(d,e,s):p(s))||s);return i&&s&&b(d,e,s),s};import{html as l,LitElement as f,nothing as u}from"lit";import{property as a}from"lit/decorators.js";import{customElement as v}from"../internal/define.js";import{emit as c}from"../internal/events.js";import{hasUnslottedChild as _,placeSlotted as y}from"../internal/slots.js";import{defaultProviderLabel as L}from"../sign-in-page/index.js";import"@skdx/web-components/alert";import"@skdx/web-components/button";import"@skdx/web-components/checkbox";import"@skdx/web-components/divider";import"@skdx/web-components/field";import"@skdx/web-components/form";import"@skdx/web-components/heading";import"@skdx/web-components/password-input";import"@skdx/web-components/text-field";var g="data-skdx-sign-up-page-generated",$="data-skdx-sign-up-page-content",h="confirmPassword",E=0,t=class extends f{constructor(){super(...arguments);this.title="Create account";this.pending=!1;this.emailLabel="Email";this.passwordLabel="Password";this.passwordMismatchMessage="Passwords do not match";this.submitLabel="Create account";this.titleId=`skdx-sign-up-page-title-${++E}`;this.handleSubmit=e=>{let i=e.target?.closest("skdx-form");if(!i)return;e.preventDefault();let s=m(i,"password"),o=x(i,h);if(o&&o.value!==s){o.setCustomValidity(this.passwordMismatchMessage),o.reportValidity();return}let p={providerId:"credentials",email:m(i,"email"),password:s};this.nameLabel!==void 0&&(p.name=m(i,"name")),this.hasSlotted("terms")&&(p.termsAccepted=w(i)),c(this,"sign-up",p)};this.clearMismatch=e=>{e.target.setCustomValidity("")}}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(e){return this.querySelector(`[slot="${e}"]`)!==null}region(e){return this.querySelector(`.skdx-sign-up-page__${e}`)}get termsLabel(){return this.querySelector(".skdx-sign-up-page__terms skdx-checkbox > span")}get contentRegion(){return this.querySelector(`[${$}]`)}get hasContent(){return _(this,g)||(this.contentRegion?.hasChildNodes()??!1)}updated(){y(this,g,{terms:this.termsLabel,footer:this.region("footer")},this.contentRegion)}signUpWithProvider(e){c(this,"sign-up",{providerId:e})}render(){let e=this.providers??[],i=this.getProviderLabel??L;return l`
2
+ <div
3
+ class="skdx-sign-up-page__panel"
4
+ data-skdx-sign-up-page-generated
5
+ >
6
+ <skdx-heading
7
+ class="skdx-sign-up-page__title"
8
+ as="h1"
9
+ id=${this.titleId}
10
+ >${this.title}</skdx-heading
11
+ >
12
+ ${this.error?l`<skdx-alert
13
+ class="skdx-sign-up-page__error"
14
+ .status=${"danger"}
15
+ >${this.error}</skdx-alert
16
+ >`:u}
17
+ ${e.length?l`<div class="skdx-sign-up-page__providers">
18
+ ${e.map(s=>l`<skdx-button
19
+ class="skdx-sign-up-page__provider"
20
+ type="button"
21
+ data-provider=${s.id}
22
+ @click=${()=>this.signUpWithProvider(s.id)}
23
+ >${i(s)}</skdx-button
24
+ >`)}
25
+ </div>
26
+ <skdx-divider class="skdx-sign-up-page__divider"></skdx-divider>`:u}
27
+ <skdx-form class="skdx-sign-up-page__form">
28
+ <form>
29
+ ${this.nameLabel===void 0?u:l`<skdx-field
30
+ class="skdx-sign-up-page__field"
31
+ label=${this.nameLabel}
32
+ required
33
+ >
34
+ <skdx-text-field
35
+ name="name"
36
+ required
37
+ >
38
+ <skdx-text-field-input autocomplete="name"></skdx-text-field-input>
39
+ </skdx-text-field>
40
+ </skdx-field>`}
41
+ <skdx-field
42
+ class="skdx-sign-up-page__field"
43
+ label=${this.emailLabel}
44
+ required
45
+ >
46
+ <skdx-text-field
47
+ name="email"
48
+ type="email"
49
+ required
50
+ >
51
+ <skdx-text-field-input
52
+ type="email"
53
+ autocomplete="email"
54
+ ></skdx-text-field-input>
55
+ </skdx-text-field>
56
+ </skdx-field>
57
+ <skdx-field
58
+ class="skdx-sign-up-page__field"
59
+ label=${this.passwordLabel}
60
+ required
61
+ >
62
+ <skdx-password-input
63
+ name="password"
64
+ required
65
+ ></skdx-password-input>
66
+ </skdx-field>
67
+ ${this.confirmPasswordLabel===void 0?u:l`<skdx-field
68
+ class="skdx-sign-up-page__field"
69
+ label=${this.confirmPasswordLabel}
70
+ required
71
+ >
72
+ <skdx-password-input
73
+ name=${h}
74
+ required
75
+ @value-change=${this.clearMismatch}
76
+ ></skdx-password-input>
77
+ </skdx-field>`}
78
+ ${this.hasContent?l`<div data-skdx-sign-up-page-content></div>`:u}
79
+ ${this.hasSlotted("terms")?l`<skdx-field class="skdx-sign-up-page__terms">
80
+ <skdx-checkbox
81
+ name="terms"
82
+ required
83
+ ><span></span
84
+ ></skdx-checkbox>
85
+ </skdx-field>`:u}
86
+ <skdx-button
87
+ class="skdx-sign-up-page__submit"
88
+ type="submit"
89
+ ?loading=${this.pending}
90
+ ?disabled=${this.pending}
91
+ >${this.submitLabel}</skdx-button
92
+ >
93
+ </form>
94
+ </skdx-form>
95
+ ${this.hasSlotted("footer")?l`<div class="skdx-sign-up-page__footer"></div>`:u}
96
+ </div>
97
+ `}};r([a({type:String})],t.prototype,"title",2),r([a({attribute:!1})],t.prototype,"providers",2),r([a({type:String})],t.prototype,"error",2),r([a({type:Boolean})],t.prototype,"pending",2),r([a({type:String,attribute:"name-label"})],t.prototype,"nameLabel",2),r([a({type:String,attribute:"email-label"})],t.prototype,"emailLabel",2),r([a({type:String,attribute:"password-label"})],t.prototype,"passwordLabel",2),r([a({type:String,attribute:"confirm-password-label"})],t.prototype,"confirmPasswordLabel",2),r([a({type:String,attribute:"password-mismatch-message"})],t.prototype,"passwordMismatchMessage",2),r([a({type:String,attribute:"submit-label"})],t.prototype,"submitLabel",2),r([a({attribute:!1})],t.prototype,"getProviderLabel",2),t=r([v("skdx-sign-up-page","sign-up-page","root")],t);function x(n,d){return n.querySelector(`[name="${d}"]`)}function m(n,d){return x(n,d)?.value??""}function w(n){return n.querySelector('[name="terms"]')?.checked===!0}export{t as SkdxSignUpPage};
@@ -0,0 +1 @@
1
+ "use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var n=(p,e)=>{for(var g in e)i(p,g,{get:e[g],enumerable:!0})},o=(p,e,g,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let S of d(e))!k.call(p,S)&&S!==g&&i(p,S,{get:()=>e[S],enumerable:!(t=a(e,S))||t.enumerable});return p};var r=p=>o(i({},"__esModule",{value:!0}),p);var U={};n(U,{SkdxSignUpPage:()=>x.SkdxSignUpPage});module.exports=r(U);var x=require("./SignUpPage.cjs");0&&(module.exports={SkdxSignUpPage});
@@ -0,0 +1 @@
1
+ export { SkdxSignUpPage, type SkdxSignUpDetail } from './SignUpPage.cjs';
@@ -0,0 +1 @@
1
+ export { SkdxSignUpPage, type SkdxSignUpDetail } from './SignUpPage.js';
@@ -0,0 +1 @@
1
+ import{SkdxSignUpPage as S}from"./SignUpPage.js";export{S as SkdxSignUpPage};
@@ -0,0 +1,61 @@
1
+ "use strict";var o=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var b=(a,e)=>{for(var s in e)o(a,s,{get:e[s],enumerable:!0})},k=(a,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of v(e))!x.call(a,i)&&i!==s&&o(a,i,{get:()=>e[i],enumerable:!(l=p(e,i))||l.enumerable});return a};var _=a=>k(o({},"__esModule",{value:!0}),a),d=(a,e,s,l)=>{for(var i=l>1?void 0:l?p(e,s):e,h=a.length-1,u;h>=0;h--)(u=a[h])&&(i=(l?u(e,s,i):u(i))||i);return l&&i&&o(e,s,i),i};var y={};b(y,{SkdxStatCard:()=>n});module.exports=_(y);var t=require("lit"),r=require("lit/decorators.js"),g=require("../internal/define.cjs"),m=require("../internal/slots.cjs"),T=require("@skdx/web-components/progress"),L=require("@skdx/web-components/skeleton"),M=require("@skdx/web-components/text"),R=require("@skdx/web-components/visually-hidden");var $="data-skdx-stat-card-generated",f=0;function c(a,e,s){s===void 0?a.removeAttribute(e):a.setAttribute(e,s)}var n=class extends t.LitElement{constructor(){super(...arguments);this.loading=!1;this.labelId=`skdx-stat-card-label-${++f}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this.setAttribute("aria-labelledby",this.labelId),queueMicrotask(()=>this.requestUpdate())}region(s){return this.querySelector(`.skdx-stat-card__${s}`)}hasSlotted(s){return this.querySelector(`[slot="${s}"]`)!==null}updated(){c(this,"data-trend",this.trend),c(this,"data-sentiment",this.sentiment),c(this,"data-state",this.loading?"loading":void 0),c(this,"aria-busy",this.loading?"true":void 0),(0,m.placeSlotted)(this,$,{value:this.querySelector(".skdx-stat-card__value skdx-text"),icon:this.region("icon"),"trend-icon":this.region("trend-icon"),visual:this.region("visual"),footer:this.region("footer"),actions:this.region("actions")},null)}trendRegion(){return t.html`<span
2
+ class="skdx-stat-card__trend"
3
+ data-trend=${this.trend??t.nothing}
4
+ data-sentiment=${this.sentiment??t.nothing}
5
+ >
6
+ ${this.hasSlotted("trend-icon")?t.html`<span
7
+ class="skdx-stat-card__trend-icon"
8
+ aria-hidden="true"
9
+ ></span>`:t.nothing}${this.changeLabel?t.html`<skdx-visually-hidden>${this.changeLabel}</skdx-visually-hidden>`:t.nothing}${this.change}
10
+ </span>`}render(){return t.html`
11
+ <div
12
+ class="skdx-stat-card__header"
13
+ data-skdx-stat-card-generated
14
+ >
15
+ ${this.hasSlotted("icon")?t.html`<span
16
+ class="skdx-stat-card__icon"
17
+ aria-hidden="true"
18
+ ></span>`:t.nothing}
19
+ <span
20
+ class="skdx-stat-card__label"
21
+ id=${this.labelId}
22
+ >${this.label??""}</span
23
+ >
24
+ ${this.hasSlotted("actions")?t.html`<div class="skdx-stat-card__actions"></div>`:t.nothing}
25
+ </div>
26
+ <div
27
+ class="skdx-stat-card__body"
28
+ data-skdx-stat-card-generated
29
+ >
30
+ <span class="skdx-stat-card__value">
31
+ ${this.loading?t.html`<skdx-skeleton .shape=${"line"}></skdx-skeleton>`:t.nothing}
32
+ <skdx-text
33
+ as="span"
34
+ .variant=${"numeric"}
35
+ ?hidden=${this.loading}
36
+ ></skdx-text>
37
+ </span>
38
+ ${this.change!==void 0&&!this.loading?this.trendRegion():t.nothing}
39
+ </div>
40
+ ${this.description?t.html`<skdx-text
41
+ class="skdx-stat-card__description"
42
+ as="p"
43
+ .tone=${"muted"}
44
+ data-skdx-stat-card-generated
45
+ >${this.description}</skdx-text
46
+ >`:t.nothing}
47
+ ${typeof this.progress=="number"?t.html`<skdx-progress
48
+ class="skdx-stat-card__progress"
49
+ .value=${this.progress}
50
+ aria-labelledby=${this.labelId}
51
+ data-skdx-stat-card-generated
52
+ ></skdx-progress>`:t.nothing}
53
+ ${this.hasSlotted("visual")?t.html`<div
54
+ class="skdx-stat-card__visual"
55
+ data-skdx-stat-card-generated
56
+ ></div>`:t.nothing}
57
+ ${this.hasSlotted("footer")?t.html`<div
58
+ class="skdx-stat-card__footer"
59
+ data-skdx-stat-card-generated
60
+ ></div>`:t.nothing}
61
+ `}};d([(0,r.property)({type:String})],n.prototype,"label",2),d([(0,r.property)({type:String})],n.prototype,"change",2),d([(0,r.property)({type:String})],n.prototype,"trend",2),d([(0,r.property)({type:String})],n.prototype,"sentiment",2),d([(0,r.property)({type:String,attribute:"change-label"})],n.prototype,"changeLabel",2),d([(0,r.property)({type:String})],n.prototype,"description",2),d([(0,r.property)({type:Number})],n.prototype,"progress",2),d([(0,r.property)({type:Boolean})],n.prototype,"loading",2),n=d([(0,g.customElement)("skdx-stat-card","stat-card","root")],n);0&&(module.exports={SkdxStatCard});
@@ -0,0 +1,90 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/progress';
3
+ import '@skdx/web-components/skeleton';
4
+ import '@skdx/web-components/text';
5
+ import '@skdx/web-components/visually-hidden';
6
+ /**
7
+ * KPI tile block: a label, a value, an optional trend with sentiment colour,
8
+ * a description, a derived progress bar and a visual region, all inside one
9
+ * `role="group"` named by its own label.
10
+ *
11
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
12
+ * targets: `.skdx-stat-card` on the host, then `__header`, `__icon`,
13
+ * `__label`, `__actions`, `__body`, `__value`, `__trend`, `__trend-icon`,
14
+ * `__description`, `__progress`, `__visual` and `__footer`. `data-trend`,
15
+ * `data-sentiment` and `data-state` sit on the host for the skin to read.
16
+ *
17
+ * @example
18
+ * ```html
19
+ * <skdx-stat-card
20
+ * label="Revenue"
21
+ * change="+12.4%"
22
+ * trend="up"
23
+ * sentiment="positive"
24
+ * >
25
+ * <span slot="value">$12,400</span>
26
+ * </skdx-stat-card>
27
+ * ```
28
+ *
29
+ * @slot value - The metric's current reading, already formatted by the consumer.
30
+ * @slot icon - Decorative glyph rendered beside the label in the card header.
31
+ * @slot trend-icon - Decorative glyph rendered beside the change text in the trend region.
32
+ * @slot visual - A chart or sparkline region the card sizes for the consumer to draw into.
33
+ * @slot footer - Content rendered in a footer region below the card's other regions.
34
+ * @slot actions - Controls rendered at the end of the header, such as a menu button.
35
+ */
36
+ export declare class SkdxStatCard extends LitElement {
37
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
38
+ createRenderRoot(): HTMLElement | DocumentFragment;
39
+ /** Name of the metric, rendered into the label that names the group through `aria-labelledby`. */
40
+ label: string;
41
+ /**
42
+ * Already-formatted delta text such as "+12.4%", rendered inside the trend region.
43
+ * @default undefined — no trend region renders.
44
+ */
45
+ change?: string | undefined;
46
+ /**
47
+ * Direction of the change only, written to `data-trend` on the host and the trend part.
48
+ * @default undefined — no direction is written.
49
+ */
50
+ trend?: 'up' | 'down' | 'neutral' | undefined;
51
+ /**
52
+ * Whether the change is good or bad, independent of `trend`, written to `data-sentiment`.
53
+ * @default undefined — the trend renders in the skin's neutral colour.
54
+ */
55
+ sentiment?: 'positive' | 'negative' | 'neutral' | undefined;
56
+ /**
57
+ * Visually hidden text read before the change, such as "Increased by".
58
+ * @default undefined — only the change text itself is announced.
59
+ */
60
+ changeLabel?: string | undefined;
61
+ /**
62
+ * Supporting text rendered below the value, in the skin's muted tone.
63
+ * @default undefined — no description region renders.
64
+ */
65
+ description?: string | undefined;
66
+ /**
67
+ * Percentage from 0 to 100, rendered into a derived Progress named by the label.
68
+ * @default undefined — no progress bar renders.
69
+ */
70
+ progress?: number | undefined;
71
+ /**
72
+ * Shows a skeleton in the value region and withholds the trend while true.
73
+ * @default false
74
+ */
75
+ loading: boolean;
76
+ /** Generated label id, published as the group's `aria-labelledby`. */
77
+ private readonly labelId;
78
+ connectedCallback(): void;
79
+ private region;
80
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
81
+ private hasSlotted;
82
+ protected updated(): void;
83
+ private trendRegion;
84
+ render(): TemplateResult;
85
+ }
86
+ declare global {
87
+ interface HTMLElementTagNameMap {
88
+ 'skdx-stat-card': SkdxStatCard;
89
+ }
90
+ }
@@ -0,0 +1,90 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/progress';
3
+ import '@skdx/web-components/skeleton';
4
+ import '@skdx/web-components/text';
5
+ import '@skdx/web-components/visually-hidden';
6
+ /**
7
+ * KPI tile block: a label, a value, an optional trend with sentiment colour,
8
+ * a description, a derived progress bar and a visual region, all inside one
9
+ * `role="group"` named by its own label.
10
+ *
11
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
12
+ * targets: `.skdx-stat-card` on the host, then `__header`, `__icon`,
13
+ * `__label`, `__actions`, `__body`, `__value`, `__trend`, `__trend-icon`,
14
+ * `__description`, `__progress`, `__visual` and `__footer`. `data-trend`,
15
+ * `data-sentiment` and `data-state` sit on the host for the skin to read.
16
+ *
17
+ * @example
18
+ * ```html
19
+ * <skdx-stat-card
20
+ * label="Revenue"
21
+ * change="+12.4%"
22
+ * trend="up"
23
+ * sentiment="positive"
24
+ * >
25
+ * <span slot="value">$12,400</span>
26
+ * </skdx-stat-card>
27
+ * ```
28
+ *
29
+ * @slot value - The metric's current reading, already formatted by the consumer.
30
+ * @slot icon - Decorative glyph rendered beside the label in the card header.
31
+ * @slot trend-icon - Decorative glyph rendered beside the change text in the trend region.
32
+ * @slot visual - A chart or sparkline region the card sizes for the consumer to draw into.
33
+ * @slot footer - Content rendered in a footer region below the card's other regions.
34
+ * @slot actions - Controls rendered at the end of the header, such as a menu button.
35
+ */
36
+ export declare class SkdxStatCard extends LitElement {
37
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
38
+ createRenderRoot(): HTMLElement | DocumentFragment;
39
+ /** Name of the metric, rendered into the label that names the group through `aria-labelledby`. */
40
+ label: string;
41
+ /**
42
+ * Already-formatted delta text such as "+12.4%", rendered inside the trend region.
43
+ * @default undefined — no trend region renders.
44
+ */
45
+ change?: string | undefined;
46
+ /**
47
+ * Direction of the change only, written to `data-trend` on the host and the trend part.
48
+ * @default undefined — no direction is written.
49
+ */
50
+ trend?: 'up' | 'down' | 'neutral' | undefined;
51
+ /**
52
+ * Whether the change is good or bad, independent of `trend`, written to `data-sentiment`.
53
+ * @default undefined — the trend renders in the skin's neutral colour.
54
+ */
55
+ sentiment?: 'positive' | 'negative' | 'neutral' | undefined;
56
+ /**
57
+ * Visually hidden text read before the change, such as "Increased by".
58
+ * @default undefined — only the change text itself is announced.
59
+ */
60
+ changeLabel?: string | undefined;
61
+ /**
62
+ * Supporting text rendered below the value, in the skin's muted tone.
63
+ * @default undefined — no description region renders.
64
+ */
65
+ description?: string | undefined;
66
+ /**
67
+ * Percentage from 0 to 100, rendered into a derived Progress named by the label.
68
+ * @default undefined — no progress bar renders.
69
+ */
70
+ progress?: number | undefined;
71
+ /**
72
+ * Shows a skeleton in the value region and withholds the trend while true.
73
+ * @default false
74
+ */
75
+ loading: boolean;
76
+ /** Generated label id, published as the group's `aria-labelledby`. */
77
+ private readonly labelId;
78
+ connectedCallback(): void;
79
+ private region;
80
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
81
+ private hasSlotted;
82
+ protected updated(): void;
83
+ private trendRegion;
84
+ render(): TemplateResult;
85
+ }
86
+ declare global {
87
+ interface HTMLElementTagNameMap {
88
+ 'skdx-stat-card': SkdxStatCard;
89
+ }
90
+ }
@@ -0,0 +1,61 @@
1
+ var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var i=(l,n,a,o)=>{for(var r=o>1?void 0:o?g(n,a):n,h=l.length-1,u;h>=0;h--)(u=l[h])&&(r=(o?u(n,a,r):u(r))||r);return o&&r&&p(n,a,r),r};import{html as s,LitElement as m,nothing as t}from"lit";import{property as d}from"lit/decorators.js";import{customElement as v}from"../internal/define.js";import{placeSlotted as x}from"../internal/slots.js";import"@skdx/web-components/progress";import"@skdx/web-components/skeleton";import"@skdx/web-components/text";import"@skdx/web-components/visually-hidden";var b="data-skdx-stat-card-generated",k=0;function c(l,n,a){a===void 0?l.removeAttribute(n):l.setAttribute(n,a)}var e=class extends m{constructor(){super(...arguments);this.loading=!1;this.labelId=`skdx-stat-card-label-${++k}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this.setAttribute("aria-labelledby",this.labelId),queueMicrotask(()=>this.requestUpdate())}region(a){return this.querySelector(`.skdx-stat-card__${a}`)}hasSlotted(a){return this.querySelector(`[slot="${a}"]`)!==null}updated(){c(this,"data-trend",this.trend),c(this,"data-sentiment",this.sentiment),c(this,"data-state",this.loading?"loading":void 0),c(this,"aria-busy",this.loading?"true":void 0),x(this,b,{value:this.querySelector(".skdx-stat-card__value skdx-text"),icon:this.region("icon"),"trend-icon":this.region("trend-icon"),visual:this.region("visual"),footer:this.region("footer"),actions:this.region("actions")},null)}trendRegion(){return s`<span
2
+ class="skdx-stat-card__trend"
3
+ data-trend=${this.trend??t}
4
+ data-sentiment=${this.sentiment??t}
5
+ >
6
+ ${this.hasSlotted("trend-icon")?s`<span
7
+ class="skdx-stat-card__trend-icon"
8
+ aria-hidden="true"
9
+ ></span>`:t}${this.changeLabel?s`<skdx-visually-hidden>${this.changeLabel}</skdx-visually-hidden>`:t}${this.change}
10
+ </span>`}render(){return s`
11
+ <div
12
+ class="skdx-stat-card__header"
13
+ data-skdx-stat-card-generated
14
+ >
15
+ ${this.hasSlotted("icon")?s`<span
16
+ class="skdx-stat-card__icon"
17
+ aria-hidden="true"
18
+ ></span>`:t}
19
+ <span
20
+ class="skdx-stat-card__label"
21
+ id=${this.labelId}
22
+ >${this.label??""}</span
23
+ >
24
+ ${this.hasSlotted("actions")?s`<div class="skdx-stat-card__actions"></div>`:t}
25
+ </div>
26
+ <div
27
+ class="skdx-stat-card__body"
28
+ data-skdx-stat-card-generated
29
+ >
30
+ <span class="skdx-stat-card__value">
31
+ ${this.loading?s`<skdx-skeleton .shape=${"line"}></skdx-skeleton>`:t}
32
+ <skdx-text
33
+ as="span"
34
+ .variant=${"numeric"}
35
+ ?hidden=${this.loading}
36
+ ></skdx-text>
37
+ </span>
38
+ ${this.change!==void 0&&!this.loading?this.trendRegion():t}
39
+ </div>
40
+ ${this.description?s`<skdx-text
41
+ class="skdx-stat-card__description"
42
+ as="p"
43
+ .tone=${"muted"}
44
+ data-skdx-stat-card-generated
45
+ >${this.description}</skdx-text
46
+ >`:t}
47
+ ${typeof this.progress=="number"?s`<skdx-progress
48
+ class="skdx-stat-card__progress"
49
+ .value=${this.progress}
50
+ aria-labelledby=${this.labelId}
51
+ data-skdx-stat-card-generated
52
+ ></skdx-progress>`:t}
53
+ ${this.hasSlotted("visual")?s`<div
54
+ class="skdx-stat-card__visual"
55
+ data-skdx-stat-card-generated
56
+ ></div>`:t}
57
+ ${this.hasSlotted("footer")?s`<div
58
+ class="skdx-stat-card__footer"
59
+ data-skdx-stat-card-generated
60
+ ></div>`:t}
61
+ `}};i([d({type:String})],e.prototype,"label",2),i([d({type:String})],e.prototype,"change",2),i([d({type:String})],e.prototype,"trend",2),i([d({type:String})],e.prototype,"sentiment",2),i([d({type:String,attribute:"change-label"})],e.prototype,"changeLabel",2),i([d({type:String})],e.prototype,"description",2),i([d({type:Number})],e.prototype,"progress",2),i([d({type:Boolean})],e.prototype,"loading",2),e=i([v("skdx-stat-card","stat-card","root")],e);export{e as SkdxStatCard};
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var m=(t,r)=>{for(var d in r)o(t,d,{get:r[d],enumerable:!0})},p=(t,r,d,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of f(r))!k.call(t,a)&&a!==d&&o(t,a,{get:()=>r[a],enumerable:!(x=e(r,a))||x.enumerable});return t};var C=t=>p(o({},"__esModule",{value:!0}),t);var b={};m(b,{SkdxStatCard:()=>S.SkdxStatCard});module.exports=C(b);var S=require("./StatCard.cjs");0&&(module.exports={SkdxStatCard});
@@ -0,0 +1 @@
1
+ export { SkdxStatCard } from './StatCard.cjs';
@@ -0,0 +1 @@
1
+ export { SkdxStatCard } from './StatCard.js';
@@ -0,0 +1 @@
1
+ import{SkdxStatCard as a}from"./StatCard.js";export{a as SkdxStatCard};
@@ -0,0 +1,42 @@
1
+ "use strict";var m=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var $=(r,t)=>{for(var e in t)m(r,e,{get:t[e],enumerable:!0})},_=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of v(t))!x.call(r,i)&&i!==e&&m(r,i,{get:()=>t[i],enumerable:!(n=c(t,i))||n.enumerable});return r};var k=r=>_(m({},"__esModule",{value:!0}),r),d=(r,t,e,n)=>{for(var i=n>1?void 0:n?c(t,e):t,u=r.length-1,o;u>=0;u--)(o=r[u])&&(i=(n?o(t,e,i):o(i))||i);return n&&i&&m(t,e,i),i};var T={};$(T,{SkdxUsageCard:()=>a});module.exports=k(T);var s=require("lit"),l=require("lit/decorators.js"),h=require("../internal/define.cjs"),f=require("../internal/slots.cjs"),g=require("./usage.cjs"),R=require("@skdx/web-components/progress"),A=require("@skdx/web-components/text");var y="data-skdx-usage-card-generated",L=0;function p(r,t,e){e===void 0?r.removeAttribute(t):r.setAttribute(t,e)}var a=class extends s.LitElement{constructor(){super(...arguments);this.unlimitedLabel="Unlimited";this.labelId=`skdx-usage-card-label-${++L}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this.setAttribute("aria-labelledby",this.labelId),queueMicrotask(()=>this.requestUpdate())}region(e){return this.querySelector(`.skdx-usage-card__${e}`)}hasSlotted(e){return this.querySelector(`[slot="${e}"]`)!==null}get format(){return this.formatValue??String}get reading(){if(this.limit===null)return{limitText:this.unlimitedLabel,overLimit:!1,range:null};if(this.limit===void 0)return{limitText:void 0,overLimit:!1,range:null};let e=(0,g.usageMeter)(this.used??0,this.limit);return{limitText:`/ ${this.format(e.limit)}`,overLimit:e.overLimit,range:e.range}}updated(){p(this,"data-state",this.reading.overLimit?"over-limit":void 0),p(this,"data-status",this.status),(0,f.placeSlotted)(this,y,{actions:this.region("actions"),footer:this.region("footer")},null)}render(){let{limitText:e,range:n}=this.reading,i=this.format,u=this.unit?` ${this.unit}`:"";return s.html`
2
+ <div
3
+ class="skdx-usage-card__header"
4
+ data-skdx-usage-card-generated
5
+ >
6
+ <span
7
+ class="skdx-usage-card__label"
8
+ id=${this.labelId}
9
+ >${this.label??""}</span
10
+ >
11
+ ${this.hasSlotted("actions")?s.html`<div class="skdx-usage-card__actions"></div>`:s.nothing}
12
+ </div>
13
+ <div
14
+ class="skdx-usage-card__value"
15
+ data-skdx-usage-card-generated
16
+ >
17
+ <span class="skdx-usage-card__used">${i((0,g.normalizeUsage)(this.used??0))}</span>
18
+ ${e===void 0?s.nothing:s.html`<span class="skdx-usage-card__limit">${e}</span>`}
19
+ ${this.unit?s.html`<span class="skdx-usage-card__unit">${this.unit}</span>`:s.nothing}
20
+ </div>
21
+ ${n?s.html`<skdx-progress
22
+ class="skdx-usage-card__progress"
23
+ role="meter"
24
+ min="0"
25
+ .max=${n.max}
26
+ .value=${n.value}
27
+ aria-labelledby=${this.labelId}
28
+ .getValueLabel=${(o,E,b)=>`${i(o)} / ${i(b)}${u}`}
29
+ data-skdx-usage-card-generated
30
+ ></skdx-progress>`:s.nothing}
31
+ ${this.description?s.html`<skdx-text
32
+ class="skdx-usage-card__description"
33
+ as="p"
34
+ .tone=${"muted"}
35
+ data-skdx-usage-card-generated
36
+ >${this.description}</skdx-text
37
+ >`:s.nothing}
38
+ ${this.hasSlotted("footer")?s.html`<div
39
+ class="skdx-usage-card__footer"
40
+ data-skdx-usage-card-generated
41
+ ></div>`:s.nothing}
42
+ `}};d([(0,l.property)({type:String})],a.prototype,"label",2),d([(0,l.property)({type:Number})],a.prototype,"used",2),d([(0,l.property)({type:Number})],a.prototype,"limit",2),d([(0,l.property)({type:String})],a.prototype,"unit",2),d([(0,l.property)({attribute:!1})],a.prototype,"formatValue",2),d([(0,l.property)({type:String,attribute:"unlimited-label"})],a.prototype,"unlimitedLabel",2),d([(0,l.property)({type:String})],a.prototype,"description",2),d([(0,l.property)({type:String})],a.prototype,"status",2),a=d([(0,h.customElement)("skdx-usage-card","usage-card","root")],a);0&&(module.exports={SkdxUsageCard});
@@ -0,0 +1,81 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/progress';
3
+ import '@skdx/web-components/text';
4
+ /**
5
+ * Quota tile block: a label, the amount used against a limit, a derived meter
6
+ * and a status colour, all inside one `role="group"` named by its own label.
7
+ * Handles a finite, zero, unlimited or unknown limit without division errors,
8
+ * and derives over-limit from the numbers rather than a status property.
9
+ *
10
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
11
+ * targets: `.skdx-usage-card` on the host, then `__header`, `__label`,
12
+ * `__actions`, `__value`, `__used`, `__limit`, `__unit`, `__progress`,
13
+ * `__description` and `__footer`. `data-state` and `data-status` sit on the
14
+ * host for the skin to read.
15
+ *
16
+ * @example
17
+ * ```html
18
+ * <skdx-usage-card
19
+ * label="Storage"
20
+ * used="42"
21
+ * limit="50"
22
+ * unit="GB"
23
+ * ></skdx-usage-card>
24
+ * ```
25
+ *
26
+ * @slot actions - Controls rendered at the end of the header, such as a manage-plan link.
27
+ * @slot footer - Content rendered in a footer region below the card, such as renewal metadata.
28
+ */
29
+ export declare class SkdxUsageCard extends LitElement {
30
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
31
+ createRenderRoot(): HTMLElement | DocumentFragment;
32
+ /** Name of the quota, rendered into the label that names the group through `aria-labelledby`. */
33
+ label: string;
34
+ /** The current amount consumed, formatted by `formatValue` for the value region and the meter. */
35
+ used: number;
36
+ /**
37
+ * The finite cap `used` is measured against; `null` renders `unlimitedLabel` instead of a number.
38
+ * @default undefined — the limit is unknown, so no limit text or meter renders.
39
+ */
40
+ limit?: number | null | undefined;
41
+ /**
42
+ * Unit label rendered after the limit text, such as "GB" or "seats".
43
+ * @default undefined — no unit region renders.
44
+ */
45
+ unit?: string | undefined;
46
+ /**
47
+ * Formats `used` and `limit` for the consumer's own locale and precision.
48
+ * @default String — the raw number is rendered as-is.
49
+ */
50
+ formatValue?: ((value: number) => string) | undefined;
51
+ /**
52
+ * Text rendered in place of a limit number when `limit` is `null`.
53
+ * @default 'Unlimited'
54
+ */
55
+ unlimitedLabel: string;
56
+ /**
57
+ * Supporting copy rendered below the meter, in the skin's muted tone.
58
+ * @default undefined — no description region renders.
59
+ */
60
+ description?: string | undefined;
61
+ /**
62
+ * Colour role written to `data-status`, tinting the meter fill and the used amount.
63
+ * @default undefined — the skin's own default colour.
64
+ */
65
+ status?: 'info' | 'success' | 'warning' | 'danger' | (string & {}) | undefined;
66
+ /** Generated label id, published as the group's `aria-labelledby`. */
67
+ private readonly labelId;
68
+ connectedCallback(): void;
69
+ private region;
70
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
71
+ private hasSlotted;
72
+ private get format();
73
+ private get reading();
74
+ protected updated(): void;
75
+ render(): TemplateResult;
76
+ }
77
+ declare global {
78
+ interface HTMLElementTagNameMap {
79
+ 'skdx-usage-card': SkdxUsageCard;
80
+ }
81
+ }
@@ -0,0 +1,81 @@
1
+ import { LitElement, type TemplateResult } from 'lit';
2
+ import '@skdx/web-components/progress';
3
+ import '@skdx/web-components/text';
4
+ /**
5
+ * Quota tile block: a label, the amount used against a limit, a derived meter
6
+ * and a status colour, all inside one `role="group"` named by its own label.
7
+ * Handles a finite, zero, unlimited or unknown limit without division errors,
8
+ * and derives over-limit from the numbers rather than a status property.
9
+ *
10
+ * Renders light DOM, so its parts are classes rather than shadow `::part()`
11
+ * targets: `.skdx-usage-card` on the host, then `__header`, `__label`,
12
+ * `__actions`, `__value`, `__used`, `__limit`, `__unit`, `__progress`,
13
+ * `__description` and `__footer`. `data-state` and `data-status` sit on the
14
+ * host for the skin to read.
15
+ *
16
+ * @example
17
+ * ```html
18
+ * <skdx-usage-card
19
+ * label="Storage"
20
+ * used="42"
21
+ * limit="50"
22
+ * unit="GB"
23
+ * ></skdx-usage-card>
24
+ * ```
25
+ *
26
+ * @slot actions - Controls rendered at the end of the header, such as a manage-plan link.
27
+ * @slot footer - Content rendered in a footer region below the card, such as renewal metadata.
28
+ */
29
+ export declare class SkdxUsageCard extends LitElement {
30
+ /** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
31
+ createRenderRoot(): HTMLElement | DocumentFragment;
32
+ /** Name of the quota, rendered into the label that names the group through `aria-labelledby`. */
33
+ label: string;
34
+ /** The current amount consumed, formatted by `formatValue` for the value region and the meter. */
35
+ used: number;
36
+ /**
37
+ * The finite cap `used` is measured against; `null` renders `unlimitedLabel` instead of a number.
38
+ * @default undefined — the limit is unknown, so no limit text or meter renders.
39
+ */
40
+ limit?: number | null | undefined;
41
+ /**
42
+ * Unit label rendered after the limit text, such as "GB" or "seats".
43
+ * @default undefined — no unit region renders.
44
+ */
45
+ unit?: string | undefined;
46
+ /**
47
+ * Formats `used` and `limit` for the consumer's own locale and precision.
48
+ * @default String — the raw number is rendered as-is.
49
+ */
50
+ formatValue?: ((value: number) => string) | undefined;
51
+ /**
52
+ * Text rendered in place of a limit number when `limit` is `null`.
53
+ * @default 'Unlimited'
54
+ */
55
+ unlimitedLabel: string;
56
+ /**
57
+ * Supporting copy rendered below the meter, in the skin's muted tone.
58
+ * @default undefined — no description region renders.
59
+ */
60
+ description?: string | undefined;
61
+ /**
62
+ * Colour role written to `data-status`, tinting the meter fill and the used amount.
63
+ * @default undefined — the skin's own default colour.
64
+ */
65
+ status?: 'info' | 'success' | 'warning' | 'danger' | (string & {}) | undefined;
66
+ /** Generated label id, published as the group's `aria-labelledby`. */
67
+ private readonly labelId;
68
+ connectedCallback(): void;
69
+ private region;
70
+ /** Whether the consumer supplied anything for `name` — still true once it has been moved in. */
71
+ private hasSlotted;
72
+ private get format();
73
+ private get reading();
74
+ protected updated(): void;
75
+ render(): TemplateResult;
76
+ }
77
+ declare global {
78
+ interface HTMLElementTagNameMap {
79
+ 'skdx-usage-card': SkdxUsageCard;
80
+ }
81
+ }