@mhmo91/schmancy 0.4.21 → 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.
Files changed (50) hide show
  1. package/dist/{avatar-CQceYbCt.cjs → avatar-CRWIpCVJ.cjs} +2 -2
  2. package/dist/{avatar-CQceYbCt.cjs.map → avatar-CRWIpCVJ.cjs.map} +1 -1
  3. package/dist/{avatar-CPbVhMW7.js → avatar-CZ4ubNmx.js} +2 -2
  4. package/dist/{avatar-CPbVhMW7.js.map → avatar-CZ4ubNmx.js.map} +1 -1
  5. package/dist/badge.cjs +1 -1
  6. package/dist/badge.js +1 -1
  7. package/dist/content-drawer.cjs +1 -1
  8. package/dist/content-drawer.js +1 -1
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.js +191 -189
  11. package/dist/input-BN9xQTH0.cjs +111 -0
  12. package/dist/{input-DcWJTrr9.cjs.map → input-BN9xQTH0.cjs.map} +1 -1
  13. package/dist/{input-P8bwT-4D.js → input-DHNBYBq4.js} +5 -1
  14. package/dist/{input-P8bwT-4D.js.map → input-DHNBYBq4.js.map} +1 -1
  15. package/dist/input.cjs +1 -1
  16. package/dist/input.js +5 -1
  17. package/dist/nav-drawer.cjs +1 -1
  18. package/dist/nav-drawer.js +1 -1
  19. package/dist/teleport.cjs +1 -1
  20. package/dist/teleport.js +1 -1
  21. package/package.json +1 -1
  22. package/types/mixins/index.d.ts +1 -0
  23. package/types/src/busy/spinner.d.ts +1 -0
  24. package/types/src/card/actions.d.ts +3 -3
  25. package/types/src/card/content.d.ts +0 -3
  26. package/types/src/card/media.d.ts +1 -0
  27. package/types/src/chips/chip.d.ts +1 -1
  28. package/types/src/chips/chips.d.ts +1 -1
  29. package/types/src/date-range/date-range-dialog.d.ts +28 -0
  30. package/types/src/date-range/date-range-helpers.d.ts +27 -0
  31. package/types/src/date-range/date-range-presets.d.ts +18 -0
  32. package/types/src/date-range/date-range.d.ts +1 -27
  33. package/types/src/date-range-inline/date-range-inline.d.ts +111 -0
  34. package/types/src/date-range-inline/index.d.ts +2 -0
  35. package/types/src/index.d.ts +2 -0
  36. package/types/src/input/index.d.ts +2 -2
  37. package/types/src/input/input.d.ts +118 -34
  38. package/types/src/progress/index.d.ts +1 -0
  39. package/types/src/progress/progress.d.ts +17 -0
  40. package/types/src/radio-group/radio-button.d.ts +1 -1
  41. package/types/src/radio-group/radio-group.d.ts +1 -1
  42. package/dist/input-DcWJTrr9.cjs +0 -111
  43. package/types/src/data/countries.d.ts +0 -5
  44. package/types/src/data/index.d.ts +0 -1
  45. package/types/src/notification/$notification.d.ts +0 -13
  46. package/types/src/store/action-creator.d.ts +0 -8
  47. package/types/src/store/clear.d.ts +0 -1
  48. package/types/src/v2/form.d.ts +0 -51
  49. package/types/src/v2/index.d.ts +0 -2
  50. package/types/src/v2/input.d.ts +0 -71
package/dist/index.js CHANGED
@@ -1,211 +1,213 @@
1
1
  import "./animated-text-CNPSIIYg.js";
2
- import { F as u, H as D, b as w, S as T, a as b, r as M } from "./area.component-i-mmh5is.js";
3
- import { l as I, h as A, c as v, f as N, j as H, a as E, b as B, d as F, e as O, k as $, g as j, i as k, n as L, s as P } from "./utils-jduntaQU.js";
2
+ import { F as g, H as u, b as D, S as w, a as T, r as b } from "./area.component-i-mmh5is.js";
3
+ import { l as M, h as R, c as A, f as v, j as N, a as H, b as E, d as B, e as F, k as O, g as $, i as j, n as k, s as L } from "./utils-jduntaQU.js";
4
4
  import "./autocomplete-EapOt3ES.js";
5
- import { $ as z, H as G, q as W, S as V, f as K, c as _, g as q, d as Q, e as J, h as U, a as X, b as Z, j as aa, l as ea, m as ra, n as ta, k as oa, o as sa, p as ca, W as na, s as ma, i as Sa, t as ia } from "./avatar-CPbVhMW7.js";
6
- import { S as ha } from "./boat-DPTS3Kpw.js";
5
+ import { $ as Y, H as z, q as G, S as V, f as W, c as K, g as _, d as q, e as Q, h as J, a as U, b as X, j as Z, l as aa, m as ea, n as ra, k as ta, o as oa, p as ca, W as sa, s as na, i as ma, t as Sa } from "./avatar-CZ4ubNmx.js";
6
+ import { S as ya } from "./boat-DPTS3Kpw.js";
7
7
  import "./spinner-BPqLh7JL.js";
8
- import { S as la, a as fa } from "./icon-button-Ckd9jE-a.js";
8
+ import { S as pa, a as la } from "./icon-button-Ckd9jE-a.js";
9
9
  import "./media-DHgb7H9L.js";
10
- import { S as da } from "./checkbox-B85eeKqn.js";
10
+ import { S as xa } from "./checkbox-B85eeKqn.js";
11
11
  import "./chips-BNRMzGrx.js";
12
- import { S as ga } from "./circular-progress-Cl_dXUPO.js";
13
- import { S as Da, S as wa, a as Ta } from "./code-preview-B8X7JaxA.js";
14
- import { S as Ma } from "./payment-card-form-GEOaUypQ.js";
15
- import { S as Ia, v as Aa } from "./date-range-9sVFbxK0.js";
16
- import { S as Na } from "./date-range-inline-Bqnc8wBb.js";
17
- import { S as Ea, d as Ba } from "./delay-u5isp6Vb.js";
18
- import { C as Oa, S as $a, a as ja } from "./dialog-content-ZpgRQC1m.js";
19
- import { $ as La, D as Pa } from "./dialog-service-DFMlRcXf.js";
20
- import { c as za, f as Ga, r as Wa } from "./ripple-BumgqsDT.js";
12
+ import { S as Ca } from "./circular-progress-Cl_dXUPO.js";
13
+ import { S as ua, S as Da, a as wa } from "./code-preview-B8X7JaxA.js";
14
+ import { S as ba } from "./payment-card-form-GEOaUypQ.js";
15
+ import { S as Ma, v as Ra } from "./date-range-9sVFbxK0.js";
16
+ import { S as va } from "./date-range-inline-Bqnc8wBb.js";
17
+ import { S as Ha, d as Ea } from "./delay-u5isp6Vb.js";
18
+ import { C as Fa, S as Oa, a as $a } from "./dialog-content-ZpgRQC1m.js";
19
+ import { $ as ka, D as La } from "./dialog-service-DFMlRcXf.js";
20
+ import { c as Ya, f as za, r as Ga } from "./ripple-BumgqsDT.js";
21
21
  import "./divider-BK4PNB76.js";
22
- import { S as Ka, a as _a } from "./dropdown-content-DbHKYDCS.js";
23
- import { S as Qa, a as Ja } from "./timezone-CEEEd-9_.js";
22
+ import { S as Wa, a as Ka } from "./dropdown-content-DbHKYDCS.js";
23
+ import { S as qa, a as Qa } from "./timezone-CEEEd-9_.js";
24
24
  import "./form-CMv0SQko.js";
25
25
  import "./icon--s5dpU1N.js";
26
- import "./input-P8bwT-4D.js";
27
- import { S as Xa, c as Za, a as ae, b as ee } from "./flex-JcwYdb2G.js";
28
- import { L as te, a as oe, S as se } from "./list-rGydduh7.js";
26
+ import { a as Ua, S as Xa } from "./input-DHNBYBq4.js";
27
+ import { S as ae, c as ee, a as re, b as te } from "./flex-JcwYdb2G.js";
28
+ import { L as ce, a as se, S as ne } from "./list-rGydduh7.js";
29
29
  import "./menu-DvZSvoOx.js";
30
- import { $ as ne, N as me, S as Se, a as ie } from "./notification-service-DKHubhXv.js";
30
+ import { $ as Se, N as ie, S as ye, a as he } from "./notification-service-DKHubhXv.js";
31
31
  import "./option-T6zGawbH.js";
32
32
  import "./progress-EL16etnw.js";
33
- import { a as he, R as pe } from "./radio-button-BQ7snEVj.js";
34
- import { mutationObserver as fe } from "./rxjs-utils.js";
33
+ import { a as le, R as fe } from "./radio-button-BQ7snEVj.js";
34
+ import { mutationObserver as de } from "./rxjs-utils.js";
35
35
  import "rxjs";
36
36
  import "./index-CuY8m6ta.js";
37
- import { S as de } from "./select-Bl8FO2kb.js";
37
+ import { S as ge } from "./select-Bl8FO2kb.js";
38
38
  import "./sheet-WpG2m2yT.js";
39
- import { S as ge, d as ue, b as De, a as we, c as Te, T as be, f as Me, s as Re, t as Ie } from "./sheet.service-COPNmxwp.js";
40
- import { S as ve, a as Ne } from "./slider-4ggti1yr.js";
41
- import { S as Ee, a as Be, b as Fe, s as Oe } from "./schmancy-steps-container-2WW-9LYL.js";
42
- import { B as je, I as ke, L as Le, M as Pe, S as Ye, a as ze, b as Ge, d as We, c as Ve } from "./context-object-CDDP4bTk.js";
43
- import { p as _e, a as qe, v as Qe, G as Je, c as Ue, E as Xe, z as Ze, C as ar, B as er, x as rr, w as tr, y as or, D as sr, F as cr, u as nr, A as mr, b as Sr, r as ir, d as yr, q as hr, f as pr, g as lr, i as fr, j as xr, k as dr, l as Cr, o as gr, h as ur, n as Dr, m as wr, e as Tr, s as br, t as Mr } from "./selector-hook-BvXML7_4.js";
44
- import { a as Ir, S as Ar } from "./surface-1xboRERM.js";
45
- import { a as Nr, S as Hr } from "./table-C6EWKqDY.js";
39
+ import { S as De, d as we, b as Te, a as be, c as Ie, T as Me, f as Re, s as Ae, t as ve } from "./sheet.service-COPNmxwp.js";
40
+ import { S as He, a as Ee } from "./slider-4ggti1yr.js";
41
+ import { S as Fe, a as Oe, b as $e, s as je } from "./schmancy-steps-container-2WW-9LYL.js";
42
+ import { B as Le, I as Pe, L as Ye, M as ze, S as Ge, a as Ve, b as We, d as Ke, c as _e } from "./context-object-CDDP4bTk.js";
43
+ import { p as Qe, a as Je, v as Ue, G as Xe, c as Ze, E as ar, z as er, C as rr, B as tr, x as or, w as cr, y as sr, D as nr, F as mr, u as Sr, A as ir, b as yr, r as hr, d as pr, q as lr, f as fr, g as xr, i as dr, j as Cr, k as gr, l as ur, o as Dr, h as wr, n as Tr, m as br, e as Ir, s as Mr, t as Rr } from "./selector-hook-BvXML7_4.js";
44
+ import { a as vr, S as Nr } from "./surface-1xboRERM.js";
45
+ import { a as Er, S as Br } from "./table-C6EWKqDY.js";
46
46
  import "./tabs-compatibility-AFzKAP2D.js";
47
47
  import "./textarea-JO7OVdfk.js";
48
- import { S as Br } from "./theme.interface-C5Kj6WjD.js";
48
+ import { S as Or } from "./theme.interface-C5Kj6WjD.js";
49
49
  import "./theme-button-C8cK7un6.js";
50
- import { S as Or, t as $r } from "./tooltip-CnuYee5c.js";
51
- import { S as kr } from "./tree-CfnCGGn7.js";
52
- import { SchmancyEvents as Pr } from "./types.js";
53
- import { T as zr } from "./typewriter-DAxRjeRy.js";
54
- import { S as Wr } from "./typography-De5UXL0j.js";
55
- import { i as Kr } from "./intersection-CJxzz8c-.js";
50
+ import { S as jr, t as kr } from "./tooltip-CnuYee5c.js";
51
+ import { S as Pr } from "./tree-CfnCGGn7.js";
52
+ import { SchmancyEvents as zr } from "./types.js";
53
+ import { T as Vr } from "./typewriter-DAxRjeRy.js";
54
+ import { S as Kr } from "./typography-De5UXL0j.js";
55
+ import { i as qr } from "./intersection-CJxzz8c-.js";
56
56
  export {
57
- La as $dialog,
58
- z as $drawer,
59
- ne as $notify,
60
- je as BaseStore,
61
- Oa as ConfirmDialog,
62
- Pa as DialogService,
63
- u as FINDING_MORTIES,
64
- D as HERE_RICKY,
65
- w as HISTORY_STRATEGY,
66
- G as HereMorty,
67
- ke as IndexedDBStorageManager,
68
- te as List,
69
- Le as LocalStorageManager,
70
- Pe as MemoryStorageManager,
71
- me as NotificationAudioService,
72
- he as RadioButton,
73
- pe as RadioGroup,
74
- T as SchmancyArea,
75
- Ye as SchmancyArrayStore,
76
- W as SchmancyAvatar,
57
+ ka as $dialog,
58
+ Y as $drawer,
59
+ Se as $notify,
60
+ Le as BaseStore,
61
+ Fa as ConfirmDialog,
62
+ La as DialogService,
63
+ g as FINDING_MORTIES,
64
+ u as HERE_RICKY,
65
+ D as HISTORY_STRATEGY,
66
+ z as HereMorty,
67
+ Pe as IndexedDBStorageManager,
68
+ ce as List,
69
+ Ye as LocalStorageManager,
70
+ ze as MemoryStorageManager,
71
+ ie as NotificationAudioService,
72
+ le as RadioButton,
73
+ fe as RadioGroup,
74
+ w as SchmancyArea,
75
+ Ge as SchmancyArrayStore,
76
+ G as SchmancyAvatar,
77
77
  V as SchmancyBadgeV2,
78
- ha as SchmancyBoat,
79
- la as SchmancyButton,
80
- da as SchmancyCheckbox,
81
- ga as SchmancyCircularProgress,
82
- Da as SchmancyCode,
83
- wa as SchmancyCodeHighlight,
84
- Ta as SchmancyCodePreview,
85
- K as SchmancyContentDrawer,
86
- _ as SchmancyContentDrawerID,
87
- q as SchmancyContentDrawerMain,
88
- Q as SchmancyContentDrawerMaxHeight,
89
- J as SchmancyContentDrawerMinWidth,
90
- U as SchmancyContentDrawerSheet,
91
- X as SchmancyContentDrawerSheetMode,
92
- Z as SchmancyContentDrawerSheetState,
93
- Qa as SchmancyCountriesSelect,
94
- Nr as SchmancyDataTable,
95
- Ia as SchmancyDateRange,
96
- Na as SchmancyDateRangeInline,
97
- Ea as SchmancyDelay,
98
- $a as SchmancyDialog,
99
- ja as SchmancyDialogContent,
100
- aa as SchmancyDrawerAppbar,
101
- ea as SchmancyDrawerNavbarMode,
102
- ra as SchmancyDrawerNavbarState,
103
- Ka as SchmancyDropdown,
104
- _a as SchmancyDropdownContent,
105
- Pr as SchmancyEvents,
106
- Xa as SchmancyFlex,
107
- Za as SchmancyFlexV2,
108
- ae as SchmancyGrid,
109
- oe as SchmancyListItem,
110
- se as SchmancyListTypeContext,
111
- ta as SchmancyNavigationDrawer,
112
- oa as SchmancyNavigationDrawerContent,
113
- sa as SchmancyNavigationDrawerSidebar,
114
- Se as SchmancyNotification,
115
- ie as SchmancyNotificationContainer,
116
- Ma as SchmancyPaymentCardForm,
117
- ee as SchmancyScroll,
118
- de as SchmancySelect,
119
- ge as SchmancySheetPosition,
120
- ve as SchmancySlide,
121
- Ne as SchmancySlider,
122
- Ee as SchmancyStep,
123
- Be as SchmancyStepsContainer,
124
- ze as SchmancyStoreObject,
125
- Ir as SchmancySurface,
126
- Ar as SchmancySurfaceTypeContext,
127
- Hr as SchmancyTableRow,
78
+ ya as SchmancyBoat,
79
+ pa as SchmancyButton,
80
+ xa as SchmancyCheckbox,
81
+ Ca as SchmancyCircularProgress,
82
+ ua as SchmancyCode,
83
+ Da as SchmancyCodeHighlight,
84
+ wa as SchmancyCodePreview,
85
+ W as SchmancyContentDrawer,
86
+ K as SchmancyContentDrawerID,
87
+ _ as SchmancyContentDrawerMain,
88
+ q as SchmancyContentDrawerMaxHeight,
89
+ Q as SchmancyContentDrawerMinWidth,
90
+ J as SchmancyContentDrawerSheet,
91
+ U as SchmancyContentDrawerSheetMode,
92
+ X as SchmancyContentDrawerSheetState,
93
+ qa as SchmancyCountriesSelect,
94
+ Er as SchmancyDataTable,
95
+ Ma as SchmancyDateRange,
96
+ va as SchmancyDateRangeInline,
97
+ Ha as SchmancyDelay,
98
+ Oa as SchmancyDialog,
99
+ $a as SchmancyDialogContent,
100
+ Z as SchmancyDrawerAppbar,
101
+ aa as SchmancyDrawerNavbarMode,
102
+ ea as SchmancyDrawerNavbarState,
103
+ Wa as SchmancyDropdown,
104
+ Ka as SchmancyDropdownContent,
105
+ zr as SchmancyEvents,
106
+ ae as SchmancyFlex,
107
+ ee as SchmancyFlexV2,
108
+ re as SchmancyGrid,
109
+ Ua as SchmancyInput,
110
+ Xa as SchmancyInputV2,
111
+ se as SchmancyListItem,
112
+ ne as SchmancyListTypeContext,
113
+ ra as SchmancyNavigationDrawer,
114
+ ta as SchmancyNavigationDrawerContent,
115
+ oa as SchmancyNavigationDrawerSidebar,
116
+ ye as SchmancyNotification,
117
+ he as SchmancyNotificationContainer,
118
+ ba as SchmancyPaymentCardForm,
119
+ te as SchmancyScroll,
120
+ ge as SchmancySelect,
121
+ De as SchmancySheetPosition,
122
+ He as SchmancySlide,
123
+ Ee as SchmancySlider,
124
+ Fe as SchmancyStep,
125
+ Oe as SchmancyStepsContainer,
126
+ Ve as SchmancyStoreObject,
127
+ vr as SchmancySurface,
128
+ Nr as SchmancySurfaceTypeContext,
129
+ Br as SchmancyTableRow,
128
130
  ca as SchmancyTeleportation,
129
- Br as SchmancyTheme,
130
- ue as SchmancyThemeComponent,
131
- Ja as SchmancyTimezonesSelect,
132
- Or as SchmancyTooltip,
133
- kr as SchmancyTree,
134
- Wr as SchmancyTypography,
135
- fa as SchmnacyIconButton,
136
- Ge as SessionStorageManager,
137
- De as SheetHereMorty,
138
- we as SheetWhereAreYouRicky,
139
- Fe as StepsController,
140
- We as StoreError,
141
- Te as ThemeHereIAm,
142
- be as ThemeWhereAreYou,
143
- zr as TypewriterElement,
144
- na as WhereAreYouRicky,
145
- b as area,
146
- I as buildQueryString,
147
- za as color,
148
- A as compareActiveRoutes,
149
- v as compareCustomElementConstructors,
150
- N as compareRouteActions,
151
- _e as compareValues,
152
- qe as createArrayContext,
153
- Qe as createCollectionSelector,
154
- Je as createCompoundSelector,
155
- Ue as createContext,
156
- Xe as createCountSelector,
157
- Ze as createEntriesSelector,
158
- ar as createFilterSelector,
159
- er as createFindSelector,
160
- rr as createItemSelector,
161
- tr as createItemsSelector,
162
- or as createKeysSelector,
163
- sr as createMapSelector,
164
- cr as createOptimizedSelector,
165
- H as createRouteCacheKey,
166
- nr as createSelector,
167
- mr as createSortSelector,
168
- Ve as createStorageManager,
169
- Sr as createTestArrayContext,
170
- E as debounce,
171
- B as decodeRouteState,
172
- F as deepMerge,
173
- Ba as delayContext,
174
- O as encodeRouteState,
175
- $ as extractQueryParams,
176
- ir as filterArray,
177
- yr as filterArrayItems,
178
- hr as filterMap,
179
- pr as filterMapItems,
180
- Me as formateTheme,
181
- Ga as fullHeight,
182
- lr as getFieldValue,
183
- j as getTagName,
184
- Kr as intersection$,
185
- fr as isArray,
186
- xr as isDate,
187
- dr as isIterable,
188
- Cr as isMap,
189
- gr as isNil,
190
- ur as isNumber,
191
- k as isObject,
192
- Dr as isPlainObject,
193
- wr as isSet,
194
- Tr as isString,
195
- fe as mutationObserver,
196
- L as normalizeTagName,
197
- Wa as ripple,
198
- M as routerHistory,
199
- P as sanitizeRouteState,
200
- ma as schmancyContentDrawer,
201
- Sa as schmancyNavDrawer,
202
- br as select,
203
- Mr as selectItem,
204
- Re as sheet,
205
- Oe as stepsContext,
206
- Ie as tailwindStyles,
207
- ia as teleport,
208
- $r as tooltip,
209
- Aa as validateInitialDateRange
131
+ Or as SchmancyTheme,
132
+ we as SchmancyThemeComponent,
133
+ Qa as SchmancyTimezonesSelect,
134
+ jr as SchmancyTooltip,
135
+ Pr as SchmancyTree,
136
+ Kr as SchmancyTypography,
137
+ la as SchmnacyIconButton,
138
+ We as SessionStorageManager,
139
+ Te as SheetHereMorty,
140
+ be as SheetWhereAreYouRicky,
141
+ $e as StepsController,
142
+ Ke as StoreError,
143
+ Ie as ThemeHereIAm,
144
+ Me as ThemeWhereAreYou,
145
+ Vr as TypewriterElement,
146
+ sa as WhereAreYouRicky,
147
+ T as area,
148
+ M as buildQueryString,
149
+ Ya as color,
150
+ R as compareActiveRoutes,
151
+ A as compareCustomElementConstructors,
152
+ v as compareRouteActions,
153
+ Qe as compareValues,
154
+ Je as createArrayContext,
155
+ Ue as createCollectionSelector,
156
+ Xe as createCompoundSelector,
157
+ Ze as createContext,
158
+ ar as createCountSelector,
159
+ er as createEntriesSelector,
160
+ rr as createFilterSelector,
161
+ tr as createFindSelector,
162
+ or as createItemSelector,
163
+ cr as createItemsSelector,
164
+ sr as createKeysSelector,
165
+ nr as createMapSelector,
166
+ mr as createOptimizedSelector,
167
+ N as createRouteCacheKey,
168
+ Sr as createSelector,
169
+ ir as createSortSelector,
170
+ _e as createStorageManager,
171
+ yr as createTestArrayContext,
172
+ H as debounce,
173
+ E as decodeRouteState,
174
+ B as deepMerge,
175
+ Ea as delayContext,
176
+ F as encodeRouteState,
177
+ O as extractQueryParams,
178
+ hr as filterArray,
179
+ pr as filterArrayItems,
180
+ lr as filterMap,
181
+ fr as filterMapItems,
182
+ Re as formateTheme,
183
+ za as fullHeight,
184
+ xr as getFieldValue,
185
+ $ as getTagName,
186
+ qr as intersection$,
187
+ dr as isArray,
188
+ Cr as isDate,
189
+ gr as isIterable,
190
+ ur as isMap,
191
+ Dr as isNil,
192
+ wr as isNumber,
193
+ j as isObject,
194
+ Tr as isPlainObject,
195
+ br as isSet,
196
+ Ir as isString,
197
+ de as mutationObserver,
198
+ k as normalizeTagName,
199
+ Ga as ripple,
200
+ b as routerHistory,
201
+ L as sanitizeRouteState,
202
+ na as schmancyContentDrawer,
203
+ ma as schmancyNavDrawer,
204
+ Mr as select,
205
+ Rr as selectItem,
206
+ Ae as sheet,
207
+ je as stepsContext,
208
+ ve as tailwindStyles,
209
+ Sa as teleport,
210
+ kr as tooltip,
211
+ Ra as validateInitialDateRange
210
212
  };
211
213
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,111 @@
1
+ "use strict";const u=require("lit"),i=require("lit/decorators.js"),p=require("lit/directives/if-defined.js"),m=require("lit/directives/ref.js"),y=require("lit/directives/when.js"),s=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const v=require("./tailwind.mixin-DNME2oUL.cjs"),f=require("./ripple-C2BHbhcS.cjs"),d=require("./theme.interface-Xg5Zi46a.cjs"),g=require("./formField.mixin-BrHllh45.cjs"),b="/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */:host{width:100%;min-width:calc(var(--spacing,.25rem)*0);box-sizing:border-box;max-width:100%;display:block}.date-input-container{width:100%;min-width:0;width:100%!important;max-width:100%!important}input{appearance:none;border-radius:8px;width:-webkit-fill-available;font-size:16px}input[type=number]::-webkit-inner-spin-button{appearance:none;margin:calc(var(--spacing,.25rem)*0)}input[type=number]::-webkit-outer-spin-button{appearance:none;margin:calc(var(--spacing,.25rem)*0)}input[type=number]{appearance:textfield}input:-webkit-autofill{animation-name:onAutoFillStart;-webkit-box-shadow:0 0 0 30px var(--schmancy-sys-color-surface-highest)inset!important;-webkit-text-fill-color:var(--schmancy-sys-color-surface-on)!important}input:autofill{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}input[type=date],input[type=datetime-local],input[type=time],input[type=month],input[type=week]{appearance:none;width:100%;line-height:inherit;border-radius:8px;min-width:100%;max-width:100%;margin:0;display:block;overflow:hidden;border-radius:8px!important;width:100%!important}input::-webkit-datetime-edit{align-items:center;width:100%;height:100%;margin:0;padding:0;display:flex}input::-webkit-datetime-edit-fields-wrapper{align-items:center;width:100%;height:100%;margin:0;padding:0;display:flex}input::-webkit-datetime-edit{flex:1;width:100%}input::-webkit-datetime-edit-fields-wrapper{flex:1;justify-content:space-between;width:100%}input::-webkit-datetime-edit-text{align-items:center;display:flex}input::-webkit-datetime-edit-day-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-month-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-year-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-hour-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-minute-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-second-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-millisecond-field{flex-shrink:0;padding:0 2px}input::-webkit-datetime-edit-meridiem-field{flex-shrink:0;padding:0 2px}input[type=date]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=datetime-local]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=time]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=month]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}input[type=week]::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}@-moz-document url-prefix(){input[type=date],input[type=datetime-local],input[type=time]{min-height:inherit}}@supports (-webkit-touch-callout:none){input[type=date],input[type=datetime-local],input[type=time],input[type=month],input[type=week]{appearance:none;border-radius:0;width:-webkit-fill-available!important;width:fill-available!important;padding-left:12px!important;padding-right:12px!important}input::-webkit-datetime-edit{width:100%!important;padding-left:0!important;padding-right:0!important}input::-webkit-datetime-edit-fields-wrapper{width:100%!important;margin:0!important;padding:0!important}}";var E=Object.defineProperty,S=Object.getOwnPropertyDescriptor,a=(t,e,n,l)=>{for(var h,o=l>1?void 0:l?S(e,n):e,c=t.length-1;c>=0;c--)(h=t[c])&&(o=(l?h(e,n,o):h(o))||o);return l&&o&&E(e,n,o),o};exports.SchmancyInputV2=class extends v.TailwindElement(b){constructor(){if(super(),this.id="",this.label="",this.type="text",this.name=`name_${Date.now()}`,this.placeholder="",this.value="",this.required=!1,this.disabled=!1,this.readonly=!1,this.clickable=!1,this.spellcheck=!1,this.align="left",this.autofocus=!1,this.autocomplete="on",this.tabIndex=0,this.error=!1,this.size="md",this.validateOn="touched",this.validationMessage="",this.inputRef=m.createRef(),this.isAutofilled=!1,this.touched=!1,this.dirty=!1,this.submitted=!1,this.defaultValue="","attachInternals"in this)try{this.internals=this.attachInternals()}catch{this.internals=void 0}}willUpdate(t){this.id||(this.id="sch-input-"+exports.SchmancyInputV2._idCounter++),super.willUpdate(t)}get form(){return this.internals?.form??null}updated(t){super.updated(t),t.has("value")&&(this.value!==this.defaultValue&&(this.dirty=!0),this.internals?.setFormValue(this.value),this.validateInput()),t.has("error")&&this.updateValidityState(),!this.hasUpdated&&t.has("value")&&(this.defaultValue=this.value)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.setupFormIntegration(),this.setupExternalLabelAssociation()}setupFormIntegration(){this.internals?.form&&(this.formResetObserver=new MutationObserver(t=>{for(const e of t)e.type==="attributes"&&e.attributeName==="reset"&&this.resetToDefault()}),this.formResetObserver.observe(this.internals.form,{attributes:!0,childList:!1,subtree:!1}),this.internals.form.addEventListener("reset",()=>{this.resetToDefault()}),this.internals.form.addEventListener("submit",()=>{this.submitted=!0,this.validateInput(!0)}))}setupExternalLabelAssociation(){if(this.id){const t=()=>{document.querySelectorAll(`label[for="${this.id}"]`).forEach(e=>{e.addEventListener("click",()=>{this.focus()})})};document.readyState==="complete"?t():document.addEventListener("DOMContentLoaded",t)}}disconnectedCallback(){super.disconnectedCallback(),this.formResetObserver&&this.formResetObserver.disconnect(),this.id&&document.querySelectorAll(`label[for="${this.id}"]`).forEach(t=>{t.removeEventListener("click",()=>{this.focus()})})}resetToDefault(){this.value=this.defaultValue,this.touched=!1,this.dirty=!1,this.submitted=!1,this.error=!1,this.validationMessage="",this.dispatchEvent(new CustomEvent("reset",{bubbles:!0}))}shouldShowValidation(t=!1){if(t)return!0;switch(this.validateOn){case"always":return!0;case"touched":default:return this.touched;case"dirty":return this.dirty;case"submitted":return this.submitted}}updateValidityState(){this.error?this.validationMessage?this.internals?.setValidity({customError:!0},this.validationMessage,this.inputElement):this.internals?.setValidity({customError:!0},"Invalid input",this.inputElement):this.internals?.setValidity({})}validateInput(t=!1){if(this.disabled)return;const e=this.shouldShowValidation(t),n=this.inputElement?.validity??{customError:!1,valid:!0},l=!n.valid&&!n.customError;e&&l?(this.error=!0,this.validationMessage=this.inputElement?.validationMessage||""):n.valid?(this.error=!1,n.customError||(this.validationMessage="")):e||(this.error=!1),this.updateValidityState()}checkValidity(){const t=this.inputRef.value?.checkValidity()??!0;return this.internals&&!t?(this.internals.checkValidity(),!1):t}reportValidity(){this.touched=!0,this.submitted=!0;const t=this.inputRef.value?.reportValidity()??!0;return this.validateInput(!0),this.internals&&!t?(this.internals.reportValidity(),!1):t}setCustomValidity(t){this.inputRef.value&&this.inputRef.value.setCustomValidity(t),this.validationMessage=t,this.error=t!==""&&this.shouldShowValidation(),this.internals&&(t?this.internals.setValidity({customError:!0},t,this.inputElement):this.internals.setValidity({}))}firstUpdated(){this.autofocus&&setTimeout(()=>{this.focus()},0),this.setupInputEvents(),this.setupFocusBlurEvents(),this.setupAutofillDetection(),this.setupEnterKeyEvents()}setupInputEvents(){s.fromEvent(this.inputElement,"input").pipe(s.map(t=>{const e=t;return{value:t.target.value,inputType:e.inputType,data:e.data,isComposing:e.isComposing,originalEvent:t}}),s.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t.value,this.dirty=this.value!==this.defaultValue;const e=new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0});Object.defineProperties(e,{inputType:{value:t.inputType},data:{value:t.data},isComposing:{value:t.isComposing}}),this.dispatchEvent(e),this.validateInput()}),s.fromEvent(this.inputElement,"change").pipe(s.map(t=>t.target.value),s.distinctUntilChanged(),s.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dirty=this.value!==this.defaultValue,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0})),this.validateInput()})}setupFocusBlurEvents(){s.fromEvent(this.inputElement,"focus").pipe(s.takeUntil(this.disconnecting)).subscribe(t=>{const e=new CustomEvent("focus",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(e,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(e)}),s.fromEvent(this.inputElement,"blur").pipe(s.takeUntil(this.disconnecting)).subscribe(t=>{this.touched=!0,this.disabled||this.validateInput();const e=new CustomEvent("blur",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(e,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(e)})}setupAutofillDetection(){s.fromEvent(this.inputElement,"animationstart").pipe(s.filter(t=>t.animationName==="onAutoFillStart"),s.takeUntil(this.disconnecting)).subscribe(t=>{const{value:e}=t.target;this.value=e,this.isAutofilled=!0,this.dirty=this.value!==this.defaultValue,this.dispatchEvent(new CustomEvent("autofill",{detail:{value:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}),s.fromEvent(this.inputElement,"animationstart").pipe(s.filter(t=>t.animationName==="onAutoFillCancel"),s.takeUntil(this.disconnecting)).subscribe(()=>{this.isAutofilled=!1})}setupEnterKeyEvents(){s.fromEvent(this.inputElement,"keyup").pipe(s.filter(t=>t.key==="Enter"),s.takeUntil(this.disconnecting)).subscribe(t=>{const{value:e}=t.target;this.value=e,this.dirty=this.value!==this.defaultValue;const n=new CustomEvent("enter",{detail:{value:e},bubbles:!0,composed:!0});Object.defineProperties(n,{key:{value:"Enter"},code:{value:"Enter"},keyCode:{value:13},which:{value:13}}),this.dispatchEvent(n)})}select(){return this.inputRef.value?.select()}getValidity(){return this.inputRef.value?.validity}setSelectionRange(t,e,n){this.inputRef.value?.setSelectionRange(t,e,n)}get selectionStart(){return this.inputRef.value?.selectionStart??null}get selectionEnd(){return this.inputRef.value?.selectionEnd??null}get selectionDirection(){return this.inputRef.value?.selectionDirection??null}setRangeText(t,e,n,l){e!==void 0&&n!==void 0?this.inputRef.value?.setRangeText(t,e,n,l):this.inputRef.value?.setRangeText(t)}focus(t){this.inputRef.value?.focus(t),this.dispatchEvent(new Event("focus"))}click(){this.inputRef.value?.click(),this.dispatchEvent(new Event("click"))}blur(){this.inputRef.value?.blur(),this.dispatchEvent(new Event("blur"))}render(){const{height:t,padding:e,fontSize:n}=(()=>{switch(this.size){case"sm":return{height:"40px",padding:"0 8px",fontSize:"0.875rem"};case"lg":return{height:"60px",padding:"0 20px",fontSize:"1.125rem"};default:return{height:"50px",padding:"0 16px",fontSize:"1rem"}}})(),l={"w-full flex-1 rounded-[8px] border-0 bg-surface-highest text-surface-on":!0,"outline-secondary-default focus:outline-1 ":!0,"outline-secondary-default focus:outline-1":!0,"disabled:opacity-40 disabled:cursor-not-allowed":!0,"placeholder:text-muted":!0,"ring-0 ring-inset focus:ring-1 focus:ring-inset":!0,"ring-secondary-default ring-outline focus:ring-secondary-default":!this.error,"ring-error-default focus:ring-error-default":this.error,"caret-transparent focus:outline-hidden cursor-pointer text-select-none":this.readonly,"cursor-pointer":this.clickable,"text-center":this.align==="center","text-right":this.align==="right",autofilled:this.isAutofilled},h={"opacity-40":this.disabled,"block mb-[4px]":!0,"text-sm":this.size==="sm","text-base":this.size==="md","text-lg":this.size==="lg"},o={height:t,padding:e,fontSize:n};return u.html`
2
+ ${y.when(this.label,()=>u.html`
3
+ <label
4
+ for=${this.id}
5
+ id="label-${this.id}"
6
+ class=${this.classMap(h)}
7
+ ${f.color({color:this.error?d.SchmancyTheme.sys.color.error.default:d.SchmancyTheme.sys.color.primary.default})}
8
+ >
9
+ <schmancy-typography type="label" token=${this.size==="sm"?"sm":this.size==="lg"?"lg":"md"}>
10
+ ${this.label}
11
+ </schmancy-typography>
12
+ </label>
13
+ `)}
14
+
15
+ <input
16
+ ${f.color({bgColor:d.SchmancyTheme.sys.color.surface.highest,color:d.SchmancyTheme.sys.color.surface.on})}
17
+ ${m.ref(this.inputRef)}
18
+ id=${this.id}
19
+ name=${this.name}
20
+ class=${this.classMap(l)}
21
+ style=${this.styleMap(o)}
22
+ .value=${this.value}
23
+ .type=${this.type}
24
+ .autocomplete=${this.autocomplete}
25
+ .spellcheck=${this.spellcheck}
26
+ placeholder=${this.placeholder}
27
+ inputmode=${p.ifDefined(this.inputmode)}
28
+ pattern=${p.ifDefined(this.pattern)}
29
+ step=${p.ifDefined(this.step)}
30
+ minlength=${p.ifDefined(this.minlength)}
31
+ maxlength=${p.ifDefined(this.maxlength)}
32
+ min=${p.ifDefined(this.min)}
33
+ max=${p.ifDefined(this.max)}
34
+ list=${p.ifDefined(this.list)}
35
+ ?required=${this.required}
36
+ ?disabled=${this.disabled}
37
+ ?readonly=${this.readonly}
38
+ aria-invalid=${this.error?"true":"false"}
39
+ aria-required=${this.required?"true":"false"}
40
+ aria-labelledby=${this.label?`label-${this.id}`:u.nothing}
41
+ aria-describedby=${this.hint?`hint-${this.id}`:u.nothing}
42
+ aria-label=${p.ifDefined(this.label?void 0:this.placeholder||"Input")}
43
+ aria-autocomplete=${this.list?"list":"none"}
44
+ />
45
+
46
+ ${y.when(this.hint,()=>u.html`
47
+ <div
48
+ id="hint-${this.id}"
49
+ class="${this.size==="sm"?"pt-[1px] text-xs":this.size==="lg"?"pt-[3px] text-base":"pt-[2px] text-sm"}"
50
+ ${f.color({color:this.error?d.SchmancyTheme.sys.color.error.default:d.SchmancyTheme.sys.color.primary.default})}
51
+ >
52
+ <schmancy-typography
53
+ align="left"
54
+ type="label"
55
+ token=${this.size==="sm"?"sm":this.size==="lg"?"lg":"md"}
56
+ >
57
+ ${this.hint}
58
+ </schmancy-typography>
59
+ </div>
60
+ `)}
61
+ `}},exports.SchmancyInputV2._idCounter=0,exports.SchmancyInputV2.formAssociated=!0,exports.SchmancyInputV2.shadowRootOptions={...u.LitElement.shadowRootOptions,delegatesFocus:!0},a([i.property({reflect:!0})],exports.SchmancyInputV2.prototype,"id",2),a([i.property({type:String})],exports.SchmancyInputV2.prototype,"label",2),a([i.property({reflect:!0})],exports.SchmancyInputV2.prototype,"type",2),a([i.property()],exports.SchmancyInputV2.prototype,"name",2),a([i.property()],exports.SchmancyInputV2.prototype,"placeholder",2),a([i.property({type:String,reflect:!0})],exports.SchmancyInputV2.prototype,"value",2),a([i.property({type:String,reflect:!0})],exports.SchmancyInputV2.prototype,"pattern",2),a([i.property({type:Boolean,reflect:!0})],exports.SchmancyInputV2.prototype,"required",2),a([i.property({type:Boolean,reflect:!0})],exports.SchmancyInputV2.prototype,"disabled",2),a([i.property({type:Boolean,reflect:!0})],exports.SchmancyInputV2.prototype,"readonly",2),a([i.property({type:Boolean,reflect:!0})],exports.SchmancyInputV2.prototype,"clickable",2),a([i.property({type:Boolean,reflect:!0})],exports.SchmancyInputV2.prototype,"spellcheck",2),a([i.property({type:String,reflect:!0})],exports.SchmancyInputV2.prototype,"align",2),a([i.property()],exports.SchmancyInputV2.prototype,"inputmode",2),a([i.property({type:Number,reflect:!0})],exports.SchmancyInputV2.prototype,"minlength",2),a([i.property({type:Number})],exports.SchmancyInputV2.prototype,"maxlength",2),a([i.property()],exports.SchmancyInputV2.prototype,"min",2),a([i.property()],exports.SchmancyInputV2.prototype,"max",2),a([i.property({type:Number,reflect:!0})],exports.SchmancyInputV2.prototype,"step",2),a([i.property({type:Boolean})],exports.SchmancyInputV2.prototype,"autofocus",2),a([i.property({type:String,reflect:!0})],exports.SchmancyInputV2.prototype,"autocomplete",2),a([i.property({type:Number,reflect:!0})],exports.SchmancyInputV2.prototype,"tabIndex",2),a([i.property()],exports.SchmancyInputV2.prototype,"hint",2),a([i.property({type:Boolean,reflect:!0})],exports.SchmancyInputV2.prototype,"error",2),a([i.property({type:String,reflect:!0})],exports.SchmancyInputV2.prototype,"size",2),a([i.property({type:String})],exports.SchmancyInputV2.prototype,"validateOn",2),a([i.property({type:String})],exports.SchmancyInputV2.prototype,"list",2),a([i.property({type:String})],exports.SchmancyInputV2.prototype,"validationMessage",2),a([i.query("input")],exports.SchmancyInputV2.prototype,"inputElement",2),a([i.state()],exports.SchmancyInputV2.prototype,"isAutofilled",2),a([i.state()],exports.SchmancyInputV2.prototype,"touched",2),a([i.state()],exports.SchmancyInputV2.prototype,"dirty",2),a([i.state()],exports.SchmancyInputV2.prototype,"submitted",2),a([i.state()],exports.SchmancyInputV2.prototype,"defaultValue",2),exports.SchmancyInputV2=a([i.customElement("sch-input")],exports.SchmancyInputV2);var w=Object.defineProperty,k=Object.getOwnPropertyDescriptor,r=(t,e,n,l)=>{for(var h,o=l>1?void 0:l?k(e,n):e,c=t.length-1;c>=0;c--)(h=t[c])&&(o=(l?h(e,n,o):h(o))||o);return l&&o&&w(e,n,o),o};exports.SchmancyInput=class extends g.SchmancyFormField(b){constructor(){super(...arguments),this.value="",this.type="text",this.placeholder="",this.clickable=!1,this.spellcheck=!1,this.align="left",this.autofocus=!1,this.autocomplete="on",this.tabIndex=0,this.size="md",this.validateOn="touched",this.inputRef=m.createRef(),this.isAutofilled=!1,this.touched=!1,this.dirty=!1,this.submitted=!1,this.defaultValue=""}willUpdate(t){this.id||(this.id="sch-input-"+exports.SchmancyInput._idCounter++),super.willUpdate(t)}updated(t){super.updated(t),t.has("value")&&(this.value!==this.defaultValue&&(this.dirty=!0),this.validateInput()),!this.hasUpdated&&t.has("value")&&(this.defaultValue=this.value)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.setupFormIntegration(),this.setupExternalLabelAssociation()}setupFormIntegration(){this.form&&(this.formResetObserver=new MutationObserver(t=>{for(const e of t)e.type==="attributes"&&e.attributeName==="reset"&&this.resetToDefault()}),this.formResetObserver.observe(this.form,{attributes:!0,childList:!1,subtree:!1}),this.form.addEventListener("reset",()=>{this.resetToDefault()}),this.form.addEventListener("submit",()=>{this.submitted=!0,this.validateInput(!0)}))}setupExternalLabelAssociation(){if(this.id){const t=()=>{document.querySelectorAll(`label[for="${this.id}"]`).forEach(e=>{e.addEventListener("click",()=>{this.focus()})})};document.readyState==="complete"?t():document.addEventListener("DOMContentLoaded",t)}}disconnectedCallback(){super.disconnectedCallback(),this.formResetObserver&&this.formResetObserver.disconnect(),this.id&&document.querySelectorAll(`label[for="${this.id}"]`).forEach(t=>{t.removeEventListener("click",()=>{this.focus()})})}resetToDefault(){this.value=this.defaultValue,this.touched=!1,this.dirty=!1,this.submitted=!1,this.error=!1,this.validationMessage="",this.dispatchEvent(new CustomEvent("reset",{bubbles:!0}))}shouldShowValidation(t=!1){if(t)return!0;switch(this.validateOn){case"always":return!0;case"touched":default:return this.touched;case"dirty":return this.dirty;case"submitted":return this.submitted}}validateInput(t=!1){if(this.disabled)return;const e=this.shouldShowValidation(t),n=this.inputElement?.validity??{customError:!1,valid:!0},l=!n.valid&&!n.customError;e&&l?(this.error=!0,this.validationMessage=this.inputElement?.validationMessage||""):n.valid?(this.error=!1,n.customError||(this.validationMessage="")):e||(this.error=!1)}checkValidity(){const t=this.inputRef.value?.checkValidity()??!0,e=super.checkValidity();return t&&e}reportValidity(){this.touched=!0,this.submitted=!0;const t=this.inputRef.value?.reportValidity()??!0;this.validateInput(!0);const e=super.reportValidity();return t&&e}setCustomValidity(t){this.inputRef.value&&this.inputRef.value.setCustomValidity(t),super.setCustomValidity(t),this.error=t!==""&&this.shouldShowValidation()}firstUpdated(){this.autofocus&&setTimeout(()=>{this.focus()},0),this.setupInputEvents(),this.setupFocusBlurEvents(),this.setupAutofillDetection(),this.setupEnterKeyEvents()}setupInputEvents(){s.fromEvent(this.inputElement,"input").pipe(s.map(t=>{const e=t;return{value:t.target.value,inputType:e.inputType,data:e.data,isComposing:e.isComposing,originalEvent:t}}),s.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t.value,this.dirty=this.value!==this.defaultValue;const e=new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0});Object.defineProperties(e,{inputType:{value:t.inputType},data:{value:t.data},isComposing:{value:t.isComposing}}),this.dispatchEvent(e),this.validateInput()}),s.fromEvent(this.inputElement,"change").pipe(s.map(t=>t.target.value),s.distinctUntilChanged(),s.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dirty=this.value!==this.defaultValue,this.emitChange({value:t}),this.validateInput()})}setupFocusBlurEvents(){s.fromEvent(this.inputElement,"focus").pipe(s.takeUntil(this.disconnecting)).subscribe(t=>{const e=new CustomEvent("focus",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(e,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(e)}),s.fromEvent(this.inputElement,"blur").pipe(s.takeUntil(this.disconnecting)).subscribe(t=>{this.touched=!0,this.disabled||this.validateInput();const e=new CustomEvent("blur",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(e,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(e)})}setupAutofillDetection(){s.fromEvent(this.inputElement,"animationstart").pipe(s.filter(t=>t.animationName==="onAutoFillStart"),s.takeUntil(this.disconnecting)).subscribe(t=>{const{value:e}=t.target;this.value=e,this.isAutofilled=!0,this.dirty=this.value!==this.defaultValue,this.dispatchEvent(new CustomEvent("autofill",{detail:{value:e},bubbles:!0,composed:!0})),this.emitChange({value:e})}),s.fromEvent(this.inputElement,"animationstart").pipe(s.filter(t=>t.animationName==="onAutoFillCancel"),s.takeUntil(this.disconnecting)).subscribe(()=>{this.isAutofilled=!1})}setupEnterKeyEvents(){s.fromEvent(this.inputElement,"keydown").pipe(s.filter(t=>t.key==="Enter"),s.takeUntil(this.disconnecting)).subscribe(t=>{const{value:e}=t.target;this.value!==e&&(this.value=e,this.dirty=this.value!==this.defaultValue),this.inputElement.blur();const n=new CustomEvent("enter",{detail:{value:this.value},bubbles:!0,composed:!0});Object.defineProperties(n,{key:{value:"Enter"},code:{value:"Enter"},keyCode:{value:13},which:{value:13}}),this.dispatchEvent(n)})}select(){return this.inputRef.value?.select()}getValidity(){return this.inputRef.value?.validity}setSelectionRange(t,e,n){this.inputRef.value?.setSelectionRange(t,e,n)}get selectionStart(){return this.inputRef.value?.selectionStart??null}get selectionEnd(){return this.inputRef.value?.selectionEnd??null}get selectionDirection(){return this.inputRef.value?.selectionDirection??null}setRangeText(t,e,n,l){e!==void 0&&n!==void 0?this.inputRef.value?.setRangeText(t,e,n,l):this.inputRef.value?.setRangeText(t)}focus(t){this.inputRef.value?.focus(t),this.dispatchEvent(new Event("focus"))}click(){this.inputRef.value?.click(),this.dispatchEvent(new Event("click"))}blur(){this.inputRef.value?.blur(),this.dispatchEvent(new Event("blur"))}render(){const{height:t,padding:e,fontSize:n}=(()=>{switch(this.size){case"sm":return{height:"40px",padding:"0 8px",fontSize:"0.875rem"};case"lg":return{height:"60px",padding:"0 20px",fontSize:"1.125rem"};default:return{height:"50px",padding:"0 16px",fontSize:"1rem"}}})(),l=["date","datetime-local","time","month","week"].includes(this.type),h={"block w-full min-w-0 rounded-[8px] border-0 bg-surface-highest text-surface-on":!0,"outline-secondary-default focus:outline-1":!0,"disabled:opacity-40 disabled:cursor-not-allowed":!0,"placeholder:text-muted":!0,"ring-0 ring-inset focus:ring-1 focus:ring-inset":!0,"ring-secondary-default ring-outline focus:ring-secondary-default":!this.error,"ring-error-default focus:ring-error-default":this.error,"caret-transparent focus:outline-hidden cursor-pointer select-none":this.readonly,"cursor-pointer":this.clickable,"text-left":this.align==="left"||l,"text-center":this.align==="center"&&!l,"text-right":this.align==="right"&&!l,autofilled:this.isAutofilled},o={"block mb-1 font-medium":!0,"opacity-40":this.disabled,"text-sm":this.size==="sm","text-base":this.size==="md","text-lg":this.size==="lg","text-primary-default":!this.error,"text-error-default":this.error},c={height:t,padding:e,fontSize:n,lineHeight:t};return u.html`
62
+ <div class="w-full min-w-0 ${l?"date-input-container":""}">
63
+ ${y.when(this.label,()=>u.html`
64
+ <label
65
+ for=${this.id}
66
+ class=${this.classMap(o)}
67
+ >
68
+ ${this.label}
69
+ </label>
70
+ `)}
71
+
72
+ <input
73
+ ${m.ref(this.inputRef)}
74
+ id=${this.id}
75
+ name=${this.name}
76
+ class=${this.classMap(h)}
77
+ style=${this.styleMap(c)}
78
+ .value=${this.value}
79
+ .type=${this.type}
80
+ .autocomplete=${this.autocomplete}
81
+ .spellcheck=${this.spellcheck}
82
+ placeholder=${this.placeholder}
83
+ inputmode=${p.ifDefined(this.inputmode)}
84
+ pattern=${p.ifDefined(this.pattern)}
85
+ step=${p.ifDefined(this.step)}
86
+ minlength=${p.ifDefined(this.minlength)}
87
+ maxlength=${p.ifDefined(this.maxlength)}
88
+ min=${p.ifDefined(this.min)}
89
+ max=${p.ifDefined(this.max)}
90
+ list=${p.ifDefined(this.list)}
91
+ ?required=${this.required}
92
+ ?disabled=${this.disabled}
93
+ ?readonly=${this.readonly}
94
+ aria-invalid=${this.error?"true":"false"}
95
+ aria-required=${this.required?"true":"false"}
96
+ aria-labelledby=${this.label?`label-${this.id}`:u.nothing}
97
+ aria-describedby=${this.hint||this.validationMessage?`hint-${this.id}`:u.nothing}
98
+ aria-label=${p.ifDefined(this.label?void 0:this.placeholder||"Input")}
99
+ />
100
+
101
+ ${y.when(this.hint||this.error&&this.validationMessage,()=>u.html`
102
+ <div
103
+ id="hint-${this.id}"
104
+ class="mt-1 text-sm ${this.error?"text-error-default":"text-surface-onVariant"}"
105
+ >
106
+ ${this.error&&this.validationMessage?this.validationMessage:this.hint}
107
+ </div>
108
+ `)}
109
+ </div>
110
+ `}},exports.SchmancyInput._idCounter=0,exports.SchmancyInput.shadowRootOptions={...u.LitElement.shadowRootOptions,delegatesFocus:!0},r([i.property({type:String,reflect:!0})],exports.SchmancyInput.prototype,"value",2),r([i.property({reflect:!0})],exports.SchmancyInput.prototype,"type",2),r([i.property()],exports.SchmancyInput.prototype,"placeholder",2),r([i.property({type:String,reflect:!0})],exports.SchmancyInput.prototype,"pattern",2),r([i.property({type:Boolean,reflect:!0})],exports.SchmancyInput.prototype,"clickable",2),r([i.property({type:Boolean,reflect:!0})],exports.SchmancyInput.prototype,"spellcheck",2),r([i.property({type:String,reflect:!0})],exports.SchmancyInput.prototype,"align",2),r([i.property()],exports.SchmancyInput.prototype,"inputmode",2),r([i.property({type:Number,reflect:!0})],exports.SchmancyInput.prototype,"minlength",2),r([i.property({type:Number})],exports.SchmancyInput.prototype,"maxlength",2),r([i.property()],exports.SchmancyInput.prototype,"min",2),r([i.property()],exports.SchmancyInput.prototype,"max",2),r([i.property({type:Number,reflect:!0})],exports.SchmancyInput.prototype,"step",2),r([i.property({type:Boolean})],exports.SchmancyInput.prototype,"autofocus",2),r([i.property({type:String,reflect:!0})],exports.SchmancyInput.prototype,"autocomplete",2),r([i.property({type:Number,reflect:!0})],exports.SchmancyInput.prototype,"tabIndex",2),r([i.property({type:String,reflect:!0})],exports.SchmancyInput.prototype,"size",2),r([i.property({type:String})],exports.SchmancyInput.prototype,"validateOn",2),r([i.property({type:String})],exports.SchmancyInput.prototype,"list",2),r([i.query("input")],exports.SchmancyInput.prototype,"inputElement",2),r([i.state()],exports.SchmancyInput.prototype,"isAutofilled",2),r([i.state()],exports.SchmancyInput.prototype,"touched",2),r([i.state()],exports.SchmancyInput.prototype,"dirty",2),r([i.state()],exports.SchmancyInput.prototype,"submitted",2),r([i.state()],exports.SchmancyInput.prototype,"defaultValue",2),exports.SchmancyInput=r([i.customElement("schmancy-input")],exports.SchmancyInput);
111
+ //# sourceMappingURL=input-BN9xQTH0.cjs.map