@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.
- package/dist/config/theme/components/index.d.ts +1 -0
- package/dist/config/theme/components/table.d.ts +177 -0
- package/dist/internal-ui.cjs.development.js +193 -0
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +2 -2
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +194 -1
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +2 -2
@@ -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,177 @@
|
|
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
|
+
'&:first-of-type': {
|
54
|
+
pl: number;
|
55
|
+
};
|
56
|
+
'&:last-of-type': {
|
57
|
+
pr: number;
|
58
|
+
};
|
59
|
+
};
|
60
|
+
td: {
|
61
|
+
px: string;
|
62
|
+
py: string;
|
63
|
+
lineHeight: string;
|
64
|
+
'&:first-of-type': {
|
65
|
+
pl: number;
|
66
|
+
};
|
67
|
+
'&:last-of-type': {
|
68
|
+
pr: number;
|
69
|
+
};
|
70
|
+
};
|
71
|
+
caption: {
|
72
|
+
px: string;
|
73
|
+
py: string;
|
74
|
+
fontSize: string;
|
75
|
+
};
|
76
|
+
};
|
77
|
+
lg: {
|
78
|
+
th: {
|
79
|
+
px: string;
|
80
|
+
py: string;
|
81
|
+
lineHeight: string;
|
82
|
+
fontSize: string;
|
83
|
+
};
|
84
|
+
td: {
|
85
|
+
px: string;
|
86
|
+
py: string;
|
87
|
+
lineHeight: string;
|
88
|
+
};
|
89
|
+
caption: {
|
90
|
+
px: string;
|
91
|
+
py: string;
|
92
|
+
fontSize: string;
|
93
|
+
};
|
94
|
+
};
|
95
|
+
} | undefined;
|
96
|
+
variants?: {
|
97
|
+
simple: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
98
|
+
th: {
|
99
|
+
'&[data-is-numeric=true]': {
|
100
|
+
textAlign: string;
|
101
|
+
};
|
102
|
+
color: string;
|
103
|
+
borderBottom: string;
|
104
|
+
borderColor: string;
|
105
|
+
};
|
106
|
+
td: {
|
107
|
+
'&[data-is-numeric=true]': {
|
108
|
+
textAlign: string;
|
109
|
+
};
|
110
|
+
borderBottom: string;
|
111
|
+
borderColor: string;
|
112
|
+
};
|
113
|
+
caption: {
|
114
|
+
color: string;
|
115
|
+
};
|
116
|
+
tfoot: {
|
117
|
+
tr: {
|
118
|
+
'&:last-of-type': {
|
119
|
+
th: {
|
120
|
+
borderBottomWidth: number;
|
121
|
+
};
|
122
|
+
};
|
123
|
+
};
|
124
|
+
};
|
125
|
+
};
|
126
|
+
striped: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
127
|
+
th: {
|
128
|
+
'&[data-is-numeric=true]': {
|
129
|
+
textAlign: string;
|
130
|
+
};
|
131
|
+
color: string;
|
132
|
+
borderBottom: string;
|
133
|
+
borderColor: string;
|
134
|
+
};
|
135
|
+
td: {
|
136
|
+
'&[data-is-numeric=true]': {
|
137
|
+
textAlign: string;
|
138
|
+
};
|
139
|
+
borderBottom: string;
|
140
|
+
borderColor: string;
|
141
|
+
};
|
142
|
+
caption: {
|
143
|
+
color: string;
|
144
|
+
};
|
145
|
+
tbody: {
|
146
|
+
tr: {
|
147
|
+
'&:nth-of-type(odd)': {
|
148
|
+
'th, td': {
|
149
|
+
borderBottomWidth: string;
|
150
|
+
borderColor: string;
|
151
|
+
};
|
152
|
+
td: {
|
153
|
+
background: string;
|
154
|
+
};
|
155
|
+
};
|
156
|
+
};
|
157
|
+
};
|
158
|
+
tfoot: {
|
159
|
+
tr: {
|
160
|
+
'&:last-of-type': {
|
161
|
+
th: {
|
162
|
+
borderBottomWidth: number;
|
163
|
+
};
|
164
|
+
};
|
165
|
+
};
|
166
|
+
};
|
167
|
+
};
|
168
|
+
unstyled: {};
|
169
|
+
} | undefined;
|
170
|
+
defaultProps?: {
|
171
|
+
size?: "sm" | "md" | "lg" | undefined;
|
172
|
+
variant?: "simple" | "striped" | "unstyled" | undefined;
|
173
|
+
colorScheme?: string | undefined;
|
174
|
+
} | undefined;
|
175
|
+
parts: ("table" | "thead" | "tbody" | "tr" | "th" | "td" | "tfoot" | "caption")[];
|
176
|
+
};
|
177
|
+
export default tableTheme;
|
@@ -4466,6 +4466,198 @@ 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
|
+
'&:first-of-type': {
|
4608
|
+
pl: 6
|
4609
|
+
},
|
4610
|
+
'&:last-of-type': {
|
4611
|
+
pr: 6
|
4612
|
+
}
|
4613
|
+
},
|
4614
|
+
td: {
|
4615
|
+
px: '2',
|
4616
|
+
py: '4',
|
4617
|
+
lineHeight: '5',
|
4618
|
+
'&:first-of-type': {
|
4619
|
+
pl: 6
|
4620
|
+
},
|
4621
|
+
'&:last-of-type': {
|
4622
|
+
pr: 6
|
4623
|
+
}
|
4624
|
+
},
|
4625
|
+
caption: {
|
4626
|
+
px: '6',
|
4627
|
+
py: '2',
|
4628
|
+
fontSize: 'sm'
|
4629
|
+
}
|
4630
|
+
}),
|
4631
|
+
lg: /*#__PURE__*/definePartsStyle$6({
|
4632
|
+
th: {
|
4633
|
+
px: '8',
|
4634
|
+
py: '4',
|
4635
|
+
lineHeight: '5',
|
4636
|
+
fontSize: 'sm'
|
4637
|
+
},
|
4638
|
+
td: {
|
4639
|
+
px: '8',
|
4640
|
+
py: '5',
|
4641
|
+
lineHeight: '6'
|
4642
|
+
},
|
4643
|
+
caption: {
|
4644
|
+
px: '6',
|
4645
|
+
py: '2',
|
4646
|
+
fontSize: 'md'
|
4647
|
+
}
|
4648
|
+
})
|
4649
|
+
};
|
4650
|
+
const tableTheme = /*#__PURE__*/defineMultiStyleConfig$5({
|
4651
|
+
baseStyle: baseStyle$6,
|
4652
|
+
variants: variants$4,
|
4653
|
+
sizes: sizes$3,
|
4654
|
+
defaultProps: {
|
4655
|
+
variant: 'simple',
|
4656
|
+
size: 'md',
|
4657
|
+
colorScheme: 'gray'
|
4658
|
+
}
|
4659
|
+
});
|
4660
|
+
|
4469
4661
|
const getProps = props => {
|
4470
4662
|
const {
|
4471
4663
|
isError,
|
@@ -4561,6 +4753,7 @@ var components = {
|
|
4561
4753
|
Popover: Popover,
|
4562
4754
|
Radio: Radio,
|
4563
4755
|
Switch: Switch$1,
|
4756
|
+
Table: tableTheme,
|
4564
4757
|
Textarea: Textarea
|
4565
4758
|
};
|
4566
4759
|
|