@sankhyatronics/sankhya-cms 0.1.10 → 0.1.11

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/segmented-control/SegmentedControl.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { fontFamilyStyles } from '../shared/styles';\n\nexport interface SegmentedOption {\n value: string;\n label: string;\n}\n\n/** Fired when a segment is chosen. `detail.value` is the chosen option's `value`. */\nexport interface SegmentChangeEventDetail {\n value: string;\n}\n\n/**\n * A row of mutually exclusive segments in a grey track, one of them lifted as white. Pass the\n * segments as `options` and the chosen one as `value`; a `segment-change` event fires on choice.\n * Keyboard: arrows move between segments, Home and End jump to the ends.\n */\n@customElement('st-segmented-control')\nexport class SegmentedControl extends LitElement {\n static styles = css`\n ${fontFamilyStyles}\n\n :host {\n display: inline-flex;\n max-width: 100%;\n }\n\n .track {\n display: flex;\n gap: var(--st-space-2);\n padding: var(--st-space-3);\n border-radius: var(--st-radius-md);\n background: var(--st-color-subtle);\n max-width: 100%;\n }\n\n button {\n appearance: none;\n border: 0;\n border-radius: var(--st-radius-sm);\n padding: var(--st-space-6) var(--st-space-14);\n background: transparent;\n color: var(--st-color-text-secondary);\n font: inherit;\n font-size: var(--st-text-base);\n font-weight: var(--st-font-weight-medium);\n white-space: nowrap;\n cursor: pointer;\n }\n\n button[aria-checked='true'] {\n background: var(--st-color-surface);\n color: var(--st-color-text-strong);\n font-weight: var(--st-font-weight-semibold);\n box-shadow: 0 1px 2px rgba(20, 23, 31, 0.08);\n }\n\n button:focus-visible {\n outline: 2px solid var(--st-color-accent);\n outline-offset: 1px;\n }\n\n button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n `;\n\n /** The segments, in order. */\n @property({ attribute: false })\n options: SegmentedOption[] = [];\n\n /** The chosen segment's `value`. */\n @property({ type: String, reflect: true })\n value = '';\n\n /** Names the group for assistive technology. */\n @property({ type: String, attribute: 'group-label' })\n groupLabel = '';\n\n private select(next: string) {\n if (next === this.value) return;\n this.value = next;\n this.dispatchEvent(\n new CustomEvent<SegmentChangeEventDetail>('segment-change', {\n detail: { value: next },\n bubbles: true,\n composed: true\n })\n );\n }\n\n private onKeydown(event: KeyboardEvent) {\n const enabled = this.options;\n if (!enabled.length) return;\n const index = enabled.findIndex(option => option.value === this.value);\n let next: number | null = null;\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') next = (index + 1) % enabled.length;\n if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') next = (index - 1 + enabled.length) % enabled.length;\n if (event.key === 'Home') next = 0;\n if (event.key === 'End') next = enabled.length - 1;\n if (next === null) return;\n event.preventDefault();\n this.select(enabled[next].value);\n this.renderRoot.querySelector<HTMLButtonElement>(`button[data-value=\"${enabled[next].value}\"]`)?.focus();\n }\n\n render() {\n return html`<div class=\"track\" role=\"radiogroup\" aria-label=${this.groupLabel || nothing} @keydown=${this.onKeydown}>\n ${this.options.map(\n option => html`<button\n type=\"button\"\n role=\"radio\"\n data-value=${option.value}\n aria-checked=${option.value === this.value ? 'true' : 'false'}\n tabindex=${option.value === this.value ? 0 : -1}\n @click=${() => this.select(option.value)}\n >${option.label}</button>`\n )}\n </div>`;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AAoBjC,IAAM,mBAAN,cAA+B,WAAW;AAAA,EAA1C;AAAA;AAoDL,mBAA6B,CAAC;AAI9B,iBAAQ;AAIR,sBAAa;AAAA;AAAA,EAEL,OAAO,MAAc;AAC3B,QAAI,SAAS,KAAK,MAAO;AACzB,SAAK,QAAQ;AACb,SAAK;AAAA,MACH,IAAI,YAAsC,kBAAkB;AAAA,QAC1D,QAAQ,EAAE,OAAO,KAAK;AAAA,QACtB,SAAS;AAAA,QACT,UAAU;AAAA,MACZ,CAAC;AA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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkDpB;AAAA,EADC,SAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GAnDnB,iBAoDX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAvD9B,iBAwDX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,cAAc,CAAC;AAAA,GA3DzC,iBA4DX;AA5DW,mBAAN;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB;","names":[]}
@@ -0,0 +1,119 @@
1
+ import {
2
+ fontFamilyStyles
3
+ } from "./chunk-KMU6ABQF.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-EUXUH3YW.js";
7
+
8
+ // src/attention-panel/AttentionPanel.ts
9
+ import { LitElement, css, html } from "lit";
10
+ import { customElement, property } from "lit/decorators.js";
11
+ var AttentionPanel = class extends LitElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.tone = "accent";
15
+ this.heading = "";
16
+ }
17
+ render() {
18
+ return html`
19
+ <span class="icon" part="icon"><slot name="icon"></slot></span>
20
+ <div class="body">
21
+ <p class="title" part="title">${this.heading}</p>
22
+ <div class="detail" part="detail"><slot></slot></div>
23
+ <div class="action" part="action"><slot name="action"></slot></div>
24
+ </div>
25
+ `;
26
+ }
27
+ };
28
+ AttentionPanel.styles = css`
29
+ ${fontFamilyStyles}
30
+
31
+ :host {
32
+ display: flex;
33
+ align-items: flex-start;
34
+ gap: var(--st-space-12);
35
+ padding: var(--st-space-16);
36
+ border-radius: var(--st-radius-md);
37
+ background: var(--st-color-accent-subtle);
38
+ color: var(--st-color-text);
39
+ }
40
+
41
+ :host([tone='warning']) {
42
+ background: var(--st-color-warning-subtle);
43
+ }
44
+
45
+ :host([tone='danger']) {
46
+ background: var(--st-color-danger-subtle);
47
+ }
48
+
49
+ .icon {
50
+ display: inline-grid;
51
+ place-items: center;
52
+ width: 32px;
53
+ height: 32px;
54
+ border-radius: var(--st-radius-sm);
55
+ background: var(--st-color-surface);
56
+ flex: none;
57
+ }
58
+
59
+ .body {
60
+ display: flex;
61
+ flex-direction: column;
62
+ gap: var(--st-space-4);
63
+ min-width: 0;
64
+ flex: 1;
65
+ }
66
+
67
+ .title {
68
+ margin: 0;
69
+ font-size: var(--st-text-lg);
70
+ font-weight: var(--st-font-weight-semibold);
71
+ color: var(--st-color-text-strong);
72
+ }
73
+
74
+ .detail {
75
+ font-size: var(--st-text-base);
76
+ line-height: 1.5;
77
+ color: var(--st-color-text-secondary);
78
+ }
79
+
80
+ .action {
81
+ margin-top: var(--st-space-6);
82
+ font-size: var(--st-text-base);
83
+ font-weight: var(--st-font-weight-semibold);
84
+ }
85
+
86
+ :host([tone='warning']) .action {
87
+ color: var(--st-color-warning-text);
88
+ }
89
+
90
+ :host([tone='danger']) .action {
91
+ color: var(--st-color-danger-text);
92
+ }
93
+
94
+ :host([tone='accent']) .action {
95
+ color: var(--st-color-accent-text);
96
+ }
97
+
98
+ .action:empty {
99
+ display: none;
100
+ }
101
+
102
+ .icon:empty {
103
+ display: none;
104
+ }
105
+ `;
106
+ __decorateClass([
107
+ property({ type: String, reflect: true })
108
+ ], AttentionPanel.prototype, "tone", 2);
109
+ __decorateClass([
110
+ property({ type: String })
111
+ ], AttentionPanel.prototype, "heading", 2);
112
+ AttentionPanel = __decorateClass([
113
+ customElement("st-attention-panel")
114
+ ], AttentionPanel);
115
+
116
+ export {
117
+ AttentionPanel
118
+ };
119
+ //# sourceMappingURL=chunk-TVE4EPVK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/attention-panel/AttentionPanel.ts"],"sourcesContent":["import { LitElement, css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { fontFamilyStyles } from '../shared/styles';\n\n/**\n * A tinted panel that calls out the most serious item needing action: an icon, a title, a line of\n * detail and an action link. `tone` picks the colour: `warning` (amber) for things due soon,\n * `danger` (red) for overdue or failing items, `accent` (blue) for set-up tips.\n *\n * Slots: `icon` (a glyph beside the title), default (the detail text), `action` (a link or button).\n */\n@customElement('st-attention-panel')\nexport class AttentionPanel extends LitElement {\n static styles = css`\n ${fontFamilyStyles}\n\n :host {\n display: flex;\n align-items: flex-start;\n gap: var(--st-space-12);\n padding: var(--st-space-16);\n border-radius: var(--st-radius-md);\n background: var(--st-color-accent-subtle);\n color: var(--st-color-text);\n }\n\n :host([tone='warning']) {\n background: var(--st-color-warning-subtle);\n }\n\n :host([tone='danger']) {\n background: var(--st-color-danger-subtle);\n }\n\n .icon {\n display: inline-grid;\n place-items: center;\n width: 32px;\n height: 32px;\n border-radius: var(--st-radius-sm);\n background: var(--st-color-surface);\n flex: none;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n gap: var(--st-space-4);\n min-width: 0;\n flex: 1;\n }\n\n .title {\n margin: 0;\n font-size: var(--st-text-lg);\n font-weight: var(--st-font-weight-semibold);\n color: var(--st-color-text-strong);\n }\n\n .detail {\n font-size: var(--st-text-base);\n line-height: 1.5;\n color: var(--st-color-text-secondary);\n }\n\n .action {\n margin-top: var(--st-space-6);\n font-size: var(--st-text-base);\n font-weight: var(--st-font-weight-semibold);\n }\n\n :host([tone='warning']) .action {\n color: var(--st-color-warning-text);\n }\n\n :host([tone='danger']) .action {\n color: var(--st-color-danger-text);\n }\n\n :host([tone='accent']) .action {\n color: var(--st-color-accent-text);\n }\n\n .action:empty {\n display: none;\n }\n\n .icon:empty {\n display: none;\n }\n `;\n\n /** Colour of the panel: `accent` for tips, `warning` for due soon, `danger` for overdue. */\n @property({ type: String, reflect: true })\n tone: 'accent' | 'warning' | 'danger' = 'accent';\n\n /** Bold line at the top of the panel. */\n @property({ type: String })\n heading = '';\n\n render() {\n return html`\n <span class=\"icon\" part=\"icon\"><slot name=\"icon\"></slot></span>\n <div class=\"body\">\n <p class=\"title\" part=\"title\">${this.heading}</p>\n <div class=\"detail\" part=\"detail\"><slot></slot></div>\n <div class=\"action\" part=\"action\"><slot name=\"action\"></slot></div>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,KAAK,YAAY;AACtC,SAAS,eAAe,gBAAgB;AAYjC,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC;AAAA;AAkFL,gBAAwC;AAIxC,mBAAU;AAAA;AAAA,EAEV,SAAS;AACP,WAAO;AAAA;AAAA;AAAA,wCAG6B,KAAK,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKlD;AACF;AAlGa,eACJ,SAAS;AAAA,MACZ,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgFpB;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAjF9B,eAkFX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GArFf,eAsFX;AAtFW,iBAAN;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB;","names":[]}
@@ -0,0 +1,185 @@
1
+ import {
2
+ cardShellStyles,
3
+ fontFamilyStyles
4
+ } from "./chunk-KMU6ABQF.js";
5
+ import {
6
+ __decorateClass
7
+ } from "./chunk-EUXUH3YW.js";
8
+
9
+ // src/kpi-card/KpiCard.ts
10
+ import { LitElement, css, html } from "lit";
11
+ import { customElement, property } from "lit/decorators.js";
12
+ var KpiCard = class extends LitElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.label = "";
16
+ this.value = "";
17
+ this.unit = "";
18
+ this.sub = "";
19
+ this.hero = false;
20
+ this.hasIcon = false;
21
+ }
22
+ connectedCallback() {
23
+ super.connectedCallback();
24
+ this.hasIcon = this.querySelector('[slot="icon"]') !== null;
25
+ }
26
+ render() {
27
+ return html`
28
+ <div class="head" part="head">
29
+ <span class="icon" part="icon"><slot name="icon"></slot></span>
30
+ <span part="label">${this.label}</span>
31
+ </div>
32
+ <div class="value" part="value">
33
+ <span>${this.value}</span>
34
+ ${this.unit ? html`<span class="unit" part="unit">${this.unit}</span>` : ""}
35
+ </div>
36
+ ${this.sub ? html`<div class="sub" part="sub">${this.sub}</div>` : ""}
37
+ <div class="chips" part="chips"><slot name="chips"></slot></div>
38
+ <div class="footer" part="footer"><slot name="footer"></slot></div>
39
+ `;
40
+ }
41
+ };
42
+ KpiCard.styles = css`
43
+ ${fontFamilyStyles}
44
+
45
+ :host {
46
+ display: flex;
47
+ flex-direction: column;
48
+ min-width: 0;
49
+ box-sizing: border-box;
50
+ padding: var(--st-space-20);
51
+ ${cardShellStyles}
52
+ color: var(--st-color-text);
53
+ }
54
+
55
+ :host([hero]) {
56
+ position: relative;
57
+ overflow: hidden;
58
+ border: 0;
59
+ background: linear-gradient(135deg, var(--st-color-accent) 0%, color-mix(in oklch, var(--st-color-accent) 70%, #3aa8e8) 100%);
60
+ color: var(--st-color-on-solid);
61
+ }
62
+
63
+ :host([hero])::after {
64
+ content: '';
65
+ position: absolute;
66
+ top: -40%;
67
+ right: -20%;
68
+ width: 60%;
69
+ padding-bottom: 60%;
70
+ border-radius: var(--st-radius-circle);
71
+ background: color-mix(in oklch, var(--st-color-on-solid) 10%, transparent);
72
+ pointer-events: none;
73
+ }
74
+
75
+ .head {
76
+ display: flex;
77
+ align-items: center;
78
+ gap: var(--st-space-10);
79
+ min-height: 32px;
80
+ font-size: var(--st-text-md);
81
+ font-weight: var(--st-font-weight-medium);
82
+ color: var(--st-color-text-secondary);
83
+ }
84
+
85
+ :host([hero]) .head {
86
+ color: var(--st-color-on-solid);
87
+ opacity: 0.85;
88
+ }
89
+
90
+ .icon {
91
+ display: inline-grid;
92
+ place-items: center;
93
+ width: 32px;
94
+ height: 32px;
95
+ border-radius: var(--st-radius-sm);
96
+ background: var(--st-color-accent-subtle);
97
+ flex: none;
98
+ }
99
+
100
+ :host(:not([has-icon])) .icon {
101
+ display: none;
102
+ }
103
+
104
+ .value {
105
+ display: flex;
106
+ align-items: baseline;
107
+ flex-wrap: wrap;
108
+ gap: var(--st-space-6);
109
+ margin-top: var(--st-space-14);
110
+ font-size: var(--st-text-kpi);
111
+ font-weight: var(--st-font-weight-bold);
112
+ line-height: 1.1;
113
+ letter-spacing: -0.02em;
114
+ font-variant-numeric: tabular-nums;
115
+ color: var(--st-color-text-strong);
116
+ }
117
+
118
+ :host([hero]) .value {
119
+ color: var(--st-color-on-solid);
120
+ font-size: var(--st-text-hero);
121
+ }
122
+
123
+ .unit {
124
+ font-size: var(--st-text-lg);
125
+ font-weight: var(--st-font-weight-medium);
126
+ color: var(--st-color-text-secondary);
127
+ }
128
+
129
+ :host([hero]) .unit {
130
+ color: var(--st-color-on-solid);
131
+ opacity: 0.85;
132
+ }
133
+
134
+ .sub {
135
+ margin-top: var(--st-space-6);
136
+ font-size: var(--st-text-base);
137
+ color: var(--st-color-text-muted);
138
+ }
139
+
140
+ :host([hero]) .sub {
141
+ color: var(--st-color-on-solid);
142
+ opacity: 0.85;
143
+ }
144
+
145
+ .chips {
146
+ display: flex;
147
+ flex-wrap: wrap;
148
+ gap: var(--st-space-8);
149
+ margin-top: var(--st-space-14);
150
+ }
151
+
152
+ .chips:empty {
153
+ display: none;
154
+ }
155
+
156
+ .footer:empty {
157
+ display: none;
158
+ }
159
+ `;
160
+ __decorateClass([
161
+ property({ type: String })
162
+ ], KpiCard.prototype, "label", 2);
163
+ __decorateClass([
164
+ property({ type: String })
165
+ ], KpiCard.prototype, "value", 2);
166
+ __decorateClass([
167
+ property({ type: String })
168
+ ], KpiCard.prototype, "unit", 2);
169
+ __decorateClass([
170
+ property({ type: String })
171
+ ], KpiCard.prototype, "sub", 2);
172
+ __decorateClass([
173
+ property({ type: Boolean, reflect: true })
174
+ ], KpiCard.prototype, "hero", 2);
175
+ __decorateClass([
176
+ property({ type: Boolean, reflect: true, attribute: "has-icon" })
177
+ ], KpiCard.prototype, "hasIcon", 2);
178
+ KpiCard = __decorateClass([
179
+ customElement("st-kpi-card")
180
+ ], KpiCard);
181
+
182
+ export {
183
+ KpiCard
184
+ };
185
+ //# sourceMappingURL=chunk-YLY5DXQE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/kpi-card/KpiCard.ts"],"sourcesContent":["import { LitElement, css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { cardShellStyles, fontFamilyStyles } from '../shared/styles';\n\n/**\n * A key-figure card for dashboards: a label, one large value with an optional unit (for example\n * \"lakh\" or \"crore\"), a secondary line, and a row of chips. The `icon` slot sits beside the label.\n * `hero` gives the blue gradient card used for the headline figure. The value is shown exactly as\n * passed in: format numbers (Indian grouping, currency symbols) before setting it.\n *\n * Slots: `icon` (optional glyph), `chips` (a row of `st-chip`), `footer` (anything below the chips).\n */\n@customElement('st-kpi-card')\nexport class KpiCard extends LitElement {\n static styles = css`\n ${fontFamilyStyles}\n\n :host {\n display: flex;\n flex-direction: column;\n min-width: 0;\n box-sizing: border-box;\n padding: var(--st-space-20);\n ${cardShellStyles}\n color: var(--st-color-text);\n }\n\n :host([hero]) {\n position: relative;\n overflow: hidden;\n border: 0;\n background: linear-gradient(135deg, var(--st-color-accent) 0%, color-mix(in oklch, var(--st-color-accent) 70%, #3aa8e8) 100%);\n color: var(--st-color-on-solid);\n }\n\n :host([hero])::after {\n content: '';\n position: absolute;\n top: -40%;\n right: -20%;\n width: 60%;\n padding-bottom: 60%;\n border-radius: var(--st-radius-circle);\n background: color-mix(in oklch, var(--st-color-on-solid) 10%, transparent);\n pointer-events: none;\n }\n\n .head {\n display: flex;\n align-items: center;\n gap: var(--st-space-10);\n min-height: 32px;\n font-size: var(--st-text-md);\n font-weight: var(--st-font-weight-medium);\n color: var(--st-color-text-secondary);\n }\n\n :host([hero]) .head {\n color: var(--st-color-on-solid);\n opacity: 0.85;\n }\n\n .icon {\n display: inline-grid;\n place-items: center;\n width: 32px;\n height: 32px;\n border-radius: var(--st-radius-sm);\n background: var(--st-color-accent-subtle);\n flex: none;\n }\n\n :host(:not([has-icon])) .icon {\n display: none;\n }\n\n .value {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: var(--st-space-6);\n margin-top: var(--st-space-14);\n font-size: var(--st-text-kpi);\n font-weight: var(--st-font-weight-bold);\n line-height: 1.1;\n letter-spacing: -0.02em;\n font-variant-numeric: tabular-nums;\n color: var(--st-color-text-strong);\n }\n\n :host([hero]) .value {\n color: var(--st-color-on-solid);\n font-size: var(--st-text-hero);\n }\n\n .unit {\n font-size: var(--st-text-lg);\n font-weight: var(--st-font-weight-medium);\n color: var(--st-color-text-secondary);\n }\n\n :host([hero]) .unit {\n color: var(--st-color-on-solid);\n opacity: 0.85;\n }\n\n .sub {\n margin-top: var(--st-space-6);\n font-size: var(--st-text-base);\n color: var(--st-color-text-muted);\n }\n\n :host([hero]) .sub {\n color: var(--st-color-on-solid);\n opacity: 0.85;\n }\n\n .chips {\n display: flex;\n flex-wrap: wrap;\n gap: var(--st-space-8);\n margin-top: var(--st-space-14);\n }\n\n .chips:empty {\n display: none;\n }\n\n .footer:empty {\n display: none;\n }\n `;\n\n /** Label above the figure. */\n @property({ type: String })\n label = '';\n\n /** The figure, already formatted (for example \"25.88\"). */\n @property({ type: String })\n value = '';\n\n /** Unit shown beside the figure (for example \"lakh\"). */\n @property({ type: String })\n unit = '';\n\n /** Secondary line below the figure (for example the exact amount and the period). */\n @property({ type: String })\n sub = '';\n\n /** The blue gradient headline card. */\n @property({ type: Boolean, reflect: true })\n hero = false;\n\n /** Set when an element is slotted into `icon`, so the icon tile only shows when there is an icon. */\n @property({ type: Boolean, reflect: true, attribute: 'has-icon' })\n hasIcon = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.hasIcon = this.querySelector('[slot=\"icon\"]') !== null;\n }\n\n render() {\n return html`\n <div class=\"head\" part=\"head\">\n <span class=\"icon\" part=\"icon\"><slot name=\"icon\"></slot></span>\n <span part=\"label\">${this.label}</span>\n </div>\n <div class=\"value\" part=\"value\">\n <span>${this.value}</span>\n ${this.unit ? html`<span class=\"unit\" part=\"unit\">${this.unit}</span>` : ''}\n </div>\n ${this.sub ? html`<div class=\"sub\" part=\"sub\">${this.sub}</div>` : ''}\n <div class=\"chips\" part=\"chips\"><slot name=\"chips\"></slot></div>\n <div class=\"footer\" part=\"footer\"><slot name=\"footer\"></slot></div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,YAAY,KAAK,YAAY;AACtC,SAAS,eAAe,gBAAgB;AAajC,IAAM,UAAN,cAAsB,WAAW;AAAA,EAAjC;AAAA;AA0HL,iBAAQ;AAIR,iBAAQ;AAIR,gBAAO;AAIP,eAAM;AAIN,gBAAO;AAIP,mBAAU;AAAA;AAAA,EAEV,oBAAoB;AAClB,UAAM,kBAAkB;AACxB,SAAK,UAAU,KAAK,cAAc,eAAe,MAAM;AAAA,EACzD;AAAA,EAEA,SAAS;AACP,WAAO;AAAA;AAAA;AAAA,6BAGkB,KAAK,KAAK;AAAA;AAAA;AAAA,gBAGvB,KAAK,KAAK;AAAA,UAChB,KAAK,OAAO,sCAAsC,KAAK,IAAI,YAAY,EAAE;AAAA;AAAA,QAE3E,KAAK,MAAM,mCAAmC,KAAK,GAAG,WAAW,EAAE;AAAA;AAAA;AAAA;AAAA,EAIzE;AACF;AApKa,QACJ,SAAS;AAAA,MACZ,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AA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'lit';
3
+
4
+ /**
5
+ * A calendar date tile: a month band over a large day number, as used for due dates. `tone`
6
+ * colours the month band: `default` for a neutral date, `warning` for due soon, `danger` for
7
+ * overdue.
8
+ */
9
+ declare class DateTile extends LitElement {
10
+ static styles: lit.CSSResult;
11
+ /** Month abbreviation shown in the band (for example "NOV"). */
12
+ month: string;
13
+ /** Day of the month (for example "11"). */
14
+ day: string;
15
+ /** Colour of the month band. */
16
+ tone: 'default' | 'warning' | 'danger';
17
+ render(): lit.TemplateResult<1>;
18
+ }
19
+
20
+ export { DateTile };
@@ -0,0 +1,9 @@
1
+ import {
2
+ DateTile
3
+ } from "../chunk-DAGSL2JV.js";
4
+ import "../chunk-KMU6ABQF.js";
5
+ import "../chunk-EUXUH3YW.js";
6
+ export {
7
+ DateTile
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
+ export { AttentionPanel } from './attention-panel/index.js';
2
+ export { BarChart } from './bar-chart/index.js';
1
3
  export { BentoGrid, BentoGridItem } from './bento-grid/index.js';
2
4
  export { Card } from './card/index.js';
3
5
  export { Carousel, CarouselChangeEventDetail } from './carousel/index.js';
6
+ export { Chip } from './chip/index.js';
4
7
  export { ContentBlock } from './content-block/index.js';
5
8
  export { CookieConsent, CookieConsentEventDetail, CookieConsentStatus } from './cookie-consent/index.js';
9
+ export { DateTile } from './date-tile/index.js';
6
10
  export { Dropdown, DropdownToggleEventDetail } from './dropdown/index.js';
7
11
  export { FeatureSplit, FeatureSplitActionEventDetail, FeatureSplitImagePosition, FeatureSplitItem } from './feature-split/index.js';
8
12
  export { FeatureItem, FeatureItemData, FeaturesSection } from './features-section/index.js';
@@ -11,13 +15,15 @@ export { Header, LanguageChangedEventDetail } from './header/index.js';
11
15
  export { Hero, HeroActionEventDetail } from './hero/index.js';
12
16
  export { IconButton } from './icon-button/index.js';
13
17
  export { AccordionItem, AccordionToggleEventDetail, ItemsAccordion } from './items-accordion/index.js';
18
+ export { KpiCard } from './kpi-card/index.js';
14
19
  export { Markdown, MarkdownErrorEventDetail } from './markdown/index.js';
15
20
  export { MegaMenu, MegaMenuColumn, MegaMenuFeature, MegaMenuSelectEventDetail } from './mega-menu/index.js';
16
- export { MenuGrid } from './menu-grid/index.js';
17
21
  export { MenuGridItem, MenuGridItemSelectEventDetail } from './menu-grid-item/index.js';
22
+ export { MenuGrid } from './menu-grid/index.js';
18
23
  export { MenuItem, MenuItemSelectEventDetail } from './menu-item/index.js';
19
24
  export { PromoBanner } from './promo-banner/index.js';
20
25
  export { Section } from './section/index.js';
26
+ export { SegmentChangeEventDetail, SegmentedControl, SegmentedOption } from './segmented-control/index.js';
21
27
  export { Select, SelectChangedEventDetail, SelectOption } from './select/index.js';
22
28
  export { StatItem, Stats } from './stats/index.js';
23
29
  export { TestimonialItem, TestimonialMetric, Testimonials, TestimonialsLinkEventDetail } from './testimonials/index.js';
package/dist/index.js CHANGED
@@ -1,9 +1,35 @@
1
+ import {
2
+ Testimonials
3
+ } from "./chunk-DH53HZPB.js";
4
+ import {
5
+ PromoBanner
6
+ } from "./chunk-VWS53WY4.js";
7
+ import {
8
+ Section
9
+ } from "./chunk-7NLZND6Q.js";
10
+ import {
11
+ SegmentedControl
12
+ } from "./chunk-MG2VTZA4.js";
13
+ import {
14
+ Select
15
+ } from "./chunk-BLQV2YMO.js";
1
16
  import {
2
17
  Stats
3
18
  } from "./chunk-YVTFQHVY.js";
4
19
  import {
5
- Testimonials
6
- } from "./chunk-DH53HZPB.js";
20
+ IconButton
21
+ } from "./chunk-YQ42EBK5.js";
22
+ import {
23
+ ItemsAccordion
24
+ } from "./chunk-ALI26WOB.js";
25
+ import {
26
+ KpiCard
27
+ } from "./chunk-YLY5DXQE.js";
28
+ import {
29
+ MegaMenu,
30
+ MegaMenuColumn,
31
+ MegaMenuFeature
32
+ } from "./chunk-G3CF7MBO.js";
7
33
  import {
8
34
  MenuGrid
9
35
  } from "./chunk-SMLR736E.js";
@@ -14,14 +40,17 @@ import {
14
40
  MenuItem
15
41
  } from "./chunk-R5G6KFTJ.js";
16
42
  import {
17
- PromoBanner
18
- } from "./chunk-VWS53WY4.js";
43
+ CookieConsent
44
+ } from "./chunk-MSSH3HFK.js";
19
45
  import {
20
- Section
21
- } from "./chunk-7NLZND6Q.js";
46
+ DateTile
47
+ } from "./chunk-DAGSL2JV.js";
22
48
  import {
23
- Select
24
- } from "./chunk-BLQV2YMO.js";
49
+ Dropdown
50
+ } from "./chunk-LEXZKGQX.js";
51
+ import {
52
+ FeatureSplit
53
+ } from "./chunk-WT4OATGP.js";
25
54
  import {
26
55
  FeatureItem,
27
56
  FeaturesSection
@@ -32,20 +61,16 @@ import {
32
61
  import {
33
62
  Header
34
63
  } from "./chunk-XWB4CKDU.js";
64
+ import "./chunk-WTD2YIAA.js";
35
65
  import {
36
66
  Hero
37
67
  } from "./chunk-JKBWZLG4.js";
38
68
  import {
39
- IconButton
40
- } from "./chunk-YQ42EBK5.js";
41
- import {
42
- ItemsAccordion
43
- } from "./chunk-ALI26WOB.js";
69
+ AttentionPanel
70
+ } from "./chunk-TVE4EPVK.js";
44
71
  import {
45
- MegaMenu,
46
- MegaMenuColumn,
47
- MegaMenuFeature
48
- } from "./chunk-G3CF7MBO.js";
72
+ BarChart
73
+ } from "./chunk-2TPTJN36.js";
49
74
  import {
50
75
  BentoGrid
51
76
  } from "./chunk-76AVBQUA.js";
@@ -55,19 +80,12 @@ import {
55
80
  import {
56
81
  Carousel
57
82
  } from "./chunk-EMCQBT3S.js";
83
+ import {
84
+ Chip
85
+ } from "./chunk-LGGLQNSU.js";
58
86
  import {
59
87
  ContentBlock
60
88
  } from "./chunk-BMHMNXIA.js";
61
- import {
62
- CookieConsent
63
- } from "./chunk-MSSH3HFK.js";
64
- import {
65
- Dropdown
66
- } from "./chunk-LEXZKGQX.js";
67
- import "./chunk-WTD2YIAA.js";
68
- import {
69
- FeatureSplit
70
- } from "./chunk-WT4OATGP.js";
71
89
  import {
72
90
  Markdown
73
91
  } from "./chunk-5EBWMPJS.js";
@@ -75,11 +93,15 @@ import "./chunk-FZ36KL73.js";
75
93
  import "./chunk-KMU6ABQF.js";
76
94
  import "./chunk-EUXUH3YW.js";
77
95
  export {
96
+ AttentionPanel,
97
+ BarChart,
78
98
  BentoGrid,
79
99
  Card,
80
100
  Carousel,
101
+ Chip,
81
102
  ContentBlock,
82
103
  CookieConsent,
104
+ DateTile,
83
105
  Dropdown,
84
106
  FeatureItem,
85
107
  FeatureSplit,
@@ -89,6 +111,7 @@ export {
89
111
  Hero,
90
112
  IconButton,
91
113
  ItemsAccordion,
114
+ KpiCard,
92
115
  Markdown,
93
116
  MegaMenu,
94
117
  MegaMenuColumn,
@@ -98,6 +121,7 @@ export {
98
121
  MenuItem,
99
122
  PromoBanner,
100
123
  Section,
124
+ SegmentedControl,
101
125
  Select,
102
126
  Stats,
103
127
  Testimonials
@@ -0,0 +1,30 @@
1
+ import * as lit from 'lit';
2
+ import { LitElement } from 'lit';
3
+
4
+ /**
5
+ * A key-figure card for dashboards: a label, one large value with an optional unit (for example
6
+ * "lakh" or "crore"), a secondary line, and a row of chips. The `icon` slot sits beside the label.
7
+ * `hero` gives the blue gradient card used for the headline figure. The value is shown exactly as
8
+ * passed in: format numbers (Indian grouping, currency symbols) before setting it.
9
+ *
10
+ * Slots: `icon` (optional glyph), `chips` (a row of `st-chip`), `footer` (anything below the chips).
11
+ */
12
+ declare class KpiCard extends LitElement {
13
+ static styles: lit.CSSResult;
14
+ /** Label above the figure. */
15
+ label: string;
16
+ /** The figure, already formatted (for example "25.88"). */
17
+ value: string;
18
+ /** Unit shown beside the figure (for example "lakh"). */
19
+ unit: string;
20
+ /** Secondary line below the figure (for example the exact amount and the period). */
21
+ sub: string;
22
+ /** The blue gradient headline card. */
23
+ hero: boolean;
24
+ /** Set when an element is slotted into `icon`, so the icon tile only shows when there is an icon. */
25
+ hasIcon: boolean;
26
+ connectedCallback(): void;
27
+ render(): lit.TemplateResult<1>;
28
+ }
29
+
30
+ export { KpiCard };
@@ -0,0 +1,9 @@
1
+ import {
2
+ KpiCard
3
+ } from "../chunk-YLY5DXQE.js";
4
+ import "../chunk-KMU6ABQF.js";
5
+ import "../chunk-EUXUH3YW.js";
6
+ export {
7
+ KpiCard
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -36,9 +36,13 @@ declare function patchNodeById(nodes: ComponentNode[], id: string, props: Record
36
36
  declare const componentTags: {
37
37
  readonly BentoGrid: "st-bento-grid";
38
38
  readonly Card: "st-card";
39
+ readonly AttentionPanel: "st-attention-panel";
40
+ readonly BarChart: "st-bar-chart";
39
41
  readonly Carousel: "st-carousel";
42
+ readonly Chip: "st-chip";
40
43
  readonly ContentBlock: "st-content-block";
41
44
  readonly CookieConsent: "st-cookie-consent";
45
+ readonly DateTile: "st-date-tile";
42
46
  readonly Dropdown: "st-dropdown";
43
47
  readonly FeatureItem: "st-feature-item";
44
48
  readonly FeatureSplit: "st-feature-split";
@@ -48,6 +52,7 @@ declare const componentTags: {
48
52
  readonly Hero: "st-hero";
49
53
  readonly IconButton: "st-icon-button";
50
54
  readonly ItemsAccordion: "st-items-accordion";
55
+ readonly KpiCard: "st-kpi-card";
51
56
  readonly MegaMenu: "st-mega-menu";
52
57
  readonly MegaMenuColumn: "st-mega-menu-column";
53
58
  readonly MegaMenuFeature: "st-mega-menu-feature";
@@ -55,6 +60,7 @@ declare const componentTags: {
55
60
  readonly MenuGridItem: "st-menu-grid-item";
56
61
  readonly MenuItem: "st-menu-item";
57
62
  readonly PromoBanner: "st-promo-banner";
63
+ readonly SegmentedControl: "st-segmented-control";
58
64
  readonly Section: "st-section";
59
65
  readonly Select: "st-select";
60
66
  readonly Stats: "st-stats";
@@ -17,9 +17,13 @@ function patchNodeById(nodes, id, props) {
17
17
  var componentTags = {
18
18
  BentoGrid: "st-bento-grid",
19
19
  Card: "st-card",
20
+ AttentionPanel: "st-attention-panel",
21
+ BarChart: "st-bar-chart",
20
22
  Carousel: "st-carousel",
23
+ Chip: "st-chip",
21
24
  ContentBlock: "st-content-block",
22
25
  CookieConsent: "st-cookie-consent",
26
+ DateTile: "st-date-tile",
23
27
  Dropdown: "st-dropdown",
24
28
  FeatureItem: "st-feature-item",
25
29
  FeatureSplit: "st-feature-split",
@@ -29,6 +33,7 @@ var componentTags = {
29
33
  Hero: "st-hero",
30
34
  IconButton: "st-icon-button",
31
35
  ItemsAccordion: "st-items-accordion",
36
+ KpiCard: "st-kpi-card",
32
37
  MegaMenu: "st-mega-menu",
33
38
  MegaMenuColumn: "st-mega-menu-column",
34
39
  MegaMenuFeature: "st-mega-menu-feature",
@@ -36,6 +41,7 @@ var componentTags = {
36
41
  MenuGridItem: "st-menu-grid-item",
37
42
  MenuItem: "st-menu-item",
38
43
  PromoBanner: "st-promo-banner",
44
+ SegmentedControl: "st-segmented-control",
39
45
  Section: "st-section",
40
46
  Select: "st-select",
41
47
  Stats: "st-stats",