@limetech/lime-elements 37.62.3 → 37.63.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 (86) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js +1 -1
  3. package/dist/cjs/limel-breadcrumbs_5.cjs.entry.js.map +1 -1
  4. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-collapsible-section.cjs.entry.js.map +1 -1
  6. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-dynamic-label_4.cjs.entry.js.map +1 -1
  8. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-file.cjs.entry.js.map +1 -1
  10. package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
  12. package/dist/cjs/limel-popover_2.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-popover_2.cjs.entry.js.map +1 -1
  14. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +5 -0
  15. package/dist/collection/components/badge/badge.css +5 -0
  16. package/dist/collection/components/breadcrumbs/breadcrumbs.css +5 -0
  17. package/dist/collection/components/button/button.css +5 -0
  18. package/dist/collection/components/button-group/button-group.css +5 -0
  19. package/dist/collection/components/checkbox/checkbox.css +5 -0
  20. package/dist/collection/components/chip/chip.css +5 -0
  21. package/dist/collection/components/chip-set/chip-set.css +10 -0
  22. package/dist/collection/components/circular-progress/circular-progress.css +5 -0
  23. package/dist/collection/components/code-editor/code-editor.css +5 -0
  24. package/dist/collection/components/collapsible-section/collapsible-section.css +8 -3
  25. package/dist/collection/components/color-picker/color-picker-palette.css +10 -0
  26. package/dist/collection/components/color-picker/color-picker.css +5 -0
  27. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +5 -0
  28. package/dist/collection/components/dialog/dialog.css +5 -0
  29. package/dist/collection/components/dock/dock-button/dock-button.css +5 -0
  30. package/dist/collection/components/dock/dock.css +5 -0
  31. package/dist/collection/components/dynamic-label/dynamic-label.css +5 -0
  32. package/dist/collection/components/file/file.css +62 -3
  33. package/dist/collection/components/file-viewer/file-viewer.css +5 -0
  34. package/dist/collection/components/form/form.css +5 -0
  35. package/dist/collection/components/header/header.css +5 -0
  36. package/dist/collection/components/help/help.css +5 -0
  37. package/dist/collection/components/help/limel-help-content.css +5 -0
  38. package/dist/collection/components/icon-button/icon-button.css +5 -0
  39. package/dist/collection/components/info-tile/info-tile.css +5 -0
  40. package/dist/collection/components/input-field/input-field.css +5 -0
  41. package/dist/collection/components/list/list.css +82 -3
  42. package/dist/collection/components/markdown/markdown.css +5 -0
  43. package/dist/collection/components/menu-list/menu-list.css +82 -3
  44. package/dist/collection/components/popover-surface/popover-surface.css +6 -1
  45. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +5 -0
  46. package/dist/collection/components/select/select.css +10 -0
  47. package/dist/collection/components/shortcut/shortcut.css +5 -0
  48. package/dist/collection/components/slider/slider.css +5 -0
  49. package/dist/collection/components/split-button/split-button.css +5 -0
  50. package/dist/collection/components/switch/switch.css +5 -0
  51. package/dist/collection/components/table/table.css +20 -0
  52. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +5 -0
  53. package/dist/collection/components/text-editor/text-editor.css +5 -0
  54. package/dist/collection/style/mixins.scss +13 -0
  55. package/dist/esm/limel-breadcrumbs_5.entry.js +1 -1
  56. package/dist/esm/limel-breadcrumbs_5.entry.js.map +1 -1
  57. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  58. package/dist/esm/limel-collapsible-section.entry.js.map +1 -1
  59. package/dist/esm/limel-dynamic-label_4.entry.js +1 -1
  60. package/dist/esm/limel-dynamic-label_4.entry.js.map +1 -1
  61. package/dist/esm/limel-file.entry.js +1 -1
  62. package/dist/esm/limel-file.entry.js.map +1 -1
  63. package/dist/esm/limel-info-tile.entry.js +1 -1
  64. package/dist/esm/limel-info-tile.entry.js.map +1 -1
  65. package/dist/esm/limel-popover_2.entry.js +1 -1
  66. package/dist/esm/limel-popover_2.entry.js.map +1 -1
  67. package/dist/lime-elements/lime-elements.esm.js +1 -1
  68. package/dist/lime-elements/{p-768dc020.entry.js → p-00e3e9be.entry.js} +2 -2
  69. package/dist/lime-elements/p-00e3e9be.entry.js.map +1 -0
  70. package/dist/lime-elements/p-03eea223.entry.js +2 -0
  71. package/dist/lime-elements/p-03eea223.entry.js.map +1 -0
  72. package/dist/lime-elements/{p-b334b138.entry.js → p-126ed7d5.entry.js} +2 -2
  73. package/dist/lime-elements/{p-b334b138.entry.js.map → p-126ed7d5.entry.js.map} +1 -1
  74. package/dist/lime-elements/p-7d215789.entry.js +2 -0
  75. package/dist/lime-elements/{p-b852d3f5.entry.js.map → p-7d215789.entry.js.map} +1 -1
  76. package/dist/lime-elements/{p-53fc6f0e.entry.js → p-c9598cfe.entry.js} +2 -2
  77. package/dist/lime-elements/{p-53fc6f0e.entry.js.map → p-c9598cfe.entry.js.map} +1 -1
  78. package/dist/lime-elements/{p-502b4476.entry.js → p-d86f8aea.entry.js} +2 -2
  79. package/dist/lime-elements/{p-502b4476.entry.js.map → p-d86f8aea.entry.js.map} +1 -1
  80. package/dist/lime-elements/style/mixins.scss +13 -0
  81. package/dist/scss/mixins.scss +13 -0
  82. package/package.json +5 -5
  83. package/dist/lime-elements/p-768dc020.entry.js.map +0 -1
  84. package/dist/lime-elements/p-889b4ae4.entry.js +0 -2
  85. package/dist/lime-elements/p-889b4ae4.entry.js.map +0 -1
  86. package/dist/lime-elements/p-b852d3f5.entry.js +0 -2
@@ -1 +1 @@
1
- {"file":"limel-popover.limel-popover-surface.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;SAWgB,cAAc,CAC1B,OAAoB,EACpB,KAAkB;;EAElB,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KA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AM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CACtD,wBAAwB,CAC3B,CAAC;IAEF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK;MAC7C,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE;QAC1B,OAAO;OACV;MAED,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KACtC,CAAC,CAAC;GACN;;;;;;;;","names":["ESCAPE","createRandomString","h","zipObject"],"sources":["./src/components/portal/contains.ts","./src/components/popover/popover.scss?tag=limel-popover&encapsulation=shadow","./src/components/popover/popover.tsx","./src/components/popover-surface/popover-surface.scss?tag=limel-popover-surface&encapsulation=shadow","./src/components/popover-surface/popover-surface.tsx"],"sourcesContent":["/**\n * Check if an element is a descendant of another\n *\n * If the child element is a descendant of a limel-portal, this function will\n * go back through the portal and check the original tree recursively\n *\n * @param element - the parent element\n * @param child - the child element to check\n * @returns `true` if child is a descendant of element, taking\n * portals into account\n */\nexport function portalContains(\n element: HTMLElement,\n child: HTMLElement,\n): boolean {\n if (element.contains(child) || element.shadowRoot?.contains(child)) {\n return true;\n }\n\n const parent = findParent(child);\n if (!parent) {\n return false;\n }\n\n return portalContains(element, parent);\n}\n\nfunction findParent(element: HTMLElement) {\n const portal: any = element.closest('.limel-portal--container');\n if (portal) {\n return portal.portalSource;\n }\n\n const rootNode = element.getRootNode() as ShadowRoot;\n\n return rootNode.host;\n}\n","/**\n * @prop --popover-surface-width: Width of the popover surface. defaults to `auto`\n * @prop --popover-body-background-color: Background color of popover body, defaults to `--lime-elevated-surface-background-color`.\n * @prop --popover-border-radius: Border radius of popover, defaults to `0.75rem`.\n * @prop --popover-z-index: z-index of the popover.\n */\n\n.trigger-anchor {\n display: inline-block;\n position: relative;\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\nimport { zipObject } from 'lodash-es';\nimport { portalContains } from '../portal/contains';\nimport { ESCAPE } from '../../util/keycodes';\nimport { OpenDirection } from '../menu/menu.types';\n\n/**\n * A popover is an impermanent layer that is displayed on top of other content\n * when user taps an element that triggers the popover. This element can be\n * practically anything, a button, piece of text, and icon, etc.\n *\n * Popovers are nonmodal, thus they don't have a semi-transparent backdrop layer\n * that darkens the content below them. Also for the same reason, they can be\n * dismissed by tapping or clicking another part of the screen, but not by a\n * clicking a button or link on the popover itself.\n *\n * ## Usage\n * Use a popover to show **options** or **information** related to the trigger\n * onscreen. A typical use case for popovers is a tooltip, in which you show\n * help text or contextual information to users.\n *\n * Popovers are most appropriate on larger screens but can be used on smaller\n * screens too, as long as their content is responsive and takes into account\n * the context they are displayed on.\n *\n * When a popover is displayed, interactions with other controls are blocked,\n * until user dismisses the popover.\n *\n *\n * ## Layout\n * Popovers has only one slot in which you can import a custom web-component.\n *\n * :::note\n * You must make sure that web-components that you import into the slot has\n * a `width: 100%;` style so that it can horizontally stretch across the popover.\n *\n * However, `width` of the popover can be controlled by specifying a CSS variable\n * of `--popover-surface-width`. If you don't specify any width, the popover\n * will grow as wide as its content.\n * :::\n *\n * :::important\n * Do not make a popover too big. They should never take over the entire screen.\n * If your content is that big, you should probably be using a Modal instead.\n * :::\n *\n * @slot - Content to put inside the surface\n * @exampleComponent limel-example-popover-basic\n * @exampleComponent limel-example-popover-trigger-interaction\n */\n@Component({\n tag: 'limel-popover',\n shadow: true,\n styleUrl: 'popover.scss',\n})\nexport class Popover {\n /**\n * True if the content within the popover should be visible\n */\n @Prop()\n public open = false;\n\n /**\n * Decides the popover's location in relation to its trigger\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection;\n\n /**\n * Emits an event when the component is closing\n */\n @Event()\n private close: EventEmitter<void>;\n\n @Element()\n private host: HTMLLimelPopoverElement;\n\n private portalId: string;\n\n constructor() {\n this.portalId = createRandomString();\n this.globalClickListener = this.globalClickListener.bind(this);\n }\n\n @Watch('open')\n protected watchOpen() {\n this.setupGlobalHandlers();\n }\n\n public componentWillLoad() {\n this.setupGlobalHandlers();\n }\n\n public componentDidRender() {\n const slotElement = this.host.shadowRoot.querySelector('slot');\n slotElement.assignedElements().forEach(this.setTriggerAttributes);\n }\n\n private setupGlobalHandlers() {\n if (this.open) {\n document.addEventListener('click', this.globalClickListener, {\n capture: true,\n });\n document.addEventListener('keyup', this.handleGlobalKeyPress);\n } else {\n document.removeEventListener('click', this.globalClickListener);\n document.removeEventListener('keyup', this.handleGlobalKeyPress);\n }\n }\n\n public render() {\n const cssProperties = this.getCssProperties();\n const popoverZIndex = getComputedStyle(this.host).getPropertyValue(\n '--popover-z-index',\n );\n\n return (\n <div class=\"trigger-anchor\">\n <slot name=\"trigger\" />\n <limel-portal\n visible={this.open}\n containerId={this.portalId}\n containerStyle={{ 'z-index': popoverZIndex }}\n openDirection={this.openDirection}\n >\n <limel-popover-surface\n contentCollection={this.host.children}\n style={cssProperties}\n />\n </limel-portal>\n </div>\n );\n }\n\n private globalClickListener(event: MouseEvent) {\n const element: HTMLElement = event.target as HTMLElement;\n const clickedInside = portalContains(this.host, element);\n if (this.open && !clickedInside) {\n event.stopPropagation();\n event.preventDefault();\n this.close.emit();\n }\n }\n\n private getCssProperties() {\n const propertyNames = [\n '--popover-surface-width',\n '--popover-body-background-color',\n '--popover-border-radius',\n ];\n const style = getComputedStyle(this.host);\n const values = propertyNames.map((property) => {\n return style.getPropertyValue(property);\n });\n\n return zipObject(propertyNames, values);\n }\n\n private handleGlobalKeyPress = (event: KeyboardEvent) => {\n if (event.key !== ESCAPE) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n this.close.emit();\n };\n\n private setTriggerAttributes = (element: HTMLElement) => {\n const attributes = {\n 'aria-haspopup': true,\n 'aria-expanded': this.open,\n 'aria-controls': this.portalId,\n role: 'button',\n };\n\n for (const [key, value] of Object.entries(attributes)) {\n if (!value) {\n element.removeAttribute(key);\n } else {\n element.setAttribute(key, String(value));\n }\n }\n };\n}\n","@use '../../style/functions';\n@use '../../style/mixins';\n\n:host(limel-popover-surface) {\n isolation: isolate;\n\n position: relative;\n display: flex;\n\n width: var(--popover-surface-width, auto);\n max-height: inherit; // inherits it from the dynamically calculated `max-height` of `limel-portal--container`\n max-width: calc(100vw - 2rem);\n margin: 0 0.25rem;\n}\n\n.limel-popover-surface {\n flex: 1;\n min-width: 0;\n min-height: 0;\n border-radius: var(--popover-border-radius, functions.pxToRem(12));\n box-shadow: var(--shadow-depth-16);\n\n backdrop-filter: blur(functions.pxToRem(5));\n -webkit-backdrop-filter: blur(functions.pxToRem(5));\n\n &:after {\n // allows using `--popover-body-background-color` while\n // getting the blurred backdrop effect\n transition: opacity 0.4s ease;\n pointer-events: none;\n\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n\n opacity: 0.75;\n\n border-radius: var(--popover-border-radius, functions.pxToRem(12));\n background-color: var(\n --popover-body-background-color,\n var(--lime-elevated-surface-background-color)\n );\n }\n\n @include mixins.visualize-keyboard-focus;\n\n &:focus,\n &:focus-within {\n &:after {\n opacity: 1;\n }\n }\n\n & > * {\n // this fixes some unwanted layout issues\n // which might be very hard for consumers to realize\n // and fix by themselves. Without this code,\n // if the consumer sets for example paddings in\n // what they send to the popover, their element\n // can grow larger than the popover surface\n box-sizing: border-box;\n }\n}\n","import { Component, h, Prop, Element } from '@stencil/core';\n\n/**\n * @slot - Content to put inside the surface\n * @private\n */\n\n@Component({\n tag: 'limel-popover-surface',\n shadow: true,\n styleUrl: 'popover-surface.scss',\n})\nexport class PopoverSurface {\n /**\n * Content to render\n */\n @Prop()\n public contentCollection: HTMLCollection;\n\n @Element()\n private host: HTMLLimelPopoverSurfaceElement;\n\n public componentDidLoad() {\n this.appendElement();\n }\n\n public render() {\n return <div class=\"limel-popover-surface\" tabindex=\"0\" />;\n }\n\n private appendElement() {\n const portalContainer = this.host.shadowRoot.querySelector(\n '.limel-popover-surface',\n );\n\n Array.from(this.contentCollection).forEach((child) => {\n if (child.slot === 'trigger') {\n return;\n }\n\n portalContainer.appendChild(child);\n });\n }\n}\n"],"version":3}
1
+ {"file":"limel-popover.limel-popover-surface.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;SAWgB,cAAc,CAC1B,OAAoB,EACpB,KAAkB;;EAElB,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAI,MAAA,OAAO,CAAC,UAAU,0CAAE,QAAQ,CAAC,KAAK,CAAC,CAAA,EAAE;IAChE,OAAO,IAAI,CAAC;GACf;EAED,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;EACjC,IAAI,CAAC,MAAM,EAAE;IACT,OAAO,KAAK,CAAC;GAChB;EAED,OAAO,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,UAAU,CAAC,OAAoB;EACpC,MAAM,MAAM,GAAQ,OAAO,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;EAChE,IAAI,MAAM,EAAE;IACR,OAAO,MAAM,CAAC,YAAY,CAAC;GAC9B;EAED,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,EAAgB,CAAC;EAErD,OAAO,QAAQ,CAAC,IAAI,CAAC;AACzB;;ACpCA,MAAM,UAAU,GAAG,yDAAyD;;MCgE/D,OAAO;EAwBhB;;;IA+EQ,yBAAoB,GAAG,CAAC,KAAoB;MAChD,IAAI,KAAK,CAAC,GAAG,KAAKA,eAAM,EAAE;QACtB,OAAO;OACV;MAED,KAAK,CAAC,eAAe,EAAE,CAAC;MACxB,KAAK,CAAC,cAAc,EAAE,CAAC;MACvB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;KACrB,CAAC;IAEM,yBAAoB,GAAG,CAAC,OAAoB;MAChD,MAAM,UAAU,GAAG;QACf,eAAe,EAAE,IAAI;QACrB,eAAe,EAAE,IAAI,CAAC,IA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,aAAa,EAAE,MAAM,CAAC,CAAC;GAC3C;;;;;;;;ACrKL,MAAM,iBAAiB,GAAG,y+BAAy+B;;MCYt/B,cAAc;;;;;EAUhB,gBAAgB;IACnB,IAAI,CAAC,aAAa,EAAE,CAAC;GACxB;EAEM,MAAM;IACT,OAAOD,iBAAK,KAAK,EAAC,uBAAuB,EAAC,QAAQ,EAAC,GAAG,GAAG,CAAC;GAC7D;EAEO,aAAa;IACjB,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CACtD,wBAAwB,CAC3B,CAAC;IAEF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK;MAC7C,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE;QAC1B,OAAO;OACV;MAED,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KACtC,CAAC,CAAC;GACN;;;;;;;;","names":["ESCAPE","createRandomString","h","zipObject"],"sources":["./src/components/portal/contains.ts","./src/components/popover/popover.scss?tag=limel-popover&encapsulation=shadow","./src/components/popover/popover.tsx","./src/components/popover-surface/popover-surface.scss?tag=limel-popover-surface&encapsulation=shadow","./src/components/popover-surface/popover-surface.tsx"],"sourcesContent":["/**\n * Check if an element is a descendant of another\n *\n * If the child element is a descendant of a limel-portal, this function will\n * go back through the portal and check the original tree recursively\n *\n * @param element - the parent element\n * @param child - the child element to check\n * @returns `true` if child is a descendant of element, taking\n * portals into account\n */\nexport function portalContains(\n element: HTMLElement,\n child: HTMLElement,\n): boolean {\n if (element.contains(child) || element.shadowRoot?.contains(child)) {\n return true;\n }\n\n const parent = findParent(child);\n if (!parent) {\n return false;\n }\n\n return portalContains(element, parent);\n}\n\nfunction findParent(element: HTMLElement) {\n const portal: any = element.closest('.limel-portal--container');\n if (portal) {\n return portal.portalSource;\n }\n\n const rootNode = element.getRootNode() as ShadowRoot;\n\n return rootNode.host;\n}\n","/**\n * @prop --popover-surface-width: Width of the popover surface. defaults to `auto`\n * @prop --popover-body-background-color: Background color of popover body, defaults to `--lime-elevated-surface-background-color`.\n * @prop --popover-border-radius: Border radius of popover, defaults to `0.75rem`.\n * @prop --popover-z-index: z-index of the popover.\n */\n\n.trigger-anchor {\n display: inline-block;\n position: relative;\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Watch,\n} from '@stencil/core';\nimport { createRandomString } from '../../util/random-string';\nimport { zipObject } from 'lodash-es';\nimport { portalContains } from '../portal/contains';\nimport { ESCAPE } from '../../util/keycodes';\nimport { OpenDirection } from '../menu/menu.types';\n\n/**\n * A popover is an impermanent layer that is displayed on top of other content\n * when user taps an element that triggers the popover. This element can be\n * practically anything, a button, piece of text, and icon, etc.\n *\n * Popovers are nonmodal, thus they don't have a semi-transparent backdrop layer\n * that darkens the content below them. Also for the same reason, they can be\n * dismissed by tapping or clicking another part of the screen, but not by a\n * clicking a button or link on the popover itself.\n *\n * ## Usage\n * Use a popover to show **options** or **information** related to the trigger\n * onscreen. A typical use case for popovers is a tooltip, in which you show\n * help text or contextual information to users.\n *\n * Popovers are most appropriate on larger screens but can be used on smaller\n * screens too, as long as their content is responsive and takes into account\n * the context they are displayed on.\n *\n * When a popover is displayed, interactions with other controls are blocked,\n * until user dismisses the popover.\n *\n *\n * ## Layout\n * Popovers has only one slot in which you can import a custom web-component.\n *\n * :::note\n * You must make sure that web-components that you import into the slot has\n * a `width: 100%;` style so that it can horizontally stretch across the popover.\n *\n * However, `width` of the popover can be controlled by specifying a CSS variable\n * of `--popover-surface-width`. If you don't specify any width, the popover\n * will grow as wide as its content.\n * :::\n *\n * :::important\n * Do not make a popover too big. They should never take over the entire screen.\n * If your content is that big, you should probably be using a Modal instead.\n * :::\n *\n * @slot - Content to put inside the surface\n * @exampleComponent limel-example-popover-basic\n * @exampleComponent limel-example-popover-trigger-interaction\n */\n@Component({\n tag: 'limel-popover',\n shadow: true,\n styleUrl: 'popover.scss',\n})\nexport class Popover {\n /**\n * True if the content within the popover should be visible\n */\n @Prop()\n public open = false;\n\n /**\n * Decides the popover's location in relation to its trigger\n */\n @Prop({ reflect: true })\n public openDirection: OpenDirection;\n\n /**\n * Emits an event when the component is closing\n */\n @Event()\n private close: EventEmitter<void>;\n\n @Element()\n private host: HTMLLimelPopoverElement;\n\n private portalId: string;\n\n constructor() {\n this.portalId = createRandomString();\n this.globalClickListener = this.globalClickListener.bind(this);\n }\n\n @Watch('open')\n protected watchOpen() {\n this.setupGlobalHandlers();\n }\n\n public componentWillLoad() {\n this.setupGlobalHandlers();\n }\n\n public componentDidRender() {\n const slotElement = this.host.shadowRoot.querySelector('slot');\n slotElement.assignedElements().forEach(this.setTriggerAttributes);\n }\n\n private setupGlobalHandlers() {\n if (this.open) {\n document.addEventListener('click', this.globalClickListener, {\n capture: true,\n });\n document.addEventListener('keyup', this.handleGlobalKeyPress);\n } else {\n document.removeEventListener('click', this.globalClickListener);\n document.removeEventListener('keyup', this.handleGlobalKeyPress);\n }\n }\n\n public render() {\n const cssProperties = this.getCssProperties();\n const popoverZIndex = getComputedStyle(this.host).getPropertyValue(\n '--popover-z-index',\n );\n\n return (\n <div class=\"trigger-anchor\">\n <slot name=\"trigger\" />\n <limel-portal\n visible={this.open}\n containerId={this.portalId}\n containerStyle={{ 'z-index': popoverZIndex }}\n openDirection={this.openDirection}\n >\n <limel-popover-surface\n contentCollection={this.host.children}\n style={cssProperties}\n />\n </limel-portal>\n </div>\n );\n }\n\n private globalClickListener(event: MouseEvent) {\n const element: HTMLElement = event.target as HTMLElement;\n const clickedInside = portalContains(this.host, element);\n if (this.open && !clickedInside) {\n event.stopPropagation();\n event.preventDefault();\n this.close.emit();\n }\n }\n\n private getCssProperties() {\n const propertyNames = [\n '--popover-surface-width',\n '--popover-body-background-color',\n '--popover-border-radius',\n ];\n const style = getComputedStyle(this.host);\n const values = propertyNames.map((property) => {\n return style.getPropertyValue(property);\n });\n\n return zipObject(propertyNames, values);\n }\n\n private handleGlobalKeyPress = (event: KeyboardEvent) => {\n if (event.key !== ESCAPE) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n this.close.emit();\n };\n\n private setTriggerAttributes = (element: HTMLElement) => {\n const attributes = {\n 'aria-haspopup': true,\n 'aria-expanded': this.open,\n 'aria-controls': this.portalId,\n role: 'button',\n };\n\n for (const [key, value] of Object.entries(attributes)) {\n if (!value) {\n element.removeAttribute(key);\n } else {\n element.setAttribute(key, String(value));\n }\n }\n };\n}\n","@use '../../style/functions';\n@use '../../style/mixins';\n\n:host(limel-popover-surface) {\n isolation: isolate;\n\n position: relative;\n display: flex;\n\n width: var(--popover-surface-width, auto);\n max-height: inherit; // inherits it from the dynamically calculated `max-height` of `limel-portal--container`\n max-width: calc(100vw - 2rem);\n margin: 0 0.25rem;\n}\n\n.limel-popover-surface {\n flex: 1;\n min-width: 0;\n min-height: 0;\n border-radius: var(--popover-border-radius, functions.pxToRem(12));\n box-shadow: var(--shadow-depth-16);\n\n backdrop-filter: blur(functions.pxToRem(5));\n -webkit-backdrop-filter: blur(functions.pxToRem(5));\n\n &:after {\n // allows using `--popover-body-background-color` while\n // getting the blurred backdrop effect\n transition: opacity 0.4s ease;\n pointer-events: none;\n\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n\n opacity: 0.95; //temperary change due to not supporting `backdrop-filter` in Chromium browsers\n\n border-radius: var(--popover-border-radius, functions.pxToRem(12));\n background-color: var(\n --popover-body-background-color,\n var(--lime-elevated-surface-background-color)\n );\n }\n\n @include mixins.visualize-keyboard-focus;\n\n &:focus,\n &:focus-within {\n &:after {\n opacity: 1;\n }\n }\n\n & > * {\n // this fixes some unwanted layout issues\n // which might be very hard for consumers to realize\n // and fix by themselves. Without this code,\n // if the consumer sets for example paddings in\n // what they send to the popover, their element\n // can grow larger than the popover surface\n box-sizing: border-box;\n }\n}\n","import { Component, h, Prop, Element } from '@stencil/core';\n\n/**\n * @slot - Content to put inside the surface\n * @private\n */\n\n@Component({\n tag: 'limel-popover-surface',\n shadow: true,\n styleUrl: 'popover-surface.scss',\n})\nexport class PopoverSurface {\n /**\n * Content to render\n */\n @Prop()\n public contentCollection: HTMLCollection;\n\n @Element()\n private host: HTMLLimelPopoverSurfaceElement;\n\n public componentDidLoad() {\n this.appendElement();\n }\n\n public render() {\n return <div class=\"limel-popover-surface\" tabindex=\"0\" />;\n }\n\n private appendElement() {\n const portalContainer = this.host.shadowRoot.querySelector(\n '.limel-popover-surface',\n );\n\n Array.from(this.contentCollection).forEach((child) => {\n if (child.slot === 'trigger') {\n return;\n }\n\n portalContainer.appendChild(child);\n });\n }\n}\n"],"version":3}
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  /*
56
61
  * This file is imported into every component!
57
62
  *
@@ -118,6 +118,11 @@
118
118
  * 2. the CSS variables of `--kompendium-example-font-family`
119
119
  * in the `<style>` tag of `index.html`.
120
120
  */
121
+ /**
122
+ * This mixin is a hack, using old CSS syntax
123
+ * to enable you to truncate a piece of text,
124
+ * after a certain number of lines.
125
+ */
121
126
  /**
122
127
  * @prop --badge-background-color: badge background color
123
128
  * @prop --badge-text-color: badge text color
@@ -53,6 +53,11 @@
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
55
  /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
60
+ /**
56
61
  * @prop --breadcrumbs-item-text-color: Text color of breadcrumbs items, defaults to `--contrast-1100`.
57
62
  * @prop --breadcrumbs-item-max-width: Maximum width of a button in the breadcrumbs. Defaults to `10rem`. Keep in mind that the buttons should not appear too big.
58
63
  */
@@ -58,6 +58,11 @@
58
58
  * 2. the CSS variables of `--kompendium-example-font-family`
59
59
  * in the `<style>` tag of `index.html`.
60
60
  */
61
+ /**
62
+ * This mixin is a hack, using old CSS syntax
63
+ * to enable you to truncate a piece of text,
64
+ * after a certain number of lines.
65
+ */
61
66
  /*
62
67
  * This file is imported into every component that uses MDC!
63
68
  *
@@ -118,6 +118,11 @@
118
118
  * 2. the CSS variables of `--kompendium-example-font-family`
119
119
  * in the `<style>` tag of `index.html`.
120
120
  */
121
+ /**
122
+ * This mixin is a hack, using old CSS syntax
123
+ * to enable you to truncate a piece of text,
124
+ * after a certain number of lines.
125
+ */
121
126
  .mdc-touch-target-wrapper {
122
127
  display: inline;
123
128
  }
@@ -872,6 +872,11 @@
872
872
  * 2. the CSS variables of `--kompendium-example-font-family`
873
873
  * in the `<style>` tag of `index.html`.
874
874
  */
875
+ /**
876
+ * This mixin is a hack, using old CSS syntax
877
+ * to enable you to truncate a piece of text,
878
+ * after a certain number of lines.
879
+ */
875
880
  :host(limel-checkbox:focus),
876
881
  :host(limel-checkbox:focus-visible),
877
882
  :host(limel-checkbox:focus-within),
@@ -53,6 +53,11 @@
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
55
  /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
60
+ /**
56
61
  * @prop --chip-max-width: Maximum width of the chip. Defaults to `10rem`. Keep in mind that the chips should not appear too big.
57
62
  * @prop --chip-progress-color: Color of the progress bar. Defaults to `rgb(var(--contrast-700))`.
58
63
  */
@@ -118,6 +118,11 @@
118
118
  * 2. the CSS variables of `--kompendium-example-font-family`
119
119
  * in the `<style>` tag of `index.html`.
120
120
  */
121
+ /**
122
+ * This mixin is a hack, using old CSS syntax
123
+ * to enable you to truncate a piece of text,
124
+ * after a certain number of lines.
125
+ */
121
126
  .mdc-notched-outline {
122
127
  display: flex;
123
128
  position: absolute;
@@ -2183,6 +2188,11 @@ limel-chip.can-be-removed {
2183
2188
  * 2. the CSS variables of `--kompendium-example-font-family`
2184
2189
  * in the `<style>` tag of `index.html`.
2185
2190
  */
2191
+ /**
2192
+ * This mixin is a hack, using old CSS syntax
2193
+ * to enable you to truncate a piece of text,
2194
+ * after a certain number of lines.
2195
+ */
2186
2196
  :host(limel-chip-set:focus),
2187
2197
  :host(limel-chip-set:focus-visible),
2188
2198
  :host(limel-chip-set:focus-within),
@@ -58,6 +58,11 @@
58
58
  * 2. the CSS variables of `--kompendium-example-font-family`
59
59
  * in the `<style>` tag of `index.html`.
60
60
  */
61
+ /**
62
+ * This mixin is a hack, using old CSS syntax
63
+ * to enable you to truncate a piece of text,
64
+ * after a certain number of lines.
65
+ */
61
66
  /*
62
67
  * This file is imported into every component that uses MDC!
63
68
  *
@@ -498,6 +498,11 @@ span.CodeMirror-selectedtext { background: none; }
498
498
  * 2. the CSS variables of `--kompendium-example-font-family`
499
499
  * in the `<style>` tag of `index.html`.
500
500
  */
501
+ /**
502
+ * This mixin is a hack, using old CSS syntax
503
+ * to enable you to truncate a piece of text,
504
+ * after a certain number of lines.
505
+ */
501
506
  /**
502
507
  * @prop --code-editor-max-height: Defines how tall the code editor can get before content becomes scrollable, defaults to `10rem`.
503
508
  * @prop --code-editor-font-size: Defines the font size of the code, defaults to `0.8125rem`.
@@ -118,6 +118,11 @@
118
118
  * 2. the CSS variables of `--kompendium-example-font-family`
119
119
  * in the `<style>` tag of `index.html`.
120
120
  */
121
+ /**
122
+ * This mixin is a hack, using old CSS syntax
123
+ * to enable you to truncate a piece of text,
124
+ * after a certain number of lines.
125
+ */
121
126
  /**
122
127
  * @prop --closed-header-background-color: background color for header when closed
123
128
  * @prop --open-header-background-color: background color for header when open
@@ -189,11 +194,11 @@ header {
189
194
  height: auto;
190
195
  max-height: 3rem;
191
196
  line-height: 1.2rem;
192
- white-space: normal;
193
197
  display: -webkit-box;
194
- -webkit-line-clamp: 2;
195
- -webkit-box-orient: vertical;
196
198
  overflow: hidden;
199
+ white-space: normal;
200
+ -webkit-box-orient: vertical;
201
+ -webkit-line-clamp: 2;
197
202
  }
198
203
 
199
204
  .divider-line {
@@ -604,6 +604,11 @@
604
604
  * 2. the CSS variables of `--kompendium-example-font-family`
605
605
  * in the `<style>` tag of `index.html`.
606
606
  */
607
+ /**
608
+ * This mixin is a hack, using old CSS syntax
609
+ * to enable you to truncate a piece of text,
610
+ * after a certain number of lines.
611
+ */
607
612
  /**
608
613
  * Note! This file is exported to `dist/scss/` in the published
609
614
  * node module, for consumer projects to import.
@@ -657,6 +662,11 @@
657
662
  * 2. the CSS variables of `--kompendium-example-font-family`
658
663
  * in the `<style>` tag of `index.html`.
659
664
  */
665
+ /**
666
+ * This mixin is a hack, using old CSS syntax
667
+ * to enable you to truncate a piece of text,
668
+ * after a certain number of lines.
669
+ */
660
670
  /*
661
671
  * This file is imported into every component!
662
672
  *
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  /*
56
61
  * This file is imported into every component!
57
62
  *
@@ -118,6 +118,11 @@
118
118
  * 2. the CSS variables of `--kompendium-example-font-family`
119
119
  * in the `<style>` tag of `index.html`.
120
120
  */
121
+ /**
122
+ * This mixin is a hack, using old CSS syntax
123
+ * to enable you to truncate a piece of text,
124
+ * after a certain number of lines.
125
+ */
121
126
  :root {
122
127
  --mdc-theme-primary: #26a69a;
123
128
  --mdc-theme-secondary: #575756;
@@ -58,6 +58,11 @@
58
58
  * 2. the CSS variables of `--kompendium-example-font-family`
59
59
  * in the `<style>` tag of `index.html`.
60
60
  */
61
+ /**
62
+ * This mixin is a hack, using old CSS syntax
63
+ * to enable you to truncate a piece of text,
64
+ * after a certain number of lines.
65
+ */
61
66
  /*
62
67
  * This file is imported into every component that uses MDC!
63
68
  *
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  /*
56
61
  * This file is imported into every component!
57
62
  *
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  /*
56
61
  * This file is imported into every component!
57
62
  *
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  * {
56
61
  box-sizing: border-box;
57
62
  min-width: 0;
@@ -1,3 +1,62 @@
1
+ @charset "UTF-8";
2
+ /**
3
+ * Note! This file is exported to `dist/scss/` in the published
4
+ * node module, for consumer projects to import.
5
+ * That means this file cannot import from any file that isn't
6
+ * also exported, keeping the same relative path.
7
+ *
8
+ * Or, just don't import anything, that works too.
9
+ */
10
+ /**
11
+ * This can be used on a trigger element that opens a dropdown menu or a popover.
12
+ */
13
+ /**
14
+ * This mixin will mask out the content that is close to
15
+ * the edges of a scrollable area.
16
+ * - If the scrollable content has `overflow-y`, use `vertically`
17
+ * as an argument for `$direction`.
18
+ - If the scrollable content has `overflow-x`, use `horizontally`
19
+ * as an argument for `$direction`.
20
+ *
21
+ * For the visual effect to work smoothly, we need to make sure that
22
+ * the size of the fade-out edge effect is the same as the
23
+ * internal paddings of the scrollable area. Otherwise, content of a
24
+ * scrollable area that does not have a padding will fade out before
25
+ * any scrolling has been done.
26
+ * This is why this mixin already adds paddings, which automatically
27
+ * default to the size of the fade-out effect.
28
+ * This size defaults to `1rem`, but to override the size use
29
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
30
+ * when `vertically` argument is set, and use
31
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
32
+ * when `horizontally` argument is set.
33
+ * Of course you can also programmatically increase and decrease the
34
+ * size of these variables for each edge, based on the amount of
35
+ * scrolling that has been done by the user. In this case, make sure
36
+ * to add a custom padding where the mixin is used, to override
37
+ * the paddings that are automatically added by the mixin in the
38
+ * compiled CSS code.
39
+ */
40
+ /**
41
+ * This mixin will add an animated underline to the bottom of an `a` elements.
42
+ * Note that you may need to add `all: unset;` –depending on your use case–
43
+ * before using this mixin.
44
+ */
45
+ /**
46
+ * This mixin creates a cross-browser font stack.
47
+ * - `sans-serif` can be used for the UI of the components.
48
+ * - `monospace` can be used for code.
49
+ *
50
+ * ⚠️ If we change the font stacks, we need to update
51
+ * 1. the consumer documentation in `README.md`, and
52
+ * 2. the CSS variables of `--kompendium-example-font-family`
53
+ * in the `<style>` tag of `index.html`.
54
+ */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
1
60
  /**
2
61
  * @prop --icon-background-color: Background color of the icon. Defaults to `--contrast-400`.
3
62
  * @prop --icon-color: Color of the icon. Defaults to `--contrast-1100`.
@@ -32,9 +91,9 @@
32
91
  height: auto;
33
92
  max-height: 3rem;
34
93
  line-height: 1;
35
- white-space: normal;
36
94
  display: -webkit-box;
37
- -webkit-line-clamp: 2;
38
- -webkit-box-orient: vertical;
39
95
  overflow: hidden;
96
+ white-space: normal;
97
+ -webkit-box-orient: vertical;
98
+ -webkit-line-clamp: 2;
40
99
  }
@@ -124,6 +124,11 @@
124
124
  * 2. the CSS variables of `--kompendium-example-font-family`
125
125
  * in the `<style>` tag of `index.html`.
126
126
  */
127
+ /**
128
+ * This mixin is a hack, using old CSS syntax
129
+ * to enable you to truncate a piece of text,
130
+ * after a certain number of lines.
131
+ */
127
132
  :host {
128
133
  isolation: isolate;
129
134
  position: relative;
@@ -697,6 +697,11 @@ limel-code-editor {
697
697
  * 2. the CSS variables of `--kompendium-example-font-family`
698
698
  * in the `<style>` tag of `index.html`.
699
699
  */
700
+ /**
701
+ * This mixin is a hack, using old CSS syntax
702
+ * to enable you to truncate a piece of text,
703
+ * after a certain number of lines.
704
+ */
700
705
  .limel-form-row--layout {
701
706
  --limel-form-row-border-radius: 0.375rem;
702
707
  --limel-form-row-icon-size: 1.75rem;
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  /*
56
61
  * This file is imported into every component!
57
62
  *
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  limel-popover {
56
61
  display: flex;
57
62
  --popover-surface-width: min(calc(100vw - 4rem), 22rem);
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  :host(limel-help-content) {
56
61
  display: flex;
57
62
  box-sizing: border-box;
@@ -52,6 +52,11 @@
52
52
  * 2. the CSS variables of `--kompendium-example-font-family`
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
+ /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
55
60
  /**
56
61
  * @prop --icon-background-color: Background color of the button.
57
62
  */
@@ -53,6 +53,11 @@
53
53
  * in the `<style>` tag of `index.html`.
54
54
  */
55
55
  /**
56
+ * This mixin is a hack, using old CSS syntax
57
+ * to enable you to truncate a piece of text,
58
+ * after a certain number of lines.
59
+ */
60
+ /**
56
61
  * @prop --info-tile-border-radius: defines the radius of corners of the info-tile. Defaults to `1rem`
57
62
  * @prop --info-tile-icon-color: defines the fill color of the info-tile icon. Defaults to `--contrast-1000`
58
63
  * @prop --info-tile-text-color: defines the color of the info-tile label. Defaults to `--contrast-1100`
@@ -118,6 +118,11 @@
118
118
  * 2. the CSS variables of `--kompendium-example-font-family`
119
119
  * in the `<style>` tag of `index.html`.
120
120
  */
121
+ /**
122
+ * This mixin is a hack, using old CSS syntax
123
+ * to enable you to truncate a piece of text,
124
+ * after a certain number of lines.
125
+ */
121
126
  .mdc-notched-outline {
122
127
  display: flex;
123
128
  position: absolute;
@@ -58,6 +58,11 @@
58
58
  * 2. the CSS variables of `--kompendium-example-font-family`
59
59
  * in the `<style>` tag of `index.html`.
60
60
  */
61
+ /**
62
+ * This mixin is a hack, using old CSS syntax
63
+ * to enable you to truncate a piece of text,
64
+ * after a certain number of lines.
65
+ */
61
66
  /*
62
67
  * This file is imported into every component that uses MDC!
63
68
  *
@@ -925,6 +930,11 @@
925
930
  * 2. the CSS variables of `--kompendium-example-font-family`
926
931
  * in the `<style>` tag of `index.html`.
927
932
  */
933
+ /**
934
+ * This mixin is a hack, using old CSS syntax
935
+ * to enable you to truncate a piece of text,
936
+ * after a certain number of lines.
937
+ */
928
938
  :host(limel-checkbox:focus),
929
939
  :host(limel-checkbox:focus-visible),
930
940
  :host(limel-checkbox:focus-within),
@@ -5374,6 +5384,11 @@ a.mdc-list-item {
5374
5384
  * 2. the CSS variables of `--kompendium-example-font-family`
5375
5385
  * in the `<style>` tag of `index.html`.
5376
5386
  */
5387
+ /**
5388
+ * This mixin is a hack, using old CSS syntax
5389
+ * to enable you to truncate a piece of text,
5390
+ * after a certain number of lines.
5391
+ */
5377
5392
  :host(limel-checkbox:focus),
5378
5393
  :host(limel-checkbox:focus-visible),
5379
5394
  :host(limel-checkbox:focus-within),
@@ -5885,6 +5900,11 @@ a.mdc-list-item {
5885
5900
  * 2. the CSS variables of `--kompendium-example-font-family`
5886
5901
  * in the `<style>` tag of `index.html`.
5887
5902
  */
5903
+ /**
5904
+ * This mixin is a hack, using old CSS syntax
5905
+ * to enable you to truncate a piece of text,
5906
+ * after a certain number of lines.
5907
+ */
5888
5908
  :host(.has-striped-rows) .mdc-deprecated-list {
5889
5909
  border: 1px solid rgb(var(--contrast-400));
5890
5910
  }
@@ -5917,6 +5937,64 @@ a.mdc-list-item {
5917
5937
  z-index: 1;
5918
5938
  }
5919
5939
 
5940
+ /**
5941
+ * Note! This file is exported to `dist/scss/` in the published
5942
+ * node module, for consumer projects to import.
5943
+ * That means this file cannot import from any file that isn't
5944
+ * also exported, keeping the same relative path.
5945
+ *
5946
+ * Or, just don't import anything, that works too.
5947
+ */
5948
+ /**
5949
+ * This can be used on a trigger element that opens a dropdown menu or a popover.
5950
+ */
5951
+ /**
5952
+ * This mixin will mask out the content that is close to
5953
+ * the edges of a scrollable area.
5954
+ * - If the scrollable content has `overflow-y`, use `vertically`
5955
+ * as an argument for `$direction`.
5956
+ - If the scrollable content has `overflow-x`, use `horizontally`
5957
+ * as an argument for `$direction`.
5958
+ *
5959
+ * For the visual effect to work smoothly, we need to make sure that
5960
+ * the size of the fade-out edge effect is the same as the
5961
+ * internal paddings of the scrollable area. Otherwise, content of a
5962
+ * scrollable area that does not have a padding will fade out before
5963
+ * any scrolling has been done.
5964
+ * This is why this mixin already adds paddings, which automatically
5965
+ * default to the size of the fade-out effect.
5966
+ * This size defaults to `1rem`, but to override the size use
5967
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
5968
+ * when `vertically` argument is set, and use
5969
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
5970
+ * when `horizontally` argument is set.
5971
+ * Of course you can also programmatically increase and decrease the
5972
+ * size of these variables for each edge, based on the amount of
5973
+ * scrolling that has been done by the user. In this case, make sure
5974
+ * to add a custom padding where the mixin is used, to override
5975
+ * the paddings that are automatically added by the mixin in the
5976
+ * compiled CSS code.
5977
+ */
5978
+ /**
5979
+ * This mixin will add an animated underline to the bottom of an `a` elements.
5980
+ * Note that you may need to add `all: unset;` –depending on your use case–
5981
+ * before using this mixin.
5982
+ */
5983
+ /**
5984
+ * This mixin creates a cross-browser font stack.
5985
+ * - `sans-serif` can be used for the UI of the components.
5986
+ * - `monospace` can be used for code.
5987
+ *
5988
+ * ⚠️ If we change the font stacks, we need to update
5989
+ * 1. the consumer documentation in `README.md`, and
5990
+ * 2. the CSS variables of `--kompendium-example-font-family`
5991
+ * in the `<style>` tag of `index.html`.
5992
+ */
5993
+ /**
5994
+ * This mixin is a hack, using old CSS syntax
5995
+ * to enable you to truncate a piece of text,
5996
+ * after a certain number of lines.
5997
+ */
5920
5998
  :host {
5921
5999
  --line-height-of-secondary-text: 1rem;
5922
6000
  }
@@ -5925,11 +6003,12 @@ a.mdc-list-item {
5925
6003
  height: auto !important;
5926
6004
  }
5927
6005
  .mdc-deprecated-list-item .mdc-deprecated-list-item__secondary-text {
5928
- line-height: var(--line-height-of-secondary-text);
5929
- white-space: normal;
5930
6006
  display: -webkit-box;
5931
- -webkit-line-clamp: var(--maxLinesSecondaryText);
6007
+ overflow: hidden;
6008
+ white-space: normal;
5932
6009
  -webkit-box-orient: vertical;
6010
+ -webkit-line-clamp: var(--maxLinesSecondaryText);
6011
+ line-height: var(--line-height-of-secondary-text);
5933
6012
  }
5934
6013
 
5935
6014
  :host(.has-grid-layout) {