@kumori/aurora-wui-components 0.0.255-dev4009.5 → 0.0.255-dev4009.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.
@@ -1 +1 @@
1
- {"version":3,"file":"axebow-box-form.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-box-form/axebow-box-form.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAElD,OAAO,+BAA+B,CAAC;AACvC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAiC,MAAM,6BAA6B,CAAC;AAEtG,cAAc,6BAA6B,CAAC;AAE5C,qBACa,qBAAsB,SAAQ,UAAU;IACjD,MAAM,CAAC,MAAM,0BAA0B;IAEX,UAAU,SAAU;IACpB,WAAW,SAA2B;IACrC,SAAS,UAAQ;IACjB,QAAQ,UAAS;IACnB,KAAK,EAAE,mBAAmB,EAAE,CAAM;IAEpD,OAAO,CAAC,WAAW,CAAuB;IAEnD,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,mBAAmB,CAKzB;IAEF,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,YAAY;IAiHpB,MAAM;CA8BT;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,0BAA0B,EAAE,qBAAqB,CAAC;KACnD;CACF"}
1
+ {"version":3,"file":"axebow-box-form.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-box-form/axebow-box-form.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAElD,OAAO,+BAA+B,CAAC;AACvC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAiC,MAAM,6BAA6B,CAAC;AAEtG,cAAc,6BAA6B,CAAC;AAE5C,qBACa,qBAAsB,SAAQ,UAAU;IACjD,MAAM,CAAC,MAAM,0BAA0B;IAEX,UAAU,SAAU;IACpB,WAAW,SAA2B;IACrC,SAAS,UAAQ;IACjB,QAAQ,UAAS;IACnB,KAAK,EAAE,mBAAmB,EAAE,CAAM;IAEpD,OAAO,CAAC,WAAW,CAAuB;IAEnD,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,mBAAmB,CAKzB;IAEF,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,YAAY;IA6IpB,MAAM;CA8BT;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,0BAA0B,EAAE,qBAAqB,CAAC;KACnD;CACF"}
package/dist/index.js CHANGED
@@ -8866,11 +8866,10 @@ var AxebowResourceBoxForm = class AxebowResourceBoxForm extends LitElement {
8866
8866
  _renderField(item) {
8867
8867
  const itemType = item.type || "enabled";
8868
8868
  const textToCopy = item.copyValue !== void 0 ? item.copyValue : item.value;
8869
- if (itemType === "text") {
8870
- const hasMenu = !!item.menuOptions && item.menuOptions.length > 0 && !!item.menuId;
8871
- const hasContent = !!textToCopy;
8872
- const isMenuOpen = this._openMenuId === item.menuId && hasContent;
8873
- return html`
8869
+ const hasMenu = !!item.menuOptions && item.menuOptions.length > 0 && !!item.menuId;
8870
+ const hasContent = !!textToCopy;
8871
+ const isMenuOpen = this._openMenuId === item.menuId && hasContent;
8872
+ if (itemType === "text") return html`
8874
8873
  <div class="flex flex-col gap-0.5 w-full pt-1">
8875
8874
  <div class="flex items-center justify-between gap-2 w-full relative">
8876
8875
  <span class="text-sm font-semibold text-(--axebow-strong-gray) leading-tight flex items-center gap-1 break-all">
@@ -8931,37 +8930,37 @@ var AxebowResourceBoxForm = class AxebowResourceBoxForm extends LitElement {
8931
8930
  ${item.tag && item.value ? html`<p class="m-0 text-sm text-(--axebow-gray) leading-snug break-all font-normal">${item.value}</p>` : ""}
8932
8931
  </div>
8933
8932
  `;
8934
- }
8935
8933
  return html`
8936
- <axebow-form-panel-field
8937
- class="w-full"
8938
- style="width: 100%;"
8939
- .label=${item.tag}
8940
- .value=${item.value || ""}
8941
- .copyValue=${item.copyValue !== void 0 ? item.copyValue : ""}
8942
- .mandatory=${Boolean(item.required)}
8943
- ?disabled=${itemType === "disabled"}
8944
- .showActionIcon=${Boolean(item.canCopy)}
8945
- actionIcon="content_copy"
8946
- .showSecondaryActionIcon=${Boolean(item.canLink)}
8947
- secondaryActionIcon="open_in_new"
8948
- .showDropdown=${Boolean(item.options && item.options.length > 0)}
8949
- .options=${item.options || []}
8950
- @focus=${(_e) => {
8934
+ <div class="relative w-full">
8935
+ <axebow-form-panel-field
8936
+ class="w-full"
8937
+ style="width: 100%;"
8938
+ .label=${item.tag}
8939
+ .value=${item.value || ""}
8940
+ .copyValue=${item.copyValue !== void 0 ? item.copyValue : ""}
8941
+ .mandatory=${Boolean(item.required)}
8942
+ ?disabled=${itemType === "disabled"}
8943
+ .showActionIcon=${Boolean(hasMenu || item.canCopy)}
8944
+ actionIcon=${hasMenu ? "add_circle" : "content_copy"}
8945
+ .showSecondaryActionIcon=${Boolean(item.canLink)}
8946
+ secondaryActionIcon="open_in_new"
8947
+ .showDropdown=${Boolean(item.options && item.options.length > 0)}
8948
+ .options=${item.options || []}
8949
+ @focus=${(_e) => {
8951
8950
  this.dispatchEvent(new CustomEvent("item-focus", {
8952
8951
  detail: { item },
8953
8952
  bubbles: true,
8954
8953
  composed: true
8955
8954
  }));
8956
8955
  }}
8957
- @blur=${(_e) => {
8956
+ @blur=${(_e) => {
8958
8957
  this.dispatchEvent(new CustomEvent("item-blur", {
8959
8958
  detail: { item },
8960
8959
  bubbles: true,
8961
8960
  composed: true
8962
8961
  }));
8963
8962
  }}
8964
- @change=${(e) => {
8963
+ @change=${(e) => {
8965
8964
  item.value = e.detail?.value ?? e.target.value;
8966
8965
  this.dispatchEvent(new CustomEvent("item-change", {
8967
8966
  detail: { item },
@@ -8969,9 +8968,32 @@ var AxebowResourceBoxForm = class AxebowResourceBoxForm extends LitElement {
8969
8968
  composed: true
8970
8969
  }));
8971
8970
  }}
8972
- @action-click=${(e) => this._copyToClipboard(textToCopy, e)}
8973
- @secondary-action-click=${(e) => this._openLink(item.linkHref || item.value, e)}
8974
- ></axebow-form-panel-field>
8971
+ @action-click=${(e) => {
8972
+ if (hasMenu) this._toggleMenu(item, hasContent, e);
8973
+ else this._copyToClipboard(textToCopy, e);
8974
+ }}
8975
+ @secondary-action-click=${(e) => this._openLink(item.linkHref || item.value, e)}
8976
+ ></axebow-form-panel-field>
8977
+ ${hasMenu && isMenuOpen ? html`
8978
+ <div class="absolute right-0 top-full mt-1 z-50 min-w-[200px] bg-white rounded-lg shadow-[0_4px_12px_rgba(0,0,0,0.1)] border border-solid border-(--axebow-border-gray) py-1.5 flex flex-col axebow-scrollbar" style="max-height: 250px; overflow-y: auto;">
8979
+ ${item.menuOptions.map((option) => html`
8980
+ <div
8981
+ class="flex items-center gap-2.5 px-4 py-2 cursor-pointer hover:bg-(--axebow-anti-flash-white) transition-colors"
8982
+ @click=${(e) => this._handleMenuOption(item, option, textToCopy, e)}
8983
+ >
8984
+ <axebow-icon
8985
+ .iconName=${option.icon}
8986
+ .iconColor=${option.variant === "danger" ? "var(--axebow-error)" : "var(--axebow-primary)"}
8987
+ size="md"
8988
+ ></axebow-icon>
8989
+ <span class="text-sm font-medium ${option.variant === "danger" ? "text-(--axebow-error)" : "text-(--axebow-primary)"}">
8990
+ ${option.label}
8991
+ </span>
8992
+ </div>
8993
+ `)}
8994
+ </div>
8995
+ ` : ""}
8996
+ </div>
8975
8997
  `;
8976
8998
  }
8977
8999
  render() {