@mhmo91/schmancy 0.1.0 → 0.1.2

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("./theme-button-3jqFNdPA.cjs");
1
+ "use strict";require("./theme-button-BtmkBFGA.cjs");
2
2
  //# sourceMappingURL=card.cjs.map
package/dist/card.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./theme-button-CtNkFVpC.js";
1
+ import "./theme-button-hgF7TMT-.js";
2
2
  //# sourceMappingURL=card.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-button-3jqFNdPA.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("./theme-button-BtmkBFGA.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 "./theme-button-CtNkFVpC.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 "./theme-button-hgF7TMT-.js";
2
2
  export {
3
3
  n as SchmancyContentDrawer,
4
4
  t as SchmancyContentDrawerID,
@@ -0,0 +1,53 @@
1
+ "use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const c=require("./litElement.mixin-DbB-1RYZ.cjs");require("./tailwind.mixin-7_DOUoA1.cjs");const h=require("lit"),Y=require("lit/decorators.js"),l=require("lit/directives/if-defined.js"),t=require("moment");var D=Object.defineProperty,p=Object.getOwnPropertyDescriptor,r=(e,a,o,i)=>{for(var d,n=i>1?void 0:i?p(a,o):a,m=e.length-1;m>=0;m--)(d=e[m])&&(n=(i?d(a,o,n):d(n))||n);return i&&n&&D(a,o,n),n};let s=class extends c.$LitElement(){constructor(){super(...arguments),this.type="date",this.selectedDateRange="Today"}connectedCallback(){super.connectedCallback(),this.presetRanges=[{label:"Yesterday",range:{dateFrom:t().subtract(1,"days").startOf("day").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),dateTo:t().subtract(1,"days").endOf("day").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm")},step:"day"},{label:"Today",range:{dateFrom:t().startOf("day").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),dateTo:t().endOf("day").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm")},step:"day"},{label:"Tomorrow",range:{dateFrom:t().add(1,"days").startOf("day").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),dateTo:t().add(1,"days").endOf("day").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm")},step:"day"},{label:"This Week",range:{dateFrom:t().startOf("week").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),dateTo:t().endOf("week").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm")},step:"weeks"},{label:"Last Week",range:{dateFrom:t().subtract(1,"weeks").startOf("isoWeek").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),dateTo:t().subtract(1,"weeks").endOf("isoWeek").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm")},step:"weeks"},{label:"This Month",range:{dateFrom:t().startOf("month").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),dateTo:t().endOf("month").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm")},step:"month"}];const e=this.presetRanges.find(a=>a.range.dateFrom===this.dateFrom.value&&a.range.dateTo===this.dateTo.value);this.selectedDateRange=e?e.label:t(this.dateFrom.value).format("MMM DD, YYYY").concat(" To ",t(this.dateTo.value).format("MMM DD, YYYY"))}setDateRange(e,a){this.dateFrom.value=e,this.dateTo.value=a,this.dispatchEvent(new CustomEvent("change",{detail:{dateFrom:this.dateFrom.value,dateTo:this.dateTo.value}})),this.requestUpdate()}handlePresetChange(e){const a=this.presetRanges.find(o=>o.label===e);if(a){const{dateFrom:o,dateTo:i}=a.range;this.setDateRange(o,i),this.selectedDateRange=e}}render(){return h.html`
2
+ <div class="date-range-selector relative">
3
+ <schmancy-menu class="z-100 w-max">
4
+ <schmancy-grid slot="button" align="center" cols="auto 1fr auto">
5
+ <schmancy-icon-button
6
+ @click=${e=>{e.preventDefault(),e.stopPropagation();const a=t(this.dateTo.value).diff(t(this.dateFrom.value),"days")||1;this.dateFrom.value=t(this.dateFrom.value).subtract(a,"days").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),this.dateTo.value=t(this.dateTo.value).subtract(a,"days").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),this.handleDateRangeChange()}}
7
+ >
8
+ arrow_left
9
+ </schmancy-icon-button>
10
+ <schmancy-button class="w-max" variant="outlined" type="button"
11
+ >${this.selectedDateRange||"Date range"}
12
+ </schmancy-button>
13
+ <schmancy-icon-button
14
+ @click=${e=>{e.preventDefault(),e.stopPropagation();const a=t(this.dateTo.value).diff(t(this.dateFrom.value),"days")||1;this.dateFrom.value=t(this.dateFrom.value).add(a,"days").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),this.dateTo.value=t(this.dateTo.value).add(a,"days").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm"),this.handleDateRangeChange()}}
15
+ >arrow_right</schmancy-icon-button
16
+ >
17
+ </schmancy-grid>
18
+
19
+ <schmancy-surface elevation="2">
20
+ ${this.presetRanges.map(e=>h.html`
21
+ <schmancy-menu-item class="w-full" @click=${()=>this.handlePresetChange(e.label)}>
22
+ <schmancy-grid class="w-full" align="center" cols="auto 1fr auto"> ${e.label} </schmancy-grid>
23
+ </schmancy-menu-item>
24
+ `)}
25
+ <schmancy-grid gap="sm" flow="row" class="p-4">
26
+ <schmancy-input
27
+ id="checkin"
28
+ min=${l.ifDefined(this.minDate)}
29
+ type=${this.type}
30
+ label="${this.dateFrom.label}"
31
+ .value=${this.dateFrom.value}
32
+ @change=${e=>{e.preventDefault(),e.stopPropagation();const a=t(e.detail.value,this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm");this.dateFrom.value=a;const o=a;this.checkOutInput.setAttribute("min",o)}}
33
+ ></schmancy-input>
34
+ <schmancy-input
35
+ id="checkout"
36
+ type=${this.type}
37
+ label="${this.dateTo.label}"
38
+ .value=${this.dateTo.value}
39
+ @change=${e=>{e.preventDefault(),e.stopPropagation(),this.dateTo.value=t(e.detail.value,this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm").format(this.type==="date"?"YYYY-MM-DD":"YYYY-MM-DDTHH:mm")}}
40
+ ></schmancy-input>
41
+
42
+ <schmancy-button
43
+ variant="outlined"
44
+ @click=${e=>{e.preventDefault(),e.stopPropagation(),this.handleDateRangeChange()}}
45
+ >
46
+ Apply
47
+ </schmancy-button>
48
+ </schmancy-grid>
49
+ </schmancy-surface>
50
+ </schmancy-menu>
51
+ </div>
52
+ `}handleDateRangeChange(){this.setDateRange(this.dateFrom.value,this.dateTo.value);const e=this.presetRanges.find(a=>a.range.dateFrom===this.dateFrom.value&&a.range.dateTo===this.dateTo.value);e?this.selectedDateRange=e.label:(this.selectedDateRange=t(this.dateFrom.value).format(this.type==="date"?"MMM DD, YYYY":"MMM DD, YYYY hh:mm A").concat(" - ",t(this.dateTo.value).format(this.type==="date"?"MMM DD, YYYY":"MMM DD, YYYY hh:mm A")),this.schmancyMenu.open=!1)}};r([Y.property({type:String})],s.prototype,"type",2),r([Y.property({type:Object})],s.prototype,"dateFrom",2),r([Y.property({type:Object})],s.prototype,"dateTo",2),r([Y.query("#checkin")],s.prototype,"checkInInput",2),r([Y.query("#checkout")],s.prototype,"checkOutInput",2),r([Y.property({type:String})],s.prototype,"minDate",2),r([Y.property({type:String})],s.prototype,"maxDate",2),r([Y.query("schmancy-menu")],s.prototype,"schmancyMenu",2),r([Y.state()],s.prototype,"selectedDateRange",2),s=r([Y.customElement("schmancy-date-range")],s);
53
+ //# sourceMappingURL=date-range-Cr5kxKi-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-Cr5kxKi-.cjs","sources":["../src/date-range/date-range.ts"],"sourcesContent":["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'\n\n@customElement('schmancy-date-range')\nexport default class SwiftHRAdminDateRange extends $LitElement() {\n\t@property({ type: String }) type: 'date' | 'datetime' = 'date'\n\t@property({ type: Object }) dateFrom!: {\n\t\tlabel: string\n\t\tvalue: string\n\t}\n\t@property({ type: Object }) dateTo!: {\n\t\tlabel: string\n\t\tvalue: string\n\t}\n\n\t@query('#checkin') checkInInput!: HTMLInputElement\n\t@query('#checkout') checkOutInput!: HTMLInputElement\n\n\t@property({ type: String }) minDate: string | undefined\n\t@property({ type: String }) maxDate!: string | undefined\n\t@query('schmancy-menu') schmancyMenu!: SchmancyMenu\n\n\t@state() selectedDateRange: string = 'Today'\n\n\tpresetRanges!: Array<{\n\t\tlabel: string\n\t\trange: {\n\t\t\tdateFrom: string\n\t\t\tdateTo: string\n\t\t}\n\t\tstep: moment.unitOfTime.DurationConstructor | moment.unitOfTime._isoWeek\n\t\tselected?: boolean\n\t}>\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\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()\n\t\t\t\t\t\t.subtract(1, 'days')\n\t\t\t\t\t\t.startOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.subtract(1, 'days')\n\t\t\t\t\t\t.endOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\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()\n\t\t\t\t\t\t.startOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.endOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t// tomorrow\n\t\t\t{\n\t\t\t\tlabel: 'Tomorrow',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment()\n\t\t\t\t\t\t.add(1, 'days')\n\t\t\t\t\t\t.startOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.add(1, 'days')\n\t\t\t\t\t\t.endOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\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()\n\t\t\t\t\t\t.startOf('week')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.endOf('week')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'weeks',\n\t\t\t},\n\t\t\t// last week\n\t\t\t{\n\t\t\t\tlabel: 'Last Week',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment()\n\t\t\t\t\t\t.subtract(1, 'weeks')\n\t\t\t\t\t\t.startOf('isoWeek')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.subtract(1, 'weeks')\n\t\t\t\t\t\t.endOf('isoWeek')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'weeks',\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()\n\t\t\t\t\t\t.startOf('month')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.endOf('month')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'month',\n\t\t\t},\n\t\t\t// { label: \"Custom\", range: () => this.setCustomRange() },\n\t\t]\n\t\t// set the state selectedDateRange based on the dateFrom and dateTo values\n\t\tconst preset = this.presetRanges.find(\n\t\t\trange => range.range.dateFrom === this.dateFrom.value && range.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\tthis.selectedDateRange = moment(this.dateFrom.value)\n\t\t\t\t.format('MMM DD, YYYY')\n\t\t\t\t.concat(' To ', moment(this.dateTo.value).format('MMM DD, YYYY'))\n\t\t}\n\t}\n\n\tsetDateRange(fromDate: string, toDate: string) {\n\t\tthis.dateFrom.value = fromDate\n\t\tthis.dateTo.value = toDate\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<TSchmancDateRangePayload>('change', {\n\t\t\t\tdetail: {\n\t\t\t\t\tdateFrom: this.dateFrom.value,\n\t\t\t\t\tdateTo: this.dateTo.value,\n\t\t\t\t},\n\t\t\t}),\n\t\t)\n\t\tthis.requestUpdate()\n\t}\n\n\thandlePresetChange(presetLabel: string) {\n\t\tconst preset = this.presetRanges.find(range => range.label === presetLabel)\n\t\tif (preset) {\n\t\t\tconst { dateFrom, dateTo } = preset.range\n\t\t\tthis.setDateRange(dateFrom, dateTo)\n\t\t\tthis.selectedDateRange = presetLabel\n\t\t}\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"date-range-selector relative\">\n\t\t\t\t<schmancy-menu class=\"z-100 w-max\">\n\t\t\t\t\t<schmancy-grid slot=\"button\" align=\"center\" cols=\"auto 1fr auto\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t// Calculate the difference between dateFrom and dateTo in days\n\t\t\t\t\t\t\t\tconst dateDiff = moment(this.dateTo.value).diff(moment(this.dateFrom.value), 'days') || 1\n\n\t\t\t\t\t\t\t\t// Subtract the date difference from both dateFrom and dateTo\n\t\t\t\t\t\t\t\tthis.dateFrom.value = moment(this.dateFrom.value)\n\t\t\t\t\t\t\t\t\t.subtract(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\tthis.dateTo.value = moment(this.dateTo.value)\n\t\t\t\t\t\t\t\t\t.subtract(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\t// Call the function to handle the date range change\n\t\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tarrow_left\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t<schmancy-button class=\"w-max\" variant=\"outlined\" type=\"button\"\n\t\t\t\t\t\t\t>${this.selectedDateRange || 'Date range'}\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t// Calculate the difference between dateFrom and dateTo in days\n\t\t\t\t\t\t\t\tconst dateDiff = moment(this.dateTo.value).diff(moment(this.dateFrom.value), 'days') || 1\n\n\t\t\t\t\t\t\t\t// Add the date difference to both dateFrom and dateTo\n\t\t\t\t\t\t\t\tthis.dateFrom.value = moment(this.dateFrom.value)\n\t\t\t\t\t\t\t\t\t.add(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\tthis.dateTo.value = moment(this.dateTo.value)\n\t\t\t\t\t\t\t\t\t.add(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\t// Call the function to handle the date range change\n\t\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>arrow_right</schmancy-icon-button\n\t\t\t\t\t\t>\n\t\t\t\t\t</schmancy-grid>\n\n\t\t\t\t\t<schmancy-surface elevation=\"2\">\n\t\t\t\t\t\t${this.presetRanges.map(\n\t\t\t\t\t\t\tpreset => html`\n\t\t\t\t\t\t\t\t<schmancy-menu-item class=\"w-full\" @click=${() => this.handlePresetChange(preset.label)}>\n\t\t\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\t\t</schmancy-menu-item>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<schmancy-grid gap=\"sm\" flow=\"row\" class=\"p-4\">\n\t\t\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\t\t\tid=\"checkin\"\n\t\t\t\t\t\t\t\tmin=${ifDefined(this.minDate)}\n\t\t\t\t\t\t\t\ttype=${this.type}\n\t\t\t\t\t\t\t\tlabel=\"${this.dateFrom.label}\"\n\t\t\t\t\t\t\t\t.value=${this.dateFrom.value}\n\t\t\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\t\t\tconst selectedDate = moment(\n\t\t\t\t\t\t\t\t\t\tevent.detail.value,\n\t\t\t\t\t\t\t\t\t\tthis.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm',\n\t\t\t\t\t\t\t\t\t).format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\t\t\t\t\t\t\t\t\tthis.dateFrom.value = selectedDate\n\t\t\t\t\t\t\t\t\tconst minDateStr = selectedDate\n\t\t\t\t\t\t\t\t\tthis.checkOutInput.setAttribute('min', minDateStr)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></schmancy-input>\n\t\t\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\t\t\tid=\"checkout\"\n\t\t\t\t\t\t\t\ttype=${this.type}\n\t\t\t\t\t\t\t\tlabel=\"${this.dateTo.label}\"\n\t\t\t\t\t\t\t\t.value=${this.dateTo.value}\n\t\t\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.dateTo.value = moment(\n\t\t\t\t\t\t\t\t\t\tevent.detail.value,\n\t\t\t\t\t\t\t\t\t\tthis.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm',\n\t\t\t\t\t\t\t\t\t).format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></schmancy-input>\n\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tApply\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t</schmancy-grid>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-menu>\n\t\t\t</div>\n\t\t`\n\t}\n\n\thandleDateRangeChange() {\n\t\tthis.setDateRange(this.dateFrom.value, this.dateTo.value)\n\t\t// check if the selected date range is a preset\n\t\tconst preset = this.presetRanges.find(\n\t\t\trange => range.range.dateFrom === this.dateFrom.value && range.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\tthis.selectedDateRange = moment(this.dateFrom.value)\n\t\t\t\t.format(this.type === 'date' ? 'MMM DD, YYYY' : 'MMM DD, YYYY hh:mm A')\n\t\t\t\t.concat(' - ', moment(this.dateTo.value).format(this.type === 'date' ? 'MMM DD, YYYY' : 'MMM DD, YYYY hh:mm A'))\n\t\t\tthis.schmancyMenu.open = false\n\t\t}\n\t}\n}\n\nexport type SchmancyDateRangeChangeEvent = CustomEvent<TSchmancDateRangePayload>\ntype TSchmancDateRangePayload = {\n\tdateFrom?: string\n\tdateTo?: string\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-date-range': SwiftHRAdminDateRange\n\t}\n}\n"],"names":["SwiftHRAdminDateRange","$LitElement","constructor","super","arguments","this","type","selectedDateRange","connectedCallback","presetRanges","label","range","dateFrom","moment","subtract","startOf","format","dateTo","endOf","step","add","preset","find","value","concat","fromDate","toDate","dispatchEvent","CustomEvent","detail","requestUpdate","presetLabel","setDateRange","render","html","e","preventDefault","stopPropagation","dateDiff","diff","handleDateRangeChange","map","handlePresetChange","ifDefined","minDate","event","selectedDate","minDateStr","checkOutInput","setAttribute","schmancyMenu","open","__decorateClass","property","String","prototype","Object","query","state","customElement"],"mappings":"2fASA,IAAqBA,EAArB,cAAmDC,EAAAA,cAAnD,aAAAC,CAAAC,SAAAC,SACyDC,EAAAA,KAAAC,KAAA,OAiBnBD,KAAAE,kBAAA,OAAA,CAYrC,oBACCJ,MAAMK,kBAAAA,EACNH,KAAKI,aAAe,CACnB,CACCC,MAAO,YACPC,MAAO,CACNC,SAAUC,IACRC,SAAS,EAAG,QACZC,QAAQ,KAAA,EACRC,OAAOX,KAAKC,OAAS,OAAS,aAAe,kBAAA,EAC/CW,OAAQJ,EACNC,EAAAA,SAAS,EAAG,MACZI,EAAAA,MAAM,OACNF,OAAOX,KAAKC,OAAS,OAAS,aAAe,qBAEhDa,KAAM,KAAA,EAEP,CACCT,MAAO,QACPC,MAAO,CACNC,SAAUC,IACRE,QAAQ,KAAA,EACRC,OAAOX,KAAKC,OAAS,OAAS,aAAe,kBAAA,EAC/CW,OAAQJ,EACNK,EAAAA,MAAM,OACNF,OAAOX,KAAKC,OAAS,OAAS,aAAe,qBAEhDa,KAAM,KAAA,EAGP,CACCT,MAAO,WACPC,MAAO,CACNC,SAAUC,IACRO,IAAI,EAAG,QACPL,QAAQ,KAAA,EACRC,OAAOX,KAAKC,OAAS,OAAS,aAAe,kBAAA,EAC/CW,OAAQJ,EACNO,EAAAA,IAAI,EAAG,MACPF,EAAAA,MAAM,OACNF,OAAOX,KAAKC,OAAS,OAAS,aAAe,kBAAA,CAAA,EAEhDa,KAAM,KAEP,EAAA,CACCT,MAAO,YACPC,MAAO,CACNC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AAA,eAAA,CAEfH,EAAAA,EAAA,CAARM,EAAMA,MAAAA,CAAAA,EAlBa1D,EAkBXuD,UAAA,oBAAA,CAlBWvD,EAAAA,EAArBoD,EAAA,CADCO,EAAAA,cAAc,qBACM3D,CAAAA,EAAAA,CAAAA"}
@@ -3,43 +3,43 @@ import "lit/directives/class-map.js";
3
3
  import "lit/directives/style-map.js";
4
4
  import { $ as l } from "./litElement.mixin-Dc8jFg3I.js";
5
5
  import "./tailwind.mixin-CZEnDYs-.js";
6
- import { html as h } from "lit";
7
- import { property as m, query as c, state as D, customElement as p } from "lit/decorators.js";
8
- import { ifDefined as u } from "lit/directives/if-defined.js";
9
- import a from "moment";
10
- var M = Object.defineProperty, y = Object.getOwnPropertyDescriptor, o = (t, e, n, r) => {
11
- for (var i, Y = r > 1 ? void 0 : r ? y(e, n) : e, d = t.length - 1; d >= 0; d--) (i = t[d]) && (Y = (r ? i(e, n, Y) : i(Y)) || Y);
12
- return r && Y && M(e, n, Y), Y;
6
+ import { html as c } from "lit";
7
+ import { property as m, query as h, state as D, customElement as p } from "lit/decorators.js";
8
+ import { ifDefined as M } from "lit/directives/if-defined.js";
9
+ import e from "moment";
10
+ var y = Object.defineProperty, u = Object.getOwnPropertyDescriptor, o = (t, a, Y, r) => {
11
+ for (var d, n = r > 1 ? void 0 : r ? u(a, Y) : a, i = t.length - 1; i >= 0; i--) (d = t[i]) && (n = (r ? d(a, Y, n) : d(n)) || n);
12
+ return r && n && y(a, Y, n), n;
13
13
  };
14
14
  let s = class extends l() {
15
15
  constructor() {
16
16
  super(...arguments), this.type = "date", this.selectedDateRange = "Today";
17
17
  }
18
18
  connectedCallback() {
19
- super.connectedCallback(), this.presetRanges = [{ label: "Yesterday", range: { dateFrom: a().subtract(1, "days").startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: a().subtract(1, "days").endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "Today", range: { dateFrom: a().startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: a().endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "This Week", range: { dateFrom: a().startOf("week").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: a().endOf("week").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "weeks" }, { label: "Last Week", range: { dateFrom: a().subtract(1, "weeks").startOf("isoWeek").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: a().subtract(1, "weeks").endOf("isoWeek").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "weeks" }, { label: "This Month", range: { dateFrom: a().startOf("month").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: a().endOf("month").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "month" }];
20
- const t = this.presetRanges.find((e) => e.range.dateFrom === this.dateFrom.value && e.range.dateTo === this.dateTo.value);
21
- this.selectedDateRange = t ? t.label : a(this.dateFrom.value).format("MMM DD, YYYY").concat(" To ", a(this.dateTo.value).format("MMM DD, YYYY"));
19
+ super.connectedCallback(), this.presetRanges = [{ label: "Yesterday", range: { dateFrom: e().subtract(1, "days").startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().subtract(1, "days").endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "Today", range: { dateFrom: e().startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "Tomorrow", range: { dateFrom: e().add(1, "days").startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().add(1, "days").endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "This Week", range: { dateFrom: e().startOf("week").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().endOf("week").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "weeks" }, { label: "Last Week", range: { dateFrom: e().subtract(1, "weeks").startOf("isoWeek").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().subtract(1, "weeks").endOf("isoWeek").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "weeks" }, { label: "This Month", range: { dateFrom: e().startOf("month").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().endOf("month").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "month" }];
20
+ const t = this.presetRanges.find((a) => a.range.dateFrom === this.dateFrom.value && a.range.dateTo === this.dateTo.value);
21
+ this.selectedDateRange = t ? t.label : e(this.dateFrom.value).format("MMM DD, YYYY").concat(" To ", e(this.dateTo.value).format("MMM DD, YYYY"));
22
22
  }
23
- setDateRange(t, e) {
24
- this.dateFrom.value = t, this.dateTo.value = e, this.dispatchEvent(new CustomEvent("change", { detail: { dateFrom: this.dateFrom.value, dateTo: this.dateTo.value } })), this.requestUpdate();
23
+ setDateRange(t, a) {
24
+ this.dateFrom.value = t, this.dateTo.value = a, this.dispatchEvent(new CustomEvent("change", { detail: { dateFrom: this.dateFrom.value, dateTo: this.dateTo.value } })), this.requestUpdate();
25
25
  }
26
26
  handlePresetChange(t) {
27
- const e = this.presetRanges.find((n) => n.label === t);
28
- if (e) {
29
- const { dateFrom: n, dateTo: r } = e.range;
30
- this.setDateRange(n, r), this.selectedDateRange = t;
27
+ const a = this.presetRanges.find((Y) => Y.label === t);
28
+ if (a) {
29
+ const { dateFrom: Y, dateTo: r } = a.range;
30
+ this.setDateRange(Y, r), this.selectedDateRange = t;
31
31
  }
32
32
  }
33
33
  render() {
34
- return h`
34
+ return c`
35
35
  <div class="date-range-selector relative">
36
36
  <schmancy-menu class="z-100 w-max">
37
37
  <schmancy-grid slot="button" align="center" cols="auto 1fr auto">
38
38
  <schmancy-icon-button
39
39
  @click=${(t) => {
40
40
  t.preventDefault(), t.stopPropagation();
41
- const e = a(this.dateTo.value).diff(a(this.dateFrom.value), "days") || 1;
42
- this.dateFrom.value = a(this.dateFrom.value).subtract(e, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.dateTo.value = a(this.dateTo.value).subtract(e, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.handleDateRangeChange();
41
+ const a = e(this.dateTo.value).diff(e(this.dateFrom.value), "days") || 1;
42
+ this.dateFrom.value = e(this.dateFrom.value).subtract(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.dateTo.value = e(this.dateTo.value).subtract(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.handleDateRangeChange();
43
43
  }}
44
44
  >
45
45
  arrow_left
@@ -50,15 +50,15 @@ let s = class extends l() {
50
50
  <schmancy-icon-button
51
51
  @click=${(t) => {
52
52
  t.preventDefault(), t.stopPropagation();
53
- const e = a(this.dateTo.value).diff(a(this.dateFrom.value), "days") || 1;
54
- this.dateFrom.value = a(this.dateFrom.value).add(e, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.dateTo.value = a(this.dateTo.value).add(e, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.handleDateRangeChange();
53
+ const a = e(this.dateTo.value).diff(e(this.dateFrom.value), "days") || 1;
54
+ this.dateFrom.value = e(this.dateFrom.value).add(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.dateTo.value = e(this.dateTo.value).add(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.handleDateRangeChange();
55
55
  }}
56
56
  >arrow_right</schmancy-icon-button
57
57
  >
58
58
  </schmancy-grid>
59
59
 
60
60
  <schmancy-surface elevation="2">
61
- ${this.presetRanges.map((t) => h`
61
+ ${this.presetRanges.map((t) => c`
62
62
  <schmancy-menu-item class="w-full" @click=${() => this.handlePresetChange(t.label)}>
63
63
  <schmancy-grid class="w-full" align="center" cols="auto 1fr auto"> ${t.label} </schmancy-grid>
64
64
  </schmancy-menu-item>
@@ -66,16 +66,16 @@ let s = class extends l() {
66
66
  <schmancy-grid gap="sm" flow="row" class="p-4">
67
67
  <schmancy-input
68
68
  id="checkin"
69
- min=${u(this.minDate)}
69
+ min=${M(this.minDate)}
70
70
  type=${this.type}
71
71
  label="${this.dateFrom.label}"
72
72
  .value=${this.dateFrom.value}
73
73
  @change=${(t) => {
74
74
  t.preventDefault(), t.stopPropagation();
75
- const e = a(t.detail.value, this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm");
76
- this.dateFrom.value = e;
77
- const n = e;
78
- this.checkOutInput.setAttribute("min", n);
75
+ const a = e(t.detail.value, this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm");
76
+ this.dateFrom.value = a;
77
+ const Y = a;
78
+ this.checkOutInput.setAttribute("min", Y);
79
79
  }}
80
80
  ></schmancy-input>
81
81
  <schmancy-input
@@ -84,7 +84,7 @@ let s = class extends l() {
84
84
  label="${this.dateTo.label}"
85
85
  .value=${this.dateTo.value}
86
86
  @change=${(t) => {
87
- t.preventDefault(), t.stopPropagation(), this.dateTo.value = a(t.detail.value, this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm");
87
+ t.preventDefault(), t.stopPropagation(), this.dateTo.value = e(t.detail.value, this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm");
88
88
  }}
89
89
  ></schmancy-input>
90
90
 
@@ -104,9 +104,9 @@ let s = class extends l() {
104
104
  }
105
105
  handleDateRangeChange() {
106
106
  this.setDateRange(this.dateFrom.value, this.dateTo.value);
107
- const t = this.presetRanges.find((e) => e.range.dateFrom === this.dateFrom.value && e.range.dateTo === this.dateTo.value);
108
- t ? this.selectedDateRange = t.label : (this.selectedDateRange = a(this.dateFrom.value).format(this.type === "date" ? "MMM DD, YYYY" : "MMM DD, YYYY hh:mm A").concat(" - ", a(this.dateTo.value).format(this.type === "date" ? "MMM DD, YYYY" : "MMM DD, YYYY hh:mm A")), this.schmancyMenu.open = !1);
107
+ const t = this.presetRanges.find((a) => a.range.dateFrom === this.dateFrom.value && a.range.dateTo === this.dateTo.value);
108
+ t ? this.selectedDateRange = t.label : (this.selectedDateRange = e(this.dateFrom.value).format(this.type === "date" ? "MMM DD, YYYY" : "MMM DD, YYYY hh:mm A").concat(" - ", e(this.dateTo.value).format(this.type === "date" ? "MMM DD, YYYY" : "MMM DD, YYYY hh:mm A")), this.schmancyMenu.open = !1);
109
109
  }
110
110
  };
111
- o([m({ type: String })], s.prototype, "type", 2), o([m({ type: Object })], s.prototype, "dateFrom", 2), o([m({ type: Object })], s.prototype, "dateTo", 2), o([c("#checkin")], s.prototype, "checkInInput", 2), o([c("#checkout")], s.prototype, "checkOutInput", 2), o([m({ type: String })], s.prototype, "minDate", 2), o([m({ type: String })], s.prototype, "maxDate", 2), o([c("schmancy-menu")], s.prototype, "schmancyMenu", 2), o([D()], s.prototype, "selectedDateRange", 2), s = o([p("schmancy-date-range")], s);
112
- //# sourceMappingURL=date-range-DpkivW9V.js.map
111
+ o([m({ type: String })], s.prototype, "type", 2), o([m({ type: Object })], s.prototype, "dateFrom", 2), o([m({ type: Object })], s.prototype, "dateTo", 2), o([h("#checkin")], s.prototype, "checkInInput", 2), o([h("#checkout")], s.prototype, "checkOutInput", 2), o([m({ type: String })], s.prototype, "minDate", 2), o([m({ type: String })], s.prototype, "maxDate", 2), o([h("schmancy-menu")], s.prototype, "schmancyMenu", 2), o([D()], s.prototype, "selectedDateRange", 2), s = o([p("schmancy-date-range")], s);
112
+ //# sourceMappingURL=date-range-yg-J_pZS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-yg-J_pZS.js","sources":["../src/date-range/date-range.ts"],"sourcesContent":["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'\n\n@customElement('schmancy-date-range')\nexport default class SwiftHRAdminDateRange extends $LitElement() {\n\t@property({ type: String }) type: 'date' | 'datetime' = 'date'\n\t@property({ type: Object }) dateFrom!: {\n\t\tlabel: string\n\t\tvalue: string\n\t}\n\t@property({ type: Object }) dateTo!: {\n\t\tlabel: string\n\t\tvalue: string\n\t}\n\n\t@query('#checkin') checkInInput!: HTMLInputElement\n\t@query('#checkout') checkOutInput!: HTMLInputElement\n\n\t@property({ type: String }) minDate: string | undefined\n\t@property({ type: String }) maxDate!: string | undefined\n\t@query('schmancy-menu') schmancyMenu!: SchmancyMenu\n\n\t@state() selectedDateRange: string = 'Today'\n\n\tpresetRanges!: Array<{\n\t\tlabel: string\n\t\trange: {\n\t\t\tdateFrom: string\n\t\t\tdateTo: string\n\t\t}\n\t\tstep: moment.unitOfTime.DurationConstructor | moment.unitOfTime._isoWeek\n\t\tselected?: boolean\n\t}>\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\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()\n\t\t\t\t\t\t.subtract(1, 'days')\n\t\t\t\t\t\t.startOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.subtract(1, 'days')\n\t\t\t\t\t\t.endOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\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()\n\t\t\t\t\t\t.startOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.endOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'day',\n\t\t\t},\n\t\t\t// tomorrow\n\t\t\t{\n\t\t\t\tlabel: 'Tomorrow',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment()\n\t\t\t\t\t\t.add(1, 'days')\n\t\t\t\t\t\t.startOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.add(1, 'days')\n\t\t\t\t\t\t.endOf('day')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\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()\n\t\t\t\t\t\t.startOf('week')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.endOf('week')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'weeks',\n\t\t\t},\n\t\t\t// last week\n\t\t\t{\n\t\t\t\tlabel: 'Last Week',\n\t\t\t\trange: {\n\t\t\t\t\tdateFrom: moment()\n\t\t\t\t\t\t.subtract(1, 'weeks')\n\t\t\t\t\t\t.startOf('isoWeek')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.subtract(1, 'weeks')\n\t\t\t\t\t\t.endOf('isoWeek')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'weeks',\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()\n\t\t\t\t\t\t.startOf('month')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t\tdateTo: moment()\n\t\t\t\t\t\t.endOf('month')\n\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm'),\n\t\t\t\t},\n\t\t\t\tstep: 'month',\n\t\t\t},\n\t\t\t// { label: \"Custom\", range: () => this.setCustomRange() },\n\t\t]\n\t\t// set the state selectedDateRange based on the dateFrom and dateTo values\n\t\tconst preset = this.presetRanges.find(\n\t\t\trange => range.range.dateFrom === this.dateFrom.value && range.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\tthis.selectedDateRange = moment(this.dateFrom.value)\n\t\t\t\t.format('MMM DD, YYYY')\n\t\t\t\t.concat(' To ', moment(this.dateTo.value).format('MMM DD, YYYY'))\n\t\t}\n\t}\n\n\tsetDateRange(fromDate: string, toDate: string) {\n\t\tthis.dateFrom.value = fromDate\n\t\tthis.dateTo.value = toDate\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<TSchmancDateRangePayload>('change', {\n\t\t\t\tdetail: {\n\t\t\t\t\tdateFrom: this.dateFrom.value,\n\t\t\t\t\tdateTo: this.dateTo.value,\n\t\t\t\t},\n\t\t\t}),\n\t\t)\n\t\tthis.requestUpdate()\n\t}\n\n\thandlePresetChange(presetLabel: string) {\n\t\tconst preset = this.presetRanges.find(range => range.label === presetLabel)\n\t\tif (preset) {\n\t\t\tconst { dateFrom, dateTo } = preset.range\n\t\t\tthis.setDateRange(dateFrom, dateTo)\n\t\t\tthis.selectedDateRange = presetLabel\n\t\t}\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"date-range-selector relative\">\n\t\t\t\t<schmancy-menu class=\"z-100 w-max\">\n\t\t\t\t\t<schmancy-grid slot=\"button\" align=\"center\" cols=\"auto 1fr auto\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t// Calculate the difference between dateFrom and dateTo in days\n\t\t\t\t\t\t\t\tconst dateDiff = moment(this.dateTo.value).diff(moment(this.dateFrom.value), 'days') || 1\n\n\t\t\t\t\t\t\t\t// Subtract the date difference from both dateFrom and dateTo\n\t\t\t\t\t\t\t\tthis.dateFrom.value = moment(this.dateFrom.value)\n\t\t\t\t\t\t\t\t\t.subtract(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\tthis.dateTo.value = moment(this.dateTo.value)\n\t\t\t\t\t\t\t\t\t.subtract(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\t// Call the function to handle the date range change\n\t\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tarrow_left\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t<schmancy-button class=\"w-max\" variant=\"outlined\" type=\"button\"\n\t\t\t\t\t\t\t>${this.selectedDateRange || 'Date range'}\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t// Calculate the difference between dateFrom and dateTo in days\n\t\t\t\t\t\t\t\tconst dateDiff = moment(this.dateTo.value).diff(moment(this.dateFrom.value), 'days') || 1\n\n\t\t\t\t\t\t\t\t// Add the date difference to both dateFrom and dateTo\n\t\t\t\t\t\t\t\tthis.dateFrom.value = moment(this.dateFrom.value)\n\t\t\t\t\t\t\t\t\t.add(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\tthis.dateTo.value = moment(this.dateTo.value)\n\t\t\t\t\t\t\t\t\t.add(dateDiff, 'days')\n\t\t\t\t\t\t\t\t\t.format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\n\t\t\t\t\t\t\t\t// Call the function to handle the date range change\n\t\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>arrow_right</schmancy-icon-button\n\t\t\t\t\t\t>\n\t\t\t\t\t</schmancy-grid>\n\n\t\t\t\t\t<schmancy-surface elevation=\"2\">\n\t\t\t\t\t\t${this.presetRanges.map(\n\t\t\t\t\t\t\tpreset => html`\n\t\t\t\t\t\t\t\t<schmancy-menu-item class=\"w-full\" @click=${() => this.handlePresetChange(preset.label)}>\n\t\t\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\t\t</schmancy-menu-item>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<schmancy-grid gap=\"sm\" flow=\"row\" class=\"p-4\">\n\t\t\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\t\t\tid=\"checkin\"\n\t\t\t\t\t\t\t\tmin=${ifDefined(this.minDate)}\n\t\t\t\t\t\t\t\ttype=${this.type}\n\t\t\t\t\t\t\t\tlabel=\"${this.dateFrom.label}\"\n\t\t\t\t\t\t\t\t.value=${this.dateFrom.value}\n\t\t\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\t\t\tconst selectedDate = moment(\n\t\t\t\t\t\t\t\t\t\tevent.detail.value,\n\t\t\t\t\t\t\t\t\t\tthis.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm',\n\t\t\t\t\t\t\t\t\t).format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\t\t\t\t\t\t\t\t\tthis.dateFrom.value = selectedDate\n\t\t\t\t\t\t\t\t\tconst minDateStr = selectedDate\n\t\t\t\t\t\t\t\t\tthis.checkOutInput.setAttribute('min', minDateStr)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></schmancy-input>\n\t\t\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\t\t\tid=\"checkout\"\n\t\t\t\t\t\t\t\ttype=${this.type}\n\t\t\t\t\t\t\t\tlabel=\"${this.dateTo.label}\"\n\t\t\t\t\t\t\t\t.value=${this.dateTo.value}\n\t\t\t\t\t\t\t\t@change=${(event: SchmancyInputChangeEvent) => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.dateTo.value = moment(\n\t\t\t\t\t\t\t\t\t\tevent.detail.value,\n\t\t\t\t\t\t\t\t\t\tthis.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm',\n\t\t\t\t\t\t\t\t\t).format(this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t></schmancy-input>\n\n\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.handleDateRangeChange()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tApply\n\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t</schmancy-grid>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-menu>\n\t\t\t</div>\n\t\t`\n\t}\n\n\thandleDateRangeChange() {\n\t\tthis.setDateRange(this.dateFrom.value, this.dateTo.value)\n\t\t// check if the selected date range is a preset\n\t\tconst preset = this.presetRanges.find(\n\t\t\trange => range.range.dateFrom === this.dateFrom.value && range.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\tthis.selectedDateRange = moment(this.dateFrom.value)\n\t\t\t\t.format(this.type === 'date' ? 'MMM DD, YYYY' : 'MMM DD, YYYY hh:mm A')\n\t\t\t\t.concat(' - ', moment(this.dateTo.value).format(this.type === 'date' ? 'MMM DD, YYYY' : 'MMM DD, YYYY hh:mm A'))\n\t\t\tthis.schmancyMenu.open = false\n\t\t}\n\t}\n}\n\nexport type SchmancyDateRangeChangeEvent = CustomEvent<TSchmancDateRangePayload>\ntype TSchmancDateRangePayload = {\n\tdateFrom?: string\n\tdateTo?: string\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-date-range': SwiftHRAdminDateRange\n\t}\n}\n"],"names":["SwiftHRAdminDateRange","$LitElement","super","arguments","this","type","selectedDateRange","connectedCallback","presetRanges","label","range","dateFrom","moment","subtract","startOf","format","dateTo","endOf","step","add","preset","find","value","concat","fromDate","toDate","dispatchEvent","CustomEvent","detail","requestUpdate","presetLabel","setDateRange","render","html","e","preventDefault","stopPropagation","dateDiff","diff","handleDateRangeChange","map","handlePresetChange","ifDefined","minDate","event","selectedDate","minDateStr","checkOutInput","setAttribute","schmancyMenu","open","__decorateClass","property","String","prototype","Object","query","state","customElement"],"mappings":";;;;;;;;;;;;;AASA,IAAqBA,IAArB,cAAmDC,EAAnD,EAAA;AAAA,EAAA;AAAAC,UAAAC,GAAAA,SAAAA,GACyDC,KAAAC,OAAA,QAiBnBD,KAAAE,oBAAA;AAAA,EAAA;AAAA,EAYrC,oBAAAC;AACCL,UAAMK,kBACNH,GAAAA,KAAKI,eAAe,CACnB,EACCC,OAAO,aACPC,OAAO,EACNC,UAAUC,IACRC,SAAS,GAAG,QACZC,QAAQ,KAAA,EACRC,OAAOX,KAAKC,SAAS,SAAS,eAAe,kBAAA,GAC/CW,QAAQJ,EACNC,EAAAA,SAAS,GAAG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,MAAMgD,OAAAA,CAAAA,CAAAA,GADErD,EACQsD,WAAA,QAAA,CACAH,GAAAA,EAAA,CAA3BC,EAAS,EAAE/C,MAAMkD,OAFEvD,CAAAA,CAAAA,GAAAA,EAEQsD,WAAA,YAAA,CAAA,GAIAH,EAAA,CAA3BC,EAAS,EAAE/C,MAAMkD,OANEvD,CAAAA,CAAAA,GAAAA,EAMQsD,WAAA,UAAA,CAAA,GAKTH,EAAA,CAAlBK,EAAM,UAAA,CAAA,GAXaxD,EAWDsD,WAAA,gBAAA,CACCH,GAAAA,EAAA,CAAnBK,EAAM,eAZaxD,EAYAsD,WAAA,iBAAA,CAAA,GAEQH,EAAA,CAA3BC,EAAS,EAAE/C,MAAMgD,OAdErD,CAAAA,CAAAA,GAAAA,EAcQsD,WAAA,WAAA,IACAH,EAAA,CAA3BC,EAAS,EAAE/C,MAAMgD,OAfErD,CAAAA,CAAAA,GAAAA,EAeQsD,WAAA,WAAA,IACJH,EAAA,CAAvBK,EAAM,eAAA,CAAA,GAhBaxD,EAgBIsD,WAAA,gBAAA,CAAA,GAEfH,EAAA,CAARM,EAAAA,CAAAA,GAlBmBzD,EAkBXsD,WAAA,qBAAA,CAlBWtD,GAAAA,IAArBmD,EAAA,CADCO,EAAc,qBACM1D,CAAAA,GAAAA,CAAAA;"}
@@ -1,2 +1,2 @@
1
- "use strict";require("./date-range-C8Lb-puJ.cjs");
1
+ "use strict";require("./date-range-Cr5kxKi-.cjs");
2
2
  //# sourceMappingURL=date-range.cjs.map
@@ -1,2 +1,2 @@
1
- import "./date-range-DpkivW9V.js";
1
+ import "./date-range-yg-J_pZS.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-bpjLHVrJ.cjs");const r=require("./area.component-n1vVLLtU.cjs");require("./autocomplete-DO0n5Jj_.cjs"),require("./spinner-BFE-eCrL.cjs");const i=require("./icon-button-CBMjLTvY.cjs"),e=require("./theme-button-3jqFNdPA.cjs"),h=require("./checkbox-DVsTquW5.cjs");require("./chips-BSB3gB9k.cjs");const S=require("./payment-card-form-DZ9rk638.cjs");require("./date-range-C8Lb-puJ.cjs");const y=require("./delay-BTjvUbKX.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-DxeR9U-g.cjs"),require("./form-BSEBYpYo.cjs"),require("./icon-DFxPGQPn.cjs"),require("./input-4Viw-XtC.cjs");const a=require("./scroll-BsuuG2R3.cjs");require("./menu-B26WJO68.cjs");const o=require("./outlet-CVU8puhM.cjs");require("./option-O4gaTzW0.cjs");const u=require("./radio-group-_AHbCbFl.cjs"),b=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs"),require("./select-B3jADBe0.cjs");const t=require("./sheet-dLJ2FM2K.cjs"),m=require("./slider-BNvNIn-x.cjs"),l=require("./surface-BK_CqFFO.cjs");require("./table-C10KGRKq.cjs"),require("./tabs-group-UHjwCCnS.cjs"),require("./textarea-DJaCkK9O.cjs");const n=require("./dynamicTheme-BYlTubq6.cjs"),d=require("./theme.interface-Xg5Zi46a.cjs"),p=require("./tree-CO1LREy0.cjs"),g=require("./types.cjs"),f=require("./typewriter-DcYUz_5P.cjs"),q=require("./typography-Dsj6J9sM.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,"SchmnacyButton",{enumerable:!0,get:()=>i.SchmnacyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>i.SchmnacyIconButton}),exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),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,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem}),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:()=>h.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>S.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:()=>a.SchmancyFlex}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>a.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>a.SchmancyScroll}),exports.$notify=o.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>o.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>o.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>u.RadioGroup}),exports.mutationObserver=b.mutationObserver,exports.SchmancySheetPosition=t.SchmancySheetPosition,exports.SheetHereMorty=t.SheetHereMorty,exports.SheetWhereAreYouRicky=t.SheetWhereAreYouRicky,exports.hook=t.hook,exports.sheet=t.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>m.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>m.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>l.SchmancySurface}),exports.$newSchmancyTheme=n.$newSchmancyTheme,exports.$schmancyTheme=n.$schmancyTheme,exports.formateTheme=n.formateTheme,exports.generateRandomColor=n.generateRandomColor,exports.SchmancyTheme=d.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>p.SchmancyTree}),exports.SchmancyEvents=g.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>f.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>q.SchmancyTypography});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-bpjLHVrJ.cjs");const r=require("./area.component-n1vVLLtU.cjs");require("./autocomplete-DO0n5Jj_.cjs"),require("./spinner-BFE-eCrL.cjs");const i=require("./icon-button-CBMjLTvY.cjs"),e=require("./theme-button-BtmkBFGA.cjs"),h=require("./checkbox-DVsTquW5.cjs");require("./chips-BSB3gB9k.cjs");const S=require("./payment-card-form-DZ9rk638.cjs");require("./date-range-Cr5kxKi-.cjs");const y=require("./delay-BTjvUbKX.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-DxeR9U-g.cjs"),require("./form-BSEBYpYo.cjs"),require("./icon-DFxPGQPn.cjs"),require("./input-4Viw-XtC.cjs");const a=require("./scroll-BsuuG2R3.cjs");require("./menu-B26WJO68.cjs");const o=require("./outlet-CVU8puhM.cjs");require("./option-O4gaTzW0.cjs");const u=require("./radio-group-_AHbCbFl.cjs"),b=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs"),require("./select-B3jADBe0.cjs");const t=require("./sheet-dLJ2FM2K.cjs"),m=require("./slider-BNvNIn-x.cjs"),l=require("./surface-BK_CqFFO.cjs");require("./table-C10KGRKq.cjs"),require("./tabs-group-UHjwCCnS.cjs"),require("./textarea-DJaCkK9O.cjs");const n=require("./dynamicTheme-BYlTubq6.cjs"),d=require("./theme.interface-Xg5Zi46a.cjs"),p=require("./tree-CO1LREy0.cjs"),g=require("./types.cjs"),f=require("./typewriter-DcYUz_5P.cjs"),q=require("./typography-Dsj6J9sM.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,"SchmnacyButton",{enumerable:!0,get:()=>i.SchmnacyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>i.SchmnacyIconButton}),exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),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,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem}),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:()=>h.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>S.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:()=>a.SchmancyFlex}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>a.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>a.SchmancyScroll}),exports.$notify=o.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>o.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>o.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>u.RadioGroup}),exports.mutationObserver=b.mutationObserver,exports.SchmancySheetPosition=t.SchmancySheetPosition,exports.SheetHereMorty=t.SheetHereMorty,exports.SheetWhereAreYouRicky=t.SheetWhereAreYouRicky,exports.hook=t.hook,exports.sheet=t.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>m.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>m.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>l.SchmancySurface}),exports.$newSchmancyTheme=n.$newSchmancyTheme,exports.$schmancyTheme=n.$schmancyTheme,exports.formateTheme=n.formateTheme,exports.generateRandomColor=n.generateRandomColor,exports.SchmancyTheme=d.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>p.SchmancyTree}),exports.SchmancyEvents=g.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>f.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>q.SchmancyTypography});
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-BOF6Xp6-.js";
4
4
  import "./spinner-BbFimyz2.js";
5
5
  import { S as g, a as H } from "./icon-button-qrIUt9AY.js";
6
- import { H as I, L as M, e as E, b as k, f as A, c as Y, d as $, g as F, S as G, a as O, j as W, l as L, m as _, h as B, n as P, k as j, o as K, p as q, W as z, s as J, i as Q, t as U } from "./theme-button-CtNkFVpC.js";
6
+ import { H as I, L as M, e as E, b as k, f as A, c as Y, d as $, g as F, S as G, a as O, j as W, l as L, m as _, h as B, n as P, k as j, o as K, p as q, W as z, s as J, i as Q, t as U } from "./theme-button-hgF7TMT-.js";
7
7
  import { S as X } from "./checkbox-CN0Qnfgt.js";
8
8
  import "./chips-C2_LRVqx.js";
9
9
  import { S as aa } from "./payment-card-form-CBghOLaR.js";
10
- import "./date-range-DpkivW9V.js";
10
+ import "./date-range-yg-J_pZS.js";
11
11
  import { S as ea, d as oa } from "./delay-3km-O8EO.js";
12
12
  import { c as ca, f as ma, r as na } from "./ripple-BumgqsDT.js";
13
13
  import "./divider-qmgmakQg.js";
package/dist/list.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-button-3jqFNdPA.cjs");Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-button-BtmkBFGA.cjs");Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem});
2
2
  //# sourceMappingURL=list.cjs.map
package/dist/list.js CHANGED
@@ -1,4 +1,4 @@
1
- import { L as a, h as m } from "./theme-button-CtNkFVpC.js";
1
+ import { L as a, h as m } from "./theme-button-hgF7TMT-.js";
2
2
  export {
3
3
  a as List,
4
4
  m as SchmancyListItem
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-button-3jqFNdPA.cjs");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("./theme-button-BtmkBFGA.cjs");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 { j as c, l as n, m as e, n as m, k as i, o, i as s } from "./theme-button-CtNkFVpC.js";
1
+ import { j as c, l as n, m as e, n as m, k as i, o, i as s } from "./theme-button-hgF7TMT-.js";
2
2
  export {
3
3
  c as SchmancyDrawerAppbar,
4
4
  n as SchmancyDrawerNavbarMode,
package/dist/teleport.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-button-3jqFNdPA.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("./theme-button-BtmkBFGA.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
package/dist/teleport.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as o, p as t, W as a, t as p } from "./theme-button-CtNkFVpC.js";
1
+ import { H as o, p as t, W as a, t as p } from "./theme-button-hgF7TMT-.js";
2
2
  export {
3
3
  o as HereMorty,
4
4
  t as SchmancyTeleportation,
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const y=require("./tailwind.mixin-7_DOUoA1.cjs"),h=require("lit"),c=require("lit/decorators.js");require("./animated-text-bpjLHVrJ.cjs");const M=require("./area.component-n1vVLLtU.cjs");require("./autocomplete-DO0n5Jj_.cjs"),require("./spinner-BFE-eCrL.cjs"),require("./icon-button-CBMjLTvY.cjs");const x=require("./theme.interface-Xg5Zi46a.cjs");require("./checkbox-DVsTquW5.cjs"),require("./chips-BSB3gB9k.cjs"),require("./payment-card-form-DZ9rk638.cjs");const d=require("./types.cjs"),l=require("./provide-_VUNOf1R.cjs"),g=require("./litElement.mixin-DbB-1RYZ.cjs"),p=require("./consume-Di0U0iBU.cjs");require("./date-range-C8Lb-puJ.cjs"),require("./delay-BTjvUbKX.cjs");const w=require("./ripple-C2BHbhcS.cjs");require("./divider-DxeR9U-g.cjs"),require("./form-BSEBYpYo.cjs"),require("./icon-DFxPGQPn.cjs"),require("./input-4Viw-XtC.cjs"),require("./scroll-BsuuG2R3.cjs");const G=require("./surface-BK_CqFFO.cjs"),E=require("lit/directives/when.js");require("./menu-B26WJO68.cjs"),require("./outlet-CVU8puhM.cjs"),require("./option-O4gaTzW0.cjs"),require("./radio-group-_AHbCbFl.cjs"),require("./index-DyJ0oDpR.cjs"),require("./select-B3jADBe0.cjs");const U=require("./sheet-dLJ2FM2K.cjs");require("./slider-BNvNIn-x.cjs"),require("./table-C10KGRKq.cjs"),require("./tabs-group-UHjwCCnS.cjs"),require("./textarea-DJaCkK9O.cjs");const K=require("./dynamicTheme-BYlTubq6.cjs");require("./tree-CO1LREy0.cjs"),require("./typewriter-DcYUz_5P.cjs"),require("./typography-Dsj6J9sM.cjs");const N=require("rxjs/operators");var J=Object.defineProperty,Q=Object.getOwnPropertyDescriptor;let B=class extends y.TailwindElement(h.css`
1
+ "use strict";const o=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const y=require("./tailwind.mixin-7_DOUoA1.cjs"),h=require("lit"),c=require("lit/decorators.js");require("./animated-text-bpjLHVrJ.cjs");const M=require("./area.component-n1vVLLtU.cjs");require("./autocomplete-DO0n5Jj_.cjs"),require("./spinner-BFE-eCrL.cjs"),require("./icon-button-CBMjLTvY.cjs");const x=require("./theme.interface-Xg5Zi46a.cjs");require("./checkbox-DVsTquW5.cjs"),require("./chips-BSB3gB9k.cjs"),require("./payment-card-form-DZ9rk638.cjs");const d=require("./types.cjs"),l=require("./provide-_VUNOf1R.cjs"),g=require("./litElement.mixin-DbB-1RYZ.cjs"),p=require("./consume-Di0U0iBU.cjs");require("./date-range-Cr5kxKi-.cjs"),require("./delay-BTjvUbKX.cjs");const w=require("./ripple-C2BHbhcS.cjs");require("./divider-DxeR9U-g.cjs"),require("./form-BSEBYpYo.cjs"),require("./icon-DFxPGQPn.cjs"),require("./input-4Viw-XtC.cjs"),require("./scroll-BsuuG2R3.cjs");const G=require("./surface-BK_CqFFO.cjs"),E=require("lit/directives/when.js");require("./menu-B26WJO68.cjs"),require("./outlet-CVU8puhM.cjs"),require("./option-O4gaTzW0.cjs"),require("./radio-group-_AHbCbFl.cjs"),require("./index-DyJ0oDpR.cjs"),require("./select-B3jADBe0.cjs");const U=require("./sheet-dLJ2FM2K.cjs");require("./slider-BNvNIn-x.cjs"),require("./table-C10KGRKq.cjs"),require("./tabs-group-UHjwCCnS.cjs"),require("./textarea-DJaCkK9O.cjs");const K=require("./dynamicTheme-BYlTubq6.cjs");require("./tree-CO1LREy0.cjs"),require("./typewriter-DcYUz_5P.cjs"),require("./typography-Dsj6J9sM.cjs");const N=require("rxjs/operators");var J=Object.defineProperty,Q=Object.getOwnPropertyDescriptor;let B=class extends y.TailwindElement(h.css`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -177,4 +177,4 @@
177
177
  <schmancy-icon id="color">palette</schmancy-icon>
178
178
  </schmancy-button>
179
179
  `}};F([c.query("#color")],L.prototype,"color",2),L=F([c.customElement("schmancy-theme-button")],L),exports.HereMorty=_,exports.SchmancyContentDrawerID=H,exports.SchmancyContentDrawerMaxHeight=j,exports.SchmancyContentDrawerMinWidth=P,exports.SchmancyContentDrawerSheetMode=k,exports.SchmancyContentDrawerSheetState=A,exports.SchmancyDrawerNavbarMode=W,exports.SchmancyDrawerNavbarState=T,exports.WhereAreYouRicky=R,exports.schmancyContentDrawer=oe,exports.schmancyNavDrawer=we,exports.teleport=D;
180
- //# sourceMappingURL=theme-button-3jqFNdPA.cjs.map
180
+ //# sourceMappingURL=theme-button-BtmkBFGA.cjs.map