@dataworkz/crystal 0.1.0-beta.1 → 0.1.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataworkz/crystal",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.2",
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",
@@ -610,6 +610,35 @@ declare const DwPreset: _primeuix_themes_types.Preset<_primeuix_themes_aura_base
610
610
 
611
611
  /** PrimeNG's dark mode follows the attribute ThemeService (and provideCrystal()) put on <html>. */
612
612
  declare const DW_DARK_MODE_SELECTOR = "[data-theme=\"dark\"]";
613
+ /** Panel class that sizes a select's option list for a small trigger (components/form.css). */
614
+ declare const DW_SELECT_PANEL_SM = "dw-select-panel--sm";
615
+ type SizedInstance = {
616
+ size?: () => string | null | undefined;
617
+ };
618
+ /**
619
+ * Crystal's pass-through defaults: a small `p-select` / `p-multiselect` gets small options even when its list is
620
+ * appended to <body> (where CSS can't see the trigger).
621
+ */
622
+ declare const DW_PRIMENG_PT: {
623
+ readonly select: {
624
+ readonly overlay: ({ instance }: {
625
+ instance?: SizedInstance;
626
+ }) => {
627
+ class: string;
628
+ } | {
629
+ class?: undefined;
630
+ };
631
+ };
632
+ readonly multiselect: {
633
+ readonly overlay: ({ instance }: {
634
+ instance?: SizedInstance;
635
+ }) => {
636
+ class: string;
637
+ } | {
638
+ class?: undefined;
639
+ };
640
+ };
641
+ };
613
642
  /**
614
643
  * PrimeNG with the Dataworkz preset, dark mode on `[data-theme="dark"]`. Pass app-specific PrimeNG settings
615
644
  * (ripple, zIndex, translation…) as `config`; its `theme.options` are merged over crystal's.
@@ -620,4 +649,4 @@ declare const DW_DARK_MODE_SELECTOR = "[data-theme=\"dark\"]";
620
649
  */
621
650
  declare function provideCrystalPrimeNG(config?: PrimeNGConfigType): EnvironmentProviders;
622
651
 
623
- export { AZURE_PRIMARY_RAMP, DW_COLOR_SCHEME, DW_DARK_MODE_SELECTOR, DW_PRESET_OVERRIDES, DwPreset, provideCrystalPrimeNG };
652
+ export { AZURE_PRIMARY_RAMP, DW_COLOR_SCHEME, DW_DARK_MODE_SELECTOR, DW_PRESET_OVERRIDES, DW_PRIMENG_PT, DW_SELECT_PANEL_SM, DwPreset, provideCrystalPrimeNG };
@@ -325,6 +325,9 @@
325
325
  .dw-icon-btn.is-active { background: var(--dw-accent-tint); color: var(--dw-accent); }
326
326
  /* Hovering the active (selected) button keeps it accented, a step stronger */
327
327
  .dw-icon-btn.is-active:hover:not(:disabled) { background: var(--dw-accent-tint-strong); color: var(--dw-accent); }
328
+ /* A selected danger toggle (e.g. a "not helpful" rating) keeps its danger colour instead of the accent. */
329
+ .dw-icon-btn--danger.is-active,
330
+ .dw-icon-btn--danger.is-active:hover:not(:disabled) { background: var(--dw-danger-tint); color: var(--dw-danger-solid); }
328
331
  .dw-icon-btn--inverse { color: var(--dw-text-muted); }
329
332
  .dw-icon-btn--inverse:hover:not(:disabled),
330
333
  .dw-icon-btn--inverse.is-active { background: color-mix(in srgb, var(--dw-text-inverse) 12%, transparent); color: var(--dw-text-inverse); }
@@ -470,8 +470,9 @@ p-slider {
470
470
 
471
471
 
472
472
  /* Small selects (size="small"): their option list matches the 12px trigger instead of the default
473
- 14px rows. The list renders inside the select unless it is appended elsewhere (appendTo); a list
474
- appended to <body> takes the panel class `dw-select-panel--sm` for the same sizing. */
473
+ 14px rows. A list rendered inside the select matches `.p-select-sm`; a list appended elsewhere
474
+ (appendTo="body") gets `dw-select-panel--sm` from provideCrystalPrimeNG()'s pass-through, so no
475
+ screen sets it by hand. */
475
476
  .p-select-sm .p-select-option,
476
477
  .p-multiselect-sm .p-multiselect-option,
477
478
  .dw-select-panel--sm .p-select-option,