@maggioli-design-system/mds-tab 8.2.0 → 8.3.1

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 (57) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mds-tab.cjs.entry.js +24 -6
  3. package/dist/cjs/mds-tab.cjs.js +1 -1
  4. package/dist/collection/common/floating-controller.js +3 -3
  5. package/dist/collection/common/string.js +30 -0
  6. package/dist/collection/components/mds-tab/mds-tab.css +171 -16
  7. package/dist/collection/components/mds-tab/mds-tab.js +41 -5
  8. package/dist/collection/components/mds-tab/test/mds-tab.stories.js +6 -0
  9. package/dist/collection/dictionary/keyboard.js +84 -0
  10. package/dist/collection/type/keyboard.js +1 -0
  11. package/dist/components/mds-tab.js +25 -6
  12. package/dist/documentation.json +32 -6
  13. package/dist/esm/loader.js +1 -1
  14. package/dist/esm/mds-tab.entry.js +24 -6
  15. package/dist/esm/mds-tab.js +1 -1
  16. package/dist/esm-es5/loader.js +1 -1
  17. package/dist/esm-es5/mds-tab.entry.js +1 -1
  18. package/dist/esm-es5/mds-tab.js +1 -1
  19. package/dist/mds-tab/mds-tab.esm.js +1 -1
  20. package/dist/mds-tab/p-0d54695a.entry.js +1 -0
  21. package/dist/mds-tab/p-6b29944e.system.entry.js +1 -0
  22. package/dist/mds-tab/p-9ed4bdd4.system.js +1 -1
  23. package/dist/stats.json +65 -17
  24. package/dist/types/common/string.d.ts +4 -0
  25. package/dist/types/components/mds-tab/mds-tab.d.ts +7 -0
  26. package/dist/types/components/mds-tab/test/mds-tab.stories.d.ts +1 -0
  27. package/dist/types/components.d.ts +8 -0
  28. package/dist/types/dictionary/keyboard.d.ts +2 -0
  29. package/dist/types/type/keyboard.d.ts +12 -0
  30. package/documentation.json +52 -6
  31. package/package.json +3 -3
  32. package/readme.md +2 -1
  33. package/src/common/floating-controller.ts +6 -6
  34. package/src/common/string.ts +42 -0
  35. package/src/components/mds-tab/css/mds-tab-animation.css +5 -1
  36. package/src/components/mds-tab/css/mds-tab-pref-animation.css +2 -0
  37. package/src/components/mds-tab/css/mds-tab-pref-contrast.css +12 -4
  38. package/src/components/mds-tab/css/mds-tab-pref-theme.css +8 -4
  39. package/src/components/mds-tab/mds-tab.css +25 -7
  40. package/src/components/mds-tab/mds-tab.tsx +28 -4
  41. package/src/components/mds-tab/readme.md +2 -1
  42. package/src/components/mds-tab/test/mds-tab.stories.tsx +26 -0
  43. package/src/components.d.ts +8 -0
  44. package/src/dictionary/keyboard.ts +87 -0
  45. package/src/fixtures/icons.json +18 -1
  46. package/src/meta/keyboard/keys.json +83 -0
  47. package/src/tailwind/components.css +11 -0
  48. package/src/tailwind/fouc.css +118 -0
  49. package/src/type/keyboard.ts +93 -0
  50. package/www/build/mds-tab.esm.js +1 -1
  51. package/www/build/p-0d54695a.entry.js +1 -0
  52. package/www/build/p-6b29944e.system.entry.js +1 -0
  53. package/www/build/p-9ed4bdd4.system.js +1 -1
  54. package/dist/mds-tab/p-2967f1fb.system.entry.js +0 -1
  55. package/dist/mds-tab/p-30c9d56a.entry.js +0 -1
  56. package/www/build/p-2967f1fb.system.entry.js +0 -1
  57. package/www/build/p-30c9d56a.entry.js +0 -1
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["mds-tab.cjs",[[1,"mds-tab",{"scrollbar":[516],"animation":[513],"sliderWidth":[32],"sliderOffset":[32]},[[0,"mdsTabItemSelect","changeEventHandler"],[0,"mdsTabItemFocus","focusEventHandler"]],{"animation":["handleAnimation"]}]]]], options);
11
+ return index.bootstrapLazy([["mds-tab.cjs",[[1,"mds-tab",{"scrollbar":[516],"animation":[513],"fill":[516],"sliderWidth":[32],"sliderOffset":[32]},[[0,"mdsTabItemSelect","changeEventHandler"],[0,"mdsTabItemFocus","focusEventHandler"]],{"animation":["handleAnimation"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -28,7 +28,9 @@ const hashRandomValue = (value) => {
28
28
  return hash(randomValue.toString());
29
29
  };
30
30
 
31
- const mdsTabCss = "@tailwind components;\n@tailwind utilities;\n\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-tab-item-default-background: Sets the `background-color` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-default-color: Sets the `color` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-default-shadow: Sets the `box-shadow` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-hover-background: Sets the `background-color` when the mouse is over of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-hover-color: Sets the `color` when the mouse is over of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-hover-shadow: Sets the `box-shadow` when the mouse is over of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-radius: Sets the `border-radius` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`.\n * @prop --mds-tab-item-selected-background: Sets the `background-color` when the item is selected of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-selected-color: Sets the `color` when the item is selected of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-selected-shadow: Sets the `box-shadow` when the item is selected of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-transition-duration: Sets the animation duration on how the contents height is resized when the component switch from a content to another one\n * @prop --mds-tab-item-transition-timing-function: Sets the animation timing function on how the contents height is resized when the component switch from a content to another one\n * @prop --mds-tab-scroll-scrollbar-margin: Sets the margin of the browser scroll bar (if supported)\n * @prop --mds-tab-scroll-scrollbar-radius: Sets the border-radius of the browser scroll bar (if supported)\n * @prop --mds-tab-scroll-scrollbar-size: Sets the height and width of the browser scroll bar (if supported)\n * @prop --mds-tab-scroll-scrollbar-thumb-background: Sets the background-color of the browser scroll bar thumb (if supported)\n * @prop --mds-tab-scroll-scrollbar-track-background: Sets the background-color of the browser scroll bar track (if supported)\n * @prop --mds-tab-tabs-background: Sets the `background-color` of `mds-tab::part(tabs)`\n * @prop --mds-tab-tabs-gap: Sets the `gap` of `mds-tab::part(tabs)`\n * @prop --mds-tab-tabs-outline-opacity: Sets the `opacity` of outline border which holds\n * @prop --mds-tab-tabs-padding: Sets the `padding` of `mds-tab::part(tabs)`\n * @prop --mds-tab-tabs-radius: Sets the `border-radius` of `mds-tab::part(tabs)`\n */\n\n:host {\n\n --mds-tab-item-default-background: transparent;\n --mds-tab-item-default-color: rgb(var(--tone-neutral-03));\n --mds-tab-item-default-shadow: transparent;\n --mds-tab-item-hover-background: transparent;\n --mds-tab-item-hover-color: rgb(var(--tone-neutral-02));\n --mds-tab-item-hover-shadow: transparent;\n --mds-tab-item-radius: 0.5rem;\n --mds-tab-item-selected-background: rgb(var(--tone-neutral));\n --mds-tab-item-selected-color: rgb(var(--tone-neutral-02));\n --mds-tab-item-selected-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --mds-tab-scroll-scrollbar-margin: 0;\n --mds-tab-scroll-scrollbar-radius: 0;\n --mds-tab-scroll-scrollbar-size: 0.5rem;\n --mds-tab-scroll-scrollbar-thumb-background: rgb(var(--tone-neutral-02) 0.3);\n --mds-tab-scroll-scrollbar-track-background: rgb(var(--tone-neutral-06) 0.3);\n --mds-tab-tabs-background: rgb(var(--tone-neutral-09));\n --mds-tab-tabs-gap: 0.5rem;\n --mds-tab-tabs-outline-opacity: 0.7;\n --mds-tab-tabs-padding: 0.5rem;\n --mds-tab-tabs-radius: 1rem;\n --mds-tab-transition-duration: 0.5s;\n --mds-tab-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n display: grid;\n}\n\n:host([animation=\"slide\"]) ::slotted( mds-tab-item ) {\n\n --mds-tab-item-hover-background: transparent;\n --mds-tab-item-selected-background: transparent;\n --mds-tab-item-selected-shadow: transparent;\n --mds-tab-item-default-background: transparent;\n --mds-tab-item-default-shadow: transparent;\n}\n\n.tabs {\n background-color: var(--mds-tab-tabs-background);\n border-radius: var(--mds-tab-tabs-radius);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n gap: var(--mds-tab-tabs-gap);\n overflow: auto;\n padding: var(--mds-tab-tabs-padding);\n scroll-behavior: smooth;\n -webkit-scroll-snap-type: x mandatory;\n -ms-scroll-snap-type: x mandatory;\n scroll-snap-type: x mandatory;\n -webkit-transition-duration: var(--mds-tab-transition-duration);\n transition-duration: var(--mds-tab-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n -webkit-transition-timing-function: var(--mds-tab-transition-timing-function);\n transition-timing-function: var(--mds-tab-transition-timing-function);\n}\n\n.tabs-wrapper {\n display: grid;\n overflow: hidden;\n position: relative;\n}\n\n.tabs-wrapper::after {\n border-radius: var(--mds-tab-tabs-radius);\n -webkit-box-shadow: 0 0 0 2px var(--mds-tab-tabs-background) inset;\n box-shadow: 0 0 0 2px var(--mds-tab-tabs-background) inset;\n content: \"\";\n inset: 0;\n opacity: var(--mds-tab-tabs-outline-opacity);\n pointer-events: none;\n position: absolute;\n}\n\n\n.contents {\n\n --mds-tab-contents-height: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: none;\n scrollbar-width: none;\n gap: 1.5rem;\n\n -ms-flex-align: start;\n\n align-items: flex-start;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-tab-contents-height);\n overflow-x: auto;\n overflow-y: hidden;\n position: relative;\n scroll-behavior: smooth;\n -webkit-scroll-snap-type: x mandatory;\n -ms-scroll-snap-type: x mandatory;\n scroll-snap-type: x mandatory;\n -webkit-transition-duration: var(--mds-tab-transition-duration);\n transition-duration: var(--mds-tab-transition-duration);\n -webkit-transition-property: height;\n transition-property: height;\n -webkit-transition-timing-function: var(--mds-tab-transition-timing-function);\n transition-timing-function: var(--mds-tab-transition-timing-function);\n}\n\n::slotted( [slot=\"content\"] ){\n\n width: 100%;\n\n min-width: 100%;\n\n -ms-flex-preferred-size: 0;\n\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n scroll-snap-align: start;\n}\n\n::slotted( [slot=\"content\"][mds-tab-content-hidden] ) {\n display: none !important;\n}\n\n.tabs {\n position: relative;\n}\n\n.slider {\n\n --mds-tab-slider-offset: 0;\n --mds-tab-slider-width: 0;\n\n background-color: var(--mds-tab-item-selected-background);\n border-radius: var(--mds-tab-item-radius);\n bottom: var(--mds-tab-tabs-padding);\n -webkit-box-shadow: var(--mds-tab-item-selected-shadow);\n box-shadow: var(--mds-tab-item-selected-shadow);\n left: 0;\n pointer-events: none;\n position: absolute;\n top: var(--mds-tab-tabs-padding);\n -webkit-transform: translateX(var(--mds-tab-slider-offset)) translateZ(0);\n transform: translateX(var(--mds-tab-slider-offset)) translateZ(0);\n -webkit-transition-duration: var(--mds-tab-transition-duration);\n transition-duration: var(--mds-tab-transition-duration);\n -webkit-transition-property: width, -webkit-transform;\n transition-property: width, -webkit-transform;\n transition-property: transform, width;\n transition-property: transform, width, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-tab-transition-timing-function);\n transition-timing-function: var(--mds-tab-transition-timing-function);\n width: var(--mds-tab-slider-width);\n will-change: transform, width;\n z-index: 0;\n}\n\n::slotted( mds-tab-item ) {\n position: relative;\n z-index: 1;\n}\n\n@import '~@maggioli-design-system/styles/dist/tailwind/components.css';\n@tailwind components;\n@tailwind utilities;\n\n:host(:not([scrollbar])) .tabs {\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n\n:host(:not([scrollbar])) .tabs::-webkit-scrollbar {\n display: none;\n}\n\n:host([scrollbar]:not([scrollbar=\"false\"])) .tabs::-webkit-scrollbar {\n height: var(--mds-tab-scroll-scrollbar-size);\n width: var(--mds-tab-scroll-scrollbar-size);\n}\n\n:host([scrollbar]:not([scrollbar=\"false\"])) .tabs::-webkit-scrollbar-track {\n background-color: var(--mds-tab-scroll-scrollbar-track-background);\n border-radius: var(--mds-tab-scroll-scrollbar-radius);\n margin-block: var(--mds-tab-scroll-scrollbar-margin);\n margin-inline: var(--mds-tab-scroll-scrollbar-margin);\n}\n\n:host([scrollbar]:not([scrollbar=\"false\"])) .tabs::-webkit-scrollbar-thumb {\n background-color: var(--mds-tab-scroll-scrollbar-thumb-background);\n border-radius: var(--mds-tab-scroll-scrollbar-radius);\n}\n\n@supports (scrollbar-color: transparent transparent) {\n .tabs {\n scrollbar-color: var(--mds-tab-scroll-scrollbar-thumb-background) var(--mds-tab-scroll-scrollbar-track-background);\n scrollbar-width: thin;\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host {\n\n --mds-tab-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host {\n\n --mds-tab-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n .tabs {\n border-color: rgb(var(--tone-neutral-08));\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n .tabs {\n border-color: rgb(var(--tone-neutral-08));\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n .tabs {\n border-color: rgb(var(--tone-neutral-06));\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n .tabs {\n border-color: rgb(var(--tone-neutral-06));\n }\n }\n}\n\n\n";
31
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
32
+
33
+ const mdsTabCss = "@tailwind components;\n@tailwind utilities;\n\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-tab-item-default-background: Sets the `background-color` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-default-color: Sets the `color` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-default-shadow: Sets the `box-shadow` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-hover-background: Sets the `background-color` when the mouse is over of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-hover-color: Sets the `color` when the mouse is over of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-hover-shadow: Sets the `box-shadow` when the mouse is over of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-radius: Sets the `border-radius` of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`.\n * @prop --mds-tab-item-selected-background: Sets the `background-color` when the item is selected of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-selected-color: Sets the `color` when the item is selected of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-selected-shadow: Sets the `box-shadow` when the item is selected of `mds-tab-item` or `mds-tab::part(slider)` depending on attribute `animation`\n * @prop --mds-tab-item-transition-duration: Sets the animation duration on how the contents height is resized when the component switch from a content to another one\n * @prop --mds-tab-item-transition-timing-function: Sets the animation timing function on how the contents height is resized when the component switch from a content to another one\n * @prop --mds-tab-scroll-scrollbar-margin: Sets the margin of the browser scroll bar (if supported)\n * @prop --mds-tab-scroll-scrollbar-radius: Sets the border-radius of the browser scroll bar (if supported)\n * @prop --mds-tab-scroll-scrollbar-size: Sets the height and width of the browser scroll bar (if supported)\n * @prop --mds-tab-scroll-scrollbar-thumb-background: Sets the background-color of the browser scroll bar thumb (if supported)\n * @prop --mds-tab-scroll-scrollbar-track-background: Sets the background-color of the browser scroll bar track (if supported)\n * @prop --mds-tab-tabs-background: Sets the `background-color` of `mds-tab::part(tabs)`\n * @prop --mds-tab-tabs-gap: Sets the `gap` of `mds-tab::part(tabs)`\n * @prop --mds-tab-tabs-wrapper-outline-opacity: Sets the `opacity` of outline border which holds\n * @prop --mds-tab-tabs-padding: Sets the `padding` of `mds-tab::part(tabs)`\n * @prop --mds-tab-tabs-radius: Sets the `border-radius` of `mds-tab::part(tabs)`\n */\n\n:host {\n\n --mds-tab-item-default-background: transparent;\n --mds-tab-item-default-color: rgb(var(--tone-neutral-03));\n --mds-tab-item-default-shadow: transparent;\n --mds-tab-item-hover-background: transparent;\n --mds-tab-item-hover-color: rgb(var(--tone-neutral-02));\n --mds-tab-item-hover-shadow: transparent;\n --mds-tab-item-radius: 0.5rem;\n --mds-tab-item-selected-background: rgb(var(--tone-neutral));\n --mds-tab-item-selected-color: rgb(var(--tone-neutral-01));\n --mds-tab-item-selected-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --mds-tab-scroll-behavior: smooth;\n --mds-tab-scroll-scrollbar-margin: 0;\n --mds-tab-scroll-scrollbar-radius: 0;\n --mds-tab-scroll-scrollbar-size: 0.5rem;\n --mds-tab-scroll-scrollbar-thumb-background: rgb(var(--tone-neutral-02) 0.3);\n --mds-tab-scroll-scrollbar-track-background: rgb(var(--tone-neutral-06) 0.3);\n --mds-tab-tabs-background: rgb(var(--tone-neutral-09));\n --mds-tab-tabs-gap: 0.5rem;\n --mds-tab-tabs-padding: 0.5rem;\n --mds-tab-tabs-radius: 1rem;\n --mds-tab-tabs-wrapper-outline-opacity: 0.7;\n --mds-tab-tabs-wrapper-shadow-color: var(--mds-tab-tabs-background);\n --mds-tab-tabs-wrapper-shadow: 0 0 0 2px var(--mds-tab-tabs-wrapper-shadow-color) inset;\n --mds-tab-transition-duration: 0.5s;\n --mds-tab-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n\n display: grid;\n}\n\n:host([animation=\"slide\"]) ::slotted( mds-tab-item ) {\n\n --mds-tab-item-hover-background: transparent;\n --mds-tab-item-selected-background: transparent;\n --mds-tab-item-selected-shadow: transparent;\n --mds-tab-item-default-background: transparent;\n --mds-tab-item-default-shadow: transparent;\n}\n\n.tabs {\n background-color: var(--mds-tab-tabs-background);\n border-radius: var(--mds-tab-tabs-radius);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n gap: var(--mds-tab-tabs-gap);\n overflow: auto;\n padding: var(--mds-tab-tabs-padding);\n scroll-behavior: var(--mds-tab-scroll-behavior);\n -webkit-scroll-snap-type: x mandatory;\n -ms-scroll-snap-type: x mandatory;\n scroll-snap-type: x mandatory;\n -webkit-transition-duration: var(--mds-tab-transition-duration);\n transition-duration: var(--mds-tab-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n -webkit-transition-timing-function: var(--mds-tab-transition-timing-function);\n transition-timing-function: var(--mds-tab-transition-timing-function);\n}\n\n.tabs-wrapper {\n display: grid;\n max-width: -moz-max-content;\n max-width: -webkit-max-content;\n max-width: max-content;\n overflow: hidden;\n position: relative;\n}\n\n.tabs-wrapper--fill {\n max-width: 100%;\n}\n\n.tabs-wrapper::after {\n border-radius: var(--mds-tab-tabs-radius);\n -webkit-box-shadow: var(--mds-tab-tabs-wrapper-shadow);\n box-shadow: var(--mds-tab-tabs-wrapper-shadow);\n content: \"\";\n inset: 0;\n opacity: var(--mds-tab-tabs-wrapper-outline-opacity);\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-tab-transition-duration);\n transition-duration: var(--mds-tab-transition-duration);\n -webkit-transition-property: opacity, -webkit-box-shadow;\n transition-property: opacity, -webkit-box-shadow;\n transition-property: box-shadow, opacity;\n transition-property: box-shadow, opacity, -webkit-box-shadow;\n -webkit-transition-timing-function: var(--mds-tab-transition-timing-function);\n transition-timing-function: var(--mds-tab-transition-timing-function);\n\n /* z-index: 1; */\n}\n\n\n.contents {\n\n --mds-tab-contents-height: auto;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: none;\n scrollbar-width: none;\n gap: 1.5rem;\n\n -ms-flex-align: start;\n\n align-items: flex-start;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n height: var(--mds-tab-contents-height);\n overflow-x: auto;\n overflow-y: hidden;\n position: relative;\n scroll-behavior: var(--mds-tab-scroll-behavior);\n -webkit-scroll-snap-type: x mandatory;\n -ms-scroll-snap-type: x mandatory;\n scroll-snap-type: x mandatory;\n -webkit-transition-duration: var(--mds-tab-transition-duration);\n transition-duration: var(--mds-tab-transition-duration);\n -webkit-transition-property: height;\n transition-property: height;\n -webkit-transition-timing-function: var(--mds-tab-transition-timing-function);\n transition-timing-function: var(--mds-tab-transition-timing-function);\n}\n\n.contents:empty {\n display: none;\n}\n\n::slotted( [slot=\"content\"] ){\n\n width: 100%;\n\n min-width: 100%;\n\n -ms-flex-preferred-size: 0;\n\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n scroll-snap-align: start;\n}\n\n::slotted( [slot=\"content\"][mds-tab-content-hidden] ) {\n display: none !important;\n}\n\n.tabs {\n position: relative;\n}\n\n.slider {\n\n --mds-tab-slider-offset: 0;\n --mds-tab-slider-width: 0;\n\n background-color: var(--mds-tab-item-selected-background);\n border-radius: var(--mds-tab-item-radius);\n bottom: var(--mds-tab-tabs-padding);\n -webkit-box-shadow: var(--mds-tab-item-selected-shadow);\n box-shadow: var(--mds-tab-item-selected-shadow);\n left: 0;\n pointer-events: none;\n position: absolute;\n top: var(--mds-tab-tabs-padding);\n -webkit-transform: translateX(var(--mds-tab-slider-offset)) translateZ(0);\n transform: translateX(var(--mds-tab-slider-offset)) translateZ(0);\n -webkit-transition-duration: var(--mds-tab-transition-duration);\n transition-duration: var(--mds-tab-transition-duration);\n -webkit-transition-property: background-color, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, width, -webkit-box-shadow, -webkit-transform;\n transition-property: background-color, box-shadow, transform, width;\n transition-property: background-color, box-shadow, transform, width, -webkit-box-shadow, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-tab-transition-timing-function);\n transition-timing-function: var(--mds-tab-transition-timing-function);\n width: var(--mds-tab-slider-width);\n will-change: transform, width;\n z-index: 0;\n}\n\n.slider--no-trantitions {\n -webkit-transition-property: none;\n transition-property: none;\n}\n\n::slotted( mds-tab-item ) {\n position: relative;\n z-index: 1;\n}\n\n@import '~@maggioli-design-system/styles/dist/tailwind/components.css';\n@tailwind components;\n@tailwind utilities;\n\n:host(:not([scrollbar])) .tabs {\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n\n:host(:not([scrollbar])) .tabs::-webkit-scrollbar {\n display: none;\n}\n\n:host([scrollbar]:not([scrollbar=\"false\"])) .tabs::-webkit-scrollbar {\n height: var(--mds-tab-scroll-scrollbar-size);\n width: var(--mds-tab-scroll-scrollbar-size);\n}\n\n:host([scrollbar]:not([scrollbar=\"false\"])) .tabs::-webkit-scrollbar-track {\n background-color: var(--mds-tab-scroll-scrollbar-track-background);\n border-radius: var(--mds-tab-scroll-scrollbar-radius);\n margin-block: var(--mds-tab-scroll-scrollbar-margin);\n margin-inline: var(--mds-tab-scroll-scrollbar-margin);\n}\n\n:host([scrollbar]:not([scrollbar=\"false\"])) .tabs::-webkit-scrollbar-thumb {\n background-color: var(--mds-tab-scroll-scrollbar-thumb-background);\n border-radius: var(--mds-tab-scroll-scrollbar-radius);\n}\n\n@supports (scrollbar-color: transparent transparent) {\n .tabs {\n scrollbar-color: var(--mds-tab-scroll-scrollbar-thumb-background) var(--mds-tab-scroll-scrollbar-track-background);\n scrollbar-width: thin;\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host {\n\n --mds-tab-scroll-behavior: auto;\n --mds-tab-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host {\n\n --mds-tab-scroll-behavior: auto;\n --mds-tab-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-tab-tabs-background: rgb(var(--tone-neutral-08));\n --mds-tab-item-selected-background: rgb(var(--tone-neutral-07));\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-tab-tabs-background: rgb(var(--tone-neutral-08));\n --mds-tab-item-selected-background: rgb(var(--tone-neutral-07));\n }\n }\n}\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-tab-item-selected-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-tab-tabs-wrapper-shadow: 0 0 0 0.125rem var(--mds-tab-tabs-wrapper-shadow-color) inset;\n --mds-tab-tabs-wrapper-shadow-color: rgb(var(--tone-neutral-07));\n --mds-tab-tabs-wrapper-outline-opacity: 0.3;\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-tab-item-selected-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);\n --mds-tab-tabs-wrapper-shadow: 0 0 0 0.125rem var(--mds-tab-tabs-wrapper-shadow-color) inset;\n --mds-tab-tabs-wrapper-shadow-color: rgb(var(--tone-neutral-07));\n --mds-tab-tabs-wrapper-outline-opacity: 0.3;\n }\n }\n}\n\n\n:host(:not(:is([hydrated], .hydrated))) {\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n/* TODO refact(stencil): Uses only used selector from parent shadowDOM component */\n\nmds-accordion:not(:is([hydrated], .hydrated)),\nmds-accordion-item:not(:is([hydrated], .hydrated)),\nmds-accordion-timer:not(:is([hydrated], .hydrated)),\nmds-accordion-timer-item:not(:is([hydrated], .hydrated)),\nmds-author:not(:is([hydrated], .hydrated)),\nmds-avatar:not(:is([hydrated], .hydrated)),\nmds-badge:not(:is([hydrated], .hydrated)),\nmds-banner:not(:is([hydrated], .hydrated)),\nmds-benchmark-bar:not(:is([hydrated], .hydrated)),\nmds-bibliography:not(:is([hydrated], .hydrated)),\nmds-breadcrumb:not(:is([hydrated], .hydrated)),\nmds-breadcrumb-item:not(:is([hydrated], .hydrated)),\nmds-button:not(:is([hydrated], .hydrated)),\nmds-card:not(:is([hydrated], .hydrated)),\nmds-card-content:not(:is([hydrated], .hydrated)),\nmds-card-footer:not(:is([hydrated], .hydrated)),\nmds-card-header:not(:is([hydrated], .hydrated)),\nmds-card-media:not(:is([hydrated], .hydrated)),\nmds-chip:not(:is([hydrated], .hydrated)),\nmds-details:not(:is([hydrated], .hydrated)),\nmds-dropdown:not(:is([hydrated], .hydrated)),\nmds-entity:not(:is([hydrated], .hydrated)),\nmds-file:not(:is([hydrated], .hydrated)),\nmds-file-preview:not(:is([hydrated], .hydrated)),\nmds-filter:not(:is([hydrated], .hydrated)),\nmds-filter-item:not(:is([hydrated], .hydrated)),\nmds-header:not(:is([hydrated], .hydrated)),\nmds-header-bar:not(:is([hydrated], .hydrated)),\nmds-help:not(:is([hydrated], .hydrated)),\nmds-horizontal-scroll:not(:is([hydrated], .hydrated)),\nmds-hr:not(:is([hydrated], .hydrated)),\nmds-icon:not(:is([hydrated], .hydrated)),\nmds-img:not(:is([hydrated], .hydrated)),\nmds-input:not(:is([hydrated], .hydrated)),\nmds-input-field:not(:is([hydrated], .hydrated)),\nmds-input-range:not(:is([hydrated], .hydrated)),\nmds-input-select:not(:is([hydrated], .hydrated)),\nmds-input-switch:not(:is([hydrated], .hydrated)),\nmds-input-tip:not(:is([hydrated], .hydrated)),\nmds-input-tip-item:not(:is([hydrated], .hydrated)),\nmds-input-upload:not(:is([hydrated], .hydrated)),\nmds-keyboard:not(:is([hydrated], .hydrated)),\nmds-keyboard-key:not(:is([hydrated], .hydrated)),\nmds-kpi:not(:is([hydrated], .hydrated)),\nmds-kpi-item:not(:is([hydrated], .hydrated)),\nmds-label:not(:is([hydrated], .hydrated)),\nmds-list:not(:is([hydrated], .hydrated)),\nmds-list-item:not(:is([hydrated], .hydrated)),\nmds-modal:not(:is([hydrated], .hydrated)),\nmds-note:not(:is([hydrated], .hydrated)),\nmds-notification:not(:is([hydrated], .hydrated)),\nmds-paginator:not(:is([hydrated], .hydrated)),\nmds-paginator-item:not(:is([hydrated], .hydrated)),\nmds-pref:not(:is([hydrated], .hydrated)),\nmds-pref-animation:not(:is([hydrated], .hydrated)),\nmds-pref-consumption:not(:is([hydrated], .hydrated)),\nmds-pref-contrast:not(:is([hydrated], .hydrated)),\nmds-pref-language:not(:is([hydrated], .hydrated)),\nmds-pref-language-item:not(:is([hydrated], .hydrated)),\nmds-pref-theme:not(:is([hydrated], .hydrated)),\nmds-price-table:not(:is([hydrated], .hydrated)),\nmds-price-table-features:not(:is([hydrated], .hydrated)),\nmds-price-table-features-cell:not(:is([hydrated], .hydrated)),\nmds-price-table-features-row:not(:is([hydrated], .hydrated)),\nmds-price-table-header:not(:is([hydrated], .hydrated)),\nmds-price-table-list:not(:is([hydrated], .hydrated)),\nmds-price-table-list-item:not(:is([hydrated], .hydrated)),\nmds-progress:not(:is([hydrated], .hydrated)),\nmds-push-notification:not(:is([hydrated], .hydrated)),\nmds-push-notifications:not(:is([hydrated], .hydrated)),\nmds-quote:not(:is([hydrated], .hydrated)),\nmds-separator:not(:is([hydrated], .hydrated)),\nmds-spinner:not(:is([hydrated], .hydrated)),\nmds-stepper-bar:not(:is([hydrated], .hydrated)),\nmds-stepper-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab:not(:is([hydrated], .hydrated)),\nmds-tab-bar:not(:is([hydrated], .hydrated)),\nmds-tab-bar-item:not(:is([hydrated], .hydrated)),\nmds-tab-item:not(:is([hydrated], .hydrated)),\nmds-table:not(:is([hydrated], .hydrated)),\nmds-table-body:not(:is([hydrated], .hydrated)),\nmds-table-cell:not(:is([hydrated], .hydrated)),\nmds-table-footer:not(:is([hydrated], .hydrated)),\nmds-table-header:not(:is([hydrated], .hydrated)),\nmds-table-header-cell:not(:is([hydrated], .hydrated)),\nmds-table-row:not(:is([hydrated], .hydrated)),\nmds-text:not(:is([hydrated], .hydrated)),\nmds-toast:not(:is([hydrated], .hydrated)),\nmds-tooltip:not(:is([hydrated], .hydrated)),\nmds-tree:not(:is([hydrated], .hydrated)),\nmds-tree-item:not(:is([hydrated], .hydrated)),\nmds-url-view:not(:is([hydrated], .hydrated)),\nmds-usage:not(:is([hydrated], .hydrated)),\nmds-video-wall:not(:is([hydrated], .hydrated)),\nmds-zero:not(:is([hydrated], .hydrated))\n{\n -webkit-animation-duration: 0s;\n animation-duration: 0s;\n border-color: transparent;\n -webkit-box-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n opacity: 0;\n outline-color: transparent;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n visibility: hidden;\n}\n\n";
32
34
  const MdsTabStyle0 = mdsTabCss;
33
35
 
34
36
  const MdsTab = class {
@@ -43,13 +45,25 @@ const MdsTab = class {
43
45
  */
44
46
  this.animation = 'slide';
45
47
  this.queryContentItems = () => this.element.querySelectorAll('[slot=content]');
46
- this.updateSliderPosition = () => {
48
+ this.startObserver = () => {
49
+ this.observer = new ResizeObserver(() => {
50
+ if (this.animation === 'slide') {
51
+ this.updateSliderPosition(true);
52
+ }
53
+ });
54
+ this.observer.observe(this.tabsContainer);
55
+ };
56
+ this.updateSliderPosition = (disableAnimation) => {
47
57
  if (!this.slider) {
48
58
  this.setSlider();
49
59
  }
50
- if (this.slider) {
60
+ if (this.slider && this.currentItem >= 0) {
61
+ if (disableAnimation) {
62
+ this.slider.classList.add('slider--no-trantitions');
63
+ }
51
64
  this.sliderWidth = this.tabItems[this.currentItem].offsetWidth;
52
65
  this.sliderOffset = this.tabItems[this.currentItem].offsetLeft - this.tabsContainer.offsetLeft;
66
+ this.slider.classList.remove('slider--no-trantitions');
53
67
  }
54
68
  };
55
69
  this.setSlider = () => {
@@ -69,6 +83,9 @@ const MdsTab = class {
69
83
  });
70
84
  };
71
85
  }
86
+ disonnectedCallback() {
87
+ this.observer.unobserve(this.tabsContainer);
88
+ }
72
89
  componentWillLoad() {
73
90
  this.tabItems = this.element.querySelectorAll('mds-tab-item');
74
91
  this.tabItems.forEach((item, key) => {
@@ -84,6 +101,7 @@ const MdsTab = class {
84
101
  var _a, _b;
85
102
  this.tabs = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.tabs');
86
103
  this.tabsContainer = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.tabs-wrapper');
104
+ this.startObserver();
87
105
  this.contentItems = this.queryContentItems();
88
106
  this.contentItems.forEach((item, key) => {
89
107
  setAttributeIfEmpty(item, 'role', 'tabpanel');
@@ -128,12 +146,12 @@ const MdsTab = class {
128
146
  this.slider = null;
129
147
  }
130
148
  render() {
131
- return (index.h(index.Host, { key: '6a2434a047dacdb770cf8e623e9f48dd18a53654' }, index.h("div", { key: 'c3b448092c30ca04bb1b42f374edeee4bf7707ba', class: "tabs-wrapper" }, index.h("div", { key: 'c528121d69ea3abf7a7b2ea34654580f3d8bd266', class: "tabs", part: "tabs", role: "tablist" }, index.h("slot", { key: '759fb466c9e0e375460a37cc3a0373ae715b58ed' }), this.animation === 'slide' &&
132
- index.h("div", { key: '146d219cd9abbfc5b1080b1e2e81eade9abe4171', class: "slider", part: "slider", style: {
149
+ return (index.h(index.Host, { key: '6ccc0ea805f77b2753cbb06f27953f8d6ae250e1' }, index.h("div", { key: 'd9a918c74be8f21fa69bf45b35669620c2c2c617', class: clsx('tabs-wrapper', this.fill && 'tabs-wrapper--fill') }, index.h("div", { key: 'badfe373f84548486800772c5ad3c6297ea2d3e6', class: "tabs", part: "tabs", role: "tablist" }, index.h("slot", { key: '471e14edea2d58e52cd793fa20a2bc6cb13cd2dd' }), this.animation === 'slide' &&
150
+ index.h("div", { key: 'bab0c0ae75bbdbc28dc65425565fc06931b22549', class: "slider", part: "slider", style: {
133
151
  '--mds-tab-slider-width': `${this.sliderWidth}px`,
134
152
  '--mds-tab-slider-offset': `${this.sliderOffset}px`,
135
153
  } }))), this.contentItems &&
136
- index.h("div", { key: '040876c932e1ab98101a7453846a63e781724bb6', class: "contents", part: "contents" }, index.h("slot", { key: '670782e05aaacf2b1113beffce71bcca87a86b86', name: "content" }))));
154
+ index.h("div", { key: '8d84d04142c43e66082d201c940c4eaca1749ceb', class: "contents", part: "contents" }, index.h("slot", { key: '7cf3ec2c2fb83fd4a3aebdb5d8149606a8501887', name: "content" }))));
137
155
  }
138
156
  get element() { return index.getElement(this); }
139
157
  static get watchers() { return {
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["mds-tab.cjs",[[1,"mds-tab",{"scrollbar":[516],"animation":[513],"sliderWidth":[32],"sliderOffset":[32]},[[0,"mdsTabItemSelect","changeEventHandler"],[0,"mdsTabItemFocus","focusEventHandler"]],{"animation":["handleAnimation"]}]]]], options);
22
+ return index.bootstrapLazy([["mds-tab.cjs",[[1,"mds-tab",{"scrollbar":[516],"animation":[513],"fill":[516],"sliderWidth":[32],"sliderOffset":[32]},[[0,"mdsTabItemSelect","changeEventHandler"],[0,"mdsTabItemFocus","focusEventHandler"]],{"animation":["handleAnimation"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -143,12 +143,12 @@ export class FloatingController {
143
143
  }
144
144
  export class Backdrop {
145
145
  constructor(backdropId) {
146
- this.defaultBackdropId = 'mds-backdrop';
146
+ this.defaultBackdropId = 'magma-backdrop';
147
147
  this.backdropBackgroundVisible = 'rgba(var(--magma-backdrop-color, 0 0 0) / var(--magma-backdrop-opacity, 0.1))';
148
148
  this.backdropBackgroundHidden = 'rgba(var(--magma-backdrop-color, 0 0 0) / 0)';
149
149
  this.backdropId = backdropId !== null && backdropId !== void 0 ? backdropId : this.defaultBackdropId;
150
- this.cssBackdropZIndex = `var(--${this.backdropId}-z-index)`;
151
- this.cssBackdropDuration = `var(--${this.backdropId}-duration)`;
150
+ this.cssBackdropZIndex = `var(--${this.backdropId}-z-index, 4000)`;
151
+ this.cssBackdropDuration = `var(--${this.backdropId}-animation-duration, 300ms)`;
152
152
  }
153
153
  attachBackdrop() {
154
154
  if (!this.backdropEl) {
@@ -0,0 +1,30 @@
1
+ const levenshteinDistance = (a, b) => {
2
+ const dp = Array.from({ length: a.length + 1 }, (_, i) =>
3
+ // eslint-disable-next-line no-nested-ternary
4
+ Array.from({ length: b.length + 1 }, (_, j) => (i === 0 ? j : j === 0 ? i : 0)));
5
+ for (let i = 1; i <= a.length; i++) {
6
+ for (let j = 1; j <= b.length; j++) {
7
+ if (a[i - 1] === b[j - 1]) {
8
+ dp[i][j] = dp[i - 1][j - 1];
9
+ }
10
+ else {
11
+ dp[i][j] = 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
12
+ }
13
+ }
14
+ }
15
+ return dp[a.length][b.length];
16
+ };
17
+ const closest = (input, validCodes) => {
18
+ let [closest] = validCodes;
19
+ let minDistance = levenshteinDistance(input, closest);
20
+ for (const code of validCodes) {
21
+ const distance = levenshteinDistance(input, code);
22
+ if (distance < minDistance) {
23
+ minDistance = distance;
24
+ closest = code;
25
+ }
26
+ }
27
+ return closest;
28
+ };
29
+ const firstLetterUppercase = (str) => str.charAt(0).toUpperCase() + str.slice(1);
30
+ export { closest, firstLetterUppercase, levenshteinDistance, };
@@ -24,7 +24,7 @@
24
24
  * @prop --mds-tab-scroll-scrollbar-track-background: Sets the background-color of the browser scroll bar track (if supported)
25
25
  * @prop --mds-tab-tabs-background: Sets the `background-color` of `mds-tab::part(tabs)`
26
26
  * @prop --mds-tab-tabs-gap: Sets the `gap` of `mds-tab::part(tabs)`
27
- * @prop --mds-tab-tabs-outline-opacity: Sets the `opacity` of outline border which holds
27
+ * @prop --mds-tab-tabs-wrapper-outline-opacity: Sets the `opacity` of outline border which holds
28
28
  * @prop --mds-tab-tabs-padding: Sets the `padding` of `mds-tab::part(tabs)`
29
29
  * @prop --mds-tab-tabs-radius: Sets the `border-radius` of `mds-tab::part(tabs)`
30
30
  */
@@ -39,8 +39,9 @@
39
39
  --mds-tab-item-hover-shadow: transparent;
40
40
  --mds-tab-item-radius: 0.5rem;
41
41
  --mds-tab-item-selected-background: rgb(var(--tone-neutral));
42
- --mds-tab-item-selected-color: rgb(var(--tone-neutral-02));
42
+ --mds-tab-item-selected-color: rgb(var(--tone-neutral-01));
43
43
  --mds-tab-item-selected-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
44
+ --mds-tab-scroll-behavior: smooth;
44
45
  --mds-tab-scroll-scrollbar-margin: 0;
45
46
  --mds-tab-scroll-scrollbar-radius: 0;
46
47
  --mds-tab-scroll-scrollbar-size: 0.5rem;
@@ -48,9 +49,11 @@
48
49
  --mds-tab-scroll-scrollbar-track-background: rgb(var(--tone-neutral-06) 0.3);
49
50
  --mds-tab-tabs-background: rgb(var(--tone-neutral-09));
50
51
  --mds-tab-tabs-gap: 0.5rem;
51
- --mds-tab-tabs-outline-opacity: 0.7;
52
52
  --mds-tab-tabs-padding: 0.5rem;
53
53
  --mds-tab-tabs-radius: 1rem;
54
+ --mds-tab-tabs-wrapper-outline-opacity: 0.7;
55
+ --mds-tab-tabs-wrapper-shadow-color: var(--mds-tab-tabs-background);
56
+ --mds-tab-tabs-wrapper-shadow: 0 0 0 2px var(--mds-tab-tabs-wrapper-shadow-color) inset;
54
57
  --mds-tab-transition-duration: 0.5s;
55
58
  --mds-tab-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
56
59
 
@@ -74,7 +77,7 @@
74
77
  gap: var(--mds-tab-tabs-gap);
75
78
  overflow: auto;
76
79
  padding: var(--mds-tab-tabs-padding);
77
- scroll-behavior: smooth;
80
+ scroll-behavior: var(--mds-tab-scroll-behavior);
78
81
  scroll-snap-type: x mandatory;
79
82
  transition-duration: var(--mds-tab-transition-duration);
80
83
  transition-property: background-color;
@@ -83,18 +86,29 @@
83
86
 
84
87
  .tabs-wrapper {
85
88
  display: grid;
89
+ max-width: -moz-max-content;
90
+ max-width: max-content;
86
91
  overflow: hidden;
87
92
  position: relative;
88
93
  }
89
94
 
95
+ .tabs-wrapper--fill {
96
+ max-width: 100%;
97
+ }
98
+
90
99
  .tabs-wrapper::after {
91
100
  border-radius: var(--mds-tab-tabs-radius);
92
- box-shadow: 0 0 0 2px var(--mds-tab-tabs-background) inset;
101
+ box-shadow: var(--mds-tab-tabs-wrapper-shadow);
93
102
  content: "";
94
103
  inset: 0;
95
- opacity: var(--mds-tab-tabs-outline-opacity);
104
+ opacity: var(--mds-tab-tabs-wrapper-outline-opacity);
96
105
  pointer-events: none;
97
106
  position: absolute;
107
+ transition-duration: var(--mds-tab-transition-duration);
108
+ transition-property: box-shadow, opacity;
109
+ transition-timing-function: var(--mds-tab-transition-timing-function);
110
+
111
+ /* z-index: 1; */
98
112
  }
99
113
 
100
114
 
@@ -113,13 +127,17 @@
113
127
  overflow-x: auto;
114
128
  overflow-y: hidden;
115
129
  position: relative;
116
- scroll-behavior: smooth;
130
+ scroll-behavior: var(--mds-tab-scroll-behavior);
117
131
  scroll-snap-type: x mandatory;
118
132
  transition-duration: var(--mds-tab-transition-duration);
119
133
  transition-property: height;
120
134
  transition-timing-function: var(--mds-tab-transition-timing-function);
121
135
  }
122
136
 
137
+ .contents:empty {
138
+ display: none;
139
+ }
140
+
123
141
  ::slotted( [slot="content"] ){
124
142
 
125
143
  width: 100%;
@@ -154,13 +172,17 @@
154
172
  top: var(--mds-tab-tabs-padding);
155
173
  transform: translateX(var(--mds-tab-slider-offset)) translateZ(0);
156
174
  transition-duration: var(--mds-tab-transition-duration);
157
- transition-property: transform, width;
175
+ transition-property: background-color, box-shadow, transform, width;
158
176
  transition-timing-function: var(--mds-tab-transition-timing-function);
159
177
  width: var(--mds-tab-slider-width);
160
178
  will-change: transform, width;
161
179
  z-index: 0;
162
180
  }
163
181
 
182
+ .slider--no-trantitions {
183
+ transition-property: none;
184
+ }
185
+
164
186
  ::slotted( mds-tab-item ) {
165
187
  position: relative;
166
188
  z-index: 1;
@@ -209,6 +231,7 @@
209
231
  @container style(--magma-pref-animation: reduce) {
210
232
  :host {
211
233
 
234
+ --mds-tab-scroll-behavior: auto;
212
235
  --mds-tab-transition-duration: 0s;
213
236
  }
214
237
  }
@@ -218,6 +241,7 @@
218
241
  @media (prefers-reduced-motion) {
219
242
  :host {
220
243
 
244
+ --mds-tab-scroll-behavior: auto;
221
245
  --mds-tab-transition-duration: 0s;
222
246
  }
223
247
  }
@@ -226,33 +250,164 @@
226
250
  @tailwind utilities;
227
251
 
228
252
  @container style(--magma-pref-theme: dark) {
229
- .tabs {
230
- border-color: rgb(var(--tone-neutral-08));
253
+ :host {
254
+
255
+ --mds-tab-tabs-background: rgb(var(--tone-neutral-08));
256
+ --mds-tab-item-selected-background: rgb(var(--tone-neutral-07));
231
257
  }
232
258
  }
233
259
 
234
260
  @container style(--magma-pref-theme: system) {
235
261
 
236
262
  @media (prefers-color-scheme: dark) {
237
- .tabs {
238
- border-color: rgb(var(--tone-neutral-08));
263
+ :host {
264
+
265
+ --mds-tab-tabs-background: rgb(var(--tone-neutral-08));
266
+ --mds-tab-item-selected-background: rgb(var(--tone-neutral-07));
239
267
  }
240
268
  }
241
269
  }
242
270
 
243
271
  @container style(--magma-pref-contrast: more) {
244
- .tabs {
245
- border-color: rgb(var(--tone-neutral-06));
272
+ :host {
273
+
274
+ --mds-tab-item-selected-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);
275
+ --mds-tab-tabs-wrapper-shadow: 0 0 0 0.125rem var(--mds-tab-tabs-wrapper-shadow-color) inset;
276
+ --mds-tab-tabs-wrapper-shadow-color: rgb(var(--tone-neutral-07));
277
+ --mds-tab-tabs-wrapper-outline-opacity: 0.3;
246
278
  }
247
279
  }
248
280
 
249
281
  @container style(--magma-pref-contrast: system) {
250
282
 
251
283
  @media (prefers-contrast: more) {
252
- .tabs {
253
- border-color: rgb(var(--tone-neutral-06));
284
+ :host {
285
+
286
+ --mds-tab-item-selected-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.3);
287
+ --mds-tab-tabs-wrapper-shadow: 0 0 0 0.125rem var(--mds-tab-tabs-wrapper-shadow-color) inset;
288
+ --mds-tab-tabs-wrapper-shadow-color: rgb(var(--tone-neutral-07));
289
+ --mds-tab-tabs-wrapper-outline-opacity: 0.3;
254
290
  }
255
291
  }
256
292
  }
257
293
 
258
294
 
295
+ :host(:not(:is([hydrated], .hydrated))) {
296
+ animation-duration: 0s;
297
+ border-color: transparent;
298
+ box-shadow: 0 0 0 transparent;
299
+ opacity: 0;
300
+ outline-color: transparent;
301
+ transition-delay: 0s;
302
+ transition-duration: 0s;
303
+ visibility: hidden;
304
+ }
305
+
306
+ /* TODO refact(stencil): Uses only used selector from parent shadowDOM component */
307
+
308
+ mds-accordion:not(:is([hydrated], .hydrated)),
309
+ mds-accordion-item:not(:is([hydrated], .hydrated)),
310
+ mds-accordion-timer:not(:is([hydrated], .hydrated)),
311
+ mds-accordion-timer-item:not(:is([hydrated], .hydrated)),
312
+ mds-author:not(:is([hydrated], .hydrated)),
313
+ mds-avatar:not(:is([hydrated], .hydrated)),
314
+ mds-badge:not(:is([hydrated], .hydrated)),
315
+ mds-banner:not(:is([hydrated], .hydrated)),
316
+ mds-benchmark-bar:not(:is([hydrated], .hydrated)),
317
+ mds-bibliography:not(:is([hydrated], .hydrated)),
318
+ mds-breadcrumb:not(:is([hydrated], .hydrated)),
319
+ mds-breadcrumb-item:not(:is([hydrated], .hydrated)),
320
+ mds-button:not(:is([hydrated], .hydrated)),
321
+ mds-card:not(:is([hydrated], .hydrated)),
322
+ mds-card-content:not(:is([hydrated], .hydrated)),
323
+ mds-card-footer:not(:is([hydrated], .hydrated)),
324
+ mds-card-header:not(:is([hydrated], .hydrated)),
325
+ mds-card-media:not(:is([hydrated], .hydrated)),
326
+ mds-chip:not(:is([hydrated], .hydrated)),
327
+ mds-details:not(:is([hydrated], .hydrated)),
328
+ mds-dropdown:not(:is([hydrated], .hydrated)),
329
+ mds-entity:not(:is([hydrated], .hydrated)),
330
+ mds-file:not(:is([hydrated], .hydrated)),
331
+ mds-file-preview:not(:is([hydrated], .hydrated)),
332
+ mds-filter:not(:is([hydrated], .hydrated)),
333
+ mds-filter-item:not(:is([hydrated], .hydrated)),
334
+ mds-header:not(:is([hydrated], .hydrated)),
335
+ mds-header-bar:not(:is([hydrated], .hydrated)),
336
+ mds-help:not(:is([hydrated], .hydrated)),
337
+ mds-horizontal-scroll:not(:is([hydrated], .hydrated)),
338
+ mds-hr:not(:is([hydrated], .hydrated)),
339
+ mds-icon:not(:is([hydrated], .hydrated)),
340
+ mds-img:not(:is([hydrated], .hydrated)),
341
+ mds-input:not(:is([hydrated], .hydrated)),
342
+ mds-input-field:not(:is([hydrated], .hydrated)),
343
+ mds-input-range:not(:is([hydrated], .hydrated)),
344
+ mds-input-select:not(:is([hydrated], .hydrated)),
345
+ mds-input-switch:not(:is([hydrated], .hydrated)),
346
+ mds-input-tip:not(:is([hydrated], .hydrated)),
347
+ mds-input-tip-item:not(:is([hydrated], .hydrated)),
348
+ mds-input-upload:not(:is([hydrated], .hydrated)),
349
+ mds-keyboard:not(:is([hydrated], .hydrated)),
350
+ mds-keyboard-key:not(:is([hydrated], .hydrated)),
351
+ mds-kpi:not(:is([hydrated], .hydrated)),
352
+ mds-kpi-item:not(:is([hydrated], .hydrated)),
353
+ mds-label:not(:is([hydrated], .hydrated)),
354
+ mds-list:not(:is([hydrated], .hydrated)),
355
+ mds-list-item:not(:is([hydrated], .hydrated)),
356
+ mds-modal:not(:is([hydrated], .hydrated)),
357
+ mds-note:not(:is([hydrated], .hydrated)),
358
+ mds-notification:not(:is([hydrated], .hydrated)),
359
+ mds-paginator:not(:is([hydrated], .hydrated)),
360
+ mds-paginator-item:not(:is([hydrated], .hydrated)),
361
+ mds-pref:not(:is([hydrated], .hydrated)),
362
+ mds-pref-animation:not(:is([hydrated], .hydrated)),
363
+ mds-pref-consumption:not(:is([hydrated], .hydrated)),
364
+ mds-pref-contrast:not(:is([hydrated], .hydrated)),
365
+ mds-pref-language:not(:is([hydrated], .hydrated)),
366
+ mds-pref-language-item:not(:is([hydrated], .hydrated)),
367
+ mds-pref-theme:not(:is([hydrated], .hydrated)),
368
+ mds-price-table:not(:is([hydrated], .hydrated)),
369
+ mds-price-table-features:not(:is([hydrated], .hydrated)),
370
+ mds-price-table-features-cell:not(:is([hydrated], .hydrated)),
371
+ mds-price-table-features-row:not(:is([hydrated], .hydrated)),
372
+ mds-price-table-header:not(:is([hydrated], .hydrated)),
373
+ mds-price-table-list:not(:is([hydrated], .hydrated)),
374
+ mds-price-table-list-item:not(:is([hydrated], .hydrated)),
375
+ mds-progress:not(:is([hydrated], .hydrated)),
376
+ mds-push-notification:not(:is([hydrated], .hydrated)),
377
+ mds-push-notifications:not(:is([hydrated], .hydrated)),
378
+ mds-quote:not(:is([hydrated], .hydrated)),
379
+ mds-separator:not(:is([hydrated], .hydrated)),
380
+ mds-spinner:not(:is([hydrated], .hydrated)),
381
+ mds-stepper-bar:not(:is([hydrated], .hydrated)),
382
+ mds-stepper-bar-item:not(:is([hydrated], .hydrated)),
383
+ mds-tab:not(:is([hydrated], .hydrated)),
384
+ mds-tab-bar:not(:is([hydrated], .hydrated)),
385
+ mds-tab-bar-item:not(:is([hydrated], .hydrated)),
386
+ mds-tab-item:not(:is([hydrated], .hydrated)),
387
+ mds-table:not(:is([hydrated], .hydrated)),
388
+ mds-table-body:not(:is([hydrated], .hydrated)),
389
+ mds-table-cell:not(:is([hydrated], .hydrated)),
390
+ mds-table-footer:not(:is([hydrated], .hydrated)),
391
+ mds-table-header:not(:is([hydrated], .hydrated)),
392
+ mds-table-header-cell:not(:is([hydrated], .hydrated)),
393
+ mds-table-row:not(:is([hydrated], .hydrated)),
394
+ mds-text:not(:is([hydrated], .hydrated)),
395
+ mds-toast:not(:is([hydrated], .hydrated)),
396
+ mds-tooltip:not(:is([hydrated], .hydrated)),
397
+ mds-tree:not(:is([hydrated], .hydrated)),
398
+ mds-tree-item:not(:is([hydrated], .hydrated)),
399
+ mds-url-view:not(:is([hydrated], .hydrated)),
400
+ mds-usage:not(:is([hydrated], .hydrated)),
401
+ mds-video-wall:not(:is([hydrated], .hydrated)),
402
+ mds-zero:not(:is([hydrated], .hydrated))
403
+ {
404
+ animation-duration: 0s;
405
+ border-color: transparent;
406
+ box-shadow: 0 0 0 transparent;
407
+ opacity: 0;
408
+ outline-color: transparent;
409
+ transition-delay: 0s;
410
+ transition-duration: 0s;
411
+ visibility: hidden;
412
+ }
413
+
@@ -1,6 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { setAttributeIfEmpty } from "../../common/aria";
3
3
  import { hashRandomValue } from "../../common/aria";
4
+ import clsx from "clsx";
4
5
  /**
5
6
  * @part contents - Selects the container of the tabbed contents elements.
6
7
  * @part slider - Selects the slider element which is visible when attribute `animation` is set to `slide`.
@@ -18,13 +19,25 @@ export class MdsTab {
18
19
  */
19
20
  this.animation = 'slide';
20
21
  this.queryContentItems = () => this.element.querySelectorAll('[slot=content]');
21
- this.updateSliderPosition = () => {
22
+ this.startObserver = () => {
23
+ this.observer = new ResizeObserver(() => {
24
+ if (this.animation === 'slide') {
25
+ this.updateSliderPosition(true);
26
+ }
27
+ });
28
+ this.observer.observe(this.tabsContainer);
29
+ };
30
+ this.updateSliderPosition = (disableAnimation) => {
22
31
  if (!this.slider) {
23
32
  this.setSlider();
24
33
  }
25
- if (this.slider) {
34
+ if (this.slider && this.currentItem >= 0) {
35
+ if (disableAnimation) {
36
+ this.slider.classList.add('slider--no-trantitions');
37
+ }
26
38
  this.sliderWidth = this.tabItems[this.currentItem].offsetWidth;
27
39
  this.sliderOffset = this.tabItems[this.currentItem].offsetLeft - this.tabsContainer.offsetLeft;
40
+ this.slider.classList.remove('slider--no-trantitions');
28
41
  }
29
42
  };
30
43
  this.setSlider = () => {
@@ -44,6 +57,9 @@ export class MdsTab {
44
57
  });
45
58
  };
46
59
  }
60
+ disonnectedCallback() {
61
+ this.observer.unobserve(this.tabsContainer);
62
+ }
47
63
  componentWillLoad() {
48
64
  this.tabItems = this.element.querySelectorAll('mds-tab-item');
49
65
  this.tabItems.forEach((item, key) => {
@@ -59,6 +75,7 @@ export class MdsTab {
59
75
  var _a, _b;
60
76
  this.tabs = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.tabs');
61
77
  this.tabsContainer = (_b = this.element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.tabs-wrapper');
78
+ this.startObserver();
62
79
  this.contentItems = this.queryContentItems();
63
80
  this.contentItems.forEach((item, key) => {
64
81
  setAttributeIfEmpty(item, 'role', 'tabpanel');
@@ -103,12 +120,12 @@ export class MdsTab {
103
120
  this.slider = null;
104
121
  }
105
122
  render() {
106
- return (h(Host, { key: '6a2434a047dacdb770cf8e623e9f48dd18a53654' }, h("div", { key: 'c3b448092c30ca04bb1b42f374edeee4bf7707ba', class: "tabs-wrapper" }, h("div", { key: 'c528121d69ea3abf7a7b2ea34654580f3d8bd266', class: "tabs", part: "tabs", role: "tablist" }, h("slot", { key: '759fb466c9e0e375460a37cc3a0373ae715b58ed' }), this.animation === 'slide' &&
107
- h("div", { key: '146d219cd9abbfc5b1080b1e2e81eade9abe4171', class: "slider", part: "slider", style: {
123
+ return (h(Host, { key: '6ccc0ea805f77b2753cbb06f27953f8d6ae250e1' }, h("div", { key: 'd9a918c74be8f21fa69bf45b35669620c2c2c617', class: clsx('tabs-wrapper', this.fill && 'tabs-wrapper--fill') }, h("div", { key: 'badfe373f84548486800772c5ad3c6297ea2d3e6', class: "tabs", part: "tabs", role: "tablist" }, h("slot", { key: '471e14edea2d58e52cd793fa20a2bc6cb13cd2dd' }), this.animation === 'slide' &&
124
+ h("div", { key: 'bab0c0ae75bbdbc28dc65425565fc06931b22549', class: "slider", part: "slider", style: {
108
125
  '--mds-tab-slider-width': `${this.sliderWidth}px`,
109
126
  '--mds-tab-slider-offset': `${this.sliderOffset}px`,
110
127
  } }))), this.contentItems &&
111
- h("div", { key: '040876c932e1ab98101a7453846a63e781724bb6', class: "contents", part: "contents" }, h("slot", { key: '670782e05aaacf2b1113beffce71bcca87a86b86', name: "content" }))));
128
+ h("div", { key: '8d84d04142c43e66082d201c940c4eaca1749ceb', class: "contents", part: "contents" }, h("slot", { key: '7cf3ec2c2fb83fd4a3aebdb5d8149606a8501887', name: "content" }))));
112
129
  }
113
130
  static get is() { return "mds-tab"; }
114
131
  static get encapsulation() { return "shadow"; }
@@ -168,6 +185,25 @@ export class MdsTab {
168
185
  "attribute": "animation",
169
186
  "reflect": true,
170
187
  "defaultValue": "'slide'"
188
+ },
189
+ "fill": {
190
+ "type": "boolean",
191
+ "mutable": false,
192
+ "complexType": {
193
+ "original": "boolean",
194
+ "resolved": "boolean | undefined",
195
+ "references": {}
196
+ },
197
+ "required": false,
198
+ "optional": true,
199
+ "docs": {
200
+ "tags": [],
201
+ "text": "Sets if the tab area should fill the entire width"
202
+ },
203
+ "getter": false,
204
+ "setter": false,
205
+ "attribute": "fill",
206
+ "reflect": true
171
207
  }
172
208
  };
173
209
  }
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { horizontalActionsAnimationDictionary } from "../../../dictionary/animation";
3
+ import clsx from "clsx";
3
4
  export default {
4
5
  title: 'UI / Tab',
5
6
  argTypes: {
@@ -16,6 +17,10 @@ export default {
16
17
  },
17
18
  };
18
19
  const TemplateEmpty = args => h("div", { class: "grid gap-600" }, h("mds-tab", Object.assign({}, args), h("mds-tab-item", { selected: true }, "First Blood"), h("mds-tab-item", { icon: "mdi/alien", id: "button" }, "Double Impact"), h("mds-tab-item", null, "The Third Man")), h("mds-hr", null), h("div", { class: "grid gap-100" }, h("mds-text", { typography: 'h3' }, "Bottom content"), h("mds-text", null, "This content is outside the mds-tab component.")));
20
+ const SectionComponent = ({ id, className, title }) => {
21
+ return h("div", { id: id, class: clsx('grid gap-100 p-600 min-h-screen auto-rows-min scroll-mt-2000', className) }, h("mds-text", { typography: 'h3' }, title), h("mds-text", null, "This content is outside the mds-tab component."));
22
+ };
23
+ const TemplateScroll = () => h("div", { class: "grid gap-600 pt-[60px]" }, h("div", { class: "fixed top-0 left-0 right-0 p-400 px-600 shadow-sm flex bg-tone-neutral" }, h("mds-tab", null, h("mds-tab-item", { href: "#section-1" }, "Section 1"), h("mds-tab-item", { href: "#section-2" }, "Section 2"), h("mds-tab-item", { href: "#section-3" }, "Section 3"))), h("div", { class: "grid gap-50" }, h(SectionComponent, { id: "section-1", className: "bg-label-amaranth-09", title: "Section 1" }), h(SectionComponent, { id: "section-2", className: "bg-label-blue-09", title: "Section 2" }), h(SectionComponent, { id: "section-3", className: "bg-label-orange-09", title: "Section 3" })));
19
24
  const TemplateOverflow = args => h("div", { class: "grid gap-600" }, h("mds-tab", Object.assign({}, args), h("mds-tab-item", { selected: true }, "First Blood"), h("mds-tab-item", null, "Double Impact"), h("mds-tab-item", null, "The Third Man"), h("mds-tab-item", null, "The Fantastic Four"), h("mds-tab-item", null, "The Fifth Element"), h("mds-tab-item", null, "6 Underground"), h("mds-tab-item", null, "Seven Samurai"), h("mds-tab-item", null, "The Hateful Eight"), h("mds-tab-item", null, "Nine Perfect Strangers"), h("mds-tab-item", null, "10 Things I Hate About You")));
20
25
  const Template = args => h("div", { class: "grid gap-600" }, h("mds-tab", Object.assign({}, args), h("mds-tab-item", { selected: true }, "First Blood"), h("mds-tab-item", { icon: "mdi/alien", id: "button" }, "Double Impact"), h("mds-tab-item", null, "The Third Man"), h("div", { slot: "content", class: "gap-600 grid px-200 py-600 tablet:grid-cols-[1fr_2fr]" }, h("mds-img", { class: "rounded-lg", src: './movie-first-blood.jpg' }), h("div", { class: "grid gap-100 auto-rows-min" }, h("mds-text", { typography: 'h4' }, "First Blood"), h("mds-text", null, "Vietnam veteran and drifter John J. Rambo (Sylvester Stallone) wanders into a small Washington town in search of an old friend, but is met with intolerance and brutality by the local sheriff, Will Teasle (Brian Dennehy). When Teasle and his deputies restrain and shave Rambo, he flashes back to his time as a prisoner of war and unleashes his fury on the officers. He narrowly escapes the manhunt, but it will take his former commander (Richard Crenna) to save the hunters from the hunted."))), h("div", { slot: "content", class: "py-600 px-200 grid tablet:grid-cols-[1fr_2fr] gap-600" }, h("div", { class: "auto-rows-min grid gap-200" }, h("mds-img", { class: "rounded-lg", src: './movie-double-impact.jpg' }), h("mds-img", { class: "rounded-lg", src: './movie-double-impact-shot-01.jpg' }), h("mds-img", { class: "rounded-lg", src: './movie-double-impact-shot-02.jpg' })), h("div", { class: "grid gap-100 auto-rows-min" }, h("mds-text", { typography: 'h4' }, "Double Impact"), h("mds-text", null, "Nearly 25 years after seeing his father killed by Hong Kong crime boss Raymond Zhang (Philip Chan Yan Kin), Chad Wagner (Jean-Claude Van Damme) is living in Los Angeles as a flourishing yet peaceful martial arts trainer. But Chad has a twin brother, Alex (also Van Damme), who suddenly reunites with his less-aggressive sibling and wants to avenge their father's death. As the pair plan their payback against Zhang, they also struggle to overcome their personal differences."))), h("div", { slot: "content", class: "py-600 px-200 grid tablet:grid-cols-[1fr_2fr] gap-600" }, h("div", { class: "auto-rows-min grid gap-200" }, h("mds-img", { class: "rounded-lg", src: './movie-the-third-man.jpg' }), h("mds-img", { class: "rounded-lg", src: './movie-the-third-man-shot.jpg' })), h("div", { class: "grid gap-100 auto-rows-min" }, h("mds-text", { typography: 'h4' }, "The Third Man"), h("mds-text", null, "Set in postwar Vienna, Austria, \"The Third Man\" stars Joseph Cotten as Holly Martins, a writer of pulp Westerns, who arrives penniless as a guest of his childhood chum Harry Lime (Orson Welles), only to find him dead. Martins develops a conspiracy theory after learning of a \"third man\" present at the time of Harry's death, running into interference from British officer Maj. Calloway (Trevor Howard) and falling head-over-heels for Harry's grief-stricken lover, Anna (Alida Valli).")))), h("mds-hr", null), h("div", { class: "grid gap-100" }, h("mds-text", { typography: 'h3' }, "Bottom content"), h("mds-text", null, "This content is outside the mds-tab component.")));
21
26
  const TemplateNoSelected = args => h("div", { class: "grid gap-600" }, h("mds-tab", Object.assign({}, args), h("mds-tab-item", null, "First Blood"), h("mds-tab-item", { icon: "mdi/alien", id: "button" }, "Double Impact"), h("mds-tab-item", null, "The Third Man"), h("div", { slot: "content", class: "py-600 px-200 grid tablet:grid-cols-[1fr_2fr] gap-600" }, h("mds-img", { class: "rounded-lg", src: './movie-first-blood.jpg' }), h("div", { class: "grid gap-100 auto-rows-min" }, h("mds-text", { typography: 'h4' }, "First Blood"), h("mds-text", null, "Vietnam veteran and drifter John J. Rambo (Sylvester Stallone) wanders into a small Washington town in search of an old friend, but is met with intolerance and brutality by the local sheriff, Will Teasle (Brian Dennehy). When Teasle and his deputies restrain and shave Rambo, he flashes back to his time as a prisoner of war and unleashes his fury on the officers. He narrowly escapes the manhunt, but it will take his former commander (Richard Crenna) to save the hunters from the hunted."))), h("div", { slot: "content", class: "py-600 px-200 grid tablet:grid-cols-[1fr_2fr] gap-600" }, h("div", { class: "auto-rows-min grid gap-200" }, h("mds-img", { class: "rounded-lg", src: './movie-double-impact.jpg' }), h("mds-img", { class: "rounded-lg", src: './movie-double-impact-shot-01.jpg' }), h("mds-img", { class: "rounded-lg", src: './movie-double-impact-shot-02.jpg' })), h("div", { class: "grid gap-100 auto-rows-min" }, h("mds-text", { typography: 'h4' }, "Double Impact"), h("mds-text", null, "Nearly 25 years after seeing his father killed by Hong Kong crime boss Raymond Zhang (Philip Chan Yan Kin), Chad Wagner (Jean-Claude Van Damme) is living in Los Angeles as a flourishing yet peaceful martial arts trainer. But Chad has a twin brother, Alex (also Van Damme), who suddenly reunites with his less-aggressive sibling and wants to avenge their father's death. As the pair plan their payback against Zhang, they also struggle to overcome their personal differences."))), h("div", { slot: "content", class: "py-600 px-200 grid tablet:grid-cols-[1fr_2fr] gap-600" }, h("div", { class: "auto-rows-min grid gap-200" }, h("mds-img", { class: "rounded-lg", src: './movie-the-third-man.jpg' }), h("mds-img", { class: "rounded-lg", src: './movie-the-third-man-shot.jpg' })), h("div", { class: "grid gap-100 auto-rows-min" }, h("mds-text", { typography: 'h4' }, "The Third Man"), h("mds-text", null, "Set in postwar Vienna, Austria, \"The Third Man\" stars Joseph Cotten as Holly Martins, a writer of pulp Westerns, who arrives penniless as a guest of his childhood chum Harry Lime (Orson Welles), only to find him dead. Martins develops a conspiracy theory after learning of a \"third man\" present at the time of Harry's death, running into interference from British officer Maj. Calloway (Trevor Howard) and falling head-over-heels for Harry's grief-stricken lover, Anna (Alida Valli).")))), h("mds-hr", null), h("div", { class: "grid gap-100" }, h("mds-text", { typography: 'h3' }, "Bottom content"), h("mds-text", null, "This content is outside the mds-tab component.")));
@@ -34,3 +39,4 @@ ShowScrollbar.args = {
34
39
  scrollbar: true,
35
40
  };
36
41
  export const NoSelectedItem = TemplateNoSelected.bind({});
42
+ export const Scroll = TemplateScroll.bind({});