codexly-ui 0.6.15 → 0.6.17

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.
@@ -564,6 +564,19 @@ class ClxThemeService {
564
564
  weight: override?.weight ?? defaultWeight,
565
565
  };
566
566
  }
567
+ /** Resolved style for ClxPageHeaderComponent's title — falls back to the default
568
+ * text-clx-text-label color (no override) / 2xl / emphasis */
569
+ pageHeaderTitleStyle = computed(() => this._resolvePageHeaderZoneStyle(this._config().pageHeaderTitle, '2xl', 'emphasis'), ...(ngDevMode ? [{ debugName: "pageHeaderTitleStyle" }] : /* istanbul ignore next */ []));
570
+ /** Resolved style for ClxPageHeaderComponent's subtitle — falls back to the default
571
+ * text-clx-text-muted color (no override) / sm / label */
572
+ pageHeaderSubtitleStyle = computed(() => this._resolvePageHeaderZoneStyle(this._config().pageHeaderSubtitle, 'sm', 'label'), ...(ngDevMode ? [{ debugName: "pageHeaderSubtitleStyle" }] : /* istanbul ignore next */ []));
573
+ _resolvePageHeaderZoneStyle(override, defaultSize, defaultWeight) {
574
+ return {
575
+ color: override?.color,
576
+ size: override?.size ?? defaultSize,
577
+ weight: override?.weight ?? defaultWeight,
578
+ };
579
+ }
567
580
  constructor() {
568
581
  effect(() => {
569
582
  if (!this._isBrowser)
@@ -7797,6 +7810,9 @@ class ClxModalComponent {
7797
7810
  type="button"
7798
7811
  [color]="_cancelColor()"
7799
7812
  [variant]="_cancelVariant()"
7813
+ [icon]="cancelButton()?.icon"
7814
+ [loading]="cancelButton()?.loading ?? false"
7815
+ [disabled]="cancelButton()?.disabled ?? false"
7800
7816
  size="md"
7801
7817
  (click)="cancelClick.emit()">
7802
7818
  {{ _cancelText() }}
@@ -7807,6 +7823,9 @@ class ClxModalComponent {
7807
7823
  type="button"
7808
7824
  [color]="_confirmColor()"
7809
7825
  [variant]="_confirmVariant()"
7826
+ [icon]="confirmButton()?.icon"
7827
+ [loading]="confirmButton()?.loading ?? false"
7828
+ [disabled]="confirmButton()?.disabled ?? false"
7810
7829
  size="md"
7811
7830
  (click)="confirmClick.emit()">
7812
7831
  {{ _confirmText() }}
@@ -7859,6 +7878,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
7859
7878
  type="button"
7860
7879
  [color]="_cancelColor()"
7861
7880
  [variant]="_cancelVariant()"
7881
+ [icon]="cancelButton()?.icon"
7882
+ [loading]="cancelButton()?.loading ?? false"
7883
+ [disabled]="cancelButton()?.disabled ?? false"
7862
7884
  size="md"
7863
7885
  (click)="cancelClick.emit()">
7864
7886
  {{ _cancelText() }}
@@ -7869,6 +7891,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
7869
7891
  type="button"
7870
7892
  [color]="_confirmColor()"
7871
7893
  [variant]="_confirmVariant()"
7894
+ [icon]="confirmButton()?.icon"
7895
+ [loading]="confirmButton()?.loading ?? false"
7896
+ [disabled]="confirmButton()?.disabled ?? false"
7872
7897
  size="md"
7873
7898
  (click)="confirmClick.emit()">
7874
7899
  {{ _confirmText() }}
@@ -10000,6 +10025,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
10000
10025
  args: [{ selector: '[clxPageHeaderTitle]', standalone: true }]
10001
10026
  }] });
10002
10027
 
10028
+ const TEXT_SIZE_CLASS = {
10029
+ sm: 'text-sm',
10030
+ base: 'text-base',
10031
+ lg: 'text-lg',
10032
+ xl: 'text-xl',
10033
+ '2xl': 'text-2xl',
10034
+ '3xl': 'text-3xl',
10035
+ };
10036
+ const WEIGHT_CLASS = {
10037
+ label: 'font-(--clx-font-weight-label)',
10038
+ emphasis: 'font-(--clx-font-weight-emphasis)',
10039
+ };
10003
10040
  /**
10004
10041
  * Standard page title block: an optional back button, title + optional subtitle on the
10005
10042
  * left, a free-content slot (button, select, badge...) on the right. Replaces the
@@ -10019,6 +10056,16 @@ class ClxPageHeaderComponent {
10019
10056
  _titleSlot = contentChild(ClxPageHeaderTitleDirective, ...(ngDevMode ? [{ debugName: "_titleSlot" }] : /* istanbul ignore next */ []));
10020
10057
  _hasCustomTitle = computed(() => !!this._titleSlot(), ...(ngDevMode ? [{ debugName: "_hasCustomTitle" }] : /* istanbul ignore next */ []));
10021
10058
  _color = computed(() => this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10059
+ _titleClass = computed(() => {
10060
+ const s = this._themeSvc.pageHeaderTitleStyle();
10061
+ const colorCls = s.color ? resolveColor(s.color).textSubtle : 'text-clx-text-label';
10062
+ return `${TEXT_SIZE_CLASS[s.size]} ${WEIGHT_CLASS[s.weight]} ${colorCls} truncate`;
10063
+ }, ...(ngDevMode ? [{ debugName: "_titleClass" }] : /* istanbul ignore next */ []));
10064
+ _subtitleClass = computed(() => {
10065
+ const s = this._themeSvc.pageHeaderSubtitleStyle();
10066
+ const colorCls = s.color ? resolveColor(s.color).textSubtle : 'text-clx-text-muted';
10067
+ return `${TEXT_SIZE_CLASS[s.size]} ${WEIGHT_CLASS[s.weight]} ${colorCls} mt-0.5`;
10068
+ }, ...(ngDevMode ? [{ debugName: "_subtitleClass" }] : /* istanbul ignore next */ []));
10022
10069
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10023
10070
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxPageHeaderComponent, isStandalone: true, selector: "clx-page-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { back: "back" }, host: { classAttribute: "flex items-center gap-3 flex-wrap" }, queries: [{ propertyName: "_titleSlot", first: true, predicate: ClxPageHeaderTitleDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
10024
10071
  @if (showBack()) {
@@ -10033,9 +10080,9 @@ class ClxPageHeaderComponent {
10033
10080
  </div>
10034
10081
  } @else {
10035
10082
  <div class="min-w-0">
10036
- <h1 class="text-2xl font-(--clx-font-weight-emphasis) text-clx-text-label truncate">{{ title() }}</h1>
10083
+ <h1 [class]="_titleClass()">{{ title() }}</h1>
10037
10084
  @if (subtitle()) {
10038
- <p class="text-sm text-clx-text-muted mt-0.5">{{ subtitle() }}</p>
10085
+ <p [class]="_subtitleClass()">{{ subtitle() }}</p>
10039
10086
  }
10040
10087
  </div>
10041
10088
  }
@@ -10065,9 +10112,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
10065
10112
  </div>
10066
10113
  } @else {
10067
10114
  <div class="min-w-0">
10068
- <h1 class="text-2xl font-(--clx-font-weight-emphasis) text-clx-text-label truncate">{{ title() }}</h1>
10115
+ <h1 [class]="_titleClass()">{{ title() }}</h1>
10069
10116
  @if (subtitle()) {
10070
- <p class="text-sm text-clx-text-muted mt-0.5">{{ subtitle() }}</p>
10117
+ <p [class]="_subtitleClass()">{{ subtitle() }}</p>
10071
10118
  }
10072
10119
  </div>
10073
10120
  }