@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
package/dist/index.js
CHANGED
|
@@ -1,92 +1,88 @@
|
|
|
1
1
|
import "./animated-text-CNPSIIYg.js";
|
|
2
|
-
import { F as g, H as u, b as D, S as
|
|
3
|
-
import { l as
|
|
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 Y, H as z, q as G, S as
|
|
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
6
|
import { S as ya } from "./boat-DPTS3Kpw.js";
|
|
7
7
|
import "./spinner-BPqLh7JL.js";
|
|
8
8
|
import { S as pa, a as la } from "./icon-button-Ckd9jE-a.js";
|
|
9
|
-
import
|
|
10
|
-
import { S as
|
|
9
|
+
import "./media-DHgb7H9L.js";
|
|
10
|
+
import { S as xa } from "./checkbox-B85eeKqn.js";
|
|
11
11
|
import "./chips-BNRMzGrx.js";
|
|
12
|
-
import { S as
|
|
13
|
-
import { S as
|
|
14
|
-
import { S as
|
|
15
|
-
import { S as
|
|
16
|
-
import { S as
|
|
17
|
-
import { S as
|
|
18
|
-
import { C as
|
|
19
|
-
import { $ as
|
|
20
|
-
import { c as
|
|
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
|
|
23
|
-
import { S as
|
|
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-
|
|
27
|
-
import { S as
|
|
28
|
-
import { L as
|
|
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
|
|
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
|
|
34
|
-
import { mutationObserver as
|
|
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
|
|
37
|
+
import { S as ge } from "./select-Bl8FO2kb.js";
|
|
38
38
|
import "./sheet-WpG2m2yT.js";
|
|
39
|
-
import { S as
|
|
40
|
-
import { S as
|
|
41
|
-
import { S as
|
|
42
|
-
import { B as
|
|
43
|
-
import { p as
|
|
44
|
-
import { a as
|
|
45
|
-
import { a as
|
|
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
|
|
48
|
+
import { S as Or } from "./theme.interface-C5Kj6WjD.js";
|
|
49
49
|
import "./theme-button-C8cK7un6.js";
|
|
50
|
-
import { S as
|
|
51
|
-
import { S as
|
|
52
|
-
import { SchmancyEvents as
|
|
53
|
-
import { T as
|
|
54
|
-
import { S as
|
|
55
|
-
import { i as
|
|
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
|
-
|
|
57
|
+
ka as $dialog,
|
|
58
58
|
Y as $drawer,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
Se as $notify,
|
|
60
|
+
Le as BaseStore,
|
|
61
|
+
Fa as ConfirmDialog,
|
|
62
|
+
La as DialogService,
|
|
63
63
|
g as FINDING_MORTIES,
|
|
64
64
|
u as HERE_RICKY,
|
|
65
65
|
D as HISTORY_STRATEGY,
|
|
66
66
|
z as HereMorty,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
76
|
G as SchmancyAvatar,
|
|
77
|
-
|
|
77
|
+
V as SchmancyBadgeV2,
|
|
78
78
|
ya as SchmancyBoat,
|
|
79
79
|
pa as SchmancyButton,
|
|
80
|
-
xa as
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
Ma as SchmancyCode,
|
|
87
|
-
Ra as SchmancyCodeHighlight,
|
|
88
|
-
Aa as SchmancyCodePreview,
|
|
89
|
-
V as SchmancyContentDrawer,
|
|
80
|
+
xa as SchmancyCheckbox,
|
|
81
|
+
Ca as SchmancyCircularProgress,
|
|
82
|
+
ua as SchmancyCode,
|
|
83
|
+
Da as SchmancyCodeHighlight,
|
|
84
|
+
wa as SchmancyCodePreview,
|
|
85
|
+
W as SchmancyContentDrawer,
|
|
90
86
|
K as SchmancyContentDrawerID,
|
|
91
87
|
_ as SchmancyContentDrawerMain,
|
|
92
88
|
q as SchmancyContentDrawerMaxHeight,
|
|
@@ -94,122 +90,124 @@ export {
|
|
|
94
90
|
J as SchmancyContentDrawerSheet,
|
|
95
91
|
U as SchmancyContentDrawerSheetMode,
|
|
96
92
|
X as SchmancyContentDrawerSheetState,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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,
|
|
104
100
|
Z as SchmancyDrawerAppbar,
|
|
105
101
|
aa as SchmancyDrawerNavbarMode,
|
|
106
102
|
ea as SchmancyDrawerNavbarState,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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,
|
|
115
113
|
ra as SchmancyNavigationDrawer,
|
|
116
114
|
ta as SchmancyNavigationDrawerContent,
|
|
117
115
|
oa as SchmancyNavigationDrawerSidebar,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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,
|
|
132
130
|
ca as SchmancyTeleportation,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
Or as SchmancyTheme,
|
|
132
|
+
we as SchmancyThemeComponent,
|
|
133
|
+
Qa as SchmancyTimezonesSelect,
|
|
134
|
+
jr as SchmancyTooltip,
|
|
135
|
+
Pr as SchmancyTree,
|
|
136
|
+
Kr as SchmancyTypography,
|
|
139
137
|
la as SchmnacyIconButton,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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,
|
|
148
146
|
sa as WhereAreYouRicky,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
T as area,
|
|
148
|
+
M as buildQueryString,
|
|
149
|
+
Ya as color,
|
|
150
|
+
R as compareActiveRoutes,
|
|
151
|
+
A as compareCustomElementConstructors,
|
|
154
152
|
v as compareRouteActions,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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,
|
|
169
167
|
N as createRouteCacheKey,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
Sr as createSelector,
|
|
169
|
+
ir as createSortSelector,
|
|
170
|
+
_e as createStorageManager,
|
|
171
|
+
yr as createTestArrayContext,
|
|
174
172
|
H as debounce,
|
|
175
173
|
E as decodeRouteState,
|
|
176
174
|
B as deepMerge,
|
|
177
|
-
|
|
175
|
+
Ea as delayContext,
|
|
178
176
|
F as encodeRouteState,
|
|
179
177
|
O as extractQueryParams,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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,
|
|
187
185
|
$ as getTagName,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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,
|
|
195
193
|
j as isObject,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
Tr as isPlainObject,
|
|
195
|
+
br as isSet,
|
|
196
|
+
Ir as isString,
|
|
197
|
+
de as mutationObserver,
|
|
200
198
|
k as normalizeTagName,
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
Ga as ripple,
|
|
200
|
+
b as routerHistory,
|
|
203
201
|
L as sanitizeRouteState,
|
|
204
202
|
na as schmancyContentDrawer,
|
|
205
203
|
ma as schmancyNavDrawer,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
204
|
+
Mr as select,
|
|
205
|
+
Rr as selectItem,
|
|
206
|
+
Ae as sheet,
|
|
207
|
+
je as stepsContext,
|
|
208
|
+
ve as tailwindStyles,
|
|
211
209
|
Sa as teleport,
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
kr as tooltip,
|
|
211
|
+
Ra as validateInitialDateRange
|
|
214
212
|
};
|
|
215
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
|