@dataworkz/crystal 0.1.0-beta.4 → 0.1.0-beta.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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { InjectionToken, EnvironmentProviders, OnDestroy, TemplateRef, OnInit } from '@angular/core';
3
3
  import { StorageIconSet, DwPrimeIcon } from '@dataworkz/crystal/icons';
4
4
  export { DW_ICON_NAMES, DW_ICON_PREFIX, DwIconName, DwPrimeIcon, IconName, dwIconName, icon } from '@dataworkz/crystal/icons';
5
- import { ValidationErrors, AbstractControl, NgModel, NgControl, ControlValueAccessor } from '@angular/forms';
5
+ import { ValidationErrors, NgControl, AbstractControl, NgModel, ControlValueAccessor } from '@angular/forms';
6
6
  import { MenuItem, SortMeta, SortEvent } from 'primeng/api';
7
7
  import { UrlTree } from '@angular/router';
8
8
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
@@ -449,7 +449,7 @@ declare class DwAvatarComponent {
449
449
  readonly name: _angular_core.InputSignal<string | null>;
450
450
  readonly initials: _angular_core.InputSignal<DwInitialsStrategy>;
451
451
  readonly src: _angular_core.InputSignal<string | null>;
452
- readonly size: _angular_core.InputSignal<"sm" | "md" | "xs" | "lg">;
452
+ readonly size: _angular_core.InputSignal<"sm" | "md" | "lg" | "xs">;
453
453
  /** Colour of the tile; neutral grey by default. */
454
454
  readonly tint: _angular_core.InputSignal<DwAvatarTint>;
455
455
  readonly presence: _angular_core.InputSignal<boolean | null>;
@@ -487,7 +487,7 @@ declare class DwEntityIconComponent {
487
487
  readonly src: _angular_core.InputSignal<string | null>;
488
488
  readonly fallback: _angular_core.InputSignal<string | undefined>;
489
489
  readonly storageSet: _angular_core.InputSignal<StorageIconSet>;
490
- readonly size: _angular_core.InputSignal<"sm" | "md" | "xs" | "lg" | "xl">;
490
+ readonly size: _angular_core.InputSignal<"sm" | "md" | "lg" | "xs" | "xl">;
491
491
  readonly framed: _angular_core.InputSignal<boolean>;
492
492
  readonly tint: _angular_core.InputSignal<DwEntityTint>;
493
493
  readonly alt: _angular_core.InputSignal<string>;
@@ -540,7 +540,7 @@ declare function provideCrystalIconResolvers(resolvers: DwIconResolvers): Enviro
540
540
  * ```
541
541
  */
542
542
  declare class DwSpinnerComponent {
543
- readonly size: _angular_core.InputSignal<"sm" | "md" | "xs" | "lg">;
543
+ readonly size: _angular_core.InputSignal<"sm" | "md" | "lg" | "xs">;
544
544
  readonly mode: _angular_core.InputSignal<"inline" | "block" | "overlay" | "fullscreen">;
545
545
  readonly label: _angular_core.InputSignal<string>;
546
546
  readonly hostClasses: _angular_core.Signal<string>;
@@ -638,7 +638,7 @@ declare class DwEmptyStateComponent {
638
638
  readonly imageWidth: _angular_core.InputSignal<string>;
639
639
  readonly title: _angular_core.InputSignal<string>;
640
640
  readonly text: _angular_core.InputSignal<string>;
641
- readonly tone: _angular_core.InputSignal<"default" | "error">;
641
+ readonly tone: _angular_core.InputSignal<"error" | "default">;
642
642
  readonly size: _angular_core.InputSignal<"default" | "inline" | "compact">;
643
643
  readonly hostClasses: _angular_core.Signal<string>;
644
644
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwEmptyStateComponent, never>;
@@ -963,7 +963,7 @@ declare class DwFieldComponent {
963
963
  readonly help: _angular_core.InputSignal<string>;
964
964
  readonly layout: _angular_core.InputSignal<"inline" | "stacked">;
965
965
  readonly labelWidth: _angular_core.InputSignal<string>;
966
- readonly control: _angular_core.InputSignal<AbstractControl<any, any, any> | NgModel | NgControl | null>;
966
+ readonly control: _angular_core.InputSignal<NgControl | AbstractControl<any, any, any> | NgModel | null>;
967
967
  /** Per-field message overrides by validator key. */
968
968
  readonly errors: _angular_core.InputSignal<Record<string, string> | null>;
969
969
  /** Manual error message (template-driven forms or server errors). */
@@ -2348,8 +2348,11 @@ declare class DwTooltipIfTruncatedDirective {
2348
2348
  }
2349
2349
 
2350
2350
  type DwTooltipPosition = 'top' | 'bottom' | 'left' | 'right';
2351
- /** `multiline` keeps line breaks (up to 360px), `code` monospace, `error` danger red, `toolbar` a slate chip. */
2352
- type DwTooltipVariant = 'default' | 'multiline' | 'code' | 'error' | 'toolbar';
2351
+ /**
2352
+ * `multiline` keeps line breaks (up to 360px), `code` monospace, `error` danger red, `toolbar` a slate chip, `preview`
2353
+ * a long value shown whole (up to 720 × 340px, then scrolled; pair it with `dwTooltipInteractive`).
2354
+ */
2355
+ type DwTooltipVariant = 'default' | 'multiline' | 'code' | 'error' | 'toolbar' | 'preview';
2353
2356
  /**
2354
2357
  * A tooltip on any element, in crystal's look (PrimeNG's Tooltip underneath, which the app never imports). It opens
2355
2358
  * on hover and focus, above the element unless told otherwise, appended to `<body>` so nothing clips it.
@@ -2452,6 +2455,8 @@ declare abstract class DwFormControl<T> implements ControlValueAccessor, OnInit
2452
2455
  * `prepare` runs just before each write, for inputs the control reads while writing (a radio's own value).
2453
2456
  * Only this control's value and what `prepare` reads are tracked: PrimeNG's own signals, which `writeValue` reads and
2454
2457
  * sets, are not, or a write that changes one would run the effect again, without end.
2458
+ * The user's own change is not written back (as with ngModel): the control has it already, and some redraw on a
2459
+ * write (a date picker turns its calendar to the written date's month).
2455
2460
  */
2456
2461
  protected drive<C extends DwPrimeValueAccessor<T>>(prime: () => C | undefined, prepare?: (control: C) => void): void;
2457
2462
  /** The control lost focus. */
@@ -2545,6 +2550,9 @@ declare class DwSelectComponent<T = unknown> extends DwFormControl<T> {
2545
2550
  readonly size: _angular_core.InputSignal<DwControlSize>;
2546
2551
  /** Fills the width of its container. */
2547
2552
  readonly fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
2553
+ /** Stacks the list above this z-index (as dw-dialog / dw-drawer / dw-popover's `baseZIndex`), for a select inside a
2554
+ * layer that sets its own z-index, e.g. a page that hosts crystal in a high layer. 0 = PrimeNG's own stacking. */
2555
+ readonly baseZIndex: _angular_core.InputSignal<number>;
2548
2556
  /** Reads as a fixed value, not a control: no arrow, the value in body text. */
2549
2557
  readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
2550
2558
  readonly opened: _angular_core.OutputEmitterRef<void>;
@@ -2555,13 +2563,16 @@ declare class DwSelectComponent<T = unknown> extends DwFormControl<T> {
2555
2563
  protected readonly valueTemplate: _angular_core.Signal<DwSelectValueDirective<any> | undefined>;
2556
2564
  protected readonly footerTemplate: _angular_core.Signal<DwSelectFooterDirective | undefined>;
2557
2565
  protected readonly primeSize: _angular_core.Signal<"small" | "large" | undefined>;
2566
+ protected readonly overlayOptions: _angular_core.Signal<{
2567
+ baseZIndex: number;
2568
+ } | undefined>;
2558
2569
  private readonly prime;
2559
2570
  constructor();
2560
2571
  /** Opens the list (e.g. when an editable select's text is clicked). */
2561
2572
  open(): void;
2562
2573
  close(): void;
2563
2574
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwSelectComponent<any>, never>;
2564
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwSelectComponent<any>, "dw-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "emptyFilterMessage": { "alias": "emptyFilterMessage"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "focused": "focused"; "blurred": "blurred"; }, ["optionTemplate", "valueTemplate", "footerTemplate"], never, true, never>;
2575
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwSelectComponent<any>, "dw-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "emptyFilterMessage": { "alias": "emptyFilterMessage"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "focused": "focused"; "blurred": "blurred"; }, ["optionTemplate", "valueTemplate", "footerTemplate"], never, true, never>;
2565
2576
  }
2566
2577
 
2567
2578
  /**
@@ -2601,6 +2612,9 @@ declare class DwMultiselectComponent<T = unknown> extends DwFormControl<T[]> {
2601
2612
  readonly inputId: _angular_core.InputSignal<string | undefined>;
2602
2613
  readonly size: _angular_core.InputSignal<DwControlSize>;
2603
2614
  readonly fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
2615
+ /** Stacks the list above this z-index (as dw-dialog / dw-drawer / dw-popover's `baseZIndex`), for a select inside a
2616
+ * layer that sets its own z-index, e.g. a page that hosts crystal in a high layer. 0 = PrimeNG's own stacking. */
2617
+ readonly baseZIndex: _angular_core.InputSignal<number>;
2604
2618
  readonly opened: _angular_core.OutputEmitterRef<void>;
2605
2619
  readonly closed: _angular_core.OutputEmitterRef<void>;
2606
2620
  readonly focused: _angular_core.OutputEmitterRef<void>;
@@ -2608,6 +2622,9 @@ declare class DwMultiselectComponent<T = unknown> extends DwFormControl<T[]> {
2608
2622
  protected readonly optionTemplate: _angular_core.Signal<DwSelectOptionDirective<any> | undefined>;
2609
2623
  protected readonly footerTemplate: _angular_core.Signal<DwSelectFooterDirective | undefined>;
2610
2624
  protected readonly primeSize: _angular_core.Signal<"small" | "large" | undefined>;
2625
+ protected readonly overlayOptions: _angular_core.Signal<{
2626
+ baseZIndex: number;
2627
+ } | undefined>;
2611
2628
  /** PrimeNG reads a null maxSelectedLabels as 0 (summarise everything), so "list them all" is a ceiling no list reaches. */
2612
2629
  protected readonly listAll: number;
2613
2630
  private readonly prime;
@@ -2616,20 +2633,27 @@ declare class DwMultiselectComponent<T = unknown> extends DwFormControl<T[]> {
2616
2633
  open(): void;
2617
2634
  close(): void;
2618
2635
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwMultiselectComponent<any>, never>;
2619
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwMultiselectComponent<any>, "dw-multiselect", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "emptyFilterMessage": { "alias": "emptyFilterMessage"; "required": false; "isSignal": true; }; "showToggleAll": { "alias": "showToggleAll"; "required": false; "isSignal": true; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; "isSignal": true; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "focused": "focused"; "blurred": "blurred"; }, ["optionTemplate", "footerTemplate"], never, true, never>;
2636
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwMultiselectComponent<any>, "dw-multiselect", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "emptyFilterMessage": { "alias": "emptyFilterMessage"; "required": false; "isSignal": true; }; "showToggleAll": { "alias": "showToggleAll"; "required": false; "isSignal": true; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; "isSignal": true; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "focused": "focused"; "blurred": "blurred"; }, ["optionTemplate", "footerTemplate"], never, true, never>;
2620
2637
  }
2621
2638
 
2622
2639
  /**
2623
- * Crystal's checkbox (PrimeNG's Checkbox underneath, which the app never imports), on/off: its value is a boolean.
2624
- * With a `label` (or projected content) the label sits beside it on one line and toggles it too.
2640
+ * Crystal's checkbox (PrimeNG's Checkbox underneath, which the app never imports). On its own it is on/off: its value
2641
+ * is a boolean. With an `option`, it is one box of a set that fills one array: ticked while the array holds the option,
2642
+ * and clicking adds or removes it (as dw-radio's `option`, for many picks). With a `label` (or projected content) the
2643
+ * label sits beside it on one line and toggles it too.
2625
2644
  *
2626
2645
  * ```html
2627
2646
  * <dw-checkbox label="Remember me" [(ngModel)]="remember" />
2647
+ * @for (f of filters; track f.name) {
2648
+ * <dw-checkbox [option]="f.name" [label]="f.name" [(ngModel)]="selectedFilterNames" />
2649
+ * }
2628
2650
  * <dw-checkbox formControlName="agree">I accept the <a href="/terms">terms</a></dw-checkbox>
2629
2651
  * <dw-checkbox ariaLabel="Select row" [indeterminate]="some" [(value)]="all" />
2630
2652
  * ```
2631
2653
  */
2632
- declare class DwCheckboxComponent extends DwFormControl<boolean> {
2654
+ declare class DwCheckboxComponent<T = boolean> extends DwFormControl<T> {
2655
+ /** Makes this box one of a set: the value is an array, and this box stands for this entry of it. */
2656
+ readonly option: _angular_core.InputSignal<unknown>;
2633
2657
  readonly label: _angular_core.InputSignal<string>;
2634
2658
  /** For a checkbox with no visible label. */
2635
2659
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
@@ -2645,8 +2669,8 @@ declare class DwCheckboxComponent extends DwFormControl<boolean> {
2645
2669
  protected readonly primeSize: _angular_core.Signal<"small" | "large" | undefined>;
2646
2670
  private readonly prime;
2647
2671
  constructor();
2648
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwCheckboxComponent, never>;
2649
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwCheckboxComponent, "dw-checkbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "focused": "focused"; "blurred": "blurred"; }, never, ["*"], true, never>;
2672
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwCheckboxComponent<any>, never>;
2673
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwCheckboxComponent<any>, "dw-checkbox", never, { "option": { "alias": "option"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "focused": "focused"; "blurred": "blurred"; }, never, ["*"], true, never>;
2650
2674
  }
2651
2675
 
2652
2676
  /**
@@ -2742,6 +2766,115 @@ declare class DwNumberInputComponent extends DwFormControl<number> {
2742
2766
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwNumberInputComponent, "dw-number-input", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "minFractionDigits": { "alias": "minFractionDigits"; "required": false; "isSignal": true; }; "maxFractionDigits": { "alias": "maxFractionDigits"; "required": false; "isSignal": true; }; "useGrouping": { "alias": "useGrouping"; "required": false; "isSignal": true; }; "showButtons": { "alias": "showButtons"; "required": false; "isSignal": true; }; "buttonLayout": { "alias": "buttonLayout"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "focused": "focused"; "blurred": "blurred"; }, never, never, true, never>;
2743
2767
  }
2744
2768
 
2769
+ /** What a date picker holds: one date, or a list of them for `selectionMode="range"` (start, end) and `"multiple"`. */
2770
+ type DwDateValue = Date | (Date | null)[];
2771
+ /**
2772
+ * Crystal's date (and time) picker, PrimeNG's DatePicker underneath, which the app never imports. A text field that
2773
+ * opens a calendar appended to `<body>`, or the calendar alone with `inline`. It picks one date, a range or several
2774
+ * dates, optionally with a time. Works with ngModel and reactive forms, inside `dw-field`, or on its own with
2775
+ * `[(value)]`.
2776
+ *
2777
+ * `dateFormat` uses PrimeNG's tokens: `yy` is the four-digit year, `mm` / `M` the month as a number / short name and
2778
+ * `dd` the day, so `"yy-mm-dd"` shows 2026-03-14 and `"M dd, yy"` shows Mar 14, 2026.
2779
+ *
2780
+ * ```html
2781
+ * <dw-date-picker dateFormat="yy-mm-dd" [maxDate]="today" placeholder="Start date" formControlName="start" />
2782
+ * <dw-date-picker [showTime]="true" [showSeconds]="true" [showIcon]="true" [(ngModel)]="runAt" (changed)="save()" />
2783
+ * <dw-date-picker [inline]="true" selectionMode="range" [numberOfMonths]="2" [compact]="true" [(value)]="range" />
2784
+ * ```
2785
+ */
2786
+ declare class DwDatePickerComponent<T extends DwDateValue = Date> extends DwFormControl<T> {
2787
+ readonly placeholder: _angular_core.InputSignal<string | undefined>;
2788
+ /** How the field shows the date, in PrimeNG's tokens (see above); PrimeNG's locale format (`mm/dd/yy`) when omitted. */
2789
+ readonly dateFormat: _angular_core.InputSignal<string | undefined>;
2790
+ /** Picks a time as well as a date. */
2791
+ readonly showTime: _angular_core.InputSignalWithTransform<boolean, unknown>;
2792
+ readonly showSeconds: _angular_core.InputSignalWithTransform<boolean, unknown>;
2793
+ readonly hourFormat: _angular_core.InputSignal<"12" | "24">;
2794
+ /** The earliest and latest dates that can be picked. */
2795
+ readonly minDate: _angular_core.InputSignal<Date | null | undefined>;
2796
+ readonly maxDate: _angular_core.InputSignal<Date | null | undefined>;
2797
+ /** One date, a start and an end (`range`), or any number of dates (`multiple`). */
2798
+ readonly selectionMode: _angular_core.InputSignal<"single" | "range" | "multiple">;
2799
+ /** Shows the calendar itself, always open, instead of a field. */
2800
+ readonly inline: _angular_core.InputSignalWithTransform<boolean, unknown>;
2801
+ readonly numberOfMonths: _angular_core.InputSignalWithTransform<number, unknown>;
2802
+ /** Shows the days of the months before and after, greyed. */
2803
+ readonly showOtherMonths: _angular_core.InputSignalWithTransform<boolean, unknown>;
2804
+ /** A calendar icon: a button beside the field, or drawn inside it (`iconDisplay="input"`). */
2805
+ readonly showIcon: _angular_core.InputSignalWithTransform<boolean, unknown>;
2806
+ readonly iconDisplay: _angular_core.InputSignal<"button" | "input">;
2807
+ /** An × in the field that clears it. */
2808
+ readonly showClear: _angular_core.InputSignalWithTransform<boolean, unknown>;
2809
+ /** Smaller day cells, type and time picker, for a calendar inside a popover or a narrow panel. */
2810
+ readonly compact: _angular_core.InputSignalWithTransform<boolean, unknown>;
2811
+ /** The calendar's z-index floor, for a picker inside an overlay that sits above crystal's own layers. */
2812
+ readonly baseZIndex: _angular_core.InputSignalWithTransform<number, unknown>;
2813
+ readonly inputId: _angular_core.InputSignal<string | undefined>;
2814
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
2815
+ readonly size: _angular_core.InputSignal<DwControlSize>;
2816
+ readonly fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
2817
+ /** A day (or time) was picked in the calendar; `changed` also follows typing. */
2818
+ readonly selected: _angular_core.OutputEmitterRef<Date>;
2819
+ readonly focused: _angular_core.OutputEmitterRef<void>;
2820
+ readonly blurred: _angular_core.OutputEmitterRef<void>;
2821
+ readonly opened: _angular_core.OutputEmitterRef<void>;
2822
+ readonly closed: _angular_core.OutputEmitterRef<void>;
2823
+ protected readonly primeSize: _angular_core.Signal<"small" | "large" | undefined>;
2824
+ private readonly prime;
2825
+ constructor();
2826
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwDatePickerComponent<any>, never>;
2827
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwDatePickerComponent<any>, "dw-date-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "numberOfMonths": { "alias": "numberOfMonths"; "required": false; "isSignal": true; }; "showOtherMonths": { "alias": "showOtherMonths"; "required": false; "isSignal": true; }; "showIcon": { "alias": "showIcon"; "required": false; "isSignal": true; }; "iconDisplay": { "alias": "iconDisplay"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "focused": "focused"; "blurred": "blurred"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
2828
+ }
2829
+
2830
+ type DwChartType = 'line' | 'bar' | 'doughnut' | 'pie' | 'polarArea' | 'radar' | 'scatter' | 'bubble';
2831
+ /** A click on a bar, point or slice: the chart.js element and its dataset. */
2832
+ interface DwChartSelectEvent {
2833
+ originalEvent: Event;
2834
+ element: {
2835
+ datasetIndex: number;
2836
+ index: number;
2837
+ };
2838
+ dataset: unknown[];
2839
+ }
2840
+ /**
2841
+ * Crystal's chart: a chart.js canvas (through PrimeNG's Chart, which the app never imports; chart.js comes with
2842
+ * crystal). `data` and `options` are chart.js's own; a new object for either redraws the chart, and so does a new
2843
+ * `type`, size or `plugins`. A canvas cannot read CSS variables, so resolve colours from the tokens first: `cssVar()` and
2844
+ * `chartPalette()` from `@dataworkz/crystal/tokens`.
2845
+ *
2846
+ * The chart fills its container's width and keeps chart.js's aspect ratio, unless it is given a `height` (or the
2847
+ * options say `maintainAspectRatio: false` and the container has one).
2848
+ *
2849
+ * ```html
2850
+ * <dw-chart type="line" [data]="requests()" [options]="lineOptions" />
2851
+ * <dw-chart [type]="kind()" [data]="series()" [options]="options()" height="240px" (dataSelect)="drill($event)" />
2852
+ * ```
2853
+ */
2854
+ declare class DwChartComponent {
2855
+ readonly type: _angular_core.InputSignal<DwChartType>;
2856
+ /** chart.js data: `{ labels, datasets }`. */
2857
+ readonly data: _angular_core.InputSignal<object | null | undefined>;
2858
+ /** chart.js options. */
2859
+ readonly options: _angular_core.InputSignal<object | null | undefined>;
2860
+ /** chart.js plugins for this chart only. */
2861
+ readonly plugins: _angular_core.InputSignal<unknown[]>;
2862
+ /** A CSS width / height for the canvas box (`240px`, `100%`); chart.js sizes it when omitted. */
2863
+ readonly width: _angular_core.InputSignal<string | undefined>;
2864
+ readonly height: _angular_core.InputSignal<string | undefined>;
2865
+ /** Redraws the chart when its container resizes. */
2866
+ readonly responsive: _angular_core.InputSignalWithTransform<boolean, unknown>;
2867
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
2868
+ /** A bar, point or slice was clicked. */
2869
+ readonly dataSelect: _angular_core.OutputEmitterRef<DwChartSelectEvent>;
2870
+ private readonly prime;
2871
+ constructor();
2872
+ /** Redraws the chart in place (animating), after the app changed `data` or `options` without a new object. */
2873
+ refresh(): void;
2874
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwChartComponent, never>;
2875
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwChartComponent, "dw-chart", never, { "type": { "alias": "type"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "plugins": { "alias": "plugins"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "dataSelect": "dataSelect"; }, never, never, true, never>;
2876
+ }
2877
+
2745
2878
  /**
2746
2879
  * Backend timestamp normalization.
2747
2880
  *
@@ -3289,5 +3422,5 @@ declare function installCrystalHostTheme({ fonts }?: CrystalHostThemeOptions): v
3289
3422
  /** Removes the host theme again (e.g. a host that unloads crystal, or a test). */
3290
3423
  declare function removeCrystalHostTheme(): void;
3291
3424
 
3292
- export { DW_APP_FIELD_MESSAGES, DW_CLOCK_TICK_MS, DW_CRYSTAL_CONFIG, DW_DIALOG, DW_DRAWER, DW_FIELD_MESSAGES, DW_HOST_THEME_ATTR, DW_ICON_RESOLVERS, DW_INPUT, DW_IN_PROGRESS_STATUSES, DW_LAYOUT, DW_MENU_PLAIN_GROUP, DW_OVERLAY_ANCHOR_ATTR, DW_OVERLAY_ANCHOR_GAP, DW_POPOVER, DW_RESERVED_ICON_PREFIX, DW_STATUS_TONES, DW_TABLE, DW_TAG_PALETTE, DW_THEME_STORAGE_KEY, DW_TOGGLE_CARD, DwActionBarComponent, DwAvatarComponent, DwBadgeComponent, DwBannerComponent, DwBoxComponent, DwBreadcrumbComponent, DwButtonComponent, DwCardComponent, DwCellDirective, DwCheckToggleComponent, DwCheckboxComponent, DwChipComponent, DwClockService, DwColumnPickerComponent, DwConfirmDialogComponent, DwConfirmHostComponent, DwConfirmService, DwCopyButtonComponent, DwDialogComponent, DwDialogFooterDirective, DwDialogHeaderDirective, DwDialogTitleSuffixDirective, DwDividerComponent, DwDrawerComponent, DwDrawerFooterDirective, DwDrawerHeaderDirective, DwDrawerSubheaderDirective, DwEmptyStateComponent, DwEntityIconComponent, DwFieldComponent, DwFileDropzoneComponent, DwFileListComponent, DwFormControl, DwFormSectionHeaderComponent, DwGridDirective, DwHeaderDirective, DwHstackDirective, DwIconButtonComponent, DwIconComponent, DwIconRegistry, IdBlockComponent as DwIdBlockComponent, DwInputDirective, DwMenuComponent, DwMenuHeaderDirective, DwMeterComponent, DwMultiselectComponent, DwNavItemActionsDirective, DwNavItemExtraDirective, DwNavListComponent, DwNumberInputComponent, DwPageHeaderComponent, DwPopoverComponent, DwPopoverFooterDirective, DwRadioComponent, DwRailTabsComponent, DwResizerComponent, DwRowActionsDirective, DwRowExpansionDirective, DwSearchInputComponent, DwSectionComponent, DwSelectComponent, DwSelectFooterDirective, DwSelectOptionDirective, DwSelectValueDirective, DwSkeletonComponent, DwSpinnerComponent, DwStackDirective, DwStatusPillComponent, DwSwitchComponent, DwTabPanelDirective, DwTableComponent, DwTableEmptyComponent, DwTabsComponent, DwTagColorButtonComponent, DwTagColorPickerComponent, DwTagComponent, DwTagListComponent, DwTextareaDirective, DwTileComponent, DwTimestampComponent, DwToastHostComponent, DwToastService, DwToggleCardBodyDirective, DwToggleCardComponent, DwToggleCardControlDirective, DwTooltipDirective, DwTooltipIfTruncatedDirective, ThemeService, alignUnderOverlayAnchor, extensionOf, fieldErrorMessage, formatBytes, gapToken, hashTagIndex, humanizeStatus, initialsOf, installCrystalHostTheme, isImageIcon, isTruncated, normalizeStatus, primeSize, provideCrystal, provideCrystalFieldMessages, provideCrystalIconResolvers, provideCrystalIcons, removeCrystalHostTheme, tagColorVar, tintFor, toneForStatus };
3293
- export type { CrystalConfig, CrystalHostThemeOptions, CrystalThemeConfig, DwAlign, DwAvatarTint, DwBadgeKind, DwBadgeTone, DwBreadcrumb, DwButtonAppearance, DwButtonSize, DwButtonVariant, DwCanClose, DwCardTint, DwCardVariant, DwColumn, DwConfirmOptions, DwConfirmSeverity, DwConfirmSummaryRow, DwConfirmWarning, DwControlSize, DwDialogSize, DwDividerOrientation, DwDividerSpacing, DwDrawerAction, DwDrawerSize, DwEntityKind, DwEntityTint, DwFieldMessage, DwFileItem, DwFileRejectReason, DwFileRejection, DwFileStatus, DwGap, DwIconButtonVariant, DwIconResolvers, DwInitialsStrategy, DwInputSize, DwJustify, DwMenuItem, DwNavGroup, DwNavItem, DwNavItemDot, DwNavReorder, DwPrimeValueAccessor, DwRailTab, DwResizerDrag, DwRowClickEvent, DwSelectOptionContext, DwSeverity, DwShowErrorsWhen, DwSkeletonPreset, DwSupportedType, DwSwitchSize, DwTabOption, DwTabValue, DwTagItem, DwTheme, DwToast, DwToastOptions, DwToastPosition, DwToastSeverity, DwTone, DwTooltipPosition, DwTooltipVariant };
3425
+ export { DW_APP_FIELD_MESSAGES, DW_CLOCK_TICK_MS, DW_CRYSTAL_CONFIG, DW_DIALOG, DW_DRAWER, DW_FIELD_MESSAGES, DW_HOST_THEME_ATTR, DW_ICON_RESOLVERS, DW_INPUT, DW_IN_PROGRESS_STATUSES, DW_LAYOUT, DW_MENU_PLAIN_GROUP, DW_OVERLAY_ANCHOR_ATTR, DW_OVERLAY_ANCHOR_GAP, DW_POPOVER, DW_RESERVED_ICON_PREFIX, DW_STATUS_TONES, DW_TABLE, DW_TAG_PALETTE, DW_THEME_STORAGE_KEY, DW_TOGGLE_CARD, DwActionBarComponent, DwAvatarComponent, DwBadgeComponent, DwBannerComponent, DwBoxComponent, DwBreadcrumbComponent, DwButtonComponent, DwCardComponent, DwCellDirective, DwChartComponent, DwCheckToggleComponent, DwCheckboxComponent, DwChipComponent, DwClockService, DwColumnPickerComponent, DwConfirmDialogComponent, DwConfirmHostComponent, DwConfirmService, DwCopyButtonComponent, DwDatePickerComponent, DwDialogComponent, DwDialogFooterDirective, DwDialogHeaderDirective, DwDialogTitleSuffixDirective, DwDividerComponent, DwDrawerComponent, DwDrawerFooterDirective, DwDrawerHeaderDirective, DwDrawerSubheaderDirective, DwEmptyStateComponent, DwEntityIconComponent, DwFieldComponent, DwFileDropzoneComponent, DwFileListComponent, DwFormControl, DwFormSectionHeaderComponent, DwGridDirective, DwHeaderDirective, DwHstackDirective, DwIconButtonComponent, DwIconComponent, DwIconRegistry, IdBlockComponent as DwIdBlockComponent, DwInputDirective, DwMenuComponent, DwMenuHeaderDirective, DwMeterComponent, DwMultiselectComponent, DwNavItemActionsDirective, DwNavItemExtraDirective, DwNavListComponent, DwNumberInputComponent, DwPageHeaderComponent, DwPopoverComponent, DwPopoverFooterDirective, DwRadioComponent, DwRailTabsComponent, DwResizerComponent, DwRowActionsDirective, DwRowExpansionDirective, DwSearchInputComponent, DwSectionComponent, DwSelectComponent, DwSelectFooterDirective, DwSelectOptionDirective, DwSelectValueDirective, DwSkeletonComponent, DwSpinnerComponent, DwStackDirective, DwStatusPillComponent, DwSwitchComponent, DwTabPanelDirective, DwTableComponent, DwTableEmptyComponent, DwTabsComponent, DwTagColorButtonComponent, DwTagColorPickerComponent, DwTagComponent, DwTagListComponent, DwTextareaDirective, DwTileComponent, DwTimestampComponent, DwToastHostComponent, DwToastService, DwToggleCardBodyDirective, DwToggleCardComponent, DwToggleCardControlDirective, DwTooltipDirective, DwTooltipIfTruncatedDirective, ThemeService, alignUnderOverlayAnchor, extensionOf, fieldErrorMessage, formatBytes, gapToken, hashTagIndex, humanizeStatus, initialsOf, installCrystalHostTheme, isImageIcon, isTruncated, normalizeStatus, primeSize, provideCrystal, provideCrystalFieldMessages, provideCrystalIconResolvers, provideCrystalIcons, removeCrystalHostTheme, tagColorVar, tintFor, toneForStatus };
3426
+ export type { CrystalConfig, CrystalHostThemeOptions, CrystalThemeConfig, DwAlign, DwAvatarTint, DwBadgeKind, DwBadgeTone, DwBreadcrumb, DwButtonAppearance, DwButtonSize, DwButtonVariant, DwCanClose, DwCardTint, DwCardVariant, DwChartSelectEvent, DwChartType, DwColumn, DwConfirmOptions, DwConfirmSeverity, DwConfirmSummaryRow, DwConfirmWarning, DwControlSize, DwDateValue, DwDialogSize, DwDividerOrientation, DwDividerSpacing, DwDrawerAction, DwDrawerSize, DwEntityKind, DwEntityTint, DwFieldMessage, DwFileItem, DwFileRejectReason, DwFileRejection, DwFileStatus, DwGap, DwIconButtonVariant, DwIconResolvers, DwInitialsStrategy, DwInputSize, DwJustify, DwMenuItem, DwNavGroup, DwNavItem, DwNavItemDot, DwNavReorder, DwPrimeValueAccessor, DwRailTab, DwResizerDrag, DwRowClickEvent, DwSelectOptionContext, DwSeverity, DwShowErrorsWhen, DwSkeletonPreset, DwSupportedType, DwSwitchSize, DwTabOption, DwTabValue, DwTagItem, DwTheme, DwToast, DwToastOptions, DwToastPosition, DwToastSeverity, DwTone, DwTooltipPosition, DwTooltipVariant };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataworkz/crystal",
3
- "version": "0.1.0-beta.4",
3
+ "version": "0.1.0-beta.6",
4
4
  "description": "Dataworkz core UI for Angular: dw-* components, icons, toasts, design tokens, theme CSS and bundled fonts.",
5
5
  "license": "MIT",
6
6
  "author": "Dataworkz",
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@primeng/themes": "^21.0.0",
32
+ "chart.js": "^4.5.1",
32
33
  "primeicons": "^7.0.0",
33
34
  "primeng": "~20.4.0",
34
35
  "tslib": "^2.8.1"
@@ -639,6 +639,17 @@ declare const DW_PRIMENG_PT: {
639
639
  };
640
640
  };
641
641
  };
642
+ /**
643
+ * PrimeNG's z-index bases, with tooltips raised to 5000: PrimeNG already stacks a tooltip above the overlays it manages
644
+ * (dialogs, drawers, popovers), and the higher base keeps it above layers that set their own z-index too (a panel or
645
+ * page chrome with `z-index` in CSS), so a tooltip is never hidden under what it describes.
646
+ */
647
+ declare const DW_PRIMENG_Z_INDEX: {
648
+ readonly modal: 1100;
649
+ readonly overlay: 1000;
650
+ readonly menu: 1000;
651
+ readonly tooltip: 5000;
652
+ };
642
653
  /**
643
654
  * PrimeNG with the Dataworkz preset, dark mode on `[data-theme="dark"]`. Pass app-specific PrimeNG settings
644
655
  * (ripple, zIndex, translation…) as `config`; its `theme.options` are merged over crystal's.
@@ -649,4 +660,4 @@ declare const DW_PRIMENG_PT: {
649
660
  */
650
661
  declare function provideCrystalPrimeNG(config?: PrimeNGConfigType): EnvironmentProviders;
651
662
 
652
- export { AZURE_PRIMARY_RAMP, DW_COLOR_SCHEME, DW_DARK_MODE_SELECTOR, DW_PRESET_OVERRIDES, DW_PRIMENG_PT, DW_SELECT_PANEL_SM, DwPreset, provideCrystalPrimeNG };
663
+ export { AZURE_PRIMARY_RAMP, DW_COLOR_SCHEME, DW_DARK_MODE_SELECTOR, DW_PRESET_OVERRIDES, DW_PRIMENG_PT, DW_PRIMENG_Z_INDEX, DW_SELECT_PANEL_SM, DwPreset, provideCrystalPrimeNG };
@@ -233,7 +233,7 @@ dw-field.dw-field--inline:has(.dw-field__control :is(.p-inputtext-sm, .p-textare
233
233
  .dw-field__control > p-inputnumber,
234
234
  .dw-field__control > p-datepicker,
235
235
  .dw-field__control > p-autocomplete,
236
- .dw-field__control > :is(dw-select, dw-multiselect, dw-number-input) { width: 100%; }
236
+ .dw-field__control > :is(dw-select, dw-multiselect, dw-number-input, dw-date-picker) { width: 100%; }
237
237
  .dw-field__error { display: inline-flex; align-items: center; gap: var(--dw-space-1); }
238
238
  /* Field errors are text only (the red text and border carry the state): no leading icon, even in
239
239
  hand-written error lines. */
@@ -637,7 +637,7 @@ body .dw-var-field .p-textarea {
637
637
  .dw-check-toggle.is-on .dw-check-toggle__label { color: var(--dw-text-strong); font-weight: var(--dw-font-weight-medium); }
638
638
 
639
639
  /* Compact calendar (inline in popovers): smaller day cells and type, quieter weekday row and a
640
- tighter time picker. <p-datepicker styleClass="dw-datepicker--compact" [inline]="true" />.
640
+ tighter time picker. <dw-date-picker [compact]="true" [inline]="true" />.
641
641
  Two classes per rule so they outrank PrimeNG's own (unlayered) datepicker styles. */
642
642
  .dw-datepicker--compact .p-datepicker-header { padding: 0 0 var(--dw-space-2); }
643
643
  .dw-datepicker--compact .p-datepicker-title,
@@ -707,3 +707,9 @@ body .dw-var-field .p-textarea {
707
707
  .dw-number-input { display: inline-flex; min-width: 0; max-width: 100%; vertical-align: middle; }
708
708
  .dw-number-input > p-inputnumber { flex: 1 1 auto; min-width: 0; }
709
709
  .dw-number-input.dw-number-input--fluid { display: flex; width: 100%; }
710
+
711
+ /* ── dw-date-picker (component): sized by the screen like dw-select; the inline calendar keeps its own width ── */
712
+ .dw-date-picker { display: inline-flex; min-width: 0; max-width: 100%; vertical-align: middle; }
713
+ .dw-date-picker > p-datepicker { flex: 1 1 auto; min-width: 0; }
714
+ .dw-date-picker.dw-date-picker--fluid { display: flex; width: 100%; }
715
+ .dw-date-picker.dw-date-picker--inline > p-datepicker { flex: none; }
@@ -339,9 +339,24 @@ body .p-drawer-right {
339
339
  }
340
340
  .p-tooltip.dw-tooltip--multiline .p-tooltip-text { white-space: pre-line; }
341
341
  .p-tooltip.dw-tooltip--error .p-tooltip-text { background: var(--dw-status-danger-fg); color: var(--dw-text-inverse); }
342
+ /* Preview (dwTooltipVariant="preview"): a long value shown whole, up to 720 × 340px, then scrolled; line breaks kept,
343
+ long tokens broken anywhere. Pair it with dwTooltipInteractive so the pointer can scroll it. */
344
+ .p-tooltip.dw-tooltip--preview { width: auto; max-width: min(720px, 68vw); }
345
+ .p-tooltip.dw-tooltip--preview .p-tooltip-text {
346
+ display: inline-block;
347
+ box-sizing: border-box;
348
+ width: max-content;
349
+ max-width: min(720px, 68vw);
350
+ max-height: min(42vh, 340px);
351
+ overflow: auto;
352
+ white-space: pre-wrap;
353
+ overflow-wrap: anywhere;
354
+ font-size: var(--dw-font-size-12);
355
+ line-height: 1.45;
356
+ }
342
357
  .p-tooltip.dw-tooltip--error .p-tooltip-arrow { border-top-color: var(--dw-status-danger-fg); }
343
358
  /* Long code / JSON: wide, scrollable, monospace, wrapped. */
344
- .p-tooltip.dw-tooltip--code { width: min(520px, calc(100vw - 48px)); max-width: min(520px, calc(100vw - 48px)); z-index: 5000; }
359
+ .p-tooltip.dw-tooltip--code { width: min(520px, calc(100vw - 48px)); max-width: min(520px, calc(100vw - 48px)); }
345
360
  .p-tooltip.dw-tooltip--code .p-tooltip-text {
346
361
  display: block;
347
362
  width: 100%;
@@ -5,7 +5,7 @@
5
5
  * Rules: colours only in tokens/primitives.css (everything else uses semantic tokens); font-family only in base.css.
6
6
  */
7
7
  /* PrimeIcons (pi pi-*): crystal's dependency, so an app never installs or loads it itself. Its font is local. */
8
- @import 'primeicons/primeicons.css';
8
+ @import './icons.css';
9
9
  @import './tokens/primitives.css';
10
10
  @import './tokens/semantic.css';
11
11
  @import './tokens/semantic-dark.css';
@@ -0,0 +1,6 @@
1
+ /*
2
+ * @dataworkz/crystal — the PrimeIcons font (`pi pi-*`, `<dw-icon pi>`), shipped as @dataworkz/crystal/styles/icons.css.
3
+ * Crystal depends on primeicons, so an app never installs or loads it itself: crystal.css / crystal-no-fonts.css import
4
+ * this file; an app that imports crystal's styles file by file imports it too. The font files are local (no CDN).
5
+ */
6
+ @import 'primeicons/primeicons.css';