@mhmo91/schmancy 0.4.38 → 0.4.40
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/ai/date-range.md +27 -1
- package/ai/store.md +31 -0
- package/dist/ai/date-range.md +27 -1
- package/dist/ai/store.md +31 -0
- package/dist/{avatar-sXepW60q.cjs → avatar-B3sAx50a.cjs} +2 -2
- package/dist/{avatar-sXepW60q.cjs.map → avatar-B3sAx50a.cjs.map} +1 -1
- package/dist/{avatar-CnJrdjfS.js → avatar-FYp7eVVT.js} +2 -2
- package/dist/{avatar-CnJrdjfS.js.map → avatar-FYp7eVVT.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/date-range-Bd0bZ5EG.cjs +133 -0
- package/dist/date-range-Bd0bZ5EG.cjs.map +1 -0
- package/dist/date-range-CTx08Buk.js +652 -0
- package/dist/date-range-CTx08Buk.js.map +1 -0
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/input-Cpo-ws8k.js.map +1 -1
- package/dist/input-DzNoI9qU.cjs.map +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{selector-hook-DPe2CGKx.js → selector-hook-CIpuCUbr.js} +122 -122
- package/dist/{selector-hook-DPe2CGKx.js.map → selector-hook-CIpuCUbr.js.map} +1 -1
- package/dist/selector-hook-DB8RFC1y.cjs +2 -0
- package/dist/{selector-hook-Bf_lCnGW.cjs.map → selector-hook-DB8RFC1y.cjs.map} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/dist/date-range-CJq5E8y0.cjs +0 -131
- package/dist/date-range-CJq5E8y0.cjs.map +0 -1
- package/dist/date-range-DQ057kVi.js +0 -638
- package/dist/date-range-DQ057kVi.js.map +0 -1
- package/dist/selector-hook-Bf_lCnGW.cjs +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range-CTx08Buk.js","sources":["../node_modules/dayjs/dayjs.min.js","../node_modules/dayjs/plugin/quarterOfYear.js","../src/date-range/date-range-presets.ts","../src/date-range/date-utils.ts","../src/date-range/date-range-dialog.ts","../src/date-range/date-range.ts","../src/date-range/date-range-helpers.ts"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_quarterOfYear=n()}(this,(function(){\"use strict\";var t=\"month\",n=\"quarter\";return function(e,i){var r=i.prototype;r.quarter=function(t){return this.$utils().u(t)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(t-1))};var s=r.add;r.add=function(e,i){return e=Number(e),this.$utils().p(i)===n?this.add(3*e,t):s.bind(this)(e,i)};var u=r.startOf;r.startOf=function(e,i){var r=this.$utils(),s=!!r.u(i)||i;if(r.p(e)===n){var o=this.quarter()-1;return s?this.month(3*o).startOf(t).startOf(\"day\"):this.month(3*o+2).endOf(t).endOf(\"day\")}return u.bind(this)(e,i)}}}));","import dayjs from 'dayjs'\r\n\r\nexport type PresetUnit = dayjs.OpUnitType | 'quarter'\r\n\r\nexport interface DateRangePreset {\r\n\tlabel: string\r\n\trange: { dateFrom: string; dateTo: string }\r\n\tstep: PresetUnit\r\n}\r\n\r\nexport interface PresetCategory {\r\n\tname: string\r\n\tpresets: DateRangePreset[]\r\n}\r\n\r\n/**\r\n * Generate date range presets for different time periods\r\n */\r\nexport function generatePresetCategories(format: string, includeTime: boolean = false): PresetCategory[] {\r\n\tconst categories: PresetCategory[] = []\r\n\r\n\t// Hours category (only for datetime-local)\r\n\tif (includeTime) {\r\n\t\tcategories.push({\r\n\t\t\tname: 'Hours',\r\n\t\t\tpresets: [\r\n\t\t\t\t{\r\n\t\t\t\t\tlabel: 'Last 24 Hours',\r\n\t\t\t\t\trange: {\r\n\t\t\t\t\t\tdateFrom: dayjs().subtract(24, 'hours').format(format),\r\n\t\t\t\t\t\tdateTo: dayjs().format(format),\r\n\t\t\t\t\t},\r\n\t\t\t\t\tstep: 'hour',\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tlabel: 'Last 12 Hours',\r\n\t\t\t\t\trange: {\r\n\t\t\t\t\t\tdateFrom: dayjs().subtract(12, 'hours').format(format),\r\n\t\t\t\t\t\tdateTo: dayjs().format(format),\r\n\t\t\t\t\t},\r\n\t\t\t\t\tstep: 'hour',\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t})\r\n\t}\r\n\r\n\t// Days category\r\n\tcategories.push({\r\n\t\tname: 'Days',\r\n\t\tpresets: [\r\n\t\t\t{\r\n\t\t\t\tlabel: 'Today',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().startOf('day').format(format),\r\n\t\t\t\t\tdateTo: dayjs().endOf('day').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'day',\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: 'Yesterday',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().subtract(1, 'days').startOf('day').format(format),\r\n\t\t\t\t\tdateTo: dayjs().subtract(1, 'days').endOf('day').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'day',\r\n\t\t\t},\r\n\t\t\t...generateLastNDaysPresets([7, 14, 30, 60, 90], format),\r\n\t\t],\r\n\t})\r\n\r\n\t// Weeks category\r\n\tcategories.push({\r\n\t\tname: 'Weeks',\r\n\t\tpresets: [\r\n\t\t\t{\r\n\t\t\t\tlabel: 'This Week',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().startOf('week').format(format),\r\n\t\t\t\t\tdateTo: dayjs().endOf('week').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'week',\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: 'Last Week',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().subtract(1, 'weeks').startOf('week').format(format),\r\n\t\t\t\t\tdateTo: dayjs().subtract(1, 'weeks').endOf('week').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'week',\r\n\t\t\t},\r\n\t\t\t...generateLastNWeeksPresets([2, 4], format),\r\n\t\t],\r\n\t})\r\n\r\n\t// Months category\r\n\tcategories.push({\r\n\t\tname: 'Months',\r\n\t\tpresets: [\r\n\t\t\t{\r\n\t\t\t\tlabel: 'This Month',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().startOf('month').format(format),\r\n\t\t\t\t\tdateTo: dayjs().endOf('month').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'month',\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: 'Last Month',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().subtract(1, 'month').startOf('month').format(format),\r\n\t\t\t\t\tdateTo: dayjs().subtract(1, 'month').endOf('month').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'month',\r\n\t\t\t},\r\n\t\t\t...generateLastNMonthsPresets([3, 6], format),\r\n\t\t],\r\n\t})\r\n\r\n\t// Quarters category\r\n\tcategories.push({\r\n\t\tname: 'Quarters',\r\n\t\tpresets: [\r\n\t\t\t{\r\n\t\t\t\tlabel: 'This Quarter',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().startOf('quarter').format(format),\r\n\t\t\t\t\tdateTo: dayjs().endOf('quarter').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'quarter',\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: 'Last Quarter',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().subtract(1, 'quarter').startOf('quarter').format(format),\r\n\t\t\t\t\tdateTo: dayjs().subtract(1, 'quarter').endOf('quarter').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'quarter',\r\n\t\t\t},\r\n\t\t\t...generateLastNQuartersPresets([2, 4], format),\r\n\t\t],\r\n\t})\r\n\r\n\t// Years category\r\n\tcategories.push({\r\n\t\tname: 'Years',\r\n\t\tpresets: [\r\n\t\t\t{\r\n\t\t\t\tlabel: 'This Year',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().startOf('year').format(format),\r\n\t\t\t\t\tdateTo: dayjs().endOf('year').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'year',\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: 'Last Year',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().subtract(1, 'year').startOf('year').format(format),\r\n\t\t\t\t\tdateTo: dayjs().subtract(1, 'year').endOf('year').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'year',\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tlabel: 'Year to Date',\r\n\t\t\t\trange: {\r\n\t\t\t\t\tdateFrom: dayjs().startOf('year').format(format),\r\n\t\t\t\t\tdateTo: dayjs().endOf('day').format(format),\r\n\t\t\t\t},\r\n\t\t\t\tstep: 'day',\r\n\t\t\t},\r\n\t\t],\r\n\t})\r\n\r\n\treturn categories\r\n}\r\n\r\n// Helper functions to generate preset arrays\r\nfunction generateLastNDaysPresets(days: number[], format: string): DateRangePreset[] {\r\n\treturn days.map(n => ({\r\n\t\tlabel: `Last ${n} Days`,\r\n\t\trange: {\r\n\t\t\tdateFrom: dayjs().subtract(n - 1, 'days').startOf('day').format(format),\r\n\t\t\tdateTo: dayjs().endOf('day').format(format),\r\n\t\t},\r\n\t\tstep: 'day' as PresetUnit,\r\n\t}))\r\n}\r\n\r\nfunction generateLastNWeeksPresets(weeks: number[], format: string): DateRangePreset[] {\r\n\treturn weeks.map(n => ({\r\n\t\tlabel: `Last ${n} Weeks`,\r\n\t\trange: {\r\n\t\t\tdateFrom: dayjs().subtract(n, 'weeks').startOf('week').format(format),\r\n\t\t\tdateTo: dayjs().endOf('day').format(format),\r\n\t\t},\r\n\t\tstep: 'week' as PresetUnit,\r\n\t}))\r\n}\r\n\r\nfunction generateLastNMonthsPresets(months: number[], format: string): DateRangePreset[] {\r\n\treturn months.map(n => ({\r\n\t\tlabel: `Last ${n} Months`,\r\n\t\trange: {\r\n\t\t\tdateFrom: dayjs().subtract(n, 'months').startOf('month').format(format),\r\n\t\t\tdateTo: dayjs().endOf('day').format(format),\r\n\t\t},\r\n\t\tstep: 'month' as PresetUnit,\r\n\t}))\r\n}\r\n\r\nfunction generateLastNQuartersPresets(quarters: number[], format: string): DateRangePreset[] {\r\n\treturn quarters.map(n => ({\r\n\t\tlabel: `Last ${n} Quarters`,\r\n\t\trange: {\r\n\t\t\tdateFrom: dayjs().subtract(n, 'quarters').startOf('quarter').format(format),\r\n\t\t\tdateTo: dayjs().endOf('day').format(format),\r\n\t\t},\r\n\t\tstep: 'quarter' as PresetUnit,\r\n\t}))\r\n}","import dayjs from 'dayjs'\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 = dayjs(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 dayjs from 'dayjs'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { $dialog } from '../dialog/dialog-service'\nimport { DateRangePreset, PresetCategory } from './date-range-presets'\n\n/**\n * Dialog content component for date range selection\n * \n * @element schmancy-date-range-dialog\n */\n@customElement('schmancy-date-range-dialog')\nexport class SchmancyDateRangeDialog extends $LitElement() {\n\t@property({ type: String }) type: 'date' | 'datetime-local' = 'date'\n\t@property({ type: Object }) dateFrom: { label: string; value: string } = { label: 'From', value: '' }\n\t@property({ type: Object }) dateTo: { label: string; value: string } = { label: 'To', value: '' }\n\t@property({ type: String }) minDate?: string\n\t@property({ type: String }) maxDate?: string\n\t@property({ type: String }) activePreset: string | null = null\n\t@property({ type: Array }) presetCategories: PresetCategory[] = []\n\n\tprivate handleFromDateChange(e: Event) {\n\t\tconst input = e.target as HTMLInputElement\n\t\tthis.dateFrom = { ...this.dateFrom, value: input.value }\n\t\t\n\t\t// If the new start date is after the current end date, adjust the end date\n\t\tif (this.dateTo.value && dayjs(this.dateFrom.value).isAfter(dayjs(this.dateTo.value))) {\n\t\t\tthis.dateTo = { ...this.dateTo, value: this.dateFrom.value }\n\t\t}\n\t\t\n\t\tthis.dispatchEvent(new CustomEvent('date-change', {\n\t\t\tdetail: { dateFrom: this.dateFrom.value, dateTo: this.dateTo.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handleToDateChange(e: Event) {\n\t\tconst input = e.target as HTMLInputElement\n\t\tthis.dateTo = { ...this.dateTo, value: input.value }\n\t\t\n\t\tthis.dispatchEvent(new CustomEvent('date-change', {\n\t\t\tdetail: { dateFrom: this.dateFrom.value, dateTo: this.dateTo.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handlePresetSelection(preset: DateRangePreset, e: Event) {\n\t\te.stopPropagation()\n\t\tthis.dispatchEvent(new CustomEvent('preset-select', {\n\t\t\tdetail: { preset },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t\t$dialog.dismiss()\n\t}\n\n\tprivate applyManualDateSelection(e: Event) {\n\t\te.stopPropagation()\n\t\t// Validate dates before applying\n\t\tconst fromDate = dayjs(this.dateFrom.value)\n\t\tconst toDate = dayjs(this.dateTo.value)\n\n\t\tif (!fromDate.isValid() || !toDate.isValid()) {\n\t\t\tthis.dispatchEvent(new CustomEvent('announce', {\n\t\t\t\tdetail: { message: 'Invalid date format. Please check your input.' },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true\n\t\t\t}))\n\t\t\treturn\n\t\t}\n\n\t\tthis.dispatchEvent(new CustomEvent('apply-dates', {\n\t\t\tdetail: { \n\t\t\t\tdateFrom: this.dateFrom.value, \n\t\t\t\tdateTo: this.dateTo.value,\n\t\t\t\tswapIfNeeded: fromDate.isAfter(toDate)\n\t\t\t},\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\n\t\t$dialog.dismiss()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"w-full min-h-[400px] max-h-[80vh] flex flex-col p-4\">\n\t\t\t\t<!-- Custom Range Section with Inline Calendars -->\n\t\t\t\t<schmancy-surface type=\"container\" class=\"rounded-xl p-4 mb-6\">\n\t\t\t\t\t<div class=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t\t\t\t\t\t<!-- From Date Calendar -->\n\t\t\t\t\t\t\t<div class=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"md\" class=\"text-surface-onVariant\">\n\t\t\t\t\t\t\t\t\t${this.dateFrom.label || 'From'}\n\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\t\t\t\ttype=\"${this.type}\"\n\t\t\t\t\t\t\t\t\t.value=\"${this.dateFrom.value}\"\n\t\t\t\t\t\t\t\t\tmin=\"${ifDefined(this.minDate)}\"\n\t\t\t\t\t\t\t\t\tmax=\"${ifDefined(this.maxDate)}\"\n\t\t\t\t\t\t\t\t\t@change=\"${this.handleFromDateChange}\"\n\t\t\t\t\t\t\t\t></schmancy-input>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- To Date Calendar -->\n\t\t\t\t\t\t\t<div class=\"flex flex-col gap-2\">\n\t\t\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"md\" class=\"text-surface-onVariant\">\n\t\t\t\t\t\t\t\t\t${this.dateTo.label || 'To'}\n\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t<schmancy-input\n\t\t\t\t\t\t\t\t\ttype=\"${this.type}\"\n\t\t\t\t\t\t\t\t\t.value=\"${this.dateTo.value}\"\n\t\t\t\t\t\t\t\t\tmin=\"${ifDefined(this.dateFrom.value)}\"\n\t\t\t\t\t\t\t\t\tmax=\"${ifDefined(this.maxDate)}\"\n\t\t\t\t\t\t\t\t\t@change=\"${this.handleToDateChange}\"\n\t\t\t\t\t\t\t\t></schmancy-input>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<!-- Apply Button - Now at the bottom for logical flow -->\n\t\t\t\t\t\t<div class=\"flex justify-end mt-2\">\n\t\t\t\t\t\t\t<schmancy-button \n\t\t\t\t\t\t\t\tvariant=\"filled\" \n\t\t\t\t\t\t\t\t@click=\"${(e: Event) => this.applyManualDateSelection(e)}\"\n\t\t\t\t\t\t\t\t?disabled=\"${!this.dateFrom.value || !this.dateTo.value}\"\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</div>\n\t\t\t\t\t</div>\n\t\t\t\t</schmancy-surface>\n\n\t\t\t\t<!-- Presets Section -->\n\t\t\t\t<div class=\"flex-1 overflow-y-auto overflow-x-hidden min-h-0\">\n\t\t\t\t\t<div class=\"grid grid-cols-2 md:grid-cols-5 gap-6\">\n\t\t\t\t\t\t${this.presetCategories.map(\n\t\t\t\t\t\t\tcategory => html`\n\t\t\t\t\t\t\t\t<div class=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t<schmancy-typography type=\"title\" token=\"md\" class=\"text-surface-onVariant font-medium\">\n\t\t\t\t\t\t\t\t\t\t${category.name}\n\t\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t\t<div class=\"space-y-1\">\n\t\t\t\t\t\t\t\t\t\t${category.presets.map(\n\t\t\t\t\t\t\t\t\t\t\tpreset => html`\n\t\t\t\t\t\t\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"${this.activePreset === preset.label ? 'filled' : 'text'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"w-full justify-start text-left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t@click=\"${(e: Event) => this.handlePresetSelection(preset, e)}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-pressed=\"${this.activePreset === preset.label}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"${preset.label}: ${preset.range.dateFrom} to ${preset.range.dateTo}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"${preset.range.dateFrom} to ${preset.range.dateTo}\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"truncate\">${preset.label}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}","import { $LitElement } from '@mixins/index'\nimport dayjs from 'dayjs'\nimport quarterOfYear from 'dayjs/plugin/quarterOfYear'\nimport { html, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { debounceTime, fromEvent, takeUntil, timer } from 'rxjs'\nimport { $dialog } from '../dialog/dialog-service'\nimport { detectDateRangeType, formatDateRange } from './date-range-helpers'\nimport { DateRangePreset, generatePresetCategories, PresetCategory } from './date-range-presets'\nimport { validateInitialDateRange } from './date-utils'\nimport './date-range-dialog'\n\n// Add quarter plugin to dayjs\ndayjs.extend(quarterOfYear)\n\nexport type SchmancyDateRangeChangeEvent = CustomEvent<{\n\tdateFrom: string\n\tdateTo: string\n}>\n\n/**\n * A date range selector that supports presets and manual date input.\n *\n * @element schmancy-date-range\n * @fires change - Fired when the date range changes with dateFrom and dateTo values\n */\n@customElement('schmancy-date-range')\nexport class SchmancyDateRange extends $LitElement() {\n\t// Core properties\n\t@property({ type: String }) type: 'date' | 'datetime-local' = 'date'\n\t@property({ type: Object }) dateFrom: { label: string; value: string } = { label: 'From', value: '' }\n\t@property({ type: Object }) dateTo: { label: string; value: string } = { label: 'To', value: '' }\n\t@property({ type: String }) minDate?: string\n\t@property({ type: String }) maxDate?: string\n\n\t// Enhanced functionality\n\t@property({ type: Array }) customPresets: Array<{\n\t\tlabel: string\n\t\tdateFrom: string\n\t\tdateTo: string\n\t}> = []\n\t@property({ type: String }) format?: string\n\t@property({ type: Boolean }) disabled = false\n\t@property({ type: Boolean }) required = false\n\t@property({ type: String }) placeholder = 'Select date range'\n\t@property({ type: Boolean }) clearable = true\n\t@property() step?: 'day' | 'week' | 'month' | 'year' | number\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private selectedDateRange: string = ''\n\t@state() private activePreset: string | null = null\n\t@state() private announceMessage: string = ''\n\t@state() private isMobile = false\n\n\t// Default presets\n\tprivate presetRanges: DateRangePreset[] = []\n\n\t// Categorized presets\n\tprivate presetCategories: PresetCategory[] = []\n\n\t// Memoization cache\n\tprivate memoizedPresets = new Map<string, PresetCategory[]>()\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tthis.initPresetRanges()\n\t\tthis.checkMobileView()\n\n\t\t// Validate initial date range\n\t\tconst dateFormat = this.getDateFormat() as 'YYYY-MM-DD' | 'YYYY-MM-DDTHH:mm'\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\tconst now = dayjs().format(dateFormat)\n\t\t\tthis.dateFrom.value = now\n\t\t\tthis.dateTo.value = now\n\t\t\tthis.updateSelectedDateRange()\n\t\t}\n\n\t\t// Set up global event handlers using RxJS\n\t\tthis.setupEventHandlers()\n\t}\n\n\tprivate setupEventHandlers() {\n\t\t// Handle keyboard navigation\n\t\tfromEvent<KeyboardEvent>(document, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(event => {\n\t\t\t\tthis.handleKeyboardNavigation(event)\n\t\t\t})\n\n\t\t// Handle window resize with debouncing\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\tdebounceTime(150),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.checkMobileView()\n\t\t\t})\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tsuper.disconnectedCallback()\n\t}\n\n\tupdated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (\n\t\t\t(changedProps.has('dateFrom') || changedProps.has('dateTo')) &&\n\t\t\t(this.dateFrom?.value !== undefined || this.dateTo?.value !== undefined)\n\t\t) {\n\t\t\tthis.updateSelectedDateRange()\n\t\t}\n\t}\n\n\tprivate initPresetRanges() {\n\t\tconst format = this.getDateFormat()\n\t\tconst cacheKey = `${this.type}-${format}-${JSON.stringify(this.customPresets)}`\n\t\t\n\t\t// Check memoization cache\n\t\tif (this.memoizedPresets.has(cacheKey)) {\n\t\t\tconst cached = this.memoizedPresets.get(cacheKey)!\n\t\t\tthis.presetCategories = cached\n\t\t\tthis.presetRanges = []\n\t\t\tcached.forEach(category => {\n\t\t\t\tthis.presetRanges.push(...category.presets)\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// Generate preset categories\n\t\tthis.presetCategories = generatePresetCategories(format, this.type === 'datetime-local')\n\n\t\t// Flatten presets for other methods that expect a flat list\n\t\tthis.presetRanges = []\n\t\tthis.presetCategories.forEach(category => {\n\t\t\tthis.presetRanges.push(...category.presets)\n\t\t})\n\n\t\t// Add custom presets if provided\n\t\tif (this.customPresets && this.customPresets.length > 0) {\n\t\t\tconst customCategory: PresetCategory = {\n\t\t\t\tname: 'Custom',\n\t\t\t\tpresets: this.customPresets.map(preset => ({\n\t\t\t\t\tlabel: preset.label,\n\t\t\t\t\trange: {\n\t\t\t\t\t\tdateFrom: preset.dateFrom,\n\t\t\t\t\t\tdateTo: preset.dateTo,\n\t\t\t\t\t},\n\t\t\t\t\tstep: 'day' as const,\n\t\t\t\t})),\n\t\t\t}\n\n\t\t\tthis.presetCategories.push(customCategory)\n\t\t\tthis.presetRanges.push(...customCategory.presets)\n\t\t}\n\t\t\n\t\t// Cache the result\n\t\tthis.memoizedPresets.set(cacheKey, [...this.presetCategories])\n\t}\n\n\tprivate getDateFormat(): string {\n\t\treturn this.format || (this.type === 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DDTHH:mm')\n\t}\n\n\t/**\n\t * Creates a concise display format for the selected date range\n\t */\n\tprivate updateSelectedDateRange() {\n\t\t// Find matching preset\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\n\t\tif (preset) {\n\t\t\t// If matches a preset, just use the preset name\n\t\t\tthis.selectedDateRange = preset.label\n\t\t\tthis.activePreset = preset.label\n\t\t\treturn\n\t\t}\n\n\t\t// If we didn't find a preset match, check if we should update the active preset\n\t\tthis.checkAndUpdateActivePreset(this.dateFrom.value, this.dateTo.value)\n\n\t\t// Custom date range - create concise format\n\t\tthis.activePreset = null\n\t\tthis.selectedDateRange = formatDateRange(this.dateFrom.value, this.dateTo.value, this.type, this.placeholder)\n\t}\n\n\tprivate setDateRange(dateFrom: string, dateTo: string) {\n\t\tthis.dateFrom.value = dateFrom\n\t\tthis.dateTo.value = dateTo\n\t\tthis.updateSelectedDateRange()\n\n\t\t// Announce change to screen readers\n\t\tthis.announceToScreenReader(`Date range updated: ${this.selectedDateRange}`)\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<{ dateFrom: string; dateTo: string }>('change', {\n\t\t\t\tdetail: { dateFrom, dateTo },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\n\n\n\tprivate toggleDropdown(e: Event) {\n\t\te.stopPropagation()\n\t\tif (this.disabled) return\n\n\t\tif (this.isOpen) {\n\t\t\tthis.closeDropdown()\n\t\t} else {\n\t\t\tthis.openDropdown()\n\t\t}\n\t}\n\n\tprivate openDropdown() {\n\t\tif (this.disabled || this.step !== undefined) return\n\t\t\n\t\tthis.isOpen = true\n\t\t\n\t\t// Create dialog with the new component\n\t\tconst dialogContent = html`\n\t\t\t<schmancy-date-range-dialog\n\t\t\t\t.type=\"${this.type}\"\n\t\t\t\t.dateFrom=\"${this.dateFrom}\"\n\t\t\t\t.dateTo=\"${this.dateTo}\"\n\t\t\t\t.minDate=\"${this.minDate}\"\n\t\t\t\t.maxDate=\"${this.maxDate}\"\n\t\t\t\t.activePreset=\"${this.activePreset}\"\n\t\t\t\t.presetCategories=\"${this.presetCategories}\"\n\t\t\t\t@preset-select=\"${(e: CustomEvent) => {\n\t\t\t\t\tthis.activePreset = e.detail.preset.label\n\t\t\t\t\tthis.setDateRange(e.detail.preset.range.dateFrom, e.detail.preset.range.dateTo)\n\t\t\t\t}}\"\n\t\t\t\t@date-change=\"${() => this.updateSelectedDateRange()}\"\n\t\t\t\t@apply-dates=\"${(e: CustomEvent) => {\n\t\t\t\t\tconst { dateFrom, dateTo, swapIfNeeded } = e.detail\n\t\t\t\t\tif (swapIfNeeded) {\n\t\t\t\t\t\tthis.setDateRange(dateTo, dateFrom)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.setDateRange(dateFrom, dateTo)\n\t\t\t\t\t}\n\t\t\t\t}}\"\n\t\t\t\t@announce=\"${(e: CustomEvent) => this.announceToScreenReader(e.detail.message)}\"\n\t\t\t></schmancy-date-range-dialog>\n\t\t`\n\t\t\n\t\t// Use the dialog service - it will automatically find the nearest schmancy-theme\n\t\t$dialog.component(dialogContent, {\n\t\t\ttitle: 'Select Date Range',\n\t\t\twidth: this.isMobile ? '100vw' : '800px',\n\t\t\thideActions: true\n\t\t}).then(() => {\n\t\t\tthis.isOpen = false\n\t\t})\n\t}\n\n\tprivate closeDropdown() {\n\t\t$dialog.dismiss()\n\t\tthis.isOpen = false\n\t}\n\n\n\t/**\n\t * Shifts the date range based on the step property\n\t */\n\tprivate shiftDateRange(direction: number, e: Event) {\n\t\te.stopPropagation()\n\n\t\tif (!this.dateFrom.value || !this.dateTo.value) return\n\n\t\tconst fromDate = dayjs(this.dateFrom.value)\n\t\tconst toDate = dayjs(this.dateTo.value)\n\n\t\tif (!fromDate.isValid() || !toDate.isValid()) return\n\n\t\tconst format = this.getDateFormat()\n\t\tconst dir = direction > 0 ? 1 : -1\n\n\t\tlet newFromDate: dayjs.Dayjs\n\t\tlet newToDate: dayjs.Dayjs\n\n\t\t// If step is explicitly provided, use it\n\t\tif (this.step !== undefined) {\n\t\t\tif (typeof this.step === 'number') {\n\t\t\t\t// Numeric step means shift by that many days\n\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(this.step, 'day') : fromDate.subtract(this.step, 'day')\n\t\t\t\tnewToDate = dir > 0 ? toDate.add(this.step, 'day') : toDate.subtract(this.step, 'day')\n\t\t\t} else {\n\t\t\t\t// String step means shift by the specified unit\n\t\t\t\tswitch (this.step) {\n\t\t\t\t\tcase 'day': {\n\t\t\t\t\t\tconst daysDiff = toDate.diff(fromDate, 'day') + 1\n\t\t\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(daysDiff, 'day') : fromDate.subtract(daysDiff, 'day')\n\t\t\t\t\t\tnewToDate = dir > 0 ? toDate.add(daysDiff, 'day') : toDate.subtract(daysDiff, 'day')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'week': {\n\t\t\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(1, 'week') : fromDate.subtract(1, 'week')\n\t\t\t\t\t\tnewToDate = dir > 0 ? toDate.add(1, 'week') : toDate.subtract(1, 'week')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'month': {\n\t\t\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(1, 'month') : fromDate.subtract(1, 'month')\n\t\t\t\t\t\tnewToDate = dir > 0 ? toDate.add(1, 'month') : toDate.subtract(1, 'month')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'year': {\n\t\t\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(1, 'year') : fromDate.subtract(1, 'year')\n\t\t\t\t\t\tnewToDate = dir > 0 ? toDate.add(1, 'year') : toDate.subtract(1, 'year')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Auto-detect the appropriate step based on the date range\n\t\t\tconst rangeType = detectDateRangeType(fromDate, toDate)\n\t\t\tconst daysDiff = toDate.diff(fromDate, 'day') + 1\n\n\t\t\tif (rangeType.isFullYear) {\n\t\t\t\t// Full year range - shift by year\n\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(1, 'year') : fromDate.subtract(1, 'year')\n\t\t\t\tnewToDate = dir > 0 ? toDate.add(1, 'year') : toDate.subtract(1, 'year')\n\t\t\t} else if (rangeType.isFullMonth) {\n\t\t\t\t// Full month range - shift by month\n\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(1, 'month') : fromDate.subtract(1, 'month')\n\t\t\t\tnewToDate = dir > 0 ? toDate.add(1, 'month') : toDate.subtract(1, 'month')\n\t\t\t} else if (rangeType.isFullWeek) {\n\t\t\t\t// Full week range - shift by week\n\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(1, 'week') : fromDate.subtract(1, 'week')\n\t\t\t\tnewToDate = dir > 0 ? toDate.add(1, 'week') : toDate.subtract(1, 'week')\n\t\t\t} else if (daysDiff === 1) {\n\t\t\t\t// Single day - shift by 1 day\n\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(1, 'day') : fromDate.subtract(1, 'day')\n\t\t\t\tnewToDate = dir > 0 ? toDate.add(1, 'day') : toDate.subtract(1, 'day')\n\t\t\t} else {\n\t\t\t\t// Custom range - shift by the range duration\n\t\t\t\tnewFromDate = dir > 0 ? fromDate.add(daysDiff, 'day') : fromDate.subtract(daysDiff, 'day')\n\t\t\t\tnewToDate = dir > 0 ? toDate.add(daysDiff, 'day') : toDate.subtract(daysDiff, 'day')\n\t\t\t}\n\t\t}\n\n\t\t// Validate against min/max dates\n\t\tif (this.minDate) {\n\t\t\tconst minDate = dayjs(this.minDate)\n\t\t\tif (newFromDate.isBefore(minDate)) {\n\t\t\t\treturn // Don't shift if it would go before min date\n\t\t\t}\n\t\t}\n\n\t\tif (this.maxDate) {\n\t\t\tconst maxDate = dayjs(this.maxDate)\n\t\t\tif (newToDate.isAfter(maxDate)) {\n\t\t\t\treturn // Don't shift if it would go after max date\n\t\t\t}\n\t\t}\n\n\t\t// Update the date range\n\t\tthis.setDateRange(newFromDate.format(format), newToDate.format(format))\n\t\tthis.checkAndUpdateActivePreset(newFromDate.format(format), newToDate.format(format))\n\t}\n\n\t/**\n\t * Handle keyboard navigation for accessibility\n\t */\n\tprivate handleKeyboardNavigation(event: KeyboardEvent) {\n\t\tconst key = event.key\n\t\t\n\t\t// Handle date navigation keys\n\t\tif (this.dateFrom.value && this.dateTo.value && !this.disabled) {\n\t\t\tswitch (key) {\n\t\t\t\tcase 'PageUp':\n\t\t\t\t\tif (event.target === this || this.contains(event.target as Node)) {\n\t\t\t\t\t\tthis.shiftDateRange(-1, event)\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase 'PageDown':\n\t\t\t\t\tif (event.target === this || this.contains(event.target as Node)) {\n\t\t\t\t\t\tthis.shiftDateRange(1, event)\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase 'Home':\n\t\t\t\t\tif (event.ctrlKey && (event.target === this || this.contains(event.target as Node))) {\n\t\t\t\t\t\t// Ctrl+Home: Jump to start of current month\n\t\t\t\t\t\tconst currentFrom = dayjs(this.dateFrom.value)\n\t\t\t\t\t\tconst currentTo = dayjs(this.dateTo.value)\n\t\t\t\t\t\tconst monthStart = currentFrom.startOf('month')\n\t\t\t\t\t\tconst daysDiff = currentTo.diff(currentFrom, 'day')\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.setDateRange(\n\t\t\t\t\t\t\tmonthStart.format(this.getDateFormat()),\n\t\t\t\t\t\t\tmonthStart.add(daysDiff, 'day').format(this.getDateFormat())\n\t\t\t\t\t\t)\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase 'End':\n\t\t\t\t\tif (event.ctrlKey && (event.target === this || this.contains(event.target as Node))) {\n\t\t\t\t\t\t// Ctrl+End: Jump to end of current month\n\t\t\t\t\t\tconst currentFrom = dayjs(this.dateFrom.value)\n\t\t\t\t\t\tconst currentTo = dayjs(this.dateTo.value)\n\t\t\t\t\t\tconst daysDiff = currentTo.diff(currentFrom, 'day')\n\t\t\t\t\t\tconst monthEnd = currentTo.endOf('month')\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.setDateRange(\n\t\t\t\t\t\t\tmonthEnd.subtract(daysDiff, 'day').format(this.getDateFormat()),\n\t\t\t\t\t\t\tmonthEnd.format(this.getDateFormat())\n\t\t\t\t\t\t)\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the current date range matches any predefined preset,\n\t * and updates the activePreset accordingly\n\t */\n\tprivate checkAndUpdateActivePreset(fromDate: string, toDate: string) {\n\t\t// Find a preset that matches the current date range\n\t\tconst matchingPreset = this.presetRanges.find(\n\t\t\tpreset => preset.range.dateFrom === fromDate && preset.range.dateTo === toDate,\n\t\t)\n\n\t\tif (matchingPreset) {\n\t\t\tthis.activePreset = matchingPreset.label\n\t\t} else {\n\t\t\tthis.activePreset = null\n\t\t}\n\t}\n\n\n\t/**\n\t * Check if view is mobile\n\t */\n\tprivate checkMobileView() {\n\t\tthis.isMobile = window.innerWidth < 768\n\t}\n\n\n\n\n\t/**\n\t * Announce messages to screen readers\n\t */\n\tprivate announceToScreenReader(message: string) {\n\t\tthis.announceMessage = message\n\t\t// Clear the message after announcement\n\t\ttimer(100)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.announceMessage = ''\n\t\t\t})\n\t}\n\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"relative ${this.disabled ? 'opacity-60 pointer-events-none' : ''}\">\n\t\t\t\t<!-- Screen reader announcements -->\n\t\t\t\t<div class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n\t\t\t\t\t${this.announceMessage}\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Trigger using the preferred schmancy-grid pattern -->\n\t\t\t\t<section @click=${(event: Event) => event.stopPropagation()} class=\"flex\" >\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\taria-label=\"Previous ${this.activePreset ? this.activePreset.toLowerCase() : 'date range'}\"\n\t\t\t\t\t\t\t@click=${(e: Event) => this.shiftDateRange(-1, e)}\n\t\t\t\t\t\t\t?disabled=${this.disabled || !this.dateFrom.value || !this.dateTo.value}\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\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\tclass=\"w-max ${this.step !== undefined ? 'pointer-events-none' : ''}\"\n\t\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\taria-haspopup=\"menu\"\n\t\t\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\t\t\taria-label=\"Select date range. Current: ${this.selectedDateRange || 'No date selected'}\"\n\t\t\t\t\t\t\taria-readonly=\"${this.step !== undefined}\"\n\t\t\t\t\t\t\t@click=${(e: Event) => this.toggleDropdown(e)}\n\t\t\t\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.selectedDateRange || this.placeholder}\n\t\t\t\t\t\t</schmancy-button>\n\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\taria-label=\"Next ${this.activePreset ? this.activePreset.toLowerCase() : 'date range'}\"\n\t\t\t\t\t\t\t@click=${(e: Event) => this.shiftDateRange(1, e)}\n\t\t\t\t\t\t\t?disabled=${this.disabled || !this.dateFrom.value || !this.dateTo.value}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tarrow_right\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t</section>\n\t\t\t</div>\n\t\t`\n\t}\n}","import dayjs from 'dayjs'\r\nimport { PresetUnit } from './date-range-presets'\r\n\r\n/**\r\n * Format a date range into a human-readable string\r\n */\r\nexport function formatDateRange(\r\n\tfromValue: string,\r\n\ttoValue: string,\r\n\ttype: 'date' | 'datetime-local',\r\n\tplaceholder: string\r\n): string {\r\n\tif (!fromValue || !toValue) {\r\n\t\treturn placeholder\r\n\t}\r\n\r\n\tconst fromDate = dayjs(fromValue)\r\n\tconst toDate = dayjs(toValue)\r\n\r\n\tif (!fromDate.isValid() || !toDate.isValid()) {\r\n\t\treturn placeholder\r\n\t}\r\n\r\n\t// Format times if needed (for datetime-local)\r\n\tconst fromTime = type === 'datetime-local' ? fromDate.format(' h:mm A') : ''\r\n\tconst toTime = type === 'datetime-local' ? toDate.format(' h:mm A') : ''\r\n\r\n\t// Check if same day\r\n\tif (fromDate.isSame(toDate, 'day')) {\r\n\t\treturn `${fromDate.format('MMM D, YYYY')}${fromTime}`\r\n\t}\r\n\r\n\t// Check if same month and year\r\n\tif (fromDate.isSame(toDate, 'month') && fromDate.isSame(toDate, 'year')) {\r\n\t\treturn `${fromDate.format('MMM D')}-${toDate.format('D, YYYY')}${toTime}`\r\n\t}\r\n\r\n\t// Check if same year\r\n\tif (fromDate.isSame(toDate, 'year')) {\r\n\t\treturn `${fromDate.format('MMM D')} - ${toDate.format('MMM D, YYYY')}${toTime}`\r\n\t}\r\n\r\n\t// Different years\r\n\treturn `${fromDate.format('MMM D, YYYY')}${fromTime} - ${toDate.format('MMM D, YYYY')}${toTime}`\r\n}\r\n\r\n/**\r\n * Detect the type of date range (full month, full quarter, etc.)\r\n */\r\nexport interface DateRangeType {\r\n\tisFullMonth: boolean\r\n\tisFullQuarter: boolean\r\n\tisFullYear: boolean\r\n\tisFullWeek: boolean\r\n}\r\n\r\nexport function detectDateRangeType(fromDate: dayjs.Dayjs, toDate: dayjs.Dayjs): DateRangeType {\r\n\treturn {\r\n\t\tisFullMonth: fromDate.date() === 1 && toDate.isSame(fromDate.endOf('month'), 'day'),\r\n\t\tisFullQuarter: fromDate.isSame(fromDate.startOf('quarter'), 'day') && toDate.isSame(toDate.endOf('quarter'), 'day'),\r\n\t\tisFullYear: fromDate.isSame(fromDate.startOf('year'), 'day') && toDate.isSame(toDate.endOf('year'), 'day'),\r\n\t\tisFullWeek: fromDate.day() === 0 && toDate.day() === 6 && toDate.diff(fromDate, 'days') === 6,\r\n\t}\r\n}\r\n\r\n/**\r\n * Calculate the appropriate shift unit and amount for a date range\r\n */\r\nexport function calculateShiftParams(\r\n\tfromDate: dayjs.Dayjs,\r\n\ttoDate: dayjs.Dayjs,\r\n\tactivePresetStep?: PresetUnit\r\n): { unit: PresetUnit; amount: number } {\r\n\tif (activePresetStep) {\r\n\t\treturn { unit: activePresetStep, amount: 1 }\r\n\t}\r\n\r\n\tconst rangeDurationInDays = toDate.diff(fromDate, 'day')\r\n\r\n\t// For very long ranges, use years\r\n\tif (rangeDurationInDays >= 360) {\r\n\t\treturn { unit: 'year', amount: Math.round(rangeDurationInDays / 365) }\r\n\t}\r\n\t// For long ranges, use quarters\r\n\telse if (rangeDurationInDays >= 90) {\r\n\t\treturn { unit: 'quarter', amount: Math.round(rangeDurationInDays / 90) }\r\n\t}\r\n\t// For medium-long ranges, use months\r\n\telse if (rangeDurationInDays >= 30) {\r\n\t\treturn { unit: 'month', amount: Math.round(rangeDurationInDays / 30) }\r\n\t}\r\n\t// For medium ranges, use weeks\r\n\telse if (rangeDurationInDays >= 7) {\r\n\t\treturn { unit: 'week', amount: Math.round(rangeDurationInDays / 7) }\r\n\t}\r\n\t// For shorter ranges, use days\r\n\telse {\r\n\t\treturn { unit: 'day', amount: rangeDurationInDays + 1 }\r\n\t}\r\n}\r\n\r\n/**\r\n * Helper method to safely add/subtract quarter values\r\n */\r\nexport function adjustQuarter(date: dayjs.Dayjs, amount: number, direction: 1 | -1): dayjs.Dayjs {\r\n\t// Get current quarter (1-4)\r\n\tconst currentQuarter = date.quarter()\r\n\r\n\t// Calculate new quarter\r\n\tlet newQuarter = currentQuarter + direction * amount\r\n\tlet yearAdjustment = 0\r\n\r\n\t// Handle year boundaries\r\n\twhile (newQuarter > 4) {\r\n\t\tnewQuarter -= 4\r\n\t\tyearAdjustment += 1\r\n\t}\r\n\r\n\twhile (newQuarter < 1) {\r\n\t\tnewQuarter += 4\r\n\t\tyearAdjustment -= 1\r\n\t}\r\n\r\n\t// Adjust year if needed\r\n\tconst adjustedDate = date.add(yearAdjustment, 'year')\r\n\r\n\t// Set to the start of the new quarter\r\n\tconst newDate = adjustedDate.month((newQuarter - 1) * 3)\r\n\r\n\t// Maintain the same day of month if possible\r\n\tconst daysInMonth = newDate.daysInMonth()\r\n\tconst targetDay = Math.min(date.date(), daysInMonth)\r\n\r\n\treturn newDate.date(targetDay)\r\n}"],"names":["t","e","n","r","i","s","u","a","o","c","f","h","d","l","$","y","M","name","weekdays","split","months","ordinal","m","String","length","Array","join","v","z","utcOffset","Math","abs","floor","date","year","month","clone","add","ceil","p","w","D","ms","Q","toLowerCase","replace","g","S","_","O","args","arguments","b","locale","$L","utc","$u","x","$x","$offset","this","parse","prototype","$d","Date","NaN","test","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","apply","slice","$locale","weekStart","$set","min","daysInMonth","get","Number","round","subtract","format","invalidDate","meridiem","monthsShort","weekdaysMin","weekdaysShort","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","k","forEach","extend","$i","isDayjs","en","Ls","quarter","bind","generateLastNDaysPresets","days","map","label","range","dateFrom","dayjs","dateTo","step","generateLastNWeeksPresets","weeks","generateLastNMonthsPresets","generateLastNQuartersPresets","quarters","enforceDateFormat","dateString","expectedFormat","parsedDate","validateInitialDateRange","formattedDateFrom","formattedDateTo","SchmancyDateRangeDialog","$LitElement","constructor","super","type","value","activePreset","presetCategories","input","target","dispatchEvent","CustomEvent","detail","bubbles","composed","preset","stopPropagation","$dialog","dismiss","fromDate","swapIfNeeded","message","render","html","ifDefined","minDate","maxDate","handleFromDateChange","handleToDateChange","applyManualDateSelection","category","presets","handlePresetSelection","__decorateClass","property","Object","customElement","quarterOfYear","SchmancyDateRange","customPresets","disabled","required","placeholder","clearable","isOpen","selectedDateRange","announceMessage","isMobile","presetRanges","memoizedPresets","Map","connectedCallback","initPresetRanges","checkMobileView","dateFormat","getDateFormat","validatedRange","updateSelectedDateRange","now","setupEventHandlers","fromEvent","document","pipe","takeUntil","disconnecting","subscribe","event","handleKeyboardNavigation","window","debounceTime","disconnectedCallback","changedProps","updated","has","cacheKey","JSON","stringify","cached","push","includeTime","categories","customCategory","find","checkAndUpdateActivePreset","fromValue","toValue","fromTime","toTime","announceToScreenReader","closeDropdown","openDropdown","dialogContent","setDateRange","component","title","width","hideActions","then","direction","dir","newFromDate","newToDate","daysDiff","rangeType","isFullMonth","isFullQuarter","isFullYear","isFullWeek","day","key","contains","shiftDateRange","preventDefault","ctrlKey","currentFrom","currentTo","monthStart","monthEnd","matchingPreset","innerWidth","timer","toggleDropdown","Boolean","state"],"mappings":";;;;;;;;;;gEAA4M,WAAA;AAA0B,MAAIA,IAAE,KAAIC,IAAE,KAAIC,IAAE,MAAKC,IAAE,eAAcC,IAAE,UAASC,IAAE,UAASC,IAAE,QAAOC,IAAE,OAAMC,IAAE,QAAOC,IAAE,SAAQC,IAAE,WAAUC,IAAE,QAAOC,IAAE,QAAOC,KAAE,gBAAeC,KAAE,8FAA6FC,KAAE,uFAAsFC,KAAE,EAACC,MAAK,MAAKC,UAAS,2DAA2DC,MAAM,GAAA,GAAKC,QAAO,wFAAwFD,MAAM,GAAA,GAAKE,SAAQ,SAASrB,GAAAA;AAAG,QAAIC,IAAE,CAAC,MAAK,MAAK,MAAK,IAAA,GAAMC,IAAEF,IAAE;AAAI,WAAM,MAAIA,KAAGC,GAAGC,IAAE,MAAI,EAAA,KAAKD,EAAEC,MAAID,EAAE,CAAA,KAAI;AAAA,EAAG,EAAA,GAAGqB,IAAE,SAAStB,GAAEC,GAAEC;AAAG,QAAIC,IAAEoB,OAAOvB,CAAAA;AAAG,WAAA,CAAOG,KAAGA,EAAEqB,UAAQvB,IAAED,IAAE,KAAGyB,MAAMxB,IAAE,IAAEE,EAAEqB,MAAAA,EAAQE,KAAKxB,KAAGF;AAAAA,EAAC,GAAE2B,KAAE,EAACtB,GAAEiB,GAAEM,GAAE,SAAS5B;AAAG,QAAIC,IAAAA,CAAGD,EAAE6B,UAAAA,GAAY3B,IAAE4B,KAAKC,IAAI9B,CA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B0F,EAAAA,CAAAA,GAtBWrF,EAsBKjI,WAAA,UAAA,CAAA,GACA4H,EAAA,CAAhB0F,MAvBWrF,EAuBKjI,WAAA,qBAAA,CAAA,GACA4H,EAAA,CAAhB0F,EAAAA,CAAAA,GAxBWrF,EAwBKjI,WAAA,gBAAA,CAAA,GACA4H,EAAA,CAAhB0F,EAAAA,CAAAA,GAzBWrF,EAyBKjI,WAAA,mBAAA,CAAA,GACA4H,EAAA,CAAhB0F,EAAAA,CAAAA,GA1BWrF,EA0BKjI,WAAA,YAAA,IA1BLiI,IAANL,EAAA,CADNG,GAAc,qBAAA,CAAA,GACFE;","x_google_ignoreList":[0,1]}
|
package/dist/date-range.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./date-range-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./date-range-Bd0bZ5EG.cjs");Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>e.SchmancyDateRange}),exports.validateInitialDateRange=e.validateInitialDateRange;
|
|
2
2
|
//# sourceMappingURL=date-range.cjs.map
|
package/dist/date-range.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CtXY3MHV.cjs");const n=require("./area.component-DQ_erV9e.cjs"),t=require("./utils-C9nzOWpR.cjs");require("./autocomplete-PHnzqAII.cjs");const r=require("./avatar-sXepW60q.cjs"),q=require("./boat-B_xZilsk.cjs");require("./spinner-CV62BBoF.cjs");const h=require("./icon-button-9V68mzcL.cjs");require("./media-CIuTybvD.cjs");const w=require("./checkbox-BAuVXvYL.cjs");require("./chips-Dg2otqDI.cjs");const T=require("./circular-progress-DZUJU-z3.cjs"),S=require("./code-preview-CYHNaPek.cjs"),I=require("./payment-card-form-ccF9dfGC.cjs"),b=require("./date-range-CJq5E8y0.cjs"),M=require("./date-range-inline-Czq1wHs1.cjs"),d=require("./delay-FgtrEHdo.cjs"),y=require("./dialog-content-ClfiDTji.cjs"),g=require("./dialog-service-BZZK8N6A.cjs"),l=require("./ripple-C2BHbhcS.cjs");require("./divider-2yg9r1tF.cjs");const p=require("./dropdown-content-DJ4CA3ug.cjs"),s=require("./timezone-UBBApQoU.cjs");require("./form-Dpokur4M.cjs"),require("./icon-mhchC8Qw.cjs");const f=require("./input-DzNoI9qU.cjs"),o=require("./flex-DWnX0ZPR.cjs"),u=require("./list-DRbkWHho.cjs");require("./menu-DEbZxoXr.cjs");const i=require("./notification-service-B6nHqzq5.cjs");require("./option-BPmOG_Hw.cjs"),require("./progress-BqZ7yHQe.cjs");const C=require("./radio-button-WmbuT_YW.cjs"),R=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const A=require("./select-CPnSionr.cjs");require("./sheet-Cn9heAk0.cjs");const a=require("./sheet.service-CNz7lXHC.cjs"),O=require("./slider-DBNoXRWS.cjs"),m=require("./schmancy-steps-container-CjAsrjKf.cjs"),c=require("./context-object-K_1gDFu-.cjs"),e=require("./selector-hook-Bf_lCnGW.cjs"),P=require("./surface-ClfeUI6q.cjs"),j=require("./table-Rqnb4AJl.cjs");require("./tabs-compatibility-B1bE7hSG.cjs"),require("./textarea-Dlnyyrbq.cjs");const N=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-Cao8AH8r.cjs");const D=require("./tooltip-WpE4e-fO.cjs"),v=require("./tree-Dn0t7MUR.cjs"),x=require("./types.cjs"),E=require("./typewriter-DwLZUKKQ.cjs"),B=require("./typography-BhCrqK_b.cjs"),H=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>q.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>h.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>h.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>w.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyCircularProgress",{enumerable:!0,get:()=>T.SchmancyCircularProgress}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>S.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>I.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>b.SchmancyDateRange}),exports.validateInitialDateRange=b.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>M.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>d.SchmancyDelay}),exports.delayContext=d.delayContext,Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>y.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>y.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>y.SchmancyDialogContent}),exports.$dialog=g.$dialog,exports.DialogService=g.DialogService,exports.color=l.color,exports.fullHeight=l.fullHeight,exports.ripple=l.ripple,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>p.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>p.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>s.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>s.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>f.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>f.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>u.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>u.SchmancyListItem}),exports.SchmancyListTypeContext=u.SchmancyListTypeContext,exports.$notify=i.$notify,exports.NotificationAudioService=i.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>i.SchmancyNotificationContainer}),Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>C.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>C.RadioGroup}),exports.mutationObserver=R.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>A.SchmancySelect}),exports.SchmancySheetPosition=a.SchmancySheetPosition,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>a.SchmancyThemeComponent}),exports.SheetHereMorty=a.SheetHereMorty,exports.SheetWhereAreYouRicky=a.SheetWhereAreYouRicky,exports.ThemeHereIAm=a.ThemeHereIAm,exports.ThemeWhereAreYou=a.ThemeWhereAreYou,exports.formateTheme=a.formateTheme,exports.sheet=a.sheet,exports.tailwindStyles=a.tailwindStyles,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>O.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>O.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>m.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>m.SchmancyStepsContainer}),exports.StepsController=m.StepsController,exports.stepsContext=m.stepsContext,exports.BaseStore=c.BaseStore,exports.IndexedDBStorageManager=c.IndexedDBStorageManager,exports.LocalStorageManager=c.LocalStorageManager,exports.MemoryStorageManager=c.MemoryStorageManager,exports.SchmancyArrayStore=c.SchmancyArrayStore,exports.SchmancyStoreObject=c.SchmancyStoreObject,exports.SessionStorageManager=c.SessionStorageManager,exports.StoreError=c.StoreError,exports.createStorageManager=c.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>P.SchmancySurface}),exports.SchmancySurfaceTypeContext=P.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>j.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>j.SchmancyTableRow}),exports.SchmancyTheme=N.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>D.SchmancyTooltip}),exports.tooltip=D.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>v.SchmancyTree}),exports.SchmancyEvents=x.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>E.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>B.SchmancyTypography}),exports.intersection$=H.intersection$;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CtXY3MHV.cjs");const n=require("./area.component-DQ_erV9e.cjs"),t=require("./utils-C9nzOWpR.cjs");require("./autocomplete-PHnzqAII.cjs");const r=require("./avatar-B3sAx50a.cjs"),q=require("./boat-B_xZilsk.cjs");require("./spinner-CV62BBoF.cjs");const h=require("./icon-button-9V68mzcL.cjs");require("./media-CIuTybvD.cjs");const w=require("./checkbox-BAuVXvYL.cjs");require("./chips-Dg2otqDI.cjs");const T=require("./circular-progress-DZUJU-z3.cjs"),S=require("./code-preview-CYHNaPek.cjs"),I=require("./payment-card-form-ccF9dfGC.cjs"),b=require("./date-range-Bd0bZ5EG.cjs"),M=require("./date-range-inline-Czq1wHs1.cjs"),d=require("./delay-FgtrEHdo.cjs"),y=require("./dialog-content-ClfiDTji.cjs"),g=require("./dialog-service-BZZK8N6A.cjs"),l=require("./ripple-C2BHbhcS.cjs");require("./divider-2yg9r1tF.cjs");const p=require("./dropdown-content-DJ4CA3ug.cjs"),s=require("./timezone-UBBApQoU.cjs");require("./form-Dpokur4M.cjs"),require("./icon-mhchC8Qw.cjs");const f=require("./input-DzNoI9qU.cjs"),o=require("./flex-DWnX0ZPR.cjs"),u=require("./list-DRbkWHho.cjs");require("./menu-DEbZxoXr.cjs");const i=require("./notification-service-B6nHqzq5.cjs");require("./option-BPmOG_Hw.cjs"),require("./progress-BqZ7yHQe.cjs");const C=require("./radio-button-WmbuT_YW.cjs"),R=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const A=require("./select-CPnSionr.cjs");require("./sheet-Cn9heAk0.cjs");const a=require("./sheet.service-CNz7lXHC.cjs"),O=require("./slider-DBNoXRWS.cjs"),m=require("./schmancy-steps-container-CjAsrjKf.cjs"),c=require("./context-object-K_1gDFu-.cjs"),e=require("./selector-hook-DB8RFC1y.cjs"),P=require("./surface-ClfeUI6q.cjs"),j=require("./table-Rqnb4AJl.cjs");require("./tabs-compatibility-B1bE7hSG.cjs"),require("./textarea-Dlnyyrbq.cjs");const N=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-Cao8AH8r.cjs");const D=require("./tooltip-WpE4e-fO.cjs"),v=require("./tree-Dn0t7MUR.cjs"),x=require("./types.cjs"),E=require("./typewriter-DwLZUKKQ.cjs"),B=require("./typography-BhCrqK_b.cjs"),H=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>q.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>h.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>h.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>w.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyCircularProgress",{enumerable:!0,get:()=>T.SchmancyCircularProgress}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>S.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>I.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>b.SchmancyDateRange}),exports.validateInitialDateRange=b.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>M.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>d.SchmancyDelay}),exports.delayContext=d.delayContext,Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>y.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>y.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>y.SchmancyDialogContent}),exports.$dialog=g.$dialog,exports.DialogService=g.DialogService,exports.color=l.color,exports.fullHeight=l.fullHeight,exports.ripple=l.ripple,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>p.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>p.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>s.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>s.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>f.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>f.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>u.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>u.SchmancyListItem}),exports.SchmancyListTypeContext=u.SchmancyListTypeContext,exports.$notify=i.$notify,exports.NotificationAudioService=i.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>i.SchmancyNotificationContainer}),Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>C.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>C.RadioGroup}),exports.mutationObserver=R.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>A.SchmancySelect}),exports.SchmancySheetPosition=a.SchmancySheetPosition,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>a.SchmancyThemeComponent}),exports.SheetHereMorty=a.SheetHereMorty,exports.SheetWhereAreYouRicky=a.SheetWhereAreYouRicky,exports.ThemeHereIAm=a.ThemeHereIAm,exports.ThemeWhereAreYou=a.ThemeWhereAreYou,exports.formateTheme=a.formateTheme,exports.sheet=a.sheet,exports.tailwindStyles=a.tailwindStyles,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>O.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>O.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>m.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>m.SchmancyStepsContainer}),exports.StepsController=m.StepsController,exports.stepsContext=m.stepsContext,exports.BaseStore=c.BaseStore,exports.IndexedDBStorageManager=c.IndexedDBStorageManager,exports.LocalStorageManager=c.LocalStorageManager,exports.MemoryStorageManager=c.MemoryStorageManager,exports.SchmancyArrayStore=c.SchmancyArrayStore,exports.SchmancyStoreObject=c.SchmancyStoreObject,exports.SessionStorageManager=c.SessionStorageManager,exports.StoreError=c.StoreError,exports.createStorageManager=c.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>P.SchmancySurface}),exports.SchmancySurfaceTypeContext=P.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>j.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>j.SchmancyTableRow}),exports.SchmancyTheme=N.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>D.SchmancyTooltip}),exports.tooltip=D.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>v.SchmancyTree}),exports.SchmancyEvents=x.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>E.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>B.SchmancyTypography}),exports.intersection$=H.intersection$;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./animated-text-D26Fv13t.js";
|
|
|
2
2
|
import { F as g, H as u, b as D, S as w, a as T, r as b } from "./area.component-BCcq9Nb7.js";
|
|
3
3
|
import { l as M, h as R, c as A, f as v, j as N, a as H, b as B, d as E, e as F, k as O, g as $, i as j, n as k, s as L } from "./utils-03Coa8AW.js";
|
|
4
4
|
import "./autocomplete-CHObbMzK.js";
|
|
5
|
-
import { $ as Y, H as z, a as G, r as V, S as W, g as K, d as _, h as q, e as Q, f as J, i as U, b as X, c as Z, k as aa, m as ea, n as ra, o as ta, l as oa, p as ca, q as sa, W as na, s as ma, j as Sa, t as ia } from "./avatar-
|
|
5
|
+
import { $ as Y, H as z, a as G, r as V, S as W, g as K, d as _, h as q, e as Q, f as J, i as U, b as X, c as Z, k as aa, m as ea, n as ra, o as ta, l as oa, p as ca, q as sa, W as na, s as ma, j as Sa, t as ia } from "./avatar-FYp7eVVT.js";
|
|
6
6
|
import { S as ha } from "./boat-C_BvtlNQ.js";
|
|
7
7
|
import "./spinner-CbA-FXRK.js";
|
|
8
8
|
import { S as la, a as fa } from "./icon-button-BW5ofOL5.js";
|
|
@@ -12,7 +12,7 @@ import "./chips-Dn8RpKCE.js";
|
|
|
12
12
|
import { S as ga } from "./circular-progress-B1RjFzcp.js";
|
|
13
13
|
import { S as Da, S as wa, a as Ta } from "./code-preview-JlSLKkKg.js";
|
|
14
14
|
import { S as Ia } from "./payment-card-form-Cs5bP5Di.js";
|
|
15
|
-
import { S as Ra, v as Aa } from "./date-range-
|
|
15
|
+
import { S as Ra, v as Aa } from "./date-range-CTx08Buk.js";
|
|
16
16
|
import { S as Na } from "./date-range-inline-B_K4YPtB.js";
|
|
17
17
|
import { S as Ba, d as Ea } from "./delay-D415_oVH.js";
|
|
18
18
|
import { C as Oa, S as $a, a as ja } from "./dialog-content-Cc7LNx1o.js";
|
|
@@ -40,7 +40,7 @@ import { S as we, d as Te, b as be, a as Ie, c as Me, T as Re, f as Ae, s as ve,
|
|
|
40
40
|
import { S as Be, a as Ee } from "./slider-C7Z1bPq7.js";
|
|
41
41
|
import { S as Oe, a as $e, b as je, s as ke } from "./schmancy-steps-container-CoARMXfB.js";
|
|
42
42
|
import { B as Pe, I as Ye, L as ze, M as Ge, S as Ve, a as We, b as Ke, d as _e, c as qe } from "./context-object-CDDP4bTk.js";
|
|
43
|
-
import { p as Je, a as Ue, v as Xe, G as Ze, c as ar, E as er, z as rr, C as tr, B as or, x as cr, w as sr, y as nr, D as mr, F as Sr, u as ir, A as yr, b as hr, r as pr, d as lr, q as fr, f as xr, g as dr, i as Cr, j as gr, k as ur, l as Dr, o as wr, h as Tr, n as br, m as Ir, e as Mr, s as Rr, t as Ar } from "./selector-hook-
|
|
43
|
+
import { p as Je, a as Ue, v as Xe, G as Ze, c as ar, E as er, z as rr, C as tr, B as or, x as cr, w as sr, y as nr, D as mr, F as Sr, u as ir, A as yr, b as hr, r as pr, d as lr, q as fr, f as xr, g as dr, i as Cr, j as gr, k as ur, l as Dr, o as wr, h as Tr, n as br, m as Ir, e as Mr, s as Rr, t as Ar } from "./selector-hook-CIpuCUbr.js";
|
|
44
44
|
import { a as Nr, S as Hr } from "./surface-By8o7nWa.js";
|
|
45
45
|
import { a as Er, S as Fr } from "./table-CvMo5lOi.js";
|
|
46
46
|
import "./tabs-compatibility-DsOH4PSw.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-Cpo-ws8k.js","sources":["../src/input/input.ts"],"sourcesContent":["import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { distinctUntilChanged, filter, fromEvent, map, takeUntil } from 'rxjs'\n\nimport { SchmancyFormField } from '@mixins/index'\n\n// Import styles\nimport style from './input.scss?inline'\n\n// If you want to be form-associated, define the type on `ElementInternals`.\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-input': SchmancyInput\n\t\t'sch-input': SchmancyInput\n\t}\n}\n\ntype EventDetails = {\n\tvalue: string\n}\n\n/**\n * Custom events the component may emit:\n * - 'input': on every keystroke\n * - 'change': on native blur/change\n * - 'enter': specifically when user presses Enter\n */\nexport type SchmancyInputInputEvent = CustomEvent<EventDetails>\nexport type SchmancyInputChangeEvent = CustomEvent<EventDetails>\nexport type SchmancyInputEnterEvent = CustomEvent<EventDetails>\n\n/**\n * Size variants for the input.\n * - sm: Small, compact input (40px height)\n * - md: Medium input (50px height, default)\n * - lg: Large, spacious input (60px height)\n */\nexport type InputSize = 'sm' | 'md' | 'lg'\n\n/**\n * Enhanced version of the SchmancyInput component with improved form integration\n * and compatibility with legacy API.\n *\n * This component uses the native form association API and maintains parity with\n * native input behaviors while providing a stylish, accessible interface.\n */\n@customElement('schmancy-input')\nexport default class SchmancyInput extends SchmancyFormField(style) {\n\t// ----------------------------\n\t// A) Public properties\n\t// ----------------------------\n\n\t/** Auto-incrementing counter for generating unique IDs */\n\tstatic _idCounter = 0\n\n\t/** Override value to be string only for input element */\n\t@property({ type: String, reflect: true })\n\tpublic override value = ''\n\n\n\t/**\n\t * The type of input. (e.g. 'text', 'password', 'email', etc.)\n\t */\n\t@property({ reflect: true })\n\tpublic type: HTMLInputElement['type'] = 'text'\n\n\n\t@property()\n\tpublic placeholder = ''\n\n\n\t/** Pattern validation attribute. */\n\t@property({ type: String, reflect: true })\n\tpublic pattern?: string\n\n\n\t/** If true, we visually show a pointer cursor even if readOnly. */\n\t@property({ type: Boolean, reflect: true }) public clickable = false\n\n\t/** Whether browser spellcheck is enabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic spellcheck = false\n\n\t/**\n\t * Text alignment within the input.\n\t * - 'left' | 'center' | 'right'\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic align: 'left' | 'center' | 'right' = 'left'\n\n\t/** inputmode attribute (affects on-screen keyboards in mobile). */\n\t@property()\n\tpublic inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'\n\n\t@property({ type: Number, reflect: true })\n\tpublic minlength?: number\n\n\t@property({ type: Number })\n\tpublic maxlength?: number\n\n\t@property()\n\tpublic min?: string\n\n\t@property()\n\tpublic max?: string\n\n\t@property({ type: Number, reflect: true })\n\tpublic step?: number\n\n\t/** If true, auto-focus this input on first render. */\n\t@property({ type: Boolean })\n\tpublic autofocus = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t/**\n\t * tabIndex for focusing by tab key. Typically 0 or -1.\n\t */\n\t@property({ type: Number, reflect: true })\n\tpublic override tabIndex = 0\n\n\n\t/**\n\t * The size of the input.\n\t * - 'sm': Small, compact size\n\t * - 'md': Medium size (default)\n\t * - 'lg': Large size\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic size: InputSize = 'md'\n\n\t/**\n\t * Controls when validation should show.\n\t * - 'always' - Always show validation\n\t * - 'touched' - Only show after field has been focused and then blurred\n\t * - 'dirty' - Only show after value has changed\n\t * - 'submitted' - Only show after form submission\n\t */\n\t@property({ type: String })\n\tpublic validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\n\t/**\n\t * For datalist support\n\t */\n\t@property({ type: String })\n\tpublic list?: string\n\n\n\t// ----------------------------\n\t// B) Queries & Refs\n\t// ----------------------------\n\t@query('input') private inputElement!: HTMLInputElement\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t// ----------------------------\n\t// C) Internal States\n\t// ----------------------------\n\n\t/**\n\t * For integration with browser's autofill support\n\t */\n\t@state()\n\tprivate isAutofilled = false\n\n\t/**\n\t * Track user interaction state for validation\n\t */\n\t@state()\n\tprivate touched = false\n\n\t@state()\n\tprivate dirty = false\n\n\t@state()\n\tprivate submitted = false\n\n\t/**\n\t * Store the default value for reset behavior\n\t */\n\t@state()\n\tprivate defaultValue = ''\n\n\t// ----------------------------\n\t// D) Form-associated logic\n\t// ----------------------------\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true, // so focus() goes to <input>\n\t}\n\n\tprivate formResetObserver?: MutationObserver\n\n\t/**\n\t * If user did not provide an ID, auto-generate one so <label for=\"...\">\n\t * and various aria-* attributes can reference it.\n\t */\n\tprotected override willUpdate(changedProps: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (!this.id) {\n\t\t\tthis.id = `sch-input-${SchmancyInput._idCounter++}`\n\t\t}\n\t\tsuper.willUpdate(changedProps)\n\t}\n\n\n\tprotected override updated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\n\t\t// Handle value changes\n\t\tif (changedProps.has('value')) {\n\t\t\t// If value changes from original default, mark as dirty\n\t\t\tif (this.value !== this.defaultValue) {\n\t\t\t\tthis.dirty = true\n\t\t\t}\n\n\t\t\t// Update validation state when value changes\n\t\t\tthis.validateInput()\n\t\t}\n\n\t\t// Store default value if this is the first update\n\t\tif (!this.hasUpdated && changedProps.has('value')) {\n\t\t\tthis.defaultValue = this.value\n\t\t}\n\t}\n\n\t/**\n\t * Connect to the closest form element and set up form integration\n\t */\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Store initial default value for form reset\n\t\tthis.defaultValue = this.value\n\n\t\t// Set up form integration\n\t\tthis.setupFormIntegration()\n\n\t\t// Setup for external label association\n\t\tthis.setupExternalLabelAssociation()\n\t}\n\n\t/**\n\t * Set up form integration with ElementInternals\n\t */\n\tprivate setupFormIntegration() {\n\t\tif (this.form) {\n\t\t\t// Listen for form reset events\n\t\t\tthis.formResetObserver = new MutationObserver(mutations => {\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'attributes' && mutation.attributeName === 'reset') {\n\t\t\t\t\t\tthis.resetToDefault()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// Observe the form for reset events\n\t\t\tthis.formResetObserver.observe(this.form, {\n\t\t\t\tattributes: true,\n\t\t\t\tchildList: false,\n\t\t\t\tsubtree: false,\n\t\t\t})\n\n\t\t\t// Also directly listen for the reset event\n\t\t\tthis.form.addEventListener('reset', () => {\n\t\t\t\tthis.resetToDefault()\n\t\t\t})\n\n\t\t\t// Listen for form submit events to mark field as submitted\n\t\t\tthis.form.addEventListener('submit', () => {\n\t\t\t\tthis.submitted = true\n\t\t\t\t// Validate on form submission\n\t\t\t\tthis.validateInput(true)\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Set up external label association for native HTML label support\n\t */\n\tprivate setupExternalLabelAssociation() {\n\t\tif (this.id) {\n\t\t\tconst setupLabelClickListener = () => {\n\t\t\t\tconst labels = document.querySelectorAll(`label[for=\"${this.id}\"]`)\n\t\t\t\tlabels.forEach(label => {\n\t\t\t\t\tlabel.addEventListener('click', () => {\n\t\t\t\t\t\tthis.focus()\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// Initialize after DOM is ready\n\t\t\tif (document.readyState === 'complete') {\n\t\t\t\tsetupLabelClickListener()\n\t\t\t} else {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', setupLabelClickListener)\n\t\t\t}\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\n\t\t// Clean up the form observer\n\t\tif (this.formResetObserver) {\n\t\t\tthis.formResetObserver.disconnect()\n\t\t}\n\n\t\t// Clean up external label click listeners\n\t\tif (this.id) {\n\t\t\tconst labels = document.querySelectorAll(`label[for=\"${this.id}\"]`)\n\t\t\tlabels.forEach(label => {\n\t\t\t\tlabel.removeEventListener('click', () => {\n\t\t\t\t\tthis.focus()\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Reset the input to its default state\n\t */\n\tprivate resetToDefault() {\n\t\tthis.value = this.defaultValue\n\t\tthis.touched = false\n\t\tthis.dirty = false\n\t\tthis.submitted = false\n\t\tthis.error = false\n\t\tthis.validationMessage = ''\n\t\tthis.dispatchEvent(new CustomEvent('reset', { bubbles: true }))\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this.touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this.dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this.submitted\n\t\t\tdefault:\n\t\t\t\treturn this.touched\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate input based on required, pattern, etc.\n\t * This mimics native validation behavior\n\t */\n\tprivate validateInput(forceValidation = false) {\n\t\t// Skip validation for disabled inputs\n\t\tif (this.disabled) return\n\n\t\t// Only show validation errors if we should based on the validation strategy\n\t\tconst shouldValidate = this.shouldShowValidation(forceValidation)\n\n\t\t// Get validity state from internal input if available\n\t\tconst validity: ValidityState = this.inputElement?.validity ?? {\n\t\t\tbadInput: false,\n\t\t\tcustomError: false,\n\t\t\tpatternMismatch: false,\n\t\t\trangeOverflow: false,\n\t\t\trangeUnderflow: false,\n\t\t\tstepMismatch: false,\n\t\t\ttooLong: false,\n\t\t\ttooShort: false,\n\t\t\ttypeMismatch: false,\n\t\t\tvalid: true,\n\t\t\tvalueMissing: false,\n\t\t}\n\n\t\t// Check if the input has an actual validation error (not a custom error)\n\t\tconst hasError = !validity.valid && !validity.customError\n\n\t\tif (shouldValidate && hasError) {\n\t\t\t// There's an error and we should show it\n\t\t\tthis.error = true\n\t\t\tthis.validationMessage = this.inputElement?.validationMessage || ''\n\t\t} else if (validity.valid) {\n\t\t\t// Input is valid, so clear the error state\n\t\t\tthis.error = false\n\n\t\t\t// Only clear validation message if there's no custom error\n\t\t\tif (!validity.customError) {\n\t\t\t\tthis.validationMessage = ''\n\t\t\t}\n\t\t} else if (!shouldValidate) {\n\t\t\t// We shouldn't show validation yet, so clear visual error state\n\t\t\tthis.error = false\n\t\t}\n\n\t\t// The mixin will handle updating internals based on error state\n\t}\n\n\t/**\n\t * Check validity without showing validation UI\n\t */\n\tpublic override checkValidity() {\n\t\t// Check internal input first\n\t\tconst inputValid = this.inputRef.value?.checkValidity() ?? true\n\n\t\t// Call parent implementation for basic validation\n\t\tconst parentValid = super.checkValidity()\n\n\t\treturn inputValid && parentValid\n\t}\n\n\t/**\n\t * Show validation UI and check validity\n\t */\n\tpublic override reportValidity() {\n\t\t// Mark as touched and submitted to show validation\n\t\tthis.touched = true\n\t\tthis.submitted = true\n\n\t\t// First check using native input\n\t\tconst inputValid = this.inputRef.value?.reportValidity() ?? true\n\n\t\t// Update our component's validation state with force=true\n\t\tthis.validateInput(true)\n\n\t\t// Call parent implementation\n\t\tconst parentValid = super.reportValidity()\n\n\t\treturn inputValid && parentValid\n\t}\n\n\t/**\n\t * Set a custom validation error message\n\t */\n\tpublic override setCustomValidity(message: string) {\n\t\t// Set on the native input\n\t\tif (this.inputRef.value) {\n\t\t\tthis.inputRef.value.setCustomValidity(message)\n\t\t}\n\n\t\t// Call parent implementation\n\t\tsuper.setCustomValidity(message)\n\t\t\n\t\t// Update error state based on validation strategy\n\t\tthis.error = message !== '' && this.shouldShowValidation()\n\t}\n\n\t// ----------------------------\n\t// E) Lifecycle Hooks & Event Handlers\n\t// ----------------------------\n\tfirstUpdated() {\n\t\t// Autofocus if desired\n\t\tif (this.autofocus) {\n\t\t\t// Use setTimeout to match browser behavior - autofocus happens after initial rendering\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.focus()\n\t\t\t}, 0)\n\t\t}\n\n\t\t// Subscribe to input events\n\t\tthis.setupInputEvents()\n\t\tthis.setupFocusBlurEvents()\n\t\tthis.setupAutofillDetection()\n\t\tthis.setupEnterKeyEvents()\n\t}\n\n\t/**\n\t * Set up input event handling for value changes\n\t */\n\tprivate setupInputEvents() {\n\t\tfromEvent<InputEvent>(this.inputElement, 'input')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => {\n\t\t\t\t\t// Capture all input event properties for complete event forwarding\n\t\t\t\t\tconst inputEvent = ev as InputEvent\n\t\t\t\t\tconst target = ev.target as HTMLInputElement\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: target.value,\n\t\t\t\t\t\tinputType: inputEvent.inputType,\n\t\t\t\t\t\tdata: inputEvent.data,\n\t\t\t\t\t\tisComposing: inputEvent.isComposing,\n\t\t\t\t\t\toriginalEvent: ev,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(eventData => {\n\t\t\t\t// Update component value\n\t\t\t\tthis.value = eventData.value\n\n\t\t\t\t// Mark as dirty when user types\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire custom 'input' event with extended details\n\t\t\t\tconst customEvent = new CustomEvent<EventDetails>('input', {\n\t\t\t\t\tdetail: { value: eventData.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add additional properties to match native events more closely\n\t\t\t\tObject.defineProperties(customEvent, {\n\t\t\t\t\tinputType: { value: eventData.inputType },\n\t\t\t\t\tdata: { value: eventData.data },\n\t\t\t\t\tisComposing: { value: eventData.isComposing },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(customEvent)\n\n\t\t\t\t// REMOVED: Duplicate change event dispatch that was here\n\t\t\t\t// Run validation like native inputs do on input, but respect the validation strategy\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\n\t\t// Subscribe to native change events (usually on blur)\n\t\tfromEvent<Event>(this.inputElement, 'change')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire regular change event using mixin helper\n\t\t\t\tthis.emitChange({ value })\n\n\t\t\t\t// Run validation on change like native inputs\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up focus/blur event handling\n\t */\n\tprivate setupFocusBlurEvents() {\n\t\tfromEvent<FocusEvent>(this.inputElement, 'focus')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Create a custom focus event that includes standard props\n\t\t\t\tconst focusEvent = new CustomEvent('focus', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add focus-specific properties\n\t\t\t\tObject.defineProperties(focusEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(focusEvent)\n\t\t\t})\n\n\t\tfromEvent<FocusEvent>(this.inputElement, 'blur')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Mark as touched when field loses focus\n\t\t\t\tthis.touched = true\n\n\t\t\t\t// Run validation on blur like native inputs, respecting validation strategy\n\t\t\t\tif (!this.disabled) {\n\t\t\t\t\tthis.validateInput()\n\t\t\t\t}\n\n\t\t\t\t// Create a custom blur event that includes standard props\n\t\t\t\tconst blurEvent = new CustomEvent('blur', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add blur-specific properties\n\t\t\t\tObject.defineProperties(blurEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(blurEvent)\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up autofill detection\n\t */\n\tprivate setupAutofillDetection() {\n\t\t// Detect autofill animation (Chrome, etc.)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillStart'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.isAutofilled = true\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Dispatch autofill event for integration with autofill systems\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('autofill', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\n\t\t\t\t// Also propagate as a change event like browsers do\n\t\t\t\tthis.emitChange({ value })\n\t\t\t})\n\n\t\t// Detect end of autofill (Chrome)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillCancel'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.isAutofilled = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up enter key event handling\n\t */\n\tprivate setupEnterKeyEvents() {\n\t\t// Listen for Enter on keydown\n\t\tfromEvent<KeyboardEvent>(this.inputElement, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.key === 'Enter'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\t\n\t\t\t\t// Update value if changed\n\t\t\t\tif (this.value !== value) {\n\t\t\t\t\tthis.value = value\n\t\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Blur the input to trigger change event naturally\n\t\t\t\t// This mimics what happens when you tab out of the field\n\t\t\t\tthis.inputElement.blur()\n\n\t\t\t\t// Dispatch enhanced enter event\n\t\t\t\tconst enterEvent = new CustomEvent<EventDetails>('enter', {\n\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add extra keyboard event props\n\t\t\t\tObject.defineProperties(enterEvent, {\n\t\t\t\t\tkey: { value: 'Enter' },\n\t\t\t\t\tcode: { value: 'Enter' },\n\t\t\t\t\tkeyCode: { value: 13 },\n\t\t\t\t\twhich: { value: 13 },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(enterEvent)\n\t\t\t})\n\t}\n\n\t// ----------------------------\n\t// F) Utility Methods\n\t// ----------------------------\n\t/** Selects all text within the input. */\n\tpublic select() {\n\t\treturn this.inputRef.value?.select()\n\t}\n\n\t/** Returns the native validity state of the inner <input>. */\n\tpublic getValidity(): ValidityState | undefined {\n\t\treturn this.inputRef.value?.validity\n\t}\n\n\t/**\n\t * Sets the selection range. Mirrors native input.setSelectionRange\n\t */\n\tpublic setSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none') {\n\t\tthis.inputRef.value?.setSelectionRange(start, end, direction)\n\t}\n\n\t/**\n\t * Returns the selected text within the input (start position)\n\t */\n\tpublic get selectionStart(): number | null {\n\t\treturn this.inputRef.value?.selectionStart ?? null\n\t}\n\n\t/**\n\t * Returns the selected text within the input (end position)\n\t */\n\tpublic get selectionEnd(): number | null {\n\t\treturn this.inputRef.value?.selectionEnd ?? null\n\t}\n\n\t/**\n\t * Returns the direction of selection\n\t */\n\tpublic get selectionDirection(): 'forward' | 'backward' | 'none' | null {\n\t\treturn this.inputRef.value?.selectionDirection ?? null\n\t}\n\n\t/**\n\t * Sets the range of text to be selected.\n\t */\n\tpublic setRangeText(\n\t\treplacement: string,\n\t\tstart?: number,\n\t\tend?: number,\n\t\tselectMode?: 'select' | 'start' | 'end' | 'preserve',\n\t) {\n\t\tif (start !== undefined && end !== undefined) {\n\t\t\tthis.inputRef.value?.setRangeText(replacement, start, end, selectMode)\n\t\t} else {\n\t\t\tthis.inputRef.value?.setRangeText(replacement)\n\t\t}\n\t}\n\n\t/**\n\t * Override to forward focus to the internal <input>.\n\t * Also dispatch a 'focus' event for external listeners.\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t\tthis.dispatchEvent(new Event('focus'))\n\t}\n\n\t/**\n\t * Override to forward clicks to the internal <input>.\n\t * Also dispatch a 'click' event for external listeners.\n\t */\n\tpublic override click() {\n\t\tthis.inputRef.value?.click()\n\t\tthis.dispatchEvent(new Event('click'))\n\t}\n\n\t/** Forward blur to the internal <input>. */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t\tthis.dispatchEvent(new Event('blur'))\n\t}\n\n\t// ----------------------------\n\t// G) Rendering\n\t// ----------------------------\n\tprotected override render() {\n\t\t// Determine height and padding based on size\n\t\tconst getHeightAndPadding = () => {\n\t\t\tswitch (this.size) {\n\t\t\t\tcase 'sm':\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '40px',\n\t\t\t\t\t\tpadding: '0 8px',\n\t\t\t\t\t\tfontSize: '0.875rem', // 14px\n\t\t\t\t\t}\n\t\t\t\tcase 'lg':\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '60px',\n\t\t\t\t\t\tpadding: '0 20px',\n\t\t\t\t\t\tfontSize: '1.125rem', // 18px\n\t\t\t\t\t}\n\t\t\t\tcase 'md':\n\t\t\t\tdefault:\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '50px',\n\t\t\t\t\t\tpadding: '0 16px',\n\t\t\t\t\t\tfontSize: '1rem', // 16px\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst { height, padding, fontSize } = getHeightAndPadding()\n\n\t\t// Check if it's a date-type input\n\t\tconst isDateType = ['date', 'datetime-local', 'time', 'month', 'week'].includes(this.type)\n\n\t\tconst inputClasses = {\n\t\t\t// Base styles\n\t\t\t'block w-full min-w-0 rounded-[8px] border-0 bg-surface-highest text-surface-on': true,\n\t\t\t// Focus styles\n\t\t\t'outline-secondary-default focus:outline-1': true,\n\t\t\t// Disabled styles\n\t\t\t'disabled:opacity-40 disabled:cursor-not-allowed': true,\n\t\t\t// Placeholder\n\t\t\t'placeholder:text-muted': true,\n\t\t\t// Ring styles\n\t\t\t'ring-0 ring-inset focus:ring-1 focus:ring-inset': true,\n\t\t\t// Ring colors based on error state\n\t\t\t'ring-secondary-default ring-outline focus:ring-secondary-default': !this.error,\n\t\t\t'ring-error-default focus:ring-error-default': this.error,\n\t\t\t// Readonly styles\n\t\t\t'caret-transparent focus:outline-hidden cursor-pointer select-none': this.readonly,\n\t\t\t'cursor-pointer': this.clickable,\n\t\t\t// Text alignment (date inputs always left-aligned)\n\t\t\t'text-left': this.align === 'left' || isDateType,\n\t\t\t'text-center': this.align === 'center' && !isDateType,\n\t\t\t'text-right': this.align === 'right' && !isDateType,\n\t\t\t// Autofill\n\t\t\tautofilled: this.isAutofilled,\n\t\t}\n\n\t\tconst labelClasses = {\n\t\t\t'block mb-1 font-medium': true,\n\t\t\t'opacity-40': this.disabled,\n\t\t\t'text-sm': this.size === 'sm',\n\t\t\t'text-base': this.size === 'md',\n\t\t\t'text-lg': this.size === 'lg',\n\t\t\t'text-primary-default': !this.error,\n\t\t\t'text-error-default': this.error,\n\t\t}\n\n\t\tconst styles = {\n\t\t\theight,\n\t\t\tpadding,\n\t\t\tfontSize,\n\t\t\t// Ensure vertical centering for all input types\n\t\t\tlineHeight: height,\n\t\t}\n\n\t\t/**\n\t\t * - If `this.label` is present, we render a proper `<label for=\"${this.id}\">`.\n\t\t * - If not, we add an aria-label to the <input> for better accessibility.\n\t\t * - If there's a `hint`, we reference it via aria-describedby.\n\t\t * - If there's an error, we set aria-invalid and could set aria-errormessage.\n\t\t */\n\t\treturn html`\n\t\t\t<div class=\"w-full min-w-0 ${isDateType ? 'date-input-container' : ''}\">\n\t\t\t\t${when(\n\t\t\t\t\tthis.label,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tfor=${this.id}\n\t\t\t\t\t\t\tclass=${this.classMap(labelClasses)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.label}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\n\t\t\t\t<input\n\t\t\t\t\t${ref(this.inputRef)}\n\t\t\t\t\tid=${this.id}\n\t\t\t\t\tname=${this.name}\n\t\t\t\t\tclass=${this.classMap(inputClasses)}\n\t\t\t\t\tstyle=${this.styleMap(styles)}\n\t\t\t\t\t.value=${this.value}\n\t\t\t\t\t.type=${this.type}\n\t\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t\t.spellcheck=${this.spellcheck}\n\t\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\t\tinputmode=${ifDefined(this.inputmode)}\n\t\t\t\t\tpattern=${ifDefined(this.pattern)}\n\t\t\t\t\tstep=${ifDefined(this.step)}\n\t\t\t\t\tminlength=${ifDefined(this.minlength)}\n\t\t\t\t\tmaxlength=${ifDefined(this.maxlength)}\n\t\t\t\t\tmin=${ifDefined(this.min)}\n\t\t\t\t\tmax=${ifDefined(this.max)}\n\t\t\t\t\tlist=${ifDefined(this.list)}\n\t\t\t\t\t?required=${this.required}\n\t\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t\t?readonly=${this.readonly}\n\t\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\t\taria-required=${this.required ? 'true' : 'false'}\n\t\t\t\t\taria-labelledby=${this.label ? `label-${this.id}` : nothing}\n\t\t\t\t\taria-describedby=${this.hint || this.validationMessage ? `hint-${this.id}` : nothing}\n\t\t\t\t\taria-label=${ifDefined(!this.label ? this.placeholder || 'Input' : undefined)}\n\t\t\t\t/>\n\n\t\t\t\t${when(\n\t\t\t\t\tthis.hint || (this.error && this.validationMessage),\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid=\"hint-${this.id}\"\n\t\t\t\t\t\t\tclass=\"mt-1 text-sm ${this.error ? 'text-error-default' : 'text-surface-onVariant'}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.error && this.validationMessage ? this.validationMessage : this.hint}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\n// Register the component with the legacy tag name for backward compatibility\n@customElement('sch-input')\nexport class SchmancyInputCompat extends SchmancyInput {}\n"],"names":["SchmancyInput","SchmancyFormField","constructor","super","arguments","this","value","type","placeholder","clickable","spellcheck","align","autofocus","autocomplete","tabIndex","size","validateOn","inputRef","createRef","isAutofilled","touched","dirty","submitted","defaultValue","changedProps","id","_idCounter","willUpdate","updated","has","validateInput","hasUpdated","connectedCallback","setupFormIntegration","setupExternalLabelAssociation","form","formResetObserver","MutationObserver","mutations","mutation","attributeName","resetToDefault","observe","attributes","childList","subtree","addEventListener","setupLabelClickListener","document","querySelectorAll","forEach","label","focus","readyState","disconnectedCallback","disconnect","removeEventListener","error","validationMessage","dispatchEvent","CustomEvent","bubbles","forceValidation","disabled","shouldValidate","shouldShowValidation","validity","inputElement","customError","valid","hasError","checkValidity","inputValid","parentValid","reportValidity","message","setCustomValidity","firstUpdated","setTimeout","setupInputEvents","setupFocusBlurEvents","setupAutofillDetection","setupEnterKeyEvents","fromEvent","pipe","map","ev","inputEvent","target","inputType","data","isComposing","originalEvent","takeUntil","disconnecting","subscribe","eventData","customEvent","detail","composed","Object","defineProperties","distinctUntilChanged","emitChange","focusEvent","cancelable","relatedTarget","blurEvent","filter","animationName","key","blur","enterEvent","code","keyCode","which","select","getValidity","start","end","direction","setSelectionRange","selectionStart","selectionEnd","selectionDirection","replacement","selectMode","setRangeText","options","Event","click","render","height","padding","fontSize","getHeightAndPadding","isDateType","includes","inputClasses","readonly","autofilled","labelClasses","styles","lineHeight","html","when","classMap","ref","name","styleMap","ifDefined","inputmode","pattern","step","minlength","maxlength","min","max","list","required","nothing","hint","shadowRootOptions","LitElement","delegatesFocus","__decorateClass","property","String","reflect","prototype","Boolean","Number","query","state","customElement","SchmancyInputCompat"],"mappings":";;;;;;;;;;;;;;AAkDA,IAAqBA,IAArB,cAA2C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AA,GAvIYzK,IAArBqK,EAAA,CADCS,EAAc,gBAAA,CAAA,GACM9K,CAAAA;AA+0Bd,IAAM+K,IAAN,cAAkC/K,EAAAA;AAAAA;AAA5B+K,IAANV,EAAA,CADNS,EAAc,WAAA,CAAA,GACFC;"}
|
|
1
|
+
{"version":3,"file":"input-Cpo-ws8k.js","sources":["../src/input/input.ts"],"sourcesContent":["import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { distinctUntilChanged, filter, fromEvent, map, takeUntil } from 'rxjs'\n\nimport { SchmancyFormField } from '@mixins/index'\n\n// Import styles\nimport style from './input.scss?inline'\n\n// If you want to be form-associated, define the type on `ElementInternals`.\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-input': SchmancyInput\n\t\t'sch-input': SchmancyInput\n\t}\n}\n\ntype EventDetails = {\n\tvalue: string\n}\n\n/**\n * Custom events the component may emit:\n * - 'input': on every keystroke\n * - 'change': on native blur/change\n * - 'enter': specifically when user presses Enter\n */\nexport type SchmancyInputInputEvent = CustomEvent<EventDetails>\nexport type SchmancyInputChangeEvent = CustomEvent<EventDetails>\nexport type SchmancyInputEnterEvent = CustomEvent<EventDetails>\n\n/**\n * Size variants for the input.\n * - sm: Small, compact input (40px height)\n * - md: Medium input (50px height, default)\n * - lg: Large, spacious input (60px height)\n */\nexport type InputSize = 'sm' | 'md' | 'lg'\n\n/**\n * Enhanced version of the SchmancyInput component with improved form integration\n * and compatibility with legacy API.\n *\n * This component uses the native form association API and maintains parity with\n * native input behaviors while providing a stylish, accessible interface.\n * \n * @prop {string} label - Label text for the form field (inherited from FormFieldMixin)\n * @prop {boolean} required - Whether the field is required (inherited from FormFieldMixin)\n * @prop {boolean} disabled - Whether the field is disabled (inherited from FormFieldMixin)\n * @prop {boolean} readonly - Whether the field is read-only (inherited from FormFieldMixin)\n * @prop {boolean} error - Whether the field is in an error state (inherited from FormFieldMixin)\n * @prop {string} validationMessage - The validation message to display (inherited from FormFieldMixin)\n * @prop {string} hint - Optional hint text to display below the field (inherited from FormFieldMixin)\n */\n@customElement('schmancy-input')\nexport default class SchmancyInput extends SchmancyFormField(style) {\n\t// ----------------------------\n\t// A) Public properties\n\t// ----------------------------\n\n\t/** Auto-incrementing counter for generating unique IDs */\n\tstatic _idCounter = 0\n\n\t/** Override value to be string only for input element */\n\t@property({ type: String, reflect: true })\n\tpublic override value = ''\n\n\n\t/**\n\t * The type of input. (e.g. 'text', 'password', 'email', etc.)\n\t */\n\t@property({ reflect: true })\n\tpublic type: HTMLInputElement['type'] = 'text'\n\n\n\t@property()\n\tpublic placeholder = ''\n\n\n\t/** Pattern validation attribute. */\n\t@property({ type: String, reflect: true })\n\tpublic pattern?: string\n\n\n\t/** If true, we visually show a pointer cursor even if readOnly. */\n\t@property({ type: Boolean, reflect: true }) public clickable = false\n\n\t/** Whether browser spellcheck is enabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic spellcheck = false\n\n\t/**\n\t * Text alignment within the input.\n\t * - 'left' | 'center' | 'right'\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic align: 'left' | 'center' | 'right' = 'left'\n\n\t/** inputmode attribute (affects on-screen keyboards in mobile). */\n\t@property()\n\tpublic inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'\n\n\t@property({ type: Number, reflect: true })\n\tpublic minlength?: number\n\n\t@property({ type: Number })\n\tpublic maxlength?: number\n\n\t@property()\n\tpublic min?: string\n\n\t@property()\n\tpublic max?: string\n\n\t@property({ type: Number, reflect: true })\n\tpublic step?: number\n\n\t/** If true, auto-focus this input on first render. */\n\t@property({ type: Boolean })\n\tpublic autofocus = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t/**\n\t * tabIndex for focusing by tab key. Typically 0 or -1.\n\t */\n\t@property({ type: Number, reflect: true })\n\tpublic override tabIndex = 0\n\n\n\t/**\n\t * The size of the input.\n\t * - 'sm': Small, compact size\n\t * - 'md': Medium size (default)\n\t * - 'lg': Large size\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic size: InputSize = 'md'\n\n\t/**\n\t * Controls when validation should show.\n\t * - 'always' - Always show validation\n\t * - 'touched' - Only show after field has been focused and then blurred\n\t * - 'dirty' - Only show after value has changed\n\t * - 'submitted' - Only show after form submission\n\t */\n\t@property({ type: String })\n\tpublic validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\n\t/**\n\t * For datalist support\n\t */\n\t@property({ type: String })\n\tpublic list?: string\n\n\n\t// ----------------------------\n\t// B) Queries & Refs\n\t// ----------------------------\n\t@query('input') private inputElement!: HTMLInputElement\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t// ----------------------------\n\t// C) Internal States\n\t// ----------------------------\n\n\t/**\n\t * For integration with browser's autofill support\n\t */\n\t@state()\n\tprivate isAutofilled = false\n\n\t/**\n\t * Track user interaction state for validation\n\t */\n\t@state()\n\tprivate touched = false\n\n\t@state()\n\tprivate dirty = false\n\n\t@state()\n\tprivate submitted = false\n\n\t/**\n\t * Store the default value for reset behavior\n\t */\n\t@state()\n\tprivate defaultValue = ''\n\n\t// ----------------------------\n\t// D) Form-associated logic\n\t// ----------------------------\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true, // so focus() goes to <input>\n\t}\n\n\tprivate formResetObserver?: MutationObserver\n\n\t/**\n\t * If user did not provide an ID, auto-generate one so <label for=\"...\">\n\t * and various aria-* attributes can reference it.\n\t */\n\tprotected override willUpdate(changedProps: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (!this.id) {\n\t\t\tthis.id = `sch-input-${SchmancyInput._idCounter++}`\n\t\t}\n\t\tsuper.willUpdate(changedProps)\n\t}\n\n\n\tprotected override updated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\n\t\t// Handle value changes\n\t\tif (changedProps.has('value')) {\n\t\t\t// If value changes from original default, mark as dirty\n\t\t\tif (this.value !== this.defaultValue) {\n\t\t\t\tthis.dirty = true\n\t\t\t}\n\n\t\t\t// Update validation state when value changes\n\t\t\tthis.validateInput()\n\t\t}\n\n\t\t// Store default value if this is the first update\n\t\tif (!this.hasUpdated && changedProps.has('value')) {\n\t\t\tthis.defaultValue = this.value\n\t\t}\n\t}\n\n\t/**\n\t * Connect to the closest form element and set up form integration\n\t */\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Store initial default value for form reset\n\t\tthis.defaultValue = this.value\n\n\t\t// Set up form integration\n\t\tthis.setupFormIntegration()\n\n\t\t// Setup for external label association\n\t\tthis.setupExternalLabelAssociation()\n\t}\n\n\t/**\n\t * Set up form integration with ElementInternals\n\t */\n\tprivate setupFormIntegration() {\n\t\tif (this.form) {\n\t\t\t// Listen for form reset events\n\t\t\tthis.formResetObserver = new MutationObserver(mutations => {\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'attributes' && mutation.attributeName === 'reset') {\n\t\t\t\t\t\tthis.resetToDefault()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// Observe the form for reset events\n\t\t\tthis.formResetObserver.observe(this.form, {\n\t\t\t\tattributes: true,\n\t\t\t\tchildList: false,\n\t\t\t\tsubtree: false,\n\t\t\t})\n\n\t\t\t// Also directly listen for the reset event\n\t\t\tthis.form.addEventListener('reset', () => {\n\t\t\t\tthis.resetToDefault()\n\t\t\t})\n\n\t\t\t// Listen for form submit events to mark field as submitted\n\t\t\tthis.form.addEventListener('submit', () => {\n\t\t\t\tthis.submitted = true\n\t\t\t\t// Validate on form submission\n\t\t\t\tthis.validateInput(true)\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Set up external label association for native HTML label support\n\t */\n\tprivate setupExternalLabelAssociation() {\n\t\tif (this.id) {\n\t\t\tconst setupLabelClickListener = () => {\n\t\t\t\tconst labels = document.querySelectorAll(`label[for=\"${this.id}\"]`)\n\t\t\t\tlabels.forEach(label => {\n\t\t\t\t\tlabel.addEventListener('click', () => {\n\t\t\t\t\t\tthis.focus()\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// Initialize after DOM is ready\n\t\t\tif (document.readyState === 'complete') {\n\t\t\t\tsetupLabelClickListener()\n\t\t\t} else {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', setupLabelClickListener)\n\t\t\t}\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\n\t\t// Clean up the form observer\n\t\tif (this.formResetObserver) {\n\t\t\tthis.formResetObserver.disconnect()\n\t\t}\n\n\t\t// Clean up external label click listeners\n\t\tif (this.id) {\n\t\t\tconst labels = document.querySelectorAll(`label[for=\"${this.id}\"]`)\n\t\t\tlabels.forEach(label => {\n\t\t\t\tlabel.removeEventListener('click', () => {\n\t\t\t\t\tthis.focus()\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Reset the input to its default state\n\t */\n\tprivate resetToDefault() {\n\t\tthis.value = this.defaultValue\n\t\tthis.touched = false\n\t\tthis.dirty = false\n\t\tthis.submitted = false\n\t\tthis.error = false\n\t\tthis.validationMessage = ''\n\t\tthis.dispatchEvent(new CustomEvent('reset', { bubbles: true }))\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this.touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this.dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this.submitted\n\t\t\tdefault:\n\t\t\t\treturn this.touched\n\t\t}\n\t}\n\n\n\t/**\n\t * Validate input based on required, pattern, etc.\n\t * This mimics native validation behavior\n\t */\n\tprivate validateInput(forceValidation = false) {\n\t\t// Skip validation for disabled inputs\n\t\tif (this.disabled) return\n\n\t\t// Only show validation errors if we should based on the validation strategy\n\t\tconst shouldValidate = this.shouldShowValidation(forceValidation)\n\n\t\t// Get validity state from internal input if available\n\t\tconst validity: ValidityState = this.inputElement?.validity ?? {\n\t\t\tbadInput: false,\n\t\t\tcustomError: false,\n\t\t\tpatternMismatch: false,\n\t\t\trangeOverflow: false,\n\t\t\trangeUnderflow: false,\n\t\t\tstepMismatch: false,\n\t\t\ttooLong: false,\n\t\t\ttooShort: false,\n\t\t\ttypeMismatch: false,\n\t\t\tvalid: true,\n\t\t\tvalueMissing: false,\n\t\t}\n\n\t\t// Check if the input has an actual validation error (not a custom error)\n\t\tconst hasError = !validity.valid && !validity.customError\n\n\t\tif (shouldValidate && hasError) {\n\t\t\t// There's an error and we should show it\n\t\t\tthis.error = true\n\t\t\tthis.validationMessage = this.inputElement?.validationMessage || ''\n\t\t} else if (validity.valid) {\n\t\t\t// Input is valid, so clear the error state\n\t\t\tthis.error = false\n\n\t\t\t// Only clear validation message if there's no custom error\n\t\t\tif (!validity.customError) {\n\t\t\t\tthis.validationMessage = ''\n\t\t\t}\n\t\t} else if (!shouldValidate) {\n\t\t\t// We shouldn't show validation yet, so clear visual error state\n\t\t\tthis.error = false\n\t\t}\n\n\t\t// The mixin will handle updating internals based on error state\n\t}\n\n\t/**\n\t * Check validity without showing validation UI\n\t */\n\tpublic override checkValidity() {\n\t\t// Check internal input first\n\t\tconst inputValid = this.inputRef.value?.checkValidity() ?? true\n\n\t\t// Call parent implementation for basic validation\n\t\tconst parentValid = super.checkValidity()\n\n\t\treturn inputValid && parentValid\n\t}\n\n\t/**\n\t * Show validation UI and check validity\n\t */\n\tpublic override reportValidity() {\n\t\t// Mark as touched and submitted to show validation\n\t\tthis.touched = true\n\t\tthis.submitted = true\n\n\t\t// First check using native input\n\t\tconst inputValid = this.inputRef.value?.reportValidity() ?? true\n\n\t\t// Update our component's validation state with force=true\n\t\tthis.validateInput(true)\n\n\t\t// Call parent implementation\n\t\tconst parentValid = super.reportValidity()\n\n\t\treturn inputValid && parentValid\n\t}\n\n\t/**\n\t * Set a custom validation error message\n\t */\n\tpublic override setCustomValidity(message: string) {\n\t\t// Set on the native input\n\t\tif (this.inputRef.value) {\n\t\t\tthis.inputRef.value.setCustomValidity(message)\n\t\t}\n\n\t\t// Call parent implementation\n\t\tsuper.setCustomValidity(message)\n\t\t\n\t\t// Update error state based on validation strategy\n\t\tthis.error = message !== '' && this.shouldShowValidation()\n\t}\n\n\t// ----------------------------\n\t// E) Lifecycle Hooks & Event Handlers\n\t// ----------------------------\n\tfirstUpdated() {\n\t\t// Autofocus if desired\n\t\tif (this.autofocus) {\n\t\t\t// Use setTimeout to match browser behavior - autofocus happens after initial rendering\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.focus()\n\t\t\t}, 0)\n\t\t}\n\n\t\t// Subscribe to input events\n\t\tthis.setupInputEvents()\n\t\tthis.setupFocusBlurEvents()\n\t\tthis.setupAutofillDetection()\n\t\tthis.setupEnterKeyEvents()\n\t}\n\n\t/**\n\t * Set up input event handling for value changes\n\t */\n\tprivate setupInputEvents() {\n\t\tfromEvent<InputEvent>(this.inputElement, 'input')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => {\n\t\t\t\t\t// Capture all input event properties for complete event forwarding\n\t\t\t\t\tconst inputEvent = ev as InputEvent\n\t\t\t\t\tconst target = ev.target as HTMLInputElement\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: target.value,\n\t\t\t\t\t\tinputType: inputEvent.inputType,\n\t\t\t\t\t\tdata: inputEvent.data,\n\t\t\t\t\t\tisComposing: inputEvent.isComposing,\n\t\t\t\t\t\toriginalEvent: ev,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(eventData => {\n\t\t\t\t// Update component value\n\t\t\t\tthis.value = eventData.value\n\n\t\t\t\t// Mark as dirty when user types\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire custom 'input' event with extended details\n\t\t\t\tconst customEvent = new CustomEvent<EventDetails>('input', {\n\t\t\t\t\tdetail: { value: eventData.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add additional properties to match native events more closely\n\t\t\t\tObject.defineProperties(customEvent, {\n\t\t\t\t\tinputType: { value: eventData.inputType },\n\t\t\t\t\tdata: { value: eventData.data },\n\t\t\t\t\tisComposing: { value: eventData.isComposing },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(customEvent)\n\n\t\t\t\t// REMOVED: Duplicate change event dispatch that was here\n\t\t\t\t// Run validation like native inputs do on input, but respect the validation strategy\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\n\t\t// Subscribe to native change events (usually on blur)\n\t\tfromEvent<Event>(this.inputElement, 'change')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire regular change event using mixin helper\n\t\t\t\tthis.emitChange({ value })\n\n\t\t\t\t// Run validation on change like native inputs\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up focus/blur event handling\n\t */\n\tprivate setupFocusBlurEvents() {\n\t\tfromEvent<FocusEvent>(this.inputElement, 'focus')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Create a custom focus event that includes standard props\n\t\t\t\tconst focusEvent = new CustomEvent('focus', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add focus-specific properties\n\t\t\t\tObject.defineProperties(focusEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(focusEvent)\n\t\t\t})\n\n\t\tfromEvent<FocusEvent>(this.inputElement, 'blur')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Mark as touched when field loses focus\n\t\t\t\tthis.touched = true\n\n\t\t\t\t// Run validation on blur like native inputs, respecting validation strategy\n\t\t\t\tif (!this.disabled) {\n\t\t\t\t\tthis.validateInput()\n\t\t\t\t}\n\n\t\t\t\t// Create a custom blur event that includes standard props\n\t\t\t\tconst blurEvent = new CustomEvent('blur', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add blur-specific properties\n\t\t\t\tObject.defineProperties(blurEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(blurEvent)\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up autofill detection\n\t */\n\tprivate setupAutofillDetection() {\n\t\t// Detect autofill animation (Chrome, etc.)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillStart'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.isAutofilled = true\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Dispatch autofill event for integration with autofill systems\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('autofill', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\n\t\t\t\t// Also propagate as a change event like browsers do\n\t\t\t\tthis.emitChange({ value })\n\t\t\t})\n\n\t\t// Detect end of autofill (Chrome)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillCancel'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.isAutofilled = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up enter key event handling\n\t */\n\tprivate setupEnterKeyEvents() {\n\t\t// Listen for Enter on keydown\n\t\tfromEvent<KeyboardEvent>(this.inputElement, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.key === 'Enter'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\t\n\t\t\t\t// Update value if changed\n\t\t\t\tif (this.value !== value) {\n\t\t\t\t\tthis.value = value\n\t\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Blur the input to trigger change event naturally\n\t\t\t\t// This mimics what happens when you tab out of the field\n\t\t\t\tthis.inputElement.blur()\n\n\t\t\t\t// Dispatch enhanced enter event\n\t\t\t\tconst enterEvent = new CustomEvent<EventDetails>('enter', {\n\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add extra keyboard event props\n\t\t\t\tObject.defineProperties(enterEvent, {\n\t\t\t\t\tkey: { value: 'Enter' },\n\t\t\t\t\tcode: { value: 'Enter' },\n\t\t\t\t\tkeyCode: { value: 13 },\n\t\t\t\t\twhich: { value: 13 },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(enterEvent)\n\t\t\t})\n\t}\n\n\t// ----------------------------\n\t// F) Utility Methods\n\t// ----------------------------\n\t/** Selects all text within the input. */\n\tpublic select() {\n\t\treturn this.inputRef.value?.select()\n\t}\n\n\t/** Returns the native validity state of the inner <input>. */\n\tpublic getValidity(): ValidityState | undefined {\n\t\treturn this.inputRef.value?.validity\n\t}\n\n\t/**\n\t * Sets the selection range. Mirrors native input.setSelectionRange\n\t */\n\tpublic setSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none') {\n\t\tthis.inputRef.value?.setSelectionRange(start, end, direction)\n\t}\n\n\t/**\n\t * Returns the selected text within the input (start position)\n\t */\n\tpublic get selectionStart(): number | null {\n\t\treturn this.inputRef.value?.selectionStart ?? null\n\t}\n\n\t/**\n\t * Returns the selected text within the input (end position)\n\t */\n\tpublic get selectionEnd(): number | null {\n\t\treturn this.inputRef.value?.selectionEnd ?? null\n\t}\n\n\t/**\n\t * Returns the direction of selection\n\t */\n\tpublic get selectionDirection(): 'forward' | 'backward' | 'none' | null {\n\t\treturn this.inputRef.value?.selectionDirection ?? null\n\t}\n\n\t/**\n\t * Sets the range of text to be selected.\n\t */\n\tpublic setRangeText(\n\t\treplacement: string,\n\t\tstart?: number,\n\t\tend?: number,\n\t\tselectMode?: 'select' | 'start' | 'end' | 'preserve',\n\t) {\n\t\tif (start !== undefined && end !== undefined) {\n\t\t\tthis.inputRef.value?.setRangeText(replacement, start, end, selectMode)\n\t\t} else {\n\t\t\tthis.inputRef.value?.setRangeText(replacement)\n\t\t}\n\t}\n\n\t/**\n\t * Override to forward focus to the internal <input>.\n\t * Also dispatch a 'focus' event for external listeners.\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t\tthis.dispatchEvent(new Event('focus'))\n\t}\n\n\t/**\n\t * Override to forward clicks to the internal <input>.\n\t * Also dispatch a 'click' event for external listeners.\n\t */\n\tpublic override click() {\n\t\tthis.inputRef.value?.click()\n\t\tthis.dispatchEvent(new Event('click'))\n\t}\n\n\t/** Forward blur to the internal <input>. */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t\tthis.dispatchEvent(new Event('blur'))\n\t}\n\n\t// ----------------------------\n\t// G) Rendering\n\t// ----------------------------\n\tprotected override render() {\n\t\t// Determine height and padding based on size\n\t\tconst getHeightAndPadding = () => {\n\t\t\tswitch (this.size) {\n\t\t\t\tcase 'sm':\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '40px',\n\t\t\t\t\t\tpadding: '0 8px',\n\t\t\t\t\t\tfontSize: '0.875rem', // 14px\n\t\t\t\t\t}\n\t\t\t\tcase 'lg':\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '60px',\n\t\t\t\t\t\tpadding: '0 20px',\n\t\t\t\t\t\tfontSize: '1.125rem', // 18px\n\t\t\t\t\t}\n\t\t\t\tcase 'md':\n\t\t\t\tdefault:\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '50px',\n\t\t\t\t\t\tpadding: '0 16px',\n\t\t\t\t\t\tfontSize: '1rem', // 16px\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst { height, padding, fontSize } = getHeightAndPadding()\n\n\t\t// Check if it's a date-type input\n\t\tconst isDateType = ['date', 'datetime-local', 'time', 'month', 'week'].includes(this.type)\n\n\t\tconst inputClasses = {\n\t\t\t// Base styles\n\t\t\t'block w-full min-w-0 rounded-[8px] border-0 bg-surface-highest text-surface-on': true,\n\t\t\t// Focus styles\n\t\t\t'outline-secondary-default focus:outline-1': true,\n\t\t\t// Disabled styles\n\t\t\t'disabled:opacity-40 disabled:cursor-not-allowed': true,\n\t\t\t// Placeholder\n\t\t\t'placeholder:text-muted': true,\n\t\t\t// Ring styles\n\t\t\t'ring-0 ring-inset focus:ring-1 focus:ring-inset': true,\n\t\t\t// Ring colors based on error state\n\t\t\t'ring-secondary-default ring-outline focus:ring-secondary-default': !this.error,\n\t\t\t'ring-error-default focus:ring-error-default': this.error,\n\t\t\t// Readonly styles\n\t\t\t'caret-transparent focus:outline-hidden cursor-pointer select-none': this.readonly,\n\t\t\t'cursor-pointer': this.clickable,\n\t\t\t// Text alignment (date inputs always left-aligned)\n\t\t\t'text-left': this.align === 'left' || isDateType,\n\t\t\t'text-center': this.align === 'center' && !isDateType,\n\t\t\t'text-right': this.align === 'right' && !isDateType,\n\t\t\t// Autofill\n\t\t\tautofilled: this.isAutofilled,\n\t\t}\n\n\t\tconst labelClasses = {\n\t\t\t'block mb-1 font-medium': true,\n\t\t\t'opacity-40': this.disabled,\n\t\t\t'text-sm': this.size === 'sm',\n\t\t\t'text-base': this.size === 'md',\n\t\t\t'text-lg': this.size === 'lg',\n\t\t\t'text-primary-default': !this.error,\n\t\t\t'text-error-default': this.error,\n\t\t}\n\n\t\tconst styles = {\n\t\t\theight,\n\t\t\tpadding,\n\t\t\tfontSize,\n\t\t\t// Ensure vertical centering for all input types\n\t\t\tlineHeight: height,\n\t\t}\n\n\t\t/**\n\t\t * - If `this.label` is present, we render a proper `<label for=\"${this.id}\">`.\n\t\t * - If not, we add an aria-label to the <input> for better accessibility.\n\t\t * - If there's a `hint`, we reference it via aria-describedby.\n\t\t * - If there's an error, we set aria-invalid and could set aria-errormessage.\n\t\t */\n\t\treturn html`\n\t\t\t<div class=\"w-full min-w-0 ${isDateType ? 'date-input-container' : ''}\">\n\t\t\t\t${when(\n\t\t\t\t\tthis.label,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tfor=${this.id}\n\t\t\t\t\t\t\tclass=${this.classMap(labelClasses)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.label}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\n\t\t\t\t<input\n\t\t\t\t\t${ref(this.inputRef)}\n\t\t\t\t\tid=${this.id}\n\t\t\t\t\tname=${this.name}\n\t\t\t\t\tclass=${this.classMap(inputClasses)}\n\t\t\t\t\tstyle=${this.styleMap(styles)}\n\t\t\t\t\t.value=${this.value}\n\t\t\t\t\t.type=${this.type}\n\t\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t\t.spellcheck=${this.spellcheck}\n\t\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\t\tinputmode=${ifDefined(this.inputmode)}\n\t\t\t\t\tpattern=${ifDefined(this.pattern)}\n\t\t\t\t\tstep=${ifDefined(this.step)}\n\t\t\t\t\tminlength=${ifDefined(this.minlength)}\n\t\t\t\t\tmaxlength=${ifDefined(this.maxlength)}\n\t\t\t\t\tmin=${ifDefined(this.min)}\n\t\t\t\t\tmax=${ifDefined(this.max)}\n\t\t\t\t\tlist=${ifDefined(this.list)}\n\t\t\t\t\t?required=${this.required}\n\t\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t\t?readonly=${this.readonly}\n\t\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\t\taria-required=${this.required ? 'true' : 'false'}\n\t\t\t\t\taria-labelledby=${this.label ? `label-${this.id}` : nothing}\n\t\t\t\t\taria-describedby=${this.hint || this.validationMessage ? `hint-${this.id}` : nothing}\n\t\t\t\t\taria-label=${ifDefined(!this.label ? this.placeholder || 'Input' : undefined)}\n\t\t\t\t/>\n\n\t\t\t\t${when(\n\t\t\t\t\tthis.hint || (this.error && this.validationMessage),\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid=\"hint-${this.id}\"\n\t\t\t\t\t\t\tclass=\"mt-1 text-sm ${this.error ? 'text-error-default' : 'text-surface-onVariant'}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.error && this.validationMessage ? this.validationMessage : this.hint}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\n/**\n * Register the component with the legacy tag name for backward compatibility\n * @prop {string} label - Label text for the form field (inherited from FormFieldMixin)\n * @prop {boolean} required - Whether the field is required (inherited from FormFieldMixin)\n * @prop {boolean} disabled - Whether the field is disabled (inherited from FormFieldMixin)\n * @prop {boolean} readonly - Whether the field is read-only (inherited from FormFieldMixin)\n * @prop {boolean} error - Whether the field is in an error state (inherited from FormFieldMixin)\n * @prop {string} validationMessage - The validation message to display (inherited from FormFieldMixin)\n * @prop {string} hint - Optional hint text to display below the field (inherited from FormFieldMixin)\n */\n@customElement('sch-input')\nexport class SchmancyInputCompat extends SchmancyInput {}\n"],"names":["SchmancyInput","SchmancyFormField","constructor","super","arguments","this","value","type","placeholder","clickable","spellcheck","align","autofocus","autocomplete","tabIndex","size","validateOn","inputRef","createRef","isAutofilled","touched","dirty","submitted","defaultValue","changedProps","id","_idCounter","willUpdate","updated","has","validateInput","hasUpdated","connectedCallback","setupFormIntegration","setupExternalLabelAssociation","form","formResetObserver","MutationObserver","mutations","mutation","attributeName","resetToDefault","observe","attributes","childList","subtree","addEventListener","setupLabelClickListener","document","querySelectorAll","forEach","label","focus","readyState","disconnectedCallback","disconnect","removeEventListener","error","validationMessage","dispatchEvent","CustomEvent","bubbles","forceValidation","disabled","shouldValidate","shouldShowValidation","validity","inputElement","customError","valid","hasError","checkValidity","inputValid","parentValid","reportValidity","message","setCustomValidity","firstUpdated","setTimeout","setupInputEvents","setupFocusBlurEvents","setupAutofillDetection","setupEnterKeyEvents","fromEvent","pipe","map","ev","inputEvent","target","inputType","data","isComposing","originalEvent","takeUntil","disconnecting","subscribe","eventData","customEvent","detail","composed","Object","defineProperties","distinctUntilChanged","emitChange","focusEvent","cancelable","relatedTarget","blurEvent","filter","animationName","key","blur","enterEvent","code","keyCode","which","select","getValidity","start","end","direction","setSelectionRange","selectionStart","selectionEnd","selectionDirection","replacement","selectMode","setRangeText","options","Event","click","render","height","padding","fontSize","getHeightAndPadding","isDateType","includes","inputClasses","readonly","autofilled","labelClasses","styles","lineHeight","html","when","classMap","ref","name","styleMap","ifDefined","inputmode","pattern","step","minlength","maxlength","min","max","list","required","nothing","hint","shadowRootOptions","LitElement","delegatesFocus","__decorateClass","property","String","reflect","prototype","Boolean","Number","query","state","customElement","SchmancyInputCompat"],"mappings":";;;;;;;;;;;;;;AA0DA,IAAqBA,IAArB,cAA2CC;EAA3C,cAAAC;AAAAC,UAAAA,GAAAC,SAAAA,GAUCC,KAAgBC,QAAQ,IAOxBD,KAAOE,OAAiC,QAIxCF,KAAOG,cAAc,IASuBH,KAAOI,gBAInDJ,KAAOK,aAAAA,IAOPL,KAAOM,QAAqC,QAuB5CN,KAAOO,YAAAA,IAIPP,KAAOQ,eAAyB,MAMhCR,KAAgBS,WAAW,GAU3BT,KAAOU,OAAkB,MAUzBV,KAAOW,aAA2D,WAalEX,KAAQY,WAAWC,EAAAA,GAUnBb,KAAQc,eAAAA,IAMRd,KAAQe,UAAAA,IAGRf,KAAQgB,QAAAA,IAGRhB,KAAQiB,YAAAA,IAMRjB,KAAQkB,eAAe;AAAA,EAAA;AAAA,EAgBJ,WAAWC,GAAAA;AACxBnB,SAAKoB,OACTpB,KAAKoB,KAAK,eAAazB,EAAc0B,eAEtCvB,MAAMwB,WAAWH,CAAAA;AAAAA,EAClB;AAAA,EAGmB,QAAQA,GAAAA;AAC1BrB,UAAMyB,QAAQJ,CAAAA,GAGVA,EAAaK,IAAI,OAAA,MAEhBxB,KAAKC,UAAUD,KAAKkB,iBACvBlB,KAAKgB,QAAAA,KAINhB,KAAKyB,cAAAA,IAAAA,CAIDzB,KAAK0B,cAAcP,EAAaK,IAAI,OAAA,MACxCxB,KAAKkB,eAAelB,KAAKC;AAAAA,EAE3B;AAAA,EAKA,oBAAA0B;AACC7B,UAAM6B,kBAAAA,GAGN3B,KAAKkB,eAAelB,KAAKC,OAGzBD,KAAK4B,qBAAAA,GAGL5B,KAAK6B,8BAAAA;AAAAA,EACN;AAAA,EAKQ,uBAAAD;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