@area8975/ui 0.1.1-dev.13 → 0.1.1-dev.15

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": "@area8975/ui",
3
- "version": "0.1.1-dev.13",
3
+ "version": "0.1.1-dev.15",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.0.0",
6
6
  "@angular/core": "^22.0.0",
package/theme.css CHANGED
@@ -140,6 +140,11 @@
140
140
  --background: var(--color-neutral-900);
141
141
  --sidebar: var(--card);
142
142
  --sidebar-line: var(--card-line);
143
+
144
+ /* menus sit on cards, Preline's item hover is the card's own colour so it never showed */
145
+ --dropdown-item-hover: var(--color-neutral-700);
146
+ --dropdown-item-focus: var(--color-neutral-700);
147
+ --dropdown-item-active: var(--color-neutral-700);
143
148
  }
144
149
 
145
150
  /*
@@ -2315,6 +2315,8 @@ export declare class UiSegmentedComponent<T> {
2315
2315
  readonly value: import("@angular/core").ModelSignal<T>;
2316
2316
  /** What the options choose between, e.g. "How far back the charts go". */
2317
2317
  readonly ariaLabel: import("@angular/core").InputSignal<string>;
2318
+ /** Stretches to the container's width with the options sharing it evenly. */
2319
+ readonly fill: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2318
2320
  protected readonly name: string;
2319
2321
  static ɵfac: i0.ɵɵFactoryDeclaration<UiSegmentedComponent<any>, never>;
2320
2322
  static ɵcmp: i0.ɵɵComponentDeclaration<UiSegmentedComponent<any>, "ui-segmented", never, {
@@ -2333,6 +2335,11 @@ export declare class UiSegmentedComponent<T> {
2333
2335
  "required": true;
2334
2336
  "isSignal": true;
2335
2337
  };
2338
+ "fill": {
2339
+ "alias": "fill";
2340
+ "required": false;
2341
+ "isSignal": true;
2342
+ };
2336
2343
  }, {
2337
2344
  "value": "valueChange";
2338
2345
  }, never, never, true, never>;
@@ -2936,6 +2943,25 @@ export declare class UiSidebarComponent {
2936
2943
  "isOpen": "isOpenChange";
2937
2944
  }, never, ["*", "[sidebar-footer]"], true, never>;
2938
2945
  }
2946
+ /**
2947
+ * A labelled section of sidebar items. The label shows while the sidebar is
2948
+ * open and turns into a divider when it's collapsed, screen readers get the
2949
+ * name either way.
2950
+ */
2951
+ export declare class UiSidebarGroupComponent {
2952
+ private readonly sidebar;
2953
+ readonly label: import("@angular/core").InputSignal<string>;
2954
+ protected readonly labelId: string;
2955
+ readonly isCollapsed: import("@angular/core").Signal<boolean>;
2956
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiSidebarGroupComponent, never>;
2957
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiSidebarGroupComponent, "ui-sidebar-group", never, {
2958
+ "label": {
2959
+ "alias": "label";
2960
+ "required": true;
2961
+ "isSignal": true;
2962
+ };
2963
+ }, {}, never, ["*"], true, never>;
2964
+ }
2939
2965
  export declare class UiSidebarItemComponent {
2940
2966
  private readonly sidebar;
2941
2967
  readonly label: import("@angular/core").InputSignal<string>;
@@ -3465,6 +3491,56 @@ export declare class UiTimeSelectComponent {
3465
3491
  "value": "valueChange";
3466
3492
  }, never, never, true, never>;
3467
3493
  }
3494
+ /**
3495
+ * The signed in person and their options, e.g. Settings and Log out, with a
3496
+ * theme switch. Goes inside a dropdown's `uiDropdownContent`, the same as
3497
+ * `ui-dropdown-menu`. Give that dropdown `closeBehaviour="whenClickOutside"`
3498
+ * so picking a theme doesn't close it, picking an item still does.
3499
+ */
3500
+ export declare class UiUserMenuComponent {
3501
+ private readonly dropdown;
3502
+ readonly name: import("@angular/core").InputSignal<string>;
3503
+ /** A second line under the name, e.g. an email address. */
3504
+ readonly detail: import("@angular/core").InputSignal<string>;
3505
+ readonly src: import("@angular/core").InputSignal<string | null>;
3506
+ /** The same items as `ui-dropdown-menu`, buttons, labelled groups and dividers. */
3507
+ readonly items: import("@angular/core").InputSignal<DropdownMenuItem[]>;
3508
+ /** Shows the System, Light and Dark switch, which needs `provideUiTheme()`. */
3509
+ readonly themeSwitch: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
3510
+ protected readonly menuItems: import("@angular/core").Signal<DropdownMenuItem[]>;
3511
+ protected isDivider(item: DropdownMenuItem): boolean;
3512
+ protected group(item: DropdownMenuItem): DropdownMenuCategory | null;
3513
+ protected button(item: DropdownMenuItem): DropdownMenuButton | null;
3514
+ private closing;
3515
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiUserMenuComponent, never>;
3516
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiUserMenuComponent, "ui-user-menu", never, {
3517
+ "name": {
3518
+ "alias": "name";
3519
+ "required": true;
3520
+ "isSignal": true;
3521
+ };
3522
+ "detail": {
3523
+ "alias": "detail";
3524
+ "required": false;
3525
+ "isSignal": true;
3526
+ };
3527
+ "src": {
3528
+ "alias": "src";
3529
+ "required": false;
3530
+ "isSignal": true;
3531
+ };
3532
+ "items": {
3533
+ "alias": "items";
3534
+ "required": false;
3535
+ "isSignal": true;
3536
+ };
3537
+ "themeSwitch": {
3538
+ "alias": "themeSwitch";
3539
+ "required": false;
3540
+ "isSignal": true;
3541
+ };
3542
+ }, {}, never, never, true, never>;
3543
+ }
3468
3544
  /** What the user picked, `system` follows the OS setting. */
3469
3545
  export type UiThemePreference = 'system' | 'light' | 'dark';
3470
3546
  export interface UiThemeConfig {
@@ -3504,4 +3580,29 @@ export declare class UiThemeService {
3504
3580
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
3505
3581
  }
3506
3582
  /** Starts theme switching at boot. Read or change it through `UiThemeService`. */
3507
- export declare function provideUiTheme(config?: Partial<UiThemeConfig>): EnvironmentProviders;
3583
+ export declare function provideUiTheme(config?: Partial<UiThemeConfig>): EnvironmentProviders;
3584
+ /**
3585
+ * Picks System, Light or Dark through UiThemeService, so the choice is stored
3586
+ * and applied straight away. Add `provideUiTheme()` so the stored choice is
3587
+ * applied at boot, not only once this has rendered.
3588
+ */
3589
+ export declare class UiThemeSwitchComponent {
3590
+ protected readonly theme: UiThemeService;
3591
+ readonly ariaLabel: import("@angular/core").InputSignal<string>;
3592
+ /** Stretches to the container's width, see `ui-segmented`. */
3593
+ readonly fill: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
3594
+ protected readonly options: SegmentedOption<UiThemePreference>[];
3595
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiThemeSwitchComponent, never>;
3596
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiThemeSwitchComponent, "ui-theme-switch", never, {
3597
+ "ariaLabel": {
3598
+ "alias": "ariaLabel";
3599
+ "required": false;
3600
+ "isSignal": true;
3601
+ };
3602
+ "fill": {
3603
+ "alias": "fill";
3604
+ "required": false;
3605
+ "isSignal": true;
3606
+ };
3607
+ }, {}, never, never, true, never>;
3608
+ }