@limetech/lime-elements 39.5.6 → 39.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,7 @@ import { ActionBarItem } from '../action-bar/action-bar.types';
12
12
  * @exampleComponent limel-example-card-image
13
13
  * @exampleComponent limel-example-card-actions
14
14
  * @exampleComponent limel-example-card-clickable
15
+ * @exampleComponent limel-example-card-3d-effect
15
16
  * @exampleComponent limel-example-card-selected
16
17
  * @exampleComponent limel-example-card-orientation
17
18
  * @exampleComponent limel-example-card-slot
@@ -63,6 +64,11 @@ export declare class Card {
63
64
  * Should be used together with `clickable` to let users toggle selection.
64
65
  */
65
66
  selected: boolean;
67
+ /**
68
+ * When `true`, the card displays a glow effect on hover,
69
+ * following the 3D tilt hover effect.
70
+ */
71
+ show3dEffect: boolean;
66
72
  /**
67
73
  * Fired when a action bar item has been clicked.
68
74
  */
@@ -432,6 +432,7 @@ export namespace Components {
432
432
  * @exampleComponent limel-example-card-image
433
433
  * @exampleComponent limel-example-card-actions
434
434
  * @exampleComponent limel-example-card-clickable
435
+ * @exampleComponent limel-example-card-3d-effect
435
436
  * @exampleComponent limel-example-card-selected
436
437
  * @exampleComponent limel-example-card-orientation
437
438
  * @exampleComponent limel-example-card-slot
@@ -471,6 +472,11 @@ export namespace Components {
471
472
  * @default false
472
473
  */
473
474
  "selected": boolean;
475
+ /**
476
+ * When `true`, the card displays a glow effect on hover, following the 3D tilt hover effect.
477
+ * @default true
478
+ */
479
+ "show3dEffect": boolean;
474
480
  /**
475
481
  * Subheading of the card to provide a short description of the context.
476
482
  */
@@ -4240,6 +4246,7 @@ declare global {
4240
4246
  * @exampleComponent limel-example-card-image
4241
4247
  * @exampleComponent limel-example-card-actions
4242
4248
  * @exampleComponent limel-example-card-clickable
4249
+ * @exampleComponent limel-example-card-3d-effect
4243
4250
  * @exampleComponent limel-example-card-selected
4244
4251
  * @exampleComponent limel-example-card-orientation
4245
4252
  * @exampleComponent limel-example-card-slot
@@ -6624,6 +6631,7 @@ declare namespace LocalJSX {
6624
6631
  * @exampleComponent limel-example-card-image
6625
6632
  * @exampleComponent limel-example-card-actions
6626
6633
  * @exampleComponent limel-example-card-clickable
6634
+ * @exampleComponent limel-example-card-3d-effect
6627
6635
  * @exampleComponent limel-example-card-selected
6628
6636
  * @exampleComponent limel-example-card-orientation
6629
6637
  * @exampleComponent limel-example-card-slot
@@ -6667,6 +6675,11 @@ declare namespace LocalJSX {
6667
6675
  * @default false
6668
6676
  */
6669
6677
  "selected"?: boolean;
6678
+ /**
6679
+ * When `true`, the card displays a glow effect on hover, following the 3D tilt hover effect.
6680
+ * @default true
6681
+ */
6682
+ "show3dEffect"?: boolean;
6670
6683
  /**
6671
6684
  * Subheading of the card to provide a short description of the context.
6672
6685
  */
@@ -10325,6 +10338,7 @@ declare namespace LocalJSX {
10325
10338
  "clickable": boolean;
10326
10339
  "orientation": 'landscape' | 'portrait';
10327
10340
  "selected": boolean;
10341
+ "show3dEffect": boolean;
10328
10342
  }
10329
10343
  interface LimelChartAttributes {
10330
10344
  "language": Languages;
@@ -11091,6 +11105,7 @@ declare module "@stencil/core" {
11091
11105
  * @exampleComponent limel-example-card-image
11092
11106
  * @exampleComponent limel-example-card-actions
11093
11107
  * @exampleComponent limel-example-card-clickable
11108
+ * @exampleComponent limel-example-card-3d-effect
11094
11109
  * @exampleComponent limel-example-card-selected
11095
11110
  * @exampleComponent limel-example-card-orientation
11096
11111
  * @exampleComponent limel-example-card-slot
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "39.5.6",
3
+ "version": "39.6.0",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -1 +0,0 @@
1
- import{r as e,c as r,h as i,H as t,a as o}from"./p-DBTJNfo7.js";import{i as a}from"./p-CrvUOVvg.js";import{g as s}from"./p-CgNJbSP4.js";import{g as n}from"./p-5eP2N9QI.js";const d=class{constructor(i){e(this,i),this.actionSelected=r(this,"actionSelected"),this.actions=[],this.clickable=!1,this.orientation="portrait",this.selected=!1,this.canScrollUp=!1,this.canScrollDown=!1,this.setMarkdownElement=e=>{var r;e!==this.markdownElement&&(this.markdownElement&&(null===(r=this.markdownResizeObserver)||void 0===r||r.disconnect(),this.markdownElement.removeEventListener("scroll",this.checkIfScrollable)),this.markdownElement=e,this.markdownElement&&(this.markdownResizeObserver=new ResizeObserver(this.checkIfScrollable),this.markdownResizeObserver.observe(this.markdownElement),this.markdownElement.addEventListener("scroll",this.checkIfScrollable,{passive:!0}),this.checkIfScrollable()))},this.checkIfScrollable=()=>{if(!this.markdownElement)return;const e=this.markdownElement.scrollHeight,r=this.markdownElement.clientHeight,i=this.markdownElement.scrollTop,t=e>r,o=t&&!(i+r>=e-2),a=t&&!(i<=1);this.canScrollDown!==o&&(this.canScrollDown=o),this.canScrollUp!==a&&(this.canScrollUp=a)},this.handleActionSelect=e=>{e.stopPropagation(),a(e.detail)&&this.actionSelected.emit(e.detail)},this.handleKeyDown=e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.host.click()))}}componentWillLoad(){const{handleMouseEnter:e,handleMouseLeave:r}=n(this.host);this.handleMouseEnter=e,this.handleMouseLeave=r}disconnectedCallback(){var e,r;null===(e=this.markdownResizeObserver)||void 0===e||e.disconnect(),null===(r=this.markdownElement)||void 0===r||r.removeEventListener("scroll",this.checkIfScrollable)}componentDidLoad(){this.setMarkdownElement(this.markdownElement)}render(){return i(t,{key:"a2dafb50c62b195eaa6e113c9fe19d86469e9a50",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},i("section",{key:"a49f867517ad28fd7a2cdfc4c55310c2efac8e11",tabindex:this.clickable?0:void 0,role:this.clickable?"button":void 0,"aria-pressed":this.clickable?String(this.selected):void 0,onKeyDown:this.clickable?this.handleKeyDown:void 0},this.renderImage(),i("div",{key:"349b4d6fee7d71c67143298e8fcff4b833d38357",class:"body"},this.renderHeader(),this.renderSlot(),this.renderValue(),this.renderActionBar()),i("limel-3d-hover-effect-glow",{key:"252edc2030a277a808ea5cd200b0c54c7eb9c8a6"})))}renderImage(){var e;if(null===(e=this.image)||void 0===e?void 0:e.src)return i("div",{class:"image-wrapper"},i("img",{src:this.image.src,alt:this.image.alt,loading:"lazy"}))}renderHeader(){if(this.heading||this.subheading||this.icon)return i("header",null,this.renderIcon(),i("div",{class:"headings"},this.renderHeading(),this.renderSubheading()))}renderIcon(){var e;const r=s(this.icon),t="string"==typeof this.icon||null===(e=this.icon)||void 0===e?void 0:e.color;if(r)return i("limel-icon",{style:{color:`${t}`},badge:!0,name:r})}renderHeading(){if(this.heading)return i("h1",{class:"title"},this.heading)}renderSubheading(){if(this.subheading)return i("h2",null,this.subheading)}renderSlot(){return i("slot",{name:"component"})}renderValue(){if(this.value)return i("div",{class:{"markdown-wrapper":!0,"can-scroll-up":this.canScrollUp,"can-scroll-down":this.canScrollDown}},i("limel-markdown",{class:"body-text",ref:this.setMarkdownElement,value:this.value}))}renderActionBar(){if(0!==this.actions.length)return i("limel-action-bar",{actions:this.actions,onItemSelected:this.handleActionSelect})}get host(){return o(this)}};d.style='@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.image-wrapper{flex-shrink:0;display:flex;align-items:center;justify-content:center}:host(limel-card[orientation=portrait]) .image-wrapper{width:100%}:host(limel-card[orientation=landscape]) .image-wrapper{flex-shrink:0;max-width:40%;height:100%}:host(limel-card[orientation=landscape]) .image-wrapper img{height:100%}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4);min-width:0.5rem;min-height:0.5rem;max-width:100%;max-height:100%}section:hover img,section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card){perspective:2000px}}section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}section:focus{outline:none}section:hover,section:focus,section:focus-visible,section:focus-within{will-change:background-color, box-shadow, transform}section:hover,section:focus,section:focus-visible,section:active{transition-duration:0.2s}section:hover,section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}:host(limel-card[selected]) section,:host(limel-card[selected]) section:hover,:host(limel-card[selected]) section:focus-visible,:host(limel-card[selected]) section:active{box-shadow:var(--shadow-focused-state)}';export{d as limel_card}