@sankhyatronics/sankhya-cms 0.1.18 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +11634 -3153
- package/dist/attention-panel/index.js +2 -2
- package/dist/bar-chart/index.js +2 -2
- package/dist/bento-grid/index.d.ts +33 -1
- package/dist/bento-grid/index.js +4 -3
- package/dist/booking/index.d.ts +309 -0
- package/dist/booking/index.js +20 -0
- package/dist/booking/index.js.map +1 -0
- package/dist/card/index.d.ts +3 -4
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.d.ts +20 -6
- package/dist/carousel/index.js +3 -3
- package/dist/chip/index.js +2 -2
- package/dist/{chunk-JQY2G4QK.js → chunk-2GTR37PU.js} +2 -2
- package/dist/chunk-2GTR37PU.js.map +1 -0
- package/dist/{chunk-FLY7TNRT.js → chunk-2HMOX253.js} +128 -25
- package/dist/chunk-2HMOX253.js.map +1 -0
- package/dist/{chunk-DH53HZPB.js → chunk-37KFBKPD.js} +32 -4
- package/dist/chunk-37KFBKPD.js.map +1 -0
- package/dist/{chunk-ALI26WOB.js → chunk-4XPKKYVZ.js} +54 -15
- package/dist/chunk-4XPKKYVZ.js.map +1 -0
- package/dist/chunk-535QAZ6A.js +236 -0
- package/dist/chunk-535QAZ6A.js.map +1 -0
- package/dist/{chunk-AKJQ345O.js → chunk-5AWGZQWU.js} +2 -2
- package/dist/chunk-6OZKZG5J.js +300 -0
- package/dist/chunk-6OZKZG5J.js.map +1 -0
- package/dist/chunk-AYNT7G3J.js +805 -0
- package/dist/chunk-AYNT7G3J.js.map +1 -0
- package/dist/chunk-BEWX3E6P.js +32 -0
- package/dist/chunk-BEWX3E6P.js.map +1 -0
- package/dist/chunk-CZUGPKXV.js +275 -0
- package/dist/chunk-CZUGPKXV.js.map +1 -0
- package/dist/{chunk-LEXZKGQX.js → chunk-DJFWZOZM.js} +107 -11
- package/dist/chunk-DJFWZOZM.js.map +1 -0
- package/dist/chunk-DPANTC3O.js +1714 -0
- package/dist/chunk-DPANTC3O.js.map +1 -0
- package/dist/chunk-EKZFFY45.js +426 -0
- package/dist/chunk-EKZFFY45.js.map +1 -0
- package/dist/chunk-ER7MCPDV.js +7 -0
- package/dist/chunk-ER7MCPDV.js.map +1 -0
- package/dist/chunk-EW2RK5Y6.js +383 -0
- package/dist/chunk-EW2RK5Y6.js.map +1 -0
- package/dist/{chunk-BLQV2YMO.js → chunk-EZOKT7NJ.js} +2 -2
- package/dist/chunk-FF2LWEF3.js +386 -0
- package/dist/chunk-FF2LWEF3.js.map +1 -0
- package/dist/chunk-FOUK3NHR.js +7 -0
- package/dist/chunk-FOUK3NHR.js.map +1 -0
- package/dist/chunk-GB4NGCZI.js +181 -0
- package/dist/chunk-GB4NGCZI.js.map +1 -0
- package/dist/{chunk-7NLZND6Q.js → chunk-GOFSMD6W.js} +35 -11
- package/dist/chunk-GOFSMD6W.js.map +1 -0
- package/dist/{chunk-6D6ROU7X.js → chunk-IGMVF3KK.js} +2 -2
- package/dist/{chunk-INMSEYT6.js → chunk-IVPVYVWG.js} +2 -2
- package/dist/chunk-JURCF4OD.js +381 -0
- package/dist/chunk-JURCF4OD.js.map +1 -0
- package/dist/{chunk-FZ36KL73.js → chunk-KZ7PMFWS.js} +11 -1
- package/dist/chunk-KZ7PMFWS.js.map +1 -0
- package/dist/{chunk-EMCQBT3S.js → chunk-LO6TZBGD.js} +129 -35
- package/dist/chunk-LO6TZBGD.js.map +1 -0
- package/dist/chunk-MFRGAT6D.js +860 -0
- package/dist/chunk-MFRGAT6D.js.map +1 -0
- package/dist/chunk-MIBVQXRU.js +1098 -0
- package/dist/chunk-MIBVQXRU.js.map +1 -0
- package/dist/{chunk-35TX3AOA.js → chunk-NABSRUXG.js} +2 -2
- package/dist/{chunk-R5G6KFTJ.js → chunk-NXKDZWS7.js} +44 -6
- package/dist/chunk-NXKDZWS7.js.map +1 -0
- package/dist/{chunk-KMU6ABQF.js → chunk-NXUS2CH7.js} +14 -1
- package/dist/chunk-NXUS2CH7.js.map +1 -0
- package/dist/{chunk-GJO3RGOB.js → chunk-OCPGOLVF.js} +56 -11
- package/dist/chunk-OCPGOLVF.js.map +1 -0
- package/dist/chunk-OEOE6IFY.js +628 -0
- package/dist/chunk-OEOE6IFY.js.map +1 -0
- package/dist/{chunk-SMLR736E.js → chunk-PV6OCXXN.js} +2 -2
- package/dist/chunk-PV6OCXXN.js.map +1 -0
- package/dist/chunk-Q66CJO3P.js +534 -0
- package/dist/chunk-Q66CJO3P.js.map +1 -0
- package/dist/{chunk-MG2VTZA4.js → chunk-QS3ANOWN.js} +2 -2
- package/dist/{chunk-ZN4LIKVG.js → chunk-QSJ543V2.js} +2 -2
- package/dist/chunk-QSJ543V2.js.map +1 -0
- package/dist/{chunk-FML6AG2V.js → chunk-RANC3OI6.js} +2 -2
- package/dist/chunk-T4BIN37Q.js +32 -0
- package/dist/chunk-T4BIN37Q.js.map +1 -0
- package/dist/{chunk-YVTFQHVY.js → chunk-TEAZZPDQ.js} +2 -2
- package/dist/chunk-TJK55CJ2.js +49 -0
- package/dist/chunk-TJK55CJ2.js.map +1 -0
- package/dist/chunk-UKIVLF7S.js +32 -0
- package/dist/chunk-UKIVLF7S.js.map +1 -0
- package/dist/chunk-V4R7PYP5.js +905 -0
- package/dist/chunk-V4R7PYP5.js.map +1 -0
- package/dist/{chunk-AG2COC64.js → chunk-VVYQ2DDS.js} +2 -2
- package/dist/chunk-WAMOAAMN.js +16 -0
- package/dist/chunk-WAMOAAMN.js.map +1 -0
- package/dist/chunk-WAYHHL4J.js +1234 -0
- package/dist/chunk-WAYHHL4J.js.map +1 -0
- package/dist/{chunk-YQ42EBK5.js → chunk-WH6HE6SY.js} +10 -4
- package/dist/chunk-WH6HE6SY.js.map +1 -0
- package/dist/chunk-XP6DI3VY.js +180 -0
- package/dist/chunk-XP6DI3VY.js.map +1 -0
- package/dist/{chunk-5EBWMPJS.js → chunk-XS6LNTSH.js} +76 -14
- package/dist/chunk-XS6LNTSH.js.map +1 -0
- package/dist/{chunk-WT4OATGP.js → chunk-ZKFCDVB4.js} +16 -7
- package/dist/chunk-ZKFCDVB4.js.map +1 -0
- package/dist/cms-theme.css +29 -0
- package/dist/contact-form/index.d.ts +220 -0
- package/dist/contact-form/index.js +16 -0
- package/dist/contact-form/index.js.map +1 -0
- package/dist/content-block/index.d.ts +39 -4
- package/dist/content-block/index.js +8 -4
- package/dist/cookie-consent/index.d.ts +60 -12
- package/dist/cookie-consent/index.js +3 -2
- package/dist/date-tile/index.js +2 -2
- package/dist/dropdown/index.d.ts +29 -11
- package/dist/dropdown/index.js +4 -2
- package/dist/feature-split/index.d.ts +6 -1
- package/dist/feature-split/index.js +5 -4
- package/dist/features-section/index.d.ts +53 -9
- package/dist/features-section/index.js +6 -5
- package/dist/flow/index.d.ts +35 -0
- package/dist/flow/index.js +9 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/footer/index.d.ts +13 -0
- package/dist/footer/index.js +2 -2
- package/dist/header/index.d.ts +135 -16
- package/dist/header/index.js +3 -2
- package/dist/hero/index.d.ts +92 -8
- package/dist/hero/index.js +6 -3
- package/dist/icon-button/index.d.ts +7 -7
- package/dist/icon-button/index.js +2 -2
- package/dist/index.d.ts +12 -3
- package/dist/index.js +121 -47
- package/dist/items-accordion/index.d.ts +9 -0
- package/dist/items-accordion/index.js +4 -3
- package/dist/kpi-card/index.js +2 -2
- package/dist/markdown/index.d.ts +19 -2
- package/dist/markdown/index.js +3 -2
- package/dist/mega-menu/index.d.ts +95 -7
- package/dist/mega-menu/index.js +7 -2
- package/dist/menu-grid/index.d.ts +2 -3
- package/dist/menu-grid/index.js +2 -2
- package/dist/menu-grid-item/index.d.ts +6 -8
- package/dist/menu-grid-item/index.js +2 -2
- package/dist/menu-item/index.d.ts +11 -7
- package/dist/menu-item/index.js +3 -2
- package/dist/plan-cards/index.d.ts +69 -0
- package/dist/plan-cards/index.js +13 -0
- package/dist/plan-cards/index.js.map +1 -0
- package/dist/product-nav/index.d.ts +127 -0
- package/dist/product-nav/index.js +11 -0
- package/dist/product-nav/index.js.map +1 -0
- package/dist/promo-banner/index.d.ts +42 -4
- package/dist/promo-banner/index.js +6 -3
- package/dist/quote-dialog/index.d.ts +174 -0
- package/dist/quote-dialog/index.js +22 -0
- package/dist/quote-dialog/index.js.map +1 -0
- package/dist/schema/index.d.ts +11 -0
- package/dist/schema/index.js +9 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/screenshot-tour/index.d.ts +54 -0
- package/dist/screenshot-tour/index.js +9 -0
- package/dist/screenshot-tour/index.js.map +1 -0
- package/dist/section/index.d.ts +3 -0
- package/dist/section/index.js +3 -3
- package/dist/segmented-control/index.js +2 -2
- package/dist/select/index.js +2 -2
- package/dist/shared/styles.d.ts +7 -1
- package/dist/shared/styles.js +3 -1
- package/dist/stats/index.js +2 -2
- package/dist/steps/index.d.ts +45 -0
- package/dist/steps/index.js +11 -0
- package/dist/steps/index.js.map +1 -0
- package/dist/tag-strip/index.d.ts +33 -0
- package/dist/tag-strip/index.js +9 -0
- package/dist/tag-strip/index.js.map +1 -0
- package/dist/testimonials/index.d.ts +9 -1
- package/dist/testimonials/index.js +3 -3
- package/dist/tooltip/index.js +2 -2
- package/package.json +38 -2
- package/dist/chunk-5EBWMPJS.js.map +0 -1
- package/dist/chunk-76AVBQUA.js +0 -252
- package/dist/chunk-76AVBQUA.js.map +0 -1
- package/dist/chunk-7NLZND6Q.js.map +0 -1
- package/dist/chunk-ALI26WOB.js.map +0 -1
- package/dist/chunk-BMHMNXIA.js +0 -158
- package/dist/chunk-BMHMNXIA.js.map +0 -1
- package/dist/chunk-DH53HZPB.js.map +0 -1
- package/dist/chunk-EMCQBT3S.js.map +0 -1
- package/dist/chunk-FLY7TNRT.js.map +0 -1
- package/dist/chunk-FZ36KL73.js.map +0 -1
- package/dist/chunk-GJO3RGOB.js.map +0 -1
- package/dist/chunk-J6EO4R73.js +0 -633
- package/dist/chunk-J6EO4R73.js.map +0 -1
- package/dist/chunk-JKBWZLG4.js +0 -348
- package/dist/chunk-JKBWZLG4.js.map +0 -1
- package/dist/chunk-JQY2G4QK.js.map +0 -1
- package/dist/chunk-KMU6ABQF.js.map +0 -1
- package/dist/chunk-LEXZKGQX.js.map +0 -1
- package/dist/chunk-MSSH3HFK.js +0 -205
- package/dist/chunk-MSSH3HFK.js.map +0 -1
- package/dist/chunk-R5G6KFTJ.js.map +0 -1
- package/dist/chunk-SMLR736E.js.map +0 -1
- package/dist/chunk-VWS53WY4.js +0 -157
- package/dist/chunk-VWS53WY4.js.map +0 -1
- package/dist/chunk-WT4OATGP.js.map +0 -1
- package/dist/chunk-XWB4CKDU.js +0 -708
- package/dist/chunk-XWB4CKDU.js.map +0 -1
- package/dist/chunk-YQ42EBK5.js.map +0 -1
- package/dist/chunk-ZN4LIKVG.js.map +0 -1
- /package/dist/{chunk-AKJQ345O.js.map → chunk-5AWGZQWU.js.map} +0 -0
- /package/dist/{chunk-BLQV2YMO.js.map → chunk-EZOKT7NJ.js.map} +0 -0
- /package/dist/{chunk-6D6ROU7X.js.map → chunk-IGMVF3KK.js.map} +0 -0
- /package/dist/{chunk-INMSEYT6.js.map → chunk-IVPVYVWG.js.map} +0 -0
- /package/dist/{chunk-35TX3AOA.js.map → chunk-NABSRUXG.js.map} +0 -0
- /package/dist/{chunk-MG2VTZA4.js.map → chunk-QS3ANOWN.js.map} +0 -0
- /package/dist/{chunk-FML6AG2V.js.map → chunk-RANC3OI6.js.map} +0 -0
- /package/dist/{chunk-YVTFQHVY.js.map → chunk-TEAZZPDQ.js.map} +0 -0
- /package/dist/{chunk-AG2COC64.js.map → chunk-VVYQ2DDS.js.map} +0 -0
package/dist/bar-chart/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { LitElement } from 'lit';
|
|
|
3
3
|
|
|
4
4
|
interface BentoGridItem {
|
|
5
5
|
title: string;
|
|
6
|
+
/** Markdown. */
|
|
6
7
|
description?: string;
|
|
7
8
|
/** Iconify icon name, e.g. `mdi:home`. */
|
|
8
9
|
icon?: string;
|
|
@@ -10,13 +11,44 @@ interface BentoGridItem {
|
|
|
10
11
|
imageAlt?: string;
|
|
11
12
|
colSpan?: 1 | 2 | 3 | 4;
|
|
12
13
|
rowSpan?: 1 | 2;
|
|
13
|
-
/**
|
|
14
|
+
/** Without `actionLabel`, turns the whole card into a link. */
|
|
14
15
|
href?: string;
|
|
16
|
+
/** `default` (surface), `primary` (brand fill, white text) or `dark` (navy fill, light text). */
|
|
17
|
+
variant?: 'default' | 'primary' | 'dark';
|
|
18
|
+
/** With `href`, renders a button-style link inside the card instead of linking the whole card. */
|
|
19
|
+
actionLabel?: string;
|
|
20
|
+
/** Accessible name of the action when its visible label repeats across cards (e.g. "See how: Controlled Outsourcing"). */
|
|
21
|
+
actionAriaLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Small rounded labels. On a full-width card (`colSpan: 4`) they sit in a 3-column grid to the
|
|
24
|
+
* right of the text; otherwise below it.
|
|
25
|
+
*/
|
|
26
|
+
chips?: BentoGridChip[];
|
|
27
|
+
/** `stack` (default) puts the action under the text; `row` puts the text left and the action right. */
|
|
28
|
+
layout?: 'stack' | 'row';
|
|
29
|
+
}
|
|
30
|
+
interface BentoGridChip {
|
|
31
|
+
label: string;
|
|
32
|
+
/** `solid` navy with white text, `soft` light blue, `plain` the surface tint. Default `plain`. */
|
|
33
|
+
tone?: 'solid' | 'soft' | 'plain';
|
|
15
34
|
}
|
|
16
35
|
/**
|
|
17
36
|
* A responsive 4-column bento grid of icon/image cards. Items are set via the `items` property.
|
|
37
|
+
* Descriptions are Markdown. A card links as a whole when it has `href` alone; with `actionLabel`
|
|
38
|
+
* the link becomes a button inside the card.
|
|
39
|
+
*
|
|
40
|
+
* A card that uses `chips` or `layout` takes the design-system look: a 32px padding, a 40px icon
|
|
41
|
+
* tile on a light blue (cyan on `primary` and `dark` cards), and on a `primary` card the action is a
|
|
42
|
+
* white navy-text pill. Cards without those options keep the original look.
|
|
18
43
|
*
|
|
19
44
|
* @cssprop --st-bento-grid-padding - Overrides the block's padding.
|
|
45
|
+
* @cssprop --st-bento-card-border - Overrides the colour of the cards' hairline border (default `--st-color-border`).
|
|
46
|
+
* @cssprop --st-bento-description-color - Colour of a design-system card's description (default `--st-cms-text`).
|
|
47
|
+
* @cssprop --st-bento-chip-soft-bg - Background of `soft` chips (default `--st-cms-primary-100`).
|
|
48
|
+
* @cssprop --st-bento-chip-plain-bg - Background of `plain` chips (default `--st-cms-surface-soft`).
|
|
49
|
+
* @cssprop --st-bento-chip-text - Text colour of non-solid chips (default `--st-cms-text-strong`).
|
|
50
|
+
* @csspart chips - The list of chips.
|
|
51
|
+
* @csspart chip - One chip.
|
|
20
52
|
*/
|
|
21
53
|
declare class BentoGrid extends LitElement {
|
|
22
54
|
static styles: lit.CSSResult;
|
package/dist/bento-grid/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BentoGrid
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-Q66CJO3P.js";
|
|
4
|
+
import "../chunk-TJK55CJ2.js";
|
|
5
|
+
import "../chunk-KZ7PMFWS.js";
|
|
6
|
+
import "../chunk-NXUS2CH7.js";
|
|
6
7
|
import "../chunk-EUXUH3YW.js";
|
|
7
8
|
export {
|
|
8
9
|
BentoGrid
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DOM-free logic behind `st-booking`: the typed reading of Suite Core's public bookings API, the
|
|
6
|
+
* client-side checks of the visitor's details, the request calls, and the calendar arithmetic. The server's
|
|
7
|
+
* rules stay authoritative; the checks here only give the visitor an answer before a request is made. Kept
|
|
8
|
+
* apart from `Booking.ts` so every rule and every response case can be unit-tested without a browser.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** The fields of the details form, in the order it shows them. Focus moves through them in this order. */
|
|
12
|
+
declare const BOOKING_FIELD_NAMES: readonly ["name", "email", "phone", "notes", "consent"];
|
|
13
|
+
type BookingFieldName = (typeof BOOKING_FIELD_NAMES)[number];
|
|
14
|
+
interface BookingStaff {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
interface BookingService {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
durationMinutes: number;
|
|
23
|
+
online: boolean;
|
|
24
|
+
staff: BookingStaff[];
|
|
25
|
+
}
|
|
26
|
+
interface BookingSlot {
|
|
27
|
+
/** RFC 3339 UTC instant. */
|
|
28
|
+
start: string;
|
|
29
|
+
end: string;
|
|
30
|
+
staffIds: string[];
|
|
31
|
+
}
|
|
32
|
+
interface BookingInfo {
|
|
33
|
+
/** A signed token. It is the only key to the booking: never logged, never put in an event. */
|
|
34
|
+
reference: string;
|
|
35
|
+
serviceId: string;
|
|
36
|
+
serviceName: string;
|
|
37
|
+
start: string;
|
|
38
|
+
end: string;
|
|
39
|
+
}
|
|
40
|
+
/** The client-side messages. `{field}` and `{max}` are filled in. The server's own messages are shown as sent. */
|
|
41
|
+
interface BookingErrorMessages {
|
|
42
|
+
required: string;
|
|
43
|
+
tooLong: string;
|
|
44
|
+
invalidEmail: string;
|
|
45
|
+
invalidPhone: string;
|
|
46
|
+
consentRequired: string;
|
|
47
|
+
}
|
|
48
|
+
type BookingErrors = Partial<Record<BookingFieldName, string>>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Every visible string of `st-booking`, in English. A page replaces the ones it wants through the element's
|
|
52
|
+
* `labels` property (only the keys given are replaced). `{name}` placeholders are filled in by the component.
|
|
53
|
+
* The text the server sends for a field is shown as it is sent; everything else comes from here.
|
|
54
|
+
*/
|
|
55
|
+
interface BookingLabels {
|
|
56
|
+
stepService: string;
|
|
57
|
+
stepTime: string;
|
|
58
|
+
stepDetails: string;
|
|
59
|
+
stepDone: string;
|
|
60
|
+
stepsLabel: string;
|
|
61
|
+
serviceHeading: string;
|
|
62
|
+
staffLegend: string;
|
|
63
|
+
anyStaff: string;
|
|
64
|
+
/** `{minutes}` */
|
|
65
|
+
duration: string;
|
|
66
|
+
online: string;
|
|
67
|
+
noServices: string;
|
|
68
|
+
timeHeading: string;
|
|
69
|
+
rescheduleHeading: string;
|
|
70
|
+
previousMonth: string;
|
|
71
|
+
nextMonth: string;
|
|
72
|
+
/** `{date}` */
|
|
73
|
+
timesHeading: string;
|
|
74
|
+
/** `{zone}` */
|
|
75
|
+
timeZoneNote: string;
|
|
76
|
+
chooseDay: string;
|
|
77
|
+
/** `{count}` and `{date}` */
|
|
78
|
+
slotsAvailable: string;
|
|
79
|
+
/** `{month}` */
|
|
80
|
+
noSlots: string;
|
|
81
|
+
loading: string;
|
|
82
|
+
back: string;
|
|
83
|
+
continue: string;
|
|
84
|
+
confirmReschedule: string;
|
|
85
|
+
detailsHeading: string;
|
|
86
|
+
nameLabel: string;
|
|
87
|
+
namePlaceholder: string;
|
|
88
|
+
emailLabel: string;
|
|
89
|
+
emailPlaceholder: string;
|
|
90
|
+
phoneLabel: string;
|
|
91
|
+
notesLabel: string;
|
|
92
|
+
notesPlaceholder: string;
|
|
93
|
+
/** `{count}` and `{max}` */
|
|
94
|
+
notesCounter: string;
|
|
95
|
+
consentLabel: string;
|
|
96
|
+
requiredLabel: string;
|
|
97
|
+
requiredNote: string;
|
|
98
|
+
submit: string;
|
|
99
|
+
sending: string;
|
|
100
|
+
bookedHeading: string;
|
|
101
|
+
bookingHeading: string;
|
|
102
|
+
bookedNote: string;
|
|
103
|
+
rescheduledNote: string;
|
|
104
|
+
serviceLabel: string;
|
|
105
|
+
whenLabel: string;
|
|
106
|
+
manageLinkLabel: string;
|
|
107
|
+
manageLinkHint: string;
|
|
108
|
+
copyLink: string;
|
|
109
|
+
linkCopied: string;
|
|
110
|
+
reschedule: string;
|
|
111
|
+
cancel: string;
|
|
112
|
+
cancelConfirm: string;
|
|
113
|
+
cancelYes: string;
|
|
114
|
+
cancelNo: string;
|
|
115
|
+
cancelledHeading: string;
|
|
116
|
+
cancelledNote: string;
|
|
117
|
+
bookAnother: string;
|
|
118
|
+
errorNote: string;
|
|
119
|
+
retry: string;
|
|
120
|
+
slotTakenNote: string;
|
|
121
|
+
tooLateNote: string;
|
|
122
|
+
notFoundNote: string;
|
|
123
|
+
/** `{seconds}` */
|
|
124
|
+
rateLimitedNote: string;
|
|
125
|
+
rateLimitedGenericNote: string;
|
|
126
|
+
validationNote: string;
|
|
127
|
+
}
|
|
128
|
+
declare const DEFAULT_BOOKING_LABELS: BookingLabels;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* A booking experience for a website, in place of Microsoft's own Bookings page: pick a service, optionally
|
|
132
|
+
* a staff member ("Any available" is the default), pick a day on a calendar and a time, enter name, email,
|
|
133
|
+
* an optional phone and notes, accept the consent box, and get a confirmation with a private link to manage
|
|
134
|
+
* the appointment. It talks to Suite Core's public bookings API under `endpoint`
|
|
135
|
+
* (`{endpoint}/public/v1/bookings/...`, no cookies, no credentials).
|
|
136
|
+
*
|
|
137
|
+
* Times are shown in the visitor's own time zone (through `Intl`, never a fixed zone); the API's instants
|
|
138
|
+
* are UTC. The calendar is a keyboard grid: arrow keys move by day and week, Home/End to the week's start
|
|
139
|
+
* and end, Page Up/Page Down by month. Each step moves focus to its heading, results are announced politely
|
|
140
|
+
* and problems with `role="alert"`.
|
|
141
|
+
*
|
|
142
|
+
* Opening an existing booking: set `reference`, or open the page with `#ref=...` (preferred: a hash is never
|
|
143
|
+
* sent to a server or in a Referer header) or `?ref=...`. The booking shows with Reschedule and Cancel.
|
|
144
|
+
* Reschedule picks a new slot among the availability of the same service. The reference is a signed token and
|
|
145
|
+
* the only key to the booking: it is never put in an event, never logged, and the manage link puts it in the
|
|
146
|
+
* hash. After booking, the link is shown (with a copy button) and a note asks the visitor to keep it private.
|
|
147
|
+
*
|
|
148
|
+
* A hidden honeypot field (`website`) must stay empty. A 409 `slot_taken` reloads the times and says so; a 429
|
|
149
|
+
* shows the wait from `Retry-After`; the text the server sends is shown only for the fields it rejected.
|
|
150
|
+
*
|
|
151
|
+
* Every visible string is in `labels` (English defaults, only the keys given are replaced).
|
|
152
|
+
*
|
|
153
|
+
* @fires st-booking-created - Bubbles and is composed. Detail `{ serviceId: string, start: string }`. No personal data and no reference.
|
|
154
|
+
* @fires st-booking-rescheduled - Bubbles and is composed. Detail `{ serviceId: string, start: string }` (the new start).
|
|
155
|
+
* @fires st-booking-cancelled - Bubbles and is composed. Detail `{ serviceId: string }`.
|
|
156
|
+
* @fires st-booking-error - Bubbles and is composed. Detail `{ kind: 'validation' | 'slot_taken' | 'too_late' | 'not_found' | 'rate_limited' | 'unavailable' }`.
|
|
157
|
+
* @csspart steps - The step indicator.
|
|
158
|
+
* @csspart heading - The heading of the current step.
|
|
159
|
+
* @csspart service - Each service choice.
|
|
160
|
+
* @csspart calendar - The month grid.
|
|
161
|
+
* @csspart day - Each day button.
|
|
162
|
+
* @csspart slot - Each time button.
|
|
163
|
+
* @csspart field - Each field's wrapper (label, control and error).
|
|
164
|
+
* @csspart label - Each field's label.
|
|
165
|
+
* @csspart input - Each text input and the notes textarea.
|
|
166
|
+
* @csspart error - Each field's error message.
|
|
167
|
+
* @csspart button - Every button except the primary one.
|
|
168
|
+
* @csspart primary - The primary button of a step.
|
|
169
|
+
* @csspart success - The success note.
|
|
170
|
+
* @csspart alert - The alert (rate limit, taken slot, unavailable, or a server message that is not on one field).
|
|
171
|
+
* @csspart summary - The service, date and time of a booking.
|
|
172
|
+
*/
|
|
173
|
+
declare class Booking extends LitElement {
|
|
174
|
+
static styles: lit.CSSResult;
|
|
175
|
+
/** Base URL of the Suite Core API, without a path (`https://api.apps.example.com`). The component calls `{endpoint}/public/v1/bookings/...`. Empty: the component shows the unavailable note without sending anything. */
|
|
176
|
+
endpoint: string;
|
|
177
|
+
/** A booking reference to open (the signed token from a manage link). Empty: the page's `#ref=` or `?ref=` is used, else a new booking starts. Treat it as a secret. */
|
|
178
|
+
reference: string;
|
|
179
|
+
/** Preselects a service by id and skips the service step, when the API lists it. */
|
|
180
|
+
serviceId: string;
|
|
181
|
+
/** The first day of the calendar's week: `1` (Monday, the default) or `0` (Sunday). */
|
|
182
|
+
weekStart: 0 | 1;
|
|
183
|
+
/** Language for dates and times (a BCP 47 tag). Empty uses the page's `lang`, or the browser's. */
|
|
184
|
+
locale: string;
|
|
185
|
+
/** The address the manage link points at. Empty uses the current page. The reference goes in its hash. */
|
|
186
|
+
manageUrl: string;
|
|
187
|
+
/** Replaces the English texts. Only the keys given are replaced. See `BookingLabels`. */
|
|
188
|
+
labels: Partial<BookingLabels>;
|
|
189
|
+
/** Replaces the English validation messages (`required`, `tooLong`, ...). Only the keys given are replaced. */
|
|
190
|
+
errorMessages: Partial<BookingErrorMessages>;
|
|
191
|
+
private view;
|
|
192
|
+
private mode;
|
|
193
|
+
private services;
|
|
194
|
+
private service?;
|
|
195
|
+
private staffId;
|
|
196
|
+
private month;
|
|
197
|
+
private slots;
|
|
198
|
+
private slotsLoading;
|
|
199
|
+
private selectedDay;
|
|
200
|
+
private focusDay;
|
|
201
|
+
private selectedSlot?;
|
|
202
|
+
private booking?;
|
|
203
|
+
private banner;
|
|
204
|
+
private confirmingCancel;
|
|
205
|
+
private busy;
|
|
206
|
+
private errors;
|
|
207
|
+
private alertText;
|
|
208
|
+
private notice;
|
|
209
|
+
private notesLength;
|
|
210
|
+
/** The reference in use: the property, the page URL, or the one the API just gave. Never rendered or sent anywhere but the API. */
|
|
211
|
+
private activeReference;
|
|
212
|
+
private inflight;
|
|
213
|
+
private slotsRun;
|
|
214
|
+
/** What the details form held when the visitor went back to change the time, so nothing typed is lost. */
|
|
215
|
+
private draft;
|
|
216
|
+
disconnectedCallback(): void;
|
|
217
|
+
protected updated(changed: Map<PropertyKey, unknown>): void;
|
|
218
|
+
private text;
|
|
219
|
+
private messages;
|
|
220
|
+
private fieldLabels;
|
|
221
|
+
private format;
|
|
222
|
+
private fullDate;
|
|
223
|
+
private timeOfDay;
|
|
224
|
+
private whenText;
|
|
225
|
+
private monthName;
|
|
226
|
+
private zoneName;
|
|
227
|
+
private resetState;
|
|
228
|
+
/** Opens an existing booking when there is a reference, else starts at the services. */
|
|
229
|
+
private start;
|
|
230
|
+
private loadServices;
|
|
231
|
+
private loadBooking;
|
|
232
|
+
/** Switches the step, clears the last problem and moves focus to the new step's heading. */
|
|
233
|
+
private go;
|
|
234
|
+
/** Shows the note for a failed call and reports it. `next` is the step to show (when it should change). */
|
|
235
|
+
private fail;
|
|
236
|
+
private chooseService;
|
|
237
|
+
/** Loads the current month's times. With `advance`, an empty month moves on to the next, up to a few months. */
|
|
238
|
+
private loadSlots;
|
|
239
|
+
private shiftMonth;
|
|
240
|
+
private onStaffChange;
|
|
241
|
+
private pickDay;
|
|
242
|
+
private pickSlot;
|
|
243
|
+
private onGridKeydown;
|
|
244
|
+
private monthDelta;
|
|
245
|
+
private focusDayButton;
|
|
246
|
+
private continueFromTime;
|
|
247
|
+
private backFromTime;
|
|
248
|
+
private book;
|
|
249
|
+
/** Server messages go on the fields that exist; a rejected start or staff means the time must be picked again. */
|
|
250
|
+
private applyServerErrors;
|
|
251
|
+
private reschedule;
|
|
252
|
+
private startReschedule;
|
|
253
|
+
private cancelBooking;
|
|
254
|
+
private freshController;
|
|
255
|
+
private bookAnother;
|
|
256
|
+
private copyLink;
|
|
257
|
+
private manageLink;
|
|
258
|
+
private readText;
|
|
259
|
+
private readValues;
|
|
260
|
+
private focusField;
|
|
261
|
+
private heading;
|
|
262
|
+
private renderSteps;
|
|
263
|
+
private renderServices;
|
|
264
|
+
private renderStaff;
|
|
265
|
+
private renderCalendar;
|
|
266
|
+
private renderTime;
|
|
267
|
+
private requiredMark;
|
|
268
|
+
private renderInput;
|
|
269
|
+
private renderDetails;
|
|
270
|
+
private renderBooking;
|
|
271
|
+
private renderCancelled;
|
|
272
|
+
private renderRetry;
|
|
273
|
+
private renderView;
|
|
274
|
+
render(): lit.TemplateResult<1>;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/** Fired on `st-booking` once a new appointment is booked. Detail `{ serviceId, start }`. Bubbles and is composed. */
|
|
278
|
+
declare const BOOKING_CREATED_EVENT = "st-booking-created";
|
|
279
|
+
/** Fired on `st-booking` once an appointment is moved. Detail `{ serviceId, start }` (the new start). Bubbles and is composed. */
|
|
280
|
+
declare const BOOKING_RESCHEDULED_EVENT = "st-booking-rescheduled";
|
|
281
|
+
/** Fired on `st-booking` once an appointment is cancelled. Detail `{ serviceId }`. Bubbles and is composed. */
|
|
282
|
+
declare const BOOKING_CANCELLED_EVENT = "st-booking-cancelled";
|
|
283
|
+
/** Fired on `st-booking` when a call was not accepted. Detail `{ kind }`. Bubbles and is composed. */
|
|
284
|
+
declare const BOOKING_ERROR_EVENT = "st-booking-error";
|
|
285
|
+
/**
|
|
286
|
+
* Why a call was not accepted: `validation` (the server rejected a field), `slot_taken` (someone else took
|
|
287
|
+
* the time), `too_late` (the appointment has started or is too close to change), `not_found` (no such
|
|
288
|
+
* booking or service), `rate_limited` (too many requests) or `unavailable` (the API could not be reached,
|
|
289
|
+
* is switched off, or failed).
|
|
290
|
+
*/
|
|
291
|
+
type BookingErrorKind = 'validation' | 'slot_taken' | 'too_late' | 'not_found' | 'rate_limited' | 'unavailable';
|
|
292
|
+
interface BookingCreatedEventDetail {
|
|
293
|
+
serviceId: string;
|
|
294
|
+
/** RFC 3339 UTC instant. */
|
|
295
|
+
start: string;
|
|
296
|
+
}
|
|
297
|
+
interface BookingRescheduledEventDetail {
|
|
298
|
+
serviceId: string;
|
|
299
|
+
/** RFC 3339 UTC instant of the new time. */
|
|
300
|
+
start: string;
|
|
301
|
+
}
|
|
302
|
+
interface BookingCancelledEventDetail {
|
|
303
|
+
serviceId: string;
|
|
304
|
+
}
|
|
305
|
+
interface BookingErrorEventDetail {
|
|
306
|
+
kind: BookingErrorKind;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export { BOOKING_CANCELLED_EVENT, BOOKING_CREATED_EVENT, BOOKING_ERROR_EVENT, BOOKING_RESCHEDULED_EVENT, Booking, type BookingCancelledEventDetail, type BookingCreatedEventDetail, type BookingErrorEventDetail, type BookingErrorKind, type BookingErrorMessages, type BookingErrors, type BookingFieldName, type BookingInfo, type BookingLabels, type BookingRescheduledEventDetail, type BookingService, type BookingSlot, type BookingStaff, DEFAULT_BOOKING_LABELS };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BOOKING_CANCELLED_EVENT,
|
|
3
|
+
BOOKING_CREATED_EVENT,
|
|
4
|
+
BOOKING_ERROR_EVENT,
|
|
5
|
+
BOOKING_RESCHEDULED_EVENT,
|
|
6
|
+
Booking,
|
|
7
|
+
DEFAULT_BOOKING_LABELS
|
|
8
|
+
} from "../chunk-DPANTC3O.js";
|
|
9
|
+
import "../chunk-CZUGPKXV.js";
|
|
10
|
+
import "../chunk-NXUS2CH7.js";
|
|
11
|
+
import "../chunk-EUXUH3YW.js";
|
|
12
|
+
export {
|
|
13
|
+
BOOKING_CANCELLED_EVENT,
|
|
14
|
+
BOOKING_CREATED_EVENT,
|
|
15
|
+
BOOKING_ERROR_EVENT,
|
|
16
|
+
BOOKING_RESCHEDULED_EVENT,
|
|
17
|
+
Booking,
|
|
18
|
+
DEFAULT_BOOKING_LABELS
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/card/index.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ import * as lit from 'lit';
|
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* A surfaced container — content goes in the default slot.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `sm|md|lg`, spelled like `paddingScaleStyles`); `elevation` takes `none | sm | md | lg`.
|
|
5
|
+
* A surfaced container — content goes in the default slot. Attributes: `variant`, `padding`,
|
|
6
|
+
* `elevation`, `hoverable`, `inverted`; a click handler is just a native `click` listener on the
|
|
7
|
+
* element. `padding` takes `none | small | medium | large`; `elevation` takes `none | sm | md | lg`.
|
|
9
8
|
*/
|
|
10
9
|
declare class Card extends LitElement {
|
|
11
10
|
static styles: lit.CSSResult;
|
package/dist/card/index.js
CHANGED
package/dist/carousel/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ import { LitElement } from 'lit';
|
|
|
7
7
|
* of the source's framer-motion spring), or fades in with `transition="fade"`. Autoplay pauses
|
|
8
8
|
* while hovered (unless `pause-on-hover` is turned off, e.g. for a full-screen hero the pointer
|
|
9
9
|
* nearly always rests on) or focused, and stops when the element is disconnected; a paused slide
|
|
10
|
-
* keeps the time it had left.
|
|
10
|
+
* keeps the time it had left. Under `prefers-reduced-motion: reduce` autoplay starts paused; the
|
|
11
|
+
* tabs' play button still starts it.
|
|
11
12
|
*
|
|
12
13
|
* `indicator-style="tabs"` replaces the dots with a row of labelled tabs along the bottom, each
|
|
13
14
|
* with a progress bar that fills while its slide is showing, plus a pause button — the tabbed hero
|
|
@@ -42,12 +43,18 @@ declare class Carousel extends LitElement {
|
|
|
42
43
|
private slideLabels;
|
|
43
44
|
/** Paused with the pause button; stays paused until the button is pressed again. */
|
|
44
45
|
private userPaused;
|
|
45
|
-
/**
|
|
46
|
-
private
|
|
46
|
+
/** Pointer is over the carousel (only counts with `pause-on-hover`). */
|
|
47
|
+
private hovered;
|
|
48
|
+
/** Focus is inside the carousel, other than the play button. */
|
|
49
|
+
private focused;
|
|
50
|
+
/** False until the slides first change: the first slide is on screen at first paint and does not animate. */
|
|
51
|
+
private turned;
|
|
47
52
|
private timer?;
|
|
48
53
|
/** Time left on the current slide, so a pause resumes where it stopped. */
|
|
49
54
|
private remaining;
|
|
50
55
|
private startedAt;
|
|
56
|
+
private reducedMotion?;
|
|
57
|
+
private onReducedMotionChange;
|
|
51
58
|
connectedCallback(): void;
|
|
52
59
|
disconnectedCallback(): void;
|
|
53
60
|
protected willUpdate(changed: Map<string, unknown>): void;
|
|
@@ -55,14 +62,21 @@ declare class Carousel extends LitElement {
|
|
|
55
62
|
private get halted();
|
|
56
63
|
/** Applies a pause-state change, freezing or resuming the timer (and the tab progress bar). */
|
|
57
64
|
private hold;
|
|
58
|
-
private
|
|
59
|
-
private
|
|
60
|
-
|
|
65
|
+
private onPointerEnter;
|
|
66
|
+
private onPointerLeave;
|
|
67
|
+
/** Focus inside the carousel pauses it (WCAG 2.2.2), but focusing the play button does not, so pressing play starts it. */
|
|
68
|
+
private onFocusIn;
|
|
69
|
+
private onFocusOut;
|
|
61
70
|
private togglePlay;
|
|
62
71
|
private get slides();
|
|
63
72
|
private labelFor;
|
|
64
73
|
private syncSlides;
|
|
65
74
|
private onSlotChange;
|
|
75
|
+
/**
|
|
76
|
+
* The first slide's image is the one visitors see first, so it is preloaded at high priority. The
|
|
77
|
+
* other slides are display:none (their CSS backgrounds are not fetched) until they are shown.
|
|
78
|
+
*/
|
|
79
|
+
private preloadImage;
|
|
66
80
|
private stopTimer;
|
|
67
81
|
private startTimer;
|
|
68
82
|
private restartTimer;
|
package/dist/carousel/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Carousel
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-LO6TZBGD.js";
|
|
4
|
+
import "../chunk-KZ7PMFWS.js";
|
|
5
|
+
import "../chunk-NXUS2CH7.js";
|
|
6
6
|
import "../chunk-EUXUH3YW.js";
|
|
7
7
|
export {
|
|
8
8
|
Carousel
|
package/dist/chip/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
controlBaseStyles,
|
|
3
3
|
fontFamilyStyles
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NXUS2CH7.js";
|
|
5
5
|
import {
|
|
6
6
|
__decorateClass
|
|
7
7
|
} from "./chunk-EUXUH3YW.js";
|
|
@@ -309,4 +309,4 @@ MenuGridItem = __decorateClass([
|
|
|
309
309
|
export {
|
|
310
310
|
MenuGridItem
|
|
311
311
|
};
|
|
312
|
-
//# sourceMappingURL=chunk-
|
|
312
|
+
//# sourceMappingURL=chunk-2GTR37PU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/menu-grid-item/MenuGridItem.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport type { MenuGridItemSelectEventDetail } from './MenuGridItemEvents';\n\n/**\n * One entry in an `st-menu-grid` — icon (via `slot=\"icon\"`) + title on one line, an optional\n * description below, and an optional corner badge (\"New\", \"Popular\", ...). Effects are CSS:\n * fades up the first time it scrolls into view, scales to 1.02 on hover / 0.98 while pressed, the\n * icon tilts on hover, the badge pops in. Colors come from the suite theme rather than per-item\n * utility classes.\n *\n * An `http(s)` `href` opens in a new tab. Any other `href` fires a *cancelable*\n * `menu-grid-item-select` event (detail: `{ href }`) first: a host doing client-side routing calls\n * `event.preventDefault()` on it, which also cancels the anchor's own navigation.\n */\n@customElement('st-menu-grid-item')\nexport class MenuGridItem extends LitElement {\n /** `focus()` on the element focuses its link, so `st-dropdown` can arrow-key between items. */\n static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };\n\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n ${fontFamilyStyles}\n }\n\n @keyframes st-menu-grid-badge-pop {\n from {\n transform: scale(0);\n }\n 70% {\n transform: scale(1.12);\n }\n to {\n transform: scale(1);\n }\n }\n\n .menu-grid-item {\n display: flex;\n flex-direction: column;\n border-radius: 8px;\n position: relative;\n overflow: hidden;\n color: var(--st-color-text);\n transition:\n opacity 0.4s ease-out,\n transform 0.2s ease,\n background-color 0.2s ease;\n }\n\n .menu-grid-item.pending {\n opacity: 0;\n transform: translateY(20px);\n }\n\n .menu-grid-item.regular {\n padding: 16px;\n }\n\n .menu-grid-item.compact {\n padding: 12px;\n }\n\n /* Keyboard focus gets the same treatment as hover. */\n .menu-grid-item:hover,\n .menu-grid-item:has(.menu-grid-link:focus-visible) {\n background: var(--st-color-hover);\n transform: scale(1.02);\n }\n\n .menu-grid-item:active {\n transform: scale(0.98);\n }\n\n .menu-grid-link {\n display: flex;\n flex-direction: column;\n text-decoration: none;\n color: inherit;\n width: 100%;\n height: 100%;\n gap: 8px;\n }\n\n .menu-grid-badge {\n position: absolute;\n top: 2px;\n right: 8px;\n font-size: 0.5rem;\n padding: 2px 8px;\n border-radius: 9999px;\n font-weight: 500;\n z-index: 1;\n background-color: var(--st-color-text-strong);\n color: var(--st-color-on-solid);\n animation: st-menu-grid-badge-pop 0.35s ease-out;\n }\n\n .menu-grid-header {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n }\n\n .menu-grid-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: 6px;\n transition:\n background-color 0.2s ease,\n transform 0.2s ease;\n flex-shrink: 0;\n padding: 0;\n margin-bottom: 0;\n }\n\n .menu-grid-icon:hover {\n transform: rotate(5deg) scale(1.1);\n }\n\n .menu-grid-icon[hidden] {\n display: none;\n }\n\n .menu-grid-icon ::slotted(*) {\n width: 18px;\n height: 18px;\n }\n\n .menu-grid-title {\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--st-color-text-strong);\n transition: color 0.2s ease;\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-bottom: 0;\n }\n\n .menu-grid-description {\n font-size: 0.75rem;\n color: var(--st-color-text-muted);\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-height: 1.4;\n transition: color 0.2s ease;\n }\n\n .menu-grid-item.compact .menu-grid-header {\n gap: 8px;\n }\n\n .menu-grid-item.compact .menu-grid-icon {\n width: 24px;\n height: 24px;\n }\n\n .menu-grid-item.compact .menu-grid-icon ::slotted(*) {\n width: 14px;\n height: 14px;\n }\n\n .menu-grid-item.compact .menu-grid-title {\n font-size: 0.75rem;\n }\n\n .menu-grid-item.compact .menu-grid-description {\n font-size: 0.75rem;\n }\n\n .menu-grid-header.icon-only {\n justify-content: center;\n }\n\n @media (max-width: 480px) {\n .menu-grid-header {\n gap: 8px;\n }\n\n .menu-grid-icon {\n width: 28px;\n height: 28px;\n }\n\n .menu-grid-icon ::slotted(*) {\n width: 16px;\n height: 16px;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .menu-grid-item,\n .menu-grid-icon {\n transition: none;\n }\n\n .menu-grid-item.pending {\n opacity: 1;\n transform: none;\n }\n\n .menu-grid-badge {\n animation: none;\n }\n }\n `;\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n description = '';\n\n @property({ type: String })\n href = '';\n\n /** Small corner label, e.g. \"New\"/\"Beta\" — omit for none. */\n @property({ type: String })\n badge = '';\n\n @property({ type: Boolean, reflect: true })\n compact = false;\n\n /** Suppresses the description even when `description` is set (source: `showDescription`, default `true`). */\n @property({ type: Boolean, attribute: 'show-description' })\n showDescription = true;\n\n /** Whether `slot=\"icon\"` has content, so an omitted icon leaves no empty box. */\n @state() private hasIcon = false;\n\n /** True until the item first scrolls into view (the source's `whileInView ... once`). */\n @state() private pending = true;\n\n private observer?: IntersectionObserver;\n\n connectedCallback(): void {\n super.connectedCallback();\n if (typeof IntersectionObserver === 'undefined') {\n this.pending = false;\n return;\n }\n this.observer = new IntersectionObserver((entries) => {\n if (entries.some((entry) => entry.isIntersecting)) {\n this.pending = false;\n this.observer?.disconnect();\n }\n });\n this.observer.observe(this);\n }\n\n disconnectedCallback(): void {\n this.observer?.disconnect();\n super.disconnectedCallback();\n }\n\n private onIconSlotChange = (event: Event): void => {\n this.hasIcon = (event.target as HTMLSlotElement).assignedNodes({ flatten: true }).length > 0;\n };\n\n private get isExternal(): boolean {\n return this.href.startsWith('http');\n }\n\n private onClick = (event: MouseEvent): void => {\n if (this.isExternal) return;\n const selectEvent = new CustomEvent<MenuGridItemSelectEventDetail>('menu-grid-item-select', {\n detail: { href: this.href },\n bubbles: true,\n composed: true,\n cancelable: true\n });\n this.dispatchEvent(selectEvent);\n if (selectEvent.defaultPrevented) event.preventDefault();\n };\n\n render() {\n const iconOnly = this.hasIcon && !this.title;\n return html`\n <div class=\"menu-grid-item ${this.compact ? 'compact' : 'regular'} ${this.pending ? 'pending' : ''}\" part=\"item\">\n <a\n part=\"link\"\n class=\"menu-grid-link\"\n href=${this.href}\n target=${this.isExternal ? '_blank' : '_self'}\n rel=${this.isExternal ? 'noopener noreferrer' : nothing}\n @click=${this.onClick}\n >\n ${this.badge ? html`<span part=\"badge\" class=\"menu-grid-badge\">${this.badge}</span>` : nothing}\n <span class=\"menu-grid-header ${iconOnly ? 'icon-only' : ''}\" part=\"header\">\n <span class=\"menu-grid-icon\" part=\"icon\" ?hidden=${!this.hasIcon}><slot name=\"icon\" @slotchange=${this.onIconSlotChange}></slot></span>\n ${this.title ? html`<span part=\"title\" class=\"menu-grid-title\">${this.title}</span>` : nothing}\n </span>\n ${this.description && this.showDescription\n ? html`<span part=\"description\" class=\"menu-grid-description\">${this.description}</span>`\n : nothing}\n </a>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,UAAU,aAAa;AAiBxC,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC;AAAA;AA2ML,iBAAQ;AAGR,uBAAc;AAGd,gBAAO;AAIP,iBAAQ;AAGR,mBAAU;AAIV,2BAAkB;AAGT,SAAQ,UAAU;AAGlB,SAAQ,UAAU;AAwB3B,SAAQ,mBAAmB,CAAC,U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