@almadar/ui 4.57.5 → 5.1.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 (48) hide show
  1. package/dist/avl/index.cjs +2499 -1903
  2. package/dist/avl/index.js +1111 -518
  3. package/dist/components/atoms/Icon.d.ts +7 -4
  4. package/dist/components/index.cjs +2064 -1636
  5. package/dist/components/index.js +905 -480
  6. package/dist/components/molecules/Breadcrumb.d.ts +4 -4
  7. package/dist/components/molecules/EmptyState.d.ts +1 -1
  8. package/dist/components/templates/DashboardLayout.d.ts +1 -1
  9. package/dist/context/index.cjs +199 -0
  10. package/dist/context/index.js +199 -0
  11. package/dist/context/themeTokens.d.ts +1 -1
  12. package/dist/docs/index.cjs +456 -98
  13. package/dist/docs/index.d.cts +7 -4
  14. package/dist/docs/index.js +429 -74
  15. package/dist/lib/iconFamily.d.ts +41 -0
  16. package/dist/marketing/index.cjs +480 -124
  17. package/dist/marketing/index.d.cts +7 -4
  18. package/dist/marketing/index.js +446 -93
  19. package/dist/providers/index.cjs +1933 -1505
  20. package/dist/providers/index.js +909 -484
  21. package/dist/runtime/index.cjs +2130 -1534
  22. package/dist/runtime/index.js +1071 -478
  23. package/package.json +5 -2
  24. package/tailwind-preset.cjs +118 -3
  25. package/themes/_contract.md +198 -0
  26. package/themes/almadar-website.css +212 -0
  27. package/themes/almadar.css +210 -0
  28. package/themes/arctic.css +210 -0
  29. package/themes/atelier.css +427 -0
  30. package/themes/copper.css +210 -0
  31. package/themes/ember.css +210 -0
  32. package/themes/forest.css +210 -0
  33. package/themes/gazette.css +411 -0
  34. package/themes/index.css +12 -0
  35. package/themes/kiosk.css +412 -0
  36. package/themes/lavender.css +210 -0
  37. package/themes/midnight.css +210 -0
  38. package/themes/minimalist.css +210 -0
  39. package/themes/neon.css +210 -0
  40. package/themes/ocean.css +210 -0
  41. package/themes/prism.css +406 -0
  42. package/themes/rose.css +210 -0
  43. package/themes/sand.css +210 -0
  44. package/themes/slate.css +210 -0
  45. package/themes/sunset.css +210 -0
  46. package/themes/terminal.css +422 -0
  47. package/themes/trait-wars.css +210 -0
  48. package/themes/wireframe.css +216 -0
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Icon family runtime resolver (Layer 1 Iconography axis).
3
+ *
4
+ * Reads the active `--icon-family` CSS variable from the document element and
5
+ * dispatches a canonical icon name (kebab-case, matching lucide's vocabulary)
6
+ * to the equivalent component in the active family. Subscribes to data-theme
7
+ * attribute changes via MutationObserver so a theme switch re-renders icons
8
+ * into the new family without a page reload.
9
+ *
10
+ * Canonical name = lucide name. Per-family alias tables resolve cross-family
11
+ * naming differences (e.g. lucide's `search` is phosphor's `MagnifyingGlass`).
12
+ * For names not mapped in the active family, falls back to lucide and logs a
13
+ * console.warn — preserves semantic over family purity.
14
+ *
15
+ * See `docs/Almadar_Std_Variations.md` §2 and `themes/_contract.md`.
16
+ */
17
+ import React from 'react';
18
+ import type { IconFamily as IconFamilyType } from '@almadar/core';
19
+ export type IconFamily = IconFamilyType;
20
+ /** Adapter props that EVERY family-specific icon component accepts at this layer. */
21
+ export interface RenderedIconProps {
22
+ className?: string;
23
+ strokeWidth?: number;
24
+ size?: number;
25
+ style?: React.CSSProperties;
26
+ }
27
+ /** Read --icon-family from <html> at runtime. Returns 'lucide' on SSR. */
28
+ export declare function getCurrentIconFamily(): IconFamily;
29
+ /** React hook: returns the active icon family, re-renders on theme switch. */
30
+ export declare function useIconFamily(): IconFamily;
31
+ /**
32
+ * Dispatch a canonical icon name to the right family component.
33
+ * Falls back to lucide (with console.warn) when the family has no mapping.
34
+ */
35
+ export declare function resolveIconForFamily(name: string, family: IconFamily): React.ComponentType<RenderedIconProps>;
36
+ /**
37
+ * Resolve a canonical icon name to a family-aware component. The returned
38
+ * component re-renders the icon into the active family's library on theme
39
+ * switch (via useIconFamily's MutationObserver subscription).
40
+ */
41
+ export declare function useResolvedIcon(name: string): React.ComponentType<RenderedIconProps>;