@accelint/design-toolkit 2.5.0 → 2.6.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 (59) hide show
  1. package/dist/components/combobox-field/index.d.ts +18 -0
  2. package/dist/components/combobox-field/index.js +2 -0
  3. package/dist/components/combobox-field/index.js.map +1 -0
  4. package/dist/components/combobox-field/styles.d.ts +72 -0
  5. package/dist/components/combobox-field/styles.js +2 -0
  6. package/dist/components/combobox-field/styles.js.map +1 -0
  7. package/dist/components/combobox-field/types.d.ts +28 -0
  8. package/dist/components/hotkey/index.d.ts +25 -0
  9. package/dist/components/hotkey/index.js +2 -0
  10. package/dist/components/hotkey/index.js.map +1 -0
  11. package/dist/components/hotkey/styles.d.ts +53 -0
  12. package/dist/components/hotkey/styles.js +2 -0
  13. package/dist/components/hotkey/styles.js.map +1 -0
  14. package/dist/components/hotkey/types.d.ts +8 -0
  15. package/dist/components/hotkey/types.js +2 -0
  16. package/dist/components/hotkey/types.js.map +1 -0
  17. package/dist/components/input/index.js +1 -1
  18. package/dist/components/input/index.js.map +1 -1
  19. package/dist/components/input/styles.d.ts +2 -24
  20. package/dist/components/input/styles.js +1 -1
  21. package/dist/components/input/styles.js.map +1 -1
  22. package/dist/components/menu/index.js +1 -1
  23. package/dist/components/menu/index.js.map +1 -1
  24. package/dist/components/menu/styles.d.ts +9 -6
  25. package/dist/components/menu/styles.js +1 -1
  26. package/dist/components/menu/styles.js.map +1 -1
  27. package/dist/components/menu/types.d.ts +9 -2
  28. package/dist/components/query-builder/value-selector.js +1 -1
  29. package/dist/components/query-builder/value-selector.js.map +1 -1
  30. package/dist/components/select-field/index.d.ts +23 -0
  31. package/dist/components/select-field/index.js +2 -0
  32. package/dist/components/select-field/index.js.map +1 -0
  33. package/dist/components/select-field/styles.d.ts +60 -0
  34. package/dist/components/select-field/styles.js +2 -0
  35. package/dist/components/select-field/styles.js.map +1 -0
  36. package/dist/components/select-field/types.d.ts +26 -0
  37. package/dist/components/select-field/types.js +2 -0
  38. package/dist/components/select-field/types.js.map +1 -0
  39. package/dist/components/view-stack/index.d.ts +28 -0
  40. package/dist/components/view-stack/index.js +2 -0
  41. package/dist/components/view-stack/index.js.map +1 -0
  42. package/dist/components/view-stack/types.d.ts +58 -0
  43. package/dist/components/view-stack/types.js +2 -0
  44. package/dist/components/view-stack/types.js.map +1 -0
  45. package/dist/index.css +20 -0
  46. package/dist/index.d.ts +13 -6
  47. package/dist/index.js +1 -1
  48. package/dist/metafile-esm.json +1 -1
  49. package/dist/styles.css +178 -86
  50. package/package.json +11 -6
  51. package/dist/components/combobox/index.d.ts +0 -27
  52. package/dist/components/combobox/index.js +0 -2
  53. package/dist/components/combobox/index.js.map +0 -1
  54. package/dist/components/navigation-stack/index.d.ts +0 -20
  55. package/dist/components/navigation-stack/index.js +0 -2
  56. package/dist/components/navigation-stack/index.js.map +0 -1
  57. package/dist/components/navigation-stack/types.d.ts +0 -31
  58. /package/dist/components/{navigation-stack → combobox-field}/types.js +0 -0
  59. /package/dist/components/{navigation-stack → combobox-field}/types.js.map +0 -0
@@ -0,0 +1,18 @@
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 { OptionsDataItem } from '../options/types.js';
5
+ import { ComboBoxFieldProps } from './types.js';
6
+ import '../icon/types.js';
7
+ import '../button/types.js';
8
+ import 'tailwind-variants';
9
+ import '../button/styles.js';
10
+ import 'tailwind-merge';
11
+
12
+ declare const ComboBoxFieldContext: react.Context<ContextValue<ComboBoxFieldProps<any>, HTMLDivElement>>;
13
+ declare function ComboBoxField<T extends OptionsDataItem>({ ref, ...props }: ComboBoxFieldProps<T>): react_jsx_runtime.JSX.Element;
14
+ declare namespace ComboBoxField {
15
+ var displayName: string;
16
+ }
17
+
18
+ export { ComboBoxField, ComboBoxFieldContext };
@@ -0,0 +1,2 @@
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {ChevronDown}from'@accelint/icons';import {createContext}from'react';import {useContextProps,ComboBox,composeRenderProps,Input,Button,Text,FieldError,Popover,Virtualizer,ListLayout}from'react-aria-components';import {Icon}from'../icon/index.js';import {Label}from'../label/index.js';import {Options}from'../options/index.js';import {ComboBoxStyles}from'./styles.js';const {field:q,label:w,control:H,input:A,trigger:G,description:J,error:K,popover:Q}=ComboBoxStyles(),c=createContext(null);function W({ref:t,...i}){[i,t]=useContextProps(i,t??null,c);const{children:x,classNames:e,description:a,errorMessage:b,inputProps:P,label:n,layoutOptions:v,menuTrigger:C="focus",size:m="medium",isInvalid:f,...y}=i,p=b||null,d=m==="small";return jsx(ComboBox,{...y,ref:t,className:composeRenderProps(e?.field,l=>q({className:l})),menuTrigger:C,isInvalid:f||(p?true:void 0),"data-size":m,children:({isDisabled:l,isInvalid:B,isRequired:N})=>jsxs(Fragment,{children:[!!n&&!d&&jsx(Label,{className:w({className:e?.label}),isDisabled:l,isRequired:N,children:n}),jsxs("div",{className:H({className:e?.control}),children:[jsx(Input,{...P,className:composeRenderProps(e?.input,r=>A({className:r}))}),jsx(Button,{className:composeRenderProps(e?.trigger,r=>G({className:r})),children:jsx(Icon,{size:"small",children:jsx(ChevronDown,{})})})]}),!!a&&!(d||B)&&jsx(Text,{className:J({className:e?.description}),slot:"description",children:a}),jsx(FieldError,{className:composeRenderProps(e?.error,r=>K({className:r})),children:p}),jsx(Popover,{className:composeRenderProps(e?.popover,r=>Q({className:r})),children:jsx(Virtualizer,{layout:ListLayout,layoutOptions:v,children:jsx(Options,{children:x})})})]})})}W.displayName="ComboBox";export{W as ComboBoxField,c as ComboBoxFieldContext};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/combobox-field/index.tsx"],"names":["input","trigger","description","error","ComboBoxStyles","ComboBoxFieldProvider","k","children","props","ComboBoxFieldContext","labelProp","isInvalidProp","errorMessageProp","size","jsx","ComboBox","rest","ref","composeRenderProps","o","I","className","s","menuTrigger","errorMessage","isInvalid","Fragment","u","X","label","classNames","R","isDisabled","isRequired","control","D","Button","T","Icon","h","descriptionProp","g","M","FieldError","O","popover","z","L","S"],"mappings":"2bAqC+BA,MAAAA,CAAO,KAAA,CAAA,CAAA,CAAAC,KAAS,CAAA,CAAA,CAAA,OAAAC,CAAa,OAAAC,CAAO,CAAA,CAAA,OAAQ,CAAA,CACzEC,CAAAA,WAIyE,CAAA,CAE3E,CAAA,KAAA,CAAA,CAAA,CAASC,OACP,CAAA,CAAA,CAAA,CAAAC,cAAAC,EACA,CAAA,CAAA,CAAGC,aACL,CAAA,eAaqDC,CAAoB,CAAA,CAEvE,GAAA,CAAA,CAAM,CACJ,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAF,CAAAA,CACA,2BACA,CAAA,CAAA,CAAA,CAAA,KAAA,CAAA,QACA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,cACOG,YACP,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,qBACO,CAAA,CAAA,CAAA,WACP,CAAA,CAAA,CAAWC,QAETH,IACiBI,GAAoB,QACzBC,CAAAA,SAAS,CAEzB,OACEC,CAAAA,CAACC,CAAAA,CAAA,CACE,CAAA,EAAGC,MACCC,CAAAA,CACL,GAAA,OAAWC,QAA+BC,GAAA,CAAAC,QAAQC,KAC1C,CAAE,gBAEV,CAAAC,kBAAA,CAAA,CAAA,EAAA,KAAaC,CAAAA,CACb,EAAA,CAAA,CAAA,CAAA,SAA6BC,CAAAA,CAAe,CAAA,CAAA,CAAO,YACnD,CAAA,CAAA,CAAA,oBAGI,CAAA,MAAA,CAAA,CAAA,WAAY,CAAA,CAAA,CAAAC,QAAW,CAAA,CAAA,CAAA,UAEzBC,CAAA,CACG,CAAA,SAAA,CAAC,CAAChB,CAAAA,UACA,CACC,CAAA,CAAA,GAAAiB,IAAA,CAAAC,QAAA,CAAA,CAAWC,QAAQ,CAAA,CA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AAA,CAAA,CAAA,EAAA,QAAC,CAAY,EAAA,CAAA,CAAA,CAAA,SAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,0BAC/BR,MAAU,CAAAiC,UAAA,CAAA,aAEd,CACF,EAEJ,QAGU,CAAA5B,GAAA,CAAA6B,OAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAA,CAAA,UAAA","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 type { ProviderProps } from '@/lib/types';\nimport { ChevronDown } from '@accelint/icons';\nimport { createContext } from 'react';\nimport {\n Button,\n ComboBox,\n type ContextValue,\n FieldError,\n Input,\n ListLayout,\n Popover,\n Text,\n Virtualizer,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { Options } from '../options';\nimport type { OptionsDataItem } from '../options/types';\nimport { ComboBoxStyles } from './styles';\nimport type { ComboBoxFieldProps } from './types';\n\nconst { field, label, control, input, trigger, description, error, popover } =\n ComboBoxStyles();\n\nexport const ComboBoxFieldContext =\n // biome-ignore lint/suspicious/noExplicitAny: Setting a type would restrict it beyond what the component allows to extend to\n createContext<ContextValue<ComboBoxFieldProps<any>, HTMLDivElement>>(null);\n\nfunction ComboBoxFieldProvider<T extends OptionsDataItem>({\n children,\n ...props\n}: ProviderProps<ComboBoxFieldProps<T>>) {\n return (\n <ComboBoxFieldContext.Provider value={props}>\n {children}\n </ComboBoxFieldContext.Provider>\n );\n}\nComboBoxFieldProvider.displayName = 'ComboBoxField.Provider';\n\nexport function ComboBoxField<T extends OptionsDataItem>({\n ref,\n ...props\n}: ComboBoxFieldProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, ComboBoxFieldContext);\n\n const {\n children,\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n inputProps,\n label: labelProp,\n layoutOptions,\n menuTrigger = 'focus',\n size = 'medium',\n isInvalid: isInvalidProp,\n ...rest\n } = props;\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n\n return (\n <ComboBox<T>\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.field, (className) =>\n field({ className }),\n )}\n menuTrigger={menuTrigger}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)} // Leave uncontrolled if possible to fallback to validation state\n data-size={size}\n >\n {(\n { isDisabled, isInvalid, isRequired }, // Rely on internal state, not props, since state could differ from props\n ) => (\n <>\n {!!labelProp && !isSmall && (\n <Label\n className={label({ className: classNames?.label })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n <div className={control({ className: classNames?.control })}>\n <Input\n {...inputProps}\n className={composeRenderProps(classNames?.input, (className) =>\n input({ className }),\n )}\n />\n <Button\n className={composeRenderProps(classNames?.trigger, (className) =>\n trigger({ className }),\n )}\n >\n <Icon size='small'>\n <ChevronDown />\n </Icon>\n </Button>\n </div>\n {!!descriptionProp && !(isSmall || isInvalid) && (\n <Text\n className={description({\n className: classNames?.description,\n })}\n slot='description'\n >\n {descriptionProp}\n </Text>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n error({ className }),\n )}\n >\n {errorMessage}\n </FieldError>\n <Popover\n className={composeRenderProps(classNames?.popover, (className) =>\n popover({ className }),\n )}\n >\n <Virtualizer layout={ListLayout} layoutOptions={layoutOptions}>\n <Options>{children}</Options>\n </Virtualizer>\n </Popover>\n </>\n )}\n </ComboBox>\n );\n}\nComboBoxField.displayName = 'ComboBox';\n"]}
@@ -0,0 +1,72 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+
4
+ declare const ComboBoxStyles: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_merge.ClassNameValue | {
7
+ input?: tailwind_merge.ClassNameValue;
8
+ label?: tailwind_merge.ClassNameValue;
9
+ popover?: tailwind_merge.ClassNameValue;
10
+ trigger?: tailwind_merge.ClassNameValue;
11
+ error?: tailwind_merge.ClassNameValue;
12
+ control?: tailwind_merge.ClassNameValue;
13
+ description?: tailwind_merge.ClassNameValue;
14
+ field?: tailwind_merge.ClassNameValue;
15
+ };
16
+ };
17
+ } | {
18
+ [x: string]: {
19
+ [x: string]: tailwind_merge.ClassNameValue | {
20
+ input?: tailwind_merge.ClassNameValue;
21
+ label?: tailwind_merge.ClassNameValue;
22
+ popover?: tailwind_merge.ClassNameValue;
23
+ trigger?: tailwind_merge.ClassNameValue;
24
+ error?: tailwind_merge.ClassNameValue;
25
+ control?: tailwind_merge.ClassNameValue;
26
+ description?: tailwind_merge.ClassNameValue;
27
+ field?: tailwind_merge.ClassNameValue;
28
+ };
29
+ };
30
+ } | {}, {
31
+ field: string;
32
+ label: string;
33
+ control: string[];
34
+ input: string[];
35
+ trigger: string[];
36
+ description: string[];
37
+ error: string;
38
+ popover: string;
39
+ }, undefined, {
40
+ [key: string]: {
41
+ [key: string]: tailwind_merge.ClassNameValue | {
42
+ input?: tailwind_merge.ClassNameValue;
43
+ label?: tailwind_merge.ClassNameValue;
44
+ popover?: tailwind_merge.ClassNameValue;
45
+ trigger?: tailwind_merge.ClassNameValue;
46
+ error?: tailwind_merge.ClassNameValue;
47
+ control?: tailwind_merge.ClassNameValue;
48
+ description?: tailwind_merge.ClassNameValue;
49
+ field?: tailwind_merge.ClassNameValue;
50
+ };
51
+ };
52
+ } | {}, {
53
+ field: string;
54
+ label: string;
55
+ control: string[];
56
+ input: string[];
57
+ trigger: string[];
58
+ description: string[];
59
+ error: string;
60
+ popover: string;
61
+ }, tailwind_variants.TVReturnType<unknown, {
62
+ field: string;
63
+ label: string;
64
+ control: string[];
65
+ input: string[];
66
+ trigger: string[];
67
+ description: string[];
68
+ error: string;
69
+ popover: string;
70
+ }, undefined, unknown, unknown, undefined>>;
71
+
72
+ export { ComboBoxStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'tailwind-variants';const i=tv({slots:{field:"group/combobox-field flex flex-col gap-xs",label:"",control:["flex items-center rounded-medium px-s py-xs outline","group-enabled/combobox-field:fg-default-light group-enabled:combobox-field:outline-interactive","group-enabled/combobox-field:placeholder:fg-default-dark","group-enabled/combobox-field:focus-within:outline-highlight","group-enabled/combobox-field:hover:outline-interactive-hover","group-enabled/combobox-field:group-invalid/combobox-field:outline-serious","group-disabled/combobox-field:fg-disabled group-disabled/combobox-field:outline-interactive-disabled"],input:["font-display outline-none","group-size-medium/combobox-field:text-body-s","group-size-small/combobox-field:text-body-xs"],trigger:["fg-default-light","group-open/combobox-field:rotate-180 group-open/combobox-field:transform","group-disabled/combobox-field:fg-disabled"],description:["fg-default-dark text-body-xs","group-disabled/combobox-field:fg-disabled"],error:"fg-serious text-body-xs",popover:"-ml-s min-w-[calc(var(--trigger-width)+(var(--spacing-s)*2))]"}});export{i as ComboBoxStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/combobox-field/styles.ts"],"names":["ComboBoxStyles","tv"],"mappings":"mCAcO,MAAMA,EAAiBC,EAAAA,CAAG,CAC/B,MAAO,CACL,KAAA,CAAO,4CACP,KAAA,CAAO,EAAA,CACP,QAAS,CACP,qDAAA,CACA,iGACA,0DAAA,CACA,6DAAA,CACA,+DACA,2EAAA,CACA,sGACF,EACA,KAAA,CAAO,CACL,4BACA,8CAAA,CACA,8CACF,EACA,OAAA,CAAS,CACP,mBACA,0EAAA,CACA,2CACF,EACA,WAAA,CAAa,CACX,+BACA,2CACF,CAAA,CACA,MAAO,yBAAA,CACP,OAAA,CAAS,+DACX,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 ComboBoxStyles = tv({\n slots: {\n field: 'group/combobox-field flex flex-col gap-xs',\n label: '',\n control: [\n 'flex items-center rounded-medium px-s py-xs outline',\n 'group-enabled/combobox-field:fg-default-light group-enabled:combobox-field:outline-interactive',\n 'group-enabled/combobox-field:placeholder:fg-default-dark',\n 'group-enabled/combobox-field:focus-within:outline-highlight',\n 'group-enabled/combobox-field:hover:outline-interactive-hover',\n 'group-enabled/combobox-field:group-invalid/combobox-field:outline-serious',\n 'group-disabled/combobox-field:fg-disabled group-disabled/combobox-field:outline-interactive-disabled',\n ],\n input: [\n 'font-display outline-none',\n 'group-size-medium/combobox-field:text-body-s',\n 'group-size-small/combobox-field:text-body-xs',\n ],\n trigger: [\n 'fg-default-light',\n 'group-open/combobox-field:rotate-180 group-open/combobox-field:transform',\n 'group-disabled/combobox-field:fg-disabled',\n ],\n description: [\n 'fg-default-dark text-body-xs',\n 'group-disabled/combobox-field:fg-disabled',\n ],\n error: 'fg-serious text-body-xs',\n popover: '-ml-s min-w-[calc(var(--trigger-width)+(var(--spacing-s)*2))]',\n },\n});\n"]}
@@ -0,0 +1,28 @@
1
+ import { RefAttributes } from 'react';
2
+ import { ComboBoxProps, VirtualizerProps, ListLayoutOptions, LabelProps, InputProps, FieldErrorProps, PopoverProps } from 'react-aria-components';
3
+ import { ButtonProps } from '../button/types.js';
4
+ import { OptionsDataItem, OptionsProps } from '../options/types.js';
5
+ import 'tailwind-variants';
6
+ import '../button/styles.js';
7
+ import 'tailwind-merge';
8
+ import '../icon/types.js';
9
+
10
+ type ComboBoxFieldProps<T extends OptionsDataItem> = Omit<ComboBoxProps<T>, 'children' | 'className'> & Pick<VirtualizerProps<ListLayoutOptions>, 'layoutOptions'> & Pick<OptionsProps<T>, 'children'> & RefAttributes<HTMLDivElement> & {
11
+ classNames?: {
12
+ field?: ComboBoxProps<T>['className'];
13
+ label?: LabelProps['className'];
14
+ control?: string;
15
+ input?: InputProps['className'];
16
+ trigger?: ButtonProps['className'];
17
+ description?: string;
18
+ error?: FieldErrorProps['className'];
19
+ popover?: PopoverProps['className'];
20
+ };
21
+ label?: string;
22
+ inputProps?: Omit<InputProps, 'className'>;
23
+ description?: string;
24
+ errorMessage?: string;
25
+ size?: 'small' | 'medium';
26
+ };
27
+
28
+ export type { ComboBoxFieldProps };
@@ -0,0 +1,25 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
+ import { ProviderProps } from '../../lib/types.js';
4
+ import { ContextValue } from 'react-aria-components';
5
+ import { HotkeyProps, HotkeySetProps } from './types.js';
6
+ import 'tailwind-variants';
7
+ import './styles.js';
8
+
9
+ declare const HotkeyContext: react.Context<ContextValue<HotkeyProps, HTMLElement>>;
10
+ declare function HotkeyProvider({ children, ...props }: ProviderProps<HotkeyProps>): react_jsx_runtime.JSX.Element;
11
+ declare namespace HotkeyProvider {
12
+ var displayName: string;
13
+ }
14
+ declare function Hotkey({ ref, children, ...props }: HotkeyProps): react_jsx_runtime.JSX.Element;
15
+ declare namespace Hotkey {
16
+ var displayName: string;
17
+ var Set: typeof HotkeySet;
18
+ var Provider: typeof HotkeyProvider;
19
+ }
20
+ declare function HotkeySet({ children, ...props }: HotkeySetProps): react_jsx_runtime.JSX.Element;
21
+ declare namespace HotkeySet {
22
+ var displayName: string;
23
+ }
24
+
25
+ export { Hotkey, HotkeyContext, HotkeySet };
@@ -0,0 +1,2 @@
1
+ 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,n as HotkeySet};//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/hotkey/index.tsx"],"names":["HotkeyStyles","HotkeyContext","createContext","H","p","props","jsx","r","HotkeyProvider","useContextProps","ref","P","HotkeyStylesDefaults","Keyboard","m","className","children","Hotkey","Icon","k"],"mappings":"6PA0BqBA,CAAAA,GAERC,CAAAA,CACXC,CAAAA,KAA0D,CAAA,CAE5DC,YAAA,EAAA,CAAA,CAAA,CAAAC,aAAA,CAAA,IAA0B,WAAU,CAAA,CAAA,CAAGC,QACrC,CAAA,CAAA,CACEC,GAACL,CAAc,CAAA,CAAA,CAAA,OAASM,GAAA,CAAA,CAAA,CAAA,QAAe,CAAA,CAAA,KAAS,CAEpD,CACAC,CAAAA,QAAe,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,iBAEJ,CAAA,eAAe,CAAA,CAAA,CAAGH,QAC9B,CAAA,CAAII,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAMT,CAAa,CAAAU,eAChE,MAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAW,CAAA,SAAUC,CAAqB,CAAA,CAAA,OAAYP,CAAAA,CAE9D,6BACGQ,CAAA,CAAS,CAAA,CAAA,OAAcR,GAAAA,CAAOS,QAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAe,CAAE,CAAA,SAAAC,CAAAA,CAAW,CAAA,CAAA,SAAS,CACjE,CAAA,CAAA,OAAAC,CAAAA,CACH,CAEJ,CACAC,CAAAA,QAAO,CAAA,CAAA,CAAA,CAAA,CAAc,aAEd,CAAA,QAAqB,CAAA,SAAU,CAAA,CAAA,CAAGZ,QACvC,CAAM,CAAE,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,KAAcA,CAAAA,SAGpBC,CAAC,YAAIC,GAAA,CAAA,KAAe,CAAE,CAAA,SAAAQ,CAAU,CAAC,CAAA,CAC/B,SAAAT,CAAAA,CAACY,EAAK,CAAA,QAAL,CAAcX,GAAA,CAAAY,IAAA,CAAA,QAAK,CAAS,aAC/B,CAEJ,QACU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAExBF,aACO,CAAA,CAAA,CAAA,GAAWT,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,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 type { ProviderProps } from '@/lib/types';\nimport { createContext } from 'react';\nimport {\n type ContextValue,\n Keyboard,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { HotkeyStyles, HotkeyStylesDefaults } from './styles';\nimport type { HotkeyProps, HotkeySetProps } from './types';\n\nconst { key, set } = HotkeyStyles();\n\nexport const HotkeyContext =\n createContext<ContextValue<HotkeyProps, HTMLElement>>(null);\n\nfunction HotkeyProvider({ children, ...props }: ProviderProps<HotkeyProps>) {\n return (\n <HotkeyContext.Provider value={props}>{children}</HotkeyContext.Provider>\n );\n}\nHotkeyProvider.displayName = 'Hotkey.Provider';\n\nexport function Hotkey({ ref, children, ...props }: HotkeyProps) {\n [props, ref] = useContextProps(props, ref ?? null, HotkeyContext);\n const { className, variant = HotkeyStylesDefaults.variant } = props;\n\n return (\n <Keyboard ref={ref} {...props} className={key({ className, variant })}>\n {children}\n </Keyboard>\n );\n}\nHotkey.displayName = 'Hotkey';\n\nexport function HotkeySet({ children, ...props }: HotkeySetProps) {\n const { className } = props;\n\n return (\n <div className={set({ className })}>\n <Icon.Provider size='large'>{children}</Icon.Provider>\n </div>\n );\n}\nHotkeySet.displayName = 'Hotkey.Set';\n\nHotkey.Set = HotkeySet;\nHotkey.Provider = HotkeyProvider;\n"]}
@@ -0,0 +1,53 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const HotkeyStylesDefaults: {
4
+ readonly variant: "outline";
5
+ };
6
+ declare const HotkeyStyles: tailwind_variants.TVReturnType<{
7
+ variant: {
8
+ flat: {
9
+ key: string;
10
+ };
11
+ outline: {
12
+ key: string;
13
+ };
14
+ icon: {
15
+ key: string;
16
+ };
17
+ };
18
+ }, {
19
+ key: string;
20
+ set: string;
21
+ }, undefined, {
22
+ variant: {
23
+ flat: {
24
+ key: string;
25
+ };
26
+ outline: {
27
+ key: string;
28
+ };
29
+ icon: {
30
+ key: string;
31
+ };
32
+ };
33
+ }, {
34
+ key: string;
35
+ set: string;
36
+ }, tailwind_variants.TVReturnType<{
37
+ variant: {
38
+ flat: {
39
+ key: string;
40
+ };
41
+ outline: {
42
+ key: string;
43
+ };
44
+ icon: {
45
+ key: string;
46
+ };
47
+ };
48
+ }, {
49
+ key: string;
50
+ set: string;
51
+ }, undefined, unknown, unknown, undefined>>;
52
+
53
+ export { HotkeyStyles, HotkeyStylesDefaults };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';const t={variant:"outline"},r=tv({slots:{key:"fg-default-light w-fit min-w-xl p-xs text-header-s uppercase",set:"fg-default-dark flex items-center gap-xs text-header-m"},variants:{variant:{flat:{key:"bg-transparent"},outline:{key:"rounded-medium border border-info border-b-[3px] bg-surface-default"},icon:{key:"-mx-xs bg-transparent px-0"}}},defaultVariants:t});export{r as HotkeyStyles,t as HotkeyStylesDefaults};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/hotkey/styles.ts"],"names":["e"],"mappings":"6CAeW,CAAA,CAAA,OACX,CAAA,YAGS,CACLA,EAAA,CAAA,CAAA,yEACK,CAAA,GAAA,CAAA,wDAEP,CAAU,CACR,QAAS,CACP,QACE,CAAA,CAAK,0BAEE,CACP,CAAA,OAAK,CAAA,CAAA,GAAA,CAAA,uEAGA,IAAA,CAAA,CAAA,GAAA,CAAA,4BAIX,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 HotkeyStylesDefaults = {\n variant: 'outline',\n} as const;\n\nexport const HotkeyStyles = tv({\n slots: {\n key: 'fg-default-light w-fit min-w-xl p-xs text-header-s uppercase',\n set: 'fg-default-dark flex items-center gap-xs text-header-m',\n },\n variants: {\n variant: {\n flat: {\n key: 'bg-transparent',\n },\n outline: {\n key: 'rounded-medium border border-info border-b-[3px] bg-surface-default',\n },\n icon: {\n key: '-mx-xs bg-transparent px-0',\n },\n },\n },\n defaultVariants: HotkeyStylesDefaults,\n});\n"]}
@@ -0,0 +1,8 @@
1
+ import { HTMLAttributes, RefAttributes, PropsWithChildren } from 'react';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import { HotkeyStyles } from './styles.js';
4
+
5
+ type HotkeyProps = HTMLAttributes<HTMLElement> & VariantProps<typeof HotkeyStyles> & RefAttributes<HTMLElement>;
6
+ type HotkeySetProps = HTMLAttributes<HTMLDivElement> & PropsWithChildren;
7
+
8
+ export type { HotkeyProps, HotkeySetProps };
@@ -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"}
@@ -1,2 +1,2 @@
1
- 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:r,autoSize:s,defaultValue:h="",disabled:p,placeholder:d,readOnly:m,required:I,size:f,type:l=InputStylesDefaults.type,value:g,isClearable:n,isInvalid:x,onChange:E,onKeyDown:P,...N}=a,[i,b]=useControlledState(g,h),z=(`${i??""}`.length||d?.length)??0,o=i==null||i==="";function c(e){E?.(e),e.defaultPrevented||b(e.target.value);}return jsxs("div",{className:w({className:r?.container,autoSize:s,type:l,isClearable:n,isEmpty:o}),"data-disabled":p||null,"data-invalid":x||null,"data-length":z,"data-placeholder":!!d&&o||null,"data-readonly":m||null,"data-required":I||null,"data-size":f,children:[jsx("div",{className:A({className:r?.sizer,autoSize:s,type:l,isClearable:n,isEmpty:o}),children:jsx(Input,{...N,ref:t,className:composeRenderProps(r?.input,e=>B({className:e,autoSize:s,type:l,isClearable:n,isEmpty:o})),disabled:p,placeholder:d,readOnly:m,required:I,type:l,value:i,onChange:c,onKeyDown:e=>{P?.(e),n&&!e.defaultPrevented&&e.key==="Escape"&&c(v);}})}),n&&jsx(Button,{className:composeRenderProps(r?.clear,e=>F({className:e,autoSize:s,type:l,isClearable:n,isEmpty:o})),excludeFromTabOrder:true,size:"small",variant:"icon",isDisabled:p,onPress:()=>{c(v),t?.current?.focus();},children:jsx(Icon,{children:jsx(CancelFill,{})})})]})}k.displayName="Input";export{k as Input,K as InputContext};//# sourceMappingURL=index.js.map
1
+ 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:p,readOnly:c,required:m,size:f,type:l=InputStylesDefaults.type,value:g,isClearable:n,isInvalid:x,onChange:E,onKeyDown:P,...N}=a,[s,b]=useControlledState(g,h),z=(`${s??""}`.length||p?.length)??0,I=s==null||s==="";function d(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":!!p&&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:p,readOnly:c,required:m,type:l,value:s,onChange:d,onKeyDown:e=>{P?.(e),n&&!e.defaultPrevented&&e.key==="Escape"&&d(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:()=>{d(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
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/input/index.tsx"],"names":["clear","clearInputEvent","M","InputContext","createContext","Input","ref","props","useContextProps","C","q","autoSize","defaultValue","placeholder","readOnly","required","type","valueProp","isInvalid","onChange","onKeyDown","value","setValue","length","isEmpty","handleChange","event","jsxs","R","classNames","jsx","u","AriaInput","composeRenderProps","className","input","y","disabled","isClearable","D"],"mappings":"8ZA8B0B,MAAA,CAAA,SAAO,CAAAA,CAAM,CAAA,KAGjCC,CAAAA,CAAkB,CACtB,OAAQ,CAAE,KAAA,CAAO,EAAG,CACtBC,WAAA,EAEaC,CACXC,CAAAA,CAA0D,OAErD,CAAA,CAAA,KAAA,CAASC,EAAM,CAAE,CAAA,CAAA,CAAA,CAAAC,cAAK,IAAS,EAAe,SASpBC,CAAAA,CAAOD,CAAAA,SAA6B,CACnE,CAACC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A,OAAC,WACCM,CAAAA,QACF,CACFC,QAEJ,CAEJ,CACA1B,QAAM,CAAA0B,GAAA,CAAAQ,UAAA,CAAA,EAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAA,CAAA,OAAA","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 { CancelFill } from '@accelint/icons';\nimport { useControlledState } from '@react-stately/utils';\nimport { type ChangeEvent, createContext } from 'react';\nimport {\n Input as AriaInput,\n InputContext as AriaInputContext,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { InputStyles, InputStylesDefaults } from './styles';\nimport type { InputProps } from './types';\n\nconst { container, sizer, input, clear } = InputStyles();\n\n// TODO: Improve this implementation so it is more of a realistic event\nconst clearInputEvent = {\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>;\n\nexport const InputContext =\n createContext<ContextValue<InputProps, HTMLInputElement>>(null);\n\nexport function Input({ ref, ...props }: InputProps) {\n /**\n * It is necessary to pull in the AriaInputContext to capture defaultValue,\n * value & onChange props that may be supplied by a Field component\n *\n * These are necessary due to the implementation of useControlledState for\n * the purposes of supporting the clear button and to capture the length\n * of the current value for the autoSize feature\n */\n [props, ref] = useContextProps(props, ref ?? null, AriaInputContext);\n [props, ref] = useContextProps({ ...props }, ref ?? null, InputContext);\n\n const {\n classNames,\n autoSize,\n defaultValue = '',\n disabled,\n placeholder,\n readOnly,\n required,\n size,\n type = InputStylesDefaults.type,\n value: valueProp,\n isClearable,\n isInvalid,\n onChange,\n onKeyDown,\n ...rest\n } = props;\n\n const [value, setValue] = useControlledState(valueProp, defaultValue);\n const length = (`${value ?? ''}`.length || placeholder?.length) ?? 0;\n const isEmpty = value == null || value === '';\n\n function handleChange(event: ChangeEvent<HTMLInputElement>) {\n onChange?.(event);\n\n if (!event.defaultPrevented) {\n setValue(event.target.value);\n }\n }\n\n return (\n <div\n className={container({\n className: classNames?.container,\n autoSize,\n type,\n isClearable,\n isEmpty,\n })}\n data-disabled={disabled || null}\n data-invalid={isInvalid || null}\n data-length={length}\n data-placeholder={(!!placeholder && isEmpty) || null}\n data-readonly={readOnly || null}\n data-required={required || null}\n data-size={size}\n >\n <div\n className={sizer({\n className: classNames?.sizer,\n autoSize,\n type,\n isClearable,\n isEmpty,\n })}\n >\n <AriaInput\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.input, (className) =>\n input({ className, autoSize, type, isClearable, isEmpty }),\n )}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n required={required}\n type={type}\n value={value}\n onChange={handleChange}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n\n if (\n isClearable &&\n !event.defaultPrevented &&\n event.key === 'Escape'\n ) {\n handleChange(clearInputEvent);\n }\n }}\n />\n </div>\n {isClearable && (\n <Button\n className={composeRenderProps(classNames?.clear, (className) =>\n clear({ className, autoSize, type, isClearable, isEmpty }),\n )}\n excludeFromTabOrder\n size='small'\n variant='icon'\n isDisabled={disabled}\n onPress={() => {\n handleChange(clearInputEvent);\n\n ref?.current?.focus();\n }}\n >\n <Icon>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </div>\n );\n}\nInput.displayName = 'Input';\n"]}
1
+ {"version":3,"sources":["../../../src/components/input/index.tsx"],"names":["clear","clearInputEvent","M","InputContext","createContext","Input","ref","props","useContextProps","C","q","autoSize","defaultValue","placeholder","readOnly","required","type","valueProp","O","isInvalid","onChange","onKeyDown","value","setValue","length","S","isEmpty","handleChange","event","jsxs","R","classNames","jsx","composeRenderProps","className","input","y","isClearable","o","D"],"mappings":"8aA8BiC,CAAAA,CAAM,CAAA,KAGjCC,CAAAA,CAAkB,CACtB,KAAA,CAAA,CAAQ,CAAE,MAAO,CAAA,CAAG,CACtBC,WAAA,EAEaC,CACXC,EAA0D,CAAA,cAE5CC,EAAM,CAAE,IAAAC,aAAAA,CAAK,IAAS,EAAe,SASpBC,EAAOD,CAAAA,GAAO,CAAA,CAAA,CAAA,GAAsB,CACnE,CAACC,CAAAA,CAAOD,CAAG,EAAIE,CAAAA,CAAgB,CAAEC,iBAAGF,CAAM,CAAA,EAAGD,IAAO,CAAAI,YAAA,CAAMP,CAAY,CAAA,CAEtE,CAAA,CAAA,CAAA,CAAAM,eAAM,CACJ,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,EAAA,aACAE,CACA,UAAA,CAAA,CAAA,CAAAC,uBAEA,CAAA,CAAA,CAAA,EAAAC,SACA,CAAA,CAAAC,CAAAA,WACAC,CACA,CAAA,CAAA,QACA,CAAA,CAAAC,SACA,OAAOC,CACP,CAAA,CAAA,IAAA,CAAA,CAAA,CAAAC,mBAAA,CAAA,IACA,CAAA,KAAA,CAAA,CAAA,CAAAC,WACAC,CAAAA,CACA,UAAAC,CAAAA,CACA,CAAA,QAGKC,CAAAA,CAAOC,CAAQ,SAChBC,GAAU,GAAGF,CAAAA,CAAAA,CAAS,EAAE,CAAA,CAAA,CAAG,CAAA,CAAA,CAAAG,kBAAA,CAAA,CAAA,CAAA,CAAUZ,CAAAA,CAAAA,CAAa,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,GAClDa,CAAAA,CAAUJ,SAAiBA,EAAAA,cAExBK,EAAaC,IACpBR,EAAAA,CAAWQ,GAENA,EAAM,mBACTL,CAASK,CAAAA,CAAM,kBAInB,EAAA,CACEC,EAAC,CAAA,MACC,CAAA,KAAA,EAAA,CAAA,OACEC,IAA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A,CAAA,WAAA,CAAA,CAAmB,CAAA,CAAA,CACnB,CAAA,oBACQ,IAAA,CAAA,IACR,CAAA,OAAA,CAAA,OACA,CAAA,MAAS,CAAA,UAGF,UAAS,CAAA,IAAM,CACtB,EAEA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAC,EACC,KAAA,GAAA,CAAAqB,CAAAA,QACF,CACFM,QAEJ,CAEJ,CACAjC,QAAM,CAAAiC,GAAA,CAAAC,UAAA,CAAA,EAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAA,CAAA,OAAA","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 { CancelFill } from '@accelint/icons';\nimport { useControlledState } from '@react-stately/utils';\nimport { type ChangeEvent, createContext } from 'react';\nimport {\n Input as AriaInput,\n InputContext as AriaInputContext,\n type ContextValue,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { InputStyles, InputStylesDefaults } from './styles';\nimport type { InputProps } from './types';\n\nconst { container, sizer, input, clear } = InputStyles();\n\n// TODO: Improve this implementation so it is more of a realistic event\nconst clearInputEvent = {\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>;\n\nexport const InputContext =\n createContext<ContextValue<InputProps, HTMLInputElement>>(null);\n\nexport function Input({ ref, ...props }: InputProps) {\n /**\n * It is necessary to pull in the AriaInputContext to capture defaultValue,\n * value & onChange props that may be supplied by a Field component\n *\n * These are necessary due to the implementation of useControlledState for\n * the purposes of supporting the clear button and to capture the length\n * of the current value for the autoSize feature\n */\n [props, ref] = useContextProps(props, ref ?? null, AriaInputContext);\n [props, ref] = useContextProps({ ...props }, ref ?? null, InputContext);\n\n const {\n classNames,\n autoSize,\n defaultValue = '',\n disabled,\n placeholder,\n readOnly,\n required,\n size,\n type = InputStylesDefaults.type,\n value: valueProp,\n isClearable,\n isInvalid,\n onChange,\n onKeyDown,\n ...rest\n } = props;\n\n const [value, setValue] = useControlledState(valueProp, defaultValue);\n const length = (`${value ?? ''}`.length || placeholder?.length) ?? 0;\n const isEmpty = value == null || value === '';\n\n function handleChange(event: ChangeEvent<HTMLInputElement>) {\n onChange?.(event);\n\n if (!event.defaultPrevented) {\n setValue(event.target.value);\n }\n }\n\n return (\n <div\n className={container({\n className: classNames?.container,\n autoSize,\n type,\n isClearable,\n })}\n data-disabled={disabled || null}\n data-empty={isEmpty || null}\n data-invalid={isInvalid || null}\n data-length={length}\n data-placeholder={(!!placeholder && isEmpty) || null}\n data-readonly={readOnly || null}\n data-required={required || null}\n data-size={size}\n >\n <div\n className={sizer({\n className: classNames?.sizer,\n autoSize,\n type,\n isClearable,\n })}\n >\n <AriaInput\n {...rest}\n ref={ref}\n className={composeRenderProps(classNames?.input, (className) =>\n input({ className, autoSize, type, isClearable }),\n )}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n required={required}\n type={type}\n value={value}\n onChange={handleChange}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n\n if (\n isClearable &&\n !event.defaultPrevented &&\n event.key === 'Escape'\n ) {\n handleChange(clearInputEvent);\n }\n }}\n />\n </div>\n {isClearable && (\n <Button\n className={composeRenderProps(classNames?.clear, (className) =>\n clear({ className, autoSize, type, isClearable }),\n )}\n excludeFromTabOrder\n size='small'\n variant='icon'\n isDisabled={disabled}\n onPress={() => {\n handleChange(clearInputEvent);\n\n ref?.current?.focus();\n }}\n >\n <Icon>\n <CancelFill />\n </Icon>\n </Button>\n )}\n </div>\n );\n}\nInput.displayName = 'Input';\n"]}
@@ -1,7 +1,9 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
2
 
3
3
  declare const InputStylesDefaults: {
4
+ readonly autoSize: false;
4
5
  readonly type: "text";
6
+ readonly isClearable: false;
5
7
  };
6
8
  declare const InputStyles: tailwind_variants.TVReturnType<{
7
9
  autoSize: {
@@ -42,14 +44,6 @@ declare const InputStyles: tailwind_variants.TVReturnType<{
42
44
  container: string;
43
45
  };
44
46
  };
45
- isEmpty: {
46
- false: {
47
- clear: string;
48
- };
49
- true: {
50
- clear: string;
51
- };
52
- };
53
47
  }, {
54
48
  container: string;
55
49
  sizer: string[];
@@ -94,14 +88,6 @@ declare const InputStyles: tailwind_variants.TVReturnType<{
94
88
  container: string;
95
89
  };
96
90
  };
97
- isEmpty: {
98
- false: {
99
- clear: string;
100
- };
101
- true: {
102
- clear: string;
103
- };
104
- };
105
91
  }, {
106
92
  container: string;
107
93
  sizer: string[];
@@ -146,14 +132,6 @@ declare const InputStyles: tailwind_variants.TVReturnType<{
146
132
  container: string;
147
133
  };
148
134
  };
149
- isEmpty: {
150
- false: {
151
- clear: string;
152
- };
153
- true: {
154
- clear: string;
155
- };
156
- };
157
135
  }, {
158
136
  container: string;
159
137
  sizer: string[];
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const t={type:"text"},i=tv({slots:{container:"group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]",sizer:["[grid-column:1/-1] [grid-row:1]","font-display group-size-medium/input:text-body-s group-size-small/input:text-body-xs"],input:["block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display text-default-light outline outline-interactive","enabled:group-focus/input:outline-highlight","enabled:group-hover/input:outline-interactive-hover","enabled:group-invalid/input:outline-serious","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-interactive enabled:bg-transparent","enabled:focus:fg-interactive-hover enabled:focus:bg-transparent","enabled:hover:fg-interactive-hover enabled:hover:bg-transparent"]},variants:{autoSize:{false:"",true:""},type:{button:"",checkbox:"",color:"",date:"","datetime-local":"",email:"",file:"",hidden:"",image:"",month:"",number:{input:"[appearance:textfield] placeholder:text-default-dark [&::-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]"}},isEmpty:{false:{clear:"group-not-focus-within/input:hidden"},true:{clear:"hidden"}}},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-medium/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{i as InputStyles,t as InputStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t={autoSize:false,type:"text",isClearable:false},i=tv({slots:{container:"group/input grid items-center [--length:attr(data-length_type(<number>),0)] [grid-template-columns:minmax(0,1fr)_min-content]",sizer:["[grid-column:1/-1] [grid-row:1]","font-display group-size-medium/input:text-body-s group-size-small/input:text-body-xs"],input:["block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display text-default-light outline outline-interactive","enabled:group-focus/input:outline-highlight","enabled:group-hover/input:outline-interactive-hover","enabled:group-invalid/input:outline-serious","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-interactive enabled:bg-transparent","enabled:focus:fg-interactive-hover enabled:focus:bg-transparent","enabled:hover:fg-interactive-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:"[appearance:textfield] placeholder:text-default-dark [&::-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-medium/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{i 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":["InputStyles","tv","e"],"mappings":"sCAeQ,MAAA,C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,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 type: 'text',\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 '[grid-column:1/-1] [grid-row:1]',\n 'font-display group-size-medium/input:text-body-s group-size-small/input:text-body-xs',\n ],\n input: [\n 'block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display text-default-light outline outline-interactive',\n 'enabled:group-focus/input:outline-highlight',\n 'enabled:group-hover/input:outline-interactive-hover',\n 'enabled:group-invalid/input:outline-serious',\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-interactive enabled:bg-transparent',\n 'enabled:focus:fg-interactive-hover enabled:focus:bg-transparent',\n 'enabled:hover:fg-interactive-hover enabled:hover:bg-transparent',\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 '[appearance:textfield] placeholder:text-default-dark [&::-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 isEmpty: {\n false: {\n clear: 'group-not-focus-within/input:hidden',\n },\n true: {\n clear: 'hidden',\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-medium/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,CAAA,KAAA,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAA,CAAA,CACE,SAAA,CAAA,+HAEA,CAAA,KAAA,CAAA,CAAA,iCACA,CAAA,sFAGA,CAAA,CAAA,KAAA,CAAA,CAAA,4IACA,CAAA,6CACA,CAAA,mGAEA,CAAA,6HAGA,CAAA,CAAA,KAAA,CAAA,CAAA,+FAEA,CAAA,+CACA,CAAA,iEACA,CAAA,iEACA,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,kKAGF,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,2EAKJ,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 '[grid-column:1/-1] [grid-row:1]',\n 'font-display group-size-medium/input:text-body-s group-size-small/input:text-body-xs',\n ],\n input: [\n 'block w-full rounded-medium py-xs pr-[calc(var(--room)+var(--spacing-s))] pl-s font-display text-default-light outline outline-interactive',\n 'enabled:group-focus/input:outline-highlight',\n 'enabled:group-hover/input:outline-interactive-hover',\n 'enabled:group-invalid/input:outline-serious',\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-interactive enabled:bg-transparent',\n 'enabled:focus:fg-interactive-hover enabled:focus:bg-transparent',\n 'enabled:hover:fg-interactive-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 '[appearance:textfield] placeholder:text-default-dark [&::-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-medium/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,2 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {isSlottedContextValue}from'./../../lib/utils.js';import y from'@accelint/icons/chevron-right';import {createContext,useContext}from'react';import {useContextProps,Popover,Menu,composeRenderProps,MenuTrigger,SubmenuTrigger,MenuSection,Header,Collection,Separator,Text,MenuItem,Provider,KeyboardContext,DEFAULT_SLOT}from'react-aria-components';import {IconContext,Icon}from'../icon/index.js';import {MenuStyles,MenuStylesDefaults}from'./styles.js';const {menu:z,icon:B,item:G,label:J,description:Q,more:W,sectionHeader:X,separator:Y,keyboard:Z}=MenuStyles(),N=createContext(null);function P(n){const{header:e,children:o,classNames:t,items:i,...c}=n;return jsxs(MenuSection,{className:t?.section,...c,children:[jsx(Header,{className:X({className:t?.sectionHeader}),children:e}),jsx(Collection,{items:i,children:o})]})}P.displayName="Menu.Section";function S({className:n,...e}){return jsx(Separator,{...e,className:Y({className:n})})}S.displayName="Menu.Separator";function T(n){const{children:e,className:o,...t}=n;return jsx(Text,{...t,slot:"label",className:J({className:o}),children:e})}T.displayName="Menu.Item.Label";function f(n){const{children:e,className:o,...t}=n;return jsx(Text,{...t,slot:"description",className:Q({className:o}),children:e})}f.displayName="Menu.Item.Description";function u(n){const e=useContext(N),o=(isSlottedContextValue(e)?void 0:e?.variant)??MenuStylesDefaults.variant,{classNames:t,color:i=MenuStylesDefaults.color,children:c,...l}=n;return jsx(MenuItem,{...l,className:composeRenderProps(t?.item,r=>G({className:r,variant:o,color:i})),children:composeRenderProps(c,(r,{hasSubmenu:m})=>jsxs(Provider,{values:[[KeyboardContext,{className:Z({className:t?.keyboard})}],[IconContext,{slots:{[DEFAULT_SLOT]:{className:B({className:t?.icon})},submenu:{className:W({className:t?.more})}}}]],children:[typeof r=="string"?jsx(Text,{className:t?.text,slot:"label",children:r}):r,m&&jsx(Icon,{slot:"submenu",children:jsx(y,{})})]}))})}u.displayName="Menu.Item",u.Label=T,u.Description=f;function s({ref:n,...e}){[e,n]=useContextProps(e,n??null,N);const{children:o,className:t,selectionMode:i="single",offset:c=-4,placement:l,isNonModal:r,containerPadding:m,variant:x=MenuStylesDefaults.variant,...b}=e;return jsx(Popover,{offset:c,placement:l,isNonModal:r,containerPadding:m,children:jsx(N.Provider,{value:{variant:x},children:jsx(Menu,{ref:n,className:composeRenderProps(t,g=>z({className:g,variant:x})),selectionMode:i,...b,children:o})})})}s.displayName="Menu",s.Trigger=MenuTrigger,s.Submenu=SubmenuTrigger,s.Item=u,s.Separator=S,s.Section=P;export{s as Menu,N as MenuContext};//# sourceMappingURL=index.js.map
1
+ import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {isSlottedContextValue}from'./../../lib/utils.js';import f from'@accelint/icons/chevron-right';import {createContext,useContext}from'react';import {useContextProps,Popover,composeRenderProps,Menu,MenuTrigger,SubmenuTrigger,MenuSection,Header,Collection,Separator,Text,MenuItem,Provider,KeyboardContext,DEFAULT_SLOT}from'react-aria-components';import {IconContext,Icon}from'../icon/index.js';import {MenuStyles,MenuStylesDefaults}from'./styles.js';const {menu:U,icon:_,item:q,label:z,description:B,more:G,sectionHeader:J,separator:Q,hotkey:W,popover:X}=MenuStyles(),N=createContext(null);function x(n){const{header:t,children:r,classNames:e,items:u,...s}=n;return jsxs(MenuSection,{className:e?.section,...s,children:[jsx(Header,{className:J({className:e?.sectionHeader}),children:t}),jsx(Collection,{items:u,children:r})]})}x.displayName="Menu.Section";function S({className:n,...t}){return jsx(Separator,{...t,className:Q({className:n})})}S.displayName="Menu.Separator";function P(n){const{children:t,className:r,...e}=n;return jsx(Text,{...e,slot:"label",className:z({className:r}),children:t})}P.displayName="Menu.Item.Label";function T(n){const{children:t,className:r,...e}=n;return jsx(Text,{...e,slot:"description",className:B({className:r}),children:t})}T.displayName="Menu.Item.Description";function m(n){const t=useContext(N),r=(isSlottedContextValue(t)?void 0:t?.variant)??MenuStylesDefaults.variant,{classNames:e,color:u=MenuStylesDefaults.color,children:s,...p}=n;return jsx(MenuItem,{...p,className:composeRenderProps(e?.item,a=>q({className:a,variant:r,color:u})),children:composeRenderProps(s,(a,{hasSubmenu:c})=>jsxs(Provider,{values:[[KeyboardContext,{className:W({className:e?.hotkey})}],[IconContext,{slots:{[DEFAULT_SLOT]:{className:_({className:e?.icon})},submenu:{className:G({className:e?.more})}}}]],children:[typeof a=="string"?jsx(Text,{className:e?.text,slot:"label",children:a}):a,c&&jsx(Icon,{slot:"submenu",children:jsx(f,{})})]}))})}m.displayName="Menu.Item",m.Label=P,m.Description=T;function i({ref:n,...t}){[t,n]=useContextProps(t,n??null,N);const{children:r,classNames:e,selectionMode:u="single",variant:s=MenuStylesDefaults.variant,popoverProps:p,...a}=t;return jsx(Popover,{...p,className:composeRenderProps(e?.popover,c=>X({className:c})),children:jsx(N.Provider,{value:{variant:s},children:jsx(Menu,{ref:n,className:composeRenderProps(e?.menu,c=>U({className:c,variant:s})),selectionMode:u,...a,children:r})})})}i.displayName="Menu",i.Trigger=MenuTrigger,i.Submenu=SubmenuTrigger,i.Item=m,i.Separator=S,i.Section=x;export{i as Menu,N as MenuContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/menu/index.tsx"],"names":["label","description","sectionHeader","keyboard","MenuStyles","MenuSection","props","C","children","classNames","rest","jsxs","A","k","jsx","a","h","items","H","MenuSeparator","className","E","p","useContext","MenuContext","context","I","v","MenuStylesDefaults","d","L","item","M","variant","composeRenderProps","Provider","K","w","_","icon","j","more","AriaText","hasSubmenu","U","MenuItem","MenuDescription","Menu","ref","O","placement","isNonModal","offset","F","AriaMenu","menu","AriaSubmenuTrigger"],"mappings":"mgBAkDE,MAAA,CAAA,IAAAA,CACA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,IAAAC,CACA,CAAA,CAAA,KACA,CAAA,CAAA,CAAA,WAAAC,CAAAA,CACA,CAAA,IAAA,CAAA,CAAA,CAAA,aACAC,CACF,CAAA,CAAIC,SAG8D,CAAA,CAAA,CAAI,QAEtE,CAAA,CAAA,CAASC,CAAAA,UAA8BC,EAA4B,CACjE,CAAA,CAAAC,aAAA,CAAA,IAAQ,EAAA,SAAQ,CAAA,CAAA,CAAA,CAAA,CAAAC,KAAU,CAAA,MAAA,CAAAC,CAAAA,CAAY,QAAO,CAAA,CAAA,CAAGC,UAEhD,CAAA,CACEC,CAAAA,KAAiB,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAWF,CAAAA,CAAAA,OAAYG,IAAA,CAAUC,WAAA,CAAA,CAAGH,SACnD,CAAA,CAAA,EAAAI,OACE,CAAA,GAAA,CAAA,CAAA,QAA2B,CAAA,CAAAC,GAAA,CAAAC,MAAA,CAAWP,CAAAA,SAAY,CAAA,CAAA,CAAA,CAAA,SAEjD,CAAA,CAAA,EAAA,aAEiB,CAAA,CAAA,CAAOQ,QAAQ,CAAA,CAAA,CAAAT,CAAAA,CAASO,GAAA,CAAAG,UAC9C,CAEJ,CACAb,KAAY,CAAA,CA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AA,CAAA,aAKX,CACAqC,CAAAA,CAAK,GAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CACnBA,CAAAA,CAAK,CAAA,CAAA,CAAA,WACA,CAAA,MAAUS,CACfT,CAAAA,CAAK,OACLA,CAAAA,WAAK,CAAA,CAAA,CAAA,OAAY5B,CAAAA,cACjB4B,EAAK,CAAA,IAAA,CAAA,CAAA,CAAU1C,CAAAA,CAAAA,SAAAA,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\n'use client';\n\nimport 'client-only';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport ChevronRight from '@accelint/icons/chevron-right';\nimport { createContext, useContext } from 'react';\nimport {\n Header as AriaHeader,\n Menu as AriaMenu,\n Collection as AriaMenuCollection,\n MenuItem as AriaMenuItem,\n MenuSection as AriaMenuSection,\n MenuTrigger as AriaMenuTrigger,\n Separator as AriaSeparator,\n SubmenuTrigger as AriaSubmenuTrigger,\n Text as AriaText,\n type ContextValue,\n DEFAULT_SLOT,\n KeyboardContext,\n Popover,\n Provider,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon, IconContext } from '../icon';\nimport { MenuStyles, MenuStylesDefaults } from './styles';\nimport type {\n MenuItemProps,\n MenuProps,\n MenuSectionProps,\n MenuTextProps,\n SeparatorProps,\n} from './types';\n\nconst {\n menu,\n icon,\n item,\n label,\n description,\n more,\n sectionHeader,\n separator,\n keyboard,\n} = MenuStyles();\n\nexport const MenuContext =\n createContext<ContextValue<MenuProps<unknown>, HTMLDivElement>>(null);\n\nfunction MenuSection<T extends object>(props: MenuSectionProps<T>) {\n const { header, children, classNames, items, ...rest } = props;\n\n return (\n <AriaMenuSection className={classNames?.section} {...rest}>\n <AriaHeader\n className={sectionHeader({ className: classNames?.sectionHeader })}\n >\n {header}\n </AriaHeader>\n <AriaMenuCollection items={items}>{children}</AriaMenuCollection>\n </AriaMenuSection>\n );\n}\nMenuSection.displayName = 'Menu.Section';\n\nfunction MenuSeparator({ className, ...rest }: SeparatorProps) {\n return <AriaSeparator {...rest} className={separator({ className })} />;\n}\nMenuSeparator.displayName = 'Menu.Separator';\n\nfunction MenuLabel(props: MenuTextProps) {\n const { children, className, ...rest } = props;\n\n return (\n <AriaText {...rest} slot='label' className={label({ className })}>\n {children}\n </AriaText>\n );\n}\nMenuLabel.displayName = 'Menu.Item.Label';\n\nfunction MenuDescription(props: MenuTextProps) {\n const { children, className, ...rest } = props;\n\n return (\n <AriaText\n {...rest}\n slot='description'\n className={description({ className })}\n >\n {children}\n </AriaText>\n );\n}\nMenuDescription.displayName = 'Menu.Item.Description';\n\nfunction MenuItem(props: MenuItemProps) {\n const context = useContext(MenuContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n MenuStylesDefaults.variant;\n\n const {\n classNames,\n color = MenuStylesDefaults.color,\n children,\n ...rest\n } = props;\n\n return (\n <AriaMenuItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className, variant, color }),\n )}\n >\n {composeRenderProps(children, (children, { hasSubmenu }) => (\n <Provider\n values={[\n [\n KeyboardContext,\n { className: keyboard({ className: classNames?.keyboard }) },\n ],\n [\n IconContext,\n {\n slots: {\n [DEFAULT_SLOT]: {\n className: icon({ className: classNames?.icon }),\n },\n submenu: { className: more({ className: classNames?.more }) },\n },\n },\n ],\n ]}\n >\n {typeof children === 'string' ? (\n <AriaText className={classNames?.text} slot='label'>\n {children}\n </AriaText>\n ) : (\n children\n )}\n {hasSubmenu && (\n <Icon slot='submenu'>\n <ChevronRight />\n </Icon>\n )}\n </Provider>\n ))}\n </AriaMenuItem>\n );\n}\nMenuItem.displayName = 'Menu.Item';\nMenuItem.Label = MenuLabel;\nMenuItem.Description = MenuDescription;\n\nexport function Menu<T extends object>({ ref, ...props }: MenuProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, MenuContext);\n\n const {\n children,\n className,\n selectionMode = 'single',\n offset = -4,\n placement,\n isNonModal,\n containerPadding,\n variant = MenuStylesDefaults.variant,\n ...rest\n } = props;\n\n return (\n <Popover\n offset={offset}\n placement={placement}\n isNonModal={isNonModal}\n containerPadding={containerPadding}\n >\n <MenuContext.Provider value={{ variant }}>\n <AriaMenu\n ref={ref}\n className={composeRenderProps(className, (className) =>\n menu({ className, variant }),\n )}\n selectionMode={selectionMode}\n {...rest}\n >\n {children}\n </AriaMenu>\n </MenuContext.Provider>\n </Popover>\n );\n}\nMenu.displayName = 'Menu';\nMenu.Trigger = AriaMenuTrigger;\nMenu.Submenu = AriaSubmenuTrigger;\nMenu.Item = MenuItem;\nMenu.Separator = MenuSeparator;\nMenu.Section = MenuSection;\n"]}
1
+ {"version":3,"sources":["../../../src/components/menu/index.tsx"],"names":["label","description","sectionHeader","MenuStyles","MenuContext","MenuSection","props","y","children","classNames","rest","jsxs","v","D","jsx","o","C","items","I","MenuSeparator","className","L","M","context","b","A","MenuStylesDefaults","d","h","item","l","variant","composeRenderProps","Provider","j","hotkey","E","K","icon","V","more","AriaText","hasSubmenu","F","MenuItem","MenuDescription","Menu","ref","w","popoverProps","R","AriaMenu","g","menu","AriaSubmenuTrigger"],"mappings":"mgBAkDE,MAAA,CAAA,IAAAA,CACA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,IAAAC,CACA,CAAA,CAAA,KACA,CAAA,CAAA,CAAA,WAAAC,CAAAA,CACA,CAAA,IAAA,CAAA,CAAA,CAAA,aAEA,CAAA,C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kBACA,CAAA,OAGF,CAAA,YAEK,CAAA,CAAGA,CAAAA,GACJ,CAAA,CAAA,CAAA,CAAA,CAAA,OAA8BxC,GAAY,CAAAyC,OAAA,CAAA,CAAA,GAAA,CAAU9B,CAAAA,SACxC,CAAAU,kBAAA,CAAA,CAAA,EAAAV,OAGZ,CAAA,CAAA,EAAA,CAAA,CAAA,CAAAN,SAAa,CAAA,CAAA,CAAA,CAAZ,CAAqB,CAAA,QAAS,CAAAC,GAAA,CAAA,CAAA,CAAA,QAC7B,CAAA,CAAA,KAACoC,CAAAA,CAAA,OAEC,CAAA,CAAA,CAAA,CAAA,QAA8B1C,CAAAA,GAAAA,CAAY2C,IAAA,CAAA,CAAA,GAAOhC,CAAAA,CAC/CiC,CAAAA,SAAO,CAAAvB,kBAAA,CAAAV,CAAAA,EAAW,IAAA,CAAA,CAAA,EAAQ,CAAC,CAC7B,CAAA,SACA,CAAA,CAAA,CAAA,OACC,CAAGV,CAAAA,CAEH,CAAA,CAAA,CAAA,aAKX,CACAoC,CAAAA,CAAK,GAAA,CAAA,CAAA,QAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CACnBA,CAAAA,CAAK,CAAA,CAAA,CAAA,WACA,CAAA,MAAUQ,CACfR,CAAAA,CAAK,OACLA,CAAAA,WAAK,CAAA,CAAA,CAAA,OAAY3B,CAAAA,cACjB2B,EAAK,CAAA,IAAA,CAAA,CAAA,CAAUzC,CAAAA,CAAAA,SAAAA,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\n'use client';\n\nimport 'client-only';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport ChevronRight from '@accelint/icons/chevron-right';\nimport { createContext, useContext } from 'react';\nimport {\n Header as AriaHeader,\n Menu as AriaMenu,\n Collection as AriaMenuCollection,\n MenuItem as AriaMenuItem,\n MenuSection as AriaMenuSection,\n MenuTrigger as AriaMenuTrigger,\n Separator as AriaSeparator,\n SubmenuTrigger as AriaSubmenuTrigger,\n Text as AriaText,\n type ContextValue,\n DEFAULT_SLOT,\n KeyboardContext,\n Popover,\n Provider,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon, IconContext } from '../icon';\nimport { MenuStyles, MenuStylesDefaults } from './styles';\nimport type {\n MenuItemProps,\n MenuProps,\n MenuSectionProps,\n MenuTextProps,\n SeparatorProps,\n} from './types';\n\nconst {\n menu,\n icon,\n item,\n label,\n description,\n more,\n sectionHeader,\n separator,\n hotkey,\n popover,\n} = MenuStyles();\n\nexport const MenuContext =\n createContext<ContextValue<MenuProps<unknown>, HTMLDivElement>>(null);\n\nfunction MenuSection<T extends object>(props: MenuSectionProps<T>) {\n const { header, children, classNames, items, ...rest } = props;\n\n return (\n <AriaMenuSection className={classNames?.section} {...rest}>\n <AriaHeader\n className={sectionHeader({ className: classNames?.sectionHeader })}\n >\n {header}\n </AriaHeader>\n <AriaMenuCollection items={items}>{children}</AriaMenuCollection>\n </AriaMenuSection>\n );\n}\nMenuSection.displayName = 'Menu.Section';\n\nfunction MenuSeparator({ className, ...rest }: SeparatorProps) {\n return <AriaSeparator {...rest} className={separator({ className })} />;\n}\nMenuSeparator.displayName = 'Menu.Separator';\n\nfunction MenuLabel(props: MenuTextProps) {\n const { children, className, ...rest } = props;\n\n return (\n <AriaText {...rest} slot='label' className={label({ className })}>\n {children}\n </AriaText>\n );\n}\nMenuLabel.displayName = 'Menu.Item.Label';\n\nfunction MenuDescription(props: MenuTextProps) {\n const { children, className, ...rest } = props;\n\n return (\n <AriaText\n {...rest}\n slot='description'\n className={description({ className })}\n >\n {children}\n </AriaText>\n );\n}\nMenuDescription.displayName = 'Menu.Item.Description';\n\nfunction MenuItem(props: MenuItemProps) {\n const context = useContext(MenuContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n MenuStylesDefaults.variant;\n\n const {\n classNames,\n color = MenuStylesDefaults.color,\n children,\n ...rest\n } = props;\n\n return (\n <AriaMenuItem\n {...rest}\n className={composeRenderProps(classNames?.item, (className) =>\n item({ className, variant, color }),\n )}\n >\n {composeRenderProps(children, (children, { hasSubmenu }) => (\n <Provider\n values={[\n [\n KeyboardContext,\n { className: hotkey({ className: classNames?.hotkey }) },\n ],\n [\n IconContext,\n {\n slots: {\n [DEFAULT_SLOT]: {\n className: icon({ className: classNames?.icon }),\n },\n submenu: { className: more({ className: classNames?.more }) },\n },\n },\n ],\n ]}\n >\n {typeof children === 'string' ? (\n <AriaText className={classNames?.text} slot='label'>\n {children}\n </AriaText>\n ) : (\n children\n )}\n {hasSubmenu && (\n <Icon slot='submenu'>\n <ChevronRight />\n </Icon>\n )}\n </Provider>\n ))}\n </AriaMenuItem>\n );\n}\nMenuItem.displayName = 'Menu.Item';\nMenuItem.Label = MenuLabel;\nMenuItem.Description = MenuDescription;\n\nexport function Menu<T extends object>({ ref, ...props }: MenuProps<T>) {\n [props, ref] = useContextProps(props, ref ?? null, MenuContext);\n\n const {\n children,\n classNames,\n selectionMode = 'single',\n variant = MenuStylesDefaults.variant,\n popoverProps,\n ...rest\n } = props;\n\n return (\n <Popover\n {...popoverProps}\n className={composeRenderProps(classNames?.popover, (className) =>\n popover({ className }),\n )}\n >\n <MenuContext.Provider value={{ variant }}>\n <AriaMenu\n ref={ref}\n className={composeRenderProps(classNames?.menu, (className) =>\n menu({ className, variant }),\n )}\n selectionMode={selectionMode}\n {...rest}\n >\n {children}\n </AriaMenu>\n </MenuContext.Provider>\n </Popover>\n );\n}\nMenu.displayName = 'Menu';\nMenu.Trigger = AriaMenuTrigger;\nMenu.Submenu = AriaSubmenuTrigger;\nMenu.Item = MenuItem;\nMenu.Separator = MenuSeparator;\nMenu.Section = MenuSection;\n"]}
@@ -28,11 +28,12 @@ declare const MenuStyles: tailwind_variants.TVReturnType<{
28
28
  icon: string;
29
29
  item: string[];
30
30
  label: string;
31
- description: string;
31
+ description: string[];
32
32
  more: string;
33
33
  sectionHeader: string;
34
34
  separator: string;
35
- keyboard: string;
35
+ hotkey: string[];
36
+ popover: string;
36
37
  }, undefined, {
37
38
  variant: {
38
39
  cozy: {
@@ -55,11 +56,12 @@ declare const MenuStyles: tailwind_variants.TVReturnType<{
55
56
  icon: string;
56
57
  item: string[];
57
58
  label: string;
58
- description: string;
59
+ description: string[];
59
60
  more: string;
60
61
  sectionHeader: string;
61
62
  separator: string;
62
- keyboard: string;
63
+ hotkey: string[];
64
+ popover: string;
63
65
  }, tailwind_variants.TVReturnType<{
64
66
  variant: {
65
67
  cozy: {
@@ -82,11 +84,12 @@ declare const MenuStyles: tailwind_variants.TVReturnType<{
82
84
  icon: string;
83
85
  item: string[];
84
86
  label: string;
85
- description: string;
87
+ description: string[];
86
88
  more: string;
87
89
  sectionHeader: string;
88
90
  separator: string;
89
- keyboard: string;
91
+ hotkey: string[];
92
+ popover: string;
90
93
  }, undefined, unknown, unknown, undefined>>;
91
94
  type MenuStyleVariants = VariantProps<typeof MenuStyles> & {
92
95
  prefixIcon?: ReactNode;
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';const t={variant:"cozy",color:"info"},o=tv({slots:{menu:"group/menu mt-s overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light",icon:"[grid-area:icon]",item:["group/menu-item flex items-center gap-x-s px-s text-body-s",'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:"icon_label_space_action"_"icon_description_space_action"]',"disabled:fg-disabled disabled:bg-transparent"],label:"truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full",description:"fg-default-dark group-hover/menu-item:fg-inverse-light group-focus/menu-item:fg-inverse-light group-disabled/menu-item:fg-disabled truncate text-body-xs [grid-area:description]",more:"[grid-area:action]",sectionHeader:"fg-default-dark px-s py-xs text-header-xs",separator:"mx-3 my-1 border border-static-light",keyboard:"[grid-area:action]"},variants:{variant:{cozy:{item:"pt-s pb-s"},compact:{item:"pt-xs pb-xs"}},color:{info:{item:["fg-default-light hover:fg-inverse-light focus:fg-inverse-light open:fg-inverse-light selected:fg-inverse-light","selected:bg-highlight-bold open:bg-highlight-bold hover:bg-highlight-bold focus:bg-highlight-bold"]},serious:{item:["fg-serious hover:fg-inverse-light focus:fg-inverse-light open:fg-inverse-light selected:fg-inverse-light","selected:bg-serious-bold open:bg-serious-bold hover:bg-serious-bold focus:bg-serious-bold"]}}},defaultVariants:t});export{o as MenuStyles,t as MenuStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';const t={variant:"cozy",color:"info"},o=tv({slots:{menu:"group/menu mt-s overflow-y-auto overflow-x-clip rounded-medium bg-surface-overlay shadow-elevation-overlay outline outline-static-light",icon:"[grid-area:icon]",item:["group/menu-item flex items-center gap-x-s px-s text-body-s",'grid grid-cols-[auto_auto_1fr_auto] [grid-template-areas:"icon_label_space_action"_"icon_description_space_action"]',"disabled:fg-disabled disabled:bg-transparent"],label:"truncate [grid-area:label] group-not-has-[>_[slot=description]]/menu-item:row-span-full",description:["[grid-area:description]","fg-default-dark truncate text-body-xs","group-hover/menu-item:fg-inverse-light group-focus/menu-item:fg-inverse-light","group-disabled/menu-item:fg-disabled"],more:"[grid-area:action]",sectionHeader:"fg-default-dark px-s py-xs text-header-xs",separator:"mx-3 my-1 border border-static-light",hotkey:["[grid-area:action]","group-hover/menu-item:fg-inverse-light group-focus/menu-item:fg-inverse-light","group-disabled/menu-item:fg-disabled"],popover:""},variants:{variant:{cozy:{item:"pt-s pb-s"},compact:{item:"pt-xs pb-xs"}},color:{info:{item:["fg-default-light hover:fg-inverse-light focus:fg-inverse-light open:fg-inverse-light selected:fg-inverse-light","selected:bg-highlight-bold open:bg-highlight-bold hover:bg-highlight-bold focus:bg-highlight-bold"]},serious:{item:["fg-serious hover:fg-inverse-light focus:fg-inverse-light open:fg-inverse-light selected:fg-inverse-light","selected:bg-serious-bold open:bg-serious-bold hover:bg-serious-bold focus:bg-serious-bold"]}}},defaultVariants:t});export{o as MenuStyles,t as MenuStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map