@ctlyst.id/internal-ui 2.0.23 → 2.0.24

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.
@@ -10,4 +10,5 @@ export { default as LoaderStyle } from './loader';
10
10
  export { default as Popover } from './popover';
11
11
  export { default as Radio } from './radio';
12
12
  export { default as Switch } from './switch';
13
+ export { default as Table } from './table';
13
14
  export { default as Textarea } from './textarea';
@@ -0,0 +1,165 @@
1
+ declare const tableTheme: {
2
+ baseStyle?: {
3
+ table: {
4
+ fontVariantNumeric: string;
5
+ borderCollapse: string;
6
+ width: string;
7
+ };
8
+ th: {
9
+ fontFamily: string;
10
+ fontWeight: string;
11
+ textTransform: string;
12
+ letterSpacing: string;
13
+ textAlign: string;
14
+ height: string;
15
+ };
16
+ td: {
17
+ textAlign: string;
18
+ height: string;
19
+ };
20
+ caption: {
21
+ mt: number;
22
+ fontFamily: string;
23
+ textAlign: string;
24
+ fontWeight: string;
25
+ };
26
+ } | undefined;
27
+ sizes?: {
28
+ sm: {
29
+ th: {
30
+ px: string;
31
+ py: string;
32
+ lineHeight: string;
33
+ fontSize: string;
34
+ };
35
+ td: {
36
+ px: string;
37
+ py: string;
38
+ fontSize: string;
39
+ lineHeight: string;
40
+ };
41
+ caption: {
42
+ px: string;
43
+ py: string;
44
+ fontSize: string;
45
+ };
46
+ };
47
+ md: {
48
+ th: {
49
+ px: string;
50
+ py: string;
51
+ lineHeight: string;
52
+ fontSize: string;
53
+ };
54
+ td: {
55
+ px: string;
56
+ py: string;
57
+ lineHeight: string;
58
+ };
59
+ caption: {
60
+ px: string;
61
+ py: string;
62
+ fontSize: string;
63
+ };
64
+ };
65
+ lg: {
66
+ th: {
67
+ px: string;
68
+ py: string;
69
+ lineHeight: string;
70
+ fontSize: string;
71
+ };
72
+ td: {
73
+ px: string;
74
+ py: string;
75
+ lineHeight: string;
76
+ };
77
+ caption: {
78
+ px: string;
79
+ py: string;
80
+ fontSize: string;
81
+ };
82
+ };
83
+ } | undefined;
84
+ variants?: {
85
+ simple: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
86
+ th: {
87
+ '&[data-is-numeric=true]': {
88
+ textAlign: string;
89
+ };
90
+ color: string;
91
+ borderBottom: string;
92
+ borderColor: string;
93
+ };
94
+ td: {
95
+ '&[data-is-numeric=true]': {
96
+ textAlign: string;
97
+ };
98
+ borderBottom: string;
99
+ borderColor: string;
100
+ };
101
+ caption: {
102
+ color: string;
103
+ };
104
+ tfoot: {
105
+ tr: {
106
+ '&:last-of-type': {
107
+ th: {
108
+ borderBottomWidth: number;
109
+ };
110
+ };
111
+ };
112
+ };
113
+ };
114
+ striped: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
115
+ th: {
116
+ '&[data-is-numeric=true]': {
117
+ textAlign: string;
118
+ };
119
+ color: string;
120
+ borderBottom: string;
121
+ borderColor: string;
122
+ };
123
+ td: {
124
+ '&[data-is-numeric=true]': {
125
+ textAlign: string;
126
+ };
127
+ borderBottom: string;
128
+ borderColor: string;
129
+ };
130
+ caption: {
131
+ color: string;
132
+ };
133
+ tbody: {
134
+ tr: {
135
+ '&:nth-of-type(odd)': {
136
+ 'th, td': {
137
+ borderBottomWidth: string;
138
+ borderColor: string;
139
+ };
140
+ td: {
141
+ background: string;
142
+ };
143
+ };
144
+ };
145
+ };
146
+ tfoot: {
147
+ tr: {
148
+ '&:last-of-type': {
149
+ th: {
150
+ borderBottomWidth: number;
151
+ };
152
+ };
153
+ };
154
+ };
155
+ };
156
+ unstyled: {};
157
+ } | undefined;
158
+ defaultProps?: {
159
+ size?: "sm" | "md" | "lg" | undefined;
160
+ variant?: "simple" | "striped" | "unstyled" | undefined;
161
+ colorScheme?: string | undefined;
162
+ } | undefined;
163
+ parts: ("table" | "thead" | "tbody" | "tr" | "th" | "td" | "tfoot" | "caption")[];
164
+ };
165
+ export default tableTheme;
@@ -4466,6 +4466,186 @@ const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$4({
4466
4466
  }
4467
4467
  });
4468
4468
 
4469
+ const {
4470
+ defineMultiStyleConfig: defineMultiStyleConfig$5,
4471
+ definePartsStyle: definePartsStyle$6
4472
+ } = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.tableAnatomy.keys);
4473
+ const baseStyle$6 = /*#__PURE__*/definePartsStyle$6({
4474
+ table: {
4475
+ fontVariantNumeric: 'lining-nums tabular-nums',
4476
+ borderCollapse: 'collapse',
4477
+ width: 'full'
4478
+ },
4479
+ th: {
4480
+ fontFamily: 'heading',
4481
+ fontWeight: 'bold',
4482
+ textTransform: 'uppercase',
4483
+ letterSpacing: 'wider',
4484
+ textAlign: 'start',
4485
+ height: '50px'
4486
+ },
4487
+ td: {
4488
+ textAlign: 'start',
4489
+ height: '56px'
4490
+ },
4491
+ caption: {
4492
+ mt: 4,
4493
+ fontFamily: 'heading',
4494
+ textAlign: 'center',
4495
+ fontWeight: 'medium'
4496
+ }
4497
+ });
4498
+ const numericStyles = /*#__PURE__*/styledSystem.defineStyle({
4499
+ '&[data-is-numeric=true]': {
4500
+ textAlign: 'end'
4501
+ }
4502
+ });
4503
+ const variantSimple = /*#__PURE__*/definePartsStyle$6(props => {
4504
+ const {
4505
+ colorScheme: c
4506
+ } = props;
4507
+ return {
4508
+ th: {
4509
+ color: themeTools.mode('gray.600', 'gray.400')(props),
4510
+ borderBottom: '1px',
4511
+ borderColor: themeTools.mode(`${c}.100`, `${c}.700`)(props),
4512
+ ...numericStyles
4513
+ },
4514
+ td: {
4515
+ borderBottom: '1px',
4516
+ borderColor: themeTools.mode(`${c}.100`, `${c}.700`)(props),
4517
+ ...numericStyles
4518
+ },
4519
+ caption: {
4520
+ color: themeTools.mode('gray.600', 'gray.100')(props)
4521
+ },
4522
+ tfoot: {
4523
+ tr: {
4524
+ '&:last-of-type': {
4525
+ th: {
4526
+ borderBottomWidth: 0
4527
+ }
4528
+ }
4529
+ }
4530
+ }
4531
+ };
4532
+ });
4533
+ const variantStripe = /*#__PURE__*/definePartsStyle$6(props => {
4534
+ const {
4535
+ colorScheme: c
4536
+ } = props;
4537
+ return {
4538
+ th: {
4539
+ color: themeTools.mode('gray.600', 'gray.400')(props),
4540
+ borderBottom: '1px',
4541
+ borderColor: themeTools.mode(`${c}.100`, `${c}.700`)(props),
4542
+ ...numericStyles
4543
+ },
4544
+ td: {
4545
+ borderBottom: '1px',
4546
+ borderColor: themeTools.mode(`${c}.100`, `${c}.700`)(props),
4547
+ ...numericStyles
4548
+ },
4549
+ caption: {
4550
+ color: themeTools.mode('gray.600', 'gray.100')(props)
4551
+ },
4552
+ tbody: {
4553
+ tr: {
4554
+ '&:nth-of-type(odd)': {
4555
+ 'th, td': {
4556
+ borderBottomWidth: '1px',
4557
+ borderColor: themeTools.mode(`${c}.100`, `${c}.700`)(props)
4558
+ },
4559
+ td: {
4560
+ background: themeTools.mode(`${c}.100`, `${c}.700`)(props)
4561
+ }
4562
+ }
4563
+ }
4564
+ },
4565
+ tfoot: {
4566
+ tr: {
4567
+ '&:last-of-type': {
4568
+ th: {
4569
+ borderBottomWidth: 0
4570
+ }
4571
+ }
4572
+ }
4573
+ }
4574
+ };
4575
+ });
4576
+ const variants$4 = {
4577
+ simple: variantSimple,
4578
+ striped: variantStripe,
4579
+ unstyled: /*#__PURE__*/styledSystem.defineStyle({})
4580
+ };
4581
+ const sizes$3 = {
4582
+ sm: /*#__PURE__*/definePartsStyle$6({
4583
+ th: {
4584
+ px: '4',
4585
+ py: '1',
4586
+ lineHeight: '4',
4587
+ fontSize: 'xs'
4588
+ },
4589
+ td: {
4590
+ px: '4',
4591
+ py: '2',
4592
+ fontSize: 'sm',
4593
+ lineHeight: '4'
4594
+ },
4595
+ caption: {
4596
+ px: '4',
4597
+ py: '2',
4598
+ fontSize: 'xs'
4599
+ }
4600
+ }),
4601
+ md: /*#__PURE__*/definePartsStyle$6({
4602
+ th: {
4603
+ px: '2',
4604
+ py: '4',
4605
+ lineHeight: '4',
4606
+ fontSize: 'xs'
4607
+ },
4608
+ td: {
4609
+ px: '2',
4610
+ py: '4',
4611
+ lineHeight: '5'
4612
+ },
4613
+ caption: {
4614
+ px: '6',
4615
+ py: '2',
4616
+ fontSize: 'sm'
4617
+ }
4618
+ }),
4619
+ lg: /*#__PURE__*/definePartsStyle$6({
4620
+ th: {
4621
+ px: '8',
4622
+ py: '4',
4623
+ lineHeight: '5',
4624
+ fontSize: 'sm'
4625
+ },
4626
+ td: {
4627
+ px: '8',
4628
+ py: '5',
4629
+ lineHeight: '6'
4630
+ },
4631
+ caption: {
4632
+ px: '6',
4633
+ py: '2',
4634
+ fontSize: 'md'
4635
+ }
4636
+ })
4637
+ };
4638
+ const tableTheme = /*#__PURE__*/defineMultiStyleConfig$5({
4639
+ baseStyle: baseStyle$6,
4640
+ variants: variants$4,
4641
+ sizes: sizes$3,
4642
+ defaultProps: {
4643
+ variant: 'simple',
4644
+ size: 'md',
4645
+ colorScheme: 'gray'
4646
+ }
4647
+ });
4648
+
4469
4649
  const getProps = props => {
4470
4650
  const {
4471
4651
  isError,
@@ -4561,6 +4741,7 @@ var components = {
4561
4741
  Popover: Popover,
4562
4742
  Radio: Radio,
4563
4743
  Switch: Switch$1,
4744
+ Table: tableTheme,
4564
4745
  Textarea: Textarea
4565
4746
  };
4566
4747