@ncino/styles 9.0.0-preview.7 → 9.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/styles",
3
3
  "author": "nCino",
4
- "version": "9.0.0-preview.7",
4
+ "version": "9.0.0",
5
5
  "description": "nCino Shared Web Component Styling",
6
6
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
7
7
  "publishConfig": {
@@ -0,0 +1,200 @@
1
+ import { gatorTypography } from '../utils/themeConfig';
2
+
3
+ export const MUIGatorTableOverrides = {
4
+ MuiPaper: {
5
+ styleOverrides: {
6
+ root: {
7
+ borderRadius: 'var(--border-radius-medium)',
8
+ boxShadow: 'none',
9
+
10
+ // Bulk action toolbar styling when used with Table
11
+ '&:has(.MuiToolbar-root + .MuiTableContainer-root)': {
12
+
13
+ '.MuiToolbar-root': {
14
+ background: 'var(--color-surface-brand)',
15
+ marginBottom: 'var(--spacing-8)',
16
+ borderRadius: 'var(--border-radius-medium)',
17
+ display: 'flex',
18
+ gap: 'var(--spacing-8)',
19
+ },
20
+ },
21
+ },
22
+ },
23
+ },
24
+ MuiTableContainer: {
25
+ styleOverrides: {
26
+ root: {
27
+ backgroundColor: 'var(--color-surface-primary)',
28
+ borderRadius: 'var(--border-radius-medium)',
29
+ overflow: 'auto',
30
+ boxShadow: 'var(--shadow-1-card)',
31
+ },
32
+ },
33
+ },
34
+
35
+ MuiTable: {
36
+ styleOverrides: {
37
+ root: {
38
+ borderCollapse: 'separate',
39
+ borderSpacing: 0,
40
+ width: '100%',
41
+ },
42
+ },
43
+ },
44
+
45
+ MuiTableHead: {
46
+ styleOverrides: {
47
+ root: {
48
+ '& .MuiTableCell-head': {
49
+ backgroundColor: 'var(--color-surface-brand)',
50
+ color: 'var(--color-text-primary)',
51
+ fontWeight: gatorTypography.fontWeight.bold,
52
+ borderBottom: '1px solid var(--color-border-tertiary)',
53
+ '&:hover': {
54
+ backgroundColor: 'var(--color-surface-brand-secondary)',
55
+ },
56
+ },
57
+ },
58
+ },
59
+ },
60
+
61
+ MuiTableBody: {
62
+ styleOverrides: {
63
+ root: {
64
+ '& .MuiTableRow-root': {
65
+ backgroundColor: 'var(--color-surface-primary)',
66
+ transition: 'background-color 0.2s ease',
67
+
68
+ '&:hover': {
69
+ backgroundColor: 'var(--color-surface-hover)',
70
+ },
71
+
72
+ '&.Mui-selected': {
73
+ backgroundColor: 'var(--color-surface-brand)',
74
+
75
+ '&:hover': {
76
+ backgroundColor: 'var(--color-surface-hover)',
77
+ },
78
+ },
79
+
80
+ // Remove border from last row
81
+ '&:last-child .MuiTableCell-root': {
82
+ borderBottom: 'none',
83
+ },
84
+ },
85
+ },
86
+ },
87
+ },
88
+
89
+ MuiTableRow: {
90
+ styleOverrides: {
91
+ root: {
92
+ '&:not(:has(.MuiCheckbox-root)) .MuiTableCell-root': {
93
+ padding: 'var(--spacing-7)',
94
+ '&:first-of-type': {
95
+ paddingLeft: 24,
96
+ },
97
+ },
98
+ '&.Mui-selected': {
99
+ backgroundColor: 'var(--color-surface-brand)',
100
+ },
101
+ },
102
+ },
103
+ },
104
+
105
+ MuiTableCell: {
106
+ styleOverrides: {
107
+ root: {
108
+ fontFamily: gatorTypography.fontFamily.body,
109
+ fontSize: 'var(--font-size-body-2)',
110
+ color: 'var(--color-text-primary)',
111
+ borderBottom: '1px solid var(--color-border-tertiary)',
112
+ letterSpacing: 'var(--letter-spacing-default)',
113
+ '&:first-of-type': {
114
+ paddingLeft: 24,
115
+ },
116
+ },
117
+
118
+ head: {
119
+ fontWeight: gatorTypography.fontWeight.semiBold,
120
+ fontSize: 'var(--font-size-body-2)',
121
+ color: 'var(--color-text-primary)',
122
+ backgroundColor: 'var(--color-surface-secondary)',
123
+ borderBottom: '1px solid var(--color-border-tertiary)',
124
+ letterSpacing: 'var(--letter-spacing-default)',
125
+ '&:first-of-type': {
126
+ paddingLeft: 24,
127
+ },
128
+ },
129
+
130
+ body: {
131
+ fontSize: 'var(--font-size-body-2)',
132
+ fontWeight: gatorTypography.fontWeight.regular,
133
+ },
134
+
135
+ // Checkbox column sizing
136
+ paddingCheckbox: {
137
+ width: '48px',
138
+ padding: '0 var(--spacing-8)',
139
+ },
140
+
141
+ // Dense/comfortable sizing variants
142
+ sizeSmall: {
143
+ padding: 'var(--spacing-5)',
144
+ },
145
+ },
146
+ },
147
+
148
+ MuiTablePagination: {
149
+ styleOverrides: {
150
+ root: {
151
+ color: 'var(--color-text-primary)',
152
+ fontSize: 'var(--font-size-body-2)',
153
+ padding: 'var(--spacing-8) var(--spacing-10)',
154
+ borderTop: '1px solid var(--color-border-tertiary)',
155
+ },
156
+
157
+ toolbar: {
158
+ minHeight: '56px',
159
+ paddingLeft: 0,
160
+ paddingRight: 0,
161
+ },
162
+
163
+ selectLabel: {
164
+ margin: 0,
165
+ },
166
+
167
+ displayedRows: {
168
+ margin: 0,
169
+ },
170
+
171
+ select: {
172
+ color: 'var(--color-text-brand)',
173
+ fontSize: 'var(--font-size-body-2)',
174
+ fontWeight: gatorTypography.fontWeight.semiBold,
175
+ },
176
+
177
+ input: {
178
+ border: 'none',
179
+ padding: 0,
180
+ textDecoration: 'underline',
181
+ textUnderlineOffset: '4px',
182
+ textDecorationColor: 'var(--color-border-secondary)',
183
+
184
+ '&:focus': {
185
+ borderRadius: 'var(--border-radius-x-small)',
186
+ backgroundColor: 'var(--color-surface-secondary)',
187
+ borderColor: 'var(--color-border-brand)',
188
+ },
189
+
190
+ '&:hover': {
191
+ textDecorationColor: 'var(--color-border-brand)',
192
+ },
193
+ },
194
+
195
+ selectIcon: {
196
+ color: 'var(--color-icon-brand)',
197
+ },
198
+ },
199
+ },
200
+ };