@accelint/design-toolkit 2.3.2 → 2.4.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 (104) hide show
  1. package/dist/components/accordion/index.js +1 -1
  2. package/dist/components/accordion/index.js.map +1 -1
  3. package/dist/components/accordion/styles.js +1 -1
  4. package/dist/components/accordion/styles.js.map +1 -1
  5. package/dist/components/avatar/index.d.ts +16 -24
  6. package/dist/components/avatar/index.js +1 -1
  7. package/dist/components/avatar/index.js.map +1 -1
  8. package/dist/components/avatar/styles.d.ts +47 -0
  9. package/dist/components/avatar/styles.js +2 -0
  10. package/dist/components/avatar/styles.js.map +1 -0
  11. package/dist/components/avatar/types.d.ts +19 -0
  12. package/dist/components/avatar/types.js +2 -0
  13. package/dist/components/avatar/types.js.map +1 -0
  14. package/dist/components/badge/index.d.ts +16 -16
  15. package/dist/components/badge/index.js +1 -1
  16. package/dist/components/badge/index.js.map +1 -1
  17. package/dist/components/badge/styles.d.ts +32 -0
  18. package/dist/components/badge/styles.js +2 -0
  19. package/dist/components/badge/styles.js.map +1 -0
  20. package/dist/components/badge/types.d.ts +16 -0
  21. package/dist/components/badge/types.js +2 -0
  22. package/dist/components/badge/types.js.map +1 -0
  23. package/dist/components/button/index.js +1 -1
  24. package/dist/components/button/index.js.map +1 -1
  25. package/dist/components/button/styles.d.ts +12 -103
  26. package/dist/components/button/styles.js +1 -1
  27. package/dist/components/button/styles.js.map +1 -1
  28. package/dist/components/button/types.d.ts +3 -1
  29. package/dist/components/checkbox/styles.js +1 -1
  30. package/dist/components/checkbox/styles.js.map +1 -1
  31. package/dist/components/chip/index.js +1 -1
  32. package/dist/components/chip/index.js.map +1 -1
  33. package/dist/components/chip/styles.d.ts +130 -134
  34. package/dist/components/chip/styles.js +1 -1
  35. package/dist/components/chip/styles.js.map +1 -1
  36. package/dist/components/chip/types.d.ts +7 -5
  37. package/dist/components/classification-badge/index.js +1 -1
  38. package/dist/components/classification-badge/index.js.map +1 -1
  39. package/dist/components/classification-badge/styles.d.ts +2 -15
  40. package/dist/components/classification-badge/styles.js +1 -1
  41. package/dist/components/classification-badge/styles.js.map +1 -1
  42. package/dist/components/classification-badge/types.d.ts +3 -1
  43. package/dist/components/icon/index.d.ts +0 -2
  44. package/dist/components/icon/index.js +1 -1
  45. package/dist/components/icon/index.js.map +1 -1
  46. package/dist/components/icon/styles.d.ts +2 -31
  47. package/dist/components/icon/styles.js +1 -1
  48. package/dist/components/icon/styles.js.map +1 -1
  49. package/dist/components/icon/types.d.ts +4 -4
  50. package/dist/components/input/index.d.ts +16 -0
  51. package/dist/components/input/index.js +2 -0
  52. package/dist/components/input/index.js.map +1 -0
  53. package/dist/components/input/styles.d.ts +152 -0
  54. package/dist/components/input/styles.js +2 -0
  55. package/dist/components/input/styles.js.map +1 -0
  56. package/dist/components/input/types.d.ts +20 -0
  57. package/dist/components/input/types.js +2 -0
  58. package/dist/components/input/types.js.map +1 -0
  59. package/dist/components/label/styles.js +1 -1
  60. package/dist/components/label/styles.js.map +1 -1
  61. package/dist/components/menu/index.d.ts +48 -0
  62. package/dist/components/menu/index.js +2 -0
  63. package/dist/components/menu/index.js.map +1 -0
  64. package/dist/components/menu/styles.d.ts +95 -0
  65. package/dist/components/menu/styles.js +2 -0
  66. package/dist/components/menu/styles.js.map +1 -0
  67. package/dist/components/menu/types.d.ts +30 -0
  68. package/dist/components/menu/types.js +2 -0
  69. package/dist/components/menu/types.js.map +1 -0
  70. package/dist/components/query-builder/value-editor.js +1 -1
  71. package/dist/components/query-builder/value-editor.js.map +1 -1
  72. package/dist/components/switch/styles.js +1 -1
  73. package/dist/components/switch/styles.js.map +1 -1
  74. package/dist/components/text-area-field/index.d.ts +0 -2
  75. package/dist/components/text-area-field/index.js +1 -1
  76. package/dist/components/text-area-field/index.js.map +1 -1
  77. package/dist/components/text-area-field/styles.d.ts +33 -93
  78. package/dist/components/text-area-field/styles.js +1 -1
  79. package/dist/components/text-area-field/styles.js.map +1 -1
  80. package/dist/components/text-area-field/types.d.ts +6 -9
  81. package/dist/components/text-field/index.d.ts +18 -24
  82. package/dist/components/text-field/index.js +1 -1
  83. package/dist/components/text-field/index.js.map +1 -1
  84. package/dist/components/text-field/styles.d.ts +53 -0
  85. package/dist/components/text-field/styles.js +2 -0
  86. package/dist/components/text-field/styles.js.map +1 -0
  87. package/dist/components/text-field/types.d.ts +26 -0
  88. package/dist/components/text-field/types.js +2 -0
  89. package/dist/components/text-field/types.js.map +1 -0
  90. package/dist/index.css +79 -69
  91. package/dist/index.d.ts +22 -9
  92. package/dist/index.js +1 -1
  93. package/dist/metafile-esm.json +1 -1
  94. package/dist/styles.css +812 -262
  95. package/dist/tokens/{generated/tokens.d.ts → index.d.ts} +19 -4
  96. package/dist/tokens/index.js +2 -0
  97. package/dist/tokens/index.js.map +1 -0
  98. package/dist/tokens/{generated/themes.css → themes.css} +19 -4
  99. package/dist/tokens/{generated/tokens.css → tokens.css} +18 -3
  100. package/dist/tokens/tokens.d.ts +2 -0
  101. package/package.json +2 -1
  102. package/dist/tokens/generated/tokens.js +0 -2
  103. package/dist/tokens/generated/tokens.js.map +0 -1
  104. /package/dist/tokens/{generated/themes.d.ts → themes.d.ts} +0 -0
@@ -1,2 +1,2 @@
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
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/accordion: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":["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,CA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B,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"]}
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,CAA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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/accordion: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,2 +1,2 @@
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
1
+ import {tv}from'./../../lib/utils.js';var o={variant:"cozy",isDisabled:false,isExpanded:false},a=tv({slots:{group:"group/accordion-group flex w-full flex-col",accordion:"group/accordion 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/accordion:hover:bg-interactive-hover-dark group-enabled/accordion:focus-within:bg-interactive-hover-dark","group-disabled/accordion:fg-disabled group-disabled/accordion: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:o});export{a as AccordionStyles,o 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,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"]}
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,4CACP,CAAA,SAAW,CAAA,qDACX,CAAQ,MACN,CAAA,CAAA,iFACA,CAAA,wHACA,CAAA,kFAEF,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: 'group/accordion-group flex w-full flex-col',\n accordion: 'group/accordion 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/accordion:hover:bg-interactive-hover-dark group-enabled/accordion:focus-within:bg-interactive-hover-dark',\n 'group-disabled/accordion:fg-disabled group-disabled/accordion: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"]}
@@ -1,28 +1,20 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as cva_types from 'cva/types';
3
- import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
- import { VariantProps } from 'cva';
5
- import react__default from 'react';
2
+ import * as react from 'react';
3
+ import { ContextValue } from 'react-aria-components';
4
+ import { AvatarProps, AvatarProviderProps } from './types.js';
5
+ import '@radix-ui/react-avatar';
6
+ import 'tailwind-variants';
7
+ import './styles.js';
6
8
 
7
- declare const avatarStyles: (props?: ({
8
- size?: "small" | "medium" | null | undefined;
9
- } & cva_types.ClassProp) | undefined) => string;
10
- interface AvatarProps extends react__default.ComponentProps<typeof AvatarPrimitive.Image>, VariantProps<typeof avatarStyles> {
11
- /**
12
- * The fallback that the avatar will render if it cannot load the provided source.
13
- *
14
- * Accepts any React component.
15
- */
16
- fallback?: react__default.ReactNode;
17
- /** How long the system should wait before it shows the fallback component. By default there is no delay. */
18
- fallbackDelay?: number;
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;
9
+ declare const AvatarContext: react.Context<ContextValue<AvatarProps, HTMLSpanElement>>;
10
+ declare function AvatarProvider({ children, ...props }: AvatarProviderProps): react_jsx_runtime.JSX.Element;
11
+ declare namespace AvatarProvider {
12
+ var displayName: string;
13
+ }
14
+ declare function Avatar({ ref, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
15
+ declare namespace Avatar {
16
+ var displayName: string;
17
+ var Provider: typeof AvatarProvider;
21
18
  }
22
- declare const Avatar: {
23
- ({ className, children, fallback, fallbackDelay, source, size, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
24
- displayAs: string;
25
- as(props: VariantProps<typeof avatarStyles>, className?: string | string[]): string;
26
- };
27
19
 
28
- export { Avatar, type AvatarProps };
20
+ export { Avatar, AvatarContext };
@@ -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: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
1
+ import'client-only';import {spacingXs}from'./../../tokens/.js';import {Person}from'@accelint/icons';import {Root,Image,Fallback}from'@radix-ui/react-avatar';import {createContext}from'react';import {useContextProps}from'react-aria-components';import {Badge}from'../badge/index.js';import {Icon}from'../icon/index.js';import {AvatarStyles}from'./styles.js';import {jsx,jsxs}from'react/jsx-runtime';var {avatar:C,image:b,fallback:k,content:I}=AvatarStyles(),i=createContext(null);function l({children:o,...e}){return jsx(i.Provider,{value:e,children:o})}l.displayName="Avatar.Provider";function n({ref:o,...e}){[e,o]=useContextProps(e,o??null,i);let{children:c,classNames:t,fallbackProps:s,imageProps:p,size:r="medium",...v}=e;return jsx(Icon.Provider,{size:r==="medium"?"large":"medium",children:jsxs(Root,{...v,className:C({size:r,className:t?.avatar}),role:"img","data-size":r,children:[jsx(Image,{...p,className:b({className:t?.image,size:r})}),jsx(Fallback,{...s,className:k({className:t?.fallback,size:r}),children:s?.children||jsx(Icon,{children:jsx(Person,{})})}),jsx(Badge.Provider,{offset:spacingXs,placement:"top right",children:jsx("span",{className:I({className:t?.content,size:r}),children:c})})]})})}n.displayName="Avatar";n.Provider=l;export{n as Avatar,i as AvatarContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/avatar/index.tsx"],"names":["d","cn","s","source","size","n","Person","r","children","Avatar","props","className","avatarStyles"],"mappings":"uMAqBE,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\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
+ {"version":3,"sources":["../../../src/components/avatar/index.tsx"],"names":["avatar","image","fallback","content","createContext","y","N","AvatarProvider","children","jsx","AvatarContext","a","Avatar","props","ref","useContextProps","g","Icon","m","size","jsxs","h","A","classNames","imageProps","Fallback","fallbackProps","f","Badge","x","d"],"mappings":"6YAwBQA,IAAQ,CAAA,MAAAC,CAAO,CAAA,CAAA,KAAA,CAAA,CAAAC,CAAAA,QAAU,CAAAC,CAAQ,CAAA,OAGvCC,CAAAA,CAA0D,CAAA,CAAAC,YAAA,EAAI,CAEhE,CAAA,CAAAC,aAAA,CAAA,IAAA,EAASC,WAAiBC,CAAAA,QACxB,CAAA,CAAA,CAAA,GAAA,CACEC,EAACC,CAAAA,OAAcC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A,CAAA,CAAA,CAAA,CAAAjB,GAAA,CAAAkB,KAAN,CAAe,SAAmB,CAAA,MAAA,CAAAC,SAAA,CAAU,SAAA,CAAA,WAC3CrB,CAAAA,QAAC,CAAKE,GAAA,CAAA,MAAA,CAAA,CAAWR,SAAU,CAAA,CAAA,CAAA,CAAWoB,SAAY,CAAA,CAAS,EAAA,OACxD,CAAA,IAAA,CAAA,CAAA,CAAA,CAAAf,CAAAA,QAIT,CAEJ,CACAI,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,WACPA,CAAAA,QAAO,CAAA,CAAWL,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'use client';\n\nimport 'client-only';\nimport { spacingXs } from '@/tokens/';\nimport { Person } from '@accelint/icons';\nimport { Fallback, Image, Root } from '@radix-ui/react-avatar';\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport { Badge } from '../badge';\nimport { Icon } from '../icon';\nimport { AvatarStyles } from './styles';\nimport type { AvatarProps, AvatarProviderProps } from './types';\n\nconst { avatar, image, fallback, content } = AvatarStyles();\n\nexport const AvatarContext =\n createContext<ContextValue<AvatarProps, HTMLSpanElement>>(null);\n\nfunction AvatarProvider({ children, ...props }: AvatarProviderProps) {\n return (\n <AvatarContext.Provider value={props}>{children}</AvatarContext.Provider>\n );\n}\nAvatarProvider.displayName = 'Avatar.Provider';\n\nexport function Avatar({ ref, ...props }: AvatarProps) {\n [props, ref] = useContextProps(props, ref ?? null, AvatarContext);\n\n const {\n children,\n classNames,\n fallbackProps,\n imageProps,\n size = 'medium',\n ...rest\n } = props;\n\n return (\n <Icon.Provider size={size === 'medium' ? 'large' : 'medium'}>\n <Root\n {...rest}\n className={avatar({ size, className: classNames?.avatar })}\n role='img'\n data-size={size}\n >\n <Image\n {...imageProps}\n className={image({ className: classNames?.image, size })}\n />\n <Fallback\n {...fallbackProps}\n className={fallback({ className: classNames?.fallback, size })}\n >\n {fallbackProps?.children || (\n <Icon>\n <Person />\n </Icon>\n )}\n </Fallback>\n <Badge.Provider offset={spacingXs} placement='top right'>\n <span className={content({ className: classNames?.content, size })}>\n {children}\n </span>\n </Badge.Provider>\n </Root>\n </Icon.Provider>\n );\n}\nAvatar.displayName = 'Avatar';\nAvatar.Provider = AvatarProvider;\n"]}
@@ -0,0 +1,47 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const AvatarStyles: tailwind_variants.TVReturnType<{
4
+ [key: string]: {
5
+ [key: string]: tailwind_variants.ClassValue | {
6
+ content?: tailwind_variants.ClassValue;
7
+ image?: tailwind_variants.ClassValue;
8
+ fallback?: tailwind_variants.ClassValue;
9
+ avatar?: tailwind_variants.ClassValue;
10
+ };
11
+ };
12
+ } | {
13
+ [x: string]: {
14
+ [x: string]: tailwind_variants.ClassValue | {
15
+ content?: tailwind_variants.ClassValue;
16
+ image?: tailwind_variants.ClassValue;
17
+ fallback?: tailwind_variants.ClassValue;
18
+ avatar?: tailwind_variants.ClassValue;
19
+ };
20
+ };
21
+ } | {}, {
22
+ avatar: string[];
23
+ image: string;
24
+ fallback: string;
25
+ content: string;
26
+ }, undefined, {
27
+ [key: string]: {
28
+ [key: string]: tailwind_variants.ClassValue | {
29
+ content?: tailwind_variants.ClassValue;
30
+ image?: tailwind_variants.ClassValue;
31
+ fallback?: tailwind_variants.ClassValue;
32
+ avatar?: tailwind_variants.ClassValue;
33
+ };
34
+ };
35
+ } | {}, {
36
+ avatar: string[];
37
+ image: string;
38
+ fallback: string;
39
+ content: string;
40
+ }, tailwind_variants.TVReturnType<unknown, {
41
+ avatar: string[];
42
+ image: string;
43
+ fallback: string;
44
+ content: string;
45
+ }, undefined, unknown, unknown, undefined>>;
46
+
47
+ export { AvatarStyles };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';var r=tv({slots:{avatar:["group/avatar grid [grid-template-areas:'content'] rounded-full bg-surface-overlay fg-default-dark","size-medium:size-[32px] size-medium:text-header-m","size-small:size-xl size-small:text-header-xs"],image:"size-full overflow-hidden rounded-full object-cover object-center [grid-area:content]",fallback:"flex size-full items-center justify-center [grid-area:content]",content:"relative flex size-full items-center justify-center [grid-area:content]"}});export{r as AvatarStyles};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/avatar/styles.ts"],"names":["e"],"mappings":"sCAeE,IAAA,CAAA,CAAAA,EAAA,CAAO,CACL,KAAA,CAAA,CAAQ,2GAEN,CAAA,mDACA,CAAA,8CAEF,CACE,CAAA,KAAA,CAAA,gGACQ,CAAA,gEACV,CAAA,OACE,CAAA,yEAEL,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 AvatarStyles = tv({\n slots: {\n avatar: [\n `group/avatar grid [grid-template-areas:'content'] rounded-full bg-surface-overlay fg-default-dark`,\n 'size-medium:size-[32px] size-medium:text-header-m',\n 'size-small:size-xl size-small:text-header-xs',\n ],\n image:\n 'size-full overflow-hidden rounded-full object-cover object-center [grid-area:content]',\n fallback: 'flex size-full items-center justify-center [grid-area:content]',\n content:\n 'relative flex size-full items-center justify-center [grid-area:content]',\n },\n});\n"]}
@@ -0,0 +1,19 @@
1
+ import { Avatar, Fallback, Image } from '@radix-ui/react-avatar';
2
+ import { RefAttributes, ComponentProps, PropsWithChildren } from 'react';
3
+ import { VariantProps } from 'tailwind-variants';
4
+ import { AvatarStyles } from './styles.js';
5
+
6
+ type AvatarProps = RefAttributes<HTMLSpanElement> & Omit<ComponentProps<typeof Avatar>, 'className'> & VariantProps<typeof AvatarStyles> & PropsWithChildren<{
7
+ classNames?: {
8
+ avatar?: string;
9
+ image?: string;
10
+ fallback?: string;
11
+ content?: string;
12
+ };
13
+ fallbackProps?: Omit<ComponentProps<typeof Fallback>, 'className'>;
14
+ imageProps?: Omit<ComponentProps<typeof Image>, 'className'>;
15
+ size?: 'medium' | 'small';
16
+ }>;
17
+ type AvatarProviderProps = PropsWithChildren<AvatarProps>;
18
+
19
+ export type { AvatarProps, AvatarProviderProps };
@@ -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,20 +1,20 @@
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 react__default from 'react';
2
+ import * as react from 'react';
3
+ import { ContextValue } from 'react-aria-components';
4
+ import { BadgeProps, BadgeProviderProps } from './types.js';
5
+ import '@react-types/overlays';
6
+ import 'tailwind-variants';
7
+ import './styles.js';
5
8
 
6
- declare const badgeStyles: (props?: ({
7
- variant?: "info" | "advisory" | "normal" | "serious" | "critical" | null | undefined;
8
- } & cva_types.ClassProp) | undefined) => string;
9
- interface BadgeProps extends VariantProps<typeof badgeStyles>, Omit<react__default.HTMLProps<HTMLSpanElement>, 'children'> {
10
- className?: string;
11
- /** Used to add text to the badge, such as the number of unread notifications. */
12
- children?: string;
9
+ declare const BadgeContext: react.Context<ContextValue<BadgeProps, HTMLSpanElement>>;
10
+ declare function BadgeProvider({ children, ...props }: BadgeProviderProps): react_jsx_runtime.JSX.Element;
11
+ declare namespace BadgeProvider {
12
+ var displayName: string;
13
+ }
14
+ declare function Badge({ ref, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
15
+ declare namespace Badge {
16
+ var displayName: string;
17
+ var Provider: typeof BadgeProvider;
13
18
  }
14
- declare const Badge: {
15
- ({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
16
- displayName: string;
17
- as(props: VariantProps<typeof badgeStyles>, className?: string | string[]): string;
18
- };
19
19
 
20
- export { Badge, type BadgeProps };
20
+ export { Badge, BadgeContext };
@@ -1,2 +1,2 @@
1
- import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {jsx}from'react/jsx-runtime';var a=cva(cn(["fg-default-light inline-flex h-l min-w-l items-center justify-center rounded-full px-xs text-body-xs outline empty:size-s empty:min-w-none empty:px-none","[inset:var(--badge-inset,initial)] [position:var(--badge-position,initial)] empty:[inset:var(--badge-empty-inset,initial)]"]),{variants:{variant:{advisory:"bg-advisory-subtle outline-advisory-bold",critical:"bg-critical-subtle outline-critical",serious:"bg-serious-subtle outline-serious",normal:"bg-normal-subtle outline-normal",info:"bg-info-subtle outline-info-bold"}},defaultVariants:{variant:"info"}}),n=({className:e,variant:t="info",...s})=>jsx("span",{className:cn(a({variant:t,className:e})),...s});n.displayName="Badge";n.as=(e,t)=>cn(a({...e,className:t}));export{n as Badge};//# sourceMappingURL=index.js.map
1
+ import'client-only';import {createContext}from'react';import {useContextProps}from'react-aria-components';import {BadgeStylesDefaults,BadgeStyles}from'./styles.js';import {jsx}from'react/jsx-runtime';var o=createContext(null);function r({children:t,...a}){return jsx(o.Provider,{value:a,children:t})}r.displayName="Badge.Provider";function n({ref:t,...a}){[a,t]=useContextProps(a,t??null,o);let{className:s,offset:e,placement:l,variant:p=BadgeStylesDefaults.variant,...i}=a;return jsx("span",{...i,ref:t,className:BadgeStyles({className:s,variant:p}),"data-offset-x":typeof e=="number"?e:e?.x,"data-offset-y":typeof e=="number"?e:e?.y,"data-placement":l||null})}n.displayName="Badge";n.Provider=r;export{n as Badge,o as BadgeContext};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/badge/index.tsx"],"names":["o","i","r","props","Badge","className","cn","badgeStyles"],"mappings":"gGAiBK,IACD,CAAA,CAAAA,GAAA,CAAAC,EAAA,CAAA,CAAA,0JACA,CAAA,4HAGA,CAAA,CAAA,CAAA,CAAA,iBAEI,CAAA,CAAA,mDACA,CAAA,QAAU,CAAA,6CACD,CAAA,mCACT,CAAQ,wCACF,CAAA,IAAA,CAAA,kCAGV,CAAA,CAAA,CAAA,eACE,CAAA,CAAA,OACF,CACF,MAWoB,CACpB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,mBACU,CAAA,CAAA,CACV,MACF,CAAA,GACG,CAAA,CAAA,GAAAC,GAAA,CAAA,iBAGK,CAAAD,EAAA,CAAA,CAAA,CAAA,CAAA,qBAIAE,CAAAA,CACN,CAAA,CAEFC,GAAM,CAAA,CAAA,EAAA,CAAA,CAAA,WAAc,CAAA,OAElBD,EACAE,CAAAA,EAAAA,CACGC,CAAAA,CAAGC,EAAY,GAAEN,EAAGE,EAAO,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 { type VariantProps, cva } from 'cva';\nimport type React from 'react';\n\nconst badgeStyles = cva(\n cn([\n 'fg-default-light inline-flex h-l min-w-l items-center justify-center rounded-full px-xs text-body-xs outline empty:size-s empty:min-w-none empty:px-none',\n '[inset:var(--badge-inset,initial)] [position:var(--badge-position,initial)] empty:[inset:var(--badge-empty-inset,initial)]',\n ]),\n {\n variants: {\n variant: {\n advisory: 'bg-advisory-subtle outline-advisory-bold',\n critical: 'bg-critical-subtle outline-critical',\n serious: 'bg-serious-subtle outline-serious',\n normal: 'bg-normal-subtle outline-normal',\n info: 'bg-info-subtle outline-info-bold',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n);\n\nexport interface BadgeProps\n extends VariantProps<typeof badgeStyles>,\n Omit<React.HTMLProps<HTMLSpanElement>, 'children'> {\n className?: string;\n /** Used to add text to the badge, such as the number of unread notifications. */\n children?: string;\n}\n\nexport const Badge = ({\n className,\n variant = 'info',\n ...props\n}: BadgeProps) => (\n <span\n className={cn(\n badgeStyles({\n variant,\n className,\n }),\n )}\n {...props}\n />\n);\nBadge.displayName = 'Badge';\nBadge.as = (\n props: VariantProps<typeof badgeStyles>,\n className?: string | string[],\n) => cn(badgeStyles({ ...props, className }));\n"]}
1
+ {"version":3,"sources":["../../../src/components/badge/index.tsx"],"names":["BadgeContext","createContext","BadgeProvider","children","jsx","props","Badge","ref","useContextProps","className","offset","placement","variant","BadgeStylesDefaults","rest","BadgeStyles"],"mappings":"wMAmBaA,IAAAA,CACXC,CAAAA,aAAyD,CAAA,IAAI,EAE/D,SAASC,CAAc,CAAE,CAAA,QAAAC,CAAAA,CAAU,CAAA,GAAS,CAAA,CAAuB,CACjE,CAAA,OACEC,GAACJ,CAAAA,CAAa,CAAA,QAAb,CAAsB,CAAA,KAAOK,CAAAA,CAAQ,CAAA,QAAAF,CAAAA,CAAS,CAEnD,CACAD,CAAAA,CAAc,CAAA,WAAc,CAAA,gBAErB,CAAA,SAASI,CAAM,CAAE,CAAA,GAAAC,CAAAA,CAAK,CAAA,GAAS,CAAA,CAAe,CACnD,CAACF,CAAAA,CAAOE,CAAG,CAAA,CAAIC,CAAAA,eAAgBH,EAAOE,CAAAA,CAAAA,EAAO,IAAMP,CAAY,CAAA,CAE/D,CAAA,GACE,CAAA,SAAAS,CAAAA,CACA,CAAA,MAAAC,CAAAA,CACA,CAAA,SAAAC,CAAAA,CACA,CAAA,OAAAC,CAAAA,CAAUC,CAAAA,mBAAoB,CAAA,OAC9B,CAAA,GACF,CAAA,CAAIR,CAAAA,CAEJ,CAAA,OACED,GAAC,CAAA,MAAA,CACE,CAAA,GAAGU,CACJ,CAAA,GAAKP,CAAAA,CACL,CAAA,SAAWQ,CAAAA,WAAY,CACrB,UAAAN,CAAAA,CACA,CAAA,OAAAG,CACF,CAAC,CAAA,CACD,CAAA,eAAe,CAAA,OAAOF,CAAAA,EAAW,QAAWA,CAAAA,CAASA,CAAAA,CAAAA,EAAQ,CAC7D,CAAA,eAAe,CAAA,OAAOA,CAAAA,EAAW,QAAWA,CAAAA,CAASA,CAAAA,CAAAA,EAAQ,CAC7D,CAAA,gBAAgBC,CAAAA,CAAAA,EAAa,IAC/B,CAEJ,CACAL,CAAAA,CAAM,CAAA,WAAc,CAAA,OACpBA,CAAAA,CAAM,CAAA,QAAWJ,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport { BadgeStyles, BadgeStylesDefaults } from './styles';\nimport type { BadgeProps, BadgeProviderProps } from './types';\n\nexport const BadgeContext =\n createContext<ContextValue<BadgeProps, HTMLSpanElement>>(null);\n\nfunction BadgeProvider({ children, ...props }: BadgeProviderProps) {\n return (\n <BadgeContext.Provider value={props}>{children}</BadgeContext.Provider>\n );\n}\nBadgeProvider.displayName = 'Badge.Provider';\n\nexport function Badge({ ref, ...props }: BadgeProps) {\n [props, ref] = useContextProps(props, ref ?? null, BadgeContext);\n\n const {\n className,\n offset,\n placement,\n variant = BadgeStylesDefaults.variant,\n ...rest\n } = props;\n\n return (\n <span\n {...rest}\n ref={ref}\n className={BadgeStyles({\n className,\n variant,\n })}\n data-offset-x={typeof offset === 'number' ? offset : offset?.x}\n data-offset-y={typeof offset === 'number' ? offset : offset?.y}\n data-placement={placement || null}\n />\n );\n}\nBadge.displayName = 'Badge';\nBadge.Provider = BadgeProvider;\n"]}
@@ -0,0 +1,32 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+
3
+ declare const BadgeStylesDefaults: {
4
+ readonly variant: "info";
5
+ };
6
+ declare const BadgeStyles: tailwind_variants.TVReturnType<{
7
+ variant: {
8
+ info: string;
9
+ advisory: string;
10
+ normal: string;
11
+ serious: string;
12
+ critical: string;
13
+ };
14
+ }, undefined, string[], {
15
+ variant: {
16
+ info: string;
17
+ advisory: string;
18
+ normal: string;
19
+ serious: string;
20
+ critical: string;
21
+ };
22
+ }, undefined, tailwind_variants.TVReturnType<{
23
+ variant: {
24
+ info: string;
25
+ advisory: string;
26
+ normal: string;
27
+ serious: string;
28
+ critical: string;
29
+ };
30
+ }, undefined, string[], unknown, unknown, undefined>>;
31
+
32
+ export { BadgeStyles, BadgeStylesDefaults };
@@ -0,0 +1,2 @@
1
+ import {tv}from'./../../lib/utils.js';var e={variant:"info"},l=tv({base:["group/badge fg-default-light inline-flex items-center justify-center rounded-full px-xs text-body-xs outline empty:size-s empty:px-none","[&[data-placement]]:absolute","placement-top:-translate-y-1/2 placement-top:top-[attr(data-offset-y_px,0px)]","placement-right:right-[attr(data-offset-x_px,0px)] placement-right:translate-x-1/2","placement-bottom:bottom-[attr(data-offset-y_px,0px)] placement-bottom:translate-y-1/2","placement-left:-translate-x-1/2 placement-left:left-[attr(data-offset-x_px,0px)]"],variants:{variant:{info:"bg-info-subtle outline-info-bold",advisory:"bg-advisory-subtle outline-advisory-bold",normal:"bg-normal-subtle outline-normal",serious:"bg-serious-subtle outline-serious",critical:"bg-critical-subtle outline-critical"}},defaultVariants:e});export{l as BadgeStyles,e as BadgeStylesDefaults};//# sourceMappingURL=styles.js.map
2
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/badge/styles.ts"],"names":["t"],"mappings":"sCAeE,IAAA,CAAA,CAAA,CAAA,OACF,CAAA,MAGE,CAAA,CAAA,CAAA,CAAAA,EAAM,CACJ,CAAA,IAAA,CAAA,CAAA,yIACA,CAAA,8GAEA,CAAA,oFACA,CAAA,uFACA,CAAA,4FAGA,CAAA,CAAA,OACQ,CAAA,CAAA,IAAA,CAAA,2CACI,CAAA,0CACV,CAAQ,MAAA,CAAA,iCACR,CAAA,2CACA,CAAA,QAAU,CAAA,qCAGd,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 BadgeStylesDefaults = {\n variant: 'info',\n} as const;\n\nexport const BadgeStyles = tv({\n base: [\n 'group/badge fg-default-light inline-flex items-center justify-center rounded-full px-xs text-body-xs outline empty:size-s empty:px-none',\n '[&[data-placement]]:absolute',\n 'placement-top:-translate-y-1/2 placement-top:top-[attr(data-offset-y_px,0px)]',\n 'placement-right:right-[attr(data-offset-x_px,0px)] placement-right:translate-x-1/2',\n 'placement-bottom:bottom-[attr(data-offset-y_px,0px)] placement-bottom:translate-y-1/2',\n 'placement-left:-translate-x-1/2 placement-left:left-[attr(data-offset-x_px,0px)]',\n ],\n variants: {\n variant: {\n info: 'bg-info-subtle outline-info-bold',\n advisory: 'bg-advisory-subtle outline-advisory-bold',\n normal: 'bg-normal-subtle outline-normal',\n serious: 'bg-serious-subtle outline-serious',\n critical: 'bg-critical-subtle outline-critical',\n },\n },\n defaultVariants: BadgeStylesDefaults,\n});\n"]}
@@ -0,0 +1,16 @@
1
+ import { Axis } from '@react-types/overlays';
2
+ import { RefAttributes, HTMLAttributes, PropsWithChildren } from 'react';
3
+ import { VariantProps } from 'tailwind-variants';
4
+ import { BadgeStyles } from './styles.js';
5
+
6
+ type BadgeProps = RefAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & VariantProps<typeof BadgeStyles> & {
7
+ children?: string;
8
+ offset?: number | {
9
+ x?: number;
10
+ y?: number;
11
+ };
12
+ placement?: Axis | `${'top' | 'bottom'} ${'left' | 'right'}`;
13
+ };
14
+ type BadgeProviderProps = PropsWithChildren<Omit<BadgeProps, 'children'>>;
15
+
16
+ export type { BadgeProps, BadgeProviderProps };
@@ -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'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
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 m=createContext(null);function c({children:t,...o}){return jsx(m.Provider,{value:o,children:t})}c.displayName="Button.Provider";function g({ref:t,...o}){[o,t]=useContextProps(o,t??null,m);let{children:r,className:i,color:u,size:n="medium",variant:l,...s}=o;return jsx(Icon.Provider,{size:n,children:jsx(Button,{...s,ref:t,className:composeRenderProps(i,a=>ButtonStyles({className:a,color:u,variant:l})),"data-size":n,children:r})})}g.displayName="Button";g.Provider=c;var p=createContext(null);function T({children:t,...o}){return jsx(p.Provider,{value:o,children:t})}T.displayName="LinkButton.Provider";function x({ref:t,...o}){[o,t]=useContextProps(o,t??null,p);let{children:r,className:i,color:u,size:n="medium",variant:l,...s}=o;return jsx(Icon.Provider,{size:n,children:jsx(Link,{...s,ref:t,className:composeRenderProps(i,a=>LinkButtonStyles({className:a,color:u,variant:l})),"data-size":n,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:n="medium",variant:l,...s}=o;return jsx(Icon.Provider,{size:n,children:jsx(ToggleButton,{...s,ref:t,className:composeRenderProps(i,a=>ToggleButtonStyles({className:a,color:u,variant:l})),"data-size":n,children:r})})}y.displayName="ToggleButton";y.Provider=k;export{g as Button,m as ButtonContext,x as LinkButton,p 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":["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,C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A,CAAA,IAAMC,CACnB,UAAAC,CAACgB,GAAAA,CAAAC,YACE,CAAA,CAAA,GACD,CAAA,CAAA,GAAKzB,CACL,WAAWW,CAAmBT,kBAAAA,CAAYA,GACxCwB,EAAmBC,kBACjB,CAAA,CAAA,SAAAzB,CACA,OAAAC,CACA,CAAA,CAAA,KACA,CAAA,CAAA,OACF,CAAC,CACH,CAAA,CAEC,CAAA,CAAA,QAAAP,CACH,EACF,CAEJ,CACAgC,EAAa,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"]}
1
+ {"version":3,"sources":["../../../src/components/button/index.tsx"],"names":["createContext","B","children","ButtonContext","props","ButtonProvider","ref","useContextProps","className","color","Icon","v","jsx","AriaButton","C","composeRenderProps","ButtonStyles","f","Button","LinkButtonContext","LinkButtonProvider","size","variant","Link","z","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,CAAgBH,eAAAA,CAAOE,CAAAA,CAAAA,CAAO,EAAA,IAAmB,CAAA,CAEhE,CAAA,CAAA,GACE,CAAA,QAAAJ,CACA,WAAAM,CACA,CAAA,CAAA,KAAAC,CACA,CAAA,CAAA,KAAO,CAAA,CAAA,QACP,CAAA,QACA,CAAA,CAAA,IACEL,CAAAA,CAEJ,CAAA,CAAA,OACGM,GAAAA,CAAKC,aAAS,CAAA,CAAA,KACb,CAAA,CAAA,QAAAC,CAACC,IAAAC,MACE,CAAA,CAAA,GACD,CAAA,CAAA,IACA,CAAA,CAAA,SAAWC,CAAmBP,mBAAYA,CAAAA,CAAAA,CACxCQ,EAAaC,YACX,CAAA,CAAA,SAAAT,CACA,CAAA,CAAA,KAAAC,CACA,SACF,CAAC,CACH,CAAA,CACA,CAAA,CAAA,YAEC,CAAA,CAAA,QAAAP,CACH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,CACA2B,CAAAA,CAAqB,aAAc,CAAA,uBAE5B,CAAA,SAAsB,CAAE,KAAAvB,CAAK,CAAA,CAAA,GAAS,CAAsB,CACjE,CAACF,CAAAA,CAAOE,CAAG,CAAA,CAAIC,CAAAA,CAAgBH,gBAAOE,CAAAA,CAAAA,CAAO,EAAA,IAAyB,CAAA,CAEtE,CAAA,CAAA,GACE,CAAA,QAAAJ,CACA,CAAA,CAAA,SAAAM,CACA,OAAAC,CACA,CAAA,CAAA,KAAO,CAAA,CAAA,QACP,CAAA,QACA,CAAA,CAAA,GACF,CAAIL,CAAAA,CAEJ,SACGM,GAAAA,CAAKC,aAAS,CAAA,CAAA,KACb,CAAA,CAAA,QAAAC,CAACkB,GAAAA,CAAAC,YACE,KACD,CAAA,CAAA,IACA,CAAA,CAAA,SAAWhB,CAAmBP,mBAAYA,CAAAA,CAAAA,CACxCwB,EAAmBC,kBACjB,CAAA,CAAA,UACA,CAAA,CAAA,KAAAxB,CACA,SACF,CAAC,CACH,CAAA,CACA,CAAA,CAAA,YAEC,CAAA,CAAA,QAAAP,CACH,EACF,CAEJ,CACAgC,EAAa,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 {\n children,\n className,\n color,\n size = 'medium',\n variant,\n ...rest\n } = 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 variant,\n }),\n )}\n data-size={size}\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 {\n children,\n className,\n color,\n size = 'medium',\n variant,\n ...rest\n } = 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 variant,\n }),\n )}\n data-size={size}\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 {\n children,\n className,\n color,\n size = 'medium',\n variant,\n ...rest\n } = 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 variant,\n }),\n )}\n data-size={size}\n >\n {children}\n </AriaToggleButton>\n </Icon.Provider>\n );\n}\nToggleButton.displayName = 'ToggleButton';\nToggleButton.Provider = ToggleButtonProvider;\n"]}