@accelint/design-toolkit 5.0.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/components/accordion/index.js +2 -0
  2. package/dist/components/accordion/styles.js +1 -1
  3. package/dist/components/accordion/styles.js.map +1 -1
  4. package/dist/components/action-bar/index.js +2 -0
  5. package/dist/components/action-bar/styles.d.ts +1 -1
  6. package/dist/components/action-bar/styles.js +1 -1
  7. package/dist/components/action-bar/styles.js.map +1 -1
  8. package/dist/components/avatar/index.js +2 -0
  9. package/dist/components/badge/index.js +2 -0
  10. package/dist/components/breadcrumbs/index.d.ts +15 -0
  11. package/dist/components/breadcrumbs/index.js +4 -0
  12. package/dist/components/breadcrumbs/index.js.map +1 -0
  13. package/dist/components/breadcrumbs/styles.d.ts +48 -0
  14. package/dist/components/breadcrumbs/styles.js +2 -0
  15. package/dist/components/breadcrumbs/styles.js.map +1 -0
  16. package/dist/components/breadcrumbs/types.d.ts +20 -0
  17. package/dist/components/breadcrumbs/types.js +2 -0
  18. package/dist/components/breadcrumbs/types.js.map +1 -0
  19. package/dist/components/button/index.d.ts +2 -2
  20. package/dist/components/button/index.js +3 -1
  21. package/dist/components/button/index.js.map +1 -1
  22. package/dist/components/button/styles.d.ts +15 -15
  23. package/dist/components/button/styles.js +1 -1
  24. package/dist/components/button/styles.js.map +1 -1
  25. package/dist/components/button/types.d.ts +7 -5
  26. package/dist/components/checkbox/index.js +2 -0
  27. package/dist/components/chip/index.js +2 -0
  28. package/dist/components/classification-badge/index.js +3 -1
  29. package/dist/components/classification-badge/index.js.map +1 -1
  30. package/dist/components/classification-badge/styles.d.ts +1 -1
  31. package/dist/components/classification-badge/styles.js +1 -1
  32. package/dist/components/classification-badge/styles.js.map +1 -1
  33. package/dist/components/classification-banner/index.js +3 -1
  34. package/dist/components/classification-banner/index.js.map +1 -1
  35. package/dist/components/classification-banner/styles.d.ts +1 -1
  36. package/dist/components/classification-banner/styles.js +1 -1
  37. package/dist/components/classification-banner/styles.js.map +1 -1
  38. package/dist/components/color-picker/index.js +2 -0
  39. package/dist/components/color-picker/styles.d.ts +3 -3
  40. package/dist/components/combobox-field/index.js +2 -0
  41. package/dist/components/combobox-field/styles.d.ts +1 -1
  42. package/dist/components/combobox-field/styles.js +1 -1
  43. package/dist/components/combobox-field/styles.js.map +1 -1
  44. package/dist/components/date-field/index.js +2 -0
  45. package/dist/components/date-field/index.js.map +1 -1
  46. package/dist/components/date-field/styles.d.ts +1 -1
  47. package/dist/components/date-field/styles.js +1 -1
  48. package/dist/components/date-field/styles.js.map +1 -1
  49. package/dist/components/details-list/index.js +2 -0
  50. package/dist/components/dialog/index.js +2 -0
  51. package/dist/components/dialog/styles.d.ts +1 -1
  52. package/dist/components/dialog/styles.js +1 -1
  53. package/dist/components/dialog/styles.js.map +1 -1
  54. package/dist/components/divider/index.d.ts +32 -0
  55. package/dist/components/divider/index.js +4 -0
  56. package/dist/components/divider/index.js.map +1 -0
  57. package/dist/components/divider/styles.d.ts +5 -0
  58. package/dist/components/divider/styles.js +2 -0
  59. package/dist/components/divider/styles.js.map +1 -0
  60. package/dist/components/divider/types.d.ts +11 -0
  61. package/dist/components/divider/types.js +2 -0
  62. package/dist/components/divider/types.js.map +1 -0
  63. package/dist/components/drawer/index.d.ts +12 -2
  64. package/dist/components/drawer/index.js +3 -1
  65. package/dist/components/drawer/index.js.map +1 -1
  66. package/dist/components/drawer/styles.d.ts +3 -3
  67. package/dist/components/drawer/styles.js +1 -1
  68. package/dist/components/drawer/styles.js.map +1 -1
  69. package/dist/components/drawer/types.d.ts +13 -7
  70. package/dist/components/hero/index.js +2 -0
  71. package/dist/components/hotkey/index.js +2 -0
  72. package/dist/components/icon/index.js +3 -1
  73. package/dist/components/icon/index.js.map +1 -1
  74. package/dist/components/input/index.js +2 -0
  75. package/dist/components/input/styles.js +1 -1
  76. package/dist/components/input/styles.js.map +1 -1
  77. package/dist/components/label/index.js +2 -0
  78. package/dist/components/link/index.js +2 -0
  79. package/dist/components/link/styles.d.ts +1 -1
  80. package/dist/components/link/styles.js +1 -1
  81. package/dist/components/link/styles.js.map +1 -1
  82. package/dist/components/menu/index.js +2 -0
  83. package/dist/components/menu/styles.js +1 -1
  84. package/dist/components/menu/styles.js.map +1 -1
  85. package/dist/components/options/index.js +2 -0
  86. package/dist/components/options/styles.d.ts +1 -1
  87. package/dist/components/options/styles.js +1 -1
  88. package/dist/components/options/styles.js.map +1 -1
  89. package/dist/components/popover/index.js +2 -0
  90. package/dist/components/popover/index.js.map +1 -1
  91. package/dist/components/query-builder/action-element.js +2 -0
  92. package/dist/components/query-builder/group.js +2 -0
  93. package/dist/components/query-builder/rule.js +2 -0
  94. package/dist/components/query-builder/value-editor.js +2 -0
  95. package/dist/components/radio/index.js +2 -0
  96. package/dist/components/search-field/index.js +2 -0
  97. package/dist/components/search-field/styles.js +1 -1
  98. package/dist/components/search-field/styles.js.map +1 -1
  99. package/dist/components/select-field/index.js +2 -0
  100. package/dist/components/select-field/types.d.ts +0 -1
  101. package/dist/components/sidenav/index.d.ts +16 -8
  102. package/dist/components/sidenav/index.js +3 -1
  103. package/dist/components/sidenav/index.js.map +1 -1
  104. package/dist/components/sidenav/styles.d.ts +43 -1
  105. package/dist/components/sidenav/styles.js +1 -1
  106. package/dist/components/sidenav/styles.js.map +1 -1
  107. package/dist/components/sidenav/types.d.ts +40 -8
  108. package/dist/components/slider/index.js +2 -0
  109. package/dist/components/slider/styles.d.ts +1 -1
  110. package/dist/components/slider/styles.js +1 -1
  111. package/dist/components/slider/styles.js.map +1 -1
  112. package/dist/components/switch/index.js +2 -0
  113. package/dist/components/table/context.d.ts +11 -0
  114. package/dist/components/table/context.js +2 -0
  115. package/dist/components/table/context.js.map +1 -0
  116. package/dist/components/table/index.d.ts +27 -0
  117. package/dist/components/table/index.js +4 -0
  118. package/dist/components/table/index.js.map +1 -0
  119. package/dist/components/table/styles.d.ts +134 -0
  120. package/dist/components/table/styles.js +2 -0
  121. package/dist/components/table/styles.js.map +1 -0
  122. package/dist/components/table/table-body.d.ts +12 -0
  123. package/dist/components/table/table-body.js +2 -0
  124. package/dist/components/table/table-body.js.map +1 -0
  125. package/dist/components/table/table-cell.d.ts +12 -0
  126. package/dist/components/table/table-cell.js +2 -0
  127. package/dist/components/table/table-cell.js.map +1 -0
  128. package/dist/components/table/table-header-cell.d.ts +12 -0
  129. package/dist/components/table/table-header-cell.js +2 -0
  130. package/dist/components/table/table-header-cell.js.map +1 -0
  131. package/dist/components/table/table-header.d.ts +12 -0
  132. package/dist/components/table/table-header.js +2 -0
  133. package/dist/components/table/table-header.js.map +1 -0
  134. package/dist/components/table/table-row.d.ts +12 -0
  135. package/dist/components/table/table-row.js +2 -0
  136. package/dist/components/table/table-row.js.map +1 -0
  137. package/dist/components/table/types.d.ts +185 -0
  138. package/dist/components/table/types.js +2 -0
  139. package/dist/components/table/types.js.map +1 -0
  140. package/dist/components/tabs/index.js +2 -0
  141. package/dist/components/tabs/styles.d.ts +1 -1
  142. package/dist/components/tabs/styles.js +1 -1
  143. package/dist/components/tabs/styles.js.map +1 -1
  144. package/dist/components/text-area-field/index.js +2 -0
  145. package/dist/components/text-field/index.js +2 -0
  146. package/dist/components/time-field/index.d.ts +10 -0
  147. package/dist/components/time-field/index.js +4 -0
  148. package/dist/components/time-field/index.js.map +1 -0
  149. package/dist/components/time-field/styles.d.ts +69 -0
  150. package/dist/components/time-field/styles.js +2 -0
  151. package/dist/components/time-field/styles.js.map +1 -0
  152. package/dist/components/time-field/types.d.ts +23 -0
  153. package/dist/components/time-field/types.js +2 -0
  154. package/dist/components/time-field/types.js.map +1 -0
  155. package/dist/components/tooltip/index.js +3 -1
  156. package/dist/components/tooltip/index.js.map +1 -1
  157. package/dist/components/tree/index.js +3 -1
  158. package/dist/components/tree/index.js.map +1 -1
  159. package/dist/components/tree/styles.js +1 -1
  160. package/dist/components/tree/styles.js.map +1 -1
  161. package/dist/components/view-stack/index.js +2 -0
  162. package/dist/foundation/token-data.js +1 -1
  163. package/dist/foundation/token-data.js.map +1 -1
  164. package/dist/hooks/use-tree/actions/cache.js +1 -1
  165. package/dist/hooks/use-tree/actions/cache.js.map +1 -1
  166. package/dist/hooks/use-tree/actions/index.js +2 -0
  167. package/dist/index.d.ts +21 -2
  168. package/dist/index.js +1 -1
  169. package/dist/metafile-esm.json +1 -1
  170. package/dist/providers/theme-provider.js +2 -0
  171. package/dist/styles.css +3079 -901
  172. package/dist/tokens/themes.css +56 -24
  173. package/dist/tokens/tokens.css +8 -8
  174. package/dist/tokens/tokens.d.ts +18 -0
  175. package/dist/tokens/tokens.js +1 -1
  176. package/dist/tokens/tokens.js.map +1 -1
  177. package/dist/tokens/types.d.ts +9 -0
  178. package/dist/variants/variants.css +3 -0
  179. package/package.json +12 -5
@@ -0,0 +1,32 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { ContextValue } from 'react-aria-components';
4
+ import { ProviderProps } from '../../lib/types.js';
5
+ import { DividerProps } from './types.js';
6
+
7
+ declare const DividerContext: react.Context<ContextValue<DividerProps, HTMLHRElement>>;
8
+ declare function DividerProvider({ children, ...props }: ProviderProps<DividerProps>): react_jsx_runtime.JSX.Element;
9
+ declare namespace DividerProvider {
10
+ var displayName: string;
11
+ }
12
+ /**
13
+ * Divider - A simple horizontal or vertical rule component
14
+ *
15
+ * Provides a visual separator between content sections with support for both
16
+ * horizontal and vertical orientations.
17
+ *
18
+ * @example
19
+ * // Basic horizontal divider
20
+ * <Divider />
21
+ *
22
+ * @example
23
+ * // Vertical divider
24
+ * <Divider orientation="vertical" />
25
+ */
26
+ declare function Divider({ ref, ...props }: DividerProps): react_jsx_runtime.JSX.Element;
27
+ declare namespace Divider {
28
+ var displayName: string;
29
+ var Provider: typeof DividerProvider;
30
+ }
31
+
32
+ export { Divider, DividerContext };
@@ -0,0 +1,4 @@
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps}from'react-aria-components';import {DividerStyles}from'./styles.js';const i=createContext(null);function o({children:r,...e}){return jsx(i.Provider,{value:e,children:r})}o.displayName="Divider.Provider";function t({ref:r,...e}){[e,r]=useContextProps(e,r??null,i);const{className:d,orientation:v="horizontal",...p}=e;return jsx("hr",{...p,ref:r,className:DividerStyles({className:d}),"data-orientation":v})}t.displayName="Divider",t.Provider=o;export{t as Divider,i as DividerContext};//# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/divider/index.tsx"],"names":["createContext","s","props","n","DividerProvider","ref","useContextProps","rest","l","Divider"],"mappings":"sLAsBEA,MAAyD,CAAA,CAAAC,aAAA,CAAI,IAE/D,EAAA,SAA2B,CAAA,CAAA,CAAA,UAAaC,CAAM,GAC5C,CAAA,CAAA,CAAA,CAAA,OACkBC,GAAA,CAAA,CAAA,CAAA,eAAwB,CAAA,CAAA,CAAA,QAE5C,CACAC,EAAgB,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,kBAgBvB,CAAA,SAAmB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACtC,CAACA,EAAOG,CAAG,CAAA,CAAIC,EAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,QAE7C,SAAQ,CAAA,SAAW,CAAA,CAAA,CAAA,WAAc,CAAA,CAAA,CAAA,YAAiBE,CAAK,IAEvD,CAAA,CAAA,CAAA,CAAA,eAEK,CAAGA,CAAAA,KACCF,GACL,CAAA,CAAA,CAAA,SAA2B,CAAAG,aAAA,CAAA,CAAA,SAAW,CACtC,sBAGN,CACAC,CAAAA,CAAQ,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,SACd,CAAA,CAAA,CAAA,QAAWL,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport { DividerStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { DividerProps } from './types';\n\nexport const DividerContext =\n createContext<ContextValue<DividerProps, HTMLHRElement>>(null);\n\nfunction DividerProvider({ children, ...props }: ProviderProps<DividerProps>) {\n return (\n <DividerContext.Provider value={props}>{children}</DividerContext.Provider>\n );\n}\nDividerProvider.displayName = 'Divider.Provider';\n\n/**\n * Divider - A simple horizontal or vertical rule component\n *\n * Provides a visual separator between content sections with support for both\n * horizontal and vertical orientations.\n *\n * @example\n * // Basic horizontal divider\n * <Divider />\n *\n * @example\n * // Vertical divider\n * <Divider orientation=\"vertical\" />\n */\nexport function Divider({ ref, ...props }: DividerProps) {\n [props, ref] = useContextProps(props, ref ?? null, DividerContext);\n\n const { className, orientation = 'horizontal', ...rest } = props;\n\n return (\n <hr\n {...rest}\n ref={ref}\n className={DividerStyles({ className })}\n data-orientation={orientation}\n />\n );\n}\nDivider.displayName = 'Divider';\nDivider.Provider = DividerProvider;\n"]}
@@ -0,0 +1,5 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const DividerStyles: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], unknown, unknown>>;
4
+
5
+ export { DividerStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';const e=tv({base:["shrink-0 grow-0 border-0 bg-[var(--outline-static)]","orientation-horizontal:h-px orientation-horizontal:w-full","orientation-vertical:h-full orientation-vertical:w-px","[&:where(.flex>&)]:self-stretch","[&:where(.flex>&)]:orientation-horizontal:w-auto","[&:where(.flex>&)]:orientation-vertical:h-auto"]});export{e as DividerStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/divider/styles.ts"],"names":["t"],"mappings":"sCAeE,MAAM,CACJ,CAAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,iHAEA,CAAA,uDAEA,CAAA,iCACA,CAAA,kDACA,CAAA,gDAEH,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const DividerStyles = tv({\n base: [\n 'shrink-0 grow-0 border-0 bg-[var(--outline-static)]',\n 'orientation-horizontal:h-px orientation-horizontal:w-full',\n 'orientation-vertical:h-full orientation-vertical:w-px',\n // CSS flexbox breaks height: 100%, so we utilize align-self: stretch & height: auto instead. While width isn't broken, for consistency it's implemented the same way\n '[&:where(.flex>&)]:self-stretch',\n '[&:where(.flex>&)]:orientation-horizontal:w-auto',\n '[&:where(.flex>&)]:orientation-vertical:h-auto',\n ],\n});\n"]}
@@ -0,0 +1,11 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+
3
+ type DividerProps = ComponentPropsWithRef<'hr'> & {
4
+ /**
5
+ * The orientation of the divider.
6
+ * @default 'horizontal'
7
+ */
8
+ orientation?: 'horizontal' | 'vertical';
9
+ };
10
+
11
+ export type { DividerProps };
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
@@ -30,6 +30,14 @@ declare function DrawerTrigger({ children, for: events }: DrawerTriggerProps): r
30
30
  declare namespace DrawerTrigger {
31
31
  var displayName: string;
32
32
  }
33
+ declare function DrawerClose(): react_jsx_runtime.JSX.Element;
34
+ declare namespace DrawerClose {
35
+ var displayName: string;
36
+ }
37
+ declare function DrawerBack(): react_jsx_runtime.JSX.Element | null;
38
+ declare namespace DrawerBack {
39
+ var displayName: string;
40
+ }
33
41
  declare function DrawerLayoutMain({ className, ...rest }: ComponentPropsWithRef<'main'>): react_jsx_runtime.JSX.Element;
34
42
  declare namespace DrawerLayoutMain {
35
43
  var displayName: string;
@@ -39,7 +47,7 @@ declare namespace DrawerLayout {
39
47
  var displayName: string;
40
48
  var Main: typeof DrawerLayoutMain;
41
49
  }
42
- declare function DrawerMenuItem({ for: id, children, className, toggle, views, ...rest }: DrawerMenuItemProps): react_jsx_runtime.JSX.Element | null;
50
+ declare function DrawerMenuItem({ for: id, children, classNames, toggle, textValue, ...rest }: DrawerMenuItemProps): react_jsx_runtime.JSX.Element | null;
43
51
  declare namespace DrawerMenuItem {
44
52
  var displayName: string;
45
53
  }
@@ -65,7 +73,7 @@ declare function DrawerHeaderTitle({ className, level, ...rest }: DrawerTitlePro
65
73
  declare namespace DrawerHeaderTitle {
66
74
  var displayName: string;
67
75
  }
68
- declare function DrawerHeader({ className, ...rest }: ComponentPropsWithRef<'header'>): react_jsx_runtime.JSX.Element;
76
+ declare function DrawerHeader({ className, title, children, ...rest }: ComponentPropsWithRef<'header'>): react_jsx_runtime.JSX.Element;
69
77
  declare namespace DrawerHeader {
70
78
  var displayName: string;
71
79
  var Title: typeof DrawerHeaderTitle;
@@ -89,6 +97,8 @@ declare namespace Drawer {
89
97
  var Content: typeof DrawerContent;
90
98
  var Footer: typeof DrawerFooter;
91
99
  var Trigger: typeof DrawerTrigger;
100
+ var Close: typeof DrawerClose;
101
+ var Back: typeof DrawerBack;
92
102
  }
93
103
 
94
104
  export { Drawer, DrawerContext, DrawerEventHandlers };
@@ -1,2 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import'client-only';import {Broadcast}from'@accelint/bus';import {isUUID}from'@accelint/core';import {Pressable}from'@react-aria/interactions';import {createContext,useRef,useState,useCallback,useEffect,useContext}from'react';import {composeRenderProps,Heading,Header}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {ToggleButton}from'../button/index.js';import {Icon}from'../icon/index.js';import {ViewStackEventHandlers,ViewStack,ViewStackContext}from'../view-stack/index.js';import {ViewStackEventTypes}from'../view-stack/events.js';import {DrawerEventTypes}from'./events.js';import {DrawerStyles,DrawerMenuStyles,DrawerTitleStyles}from'./styles.js';const {layout:j,main:ee,drawer:re,panel:te,view:ae,header:ne,content:oe,footer:ie}=DrawerStyles(),{menu:se,item:pe}=DrawerMenuStyles(),l=Broadcast.getInstance(),R=createContext({register:()=>{},unregister:()=>{}}),le={...ViewStackEventHandlers,close:ViewStackEventHandlers.clear,open:e=>l.emit(DrawerEventTypes.open,{view:e}),toggle:e=>l.emit(DrawerEventTypes.toggle,{view:e})};function g({children:e,for:r}){const{parent:n}=useContext(ViewStackContext);function o(){for(const i of Array.isArray(r)?r:[r]){let[p,m]=isUUID(i)?["push",i]:i.split(":");m??=n,m&&le[p](m);}}return jsx(Pressable,{onPress:o,children:e})}g.displayName="Drawer.Trigger";function q({className:e,...r}){return jsx("main",{...r,className:ee({className:e})})}q.displayName="Drawer.Layout.Main";function P({className:e,extend:r="left right",push:n,...o}){return jsx("div",{...o,className:j({className:e}),"data-extend":r,"data-push":n})}P.displayName="Drawer.Layout",P.Main=q;function N({for:e,children:r,className:n,toggle:o,views:i,...p}){const{parent:m,stack:y}=useContext(ViewStackContext),c=y.at(-1),w=o?"toggle":"open";return m?jsx(g,{for:`${w}:${e}`,children:jsx(ToggleButton,{...p,className:composeRenderProps(n,u=>pe({className:u})),role:"tab",variant:"icon",isSelected:e===c||!!i?.some(u=>e===u),children:composeRenderProps(r,u=>jsx(Icon,{children:u}))})}):null}N.displayName="Drawer.Menu.Item";function d({className:e,position:r="center",children:n,...o}){return containsExactChildren({children:n,componentName:d.displayName,restrictions:[[N,{min:1}],[g,{min:0,max:0}]]}),jsx("nav",{...o,className:se({position:r,className:e}),children:n})}d.displayName="Drawer.Menu",d.Item=N;function h({className:e,...r}){return jsx("div",{...r,className:te({className:e})})}h.displayName="Drawer.Panel";function H({id:e,children:r,className:n,...o}){const{register:i,unregister:p}=useContext(R);return useEffect(()=>{i(e);},[i,p,e]),jsx(ViewStack.View,{id:e,children:jsx("div",{...o,className:ae({className:n}),role:"tabpanel",children:r})})}H.displayName="Drawer.View";function b({className:e,level:r,...n}){return jsx(Heading,{...n,className:DrawerTitleStyles({className:e,level:r}),level:r})}b.displayName="Drawer.Title";function C({className:e,...r}){return jsx(Header,{...r,className:ne({className:e})})}C.displayName="Drawer.Header",C.Title=b;function L({className:e,...r}){return jsx("div",{...r,className:oe({className:e})})}L.displayName="Drawer.Content";function W({className:e,...r}){return jsx("footer",{...r,className:ie({className:e})})}W.displayName="Drawer.Footer";function s({id:e,children:r,className:n,defaultView:o,placement:i="left",size:p="medium",onChange:m,...y}){containsExactChildren({children:r,componentName:s.displayName,restrictions:[[d,{min:0,max:1}],[h,{min:1,max:1}]]});const c=useRef(new Set),[w,u]=useState(o||null),T=useCallback(a=>{c.current.has(a?.payload?.view)&&(l.emit(ViewStackEventTypes.clear,{stack:e}),l.emit(ViewStackEventTypes.push,a.payload));},[e]),V=useCallback(a=>{c.current.has(a?.payload?.view)&&(l.emit(ViewStackEventTypes.clear,{stack:e}),w!==a?.payload?.view&&l.emit(ViewStackEventTypes.push,a.payload));},[e,w]);return useEffect(()=>{const a=[l.on(DrawerEventTypes.open,T),l.on(DrawerEventTypes.toggle,V)];return ()=>{for(const A of a)A();}},[T,V]),jsx(R.Provider,{value:{register:a=>c.current.add(a),unregister:a=>c.current.delete(a)},children:jsx(ViewStack,{id:e,defaultView:o,onChange:a=>{u(a),m?.(a);},children:jsx("div",{...y,className:re({className:n}),"data-open":!!w||null,"data-placement":i,"data-size":p,children:r})})})}s.displayName="Drawer",s.Layout=P,s.Menu=d,s.Panel=h,s.View=H,s.Header=C,s.Content=L,s.Footer=W,s.Trigger=g;export{s as Drawer,R as DrawerContext,le as DrawerEventHandlers};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {Broadcast}from'@accelint/bus';import {isUUID}from'@accelint/core';import {Cancel,ChevronLeft}from'@accelint/icons';import {Pressable}from'@react-aria/interactions';import {createContext,useRef,useState,useCallback,useEffect,useContext}from'react';import {composeRenderProps,Heading,Header}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {Button,ToggleButton}from'../button/index.js';import {Icon}from'../icon/index.js';import {Tooltip}from'../tooltip/index.js';import {ViewStackEventHandlers,ViewStack,ViewStackContext}from'../view-stack/index.js';import {ViewStackEventTypes}from'../view-stack/events.js';import {DrawerEventTypes}from'./events.js';import {DrawerStyles,DrawerMenuStyles,DrawerTitleStyles}from'./styles.js';const {layout:ie,main:se,drawer:le,panel:pe,view:ce,header:me,content:ue,footer:we}=DrawerStyles(),{menu:fe,item:de}=DrawerMenuStyles(),p=Broadcast.getInstance(),k=createContext({register:()=>{},unregister:()=>{},placement:"left"}),ge={...ViewStackEventHandlers,close:ViewStackEventHandlers.clear,open:e=>p.emit(DrawerEventTypes.open,{view:e}),toggle:e=>p.emit(DrawerEventTypes.toggle,{view:e})};function T({children:e,for:t}){const{parent:a}=useContext(ViewStackContext);function i(){for(const s of Array.isArray(t)?t:[t]){let[l,c]=isUUID(s)?["push",s]:s.split(":");c??=a,c&&ge[l](c);}}return jsx(Pressable,{onPress:i,children:e})}T.displayName="Drawer.Trigger";function L(){return jsx(o.Trigger,{for:"close",children:jsx(Button,{variant:"icon",children:jsx(Icon,{children:jsx(Cancel,{})})})})}L.displayName="Drawer.Close";function W(){const{stack:e}=useContext(ViewStackContext);return e.length>1?jsx(o.Trigger,{for:"back",children:jsx(Button,{variant:"icon",children:jsx(Icon,{children:jsx(ChevronLeft,{})})})}):null}W.displayName="Drawer.Back";function A({className:e,...t}){return jsx("main",{...t,className:se({className:e})})}A.displayName="Drawer.Layout.Main";function I({className:e,extend:t="left right",push:a,...i}){return jsx("div",{...i,className:ie({className:e}),"data-extend":t,"data-push":a})}I.displayName="Drawer.Layout",I.Main=A;const De={left:"right",right:"left",top:"bottom",bottom:"top"};function V({for:e,children:t,classNames:a,toggle:i,textValue:s,...l}){const{parent:c,stack:f}=useContext(ViewStackContext),{placement:m}=useContext(k),d=f.at(-1),N=i?"toggle":"open",g=useRef(null);return c?jsxs(Tooltip,{children:[jsx(Tooltip.Trigger,{children:jsx(T,{for:`${N}:${e}`,children:jsx(ToggleButton,{...l,ref:g,className:composeRenderProps(a?.item,u=>de({className:u})),role:"tab",variant:"icon",isSelected:e===d||f.length>1&&f.includes(e),children:composeRenderProps(t,u=>jsx(Icon,{children:u}))})})}),jsx(Tooltip.Body,{triggerRef:g,placement:De[m],offset:6,className:a?.tooltip,children:s})]}):null}V.displayName="Drawer.Menu.Item";function D({className:e,position:t="center",children:a,...i}){return containsExactChildren({children:a,componentName:D.displayName,restrictions:[[V,{min:1}],[T,{min:0,max:0}]]}),jsx("nav",{...i,className:fe({position:t,className:e}),children:a})}D.displayName="Drawer.Menu",D.Item=V;function x({className:e,...t}){return jsx("div",{...t,className:pe({className:e})})}x.displayName="Drawer.Panel";function F({id:e,children:t,className:a,...i}){const{register:s,unregister:l}=useContext(k);return useEffect(()=>{s(e);},[s,l,e]),jsx(ViewStack.View,{id:e,children:jsx("div",{...i,className:ce({className:a}),role:"tabpanel",children:t})})}F.displayName="Drawer.View";function O({className:e,level:t,...a}){return jsx(Heading,{...a,className:DrawerTitleStyles({className:e,level:t}),level:t})}O.displayName="Drawer.Title";function M({className:e,title:t,children:a,...i}){const{stack:s}=useContext(ViewStackContext),l=s.length>1?4:1;return jsx(Header,{...i,className:me({className:e}),children:t?jsxs(Fragment,{children:[jsx(o.Back,{}),jsx(o.Header.Title,{level:l,className:"w-fit",children:t}),jsx(o.Close,{})]}):a})}M.displayName="Drawer.Header",M.Title=O;function $({className:e,...t}){return jsx("div",{...t,className:ue({className:e})})}$.displayName="Drawer.Content";function z({className:e,...t}){return jsx("footer",{...t,className:we({className:e})})}z.displayName="Drawer.Footer";function o({id:e,children:t,className:a,defaultView:i,placement:s="left",size:l="medium",onChange:c,...f}){containsExactChildren({children:t,componentName:o.displayName,restrictions:[[D,{min:0,max:1}],[x,{min:1,max:1}]]});const m=useRef(new Set),[d,N]=useState(i||null),g=useCallback(n=>{m.current.has(n?.payload?.view)&&(p.emit(ViewStackEventTypes.clear,{stack:e}),p.emit(ViewStackEventTypes.push,n.payload));},[e]),u=useCallback(n=>{m.current.has(n?.payload?.view)&&(p.emit(ViewStackEventTypes.clear,{stack:e}),d!==n?.payload?.view&&p.emit(ViewStackEventTypes.push,n.payload));},[e,d]);return useEffect(()=>{const n=[p.on(DrawerEventTypes.open,g),p.on(DrawerEventTypes.toggle,u)];return ()=>{for(const J of n)J();}},[g,u]),jsx(k.Provider,{value:{register:n=>m.current.add(n),unregister:n=>m.current.delete(n),placement:s},children:jsx(ViewStack,{id:e,defaultView:i,onChange:n=>{N(n),c?.(n);},children:jsx("div",{...f,className:le({className:a}),"data-open":!!d||null,"data-placement":s,"data-size":l,children:t})})})}o.displayName="Drawer",o.Layout=I,o.Menu=D,o.Panel=x,o.View=F,o.Header=M,o.Content=$,o.Footer=z,o.Trigger=T,o.Close=L,o.Back=W;export{o as Drawer,k as DrawerContext,ge as DrawerEventHandlers};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/drawer/index.tsx"],"names":["header","DrawerStyles","item","bus","Broadcast","createContext","Z","Y","B","ViewStackEventHandlers","$","view","U","D","DrawerTrigger","children","events","useContext","ViewStackContext","handlePress","type","v","E","isUUID","id","parent","DrawerEventHandlers","event","jsx","Pressable","t","O","className","rest","main","DrawerLayoutMain","DrawerLayout","extend","push","DrawerMenuItem","toggle","action","composeRenderProps","Q","x","views","X","DrawerMenu","position","S","DrawerPanel","panel","register","DrawerContext","useEffect","ViewStack","k","M","DrawerHeaderTitle","level","K","_","DrawerHeader","J","DrawerContent","content","defaultView","placement","size","activeView","setActiveView","useState","useCallback","data","G","ViewStackEventTypes","I","handleToggle","f","listeners","DrawerEventTypes","off","handleOpen","onChange","drawer","Drawer","DrawerFooter"],"mappings":"6tBAoD2C,MAAAA,CAAAA,MAAQ,CAAA,CAAA,CAAA,IAAS,UAAO,CACjEC,EAAa,CAAA,KACP,CAAA,OAAM,CAAA,EAAAC,CAAK,MACbC,CAAAA,EAAMC,CAAU,OAAA,CAAA,EAAA,CAAA,MAEOC,CAAkC,EAC7D,CAAA,CAAAC,YAAA,EAAA,CAAA,CAAA,IAAU,CAAG,GACb,IAAA,CAAA,EAAA,CAAA,CAAAC,gBAAA,EAAY,CAAA,CAAA,CAAGC,SAAA,CACjB,WAGKC,EACH,CAAA,CAAA,CAAAC,aAAA,CAAOD,CAAAA,QACP,CAAA,MAA0BN,CAAAA,UAA0B,CAAA,IAAQ,CAAA,CAAA,CAAA,CAAAQ,CAAK,EAAC,CAClE,CAAA,GAAAC,sBAAA,CAAA,KAA4BT,CAAIS,sBAAA,CAAA,KAAsB,CAAA,IAAA,CAAA,CAAQ,EAAE,CAAA,CAAA,IAAM,CACxEC,iBAEA,IAAA,CAAA,CAAA,IAASC,CAAc,CAAE,CAAA,CAAA,CAAA,MAAAC,CAAAA,CAAU,EAAA,CAAA,CAAKC,IACtC,CAAAH,gBAAA,CAAA,MAAQ,CAAA,CAAA,IAAO,CAAII,CAAAA,CAAWC,CAAgB,EAE9C,SA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,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Broadcast } from '@accelint/bus';\nimport { isUUID, type UniqueId } from '@accelint/core';\nimport { Pressable } from '@react-aria/interactions';\nimport {\n type ComponentPropsWithRef,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { composeRenderProps, Header, Heading } from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { ToggleButton } from '../button';\nimport { Icon } from '../icon';\nimport {\n ViewStack,\n ViewStackContext,\n ViewStackEventHandlers,\n} from '../view-stack';\nimport { ViewStackEventTypes } from '../view-stack/events';\nimport { DrawerEventTypes } from './events';\nimport { DrawerMenuStyles, DrawerStyles, DrawerTitleStyles } from './styles';\nimport type { ViewStackViewProps } from '../view-stack/types';\nimport type {\n DrawerContextValue,\n DrawerEvent,\n DrawerLayoutProps,\n DrawerMenuItemProps,\n DrawerMenuProps,\n DrawerOpenEvent,\n DrawerProps,\n DrawerTitleProps,\n DrawerToggleEvent,\n DrawerTriggerProps,\n} from './types';\n\nconst { layout, main, drawer, panel, view, header, content, footer } =\n DrawerStyles();\nconst { menu, item } = DrawerMenuStyles();\nconst bus = Broadcast.getInstance<DrawerEvent>();\n\nexport const DrawerContext = createContext<DrawerContextValue>({\n register: () => undefined,\n unregister: () => undefined,\n});\n\nexport const DrawerEventHandlers = {\n ...ViewStackEventHandlers,\n close: ViewStackEventHandlers.clear,\n open: (view: UniqueId) => bus.emit(DrawerEventTypes.open, { view }),\n toggle: (view: UniqueId) => bus.emit(DrawerEventTypes.toggle, { view }),\n} as const;\n\nfunction DrawerTrigger({ children, for: events }: DrawerTriggerProps) {\n const { parent } = useContext(ViewStackContext);\n\n function handlePress() {\n for (const type of Array.isArray(events) ? events : [events]) {\n let [event, id] = (isUUID(type) ? ['push', type] : type.split(':')) as [\n 'back' | 'clear' | 'close' | 'open' | 'push' | 'reset' | 'toggle',\n UniqueId | undefined | null,\n ];\n\n id ??= parent;\n\n if (!id) {\n continue;\n }\n\n DrawerEventHandlers[event](id);\n }\n }\n\n return <Pressable onPress={handlePress}>{children}</Pressable>;\n}\nDrawerTrigger.displayName = 'Drawer.Trigger';\n\nfunction DrawerLayoutMain({\n className,\n ...rest\n}: ComponentPropsWithRef<'main'>) {\n return <main {...rest} className={main({ className })} />;\n}\nDrawerLayoutMain.displayName = 'Drawer.Layout.Main';\n\nfunction DrawerLayout({\n className,\n extend = 'left right',\n push,\n ...rest\n}: DrawerLayoutProps) {\n return (\n <div\n {...rest}\n className={layout({ className })}\n data-extend={extend}\n data-push={push}\n />\n );\n}\nDrawerLayout.displayName = 'Drawer.Layout';\nDrawerLayout.Main = DrawerLayoutMain;\n\nfunction DrawerMenuItem({\n for: id,\n children,\n className,\n toggle,\n views,\n ...rest\n}: DrawerMenuItemProps) {\n const { parent, stack } = useContext(ViewStackContext);\n const view = stack.at(-1);\n const action = toggle ? 'toggle' : 'open';\n\n if (!parent) {\n return null;\n }\n\n return (\n <DrawerTrigger for={`${action}:${id}`}>\n <ToggleButton\n {...rest}\n className={composeRenderProps(className, (className) =>\n item({ className }),\n )}\n role='tab'\n variant='icon'\n isSelected={id === view || !!views?.some((view) => id === view)}\n >\n {composeRenderProps(children, (children) => (\n <Icon>{children}</Icon>\n ))}\n </ToggleButton>\n </DrawerTrigger>\n );\n}\nDrawerMenuItem.displayName = 'Drawer.Menu.Item';\n\nfunction DrawerMenu({\n className,\n position = 'center',\n children,\n ...rest\n}: DrawerMenuProps) {\n containsExactChildren({\n children,\n componentName: DrawerMenu.displayName,\n restrictions: [\n [DrawerMenuItem, { min: 1 }],\n [DrawerTrigger, { min: 0, max: 0 }],\n ],\n });\n return (\n <nav\n {...rest}\n className={menu({\n position,\n className,\n })}\n >\n {children}\n </nav>\n );\n}\nDrawerMenu.displayName = 'Drawer.Menu';\nDrawerMenu.Item = DrawerMenuItem;\n\nfunction DrawerPanel({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={panel({ className })} />;\n}\nDrawerPanel.displayName = 'Drawer.Panel';\n\nfunction DrawerView({\n id,\n children,\n className,\n ...rest\n}: ViewStackViewProps & ComponentPropsWithRef<'div'>) {\n const { register, unregister } = useContext(DrawerContext);\n\n useEffect(() => {\n register(id);\n\n () => unregister(id);\n }, [register, unregister, id]);\n\n return (\n <ViewStack.View id={id}>\n <div {...rest} className={view({ className })} role='tabpanel'>\n {children}\n </div>\n </ViewStack.View>\n );\n}\nDrawerView.displayName = 'Drawer.View';\n\n/**\n * To change size of title, use the `level` prop: `1`-`3` (large), `4`-`6` (medium).\n *\n * `level` also changes the semantic heading tag number `h1`-`h6`\n */\nfunction DrawerHeaderTitle({ className, level, ...rest }: DrawerTitleProps) {\n return (\n <Heading\n {...rest}\n className={DrawerTitleStyles({ className, level })}\n level={level}\n />\n );\n}\nDrawerHeaderTitle.displayName = 'Drawer.Title';\n\nfunction DrawerHeader({ className, ...rest }: ComponentPropsWithRef<'header'>) {\n return <Header {...rest} className={header({ className })} />;\n}\nDrawerHeader.displayName = 'Drawer.Header';\nDrawerHeader.Title = DrawerHeaderTitle;\n\nfunction DrawerContent({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={content({ className })} />;\n}\nDrawerContent.displayName = 'Drawer.Content';\n\nfunction DrawerFooter({ className, ...rest }: ComponentPropsWithRef<'footer'>) {\n return <footer {...rest} className={footer({ className })} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n\nexport function Drawer({\n id,\n children,\n className,\n defaultView,\n placement = 'left',\n size = 'medium',\n onChange,\n ...rest\n}: DrawerProps) {\n containsExactChildren({\n children,\n componentName: Drawer.displayName,\n restrictions: [\n [DrawerMenu, { min: 0, max: 1 }],\n [DrawerPanel, { min: 1, max: 1 }],\n ],\n });\n\n const views = useRef(new Set<UniqueId>());\n const [activeView, setActiveView] = useState<UniqueId | null>(\n defaultView || null,\n );\n\n const handleOpen = useCallback(\n (data: DrawerOpenEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n },\n [id],\n );\n const handleToggle = useCallback(\n (data: DrawerToggleEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n if (activeView !== data?.payload?.view) {\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n }\n },\n [id, activeView],\n );\n\n useEffect(() => {\n const listeners = [\n bus.on(DrawerEventTypes.open, handleOpen),\n bus.on(DrawerEventTypes.toggle, handleToggle),\n ];\n\n return () => {\n for (const off of listeners) {\n off();\n }\n };\n }, [handleOpen, handleToggle]);\n\n return (\n <DrawerContext.Provider\n value={{\n register: (view: UniqueId) => views.current.add(view),\n unregister: (view: UniqueId) => views.current.delete(view),\n }}\n >\n <ViewStack\n id={id}\n defaultView={defaultView}\n onChange={(view) => {\n setActiveView(view);\n onChange?.(view);\n }}\n >\n <div\n {...rest}\n className={drawer({ className })}\n data-open={!!activeView || null}\n data-placement={placement}\n data-size={size}\n >\n {children}\n </div>\n </ViewStack>\n </DrawerContext.Provider>\n );\n}\nDrawer.displayName = 'Drawer';\n\nDrawer.Layout = DrawerLayout;\nDrawer.Menu = DrawerMenu;\nDrawer.Panel = DrawerPanel;\nDrawer.View = DrawerView;\nDrawer.Header = DrawerHeader;\nDrawer.Content = DrawerContent;\nDrawer.Footer = DrawerFooter;\nDrawer.Trigger = DrawerTrigger;\n"]}
1
+ {"version":3,"sources":["../../../src/components/drawer/index.tsx"],"names":["DrawerStyles","menu","item","bus","Broadcast","DrawerContext","createContext","oe","ae","K","DrawerEventHandlers","_","ViewStackEventHandlers","view","q","P","DrawerTrigger","children","parent","handlePress","events","event","id","y","isUUID","type","jsx","Pressable","Q","r","Z","Icon","Cancel","b","h","DrawerBack","X","stack","useContext","ViewStackContext","Button","w","ChevronLeft","Y","className","rest","DrawerLayoutMain","DrawerLayout","layout","push","tooltipPlacementMap","DrawerMenuItem","textValue","placement","action","toggle","useRef","Tooltip","G","C","classNames","te","H","composeRenderProps","tooltipRef","DrawerMenu","R","position","DrawerPanel","panel","register","useEffect","unregister","ViewStack","B","U","DrawerView","level","Heading","re","ne","DrawerHeader","title","header","jsxs","Fragment","ee","Drawer","ye","DrawerHeaderTitle","DrawerContent","content","DrawerFooter","size","onChange","activeView","setActiveView","useState","defaultView","handleOpen","useCallback","data","views","E","ViewStackEventTypes","j","handleToggle","v","listeners","DrawerEventTypes","off","drawer","DrawerClose"],"mappings":"60BAsDmD,MAAA,CAAA,MAAS,CAAA,EAAA,CAAA,IAAO,CACjEA,EAAAA,CAAa,MACP,CAAA,EAAAC,CAAAA,KAAM,CAAAC,EAAK,KAAqB,CAAA,EAClCC,CAAMC,MAAU,CAAA,EAAA,CAAA,OAETC,CAAgBC,EAAkC,CAC7D,MAAA,CAAA,EAAU,CAAA,CAAAC,YAAG,EAAA,CACb,CAAA,IAAA,CAAA,EAAA,CAAA,IAAY,CAAA,EAAG,CAAA,CACfC,gBAAA,EAAA,CAAA,CAAA,CAAAC,SAAA,CAAA,WAGWC,EAAsB,CACjC,CAAA,CAAAC,aAAGC,CAAAA,CACH,QAA8B,CAAA,IAAA,CAC9B,CAAA,CAAA,UAA8B,CAAA,IAAsB,CAAA,CAAA,CAAA,SAAa,CAAC,MAClE,CAAA,CAAA,CAASC,EAAAA,CAAmBV,CAAAA,GAAIW,sB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cesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Broadcast } from '@accelint/bus';\nimport { isUUID, type UniqueId } from '@accelint/core';\nimport { Cancel, ChevronLeft } from '@accelint/icons';\nimport { Pressable } from '@react-aria/interactions';\nimport {\n type ComponentPropsWithRef,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { composeRenderProps, Header, Heading } from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { Button, ToggleButton } from '../button';\nimport { Icon } from '../icon';\nimport { Tooltip } from '../tooltip';\nimport {\n ViewStack,\n ViewStackContext,\n ViewStackEventHandlers,\n} from '../view-stack';\nimport { ViewStackEventTypes } from '../view-stack/events';\nimport { DrawerEventTypes } from './events';\nimport { DrawerMenuStyles, DrawerStyles, DrawerTitleStyles } from './styles';\nimport type { ViewStackViewProps } from '../view-stack/types';\nimport type {\n DrawerContextValue,\n DrawerEvent,\n DrawerLayoutProps,\n DrawerMenuItemProps,\n DrawerMenuProps,\n DrawerOpenEvent,\n DrawerProps,\n DrawerTitleProps,\n DrawerToggleEvent,\n DrawerTriggerProps,\n} from './types';\n\nconst { layout, main, drawer, panel, view, header, content, footer } =\n DrawerStyles();\nconst { menu, item } = DrawerMenuStyles();\nconst bus = Broadcast.getInstance<DrawerEvent>();\n\nexport const DrawerContext = createContext<DrawerContextValue>({\n register: () => undefined,\n unregister: () => undefined,\n placement: 'left',\n});\n\nexport const DrawerEventHandlers = {\n ...ViewStackEventHandlers,\n close: ViewStackEventHandlers.clear,\n open: (view: UniqueId) => bus.emit(DrawerEventTypes.open, { view }),\n toggle: (view: UniqueId) => bus.emit(DrawerEventTypes.toggle, { view }),\n} as const;\n\nfunction DrawerTrigger({ children, for: events }: DrawerTriggerProps) {\n const { parent } = useContext(ViewStackContext);\n\n function handlePress() {\n for (const type of Array.isArray(events) ? events : [events]) {\n let [event, id] = (isUUID(type) ? ['push', type] : type.split(':')) as [\n 'back' | 'clear' | 'close' | 'open' | 'push' | 'reset' | 'toggle',\n UniqueId | undefined | null,\n ];\n\n id ??= parent;\n\n if (!id) {\n continue;\n }\n\n DrawerEventHandlers[event](id);\n }\n }\n\n return <Pressable onPress={handlePress}>{children}</Pressable>;\n}\nDrawerTrigger.displayName = 'Drawer.Trigger';\n\nfunction DrawerClose() {\n return (\n <Drawer.Trigger for='close'>\n <Button variant='icon'>\n <Icon>\n <Cancel />\n </Icon>\n </Button>\n </Drawer.Trigger>\n );\n}\n\nDrawerClose.displayName = 'Drawer.Close';\n\nfunction DrawerBack() {\n const { stack } = useContext(ViewStackContext);\n return stack.length > 1 ? (\n <Drawer.Trigger for='back'>\n <Button variant='icon'>\n <Icon>\n <ChevronLeft />\n </Icon>\n </Button>\n </Drawer.Trigger>\n ) : null;\n}\n\nDrawerBack.displayName = 'Drawer.Back';\n\nfunction DrawerLayoutMain({\n className,\n ...rest\n}: ComponentPropsWithRef<'main'>) {\n return <main {...rest} className={main({ className })} />;\n}\nDrawerLayoutMain.displayName = 'Drawer.Layout.Main';\n\nfunction DrawerLayout({\n className,\n extend = 'left right',\n push,\n ...rest\n}: DrawerLayoutProps) {\n return (\n <div\n {...rest}\n className={layout({ className })}\n data-extend={extend}\n data-push={push}\n />\n );\n}\nDrawerLayout.displayName = 'Drawer.Layout';\nDrawerLayout.Main = DrawerLayoutMain;\n\nconst tooltipPlacementMap = {\n left: 'right',\n right: 'left',\n top: 'bottom',\n bottom: 'top',\n} as const;\n\nfunction DrawerMenuItem({\n for: id,\n children,\n classNames,\n toggle,\n textValue,\n ...rest\n}: DrawerMenuItemProps) {\n const { parent, stack } = useContext(ViewStackContext);\n const { placement } = useContext(DrawerContext);\n const view = stack.at(-1);\n const action = toggle ? 'toggle' : 'open';\n const tooltipRef = useRef(null);\n\n if (!parent) {\n return null;\n }\n\n return (\n <Tooltip>\n <Tooltip.Trigger>\n <DrawerTrigger for={`${action}:${id}`}>\n <ToggleButton\n {...rest}\n ref={tooltipRef}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className }),\n )}\n role='tab'\n variant='icon'\n isSelected={id === view || (stack.length > 1 && stack.includes(id))}\n >\n {composeRenderProps(children, (children) => (\n <Icon>{children}</Icon>\n ))}\n </ToggleButton>\n </DrawerTrigger>\n </Tooltip.Trigger>\n <Tooltip.Body\n triggerRef={tooltipRef}\n placement={tooltipPlacementMap[placement]}\n offset={6}\n className={classNames?.tooltip}\n >\n {textValue}\n </Tooltip.Body>\n </Tooltip>\n );\n}\nDrawerMenuItem.displayName = 'Drawer.Menu.Item';\n\nfunction DrawerMenu({\n className,\n position = 'center',\n children,\n ...rest\n}: DrawerMenuProps) {\n containsExactChildren({\n children,\n componentName: DrawerMenu.displayName,\n restrictions: [\n [DrawerMenuItem, { min: 1 }],\n [DrawerTrigger, { min: 0, max: 0 }],\n ],\n });\n return (\n <nav\n {...rest}\n className={menu({\n position,\n className,\n })}\n >\n {children}\n </nav>\n );\n}\nDrawerMenu.displayName = 'Drawer.Menu';\nDrawerMenu.Item = DrawerMenuItem;\n\nfunction DrawerPanel({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={panel({ className })} />;\n}\nDrawerPanel.displayName = 'Drawer.Panel';\n\nfunction DrawerView({\n id,\n children,\n className,\n ...rest\n}: ViewStackViewProps & ComponentPropsWithRef<'div'>) {\n const { register, unregister } = useContext(DrawerContext);\n\n useEffect(() => {\n register(id);\n\n () => unregister(id);\n }, [register, unregister, id]);\n\n return (\n <ViewStack.View id={id}>\n <div {...rest} className={view({ className })} role='tabpanel'>\n {children}\n </div>\n </ViewStack.View>\n );\n}\nDrawerView.displayName = 'Drawer.View';\n\n/**\n * To change size of title, use the `level` prop: `1`-`3` (large), `4`-`6` (medium).\n *\n * `level` also changes the semantic heading tag number `h1`-`h6`\n */\nfunction DrawerHeaderTitle({ className, level, ...rest }: DrawerTitleProps) {\n return (\n <Heading\n {...rest}\n className={DrawerTitleStyles({ className, level })}\n level={level}\n />\n );\n}\nDrawerHeaderTitle.displayName = 'Drawer.Title';\n\nfunction DrawerHeader({\n className,\n title,\n children,\n ...rest\n}: ComponentPropsWithRef<'header'>) {\n const { stack } = useContext(ViewStackContext);\n const level = stack.length > 1 ? 4 : 1;\n\n return (\n <Header {...rest} className={header({ className })}>\n {title ? (\n <>\n <Drawer.Back />\n <Drawer.Header.Title level={level} className='w-fit'>\n {title}\n </Drawer.Header.Title>\n <Drawer.Close />\n </>\n ) : (\n children\n )}\n </Header>\n );\n}\n\nDrawerHeader.displayName = 'Drawer.Header';\nDrawerHeader.Title = DrawerHeaderTitle;\n\nfunction DrawerContent({ className, ...rest }: ComponentPropsWithRef<'div'>) {\n return <div {...rest} className={content({ className })} />;\n}\nDrawerContent.displayName = 'Drawer.Content';\n\nfunction DrawerFooter({ className, ...rest }: ComponentPropsWithRef<'footer'>) {\n return <footer {...rest} className={footer({ className })} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n\nexport function Drawer({\n id,\n children,\n className,\n defaultView,\n placement = 'left',\n size = 'medium',\n onChange,\n ...rest\n}: DrawerProps) {\n containsExactChildren({\n children,\n componentName: Drawer.displayName,\n restrictions: [\n [DrawerMenu, { min: 0, max: 1 }],\n [DrawerPanel, { min: 1, max: 1 }],\n ],\n });\n\n const views = useRef(new Set<UniqueId>());\n const [activeView, setActiveView] = useState<UniqueId | null>(\n defaultView || null,\n );\n\n const handleOpen = useCallback(\n (data: DrawerOpenEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n },\n [id],\n );\n const handleToggle = useCallback(\n (data: DrawerToggleEvent) => {\n if (views.current.has(data?.payload?.view)) {\n bus.emit(ViewStackEventTypes.clear, { stack: id });\n if (activeView !== data?.payload?.view) {\n bus.emit(ViewStackEventTypes.push, data.payload);\n }\n }\n },\n [id, activeView],\n );\n\n useEffect(() => {\n const listeners = [\n bus.on(DrawerEventTypes.open, handleOpen),\n bus.on(DrawerEventTypes.toggle, handleToggle),\n ];\n\n return () => {\n for (const off of listeners) {\n off();\n }\n };\n }, [handleOpen, handleToggle]);\n\n return (\n <DrawerContext.Provider\n value={{\n register: (view: UniqueId) => views.current.add(view),\n unregister: (view: UniqueId) => views.current.delete(view),\n placement,\n }}\n >\n <ViewStack\n id={id}\n defaultView={defaultView}\n onChange={(view) => {\n setActiveView(view);\n onChange?.(view);\n }}\n >\n <div\n {...rest}\n className={drawer({ className })}\n data-open={!!activeView || null}\n data-placement={placement}\n data-size={size}\n >\n {children}\n </div>\n </ViewStack>\n </DrawerContext.Provider>\n );\n}\nDrawer.displayName = 'Drawer';\n\nDrawer.Layout = DrawerLayout;\nDrawer.Menu = DrawerMenu;\nDrawer.Panel = DrawerPanel;\nDrawer.View = DrawerView;\nDrawer.Header = DrawerHeader;\nDrawer.Content = DrawerContent;\nDrawer.Footer = DrawerFooter;\nDrawer.Trigger = DrawerTrigger;\nDrawer.Close = DrawerClose;\nDrawer.Back = DrawerBack;\n"]}
@@ -67,7 +67,7 @@ declare const DrawerStyles: tailwind_variants.TVReturnType<{
67
67
  content: string[];
68
68
  header: string[];
69
69
  footer: string;
70
- }, undefined, unknown, unknown, undefined>>;
70
+ }, undefined, unknown, unknown>>;
71
71
  declare const DrawerTitleStylesDefaults: {
72
72
  readonly level: 2;
73
73
  };
@@ -98,7 +98,7 @@ declare const DrawerTitleStyles: tailwind_variants.TVReturnType<{
98
98
  5: string;
99
99
  6: string;
100
100
  };
101
- }, undefined, "fg-primary-bold w-full", unknown, unknown, undefined>>;
101
+ }, undefined, "fg-primary-bold w-full", unknown, unknown>>;
102
102
  declare const DrawerMenuStylesDefaults: {
103
103
  readonly position: "center";
104
104
  };
@@ -147,6 +147,6 @@ declare const DrawerMenuStyles: tailwind_variants.TVReturnType<{
147
147
  }, {
148
148
  menu: string[];
149
149
  item: string[];
150
- }, undefined, unknown, unknown, undefined>>;
150
+ }, undefined, unknown, unknown>>;
151
151
 
152
152
  export { DrawerMenuStyles, DrawerMenuStylesDefaults, DrawerStyles, DrawerTitleStyles, DrawerTitleStylesDefaults };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const o=tv({slots:{layout:["[--drawer-main-row-start:1]","data-[push~=top]:[--drawer-main-row-start:2]","[--drawer-main-row-end:4]","data-[push~=bottom]:[--drawer-main-row-end:3]","[--drawer-main-col-start:1]","data-[push~=left]:[--drawer-main-col-start:2] has-[.group\\/sidenav]:[--drawer-main-col-start:2]","[--drawer-main-col-end:4]","data-[push~=right]:[--drawer-main-col-end:3]","[--drawer-menu-size:40px]","[--drawer-size-small:100px]","[--drawer-size-medium:200px]","[--drawer-size-large:400px]","[--route-layout-grid-cols:auto_1fr_auto]","[--route-layout-grid-rows:auto_1fr_auto]","[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]","[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]","group/layout relative top-[var(--classification-banner-height)]","grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]","transition-[grid-template-columns,grid-template-rows]","h-full max-h-full w-full"],main:"relative col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]",drawer:["group/drawer","bg-surface-default text-body-m","relative flex h-full min-h-0 flex-col","pointer-events-none [&>*]:pointer-events-auto","placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2","placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4","placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3","placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3","group-data-[extend~=top]/layout:placement-top:col-span-full","group-data-[extend~=bottom]/layout:placement-bottom:col-span-full","group-data-[extend~=left]/layout:placement-left:row-span-full","group-data-[extend~=right]/layout:placement-right:row-span-full","group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4","group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1","group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4","group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1"],panel:["hidden h-full min-h-0 flex-col gap-s p-l","group-open/drawer:flex","group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]","group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]"],view:"flex h-full flex-col",content:["fg-primary-bold flex max-h-full flex-1 flex-col overflow-y-auto"],header:["mb-s flex flex-row items-center justify-between pt-px pr-px"],footer:"fg-primary-bold mt-s flex flex-row items-center justify-end"}}),r={level:2},l=tv({base:"fg-primary-bold w-full",variants:{level:{1:"",2:"",3:"",4:"",5:"",6:""}},compoundVariants:[{level:[1,2,3],className:"text-header-l"},{level:[4,5,6],className:"text-header-m"}],defaultVariants:r}),t={position:"center"},p=tv({slots:{menu:["absolute flex rounded-large bg-surface-default p-s","group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row","group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row","group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none","group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none","group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none","group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center","group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none","group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center"],item:["flex flex-col items-center justify-center","sudo:fg-primary-muted !p-xs cursor-pointer outline-none","rounded-medium","sudo:hover:fg-primary-bold hover:!bg-transparent","selected:fg-accent-primary-bold selected:bg-accent-primary-muted","focus:fg-primary-bold","disabled:fg-disabled disabled:cursor-not-allowed"]},variants:{position:{start:{menu:["group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/8","group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/8","group-placement-top/drawer:left-1/8 group-placement-top/drawer:translate-x-1/4","group-placement-bottom/drawer:left-1/8 group-placement-bottom/drawer:translate-x-1/4"]},center:{menu:["group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2","group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2","group-placement-top/drawer:-translate-x-1/8 group-placement-top/drawer:left-1/2","group-placement-bottom/drawer:-translate-x-1/8 group-placement-bottom/drawer:left-1/2"]},end:{menu:["group-placement-left/drawer:-translate-y-7/2 group-placement-left/drawer:top-7/8","group-placement-right/drawer:-translate-y-7/8 group-placement-right/drawer:top-7/8","group-placement-top/drawer:-translate-x-1/2 group-placement-top/drawer:left-7/8","group-placement-bottom/drawer:-translate-x-1/2 group-placement-bottom/drawer:left-7/8"]}}},defaultVariants:t});export{p as DrawerMenuStyles,t as DrawerMenuStylesDefaults,o as DrawerStyles,l as DrawerTitleStyles,r as DrawerTitleStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const o=tv({slots:{layout:["[--drawer-main-row-start:1]","data-[push~=top]:[--drawer-main-row-start:2]","[--drawer-main-row-end:4]","data-[push~=bottom]:[--drawer-main-row-end:3]","[--drawer-main-col-start:1]","data-[push~=left]:[--drawer-main-col-start:2] has-[.group\\/sidenav]:[--drawer-main-col-start:2]","[--drawer-main-col-end:4]","data-[push~=right]:[--drawer-main-col-end:3]","[--drawer-menu-size:40px]","[--drawer-size-small:100px]","[--drawer-size-medium:200px]","[--drawer-size-large:400px]","[--route-layout-grid-cols:auto_1fr_auto]","[--route-layout-grid-rows:auto_1fr_auto]","[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]","[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]","group/layout relative top-[var(--classification-banner-height)]","grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]","transition-[grid-template-columns,grid-template-rows]","h-full max-h-full w-full"],main:"relative col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]",drawer:["group/drawer","bg-surface-default text-body-m","relative flex h-full min-h-0 flex-col","pointer-events-none [&>*]:pointer-events-auto","placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2","placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4","placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3","placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3","group-data-[extend~=top]/layout:placement-top:col-span-full","group-data-[extend~=bottom]/layout:placement-bottom:col-span-full","group-data-[extend~=left]/layout:placement-left:row-span-full","group-data-[extend~=right]/layout:placement-right:row-span-full","group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4","group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1","group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4","group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1"],panel:["hidden h-full min-h-0 flex-col gap-s p-l","group-open/drawer:flex","group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]","group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]","group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]"],view:"flex h-full flex-col",content:["fg-primary-bold flex max-h-full flex-1 flex-col overflow-y-auto"],header:["mb-s flex flex-row items-center justify-between gap-s pt-px pr-px"],footer:"fg-primary-bold mt-s flex flex-row items-center justify-end"}}),r={level:2},l=tv({base:"fg-primary-bold w-full",variants:{level:{1:"",2:"",3:"",4:"",5:"",6:""}},compoundVariants:[{level:[1,2,3],className:"text-header-l"},{level:[4,5,6],className:"text-header-m"}],defaultVariants:r}),t={position:"center"},p=tv({slots:{menu:["absolute flex rounded-large bg-surface-default p-s","group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row","group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row","group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none","group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none","group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none","group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center","group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none","group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center"],item:["flex flex-col items-center justify-center","enabled:color-info:fg-primary-muted cursor-pointer outline-none","rounded-medium","enabled:color-info:hover:fg-primary-bold enabled:hover:color-info:bg-transparent","selected:fg-accent-primary-bold selected:bg-accent-primary-muted","focus:fg-primary-bold","disabled:fg-disabled disabled:cursor-not-allowed"]},variants:{position:{start:{menu:["group-placement-left/drawer:top-0 group-placement-left/drawer:translate-y-1/4","group-placement-right/drawer:top-0 group-placement-right/drawer:translate-y-1/4","group-placement-top/drawer:left-0 group-placement-top/drawer:translate-x-3/4","group-placement-bottom/drawer:left-0 group-placement-bottom/drawer:translate-x-3/4"]},center:{menu:["group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2","group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2","group-placement-top/drawer:left-1/2 group-placement-top/drawer:translate-x-1","group-placement-bottom/drawer:left-1/2 group-placement-bottom/drawer:translate-x-1"]},end:{menu:["group-placement-left/drawer:-translate-y-1/4 group-placement-left/drawer:bottom-0","group-placement-right/drawer:-translate-y-1/4 group-placement-right/drawer:bottom-0","group-placement-top/drawer:-translate-x-3/4 group-placement-top/drawer:left-full","group-placement-bottom/drawer:-translate-x-3/4 group-placement-bottom/drawer:left-full"]}}},defaultVariants:t});export{p as DrawerMenuStyles,t as DrawerMenuStylesDefaults,o as DrawerStyles,l as DrawerTitleStyles,r as DrawerTitleStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/drawer/styles.ts"],"names":["DrawerStyles","tv","DrawerTitleStylesDefaults","DrawerTitleStyles","DrawerMenuStylesDefaults","DrawerMenuStyles"],"mappings":"mCAcO,MAAMA,EAAeC,EAAAA,CAAG,CAC7B,MAAO,CACL,MAAA,CAAQ,CAEN,6BAAA,CACA,8CAAA,CACA,4BACA,+CAAA,CACA,6BAAA,CAEA,mGACA,2BAAA,CACA,8CAAA,CAEA,2BAAA,CACA,6BAAA,CACA,8BAAA,CACA,6BAAA,CAGA,2CACA,0CAAA,CACA,8EAAA,CACA,+EAGA,iEAAA,CACA,0FAAA,CACA,wDACA,0BACF,CAAA,CACA,IAAA,CAAM,sEAAA,CACN,MAAA,CAAQ,CACN,eACA,gCAAA,CACA,uCAAA,CACA,gDAGA,qGAAA,CACA,iHAAA,CACA,0GACA,6GAAA,CAGA,6DAAA,CACA,mEAAA,CACA,+DAAA,CACA,iEAAA,CAGA,kHAAA,CACA,6HACA,oHAAA,CACA,0HACF,EACA,KAAA,CAAO,CACL,2CACA,wBAAA,CACA,sPAAA,CACA,yPAAA,CACA,mPAAA,CACA,4PACF,CAAA,CACA,KAAM,sBA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eAAA,CAAiBG,CACnB,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const DrawerStyles = tv({\n slots: {\n layout: [\n //properties\n '[--drawer-main-row-start:1]', //top overlay\n 'data-[push~=top]:[--drawer-main-row-start:2]',\n '[--drawer-main-row-end:4]', //bottom overlay\n 'data-[push~=bottom]:[--drawer-main-row-end:3]',\n '[--drawer-main-col-start:1]', //left overlay\n // biome-ignore lint/style/noUnusedTemplateLiteral: This is necessary to properly evaulate \\/\n `data-[push~=left]:[--drawer-main-col-start:2] has-[.group\\\\/sidenav]:[--drawer-main-col-start:2]`,\n '[--drawer-main-col-end:4]', //right overlay\n 'data-[push~=right]:[--drawer-main-col-end:3]',\n\n '[--drawer-menu-size:40px]',\n '[--drawer-size-small:100px]',\n '[--drawer-size-medium:200px]',\n '[--drawer-size-large:400px]',\n\n //Grid template definitions\n '[--route-layout-grid-cols:auto_1fr_auto]',\n '[--route-layout-grid-rows:auto_1fr_auto]',\n '[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]',\n '[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]',\n\n //container\n 'group/layout relative top-[var(--classification-banner-height)]',\n 'grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]',\n 'transition-[grid-template-columns,grid-template-rows]',\n 'h-full max-h-full w-full',\n ],\n main: 'relative col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]',\n drawer: [\n 'group/drawer',\n 'bg-surface-default text-body-m',\n 'relative flex h-full min-h-0 flex-col',\n 'pointer-events-none [&>*]:pointer-events-auto',\n\n //Base positioning\n 'placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2',\n 'placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4',\n 'placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3',\n 'placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3',\n\n //Extend positioning\n 'group-data-[extend~=top]/layout:placement-top:col-span-full',\n 'group-data-[extend~=bottom]/layout:placement-bottom:col-span-full',\n 'group-data-[extend~=left]/layout:placement-left:row-span-full',\n 'group-data-[extend~=right]/layout:placement-right:row-span-full',\n\n //Extend fitment\n 'group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4',\n 'group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1',\n 'group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4',\n 'group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1',\n ],\n panel: [\n 'hidden h-full min-h-0 flex-col gap-s p-l',\n 'group-open/drawer:flex',\n 'group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n 'group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n ],\n view: 'flex h-full flex-col',\n content: [\n 'fg-primary-bold flex max-h-full flex-1 flex-col overflow-y-auto',\n ],\n header: ['mb-s flex flex-row items-center justify-between pt-px pr-px'],\n footer: 'fg-primary-bold mt-s flex flex-row items-center justify-end',\n },\n});\n\nexport const DrawerTitleStylesDefaults = {\n level: 2,\n} as const;\n\nexport const DrawerTitleStyles = tv({\n base: 'fg-primary-bold w-full',\n variants: {\n level: {\n 1: '',\n 2: '',\n 3: '',\n 4: '',\n 5: '',\n 6: '',\n },\n },\n compoundVariants: [\n {\n level: [1, 2, 3],\n className: 'text-header-l',\n },\n {\n level: [4, 5, 6],\n className: 'text-header-m',\n },\n ],\n defaultVariants: DrawerTitleStylesDefaults,\n});\n\nexport const DrawerMenuStylesDefaults = {\n position: 'center',\n} as const;\n\nexport const DrawerMenuStyles = tv({\n slots: {\n menu: [\n 'absolute flex rounded-large bg-surface-default p-s',\n\n //horizontal\n 'group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row',\n 'group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row',\n 'group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none',\n 'group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none',\n //vertical\n 'group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none',\n 'group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center',\n 'group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none',\n 'group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center',\n ],\n item: [\n 'flex flex-col items-center justify-center',\n 'sudo:fg-primary-muted !p-xs cursor-pointer outline-none',\n 'rounded-medium',\n //hover\n 'sudo:hover:fg-primary-bold hover:!bg-transparent',\n //selected\n 'selected:fg-accent-primary-bold selected:bg-accent-primary-muted',\n //focused\n 'focus:fg-primary-bold',\n //disabled\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n },\n variants: {\n position: {\n start: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/8',\n 'group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/8',\n 'group-placement-top/drawer:left-1/8 group-placement-top/drawer:translate-x-1/4',\n 'group-placement-bottom/drawer:left-1/8 group-placement-bottom/drawer:translate-x-1/4',\n ],\n },\n center: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2',\n 'group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2',\n 'group-placement-top/drawer:-translate-x-1/8 group-placement-top/drawer:left-1/2',\n 'group-placement-bottom/drawer:-translate-x-1/8 group-placement-bottom/drawer:left-1/2',\n ],\n },\n end: {\n menu: [\n 'group-placement-left/drawer:-translate-y-7/2 group-placement-left/drawer:top-7/8',\n 'group-placement-right/drawer:-translate-y-7/8 group-placement-right/drawer:top-7/8',\n 'group-placement-top/drawer:-translate-x-1/2 group-placement-top/drawer:left-7/8',\n 'group-placement-bottom/drawer:-translate-x-1/2 group-placement-bottom/drawer:left-7/8',\n ],\n },\n },\n },\n defaultVariants: DrawerMenuStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/drawer/styles.ts"],"names":["e","DrawerTitleStyles","DrawerMenuStyles"],"mappings":"6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A,CAAA,kFACA,CAAA,uIACA,CAAA,0GACA,CAAA,6LAIA,CAAA,iEACA,CAAA,mGAIA,CAAA,kEAEA,CAAA,uBAEA,CAAA,kDAGJ,CAAA,CAAU,CACR,QAAA,CAAU,CACR,QACE,CAAA,CAAA,KACE,CAAA,CAAA,IAAA,CAAA,CAAA,+EACA,CAAA,iFACA,CAAA,8EACA,CAAA,oFAGI,CACN,CAAA,CAAA,MACE,CAAA,CAAA,IAAA,CAAA,CAAA,kFACA,CAAA,mKAEA,CAAA,oFAIF,CAAA,CAAA,CAAM,GACJ,CAAA,CAAA,IAAA,CAAA,CAAA,mFACA,CAAA,wKAEA,CAAA,wFAKR,CAAA,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const DrawerStyles = tv({\n slots: {\n layout: [\n //properties\n '[--drawer-main-row-start:1]', //top overlay\n 'data-[push~=top]:[--drawer-main-row-start:2]',\n '[--drawer-main-row-end:4]', //bottom overlay\n 'data-[push~=bottom]:[--drawer-main-row-end:3]',\n '[--drawer-main-col-start:1]', //left overlay\n // biome-ignore lint/style/noUnusedTemplateLiteral: This is necessary to properly evaulate \\/\n `data-[push~=left]:[--drawer-main-col-start:2] has-[.group\\\\/sidenav]:[--drawer-main-col-start:2]`,\n '[--drawer-main-col-end:4]', //right overlay\n 'data-[push~=right]:[--drawer-main-col-end:3]',\n\n '[--drawer-menu-size:40px]',\n '[--drawer-size-small:100px]',\n '[--drawer-size-medium:200px]',\n '[--drawer-size-large:400px]',\n\n //Grid template definitions\n '[--route-layout-grid-cols:auto_1fr_auto]',\n '[--route-layout-grid-rows:auto_1fr_auto]',\n '[--drawer-main-cols:var(--drawer-main-col-start)/var(--drawer-main-col-end)]',\n '[--drawer-main-rows:var(--drawer-main-row-start)/var(--drawer-main-row-end)]',\n\n //container\n 'group/layout relative top-[var(--classification-banner-height)]',\n 'grid grid-cols-[var(--route-layout-grid-cols)] grid-rows-[var(--route-layout-grid-rows)]',\n 'transition-[grid-template-columns,grid-template-rows]',\n 'h-full max-h-full w-full',\n ],\n main: 'relative col-[var(--drawer-main-cols)] row-[var(--drawer-main-rows)]',\n drawer: [\n 'group/drawer',\n 'bg-surface-default text-body-m',\n 'relative flex h-full min-h-0 flex-col',\n 'pointer-events-none [&>*]:pointer-events-auto',\n\n //Base positioning\n 'placement-top:col-start-2 placement-top:col-end-3 placement-top:row-start-1 placement-top:row-end-2',\n 'placement-bottom:col-start-2 placement-bottom:col-end-3 placement-bottom:row-start-3 placement-bottom:row-end-4',\n 'placement-left:col-start-1 placement-left:col-end-2 placement-left:row-start-2 placement-left:row-end-3',\n 'placement-right:col-start-3 placement-right:col-end-4 placement-right:row-start-2 placement-right:row-end-3',\n\n //Extend positioning\n 'group-data-[extend~=top]/layout:placement-top:col-span-full',\n 'group-data-[extend~=bottom]/layout:placement-bottom:col-span-full',\n 'group-data-[extend~=left]/layout:placement-left:row-span-full',\n 'group-data-[extend~=right]/layout:placement-right:row-span-full',\n\n //Extend fitment\n 'group-data-[extend=top]/layout:placement-left:row-end-4 group-data-[extend=top]/layout:placement-right:row-end-4',\n 'group-data-[extend=bottom]/layout:placement-left:row-start-1 group-data-[extend=bottom]/layout:placement-right:row-start-1',\n 'group-data-[extend=left]/layout:placement-bottom:col-end-4 group-data-[extend=left]/layout:placement-top:col-end-4',\n 'group-data-[extend=right]/layout:placement-bottom:col-start-1 group-data-[extend=right]/layout:placement-top:col-start-1',\n ],\n panel: [\n 'hidden h-full min-h-0 flex-col gap-s p-l',\n 'group-open/drawer:flex',\n 'group-placement-left/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-left/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-left/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-right/drawer:group-size-large/drawer:w-[var(--drawer-size-large)] group-placement-right/drawer:group-size-medium/drawer:w-[var(--drawer-size-medium)] group-placement-right/drawer:group-size-small/drawer:w-[var(--drawer-size-small)]',\n 'group-placement-top/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-top/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-top/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n 'group-placement-bottom/drawer:group-size-large/drawer:h-[var(--drawer-size-large)] group-placement-bottom/drawer:group-size-medium/drawer:h-[var(--drawer-size-medium)] group-placement-bottom/drawer:group-size-small/drawer:h-[var(--drawer-size-small)]',\n ],\n view: 'flex h-full flex-col',\n content: [\n 'fg-primary-bold flex max-h-full flex-1 flex-col overflow-y-auto',\n ],\n header: [\n 'mb-s flex flex-row items-center justify-between gap-s pt-px pr-px',\n ],\n footer: 'fg-primary-bold mt-s flex flex-row items-center justify-end',\n },\n});\n\nexport const DrawerTitleStylesDefaults = {\n level: 2,\n} as const;\n\nexport const DrawerTitleStyles = tv({\n base: 'fg-primary-bold w-full',\n variants: {\n level: {\n 1: '',\n 2: '',\n 3: '',\n 4: '',\n 5: '',\n 6: '',\n },\n },\n compoundVariants: [\n {\n level: [1, 2, 3],\n className: 'text-header-l',\n },\n {\n level: [4, 5, 6],\n className: 'text-header-m',\n },\n ],\n defaultVariants: DrawerTitleStylesDefaults,\n});\n\nexport const DrawerMenuStylesDefaults = {\n position: 'center',\n} as const;\n\nexport const DrawerMenuStyles = tv({\n slots: {\n menu: [\n 'absolute flex rounded-large bg-surface-default p-s',\n\n //horizontal\n 'group-placement-top/drawer:transform-[translateX(-50%)] group-placement-top/drawer:left-[50%] group-placement-top/drawer:h-[var(--drawer-menu-size)] group-placement-top/drawer:flex-row',\n 'group-placement-bottom/drawer:transform-[translateX(-50%)] group-placement-bottom/drawer:left-[50%] group-placement-bottom/drawer:h-[var(--drawer-menu-size)] group-placement-bottom/drawer:flex-row',\n 'group-placement-bottom/drawer:-translate-y-[var(--drawer-menu-size)] group-placement-bottom/drawer:rounded-b-none',\n 'group-placement-top/drawer:bottom-0 group-placement-top/drawer:translate-y-[var(--drawer-menu-size)] group-placement-top/drawer:rounded-t-none',\n //vertical\n 'group-placement-left/drawer:left-full group-placement-left/drawer:rounded-l-none',\n 'group-placement-left/drawer:w-[var(--drawer-menu-size)] group-placement-left/drawer:flex-col group-placement-left/drawer:items-center',\n 'group-placement-right/drawer:-left-[var(--drawer-menu-size)] group-placement-right/drawer:rounded-r-none',\n 'group-placement-right/drawer:w-[var(--drawer-menu-size)] group-placement-right/drawer:flex-col group-placement-right/drawer:items-center',\n ],\n item: [\n 'flex flex-col items-center justify-center',\n 'enabled:color-info:fg-primary-muted cursor-pointer outline-none',\n 'rounded-medium',\n //hover\n 'enabled:color-info:hover:fg-primary-bold enabled:hover:color-info:bg-transparent',\n //selected\n 'selected:fg-accent-primary-bold selected:bg-accent-primary-muted',\n //focused\n 'focus:fg-primary-bold',\n //disabled\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n },\n variants: {\n position: {\n start: {\n menu: [\n 'group-placement-left/drawer:top-0 group-placement-left/drawer:translate-y-1/4',\n 'group-placement-right/drawer:top-0 group-placement-right/drawer:translate-y-1/4',\n 'group-placement-top/drawer:left-0 group-placement-top/drawer:translate-x-3/4',\n 'group-placement-bottom/drawer:left-0 group-placement-bottom/drawer:translate-x-3/4',\n ],\n },\n center: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/2 group-placement-left/drawer:top-1/2',\n 'group-placement-right/drawer:-translate-y-1/2 group-placement-right/drawer:top-1/2',\n 'group-placement-top/drawer:left-1/2 group-placement-top/drawer:translate-x-1',\n 'group-placement-bottom/drawer:left-1/2 group-placement-bottom/drawer:translate-x-1',\n ],\n },\n end: {\n menu: [\n 'group-placement-left/drawer:-translate-y-1/4 group-placement-left/drawer:bottom-0',\n 'group-placement-right/drawer:-translate-y-1/4 group-placement-right/drawer:bottom-0',\n 'group-placement-top/drawer:-translate-x-3/4 group-placement-top/drawer:left-full',\n 'group-placement-bottom/drawer:-translate-x-3/4 group-placement-bottom/drawer:left-full',\n ],\n },\n },\n },\n defaultVariants: DrawerMenuStylesDefaults,\n});\n"]}
@@ -124,7 +124,7 @@ type DrawerMenuProps = ComponentPropsWithRef<'nav'> & {
124
124
  * Drawer.Menu.Item implements Drawer.Trigger with the default behavior of
125
125
  * the trigger's `open` event type, which resets the stack before pushing the new view
126
126
  */
127
- type DrawerMenuItemProps = Omit<ToggleButtonProps, 'id'> & {
127
+ type DrawerMenuItemProps = Omit<ToggleButtonProps, 'id' | 'isSelected' | 'className'> & {
128
128
  /**
129
129
  * The unique identifier of the view that this menu item controls.
130
130
  *
@@ -135,18 +135,23 @@ type DrawerMenuItemProps = Omit<ToggleButtonProps, 'id'> & {
135
135
  * If the menu item is intended to control multiple views, use the `views` prop for additional associations; do not include the `for` id in the `views` array.
136
136
  */
137
137
  for: UniqueId;
138
- /**
139
- * An optional array of additional view identifiers. If provided, the menu item will display as active when any of these views are active.
140
- *
141
- * You do not need to include the `id` already passed in the `for` prop.
142
- */
143
- views?: UniqueId[];
144
138
  /**
145
139
  * If set to `true`, the menu item will toggle the visibility of the associated view each time it is activated.
146
140
  *
147
141
  * By default, the menu item only opens the view. Use this prop to enable toggling between open and closed states.
148
142
  */
149
143
  toggle?: boolean;
144
+ /**
145
+ * When set this will be the text for the tooltip
146
+ */
147
+ textValue: string;
148
+ /**
149
+ * Class names to be applied to the item and tooltip
150
+ */
151
+ classNames?: {
152
+ item?: string;
153
+ tooltip?: string;
154
+ };
150
155
  };
151
156
  type DrawerTitleProps = Omit<HeadingProps, 'level'> & AriaAttributesWithRef<HTMLHeadingElement> & VariantProps<typeof DrawerTitleStyles>;
152
157
  type DrawerOpenEvent = Payload<typeof DrawerEventTypes.open, {
@@ -190,6 +195,7 @@ type DrawerTriggerProps = {
190
195
  type DrawerContextValue = {
191
196
  register: (view: UniqueId) => void;
192
197
  unregister: (view: UniqueId) => void;
198
+ placement: XAxisUnion | YAxisUnion;
193
199
  };
194
200
 
195
201
  export type { DrawerContextValue, DrawerEvent, DrawerLayoutProps, DrawerMenuItemProps, DrawerMenuProps, DrawerOpenEvent, DrawerProps, DrawerTitleProps, DrawerToggleEvent, DrawerTriggerProps };
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {Text,useContextProps,Provider,HeadingContext,TextContext,Header,Heading}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {Icon,IconContext}from'../icon/index.js';import {HeroStyles}from'./styles.js';const {hero:b,icon:f,title:P,subtitle:S}=HeroStyles(),g=createContext(null);function e({ref:o,...a}){[a,o]=useContextProps(a,o??null,g);const{children:l,classNames:t,compact:i,...s}=a;return containsExactChildren({children:l,componentName:e.displayName,restrictions:[[Icon,{min:1,max:1}],[e.Title,{min:1,max:1}],[e.Subtitle,{min:0}]]}),jsx(Provider,{values:[[IconContext,{className:f({className:t?.icon}),size:"large"}],[HeadingContext,{className:P({className:t?.title}),level:2}],[TextContext,{className:S({className:t?.subtitle})}]],children:jsx(Header,{...s,ref:o,className:b({className:t?.hero}),"data-layout":i?"grid":"stack",children:l})})}e.displayName="Hero",e.Title=Heading,e.Title.displayName="Hero.Title",e.Subtitle=Text,e.Subtitle.displayName="Hero.Subtitle";export{e as Hero,g as HeroContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,Keyboard}from'react-aria-components';import {Icon}from'../icon/index.js';import {HotkeyStyles,HotkeyStylesDefaults}from'./styles.js';const {key:c,set:v}=HotkeyStyles(),y=createContext(null);function i({children:e,...o}){return jsx(y.Provider,{value:o,children:e})}i.displayName="Hotkey.Provider";function s({ref:e,children:o,...t}){[t,e]=useContextProps(t,e??null,y);const{className:a,variant:l=HotkeyStylesDefaults.variant}=t;return jsx(Keyboard,{ref:e,...t,className:c({className:a,variant:l}),children:o})}s.displayName="Hotkey";function n({children:e,...o}){const{className:t}=o;return jsx("div",{className:v({className:t}),children:jsx(Icon.Provider,{size:"large",children:e})})}n.displayName="Hotkey.Set",s.Set=n,s.Provider=i;export{s as Hotkey,y as HotkeyContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,4 @@
1
- import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps}from'react-aria-components';import {IconStyles}from'./styles.js';const r=createContext(null);function t({children:o,...e}){return jsx(r.Provider,{value:e,children:o})}t.displayName="Icon.Provider";function n({ref:o,...e}){[e,o]=useContextProps(e,o??null,r);const{children:p,className:s,size:c="medium",...m}=e;return jsx("span",{...m,ref:o,className:IconStyles({className:s}),"data-size":c,children:p})}n.displayName="Icon",n.Provider=t;export{n as Icon,r as IconContext};//# sourceMappingURL=index.js.map
1
+ 'use client';
2
+
3
+ import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps}from'react-aria-components';import {IconStyles}from'./styles.js';const r=createContext(null);function t({children:o,...e}){return jsx(r.Provider,{value:e,children:o})}t.displayName="Icon.Provider";function n({ref:o,...e}){[e,o]=useContextProps(e,o??null,r);const{children:s,className:p,size:c="medium",...m}=e;return jsx("span",{...m,ref:o,className:IconStyles({className:p}),"data-size":c,children:s})}n.displayName="Icon",n.Provider=t;export{n as Icon,r as IconContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/icon/index.tsx"],"names":["createContext","a","props","i","IconProvider","ref","useContextProps","rest","P","Icon"],"mappings":"mLAoBEA,MAAwD,CAAA,CAAAC,aAAA,CAAI,IAE9D,EAAA,oBAAkC,CAAA,CAAGC,CAAM,GACzC,WAAoBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,gBAC/B,CACAC,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,2BA+BN,CAAA,SAAgB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACnC,CAACA,CAAAA,CAAOG,CAAG,EAAIC,CAAAA,CAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,SAAQ,CAAA,QAAU,CAAA,CAAA,CAAA,gBAAkB,CAAA,CAAA,CAAA,QAAaE,CAAK,GAAIL,CAE1D,WACGC,GAAA,CAAA,OACKI,CAAAA,GACJ,CAAA,CAAKF,GACL,CAAA,CAAA,CAAA,SAAwB,CAAAG,UAAA,CAAA,CAAA,UACxB,CAAA,CAAA,CAAA,CAAA,sBAKN,CACAC,CAAAA,CAAK,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,MACd,CAAA,CAAA,CAAA,QAAWL,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport { IconStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { IconProps } from './types';\n\nexport const IconContext =\n createContext<ContextValue<IconProps, HTMLSpanElement>>(null);\n\nfunction IconProvider({ children, ...props }: ProviderProps<IconProps>) {\n return <IconContext.Provider value={props}>{children}</IconContext.Provider>;\n}\nIconProvider.displayName = 'Icon.Provider';\n\n/**\n * Icon - A wrapper component for displaying SVG icons with consistent sizing\n *\n * Provides a standardized container for SVG icons with built-in size variants and\n * proper accessibility support. Works seamlessly with the Accelint icon library\n * and supports custom SVG elements with consistent styling and alignment.\n *\n * @example\n * // Basic icon usage\n * <Icon>\n * <Settings />\n * </Icon>\n *\n * @example\n * // Icon with different sizes\n * <Icon size=\"small\">\n * <User />\n * </Icon>\n * <Icon size=\"large\">\n * <Dashboard />\n * </Icon>\n *\n * @example\n * // Icon in button context (automatically inherits sizing)\n * <Button>\n * <Icon><Plus /></Icon>\n * Add Item\n * </Button>\n */\nexport function Icon({ ref, ...props }: IconProps) {\n [props, ref] = useContextProps(props, ref ?? null, IconContext);\n\n const { children, className, size = 'medium', ...rest } = props;\n\n return (\n <span\n {...rest}\n ref={ref}\n className={IconStyles({ className })}\n data-size={size}\n >\n {children}\n </span>\n );\n}\nIcon.displayName = 'Icon';\nIcon.Provider = IconProvider;\n"]}
1
+ {"version":3,"sources":["../../../src/components/icon/index.tsx"],"names":["createContext","a","props","i","IconProvider","ref","useContextProps","rest","P","Icon"],"mappings":"mLAqBEA,MAAwD,CAAA,CAAAC,aAAA,CAAI,IAE9D,EAAA,oBAAkC,CAAA,CAAGC,CAAM,GACzC,WAAoBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,gBAC/B,CACAC,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,2BA+BN,CAAA,SAAgB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACnC,CAACA,CAAAA,CAAOG,CAAG,EAAIC,CAAAA,CAAgBJ,CAAAA,CAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,SAAQ,CAAA,QAAU,CAAA,CAAA,CAAA,gBAAkB,CAAA,CAAA,CAAA,QAAaE,CAAK,GAAIL,CAE1D,WACGC,GAAA,CAAA,OACKI,CAAAA,GACJ,CAAA,CAAKF,GACL,CAAA,CAAA,CAAA,SAAwB,CAAAG,UAAA,CAAA,CAAA,UACxB,CAAA,CAAA,CAAA,CAAA,sBAKN,CACAC,CAAAA,CAAK,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,MACd,CAAA,CAAA,CAAA,QAAWL,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport { IconStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { IconProps } from './types';\n\nexport const IconContext =\n createContext<ContextValue<IconProps, HTMLSpanElement>>(null);\n\nfunction IconProvider({ children, ...props }: ProviderProps<IconProps>) {\n return <IconContext.Provider value={props}>{children}</IconContext.Provider>;\n}\nIconProvider.displayName = 'Icon.Provider';\n\n/**\n * Icon - A wrapper component for displaying SVG icons with consistent sizing\n *\n * Provides a standardized container for SVG icons with built-in size variants and\n * proper accessibility support. Works seamlessly with the Accelint icon library\n * and supports custom SVG elements with consistent styling and alignment.\n *\n * @example\n * // Basic icon usage\n * <Icon>\n * <Settings />\n * </Icon>\n *\n * @example\n * // Icon with different sizes\n * <Icon size=\"small\">\n * <User />\n * </Icon>\n * <Icon size=\"large\">\n * <Dashboard />\n * </Icon>\n *\n * @example\n * // Icon in button context (automatically inherits sizing)\n * <Button>\n * <Icon><Plus /></Icon>\n * Add Item\n * </Button>\n */\nexport function Icon({ ref, ...props }: IconProps) {\n [props, ref] = useContextProps(props, ref ?? null, IconContext);\n\n const { children, className, size = 'medium', ...rest } = props;\n\n return (\n <span\n {...rest}\n ref={ref}\n className={IconStyles({ className })}\n data-size={size}\n >\n {children}\n </span>\n );\n}\nIcon.displayName = 'Icon';\nIcon.Provider = IconProvider;\n"]}
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsxs,jsx}from'react/jsx-runtime';import'client-only';import {CancelFill}from'@accelint/icons';import {useControlledState}from'@react-stately/utils';import {createContext}from'react';import {useContextProps,InputContext,Input,composeRenderProps}from'react-aria-components';import {Button}from'../button/index.js';import {Icon}from'../icon/index.js';import {InputStyles,InputStylesDefaults}from'./styles.js';const {container:w,sizer:A,input:B,clear:F}=InputStyles(),v={target:{value:""}},K=createContext(null);function k({ref:t,...a}){[a,t]=useContextProps(a,t??null,InputContext),[a,t]=useContextProps({...a},t??null,K);const{classNames:u,autoSize:r,defaultValue:h="",disabled:i,placeholder:d,readOnly:c,required:m,size:f="medium",type:l=InputStylesDefaults.type,value:g,isClearable:n,isInvalid:x,onChange:E,onKeyDown:P,...N}=a,[s,b]=useControlledState(g,h),z=(`${s??""}`.length||d?.length)??0,I=s==null||s==="";function p(e){E?.(e),e.defaultPrevented||b(e.target.value);}return jsxs("div",{className:w({className:u?.container,autoSize:r,type:l,isClearable:n}),"data-disabled":i||null,"data-empty":I||null,"data-invalid":x||null,"data-length":z,"data-placeholder":!!d&&I||null,"data-readonly":c||null,"data-required":m||null,"data-size":f,children:[jsx("div",{className:A({className:u?.sizer,autoSize:r,type:l,isClearable:n}),children:jsx(Input,{...N,ref:t,className:composeRenderProps(u?.input,e=>B({className:e,autoSize:r,type:l,isClearable:n})),disabled:i,placeholder:d,readOnly:c,required:m,type:l,value:s,onChange:p,onKeyDown:e=>{P?.(e),n&&!e.defaultPrevented&&e.key==="Escape"&&p(v);}})}),n&&jsx(Button,{className:composeRenderProps(u?.clear,e=>F({className:e,autoSize:r,type:l,isClearable:n})),excludeFromTabOrder:true,size:"small",variant:"icon",isDisabled:i,onPress:()=>{p(v),t?.current?.focus();},children:jsx(Icon,{children:jsx(CancelFill,{})})})]})}k.displayName="Input";export{k as Input,K as InputContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const t={autoSize:false,type:"text",isClearable:false},a=tv({slots:{container:"group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]",sizer:["font-display [grid-column:1/-1] [grid-row:1]","group-size-medium/input:text-body-s group-size-small/input:text-body-xs"],input:["fg-primary-bold block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display outline outline-interactive","enabled:group-focus-visible-within/input:outline-accent-primary-bold","enabled:group-hover/input:outline-interactive-hover","enabled:group-invalid/input:outline-serious-bold","disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled"],clear:["[grid-column:2/-1] [grid-row:1]","group-size-medium/input:mr-xs group-size-small/input:mr-xxs","enabled:fg-info-bold enabled:bg-transparent","enabled:focus-visible:fg-info-hover enabled:focus-visible:bg-transparent","enabled:hover:fg-info-hover enabled:hover:bg-transparent","group-empty/input:invisible","group-not-empty/input:group-not-focus-within/input:invisible"]},variants:{autoSize:{false:"",true:""},type:{button:"",checkbox:"",color:"",date:"","datetime-local":"",email:"",file:"",hidden:"",image:"",month:"",number:{input:"placeholder:fg-primary-muted [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"},password:"",radio:"",range:"",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",week:""},isClearable:{false:{container:"[--room:0px]"},true:{container:"[--room:20px]"}}},compoundVariants:[{type:["color","date","datetime-local","email","number","password","search","tel","text","time","url"],className:{sizer:["group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]","group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]"]}},{autoSize:true,type:["number","text"],className:{sizer:["group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]","group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]"]}}],defaultVariants:t});export{a as InputStyles,t as InputStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t={autoSize:false,type:"text",isClearable:false},a=tv({slots:{container:"group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]",sizer:["font-display [grid-column:1/-1] [grid-row:1]","group-size-medium/input:text-body-s group-size-small/input:text-body-xs"],input:["fg-primary-bold block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display outline outline-interactive","enabled:group-focus-visible-within/input:outline-accent-primary-bold","enabled:group-hover/input:outline-interactive-hover","enabled:group-pressed/input:outline-interactive-pressed","enabled:group-invalid/input:outline-serious-bold","disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled"],clear:["[grid-column:2/-1] [grid-row:1]","group-size-medium/input:mr-xs group-size-small/input:mr-xxs","enabled:fg-info-bold enabled:bg-transparent","enabled:focus-visible:fg-info-hover enabled:focus-visible:bg-transparent","enabled:hover:fg-info-hover enabled:hover:bg-transparent","group-empty/input:invisible","group-not-empty/input:group-not-focus-within/input:invisible"]},variants:{autoSize:{false:"",true:""},type:{button:"",checkbox:"",color:"",date:"","datetime-local":"",email:"",file:"",hidden:"",image:"",month:"",number:{input:"placeholder:fg-primary-muted [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"},password:"",radio:"",range:"",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",week:""},isClearable:{false:{container:"[--room:0px]"},true:{container:"[--room:20px]"}}},compoundVariants:[{type:["color","date","datetime-local","email","number","password","search","tel","text","time","url"],className:{sizer:["group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]","group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]"]}},{autoSize:true,type:["number","text"],className:{sizer:["group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]","group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]"]}}],defaultVariants:t});export{a as InputStyles,t as InputStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/input/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAA,CAAU,CAAA,QACJ,CAAA,KAAA,CAAA,uBAKN,CAAA,KAAA,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAA,CAAA,CACE,SAAA,CAAA,+HAEA,CAAA,KAAA,CAAA,CAAA,8CACA,CAAA,yEAGA,CAAA,CAAA,KAAA,CAAA,CAAA,yIACA,CAAA,sEACA,CAAA,wGAEA,CAAA,6HAGA,CAAA,CAAA,KAAA,CAAA,CAAA,+FAEA,CAAA,6CACA,CAAA,0EACA,CAAA,0DACA,CAAA,4FAIJ,CAAA,CAAU,CACR,SAAU,CACR,QAAO,CACP,CAAA,MACF,EACA,CAAA,IAAM,CACJ,EAAA,CAAA,CAAA,IAAQ,CAAA,CACR,SAAU,CAAA,QACH,CAAA,EACP,CAAA,QACA,CAAA,IAAA,CAAA,EAAA,CAAA,gBACO,CAAA,EACP,MAAM,CAAA,EACN,CAAA,IAAA,CAAQ,EAAA,CACR,MAAO,GACP,CAAA,KAAO,CAAA,EACP,OAAQ,EACN,CAAA,iKAGF,CAAU,CAAA,QACH,GACP,CAAA,KAAO,CAAA,EACP,CAAA,KAAO,CAAA,EACP,OAAQ,EAAA,CACR,MAAA,CAAQ,EAAA,CACR,OACA,EAAA,CAAA,GAAM,CAAA,OACA,CAAA,EACN,CAAA,KACA,EAAA,CAAA,GAAM,CACR,EACA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,WAEI,CAAA,CAAA,KAAA,CAAA,CAAW,SAAA,CAAA,cAGX,CAAA,CAAA,IAAA,CAAA,CAAW,SAAA,CAAA,mCAOX,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,OACA,CAAA,MAAA,CAAA,gBAEA,CAAA,OACA,CAAA,QAAA,CAAA,UAEA,CAAA,cAEA,CAAA,MACA,CAAA,MAEF,CAAA,KAAA,CAAA,CAAW,+FAGP,CAAA,0EAKJ,CAAA,CAAA,CAAA,CAAU,CAAA,QACH,CAAA,IAAA,CAAA,IAAA,CAAU,CAAA,iBACN,SAEP,CAAA,CAAA,KAAA,CAAA,CAAA,2ZAMR,CAAA,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const InputStylesDefaults = {\n autoSize: false,\n type: 'text',\n isClearable: false,\n} as const;\n\nexport const InputStyles = tv({\n slots: {\n container:\n 'group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]',\n sizer: [\n 'font-display [grid-column:1/-1] [grid-row:1]',\n 'group-size-medium/input:text-body-s group-size-small/input:text-body-xs',\n ],\n input: [\n 'fg-primary-bold block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display outline outline-interactive',\n 'enabled:group-focus-visible-within/input:outline-accent-primary-bold',\n 'enabled:group-hover/input:outline-interactive-hover',\n 'enabled:group-invalid/input:outline-serious-bold',\n 'disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled',\n ],\n clear: [\n '[grid-column:2/-1] [grid-row:1]',\n 'group-size-medium/input:mr-xs group-size-small/input:mr-xxs',\n 'enabled:fg-info-bold enabled:bg-transparent',\n 'enabled:focus-visible:fg-info-hover enabled:focus-visible:bg-transparent',\n 'enabled:hover:fg-info-hover enabled:hover:bg-transparent',\n 'group-empty/input:invisible',\n 'group-not-empty/input:group-not-focus-within/input:invisible',\n ],\n },\n variants: {\n autoSize: {\n false: '',\n true: '',\n },\n type: {\n button: '',\n checkbox: '',\n color: '',\n date: '',\n 'datetime-local': '',\n email: '',\n file: '',\n hidden: '',\n image: '',\n month: '',\n number: {\n input:\n 'placeholder:fg-primary-muted [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n },\n password: '',\n radio: '',\n range: '',\n reset: '',\n search: '',\n submit: '',\n tel: '',\n text: '',\n time: '',\n url: '',\n week: '',\n },\n isClearable: {\n false: {\n container: '[--room:0px]',\n },\n true: {\n container: '[--room:20px]',\n },\n },\n },\n compoundVariants: [\n {\n type: [\n 'color',\n 'date',\n 'datetime-local',\n 'email',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n ],\n className: {\n sizer: [\n 'group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]',\n 'group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]',\n ],\n },\n },\n {\n autoSize: true,\n type: ['number', 'text'],\n className: {\n sizer: [\n 'group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]',\n 'group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]',\n ],\n },\n },\n ],\n defaultVariants: InputStylesDefaults,\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/input/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAA,CAAU,CAAA,QACJ,CAAA,KAAA,CAAA,uBAKN,SAAO,CACLA,EAAA,CAAA,CAAA,KAAA,CAAA,CACE,SAAA,CAAA,+HAEA,CAAA,KAAA,CAAA,CAAA,8CACA,CAAA,yEAGA,CAAA,CAAA,KAAA,CAAA,CAAA,yIACA,CAAA,sEACA,CAAA,qDACA,CAAA,4GAEA,CAAA,6HAGA,CAAA,CAAA,KAAA,CAAA,CAAA,+FAEA,CAAA,6CACA,CAAA,0EACA,CAAA,0DACA,CAAA,4FAIJ,CAAA,CAAU,CACR,SAAU,CACR,QAAO,CACP,CAAA,MACF,EACA,CAAA,IAAM,CACJ,EAAA,CAAA,CAAA,IAAQ,CAAA,CACR,SAAU,CAAA,QACH,CAAA,EACP,CAAA,QACA,CAAA,IAAA,CAAA,EAAA,CAAA,gBACO,CAAA,EACP,MAAM,CAAA,EACN,CAAA,IAAA,CAAQ,EAAA,CACR,MAAO,GACP,CAAA,KAAO,CAAA,EACP,OAAQ,EACN,CAAA,iKAGF,CAAU,CAAA,QACH,GACP,CAAA,KAAO,CAAA,EACP,CAAA,KAAO,CAAA,EACP,OAAQ,EAAA,CACR,MAAA,CAAQ,EAAA,CACR,OACA,EAAA,CAAA,GAAM,CAAA,OACA,CAAA,EACN,CAAA,KACA,EAAA,CAAA,GAAM,CACR,EACA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,WAEI,CAAA,CAAA,KAAA,CAAA,CAAW,SAAA,CAAA,cAGX,CAAA,CAAA,IAAA,CAAA,CAAW,SAAA,CAAA,mCAOX,CAAA,CAAA,CAAA,IACA,CAAA,CAAA,OACA,CAAA,MAAA,CAAA,gBAEA,CAAA,OACA,CAAA,QAAA,CAAA,UAEA,CAAA,cAEA,CAAA,MACA,CAAA,MAEF,CAAA,KAAA,CAAA,CAAW,+FAGP,CAAA,0EAKJ,CAAA,CAAA,CAAA,CAAU,CAAA,QACH,CAAA,IAAA,CAAA,IAAA,CAAU,CAAA,iBACN,SAEP,CAAA,CAAA,KAAA,CAAA,CAAA,2ZAMR,CAAA,CAAA,CAAA,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const InputStylesDefaults = {\n autoSize: false,\n type: 'text',\n isClearable: false,\n} as const;\n\nexport const InputStyles = tv({\n slots: {\n container:\n 'group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]',\n sizer: [\n 'font-display [grid-column:1/-1] [grid-row:1]',\n 'group-size-medium/input:text-body-s group-size-small/input:text-body-xs',\n ],\n input: [\n 'fg-primary-bold block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display outline outline-interactive',\n 'enabled:group-focus-visible-within/input:outline-accent-primary-bold',\n 'enabled:group-hover/input:outline-interactive-hover',\n 'enabled:group-pressed/input:outline-interactive-pressed',\n 'enabled:group-invalid/input:outline-serious-bold',\n 'disabled:cursor-not-allowed disabled:text-disabled disabled:outline-interactive-disabled disabled:placeholder:text-disabled',\n ],\n clear: [\n '[grid-column:2/-1] [grid-row:1]',\n 'group-size-medium/input:mr-xs group-size-small/input:mr-xxs',\n 'enabled:fg-info-bold enabled:bg-transparent',\n 'enabled:focus-visible:fg-info-hover enabled:focus-visible:bg-transparent',\n 'enabled:hover:fg-info-hover enabled:hover:bg-transparent',\n 'group-empty/input:invisible',\n 'group-not-empty/input:group-not-focus-within/input:invisible',\n ],\n },\n variants: {\n autoSize: {\n false: '',\n true: '',\n },\n type: {\n button: '',\n checkbox: '',\n color: '',\n date: '',\n 'datetime-local': '',\n email: '',\n file: '',\n hidden: '',\n image: '',\n month: '',\n number: {\n input:\n 'placeholder:fg-primary-muted [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n },\n password: '',\n radio: '',\n range: '',\n reset: '',\n search: '',\n submit: '',\n tel: '',\n text: '',\n time: '',\n url: '',\n week: '',\n },\n isClearable: {\n false: {\n container: '[--room:0px]',\n },\n true: {\n container: '[--room:20px]',\n },\n },\n },\n compoundVariants: [\n {\n type: [\n 'color',\n 'date',\n 'datetime-local',\n 'email',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n ],\n className: {\n sizer: [\n 'group-size-medium/input:min-w-[160px] group-size-medium/input:max-w-[400px]',\n 'group-size-small/input:min-w-[80px] group-size-small/input:max-w-[200px]',\n ],\n },\n },\n {\n autoSize: true,\n type: ['number', 'text'],\n className: {\n sizer: [\n 'group-size-medium/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-s-spacing))+(var(--spacing-s)*2)+var(--room))]',\n 'group-size-small/input:w-[calc((var(--length)*1ch)+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))] group-size-small/input:min-w-[calc(2ch+((var(--length)-1)*var(--typography-body-xs-spacing))+(var(--spacing-s)*2)+var(--room))]',\n ],\n },\n },\n ],\n defaultVariants: InputStylesDefaults,\n});\n"]}
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsxs,jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,Label}from'react-aria-components';import {LabelStyles}from'./styles.js';const o=createContext(null);function t({children:r,...e}){return jsx(o.Provider,{value:e,children:r})}t.displayName="Label.Provider";function a({ref:r,...e}){[e,r]=useContextProps(e,r??null,o);const{children:i,className:s,isDisabled:n,isRequired:l,...p}=e;return jsxs(Label,{...p,className:LabelStyles({className:s}),"data-disabled":n||null,"data-required":l||null,children:[i,!l&&" (optional)"]})}a.displayName="Label",a.Provider=t;export{a as Label,o as LabelContext};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,4 @@
1
+ 'use client';
2
+
1
3
  import {jsx}from'react/jsx-runtime';import'client-only';import {useContextProps,LinkContext,Link,composeRenderProps}from'react-aria-components';import {LinkStyles}from'./styles.js';function o({children:i,...r}){return jsx(LinkContext.Provider,{value:r,children:i})}o.displayName="Link.Provider";function s({ref:i,...r}){[r,i]=useContextProps(r,i??null,LinkContext);const{allowsVisited:n=false,className:l,isVisited:p=false,...a}=r;return jsx(Link,{...a,ref:i,className:composeRenderProps(l,d=>LinkStyles({className:d})),"data-visited":n&&p||null})}s.displayName="Link",s.Provider=o;export{s as Link};//# sourceMappingURL=index.js.map
2
4
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
2
 
3
- declare const LinkStyles: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
3
+ declare const LinkStyles: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], unknown, unknown>>;
4
4
 
5
5
  export { LinkStyles };
@@ -1,2 +1,2 @@
1
- import {tv}from'tailwind-variants';const a=tv({base:["inline-flex cursor-pointer items-center gap-[0.5ch] px-[0.5ch] align-bottom","enabled:fg-accent-primary-bold","enabled:hover:fg-accent-primary-hover enabled:hover:bg-interactive-bold-hover","enabled:focus-visible:fg-accent-primary-hover enabled:focus-visible:bg-interactive-bold-hover","enabled:pressed:fg-accent-primary-pressed enabled:pressed:bg-interactive-bold-pressed","disabled:fg-disabled disabled:cursor-not-allowed"]});export{a as LinkStyles};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const a=tv({base:["inline-flex cursor-pointer items-center gap-[0.5ch] px-[0.5ch] align-bottom","enabled:fg-accent-primary-bold","enabled:hover:fg-accent-primary-hover enabled:hover:bg-interactive-bold-hover","enabled:focus-visible:fg-accent-primary-hover enabled:focus-visible:bg-interactive-bold-hover","enabled:pressed:fg-accent-primary-pressed enabled:pressed:bg-interactive-bold-pressed","disabled:fg-disabled disabled:cursor-not-allowed"]});export{a as LinkStyles};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/link/styles.tsx"],"names":["LinkStyles","tv"],"mappings":"mCAcO,MAAMA,CAAAA,CAAaC,GAAG,CAC3B,IAAA,CAAM,CACJ,6EAAA,CACA,iCACA,+EAAA,CACA,+FAAA,CACA,uFAAA,CACA,kDACF,CACF,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const LinkStyles = tv({\n base: [\n 'inline-flex cursor-pointer items-center gap-[0.5ch] px-[0.5ch] align-bottom',\n 'enabled:fg-accent-primary-bold',\n 'enabled:hover:fg-accent-primary-hover enabled:hover:bg-interactive-bold-hover',\n 'enabled:focus-visible:fg-accent-primary-hover enabled:focus-visible:bg-interactive-bold-hover',\n 'enabled:pressed:fg-accent-primary-pressed enabled:pressed:bg-interactive-bold-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n});\n"]}
1
+ {"version":3,"sources":["../../../src/components/link/styles.tsx"],"names":["e"],"mappings":"sCAeE,MAAM,CACJ,CAAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,8GAEA,CAAA,+EACA,CAAA,+FACA,CAAA,uFACA,CAAA,kDAEH,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const LinkStyles = tv({\n base: [\n 'inline-flex cursor-pointer items-center gap-[0.5ch] px-[0.5ch] align-bottom',\n 'enabled:fg-accent-primary-bold',\n 'enabled:hover:fg-accent-primary-hover enabled:hover:bg-interactive-bold-hover',\n 'enabled:focus-visible:fg-accent-primary-hover enabled:focus-visible:bg-interactive-bold-hover',\n 'enabled:pressed:fg-accent-primary-pressed enabled:pressed:bg-interactive-bold-pressed',\n 'disabled:fg-disabled disabled:cursor-not-allowed',\n ],\n});\n"]}