el-magico-ui 1.0.1

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 (118) hide show
  1. package/README.md +209 -0
  2. package/dist/components/XlpAvatar.d.ts +20 -0
  3. package/dist/components/XlpAvatar.d.ts.map +1 -0
  4. package/dist/components/XlpButton.d.ts +59 -0
  5. package/dist/components/XlpButton.d.ts.map +1 -0
  6. package/dist/components/XlpCalendar.d.ts +35 -0
  7. package/dist/components/XlpCalendar.d.ts.map +1 -0
  8. package/dist/components/XlpCard.d.ts +66 -0
  9. package/dist/components/XlpCard.d.ts.map +1 -0
  10. package/dist/components/XlpCodeSnippet.d.ts +28 -0
  11. package/dist/components/XlpCodeSnippet.d.ts.map +1 -0
  12. package/dist/components/XlpDrawer.d.ts +86 -0
  13. package/dist/components/XlpDrawer.d.ts.map +1 -0
  14. package/dist/components/XlpDropzone.d.ts +28 -0
  15. package/dist/components/XlpDropzone.d.ts.map +1 -0
  16. package/dist/components/XlpGlobalCalendarPreview.d.ts +19 -0
  17. package/dist/components/XlpGlobalCalendarPreview.d.ts.map +1 -0
  18. package/dist/components/XlpHeading.d.ts +24 -0
  19. package/dist/components/XlpHeading.d.ts.map +1 -0
  20. package/dist/components/XlpInput.d.ts +127 -0
  21. package/dist/components/XlpInput.d.ts.map +1 -0
  22. package/dist/components/XlpMenuItem.d.ts +27 -0
  23. package/dist/components/XlpMenuItem.d.ts.map +1 -0
  24. package/dist/components/XlpPagination.d.ts +15 -0
  25. package/dist/components/XlpPagination.d.ts.map +1 -0
  26. package/dist/components/XlpRadioGroup.d.ts +30 -0
  27. package/dist/components/XlpRadioGroup.d.ts.map +1 -0
  28. package/dist/components/XlpSelect.d.ts +38 -0
  29. package/dist/components/XlpSelect.d.ts.map +1 -0
  30. package/dist/components/XlpSwitch.d.ts +28 -0
  31. package/dist/components/XlpSwitch.d.ts.map +1 -0
  32. package/dist/components/XlpTabs.d.ts +25 -0
  33. package/dist/components/XlpTabs.d.ts.map +1 -0
  34. package/dist/components/XlpTag.d.ts +30 -0
  35. package/dist/components/XlpTag.d.ts.map +1 -0
  36. package/dist/components/XlpTextarea.d.ts +22 -0
  37. package/dist/components/XlpTextarea.d.ts.map +1 -0
  38. package/dist/components/index.d.ts +3 -0
  39. package/dist/components/index.d.ts.map +1 -0
  40. package/dist/components/ui/toaster.d.ts +3 -0
  41. package/dist/components/ui/toaster.d.ts.map +1 -0
  42. package/dist/el-magico-ui.cjs.js +2 -0
  43. package/dist/el-magico-ui.cjs.js.map +1 -0
  44. package/dist/el-magico-ui.es.js +3460 -0
  45. package/dist/el-magico-ui.es.js.map +1 -0
  46. package/dist/index.d.ts +50 -0
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/mocks/globalCalendarPreview.mock.d.ts +5 -0
  49. package/dist/mocks/globalCalendarPreview.mock.d.ts.map +1 -0
  50. package/dist/providers/index.d.ts +46 -0
  51. package/dist/providers/index.d.ts.map +1 -0
  52. package/dist/stories/ThemeSystem.stories.d.ts +7 -0
  53. package/dist/stories/ThemeSystem.stories.d.ts.map +1 -0
  54. package/dist/stories/XlpAvatar.stories.d.ts +11 -0
  55. package/dist/stories/XlpAvatar.stories.d.ts.map +1 -0
  56. package/dist/stories/XlpButton.stories.d.ts +19 -0
  57. package/dist/stories/XlpButton.stories.d.ts.map +1 -0
  58. package/dist/stories/XlpCalendar.stories.d.ts +58 -0
  59. package/dist/stories/XlpCalendar.stories.d.ts.map +1 -0
  60. package/dist/stories/XlpCard.stories.d.ts +13 -0
  61. package/dist/stories/XlpCard.stories.d.ts.map +1 -0
  62. package/dist/stories/XlpCodeSnippet.stories.d.ts +11 -0
  63. package/dist/stories/XlpCodeSnippet.stories.d.ts.map +1 -0
  64. package/dist/stories/XlpDrawer.stories.d.ts +9 -0
  65. package/dist/stories/XlpDrawer.stories.d.ts.map +1 -0
  66. package/dist/stories/XlpDropzone.stories.d.ts +11 -0
  67. package/dist/stories/XlpDropzone.stories.d.ts.map +1 -0
  68. package/dist/stories/XlpGlobalCalendarPreview.stories.d.ts +8 -0
  69. package/dist/stories/XlpGlobalCalendarPreview.stories.d.ts.map +1 -0
  70. package/dist/stories/XlpHeading.stories.d.ts +12 -0
  71. package/dist/stories/XlpHeading.stories.d.ts.map +1 -0
  72. package/dist/stories/XlpInput.stories.d.ts +10 -0
  73. package/dist/stories/XlpInput.stories.d.ts.map +1 -0
  74. package/dist/stories/XlpMenuItem.stories.d.ts +14 -0
  75. package/dist/stories/XlpMenuItem.stories.d.ts.map +1 -0
  76. package/dist/stories/XlpPagination.stories.d.ts +10 -0
  77. package/dist/stories/XlpPagination.stories.d.ts.map +1 -0
  78. package/dist/stories/XlpSelect.stories.d.ts +10 -0
  79. package/dist/stories/XlpSelect.stories.d.ts.map +1 -0
  80. package/dist/stories/XlpSwitch.stories.d.ts +11 -0
  81. package/dist/stories/XlpSwitch.stories.d.ts.map +1 -0
  82. package/dist/stories/XlpTabs.stories.d.ts +11 -0
  83. package/dist/stories/XlpTabs.stories.d.ts.map +1 -0
  84. package/dist/stories/XlpTag.stories.d.ts +12 -0
  85. package/dist/stories/XlpTag.stories.d.ts.map +1 -0
  86. package/dist/stories/XlpTextarea.stories.d.ts +10 -0
  87. package/dist/stories/XlpTextarea.stories.d.ts.map +1 -0
  88. package/dist/theme/brands/default/tokens.d.ts +7 -0
  89. package/dist/theme/brands/default/tokens.d.ts.map +1 -0
  90. package/dist/theme/brands/meridian/tokens.d.ts +6 -0
  91. package/dist/theme/brands/meridian/tokens.d.ts.map +1 -0
  92. package/dist/theme/brands/xlp/tokens.d.ts +10 -0
  93. package/dist/theme/brands/xlp/tokens.d.ts.map +1 -0
  94. package/dist/theme/context.d.ts +46 -0
  95. package/dist/theme/context.d.ts.map +1 -0
  96. package/dist/theme/createTheme.d.ts +16 -0
  97. package/dist/theme/createTheme.d.ts.map +1 -0
  98. package/dist/theme/index.d.ts +48 -0
  99. package/dist/theme/index.d.ts.map +1 -0
  100. package/dist/theme/provider.d.ts +80 -0
  101. package/dist/theme/provider.d.ts.map +1 -0
  102. package/dist/theme/registry.d.ts +20 -0
  103. package/dist/theme/registry.d.ts.map +1 -0
  104. package/dist/theme/semantic/colors.d.ts +396 -0
  105. package/dist/theme/semantic/colors.d.ts.map +1 -0
  106. package/dist/theme/semantic/spacing.d.ts +207 -0
  107. package/dist/theme/semantic/spacing.d.ts.map +1 -0
  108. package/dist/theme/semantic/typography.d.ts +120 -0
  109. package/dist/theme/semantic/typography.d.ts.map +1 -0
  110. package/dist/theme/tokenBundle.d.ts +31 -0
  111. package/dist/theme/tokenBundle.d.ts.map +1 -0
  112. package/dist/theme/types.d.ts +254 -0
  113. package/dist/theme/types.d.ts.map +1 -0
  114. package/dist/types/index.d.ts +107 -0
  115. package/dist/types/index.d.ts.map +1 -0
  116. package/dist/utils/globalCalendarPreview.d.ts +43 -0
  117. package/dist/utils/globalCalendarPreview.d.ts.map +1 -0
  118. package/package.json +67 -0
package/README.md ADDED
@@ -0,0 +1,209 @@
1
+ # XLP-UI
2
+
3
+ `XLP-UI` is a multi-brand React component library and theming system built on Chakra UI v3.
4
+
5
+ It is designed for white-label and microfrontend use cases where each host application can switch brands, inject token overrides, and consume a shared set of themed UI primitives without coupling components to raw design values.
6
+
7
+ ## Features
8
+
9
+ - Multi-brand token architecture: `BrandTokens -> Semantic Tokens -> Component Recipes`
10
+ - React 19 and strict TypeScript support
11
+ - Chakra UI v3 system-based theme generation
12
+ - Runtime brand registration with `registerBrand()`
13
+ - Provider-based theme isolation for microfrontends
14
+ - Prebuilt themed components for common form and action patterns
15
+
16
+ ## Package
17
+
18
+ - Package name: `@adil-hammad-xelops/el-magico-ui`
19
+ - Module output: ESM and CJS
20
+ - Types: bundled in `dist/index.d.ts`
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ npm install @adil-hammad-xelops/el-magico-ui
26
+ ```
27
+
28
+ Peer dependencies:
29
+
30
+ - `react >= 19`
31
+ - `react-dom >= 19`
32
+ - `@chakra-ui/react >= 3`
33
+ - `@emotion/react >= 11`
34
+ - `@tanstack/react-query >= 5`
35
+
36
+ ## Quick Start
37
+
38
+ Wrap your app with `RootProvider` when you want both theming and React Query wiring:
39
+
40
+ ```tsx
41
+ import { createRoot } from "react-dom/client"
42
+ import { RootProvider, XlpButton } from "@adil-hammad-xelops/el-magico-ui"
43
+
44
+ function App() {
45
+ return <XlpButton>Click me</XlpButton>
46
+ }
47
+
48
+ createRoot(document.getElementById("root")!).render(
49
+ <RootProvider brandId="default">
50
+ <App />
51
+ </RootProvider>,
52
+ )
53
+ ```
54
+
55
+ If you only want the theme layer, use `AppThemeProvider` directly:
56
+
57
+ ```tsx
58
+ import { AppThemeProvider } from "@adil-hammad-xelops/el-magico-ui"
59
+
60
+ export function AppShell() {
61
+ return <AppThemeProvider brandId="meridian">...</AppThemeProvider>
62
+ }
63
+ ```
64
+
65
+ ## Built-in Brands
66
+
67
+ The library currently exposes these built-in token sets:
68
+
69
+ - `default`
70
+ - `brandA`
71
+ - `brandB`
72
+ - `meridian`
73
+
74
+ You can inspect the current registry through `getRegisteredBrands()`.
75
+
76
+ ## Public API
77
+
78
+ Main exports from `src/index.ts`:
79
+
80
+ - Providers: `RootProvider`, `AppThemeProvider`
81
+ - Theme utilities: `useTheme`, `registerBrand`, `resolveBrandTokens`, `getRegisteredBrands`, `createTheme`
82
+ - Built-in token sets: `defaultTokens`, `brandATokens`, `brandBTokens`, `meridianTokens`
83
+ - Components: `XlpButton`, `XlpInput`, `XlpTextarea`, `XlpSelect`, `XlpSwitch`, `XlpRadioGroup`
84
+ - Theme/domain types: `BrandTokens`, `ThemeContextValue`, `ColorScale`, and shared app types from `src/types`
85
+
86
+ ## Theme Architecture
87
+
88
+ This repository enforces a strict separation of concerns:
89
+
90
+ 1. `src/theme/brands/*/tokens.ts`
91
+ Raw brand values only.
92
+ 2. `src/theme/semantic/*`
93
+ Stable semantic abstractions generated from brand tokens.
94
+ 3. `src/theme/components/*`
95
+ Chakra recipes that consume semantic tokens only.
96
+
97
+ Rules:
98
+
99
+ - Do not hardcode colors, spacing, radii, or border widths in components.
100
+ - Do not bypass semantic tokens from component recipes.
101
+ - Brand-specific changes should happen in token files first.
102
+
103
+ ## Custom Brands
104
+
105
+ Register a custom brand before mounting the provider:
106
+
107
+ ```tsx
108
+ import {
109
+ registerBrand,
110
+ RootProvider,
111
+ type BrandTokens,
112
+ } from "@adil-hammad-xelops/xelops-ui"
113
+
114
+ const acmeTokens: BrandTokens = {
115
+ // full token object
116
+ } as const
117
+
118
+ registerBrand("acme", acmeTokens)
119
+
120
+ export function Root() {
121
+ return <RootProvider brandId="acme">...</RootProvider>
122
+ }
123
+ ```
124
+
125
+ You can also supply partial runtime overrides:
126
+
127
+ ```tsx
128
+ import { useMemo } from "react"
129
+ import { RootProvider, type BrandTokens } from "@adil-hammad-xelops/el-magico-ui"
130
+
131
+ export function Root() {
132
+ const tokenOverrides = useMemo<Partial<BrandTokens>>(
133
+ () => ({
134
+ radii: { md: "1rem" },
135
+ }),
136
+ [],
137
+ )
138
+
139
+ return (
140
+ <RootProvider brandId="default" tokenOverrides={tokenOverrides}>
141
+ ...
142
+ </RootProvider>
143
+ )
144
+ }
145
+ ```
146
+
147
+ ## Components
148
+
149
+ Available base components:
150
+
151
+ - `XlpButton`
152
+ - `XlpInput`
153
+ - `XlpTextarea`
154
+ - `XlpSelect`
155
+ - `XlpSwitch`
156
+ - `XlpRadioGroup`
157
+
158
+ These components are theme-aware and intended to be consumed instead of raw Chakra components in feature code.
159
+
160
+ ## Development
161
+
162
+ Scripts:
163
+
164
+ - `npm run dev` - start the Vite dev server
165
+ - `npm run build` - build types and library bundles
166
+ - `npm run build:types` - emit declaration files only
167
+ - `npm run preview` - preview the Vite build locally
168
+
169
+ ## Project Structure
170
+
171
+ ```text
172
+ src/
173
+ components/
174
+ providers/
175
+ theme/
176
+ brands/
177
+ components/
178
+ semantic/
179
+ context.tsx
180
+ createTheme.ts
181
+ index.ts
182
+ provider.tsx
183
+ registry.ts
184
+ types.ts
185
+ types/
186
+ ```
187
+
188
+ ## Design Token Translation
189
+
190
+ This repo also contains internal agent/skill workflows for translating Figma token exports into the `BrandTokens` model.
191
+
192
+ Relevant repo assets:
193
+
194
+ - `.github/skills/figma-token-theme-translator/`
195
+ - `.github/agents/figma-token-architect.agent.md`
196
+
197
+ Those are internal workflow helpers and are not part of the published runtime package.
198
+
199
+ ## Build Output
200
+
201
+ The package publishes from `dist/`:
202
+
203
+ - `dist/el-magico-ui.es.js`
204
+ - `dist/el-magico-ui.cjs.js`
205
+ - `dist/index.d.ts`
206
+
207
+ ## License
208
+
209
+ `ISC`
@@ -0,0 +1,20 @@
1
+ import { type AvatarRootProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpAvatarProps extends AvatarRootProps {
4
+ /** Display name used to build fallback initials. */
5
+ name?: string;
6
+ /** Optional avatar image URL. */
7
+ imageUrl?: string;
8
+ /** Optional custom fallback text (overrides generated initials). */
9
+ fallback?: string;
10
+ /** Called after render with the active theme context. */
11
+ onTheme?: (theme: ThemeContextValue) => void;
12
+ }
13
+ /**
14
+ * XlpAvatar — themed Avatar component.
15
+ *
16
+ * Matches the Figma card avatar language using XLP semantic tokens,
17
+ * with optional picture support and initials fallback.
18
+ */
19
+ export declare const XlpAvatar: import("react").ForwardRefExoticComponent<XlpAvatarProps & import("react").RefAttributes<HTMLDivElement>>;
20
+ //# sourceMappingURL=XlpAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpAvatar.d.ts","sourceRoot":"","sources":["../../src/components/XlpAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,cAAe,SAAQ,eAAe;IACnD,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAeD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,2GAkCrB,CAAA"}
@@ -0,0 +1,59 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type ButtonProps } from "@chakra-ui/react";
3
+ import type { ThemeContextValue } from "../theme/context";
4
+ export interface XlpButtonProps extends Omit<ButtonProps, "variant"> {
5
+ /** XlpButton variant. Extends Chakra variants with "control" (bordered + subtle bg). */
6
+ variant?: ButtonProps["variant"] | "control";
7
+ /**
8
+ * Called after render with the active theme context.
9
+ * Use this in the host app to read active theme tokens
10
+ * without importing the theme package directly.
11
+ *
12
+ * @example
13
+ * <XlpButton onTheme={({ brandId, tokens }) => {
14
+ * hostApp.setAccentColor(tokens.colors.primary[500])
15
+ * }}>
16
+ * Save
17
+ * </XlpButton>
18
+ */
19
+ onTheme?: (theme: ThemeContextValue) => void;
20
+ /** Optional text label for the button. Alternative to children. */
21
+ label?: string;
22
+ /** Optional leading icon element (e.g. <AddIcon /> from @chakra-ui/icons). */
23
+ startIcon?: ReactNode;
24
+ /** Optional trailing icon element (e.g. <ArrowForwardIcon /> from @chakra-ui/icons). */
25
+ endIcon?: ReactNode;
26
+ /** Optional props for the leading icon wrapper span. */
27
+ startIconProps?: Omit<HTMLAttributes<HTMLSpanElement>, "children">;
28
+ /** Optional props for the trailing icon wrapper span. */
29
+ endIconProps?: Omit<HTMLAttributes<HTMLSpanElement>, "children">;
30
+ /** Icon color override. Defaults to inheriting from button color. */
31
+ iconColor?: string;
32
+ /** Icon size (width/height). Defaults to "1.15rem". */
33
+ iconSize?: string | number;
34
+ /** Show loading spinner and disable interaction. */
35
+ isLoading?: boolean;
36
+ /** Text to display when loading. If not provided, shows spinner only. */
37
+ loadingText?: string;
38
+ /** Expand button to full container width. */
39
+ fullWidth?: boolean;
40
+ /** Explicit disabled state (alternative to disabled prop). */
41
+ isDisabled?: boolean;
42
+ /** Accessibility label for screen readers. */
43
+ ariaLabel?: string;
44
+ /** Render icon-only button (square/circular with centered icon). */
45
+ isIconOnly?: boolean;
46
+ }
47
+ /**
48
+ * XlpButton — themed Button component.
49
+ *
50
+ * Identical API to Chakra's <Button>, with extensions:
51
+ * 1. Attaches `data-xlp-brand` and `data-xlp-primary` attributes for
52
+ * host-app CSS selectors, testing, and debugging.
53
+ * 2. Exposes the full theme context via the `onTheme` callback prop.
54
+ * 3. Enhanced icon support with color and size props.
55
+ * 4. Loading state with optional spinner and loading text.
56
+ * 5. Label prop as alternative to children.
57
+ */
58
+ export declare const XlpButton: import("react").ForwardRefExoticComponent<XlpButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
59
+ //# sourceMappingURL=XlpButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpButton.d.ts","sourceRoot":"","sources":["../../src/components/XlpButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AACd,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;IAClE,wFAAwF;IACxF,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,SAAS,CAAA;IAC5C;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAE5C,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB,wFAAwF;IACxF,OAAO,CAAC,EAAE,SAAS,CAAA;IAEnB,wDAAwD;IACxD,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAA;IAElE,yDAAyD;IACzD,YAAY,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAA;IAEhE,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAE1B,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,8GAwPrB,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { type BoxProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export type SelectionMode = "single" | "range" | "multiple";
4
+ export interface XlpCalendarProps extends Omit<BoxProps, "onChange"> {
5
+ /** Selection mode: single, range, or multiple. Defaults to "single". */
6
+ mode?: SelectionMode;
7
+ /** Selected date(s) as ISO strings. */
8
+ value?: string | string[] | null;
9
+ /** Callback when selection changes. */
10
+ onChange?: (value: string | string[] | null) => void;
11
+ /** Callback with theme context. */
12
+ onTheme?: (theme: ThemeContextValue) => void;
13
+ /** Disabled dates (ISO strings). */
14
+ disabledDates?: string[];
15
+ /** Initial date to display (defaults to today). ISO string or Date. */
16
+ initialDate?: string | Date;
17
+ /** Number of months to display side-by-side. Defaults to 1. */
18
+ numOfMonths?: number;
19
+ /** Show week numbers. Defaults to false. */
20
+ showWeekNumbers?: boolean;
21
+ /** Hide dates outside current month. Defaults to false. */
22
+ hideOutsideDays?: boolean;
23
+ /** Maximum number of selectable dates (for multi mode). */
24
+ maxSelectedDates?: number;
25
+ }
26
+ /**
27
+ * XlpCalendar — themed date picker using Chakra's DatePicker.Root.
28
+ *
29
+ * Supports three selection modes:
30
+ * - single: Pick one date
31
+ * - range: Pick start and end date
32
+ * - multiple: Pick multiple dates
33
+ */
34
+ export declare const XlpCalendar: import("react").ForwardRefExoticComponent<XlpCalendarProps & import("react").RefAttributes<HTMLDivElement>>;
35
+ //# sourceMappingURL=XlpCalendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpCalendar.d.ts","sourceRoot":"","sources":["../../src/components/XlpCalendar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAGzD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAA;AAE3D,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAChE,wEAAwE;IACxE,IAAI,CAAC,EAAE,aAAa,CAAA;IAEpB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA;IAEhC,uCAAuC;IACvC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,KAAK,IAAI,CAAA;IAEpD,mCAAmC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAE5C,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IAExB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE3B,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,6GAoKvB,CAAA"}
@@ -0,0 +1,66 @@
1
+ import { ReactNode } from "react";
2
+ import { type BoxProps } from "@chakra-ui/react";
3
+ import type { ThemeContextValue } from "../theme/context";
4
+ export interface CardAction {
5
+ label: string;
6
+ icon?: ReactNode;
7
+ onClick?: () => void;
8
+ variant?: "solid" | "outline";
9
+ }
10
+ export interface XlpCardProps extends Omit<BoxProps, "children"> {
11
+ /** Card variant: "default" (featured) or "user" (compact user profile) */
12
+ variant?: "default" | "user";
13
+ /** Array of badge labels to display at the top (default variant) */
14
+ badges?: string[];
15
+ /** Card title */
16
+ title: string;
17
+ /** Card description or body text (default variant) or role (user variant) */
18
+ description: string;
19
+ /** Avatar display name (used to generate initials) */
20
+ avatarName?: string;
21
+ /** Action buttons in the footer (default variant) */
22
+ actions?: CardAction[];
23
+ /** Custom color for badges (solid variant) */
24
+ badgeColor?: string;
25
+ /** Metadata text (user variant, e.g., date with icon) */
26
+ metadata?: string;
27
+ /** Maximum lines for description text. Set to null to disable truncation. Defaults to 2. */
28
+ descriptionLineClamp?: number | null;
29
+ /**
30
+ * Called after render with the active theme context.
31
+ */
32
+ onTheme?: (theme: ThemeContextValue) => void;
33
+ }
34
+ /**
35
+ * XlpCard — themed composite Card component.
36
+ *
37
+ * Two variants:
38
+ * - "default": Featured card with badges, title, description, and action buttons
39
+ * - "user": Compact user profile card with avatar, name, role, and metadata
40
+ *
41
+ * @example
42
+ * // Default variant
43
+ * <XlpCard
44
+ * variant="default"
45
+ * badges={["Data", "Claude"]}
46
+ * title="Python Code Refactoring"
47
+ * description="This sofa is perfect for modern tropical spaces..."
48
+ * avatarName="DA"
49
+ * actions={[
50
+ * { label: "Copy", variant: "solid" },
51
+ * { label: "Download", variant: "outline" }
52
+ * ]}
53
+ * />
54
+ *
55
+ * @example
56
+ * // User variant
57
+ * <XlpCard
58
+ * variant="user"
59
+ * title="Amelia Larson"
60
+ * description="AI Engineer"
61
+ * avatarName="AL"
62
+ * metadata="01/15/2026"
63
+ * />
64
+ */
65
+ export declare const XlpCard: import("react").ForwardRefExoticComponent<XlpCardProps & import("react").RefAttributes<HTMLDivElement>>;
66
+ //# sourceMappingURL=XlpCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpCard.d.ts","sourceRoot":"","sources":["../../src/components/XlpCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAA4B,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAG1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAMzD,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAChC;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC5D,0EAA0E;IAC1E,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAE5B,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IAEjB,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAA;IAEb,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAA;IAEnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IAEtB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,4FAA4F;IAC5F,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEpC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,OAAO,yGAiPnB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { type BoxProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpCodeSnippetProps extends Omit<BoxProps, "children"> {
4
+ /** File name to display (e.g., "app.py", "index.js") */
5
+ fileName?: string;
6
+ /** Code content to display */
7
+ code: string;
8
+ /** Minimum height of code block. Defaults to "{spacing.10}" */
9
+ codeMinHeight?: string | number;
10
+ /** Height of code block (overrides minHeight). */
11
+ codeHeight?: string | number;
12
+ /** Called after render with the active theme context */
13
+ onTheme?: (theme: ThemeContextValue) => void;
14
+ }
15
+ /**
16
+ * XlpCodeSnippet — themed code preview component.
17
+ *
18
+ * Displays code in a dark block with copy functionality and token-driven styling.
19
+ * Header shows file name with code icon and copy button.
20
+ *
21
+ * @example
22
+ * <XlpCodeSnippet
23
+ * fileName="app.py"
24
+ * code='print("Hello, World!")'
25
+ * />
26
+ */
27
+ export declare const XlpCodeSnippet: import("react").ForwardRefExoticComponent<XlpCodeSnippetProps & import("react").RefAttributes<HTMLDivElement>>;
28
+ //# sourceMappingURL=XlpCodeSnippet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpCodeSnippet.d.ts","sourceRoot":"","sources":["../../src/components/XlpCodeSnippet.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAKnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IACnE,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IAEZ,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAE/B,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAE5B,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,gHAmH1B,CAAA"}
@@ -0,0 +1,86 @@
1
+ import { type ReactNode, type HTMLAttributes } from "react";
2
+ import { type DrawerRootProps } from "@chakra-ui/react";
3
+ import type { ThemeContextValue } from "../theme/context";
4
+ export interface XlpDrawerAction {
5
+ label: string;
6
+ onClick?: () => void;
7
+ variant?: "solid" | "outline" | "ghost" | "subtle";
8
+ closeOnClick?: boolean;
9
+ }
10
+ export interface XlpDrawerProps extends Omit<DrawerRootProps, "children"> {
11
+ /** Main content of the drawer */
12
+ children: ReactNode;
13
+ /** Maximum width of the drawer. Defaults to "xl". Can be any Chakra size or custom CSS value. */
14
+ maxWidth?: string | number;
15
+ /** Called after render with the active theme context */
16
+ onTheme?: (theme: ThemeContextValue) => void;
17
+ }
18
+ export interface XlpDrawerHeaderProps extends HTMLAttributes<HTMLDivElement> {
19
+ /** Header title text */
20
+ title: string;
21
+ /** Callback when close button is clicked */
22
+ onClose?: () => void;
23
+ /** Optional close button element (defaults to icon-only close) */
24
+ closeTrigger?: ReactNode;
25
+ }
26
+ export interface XlpDrawerFooterProps extends HTMLAttributes<HTMLDivElement> {
27
+ /** Action buttons to display in footer */
28
+ actions?: XlpDrawerAction[];
29
+ }
30
+ export interface XlpDrawerCloseTriggerProps {
31
+ /** Callback when close button is clicked */
32
+ onClose?: () => void;
33
+ /** Custom icon or label (defaults to X icon) */
34
+ children?: ReactNode;
35
+ /** Button size */
36
+ size?: "xs" | "sm" | "md" | "lg";
37
+ }
38
+ /**
39
+ * XlpDrawerCloseTrigger — Close button for drawer.
40
+ * Icon-only by default, wraps Drawer.CloseTrigger.
41
+ */
42
+ declare const XlpDrawerCloseTrigger: import("react").ForwardRefExoticComponent<XlpDrawerCloseTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
43
+ /**
44
+ * XlpDrawerHeader — Drawer header with title and close button.
45
+ * Use as: <XlpDrawer.Header title="..." onClose={...} />
46
+ */
47
+ declare const XlpDrawerHeader: import("react").ForwardRefExoticComponent<XlpDrawerHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
48
+ /**
49
+ * XlpDrawerBody — Drawer body/content area with XLP styling.
50
+ * Use as: <XlpDrawer.Body>{children}</XlpDrawer.Body>
51
+ */
52
+ declare const XlpDrawerBody: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
53
+ /**
54
+ * XlpDrawerFooter — Drawer footer with action buttons.
55
+ * Use as: <XlpDrawer.Footer actions={[...]} />
56
+ */
57
+ declare const XlpDrawerFooter: import("react").ForwardRefExoticComponent<XlpDrawerFooterProps & import("react").RefAttributes<HTMLDivElement>>;
58
+ /**
59
+ * XlpDrawer — Themed drawer component from Figma design with compound components.
60
+ *
61
+ * Exports separate Header, Body, Footer, and CloseTrigger components for flexible composition.
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * <XlpDrawer open={isOpen} onOpenChange={handleOpenChange}>
66
+ * <XlpDrawer.Header title="Contribute" onClose={() => setIsOpen(false)} />
67
+ * <XlpDrawer.Body>
68
+ * Your form or content here
69
+ * </XlpDrawer.Body>
70
+ * <XlpDrawer.Footer actions={[
71
+ * { label: "Cancel", variant: "outline", closeOnClick: true },
72
+ * { label: "Submit", variant: "solid", onClick: handleSubmit }
73
+ * ]} />
74
+ * </XlpDrawer>
75
+ * ```
76
+ */
77
+ declare const XlpDrawerRoot: import("react").ForwardRefExoticComponent<XlpDrawerProps & import("react").RefAttributes<HTMLDivElement>>;
78
+ interface XlpDrawerCompound {
79
+ Header: typeof XlpDrawerHeader;
80
+ Body: typeof XlpDrawerBody;
81
+ Footer: typeof XlpDrawerFooter;
82
+ CloseTrigger: typeof XlpDrawerCloseTrigger;
83
+ }
84
+ export { XlpDrawerHeader, XlpDrawerBody, XlpDrawerFooter, XlpDrawerCloseTrigger };
85
+ export declare const XlpDrawer: typeof XlpDrawerRoot & XlpDrawerCompound;
86
+ //# sourceMappingURL=XlpDrawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpDrawer.d.ts","sourceRoot":"","sources":["../../src/components/XlpDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAyD,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAI9G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAA;IAClD,YAAY,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IACrE,iCAAiC;IACjC,QAAQ,EAAE,SAAS,CAAA;IAEnB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAE1B,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACxE,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAA;IAEb,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAEpB,kEAAkE;IAClE,YAAY,CAAC,EAAE,SAAS,CAAA;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACxE,0CAA0C;IAC1C,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;CAC9B;AAED,MAAM,WAAW,0BAA0B;IACvC,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAEpB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB,kBAAkB;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CACnC;AAED;;;GAGG;AACH,QAAA,MAAM,qBAAqB,0HAqB1B,CAAA;AAGD;;;GAGG;AACH,QAAA,MAAM,eAAe,iHA8BpB,CAAA;AAGD;;;GAGG;AACH,QAAA,MAAM,aAAa,2HAYlB,CAAA;AAGD;;;GAGG;AACH,QAAA,MAAM,eAAe,iHAqCpB,CAAA;AAGD;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,aAAa,2GAoClB,CAAA;AAID,UAAU,iBAAiB;IACvB,MAAM,EAAE,OAAO,eAAe,CAAA;IAC9B,IAAI,EAAE,OAAO,aAAa,CAAA;IAC1B,MAAM,EAAE,OAAO,eAAe,CAAA;IAC9B,YAAY,EAAE,OAAO,qBAAqB,CAAA;CAC7C;AAED,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAA;AAEjF,eAAO,MAAM,SAAS,EAAE,OAAO,aAAa,GAAG,iBAK7C,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { type BoxProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpDropzoneProps extends Omit<BoxProps, "onChange"> {
4
+ /** Optional label rendered above the dropzone. */
5
+ label?: string;
6
+ /** Main instructional text shown inside the dropzone. */
7
+ title?: string;
8
+ /** Secondary helper text shown under the title. */
9
+ hint?: string;
10
+ /** Native file input accept string. */
11
+ accept?: string;
12
+ /** Allows selecting multiple files. Enabled by default. */
13
+ multiple?: boolean;
14
+ /** Called whenever files are selected or dropped. */
15
+ onFilesChange?: (files: File[]) => void;
16
+ /** Shows selected file previews below the dropzone. */
17
+ showPreview?: boolean;
18
+ /** Called after render with the active theme context. */
19
+ onTheme?: (theme: ThemeContextValue) => void;
20
+ }
21
+ /**
22
+ * XlpDropzone — themed file upload dropzone.
23
+ *
24
+ * Figma-mapped dropzone with drag/drop + click to open file picker,
25
+ * built entirely with XLP semantic tokens.
26
+ */
27
+ export declare const XlpDropzone: import("react").ForwardRefExoticComponent<XlpDropzoneProps & import("react").RefAttributes<HTMLInputElement>>;
28
+ //# sourceMappingURL=XlpDropzone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpDropzone.d.ts","sourceRoot":"","sources":["../../src/components/XlpDropzone.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAChE,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,qDAAqD;IACrD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAA;IAEvC,uDAAuD;IACvD,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,+GA8PvB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { type BoxProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ import { type XlpGlobalCalendarHoliday, type XlpGlobalCalendarEmployee, type XlpGlobalCalendarLegendItem } from "../utils/globalCalendarPreview";
4
+ export type { XlpGlobalCalendarDay, XlpGlobalCalendarEmployee, XlpGlobalCalendarEntry, XlpGlobalCalendarHoliday, XlpGlobalCalendarLegendItem, XlpGlobalHolidayCalendar, XlpGlobalLeaveType, } from "../utils/globalCalendarPreview";
5
+ export interface XlpGlobalCalendarPreviewProps extends BoxProps {
6
+ employees: ReadonlyArray<XlpGlobalCalendarEmployee>;
7
+ holidays?: ReadonlyArray<XlpGlobalCalendarHoliday>;
8
+ locale?: string;
9
+ selectedDate?: string;
10
+ onSelectedDateChange?: (isoDate: string) => void;
11
+ legendItems?: ReadonlyArray<XlpGlobalCalendarLegendItem>;
12
+ employeeHeaderLabel?: string;
13
+ employeeColumnWidth?: BoxProps["w"];
14
+ dayCellWidth?: BoxProps["w"];
15
+ showMonthNavigation?: boolean;
16
+ onTheme?: (theme: ThemeContextValue) => void;
17
+ }
18
+ export declare const XlpGlobalCalendarPreview: import("react").ForwardRefExoticComponent<XlpGlobalCalendarPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
19
+ //# sourceMappingURL=XlpGlobalCalendarPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpGlobalCalendarPreview.d.ts","sourceRoot":"","sources":["../../src/components/XlpGlobalCalendarPreview.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2C,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAIzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAKH,KAAK,wBAAwB,EAG7B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAEnC,MAAM,gCAAgC,CAAA;AAEvC,YAAY,EACR,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,GACrB,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,6BAA8B,SAAQ,QAAQ;IAC3D,SAAS,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAA;IACnD,QAAQ,CAAC,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAA;IAClD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,WAAW,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAA;IACxD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,mBAAmB,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAA;IACnC,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAQD,eAAO,MAAM,wBAAwB,0HA8UpC,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { type HeadingProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export type XlpHeadingVariant = "default" | "muted" | "subtle" | "inverted" | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info";
4
+ export interface XlpHeadingProps extends HeadingProps {
5
+ /** Semantic variant that maps to theme token colors. */
6
+ variant?: XlpHeadingVariant;
7
+ /** Convenience alias for fontWeight. */
8
+ weight?: HeadingProps["fontWeight"];
9
+ /**
10
+ * Called after render with the active theme context.
11
+ *
12
+ * @example
13
+ * <XlpHeading onTheme={({ brandId }) => console.log(brandId)}>Title</XlpHeading>
14
+ */
15
+ onTheme?: (theme: ThemeContextValue) => void;
16
+ }
17
+ /**
18
+ * XlpHeading — themed Heading component.
19
+ *
20
+ * Wraps Chakra Heading with XLP token defaults while preserving
21
+ * Chakra's native Heading API.
22
+ */
23
+ export declare const XlpHeading: import("react").ForwardRefExoticComponent<XlpHeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
24
+ //# sourceMappingURL=XlpHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpHeading.d.ts","sourceRoot":"","sources":["../../src/components/XlpHeading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,MAAM,iBAAiB,GACvB,SAAS,GACT,OAAO,GACP,QAAQ,GACR,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,CAAA;AAEZ,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACjD,wDAAwD;IACxD,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAE3B,wCAAwC;IACxC,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,gHA4CtB,CAAA"}