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

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

173 lines
5.0 KiB
JavaScript
Raw Normal View History

/** @file Configuration for Tailwind. */
// The names come from a third-party API and cannot be changed.
/* eslint-disable no-restricted-syntax, @typescript-eslint/naming-convention, @typescript-eslint/no-magic-numbers */
export default /** @satisfies {import('tailwindcss').Config} */ ({
content: ['./src/**/*.tsx', './src/**/*.ts'],
important: `:is(.enso-dashboard, .enso-chat)`,
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)',
'ide-bg': '#ebeef1',
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',
share: '#64b526',
inversed: '#ffffff',
green: '#3e8b29',
delete: 'rgba(243, 24, 10, 0.87)',
v3: '#252423',
youtube: '#c62421',
discord: '#404796',
danger: '#d33b0b',
Improve mouse and keyboard UX (#9100) - Close https://github.com/enso-org/cloud-v2/issues/914 - Add selection brush for selecting multiple assets using mouse - Port selection brush over from GUI2 - Support <kbd>Ctrl</kbd>-select to select multiple ranges - Add various actions when *exactly one* asset is selected: - <kbd>Enter</kbd> for various assets to trigger their double-click actions - Projects are opened - Directories are toggled open/closed - Secrets show the "upsert secret modal" - <kbd>ArrowLeft</kbd> now collapses the selected folder - <kbd>ArrowRight</kbd> now expands the selected folder - <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> change the selected asset to the previous/next asset - The newly selected asset (technically: any asset that is the only selected asset, whether this is a result of a drag, mouse click, or keypress) is automatically smoothly scrolled to. - Improvements to the search bar - <kbd>Escape</kbd> cancels tabbing through suggestions (and discards the selected suggestion) - <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> behave like <kbd>Shift</kbd>+<kbd>Tab</kbd> and <kbd>Tab</kbd> to move to the previous/next suggestion respectively - <kbd>Shift</kbd>+<kbd>ArrowUp</kbd> and <kbd>Shift</kbd>+<kbd>ArrowDown</kbd> to select multiple assets using the keyboard - <kbd>Ctrl</kbd>+<kbd>Space</kbd> to toggle assets using the keyboard - <kbd>Escape</kbd> to deselect all assets - Add CSS-only focus ring to highlight most recently selected item, but only when navigating via keyboard - Enter and double-click to temporarily open the sidebar to edit a Data Link Optional features that have not yet been implemented: - Move the "update secret" modal to the sidebar as well # Important Notes None
2024-02-26 19:49:49 +03:00
// Equivalent to `lch(70% 0 0 / 0.5)`
'selection-brush': 'rgba(171 171 171 / 0.5)',
dim: 'rgba(0, 0, 0, 0.25)',
'dim-darker': 'rgba(0, 0, 0, 0.40)',
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)',
'label-running-project': '#257fd2',
'label-low-resources': '#ff6b18',
'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',
},
borderRadius: {
'2.5xl': '1.25rem',
'4xl': '2rem',
},
lineHeight: {
144.5: '144.5%',
170: '170%',
},
spacing: {
0.75: '0.1875rem',
1.25: '0.3125rem',
1.75: '0.4375rem',
2.25: '0.5625rem',
3.25: '0.8125rem',
3.75: '0.9375rem',
3.5: '0.875rem',
4.5: '1.125rem',
4.75: '1.1875rem',
5.5: '1.375rem',
6.5: '1.625rem',
7.25: '1.75rem',
7.5: '1.875rem',
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',
38.25: '9.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',
More E2E tests; `export default` classes from modules (#8730) This is a prerequisite for adding a CI action for E2E tests. - Fix E2E tests - Remove visual regression testing (VRT) and associated fixtures (screenshots) for now - Switch dashboard almost fully to Vite, from ESBuild, to match GUI2's build tooling. - Add some new E2E tests: - Creating assets - Deleting assets - Creating assets from the samples on the home page - Sort assets - Includes fixes for sorting: - Group sorted assets by type again (regression) (see https://github.com/enso-org/cloud-v2/issues/554) - Make sorting by title, case insensitive. This is because it is more intuitive for non-programmers if all items with uppercase names *aren't* separated from those with lowercase names - especially since the Windows FS is case-insensitive. - Normalization of Unicode letters is *not* currently being done. It can potentially be added later. - Double-clicking *anywhere* on a directory row now expands it. Previously it was only being expanded when double clicking - Add recursive label adding/removal to mirror backend - Note: The current implementation is not exactly the same as the backend's implementation. - Fix https://github.com/enso-org/cloud-v2/issues/872 - Unset "saved project details" (for opening the last open project) if fetching it produces an error. # Important Notes - All tests pass. (run `npm run test:e2e` in `app/ide-desktop/lib/dashboard`) - All `npm` commands should be run in `app/ide-desktop/lib/dashboard`. `dashboard:*` npm scripts have been removed from `app/ide-desktop` to prevent a mess. - `npm run dev` confirmed to still work. Note that it has not been changed as it was already using Vite. - `npm run build` now uses `vite build`. This has been tested using a local HTTP server that supports `404.html`. - Other cases have been tested: - `npm run test:e2e` works (all tests pass) - `./run ide build` works - `./run ide watch` works - `./run ide2 build` works - `./run gui watch` works
2024-01-31 14:35:41 +03:00
84: '21rem',
112.5: '28.125rem',
115.25: '28.8125rem',
120: '30rem',
140: '35rem',
Add Stripe for Billing Support (#8841) * feat: Stripe billing support Squashed commit of the following: commit b7ab361d2e2a3b11819ee0c964dd25dde2850eac Author: Nikita Pekin <nikita@frecency.com> Date: Wed Jan 10 04:14:14 2024 -0500 fixes commit 2b7f525be95d8d9e50dea9c5f31828dc2c823eae Merge: 717fba94a1 942e6c2305 Author: Nikita Pekin <nikita@frecency.com> Date: Mon Jan 8 08:54:15 2024 -0500 Merge branch 'develop' into wip/np/payment-page-2 commit 717fba94a1b900318ae7d32664b1cb292cb47364 Author: Nikita Pekin <nikita@frecency.com> Date: Mon Jan 8 08:32:38 2024 -0500 fix commit 66a278effddfe57d326acfe93b9fd6ce9f849a65 Author: Nikita Pekin <nikita@frecency.com> Date: Mon Jan 8 06:10:37 2024 -0500 rename endpoints commit 05ca2276d796d5431a19623f18d97503d730746c Author: Nikita Pekin <nikita@frecency.com> Date: Thu Jan 4 03:13:07 2024 -0500 update for new API commit ecc65a4b3bbf8167c91eb9cc9a71f05367ee41f6 Author: Nikita Pekin <nikita@frecency.com> Date: Tue Jan 2 09:02:23 2024 -0500 make subscribe appear in app commit 048883e343cc42ba75e2e1ebbfa50b9d3033255c Author: Nikita Pekin <nikita@frecency.com> Date: Mon Jan 1 05:13:04 2024 -0500 unify pricename and price commit 5439299eaa01732bcee3204c72987845a569029b Author: Nikita Pekin <nikita@frecency.com> Date: Sun Dec 31 22:57:52 2023 -0500 rename checkout sessions endpoint commit 67537302f9183918272324723b34e26659d10dbe Author: Nikita Pekin <nikita@frecency.com> Date: Sun Dec 31 22:57:44 2023 -0500 fix session ID commit 637968331bf3d2c10b9c6130ae994529b9606fdd Author: Nikita Pekin <nikita@frecency.com> Date: Sun Dec 31 19:59:29 2023 -0500 fix stripe JS commit 051a01e1988f62931e2b7f3f436b6490a09602e0 Author: Nikita Pekin <nikita@frecency.com> Date: Sat Dec 30 23:32:41 2023 -0500 tmp: add AWS profile and refactor commit 9f4199b22dfc5565bea737e31f8d379e098712a7 Author: somebody1234 <ehern.lee@gmail.com> Date: Sat Nov 4 04:49:29 2023 +1000 Fix `ALL_PATHS_REGEX` commit 4b53bcf7f82fe30c21db013d01dae58e20afb605 Author: somebody1234 <ehern.lee@gmail.com> Date: Mon Dec 18 17:15:33 2023 +1000 Expose `unauthenticatedBackend` from backend context commit 8d554ac16747392c9cd5d10a2c3ad6d79afb7268 Author: somebody1234 <ehern.lee@gmail.com> Date: Mon Dec 18 17:12:17 2023 +1000 Add methods for making HTTP requests to unauthenticated backend commit 2010890cbd38bff31b18e0847ea22a5b71f926d1 Author: somebody1234 <ehern.lee@gmail.com> Date: Mon Dec 18 17:04:49 2023 +1000 Add unauthenticated backend commit 04ac84533bee493194e32129f934ccd9c1df78d6 Merge: 1fa45bc73c d4714af826 Author: somebody1234 <ehern.lee@gmail.com> Date: Mon Dec 18 16:26:27 2023 +1000 Merge branch 'develop' into wip/np/payment-page-2 commit 1fa45bc73cbbf50e53c6f3273559210e85b66c7e Author: Nikita Pekin <nikita@frecency.com> Date: Sun Nov 12 07:01:45 2023 +0000 tmp: Complete checkoutSession flow commit 30ec2792256db5b2b448119b07213b79e3f8a3c5 Author: somebody1234 <ehern.lee@gmail.com> Date: Wed Nov 1 19:20:15 2023 +1000 Initial Stripe integration * revert requestedPlan changes * switch to path from query * Prettier * Fix type error * Switch environment back to production * Fix errors * Fix dev server by removing COOP/COEP/CORP on the dev server specifically * Redirect after upgrading plan is successful * Fix errors; fix initial size of Subscribe page --------- Co-authored-by: somebody1234 <ehern.lee@gmail.com>
2024-02-22 19:56:36 +03:00
155: '38.75rem',
'10lh': '10lh',
},
minHeight: {
'5lh': '5lh',
},
width: {
container: '100cqw',
},
minWidth: {
31.5: '7.875rem',
32: '8rem',
33.25: '8.3125rem',
40: '10rem',
61.25: '15.3125rem',
80: '20rem',
96: '24rem',
120: '30rem',
},
maxWidth: {
98.25: '24.5625rem',
'screen-1/3': '33.333333vw',
},
opacity: {
'1/3': '.33333333',
},
zIndex: {
1: '1',
3: '3',
},
backdropBlur: {
xs: '2px',
},
Improve mouse and keyboard UX (#9100) - Close https://github.com/enso-org/cloud-v2/issues/914 - Add selection brush for selecting multiple assets using mouse - Port selection brush over from GUI2 - Support <kbd>Ctrl</kbd>-select to select multiple ranges - Add various actions when *exactly one* asset is selected: - <kbd>Enter</kbd> for various assets to trigger their double-click actions - Projects are opened - Directories are toggled open/closed - Secrets show the "upsert secret modal" - <kbd>ArrowLeft</kbd> now collapses the selected folder - <kbd>ArrowRight</kbd> now expands the selected folder - <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> change the selected asset to the previous/next asset - The newly selected asset (technically: any asset that is the only selected asset, whether this is a result of a drag, mouse click, or keypress) is automatically smoothly scrolled to. - Improvements to the search bar - <kbd>Escape</kbd> cancels tabbing through suggestions (and discards the selected suggestion) - <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> behave like <kbd>Shift</kbd>+<kbd>Tab</kbd> and <kbd>Tab</kbd> to move to the previous/next suggestion respectively - <kbd>Shift</kbd>+<kbd>ArrowUp</kbd> and <kbd>Shift</kbd>+<kbd>ArrowDown</kbd> to select multiple assets using the keyboard - <kbd>Ctrl</kbd>+<kbd>Space</kbd> to toggle assets using the keyboard - <kbd>Escape</kbd> to deselect all assets - Add CSS-only focus ring to highlight most recently selected item, but only when navigating via keyboard - Enter and double-click to temporarily open the sidebar to edit a Data Link Optional features that have not yet been implemented: - Move the "update secret" modal to the sidebar as well # Important Notes None
2024-02-26 19:49:49 +03:00
borderWidth: { 0.5: '0.5px', 6: '6px' },
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',
'min-width': 'min-width',
'stroke-dasharray': 'stroke-dasharray',
'grid-template-rows': 'grid-template-rows',
Improve mouse and keyboard UX (#9100) - Close https://github.com/enso-org/cloud-v2/issues/914 - Add selection brush for selecting multiple assets using mouse - Port selection brush over from GUI2 - Support <kbd>Ctrl</kbd>-select to select multiple ranges - Add various actions when *exactly one* asset is selected: - <kbd>Enter</kbd> for various assets to trigger their double-click actions - Projects are opened - Directories are toggled open/closed - Secrets show the "upsert secret modal" - <kbd>ArrowLeft</kbd> now collapses the selected folder - <kbd>ArrowRight</kbd> now expands the selected folder - <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> change the selected asset to the previous/next asset - The newly selected asset (technically: any asset that is the only selected asset, whether this is a result of a drag, mouse click, or keypress) is automatically smoothly scrolled to. - Improvements to the search bar - <kbd>Escape</kbd> cancels tabbing through suggestions (and discards the selected suggestion) - <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> behave like <kbd>Shift</kbd>+<kbd>Tab</kbd> and <kbd>Tab</kbd> to move to the previous/next suggestion respectively - <kbd>Shift</kbd>+<kbd>ArrowUp</kbd> and <kbd>Shift</kbd>+<kbd>ArrowDown</kbd> to select multiple assets using the keyboard - <kbd>Ctrl</kbd>+<kbd>Space</kbd> to toggle assets using the keyboard - <kbd>Escape</kbd> to deselect all assets - Add CSS-only focus ring to highlight most recently selected item, but only when navigating via keyboard - Enter and double-click to temporarily open the sidebar to edit a Data Link Optional features that have not yet been implemented: - Move the "update secret" modal to the sidebar as well # Important Notes None
2024-02-26 19:49:49 +03:00
'border-margin': 'border, margin',
},
transitionDuration: {
400: '400ms',
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))',
},
},
},
})