@orangelogic/design-system 2.187.0 → 2.188.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.
@@ -1,7 +1,7 @@
1
1
  import "./resize-observer.js";
2
2
  import "../chunks/lib-cortex-element.CVMmyPMC.js";
3
3
  import "../chunks/component.styles.CRO4Odto.js";
4
- import { C as A } from "../chunks/tab-group.CjISeeMB.js";
4
+ import { C as A } from "../chunks/tab-group.uSHlsFu8.js";
5
5
  import "../chunks/custom-element.L4WJXn1j.js";
6
6
  import "../chunks/i18n.DbXTTLXx.js";
7
7
  import "../chunks/scroll.xtO5yojm.js";
@@ -1,6 +1,6 @@
1
1
  import { n as a, C as v } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
- import { c as u } from "../chunks/component.styles.CRO4Odto.js";
3
- import { c as h } from "../chunks/custom-element.L4WJXn1j.js";
2
+ import { c as h } from "../chunks/component.styles.CRO4Odto.js";
3
+ import { c as u } from "../chunks/custom-element.L4WJXn1j.js";
4
4
  import { L as f } from "../chunks/i18n.DbXTTLXx.js";
5
5
  import { H as x } from "../chunks/slot.j5oheLJC.js";
6
6
  import { w as p } from "../chunks/watch.DJF5K-8U.js";
@@ -30,6 +30,12 @@ const w = b`.tab{border-radius:var(--cx-border-radius-small);padding:var(--tab-p
30
30
  );
31
31
  }
32
32
 
33
+
34
+ :host([data-cx-tab-group__tab--hidden]) {
35
+ visibility: hidden;
36
+ pointer-events: none;
37
+ }
38
+
33
39
  ${w}
34
40
 
35
41
  ${k}
@@ -90,7 +96,7 @@ let I = 0, t = class extends v {
90
96
  }
91
97
  }
92
98
  };
93
- t.styles = [u, C];
99
+ t.styles = [h, C];
94
100
  t.dependencies = {
95
101
  "cx-icon-button": g,
96
102
  "cx-line-clamp": y
@@ -129,7 +135,7 @@ e([
129
135
  p("disabled")
130
136
  ], t.prototype, "handleDisabledChange", 1);
131
137
  t = e([
132
- h("cx-tab")
138
+ u("cx-tab")
133
139
  ], t);
134
140
  export {
135
141
  t as default
@@ -75,7 +75,7 @@ import { default as FJt } from "./step.js";
75
75
  import { default as jJt } from "./stepper.js";
76
76
  import db from "./switch.js";
77
77
  import a3 from "./tab.js";
78
- import { C as s3, T as MF, a as PF, b as NF, g as r8 } from "../chunks/tab-group.CjISeeMB.js";
78
+ import { C as s3, T as MF, a as PF, b as NF, g as r8 } from "../chunks/tab-group.uSHlsFu8.js";
79
79
  import s6 from "./tab-panel.js";
80
80
  import { default as VJt } from "./tag.js";
81
81
  import l6 from "./textarea.js";
@@ -138326,6 +138326,9 @@ const xzt = IFt.extend({
138326
138326
  },
138327
138327
  onUpdate() {
138328
138328
  u && u.requestUpdate();
138329
+ },
138330
+ parseOptions: {
138331
+ preserveWhitespace: !0
138329
138332
  }
138330
138333
  }), c = k, k;
138331
138334
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.187.0",
4
+ "version": "2.188.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  import { HideOptions, Rect } from '@floating-ui/dom';
2
2
  import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
3
+ import { PopupToggle } from '../../../../types/src/popup';
3
4
  import { CSSResultGroup } from 'lit';
4
5
 
5
6
  export interface VirtualElement {
@@ -66,6 +67,13 @@ export default class CxPopup extends CortexElement {
66
67
  * clipped, using a `fixed` position strategy can often workaround it.
67
68
  */
68
69
  strategy: 'absolute' | 'fixed' | 'overlay';
70
+ /**
71
+ * Determines how the popup hides its panel while closed. `display` takes the panel out of layout,
72
+ * so nothing inside a closed popup is measured or can grow its surroundings. `visibility` keeps
73
+ * the panel laid out and only hides it visually, which lets it be measured before opening and
74
+ * avoids a flash on first open, at the cost of a closed panel that still occupies layout.
75
+ */
76
+ toggle: PopupToggle;
69
77
  /** The distance in pixels from which to offset the panel away from its anchor. */
70
78
  distance: number;
71
79
  /** The distance in pixels from which to offset the panel along its anchor. */
@@ -57,7 +57,7 @@ export default class CxTabGroup extends CortexElement {
57
57
  * repeatedly in quick succession (resize, slotchange, alignment/label changes), and each call creates its own
58
58
  * observer that only disconnects itself once its callback fires. Without tracking and disconnecting the previous
59
59
  * instance up front, a stale observer can fire after a newer one already recomputed tab visibility, overwriting
60
- * dropdownOffset/data-hidden with outdated results.
60
+ * dropdownOffset and the tabs' hidden marker with outdated results.
61
61
  */
62
62
  private overflowObserver?;
63
63
  private tabs;
@@ -118,6 +118,7 @@ export default class CxTabGroup extends CortexElement {
118
118
  minTabWidth: number;
119
119
  /** Minimum clamp width - The minimum width of the tab not to be clamped */
120
120
  private static readonly MIN_CLAMP_WIDTH;
121
+ private static readonly HIDDEN_TAB_ATTRIBUTE;
121
122
  connectedCallback(): void;
122
123
  disconnectedCallback(): void;
123
124
  /**
@@ -0,0 +1,4 @@
1
+ export declare enum PopupToggle {
2
+ Display = "display",
3
+ Visibility = "visibility"
4
+ }
@@ -431,6 +431,10 @@
431
431
  * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is clipped, using a `fixed` position strategy can often workaround it.
432
432
  */
433
433
  strategy?: 'absolute' | 'fixed' | 'overlay';
434
+ /**
435
+ * Determines how the popup hides its panel while closed. `display` takes the panel out of layout, so nothing inside a closed popup is measured or can grow its surroundings. `visibility` keeps the panel laid out and only hides it visually, which lets it be measured before opening and avoids a flash on first open, at the cost of a closed panel that still occupies layout.
436
+ */
437
+ toggle?: 'display' | 'visibility';
434
438
  /**
435
439
  * The distance in pixels from which to offset the panel away from its anchor.
436
440
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.187.0",
4
+ "version": "2.188.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {