@maggioli-design-system/mds-table-row 4.4.0 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-2800b46e.js → index-74074cfd.js} +55 -23
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-table-row.cjs.entry.js +12 -12
- package/dist/cjs/mds-table-row.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/aria.js +18 -18
- package/dist/collection/common/keyboard-manager.js +38 -38
- package/dist/collection/common/unit.js +7 -7
- package/dist/collection/components/mds-table-row/mds-table-row.css +4 -0
- package/dist/collection/components/mds-table-row/mds-table-row.js +51 -51
- package/dist/collection/dictionary/autocomplete.js +56 -56
- package/dist/collection/dictionary/button.js +19 -19
- package/dist/collection/dictionary/color.js +14 -14
- package/dist/collection/dictionary/floating-ui.js +14 -14
- package/dist/collection/dictionary/input.js +31 -15
- package/dist/collection/dictionary/loading.js +2 -2
- package/dist/collection/dictionary/typography.js +46 -46
- package/dist/collection/dictionary/variant.js +54 -54
- package/dist/collection/fixtures/cities.js +107 -107
- package/dist/components/mds-table-row.d.ts +2 -2
- package/dist/components/mds-table-row.js +27 -27
- package/dist/documentation.json +2 -2
- package/dist/esm/{index-850d0543.js → index-152f5146.js} +55 -23
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-table-row.entry.js +12 -12
- package/dist/esm/mds-table-row.js +3 -3
- package/dist/esm-es5/index-152f5146.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-table-row.entry.js +1 -1
- package/dist/esm-es5/mds-table-row.js +1 -1
- package/dist/mds-table-row/mds-table-row.esm.js +1 -1
- package/dist/mds-table-row/mds-table-row.js +15 -15
- package/dist/mds-table-row/p-0461a91a.system.entry.js +1 -0
- package/dist/mds-table-row/{p-2ba74223.system.js → p-1bbb8bb6.system.js} +1 -1
- package/dist/mds-table-row/p-6d1e82c7.system.js +2 -0
- package/dist/mds-table-row/p-8b036a2e.entry.js +1 -0
- package/dist/mds-table-row/p-ccb2cba7.js +2 -0
- package/dist/stats.json +30 -30
- package/dist/types/common/keyboard-manager.d.ts +9 -9
- package/dist/types/components/mds-table-row/mds-table-row.d.ts +3 -3
- package/dist/types/dictionary/input.d.ts +2 -1
- package/dist/types/interface/input-value.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +8 -0
- package/documentation.json +14 -4
- package/package.json +4 -4
- package/src/dictionary/input.ts +18 -0
- package/src/fixtures/icons.json +3 -0
- package/src/fixtures/iconsauce.json +3 -0
- package/www/build/mds-table-row.esm.js +1 -1
- package/www/build/mds-table-row.js +15 -15
- package/www/build/p-0461a91a.system.entry.js +1 -0
- package/www/build/{p-2ba74223.system.js → p-1bbb8bb6.system.js} +1 -1
- package/www/build/p-6d1e82c7.system.js +2 -0
- package/www/build/p-8b036a2e.entry.js +1 -0
- package/www/build/p-ccb2cba7.js +2 -0
- package/dist/esm-es5/index-850d0543.js +0 -1
- package/dist/mds-table-row/p-084e05de.system.js +0 -2
- package/dist/mds-table-row/p-514bb1b7.js +0 -2
- package/dist/mds-table-row/p-b0584083.entry.js +0 -1
- package/dist/mds-table-row/p-e74701f9.system.entry.js +0 -1
- package/www/build/p-084e05de.system.js +0 -2
- package/www/build/p-514bb1b7.js +0 -2
- package/www/build/p-b0584083.entry.js +0 -1
- package/www/build/p-e74701f9.system.entry.js +0 -1
|
@@ -49,6 +49,13 @@ const uniqueTime = (key, measureText) => {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
|
|
52
|
+
/**
|
|
53
|
+
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
54
|
+
*
|
|
55
|
+
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
56
|
+
* support as of Stencil v4.
|
|
57
|
+
*/
|
|
58
|
+
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
52
59
|
/**
|
|
53
60
|
* Default style mode id
|
|
54
61
|
*/
|
|
@@ -249,6 +256,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
249
256
|
}
|
|
250
257
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
251
258
|
}
|
|
259
|
+
// Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
|
|
260
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
261
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
262
|
+
}
|
|
252
263
|
if (appliedStyles) {
|
|
253
264
|
appliedStyles.add(scopeId);
|
|
254
265
|
}
|
|
@@ -326,7 +337,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
326
337
|
elm[memberName] = newValue;
|
|
327
338
|
}
|
|
328
339
|
}
|
|
329
|
-
catch (e) {
|
|
340
|
+
catch (e) {
|
|
341
|
+
/**
|
|
342
|
+
* in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
|
|
343
|
+
*/
|
|
344
|
+
}
|
|
330
345
|
}
|
|
331
346
|
if (newValue == null || newValue === false) {
|
|
332
347
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
@@ -1037,10 +1052,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1037
1052
|
*/
|
|
1038
1053
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1039
1054
|
var _a;
|
|
1055
|
+
const prototype = Cstr.prototype;
|
|
1040
1056
|
if (cmpMeta.$members$) {
|
|
1041
1057
|
// It's better to have a const than two Object.entries()
|
|
1042
1058
|
const members = Object.entries(cmpMeta.$members$);
|
|
1043
|
-
const prototype = Cstr.prototype;
|
|
1044
1059
|
members.map(([memberName, [memberFlags]]) => {
|
|
1045
1060
|
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1046
1061
|
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
@@ -1063,6 +1078,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1063
1078
|
const attrNameToPropName = new Map();
|
|
1064
1079
|
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1065
1080
|
plt.jmp(() => {
|
|
1081
|
+
var _a;
|
|
1066
1082
|
const propName = attrNameToPropName.get(attrName);
|
|
1067
1083
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1068
1084
|
// in the case where an attribute was set inline.
|
|
@@ -1118,11 +1134,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1118
1134
|
// 1. The instance is ready
|
|
1119
1135
|
// 2. The watchers are ready
|
|
1120
1136
|
// 3. The value has changed
|
|
1121
|
-
if (
|
|
1137
|
+
if (flags &&
|
|
1138
|
+
!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1122
1139
|
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1123
1140
|
newValue !== oldValue) {
|
|
1124
1141
|
const instance = hostRef.$lazyInstance$ ;
|
|
1125
|
-
const entry = cmpMeta.$watchers$[attrName];
|
|
1142
|
+
const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
|
|
1126
1143
|
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1127
1144
|
if (instance[callbackName] != null) {
|
|
1128
1145
|
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
@@ -1144,10 +1161,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1144
1161
|
...members
|
|
1145
1162
|
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1146
1163
|
.map(([propName, m]) => {
|
|
1164
|
+
var _a;
|
|
1147
1165
|
const attrName = m[1] || propName;
|
|
1148
1166
|
attrNameToPropName.set(attrName, propName);
|
|
1149
1167
|
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1150
|
-
cmpMeta.$attrsToReflect
|
|
1168
|
+
(_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
|
|
1151
1169
|
}
|
|
1152
1170
|
return attrName;
|
|
1153
1171
|
}),
|
|
@@ -1315,12 +1333,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1315
1333
|
const customElements = win.customElements;
|
|
1316
1334
|
const head = doc.head;
|
|
1317
1335
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1318
|
-
const
|
|
1336
|
+
const dataStyles = /*@__PURE__*/ doc.createElement('style');
|
|
1319
1337
|
const deferredConnectedCallbacks = [];
|
|
1320
1338
|
let appLoadFallback;
|
|
1321
1339
|
let isBootstrapping = true;
|
|
1322
1340
|
Object.assign(plt, options);
|
|
1323
1341
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1342
|
+
let hasSlotRelocation = false;
|
|
1324
1343
|
lazyBundles.map((lazyBundle) => {
|
|
1325
1344
|
lazyBundle[1].map((compactMeta) => {
|
|
1326
1345
|
const cmpMeta = {
|
|
@@ -1329,6 +1348,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1329
1348
|
$members$: compactMeta[2],
|
|
1330
1349
|
$listeners$: compactMeta[3],
|
|
1331
1350
|
};
|
|
1351
|
+
// Check if we are using slots outside the shadow DOM in this component.
|
|
1352
|
+
// We'll use this information later to add styles for `slot-fb` elements
|
|
1353
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
1354
|
+
hasSlotRelocation = true;
|
|
1355
|
+
}
|
|
1332
1356
|
{
|
|
1333
1357
|
cmpMeta.$members$ = compactMeta[2];
|
|
1334
1358
|
}
|
|
@@ -1385,15 +1409,23 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1385
1409
|
}
|
|
1386
1410
|
});
|
|
1387
1411
|
});
|
|
1412
|
+
// Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
|
|
1413
|
+
if (hasSlotRelocation) {
|
|
1414
|
+
dataStyles.innerHTML += SLOT_FB_CSS;
|
|
1415
|
+
}
|
|
1416
|
+
// Add hydration styles
|
|
1388
1417
|
{
|
|
1389
|
-
|
|
1390
|
-
|
|
1418
|
+
dataStyles.innerHTML += cmpTags + HYDRATED_CSS;
|
|
1419
|
+
}
|
|
1420
|
+
// If we have styles, add them to the DOM
|
|
1421
|
+
if (dataStyles.innerHTML.length) {
|
|
1422
|
+
dataStyles.setAttribute('data-styles', '');
|
|
1423
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1391
1424
|
// Apply CSP nonce to the style tag if it exists
|
|
1392
1425
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1393
1426
|
if (nonce != null) {
|
|
1394
|
-
|
|
1427
|
+
dataStyles.setAttribute('nonce', nonce);
|
|
1395
1428
|
}
|
|
1396
|
-
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1397
1429
|
}
|
|
1398
1430
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1399
1431
|
isBootstrapping = false;
|
|
@@ -1506,19 +1538,19 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1506
1538
|
return module[exportName];
|
|
1507
1539
|
}
|
|
1508
1540
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1541
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1542
|
+
const processMod = importedModule => {
|
|
1543
|
+
cmpModules.set(bundleId, importedModule);
|
|
1544
|
+
return importedModule[exportName];
|
|
1545
|
+
}
|
|
1546
|
+
switch(bundleId) {
|
|
1547
|
+
|
|
1548
|
+
case 'mds-table-row.cjs':
|
|
1549
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1550
|
+
/* webpackMode: "lazy" */
|
|
1551
|
+
'./mds-table-row.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1552
|
+
}
|
|
1520
1553
|
}
|
|
1521
|
-
}
|
|
1522
1554
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1523
1555
|
/* @vite-ignore */
|
|
1524
1556
|
/* webpackInclude: /\.entry\.js$/ */
|
|
@@ -1593,7 +1625,7 @@ const flush = () => {
|
|
|
1593
1625
|
}
|
|
1594
1626
|
}
|
|
1595
1627
|
};
|
|
1596
|
-
const nextTick =
|
|
1628
|
+
const nextTick = (cb) => promiseResolve().then(cb);
|
|
1597
1629
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1598
1630
|
|
|
1599
1631
|
exports.Host = Host;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-74074cfd.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-74074cfd.js');
|
|
6
6
|
|
|
7
|
-
const mdsTableRowCss = ".fixed{position:fixed}.absolute{position:absolute}.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{display:table-row}:host([interactive]:hover){--mds-table-cell-background:var(--mds-table-cell-background-hover, rgb(var(--tone-neutral)))}";
|
|
7
|
+
const mdsTableRowCss = ".fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.text{font-size:1rem}.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{display:table-row}:host([interactive]:hover){--mds-table-cell-background:var(--mds-table-cell-background-hover, rgb(var(--tone-neutral)))}";
|
|
8
8
|
|
|
9
9
|
const MdsTableRow = class {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.interactive = undefined;
|
|
13
|
+
}
|
|
14
|
+
tableInteractiveHandler(event) {
|
|
15
|
+
this.interactive = event.detail;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (index.h(index.Host, { role: "row" }, index.h("slot", null)));
|
|
19
|
+
}
|
|
20
20
|
};
|
|
21
21
|
MdsTableRow.style = mdsTableRowCss;
|
|
22
22
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-74074cfd.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.8.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-table-row.cjs.js', document.baseURI).href));
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
const hash = (s) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
let i, h;
|
|
3
|
+
for (i = 0, h = 0; i < s.length; i++) {
|
|
4
|
+
h = Math.imul(31, h) + s.charCodeAt(i) | 0;
|
|
5
|
+
}
|
|
6
|
+
return h.toString();
|
|
7
7
|
};
|
|
8
8
|
const randomInt = (max) => Math.floor(Math.random() * max);
|
|
9
9
|
const unslugName = (name) => {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
return (_c = (_b = (_a = name.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()) === null || _b === void 0 ? void 0 : _b.replace(/-/g, ' ')) !== null && _c !== void 0 ? _c : name;
|
|
12
12
|
};
|
|
13
13
|
const setAttributeIfEmpty = (element, attribute, value) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
var _a;
|
|
15
|
+
if (element.hasAttribute(attribute)) {
|
|
16
|
+
return (_a = element.getAttribute(attribute)) !== null && _a !== void 0 ? _a : '';
|
|
17
|
+
}
|
|
18
|
+
element.setAttribute(attribute, value);
|
|
19
|
+
return value;
|
|
20
20
|
};
|
|
21
21
|
const hashValue = (value) => `${value}-${hash(value)}`;
|
|
22
22
|
const hashRandomValue = (value) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const randomValue = randomInt(1000000);
|
|
24
|
+
if (value) {
|
|
25
|
+
return `${value}-${hash(randomValue.toString())}`;
|
|
26
|
+
}
|
|
27
|
+
return hash(randomValue.toString());
|
|
28
28
|
};
|
|
29
29
|
export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
export class KeyboardManager {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
2
|
+
constructor() {
|
|
3
|
+
this.elements = [];
|
|
4
|
+
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
5
|
+
if (event.code === 'Space' || event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
6
|
+
event.target.click();
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
this.handleEscapeBehaviorDispatchEvent = (event) => {
|
|
10
|
+
if (event.code === 'Escape' && this.escapeCallback) {
|
|
11
|
+
this.escapeCallback();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
this.addElement = (el, name = 'element') => {
|
|
15
|
+
this.elements[name] = el;
|
|
16
|
+
};
|
|
17
|
+
this.attachClickBehavior = (name = 'element') => {
|
|
18
|
+
if (this.elements[name]) {
|
|
19
|
+
this.elements[name].addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
this.detachClickBehavior = (name = 'element') => {
|
|
23
|
+
if (this.elements[name]) {
|
|
24
|
+
this.elements[name].removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
this.attachEscapeBehavior = (callBack) => {
|
|
28
|
+
this.escapeCallback = callBack;
|
|
29
|
+
if (window !== undefined) {
|
|
30
|
+
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
this.detachEscapeBehavior = () => {
|
|
34
|
+
this.escapeCallback = () => { return; };
|
|
35
|
+
if (window !== undefined) {
|
|
36
|
+
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
40
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const cssDurationToMilliseconds = (duration, defaultValue = 1000) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
if (duration.includes('s')) {
|
|
3
|
+
return Number(duration.replace('s', '')) * 1000;
|
|
4
|
+
}
|
|
5
|
+
if (duration.includes('ms')) {
|
|
6
|
+
return Number(duration.replace('s', ''));
|
|
7
|
+
}
|
|
8
|
+
return defaultValue;
|
|
9
9
|
};
|
|
10
10
|
export { cssDurationToMilliseconds, };
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
border-width: 1px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.text {
|
|
14
|
+
font-size: 1rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
.shadow {
|
|
14
18
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
15
19
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
@@ -3,55 +3,55 @@ import { Host, h } from "@stencil/core";
|
|
|
3
3
|
* @slot default - Put `mds-table-cell` element/s.
|
|
4
4
|
*/
|
|
5
5
|
export class MdsTableRow {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
6
|
+
constructor() {
|
|
7
|
+
this.interactive = undefined;
|
|
8
|
+
}
|
|
9
|
+
tableInteractiveHandler(event) {
|
|
10
|
+
this.interactive = event.detail;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, { role: "row" }, h("slot", null)));
|
|
14
|
+
}
|
|
15
|
+
static get is() { return "mds-table-row"; }
|
|
16
|
+
static get encapsulation() { return "shadow"; }
|
|
17
|
+
static get originalStyleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["mds-table-row.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get styleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["mds-table-row.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get properties() {
|
|
28
|
+
return {
|
|
29
|
+
"interactive": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"mutable": true,
|
|
32
|
+
"complexType": {
|
|
33
|
+
"original": "boolean",
|
|
34
|
+
"resolved": "boolean",
|
|
35
|
+
"references": {}
|
|
36
|
+
},
|
|
37
|
+
"required": false,
|
|
38
|
+
"optional": false,
|
|
39
|
+
"docs": {
|
|
40
|
+
"tags": [],
|
|
41
|
+
"text": ""
|
|
42
|
+
},
|
|
43
|
+
"attribute": "interactive",
|
|
44
|
+
"reflect": true
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static get listeners() {
|
|
49
|
+
return [{
|
|
50
|
+
"name": "mdsTableInteractiveChange",
|
|
51
|
+
"method": "tableInteractiveHandler",
|
|
52
|
+
"target": "document",
|
|
53
|
+
"capture": false,
|
|
54
|
+
"passive": false
|
|
55
|
+
}];
|
|
56
|
+
}
|
|
57
57
|
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
const autoCompleteDictionary = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
2
|
+
'additional-name',
|
|
3
|
+
'address',
|
|
4
|
+
'address-level1',
|
|
5
|
+
'address-level2',
|
|
6
|
+
'address-level3',
|
|
7
|
+
'address-level4',
|
|
8
|
+
'address-line1',
|
|
9
|
+
'address-line2',
|
|
10
|
+
'address-line3',
|
|
11
|
+
'bday',
|
|
12
|
+
'bday-day',
|
|
13
|
+
'bday-month',
|
|
14
|
+
'bday-year',
|
|
15
|
+
'cc-additional-name',
|
|
16
|
+
'cc-csc',
|
|
17
|
+
'cc-exp',
|
|
18
|
+
'cc-exp-month',
|
|
19
|
+
'cc-exp-year',
|
|
20
|
+
'cc-family-name',
|
|
21
|
+
'cc-family-name',
|
|
22
|
+
'cc-given-name',
|
|
23
|
+
'cc-name',
|
|
24
|
+
'cc-number',
|
|
25
|
+
'cc-type',
|
|
26
|
+
'country',
|
|
27
|
+
'country-name',
|
|
28
|
+
'current-password',
|
|
29
|
+
'email',
|
|
30
|
+
'family-name',
|
|
31
|
+
'given-name',
|
|
32
|
+
'honorific-prefix',
|
|
33
|
+
'honorific-suffix',
|
|
34
|
+
'impp',
|
|
35
|
+
'language',
|
|
36
|
+
'name',
|
|
37
|
+
'new-password',
|
|
38
|
+
'nickname',
|
|
39
|
+
'off',
|
|
40
|
+
'on',
|
|
41
|
+
'one-time-code',
|
|
42
|
+
'organization',
|
|
43
|
+
'organization-title',
|
|
44
|
+
'photo',
|
|
45
|
+
'postal-code',
|
|
46
|
+
'sex',
|
|
47
|
+
'street-address',
|
|
48
|
+
'tel',
|
|
49
|
+
'tel-area-code',
|
|
50
|
+
'tel-country-code',
|
|
51
|
+
'tel-extension',
|
|
52
|
+
'tel-local',
|
|
53
|
+
'tel-national',
|
|
54
|
+
'transaction-amount',
|
|
55
|
+
'transaction-currency',
|
|
56
|
+
'url',
|
|
57
|
+
'username',
|
|
58
58
|
];
|
|
59
59
|
export { autoCompleteDictionary, };
|