@ctlyst.id/internal-ui 2.0.22 → 2.0.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ import { AsyncPaginate } from 'react-select-async-paginate';
18
18
  import ReactSelectAsyncCreatable from 'react-select/async-creatable';
19
19
  import ReactSelectCreatable from 'react-select/creatable';
20
20
  import { useDropzone } from 'react-dropzone';
21
- import { alertAnatomy, checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy } from '@chakra-ui/anatomy';
21
+ import { alertAnatomy, checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy, tableAnatomy } from '@chakra-ui/anatomy';
22
22
  import { createMultiStyleConfigHelpers, cssVar, defineStyleConfig, defineStyle as defineStyle$1 } from '@chakra-ui/styled-system';
23
23
  import { transparentize, mode, calc, cssVar as cssVar$1 } from '@chakra-ui/theme-tools';
24
24
  import axios from 'axios';
@@ -406,7 +406,7 @@ const CheckboxComponent = /*#__PURE__*/forwardRef$1(({
406
406
  display: "block",
407
407
  textStyle: "text.sm",
408
408
  color: isDisabled ? 'black.medium' : 'black.high'
409
- }, children))), /*#__PURE__*/React__default.createElement(Box, {
409
+ }, children))), (isError || helpText) && /*#__PURE__*/React__default.createElement(Box, {
410
410
  mt: "5px",
411
411
  ml: "24px"
412
412
  }, isError ? /*#__PURE__*/React__default.createElement(Text, {
@@ -4460,6 +4460,186 @@ const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$4({
4460
4460
  }
4461
4461
  });
4462
4462
 
4463
+ const {
4464
+ defineMultiStyleConfig: defineMultiStyleConfig$5,
4465
+ definePartsStyle: definePartsStyle$6
4466
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(tableAnatomy.keys);
4467
+ const baseStyle$6 = /*#__PURE__*/definePartsStyle$6({
4468
+ table: {
4469
+ fontVariantNumeric: 'lining-nums tabular-nums',
4470
+ borderCollapse: 'collapse',
4471
+ width: 'full'
4472
+ },
4473
+ th: {
4474
+ fontFamily: 'heading',
4475
+ fontWeight: 'bold',
4476
+ textTransform: 'uppercase',
4477
+ letterSpacing: 'wider',
4478
+ textAlign: 'start',
4479
+ height: '50px'
4480
+ },
4481
+ td: {
4482
+ textAlign: 'start',
4483
+ height: '56px'
4484
+ },
4485
+ caption: {
4486
+ mt: 4,
4487
+ fontFamily: 'heading',
4488
+ textAlign: 'center',
4489
+ fontWeight: 'medium'
4490
+ }
4491
+ });
4492
+ const numericStyles = /*#__PURE__*/defineStyle$1({
4493
+ '&[data-is-numeric=true]': {
4494
+ textAlign: 'end'
4495
+ }
4496
+ });
4497
+ const variantSimple = /*#__PURE__*/definePartsStyle$6(props => {
4498
+ const {
4499
+ colorScheme: c
4500
+ } = props;
4501
+ return {
4502
+ th: {
4503
+ color: mode('gray.600', 'gray.400')(props),
4504
+ borderBottom: '1px',
4505
+ borderColor: mode(`${c}.100`, `${c}.700`)(props),
4506
+ ...numericStyles
4507
+ },
4508
+ td: {
4509
+ borderBottom: '1px',
4510
+ borderColor: mode(`${c}.100`, `${c}.700`)(props),
4511
+ ...numericStyles
4512
+ },
4513
+ caption: {
4514
+ color: mode('gray.600', 'gray.100')(props)
4515
+ },
4516
+ tfoot: {
4517
+ tr: {
4518
+ '&:last-of-type': {
4519
+ th: {
4520
+ borderBottomWidth: 0
4521
+ }
4522
+ }
4523
+ }
4524
+ }
4525
+ };
4526
+ });
4527
+ const variantStripe = /*#__PURE__*/definePartsStyle$6(props => {
4528
+ const {
4529
+ colorScheme: c
4530
+ } = props;
4531
+ return {
4532
+ th: {
4533
+ color: mode('gray.600', 'gray.400')(props),
4534
+ borderBottom: '1px',
4535
+ borderColor: mode(`${c}.100`, `${c}.700`)(props),
4536
+ ...numericStyles
4537
+ },
4538
+ td: {
4539
+ borderBottom: '1px',
4540
+ borderColor: mode(`${c}.100`, `${c}.700`)(props),
4541
+ ...numericStyles
4542
+ },
4543
+ caption: {
4544
+ color: mode('gray.600', 'gray.100')(props)
4545
+ },
4546
+ tbody: {
4547
+ tr: {
4548
+ '&:nth-of-type(odd)': {
4549
+ 'th, td': {
4550
+ borderBottomWidth: '1px',
4551
+ borderColor: mode(`${c}.100`, `${c}.700`)(props)
4552
+ },
4553
+ td: {
4554
+ background: mode(`${c}.100`, `${c}.700`)(props)
4555
+ }
4556
+ }
4557
+ }
4558
+ },
4559
+ tfoot: {
4560
+ tr: {
4561
+ '&:last-of-type': {
4562
+ th: {
4563
+ borderBottomWidth: 0
4564
+ }
4565
+ }
4566
+ }
4567
+ }
4568
+ };
4569
+ });
4570
+ const variants$4 = {
4571
+ simple: variantSimple,
4572
+ striped: variantStripe,
4573
+ unstyled: /*#__PURE__*/defineStyle$1({})
4574
+ };
4575
+ const sizes$3 = {
4576
+ sm: /*#__PURE__*/definePartsStyle$6({
4577
+ th: {
4578
+ px: '4',
4579
+ py: '1',
4580
+ lineHeight: '4',
4581
+ fontSize: 'xs'
4582
+ },
4583
+ td: {
4584
+ px: '4',
4585
+ py: '2',
4586
+ fontSize: 'sm',
4587
+ lineHeight: '4'
4588
+ },
4589
+ caption: {
4590
+ px: '4',
4591
+ py: '2',
4592
+ fontSize: 'xs'
4593
+ }
4594
+ }),
4595
+ md: /*#__PURE__*/definePartsStyle$6({
4596
+ th: {
4597
+ px: '2',
4598
+ py: '4',
4599
+ lineHeight: '4',
4600
+ fontSize: 'xs'
4601
+ },
4602
+ td: {
4603
+ px: '2',
4604
+ py: '4',
4605
+ lineHeight: '5'
4606
+ },
4607
+ caption: {
4608
+ px: '6',
4609
+ py: '2',
4610
+ fontSize: 'sm'
4611
+ }
4612
+ }),
4613
+ lg: /*#__PURE__*/definePartsStyle$6({
4614
+ th: {
4615
+ px: '8',
4616
+ py: '4',
4617
+ lineHeight: '5',
4618
+ fontSize: 'sm'
4619
+ },
4620
+ td: {
4621
+ px: '8',
4622
+ py: '5',
4623
+ lineHeight: '6'
4624
+ },
4625
+ caption: {
4626
+ px: '6',
4627
+ py: '2',
4628
+ fontSize: 'md'
4629
+ }
4630
+ })
4631
+ };
4632
+ const tableTheme = /*#__PURE__*/defineMultiStyleConfig$5({
4633
+ baseStyle: baseStyle$6,
4634
+ variants: variants$4,
4635
+ sizes: sizes$3,
4636
+ defaultProps: {
4637
+ variant: 'simple',
4638
+ size: 'md',
4639
+ colorScheme: 'gray'
4640
+ }
4641
+ });
4642
+
4463
4643
  const getProps = props => {
4464
4644
  const {
4465
4645
  isError,
@@ -4555,6 +4735,7 @@ var components = {
4555
4735
  Popover: Popover,
4556
4736
  Radio: Radio,
4557
4737
  Switch: Switch$1,
4738
+ Table: tableTheme,
4558
4739
  Textarea: Textarea
4559
4740
  };
4560
4741