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
@@ -0,0 +1,127 @@
1
+ import { type InputProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ /**
4
+ * Input component recipe.
5
+ *
6
+ * Rules enforced:
7
+ * - Every value references a design token — no hardcoded strings or numbers.
8
+ * - No transition or animation declarations.
9
+ * - No hardcoded boxShadow strings — focus ring uses outline tokens.
10
+ * - No raw "transparent", "0", or "1px" — all via token references.
11
+ * - Sizes reference spacing tokens exclusively.
12
+ */
13
+ export declare const inputRecipe: import("@chakra-ui/react").RecipeDefinition<{
14
+ variant: {
15
+ outline: {
16
+ borderWidth: "{borderWidths.thin}";
17
+ borderStyle: "solid";
18
+ borderColor: "border";
19
+ bg: "bg.panel";
20
+ color: "fg";
21
+ _hover: {
22
+ borderColor: "border";
23
+ };
24
+ _focusVisible: {
25
+ borderColor: "primary.focusRing";
26
+ };
27
+ _invalid: {
28
+ borderColor: "error.border";
29
+ _focusVisible: {
30
+ outlineColor: "error.focusRing";
31
+ borderColor: "error.focusRing";
32
+ };
33
+ };
34
+ };
35
+ subtle: {
36
+ borderWidth: "{borderWidths.thin}";
37
+ borderStyle: "solid";
38
+ borderColor: "transparent";
39
+ bg: "bg.subtle";
40
+ color: "fg";
41
+ _hover: {
42
+ bg: "bg.muted";
43
+ };
44
+ _focusVisible: {
45
+ bg: "bg.panel";
46
+ borderColor: "primary.focusRing";
47
+ };
48
+ _invalid: {
49
+ bg: "error.subtle";
50
+ _focusVisible: {
51
+ outlineColor: "error.focusRing";
52
+ };
53
+ };
54
+ };
55
+ flushed: {
56
+ borderWidth: "{borderWidths.none}";
57
+ borderBottomWidth: "{borderWidths.thin}";
58
+ borderBottomStyle: "solid";
59
+ borderColor: "border";
60
+ borderRadius: "none";
61
+ px: "{spacing.1}";
62
+ bg: "transparent";
63
+ color: "fg";
64
+ _hover: {
65
+ borderColor: "border.emphasized";
66
+ };
67
+ _focusVisible: {
68
+ borderColor: "primary.focusRing";
69
+ outlineWidth: "{borderWidths.none}";
70
+ };
71
+ _invalid: {
72
+ borderColor: "error.border";
73
+ };
74
+ };
75
+ };
76
+ size: {
77
+ sm: {
78
+ fontSize: "sm";
79
+ lineHeight: "short";
80
+ px: "{spacing.4}";
81
+ py: "{spacing.8}";
82
+ minH: "{spacing.8}";
83
+ };
84
+ md: {
85
+ fontSize: "md";
86
+ lineHeight: "normal";
87
+ px: "{spacing.4}";
88
+ py: "{spacing.10}";
89
+ minH: "{spacing.10}";
90
+ };
91
+ lg: {
92
+ fontSize: "lg";
93
+ lineHeight: "normal";
94
+ px: "{spacing.4}";
95
+ py: "{spacing.12}";
96
+ minH: "{spacing.12}";
97
+ };
98
+ };
99
+ }>;
100
+ export interface XlpInputProps extends InputProps {
101
+ /** Optional label rendered above the input field. */
102
+ label?: string;
103
+ /** Input variant: outline, subtle, or flushed. Defaults to "outline". */
104
+ variant?: "outline" | "subtle" | "flushed";
105
+ /** Input size: sm, md, or lg. Defaults to "sm". */
106
+ size?: "sm" | "md" | "lg";
107
+ /**
108
+ * Called after render with the active theme context.
109
+ * Use this in the host app to read active theme tokens
110
+ * without importing the theme package directly.
111
+ *
112
+ * @example
113
+ * <XlpInput onTheme={({ brandId }) => console.log(brandId)} />
114
+ */
115
+ onTheme?: (theme: ThemeContextValue) => void;
116
+ }
117
+ /**
118
+ * XlpInput — themed Input component.
119
+ *
120
+ * Identical API to Chakra's <Input>, with two additions:
121
+ * 1. Attaches `data-xlp-brand` attribute for host-app CSS selectors and testing.
122
+ * 2. Exposes the full theme context via the `onTheme` callback prop.
123
+ * 3. Supports variant (outline, subtle, flushed) and size (sm, md, lg) props
124
+ * that apply the inputRecipe styles.
125
+ */
126
+ export declare const XlpInput: import("react").ForwardRefExoticComponent<XlpInputProps & import("react").RefAttributes<HTMLInputElement>>;
127
+ //# sourceMappingURL=XlpInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpInput.d.ts","sourceRoot":"","sources":["../../src/components/XlpInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuHtB,CAAA;AAEF,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,yEAAyE;IACzE,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;IAE1C,mDAAmD;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAEzB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,4GAkJpB,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { type ButtonProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpMenuItemProps extends Omit<ButtonProps, "children"> {
4
+ /** Main label displayed in the menu row. */
5
+ label: string;
6
+ /** Optional icon rendered before the label. */
7
+ icon?: React.ReactNode;
8
+ /** Optional built-in icon preset rendered before the label. */
9
+ iconName?: "message" | "agent";
10
+ /** Active visual state from router/sidebar selection. */
11
+ active?: boolean;
12
+ /** Optional counter badge shown on the right side. */
13
+ count?: number;
14
+ /** Custom color for the label text. Overrides active/inactive defaults. */
15
+ labelColor?: string;
16
+ /** Custom font size for the label. Defaults to "sm". */
17
+ labelFontSize?: string | number;
18
+ /** Called after render with the active theme context. */
19
+ onTheme?: (theme: ThemeContextValue) => void;
20
+ }
21
+ /**
22
+ * XlpMenuItem — themed sidebar/menu row.
23
+ *
24
+ * Uses XLP semantic tokens to match Figma active/inactive states.
25
+ */
26
+ export declare const XlpMenuItem: import("react").ForwardRefExoticComponent<XlpMenuItemProps & import("react").RefAttributes<HTMLButtonElement>>;
27
+ //# sourceMappingURL=XlpMenuItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpMenuItem.d.ts","sourceRoot":"","sources":["../../src/components/XlpMenuItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAKxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;IACnE,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC9B,yDAAyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,gHAuFvB,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { type PaginationRootProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpPaginationProps extends Omit<PaginationRootProps, "count"> {
4
+ /** Total item count across all pages. */
5
+ totalCount: number;
6
+ /** Called after render with the active theme context. */
7
+ onTheme?: (theme: ThemeContextValue) => void;
8
+ }
9
+ /**
10
+ * XlpPagination — themed pagination control mapped from Figma patterns.
11
+ *
12
+ * Uses semantic tokens only through xlp-ui wrappers/props.
13
+ */
14
+ export declare const XlpPagination: import("react").ForwardRefExoticComponent<XlpPaginationProps & import("react").RefAttributes<HTMLDivElement>>;
15
+ //# sourceMappingURL=XlpPagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpPagination.d.ts","sourceRoot":"","sources":["../../src/components/XlpPagination.tsx"],"names":[],"mappings":"AACA,OAAO,EAIH,KAAK,mBAAmB,EAC3B,MAAM,kBAAkB,CAAA;AAKzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAC1E,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAElB,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,+GA+FzB,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { type RadioGroupRootProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpRadioOption {
4
+ value: string;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface XlpRadioGroupProps extends RadioGroupRootProps {
9
+ /**
10
+ * The radio options to render.
11
+ */
12
+ options: XlpRadioOption[];
13
+ /**
14
+ * Called after render with the active theme context.
15
+ *
16
+ * @example
17
+ * <XlpRadioGroup options={[...]} onTheme={({ brandId }) => console.log(brandId)} />
18
+ */
19
+ onTheme?: (theme: ThemeContextValue) => void;
20
+ }
21
+ /**
22
+ * XlpRadioGroup — themed RadioGroup component.
23
+ *
24
+ * Wraps Chakra UI v3's RadioGroup with:
25
+ * 1. `data-xlp-brand` attribute for host-app CSS selectors and testing.
26
+ * 2. `onTheme` callback prop exposing the full theme context.
27
+ * 3. Typed `options` prop — no raw Radio children needed.
28
+ */
29
+ export declare const XlpRadioGroup: import("react").ForwardRefExoticComponent<XlpRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
30
+ //# sourceMappingURL=XlpRadioGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpRadioGroup.d.ts","sourceRoot":"","sources":["../../src/components/XlpRadioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D;;OAEG;IACH,OAAO,EAAE,cAAc,EAAE,CAAA;IAEzB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC7C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,+GA4BzB,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { type SelectRootProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpSelectOption {
4
+ value: string;
5
+ label: string;
6
+ }
7
+ export interface XlpSelectProps extends Omit<SelectRootProps, "collection" | "children"> {
8
+ /**
9
+ * The options to render inside the select dropdown.
10
+ * Pass an array of `{ value, label }` objects.
11
+ */
12
+ options: XlpSelectOption[];
13
+ /**
14
+ * Placeholder shown when no option is selected.
15
+ */
16
+ placeholder?: string;
17
+ /**
18
+ * Optional label rendered above the select trigger.
19
+ */
20
+ label?: string;
21
+ /**
22
+ * Called after render with the active theme context.
23
+ *
24
+ * @example
25
+ * <XlpSelect options={[...]} onTheme={({ brandId }) => console.log(brandId)} />
26
+ */
27
+ onTheme?: (theme: ThemeContextValue) => void;
28
+ }
29
+ /**
30
+ * XlpSelect — themed Select component.
31
+ *
32
+ * Wraps Chakra UI v3's Select (item-based) with:
33
+ * 1. `data-xlp-brand` attribute for host-app CSS selectors and testing.
34
+ * 2. `onTheme` callback prop exposing the full theme context.
35
+ * 3. Typed `options` prop — no raw children needed.
36
+ */
37
+ export declare const XlpSelect: import("react").ForwardRefExoticComponent<XlpSelectProps & import("react").RefAttributes<HTMLButtonElement>>;
38
+ //# sourceMappingURL=XlpSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpSelect.d.ts","sourceRoot":"","sources":["../../src/components/XlpSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,UAAU,CAAC;IACtF;;;OAGG;IACH,OAAO,EAAE,eAAe,EAAE,CAAA;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC7C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,8GAkGrB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { Switch } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpSwitchProps extends Switch.RootProps {
4
+ /**
5
+ * Optional label text rendered beside the switch.
6
+ */
7
+ label?: string;
8
+ /**
9
+ * Called after render with the active theme context.
10
+ *
11
+ * @example
12
+ * <XlpSwitch label="Enable feature" onTheme={({ brandId }) => console.log(brandId)} />
13
+ */
14
+ onTheme?: (theme: ThemeContextValue) => void;
15
+ }
16
+ /**
17
+ * XlpSwitch — themed Switch (toggle) component.
18
+ *
19
+ * Wraps Chakra UI v3's Switch compound component with:
20
+ * 1. `data-xlp-brand` attribute for host-app CSS selectors and testing.
21
+ * 2. `onTheme` callback prop exposing the full theme context.
22
+ * 3. Optional `label` prop — no need to compose Switch.Label manually.
23
+ *
24
+ * The forwarded ref attaches to the root label element (Switch.Root).
25
+ * To access the hidden input element, use the `inputProps` pattern instead.
26
+ */
27
+ export declare const XlpSwitch: import("react").ForwardRefExoticComponent<XlpSwitchProps & import("react").RefAttributes<HTMLLabelElement>>;
28
+ //# sourceMappingURL=XlpSwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpSwitch.d.ts","sourceRoot":"","sources":["../../src/components/XlpSwitch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,SAAS;IACtD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC7C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,6GAkBrB,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { type ReactNode } from "react";
2
+ import { type TabsRootProps } from "@chakra-ui/react";
3
+ import type { ThemeContextValue } from "../theme/context";
4
+ export interface XlpTabItem {
5
+ value: string;
6
+ label: string;
7
+ icon?: ReactNode;
8
+ content?: ReactNode;
9
+ }
10
+ export interface XlpTabsProps extends Omit<TabsRootProps, "children"> {
11
+ /** Tabs to render in the trigger row and optional content panes. */
12
+ items: XlpTabItem[];
13
+ /** Trigger visual variant: default pill tabs or Figma file-style tabs. */
14
+ triggerVariant?: "default" | "file";
15
+ /** Called after render with the active theme context. */
16
+ onTheme?: (theme: ThemeContextValue) => void;
17
+ }
18
+ /**
19
+ * XlpTabs — themed Tabs component mapped from Figma trigger styling.
20
+ *
21
+ * Wraps Chakra Tabs with token-driven trigger visuals and custom indicator
22
+ * for active tab styling.
23
+ */
24
+ export declare const XlpTabs: import("react").ForwardRefExoticComponent<XlpTabsProps & import("react").RefAttributes<HTMLDivElement>>;
25
+ //# sourceMappingURL=XlpTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpTabs.d.ts","sourceRoot":"","sources":["../../src/components/XlpTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,CAAC,EAAE,SAAS,CAAA;CACtB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC;IACjE,oEAAoE;IACpE,KAAK,EAAE,UAAU,EAAE,CAAA;IAEnB,0EAA0E;IAC1E,cAAc,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAEnC,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,yGA4EnB,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { type BadgeProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpTagProps extends Omit<BadgeProps, "variant"> {
4
+ /**
5
+ * Visual style variant for the tag.
6
+ * - solid: filled brand tag
7
+ * - outline: neutral outlined tag
8
+ * - count: compact numeric pill badge
9
+ */
10
+ variant?: "solid" | "outline" | "count";
11
+ /** Custom background for the count variant. */
12
+ countBg?: BadgeProps["bg"];
13
+ /** Custom text color for the count variant. */
14
+ countColor?: BadgeProps["color"];
15
+ /**
16
+ * Called after render with the active theme context.
17
+ *
18
+ * @example
19
+ * <XlpTag onTheme={({ brandId }) => console.log(brandId)}>Data</XlpTag>
20
+ */
21
+ onTheme?: (theme: ThemeContextValue) => void;
22
+ }
23
+ /**
24
+ * XlpTag — themed Badge/Tag component.
25
+ *
26
+ * Wraps Chakra's Badge with XLP token-based styles and two variants
27
+ * matching the Figma tag style language.
28
+ */
29
+ export declare const XlpTag: import("react").ForwardRefExoticComponent<XlpTagProps & import("react").RefAttributes<HTMLSpanElement>>;
30
+ //# sourceMappingURL=XlpTag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpTag.d.ts","sourceRoot":"","sources":["../../src/components/XlpTag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC;IAC5D;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;IAEvC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IAE1B,+CAA+C;IAC/C,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAEhC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,yGA2DlB,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { type TextareaProps } from "@chakra-ui/react";
2
+ import type { ThemeContextValue } from "../theme/context";
3
+ export interface XlpTextareaProps extends TextareaProps {
4
+ /** Optional label rendered above the textarea field. */
5
+ label?: string;
6
+ /**
7
+ * Called after render with the active theme context.
8
+ *
9
+ * @example
10
+ * <XlpTextarea onTheme={({ brandId }) => console.log(brandId)} />
11
+ */
12
+ onTheme?: (theme: ThemeContextValue) => void;
13
+ }
14
+ /**
15
+ * XlpTextarea — themed Textarea component.
16
+ *
17
+ * Identical API to Chakra's <Textarea>, with:
18
+ * 1. `data-xlp-brand` attribute for host-app CSS selectors and testing.
19
+ * 2. `onTheme` callback prop exposing the full theme context.
20
+ */
21
+ export declare const XlpTextarea: import("react").ForwardRefExoticComponent<XlpTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
22
+ //# sourceMappingURL=XlpTextarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XlpTextarea.d.ts","sourceRoot":"","sources":["../../src/components/XlpTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;CAC7C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,kHAuDvB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { XlpCalendar } from "./XlpCalendar";
2
+ export type { XlpCalendarProps, SelectionMode } from "./XlpCalendar";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const toaster: import("@zag-js/toast").Store<any>;
2
+ export declare function AppToaster(): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=toaster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toaster.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,oCAGlB,CAAA;AAEF,wBAAgB,UAAU,4CAqBzB"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`react`),t=require(`@tanstack/react-query`),n=require(`@chakra-ui/react`),r=require(`react/jsx-runtime`);var i=(0,n.createToaster)({placement:`bottom-end`,pauseOnPageIdle:!0});function a(){return(0,r.jsx)(n.Portal,{children:(0,r.jsx)(n.Toaster,{toaster:i,children:e=>{let t=e.meta??{};return(0,r.jsxs)(n.Toast.Root,{w:t.width,maxW:t.width??`sm`,children:[(0,r.jsx)(n.Toast.Indicator,{}),(0,r.jsxs)(n.Stack,{gap:`1`,flex:`1`,maxW:`100%`,children:[e.title?(0,r.jsx)(n.Toast.Title,{children:e.title}):null,e.description?(0,r.jsx)(n.Toast.Description,{children:e.description}):null]}),(0,r.jsx)(n.Toast.CloseTrigger,{})]})}})})}function o(e){return{colors:{primary:{solid:{value:`{colors.primary.500}`},contrast:{value:`{colors.primary.50}`},fg:{value:{_light:`{colors.primary.700}`,_dark:`{colors.primary.300}`}},muted:{value:{_light:`{colors.primary.100}`,_dark:`{colors.primary.900}`}},subtle:{value:{_light:`{colors.primary.50}`,_dark:`{colors.primary.950}`}},emphasized:{value:{_light:`{colors.primary.200}`,_dark:`{colors.primary.800}`}},focusRing:{value:`{colors.primary.500}`},border:{value:{_light:`{colors.primary.200}`,_dark:`{colors.primary.800}`}}},secondary:{solid:{value:`{colors.secondary.500}`},contrast:{value:`{colors.secondary.50}`},fg:{value:{_light:`{colors.secondary.700}`,_dark:`{colors.secondary.300}`}},muted:{value:{_light:`{colors.secondary.100}`,_dark:`{colors.secondary.900}`}},subtle:{value:{_light:`{colors.secondary.50}`,_dark:`{colors.secondary.950}`}},emphasized:{value:{_light:`{colors.secondary.200}`,_dark:`{colors.secondary.800}`}},focusRing:{value:`{colors.secondary.500}`},border:{value:{_light:`{colors.secondary.200}`,_dark:`{colors.secondary.800}`}}},accent:{solid:{value:`{colors.accent.500}`},contrast:{value:`{colors.accent.50}`},fg:{value:{_light:`{colors.accent.700}`,_dark:`{colors.accent.300}`}},muted:{value:{_light:`{colors.accent.100}`,_dark:`{colors.accent.900}`}},subtle:{value:{_light:`{colors.accent.50}`,_dark:`{colors.accent.950}`}},emphasized:{value:{_light:`{colors.accent.200}`,_dark:`{colors.accent.800}`}},focusRing:{value:`{colors.accent.500}`},border:{value:{_light:`{colors.accent.200}`,_dark:`{colors.accent.800}`}}},success:{solid:{value:`{colors.success.500}`},contrast:{value:`{colors.success.50}`},fg:{value:{_light:`{colors.success.700}`,_dark:`{colors.success.300}`}},muted:{value:{_light:`{colors.success.100}`,_dark:`{colors.success.900}`}},subtle:{value:{_light:`{colors.success.50}`,_dark:`{colors.success.950}`}},emphasized:{value:{_light:`{colors.success.200}`,_dark:`{colors.success.800}`}},focusRing:{value:`{colors.success.500}`},border:{value:{_light:`{colors.success.200}`,_dark:`{colors.success.800}`}}},warning:{solid:{value:`{colors.warning.500}`},contrast:{value:`{colors.warning.50}`},fg:{value:{_light:`{colors.warning.700}`,_dark:`{colors.warning.300}`}},muted:{value:{_light:`{colors.warning.100}`,_dark:`{colors.warning.900}`}},subtle:{value:{_light:`{colors.warning.50}`,_dark:`{colors.warning.950}`}},emphasized:{value:{_light:`{colors.warning.200}`,_dark:`{colors.warning.800}`}},focusRing:{value:`{colors.warning.500}`},border:{value:{_light:`{colors.warning.200}`,_dark:`{colors.warning.800}`}}},error:{solid:{value:`{colors.error.500}`},contrast:{value:`{colors.error.50}`},fg:{value:{_light:`{colors.error.700}`,_dark:`{colors.error.300}`}},muted:{value:{_light:`{colors.error.100}`,_dark:`{colors.error.900}`}},subtle:{value:{_light:`{colors.error.50}`,_dark:`{colors.error.950}`}},emphasized:{value:{_light:`{colors.error.200}`,_dark:`{colors.error.800}`}},focusRing:{value:`{colors.error.500}`},border:{value:{_light:`{colors.error.200}`,_dark:`{colors.error.800}`}}},info:{solid:{value:`{colors.info.500}`},contrast:{value:`{colors.info.50}`},fg:{value:{_light:`{colors.info.700}`,_dark:`{colors.info.300}`}},muted:{value:{_light:`{colors.info.100}`,_dark:`{colors.info.900}`}},subtle:{value:{_light:`{colors.info.50}`,_dark:`{colors.info.950}`}},emphasized:{value:{_light:`{colors.info.200}`,_dark:`{colors.info.800}`}},focusRing:{value:`{colors.info.500}`},border:{value:{_light:`{colors.info.200}`,_dark:`{colors.info.800}`}}},bg:{DEFAULT:{value:{_light:`{colors.neutral.50}`,_dark:`{colors.neutral.900}`}},subtle:{value:{_light:`{colors.neutral.100}`,_dark:`{colors.neutral.800}`}},muted:{value:{_light:`{colors.neutral.200}`,_dark:`{colors.neutral.700}`}},emphasized:{value:{_light:`{colors.neutral.300}`,_dark:`{colors.neutral.600}`}},inverted:{value:{_light:`{colors.neutral.900}`,_dark:`{colors.neutral.50}`}},panel:{value:{_light:`#ffffff`,_dark:`{colors.neutral.800}`}},pulse:{value:{_light:`{colors.primary.100}`,_dark:`{colors.primary.900}`}}},fg:{DEFAULT:{value:{_light:`{colors.neutral.900}`,_dark:`{colors.neutral.50}`}},muted:{value:{_light:`{colors.neutral.600}`,_dark:`{colors.neutral.400}`}},subtle:{value:{_light:`{colors.neutral.400}`,_dark:`{colors.neutral.500}`}},inverted:{value:{_light:`{colors.neutral.50}`,_dark:`{colors.neutral.900}`}}},border:{DEFAULT:{value:{_light:`{colors.neutral.200}`,_dark:`{colors.neutral.700}`}},muted:{value:{_light:`{colors.neutral.100}`,_dark:`{colors.neutral.800}`}},subtle:{value:{_light:`{colors.neutral.50}`,_dark:`{colors.neutral.900}`}},emphasized:{value:{_light:`{colors.neutral.300}`,_dark:`{colors.neutral.600}`}}}}}}function s(e){return{fonts:{heading:{value:e.typography.fonts.heading},body:{value:e.typography.fonts.body},mono:{value:e.typography.fonts.mono}},fontSizes:{xs:{value:e.typography.fontSizes.xs},sm:{value:e.typography.fontSizes.sm},md:{value:e.typography.fontSizes.md},lg:{value:e.typography.fontSizes.lg},xl:{value:e.typography.fontSizes.xl},"2xl":{value:e.typography.fontSizes[`2xl`]},"3xl":{value:e.typography.fontSizes[`3xl`]},"4xl":{value:e.typography.fontSizes[`4xl`]},"5xl":{value:e.typography.fontSizes[`5xl`]}},fontWeights:{thin:{value:e.typography.fontWeights.thin},extralight:{value:e.typography.fontWeights.extralight},light:{value:e.typography.fontWeights.light},normal:{value:e.typography.fontWeights.normal},medium:{value:e.typography.fontWeights.medium},semibold:{value:e.typography.fontWeights.semibold},bold:{value:e.typography.fontWeights.bold},extrabold:{value:e.typography.fontWeights.extrabold},black:{value:e.typography.fontWeights.black}},lineHeights:{shorter:{value:e.typography.lineHeights.shorter},short:{value:e.typography.lineHeights.short},moderate:{value:e.typography.lineHeights.moderate},tall:{value:e.typography.lineHeights.tall},taller:{value:e.typography.lineHeights.taller},tight:{value:e.typography.lineHeights.tight},normal:{value:e.typography.lineHeights.normal},relaxed:{value:e.typography.lineHeights.relaxed}},letterSpacings:{tighter:{value:e.typography.letterSpacings.tighter},tight:{value:e.typography.letterSpacings.tight},wide:{value:e.typography.letterSpacings.wide},wider:{value:e.typography.letterSpacings.wider},widest:{value:e.typography.letterSpacings.widest}}}}function c(e){return{spacing:{1:{value:e.spacing[1]},2:{value:e.spacing[2]},3:{value:e.spacing[3]},4:{value:e.spacing[4]},5:{value:e.spacing[5]},6:{value:e.spacing[6]},8:{value:e.spacing[8]},10:{value:e.spacing[10]},12:{value:e.spacing[12]},16:{value:e.spacing[16]},20:{value:e.spacing[20]},24:{value:e.spacing[24]},28:{value:e.spacing[28]},32:{value:e.spacing[32]},36:{value:e.spacing[36]},xs:{value:e.spacing.xs},sm:{value:e.spacing.sm},md:{value:e.spacing.md},lg:{value:e.spacing.lg},xl:{value:e.spacing.xl},"2xl":{value:e.spacing[`2xl`]},"3xl":{value:e.spacing[`3xl`]},"4xl":{value:e.spacing[`4xl`]}},borderWidths:{none:{value:e.borders.widths.none},thin:{value:e.borders.widths.thin},base:{value:e.borders.widths.base},thick:{value:e.borders.widths.thick},heavy:{value:e.borders.widths.heavy}},borders:{none:{value:`${e.borders.widths.none} ${e.borders.styles.solid} transparent`},thin:{value:`${e.borders.widths.thin} ${e.borders.styles.solid} currentColor`},base:{value:`${e.borders.widths.base} ${e.borders.styles.solid} currentColor`},thick:{value:`${e.borders.widths.thick} ${e.borders.styles.solid} currentColor`},dashed:{value:`${e.borders.widths.thin} ${e.borders.styles.dashed} currentColor`},dotted:{value:`${e.borders.widths.thin} ${e.borders.styles.dotted} currentColor`}},radii:{none:{value:e.radii.none},sm:{value:e.radii.sm},md:{value:e.radii.md},lg:{value:e.radii.lg},xl:{value:e.radii.xl},full:{value:e.radii.full}},shadows:{xs:{value:e.shadows.xs},sm:{value:e.shadows.sm},md:{value:e.shadows.md},lg:{value:e.shadows.lg},xl:{value:e.shadows.xl}},durations:{instant:{value:e.motion.durations.instant},fast:{value:e.motion.durations.fast},normal:{value:e.motion.durations.normal},slow:{value:e.motion.durations.slow},slower:{value:e.motion.durations.slower}},easings:{ease:{value:e.motion.easings.ease},easeIn:{value:e.motion.easings.easeIn},easeOut:{value:e.motion.easings.easeOut},easeInOut:{value:e.motion.easings.easeInOut},spring:{value:e.motion.easings.spring}},opacity:{none:{value:e.opacity.none},disabled:{value:e.opacity.disabled},hover:{value:e.opacity.hover},muted:{value:e.opacity.muted},full:{value:e.opacity.full}}}}function l(e){let t={};for(let[n,r]of Object.entries(e)){t[n]={};for(let[e,i]of Object.entries(r))t[n][e]={value:i}}return t}function u(e){let t=s(e),n=c(e),r=o(e);return{brandTokens:e,tokens:{colors:l(e.colors),fonts:t.fonts,fontSizes:t.fontSizes,fontWeights:t.fontWeights,lineHeights:t.lineHeights,letterSpacings:t.letterSpacings,spacing:n.spacing,borderWidths:n.borderWidths,borders:n.borders,radii:n.radii,shadows:n.shadows,durations:n.durations,easings:n.easings,opacity:n.opacity},semanticTokens:{colors:r.colors}}}function d(e){let t=u(e);return(0,n.createSystem)(n.defaultConfig,(0,n.defineConfig)({globalCss:{"html, body":{fontFamily:`body`},h1:{fontFamily:`heading`},h2:{fontFamily:`heading`},h3:{fontFamily:`heading`},h4:{fontFamily:`heading`},h5:{fontFamily:`heading`},h6:{fontFamily:`heading`},"button, input, textarea, select":{fontFamily:`inherit`}},theme:{tokens:{colors:t.tokens.colors,fonts:t.tokens.fonts,fontSizes:t.tokens.fontSizes,fontWeights:t.tokens.fontWeights,lineHeights:t.tokens.lineHeights,spacing:t.tokens.spacing,borderWidths:t.tokens.borderWidths,borders:t.tokens.borders,radii:t.tokens.radii,shadows:t.tokens.shadows,durations:t.tokens.durations,easings:t.tokens.easings,opacity:t.tokens.opacity},semanticTokens:{colors:t.semanticTokens.colors}}}))}var f={colors:{primary:{50:`#f0f0ff`,100:`#e0e1fe`,200:`#c2c3fd`,300:`#9496fb`,400:`#6568f8`,500:`#3a3df5`,600:`#2020ce`,700:`#121271`,800:`#0d0d52`,900:`#080836`,950:`#040420`},secondary:{50:`#f0eeff`,100:`#e2dcff`,200:`#c6b9ff`,300:`#a996ff`,400:`#8c73ff`,500:`#5b45ff`,600:`#4430e0`,700:`#3320b8`,800:`#221490`,900:`#150d6a`,950:`#0b0840`},accent:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0c5c72`,800:`#134152`,900:`#072a38`,950:`#051b24`},neutral:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#111111`},success:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#116932`,800:`#124a28`,900:`#042713`,950:`#03190c`},warning:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#92310a`,800:`#6c2710`,900:`#3b1106`,950:`#220a04`},error:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#991919`,800:`#511111`,900:`#300c0c`,950:`#1f0808`},info:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#a3cfff`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#173da6`,800:`#1a3478`,900:`#14204a`,950:`#0c142e`}},typography:{fonts:{heading:`'Plus Jakarta Sans', sans-serif`,body:`'Plus Jakarta Sans', sans-serif`,mono:`'Plus Jakarta Sans', sans-serif`},fontSizes:{xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`},fontWeights:{thin:`100`,extralight:`200`,light:`300`,normal:`400`,medium:`500`,semibold:`600`,bold:`700`,extrabold:`800`,black:`900`},lineHeights:{shorter:`1.125`,short:`1.375`,moderate:`1.5`,tall:`1.625`,taller:`2`,tight:`1.125`,normal:`1.5`,relaxed:`1.625`},letterSpacings:{tighter:`-0.05em`,tight:`-0.025em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`}},spacing:{1:`0.25rem`,2:`0.5rem`,3:`0.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,8:`2rem`,10:`2.5rem`,12:`3rem`,16:`4rem`,20:`5rem`,24:`6rem`,28:`7rem`,32:`8rem`,36:`9rem`,xs:`0.25rem`,sm:`0.5rem`,md:`1rem`,lg:`1.5rem`,xl:`2rem`,"2xl":`3rem`,"3xl":`4rem`,"4xl":`6rem`},borders:{widths:{none:`0px`,thin:`1px`,base:`2px`,thick:`4px`,heavy:`8px`},styles:{solid:`solid`,dashed:`dashed`,dotted:`dotted`}},radii:{none:`0`,"2xs":`0.0625rem`,xs:`0.125rem`,sm:`0.25rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,"4xl":`2rem`,full:`9999px`},shadows:{xs:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,sm:`0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`},motion:{durations:{instant:`0ms`,fast:`100ms`,normal:`200ms`,slow:`300ms`,slower:`500ms`},easings:{ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,spring:`cubic-bezier(0.34, 1.56, 0.64, 1)`}},opacity:{none:`0`,disabled:`0.5`,hover:`0.88`,muted:`0.72`,full:`1`}},p={colors:f.colors,typography:{fonts:{heading:`'Plus Jakarta Sans', sans-serif`,body:`'Plus Jakarta Sans', sans-serif`,mono:`'JetBrains Mono', monospace`},fontSizes:{xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`,"5xl":`3rem`},fontWeights:{thin:`100`,extralight:`200`,light:`300`,normal:`400`,medium:`500`,semibold:`600`,bold:`700`,extrabold:`800`,black:`900`},lineHeights:{shorter:`1.125`,short:`1.375`,moderate:`1.5`,tall:`1.625`,taller:`2`,tight:`1.125`,normal:`1.5`,relaxed:`1.625`},letterSpacings:{tighter:`-0.05em`,tight:`-0.025em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`}},spacing:{1:`0.625rem`,2:`0.875rem`,3:`1.125rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,8:`2rem`,10:`2.5rem`,12:`3rem`,16:`4rem`,20:`5rem`,24:`6rem`,28:`7rem`,32:`8rem`,36:`9rem`,xs:`0.625rem`,sm:`0.875rem`,md:`1rem`,lg:`1.5rem`,xl:`2rem`,"2xl":`3rem`,"3xl":`4rem`,"4xl":`6rem`},borders:{widths:{none:`0px`,thin:`0.5px`,base:`1px`,thick:`2px`,heavy:`4px`},styles:f.borders.styles},radii:{none:`0px`,"2xs":`0.0625rem`,xs:`0.125rem`,sm:`0.25rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,"4xl":`2rem`,full:`9999px`},shadows:f.shadows,motion:f.motion,opacity:f.opacity},m={...f,colors:{...f.colors,primary:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#a3cfff`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#173da6`,800:`#1a3478`,900:`#14204a`,950:`#0c142e`},accent:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0c5c72`,800:`#134152`,900:`#072a38`,950:`#051b24`}},typography:{...f.typography,fonts:{heading:`'SFMono', sans-serif`,body:`'SFMono', sans-serif`,mono:`'SFMono', sans-serif`}},radii:{none:`0`,"2xs":`0.0625rem`,xs:`0.125rem`,sm:`0.25rem`,md:`0.375rem`,lg:`0.5rem`,xl:`0.75rem`,"2xl":`1rem`,"3xl":`1.5rem`,"4xl":`2rem`,full:`9999px`}},h=new Map([[`default`,f],[`xlp`,p],[`meridian`,m]]);function g(e,t){h.set(e,t)}function _(e){return h.get(e)??f}function v(){return Array.from(h.keys())}var y=(0,e.createContext)(null);function b(){let t=(0,e.useContext)(y);if(!t)throw Error(`[XLP-UI] useTheme() must be used inside <AppThemeProvider>. Wrap your app or microfrontend with <AppThemeProvider brandId="...">.`);return t}var x=(0,e.createContext)(null);function S(){let t=(0,e.useContext)(x);if(!t)throw Error(`[XLP-UI] useThemeSwitcher() must be used inside <MultiThemeProvider>. Replace <AppThemeProvider> with <MultiThemeProvider defaultBrandId="xlp">.`);return t}function C({children:t,brandId:i=`default`,tokenOverrides:o,withToaster:s=!0}){let c=(0,e.useMemo)(()=>{let e=_(i);return o?w(e,o):e},[i,o]),l=(0,e.useMemo)(()=>d(c),[c]),u=(0,e.useMemo)(()=>({brandId:i,tokens:c}),[i,c]);return(0,r.jsx)(y.Provider,{value:u,children:(0,r.jsxs)(n.ChakraProvider,{value:l,children:[t,s?(0,r.jsx)(a,{}):null]})})}function w(e,t){let n={...e};for(let r in t){let i=t[r],a=e[r];typeof i==`object`&&i&&!Array.isArray(i)&&typeof a==`object`&&a?n[r]=T(a,i):i!==void 0&&(n[r]=i)}return n}function T(e,t){let n={...e};for(let r in t){let i=t[r],a=e[r];typeof i==`object`&&i&&!Array.isArray(i)&&typeof a==`object`&&a&&!Array.isArray(a)?n[r]=T(a,i):i!==void 0&&(n[r]=i)}return n}function E({children:t,defaultBrandId:i=`xlp`,tokenOverrides:o,withToaster:s=!0}){let[c,l]=(0,e.useState)(i),u=(0,e.useMemo)(()=>{let e=_(c);return o?w(e,o):e},[c,o]),f=(0,e.useMemo)(()=>d(u),[u]),p=(0,e.useMemo)(()=>({brandId:c,tokens:u}),[c,u]),m=(0,e.useMemo)(()=>({brandId:c,setBrandId:l,brands:v()}),[c]);return(0,r.jsx)(x.Provider,{value:m,children:(0,r.jsx)(y.Provider,{value:p,children:(0,r.jsxs)(n.ChakraProvider,{value:f,children:[t,s?(0,r.jsx)(a,{}):null]})})})}function D(){return new t.QueryClient({defaultOptions:{queries:{staleTime:1e3*60*2,retry:1,refetchOnWindowFocus:!1}}})}function O({children:n,queryClient:i,brandId:a,tokenOverrides:o}){return(0,r.jsx)(t.QueryClientProvider,{client:(0,e.useMemo)(()=>i??D(),[i]),children:(0,r.jsx)(C,{brandId:a,tokenOverrides:o,children:n})})}var k=(0,e.forwardRef)(({onTheme:e,onClick:t,children:i,label:a,variant:o=`solid`,size:s=`sm`,startIcon:c,endIcon:l,startIconProps:u,endIconProps:d,iconColor:f,iconSize:p,isLoading:m=!1,loadingText:h,fullWidth:g=!1,isDisabled:_=!1,ariaLabel:v,isIconOnly:y=!1,disabled:x,...S},C)=>{let w=b();e&&e(w);let T={solid:{bg:`secondary.solid`,color:`fg.inverted`,borderWidth:`{borderWidths.none}`,_hover:{opacity:`{opacity.hover}`},_active:{opacity:`{opacity.muted}`},_focusVisible:{outlineColor:`secondary.focusRing`}},outline:{bg:`bg.panel`,color:`primary.700`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,boxShadow:`inset 0 0 0 {borderWidths.thin} var(--chakra-colors-border)`,_hover:{bg:`bg.subtle`},_active:{bg:`bg.muted`,borderColor:`border.emphasized`}},ghost:{bg:`transparent`,color:`primary.700`,borderWidth:`{borderWidths.none}`,_hover:{bg:`bg.subtle`},_active:{bg:`bg.muted`}},subtle:{bg:`bg.subtle`,color:`primary.700`,borderWidth:`{borderWidths.none}`,_hover:{bg:`bg.muted`},_active:{bg:`bg.emphasized`}},control:{bg:`bg.subtle`,color:`fg`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,_hover:{bg:`bg.muted`,borderColor:`border.emphasized`},_active:{bg:`bg.emphasized`}}},E={sm:{minW:`{spacing.8}`,h:`{spacing.8}`,px:`{spacing.3}`,py:`{spacing.2}`,fontSize:`xs`,fontWeight:`medium`,lineHeight:`shorter`,borderRadius:`full`},md:{minW:`{spacing.10}`,h:`{spacing.10}`,px:`{spacing.3}`,py:`{spacing.2}`,fontSize:`sm`,fontWeight:`medium`,lineHeight:`short`,borderRadius:`full`},lg:{minW:`{spacing.12}`,h:`{spacing.12}`,px:`{spacing.4}`,py:`{spacing.2}`,fontSize:`md`,fontWeight:`medium`,lineHeight:`moderate`,borderRadius:`full`}},D=y?{sm:{minW:`{spacing.8}`,w:`{spacing.8}`,h:`{spacing.8}`,px:0,py:0,p:0},md:{minW:`{spacing.10}`,w:`{spacing.10}`,h:`{spacing.10}`,px:0,py:0,p:0},lg:{minW:`{spacing.12}`,w:`{spacing.12}`,h:`{spacing.12}`,px:0,py:0,p:0}}:null,O=_||x||m,k=m?(0,r.jsxs)(n.Box,{display:`inline-flex`,alignItems:`center`,gap:`{spacing.1}`,children:[(0,r.jsx)(n.Spinner,{size:`sm`}),h&&(0,r.jsx)(n.Box,{as:`span`,children:h})]}):(0,r.jsxs)(r.Fragment,{children:[c?(0,r.jsx)(n.Box,{as:`span`,"aria-hidden":`true`,display:`inline-flex`,flexShrink:0,lineHeight:0,w:p,h:p,color:f,...u,children:c}):null,a||i,l?(0,r.jsx)(n.Box,{as:`span`,"aria-hidden":`true`,display:`inline-flex`,flexShrink:0,lineHeight:0,w:p,h:p,color:f,...d,children:l}):null]});return(0,r.jsx)(n.Button,{ref:C,onClick:t,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,userSelect:`none`,flexShrink:`0`,fontFamily:`body`,borderRadius:`full`,gap:y?0:`{spacing.1}`,width:g?`full`:void 0,disabled:O,"aria-label":v,"aria-busy":m,_focusVisible:{outlineWidth:`{borderWidths.base}`,outlineStyle:`solid`,outlineColor:`primary.focusRing`,outlineOffset:`{borderWidths.base}`},_disabled:{opacity:`{opacity.disabled}`,cursor:`not-allowed`,pointerEvents:`none`},...T[o],...E[s],...D?D[s]:{},variant:o===`control`?`ghost`:o,...S,children:k})});k.displayName=`XlpButton`,(0,n.defineRecipe)({className:`xlp-input`,base:{bg:`bg.panel`,width:`full`,minWidth:`{spacing.1}`,position:`relative`,appearance:`none`,fontFamily:`body`,borderRadius:`3xl`,_placeholder:{color:`fg.muted`},_disabled:{opacity:`{opacity.disabled}`,cursor:`not-allowed`,pointerEvents:`none`},_focusVisible:{outlineWidth:`{borderWidths.base}`,outlineStyle:`solid`,outlineColor:`primary.focusRing`,outlineOffset:`{borderWidths.thin}`}},variants:{variant:{outline:{borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,bg:`bg.panel`,color:`fg`,_hover:{borderColor:`border`},_focusVisible:{borderColor:`primary.focusRing`},_invalid:{borderColor:`error.border`,_focusVisible:{outlineColor:`error.focusRing`,borderColor:`error.focusRing`}}},subtle:{borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`transparent`,bg:`bg.subtle`,color:`fg`,_hover:{bg:`bg.muted`},_focusVisible:{bg:`bg.panel`,borderColor:`primary.focusRing`},_invalid:{bg:`error.subtle`,_focusVisible:{outlineColor:`error.focusRing`}}},flushed:{borderWidth:`{borderWidths.none}`,borderBottomWidth:`{borderWidths.thin}`,borderBottomStyle:`solid`,borderColor:`border`,borderRadius:`none`,px:`{spacing.1}`,bg:`transparent`,color:`fg`,_hover:{borderColor:`border.emphasized`},_focusVisible:{borderColor:`primary.focusRing`,outlineWidth:`{borderWidths.none}`},_invalid:{borderColor:`error.border`}}},size:{sm:{fontSize:`sm`,lineHeight:`short`,px:`{spacing.4}`,py:`{spacing.8}`,minH:`{spacing.8}`},md:{fontSize:`md`,lineHeight:`normal`,px:`{spacing.4}`,py:`{spacing.10}`,minH:`{spacing.10}`},lg:{fontSize:`lg`,lineHeight:`normal`,px:`{spacing.4}`,py:`{spacing.12}`,minH:`{spacing.12}`}}},defaultVariants:{variant:`outline`,size:`sm`}});var A=(0,e.forwardRef)(({onTheme:t,label:i,id:a,variant:o=`outline`,size:s=`sm`,...c},l)=>{let u=b(),d=(0,e.useId)(),f=a??d;t&&t(u);let p={outline:{borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,bg:`bg.panel`,color:`fg`,_hover:{borderColor:`border`},_focusVisible:{borderColor:`primary.focusRing`},_invalid:{borderColor:`error.border`,_focusVisible:{outlineColor:`error.focusRing`,borderColor:`error.focusRing`}}},subtle:{borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`transparent`,bg:`bg.subtle`,color:`fg`,_hover:{bg:`bg.muted`},_focusVisible:{bg:`bg.panel`,borderColor:`primary.focusRing`},_invalid:{bg:`error.subtle`,_focusVisible:{outlineColor:`error.focusRing`}}},flushed:{borderWidth:`{borderWidths.none}`,borderBottomWidth:`{borderWidths.thin}`,borderBottomStyle:`solid`,borderColor:`border`,borderRadius:`full`,px:`{spacing.1}`,bg:`transparent`,color:`fg`,_hover:{borderColor:`border.emphasized`},_focusVisible:{borderColor:`primary.focusRing`,outlineWidth:`{borderWidths.none}`},_invalid:{borderColor:`error.border`}}},m={sm:{fontSize:`sm`,lineHeight:`short`,px:`{spacing.4}`,py:`{spacing.2}`,minH:`{spacing.4}`},md:{fontSize:`md`,lineHeight:`normal`,px:`{spacing.4}`,py:`{spacing.6}`,minH:`{spacing.6}`},lg:{fontSize:`lg`,lineHeight:`normal`,px:`{spacing.4}`,py:`{spacing.8}`,minH:`{spacing.8}`}};return(0,r.jsxs)(n.Box,{display:`flex`,flexDirection:`column`,gap:`{spacing.1}`,children:[i?(0,r.jsx)(n.Box,{as:`label`,fontFamily:`body`,fontSize:`sm`,fontWeight:`medium`,lineHeight:`moderate`,color:`secondary.500`,children:i}):null,(0,r.jsx)(n.Input,{ref:l,id:f,"aria-label":c[`aria-label`]??i,"data-xlp-brand":u.brandId,width:`full`,minWidth:`{spacing.1}`,position:`relative`,appearance:`none`,fontFamily:`body`,borderRadius:`full`,_placeholder:{color:`fg.muted`},_disabled:{opacity:`{opacity.disabled}`,cursor:`not-allowed`,pointerEvents:`none`},_focusVisible:{outlineWidth:`{borderWidths.base}`,outlineStyle:`solid`,outlineColor:`primary.focusRing`,outlineOffset:`{borderWidths.thin}`},...p[o],...m[s],...c})]})});A.displayName=`XlpInput`;var j=(0,e.forwardRef)(({onTheme:t,label:i,id:a,...o},s)=>{let c=b(),l=(0,e.useId)(),u=a??l;return t&&t(c),(0,r.jsxs)(n.Box,{display:`flex`,flexDirection:`column`,gap:`{spacing.0.5}`,children:[i?(0,r.jsx)(n.Box,{as:`label`,fontFamily:`body`,fontSize:`sm`,fontWeight:`medium`,lineHeight:`moderate`,color:`secondary.500`,children:i}):null,(0,r.jsx)(n.Textarea,{ref:s,id:u,"aria-label":o[`aria-label`]??i,"data-xlp-brand":c.brandId,bg:`bg.panel`,color:`fg`,borderWidth:`{borderWidths.base}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`{spacing.4}`,minH:`{spacing.24}`,px:`{spacing.2}`,py:`{spacing.2}`,fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,lineHeight:`moderate`,resize:`vertical`,_placeholder:{color:`fg.muted`},_hover:{borderColor:`border`},_focusVisible:{borderColor:`primary.focusRing`,outlineWidth:0},...o})]})});j.displayName=`XlpTextarea`;var M=(0,e.forwardRef)(({onTheme:t,options:i,placeholder:a,label:o,...s},c)=>{let l=b(),u=(0,e.useMemo)(()=>(0,n.createListCollection)({items:i}),[i]);return t&&t(l),(0,r.jsxs)(n.Select.Root,{collection:u,"data-xlp-brand":l.brandId,...s,children:[o?(0,r.jsx)(n.Select.Label,{as:`label`,fontFamily:`body`,fontSize:`sm`,fontWeight:`medium`,lineHeight:`moderate`,color:`secondary.500`,children:o}):null,(0,r.jsx)(n.Select.HiddenSelect,{}),(0,r.jsxs)(n.Select.Control,{children:[(0,r.jsx)(n.Select.Trigger,{ref:c,bg:`bg.panel`,color:`fg`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`full`,minH:`{spacing.9}`,px:`{spacing.4}`,py:`{borderWidths.thick}`,fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,lineHeight:`short`,_hover:{borderColor:`border`},_focusVisible:{borderColor:`primary.focusRing`,outlineWidth:`{borderWidths.base}`,outlineStyle:`solid`,outlineColor:`primary.focusRing`,outlineOffset:`{borderWidths.thin}`},children:(0,r.jsx)(n.Select.ValueText,{color:`fg.muted`,placeholder:a??`Select`})}),(0,r.jsx)(n.Select.IndicatorGroup,{children:(0,r.jsx)(n.Select.Indicator,{})})]}),(0,r.jsx)(n.Portal,{children:(0,r.jsx)(n.Select.Positioner,{children:(0,r.jsx)(n.Select.Content,{bg:`bg.panel`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`md`,py:`{borderWidths.heavy}`,children:u.items.map(e=>(0,r.jsxs)(n.Select.Item,{item:e,px:`{spacing.2}`,py:`{borderWidths.heavy}`,fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,lineHeight:`short`,color:`fg`,_highlighted:{bg:`bg.subtle`},children:[e.label,(0,r.jsx)(n.Select.ItemIndicator,{})]},e.value))})})})]})});M.displayName=`XlpSelect`;var N=(0,e.forwardRef)(({onTheme:e,label:t,...i},a)=>{let o=b();return e&&e(o),(0,r.jsxs)(n.Switch.Root,{ref:a,"data-xlp-brand":o.brandId,...i,children:[(0,r.jsx)(n.Switch.HiddenInput,{}),(0,r.jsx)(n.Switch.Control,{children:(0,r.jsx)(n.Switch.Thumb,{})}),t&&(0,r.jsx)(n.Switch.Label,{children:t})]})});N.displayName=`XlpSwitch`;var P=(0,e.forwardRef)(({onTheme:e,options:t,...i},a)=>{let o=b();return e&&e(o),(0,r.jsx)(n.RadioGroup.Root,{ref:a,"data-xlp-brand":o.brandId,...i,children:t.map(e=>(0,r.jsxs)(n.RadioGroup.Item,{value:e.value,disabled:e.disabled,children:[(0,r.jsx)(n.RadioGroup.ItemHiddenInput,{}),(0,r.jsx)(n.RadioGroup.ItemIndicator,{}),(0,r.jsx)(n.RadioGroup.ItemText,{children:e.label})]},e.value))})});P.displayName=`XlpRadioGroup`;var F=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ee=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),te=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ne=e=>{let t=te(e);return t.charAt(0).toUpperCase()+t.slice(1)},I={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},re=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ie=(0,e.createContext)({}),ae=()=>(0,e.useContext)(ie),oe=(0,e.forwardRef)(({color:t,size:n,strokeWidth:r,absoluteStrokeWidth:i,className:a=``,children:o,iconNode:s,...c},l)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=ae()??{},h=i??f?Number(r??d)*24/Number(n??u):r??d;return(0,e.createElement)(`svg`,{ref:l,...I,width:n??u??I.width,height:n??u??I.height,stroke:t??p,strokeWidth:h,className:F(`lucide`,m,a),...!o&&!re(c)&&{"aria-hidden":`true`},...c},[...s.map(([t,n])=>(0,e.createElement)(t,n)),...Array.isArray(o)?o:[o]])}),L=(t,n)=>{let r=(0,e.forwardRef)(({className:r,...i},a)=>(0,e.createElement)(oe,{ref:a,iconNode:n,className:F(`lucide-${ee(ne(t))}`,`lucide-${t}`,r),...i}));return r.displayName=ne(t),r},se=L(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ce=L(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),le=L(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ue=L(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),de=L(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),R=L(`dot`,[[`circle`,{cx:`12.1`,cy:`12.1`,r:`1`,key:`18d7e5`}]]),fe=L(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),pe=L(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),me=L(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),he=L(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),z=(0,e.forwardRef)(({onTheme:e,variant:t=`solid`,countBg:i,countColor:a,children:o,...s},c)=>{let l=b();e&&e(l);let u={solid:{bg:`secondary.solid`,color:`fg.inverted`,borderWidth:`{borderWidths.none}`},outline:{bg:`bg.panel`,color:`primary.700`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`},count:{bg:i??`secondary.solid`,color:a??`fg.inverted`,borderWidth:`{borderWidths.none}`,borderRadius:`full`,minW:`{spacing.6}`,minH:`{spacing.6}`,w:`auto`,px:`{spacing.1}`,py:`{spacing.1}`,fontSize:`xs`,fontWeight:`medium`,lineHeight:`shorter`}};return(0,r.jsx)(n.Badge,{ref:c,"data-xlp-brand":l.brandId,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,gap:`{spacing.1}`,h:`{spacing.6}`,px:`{spacing.3}`,py:`{spacing.1}`,borderRadius:`3xl`,fontFamily:`body`,fontSize:`xs`,fontWeight:`medium`,...u[t],...s,children:o})});z.displayName=`XlpTag`;function ge(e){if(!e)return`NA`;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`NA`:t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]??``}${t[1][0]??``}`.toUpperCase()}var B=(0,e.forwardRef)(({onTheme:e,name:t,imageUrl:i,fallback:a,...o},s)=>{let c=b();e&&e(c);let l=a??ge(t);return(0,r.jsxs)(n.Avatar.Root,{ref:s,"data-xlp-brand":c.brandId,size:`sm`,bg:`secondary.solid`,color:`fg.inverted`,borderRadius:`full`,borderWidth:`{borderWidths.none}`,...o,children:[(0,r.jsx)(n.Avatar.Fallback,{name:t,fontFamily:`body`,fontSize:`xs`,fontWeight:`medium`,lineHeight:`shorter`,children:l}),i?(0,r.jsx)(n.Avatar.Image,{src:i}):null]})});B.displayName=`XlpAvatar`;var _e=(0,e.forwardRef)(({variant:e=`default`,badges:t=[],title:a,description:o,avatarName:s,actions:c=[],badgeColor:l=`secondary.solid`,metadata:u,descriptionLineClamp:d=2,onTheme:f,...p},m)=>{let h=b(),g=e=>{e.onClick?.(),e.label.trim().toLowerCase()===`copy`&&(typeof navigator<`u`&&navigator.clipboard?.writeText&&navigator.clipboard.writeText(o),i.create({title:`Value is copied successfully`,type:`info`,duration:2200,closable:!0,meta:{width:`max-content`}}))};return f&&f(h),e===`user`?(0,r.jsxs)(n.Box,{ref:m,"data-xlp-brand":h.brandId,bg:`bg.panel`,borderWidth:`{borderWidths.xs}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`{spacing.5}`,shadow:`0px 0px 1px 0px rgba(24, 24, 27, 0.3), 0px 4px 8px 0px rgba(24, 24, 27, 0.1)`,overflow:`hidden`,py:`{spacing.6}`,display:`flex`,gap:`{spacing.4}`,p:`{spacing.5}`,alignItems:`flex-start`,...p,children:[s&&(0,r.jsx)(B,{name:s,size:`sm`,flexShrink:0}),(0,r.jsxs)(n.Flex,{flexDir:`column`,gap:`{spacing.1}`,alignItems:`flex-start`,flex:`1`,children:[(0,r.jsxs)(n.Flex,{flexDir:`column`,gap:`{spacing.0_5}`,w:`full`,justifyContent:`space-between`,minH:`2.625rem`,children:[(0,r.jsx)(n.Text,{fontFamily:`body`,fontSize:`sm`,fontWeight:`semibold`,color:`primary.700`,children:a}),(0,r.jsx)(n.Text,{fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,color:`secondary.500`,lineClamp:d??void 0,children:o})]}),u&&(0,r.jsxs)(n.Flex,{gap:`{spacing.2}`,alignItems:`center`,w:`full`,children:[(0,r.jsx)(n.Box,{w:`{spacing.4}`,h:`{spacing.4}`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`neutral.400`,fontSize:`xs`,children:(0,r.jsx)(ce,{size:18,strokeWidth:1.8,color:`currentColor`})}),(0,r.jsx)(n.Text,{fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,color:`neutral.400`,whiteSpace:`nowrap`,children:u})]})]})]}):(0,r.jsxs)(n.Box,{ref:m,"data-xlp-brand":h.brandId,bg:`bg.panel`,borderWidth:`{borderWidths.xs}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`{spacing.5}`,shadow:`0px 0px 1px 0px rgba(24, 24, 27, 0.3), 0px 4px 8px 0px rgba(24, 24, 27, 0.1)`,overflow:`hidden`,py:`{spacing.6}`,flexDir:`column`,display:`flex`,gap:`{spacing.4}`,...p,children:[(0,r.jsxs)(n.Box,{px:`{spacing.6}`,display:`flex`,flexDir:`column`,gap:`{spacing.4}`,children:[t.length>0&&(0,r.jsx)(n.Flex,{gap:`{spacing.1}`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`center`,children:t.map((e,t)=>(0,r.jsx)(z,{variant:t===0?`solid`:`outline`,fontSize:`xs`,fontWeight:`normal`,children:e},t))}),(0,r.jsx)(n.Heading,{as:`h3`,size:`md`,fontFamily:`body`,fontWeight:`semibold`,fontSize:`{fontSizes.md}`,color:`primary.700`,mt:`{spacing.1}`,children:a}),(0,r.jsx)(n.Text,{fontSize:`sm`,fontWeight:`normal`,color:`fg.muted`,fontFamily:`body`,lineClamp:d??void 0,children:o})]}),(0,r.jsxs)(n.Box,{px:`{spacing.6}`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,children:[s&&(0,r.jsx)(B,{name:s,size:`sm`,bg:`secondary.solid`}),c.length>0&&(0,r.jsx)(n.Flex,{gap:`{spacing.3}`,alignItems:`center`,children:c.map((e,t)=>(0,r.jsxs)(k,{size:`sm`,variant:e.variant??`solid`,onClick:()=>g(e),display:`flex`,alignItems:`center`,gap:`{spacing.2}`,children:[e.icon,e.label]},t))})]})]})});_e.displayName=`XlpCard`;var ve=(0,e.forwardRef)(({onTheme:e,variant:t=`default`,weight:i,color:a,fontWeight:o,fontFamily:s=`heading`,...c},l)=>{let u=b();return e&&e(u),(0,r.jsx)(n.Heading,{ref:l,"data-xlp-brand":u.brandId,color:a??{default:`fg`,muted:`fg.muted`,subtle:`fg.subtle`,inverted:`fg.inverted`,primary:`primary.solid`,secondary:`secondary.solid`,accent:`accent.solid`,success:`success.solid`,warning:`warning.solid`,error:`error.solid`,info:`info.solid`}[t],fontFamily:s,fontWeight:o??i??`semibold`,...c})});ve.displayName=`XlpHeading`;var ye=(0,e.forwardRef)(({onTheme:e,label:t,icon:i,iconName:a,active:o=!1,count:s,labelColor:c,labelFontSize:l=`sm`,...u},d)=>{let f=b(),p=i??(a===`agent`?(0,r.jsx)(se,{size:16,strokeWidth:1.8}):a===`message`?(0,r.jsx)(pe,{size:16,strokeWidth:1.8}):null),m=c??(o?`fg.inverted`:`fg`);return e&&e(f),(0,r.jsxs)(n.Button,{ref:d,"data-xlp-brand":f.brandId,display:`flex`,alignItems:`center`,justifyContent:`space-between`,w:`full`,px:`{spacing.3}`,py:`{spacing.5}`,minH:`{spacing.6}`,borderRadius:`lg`,fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,lineHeight:`short`,bg:o?`secondary.solid`:`bg.panel`,color:o?`fg.inverted`:`fg`,borderWidth:`{borderWidths.none}`,_hover:{bg:o?`secondary.solid`:`bg.subtle`},_active:{opacity:`{opacity.hover}`},...u,children:[(0,r.jsxs)(n.HStack,{gap:`{spacing.3}`,minW:`0`,alignItems:`center`,children:[p?(0,r.jsx)(n.Box,{"aria-hidden":`true`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxSize:`{spacing.4}`,lineHeight:`0`,children:p}):null,(0,r.jsx)(ve,{as:`span`,fontSize:l,fontWeight:`normal`,lineHeight:`short`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,color:m,children:t})]}),typeof s==`number`?(0,r.jsx)(z,{variant:`count`,minW:`{spacing.6}`,h:`{spacing.6}`,px:`{spacing.1}`,py:`{borderWidths.heavy}`,countBg:`fg.inverted`,countColor:`secondary.solid`,children:s}):null]})});ye.displayName=`XlpMenuItem`;var be=(0,e.forwardRef)(({fileName:e=`File`,code:t,onTheme:a,codeMinHeight:o=`{spacing.10}`,codeHeight:s,...c},l)=>{let u=b();a&&a(u);let d=async()=>{if(typeof navigator>`u`||!navigator.clipboard?.writeText){console.warn(`Clipboard API not available`);return}try{await navigator.clipboard.writeText(t),i.create({type:`success`,title:`Copied to clipboard`,meta:{width:`max-content`}})}catch(e){console.error(`Failed to copy:`,e),i.create({type:`error`,title:`Failed to copy`,meta:{width:`max-content`}})}};return(0,r.jsxs)(n.Box,{ref:l,"data-xlp-brand":u.brandId,bg:`bg.pulse`,borderWidth:`1px`,borderStyle:`solid`,borderColor:`border`,borderRadius:`2xl`,display:`flex`,flexDir:`column`,gap:`0`,overflow:`hidden`,...c,children:[(0,r.jsxs)(n.Flex,{bg:`bg.pulse`,borderBottomWidth:`1px`,borderBottomStyle:`solid`,borderBottomColor:`border`,px:`{spacing.4}`,py:`{spacing.1}`,justify:`space-between`,align:`center`,gap:`{spacing.1}`,children:[(0,r.jsxs)(n.HStack,{gap:`{spacing.3}`,minW:`fit-content`,children:[(0,r.jsxs)(n.HStack,{gap:`{spacing.0.5}`,minW:`fit-content`,children:[(0,r.jsx)(n.Box,{color:`success.solid`,display:`inline-flex`,children:(0,r.jsx)(R,{size:16,color:`currentColor`,strokeWidth:10,absoluteStrokeWidth:!0})}),(0,r.jsx)(n.Box,{color:`warning.500`,display:`inline-flex`,children:(0,r.jsx)(R,{size:16,color:`currentColor`,strokeWidth:10,absoluteStrokeWidth:!0})}),(0,r.jsx)(n.Box,{color:`error.solid`,display:`inline-flex`,children:(0,r.jsx)(R,{size:16,color:`currentColor`,strokeWidth:10,absoluteStrokeWidth:!0})})]}),(0,r.jsx)(n.Box,{fontFamily:`body`,fontSize:`{spacing.3}`,fontWeight:`semibold`,color:`primary.700`,children:e})]}),(0,r.jsx)(k,{variant:`outline`,size:`sm`,startIcon:(0,r.jsx)(de,{strokeWidth:1.8}),onClick:d,children:`Copy`})]}),(0,r.jsx)(n.Box,{as:`pre`,bg:`white`,color:`primary.700`,fontFamily:`mono`,fontSize:`xs`,fontWeight:`normal`,lineHeight:`short`,minH:s?void 0:o,h:s,p:`{spacing.4}`,overflow:`auto`,m:`0`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,children:t})]})});be.displayName=`XlpCodeSnippet`;var xe=(0,e.forwardRef)(({items:e,triggerVariant:t=`default`,onTheme:i,defaultValue:a,...o},s)=>{let c=b();i&&i(c);let l=e[0]?.value,u=t===`file`;return(0,r.jsxs)(n.Tabs.Root,{ref:s,"data-xlp-brand":c.brandId,defaultValue:a??l,variant:`plain`,...o,children:[(0,r.jsx)(n.Tabs.List,{display:`inline-flex`,alignItems:`center`,gap:u?`{spacing.0}`:`{spacing.0.5}`,p:u?`{spacing.0}`:`{spacing.0.5}`,bg:`transparent`,borderWidth:`{borderWidths.none}`,position:`relative`,children:e.map(e=>(0,r.jsxs)(n.Tabs.Trigger,{value:e.value,display:`inline-flex`,alignItems:`center`,gap:`{spacing.1}`,h:`{spacing.10}`,px:`{spacing.4}`,py:`{spacing.2}`,borderRadius:u?`md`:`full`,bg:`transparent`,color:`fg.muted`,fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,borderWidth:u?`{borderWidths.thin}`:`{borderWidths.none}`,borderStyle:u?`solid`:void 0,borderColor:u?`transparent`:void 0,_selected:{bg:u?`bg.panel`:`bg.subtle`,borderWidth:`{borderWidths.thin}`,color:`primary.700`,borderRadius:`full`,fontWeight:`semibold`,...u?{borderColor:`border`}:{}},children:[e.icon?(0,r.jsx)(n.Box,{as:`span`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxSize:`{spacing.4}`,children:e.icon}):null,e.label]},e.value))}),e.map(e=>e.content===void 0?null:(0,r.jsx)(n.Tabs.Content,{value:e.value,pt:`{spacing.4}`,children:e.content},`content-${e.value}`))]})});xe.displayName=`XlpTabs`;var Se=(0,e.forwardRef)(({totalCount:e,onTheme:t,pageSize:i=10,siblingCount:a=1,...o},s)=>{let c=b();return t&&t(c),(0,r.jsx)(n.Pagination.Root,{ref:s,count:e,pageSize:i,siblingCount:a,"data-xlp-brand":c.brandId,"data-xlp-primary":c.tokens.colors.primary[500],...o,children:(0,r.jsxs)(n.HStack,{gap:`{spacing.4}`,h:`{spacing.10}`,alignItems:`center`,children:[(0,r.jsx)(n.Pagination.PrevTrigger,{asChild:!0,children:(0,r.jsx)(k,{variant:`ghost`,minW:`{spacing.8}`,h:`{spacing.8}`,px:`{spacing.1}`,py:`{borderWidths.thick}`,borderRadius:`full`,"aria-label":`Previous page`,children:(0,r.jsx)(le,{size:16,strokeWidth:1.8})})}),(0,r.jsx)(n.HStack,{gap:`{spacing.1}`,alignItems:`center`,children:(0,r.jsx)(n.Pagination.Items,{ellipsis:(0,r.jsx)(n.Box,{as:`span`,minW:`{spacing.8}`,h:`{spacing.8}`,px:`{spacing.1}`,py:`{borderWidths.thick}`,borderRadius:`sm`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontFamily:`body`,fontSize:`xs`,fontWeight:`medium`,lineHeight:`shorter`,color:`fg`,children:`...`}),render:e=>(0,r.jsx)(n.Pagination.Context,{children:t=>(0,r.jsx)(z,{variant:t.page===e.value?`count`:`outline`,minW:`{spacing.8}`,h:`{spacing.8}`,px:`{spacing.1}`,py:`{borderWidths.thick}`,borderRadius:`full`,fontFamily:`body`,fontSize:`xs`,fontWeight:`medium`,lineHeight:`shorter`,children:e.value})})})}),(0,r.jsx)(n.Pagination.NextTrigger,{asChild:!0,children:(0,r.jsx)(k,{variant:`ghost`,minW:`{spacing.8}`,h:`{spacing.8}`,px:`{spacing.1}`,py:`{borderWidths.thick}`,borderRadius:`full`,"aria-label":`Next page`,children:(0,r.jsx)(ue,{size:16,strokeWidth:1.8})})})]})})});Se.displayName=`XlpPagination`;function V(e,t){return e-t*Math.floor(e/t)}var Ce=1721426;function H(e,t,n,r){t=W(e,t);let i=t-1,a=-2;return n<=2?a=0:U(t)&&(a=-1),Ce-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function U(e){return e%4==0&&(e%100!=0||e%400==0)}function W(e,t){return e===`BC`?1-t:t}function we(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var Te={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},G=class{fromJulianDay(e){let t=e,n=t-Ce,r=Math.floor(n/146097),i=V(n,146097),a=Math.floor(i/36524),o=V(i,36524),s=Math.floor(o/1461),c=V(o,1461),l=Math.floor(c/365),[u,d]=we(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-H(u,d,1,1),p=2;t<H(u,d,3,1)?p=0:U(d)&&(p=1);let m=Math.floor(((f+p)*12+373)/367);return new pt(u,d,m,t-H(u,d,m,1)+1)}toJulianDay(e){return H(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Te[U(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return U(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}};function Ee(e,t){return e.isEqual?.call(e,t)??t.isEqual?.call(t,e)??e.identifier===t.identifier}function De(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Oe(e,t){return ke(e)-ke(t)}function ke(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var Ae=null,je=!1;function Me(){return Ae??=new Intl.DateTimeFormat().resolvedOptions().timeZone,Ae}function Ne(){return je}function Pe(e){return e=K(e,new G),Fe(W(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Fe(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function Ie(e,t){if(t===`UTC`)return 0;if(e>0&&t===Me()&&!Ne())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Re(e,t);return Fe(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Le=new Map;function Re(e,t){let n=Le.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Le.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var ze=864e5;function Be(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>Ve(e,t,n))}function Ve(e,t,n){let r=Re(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function He(e,t,n=`compatible`){let r=We(e);if(t===`UTC`)return Pe(r);if(t===Me()&&n===`compatible`&&!Ne()){r=K(r,new G);let e=new Date,t=W(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=Pe(r),a=Ie(i-ze,t),o=Ie(i+ze,t),s=Be(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function Ue(e,t,n=`compatible`){return new Date(He(e,t,n))}function We(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new ht(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function K(e,t){if(Ee(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,X(r),r}function q(e,t){let n=e.copy(),r=`hour`in n?$e(n,t):0;J(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Y(n),Ke(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Ge(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a;let e=(a=n.calendar).isInverseEra?.call(a,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function J(e,t){var n;(n=e.calendar).isInverseEra?.call(n,e)&&(t=-t),e.year+=t}function Y(e){for(;e.month<1;)J(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,J(e,1)}function Ge(e){for(;e.day<1;)e.month--,Y(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Y(e)}function Ke(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function X(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Ke(e)}function qe(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function Je(e,t){return q(e,qe(t))}function Ye(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),X(n),n}function Xe(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Qe(n),n}function Ze(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Z(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Z(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Z(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Z(e.hour,24),t}function Qe(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Z(e,t){let n=e%t;return n<0&&(n+=t),n}function $e(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Ze(e)}function et(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=Q(a,n,0,t.length-1,r?.round),i.era=t[a],X(i);break}case`year`:var a;(a=i.calendar).isInverseEra?.call(a,i)&&(n=-n),i.year=Q(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=Q(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=Q(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),X(i),i}function tt(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=Q(t,n,a,o,r?.round);break}case`minute`:i.minute=Q(e.minute,n,0,59,r?.round);break;case`second`:i.second=Q(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=Q(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function Q(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}var nt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,rt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function it(e){let t=e.match(nt);if(!t)throw rt.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new pt(at(t[1],0,9999),at(t[2],1,12),1);return n.day=at(t[3],1,n.calendar.getDaysInMonth(n)),n}function at(e,t,n){let r=Number(e);if(r<t||r>n)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function ot(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function st(e){let t=K(e,new G),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function ct(e){return`${st(e)}T${ot(e)}`}function lt(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function ut(e,t,n){lt(e,t),t.set(e,n)}function dt(e){let t=typeof e[0]==`object`?e.shift():new G,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var ft=new WeakMap,pt=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return q(this,e)}subtract(e){return Je(this,e)}set(e){return Ye(this,e)}cycle(e,t,n){return et(this,e,t,n)}toDate(e){return Ue(this,e)}toString(){return st(this)}compare(e){return De(this,e)}constructor(...e){ut(this,ft,{writable:!0,value:void 0});let[t,n,r,i,a]=dt(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,X(this)}},mt=new WeakMap,ht=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return q(this,e)}subtract(e){return Je(this,e)}set(e){return Ye(Xe(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return et(this,e,t,n);default:return tt(this,e,t,n)}}toDate(e,t){return Ue(this,e,t)}toString(){return ct(this)}compare(e){let t=De(this,e);return t===0?Oe(this,We(e)):t}constructor(...e){ut(this,mt,{writable:!0,value:void 0});let[t,n,r,i,a]=dt(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,X(this)}},gt=(0,e.forwardRef)(({mode:t=`single`,value:i,onChange:a,onTheme:o,disabledDates:s=[],initialDate:c,numOfMonths:l=1,showWeekNumbers:u=!1,hideOutsideDays:d=!1,maxSelectedDates:f,...p},m)=>{let h=b();o&&o(h);let g=e=>{if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e;if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){let[t,n,r]=e.split(`/`);return`${r}-${t}-${n}`}let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString().split(`T`)[0]},_=(0,e.useMemo)(()=>{let e=s.map(e=>g(e)).filter(e=>!!e);return new Set(e)},[s]),v=e=>{let t=g(e);if(!t)return null;try{return it(t)}catch{return null}},y=(0,e.useMemo)(()=>{if(i){if(typeof i==`string`){let e=v(i);return e?[e]:void 0}if(Array.isArray(i)){let e=i.map(e=>v(e)).filter(e=>!!e);return t===`range`?e.length===2?e:void 0:e.length>0?e:void 0}}},[t,i]),x=(0,e.useMemo)(()=>{if(c){if(c instanceof Date){if(Number.isNaN(c.getTime()))return;let e=c.toISOString().split(`T`)[0];return v(e)??void 0}return v(c)??void 0}},[c]),S=e=>{let t=e.toString();return _.has(t)},C=e=>{let n=e.value.map(e=>e.toString());t===`single`?a?.(n[0]??null):t===`range`?n.length===2?a?.(n):a?.(null):t===`multiple`&&a?.(n.length>0?n:null)};return(0,r.jsx)(n.Box,{ref:m,"data-xlp-brand":h.brandId,bg:`bg.panel`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`{spacing.3}`,p:`{spacing.3}`,...p,children:(0,r.jsxs)(n.DatePicker.Root,{inline:!0,value:y,onValueChange:C,startOfWeek:0,defaultFocusedValue:x,selectionMode:t===`single`?`single`:t===`range`?`range`:`multiple`,isDateUnavailable:S,numOfMonths:l,showWeekNumbers:u,hideOutsideDays:d,maxSelectedDates:f,css:{"& [data-scope='date-picker'][data-part='table-cell-trigger'][data-selected]":{bg:`primary.700`,color:`white`}},children:[(0,r.jsxs)(n.DatePicker.View,{view:`day`,children:[(0,r.jsx)(n.DatePicker.Header,{}),(0,r.jsx)(n.DatePicker.DayTable,{})]}),(0,r.jsxs)(n.DatePicker.View,{view:`month`,children:[(0,r.jsx)(n.DatePicker.Header,{}),(0,r.jsx)(n.DatePicker.MonthTable,{})]}),(0,r.jsxs)(n.DatePicker.View,{view:`year`,children:[(0,r.jsx)(n.DatePicker.Header,{}),(0,r.jsx)(n.DatePicker.YearTable,{})]})]})})});gt.displayName=`XlpCalendar`;function $(e){if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function _t(e,t){return new Date(e,t,1)}function vt(e){let t=e.getDay();return t===0||t===6}function yt(e,t,n=`fr-FR`){let r=new Intl.DateTimeFormat(n,{weekday:`short`}),i=new Date(e,t+1,0).getDate();return Array.from({length:i},(n,i)=>{let a=i+1,o=new Date(e,t,a);return{isoDate:`${e}-${String(t+1).padStart(2,`0`)}-${String(a).padStart(2,`0`)}`,dayNumber:a,weekdayShort:r.format(o).replace(`.`,``),isWeekend:vt(o)}})}function bt(e,t=`fr-FR`){let n=e?$(e):new Date;return n?yt(n.getFullYear(),n.getMonth(),t):[]}function xt(e,t){let n=e?$(e)??new Date:new Date;return _t(n.getFullYear(),n.getMonth()+t)}function St(e,t){let n=e?$(e)??new Date:new Date;return _t(n.getFullYear()+t,n.getMonth())}function Ct(e,t=`fr-FR`){let n=e?$(e)??new Date:new Date;return new Intl.DateTimeFormat(t,{month:`long`,year:`numeric`}).format(n)}var wt=[{type:`paid`,label:`Conges payes`},{type:`sick`,label:`Maladie`},{type:`parental`,label:`Conge parental`}],Tt=(0,e.forwardRef)(({employees:t,holidays:i=[],locale:a=`fr-FR`,selectedDate:o,onSelectedDateChange:s,legendItems:c=wt,employeeHeaderLabel:l=`Employees`,employeeColumnWidth:u=`{spacing.52}`,dayCellWidth:d=`{spacing.8}`,showMonthNavigation:f=!0,onTheme:p,...m},h)=>{let g=b(),[_,v]=(0,e.useState)(()=>new Date),y=(0,e.useMemo)(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`},[]),x=()=>{v(new Date)};p&&p(g);let S=(0,e.useMemo)(()=>$(_)??new Date,[_]),C=(0,e.useMemo)(()=>Ct(_,a),[a,_]),w=String(S.getFullYear()-1),T=String(S.getFullYear()+1),E=(0,e.useMemo)(()=>{let e=new Date;return S.getFullYear()===e.getFullYear()&&S.getMonth()===e.getMonth()},[S]),D=(0,e.useMemo)(()=>bt(_,a),[a,_]),O=e=>{v(e)},A=()=>{O(St(_,-1))},j=()=>{O(xt(_,-1))},M=()=>{O(xt(_,1))},N=()=>{O(St(_,1))},P=(0,e.useMemo)(()=>{let e=new Map;for(let n of t){let t=new Map;for(let e of n.entries??[])t.set(e.date,e.type);e.set(n.id,t)}return e},[t]),F=(0,e.useMemo)(()=>{let e=new Map;for(let t of i){let n=e.get(t.date);if(n){n.push(t);continue}e.set(t.date,[t])}return e},[i]);return(0,r.jsxs)(n.Box,{ref:h,"data-xlp-brand":g.brandId,bg:`bg.panel`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderRadius:`{spacing.3}`,overflow:`hidden`,...m,children:[(0,r.jsxs)(n.Flex,{px:`{spacing.4}`,py:`{spacing.3}`,align:`center`,justify:`space-between`,gap:`{spacing.4}`,borderBottomWidth:`{borderWidths.thin}`,borderBottomStyle:`solid`,borderBottomColor:`border`,children:[(0,r.jsx)(n.HStack,{gap:`{spacing.2}`,children:(0,r.jsx)(n.Text,{fontSize:`xl`,color:`secondary.500`,fontFamily:`body`,fontWeight:`semibold`,children:`Calendriers des absences`})}),f?(0,r.jsxs)(n.HStack,{gap:`{spacing.3}`,flexShrink:0,children:[(0,r.jsx)(k,{size:`sm`,variant:`solid`,onClick:x,disabled:E,"aria-label":`Go to current month`,children:`Today`}),(0,r.jsx)(k,{size:`sm`,variant:`control`,onClick:A,"aria-label":`Go to year ${w}`,children:w}),(0,r.jsx)(k,{size:`sm`,variant:`control`,isIconOnly:!0,onClick:j,"aria-label":`Previous month`,children:(0,r.jsx)(le,{size:14})}),(0,r.jsx)(n.Text,{textAlign:`center`,fontSize:`sm`,fontWeight:`semibold`,color:`fg`,whiteSpace:`nowrap`,children:C}),(0,r.jsx)(k,{size:`sm`,variant:`control`,isIconOnly:!0,onClick:M,"aria-label":`Next month`,children:(0,r.jsx)(ue,{size:14})}),(0,r.jsx)(k,{size:`sm`,variant:`control`,onClick:N,"aria-label":`Go to year ${T}`,children:T})]}):null]}),(0,r.jsx)(n.Box,{overflowX:`auto`,overflowY:`hidden`,children:(0,r.jsxs)(n.Box,{w:`100%`,minW:`max-content`,display:`flex`,flexDirection:`column`,children:[(0,r.jsxs)(n.Flex,{borderBottomWidth:`{borderWidths.thin}`,borderBottomStyle:`solid`,borderBottomColor:`border`,w:`100%`,children:[(0,r.jsx)(n.Box,{position:`sticky`,left:`0`,zIndex:`2`,bg:`bg.panel`,w:u,minW:u,px:`{spacing.3}`,py:`{spacing.4}`,borderRightWidth:`{borderWidths.thin}`,borderRightStyle:`solid`,borderRightColor:`border`,children:(0,r.jsx)(n.Text,{fontSize:`sm`,fontWeight:`semibold`,color:`fg.muted`,fontFamily:`body`,children:l})}),(0,r.jsx)(n.HStack,{gap:`0`,align:`stretch`,flex:`1`,children:D.map(e=>{let t=e.isoDate===o,i=e.isoDate===y,a=F.get(e.isoDate),c=!!a?.length,l=a?.map(e=>e.label?`${e.label} (${e.calendar})`:e.calendar).join(`, `);return(0,r.jsxs)(n.Flex,{direction:`column`,align:`center`,justify:`center`,flex:`1`,minW:d,h:`{spacing.14}`,bg:e.isWeekend?`bg.subtle`:`transparent`,borderLeftWidth:`{borderWidths.thin}`,borderLeftStyle:`solid`,borderLeftColor:`border`,title:l,cursor:s?`pointer`:`default`,"aria-current":i?`date`:void 0,onClick:()=>{s&&s(e.isoDate)},children:[(0,r.jsx)(n.Text,{fontSize:`xs`,color:i?`primary.solid`:c?`warning.fg`:`fg.muted`,fontWeight:i?`bold`:`medium`,lineHeight:`shorter`,children:e.weekdayShort.slice(0,2).toUpperCase()}),(0,r.jsx)(n.Box,{mt:`{spacing.1}`,w:`{spacing.6}`,h:`{spacing.6}`,borderRadius:`full`,bg:t?`primary.solid`:`transparent`,color:t?`fg.inverted`:i?`primary.solid`:`fg`,display:`flex`,alignItems:`center`,justifyContent:`center`,outline:i&&!t?`{borderWidths.base} solid`:void 0,outlineColor:i&&!t?`primary.solid`:void 0,outlineOffset:i&&!t?`{borderWidths.base}`:void 0,children:(0,r.jsx)(n.Text,{fontSize:`sm`,fontWeight:`semibold`,lineHeight:`shorter`,children:e.dayNumber})})]},e.isoDate)})})]}),t.map(e=>{let t=P.get(e.id);return(0,r.jsxs)(n.Flex,{borderBottomWidth:`{borderWidths.thin}`,borderBottomStyle:`solid`,borderBottomColor:`border`,w:`100%`,children:[(0,r.jsx)(n.Box,{position:`sticky`,left:`0`,zIndex:`1`,bg:`bg.panel`,w:u,minW:u,px:`{spacing.3}`,py:`{spacing.3}`,borderRightWidth:`{borderWidths.thin}`,borderRightStyle:`solid`,borderRightColor:`border`,children:(0,r.jsxs)(n.HStack,{gap:`{spacing.3}`,align:`center`,children:[(0,r.jsxs)(n.Avatar.Root,{size:`sm`,children:[(0,r.jsx)(n.Avatar.Fallback,{name:e.name}),e.avatarUrl?(0,r.jsx)(n.Avatar.Image,{src:e.avatarUrl}):null]}),(0,r.jsxs)(n.VStack,{gap:`0`,align:`start`,children:[(0,r.jsx)(n.Text,{fontSize:`md`,fontWeight:`semibold`,color:`fg`,lineHeight:`shorter`,children:e.name}),(0,r.jsx)(n.Text,{fontSize:`sm`,color:`fg.muted`,lineHeight:`shorter`,children:e.role})]})]})}),(0,r.jsx)(n.HStack,{gap:`0`,align:`stretch`,flex:`1`,children:D.map(i=>{let a=t?.has(i.isoDate),o=F.has(i.isoDate);return(0,r.jsx)(n.Flex,{flex:`1`,minW:d,borderLeftWidth:`{borderWidths.thin}`,borderLeftStyle:`solid`,borderLeftColor:`border`,align:`center`,justify:`center`,bg:a?`info.emphasized`:o?`warning.muted`:i.isWeekend?`bg.subtle`:`bg.panel`},`${e.id}-${i.isoDate}`)})})]},e.id)})]})})]})});Tt.displayName=`XlpGlobalCalendarPreview`;var Et=(0,e.forwardRef)(({label:t,title:i=`Drag and drop here to upload`,hint:a=`.png, .jpg up to 5MB`,accept:o=`.png,.jpg,.jpeg`,multiple:s=!0,onFilesChange:c,showPreview:l=!0,onTheme:u,...d},f)=>{let p=b(),[m,h]=(0,e.useState)(!1),[g,_]=(0,e.useState)([]);u&&u(p);let v=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`,y=e=>{let t=e.split(`.`);return t.length<2?`FILE`:t[t.length-1].toUpperCase()},x=e=>{if(!e)return;let t=Array.from(e);_(e=>{if(!s){let e=t.slice(0,1);return c?.(e),e}let n=[...e];for(let e of t)n.some(t=>t.name===e.name&&t.size===e.size&&t.lastModified===e.lastModified)||n.push(e);return c?.(n),n})},S=e=>{e.preventDefault(),h(!0)},C=e=>{e.preventDefault(),h(!1)},w=e=>{e.preventDefault(),h(!1),x(e.dataTransfer.files)},T=e=>{x(e.target.files)};return(0,r.jsxs)(n.Box,{display:`flex`,flexDirection:`column`,gap:`{spacing.0.5}`,children:[t?(0,r.jsx)(n.Box,{as:`label`,fontFamily:`body`,fontSize:`sm`,fontWeight:`medium`,lineHeight:`moderate`,color:`secondary.500`,children:t}):null,(0,r.jsxs)(n.Box,{as:`label`,"data-xlp-brand":p.brandId,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:`{spacing.4}`,px:`{spacing.8}`,py:`{spacing.8}`,minH:`{spacing.24}`,bg:m?`bg.panel`:`bg.subtle`,borderWidth:`{spacing.0.5}`,borderStyle:`dashed`,borderColor:m?`primary.focusRing`:`border`,borderRadius:`{spacing.4}`,cursor:`pointer`,_hover:{borderColor:`border.emphasized`},_focusVisible:{outlineWidth:`{borderWidths.base}`,outlineStyle:`solid`,outlineColor:`primary.focusRing`,outlineOffset:`{borderWidths.thin}`},onDragOver:S,onDragLeave:C,onDrop:w,...d,children:[(0,r.jsxs)(n.Box,{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:`{spacing.1}`,children:[(0,r.jsx)(me,{size:20,strokeWidth:1.8,color:`currentColor`}),(0,r.jsx)(n.Box,{fontFamily:`body`,fontSize:`sm`,fontWeight:`medium`,lineHeight:`moderate`,color:`primary.700`,textAlign:`center`,children:i}),(0,r.jsx)(n.Box,{fontFamily:`body`,fontSize:`sm`,fontWeight:`normal`,lineHeight:`moderate`,color:`fg.muted`,textAlign:`center`,children:a})]}),(0,r.jsx)(`input`,{ref:f,type:`file`,accept:o,multiple:s,onChange:T,style:{display:`none`}})]}),l&&g.length>0?(0,r.jsxs)(n.Box,{display:`flex`,flexDirection:`column`,gap:`{spacing.1}`,mt:`{spacing.3}`,children:[(0,r.jsx)(n.Box,{fontFamily:`body`,fontSize:`xs`,fontWeight:`medium`,lineHeight:`shorter`,color:`secondary.500`,textTransform:`uppercase`,letterSpacing:`wide`,children:`Uploaded Files`}),g.map(e=>(0,r.jsxs)(n.Box,{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`{spacing.2}`,px:`{spacing.3}`,py:`{spacing.2}`,bg:`bg.panel`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`{spacing.2}`,children:[(0,r.jsxs)(n.Box,{display:`flex`,alignItems:`center`,gap:`{spacing.2}`,minW:`0`,flex:`1`,children:[(0,r.jsx)(n.Box,{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxSize:`{spacing.6}`,borderRadius:`{spacing.2}`,bg:`bg.subtle`,color:`primary.700`,flexShrink:0,children:(0,r.jsx)(fe,{size:16,strokeWidth:1.6,color:`currentColor`})}),(0,r.jsxs)(n.Box,{minW:`0`,display:`flex`,flexDirection:`column`,children:[(0,r.jsx)(n.Box,{fontFamily:`body`,fontSize:`sm`,fontWeight:`medium`,lineHeight:`moderate`,color:`primary.700`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,children:e.name}),(0,r.jsx)(n.Box,{fontFamily:`body`,fontSize:`xs`,fontWeight:`normal`,lineHeight:`shorter`,color:`fg.muted`,children:v(e.size)})]})]}),(0,r.jsx)(n.Box,{fontFamily:`body`,fontSize:`xs`,fontWeight:`medium`,lineHeight:`shorter`,color:`primary.700`,bg:`bg.subtle`,borderWidth:`{borderWidths.thin}`,borderStyle:`solid`,borderColor:`border`,borderRadius:`{spacing.3}`,px:`{spacing.2}`,py:`{spacing.0.5}`,flexShrink:0,children:y(e.name)})]},`${e.name}-${e.lastModified}`))]}):null]})});Et.displayName=`XlpDropzone`;var Dt=(0,e.forwardRef)(({onClose:e,children:t,size:i=`sm`,...a},o)=>(0,r.jsx)(n.Drawer.CloseTrigger,{asChild:!0,children:(0,r.jsx)(k,{ref:o,variant:`outline`,backgroundColor:`border`,color:`primary.700`,size:i,"aria-label":`Close drawer`,px:`0`,onClick:e,top:`{spacing.5}`,...a,children:(0,r.jsx)(he,{size:16,strokeWidth:2.25})})}));Dt.displayName=`XlpDrawerCloseTrigger`;var Ot=(0,e.forwardRef)(({title:e,onClose:t,closeTrigger:i,...a},o)=>(0,r.jsxs)(n.Drawer.Header,{ref:o,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`{spacing.3}`,px:`{spacing.6}`,py:`{spacing.6}`,pb:`{spacing.4}`,borderBottomWidth:`{borderWidths.thin}`,borderBottomStyle:`solid`,borderBottomColor:`border`,...a,children:[(0,r.jsx)(n.Heading,{size:`lg`,fontWeight:`semibold`,color:`primary.700`,fontFamily:`body`,flex:`1`,children:e}),i??(0,r.jsx)(Dt,{onClose:t})]}));Ot.displayName=`XlpDrawerHeader`;var kt=(0,e.forwardRef)((e,t)=>(0,r.jsx)(n.Drawer.Body,{ref:t,px:`{spacing.6}`,py:`{spacing.4}`,color:`primary.700`,...e}));kt.displayName=`XlpDrawerBody`;var At=(0,e.forwardRef)(({actions:e,...t},i)=>!e||e.length===0?null:(0,r.jsx)(n.Drawer.Footer,{ref:i,display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`{spacing.4}`,px:`{spacing.6}`,py:`{spacing.4}`,borderTopWidth:`{borderWidths.thin}`,borderTopStyle:`solid`,borderTopColor:`border`,...t,children:e.map((e,t)=>{let n=`${e.label}-${t}`;return(0,r.jsx)(k,{variant:e.variant??`outline`,size:`sm`,onClick:e.onClick,minWidth:`{spacing.28}`,children:e.label},n)})}));At.displayName=`XlpDrawerFooter`;var jt=(0,e.forwardRef)(({children:e,onTheme:t,onOpenChange:i,maxWidth:a=`xl`,...o},s)=>{let c=b();return t&&t(c),(0,r.jsx)(n.Drawer.Root,{onOpenChange:e=>{i?.(e)},...o,children:(0,r.jsxs)(n.Portal,{children:[(0,r.jsx)(n.Drawer.Backdrop,{}),(0,r.jsx)(n.Drawer.Positioner,{children:(0,r.jsx)(n.Drawer.Content,{ref:s,"data-xlp-brand":c.brandId,bg:`bg.panel`,borderRadius:`lg`,shadow:`lg`,w:`full`,maxW:a,children:e})})]})})});jt.displayName=`XlpDrawer`;var Mt=Object.assign(jt,{Header:Ot,Body:kt,Footer:At,CloseTrigger:Dt});exports.AppThemeProvider=C,exports.AppToaster=a,exports.MultiThemeProvider=E,exports.RootProvider=O,exports.XlpAvatar=B,exports.XlpButton=k,exports.XlpCalendar=gt,exports.XlpCard=_e,exports.XlpCodeSnippet=be,exports.XlpDrawer=Mt,exports.XlpDropzone=Et,exports.XlpGlobalCalendarPreview=Tt,exports.XlpHeading=ve,exports.XlpInput=A,exports.XlpMenuItem=ye,exports.XlpPagination=Se,exports.XlpRadioGroup=P,exports.XlpSelect=M,exports.XlpSwitch=N,exports.XlpTabs=xe,exports.XlpTag=z,exports.XlpTextarea=j,exports.createSemanticColors=o,exports.createSemanticSpacing=c,exports.createSemanticTypography=s,exports.createTheme=d,exports.createThemeTokenBundle=u,exports.defaultTokens=f,exports.getRegisteredBrands=v,exports.meridianTokens=m,exports.registerBrand=g,exports.resolveBrandTokens=_,exports.toaster=i,exports.useTheme=b,exports.useThemeSwitcher=S,exports.xlpTokens=p;
2
+ //# sourceMappingURL=el-magico-ui.cjs.js.map