@maggioli-design-system/mds-table-row 1.2.1 → 2.0.0

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 (68) hide show
  1. package/dist/cjs/{index-797b786c.js → index-2159a30d.js} +166 -376
  2. package/dist/cjs/loader.cjs.js +3 -3
  3. package/dist/cjs/mds-table-row.cjs.entry.js +4 -45
  4. package/dist/cjs/mds-table-row.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/components/mds-table-row/mds-table-row.css +22 -23
  7. package/dist/collection/components/mds-table-row/mds-table-row.js +21 -5
  8. package/dist/collection/dictionary/floating-ui.js +19 -0
  9. package/dist/collection/dictionary/icon.js +2 -2
  10. package/dist/collection/dictionary/typography.js +6 -1
  11. package/dist/collection/types/floating-ui.js +1 -0
  12. package/dist/components/index.d.ts +1 -1
  13. package/dist/components/mds-table-row.js +7 -48
  14. package/dist/esm/{index-7d849f54.js → index-1e8e95d7.js} +166 -376
  15. package/dist/esm/loader.js +3 -3
  16. package/dist/esm/mds-table-row.entry.js +4 -45
  17. package/dist/esm/mds-table-row.js +3 -3
  18. package/dist/esm/polyfills/css-shim.js +1 -1
  19. package/dist/esm-es5/index-1e8e95d7.js +2 -0
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/esm-es5/mds-table-row.entry.js +1 -1
  22. package/dist/esm-es5/mds-table-row.js +1 -1
  23. package/dist/mds-table-row/mds-table-row.esm.js +1 -1
  24. package/dist/mds-table-row/mds-table-row.js +1 -1
  25. package/dist/mds-table-row/p-c6fbd532.system.js +2 -0
  26. package/dist/mds-table-row/p-c8145b7b.system.entry.js +1 -0
  27. package/dist/mds-table-row/p-ca70a50c.entry.js +1 -0
  28. package/dist/mds-table-row/p-caab8e1e.system.js +1 -0
  29. package/dist/mds-table-row/p-f5a4be35.js +2 -0
  30. package/dist/stats.json +98 -56
  31. package/dist/types/components/mds-table-row/mds-table-row.d.ts +1 -1
  32. package/dist/types/components.d.ts +2 -0
  33. package/dist/types/dictionary/floating-ui.d.ts +3 -0
  34. package/dist/types/dictionary/typography.d.ts +2 -1
  35. package/dist/types/types/floating-ui.d.ts +2 -0
  36. package/dist/types/types/typography.d.ts +1 -0
  37. package/package.json +6 -8
  38. package/readme.md +8 -0
  39. package/src/components/mds-table-row/.gitlab-ci.yml +25 -0
  40. package/src/components/mds-table-row/mds-table-row.css +12 -22
  41. package/src/components/mds-table-row/mds-table-row.tsx +4 -5
  42. package/src/components/mds-table-row/readme.md +8 -0
  43. package/src/components.d.ts +2 -0
  44. package/src/dictionary/floating-ui.ts +25 -0
  45. package/src/dictionary/icon.ts +2 -2
  46. package/src/dictionary/typography.ts +7 -0
  47. package/src/fixtures/icons.json +64 -0
  48. package/src/tailwind/components.css +14 -0
  49. package/src/types/floating-ui.ts +17 -0
  50. package/src/types/typography.ts +5 -0
  51. package/www/build/mds-table-row.esm.js +1 -1
  52. package/www/build/mds-table-row.js +1 -1
  53. package/www/build/p-c6fbd532.system.js +2 -0
  54. package/www/build/p-c8145b7b.system.entry.js +1 -0
  55. package/www/build/p-ca70a50c.entry.js +1 -0
  56. package/www/build/p-caab8e1e.system.js +1 -0
  57. package/www/build/p-f5a4be35.js +2 -0
  58. package/dist/esm-es5/index-7d849f54.js +0 -1
  59. package/dist/mds-table-row/p-031e68b1.system.entry.js +0 -1
  60. package/dist/mds-table-row/p-13e3a2cc.system.js +0 -1
  61. package/dist/mds-table-row/p-15f2406e.system.js +0 -1
  62. package/dist/mds-table-row/p-3619a466.js +0 -1
  63. package/dist/mds-table-row/p-dab964fd.entry.js +0 -1
  64. package/www/build/p-031e68b1.system.entry.js +0 -1
  65. package/www/build/p-13e3a2cc.system.js +0 -1
  66. package/www/build/p-15f2406e.system.js +0 -1
  67. package/www/build/p-3619a466.js +0 -1
  68. package/www/build/p-dab964fd.entry.js +0 -1
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-797b786c.js');
5
+ const index = require('./index-2159a30d.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.16.1 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return index.promiseResolve();
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["mds-table-row.cjs",[[4,"mds-table-row",{"interactive":[32]},[[16,"tableInteractive","tableInteractiveHandler"]]]]]], options);
17
+ return index.bootstrapLazy([["mds-table-row.cjs",[[1,"mds-table-row",{"interactive":[1540]},[[16,"tableInteractive","tableInteractiveHandler"]]]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -2,52 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-797b786c.js');
5
+ const index = require('./index-2159a30d.js');
6
6
 
7
- function toVal(mix) {
8
- var k, y, str='';
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;border-bottom-width:1px;border-bottom:var(--border-width, 2px) solid var(--border-color, rgb(var(--tone-neutral-09)))}:host(:first-child){--radius-top-left:var(--radius, 0.5rem);--radius-top-right:var(--radius, 0.5rem)}:host(:last-child){border-color:transparent;--radius-bottom-left:var(--radius, 0.5rem);--radius-bottom-right:var(--radius, 0.5rem)}:host([interactive]:hover){--background:var(--background-row-hover, rgb(var(--tone-neutral)))}";
9
8
 
10
- if (typeof mix === 'string' || typeof mix === 'number') {
11
- str += mix;
12
- } else if (typeof mix === 'object') {
13
- if (Array.isArray(mix)) {
14
- for (k=0; k < mix.length; k++) {
15
- if (mix[k]) {
16
- if (y = toVal(mix[k])) {
17
- str && (str += ' ');
18
- str += y;
19
- }
20
- }
21
- }
22
- } else {
23
- for (k in mix) {
24
- if (mix[k]) {
25
- str && (str += ' ');
26
- str += k;
27
- }
28
- }
29
- }
30
- }
31
-
32
- return str;
33
- }
34
-
35
- function clsx () {
36
- var i=0, tmp, x, str='';
37
- while (i < arguments.length) {
38
- if (tmp = arguments[i++]) {
39
- if (x = toVal(tmp)) {
40
- str && (str += ' ');
41
- str += x;
42
- }
43
- }
44
- }
45
- return str;
46
- }
47
-
48
- const mdsTableRowCss = ".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)}mds-table-row{display:table-row;border-bottom-width:1px;border-bottom-color:var(--border-color, rgb(var(--adjust-tone-09)));border-bottom-style:solid}mds-table-row:last-child{border-color:transparent}mds-table-row:first-child mds-table-cell:first-child{border-top-left-radius:var(--radius, 0.5rem)}mds-table-row:last-child mds-table-cell:first-child{border-bottom-left-radius:var(--radius, 0.5rem)}mds-table-row:first-child mds-table-cell:last-child{border-top-right-radius:var(--radius, 0.5rem)}mds-table-row:last-child mds-table-cell:last-child{border-bottom-right-radius:var(--radius, 0.5rem)}mds-table-row:focus{opacity:0.5}mds-table-row.interactive:hover mds-table-cell{background-color:var(--background-row-hover, rgb(var(--adjust-tone))) !important}";
49
-
50
- let MdsTableRow = class {
9
+ const MdsTableRow = class {
51
10
  constructor(hostRef) {
52
11
  index.registerInstance(this, hostRef);
53
12
  }
@@ -55,7 +14,7 @@ let MdsTableRow = class {
55
14
  this.interactive = event.detail;
56
15
  }
57
16
  render() {
58
- return (index.h(index.Host, { class: clsx(this.interactive && 'interactive'), role: "row" }, index.h("slot", null)));
17
+ return (index.h(index.Host, { role: "row" }, index.h("slot", null)));
59
18
  }
60
19
  };
61
20
  MdsTableRow.style = mdsTableRowCss;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-797b786c.js');
3
+ const index = require('./index-2159a30d.js');
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.13.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.16.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  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));
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["mds-table-row.cjs",[[4,"mds-table-row",{"interactive":[32]},[[16,"tableInteractive","tableInteractiveHandler"]]]]]], options);
18
+ return index.bootstrapLazy([["mds-table-row.cjs",[[1,"mds-table-row",{"interactive":[1540]},[[16,"tableInteractive","tableInteractiveHandler"]]]]]], options);
19
19
  });
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.13.0",
8
- "typescriptVersion": "4.3.5"
7
+ "version": "2.16.1",
8
+ "typescriptVersion": "4.5.4"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,3 +1,13 @@
1
+ .fixed {
2
+
3
+ position: fixed;
4
+ }
5
+
6
+ .absolute {
7
+
8
+ position: absolute;
9
+ }
10
+
1
11
  .border {
2
12
 
3
13
  border-width: 1px;
@@ -15,45 +25,34 @@
15
25
  /**
16
26
  * @prop --background-row-hover: The cell background-color when the mouse go over the table row element
17
27
  * @prop --border-color: The border color between table rows
28
+ * @prop --border-width: The border width between table rows
18
29
  * @prop --radius: The radius of the table (header and footer excluded)
19
30
  */
20
31
 
21
- mds-table-row {
32
+ :host {
22
33
 
23
34
  display: table-row;
24
35
 
25
36
  border-bottom-width: 1px;
26
37
 
27
- border-bottom-color: var(--border-color, rgb(var(--adjust-tone-09)));
28
- border-bottom-style: solid;
38
+ border-bottom: var(--border-width, 2px) solid var(--border-color, rgb(var(--tone-neutral-09)));
29
39
  }
30
40
 
31
- mds-table-row:last-child {
32
-
33
- border-color: transparent;
34
- }
41
+ :host ( :first-child ) {
35
42
 
36
- mds-table-row:first-child mds-table-cell:first-child {
37
- border-top-left-radius: var(--radius, 0.5rem);
43
+ --radius-top-left: var(--radius, 0.5rem);
44
+ --radius-top-right: var(--radius, 0.5rem);
38
45
  }
39
46
 
40
- mds-table-row:last-child mds-table-cell:first-child {
41
- border-bottom-left-radius: var(--radius, 0.5rem);
42
- }
47
+ :host ( :last-child ) {
43
48
 
44
- mds-table-row:first-child mds-table-cell:last-child {
45
- border-top-right-radius: var(--radius, 0.5rem);
46
- }
49
+ border-color: transparent;
47
50
 
48
- mds-table-row:last-child mds-table-cell:last-child {
49
- border-bottom-right-radius: var(--radius, 0.5rem);
51
+ --radius-bottom-left: var(--radius, 0.5rem);
52
+ --radius-bottom-right: var(--radius, 0.5rem);
50
53
  }
51
54
 
52
- mds-table-row:focus {
53
-
54
- opacity: 0.5;
55
- }
55
+ :host ( [interactive]:hover ) {
56
56
 
57
- mds-table-row.interactive:hover mds-table-cell {
58
- background-color: var(--background-row-hover, rgb(var(--adjust-tone))) !important;
57
+ --background: var(--background-row-hover, rgb(var(--tone-neutral)));
59
58
  }
@@ -1,22 +1,38 @@
1
- import { Component, Host, h, Listen, State } from '@stencil/core';
2
- import clsx from 'clsx';
1
+ import { Component, Host, h, Listen, Prop } from '@stencil/core';
3
2
  export class MdsTableRow {
4
3
  tableInteractiveHandler(event) {
5
4
  this.interactive = event.detail;
6
5
  }
7
6
  render() {
8
- return (h(Host, { class: clsx(this.interactive && 'interactive'), role: "row" },
7
+ return (h(Host, { role: "row" },
9
8
  h("slot", null)));
10
9
  }
11
10
  static get is() { return "mds-table-row"; }
11
+ static get encapsulation() { return "shadow"; }
12
12
  static get originalStyleUrls() { return {
13
13
  "$": ["mds-table-row.css"]
14
14
  }; }
15
15
  static get styleUrls() { return {
16
16
  "$": ["mds-table-row.css"]
17
17
  }; }
18
- static get states() { return {
19
- "interactive": {}
18
+ static get properties() { return {
19
+ "interactive": {
20
+ "type": "boolean",
21
+ "mutable": true,
22
+ "complexType": {
23
+ "original": "boolean",
24
+ "resolved": "boolean",
25
+ "references": {}
26
+ },
27
+ "required": false,
28
+ "optional": false,
29
+ "docs": {
30
+ "tags": [],
31
+ "text": ""
32
+ },
33
+ "attribute": "interactive",
34
+ "reflect": true
35
+ }
20
36
  }; }
21
37
  static get listeners() { return [{
22
38
  "name": "tableInteractive",
@@ -0,0 +1,19 @@
1
+ const floatingUIPlacementDictionary = [
2
+ 'bottom',
3
+ 'bottom-end',
4
+ 'bottom-start',
5
+ 'left',
6
+ 'left-end',
7
+ 'left-start',
8
+ 'right',
9
+ 'right-end',
10
+ 'right-start',
11
+ 'top',
12
+ 'top-end',
13
+ 'top-start',
14
+ ];
15
+ const floatingUIStrategyDictionary = [
16
+ 'absolute',
17
+ 'fixed',
18
+ ];
19
+ export { floatingUIPlacementDictionary, floatingUIStrategyDictionary, };
@@ -1,3 +1,3 @@
1
- import mggIconsDictionary from '@maggioli-design-system/icons/dist/original/dictionary.json';
2
- const iconsDictionary = Object.keys(mggIconsDictionary).sort();
1
+ import jsonIconsDictionary from '../fixtures/icons.json';
2
+ const iconsDictionary = jsonIconsDictionary;
3
3
  export { iconsDictionary, };
@@ -40,4 +40,9 @@ const typographySmallerDictionary = [
40
40
  'option',
41
41
  'tip',
42
42
  ];
43
- export { typographyDictionary, typographyMonoDictionary, typographyPrimaryDictionary, typographySecondaryDictionary, typographySmallerDictionary, };
43
+ const typographyTooltipDictionary = [
44
+ 'caption',
45
+ 'detail',
46
+ 'tip',
47
+ ];
48
+ export { typographyDictionary, typographyMonoDictionary, typographyPrimaryDictionary, typographySecondaryDictionary, typographySmallerDictionary, typographyTooltipDictionary, };
@@ -0,0 +1 @@
1
+ export {};
@@ -9,7 +9,7 @@ import type { Components, JSX } from "../types/components";
9
9
  * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
10
10
  * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
11
11
  * But do note that this configuration depends on how your script is bundled, or lack of
12
- * bunding, and where your assets can be loaded from. Additionally custom bundling
12
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
13
13
  * will have to ensure the static assets are copied to its build directory.
14
14
  */
15
15
  export declare const setAssetPath: (path: string) => void;
@@ -1,63 +1,22 @@
1
- import { HTMLElement, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- function toVal(mix) {
4
- var k, y, str='';
3
+ 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;border-bottom-width:1px;border-bottom:var(--border-width, 2px) solid var(--border-color, rgb(var(--tone-neutral-09)))}:host(:first-child){--radius-top-left:var(--radius, 0.5rem);--radius-top-right:var(--radius, 0.5rem)}:host(:last-child){border-color:transparent;--radius-bottom-left:var(--radius, 0.5rem);--radius-bottom-right:var(--radius, 0.5rem)}:host([interactive]:hover){--background:var(--background-row-hover, rgb(var(--tone-neutral)))}";
5
4
 
6
- if (typeof mix === 'string' || typeof mix === 'number') {
7
- str += mix;
8
- } else if (typeof mix === 'object') {
9
- if (Array.isArray(mix)) {
10
- for (k=0; k < mix.length; k++) {
11
- if (mix[k]) {
12
- if (y = toVal(mix[k])) {
13
- str && (str += ' ');
14
- str += y;
15
- }
16
- }
17
- }
18
- } else {
19
- for (k in mix) {
20
- if (mix[k]) {
21
- str && (str += ' ');
22
- str += k;
23
- }
24
- }
25
- }
26
- }
27
-
28
- return str;
29
- }
30
-
31
- function clsx () {
32
- var i=0, tmp, x, str='';
33
- while (i < arguments.length) {
34
- if (tmp = arguments[i++]) {
35
- if (x = toVal(tmp)) {
36
- str && (str += ' ');
37
- str += x;
38
- }
39
- }
40
- }
41
- return str;
42
- }
43
-
44
- const mdsTableRowCss = ".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)}mds-table-row{display:table-row;border-bottom-width:1px;border-bottom-color:var(--border-color, rgb(var(--adjust-tone-09)));border-bottom-style:solid}mds-table-row:last-child{border-color:transparent}mds-table-row:first-child mds-table-cell:first-child{border-top-left-radius:var(--radius, 0.5rem)}mds-table-row:last-child mds-table-cell:first-child{border-bottom-left-radius:var(--radius, 0.5rem)}mds-table-row:first-child mds-table-cell:last-child{border-top-right-radius:var(--radius, 0.5rem)}mds-table-row:last-child mds-table-cell:last-child{border-bottom-right-radius:var(--radius, 0.5rem)}mds-table-row:focus{opacity:0.5}mds-table-row.interactive:hover mds-table-cell{background-color:var(--background-row-hover, rgb(var(--adjust-tone))) !important}";
45
-
46
- let MdsTableRow$1 = class extends HTMLElement {
5
+ const MdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
47
6
  constructor() {
48
7
  super();
49
8
  this.__registerHost();
9
+ this.__attachShadow();
50
10
  }
51
11
  tableInteractiveHandler(event) {
52
12
  this.interactive = event.detail;
53
13
  }
54
14
  render() {
55
- return (h(Host, { class: clsx(this.interactive && 'interactive'), role: "row" }, h("slot", null)));
15
+ return (h(Host, { role: "row" }, h("slot", null)));
56
16
  }
57
17
  static get style() { return mdsTableRowCss; }
58
- };
59
- MdsTableRow$1 = /*@__PURE__*/ proxyCustomElement(MdsTableRow$1, [4, "mds-table-row", {
60
- "interactive": [32]
18
+ }, [1, "mds-table-row", {
19
+ "interactive": [1540]
61
20
  }, [[16, "tableInteractive", "tableInteractiveHandler"]]]);
62
21
  function defineCustomElement$1() {
63
22
  if (typeof customElements === "undefined") {