@cumulus-ui/components 0.5.4 → 0.5.6

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.
package/dist/index.js CHANGED
@@ -64,8 +64,8 @@ function FormAssociatedMixin(superClass) {
64
64
  this._defaultValue = this.value;
65
65
  }
66
66
  // ── Public API (thin wrappers around ElementInternals) ────────────
67
- setFormValue(value, state27) {
68
- this._internals.setFormValue(value, state27);
67
+ setFormValue(value, state28) {
68
+ this._internals.setFormValue(value, state28);
69
69
  }
70
70
  setValidity(flags, message, anchor) {
71
71
  if (flags && message) {
@@ -99,9 +99,9 @@ function FormAssociatedMixin(superClass) {
99
99
  * @param state - Previously saved value or `FormData` entry.
100
100
  * @param _mode - `'restore'` (bfcache) or `'autocomplete'`.
101
101
  */
102
- formStateRestoreCallback(state27, _mode) {
103
- if (typeof state27 === "string") {
104
- this.value = state27;
102
+ formStateRestoreCallback(state28, _mode) {
103
+ if (typeof state28 === "string") {
104
+ this.value = state28;
105
105
  }
106
106
  }
107
107
  }
@@ -5934,7 +5934,8 @@ customElements.define("cs-alert", CsAlert);
5934
5934
 
5935
5935
  // src/tooltip/internal.ts
5936
5936
  import { css as css45, html as html19, nothing as nothing6 } from "lit";
5937
- import { property as property18, query, state as state4 } from "lit/decorators.js";
5937
+ import { property as property18, state as state4 } from "lit/decorators.js";
5938
+ import { createRef, ref } from "lit/directives/ref.js";
5938
5939
 
5939
5940
  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
5940
5941
  var min = Math.min;
@@ -6119,7 +6120,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
6119
6120
  }
6120
6121
  return coords;
6121
6122
  }
6122
- async function detectOverflow(state27, options) {
6123
+ async function detectOverflow(state28, options) {
6123
6124
  var _await$platform$isEle;
6124
6125
  if (options === void 0) {
6125
6126
  options = {};
@@ -6131,14 +6132,14 @@ async function detectOverflow(state27, options) {
6131
6132
  rects,
6132
6133
  elements,
6133
6134
  strategy
6134
- } = state27;
6135
+ } = state28;
6135
6136
  const {
6136
6137
  boundary = "clippingAncestors",
6137
6138
  rootBoundary = "viewport",
6138
6139
  elementContext = "floating",
6139
6140
  altBoundary = false,
6140
6141
  padding = 0
6141
- } = evaluate(options, state27);
6142
+ } = evaluate(options, state28);
6142
6143
  const paddingObject = getPaddingObject(padding);
6143
6144
  const altContext = elementContext === "floating" ? "reference" : "floating";
6144
6145
  const element = elements[altBoundary ? altContext : elementContext];
@@ -6270,7 +6271,7 @@ var flip = function(options) {
6270
6271
  return {
6271
6272
  name: "flip",
6272
6273
  options,
6273
- async fn(state27) {
6274
+ async fn(state28) {
6274
6275
  var _middlewareData$arrow, _middlewareData$flip;
6275
6276
  const {
6276
6277
  placement,
@@ -6279,7 +6280,7 @@ var flip = function(options) {
6279
6280
  initialPlacement,
6280
6281
  platform: platform2,
6281
6282
  elements
6282
- } = state27;
6283
+ } = state28;
6283
6284
  const {
6284
6285
  mainAxis: checkMainAxis = true,
6285
6286
  crossAxis: checkCrossAxis = true,
@@ -6288,7 +6289,7 @@ var flip = function(options) {
6288
6289
  fallbackAxisSideDirection = "none",
6289
6290
  flipAlignment = true,
6290
6291
  ...detectOverflowOptions
6291
- } = evaluate(options, state27);
6292
+ } = evaluate(options, state28);
6292
6293
  if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
6293
6294
  return {};
6294
6295
  }
@@ -6302,7 +6303,7 @@ var flip = function(options) {
6302
6303
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
6303
6304
  }
6304
6305
  const placements2 = [initialPlacement, ...fallbackPlacements];
6305
- const overflow = await platform2.detectOverflow(state27, detectOverflowOptions);
6306
+ const overflow = await platform2.detectOverflow(state28, detectOverflowOptions);
6306
6307
  const overflows = [];
6307
6308
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
6308
6309
  if (checkMainAxis) {
@@ -6373,19 +6374,19 @@ var flip = function(options) {
6373
6374
  };
6374
6375
  };
6375
6376
  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
6376
- async function convertValueToCoords(state27, options) {
6377
+ async function convertValueToCoords(state28, options) {
6377
6378
  const {
6378
6379
  placement,
6379
6380
  platform: platform2,
6380
6381
  elements
6381
- } = state27;
6382
+ } = state28;
6382
6383
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
6383
6384
  const side = getSide(placement);
6384
6385
  const alignment = getAlignment(placement);
6385
6386
  const isVertical = getSideAxis(placement) === "y";
6386
6387
  const mainAxisMulti = originSides.has(side) ? -1 : 1;
6387
6388
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
6388
- const rawValue = evaluate(options, state27);
6389
+ const rawValue = evaluate(options, state28);
6389
6390
  let {
6390
6391
  mainAxis,
6391
6392
  crossAxis,
@@ -6417,15 +6418,15 @@ var offset = function(options) {
6417
6418
  return {
6418
6419
  name: "offset",
6419
6420
  options,
6420
- async fn(state27) {
6421
+ async fn(state28) {
6421
6422
  var _middlewareData$offse, _middlewareData$arrow;
6422
6423
  const {
6423
6424
  x,
6424
6425
  y,
6425
6426
  placement,
6426
6427
  middlewareData
6427
- } = state27;
6428
- const diffCoords = await convertValueToCoords(state27, options);
6428
+ } = state28;
6429
+ const diffCoords = await convertValueToCoords(state28, options);
6429
6430
  if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
6430
6431
  return {};
6431
6432
  }
@@ -6447,13 +6448,13 @@ var shift = function(options) {
6447
6448
  return {
6448
6449
  name: "shift",
6449
6450
  options,
6450
- async fn(state27) {
6451
+ async fn(state28) {
6451
6452
  const {
6452
6453
  x,
6453
6454
  y,
6454
6455
  placement,
6455
6456
  platform: platform2
6456
- } = state27;
6457
+ } = state28;
6457
6458
  const {
6458
6459
  mainAxis: checkMainAxis = true,
6459
6460
  crossAxis: checkCrossAxis = false,
@@ -6470,12 +6471,12 @@ var shift = function(options) {
6470
6471
  }
6471
6472
  },
6472
6473
  ...detectOverflowOptions
6473
- } = evaluate(options, state27);
6474
+ } = evaluate(options, state28);
6474
6475
  const coords = {
6475
6476
  x,
6476
6477
  y
6477
6478
  };
6478
- const overflow = await platform2.detectOverflow(state27, detectOverflowOptions);
6479
+ const overflow = await platform2.detectOverflow(state28, detectOverflowOptions);
6479
6480
  const crossAxis = getSideAxis(getSide(placement));
6480
6481
  const mainAxis = getOppositeAxis(crossAxis);
6481
6482
  let mainAxisCoord = coords[mainAxis];
@@ -6495,7 +6496,7 @@ var shift = function(options) {
6495
6496
  crossAxisCoord = clamp(min2, crossAxisCoord, max2);
6496
6497
  }
6497
6498
  const limitedCoords = limiter.fn({
6498
- ...state27,
6499
+ ...state28,
6499
6500
  [mainAxis]: mainAxisCoord,
6500
6501
  [crossAxis]: crossAxisCoord
6501
6502
  });
@@ -6586,8 +6587,8 @@ var containRe = /paint|layout|strict|content/;
6586
6587
  var isNotNone = (value) => !!value && value !== "none";
6587
6588
  var isWebKitValue;
6588
6589
  function isContainingBlock(elementOrCss) {
6589
- const css180 = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
6590
- return isNotNone(css180.transform) || isNotNone(css180.translate) || isNotNone(css180.scale) || isNotNone(css180.rotate) || isNotNone(css180.perspective) || !isWebKit() && (isNotNone(css180.backdropFilter) || isNotNone(css180.filter)) || willChangeRe.test(css180.willChange || "") || containRe.test(css180.contain || "");
6590
+ const css182 = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
6591
+ return isNotNone(css182.transform) || isNotNone(css182.translate) || isNotNone(css182.scale) || isNotNone(css182.rotate) || isNotNone(css182.perspective) || !isWebKit() && (isNotNone(css182.backdropFilter) || isNotNone(css182.filter)) || willChangeRe.test(css182.willChange || "") || containRe.test(css182.contain || "");
6591
6592
  }
6592
6593
  function getContainingBlock(element) {
6593
6594
  let currentNode = getParentNode(element);
@@ -6672,9 +6673,9 @@ function getFrameElement(win) {
6672
6673
 
6673
6674
  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
6674
6675
  function getCssDimensions(element) {
6675
- const css180 = getComputedStyle2(element);
6676
- let width = parseFloat(css180.width) || 0;
6677
- let height = parseFloat(css180.height) || 0;
6676
+ const css182 = getComputedStyle2(element);
6677
+ let width = parseFloat(css182.width) || 0;
6678
+ let height = parseFloat(css182.height) || 0;
6678
6679
  const hasOffset = isHTMLElement(element);
6679
6680
  const offsetWidth = hasOffset ? element.offsetWidth : width;
6680
6681
  const offsetHeight = hasOffset ? element.offsetHeight : height;
@@ -6768,9 +6769,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
6768
6769
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
6769
6770
  const iframeScale = getScale(currentIFrame);
6770
6771
  const iframeRect = currentIFrame.getBoundingClientRect();
6771
- const css180 = getComputedStyle2(currentIFrame);
6772
- const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css180.paddingLeft)) * iframeScale.x;
6773
- const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css180.paddingTop)) * iframeScale.y;
6772
+ const css182 = getComputedStyle2(currentIFrame);
6773
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css182.paddingLeft)) * iframeScale.x;
6774
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css182.paddingTop)) * iframeScale.y;
6774
6775
  x *= iframeScale.x;
6775
6776
  y *= iframeScale.y;
6776
6777
  width *= iframeScale.x;
@@ -6847,15 +6848,15 @@ function getClientRects(element) {
6847
6848
  return Array.from(element.getClientRects());
6848
6849
  }
6849
6850
  function getDocumentRect(element) {
6850
- const html82 = getDocumentElement(element);
6851
+ const html83 = getDocumentElement(element);
6851
6852
  const scroll = getNodeScroll(element);
6852
6853
  const body = element.ownerDocument.body;
6853
- const width = max(html82.scrollWidth, html82.clientWidth, body.scrollWidth, body.clientWidth);
6854
- const height = max(html82.scrollHeight, html82.clientHeight, body.scrollHeight, body.clientHeight);
6854
+ const width = max(html83.scrollWidth, html83.clientWidth, body.scrollWidth, body.clientWidth);
6855
+ const height = max(html83.scrollHeight, html83.clientHeight, body.scrollHeight, body.clientHeight);
6855
6856
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
6856
6857
  const y = -scroll.scrollTop;
6857
6858
  if (getComputedStyle2(body).direction === "rtl") {
6858
- x += max(html82.clientWidth, body.clientWidth) - width;
6859
+ x += max(html83.clientWidth, body.clientWidth) - width;
6859
6860
  }
6860
6861
  return {
6861
6862
  width,
@@ -6867,10 +6868,10 @@ function getDocumentRect(element) {
6867
6868
  var SCROLLBAR_MAX = 25;
6868
6869
  function getViewportRect(element, strategy) {
6869
6870
  const win = getWindow(element);
6870
- const html82 = getDocumentElement(element);
6871
+ const html83 = getDocumentElement(element);
6871
6872
  const visualViewport = win.visualViewport;
6872
- let width = html82.clientWidth;
6873
- let height = html82.clientHeight;
6873
+ let width = html83.clientWidth;
6874
+ let height = html83.clientHeight;
6874
6875
  let x = 0;
6875
6876
  let y = 0;
6876
6877
  if (visualViewport) {
@@ -6882,13 +6883,13 @@ function getViewportRect(element, strategy) {
6882
6883
  y = visualViewport.offsetTop;
6883
6884
  }
6884
6885
  }
6885
- const windowScrollbarX = getWindowScrollBarX(html82);
6886
+ const windowScrollbarX = getWindowScrollBarX(html83);
6886
6887
  if (windowScrollbarX <= 0) {
6887
- const doc = html82.ownerDocument;
6888
+ const doc = html83.ownerDocument;
6888
6889
  const body = doc.body;
6889
6890
  const bodyStyles = getComputedStyle(body);
6890
6891
  const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
6891
- const clippingStableScrollbarWidth = Math.abs(html82.clientWidth - body.clientWidth - bodyMarginInline);
6892
+ const clippingStableScrollbarWidth = Math.abs(html83.clientWidth - body.clientWidth - bodyMarginInline);
6892
6893
  if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
6893
6894
  width -= clippingStableScrollbarWidth;
6894
6895
  }
@@ -7155,6 +7156,8 @@ var CsTooltipInternal = class extends CsBaseElement {
7155
7156
  this.position = "top";
7156
7157
  this.content = "";
7157
7158
  this._visible = false;
7159
+ this._triggerRef = createRef();
7160
+ this._bodyRef = createRef();
7158
7161
  this._tooltipId = generateUniqueId("tooltip");
7159
7162
  this._showTimeout = null;
7160
7163
  this._show = () => {
@@ -7183,22 +7186,20 @@ var CsTooltipInternal = class extends CsBaseElement {
7183
7186
  }
7184
7187
  }
7185
7188
  async updated() {
7186
- if (this._visible && this._triggerEl && this._bodyEl) {
7189
+ if (this._visible && this._triggerRef.value && this._bodyRef.value) {
7187
7190
  await this._updatePosition();
7188
7191
  }
7189
7192
  }
7190
7193
  async _updatePosition() {
7191
- if (!this._triggerEl || !this._bodyEl) return;
7194
+ const trigger = this._triggerRef.value;
7195
+ const body = this._bodyRef.value;
7196
+ if (!trigger || !body) return;
7192
7197
  const placement = this.position;
7193
- const { x, y } = await computePosition2(
7194
- this._triggerEl,
7195
- this._bodyEl,
7196
- {
7197
- placement,
7198
- middleware: [offset2(8), flip2(), shift2({ padding: 8 })]
7199
- }
7200
- );
7201
- Object.assign(this._bodyEl.style, {
7198
+ const { x, y } = await computePosition2(trigger, body, {
7199
+ placement,
7200
+ middleware: [offset2(8), flip2(), shift2({ padding: 8 })]
7201
+ });
7202
+ Object.assign(body.style, {
7202
7203
  position: "absolute",
7203
7204
  left: `${x}px`,
7204
7205
  top: `${y}px`
@@ -7208,7 +7209,7 @@ var CsTooltipInternal = class extends CsBaseElement {
7208
7209
  return html19`
7209
7210
  <div class="tooltip--root">
7210
7211
  <div
7211
- class="tooltip-trigger"
7212
+ ${ref(this._triggerRef)}
7212
7213
  aria-describedby=${this._visible ? this._tooltipId : nothing6}
7213
7214
  @mouseenter=${this._show}
7214
7215
  @mouseleave=${this._hide}
@@ -7219,9 +7220,10 @@ var CsTooltipInternal = class extends CsBaseElement {
7219
7220
  </div>
7220
7221
  ${this._visible && this.content ? html19`
7221
7222
  <div
7222
- class="tooltip-body"
7223
+ ${ref(this._bodyRef)}
7223
7224
  role="tooltip"
7224
7225
  id=${this._tooltipId}
7226
+ style="position: absolute"
7225
7227
  >
7226
7228
  ${this.content}
7227
7229
  </div>
@@ -7239,12 +7241,6 @@ __decorateClass([
7239
7241
  __decorateClass([
7240
7242
  state4()
7241
7243
  ], CsTooltipInternal.prototype, "_visible", 2);
7242
- __decorateClass([
7243
- query(".tooltip-trigger")
7244
- ], CsTooltipInternal.prototype, "_triggerEl", 2);
7245
- __decorateClass([
7246
- query(".tooltip-body")
7247
- ], CsTooltipInternal.prototype, "_bodyEl", 2);
7248
7244
 
7249
7245
  // src/tooltip/index.ts
7250
7246
  var CsTooltip = class extends CsTooltipInternal {
@@ -7253,7 +7249,7 @@ customElements.define("cs-tooltip", CsTooltip);
7253
7249
 
7254
7250
  // src/popover/internal.ts
7255
7251
  import { css as css47, html as html20, nothing as nothing7 } from "lit";
7256
- import { property as property19, state as state5, query as query2 } from "lit/decorators.js";
7252
+ import { property as property19, state as state5, query } from "lit/decorators.js";
7257
7253
  import { classMap as classMap17 } from "lit/directives/class-map.js";
7258
7254
  import { ifDefined as ifDefined10 } from "lit/directives/if-defined.js";
7259
7255
 
@@ -7927,10 +7923,10 @@ __decorateClass([
7927
7923
  state5()
7928
7924
  ], CsPopoverInternal.prototype, "_open", 2);
7929
7925
  __decorateClass([
7930
- query2(".trigger")
7926
+ query(".trigger")
7931
7927
  ], CsPopoverInternal.prototype, "_triggerEl", 2);
7932
7928
  __decorateClass([
7933
- query2(".container")
7929
+ query(".container")
7934
7930
  ], CsPopoverInternal.prototype, "_containerEl", 2);
7935
7931
 
7936
7932
  // src/popover/index.ts
@@ -14368,9 +14364,10 @@ customElements.define("cs-expandable-section", CsExpandableSection);
14368
14364
 
14369
14365
  // src/button-dropdown/internal.ts
14370
14366
  import { css as css89, html as html41, nothing as nothing18 } from "lit";
14371
- import { property as property40, state as state11, query as query3 } from "lit/decorators.js";
14367
+ import { property as property40, state as state11, query as query2 } from "lit/decorators.js";
14372
14368
  import { classMap as classMap36 } from "lit/directives/class-map.js";
14373
14369
  import { ifDefined as ifDefined21 } from "lit/directives/if-defined.js";
14370
+ import { createRef as createRef2, ref as ref2 } from "lit/directives/ref.js";
14374
14371
 
14375
14372
  // src/button-dropdown/styles.ts
14376
14373
  import { css as css87 } from "lit";
@@ -14700,6 +14697,7 @@ var CsButtonDropdownInternal = class extends CsBaseElement {
14700
14697
  this.ariaLabel = null;
14701
14698
  this._open = false;
14702
14699
  this._highlightedIndex = -1;
14700
+ this._triggerRef = createRef2();
14703
14701
  this._cleanupOutsideClick = null;
14704
14702
  this._onTriggerClick = () => {
14705
14703
  if (!this._isInteractive()) return;
@@ -14721,7 +14719,7 @@ var CsButtonDropdownInternal = class extends CsBaseElement {
14721
14719
  case "Escape":
14722
14720
  e.stopPropagation();
14723
14721
  this._open = false;
14724
- this._triggerEl?.focus();
14722
+ this._triggerRef.value?.focus();
14725
14723
  break;
14726
14724
  case "ArrowDown":
14727
14725
  e.preventDefault();
@@ -14777,7 +14775,7 @@ var CsButtonDropdownInternal = class extends CsBaseElement {
14777
14775
  }
14778
14776
  }
14779
14777
  focus(options) {
14780
- this._triggerEl?.focus(options);
14778
+ this._triggerRef.value?.focus(options);
14781
14779
  }
14782
14780
  _flatItems() {
14783
14781
  return this.items.filter(isActionItem);
@@ -14803,13 +14801,13 @@ var CsButtonDropdownInternal = class extends CsBaseElement {
14803
14801
  });
14804
14802
  }
14805
14803
  this._open = false;
14806
- this._triggerEl?.focus();
14804
+ this._triggerRef.value?.focus();
14807
14805
  }
14808
14806
  async _updatePosition() {
14809
14807
  await this.updateComplete;
14810
- if (!this._triggerEl || !this._dropdownEl) return;
14808
+ if (!this._triggerRef.value || !this._dropdownEl) return;
14811
14809
  const { x, y } = await computePosition2(
14812
- this._triggerEl,
14810
+ this._triggerRef.value,
14813
14811
  this._dropdownEl,
14814
14812
  {
14815
14813
  placement: "bottom-start",
@@ -14850,7 +14848,6 @@ var CsButtonDropdownInternal = class extends CsBaseElement {
14850
14848
  const isDisabled = this.disabled || this.loading;
14851
14849
  const buttonClasses = {
14852
14850
  "button": true,
14853
- "trigger-btn": true,
14854
14851
  [`variant-${this.variant}`]: true,
14855
14852
  "disabled": isDisabled,
14856
14853
  "button-no-text": isIcon
@@ -14860,6 +14857,7 @@ var CsButtonDropdownInternal = class extends CsBaseElement {
14860
14857
  if (isIcon) {
14861
14858
  return html41`
14862
14859
  <button
14860
+ ${ref2(this._triggerRef)}
14863
14861
  class=${classMap36(buttonClasses)}
14864
14862
  type="button"
14865
14863
  aria-haspopup="true"
@@ -14879,6 +14877,7 @@ var CsButtonDropdownInternal = class extends CsBaseElement {
14879
14877
  };
14880
14878
  return html41`
14881
14879
  <button
14880
+ ${ref2(this._triggerRef)}
14882
14881
  class=${classMap36(buttonClasses)}
14883
14882
  type="button"
14884
14883
  aria-haspopup="true"
@@ -14980,10 +14979,7 @@ __decorateClass([
14980
14979
  state11()
14981
14980
  ], CsButtonDropdownInternal.prototype, "_highlightedIndex", 2);
14982
14981
  __decorateClass([
14983
- query3(".trigger-btn")
14984
- ], CsButtonDropdownInternal.prototype, "_triggerEl", 2);
14985
- __decorateClass([
14986
- query3(".dropdown")
14982
+ query2(".dropdown")
14987
14983
  ], CsButtonDropdownInternal.prototype, "_dropdownEl", 2);
14988
14984
 
14989
14985
  // src/button-dropdown/index.ts
@@ -15483,9 +15479,10 @@ customElements.define("cs-breadcrumb-group", CsBreadcrumbGroup);
15483
15479
 
15484
15480
  // src/select/internal.ts
15485
15481
  import { css as css97, html as html44, nothing as nothing19 } from "lit";
15486
- import { property as property43, state as state12, query as query4 } from "lit/decorators.js";
15482
+ import { property as property43, state as state12, query as query3 } from "lit/decorators.js";
15487
15483
  import { classMap as classMap38 } from "lit/directives/class-map.js";
15488
15484
  import { ifDefined as ifDefined24 } from "lit/directives/if-defined.js";
15485
+ import { createRef as createRef3, ref as ref3 } from "lit/directives/ref.js";
15489
15486
 
15490
15487
  // src/select/styles.ts
15491
15488
  import { css as css95 } from "lit";
@@ -15807,6 +15804,7 @@ var CsSelectInternal = class extends Base6 {
15807
15804
  this._open = false;
15808
15805
  this._filterText = "";
15809
15806
  this._highlightedIndex = -1;
15807
+ this._filterInputRef = createRef3();
15810
15808
  this._cleanupOutsideClick = null;
15811
15809
  this._onTriggerClick = () => {
15812
15810
  if (this.disabled) return;
@@ -15893,7 +15891,7 @@ var CsSelectInternal = class extends Base6 {
15893
15891
  this._addOutsideClickListener();
15894
15892
  if (this._hasFiltering()) {
15895
15893
  this.updateComplete.then(() => {
15896
- this._filterInputEl?.focus();
15894
+ this._filterInputRef.value?.focus();
15897
15895
  });
15898
15896
  }
15899
15897
  } else {
@@ -16054,6 +16052,7 @@ var CsSelectInternal = class extends Base6 {
16054
16052
  ${this._hasFiltering() ? html44`
16055
16053
  <div class="filter-container select-parts--filter">
16056
16054
  <input
16055
+ ${ref3(this._filterInputRef)}
16057
16056
  class="filter-input"
16058
16057
  type="text"
16059
16058
  placeholder=${this.filteringPlaceholder || "Filter"}
@@ -16148,14 +16147,11 @@ __decorateClass([
16148
16147
  state12()
16149
16148
  ], CsSelectInternal.prototype, "_highlightedIndex", 2);
16150
16149
  __decorateClass([
16151
- query4(".trigger")
16150
+ query3(".trigger")
16152
16151
  ], CsSelectInternal.prototype, "_triggerEl", 2);
16153
16152
  __decorateClass([
16154
- query4(".dropdown")
16153
+ query3(".dropdown")
16155
16154
  ], CsSelectInternal.prototype, "_dropdownEl", 2);
16156
- __decorateClass([
16157
- query4(".filter-input")
16158
- ], CsSelectInternal.prototype, "_filterInputEl", 2);
16159
16155
 
16160
16156
  // src/select/index.ts
16161
16157
  var CsSelect = class extends CsSelectInternal {
@@ -16164,9 +16160,10 @@ customElements.define("cs-select", CsSelect);
16164
16160
 
16165
16161
  // src/multiselect/internal.ts
16166
16162
  import { css as css99, html as html45, nothing as nothing20 } from "lit";
16167
- import { property as property44, state as state13, query as query5 } from "lit/decorators.js";
16163
+ import { property as property44, state as state13, query as query4 } from "lit/decorators.js";
16168
16164
  import { classMap as classMap39 } from "lit/directives/class-map.js";
16169
16165
  import { ifDefined as ifDefined25 } from "lit/directives/if-defined.js";
16166
+ import { createRef as createRef4, ref as ref4 } from "lit/directives/ref.js";
16170
16167
 
16171
16168
  // src/multiselect/styles.ts
16172
16169
  import { css as css98 } from "lit";
@@ -16396,6 +16393,7 @@ var CsMultiselectInternal = class extends Base7 {
16396
16393
  this._open = false;
16397
16394
  this._filterText = "";
16398
16395
  this._highlightedIndex = -1;
16396
+ this._filterInputRef = createRef4();
16399
16397
  this._cleanupOutsideClick = null;
16400
16398
  this._onTriggerClick = () => {
16401
16399
  if (this.disabled) return;
@@ -16498,7 +16496,7 @@ var CsMultiselectInternal = class extends Base7 {
16498
16496
  this._addOutsideClickListener();
16499
16497
  if (this._hasFiltering()) {
16500
16498
  this.updateComplete.then(() => {
16501
- this._filterInputEl?.focus();
16499
+ this._filterInputRef.value?.focus();
16502
16500
  });
16503
16501
  }
16504
16502
  } else {
@@ -16676,6 +16674,7 @@ var CsMultiselectInternal = class extends Base7 {
16676
16674
  ${this._hasFiltering() ? html45`
16677
16675
  <div class="filter-container select-parts--filter">
16678
16676
  <input
16677
+ ${ref4(this._filterInputRef)}
16679
16678
  class="filter-input"
16680
16679
  type="text"
16681
16680
  placeholder=${this.filteringPlaceholder || "Filter"}
@@ -16791,14 +16790,11 @@ __decorateClass([
16791
16790
  state13()
16792
16791
  ], CsMultiselectInternal.prototype, "_highlightedIndex", 2);
16793
16792
  __decorateClass([
16794
- query5(".trigger")
16793
+ query4(".trigger")
16795
16794
  ], CsMultiselectInternal.prototype, "_triggerEl", 2);
16796
16795
  __decorateClass([
16797
- query5(".dropdown")
16796
+ query4(".dropdown")
16798
16797
  ], CsMultiselectInternal.prototype, "_dropdownEl", 2);
16799
- __decorateClass([
16800
- query5(".filter-input")
16801
- ], CsMultiselectInternal.prototype, "_filterInputEl", 2);
16802
16798
 
16803
16799
  // src/multiselect/index.ts
16804
16800
  var CsMultiselect = class extends CsMultiselectInternal {
@@ -16807,9 +16803,10 @@ customElements.define("cs-multiselect", CsMultiselect);
16807
16803
 
16808
16804
  // src/autosuggest/internal.ts
16809
16805
  import { css as css102, html as html46, nothing as nothing21 } from "lit";
16810
- import { property as property45, state as state14, query as query6 } from "lit/decorators.js";
16806
+ import { property as property45, state as state14, query as query5 } from "lit/decorators.js";
16811
16807
  import { classMap as classMap40 } from "lit/directives/class-map.js";
16812
16808
  import { ifDefined as ifDefined26 } from "lit/directives/if-defined.js";
16809
+ import { createRef as createRef5, ref as ref5 } from "lit/directives/ref.js";
16813
16810
 
16814
16811
  // src/autosuggest/styles.ts
16815
16812
  import { css as css100 } from "lit";
@@ -17047,6 +17044,7 @@ var CsAutosuggestInternal = class extends Base8 {
17047
17044
  this.filteringType = "auto";
17048
17045
  this._open = false;
17049
17046
  this._highlightedIndex = -1;
17047
+ this._inputRef = createRef5();
17050
17048
  this._listboxId = generateUniqueId("autosuggest-listbox");
17051
17049
  this._flatOptions = [];
17052
17050
  this._onInput = (e) => {
@@ -17138,10 +17136,10 @@ var CsAutosuggestInternal = class extends Base8 {
17138
17136
  this._flatOptions = result;
17139
17137
  }
17140
17138
  focus(options) {
17141
- this._inputEl?.focus(options);
17139
+ this._inputRef.value?.focus(options);
17142
17140
  }
17143
17141
  select() {
17144
- this._inputEl?.select();
17142
+ this._inputRef.value?.select();
17145
17143
  }
17146
17144
  _scrollHighlightedIntoView() {
17147
17145
  this.updateComplete.then(() => {
@@ -17167,14 +17165,14 @@ var CsAutosuggestInternal = class extends Base8 {
17167
17165
  }
17168
17166
  async updated(changed) {
17169
17167
  super.updated(changed);
17170
- if (this._open && this._inputEl && this._dropdownEl) {
17168
+ if (this._open && this._inputRef.value && this._dropdownEl) {
17171
17169
  await this._updatePosition();
17172
17170
  }
17173
17171
  }
17174
17172
  async _updatePosition() {
17175
- if (!this._inputEl || !this._dropdownEl) return;
17173
+ if (!this._inputRef.value || !this._dropdownEl) return;
17176
17174
  const { x, y } = await computePosition2(
17177
- this._inputEl,
17175
+ this._inputRef.value,
17178
17176
  this._dropdownEl,
17179
17177
  {
17180
17178
  placement: "bottom-start",
@@ -17189,7 +17187,7 @@ var CsAutosuggestInternal = class extends Base8 {
17189
17187
  Object.assign(this._dropdownEl.style, {
17190
17188
  left: `${x}px`,
17191
17189
  top: `${y}px`,
17192
- inlineSize: `${this._inputEl.offsetWidth}px`
17190
+ inlineSize: `${this._inputRef.value.offsetWidth}px`
17193
17191
  });
17194
17192
  }
17195
17193
  render() {
@@ -17197,7 +17195,6 @@ var CsAutosuggestInternal = class extends Base8 {
17197
17195
  const showDropdown = this._open && filtered.length > 0 && !this.readOnly && !this.disabled;
17198
17196
  const inputClasses = {
17199
17197
  "input": true,
17200
- "input-element": true,
17201
17198
  "input-readonly": this.readOnly,
17202
17199
  "input-invalid": this.invalid,
17203
17200
  "input-disabled": this.disabled
@@ -17206,6 +17203,7 @@ var CsAutosuggestInternal = class extends Base8 {
17206
17203
  <div class="root">
17207
17204
  <div class="layout-strut">
17208
17205
  <input
17206
+ ${ref5(this._inputRef)}
17209
17207
  class=${classMap40(inputClasses)}
17210
17208
  type="text"
17211
17209
  .value=${this.value}
@@ -17293,10 +17291,7 @@ __decorateClass([
17293
17291
  state14()
17294
17292
  ], CsAutosuggestInternal.prototype, "_highlightedIndex", 2);
17295
17293
  __decorateClass([
17296
- query6(".input-element")
17297
- ], CsAutosuggestInternal.prototype, "_inputEl", 2);
17298
- __decorateClass([
17299
- query6(".dropdown")
17294
+ query5(".dropdown")
17300
17295
  ], CsAutosuggestInternal.prototype, "_dropdownEl", 2);
17301
17296
 
17302
17297
  // src/autosuggest/index.ts
@@ -19123,7 +19118,8 @@ customElements.define("cs-key-value-pairs", CsKeyValuePairs);
19123
19118
 
19124
19119
  // src/property-filter/internal.ts
19125
19120
  import { css as css116, html as html53, nothing as nothing27 } from "lit";
19126
- import { property as property52, state as state17, query as queryDecorator } from "lit/decorators.js";
19121
+ import { property as property52, state as state17 } from "lit/decorators.js";
19122
+ import { createRef as createRef6, ref as ref6 } from "lit/directives/ref.js";
19127
19123
 
19128
19124
  // src/property-filter/styles.ts
19129
19125
  import { css as css115 } from "lit";
@@ -19391,12 +19387,13 @@ var CsPropertyFilterInternal = class extends CsBaseElement {
19391
19387
  this.disabled = false;
19392
19388
  this.filteringPlaceholder = "Filter by text";
19393
19389
  this._inputValue = "";
19390
+ this._inputRef = createRef6();
19394
19391
  }
19395
19392
  static {
19396
19393
  this.styles = [sharedStyles, componentStyles51, componentStyles26, filterInputStyles, hostStyles52];
19397
19394
  }
19398
19395
  focus(options) {
19399
- this._inputEl?.focus(options);
19396
+ this._inputRef.value?.focus(options);
19400
19397
  }
19401
19398
  _onInput(e) {
19402
19399
  this._inputValue = e.target.value;
@@ -19449,6 +19446,7 @@ var CsPropertyFilterInternal = class extends CsBaseElement {
19449
19446
  <div class="search-field">
19450
19447
  <div class="input-wrapper">
19451
19448
  <input
19449
+ ${ref6(this._inputRef)}
19452
19450
  class="filter-input"
19453
19451
  type="text"
19454
19452
  .value=${this._inputValue}
@@ -19500,9 +19498,6 @@ __decorateClass([
19500
19498
  __decorateClass([
19501
19499
  state17()
19502
19500
  ], CsPropertyFilterInternal.prototype, "_inputValue", 2);
19503
- __decorateClass([
19504
- queryDecorator(".filter-input")
19505
- ], CsPropertyFilterInternal.prototype, "_inputEl", 2);
19506
19501
 
19507
19502
  // src/property-filter/index.ts
19508
19503
  var CsPropertyFilter = class extends CsPropertyFilterInternal {
@@ -21714,7 +21709,7 @@ customElements.define("cs-date-input", CsDateInput);
21714
21709
 
21715
21710
  // src/date-picker/internal.ts
21716
21711
  import { css as css130, html as html60, nothing as nothing32 } from "lit";
21717
- import { property as property59, state as state19, query as query7 } from "lit/decorators.js";
21712
+ import { property as property59, state as state19, query as query6 } from "lit/decorators.js";
21718
21713
  import { ifDefined as ifDefined32 } from "lit/directives/if-defined.js";
21719
21714
  import { consume as consume3 } from "@lit/context";
21720
21715
 
@@ -22007,10 +22002,10 @@ __decorateClass([
22007
22002
  state19()
22008
22003
  ], CsDatePickerInternal.prototype, "_open", 2);
22009
22004
  __decorateClass([
22010
- query7(".date-picker-trigger")
22005
+ query6(".date-picker-trigger")
22011
22006
  ], CsDatePickerInternal.prototype, "_triggerEl", 2);
22012
22007
  __decorateClass([
22013
- query7(".dropdown")
22008
+ query6(".dropdown")
22014
22009
  ], CsDatePickerInternal.prototype, "_dropdownEl", 2);
22015
22010
 
22016
22011
  // src/date-picker/index.ts
@@ -22020,7 +22015,7 @@ customElements.define("cs-date-picker", CsDatePicker);
22020
22015
 
22021
22016
  // src/date-range-picker/internal.ts
22022
22017
  import { css as css133, html as html61, nothing as nothing33 } from "lit";
22023
- import { property as property60, state as state20, query as query8 } from "lit/decorators.js";
22018
+ import { property as property60, state as state20, query as query7 } from "lit/decorators.js";
22024
22019
  import { classMap as classMap50 } from "lit/directives/class-map.js";
22025
22020
  import { ifDefined as ifDefined33 } from "lit/directives/if-defined.js";
22026
22021
 
@@ -22849,10 +22844,10 @@ __decorateClass([
22849
22844
  state20()
22850
22845
  ], CsDateRangePickerInternal.prototype, "_selectedRelativeKey", 2);
22851
22846
  __decorateClass([
22852
- query8(".trigger-button")
22847
+ query7(".trigger-button")
22853
22848
  ], CsDateRangePickerInternal.prototype, "_triggerEl", 2);
22854
22849
  __decorateClass([
22855
- query8(".dropdown")
22850
+ query7(".dropdown")
22856
22851
  ], CsDateRangePickerInternal.prototype, "_dropdownEl", 2);
22857
22852
 
22858
22853
  // src/date-range-picker/index.ts
@@ -30690,6 +30685,392 @@ __decorateClass([
30690
30685
  var CsPanelLayout = class extends CsPanelLayoutInternal {
30691
30686
  };
30692
30687
  customElements.define("cs-panel-layout", CsPanelLayout);
30688
+
30689
+ // src/s3-resource-selector/internal.ts
30690
+ import { css as css181, html as html82, nothing as nothing47 } from "lit";
30691
+ import { property as property81, state as state27 } from "lit/decorators.js";
30692
+
30693
+ // src/s3-resource-selector/styles.ts
30694
+ import { css as css180 } from "lit";
30695
+ var componentStyles78 = css180`
30696
+
30697
+ `;
30698
+
30699
+ // src/s3-resource-selector/internal.ts
30700
+ var hostStyles80 = css181`:host { display: block; }`;
30701
+ var CsS3ResourceSelectorInternal = class extends CsBaseElement {
30702
+ constructor() {
30703
+ super(...arguments);
30704
+ this.resource = { uri: "" };
30705
+ this.invalid = false;
30706
+ this._modalOpen = false;
30707
+ this._uri = "";
30708
+ this._currentLevel = "buckets";
30709
+ this._currentPath = [];
30710
+ this._items = [];
30711
+ this._loading = false;
30712
+ this._selectedItems = [];
30713
+ this._onUriChange = (e) => {
30714
+ e.stopPropagation();
30715
+ const uri = e.detail.value;
30716
+ this._uri = uri;
30717
+ const detail = {
30718
+ resource: { uri }
30719
+ };
30720
+ fireNonCancelableEvent(this, "change", detail);
30721
+ };
30722
+ this._openModal = () => {
30723
+ this._modalOpen = true;
30724
+ this._currentLevel = "buckets";
30725
+ this._currentPath = [];
30726
+ this._items = [];
30727
+ this._selectedItems = [];
30728
+ this._loadBuckets();
30729
+ };
30730
+ this._closeModal = () => {
30731
+ this._modalOpen = false;
30732
+ this._items = [];
30733
+ this._selectedItems = [];
30734
+ };
30735
+ this._confirmSelection = () => {
30736
+ if (this._selectedItems.length === 0) return;
30737
+ const selected = this._selectedItems[0];
30738
+ let uri = "";
30739
+ if (this._currentLevel === "buckets") {
30740
+ uri = `s3://${selected.Name}`;
30741
+ } else if (this._currentLevel === "objects") {
30742
+ const bucket = this._currentPath[0];
30743
+ const key = selected.Key ?? "";
30744
+ uri = `s3://${bucket}/${key}`;
30745
+ } else if (this._currentLevel === "versions") {
30746
+ const bucket = this._currentPath[0];
30747
+ const prefix = this._currentPath.slice(1).join("/");
30748
+ uri = `s3://${bucket}/${prefix}`;
30749
+ }
30750
+ this._uri = uri;
30751
+ this._modalOpen = false;
30752
+ const detail = { resource: { uri } };
30753
+ fireNonCancelableEvent(this, "change", detail);
30754
+ };
30755
+ this._onSelectionChange = (e) => {
30756
+ e.stopPropagation();
30757
+ this._selectedItems = e.detail.selectedItems;
30758
+ };
30759
+ this._onRowClick = (e) => {
30760
+ e.stopPropagation();
30761
+ const item = e.detail.item;
30762
+ if (this._currentLevel === "buckets") {
30763
+ const bucketName = item.Name ?? "";
30764
+ this._currentLevel = "objects";
30765
+ this._currentPath = [bucketName];
30766
+ this._selectedItems = [];
30767
+ this._loadObjects(bucketName, "");
30768
+ } else if (this._currentLevel === "objects") {
30769
+ const obj = item;
30770
+ if (obj.IsFolder) {
30771
+ const key = obj.Key ?? "";
30772
+ this._currentPath = [...this._currentPath.slice(0, 1), ...key.split("/").filter(Boolean)];
30773
+ this._selectedItems = [];
30774
+ const prefix = this._currentPath.slice(1).join("/") + "/";
30775
+ this._loadObjects(this._currentPath[0], prefix);
30776
+ }
30777
+ }
30778
+ };
30779
+ this._onBreadcrumbFollow = (e) => {
30780
+ e.stopPropagation();
30781
+ const item = e.detail.item;
30782
+ if (item.href === "/") {
30783
+ this._currentLevel = "buckets";
30784
+ this._currentPath = [];
30785
+ this._selectedItems = [];
30786
+ this._loadBuckets();
30787
+ } else {
30788
+ const depth = parseInt(item.href.replace("/path/", ""), 10);
30789
+ if (!isNaN(depth)) {
30790
+ this._currentPath = this._currentPath.slice(0, depth + 1);
30791
+ this._currentLevel = "objects";
30792
+ this._selectedItems = [];
30793
+ const prefix = this._currentPath.slice(1).join("/");
30794
+ this._loadObjects(this._currentPath[0], prefix ? prefix + "/" : "");
30795
+ }
30796
+ }
30797
+ };
30798
+ }
30799
+ static {
30800
+ this.styles = [sharedStyles, componentStyles78, hostStyles80];
30801
+ }
30802
+ willUpdate(changed) {
30803
+ if (changed.has("resource")) {
30804
+ this._uri = this.resource.uri;
30805
+ }
30806
+ }
30807
+ focus() {
30808
+ const input = this.shadowRoot?.querySelector("cs-input");
30809
+ input?.focus();
30810
+ }
30811
+ async _loadBuckets() {
30812
+ if (!this.fetchBuckets) {
30813
+ this._items = [];
30814
+ return;
30815
+ }
30816
+ this._loading = true;
30817
+ try {
30818
+ const buckets = await this.fetchBuckets();
30819
+ this._items = buckets;
30820
+ } catch {
30821
+ this._items = [];
30822
+ } finally {
30823
+ this._loading = false;
30824
+ }
30825
+ }
30826
+ async _loadObjects(bucket, prefix) {
30827
+ if (!this.fetchObjects) {
30828
+ this._items = [];
30829
+ return;
30830
+ }
30831
+ this._loading = true;
30832
+ try {
30833
+ const objects = await this.fetchObjects(bucket, prefix);
30834
+ this._items = objects;
30835
+ } catch {
30836
+ this._items = [];
30837
+ } finally {
30838
+ this._loading = false;
30839
+ }
30840
+ }
30841
+ get _breadcrumbs() {
30842
+ const root = this.i18nStrings?.modalBreadcrumbRootItem ?? "S3";
30843
+ const items = [{ text: root, href: "/" }];
30844
+ this._currentPath.forEach((segment, i) => {
30845
+ items.push({ text: segment, href: `/path/${i}` });
30846
+ });
30847
+ return items;
30848
+ }
30849
+ get _columnDefinitions() {
30850
+ const strings = this.i18nStrings;
30851
+ if (this._currentLevel === "buckets") {
30852
+ return [
30853
+ {
30854
+ id: "Name",
30855
+ header: strings?.columnBucketName ?? "Name",
30856
+ cell: (item) => item.Name ?? "",
30857
+ sortingField: "Name"
30858
+ },
30859
+ {
30860
+ id: "CreationDate",
30861
+ header: strings?.columnBucketCreationDate ?? "Creation date",
30862
+ cell: (item) => item.CreationDate ?? ""
30863
+ }
30864
+ ];
30865
+ }
30866
+ if (this._currentLevel === "objects") {
30867
+ return [
30868
+ {
30869
+ id: "Key",
30870
+ header: strings?.columnObjectKey ?? "Key",
30871
+ cell: (item) => item.Key ?? "",
30872
+ sortingField: "Key"
30873
+ },
30874
+ {
30875
+ id: "LastModified",
30876
+ header: strings?.columnObjectLastModified ?? "Last modified",
30877
+ cell: (item) => item.LastModified ?? ""
30878
+ },
30879
+ {
30880
+ id: "Size",
30881
+ header: strings?.columnObjectSize ?? "Size",
30882
+ cell: (item) => {
30883
+ const size2 = item.Size;
30884
+ return size2 !== void 0 ? String(size2) : "";
30885
+ }
30886
+ }
30887
+ ];
30888
+ }
30889
+ return [
30890
+ {
30891
+ id: "VersionId",
30892
+ header: strings?.columnVersionID ?? "Version ID",
30893
+ cell: (item) => item.VersionId ?? "",
30894
+ sortingField: "VersionId"
30895
+ },
30896
+ {
30897
+ id: "LastModified",
30898
+ header: strings?.columnVersionLastModified ?? "Last modified",
30899
+ cell: (item) => item.LastModified ?? ""
30900
+ },
30901
+ {
30902
+ id: "Size",
30903
+ header: strings?.columnVersionSize ?? "Size",
30904
+ cell: (item) => {
30905
+ const size2 = item.Size;
30906
+ return size2 !== void 0 ? String(size2) : "";
30907
+ }
30908
+ }
30909
+ ];
30910
+ }
30911
+ get _selectionType() {
30912
+ if (!this.selectableItemsTypes) return void 0;
30913
+ if (this._currentLevel === "buckets" && this.selectableItemsTypes.includes("buckets")) return "single";
30914
+ if (this._currentLevel === "objects" && this.selectableItemsTypes.includes("objects")) return "single";
30915
+ if (this._currentLevel === "versions" && this.selectableItemsTypes.includes("versions")) return "single";
30916
+ return void 0;
30917
+ }
30918
+ get _tableHeaderText() {
30919
+ const strings = this.i18nStrings;
30920
+ if (this._currentLevel === "buckets") return strings?.selectionBuckets ?? "Buckets";
30921
+ if (this._currentLevel === "objects") return strings?.selectionObjects ?? "Objects";
30922
+ return strings?.selectionVersions ?? "Versions";
30923
+ }
30924
+ get _loadingText() {
30925
+ const strings = this.i18nStrings;
30926
+ if (this._currentLevel === "buckets") return strings?.selectionBucketsLoading ?? "Loading buckets";
30927
+ if (this._currentLevel === "objects") return strings?.selectionObjectsLoading ?? "Loading objects";
30928
+ return strings?.selectionVersionsLoading ?? "Loading versions";
30929
+ }
30930
+ get _emptyText() {
30931
+ const strings = this.i18nStrings;
30932
+ if (this._currentLevel === "buckets") return strings?.selectionBucketsNoItems ?? "No buckets";
30933
+ if (this._currentLevel === "objects") return strings?.selectionObjectsNoItems ?? "No objects";
30934
+ return strings?.selectionVersionsNoItems ?? "No versions";
30935
+ }
30936
+ render() {
30937
+ const strings = this.i18nStrings;
30938
+ const browseLabel = strings?.inContextBrowseButton ?? "Browse S3";
30939
+ const modalTitle = strings?.modalTitle ?? "Choose resource from S3";
30940
+ const cancelLabel = strings?.modalCancelButton ?? "Cancel";
30941
+ const submitLabel = strings?.modalSubmitButton ?? "Select";
30942
+ const placeholder = this.inputPlaceholder ?? strings?.inContextInputPlaceholder ?? "s3://bucket/prefix/object";
30943
+ return html82`
30944
+ <div class="root">
30945
+ <div class="input-row" style="display:flex;gap:8px;align-items:flex-start">
30946
+ <cs-input
30947
+ .value=${this._uri}
30948
+ placeholder=${placeholder}
30949
+ ?invalid=${this.invalid}
30950
+ aria-describedby=${this.inputAriaDescribedby ?? nothing47}
30951
+ @change=${this._onUriChange}
30952
+ style="flex:1"
30953
+ ></cs-input>
30954
+ <cs-button @click=${this._openModal}>${browseLabel}</cs-button>
30955
+ ${this.viewHref ? html82`<cs-button variant="normal" href=${this.viewHref}>${strings?.inContextViewButton ?? "View"}</cs-button>` : nothing47}
30956
+ </div>
30957
+
30958
+ <slot name="alert"></slot>
30959
+
30960
+ <cs-modal
30961
+ size="large"
30962
+ header=${modalTitle}
30963
+ .visible=${this._modalOpen}
30964
+ @dismiss=${this._closeModal}
30965
+ >
30966
+ <cs-breadcrumb-group
30967
+ .items=${this._breadcrumbs}
30968
+ @follow=${this._onBreadcrumbFollow}
30969
+ ></cs-breadcrumb-group>
30970
+
30971
+ <cs-table
30972
+ .items=${this._items}
30973
+ .columnDefinitions=${this._columnDefinitions}
30974
+ .loading=${this._loading}
30975
+ loading-text=${this._loadingText}
30976
+ .selectionType=${this._selectionType}
30977
+ .selectedItems=${this._selectedItems}
30978
+ @selectionChange=${this._onSelectionChange}
30979
+ @rowClick=${this._onRowClick}
30980
+ >
30981
+ <cs-header slot="header" counter=${`(${this._items.length})`}>
30982
+ ${this._tableHeaderText}
30983
+ </cs-header>
30984
+ <div slot="empty">${this._emptyText}</div>
30985
+ </cs-table>
30986
+
30987
+ <div slot="footer" style="display:flex;justify-content:flex-end;gap:8px">
30988
+ <cs-button variant="link" @click=${this._closeModal}>${cancelLabel}</cs-button>
30989
+ <cs-button
30990
+ variant="primary"
30991
+ @click=${this._confirmSelection}
30992
+ ?disabled=${this._selectedItems.length === 0}
30993
+ >${submitLabel}</cs-button>
30994
+ </div>
30995
+ </cs-modal>
30996
+ </div>
30997
+ `;
30998
+ }
30999
+ };
31000
+ __decorateClass([
31001
+ property81({ attribute: false })
31002
+ ], CsS3ResourceSelectorInternal.prototype, "resource", 2);
31003
+ __decorateClass([
31004
+ property81({ type: String })
31005
+ ], CsS3ResourceSelectorInternal.prototype, "inputAriaDescribedby", 2);
31006
+ __decorateClass([
31007
+ property81({ type: String })
31008
+ ], CsS3ResourceSelectorInternal.prototype, "inputPlaceholder", 2);
31009
+ __decorateClass([
31010
+ property81({ type: Boolean })
31011
+ ], CsS3ResourceSelectorInternal.prototype, "invalid", 2);
31012
+ __decorateClass([
31013
+ property81({ type: String })
31014
+ ], CsS3ResourceSelectorInternal.prototype, "viewHref", 2);
31015
+ __decorateClass([
31016
+ property81({ attribute: false })
31017
+ ], CsS3ResourceSelectorInternal.prototype, "selectableItemsTypes", 2);
31018
+ __decorateClass([
31019
+ property81({ attribute: false })
31020
+ ], CsS3ResourceSelectorInternal.prototype, "bucketsVisibleColumns", 2);
31021
+ __decorateClass([
31022
+ property81({ attribute: false })
31023
+ ], CsS3ResourceSelectorInternal.prototype, "objectsVisibleColumns", 2);
31024
+ __decorateClass([
31025
+ property81({ attribute: false })
31026
+ ], CsS3ResourceSelectorInternal.prototype, "versionsVisibleColumns", 2);
31027
+ __decorateClass([
31028
+ property81({ attribute: false })
31029
+ ], CsS3ResourceSelectorInternal.prototype, "bucketsIsItemDisabled", 2);
31030
+ __decorateClass([
31031
+ property81({ attribute: false })
31032
+ ], CsS3ResourceSelectorInternal.prototype, "objectsIsItemDisabled", 2);
31033
+ __decorateClass([
31034
+ property81({ attribute: false })
31035
+ ], CsS3ResourceSelectorInternal.prototype, "versionsIsItemDisabled", 2);
31036
+ __decorateClass([
31037
+ property81({ attribute: false })
31038
+ ], CsS3ResourceSelectorInternal.prototype, "fetchBuckets", 2);
31039
+ __decorateClass([
31040
+ property81({ attribute: false })
31041
+ ], CsS3ResourceSelectorInternal.prototype, "fetchObjects", 2);
31042
+ __decorateClass([
31043
+ property81({ attribute: false })
31044
+ ], CsS3ResourceSelectorInternal.prototype, "fetchVersions", 2);
31045
+ __decorateClass([
31046
+ property81({ attribute: false })
31047
+ ], CsS3ResourceSelectorInternal.prototype, "i18nStrings", 2);
31048
+ __decorateClass([
31049
+ state27()
31050
+ ], CsS3ResourceSelectorInternal.prototype, "_modalOpen", 2);
31051
+ __decorateClass([
31052
+ state27()
31053
+ ], CsS3ResourceSelectorInternal.prototype, "_uri", 2);
31054
+ __decorateClass([
31055
+ state27()
31056
+ ], CsS3ResourceSelectorInternal.prototype, "_currentLevel", 2);
31057
+ __decorateClass([
31058
+ state27()
31059
+ ], CsS3ResourceSelectorInternal.prototype, "_currentPath", 2);
31060
+ __decorateClass([
31061
+ state27()
31062
+ ], CsS3ResourceSelectorInternal.prototype, "_items", 2);
31063
+ __decorateClass([
31064
+ state27()
31065
+ ], CsS3ResourceSelectorInternal.prototype, "_loading", 2);
31066
+ __decorateClass([
31067
+ state27()
31068
+ ], CsS3ResourceSelectorInternal.prototype, "_selectedItems", 2);
31069
+
31070
+ // src/s3-resource-selector/index.ts
31071
+ var CsS3ResourceSelector = class extends CsS3ResourceSelectorInternal {
31072
+ };
31073
+ customElements.define("cs-s3-resource-selector", CsS3ResourceSelector);
30693
31074
  export {
30694
31075
  CsAlert,
30695
31076
  CsAnchorNavigation,
@@ -30746,6 +31127,7 @@ export {
30746
31127
  CsPromptInput,
30747
31128
  CsPropertyFilter,
30748
31129
  CsRadioGroup,
31130
+ CsS3ResourceSelector,
30749
31131
  CsSegmentedControl,
30750
31132
  CsSelect,
30751
31133
  CsSideNavigation,