@accelint/design-toolkit 2.2.0 → 2.3.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 (150) hide show
  1. package/README.md +1 -0
  2. package/dist/components/accordion/index.d.ts +2 -2
  3. package/dist/components/accordion/index.js +1 -1
  4. package/dist/components/accordion/index.js.map +1 -1
  5. package/dist/components/accordion/styles.d.ts +3 -39
  6. package/dist/components/accordion/styles.js +1 -1
  7. package/dist/components/accordion/styles.js.map +1 -1
  8. package/dist/components/avatar/index.d.ts +4 -4
  9. package/dist/components/avatar/index.js +1 -1
  10. package/dist/components/avatar/index.js.map +1 -1
  11. package/dist/components/badge/index.d.ts +2 -2
  12. package/dist/components/box/index.d.ts +3 -3
  13. package/dist/components/button/index.d.ts +35 -23
  14. package/dist/components/button/index.js +1 -1
  15. package/dist/components/button/index.js.map +1 -1
  16. package/dist/components/button/styles.d.ts +297 -0
  17. package/dist/components/button/styles.js +2 -0
  18. package/dist/components/button/styles.js.map +1 -0
  19. package/dist/components/button/types.d.ts +14 -0
  20. package/dist/components/button/types.js +2 -0
  21. package/dist/components/button/types.js.map +1 -0
  22. package/dist/components/checkbox/index.d.ts +2 -2
  23. package/dist/components/checkbox/index.js +1 -1
  24. package/dist/components/checkbox/index.js.map +1 -1
  25. package/dist/components/chip/index.d.ts +25 -48
  26. package/dist/components/chip/index.js +1 -1
  27. package/dist/components/chip/index.js.map +1 -1
  28. package/dist/components/chip/styles.d.ts +250 -0
  29. package/dist/components/chip/styles.js +2 -0
  30. package/dist/components/chip/styles.js.map +1 -0
  31. package/dist/components/chip/types.d.ts +20 -0
  32. package/dist/components/chip/types.js +2 -0
  33. package/dist/components/chip/types.js.map +1 -0
  34. package/dist/components/classification-badge/index.d.ts +15 -16
  35. package/dist/components/classification-badge/index.js +1 -1
  36. package/dist/components/classification-badge/index.js.map +1 -1
  37. package/dist/components/classification-badge/styles.d.ts +51 -0
  38. package/dist/components/classification-badge/styles.js +2 -0
  39. package/dist/components/classification-badge/styles.js.map +1 -0
  40. package/dist/components/classification-badge/types.d.ts +9 -0
  41. package/dist/components/classification-badge/types.js +2 -0
  42. package/dist/components/classification-badge/types.js.map +1 -0
  43. package/dist/components/classification-banner/index.d.ts +15 -16
  44. package/dist/components/classification-banner/index.js +1 -2
  45. package/dist/components/classification-banner/index.js.map +1 -1
  46. package/dist/components/classification-banner/styles.d.ts +38 -0
  47. package/dist/components/classification-banner/styles.js +2 -0
  48. package/dist/components/classification-banner/styles.js.map +1 -0
  49. package/dist/components/classification-banner/types.d.ts +9 -0
  50. package/dist/components/classification-banner/types.js +2 -0
  51. package/dist/components/classification-banner/types.js.map +1 -0
  52. package/dist/components/color-picker/index.js +1 -1
  53. package/dist/components/color-picker/index.js.map +1 -1
  54. package/dist/components/combobox/index.js +1 -1
  55. package/dist/components/combobox/index.js.map +1 -1
  56. package/dist/components/date-field/index.js +1 -1
  57. package/dist/components/date-field/index.js.map +1 -1
  58. package/dist/components/dialog/index.d.ts +5 -5
  59. package/dist/components/dialog/index.js +1 -1
  60. package/dist/components/dialog/index.js.map +1 -1
  61. package/dist/components/icon/index.d.ts +2 -2
  62. package/dist/components/icon/index.js +1 -1
  63. package/dist/components/icon/index.js.map +1 -1
  64. package/dist/components/icon/types.d.ts +3 -5
  65. package/dist/components/label/index.d.ts +10 -7
  66. package/dist/components/label/index.js +1 -1
  67. package/dist/components/label/index.js.map +1 -1
  68. package/dist/components/label/styles.d.ts +5 -0
  69. package/dist/components/label/styles.js +2 -0
  70. package/dist/components/label/styles.js.map +1 -0
  71. package/dist/components/label/types.d.ts +10 -0
  72. package/dist/components/label/types.js +2 -0
  73. package/dist/components/label/types.js.map +1 -0
  74. package/dist/components/options/index.d.ts +2 -2
  75. package/dist/components/options/index.js +1 -1
  76. package/dist/components/options/index.js.map +1 -1
  77. package/dist/components/options-item/index.js +1 -1
  78. package/dist/components/options-item/index.js.map +1 -1
  79. package/dist/components/popover/index.js +1 -1
  80. package/dist/components/popover/index.js.map +1 -1
  81. package/dist/components/popover/styles.d.ts +3 -3
  82. package/dist/components/query-builder/index.js +1 -1
  83. package/dist/components/query-builder/index.js.map +1 -1
  84. package/dist/components/query-builder/value-editor.js +1 -1
  85. package/dist/components/query-builder/value-editor.js.map +1 -1
  86. package/dist/components/radio/index.d.ts +11 -9
  87. package/dist/components/radio/index.js +1 -1
  88. package/dist/components/radio/index.js.map +1 -1
  89. package/dist/components/radio/styles.d.ts +53 -0
  90. package/dist/components/radio/styles.js +2 -0
  91. package/dist/components/radio/styles.js.map +1 -0
  92. package/dist/components/radio/types.d.ts +21 -0
  93. package/dist/components/radio/types.js +2 -0
  94. package/dist/components/radio/types.js.map +1 -0
  95. package/dist/components/search-field/index.js +1 -1
  96. package/dist/components/search-field/index.js.map +1 -1
  97. package/dist/components/slider/index.js +1 -1
  98. package/dist/components/slider/index.js.map +1 -1
  99. package/dist/components/switch/index.d.ts +10 -7
  100. package/dist/components/switch/index.js +1 -1
  101. package/dist/components/switch/index.js.map +1 -1
  102. package/dist/components/switch/styles.d.ts +41 -0
  103. package/dist/components/switch/styles.js +2 -0
  104. package/dist/components/switch/styles.js.map +1 -0
  105. package/dist/components/switch/types.d.ts +13 -0
  106. package/dist/components/switch/types.js +2 -0
  107. package/dist/components/switch/types.js.map +1 -0
  108. package/dist/components/tabs/index.js +1 -1
  109. package/dist/components/tabs/index.js.map +1 -1
  110. package/dist/components/text-area-field/index.d.ts +19 -0
  111. package/dist/components/text-area-field/index.js +2 -0
  112. package/dist/components/text-area-field/index.js.map +1 -0
  113. package/dist/components/text-area-field/styles.d.ts +113 -0
  114. package/dist/components/text-area-field/styles.js +2 -0
  115. package/dist/components/text-area-field/styles.js.map +1 -0
  116. package/dist/components/text-area-field/types.d.ts +23 -0
  117. package/dist/components/text-area-field/types.js +2 -0
  118. package/dist/components/text-area-field/types.js.map +1 -0
  119. package/dist/components/text-field/index.js +1 -1
  120. package/dist/components/text-field/index.js.map +1 -1
  121. package/dist/components/tooltip/index.d.ts +2 -2
  122. package/dist/components/tooltip/index.js +1 -1
  123. package/dist/components/tooltip/index.js.map +1 -1
  124. package/dist/index.css +122 -252
  125. package/dist/index.d.ts +25 -11
  126. package/dist/index.js +1 -1
  127. package/dist/lib/react.js.map +1 -1
  128. package/dist/lib/utils.js +1 -1
  129. package/dist/lib/utils.js.map +1 -1
  130. package/dist/metafile-esm.json +1 -1
  131. package/dist/styles.css +873 -754
  132. package/dist/tokens/generated/themes.css +147 -0
  133. package/dist/tokens/generated/themes.d.ts +2 -0
  134. package/dist/tokens/generated/tokens.css +119 -0
  135. package/dist/tokens/generated/tokens.d.ts +108 -0
  136. package/dist/tokens/generated/tokens.js +2 -0
  137. package/dist/tokens/generated/tokens.js.map +1 -0
  138. package/package.json +5 -5
  139. package/dist/components/floating-button/index.d.ts +0 -18
  140. package/dist/components/floating-button/index.js +0 -2
  141. package/dist/components/floating-button/index.js.map +0 -1
  142. package/dist/components/icon-button/index.d.ts +0 -20
  143. package/dist/components/icon-button/index.js +0 -2
  144. package/dist/components/icon-button/index.js.map +0 -1
  145. package/dist/components/text-area/index.d.ts +0 -30
  146. package/dist/components/text-area/index.js +0 -2
  147. package/dist/components/text-area/index.js.map +0 -1
  148. package/dist/components/toggle-icon-button/index.d.ts +0 -20
  149. package/dist/components/toggle-icon-button/index.js +0 -2
  150. package/dist/components/toggle-icon-button/index.js.map +0 -1
package/README.md CHANGED
@@ -67,4 +67,5 @@ Also add the following to your `settings.json` file for VSCode:
67
67
 
68
68
  Be sure to view topic specific documentation to understand technology choices, best practices, established patterns, and enforced opinions.
69
69
 
70
+ - [React](./src/documentation/react.md)
70
71
  - [Tailwind](./src/documentation/tailwind.md)
@@ -1,12 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
2
+ import * as react from 'react';
3
3
  import { ContextValue } from 'react-aria-components';
4
4
  import { AccordionProps, AccordionGroupProps, AccordionHeaderProps, AccordionTriggerProps, AccordionPanelProps } from './types.js';
5
5
  import '../../lib/types.js';
6
6
  import './styles.js';
7
7
  import 'tailwind-variants';
8
8
 
9
- declare const AccordionContext: React.Context<ContextValue<AccordionProps, HTMLDivElement>>;
9
+ declare const AccordionContext: react.Context<ContextValue<AccordionProps, HTMLDivElement>>;
10
10
  declare function AccordionGroup({ ref, children, className, variant, isDisabled, ...rest }: AccordionGroupProps): react_jsx_runtime.JSX.Element;
11
11
  declare namespace AccordionGroup {
12
12
  var displayName: string;
@@ -1,2 +1,2 @@
1
- import {useContextProps,Disclosure,composeRenderProps,DisclosureGroup,DisclosureStateContext,Heading,Button,DisclosurePanel}from'react-aria-components';import {isSlottedContextValue}from'./../../lib/utils.js';import {ChevronDown}from'@accelint/icons';import {createContext,useContext}from'react';import {Icon}from'../icon/index.js';import {AccordionStyles,AccordionStylesDefaults}from'./styles.js';import {jsx,jsxs}from'react/jsx-runtime';var {group:I,accordion:V,header:B,heading:k,trigger:w,panel:z}=AccordionStyles(),l=createContext(null);function f({ref:r,children:e,className:n,variant:o=AccordionStylesDefaults.variant,isDisabled:i,...c}){return jsx(l.Provider,{value:{variant:o,isDisabled:i},children:jsx(DisclosureGroup,{...c,ref:r,className:composeRenderProps(n,a=>I({className:a,variant:o,isDisabled:i})),children:e})})}f.displayName="Accordion.Group";function v({ref:r,children:e,className:n}){let o=useContext(l),i=useContext(DisclosureStateContext),c=(isSlottedContextValue(o)?void 0:o?.variant)??AccordionStylesDefaults.variant,a=(isSlottedContextValue(o)?void 0:o?.isDisabled)??AccordionStylesDefaults.isDisabled,d=i?.isExpanded??AccordionStylesDefaults.isExpanded;return jsx(Icon.Provider,{size:c==="compact"?"small":"large",children:jsx("div",{ref:r,className:B({className:n,variant:c,isDisabled:a,isExpanded:d}),children:e})})}v.displayName="Accordion.Header";function x({ref:r,children:e,classNames:n}){let o=useContext(l),i=useContext(DisclosureStateContext),c=(isSlottedContextValue(o)?void 0:o?.variant)??AccordionStylesDefaults.variant,a=(isSlottedContextValue(o)?void 0:o?.isDisabled)??AccordionStylesDefaults.isDisabled,d=i?.isExpanded??AccordionStylesDefaults.isExpanded;return jsx(Heading,{ref:r,className:k({className:n?.heading,variant:c,isDisabled:a,isExpanded:d}),children:jsxs(Button,{slot:"trigger",className:composeRenderProps(n?.trigger,N=>w({className:N,variant:c,isExpanded:d})),children:[jsx(Icon,{children:jsx(ChevronDown,{className:"transform group-dtk-expanded:rotate-180"})}),e]})})}x.displayName="Accordion.Trigger";function D({ref:r,children:e,className:n,...o}){return jsx(DisclosurePanel,{...o,ref:r,className:composeRenderProps(n,i=>z({className:i})),children:e})}D.displayName="Accordion.Panel";function p({ref:r,...e}){[e,r]=useContextProps(e,r??null,l);let{children:n,className:o,variant:i=AccordionStylesDefaults.variant,isDisabled:c,...a}=e;return jsx(l.Provider,{value:{variant:i,isDisabled:c},children:jsx(Disclosure,{...a,className:composeRenderProps(o,d=>V({className:d})),isDisabled:c,children:n})})}p.displayName="Accordion";p.Group=f;p.Header=v;p.Trigger=x;p.Panel=D;export{p as Accordion,l as AccordionContext};//# sourceMappingURL=index.js.map
1
+ import'client-only';import {useContextProps,Disclosure,composeRenderProps,DisclosureGroup,Heading,Button,DisclosurePanel}from'react-aria-components';import {isSlottedContextValue}from'./../../lib/utils.js';import {ChevronDown}from'@accelint/icons';import {createContext,useContext}from'react';import {Icon}from'../icon/index.js';import {AccordionStyles,AccordionStylesDefaults}from'./styles.js';import {jsx,jsxs}from'react/jsx-runtime';var {group:S,accordion:V,header:b,heading:B,trigger:w,panel:z}=AccordionStyles(),a=createContext(null);function P({ref:n,children:r,className:c,variant:o=AccordionStylesDefaults.variant,isDisabled:e,...t}){return jsx(a.Provider,{value:{variant:o,isDisabled:e},children:jsx(DisclosureGroup,{...t,ref:n,className:composeRenderProps(c,p=>S({className:p,variant:o})),children:r})})}P.displayName="Accordion.Group";function g({ref:n,children:r,className:c}){let o=useContext(a),e=(isSlottedContextValue(o)?void 0:o?.variant)??AccordionStylesDefaults.variant;return jsx(Icon.Provider,{size:e==="compact"?"small":"large",children:jsx("div",{ref:n,className:b({className:c,variant:e}),children:r})})}g.displayName="Accordion.Header";function v({ref:n,children:r,classNames:c}){let o=useContext(a),e=(isSlottedContextValue(o)?void 0:o?.variant)??AccordionStylesDefaults.variant;return jsx(Heading,{ref:n,className:B({className:c?.heading,variant:e}),children:jsxs(Button,{slot:"trigger",className:composeRenderProps(c?.trigger,t=>w({className:t,variant:e})),children:[jsx(Icon,{children:jsx(ChevronDown,{className:"transform group-expanded:rotate-180"})}),r]})})}v.displayName="Accordion.Trigger";function f({ref:n,children:r,className:c,...o}){return jsx(DisclosurePanel,{...o,ref:n,className:composeRenderProps(c,e=>z({className:e})),children:r})}f.displayName="Accordion.Panel";function s({ref:n,...r}){[r,n]=useContextProps(r,n??null,a);let{children:c,className:o,variant:e=AccordionStylesDefaults.variant,isDisabled:t,...p}=r;return jsx(a.Provider,{value:{variant:e,isDisabled:t},children:jsx(Disclosure,{...p,className:composeRenderProps(o,x=>V({className:x})),isDisabled:t,children:c})})}s.displayName="Accordion";s.Group=P;s.Header=g;s.Trigger=v;s.Panel=f;export{s as Accordion,a as AccordionContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/accordion/index.tsx"],"names":["group","header","heading","trigger","panel","AccordionStyles","AccordionContext","createContext","h","AccordionGroup","children","variant","jsx","s","rest","H","ref","A","AccordionHeader","context","useContext","DisclosureStateContext","isSlottedContextValue","P","u","t","isDisabled","Icon","AccordionTrigger","Heading","E","jsxs","C","className","g","T","AccordionPanel","DisclosurePanel","b","Accordion","props","useContextProps","G","y","accordion"],"mappings":"ubAuCQA,IAAO,CAAA,KAAA,CAAA,CAAA,CAAA,UAAWC,CAAAA,CAAQ,MAAA,CAAA,CAAAC,QAAS,CAAA,CAAAC,CAAAA,OAASC,CAAM,CAAA,CAAIC,KAEjDC,CACXC,CAAAA,CAA4D,kBAAI,CAAA,CAElE,CAAAC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*\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 {\n Button,\n type ContextValue,\n Disclosure,\n DisclosureGroup,\n DisclosurePanel,\n DisclosureStateContext,\n Heading,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\n\nimport { isSlottedContextValue } from '@/lib/utils';\nimport { ChevronDown } from '@accelint/icons';\nimport { createContext, useContext } from 'react';\nimport { Icon } from '../icon';\nimport { AccordionStyles, AccordionStylesDefaults } from './styles';\nimport type {\n AccordionGroupProps,\n AccordionHeaderProps,\n AccordionPanelProps,\n AccordionProps,\n AccordionTriggerProps,\n} from './types';\n\nconst { group, accordion, header, heading, trigger, panel } = AccordionStyles();\n\nexport const AccordionContext =\n createContext<ContextValue<AccordionProps, HTMLDivElement>>(null);\n\nfunction AccordionGroup({\n ref,\n children,\n className,\n variant = AccordionStylesDefaults.variant,\n isDisabled,\n ...rest\n}: AccordionGroupProps) {\n return (\n <AccordionContext.Provider value={{ variant, isDisabled }}>\n <DisclosureGroup\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n group({\n className,\n variant,\n isDisabled,\n }),\n )}\n >\n {children}\n </DisclosureGroup>\n </AccordionContext.Provider>\n );\n}\nAccordionGroup.displayName = 'Accordion.Group';\n\nfunction AccordionHeader({ ref, children, className }: AccordionHeaderProps) {\n const context = useContext(AccordionContext);\n const state = useContext(DisclosureStateContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n AccordionStylesDefaults.variant;\n const isDisabled =\n (isSlottedContextValue(context) ? undefined : context?.isDisabled) ??\n AccordionStylesDefaults.isDisabled;\n const isExpanded = state?.isExpanded ?? AccordionStylesDefaults.isExpanded;\n\n return (\n <Icon.Provider size={variant === 'compact' ? 'small' : 'large'}>\n <div\n ref={ref}\n className={header({\n className,\n variant,\n isDisabled,\n isExpanded,\n })}\n >\n {children}\n </div>\n </Icon.Provider>\n );\n}\nAccordionHeader.displayName = 'Accordion.Header';\n\nfunction AccordionTrigger({\n ref,\n children,\n classNames,\n}: AccordionTriggerProps) {\n const context = useContext(AccordionContext);\n const state = useContext(DisclosureStateContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n AccordionStylesDefaults.variant;\n const isDisabled =\n (isSlottedContextValue(context) ? undefined : context?.isDisabled) ??\n AccordionStylesDefaults.isDisabled;\n const isExpanded = state?.isExpanded ?? AccordionStylesDefaults.isExpanded;\n\n return (\n <Heading\n ref={ref}\n className={heading({\n className: classNames?.heading,\n variant,\n isDisabled,\n isExpanded,\n })}\n >\n <Button\n slot='trigger'\n className={composeRenderProps(classNames?.trigger, (className) =>\n trigger({\n className,\n variant,\n isExpanded,\n }),\n )}\n >\n <Icon>\n <ChevronDown className='transform group-dtk-expanded:rotate-180' />\n </Icon>\n {children}\n </Button>\n </Heading>\n );\n}\nAccordionTrigger.displayName = 'Accordion.Trigger';\n\nfunction AccordionPanel({\n ref,\n children,\n className,\n ...rest\n}: AccordionPanelProps) {\n return (\n <DisclosurePanel\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n panel({ className }),\n )}\n >\n {children}\n </DisclosurePanel>\n );\n}\nAccordionPanel.displayName = 'Accordion.Panel';\n\nexport function Accordion({ ref, ...props }: AccordionProps) {\n [props, ref] = useContextProps(props, ref ?? null, AccordionContext);\n\n const {\n children,\n className,\n variant = AccordionStylesDefaults.variant,\n isDisabled,\n ...rest\n } = props;\n\n return (\n <AccordionContext.Provider\n value={{\n variant,\n isDisabled,\n }}\n >\n <Disclosure\n {...rest}\n className={composeRenderProps(className, (className) =>\n accordion({\n className,\n }),\n )}\n isDisabled={isDisabled}\n >\n {children}\n </Disclosure>\n </AccordionContext.Provider>\n );\n}\nAccordion.displayName = 'Accordion';\nAccordion.Group = AccordionGroup;\nAccordion.Header = AccordionHeader;\nAccordion.Trigger = AccordionTrigger;\nAccordion.Panel = AccordionPanel;\n"]}
1
+ {"version":3,"sources":["../../../src/components/accordion/index.tsx"],"names":["header","heading","trigger","panel","AccordionStyles","AccordionContext","createContext","I","AccordionGroup","children","variant","jsx","i","rest","ref","d","AccordionHeader","context","useContext","isSlottedContextValue","l","Icon","A","AccordionTrigger","u","Heading","H","jsxs","N","T","AccordionPanel","DisclosurePanel","C","Accordion","props","useContextProps","G","D","accordion"],"mappings":"wbAsCe,CAAA,KAAA,CAAA,CAAA,CAAA,UAAWA,CAAAA,CAAQ,MAAA,CAAA,CAAAC,QAAS,CAAA,CAAAC,CAAAA,OAASC,CAAM,CAAA,CAAIC,KAEjDC,CACXC,EAA4D,CAAAC,eAAA,EAAI,CAAA,CAElE,qBAASC,SAEP,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAAC,QACA,CAAA,CAAA,CAAA,WACAC,CAAAA,iCACA,CAAA,OAAA,CAAA,UAEsB,CACtB,CAAA,CAAA,GAAA,CAAA,CACEC,CAAAA,CAACN,OAAiBO,GAAA,CAAA,CAAA,CAAjB,QAAmC,CAAA,CAAA,KAAA,CAAAF,CAAAA,wBAClCC,QACME,CAAAA,GACJ,kBAAKC,GACL,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,UACQC,kBACJ,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,SACA,CAAA,CAAAL,CACF,aAGDD,QAKM,oBAAc,CAAA,iBAE7B,CAASO,SAAuB,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAAP,oBACxBQ,CAAAA,CAAUC,CAAAA,CAAWb,CAAgB,IACrCK,CACHS,WAAsBF,CAAO,CAAA,CAAI,2BAAYA,CAAAA,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,CAAA,CAAKlB,GACL,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,SACEX,CAAMY,kBAAE,kBAGT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAN,QAIQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,kBAEbwB,SAAiB,CAAA,CAAA,CAAGC,GAAyB,CAC3D,CAACA,CAAAA,IAAcC,CAAAA,CAAgBD,CAAAA,CAAOpB,GAAO,CAAA,CAAAsB,eAAA,CAAA,CAAM/B,CAAgB,GAEnE,YACEI,QACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAAC,CAAAA,OAAkC,CAAA,CAAA,CAAAU,uBAClC,CAAA,OAAA,CAAA,UAEEc,CAAAA,CAEJ,CAAA,GAAA,CAAA,CAAA,CACEvB,CAAAA,CAACN,OAAiBO,GAAA,CAAA,CAAA,CAAjB,QAEG,CAAA,CAAA,KAAA,CAAAF,QACA,CAAA,CAAA,CAAA,UAGF,CAAA,CAAA,CAAA,CAAAC,QACME,IACJ,CAAAwB,UAAA,CAAA,CAAA,GAAA,CAAA,CAAA,SACEC,CAAUvB,kBACR,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,yBAKH,CAAA,CAAA,CAAAN,QAKC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,uBACQD,EAClByB,CAAAA,KAAU,CAAA,CAAA,CAASjB,EACnBiB,MAAU,CAAA,CAAA,CAAA,CAAUV,CAAAA,OACV,CAAA,CAAQO,CAAAA,CAAAA,CAAAA,KAAAA,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';\nimport 'client-only';\nimport {\n Button,\n type ContextValue,\n Disclosure,\n DisclosureGroup,\n DisclosurePanel,\n Heading,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\n\nimport { isSlottedContextValue } from '@/lib/utils';\nimport { ChevronDown } from '@accelint/icons';\nimport { createContext, useContext } from 'react';\nimport { Icon } from '../icon';\nimport { AccordionStyles, AccordionStylesDefaults } from './styles';\nimport type {\n AccordionGroupProps,\n AccordionHeaderProps,\n AccordionPanelProps,\n AccordionProps,\n AccordionTriggerProps,\n} from './types';\n\nconst { group, accordion, header, heading, trigger, panel } = AccordionStyles();\n\nexport const AccordionContext =\n createContext<ContextValue<AccordionProps, HTMLDivElement>>(null);\n\nfunction AccordionGroup({\n ref,\n children,\n className,\n variant = AccordionStylesDefaults.variant,\n isDisabled,\n ...rest\n}: AccordionGroupProps) {\n return (\n <AccordionContext.Provider value={{ variant, isDisabled }}>\n <DisclosureGroup\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n group({\n className,\n variant,\n }),\n )}\n >\n {children}\n </DisclosureGroup>\n </AccordionContext.Provider>\n );\n}\nAccordionGroup.displayName = 'Accordion.Group';\n\nfunction AccordionHeader({ ref, children, className }: AccordionHeaderProps) {\n const context = useContext(AccordionContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n AccordionStylesDefaults.variant;\n\n return (\n <Icon.Provider size={variant === 'compact' ? 'small' : 'large'}>\n <div\n ref={ref}\n className={header({\n className,\n variant,\n })}\n >\n {children}\n </div>\n </Icon.Provider>\n );\n}\nAccordionHeader.displayName = 'Accordion.Header';\n\nfunction AccordionTrigger({\n ref,\n children,\n classNames,\n}: AccordionTriggerProps) {\n const context = useContext(AccordionContext);\n const variant =\n (isSlottedContextValue(context) ? undefined : context?.variant) ??\n AccordionStylesDefaults.variant;\n\n return (\n <Heading\n ref={ref}\n className={heading({\n className: classNames?.heading,\n variant,\n })}\n >\n <Button\n slot='trigger'\n className={composeRenderProps(classNames?.trigger, (className) =>\n trigger({\n className,\n variant,\n }),\n )}\n >\n <Icon>\n <ChevronDown className='transform group-expanded:rotate-180' />\n </Icon>\n {children}\n </Button>\n </Heading>\n );\n}\nAccordionTrigger.displayName = 'Accordion.Trigger';\n\nfunction AccordionPanel({\n ref,\n children,\n className,\n ...rest\n}: AccordionPanelProps) {\n return (\n <DisclosurePanel\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n panel({ className }),\n )}\n >\n {children}\n </DisclosurePanel>\n );\n}\nAccordionPanel.displayName = 'Accordion.Panel';\n\nexport function Accordion({ ref, ...props }: AccordionProps) {\n [props, ref] = useContextProps(props, ref ?? null, AccordionContext);\n\n const {\n children,\n className,\n variant = AccordionStylesDefaults.variant,\n isDisabled,\n ...rest\n } = props;\n\n return (\n <AccordionContext.Provider\n value={{\n variant,\n isDisabled,\n }}\n >\n <Disclosure\n {...rest}\n className={composeRenderProps(className, (className) =>\n accordion({\n className,\n }),\n )}\n isDisabled={isDisabled}\n >\n {children}\n </Disclosure>\n </AccordionContext.Provider>\n );\n}\nAccordion.displayName = 'Accordion';\nAccordion.Group = AccordionGroup;\nAccordion.Header = AccordionHeader;\nAccordion.Trigger = AccordionTrigger;\nAccordion.Panel = AccordionPanel;\n"]}
@@ -15,22 +15,10 @@ declare const AccordionStyles: tailwind_variants.TVReturnType<{
15
15
  trigger: string;
16
16
  };
17
17
  };
18
- isDisabled: {
19
- false: {
20
- header: string;
21
- };
22
- true: {
23
- header: string;
24
- };
25
- };
26
- isExpanded: {
27
- false: {};
28
- true: {};
29
- };
30
18
  }, {
31
19
  group: string;
32
20
  accordion: string;
33
- header: string;
21
+ header: string[];
34
22
  heading: string;
35
23
  trigger: string[];
36
24
  panel: string;
@@ -43,22 +31,10 @@ declare const AccordionStyles: tailwind_variants.TVReturnType<{
43
31
  trigger: string;
44
32
  };
45
33
  };
46
- isDisabled: {
47
- false: {
48
- header: string;
49
- };
50
- true: {
51
- header: string;
52
- };
53
- };
54
- isExpanded: {
55
- false: {};
56
- true: {};
57
- };
58
34
  }, {
59
35
  group: string;
60
36
  accordion: string;
61
- header: string;
37
+ header: string[];
62
38
  heading: string;
63
39
  trigger: string[];
64
40
  panel: string;
@@ -71,22 +47,10 @@ declare const AccordionStyles: tailwind_variants.TVReturnType<{
71
47
  trigger: string;
72
48
  };
73
49
  };
74
- isDisabled: {
75
- false: {
76
- header: string;
77
- };
78
- true: {
79
- header: string;
80
- };
81
- };
82
- isExpanded: {
83
- false: {};
84
- true: {};
85
- };
86
50
  }, {
87
51
  group: string;
88
52
  accordion: string;
89
- header: string;
53
+ header: string[];
90
54
  heading: string;
91
55
  trigger: string[];
92
56
  panel: string;
@@ -1,2 +1,2 @@
1
- import {tv}from'./../../lib/utils.js';var r={variant:"cozy",isDisabled:false,isExpanded:false},a=tv({slots:{group:"flex w-full flex-col",accordion:"group flex w-full flex-col bg-transparent",header:"fg-default-light flex w-full items-center gap-s rounded-medium p-s outline-none",heading:"grow",trigger:["flex w-full cursor-pointer dtk-disabled:cursor-default items-center rounded-medium outline-none"],panel:"p-s"},variants:{variant:{cozy:{trigger:"gap-s text-header-m"},compact:{trigger:"gap-xs text-header-s"}},isDisabled:{false:{header:"focus-within:bg-interactive-hover-dark hover:bg-interactive-hover-dark"},true:{header:"fg-disabled cursor-default focus-within:bg-transparent hover:bg-transparent"}},isExpanded:{false:{},true:{}}},defaultVariants:r});export{a as AccordionStyles,r as AccordionStylesDefaults};//# sourceMappingURL=styles.js.map
1
+ import {tv}from'./../../lib/utils.js';var r={variant:"cozy",isDisabled:false,isExpanded:false},o=tv({slots:{group:"flex w-full flex-col",accordion:"group flex w-full flex-col bg-transparent",header:["fg-default-light flex w-full items-center gap-s rounded-medium p-s outline-none","group-enabled:hover:bg-interactive-hover-dark group-enabled:focus-within:bg-interactive-hover-dark","group-disabled:fg-disabled cursor-not-allowed"],heading:"grow",trigger:["flex w-full cursor-pointer items-center rounded-medium outline-none disabled:cursor-not-allowed"],panel:"p-s"},variants:{variant:{cozy:{trigger:"gap-s text-header-m"},compact:{trigger:"gap-xs text-header-s"}}},defaultVariants:r});export{o as AccordionStyles,r as AccordionStylesDefaults};//# sourceMappingURL=styles.js.map
2
2
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/accordion/styles.ts"],"names":["tv","e"],"mappings":"sCAgBE,IAAA,CAAA,CAAA,CAAA,OAAS,CACT,MAAA,CAAA,UACA,CAAA,KAAA,CAAA,UAG6BA,MAC7B,CAAA,CAAA,CAAA,CAAAC,EAAA,CAAO,CACL,KAAA,CAAO,CAAA,KAAA,CAAA,sBACP,CAAA,SAAW,CAAA,2CACX,CACE,wFACF,CAAA,OAAS,CACT,MAAA,CAAA,0GAGA,CAAO,CAAA,KACT,CACA,eACE,CAAA,CAAA,OACQ,CACJ,CAAA,IAAA,CAAA,CAAA,OAAS,CAAA,8BAGT,CAAA,CAAA,OAAS,CAAA,sBAGb,CAAA,CAAA,CAAA,UACE,CAAO,CACL,OACE,MAAA,CAAA,wEAEE,CACJ,OACE,MAAA,CAAA,6EAGN,CAAA,CAAA,CAAA,UACE,CAAO,CAAC,KACR,CAAA,EAAO,CACT,IAEF,CAAA,EAAA,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';\nimport type { VariantProps } from 'tailwind-variants';\n\nexport const AccordionStylesDefaults = {\n variant: 'cozy',\n isDisabled: false,\n isExpanded: false,\n} as const;\n\nexport const AccordionStyles = tv({\n slots: {\n group: 'flex w-full flex-col',\n accordion: 'group flex w-full flex-col bg-transparent',\n header:\n 'fg-default-light flex w-full items-center gap-s rounded-medium p-s outline-none',\n heading: 'grow',\n trigger: [\n 'flex w-full cursor-pointer dtk-disabled:cursor-default items-center rounded-medium outline-none',\n ],\n panel: 'p-s',\n },\n variants: {\n variant: {\n cozy: {\n trigger: 'gap-s text-header-m',\n },\n compact: {\n trigger: 'gap-xs text-header-s',\n },\n },\n isDisabled: {\n false: {\n header:\n 'focus-within:bg-interactive-hover-dark hover:bg-interactive-hover-dark',\n },\n true: {\n header:\n 'fg-disabled cursor-default focus-within:bg-transparent hover:bg-transparent',\n },\n },\n isExpanded: {\n false: {},\n true: {},\n },\n },\n defaultVariants: AccordionStylesDefaults,\n});\n\nexport type AccordionStyleVariants = VariantProps<typeof AccordionStyles>;\n"]}
1
+ {"version":3,"sources":["../../../src/components/accordion/styles.ts"],"names":["tv","e"],"mappings":"sCAgBE,IAAA,CAAA,CAAA,CAAA,OAAS,CACT,MAAA,CAAA,UACA,CAAA,KAAA,CAAA,UAG6BA,CAAAA,KAC7B,CAAA,CAAA,CAAA,CAAAC,EAAA,CAAO,CACL,KAAA,CAAO,CAAA,KAAA,CAAA,sBACP,CAAA,SAAW,CAAA,2CACX,CAAQ,MACN,CAAA,CAAA,iFACA,CAAA,oGACA,CAAA,+CAEF,CAAA,CAAA,OAAS,CACT,MAAA,CAAA,OACE,CAAA,CAAA,iGAEF,CAAO,CAAA,KACT,CACA,KAAA,CAAA,CAAA,QACE,CAAA,CAAA,OACQ,CACJ,CAAA,IAAA,CAAA,CAAA,OAAS,CAAA,qBAEX,CAAA,CAAA,OACE,CAAA,CAAA,OAAS,CAAA,sBAIf,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';\nimport type { VariantProps } from 'tailwind-variants';\n\nexport const AccordionStylesDefaults = {\n variant: 'cozy',\n isDisabled: false,\n isExpanded: false,\n} as const;\n\nexport const AccordionStyles = tv({\n slots: {\n group: 'flex w-full flex-col',\n accordion: 'group flex w-full flex-col bg-transparent',\n header: [\n 'fg-default-light flex w-full items-center gap-s rounded-medium p-s outline-none',\n 'group-enabled:hover:bg-interactive-hover-dark group-enabled:focus-within:bg-interactive-hover-dark',\n 'group-disabled:fg-disabled cursor-not-allowed',\n ],\n heading: 'grow',\n trigger: [\n 'flex w-full cursor-pointer items-center rounded-medium outline-none disabled:cursor-not-allowed',\n ],\n panel: 'p-s',\n },\n variants: {\n variant: {\n cozy: {\n trigger: 'gap-s text-header-m',\n },\n compact: {\n trigger: 'gap-xs text-header-s',\n },\n },\n },\n defaultVariants: AccordionStylesDefaults,\n});\n\nexport type AccordionStyleVariants = VariantProps<typeof AccordionStyles>;\n"]}
@@ -2,22 +2,22 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as cva_types from 'cva/types';
3
3
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
4
  import { VariantProps } from 'cva';
5
- import React__default from 'react';
5
+ import react__default from 'react';
6
6
 
7
7
  declare const avatarStyles: (props?: ({
8
8
  size?: "small" | "medium" | null | undefined;
9
9
  } & cva_types.ClassProp) | undefined) => string;
10
- interface AvatarProps extends React__default.ComponentProps<typeof AvatarPrimitive.Image>, VariantProps<typeof avatarStyles> {
10
+ interface AvatarProps extends react__default.ComponentProps<typeof AvatarPrimitive.Image>, VariantProps<typeof avatarStyles> {
11
11
  /**
12
12
  * The fallback that the avatar will render if it cannot load the provided source.
13
13
  *
14
14
  * Accepts any React component.
15
15
  */
16
- fallback?: React__default.ReactNode;
16
+ fallback?: react__default.ReactNode;
17
17
  /** How long the system should wait before it shows the fallback component. By default there is no delay. */
18
18
  fallbackDelay?: number;
19
19
  /** The source of an avatar can either be a URL representing an image or a React component (such as an SVG or an icon from a library). */
20
- source?: string | React__default.ReactNode;
20
+ source?: string | react__default.ReactNode;
21
21
  }
22
22
  declare const Avatar: {
23
23
  ({ className, children, fallback, fallbackDelay, source, size, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
@@ -1,2 +1,2 @@
1
- import {cn}from'./../../lib/utils.js';import {Person}from'@accelint/icons';import*as t from'@radix-ui/react-avatar';import'client-only';import {cva}from'cva';import {jsxs,jsx}from'react/jsx-runtime';var l=cva("fg-default-dark flex items-center justify-center overflow-hidden rounded-full bg-surface-overlay",{variants:{size:{medium:"size-[32px] **:[svg]:size-xl",small:"size-xl **:[svg]:size-l"}},defaultVariants:{size:"medium"}}),g=cn(["relative inline-block","[--badge-empty-inset:0_0_auto_auto] [--badge-inset:calc(var(--spacing-xxs)*-1)_calc(var(--spacing-xxs)*-1)_auto_auto] [--badge-position:absolute]"]),v=({className:e,children:i,fallback:s,fallbackDelay:m=0,source:a,size:p="medium",...c})=>jsxs("div",{className:g,children:[jsxs(t.Root,{className:cn("pointer-events-none inline-block",l({size:p,className:e})),role:"img",children:[typeof a=="string"&&jsx(t.Image,{className:"size-full object-cover object-center",src:typeof a=="string"?a:void 0,...c}),a&&typeof a!="string"?a:jsx(t.Fallback,{delayMs:m,children:s||jsx(Person,{})})]}),i]});v.displayAs="Avatar";v.as=(e,i)=>cn(l({...e,className:i}));export{v as Avatar};//# sourceMappingURL=index.js.map
1
+ import {cn}from'./../../lib/utils.js';import {Person}from'@accelint/icons';import*as t from'@radix-ui/react-avatar';import'client-only';import {cva}from'cva';import {jsxs,jsx}from'react/jsx-runtime';var l=cva("fg-default-dark flex items-center justify-center overflow-hidden rounded-full bg-surface-overlay",{variants:{size:{medium:"size-[32px] **:[svg]:size-xl",small:"size-xl **:[svg]:size-l"}},defaultVariants:{size:"medium"}}),g=cn(["relative inline-block","[--badge-empty-inset:0_0_auto_auto] [--badge-inset:calc(var(--spacing-xxs)*-1)_calc(var(--spacing-xxs)*-1)_auto_auto] [--badge-position:absolute]"]),v=({className:e,children:i,fallback:o,fallbackDelay:m=0,source:a,size:p="medium",...c})=>jsxs("div",{className:g,children:[jsxs(t.Root,{className:cn("pointer-events-none inline-block",l({size:p,className:e})),role:"img",children:[typeof a=="string"&&jsx(t.Image,{className:"size-full object-cover object-center",src:typeof a=="string"?a:void 0,...c}),a&&typeof a!="string"?a:jsx(t.Fallback,{delayMs:m,children:o||jsx(Person,{})})]}),i]});v.displayAs="Avatar";v.as=(e,i)=>cn(l({...e,className:i}));export{v as Avatar};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/avatar/index.tsx"],"names":["d","cn","o","source","size","n","Person","r","children","Avatar","props","className","avatarStyles"],"mappings":"uMAoBE,IAAA,CAAA,CAAAA,GAAA,CAAA,4GAGU,CACJ,CAAA,IAAA,CAAA,CAAQ,qCACD,CAAA,KAAA,CAAA,yBAGX,CAAA,CAAA,CAAA,eACQ,CAAA,CAAA,IAAA,CAAA,QAKgBC,CAAG,CAC7B,CAAA,CAAA,CAAA,CAAAC,EAAA,CAAA,CAAA,uBACA,CAAA,mJAmBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,wBAEA,CAAA,CAAA,CAAA,CAAA,CAAAC,OACAC,CAAAA,CAAO,IAAA,CAAA,CAAA,CAAA,YAGN,CAAA,CAAA,GAAAC,IAAA,CAAI,KAAA,CAAA,CAAA,SACH,CAAA,CAAA,CAAA,QAAiB,CAAA,CAAAA,IAAA,CAAhB,CACC,gBACE,CAAAH,EAAA,CAAA,kCACe,CAAA,CAAAE,CAAAA,CAAM,IAAA,CAAA,CAAA,CAAA,SAEvB,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,IAEJ,CAAA,KAAA,CAAA,QAAA,CAAA,CAAOD,OAAW,CAAA,EAAA,eAChB,CACC,KAAA,CAAA,CAAA,SAAU,CAAA,2CACEA,OAAW,CAAA,EAAA,QAAoB,CAAA,CAAA,CAC1C,MACH,CAEDA,GAAU,CAAA,CAAA,CAAA,CAAA,CAAA,EAAOA,OAAW,CAAA,EAAA,yBAGD,CAAA,CAAA,OACvB,CAAA,CAAA,CAAA,QAAuBG,CAAA,CAAA,EAAOC,GACjC,QAEJ,EACCC,CAAAA,CAAAA,CACH,CAAA,CAEFC,CAAAA,CAAO,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,SAAY,CAAA,QAEjBC,CAAAA,CACAC,CAAAA,EAAAA,CACGV,CAAAA,CAAGW,CAAAA,CAAa,GAAEV,EAAGQ,CAAAA,CAAO,CAAA,CAAA,GAAA,CAAA,CAAA,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA","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 { cn } from '@/lib/utils';\nimport { Person } from '@accelint/icons';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport 'client-only';\nimport { type VariantProps, cva } from 'cva';\nimport type React from 'react';\n\nconst avatarStyles = cva(\n 'fg-default-dark flex items-center justify-center overflow-hidden rounded-full bg-surface-overlay',\n {\n variants: {\n size: {\n medium: 'size-[32px] **:[svg]:size-xl',\n small: 'size-xl **:[svg]:size-l',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n\nconst avatarWrapperStyles = cn([\n 'relative inline-block',\n '[--badge-empty-inset:0_0_auto_auto] [--badge-inset:calc(var(--spacing-xxs)*-1)_calc(var(--spacing-xxs)*-1)_auto_auto] [--badge-position:absolute]',\n]);\n\nexport interface AvatarProps\n extends React.ComponentProps<typeof AvatarPrimitive.Image>,\n VariantProps<typeof avatarStyles> {\n /**\n * The fallback that the avatar will render if it cannot load the provided source.\n *\n * Accepts any React component.\n */\n fallback?: React.ReactNode;\n /** How long the system should wait before it shows the fallback component. By default there is no delay. */\n fallbackDelay?: number;\n /** The source of an avatar can either be a URL representing an image or a React component (such as an SVG or an icon from a library). */\n source?: string | React.ReactNode;\n}\n\nexport const Avatar = ({\n className,\n children,\n fallback,\n fallbackDelay = 0,\n source,\n size = 'medium',\n ...props\n}: AvatarProps) => (\n <div className={avatarWrapperStyles}>\n <AvatarPrimitive.Root\n className={cn(\n 'pointer-events-none inline-block',\n avatarStyles({ size, className }),\n )}\n role='img'\n >\n {typeof source === 'string' && (\n <AvatarPrimitive.Image\n className='size-full object-cover object-center'\n src={typeof source === 'string' ? source : undefined}\n {...props}\n />\n )}\n {source && typeof source !== 'string' ? (\n source\n ) : (\n <AvatarPrimitive.Fallback delayMs={fallbackDelay}>\n {fallback ? fallback : <Person />}\n </AvatarPrimitive.Fallback>\n )}\n </AvatarPrimitive.Root>\n {children}\n </div>\n);\nAvatar.displayAs = 'Avatar';\nAvatar.as = (\n props: VariantProps<typeof avatarStyles>,\n className?: string | string[],\n) => cn(avatarStyles({ ...props, className }));\n"]}
1
+ {"version":3,"sources":["../../../src/components/avatar/index.tsx"],"names":["d","cn","s","source","size","n","Person","r","children","Avatar","props","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,CAAA,CAAA,CAAA","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';\nimport { cn } from '@/lib/utils';\nimport { Person } from '@accelint/icons';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport 'client-only';\nimport { type VariantProps, cva } from 'cva';\nimport type React from 'react';\n\nconst avatarStyles = cva(\n 'fg-default-dark flex items-center justify-center overflow-hidden rounded-full bg-surface-overlay',\n {\n variants: {\n size: {\n medium: 'size-[32px] **:[svg]:size-xl',\n small: 'size-xl **:[svg]:size-l',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n\nconst avatarWrapperStyles = cn([\n 'relative inline-block',\n '[--badge-empty-inset:0_0_auto_auto] [--badge-inset:calc(var(--spacing-xxs)*-1)_calc(var(--spacing-xxs)*-1)_auto_auto] [--badge-position:absolute]',\n]);\n\nexport interface AvatarProps\n extends React.ComponentProps<typeof AvatarPrimitive.Image>,\n VariantProps<typeof avatarStyles> {\n /**\n * The fallback that the avatar will render if it cannot load the provided source.\n *\n * Accepts any React component.\n */\n fallback?: React.ReactNode;\n /** How long the system should wait before it shows the fallback component. By default there is no delay. */\n fallbackDelay?: number;\n /** The source of an avatar can either be a URL representing an image or a React component (such as an SVG or an icon from a library). */\n source?: string | React.ReactNode;\n}\n\nexport const Avatar = ({\n className,\n children,\n fallback,\n fallbackDelay = 0,\n source,\n size = 'medium',\n ...props\n}: AvatarProps) => (\n <div className={avatarWrapperStyles}>\n <AvatarPrimitive.Root\n className={cn(\n 'pointer-events-none inline-block',\n avatarStyles({ size, className }),\n )}\n role='img'\n >\n {typeof source === 'string' && (\n <AvatarPrimitive.Image\n className='size-full object-cover object-center'\n src={typeof source === 'string' ? source : undefined}\n {...props}\n />\n )}\n {source && typeof source !== 'string' ? (\n source\n ) : (\n <AvatarPrimitive.Fallback delayMs={fallbackDelay}>\n {fallback ? fallback : <Person />}\n </AvatarPrimitive.Fallback>\n )}\n </AvatarPrimitive.Root>\n {children}\n </div>\n);\nAvatar.displayAs = 'Avatar';\nAvatar.as = (\n props: VariantProps<typeof avatarStyles>,\n className?: string | string[],\n) => cn(avatarStyles({ ...props, className }));\n"]}
@@ -1,12 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as cva_types from 'cva/types';
3
3
  import { VariantProps } from 'cva';
4
- import React__default from 'react';
4
+ import react__default from 'react';
5
5
 
6
6
  declare const badgeStyles: (props?: ({
7
7
  variant?: "info" | "advisory" | "normal" | "serious" | "critical" | null | undefined;
8
8
  } & cva_types.ClassProp) | undefined) => string;
9
- interface BadgeProps extends VariantProps<typeof badgeStyles>, Omit<React__default.HTMLProps<HTMLSpanElement>, 'children'> {
9
+ interface BadgeProps extends VariantProps<typeof badgeStyles>, Omit<react__default.HTMLProps<HTMLSpanElement>, 'children'> {
10
10
  className?: string;
11
11
  /** Used to add text to the badge, such as the number of unread notifications. */
12
12
  children?: string;
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default from 'react';
2
+ import react__default from 'react';
3
3
 
4
- interface BoxProps extends React__default.HTMLAttributes<HTMLDivElement> {
5
- as?: React__default.ElementType;
4
+ interface BoxProps extends react__default.HTMLAttributes<HTMLDivElement> {
5
+ as?: react__default.ElementType;
6
6
  /** When true, apply flex display */
7
7
  flex?: boolean;
8
8
  /** Flex direction: 'row' or 'col' */
@@ -1,27 +1,39 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as cva_types from 'cva/types';
3
- import { VariantProps } from 'cva';
4
- import { ButtonProps as ButtonProps$1 } from 'react-aria-components';
2
+ import * as react from 'react';
3
+ import { ContextValue } from 'react-aria-components';
4
+ import { ButtonProps, ButtonProviderProps, LinkButtonProps, LinkButtonProviderProps, ToggleButtonProps, ToggleButtonProviderProps } from './types.js';
5
+ import 'tailwind-variants';
6
+ import './styles.js';
5
7
 
6
- declare const buttonStyles: (props?: ({
7
- variant?: "critical" | "primary" | "flat" | "outline" | "destructive" | null | undefined;
8
- size?: "small" | "medium" | "large" | "xsmall" | null | undefined;
9
- isDisabled?: boolean | null | undefined;
10
- } & cva_types.ClassProp) | undefined) => string;
11
- interface ButtonProps extends Omit<ButtonProps$1, 'children' | 'isDisabled'>, VariantProps<typeof buttonStyles> {
12
- /**
13
- * Used to add text to the badge, such as the number of unread notifications.
14
- *
15
- * Can also receive a function which will be called with the parameters mentioned
16
- * {@link https://react-spectrum.adobe.com/react-aria/Button.html#styling:~:text=are%20documented%20below.-,Name,-CSS%20Selector here}
17
- */
18
- children?: ButtonProps$1['children'];
19
- isDisabled?: boolean;
8
+ declare const ButtonContext: react.Context<ContextValue<ButtonProps, HTMLButtonElement>>;
9
+ declare function ButtonProvider({ children, ...props }: ButtonProviderProps): react_jsx_runtime.JSX.Element;
10
+ declare namespace ButtonProvider {
11
+ var displayName: string;
12
+ }
13
+ declare function Button({ ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
14
+ declare namespace Button {
15
+ var displayName: string;
16
+ var Provider: typeof ButtonProvider;
17
+ }
18
+ declare const LinkButtonContext: react.Context<ContextValue<LinkButtonProps, HTMLAnchorElement>>;
19
+ declare function LinkButtonProvider({ children, ...props }: LinkButtonProviderProps): react_jsx_runtime.JSX.Element;
20
+ declare namespace LinkButtonProvider {
21
+ var displayName: string;
22
+ }
23
+ declare function LinkButton({ ref, ...props }: LinkButtonProps): react_jsx_runtime.JSX.Element;
24
+ declare namespace LinkButton {
25
+ var displayName: string;
26
+ var Provider: typeof LinkButtonProvider;
27
+ }
28
+ declare const ToggleButtonContext: react.Context<ContextValue<ToggleButtonProps, HTMLButtonElement>>;
29
+ declare function ToggleButtonProvider({ children, ...props }: ToggleButtonProviderProps): react_jsx_runtime.JSX.Element;
30
+ declare namespace ToggleButtonProvider {
31
+ var displayName: string;
32
+ }
33
+ declare function ToggleButton({ ref, ...props }: ToggleButtonProps): react_jsx_runtime.JSX.Element;
34
+ declare namespace ToggleButton {
35
+ var displayName: string;
36
+ var Provider: typeof ToggleButtonProvider;
20
37
  }
21
- declare const Button: {
22
- ({ className, isDisabled, variant, size, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
23
- displayName: string;
24
- as(props: VariantProps<typeof buttonStyles>, className?: string | string[]): string;
25
- };
26
38
 
27
- export { Button, type ButtonProps };
39
+ export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext };
@@ -1,2 +1,2 @@
1
- import {expectsIconWrapper}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {Button,composeRenderProps}from'react-aria-components';import {jsx}from'react/jsx-runtime';var n=cva("inline-flex cursor-pointer items-center justify-center whitespace-nowrap [--icon-size:20px]",{variants:{variant:{primary:"fg-inverse-light rounded-medium bg-interactive-default dtk-pressed:bg-interactive-hover-light outline-none hover:bg-interactive-hover-light focus:bg-interactive-hover-light",outline:"fg-default-light rounded-medium outline dtk-pressed:outline-interactive-hover outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover",flat:"fg-default-light rounded-medium bg-transparent dtk-pressed:bg-interactive-hover-dark outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark",destructive:"fg-inverse-light rounded-medium bg-serious-bold dtk-pressed:bg-serious-hover outline-none hover:bg-serious-hover focus:bg-serious-hover",critical:"fg-default-light rounded-medium bg-critical-bold dtk-pressed:bg-critical-hover outline-none hover:bg-critical-hover focus:bg-critical-hover"},size:{large:"min-h-xxl gap-xs rounded-medium px-l py-s text-button-l [--icon-size:24px]",medium:"min-h-[32px] gap-xs rounded-medium px-l py-xs text-button-m [--icon-size:20px]",small:"min-h-xl gap-xxs p-s text-button-s [--icon-size:16px]",xsmall:"min-h-[20px] gap-xxs px-s py-xs text-button-xs [--icon-size:12px]"},isDisabled:{true:"fg-disabled hover:fg-disabled cursor-not-allowed bg-interactive-disabled hover:bg-interactive-disabled focus:bg-interactive-disabled",false:""}},compoundVariants:[{variant:"outline",isDisabled:true,className:"fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent outline outline-interactive-disabled hover:bg-transparent focus:bg-transparent"},{variant:"flat",isDisabled:true,className:"fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent hover:bg-transparent focus:bg-transparent"}],defaultVariants:{isDisabled:false,variant:"primary",size:"medium"}}),i=({className:t,isDisabled:e,variant:s="primary",size:a="medium",...r})=>(expectsIconWrapper({children:r.children,componentName:i.displayName}),jsx(Button,{className:composeRenderProps(t,d=>cn("w-content",n({isDisabled:e,variant:s,size:a,className:d}))),isDisabled:e,...r}));i.displayName="Button";i.as=(t,e)=>cn(n({...t,className:e}));export{i as Button};//# sourceMappingURL=index.js.map
1
+ import'client-only';import {createContext}from'react';import {useContextProps,Button,composeRenderProps,Link,ToggleButton}from'react-aria-components';import {Icon}from'../icon/index.js';import {ButtonStyles,LinkButtonStyles,ToggleButtonStyles}from'./styles.js';import {jsx}from'react/jsx-runtime';var c=createContext(null);function g({children:t,...o}){return jsx(c.Provider,{value:o,children:t})}g.displayName="Button.Provider";function p({ref:t,...o}){[o,t]=useContextProps(o,t??null,c);let{children:r,className:i,color:u,size:e,variant:l,...s}=o;return jsx(Icon.Provider,{size:e,children:jsx(Button,{...s,ref:t,className:composeRenderProps(i,B=>ButtonStyles({className:B,color:u,size:e,variant:l})),children:r})})}p.displayName="Button";p.Provider=g;var m=createContext(null);function T({children:t,...o}){return jsx(m.Provider,{value:o,children:t})}T.displayName="LinkButton.Provider";function x({ref:t,...o}){[o,t]=useContextProps(o,t??null,m);let{children:r,className:i,color:u,size:e,variant:l,...s}=o;return jsx(Icon.Provider,{size:e,children:jsx(Link,{...s,ref:t,className:composeRenderProps(i,B=>LinkButtonStyles({className:B,color:u,size:e,variant:l})),children:r})})}x.displayName="LinkButton";x.Provider=T;var L=createContext(null);function k({children:t,...o}){return jsx(L.Provider,{value:o,children:t})}k.displayName="ToggleButton.Provider";function y({ref:t,...o}){[o,t]=useContextProps(o,t??null,L);let{children:r,className:i,color:u,size:e,variant:l,...s}=o;return jsx(Icon.Provider,{size:e,children:jsx(ToggleButton,{...s,ref:t,className:composeRenderProps(i,B=>ToggleButtonStyles({className:B,color:u,size:e,variant:l})),children:r})})}y.displayName="ToggleButton";y.Provider=k;export{p as Button,c as ButtonContext,x as LinkButton,m as LinkButtonContext,y as ToggleButton,L as ToggleButtonContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/button/index.tsx"],"names":["u","Button","className","isDisabled","props","l","jsx","b","composeRenderProps","p","buttonStyles","cn","o"],"mappings":"oNAqBE,IAAA,CAAA,CAAAA,GAAA,CAAA,6FAGI,CAAA,CAAA,QACE,CAAA,CAAA,+LAGE,CAAA,OAAA,CAAA,mKACI,CAAA,IAAA,CAAA,mKAEJ,CAAA,WAAA,CAAA,yIAEA,CAAA,QAAA,CAAA,6IAIA,CAAA,CAAA,IAAA,CAAA,CAAA,KAAA,CAAA,oKAGK,CAAA,KAAA,CAAA,uDAEL,CAAA,MAAA,CAAA,mEAGF,CAAA,CAAA,UAAM,CAAA,CAAA,IAAA,CAAA,sIAIV,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,gBAEa,CAAA,CAAA,CAAA,OACT,CAAA,UACA,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,kKAGO,CAAA,CAAA,CAAA,OACT,CAAA,OACA,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,6HAGN,CAAA,CAAA,CAAA,iBAEE,UAAS,CAAA,KAAA,CAAA,OACT,CAAA,SACF,CACF,IAgBWC,CAAS,QACpB,CAAA,CAAA,CAAA,CAAAC,CAAAA,CACA,CAAA,CAAA,SAAAC,CAAAA,CACA,WAAU,CAAA,CAAA,CAAA,OACV,CAAA,CAAA,CAAA,cACA,CAAGC,CACL,CAAA,QAEI,CAAA,GAAA,CAAA,CAAA,IAAgBC,kBAAA,CAAA,CAAA,QAChB,CAAA,CAAA,CAAA,QAAA,CAAeJ,aACjB,CAAC,EAGCK,WACE,CAAA,CAAA,CAAAC,GAAWC,CAAAA,MAAmBN,CAAAA,CAAYA,SAEtC,CAAAO,kBAAA,CAAA,CAAA,CAAA,CAAA,EACAC,EAAAA,CAAa,WACX,CAAAP,EACA,CAAA,UACA,CAAA,CAAA,CAAA,cAEF,CAAC,CACH,CACF,SACA,CAAA,CAAA,CAAA,CAAYA,CAAAA,CACX,CAAA,UAIA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAc,CAAA,CAAA,YACT,QAGPQ,CAAGD,EAAa,EAAE,CAAA,CAAGN,EAAO,CAAA,GAAAQ,EAAA,CAAA,CAAA,CAAA,CAAA,GAAW,CAAC,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["import { expectsIconWrapper } from '@/lib/react';\n/*\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 */\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nconst buttonStyles = cva(\n 'inline-flex cursor-pointer items-center justify-center whitespace-nowrap [--icon-size:20px]',\n {\n variants: {\n variant: {\n primary:\n 'fg-inverse-light rounded-medium bg-interactive-default dtk-pressed:bg-interactive-hover-light outline-none hover:bg-interactive-hover-light focus:bg-interactive-hover-light',\n outline:\n 'fg-default-light rounded-medium outline dtk-pressed:outline-interactive-hover outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover',\n flat: 'fg-default-light rounded-medium bg-transparent dtk-pressed:bg-interactive-hover-dark outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark',\n destructive:\n 'fg-inverse-light rounded-medium bg-serious-bold dtk-pressed:bg-serious-hover outline-none hover:bg-serious-hover focus:bg-serious-hover',\n critical:\n 'fg-default-light rounded-medium bg-critical-bold dtk-pressed:bg-critical-hover outline-none hover:bg-critical-hover focus:bg-critical-hover',\n },\n size: {\n large:\n 'min-h-xxl gap-xs rounded-medium px-l py-s text-button-l [--icon-size:24px]',\n medium:\n 'min-h-[32px] gap-xs rounded-medium px-l py-xs text-button-m [--icon-size:20px]',\n small: 'min-h-xl gap-xxs p-s text-button-s [--icon-size:16px]',\n xsmall:\n 'min-h-[20px] gap-xxs px-s py-xs text-button-xs [--icon-size:12px]',\n },\n isDisabled: {\n true: 'fg-disabled hover:fg-disabled cursor-not-allowed bg-interactive-disabled hover:bg-interactive-disabled focus:bg-interactive-disabled',\n false: '',\n },\n },\n compoundVariants: [\n {\n variant: 'outline',\n isDisabled: true,\n className:\n 'fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent outline outline-interactive-disabled hover:bg-transparent focus:bg-transparent',\n },\n {\n variant: 'flat',\n isDisabled: true,\n className:\n 'fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent hover:bg-transparent focus:bg-transparent',\n },\n ],\n defaultVariants: {\n isDisabled: false,\n variant: 'primary',\n size: 'medium',\n },\n },\n);\n\nexport interface ButtonProps\n extends Omit<AriaButtonProps, 'children' | 'isDisabled'>,\n VariantProps<typeof buttonStyles> {\n /**\n * Used to add text to the badge, such as the number of unread notifications.\n *\n * Can also receive a function which will be called with the parameters mentioned\n * {@link https://react-spectrum.adobe.com/react-aria/Button.html#styling:~:text=are%20documented%20below.-,Name,-CSS%20Selector here}\n */\n children?: AriaButtonProps['children'];\n isDisabled?: boolean;\n}\n\nexport const Button = ({\n className,\n isDisabled,\n variant = 'primary',\n size = 'medium',\n ...props\n}: ButtonProps) => {\n expectsIconWrapper({\n children: props.children,\n componentName: Button.displayName,\n });\n\n return (\n <AriaButton\n className={composeRenderProps(className, (className) =>\n cn(\n 'w-content',\n buttonStyles({\n isDisabled,\n variant,\n size,\n className,\n }),\n ),\n )}\n isDisabled={isDisabled}\n {...props}\n />\n );\n};\nButton.displayName = 'Button';\nButton.as = (\n props: VariantProps<typeof buttonStyles>,\n className?: string | string[],\n) => cn(buttonStyles({ ...props, className }));\n"]}
1
+ {"version":3,"sources":["../../../src/components/button/index.tsx"],"names":["createContext","P","children","ButtonContext","props","ButtonProvider","ref","useContextProps","className","color","variant","Icon","v","size","jsx","AriaButton","C","composeRenderProps","ButtonStyles","z","Button","LinkButtonContext","LinkButtonProvider","Link","f","LinkButtonStyles","A","LinkButton","ToggleButtonContext","ToggleButtonProvider","AriaToggleButton","N","ToggleButtonStyles","h","ToggleButton"],"mappings":"6SAmCEA,CAAAA,CAA4DC,aAAA,CAAA,IAE9D,EAAA,SAAwB,CAAE,CAAA,CAAA,QAAAC,CAAU,CAAA,CAAA,IAAiC,CACnE,CAAA,CAAA,OACGC,GAAAA,CAAc,CAAA,CAAA,QAAS,CAAA,CAAA,KAAOC,CAAQ,CAAA,CAAA,QAAAF,CAAS,CAEpD,CACAG,CAAAA,CAAe,aAAc,CAAA,iBAEtB,CAAA,SAAgB,CAAE,CAAA,CAAA,GAAAC,CAAK,CAAA,CAAA,GAAS,CAAgB,CACrD,CAACF,CAAAA,CAAOE,CAAG,EAAIC,CAAAA,CAA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Aa,CAAA,CAAA,WAAc,CAAA,eACd,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 {\n Button as AriaButton,\n ToggleButton as AriaToggleButton,\n type ContextValue,\n Link,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { ButtonStyles, LinkButtonStyles, ToggleButtonStyles } from './styles';\nimport type {\n ButtonProps,\n ButtonProviderProps,\n LinkButtonProps,\n LinkButtonProviderProps,\n ToggleButtonProps,\n ToggleButtonProviderProps,\n} from './types';\n\nexport const ButtonContext =\n createContext<ContextValue<ButtonProps, HTMLButtonElement>>(null);\n\nfunction ButtonProvider({ children, ...props }: ButtonProviderProps) {\n return (\n <ButtonContext.Provider value={props}>{children}</ButtonContext.Provider>\n );\n}\nButtonProvider.displayName = 'Button.Provider';\n\nexport function Button({ ref, ...props }: ButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, ButtonContext);\n\n const { children, className, color, size, variant, ...rest } = props;\n\n return (\n <Icon.Provider size={size}>\n <AriaButton\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n ButtonStyles({\n className,\n color,\n size,\n variant,\n }),\n )}\n >\n {children}\n </AriaButton>\n </Icon.Provider>\n );\n}\nButton.displayName = 'Button';\nButton.Provider = ButtonProvider;\n\nexport const LinkButtonContext =\n createContext<ContextValue<LinkButtonProps, HTMLAnchorElement>>(null);\n\nfunction LinkButtonProvider({ children, ...props }: LinkButtonProviderProps) {\n return (\n <LinkButtonContext.Provider value={props}>\n {children}\n </LinkButtonContext.Provider>\n );\n}\nLinkButtonProvider.displayName = 'LinkButton.Provider';\n\nexport function LinkButton({ ref, ...props }: LinkButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, LinkButtonContext);\n\n const { children, className, color, size, variant, ...rest } = props;\n\n return (\n <Icon.Provider size={size}>\n <Link\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n LinkButtonStyles({\n className,\n color,\n size,\n variant,\n }),\n )}\n >\n {children}\n </Link>\n </Icon.Provider>\n );\n}\nLinkButton.displayName = 'LinkButton';\nLinkButton.Provider = LinkButtonProvider;\n\nexport const ToggleButtonContext =\n createContext<ContextValue<ToggleButtonProps, HTMLButtonElement>>(null);\n\nfunction ToggleButtonProvider({\n children,\n ...props\n}: ToggleButtonProviderProps) {\n return (\n <ToggleButtonContext.Provider value={props}>\n {children}\n </ToggleButtonContext.Provider>\n );\n}\nToggleButtonProvider.displayName = 'ToggleButton.Provider';\n\nexport function ToggleButton({ ref, ...props }: ToggleButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, ToggleButtonContext);\n\n const { children, className, color, size, variant, ...rest } = props;\n\n return (\n <Icon.Provider size={size}>\n <AriaToggleButton\n {...rest}\n ref={ref}\n className={composeRenderProps(className, (className) =>\n ToggleButtonStyles({\n className,\n color,\n size,\n variant,\n }),\n )}\n >\n {children}\n </AriaToggleButton>\n </Icon.Provider>\n );\n}\nToggleButton.displayName = 'ToggleButton';\nToggleButton.Provider = ToggleButtonProvider;\n"]}