@redvars/peacock 3.8.6 → 3.9.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-item.js","sources":["../../src/timeline/timeline-item.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './timeline-item.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label Timeline Item\n * @tag wc-timeline-item\n * @rawTag timeline-item\n *\n * @summary An item for use inside a timeline, with a dot/marker and description.\n *\n * @example\n * ```html\n * <wc-timeline-item description=\"Step completed\">\n * <span>Step title</span>\n * <wc-icon slot=\"dot\" name=\"check\"></wc-icon>\n * </wc-timeline-item>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class TimelineItem extends LitElement {\n static styles = [styles];\n\n @property({ type: Boolean, reflect: true }) loading = false;\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n }\n\n render() {\n return html`\n <div class=\"timeline-item\">\n <div class=\"marker-column\">\n <div class=\"marker\">\n <div class=\"marker-dot\">\n ${this.loading\n ? html`<wc-circular-progress\n class=\"dot-spinner\"\n indeterminate\n aria-label=\"Loading\"\n ></wc-circular-progress>`\n : html`<slot name=\"dot\"></slot>`}\n </div>\n </div>\n <div class=\"connector\"></div>\n </div>\n\n <div class=\"content\">\n <div class=\"headline\"><slot></slot></div>\n <div class=\"description\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;AAeG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQA,GAAU,CAAA;AAArC,IAAA,WAAA,GAAA;;QAGuC,IAAA,CAAA,OAAO,GAAG,KAAK;IAoC7D;IAlCE,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;AAC9B,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC;QACvC;IACF;IAEA,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA;;;;;AAKC,cAAA,EAAA,IAAI,CAAC;cACHA,CAAI,CAAA,CAAA;;;;AAIqB,0CAAA;cACzBA,CAAI,CAAA,CAAA,wBAAA,CAA0B;;;;;;;;;;;;;KAa3C;IACH;;AArCO,YAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAEoB,UAAA,CAAA;IAA3CC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAAkB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAHjD,YAAY,GAAA,UAAA,CAAA;IADxB;AACY,CAAA,EAAA,YAAY,CAuCxB;;;;"}
@@ -0,0 +1,69 @@
1
+ import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './IndividualComponent-Bdwyrvd6.js';
2
+ import { n } from './property-B49QQ8pS.js';
3
+ import { TimelineItem } from './timeline-item.js';
4
+
5
+ var css_248z = i`:host {
6
+ display: block;
7
+ }
8
+
9
+ .timeline {
10
+ display: grid;
11
+ gap: 0;
12
+ position: relative;
13
+ padding-left: calc(var(--timeline-dot-size, 2rem) / 2);
14
+ }
15
+
16
+ :host([orientation=horizontal]) .timeline {
17
+ display: grid;
18
+ gap: 0;
19
+ position: relative;
20
+ padding-left: 0;
21
+ padding-top: calc(var(--timeline-dot-size, 2rem) / 2);
22
+ grid-auto-flow: column;
23
+ grid-template-rows: 1fr;
24
+ }`;
25
+
26
+ /**
27
+ * @label Timeline
28
+ * @tag wc-timeline
29
+ * @rawTag timeline
30
+ *
31
+ * @summary A vertical timeline layout for a series of timeline items.
32
+ *
33
+ * @example
34
+ * ```html
35
+ * <wc-timeline>
36
+ * <wc-timeline-item description="Task completed">
37
+ * <span>Task title</span>
38
+ * <wc-icon slot="dot" name="check"></wc-icon>
39
+ * </wc-timeline-item>
40
+ * </wc-timeline>
41
+ * ```
42
+ * @tags display
43
+ */
44
+ let Timeline = class Timeline extends i$1 {
45
+ constructor() {
46
+ super(...arguments);
47
+ this.orientation = 'vertical';
48
+ }
49
+ connectedCallback() {
50
+ super.connectedCallback();
51
+ if (!this.hasAttribute('role')) {
52
+ this.setAttribute('role', 'list');
53
+ }
54
+ }
55
+ render() {
56
+ return b `<div class="timeline"><slot></slot></div>`;
57
+ }
58
+ };
59
+ Timeline.styles = [css_248z];
60
+ Timeline.Item = TimelineItem;
61
+ __decorate([
62
+ n({ type: String, reflect: true })
63
+ ], Timeline.prototype, "orientation", void 0);
64
+ Timeline = __decorate([
65
+ IndividualComponent
66
+ ], Timeline);
67
+
68
+ export { Timeline };
69
+ //# sourceMappingURL=timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.js","sources":["../../src/timeline/timeline.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './timeline.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { TimelineItem } from './timeline-item.js';\n\n/**\n * @label Timeline\n * @tag wc-timeline\n * @rawTag timeline\n *\n * @summary A vertical timeline layout for a series of timeline items.\n *\n * @example\n * ```html\n * <wc-timeline>\n * <wc-timeline-item description=\"Task completed\">\n * <span>Task title</span>\n * <wc-icon slot=\"dot\" name=\"check\"></wc-icon>\n * </wc-timeline-item>\n * </wc-timeline>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Timeline extends LitElement {\n static styles = [styles];\n\n static Item = TimelineItem;\n\n @property({ type: String, reflect: true }) orientation: 'vertical' | 'horizontal' = 'vertical';\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'list');\n }\n }\n\n render() {\n return html`<div class=\"timeline\"><slot></slot></div>`;\n }\n}\n"],"names":["LitElement","html","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;;AAiBG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQA,GAAU,CAAA;AAAjC,IAAA,WAAA,GAAA;;QAKsC,IAAA,CAAA,WAAW,GAA8B,UAAU;IAYhG;IAVE,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;AAC9B,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC;QACnC;IACF;IAEA,MAAM,GAAA;QACJ,OAAOC,CAAI,CAAA,CAAA,yCAAA,CAA2C;IACxD;;AAfO,QAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAEjB,QAAA,CAAA,IAAI,GAAG,YAAH;AAEgC,UAAA,CAAA;IAA1CC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAAsD,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AALpF,QAAQ,GAAA,UAAA,CAAA;IADpB;AACY,CAAA,EAAA,QAAQ,CAiBpB;;;;"}