@spear-ai/spectral 0.1.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +7 -83
  2. package/dist/{components/Button/Button.d.ts → Button.d.ts} +10 -6
  3. package/dist/Button.js +98 -0
  4. package/dist/Card.css +4 -0
  5. package/dist/Card.d.ts +13 -0
  6. package/dist/Card.js +31 -0
  7. package/dist/Drawer.d.ts +14 -0
  8. package/dist/Drawer.js +42 -0
  9. package/dist/{components/Skeleton/Skeleton.d.ts → Skeleton.d.ts} +4 -1
  10. package/dist/Skeleton.js +14 -0
  11. package/dist/{components/Slider/Slider.d.ts → Slider.d.ts} +7 -4
  12. package/dist/Slider.js +79 -0
  13. package/dist/chunk-ZLENOYB4.js +12 -0
  14. package/dist/index.css +189 -0
  15. package/dist/index.d.ts +75 -22
  16. package/dist/index.js +276 -0
  17. package/package.json +66 -43
  18. package/src/styles/horizon.css +35 -0
  19. package/src/styles/main.css +34 -0
  20. package/dist/App.d.ts +0 -1
  21. package/dist/components/Accordion/Accordion.d.ts +0 -35
  22. package/dist/components/Card/Card.d.ts +0 -9
  23. package/dist/components/Checkbox/Checkbox.d.ts +0 -10
  24. package/dist/components/Input/Input.d.ts +0 -21
  25. package/dist/components/Input/InputUtils.d.ts +0 -10
  26. package/dist/components/InputOtp/InputOtp.d.ts +0 -29
  27. package/dist/components/Label/Label.d.ts +0 -3
  28. package/dist/components/RadioGroup/Label.d.ts +0 -4
  29. package/dist/components/RadioGroup/RadioGroup.d.ts +0 -38
  30. package/dist/components/Select/Select.d.ts +0 -24
  31. package/dist/components/Select/SelectList.d.ts +0 -17
  32. package/dist/components/Sidebar/Sidebar.d.ts +0 -1
  33. package/dist/components/Sidebar/SidebarBase.d.ts +0 -65
  34. package/dist/components/Switch/Switch.d.ts +0 -16
  35. package/dist/components/Textarea/Textarea.d.ts +0 -16
  36. package/dist/components/Textarea/TextareaUtils.d.ts +0 -44
  37. package/dist/favicon-invert.svg +0 -5
  38. package/dist/favicon.svg +0 -5
  39. package/dist/hooks/useAccordionAutoScroll.d.ts +0 -8
  40. package/dist/hooks/useOutsideClick.d.ts +0 -7
  41. package/dist/hooks/useTheme.d.ts +0 -7
  42. package/dist/logo/wordmark-dark-side-by-side.svg +0 -6
  43. package/dist/logo/wordmark-light-side-by-side.svg +0 -6
  44. package/dist/main.d.ts +0 -0
  45. package/dist/primitives/button.d.ts +0 -10
  46. package/dist/primitives/input.d.ts +0 -3
  47. package/dist/primitives/tooltip.d.ts +0 -7
  48. package/dist/spectral.cjs.js +0 -60
  49. package/dist/spectral.css +0 -1
  50. package/dist/spectral.es.js +0 -5531
  51. package/dist/utils/twUtils.d.ts +0 -2
package/package.json CHANGED
@@ -1,52 +1,48 @@
1
1
  {
2
2
  "name": "@spear-ai/spectral",
3
- "version": "0.1.1",
4
- "private": false,
3
+ "version": "1.0.0",
5
4
  "type": "module",
6
- "description": "The offical component library for Spear AI",
7
- "author": "Spear AI",
8
- "license": "MIT",
5
+ "private": false,
9
6
  "repository": {
10
7
  "type": "git",
11
8
  "url": "git+https://github.com/spear-ai/spectral.git"
12
9
  },
13
- "bugs": {
14
- "url": "https://github.com/spear-ai/spectral/issues"
15
- },
16
- "homepage": "https://github.com/spear-ai/spectral#readme",
17
- "main": "./dist/spectral.cjs.js",
18
- "module": "./dist/spectral.es.js",
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.js",
19
12
  "types": "./dist/index.d.ts",
20
13
  "exports": {
21
14
  ".": {
22
- "types": "./dist/index.d.ts",
23
- "import": "./dist/spectral.es.js",
24
- "require": "./dist/spectral.cjs.js"
15
+ "import": "./dist/index.js",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./Button": {
19
+ "import": "./dist/Button.js",
20
+ "types": "./dist/components/Button/Button.d.ts"
21
+ },
22
+ "./Card": {
23
+ "import": "./dist/Card.js",
24
+ "types": "./dist/components/Card/Card.d.ts"
25
25
  },
26
- "./styles": "./dist/style.css"
26
+ "./Drawer": {
27
+ "import": "./dist/Drawer.js",
28
+ "types": "./dist/components/Drawer/Drawer.d.ts"
29
+ },
30
+ "./Skeleton": {
31
+ "import": "./dist/Skeleton.js",
32
+ "types": "./dist/components/Skeleton/Skeleton.d.ts"
33
+ },
34
+ "./Slider": {
35
+ "import": "./dist/Slider.js",
36
+ "types": "./dist/components/Slider/Slider.d.ts"
37
+ }
27
38
  },
28
39
  "files": [
29
- "dist"
40
+ "dist",
41
+ "src/styles/*.css"
42
+ ],
43
+ "sideEffects": [
44
+ "**/*.css"
30
45
  ],
31
- "scripts": {
32
- "dev": "vite --force",
33
- "build": "tsc -b && vite build --emptyOutDir",
34
- "build:lib": "tsc && vite build",
35
- "release": "semantic-release",
36
- "commit": "cz",
37
- "setup:npm": "./scripts/setup-npm.sh",
38
- "preview": "vite preview",
39
- "storybook": "storybook dev -p 6006",
40
- "storybook:build": "storybook build",
41
- "lint": "oxlint --react-plugin --jsx-a11y-plugin --import-plugin src/",
42
- "lint:fix": "oxlint --react-plugin --jsx-a11y-plugin --import-plugin --fix src/",
43
- "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
44
- "format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
45
- "changeset": "changeset",
46
- "changeset:version": "changeset version",
47
- "changeset:publish": "changeset publish",
48
- "clean": "rm -rf $(find dist -maxdepth 1 ! -name \"node_modules\") && rm package-lock.json"
49
- },
50
46
  "dependencies": {
51
47
  "@radix-ui/react-accordion": "^1.2.12",
52
48
  "@radix-ui/react-checkbox": "^1.3.3",
@@ -57,39 +53,42 @@
57
53
  "@radix-ui/react-slot": "^1.2.3",
58
54
  "@radix-ui/react-switch": "^1.2.6",
59
55
  "@radix-ui/react-tooltip": "^1.2.8",
56
+ "class-variance-authority": "^0.7.1",
57
+ "clsx": "^2.1.1",
60
58
  "cmdk": "^1.1.1",
61
59
  "input-otp": "^1.4.2",
62
60
  "lucide-react": "^0.542.0",
63
- "path": "^0.12.7",
64
61
  "react-day-picker": "^9.9.0",
65
- "tailwindcss": "^4.1.11",
62
+ "tailwind-merge": "^3.3.1",
66
63
  "vaul": "^1.1.2"
67
64
  },
68
65
  "devDependencies": {
69
66
  "@changesets/cli": "^2.29.6",
70
67
  "@chromatic-com/storybook": "^4.1.1",
71
68
  "@prettier/plugin-oxc": "^0.0.4",
72
- "@storybook/addon-a11y": "^9.1.3",
73
69
  "@storybook/addon-docs": "^9.1.3",
74
70
  "@storybook/addon-themes": "^9.1.3",
75
71
  "@storybook/addon-vitest": "^9.1.3",
72
+ "@storybook/blocks": "^8.6.14",
76
73
  "@storybook/builder-vite": "^9.1.3",
74
+ "@storybook/react": "^9.1.4",
77
75
  "@storybook/react-vite": "^9.1.3",
78
76
  "@tailwindcss/vite": "^4.1.12",
79
- "@types/node": "^24.3.0",
77
+ "@types/node": "^24.3.1",
80
78
  "@types/react": "^19.1.12",
81
79
  "@types/react-dom": "^19.1.9",
82
80
  "@vitejs/plugin-react-swc": "^4.0.1",
83
81
  "@vitest/browser": "3.2.4",
84
82
  "@vitest/coverage-v8": "3.2.4",
85
- "class-variance-authority": "^0.7.1",
86
- "clsx": "^2.1.1",
87
83
  "husky": "^9.1.7",
88
84
  "oxlint": "^1.14.0",
89
85
  "playwright": "^1.55.0",
90
86
  "prettier": "^3.6.2",
87
+ "prettier-plugin-sort-imports": "^1.8.8",
88
+ "prettier-plugin-tailwindcss": "^0.6.14",
91
89
  "storybook": "^9.1.3",
92
- "tailwind-merge": "^3.3.1",
90
+ "tailwindcss": "^4.1.11",
91
+ "tsup": "^8.5.0",
93
92
  "tw-animate-css": "^1.3.7",
94
93
  "typescript": "^5.9.2",
95
94
  "vite": "^7.1.3",
@@ -99,5 +98,29 @@
99
98
  "peerDependencies": {
100
99
  "react": "^18.0.0 || ^19.0.0",
101
100
  "react-dom": "^18.0.0 || ^19.0.0"
101
+ },
102
+ "lint-staged": {
103
+ "/**/*.{js,jsx,ts,tsx}": [
104
+ "prettier --write",
105
+ "oxlint --fix"
106
+ ]
107
+ },
108
+ "scripts": {
109
+ "dev": "vite --force",
110
+ "build": "tsup",
111
+ "build:lib": "tsup && pnpm run clean:build-artifacts",
112
+ "preview": "vite preview",
113
+ "storybook": "storybook dev -p 6006",
114
+ "storybook:build": "storybook build",
115
+ "lint": "oxlint --react-plugin --jsx-a11y-plugin --import-plugin src/",
116
+ "lint:fix": "oxlint --react-plugin --jsx-a11y-plugin --import-plugin --fix src/",
117
+ "format:fix": "prettier --write --ignore-unknown '**/**/*.{!(css|md|mdx|json|html),}'",
118
+ "format": "prettier --check --ignore-unknown '**/**/*.{!(css|md|mdx|json|html),}'",
119
+ "changeset": "changeset",
120
+ "changeset:version": "changeset version",
121
+ "changeset:publish": "changeset publish",
122
+ "lint-staged": "lint-staged",
123
+ "clean": "rm -rf $(find dist -maxdepth 1 ! -name \"node_modules\") && rm pnpm-lock.yaml",
124
+ "clean:build-artifacts": "find .storybook -name '*.js' -not -name '*.config.js' -delete && find .storybook -name '*.d.ts' -delete && find . -name '*.d.ts' -path './vite.config.d.ts' -delete"
102
125
  }
103
- }
126
+ }
@@ -0,0 +1,35 @@
1
+ @import 'tailwindcss';
2
+ @import 'tw-animate-css';
3
+ @import './partials/_horizon-colors.css';
4
+ @import './partials/_horizon-theme.css';
5
+ @import './partials/_horizon-typography.css';
6
+
7
+ @keyframes slide-up {
8
+ 0% {
9
+ transform: translateY(50%);
10
+ opacity: 0;
11
+ }
12
+ 100% {
13
+ transform: translateY(0);
14
+ opacity: 1;
15
+ }
16
+ }
17
+
18
+ @keyframes slide-down {
19
+ 0% {
20
+ transform: translateY(0);
21
+ opacity: 1;
22
+ }
23
+ 100% {
24
+ transform: translateY(50%);
25
+ opacity: 0;
26
+ }
27
+ }
28
+
29
+ .slide-up {
30
+ animation: slide-up 0.3s ease-in-out;
31
+ }
32
+
33
+ .slide-down {
34
+ animation: slide-down 0.3s ease-in-out;
35
+ }
@@ -0,0 +1,34 @@
1
+ @import 'tailwindcss';
2
+ @import 'tw-animate-css';
3
+ @import './partials/_horizon-colors.css';
4
+ @import './partials/_horizon-theme.css';
5
+
6
+ @keyframes slide-up {
7
+ 0% {
8
+ transform: translateY(50%);
9
+ opacity: 0;
10
+ }
11
+ 100% {
12
+ transform: translateY(0);
13
+ opacity: 1;
14
+ }
15
+ }
16
+
17
+ @keyframes slide-down {
18
+ 0% {
19
+ transform: translateY(0);
20
+ opacity: 1;
21
+ }
22
+ 100% {
23
+ transform: translateY(50%);
24
+ opacity: 0;
25
+ }
26
+ }
27
+
28
+ .slide-up {
29
+ animation: slide-up 0.3s ease-in-out;
30
+ }
31
+
32
+ .slide-down {
33
+ animation: slide-down 0.3s ease-in-out;
34
+ }
package/dist/App.d.ts DELETED
@@ -1 +0,0 @@
1
- export default function App(): import("react/jsx-runtime").JSX.Element;
@@ -1,35 +0,0 @@
1
- import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
2
- import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
- export type AutoScrollBehavior = 'never' | 'mobile' | 'always';
4
- type BaseAccordionProps = {
5
- children?: ReactNode;
6
- autoScroll?: AutoScrollBehavior;
7
- scrollPadding?: number;
8
- variant?: 'default' | 'contained' | 'separated';
9
- };
10
- export type AccordionSingleProps = BaseAccordionProps & {
11
- type: 'single';
12
- value?: string;
13
- defaultValue?: string;
14
- onValueChange?: (value: string) => void;
15
- collapsible?: boolean;
16
- };
17
- export type AccordionMultipleProps = BaseAccordionProps & {
18
- type: 'multiple';
19
- value?: string[];
20
- defaultValue?: string[];
21
- onValueChange?: (value: string[]) => void;
22
- };
23
- export type AccordionProps = AccordionSingleProps | AccordionMultipleProps;
24
- type AccordionComponent = ForwardRefExoticComponent<AccordionProps & RefAttributes<HTMLDivElement>> & {
25
- Item: typeof AccordionItem;
26
- Trigger: typeof AccordionTrigger;
27
- TriggerContent: typeof AccordionTriggerContent;
28
- Content: typeof AccordionContent;
29
- };
30
- declare const AccordionItem: ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
31
- declare const AccordionTriggerContent: ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
32
- declare const AccordionTrigger: ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & RefAttributes<HTMLButtonElement>, "ref"> & RefAttributes<HTMLButtonElement>>;
33
- declare const AccordionContent: ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
34
- declare const Accordion: AccordionComponent;
35
- export { Accordion };
@@ -1,9 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
3
- title?: string;
4
- icon?: ReactNode;
5
- width?: 'full' | 'fit';
6
- isLoading?: boolean;
7
- children?: ReactNode;
8
- }
9
- export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,10 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- export interface CheckboxProps extends Omit<ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, 'onCheckedChange'> {
4
- id: string;
5
- labelText: string;
6
- onCheckedChange: (value: boolean) => void;
7
- required?: boolean;
8
- checked?: boolean;
9
- }
10
- export declare const Checkbox: import('react').ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & CheckboxProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,21 +0,0 @@
1
- import { FocusEvent, InputHTMLAttributes, ReactElement } from 'react';
2
- export type InputType = 'text' | 'email' | 'url' | 'tel' | 'password' | 'number' | 'date' | 'datetime-local';
3
- export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> & {
4
- className?: string;
5
- errorMessage?: string;
6
- hideFloatingLabel?: boolean;
7
- id?: string;
8
- label: string;
9
- name: string;
10
- onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
11
- onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
12
- prefix?: string;
13
- showClearButton?: boolean;
14
- state?: 'success' | 'error' | 'default' | 'disabled' | 'loading';
15
- type?: InputType;
16
- value?: string;
17
- };
18
- export declare const Input: {
19
- ({ className, disabled, errorMessage, hideFloatingLabel, id, label, name, onBlur, onChange, onFocus, prefix, showClearButton, state, type, value, ...props }: InputProps): ReactElement;
20
- displayName: string;
21
- };
@@ -1,10 +0,0 @@
1
- import { RefObject } from 'react';
2
- export declare const usePrefixWidth: (prefix?: string) => {
3
- prefixWidth: number;
4
- prefixRef: RefObject<HTMLSpanElement | null>;
5
- };
6
- export declare const usePasswordVisibility: () => {
7
- isVisible: boolean;
8
- toggleVisibility: () => void;
9
- inputType: string;
10
- };
@@ -1,29 +0,0 @@
1
- import { OTPInputProps } from 'input-otp';
2
- type InputOTPRootProps = Omit<OTPInputProps, 'textAlign' | 'pushPasswordManagerStrategy' | 'pasteTransformer' | 'noScriptCSSFallback' | 'placeholder' | 'containerClassName' | 'render'> & {
3
- onComplete?: (...args: unknown[]) => void;
4
- inputMode?: 'numeric' | 'text' | 'decimal' | 'tel' | 'search' | 'email' | 'url';
5
- className?: string;
6
- separator?: boolean;
7
- variant?: 'outlined' | 'filled';
8
- };
9
- export type InputOTPProps = InputOTPRootProps & ({
10
- value: number | string;
11
- onChange: (newValue: number | string) => void;
12
- } | {
13
- value?: never;
14
- onChange?: never;
15
- }) & ({
16
- hasError: true;
17
- errorMessage: string | undefined;
18
- } | {
19
- hasError?: false;
20
- errorMessage?: never;
21
- });
22
- export declare const InputOTP: import('react').ForwardRefExoticComponent<InputOTPProps & import('react').RefAttributes<HTMLInputElement>> & {
23
- Group: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
24
- Slot: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
25
- index: number;
26
- } & import('react').RefAttributes<HTMLDivElement>>;
27
- Separator: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
28
- };
29
- export {};
@@ -1,3 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import * as LabelPrimitive from '@radix-ui/react-label';
3
- export declare const Label: import('react').ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & import('react').RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & import('react').RefAttributes<HTMLLabelElement>>;
@@ -1,4 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import * as LabelPrimitive from '@radix-ui/react-label';
3
- declare const Label: import('react').ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & import('react').RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & import('react').RefAttributes<HTMLLabelElement>>;
4
- export { Label };
@@ -1,38 +0,0 @@
1
- import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
- export type RadioGroupProps = Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, 'onChange' | 'disabled'> & {
4
- onValueChange: (selected: string) => void;
5
- selected?: string;
6
- name: string;
7
- required?: boolean;
8
- orientation?: 'horizontal' | 'vertical';
9
- variant?: 'default' | 'tiles';
10
- className?: string;
11
- disabled?: boolean | string[];
12
- itemClassName?: string;
13
- };
14
- export interface RadioGroupItemProps extends ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> {
15
- className?: string;
16
- children?: ReactNode;
17
- id?: string;
18
- value: string;
19
- description?: string | ReactNode;
20
- }
21
- declare const RadioGroupRoot: import('react').ForwardRefExoticComponent<Omit<Omit<RadioGroupPrimitive.RadioGroupProps & import('react').RefAttributes<HTMLDivElement>, "ref">, "disabled" | "onChange"> & {
22
- onValueChange: (selected: string) => void;
23
- selected?: string;
24
- name: string;
25
- required?: boolean;
26
- orientation?: "horizontal" | "vertical";
27
- variant?: "default" | "tiles";
28
- className?: string;
29
- disabled?: boolean | string[];
30
- itemClassName?: string;
31
- } & import('react').RefAttributes<HTMLDivElement>>;
32
- declare const RadioGroupItem: import('react').ForwardRefExoticComponent<RadioGroupItemProps & import('react').RefAttributes<HTMLButtonElement>>;
33
- declare const RadioGroupLabel: import('react').ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-label').LabelProps & import('react').RefAttributes<HTMLLabelElement>, "ref"> & import('class-variance-authority').VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & import('react').RefAttributes<HTMLLabelElement>, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
34
- declare const RadioGroup: typeof RadioGroupRoot & {
35
- Item: typeof RadioGroupItem;
36
- Label: typeof RadioGroupLabel;
37
- };
38
- export { RadioGroup };
@@ -1,24 +0,0 @@
1
- import { ComponentPropsWithoutRef } from 'react';
2
- export interface SelectOption {
3
- value: string;
4
- label: string;
5
- disabled?: boolean;
6
- }
7
- export interface SelectProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onSelect'> {
8
- options: SelectOption[];
9
- selectedOption?: string | null;
10
- onSelect: (value: string) => void;
11
- placeholder?: string;
12
- disabled?: boolean;
13
- 'aria-label'?: string;
14
- id?: string;
15
- className?: string;
16
- showSelectedIcon?: boolean;
17
- maxHeight?: string;
18
- error?: boolean;
19
- errorMessage?: string;
20
- required?: boolean;
21
- isLoading?: boolean;
22
- }
23
- export declare const Select: import('react').ForwardRefExoticComponent<SelectProps & import('react').RefAttributes<HTMLDivElement>>;
24
- export default Select;
@@ -1,17 +0,0 @@
1
- import { RefObject } from 'react';
2
- import { SelectOption } from './Select';
3
- interface SelectListProps {
4
- options: SelectOption[];
5
- selectedOption: string | null | undefined;
6
- onSelect: (option: string) => void;
7
- isOpen: boolean;
8
- triggerRef: RefObject<HTMLButtonElement | null>;
9
- onClose: () => void;
10
- focusedIndex: number;
11
- onFocusedIndexChange: (index: number) => void;
12
- listboxId: string;
13
- showSelectedIcon: boolean;
14
- maxHeight: string;
15
- }
16
- export declare const SelectList: ({ options, selectedOption, onSelect, isOpen, triggerRef, onClose, focusedIndex, onFocusedIndexChange, listboxId, showSelectedIcon, maxHeight, }: SelectListProps) => import('react').ReactPortal | null;
17
- export {};
@@ -1 +0,0 @@
1
- export declare function Sidebar(): import("react/jsx-runtime").JSX.Element;
@@ -1,65 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- import { VariantProps } from 'class-variance-authority';
3
- import { ButtonPrimitive } from '../../primitives/button';
4
- import { InputPrimitive } from '../../primitives/input';
5
- import { TooltipPrimitiveContent } from '../../primitives/tooltip';
6
- type SidebarContextProps = {
7
- state: 'expanded' | 'collapsed';
8
- open: boolean;
9
- setOpen: (open: boolean) => void;
10
- toggleSidebar: () => void;
11
- };
12
- declare function useSidebar(): SidebarContextProps;
13
- declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: ComponentProps<'div'> & {
14
- defaultOpen?: boolean;
15
- open?: boolean;
16
- onOpenChange?: (open: boolean) => void;
17
- }): import("react/jsx-runtime").JSX.Element;
18
- declare function SidebarBase({ side, variant, collapsible, className, children, ...props }: ComponentProps<'div'> & {
19
- side?: 'left' | 'right';
20
- variant?: 'sidebar' | 'floating' | 'inset';
21
- collapsible?: 'offcanvas' | 'icon' | 'none';
22
- }): import("react/jsx-runtime").JSX.Element;
23
- declare function SidebarTrigger({ className, onClick, ...props }: ComponentProps<typeof ButtonPrimitive>): import("react/jsx-runtime").JSX.Element;
24
- declare function SidebarRail({ className, ...props }: ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
25
- declare function SidebarInset({ className, ...props }: ComponentProps<'main'>): import("react/jsx-runtime").JSX.Element;
26
- declare function SidebarInputPrimitive({ className, ...props }: ComponentProps<typeof InputPrimitive>): import("react/jsx-runtime").JSX.Element;
27
- declare function SidebarHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
28
- declare function SidebarFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
29
- declare function SidebarSeparator({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
30
- declare function SidebarContent({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
31
- declare function SidebarGroup({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
32
- declare function SidebarGroupLabel({ className, asChild, ...props }: ComponentProps<'div'> & {
33
- asChild?: boolean;
34
- }): import("react/jsx-runtime").JSX.Element;
35
- declare function SidebarGroupAction({ className, asChild, ...props }: ComponentProps<'button'> & {
36
- asChild?: boolean;
37
- }): import("react/jsx-runtime").JSX.Element;
38
- declare function SidebarGroupContent({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
39
- declare function SidebarMenu({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
40
- declare function SidebarMenuItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
41
- declare const sidebarMenuButtonVariants: (props?: ({
42
- variant?: "outline" | "default" | null | undefined;
43
- size?: "default" | "sm" | "lg" | null | undefined;
44
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
45
- declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: ComponentProps<'button'> & {
46
- asChild?: boolean;
47
- isActive?: boolean;
48
- tooltip?: string | ComponentProps<typeof TooltipPrimitiveContent>;
49
- } & VariantProps<typeof sidebarMenuButtonVariants>): import("react/jsx-runtime").JSX.Element;
50
- declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: ComponentProps<'button'> & {
51
- asChild?: boolean;
52
- showOnHover?: boolean;
53
- }): import("react/jsx-runtime").JSX.Element;
54
- declare function SidebarMenuBadge({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
55
- declare function SidebarMenuSkeleton({ className, showIcon, ...props }: ComponentProps<'div'> & {
56
- showIcon?: boolean;
57
- }): import("react/jsx-runtime").JSX.Element;
58
- declare function SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
59
- declare function SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
60
- declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: ComponentProps<'a'> & {
61
- asChild?: boolean;
62
- size?: 'sm' | 'md';
63
- isActive?: boolean;
64
- }): import("react/jsx-runtime").JSX.Element;
65
- export { SidebarBase, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInputPrimitive, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
@@ -1,16 +0,0 @@
1
- import * as SwitchPrimitives from '@radix-ui/react-switch';
2
- type SwitchProps = {
3
- className?: string;
4
- disabled?: boolean;
5
- id: string;
6
- labelPosition?: 'left' | 'right';
7
- labelText: string;
8
- hideLabel?: boolean;
9
- name?: string;
10
- onChange?: (checked: boolean) => void;
11
- required?: boolean;
12
- value?: string;
13
- variant?: 'default' | 'squared';
14
- };
15
- export declare const Switch: import('react').ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & SwitchProps & import('react').RefAttributes<HTMLButtonElement & SwitchProps>>;
16
- export {};
@@ -1,16 +0,0 @@
1
- import { ChangeEvent, ComponentProps, FocusEvent } from 'react';
2
- export type TextareaProps = ComponentProps<'textarea'> & {
3
- className?: string;
4
- state?: 'default' | 'error' | 'disabled' | 'loading';
5
- errorMessage?: string;
6
- name: string;
7
- id?: string;
8
- label: string;
9
- value?: string;
10
- maxLength?: number;
11
- hideFloatingLabel?: boolean;
12
- onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
13
- onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
14
- onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
15
- };
16
- export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
@@ -1,44 +0,0 @@
1
- import { ChangeEvent, ClipboardEvent, Dispatch, FocusEvent, RefObject, SetStateAction } from 'react';
2
- /**
3
- * Custom hook for focus handling
4
- */
5
- export declare const useFocusHandlers: (setIsFocused: Dispatch<SetStateAction<boolean>>, onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void, onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void) => {
6
- handleFocus: (e: FocusEvent<HTMLTextAreaElement>) => void;
7
- handleBlur: (e: FocusEvent<HTMLTextAreaElement>) => void;
8
- };
9
- /**
10
- * Generate the className for the textarea
11
- */
12
- export declare const getTextareaClassNames: (state: string, className?: string) => string;
13
- /**
14
- * Generate the className for the label container
15
- */
16
- export declare const getLabelContainerClassNames: (shouldShowLabelAtTop: boolean) => string;
17
- /**
18
- * Generate the className for the label
19
- */
20
- export declare const getLabelClassNames: (shouldShowLabelAtTop: boolean, hideFloatingLabel: boolean) => string;
21
- /**
22
- * Generate the className for the character counter
23
- */
24
- export declare const getCounterClassNames: (value?: string, maxLength?: number) => string;
25
- /**
26
- * Handle paste event to truncate text at character limit
27
- */
28
- export declare const handleTextareaPaste: (e: ClipboardEvent<HTMLTextAreaElement>, value: string, maxLength: number, onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void) => void;
29
- /**
30
- * Handle change events to respect character limit
31
- */
32
- export declare const handleTextareaChange: (e: ChangeEvent<HTMLTextAreaElement>, maxLength: number, onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void) => void;
33
- /**
34
- * Custom hook for setting up a textarea with character limit, focus handling, etc.
35
- */
36
- export declare const useTextarea: (maxLength?: number, value?: string, onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void, onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void, onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void) => {
37
- isFocused: boolean;
38
- textareaRef: RefObject<HTMLTextAreaElement | null>;
39
- handleFocus: (e: FocusEvent<HTMLTextAreaElement>) => void;
40
- handleBlur: (e: FocusEvent<HTMLTextAreaElement>) => void;
41
- handleChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
42
- handlePaste: (e: ClipboardEvent<HTMLTextAreaElement>) => void;
43
- shouldShowLabelAtTop: boolean;
44
- };
@@ -1,5 +0,0 @@
1
- <svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M26.0929 60.3388C35.1167 50.9539 50.0456 50.6555 59.4377 59.6724C68.8297 68.6893 69.1283 83.607 60.1046 92.9919L50.4749 103.007C41.4511 112.392 26.5222 112.69 17.1301 103.673C7.73804 94.6566 7.43946 79.7389 16.4632 70.354L26.0929 60.3388Z" fill="black"/>
3
- <path opacity="0.67" d="M103.448 69.7301C112.493 78.8993 112.504 93.6591 103.416 102.84C94.2574 112.093 79.3256 112.176 70.0653 103.024L16.7676 50.3499L16.5522 50.1342C7.50656 40.965 7.49662 26.2053 16.5839 17.0243C25.7427 7.77101 40.6745 7.68864 49.9348 16.8405L103.232 69.5146L103.448 69.7301Z" fill="black"/>
4
- <path opacity="0.42" d="M69.1319 17.1359C78.1557 7.75106 93.0845 7.45268 102.477 16.4695C111.869 25.4864 112.167 40.4041 103.143 49.789L93.5137 59.8042C93.4868 59.8323 93.4592 59.8598 93.4322 59.8877L59.9194 26.7171L69.1319 17.1359Z" fill="black"/>
5
- </svg>
package/dist/favicon.svg DELETED
@@ -1,5 +0,0 @@
1
- <svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M26.0929 60.3388C35.1167 50.9539 50.0456 50.6555 59.4377 59.6724C68.8297 68.6893 69.1283 83.607 60.1046 92.9919L50.4749 103.007C41.4511 112.392 26.5222 112.69 17.1301 103.673C7.73804 94.6566 7.43946 79.7389 16.4632 70.354L26.0929 60.3388Z" fill="white"/>
3
- <path opacity="0.67" d="M103.448 69.7301C112.493 78.8993 112.504 93.6591 103.416 102.84C94.2574 112.093 79.3256 112.176 70.0653 103.024L16.7676 50.3499L16.5522 50.1342C7.50656 40.965 7.49662 26.2053 16.5839 17.0243C25.7427 7.77101 40.6745 7.68864 49.9348 16.8405L103.232 69.5146L103.448 69.7301Z" fill="white"/>
4
- <path opacity="0.42" d="M69.1319 17.1359C78.1557 7.75106 93.0845 7.45268 102.477 16.4695C111.869 25.4864 112.167 40.4041 103.143 49.789L93.5137 59.8042C93.4868 59.8323 93.4592 59.8598 93.4322 59.8877L59.9194 26.7171L69.1319 17.1359Z" fill="white"/>
5
- </svg>
@@ -1,8 +0,0 @@
1
- import { MouseEvent, RefObject } from 'react';
2
- /**
3
- * Hook that handles auto-scrolling for accordions with return-to-position functionality
4
- *
5
- * @param triggerRef Reference to the accordion trigger element
6
- * @returns A click event handler for the accordion trigger
7
- */
8
- export declare const useAccordionAutoScroll: (triggerRef: RefObject<HTMLElement>) => (_event?: MouseEvent<HTMLButtonElement>) => void;
@@ -1,7 +0,0 @@
1
- import { RefObject } from 'react';
2
- /**
3
- * Hook that handles clicks outside of the specified element
4
- * @param callback Function to call when a click outside the element is detected
5
- * @returns A ref to attach to the target element
6
- */
7
- export declare function useOutsideClick<T extends HTMLElement>(callback: () => void): RefObject<T | null>;