codexly-ui 0.4.2 → 0.4.4

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.
@@ -782,6 +782,10 @@ class ClxButtonComponent {
782
782
  _ripples = signal([], ...(ngDevMode ? [{ debugName: "_ripples" }] : /* istanbul ignore next */ []));
783
783
  _nextId = 0;
784
784
  _el = inject((ElementRef));
785
+ /** Static `class="..."` written by the consumer template, captured before the `[class]`
786
+ * host binding below overwrites it — otherwise any consumer-supplied classes (e.g.
787
+ * positioning utilities like `absolute`/`group-hover:opacity-100`) would be silently lost. */
788
+ _consumerClass = this._el.nativeElement.getAttribute('class') ?? '';
785
789
  _inactive = computed(() => this.loading() || this.disabled(), ...(ngDevMode ? [{ debugName: "_inactive" }] : /* istanbul ignore next */ []));
786
790
  _badgeClass = computed(() => {
787
791
  const t = resolveColor(this.badgeColor());
@@ -845,7 +849,8 @@ class ClxButtonComponent {
845
849
  : BUTTON_SHAPE_FIXED[s];
846
850
  const overflowClass = (this.badge() !== undefined && this.badge() !== null) ? 'overflow-visible' : 'overflow-hidden';
847
851
  const base = BUTTON_BASE_CLASS.replace('overflow-hidden', overflowClass);
848
- return `${base} ${colorClass} ${sizeClass} ${shapeClass}${this.block() ? ' w-full' : ''}`.trimEnd();
852
+ const consumer = this._consumerClass ? ` ${this._consumerClass}` : '';
853
+ return `${base} ${colorClass} ${sizeClass} ${shapeClass}${this.block() ? ' w-full' : ''}${consumer}`.trimEnd();
849
854
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
850
855
  _onRipple(event) {
851
856
  if (this._inactive())
@@ -4954,7 +4959,8 @@ class ClxUploadComponent {
4954
4959
  const existing = this.existingFiles().map(f => ({
4955
4960
  kind: 'existing',
4956
4961
  key: `existing:${f.id}`,
4957
- name: f.name ?? '',
4962
+ name: f.name ?? this._nameFromUrl(f.url),
4963
+ size: f.size,
4958
4964
  isImage: true,
4959
4965
  thumbUrl: f.url,
4960
4966
  fileIcon: '',
@@ -5185,6 +5191,14 @@ class ClxUploadComponent {
5185
5191
  : (files[0] ?? null);
5186
5192
  this._onChange(value);
5187
5193
  }
5194
+ _nameFromUrl(url) {
5195
+ try {
5196
+ return decodeURIComponent(url.split('/').pop() ?? url);
5197
+ }
5198
+ catch {
5199
+ return url;
5200
+ }
5201
+ }
5188
5202
  _formatSize(bytes) {
5189
5203
  if (bytes === 0)
5190
5204
  return '0 B';