@spear-ai/spectral 1.3.34 → 1.3.36
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/.js +16 -14
- package/dist/Accordion/AccordionBase.d.ts +42 -0
- package/dist/Accordion/AccordionBase.js +1 -0
- package/dist/App.js +1 -0
- package/dist/Badge/BadgeBase.d.ts +13 -0
- package/dist/Badge/BadgeBase.js +1 -0
- package/dist/Badge.d.ts +3 -0
- package/dist/Badge.js +1 -0
- package/dist/Button.d.ts +23 -0
- package/dist/Button.js +1 -0
- package/dist/Card.d.ts +10 -0
- package/dist/Card.js +1 -0
- package/dist/Checkbox/CheckboxBase.d.ts +30 -0
- package/dist/Checkbox/CheckboxBase.js +1 -0
- package/dist/Dialog/DialogBase.d.ts +71 -0
- package/dist/Dialog/DialogBase.js +1 -0
- package/dist/Dialog.d.ts +16 -0
- package/dist/Dialog.js +1 -0
- package/dist/Drawer.d.ts +13 -0
- package/dist/Drawer.js +1 -0
- package/dist/Icons/AnnotationsIcon.d.ts +3 -0
- package/dist/Icons/AnnotationsIcon.js +1 -0
- package/dist/Icons/CalendarIcon.d.ts +3 -0
- package/dist/Icons/CalendarIcon.js +1 -0
- package/dist/Icons/ClockIcon.d.ts +3 -0
- package/dist/Icons/ClockIcon.js +1 -0
- package/dist/Icons/DashboardIcon.d.ts +3 -0
- package/dist/Icons/DashboardIcon.js +1 -0
- package/dist/Icons/DeleteIcon.d.ts +3 -0
- package/dist/Icons/DeleteIcon.js +1 -0
- package/dist/Icons/DurationIcon.d.ts +3 -0
- package/dist/Icons/DurationIcon.js +1 -0
- package/dist/Icons/EraserIcon.d.ts +3 -0
- package/dist/Icons/EraserIcon.js +1 -0
- package/dist/Icons/GoToFirstIcon.d.ts +3 -0
- package/dist/Icons/GoToFirstIcon.js +1 -0
- package/dist/Icons/GoToLastIcon.d.ts +3 -0
- package/dist/Icons/GoToLastIcon.js +1 -0
- package/dist/Icons/HarmonicCursorsIcon.d.ts +3 -0
- package/dist/Icons/HarmonicCursorsIcon.js +1 -0
- package/dist/Icons/IconBase.d.ts +14 -0
- package/dist/Icons/IconBase.js +1 -0
- package/dist/Icons/InfoIcon.d.ts +3 -0
- package/dist/Icons/InfoIcon.js +1 -0
- package/dist/Icons/LabelIcon.d.ts +3 -0
- package/dist/Icons/LabelIcon.js +1 -0
- package/dist/Icons/LassoIcon.d.ts +3 -0
- package/dist/Icons/LassoIcon.js +1 -0
- package/dist/Icons/LineToolIcon.d.ts +3 -0
- package/dist/Icons/LineToolIcon.js +1 -0
- package/dist/Icons/LiveViewIcon.d.ts +3 -0
- package/dist/Icons/LiveViewIcon.js +1 -0
- package/dist/Icons/LocationIcon.d.ts +3 -0
- package/dist/Icons/LocationIcon.js +1 -0
- package/dist/Icons/LogoutIcon.d.ts +3 -0
- package/dist/Icons/LogoutIcon.js +1 -0
- package/dist/Icons/MetadataIcon.d.ts +3 -0
- package/dist/Icons/MetadataIcon.js +1 -0
- package/dist/Icons/OntologyIcon.d.ts +3 -0
- package/dist/Icons/OntologyIcon.js +1 -0
- package/dist/Icons/PanelIcon.d.ts +3 -0
- package/dist/Icons/PanelIcon.js +1 -0
- package/dist/Icons/PlayIcon.d.ts +3 -0
- package/dist/Icons/PlayIcon.js +1 -0
- package/dist/Icons/PlusIcon.d.ts +3 -0
- package/dist/Icons/PlusIcon.js +1 -0
- package/dist/Icons/ResetIcon.d.ts +3 -0
- package/dist/Icons/ResetIcon.js +1 -0
- package/dist/Icons/ScissorsIcon.d.ts +3 -0
- package/dist/Icons/ScissorsIcon.js +1 -0
- package/dist/Icons/SettingsIcon.d.ts +3 -0
- package/dist/Icons/SettingsIcon.js +1 -0
- package/dist/Icons/TrashIcon.d.ts +3 -0
- package/dist/Icons/TrashIcon.js +1 -0
- package/dist/Icons/UndoIcon.d.ts +3 -0
- package/dist/Icons/UndoIcon.js +1 -0
- package/dist/Icons/UserIcon.d.ts +3 -0
- package/dist/Icons/UserIcon.js +1 -0
- package/dist/Icons/WarningIcon.d.ts +3 -0
- package/dist/Icons/WarningIcon.js +1 -0
- package/dist/Icons/ZoomAllIcon.d.ts +3 -0
- package/dist/Icons/ZoomAllIcon.js +1 -0
- package/dist/Icons/ZoomXIcon.d.ts +3 -0
- package/dist/Icons/ZoomXIcon.js +1 -0
- package/dist/Icons/ZoomYIcon.d.ts +3 -0
- package/dist/Icons/ZoomYIcon.js +1 -0
- package/dist/Icons/index.d.ts +33 -0
- package/dist/Label.d.ts +8 -0
- package/dist/Label.js +1 -0
- package/dist/Popover.d.ts +11 -0
- package/dist/Popover.js +1 -0
- package/dist/RadioGroup/RadioGroupBase.d.ts +52 -0
- package/dist/RadioGroup/RadioGroupBase.js +1 -0
- package/dist/RadioGroup.d.ts +11 -0
- package/dist/RadioGroup.js +1 -0
- package/dist/Skeleton.d.ts +4 -0
- package/dist/Skeleton.js +1 -0
- package/dist/Slider/SliderBase.d.ts +54 -0
- package/dist/Slider/SliderBase.js +1 -0
- package/dist/Slider.d.ts +6 -0
- package/dist/Slider.js +1 -0
- package/dist/SpectralProvider.d.ts +30 -0
- package/dist/SpectralProvider.js +7 -0
- package/dist/Switch/SwitchBase.d.ts +25 -0
- package/dist/Switch/SwitchBase.js +1 -0
- package/dist/Switch.d.ts +12 -0
- package/dist/Switch.js +1 -0
- package/dist/Toggle/ToggleBase.d.ts +14 -0
- package/dist/Toggle/ToggleBase.js +1 -0
- package/dist/Toggle.d.ts +11 -0
- package/dist/Toggle.js +1 -0
- package/dist/ToggleGroup/ToggleGroupBase.d.ts +30 -0
- package/dist/ToggleGroup/ToggleGroupBase.js +1 -0
- package/dist/ToggleGroup.d.ts +12 -0
- package/dist/ToggleGroup.js +1 -0
- package/dist/Tooltip/TooltipBase.d.ts +51 -0
- package/dist/Tooltip/TooltipBase.js +1 -0
- package/dist/Tooltip.d.ts +9 -0
- package/dist/Tooltip.js +1 -0
- package/dist/components/SpectralProvider/SpectralProvider.d.ts +30 -0
- package/dist/components/SpectralProvider/SpectralProvider.d.ts.map +1 -0
- package/dist/components/SpectralProvider/index.d.ts +2 -0
- package/dist/components/SpectralProvider/index.d.ts.map +1 -0
- package/dist/features/ClearDialog.js +1 -0
- package/dist/features/HorizonColorGrid.js +1 -0
- package/dist/features/LabelingToolbar.js +1 -0
- package/dist/features/LabelingTools.js +1 -0
- package/dist/features/SensorMetadata.js +1 -0
- package/dist/features/SettingsPopover.js +1 -0
- package/dist/index-B7LSgz_k.js +1 -0
- package/dist/index-gg2zpNk0.js +1 -0
- package/dist/index-sDEISz8i.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/styles/base-colors.css +53 -0
- package/dist/styles/main.css +1 -0
- package/package.json +16 -7
- package/dist/assets/main.css +0 -1
- package/src/styles/main.css +0 -7
package/dist/Icons/PanelIcon.js
CHANGED
package/dist/Icons/PlayIcon.js
CHANGED
package/dist/Icons/PlusIcon.js
CHANGED
package/dist/Icons/ResetIcon.js
CHANGED
package/dist/Icons/TrashIcon.js
CHANGED
package/dist/Icons/UndoIcon.js
CHANGED
package/dist/Icons/UserIcon.js
CHANGED
package/dist/Icons/ZoomXIcon.js
CHANGED
package/dist/Icons/ZoomYIcon.js
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { AnnotationsIcon } from './AnnotationsIcon';
|
|
2
|
+
export { CalendarIcon } from './CalendarIcon';
|
|
3
|
+
export { ClockIcon } from './ClockIcon';
|
|
4
|
+
export { DashboardIcon } from './DashboardIcon';
|
|
5
|
+
export { DeleteIcon } from './DeleteIcon';
|
|
6
|
+
export { DurationIcon } from './DurationIcon';
|
|
7
|
+
export { EraserIcon } from './EraserIcon';
|
|
8
|
+
export { GoToFirstIcon } from './GoToFirstIcon';
|
|
9
|
+
export { GoToLastIcon } from './GoToLastIcon';
|
|
10
|
+
export { HarmonicCursorsIcon } from './HarmonicCursorsIcon';
|
|
11
|
+
export { InfoIcon } from './InfoIcon';
|
|
12
|
+
export { LabelIcon } from './LabelIcon';
|
|
13
|
+
export { LassoIcon } from './LassoIcon';
|
|
14
|
+
export { LineToolIcon } from './LineToolIcon';
|
|
15
|
+
export { LiveViewIcon } from './LiveViewIcon';
|
|
16
|
+
export { LocationIcon } from './LocationIcon';
|
|
17
|
+
export { LogoutIcon } from './LogoutIcon';
|
|
18
|
+
export { MetadataIcon } from './MetadataIcon';
|
|
19
|
+
export { OntologyIcon } from './OntologyIcon';
|
|
20
|
+
export { PanelIcon } from './PanelIcon';
|
|
21
|
+
export { PlayIcon } from './PlayIcon';
|
|
22
|
+
export { PlusIcon } from './PlusIcon';
|
|
23
|
+
export { ResetIcon } from './ResetIcon';
|
|
24
|
+
export { ScissorsIcon } from './ScissorsIcon';
|
|
25
|
+
export { SettingsIcon } from './SettingsIcon';
|
|
26
|
+
export { TrashIcon } from './TrashIcon';
|
|
27
|
+
export { UndoIcon } from './UndoIcon';
|
|
28
|
+
export { UserIcon } from './UserIcon';
|
|
29
|
+
export { WarningIcon } from './WarningIcon';
|
|
30
|
+
export { ZoomAllIcon } from './ZoomAllIcon';
|
|
31
|
+
export { ZoomXIcon } from './ZoomXIcon';
|
|
32
|
+
export { ZoomYIcon } from './ZoomYIcon';
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/Label.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LabelHTMLAttributes, Ref } from '../../../node_modules/react';
|
|
2
|
+
export type LabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
3
|
+
htmlFor: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
ref?: Ref<HTMLLabelElement>;
|
|
6
|
+
};
|
|
7
|
+
export declare const Label: import('../../../node_modules/react').ForwardRefExoticComponent<Omit<LabelProps, "ref"> & import('../../../node_modules/react').RefAttributes<HTMLLabelElement>>;
|
|
8
|
+
//# sourceMappingURL=Label.d.ts.map
|
package/dist/Label.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from '../../../node_modules/react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
export type PopoverContentProps = ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
4
|
+
width?: number | string;
|
|
5
|
+
};
|
|
6
|
+
declare function Popover({ ...props }: ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function PopoverTrigger({ ...props }: ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function PopoverContent({ className, align, sideOffset, width, ...props }: PopoverContentProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function PopoverAnchor({ ...props }: ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
11
|
+
//# sourceMappingURL=Popover.d.ts.map
|
package/dist/Popover.js
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AsChildProp } from '../../primitives/slot';
|
|
2
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from '../../../node_modules/react';
|
|
3
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
4
|
+
type Dir = 'ltr' | 'rtl';
|
|
5
|
+
type GroupBaseProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'role'>;
|
|
6
|
+
export type RadioGroupProps = GroupBaseProps & AsChildProp & {
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onValueChange?: (value: string | undefined) => void;
|
|
10
|
+
name?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
form?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
orientation?: Orientation;
|
|
15
|
+
dir?: Dir;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
variant?: 'default' | 'unstyled';
|
|
18
|
+
};
|
|
19
|
+
type ItemBaseProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'role' | 'value'>;
|
|
20
|
+
export type RadioGroupItemProps = ItemBaseProps & AsChildProp & {
|
|
21
|
+
value: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
id?: string;
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
};
|
|
26
|
+
export type RadioGroupIndicatorProps = HTMLAttributes<HTMLSpanElement> & AsChildProp & {
|
|
27
|
+
forceMount?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare const RadioGroup: import('../../../node_modules/react').ForwardRefExoticComponent<GroupBaseProps & AsChildProp & {
|
|
30
|
+
value?: string;
|
|
31
|
+
defaultValue?: string;
|
|
32
|
+
onValueChange?: (value: string | undefined) => void;
|
|
33
|
+
name?: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
form?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
orientation?: Orientation;
|
|
38
|
+
dir?: Dir;
|
|
39
|
+
loop?: boolean;
|
|
40
|
+
variant?: "default" | "unstyled";
|
|
41
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export declare const RadioGroupItem: import('../../../node_modules/react').ForwardRefExoticComponent<ItemBaseProps & AsChildProp & {
|
|
43
|
+
value: string;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
id?: string;
|
|
46
|
+
'aria-label'?: string;
|
|
47
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
export declare const RadioGroupIndicator: import('../../../node_modules/react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & AsChildProp & {
|
|
49
|
+
forceMount?: boolean;
|
|
50
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLSpanElement>>;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=RadioGroupBase.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import "../styles/main.css";
|
|
2
3
|
import { jsx as A, jsxs as T } from "react/jsx-runtime";
|
|
3
4
|
import { Slot as L } from "../primitives/slot.js";
|
|
4
5
|
import { createContext as z, forwardRef as P, useId as $, useState as U, useRef as G, useEffect as C, useCallback as E, useContext as B, useImperativeHandle as K } from "react";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from '../../../node_modules/react';
|
|
2
|
+
import * as RadioGroupPrimitive from './RadioGroupBase';
|
|
3
|
+
type RadioGroupVariant = 'default' | 'unstyled';
|
|
4
|
+
export type RadioGroupProps = ComponentProps<typeof RadioGroupPrimitive.RadioGroup> & {
|
|
5
|
+
variant?: RadioGroupVariant;
|
|
6
|
+
};
|
|
7
|
+
export type RadioGroupItemProps = ComponentProps<typeof RadioGroupPrimitive.RadioGroupItem>;
|
|
8
|
+
export declare const RadioGroup: ({ className, variant, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const RadioGroupItem: ({ className, children, ...props }: RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
package/dist/RadioGroup.js
CHANGED
package/dist/Skeleton.js
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AsChildProp } from '../../primitives/slot';
|
|
2
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from '../../../node_modules/react';
|
|
3
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
4
|
+
type Dir = 'ltr' | 'rtl';
|
|
5
|
+
export type SliderBaseProps = HTMLAttributes<HTMLDivElement> & AsChildProp & {
|
|
6
|
+
value?: number[];
|
|
7
|
+
defaultValue?: number[];
|
|
8
|
+
onValueChange?: (values: number[]) => void;
|
|
9
|
+
onValueCommit?: (values: number[]) => void;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
step?: number;
|
|
13
|
+
minStepsBetweenThumbs?: number;
|
|
14
|
+
orientation?: Orientation;
|
|
15
|
+
dir?: Dir;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
name?: string;
|
|
18
|
+
form?: string;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const SliderBase: import('../../../node_modules/react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & AsChildProp & {
|
|
22
|
+
value?: number[];
|
|
23
|
+
defaultValue?: number[];
|
|
24
|
+
onValueChange?: (values: number[]) => void;
|
|
25
|
+
onValueCommit?: (values: number[]) => void;
|
|
26
|
+
min?: number;
|
|
27
|
+
max?: number;
|
|
28
|
+
step?: number;
|
|
29
|
+
minStepsBetweenThumbs?: number;
|
|
30
|
+
orientation?: Orientation;
|
|
31
|
+
dir?: Dir;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
name?: string;
|
|
34
|
+
form?: string;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLDivElement>>;
|
|
37
|
+
export type SliderTrackProps = HTMLAttributes<HTMLDivElement> & AsChildProp;
|
|
38
|
+
export declare const SliderTrack: import('../../../node_modules/react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & AsChildProp & import('../../../node_modules/react').RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export type SliderRangeProps = HTMLAttributes<HTMLDivElement> & AsChildProp;
|
|
40
|
+
export declare const SliderRange: import('../../../node_modules/react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & AsChildProp & import('../../../node_modules/react').RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export type SliderThumbProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value'> & AsChildProp & {
|
|
42
|
+
index?: number;
|
|
43
|
+
'aria-label'?: string;
|
|
44
|
+
'aria-labelledby'?: string;
|
|
45
|
+
'aria-valuetext'?: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const SliderThumb: import('../../../node_modules/react').ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"> & AsChildProp & {
|
|
48
|
+
index?: number;
|
|
49
|
+
'aria-label'?: string;
|
|
50
|
+
'aria-labelledby'?: string;
|
|
51
|
+
'aria-valuetext'?: string;
|
|
52
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=SliderBase.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import "../styles/main.css";
|
|
2
3
|
import { jsx as k, jsxs as Q } from "react/jsx-runtime";
|
|
3
4
|
import { Slot as P } from "../primitives/slot.js";
|
|
4
5
|
import { createContext as W, forwardRef as E, useEffect as Z, useRef as G, useState as B, useCallback as A, useContext as F, createRef as _ } from "react";
|
package/dist/Slider.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SliderBaseProps } from './SliderBase';
|
|
2
|
+
export type SliderProps = SliderBaseProps & {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const Slider: ({ className, defaultValue, value, min, max, step, minStepsBetweenThumbs, onValueChange, orientation, onValueCommit, disabled, name, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=Slider.d.ts.map
|
package/dist/Slider.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FC, ReactNode } from '../../../node_modules/react';
|
|
2
|
+
export interface SpectralProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Adds a wrapper div with spectral-root class for CSS isolation.
|
|
7
|
+
* Set to false if you want to manage CSS specificity yourself.
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
isolated?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Optional provider component for Spectral components.
|
|
14
|
+
* Provides CSS isolation when needed to prevent style conflicts.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* // With isolation (recommended for apps with conflicting styles)
|
|
19
|
+
* <SpectralProvider>
|
|
20
|
+
* <Button>Click me</Button>
|
|
21
|
+
* </SpectralProvider>
|
|
22
|
+
*
|
|
23
|
+
* // Without wrapper (when you have full control over styles)
|
|
24
|
+
* <SpectralProvider isolated={false}>
|
|
25
|
+
* <Button>Click me</Button>
|
|
26
|
+
* </SpectralProvider>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const SpectralProvider: FC<SpectralProviderProps>;
|
|
30
|
+
//# sourceMappingURL=SpectralProvider.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./styles/main.css";
|
|
2
|
+
import { jsx as t, Fragment as a } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
const s = ({ children: r, className: e = "", isolated: o = !0 }) => o ? /* @__PURE__ */ t("div", { className: `spectral-root ${e}`, children: r }) : /* @__PURE__ */ t(a, { children: r });
|
|
5
|
+
export {
|
|
6
|
+
s as SpectralProvider
|
|
7
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AsChildProp } from '../../primitives/slot';
|
|
2
|
+
import { ButtonHTMLAttributes, HTMLAttributes } from '../../../node_modules/react';
|
|
3
|
+
type BaseButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'value'>;
|
|
4
|
+
export type SwitchProps = BaseButtonProps & AsChildProp & {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
8
|
+
name?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
form?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const Switch: import('../../../node_modules/react').ForwardRefExoticComponent<BaseButtonProps & AsChildProp & {
|
|
14
|
+
checked?: boolean;
|
|
15
|
+
defaultChecked?: boolean;
|
|
16
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
17
|
+
name?: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
form?: string;
|
|
21
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export type SwitchThumbProps = HTMLAttributes<HTMLSpanElement> & AsChildProp;
|
|
23
|
+
export declare const SwitchThumb: import('../../../node_modules/react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & AsChildProp & import('../../../node_modules/react').RefAttributes<HTMLSpanElement>>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=SwitchBase.d.ts.map
|
package/dist/Switch.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SwitchProps as SwitchBaseProps } from './SwitchBase';
|
|
2
|
+
export declare const Switch: import('../../../node_modules/react').ForwardRefExoticComponent<Omit<SwitchBaseProps, "onCheckedChange"> & {
|
|
3
|
+
labelPosition?: "left" | "right";
|
|
4
|
+
labelText: string;
|
|
5
|
+
id: string;
|
|
6
|
+
hideLabel?: boolean;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
value?: string;
|
|
10
|
+
variant?: "default" | "squared";
|
|
11
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
//# sourceMappingURL=Switch.d.ts.map
|
package/dist/Switch.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from '../../../node_modules/react';
|
|
2
|
+
export type ToggleProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> & {
|
|
3
|
+
pressed?: boolean;
|
|
4
|
+
defaultPressed?: boolean;
|
|
5
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const ToggleBase: import('../../../node_modules/react').ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> & {
|
|
9
|
+
pressed?: boolean;
|
|
10
|
+
defaultPressed?: boolean;
|
|
11
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
} & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
//# sourceMappingURL=ToggleBase.d.ts.map
|
package/dist/Toggle.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ToggleBase } from './ToggleBase';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { ComponentProps } from '../../../node_modules/react';
|
|
4
|
+
export type ToggleProps = ComponentProps<typeof ToggleBase> & VariantProps<typeof toggleVariants>;
|
|
5
|
+
export declare const toggleVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "outline" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
layout?: "default" | "expanded" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
export declare const Toggle: import('../../../node_modules/react').ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
//# sourceMappingURL=Toggle.d.ts.map
|
package/dist/Toggle.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from '../../../node_modules/react';
|
|
2
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
3
|
+
export type CommonGroupProps = {
|
|
4
|
+
orientation?: Orientation;
|
|
5
|
+
loop?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
value?: string | string[];
|
|
9
|
+
defaultValue?: string | string[];
|
|
10
|
+
onValueChange?: (v: string | string[]) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export type SingleProps = CommonGroupProps & {
|
|
14
|
+
type?: 'single';
|
|
15
|
+
};
|
|
16
|
+
export type MultipleProps = CommonGroupProps & {
|
|
17
|
+
type: 'multiple';
|
|
18
|
+
};
|
|
19
|
+
export type ToggleGroupProps = (SingleProps | MultipleProps) & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
|
|
20
|
+
export type ItemRenderProps = {
|
|
21
|
+
value: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const ToggleGroupBase: (props: ToggleGroupProps & Record<`data-${string}`, any>) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export type ToggleGroupItemProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'onPressedChange' | 'pressed' | 'defaultPressed'> & ItemRenderProps;
|
|
28
|
+
export declare const ToggleGroupItemBase: import('../../../node_modules/react').ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "pressed" | "defaultPressed" | "onPressedChange"> & ItemRenderProps & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=ToggleGroupBase.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import "../styles/main.css";
|
|
2
3
|
import { jsx as B, jsxs as E } from "react/jsx-runtime";
|
|
3
4
|
import { useControllableState as R, clamp as M } from "../utils/shared.js";
|
|
4
5
|
import { createContext as j, forwardRef as H, useContext as K, useRef as S, useImperativeHandle as L, useEffect as N, useCallback as i, useMemo as U } from "react";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToggleGroupBase } from './ToggleGroupBase';
|
|
2
|
+
import { toggleVariants } from '../Toggle/Toggle';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { ComponentProps } from '../../../node_modules/react';
|
|
5
|
+
export type ToggleGroupProps = ComponentProps<typeof ToggleGroupBase> & VariantProps<typeof toggleVariants>;
|
|
6
|
+
export declare const ToggleGroup: ({ className, variant, size, layout, children, ...props }: ToggleGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ToggleGroupItem: import('../../../node_modules/react').ForwardRefExoticComponent<Omit<Omit<import('../../../node_modules/react').ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "pressed" | "defaultPressed" | "onPressedChange"> & import('./ToggleGroupBase').ItemRenderProps & import('../../../node_modules/react').RefAttributes<HTMLButtonElement> & VariantProps<(props?: ({
|
|
8
|
+
variant?: "default" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
layout?: "default" | "expanded" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('../../../node_modules/react').RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
//# sourceMappingURL=ToggleGroup.d.ts.map
|