enso/app/ide-desktop/lib/dashboard/tailwind.config.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

154 lines
5.0 KiB
TypeScript
Raw Normal View History

/** @file Configuration for Tailwind. */
import * as path from 'node:path'
import * as url from 'node:url'
// =================
// === Constants ===
// =================
const THIS_PATH = path.resolve(path.dirname(url.fileURLToPath(import.meta.url)))
// =====================
// === Configuration ===
// =====================
// The names come from a third-party API and cannot be changed.
/* eslint-disable no-restricted-syntax, @typescript-eslint/naming-convention */
export const content = [THIS_PATH + '/src/**/*.tsx']
export const important = `:is(.enso-dashboard, .enso-chat)`
export const theme = {
extend: {
colors: {
/** The default color of all text. */
// This should be named "regular".
primary: 'rgba(0, 0, 0, 0.60)',
'not-selected': 'rgba(0, 0, 0, 0.40)',
'icon-selected': 'rgba(0, 0, 0, 0.50)',
'icon-not-selected': 'rgba(0, 0, 0, 0.30)',
chat: '#484848',
'ide-bg': '#ebeef1',
'ide-bg-dark': '#d0d3d6',
selected: 'rgba(255, 255, 255, 0.40)',
// Should be `#3e515f14`, but `bg-opacity` does not work with RGBA.
label: '#f0f1f3',
help: '#3f68ce',
invite: '#0e81d4',
cloud: '#0666be',
Improve assets table display (#7500) - Closes #7463 - Makes table header sticky - Clips table body so it does not overlap table header Other changes: - Clip table header row so it does not overlap extra columns selector - Hide extra columns selector on local backend (PM backend) - Focus search bar if the keypress will type regular text - Change row height from 40px to 32px - Add "Share" button when the editor is open - Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable) - Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row). - Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder) - Indent background of "name" column (the first column) - Minor code style changes - Add background back to "change password" modal (oops) - Hide "open" context menu entry and show "stop" entry, when a project is currently running - :information_source: It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR. - Fix horizontal padding on "sign in" user menu entry - Hide email/password validation when using oauth logins More fixes for assets list: - Project is inserted at start of list when there are no existing projects - Project is inserted at start of children when there are no existing children - Deleting a folder collapses it (hides its descendants) - Adding children to a newly created folder puts them at the correct depth, rather than depth 1 # Important Notes None
2023-08-28 21:01:40 +03:00
share: '#64b526',
inversed: '#ffffff',
Async execution controls (#7592) - Closes https://github.com/enso-org/cloud-v2/issues/619 - Async execution controls # Important Notes There is no design for this, as such, implementation details use placeholder designs. - The context menu uses a play icon. An icon similar in style to the "copy" icon *may* work to represent "run in background", but it may be difficult to visually represent that it is being run in the background, without obstructing it with a foreground window - The icon for projects being run in the background have a green tint, to distinguish them from projects that will be (or are currently) opened in the editor. - this will ***almost certainly*** need to be replaced with a proper design - This *may* also make sense for the local backend, *however* as I don't know whether there is a way to access the completion progress of execution from the PM API, local backend support is currently *not* implemented in this PR. - On a related note: as far as I am aware, there is also no such endpoint for the cloud backend. However, support for async execution was recently added, so I am adding the basic functionality corresponding to the `executeAsync` project state. - Whether a project is being run in the background is currently lost on refresh. This is because the async execution state is currently not sent by the backend. - Placeholder shortcuts have been added (Shift+Enter - Cmd+Enter is already taken by the "share" action, and shift+double click). These are totally optional, and can easily be removed.
2023-09-07 15:36:03 +03:00
green: '#3e8b29',
delete: 'rgba(243, 24, 10, 0.87)',
v3: '#252423',
youtube: '#c62421',
discord: '#404796',
dim: 'rgba(0, 0, 0, 0.25)',
frame: 'rgba(255, 255, 255, 0.40)',
'frame-selected': 'rgba(255, 255, 255, 0.70)',
'tag-text': 'rgba(255, 255, 255, 0.90)',
'tag-text-2': 'rgba(0, 0, 0, 0.60)',
'permission-owner': 'rgba(236, 2, 2, 0.70)',
'permission-admin': 'rgba(252, 60, 0, 0.70)',
'permission-edit': 'rgba(255, 138, 0, 0.90)',
'permission-read': 'rgba(152, 174, 18, 0.80)',
'permission-docs': 'rgba(91, 8, 226, 0.64)',
'permission-exec': 'rgba(236, 2, 2, 0.70)',
'permission-view': 'rgba(0, 0, 0, 0.10)',
'call-to-action': '#fa6c08',
'black-a5': 'rgba(0, 0, 0, 0.05)',
'black-a10': 'rgba(0, 0, 0, 0.10)',
'black-a16': 'rgba(0, 0, 0, 0.16)',
'black-a30': 'rgba(0, 0, 0, 0.30)',
'black-a50': 'rgba(0, 0, 0, 0.50)',
'gray-350': '#b7bcc5',
},
fontSize: {
xs: '0.71875rem',
sm: '0.8125rem',
xl: '1.1875rem',
'4xl': '2.375rem',
},
lineHeight: {
Improve assets table display (#7500) - Closes #7463 - Makes table header sticky - Clips table body so it does not overlap table header Other changes: - Clip table header row so it does not overlap extra columns selector - Hide extra columns selector on local backend (PM backend) - Focus search bar if the keypress will type regular text - Change row height from 40px to 32px - Add "Share" button when the editor is open - Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable) - Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row). - Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder) - Indent background of "name" column (the first column) - Minor code style changes - Add background back to "change password" modal (oops) - Hide "open" context menu entry and show "stop" entry, when a project is currently running - :information_source: It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR. - Fix horizontal padding on "sign in" user menu entry - Hide email/password validation when using oauth logins More fixes for assets list: - Project is inserted at start of list when there are no existing projects - Project is inserted at start of children when there are no existing children - Deleting a folder collapses it (hides its descendants) - Adding children to a newly created folder puts them at the correct depth, rather than depth 1 # Important Notes None
2023-08-28 21:01:40 +03:00
'144.5': '144.5%',
'170': '170%',
},
spacing: {
'0.75': '0.1875rem',
Improve assets table display (#7500) - Closes #7463 - Makes table header sticky - Clips table body so it does not overlap table header Other changes: - Clip table header row so it does not overlap extra columns selector - Hide extra columns selector on local backend (PM backend) - Focus search bar if the keypress will type regular text - Change row height from 40px to 32px - Add "Share" button when the editor is open - Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable) - Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row). - Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder) - Indent background of "name" column (the first column) - Minor code style changes - Add background back to "change password" modal (oops) - Hide "open" context menu entry and show "stop" entry, when a project is currently running - :information_source: It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR. - Fix horizontal padding on "sign in" user menu entry - Hide email/password validation when using oauth logins More fixes for assets list: - Project is inserted at start of list when there are no existing projects - Project is inserted at start of children when there are no existing children - Deleting a folder collapses it (hides its descendants) - Adding children to a newly created folder puts them at the correct depth, rather than depth 1 # Important Notes None
2023-08-28 21:01:40 +03:00
'1.25': '0.3125rem',
'1.75': '0.4375rem',
'2.25': '0.5625rem',
'3.25': '0.8125rem',
'3.5': '0.875rem',
Improve assets table display (#7500) - Closes #7463 - Makes table header sticky - Clips table body so it does not overlap table header Other changes: - Clip table header row so it does not overlap extra columns selector - Hide extra columns selector on local backend (PM backend) - Focus search bar if the keypress will type regular text - Change row height from 40px to 32px - Add "Share" button when the editor is open - Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable) - Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row). - Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder) - Indent background of "name" column (the first column) - Minor code style changes - Add background back to "change password" modal (oops) - Hide "open" context menu entry and show "stop" entry, when a project is currently running - :information_source: It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR. - Fix horizontal padding on "sign in" user menu entry - Hide email/password validation when using oauth logins More fixes for assets list: - Project is inserted at start of list when there are no existing projects - Project is inserted at start of children when there are no existing children - Deleting a folder collapses it (hides its descendants) - Adding children to a newly created folder puts them at the correct depth, rather than depth 1 # Important Notes None
2023-08-28 21:01:40 +03:00
'4.5': '1.125rem',
'4.75': '1.1875rem',
'5.5': '1.375rem',
'6.5': '1.625rem',
'9.5': '2.375rem',
'9.75': '2.4375rem',
'13': '3.25rem',
'18': '4.5rem',
'25': '6.25rem',
'29': '7.25rem',
'30': '7.5rem',
'30.25': '7.5625rem',
'42': '10.5rem',
'45': '11.25rem',
'51': '12.75rem',
'51.5': '12.875rem',
'54': '13.5rem',
'57.5': '14.375rem',
'62': '15.5rem',
'70': '17.5rem',
'83.5': '20.875rem',
'98.25': '24.5625rem',
'112.5': '28.125rem',
'115.25': '28.8125rem',
'140': '35rem',
'10lh': '10lh',
},
minWidth: {
'31.5': '7.875rem',
Improve assets table display (#7500) - Closes #7463 - Makes table header sticky - Clips table body so it does not overlap table header Other changes: - Clip table header row so it does not overlap extra columns selector - Hide extra columns selector on local backend (PM backend) - Focus search bar if the keypress will type regular text - Change row height from 40px to 32px - Add "Share" button when the editor is open - Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable) - Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row). - Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder) - Indent background of "name" column (the first column) - Minor code style changes - Add background back to "change password" modal (oops) - Hide "open" context menu entry and show "stop" entry, when a project is currently running - :information_source: It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR. - Fix horizontal padding on "sign in" user menu entry - Hide email/password validation when using oauth logins More fixes for assets list: - Project is inserted at start of list when there are no existing projects - Project is inserted at start of children when there are no existing children - Deleting a folder collapses it (hides its descendants) - Adding children to a newly created folder puts them at the correct depth, rather than depth 1 # Important Notes None
2023-08-28 21:01:40 +03:00
'33.25': '8.3125rem',
'40': '10rem',
Improve assets table display (#7500) - Closes #7463 - Makes table header sticky - Clips table body so it does not overlap table header Other changes: - Clip table header row so it does not overlap extra columns selector - Hide extra columns selector on local backend (PM backend) - Focus search bar if the keypress will type regular text - Change row height from 40px to 32px - Add "Share" button when the editor is open - Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable) - Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row). - Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder) - Indent background of "name" column (the first column) - Minor code style changes - Add background back to "change password" modal (oops) - Hide "open" context menu entry and show "stop" entry, when a project is currently running - :information_source: It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR. - Fix horizontal padding on "sign in" user menu entry - Hide email/password validation when using oauth logins More fixes for assets list: - Project is inserted at start of list when there are no existing projects - Project is inserted at start of children when there are no existing children - Deleting a folder collapses it (hides its descendants) - Adding children to a newly created folder puts them at the correct depth, rather than depth 1 # Important Notes None
2023-08-28 21:01:40 +03:00
'61.25': '15.3125rem',
'80': '20rem',
'96': '24rem',
},
opacity: {
'1/3': '.33333333',
},
zIndex: {
'1': '1',
'3': '3',
},
backdropBlur: {
xs: '2px',
},
borderWidth: { '0.5': '0.5px' },
boxShadow: {
soft: `0 0.5px 2.2px 0px #00000008, 0 1.2px 5.3px 0px #0000000b, \
0 2.3px 10px 0 #0000000e, 0 4px 18px 0 #00000011, 0 7.5px 33.4px 0 #00000014, \
0 18px 80px 0 #0000001c`,
},
animation: {
'spin-ease': 'spin cubic-bezier(0.67, 0.33, 0.33, 0.67) 1.5s infinite',
},
transitionProperty: {
width: 'width',
'stroke-dasharray': 'stroke-dasharray',
'grid-template-rows': 'grid-template-rows',
},
transitionDuration: {
'5000': '5000ms',
'90000': '90000ms',
},
gridTemplateRows: {
'0fr': '0fr',
'1fr': '1fr',
},
gridTemplateColumns: {
'fill-60': 'repeat(auto-fill, minmax(15rem, 1fr))',
'fill-75': 'repeat(auto-fill, minmax(18.75rem, 1fr))',
},
},
}