@app-studio/web 0.9.50 → 0.9.51
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/Form/Form.d.ts +1 -0
- package/dist/components/Form/Selector/Selector/Selector.props.d.ts +68 -0
- package/dist/components/Form/Selector/Selector/Selector.state.d.ts +19 -0
- package/dist/components/Form/Selector/Selector/Selector.style.d.ts +30 -0
- package/dist/components/Form/Selector/Selector/Selector.view.d.ts +9 -0
- package/dist/components/Form/Selector/Selector.d.ts +3 -0
- package/dist/components/Formik/Formik.Selector.d.ts +6 -0
- package/dist/components/Formik/index.d.ts +1 -0
- package/dist/utils/typography.d.ts +5 -4
- package/dist/web.cjs.development.js +358 -135
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +358 -136
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +358 -135
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Background.mdx +15 -0
- package/docs/components/Selector.mdx +78 -0
- package/docs/components/Title.mdx +93 -0
- package/package.json +2 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Elevation } from '../../../../utils/elevation';
|
|
2
|
+
import { InputProps, Shadow, ViewProps } from 'app-studio';
|
|
3
|
+
import { SelectorStyles, Shape, Size, Variant, Option } from './Selector.type';
|
|
4
|
+
export interface SelectorProps extends Omit<InputProps, 'size'> {
|
|
5
|
+
id?: string;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
options: Option[];
|
|
12
|
+
isMulti?: boolean;
|
|
13
|
+
isReadOnly?: boolean;
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
onChange?: (value: any) => void;
|
|
16
|
+
shape?: Shape;
|
|
17
|
+
variant?: Variant;
|
|
18
|
+
views?: SelectorStyles;
|
|
19
|
+
size?: Size;
|
|
20
|
+
shadow?: Shadow | Elevation | ViewProps;
|
|
21
|
+
isScrollable?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface SelectorViewProps extends SelectorProps {
|
|
24
|
+
value: string | Array<string>;
|
|
25
|
+
setValue: Function;
|
|
26
|
+
hide: boolean;
|
|
27
|
+
setHide: Function;
|
|
28
|
+
isHovered: boolean;
|
|
29
|
+
setIsHovered: Function;
|
|
30
|
+
isFocused: boolean;
|
|
31
|
+
setIsFocused: Function;
|
|
32
|
+
}
|
|
33
|
+
export interface SelectorBoxProps {
|
|
34
|
+
options: Option[];
|
|
35
|
+
value?: string | Array<string>;
|
|
36
|
+
isDisabled?: boolean;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
removeOption?: Function;
|
|
39
|
+
views?: SelectorStyles;
|
|
40
|
+
size?: Size;
|
|
41
|
+
}
|
|
42
|
+
export interface MultiSelectorProps extends Omit<InputProps, 'size'> {
|
|
43
|
+
option: string;
|
|
44
|
+
removeOption: Function;
|
|
45
|
+
size?: Size;
|
|
46
|
+
}
|
|
47
|
+
export interface ItemProps extends Omit<InputProps, 'size'> {
|
|
48
|
+
callback?: Function;
|
|
49
|
+
option: Option;
|
|
50
|
+
size?: Size;
|
|
51
|
+
style?: SelectorStyles;
|
|
52
|
+
}
|
|
53
|
+
export interface HiddenSelectorProps extends Omit<InputProps, 'size'> {
|
|
54
|
+
id?: string;
|
|
55
|
+
name?: string;
|
|
56
|
+
value: string | Array<string>;
|
|
57
|
+
isMulti?: boolean;
|
|
58
|
+
isReadOnly?: boolean;
|
|
59
|
+
isDisabled?: boolean;
|
|
60
|
+
onChange?: (value: any) => void;
|
|
61
|
+
options: Option[];
|
|
62
|
+
}
|
|
63
|
+
export interface DropDownProps extends Omit<InputProps, 'size'> {
|
|
64
|
+
size?: Size;
|
|
65
|
+
callback?: Function;
|
|
66
|
+
options: Option[];
|
|
67
|
+
views?: SelectorStyles;
|
|
68
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectorProps } from './Selector.props';
|
|
3
|
+
export declare const useSelectorState: ({ placeholder, isMulti, options, id, }: SelectorProps) => {
|
|
4
|
+
id: string;
|
|
5
|
+
value: string | string[];
|
|
6
|
+
setValue: React.Dispatch<React.SetStateAction<string | string[]>>;
|
|
7
|
+
hide: boolean;
|
|
8
|
+
setHide: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
+
isHovered: boolean;
|
|
10
|
+
setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
+
isFocused: boolean;
|
|
12
|
+
setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
13
|
+
highlightedIndex: number;
|
|
14
|
+
setHighlightedIndex: React.Dispatch<React.SetStateAction<number>>;
|
|
15
|
+
};
|
|
16
|
+
export declare const useItemState: () => {
|
|
17
|
+
isHovered: boolean;
|
|
18
|
+
setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selector Styles
|
|
3
|
+
*
|
|
4
|
+
* Defines the styles for the Selector component following the design guidelines:
|
|
5
|
+
* - Typography: Inter/Geist font, specific sizes/weights
|
|
6
|
+
* - Spacing: 4px grid system
|
|
7
|
+
* - Colors: Neutral palette with semantic colors
|
|
8
|
+
* - Rounded corners: Consistent border radius
|
|
9
|
+
* - Transitions: Subtle animations
|
|
10
|
+
*/
|
|
11
|
+
import { ViewProps } from 'app-studio';
|
|
12
|
+
import { Size } from './Selector.type';
|
|
13
|
+
/**
|
|
14
|
+
* Size configurations for the Selector component
|
|
15
|
+
* Following the 4px grid system
|
|
16
|
+
*/
|
|
17
|
+
export declare const Sizes: Record<Size, ViewProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Icon sizes for the Selector component
|
|
20
|
+
* Proportional to the component size
|
|
21
|
+
*/
|
|
22
|
+
export declare const IconSizes: Record<Size, number>;
|
|
23
|
+
/**
|
|
24
|
+
* Dropdown styles for the Selector component
|
|
25
|
+
*/
|
|
26
|
+
export declare const dropdownStyles: ViewProps;
|
|
27
|
+
/**
|
|
28
|
+
* Option item styles for the Selector component
|
|
29
|
+
*/
|
|
30
|
+
export declare const optionStyles: ViewProps;
|
|
@@ -14,4 +14,5 @@ export { FormikComboBox } from './Formik.ComboBox';
|
|
|
14
14
|
export { FormikSlider } from './Formik.Slider';
|
|
15
15
|
export { FormikOTPInput } from './Formik.OTPInput';
|
|
16
16
|
export { FormikUploader } from './Formik.Uploader';
|
|
17
|
+
export { FormikSelector } from './Formik.Selector';
|
|
17
18
|
export { AttachmentPreview } from './AttachmentPreview';
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
* This utility provides consistent typography settings across the application.
|
|
5
5
|
* It defines font sizes, line heights, and font weights according to the design guidelines.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { TextWeights } from '../components/Form/Label/Label/Label.type';
|
|
8
|
+
import { Size } from '../components/Input/Input.type';
|
|
8
9
|
/**
|
|
9
10
|
* Font sizes following the harmonized typography guidelines
|
|
10
11
|
*/
|
|
11
|
-
export declare const FontSizes: Record<
|
|
12
|
+
export declare const FontSizes: Record<Size, string | number>;
|
|
12
13
|
/**
|
|
13
14
|
* Line heights following the harmonized typography guidelines
|
|
14
15
|
*/
|
|
15
|
-
export declare const LineHeights: Record<
|
|
16
|
+
export declare const LineHeights: Record<Size, string | number>;
|
|
16
17
|
/**
|
|
17
18
|
* Font weights following typography guidelines
|
|
18
19
|
*/
|
|
@@ -23,6 +24,6 @@ export declare const FontWeights: Record<TextWeights, string>;
|
|
|
23
24
|
export declare const Typography: {
|
|
24
25
|
fontSizes: Record<import("../components/Form/DatePicker/DatePicker/DatePicker.type").Size, string | number>;
|
|
25
26
|
lineHeights: Record<import("../components/Form/DatePicker/DatePicker/DatePicker.type").Size, string | number>;
|
|
26
|
-
fontWeights: Record<
|
|
27
|
+
fontWeights: Record<TextWeights, string>;
|
|
27
28
|
};
|
|
28
29
|
export default Typography;
|