@ctlyst.id/internal-ui 2.0.23 → 2.0.25

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';
@@ -4460,6 +4460,198 @@ 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
+ '&:first-of-type': {
4602
+ pl: 6
4603
+ },
4604
+ '&:last-of-type': {
4605
+ pr: 6
4606
+ }
4607
+ },
4608
+ td: {
4609
+ px: '2',
4610
+ py: '4',
4611
+ lineHeight: '5',
4612
+ '&:first-of-type': {
4613
+ pl: 6
4614
+ },
4615
+ '&:last-of-type': {
4616
+ pr: 6
4617
+ }
4618
+ },
4619
+ caption: {
4620
+ px: '6',
4621
+ py: '2',
4622
+ fontSize: 'sm'
4623
+ }
4624
+ }),
4625
+ lg: /*#__PURE__*/definePartsStyle$6({
4626
+ th: {
4627
+ px: '8',
4628
+ py: '4',
4629
+ lineHeight: '5',
4630
+ fontSize: 'sm'
4631
+ },
4632
+ td: {
4633
+ px: '8',
4634
+ py: '5',
4635
+ lineHeight: '6'
4636
+ },
4637
+ caption: {
4638
+ px: '6',
4639
+ py: '2',
4640
+ fontSize: 'md'
4641
+ }
4642
+ })
4643
+ };
4644
+ const tableTheme = /*#__PURE__*/defineMultiStyleConfig$5({
4645
+ baseStyle: baseStyle$6,
4646
+ variants: variants$4,
4647
+ sizes: sizes$3,
4648
+ defaultProps: {
4649
+ variant: 'simple',
4650
+ size: 'md',
4651
+ colorScheme: 'gray'
4652
+ }
4653
+ });
4654
+
4463
4655
  const getProps = props => {
4464
4656
  const {
4465
4657
  isError,
@@ -4555,6 +4747,7 @@ var components = {
4555
4747
  Popover: Popover,
4556
4748
  Radio: Radio,
4557
4749
  Switch: Switch$1,
4750
+ Table: tableTheme,
4558
4751
  Textarea: Textarea
4559
4752
  };
4560
4753