@maggioli-design-system/mds-input 4.2.1 → 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.
Files changed (41) hide show
  1. package/dist/cjs/{index-b0659581.js → index-2bcac156.js} +75 -10
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-input.cjs.entry.js +1 -1
  4. package/dist/cjs/mds-input.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/keyboard-manager.js +2 -2
  7. package/dist/collection/components/mds-input/test/mds-input.stories.js +5 -5
  8. package/dist/documentation.json +3 -3
  9. package/dist/esm/{index-9b253f5d.js → index-0c539bb1.js} +75 -10
  10. package/dist/esm/loader.js +2 -2
  11. package/dist/esm/mds-input.entry.js +1 -1
  12. package/dist/esm/mds-input.js +3 -3
  13. package/dist/esm-es5/index-0c539bb1.js +1 -0
  14. package/dist/esm-es5/loader.js +1 -1
  15. package/dist/esm-es5/mds-input.entry.js +1 -1
  16. package/dist/esm-es5/mds-input.js +1 -1
  17. package/dist/mds-input/mds-input.esm.js +1 -1
  18. package/dist/mds-input/mds-input.js +1 -1
  19. package/dist/mds-input/{p-fa65d55c.entry.js → p-5d146ed2.entry.js} +1 -1
  20. package/dist/mds-input/p-a71f012b.js +2 -0
  21. package/dist/mds-input/{p-9a71f22d.system.js → p-b114c68e.system.js} +1 -1
  22. package/dist/mds-input/p-c6930a3e.system.js +2 -0
  23. package/dist/mds-input/{p-728ee0ba.system.entry.js → p-d184781a.system.entry.js} +1 -1
  24. package/dist/stats.json +26 -24
  25. package/dist/types/stencil-public-runtime.d.ts +19 -0
  26. package/documentation.json +3 -3
  27. package/package.json +3 -3
  28. package/src/common/keyboard-manager.ts +2 -2
  29. package/src/components/mds-input/test/mds-input.stories.tsx +5 -5
  30. package/www/build/mds-input.esm.js +1 -1
  31. package/www/build/mds-input.js +1 -1
  32. package/www/build/{p-fa65d55c.entry.js → p-5d146ed2.entry.js} +1 -1
  33. package/www/build/p-a71f012b.js +2 -0
  34. package/www/build/{p-9a71f22d.system.js → p-b114c68e.system.js} +1 -1
  35. package/www/build/p-c6930a3e.system.js +2 -0
  36. package/www/build/{p-728ee0ba.system.entry.js → p-d184781a.system.entry.js} +1 -1
  37. package/dist/esm-es5/index-9b253f5d.js +0 -2
  38. package/dist/mds-input/p-032dc19e.js +0 -2
  39. package/dist/mds-input/p-c954df78.system.js +0 -2
  40. package/www/build/p-032dc19e.js +0 -2
  41. package/www/build/p-c954df78.system.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
- * calling them with `null`. This signals that the DOM element corresponding to
808
- * the VDom node has been removed from the DOM.
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 {
@@ -1293,7 +1307,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1293
1307
  }
1294
1308
  return Cstr;
1295
1309
  };
1296
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
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;
1297
1322
  // initializeComponent
1298
1323
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1299
1324
  // Let the runtime know that the component has been initialized
@@ -1541,13 +1566,40 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1541
1566
  * @returns void
1542
1567
  */
1543
1568
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
1569
+ /**
1570
+ * A WeakMap mapping runtime component references to their corresponding host reference
1571
+ * instances.
1572
+ */
1544
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
+ */
1545
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
+ */
1546
1589
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1547
- const registerHost = (elm, cmpMeta) => {
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) => {
1548
1600
  const hostRef = {
1549
1601
  $flags$: 0,
1550
- $hostElement$: elm,
1602
+ $hostElement$: hostElement,
1551
1603
  $cmpMeta$: cmpMeta,
1552
1604
  $instanceValues$: new Map(),
1553
1605
  };
@@ -1556,10 +1608,10 @@ const registerHost = (elm, cmpMeta) => {
1556
1608
  }
1557
1609
  {
1558
1610
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1559
- elm['s-p'] = [];
1560
- elm['s-rc'] = [];
1611
+ hostElement['s-p'] = [];
1612
+ hostElement['s-rc'] = [];
1561
1613
  }
1562
- return hostRefs.set(elm, hostRef);
1614
+ return hostRefs.set(hostElement, hostRef);
1563
1615
  };
1564
1616
  const isMemberInElement = (elm, memberName) => memberName in elm;
1565
1617
  const consoleError = (e, el) => (0, console.error)(e, el);
@@ -1572,7 +1624,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1572
1624
  if (module) {
1573
1625
  return module[exportName];
1574
1626
  }
1575
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
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
+ }
1576
1641
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1577
1642
  /* @vite-ignore */
1578
1643
  /* webpackInclude: /\.entry\.js$/ */
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b0659581.js');
5
+ const index = require('./index-2bcac156.js');
6
6
 
7
7
  const defineCustomElements = (win, options) => {
8
8
  if (typeof window === 'undefined') return undefined;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b0659581.js');
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
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b0659581.js');
5
+ const index = require('./index-2bcac156.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.3.0 | MIT Licensed | https://stenciljs.com
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));
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.3.0",
8
- "typescriptVersion": "5.1.6"
7
+ "version": "4.5.0",
8
+ "typescriptVersion": "5.2.2"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -26,13 +26,13 @@ export class KeyboardManager {
26
26
  };
27
27
  this.attachEscapeBehavior = (callBack) => {
28
28
  this.escapeCallback = callBack;
29
- if (typeof window !== undefined) {
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 (typeof window !== undefined) {
35
+ if (window !== undefined) {
36
36
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
37
37
  }
38
38
  };
@@ -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.log('Input', input);
160
- console.log('Form', form);
161
- console.log('Form elements', form.elements);
162
- console.log('MdsInput', mdsInput);
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.log('MdsInput input element', inputElement);
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); });
@@ -1,9 +1,9 @@
1
1
  {
2
- "timestamp": "2023-09-27T11:23:58",
2
+ "timestamp": "2023-10-19T09:54:26",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.3.0",
6
- "typescriptVersion": "5.1.6"
5
+ "version": "4.5.0",
6
+ "typescriptVersion": "5.2.2"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -781,9 +781,9 @@ const patch = (oldVNode, newVNode) => {
781
781
  }
782
782
  };
783
783
  /**
784
- * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
785
- * calling them with `null`. This signals that the DOM element corresponding to
786
- * the VDom node has been removed from the DOM.
784
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
785
+ * them with `null`. This signals that the DOM element corresponding to the VDom
786
+ * node has been removed from the DOM.
787
787
  *
788
788
  * @param vNode a virtual DOM node
789
789
  */
@@ -999,6 +999,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
999
999
  */
1000
1000
  const callRender = (hostRef, instance, elm, isInitialLoad) => {
1001
1001
  try {
1002
+ /**
1003
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
1004
+ * method, so we can call the method immediately. If not, check before calling it.
1005
+ */
1002
1006
  instance = instance.render() ;
1003
1007
  {
1004
1008
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
@@ -1071,6 +1075,16 @@ const appDidLoad = (who) => {
1071
1075
  }
1072
1076
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1073
1077
  };
1078
+ /**
1079
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
1080
+ * e.g. custom element node. If a build figures out that e.g. no component
1081
+ * has a `componentDidLoad` method, the instance method gets removed from the
1082
+ * output bundle and this function returns `undefined`.
1083
+ * @param instance any object that may or may not contain methods
1084
+ * @param method method name
1085
+ * @param arg single arbitrary argument
1086
+ * @returns result of method call if it exists, otherwise `undefined`
1087
+ */
1074
1088
  const safeCall = (instance, method, arg) => {
1075
1089
  if (instance && instance[method]) {
1076
1090
  try {
@@ -1271,7 +1285,18 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1271
1285
  }
1272
1286
  return Cstr;
1273
1287
  };
1274
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1288
+ /**
1289
+ * Initialize a Stencil component given a reference to its host element, its
1290
+ * runtime bookkeeping data structure, runtime metadata about the component,
1291
+ * and (optionally) an HMR version ID.
1292
+ *
1293
+ * @param elm a host element
1294
+ * @param hostRef the element's runtime bookkeeping object
1295
+ * @param cmpMeta runtime metadata for the Stencil component
1296
+ * @param hmrVersionId an (optional) HMR version ID
1297
+ */
1298
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1299
+ let Cstr;
1275
1300
  // initializeComponent
1276
1301
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1277
1302
  // Let the runtime know that the component has been initialized
@@ -1519,13 +1544,40 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1519
1544
  * @returns void
1520
1545
  */
1521
1546
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
1547
+ /**
1548
+ * A WeakMap mapping runtime component references to their corresponding host reference
1549
+ * instances.
1550
+ */
1522
1551
  const hostRefs = /*@__PURE__*/ new WeakMap();
1552
+ /**
1553
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
1554
+ *
1555
+ * @param ref the runtime ref of interest
1556
+ * @returns the Host reference (if found) or undefined
1557
+ */
1523
1558
  const getHostRef = (ref) => hostRefs.get(ref);
1559
+ /**
1560
+ * Register a lazy instance with the {@link hostRefs} object so it's
1561
+ * corresponding {@link d.HostRef} can be retrieved later.
1562
+ *
1563
+ * @param lazyInstance the lazy instance of interest
1564
+ * @param hostRef that instances `HostRef` object
1565
+ * @returns a reference to the host ref WeakMap
1566
+ */
1524
1567
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1525
- const registerHost = (elm, cmpMeta) => {
1568
+ /**
1569
+ * Register a host element for a Stencil component, setting up various metadata
1570
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
1571
+ * metadata.
1572
+ *
1573
+ * @param hostElement the host element to register
1574
+ * @param cmpMeta runtime metadata for that component
1575
+ * @returns a reference to the host ref WeakMap
1576
+ */
1577
+ const registerHost = (hostElement, cmpMeta) => {
1526
1578
  const hostRef = {
1527
1579
  $flags$: 0,
1528
- $hostElement$: elm,
1580
+ $hostElement$: hostElement,
1529
1581
  $cmpMeta$: cmpMeta,
1530
1582
  $instanceValues$: new Map(),
1531
1583
  };
@@ -1534,10 +1586,10 @@ const registerHost = (elm, cmpMeta) => {
1534
1586
  }
1535
1587
  {
1536
1588
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1537
- elm['s-p'] = [];
1538
- elm['s-rc'] = [];
1589
+ hostElement['s-p'] = [];
1590
+ hostElement['s-rc'] = [];
1539
1591
  }
1540
- return hostRefs.set(elm, hostRef);
1592
+ return hostRefs.set(hostElement, hostRef);
1541
1593
  };
1542
1594
  const isMemberInElement = (elm, memberName) => memberName in elm;
1543
1595
  const consoleError = (e, el) => (0, console.error)(e, el);
@@ -1550,7 +1602,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1550
1602
  if (module) {
1551
1603
  return module[exportName];
1552
1604
  }
1553
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1605
+
1606
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1607
+ const processMod = importedModule => {
1608
+ cmpModules.set(bundleId, importedModule);
1609
+ return importedModule[exportName];
1610
+ }
1611
+ switch(bundleId) {
1612
+
1613
+ case 'mds-input':
1614
+ return import(
1615
+ /* webpackMode: "lazy" */
1616
+ './mds-input.entry.js').then(processMod, consoleError);
1617
+ }
1618
+ }
1554
1619
  return import(
1555
1620
  /* @vite-ignore */
1556
1621
  /* webpackInclude: /\.entry\.js$/ */
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-9b253f5d.js';
2
- export { s as setNonce } from './index-9b253f5d.js';
1
+ import { b as bootstrapLazy } from './index-0c539bb1.js';
2
+ export { s as setNonce } from './index-0c539bb1.js';
3
3
 
4
4
  const defineCustomElements = (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9b253f5d.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0c539bb1.js';
2
2
 
3
3
  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}
4
4
 
@@ -1,8 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-9b253f5d.js';
2
- export { s as setNonce } from './index-9b253f5d.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-0c539bb1.js';
2
+ export { s as setNonce } from './index-0c539bb1.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Browser v4.3.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v4.5.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  const patchBrowser = () => {
8
8
  const importMeta = import.meta.url;
@@ -0,0 +1 @@
1
+ var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{f(t.next(e))}catch(e){a(e)}}function u(e){try{f(t["throw"](e))}catch(e){a(e)}}function f(e){e.done?r(e.value):i(e.value).then(o,u)}f((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return f([e,n])}}function f(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};var NAMESPACE="mds-input";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var EMPTY_OBJ={};var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var i=null;var a=false;var o=false;var u=[];var f=function(n){for(var r=0;r<n.length;r++){i=n[r];if(Array.isArray(i)){f(i)}else if(i!=null&&typeof i!=="boolean"){if(a=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(a&&o){u[u.length-1].t+=i}else{u.push(a?newVNode(null,i):i)}o=a}}};f(r);if(n){{var s=n.className||n.class;if(s){n.class=typeof s!=="object"?s:Object.keys(s).filter((function(e){return s[e]})).join(" ")}}}var l=newVNode(e,null);l.i=n;if(u.length>0){l.o=u}return l};var newVNode=function(e,n){var r={u:0,l:e,t:n,v:null,o:null};{r.i=null}return r};var Host={};var isHost=function(e){return e&&e.l===Host};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&2){return parseFloat(e)}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var i=getScopeId(n);var a=styles.get(i);e=e.nodeType===11?e:doc;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{u=doc.createElement("style");u.innerHTML=a;var f=(t=plt.p)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(f!=null){u.setAttribute("nonce",f)}e.insertBefore(u,e.querySelector("link"))}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var n=e.m;var r=e.$hostElement$;var t=n.u;var i=createTime("attachStyles",n.h);var a=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=a;r.classList.add(a+"-h")}i()};var getScopeId=function(e,n){return"sc-"+e.h};var setAccessor=function(e,n,r,t,i,a){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var f=e.classList;var s=parseClassList(r);var l=parseClassList(t);f.remove.apply(f,s.filter((function(e){return e&&!l.includes(e)})));f.add.apply(f,l.filter((function(e){return e&&!s.includes(e)})))}else if(n==="ref"){if(t){t(e)}}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r){plt.rel(e,n,r,false)}if(t){plt.ael(e,n,t,false)}}else{var c=isComplexType(t);if((o||c&&t!==null)&&!i){try{if(!e.tagName.includes("-")){var v=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=v){e[n]=v}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||a&4||i)&&!c){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var updateElement=function(e,n,r,t){var i=n.v.nodeType===11&&n.v.host?n.v.host:n.v;var a=e&&e.i||EMPTY_OBJ;var o=n.i||EMPTY_OBJ;{for(t in a){if(!(t in o)){setAccessor(i,t,a[t],undefined,r,n.u)}}}for(t in o){setAccessor(i,t,a[t],o[t],r,n.u)}};var createElm=function(e,n,r,t){var i=n.o[r];var a=0;var o;var u;if(i.t!==null){o=i.v=doc.createTextNode(i.t)}else{o=i.v=doc.createElement(i.l);{updateElement(null,i,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(i.o){for(a=0;a<i.o.length;++a){u=createElm(e,i,a);if(u){o.appendChild(u)}}}}return o};var addVnodes=function(e,n,r,t,i,a){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(t[i]){u=createElm(null,r,i);if(u){t[i].v=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var i=e[t];if(i){var a=i.v;nullifyVNodeRefs(i);if(a){a.remove()}}}};var updateChildren=function(e,n,r,t){var i=0;var a=0;var o=n.length-1;var u=n[0];var f=n[o];var s=t.length-1;var l=t[0];var c=t[s];var v;while(i<=o&&a<=s){if(u==null){u=n[++i]}else if(f==null){f=n[--o]}else if(l==null){l=t[++a]}else if(c==null){c=t[--s]}else if(isSameVnode(u,l)){patch(u,l);u=n[++i];l=t[++a]}else if(isSameVnode(f,c)){patch(f,c);f=n[--o];c=t[--s]}else if(isSameVnode(u,c)){patch(u,c);e.insertBefore(u.v,f.v.nextSibling);u=n[++i];c=t[--s]}else if(isSameVnode(f,l)){patch(f,l);e.insertBefore(f.v,u.v);f=n[--o];l=t[++a]}else{{v=createElm(n&&n[a],r,a);l=t[++a]}if(v){{u.v.parentNode.insertBefore(v,u.v)}}}}if(i>o){addVnodes(e,t[s+1]==null?null:t[s+1].v,r,t,a,s)}else if(a>s){removeVnodes(n,i,o)}};var isSameVnode=function(e,n){if(e.l===n.l){return true}return false};var patch=function(e,n){var r=n.v=e.v;var t=e.o;var i=n.o;var a=n.t;if(a===null){{{updateElement(e,n,isSvgMode)}}if(t!==null&&i!==null){updateChildren(r,t,n,i)}else if(i!==null){if(e.t!==null){r.textContent=""}addVnodes(r,null,n,i,0,i.length-1)}else if(t!==null){removeVnodes(t,0,t.length-1)}}else if(e.t!==a){r.data=a}};var nullifyVNodeRefs=function(e){{e.i&&e.i.ref&&e.i.ref(null);e.o&&e.o.map(nullifyVNodeRefs)}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var i=e.m;var a=e.S||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(i.C){o.i=o.i||{};i.C.map((function(e){var n=e[0],r=e[1];return o.i[r]=t[n]}))}if(r&&o.i){for(var u=0,f=Object.keys(o.i);u<f.length;u++){var s=f[u];if(t.hasAttribute(s)&&!["key","ref","style","class"].includes(s)){o.i[s]=t[s]}}}o.l=null;o.u|=4;e.S=o;o.v=a.v=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(a,o)};var attachToAncestor=function(e,n){if(n&&!e.T&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.T=n})))}};var scheduleUpdate=function(e,n){{e.u|=16}if(e.u&4){e.u|=512;return}attachToAncestor(e,e._);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.m.h);var t=e.$;var i;if(n){{i=safeCall(t,"componentWillLoad")}}r();return enqueue(i,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,f,s;return __generator(this,(function(l){i=e.$hostElement$;a=createTime("update",e.m.h);o=i["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.m.h);{callRender(e,n,i,r)}if(o){o.map((function(e){return e()}));i["s-rc"]=undefined}u();a();{f=(t=i["s-p"])!==null&&t!==void 0?t:[];s=function(){return postUpdateComponent(e)};if(f.length===0){s()}else{Promise.all(f).then(s);e.u|=4;f.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{n=n.render();{e.u&=~16}{e.u|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}return null};var postUpdateComponent=function(e){var n=e.m.h;var r=e.$hostElement$;var t=createTime("postUpdate",n);var i=e._;if(!(e.u&64)){e.u|=64;{addHydratedFlag(r)}t();{e.R(r);if(!i){appDidLoad()}}}else{t()}{e.M(r)}{if(e.T){e.T();e.T=undefined}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,n){return getHostRef(e).V.get(n)};var setValue=function(e,n,r,t){var i=getHostRef(e);var a=i.$hostElement$;var o=i.V.get(n);var u=i.u;var f=i.$;r=parsePropertyValue(r,t.k[n][0]);var s=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!s;if((!(u&8)||o===undefined)&&l){i.V.set(n,r);if(f){if(t.A&&u&128){var c=t.A[n];if(c){c.map((function(e){try{f[e](r,o,n)}catch(e){consoleError(e,a)}}))}}if((u&(2|16))===2){scheduleUpdate(i,false)}}}};var proxyComponent=function(e,n,r){var t;if(n.k){if(e.watchers){n.A=e.watchers}var i=Object.entries(n.k);var a=e.prototype;i.map((function(e){var t=e[0],i=e[1][0];if(i&31||r&2&&i&32){Object.defineProperty(a,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}else if(r&1&&i&64){Object.defineProperty(a,t,{value:function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}var r=getHostRef(this);return r.H.then((function(){var n;return(n=r.$)[t].apply(n,e)}))}})}}));if(r&1){var o=new Map;a.attributeChangedCallback=function(e,r,t){var i=this;plt.jmp((function(){var u=o.get(e);if(i.hasOwnProperty(u)){t=i[u];delete i[u]}else if(a.hasOwnProperty(u)&&typeof i[u]==="number"&&i[u]==t){return}else if(u==null){var f=getHostRef(i);var s=f===null||f===void 0?void 0:f.u;if(!(s&8)&&s&128&&t!==r){var l=f.$;var c=n.A[e];c===null||c===void 0?void 0:c.forEach((function(n){if(l[n]!=null){l[n].call(l,t,r,e)}}))}return}i[u]=t===null&&typeof i[u]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.A)!==null&&t!==void 0?t:{}),true),i.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],t=e[1];var i=t[1]||r;o.set(i,r);if(t[0]&512){n.C.push([r,i])}return i})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,a,o,u,f,s;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.u&32)===0))return[3,3];n.u|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){{r.A=e.watchers}proxyComponent(e,r,2);e.isProxied=true}i=createTime("createInstance",r.h);{n.u|=8}try{new e(n)}catch(e){consoleError(e)}{n.u&=~8}{n.u|=128}i();if(e.style){a=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r.h);registerStyle(o,a,!!(r.u&1));u()}}l.label=3;case 3:f=n._;s=function(){return scheduleUpdate(n,true)};if(f&&f["s-rc"]){f["s-rc"].push(s)}else{s()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.u&1)===0){var n=getHostRef(e);var r=n.m;var t=createTime("connectedCallback",r.h);if(!(n.u&1)){n.u|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(n,n._=i);break}}}if(r.k){Object.entries(r.k).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var i=e[r];delete e[r];e[r]=i}}))}{initializeComponent(e,n,r)}}else{if(n===null||n===void 0?void 0:n.$);else if(n===null||n===void 0?void 0:n.q){n.q.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.u&1)===0){n=getHostRef(e);if(n===null||n===void 0?void 0:n.$);else if(n===null||n===void 0?void 0:n.q){n.q.then((function(){return disconnectInstance()}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var i=[];var a=n.exclude||[];var o=win.customElements;var u=doc.head;var f=u.querySelector("meta[charset]");var s=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.N=new URL(n.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(n){var r;var t={u:n[0],h:n[1],k:n[2],P:n[3]};{t.k=n[2]}{t.C=[]}{t.A=(r=n[4])!==null&&r!==void 0?r:{}}var u=t.h;var f=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.u&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).q};return n}(HTMLElement);t.I=e[0];if(!a.includes(u)&&!o.get(u)){i.push(u);o.define(u,proxyComponent(f,t,1))}}))}));{s.innerHTML=i+HYDRATED_CSS;s.setAttribute("data-styles","");var d=(r=plt.p)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(d!=null){s.setAttribute("nonce",d)}u.insertBefore(s,f?f.nextSibling:u.firstChild)}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var setNonce=function(e){return plt.p=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.$=e,n)};var registerHost=function(e,n){var r={u:0,$hostElement$:e,m:n,V:new Map};{r.H=new Promise((function(e){return r.M=e}))}{r.q=new Promise((function(e){return r.R=e}));e["s-p"]=[];e["s-rc"]=[]}return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e.h.replace(/-/g,"_");var i=e.I;var a=cmpModules.get(i);if(a){return a[t]}if(!r||!BUILD.hotModuleReplacement){var o=function(e){cmpModules.set(i,e);return e[t]};switch(i){case"mds-input":return import("./mds-input.entry.js").then(o,consoleError)}}return import("./".concat(i,".entry.js").concat("")).then((function(e){{cmpModules.set(i,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={u:0,N:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Host as H,bootstrapLazy as b,createEvent as c,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
@@ -1 +1 @@
1
- import{b as bootstrapLazy}from"./index-9b253f5d.js";export{s as setNonce}from"./index-9b253f5d.js";var defineCustomElements=function(e,t){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-input",[[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"]}]]]],t)};export{defineCustomElements};
1
+ import{b as bootstrapLazy}from"./index-0c539bb1.js";export{s as setNonce}from"./index-0c539bb1.js";var defineCustomElements=function(e,t){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-input",[[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"]}]]]],t)};export{defineCustomElements};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,i,o,r){function n(t){return t instanceof o?t:new o((function(i){i(t)}))}return new(o||(o=Promise))((function(o,e){function a(t){try{l(r.next(t))}catch(t){e(t)}}function s(t){try{l(r["throw"](t))}catch(t){e(t)}}function l(t){t.done?o(t.value):n(t.value).then(a,s)}l((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var o={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},r,n,e,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return l([t,i])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(r=1,n&&(e=s[0]&2?n["return"]:s[0]?n["throw"]||((e=n["return"])&&e.call(n),0):n.next)&&!(e=e.call(n,s[1])).done)return e;if(n=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(e=o.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){o.label=s[1];break}if(s[0]===6&&o.label<e[1]){o.label=e[1];e=s;break}if(e&&o.label<e[2]){o.label=e[2];o.ops.push(s);break}if(e[2])o.ops.pop();o.trys.pop();continue}s=i.call(t,o)}catch(t){s=[6,t];n=0}finally{r=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-9b253f5d.js";function r(t){var i,o,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(o=r(t[i]))&&(n&&(n+=" "),n+=o);else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}function clsx(){for(var t,i,o=0,n="";o<arguments.length;)(t=arguments[o++])&&(i=r(t))&&(n&&(n+=" "),n+=i);return n}var 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;}';var MdsInput=function(){function t(t){var i=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputChange",7);this.keyDownEvent=createEvent(this,"mdsInputKeydown",7);this.blurEvent=createEvent(this,"mdsInputBlur",7);this.focusEvent=createEvent(this,"mdsInputFocus",7);this.onInput=function(t){var o=t.target;if(o){i.value=o.value}i.keyDownEvent.emit(t)};this.onBlur=function(){i.hasFocus=false;i.blurEvent.emit()};this.onFocus=function(t){var o=t.target;i.hasFocus=true;i.focusEvent.emit();if(i.readonly){setTimeout((function(){o.select()}),10)}};this.hasFocus=false;this.autocomplete="off";this.autofocus=false;this.datalist=undefined;this.disabled=false;this.icon=undefined;this.max=undefined;this.maxlength=undefined;this.min=undefined;this.minlength=undefined;this.name=undefined;this.pattern=undefined;this.placeholder="";this.readonly=false;this.required=false;this.variant=undefined;this.tip=undefined;this.step=undefined;this.type="text";this.value=""}t.prototype.componentWillLoad=function(){if(this.el.hasAttribute("tabindex")){var t=this.el.getAttribute("tabindex");this.tabindex=t!==null?parseInt(t):undefined;this.el.removeAttribute("tabindex")}};t.prototype.valueChanged=function(){this.changeEvent.emit({value:this.value})};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.getValue=function(){var t;return typeof this.value==="number"?this.value.toString():(t=this.value)!==null&&t!==void 0?t:""};t.prototype.render=function(){var t=this;var i=this.getValue();return h(Host,null,this.type==="textarea"?h("textarea",{class:clsx("input",this.icon&&"has-icon"),autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,tabIndex:this.tabindex,value:i}):h("input",{class:clsx("input",this.icon&&"has-icon"),autoComplete:this.autocomplete,autoFocus:this.autofocus,disabled:this.disabled,max:this.max,maxLength:this.maxlength,min:this.min,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,pattern:this.pattern,list:this.datalist&&"datalist",placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type,value:i}),this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 disabled"},"Disabilitato"),this.readonly&&!this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 read-only"},"Sola lettura"),this.required&&!this.disabled&&!this.readonly&&h("mds-text",{typography:"option",class:"tip top-1 required"},"Obbligatorio"),this.tip&&h("mds-text",{typography:"option",class:clsx("tip bottom-1",this.variant&&"tip-variant")},this.tip),this.datalist&&h("datalist",{id:"datalist",class:"datalist"},this.datalist.forEach((function(t){h("option",{value:t})}))),this.icon&&h("mds-icon",{class:clsx("icon",this.variant),name:this.icon}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return t}();MdsInput.style=mdsInputCss;export{MdsInput as mds_input};
1
+ var __awaiter=this&&this.__awaiter||function(t,i,o,r){function n(t){return t instanceof o?t:new o((function(i){i(t)}))}return new(o||(o=Promise))((function(o,e){function a(t){try{c(r.next(t))}catch(t){e(t)}}function s(t){try{c(r["throw"](t))}catch(t){e(t)}}function c(t){t.done?o(t.value):n(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var o={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},r,n,e,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(o=0)),o)try{if(r=1,n&&(e=s[0]&2?n["return"]:s[0]?n["throw"]||((e=n["return"])&&e.call(n),0):n.next)&&!(e=e.call(n,s[1])).done)return e;if(n=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(e=o.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){o.label=s[1];break}if(s[0]===6&&o.label<e[1]){o.label=e[1];e=s;break}if(e&&o.label<e[2]){o.label=e[2];o.ops.push(s);break}if(e[2])o.ops.pop();o.trys.pop();continue}s=i.call(t,o)}catch(t){s=[6,t];n=0}finally{r=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-0c539bb1.js";function r(t){var i,o,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(o=r(t[i]))&&(n&&(n+=" "),n+=o);else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}function clsx(){for(var t,i,o=0,n="";o<arguments.length;)(t=arguments[o++])&&(i=r(t))&&(n&&(n+=" "),n+=i);return n}var 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;}';var MdsInput=function(){function t(t){var i=this;registerInstance(this,t);this.changeEvent=createEvent(this,"mdsInputChange",7);this.keyDownEvent=createEvent(this,"mdsInputKeydown",7);this.blurEvent=createEvent(this,"mdsInputBlur",7);this.focusEvent=createEvent(this,"mdsInputFocus",7);this.onInput=function(t){var o=t.target;if(o){i.value=o.value}i.keyDownEvent.emit(t)};this.onBlur=function(){i.hasFocus=false;i.blurEvent.emit()};this.onFocus=function(t){var o=t.target;i.hasFocus=true;i.focusEvent.emit();if(i.readonly){setTimeout((function(){o.select()}),10)}};this.hasFocus=false;this.autocomplete="off";this.autofocus=false;this.datalist=undefined;this.disabled=false;this.icon=undefined;this.max=undefined;this.maxlength=undefined;this.min=undefined;this.minlength=undefined;this.name=undefined;this.pattern=undefined;this.placeholder="";this.readonly=false;this.required=false;this.variant=undefined;this.tip=undefined;this.step=undefined;this.type="text";this.value=""}t.prototype.componentWillLoad=function(){if(this.el.hasAttribute("tabindex")){var t=this.el.getAttribute("tabindex");this.tabindex=t!==null?parseInt(t):undefined;this.el.removeAttribute("tabindex")}};t.prototype.valueChanged=function(){this.changeEvent.emit({value:this.value})};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.getValue=function(){var t;return typeof this.value==="number"?this.value.toString():(t=this.value)!==null&&t!==void 0?t:""};t.prototype.render=function(){var t=this;var i=this.getValue();return h(Host,null,this.type==="textarea"?h("textarea",{class:clsx("input",this.icon&&"has-icon"),autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,tabIndex:this.tabindex,value:i}):h("input",{class:clsx("input",this.icon&&"has-icon"),autoComplete:this.autocomplete,autoFocus:this.autofocus,disabled:this.disabled,max:this.max,maxLength:this.maxlength,min:this.min,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,pattern:this.pattern,list:this.datalist&&"datalist",placeholder:this.placeholder,readOnly:this.readonly,ref:function(i){return t.nativeInput=i},required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type,value:i}),this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 disabled"},"Disabilitato"),this.readonly&&!this.disabled&&h("mds-text",{typography:"option",class:"tip top-1 read-only"},"Sola lettura"),this.required&&!this.disabled&&!this.readonly&&h("mds-text",{typography:"option",class:"tip top-1 required"},"Obbligatorio"),this.tip&&h("mds-text",{typography:"option",class:clsx("tip bottom-1",this.variant&&"tip-variant")},this.tip),this.datalist&&h("datalist",{id:"datalist",class:"datalist"},this.datalist.forEach((function(t){h("option",{value:t})}))),this.icon&&h("mds-icon",{class:clsx("icon",this.variant),name:this.icon}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return t}();MdsInput.style=mdsInputCss;export{MdsInput as mds_input};
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-9b253f5d.js";export{s as setNonce}from"./index-9b253f5d.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy([["mds-input",[[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"]}]]]],e)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-0c539bb1.js";export{s as setNonce}from"./index-0c539bb1.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy([["mds-input",[[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"]}]]]],e)}));
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-032dc19e.js";export{s as setNonce}from"./p-032dc19e.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-fa65d55c",[[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"]}]]]],e)));
1
+ import{p as e,b as t}from"./p-a71f012b.js";export{s as setNonce}from"./p-a71f012b.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-5d146ed2",[[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"]}]]]],e)));
@@ -115,7 +115,7 @@ DOMTokenList
115
115
  var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
116
116
  var start = function() {
117
117
  // if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
118
- var url = new URL('./p-9a71f22d.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
118
+ var url = new URL('./p-b114c68e.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
119
119
  System.import(url.href);
120
120
  };
121
121
 
@@ -1 +1 @@
1
- import{r as t,c as i,h as o,H as r,g as n}from"./p-032dc19e.js";function s(t){var i,o,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(o=s(t[i]))&&(r&&(r+=" "),r+=o);else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function a(){for(var t,i,o=0,r="";o<arguments.length;)(t=arguments[o++])&&(i=s(t))&&(r&&(r+=" "),r+=i);return r}const e=class{constructor(o){t(this,o),this.changeEvent=i(this,"mdsInputChange",7),this.keyDownEvent=i(this,"mdsInputKeydown",7),this.blurEvent=i(this,"mdsInputBlur",7),this.focusEvent=i(this,"mdsInputFocus",7),this.onInput=t=>{const i=t.target;i&&(this.value=i.value),this.keyDownEvent.emit(t)},this.onBlur=()=>{this.hasFocus=!1,this.blurEvent.emit()},this.onFocus=t=>{const i=t.target;this.hasFocus=!0,this.focusEvent.emit(),this.readonly&&setTimeout((()=>{i.select()}),10)},this.hasFocus=!1,this.autocomplete="off",this.autofocus=!1,this.datalist=void 0,this.disabled=!1,this.icon=void 0,this.max=void 0,this.maxlength=void 0,this.min=void 0,this.minlength=void 0,this.name=void 0,this.pattern=void 0,this.placeholder="",this.readonly=!1,this.required=!1,this.variant=void 0,this.tip=void 0,this.step=void 0,this.type="text",this.value=""}componentWillLoad(){if(this.el.hasAttribute("tabindex")){const t=this.el.getAttribute("tabindex");this.tabindex=null!==t?parseInt(t):void 0,this.el.removeAttribute("tabindex")}}valueChanged(){this.changeEvent.emit({value:this.value})}async setFocus(){this.nativeInput&&this.nativeInput.focus()}getInputElement(){return Promise.resolve(this.nativeInput)}getValue(){var t;return"number"==typeof this.value?this.value.toString():null!==(t=this.value)&&void 0!==t?t:""}render(){const t=this.getValue();return o(r,null,"textarea"===this.type?o("textarea",{class:a("input",this.icon&&"has-icon"),autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,ref:t=>this.nativeInput=t,required:this.required,tabIndex:this.tabindex,value:t}):o("input",{class:a("input",this.icon&&"has-icon"),autoComplete:this.autocomplete,autoFocus:this.autofocus,disabled:this.disabled,max:this.max,maxLength:this.maxlength,min:this.min,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,pattern:this.pattern,list:this.datalist&&"datalist",placeholder:this.placeholder,readOnly:this.readonly,ref:t=>this.nativeInput=t,required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type,value:t}),this.disabled&&o("mds-text",{typography:"option",class:"tip top-1 disabled"},"Disabilitato"),this.readonly&&!this.disabled&&o("mds-text",{typography:"option",class:"tip top-1 read-only"},"Sola lettura"),this.required&&!this.disabled&&!this.readonly&&o("mds-text",{typography:"option",class:"tip top-1 required"},"Obbligatorio"),this.tip&&o("mds-text",{typography:"option",class:a("tip bottom-1",this.variant&&"tip-variant")},this.tip),this.datalist&&o("datalist",{id:"datalist",class:"datalist"},this.datalist.forEach((t=>{o("option",{value:t})}))),this.icon&&o("mds-icon",{class:a("icon",this.variant),name:this.icon}))}get el(){return n(this)}static get watchers(){return{value:["valueChanged"]}}};e.style='*,::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;}';export{e as mds_input}
1
+ import{r as t,c as i,h as o,H as r,g as n}from"./p-a71f012b.js";function s(t){var i,o,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(o=s(t[i]))&&(r&&(r+=" "),r+=o);else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function a(){for(var t,i,o=0,r="";o<arguments.length;)(t=arguments[o++])&&(i=s(t))&&(r&&(r+=" "),r+=i);return r}const e=class{constructor(o){t(this,o),this.changeEvent=i(this,"mdsInputChange",7),this.keyDownEvent=i(this,"mdsInputKeydown",7),this.blurEvent=i(this,"mdsInputBlur",7),this.focusEvent=i(this,"mdsInputFocus",7),this.onInput=t=>{const i=t.target;i&&(this.value=i.value),this.keyDownEvent.emit(t)},this.onBlur=()=>{this.hasFocus=!1,this.blurEvent.emit()},this.onFocus=t=>{const i=t.target;this.hasFocus=!0,this.focusEvent.emit(),this.readonly&&setTimeout((()=>{i.select()}),10)},this.hasFocus=!1,this.autocomplete="off",this.autofocus=!1,this.datalist=void 0,this.disabled=!1,this.icon=void 0,this.max=void 0,this.maxlength=void 0,this.min=void 0,this.minlength=void 0,this.name=void 0,this.pattern=void 0,this.placeholder="",this.readonly=!1,this.required=!1,this.variant=void 0,this.tip=void 0,this.step=void 0,this.type="text",this.value=""}componentWillLoad(){if(this.el.hasAttribute("tabindex")){const t=this.el.getAttribute("tabindex");this.tabindex=null!==t?parseInt(t):void 0,this.el.removeAttribute("tabindex")}}valueChanged(){this.changeEvent.emit({value:this.value})}async setFocus(){this.nativeInput&&this.nativeInput.focus()}getInputElement(){return Promise.resolve(this.nativeInput)}getValue(){var t;return"number"==typeof this.value?this.value.toString():null!==(t=this.value)&&void 0!==t?t:""}render(){const t=this.getValue();return o(r,null,"textarea"===this.type?o("textarea",{class:a("input",this.icon&&"has-icon"),autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,ref:t=>this.nativeInput=t,required:this.required,tabIndex:this.tabindex,value:t}):o("input",{class:a("input",this.icon&&"has-icon"),autoComplete:this.autocomplete,autoFocus:this.autofocus,disabled:this.disabled,max:this.max,maxLength:this.maxlength,min:this.min,minLength:this.minlength,name:this.name,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,pattern:this.pattern,list:this.datalist&&"datalist",placeholder:this.placeholder,readOnly:this.readonly,ref:t=>this.nativeInput=t,required:this.required,step:this.step,tabIndex:this.tabindex,type:this.type,value:t}),this.disabled&&o("mds-text",{typography:"option",class:"tip top-1 disabled"},"Disabilitato"),this.readonly&&!this.disabled&&o("mds-text",{typography:"option",class:"tip top-1 read-only"},"Sola lettura"),this.required&&!this.disabled&&!this.readonly&&o("mds-text",{typography:"option",class:"tip top-1 required"},"Obbligatorio"),this.tip&&o("mds-text",{typography:"option",class:a("tip bottom-1",this.variant&&"tip-variant")},this.tip),this.datalist&&o("datalist",{id:"datalist",class:"datalist"},this.datalist.forEach((t=>{o("option",{value:t})}))),this.icon&&o("mds-icon",{class:a("icon",this.variant),name:this.icon}))}get el(){return n(this)}static get watchers(){return{value:["valueChanged"]}}};e.style='*,::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;}';export{e as mds_input}