@nanahoshi/mona-ui 0.4.0 → 0.5.0

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.
Files changed (29) hide show
  1. package/collapsible/package.json +4 -0
  2. package/fesm2022/nanahoshi-mona-ui-button.mjs +1 -2
  3. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +304 -0
  4. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +1 -1
  5. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1 -1
  6. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +20 -9
  7. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-D-JCCvYJ.mjs} +2 -2
  8. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-7zwgl7u1.mjs} +2 -2
  9. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs → nanahoshi-mona-ui-grid-grid-list.component-n3eQNIza.mjs} +5 -5
  10. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-BhS7c7rW.mjs} +2 -2
  11. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-B4VB3xFw.mjs} +5 -5
  12. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs} +11 -11
  13. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  14. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1 -1
  15. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +18 -16
  16. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2025 -0
  17. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +96 -0
  18. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1 -1
  19. package/fesm2022/nanahoshi-mona-ui-theme.mjs +61 -25
  20. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +49 -2
  21. package/package.json +13 -1
  22. package/sidebar/package.json +4 -0
  23. package/skeleton/package.json +4 -0
  24. package/types/nanahoshi-mona-ui-collapsible.d.ts +92 -0
  25. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +11 -3
  26. package/types/nanahoshi-mona-ui-popup-menu.d.ts +6 -4
  27. package/types/nanahoshi-mona-ui-sidebar.d.ts +695 -0
  28. package/types/nanahoshi-mona-ui-skeleton.d.ts +51 -0
  29. package/types/nanahoshi-mona-ui-theme.d.ts +28 -2
@@ -0,0 +1,51 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ClassInputType } from '@nanahoshi/mona-ui/common';
3
+ import * as class_variance_authority_types from 'class-variance-authority/types';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import { VariantInputs } from '@nanahoshi/mona-ui/internal';
6
+
7
+ declare const skeletonBaseThemeVariants: (props?: ({
8
+ rounded?: "small" | "medium" | "large" | "full" | "none" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ type SkeletonVariantProps = VariantProps<typeof skeletonBaseThemeVariants>;
11
+ type SkeletonVariantInput = VariantInputs<SkeletonVariantProps>;
12
+
13
+ /**
14
+ * @description
15
+ * A placeholder block standing in for content that has not loaded yet. Size it with `width` and
16
+ * `height`, or with utility classes for anything more involved.
17
+ *
18
+ * It is decorative, so it is hidden from assistive technology. Mark the region it fills with
19
+ * `aria-busy` and describe what is loading there instead.
20
+ */
21
+ declare class SkeletonComponent implements SkeletonVariantInput {
22
+ protected readonly baseClass: _angular_core.Signal<string>;
23
+ protected readonly heightString: _angular_core.Signal<string>;
24
+ protected readonly widthString: _angular_core.Signal<string>;
25
+ /**
26
+ * @description Height of the placeholder. Numbers are treated as pixels.
27
+ * @default "1rem"
28
+ */
29
+ readonly height: _angular_core.InputSignal<string | number>;
30
+ /**
31
+ * @description Border-radius preset applied to the placeholder.
32
+ * @default "medium"
33
+ */
34
+ readonly rounded: _angular_core.InputSignal<"small" | "medium" | "large" | "full" | "none" | null | undefined>;
35
+ /**
36
+ * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
37
+ * @default ""
38
+ */
39
+ readonly userClass: _angular_core.InputSignalWithTransform<string, ClassInputType>;
40
+ /**
41
+ * @description Width of the placeholder. Numbers are treated as pixels.
42
+ * @default "100%"
43
+ */
44
+ readonly width: _angular_core.InputSignal<string | number>;
45
+ private toCssSize;
46
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkeletonComponent, never>;
47
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkeletonComponent, "mona-skeleton", never, { "height": { "alias": "height"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
48
+ }
49
+
50
+ export { SkeletonComponent };
51
+ export type { SkeletonVariantProps };
@@ -72,6 +72,20 @@ interface ThemeColorPaletteSeeds {
72
72
  readonly warning?: string;
73
73
  }
74
74
  type GeneratedThemeColorPalette = Readonly<Record<ThemeVariant, ThemeColors>>;
75
+ /**
76
+ * Inputs to the sidebar colour roles. Everything but the background falls back to the theme's
77
+ * corresponding page role, so a theme only states what it wants the sidebar to do differently.
78
+ */
79
+ interface SidebarColorRoleSeeds {
80
+ readonly accent?: string;
81
+ readonly accentForeground?: string;
82
+ readonly background: string;
83
+ readonly border?: string;
84
+ readonly foreground?: string;
85
+ readonly primary?: string;
86
+ readonly primaryForeground?: string;
87
+ readonly ring?: string;
88
+ }
75
89
  interface ThemeColorPaletteRegistration {
76
90
  readonly seeds: ThemeColorPaletteSeeds;
77
91
  readonly theme: ThemeName;
@@ -101,6 +115,18 @@ declare class ThemeService {
101
115
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
102
116
  }
103
117
 
118
+ /**
119
+ * Builds the sidebar's own colour roles. The sidebar is a persistent chrome region rather than page
120
+ * content, so it is given a surface of its own instead of borrowing the page's — which is what lets a
121
+ * theme sit it slightly apart from the content beside it without every consumer restyling it.
122
+ *
123
+ * Only `background` has to be chosen per theme. Hover defaults to the neutral interaction roles, while
124
+ * the sidebar's primary pair follows the selected-state roles. This keeps ordinary navigation quiet,
125
+ * reserves identity colour for the current item, and makes runtime primary-palette changes flow through
126
+ * without rebuilding the sidebar recipe.
127
+ */
128
+ declare function createSidebarColorRoles(seeds: SidebarColorRoleSeeds): ThemeColors;
129
+
104
130
  declare function provideThemeFamily(registration: ThemeFamilyRegistration): EnvironmentProviders;
105
131
  declare function provideThemeOverrides(registration: ThemeOverrideRegistration): EnvironmentProviders;
106
132
  declare function provideThemeOptions(options: ThemeOptions): EnvironmentProviders;
@@ -118,5 +144,5 @@ declare const THEME_STRATEGY: InjectionToken<ThemeStrategy>;
118
144
  */
119
145
  declare function generateThemeColorPalette(seeds: ThemeColorPaletteSeeds): GeneratedThemeColorPalette;
120
146
 
121
- export { THEME_STRATEGY, ThemeService, flattenThemeProfile, generateThemeColorPalette, provideThemeColorPalette, provideThemeFamily, provideThemeOptions, provideThemeOverrides };
122
- export type { BuiltInThemeName, GeneratedThemeColorPalette, ThemeColorPaletteRegistration, ThemeColorPaletteSeeds, ThemeColorVariable, ThemeColors, ThemeComponentVariable, ThemeComponents, ThemeEffectLevel, ThemeEffectVariable, ThemeEffects, ThemeFamilyRegistration, ThemeFamilyVariants, ThemeMotion, ThemeMotionVariable, ThemeName, ThemeOptions, ThemeOverrideRegistration, ThemeProfile, ThemeProfileOverrides, ThemeSelection, ThemeShadowVariable, ThemeShadows, ThemeShape, ThemeShapeVariable, ThemeStrategy, ThemeVariable, ThemeVariables, ThemeVariant };
147
+ export { THEME_STRATEGY, ThemeService, createSidebarColorRoles, flattenThemeProfile, generateThemeColorPalette, provideThemeColorPalette, provideThemeFamily, provideThemeOptions, provideThemeOverrides };
148
+ export type { BuiltInThemeName, GeneratedThemeColorPalette, SidebarColorRoleSeeds, ThemeColorPaletteRegistration, ThemeColorPaletteSeeds, ThemeColorVariable, ThemeColors, ThemeComponentVariable, ThemeComponents, ThemeEffectLevel, ThemeEffectVariable, ThemeEffects, ThemeFamilyRegistration, ThemeFamilyVariants, ThemeMotion, ThemeMotionVariable, ThemeName, ThemeOptions, ThemeOverrideRegistration, ThemeProfile, ThemeProfileOverrides, ThemeSelection, ThemeShadowVariable, ThemeShadows, ThemeShape, ThemeShapeVariable, ThemeStrategy, ThemeVariable, ThemeVariables, ThemeVariant };