@sunggang/ui-lib 0.1.81 → 0.1.82

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/index.esm.js CHANGED
@@ -3877,7 +3877,7 @@ function _object_spread$a(target) {
3877
3877
  }
3878
3878
  return target;
3879
3879
  }
3880
- function ownKeys$9(object, enumerableOnly) {
3880
+ function ownKeys$a(object, enumerableOnly) {
3881
3881
  var keys = Object.keys(object);
3882
3882
  if (Object.getOwnPropertySymbols) {
3883
3883
  var symbols = Object.getOwnPropertySymbols(object);
@@ -3890,12 +3890,12 @@ function ownKeys$9(object, enumerableOnly) {
3890
3890
  }
3891
3891
  return keys;
3892
3892
  }
3893
- function _object_spread_props$6(target, source) {
3893
+ function _object_spread_props$7(target, source) {
3894
3894
  source = source != null ? source : {};
3895
3895
  if (Object.getOwnPropertyDescriptors) {
3896
3896
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
3897
3897
  } else {
3898
- ownKeys$9(Object(source)).forEach(function(key) {
3898
+ ownKeys$a(Object(source)).forEach(function(key) {
3899
3899
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
3900
3900
  });
3901
3901
  }
@@ -4131,7 +4131,7 @@ var EditorWatchdog = /*#__PURE__*/ function(Watchdog) {
4131
4131
  }
4132
4132
  }
4133
4133
  }
4134
- var updatedConfig = _object_spread_props$6(_object_spread$a({}, _this._config), {
4134
+ var updatedConfig = _object_spread_props$7(_object_spread$a({}, _this._config), {
4135
4135
  extraPlugins: _this._config.extraPlugins || [],
4136
4136
  lazyRoots: lazyRoots,
4137
4137
  rootsAttributes: rootsAttributes,
@@ -68730,7 +68730,7 @@ function _iterableToArray$2(iter) {
68730
68730
  function _arrayWithoutHoles$2(arr) {
68731
68731
  if (Array.isArray(arr)) return _arrayLikeToArray$2(arr);
68732
68732
  }
68733
- function ownKeys$8(object, enumerableOnly) {
68733
+ function ownKeys$9(object, enumerableOnly) {
68734
68734
  var keys = Object.keys(object);
68735
68735
  if (Object.getOwnPropertySymbols) {
68736
68736
  var symbols = Object.getOwnPropertySymbols(object);
@@ -68743,9 +68743,9 @@ function ownKeys$8(object, enumerableOnly) {
68743
68743
  function _objectSpread$1(target) {
68744
68744
  for(var i = 1; i < arguments.length; i++){
68745
68745
  var source = null != arguments[i] ? arguments[i] : {};
68746
- i % 2 ? ownKeys$8(Object(source), !0).forEach(function(key) {
68746
+ i % 2 ? ownKeys$9(Object(source), !0).forEach(function(key) {
68747
68747
  _defineProperty$3(target, key, source[key]);
68748
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function(key) {
68748
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function(key) {
68749
68749
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
68750
68750
  });
68751
68751
  }
@@ -69139,7 +69139,7 @@ function _iterableToArrayLimit$1(arr, i) {
69139
69139
  function _arrayWithHoles$1(arr) {
69140
69140
  if (Array.isArray(arr)) return arr;
69141
69141
  }
69142
- function ownKeys$7(object, enumerableOnly) {
69142
+ function ownKeys$8(object, enumerableOnly) {
69143
69143
  var keys = Object.keys(object);
69144
69144
  if (Object.getOwnPropertySymbols) {
69145
69145
  var symbols = Object.getOwnPropertySymbols(object);
@@ -69152,9 +69152,9 @@ function ownKeys$7(object, enumerableOnly) {
69152
69152
  function _objectSpread(target) {
69153
69153
  for(var i = 1; i < arguments.length; i++){
69154
69154
  var source = null != arguments[i] ? arguments[i] : {};
69155
- i % 2 ? ownKeys$7(Object(source), !0).forEach(function(key) {
69155
+ i % 2 ? ownKeys$8(Object(source), !0).forEach(function(key) {
69156
69156
  _defineProperty$2(target, key, source[key]);
69157
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function(key) {
69157
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function(key) {
69158
69158
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
69159
69159
  });
69160
69160
  }
@@ -70145,7 +70145,7 @@ function _defineProperty$1(e, r, t) {
70145
70145
  }) : e[r] = t, e;
70146
70146
  }
70147
70147
 
70148
- function ownKeys$6(e, r) {
70148
+ function ownKeys$7(e, r) {
70149
70149
  var t = Object.keys(e);
70150
70150
  if (Object.getOwnPropertySymbols) {
70151
70151
  var o = Object.getOwnPropertySymbols(e);
@@ -70158,9 +70158,9 @@ function ownKeys$6(e, r) {
70158
70158
  function _objectSpread2$7(e) {
70159
70159
  for(var r = 1; r < arguments.length; r++){
70160
70160
  var t = null != arguments[r] ? arguments[r] : {};
70161
- r % 2 ? ownKeys$6(Object(t), !0).forEach(function(r) {
70161
+ r % 2 ? ownKeys$7(Object(t), !0).forEach(function(r) {
70162
70162
  _defineProperty$1(e, r, t[r]);
70163
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function(r) {
70163
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function(r) {
70164
70164
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
70165
70165
  });
70166
70166
  }
@@ -79554,7 +79554,7 @@ function _object_spread$9(target) {
79554
79554
  }
79555
79555
  return target;
79556
79556
  }
79557
- function ownKeys$5(object, enumerableOnly) {
79557
+ function ownKeys$6(object, enumerableOnly) {
79558
79558
  var keys = Object.keys(object);
79559
79559
  if (Object.getOwnPropertySymbols) {
79560
79560
  var symbols = Object.getOwnPropertySymbols(object);
@@ -79567,12 +79567,12 @@ function ownKeys$5(object, enumerableOnly) {
79567
79567
  }
79568
79568
  return keys;
79569
79569
  }
79570
- function _object_spread_props$5(target, source) {
79570
+ function _object_spread_props$6(target, source) {
79571
79571
  source = source != null ? source : {};
79572
79572
  if (Object.getOwnPropertyDescriptors) {
79573
79573
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
79574
79574
  } else {
79575
- ownKeys$5(Object(source)).forEach(function(key) {
79575
+ ownKeys$6(Object(source)).forEach(function(key) {
79576
79576
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
79577
79577
  });
79578
79578
  }
@@ -79586,7 +79586,7 @@ var DragDropImages = function(param) {
79586
79586
  droppableId: "droppable-imageUrls",
79587
79587
  direction: "horizontal",
79588
79588
  children: function(provided) {
79589
- return /*#__PURE__*/ jsxs("div", _object_spread_props$5(_object_spread$9({
79589
+ return /*#__PURE__*/ jsxs("div", _object_spread_props$6(_object_spread$9({
79590
79590
  ref: provided.innerRef
79591
79591
  }, provided.droppableProps), {
79592
79592
  className: "flex gap-2 overflow-scroll",
@@ -79596,7 +79596,7 @@ var DragDropImages = function(param) {
79596
79596
  draggableId: item === null || item === void 0 ? void 0 : item.id,
79597
79597
  index: index,
79598
79598
  children: function(provided) {
79599
- return /*#__PURE__*/ jsxs("div", _object_spread_props$5(_object_spread$9({
79599
+ return /*#__PURE__*/ jsxs("div", _object_spread_props$6(_object_spread$9({
79600
79600
  ref: provided.innerRef
79601
79601
  }, provided.draggableProps, provided.dragHandleProps), {
79602
79602
  className: "w-24 my-2 rounded-lg bg-gray-200",
@@ -79708,7 +79708,7 @@ function _object_spread$8(target) {
79708
79708
  }
79709
79709
  return target;
79710
79710
  }
79711
- function ownKeys$4(object, enumerableOnly) {
79711
+ function ownKeys$5(object, enumerableOnly) {
79712
79712
  var keys = Object.keys(object);
79713
79713
  if (Object.getOwnPropertySymbols) {
79714
79714
  var symbols = Object.getOwnPropertySymbols(object);
@@ -79721,12 +79721,12 @@ function ownKeys$4(object, enumerableOnly) {
79721
79721
  }
79722
79722
  return keys;
79723
79723
  }
79724
- function _object_spread_props$4(target, source) {
79724
+ function _object_spread_props$5(target, source) {
79725
79725
  source = source != null ? source : {};
79726
79726
  if (Object.getOwnPropertyDescriptors) {
79727
79727
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
79728
79728
  } else {
79729
- ownKeys$4(Object(source)).forEach(function(key) {
79729
+ ownKeys$5(Object(source)).forEach(function(key) {
79730
79730
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
79731
79731
  });
79732
79732
  }
@@ -79788,7 +79788,7 @@ var DropImage = function(param) {
79788
79788
  var _newItems_splice = _sliced_to_array$5(newItems.splice(result.source.index, 1), 1), reorderedItem = _newItems_splice[0];
79789
79789
  newItems.splice(result.destination.index, 0, reorderedItem);
79790
79790
  var reSortItem = newItems.map(function(item, index) {
79791
- return _object_spread_props$4(_object_spread$8({}, item), {
79791
+ return _object_spread_props$5(_object_spread$8({}, item), {
79792
79792
  index: index + 1
79793
79793
  });
79794
79794
  });
@@ -79803,7 +79803,7 @@ var DropImage = function(param) {
79803
79803
  return /*#__PURE__*/ jsxs("section", {
79804
79804
  className: "w-full",
79805
79805
  children: [
79806
- /*#__PURE__*/ jsxs("div", _object_spread_props$4(_object_spread$8({}, getRootProps({
79806
+ /*#__PURE__*/ jsxs("div", _object_spread_props$5(_object_spread$8({}, getRootProps({
79807
79807
  className: "dropzone"
79808
79808
  })), {
79809
79809
  children: [
@@ -80236,7 +80236,7 @@ function _object_spread$7(target) {
80236
80236
  }
80237
80237
  return target;
80238
80238
  }
80239
- function ownKeys$3(object, enumerableOnly) {
80239
+ function ownKeys$4(object, enumerableOnly) {
80240
80240
  var keys = Object.keys(object);
80241
80241
  if (Object.getOwnPropertySymbols) {
80242
80242
  var symbols = Object.getOwnPropertySymbols(object);
@@ -80249,12 +80249,12 @@ function ownKeys$3(object, enumerableOnly) {
80249
80249
  }
80250
80250
  return keys;
80251
80251
  }
80252
- function _object_spread_props$3(target, source) {
80252
+ function _object_spread_props$4(target, source) {
80253
80253
  source = source != null ? source : {};
80254
80254
  if (Object.getOwnPropertyDescriptors) {
80255
80255
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
80256
80256
  } else {
80257
- ownKeys$3(Object(source)).forEach(function(key) {
80257
+ ownKeys$4(Object(source)).forEach(function(key) {
80258
80258
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
80259
80259
  });
80260
80260
  }
@@ -80291,7 +80291,7 @@ var Switch = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
80291
80291
  var className = _param.className, props = _object_without_properties$6(_param, [
80292
80292
  "className"
80293
80293
  ]);
80294
- return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props$3(_object_spread$7({
80294
+ return /*#__PURE__*/ jsx(SwitchPrimitives.Root, _object_spread_props$4(_object_spread$7({
80295
80295
  className: cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className)
80296
80296
  }, props), {
80297
80297
  ref: ref,
@@ -80330,6 +80330,30 @@ function _object_spread$6(target) {
80330
80330
  }
80331
80331
  return target;
80332
80332
  }
80333
+ function ownKeys$3(object, enumerableOnly) {
80334
+ var keys = Object.keys(object);
80335
+ if (Object.getOwnPropertySymbols) {
80336
+ var symbols = Object.getOwnPropertySymbols(object);
80337
+ if (enumerableOnly) {
80338
+ symbols = symbols.filter(function(sym) {
80339
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
80340
+ });
80341
+ }
80342
+ keys.push.apply(keys, symbols);
80343
+ }
80344
+ return keys;
80345
+ }
80346
+ function _object_spread_props$3(target, source) {
80347
+ source = source != null ? source : {};
80348
+ if (Object.getOwnPropertyDescriptors) {
80349
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
80350
+ } else {
80351
+ ownKeys$3(Object(source)).forEach(function(key) {
80352
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
80353
+ });
80354
+ }
80355
+ return target;
80356
+ }
80333
80357
  function _object_without_properties$5(source, excluded) {
80334
80358
  if (source == null) return {};
80335
80359
  var target = _object_without_properties_loose$5(source, excluded);
@@ -80380,21 +80404,31 @@ var buttonVariants = cva("inline-flex items-center justify-center whitespace-now
80380
80404
  }
80381
80405
  });
80382
80406
  var Button = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
80383
- var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties$5(_param, [
80407
+ var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, _param_isLoading = _param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, children = _param.children, props = _object_without_properties$5(_param, [
80384
80408
  "className",
80385
80409
  "variant",
80386
80410
  "size",
80387
- "asChild"
80411
+ "asChild",
80412
+ "isLoading",
80413
+ "children"
80388
80414
  ]);
80389
80415
  var Comp = asChild ? Slot : "button";
80390
- return /*#__PURE__*/ jsx(Comp, _object_spread$6({
80416
+ return /*#__PURE__*/ jsxs(Comp, _object_spread_props$3(_object_spread$6({
80391
80417
  className: cn(buttonVariants({
80392
80418
  variant: variant,
80393
80419
  size: size,
80394
80420
  className: className
80395
- })),
80421
+ }), isLoading ? "pointer-events-none opacity-30" : "pointer-events-auto opacity-100"),
80396
80422
  ref: ref
80397
- }, props));
80423
+ }, props), {
80424
+ disabled: isLoading || props.disabled,
80425
+ children: [
80426
+ isLoading && /*#__PURE__*/ jsx("div", {
80427
+ className: "w-4 h-4 rounded-full border-2 border-solid border-white border-t-[#939393] animate-spin mr-2"
80428
+ }),
80429
+ children
80430
+ ]
80431
+ }));
80398
80432
  });
80399
80433
 
80400
80434
  function _define_property$5(obj, key, value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.1.81",
3
+ "version": "0.1.82",
4
4
  "dependencies": {
5
5
  "@iconify/react": "^4.1.1",
6
6
  "@mdx-js/react": "^3.0.1",
@@ -1,11 +1,20 @@
1
- /// <reference types="react" />
2
1
  export interface ColumnDef {
3
- id: string;
4
- header: React.ReactNode;
5
- cell: React.ReactNode;
2
+ accessorKey: string;
3
+ header: ((props: {
4
+ column: any;
5
+ }) => JSX.Element) | string;
6
+ cell: (props: {
7
+ row: any;
8
+ }) => JSX.Element;
9
+ id?: string;
6
10
  enableSorting?: boolean | undefined;
7
11
  enableHiding?: boolean | undefined;
8
- accessorKey?: string | undefined;
12
+ }
13
+ interface PaginationConfigType {
14
+ page: number;
15
+ limit: number;
16
+ total: number;
17
+ onPageChange: (e: any) => void;
9
18
  }
10
19
  export interface DataTableProps {
11
20
  data: any[];
@@ -17,5 +26,7 @@ export interface DataTableProps {
17
26
  name: string;
18
27
  };
19
28
  mappingColumn: any;
20
- paginationConfig: any;
29
+ paginationConfig?: PaginationConfigType;
30
+ SearchSelectCP?: any;
21
31
  }
32
+ export {};
@@ -6,6 +6,7 @@ declare const buttonVariants: (props?: ({
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
9
+ isLoading?: boolean;
9
10
  }
10
11
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
12
  export { Button, buttonVariants };
@@ -0,0 +1,7 @@
1
+ declare const Checkbox: ({ children, checked, onChange, id }: {
2
+ children: any;
3
+ checked: any;
4
+ onChange: any;
5
+ id: any;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default Checkbox;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface DisabledItemProps {
3
+ children: JSX.Element | string;
4
+ }
5
+ declare const DisabledItem: React.FC<DisabledItemProps>;
6
+ export default DisabledItem;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { GroupOption } from './type';
3
+ interface GroupItemProps {
4
+ item: GroupOption;
5
+ primaryColor: string;
6
+ }
7
+ declare const GroupItem: React.FC<GroupItemProps>;
8
+ export default GroupItem;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface Props {
3
+ className?: string;
4
+ }
5
+ export declare const CloseIcon: React.FC<Props>;
6
+ export declare const ChevronIcon: React.FC<Props>;
7
+ export declare const SearchIcon: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Option } from './type';
3
+ interface ItemProps {
4
+ item: Option;
5
+ primaryColor: string;
6
+ }
7
+ declare const Item: React.FC<ItemProps>;
8
+ export default Item;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { Option, Options as ListOption } from "./type";
3
+ interface OptionsProps {
4
+ list: ListOption;
5
+ noOptionsMessage: string;
6
+ text: string;
7
+ isMultiple: boolean;
8
+ value: Option | Option[] | null;
9
+ primaryColor: string;
10
+ }
11
+ declare const Options: React.FC<OptionsProps>;
12
+ export default Options;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface SearchInputProps {
3
+ placeholder?: string;
4
+ value: string;
5
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
6
+ name?: string;
7
+ }
8
+ declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
9
+ export default SearchInput;
@@ -0,0 +1,4 @@
1
+ declare const SelectContainer: ({ children }: {
2
+ children: any;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default SelectContainer;
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import { ClassNames, GroupOption, Option } from "./type";
3
+ interface Store {
4
+ value: Option | Option[] | null;
5
+ handleValueChange: (selected: Option) => void;
6
+ formatGroupLabel: ((data: GroupOption) => JSX.Element) | null;
7
+ formatOptionLabel: ((data: Option) => JSX.Element) | null;
8
+ classNames?: ClassNames;
9
+ }
10
+ interface Props {
11
+ value: Option | Option[] | null;
12
+ handleValueChange: (selected: Option) => void;
13
+ children: JSX.Element;
14
+ otherData: {
15
+ formatGroupLabel: ((data: GroupOption) => JSX.Element) | null;
16
+ formatOptionLabel: ((data: Option) => JSX.Element) | null;
17
+ classNames?: ClassNames;
18
+ };
19
+ }
20
+ export declare const SelectContext: React.Context<Store>;
21
+ export declare const useSelectContext: () => Store;
22
+ declare const SelectProvider: React.FC<Props>;
23
+ export default SelectProvider;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface Props {
3
+ primaryColor?: string;
4
+ }
5
+ declare const Spinner: React.FC<Props>;
6
+ export default Spinner;
@@ -0,0 +1,4 @@
1
+ declare const TailwindColors: ({ changeColor }: {
2
+ changeColor: any;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default TailwindColors;
@@ -0,0 +1,118 @@
1
+ export declare const COLORS: string[];
2
+ export declare const DEFAULT_THEME = "blue";
3
+ export declare const THEME_DATA: {
4
+ bg: {
5
+ blue: string;
6
+ orange: string;
7
+ yellow: string;
8
+ red: string;
9
+ purple: string;
10
+ amber: string;
11
+ lime: string;
12
+ green: string;
13
+ emerald: string;
14
+ teal: string;
15
+ cyan: string;
16
+ sky: string;
17
+ indigo: string;
18
+ violet: string;
19
+ fuchsia: string;
20
+ pink: string;
21
+ rose: string;
22
+ };
23
+ bgHover: {
24
+ blue: string;
25
+ orange: string;
26
+ yellow: string;
27
+ red: string;
28
+ purple: string;
29
+ amber: string;
30
+ lime: string;
31
+ green: string;
32
+ emerald: string;
33
+ teal: string;
34
+ cyan: string;
35
+ sky: string;
36
+ indigo: string;
37
+ violet: string;
38
+ fuchsia: string;
39
+ pink: string;
40
+ rose: string;
41
+ };
42
+ ring: {
43
+ blue: string;
44
+ orange: string;
45
+ yellow: string;
46
+ red: string;
47
+ purple: string;
48
+ amber: string;
49
+ lime: string;
50
+ green: string;
51
+ emerald: string;
52
+ teal: string;
53
+ cyan: string;
54
+ sky: string;
55
+ indigo: string;
56
+ violet: string;
57
+ fuchsia: string;
58
+ pink: string;
59
+ rose: string;
60
+ };
61
+ borderFocus: {
62
+ blue: string;
63
+ orange: string;
64
+ yellow: string;
65
+ red: string;
66
+ purple: string;
67
+ amber: string;
68
+ lime: string;
69
+ green: string;
70
+ emerald: string;
71
+ teal: string;
72
+ cyan: string;
73
+ sky: string;
74
+ indigo: string;
75
+ violet: string;
76
+ fuchsia: string;
77
+ pink: string;
78
+ rose: string;
79
+ };
80
+ text: {
81
+ blue: string;
82
+ orange: string;
83
+ yellow: string;
84
+ red: string;
85
+ purple: string;
86
+ amber: string;
87
+ lime: string;
88
+ green: string;
89
+ emerald: string;
90
+ teal: string;
91
+ cyan: string;
92
+ sky: string;
93
+ indigo: string;
94
+ violet: string;
95
+ fuchsia: string;
96
+ pink: string;
97
+ rose: string;
98
+ };
99
+ textHover: {
100
+ blue: string;
101
+ orange: string;
102
+ yellow: string;
103
+ red: string;
104
+ purple: string;
105
+ amber: string;
106
+ lime: string;
107
+ green: string;
108
+ emerald: string;
109
+ teal: string;
110
+ cyan: string;
111
+ sky: string;
112
+ indigo: string;
113
+ violet: string;
114
+ fuchsia: string;
115
+ pink: string;
116
+ rose: string;
117
+ };
118
+ };
@@ -0,0 +1,16 @@
1
+ export declare const demoOptions: ({
2
+ label: string;
3
+ options: {
4
+ value: string;
5
+ label: string;
6
+ disabled: boolean;
7
+ }[];
8
+ value?: undefined;
9
+ disabled?: undefined;
10
+ } | {
11
+ value: string;
12
+ label: string;
13
+ disabled: boolean;
14
+ options?: undefined;
15
+ })[];
16
+ export declare const SELECT_OPTIONS: string[];
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SelectProps } from './type';
3
+ declare const DropDown: React.FC<SelectProps>;
4
+ export default DropDown;
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ export interface Option {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ isSelected?: boolean;
7
+ }
8
+ export interface GroupOption {
9
+ label: string;
10
+ options: Option[];
11
+ }
12
+ export type Options = Array<Option | GroupOption>;
13
+ export interface ClassNames {
14
+ menuButton?: (value?: {
15
+ isDisabled?: boolean;
16
+ }) => string;
17
+ menu?: string;
18
+ tagItem?: (value?: {
19
+ item?: Option;
20
+ isDisabled?: boolean;
21
+ }) => string;
22
+ tagItemText?: string;
23
+ tagItemIconContainer?: string;
24
+ tagItemIcon?: string;
25
+ list?: string;
26
+ listGroupLabel?: string;
27
+ listItem?: (value?: {
28
+ isSelected?: boolean;
29
+ }) => string;
30
+ listDisabledItem?: string;
31
+ ChevronIcon?: (value?: {
32
+ open?: boolean;
33
+ }) => string;
34
+ searchContainer?: string;
35
+ searchBox?: string;
36
+ searchIcon?: string;
37
+ closeIcon?: string;
38
+ }
39
+ export type SelectValue = Option | Option[] | null;
40
+ export interface SelectProps {
41
+ options: Options;
42
+ value: SelectValue;
43
+ onChange: (value: SelectValue) => void;
44
+ onSearchInputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
45
+ placeholder?: string;
46
+ isMultiple?: boolean;
47
+ isClearable?: boolean;
48
+ isSearchable?: boolean;
49
+ isDisabled?: boolean;
50
+ isGroupOption?: boolean;
51
+ loading?: boolean;
52
+ menuIsOpen?: boolean;
53
+ searchInputPlaceholder?: string;
54
+ noOptionsMessage?: string;
55
+ primaryColor: string;
56
+ formatGroupLabel?: ((data: GroupOption) => JSX.Element) | null;
57
+ formatOptionLabel?: ((data: Option) => JSX.Element) | null;
58
+ classNames?: ClassNames;
59
+ }
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export default function useOnClickOutside(ref: React.RefObject<HTMLDivElement>, handler: (e?: MouseEvent | TouchEvent) => void): void;