@mhmo91/schmancy 0.2.59 → 0.2.60

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/dist/card.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./teleport.component-BU8VUQ9X.cjs");
1
+ "use strict";require("./teleport.component-C8AeNbog.cjs");
2
2
  //# sourceMappingURL=card.cjs.map
package/dist/card.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./teleport.component-CQ-n025U.js";
1
+ import "./teleport.component-ByTxHtT5.js";
2
2
  //# sourceMappingURL=card.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-BU8VUQ9X.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-C8AeNbog.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
2
2
  //# sourceMappingURL=content-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-CQ-n025U.js";
1
+ import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-ByTxHtT5.js";
2
2
  export {
3
3
  n as SchmancyContentDrawer,
4
4
  t as SchmancyContentDrawerID,
@@ -0,0 +1,166 @@
1
+ import "rxjs";
2
+ import "lit/directives/class-map.js";
3
+ import "lit/directives/style-map.js";
4
+ import { $ as y } from "./litElement.mixin-C2ixT_uz.js";
5
+ import "./tailwind.mixin-BNM2vRly.js";
6
+ import { html as u } from "lit";
7
+ import { property as c, query as l, state as g, customElement as f } from "lit/decorators.js";
8
+ import { ifDefined as h } from "lit/directives/if-defined.js";
9
+ import s from "moment";
10
+ function p(e, t) {
11
+ if (!e) return null;
12
+ const a = s(e);
13
+ return a.isValid() ? a.format(t) : null;
14
+ }
15
+ var D = Object.defineProperty, b = Object.getOwnPropertyDescriptor, m = (e, t, a, n) => {
16
+ for (var o, i = n > 1 ? void 0 : n ? b(t, a) : t, d = e.length - 1; d >= 0; d--) (o = e[d]) && (i = (n ? o(t, a, i) : o(i)) || i);
17
+ return n && i && D(t, a, i), i;
18
+ };
19
+ let r = class extends y() {
20
+ constructor() {
21
+ super(...arguments), this.type = "date", this.selectedDateRange = "Today";
22
+ }
23
+ connectedCallback() {
24
+ super.connectedCallback(), this.initPresetRanges();
25
+ const e = this.getDateFormat(), t = function(a, n, o) {
26
+ const i = p(a, o), d = p(n, o);
27
+ return { dateFrom: i, dateTo: d, isValid: i !== null && d !== null };
28
+ }(this.dateFrom.value, this.dateTo.value, e);
29
+ if (t.isValid) this.dateFrom.value = t.dateFrom, this.dateTo.value = t.dateTo, this.updateSelectedDateRange();
30
+ else {
31
+ const a = s().format(e);
32
+ this.dateFrom.value = a, this.dateTo.value = a;
33
+ }
34
+ }
35
+ setDateRange(e, t) {
36
+ this.dateFrom.value = e, this.dateTo.value = t, this.dispatchEvent(new CustomEvent("change", { detail: { dateFrom: e, dateTo: t }, bubbles: !0, composed: !0 })), this.requestUpdate();
37
+ }
38
+ updated(e) {
39
+ e.has("type") && (this.initPresetRanges(), this.updateSelectedDateRange());
40
+ }
41
+ getDateFormat() {
42
+ return this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm";
43
+ }
44
+ getDisplayFormat() {
45
+ return this.type === "date" ? "MMM DD, YYYY" : "MMM DD, YYYY hh:mm A";
46
+ }
47
+ initPresetRanges() {
48
+ const e = this.getDateFormat();
49
+ this.presetRanges = [{ label: "Yesterday", range: { dateFrom: s().subtract(1, "days").startOf("day").format(e), dateTo: s().subtract(1, "days").endOf("day").format(e) }, step: "day" }, { label: "Today", range: { dateFrom: s().startOf("day").format(e), dateTo: s().endOf("day").format(e) }, step: "day" }, { label: "Tomorrow", range: { dateFrom: s().add(1, "days").startOf("day").format(e), dateTo: s().add(1, "days").endOf("day").format(e) }, step: "day" }, { label: "This Week", range: { dateFrom: s().startOf("isoWeek").format(e), dateTo: s().endOf("isoWeek").format(e) }, step: "week" }, { label: "Last Week", range: { dateFrom: s().subtract(1, "weeks").startOf("isoWeek").format(e), dateTo: s().subtract(1, "weeks").endOf("isoWeek").format(e) }, step: "week" }, { label: "This Month", range: { dateFrom: s().startOf("month").format(e), dateTo: s().endOf("month").format(e) }, step: "month" }];
50
+ }
51
+ updateSelectedDateRange() {
52
+ const e = this.presetRanges.find((t) => t.range.dateFrom === this.dateFrom.value && t.range.dateTo === this.dateTo.value);
53
+ if (e) this.selectedDateRange = e.label;
54
+ else {
55
+ const t = s(this.dateFrom.value), a = s(this.dateTo.value);
56
+ if (t.isSame(a, "day")) this.selectedDateRange = t.format("MMM DD, YYYY"), t.format("HH:mm") === "00:00" && a.format("HH:mm") === "23:59" || (this.selectedDateRange += ` ${t.format("HH:mm")}:${a.format("HH:mm")}`);
57
+ else {
58
+ const n = t.format(this.getDisplayFormat()), o = a.format(this.getDisplayFormat());
59
+ this.selectedDateRange = `${n} - ${o}`;
60
+ }
61
+ }
62
+ }
63
+ handlePresetChange(e) {
64
+ const t = this.presetRanges.find((o) => o.label === e);
65
+ if (!t) return;
66
+ const { dateFrom: a, dateTo: n } = t.range;
67
+ this.setDateRange(a, n), this.selectedDateRange = e, this.schmancyMenu.open = !1;
68
+ }
69
+ handleDateRangeChange() {
70
+ this.setDateRange(this.dateFrom.value, this.dateTo.value), this.updateSelectedDateRange(), this.schmancyMenu.open = !1;
71
+ }
72
+ shiftDateRange(e) {
73
+ const t = this.getDateFormat(), a = s(this.dateTo.value).diff(s(this.dateFrom.value), "days") || 1, n = s(this.dateFrom.value).add(e * a, "days").format(t), o = s(this.dateTo.value).add(e * a, "days").format(t);
74
+ this.setDateRange(n, o), this.updateSelectedDateRange();
75
+ }
76
+ render() {
77
+ var e;
78
+ return u`
79
+ <!-- schmancy-menu typically provides a slot="button" for the trigger,
80
+ and then projects the menu items inside. -->
81
+ <schmancy-menu class="z-100 w-max" role="menu" aria-label="Date range presets and custom input">
82
+ <!-- The toggle/trigger slot -->
83
+ <schmancy-grid slot="button" align="center" cols="auto 1fr auto">
84
+ <schmancy-icon-button
85
+ type="button"
86
+ aria-label="Shift date range backward"
87
+ @click=${(t) => {
88
+ t.preventDefault(), this.shiftDateRange(-1);
89
+ }}
90
+ >
91
+ arrow_left
92
+ </schmancy-icon-button>
93
+
94
+ <schmancy-button
95
+ class="w-max"
96
+ variant="outlined"
97
+ type="button"
98
+ aria-haspopup="menu"
99
+ .ariaExpanded=${String(((e = this.schmancyMenu) == null ? void 0 : e.open) || !1)}
100
+ >
101
+ ${this.selectedDateRange || "Date range"}
102
+ </schmancy-button>
103
+
104
+ <schmancy-icon-button
105
+ type="button"
106
+ aria-label="Shift date range forward"
107
+ @click=${(t) => {
108
+ t.preventDefault(), this.shiftDateRange(1);
109
+ }}
110
+ >
111
+ arrow_right
112
+ </schmancy-icon-button>
113
+ </schmancy-grid>
114
+
115
+ <!-- The menu surface: presets + manual date selection -->
116
+ ${this.presetRanges.map((t) => u`
117
+ <schmancy-menu-item role="menuitem" class="w-full" @click=${() => this.handlePresetChange(t.label)}>
118
+ <schmancy-grid class="w-full" align="center" cols="auto 1fr auto"> ${t.label} </schmancy-grid>
119
+ </schmancy-menu-item>
120
+ `)}
121
+
122
+ <!-- Manual date range inputs + "Apply" button -->
123
+ <schmancy-grid gap="sm" flow="row" class="p-4">
124
+ <schmancy-input
125
+ id="checkin"
126
+ .type=${this.type}
127
+ .label=${this.dateFrom.label}
128
+ .value=${this.dateFrom.value}
129
+ min=${h(this.minDate)}
130
+ @change=${(t) => {
131
+ t.preventDefault(), t.stopPropagation();
132
+ const a = this.getDateFormat(), n = s(t.detail.value, a).format(a);
133
+ this.dateFrom.value = n, this.checkOutInput.setAttribute("min", n);
134
+ }}
135
+ ></schmancy-input>
136
+
137
+ <schmancy-input
138
+ id="checkout"
139
+ .type=${this.type}
140
+ .label=${this.dateTo.label}
141
+ .value=${this.dateTo.value}
142
+ min=${h(this.dateFrom.value)}
143
+ max=${h(this.maxDate)}
144
+ @change=${(t) => {
145
+ t.preventDefault(), t.stopPropagation();
146
+ const a = this.getDateFormat(), n = s(t.detail.value, a).format(a);
147
+ this.dateTo.value = n;
148
+ }}
149
+ ></schmancy-input>
150
+
151
+ <schmancy-button
152
+ type="button"
153
+ variant="outlined"
154
+ @click=${(t) => {
155
+ t.preventDefault(), t.stopPropagation(), this.handleDateRangeChange();
156
+ }}
157
+ >
158
+ Apply
159
+ </schmancy-button>
160
+ </schmancy-grid>
161
+ </schmancy-menu>
162
+ `;
163
+ }
164
+ };
165
+ m([c({ type: String })], r.prototype, "type", 2), m([c({ type: Object })], r.prototype, "dateFrom", 2), m([c({ type: Object })], r.prototype, "dateTo", 2), m([c({ type: String })], r.prototype, "minDate", 2), m([c({ type: String })], r.prototype, "maxDate", 2), m([l("#checkin")], r.prototype, "checkInInput", 2), m([l("#checkout")], r.prototype, "checkOutInput", 2), m([l("schmancy-menu")], r.prototype, "schmancyMenu", 2), m([g()], r.prototype, "selectedDateRange", 2), r = m([f("schmancy-date-range")], r);
166
+ //# sourceMappingURL=date-range-Bole0xTK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-Bole0xTK.js","sources":["../src/date-range/date-utils.ts","../src/date-range/date-range.ts"],"sourcesContent":["import moment from 'moment'\n\ntype DateFormat = 'YYYY-MM-DD' | 'YYYY-MM-DDTHH:mm'\n\n/**\n * Ensures that a date string conforms to a specific format.\n * If the date is already in the correct format, it returns the original string.\n * If the date is in a different format, it attempts to convert it to the specified format.\n * If the date is invalid or cannot be converted, it returns null.\n *\n * @param dateString The date string to validate and format.\n * @param expectedFormat The expected date format (e.g., 'YYYY-MM-DD', 'YYYY-MM-DDTHH:mm').\n * @returns The formatted date string, or null if the date is invalid.\n */\nfunction enforceDateFormat(dateString: string | undefined, expectedFormat: DateFormat): string | null {\n\tif (!dateString) {\n\t\treturn null // Or handle the undefined case differently if needed\n\t}\n\n\tconst parsedDate = moment(dateString)\n\n\tif (!parsedDate.isValid()) {\n\t\treturn null // Date is invalid\n\t}\n\n\treturn parsedDate.format(expectedFormat)\n}\n\n/**\n * Validates if the initial date range values are in the expected format.\n *\n * @param dateFrom The dateFrom value to validate.\n * @param dateTo The dateTo value to validate.\n * @param expectedFormat The expected date format.\n * @returns An object indicating whether each date is valid, and the formatted date or null if invalid.\n */\nfunction validateInitialDateRange(\n\tdateFrom: string | undefined,\n\tdateTo: string | undefined,\n\texpectedFormat: DateFormat,\n): {\n\tdateFrom: string | null\n\tdateTo: string | null\n\tisValid: boolean\n} {\n\tconst formattedDateFrom = enforceDateFormat(dateFrom, expectedFormat)\n\tconst formattedDateTo = enforceDateFormat(dateTo, expectedFormat)\n\n\tconst isValid = formattedDateFrom !== null && formattedDateTo !== null\n\n\treturn {\n\t\tdateFrom: formattedDateFrom,\n\t\tdateTo: formattedDateTo,\n\t\tisValid,\n\t}\n}\n\nexport { validateInitialDateRange }\n","import { $LitElement } from '@mixins/index'\nimport { SchmancyInputChangeEvent } from '@schmancy/input'\nimport SchmancyMenu from '@schmancy/menu/menu'\nimport { html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport moment from 'moment'\nimport { validateInitialDateRange } from './date-utils' // Import the utility\n\ntype DateFormat = 'YYYY-MM-DD' | 'YYYY-MM-DDTHH:mm'\n\n/**\n * A date range selector that supports presets and manual date input.\n */\n@customElement('schmancy-date-range')\nexport default class SchmancyDateRange extends $LitElement() {\n\t// Either \"date\" or \"datetime-local\"\n\t@property({ type: String }) type: 'date' | 'datetime-local' = 'date'\n\n\t@property({ type: Object }) dateFrom!: { label: string; value: string }\n\t@property({ type: Object }) dateTo!: { label: string; value: string }\n\n\t// Optional min/max constraints\n\t@property({ type: String }) minDate?: string\n\t@property({ type: String }) maxDate?: string\n\n\t@query('#checkin') checkInInput!: HTMLInputElement\n\t@query('#checkout') checkOutInput!: HTMLInputElement\n\n\t// The <schmancy-menu> that displays presets + manual date inputs\n\t@query('schmancy-menu') schmancyMenu!: SchmancyMenu\n\n\t// Display text in the trigger button\n\t@state() selectedDateRange: string = 'Today'\n\n\t// Preset date range definitions\n\tpresetRanges!: Array<{\n\t\tlabel: string\n\t\trange: { dateFrom: string; dateTo: string }\n\t\tstep: moment.unitOfTime.DurationConstructor\n\t}>\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tthis.initPresetRanges()\n\n\t\t// Validate and format initial date range\n\t\tconst dateFormat = this.getDateFormat() as DateFormat\n\t\tconst validatedRange = validateInitialDateRange(this.dateFrom.value, this.dateTo.value, dateFormat)\n\n\t\tif (validatedRange.isValid) {\n\t\t\tthis.dateFrom.value = validatedRange.dateFrom!\n\t\t\tthis.dateTo.value = validatedRange.dateTo!\n\t\t\tthis.updateSelectedDateRange()\n\t\t} else {\n\t\t\tconsole.error('Invalid initial date range. Falling back to default.')\n\t\t\t// Handle invalid initial dates (e.g., set to default values, display an error)\n\t\t\tconst now = moment().format(dateFormat)\n\t\t\tthis.dateFrom.value = now\n\t\t\tthis.dateTo.value = now\n\t\t}\n\t}\n\t/**\n\t * Update the internal date range and fire a 'change' event to notify external code.\n\t */\n\tprivate setDateRange(fromDate: string, toDate: string) {\n\t\tthis.dateFrom.value = fromDate\n\t\tthis.dateTo.value = toDate\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<TSchmancDateRangePayload>('change', {\n\t\t\t\tdetail: { dateFrom: fromDate, dateTo: toDate },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true, // If you want it to pass shadow boundaries\n\t\t\t}),\n\t\t)\n\t\tthis.requestUpdate()\n\t}\n\tupdated(changedProps: Map<string, unknown>) {\n\t\tif (changedProps.has('type')) {\n\t\t\t// Re-init presets if \"type\" changes from date -> datetime\n\t\t\tthis.initPresetRanges()\n\t\t\tthis.updateSelectedDateRange()\n\t\t}\n\t}\n\n\t/**\n\t * Format strings for the internal <input> and for display text.\n\t */\n\tprivate getDateFormat(): string {\n\t\treturn this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'\n\t}\n\tprivate getDisplayFormat(): string {\n\t\treturn this.type === 'date' ? 'MMM DD, YYYY' : 'MMM DD, YYYY hh:mm A'\n\t}\n\n\t/**\n\t * Build up a list of preset ranges (yesterday, today, etc.).\n\t */\n\tprivate initPresetRanges() {\n\t\tconst format = this.getDateFormat()\n\t\tthis.presetRanges = [\n\t\t\t{\n\t\t\t\tlabel: 'Yesterday',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().subtract(1, 'days').startOf('day').format(format),\n\t\t\t\t\tdateTo: moment().subtract(1, 'days').endOf('day').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Today',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().startOf('day').format(format),\n\t\t\t\t\tdateTo: moment().endOf('day').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Tomorrow',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().add(1, 'days').startOf('day').format(format),\n\t\t\t\t\tdateTo: moment().add(1, 'days').endOf('day').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'This Week',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().startOf('isoWeek').format(format),\n\t\t\t\t\tdateTo: moment().endOf('isoWeek').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'week',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Last Week',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().subtract(1, 'weeks').startOf('isoWeek').format(format),\n\t\t\t\t\tdateTo: moment().subtract(1, 'weeks').endOf('isoWeek').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'week',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'This Month',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().startOf('month').format(format),\n\t\t\t\t\tdateTo: moment().endOf('month').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'month',\n\t\t\t},\n\t\t\t// Add more if desired (e.g. \"Last Month,\" \"Custom,\" etc.)\n\t\t]\n\t}\n\n\t/**\n\t * Based on the current dateFrom/dateTo, see if it matches a preset.\n\t * Otherwise display a \"Custom\" range: \"Jan 01, 2023 - Jan 07, 2023\".\n\t */\n\tprivate updateSelectedDateRange() {\n\t\tconst preset = this.presetRanges.find(\n\t\t\tp => p.range.dateFrom === this.dateFrom.value && p.range.dateTo === this.dateTo.value,\n\t\t)\n\t\tif (preset) {\n\t\t\tthis.selectedDateRange = preset.label\n\t\t} else {\n\t\t\t// Construct a custom label\n\t\t\tconst fromMoment = moment(this.dateFrom.value)\n\t\t\tconst toMoment = moment(this.dateTo.value)\n\t\t\tconsole.log(fromMoment.format('HH:mm'), toMoment.format('HH:mm'), fromMoment.format('HH:mm'))\n\t\t\tif (fromMoment.isSame(toMoment, 'day')) {\n\t\t\t\tthis.selectedDateRange = fromMoment.format('MMM DD, YYYY')\n\t\t\t\t// append the time if fromMoment is not the start of the day and toMoment is not the end of the day\n\t\t\t\tif (fromMoment.format('HH:mm') !== '00:00' || toMoment.format('HH:mm') !== '23:59') {\n\t\t\t\t\tthis.selectedDateRange += ` ${fromMoment.format('HH:mm')}:${toMoment.format('HH:mm')}`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst fromStr = fromMoment.format(this.getDisplayFormat())\n\t\t\t\tconst toStr = toMoment.format(this.getDisplayFormat())\n\t\t\t\tthis.selectedDateRange = `${fromStr} - ${toStr}`\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Called when user selects a preset from the list.\n\t * Updates date range and closes the menu.\n\t */\n\tprivate handlePresetChange(label: string) {\n\t\tconst preset = this.presetRanges.find(range => range.label === label)\n\t\tif (!preset) return\n\t\tconst { dateFrom, dateTo } = preset.range\n\t\tthis.setDateRange(dateFrom, dateTo)\n\t\tthis.selectedDateRange = label\n\t\tthis.schmancyMenu.open = false\n\t}\n\n\t/**\n\t * Applies the date range from the inputs.\n\t * Closes the menu when done.\n\t */\n\tprivate handleDateRangeChange() {\n\t\tthis.setDateRange(this.dateFrom.value, this.dateTo.value)\n\t\tthis.updateSelectedDateRange()\n\t\tthis.schmancyMenu.open = false\n\t}\n\n\t/**\n\t * Shift the current date range forward or backward by the same number of days.\n\t * If the range is 7 days wide, shift 7 days, etc.\n\t */\n\tprivate shiftDateRange(factor: number) {\n\t\tconst format = this.getDateFormat()\n\t\tconst currentDiff = moment(this.dateTo.value).diff(moment(this.dateFrom.value), 'days') || 1\n\t\tconst newDateFrom = moment(this.dateFrom.value)\n\t\t\t.add(factor * currentDiff, 'days')\n\t\t\t.format(format)\n\t\tconst newDateTo = moment(this.dateTo.value)\n\t\t\t.add(factor * currentDiff, 'days')\n\t\t\t.format(format)\n\n\t\tthis.setDateRange(newDateFrom, newDateTo)\n\t\tthis.updateSelectedDateRange()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<!-- schmancy-menu typically provides a slot=\"button\" for the trigger,\n and then projects the menu items inside. -->\n\t\t\t<schmancy-menu class=\"z-100 w-max\" role=\"menu\" aria-label=\"Date range presets and custom input\">\n\t\t\t\t<!-- The toggle/trigger slot -->\n\t\t\t\t<schmancy-grid slot=\"button\" align=\"center\" cols=\"auto 1fr auto\">\n\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\taria-label=\"Shift date range backward\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\tthis.shiftDateRange(-1)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tarrow_left\n\t\t\t\t\t</schmancy-icon-button>\n\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\tclass=\"w-max\"\n\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\taria-haspopup=\"menu\"\n\t\t\t\t\t\t.ariaExpanded=${String(this.schmancyMenu?.open || false)}\n\t\t\t\t\t>\n\t\t\t\t\t\t${this.selectedDateRange || 'Date range'}\n\t\t\t\t\t</schmancy-button>\n\n\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\taria-label=\"Shift date range forward\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\tthis.shiftDateRange(1)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tarrow_right\n\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t</schmancy-grid>\n\n\t\t\t\t<!-- The menu surface: presets + manual date selection -->\n\t\t\t\t${this.presetRanges.map(\n\t\t\t\t\tpreset => html`\n\t\t\t\t\t\t<schmancy-menu-item role=\"menuitem\" class=\"w-full\" @click=${() => this.handlePresetChange(preset.label)}>\n\t\t\t\t\t\t\t<schmancy-grid class=\"w-full\" align=\"center\" cols=\"auto 1fr auto\"> ${preset.label} </schmancy-grid>\n\t\t\t\t\t\t</schmancy-menu-item>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Manual date range inputs + \"Apply\" button -->\n\t\t\t\t<schmancy-grid gap=\"sm\" flow=\"row\" class=\"p-4\">\n\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\tid=\"checkin\"\n\t\t\t\t\t\t.type=${this.type}\n\t\t\t\t\t\t.label=${this.dateFrom.label}\n\t\t\t\t\t\t.value=${this.dateFrom.value}\n\t\t\t\t\t\tmin=${ifDefined(this.minDate)}\n\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\tconst fmt = this.getDateFormat()\n\t\t\t\t\t\t\tconst selectedDate = moment(event.detail.value, fmt).format(fmt)\n\t\t\t\t\t\t\tthis.dateFrom.value = selectedDate\n\t\t\t\t\t\t\t// Update the checkout input's min attribute:\n\t\t\t\t\t\t\tthis.checkOutInput.setAttribute('min', selectedDate)\n\t\t\t\t\t\t}}\n\t\t\t\t\t></schmancy-input>\n\n\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\tid=\"checkout\"\n\t\t\t\t\t\t.type=${this.type}\n\t\t\t\t\t\t.label=${this.dateTo.label}\n\t\t\t\t\t\t.value=${this.dateTo.value}\n\t\t\t\t\t\tmin=${ifDefined(this.dateFrom.value)}\n\t\t\t\t\t\tmax=${ifDefined(this.maxDate)}\n\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\tconst fmt = this.getDateFormat()\n\t\t\t\t\t\t\tconst selectedDate = moment(event.detail.value, fmt).format(fmt)\n\t\t\t\t\t\t\tthis.dateTo.value = selectedDate\n\t\t\t\t\t\t}}\n\t\t\t\t\t></schmancy-input>\n\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tApply\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</schmancy-grid>\n\t\t\t</schmancy-menu>\n\t\t`\n\t}\n}\n\n/**\n * The payload for a date range change event.\n */\nexport type TSchmancDateRangePayload = {\n\tdateFrom?: string\n\tdateTo?: string\n}\n\n/**\n * A custom event fired when the date range is updated.\n */\nexport type SchmancyDateRangeChangeEvent = CustomEvent<TSchmancDateRangePayload>\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-date-range': SchmancyDateRange\n\t}\n}\n"],"names":["enforceDateFormat","dateString","expectedFormat","parsedDate","moment","isValid","format","SchmancyDateRange","$LitElement","super","arguments","this","type","selectedDateRange","connectedCallback","initPresetRanges","dateFormat","getDateFormat","validatedRange","dateFrom","dateTo","formattedDateFrom","formattedDateTo","value","updateSelectedDateRange","now","fromDate","toDate","dispatchEvent","CustomEvent","detail","bubbles","composed","requestUpdate","changedProps","has","getDisplayFormat","presetRanges","label","range","subtract","startOf","endOf","step","add","preset","find","p","fromMoment","toMoment","isSame","fromStr","toStr","setDateRange","schmancyMenu","open","handleDateRangeChange","factor","currentDiff","diff","newDateFrom","newDateTo","render","html","e","preventDefault","shiftDateRange","String","map","handlePresetChange","ifDefined","minDate","event","stopPropagation","fmt","selectedDate","checkOutInput","setAttribute","maxDate","__decorateClass","property","prototype","Object","query","state","customElement"],"mappings":";;;;;;;;;AAcA,SAASA,EAAkBC,GAAgCC,GAC1D;AAAA,MAAA,CAAKD,EACG,QAAA;AAGF,QAAAE,IAAaC,EAAOH,CAAAA;AAEtB,SAACE,EAAWE,YAITF,EAAWG,OAAOJ,CAHjB,IAAA;AAIT;;;;;ACXA,IAAqBK,IAArB,cAA+CC,EAAAA,EAAAA;AAAAA,EAA/C,cAAAC;AAAAA,UAAAA,GAAAC,SAE+DC,GAAAA,KAAAC,OAAA,QAgBzBD,KAAAE,oBAAA;AAAA,EAAA;AAAA,EASrC,oBACCJ;AAAAA,UAAMK,kBACNH,GAAAA,KAAKI,iBAGC;AAAA,UAAAC,IAAaL,KAAKM,cAAAA,GAClBC,IDZR,SACCC,GACAC,GACAlB,GAMM;AAAA,YAAAmB,IAAoBrB,EAAkBmB,GAAUjB,CAChDoB,GAAAA,IAAkBtB,EAAkBoB,GAAQlB,CAI3C;AAAA,aAAA,EACNiB,UAAUE,GACVD,QAAQE,GACRjB,SALegB,MAAsB,QAAQC,MAAoB;IAOnE,ECPkDX,KAAKQ,SAASI,OAAOZ,KAAKS,OAAOG,OAAOP,CAExF;AAAA,QAAIE,EAAeb,QACbM,MAAAQ,SAASI,QAAQL,EAAeC,UAChCR,KAAAS,OAAOG,QAAQL,EAAeE,QACnCT,KAAKa,wBACC;AAAA,SAAA;AAGN,YAAMC,IAAMrB,EAAAA,EAASE,OAAOU,CAAAA;AAC5BL,WAAKQ,SAASI,QAAQE,GACtBd,KAAKS,OAAOG,QAAQE;AAAAA,I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style-map.js");const p=require("./litElement.mixin-UoPWmzJY.cjs");require("./tailwind.mixin-Bkx1Uuxe.cjs");const m=require("lit"),c=require("lit/decorators.js"),h=require("lit/directives/if-defined.js"),s=require("moment");function u(t,e){if(!t)return null;const a=s(t);return a.isValid()?a.format(e):null}var y=Object.defineProperty,g=Object.getOwnPropertyDescriptor,d=(t,e,a,n)=>{for(var r,i=n>1?void 0:n?g(e,a):e,l=t.length-1;l>=0;l--)(r=t[l])&&(i=(n?r(e,a,i):r(i))||i);return n&&i&&y(e,a,i),i};let o=class extends p.$LitElement(){constructor(){super(...arguments),this.type="date",this.selectedDateRange="Today"}connectedCallback(){super.connectedCallback(),this.initPresetRanges();const t=this.getDateFormat(),e=function(a,n,r){const i=u(a,r),l=u(n,r);return{dateFrom:i,dateTo:l,isValid:i!==null&&l!==null}}(this.dateFrom.value,this.dateTo.value,t);if(e.isValid)this.dateFrom.value=e.dateFrom,this.dateTo.value=e.dateTo,this.updateSelectedDateRange();else{const a=s().format(t);this.dateFrom.value=a,this.dateTo.value=a}}setDateRange(t,e){this.dateFrom.value=t,this.dateTo.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{dateFrom:t,dateTo:e},bubbles:!0,composed:!0})),this.requestUpdate()}updated(t){t.has("type")&&(this.initPresetRanges(),this.updateSelectedDateRange())}getDateFormat(){return this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"}getDisplayFormat(){return this.type==="date"?"MMM DD, YYYY":"MMM DD, YYYY hh:mm A"}initPresetRanges(){const t=this.getDateFormat();this.presetRanges=[{label:"Yesterday",range:{dateFrom:s().subtract(1,"days").startOf("day").format(t),dateTo:s().subtract(1,"days").endOf("day").format(t)},step:"day"},{label:"Today",range:{dateFrom:s().startOf("day").format(t),dateTo:s().endOf("day").format(t)},step:"day"},{label:"Tomorrow",range:{dateFrom:s().add(1,"days").startOf("day").format(t),dateTo:s().add(1,"days").endOf("day").format(t)},step:"day"},{label:"This Week",range:{dateFrom:s().startOf("isoWeek").format(t),dateTo:s().endOf("isoWeek").format(t)},step:"week"},{label:"Last Week",range:{dateFrom:s().subtract(1,"weeks").startOf("isoWeek").format(t),dateTo:s().subtract(1,"weeks").endOf("isoWeek").format(t)},step:"week"},{label:"This Month",range:{dateFrom:s().startOf("month").format(t),dateTo:s().endOf("month").format(t)},step:"month"}]}updateSelectedDateRange(){const t=this.presetRanges.find(e=>e.range.dateFrom===this.dateFrom.value&&e.range.dateTo===this.dateTo.value);if(t)this.selectedDateRange=t.label;else{const e=s(this.dateFrom.value),a=s(this.dateTo.value);if(e.isSame(a,"day"))this.selectedDateRange=e.format("MMM DD, YYYY"),e.format("HH:mm")==="00:00"&&a.format("HH:mm")==="23:59"||(this.selectedDateRange+=` ${e.format("HH:mm")}:${a.format("HH:mm")}`);else{const n=e.format(this.getDisplayFormat()),r=a.format(this.getDisplayFormat());this.selectedDateRange=`${n} - ${r}`}}}handlePresetChange(t){const e=this.presetRanges.find(r=>r.label===t);if(!e)return;const{dateFrom:a,dateTo:n}=e.range;this.setDateRange(a,n),this.selectedDateRange=t,this.schmancyMenu.open=!1}handleDateRangeChange(){this.setDateRange(this.dateFrom.value,this.dateTo.value),this.updateSelectedDateRange(),this.schmancyMenu.open=!1}shiftDateRange(t){const e=this.getDateFormat(),a=s(this.dateTo.value).diff(s(this.dateFrom.value),"days")||1,n=s(this.dateFrom.value).add(t*a,"days").format(e),r=s(this.dateTo.value).add(t*a,"days").format(e);this.setDateRange(n,r),this.updateSelectedDateRange()}render(){var t;return m.html`
2
+ <!-- schmancy-menu typically provides a slot="button" for the trigger,
3
+ and then projects the menu items inside. -->
4
+ <schmancy-menu class="z-100 w-max" role="menu" aria-label="Date range presets and custom input">
5
+ <!-- The toggle/trigger slot -->
6
+ <schmancy-grid slot="button" align="center" cols="auto 1fr auto">
7
+ <schmancy-icon-button
8
+ type="button"
9
+ aria-label="Shift date range backward"
10
+ @click=${e=>{e.preventDefault(),this.shiftDateRange(-1)}}
11
+ >
12
+ arrow_left
13
+ </schmancy-icon-button>
14
+
15
+ <schmancy-button
16
+ class="w-max"
17
+ variant="outlined"
18
+ type="button"
19
+ aria-haspopup="menu"
20
+ .ariaExpanded=${String(((t=this.schmancyMenu)==null?void 0:t.open)||!1)}
21
+ >
22
+ ${this.selectedDateRange||"Date range"}
23
+ </schmancy-button>
24
+
25
+ <schmancy-icon-button
26
+ type="button"
27
+ aria-label="Shift date range forward"
28
+ @click=${e=>{e.preventDefault(),this.shiftDateRange(1)}}
29
+ >
30
+ arrow_right
31
+ </schmancy-icon-button>
32
+ </schmancy-grid>
33
+
34
+ <!-- The menu surface: presets + manual date selection -->
35
+ ${this.presetRanges.map(e=>m.html`
36
+ <schmancy-menu-item role="menuitem" class="w-full" @click=${()=>this.handlePresetChange(e.label)}>
37
+ <schmancy-grid class="w-full" align="center" cols="auto 1fr auto"> ${e.label} </schmancy-grid>
38
+ </schmancy-menu-item>
39
+ `)}
40
+
41
+ <!-- Manual date range inputs + "Apply" button -->
42
+ <schmancy-grid gap="sm" flow="row" class="p-4">
43
+ <schmancy-input
44
+ id="checkin"
45
+ .type=${this.type}
46
+ .label=${this.dateFrom.label}
47
+ .value=${this.dateFrom.value}
48
+ min=${h.ifDefined(this.minDate)}
49
+ @change=${e=>{e.preventDefault(),e.stopPropagation();const a=this.getDateFormat(),n=s(e.detail.value,a).format(a);this.dateFrom.value=n,this.checkOutInput.setAttribute("min",n)}}
50
+ ></schmancy-input>
51
+
52
+ <schmancy-input
53
+ id="checkout"
54
+ .type=${this.type}
55
+ .label=${this.dateTo.label}
56
+ .value=${this.dateTo.value}
57
+ min=${h.ifDefined(this.dateFrom.value)}
58
+ max=${h.ifDefined(this.maxDate)}
59
+ @change=${e=>{e.preventDefault(),e.stopPropagation();const a=this.getDateFormat(),n=s(e.detail.value,a).format(a);this.dateTo.value=n}}
60
+ ></schmancy-input>
61
+
62
+ <schmancy-button
63
+ type="button"
64
+ variant="outlined"
65
+ @click=${e=>{e.preventDefault(),e.stopPropagation(),this.handleDateRangeChange()}}
66
+ >
67
+ Apply
68
+ </schmancy-button>
69
+ </schmancy-grid>
70
+ </schmancy-menu>
71
+ `}};d([c.property({type:String})],o.prototype,"type",2),d([c.property({type:Object})],o.prototype,"dateFrom",2),d([c.property({type:Object})],o.prototype,"dateTo",2),d([c.property({type:String})],o.prototype,"minDate",2),d([c.property({type:String})],o.prototype,"maxDate",2),d([c.query("#checkin")],o.prototype,"checkInInput",2),d([c.query("#checkout")],o.prototype,"checkOutInput",2),d([c.query("schmancy-menu")],o.prototype,"schmancyMenu",2),d([c.state()],o.prototype,"selectedDateRange",2),o=d([c.customElement("schmancy-date-range")],o);
72
+ //# sourceMappingURL=date-range-Df_6BLmA.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-Df_6BLmA.cjs","sources":["../src/date-range/date-utils.ts","../src/date-range/date-range.ts"],"sourcesContent":["import moment from 'moment'\n\ntype DateFormat = 'YYYY-MM-DD' | 'YYYY-MM-DDTHH:mm'\n\n/**\n * Ensures that a date string conforms to a specific format.\n * If the date is already in the correct format, it returns the original string.\n * If the date is in a different format, it attempts to convert it to the specified format.\n * If the date is invalid or cannot be converted, it returns null.\n *\n * @param dateString The date string to validate and format.\n * @param expectedFormat The expected date format (e.g., 'YYYY-MM-DD', 'YYYY-MM-DDTHH:mm').\n * @returns The formatted date string, or null if the date is invalid.\n */\nfunction enforceDateFormat(dateString: string | undefined, expectedFormat: DateFormat): string | null {\n\tif (!dateString) {\n\t\treturn null // Or handle the undefined case differently if needed\n\t}\n\n\tconst parsedDate = moment(dateString)\n\n\tif (!parsedDate.isValid()) {\n\t\treturn null // Date is invalid\n\t}\n\n\treturn parsedDate.format(expectedFormat)\n}\n\n/**\n * Validates if the initial date range values are in the expected format.\n *\n * @param dateFrom The dateFrom value to validate.\n * @param dateTo The dateTo value to validate.\n * @param expectedFormat The expected date format.\n * @returns An object indicating whether each date is valid, and the formatted date or null if invalid.\n */\nfunction validateInitialDateRange(\n\tdateFrom: string | undefined,\n\tdateTo: string | undefined,\n\texpectedFormat: DateFormat,\n): {\n\tdateFrom: string | null\n\tdateTo: string | null\n\tisValid: boolean\n} {\n\tconst formattedDateFrom = enforceDateFormat(dateFrom, expectedFormat)\n\tconst formattedDateTo = enforceDateFormat(dateTo, expectedFormat)\n\n\tconst isValid = formattedDateFrom !== null && formattedDateTo !== null\n\n\treturn {\n\t\tdateFrom: formattedDateFrom,\n\t\tdateTo: formattedDateTo,\n\t\tisValid,\n\t}\n}\n\nexport { validateInitialDateRange }\n","import { $LitElement } from '@mixins/index'\nimport { SchmancyInputChangeEvent } from '@schmancy/input'\nimport SchmancyMenu from '@schmancy/menu/menu'\nimport { html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport moment from 'moment'\nimport { validateInitialDateRange } from './date-utils' // Import the utility\n\ntype DateFormat = 'YYYY-MM-DD' | 'YYYY-MM-DDTHH:mm'\n\n/**\n * A date range selector that supports presets and manual date input.\n */\n@customElement('schmancy-date-range')\nexport default class SchmancyDateRange extends $LitElement() {\n\t// Either \"date\" or \"datetime-local\"\n\t@property({ type: String }) type: 'date' | 'datetime-local' = 'date'\n\n\t@property({ type: Object }) dateFrom!: { label: string; value: string }\n\t@property({ type: Object }) dateTo!: { label: string; value: string }\n\n\t// Optional min/max constraints\n\t@property({ type: String }) minDate?: string\n\t@property({ type: String }) maxDate?: string\n\n\t@query('#checkin') checkInInput!: HTMLInputElement\n\t@query('#checkout') checkOutInput!: HTMLInputElement\n\n\t// The <schmancy-menu> that displays presets + manual date inputs\n\t@query('schmancy-menu') schmancyMenu!: SchmancyMenu\n\n\t// Display text in the trigger button\n\t@state() selectedDateRange: string = 'Today'\n\n\t// Preset date range definitions\n\tpresetRanges!: Array<{\n\t\tlabel: string\n\t\trange: { dateFrom: string; dateTo: string }\n\t\tstep: moment.unitOfTime.DurationConstructor\n\t}>\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tthis.initPresetRanges()\n\n\t\t// Validate and format initial date range\n\t\tconst dateFormat = this.getDateFormat() as DateFormat\n\t\tconst validatedRange = validateInitialDateRange(this.dateFrom.value, this.dateTo.value, dateFormat)\n\n\t\tif (validatedRange.isValid) {\n\t\t\tthis.dateFrom.value = validatedRange.dateFrom!\n\t\t\tthis.dateTo.value = validatedRange.dateTo!\n\t\t\tthis.updateSelectedDateRange()\n\t\t} else {\n\t\t\tconsole.error('Invalid initial date range. Falling back to default.')\n\t\t\t// Handle invalid initial dates (e.g., set to default values, display an error)\n\t\t\tconst now = moment().format(dateFormat)\n\t\t\tthis.dateFrom.value = now\n\t\t\tthis.dateTo.value = now\n\t\t}\n\t}\n\t/**\n\t * Update the internal date range and fire a 'change' event to notify external code.\n\t */\n\tprivate setDateRange(fromDate: string, toDate: string) {\n\t\tthis.dateFrom.value = fromDate\n\t\tthis.dateTo.value = toDate\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<TSchmancDateRangePayload>('change', {\n\t\t\t\tdetail: { dateFrom: fromDate, dateTo: toDate },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true, // If you want it to pass shadow boundaries\n\t\t\t}),\n\t\t)\n\t\tthis.requestUpdate()\n\t}\n\tupdated(changedProps: Map<string, unknown>) {\n\t\tif (changedProps.has('type')) {\n\t\t\t// Re-init presets if \"type\" changes from date -> datetime\n\t\t\tthis.initPresetRanges()\n\t\t\tthis.updateSelectedDateRange()\n\t\t}\n\t}\n\n\t/**\n\t * Format strings for the internal <input> and for display text.\n\t */\n\tprivate getDateFormat(): string {\n\t\treturn this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'\n\t}\n\tprivate getDisplayFormat(): string {\n\t\treturn this.type === 'date' ? 'MMM DD, YYYY' : 'MMM DD, YYYY hh:mm A'\n\t}\n\n\t/**\n\t * Build up a list of preset ranges (yesterday, today, etc.).\n\t */\n\tprivate initPresetRanges() {\n\t\tconst format = this.getDateFormat()\n\t\tthis.presetRanges = [\n\t\t\t{\n\t\t\t\tlabel: 'Yesterday',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().subtract(1, 'days').startOf('day').format(format),\n\t\t\t\t\tdateTo: moment().subtract(1, 'days').endOf('day').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Today',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().startOf('day').format(format),\n\t\t\t\t\tdateTo: moment().endOf('day').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Tomorrow',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().add(1, 'days').startOf('day').format(format),\n\t\t\t\t\tdateTo: moment().add(1, 'days').endOf('day').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'This Week',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().startOf('isoWeek').format(format),\n\t\t\t\t\tdateTo: moment().endOf('isoWeek').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'week',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Last Week',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().subtract(1, 'weeks').startOf('isoWeek').format(format),\n\t\t\t\t\tdateTo: moment().subtract(1, 'weeks').endOf('isoWeek').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'week',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'This Month',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment().startOf('month').format(format),\n\t\t\t\t\tdateTo: moment().endOf('month').format(format),\n\t\t\t\t},\n\t\t\t\tstep: 'month',\n\t\t\t},\n\t\t\t// Add more if desired (e.g. \"Last Month,\" \"Custom,\" etc.)\n\t\t]\n\t}\n\n\t/**\n\t * Based on the current dateFrom/dateTo, see if it matches a preset.\n\t * Otherwise display a \"Custom\" range: \"Jan 01, 2023 - Jan 07, 2023\".\n\t */\n\tprivate updateSelectedDateRange() {\n\t\tconst preset = this.presetRanges.find(\n\t\t\tp => p.range.dateFrom === this.dateFrom.value && p.range.dateTo === this.dateTo.value,\n\t\t)\n\t\tif (preset) {\n\t\t\tthis.selectedDateRange = preset.label\n\t\t} else {\n\t\t\t// Construct a custom label\n\t\t\tconst fromMoment = moment(this.dateFrom.value)\n\t\t\tconst toMoment = moment(this.dateTo.value)\n\t\t\tconsole.log(fromMoment.format('HH:mm'), toMoment.format('HH:mm'), fromMoment.format('HH:mm'))\n\t\t\tif (fromMoment.isSame(toMoment, 'day')) {\n\t\t\t\tthis.selectedDateRange = fromMoment.format('MMM DD, YYYY')\n\t\t\t\t// append the time if fromMoment is not the start of the day and toMoment is not the end of the day\n\t\t\t\tif (fromMoment.format('HH:mm') !== '00:00' || toMoment.format('HH:mm') !== '23:59') {\n\t\t\t\t\tthis.selectedDateRange += ` ${fromMoment.format('HH:mm')}:${toMoment.format('HH:mm')}`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst fromStr = fromMoment.format(this.getDisplayFormat())\n\t\t\t\tconst toStr = toMoment.format(this.getDisplayFormat())\n\t\t\t\tthis.selectedDateRange = `${fromStr} - ${toStr}`\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Called when user selects a preset from the list.\n\t * Updates date range and closes the menu.\n\t */\n\tprivate handlePresetChange(label: string) {\n\t\tconst preset = this.presetRanges.find(range => range.label === label)\n\t\tif (!preset) return\n\t\tconst { dateFrom, dateTo } = preset.range\n\t\tthis.setDateRange(dateFrom, dateTo)\n\t\tthis.selectedDateRange = label\n\t\tthis.schmancyMenu.open = false\n\t}\n\n\t/**\n\t * Applies the date range from the inputs.\n\t * Closes the menu when done.\n\t */\n\tprivate handleDateRangeChange() {\n\t\tthis.setDateRange(this.dateFrom.value, this.dateTo.value)\n\t\tthis.updateSelectedDateRange()\n\t\tthis.schmancyMenu.open = false\n\t}\n\n\t/**\n\t * Shift the current date range forward or backward by the same number of days.\n\t * If the range is 7 days wide, shift 7 days, etc.\n\t */\n\tprivate shiftDateRange(factor: number) {\n\t\tconst format = this.getDateFormat()\n\t\tconst currentDiff = moment(this.dateTo.value).diff(moment(this.dateFrom.value), 'days') || 1\n\t\tconst newDateFrom = moment(this.dateFrom.value)\n\t\t\t.add(factor * currentDiff, 'days')\n\t\t\t.format(format)\n\t\tconst newDateTo = moment(this.dateTo.value)\n\t\t\t.add(factor * currentDiff, 'days')\n\t\t\t.format(format)\n\n\t\tthis.setDateRange(newDateFrom, newDateTo)\n\t\tthis.updateSelectedDateRange()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<!-- schmancy-menu typically provides a slot=\"button\" for the trigger,\n and then projects the menu items inside. -->\n\t\t\t<schmancy-menu class=\"z-100 w-max\" role=\"menu\" aria-label=\"Date range presets and custom input\">\n\t\t\t\t<!-- The toggle/trigger slot -->\n\t\t\t\t<schmancy-grid slot=\"button\" align=\"center\" cols=\"auto 1fr auto\">\n\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\taria-label=\"Shift date range backward\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\tthis.shiftDateRange(-1)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tarrow_left\n\t\t\t\t\t</schmancy-icon-button>\n\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\tclass=\"w-max\"\n\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\taria-haspopup=\"menu\"\n\t\t\t\t\t\t.ariaExpanded=${String(this.schmancyMenu?.open || false)}\n\t\t\t\t\t>\n\t\t\t\t\t\t${this.selectedDateRange || 'Date range'}\n\t\t\t\t\t</schmancy-button>\n\n\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\taria-label=\"Shift date range forward\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\tthis.shiftDateRange(1)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tarrow_right\n\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t</schmancy-grid>\n\n\t\t\t\t<!-- The menu surface: presets + manual date selection -->\n\t\t\t\t${this.presetRanges.map(\n\t\t\t\t\tpreset => html`\n\t\t\t\t\t\t<schmancy-menu-item role=\"menuitem\" class=\"w-full\" @click=${() => this.handlePresetChange(preset.label)}>\n\t\t\t\t\t\t\t<schmancy-grid class=\"w-full\" align=\"center\" cols=\"auto 1fr auto\"> ${preset.label} </schmancy-grid>\n\t\t\t\t\t\t</schmancy-menu-item>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Manual date range inputs + \"Apply\" button -->\n\t\t\t\t<schmancy-grid gap=\"sm\" flow=\"row\" class=\"p-4\">\n\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\tid=\"checkin\"\n\t\t\t\t\t\t.type=${this.type}\n\t\t\t\t\t\t.label=${this.dateFrom.label}\n\t\t\t\t\t\t.value=${this.dateFrom.value}\n\t\t\t\t\t\tmin=${ifDefined(this.minDate)}\n\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\tconst fmt = this.getDateFormat()\n\t\t\t\t\t\t\tconst selectedDate = moment(event.detail.value, fmt).format(fmt)\n\t\t\t\t\t\t\tthis.dateFrom.value = selectedDate\n\t\t\t\t\t\t\t// Update the checkout input's min attribute:\n\t\t\t\t\t\t\tthis.checkOutInput.setAttribute('min', selectedDate)\n\t\t\t\t\t\t}}\n\t\t\t\t\t></schmancy-input>\n\n\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\tid=\"checkout\"\n\t\t\t\t\t\t.type=${this.type}\n\t\t\t\t\t\t.label=${this.dateTo.label}\n\t\t\t\t\t\t.value=${this.dateTo.value}\n\t\t\t\t\t\tmin=${ifDefined(this.dateFrom.value)}\n\t\t\t\t\t\tmax=${ifDefined(this.maxDate)}\n\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\tconst fmt = this.getDateFormat()\n\t\t\t\t\t\t\tconst selectedDate = moment(event.detail.value, fmt).format(fmt)\n\t\t\t\t\t\t\tthis.dateTo.value = selectedDate\n\t\t\t\t\t\t}}\n\t\t\t\t\t></schmancy-input>\n\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tApply\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</schmancy-grid>\n\t\t\t</schmancy-menu>\n\t\t`\n\t}\n}\n\n/**\n * The payload for a date range change event.\n */\nexport type TSchmancDateRangePayload = {\n\tdateFrom?: string\n\tdateTo?: string\n}\n\n/**\n * A custom event fired when the date range is updated.\n */\nexport type SchmancyDateRangeChangeEvent = CustomEvent<TSchmancDateRangePayload>\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-date-range': SchmancyDateRange\n\t}\n}\n"],"names":["enforceDateFormat","dateString","expectedFormat","parsedDate","moment","isValid","format","SchmancyDateRange","$LitElement","super","arguments","this","type","selectedDateRange","connectedCallback","initPresetRanges","dateFormat","getDateFormat","validatedRange","dateFrom","dateTo","formattedDateFrom","formattedDateTo","value","updateSelectedDateRange","now","fromDate","toDate","dispatchEvent","CustomEvent","detail","bubbles","composed","requestUpdate","changedProps","has","presetRanges","label","range","subtract","startOf","endOf","step","add","preset","find","p","fromMoment","toMoment","isSame","fromStr","getDisplayFormat","toStr","setDateRange","schmancyMenu","open","handleDateRangeChange","factor","currentDiff","diff","newDateFrom","newDateTo","html","e","preventDefault","shiftDateRange","String","map","handlePresetChange","ifDefined","minDate","event","stopPropagation","fmt","selectedDate","checkOutInput","setAttribute","maxDate","__decorateClass","property","prototype","Object","query","state","customElement"],"mappings":"2TAcA,SAASA,EAAkBC,EAAgCC,EAAAA,CAC1D,GAAKD,CAAAA,EACG,OAAA,KAGF,MAAAE,EAAaC,EAAOH,CAEtB,EAAA,OAACE,EAAWE,QAAAA,EAITF,EAAWG,OAAOJ,CAAAA,EAHjB,IAIT,iMCXA,IAAqBK,EAArB,cAA+CC,EAAAA,YAAAA,CAAAA,CAA/C,aAAAC,CAAAA,MAAAA,GAAAC,SAE+DC,EAAAA,KAAAC,KAAA,OAgBzBD,KAAAE,kBAAA,OAAA,CASrC,mBACCJ,CAAAA,MAAMK,kBACNH,EAAAA,KAAKI,iBAGC,EAAA,MAAAC,EAAaL,KAAKM,cAAAA,EAClBC,EDZR,SACCC,EACAC,EACAlB,EAMM,CAAA,MAAAmB,EAAoBrB,EAAkBmB,EAAUjB,CAChDoB,EAAAA,EAAkBtB,EAAkBoB,EAAQlB,CAAAA,EAI3C,MAAA,CACNiB,SAAUE,EACVD,OAAQE,EACRjB,QALegB,IAAsB,MAAQC,IAAoB,IAApBA,CAO/C,ECPkDX,KAAKQ,SAASI,MAAOZ,KAAKS,OAAOG,MAAOP,CAAAA,EAExF,GAAIE,EAAeb,QACbM,KAAAQ,SAASI,MAAQL,EAAeC,SAChCR,KAAAS,OAAOG,MAAQL,EAAeE,OACnCT,KAAKa,wBACC,MAAA,CAGN,MAAMC,EAAMrB,IAASE,OAAOU,CAAAA,EAC5BL,KAAKQ,SAASI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AKS,OAAOG,MAAQmD,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOXX,GAAAA,CACTA,EAAEC,eAAAA,EACFD,EAAES,gBAAAA,EACF7D,KAAK6C,sBAAsB,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAC3B,CA1SsBsB,EAAAA,EAAA,CAA3BC,WAAS,CAAEnE,KAAMsD,MAAAA,CAAAA,CAAAA,EAFE3D,EAEQyE,UAAA,OAAA,GAEAF,EAAA,CAA3BC,WAAS,CAAEnE,KAAMqE,MAJE1E,CAAAA,CAAAA,EAAAA,EAIQyE,UAAA,WAAA,CAAA,EACAF,EAAA,CAA3BC,WAAS,CAAEnE,KAAMqE,UALE1E,EAKQyE,UAAA,SAAA,CAGAF,EAAAA,EAAA,CAA3BC,WAAS,CAAEnE,KAAMsD,MAAAA,CAAAA,CAAAA,EARE3D,EAQQyE,UAAA,UAAA,CACAF,EAAAA,EAAA,CAA3BC,WAAS,CAAEnE,KAAMsD,UATE3D,EASQyE,UAAA,UAAA,CAETF,EAAAA,EAAA,CAAlBI,EAAAA,MAAM,aAXa3E,EAWDyE,UAAA,eAAA,CACCF,EAAAA,EAAA,CAAnBI,EAAAA,MAAM,WAZa3E,CAAAA,EAAAA,EAYAyE,UAAA,gBAAA,GAGIF,EAAA,CAAvBI,EAAAA,MAAM,eAAA,CAAA,EAfa3E,EAeIyE,UAAA,eAAA,GAGfF,EAAA,CAARK,EAAMA,MAlBa5E,CAAAA,EAAAA,EAkBXyE,UAAA,oBAAA,CAAA,EAlBWzE,EAArBuE,EAAA,CADCM,EAAAA,cAAc,qBACM7E,CAAAA,EAAAA,CAAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";require("./date-range-3yVvaRLG.cjs");
1
+ "use strict";require("./date-range-Df_6BLmA.cjs");
2
2
  //# sourceMappingURL=date-range.cjs.map
@@ -1,2 +1,2 @@
1
- import "./date-range-D5cDTxz2.js";
1
+ import "./date-range-Bole0xTK.js";
2
2
  //# sourceMappingURL=date-range.js.map
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CvQB_OPX.cjs");const r=require("./area.component-CWwc52Uy.cjs");require("./autocomplete-B29VQiPY.cjs"),require("./spinner-CBX7eCsA.cjs");const o=require("./icon-button-CaEPMYHW.cjs"),e=require("./teleport.component-BU8VUQ9X.cjs"),S=require("./checkbox-BNi0XYlX.cjs");require("./chips-BbMv4qYo.cjs");const u=require("./payment-card-form-BwzL71bJ.cjs");require("./date-range-3yVvaRLG.cjs");const y=require("./delay-CbylHdl-.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-BPWZZ0t2.cjs"),require("./form-BeLadN-A.cjs"),require("./icon-BOUn9Lbw.cjs"),require("./input-BrLbi5wu.cjs");const t=require("./flex-DICGGeg0.cjs"),m=require("./list-CQJYVqBV.cjs");require("./menu-BKUoQyCS.cjs");const a=require("./outlet-D_JSZeRn.cjs");require("./option-GQjTaa4v.cjs");const b=require("./radio-group-DSob8tt0.cjs"),l=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const d=require("./select-B_G2xt3n.cjs"),n=require("./sheet-BoPm_Ysx.cjs"),h=require("./slider-DFSq11C6.cjs"),p=require("./surface-BCP4Nk6f.cjs");require("./table-MEstD23V.cjs"),require("./tabs-group-DyNlrJrc.cjs"),require("./textarea-DgjTD3MS.cjs");const i=require("./theme.component-BpS8ehqb.cjs"),g=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DmdmN56f.cjs");const f=require("./tree-DzG0MTVn.cjs"),q=require("./types.cjs"),O=require("./typewriter-DNihFwgs.cjs"),w=require("./typography-Di2lcsba.cjs"),D=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>S.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>u.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>y.SchmancyDelay}),exports.delayContext=y.delayContext,exports.color=c.color,exports.fullHeight=c.fullHeight,exports.ripple=c.ripple,Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>m.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>m.SchmancyListItem}),exports.$notify=a.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>a.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>a.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>b.RadioGroup}),exports.mutationObserver=l.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>d.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>h.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>h.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>i.SchmancyThemeComponent}),exports.formateTheme=i.formateTheme,exports.tailwindStyles=i.tailwindStyles,exports.SchmancyTheme=g.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>f.SchmancyTree}),exports.SchmancyEvents=q.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>O.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=D.intersection$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CvQB_OPX.cjs");const r=require("./area.component-CWwc52Uy.cjs");require("./autocomplete-B29VQiPY.cjs"),require("./spinner-CBX7eCsA.cjs");const o=require("./icon-button-CaEPMYHW.cjs"),e=require("./teleport.component-C8AeNbog.cjs"),S=require("./checkbox-BNi0XYlX.cjs");require("./chips-BbMv4qYo.cjs");const u=require("./payment-card-form-BwzL71bJ.cjs");require("./date-range-Df_6BLmA.cjs");const y=require("./delay-CbylHdl-.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-BPWZZ0t2.cjs"),require("./form-BeLadN-A.cjs"),require("./icon-BOUn9Lbw.cjs"),require("./input-BrLbi5wu.cjs");const t=require("./flex-DICGGeg0.cjs"),m=require("./list-CQJYVqBV.cjs");require("./menu-BKUoQyCS.cjs");const a=require("./outlet-D_JSZeRn.cjs");require("./option-GQjTaa4v.cjs");const b=require("./radio-group-DSob8tt0.cjs"),l=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const d=require("./select-B_G2xt3n.cjs"),n=require("./sheet-BoPm_Ysx.cjs"),h=require("./slider-DFSq11C6.cjs"),p=require("./surface-BCP4Nk6f.cjs");require("./table-MEstD23V.cjs"),require("./tabs-group-DyNlrJrc.cjs"),require("./textarea-DgjTD3MS.cjs");const i=require("./theme.component-BpS8ehqb.cjs"),g=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DmdmN56f.cjs");const f=require("./tree-DzG0MTVn.cjs"),q=require("./types.cjs"),O=require("./typewriter-DNihFwgs.cjs"),w=require("./typography-Di2lcsba.cjs"),D=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>S.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>u.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>y.SchmancyDelay}),exports.delayContext=y.delayContext,exports.color=c.color,exports.fullHeight=c.fullHeight,exports.ripple=c.ripple,Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>m.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>m.SchmancyListItem}),exports.$notify=a.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>a.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>a.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>b.RadioGroup}),exports.mutationObserver=l.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>d.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>h.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>h.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>i.SchmancyThemeComponent}),exports.formateTheme=i.formateTheme,exports.tailwindStyles=i.tailwindStyles,exports.SchmancyTheme=g.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>f.SchmancyTree}),exports.SchmancyEvents=q.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>O.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=D.intersection$;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -3,11 +3,11 @@ import { F as C, H as d, b as T, S as b, a as u, r as N } from "./area.component
3
3
  import "./autocomplete-BYaStWXT.js";
4
4
  import "./spinner-DxDUWBpa.js";
5
5
  import { S as R, a as v } from "./icon-button-DIGpWi22.js";
6
- import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as O, i as W, k as L, l as _, m as B, j as P, n as j, o as K, W as V, s as q, h as z, t as J } from "./teleport.component-CQ-n025U.js";
6
+ import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as O, i as W, k as L, l as _, m as B, j as P, n as j, o as K, W as V, s as q, h as z, t as J } from "./teleport.component-ByTxHtT5.js";
7
7
  import { S as U } from "./checkbox-BDRhgA8Q.js";
8
8
  import "./chips-DLKWllS2.js";
9
9
  import { S as Z } from "./payment-card-form-CIWTaRBz.js";
10
- import "./date-range-D5cDTxz2.js";
10
+ import "./date-range-Bole0xTK.js";
11
11
  import { S as ra, d as ea } from "./delay-D_NrsrNB.js";
12
12
  import { c as oa, f as ca, r as ma } from "./ripple-BumgqsDT.js";
13
13
  import "./divider-D2GJitrx.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-BU8VUQ9X.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-C8AeNbog.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
2
2
  //# sourceMappingURL=nav-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-CQ-n025U.js";
1
+ import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-ByTxHtT5.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
package/dist/teleport.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-BU8VUQ9X.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-C8AeNbog.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
2
2
  //# sourceMappingURL=teleport.cjs.map
@@ -17,7 +17,7 @@ import { SchmancyEvents as m } from "./types.js";
17
17
  import { n as E, e as $ } from "./provide-kj6-udep.js";
18
18
  import { $ as W } from "./litElement.mixin-C2ixT_uz.js";
19
19
  import { c as h } from "./consume-DSKPc5vj.js";
20
- import "./date-range-D5cDTxz2.js";
20
+ import "./date-range-Bole0xTK.js";
21
21
  import "./delay-D_NrsrNB.js";
22
22
  import { c as z, f as Wt } from "./ripple-BumgqsDT.js";
23
23
  import "./divider-D2GJitrx.js";
@@ -527,4 +527,4 @@ export {
527
527
  Ge as s,
528
528
  H as t
529
529
  };
530
- //# sourceMappingURL=teleport.component-CQ-n025U.js.map
530
+ //# sourceMappingURL=teleport.component-ByTxHtT5.js.map