@limetech/lime-elements 38.3.2 → 38.3.3
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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/limel-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +16 -0
- package/dist/collection/components/badge/badge.css +16 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.css +16 -0
- package/dist/collection/components/button/button.css +16 -0
- package/dist/collection/components/button-group/button-group.css +16 -0
- package/dist/collection/components/card/card.css +16 -0
- package/dist/collection/components/chart/chart.css +32 -0
- package/dist/collection/components/checkbox/checkbox.css +16 -0
- package/dist/collection/components/chip/chip.css +16 -0
- package/dist/collection/components/chip-set/chip-set.css +32 -0
- package/dist/collection/components/circular-progress/circular-progress.css +16 -0
- package/dist/collection/components/code-editor/code-editor.css +16 -0
- package/dist/collection/components/collapsible-section/collapsible-section.css +16 -0
- package/dist/collection/components/color-picker/color-picker-palette.css +32 -0
- package/dist/collection/components/color-picker/color-picker.css +16 -0
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +16 -0
- package/dist/collection/components/dialog/dialog.css +16 -0
- package/dist/collection/components/dock/dock-button/dock-button.css +16 -0
- package/dist/collection/components/dock/dock.css +16 -0
- package/dist/collection/components/file/file.css +16 -0
- package/dist/collection/components/file-viewer/file-viewer.css +16 -0
- package/dist/collection/components/form/form.css +16 -0
- package/dist/collection/components/header/header.css +16 -0
- package/dist/collection/components/help/help.css +16 -0
- package/dist/collection/components/help/limel-help-content.css +16 -0
- package/dist/collection/components/icon-button/icon-button.css +16 -0
- package/dist/collection/components/info-tile/info-tile.css +16 -0
- package/dist/collection/components/input-field/input-field.css +16 -0
- package/dist/collection/components/list/list.css +80 -0
- package/dist/collection/components/markdown/markdown.css +32 -0
- package/dist/collection/components/menu-list/menu-list.css +80 -0
- package/dist/collection/components/popover-surface/popover-surface.css +16 -0
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +16 -0
- package/dist/collection/components/select/select.css +32 -0
- package/dist/collection/components/shortcut/shortcut.css +16 -0
- package/dist/collection/components/slider/slider.css +16 -0
- package/dist/collection/components/split-button/split-button.css +16 -0
- package/dist/collection/components/switch/switch.css +16 -0
- package/dist/collection/components/table/table.css +64 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +48 -0
- package/dist/collection/components/text-editor/text-editor.css +16 -0
- package/dist/collection/style/mixins.scss +60 -0
- package/dist/esm/limel-dialog.entry.js.map +1 -1
- package/dist/esm/limel-info-tile.entry.js +1 -1
- package/dist/esm/limel-info-tile.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-89eaca66.entry.js.map +1 -1
- package/dist/lime-elements/p-ece3a0f5.entry.js +2 -0
- package/dist/lime-elements/{p-2963426c.entry.js.map → p-ece3a0f5.entry.js.map} +1 -1
- package/dist/lime-elements/style/mixins.scss +60 -0
- package/dist/scss/mixins.scss +60 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-2963426c.entry.js +0 -2
package/dist/scss/mixins.scss
CHANGED
|
@@ -542,3 +542,63 @@ $clickable-normal-state-transitions: (
|
|
|
542
542
|
box-shadow: var(--shadow-depth-8-focused), var(--button-shadow-pressed);
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* The breakpoints below are used to create responsive designs
|
|
548
|
+
* in Lime's products. Therefore, they are here to get distributed
|
|
549
|
+
* to all components in other private repos, which rely on this `mixins`
|
|
550
|
+
* file, to create consistent styles.
|
|
551
|
+
*
|
|
552
|
+
* :::important
|
|
553
|
+
* In very rare cases you should used media queries!
|
|
554
|
+
* Nowadays, there are many better ways of achieving responsive design
|
|
555
|
+
* without media queries. For example, using CSS Grid, Flexbox, and their features.
|
|
556
|
+
* :::
|
|
557
|
+
*/
|
|
558
|
+
$narrow-viewport-breakpoint: 800px;
|
|
559
|
+
$medium-viewport-breakpoint: 1023px;
|
|
560
|
+
// At this breakpoint, `limel-dialog` switches the layout of `slot="button"`
|
|
561
|
+
// and stretches the buttons to full-width.
|
|
562
|
+
$narrow-dialog-breakpoint: 760px;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Media query mixins for responsive design based on screen width.
|
|
566
|
+
* Note that these mixins do not detect the device type!
|
|
567
|
+
*/
|
|
568
|
+
@mixin when-viewport-width-is-narrow {
|
|
569
|
+
// What our products consider as mobile (held in portrait mode)
|
|
570
|
+
@media (max-width: #{$narrow-viewport-breakpoint}) {
|
|
571
|
+
@content;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
@mixin when-viewport-width-is-not-narrow {
|
|
576
|
+
// Wider than what our products consider as mobile (held in portrait mode)
|
|
577
|
+
@media (min-width: #{$narrow-viewport-breakpoint + 1px}) {
|
|
578
|
+
@content;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
@mixin when-viewport-width-is-medium {
|
|
583
|
+
// What our products consider as to be bigger than a phone,
|
|
584
|
+
// but not bigger than a tablet (held in landscape mode)
|
|
585
|
+
// or a small laptop screen.
|
|
586
|
+
@media (min-width: #{$narrow-viewport-breakpoint + 1px}) and (max-width: #{$medium-viewport-breakpoint}) {
|
|
587
|
+
@content;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
@mixin when-viewport-width-is-not-large {
|
|
592
|
+
// What our products consider as a phone,
|
|
593
|
+
// or a small tablet (held in landscape mode) or a small laptop screen.
|
|
594
|
+
@media (max-width: #{$medium-viewport-breakpoint}) {
|
|
595
|
+
@content;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
@mixin when-viewport-width-is-large {
|
|
600
|
+
// What our products consider wider than tablet (held in landscape mode)
|
|
601
|
+
@media (min-width: #{$medium-viewport-breakpoint + 1px}) {
|
|
602
|
+
@content;
|
|
603
|
+
}
|
|
604
|
+
}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,h as n,H as i,g as o}from"./p-443111b3.js";import{g as r}from"./p-e1e25236.js";const t="@charset \"UTF-8\";\n/**\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 can be used on a trigger element that opens a dropdown menu or a popover.\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* This mixin will add an animated underline to the bottom of an `a` elements.\n* Note that you may need to add `all: unset;` –depending on your use case–\n* before using this mixin.\n*/\n/**\n* This mixin creates a cross-browser font stack.\n* - `sans-serif` can be used for the UI of the components.\n* - `monospace` can be used for code.\n*\n* ⚠️ If we change the font stacks, we need to update\n* 1. the consumer documentation in `README.md`, and\n* 2. the CSS variables of `--kompendium-example-font-family`\n* in the `<style>` tag of `index.html`.\n*/\n/**\n* This mixin is a hack, using old CSS syntax\n* to enable you to truncate a piece of text,\n* after a certain number of lines.\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 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}\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}\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}\nlimel-3d-hover-effect-glow {\n border-radius: var(--info-tile-border-radius, 1rem);\n}\n\n:host(limel-info-tile) {\n isolation: isolate;\n transform-style: preserve-3d;\n perspective: 1000px;\n}\n@media (prefers-reduced-motion) {\n :host(limel-info-tile) {\n perspective: 2000px;\n }\n}\n\na {\n position: relative;\n transition-duration: 0.8s;\n transition-property: transform, box-shadow, background-color;\n transition-timing-function: ease-out;\n transform: scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);\n}\na:focus {\n outline: none;\n}\na:hover, a:focus, a:focus-visible, a:focus-within {\n will-change: background-color, box-shadow, transform;\n}\na:hover, a:focus, a:focus-visible, a:active {\n transition-duration: 0.2s;\n}\na:hover, a:focus-visible {\n box-shadow: var(--button-shadow-hovered), var(--shadow-depth-16);\n}\na:hover {\n transform: scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d));\n}\na:focus-visible {\n outline: none;\n transform: scale3d(1.01, 1.01, 1.01);\n}\na:hover limel-3d-hover-effect-glow {\n --limel-3d-hover-effect-glow-opacity: 0.5;\n}\n@media (prefers-reduced-motion) {\n a:hover limel-3d-hover-effect-glow {\n --limel-3d-hover-effect-glow-opacity: 0.2;\n }\n}\na.is-clickable {\n cursor: pointer;\n box-shadow: var(--button-shadow-normal);\n}\na.is-clickable:hover, a.is-clickable:focus-visible {\n box-shadow: var(--button-shadow-hovered), var(--shadow-depth-16);\n}\na.is-clickable:active {\n transform: scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);\n box-shadow: var(--button-shadow-pressed);\n}\na.is-clickable:focus-visible {\n box-shadow: var(--shadow-depth-8-focused), var(--button-shadow-hovered);\n}\na.is-clickable:focus-visible:active {\n box-shadow: var(--shadow-depth-8-focused), var(--button-shadow-pressed);\n}";const s=class{constructor(i){e(this,i);this.renderPrefix=()=>{if(this.prefix){return n("span",{class:"prefix"},this.prefix)}};this.renderValue=()=>{var e;const i=((e=this.value)!==null&&e!==void 0?e:"").toString().length;if(!this.value&&this.loading){return n("span",{class:"value"},"···")}if(this.value){return n("span",{class:{value:true,[`ch-${i}`]:true}},this.value)}};this.renderSuffix=()=>{if(this.suffix){return n("span",{class:"suffix"},this.suffix)}};this.renderIcon=()=>{if(this.icon){return n("limel-icon",{class:"icon",name:this.icon})}};this.renderProgress=()=>{var e,i;if(((e=this.progress)===null||e===void 0?void 0:e.value)||((i=this.progress)===null||i===void 0?void 0:i.value)===0){return n("limel-circular-progress",{class:"progress",prefix:this.progress.prefix,value:this.progress.value,suffix:this.progress.suffix,maxValue:this.progress.maxValue,displayPercentageColors:this.progress.displayPercentageColors})}};this.renderLabel=()=>{if(this.label){return n("span",{class:"label"},this.label)}};this.renderNotification=()=>{if(this.badge){return n("limel-badge",{label:this.badge})}};this.renderSpinner=()=>{if(this.loading){return n("limel-linear-progress",{indeterminate:true})}};this.value=undefined;this.icon=undefined;this.label=null;this.prefix=undefined;this.suffix=undefined;this.disabled=false;this.badge=undefined;this.loading=false;this.link=undefined;this.progress=undefined}componentWillLoad(){const{handleMouseEnter:e,handleMouseLeave:n}=r(this.host);this.handleMouseEnter=e;this.handleMouseLeave=n}render(){var e,o,r,t,s,a,l,c,d,h;const f=this.checkProps(this===null||this===void 0?void 0:this.prefix)+this.value+" "+this.checkProps(this===null||this===void 0?void 0:this.suffix)+this.checkProps(this===null||this===void 0?void 0:this.label)+". "+this.checkProps((e=this===null||this===void 0?void 0:this.progress)===null||e===void 0?void 0:e.prefix)+this.checkProps((o=this===null||this===void 0?void 0:this.progress)===null||o===void 0?void 0:o.value)+this.checkProps((r=this===null||this===void 0?void 0:this.progress)===null||r===void 0?void 0:r.suffix)+this.checkProps((t=this===null||this===void 0?void 0:this.link)===null||t===void 0?void 0:t.title);const u=!this.disabled?(s=this.link)===null||s===void 0?void 0:s.href:"#";return n(i,{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},n("a",{title:(a=this.link)===null||a===void 0?void 0:a.title,href:u,target:(l=this.link)===null||l===void 0?void 0:l.target,tabindex:"0","aria-label":f,"aria-disabled":this.disabled,"aria-busy":this.loading?"true":"false","aria-live":"polite",class:{"is-clickable":!!((c=this.link)===null||c===void 0?void 0:c.href)&&!this.disabled,"has-circular-progress":!!((d=this.progress)===null||d===void 0?void 0:d.value)||((h=this.progress)===null||h===void 0?void 0:h.value)===0}},this.renderIcon(),this.renderProgress(),n("div",{class:"value-group"},this.renderPrefix(),n("div",{class:"value-and-suffix"},this.renderValue(),this.renderSuffix()),this.renderSpinner()),this.renderLabel(),n("limel-3d-hover-effect-glow",null)),this.renderNotification())}checkProps(e){return!e?"":e+" "}get host(){return o(this)}};s.style=t;export{s as limel_info_tile};
|
|
2
|
-
//# sourceMappingURL=p-2963426c.entry.js.map
|