@maggioli-design-system/mds-input 4.2.0 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-3097681c.js → index-2bcac156.js} +119 -24
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-input.cjs.entry.js +2 -2
- package/dist/cjs/mds-input.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +9 -1
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/components/mds-input/mds-input.css +34 -71
- package/dist/collection/components/mds-input/test/mds-input.stories.js +5 -5
- package/dist/components/mds-input.js +3 -1
- package/dist/documentation.json +3 -3
- package/dist/esm/{index-e22ac7e3.js → index-0c539bb1.js} +119 -24
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-input.entry.js +2 -2
- package/dist/esm/mds-input.js +4 -4
- package/dist/esm-es5/index-0c539bb1.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-input.entry.js +1 -1
- package/dist/esm-es5/mds-input.js +1 -1
- package/dist/mds-input/mds-input.esm.js +1 -1
- package/dist/mds-input/mds-input.js +1 -1
- package/dist/mds-input/p-5d146ed2.entry.js +1 -0
- package/dist/mds-input/p-a71f012b.js +2 -0
- package/dist/mds-input/p-b114c68e.system.js +1 -0
- package/dist/mds-input/p-c6930a3e.system.js +2 -0
- package/dist/mds-input/p-d184781a.system.entry.js +1 -0
- package/dist/stats.json +32 -30
- package/dist/types/common/aria.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +19 -0
- package/documentation.json +14 -4
- package/package.json +6 -6
- package/readme.md +3 -1
- package/src/common/aria.ts +12 -0
- package/src/common/keyboard-manager.ts +2 -2
- package/src/components/mds-input/mds-input.css +33 -34
- package/src/components/mds-input/readme.md +1 -1
- package/src/components/mds-input/test/mds-input.stories.mdx +1 -3
- package/src/components/mds-input/test/mds-input.stories.tsx +5 -5
- package/src/fixtures/icons.json +2 -0
- package/www/build/mds-input.esm.js +1 -1
- package/www/build/mds-input.js +1 -1
- package/www/build/p-5d146ed2.entry.js +1 -0
- package/www/build/p-a71f012b.js +2 -0
- package/www/build/p-b114c68e.system.js +1 -0
- package/www/build/p-c6930a3e.system.js +2 -0
- package/www/build/p-d184781a.system.entry.js +1 -0
- package/dist/esm-es5/index-e22ac7e3.js +0 -2
- package/dist/mds-input/p-228b0fab.system.js +0 -2
- package/dist/mds-input/p-2ccb5a3f.system.entry.js +0 -1
- package/dist/mds-input/p-34c8c829.system.js +0 -1
- package/dist/mds-input/p-4111271f.entry.js +0 -1
- package/dist/mds-input/p-c226a52a.js +0 -2
- package/www/build/p-228b0fab.system.js +0 -2
- package/www/build/p-2ccb5a3f.system.entry.js +0 -1
- package/www/build/p-34c8c829.system.js +0 -1
- package/www/build/p-4111271f.entry.js +0 -1
- package/www/build/p-c226a52a.js +0 -2
|
@@ -803,9 +803,9 @@ const patch = (oldVNode, newVNode) => {
|
|
|
803
803
|
}
|
|
804
804
|
};
|
|
805
805
|
/**
|
|
806
|
-
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
807
|
-
*
|
|
808
|
-
*
|
|
806
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
|
|
807
|
+
* them with `null`. This signals that the DOM element corresponding to the VDom
|
|
808
|
+
* node has been removed from the DOM.
|
|
809
809
|
*
|
|
810
810
|
* @param vNode a virtual DOM node
|
|
811
811
|
*/
|
|
@@ -1021,6 +1021,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1021
1021
|
*/
|
|
1022
1022
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1023
1023
|
try {
|
|
1024
|
+
/**
|
|
1025
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
1026
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
1027
|
+
*/
|
|
1024
1028
|
instance = instance.render() ;
|
|
1025
1029
|
{
|
|
1026
1030
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1093,6 +1097,16 @@ const appDidLoad = (who) => {
|
|
|
1093
1097
|
}
|
|
1094
1098
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1095
1099
|
};
|
|
1100
|
+
/**
|
|
1101
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
1102
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
1103
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
1104
|
+
* output bundle and this function returns `undefined`.
|
|
1105
|
+
* @param instance any object that may or may not contain methods
|
|
1106
|
+
* @param method method name
|
|
1107
|
+
* @param arg single arbitrary argument
|
|
1108
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
1109
|
+
*/
|
|
1096
1110
|
const safeCall = (instance, method, arg) => {
|
|
1097
1111
|
if (instance && instance[method]) {
|
|
1098
1112
|
try {
|
|
@@ -1160,6 +1174,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1160
1174
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1161
1175
|
*/
|
|
1162
1176
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1177
|
+
var _a;
|
|
1163
1178
|
if (cmpMeta.$members$) {
|
|
1164
1179
|
if (Cstr.watchers) {
|
|
1165
1180
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
@@ -1197,7 +1212,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1197
1212
|
});
|
|
1198
1213
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1199
1214
|
const attrNameToPropName = new Map();
|
|
1200
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1215
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1201
1216
|
plt.jmp(() => {
|
|
1202
1217
|
const propName = attrNameToPropName.get(attrName);
|
|
1203
1218
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -1245,26 +1260,65 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1245
1260
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1246
1261
|
return;
|
|
1247
1262
|
}
|
|
1263
|
+
else if (propName == null) {
|
|
1264
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1265
|
+
// on a vanilla web component
|
|
1266
|
+
const hostRef = getHostRef(this);
|
|
1267
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1268
|
+
// We only want to trigger the callback(s) if:
|
|
1269
|
+
// 1. The instance is ready
|
|
1270
|
+
// 2. The watchers are ready
|
|
1271
|
+
// 3. The value has changed
|
|
1272
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1273
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1274
|
+
newValue !== oldValue) {
|
|
1275
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1276
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
1277
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1278
|
+
if (instance[callbackName] != null) {
|
|
1279
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1248
1285
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1249
1286
|
});
|
|
1250
1287
|
};
|
|
1251
|
-
//
|
|
1252
|
-
//
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1288
|
+
// Create an array of attributes to observe
|
|
1289
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1290
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1291
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1292
|
+
// an invalid attribute.
|
|
1293
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1294
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1295
|
+
...members
|
|
1296
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1297
|
+
.map(([propName, m]) => {
|
|
1298
|
+
const attrName = m[1] || propName;
|
|
1299
|
+
attrNameToPropName.set(attrName, propName);
|
|
1300
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1301
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1302
|
+
}
|
|
1303
|
+
return attrName;
|
|
1304
|
+
}),
|
|
1305
|
+
]));
|
|
1263
1306
|
}
|
|
1264
1307
|
}
|
|
1265
1308
|
return Cstr;
|
|
1266
1309
|
};
|
|
1267
|
-
|
|
1310
|
+
/**
|
|
1311
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
1312
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
1313
|
+
* and (optionally) an HMR version ID.
|
|
1314
|
+
*
|
|
1315
|
+
* @param elm a host element
|
|
1316
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
1317
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
1318
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
1319
|
+
*/
|
|
1320
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1321
|
+
let Cstr;
|
|
1268
1322
|
// initializeComponent
|
|
1269
1323
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1270
1324
|
// Let the runtime know that the component has been initialized
|
|
@@ -1419,6 +1473,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1419
1473
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1420
1474
|
lazyBundles.map((lazyBundle) => {
|
|
1421
1475
|
lazyBundle[1].map((compactMeta) => {
|
|
1476
|
+
var _a;
|
|
1422
1477
|
const cmpMeta = {
|
|
1423
1478
|
$flags$: compactMeta[0],
|
|
1424
1479
|
$tagName$: compactMeta[1],
|
|
@@ -1432,7 +1487,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1432
1487
|
cmpMeta.$attrsToReflect$ = [];
|
|
1433
1488
|
}
|
|
1434
1489
|
{
|
|
1435
|
-
cmpMeta.$watchers$ = {};
|
|
1490
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
1436
1491
|
}
|
|
1437
1492
|
const tagName = cmpMeta.$tagName$;
|
|
1438
1493
|
const HostElement = class extends HTMLElement {
|
|
@@ -1511,13 +1566,40 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1511
1566
|
* @returns void
|
|
1512
1567
|
*/
|
|
1513
1568
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1569
|
+
/**
|
|
1570
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
1571
|
+
* instances.
|
|
1572
|
+
*/
|
|
1514
1573
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1574
|
+
/**
|
|
1575
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
1576
|
+
*
|
|
1577
|
+
* @param ref the runtime ref of interest
|
|
1578
|
+
* @returns the Host reference (if found) or undefined
|
|
1579
|
+
*/
|
|
1515
1580
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1581
|
+
/**
|
|
1582
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
1583
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
1584
|
+
*
|
|
1585
|
+
* @param lazyInstance the lazy instance of interest
|
|
1586
|
+
* @param hostRef that instances `HostRef` object
|
|
1587
|
+
* @returns a reference to the host ref WeakMap
|
|
1588
|
+
*/
|
|
1516
1589
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1517
|
-
|
|
1590
|
+
/**
|
|
1591
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
1592
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
1593
|
+
* metadata.
|
|
1594
|
+
*
|
|
1595
|
+
* @param hostElement the host element to register
|
|
1596
|
+
* @param cmpMeta runtime metadata for that component
|
|
1597
|
+
* @returns a reference to the host ref WeakMap
|
|
1598
|
+
*/
|
|
1599
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
1518
1600
|
const hostRef = {
|
|
1519
1601
|
$flags$: 0,
|
|
1520
|
-
$hostElement$:
|
|
1602
|
+
$hostElement$: hostElement,
|
|
1521
1603
|
$cmpMeta$: cmpMeta,
|
|
1522
1604
|
$instanceValues$: new Map(),
|
|
1523
1605
|
};
|
|
@@ -1526,10 +1608,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1526
1608
|
}
|
|
1527
1609
|
{
|
|
1528
1610
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1529
|
-
|
|
1530
|
-
|
|
1611
|
+
hostElement['s-p'] = [];
|
|
1612
|
+
hostElement['s-rc'] = [];
|
|
1531
1613
|
}
|
|
1532
|
-
return hostRefs.set(
|
|
1614
|
+
return hostRefs.set(hostElement, hostRef);
|
|
1533
1615
|
};
|
|
1534
1616
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1535
1617
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -1542,7 +1624,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1542
1624
|
if (module) {
|
|
1543
1625
|
return module[exportName];
|
|
1544
1626
|
}
|
|
1545
|
-
|
|
1627
|
+
|
|
1628
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1629
|
+
const processMod = importedModule => {
|
|
1630
|
+
cmpModules.set(bundleId, importedModule);
|
|
1631
|
+
return importedModule[exportName];
|
|
1632
|
+
}
|
|
1633
|
+
switch(bundleId) {
|
|
1634
|
+
|
|
1635
|
+
case 'mds-input.cjs':
|
|
1636
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1637
|
+
/* webpackMode: "lazy" */
|
|
1638
|
+
'./mds-input.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1546
1641
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1547
1642
|
/* @vite-ignore */
|
|
1548
1643
|
/* webpackInclude: /\.entry\.js$/ */
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2bcac156.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
9
|
-
return index.bootstrapLazy([["mds-input.cjs",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["mds-input.cjs",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2bcac156.js');
|
|
6
6
|
|
|
7
7
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
8
8
|
|
|
9
|
-
const mdsInputCss = "*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px
|
|
9
|
+
const mdsInputCss = "*,::before,::after{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}@tailwind utilities; :host{--mds-input-background:rgb(var(--tone-neutral));--mds-input-icon-color:var(--mds-input-variant-color);--mds-input-tip-background:84, 84, 84;--mds-input-ring:0 0 0 1px rgb(var(--mds-input-variant-color) 0.1);--mds-input-shadow:0 1px 3px 0 rgb(var(--mds-input-variant-color) 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) 0.06);--mds-input-variant-color:0, 0, 0;font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:-ms-flexbox;display:flex;position:relative}.input{font-family:Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;font-size:16px;line-height:1.5rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0px;min-height:3rem;width:100%;text-overflow:ellipsis;border-radius:0.5rem;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--mds-input-background);border:0;border-color:transparent;-webkit-box-shadow:var(--mds-input-ring), var(--mds-input-shadow);box-shadow:var(--mds-input-ring), var(--mds-input-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;color:rgb(var(--tone-neutral-02));overflow:hidden}textarea.input:active{-webkit-transition-property:none;transition-property:none}textarea.input{max-height:16rem;min-height:6rem;border-bottom-right-radius:0px}.input:focus{outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);--mds-input-ring:0 0 0 3px rgb(var(--mds-input-variant-color) 1);--mds-input-shadow:0 4px 6px -1px rgb(var(--mds-input-variant-color) 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) 0.06)}.input:disabled{background-color:rgb(var(--tone-neutral-10))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-webkit-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled:-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled::-ms-input-placeholder{color:rgb(var(--tone-neutral-05))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05))}.input.has-icon{padding-left:2.75rem}.tip{right:0.25rem;height:0.75rem;border-radius:9999px;padding-left:0.5rem;padding-right:0.5rem;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:300ms;transition-duration:300ms;-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:rgb(var(--mds-input-tip-background));color:rgb(var(--tone-neutral));-ms-flex-pack:center;justify-content:center;line-height:0.75rem;pointer-events:none;position:absolute;text-align:center}.tip-variant{--mds-input-tip-background:var(--mds-input-icon-color)}.read-only{background-color:rgb(var(--status-info-05));color:rgb(var(--tone-neutral))}.required{width:0.75rem;padding:0px;background-color:rgb(var(--status-error-05));color:transparent}.disabled{background-color:rgb(var(--tone-neutral-05))}.input:focus+.required{width:6rem;color:rgb(var(--tone-neutral))}.icon{left:0.75rem;top:0.75rem;fill:rgb(var(--mds-input-icon-color));position:absolute}.fixed{position:fixed}.absolute{position:absolute}.bottom-1{bottom:0.25rem}.top-1{top:0.25rem}.flex{display:-ms-flexbox;display:flex}.w-min{width:-moz-min-content;width:-webkit-min-content;width:min-content}.flex-col{-ms-flex-direction:column;flex-direction:column}.gap-y-2{row-gap:0.5rem}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-input-icon-color:10, 80, 212;--mds-input-variant-color:0, 0, 0}:host(:focus){--mds-input-variant-color:31, 101, 232;}:host([variant=\"info\"]){--mds-input-icon-color:25, 143, 182;--mds-input-variant-color:0, 0, 0}:host([variant=\"info\"]:focus){--mds-input-icon-color:21, 119, 151;--mds-input-variant-color:25, 143, 182;}:host([variant=\"success\"]){--mds-input-icon-color:26, 151, 91;--mds-input-variant-color:0, 0, 0}:host([variant=\"success\"]:focus){--mds-input-icon-color:22, 125, 76;--mds-input-variant-color:26, 151, 91;}:host([variant=\"warning\"]){--mds-input-icon-color:168, 126, 0;--mds-input-variant-color:0, 0, 0}:host([variant=\"warning\"]:focus){--mds-input-icon-color:139, 104, 0;--mds-input-variant-color:168, 126, 0;}:host([variant=\"error\"]){--mds-input-icon-color:234, 77, 73;--mds-input-variant-color:0, 0, 0}:host([variant=\"error\"]:focus){--mds-input-icon-color:215, 29, 25;--mds-input-variant-color:234, 77, 73;}";
|
|
10
10
|
|
|
11
11
|
const MdsInput = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-2bcac156.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.5.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-input.cjs.js', document.baseURI).href));
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["mds-input.cjs",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["mds-input.cjs",[[1,"mds-input",{"autocomplete":[1],"autofocus":[4],"datalist":[16],"disabled":[4],"icon":[1],"max":[2],"maxlength":[2],"min":[1],"minlength":[2],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"variant":[513],"tip":[1],"step":[1],"type":[1],"value":[8],"hasFocus":[32],"setFocus":[64],"getInputElement":[64]},null,{"value":["valueChanged"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -5,6 +5,7 @@ const hash = (s) => {
|
|
|
5
5
|
}
|
|
6
6
|
return h.toString();
|
|
7
7
|
};
|
|
8
|
+
const randomInt = (max) => Math.floor(Math.random() * max);
|
|
8
9
|
const unslugName = (name) => {
|
|
9
10
|
var _a, _b, _c;
|
|
10
11
|
return (_c = (_b = (_a = name.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()) === null || _b === void 0 ? void 0 : _b.replace(/-/g, ' ')) !== null && _c !== void 0 ? _c : name;
|
|
@@ -18,4 +19,11 @@ const setAttributeIfEmpty = (element, attribute, value) => {
|
|
|
18
19
|
return value;
|
|
19
20
|
};
|
|
20
21
|
const hashValue = (value) => `${value}-${hash(value)}`;
|
|
21
|
-
|
|
22
|
+
const hashRandomValue = (value) => {
|
|
23
|
+
const randomValue = randomInt(1000000);
|
|
24
|
+
if (value) {
|
|
25
|
+
return `${value}-${hash(randomValue.toString())}`;
|
|
26
|
+
}
|
|
27
|
+
return hash(randomValue.toString());
|
|
28
|
+
};
|
|
29
|
+
export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
|
|
@@ -26,13 +26,13 @@ export class KeyboardManager {
|
|
|
26
26
|
};
|
|
27
27
|
this.attachEscapeBehavior = (callBack) => {
|
|
28
28
|
this.escapeCallback = callBack;
|
|
29
|
-
if (
|
|
29
|
+
if (window !== undefined) {
|
|
30
30
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
this.detachEscapeBehavior = () => {
|
|
34
34
|
this.escapeCallback = () => { return; };
|
|
35
|
-
if (
|
|
35
|
+
if (window !== undefined) {
|
|
36
36
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
@@ -207,16 +207,17 @@
|
|
|
207
207
|
--mds-input-background: rgb(var(--tone-neutral));
|
|
208
208
|
--mds-input-icon-color: var(--mds-input-variant-color);
|
|
209
209
|
--mds-input-tip-background: 84, 84, 84;
|
|
210
|
-
--mds-input-ring: 0 0 0 1px
|
|
211
|
-
--mds-input-shadow: 0 1px 3px 0
|
|
210
|
+
--mds-input-ring: 0 0 0 1px rgb(var(--mds-input-variant-color) 0.1);
|
|
211
|
+
--mds-input-shadow: 0 1px 3px 0 rgb(var(--mds-input-variant-color) 0.1), 0 1px 2px 0 rgb(var(--mds-input-variant-color) 0.06);
|
|
212
212
|
--mds-input-variant-color: 0, 0, 0;
|
|
213
213
|
font-family: Karla, -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Helvetica Neue', sans-serif;
|
|
214
214
|
font-size: 16px;
|
|
215
215
|
line-height: 1.5rem;
|
|
216
216
|
-webkit-font-smoothing: antialiased;
|
|
217
217
|
-moz-osx-font-smoothing: grayscale;
|
|
218
|
-
|
|
218
|
+
|
|
219
219
|
display: flex;
|
|
220
|
+
position: relative;
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
.input{
|
|
@@ -233,22 +234,14 @@
|
|
|
233
234
|
|
|
234
235
|
margin: 0px;
|
|
235
236
|
|
|
236
|
-
box-sizing: border-box;
|
|
237
|
-
|
|
238
237
|
min-height: 3rem;
|
|
239
238
|
|
|
240
239
|
width: 100%;
|
|
241
240
|
|
|
242
|
-
overflow: hidden;
|
|
243
|
-
|
|
244
241
|
text-overflow: ellipsis;
|
|
245
242
|
|
|
246
243
|
border-radius: 0.5rem;
|
|
247
244
|
|
|
248
|
-
border-style: none;
|
|
249
|
-
|
|
250
|
-
border-color: transparent;
|
|
251
|
-
|
|
252
245
|
padding-left: 1rem;
|
|
253
246
|
|
|
254
247
|
padding-right: 1rem;
|
|
@@ -257,10 +250,6 @@
|
|
|
257
250
|
|
|
258
251
|
padding-bottom: 0.75rem;
|
|
259
252
|
|
|
260
|
-
--tw-text-opacity: 1;
|
|
261
|
-
|
|
262
|
-
color: rgba(var(--tone-neutral-02), var(--tw-text-opacity));
|
|
263
|
-
|
|
264
253
|
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
265
254
|
|
|
266
255
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -270,11 +259,15 @@
|
|
|
270
259
|
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
|
271
260
|
|
|
272
261
|
background-color: var(--mds-input-background);
|
|
262
|
+
border: 0;
|
|
263
|
+
border-color: transparent;
|
|
273
264
|
box-shadow: var(--mds-input-ring), var(--mds-input-shadow);
|
|
265
|
+
box-sizing: border-box;
|
|
266
|
+
color: rgb(var(--tone-neutral-02));
|
|
267
|
+
overflow: hidden;
|
|
274
268
|
}
|
|
275
269
|
|
|
276
|
-
textarea.input:active{
|
|
277
|
-
|
|
270
|
+
textarea.input:active {
|
|
278
271
|
transition-property: none;
|
|
279
272
|
}
|
|
280
273
|
|
|
@@ -301,30 +294,21 @@ textarea.input{
|
|
|
301
294
|
|
|
302
295
|
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
|
303
296
|
|
|
304
|
-
--mds-input-ring: 0 0 0 3px
|
|
305
|
-
--mds-input-shadow: 0 4px 6px -1px
|
|
297
|
+
--mds-input-ring: 0 0 0 3px rgb(var(--mds-input-variant-color) 1);
|
|
298
|
+
--mds-input-shadow: 0 4px 6px -1px rgb(var(--mds-input-variant-color) 0.1), 0 2px 4px -1px rgb(var(--mds-input-variant-color) 0.06);
|
|
306
299
|
}
|
|
307
300
|
|
|
308
|
-
.input:disabled{
|
|
309
|
-
|
|
310
|
-
--tw-bg-opacity: 1;
|
|
311
|
-
|
|
312
|
-
background-color: rgba(var(--tone-neutral-10), var(--tw-bg-opacity));
|
|
301
|
+
.input:disabled {
|
|
302
|
+
background-color: rgb(var(--tone-neutral-10));
|
|
313
303
|
}
|
|
314
304
|
|
|
315
|
-
.input:disabled::-moz-placeholder{
|
|
316
|
-
|
|
317
|
-
--tw-text-opacity: 1;
|
|
318
|
-
|
|
319
|
-
color: rgba(var(--tone-neutral-05), var(--tw-text-opacity));
|
|
305
|
+
.input:disabled::-moz-placeholder {
|
|
306
|
+
color: rgb(var(--tone-neutral-05));
|
|
320
307
|
}
|
|
321
308
|
|
|
322
309
|
.input:disabled,
|
|
323
|
-
.input:disabled::placeholder{
|
|
324
|
-
|
|
325
|
-
--tw-text-opacity: 1;
|
|
326
|
-
|
|
327
|
-
color: rgba(var(--tone-neutral-05), var(--tw-text-opacity));
|
|
310
|
+
.input:disabled::placeholder {
|
|
311
|
+
color: rgb(var(--tone-neutral-05));
|
|
328
312
|
}
|
|
329
313
|
|
|
330
314
|
.input.has-icon{
|
|
@@ -334,28 +318,16 @@ textarea.input{
|
|
|
334
318
|
|
|
335
319
|
.tip{
|
|
336
320
|
|
|
337
|
-
pointer-events: none;
|
|
338
|
-
|
|
339
|
-
position: absolute;
|
|
340
|
-
|
|
341
321
|
right: 0.25rem;
|
|
342
322
|
|
|
343
323
|
height: 0.75rem;
|
|
344
324
|
|
|
345
|
-
justify-content: center;
|
|
346
|
-
|
|
347
325
|
border-radius: 9999px;
|
|
348
326
|
|
|
349
327
|
padding-left: 0.5rem;
|
|
350
328
|
|
|
351
329
|
padding-right: 0.5rem;
|
|
352
330
|
|
|
353
|
-
text-align: center;
|
|
354
|
-
|
|
355
|
-
--tw-text-opacity: 1;
|
|
356
|
-
|
|
357
|
-
color: rgba(var(--tone-neutral), var(--tw-text-opacity));
|
|
358
|
-
|
|
359
331
|
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
360
332
|
|
|
361
333
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -364,63 +336,54 @@ textarea.input{
|
|
|
364
336
|
|
|
365
337
|
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
|
366
338
|
|
|
367
|
-
line-height: 0.75rem;
|
|
368
339
|
background-color: rgb(var(--mds-input-tip-background));
|
|
340
|
+
color: rgb(var(--tone-neutral));
|
|
341
|
+
justify-content: center;
|
|
342
|
+
line-height: 0.75rem;
|
|
343
|
+
pointer-events: none;
|
|
344
|
+
position: absolute;
|
|
345
|
+
text-align: center;
|
|
369
346
|
}
|
|
370
347
|
|
|
371
348
|
.tip-variant {
|
|
349
|
+
|
|
372
350
|
--mds-input-tip-background: var(--mds-input-icon-color);
|
|
373
351
|
}
|
|
374
352
|
|
|
375
|
-
.read-only{
|
|
376
|
-
|
|
377
|
-
--
|
|
378
|
-
|
|
379
|
-
background-color: rgba(var(--status-info-05), var(--tw-bg-opacity));
|
|
380
|
-
|
|
381
|
-
--tw-text-opacity: 1;
|
|
382
|
-
|
|
383
|
-
color: rgba(var(--status-info-09), var(--tw-text-opacity));
|
|
353
|
+
.read-only {
|
|
354
|
+
background-color: rgb(var(--status-info-05));
|
|
355
|
+
color: rgb(var(--tone-neutral));
|
|
384
356
|
}
|
|
385
357
|
|
|
386
358
|
.required{
|
|
387
359
|
|
|
388
360
|
width: 0.75rem;
|
|
389
361
|
|
|
390
|
-
--tw-bg-opacity: 1;
|
|
391
|
-
|
|
392
|
-
background-color: rgba(var(--status-error-05), var(--tw-bg-opacity));
|
|
393
|
-
|
|
394
362
|
padding: 0px;
|
|
395
363
|
|
|
396
|
-
color:
|
|
397
|
-
|
|
398
|
-
--tw-text-opacity: 0;
|
|
364
|
+
background-color: rgb(var(--status-error-05));
|
|
365
|
+
color: transparent;
|
|
399
366
|
}
|
|
400
367
|
|
|
401
|
-
.disabled{
|
|
402
|
-
|
|
403
|
-
--tw-bg-opacity: 1;
|
|
404
|
-
|
|
405
|
-
background-color: rgba(var(--tone-neutral-05), var(--tw-bg-opacity));
|
|
368
|
+
.disabled {
|
|
369
|
+
background-color: rgb(var(--tone-neutral-05));
|
|
406
370
|
}
|
|
407
371
|
|
|
408
372
|
.input:focus + .required{
|
|
409
373
|
|
|
410
374
|
width: 6rem;
|
|
411
375
|
|
|
412
|
-
--
|
|
376
|
+
color: rgb(var(--tone-neutral));
|
|
413
377
|
}
|
|
414
378
|
|
|
415
379
|
.icon{
|
|
416
380
|
|
|
417
|
-
position: absolute;
|
|
418
|
-
|
|
419
381
|
left: 0.75rem;
|
|
420
382
|
|
|
421
383
|
top: 0.75rem;
|
|
422
384
|
|
|
423
385
|
fill: rgb(var(--mds-input-icon-color));
|
|
386
|
+
position: absolute;
|
|
424
387
|
}
|
|
425
388
|
|
|
426
389
|
.fixed{
|
|
@@ -156,12 +156,12 @@ const FormIntegration = (args) => (h("form", { class: "flex flex-col gap-y-2", i
|
|
|
156
156
|
const input = document.querySelector('input[name="inputto"]');
|
|
157
157
|
const form = document.querySelector('form');
|
|
158
158
|
const mdsInput = document.querySelector('mds-input');
|
|
159
|
-
console.
|
|
160
|
-
console.
|
|
161
|
-
console.
|
|
162
|
-
console.
|
|
159
|
+
console.info('Input', input);
|
|
160
|
+
console.info('Form', form);
|
|
161
|
+
console.info('Form elements', form.elements);
|
|
162
|
+
console.info('MdsInput', mdsInput);
|
|
163
163
|
mdsInput.getInputElement().then((inputElement) => {
|
|
164
|
-
console.
|
|
164
|
+
console.info('MdsInput input element', inputElement);
|
|
165
165
|
});
|
|
166
166
|
input.addEventListener('input', (e) => { console.error('Input', e.target.value); });
|
|
167
167
|
input.addEventListener('change', (e) => { console.warn('Change', e.target.value); });
|