@accelint/design-toolkit 0.0.1 → 0.0.2
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 +44 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +7 -0
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/badge/index.d.ts +3 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/button/index.d.ts +8 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +19 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/chip/index.d.ts +57 -0
- package/dist/components/chip/index.js +2 -0
- package/dist/components/chip/index.js.map +1 -0
- package/dist/components/classification-badge/index.d.ts +3 -3
- package/dist/components/classification-badge/index.js +1 -1
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-banner/index.d.ts +2 -1
- package/dist/components/classification-banner/index.js +2 -2
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/floating-button/index.js +1 -1
- package/dist/components/floating-button/index.js.map +1 -1
- package/dist/components/icon/index.d.ts +19 -0
- package/dist/components/icon/index.js +2 -0
- package/dist/components/icon/index.js.map +1 -0
- package/dist/components/icon-button/index.d.ts +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/label/index.d.ts +14 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/radio/index.d.ts +16 -0
- package/dist/components/radio/index.js +2 -0
- package/dist/components/radio/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +14 -0
- package/dist/components/switch/index.js +2 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/text-area/index.d.ts +25 -0
- package/dist/components/text-area/index.js +2 -0
- package/dist/components/text-area/index.js.map +1 -0
- package/dist/components/text-field/index.d.ts +23 -0
- package/dist/components/text-field/index.js +2 -0
- package/dist/components/text-field/index.js.map +1 -0
- package/dist/components/toggle-icon-button/index.js +1 -1
- package/dist/components/toggle-icon-button/index.js.map +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/icons/catalog.d.ts +34 -0
- package/dist/icons/catalog.js +2 -0
- package/dist/icons/catalog.js.map +1 -0
- package/dist/index.css +28 -22
- package/dist/index.d.ts +12 -76
- package/dist/index.js +1 -1
- package/dist/lib/react.d.ts +23 -1
- package/dist/lib/react.js +1 -1
- package/dist/lib/react.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/styles.css +657 -81
- package/package.json +79 -15
- package/dist/icons/add-fill.d.ts +0 -7
- package/dist/icons/add-fill.js +0 -3
- package/dist/icons/add-fill.js.map +0 -1
- package/dist/icons/add-to-list.d.ts +0 -7
- package/dist/icons/add-to-list.js +0 -3
- package/dist/icons/add-to-list.js.map +0 -1
- package/dist/icons/add.d.ts +0 -7
- package/dist/icons/add.js +0 -3
- package/dist/icons/add.js.map +0 -1
- package/dist/icons/arrange-table.d.ts +0 -7
- package/dist/icons/arrange-table.js +0 -3
- package/dist/icons/arrange-table.js.map +0 -1
- package/dist/icons/attach-file.d.ts +0 -7
- package/dist/icons/attach-file.js +0 -3
- package/dist/icons/attach-file.js.map +0 -1
- package/dist/icons/cancel-fill.d.ts +0 -7
- package/dist/icons/cancel-fill.js +0 -3
- package/dist/icons/cancel-fill.js.map +0 -1
- package/dist/icons/cancel.d.ts +0 -7
- package/dist/icons/cancel.js +0 -3
- package/dist/icons/cancel.js.map +0 -1
- package/dist/icons/center-on.d.ts +0 -7
- package/dist/icons/center-on.js +0 -3
- package/dist/icons/center-on.js.map +0 -1
- package/dist/icons/check.d.ts +0 -7
- package/dist/icons/check.js +0 -3
- package/dist/icons/check.js.map +0 -1
- package/dist/icons/collapse-all.d.ts +0 -7
- package/dist/icons/collapse-all.js +0 -3
- package/dist/icons/collapse-all.js.map +0 -1
- package/dist/icons/collapse-window.d.ts +0 -7
- package/dist/icons/collapse-window.js +0 -3
- package/dist/icons/collapse-window.js.map +0 -1
- package/dist/icons/condense.d.ts +0 -7
- package/dist/icons/condense.js +0 -3
- package/dist/icons/condense.js.map +0 -1
- package/dist/icons/copy-to-clipboard.d.ts +0 -7
- package/dist/icons/copy-to-clipboard.js +0 -3
- package/dist/icons/copy-to-clipboard.js.map +0 -1
- package/dist/icons/create-coa.d.ts +0 -7
- package/dist/icons/create-coa.js +0 -3
- package/dist/icons/create-coa.js.map +0 -1
- package/dist/icons/delete.d.ts +0 -7
- package/dist/icons/delete.js +0 -3
- package/dist/icons/delete.js.map +0 -1
- package/dist/icons/drag-horz.d.ts +0 -7
- package/dist/icons/drag-horz.js +0 -3
- package/dist/icons/drag-horz.js.map +0 -1
- package/dist/icons/drag-vert.d.ts +0 -7
- package/dist/icons/drag-vert.js +0 -3
- package/dist/icons/drag-vert.js.map +0 -1
- package/dist/icons/duplicate.d.ts +0 -7
- package/dist/icons/duplicate.js +0 -3
- package/dist/icons/duplicate.js.map +0 -1
- package/dist/icons/edit.d.ts +0 -7
- package/dist/icons/edit.js +0 -3
- package/dist/icons/edit.js.map +0 -1
- package/dist/icons/expand-all.d.ts +0 -7
- package/dist/icons/expand-all.js +0 -3
- package/dist/icons/expand-all.js.map +0 -1
- package/dist/icons/expand-left.d.ts +0 -7
- package/dist/icons/expand-left.js +0 -3
- package/dist/icons/expand-left.js.map +0 -1
- package/dist/icons/expand-right.d.ts +0 -7
- package/dist/icons/expand-right.js +0 -3
- package/dist/icons/expand-right.js.map +0 -1
- package/dist/icons/expand-window.d.ts +0 -7
- package/dist/icons/expand-window.js +0 -3
- package/dist/icons/expand-window.js.map +0 -1
- package/dist/icons/expand.d.ts +0 -7
- package/dist/icons/expand.js +0 -3
- package/dist/icons/expand.js.map +0 -1
- package/dist/icons/explore-data.d.ts +0 -7
- package/dist/icons/explore-data.js +0 -3
- package/dist/icons/explore-data.js.map +0 -1
- package/dist/icons/filter.d.ts +0 -7
- package/dist/icons/filter.js +0 -3
- package/dist/icons/filter.js.map +0 -1
- package/dist/icons/flag.d.ts +0 -7
- package/dist/icons/flag.js +0 -3
- package/dist/icons/flag.js.map +0 -1
- package/dist/icons/focus.d.ts +0 -7
- package/dist/icons/focus.js +0 -3
- package/dist/icons/focus.js.map +0 -1
- package/dist/icons/global-share.d.ts +0 -7
- package/dist/icons/global-share.js +0 -3
- package/dist/icons/global-share.js.map +0 -1
- package/dist/icons/group.d.ts +0 -7
- package/dist/icons/group.js +0 -3
- package/dist/icons/group.js.map +0 -1
- package/dist/icons/hide.d.ts +0 -7
- package/dist/icons/hide.js +0 -3
- package/dist/icons/hide.js.map +0 -1
- package/dist/icons/import.d.ts +0 -7
- package/dist/icons/import.js +0 -3
- package/dist/icons/import.js.map +0 -1
- package/dist/icons/index.d.ts +0 -75
- package/dist/icons/index.js +0 -2
- package/dist/icons/index.js.map +0 -1
- package/dist/icons/insert-chart.d.ts +0 -7
- package/dist/icons/insert-chart.js +0 -3
- package/dist/icons/insert-chart.js.map +0 -1
- package/dist/icons/jump-to.d.ts +0 -7
- package/dist/icons/jump-to.js +0 -3
- package/dist/icons/jump-to.js.map +0 -1
- package/dist/icons/lasso.d.ts +0 -7
- package/dist/icons/lasso.js +0 -3
- package/dist/icons/lasso.js.map +0 -1
- package/dist/icons/link.d.ts +0 -7
- package/dist/icons/link.js +0 -3
- package/dist/icons/link.js.map +0 -1
- package/dist/icons/lock-fill.d.ts +0 -7
- package/dist/icons/lock-fill.js +0 -3
- package/dist/icons/lock-fill.js.map +0 -1
- package/dist/icons/lock-outline.d.ts +0 -7
- package/dist/icons/lock-outline.js +0 -3
- package/dist/icons/lock-outline.js.map +0 -1
- package/dist/icons/login.d.ts +0 -7
- package/dist/icons/login.js +0 -3
- package/dist/icons/login.js.map +0 -1
- package/dist/icons/logout.d.ts +0 -7
- package/dist/icons/logout.js +0 -3
- package/dist/icons/logout.js.map +0 -1
- package/dist/icons/loop.d.ts +0 -7
- package/dist/icons/loop.js +0 -3
- package/dist/icons/loop.js.map +0 -1
- package/dist/icons/move.d.ts +0 -7
- package/dist/icons/move.js +0 -3
- package/dist/icons/move.js.map +0 -1
- package/dist/icons/mute.d.ts +0 -7
- package/dist/icons/mute.js +0 -3
- package/dist/icons/mute.js.map +0 -1
- package/dist/icons/open-container.d.ts +0 -7
- package/dist/icons/open-container.js +0 -3
- package/dist/icons/open-container.js.map +0 -1
- package/dist/icons/paste-from-clipboard.d.ts +0 -7
- package/dist/icons/paste-from-clipboard.js +0 -3
- package/dist/icons/paste-from-clipboard.js.map +0 -1
- package/dist/icons/pause.d.ts +0 -7
- package/dist/icons/pause.js +0 -3
- package/dist/icons/pause.js.map +0 -1
- package/dist/icons/person.d.ts +0 -7
- package/dist/icons/person.js +0 -3
- package/dist/icons/person.js.map +0 -1
- package/dist/icons/pin.d.ts +0 -7
- package/dist/icons/pin.js +0 -3
- package/dist/icons/pin.js.map +0 -1
- package/dist/icons/placeholder.d.ts +0 -7
- package/dist/icons/placeholder.js +0 -3
- package/dist/icons/placeholder.js.map +0 -1
- package/dist/icons/play.d.ts +0 -7
- package/dist/icons/play.js +0 -3
- package/dist/icons/play.js.map +0 -1
- package/dist/icons/playback.d.ts +0 -7
- package/dist/icons/playback.js +0 -3
- package/dist/icons/playback.js.map +0 -1
- package/dist/icons/polygon-lasso.d.ts +0 -7
- package/dist/icons/polygon-lasso.js +0 -3
- package/dist/icons/polygon-lasso.js.map +0 -1
- package/dist/icons/pop-back-in.d.ts +0 -7
- package/dist/icons/pop-back-in.js +0 -3
- package/dist/icons/pop-back-in.js.map +0 -1
- package/dist/icons/pop-out.d.ts +0 -7
- package/dist/icons/pop-out.js +0 -3
- package/dist/icons/pop-out.js.map +0 -1
- package/dist/icons/record.d.ts +0 -7
- package/dist/icons/record.js +0 -3
- package/dist/icons/record.js.map +0 -1
- package/dist/icons/rectangle-select.d.ts +0 -7
- package/dist/icons/rectangle-select.js +0 -3
- package/dist/icons/rectangle-select.js.map +0 -1
- package/dist/icons/remove-fill.d.ts +0 -7
- package/dist/icons/remove-fill.js +0 -3
- package/dist/icons/remove-fill.js.map +0 -1
- package/dist/icons/remove-from-list.d.ts +0 -7
- package/dist/icons/remove-from-list.js +0 -3
- package/dist/icons/remove-from-list.js.map +0 -1
- package/dist/icons/remove.d.ts +0 -7
- package/dist/icons/remove.js +0 -3
- package/dist/icons/remove.js.map +0 -1
- package/dist/icons/reverse.d.ts +0 -7
- package/dist/icons/reverse.js +0 -3
- package/dist/icons/reverse.js.map +0 -1
- package/dist/icons/screenshot.d.ts +0 -7
- package/dist/icons/screenshot.js +0 -3
- package/dist/icons/screenshot.js.map +0 -1
- package/dist/icons/search.d.ts +0 -7
- package/dist/icons/search.js +0 -3
- package/dist/icons/search.js.map +0 -1
- package/dist/icons/share.d.ts +0 -7
- package/dist/icons/share.js +0 -3
- package/dist/icons/share.js.map +0 -1
- package/dist/icons/show.d.ts +0 -7
- package/dist/icons/show.js +0 -3
- package/dist/icons/show.js.map +0 -1
- package/dist/icons/stack-cards.d.ts +0 -7
- package/dist/icons/stack-cards.js +0 -3
- package/dist/icons/stack-cards.js.map +0 -1
- package/dist/icons/stack.d.ts +0 -7
- package/dist/icons/stack.js +0 -3
- package/dist/icons/stack.js.map +0 -1
- package/dist/icons/tether.d.ts +0 -7
- package/dist/icons/tether.js +0 -3
- package/dist/icons/tether.js.map +0 -1
- package/dist/icons/track-changes.d.ts +0 -7
- package/dist/icons/track-changes.js +0 -3
- package/dist/icons/track-changes.js.map +0 -1
- package/dist/icons/types.d.ts +0 -6
- package/dist/icons/types.js +0 -2
- package/dist/icons/types.js.map +0 -1
- package/dist/icons/undo.d.ts +0 -7
- package/dist/icons/undo.js +0 -3
- package/dist/icons/undo.js.map +0 -1
- package/dist/icons/zoom-in.d.ts +0 -7
- package/dist/icons/zoom-in.js +0 -3
- package/dist/icons/zoom-in.js.map +0 -1
- package/dist/icons/zoom-out.d.ts +0 -7
- package/dist/icons/zoom-out.js +0 -3
- package/dist/icons/zoom-out.js.map +0 -1
- package/dist/icons/zoom-to.d.ts +0 -7
- package/dist/icons/zoom-to.js +0 -3
- package/dist/icons/zoom-to.js.map +0 -1
@@ -0,0 +1,44 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import * as cva_types from 'cva/types';
|
3
|
+
import React from 'react';
|
4
|
+
import { DisclosureProps, ButtonProps, DisclosurePanelProps, DisclosureGroupProps } from 'react-aria-components';
|
5
|
+
import { VariantProps } from 'cva';
|
6
|
+
|
7
|
+
declare const accordionStyles: (props?: ({
|
8
|
+
variant?: "cozy" | "compact" | null | undefined;
|
9
|
+
} & cva_types.ClassProp) | undefined) => string;
|
10
|
+
interface AccordionProps extends VariantProps<typeof accordionStyles>, DisclosureProps {
|
11
|
+
options?: boolean;
|
12
|
+
}
|
13
|
+
declare function Accordion({ children, className, isDisabled, options, variant, ...props }: AccordionProps): react_jsx_runtime.JSX.Element;
|
14
|
+
declare namespace Accordion {
|
15
|
+
var displayName: string;
|
16
|
+
var Header: typeof AccordionHeader;
|
17
|
+
var Panel: typeof AccordionPanel;
|
18
|
+
var Group: typeof AccordionGroup;
|
19
|
+
}
|
20
|
+
interface AccordionHeaderProps extends Pick<AccordionProps, 'options' | 'variant'> {
|
21
|
+
children: React.ReactNode;
|
22
|
+
className?: ButtonProps['className'];
|
23
|
+
isDisabled?: boolean;
|
24
|
+
}
|
25
|
+
declare function AccordionHeader({ children }: AccordionHeaderProps): react_jsx_runtime.JSX.Element;
|
26
|
+
declare namespace AccordionHeader {
|
27
|
+
var displayName: string;
|
28
|
+
}
|
29
|
+
interface AccordionPanelProps extends DisclosurePanelProps {
|
30
|
+
}
|
31
|
+
declare function AccordionPanel({ children, className, ...props }: AccordionPanelProps): react_jsx_runtime.JSX.Element;
|
32
|
+
declare namespace AccordionPanel {
|
33
|
+
var displayName: string;
|
34
|
+
}
|
35
|
+
interface AccordionGroupProps extends DisclosureGroupProps {
|
36
|
+
/** Whether multiple items can be expanded at the same time. */
|
37
|
+
allowsMultipleExpanded?: boolean;
|
38
|
+
}
|
39
|
+
declare function AccordionGroup({ allowsMultipleExpanded, children, className, ...props }: AccordionGroupProps): react_jsx_runtime.JSX.Element;
|
40
|
+
declare namespace AccordionGroup {
|
41
|
+
var displayName: string;
|
42
|
+
}
|
43
|
+
|
44
|
+
export { Accordion, type AccordionGroupProps, type AccordionHeaderProps, type AccordionPanelProps, type AccordionProps };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {DisclosureGroupStateContext,Disclosure,Heading,Button,DisclosurePanel,DisclosureGroup}from'react-aria-components';import {cn}from'./../../lib/utils.js';import {ChevronDown,Kebab}from'@accelint/icons';import {cva}from'cva';import {createContext,useContext}from'react';import {Icon}from'../icon/index.js';import {IconButton}from'../icon-button/index.js';import {jsx,jsxs}from'react/jsx-runtime';var H=cva("group flex flex-col bg-transparent",{variants:{variant:{cozy:"is-cozy",compact:"is-compact"}},defaultVariants:{variant:"cozy"}}),u=createContext({isDisabled:false,options:false,variant:"cozy"});function n({children:e,className:o,isDisabled:s=false,options:r=false,variant:i="cozy",...A}){let x=useContext(DisclosureGroupStateContext);return jsx(u.Provider,{value:{options:r,variant:i,isDisabled:s||x?.isDisabled},children:jsx(Disclosure,{...A,isDisabled:s,className:cn(`group w-full ${r?"has-options":""}`,H({variant:i,className:o})),children:v=>typeof e=="function"?e(v):e})})}n.displayName="Accordion";function m({children:e}){let{isDisabled:o,options:s,variant:r}=useContext(u);return jsxs(Heading,{className:cn(["fg-default-light flex w-full cursor-pointer items-center rounded-medium p-s outline-none focus-within:bg-interactive-hover-dark hover:bg-interactive-hover-dark",o&&"fg-disabled cursor-default focus-within:bg-transparent hover:bg-transparent"]),"data-variant":r,children:[jsxs(Button,{slot:"trigger",className:cn(["flex w-full cursor-pointer items-center rounded-medium outline-none","data-[variant=cozy]:icon-size-xl data-[variant=cozy]:gap-s data-[variant=cozy]:text-header-m","data-[variant=compact]:icon-size-l data-[variant=compact]:gap-xs data-[variant=compact]:text-header-s","ai-disabled:cursor-default"]),"data-variant":r,children:[jsx("span",{className:IconButton.as({isDisabled:o,size:r==="cozy"?"medium":"small",variant:"child"}),"aria-hidden":true,children:jsx(Icon,{children:jsx(ChevronDown,{className:cn("transform group-ai-expanded:rotate-180")})})}),e]}),s&&jsx(IconButton,{className:"ml-auto",isDisabled:o,size:r==="cozy"?"medium":"small",variant:"child",children:jsx(Icon,{children:jsx(Kebab,{})})})]})}m.displayName="Accordion.Header";n.Header=m;function f({children:e,className:o,...s}){return jsx(DisclosurePanel,{...s,className:"overflow-hidden transition-all",children:jsx("div",{className:cn("p-s",o),children:e})})}f.displayName="Accordion.Panel";n.Panel=f;function P({allowsMultipleExpanded:e=false,children:o,className:s,...r}){return jsx(DisclosureGroup,{...r,allowsMultipleExpanded:e,className:cn("flex w-full flex-col",s),children:i=>typeof o=="function"?o(i):o})}P.displayName="Accordion.Group";n.Group=P;export{n as Accordion};//# sourceMappingURL=index.js.map
|
2
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/accordion/index.tsx"],"names":["w","Accordion","children","className","options","variant","props","useContext","AriaDisclosureGroupStateContext","d","b","jsx","AccordionContext","a","isDisabled","t","AccordionHeader","jsxs","Heading","N","cn","IconButton","h","AccordionPanel","AriaDisclosurePanel","g","AccordionGroup","AriaDisclosureGroup","D"],"mappings":"iZAmCkE,IAAA,CAAA,CAAAA,GAAA,CAAA,sCACtD,QACR,CAAS,CACP,OAAM,CAAA,CAAA,IAAA,CAAA,SACG,CACX,OAAA,CAAA,YAEe,CAAA,CAAA,CAAA,gBACN,CACX,OACD,CAAA,MASC,+BACA,CAAA,KAAS,QACA,CAAA,KAAA,CAAA,OASJ,CAAA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/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport type React from 'react';\nimport {\n Disclosure as AriaDisclosure,\n DisclosureGroup as AriaDisclosureGroup,\n type DisclosureGroupProps as AriaDisclosureGroupProps,\n DisclosureGroupStateContext as AriaDisclosureGroupStateContext,\n DisclosurePanel as AriaDisclosurePanel,\n type DisclosurePanelProps as AriaDisclosurePanelProps,\n type DisclosureProps as AriaDisclosureProps,\n Button,\n type ButtonProps,\n Heading,\n} from 'react-aria-components';\n\nimport { cn } from '@/lib/utils';\nimport { ChevronDown, Kebab } from '@accelint/icons';\nimport { type VariantProps, cva } from 'cva';\nimport { createContext, useContext } from 'react';\nimport { Icon } from '../icon';\nimport { IconButton } from '../icon-button';\n\nconst accordionStyles = cva('group flex flex-col bg-transparent', {\n variants: {\n variant: {\n cozy: 'is-cozy',\n compact: 'is-compact',\n },\n },\n defaultVariants: {\n variant: 'cozy',\n },\n});\n\ninterface AccordionContextType\n extends Pick<VariantProps<typeof accordionStyles>, 'variant'> {\n isDisabled?: boolean;\n options?: boolean;\n}\n\nconst AccordionContext = createContext<AccordionContextType>({\n isDisabled: false,\n options: false,\n variant: 'cozy',\n});\n\nexport interface AccordionProps\n extends VariantProps<typeof accordionStyles>,\n AriaDisclosureProps {\n options?: boolean;\n}\n\nexport function Accordion({\n children,\n className,\n isDisabled = false,\n options = false,\n variant = 'cozy',\n ...props\n}: AccordionProps) {\n // @ts-expect-error package version mismatch\n const stateContext = useContext(AriaDisclosureGroupStateContext);\n\n return (\n <AccordionContext.Provider\n value={{\n options,\n variant,\n isDisabled: isDisabled || stateContext?.isDisabled,\n }}\n >\n <AriaDisclosure\n {...props}\n isDisabled={isDisabled}\n className={cn(\n `group w-full ${options ? 'has-options' : ''}`,\n accordionStyles({ variant, className }),\n )}\n >\n {(props) =>\n typeof children === 'function' ? children(props) : children\n }\n </AriaDisclosure>\n </AccordionContext.Provider>\n );\n}\nAccordion.displayName = 'Accordion';\n\nexport interface AccordionHeaderProps\n extends Pick<AccordionProps, 'options' | 'variant'> {\n children: React.ReactNode;\n className?: ButtonProps['className'];\n isDisabled?: boolean;\n}\n\nfunction AccordionHeader({ children }: AccordionHeaderProps) {\n const { isDisabled, options, variant } = useContext(AccordionContext);\n\n return (\n <Heading\n className={cn([\n 'fg-default-light flex w-full cursor-pointer items-center rounded-medium p-s outline-none focus-within:bg-interactive-hover-dark hover:bg-interactive-hover-dark',\n isDisabled &&\n 'fg-disabled cursor-default focus-within:bg-transparent hover:bg-transparent',\n ])}\n data-variant={variant}\n >\n <Button\n slot='trigger'\n className={cn([\n 'flex w-full cursor-pointer items-center rounded-medium outline-none',\n 'data-[variant=cozy]:icon-size-xl data-[variant=cozy]:gap-s data-[variant=cozy]:text-header-m',\n 'data-[variant=compact]:icon-size-l data-[variant=compact]:gap-xs data-[variant=compact]:text-header-s',\n 'ai-disabled:cursor-default',\n ])}\n data-variant={variant}\n >\n {/* @ts-expect-error package version mismatch */}\n <span\n className={IconButton.as({\n isDisabled,\n size: variant === 'cozy' ? 'medium' : 'small',\n variant: 'child',\n })}\n aria-hidden\n >\n <Icon>\n <ChevronDown\n className={cn('transform group-ai-expanded:rotate-180')}\n />\n </Icon>\n </span>\n {children}\n </Button>\n {options && (\n <IconButton\n className='ml-auto'\n isDisabled={isDisabled}\n size={variant === 'cozy' ? 'medium' : 'small'}\n variant='child'\n >\n <Icon>\n <Kebab />\n </Icon>\n </IconButton>\n )}\n </Heading>\n );\n}\nAccordionHeader.displayName = 'Accordion.Header';\nAccordion.Header = AccordionHeader;\n\nexport interface AccordionPanelProps extends AriaDisclosurePanelProps {}\n\nfunction AccordionPanel({\n children,\n className,\n ...props\n}: AccordionPanelProps) {\n return (\n <AriaDisclosurePanel\n {...props}\n className={'overflow-hidden transition-all'}\n >\n <div className={cn('p-s', className)}>{children}</div>\n </AriaDisclosurePanel>\n );\n}\nAccordionPanel.displayName = 'Accordion.Panel';\nAccordion.Panel = AccordionPanel;\n\nexport interface AccordionGroupProps extends AriaDisclosureGroupProps {\n /** Whether multiple items can be expanded at the same time. */\n allowsMultipleExpanded?: boolean;\n}\n\nfunction AccordionGroup({\n allowsMultipleExpanded = false,\n children,\n className,\n ...props\n}: AccordionGroupProps) {\n return (\n <AriaDisclosureGroup\n {...props}\n allowsMultipleExpanded={allowsMultipleExpanded}\n className={cn('flex w-full flex-col', className)}\n >\n {(props) => (typeof children === 'function' ? children(props) : children)}\n </AriaDisclosureGroup>\n );\n}\nAccordionGroup.displayName = 'Accordion.Group';\nAccordion.Group = AccordionGroup;\n"]}
|
@@ -8,8 +8,15 @@ declare const avatarStyles: (props?: ({
|
|
8
8
|
size?: "small" | "medium" | null | undefined;
|
9
9
|
} & cva_types.ClassProp) | undefined) => string;
|
10
10
|
interface AvatarProps extends React.ComponentProps<typeof AvatarPrimitive.Image>, VariantProps<typeof avatarStyles> {
|
11
|
+
/**
|
12
|
+
* The fallback that the avatar will render if it cannot load the provided source.
|
13
|
+
*
|
14
|
+
* Accepts any React component.
|
15
|
+
*/
|
11
16
|
fallback?: React.ReactNode;
|
17
|
+
/** How long the system should wait before it shows the fallback component. By default there is no delay. */
|
12
18
|
fallbackDelay?: number;
|
19
|
+
/** The source of an avatar can either be a URL representing an image or a React component (such as an SVG or an icon from a library). */
|
13
20
|
source?: string | React.ReactNode;
|
14
21
|
}
|
15
22
|
declare const Avatar: {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import {cn}from'./../../lib/utils.js';import {Person}from'@accelint/icons';import*as t from'@radix-ui/react-avatar';import'client-only';import {cva}from'cva';import {jsxs,jsx}from'react/jsx-runtime';var l=cva("fg-default-dark flex items-center justify-center overflow-hidden rounded-full bg-surface-overlay",{variants:{size:{medium:"size-[32px] **:[svg]:size-xl",small:"size-xl **:[svg]:size-l"}},defaultVariants:{size:"medium"}}),g=cn(["relative inline-block","[--badge-empty-inset:0_0_auto_auto] [--badge-inset:calc(var(--spacing-xxs)*-1)_calc(var(--spacing-xxs)*-1)_auto_auto] [--badge-position:absolute]"]),v=({className:e,children:i,fallback:s,fallbackDelay:m=0,source:a,size:p="medium",...c})=>jsxs("div",{className:g,children:[jsxs(t.Root,{className:cn("pointer-events-none inline-block",l({size:p,className:e})),role:"img",children:[typeof a=="string"&&jsx(t.Image,{className:"size-full object-cover object-center",src:typeof a=="string"?a:void 0,...c}),a&&typeof a!="string"?a:jsx(t.Fallback,{delayMs:m,children:s||jsx(Person,{})})]}),i]});v.displayAs="Avatar";v.as=(e,i)=>cn(l({...e,className:i}));export{v as Avatar};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/avatar/index.tsx"],"names":["d","cn","o","className","
|
1
|
+
{"version":3,"sources":["../../../src/components/avatar/index.tsx"],"names":["d","cn","o","className","children","fallback","source","size","n","avatarWrapperStyles","jsxs","jsx","Person","r","Avatar","props","avatarStyles"],"mappings":"uMAqBE,IAAA,CAAA,CAAAA,GAAA,CAAA,4GAEU,CACJ,CAAA,IAAA,CAAA,CAAQ,qCACD,CAAA,KAAA,CAAA,yBAGM,CAAA,CAAA,CAAA,eACT,CAAA,CAAA,IAAA,CAAA,QAKgBC,CAAG,CAC7B,CACA,CAAA,CAAA,CAAAC,EAAA,CAAA,CAAA,uBAAA,CAAA,mJAmBA,CAAAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SACAC,CAAAA,CAAAA,CAAAA,QACAC,CAAAA,CAAAA,CAAAA,wBAEAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OACAC,CAAO,CAAA,IAAA,CAAA,CAAA,CAAA,YAGN,CAAA,CAAA,GAAAC,IAAA,CAAI,KAAWC,CAAAA,CAAAA,SACdC,CAAAA,CAAAA,CAAAA,QAAC,CAAA,CAAAF,IAAA,CAAA,CACC,gBACE,CAAAN,EAAA,CAAA,kCACeK,CAAAA,CAAAA,CAAAA,CAAM,IAAAJ,CAAAA,CAAAA,CAAAA,SAElB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAEJ,CAAOG,KAAAA,CAAAA,QAAAA,CAAAA,CAAAA,OACNK,CAAAA,EAAAA,eAAC,CACC,KAAA,CAAA,CAAA,SACA,CAAA,2CAAYL,OAAW,CAAA,EAAA,QAAoB,CAAA,CAAA,CAC1C,MACH,CAEDA,GAAU,CAAA,CAAA,CAAA,CAAA,CAAA,EAAOA,OAAW,CAAA,EAAA,yBAGD,CAAA,CAAA,OACvB,CAAA,CAAA,CAAA,QAAuBM,CAAA,CAAO,EAAAC,GACjC,QAEJ,EACCT,CAAAA,CAAAA,CACH,CAEFU,CAAAA,CAAAA,CAAO,CAAY,CAAA,CAAA,EAAA,CAAA,CAAA,SAAA,CAAA,QAEjBC,CACAZ,CAAAA,CAAAA,EAAAA,CACGF,CAAGe,CAAAA,CAAAA,CAAa,GAAKD,EAAAA,CAAAA,CAAO,CAAAZ,CAAAA,GAAAA,CAAAA,CAAAA,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { cn } from '@/lib/utils';\nimport { Person } from '@accelint/icons';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport 'client-only';\nimport { type VariantProps, cva } from 'cva';\nimport type React from 'react';\n\nconst avatarStyles = cva(\n 'fg-default-dark flex items-center justify-center overflow-hidden rounded-full bg-surface-overlay',\n {\n variants: {\n size: {\n medium: 'size-[32px] **:[svg]:size-xl',\n small: 'size-xl **:[svg]:size-l',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n\nconst avatarWrapperStyles = cn([\n 'relative inline-block',\n '[--badge-empty-inset:0_0_auto_auto] [--badge-inset:calc(var(--spacing-xxs)*-1)_calc(var(--spacing-xxs)*-1)_auto_auto] [--badge-position:absolute]',\n]);\n\nexport interface AvatarProps\n extends React.ComponentProps<typeof AvatarPrimitive.Image>,\n VariantProps<typeof avatarStyles> {\n /**\n * The fallback that the avatar will render if it cannot load the provided source.\n *\n * Accepts any React component.\n */\n fallback?: React.ReactNode;\n /** How long the system should wait before it shows the fallback component. By default there is no delay. */\n fallbackDelay?: number;\n /** The source of an avatar can either be a URL representing an image or a React component (such as an SVG or an icon from a library). */\n source?: string | React.ReactNode;\n}\n\nexport const Avatar = ({\n className,\n children,\n fallback,\n fallbackDelay = 0,\n source,\n size = 'medium',\n ...props\n}: AvatarProps) => (\n <div className={avatarWrapperStyles}>\n <AvatarPrimitive.Root\n className={cn(\n 'pointer-events-none inline-block',\n avatarStyles({ size, className }),\n )}\n role='img'\n >\n {typeof source === 'string' && (\n <AvatarPrimitive.Image\n className='size-full object-cover object-center'\n src={typeof source === 'string' ? source : undefined}\n {...props}\n />\n )}\n {source && typeof source !== 'string' ? (\n source\n ) : (\n <AvatarPrimitive.Fallback delayMs={fallbackDelay}>\n {fallback ? fallback : <Person />}\n </AvatarPrimitive.Fallback>\n )}\n </AvatarPrimitive.Root>\n {children}\n </div>\n);\nAvatar.displayAs = 'Avatar';\nAvatar.as = (\n props: VariantProps<typeof avatarStyles>,\n className?: string | string[],\n) => cn(avatarStyles({ ...props, className }));\n"]}
|
@@ -6,8 +6,10 @@ import React from 'react';
|
|
6
6
|
declare const badgeStyles: (props?: ({
|
7
7
|
variant?: "info" | "advisory" | "normal" | "serious" | "critical" | null | undefined;
|
8
8
|
} & cva_types.ClassProp) | undefined) => string;
|
9
|
-
interface BadgeProps extends VariantProps<typeof badgeStyles>, React.HTMLProps<HTMLSpanElement> {
|
9
|
+
interface BadgeProps extends VariantProps<typeof badgeStyles>, Omit<React.HTMLProps<HTMLSpanElement>, 'children'> {
|
10
10
|
className?: string;
|
11
|
+
/** Used to add text to the badge, such as the number of unread notifications. */
|
12
|
+
children?: string;
|
11
13
|
}
|
12
14
|
declare const Badge: {
|
13
15
|
({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {jsx}from'react/jsx-runtime';var a=cva(cn(["fg-default-light inline-flex h-l min-w-l items-center justify-center rounded-full
|
1
|
+
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {jsx}from'react/jsx-runtime';var a=cva(cn(["fg-default-light inline-flex h-l min-w-l items-center justify-center rounded-full px-xs text-body-xs outline empty:size-s empty:min-w-none empty:px-none","[inset:var(--badge-inset,initial)] [position:var(--badge-position,initial)] empty:[inset:var(--badge-empty-inset,initial)]"]),{variants:{variant:{advisory:"bg-advisory-subtle outline-advisory-bold",critical:"bg-critical-subtle outline-critical",serious:"bg-serious-subtle outline-serious",normal:"bg-normal-subtle outline-normal",info:"bg-info-subtle outline-info-bold"}},defaultVariants:{variant:"info"}}),n=({className:e,variant:t="info",...s})=>jsx("span",{className:cn(a({variant:t,className:e})),...s});n.displayName="Badge";n.as=(e,t)=>cn(a({...e,className:t}));export{n as Badge};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/badge/index.tsx"],"names":["o","i","
|
1
|
+
{"version":3,"sources":["../../../src/components/badge/index.tsx"],"names":["o","i","className","r","variant","props","Badge","cn","badgeStyles"],"mappings":"gGAiBK,IACD,CACA,CAAAA,GAAA,CAAAC,EAAA,CAAA,CAAA,0JAAA,CAAA,4HAGU,CAAA,CAAA,CAAA,CAAA,iBAEN,CAAA,CAAA,mDACU,CAAA,QAAA,CAAA,6CAEV,CAAA,mCAAA,CAAQ,wCACF,CAAA,IAAA,CAAA,kCAGV,CAAA,CAAA,CAAA,eACW,CAAA,CAAA,OACX,CACF,MAWoB,CACpB,CAAAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,mBACU,CAAA,CAAA,CACV,MACF,CAAA,GACG,CAAA,CAAA,GAAAC,GAAA,CAAA,iBAGKC,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,qBAIAC,CACN,CAAA,CAAA,CAEFC,GAAoB,CAAA,CAAA,EAAA,CAAA,CAAA,WAAA,CAAA,OAElBD,EACAH,CACGK,EAAAA,CAAAA,CAAAA,CAAGC,EAAY,GAAEP,EAAGI,EAAO,CAAAH,CAAAA,GAAAA,CAAAA,CAAAA,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport type React from 'react';\n\nconst badgeStyles = cva(\n cn([\n 'fg-default-light inline-flex h-l min-w-l items-center justify-center rounded-full px-xs text-body-xs outline empty:size-s empty:min-w-none empty:px-none',\n '[inset:var(--badge-inset,initial)] [position:var(--badge-position,initial)] empty:[inset:var(--badge-empty-inset,initial)]',\n ]),\n {\n variants: {\n variant: {\n advisory: 'bg-advisory-subtle outline-advisory-bold',\n critical: 'bg-critical-subtle outline-critical',\n serious: 'bg-serious-subtle outline-serious',\n normal: 'bg-normal-subtle outline-normal',\n info: 'bg-info-subtle outline-info-bold',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n);\n\nexport interface BadgeProps\n extends VariantProps<typeof badgeStyles>,\n Omit<React.HTMLProps<HTMLSpanElement>, 'children'> {\n className?: string;\n /** Used to add text to the badge, such as the number of unread notifications. */\n children?: string;\n}\n\nexport const Badge = ({\n className,\n variant = 'info',\n ...props\n}: BadgeProps) => (\n <span\n className={cn(\n badgeStyles({\n variant,\n className,\n }),\n )}\n {...props}\n />\n);\nBadge.displayName = 'Badge';\nBadge.as = (\n props: VariantProps<typeof badgeStyles>,\n className?: string | string[],\n) => cn(badgeStyles({ ...props, className }));\n"]}
|
@@ -8,7 +8,14 @@ declare const buttonStyles: (props?: ({
|
|
8
8
|
size?: "small" | "medium" | "large" | "xsmall" | null | undefined;
|
9
9
|
isDisabled?: boolean | null | undefined;
|
10
10
|
} & cva_types.ClassProp) | undefined) => string;
|
11
|
-
interface ButtonProps extends Omit<ButtonProps$1, 'isDisabled'>, VariantProps<typeof buttonStyles> {
|
11
|
+
interface ButtonProps extends Omit<ButtonProps$1, 'children' | 'isDisabled'>, VariantProps<typeof buttonStyles> {
|
12
|
+
/**
|
13
|
+
* Used to add text to the badge, such as the number of unread notifications.
|
14
|
+
*
|
15
|
+
* Can also receive a function which will be called with the parameters mentioned
|
16
|
+
* {@link https://react-spectrum.adobe.com/react-aria/Button.html#styling:~:text=are%20documented%20below.-,Name,-CSS%20Selector here}
|
17
|
+
*/
|
18
|
+
children?: ButtonProps$1['children'];
|
12
19
|
isDisabled?: boolean;
|
13
20
|
}
|
14
21
|
declare const Button: {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {Button,composeRenderProps}from'react-aria-components';import {jsx}from'react/jsx-runtime';var
|
1
|
+
import {expectsIconWrapper}from'./../../lib/react.js';import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {Button,composeRenderProps}from'react-aria-components';import {jsx}from'react/jsx-runtime';var a=cva("inline-flex cursor-pointer items-center justify-center whitespace-nowrap [--icon-size:20px]",{variants:{variant:{primary:"fg-inverse-light rounded-medium ai-pressed:bg-interactive-hover-light bg-interactive-default outline-none hover:bg-interactive-hover-light focus:bg-interactive-hover-light",outline:"fg-default-light rounded-medium outline ai-pressed:outline-interactive-hover outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover",flat:"fg-default-light rounded-medium ai-pressed:bg-interactive-hover-dark bg-transparent outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark",destructive:"fg-inverse-light rounded-medium ai-pressed:bg-serious-hover bg-serious-bold outline-none hover:bg-serious-hover focus:bg-serious-hover",critical:"fg-default-light rounded-medium ai-pressed:bg-critical-hover bg-critical-bold outline-none hover:bg-critical-hover focus:bg-critical-hover"},size:{large:"min-h-xxl gap-xs rounded-medium px-l py-s text-button-l [--icon-size:24px]",medium:"min-h-[32px] gap-xs rounded-medium px-l py-xs text-button-m [--icon-size:20px]",small:"min-h-xl gap-xxs p-s text-button-s [--icon-size:16px]",xsmall:"min-h-[20px] gap-xxs px-s py-xs text-button-xs [--icon-size:12px]"},isDisabled:{true:"fg-disabled hover:fg-disabled cursor-not-allowed bg-interactive-disabled hover:bg-interactive-disabled focus:bg-interactive-disabled",false:""}},compoundVariants:[{variant:"outline",isDisabled:true,className:"fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent outline outline-interactive-disabled hover:bg-transparent focus:bg-transparent"},{variant:"flat",isDisabled:true,className:"fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent hover:bg-transparent focus:bg-transparent"}],defaultVariants:{isDisabled:false,variant:"primary",size:"medium"}}),i=({className:t,isDisabled:e,variant:n="primary",size:s="medium",...r})=>(expectsIconWrapper({children:r.children,componentName:i.displayName}),jsx(Button,{className:composeRenderProps(t,l=>cn("w-content",a({isDisabled:e,variant:n,size:s,className:l}))),isDisabled:e,...r}));i.displayName="Button";i.as=(t,e)=>cn(a({...t,className:e}));export{i as Button};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/button/index.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/components/button/index.tsx"],"names":["u","className","isDisabled","size","props","expectsIconWrapper","d","Button","jsx","composeRenderProps","buttonStyles","variant","cn"],"mappings":"oNAsBE,IAAA,CAAA,CAAAA,GAAA,CAAA,6FAEI,CAAA,CAAA,QACE,CAAA,CAAA,8LAGE,CAAA,OAAA,CAAA,kKACI,CAAA,IAAA,CAAA,kKAGN,CAAA,WAAA,CAAA,wIAEF,CAAA,QAAA,CAAA,4IAGI,CACF,CAAA,IAAA,CAAA,CAAA,KAAA,CAAA,oKAEO,CAAA,KAAA,CAAA,uDAEL,CAAA,MAAA,CAAA,mEAGF,CAAM,CAAA,UAAA,CAAA,CAAA,IAAA,CAAA,sIAIV,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,gBAGI,CAAA,CAAA,CAAA,OAAA,CAAA,UACA,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,kKAIF,CAAA,CAAA,CAAA,OAAA,CAAA,OACA,UACE,CAAA,IAAA,CAAA,SAAA,CAAA,6HAGN,CAAA,CAAA,CAAA,iBAEE,UAAS,CAAA,KAAA,CAAA,OACH,CAAA,SACR,CACF,IAgBoB,CAAA,QACpBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CACA,CAAAC,CAAAA,SAAAA,CAAAA,CACA,WAAU,CAAA,CAAA,CAAA,OACVC,CAAAA,CAAAA,CAAAA,cACGC,CAAAA,CACL,CACEC,QACYD,CAAAA,GAAAA,CAAAA,CAAAA,IAAME,kBAChB,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,QAAA,CAAeC,aACjB,CAAC,EAGCC,WACaC,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,MAAmBR,CAAYA,CAAAA,SAGtCS,CAAAA,kBAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,EAAAA,CAAa,WACX,CAAAR,EACA,CAAAS,UACAR,CAAAA,CAAAA,CAAAA,cAEF,CAAC,CACH,CACF,SACYD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CACX,CAAGE,UAIH,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAc,CACrBG,CAAAA,YAAY,QAGPK,CAAGF,EAAa,EAAE,CAAA,CAAGN,EAAO,CAAAH,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAW,CAAC,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["import { expectsIconWrapper } from '@/lib/react';\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nconst buttonStyles = cva(\n 'inline-flex cursor-pointer items-center justify-center whitespace-nowrap [--icon-size:20px]',\n {\n variants: {\n variant: {\n primary:\n 'fg-inverse-light rounded-medium ai-pressed:bg-interactive-hover-light bg-interactive-default outline-none hover:bg-interactive-hover-light focus:bg-interactive-hover-light',\n outline:\n 'fg-default-light rounded-medium outline ai-pressed:outline-interactive-hover outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover',\n flat: 'fg-default-light rounded-medium ai-pressed:bg-interactive-hover-dark bg-transparent outline-none hover:bg-interactive-hover-dark focus:bg-interactive-hover-dark',\n destructive:\n 'fg-inverse-light rounded-medium ai-pressed:bg-serious-hover bg-serious-bold outline-none hover:bg-serious-hover focus:bg-serious-hover',\n critical:\n 'fg-default-light rounded-medium ai-pressed:bg-critical-hover bg-critical-bold outline-none hover:bg-critical-hover focus:bg-critical-hover',\n },\n size: {\n large:\n 'min-h-xxl gap-xs rounded-medium px-l py-s text-button-l [--icon-size:24px]',\n medium:\n 'min-h-[32px] gap-xs rounded-medium px-l py-xs text-button-m [--icon-size:20px]',\n small: 'min-h-xl gap-xxs p-s text-button-s [--icon-size:16px]',\n xsmall:\n 'min-h-[20px] gap-xxs px-s py-xs text-button-xs [--icon-size:12px]',\n },\n isDisabled: {\n true: 'fg-disabled hover:fg-disabled cursor-not-allowed bg-interactive-disabled hover:bg-interactive-disabled focus:bg-interactive-disabled',\n false: '',\n },\n },\n compoundVariants: [\n {\n variant: 'outline',\n isDisabled: true,\n className:\n 'fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent outline outline-interactive-disabled hover:bg-transparent focus:bg-transparent',\n },\n {\n variant: 'flat',\n isDisabled: true,\n className:\n 'fg-disabled hover:fg-disabled focus:fg-disabled cursor-not-allowed bg-transparent hover:bg-transparent focus:bg-transparent',\n },\n ],\n defaultVariants: {\n isDisabled: false,\n variant: 'primary',\n size: 'medium',\n },\n },\n);\n\nexport interface ButtonProps\n extends Omit<AriaButtonProps, 'children' | 'isDisabled'>,\n VariantProps<typeof buttonStyles> {\n /**\n * Used to add text to the badge, such as the number of unread notifications.\n *\n * Can also receive a function which will be called with the parameters mentioned\n * {@link https://react-spectrum.adobe.com/react-aria/Button.html#styling:~:text=are%20documented%20below.-,Name,-CSS%20Selector here}\n */\n children?: AriaButtonProps['children'];\n isDisabled?: boolean;\n}\n\nexport const Button = ({\n className,\n isDisabled,\n variant = 'primary',\n size = 'medium',\n ...props\n}: ButtonProps) => {\n expectsIconWrapper({\n children: props.children,\n componentName: Button.displayName,\n });\n\n return (\n <AriaButton\n className={composeRenderProps(className, (className) =>\n cn(\n 'w-content',\n buttonStyles({\n isDisabled,\n variant,\n size,\n className,\n }),\n ),\n )}\n isDisabled={isDisabled}\n {...props}\n />\n );\n};\nButton.displayName = 'Button';\nButton.as = (\n props: VariantProps<typeof buttonStyles>,\n className?: string | string[],\n) => cn(buttonStyles({ ...props, className }));\n"]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import React from 'react';
|
3
|
+
import { CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1 } from 'react-aria-components';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* This is a checkbox.
|
7
|
+
*/
|
8
|
+
interface CheckboxProps extends CheckboxProps$1 {
|
9
|
+
}
|
10
|
+
declare function Checkbox({ className, children, ...args }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
11
|
+
declare namespace Checkbox {
|
12
|
+
var Group: typeof CheckboxGroup;
|
13
|
+
}
|
14
|
+
interface CheckboxGroupProps extends CheckboxGroupProps$1 {
|
15
|
+
label?: string | React.JSX.Element;
|
16
|
+
}
|
17
|
+
declare function CheckboxGroup({ children, className, label, ...props }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
18
|
+
|
19
|
+
export { Checkbox, type CheckboxGroupProps, type CheckboxProps };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {cn}from'./../../lib/utils.js';import {CheckboxIndeterminate,CheckboxSelected}from'@accelint/icons';import {cva}from'cva';import {Checkbox,CheckboxGroup}from'react-aria-components';import {Label}from'../label/index.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var f=cva("fg-inverse-light size-l rounded-small outline outline-interactive",{variants:{isIndeterminate:{true:"bg-highlight outline-highlight hover:outline-interactive-hover focus:outline-interactive-hover"},isSelected:{true:"bg-highlight outline-highlight hover:outline-interactive-hover focus:outline-interactive-hover"},isHovered:{true:"outline-interactive-hover"},isFocused:{true:"outline-interactive-hover"},isDisabled:{true:"outline-interactive-disabled hover:outline-interactive-disabled"},isReadOnly:{true:"outline-interactive-disabled hover:outline-interactive-disabled"}},compoundVariants:[{isDisabled:true,isSelected:true,className:"icon-inverse-light bg-interactive-disabled"},{isDisabled:true,isIndeterminate:true,className:"icon-inverse-light bg-interactive-disabled"},{isReadOnly:true,isSelected:true,className:"icon-inverse-light bg-interactive-disabled"},{isReadOnly:true,isIndeterminate:true,className:"icon-inverse-light bg-interactive-disabled"}],defaultVariants:{isIndeterminate:false,isSelected:false}});function k({className:e,children:r,...t}){return jsx(Checkbox,{...t,className:cn("fg-default-light flex items-center gap-m ai-disabled:text-interactive-disabled text-body-s",e),children:({isDisabled:o,isFocused:a,isHovered:h,isIndeterminate:s,isReadOnly:d,isSelected:n})=>jsxs(Fragment,{children:[jsxs("div",{className:cn(f({isDisabled:o,isFocused:a,isHovered:h,isIndeterminate:s,isReadOnly:d,isSelected:n})),"aria-hidden":true,children:[s&&!n&&jsx(CheckboxIndeterminate,{}),n&&!s&&jsx(CheckboxSelected,{})]}),r]})})}function C({children:e,className:r,label:t,...o}){return jsx(CheckboxGroup,{...o,className:cn("fg-default-light flex flex-col gap-m text-body-s",r),children:a=>jsxs(Fragment,{children:[t?jsx(Label,{children:t}):void 0,typeof e=="function"?e(a):e]})})}k.Group=C;export{k as Checkbox};//# sourceMappingURL=index.js.map
|
2
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/checkbox/index.tsx"],"names":["v","Checkbox","jsx","args","x","cn","className","Fragment","l","u","c","isIndeterminate","isSelected","CheckboxIndeterminate","Check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AA,CAAA,QACE,CAAA,CAAAD,IAAA,CAAA,KAAA,CAAA,CAAA,SAEI,CAAAE,EAAA,CAAA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,eACA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,UAGO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,aAEVC,CAAAA,IAAAA,CAAAA,QAAoBC,CAAcV,CAACW,CAAAA,EAAA,CAAsB,CAAA,EACzDD,yBAAc,CAACD,EAAAA,CAAmBT,CAACY,CAAAA,EAAA,CAAiB,CAAA,EAAAC,GACvD,CACCC,gBAAAA,CAAAA,EACH,CAEJ,CAAA,CAEJ,CAOA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SACEA,CAAAA,CAAAA,CAAAA,QACAV,CAAAA,CAAAA,CAAAA,SACAW,CAAAA,CAAAA,CACA,KACqB,CAAA,CACrB,CACEf,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OACMgB,GAAAA,CACJC,aAAWd,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA,SAETC,CAAAA,EAAAA,CAAAA,kDAGD,CAAA,CAAA,CAAA,CAAA,QACC,CACG,CAAAW,EAAAA,IAAAA,CAAAA,QAAAA,CAAAA,CAAAA,QAAS,CAAO,CAAA,CAAA,CAAAF,GAAA,CAAAK,KAAA,CAAA,CAAA,QAChB,CAAA,CAAA,CAAA,CAAA,CAAA,MAAOJ,CAAa,OAAA,CAAA,EAAA,UAA+BA,CACtD,CAEJ,CAAA,CAEJ,CAEAf,CAAAA,CAAS,CAAQoB,CAAAA,CAAAA,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\nimport { cn } from '@/lib/utils';\nimport { CheckboxIndeterminate, CheckboxSelected } from '@accelint/icons';\nimport { cva } from 'cva';\nimport type React from 'react';\nimport {\n Checkbox as AriaCheckbox,\n CheckboxGroup as AriaCheckboxGroup,\n type CheckboxGroupProps as AriaCheckboxGroupProps,\n type CheckboxProps as AriaCheckboxProps,\n} from 'react-aria-components';\nimport { Label } from '../label';\n\nconst checkboxStyles = cva(\n 'fg-inverse-light size-l rounded-small outline outline-interactive',\n {\n variants: {\n isIndeterminate: {\n true: 'bg-highlight outline-highlight hover:outline-interactive-hover focus:outline-interactive-hover',\n },\n isSelected: {\n true: 'bg-highlight outline-highlight hover:outline-interactive-hover focus:outline-interactive-hover',\n },\n isHovered: {\n true: 'outline-interactive-hover',\n },\n isFocused: {\n true: 'outline-interactive-hover',\n },\n isDisabled: {\n true: 'outline-interactive-disabled hover:outline-interactive-disabled',\n },\n isReadOnly: {\n true: 'outline-interactive-disabled hover:outline-interactive-disabled',\n },\n },\n compoundVariants: [\n {\n isDisabled: true,\n isSelected: true,\n className: 'icon-inverse-light bg-interactive-disabled',\n },\n {\n isDisabled: true,\n isIndeterminate: true,\n className: 'icon-inverse-light bg-interactive-disabled',\n },\n {\n isReadOnly: true,\n isSelected: true,\n className: 'icon-inverse-light bg-interactive-disabled',\n },\n {\n isReadOnly: true,\n isIndeterminate: true,\n className: 'icon-inverse-light bg-interactive-disabled',\n },\n ],\n defaultVariants: {\n isIndeterminate: false,\n isSelected: false,\n },\n },\n);\n\n/**\n * This is a checkbox.\n */\nexport interface CheckboxProps extends AriaCheckboxProps {}\n\nexport function Checkbox({ className, children, ...args }: CheckboxProps) {\n return (\n <AriaCheckbox\n {...args}\n className={cn(\n 'fg-default-light flex items-center gap-m ai-disabled:text-interactive-disabled text-body-s',\n className,\n )}\n >\n {({\n isDisabled,\n isFocused,\n isHovered,\n isIndeterminate,\n isReadOnly,\n isSelected,\n }) => (\n <>\n <div\n className={cn(\n checkboxStyles({\n isDisabled,\n isFocused,\n isHovered,\n isIndeterminate,\n isReadOnly,\n isSelected,\n }),\n )}\n aria-hidden\n >\n {isIndeterminate && !isSelected && <CheckboxIndeterminate />}\n {isSelected && !isIndeterminate && <CheckboxSelected />}\n </div>\n {children}\n </>\n )}\n </AriaCheckbox>\n );\n}\n\nexport interface CheckboxGroupProps extends AriaCheckboxGroupProps {\n // children: React.JSX.Element;\n label?: string | React.JSX.Element;\n}\n\nfunction CheckboxGroup({\n children,\n className,\n label,\n ...props\n}: CheckboxGroupProps) {\n return (\n <AriaCheckboxGroup\n {...props}\n className={cn(\n 'fg-default-light flex flex-col gap-m text-body-s',\n className,\n )}\n >\n {(props) => (\n <>\n {label ? <Label>{label}</Label> : undefined}\n {typeof children === 'function' ? children(props) : children}\n </>\n )}\n </AriaCheckboxGroup>\n );\n}\n\nCheckbox.Group = CheckboxGroup;\n"]}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import * as cva_types from 'cva/types';
|
3
|
+
import { VariantProps } from 'cva';
|
4
|
+
import React, { ReactNode } from 'react';
|
5
|
+
import { TagGroupProps, TagListProps, TagProps } from 'react-aria-components';
|
6
|
+
|
7
|
+
declare const chipStyles: (props?: ({
|
8
|
+
variant?: "info" | "advisory" | "normal" | "serious" | "critical" | null | undefined;
|
9
|
+
size?: "small" | "medium" | null | undefined;
|
10
|
+
} & cva_types.ClassProp) | undefined) => string;
|
11
|
+
interface ChipProps extends VariantProps<typeof chipStyles>, Omit<React.HTMLProps<HTMLSpanElement>, 'children' | 'size'> {
|
12
|
+
className?: string;
|
13
|
+
/** Used to add text to the badge, such as the number of unread notifications. */
|
14
|
+
children?: ReactNode;
|
15
|
+
}
|
16
|
+
declare const Chip: {
|
17
|
+
({ className, size, variant, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
|
18
|
+
displayName: string;
|
19
|
+
as(props: VariantProps<typeof chipStyles>, className?: string | string[]): string;
|
20
|
+
List: typeof ChipList;
|
21
|
+
Selectable: {
|
22
|
+
({ className, isDisabled, size, ...props }: SelectableChipProps): react_jsx_runtime.JSX.Element;
|
23
|
+
displayName: string;
|
24
|
+
};
|
25
|
+
Deletable: {
|
26
|
+
({ children, className, isDisabled, size, textValue, ...props }: DeletableChipProps): react_jsx_runtime.JSX.Element;
|
27
|
+
displayName: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
interface ChipListProps<T> extends Omit<TagGroupProps, 'children'>, Pick<TagListProps<T>, 'items' | 'children' | 'renderEmptyState'> {
|
31
|
+
}
|
32
|
+
declare function ChipList<T extends object>({ children, className, items, renderEmptyState, ...props }: ChipListProps<T>): react_jsx_runtime.JSX.Element;
|
33
|
+
declare namespace ChipList {
|
34
|
+
var displayName: string;
|
35
|
+
}
|
36
|
+
declare const selectableChipStyles: (props?: ({
|
37
|
+
isDisabled?: boolean | null | undefined;
|
38
|
+
size?: "small" | "medium" | null | undefined;
|
39
|
+
} & cva_types.ClassProp) | undefined) => string;
|
40
|
+
interface SelectableChipProps extends VariantProps<typeof selectableChipStyles>, Omit<TagProps, 'isDisabled'> {
|
41
|
+
}
|
42
|
+
declare const SelectableChip: {
|
43
|
+
({ className, isDisabled, size, ...props }: SelectableChipProps): react_jsx_runtime.JSX.Element;
|
44
|
+
displayName: string;
|
45
|
+
};
|
46
|
+
declare const deletableChipStyles: (props?: ({
|
47
|
+
isDisabled?: boolean | null | undefined;
|
48
|
+
size?: "small" | "medium" | null | undefined;
|
49
|
+
} & cva_types.ClassProp) | undefined) => string;
|
50
|
+
interface DeletableChipProps extends VariantProps<typeof deletableChipStyles>, Omit<TagProps, 'isDisabled'> {
|
51
|
+
}
|
52
|
+
declare const DeletableChip: {
|
53
|
+
({ children, className, isDisabled, size, textValue, ...props }: DeletableChipProps): react_jsx_runtime.JSX.Element;
|
54
|
+
displayName: string;
|
55
|
+
};
|
56
|
+
|
57
|
+
export { Chip, type ChipListProps, type ChipProps, DeletableChip, SelectableChip };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {cn}from'./../../lib/utils.js';import {CancelFill}from'@accelint/icons';import {cva}from'cva';import {createContext,useContext}from'react';import {Tag,Button,TagGroup,TagList}from'react-aria-components';import {Icon}from'../icon/index.js';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var d=cva(cn(["fg-default-light inline-flex w-content items-center justify-center gap-xxs rounded-full outline"]),{variants:{variant:{advisory:"bg-advisory-subtle outline-advisory-bold",critical:"bg-critical-subtle outline-critical",serious:"bg-serious-subtle outline-serious",normal:"bg-normal-subtle outline-normal",info:"bg-info-subtle outline-info-bold"},size:{medium:"icon-size-l px-s py-xs text-body-s",small:"icon-size-m px-s py-xs text-body-xs"}},defaultVariants:{size:"medium",variant:"info"}}),f=createContext(false),r=({className:e,size:t="medium",variant:s="info",...o})=>{let n=useContext(f)?Tag:"span";return jsx(n,{className:cn(d({size:t,variant:s,className:e})),...o})};r.displayName="Chip";r.as=(e,t)=>cn(d({...e,className:t}));function m({children:e,className:t,items:s,renderEmptyState:o,...l}){return jsx(f.Provider,{value:true,children:jsx(TagGroup,{...l,children:jsx(TagList,{items:s,renderEmptyState:o,className:cn("flex flex-wrap gap-xs",t),children:e})})})}m.displayName="Chip.List";r.List=m;var A=cva(cn(["fg-default-light inline-flex w-content items-center justify-center rounded-full outline outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover","ai-selected:bg-highlight-subtle ai-selected:outline-highlight"]),{variants:{isDisabled:{true:"fg-disabled ai-selected:bg-transparent ai-selected:outline-interactive-disabled outline-interactive-disabled hover:outline-interactive-disabled focus:outline-interactive-disabled",false:"cursor-pointer"},size:{medium:"px-s py-xs text-body-s",small:"px-s py-xs text-body-xs"}},defaultVariants:{isDisabled:false,size:"medium"}}),b=({className:e,isDisabled:t=false,size:s="medium",...o})=>jsx(Tag,{className:cn(A({isDisabled:t,size:s,className:e})),...o});b.displayName="Chip.Selectable";r.Selectable=b;var N=cva(cn(["fg-default-light group inline-flex w-content items-center justify-center gap-xs rounded-full outline outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover"]),{variants:{isDisabled:{true:"fg-disabled outline-interactive-disabled hover:outline-interactive-disabled",false:""},size:{medium:"p-xs pl-m text-body-s",small:"p-xs pl-s text-body-xs"}},defaultVariants:{isDisabled:false,size:"medium"}}),g=({children:e,className:t,isDisabled:s=false,size:o="medium",textValue:l,...n})=>{let h=l??(typeof e=="string"?e:void 0);return jsx(Tag,{className:cn(N({isDisabled:s,size:o,className:t})),textValue:h,...n,children:({allowsRemoving:u,...x})=>{if(!u)throw new Error("You have a <Chip.Deletable> in a <Chip.List> does not specify an onRemove handler.");return jsxs(Fragment,{children:[typeof e=="function"?e({allowsRemoving:u,...x}):e,jsx(Button,{slot:"remove",className:cn(["icon-size-[15px] icon-default-dark group-hover:icon-default-light group-focus:icon-default-light cursor-pointer",s&&"icon-disabled group-hover:icon-disabled cursor-not-allowed"]),children:jsx(Icon,{children:jsx(CancelFill,{})})})]})}})};g.displayName="Chip.Deletable";r.Deletable=g;export{r as Chip,g as DeletableChip,b as SelectableChip};//# sourceMappingURL=index.js.map
|
2
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/chip/index.tsx"],"names":["Chip","v","size","variant","props","Component","useContext","Coordinator","C","c","jsx","a","className","cn","chipStyles","children","items","P","renderEmptyState","ChipList","cva","i","SelectableChip","p","internalTextValue","AriaTag","isDisabled","allowsRemoving","jsxs","Fragment","Button","S","L","y","DeletableChip"],"mappings":"wSA8BI,+GAGA,CAAA,CAAA,CAAA,CAAA,QACE,CAAA,CAAS,OACG,CAAA,CAAA,QAAA,CAAA,mDAEV,CAAA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,GAAA,CAAA,CAAA,SAEIiB,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,UACAxB,CACA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,SAGJ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SAGC,CAAC,CAAA,CAAA,GAAA,CAAA,CAAA,QAAEyB,CAAAA,CAAAA,CAAAA,iBAA+B,GACjC,CAAI,CAACA,GACG,CAAA,GAAA,CAAA,CAAA,CAAA,UAEN,KAAA,CAAA,qFAIAC,CAAAC,OACUd,IAAAA,CAAAA,QAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA,OACJA,CAAAA,EAAAA,UAAW,CAAA,CAAA,CAAA,CAAA,cAA0B,CACrCA,CAAAA,CAAAA,GACHe,CAAA,CAAA,CACC,CAAK,CAAA,CAAAT,GAAA,CAAAU,MAAA,CAAA,CAAA,IAAA,CAAA,QACMlB,CAAAA,SAETa,CAAAA,EAAAA,CAAAA,CAAAA,4LAKA,CAAAL,GAAA,CAAAW,IAAA,CAAA,CAAA,QACF,CAAAX,GAAA,CACFY,UACF,CAAA,EAEJ,CACF,CAAA,CAEJ,EACAC,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,WACdlC,CAAAA,gBAAiBkC,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { cn } from '@/lib/utils';\nimport { CancelFill } from '@accelint/icons';\nimport { type VariantProps, cva } from 'cva';\nimport type React from 'react';\nimport { type ReactNode, createContext, useContext } from 'react';\nimport {\n Tag as AriaTag,\n TagGroup as AriaTagGroup,\n type TagGroupProps as AriaTagGroupProps,\n TagList as AriaTagList,\n type TagListProps as AriaTagListProps,\n type TagProps as AriaTagProps,\n Button,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\n\nconst chipStyles = cva(\n cn([\n 'fg-default-light inline-flex w-content items-center justify-center gap-xxs rounded-full outline',\n ]),\n {\n variants: {\n variant: {\n advisory: 'bg-advisory-subtle outline-advisory-bold',\n critical: 'bg-critical-subtle outline-critical',\n serious: 'bg-serious-subtle outline-serious',\n normal: 'bg-normal-subtle outline-normal',\n info: 'bg-info-subtle outline-info-bold',\n },\n size: {\n medium: 'icon-size-l px-s py-xs text-body-s',\n small: 'icon-size-m px-s py-xs text-body-xs',\n },\n },\n defaultVariants: {\n size: 'medium',\n variant: 'info',\n },\n },\n);\n\nexport interface ChipProps\n extends VariantProps<typeof chipStyles>,\n Omit<React.HTMLProps<HTMLSpanElement>, 'children' | 'size'> {\n className?: string;\n /** Used to add text to the badge, such as the number of unread notifications. */\n children?: ReactNode;\n}\n\n// This coordinator is used as a way for the `<Chip>` component to understand\n// whether or not it is being rendered inside of a `<Chip.List>`. This allows\n// us to opt-into using an `<AriaTag>` or a `<span>` to ensure standalone\n// functionality.\nconst Coordinator = createContext(false);\n\nexport const Chip = ({\n className,\n size = 'medium',\n variant = 'info',\n ...props\n}: ChipProps) => {\n const context = useContext(Coordinator);\n\n // If any context was returned from the `Coordinator` context, then\n // we are being rendered inside of a `Chip.List` and need to render\n // an `<AriaTag>`.\n const Component = context ? AriaTag : 'span';\n\n return (\n // @ts-expect-error we are intentionally omitting children.\n <Component\n className={cn(\n chipStyles({\n size,\n variant,\n className,\n }),\n )}\n {...props}\n />\n );\n};\nChip.displayName = 'Chip';\nChip.as = (\n props: VariantProps<typeof chipStyles>,\n className?: string | string[],\n) => cn(chipStyles({ ...props, className }));\n\nexport interface ChipListProps<T>\n extends Omit<AriaTagGroupProps, 'children'>,\n Pick<AriaTagListProps<T>, 'items' | 'children' | 'renderEmptyState'> {}\n\nfunction ChipList<T extends object>({\n children,\n className,\n items,\n renderEmptyState,\n ...props\n}: ChipListProps<T>) {\n return (\n <Coordinator.Provider value={true}>\n <AriaTagGroup {...props}>\n <AriaTagList<T>\n items={items}\n renderEmptyState={renderEmptyState}\n className={cn('flex flex-wrap gap-xs', className)}\n >\n {children}\n </AriaTagList>\n </AriaTagGroup>\n </Coordinator.Provider>\n );\n}\nChipList.displayName = 'Chip.List';\nChip.List = ChipList;\n\nconst selectableChipStyles = cva(\n cn([\n 'fg-default-light inline-flex w-content items-center justify-center rounded-full outline outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover',\n 'ai-selected:bg-highlight-subtle ai-selected:outline-highlight',\n ]),\n {\n variants: {\n isDisabled: {\n true: 'fg-disabled ai-selected:bg-transparent ai-selected:outline-interactive-disabled outline-interactive-disabled hover:outline-interactive-disabled focus:outline-interactive-disabled',\n false: 'cursor-pointer',\n },\n size: {\n medium: 'px-s py-xs text-body-s',\n small: 'px-s py-xs text-body-xs',\n },\n },\n defaultVariants: {\n isDisabled: false,\n size: 'medium',\n },\n },\n);\n\ninterface SelectableChipProps\n extends VariantProps<typeof selectableChipStyles>,\n Omit<AriaTagProps, 'isDisabled'> {}\n\nexport const SelectableChip = ({\n className,\n isDisabled = false,\n size = 'medium',\n ...props\n}: SelectableChipProps) => (\n <AriaTag\n className={cn(\n selectableChipStyles({\n isDisabled,\n size,\n className,\n }),\n )}\n {...props}\n />\n);\nSelectableChip.displayName = 'Chip.Selectable';\nChip.Selectable = SelectableChip;\n\nconst deletableChipStyles = cva(\n cn([\n 'fg-default-light group inline-flex w-content items-center justify-center gap-xs rounded-full outline outline-interactive hover:outline-interactive-hover focus:outline-interactive-hover',\n ]),\n {\n variants: {\n isDisabled: {\n true: 'fg-disabled outline-interactive-disabled hover:outline-interactive-disabled',\n false: '',\n },\n size: {\n medium: 'p-xs pl-m text-body-s',\n small: 'p-xs pl-s text-body-xs',\n },\n },\n defaultVariants: {\n isDisabled: false,\n size: 'medium',\n },\n },\n);\n\ninterface DeletableChipProps\n extends VariantProps<typeof deletableChipStyles>,\n Omit<AriaTagProps, 'isDisabled'> {}\n\nexport const DeletableChip = ({\n children,\n className,\n isDisabled = false,\n size = 'medium',\n textValue,\n ...props\n}: DeletableChipProps) => {\n const internalTextValue =\n textValue ?? (typeof children === 'string' ? children : undefined);\n\n return (\n <AriaTag\n className={cn(\n deletableChipStyles({\n isDisabled,\n size,\n className,\n }),\n )}\n textValue={internalTextValue}\n {...props}\n >\n {({ allowsRemoving, ...props }) => {\n if (!allowsRemoving) {\n throw new Error(\n 'You have a <Chip.Deletable> in a <Chip.List> does not specify an onRemove handler.',\n );\n }\n\n return (\n <>\n {typeof children === 'function'\n ? children({ allowsRemoving, ...props })\n : children}\n <Button\n slot='remove'\n className={cn([\n 'icon-size-[15px] icon-default-dark group-hover:icon-default-light group-focus:icon-default-light cursor-pointer',\n isDisabled &&\n 'icon-disabled group-hover:icon-disabled cursor-not-allowed',\n ])}\n >\n <Icon>\n <CancelFill />\n </Icon>\n </Button>\n </>\n );\n }}\n </AriaTag>\n );\n};\nDeletableChip.displayName = 'Chip.Deletable';\nChip.Deletable = DeletableChip;\n"]}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import * as cva_types from 'cva/types';
|
3
3
|
import { VariantProps } from 'cva';
|
4
|
-
import { ReactNode } from 'react';
|
5
4
|
|
6
5
|
declare const classificationBadge: (props?: ({
|
7
|
-
variant?: "missing" | "unclassified" | "cui" | "confidential" | "secret" | "top-secret" | "
|
6
|
+
variant?: "missing" | "unclassified" | "cui" | "confidential" | "secret" | "top-secret" | "ts-sci" | null | undefined;
|
8
7
|
size?: "small" | "medium" | null | undefined;
|
9
8
|
} & cva_types.ClassProp) | undefined) => string;
|
10
9
|
interface ClassificationBadgeProps extends VariantProps<typeof classificationBadge> {
|
11
10
|
className?: string;
|
12
|
-
children
|
11
|
+
/** If no text is provided, the system will fallback to safe defaults. You can override the text with children. */
|
12
|
+
children?: string;
|
13
13
|
}
|
14
14
|
declare const ClassificationBadge: {
|
15
15
|
({ className, size, variant, ...props }: ClassificationBadgeProps): react_jsx_runtime.JSX.Element;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {jsx}from'react/jsx-runtime';var s=cva("inline-flex items-center justify-center rounded-full uppercase",{variants:{variant:{missing:"fg-critical bg-classification-missing [&:empty]:before:content-['Missing']",unclassified:"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']",cui:"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']",confidential:"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']",secret:"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']","top-secret":"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']","
|
1
|
+
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {jsx}from'react/jsx-runtime';var s=cva("inline-flex items-center justify-center rounded-full uppercase",{variants:{variant:{missing:"fg-critical bg-classification-missing [&:empty]:before:content-['Missing']",unclassified:"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']",cui:"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']",confidential:"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']",secret:"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']","top-secret":"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']","ts-sci":"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['TS/SCI']"},size:{medium:"px-s py-xs text-header-s",small:"px-s py-xs text-header-xs"}},defaultVariants:{variant:"missing",size:"medium"}}),a=({className:i,size:e="medium",variant:n="missing",...c})=>jsx("span",{className:cn(s({size:e,variant:n,className:i})),...c});a.displayName="ClassificationBadge";a.as=(i,e)=>cn(s({...i,className:e}));export{a as ClassificationBadge};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/classification-badge/index.tsx"],"names":["size","
|
1
|
+
{"version":3,"sources":["../../../src/components/classification-badge/index.tsx"],"names":["size","f","variant","props","ClassificationBadge","className","cn","classificationBadge"],"mappings":"0KAkBI,CAAA,CAAA,QACW,CAAA,CAAA,OAEL,CAAA,CAAA,OAAA,CAAA,4EAEA,CAAA,YAAA,CAAA,sFAEF,CAAA,GAAA,CAAA,yEAAA,CAAA,wGAGE,CAAA,MAAA,CAAA,4FAGF,CAAA,uFAAA,CAAA,QAEF,CAAA,+EACM,CACJ,OAAQ,MACR,CAAA,0BAAO,oDAIT,CAAA,CAAA,OACA,CAAA,SACF,CAAA,IAAA,CAAA,QAWgC,CAClC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,SACAA,CAAAA,CAAAA,CAAO,IACP,CAAA,CAAA,CAAA,QAAA,CAAA,OAAU,CAAA,CAAA,CAAA,SAEZ,CAAA,GACG,CACC,CAAA,GAAAC,GAAA,CAAA,MAAA,CAAA,CAAA,SAEID,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CACA,IAAAE,CAAAA,CAAAA,CAAAA,mBAIH,CAAA,CAAGC,EACN,CAEFC,CAAAA,GAAkC,CAAA,CAAA,EAAA,CAAA,CAAA,WAAA,CAAA,qBAEhCD,CACAE,CAAAA,CAAAA,EAAAA,CACGC,EAAGC,CAAoB,CAAA,KAAKJ,CAAO,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\n\nconst classificationBadge = cva(\n 'inline-flex items-center justify-center rounded-full uppercase',\n {\n variants: {\n variant: {\n missing:\n \"fg-critical bg-classification-missing [&:empty]:before:content-['Missing']\",\n unclassified:\n \"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']\",\n cui: \"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']\",\n confidential:\n \"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']\",\n secret:\n \"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']\",\n 'top-secret':\n \"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']\",\n 'ts-sci':\n \"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['TS/SCI']\",\n },\n size: {\n medium: 'px-s py-xs text-header-s',\n small: 'px-s py-xs text-header-xs',\n },\n },\n defaultVariants: {\n variant: 'missing',\n size: 'medium',\n },\n },\n);\n\nexport interface ClassificationBadgeProps\n extends VariantProps<typeof classificationBadge> {\n className?: string;\n /** If no text is provided, the system will fallback to safe defaults. You can override the text with children. */\n children?: string;\n}\n\nexport const ClassificationBadge = ({\n className,\n size = 'medium',\n variant = 'missing',\n ...props\n}: ClassificationBadgeProps) => (\n <span\n className={cn(\n classificationBadge({\n size,\n variant,\n className,\n }),\n )}\n {...props}\n />\n);\nClassificationBadge.displayName = 'ClassificationBadge';\nClassificationBadge.as = (\n props: VariantProps<typeof classificationBadge>,\n className?: string | string[],\n) => cn(classificationBadge({ ...props, className }));\n"]}
|
@@ -4,10 +4,11 @@ import { VariantProps } from 'cva';
|
|
4
4
|
import { ReactNode } from 'react';
|
5
5
|
|
6
6
|
declare const classificationBanner: (props?: ({
|
7
|
-
variant?: "missing" | "unclassified" | "cui" | "confidential" | "secret" | "top-secret" | "
|
7
|
+
variant?: "missing" | "unclassified" | "cui" | "confidential" | "secret" | "top-secret" | "ts-sci" | null | undefined;
|
8
8
|
} & cva_types.ClassProp) | undefined) => string;
|
9
9
|
interface ClassificationBannerProps extends VariantProps<typeof classificationBanner> {
|
10
10
|
className?: string;
|
11
|
+
/** If no text is provided, the system will fallback to safe defaults. You can override the text with children. */
|
11
12
|
children?: ReactNode;
|
12
13
|
}
|
13
14
|
declare const ClassificationBanner: {
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {jsx}from'react/jsx-runtime';var n=cva("flex select-none items-center justify-center font-medium text-header-m uppercase",{variants:{variant:{missing:"fg-critical bg-classification-missing [&:empty]:before:content-['Missing_Classification']",unclassified:"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']",cui:"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']",confidential:"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']",secret:"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']","top-secret":"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']","
|
2
|
-
export{
|
1
|
+
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {jsx}from'react/jsx-runtime';var n=cva("flex select-none items-center justify-center font-medium text-header-m uppercase",{variants:{variant:{missing:"fg-critical bg-classification-missing [&:empty]:before:content-['Missing_Classification']",unclassified:"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']",cui:"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']",confidential:"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']",secret:"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']","top-secret":"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']","ts-sci":"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['Top_Secret//SCI']"}},defaultVariants:{variant:"missing"}}),s=({className:i,variant:e="missing",...a})=>jsx("span",{className:cn(n({variant:e,className:i})),...a});s.displayName="ClassificationBanner";s.as=(i,e)=>cn(n({...i,className:e}));
|
2
|
+
export{s as ClassificationBanner};//# sourceMappingURL=index.js.map
|
3
3
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/classification-banner/index.tsx"],"names":["c","className","
|
1
|
+
{"version":3,"sources":["../../../src/components/classification-banner/index.tsx"],"names":["c","className","o","variant","props","ClassificationBanner","cn","classificationBanner","t"],"mappings":"gGAiBE,IAAA,CAAA,CAAAA,GAAA,CAAA,kFAEY,CAAA,CAAA,iBAEN,CAAA,CAAA,OAEA,CAAA,2FAAA,CAAA,mGAEK,CAAA,GAAA,CAAA,sFAGL,CAAA,2FAAA,CACE,sFAEA,CAAA,YAAA,CAAA,uFAEA,CAAA,QAAA,CAAA,wFAGN,CAAA,CAAA,CAAA,eACW,CAAA,CAAA,OAAA,CAAA,SAYsB,CACnC,CAAAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,mBACU,CAAA,CAAA,CAAA,SAEZ,CAAA,GACG,CAAA,CAAA,GAAAC,GAAA,CAAA,iBAGKC,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,qBAIAC,CACN,CAAA,CAAA,CAEFC,GAAmC,CAAA,CAAA,EAAA,CAAA,CAAA,WAAA,CAAA,sBAEjCD,EACAH,CACGK,EAAAA,CAAAA,CAAAA,CAAGC,EAAqB,GAAEC,EAAGJ,EAAO,CAAAH,CAAAA,GAAAA,CAAAA,CAAAA,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport type { ReactNode } from 'react';\n\nconst classificationBanner = cva(\n 'flex select-none items-center justify-center font-medium text-header-m uppercase',\n {\n variants: {\n variant: {\n missing:\n \"fg-critical bg-classification-missing [&:empty]:before:content-['Missing_Classification']\",\n unclassified:\n \"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']\",\n cui: \"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']\",\n confidential:\n \"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']\",\n secret:\n \"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']\",\n 'top-secret':\n \"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']\",\n 'ts-sci':\n \"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['Top_Secret//SCI']\",\n },\n },\n defaultVariants: {\n variant: 'missing',\n },\n },\n);\n\nexport interface ClassificationBannerProps\n extends VariantProps<typeof classificationBanner> {\n className?: string;\n /** If no text is provided, the system will fallback to safe defaults. You can override the text with children. */\n children?: ReactNode;\n}\n\nexport const ClassificationBanner = ({\n className,\n variant = 'missing',\n ...props\n}: ClassificationBannerProps) => (\n <span\n className={cn(\n classificationBanner({\n variant,\n className,\n }),\n )}\n {...props}\n />\n);\nClassificationBanner.displayName = 'ClassificationBanner';\nClassificationBanner.as = (\n props: VariantProps<typeof classificationBanner>,\n className?: string | string[],\n) => cn(classificationBanner({ ...props, className }));\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {Button,composeRenderProps}from'react-aria-components';import {jsx}from'react/jsx-runtime';var
|
1
|
+
import {cn}from'./../../lib/utils.js';import {cva}from'cva';import {Button,composeRenderProps}from'react-aria-components';import {jsx}from'react/jsx-runtime';var o=cva(["absolute right-[20px] bottom-[20px] inline-flex size-[32px] cursor-pointer items-center justify-center rounded-full bg-transparent shadow-elevation-overlay outline outline-interactive-default","icon-default-dark [--icon-size:var(--spacing-xl)]","hover:icon-default-light hover:bg-interactive-hover-dark hover:outline-interactive-hover","focus:icon-default-light focus:bg-interactive-hover-dark focus:outline-interactive-hover"],{variants:{isDisabled:{true:"icon-disabled hover:icon-disabled cursor-not-allowed bg-interactive-disabled outline-interactive-disabled hover:bg-interactive-disabled hover:outline-interactive-disabled focus:bg-interactive-disabled focus:outline-interactive-disabled",false:""}},defaultVariants:{isDisabled:false}}),a=({className:e,isDisabled:t,...n})=>jsx(Button,{className:composeRenderProps(e,r=>cn(o({className:r,isDisabled:t}))),isDisabled:t,...n});a.displayName="FloatingButton";a.as=(e,t)=>cn(o({...e,className:t}));export{a as FloatingButton};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/floating-button/index.tsx"],"names":["s","FloatingButton","AriaButton","composeRenderProps","cn","floatingButtonStyles","
|
1
|
+
{"version":3,"sources":["../../../src/components/floating-button/index.tsx"],"names":["s","FloatingButton","AriaButton","composeRenderProps","cn","floatingButtonStyles","i","isDisabled","props","className"],"mappings":"8JAuBI,IAAA,CAAA,CAAAA,GAAA,CAAA,CAAA,iMAAA,CAAA,8IAGF,CAAA,0FAEY,CAAA,CAAA,CAAA,oBAEA,oPACC,CAAA,KAGX,CAAA,EAAA,CAAA,CAAA,CAAA,eACc,CAAA,CAAA,UAULC,MAAkB,CAC7B,gBACA,CAAA,CAAA,CAAA,UAEF,MACGC,CAAAA,CAAA,GACYC,GAAAA,CAAAA,MAAAA,CAAAA,CAAAA,SACTC,CAAAA,kBAAAA,CACEC,EAAqB,CACnB,EAAAC,EAAA,CAAA,CAAA,CAAA,CAAA,SACAC,CAAAA,CAAAA,CAAAA,UAIN,CAAYA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,UAEd,CAAA,CAAA,CAEFN,GAA6B,CAAA,CAAA,EAAA,CAAA,CAAA,WAAA,CAAA,gBAE3BO,EACAC,CACGL,EAAAA,CAAAA,CAAAA,CAAGC,EAAqB,GAAEC,EAAGE,EAAO,CAAAC,CAAAA,GAAAA,CAAAA,CAAAA,SAAY,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { cn } from '@/lib/utils';\nimport { type VariantProps, cva } from 'cva';\nimport {\n Button as AriaButton,\n type ButtonProps as AriaButtonProps,\n composeRenderProps,\n} from 'react-aria-components';\n\nconst floatingButtonStyles = cva(\n [\n 'absolute right-[20px] bottom-[20px] inline-flex size-[32px] cursor-pointer items-center justify-center rounded-full bg-transparent shadow-elevation-overlay outline outline-interactive-default',\n 'icon-default-dark [--icon-size:var(--spacing-xl)]',\n 'hover:icon-default-light hover:bg-interactive-hover-dark hover:outline-interactive-hover',\n 'focus:icon-default-light focus:bg-interactive-hover-dark focus:outline-interactive-hover',\n ],\n {\n variants: {\n isDisabled: {\n true: 'icon-disabled hover:icon-disabled cursor-not-allowed bg-interactive-disabled outline-interactive-disabled hover:bg-interactive-disabled hover:outline-interactive-disabled focus:bg-interactive-disabled focus:outline-interactive-disabled',\n false: '',\n },\n },\n defaultVariants: {\n isDisabled: false,\n },\n },\n);\n\nexport interface FloatingButtonProps\n extends Omit<AriaButtonProps, 'isDisabled'> {\n isDisabled?: boolean;\n}\n\nexport const FloatingButton = ({\n className,\n isDisabled,\n ...props\n}: FloatingButtonProps) => (\n <AriaButton\n className={composeRenderProps(className, (className) =>\n cn(\n floatingButtonStyles({\n className,\n isDisabled,\n }),\n ),\n )}\n isDisabled={isDisabled}\n {...props}\n />\n);\nFloatingButton.displayName = 'FloatingButton';\nFloatingButton.as = (\n props: VariantProps<typeof floatingButtonStyles>,\n className?: string | string[],\n) => cn(floatingButtonStyles({ ...props, className }));\n"]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import * as cva_types from 'cva/types';
|
3
|
+
import { VariantProps } from 'cva';
|
4
|
+
import { ReactNode } from 'react';
|
5
|
+
|
6
|
+
declare const iconStyles: (props?: ({
|
7
|
+
size?: "small" | "medium" | "large" | "xsmall" | null | undefined;
|
8
|
+
} & cva_types.ClassProp) | undefined) => string;
|
9
|
+
interface IconProps extends VariantProps<typeof iconStyles> {
|
10
|
+
className?: string;
|
11
|
+
children: ReactNode;
|
12
|
+
}
|
13
|
+
declare const Icon: {
|
14
|
+
({ children, className, size, ...rest }: IconProps): react_jsx_runtime.JSX.Element;
|
15
|
+
displayName: string;
|
16
|
+
as(props: VariantProps<typeof iconStyles>, className?: string | string[]): string;
|
17
|
+
};
|
18
|
+
|
19
|
+
export { Icon, type IconProps };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {cva}from'cva';import {cn}from'../../lib/utils.js';import {jsx}from'react/jsx-runtime';var e=cva("inline-block [color:var(--icon-color,currentColor)] [height:var(--icon-size)] [width:var(--icon-size)]",{variants:{size:{large:"h-[var(--icon-size,24px)] w-[var(--icon-size,24px)]",medium:"h-[var(--icon-size,20px)] w-[var(--icon-size,20px)]",small:"h-[var(--icon-size,16px)] w-[var(--icon-size,16px)]",xsmall:"h-[var(--icon-size,12px)] w-[var(--icon-size,12px)]"}},defaultVariants:{size:"medium"}}),a=({children:i,className:o,size:n,...s})=>jsx("span",{className:cn(e({size:n}),o),...s,children:i});a.displayName="Icon";a.as=(i,o)=>cn(e({...i,className:o}));export{a as Icon};//# sourceMappingURL=index.js.map
|
2
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/icon/index.tsx"],"names":["iconStyles","cva","Icon","children","className","size","rest","t","cn","props"],"mappings":"8FAgBMA,IAAaC,CAAAA,CAAAA,GACjB,yGACA,CACE,CAAA,QAAU,CACR,CAAM,IAAA,CACJ,CAAO,KAAA,CAAA,qDACP,OAAQ,CACR,qDAAA,CAAA,KAAO,CACP,qDAAA,CAAA,MAAQ,sDAEZ,CAAA,CACA,CAAiB,eAAA,CACf,KAAM,CACR,QACF,CACF,CAOaC,CAAAA,CAAAA,CAAO,CAAC,CAAE,CAAA,QAAAC,CAAU,CAAA,CAAA,SAAAC,EAAW,CAAAC,IAAAA,CAAAA,CAAM,CAAGC,GAAK,KAErDC,GAAA,CAAA,MAAA,CACC,CAAWC,SAAAA,CAAAA,EACTR,EAAW,CACT,CAAA,IAAAK,CACF,CAAC,CAAA,CACDD,CACF,CACC,CAAA,CAAA,GAEA,CAAA,CAAA,QAAAD,EACH,CAGJD,EAAAA,CAAK,YAAc,CACnBA,MAAAA,CAAAA,CAAK,GAAK,CACRO,CAAAA,CACAL,CACGI,CAAAA,GAAAA,EAAGR,EAAW,CAAE,CAAA,IAAU,CAAAI,SAAAA,CAAU,CAAC,CAAC,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { type VariantProps, cva } from 'cva';\nimport type { ReactNode } from 'react';\nimport { cn } from '../../lib/utils';\n\nconst iconStyles = cva(\n 'inline-block [color:var(--icon-color,currentColor)] [height:var(--icon-size)] [width:var(--icon-size)]',\n {\n variants: {\n size: {\n large: 'h-[var(--icon-size,24px)] w-[var(--icon-size,24px)]',\n medium: 'h-[var(--icon-size,20px)] w-[var(--icon-size,20px)]',\n small: 'h-[var(--icon-size,16px)] w-[var(--icon-size,16px)]',\n xsmall: 'h-[var(--icon-size,12px)] w-[var(--icon-size,12px)]',\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n },\n);\n\nexport interface IconProps extends VariantProps<typeof iconStyles> {\n className?: string;\n children: ReactNode;\n}\n\nexport const Icon = ({ children, className, size, ...rest }: IconProps) => {\n return (\n <span\n className={cn(\n iconStyles({\n size,\n }),\n className,\n )}\n {...rest}\n >\n {children}\n </span>\n );\n};\nIcon.displayName = 'Icon';\nIcon.as = (\n props: VariantProps<typeof iconStyles>,\n className?: string | string[],\n) => cn(iconStyles({ ...props, className }));\n"]}
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'cva';
|
|
4
4
|
import { ButtonProps } from 'react-aria-components';
|
5
5
|
|
6
6
|
declare const iconButtonStyles: (props?: ({
|
7
|
-
variant?: "primary" | "secondary" | null | undefined;
|
7
|
+
variant?: "primary" | "secondary" | "child" | null | undefined;
|
8
8
|
size?: "small" | "medium" | null | undefined;
|
9
9
|
isDisabled?: boolean | null | undefined;
|
10
10
|
} & cva_types.ClassProp) | undefined) => string;
|