@indxsearch/systm 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.
- package/README.md +53 -0
- package/dist/components/Base/Base.d.ts +6 -0
- package/dist/components/Button/Button.d.ts +13 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/FilterPanelBase/FilterPanelBase.d.ts +10 -0
- package/dist/components/InputField/InputField.d.ts +9 -0
- package/dist/components/Popover/Popover.d.ts +12 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +12 -0
- package/dist/components/SearchField/SearchField.d.ts +19 -0
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Slider/Slider.d.ts +26 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +10 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.es.js +5124 -0
- package/dist/index.umd.js +62 -0
- package/dist/systm.css +1 -0
- package/package.json +54 -0
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @indxsearch/systm
|
|
2
|
+
|
|
3
|
+
Base UI component library for indxSearch applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @indxsearch/systm
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Note:** `@indxsearch/pixl` (icon library) is included as a dependency and will be installed automatically.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Button, Checkbox, InputField } from '@indxsearch/systm';
|
|
17
|
+
import '@indxsearch/systm/styles.css';
|
|
18
|
+
|
|
19
|
+
function App() {
|
|
20
|
+
return (
|
|
21
|
+
<div>
|
|
22
|
+
<Button variant="primary">Click me</Button>
|
|
23
|
+
<Checkbox label="Accept terms" />
|
|
24
|
+
<InputField placeholder="Enter text" />
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Components
|
|
31
|
+
|
|
32
|
+
- **Button** - Customizable button with variants
|
|
33
|
+
- **Checkbox** - Checkbox input component
|
|
34
|
+
- **InputField** - Text input field
|
|
35
|
+
- **RadioButton** - Radio button input
|
|
36
|
+
- **SearchField** - Search input with icon
|
|
37
|
+
- **Select** - Radix UI select dropdown
|
|
38
|
+
- **Slider** - Range slider component
|
|
39
|
+
- **ToggleSwitch** - Toggle switch input
|
|
40
|
+
- **Popover** - Radix UI popover component
|
|
41
|
+
- **Base** - Base container component
|
|
42
|
+
- **FilterPanelBase** - Filter panel container
|
|
43
|
+
|
|
44
|
+
## Dependencies
|
|
45
|
+
|
|
46
|
+
- `@indxsearch/pixl` - Icon library
|
|
47
|
+
- `@radix-ui/react-select` - Select component primitives
|
|
48
|
+
- `react-range` - Range slider component
|
|
49
|
+
|
|
50
|
+
## Peer Dependencies
|
|
51
|
+
|
|
52
|
+
- React 19.0.0+
|
|
53
|
+
- React DOM 19.0.0+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IconProps {
|
|
3
|
+
size?: string | number;
|
|
4
|
+
color?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function Button(props: Omit<React.ComponentProps<'button'>, 'className'> & {
|
|
7
|
+
size?: 'micro' | 'default' | 'large';
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'ghost';
|
|
9
|
+
iconLeft?: React.ReactElement<IconProps>;
|
|
10
|
+
iconRight?: React.ReactElement<IconProps>;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
score?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Checkbox: ({ label, score, className, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
title?: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
collapsible?: boolean;
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function FilterPanelBase({ title, children, className, collapsible, collapsed, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
isValid?: boolean;
|
|
7
|
+
variant?: 'default' | 'borderBottom';
|
|
8
|
+
}
|
|
9
|
+
export declare function InputField({ label, error, className, isValid, variant, ...props }: InputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
trigger: React.ReactNode;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
open?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
align?: 'start' | 'center' | 'end';
|
|
8
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
+
sideOffset?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Popover: React.FC<PopoverProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type RadioButtonProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const RadioButton: React.FC<RadioButtonProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface IconProps {
|
|
3
|
+
size?: string | number;
|
|
4
|
+
color?: string;
|
|
5
|
+
}
|
|
6
|
+
export type InputSize = 'micro' | 'default';
|
|
7
|
+
export interface SearchFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
8
|
+
label?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
showSearchIcon?: boolean;
|
|
12
|
+
searchIcon?: React.ReactElement<IconProps>;
|
|
13
|
+
searchIconColor?: string;
|
|
14
|
+
inputSize?: InputSize;
|
|
15
|
+
showFocusBorder?: boolean;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function SearchField({ label, error, className, showSearchIcon, searchIcon, searchIconColor, inputSize, showFocusBorder, children, ...props }: SearchFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectProps {
|
|
7
|
+
value: string;
|
|
8
|
+
onValueChange: (value: string) => void;
|
|
9
|
+
options: SelectOption[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const Select: React.FC<SelectProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type SingleValue = number;
|
|
3
|
+
type RangeValue = [number, number];
|
|
4
|
+
interface BaseSliderProps {
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
activeMin?: number;
|
|
11
|
+
activeMax?: number;
|
|
12
|
+
isFaceted?: boolean;
|
|
13
|
+
highlightFaceted?: boolean;
|
|
14
|
+
onChange: (val: SingleValue | RangeValue) => void;
|
|
15
|
+
onFinalChange?: (val: SingleValue | RangeValue) => void;
|
|
16
|
+
}
|
|
17
|
+
type SliderProps = (BaseSliderProps & {
|
|
18
|
+
value: SingleValue;
|
|
19
|
+
isRange?: false;
|
|
20
|
+
}) | (BaseSliderProps & {
|
|
21
|
+
value: RangeValue;
|
|
22
|
+
isRange: true;
|
|
23
|
+
isFaceted?: boolean;
|
|
24
|
+
});
|
|
25
|
+
export declare const Slider: React.FC<SliderProps>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type ToggleSwitchProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onChange: (checked: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ToggleSwitch: React.FC<ToggleSwitchProps>;
|
|
10
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Button } from './components/Button/Button';
|
|
2
|
+
export { Checkbox } from './components/Checkbox/Checkbox';
|
|
3
|
+
export { Base, type BaseProps } from './components/Base/Base';
|
|
4
|
+
export { FilterPanelBase } from './components/FilterPanelBase/FilterPanelBase';
|
|
5
|
+
export { SearchField } from './components/SearchField/SearchField';
|
|
6
|
+
export type InputSize = 'micro' | 'default';
|
|
7
|
+
export { InputField } from './components/InputField/InputField';
|
|
8
|
+
export { RadioButton } from './components/RadioButton/RadioButton';
|
|
9
|
+
export { ToggleSwitch } from './components/ToggleSwitch/ToggleSwitch';
|
|
10
|
+
export { Slider } from './components/Slider/Slider';
|
|
11
|
+
export { Select, type SelectOption, type SelectProps } from './components/Select/Select';
|
|
12
|
+
export { Popover, type PopoverProps } from './components/Popover';
|