@ctlyst.id/internal-ui 2.0.7 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. package/dist/components/button/__stories__/button.stories.d.ts +1 -1
  2. package/dist/components/button/index.d.ts +1 -0
  3. package/dist/components/image/index.d.ts +1 -0
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/components/layouting/index.d.ts +1 -16
  6. package/dist/components/list/index.d.ts +1 -0
  7. package/dist/components/popover/index.d.ts +1 -0
  8. package/dist/components/text/index.d.ts +1 -2
  9. package/dist/components/tooltip/__stories__/tooltip.stories.d.ts +10 -0
  10. package/dist/components/tooltip/index.d.ts +1 -0
  11. package/dist/config/theme/components/checkbox.d.ts +15 -1
  12. package/dist/config/theme/components/radio.d.ts +3 -0
  13. package/dist/hooks/index.d.ts +1 -2
  14. package/dist/index.d.ts +2 -0
  15. package/dist/internal-ui.cjs.development.js +190 -38
  16. package/dist/internal-ui.cjs.development.js.map +1 -1
  17. package/dist/internal-ui.cjs.production.min.js +5 -5
  18. package/dist/internal-ui.cjs.production.min.js.map +1 -1
  19. package/dist/internal-ui.esm.js +84 -26
  20. package/dist/internal-ui.esm.js.map +1 -1
  21. package/dist/provider/index.d.ts +1 -0
  22. package/package.json +2 -2
  23. package/dist/components/layouting/components/box.d.ts +0 -4
  24. package/dist/components/layouting/components/button-group.d.ts +0 -4
  25. package/dist/components/layouting/components/container.d.ts +0 -4
  26. package/dist/components/layouting/components/flex.d.ts +0 -4
  27. package/dist/components/layouting/components/grid.d.ts +0 -4
  28. package/dist/components/layouting/components/list.d.ts +0 -6
  29. package/dist/components/layouting/components/stack.d.ts +0 -5
  30. package/dist/components/layouting/components/wrap.d.ts +0 -4
  31. package/dist/components/text/components/text.d.ts +0 -4
  32. package/dist/hooks/useDisclosure.d.ts +0 -4
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  declare const _default: {
3
3
  chakra: {
4
4
  theme: Record<string, any>;
@@ -1,2 +1,3 @@
1
1
  export { default as Button } from './components/button';
2
2
  export * from './components/button';
3
+ export { ButtonGroup, ButtonGroupProps, CloseButton, CloseButtonProps } from '@chakra-ui/react';
@@ -0,0 +1 @@
1
+ export { Icon, IconProps, Image, ImageProps } from '@chakra-ui/react';
@@ -20,4 +20,5 @@ export * from './select';
20
20
  export * from './switch';
21
21
  export * from './tabs';
22
22
  export * from './text';
23
+ export * from './tooltip';
23
24
  export * from './uploader';
@@ -1,16 +1 @@
1
- export { default as Box } from './components/box';
2
- export * from './components/box';
3
- export { default as ButtonGroup } from './components/button-group';
4
- export * from './components/button-group';
5
- export { default as Container } from './components/container';
6
- export * from './components/container';
7
- export { default as Flex } from './components/flex';
8
- export * from './components/flex';
9
- export { default as Grid } from './components/grid';
10
- export * from './components/grid';
11
- export { default as List } from './components/list';
12
- export * from './components/list';
13
- export { default as Stack } from './components/stack';
14
- export * from './components/stack';
15
- export { default as Wrap } from './components/wrap';
16
- export * from './components/wrap';
1
+ export { Box, BoxProps, Container, ContainerProps, Divider, DividerProps, Flex, FlexProps, Grid, GridItem, GridItemProps, GridProps, HStack, Stack, StackProps, VStack, Wrap, WrapItem, WrapItemProps, WrapProps, } from '@chakra-ui/react';
@@ -0,0 +1 @@
1
+ export { List, ListIcon, ListItem, ListItemProps, ListProps, OrderedList, UnorderedList } from '@chakra-ui/react';
@@ -0,0 +1 @@
1
+ export { Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, Portal, PortalProps, } from '@chakra-ui/react';
@@ -1,2 +1 @@
1
- export { default as Text } from './components/text';
2
- export * from './components/text';
1
+ export { Heading, HeadingProps, Text, TextProps } from '@chakra-ui/react';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export { Tooltip, TooltipProps } from '@chakra-ui/react';
@@ -8,7 +8,6 @@ declare const Checkbox: {
8
8
  };
9
9
  icon: {
10
10
  color: string;
11
- width: string;
12
11
  };
13
12
  label: {
14
13
  fontWeight: string;
@@ -48,6 +47,9 @@ declare const Checkbox: {
48
47
  label: {
49
48
  fontSize: string;
50
49
  };
50
+ icon: {
51
+ fontSize: string;
52
+ };
51
53
  };
52
54
  unstyled: {
53
55
  control: {
@@ -62,6 +64,7 @@ declare const Checkbox: {
62
64
  _disabled: {
63
65
  backgroundColor: string;
64
66
  borderColor: string;
67
+ opacity: number;
65
68
  };
66
69
  };
67
70
  _disabled: {
@@ -71,10 +74,21 @@ declare const Checkbox: {
71
74
  _indeterminate: {
72
75
  borderColor: string;
73
76
  backgroundColor: string;
77
+ _disabled: {
78
+ backgroundColor: string;
79
+ borderColor: string;
80
+ opacity: number;
81
+ };
74
82
  };
75
83
  };
76
84
  label: {
77
85
  fontSize: string;
86
+ _disabled: {
87
+ opacity: number;
88
+ };
89
+ };
90
+ icon: {
91
+ fontSize: string;
78
92
  };
79
93
  };
80
94
  } | undefined;
@@ -10,6 +10,7 @@ declare const Radio: {
10
10
  textStyle: string;
11
11
  color: string;
12
12
  _disabled: {
13
+ opacity: number;
13
14
  color: string;
14
15
  };
15
16
  };
@@ -42,6 +43,7 @@ declare const Radio: {
42
43
  h: string;
43
44
  w: string;
44
45
  bg: string;
46
+ opacity: number;
45
47
  };
46
48
  };
47
49
  };
@@ -72,6 +74,7 @@ declare const Radio: {
72
74
  _disabled: {
73
75
  borderColor: string;
74
76
  bg: string;
77
+ opacity: number;
75
78
  _before: {
76
79
  h: string;
77
80
  w: string;
@@ -1,3 +1,2 @@
1
- export { default as useDisclosure } from './useDisclosure';
2
- export * from './useDisclosure';
3
1
  export { default as useFetcher } from './useFetcher';
2
+ export { useColorModeValue, useDisclosure, UseDisclosureProps } from '@chakra-ui/react';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export * from './components';
2
2
  export * from './config';
3
+ export * from './hooks';
3
4
  export * from './provider';
5
+ export { extendTheme } from '@chakra-ui/react';
@@ -405,15 +405,21 @@ function CheckboxComponent({
405
405
  }, rest, {
406
406
  isDisabled: isDisabled
407
407
  }), children && /*#__PURE__*/React__default.createElement(react.Text, {
408
+ as: "span",
409
+ display: "block",
408
410
  textStyle: "text.sm",
409
- color: isDisabled ? 'black.low' : 'black.high'
411
+ color: isDisabled ? 'black.medium' : 'black.high'
410
412
  }, children))), /*#__PURE__*/React__default.createElement(react.Box, {
411
413
  mt: "5px",
412
414
  ml: "24px"
413
415
  }, isError ? /*#__PURE__*/React__default.createElement(react.Text, {
416
+ as: "span",
417
+ display: "block",
414
418
  textStyle: "text.xs",
415
419
  color: "danger.500"
416
420
  }, errorText) : /*#__PURE__*/React__default.createElement(react.Text, {
421
+ as: "span",
422
+ display: "block",
417
423
  textStyle: "text.xs",
418
424
  color: "black.medium"
419
425
  }, helpText)));
@@ -2906,15 +2912,21 @@ function RadioComponent({
2906
2912
  }, rest, {
2907
2913
  isDisabled: isDisabled
2908
2914
  }), children && /*#__PURE__*/React__default.createElement(react.Text, {
2915
+ as: "span",
2916
+ display: "block",
2909
2917
  textStyle: "text.sm",
2910
- color: isDisabled ? 'black.low' : 'black.high'
2918
+ color: isDisabled ? 'black.medium' : 'black.high'
2911
2919
  }, children))), /*#__PURE__*/React__default.createElement(react.Box, {
2912
2920
  mt: "5px",
2913
2921
  ml: "24px"
2914
2922
  }, isError ? /*#__PURE__*/React__default.createElement(react.Text, {
2923
+ as: "span",
2924
+ display: "block",
2915
2925
  textStyle: "text.xs",
2916
2926
  color: "danger.500"
2917
2927
  }, errorText) : /*#__PURE__*/React__default.createElement(react.Text, {
2928
+ as: "span",
2929
+ display: "block",
2918
2930
  textStyle: "text.xs",
2919
2931
  color: "black.medium"
2920
2932
  }, helpText)));
@@ -3840,8 +3852,7 @@ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
3840
3852
  border: '1px solid'
3841
3853
  },
3842
3854
  icon: {
3843
- color: 'neutral.50',
3844
- width: '9px'
3855
+ color: 'neutral.50'
3845
3856
  },
3846
3857
  label: {
3847
3858
  fontWeight: '400',
@@ -3850,8 +3861,8 @@ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
3850
3861
  ml: '8px'
3851
3862
  },
3852
3863
  _disabled: {
3853
- background: 'neutral.500',
3854
- border: '1px solid',
3864
+ background: 'neutral.200',
3865
+ border: '0',
3855
3866
  borderColor: 'neutral.500',
3856
3867
  cursor: 'not-allowed'
3857
3868
  }
@@ -3874,11 +3885,14 @@ const errors = /*#__PURE__*/definePartsStyle$1({
3874
3885
  },
3875
3886
  label: {
3876
3887
  fontSize: '12px'
3888
+ },
3889
+ icon: {
3890
+ fontSize: '7px'
3877
3891
  }
3878
3892
  });
3879
3893
  const unstyled = /*#__PURE__*/definePartsStyle$1({
3880
3894
  control: {
3881
- borderColor: 'neutral.500',
3895
+ borderColor: 'neutral.600',
3882
3896
  _checked: {
3883
3897
  borderColor: 'primary.500',
3884
3898
  backgroundColor: 'primary.500',
@@ -3887,21 +3901,33 @@ const unstyled = /*#__PURE__*/definePartsStyle$1({
3887
3901
  backgroundColor: 'primary.600'
3888
3902
  },
3889
3903
  _disabled: {
3890
- backgroundColor: 'neutral.500',
3891
- borderColor: 'neutral.500'
3904
+ backgroundColor: 'primary.500',
3905
+ borderColor: 'primary.500',
3906
+ opacity: 0.3
3892
3907
  }
3893
3908
  },
3894
3909
  _disabled: {
3895
- backgroundColor: 'neutral.500',
3896
- borderColor: 'neutral.500'
3910
+ backgroundColor: 'neutral.200',
3911
+ borderColor: 'neutral.200'
3897
3912
  },
3898
3913
  _indeterminate: {
3899
3914
  borderColor: 'primary.500',
3900
- backgroundColor: 'primary.500'
3915
+ backgroundColor: 'primary.500',
3916
+ _disabled: {
3917
+ backgroundColor: 'primary.500',
3918
+ borderColor: 'primary.500',
3919
+ opacity: 0.3
3920
+ }
3901
3921
  }
3902
3922
  },
3903
3923
  label: {
3904
- fontSize: '12px'
3924
+ fontSize: '12px',
3925
+ _disabled: {
3926
+ opacity: 1
3927
+ }
3928
+ },
3929
+ icon: {
3930
+ fontSize: '7px'
3905
3931
  }
3906
3932
  });
3907
3933
  const variants$1 = {
@@ -4214,7 +4240,8 @@ const baseStyle$4 = /*#__PURE__*/definePartsStyle$4({
4214
4240
  textStyle: 'text.sm',
4215
4241
  color: 'black.high',
4216
4242
  _disabled: {
4217
- color: 'black.low'
4243
+ opacity: 1,
4244
+ color: 'black.medium'
4218
4245
  }
4219
4246
  }
4220
4247
  });
@@ -4231,21 +4258,22 @@ const errors$1 = /*#__PURE__*/definePartsStyle$4({
4231
4258
  },
4232
4259
  _hover: {
4233
4260
  borderColor: 'danger.500',
4234
- bg: 'gray.200'
4261
+ bg: 'neutral.200'
4235
4262
  },
4236
4263
  _disabled: {
4237
4264
  borderColor: 'danger.500',
4238
- bg: 'white',
4265
+ bg: 'white.high',
4239
4266
  _before: {
4240
4267
  h: '10px',
4241
4268
  w: '10px',
4242
- bg: 'neutral.500'
4269
+ bg: 'primary.500',
4270
+ opacity: 0.3
4243
4271
  }
4244
4272
  }
4245
4273
  },
4246
4274
  _disabled: {
4247
4275
  borderColor: 'danger.500',
4248
- bg: 'neutral.500'
4276
+ bg: 'neutral.200'
4249
4277
  }
4250
4278
  },
4251
4279
  label: {
@@ -4268,18 +4296,19 @@ const unstyled$2 = /*#__PURE__*/definePartsStyle$4({
4268
4296
  bg: 'gray.200'
4269
4297
  },
4270
4298
  _disabled: {
4271
- borderColor: 'neutral.500',
4272
- bg: 'white',
4299
+ borderColor: 'primary.500',
4300
+ bg: 'white.high',
4301
+ opacity: 0.3,
4273
4302
  _before: {
4274
4303
  h: '10px',
4275
4304
  w: '10px',
4276
- bg: 'neutral.500'
4305
+ bg: 'primary.500'
4277
4306
  }
4278
4307
  }
4279
4308
  },
4280
4309
  _disabled: {
4281
- borderColor: 'neutral.500',
4282
- bg: 'neutral.500'
4310
+ borderColor: 'neutral.200',
4311
+ bg: 'neutral.200'
4283
4312
  }
4284
4313
  },
4285
4314
  label: {
@@ -4526,6 +4555,35 @@ const Provider = ({
4526
4555
  };
4527
4556
  Provider.displayName = 'Provider';
4528
4557
 
4558
+ function useFetcher() {
4559
+ const {
4560
+ instance
4561
+ } = useInternalUI();
4562
+ const axiosInstance = React.useMemo(() => instance || axios, [instance]);
4563
+ const fetcher = async ({
4564
+ url,
4565
+ data,
4566
+ method,
4567
+ headers,
4568
+ ...config
4569
+ }) => {
4570
+ const response = await axiosInstance.request({
4571
+ data,
4572
+ url,
4573
+ method,
4574
+ headers: {
4575
+ 'Content-Type': 'application/json; charset=utf-8',
4576
+ ...headers
4577
+ },
4578
+ ...config
4579
+ });
4580
+ return response;
4581
+ };
4582
+ return {
4583
+ fetcher
4584
+ };
4585
+ }
4586
+
4529
4587
  Object.defineProperty(exports, 'AlertDialog', {
4530
4588
  enumerable: true,
4531
4589
  get: function () {
@@ -4568,6 +4626,42 @@ Object.defineProperty(exports, 'AlertDialogOverlay', {
4568
4626
  return react.ModalOverlay;
4569
4627
  }
4570
4628
  });
4629
+ Object.defineProperty(exports, 'Box', {
4630
+ enumerable: true,
4631
+ get: function () {
4632
+ return react.Box;
4633
+ }
4634
+ });
4635
+ Object.defineProperty(exports, 'ButtonGroup', {
4636
+ enumerable: true,
4637
+ get: function () {
4638
+ return react.ButtonGroup;
4639
+ }
4640
+ });
4641
+ Object.defineProperty(exports, 'ChakraProvider', {
4642
+ enumerable: true,
4643
+ get: function () {
4644
+ return react.ChakraProvider;
4645
+ }
4646
+ });
4647
+ Object.defineProperty(exports, 'CloseButton', {
4648
+ enumerable: true,
4649
+ get: function () {
4650
+ return react.CloseButton;
4651
+ }
4652
+ });
4653
+ Object.defineProperty(exports, 'Container', {
4654
+ enumerable: true,
4655
+ get: function () {
4656
+ return react.Container;
4657
+ }
4658
+ });
4659
+ Object.defineProperty(exports, 'Divider', {
4660
+ enumerable: true,
4661
+ get: function () {
4662
+ return react.Divider;
4663
+ }
4664
+ });
4571
4665
  Object.defineProperty(exports, 'Drawer', {
4572
4666
  enumerable: true,
4573
4667
  get: function () {
@@ -4610,28 +4704,46 @@ Object.defineProperty(exports, 'DrawerOverlay', {
4610
4704
  return react.ModalOverlay;
4611
4705
  }
4612
4706
  });
4707
+ Object.defineProperty(exports, 'Flex', {
4708
+ enumerable: true,
4709
+ get: function () {
4710
+ return react.Flex;
4711
+ }
4712
+ });
4713
+ Object.defineProperty(exports, 'Grid', {
4714
+ enumerable: true,
4715
+ get: function () {
4716
+ return react.Grid;
4717
+ }
4718
+ });
4719
+ Object.defineProperty(exports, 'GridItem', {
4720
+ enumerable: true,
4721
+ get: function () {
4722
+ return react.GridItem;
4723
+ }
4724
+ });
4613
4725
  Object.defineProperty(exports, 'HStack', {
4614
4726
  enumerable: true,
4615
4727
  get: function () {
4616
4728
  return react.HStack;
4617
4729
  }
4618
4730
  });
4619
- Object.defineProperty(exports, 'InputElementLeft', {
4731
+ Object.defineProperty(exports, 'Heading', {
4620
4732
  enumerable: true,
4621
4733
  get: function () {
4622
- return react.InputLeftElement;
4734
+ return react.Heading;
4623
4735
  }
4624
4736
  });
4625
- Object.defineProperty(exports, 'InputElementRight', {
4737
+ Object.defineProperty(exports, 'InputElementLeft', {
4626
4738
  enumerable: true,
4627
4739
  get: function () {
4628
- return react.InputRightElement;
4740
+ return react.InputLeftElement;
4629
4741
  }
4630
4742
  });
4631
- Object.defineProperty(exports, 'ListItem', {
4743
+ Object.defineProperty(exports, 'InputElementRight', {
4632
4744
  enumerable: true,
4633
4745
  get: function () {
4634
- return react.ListItem;
4746
+ return react.InputRightElement;
4635
4747
  }
4636
4748
  });
4637
4749
  Object.defineProperty(exports, 'Modal', {
@@ -4664,6 +4776,12 @@ Object.defineProperty(exports, 'ModalOverlay', {
4664
4776
  return react.ModalOverlay;
4665
4777
  }
4666
4778
  });
4779
+ Object.defineProperty(exports, 'Stack', {
4780
+ enumerable: true,
4781
+ get: function () {
4782
+ return react.Stack;
4783
+ }
4784
+ });
4667
4785
  Object.defineProperty(exports, 'TabIndicator', {
4668
4786
  enumerable: true,
4669
4787
  get: function () {
@@ -4694,12 +4812,54 @@ Object.defineProperty(exports, 'TabsProvider', {
4694
4812
  return react.TabsProvider;
4695
4813
  }
4696
4814
  });
4815
+ Object.defineProperty(exports, 'Text', {
4816
+ enumerable: true,
4817
+ get: function () {
4818
+ return react.Text;
4819
+ }
4820
+ });
4821
+ Object.defineProperty(exports, 'Tooltip', {
4822
+ enumerable: true,
4823
+ get: function () {
4824
+ return react.Tooltip;
4825
+ }
4826
+ });
4697
4827
  Object.defineProperty(exports, 'VStack', {
4698
4828
  enumerable: true,
4699
4829
  get: function () {
4700
4830
  return react.VStack;
4701
4831
  }
4702
4832
  });
4833
+ Object.defineProperty(exports, 'Wrap', {
4834
+ enumerable: true,
4835
+ get: function () {
4836
+ return react.Wrap;
4837
+ }
4838
+ });
4839
+ Object.defineProperty(exports, 'WrapItem', {
4840
+ enumerable: true,
4841
+ get: function () {
4842
+ return react.WrapItem;
4843
+ }
4844
+ });
4845
+ Object.defineProperty(exports, 'extendTheme', {
4846
+ enumerable: true,
4847
+ get: function () {
4848
+ return react.extendTheme;
4849
+ }
4850
+ });
4851
+ Object.defineProperty(exports, 'useColorModeValue', {
4852
+ enumerable: true,
4853
+ get: function () {
4854
+ return react.useColorModeValue;
4855
+ }
4856
+ });
4857
+ Object.defineProperty(exports, 'useDisclosure', {
4858
+ enumerable: true,
4859
+ get: function () {
4860
+ return react.useDisclosure;
4861
+ }
4862
+ });
4703
4863
  Object.defineProperty(exports, 'useDrawerContext', {
4704
4864
  enumerable: true,
4705
4865
  get: function () {
@@ -4797,25 +4957,19 @@ exports.AlertDescription = AlertDescription;
4797
4957
  exports.AlertIcon = AlertIcon;
4798
4958
  exports.AlertTitle = AlertTitle;
4799
4959
  exports.Badge = Badge;
4800
- exports.Box = react.Box;
4801
4960
  exports.BreadCrumb = BreadCrumb;
4802
4961
  exports.Button = Button;
4803
- exports.ButtonGroup = react.ButtonGroup;
4804
4962
  exports.Card = CardCustom;
4805
4963
  exports.Checkbox = CheckboxComponent;
4806
4964
  exports.CheckboxGroup = CheckboxGroupComponent;
4807
- exports.Container = react.Container;
4808
4965
  exports.DataTable = DataTable;
4809
4966
  exports.DatePickerMonth = DatePickerMonth;
4810
4967
  exports.Datepicker = Datepicker;
4811
4968
  exports.Field = Field;
4812
- exports.Flex = react.Flex;
4813
- exports.Grid = react.Grid;
4814
4969
  exports.Header = Header;
4815
4970
  exports.InputAddonLeft = InputAddonLeft;
4816
4971
  exports.InputAddonRight = InputAddonRight;
4817
4972
  exports.InputField = InputField;
4818
- exports.List = react.List;
4819
4973
  exports.Loader = Loader;
4820
4974
  exports.MainMenu = Navigation;
4821
4975
  exports.ModalBody = ModalBody;
@@ -4835,17 +4989,15 @@ exports.Select = Select;
4835
4989
  exports.SelectAsync = SelectAsync;
4836
4990
  exports.SelectAsyncCreatable = SelectAsyncCreatable;
4837
4991
  exports.SelectCreatable = SelectCreatable;
4838
- exports.Stack = react.Stack;
4839
4992
  exports.Switch = Switch;
4840
4993
  exports.Tab = Tab;
4841
4994
  exports.TabList = TabList;
4842
4995
  exports.TabPanel = TabPanel;
4843
- exports.Text = react.Text;
4844
4996
  exports.TextareaField = TextareaField;
4845
4997
  exports.Uploader = Uploader;
4846
- exports.Wrap = react.Wrap;
4847
4998
  exports.foundations = foundations;
4848
4999
  exports.theme = theme;
4849
5000
  exports.useAlertStyles = useAlertStyles;
5001
+ exports.useFetcher = useFetcher;
4850
5002
  exports.useInternalUI = useInternalUI;
4851
5003
  //# sourceMappingURL=internal-ui.cjs.development.js.map