@mhmo91/schmancy 0.4.20 → 0.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{avatar-BoOnOo3X.cjs → avatar-CRWIpCVJ.cjs} +2 -2
- package/dist/{avatar-BoOnOo3X.cjs.map → avatar-CRWIpCVJ.cjs.map} +1 -1
- package/dist/{avatar-7Rif8_0P.js → avatar-CZ4ubNmx.js} +3 -3
- package/dist/{avatar-7Rif8_0P.js.map → avatar-CZ4ubNmx.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -7
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +154 -156
- package/dist/input-BN9xQTH0.cjs +111 -0
- package/dist/{input-DcWJTrr9.cjs.map → input-BN9xQTH0.cjs.map} +1 -1
- package/dist/{input-P8bwT-4D.js → input-DHNBYBq4.js} +5 -1
- package/dist/{input-P8bwT-4D.js.map → input-DHNBYBq4.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +5 -1
- package/dist/{media-BG2j6r0I.js → media-DHgb7H9L.js} +21 -27
- package/dist/{media-BG2j6r0I.js.map → media-DHgb7H9L.js.map} +1 -1
- package/dist/{media-C_UPDRKi.cjs → media-hg61JS4R.cjs} +6 -6
- package/dist/{media-C_UPDRKi.cjs.map → media-hg61JS4R.cjs.map} +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/types/mixins/index.d.ts +1 -0
- package/types/src/busy/spinner.d.ts +1 -0
- package/types/src/card/actions.d.ts +3 -3
- package/types/src/card/content.d.ts +0 -3
- package/types/src/card/media.d.ts +1 -0
- package/types/src/chips/chip.d.ts +1 -1
- package/types/src/chips/chips.d.ts +1 -1
- package/types/src/date-range/date-range-dialog.d.ts +28 -0
- package/types/src/date-range/date-range-helpers.d.ts +27 -0
- package/types/src/date-range/date-range-presets.d.ts +18 -0
- package/types/src/date-range/date-range.d.ts +1 -27
- package/types/src/date-range-inline/date-range-inline.d.ts +111 -0
- package/types/src/date-range-inline/index.d.ts +2 -0
- package/types/src/index.d.ts +2 -0
- package/types/src/input/index.d.ts +2 -2
- package/types/src/input/input.d.ts +118 -34
- package/types/src/progress/index.d.ts +1 -0
- package/types/src/progress/progress.d.ts +17 -0
- package/types/src/radio-group/radio-button.d.ts +1 -1
- package/types/src/radio-group/radio-group.d.ts +1 -1
- package/dist/input-DcWJTrr9.cjs +0 -111
- package/types/src/data/countries.d.ts +0 -5
- package/types/src/data/index.d.ts +0 -1
- package/types/src/notification/$notification.d.ts +0 -13
- package/types/src/store/action-creator.d.ts +0 -8
- package/types/src/store/clear.d.ts +0 -1
- package/types/src/v2/form.d.ts +0 -51
- package/types/src/v2/index.d.ts +0 -2
- package/types/src/v2/input.d.ts +0 -71
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const
|
|
1
|
+
"use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const y=require("./tailwind.mixin-DNME2oUL.cjs"),l=require("lit/decorators.js"),a=require("lit");var u=Object.getOwnPropertyDescriptor;let p=class extends y.TailwindElement(a.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 0.5rem;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: flex-end;
|
|
8
8
|
}
|
|
9
|
-
`){render(){return
|
|
9
|
+
`){render(){return a.html`<slot></slot>`}};p=((i,e,n,o)=>{for(var r,t=o>1?void 0:o?u(e,n):e,s=i.length-1;s>=0;s--)(r=i[s])&&(t=r(t)||t);return t})([l.customElement("schmancy-card-action")],p);var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,m=(i,e,n,o)=>{for(var r,t=o>1?void 0:o?g(e,n):e,s=i.length-1;s>=0;s--)(r=i[s])&&(t=(o?r(e,n,t):r(t))||t);return o&&t&&f(e,n,t),t};let h=class extends y.TailwindElement(a.css`:host{
|
|
10
10
|
display: block;
|
|
11
11
|
position: relative;
|
|
12
12
|
inset: 0;
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
}
|
|
47
47
|
:host([elevation="5"]) {
|
|
48
48
|
box-shadow: var(--schmancy-sys-elevation-5);
|
|
49
|
-
}`){constructor(){super(...arguments),this.type="elevated",this.elevation=0}render(){return
|
|
49
|
+
}`){constructor(){super(...arguments),this.type="elevated",this.elevation=0}render(){return a.html`<slot></slot>`}};m([l.property()],h.prototype,"type",2),m([l.property({type:Number})],h.prototype,"elevation",2),h=m([l.customElement("schmancy-card")],h);var b=Object.getOwnPropertyDescriptor;let v=class extends y.TailwindElement(a.css`
|
|
50
50
|
:host {
|
|
51
51
|
display: block;
|
|
52
52
|
padding: 1rem;
|
|
53
53
|
}
|
|
54
|
-
`){render(){return
|
|
54
|
+
`){render(){return a.html`<slot></slot>`}};v=((i,e,n,o)=>{for(var r,t=o>1?void 0:o?b(e,n):e,s=i.length-1;s>=0;s--)(r=i[s])&&(t=r(t)||t);return t})([l.customElement("schmancy-card-content")],v);var w=Object.defineProperty,x=Object.getOwnPropertyDescriptor,d=(i,e,n,o)=>{for(var r,t=o>1?void 0:o?x(e,n):e,s=i.length-1;s>=0;s--)(r=i[s])&&(t=(o?r(e,n,t):r(t))||t);return o&&t&&w(e,n,t),t};let c=class extends y.TailwindElement(a.css`
|
|
55
55
|
:host {
|
|
56
56
|
display: block;
|
|
57
57
|
position: relative;
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
:host([fit="scale-down"]) ::slotted(img) {
|
|
97
97
|
object-fit: scale-down;
|
|
98
98
|
}
|
|
99
|
-
`){constructor(){super(...arguments),this.src="",this.fit="contain",this.alt=""}render(){return this.src?
|
|
100
|
-
//# sourceMappingURL=media-
|
|
99
|
+
`){constructor(){super(...arguments),this.src="",this.fit="contain",this.alt=""}render(){return this.src?a.html`<img src="${this.src}" alt="${this.alt}" />`:a.html`<slot></slot>`}};d([l.property({type:String,reflect:!0})],c.prototype,"src",2),d([l.property({type:String,reflect:!0})],c.prototype,"fit",2),d([l.property({type:String})],c.prototype,"alt",2),c=d([l.customElement("schmancy-card-media")],c);
|
|
100
|
+
//# sourceMappingURL=media-hg61JS4R.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-
|
|
1
|
+
{"version":3,"file":"media-hg61JS4R.cjs","sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends TailwindElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement(css`:host{\n\tdisplay: block;\n\tposition: relative;\n\tinset: 0;\n\tborder-radius: 0.375rem; /* rounded-md */\n}\n:host([type=\"elevated\"]) {\n\tbackground-color: var(--schmancy-sys-color-surface-low);\n\tbox-shadow: var(--schmancy-sys-elevation-1);\n}\n:host([type=\"elevated\"]:hover) {\n\tbox-shadow: var(--schmancy-sys-elevation-2);\n}\n:host([type=\"filled\"]) {\n\tbackground-color: var(--schmancy-sys-color-surface-highest);\n}\n:host([type=\"filled\"]:hover) {\n\tbox-shadow: var(--schmancy-sys-elevation-1);\n}\n:host([type=\"outlined\"]) {\n\tbackground-color: var(--schmancy-sys-color-surface-default);\n\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n}\n:host([type=\"outlined\"]:hover) {\n\tbox-shadow: var(--schmancy-sys-elevation-1);\n}\n:host([elevation=\"1\"]) {\n\tbox-shadow: var(--schmancy-sys-elevation-1);\n}\n:host([elevation=\"2\"]) {\n\tbox-shadow: var(--schmancy-sys-elevation-2);\n}\n:host([elevation=\"3\"]) {\n\tbox-shadow: var(--schmancy-sys-elevation-3);\n}\n:host([elevation=\"4\"]) {\n\tbox-shadow: var(--schmancy-sys-elevation-4);\n}\n:host([elevation=\"5\"]) {\n\tbox-shadow: var(--schmancy-sys-elevation-5);\n}`) {\n\t@property() type: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"names":["SchmancyCardAction","TailwindElement","css","render","html","customElement","SchmancyCard","constructor","super","arguments","this","type","elevation","__decorateClass","property","prototype","Number","SchmancyCardContent","SchmancyCardMedia","src","fit","alt","String","reflect"],"mappings":"kPASA,IAAqBA,EAArB,cAAgDC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GASrD,QAAAC,CACF,OAAAC,EAAAA,mBAAA,CAVYJ,EAAAA,wGAArB,CADCK,EAAAA,cAAc,sBAAA,CAAA,EACML,mMCJrB,IAAqBM,EAArB,cAA0CL,EAAgBA,gBAAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA1D,aAAAK,CAAAC,MAAAC,GAAAA,SAAAA,EAyCwDC,KAAAC,KAAA,WACQD,KAAAE,UAAA,CAAA,CACrD,QAAAT,CACF,OAAAC,EAAAA,mBAAA,CAAA,EAHIS,EAAA,CAAXC,EAASA,SAzCUR,CAAAA,EAAAA,EAyCRS,UAAA,OAAA,CACgBF,EAAAA,EAAA,CAA3BC,WAAS,CAAEH,KAAMK,MA1CEV,CAAAA,CAAAA,EAAAA,EA0CQS,UAAA,YAAA,CAAA,EA1CRT,EAArBO,EAAA,CADCR,EAAAA,cAAc,eACMC,CAAAA,EAAAA,CAAAA,wCCGrB,IAAqBW,EAArB,cAAiDhB,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAMtD,QAAAC,CACF,OAAAC,EAAAA,mBAAA,CAPYa,EAAAA,wGAArB,CADCZ,EAAAA,cAAc,uBAAA,CAAA,EACMY,mMCArB,IAAqBC,EAArB,cAA+CjB,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA/D,CAAA,CAAA,aAAAM,CAAAA,MAAAA,GAAAC,SA+CeC,EAAAA,KAAAS,IAAA,GAG8CT,KAAAU,IAAA,UAG9CV,KAAAW,IAAA,EAAA,CAEJ,QAGF,CAAA,OAAAX,KAAKS,IACTf,mBAAiBM,KAAKS,aAAaT,KAAKW,GAAAA,OACxCjB,EAAAA,mBAAA,CAbJS,EAAAA,EAAA,CADCC,EAAAA,SAAS,CAAEH,KAAMW,OAAQC,QAAAA,EA9CNL,CAAAA,CAAAA,EAAAA,EA+CpBH,UAAA,MAAA,GAGAF,EAAA,CADCC,EAAAA,SAAS,CAAEH,KAAMW,OAAQC,QAAS,EAAA,CAAA,CAAA,EAjDfL,EAkDpBH,UAAA,MAAA,CAGAF,EAAAA,EAAA,CADCC,WAAS,CAAEH,KAAMW,MApDEJ,CAAAA,CAAAA,EAAAA,EAqDpBH,UAAA,MAAA,GArDoBG,EAArBL,EAAA,CADCR,EAAAA,cAAc,qBACMa,CAAAA,EAAAA,CAAAA"}
|
package/dist/nav-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-CRWIpCVJ.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
|
|
2
2
|
//# sourceMappingURL=nav-drawer.cjs.map
|
package/dist/nav-drawer.js
CHANGED
package/dist/teleport.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-CRWIpCVJ.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
|
|
2
2
|
//# sourceMappingURL=teleport.cjs.map
|
package/dist/teleport.js
CHANGED
package/package.json
CHANGED
package/types/mixins/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const SchmancyCardAction_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
3
|
* @element schmancy-card-action
|
|
4
4
|
* @slot - The content of the action
|
|
5
5
|
*/
|
|
6
|
-
export default class
|
|
6
|
+
export default class SchmancyCardAction extends SchmancyCardAction_base {
|
|
7
7
|
protected render(): unknown;
|
|
8
8
|
}
|
|
9
9
|
declare global {
|
|
10
10
|
interface HTMLElementTagNameMap {
|
|
11
|
-
'schmancy-card-action':
|
|
11
|
+
'schmancy-card-action': SchmancyCardAction;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
declare const SchmancyCardContent_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
3
|
* @element schmancy-card-content
|
|
4
|
-
* @slot headline
|
|
5
|
-
* @slot subhead
|
|
6
|
-
* @slot default - The content of the card
|
|
7
4
|
*/
|
|
8
5
|
export default class SchmancyCardContent extends SchmancyCardContent_base {
|
|
9
6
|
protected render(): unknown;
|
|
@@ -5,6 +5,7 @@ declare const SchmancyCardMedia_base: import("@mixins/index").Constructor<Custom
|
|
|
5
5
|
export default class SchmancyCardMedia extends SchmancyCardMedia_base {
|
|
6
6
|
src: string;
|
|
7
7
|
fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
8
|
+
alt: string;
|
|
8
9
|
protected render(): unknown;
|
|
9
10
|
}
|
|
10
11
|
declare global {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@material/web/chips/chip-set.js';
|
|
2
2
|
import '@material/web/chips/filter-chip.js';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
|
-
declare const SchmancyChip_base: CustomElementConstructor & import("@mixins/
|
|
4
|
+
declare const SchmancyChip_base: import("../../mixins").Constructor<CustomElementConstructor> & import("../../mixins").Constructor<import("@mixins/tailwind.mixin").ITailwindElementMixin> & import("../../mixins").Constructor<LitElement> & import("../../mixins").Constructor<import("../../mixins").IBaseMixin>;
|
|
5
5
|
export default class SchmancyChip extends SchmancyChip_base {
|
|
6
6
|
value: string;
|
|
7
7
|
selected: boolean;
|
|
@@ -10,7 +10,7 @@ export default class SchmancyChips extends SchmancyChips_base {
|
|
|
10
10
|
values: string[];
|
|
11
11
|
value: string;
|
|
12
12
|
chips: SchmancyChip[];
|
|
13
|
-
wrap:
|
|
13
|
+
wrap: boolean;
|
|
14
14
|
change(e: CustomEvent<SchmancyChipChangeEvent>): Promise<void>;
|
|
15
15
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
16
16
|
attributeChangedCallback(name: string, old: string, value: string): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PresetCategory } from './date-range-presets';
|
|
2
|
+
declare const SchmancyDateRangeDialog_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
3
|
+
/**
|
|
4
|
+
* Dialog content component for date range selection
|
|
5
|
+
*
|
|
6
|
+
* @element schmancy-date-range-dialog
|
|
7
|
+
*/
|
|
8
|
+
export declare class SchmancyDateRangeDialog extends SchmancyDateRangeDialog_base {
|
|
9
|
+
type: 'date' | 'datetime-local';
|
|
10
|
+
dateFrom: {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
|
+
dateTo: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
};
|
|
18
|
+
minDate?: string;
|
|
19
|
+
maxDate?: string;
|
|
20
|
+
activePreset: string | null;
|
|
21
|
+
presetCategories: PresetCategory[];
|
|
22
|
+
private handleFromDateChange;
|
|
23
|
+
private handleToDateChange;
|
|
24
|
+
private handlePresetSelection;
|
|
25
|
+
private applyManualDateSelection;
|
|
26
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { PresetUnit } from './date-range-presets';
|
|
3
|
+
/**
|
|
4
|
+
* Format a date range into a human-readable string
|
|
5
|
+
*/
|
|
6
|
+
export declare function formatDateRange(fromValue: string, toValue: string, type: 'date' | 'datetime-local', placeholder: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Detect the type of date range (full month, full quarter, etc.)
|
|
9
|
+
*/
|
|
10
|
+
export interface DateRangeType {
|
|
11
|
+
isFullMonth: boolean;
|
|
12
|
+
isFullQuarter: boolean;
|
|
13
|
+
isFullYear: boolean;
|
|
14
|
+
isFullWeek: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function detectDateRangeType(fromDate: dayjs.Dayjs, toDate: dayjs.Dayjs): DateRangeType;
|
|
17
|
+
/**
|
|
18
|
+
* Calculate the appropriate shift unit and amount for a date range
|
|
19
|
+
*/
|
|
20
|
+
export declare function calculateShiftParams(fromDate: dayjs.Dayjs, toDate: dayjs.Dayjs, activePresetStep?: PresetUnit): {
|
|
21
|
+
unit: PresetUnit;
|
|
22
|
+
amount: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Helper method to safely add/subtract quarter values
|
|
26
|
+
*/
|
|
27
|
+
export declare function adjustQuarter(date: dayjs.Dayjs, amount: number, direction: 1 | -1): dayjs.Dayjs;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
export type PresetUnit = dayjs.OpUnitType | 'quarter';
|
|
3
|
+
export interface DateRangePreset {
|
|
4
|
+
label: string;
|
|
5
|
+
range: {
|
|
6
|
+
dateFrom: string;
|
|
7
|
+
dateTo: string;
|
|
8
|
+
};
|
|
9
|
+
step: PresetUnit;
|
|
10
|
+
}
|
|
11
|
+
export interface PresetCategory {
|
|
12
|
+
name: string;
|
|
13
|
+
presets: DateRangePreset[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Generate date range presets for different time periods
|
|
17
|
+
*/
|
|
18
|
+
export declare function generatePresetCategories(format: string, includeTime?: boolean): PresetCategory[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
|
+
import './date-range-dialog';
|
|
2
3
|
export type SchmancyDateRangeChangeEvent = CustomEvent<{
|
|
3
4
|
dateFrom: string;
|
|
4
5
|
dateTo: string;
|
|
@@ -32,17 +33,13 @@ export declare class SchmancyDateRange extends SchmancyDateRange_base {
|
|
|
32
33
|
required: boolean;
|
|
33
34
|
placeholder: string;
|
|
34
35
|
clearable: boolean;
|
|
35
|
-
allowDirectInput: boolean;
|
|
36
36
|
private isOpen;
|
|
37
37
|
private selectedDateRange;
|
|
38
38
|
private activePreset;
|
|
39
39
|
private announceMessage;
|
|
40
40
|
private isMobile;
|
|
41
|
-
private isTyping;
|
|
42
|
-
private typedValue;
|
|
43
41
|
private presetRanges;
|
|
44
42
|
private presetCategories;
|
|
45
|
-
private inputRef;
|
|
46
43
|
private memoizedPresets;
|
|
47
44
|
connectedCallback(): void;
|
|
48
45
|
private setupEventHandlers;
|
|
@@ -55,17 +52,11 @@ export declare class SchmancyDateRange extends SchmancyDateRange_base {
|
|
|
55
52
|
*/
|
|
56
53
|
private updateSelectedDateRange;
|
|
57
54
|
private setDateRange;
|
|
58
|
-
private handlePresetSelection;
|
|
59
55
|
private toggleDropdown;
|
|
60
56
|
private openDropdown;
|
|
61
57
|
private closeDropdown;
|
|
62
|
-
/**
|
|
63
|
-
* Helper method to safely add/subtract quarter values
|
|
64
|
-
*/
|
|
65
|
-
private adjustQuarter;
|
|
66
58
|
/**
|
|
67
59
|
* Shifts the date range based on its type (preset or custom)
|
|
68
|
-
* Enhanced to properly handle various time units and preserve date patterns
|
|
69
60
|
*/
|
|
70
61
|
private shiftDateRange;
|
|
71
62
|
/**
|
|
@@ -77,27 +68,10 @@ export declare class SchmancyDateRange extends SchmancyDateRange_base {
|
|
|
77
68
|
* and updates the activePreset accordingly
|
|
78
69
|
*/
|
|
79
70
|
private checkAndUpdateActivePreset;
|
|
80
|
-
private applyManualDateSelection;
|
|
81
71
|
/**
|
|
82
72
|
* Check if view is mobile
|
|
83
73
|
*/
|
|
84
74
|
private checkMobileView;
|
|
85
|
-
/**
|
|
86
|
-
* Handle direct text input
|
|
87
|
-
*/
|
|
88
|
-
private handleDirectInput;
|
|
89
|
-
/**
|
|
90
|
-
* Parse typed date range
|
|
91
|
-
*/
|
|
92
|
-
private parseTypedDateRange;
|
|
93
|
-
/**
|
|
94
|
-
* Handle input blur to parse typed dates
|
|
95
|
-
*/
|
|
96
|
-
private handleInputBlur;
|
|
97
|
-
/**
|
|
98
|
-
* Create dialog content
|
|
99
|
-
*/
|
|
100
|
-
private createDialogContent;
|
|
101
75
|
/**
|
|
102
76
|
* Announce messages to screen readers
|
|
103
77
|
*/
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface HTMLElementTagNameMap {
|
|
3
|
+
'schmancy-date-range-inline': SchmancyDateRangeInline;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export type SchmancyDateRangeInlineChangeEvent = CustomEvent<{
|
|
7
|
+
dateFrom: string;
|
|
8
|
+
dateTo: string;
|
|
9
|
+
isValid: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
declare const SchmancyDateRangeInline_base: import("@mixins/index").Constructor<import("@mixins/index").IFormFieldMixin> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
12
|
+
/**
|
|
13
|
+
* Smart inline date range picker that handles all the heavy lifting.
|
|
14
|
+
* Auto-corrects invalid ranges, provides smart defaults, and validates dates.
|
|
15
|
+
*/
|
|
16
|
+
export default class SchmancyDateRangeInline extends SchmancyDateRangeInline_base {
|
|
17
|
+
/**
|
|
18
|
+
* Input type - 'date' or 'datetime-local'
|
|
19
|
+
*/
|
|
20
|
+
type: 'date' | 'datetime-local';
|
|
21
|
+
/**
|
|
22
|
+
* From date configuration
|
|
23
|
+
*/
|
|
24
|
+
dateFrom: {
|
|
25
|
+
label: string;
|
|
26
|
+
value: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* To date configuration
|
|
30
|
+
*/
|
|
31
|
+
dateTo: {
|
|
32
|
+
label: string;
|
|
33
|
+
value: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Minimum allowed date
|
|
37
|
+
*/
|
|
38
|
+
minDate?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Maximum allowed date
|
|
41
|
+
*/
|
|
42
|
+
maxDate?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Compact mode for smaller UI
|
|
45
|
+
*/
|
|
46
|
+
compact: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Auto-correct invalid date ranges
|
|
49
|
+
*/
|
|
50
|
+
autoCorrect: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Minimum gap between dates (in days)
|
|
53
|
+
*/
|
|
54
|
+
minGap: number;
|
|
55
|
+
/**
|
|
56
|
+
* Maximum gap between dates (in days)
|
|
57
|
+
*/
|
|
58
|
+
maxGap?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Default gap when auto-setting dates (in days)
|
|
61
|
+
*/
|
|
62
|
+
defaultGap: number;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to allow same date selection
|
|
65
|
+
*/
|
|
66
|
+
allowSameDate: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Internal validation state
|
|
69
|
+
*/
|
|
70
|
+
private validationState;
|
|
71
|
+
connectedCallback(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Set smart default dates based on context
|
|
74
|
+
*/
|
|
75
|
+
private setSmartDefaults;
|
|
76
|
+
/**
|
|
77
|
+
* Format date to required string format
|
|
78
|
+
*/
|
|
79
|
+
private formatDate;
|
|
80
|
+
/**
|
|
81
|
+
* Parse date string to Date object
|
|
82
|
+
*/
|
|
83
|
+
private parseDate;
|
|
84
|
+
/**
|
|
85
|
+
* Calculate days between two dates
|
|
86
|
+
*/
|
|
87
|
+
private getDaysBetween;
|
|
88
|
+
/**
|
|
89
|
+
* Handle from date change with validation and auto-correction
|
|
90
|
+
*/
|
|
91
|
+
private handleDateFromChange;
|
|
92
|
+
/**
|
|
93
|
+
* Handle to date change with validation and auto-correction
|
|
94
|
+
*/
|
|
95
|
+
private handleDateToChange;
|
|
96
|
+
/**
|
|
97
|
+
* Validate dates and auto-correct if enabled
|
|
98
|
+
*/
|
|
99
|
+
private validateAndCorrect;
|
|
100
|
+
/**
|
|
101
|
+
* Get computed min date for the "to" field based on "from" value
|
|
102
|
+
*/
|
|
103
|
+
private getComputedMinDateTo;
|
|
104
|
+
/**
|
|
105
|
+
* Get computed max date for the "from" field based on "to" value
|
|
106
|
+
*/
|
|
107
|
+
private getComputedMaxDateFrom;
|
|
108
|
+
emitChange(): void;
|
|
109
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
110
|
+
}
|
|
111
|
+
export {};
|
package/types/src/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './code-highlight';
|
|
|
13
13
|
export * from './components';
|
|
14
14
|
export * from './content-drawer';
|
|
15
15
|
export * from './date-range';
|
|
16
|
+
export * from './date-range-inline';
|
|
16
17
|
export * from './delay';
|
|
17
18
|
export * from './dialog';
|
|
18
19
|
export * from './directives';
|
|
@@ -28,6 +29,7 @@ export * from './menu';
|
|
|
28
29
|
export * from './nav-drawer';
|
|
29
30
|
export * from './notification';
|
|
30
31
|
export * from './option';
|
|
32
|
+
export * from './progress';
|
|
31
33
|
export * from './radio-group';
|
|
32
34
|
export * from './rxjs-utils';
|
|
33
35
|
export * from './select';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { default as SchmancyInputV2, type InputSize, type SchmancyInputChangeEventV2 } from './input-v2';
|
|
2
|
+
export { default as SchmancyInput, type SchmancyInputChangeEvent } from './input';
|