@maggioli-design-system/mds-tab 3.1.2 → 4.1.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 (88) hide show
  1. package/dist/cjs/{index-0ae71196.js → index-b3f6b309.js} +14 -0
  2. package/dist/cjs/loader.cjs.js +3 -3
  3. package/dist/cjs/mds-tab.cjs.entry.js +3 -1
  4. package/dist/cjs/mds-tab.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/common/aria.js +4 -2
  7. package/dist/collection/common/keyboard-manager.js +1 -1
  8. package/dist/collection/components/mds-tab/mds-tab.js +25 -1
  9. package/dist/collection/type/variant.js +1 -0
  10. package/dist/components/mds-tab.js +4 -2
  11. package/dist/documentation.d.ts +148 -0
  12. package/dist/documentation.json +55 -0
  13. package/dist/esm/{index-dd2d2fd4.js → index-68182b79.js} +14 -1
  14. package/dist/esm/loader.js +4 -4
  15. package/dist/esm/mds-tab.entry.js +3 -1
  16. package/dist/esm/mds-tab.js +4 -4
  17. package/dist/esm-es5/index-68182b79.js +2 -0
  18. package/dist/esm-es5/loader.js +1 -1
  19. package/dist/esm-es5/mds-tab.entry.js +1 -1
  20. package/dist/esm-es5/mds-tab.js +1 -1
  21. package/dist/mds-tab/mds-tab.esm.js +1 -1
  22. package/dist/mds-tab/mds-tab.js +1 -1
  23. package/dist/mds-tab/p-452e2eab.system.js +1 -0
  24. package/dist/mds-tab/p-4f1c0622.js +2 -0
  25. package/dist/mds-tab/p-a8bbd983.entry.js +1 -0
  26. package/dist/mds-tab/p-b6952744.system.entry.js +1 -0
  27. package/dist/mds-tab/p-b7137f11.system.js +2 -0
  28. package/dist/stats.json +102 -54
  29. package/dist/types/components/mds-tab/mds-tab.d.ts +6 -0
  30. package/dist/types/components/mds-tab/meta/event-detail.d.ts +3 -0
  31. package/dist/types/components.d.ts +9 -0
  32. package/dist/types/interface/input-value.d.ts +1 -1
  33. package/documentation.json +56 -0
  34. package/package.json +11 -5
  35. package/readme.md +7 -0
  36. package/src/common/aria.ts +2 -2
  37. package/src/common/keyboard-manager.ts +1 -1
  38. package/src/components/mds-tab/mds-tab.tsx +9 -2
  39. package/src/components/mds-tab/meta/event-detail.ts +3 -0
  40. package/src/components/mds-tab/readme.md +7 -0
  41. package/src/components.d.ts +9 -0
  42. package/src/fixtures/icons.json +1 -0
  43. package/src/interface/input-value.ts +1 -1
  44. package/www/build/mds-tab.esm.js +1 -1
  45. package/www/build/mds-tab.js +1 -1
  46. package/www/build/p-452e2eab.system.js +1 -0
  47. package/www/build/p-4f1c0622.js +2 -0
  48. package/www/build/p-a8bbd983.entry.js +1 -0
  49. package/www/build/p-b6952744.system.entry.js +1 -0
  50. package/www/build/p-b7137f11.system.js +2 -0
  51. package/dist/esm-es5/index-dd2d2fd4.js +0 -2
  52. package/dist/mds-tab/p-038f9d13.entry.js +0 -1
  53. package/dist/mds-tab/p-4c8c8850.system.js +0 -1
  54. package/dist/mds-tab/p-7ed19896.js +0 -2
  55. package/dist/mds-tab/p-a9e1f1ab.system.entry.js +0 -1
  56. package/dist/mds-tab/p-abe1e472.system.js +0 -2
  57. package/www/build/p-038f9d13.entry.js +0 -1
  58. package/www/build/p-4c8c8850.system.js +0 -1
  59. package/www/build/p-7ed19896.js +0 -2
  60. package/www/build/p-a9e1f1ab.system.entry.js +0 -1
  61. package/www/build/p-abe1e472.system.js +0 -2
  62. /package/dist/collection/{types/autocomplete.js → components/mds-tab/meta/event-detail.js} +0 -0
  63. /package/dist/collection/{types/button.js → type/autocomplete.js} +0 -0
  64. /package/dist/collection/{types/floating-ui.js → type/button.js} +0 -0
  65. /package/dist/collection/{types/form-rel.js → type/floating-ui.js} +0 -0
  66. /package/dist/collection/{types/input-text-type.js → type/form-rel.js} +0 -0
  67. /package/dist/collection/{types/input-value-type.js → type/input-text-type.js} +0 -0
  68. /package/dist/collection/{types/loading.js → type/input-value-type.js} +0 -0
  69. /package/dist/collection/{types/typography.js → type/loading.js} +0 -0
  70. /package/dist/collection/{types/variant.js → type/typography.js} +0 -0
  71. /package/dist/types/{types → type}/autocomplete.d.ts +0 -0
  72. /package/dist/types/{types → type}/button.d.ts +0 -0
  73. /package/dist/types/{types → type}/floating-ui.d.ts +0 -0
  74. /package/dist/types/{types → type}/form-rel.d.ts +0 -0
  75. /package/dist/types/{types → type}/input-text-type.d.ts +0 -0
  76. /package/dist/types/{types → type}/input-value-type.d.ts +0 -0
  77. /package/dist/types/{types → type}/loading.d.ts +0 -0
  78. /package/dist/types/{types → type}/typography.d.ts +0 -0
  79. /package/dist/types/{types → type}/variant.d.ts +0 -0
  80. /package/src/{types → type}/autocomplete.ts +0 -0
  81. /package/src/{types → type}/button.ts +0 -0
  82. /package/src/{types → type}/floating-ui.ts +0 -0
  83. /package/src/{types → type}/form-rel.ts +0 -0
  84. /package/src/{types → type}/input-text-type.ts +0 -0
  85. /package/src/{types → type}/input-value-type.ts +0 -0
  86. /package/src/{types → type}/loading.ts +0 -0
  87. /package/src/{types → type}/typography.ts +0 -0
  88. /package/src/{types → type}/variant.ts +0 -0
@@ -138,6 +138,19 @@ const Host = {};
138
138
  */
139
139
  const isHost = (node) => node && node.$tag$ === Host;
140
140
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
141
+ const createEvent = (ref, name, flags) => {
142
+ const elm = getElement(ref);
143
+ return {
144
+ emit: (detail) => {
145
+ return emitEvent(elm, name, {
146
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
147
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
148
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
149
+ detail,
150
+ });
151
+ },
152
+ };
153
+ };
141
154
  /**
142
155
  * Helper function to create & dispatch a custom Event on a provided target
143
156
  * @param elm the target of the Event
@@ -873,6 +886,7 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
873
886
 
874
887
  exports.Host = Host;
875
888
  exports.bootstrapLazy = bootstrapLazy;
889
+ exports.createEvent = createEvent;
876
890
  exports.getElement = getElement;
877
891
  exports.h = h;
878
892
  exports.promiseResolve = promiseResolve;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0ae71196.js');
5
+ const index = require('./index-b3f6b309.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.22.3 | 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-tab.cjs",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]], options);
17
+ return index.bootstrapLazy([["mds-tab.cjs",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -2,13 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0ae71196.js');
5
+ const index = require('./index-b3f6b309.js');
6
6
 
7
7
  const mdsTabCss = "@tailwind components; .visible{visibility:visible}.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{--mds-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;scroll-behavior:smooth;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";
8
8
 
9
9
  const MdsTab = class {
10
10
  constructor(hostRef) {
11
11
  index.registerInstance(this, hostRef);
12
+ this.changedEvent = index.createEvent(this, "mdsTabChange", 7);
12
13
  this.queryItems = () => this.element.querySelectorAll('mds-tab-item');
13
14
  this.scrollTabs = () => {
14
15
  const items = this.queryItems();
@@ -29,6 +30,7 @@ const MdsTab = class {
29
30
  items.forEach((item, key) => {
30
31
  if (item.id === event.detail) {
31
32
  item.selected = true;
33
+ this.changedEvent.emit({ id: key });
32
34
  this.currentItem = key;
33
35
  this.scrollTabs();
34
36
  }
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0ae71196.js');
5
+ const index = require('./index-b3f6b309.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v2.22.3 | 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-tab.cjs.js', document.baseURI).href));
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["mds-tab.cjs",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]], options);
20
+ return index.bootstrapLazy([["mds-tab.cjs",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]], options);
21
21
  });
22
22
 
23
23
  exports.setNonce = index.setNonce;
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.22.2",
7
+ "version": "2.22.3",
8
8
  "typescriptVersion": "4.9.4"
9
9
  },
10
10
  "collections": [],
@@ -6,11 +6,13 @@ const hash = (s) => {
6
6
  return h.toString();
7
7
  };
8
8
  const unslugName = (name) => {
9
- return name.split('/').slice(-1).pop().replace(/-/g, ' ');
9
+ var _a, _b, _c;
10
+ 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;
10
11
  };
11
12
  const setAttributeIfEmpty = (element, attribute, value) => {
13
+ var _a;
12
14
  if (element.hasAttribute(attribute)) {
13
- return element.getAttribute(attribute);
15
+ return (_a = element.getAttribute(attribute)) !== null && _a !== void 0 ? _a : '';
14
16
  }
15
17
  element.setAttribute(attribute, value);
16
18
  return value;
@@ -31,7 +31,7 @@ export class KeyboardManager {
31
31
  }
32
32
  };
33
33
  this.detachEscapeBehavior = () => {
34
- this.escapeCallback = null;
34
+ this.escapeCallback = () => { return; };
35
35
  if (typeof window !== undefined) {
36
36
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
37
37
  }
@@ -21,6 +21,7 @@ export class MdsTab {
21
21
  items.forEach((item, key) => {
22
22
  if (item.id === event.detail) {
23
23
  item.selected = true;
24
+ this.changedEvent.emit({ id: key });
24
25
  this.currentItem = key;
25
26
  this.scrollTabs();
26
27
  }
@@ -44,10 +45,33 @@ export class MdsTab {
44
45
  "$": ["mds-tab.css"]
45
46
  };
46
47
  }
48
+ static get events() {
49
+ return [{
50
+ "method": "changedEvent",
51
+ "name": "mdsTabChange",
52
+ "bubbles": true,
53
+ "cancelable": true,
54
+ "composed": true,
55
+ "docs": {
56
+ "tags": [],
57
+ "text": "Emits when a children is changed"
58
+ },
59
+ "complexType": {
60
+ "original": "MdsTabEventDetail",
61
+ "resolved": "MdsTabEventDetail",
62
+ "references": {
63
+ "MdsTabEventDetail": {
64
+ "location": "import",
65
+ "path": "./meta/event-detail"
66
+ }
67
+ }
68
+ }
69
+ }];
70
+ }
47
71
  static get elementRef() { return "element"; }
48
72
  static get listeners() {
49
73
  return [{
50
- "name": "selectedEvent",
74
+ "name": "mdsTabItemSelect",
51
75
  "method": "changeEventHandler",
52
76
  "target": undefined,
53
77
  "capture": false,
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
 
3
3
  const mdsTabCss = "@tailwind components; .visible{visibility:visible}.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{--mds-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;scroll-behavior:smooth;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";
4
4
 
@@ -7,6 +7,7 @@ const MdsTab$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  super();
8
8
  this.__registerHost();
9
9
  this.__attachShadow();
10
+ this.changedEvent = createEvent(this, "mdsTabChange", 7);
10
11
  this.queryItems = () => this.element.querySelectorAll('mds-tab-item');
11
12
  this.scrollTabs = () => {
12
13
  const items = this.queryItems();
@@ -27,6 +28,7 @@ const MdsTab$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
27
28
  items.forEach((item, key) => {
28
29
  if (item.id === event.detail) {
29
30
  item.selected = true;
31
+ this.changedEvent.emit({ id: key });
30
32
  this.currentItem = key;
31
33
  this.scrollTabs();
32
34
  }
@@ -40,7 +42,7 @@ const MdsTab$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
40
42
  }
41
43
  get element() { return this; }
42
44
  static get style() { return mdsTabCss; }
43
- }, [1, "mds-tab", undefined, [[0, "selectedEvent", "changeEventHandler"]]]);
45
+ }, [1, "mds-tab", undefined, [[0, "mdsTabItemSelect", "changeEventHandler"]]]);
44
46
  function defineCustomElement$1() {
45
47
  if (typeof customElements === "undefined") {
46
48
  return;
@@ -0,0 +1,148 @@
1
+
2
+ /**
3
+ * This is an autogenerated file created by the Stencil compiler.
4
+ * DO NOT MODIFY IT MANUALLY
5
+ */
6
+ export interface JsonDocs {
7
+ components: JsonDocsComponent[];
8
+ timestamp: string;
9
+ compiler: {
10
+ name: string;
11
+ version: string;
12
+ typescriptVersion: string;
13
+ };
14
+ }
15
+ export interface JsonDocsComponent {
16
+ dirPath?: string;
17
+ fileName?: string;
18
+ filePath?: string;
19
+ readmePath?: string;
20
+ usagesDir?: string;
21
+ encapsulation: 'shadow' | 'scoped' | 'none';
22
+ tag: string;
23
+ readme: string;
24
+ docs: string;
25
+ docsTags: JsonDocsTag[];
26
+ /**
27
+ * The text from the class-level JSDoc for a Stencil component, if present.
28
+ */
29
+ overview?: string;
30
+ usage: JsonDocsUsage;
31
+ props: JsonDocsProp[];
32
+ methods: JsonDocsMethod[];
33
+ events: JsonDocsEvent[];
34
+ listeners: JsonDocsListener[];
35
+ styles: JsonDocsStyle[];
36
+ slots: JsonDocsSlot[];
37
+ parts: JsonDocsPart[];
38
+ dependents: string[];
39
+ dependencies: string[];
40
+ dependencyGraph: JsonDocsDependencyGraph;
41
+ deprecation?: string;
42
+ }
43
+ export interface JsonDocsDependencyGraph {
44
+ [tagName: string]: string[];
45
+ }
46
+ export interface JsonDocsTag {
47
+ name: string;
48
+ text?: string;
49
+ }
50
+ export interface JsonDocsValue {
51
+ value?: string;
52
+ type: string;
53
+ }
54
+ /**
55
+ * A mapping of file names to their contents.
56
+ *
57
+ * This type is meant to be used when reading one or more usage markdown files associated with a component. For the
58
+ * given directory structure:
59
+ * ```
60
+ * src/components/my-component
61
+ * ├── my-component.tsx
62
+ * └── usage
63
+ * ├── bar.md
64
+ * └── foo.md
65
+ * ```
66
+ * an instance of this type would include the name of the markdown file, mapped to its contents:
67
+ * ```ts
68
+ * {
69
+ * 'bar': STRING_CONTENTS_OF_BAR.MD
70
+ * 'foo': STRING_CONTENTS_OF_FOO.MD
71
+ * }
72
+ * ```
73
+ */
74
+ export interface JsonDocsUsage {
75
+ [key: string]: string;
76
+ }
77
+ export interface JsonDocsProp {
78
+ name: string;
79
+ type: string;
80
+ mutable: boolean;
81
+ /**
82
+ * The name of the attribute that is exposed to configure a compiled web component
83
+ */
84
+ attr?: string;
85
+ reflectToAttr: boolean;
86
+ docs: string;
87
+ docsTags: JsonDocsTag[];
88
+ default: string;
89
+ deprecation?: string;
90
+ values: JsonDocsValue[];
91
+ optional: boolean;
92
+ required: boolean;
93
+ }
94
+ export interface JsonDocsMethod {
95
+ name: string;
96
+ docs: string;
97
+ docsTags: JsonDocsTag[];
98
+ deprecation?: string;
99
+ signature: string;
100
+ returns: JsonDocsMethodReturn;
101
+ parameters: JsonDocMethodParameter[];
102
+ }
103
+ export interface JsonDocsMethodReturn {
104
+ type: string;
105
+ docs: string;
106
+ }
107
+ export interface JsonDocMethodParameter {
108
+ name: string;
109
+ type: string;
110
+ docs: string;
111
+ }
112
+ export interface JsonDocsEvent {
113
+ event: string;
114
+ bubbles: boolean;
115
+ cancelable: boolean;
116
+ composed: boolean;
117
+ docs: string;
118
+ docsTags: JsonDocsTag[];
119
+ deprecation?: string;
120
+ detail: string;
121
+ }
122
+ export interface JsonDocsStyle {
123
+ name: string;
124
+ docs: string;
125
+ annotation: string;
126
+ }
127
+ export interface JsonDocsListener {
128
+ event: string;
129
+ target?: string;
130
+ capture: boolean;
131
+ passive: boolean;
132
+ }
133
+ export interface JsonDocsSlot {
134
+ name: string;
135
+ docs: string;
136
+ }
137
+ export interface JsonDocsPart {
138
+ name: string;
139
+ docs: string;
140
+ }
141
+ export interface StyleDoc {
142
+ name: string;
143
+ docs: string;
144
+ annotation: 'prop';
145
+ }
146
+
147
+ declare const _default: JsonDocs;
148
+ export default _default;
@@ -0,0 +1,55 @@
1
+ {
2
+ "timestamp": "2023-04-14T10:19:56",
3
+ "compiler": {
4
+ "name": "@stencil/core",
5
+ "version": "2.22.3",
6
+ "typescriptVersion": "4.9.4"
7
+ },
8
+ "components": [
9
+ {
10
+ "filePath": "./src/components/mds-tab/mds-tab.tsx",
11
+ "encapsulation": "shadow",
12
+ "tag": "mds-tab",
13
+ "docs": "",
14
+ "docsTags": [],
15
+ "usage": {},
16
+ "props": [],
17
+ "methods": [],
18
+ "events": [
19
+ {
20
+ "event": "mdsTabChange",
21
+ "detail": "MdsTabEventDetail",
22
+ "bubbles": true,
23
+ "cancelable": true,
24
+ "composed": true,
25
+ "docs": "Emits when a children is changed",
26
+ "docsTags": []
27
+ }
28
+ ],
29
+ "listeners": [
30
+ {
31
+ "event": "mdsTabItemSelect",
32
+ "capture": false,
33
+ "passive": false
34
+ }
35
+ ],
36
+ "styles": [
37
+ {
38
+ "name": "--mds-tab-background",
39
+ "annotation": "prop",
40
+ "docs": "Sets the background-color of the component"
41
+ },
42
+ {
43
+ "name": "--mds-tab-radius",
44
+ "annotation": "prop",
45
+ "docs": "Sets the border-radius of the button when the mouse is over it"
46
+ }
47
+ ],
48
+ "slots": [],
49
+ "parts": [],
50
+ "dependents": [],
51
+ "dependencies": [],
52
+ "dependencyGraph": {}
53
+ }
54
+ ]
55
+ }
@@ -116,6 +116,19 @@ const Host = {};
116
116
  */
117
117
  const isHost = (node) => node && node.$tag$ === Host;
118
118
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
119
+ const createEvent = (ref, name, flags) => {
120
+ const elm = getElement(ref);
121
+ return {
122
+ emit: (detail) => {
123
+ return emitEvent(elm, name, {
124
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
125
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
126
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
127
+ detail,
128
+ });
129
+ },
130
+ };
131
+ };
119
132
  /**
120
133
  * Helper function to create & dispatch a custom Event on a provided target
121
134
  * @param elm the target of the Event
@@ -849,4 +862,4 @@ const flush = () => {
849
862
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
850
863
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
851
864
 
852
- export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
865
+ export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
@@ -1,8 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-dd2d2fd4.js';
2
- export { s as setNonce } from './index-dd2d2fd4.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-68182b79.js';
2
+ export { s as setNonce } from './index-68182b79.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  const patchEsm = () => {
8
8
  return promiseResolve();
@@ -11,7 +11,7 @@ const patchEsm = () => {
11
11
  const defineCustomElements = (win, options) => {
12
12
  if (typeof window === 'undefined') return Promise.resolve();
13
13
  return patchEsm().then(() => {
14
- return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]], options);
14
+ return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]], options);
15
15
  });
16
16
  };
17
17
 
@@ -1,10 +1,11 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-dd2d2fd4.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-68182b79.js';
2
2
 
3
3
  const mdsTabCss = "@tailwind components; .visible{visibility:visible}.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{--mds-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;scroll-behavior:smooth;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";
4
4
 
5
5
  const MdsTab = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
+ this.changedEvent = createEvent(this, "mdsTabChange", 7);
8
9
  this.queryItems = () => this.element.querySelectorAll('mds-tab-item');
9
10
  this.scrollTabs = () => {
10
11
  const items = this.queryItems();
@@ -25,6 +26,7 @@ const MdsTab = class {
25
26
  items.forEach((item, key) => {
26
27
  if (item.id === event.detail) {
27
28
  item.selected = true;
29
+ this.changedEvent.emit({ id: key });
28
30
  this.currentItem = key;
29
31
  this.scrollTabs();
30
32
  }
@@ -1,8 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-dd2d2fd4.js';
2
- export { s as setNonce } from './index-dd2d2fd4.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-68182b79.js';
2
+ export { s as setNonce } from './index-68182b79.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  const patchBrowser = () => {
8
8
  const importMeta = import.meta.url;
@@ -14,5 +14,5 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]], options);
17
+ return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]], options);
18
18
  });
@@ -0,0 +1,2 @@
1
+ var __extends=this&&this.__extends||function(){var e=function(t,n){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return e(t,n)};return function(t,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __awaiter=this&&this.__awaiter||function(e,t,n,r){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function i(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):a(e.value).then(s,i)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,s;return s={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(t){return l([e,t])}}function l(i){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(n=0)),n)try{if(r=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;a=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e];a=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};var NAMESPACE="mds-tab";var scopeId;var hostTagName;var queuePending=false;var createTime=function(e,t){if(t===void 0){t=""}{return function(){return}}};var uniqueTime=function(e,t){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var t,n,r;return(r=(n=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&r!==void 0?r:undefined}var h=function(e,t){var n=[];for(var r=2;r<arguments.length;r++){n[r-2]=arguments[r]}var a=null;var o=false;var s=false;var i=[];var l=function(t){for(var n=0;n<t.length;n++){a=t[n];if(Array.isArray(a)){l(a)}else if(a!=null&&typeof a!=="boolean"){if(o=typeof e!=="function"&&!isComplexType(a)){a=String(a)}if(o&&s){i[i.length-1].$text$+=a}else{i.push(o?newVNode(null,a):a)}s=o}}};l(n);var u=newVNode(e,null);u.$attrs$=t;if(i.length>0){u.$children$=i}return u};var newVNode=function(e,t){var n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return n};var Host={};var isHost=function(e){return e&&e.$tag$===Host};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,t,n){var r=getElement(e);return{emit:function(e){return emitEvent(r,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:e})}}};var emitEvent=function(e,t,n){var r=plt.ce(t,n);e.dispatchEvent(r);return r};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,t,n){var r=styles.get(e);if(supportsConstructableStylesheets&&n){r=r||new CSSStyleSheet;if(typeof r==="string"){r=t}else{r.replaceSync(t)}}else{r=t}styles.set(e,r)};var addStyle=function(e,t,n,r){var a;var o=getScopeId(t);var s=styles.get(o);e=e.nodeType===11?e:doc;if(s){if(typeof s==="string"){e=e.head||e;var i=rootAppliedStyles.get(e);var l=void 0;if(!i){rootAppliedStyles.set(e,i=new Set)}if(!i.has(o)){{{l=doc.createElement("style");l.innerHTML=s}var u=(a=plt.$nonce$)!==null&&a!==void 0?a:queryNonceMetaTagContent(doc);if(u!=null){l.setAttribute("nonce",u)}e.insertBefore(l,e.querySelector("link"))}if(i){i.add(o)}}}else if(!e.adoptedStyleSheets.includes(s)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[s],false)}}return o};var attachStyles=function(e){var t=e.$cmpMeta$;var n=e.$hostElement$;var r=t.$flags$;var a=createTime("attachStyles",t.$tagName$);var o=addStyle(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(r&10){n["s-sc"]=o;n.classList.add(o+"-h")}a()};var getScopeId=function(e,t){return"sc-"+e.$tagName$};var createElm=function(e,t,n,r){var a=t.$children$[n];var o=0;var s;var i;{s=a.$elm$=doc.createElement(a.$tag$);if(isDef(scopeId)&&s["s-si"]!==scopeId){s.classList.add(s["s-si"]=scopeId)}if(a.$children$){for(o=0;o<a.$children$.length;++o){i=createElm(e,a,o);if(i){s.appendChild(i)}}}}return s};var addVnodes=function(e,t,n,r,a,o){var s=e;var i;if(s.shadowRoot&&s.tagName===hostTagName){s=s.shadowRoot}for(;a<=o;++a){if(r[a]){i=createElm(null,n,a);if(i){r[a].$elm$=i;s.insertBefore(i,t)}}}};var patch=function(e,t){var n=t.$elm$=e.$elm$;var r=t.$children$;{if(r!==null){addVnodes(n,null,t,r,0,r.length-1)}else;}};var renderVdom=function(e,t){var n=e.$hostElement$;var r=e.$vnode$||newVNode(null,null);var a=isHost(t)?t:h(null,null,t);hostTagName=n.tagName;a.$tag$=null;a.$flags$|=4;e.$vnode$=a;a.$elm$=r.$elm$=n.shadowRoot||n;{scopeId=n["s-sc"]}patch(r,a)};var attachToAncestor=function(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var scheduleUpdate=function(e,t){if(e.$flags$&4){e.$flags$|=512;return}attachToAncestor(e,e.$ancestorComponent$);var n=function(){return dispatchHooks(e,t)};return writeTask(n)};var dispatchHooks=function(e,t){var n=createTime("scheduleUpdate",e.$cmpMeta$.$tagName$);var r=e.$lazyInstance$;var a;if(t){{e.$flags$|=256;if(e.$queuedListeners$){e.$queuedListeners$.map((function(e){var t=e[0],n=e[1];return safeCall(r,t,n)}));e.$queuedListeners$=null}}{a=safeCall(r,"componentWillLoad")}}n();return then(a,(function(){return updateComponent(e,r,t)}))};var updateComponent=function(e,t,n){return __awaiter(void 0,void 0,void 0,(function(){var r,a,o,s,i,l;return __generator(this,(function(u){r=e.$hostElement$;a=createTime("update",e.$cmpMeta$.$tagName$);o=r["s-rc"];if(n){attachStyles(e)}s=createTime("render",e.$cmpMeta$.$tagName$);{callRender(e,t)}if(o){o.map((function(e){return e()}));r["s-rc"]=undefined}s();a();{i=r["s-p"];l=function(){return postUpdateComponent(e)};if(i.length===0){l()}else{Promise.all(i).then(l);e.$flags$|=4;i.length=0}}return[2]}))}))};var callRender=function(e,t,n){try{t=t.render();{e.$flags$|=2}{{{renderVdom(e,t)}}}}catch(t){consoleError(t,e.$hostElement$)}return null};var postUpdateComponent=function(e){var t=e.$cmpMeta$.$tagName$;var n=e.$hostElement$;var r=createTime("postUpdate",t);var a=e.$ancestorComponent$;if(!(e.$flags$&64)){e.$flags$|=64;{addHydratedFlag(n)}r();{e.$onReadyResolve$(n);if(!a){appDidLoad()}}}else{r()}{if(e.$onRenderResolve$){e.$onRenderResolve$();e.$onRenderResolve$=undefined}if(e.$flags$&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.$flags$&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,t,n){if(e&&e[t]){try{return e[t](n)}catch(e){consoleError(e)}}return undefined};var then=function(e,t){return e&&e.then?e.then(t):t()};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var proxyComponent=function(e,t,n){if(t.$members$){var r=Object.entries(t.$members$);r.map((function(e){var t=e[0],n=e[1][0]}))}return e};var initializeComponent=function(e,t,n,r,a){return __awaiter(void 0,void 0,void 0,(function(){var e,r,o,s,i,l,u;return __generator(this,(function(c){switch(c.label){case 0:if(!((t.$flags$&32)===0))return[3,3];t.$flags$|=32;a=loadModule(n);if(!a.then)return[3,2];e=uniqueTime();return[4,a];case 1:a=c.sent();e();c.label=2;case 2:if(!a.isProxied){proxyComponent(a,n);a.isProxied=true}r=createTime("createInstance",n.$tagName$);{t.$flags$|=8}try{new a(t)}catch(e){consoleError(e)}{t.$flags$&=~8}r();if(a.style){o=a.style;s=getScopeId(n);if(!styles.has(s)){i=createTime("registerStyles",n.$tagName$);registerStyle(s,o,!!(n.$flags$&1));i()}}c.label=3;case 3:l=t.$ancestorComponent$;u=function(){return scheduleUpdate(t,true)};if(l&&l["s-rc"]){l["s-rc"].push(u)}else{u()}return[2]}}))}))};var connectedCallback=function(e){if((plt.$flags$&1)===0){var t=getHostRef(e);var n=t.$cmpMeta$;var r=createTime("connectedCallback",n.$tagName$);if(!(t.$flags$&1)){t.$flags$|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){attachToAncestor(t,t.$ancestorComponent$=a);break}}}{initializeComponent(e,t,n)}}else{addHostEventListeners(e,t,n.$listeners$)}r()}};var disconnectedCallback=function(e){if((plt.$flags$&1)===0){var t=getHostRef(e);{if(t.$rmListeners$){t.$rmListeners$.map((function(e){return e()}));t.$rmListeners$=undefined}}}};var bootstrapLazy=function(e,t){if(t===void 0){t={}}var n;var r=createTime();var a=[];var o=t.exclude||[];var s=win.customElements;var i=doc.head;var l=i.querySelector("meta[charset]");var u=doc.createElement("style");var c=[];var f;var $=true;Object.assign(plt,t);plt.$resourcesUrl$=new URL(t.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(t){var n={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};{n.$members$=t[2]}{n.$listeners$=t[3]}var r=n.$tagName$;var i=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;t=r;registerHost(t,n);if(n.$flags$&1){{{t.attachShadow({mode:"open"})}}}return r}t.prototype.connectedCallback=function(){var e=this;if(f){clearTimeout(f);f=null}if($){c.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};t.prototype.componentOnReady=function(){return getHostRef(this).$onReadyPromise$};return t}(HTMLElement);n.$lazyBundleId$=e[0];if(!o.includes(r)&&!s.get(r)){a.push(r);s.define(r,proxyComponent(i,n))}}))}));{u.innerHTML=a+HYDRATED_CSS;u.setAttribute("data-styles","");var d=(n=plt.$nonce$)!==null&&n!==void 0?n:queryNonceMetaTagContent(doc);if(d!=null){u.setAttribute("nonce",d)}i.insertBefore(u,l?l.nextSibling:i.firstChild)}$=false;if(c.length){c.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return f=setTimeout(appDidLoad,30)}))}}r()};var addHostEventListeners=function(e,t,n,r){if(n){n.map((function(n){var r=n[0],a=n[1],o=n[2];var s=e;var i=hostListenerProxy(t,o);var l=hostListenerOpts(r);plt.ael(s,a,i,l);(t.$rmListeners$=t.$rmListeners$||[]).push((function(){return plt.rel(s,a,i,l)}))}))}};var hostListenerProxy=function(e,t){return function(n){try{{if(e.$flags$&256){e.$lazyInstance$[t](n)}else{(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,n])}}}catch(e){consoleError(e)}}};var hostListenerOpts=function(e){return(e&2)!==0};var setNonce=function(e){return plt.$nonce$=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,t){return hostRefs.set(t.$lazyInstance$=e,t)};var registerHost=function(e,t){var n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};{n.$onReadyPromise$=new Promise((function(e){return n.$onReadyResolve$=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,n,t.$listeners$);return hostRefs.set(e,n)};var consoleError=function(e,t){return(0,console.error)(e,t)};var cmpModules=new Map;var loadModule=function(e,t,n){var r=e.$tagName$.replace(/-/g,"_");var a=e.$lazyBundleId$;var o=cmpModules.get(a);if(o){return o[r]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(a,".entry.js").concat("")).then((function(e){{cmpModules.set(a,e)}return e[r]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,n,r){return e.addEventListener(t,n,r)},rel:function(e,t,n,r){return e.removeEventListener(t,n,r)},ce:function(e,t){return new CustomEvent(e,t)}};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,t){return function(n){e.push(n);if(!queuePending){queuePending=true;if(t&&plt.$flags$&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var t=0;t<e.length;t++){try{e[t](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{p as promiseResolve,b as bootstrapLazy}from"./index-dd2d2fd4.js";export{s as setNonce}from"./index-dd2d2fd4.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,t){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]],t)}))};export{defineCustomElements};
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-68182b79.js";export{s as setNonce}from"./index-68182b79.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,t){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]],t)}))};export{defineCustomElements};
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-dd2d2fd4.js";var mdsTabCss="@tailwind components; .visible{visibility:visible}.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{--mds-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;scroll-behavior:smooth;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";var MdsTab=function(){function e(e){var t=this;registerInstance(this,e);this.queryItems=function(){return t.element.querySelectorAll("mds-tab-item")};this.scrollTabs=function(){var e=t.queryItems();var o=e[t.currentItem];t.element.scrollLeft=o.offsetLeft-t.element.offsetLeft-t.element.offsetWidth/2+o.offsetWidth/2}}e.prototype.componentWillLoad=function(){var e=this.queryItems();e.forEach((function(e,t){if(!e.id){e.id="mds-tab-item-".concat(t)}}))};e.prototype.changeEventHandler=function(e){var t=this;var o=this.element.querySelectorAll("mds-tab-item");o.forEach((function(o,r){if(o.id===e.detail){o.selected=true;t.currentItem=r;t.scrollTabs()}else{o.selected=false}}))};e.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();MdsTab.style=mdsTabCss;export{MdsTab as mds_tab};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-68182b79.js";var mdsTabCss="@tailwind components; .visible{visibility:visible}.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{--mds-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;scroll-behavior:smooth;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";var MdsTab=function(){function e(e){var t=this;registerInstance(this,e);this.changedEvent=createEvent(this,"mdsTabChange",7);this.queryItems=function(){return t.element.querySelectorAll("mds-tab-item")};this.scrollTabs=function(){var e=t.queryItems();var o=e[t.currentItem];t.element.scrollLeft=o.offsetLeft-t.element.offsetLeft-t.element.offsetWidth/2+o.offsetWidth/2}}e.prototype.componentWillLoad=function(){var e=this.queryItems();e.forEach((function(e,t){if(!e.id){e.id="mds-tab-item-".concat(t)}}))};e.prototype.changeEventHandler=function(e){var t=this;var o=this.element.querySelectorAll("mds-tab-item");o.forEach((function(o,r){if(o.id===e.detail){o.selected=true;t.changedEvent.emit({id:r});t.currentItem=r;t.scrollTabs()}else{o.selected=false}}))};e.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();MdsTab.style=mdsTabCss;export{MdsTab as mds_tab};
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-dd2d2fd4.js";export{s as setNonce}from"./index-dd2d2fd4.js";var patchBrowser=function(){var e=import.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return promiseResolve(r)};patchBrowser().then((function(e){return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]],e)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-68182b79.js";export{s as setNonce}from"./index-68182b79.js";var patchBrowser=function(){var e=import.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return promiseResolve(r)};patchBrowser().then((function(e){return bootstrapLazy([["mds-tab",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]],e)}));
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-7ed19896.js";export{s as setNonce}from"./p-7ed19896.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((e=>t([["p-038f9d13",[[1,"mds-tab",null,[[0,"selectedEvent","changeEventHandler"]]]]]],e)));
1
+ import{p as e,b as t}from"./p-4f1c0622.js";export{s as setNonce}from"./p-4f1c0622.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((e=>t([["p-a8bbd983",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]],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-4c8c8850.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
118
+ var url = new URL('./p-452e2eab.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
119
119
  System.import(url.href);
120
120
  };
121
121
 
@@ -0,0 +1 @@
1
+ System.register(["./p-b7137f11.system.js"],(function(e,t){"use strict";var n,r;return{setters:[function(t){n=t.p;r=t.b;e("setNonce",t.s)}],execute:function(){var e=function(){var e=t.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return n(r)};e().then((function(e){return r([["p-b6952744.system",[[1,"mds-tab",null,[[0,"mdsTabItemSelect","changeEventHandler"]]]]]],e)}))}}}));
@@ -0,0 +1,2 @@
1
+ let e,t,n=!1;const l=e=>"object"==(e=typeof e)||"function"===e;function o(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const s=(e,t,...n)=>{let o=null,s=!1,r=!1;const a=[],i=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof e&&!l(o))&&(o+=""),s&&r?a[a.length-1].t+=o:a.push(s?c(null,o):o),r=s)};i(n);const u=c(e,null);return u.l=t,a.length>0&&(u.o=a),u},c=(e,t)=>({i:0,u:e,t,$:null,o:null}),r={},a=e=>T(e).m,i=(e,t,n)=>{const l=a(e);return{emit:e=>u(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},u=(e,t,n)=>{const l=V.ce(t,n);return e.dispatchEvent(l),l},f=new WeakMap,d=e=>"sc-"+e.p,$=(t,n,l)=>{const o=n.o[l];let s,c,r=0;if(s=o.$=N.createElement(o.u),null!=e&&s["s-si"]!==e&&s.classList.add(s["s-si"]=e),o.o)for(r=0;r<o.o.length;++r)c=$(t,o,r),c&&s.appendChild(c);return s},m=(n,l)=>{const o=n.m,a=n.h||c(null,null),i=(e=>e&&e.u===r)(l)?l:s(null,null,l);t=o.tagName,i.u=null,i.i|=4,n.h=i,i.$=a.$=o.shadowRoot||o,e=o["s-sc"],((e,n)=>{const l=n.$=e.$,o=n.o;null!==o&&((e,n,l,o,s,c)=>{let r,a=e;for(a.shadowRoot&&a.tagName===t&&(a=a.shadowRoot);s<=c;++s)o[s]&&(r=$(null,l,s),r&&(o[s].$=r,a.insertBefore(r,null)))})(l,0,n,o,0,o.length-1)})(a,i)},y=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},p=(e,t)=>{if(!(4&e.i))return y(e,e.S),Q((()=>h(e,t)));e.i|=512},h=(e,t)=>{const n=e.g;let l;return t&&(e.i|=256,e.M&&(e.M.map((([e,t])=>g(n,e,t))),e.M=null),l=g(n,"componentWillLoad")),M(l,(()=>w(e,n,t)))},w=async(e,t,n)=>{const l=e.m,s=l["s-rc"];n&&(e=>{const t=e.k,n=e.m,l=t.i,s=((e,t)=>{var n;let l=d(t);const s=q.get(l);if(e=11===e.nodeType?e:N,s)if("string"==typeof s){let t,c=f.get(e=e.head||e);if(c||f.set(e,c=new Set),!c.has(l)){{t=N.createElement("style"),t.innerHTML=s;const l=null!==(n=V.C)&&void 0!==n?n:o(N);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}c&&c.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);v(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>b(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},v=(e,t)=>{try{t=t.render(),e.i|=2,m(e,t)}catch(t){H(t,e.m)}return null},b=e=>{const t=e.m,n=e.S;64&e.i||(e.i|=64,k(t),e.j(t),n||S()),e.v&&(e.v(),e.v=void 0),512&e.i&&K((()=>p(e,!1))),e.i&=-517},S=()=>{k(N.documentElement),K((()=>u(F,"appload",{detail:{namespace:"mds-tab"}})))},g=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){H(e)}},M=(e,t)=>e&&e.then?e.then(t):t(),k=e=>e.setAttribute("hydrated",""),C=(e,t)=>(t.P&&Object.entries(t.P).map((([e,[t]])=>{})),e),j=(e,t={})=>{var n;const l=[],s=t.exclude||[],c=F.customElements,r=N.head,a=r.querySelector("meta[charset]"),i=N.createElement("style"),u=[];let f,$=!0;Object.assign(V,t),V.L=new URL(t.resourcesUrl||"./",N.baseURI).href,e.map((e=>{e[1].map((t=>{const n={i:t[0],p:t[1],P:t[2],O:t[3]};n.P=t[2],n.O=t[3];const o=n.p,r=class extends HTMLElement{constructor(e){super(e),A(e=this,n),1&n.i&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),$?u.push(this):V.jmp((()=>(e=>{if(0==(1&V.i)){const t=T(e),n=t.k,l=()=>{};if(1&t.i)P(e,t,n.O);else{t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){y(t,t.S=n);break}}(async(e,t,n,l,o)=>{if(0==(32&t.i)){{if(t.i|=32,(o=U(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(C(o,n),o.isProxied=!0);const e=()=>{};t.i|=8;try{new o(t)}catch(e){H(e)}t.i&=-9,e()}if(o.style){let e=o.style;const t=d(n);if(!q.has(t)){const l=()=>{};((e,t,n)=>{let l=q.get(e);z&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,q.set(e,l)})(t,e,!!(1&n.i)),l()}}}const s=t.S,c=()=>p(t,!0);s&&s["s-rc"]?s["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){V.jmp((()=>(()=>{if(0==(1&V.i)){const e=T(this);e.T&&(e.T.map((e=>e())),e.T=void 0)}})()))}componentOnReady(){return T(this).W}};n.A=e[0],s.includes(o)||c.get(o)||(l.push(o),c.define(o,C(r,n)))}))}));{i.innerHTML=l+"{visibility:hidden}[hydrated]{visibility:inherit}",i.setAttribute("data-styles","");const e=null!==(n=V.C)&&void 0!==n?n:o(N);null!=e&&i.setAttribute("nonce",e),r.insertBefore(i,a?a.nextSibling:r.firstChild)}$=!1,u.length?u.map((e=>e.connectedCallback())):V.jmp((()=>f=setTimeout(S,30)))},P=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=e,c=x(t,o),r=E(n);V.ael(s,l,c,r),(t.T=t.T||[]).push((()=>V.rel(s,l,c,r)))}))},x=(e,t)=>n=>{try{256&e.i?e.g[t](n):(e.M=e.M||[]).push([t,n])}catch(e){H(e)}},E=e=>0!=(2&e),L=e=>V.C=e,O=new WeakMap,T=e=>O.get(e),W=(e,t)=>O.set(t.g=e,t),A=(e,t)=>{const n={i:0,m:e,k:t,H:new Map};return n.W=new Promise((e=>n.j=e)),e["s-p"]=[],e["s-rc"]=[],P(e,n,t.O),O.set(e,n)},H=(e,t)=>(0,console.error)(e,t),R=new Map,U=e=>{const t=e.p.replace(/-/g,"_"),n=e.A,l=R.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(R.set(n,e),e[t])),H)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},q=new Map,F="undefined"!=typeof window?window:{},N=F.document||{head:{}},V={i:0,L:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},_=e=>Promise.resolve(e),z=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),B=[],D=[],G=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&V.i?K(J):V.raf(J))},I=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){H(e)}e.length=0},J=()=>{I(B),I(D),(n=B.length>0)&&V.raf(J)},K=e=>_().then(e),Q=G(D,!0);export{r as H,j as b,i as c,a as g,s as h,_ as p,W as r,L as s}
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as o,H as a,g as r}from"./p-4f1c0622.js";const i=class{constructor(o){s(this,o),this.changedEvent=t(this,"mdsTabChange",7),this.queryItems=()=>this.element.querySelectorAll("mds-tab-item"),this.scrollTabs=()=>{const s=this.queryItems()[this.currentItem];this.element.scrollLeft=s.offsetLeft-this.element.offsetLeft-this.element.offsetWidth/2+s.offsetWidth/2}}componentWillLoad(){this.queryItems().forEach(((s,t)=>{s.id||(s.id=`mds-tab-item-${t}`)}))}changeEventHandler(s){this.element.querySelectorAll("mds-tab-item").forEach(((t,o)=>{t.id===s.detail?(t.selected=!0,this.changedEvent.emit({id:o}),this.currentItem=o,this.scrollTabs()):t.selected=!1}))}render(){return o(a,null,o("slot",null))}get element(){return r(this)}};i.style="@tailwind components; .visible{visibility:visible}.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{--mds-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;scroll-behavior:smooth;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";export{i as mds_tab}
@@ -0,0 +1 @@
1
+ System.register(["./p-b7137f11.system.js"],(function(e){"use strict";var t,o,r,s,a;return{setters:[function(e){t=e.r;o=e.c;r=e.h;s=e.H;a=e.g}],execute:function(){var n="@tailwind components; .visible{visibility:visible}.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{--mds-tab-background:rgb(var(--tone-neutral-09));--mds-tab-radius:1rem;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;display:-ms-flexbox;display:flex;gap:0.5rem;overflow:auto;scroll-behavior:smooth;padding:0.5rem;background-color:var(--mds-tab-background);border-radius:var(--mds-tab-radius);-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}:host::-webkit-scrollbar{display:none}@media (max-width: 767px){.mobile\\:flex-1{-ms-flex:1 1 0%;flex:1 1 0%}}";var i=e("mds_tab",function(){function e(e){var r=this;t(this,e);this.changedEvent=o(this,"mdsTabChange",7);this.queryItems=function(){return r.element.querySelectorAll("mds-tab-item")};this.scrollTabs=function(){var e=r.queryItems();var t=e[r.currentItem];r.element.scrollLeft=t.offsetLeft-r.element.offsetLeft-r.element.offsetWidth/2+t.offsetWidth/2}}e.prototype.componentWillLoad=function(){var e=this.queryItems();e.forEach((function(e,t){if(!e.id){e.id="mds-tab-item-".concat(t)}}))};e.prototype.changeEventHandler=function(e){var t=this;var o=this.element.querySelectorAll("mds-tab-item");o.forEach((function(o,r){if(o.id===e.detail){o.selected=true;t.changedEvent.emit({id:r});t.currentItem=r;t.scrollTabs()}else{o.selected=false}}))};e.prototype.render=function(){return r(s,null,r("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());i.style=n}}}));