react-artasys-ui 0.1.7 → 0.1.8

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.
@@ -0,0 +1,6 @@
1
+ import { AllHTMLAttributes } from "react";
2
+ interface IArrow extends AllHTMLAttributes<HTMLDivElement> {
3
+ direction?: 'up' | 'down' | 'left' | 'right';
4
+ }
5
+ declare const Arrow: ({ className, direction, ...props }: IArrow) => JSX.Element;
6
+ export default Arrow;
@@ -0,0 +1,2 @@
1
+ import Arrow from "./Arrow";
2
+ export default Arrow;
@@ -0,0 +1,13 @@
1
+ import { AllHTMLAttributes, FunctionComponentElement } from "react";
2
+ import type { IItem, TChildrenAction } from "./Item";
3
+ export declare const Context: import("react").Context<TChildrenAction>;
4
+ export interface IDropdown extends AllHTMLAttributes<HTMLDivElement> {
5
+ direction?: 'down' | 'up';
6
+ position?: 'left' | 'right';
7
+ split?: boolean;
8
+ hover?: boolean;
9
+ items?: FunctionComponentElement<IItem> | FunctionComponentElement<IItem>[];
10
+ disabled?: boolean;
11
+ }
12
+ declare const Dropdown: ({ children, className, items, direction, position, split, disabled, hover, ...props }: IDropdown) => JSX.Element;
13
+ export default Dropdown;
@@ -0,0 +1,11 @@
1
+ import { AllHTMLAttributes, ReactElement } from "react";
2
+ export type TChildrenAction = {
3
+ close: () => void;
4
+ };
5
+ export interface IItem extends Omit<AllHTMLAttributes<HTMLLIElement>, 'children'> {
6
+ children?: ((action: TChildrenAction) => ReactElement) | string | ReactElement;
7
+ autoClose?: boolean;
8
+ active?: boolean;
9
+ }
10
+ declare const Item: ({ children, onClick, autoClose, active, className, ...props }: IItem) => JSX.Element;
11
+ export default Item;
@@ -0,0 +1,9 @@
1
+ import { RefAttributes, ForwardRefExoticComponent, FC } from "react";
2
+ import { IDropdown } from "./Dropdown";
3
+ import Item, { IItem } from "./Item";
4
+ interface StaticComponent extends ForwardRefExoticComponent<IDropdown & RefAttributes<HTMLInputElement>> {
5
+ Item: FC<IItem>;
6
+ }
7
+ declare const Dropdown: StaticComponent;
8
+ export { Item as DropdownItem };
9
+ export default Dropdown;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { TOptionElement } from "./Select";
3
+ export interface IOptgroup {
4
+ children?: TOptionElement;
5
+ label?: string | React.ReactElement;
6
+ }
7
+ declare const Optgroup: ({ children, label }: IOptgroup) => JSX.Element;
8
+ export default Optgroup;
@@ -1,7 +1,8 @@
1
1
  import { LiHTMLAttributes } from "react";
2
2
  export interface IOption extends LiHTMLAttributes<HTMLLIElement> {
3
3
  value?: string;
4
+ disabled?: boolean;
4
5
  children?: string | React.ReactElement;
5
6
  }
6
- declare const Option: ({ children, value, onClick, ...props }: IOption) => JSX.Element;
7
+ declare const Option: ({ children, value, disabled, onClick, ...props }: IOption) => JSX.Element;
7
8
  export default Option;
@@ -1,15 +1,17 @@
1
- /// <reference types="react" />
1
+ import { FunctionComponentElement } from "react";
2
2
  import { IElement } from "../Form/Element";
3
+ import type { IOptgroup } from "./Optgroup";
3
4
  import type { IOption } from "./Option";
4
5
  export declare const Context: import("react").Context<{
5
6
  selected: string;
6
7
  emptyValue: import("react").MutableRefObject<boolean>;
7
8
  setSelect: (value: string) => void;
8
9
  setSelected: (value: string) => void;
9
- setTitle: (title: string) => void;
10
+ setTitle: (title: IOption['children']) => void;
10
11
  }>;
12
+ export type TOptionElement = FunctionComponentElement<IOption> | FunctionComponentElement<IOption>[];
11
13
  export interface ISelect extends Omit<IElement, 'children'> {
12
- children?: React.FunctionComponentElement<IOption>[];
14
+ children?: TOptionElement | FunctionComponentElement<IOptgroup> | FunctionComponentElement<IOptgroup>[];
13
15
  onChangeSelect?: (value: string) => void;
14
16
  }
15
17
  declare const Select: import("react").ForwardRefExoticComponent<ISelect & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,9 +1,11 @@
1
1
  import { ForwardRefExoticComponent, FC, RefAttributes } from "react";
2
2
  import { ISelect } from "./Select";
3
3
  import Option, { IOption } from "./Option";
4
+ import Optgroup, { IOptgroup } from "./Optgroup";
4
5
  interface StaticComponent extends ForwardRefExoticComponent<ISelect & RefAttributes<HTMLInputElement>> {
5
6
  Option: FC<IOption>;
7
+ Optgroup: FC<IOptgroup>;
6
8
  }
7
9
  declare const Select: StaticComponent;
8
- export { Option as SelectOption };
10
+ export { Option as SelectOption, Optgroup as SelectOptgroup };
9
11
  export default Select;
package/lib/index.d.ts CHANGED
@@ -8,8 +8,9 @@ import Button from "./Button";
8
8
  import UploadImages, { IUploadImages, TImageData, IImage } from "./UploadImages";
9
9
  import Checkbox from "./Checkbox";
10
10
  import Progress from "./Progress";
11
- import Select, { SelectOption } from "./Select";
11
+ import Select, { SelectOption, SelectOptgroup } from "./Select";
12
+ import Dropdown, { DropdownItem } from "./Dropdown";
12
13
  declare const UI: {};
13
- export { Form, FormElement, Element, useForm, Input, TextArea, Spinner, File, Button, UploadImages, Checkbox, Progress, Select, SelectOption };
14
+ export { Form, FormElement, Element, useForm, Input, TextArea, Spinner, File, Button, UploadImages, Checkbox, Progress, Select, SelectOption, SelectOptgroup, Dropdown, DropdownItem };
14
15
  export type { TFileData, TFileMime, IUploadImages, IImage, TImageData, IElement };
15
16
  export default UI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-artasys-ui",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -0,0 +1,18 @@
1
+ import { AllHTMLAttributes } from "react";
2
+ import styles from "./style.module.css";
3
+
4
+ interface IArrow extends AllHTMLAttributes<HTMLDivElement> {
5
+ direction?: 'up' | 'down' | 'left' | 'right';
6
+ };
7
+
8
+ const Arrow = ({className, direction = 'down', ...props}: IArrow) => {
9
+
10
+ const classes = ['ui-component-arrow'];
11
+ classes.push(styles['container']);
12
+ if (direction) classes.push(styles[direction]);
13
+ if (className) classes.push(className);
14
+
15
+ return(<div {...props} className={classes.join(' ')}/>);
16
+ };
17
+
18
+ export default Arrow;
@@ -0,0 +1,3 @@
1
+ import Arrow from "./Arrow";
2
+
3
+ export default Arrow;
@@ -0,0 +1,40 @@
1
+ /* Arrow Component */
2
+
3
+ .container {
4
+ --ui-arrow-size: 10px;
5
+ --ui-arrow-color: #5EBED6;
6
+ --ui-arrow-max: var(--ui-arrow-size) solid var(--ui-arrow-color);
7
+ --ui-arrow-min: calc(var(--ui-arrow-size) / 2) solid transparent;
8
+ }
9
+
10
+ .container::after {
11
+ content: "";
12
+ display: block;
13
+ width: 0;
14
+ height: 0;
15
+ transition: rotate 0.1s;
16
+ }
17
+
18
+ .container.down::after {
19
+ border-left: var(--ui-arrow-min);
20
+ border-right: var(--ui-arrow-min);
21
+ border-top: var(--ui-arrow-max);
22
+ }
23
+
24
+ .container.up::after {
25
+ border-left: var(--ui-arrow-min);
26
+ border-right: var(--ui-arrow-min);
27
+ border-bottom: var(--ui-arrow-max);
28
+ }
29
+
30
+ .container.left::after {
31
+ border-top: var(--ui-arrow-min);
32
+ border-right: var(--ui-arrow-max);
33
+ border-bottom: var(--ui-arrow-min);
34
+ }
35
+
36
+ .container.right::after {
37
+ border-top: var(--ui-arrow-min);
38
+ border-left: var(--ui-arrow-max);
39
+ border-bottom: var(--ui-arrow-min);
40
+ }
@@ -0,0 +1,102 @@
1
+ import {
2
+ AllHTMLAttributes,
3
+ useRef,
4
+ useState,
5
+ FunctionComponentElement,
6
+ useEffect,
7
+ createContext
8
+ } from "react";
9
+ import styles from "./style.module.css";
10
+ import Arrow from "../Components/Arrow";
11
+ import type {
12
+ IItem,
13
+ TChildrenAction
14
+ } from "./Item";
15
+
16
+ export const Context = createContext<TChildrenAction>({
17
+ close: () => {}
18
+ });
19
+
20
+ export interface IDropdown extends AllHTMLAttributes<HTMLDivElement> {
21
+ direction?: 'down' | 'up';
22
+ position?: 'left' | 'right';
23
+ split?: boolean;
24
+ hover?: boolean;
25
+ items?: FunctionComponentElement<IItem> | FunctionComponentElement<IItem>[];
26
+ disabled?: boolean;
27
+ };
28
+
29
+ const Dropdown = ({children, className, items, direction = 'down', position = 'right', split = false, disabled, hover = false, ...props}: IDropdown) => {
30
+ const containerRef = useRef<HTMLDivElement>(null);
31
+ const [isOpen, setOpen] = useState(false);
32
+
33
+ const close = () => {
34
+ setOpen(false);
35
+ };
36
+
37
+ const toggle = () => {
38
+ setOpen((isOpen) => {
39
+ if (disabled) return false;
40
+ return !isOpen;
41
+ });
42
+ };
43
+
44
+ const handleClickArrow = () => {
45
+ toggle();
46
+ };
47
+
48
+ const handleClick = () => {
49
+ if (!split) {
50
+ toggle();
51
+ }
52
+ if (hover) {
53
+ close();
54
+ }
55
+ };
56
+
57
+ const handleBlur = (e: React.FocusEvent) => {
58
+ if (e.currentTarget.contains(e.relatedTarget)) return;
59
+ close();
60
+ };
61
+
62
+ const handleMouseEnter = () => {
63
+ if (!hover || isOpen) return;
64
+ toggle();
65
+ };
66
+
67
+ useEffect(() => {
68
+ const element = containerRef.current;
69
+ const classList = element?.classList;
70
+ if (isOpen) {
71
+ classList?.add(styles['opened']);
72
+ element?.focus();
73
+ }else{
74
+ classList?.remove(styles['opened']);
75
+ }
76
+ }, [isOpen]);
77
+
78
+ const classes = ['ui-dropdown'];
79
+ classes.push(styles['container']);
80
+ if (className) classes.push(className);
81
+ if (direction) classes.push(styles[direction]);
82
+ if (position) classes.push(styles[position]);
83
+
84
+ return(<Context.Provider value={{
85
+ close
86
+ }}>
87
+ <div {...props} className={classes.join(' ')} ref={containerRef} onMouseEnter={handleMouseEnter} tabIndex={1} onBlur={handleBlur}>
88
+ {(position === 'left' && !disabled) && <Arrow className={styles['arrow']} onClick={handleClickArrow}/>}
89
+ <div onClick={handleClick}>
90
+ {children}
91
+ </div>
92
+ {(position === 'right' && !disabled) && <Arrow className={styles['arrow']} onClick={handleClickArrow}/>}
93
+ {
94
+ (items && !disabled) && <ul className={styles['dropdown-list']}>
95
+ {items}
96
+ </ul>
97
+ }
98
+ </div>
99
+ </Context.Provider>);
100
+ };
101
+
102
+ export default Dropdown;
@@ -0,0 +1,42 @@
1
+ import {
2
+ useContext,
3
+ AllHTMLAttributes,
4
+ ReactElement,
5
+ MouseEvent
6
+ } from "react";
7
+ import styles from "./style.module.css";
8
+ import { Context } from "./Dropdown";
9
+
10
+ export type TChildrenAction = {
11
+ close: () => void;
12
+ };
13
+
14
+ export interface IItem extends Omit<AllHTMLAttributes<HTMLLIElement>, 'children'> {
15
+ children?: ((action: TChildrenAction) => ReactElement) | string | ReactElement;
16
+ autoClose?: boolean;
17
+ active?: boolean;
18
+ };
19
+
20
+ const Item = ({children, onClick, autoClose = true, active, className, ...props}: IItem) => {
21
+ const context = useContext(Context);
22
+
23
+ const handleClick = (e: MouseEvent<HTMLLIElement>) => {
24
+ if (typeof onClick === 'function') {
25
+ onClick(e);
26
+ }
27
+ if (autoClose) {
28
+ context.close();
29
+ }
30
+ };
31
+
32
+ const classes = ['ui-dropdown-item'];
33
+ classes.push(styles['item']);
34
+ if (active) classes.push(styles['active'], 'active');
35
+ if (className) classes.push(className);
36
+
37
+ return(<li {...props} onClick={handleClick} className={classes.join(' ')}>
38
+ {typeof children === 'function' ? children(context) : children}
39
+ </li>);
40
+ };
41
+
42
+ export default Item;
@@ -0,0 +1,28 @@
1
+ import {
2
+ forwardRef,
3
+ RefAttributes,
4
+ ForwardRefExoticComponent,
5
+ FC
6
+ } from "react";
7
+ import {
8
+ default as DropdownUI,
9
+ IDropdown
10
+ } from "./Dropdown";
11
+ import Item,{
12
+ IItem
13
+ } from "./Item";
14
+
15
+ interface StaticComponent extends ForwardRefExoticComponent<IDropdown & RefAttributes<HTMLInputElement>> {
16
+ Item: FC<IItem>;
17
+ };
18
+
19
+ const Dropdown: StaticComponent = {
20
+ ...forwardRef<HTMLInputElement, IDropdown>(({...args}, ref): JSX.Element => <DropdownUI {...args}/>),
21
+ Item
22
+ } as StaticComponent;
23
+
24
+ export {
25
+ Item as DropdownItem
26
+ };
27
+
28
+ export default Dropdown;
@@ -0,0 +1,67 @@
1
+ /* Dropdown */
2
+
3
+ .container {
4
+ position: relative;
5
+ display: inline-flex;
6
+ flex-direction: row;
7
+ align-items: center;
8
+ outline: none;
9
+ cursor: pointer;
10
+ }
11
+
12
+ .arrow {
13
+ padding: 5px;
14
+ }
15
+
16
+ .dropdown-list {
17
+ position: absolute;
18
+ padding: 0;
19
+ margin: 0;
20
+ background-color: #FFFFFF;
21
+ border-radius: 2px;
22
+ list-style-type: none;
23
+ box-shadow: 0px 0px 9px 2px rgb(0 0 0 / 10%);
24
+ opacity: 0;
25
+ transform: translateY(-10%);
26
+ visibility: hidden;
27
+ z-index: 1;
28
+ transition: opacity 0.3s, visibility 0.3s, transform 0.3s ease;
29
+ }
30
+
31
+ .container.down > .dropdown-list {
32
+ top: 100%;
33
+ }
34
+
35
+ .container.up > .dropdown-list {
36
+ bottom: 100%;
37
+ }
38
+
39
+ .container.left > .dropdown-list {
40
+ left: 0;
41
+ }
42
+
43
+ .container.right > .dropdown-list {
44
+ right: 0;
45
+ }
46
+
47
+ .dropdown-list > li.item {
48
+ padding: 7px;
49
+ font-size: 18px;
50
+ font-weight: normal;
51
+ color: #1D1D1B;
52
+ }
53
+
54
+ .container.opened > .dropdown-list {
55
+ opacity: 1;
56
+ visibility: visible;
57
+ transform: translateY(0);
58
+ }
59
+
60
+ .container.opened > .arrow::after {
61
+ rotate: 180deg;
62
+ }
63
+
64
+ .dropdown-list > li.item:hover, .dropdown-list > li.item:has(:global(a.active)) {
65
+ background-color: #BED4DB;
66
+ border-radius: inherit;
67
+ }
@@ -0,0 +1,19 @@
1
+ import styles from "./style.module.css";
2
+ import type { TOptionElement } from "./Select";
3
+
4
+ export interface IOptgroup {
5
+ children?: TOptionElement;
6
+ label?: string | React.ReactElement;
7
+ };
8
+
9
+ const Optgroup = ({children, label}: IOptgroup) => {
10
+
11
+ return(<li>
12
+ <ul className={styles['optgpoup']}>
13
+ {label && <li className={styles['label']}>{label}</li>}
14
+ {children}
15
+ </ul>
16
+ </li>);
17
+ };
18
+
19
+ export default Optgroup;
@@ -9,14 +9,15 @@ import styles from "./style.module.css";
9
9
 
10
10
  export interface IOption extends LiHTMLAttributes<HTMLLIElement> {
11
11
  value?: string;
12
+ disabled?: boolean;
12
13
  children?: string | React.ReactElement;
13
14
  };
14
15
 
15
- const Option = ({children, value, onClick, ...props}: IOption) => {
16
+ const Option = ({children, value, disabled, onClick, ...props}: IOption) => {
16
17
  const context = useContext(Context);
17
18
 
18
19
  const handleClick = (e: MouseEvent<HTMLLIElement>) => {
19
- if (typeof value === 'undefined') return;
20
+ if (typeof value === 'undefined' || disabled) return;
20
21
  context.setSelect(value);
21
22
  if (typeof onClick === 'function') {
22
23
  onClick(e);
@@ -25,7 +26,7 @@ const Option = ({children, value, onClick, ...props}: IOption) => {
25
26
 
26
27
  useEffect(() => {
27
28
  if (children && (value === context.selected || !context.emptyValue.current)) {
28
- context.setTitle(children?.toString());
29
+ context.setTitle(children);
29
30
  if (!context.emptyValue.current && value) {
30
31
  context.setSelected(value);
31
32
  }
@@ -34,7 +35,9 @@ const Option = ({children, value, onClick, ...props}: IOption) => {
34
35
  }, [context.selected]);
35
36
 
36
37
  const classes = ['ui-select-option'];
38
+ classes.push(styles['option']);
37
39
  if (context.selected === value) classes.push(styles['active'], 'active');
40
+ if (disabled) classes.push(styles['disabled'], 'disabled');
38
41
 
39
42
  return(<li {...props} onClick={handleClick} className={classes.join(' ')}>{children}</li>);
40
43
  };
@@ -5,12 +5,15 @@ import {
5
5
  useEffect,
6
6
  useRef,
7
7
  ChangeEvent,
8
- useImperativeHandle
8
+ useImperativeHandle,
9
+ FunctionComponentElement
9
10
  } from "react";
10
11
  import Element,{
11
12
  IElement
12
13
  } from "../Form/Element";
14
+ import type { IOptgroup } from "./Optgroup";
13
15
  import type { IOption } from "./Option";
16
+ import Arrow from "../Components/Arrow";
14
17
  import styles from "./style.module.css";
15
18
 
16
19
  export const Context = createContext({
@@ -18,11 +21,13 @@ export const Context = createContext({
18
21
  emptyValue: {current:{}} as React.MutableRefObject<boolean>,
19
22
  setSelect: (value: string) => {},
20
23
  setSelected: (value: string) => {},
21
- setTitle: (title: string) => {},
24
+ setTitle: (title: IOption['children']) => {},
22
25
  });
23
26
 
27
+ export type TOptionElement = FunctionComponentElement<IOption> | FunctionComponentElement<IOption>[];
28
+
24
29
  export interface ISelect extends Omit<IElement, 'children'> {
25
- children?: React.FunctionComponentElement<IOption>[];
30
+ children?: TOptionElement | FunctionComponentElement<IOptgroup> | FunctionComponentElement<IOptgroup>[];
26
31
  onChangeSelect?: (value: string) => void;
27
32
  };
28
33
 
@@ -33,7 +38,7 @@ const Select = forwardRef<HTMLInputElement, ISelect>(({children, onChangeSelect,
33
38
 
34
39
  const [isOpen, setOpen] = useState(false);
35
40
  const [selected, setSelected] = useState('');
36
- const [title, setTitle] = useState<string>();
41
+ const [title, setTitle] = useState<IOption['children']>();
37
42
 
38
43
  const open = () => {
39
44
  if (props.disabled) return;
@@ -124,6 +129,7 @@ const Select = forwardRef<HTMLInputElement, ISelect>(({children, onChangeSelect,
124
129
  <div className={classes.join(' ')} ref={containerRef} tabIndex={1} onBlur={close}>
125
130
  <div className={styles['select']} onClick={handleClick}>
126
131
  <span className={styles['title']}>{title}</span>
132
+ <Arrow className={styles['arrow']}/>
127
133
  </div>
128
134
  <ul className={styles['select-list']}>
129
135
  {children}
@@ -11,17 +11,23 @@ import {
11
11
  import Option,{
12
12
  IOption
13
13
  } from "./Option";
14
+ import Optgroup,{
15
+ IOptgroup
16
+ } from "./Optgroup";
14
17
 
15
18
  interface StaticComponent extends ForwardRefExoticComponent<ISelect & RefAttributes<HTMLInputElement>> {
16
19
  Option: FC<IOption>;
20
+ Optgroup: FC<IOptgroup>;
17
21
  };
18
22
 
19
23
  const Select: StaticComponent = {
20
24
  ...forwardRef<HTMLInputElement, ISelect>(({...args}, ref): JSX.Element => <SelectUI {...args} ref={ref}/>),
21
- Option
25
+ Option,
26
+ Optgroup
22
27
  } as StaticComponent;
23
28
 
24
29
  export {
25
- Option as SelectOption
30
+ Option as SelectOption,
31
+ Optgroup as SelectOptgroup
26
32
  };
27
33
  export default Select;
@@ -10,6 +10,7 @@
10
10
  flex-direction: column;
11
11
  justify-content: center;
12
12
  min-height: 25px;
13
+ outline: none;
13
14
  cursor: pointer;
14
15
  }
15
16
 
@@ -22,22 +23,11 @@
22
23
  padding: 10px;
23
24
  }
24
25
 
25
- .select::after {
26
- content: "";
27
- display: block;
28
- width: 0;
29
- height: 0;
30
- border-left: 5px solid transparent;
31
- border-right: 5px solid transparent;
32
- border-top: 10px solid #5EBED6;
33
- transition: rotate 0.3s;
34
- }
35
-
36
- .container-element:has(input[type="hidden"]:disabled) .select::after {
26
+ .container-element:has(input[type="hidden"]:disabled) .arrow::after {
37
27
  border-top-color: #CCCCCC;
38
28
  }
39
29
 
40
- .container.opened > .select::after {
30
+ .container.opened > .select > .arrow::after {
41
31
  rotate: 180deg;
42
32
  }
43
33
 
@@ -74,20 +64,47 @@
74
64
  visibility: visible;
75
65
  }
76
66
 
77
- .title, .select-list > li {
67
+ .optgpoup {
68
+ padding: 0;
69
+ margin: 0;
70
+ list-style-type: none;
71
+ }
72
+
73
+ .optgpoup > li.label {
74
+ padding: 10px;
75
+ font-weight: bold;
76
+ cursor: default;
77
+ }
78
+
79
+ .optgpoup > li.option {
80
+ padding-left: 5% !important;
81
+ }
82
+
83
+ .title, .select-list li {
78
84
  font-size: 20px;
79
85
  color: #1D1D1B;
86
+ user-select: none;
80
87
  }
81
88
 
82
89
  .title {
83
90
  flex: 1;
84
91
  }
85
92
 
86
- .select-list > li {
93
+ .select-list li.option {
94
+ display: flex;
95
+ justify-content: flex-start;
96
+ align-items: center;
97
+ min-height: 25px;
87
98
  padding: 5px;
88
99
  cursor: pointer;
89
100
  }
90
101
 
91
- .select-list > li:hover, .select-list > li.active {
102
+ .select-list li.option:hover, .select-list li.option.active {
92
103
  background-color: #BED4DB;
104
+ }
105
+
106
+ .select-list li.option.disabled {
107
+ background-color: #EFEFEF;
108
+ color: #CCCCCC;
109
+ cursor: default;
93
110
  }
package/src/index.ts CHANGED
@@ -21,8 +21,12 @@ import UploadImages,{
21
21
  import Checkbox from "./Checkbox";
22
22
  import Progress from "./Progress";
23
23
  import Select,{
24
- SelectOption
24
+ SelectOption,
25
+ SelectOptgroup
25
26
  } from "./Select";
27
+ import Dropdown,{
28
+ DropdownItem
29
+ } from "./Dropdown";
26
30
 
27
31
  const UI = {
28
32
 
@@ -42,7 +46,10 @@ export {
42
46
  Checkbox,
43
47
  Progress,
44
48
  Select,
45
- SelectOption
49
+ SelectOption,
50
+ SelectOptgroup,
51
+ Dropdown,
52
+ DropdownItem
46
53
  };
47
54
  export type {
48
55
  TFileData,