@accelint/design-toolkit 4.0.0 → 5.0.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.
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/accordion/styles.js +1 -1
- package/dist/components/accordion/styles.js.map +1 -1
- package/dist/components/accordion/types.d.ts +1 -1
- package/dist/components/action-bar/index.d.ts +10 -0
- package/dist/components/action-bar/index.js +2 -0
- package/dist/components/action-bar/index.js.map +1 -0
- package/dist/components/action-bar/styles.d.ts +5 -0
- package/dist/components/action-bar/styles.js +2 -0
- package/dist/components/action-bar/styles.js.map +1 -0
- package/dist/components/action-bar/types.d.ts +5 -0
- package/dist/components/action-bar/types.js +2 -0
- package/dist/components/action-bar/types.js.map +1 -0
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/avatar/styles.js +1 -1
- package/dist/components/avatar/styles.js.map +1 -1
- package/dist/components/avatar/types.d.ts +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/badge/styles.js +1 -1
- package/dist/components/badge/styles.js.map +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/styles.js +1 -1
- package/dist/components/button/styles.js.map +1 -1
- package/dist/components/button/types.d.ts +1 -1
- package/dist/components/checkbox/styles.js +1 -1
- package/dist/components/checkbox/styles.js.map +1 -1
- package/dist/components/chip/index.d.ts +1 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip/styles.js +1 -1
- package/dist/components/chip/styles.js.map +1 -1
- package/dist/components/classification-badge/index.d.ts +1 -1
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-badge/styles.js +1 -1
- package/dist/components/classification-badge/styles.js.map +1 -1
- package/dist/components/classification-banner/index.d.ts +1 -1
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/classification-banner/styles.js +1 -1
- package/dist/components/classification-banner/styles.js.map +1 -1
- package/dist/components/color-picker/styles.js +1 -1
- package/dist/components/color-picker/styles.js.map +1 -1
- package/dist/components/combobox-field/index.d.ts +1 -1
- package/dist/components/combobox-field/index.js.map +1 -1
- package/dist/components/combobox-field/styles.js +1 -1
- package/dist/components/combobox-field/styles.js.map +1 -1
- package/dist/components/combobox-field/types.d.ts +1 -1
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-field/styles.js +1 -1
- package/dist/components/date-field/styles.js.map +1 -1
- package/dist/components/details-list/index.d.ts +1 -1
- package/dist/components/details-list/index.js +1 -1
- package/dist/components/details-list/index.js.map +1 -1
- package/dist/components/details-list/styles.js +1 -1
- package/dist/components/details-list/styles.js.map +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/dialog/styles.js +1 -1
- package/dist/components/dialog/styles.js.map +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/drawer/styles.d.ts +2 -2
- package/dist/components/drawer/styles.js +1 -1
- package/dist/components/drawer/styles.js.map +1 -1
- package/dist/components/drawer/types.d.ts +1 -1
- package/dist/components/hero/index.js +1 -1
- package/dist/components/hero/index.js.map +1 -1
- package/dist/components/hero/styles.js +1 -1
- package/dist/components/hero/styles.js.map +1 -1
- package/dist/components/hotkey/index.d.ts +1 -1
- package/dist/components/hotkey/index.js.map +1 -1
- package/dist/components/hotkey/styles.js +1 -1
- package/dist/components/hotkey/styles.js.map +1 -1
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/styles.js +1 -1
- package/dist/components/input/styles.js.map +1 -1
- package/dist/components/label/index.d.ts +1 -1
- package/dist/components/label/index.js.map +1 -1
- package/dist/components/label/styles.js +1 -1
- package/dist/components/label/styles.js.map +1 -1
- package/dist/components/lines/index.d.ts +9 -0
- package/dist/components/lines/index.js +2 -0
- package/dist/components/lines/index.js.map +1 -0
- package/dist/components/lines/styles.d.ts +32 -0
- package/dist/components/lines/styles.js +2 -0
- package/dist/components/lines/styles.js.map +1 -0
- package/dist/components/lines/types.d.ts +10 -0
- package/dist/components/lines/types.js +2 -0
- package/dist/components/lines/types.js.map +1 -0
- package/dist/components/link/index.d.ts +17 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/link/index.js.map +1 -0
- package/dist/components/link/styles.d.ts +5 -0
- package/dist/components/link/styles.js +2 -0
- package/dist/components/link/styles.js.map +1 -0
- package/dist/components/link/types.d.ts +9 -0
- package/dist/components/link/types.js +2 -0
- package/dist/components/link/types.js.map +1 -0
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/menu/styles.js +1 -1
- package/dist/components/menu/styles.js.map +1 -1
- package/dist/components/options/index.js.map +1 -1
- package/dist/components/options/styles.js +1 -1
- package/dist/components/options/styles.js.map +1 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/popover/styles.js +1 -1
- package/dist/components/popover/styles.js.map +1 -1
- package/dist/components/query-builder/action-element.js.map +1 -1
- package/dist/components/query-builder/group.js +1 -1
- package/dist/components/query-builder/group.js.map +1 -1
- package/dist/components/query-builder/index.js +1 -1
- package/dist/components/query-builder/index.js.map +1 -1
- package/dist/components/query-builder/value-editor.js.map +1 -1
- package/dist/components/query-builder/value-selector.js.map +1 -1
- package/dist/components/radio/styles.js +1 -1
- package/dist/components/radio/styles.js.map +1 -1
- package/dist/components/search-field/index.d.ts +3 -3
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-field/styles.js +1 -1
- package/dist/components/search-field/styles.js.map +1 -1
- package/dist/components/select-field/index.d.ts +1 -1
- package/dist/components/select-field/index.js +1 -1
- package/dist/components/select-field/index.js.map +1 -1
- package/dist/components/select-field/styles.js +1 -1
- package/dist/components/select-field/styles.js.map +1 -1
- package/dist/components/select-field/types.d.ts +1 -1
- package/dist/components/sidenav/events.d.ts +8 -0
- package/dist/components/sidenav/events.js +2 -0
- package/dist/components/sidenav/events.js.map +1 -0
- package/dist/components/sidenav/index.d.ts +51 -0
- package/dist/components/sidenav/index.js +2 -0
- package/dist/components/sidenav/index.js.map +1 -0
- package/dist/components/sidenav/styles.d.ts +114 -0
- package/dist/components/sidenav/styles.js +2 -0
- package/dist/components/sidenav/styles.js.map +1 -0
- package/dist/components/sidenav/types.d.ts +38 -0
- package/dist/components/sidenav/types.js +2 -0
- package/dist/components/sidenav/types.js.map +1 -0
- package/dist/components/skeleton/styles.d.ts +2 -2
- package/dist/components/skeleton/styles.js +1 -1
- package/dist/components/skeleton/styles.js.map +1 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/slider/styles.js +1 -1
- package/dist/components/slider/styles.js.map +1 -1
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/styles.js +1 -1
- package/dist/components/switch/styles.js.map +1 -1
- package/dist/components/tabs/index.d.ts +37 -36
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tabs/styles.d.ts +48 -0
- package/dist/components/tabs/styles.js +2 -0
- package/dist/components/tabs/styles.js.map +1 -0
- package/dist/components/tabs/types.d.ts +6 -0
- package/dist/components/tabs/types.js +2 -0
- package/dist/components/tabs/types.js.map +1 -0
- package/dist/components/text-area-field/index.d.ts +1 -1
- package/dist/components/text-area-field/index.js.map +1 -1
- package/dist/components/text-area-field/styles.js +1 -1
- package/dist/components/text-area-field/styles.js.map +1 -1
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/text-field/styles.js +1 -1
- package/dist/components/text-field/styles.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tooltip/styles.d.ts +1 -1
- package/dist/components/tooltip/styles.js +1 -1
- package/dist/components/tooltip/styles.js.map +1 -1
- package/dist/components/tooltip/types.d.ts +3 -1
- package/dist/components/tree/index.d.ts +51 -0
- package/dist/components/tree/index.js +2 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/components/tree/styles.d.ts +128 -0
- package/dist/components/tree/styles.js +2 -0
- package/dist/components/tree/styles.js.map +1 -0
- package/dist/components/tree/types.d.ts +41 -0
- package/dist/components/tree/types.js +2 -0
- package/dist/components/tree/types.js.map +1 -0
- package/dist/components/view-stack/index.js.map +1 -1
- package/dist/foundation/token-data.d.ts +17 -0
- package/dist/foundation/token-data.js +2 -0
- package/dist/foundation/token-data.js.map +1 -0
- package/dist/hooks/use-tree/actions/cache.d.ts +78 -0
- package/dist/hooks/use-tree/actions/cache.js +2 -0
- package/dist/hooks/use-tree/actions/cache.js.map +1 -0
- package/dist/hooks/use-tree/actions/index.d.ts +38 -0
- package/dist/hooks/use-tree/actions/index.js +2 -0
- package/dist/hooks/use-tree/actions/index.js.map +1 -0
- package/dist/hooks/use-tree/state/index.d.ts +8 -0
- package/dist/hooks/use-tree/state/index.js +2 -0
- package/dist/hooks/use-tree/state/index.js.map +1 -0
- package/dist/hooks/use-tree/state/utils.d.ts +7 -0
- package/dist/hooks/use-tree/state/utils.js +2 -0
- package/dist/hooks/use-tree/state/utils.js.map +1 -0
- package/dist/hooks/use-tree/types.d.ts +171 -0
- package/dist/hooks/use-tree/types.js +2 -0
- package/dist/hooks/use-tree/types.js.map +1 -0
- package/dist/icons/catalog.js +1 -1
- package/dist/icons/catalog.js.map +1 -1
- package/dist/index.css +9 -15
- package/dist/index.d.ts +26 -3
- package/dist/index.js +1 -1
- package/dist/lib/react.d.ts +22 -8
- package/dist/lib/react.js +8 -4
- package/dist/lib/react.js.map +1 -1
- package/dist/lib/utils.d.ts +2 -2
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/providers/theme-provider.d.ts +22 -0
- package/dist/providers/theme-provider.js +2 -0
- package/dist/providers/theme-provider.js.map +1 -0
- package/dist/styles.css +1606 -904
- package/dist/tokens/themes.css +729 -53
- package/dist/tokens/tokens.css +121 -65
- package/dist/tokens/tokens.d.ts +449 -1
- package/dist/tokens/tokens.js +2 -0
- package/dist/tokens/tokens.js.map +1 -0
- package/dist/tokens/types.d.ts +299 -0
- package/dist/tokens/types.js +2 -0
- package/dist/tokens/types.js.map +1 -0
- package/dist/variants/variants.css +6 -1
- package/package.json +10 -6
- package/dist/tokens/index.d.ts +0 -123
- package/dist/tokens/index.js +0 -2
- package/dist/tokens/index.js.map +0 -1
|
@@ -2,8 +2,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
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
|
-
import '../../lib/types.js';
|
|
6
5
|
import 'tailwind-variants';
|
|
6
|
+
import '../../lib/types.js';
|
|
7
7
|
import './styles.js';
|
|
8
8
|
|
|
9
9
|
declare const AccordionContext: react.Context<ContextValue<AccordionProps, HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {Kebab,ChevronDown}from'@accelint/icons';import {createContext,useContext}from'react';import {useContextProps,Disclosure,composeRenderProps,DisclosureGroup,Provider,Header,Heading,DisclosurePanel}from'react-aria-components';import {isSlottedContextValue}from'./../../lib/utils.js';import {ButtonContext,Button}from'../button/index.js';import {IconContext,Icon}from'../icon/index.js';import {AccordionStyles,AccordionStylesDefaults}from'./styles.js';const {group:z,accordion:E,header:K,heading:L,trigger:M,panel:R}=AccordionStyles(),a=createContext(null);function P({ref:i,children:e,className:c,variant:o=AccordionStylesDefaults.variant,isDisabled:n,...t}){return jsx(a.Provider,{value:{variant:o,isDisabled:n},children:jsx(DisclosureGroup,{...t,ref:i,className:composeRenderProps(c,u=>z({className:u,variant:o})),children:e})})}P.displayName="Accordion.Group";function f({ref:i,children:e,className:c}){const o=useContext(a),n=(isSlottedContextValue(o)?void 0:o?.variant)??AccordionStylesDefaults.variant,t=(isSlottedContextValue(o)?void 0:o?.isDisabled)??false;return jsx(Provider,{values:[[IconContext,{size:n==="compact"?"small":"large"}],[ButtonContext,{children:jsx(Icon,{children:jsx(Kebab,{})}),variant:"icon",isDisabled:t}]],children:jsx(Header,{ref:i,className:K({className:c,variant:n}),children:e})})}f.displayName="Accordion.Header";function g({ref:i,children:e,classNames:c}){const o=useContext(a),n=(isSlottedContextValue(o)?void 0:o?.variant)??AccordionStylesDefaults.variant;return jsx(Heading,{ref:i,className:L({className:c?.heading,variant:n}),children:jsxs(Button,{slot:"trigger",className:composeRenderProps(c?.trigger,t=>M({className:t,variant:n})),variant:"flat",children:[jsx(Icon,{children:jsx(ChevronDown,{className:"transform group-expanded/accordion:rotate-180"})}),e]})})}g.displayName="Accordion.Trigger";function v({ref:i,children:e,className:c,...o}){return jsx(DisclosurePanel,{...o,ref:i,className:composeRenderProps(c,n=>R({className:n})),children:e})}v.displayName="Accordion.Panel";function s({ref:i,...e}){[e,i]=useContextProps(e,i??null,a);const{children:c,className:o,variant:n=AccordionStylesDefaults.variant,isDisabled:t,...u}=e;return jsx(a.Provider,{value:{variant:n,isDisabled:t},children:jsx(Disclosure,{...u,className:composeRenderProps(o,x=>E({className:x})),isDisabled:t,children:c})})}s.displayName="Accordion",s.Group=P,s.Header=f,s.Trigger=g,s.Panel=v;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":["AccordionContext","AccordionGroup","ref","w","C","children","variant","AccordionStylesDefaults","isDisabled","l","r","jsx","rest","group","H","className","d","context","useContext","isSlottedContextValue","p","T","V","ButtonContext","Icon","S","A","Header","header","b","Heading","classNames","Button","B","ChevronDown","D","composeRenderProps","panel","G","AccordionPanel","props","I","y","Accordion"],"mappings":"ihBAuC2C,CAAA,CAAA,CAAA,SAAS,CAAA,CAAA,CAAA,MAA0B,CAAA,CAEjEA,CAAAA,OACqD,CAAA,CAElE,CAAA,OAAA,CAASC,EAAe,KACtBC,CAAAA,CACA,CAAA,CAAAC,eAAA,EAAA,CAAA,CAAA,CAAAC,aAAAC,CAAAA,IACA,EAAA,SACA,CAAA,CAAA,CAAA,GAAAC,CAAAA,CAAUC,CAAAA,QAAwB,CAClC,CAAA,CAAA,SAAAC,CAAAA,CACA,QAEA,CAAA,CAAA,CAAAC,uBAAA,CAAA,kBAC6B,CAAA,CAAA,CAAO,GAAE,CAAA,CAAA,CAAA,CAAA,OAASC,GAAA,CAAA,CAAA,CAAA,QAC3C,CAAA,CAAA,KAAA,CAAAC,QACMC,CAAAA,CACJ,CAAA,UACA,CAAA,CAAA,CAAA,CAAA,QACEC,CAAAA,GAAM,CACJC,eAAA,CAAA,CAAA,GAAA,CAAA,CAAA,GAAAC,CACA,CAAA,CAAA,SAEJ,CAAAC,kBAEC,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAAX,SAKM,CAAA,CAAA,CAAA,OAAA,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAE7B,CAAA,CAAA,CAAA,CAAA,YAA2BH,iBAAe,CAAA,SACxC,CAAA,CAAA,CAAA,GAAMe,CAAAA,CAAUC,CAAAA,SAESD,CAAO,CAAA,SAAgBA,CAAAA,CAAS,CAAA,CAAA,CAAA,MAAA,CACvDV,CAAAA,UAAwB,4BACpBC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,GACD,CACH,CAAA,SACA,CAAA1B,kBAAA,CAAYR,EAEX,CAAA,EAAA,CAAA,CAAA,CAAA,SAKTmC,CAAAA,CAAU,cAAc,CAAA,CAAA,CAAA,QACxBA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ1C,CAAAA,CAClB0C,WACAA,CAAAA,WACAA,CAAAA,CAAU,CAAA,KAAQJ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,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'use client';\n\nimport 'client-only';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport { ChevronDown, Kebab } from '@accelint/icons';\nimport { createContext, useContext } from 'react';\nimport {\n type ContextValue,\n Disclosure,\n DisclosureGroup,\n DisclosurePanel,\n Header,\n Heading,\n Provider,\n composeRenderProps,\n useContextProps,\n} from 'react-aria-components';\nimport { Button, ButtonContext } from '../button';\nimport { Icon, IconContext } 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 const isDisabled =\n (isSlottedContextValue(context) ? undefined : context?.isDisabled) ?? false;\n\n return (\n <Provider\n values={[\n [IconContext, { size: variant === 'compact' ? 'small' : 'large' }],\n [\n ButtonContext,\n {\n children: (\n <Icon>\n <Kebab />\n </Icon>\n ),\n variant: 'icon',\n isDisabled,\n },\n ],\n ]}\n >\n <Header\n ref={ref}\n className={header({\n className,\n variant,\n })}\n >\n {children}\n </Header>\n </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 variant='flat'\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\n/**\n * Accordion - A collapsible content component with expandable sections\n *\n * Provides an accessible accordion interface for organizing content into\n * collapsible sections. Supports both compact and full variants with\n * integrated controls for expanding/collapsing content areas.\n *\n * @example\n * // Basic accordion\n * <Accordion>\n * <Accordion.Header>\n * <Accordion.Trigger>Section Title</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>Content goes here</Accordion.Panel>\n * </Accordion>\n *\n * @example\n * // Compact variant\n * <Accordion variant=\"compact\">\n * <Accordion.Header>\n * <Accordion.Trigger>Compact Section</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>Compact content</Accordion.Panel>\n * </Accordion>\n *\n * @example\n * // Multiple accordions in a group\n * <Accordion.Group>\n * <Accordion>\n * <Accordion.Header>\n * <Accordion.Trigger>First Section</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>First content</Accordion.Panel>\n * </Accordion>\n * <Accordion>\n * <Accordion.Header>\n * <Accordion.Trigger>Second Section</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>Second content</Accordion.Panel>\n * </Accordion>\n * </Accordion.Group>\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":["AccordionContext","AccordionGroup","ref","w","C","children","variant","AccordionStylesDefaults","isDisabled","l","r","jsx","rest","group","H","className","d","context","useContext","isSlottedContextValue","p","T","V","ButtonContext","Icon","S","A","Header","header","b","Heading","classNames","Button","B","ChevronDown","D","composeRenderProps","panel","G","AccordionPanel","props","I","y","Accordion"],"mappings":"ihBAuC2C,CAAA,CAAA,CAAA,SAAS,CAAA,CAAA,CAAA,MAA0B,CAAA,CAEjEA,CAAAA,OACqD,CAAA,CAElE,CAAA,OAAA,CAASC,EAAe,KACtBC,CAAAA,CACA,CAAA,CAAAC,eAAA,EAAA,CAAA,CAAA,CAAAC,aAAAC,CAAAA,IACA,EAAA,SACA,CAAA,CAAA,CAAA,GAAAC,CAAAA,CAAUC,CAAAA,QAAwB,CAClC,CAAA,CAAA,SAAAC,CAAAA,CACA,QAEA,CAAA,CAAA,CAAAC,uBAAA,CAAA,kBAC6B,CAAA,CAAA,CAAO,GAAE,CAAA,CAAA,CAAA,CAAA,OAASC,GAAA,CAAA,CAAA,CAAA,QAC3C,CAAA,CAAA,KAAA,CAAAC,QACMC,CAAAA,CACJ,CAAA,UACA,CAAA,CAAA,CAAA,CAAA,QACEC,CAAAA,GAAM,CACJC,eAAA,CAAA,CAAA,GAAA,CAAA,CAAA,GAAAC,CACA,CAAA,CAAA,SAEJ,CAAAC,kBAEC,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAAX,SAKM,CAAA,CAAA,CAAA,OAAA,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAE7B,CAAA,CAAA,CAAA,CAAA,YAA2BH,iBAAe,CAAA,SACxC,CAAA,CAAA,CAAA,GAAMe,CAAAA,CAAUC,CAAAA,SAESD,CAAO,CAAA,SAAgBA,CAAAA,CAAS,CAAA,CAAA,CAAA,MAAA,CACvDV,CAAAA,UAAwB,4BACpBC,CAAAA,CAAAA,CACHW,CAAAA,MAAiC,CAAA,CAAA,EAAA,OAAqB,GAAAV,uBAAA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CAAA,SAKTmC,CAAAA,CAAU,cAAc,CAAA,CAAA,CAAA,QACxBA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ1C,CAAAA,CAClB0C,WACAA,CAAAA,WACAA,CAAAA,CAAU,CAAA,KAAQJ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,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'use client';\n\nimport 'client-only';\nimport { ChevronDown, Kebab } from '@accelint/icons';\nimport { createContext, useContext } from 'react';\nimport {\n type ContextValue,\n composeRenderProps,\n Disclosure,\n DisclosureGroup,\n DisclosurePanel,\n Header,\n Heading,\n Provider,\n useContextProps,\n} from 'react-aria-components';\nimport { isSlottedContextValue } from '@/lib/utils';\nimport { Button, ButtonContext } from '../button';\nimport { Icon, IconContext } 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 const isDisabled =\n (isSlottedContextValue(context) ? undefined : context?.isDisabled) ?? false;\n\n return (\n <Provider\n values={[\n [IconContext, { size: variant === 'compact' ? 'small' : 'large' }],\n [\n ButtonContext,\n {\n children: (\n <Icon>\n <Kebab />\n </Icon>\n ),\n variant: 'icon',\n isDisabled,\n },\n ],\n ]}\n >\n <Header\n ref={ref}\n className={header({\n className,\n variant,\n })}\n >\n {children}\n </Header>\n </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 variant='flat'\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\n/**\n * Accordion - A collapsible content component with expandable sections\n *\n * Provides an accessible accordion interface for organizing content into\n * collapsible sections. Supports both compact and full variants with\n * integrated controls for expanding/collapsing content areas.\n *\n * @example\n * // Basic accordion\n * <Accordion>\n * <Accordion.Header>\n * <Accordion.Trigger>Section Title</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>Content goes here</Accordion.Panel>\n * </Accordion>\n *\n * @example\n * // Compact variant\n * <Accordion variant=\"compact\">\n * <Accordion.Header>\n * <Accordion.Trigger>Compact Section</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>Compact content</Accordion.Panel>\n * </Accordion>\n *\n * @example\n * // Multiple accordions in a group\n * <Accordion.Group>\n * <Accordion>\n * <Accordion.Header>\n * <Accordion.Trigger>First Section</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>First content</Accordion.Panel>\n * </Accordion>\n * <Accordion>\n * <Accordion.Header>\n * <Accordion.Trigger>Second Section</Accordion.Trigger>\n * </Accordion.Header>\n * <Accordion.Panel>Second content</Accordion.Panel>\n * </Accordion>\n * </Accordion.Group>\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';const o={variant:"cozy"},t=tv({slots:{group:"group/accordion-group flex w-full flex-col",accordion:"group/accordion flex w-full flex-col bg-transparent",header:["fg-
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const o={variant:"cozy"},t=tv({slots:{group:"group/accordion-group flex w-full flex-col",accordion:"group/accordion flex w-full flex-col bg-transparent",header:["fg-primary-bold flex w-full items-center gap-s rounded-medium px-s py-xs outline-none","group-enabled/accordion:focus-visible-within:bg-interactive-muted-hover group-enabled/accordion:hover:bg-interactive-muted-hover","group-disabled/accordion:fg-disabled group-disabled/accordion:cursor-not-allowed"],heading:"grow",trigger:["flex w-full cursor-pointer items-center justify-start size-medium:px-0 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{t 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":["AccordionStyles","tv","e"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAkBC,MAC7B,CAAA,CAAA,CAAO,CACLC,EAAA,CAAA,CAAA,KAAO,CAAA,CAAA,KAAA,CAAA,4CACP,CAAW,SAAA,CAAA,qDAET,CAAA,MAAA,CAAA,CAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/accordion/styles.ts"],"names":["AccordionStyles","tv","e"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAkBC,MAC7B,CAAA,CAAA,CAAO,CACLC,EAAA,CAAA,CAAA,KAAO,CAAA,CAAA,KAAA,CAAA,4CACP,CAAW,SAAA,CAAA,qDAET,CAAA,MAAA,CAAA,CAAA,uFACA,CAAA,kIACA,CAAA,kFAEO,SACT,CAAA,MACE,CAAA,OAAA,CAAA,CAAA,oGAEK,CAAA,CAAA,KAET,CAAA,KAAA,CAAU,CACR,QAAS,CACP,CAAA,aACW,CAAA,CAAA,OAAA,CAAA,qBAEF,CACP,CAAA,OAAS,CAAA,CAAA,OAAA,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';\n\nexport const AccordionStylesDefaults = {\n variant: 'cozy',\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-primary-bold flex w-full items-center gap-s rounded-medium px-s py-xs outline-none',\n 'group-enabled/accordion:focus-visible-within:bg-interactive-muted-hover group-enabled/accordion:hover:bg-interactive-muted-hover',\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 justify-start size-medium:px-0 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"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RenderPropsClassName } from '../../lib/types.js';
|
|
2
1
|
import { RefAttributes, ComponentPropsWithRef } from 'react';
|
|
3
2
|
import { DisclosureProps, DisclosureGroupProps, Heading, ButtonRenderProps, DisclosurePanelProps } from 'react-aria-components';
|
|
4
3
|
import { VariantProps } from 'tailwind-variants';
|
|
4
|
+
import { RenderPropsClassName } from '../../lib/types.js';
|
|
5
5
|
import { AccordionStyles } from './styles.js';
|
|
6
6
|
|
|
7
7
|
type AccordionStyleVariants = VariantProps<typeof AccordionStyles>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ActionBarProps } from './types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
declare function ActionBar({ className, ...rest }: ActionBarProps): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare namespace ActionBar {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ActionBar };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import'client-only';import {Provider}from'react-aria-components';import {ButtonContext,ToggleButtonContext}from'../button/index.js';import {ActionBarStyles}from'./styles.js';function p({className:t,...r}){return jsx(Provider,{values:[[ButtonContext,{variant:"icon"}],[ToggleButtonContext,{variant:"icon"}]],children:jsx("nav",{...r,className:ActionBarStyles({className:t})})})}p.displayName="ActionBar";export{p as ActionBar};//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/action-bar/index.tsx"],"names":["className","jsx","ButtonContext","i","n","a","rest","o","e"],"mappings":"kNAmB4B,SAAAA,CAAW,CAAA,CAAA,SACrC,CAAA,CAAA,CACEC,IAAC,CACC,CAAA,CAAA,OACGC,GAAAA,CAAeC,QAAE,CAAA,CAAA,MAAS,CAAA,CAAA,CAAAC,aAAA,CAAA,CAAO,OACV,CAAA,MAAA,CAAS,CAAA,CAAA,CAAAC,mBAAA,CAAA,CAAO,OAG1C,CAAA,MAAAJ,CAAC,CAAA,CAAA,CAAA,QAAQK,CAAMC,GAAA,CAAA,KAAA,CAAA,CAAA,GAA2B,CAAE,CAAA,SAAAP,CAAUQ,eAAC,CAAA,CAAG,SAItD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,WAAA","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 { Provider } from 'react-aria-components';\nimport { ButtonContext, ToggleButtonContext } from '../button';\nimport { ActionBarStyles } from './styles';\nimport type { ActionBarProps } from './types';\n\nexport function ActionBar({ className, ...rest }: ActionBarProps) {\n return (\n <Provider\n values={[\n [ButtonContext, { variant: 'icon' }],\n [ToggleButtonContext, { variant: 'icon' }],\n ]}\n >\n <nav {...rest} className={ActionBarStyles({ className })} />\n </Provider>\n );\n}\nActionBar.displayName = 'ActionBar';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
|
|
3
|
+
declare const ActionBarStyles: tailwind_variants.TVReturnType<{} | {} | {}, undefined, "flex w-fit gap-s rounded-medium bg-surface-default px-m py-s shadow-elevation-overlay", {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, "flex w-fit gap-s rounded-medium bg-surface-default px-m py-s shadow-elevation-overlay", unknown, unknown, undefined>>;
|
|
4
|
+
|
|
5
|
+
export { ActionBarStyles };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/action-bar/styles.ts"],"names":["ActionBarStyles","tv"],"mappings":"mCAcO,MAAMA,EAAkBC,EAAAA,CAAG,CAChC,IAAA,CAAM,uFACR,CAAC","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from 'tailwind-variants';\n\nexport const ActionBarStyles = tv({\n base: 'flex w-fit gap-s rounded-medium bg-surface-default px-m py-s shadow-elevation-overlay',\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ProviderProps } from '../../lib/types.js';
|
|
4
3
|
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import { ProviderProps } from '../../lib/types.js';
|
|
5
5
|
import { AvatarProps } from './types.js';
|
|
6
6
|
import '@radix-ui/react-avatar';
|
|
7
7
|
import 'tailwind-variants';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {jsx,jsxs}from'react/jsx-runtime';import'client-only';import {
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import'client-only';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 {designTokens}from'./../../tokens/tokens.js';import {Badge}from'../badge/index.js';import {Icon}from'../icon/index.js';import {AvatarStyles}from'./styles.js';const {avatar:b,image:k,fallback:C,content:I}=AvatarStyles(),i=createContext(null);function l({children:e,...o}){return jsx(i.Provider,{value:o,children:e})}l.displayName="Avatar.Provider";function n({ref:e,...o}){[o,e]=useContextProps(o,e??null,i);const{children:p,classNames:t,fallbackProps:s,imageProps:c,size:r="medium",...v}=o;return jsx(Icon.Provider,{size:r==="medium"?"large":"medium",children:jsxs(Root,{...v,ref:e,className:b({size:r,className:t?.avatar}),role:"img","data-size":r,children:[jsx(Image,{...c,className:k({className:t?.image,size:r})}),jsx(Fallback,{...s,className:C({className:t?.fallback,size:r}),children:s?.children||jsx(Icon,{children:jsx(Person,{})})}),jsx(Badge.Provider,{offset:designTokens.spacing.xs,placement:"top right",children:jsx("span",{className:I({className:t?.content,size:r}),children:p})})]})})}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":["AvatarStyles","
|
|
1
|
+
{"version":3,"sources":["../../../src/components/avatar/index.tsx"],"names":["AvatarStyles","AvatarContext","AvatarProvider","y","children","props","a","ref","A","size","rest","jsx","Icon","m","u","classNames","Image","imageProps","f","Fallback","P","designTokens","x","N","Avatar"],"mappings":"sZAyBiC,MAAA,CAAA,MAAYA,CAAa,CAAA,CAE7CC,KAC+C,CAAA,CAAA,CAAI,QAEhE,CAAA,CAAA,CAASC,OAAiB,CAAA,CAAA,CAAA,CAAAC,YAAAC,EAAU,CAAA,CAAA,CAAGC,aAAM,CAAA,IAC3C,EAAA,SACiB,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,CAAOA,GAAQ,CAAA,CAAA,CAAA,CAAA,OAE3CC,GACAJ,CAAAA,CAAe,CAAA,QAAA,CAAA,CAAA,KAAc,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CA+BtB,CAAA,CAAA,CAAA,CAAA,YAAkBK,iBACQF,CAAAA,SAAoBJ,CAAa,CAAA,CAEhE,GAAA,CAAA,CAAM,CACJ,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAG,CAAAA,CACA,CAAA,CAAAI,eAAA,CAAA,CAAA,CAAA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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAWtB,CAAAA,CAAAA,WAAAA,CAAAA,QAAAA,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\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 { designTokens } from '@/tokens/tokens';\nimport { Badge } from '../badge';\nimport { Icon } from '../icon';\nimport { AvatarStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { AvatarProps } from './types';\n\nconst { avatar, image, fallback, content } = AvatarStyles();\n\nexport const AvatarContext =\n createContext<ContextValue<AvatarProps, HTMLSpanElement>>(null);\n\nfunction AvatarProvider({ children, ...props }: ProviderProps<AvatarProps>) {\n return (\n <AvatarContext.Provider value={props}>{children}</AvatarContext.Provider>\n );\n}\nAvatarProvider.displayName = 'Avatar.Provider';\n\n/**\n * Avatar - A user profile image component with fallback support\n *\n * Displays a user's profile image with automatic fallback to a default person icon\n * when the image fails to load. Supports multiple sizes and can include status badges.\n * Built on Radix UI Avatar for accessibility and reliability.\n *\n * @example\n * // Basic avatar with image\n * <Avatar imageProps={{ src: \"/user.jpg\", alt: \"User Name\" }} />\n *\n * @example\n * // Avatar with fallback and custom size\n * <Avatar\n * size=\"large\"\n * imageProps={{ src: \"/user.jpg\", alt: \"User Name\" }}\n * fallbackProps={{ children: \"UN\" }}\n * />\n *\n * @example\n * // Avatar with status badge\n * <Avatar imageProps={{ src: \"/user.jpg\", alt: \"User Name\" }}>\n * <Badge variant=\"success\" />\n * </Avatar>\n *\n * @example\n * // Avatar with only initials fallback\n * <Avatar fallbackProps={{ children: \"JD\" }} />\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 ref={ref}\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={designTokens.spacing.xs} 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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {tv}from'./../../lib/utils.js';const r=tv({slots:{avatar:["group/avatar grid [grid-template-areas:'content'] rounded-full bg-surface-overlay fg-
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const r=tv({slots:{avatar:["group/avatar grid [grid-template-areas:'content'] rounded-full bg-surface-overlay fg-primary-muted","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
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/avatar/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KACE,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/avatar/styles.ts"],"names":["e"],"mappings":"sCAeE,MAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KACE,8GACA,CAAA,mDACA,CAAA,8CAGA,CAAA,CAAA,KAAA,CAAA,uFACQ,CAAA,QAAA,CAAA,gEAER,CAAA,OAAA,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-primary-muted`,\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"]}
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'tailwind-variants';
|
|
|
4
4
|
import { AvatarStyles } from './styles.js';
|
|
5
5
|
import 'tailwind-merge';
|
|
6
6
|
|
|
7
|
-
type AvatarProps = Omit<ComponentPropsWithRef<'span'>, 'className'> & Omit<ComponentPropsWithRef<typeof Avatar>, 'className'> & VariantProps<typeof AvatarStyles> & {
|
|
7
|
+
type AvatarProps = Omit<ComponentPropsWithRef<'span'>, 'className'> & Omit<ComponentPropsWithRef<typeof Avatar>, 'className' | 'asChild'> & VariantProps<typeof AvatarStyles> & {
|
|
8
8
|
classNames?: {
|
|
9
9
|
avatar?: string;
|
|
10
10
|
image?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ProviderProps } from '../../lib/types.js';
|
|
4
3
|
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import { ProviderProps } from '../../lib/types.js';
|
|
5
5
|
import { BadgeProps } from './types.js';
|
|
6
6
|
import '@react-types/overlays';
|
|
7
7
|
import 'tailwind-variants';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/badge/index.tsx"],"names":["createContext","m","props","d","BadgeProvider","ref","useContextProps","BadgeStylesDefaults","P","rest","offset","Badge"],"mappings":"wMAqBEA,MAAyD,CAAA,CAAAC,aAAA,CAAI,IAE/D,EAAA,SAAyB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAGC,CAAM,GAC1C,CAAA,CAAA,CAAA,CAAA,OACgBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,QAE1C,CACAC,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,gBA0BrB,CAAA,SAAiB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACpC,CAACA,CAAAA,CAAOG,CAAG,CAAA,CAAIC,CAAAA,CAAgBJ,EAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,CAAA,CAAA,CAAA,CAAA,KACE,CAAA,SACA,CAAA,CAAA,CAAA,MACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,OAAUE,CAAoB,CAAA,CAAAC,mBAAA,CAAA,OAC3BC,CACL,GAAIP,CAEJ,CAAA,CAAA,CAAA,CAAA,OACGC,GAAA,CAAA,MACE,CAAGM,CAAAA,GACJ,CAAA,CAAKJ,GACL,CAAA,CAAA,CAAA,SACE,uBACA,CAAA,CAAA,CAAA,OACD,CACD,CAAA,CAAA,CAAA,CAAA,eAAe,CAAA,OAAkB,CAAA,EAAA,QAAoBK,CAAAA,CAAQ,CAAA,CAC7D,EAAA,CAAA,CAAA,eAAe,CAAA,OAAkB,CAAA,EAAA,QAAoBA,CAAAA,CAAQ,CAAA,CAC7D,EAAA,CAAA,CAAA,gBAA6B,CAAA,CAAA,EAAA,IAInCC,CAAM,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,OACd,CAAA,CAAA,CAAA,QAAWP,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
|
|
1
|
+
{"version":3,"sources":["../../../src/components/badge/index.tsx"],"names":["createContext","m","props","d","BadgeProvider","ref","useContextProps","BadgeStylesDefaults","P","rest","offset","Badge"],"mappings":"wMAqBEA,MAAyD,CAAA,CAAAC,aAAA,CAAI,IAE/D,EAAA,SAAyB,CAAA,CAAA,CAAA,QAAU,CAAA,CAAGC,CAAM,GAC1C,CAAA,CAAA,CAAA,CAAA,OACgBC,GAAA,CAAA,CAAA,CAAA,QAAS,CAAA,CAAA,KAAe,CAAA,CAAA,CAAA,QAE1C,CACAC,CAAAA,CAAc,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,gBA0BrB,CAAA,SAAiB,CAAA,CAAA,CAAAC,GAAK,CAAA,CAAGH,CAAM,GACpC,CAACA,CAAAA,CAAOG,CAAG,CAAA,CAAIC,CAAAA,CAAgBJ,EAAOG,eAAAA,CAAAA,CAAO,CAAA,CAAA,EAAA,IAE7C,CAAA,CAAA,CAAA,CAAA,KACE,CAAA,SACA,CAAA,CAAA,CAAA,MACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,OAAUE,CAAoB,CAAA,CAAAC,mBAAA,CAAA,OAC3BC,CACL,GAAIP,CAEJ,CAAA,CAAA,CAAA,CAAA,OACGC,GAAA,CAAA,MACE,CAAGM,CAAAA,GACJ,CAAA,CAAKJ,GACL,CAAA,CAAA,CAAA,SACE,uBACA,CAAA,CAAA,CAAA,OACD,CACD,CAAA,CAAA,CAAA,CAAA,eAAe,CAAA,OAAkB,CAAA,EAAA,QAAoBK,CAAAA,CAAQ,CAAA,CAC7D,EAAA,CAAA,CAAA,eAAe,CAAA,OAAkB,CAAA,EAAA,QAAoBA,CAAAA,CAAQ,CAAA,CAC7D,EAAA,CAAA,CAAA,gBAA6B,CAAA,CAAA,EAAA,IAInCC,CAAM,CAAA,CAAA,CAAA,CAAA,WAAc,CAAA,OACd,CAAA,CAAA,CAAA,QAAWP,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 { ProviderProps } from '@/lib/types';\nimport type { BadgeProps } from './types';\n\nexport const BadgeContext =\n createContext<ContextValue<BadgeProps, HTMLSpanElement>>(null);\n\nfunction BadgeProvider({ children, ...props }: ProviderProps<BadgeProps>) {\n return (\n <BadgeContext.Provider value={props}>{children}</BadgeContext.Provider>\n );\n}\nBadgeProvider.displayName = 'Badge.Provider';\n\n/**\n * Badge - A small status indicator component for labeling and notifications\n *\n * Displays contextual information like status, counts, or labels. Supports various\n * visual variants and can be positioned relative to other elements. Useful for\n * indicating notifications, statuses, or providing supplementary information.\n *\n * @example\n * // Basic badge\n * <Badge>New</Badge>\n *\n * @example\n * // Status badges with different variants\n * <Badge variant=\"success\">Active</Badge>\n * <Badge variant=\"warning\">Pending</Badge>\n * <Badge variant=\"serious\">Error</Badge>\n *\n * @example\n * // Positioned badge (typically used with other components)\n * <div className=\"relative\">\n * <Button>Messages</Button>\n * <Badge placement='top right' offset={-spacingS}>3</Badge>\n * </div>\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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {tv}from'./../../lib/utils.js';const e={variant:"info"},
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const e={variant:"info"},o=tv({base:["group/badge fg-primary-bold 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-muted outline-info-bold",advisory:"bg-advisory-muted outline-advisory-bold",normal:"bg-normal-muted outline-normal-bold",serious:"bg-serious-muted outline-serious-bold",critical:"bg-critical-muted outline-critical-bold"}},defaultVariants:e});export{o as BadgeStyles,e as BadgeStylesDefaults};//# sourceMappingURL=styles.js.map
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/badge/styles.ts"],"names":["BadgeStyles","tv","t"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAcC,MACzB,CAAA,CAAM,CACJ,CAAAC,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/badge/styles.ts"],"names":["BadgeStyles","tv","t"],"mappings":"sCAeE,MAAA,CAAS,CAAA,CAAA,OAGEA,CAAcC,MACzB,CAAA,CAAM,CACJ,CAAAC,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,wIACA,CAAA,8GAEA,CAAA,oFACA,CAAA,uFACA,CAAA,mFAEQ,CACR,QAAS,CACP,CAAA,OAAM,CAAA,CAAA,IAAA,CAAA,iCACI,CAAA,QAAA,CAAA,yCACF,CAAA,MAAA,CAAA,qFAEE,CAAA,QAAA,CAAA,yCAGd,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-primary-bold 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-muted outline-info-bold',\n advisory: 'bg-advisory-muted outline-advisory-bold',\n normal: 'bg-normal-muted outline-normal-bold',\n serious: 'bg-serious-muted outline-serious-bold',\n critical: 'bg-critical-muted outline-critical-bold',\n },\n },\n defaultVariants: BadgeStylesDefaults,\n});\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ProviderProps } from '../../lib/types.js';
|
|
4
3
|
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import { ProviderProps } from '../../lib/types.js';
|
|
5
5
|
import { ButtonProps, LinkButtonProps, ToggleButtonProps } from './types.js';
|
|
6
6
|
import 'tailwind-variants';
|
|
7
7
|
import './styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/button/index.tsx"],"names":["d","props","jsx","ButtonContext","e","ButtonProvider","useContextProps","ref","size","rest","Icon","c","AriaButton","f","composeRenderProps","className","P","color","LinkButtonProvider","LinkButtonContext","B","Link","N","LinkButton","ToggleButtonContext","ToggleButtonProvider","AriaToggleButton","C"],"mappings":"ySA+BA,MAAA,CAAA,CAAAA,aAAA,CAAA,IAA0B,EAAA,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,YAAA,CAAA,CAAA,GAAA,CAAA,CAAA,GAAWb,CAAmBC,EAAYA,SAEtC,CAAAC,kBAAA,CAAA,CAAA,CAAA,CAAA,oBACA,CAAA,CAAA,SAEJ,CAAA,CACA,aAAYC,CAAAA,YACZ,CAAWT,EAEV,WACH,EACF,CAEJ,QACa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,cACHiB,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport type { ProviderProps } from '@/lib/types';\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 { ButtonProps, LinkButtonProps, ToggleButtonProps } from './types';\n\nexport const ButtonContext =\n createContext<ContextValue<ButtonProps, HTMLButtonElement>>(null);\n\nfunction ButtonProvider({ children, ...props }: ProviderProps<ButtonProps>) {\n return (\n <ButtonContext.Provider value={props}>{children}</ButtonContext.Provider>\n );\n}\nButtonProvider.displayName = 'Button.Provider';\n\n/**\n * Button - A versatile interactive button component with multiple variants\n *\n * Provides accessible button functionality with support for different visual styles,\n * sizes, and interactive states. Includes icon support and integrates with React Aria\n * for keyboard navigation and accessibility features.\n *\n * @example\n * // Basic button\n * <Button>Click me</Button>\n *\n * @example\n * // Primary button with different sizes\n * <Button variant=\"filled\" size=\"large\">Large Filled</Button>\n * <Button variant=\"outline\" size=\"small\">Small Outline</Button>\n *\n * @example\n * // Button with icon\n * <Button variant=\"flat\">\n * <Icon><Plus /></Icon>\n * Add Item\n * </Button>\n *\n * @example\n * // Icon-only button\n * <Button variant=\"icon\">\n * <Icon><Settings /></Icon>\n * </Button>\n *\n * @example\n * // Button with different colors\n * <Button color=\"critical\">Critical Button</Button>\n * <Button color=\"serious\">Delete</Button>\n */\nexport function Button({ ref, ...props }: ButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, ButtonContext);\n\n const {\n children,\n className,\n color = 'info',\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 variant,\n }),\n )}\n data-color={color}\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({\n children,\n ...props\n}: ProviderProps<LinkButtonProps>) {\n return (\n <LinkButtonContext.Provider value={props}>\n {children}\n </LinkButtonContext.Provider>\n );\n}\nLinkButtonProvider.displayName = 'LinkButton.Provider';\n\n/**\n * LinkButton - A button component that renders as a link element\n *\n * Provides accessible link functionality with button-like styling and visual feedback.\n * Perfect for navigation actions that should look like buttons but behave as links.\n * Includes icon support and integrates with React Aria for keyboard navigation and accessibility.\n *\n * @example\n * // Basic link button\n * <LinkButton href=\"/dashboard\">Go to Dashboard</LinkButton>\n *\n * @example\n * // Link button with different variants and sizes\n * <LinkButton variant=\"filled\" size=\"large\" href=\"/create\">Create New</LinkButton>\n * <LinkButton variant=\"outline\" size=\"small\" href=\"/settings\">Settings</LinkButton>\n *\n * @example\n * // Link button with icon\n * <LinkButton variant=\"flat\" href=\"/profile\">\n * <Icon><User /></Icon>\n * View Profile\n * </LinkButton>\n *\n * @example\n * // Icon-only link button\n * <LinkButton variant=\"icon\" href=\"/help\">\n * <Icon><HelpCircle /></Icon>\n * </LinkButton>\n *\n * @example\n * // Link button with different colors\n * <LinkButton color=\"critical\" href=\"/delete\">Delete Account</LinkButton>\n * <LinkButton color=\"serious\" href=\"/reset\">Reset Data</LinkButton>\n */\nexport function LinkButton({ ref, ...props }: LinkButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, LinkButtonContext);\n\n const {\n children,\n className,\n color = 'info',\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 variant,\n }),\n )}\n data-color={color}\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}: ProviderProps<ToggleButtonProps>) {\n return (\n <ToggleButtonContext.Provider value={props}>\n {children}\n </ToggleButtonContext.Provider>\n );\n}\nToggleButtonProvider.displayName = 'ToggleButton.Provider';\n\n/**\n * ToggleButton - A button component that maintains pressed/unpressed state\n *\n * Provides accessible toggle functionality with visual feedback for the current state.\n * Perfect for features like favorites, bookmarks, switches, or any binary state controls.\n * Includes icon support and integrates with React Aria for keyboard navigation and accessibility.\n *\n * @example\n * // Basic toggle button\n * <ToggleButton>Toggle Feature</ToggleButton>\n *\n * @example\n * // Controlled toggle button with different variants\n * <ToggleButton variant=\"filled\" isSelected={isEnabled} onChange={setIsEnabled}>\n * Enable Notifications\n * </ToggleButton>\n *\n * @example\n * // Toggle button with icon and state\n * <ToggleButton variant=\"outline\" isSelected={isFavorite} onChange={setIsFavorite}>\n * <Icon><Heart /></Icon>\n * {isFavorite ? 'Favorite' : 'Add to Favorites'}\n * </ToggleButton>\n *\n * @example\n * // Icon-only toggle button\n * <ToggleButton variant=\"icon\" isSelected={isBookmarked} onChange={setIsBookmarked}>\n * <Icon><Bookmark /></Icon>\n * </ToggleButton>\n *\n * @example\n * // Toggle button with different colors and sizes\n * <ToggleButton color=\"critical\" size=\"small\" isSelected={isEnabled}>\n * Critical Toggle\n * </ToggleButton>\n */\nexport function ToggleButton({ ref, ...props }: ToggleButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, ToggleButtonContext);\n\n const {\n children,\n className,\n color = 'info',\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 variant,\n }),\n )}\n data-color={color}\n data-size={size}\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":["d","props","jsx","ButtonContext","e","ButtonProvider","useContextProps","ref","size","rest","Icon","c","AriaButton","f","composeRenderProps","className","P","color","LinkButtonProvider","LinkButtonContext","B","Link","N","LinkButton","ToggleButtonContext","ToggleButtonProvider","AriaToggleButton","C"],"mappings":"ySA+BA,MAAA,CAAA,CAAAA,aAAA,CAAA,IAA0B,EAAA,SAAU,CAAA,CAAA,CAAGC,QACrC,CAAA,CAAA,CACEC,GAACC,CAAc,CAAA,CAAA,CAAA,OAASC,GAAA,CAAA,CAAA,CAAA,QAAe,CAAA,CAAA,KAAS,CAEpD,CACAC,CAAAA,aAA6B,CAAA,CAAA,WAAA,CAAA,iBAoCJ,CAAA,SAAc,CAAgB,CACrD,CAACJ,GAAU,EAAIK,CAAAA,GAAuBC,GAAO,CAAA,CAAA,CAAA,CAAA,CAAMJ,CAAa,gBA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A,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 composeRenderProps,\n Link,\n useContextProps,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { ButtonStyles, LinkButtonStyles, ToggleButtonStyles } from './styles';\nimport type { ProviderProps } from '@/lib/types';\nimport type { ButtonProps, LinkButtonProps, ToggleButtonProps } from './types';\n\nexport const ButtonContext =\n createContext<ContextValue<ButtonProps, HTMLButtonElement>>(null);\n\nfunction ButtonProvider({ children, ...props }: ProviderProps<ButtonProps>) {\n return (\n <ButtonContext.Provider value={props}>{children}</ButtonContext.Provider>\n );\n}\nButtonProvider.displayName = 'Button.Provider';\n\n/**\n * Button - A versatile interactive button component with multiple variants\n *\n * Provides accessible button functionality with support for different visual styles,\n * sizes, and interactive states. Includes icon support and integrates with React Aria\n * for keyboard navigation and accessibility features.\n *\n * @example\n * // Basic button\n * <Button>Click me</Button>\n *\n * @example\n * // Primary button with different sizes\n * <Button variant=\"filled\" size=\"large\">Large Filled</Button>\n * <Button variant=\"outline\" size=\"small\">Small Outline</Button>\n *\n * @example\n * // Button with icon\n * <Button variant=\"flat\">\n * <Icon><Plus /></Icon>\n * Add Item\n * </Button>\n *\n * @example\n * // Icon-only button\n * <Button variant=\"icon\">\n * <Icon><Settings /></Icon>\n * </Button>\n *\n * @example\n * // Button with different colors\n * <Button color=\"critical\">Critical Button</Button>\n * <Button color=\"serious\">Delete</Button>\n */\nexport function Button({ ref, ...props }: ButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, ButtonContext);\n\n const {\n children,\n className,\n color = 'info',\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 variant,\n }),\n )}\n data-color={color}\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({\n children,\n ...props\n}: ProviderProps<LinkButtonProps>) {\n return (\n <LinkButtonContext.Provider value={props}>\n {children}\n </LinkButtonContext.Provider>\n );\n}\nLinkButtonProvider.displayName = 'LinkButton.Provider';\n\n/**\n * LinkButton - A button component that renders as a link element\n *\n * Provides accessible link functionality with button-like styling and visual feedback.\n * Perfect for navigation actions that should look like buttons but behave as links.\n * Includes icon support and integrates with React Aria for keyboard navigation and accessibility.\n *\n * @example\n * // Basic link button\n * <LinkButton href=\"/dashboard\">Go to Dashboard</LinkButton>\n *\n * @example\n * // Link button with different variants and sizes\n * <LinkButton variant=\"filled\" size=\"large\" href=\"/create\">Create New</LinkButton>\n * <LinkButton variant=\"outline\" size=\"small\" href=\"/settings\">Settings</LinkButton>\n *\n * @example\n * // Link button with icon\n * <LinkButton variant=\"flat\" href=\"/profile\">\n * <Icon><User /></Icon>\n * View Profile\n * </LinkButton>\n *\n * @example\n * // Icon-only link button\n * <LinkButton variant=\"icon\" href=\"/help\">\n * <Icon><HelpCircle /></Icon>\n * </LinkButton>\n *\n * @example\n * // Link button with different colors\n * <LinkButton color=\"critical\" href=\"/delete\">Delete Account</LinkButton>\n * <LinkButton color=\"serious\" href=\"/reset\">Reset Data</LinkButton>\n */\nexport function LinkButton({ ref, ...props }: LinkButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, LinkButtonContext);\n\n const {\n children,\n className,\n color = 'info',\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 variant,\n }),\n )}\n data-color={color}\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}: ProviderProps<ToggleButtonProps>) {\n return (\n <ToggleButtonContext.Provider value={props}>\n {children}\n </ToggleButtonContext.Provider>\n );\n}\nToggleButtonProvider.displayName = 'ToggleButton.Provider';\n\n/**\n * ToggleButton - A button component that maintains pressed/unpressed state\n *\n * Provides accessible toggle functionality with visual feedback for the current state.\n * Perfect for features like favorites, bookmarks, switches, or any binary state controls.\n * Includes icon support and integrates with React Aria for keyboard navigation and accessibility.\n *\n * @example\n * // Basic toggle button\n * <ToggleButton>Toggle Feature</ToggleButton>\n *\n * @example\n * // Controlled toggle button with different variants\n * <ToggleButton variant=\"filled\" isSelected={isEnabled} onChange={setIsEnabled}>\n * Enable Notifications\n * </ToggleButton>\n *\n * @example\n * // Toggle button with icon and state\n * <ToggleButton variant=\"outline\" isSelected={isFavorite} onChange={setIsFavorite}>\n * <Icon><Heart /></Icon>\n * {isFavorite ? 'Favorite' : 'Add to Favorites'}\n * </ToggleButton>\n *\n * @example\n * // Icon-only toggle button\n * <ToggleButton variant=\"icon\" isSelected={isBookmarked} onChange={setIsBookmarked}>\n * <Icon><Bookmark /></Icon>\n * </ToggleButton>\n *\n * @example\n * // Toggle button with different colors and sizes\n * <ToggleButton color=\"critical\" size=\"small\" isSelected={isEnabled}>\n * Critical Toggle\n * </ToggleButton>\n */\nexport function ToggleButton({ ref, ...props }: ToggleButtonProps) {\n [props, ref] = useContextProps(props, ref ?? null, ToggleButtonContext);\n\n const {\n children,\n className,\n color = 'info',\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 variant,\n }),\n )}\n data-color={color}\n data-size={size}\n >\n {children}\n </AriaToggleButton>\n </Icon.Provider>\n );\n}\nToggleButton.displayName = 'ToggleButton';\nToggleButton.Provider = ToggleButtonProvider;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {tv}from'./../../lib/utils.js';const l={color:"info",variant:"filled"},
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const l={color:"info",variant:"filled"},o=tv({base:["group/button flex w-content cursor-pointer items-center justify-center rounded-medium outline outline-transparent","disabled:cursor-not-allowed","size-large:gap-xs size-large:px-m size-large:py-s size-large:text-button-l","size-medium:gap-xs size-medium:px-m size-medium:py-s size-medium:text-button-m","size-small:gap-xxs size-small:px-s size-small:py-xs size-small:text-button-s","size-xsmall:gap-xxs size-xsmall:px-s size-xsmall:py-xs size-xsmall:text-button-xs"],variants:{variant:{filled:["disabled:fg-disabled disabled:bg-interactive-disabled","enabled:color-info:fg-inverse-bold","enabled:color-info:bg-interactive-bold","enabled:hover:color-info:bg-interactive-bold-hover","enabled:focus-visible:color-info:bg-interactive-bold-hover","enabled:color-serious:fg-a11y-on-utility","enabled:color-serious:bg-serious-bold","enabled:hover:color-serious:bg-serious-hover","enabled:focus-visible:color-serious:bg-serious-hover","enabled:color-critical:fg-a11y-on-utility","enabled:color-critical:bg-critical-bold","enabled:hover:color-critical:bg-critical-hover","enabled:focus-visible:color-critical:bg-critical-hover"],outline:["disabled:fg-disabled disabled:outline-interactive-disabled","enabled:color-info:fg-primary-bold enabled:color-info:outline-interactive","enabled:hover:color-info:outline-interactive-hover","enabled:focus-visible:color-info:outline-interactive-hover","enabled:color-serious:fg-primary-bold enabled:color-serious:outline-serious-bold","enabled:hover:color-serious:outline-interactive-hover","enabled:focus-visible:color-serious:outline-interactive-hover","enabled:color-critical:fg-primary-bold enabled:color-critical:outline-critical-bold","enabled:hover:color-critical:outline-interactive-hover","enabled:focus-visible:color-critical:outline-interactive-hover"],flat:"disabled:fg-disabled disabled:bg-transparent",icon:["size-small:rounded-small size-xsmall:rounded-small size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs","disabled:fg-disabled disabled:bg-transparent"],floating:["rounded-full","size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs","disabled:fg-disabled disabled:bg-interactive-disabled disabled:outline-interactive-disabled","enabled:color-info:fg-info-bold enabled:color-info:bg-surface-default enabled:color-info:outline-interactive","enabled:hover:color-info:fg-info-hover enabled:hover:color-info:outline-interactive-hover","enabled:focus-visible:color-info:fg-info-hover enabled:focus-visible:color-info:outline-interactive-hover","enabled:color-serious:fg-serious-bold enabled:color-serious:bg-serious-muted enabled:color-serious:outline-serious-bold","enabled:hover:color-serious:fg-info-hover enabled:hover:color-serious:outline-interactive-hover","enabled:focus-visible:color-serious:fg-info-hover enabled:focus-visible:color-serious:outline-interactive-hover","enabled:color-critical:fg-critical-bold enabled:color-critical:bg-critical-muted enabled:color-critical:outline-critical-bold","enabled:hover:color-critical:fg-info-hover enabled:hover:color-critical:outline-interactive-hover","enabled:focus-visible:color-critical:fg-info-hover enabled:focus-visible:color-critical:outline-interactive-hover"]}},compoundVariants:[{variant:["flat","icon"],className:["enabled:color-info:fg-primary-bold","enabled:hover:color-info:bg-interactive-muted-hover","enabled:focus-visible:color-info:bg-interactive-muted-hover"]},{variant:["flat","icon"],className:["enabled:color-serious:fg-primary-bold","enabled:hover:color-serious:bg-serious-hover","enabled:focus-visible:color-serious:bg-serious-hover"]},{variant:["flat","icon"],className:["enabled:color-critical:fg-primary-bold","enabled:hover:color-critical:bg-critical-hover","enabled:focus-visible:color-critical:bg-critical-hover"]}],defaultVariants:l}),r=tv({extend:o}),a=tv({extend:o}),s=tv({extend:o,base:["enabled:selected:fg-accent-primary-bold","enabled:selected:hover:fg-accent-primary-bold","enabled:selected:focus-visible:fg-accent-primary-bold"],variants:{variant:{filled:["enabled:selected:color-info:bg-info-muted","enabled:selected:hover:color-info:bg-interactive-bold-hover","enabled:selected:focus-visible:color-info:bg-interactive-bold-hover","enabled:selected:color-serious:bg-serious-muted","enabled:selected:hover:color-serious:bg-serious-hover","enabled:selected:focus-visible:color-serious:bg-serious-hover","enabled:selected:color-critical:bg-critical-muted","enabled:selected:hover:color-critical:bg-critical-hover","enabled:selected:focus-visible:color-critical:bg-critical-hover"],floating:["enabled:selected:color-info:outline-accent-primary-bold","enabled:selected:hover:color-info:outline-interactive-hover","enabled:selected:focus-visible:color-info:outline-interactive-hover","enabled:selected:color-serious:outline-accent-primary-bold","enabled:selected:hover:color-serious:outline-interactive-hover","enabled:selected:focus-visible:color-serious:outline-interactive-hover","enabled:selected:color-critical:outline-accent-primary-bold","enabled:selected:hover:color-critical:outline-interactive-hover","enabled:selected:focus-visible:color-critical:outline-interactive-hover"]}}});export{r as ButtonStyles,l as ButtonStylesDefaults,a as LinkButtonStyles,s as ToggleButtonStyles};//# sourceMappingURL=styles.js.map
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/button/styles.ts"],"names":["BaseButtonStyles","e"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,KACP,CAAA,cACF,CAEMA,QACJ,CAAA,CAAM,CACJ,CAAAC,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,mHACA,CAAA,0GAEA,CAAA,gFACA,CAAA,8EACA,CAAA,oFAEQ,CACR,QAAS,CACP,CAAA,OACE,iEAGA,CAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/styles.ts"],"names":["BaseButtonStyles","e"],"mappings":"sCAeS,MAAA,CAAA,CAAA,CAAA,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A,2CACA,CAAA,mIAIA,CAAA,iDACA,CAAA,uHAIA,CAAA,mDACA,CAAA,2HAGF,CAAU,CAER,QAAA,CAAA,CAAA,yDACA,CAAA,mIAIA,CAAA,4DACA,CAAA,yIAIA,CAAA,6DACA,CAAA,2IAKP,CAAA,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 ButtonStylesDefaults = {\n color: 'info',\n variant: 'filled',\n} as const;\n\nconst BaseButtonStyles = tv({\n base: [\n 'group/button flex w-content cursor-pointer items-center justify-center rounded-medium outline outline-transparent',\n 'disabled:cursor-not-allowed',\n 'size-large:gap-xs size-large:px-m size-large:py-s size-large:text-button-l',\n 'size-medium:gap-xs size-medium:px-m size-medium:py-s size-medium:text-button-m',\n 'size-small:gap-xxs size-small:px-s size-small:py-xs size-small:text-button-s',\n 'size-xsmall:gap-xxs size-xsmall:px-s size-xsmall:py-xs size-xsmall:text-button-xs',\n ],\n variants: {\n variant: {\n filled: [\n 'disabled:fg-disabled disabled:bg-interactive-disabled',\n\n // Info\n 'enabled:color-info:fg-inverse-bold',\n 'enabled:color-info:bg-interactive-bold',\n 'enabled:hover:color-info:bg-interactive-bold-hover',\n 'enabled:focus-visible:color-info:bg-interactive-bold-hover',\n\n // Serious\n 'enabled:color-serious:fg-a11y-on-utility',\n 'enabled:color-serious:bg-serious-bold',\n 'enabled:hover:color-serious:bg-serious-hover',\n 'enabled:focus-visible:color-serious:bg-serious-hover',\n\n // Critical\n 'enabled:color-critical:fg-a11y-on-utility',\n 'enabled:color-critical:bg-critical-bold',\n 'enabled:hover:color-critical:bg-critical-hover',\n 'enabled:focus-visible:color-critical:bg-critical-hover',\n ],\n outline: [\n 'disabled:fg-disabled disabled:outline-interactive-disabled',\n\n // Info\n 'enabled:color-info:fg-primary-bold enabled:color-info:outline-interactive',\n 'enabled:hover:color-info:outline-interactive-hover',\n 'enabled:focus-visible:color-info:outline-interactive-hover',\n\n // Serious\n 'enabled:color-serious:fg-primary-bold enabled:color-serious:outline-serious-bold',\n 'enabled:hover:color-serious:outline-interactive-hover',\n 'enabled:focus-visible:color-serious:outline-interactive-hover',\n\n // Critical\n 'enabled:color-critical:fg-primary-bold enabled:color-critical:outline-critical-bold',\n 'enabled:hover:color-critical:outline-interactive-hover',\n 'enabled:focus-visible:color-critical:outline-interactive-hover',\n ],\n flat: 'disabled:fg-disabled disabled:bg-transparent',\n icon: [\n 'size-small:rounded-small size-xsmall:rounded-small size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs',\n 'disabled:fg-disabled disabled:bg-transparent',\n ],\n floating: [\n 'rounded-full',\n 'size-large:p-xs size-medium:p-xs size-small:p-xxs size-xsmall:p-xxs',\n 'disabled:fg-disabled disabled:bg-interactive-disabled disabled:outline-interactive-disabled',\n\n // Info\n 'enabled:color-info:fg-info-bold enabled:color-info:bg-surface-default enabled:color-info:outline-interactive',\n 'enabled:hover:color-info:fg-info-hover enabled:hover:color-info:outline-interactive-hover',\n 'enabled:focus-visible:color-info:fg-info-hover enabled:focus-visible:color-info:outline-interactive-hover',\n\n // Serious\n 'enabled:color-serious:fg-serious-bold enabled:color-serious:bg-serious-muted enabled:color-serious:outline-serious-bold',\n 'enabled:hover:color-serious:fg-info-hover enabled:hover:color-serious:outline-interactive-hover',\n 'enabled:focus-visible:color-serious:fg-info-hover enabled:focus-visible:color-serious:outline-interactive-hover',\n\n // Critical\n 'enabled:color-critical:fg-critical-bold enabled:color-critical:bg-critical-muted enabled:color-critical:outline-critical-bold',\n 'enabled:hover:color-critical:fg-info-hover enabled:hover:color-critical:outline-interactive-hover',\n 'enabled:focus-visible:color-critical:fg-info-hover enabled:focus-visible:color-critical:outline-interactive-hover',\n ],\n },\n },\n compoundVariants: [\n // Info\n {\n variant: ['flat', 'icon'],\n className: [\n 'enabled:color-info:fg-primary-bold',\n 'enabled:hover:color-info:bg-interactive-muted-hover',\n 'enabled:focus-visible:color-info:bg-interactive-muted-hover',\n ],\n },\n\n // Serious\n {\n variant: ['flat', 'icon'],\n className: [\n 'enabled:color-serious:fg-primary-bold',\n 'enabled:hover:color-serious:bg-serious-hover',\n 'enabled:focus-visible:color-serious:bg-serious-hover',\n ],\n },\n\n // Critical\n {\n variant: ['flat', 'icon'],\n className: [\n 'enabled:color-critical:fg-primary-bold',\n 'enabled:hover:color-critical:bg-critical-hover',\n 'enabled:focus-visible:color-critical:bg-critical-hover',\n ],\n },\n ],\n defaultVariants: ButtonStylesDefaults,\n});\n\nexport const ButtonStyles = tv({\n extend: BaseButtonStyles,\n});\n\nexport const LinkButtonStyles = tv({\n extend: BaseButtonStyles,\n});\n\nexport const ToggleButtonStyles = tv({\n extend: BaseButtonStyles,\n base: [\n 'enabled:selected:fg-accent-primary-bold',\n 'enabled:selected:hover:fg-accent-primary-bold',\n 'enabled:selected:focus-visible:fg-accent-primary-bold',\n ],\n variants: {\n variant: {\n filled: [\n // Info\n 'enabled:selected:color-info:bg-info-muted',\n 'enabled:selected:hover:color-info:bg-interactive-bold-hover',\n 'enabled:selected:focus-visible:color-info:bg-interactive-bold-hover',\n\n // Serious\n 'enabled:selected:color-serious:bg-serious-muted',\n 'enabled:selected:hover:color-serious:bg-serious-hover',\n 'enabled:selected:focus-visible:color-serious:bg-serious-hover',\n\n // Critical\n 'enabled:selected:color-critical:bg-critical-muted',\n 'enabled:selected:hover:color-critical:bg-critical-hover',\n 'enabled:selected:focus-visible:color-critical:bg-critical-hover',\n ],\n floating: [\n // Info\n 'enabled:selected:color-info:outline-accent-primary-bold',\n 'enabled:selected:hover:color-info:outline-interactive-hover',\n 'enabled:selected:focus-visible:color-info:outline-interactive-hover',\n\n // Serious\n 'enabled:selected:color-serious:outline-accent-primary-bold',\n 'enabled:selected:hover:color-serious:outline-interactive-hover',\n 'enabled:selected:focus-visible:color-serious:outline-interactive-hover',\n\n // Critical\n 'enabled:selected:color-critical:outline-accent-primary-bold',\n 'enabled:selected:hover:color-critical:outline-interactive-hover',\n 'enabled:selected:focus-visible:color-critical:outline-interactive-hover',\n ],\n },\n },\n});\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AriaAttributesWithRef } from '../../lib/types.js';
|
|
2
1
|
import { ButtonProps as ButtonProps$1, LinkProps, ToggleButtonProps as ToggleButtonProps$1 } from 'react-aria-components';
|
|
3
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { AriaAttributesWithRef } from '../../lib/types.js';
|
|
4
4
|
import { ButtonStyles } from './styles.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'tailwind-merge';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {tv}from'./../../lib/utils.js';const c=tv({slots:{group:["group/checkbox-group flex gap-xs","orientation-horizontal:flex-wrap","orientation-vertical:flex-col"],groupLabel:"w-full",checkbox:["group/checkbox flex cursor-pointer items-center gap-m group-orientation-horizontal/checkbox-group:grow group-orientation-horizontal/checkbox-group:basis-1/3","disabled:cursor-not-allowed"],control:["my-xxs flex size-l items-center justify-center rounded-small outline outline-interactive","group-enabled/checkbox:fg-info-
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const c=tv({slots:{group:["group/checkbox-group flex gap-xs","orientation-horizontal:flex-wrap","orientation-vertical:flex-col"],groupLabel:"w-full",checkbox:["group/checkbox flex cursor-pointer items-center gap-m group-orientation-horizontal/checkbox-group:grow group-orientation-horizontal/checkbox-group:basis-1/3","disabled:cursor-not-allowed"],control:["my-xxs flex size-l items-center justify-center rounded-small outline outline-interactive","group-enabled/checkbox:fg-info-bold","group-enabled/checkbox:group-focus-visible/checkbox:outline-interactive-hover","group-enabled/checkbox:group-hover/checkbox:outline-interactive-hover","group-enabled/checkbox:group-indeterminate/checkbox:fg-a11y-on-accent group-enabled/checkbox:group-indeterminate/checkbox:bg-accent-primary-bold group-enabled/checkbox:group-indeterminate/checkbox:outline-accent-primary-bold","group-enabled/checkbox:group-indeterminate/checkbox:group-focus-visible/checkbox:outline-interactive-hover","group-enabled/checkbox:group-indeterminate/checkbox:group-hover/checkbox:outline-interactive-hover","group-enabled/checkbox:group-selected/checkbox:fg-a11y-on-accent group-enabled/checkbox:group-selected/checkbox:bg-accent-primary-bold group-enabled/checkbox:group-selected/checkbox:outline-accent-primary-bold","group-enabled/checkbox:group-selected/checkbox:group-focus-visible/checkbox:outline-interactive-hover","group-enabled/checkbox:group-selected/checkbox:group-hover/checkbox:outline-interactive-hover","group-disabled/checkbox:outline-interactive-disabled","group-disabled/checkbox:group-indeterminate/checkbox:fg-inverse-bold group-disabled/checkbox:group-indeterminate/checkbox:bg-interactive-disabled","group-disabled/checkbox:group-selected/checkbox:fg-inverse-bold group-disabled/checkbox:group-selected/checkbox:bg-interactive-disabled"],label:["fg-primary-bold text-body-s","group-disabled/checkbox:fg-disabled"]}});export{c as CheckboxStyles};//# sourceMappingURL=styles.js.map
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/checkbox/styles.ts"],"names":["e"],"mappings":"6CAeS,CACLA,EAAA,CAAA,CAAA,KACE,CAAA,CAAA,KAAA,CAAA,CAAA,kCACA,CAAA,kEAGF,CAAA,CAAA,UACA,CAAA,QAAU,CACR,wKACA,CAAA,6BAEO,CACP,CAAA,OAAA,CAAA,CAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/checkbox/styles.ts"],"names":["e"],"mappings":"6CAeS,CACLA,EAAA,CAAA,CAAA,KACE,CAAA,CAAA,KAAA,CAAA,CAAA,kCACA,CAAA,kEAGF,CAAA,CAAA,UACA,CAAA,QAAU,CACR,wKACA,CAAA,6BAEO,CACP,CAAA,OAAA,CAAA,CAAA,gIAEA,CAAA,+EACA,CAAA,0SAEA,CAAA,4GACA,CAAA,wTAEA,CAAA,uGACA,CAAA,sJAEA,CAAA,mJACA,CAAA,+KAIA,CAAA,qCAGL,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 CheckboxStyles = tv({\n slots: {\n group: [\n 'group/checkbox-group flex gap-xs',\n 'orientation-horizontal:flex-wrap',\n 'orientation-vertical:flex-col',\n ],\n groupLabel: 'w-full',\n checkbox: [\n 'group/checkbox flex cursor-pointer items-center gap-m group-orientation-horizontal/checkbox-group:grow group-orientation-horizontal/checkbox-group:basis-1/3',\n 'disabled:cursor-not-allowed',\n ],\n control: [\n 'my-xxs flex size-l items-center justify-center rounded-small outline outline-interactive',\n 'group-enabled/checkbox:fg-info-bold',\n 'group-enabled/checkbox:group-focus-visible/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-hover/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-indeterminate/checkbox:fg-a11y-on-accent group-enabled/checkbox:group-indeterminate/checkbox:bg-accent-primary-bold group-enabled/checkbox:group-indeterminate/checkbox:outline-accent-primary-bold',\n 'group-enabled/checkbox:group-indeterminate/checkbox:group-focus-visible/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-indeterminate/checkbox:group-hover/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-selected/checkbox:fg-a11y-on-accent group-enabled/checkbox:group-selected/checkbox:bg-accent-primary-bold group-enabled/checkbox:group-selected/checkbox:outline-accent-primary-bold',\n 'group-enabled/checkbox:group-selected/checkbox:group-focus-visible/checkbox:outline-interactive-hover',\n 'group-enabled/checkbox:group-selected/checkbox:group-hover/checkbox:outline-interactive-hover',\n 'group-disabled/checkbox:outline-interactive-disabled',\n 'group-disabled/checkbox:group-indeterminate/checkbox:fg-inverse-bold group-disabled/checkbox:group-indeterminate/checkbox:bg-interactive-disabled',\n 'group-disabled/checkbox:group-selected/checkbox:fg-inverse-bold group-disabled/checkbox:group-selected/checkbox:bg-interactive-disabled',\n ],\n label: [\n 'fg-primary-bold text-body-s',\n 'group-disabled/checkbox:fg-disabled',\n ],\n },\n});\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ProviderProps } from '../../lib/types.js';
|
|
4
3
|
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
import { ProviderProps } from '../../lib/types.js';
|
|
5
5
|
import { ChipProps, BaseChipProps, ChipListProps, DeletableChipProps, SelectableChipProps } from './types.js';
|
|
6
6
|
import 'tailwind-variants';
|
|
7
7
|
import './styles.js';
|