@oicl/openbridge-webcomponents 2.0.0-next.171 → 2.0.0-next.173

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 (66) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +286 -105
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +591 -42
  4. package/dist/automation/automation-button/abstract-automation-button-motorized.d.ts +11 -1
  5. package/dist/automation/automation-button/abstract-automation-button-motorized.d.ts.map +1 -1
  6. package/dist/automation/automation-button/abstract-automation-button-motorized.js +14 -4
  7. package/dist/automation/automation-button/abstract-automation-button-motorized.js.map +1 -1
  8. package/dist/automation/automation-button/abstract-automation-button-squared.d.ts +25 -1
  9. package/dist/automation/automation-button/abstract-automation-button-squared.d.ts.map +1 -1
  10. package/dist/automation/automation-button/abstract-automation-button-squared.js +27 -3
  11. package/dist/automation/automation-button/abstract-automation-button-squared.js.map +1 -1
  12. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +12 -0
  13. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
  14. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +8 -0
  15. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
  16. package/dist/automation/bipolar-transistor/bipolar-transistor.js +4 -4
  17. package/dist/automation/bipolar-transistor/bipolar-transistor.js.map +1 -1
  18. package/dist/automation/capacitor/capacitor.js +4 -4
  19. package/dist/automation/capacitor/capacitor.js.map +1 -1
  20. package/dist/automation/converter/converter.js +4 -4
  21. package/dist/automation/converter/converter.js.map +1 -1
  22. package/dist/automation/damper/damper.js +1 -1
  23. package/dist/automation/damper/damper.js.map +1 -1
  24. package/dist/automation/diodes/diodes.js +6 -6
  25. package/dist/automation/diodes/diodes.js.map +1 -1
  26. package/dist/automation/fan/fan.js +1 -1
  27. package/dist/automation/fan/fan.js.map +1 -1
  28. package/dist/automation/filter/filter.js +4 -4
  29. package/dist/automation/filter/filter.js.map +1 -1
  30. package/dist/automation/ground/ground.js +3 -3
  31. package/dist/automation/ground/ground.js.map +1 -1
  32. package/dist/automation/logic/logic.js +6 -6
  33. package/dist/automation/logic/logic.js.map +1 -1
  34. package/dist/automation/mosfet/mosfet.js +8 -8
  35. package/dist/automation/mosfet/mosfet.js.map +1 -1
  36. package/dist/automation/motor/motor.js +2 -2
  37. package/dist/automation/motor/motor.js.map +1 -1
  38. package/dist/automation/pump/pump.js +2 -2
  39. package/dist/automation/pump/pump.js.map +1 -1
  40. package/dist/automation/resistor/resistor.js +5 -5
  41. package/dist/automation/resistor/resistor.js.map +1 -1
  42. package/dist/automation/router/router.js +2 -2
  43. package/dist/automation/router/router.js.map +1 -1
  44. package/dist/automation/source/source.js +5 -5
  45. package/dist/automation/source/source.js.map +1 -1
  46. package/dist/automation/switch/switch.js +4 -4
  47. package/dist/automation/switch/switch.js.map +1 -1
  48. package/dist/automation/transformer/transformer.js +2 -2
  49. package/dist/automation/transformer/transformer.js.map +1 -1
  50. package/dist/components/accordion-card/accordion-card.css.js +61 -19
  51. package/dist/components/accordion-card/accordion-card.css.js.map +1 -1
  52. package/dist/components/accordion-card/accordion-card.d.ts +12 -3
  53. package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
  54. package/dist/components/accordion-card/accordion-card.js +23 -5
  55. package/dist/components/accordion-card/accordion-card.js.map +1 -1
  56. package/dist/components/accordion-item/accordion-item.css.js +40 -9
  57. package/dist/components/accordion-item/accordion-item.css.js.map +1 -1
  58. package/dist/components/accordion-item/accordion-item.d.ts +14 -5
  59. package/dist/components/accordion-item/accordion-item.d.ts.map +1 -1
  60. package/dist/components/accordion-item/accordion-item.js +23 -3
  61. package/dist/components/accordion-item/accordion-item.js.map +1 -1
  62. package/dist/internal/focus.d.ts +23 -0
  63. package/dist/internal/focus.d.ts.map +1 -1
  64. package/dist/internal/focus.js +38 -1
  65. package/dist/internal/focus.js.map +1 -1
  66. package/package.json +1 -1
@@ -19783,12 +19783,17 @@ var MotorizedVariant = /* @__PURE__ */ function(MotorizedVariant) {
19783
19783
  * Not registered as a custom element. `obc-fan`, `obc-motor` and `obc-pump`
19784
19784
  * extend it and supply their own `icon` and `variant`.
19785
19785
  *
19786
+ * @property turnedOn - Whether the device is running. Selects the running
19787
+ * icon and the speed readout instead of the `Off` state. Not named `on`,
19788
+ * which Svelte binds as an event listener in markup (#1090).
19789
+ * @property on - Alias of `turnedOn` for 1.x markup: setting it sets
19790
+ * `turnedOn`.
19786
19791
  * @availableWhen direction variant in [double, forward, flatForward]
19787
19792
  */
19788
19793
  var ObcAbstractAutomationButtonMotorized = class extends ObcAbstractAutomationButton {
19789
19794
  constructor(..._args) {
19790
19795
  super(..._args);
19791
- this.on = false;
19796
+ this.turnedOn = false;
19792
19797
  this.speedInPercent = 0;
19793
19798
  this.speedUnit = "%";
19794
19799
  this.speedMaxDigits = 3;
@@ -19799,7 +19804,7 @@ var ObcAbstractAutomationButtonMotorized = class extends ObcAbstractAutomationBu
19799
19804
  get extraReadouts() {
19800
19805
  const speed = this.speed ?? this.speedInPercent;
19801
19806
  if (!this.showStatus) return [];
19802
- if (speed !== void 0 && speed !== null && this.on) return [{
19807
+ if (speed !== void 0 && speed !== null && this.turnedOn) return [{
19803
19808
  type: "value",
19804
19809
  value: speed,
19805
19810
  nDigits: this.speedMaxDigits,
@@ -19807,17 +19812,22 @@ var ObcAbstractAutomationButtonMotorized = class extends ObcAbstractAutomationBu
19807
19812
  direction: this.labelDirection,
19808
19813
  icon: this.labelDirection === AutomationButtonLabelDirection.none ? "none" : "chevron"
19809
19814
  }];
19810
- else if (!this.on) return [{
19815
+ else if (!this.turnedOn) return [{
19811
19816
  type: "state-off",
19812
19817
  value: "Off",
19813
19818
  hasIcon: true
19814
19819
  }];
19815
19820
  return [];
19816
19821
  }
19822
+ willUpdate(changed) {
19823
+ super.willUpdate(changed);
19824
+ if (changed.has("on") && this.on !== void 0) this.turnedOn = this.on;
19825
+ }
19817
19826
  get _on() {
19818
- return this.on;
19827
+ return this.turnedOn;
19819
19828
  }
19820
19829
  };
19830
+ __decorate([n$4({ type: Boolean })], ObcAbstractAutomationButtonMotorized.prototype, "turnedOn", void 0);
19821
19831
  __decorate([n$4({ type: Boolean })], ObcAbstractAutomationButtonMotorized.prototype, "on", void 0);
19822
19832
  __decorate([n$4({ type: Number })], ObcAbstractAutomationButtonMotorized.prototype, "speedInPercent", void 0);
19823
19833
  __decorate([n$4({ type: Number })], ObcAbstractAutomationButtonMotorized.prototype, "speed", void 0);
@@ -19828,10 +19838,29 @@ __decorate([n$4({ type: String })], ObcAbstractAutomationButtonMotorized.prototy
19828
19838
  __decorate([n$4({ type: String })], ObcAbstractAutomationButtonMotorized.prototype, "direction", void 0);
19829
19839
  //#endregion
19830
19840
  //#region src/automation/automation-button/abstract-automation-button-squared.ts
19841
+ /**
19842
+ * Base class for two-state automation buttons.
19843
+ *
19844
+ * Extends `ObcAbstractAutomationButton` with the on/off state: the subclass
19845
+ * picks its icon from `turnedOn`, and the readout adds the `On` or `Off`
19846
+ * state row.
19847
+ *
19848
+ * ## Usage Guidelines
19849
+ *
19850
+ * Not registered as a custom element. `obc-switch`, `obc-converter`,
19851
+ * `obc-diodes` and the other two-state devices extend it and supply their own
19852
+ * `icon`.
19853
+ *
19854
+ * @property turnedOn - Whether the device is on. Selects the on icon and the
19855
+ * `On` state row instead of `Off`. Not named `on`, which Svelte binds as an
19856
+ * event listener in markup (#1090).
19857
+ * @property on - Alias of `turnedOn` for 1.x markup: setting it sets
19858
+ * `turnedOn`.
19859
+ */
19831
19860
  var ObcAbstractAutomationButtonSquared = class extends ObcAbstractAutomationButton {
19832
19861
  constructor(..._args) {
19833
19862
  super(..._args);
19834
- this.on = false;
19863
+ this.turnedOn = false;
19835
19864
  this.variant = "square";
19836
19865
  this.orientation = AutomationButtonOrientation.horizontal;
19837
19866
  }
@@ -19840,7 +19869,7 @@ var ObcAbstractAutomationButtonSquared = class extends ObcAbstractAutomationButt
19840
19869
  }
19841
19870
  get extraReadouts() {
19842
19871
  if (!this.showStatus) return [];
19843
- if (this.on) return [{
19872
+ if (this.turnedOn) return [{
19844
19873
  type: "state-on",
19845
19874
  value: "On",
19846
19875
  hasIcon: true
@@ -19851,10 +19880,15 @@ var ObcAbstractAutomationButtonSquared = class extends ObcAbstractAutomationButt
19851
19880
  hasIcon: true
19852
19881
  }];
19853
19882
  }
19883
+ willUpdate(changed) {
19884
+ super.willUpdate(changed);
19885
+ if (changed.has("on") && this.on !== void 0) this.turnedOn = this.on;
19886
+ }
19854
19887
  get _on() {
19855
- return this.on;
19888
+ return this.turnedOn;
19856
19889
  }
19857
19890
  };
19891
+ __decorate([n$4({ type: Boolean })], ObcAbstractAutomationButtonSquared.prototype, "turnedOn", void 0);
19858
19892
  __decorate([n$4({ type: Boolean })], ObcAbstractAutomationButtonSquared.prototype, "on", void 0);
19859
19893
  __decorate([n$4({ type: String })], ObcAbstractAutomationButtonSquared.prototype, "variant", void 0);
19860
19894
  __decorate([n$4({ type: String })], ObcAbstractAutomationButtonSquared.prototype, "orientation", void 0);
@@ -19994,6 +20028,43 @@ function deepActiveElement() {
19994
20028
  while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
19995
20029
  return active;
19996
20030
  }
20031
+ /**
20032
+ * Whether `node` sits inside `root` in the composed tree.
20033
+ *
20034
+ * `Node.contains()` walks the DOM tree, where slotted light-DOM content is a
20035
+ * child of the host and not of the slot — so it answers no for exactly the
20036
+ * content a component projects into itself. This follows `assignedSlot` and
20037
+ * shadow hosts as well.
20038
+ */
20039
+ function composedContains(root, node) {
20040
+ let current = node;
20041
+ while (current) {
20042
+ if (current === root) return true;
20043
+ current = current.assignedSlot ?? current.parentNode ?? (current instanceof ShadowRoot ? current.host : null);
20044
+ }
20045
+ return false;
20046
+ }
20047
+ /**
20048
+ * Moves focus out of `hidden`, to the first fallback that will take it.
20049
+ *
20050
+ * Call it just before a region becomes `inert` or is taken out of the page.
20051
+ * The browser blurs whatever it hides, and focus lands on `<body>` a frame or
20052
+ * two later, so the next Tab press starts from the top of the document instead
20053
+ * of where the user was.
20054
+ *
20055
+ * Each candidate is tried and then checked, rather than inspected first: a
20056
+ * `disabled` button, a hidden one and an element with no tabindex all refuse
20057
+ * focus for different reasons, and the only reliable question is whether focus
20058
+ * actually left.
20059
+ */
20060
+ function releaseFocusBefore(hidden, ...fallbacks) {
20061
+ if (!composedContains(hidden, deepActiveElement())) return;
20062
+ for (const candidate of fallbacks) {
20063
+ if (!candidate) continue;
20064
+ candidate.focus();
20065
+ if (!composedContains(hidden, deepActiveElement())) return;
20066
+ }
20067
+ }
19997
20068
  function isTabbable(element) {
19998
20069
  if (!element.matches(TABBABLE_SELECTOR)) return false;
19999
20070
  if (element.tabIndex < 0) return false;
@@ -39230,7 +39301,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
39230
39301
  }
39231
39302
  get icon() {
39232
39303
  switch (this.alternativeIcon) {
39233
- case "bipolarTransistor02": if (this.on) return b`<obi-bipolar-transistor-02-on
39304
+ case "bipolarTransistor02": if (this.turnedOn) return b`<obi-bipolar-transistor-02-on
39234
39305
  usecsscolor
39235
39306
  slot="icon"
39236
39307
  ></obi-bipolar-transistor-02-on>
@@ -39246,7 +39317,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
39246
39317
  usecsscolor
39247
39318
  slot="icon-silhouette"
39248
39319
  ></obi-bipolar-transistor-02-off>`;
39249
- case "bipolarTransistor03": if (this.on) return b`<obi-bipolar-transistor-03-on
39320
+ case "bipolarTransistor03": if (this.turnedOn) return b`<obi-bipolar-transistor-03-on
39250
39321
  usecsscolor
39251
39322
  slot="icon"
39252
39323
  ></obi-bipolar-transistor-03-on>
@@ -39262,7 +39333,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
39262
39333
  usecsscolor
39263
39334
  slot="icon-silhouette"
39264
39335
  ></obi-bipolar-transistor-03-off>`;
39265
- case "bipolarTransistor04": if (this.on) return b`<obi-bipolar-transistor-04-on
39336
+ case "bipolarTransistor04": if (this.turnedOn) return b`<obi-bipolar-transistor-04-on
39266
39337
  usecsscolor
39267
39338
  slot="icon"
39268
39339
  ></obi-bipolar-transistor-04-on>
@@ -39294,7 +39365,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
39294
39365
  usecsscolor
39295
39366
  slot="icon-silhouette"
39296
39367
  ></obi-bipolar-transistor-04-flat>`;
39297
- default: if (this.on) return b`<obi-bipolar-transistor-on
39368
+ default: if (this.turnedOn) return b`<obi-bipolar-transistor-on
39298
39369
  usecsscolor
39299
39370
  slot="icon"
39300
39371
  ></obi-bipolar-transistor-on>
@@ -39817,7 +39888,7 @@ var ObcCapacitor = class ObcCapacitor extends ObcAbstractAutomationButtonSquared
39817
39888
  }
39818
39889
  get icon() {
39819
39890
  switch (this.alternativeIcon) {
39820
- case "capacitor02": if (this.on) return b`<obi-capacitor-02-on
39891
+ case "capacitor02": if (this.turnedOn) return b`<obi-capacitor-02-on
39821
39892
  usecsscolor
39822
39893
  slot="icon"
39823
39894
  ></obi-capacitor-02-on>
@@ -39833,7 +39904,7 @@ var ObcCapacitor = class ObcCapacitor extends ObcAbstractAutomationButtonSquared
39833
39904
  usecsscolor
39834
39905
  slot="icon-silhouette"
39835
39906
  ></obi-capacitor-02-off>`;
39836
- case "capacitor03": if (this.on) return b`<obi-capacitor-03-on
39907
+ case "capacitor03": if (this.turnedOn) return b`<obi-capacitor-03-on
39837
39908
  usecsscolor
39838
39909
  slot="icon"
39839
39910
  ></obi-capacitor-03-on>
@@ -39849,7 +39920,7 @@ var ObcCapacitor = class ObcCapacitor extends ObcAbstractAutomationButtonSquared
39849
39920
  usecsscolor
39850
39921
  slot="icon-silhouette"
39851
39922
  ></obi-capacitor-03-off>`;
39852
- case "capacitor04": if (this.on) return b`<obi-capacitor-04-on
39923
+ case "capacitor04": if (this.turnedOn) return b`<obi-capacitor-04-on
39853
39924
  usecsscolor
39854
39925
  slot="icon"
39855
39926
  ></obi-capacitor-04-on>
@@ -39865,7 +39936,7 @@ var ObcCapacitor = class ObcCapacitor extends ObcAbstractAutomationButtonSquared
39865
39936
  usecsscolor
39866
39937
  slot="icon-silhouette"
39867
39938
  ></obi-capacitor-04-off>`;
39868
- default: if (this.on) return b`<obi-capacitor-01-on
39939
+ default: if (this.turnedOn) return b`<obi-capacitor-01-on
39869
39940
  usecsscolor
39870
39941
  slot="icon"
39871
39942
  ></obi-capacitor-01-on>
@@ -40263,7 +40334,7 @@ var ObcConverter = class ObcConverter extends ObcAbstractAutomationButtonSquared
40263
40334
  }
40264
40335
  get icon() {
40265
40336
  switch (this.alternativeIcon) {
40266
- case "converterDcac": if (this.on) return b`<obi-converter-dcac-on
40337
+ case "converterDcac": if (this.turnedOn) return b`<obi-converter-dcac-on
40267
40338
  usecsscolor
40268
40339
  slot="icon"
40269
40340
  ></obi-converter-dcac-on>
@@ -40279,7 +40350,7 @@ var ObcConverter = class ObcConverter extends ObcAbstractAutomationButtonSquared
40279
40350
  usecsscolor
40280
40351
  slot="icon-silhouette"
40281
40352
  ></obi-converter-dcac-off>`;
40282
- case "converterAcdc": if (this.on) return b`<obi-converter-acdc-on
40353
+ case "converterAcdc": if (this.turnedOn) return b`<obi-converter-acdc-on
40283
40354
  usecsscolor
40284
40355
  slot="icon"
40285
40356
  ></obi-converter-acdc-on>
@@ -40295,7 +40366,7 @@ var ObcConverter = class ObcConverter extends ObcAbstractAutomationButtonSquared
40295
40366
  usecsscolor
40296
40367
  slot="icon-silhouette"
40297
40368
  ></obi-converter-acdc-off>`;
40298
- case "converterFilter1": if (this.on) return b`<obi-converter-filter-1-on
40369
+ case "converterFilter1": if (this.turnedOn) return b`<obi-converter-filter-1-on
40299
40370
  usecsscolor
40300
40371
  slot="icon"
40301
40372
  ></obi-converter-filter-1-on>
@@ -40311,7 +40382,7 @@ var ObcConverter = class ObcConverter extends ObcAbstractAutomationButtonSquared
40311
40382
  usecsscolor
40312
40383
  slot="icon-silhouette"
40313
40384
  ></obi-converter-filter-1-off>`;
40314
- default: if (this.on) return b`<obi-converter-dcdc-on
40385
+ default: if (this.turnedOn) return b`<obi-converter-dcdc-on
40315
40386
  usecsscolor
40316
40387
  slot="icon"
40317
40388
  ></obi-converter-dcdc-on>
@@ -40559,7 +40630,7 @@ ObiDamperHorizontalOff = __decorate([customElement("obi-damper-horizontal-off")]
40559
40630
  //#region src/automation/damper/damper.ts
40560
40631
  var ObcDamper = class ObcDamper extends ObcAbstractAutomationButtonSquared {
40561
40632
  get icon() {
40562
- if (this.on) return b`<obi-damper-horizontal-on
40633
+ if (this.turnedOn) return b`<obi-damper-horizontal-on
40563
40634
  usecsscolor
40564
40635
  slot="icon"
40565
40636
  ></obi-damper-horizontal-on>
@@ -41178,7 +41249,7 @@ var ObcDiodes = class ObcDiodes extends ObcAbstractAutomationButtonSquared {
41178
41249
  }
41179
41250
  get icon() {
41180
41251
  switch (this.alternativeIcon) {
41181
- case "diodes02": if (this.on) return b`<obi-diodes-02-on
41252
+ case "diodes02": if (this.turnedOn) return b`<obi-diodes-02-on
41182
41253
  usecsscolor
41183
41254
  slot="icon"
41184
41255
  ></obi-diodes-02-on>
@@ -41194,7 +41265,7 @@ var ObcDiodes = class ObcDiodes extends ObcAbstractAutomationButtonSquared {
41194
41265
  usecsscolor
41195
41266
  slot="icon-silhouette"
41196
41267
  ></obi-diodes-02-off>`;
41197
- case "diodes03": if (this.on) return b`<obi-diodes-03-on
41268
+ case "diodes03": if (this.turnedOn) return b`<obi-diodes-03-on
41198
41269
  usecsscolor
41199
41270
  slot="icon"
41200
41271
  ></obi-diodes-03-on>
@@ -41210,7 +41281,7 @@ var ObcDiodes = class ObcDiodes extends ObcAbstractAutomationButtonSquared {
41210
41281
  usecsscolor
41211
41282
  slot="icon-silhouette"
41212
41283
  ></obi-diodes-03-off>`;
41213
- case "diodes04": if (this.on) return b`<obi-diodes-04-on
41284
+ case "diodes04": if (this.turnedOn) return b`<obi-diodes-04-on
41214
41285
  usecsscolor
41215
41286
  slot="icon"
41216
41287
  ></obi-diodes-04-on>
@@ -41226,7 +41297,7 @@ var ObcDiodes = class ObcDiodes extends ObcAbstractAutomationButtonSquared {
41226
41297
  usecsscolor
41227
41298
  slot="icon-silhouette"
41228
41299
  ></obi-diodes-04-off>`;
41229
- case "diodes05": if (this.on) return b`<obi-diodes-05-on
41300
+ case "diodes05": if (this.turnedOn) return b`<obi-diodes-05-on
41230
41301
  usecsscolor
41231
41302
  slot="icon"
41232
41303
  ></obi-diodes-05-on>
@@ -41242,7 +41313,7 @@ var ObcDiodes = class ObcDiodes extends ObcAbstractAutomationButtonSquared {
41242
41313
  usecsscolor
41243
41314
  slot="icon-silhouette"
41244
41315
  ></obi-diodes-05-off>`;
41245
- case "diodes06": if (this.on) return b`<obi-diodes-06-on
41316
+ case "diodes06": if (this.turnedOn) return b`<obi-diodes-06-on
41246
41317
  usecsscolor
41247
41318
  slot="icon"
41248
41319
  ></obi-diodes-06-on>
@@ -41258,7 +41329,7 @@ var ObcDiodes = class ObcDiodes extends ObcAbstractAutomationButtonSquared {
41258
41329
  usecsscolor
41259
41330
  slot="icon-silhouette"
41260
41331
  ></obi-diodes-06-off>`;
41261
- default: if (this.on) return b`<obi-diodes-01-on
41332
+ default: if (this.turnedOn) return b`<obi-diodes-01-on
41262
41333
  usecsscolor
41263
41334
  slot="icon"
41264
41335
  ></obi-diodes-01-on>
@@ -41510,7 +41581,7 @@ ObiFanOff = __decorate([customElement("obi-fan-off")], ObiFanOff);
41510
41581
  //#region src/automation/fan/fan.ts
41511
41582
  var ObcFan = class ObcFan extends ObcAbstractAutomationButtonMotorized {
41512
41583
  get icon() {
41513
- if (this.on) return b`<obi-fan-on usecsscolor slot="icon"></obi-fan-on>
41584
+ if (this.turnedOn) return b`<obi-fan-on usecsscolor slot="icon"></obi-fan-on>
41514
41585
  <obi-fan-on usecsscolor slot="icon-silhouette"></obi-fan-on>`;
41515
41586
  else return b`<obi-fan-off usecsscolor slot="icon"></obi-fan-off>
41516
41587
  <obi-fan-off usecsscolor slot="icon-silhouette"></obi-fan-off>`;
@@ -41870,7 +41941,7 @@ var ObcFilter = class ObcFilter extends ObcAbstractAutomationButtonSquared {
41870
41941
  }
41871
41942
  get icon() {
41872
41943
  switch (this.alternativeIcon) {
41873
- case "filter2": if (this.on) return b`<obi-filter-2-on
41944
+ case "filter2": if (this.turnedOn) return b`<obi-filter-2-on
41874
41945
  usecsscolor
41875
41946
  slot="icon"
41876
41947
  ></obi-filter-2-on>
@@ -41886,7 +41957,7 @@ var ObcFilter = class ObcFilter extends ObcAbstractAutomationButtonSquared {
41886
41957
  usecsscolor
41887
41958
  slot="icon-silhouette"
41888
41959
  ></obi-filter-2-off>`;
41889
- case "filter3": if (this.on) return b`<obi-filter-3-on
41960
+ case "filter3": if (this.turnedOn) return b`<obi-filter-3-on
41890
41961
  usecsscolor
41891
41962
  slot="icon"
41892
41963
  ></obi-filter-3-on>
@@ -41902,7 +41973,7 @@ var ObcFilter = class ObcFilter extends ObcAbstractAutomationButtonSquared {
41902
41973
  usecsscolor
41903
41974
  slot="icon-silhouette"
41904
41975
  ></obi-filter-3-off>`;
41905
- case "filter4": if (this.on) return b`<obi-filter-4-on
41976
+ case "filter4": if (this.turnedOn) return b`<obi-filter-4-on
41906
41977
  usecsscolor
41907
41978
  slot="icon"
41908
41979
  ></obi-filter-4-on>
@@ -41918,7 +41989,7 @@ var ObcFilter = class ObcFilter extends ObcAbstractAutomationButtonSquared {
41918
41989
  usecsscolor
41919
41990
  slot="icon-silhouette"
41920
41991
  ></obi-filter-4-off>`;
41921
- default: if (this.on) return b`<obi-filter-1-on
41992
+ default: if (this.turnedOn) return b`<obi-filter-1-on
41922
41993
  usecsscolor
41923
41994
  slot="icon"
41924
41995
  ></obi-filter-1-on>
@@ -55213,7 +55284,7 @@ var ObcGround = class ObcGround extends ObcAbstractAutomationButtonSquared {
55213
55284
  }
55214
55285
  get icon() {
55215
55286
  switch (this.alternativeIcon) {
55216
- case "ground2": if (this.on) return b`<obi-ground-2-on
55287
+ case "ground2": if (this.turnedOn) return b`<obi-ground-2-on
55217
55288
  usecsscolor
55218
55289
  slot="icon"
55219
55290
  ></obi-ground-2-on>
@@ -55229,7 +55300,7 @@ var ObcGround = class ObcGround extends ObcAbstractAutomationButtonSquared {
55229
55300
  usecsscolor
55230
55301
  slot="icon-silhouette"
55231
55302
  ></obi-ground-2-off>`;
55232
- case "ground3": if (this.on) return b`<obi-ground-3-on
55303
+ case "ground3": if (this.turnedOn) return b`<obi-ground-3-on
55233
55304
  usecsscolor
55234
55305
  slot="icon"
55235
55306
  ></obi-ground-3-on>
@@ -55245,7 +55316,7 @@ var ObcGround = class ObcGround extends ObcAbstractAutomationButtonSquared {
55245
55316
  usecsscolor
55246
55317
  slot="icon-silhouette"
55247
55318
  ></obi-ground-3-off>`;
55248
- default: if (this.on) return b`<obi-ground-1-on
55319
+ default: if (this.turnedOn) return b`<obi-ground-1-on
55249
55320
  usecsscolor
55250
55321
  slot="icon"
55251
55322
  ></obi-ground-1-on>
@@ -58619,7 +58690,7 @@ var ObcLogic = class ObcLogic extends ObcAbstractAutomationButtonSquared {
58619
58690
  }
58620
58691
  get icon() {
58621
58692
  switch (this.alternativeIcon) {
58622
- case "logic02": if (this.on) return b`<obi-logic-02-on
58693
+ case "logic02": if (this.turnedOn) return b`<obi-logic-02-on
58623
58694
  usecsscolor
58624
58695
  slot="icon"
58625
58696
  ></obi-logic-02-on>
@@ -58635,7 +58706,7 @@ var ObcLogic = class ObcLogic extends ObcAbstractAutomationButtonSquared {
58635
58706
  usecsscolor
58636
58707
  slot="icon-silhouette"
58637
58708
  ></obi-logic-02-off>`;
58638
- case "logic03": if (this.on) return b`<obi-logic-03-on
58709
+ case "logic03": if (this.turnedOn) return b`<obi-logic-03-on
58639
58710
  usecsscolor
58640
58711
  slot="icon"
58641
58712
  ></obi-logic-03-on>
@@ -58651,7 +58722,7 @@ var ObcLogic = class ObcLogic extends ObcAbstractAutomationButtonSquared {
58651
58722
  usecsscolor
58652
58723
  slot="icon-silhouette"
58653
58724
  ></obi-logic-03-off>`;
58654
- case "logic04": if (this.on) return b`<obi-logic-04-on
58725
+ case "logic04": if (this.turnedOn) return b`<obi-logic-04-on
58655
58726
  usecsscolor
58656
58727
  slot="icon"
58657
58728
  ></obi-logic-04-on>
@@ -58667,7 +58738,7 @@ var ObcLogic = class ObcLogic extends ObcAbstractAutomationButtonSquared {
58667
58738
  usecsscolor
58668
58739
  slot="icon-silhouette"
58669
58740
  ></obi-logic-04-off>`;
58670
- case "logic05": if (this.on) return b`<obi-logic-05-on
58741
+ case "logic05": if (this.turnedOn) return b`<obi-logic-05-on
58671
58742
  usecsscolor
58672
58743
  slot="icon"
58673
58744
  ></obi-logic-05-on>
@@ -58683,7 +58754,7 @@ var ObcLogic = class ObcLogic extends ObcAbstractAutomationButtonSquared {
58683
58754
  usecsscolor
58684
58755
  slot="icon-silhouette"
58685
58756
  ></obi-logic-05-off>`;
58686
- case "logic06": if (this.on) return b`<obi-logic-06-on
58757
+ case "logic06": if (this.turnedOn) return b`<obi-logic-06-on
58687
58758
  usecsscolor
58688
58759
  slot="icon"
58689
58760
  ></obi-logic-06-on>
@@ -58699,7 +58770,7 @@ var ObcLogic = class ObcLogic extends ObcAbstractAutomationButtonSquared {
58699
58770
  usecsscolor
58700
58771
  slot="icon-silhouette"
58701
58772
  ></obi-logic-06-off>`;
58702
- default: if (this.on) return b`<obi-logic-01-on
58773
+ default: if (this.turnedOn) return b`<obi-logic-01-on
58703
58774
  usecsscolor
58704
58775
  slot="icon"
58705
58776
  ></obi-logic-01-on>
@@ -59445,7 +59516,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59445
59516
  }
59446
59517
  get icon() {
59447
59518
  switch (this.alternativeIcon) {
59448
- case "mosfetNtype2": if (this.on) return b`<obi-mosfet-ntype-2-on
59519
+ case "mosfetNtype2": if (this.turnedOn) return b`<obi-mosfet-ntype-2-on
59449
59520
  usecsscolor
59450
59521
  slot="icon"
59451
59522
  ></obi-mosfet-ntype-2-on>
@@ -59461,7 +59532,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59461
59532
  usecsscolor
59462
59533
  slot="icon-silhouette"
59463
59534
  ></obi-mosfet-ntype-2-off>`;
59464
- case "mosfetNtype3": if (this.on) return b`<obi-mosfet-ntype-3-on
59535
+ case "mosfetNtype3": if (this.turnedOn) return b`<obi-mosfet-ntype-3-on
59465
59536
  usecsscolor
59466
59537
  slot="icon"
59467
59538
  ></obi-mosfet-ntype-3-on>
@@ -59477,7 +59548,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59477
59548
  usecsscolor
59478
59549
  slot="icon-silhouette"
59479
59550
  ></obi-mosfet-ntype-3-off>`;
59480
- case "mosfetNtype4": if (this.on) return b`<obi-mosfet-ntype-4-on
59551
+ case "mosfetNtype4": if (this.turnedOn) return b`<obi-mosfet-ntype-4-on
59481
59552
  usecsscolor
59482
59553
  slot="icon"
59483
59554
  ></obi-mosfet-ntype-4-on>
@@ -59493,7 +59564,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59493
59564
  usecsscolor
59494
59565
  slot="icon-silhouette"
59495
59566
  ></obi-mosfet-ntype-4-off>`;
59496
- case "mosfetPtype1": if (this.on) return b`<obi-mosfet-ptype-1-on
59567
+ case "mosfetPtype1": if (this.turnedOn) return b`<obi-mosfet-ptype-1-on
59497
59568
  usecsscolor
59498
59569
  slot="icon"
59499
59570
  ></obi-mosfet-ptype-1-on>
@@ -59509,7 +59580,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59509
59580
  usecsscolor
59510
59581
  slot="icon-silhouette"
59511
59582
  ></obi-mosfet-ptype-1-off>`;
59512
- case "mosfetPtype2": if (this.on) return b`<obi-mosfet-ptype-2-on
59583
+ case "mosfetPtype2": if (this.turnedOn) return b`<obi-mosfet-ptype-2-on
59513
59584
  usecsscolor
59514
59585
  slot="icon"
59515
59586
  ></obi-mosfet-ptype-2-on>
@@ -59525,7 +59596,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59525
59596
  usecsscolor
59526
59597
  slot="icon-silhouette"
59527
59598
  ></obi-mosfet-ptype-2-off>`;
59528
- case "mosfetPtype3": if (this.on) return b`<obi-mosfet-ptype-3-on
59599
+ case "mosfetPtype3": if (this.turnedOn) return b`<obi-mosfet-ptype-3-on
59529
59600
  usecsscolor
59530
59601
  slot="icon"
59531
59602
  ></obi-mosfet-ptype-3-on>
@@ -59541,7 +59612,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59541
59612
  usecsscolor
59542
59613
  slot="icon-silhouette"
59543
59614
  ></obi-mosfet-ptype-3-off>`;
59544
- case "mosfetPtype4": if (this.on) return b`<obi-mosfet-ptype-4-on
59615
+ case "mosfetPtype4": if (this.turnedOn) return b`<obi-mosfet-ptype-4-on
59545
59616
  usecsscolor
59546
59617
  slot="icon"
59547
59618
  ></obi-mosfet-ptype-4-on>
@@ -59557,7 +59628,7 @@ var ObcMosfet = class ObcMosfet extends ObcAbstractAutomationButtonSquared {
59557
59628
  usecsscolor
59558
59629
  slot="icon-silhouette"
59559
59630
  ></obi-mosfet-ptype-4-off>`;
59560
- default: if (this.on) return b`<obi-mosfet-ntype-1-on
59631
+ default: if (this.turnedOn) return b`<obi-mosfet-ntype-1-on
59561
59632
  usecsscolor
59562
59633
  slot="icon"
59563
59634
  ></obi-mosfet-ntype-1-on>
@@ -59759,7 +59830,7 @@ var ObcMotor = class ObcMotor extends ObcAbstractAutomationButtonMotorized {
59759
59830
  }
59760
59831
  get icon() {
59761
59832
  if (this.vertical) {
59762
- if (this.on) return b`<obi-motor-on-vertical
59833
+ if (this.turnedOn) return b`<obi-motor-on-vertical
59763
59834
  usecsscolor
59764
59835
  slot="icon"
59765
59836
  ></obi-motor-on-vertical>
@@ -59775,7 +59846,7 @@ var ObcMotor = class ObcMotor extends ObcAbstractAutomationButtonMotorized {
59775
59846
  usecsscolor
59776
59847
  slot="icon-silhouette"
59777
59848
  ></obi-motor-off-vertical>`;
59778
- } else if (this.on) return b`<obi-motor-on-horizontal
59849
+ } else if (this.turnedOn) return b`<obi-motor-on-horizontal
59779
59850
  usecsscolor
59780
59851
  slot="icon"
59781
59852
  ></obi-motor-on-horizontal>
@@ -59940,7 +60011,7 @@ var ObcPump = class ObcPump extends ObcAbstractAutomationButtonMotorized {
59940
60011
  }
59941
60012
  get icon() {
59942
60013
  if (this.vertical) {
59943
- if (this.on) return b`<obi-pump-on-vertical
60014
+ if (this.turnedOn) return b`<obi-pump-on-vertical
59944
60015
  usecsscolor
59945
60016
  slot="icon"
59946
60017
  ></obi-pump-on-vertical>
@@ -59956,7 +60027,7 @@ var ObcPump = class ObcPump extends ObcAbstractAutomationButtonMotorized {
59956
60027
  usecsscolor
59957
60028
  slot="icon-silhouette"
59958
60029
  ></obi-pump-off-vertical>`;
59959
- } else if (this.on) return b`<obi-pump-on-horizontal
60030
+ } else if (this.turnedOn) return b`<obi-pump-on-horizontal
59960
60031
  usecsscolor
59961
60032
  slot="icon"
59962
60033
  ></obi-pump-on-horizontal>
@@ -60373,7 +60444,7 @@ var ObcResistor = class ObcResistor extends ObcAbstractAutomationButtonSquared {
60373
60444
  }
60374
60445
  get icon() {
60375
60446
  switch (this.alternativeIcon) {
60376
- case "resistor2": if (this.on) return b`<obi-resistor-2-on
60447
+ case "resistor2": if (this.turnedOn) return b`<obi-resistor-2-on
60377
60448
  usecsscolor
60378
60449
  slot="icon"
60379
60450
  ></obi-resistor-2-on>
@@ -60389,7 +60460,7 @@ var ObcResistor = class ObcResistor extends ObcAbstractAutomationButtonSquared {
60389
60460
  usecsscolor
60390
60461
  slot="icon-silhouette"
60391
60462
  ></obi-resistor-2-off>`;
60392
- case "resistor3": if (this.on) return b`<obi-resistor-3-on
60463
+ case "resistor3": if (this.turnedOn) return b`<obi-resistor-3-on
60393
60464
  usecsscolor
60394
60465
  slot="icon"
60395
60466
  ></obi-resistor-3-on>
@@ -60405,7 +60476,7 @@ var ObcResistor = class ObcResistor extends ObcAbstractAutomationButtonSquared {
60405
60476
  usecsscolor
60406
60477
  slot="icon-silhouette"
60407
60478
  ></obi-resistor-3-off>`;
60408
- case "resistor4": if (this.on) return b`<obi-resistor-4-on
60479
+ case "resistor4": if (this.turnedOn) return b`<obi-resistor-4-on
60409
60480
  usecsscolor
60410
60481
  slot="icon"
60411
60482
  ></obi-resistor-4-on>
@@ -60421,7 +60492,7 @@ var ObcResistor = class ObcResistor extends ObcAbstractAutomationButtonSquared {
60421
60492
  usecsscolor
60422
60493
  slot="icon-silhouette"
60423
60494
  ></obi-resistor-4-off>`;
60424
- case "resistor5": if (this.on) return b`<obi-resistor-5-on
60495
+ case "resistor5": if (this.turnedOn) return b`<obi-resistor-5-on
60425
60496
  usecsscolor
60426
60497
  slot="icon"
60427
60498
  ></obi-resistor-5-on>
@@ -60437,7 +60508,7 @@ var ObcResistor = class ObcResistor extends ObcAbstractAutomationButtonSquared {
60437
60508
  usecsscolor
60438
60509
  slot="icon-silhouette"
60439
60510
  ></obi-resistor-5-off>`;
60440
- default: if (this.on) return b`<obi-resistor-1-on
60511
+ default: if (this.turnedOn) return b`<obi-resistor-1-on
60441
60512
  usecsscolor
60442
60513
  slot="icon"
60443
60514
  ></obi-resistor-1-on>
@@ -60651,7 +60722,7 @@ var ObcRouter = class ObcRouter extends ObcAbstractAutomationButtonSquared {
60651
60722
  }
60652
60723
  get icon() {
60653
60724
  switch (this.alternativeIcon) {
60654
- case "router2": if (this.on) return b`<obi-router-2-on
60725
+ case "router2": if (this.turnedOn) return b`<obi-router-2-on
60655
60726
  usecsscolor
60656
60727
  slot="icon"
60657
60728
  ></obi-router-2-on>
@@ -60667,7 +60738,7 @@ var ObcRouter = class ObcRouter extends ObcAbstractAutomationButtonSquared {
60667
60738
  usecsscolor
60668
60739
  slot="icon-silhouette"
60669
60740
  ></obi-router-2-off>`;
60670
- default: if (this.on) return b`<obi-router-on usecsscolor slot="icon"></obi-router-on>
60741
+ default: if (this.turnedOn) return b`<obi-router-on usecsscolor slot="icon"></obi-router-on>
60671
60742
  <obi-router-on usecsscolor slot="icon-silhouette"></obi-router-on>`;
60672
60743
  else return b`<obi-router-off usecsscolor slot="icon"></obi-router-off>
60673
60744
  <obi-router-off
@@ -61148,7 +61219,7 @@ var ObcSource = class ObcSource extends ObcAbstractAutomationButtonSquared {
61148
61219
  }
61149
61220
  get icon() {
61150
61221
  switch (this.alternativeIcon) {
61151
- case "sources02": if (this.on) return b`<obi-sources-02-on
61222
+ case "sources02": if (this.turnedOn) return b`<obi-sources-02-on
61152
61223
  usecsscolor
61153
61224
  slot="icon"
61154
61225
  ></obi-sources-02-on>
@@ -61164,7 +61235,7 @@ var ObcSource = class ObcSource extends ObcAbstractAutomationButtonSquared {
61164
61235
  usecsscolor
61165
61236
  slot="icon-silhouette"
61166
61237
  ></obi-sources-02-off>`;
61167
- case "sources03": if (this.on) return b`<obi-sources-03-on
61238
+ case "sources03": if (this.turnedOn) return b`<obi-sources-03-on
61168
61239
  usecsscolor
61169
61240
  slot="icon"
61170
61241
  ></obi-sources-03-on>
@@ -61180,7 +61251,7 @@ var ObcSource = class ObcSource extends ObcAbstractAutomationButtonSquared {
61180
61251
  usecsscolor
61181
61252
  slot="icon-silhouette"
61182
61253
  ></obi-sources-03-off>`;
61183
- case "sources04": if (this.on) return b`<obi-sources-04-on
61254
+ case "sources04": if (this.turnedOn) return b`<obi-sources-04-on
61184
61255
  usecsscolor
61185
61256
  slot="icon"
61186
61257
  ></obi-sources-04-on>
@@ -61196,7 +61267,7 @@ var ObcSource = class ObcSource extends ObcAbstractAutomationButtonSquared {
61196
61267
  usecsscolor
61197
61268
  slot="icon-silhouette"
61198
61269
  ></obi-sources-04-off>`;
61199
- case "sources05": if (this.on) return b`<obi-sources-05-on
61270
+ case "sources05": if (this.turnedOn) return b`<obi-sources-05-on
61200
61271
  usecsscolor
61201
61272
  slot="icon"
61202
61273
  ></obi-sources-05-on>
@@ -61212,7 +61283,7 @@ var ObcSource = class ObcSource extends ObcAbstractAutomationButtonSquared {
61212
61283
  usecsscolor
61213
61284
  slot="icon-silhouette"
61214
61285
  ></obi-sources-05-off>`;
61215
- default: if (this.on) return b`<obi-sources-01-on
61286
+ default: if (this.turnedOn) return b`<obi-sources-01-on
61216
61287
  usecsscolor
61217
61288
  slot="icon"
61218
61289
  ></obi-sources-01-on>
@@ -61835,7 +61906,7 @@ var ObcSwitch = class ObcSwitch extends ObcAbstractAutomationButtonSquared {
61835
61906
  }
61836
61907
  get icon() {
61837
61908
  switch (this.alternativeIcon) {
61838
- case "s1": if (this.on) return b`<obi-switch-01-on
61909
+ case "s1": if (this.turnedOn) return b`<obi-switch-01-on
61839
61910
  usecsscolor
61840
61911
  slot="icon"
61841
61912
  ></obi-switch-01-on>
@@ -61851,7 +61922,7 @@ var ObcSwitch = class ObcSwitch extends ObcAbstractAutomationButtonSquared {
61851
61922
  usecsscolor
61852
61923
  slot="icon-silhouette"
61853
61924
  ></obi-switch-01-off>`;
61854
- case "s2": if (this.on) return b`<obi-switch-02-on
61925
+ case "s2": if (this.turnedOn) return b`<obi-switch-02-on
61855
61926
  usecsscolor
61856
61927
  slot="icon"
61857
61928
  ></obi-switch-02-on>
@@ -61867,7 +61938,7 @@ var ObcSwitch = class ObcSwitch extends ObcAbstractAutomationButtonSquared {
61867
61938
  usecsscolor
61868
61939
  slot="icon-silhouette"
61869
61940
  ></obi-switch-02-off>`;
61870
- case "s3": if (this.on) return b`<obi-switch-03-on
61941
+ case "s3": if (this.turnedOn) return b`<obi-switch-03-on
61871
61942
  usecsscolor
61872
61943
  slot="icon"
61873
61944
  ></obi-switch-03-on>
@@ -61883,7 +61954,7 @@ var ObcSwitch = class ObcSwitch extends ObcAbstractAutomationButtonSquared {
61883
61954
  usecsscolor
61884
61955
  slot="icon-silhouette"
61885
61956
  ></obi-switch-03-off>`;
61886
- default: if (this.on) return b`<obi-switch-horizontal-on
61957
+ default: if (this.turnedOn) return b`<obi-switch-horizontal-on
61887
61958
  usecsscolor
61888
61959
  slot="icon"
61889
61960
  ></obi-switch-horizontal-on>
@@ -62196,7 +62267,7 @@ var ObcTransformer = class ObcTransformer extends ObcAbstractAutomationButtonSqu
62196
62267
  }
62197
62268
  get icon() {
62198
62269
  switch (this.alternativeIcon) {
62199
- case "transformer02": if (this.on) return b`<obi-transformer-02-on
62270
+ case "transformer02": if (this.turnedOn) return b`<obi-transformer-02-on
62200
62271
  usecsscolor
62201
62272
  slot="icon"
62202
62273
  ></obi-transformer-02-on>
@@ -62212,7 +62283,7 @@ var ObcTransformer = class ObcTransformer extends ObcAbstractAutomationButtonSqu
62212
62283
  usecsscolor
62213
62284
  slot="icon-silhouette"
62214
62285
  ></obi-transformer-02-off>`;
62215
- default: if (this.on) return b`<obi-transformer-01-on
62286
+ default: if (this.turnedOn) return b`<obi-transformer-01-on
62216
62287
  usecsscolor
62217
62288
  slot="icon"
62218
62289
  ></obi-transformer-01-on>
@@ -70631,6 +70702,9 @@ var accordion_card_default = i$7`* {
70631
70702
 
70632
70703
  :host {
70633
70704
  display: block;
70705
+
70706
+ /* TODO(designer): confirm the expand duration and curve. */
70707
+ --_expand-duration: var(--obc-accordion-expand-duration, 200ms);
70634
70708
  }
70635
70709
 
70636
70710
  .wrapper {
@@ -70647,6 +70721,12 @@ var accordion_card_default = i$7`* {
70647
70721
  align-items: center;
70648
70722
  align-self: stretch;
70649
70723
  height: fit-content;
70724
+ border-radius: var(--ui-components-accordion-border-radius);
70725
+ /* The card surface is what the closing panel slides over; snapping it away
70726
+ would drop the content onto the page background mid-slide. */
70727
+ transition:
70728
+ background-color var(--_expand-duration) ease,
70729
+ box-shadow var(--_expand-duration) ease;
70650
70730
  }
70651
70731
 
70652
70732
  :is(.wrapper .content-button) {
@@ -70734,6 +70814,11 @@ var accordion_card_default = i$7`* {
70734
70814
  padding: 0;
70735
70815
  border: 0;
70736
70816
  overflow: hidden;
70817
+ /* The bottom corners square on open; without this they round again while
70818
+ the panel is still sliding away. */
70819
+ transition:
70820
+ border-radius var(--_expand-duration) ease,
70821
+ box-shadow var(--_expand-duration) ease;
70737
70822
  }
70738
70823
 
70739
70824
  .wrapper .header-container {
@@ -70806,32 +70891,51 @@ var accordion_card_default = i$7`* {
70806
70891
  flex-shrink: 0;
70807
70892
  }
70808
70893
 
70809
- .wrapper.state-expanded .container-content-additional {
70810
- color: var(--element-neutral-color);
70811
- font-family: var(--global-typography-font-family);
70812
- font-weight: var(--global-typography-ui-body-font-weight);
70813
- font-size: var(--global-typography-ui-body-font-size);
70814
- line-height: var(--global-typography-ui-body-line-height);
70815
- font-feature-settings:
70894
+ .wrapper .trailing-icon {
70895
+ transition: transform var(--_expand-duration) ease;
70896
+ }
70897
+
70898
+ .wrapper.state-expanded .trailing-icon {
70899
+ transform: rotate(-180deg);
70900
+ }
70901
+
70902
+ .wrapper .panel {
70903
+ display: grid;
70904
+ /* 0fr to 1fr is the only track that eases to content height in every engine. */
70905
+ grid-template-rows: 0fr;
70906
+ align-self: stretch;
70907
+ transition: grid-template-rows var(--_expand-duration) ease;
70908
+ }
70909
+
70910
+ .wrapper .panel-inner {
70911
+ /* The grid item cannot carry the inset: padding holds the track open at
70912
+ 16px when closed. It clips here, the padding sits one level down. */
70913
+ min-height: 0;
70914
+ overflow: hidden;
70915
+ }
70916
+
70917
+ .wrapper .container-content-additional {
70918
+ color: var(--element-neutral-color);
70919
+ font-family: var(--global-typography-font-family);
70920
+ font-weight: var(--global-typography-ui-body-font-weight);
70921
+ font-size: var(--global-typography-ui-body-font-size);
70922
+ line-height: var(--global-typography-ui-body-line-height);
70923
+ font-feature-settings:
70816
70924
  "liga" off,
70817
70925
  "clig" off,
70818
70926
  "ss04" on;
70819
- display: flex;
70820
- flex-direction: column;
70821
- align-items: center;
70822
- flex: 1 0 0;
70823
- align-self: stretch;
70824
- height: 100%;
70825
- padding: 0 16px 16px 16px;
70927
+ display: flex;
70928
+ flex-direction: column;
70929
+ align-items: center;
70930
+ padding: 0 16px 16px 16px;
70931
+ }
70932
+
70933
+ .wrapper.state-expanded .panel {
70934
+ grid-template-rows: 1fr;
70826
70935
  }
70827
70936
 
70828
70937
  .wrapper.state-expanded .card-container {
70829
- display: flex;
70830
- flex-direction: column;
70831
- align-items: center;
70832
70938
  flex: 1 0 0;
70833
- align-self: stretch;
70834
- border-radius: var(--ui-components-accordion-border-radius);
70835
70939
  background: var(--container-background-color);
70836
70940
  box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
70837
70941
  }
@@ -70937,6 +71041,15 @@ var accordion_card_default = i$7`* {
70937
71041
  .alert.alert-level-diagnostic {
70938
71042
  z-index: 1;
70939
71043
  }
71044
+
71045
+ @media (prefers-reduced-motion: reduce) {
71046
+ .wrapper .panel,
71047
+ .wrapper .card-container,
71048
+ .wrapper .content-button,
71049
+ .wrapper .trailing-icon {
71050
+ transition: none;
71051
+ }
71052
+ }
70940
71053
  `;
70941
71054
  //#endregion
70942
71055
  //#region src/components/accordion-card/accordion-card.ts
@@ -70973,6 +71086,20 @@ var ObcAccordionCard = class ObcAccordionCard extends i$4 {
70973
71086
  cardTitle: this.cardTitle
70974
71087
  } }));
70975
71088
  }
71089
+ /**
71090
+ * Keeps the keyboard somewhere predictable when the panel closes.
71091
+ *
71092
+ * A collapsed panel is `inert`, and the browser drops focus out of anything
71093
+ * it makes inert — onto `<body>`, two frames later. Clicking the header
71094
+ * already leaves focus there; a consumer setting `expanded` while a slotted
71095
+ * control has focus is the case that needs the transfer.
71096
+ */
71097
+ willUpdate(changed) {
71098
+ if (!changed.has("expanded") || this.expanded) return;
71099
+ const panel = this.shadowRoot?.querySelector(".panel");
71100
+ if (!panel) return;
71101
+ releaseFocusBefore(panel, this.shadowRoot?.querySelector(".content-button"), this.shadowRoot?.querySelector(".wrapper"));
71102
+ }
70976
71103
  renderContentMain() {
70977
71104
  return b`
70978
71105
  <div class="header-container">
@@ -70994,17 +71121,20 @@ var ObcAccordionCard = class ObcAccordionCard extends i$4 {
70994
71121
  </div>
70995
71122
  ` : ""}
70996
71123
  <div class="trailing-icon">
70997
- ${this.expanded ? b`<obi-chevron-up-google></obi-chevron-up-google>` : b`<obi-chevron-down-google></obi-chevron-down-google>`}
71124
+ <obi-chevron-down-google></obi-chevron-down-google>
70998
71125
  </div>
70999
71126
  </div>
71000
71127
  </div>
71001
71128
  `;
71002
71129
  }
71003
71130
  renderContentAdditional() {
71004
- if (!this.expanded) return "";
71005
71131
  return b`
71006
- <div class="container-content-additional">
71007
- <slot name="expanded-content"></slot>
71132
+ <div class="panel" id="accordion-content" ?inert=${!this.expanded}>
71133
+ <div class="panel-inner">
71134
+ <div class="container-content-additional">
71135
+ <slot name="expanded-content"></slot>
71136
+ </div>
71137
+ </div>
71008
71138
  </div>
71009
71139
  `;
71010
71140
  }
@@ -71017,6 +71147,7 @@ var ObcAccordionCard = class ObcAccordionCard extends i$4 {
71017
71147
  render() {
71018
71148
  return b`
71019
71149
  <div
71150
+ tabindex="-1"
71020
71151
  class=${e$2({
71021
71152
  wrapper: true,
71022
71153
  "state-expanded": this.expanded,
@@ -71092,6 +71223,11 @@ var accordion_item_default = i$7`* {
71092
71223
  box-sizing: border-box;
71093
71224
  }
71094
71225
 
71226
+ :host {
71227
+ /* TODO(designer): confirm the expand duration and curve. */
71228
+ --_expand-duration: var(--obc-accordion-expand-duration, 200ms);
71229
+ }
71230
+
71095
71231
  .wrapper {
71096
71232
  display: flex;
71097
71233
  flex-direction: column;
@@ -71179,6 +71315,9 @@ var accordion_item_default = i$7`* {
71179
71315
  cursor: pointer;
71180
71316
  overflow: hidden;
71181
71317
  position: relative;
71318
+ /* The bottom corners square on open; without this they round again while
71319
+ the panel is still sliding away. */
71320
+ transition: border-radius var(--_expand-duration) ease;
71182
71321
  }
71183
71322
 
71184
71323
  .content {
@@ -71248,7 +71387,7 @@ var accordion_item_default = i$7`* {
71248
71387
  height: var(--menu-navigation-components-navigation-item-icon-size);
71249
71388
  flex-shrink: 0;
71250
71389
  position: relative;
71251
- transition: transform 0.2s ease;
71390
+ transition: transform var(--_expand-duration) ease;
71252
71391
  }
71253
71392
 
71254
71393
  .divider {
@@ -71265,19 +71404,29 @@ var accordion_item_default = i$7`* {
71265
71404
  transform: rotate(-180deg);
71266
71405
  }
71267
71406
 
71268
- .content-container {
71269
- display: flex;
71270
- flex-direction: column;
71407
+ .panel {
71408
+ display: grid;
71409
+ /* 0fr to 1fr is the only track that eases to content height in every engine. */
71410
+ grid-template-rows: 0fr;
71271
71411
  width: 100%;
71272
- flex-shrink: 0;
71412
+ transition: grid-template-rows var(--_expand-duration) ease;
71273
71413
  }
71274
71414
 
71275
- .wrapper.open-true .content-button {
71276
- border-bottom-left-radius: 0;
71277
- border-bottom-right-radius: 0;
71415
+ .wrapper.open-true .panel {
71416
+ grid-template-rows: 1fr;
71417
+ }
71418
+
71419
+ .panel-inner {
71420
+ /* The grid item cannot carry the frame: its border is left out of the open
71421
+ track and clipped off. It clips here, the frame sits one level down. */
71422
+ min-height: 0;
71423
+ overflow: hidden;
71278
71424
  }
71279
71425
 
71280
- .wrapper.open-true .content-container {
71426
+ .content-container {
71427
+ display: flex;
71428
+ flex-direction: column;
71429
+ width: 100%;
71281
71430
  background: var(--container-background-color);
71282
71431
  border: 1px solid var(--flat-enabled-border-color);
71283
71432
  border-top: none;
@@ -71285,6 +71434,11 @@ var accordion_item_default = i$7`* {
71285
71434
  border-bottom-right-radius: var(--ui-components-accordion-item-border-radius);
71286
71435
  }
71287
71436
 
71437
+ .wrapper.open-true .content-button {
71438
+ border-bottom-left-radius: 0;
71439
+ border-bottom-right-radius: 0;
71440
+ }
71441
+
71288
71442
  .wrapper.state-disabled .content-button {
71289
71443
  cursor: not-allowed;
71290
71444
  }
@@ -71293,6 +71447,14 @@ var accordion_item_default = i$7`* {
71293
71447
  .wrapper.state-disabled .trailing-icon {
71294
71448
  color: var(--element-disabled-color);
71295
71449
  }
71450
+
71451
+ @media (prefers-reduced-motion: reduce) {
71452
+ .panel,
71453
+ .content-button,
71454
+ .trailing-icon {
71455
+ transition: none;
71456
+ }
71457
+ }
71296
71458
  `;
71297
71459
  //#endregion
71298
71460
  //#region src/components/accordion-item/accordion-item.ts
@@ -71312,6 +71474,20 @@ var ObcAccordionItem = class ObcAccordionItem extends i$4 {
71312
71474
  title: this.title
71313
71475
  } }));
71314
71476
  }
71477
+ /**
71478
+ * Keeps the keyboard somewhere predictable when the panel closes.
71479
+ *
71480
+ * A collapsed panel is `inert`, and the browser drops focus out of anything
71481
+ * it makes inert — onto `<body>`, two frames later. Clicking the header
71482
+ * already leaves focus there; a consumer setting `open` while a slotted
71483
+ * control has focus is the case that needs the transfer.
71484
+ */
71485
+ willUpdate(changed) {
71486
+ if (!changed.has("open") || this.open) return;
71487
+ const panel = this.shadowRoot?.querySelector(".panel");
71488
+ if (!panel) return;
71489
+ releaseFocusBefore(panel, this.shadowRoot?.querySelector(".content-button"), this.shadowRoot?.querySelector(".wrapper"));
71490
+ }
71315
71491
  renderContent() {
71316
71492
  return b`
71317
71493
  <div class="content">
@@ -71327,10 +71503,13 @@ var ObcAccordionItem = class ObcAccordionItem extends i$4 {
71327
71503
  `;
71328
71504
  }
71329
71505
  renderExpandedContent() {
71330
- if (!this.open) return "";
71331
71506
  return b`
71332
- <div class="content-container">
71333
- <slot name="expanded-content"></slot>
71507
+ <div class="panel" id="accordion-content" ?inert=${!this.open}>
71508
+ <div class="panel-inner">
71509
+ <div class="content-container">
71510
+ <slot name="expanded-content"></slot>
71511
+ </div>
71512
+ </div>
71334
71513
  </div>
71335
71514
  `;
71336
71515
  }
@@ -71341,6 +71520,7 @@ var ObcAccordionItem = class ObcAccordionItem extends i$4 {
71341
71520
  render() {
71342
71521
  return b`
71343
71522
  <div
71523
+ tabindex="-1"
71344
71524
  class=${e$2({
71345
71525
  wrapper: true,
71346
71526
  "state-disabled": this.disabled,
@@ -71353,6 +71533,7 @@ var ObcAccordionItem = class ObcAccordionItem extends i$4 {
71353
71533
  @click=${this.handleToggle}
71354
71534
  ?disabled=${this.disabled}
71355
71535
  aria-expanded=${this.open}
71536
+ aria-controls="accordion-content"
71356
71537
  >
71357
71538
  ${this.renderContent()}
71358
71539
  </button>