xv-webcomponents 0.1.29 → 0.1.31
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-782b9733.js → index-5ee1b884.js} +43 -2
- package/dist/cjs/index-5ee1b884.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-aa46f72a.js → utils-22c0eda0.js} +1 -16
- package/dist/cjs/utils-22c0eda0.js.map +1 -0
- package/dist/cjs/{xv-accordion-v2_28.cjs.entry.js → xv-accordion-v2_26.cjs.entry.js} +124 -429
- package/dist/cjs/xv-accordion-v2_26.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +4 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +1 -2
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.css +5 -4
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.js.map +1 -1
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +2 -2
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -1
- package/dist/collection/components/xv-table/_vars.js +9 -0
- package/dist/collection/components/xv-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +86 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +160 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +55 -114
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +28 -151
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +22 -36
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +146 -118
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table.css +83 -141
- package/dist/collection/components/xv-table/xv-table.js +56 -208
- package/dist/collection/components/xv-table/xv-table.js.map +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +3 -3
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.css +5 -3
- package/dist/collection/components/xv-tabs/xv-tabs.js +8 -36
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.js +10 -10
- package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +1 -1
- package/dist/esm/{index-83ab73b7.js → index-590eb7d2.js} +43 -3
- package/dist/esm/index-590eb7d2.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-0d1c18d5.js → utils-a9c71376.js} +2 -16
- package/dist/esm/utils-a9c71376.js.map +1 -0
- package/dist/esm/{xv-accordion-v2_28.entry.js → xv-accordion-v2_26.entry.js} +124 -427
- package/dist/esm/xv-accordion-v2_26.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +1 -1
- package/dist/esm/xv-webcomponents.js +3 -3
- package/dist/types/components/xv-table/_vars.d.ts +15 -0
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +15 -0
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +4 -20
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +15 -46
- package/dist/types/components/xv-table/xv-table.d.ts +9 -32
- package/dist/types/components/xv-tabs/xv-tabs.d.ts +1 -10
- package/dist/types/components.d.ts +57 -273
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/p-612356e6.js +3 -0
- package/dist/xv-webcomponents/p-612356e6.js.map +1 -0
- package/dist/xv-webcomponents/p-c09a0bfe.entry.js +2 -0
- package/dist/xv-webcomponents/p-e750290d.entry.js +2 -0
- package/dist/xv-webcomponents/p-e750290d.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-f98a1845.js +2 -0
- package/dist/xv-webcomponents/p-f98a1845.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-782b9733.js.map +0 -1
- package/dist/cjs/utils-aa46f72a.js.map +0 -1
- package/dist/cjs/xv-accordion-v2_28.cjs.entry.js.map +0 -1
- package/dist/collection/components/xv-table/defs.js +0 -28
- package/dist/collection/components/xv-table/defs.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.css +0 -13
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js +0 -111
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.css +0 -80
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js +0 -172
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.css +0 -47
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js +0 -78
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js.map +0 -1
- package/dist/esm/index-83ab73b7.js.map +0 -1
- package/dist/esm/utils-0d1c18d5.js.map +0 -1
- package/dist/esm/xv-accordion-v2_28.entry.js.map +0 -1
- package/dist/types/components/xv-table/defs.d.ts +0 -38
- package/dist/types/components/xv-table/xv-table-col/xv-table-col.d.ts +0 -9
- package/dist/types/components/xv-table/xv-table-header-row/xv-table-header-row.d.ts +0 -28
- package/dist/types/components/xv-table/xv-table-toolbar/xv-table-toolbar.d.ts +0 -6
- package/dist/xv-webcomponents/p-39bf1511.js +0 -2
- package/dist/xv-webcomponents/p-39bf1511.js.map +0 -1
- package/dist/xv-webcomponents/p-5f18d718.entry.js +0 -2
- package/dist/xv-webcomponents/p-840929c5.js +0 -3
- package/dist/xv-webcomponents/p-840929c5.js.map +0 -1
- package/dist/xv-webcomponents/p-cc83f7ea.entry.js +0 -2
- package/dist/xv-webcomponents/p-cc83f7ea.entry.js.map +0 -1
- /package/dist/xv-webcomponents/{p-5f18d718.entry.js.map → p-c09a0bfe.entry.js.map} +0 -0
|
@@ -13,20 +13,6 @@ function uidGenerator() {
|
|
|
13
13
|
* @param [thisObject] The context object for the given callback function.
|
|
14
14
|
*/
|
|
15
15
|
const forEach = (a, predicate, thisObject) => Array.prototype.forEach.call(a, predicate, thisObject);
|
|
16
|
-
/**
|
|
17
|
-
* Debounce the current function for some delay.
|
|
18
|
-
* @param func The delayed function.
|
|
19
|
-
* @param [delay = 500] The time to function delay call.
|
|
20
|
-
*/
|
|
21
|
-
const debounce = (func, delay = 500) => {
|
|
22
|
-
let timeoutId;
|
|
23
|
-
return function (...args) {
|
|
24
|
-
clearTimeout(timeoutId);
|
|
25
|
-
timeoutId = setTimeout(() => {
|
|
26
|
-
func.apply(this, args);
|
|
27
|
-
}, delay);
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
16
|
const setAttr = (node, name, value) => {
|
|
31
17
|
if (typeof value === 'string') {
|
|
32
18
|
!node.hasAttribute(name) && node.setAttribute(name, value);
|
|
@@ -41,10 +27,9 @@ const setAttr = (node, name, value) => {
|
|
|
41
27
|
return node;
|
|
42
28
|
};
|
|
43
29
|
|
|
44
|
-
exports.debounce = debounce;
|
|
45
30
|
exports.forEach = forEach;
|
|
46
31
|
exports.format = format;
|
|
47
32
|
exports.setAttr = setAttr;
|
|
48
33
|
exports.uidGenerator = uidGenerator;
|
|
49
34
|
|
|
50
|
-
//# sourceMappingURL=utils-
|
|
35
|
+
//# sourceMappingURL=utils-22c0eda0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"utils-22c0eda0.js","mappings":";;SAAgB,MAAM,CAAC,KAAc,EAAE,MAAe,EAAE,IAAa;IACnE,OAAO,CAAC,KAAK,IAAI,EAAE,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AACjF,CAAC;SAEe,YAAY;IAC1B,OAAO,sCAAsC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAC/D,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAChF,CAAC;AACJ,CAAC;AAED;;;;;;MAMa,OAAO,GAAG,CACrB,CAA+C,EAC/C,SAAoD,EACpD,UAAgB,KACb,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE;MAsB/C,OAAO,GAAG,CAAC,IAAa,EAAE,IAAY,EAAE,KAAuB;IAC1E,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC;KACb;IAED,IAAI,KAAK,EAAE;QACT,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;KACzD;SAAM;QACL,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KACvD;IAED,OAAO,IAAI,CAAC;AACd;;;;;;;","names":[],"sources":["src/utils/utils.ts"],"sourcesContent":["export function format(first?: string, middle?: string, last?: string): string {\n return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');\n}\n\nexport function uidGenerator() {\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, c =>\n (+c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)\n );\n}\n\n/**\n * Walks through the given DOM collection and runs the given callback.\n * @param a A DOM collection.\n * @param predicate The callback function.\n * @param [thisObject] The context object for the given callback function.\n */\nexport const forEach = (\n a: NodeListOf<Node> | HTMLCollectionOf<Element>,\n predicate: (search: Element, index?: number) => void,\n thisObject?: any\n) => Array.prototype.forEach.call(a, predicate, thisObject);\n\n/**\n * Debounce the current function for some delay.\n * @param func The delayed function.\n * @param [delay = 500] The time to function delay call.\n */\nexport const debounce = (func: Function, delay: number = 500) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n return function (...args: any[]) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => {\n func.apply(this, args);\n }, delay);\n };\n};\n\nexport const checkTag = <T extends Element, G = T>(element: T, tag: string) => {\n if (element?.tagName !== tag) return undefined;\n return element as unknown as G;\n};\n\nexport const setAttr = (node: Element, name: string, value: string | boolean) => {\n if (typeof value === 'string') {\n !node.hasAttribute(name) && node.setAttribute(name, value);\n return node;\n }\n\n if (value) {\n !node.hasAttribute(name) && node.setAttribute(name, '');\n } else {\n node.hasAttribute(name) && node.removeAttribute(name);\n }\n\n return node;\n};\n"],"version":3}
|