@limetech/lime-elements 37.1.0-next.29 → 37.1.0-next.30

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 (66) hide show
  1. package/dist/cjs/limel-breadcrumbs.cjs.entry.js +1 -1
  2. package/dist/cjs/limel-breadcrumbs.cjs.entry.js.map +1 -1
  3. package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
  4. package/dist/cjs/limel-dialog.cjs.entry.js.map +1 -1
  5. package/dist/cjs/limel-icon-button.cjs.entry.js +2 -2
  6. package/dist/cjs/limel-icon-button.cjs.entry.js.map +1 -1
  7. package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
  9. package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +27 -0
  10. package/dist/collection/components/badge/badge.css +27 -0
  11. package/dist/collection/components/breadcrumbs/breadcrumbs.css +40 -2
  12. package/dist/collection/components/button/button.css +27 -0
  13. package/dist/collection/components/button-group/button-group.css +27 -0
  14. package/dist/collection/components/chip-set/chip-set.css +27 -0
  15. package/dist/collection/components/circular-progress/circular-progress.css +27 -0
  16. package/dist/collection/components/code-editor/code-editor.css +27 -0
  17. package/dist/collection/components/collapsible-section/collapsible-section.css +27 -0
  18. package/dist/collection/components/color-picker/color-picker-palette.css +54 -0
  19. package/dist/collection/components/color-picker/color-picker.css +27 -0
  20. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +27 -0
  21. package/dist/collection/components/dialog/dialog.css +54 -15
  22. package/dist/collection/components/dialog/dialog.js +1 -1
  23. package/dist/collection/components/dialog/dialog.js.map +1 -1
  24. package/dist/collection/components/dock/dock-button/dock-button.css +27 -0
  25. package/dist/collection/components/dock/dock.css +27 -0
  26. package/dist/collection/components/form/form.css +27 -0
  27. package/dist/collection/components/header/header.css +27 -0
  28. package/dist/collection/components/icon-button/icon-button.css +38 -237
  29. package/dist/collection/components/icon-button/icon-button.js +1 -1
  30. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  31. package/dist/collection/components/info-tile/info-tile.css +27 -0
  32. package/dist/collection/components/input-field/input-field.css +27 -0
  33. package/dist/collection/components/list/list.css +54 -0
  34. package/dist/collection/components/menu-list/menu-list.css +54 -0
  35. package/dist/collection/components/popover-surface/popover-surface.css +27 -0
  36. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +27 -0
  37. package/dist/collection/components/select/select.css +27 -0
  38. package/dist/collection/components/shortcut/shortcut.css +27 -0
  39. package/dist/collection/components/split-button/split-button.css +27 -0
  40. package/dist/collection/components/table/table.css +108 -0
  41. package/dist/collection/style/mixins.scss +61 -0
  42. package/dist/esm/limel-breadcrumbs.entry.js +1 -1
  43. package/dist/esm/limel-breadcrumbs.entry.js.map +1 -1
  44. package/dist/esm/limel-dialog.entry.js +2 -2
  45. package/dist/esm/limel-dialog.entry.js.map +1 -1
  46. package/dist/esm/limel-icon-button.entry.js +2 -2
  47. package/dist/esm/limel-icon-button.entry.js.map +1 -1
  48. package/dist/esm/limel-info-tile.entry.js +1 -1
  49. package/dist/esm/limel-info-tile.entry.js.map +1 -1
  50. package/dist/lime-elements/lime-elements.esm.js +1 -1
  51. package/dist/lime-elements/p-22031b5b.entry.js +2 -0
  52. package/dist/lime-elements/p-22031b5b.entry.js.map +1 -0
  53. package/dist/lime-elements/p-6933a99c.entry.js +2 -0
  54. package/dist/lime-elements/p-6933a99c.entry.js.map +1 -0
  55. package/dist/lime-elements/p-749acb43.entry.js +2 -0
  56. package/dist/lime-elements/{p-b70f517e.entry.js.map → p-749acb43.entry.js.map} +1 -1
  57. package/dist/lime-elements/{p-9f5250a0.entry.js → p-9eacc71c.entry.js} +7 -7
  58. package/dist/lime-elements/{p-9f5250a0.entry.js.map → p-9eacc71c.entry.js.map} +1 -1
  59. package/dist/lime-elements/style/mixins.scss +61 -0
  60. package/dist/scss/mixins.scss +61 -0
  61. package/package.json +2 -2
  62. package/dist/lime-elements/p-291abad1.entry.js +0 -2
  63. package/dist/lime-elements/p-291abad1.entry.js.map +0 -1
  64. package/dist/lime-elements/p-b70f517e.entry.js +0 -2
  65. package/dist/lime-elements/p-c3e428ff.entry.js +0 -2
  66. package/dist/lime-elements/p-c3e428ff.entry.js.map +0 -1
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-38eb64b5.js');
6
6
 
7
- const infoTileCss = "/**\n * Note! This file is exported to `dist/scss/` in the published\n * node module, for consumer projects to import.\n * That means this file cannot import from any file that isn't\n * also exported, keeping the same relative path.\n *\n * Or, just don't import anything, that works too.\n */\n/**\n* @prop --info-tile-border-radius: defines the radius of corners of the info-tile. Defaults to `1rem`\n* @prop --info-tile-icon-color: defines the fill color of the info-tile icon. Defaults to `--contrast-1000`\n* @prop --info-tile-text-color: defines the color of the info-tile label. Defaults to `--contrast-1100`\n* @prop --info-tile-background-color: defines the backgrounds color of the info-tile icon. Defaults to `--contrast-100`\n* @prop --info-tile-badge-text-color: Text color of the notification badge. Defaults to `--color-white`\n* @prop --info-tile-badge-background-color: Background color of the notification badge. Defaults to `--color-red-default`\n* @prop --info-tile-progress-fill-color: Determines the color of the progressed section. Defaults to `--lime-primary-color`.\n* @prop --info-tile-progress-background-color: Determines the background color of the central section of the progress bar. Defaults to `--info-tile-background-color`.\n* @prop --info-tile-progress-suffix-color: Determines the color of the progress prefix. Defaults to `--contrast-1000`.\n * @prop --info-tile-progress-text-color: Determines the color of the progress value. Defaults to `--info-tile-text-color`.\n * @prop --info-tile-progress-prefix-color: Determines the color of the progress suffix. Defaults to `--contrast-1000`.\n*/\n:host(limel-info-tile) {\n --badge-text-color: var(\n --info-tile-badge-text-color,\n rgb(var(--color-white))\n );\n --badge-background-color: var(\n --info-tile-badge-background-color,\n rgb(var(--color-red-default))\n );\n --circular-progress-text-color: var(\n --info-tile-progress-text-color,\n var(--info-tile-text-color)\n );\n --circular-progress-suffix-color: var(--info-tile-progress-suffix-color);\n --circular-progress-prefix-color: var(--info-tile-progress-prefix-color);\n --circular-progress-track-color: rgb(var(--contrast-800), 0.3);\n --circular-progress-fill-color: var(--info-tile-progress-fill-color);\n --circular-progress-background-color: var(\n --info-tile-progress-background-color,\n var(--info-tile-background-color)\n );\n --label-min-size: 0.75rem;\n --label-preferred-size: 6cqw;\n --label-max-size: 1rem;\n --value-min-size: 1rem;\n --value-preferred-size: 20cqw;\n --value-max-size: 4rem;\n --suffix-prefix-min-size: 0.75rem;\n --suffix-prefix-preferred-size: 8cqw;\n --suffix-prefix-max-size: 1.5rem;\n --icon-min-size: 2rem;\n --icon-preferred-size: 60cqh;\n --icon-max-size: calc(100cqw - 0.5rem);\n isolation: isolate;\n container-type: size;\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n}\n:host(limel-info-tile) * {\n box-sizing: border-box;\n}\n\n:host(limel-info-tile[disabled]) a {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\na {\n all: unset;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n padding: 0.25rem 1rem 0.5rem 1rem;\n border-radius: var(--info-tile-border-radius, 1rem);\n background-color: var(--info-tile-background-color, var(--lime-elevated-surface-background-color));\n}\na.is-clickable {\n transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;\n cursor: pointer;\n color: var(--mdc-theme-on-surface);\n background-color: var(--info-tile-background-color, var(--lime-elevated-surface-background-color));\n box-shadow: var(--button-shadow-normal);\n}\na.is-clickable:hover {\n color: var(--mdc-theme-on-surface);\n background-color: var(--info-tile-background-color, var(--lime-elevated-surface-background-color));\n box-shadow: var(--button-shadow-hovered);\n}\na.is-clickable:active {\n box-shadow: var(--button-shadow-pressed);\n transform: translate3d(0, 0.08rem, 0);\n}\na.is-clickable:focus {\n outline: none;\n}\na.is-clickable:focus-visible {\n outline: none;\n box-shadow: var(--shadow-depth-8-focused);\n}\n\n.icon {\n z-index: 1;\n position: absolute;\n top: 0.5rem;\n right: 0.75rem;\n padding: 0.25rem;\n aspect-ratio: 1/1;\n color: var(--info-tile-icon-color, rgb(var(--contrast-1000)));\n border-radius: 0;\n height: clamp(var(--icon-min-size), var(--icon-preferred-size), var(--icon-max-size));\n}\n@supports not (container-type: size) {\n .icon {\n width: max(10%, 3rem);\n }\n}\n.has-circular-progress .icon {\n top: unset;\n bottom: 0.5rem;\n --icon-min-size: 1.5rem;\n --icon-preferred-size: 20cqh;\n}\n\n.progress {\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n --circular-progress-size: min(\n var(--icon-preferred-size),\n var(--icon-max-size)\n );\n}\n@supports not (container-type: size) {\n .progress {\n --circular-progress-size: initial;\n }\n}\n\n.label {\n z-index: 1;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n line-height: 1.2;\n font-size: clamp(var(--label-min-size), var(--label-preferred-size), var(--label-max-size));\n}\n@supports not (container-type: size) {\n .label {\n font-size: 0.875rem;\n }\n}\n\nlimel-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n}\n\nlimel-linear-progress {\n --lime-primary-color: var(--info-tile-text-color);\n position: absolute;\n inset: auto 0 0 0;\n border-radius: 1rem;\n overflow: hidden;\n}\n\n.value-group {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n}\n\n.value-and-suffix,\n.label {\n text-shadow: 0 0 0.5rem var(--info-tile-background-color, rgb(var(--contrast-100))), 0 0 0.25rem var(--info-tile-background-color, rgb(var(--contrast-100)));\n}\n\n.value-and-suffix {\n display: flex;\n}\n\n.prefix,\n.suffix {\n font-size: clamp(var(--suffix-prefix-min-size), var(--suffix-prefix-preferred-size), var(--suffix-prefix-max-size));\n opacity: 0.7;\n}\n@supports not (container-type: size) {\n .prefix,\n .suffix {\n font-size: 0.75rem;\n }\n}\n\n.prefix {\n align-self: flex-start;\n line-height: normal;\n transform: translateY(40%);\n}\n\n.value {\n transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.95);\n transform-origin: left;\n transform: translate3d(0, 0, 0) scale(1);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-weight: bold;\n line-height: normal;\n font-size: clamp(var(--value-min-size), var(--value-preferred-size), var(--value-max-size));\n}\n@supports not (container-type: size) {\n .value {\n font-size: 1.5rem;\n }\n}\n:host(limel-info-tile[loading]) .value {\n opacity: 0.3;\n transform: translate3d(0, 0, 0) scale(0.9);\n}\n\n.suffix {\n transform: translateY(10%);\n}\n\n@container (width < 8rem) {\n .progress {\n top: 0.25rem;\n right: 0.25rem;\n }\n a {\n padding: 0.375rem;\n gap: 0.125rem;\n }\n}\n@container (width < 18.75rem) {\n .progress {\n top: 0.5rem;\n right: 0.5rem;\n }\n .icon {\n top: 0.25rem;\n right: 0.5rem;\n }\n .has-circular-progress .icon {\n right: 0.25rem;\n bottom: 0.25rem;\n }\n}\n@container (width < 40.5rem) {\n .value {\n --value-preferred-size: 13cqw;\n }\n .value.ch-1, .value.ch-2, .value.ch-3, .value.ch-4 {\n --value-preferred-size: 20cqw;\n }\n .value.ch-5 {\n --value-preferred-size: 18cqw;\n }\n .value.ch-6 {\n --value-preferred-size: 17cqw;\n }\n .value.ch-7 {\n --value-preferred-size: 16cqw;\n }\n .value.ch-8 {\n --value-preferred-size: 15cqw;\n }\n .value.ch-9 {\n --value-preferred-size: 14cqw;\n }\n}\n@container (height > 8rem) {\n a {\n padding-top: 0.75rem;\n padding-bottom: 1rem;\n }\n}\n@container (height < 8rem) and (width > 8rem) {\n .value {\n --value-preferred-size: 32cqh !important;\n }\n .suffix,\n .prefix {\n --suffix-prefix-preferred-size: 16cqh !important;\n }\n}\n@container (height > 18.75rem) {\n .progress,\n .icon {\n position: relative;\n top: unset;\n right: unset;\n }\n a {\n align-items: center;\n justify-content: center;\n }\n .label {\n text-align: center;\n }\n .has-circular-progress .icon {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n --icon-max-size: 3rem;\n }\n}";
7
+ const infoTileCss = "/**\n * Note! This file is exported to `dist/scss/` in the published\n * node module, for consumer projects to import.\n * That means this file cannot import from any file that isn't\n * also exported, keeping the same relative path.\n *\n * Or, just don't import anything, that works too.\n */\n/**\n * This mixin will mask out the content that is close to\n * the edges of a scrollable area.\n * - If the scrollable content has `overflow-y`, use `vertically`\n * as an argument for `$direction`.\n - If the scrollable content has `overflow-x`, use `horizontally`\n * as an argument for `$direction`.\n *\n * For the visual effect to work smoothly, we need to make sure that\n * the size of the fade-out edge effect is the same as the\n * internal paddings of the scrollable area. Otherwise, content of a\n * scrollable area that does not have a padding will fade out before\n * any scrolling has been done.\n * This is why this mixin already adds paddings, which automatically\n * default to the size of the fade-out effect.\n * This size defaults to `1rem`, but to override the size use\n * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`\n * when `vertically` argument is set, and use\n * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`\n * when `horizontally` argument is set.\n * Of course you can also programmatically increase and decrease the\n * size of these variables for each edge, based on the amount of\n * scrolling that has been done by the user. In this case, make sure\n * to add a custom padding where the mixin is used, to override\n * the paddings that are automatically added by the mixin in the\n * compiled CSS code.\n */\n/**\n* @prop --info-tile-border-radius: defines the radius of corners of the info-tile. Defaults to `1rem`\n* @prop --info-tile-icon-color: defines the fill color of the info-tile icon. Defaults to `--contrast-1000`\n* @prop --info-tile-text-color: defines the color of the info-tile label. Defaults to `--contrast-1100`\n* @prop --info-tile-background-color: defines the backgrounds color of the info-tile icon. Defaults to `--contrast-100`\n* @prop --info-tile-badge-text-color: Text color of the notification badge. Defaults to `--color-white`\n* @prop --info-tile-badge-background-color: Background color of the notification badge. Defaults to `--color-red-default`\n* @prop --info-tile-progress-fill-color: Determines the color of the progressed section. Defaults to `--lime-primary-color`.\n* @prop --info-tile-progress-background-color: Determines the background color of the central section of the progress bar. Defaults to `--info-tile-background-color`.\n* @prop --info-tile-progress-suffix-color: Determines the color of the progress prefix. Defaults to `--contrast-1000`.\n * @prop --info-tile-progress-text-color: Determines the color of the progress value. Defaults to `--info-tile-text-color`.\n * @prop --info-tile-progress-prefix-color: Determines the color of the progress suffix. Defaults to `--contrast-1000`.\n*/\n:host(limel-info-tile) {\n --badge-text-color: var(\n --info-tile-badge-text-color,\n rgb(var(--color-white))\n );\n --badge-background-color: var(\n --info-tile-badge-background-color,\n rgb(var(--color-red-default))\n );\n --circular-progress-text-color: var(\n --info-tile-progress-text-color,\n var(--info-tile-text-color)\n );\n --circular-progress-suffix-color: var(--info-tile-progress-suffix-color);\n --circular-progress-prefix-color: var(--info-tile-progress-prefix-color);\n --circular-progress-track-color: rgb(var(--contrast-800), 0.3);\n --circular-progress-fill-color: var(--info-tile-progress-fill-color);\n --circular-progress-background-color: var(\n --info-tile-progress-background-color,\n var(--info-tile-background-color)\n );\n --label-min-size: 0.75rem;\n --label-preferred-size: 6cqw;\n --label-max-size: 1rem;\n --value-min-size: 1rem;\n --value-preferred-size: 20cqw;\n --value-max-size: 4rem;\n --suffix-prefix-min-size: 0.75rem;\n --suffix-prefix-preferred-size: 8cqw;\n --suffix-prefix-max-size: 1.5rem;\n --icon-min-size: 2rem;\n --icon-preferred-size: 60cqh;\n --icon-max-size: calc(100cqw - 0.5rem);\n isolation: isolate;\n container-type: size;\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n}\n:host(limel-info-tile) * {\n box-sizing: border-box;\n}\n\n:host(limel-info-tile[disabled]) a {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\na {\n all: unset;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n height: 100%;\n width: 100%;\n flex-grow: 1;\n padding: 0.25rem 1rem 0.5rem 1rem;\n border-radius: var(--info-tile-border-radius, 1rem);\n background-color: var(--info-tile-background-color, var(--lime-elevated-surface-background-color));\n}\na.is-clickable {\n transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;\n cursor: pointer;\n color: var(--mdc-theme-on-surface);\n background-color: var(--info-tile-background-color, var(--lime-elevated-surface-background-color));\n box-shadow: var(--button-shadow-normal);\n}\na.is-clickable:hover {\n color: var(--mdc-theme-on-surface);\n background-color: var(--info-tile-background-color, var(--lime-elevated-surface-background-color));\n box-shadow: var(--button-shadow-hovered);\n}\na.is-clickable:active {\n box-shadow: var(--button-shadow-pressed);\n transform: translate3d(0, 0.08rem, 0);\n}\na.is-clickable:focus {\n outline: none;\n}\na.is-clickable:focus-visible {\n outline: none;\n box-shadow: var(--shadow-depth-8-focused);\n}\n\n.icon {\n z-index: 1;\n position: absolute;\n top: 0.5rem;\n right: 0.75rem;\n padding: 0.25rem;\n aspect-ratio: 1/1;\n color: var(--info-tile-icon-color, rgb(var(--contrast-1000)));\n border-radius: 0;\n height: clamp(var(--icon-min-size), var(--icon-preferred-size), var(--icon-max-size));\n}\n@supports not (container-type: size) {\n .icon {\n width: max(10%, 3rem);\n }\n}\n.has-circular-progress .icon {\n top: unset;\n bottom: 0.5rem;\n --icon-min-size: 1.5rem;\n --icon-preferred-size: 20cqh;\n}\n\n.progress {\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n --circular-progress-size: min(\n var(--icon-preferred-size),\n var(--icon-max-size)\n );\n}\n@supports not (container-type: size) {\n .progress {\n --circular-progress-size: initial;\n }\n}\n\n.label {\n z-index: 1;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n line-height: 1.2;\n font-size: clamp(var(--label-min-size), var(--label-preferred-size), var(--label-max-size));\n}\n@supports not (container-type: size) {\n .label {\n font-size: 0.875rem;\n }\n}\n\nlimel-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n}\n\nlimel-linear-progress {\n --lime-primary-color: var(--info-tile-text-color);\n position: absolute;\n inset: auto 0 0 0;\n border-radius: 1rem;\n overflow: hidden;\n}\n\n.value-group {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n}\n\n.value-and-suffix,\n.label {\n text-shadow: 0 0 0.5rem var(--info-tile-background-color, rgb(var(--contrast-100))), 0 0 0.25rem var(--info-tile-background-color, rgb(var(--contrast-100)));\n}\n\n.value-and-suffix {\n display: flex;\n}\n\n.prefix,\n.suffix {\n font-size: clamp(var(--suffix-prefix-min-size), var(--suffix-prefix-preferred-size), var(--suffix-prefix-max-size));\n opacity: 0.7;\n}\n@supports not (container-type: size) {\n .prefix,\n .suffix {\n font-size: 0.75rem;\n }\n}\n\n.prefix {\n align-self: flex-start;\n line-height: normal;\n transform: translateY(40%);\n}\n\n.value {\n transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.95);\n transform-origin: left;\n transform: translate3d(0, 0, 0) scale(1);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-weight: bold;\n line-height: normal;\n font-size: clamp(var(--value-min-size), var(--value-preferred-size), var(--value-max-size));\n}\n@supports not (container-type: size) {\n .value {\n font-size: 1.5rem;\n }\n}\n:host(limel-info-tile[loading]) .value {\n opacity: 0.3;\n transform: translate3d(0, 0, 0) scale(0.9);\n}\n\n.suffix {\n transform: translateY(10%);\n}\n\n@container (width < 8rem) {\n .progress {\n top: 0.25rem;\n right: 0.25rem;\n }\n a {\n padding: 0.375rem;\n gap: 0.125rem;\n }\n}\n@container (width < 18.75rem) {\n .progress {\n top: 0.5rem;\n right: 0.5rem;\n }\n .icon {\n top: 0.25rem;\n right: 0.5rem;\n }\n .has-circular-progress .icon {\n right: 0.25rem;\n bottom: 0.25rem;\n }\n}\n@container (width < 40.5rem) {\n .value {\n --value-preferred-size: 13cqw;\n }\n .value.ch-1, .value.ch-2, .value.ch-3, .value.ch-4 {\n --value-preferred-size: 20cqw;\n }\n .value.ch-5 {\n --value-preferred-size: 18cqw;\n }\n .value.ch-6 {\n --value-preferred-size: 17cqw;\n }\n .value.ch-7 {\n --value-preferred-size: 16cqw;\n }\n .value.ch-8 {\n --value-preferred-size: 15cqw;\n }\n .value.ch-9 {\n --value-preferred-size: 14cqw;\n }\n}\n@container (height > 8rem) {\n a {\n padding-top: 0.75rem;\n padding-bottom: 1rem;\n }\n}\n@container (height < 8rem) and (width > 8rem) {\n .value {\n --value-preferred-size: 32cqh !important;\n }\n .suffix,\n .prefix {\n --suffix-prefix-preferred-size: 16cqh !important;\n }\n}\n@container (height > 18.75rem) {\n .progress,\n .icon {\n position: relative;\n top: unset;\n right: unset;\n }\n a {\n align-items: center;\n justify-content: center;\n }\n .label {\n text-align: center;\n }\n .has-circular-progress .icon {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n --icon-max-size: 3rem;\n }\n}";
8
8
 
9
9
  const InfoTile = class {
10
10
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"file":"limel-info-tile.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,s4QAAs4Q;;MCuB74Q,QAAQ;;;IAgIT,iBAAY,GAAG;MACnB,IAAI,IAAI,CAAC,MAAM,EAAE;QACb,OAAOA,kBAAM,KAAK,EAAC,QAAQ,IAAE,IAAI,CAAC,MAAM,CAAQ,CAAC;OACpD;KACJ,CAAC;IAEM,gBAAW,GAAG;;MAClB,MAAM,cAAc,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC;MAE5D,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;QAC7B,OAAOA,kBAAM,KAAK,EAAC,OAAO,yBAAW,CAAC;OACzC;MAED,IAAI,IAAI,CAAC,KAAK,EAAE;QACZ,QACIA,kBACI,KAAK,EAAE;YACH,KAAK,EAAE,IAAI;YACX,CAAC,MAAM,cAAc,EAAE,GAAG,IAAI;WACjC,IAEA,IAAI,CAAC,KAAK,CACR,EACT;OACL;KACJ,CAAC;IAEM,iBAA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AAI,CAAC,QAAQ,0CAAE,KAAK,CAAA,IAAI,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,KAAK,MAAK,CAAC;SAC3D,IAEA,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,cAAc,EAAE,EACtBA,iBAAK,KAAK,EAAC,aAAa,IACnB,IAAI,CAAC,YAAY,EAAE,EACpBA,iBAAK,KAAK,EAAC,kBAAkB,IACxB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,YAAY,EAAE,CAClB,EACL,IAAI,CAAC,aAAa,EAAE,CACnB,EACL,IAAI,CAAC,WAAW,EAAE,CACnB;MACJ,IAAI,CAAC,kBAAkB,EAAE;KAC5B,CAAC;GACL;EAEO,UAAU,CAAC,SAAS;IACxB,OAAO,CAAC,SAAS,GAAG,EAAE,GAAG,SAAS,GAAG,GAAG,CAAC;GAC5C;;;;;;","names":["h"],"sources":["./src/components/info-tile/info-tile.scss?tag=limel-info-tile&encapsulation=shadow","./src/components/info-tile/info-tile.tsx"],"sourcesContent":["/**\n* @prop --info-tile-border-radius: defines the radius of corners of the info-tile. Defaults to `1rem`\n* @prop --info-tile-icon-color: defines the fill color of the info-tile icon. Defaults to `--contrast-1000`\n* @prop --info-tile-text-color: defines the color of the info-tile label. Defaults to `--contrast-1100`\n* @prop --info-tile-background-color: defines the backgrounds color of the info-tile icon. Defaults to `--contrast-100`\n* @prop --info-tile-badge-text-color: Text color of the notification badge. Defaults to `--color-white`\n* @prop --info-tile-badge-background-color: Background color of the notification badge. Defaults to `--color-red-default`\n* @prop --info-tile-progress-fill-color: Determines the color of the progressed section. Defaults to `--lime-primary-color`.\n* @prop --info-tile-progress-background-color: Determines the background color of the central section of the progress bar. Defaults to `--info-tile-background-color`.\n* @prop --info-tile-progress-suffix-color: Determines the color of the progress prefix. Defaults to `--contrast-1000`.\n * @prop --info-tile-progress-text-color: Determines the color of the progress value. Defaults to `--info-tile-text-color`.\n * @prop --info-tile-progress-prefix-color: Determines the color of the progress suffix. Defaults to `--contrast-1000`.\n*/\n\n@use '../../style/mixins';\n\n:host(limel-info-tile) {\n --badge-text-color: var(\n --info-tile-badge-text-color,\n rgb(var(--color-white))\n );\n --badge-background-color: var(\n --info-tile-badge-background-color,\n rgb(var(--color-red-default))\n );\n\n --circular-progress-text-color: var(\n --info-tile-progress-text-color,\n var(--info-tile-text-color)\n );\n --circular-progress-suffix-color: var(--info-tile-progress-suffix-color);\n --circular-progress-prefix-color: var(--info-tile-progress-prefix-color);\n --circular-progress-track-color: rgb(var(--contrast-800), 0.3);\n --circular-progress-fill-color: var(--info-tile-progress-fill-color);\n --circular-progress-background-color: var(\n --info-tile-progress-background-color,\n var(--info-tile-background-color)\n );\n\n --label-min-size: 0.75rem;\n --label-preferred-size: 6cqw;\n --label-max-size: 1rem;\n\n --value-min-size: 1rem;\n --value-preferred-size: 20cqw;\n --value-max-size: 4rem;\n\n --suffix-prefix-min-size: 0.75rem;\n --suffix-prefix-preferred-size: 8cqw;\n --suffix-prefix-max-size: 1.5rem;\n\n --icon-min-size: 2rem;\n --icon-preferred-size: 60cqh;\n --icon-max-size: calc(100cqw - 0.5rem);\n\n isolation: isolate;\n container-type: size;\n position: relative;\n display: flex;\n\n width: 100%;\n height: 100%;\n\n * {\n box-sizing: border-box;\n }\n}\n\n:host(limel-info-tile[disabled]) {\n a {\n opacity: 0.5;\n cursor: not-allowed;\n }\n}\n\na {\n all: unset;\n overflow: hidden;\n\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n\n height: 100%;\n width: 100%;\n flex-grow: 1;\n\n padding: 0.25rem 1rem 0.5rem 1rem;\n border-radius: var(--info-tile-border-radius, 1rem);\n background-color: var(\n --info-tile-background-color,\n var(--lime-elevated-surface-background-color)\n );\n\n &.is-clickable {\n @include mixins.is-elevated-clickable(\n $background-color:\n var(\n --info-tile-background-color,\n var(--lime-elevated-surface-background-color)\n ),\n $background-color--hovered:\n var(\n --info-tile-background-color,\n var(--lime-elevated-surface-background-color)\n )\n );\n @include mixins.visualize-keyboard-focus;\n }\n}\n\n.icon {\n z-index: 1;\n position: absolute;\n top: 0.5rem;\n right: 0.75rem;\n padding: 0.25rem;\n\n aspect-ratio: 1/1;\n\n color: var(--info-tile-icon-color, rgb(var(--contrast-1000)));\n\n border-radius: 0;\n height: clamp(\n var(--icon-min-size),\n var(--icon-preferred-size),\n var(--icon-max-size)\n );\n\n @supports not (container-type: size) {\n width: max(10%, 3rem);\n }\n\n .has-circular-progress & {\n top: unset;\n bottom: 0.5rem;\n --icon-min-size: 1.5rem;\n --icon-preferred-size: 20cqh;\n }\n}\n\n.progress {\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n\n --circular-progress-size: min(\n var(--icon-preferred-size),\n var(--icon-max-size)\n );\n @supports not (container-type: size) {\n --circular-progress-size: initial;\n }\n}\n\n.label {\n z-index: 1;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n\n line-height: 1.2;\n font-size: clamp(\n var(--label-min-size),\n var(--label-preferred-size),\n var(--label-max-size)\n );\n @supports not (container-type: size) {\n font-size: 0.875rem;\n }\n}\n\nlimel-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n}\n\nlimel-linear-progress {\n --lime-primary-color: var(--info-tile-text-color);\n position: absolute;\n inset: auto 0 0 0;\n border-radius: 1rem;\n overflow: hidden;\n}\n\n.value-group {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n}\n\n.value-and-suffix,\n.label {\n text-shadow: 0 0 0.5rem\n var(--info-tile-background-color, rgb(var(--contrast-100))),\n 0 0 0.25rem var(--info-tile-background-color, rgb(var(--contrast-100)));\n}\n\n.value-and-suffix {\n display: flex;\n}\n\n.prefix,\n.suffix {\n font-size: clamp(\n var(--suffix-prefix-min-size),\n var(--suffix-prefix-preferred-size),\n var(--suffix-prefix-max-size)\n );\n opacity: 0.7;\n\n @supports not (container-type: size) {\n font-size: 0.75rem;\n }\n}\n\n.prefix {\n align-self: flex-start;\n line-height: normal;\n transform: translateY(40%);\n}\n\n.value {\n transition: opacity 0.2s ease,\n transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.95);\n transform-origin: left;\n transform: translate3d(0, 0, 0) scale(1);\n\n @include mixins.truncate-text;\n font-weight: bold;\n line-height: normal;\n\n font-size: clamp(\n var(--value-min-size),\n var(--value-preferred-size),\n var(--value-max-size)\n );\n @supports not (container-type: size) {\n font-size: 1.5rem;\n }\n\n :host(limel-info-tile[loading]) & {\n opacity: 0.3;\n transform: translate3d(0, 0, 0) scale(0.9);\n }\n}\n\n.suffix {\n transform: translateY(10%);\n}\n\n$xs: 8rem; //128px:\n$s: 18.75rem; //300px\n$m: 40.5rem; //648px\n$l: 62.5rem; //1000px\n\n@container (width < #{$xs}) {\n .progress {\n top: 0.25rem;\n right: 0.25rem;\n }\n a {\n padding: 0.375rem;\n gap: 0.125rem;\n }\n}\n\n@container (width < #{$s}) {\n .progress {\n top: 0.5rem;\n right: 0.5rem;\n }\n .icon {\n top: 0.25rem;\n right: 0.5rem;\n .has-circular-progress & {\n right: 0.25rem;\n bottom: 0.25rem;\n }\n }\n}\n\n@container (width < #{$m}) {\n .value {\n &.ch-1,\n &.ch-2,\n &.ch-3,\n &.ch-4 {\n --value-preferred-size: 20cqw;\n }\n &.ch-5 {\n --value-preferred-size: 18cqw;\n }\n &.ch-6 {\n --value-preferred-size: 17cqw;\n }\n &.ch-7 {\n --value-preferred-size: 16cqw;\n }\n &.ch-8 {\n --value-preferred-size: 15cqw;\n }\n &.ch-9 {\n --value-preferred-size: 14cqw;\n }\n --value-preferred-size: 13cqw;\n }\n}\n\n@container (height > #{$xs}) {\n a {\n padding-top: 0.75rem;\n padding-bottom: 1rem;\n }\n}\n\n@container (height < #{$xs}) and (width > #{$xs}) {\n .value {\n --value-preferred-size: 32cqh !important;\n }\n .suffix,\n .prefix {\n --suffix-prefix-preferred-size: 16cqh !important;\n }\n}\n\n@container (height > #{$s}) {\n .progress,\n .icon {\n position: relative;\n top: unset;\n right: unset;\n }\n a {\n align-items: center;\n justify-content: center;\n }\n .label {\n text-align: center;\n // -webkit-line-clamp: 3;\n }\n .has-circular-progress {\n .icon {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n --icon-max-size: 3rem;\n }\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\nimport { InfoTileProgress } from './info-tile.types';\nimport { Link } from '@limetech/lime-elements';\n\n/**\n * This component can be used on places such as a start page or a dashboard.\n * It offers features for visualizing aggregated data along with supplementary\n * information.\n *\n * If clicking on the component should navigate the user to\n * a new screen or web page, you need to provide a URL,\n * using the `link` property.\n * @exampleComponent limel-example-info-tile\n * @exampleComponent limel-example-info-tile-badge\n * @exampleComponent limel-example-info-tile-progress\n * @exampleComponent limel-example-info-tile-loading\n * @exampleComponent limel-example-info-tile-styling\n */\n@Component({\n tag: 'limel-info-tile',\n shadow: true,\n styleUrl: 'info-tile.scss',\n})\nexport class InfoTile {\n /**\n * A piece of text or number that is the main piece of information\n * which the component is intended to visualize.\n */\n @Prop({ reflect: true })\n public value: number | string;\n\n /**\n * Name of icon for the info tile.\n */\n @Prop()\n public icon?: string;\n\n /**\n * The text to show below the info tile. Long labels will be truncated.\n */\n @Prop({ reflect: true })\n public label?: string = null;\n\n /**\n * A string of text that is visually placed before the value.\n */\n @Prop({ reflect: true })\n public prefix?: string;\n\n /**\n * A string of text that is visually placed after the value.\n */\n @Prop({ reflect: true })\n public suffix?: string;\n\n /**\n * Set to `true` if info tile is disabled.\n */\n @Prop({ reflect: true })\n public disabled? = false;\n\n /**\n * If supplied, the info tile will display a notification badge.\n */\n @Prop({ reflect: true })\n public badge?: number | string;\n\n /**\n * Set to `true` to put the component in the `loading` state.\n * This does _not_ disable the link. To do so, the\n * `disabled` property should be set to `true` as well.\n */\n @Prop({ reflect: true })\n public loading? = false;\n\n /**\n * If supplied, the info tile will be a clickable link.\n *\n * Supplying a value also adds an elevated effect using a shadow,\n * as well as `cursor: pointer`, which appears on hover.\n * While we strongly recommend supplying a link whenever the\n * component should act as a link, if this is not possible, and\n * you need to provide interaction through a click handler,\n * you can still get the correct styling by supplying a `Link`\n * object with the `href` property set to `'#'`.\n */\n @Prop()\n public link?: Link;\n\n /**\n * Properties of the optional circular progress bar.\n *\n * Defaults:\n * - `maxValue`: 100\n * - `suffix`: %\n * - `displayPercentageColors`: false\n *\n * Colors change with intervals of 10 %.\n */\n @Prop()\n public progress?: InfoTileProgress;\n\n public render() {\n const extendedAriaLabel =\n this.checkProps(this?.prefix) +\n this.value +\n ' ' +\n this.checkProps(this?.suffix) +\n this.checkProps(this?.label) +\n '. ' +\n this.checkProps(this?.progress?.prefix) +\n this.checkProps(this?.progress?.value) +\n this.checkProps(this?.progress?.suffix) +\n this.checkProps(this?.link?.title);\n\n const link = !this.disabled ? this.link?.href : '#';\n\n return [\n <a\n title={this.link?.title}\n href={link}\n target={this.link?.target}\n tabindex=\"0\"\n aria-label={extendedAriaLabel}\n aria-disabled={this.disabled}\n class={{\n 'is-clickable': !!this.link?.href && !this.disabled,\n 'has-circular-progress':\n !!this.progress?.value || this.progress?.value === 0,\n }}\n >\n {this.renderIcon()}\n {this.renderProgress()}\n <div class=\"value-group\">\n {this.renderPrefix()}\n <div class=\"value-and-suffix\">\n {this.renderValue()}\n {this.renderSuffix()}\n </div>\n {this.renderSpinner()}\n </div>\n {this.renderLabel()}\n </a>,\n this.renderNotification(),\n ];\n }\n\n private checkProps(propValue) {\n return !propValue ? '' : propValue + ' ';\n }\n\n private renderPrefix = () => {\n if (this.prefix) {\n return <span class=\"prefix\">{this.prefix}</span>;\n }\n };\n\n private renderValue = () => {\n const characterCount = (this.value ?? '').toString().length;\n\n if (!this.value && this.loading) {\n return <span class=\"value\">···</span>;\n }\n\n if (this.value) {\n return (\n <span\n class={{\n value: true,\n [`ch-${characterCount}`]: true,\n }}\n >\n {this.value}\n </span>\n );\n }\n };\n\n private renderSuffix = () => {\n if (this.suffix) {\n return <span class=\"suffix\">{this.suffix}</span>;\n }\n };\n\n private renderIcon = () => {\n if (this.icon) {\n return <limel-icon class=\"icon\" name={this.icon} />;\n }\n };\n\n private renderProgress = () => {\n if (this.progress?.value || this.progress?.value === 0) {\n return (\n <limel-circular-progress\n class=\"progress\"\n prefix={this.progress.prefix}\n value={this.progress.value}\n suffix={this.progress.suffix}\n maxValue={this.progress.maxValue}\n displayPercentageColors={\n this.progress.displayPercentageColors\n }\n />\n );\n }\n };\n\n private renderLabel = () => {\n if (this.label) {\n return <span class=\"label\">{this.label}</span>;\n }\n };\n\n private renderNotification = () => {\n if (this.badge) {\n return <limel-badge label={this.badge} />;\n }\n };\n\n private renderSpinner = () => {\n if (this.loading) {\n return <limel-linear-progress indeterminate={true} />;\n }\n };\n}\n"],"version":3}
1
+ {"file":"limel-info-tile.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,kvTAAkvT;;MCuBzvT,QAAQ;;;IAgIT,iBAAY,GAAG;MACnB,IAAI,IAAI,CAAC,MAAM,EAAE;QACb,OAAOA,kBAAM,KAAK,EAAC,QAAQ,IAAE,IAAI,CAAC,MAAM,CAAQ,CAAC;OACpD;KACJ,CAAC;IAEM,gBAAW,GAAG;;MAClB,MAAM,cAAc,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC;MAE5D,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;QAC7B,OAAOA,kBAAM,KAAK,EAAC,OAAO,yBAAW,CAAC;OACzC;MAED,IAAI,IAAI,CAAC,KAAK,EAAE;QACZ,QACIA,kBACI,KAAK,EAAE;YACH,KAAK,EAAE,IAAI;YACX,CAAC,MAAM,cAAc,EAAE,GAAG,IAAI;WACjC,IAEA,IAAI,CAAC,KAAK,CACR,EACT;OACL;KACJ,CAAC;IAEM,iBAAY,GAAG;MACnB,IAAI,IAAI,CAAC,MA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A,IAAI,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,KAAK,MAAK,CAAC;SAC3D,IAEA,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,cAAc,EAAE,EACtBA,iBAAK,KAAK,EAAC,aAAa,IACnB,IAAI,CAAC,YAAY,EAAE,EACpBA,iBAAK,KAAK,EAAC,kBAAkB,IACxB,IAAI,CAAC,WAAW,EAAE,EAClB,IAAI,CAAC,YAAY,EAAE,CAClB,EACL,IAAI,CAAC,aAAa,EAAE,CACnB,EACL,IAAI,CAAC,WAAW,EAAE,CACnB;MACJ,IAAI,CAAC,kBAAkB,EAAE;KAC5B,CAAC;GACL;EAEO,UAAU,CAAC,SAAS;IACxB,OAAO,CAAC,SAAS,GAAG,EAAE,GAAG,SAAS,GAAG,GAAG,CAAC;GAC5C;;;;;;","names":["h"],"sources":["./src/components/info-tile/info-tile.scss?tag=limel-info-tile&encapsulation=shadow","./src/components/info-tile/info-tile.tsx"],"sourcesContent":["/**\n* @prop --info-tile-border-radius: defines the radius of corners of the info-tile. Defaults to `1rem`\n* @prop --info-tile-icon-color: defines the fill color of the info-tile icon. Defaults to `--contrast-1000`\n* @prop --info-tile-text-color: defines the color of the info-tile label. Defaults to `--contrast-1100`\n* @prop --info-tile-background-color: defines the backgrounds color of the info-tile icon. Defaults to `--contrast-100`\n* @prop --info-tile-badge-text-color: Text color of the notification badge. Defaults to `--color-white`\n* @prop --info-tile-badge-background-color: Background color of the notification badge. Defaults to `--color-red-default`\n* @prop --info-tile-progress-fill-color: Determines the color of the progressed section. Defaults to `--lime-primary-color`.\n* @prop --info-tile-progress-background-color: Determines the background color of the central section of the progress bar. Defaults to `--info-tile-background-color`.\n* @prop --info-tile-progress-suffix-color: Determines the color of the progress prefix. Defaults to `--contrast-1000`.\n * @prop --info-tile-progress-text-color: Determines the color of the progress value. Defaults to `--info-tile-text-color`.\n * @prop --info-tile-progress-prefix-color: Determines the color of the progress suffix. Defaults to `--contrast-1000`.\n*/\n\n@use '../../style/mixins';\n\n:host(limel-info-tile) {\n --badge-text-color: var(\n --info-tile-badge-text-color,\n rgb(var(--color-white))\n );\n --badge-background-color: var(\n --info-tile-badge-background-color,\n rgb(var(--color-red-default))\n );\n\n --circular-progress-text-color: var(\n --info-tile-progress-text-color,\n var(--info-tile-text-color)\n );\n --circular-progress-suffix-color: var(--info-tile-progress-suffix-color);\n --circular-progress-prefix-color: var(--info-tile-progress-prefix-color);\n --circular-progress-track-color: rgb(var(--contrast-800), 0.3);\n --circular-progress-fill-color: var(--info-tile-progress-fill-color);\n --circular-progress-background-color: var(\n --info-tile-progress-background-color,\n var(--info-tile-background-color)\n );\n\n --label-min-size: 0.75rem;\n --label-preferred-size: 6cqw;\n --label-max-size: 1rem;\n\n --value-min-size: 1rem;\n --value-preferred-size: 20cqw;\n --value-max-size: 4rem;\n\n --suffix-prefix-min-size: 0.75rem;\n --suffix-prefix-preferred-size: 8cqw;\n --suffix-prefix-max-size: 1.5rem;\n\n --icon-min-size: 2rem;\n --icon-preferred-size: 60cqh;\n --icon-max-size: calc(100cqw - 0.5rem);\n\n isolation: isolate;\n container-type: size;\n position: relative;\n display: flex;\n\n width: 100%;\n height: 100%;\n\n * {\n box-sizing: border-box;\n }\n}\n\n:host(limel-info-tile[disabled]) {\n a {\n opacity: 0.5;\n cursor: not-allowed;\n }\n}\n\na {\n all: unset;\n overflow: hidden;\n\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n\n height: 100%;\n width: 100%;\n flex-grow: 1;\n\n padding: 0.25rem 1rem 0.5rem 1rem;\n border-radius: var(--info-tile-border-radius, 1rem);\n background-color: var(\n --info-tile-background-color,\n var(--lime-elevated-surface-background-color)\n );\n\n &.is-clickable {\n @include mixins.is-elevated-clickable(\n $background-color:\n var(\n --info-tile-background-color,\n var(--lime-elevated-surface-background-color)\n ),\n $background-color--hovered:\n var(\n --info-tile-background-color,\n var(--lime-elevated-surface-background-color)\n )\n );\n @include mixins.visualize-keyboard-focus;\n }\n}\n\n.icon {\n z-index: 1;\n position: absolute;\n top: 0.5rem;\n right: 0.75rem;\n padding: 0.25rem;\n\n aspect-ratio: 1/1;\n\n color: var(--info-tile-icon-color, rgb(var(--contrast-1000)));\n\n border-radius: 0;\n height: clamp(\n var(--icon-min-size),\n var(--icon-preferred-size),\n var(--icon-max-size)\n );\n\n @supports not (container-type: size) {\n width: max(10%, 3rem);\n }\n\n .has-circular-progress & {\n top: unset;\n bottom: 0.5rem;\n --icon-min-size: 1.5rem;\n --icon-preferred-size: 20cqh;\n }\n}\n\n.progress {\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n\n --circular-progress-size: min(\n var(--icon-preferred-size),\n var(--icon-max-size)\n );\n @supports not (container-type: size) {\n --circular-progress-size: initial;\n }\n}\n\n.label {\n z-index: 1;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n\n line-height: 1.2;\n font-size: clamp(\n var(--label-min-size),\n var(--label-preferred-size),\n var(--label-max-size)\n );\n @supports not (container-type: size) {\n font-size: 0.875rem;\n }\n}\n\nlimel-badge {\n position: absolute;\n top: -0.25rem;\n right: -0.25rem;\n}\n\nlimel-linear-progress {\n --lime-primary-color: var(--info-tile-text-color);\n position: absolute;\n inset: auto 0 0 0;\n border-radius: 1rem;\n overflow: hidden;\n}\n\n.value-group {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n color: var(--info-tile-text-color, rgb(var(--contrast-1100)));\n}\n\n.value-and-suffix,\n.label {\n text-shadow: 0 0 0.5rem\n var(--info-tile-background-color, rgb(var(--contrast-100))),\n 0 0 0.25rem var(--info-tile-background-color, rgb(var(--contrast-100)));\n}\n\n.value-and-suffix {\n display: flex;\n}\n\n.prefix,\n.suffix {\n font-size: clamp(\n var(--suffix-prefix-min-size),\n var(--suffix-prefix-preferred-size),\n var(--suffix-prefix-max-size)\n );\n opacity: 0.7;\n\n @supports not (container-type: size) {\n font-size: 0.75rem;\n }\n}\n\n.prefix {\n align-self: flex-start;\n line-height: normal;\n transform: translateY(40%);\n}\n\n.value {\n transition: opacity 0.2s ease,\n transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.95);\n transform-origin: left;\n transform: translate3d(0, 0, 0) scale(1);\n\n @include mixins.truncate-text;\n font-weight: bold;\n line-height: normal;\n\n font-size: clamp(\n var(--value-min-size),\n var(--value-preferred-size),\n var(--value-max-size)\n );\n @supports not (container-type: size) {\n font-size: 1.5rem;\n }\n\n :host(limel-info-tile[loading]) & {\n opacity: 0.3;\n transform: translate3d(0, 0, 0) scale(0.9);\n }\n}\n\n.suffix {\n transform: translateY(10%);\n}\n\n$xs: 8rem; //128px:\n$s: 18.75rem; //300px\n$m: 40.5rem; //648px\n$l: 62.5rem; //1000px\n\n@container (width < #{$xs}) {\n .progress {\n top: 0.25rem;\n right: 0.25rem;\n }\n a {\n padding: 0.375rem;\n gap: 0.125rem;\n }\n}\n\n@container (width < #{$s}) {\n .progress {\n top: 0.5rem;\n right: 0.5rem;\n }\n .icon {\n top: 0.25rem;\n right: 0.5rem;\n .has-circular-progress & {\n right: 0.25rem;\n bottom: 0.25rem;\n }\n }\n}\n\n@container (width < #{$m}) {\n .value {\n &.ch-1,\n &.ch-2,\n &.ch-3,\n &.ch-4 {\n --value-preferred-size: 20cqw;\n }\n &.ch-5 {\n --value-preferred-size: 18cqw;\n }\n &.ch-6 {\n --value-preferred-size: 17cqw;\n }\n &.ch-7 {\n --value-preferred-size: 16cqw;\n }\n &.ch-8 {\n --value-preferred-size: 15cqw;\n }\n &.ch-9 {\n --value-preferred-size: 14cqw;\n }\n --value-preferred-size: 13cqw;\n }\n}\n\n@container (height > #{$xs}) {\n a {\n padding-top: 0.75rem;\n padding-bottom: 1rem;\n }\n}\n\n@container (height < #{$xs}) and (width > #{$xs}) {\n .value {\n --value-preferred-size: 32cqh !important;\n }\n .suffix,\n .prefix {\n --suffix-prefix-preferred-size: 16cqh !important;\n }\n}\n\n@container (height > #{$s}) {\n .progress,\n .icon {\n position: relative;\n top: unset;\n right: unset;\n }\n a {\n align-items: center;\n justify-content: center;\n }\n .label {\n text-align: center;\n // -webkit-line-clamp: 3;\n }\n .has-circular-progress {\n .icon {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n --icon-max-size: 3rem;\n }\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\nimport { InfoTileProgress } from './info-tile.types';\nimport { Link } from '@limetech/lime-elements';\n\n/**\n * This component can be used on places such as a start page or a dashboard.\n * It offers features for visualizing aggregated data along with supplementary\n * information.\n *\n * If clicking on the component should navigate the user to\n * a new screen or web page, you need to provide a URL,\n * using the `link` property.\n * @exampleComponent limel-example-info-tile\n * @exampleComponent limel-example-info-tile-badge\n * @exampleComponent limel-example-info-tile-progress\n * @exampleComponent limel-example-info-tile-loading\n * @exampleComponent limel-example-info-tile-styling\n */\n@Component({\n tag: 'limel-info-tile',\n shadow: true,\n styleUrl: 'info-tile.scss',\n})\nexport class InfoTile {\n /**\n * A piece of text or number that is the main piece of information\n * which the component is intended to visualize.\n */\n @Prop({ reflect: true })\n public value: number | string;\n\n /**\n * Name of icon for the info tile.\n */\n @Prop()\n public icon?: string;\n\n /**\n * The text to show below the info tile. Long labels will be truncated.\n */\n @Prop({ reflect: true })\n public label?: string = null;\n\n /**\n * A string of text that is visually placed before the value.\n */\n @Prop({ reflect: true })\n public prefix?: string;\n\n /**\n * A string of text that is visually placed after the value.\n */\n @Prop({ reflect: true })\n public suffix?: string;\n\n /**\n * Set to `true` if info tile is disabled.\n */\n @Prop({ reflect: true })\n public disabled? = false;\n\n /**\n * If supplied, the info tile will display a notification badge.\n */\n @Prop({ reflect: true })\n public badge?: number | string;\n\n /**\n * Set to `true` to put the component in the `loading` state.\n * This does _not_ disable the link. To do so, the\n * `disabled` property should be set to `true` as well.\n */\n @Prop({ reflect: true })\n public loading? = false;\n\n /**\n * If supplied, the info tile will be a clickable link.\n *\n * Supplying a value also adds an elevated effect using a shadow,\n * as well as `cursor: pointer`, which appears on hover.\n * While we strongly recommend supplying a link whenever the\n * component should act as a link, if this is not possible, and\n * you need to provide interaction through a click handler,\n * you can still get the correct styling by supplying a `Link`\n * object with the `href` property set to `'#'`.\n */\n @Prop()\n public link?: Link;\n\n /**\n * Properties of the optional circular progress bar.\n *\n * Defaults:\n * - `maxValue`: 100\n * - `suffix`: %\n * - `displayPercentageColors`: false\n *\n * Colors change with intervals of 10 %.\n */\n @Prop()\n public progress?: InfoTileProgress;\n\n public render() {\n const extendedAriaLabel =\n this.checkProps(this?.prefix) +\n this.value +\n ' ' +\n this.checkProps(this?.suffix) +\n this.checkProps(this?.label) +\n '. ' +\n this.checkProps(this?.progress?.prefix) +\n this.checkProps(this?.progress?.value) +\n this.checkProps(this?.progress?.suffix) +\n this.checkProps(this?.link?.title);\n\n const link = !this.disabled ? this.link?.href : '#';\n\n return [\n <a\n title={this.link?.title}\n href={link}\n target={this.link?.target}\n tabindex=\"0\"\n aria-label={extendedAriaLabel}\n aria-disabled={this.disabled}\n class={{\n 'is-clickable': !!this.link?.href && !this.disabled,\n 'has-circular-progress':\n !!this.progress?.value || this.progress?.value === 0,\n }}\n >\n {this.renderIcon()}\n {this.renderProgress()}\n <div class=\"value-group\">\n {this.renderPrefix()}\n <div class=\"value-and-suffix\">\n {this.renderValue()}\n {this.renderSuffix()}\n </div>\n {this.renderSpinner()}\n </div>\n {this.renderLabel()}\n </a>,\n this.renderNotification(),\n ];\n }\n\n private checkProps(propValue) {\n return !propValue ? '' : propValue + ' ';\n }\n\n private renderPrefix = () => {\n if (this.prefix) {\n return <span class=\"prefix\">{this.prefix}</span>;\n }\n };\n\n private renderValue = () => {\n const characterCount = (this.value ?? '').toString().length;\n\n if (!this.value && this.loading) {\n return <span class=\"value\">···</span>;\n }\n\n if (this.value) {\n return (\n <span\n class={{\n value: true,\n [`ch-${characterCount}`]: true,\n }}\n >\n {this.value}\n </span>\n );\n }\n };\n\n private renderSuffix = () => {\n if (this.suffix) {\n return <span class=\"suffix\">{this.suffix}</span>;\n }\n };\n\n private renderIcon = () => {\n if (this.icon) {\n return <limel-icon class=\"icon\" name={this.icon} />;\n }\n };\n\n private renderProgress = () => {\n if (this.progress?.value || this.progress?.value === 0) {\n return (\n <limel-circular-progress\n class=\"progress\"\n prefix={this.progress.prefix}\n value={this.progress.value}\n suffix={this.progress.suffix}\n maxValue={this.progress.maxValue}\n displayPercentageColors={\n this.progress.displayPercentageColors\n }\n />\n );\n }\n };\n\n private renderLabel = () => {\n if (this.label) {\n return <span class=\"label\">{this.label}</span>;\n }\n };\n\n private renderNotification = () => {\n if (this.badge) {\n return <limel-badge label={this.badge} />;\n }\n };\n\n private renderSpinner = () => {\n if (this.loading) {\n return <limel-linear-progress indeterminate={true} />;\n }\n };\n}\n"],"version":3}
@@ -6,6 +6,33 @@
6
6
  *
7
7
  * Or, just don't import anything, that works too.
8
8
  */
9
+ /**
10
+ * This mixin will mask out the content that is close to
11
+ * the edges of a scrollable area.
12
+ * - If the scrollable content has `overflow-y`, use `vertically`
13
+ * as an argument for `$direction`.
14
+ - If the scrollable content has `overflow-x`, use `horizontally`
15
+ * as an argument for `$direction`.
16
+ *
17
+ * For the visual effect to work smoothly, we need to make sure that
18
+ * the size of the fade-out edge effect is the same as the
19
+ * internal paddings of the scrollable area. Otherwise, content of a
20
+ * scrollable area that does not have a padding will fade out before
21
+ * any scrolling has been done.
22
+ * This is why this mixin already adds paddings, which automatically
23
+ * default to the size of the fade-out effect.
24
+ * This size defaults to `1rem`, but to override the size use
25
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
26
+ * when `vertically` argument is set, and use
27
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
28
+ * when `horizontally` argument is set.
29
+ * Of course you can also programmatically increase and decrease the
30
+ * size of these variables for each edge, based on the amount of
31
+ * scrolling that has been done by the user. In this case, make sure
32
+ * to add a custom padding where the mixin is used, to override
33
+ * the paddings that are automatically added by the mixin in the
34
+ * compiled CSS code.
35
+ */
9
36
  /*
10
37
  * This file is imported into every component!
11
38
  *
@@ -72,6 +72,33 @@
72
72
  *
73
73
  * Or, just don't import anything, that works too.
74
74
  */
75
+ /**
76
+ * This mixin will mask out the content that is close to
77
+ * the edges of a scrollable area.
78
+ * - If the scrollable content has `overflow-y`, use `vertically`
79
+ * as an argument for `$direction`.
80
+ - If the scrollable content has `overflow-x`, use `horizontally`
81
+ * as an argument for `$direction`.
82
+ *
83
+ * For the visual effect to work smoothly, we need to make sure that
84
+ * the size of the fade-out edge effect is the same as the
85
+ * internal paddings of the scrollable area. Otherwise, content of a
86
+ * scrollable area that does not have a padding will fade out before
87
+ * any scrolling has been done.
88
+ * This is why this mixin already adds paddings, which automatically
89
+ * default to the size of the fade-out effect.
90
+ * This size defaults to `1rem`, but to override the size use
91
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
92
+ * when `vertically` argument is set, and use
93
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
94
+ * when `horizontally` argument is set.
95
+ * Of course you can also programmatically increase and decrease the
96
+ * size of these variables for each edge, based on the amount of
97
+ * scrolling that has been done by the user. In this case, make sure
98
+ * to add a custom padding where the mixin is used, to override
99
+ * the paddings that are automatically added by the mixin in the
100
+ * compiled CSS code.
101
+ */
75
102
  /**
76
103
  * @prop --badge-background-color: badge background color
77
104
  * @prop --badge-text-color: badge text color
@@ -6,6 +6,33 @@
6
6
  *
7
7
  * Or, just don't import anything, that works too.
8
8
  */
9
+ /**
10
+ * This mixin will mask out the content that is close to
11
+ * the edges of a scrollable area.
12
+ * - If the scrollable content has `overflow-y`, use `vertically`
13
+ * as an argument for `$direction`.
14
+ - If the scrollable content has `overflow-x`, use `horizontally`
15
+ * as an argument for `$direction`.
16
+ *
17
+ * For the visual effect to work smoothly, we need to make sure that
18
+ * the size of the fade-out edge effect is the same as the
19
+ * internal paddings of the scrollable area. Otherwise, content of a
20
+ * scrollable area that does not have a padding will fade out before
21
+ * any scrolling has been done.
22
+ * This is why this mixin already adds paddings, which automatically
23
+ * default to the size of the fade-out effect.
24
+ * This size defaults to `1rem`, but to override the size use
25
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
26
+ * when `vertically` argument is set, and use
27
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
28
+ * when `horizontally` argument is set.
29
+ * Of course you can also programmatically increase and decrease the
30
+ * size of these variables for each edge, based on the amount of
31
+ * scrolling that has been done by the user. In this case, make sure
32
+ * to add a custom padding where the mixin is used, to override
33
+ * the paddings that are automatically added by the mixin in the
34
+ * compiled CSS code.
35
+ */
9
36
  /**
10
37
  * @prop --breadcrumbs-item-text-color: Text color of breadcrumbs items, defaults to `--contrast-1100`.
11
38
  * @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.
@@ -18,8 +45,19 @@
18
45
  --breadcrumbs-item-text-color,
19
46
  rgb(var(--contrast-1500))
20
47
  );
21
- -webkit-mask-image: linear-gradient(to right, transparent 0%, black calc(0% + 0.5rem), black calc(100% - 0.5rem), transparent 100%);
22
- mask-image: linear-gradient(to right, transparent 0%, black calc(0% + 0.5rem), black calc(100% - 0.5rem), transparent 100%);
48
+ --limel-overflow-mask-horizontal: linear-gradient(
49
+ to right,
50
+ transparent 0%,
51
+ black calc(0% + var(--limel-left-edge-fade-width, 1rem)),
52
+ black calc(100% - var(--limel-right-edge-fade-width, 1rem)),
53
+ transparent 100%
54
+ );
55
+ -webkit-mask-image: var(--limel-overflow-mask-horizontal);
56
+ mask-image: var(--limel-overflow-mask-horizontal);
57
+ padding-left: var(--limel-left-edge-fade-width, 1rem);
58
+ padding-right: var(--limel-right-edge-fade-width, 1rem);
59
+ --limel-left-edge-fade-width: 0.5rem;
60
+ --limel-right-edge-fade-width: 0.5rem;
23
61
  }
24
62
 
25
63
  ol,
@@ -12,6 +12,33 @@
12
12
  *
13
13
  * Or, just don't import anything, that works too.
14
14
  */
15
+ /**
16
+ * This mixin will mask out the content that is close to
17
+ * the edges of a scrollable area.
18
+ * - If the scrollable content has `overflow-y`, use `vertically`
19
+ * as an argument for `$direction`.
20
+ - If the scrollable content has `overflow-x`, use `horizontally`
21
+ * as an argument for `$direction`.
22
+ *
23
+ * For the visual effect to work smoothly, we need to make sure that
24
+ * the size of the fade-out edge effect is the same as the
25
+ * internal paddings of the scrollable area. Otherwise, content of a
26
+ * scrollable area that does not have a padding will fade out before
27
+ * any scrolling has been done.
28
+ * This is why this mixin already adds paddings, which automatically
29
+ * default to the size of the fade-out effect.
30
+ * This size defaults to `1rem`, but to override the size use
31
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
32
+ * when `vertically` argument is set, and use
33
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
34
+ * when `horizontally` argument is set.
35
+ * Of course you can also programmatically increase and decrease the
36
+ * size of these variables for each edge, based on the amount of
37
+ * scrolling that has been done by the user. In this case, make sure
38
+ * to add a custom padding where the mixin is used, to override
39
+ * the paddings that are automatically added by the mixin in the
40
+ * compiled CSS code.
41
+ */
15
42
  /*
16
43
  * This file is imported into every component that uses MDC!
17
44
  *
@@ -72,6 +72,33 @@
72
72
  *
73
73
  * Or, just don't import anything, that works too.
74
74
  */
75
+ /**
76
+ * This mixin will mask out the content that is close to
77
+ * the edges of a scrollable area.
78
+ * - If the scrollable content has `overflow-y`, use `vertically`
79
+ * as an argument for `$direction`.
80
+ - If the scrollable content has `overflow-x`, use `horizontally`
81
+ * as an argument for `$direction`.
82
+ *
83
+ * For the visual effect to work smoothly, we need to make sure that
84
+ * the size of the fade-out edge effect is the same as the
85
+ * internal paddings of the scrollable area. Otherwise, content of a
86
+ * scrollable area that does not have a padding will fade out before
87
+ * any scrolling has been done.
88
+ * This is why this mixin already adds paddings, which automatically
89
+ * default to the size of the fade-out effect.
90
+ * This size defaults to `1rem`, but to override the size use
91
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
92
+ * when `vertically` argument is set, and use
93
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
94
+ * when `horizontally` argument is set.
95
+ * Of course you can also programmatically increase and decrease the
96
+ * size of these variables for each edge, based on the amount of
97
+ * scrolling that has been done by the user. In this case, make sure
98
+ * to add a custom padding where the mixin is used, to override
99
+ * the paddings that are automatically added by the mixin in the
100
+ * compiled CSS code.
101
+ */
75
102
  .mdc-touch-target-wrapper {
76
103
  display: inline;
77
104
  }
@@ -72,6 +72,33 @@
72
72
  *
73
73
  * Or, just don't import anything, that works too.
74
74
  */
75
+ /**
76
+ * This mixin will mask out the content that is close to
77
+ * the edges of a scrollable area.
78
+ * - If the scrollable content has `overflow-y`, use `vertically`
79
+ * as an argument for `$direction`.
80
+ - If the scrollable content has `overflow-x`, use `horizontally`
81
+ * as an argument for `$direction`.
82
+ *
83
+ * For the visual effect to work smoothly, we need to make sure that
84
+ * the size of the fade-out edge effect is the same as the
85
+ * internal paddings of the scrollable area. Otherwise, content of a
86
+ * scrollable area that does not have a padding will fade out before
87
+ * any scrolling has been done.
88
+ * This is why this mixin already adds paddings, which automatically
89
+ * default to the size of the fade-out effect.
90
+ * This size defaults to `1rem`, but to override the size use
91
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
92
+ * when `vertically` argument is set, and use
93
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
94
+ * when `horizontally` argument is set.
95
+ * Of course you can also programmatically increase and decrease the
96
+ * size of these variables for each edge, based on the amount of
97
+ * scrolling that has been done by the user. In this case, make sure
98
+ * to add a custom padding where the mixin is used, to override
99
+ * the paddings that are automatically added by the mixin in the
100
+ * compiled CSS code.
101
+ */
75
102
  .mdc-notched-outline {
76
103
  display: flex;
77
104
  position: absolute;
@@ -12,6 +12,33 @@
12
12
  *
13
13
  * Or, just don't import anything, that works too.
14
14
  */
15
+ /**
16
+ * This mixin will mask out the content that is close to
17
+ * the edges of a scrollable area.
18
+ * - If the scrollable content has `overflow-y`, use `vertically`
19
+ * as an argument for `$direction`.
20
+ - If the scrollable content has `overflow-x`, use `horizontally`
21
+ * as an argument for `$direction`.
22
+ *
23
+ * For the visual effect to work smoothly, we need to make sure that
24
+ * the size of the fade-out edge effect is the same as the
25
+ * internal paddings of the scrollable area. Otherwise, content of a
26
+ * scrollable area that does not have a padding will fade out before
27
+ * any scrolling has been done.
28
+ * This is why this mixin already adds paddings, which automatically
29
+ * default to the size of the fade-out effect.
30
+ * This size defaults to `1rem`, but to override the size use
31
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
32
+ * when `vertically` argument is set, and use
33
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
34
+ * when `horizontally` argument is set.
35
+ * Of course you can also programmatically increase and decrease the
36
+ * size of these variables for each edge, based on the amount of
37
+ * scrolling that has been done by the user. In this case, make sure
38
+ * to add a custom padding where the mixin is used, to override
39
+ * the paddings that are automatically added by the mixin in the
40
+ * compiled CSS code.
41
+ */
15
42
  /*
16
43
  * This file is imported into every component that uses MDC!
17
44
  *
@@ -452,6 +452,33 @@ span.CodeMirror-selectedtext { background: none; }
452
452
  *
453
453
  * Or, just don't import anything, that works too.
454
454
  */
455
+ /**
456
+ * This mixin will mask out the content that is close to
457
+ * the edges of a scrollable area.
458
+ * - If the scrollable content has `overflow-y`, use `vertically`
459
+ * as an argument for `$direction`.
460
+ - If the scrollable content has `overflow-x`, use `horizontally`
461
+ * as an argument for `$direction`.
462
+ *
463
+ * For the visual effect to work smoothly, we need to make sure that
464
+ * the size of the fade-out edge effect is the same as the
465
+ * internal paddings of the scrollable area. Otherwise, content of a
466
+ * scrollable area that does not have a padding will fade out before
467
+ * any scrolling has been done.
468
+ * This is why this mixin already adds paddings, which automatically
469
+ * default to the size of the fade-out effect.
470
+ * This size defaults to `1rem`, but to override the size use
471
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
472
+ * when `vertically` argument is set, and use
473
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
474
+ * when `horizontally` argument is set.
475
+ * Of course you can also programmatically increase and decrease the
476
+ * size of these variables for each edge, based on the amount of
477
+ * scrolling that has been done by the user. In this case, make sure
478
+ * to add a custom padding where the mixin is used, to override
479
+ * the paddings that are automatically added by the mixin in the
480
+ * compiled CSS code.
481
+ */
455
482
  /**
456
483
  * @prop --code-editor-max-height: Defines how tall the code editor can get before content becomes scrollable, defaults to `10rem`.
457
484
  * @prop --code-editor-font-size: Defines the font size of the code, defaults to `0.875rem`.
@@ -72,6 +72,33 @@
72
72
  *
73
73
  * Or, just don't import anything, that works too.
74
74
  */
75
+ /**
76
+ * This mixin will mask out the content that is close to
77
+ * the edges of a scrollable area.
78
+ * - If the scrollable content has `overflow-y`, use `vertically`
79
+ * as an argument for `$direction`.
80
+ - If the scrollable content has `overflow-x`, use `horizontally`
81
+ * as an argument for `$direction`.
82
+ *
83
+ * For the visual effect to work smoothly, we need to make sure that
84
+ * the size of the fade-out edge effect is the same as the
85
+ * internal paddings of the scrollable area. Otherwise, content of a
86
+ * scrollable area that does not have a padding will fade out before
87
+ * any scrolling has been done.
88
+ * This is why this mixin already adds paddings, which automatically
89
+ * default to the size of the fade-out effect.
90
+ * This size defaults to `1rem`, but to override the size use
91
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
92
+ * when `vertically` argument is set, and use
93
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
94
+ * when `horizontally` argument is set.
95
+ * Of course you can also programmatically increase and decrease the
96
+ * size of these variables for each edge, based on the amount of
97
+ * scrolling that has been done by the user. In this case, make sure
98
+ * to add a custom padding where the mixin is used, to override
99
+ * the paddings that are automatically added by the mixin in the
100
+ * compiled CSS code.
101
+ */
75
102
  /**
76
103
  * @prop --closed-header-background-color: background color for header when closed
77
104
  * @prop --open-header-background-color: background color for header when open
@@ -590,6 +590,33 @@
590
590
  *
591
591
  * Or, just don't import anything, that works too.
592
592
  */
593
+ /**
594
+ * This mixin will mask out the content that is close to
595
+ * the edges of a scrollable area.
596
+ * - If the scrollable content has `overflow-y`, use `vertically`
597
+ * as an argument for `$direction`.
598
+ - If the scrollable content has `overflow-x`, use `horizontally`
599
+ * as an argument for `$direction`.
600
+ *
601
+ * For the visual effect to work smoothly, we need to make sure that
602
+ * the size of the fade-out edge effect is the same as the
603
+ * internal paddings of the scrollable area. Otherwise, content of a
604
+ * scrollable area that does not have a padding will fade out before
605
+ * any scrolling has been done.
606
+ * This is why this mixin already adds paddings, which automatically
607
+ * default to the size of the fade-out effect.
608
+ * This size defaults to `1rem`, but to override the size use
609
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
610
+ * when `vertically` argument is set, and use
611
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
612
+ * when `horizontally` argument is set.
613
+ * Of course you can also programmatically increase and decrease the
614
+ * size of these variables for each edge, based on the amount of
615
+ * scrolling that has been done by the user. In this case, make sure
616
+ * to add a custom padding where the mixin is used, to override
617
+ * the paddings that are automatically added by the mixin in the
618
+ * compiled CSS code.
619
+ */
593
620
  /**
594
621
  * Note! This file is exported to `dist/scss/` in the published
595
622
  * node module, for consumer projects to import.
@@ -598,6 +625,33 @@
598
625
  *
599
626
  * Or, just don't import anything, that works too.
600
627
  */
628
+ /**
629
+ * This mixin will mask out the content that is close to
630
+ * the edges of a scrollable area.
631
+ * - If the scrollable content has `overflow-y`, use `vertically`
632
+ * as an argument for `$direction`.
633
+ - If the scrollable content has `overflow-x`, use `horizontally`
634
+ * as an argument for `$direction`.
635
+ *
636
+ * For the visual effect to work smoothly, we need to make sure that
637
+ * the size of the fade-out edge effect is the same as the
638
+ * internal paddings of the scrollable area. Otherwise, content of a
639
+ * scrollable area that does not have a padding will fade out before
640
+ * any scrolling has been done.
641
+ * This is why this mixin already adds paddings, which automatically
642
+ * default to the size of the fade-out effect.
643
+ * This size defaults to `1rem`, but to override the size use
644
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
645
+ * when `vertically` argument is set, and use
646
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
647
+ * when `horizontally` argument is set.
648
+ * Of course you can also programmatically increase and decrease the
649
+ * size of these variables for each edge, based on the amount of
650
+ * scrolling that has been done by the user. In this case, make sure
651
+ * to add a custom padding where the mixin is used, to override
652
+ * the paddings that are automatically added by the mixin in the
653
+ * compiled CSS code.
654
+ */
601
655
  .picker-trigger[style="--background:lime-magenta;"]:after,
602
656
  .chosen-color-preview[style="--background:lime-magenta;"]:after {
603
657
  background-color: var(--lime-magenta);
@@ -6,6 +6,33 @@
6
6
  *
7
7
  * Or, just don't import anything, that works too.
8
8
  */
9
+ /**
10
+ * This mixin will mask out the content that is close to
11
+ * the edges of a scrollable area.
12
+ * - If the scrollable content has `overflow-y`, use `vertically`
13
+ * as an argument for `$direction`.
14
+ - If the scrollable content has `overflow-x`, use `horizontally`
15
+ * as an argument for `$direction`.
16
+ *
17
+ * For the visual effect to work smoothly, we need to make sure that
18
+ * the size of the fade-out edge effect is the same as the
19
+ * internal paddings of the scrollable area. Otherwise, content of a
20
+ * scrollable area that does not have a padding will fade out before
21
+ * any scrolling has been done.
22
+ * This is why this mixin already adds paddings, which automatically
23
+ * default to the size of the fade-out effect.
24
+ * This size defaults to `1rem`, but to override the size use
25
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
26
+ * when `vertically` argument is set, and use
27
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
28
+ * when `horizontally` argument is set.
29
+ * Of course you can also programmatically increase and decrease the
30
+ * size of these variables for each edge, based on the amount of
31
+ * scrolling that has been done by the user. In this case, make sure
32
+ * to add a custom padding where the mixin is used, to override
33
+ * the paddings that are automatically added by the mixin in the
34
+ * compiled CSS code.
35
+ */
9
36
  .picker-trigger[style="--background:lime-magenta;"]:after,
10
37
  .chosen-color-preview[style="--background:lime-magenta;"]:after {
11
38
  background-color: var(--lime-magenta);
@@ -72,6 +72,33 @@
72
72
  *
73
73
  * Or, just don't import anything, that works too.
74
74
  */
75
+ /**
76
+ * This mixin will mask out the content that is close to
77
+ * the edges of a scrollable area.
78
+ * - If the scrollable content has `overflow-y`, use `vertically`
79
+ * as an argument for `$direction`.
80
+ - If the scrollable content has `overflow-x`, use `horizontally`
81
+ * as an argument for `$direction`.
82
+ *
83
+ * For the visual effect to work smoothly, we need to make sure that
84
+ * the size of the fade-out edge effect is the same as the
85
+ * internal paddings of the scrollable area. Otherwise, content of a
86
+ * scrollable area that does not have a padding will fade out before
87
+ * any scrolling has been done.
88
+ * This is why this mixin already adds paddings, which automatically
89
+ * default to the size of the fade-out effect.
90
+ * This size defaults to `1rem`, but to override the size use
91
+ * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
92
+ * when `vertically` argument is set, and use
93
+ * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
94
+ * when `horizontally` argument is set.
95
+ * Of course you can also programmatically increase and decrease the
96
+ * size of these variables for each edge, based on the amount of
97
+ * scrolling that has been done by the user. In this case, make sure
98
+ * to add a custom padding where the mixin is used, to override
99
+ * the paddings that are automatically added by the mixin in the
100
+ * compiled CSS code.
101
+ */
75
102
  :root {
76
103
  --mdc-theme-primary: #26a69a;
77
104
  --mdc-theme-secondary: #575756;