@florid-kit/components 0.10.14 → 0.10.15

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 (3) hide show
  1. package/index.js +84 -80
  2. package/index.mjs +84 -80
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1654,57 +1654,48 @@
1654
1654
  display: none;
1655
1655
  }
1656
1656
  `;G([a({type:Array,reflect:!0})],T.prototype,"options",2);G([a({type:String,reflect:!0})],T.prototype,"value",2);G([a({type:String,reflect:!0})],T.prototype,"name",2);G([a({type:Boolean,reflect:!0})],T.prototype,"disabled",2);G([a({type:String,reflect:!0})],T.prototype,"width",2);G([W()],T.prototype,"open",2);G([W()],T.prototype,"activeIndex",2);G([W()],T.prototype,"menuWidth",2);T=G([g("o-dropdown")],T);var si=Object.getOwnPropertyDescriptor,ai=(o,t,e,r)=>{for(var i=r>1?void 0:r?si(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=s(i)||i);return i};let Nt=class extends p{render(){return l` <span class="dots"></span> `}};Nt.styles=f`
1657
- :host {
1658
- display: flex;
1659
- align-items: center;
1660
- justify-content: center;
1661
- height: 20px;
1662
- width: 20px;
1663
- .dots {
1664
- display: inline-block;
1665
- width: 6px;
1666
- height: 6px;
1667
- border-radius: 50%;
1668
- cursor: pointer;
1669
- border: 1px solid var(--color-border-primary);
1670
- box-sizing: border-box;
1671
- background-color: var(--color-container-action-secondary-default);
1672
- }
1673
- }
1657
+ :host {
1658
+ display: flex;
1659
+ align-items: center;
1660
+ justify-content: center;
1661
+ height: 20px;
1662
+ width: 20px;
1663
+ }
1674
1664
 
1675
- :host(:hover) {
1676
- .dots {
1677
- background-color: var(--color-container-action-secondary-hover);
1678
- }
1679
- }
1665
+ .dots {
1666
+ display: inline-block;
1667
+ width: 6px;
1668
+ height: 6px;
1669
+ border-radius: 50%;
1670
+ cursor: pointer;
1671
+ border: 1px solid var(--color-border-primary);
1672
+ box-sizing: border-box;
1673
+ background-color: var(--color-container-action-secondary-default);
1674
+ }
1680
1675
 
1681
- :host(:active) {
1682
- .dots {
1683
- background-color: var(--color-container-action-secondary-pressed);
1684
- }
1685
- }
1676
+ :host(:hover) .dots {
1677
+ background-color: var(--color-container-action-secondary-hover);
1678
+ }
1686
1679
 
1687
- :host([aria-current="true"]) {
1688
- .dots {
1689
- background-color: var(--color-container-action-primary-default);
1690
- border: 0.5px solid var(--color-border-white);
1691
- width: 8px;
1692
- height: 8px;
1693
- }
1694
- }
1680
+ :host(:active) .dots {
1681
+ background-color: var(--color-container-action-secondary-pressed);
1682
+ }
1695
1683
 
1696
- :host([aria-current="true"]:hover) {
1697
- .dots {
1698
- background-color: var(--color-container-action-primary-hover);
1699
- }
1700
- }
1684
+ :host([aria-current="true"]) .dots {
1685
+ background-color: var(--color-container-action-primary-default);
1686
+ border: 0.5px solid var(--color-border-white);
1687
+ width: 8px;
1688
+ height: 8px;
1689
+ }
1701
1690
 
1702
- :host([aria-current="true"]:active) {
1703
- .dots {
1704
- background-color: var(--color-container-action-primary-pressed);
1705
- }
1706
- }
1707
- `;Nt=ai([g("o-dots")],Nt);var li=Object.defineProperty,ci=Object.getOwnPropertyDescriptor,U=(o,t,e,r)=>{for(var i=r>1?void 0:r?ci(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&li(t,e,i),i};let z=class extends p{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=Z.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
1691
+ :host([aria-current="true"]:hover) .dots {
1692
+ background-color: var(--color-container-action-primary-hover);
1693
+ }
1694
+
1695
+ :host([aria-current="true"]:active) .dots {
1696
+ background-color: var(--color-container-action-primary-pressed);
1697
+ }
1698
+ `;Nt=ai([g("o-dots")],Nt);var li=Object.defineProperty,ci=Object.getOwnPropertyDescriptor,U=(o,t,e,r)=>{for(var i=r>1?void 0:r?ci(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&li(t,e,i),i};let z=class extends p{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=Z.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
1708
1699
  <button
1709
1700
  role="combobox"
1710
1701
  aria-haspopup="listbox"
@@ -2873,53 +2864,66 @@
2873
2864
  --overlay-bg: rgba(0,0,0,0.56);
2874
2865
  --overlay-opacity: 1;
2875
2866
  --card-filter: none;
2867
+ display: block;
2868
+ }
2869
+
2870
+ .card {
2871
+ position: relative;
2872
+ width: var(--card-width);
2873
+ height: var(--card-height);
2874
+ overflow: hidden;
2875
+ background-color: var(--colors-noir-des-terres-500);
2876
+ clip-path: url(#arch-gift-finder);
2877
+ -webkit-clip-path: url(#arch-gift-finder);
2878
+ filter: var(--card-filter, none);
2879
+ -webkit-tap-highlight-color: transparent;
2880
+ }
2876
2881
 
2882
+ @media (max-width: 1024px) {
2877
2883
  .card {
2878
- position: relative;
2879
- width: var(--card-width);
2880
- height: var(--card-height);
2881
- overflow: hidden;
2882
- background-color: var(--colors-noir-des-terres-500);
2883
- clip-path: url(#arch-gift-finder);
2884
- -webkit-clip-path: url(#arch-gift-finder);
2885
- filter: var(--card-filter, none);
2886
-
2887
- @media (max-width: 1024px) {
2888
- width: var(--card-width-mobile);
2889
- height: var(--card-height-mobile);
2890
- }
2884
+ width: var(--card-width-mobile);
2885
+ height: var(--card-height-mobile);
2891
2886
  }
2887
+ }
2892
2888
 
2893
- .card-img {
2894
- position: absolute;
2895
- top: 0;
2896
- left: 0;
2897
- width: 100%;
2898
- height: 100%;
2899
- object-fit: cover;
2900
- transition: opacity 0.3s ease-in-out;
2901
- background: linear-gradient(180deg, #f9f4ed 0%, #f3f0eb 81.41%, #edeae5 100%);
2889
+ .card-img {
2890
+ position: absolute;
2891
+ top: 0;
2892
+ left: 0;
2893
+ width: 100%;
2894
+ height: 100%;
2895
+ object-fit: cover;
2896
+ transition: opacity 0.3s ease-in-out;
2897
+ background: linear-gradient(180deg, #f9f4ed 0%, #f3f0eb 81.41%, #edeae5 100%);
2898
+ }
2902
2899
 
2903
- &.hover {
2904
- opacity: 0;
2905
- z-index: 2;
2906
- }
2907
- }
2900
+ .card-img.hover {
2901
+ opacity: 0;
2902
+ z-index: 2;
2903
+ }
2908
2904
 
2905
+ @media (hover: hover) and (pointer: fine) {
2909
2906
  .card:hover .card-img.hover {
2910
2907
  opacity: 1;
2911
2908
  }
2909
+ }
2912
2910
 
2913
- .overlay {
2914
- position: absolute; inset: 0;
2915
- background: var(--overlay-bg);
2916
- opacity: 0;
2917
- transition: opacity .2s ease;
2918
- pointer-events: none;
2919
- z-index: 3;
2911
+ @media (hover: none) and (pointer: coarse) {
2912
+ .card:active .card-img.hover {
2913
+ opacity: 1;
2920
2914
  }
2921
2915
  }
2922
2916
 
2917
+ .overlay {
2918
+ position: absolute; inset: 0;
2919
+ background: var(--overlay-bg);
2920
+ opacity: 0;
2921
+ transition: opacity .2s ease;
2922
+ pointer-events: none;
2923
+ z-index: 3;
2924
+ }
2925
+
2926
+
2923
2927
  :host([dimmed]) .overlay {
2924
2928
  opacity: var(--overlay-opacity, 1);
2925
2929
  }
package/index.mjs CHANGED
@@ -3329,57 +3329,48 @@ let Nt = class extends p {
3329
3329
  }
3330
3330
  };
3331
3331
  Nt.styles = f`
3332
- :host {
3333
- display: flex;
3334
- align-items: center;
3335
- justify-content: center;
3336
- height: 20px;
3337
- width: 20px;
3338
- .dots {
3339
- display: inline-block;
3340
- width: 6px;
3341
- height: 6px;
3342
- border-radius: 50%;
3343
- cursor: pointer;
3344
- border: 1px solid var(--color-border-primary);
3345
- box-sizing: border-box;
3346
- background-color: var(--color-container-action-secondary-default);
3347
- }
3348
- }
3332
+ :host {
3333
+ display: flex;
3334
+ align-items: center;
3335
+ justify-content: center;
3336
+ height: 20px;
3337
+ width: 20px;
3338
+ }
3349
3339
 
3350
- :host(:hover) {
3351
- .dots {
3352
- background-color: var(--color-container-action-secondary-hover);
3353
- }
3354
- }
3340
+ .dots {
3341
+ display: inline-block;
3342
+ width: 6px;
3343
+ height: 6px;
3344
+ border-radius: 50%;
3345
+ cursor: pointer;
3346
+ border: 1px solid var(--color-border-primary);
3347
+ box-sizing: border-box;
3348
+ background-color: var(--color-container-action-secondary-default);
3349
+ }
3355
3350
 
3356
- :host(:active) {
3357
- .dots {
3358
- background-color: var(--color-container-action-secondary-pressed);
3359
- }
3360
- }
3351
+ :host(:hover) .dots {
3352
+ background-color: var(--color-container-action-secondary-hover);
3353
+ }
3361
3354
 
3362
- :host([aria-current="true"]) {
3363
- .dots {
3364
- background-color: var(--color-container-action-primary-default);
3365
- border: 0.5px solid var(--color-border-white);
3366
- width: 8px;
3367
- height: 8px;
3368
- }
3369
- }
3355
+ :host(:active) .dots {
3356
+ background-color: var(--color-container-action-secondary-pressed);
3357
+ }
3370
3358
 
3371
- :host([aria-current="true"]:hover) {
3372
- .dots {
3373
- background-color: var(--color-container-action-primary-hover);
3374
- }
3375
- }
3359
+ :host([aria-current="true"]) .dots {
3360
+ background-color: var(--color-container-action-primary-default);
3361
+ border: 0.5px solid var(--color-border-white);
3362
+ width: 8px;
3363
+ height: 8px;
3364
+ }
3376
3365
 
3377
- :host([aria-current="true"]:active) {
3378
- .dots {
3379
- background-color: var(--color-container-action-primary-pressed);
3380
- }
3381
- }
3382
- `;
3366
+ :host([aria-current="true"]:hover) .dots {
3367
+ background-color: var(--color-container-action-primary-hover);
3368
+ }
3369
+
3370
+ :host([aria-current="true"]:active) .dots {
3371
+ background-color: var(--color-container-action-primary-pressed);
3372
+ }
3373
+ `;
3383
3374
  Nt = ai([
3384
3375
  g("o-dots")
3385
3376
  ], Nt);
@@ -5220,53 +5211,66 @@ et.styles = f`
5220
5211
  --overlay-bg: rgba(0,0,0,0.56);
5221
5212
  --overlay-opacity: 1;
5222
5213
  --card-filter: none;
5214
+ display: block;
5215
+ }
5223
5216
 
5217
+ .card {
5218
+ position: relative;
5219
+ width: var(--card-width);
5220
+ height: var(--card-height);
5221
+ overflow: hidden;
5222
+ background-color: var(--colors-noir-des-terres-500);
5223
+ clip-path: url(#arch-gift-finder);
5224
+ -webkit-clip-path: url(#arch-gift-finder);
5225
+ filter: var(--card-filter, none);
5226
+ -webkit-tap-highlight-color: transparent;
5227
+ }
5228
+
5229
+ @media (max-width: 1024px) {
5224
5230
  .card {
5225
- position: relative;
5226
- width: var(--card-width);
5227
- height: var(--card-height);
5228
- overflow: hidden;
5229
- background-color: var(--colors-noir-des-terres-500);
5230
- clip-path: url(#arch-gift-finder);
5231
- -webkit-clip-path: url(#arch-gift-finder);
5232
- filter: var(--card-filter, none);
5233
-
5234
- @media (max-width: 1024px) {
5235
- width: var(--card-width-mobile);
5236
- height: var(--card-height-mobile);
5237
- }
5231
+ width: var(--card-width-mobile);
5232
+ height: var(--card-height-mobile);
5238
5233
  }
5234
+ }
5239
5235
 
5240
- .card-img {
5241
- position: absolute;
5242
- top: 0;
5243
- left: 0;
5244
- width: 100%;
5245
- height: 100%;
5246
- object-fit: cover;
5247
- transition: opacity 0.3s ease-in-out;
5248
- background: linear-gradient(180deg, #f9f4ed 0%, #f3f0eb 81.41%, #edeae5 100%);
5236
+ .card-img {
5237
+ position: absolute;
5238
+ top: 0;
5239
+ left: 0;
5240
+ width: 100%;
5241
+ height: 100%;
5242
+ object-fit: cover;
5243
+ transition: opacity 0.3s ease-in-out;
5244
+ background: linear-gradient(180deg, #f9f4ed 0%, #f3f0eb 81.41%, #edeae5 100%);
5245
+ }
5249
5246
 
5250
- &.hover {
5251
- opacity: 0;
5252
- z-index: 2;
5253
- }
5254
- }
5247
+ .card-img.hover {
5248
+ opacity: 0;
5249
+ z-index: 2;
5250
+ }
5255
5251
 
5252
+ @media (hover: hover) and (pointer: fine) {
5256
5253
  .card:hover .card-img.hover {
5257
5254
  opacity: 1;
5258
5255
  }
5256
+ }
5259
5257
 
5260
- .overlay {
5261
- position: absolute; inset: 0;
5262
- background: var(--overlay-bg);
5263
- opacity: 0;
5264
- transition: opacity .2s ease;
5265
- pointer-events: none;
5266
- z-index: 3;
5258
+ @media (hover: none) and (pointer: coarse) {
5259
+ .card:active .card-img.hover {
5260
+ opacity: 1;
5267
5261
  }
5268
5262
  }
5269
5263
 
5264
+ .overlay {
5265
+ position: absolute; inset: 0;
5266
+ background: var(--overlay-bg);
5267
+ opacity: 0;
5268
+ transition: opacity .2s ease;
5269
+ pointer-events: none;
5270
+ z-index: 3;
5271
+ }
5272
+
5273
+
5270
5274
  :host([dimmed]) .overlay {
5271
5275
  opacity: var(--overlay-opacity, 1);
5272
5276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "0.10.14",
3
+ "version": "0.10.15",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",