Skip to content

Commit

Permalink
APP-3028: add opaque grey variants (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous authored Nov 1, 2023
1 parent c5e5640 commit 53fe0d6
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
26 changes: 26 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"svelte.enable-ts-plugin": true,
"eslint.probe": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"markdown",
"svelte"
],
"eslint.validate": ["svelte"],
"prettier.documentSelectors": ["**/*.svelte"],
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": true,
"prettier.singleAttributePerLine": true,
"tailwindCSS.classAttributes": ["class", "cx"],
"tailwindCSS.experimental.classRegex": [
["cx\\(([\\S\\s]*?)\\)", "'([^']*)'"]
],
"[svelte]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/prime-core",
"version": "0.0.57",
"version": "0.0.58",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/lib/button/button.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
@component
For user triggered actions.
```svelte
Expand Down Expand Up @@ -64,7 +64,7 @@ $: handleDisabled = preventHandler(disabled);
variant === 'primary' && !disabled,
'border-gray-9 bg-gray-9 text-white hover:border-black hover:bg-black active:bg-[#000]':
variant === 'dark' && !disabled,
'active-border-[rgba(0,0,0,0.08)] border-transparent text-default hover:bg-[rgba(0,0,0,0.04)] active:bg-[rgba(0,0,0,0.08)]':
'border-transparent text-default hover:bg-ghost-light active:border-ghost-medium active:bg-ghost-medium':
variant === 'ghost' && !disabled,
'border-danger-dark bg-danger-dark text-white hover:bg-[#aa2a2b] active:bg-[#9e2728]':
variant === 'danger' && !disabled,
Expand Down
4 changes: 4 additions & 0 deletions packages/core/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export const theme = {
'disabled-dark': '#9c9ca4',
'disabled-light': '#f2f2f4',

// Opaque grayscale
'ghost-light': 'rgba(0,0,0,0.04)',
'ghost-medium': 'rgba(0,0,0,0.08)',

// Brand design colors
'power-wire': '#ff0047',
pcb: '#00501f',
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/prime",
"version": "0.5.8",
"version": "0.5.9",
"license": "Apache-2.0",
"type": "module",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/src/elements/button/button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const handleParentClick = (event: PointerEvent) => {
variant === 'primary',
'border-gray-9 bg-gray-9 text-white hover:border-black hover:bg-black active:bg-[#000]':
variant === 'inverse-primary',
'active-border-[rgba(0,0,0,0.08)] border-transparent hover:bg-[rgba(0,0,0,0.04)] active:bg-[rgba(0,0,0,0.08)]':
'border-transparent hover:bg-ghost-light active:border-ghost-medium active:bg-ghost-medium':
variant === 'ghost' || variant === 'icon' || variant === 'icon-danger',
'border-danger-dark bg-danger-dark text-white hover:bg-[#aa2a2b] active:bg-[#9e2728]':
variant === 'danger',
Expand Down

0 comments on commit 53fe0d6

Please sign in to comment.