paris 0.8.21 → 0.9.0
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.
- package/CHANGELOG.md +36 -0
- package/package.json +2 -2
- package/src/helpers/useIsMounted.ts +17 -0
- package/src/helpers/useResizeObserver.ts +97 -0
- package/src/stories/accordion/Accordion.module.scss +4 -4
- package/src/stories/avatar/Avatar.module.scss +1 -1
- package/src/stories/avatar/Avatar.tsx +1 -1
- package/src/stories/button/Button.module.scss +46 -24
- package/src/stories/button/Button.stories.ts +24 -0
- package/src/stories/button/Button.tsx +95 -70
- package/src/stories/callout/Callout.module.scss +7 -7
- package/src/stories/callout/Callout.stories.ts +8 -0
- package/src/stories/callout/Callout.tsx +4 -3
- package/src/stories/card/Card.module.scss +3 -3
- package/src/stories/card/Card.stories.ts +0 -5
- package/src/stories/checkbox/Checkbox.module.scss +19 -6
- package/src/stories/checkbox/Checkbox.tsx +2 -1
- package/src/stories/combobox/Combobox.stories.ts +8 -8
- package/src/stories/combobox/Combobox.tsx +11 -4
- package/src/stories/dialog/Dialog.module.scss +43 -19
- package/src/stories/dialog/Dialog.stories.tsx +40 -0
- package/src/stories/dialog/Dialog.tsx +28 -17
- package/src/stories/drawer/Drawer.module.scss +141 -46
- package/src/stories/drawer/Drawer.stories.tsx +151 -0
- package/src/stories/drawer/Drawer.tsx +100 -103
- package/src/stories/field/Field.stories.ts +1 -1
- package/src/stories/field/Field.tsx +0 -1
- package/src/stories/icon/ArrowRight.tsx +11 -0
- package/src/stories/icon/Check.tsx +11 -0
- package/src/stories/icon/Icon.stories.ts +5 -1
- package/src/stories/icon/index.ts +3 -0
- package/src/stories/input/Input.module.scss +43 -31
- package/src/stories/input/Input.stories.ts +7 -7
- package/src/stories/input/Input.tsx +14 -5
- package/src/stories/menu/Menu.module.scss +6 -6
- package/src/stories/menu/Menu.stories.tsx +24 -28
- package/src/stories/popover/Popover.module.scss +3 -3
- package/src/stories/select/Select.module.scss +38 -16
- package/src/stories/select/Select.stories.ts +24 -12
- package/src/stories/select/Select.tsx +17 -3
- package/src/stories/styledlink/StyledLink.module.scss +2 -2
- package/src/stories/table/Table.module.scss +6 -5
- package/src/stories/table/Table.stories.ts +9 -9
- package/src/stories/table/Table.tsx +7 -1
- package/src/stories/tabs/Tabs.module.scss +168 -27
- package/src/stories/tabs/Tabs.stories.tsx +125 -0
- package/src/stories/tabs/Tabs.tsx +69 -37
- package/src/stories/tag/Tag.module.scss +160 -21
- package/src/stories/tag/Tag.stories.ts +22 -1
- package/src/stories/tag/Tag.tsx +63 -16
- package/src/stories/textarea/TextArea.stories.ts +2 -2
- package/src/stories/textarea/TextArea.tsx +12 -5
- package/src/stories/theme/themes.ts +907 -13
- package/src/stories/theme/tokens.ts +77 -0
- package/src/stories/theme/tw-preflight.css +3 -3
- package/src/stories/tilt/Tilt.stories.tsx +4 -4
- package/src/stories/toast/Toast.module.scss +4 -4
- package/src/stories/tabs/Tabs.stories.ts +0 -39
|
@@ -100,11 +100,16 @@ export const Input: FC<InputProps & ComponentPropsWithoutRef<'input'>> = forward
|
|
|
100
100
|
>
|
|
101
101
|
<div
|
|
102
102
|
className={styles.inputContainer}
|
|
103
|
-
data-status={status}
|
|
104
|
-
data-disabled={disabled}
|
|
103
|
+
// data-status={status}
|
|
104
|
+
// data-disabled={disabled}
|
|
105
|
+
data-status={disabled ? 'disabled' : (status || 'default')}
|
|
105
106
|
>
|
|
106
107
|
{!!startEnhancer && (
|
|
107
|
-
<div
|
|
108
|
+
<div
|
|
109
|
+
{...overrides?.startEnhancerContainer}
|
|
110
|
+
className={clsx(styles.enhancer, overrides?.startEnhancerContainer?.className)}
|
|
111
|
+
data-status={disabled ? 'disabled' : (status || 'default')}
|
|
112
|
+
>
|
|
108
113
|
{!!startEnhancer && (
|
|
109
114
|
<MemoizedEnhancer
|
|
110
115
|
enhancer={startEnhancer}
|
|
@@ -121,7 +126,7 @@ export const Input: FC<InputProps & ComponentPropsWithoutRef<'input'>> = forward
|
|
|
121
126
|
aria-label={typeof label === 'string' ? label : props['aria-label']}
|
|
122
127
|
aria-describedby={`${inputID}-description`}
|
|
123
128
|
aria-disabled={disabled}
|
|
124
|
-
data-status={status}
|
|
129
|
+
data-status={disabled ? 'disabled' : (status || 'default')}
|
|
125
130
|
readOnly={disabled}
|
|
126
131
|
className={clsx(
|
|
127
132
|
props.className,
|
|
@@ -129,7 +134,11 @@ export const Input: FC<InputProps & ComponentPropsWithoutRef<'input'>> = forward
|
|
|
129
134
|
)}
|
|
130
135
|
/>
|
|
131
136
|
{!!endEnhancer && (
|
|
132
|
-
<div
|
|
137
|
+
<div
|
|
138
|
+
{...overrides?.endEnhancerContainer}
|
|
139
|
+
className={clsx(styles.enhancer, overrides?.endEnhancerContainer?.className)}
|
|
140
|
+
data-status={disabled ? 'disabled' : (status || 'default')}
|
|
141
|
+
>
|
|
133
142
|
{!!endEnhancer && (
|
|
134
143
|
<MemoizedEnhancer
|
|
135
144
|
enhancer={endEnhancer}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
margin-top: 6px;
|
|
10
10
|
|
|
11
11
|
border-radius: 8px;
|
|
12
|
-
background: var(--pte-colors-
|
|
13
|
-
box-shadow: var(--pte-
|
|
14
|
-
border: var(--pte-borders-dropdown-border);
|
|
12
|
+
background: var(--pte-new-colors-surfacePrimary);
|
|
13
|
+
box-shadow: var(--pte-new-lighting-deepBelow);
|
|
14
|
+
border: var(--pte-new-borders-dropdown-border);
|
|
15
15
|
|
|
16
16
|
display: flex;
|
|
17
17
|
width: 200px;
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
align-items: center;
|
|
41
41
|
justify-content: space-between;
|
|
42
42
|
|
|
43
|
-
color: var(--pte-colors-
|
|
43
|
+
color: var(--pte-new-colors-contentPrimary);
|
|
44
44
|
|
|
45
|
-
border-bottom: 0.5px solid var(--pte-colors-
|
|
45
|
+
border-bottom: 0.5px solid var(--pte-new-colors-borderMedium);
|
|
46
46
|
|
|
47
47
|
&:last-child {
|
|
48
48
|
border-bottom: none;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&:hover {
|
|
52
|
-
background-color: var(--pte-colors-
|
|
52
|
+
background-color: var(--pte-new-colors-overlayMedium);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
@keyframes gradientFlow {
|
|
@@ -19,33 +19,29 @@ export const Default: Story = {
|
|
|
19
19
|
children: 'Hello world! This is a new Menu component.',
|
|
20
20
|
},
|
|
21
21
|
render: (args) => (
|
|
22
|
-
<
|
|
23
|
-
<Menu
|
|
24
|
-
<Button
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<Menu.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
22
|
+
<div style={{ height: '150px' }}>
|
|
23
|
+
<Menu as="div">
|
|
24
|
+
<Menu.Button>
|
|
25
|
+
<Button
|
|
26
|
+
kind="tertiary"
|
|
27
|
+
shape="circle"
|
|
28
|
+
startEnhancer={(
|
|
29
|
+
<Ellipsis size={20} />
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
Action menu
|
|
33
|
+
</Button>
|
|
34
|
+
</Menu.Button>
|
|
35
|
+
<Menu.Items>
|
|
36
|
+
<Menu.Item as="button">
|
|
37
|
+
Dispute
|
|
38
|
+
</Menu.Item>
|
|
39
|
+
<Menu.Item as="button">
|
|
40
|
+
Transfer
|
|
41
|
+
<ChevronRight size={20} />
|
|
42
|
+
</Menu.Item>
|
|
43
|
+
</Menu.Items>
|
|
44
|
+
</Menu>
|
|
45
|
+
</div>
|
|
44
46
|
),
|
|
45
47
|
};
|
|
46
|
-
|
|
47
|
-
export const Secondary: Story = {
|
|
48
|
-
args: {
|
|
49
|
-
children: 'Hello world! This is a secondary component.',
|
|
50
|
-
},
|
|
51
|
-
};
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.content {
|
|
16
|
-
background-color: var(--pte-colors-
|
|
16
|
+
background-color: var(--pte-new-colors-surfacePrimary);
|
|
17
17
|
animation: var(--pte-animations-duration-normal) var(--pte-animations-timing-easeInOutExpo) 0s 1 intro;
|
|
18
18
|
width: fit-content;
|
|
19
19
|
border-radius: var(--pte-borders-radius-rounded);
|
|
20
|
-
box-shadow: var(--pte-lighting-shallowPopup);
|
|
21
|
-
border: var(--pte-borders-dropdown-border);
|
|
20
|
+
box-shadow: var(--pte-new-lighting-shallowPopup);
|
|
21
|
+
border: var(--pte-new-borders-dropdown-border);
|
|
22
22
|
}
|
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.listboxButton {
|
|
11
|
+
&[aria-expanded = true] {
|
|
12
|
+
.chevron {
|
|
13
|
+
color: var(--pte-new-colors-contentPrimary);
|
|
14
|
+
}
|
|
15
|
+
border-color: var(--pte-new-colors-inputBorderFocus);
|
|
16
|
+
background-color: var(--pte-new-colors-inputFillFocus);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
10
20
|
.field {
|
|
11
21
|
display: flex;
|
|
12
22
|
flex-direction: row;
|
|
@@ -33,11 +43,11 @@
|
|
|
33
43
|
display: flex;
|
|
34
44
|
flex-direction: column;
|
|
35
45
|
|
|
36
|
-
background-color: var(--pte-colors-
|
|
46
|
+
background-color: var(--pte-new-colors-surfacePrimary);
|
|
37
47
|
|
|
38
|
-
border: var(--pte-borders-dropdown-border);
|
|
48
|
+
border: var(--pte-new-borders-dropdown-border);
|
|
39
49
|
border-radius: var(--pte-borders-radius-rectangle);
|
|
40
|
-
box-shadow: var(--pte-
|
|
50
|
+
box-shadow: var(--pte-new-lighting-deepBelow);
|
|
41
51
|
|
|
42
52
|
transition: var(--pte-animations-interaction);
|
|
43
53
|
|
|
@@ -49,12 +59,12 @@
|
|
|
49
59
|
.option {
|
|
50
60
|
display: flex;
|
|
51
61
|
flex-direction: row;
|
|
52
|
-
justify-content:
|
|
62
|
+
justify-content: space-between;
|
|
53
63
|
align-items: center;
|
|
54
64
|
gap: 8px;
|
|
55
65
|
|
|
56
|
-
padding:
|
|
57
|
-
margin: -1px;
|
|
66
|
+
padding: 6.5px 14px;
|
|
67
|
+
//margin: -1px;
|
|
58
68
|
|
|
59
69
|
// border: 1px solid var(--pte-borders-dropdown-color);
|
|
60
70
|
//border-right: 1px solid var(--pte-borders-dropdown-color);
|
|
@@ -62,19 +72,19 @@
|
|
|
62
72
|
transition: var(--pte-animations-interaction);
|
|
63
73
|
|
|
64
74
|
&:hover, &[data-headlessui-state="active"] {
|
|
65
|
-
background-color: var(--pte-colors-
|
|
75
|
+
background-color: var(--pte-new-colors-overlayMedium);
|
|
66
76
|
}
|
|
67
77
|
|
|
68
78
|
&[data-selected=true] {
|
|
69
|
-
background-color: var(--pte-colors-
|
|
79
|
+
background-color: var(--pte-new-colors-overlaySubtle);
|
|
70
80
|
}
|
|
71
81
|
|
|
72
|
-
&[data-disabled
|
|
82
|
+
&[data-status="disabled"], &[data-headlessui-state~="disabled"] {
|
|
73
83
|
pointer-events: none;
|
|
74
84
|
cursor: default;
|
|
75
85
|
|
|
76
86
|
&, & * {
|
|
77
|
-
color: var(--pte-colors-contentDisabled);
|
|
87
|
+
color: var(--pte-new-colors-contentDisabled);
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
90
|
}
|
|
@@ -100,26 +110,38 @@
|
|
|
100
110
|
|
|
101
111
|
&[data-headlessui-state~="active"] {
|
|
102
112
|
.radioCircle {
|
|
103
|
-
border-color: var(--pte-colors-contentPrimary);
|
|
113
|
+
border-color: var(--pte-new-colors-contentPrimary);
|
|
104
114
|
}
|
|
105
115
|
}
|
|
106
116
|
|
|
107
117
|
&[data-headlessui-state~="checked"] {
|
|
108
118
|
.radioCircle {
|
|
109
|
-
border: 5px solid var(--pte-colors-contentPrimary);
|
|
119
|
+
border: 5px solid var(--pte-new-colors-contentPrimary);
|
|
110
120
|
}
|
|
111
121
|
}
|
|
112
122
|
|
|
113
|
-
&[data-headlessui-state~="disabled"] {
|
|
123
|
+
&[data-status="disabled"], &[data-headlessui-state~="disabled"] {
|
|
114
124
|
pointer-events: none;
|
|
115
125
|
cursor: default;
|
|
116
126
|
|
|
117
127
|
&, & * {
|
|
118
|
-
color: var(--pte-colors-contentDisabled);
|
|
128
|
+
color: var(--pte-new-colors-contentDisabled);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.radioCircle {
|
|
132
|
+
border-color: var(--pte-new-colors-contentDisabled);
|
|
119
133
|
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&[data-status="error"] {
|
|
137
|
+
.radioCircle {
|
|
138
|
+
border-color: var(--pte-new-colors-contentNegative);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
120
141
|
|
|
142
|
+
&[data-status="success"] {
|
|
121
143
|
.radioCircle {
|
|
122
|
-
border-color: var(--pte-colors-
|
|
144
|
+
border-color: var(--pte-new-colors-contentPositive);
|
|
123
145
|
}
|
|
124
146
|
}
|
|
125
147
|
}
|
|
@@ -130,6 +152,6 @@
|
|
|
130
152
|
width: 14px;
|
|
131
153
|
height: 14px;
|
|
132
154
|
border-radius: 100%;
|
|
133
|
-
border: 1.5px solid var(--pte-colors-contentTertiary);
|
|
155
|
+
border: 1.5px solid var(--pte-new-colors-contentTertiary);
|
|
134
156
|
transition: all var(--pte-animations-interaction);
|
|
135
157
|
}
|
|
@@ -32,18 +32,15 @@ export const Default: Story = {
|
|
|
32
32
|
{ id: '1', node: 'Single' },
|
|
33
33
|
{ id: '2', node: 'EP' },
|
|
34
34
|
{ id: '3', node: 'Album (LP)' },
|
|
35
|
-
{ id: '
|
|
36
|
-
{ id: '
|
|
37
|
-
{ id: '
|
|
38
|
-
{ id: '
|
|
39
|
-
{ id: '
|
|
40
|
-
{ id: '
|
|
41
|
-
{ id: '
|
|
42
|
-
{ id: '
|
|
43
|
-
{ id: '
|
|
44
|
-
{ id: '3', node: 'Album (LP)' },
|
|
45
|
-
{ id: '3', node: 'Album (LP)' },
|
|
46
|
-
{ id: '3', node: 'Album (LP)' },
|
|
35
|
+
{ id: '4', node: 'Compilation' },
|
|
36
|
+
{ id: '5', node: 'Mixtape' },
|
|
37
|
+
{ id: '6', node: 'Live album' },
|
|
38
|
+
{ id: '7', node: 'Remix album' },
|
|
39
|
+
{ id: '8', node: 'Soundtrack' },
|
|
40
|
+
{ id: '9', node: 'Demo' },
|
|
41
|
+
{ id: '10', node: 'Reissue' },
|
|
42
|
+
{ id: '11', node: 'Promo' },
|
|
43
|
+
{ id: '12', node: 'Other' },
|
|
47
44
|
],
|
|
48
45
|
},
|
|
49
46
|
render,
|
|
@@ -83,3 +80,18 @@ export const WithCustomNodes: Story = {
|
|
|
83
80
|
},
|
|
84
81
|
render,
|
|
85
82
|
};
|
|
83
|
+
|
|
84
|
+
export const Radio: Story = {
|
|
85
|
+
args: {
|
|
86
|
+
label: 'Release type',
|
|
87
|
+
description: 'Select the type of release you want to create.',
|
|
88
|
+
kind: 'radio',
|
|
89
|
+
options: [
|
|
90
|
+
{ id: '1', node: 'Single' },
|
|
91
|
+
{ id: '2', node: 'EP' },
|
|
92
|
+
{ id: '3', node: 'Album (LP)' },
|
|
93
|
+
{ id: '4', node: 'Compilation' },
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
render,
|
|
97
|
+
};
|
|
@@ -20,6 +20,7 @@ import { MemoizedEnhancer } from '../../helpers/renderEnhancer';
|
|
|
20
20
|
import { pget, theme } from '../theme';
|
|
21
21
|
import { Field } from '../field';
|
|
22
22
|
import { TextWhenString } from '../utility';
|
|
23
|
+
import { Check, Icon } from '../icon';
|
|
23
24
|
|
|
24
25
|
export type Option<T = Record<string, any>> = {
|
|
25
26
|
id: string,
|
|
@@ -131,11 +132,16 @@ export const Select = forwardRef(function <T = Record<string, any>>({
|
|
|
131
132
|
className={clsx(
|
|
132
133
|
overrides?.selectInput?.className,
|
|
133
134
|
inputStyles.inputContainer,
|
|
135
|
+
styles.listboxButton,
|
|
134
136
|
styles.field,
|
|
135
137
|
)}
|
|
136
138
|
>
|
|
137
139
|
{!!startEnhancer && (
|
|
138
|
-
<div
|
|
140
|
+
<div
|
|
141
|
+
{...overrides?.startEnhancerContainer}
|
|
142
|
+
className={clsx(inputStyles.enhancer, overrides?.startEnhancerContainer?.className)}
|
|
143
|
+
data-status={disabled ? 'disabled' : (status || 'default')}
|
|
144
|
+
>
|
|
139
145
|
{!!startEnhancer && (
|
|
140
146
|
<MemoizedEnhancer
|
|
141
147
|
enhancer={startEnhancer}
|
|
@@ -146,7 +152,11 @@ export const Select = forwardRef(function <T = Record<string, any>>({
|
|
|
146
152
|
)}
|
|
147
153
|
{options?.find((o) => o.id === value)?.node || placeholder || 'Select an option'}
|
|
148
154
|
{endEnhancer ? (
|
|
149
|
-
<div
|
|
155
|
+
<div
|
|
156
|
+
{...overrides?.endEnhancerContainer}
|
|
157
|
+
className={clsx(inputStyles.enhancer, overrides?.endEnhancerContainer?.className)}
|
|
158
|
+
data-status={disabled ? 'disabled' : (status || 'default')}
|
|
159
|
+
>
|
|
150
160
|
{!!endEnhancer && (
|
|
151
161
|
<MemoizedEnhancer
|
|
152
162
|
enhancer={endEnhancer}
|
|
@@ -155,7 +165,7 @@ export const Select = forwardRef(function <T = Record<string, any>>({
|
|
|
155
165
|
)}
|
|
156
166
|
</div>
|
|
157
167
|
) : (
|
|
158
|
-
<FontAwesomeIcon className={inputStyles.enhancer} width="10px" icon={faChevronDown} />
|
|
168
|
+
<FontAwesomeIcon className={clsx(inputStyles.enhancer, styles.chevron)} data-status={disabled ? 'disabled' : (status || 'default')} width="10px" icon={faChevronDown} />
|
|
159
169
|
)}
|
|
160
170
|
</Listbox.Button>
|
|
161
171
|
<Transition
|
|
@@ -193,6 +203,9 @@ export const Select = forwardRef(function <T = Record<string, any>>({
|
|
|
193
203
|
{option.node}
|
|
194
204
|
</Text>
|
|
195
205
|
) : option.node}
|
|
206
|
+
{option.id === value && (
|
|
207
|
+
<Icon icon={Check} size={12} />
|
|
208
|
+
)}
|
|
196
209
|
</Listbox.Option>
|
|
197
210
|
))}
|
|
198
211
|
</Listbox.Options>
|
|
@@ -210,6 +223,7 @@ export const Select = forwardRef(function <T = Record<string, any>>({
|
|
|
210
223
|
key={option.id}
|
|
211
224
|
value={option.id}
|
|
212
225
|
disabled={option.disabled || false}
|
|
226
|
+
data-status={disabled ? 'disabled' : (status || 'default')}
|
|
213
227
|
>
|
|
214
228
|
<div className={styles.radioCircle} />
|
|
215
229
|
<TextWhenString kind="paragraphXSmall">
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
.link {
|
|
2
2
|
text-decoration: none;
|
|
3
|
-
border-bottom: 1px solid var(--pte-colors-
|
|
3
|
+
border-bottom: 1px solid var(--pte-new-colors-borderMedium);
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
font-weight: var(--pte-typography-fontWeights-medium);
|
|
6
6
|
transition: border-bottom-color var(--pte-animations-interaction);
|
|
7
7
|
|
|
8
8
|
&:hover {
|
|
9
|
-
border-bottom: 1px solid var(--pte-colors-contentPrimary);
|
|
9
|
+
border-bottom: 1px solid var(--pte-new-colors-contentPrimary);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
th {
|
|
14
|
-
color: var(--pte-colors-contentSecondary);
|
|
14
|
+
color: var(--pte-new-colors-contentSecondary);
|
|
15
15
|
padding: 10px 12px;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
tr {
|
|
23
|
-
border-
|
|
23
|
+
border-bottom: 1px solid var(--pte-new-colors-borderSubtle);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
border-
|
|
26
|
+
.tableHeader {
|
|
27
|
+
border-top: 1px solid var(--pte-new-colors-borderMedium);
|
|
28
|
+
border-bottom: 1px solid var(--pte-new-colors-borderMedium);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
tr.empty {
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
transition: background-color var(--pte-animations-interaction);
|
|
40
41
|
|
|
41
42
|
&:hover {
|
|
42
|
-
background-color: var(--pte-colors-
|
|
43
|
+
background-color: var(--pte-new-colors-overlayMedium);
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
&, & * {
|
|
@@ -19,7 +19,7 @@ export const Default: Story = {
|
|
|
19
19
|
title: 'Name',
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
title: '
|
|
22
|
+
title: 'Role',
|
|
23
23
|
hideBelow: 'sm',
|
|
24
24
|
},
|
|
25
25
|
{
|
|
@@ -29,21 +29,21 @@ export const Default: Story = {
|
|
|
29
29
|
rows: [
|
|
30
30
|
{
|
|
31
31
|
id: 1,
|
|
32
|
-
name: '
|
|
33
|
-
type: '
|
|
34
|
-
email: '
|
|
32
|
+
name: 'Mia Dolan',
|
|
33
|
+
type: 'Actress',
|
|
34
|
+
email: 'mia@slingshot.fm',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
id: 2,
|
|
38
|
-
name: '
|
|
38
|
+
name: 'Sebastian Wilder',
|
|
39
39
|
type: 'Artist',
|
|
40
|
-
email: '
|
|
40
|
+
email: 'seb@slingshot.fm',
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: 3,
|
|
44
|
-
name: '
|
|
45
|
-
type: '
|
|
46
|
-
email: '
|
|
44
|
+
name: 'Amy Brandt',
|
|
45
|
+
type: 'Casting',
|
|
46
|
+
email: 'amy@slingshot.fm',
|
|
47
47
|
},
|
|
48
48
|
],
|
|
49
49
|
rowRenderFn: (row) => ({
|
|
@@ -151,7 +151,13 @@ export function Table<RowData extends Record<string, any>[]>({
|
|
|
151
151
|
}}
|
|
152
152
|
>
|
|
153
153
|
<thead {...overrides?.thead}>
|
|
154
|
-
<tr
|
|
154
|
+
<tr
|
|
155
|
+
{...overrides?.trHead}
|
|
156
|
+
className={clsx(
|
|
157
|
+
styles.tableHeader,
|
|
158
|
+
overrides?.trHead?.className,
|
|
159
|
+
)}
|
|
160
|
+
>
|
|
155
161
|
{columns.map((column) => (
|
|
156
162
|
<th
|
|
157
163
|
{...{
|