vira 29.5.2 → 29.5.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.
@@ -13,4 +13,4 @@ export declare const ViraCollapsibleWrapper: import("element-vir").DeclarativeEl
13
13
  contentHeight: number;
14
14
  }, {
15
15
  expandChange: import("element-vir").DefineEvent<boolean>;
16
- }, "vira-collapsible-wrapper-expanded" | "vira-collapsible-wrapper-expand-on-print", "vira-collapsible-wrapper-", readonly ["header"], readonly []>;
16
+ }, "vira-collapsible-wrapper-expand-on-print", "vira-collapsible-wrapper-", readonly ["header"], readonly []>;
@@ -1,4 +1,4 @@
1
- import { css, defineElementEvent, html, listen, onResize } from 'element-vir';
1
+ import { classMap, css, defineElementEvent, html, listen, onResize } from 'element-vir';
2
2
  import { noNativeFormStyles, noUserSelect, viraAnimationDurations } from '../styles/index.js';
3
3
  import { defineViraElement } from './define-vira-element.js';
4
4
  /**
@@ -16,7 +16,6 @@ export const ViraCollapsibleWrapper = defineViraElement()({
16
16
  };
17
17
  },
18
18
  hostClasses: {
19
- 'vira-collapsible-wrapper-expanded': ({ inputs }) => inputs.expanded,
20
19
  'vira-collapsible-wrapper-expand-on-print': ({ inputs }) => !!inputs.expandOnPrint,
21
20
  },
22
21
  slotNames: ['header'],
@@ -41,12 +40,10 @@ export const ViraCollapsibleWrapper = defineViraElement()({
41
40
  .collapsing-element {
42
41
  transition: height ${viraAnimationDurations['vira-pretty-animation-duration'].value};
43
42
  overflow: hidden;
44
- ${noUserSelect}
45
- }
46
43
 
47
- ${hostClasses['vira-collapsible-wrapper-expanded'].selector} .collapsing-element {
48
- pointer-events: none;
49
- user-select: auto;
44
+ &.collapsed {
45
+ ${noUserSelect}
46
+ }
50
47
  }
51
48
 
52
49
  @media print {
@@ -79,7 +76,13 @@ export const ViraCollapsibleWrapper = defineViraElement()({
79
76
  <slot name=${slotNames.header}>Header</slot>
80
77
  </button>
81
78
 
82
- <div class="collapsing-element" style=${collapsingStyles} disabled="disabled">
79
+ <div
80
+ class="collapsing-element ${classMap({
81
+ collapsed: !inputs.expanded,
82
+ })}"
83
+ style=${collapsingStyles}
84
+ disabled="disabled"
85
+ >
83
86
  <div
84
87
  ${onResize(({ contentRect }) => {
85
88
  updateState({ contentHeight: contentRect.height });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vira",
3
- "version": "29.5.2",
3
+ "version": "29.5.3",
4
4
  "description": "A simple and highly versatile design system using element-vir.",
5
5
  "keywords": [
6
6
  "design",