diff --git a/plugin/ignite-plugin/ignite/README.txt b/plugin/ignite-plugin/ignite/README.txt new file mode 100644 index 000000000..a74311661 --- /dev/null +++ b/plugin/ignite-plugin/ignite/README.txt @@ -0,0 +1,7 @@ +This is Apache Ignite working directory that contains information that + Ignite nodes need in order to function normally. +Don't delete it unless you're sure you know what you're doing. + +You can change the location of working directory with + igniteConfiguration.setWorkDirectory(location) or + in IgniteConfiguration . diff --git a/plugin/ignite-plugin/ignite/work/db/marshaller/2144474804.classname0 b/plugin/ignite-plugin/ignite/work/db/marshaller/2144474804.classname0 new file mode 100644 index 000000000..c4d1ddb2a --- /dev/null +++ b/plugin/ignite-plugin/ignite/work/db/marshaller/2144474804.classname0 @@ -0,0 +1 @@ +org.finos.vuu.feature.ignite.TestOrderEntity \ No newline at end of file diff --git a/vuu-ui/package-lock.json b/vuu-ui/package-lock.json index dad84c64d..04ba8d6f7 100644 --- a/vuu-ui/package-lock.json +++ b/vuu-ui/package-lock.json @@ -12,7 +12,8 @@ "packages/**", "sample-apps/**", "showcase", - "tools/vuu-showcase" + "tools/vuu-showcase", + "themes/**" ], "dependencies": { "@salt-ds/core": "1.17.0", @@ -59,7 +60,7 @@ "stylelint": "^15.0.0", "tinycolor2": "1.4.2", "typescript": "4.9.5", - "vite": "5.1.3", + "vite": "5.0.12", "vite-tsconfig-paths": "4.2.2", "vitest": "1.3.1" }, @@ -2897,6 +2898,10 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, + "node_modules/@vuu-themes/tar-theme": { + "resolved": "themes/tar-theme", + "link": true + }, "node_modules/@zeit/schemas": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.29.0.tgz", @@ -11873,13 +11878,13 @@ "dev": true }, "node_modules/vite": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz", - "integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", + "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", "dev": true, "dependencies": { "esbuild": "^0.19.3", - "postcss": "^8.4.35", + "postcss": "^8.4.32", "rollup": "^4.2.0" }, "bin": { @@ -13567,6 +13572,10 @@ "resolved": "https://registry.npmjs.org/@salt-ds/theme/-/theme-1.11.1.tgz", "integrity": "sha512-qdYkWwcmTziNJySu4f00L7pXCK1ExGt6xYBW+yUcYUsyLWymtcqDZDNOKEo6WXSkQ8ZePGI6UwiUwjAQjot/1w==" }, + "themes/tar-theme": { + "version": "0.0.26", + "license": "Apache-2.0" + }, "tools/vuu-showcase": { "name": "@finos/vuu-showcase", "version": "0.0.1", @@ -15780,6 +15789,9 @@ } } }, + "@vuu-themes/tar-theme": { + "version": "file:themes/tar-theme" + }, "@zeit/schemas": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.29.0.tgz", @@ -22364,14 +22376,14 @@ } }, "vite": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz", - "integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", + "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", "dev": true, "requires": { "esbuild": "^0.19.3", "fsevents": "~2.3.3", - "postcss": "^8.4.35", + "postcss": "^8.4.32", "rollup": "^4.2.0" }, "dependencies": { diff --git a/vuu-ui/package.json b/vuu-ui/package.json index 79d5eb411..e36b2666c 100644 --- a/vuu-ui/package.json +++ b/vuu-ui/package.json @@ -12,7 +12,8 @@ "packages/**", "sample-apps/**", "showcase", - "tools/vuu-showcase" + "tools/vuu-showcase", + "themes/**" ], "scripts": { "lint": "eslint . --ext .js,.jsx,.ts,.tsx", @@ -24,7 +25,7 @@ "build:table": "cd sample-apps/standalone-table && node scripts/build.mjs", "build:packages": "npm run build -- --cjs --license && npm run type-defs", "build:packages:debug": "npm run build -- --cjs --debug && npm run type-defs -- --debug", - "build:salt": "node ./scripts/build-salt.mjs", + "build:themes": "node ./scripts/build-themes.mjs", "launch:demo": "node ./scripts/launch-app.mjs", "launch:table": "node ./scripts/launch-table.mjs", "launch:demo:electron": "cd tools/electron && node ./node_modules/.bin/electron .", diff --git a/vuu-ui/packages/vuu-filters/src/filter-bar/FilterBar.tsx b/vuu-ui/packages/vuu-filters/src/filter-bar/FilterBar.tsx index c72621fdd..e01fe4aae 100644 --- a/vuu-ui/packages/vuu-filters/src/filter-bar/FilterBar.tsx +++ b/vuu-ui/packages/vuu-filters/src/filter-bar/FilterBar.tsx @@ -154,7 +154,6 @@ export const FilterBar = ({ .vuuHeader { height: 0; overflow: hidden; diff --git a/vuu-ui/packages/vuu-layout/src/stack/Stack.tsx b/vuu-ui/packages/vuu-layout/src/stack/Stack.tsx index a7eac8751..09bd069d7 100644 --- a/vuu-ui/packages/vuu-layout/src/stack/Stack.tsx +++ b/vuu-ui/packages/vuu-layout/src/stack/Stack.tsx @@ -59,6 +59,7 @@ export const Stack = forwardRef(function Stack( }: StackProps, ref: ForwardedRef ) { + console.log({ TabstripProps }); const id = useId(idProp); const tabLabels = useRef([]); const { @@ -146,7 +147,6 @@ export const Stack = forwardRef(function Stack( onExitEditMode={handleExitEditMode} onMoveTab={onMoveTab} orientation={tabstripOrientation} - // onMouseDown={handleMouseDown} > {renderTabs()} diff --git a/vuu-ui/packages/vuu-shell/src/app-header/AppHeader.tsx b/vuu-ui/packages/vuu-shell/src/app-header/AppHeader.tsx index 9cc821d5f..1df2d51b0 100644 --- a/vuu-ui/packages/vuu-shell/src/app-header/AppHeader.tsx +++ b/vuu-ui/packages/vuu-shell/src/app-header/AppHeader.tsx @@ -44,7 +44,6 @@ export const AppHeader = ({ diff --git a/vuu-ui/packages/vuu-shell/src/left-nav/LeftNav.css b/vuu-ui/packages/vuu-shell/src/left-nav/LeftNav.css index 12710db0d..469b86f9b 100644 --- a/vuu-ui/packages/vuu-shell/src/left-nav/LeftNav.css +++ b/vuu-ui/packages/vuu-shell/src/left-nav/LeftNav.css @@ -1,11 +1,11 @@ .vuuLeftNav { + --vuuOverflowContainer-height: auto; --salt-navigable-fontWeight-active: 700; --vuuTab-background-selected: rgba(255, 255, 255, 0.10); --vuuTab-hover-background: rgba(255, 255, 255, 0.10); --vuuTab-before-content: none; --vuuTab-borderRadius: 6px; --vuuTab-height: 40px; - --vuuTab-padding: 0 0 0 48px; --vuuTabstrip-fontWeight: 700; --vuuTabstrip-width: 100%; --svg-demo: url('data:image/svg+xml;utf8,'); @@ -87,6 +87,8 @@ --vuu-icon-left: 12px; --vuu-icon-size: 16px; border-left: solid 4px transparent; + padding: 0 0 0 48px; + } .vuuLeftNav .vuuTab-selected { diff --git a/vuu-ui/packages/vuu-shell/src/persistence-management/defaultApplicationJson.ts b/vuu-ui/packages/vuu-shell/src/persistence-management/defaultApplicationJson.ts index ba3b475a3..051387a41 100644 --- a/vuu-ui/packages/vuu-shell/src/persistence-management/defaultApplicationJson.ts +++ b/vuu-ui/packages/vuu-shell/src/persistence-management/defaultApplicationJson.ts @@ -35,7 +35,7 @@ export const defaultApplicationJson: ApplicationJSON = { allowRenameTab: true, animateSelectionThumb: false, location: "main-tab", - tabClassName: "MainTab", + variant: "primary", }, preserve: true, active: 0, diff --git a/vuu-ui/packages/vuu-shell/src/shell.css b/vuu-ui/packages/vuu-shell/src/shell.css index 719ca6396..6ba0abd56 100644 --- a/vuu-ui/packages/vuu-shell/src/shell.css +++ b/vuu-ui/packages/vuu-shell/src/shell.css @@ -39,78 +39,11 @@ } .vuuShell-mainTabs > .vuuTabstrip { - --vuuTabstrip-height: 28px; - --saltTabs-tabstrip-height: 29px; - --tabstrip-height: 29px; left:-1px; padding-bottom: 7px; position: absolute !important; right: 1px; top: 0; width: calc(100% + 2px) !important; -} +} -.vuuShell-mainTabs > .vuuTabHeader { - border-bottom: none; -} - -.vuuShell-mainTabs > .vuuTabstrip:before { - background-color: transparent; - border-radius: 0 6px 0 0; - border-left: solid 1px #D6D7DA; - border-right: solid 1px #D6D7DA; - border-top: solid 1px #D6D7DA; - content: ''; - position: absolute; - bottom: 0; - left:0; - right:0; - height: 8px; - z-index: 1; -} - -.vuuTab.MainTab { - --vuuTabMenu-top: -1px; - background-color: #F1F2F4; - border-color: #D6D7DA; - border-radius: 6px 6px 0 0; - border-width: 1px; - border-style: solid; - position: relative; -} - -.MainTab.vuuTab-selected { - background-color: white; - border-bottom-color: white; - z-index: 1; - -} - -.MainTab.vuuTab-selected:before{ - background-color: #6d188b;; - content: ''; - position: absolute; - height: 100%; - left:0; - top:0; - border-radius: 6px 0 0 0; - width: 6px; -} - -.MainTab.vuuTab:hover:before{ - background-color: #F37880; - content: ''; - position: absolute; - height: 100%; - left:0; - top:0; - border-radius: 6px 0 0 0; - width: 6px; -} - -.vuuTab.MainTab .vuuTab-main { - background-color: transparent; - font-weight: 700; - height: 29px; - padding: 0 24px; -} diff --git a/vuu-ui/packages/vuu-table/src/header-cell/GroupHeaderCellNext.tsx b/vuu-ui/packages/vuu-table/src/header-cell/GroupHeaderCellNext.tsx index de31214fd..d89e44116 100644 --- a/vuu-ui/packages/vuu-table/src/header-cell/GroupHeaderCellNext.tsx +++ b/vuu-ui/packages/vuu-table/src/header-cell/GroupHeaderCellNext.tsx @@ -95,7 +95,6 @@ export const GroupHeaderCellNext = ({ diff --git a/vuu-ui/packages/vuu-theme/css/components/button.css b/vuu-ui/packages/vuu-theme/css/components/button.css index 6151daf3e..323b49bbf 100644 --- a/vuu-ui/packages/vuu-theme/css/components/button.css +++ b/vuu-ui/packages/vuu-theme/css/components/button.css @@ -1,7 +1,11 @@ .vuu-theme { /** TODO these will need density variants */ --saltButton-borderRadius: 6px; - --saltButton-padding: 16px; + --saltButton-padding: var(--salt-spacing-400); + + .saltButton { + gap: var(--salt-spacing-200); + } .saltButton-primary { --saltButton-borderColor: var(--vuuButton-borderColor,var(--salt-actionable-primary-foreground)); diff --git a/vuu-ui/packages/vuu-theme/css/components/components.css b/vuu-ui/packages/vuu-theme/css/components/components.css index c60f69e40..248a0ca79 100644 --- a/vuu-ui/packages/vuu-theme/css/components/components.css +++ b/vuu-ui/packages/vuu-theme/css/components/components.css @@ -4,4 +4,5 @@ @import url(input.css); @import url(splitter.css); @import url(switch.css); +@import url(tabstrip.css); @import url(toggle-button.css); diff --git a/vuu-ui/packages/vuu-theme/css/components/tabstrip.css b/vuu-ui/packages/vuu-theme/css/components/tabstrip.css new file mode 100644 index 000000000..8fdd0fa58 --- /dev/null +++ b/vuu-ui/packages/vuu-theme/css/components/tabstrip.css @@ -0,0 +1,67 @@ +.vuu-theme { + + .vuuTab { + --vuuTab-padding: 0 var(--salt-spacing-400); + } + + .vuuTabstrip-primary { + + --vuuOverflowContainer-borderColor: var(--vuu-color-gray-30); + --vuuTab-background: var(--vuu-color-gray-28); + --vuuTab-borderRadius: 6px 6px 0 0; + --vuuTab-borderColor: var(--vuu-color-gray-30); + --vuuTab-borderStyle: solid; + --vuuTab-borderWidth: 1px; + + + &.vuuOrientation-horizontal { + --vuuOverflowContainer-borderStyle: none; + --vuuOverflowContainer-contentHeight: calc(var(--salt-size-base) + var(--salt-spacing-100)); + --vuuOverflowContainer-height: calc(var(--vuuOverflowContainer-contentHeight) + 7px); + padding-bottom: 7px; + } + + .vuuTab { + height: calc(var(--tab-height) + 1px); + } + + .vuuTab-selected { + --vuuTab-background: var(--vuu-color-white); + border-bottom-color: white; + z-index: 1; + } + + .vuuTab-selected:before{ + height: 100%; + left:0; + top:0; + border-radius: 6px 0 0 0; + width: 6px; + } + + .vuuTab:hover:before{ + background-color: #F37880; + height: 100%; + left:0; + top:0; + border-radius: 6px 0 0 0; + width: 6px; + } + + &.vuuTabstrip:before { + background-color: transparent; + border-radius: 0 6px 0 0; + border-left: solid 1px var(--vuu-color-gray-30); + border-right: solid 1px var(--vuu-color-gray-30); + border-top: solid 1px var(--vuu-color-gray-30); + content: ''; + position: absolute; + bottom: 0; + left:0; + right:0; + height: 8px; + z-index: 1; + } + } + +} \ No newline at end of file diff --git a/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/overflow-container/OverflowContainer.cy.tsx b/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/overflow-container/OverflowContainer.cy.tsx index c7a1e75e2..6ca13cb00 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/overflow-container/OverflowContainer.cy.tsx +++ b/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/overflow-container/OverflowContainer.cy.tsx @@ -1,6 +1,6 @@ import React from "react"; // TODO try and get TS path alias working to avoid relative paths like this -import { TestFixtureSimpleOverflowContainer } from "../../../../../../showcase/src/examples/Layout/OverflowContainer.examples"; +import { TestFixtureSimpleOverflowContainer } from "../../../../../../showcase/src/examples/UiControls/OverflowContainer.examples"; describe("WHEN it initially renders, with enough space for all items", () => { it("THEN all child items will be visible, and none will be marked as wrapped", () => { diff --git a/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/tabstrip/Tabstrip.cy.tsx b/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/tabstrip/Tabstrip.cy.tsx index 39a3c9243..74538ed1f 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/tabstrip/Tabstrip.cy.tsx +++ b/vuu-ui/packages/vuu-ui-controls/src/__tests__/__component__/tabstrip/Tabstrip.cy.tsx @@ -1,5 +1,5 @@ // TODO try and get TS path alias working to avoid relative paths like this -import { DefaultTabstripNext } from "../../../../../../showcase/src/examples/UiControls/Tabstrip.examples"; +import { DefaultTabstrip } from "../../../../../../showcase/src/examples/UiControls/Tabstrip.examples"; const OVERFLOW_ITEMS = ".vuuOverflowContainer-wrapContainer > *"; const OVERFLOWED_ITEMS = ".vuuOverflowContainer-wrapContainer > .wrapped"; @@ -10,7 +10,7 @@ const OVERFLOW_IND = describe("WHEN initial size is sufficient to display all contents", () => { describe("WHEN it initially renders", () => { it("THEN all the content items will be visible", () => { - cy.mount(); + cy.mount(); const tabstrip = cy.findByRole("tablist"); tabstrip.should("have.class", "vuuTabstrip"); // The overflow Inidcator will be present, but have zero width @@ -20,11 +20,11 @@ describe("WHEN initial size is sufficient to display all contents", () => { .should("have.length", 5); }); it("THEN no items will be overflowed", () => { - cy.mount(); + cy.mount(); cy.get(OVERFLOWED_ITEMS).should("have.length", 0); }); it("THEN no overflow indicator will be visible", () => { - cy.mount(); + cy.mount(); cy.get(OVERFLOW_IND).should("have.length", 1); cy.get(OVERFLOW_IND).should("not.be.visible"); }); @@ -32,12 +32,12 @@ describe("WHEN initial size is sufficient to display all contents", () => { describe("WHEN resized such that space is sufficient for only 4 tabs (first tab selected)", () => { it("THEN first 4 tabs will be displayed, with overflow indicator", () => { - cy.mount(); - cy.get(".vuuTabstrip").invoke("css", "width", "450px"); + cy.mount(); + cy.get(".vuuTabstrip").invoke("css", "width", "350px"); cy.get(OVERFLOW_ITEMS) .should("have.length", 6) .filter(":visible") - .should("have.length", 4); + .should("have.length", 5); cy.get(".vuuTabstrip").debug(); cy.get(OVERFLOWED_ITEMS).should("have.length", 1); cy.get(`.wrapped`).should("have.length", 1); @@ -48,16 +48,18 @@ describe("WHEN initial size is sufficient to display all contents", () => { describe("WHEN resized such that space is sufficient for only 4 tabs (LAST tab selected)", () => { it("THEN as last tab is selected, last but one will be overflowed", () => { - cy.mount(); - cy.get(".vuuTabstrip").invoke("css", "width", "450px"); + cy.mount(); + cy.get(".vuuTabstrip").invoke("css", "width", "350px"); cy.get(OVERFLOW_ITEMS) .should("have.length", 6) .filter(":visible") .should("have.length", 4); - cy.get(OVERFLOWED_ITEMS).should("have.length", 1); - cy.get(`${OVERFLOW_ITEMS}:nth-child(4).wrapped`).should("have.length", 1); + cy.get(OVERFLOWED_ITEMS).should("have.length", 2); + // Because a longer (selected) item has been restored , two shorter items have been wrapped + cy.get(`${OVERFLOW_ITEMS}:nth-child(2).wrapped`).should("have.length", 1); + cy.get(`${OVERFLOW_ITEMS}:nth-child(3).wrapped`).should("have.length", 1); cy.get(OVERFLOW_IND).should("have.length", 1); - cy.get(OVERFLOW_IND).should("be.visible", 1); + cy.get(OVERFLOW_IND).should("be.visible"); }); }); }); @@ -81,7 +83,7 @@ describe("WHEN initial size is sufficient to display all contents", () => { // describe("WHEN it initially renders", () => { // describe("WHEN the selected Tab has not been specified", () => { // it("THEN the first tab will be selected", () => { -// cy.mount(); +// cy.mount(); // cy.get(".saltTabstrip-inner > *:first-child").should( // "have.ariaSelected" // ); diff --git a/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.css b/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.css index b3d0d67ad..9e1d0f095 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.css +++ b/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.css @@ -1,3 +1,4 @@ + .vuuOverflowContainer { --overflow-borderColor: var(--vuuOverflowContainer-borderColor, none); --overflow-borderStyle: var(--vuuOverflowContainer-borderStyle, none); @@ -8,11 +9,11 @@ --overflow-border-bottomWidth: var(--vuuOverflowContainer-borderBottomWidth, var(--overflow-borderWidth)); --overflow-border-leftWidth: var(--vuuOverflowContainer-borderLeftWidth, var(--overflow-borderWidth)); + --border: calc(var(--overflow-border-topWidth) + var(--overflow-border-bottomWidth)); + --overflow-item-gap : var(--vuuOverflowContainer-gap,2px); --overflow-direction: row; --overflow-height: var(--overflow-item-height); - --overflow-top:top:0; - --overflow-width: 0px; background-color: var(--vuuOverflowContainer-background); border-color: var(--overflow-borderColor); @@ -21,35 +22,61 @@ border-right-width: var(--overflow-border-rightWidth); border-bottom-width: var(--overflow-border-bottomWidth); border-left-width: var(--overflow-border-leftWidth); - height: var(--overflow-container-heightWidth); + height: var(--vuuOverflowContainer-height,var(--overflow-container-height)); + width: var(--overflow-container-width); } -.vuuOverflowContainer-horizontal { +.vuuOverflowContainer.vuuOrientation-horizontal { --item-align: center; --item-margin: 0 var(--overflow-item-gap) 0 var(--overflow-item-gap); + --overflow-container-height: calc(var(--salt-size-base) + var(--salt-spacing-100)); + --overflow-container-width: var(--vuuOverflowContainer-width, auto); + --overflow-wrapper-height: var(--overflow-item-height); + --overflow-item-height: var(--vuuOverflowContainer-contentHeight, calc(var(--overflow-container-height) - var(--total-border-size))); + --overflow-item-width: auto; + --overflow-width: 0px; + --total-border-size: calc(var(--overflow-border-topWidth) + var(--overflow-border-bottomWidth)); + + min-width: var(--vuuOverflowContainer-minWidth, var(--overflow-container-height)); + + .vuuOverflowContainer-wrapContainer-overflowed { + --overflow-left: auto; + --overflow-position: relative; + --overflow-width: auto; + } + } -.vuuOverflowContainer-vertical { +.vuuOverflowContainer.vuuOrientation-vertical { --item-align: stretch; + --overflow-container-height: 100%; + --overflow-container-width: var(--vuuOverflowContainer-width,calc(var(--salt-size-base) + var(--salt-spacing-100))); --overflow-item-height: auto; + --overflow-item-width: calc(var(--overflow-container-width) - var(--total-border-size)); + --overflow-wrapper-height: 100%; + --total-border-size: calc(var(--overflow-border-leftWidth) + var(--overflow-border-rightWidth)); + --item-margin: var(--overflow-item-gap) 0 var(--overflow-item-gap) 0; --overflow-direction: column; - --overflow-height: 0; + --overflow-height: 0px; --overflow-left: 0; --overflow-top: 100%; --overflow-width: auto; - + + .vuuOverflowContainer-wrapContainer-overflowed { + --overflow-top: auto; + --overflow-position: relative; + --overflow-height: auto; + } + } .vuuOverflowContainer-wrapContainer { - --border: calc(var(--overflow-border-topWidth) + var(--overflow-border-bottomWidth)); - --overflow-item-height: calc(var(--overflow-container-height) - var(--border)); align-items: var(--item-align); display: flex; flex-direction: var(--overflow-direction); flex-wrap: wrap; - height: var(--overflow-item-height); + height: var(--overflow-wrapper-height); justify-content: var(--vuuOverflowContainer-justifyContent, flex-start); - min-width: var(--vuuOverflowContainer-minWidth, 44px); overflow: hidden; position: relative; width: 100%; @@ -63,7 +90,7 @@ --overflow-width: auto; } -.vuuOverflowContainer-vertical.vuuOverflowContainer-wrapContainer-overflowed { +.vuuOverflowContainer.vuuOrientation-vertical.vuuOverflowContainer-wrapContainer-overflowed { --overflow-height: auto; } @@ -74,16 +101,17 @@ position: relative; height: var(--overflow-item-height); margin: var(--item-margin); + width: var(--overflow-item-width); } .vuuOverflowContainer-item[data-align="right"] { margin-left: auto; } - .vuuOverflowContainer-item.wrapped { --overflow-item-bg: #ccc; order: 3; + visibility: hidden; } .vuuOverflowContainer-item.vuuDraggable-dragAway, @@ -102,15 +130,9 @@ height: var(--overflow-height); order: var(--overflow-order, 99); overflow: hidden; - left: var(--overflow-left, 100%); - top: var(--overflow-top, 100%); - position: var(--overflow-position, absolute); width: var(--overflow-width); - - } - .vuuDraggable-vuuOverflowContainer { align-items: center; display: flex; diff --git a/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.tsx b/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.tsx index da5c11d81..2ca83a3df 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.tsx +++ b/vuu-ui/packages/vuu-ui-controls/src/overflow-container/OverflowContainer.tsx @@ -2,12 +2,7 @@ import { PopupMenu, PopupMenuProps } from "@finos/vuu-popups"; import { asReactElements, orientationType, useId } from "@finos/vuu-utils"; import cx from "clsx"; -import React, { - CSSProperties, - ForwardedRef, - forwardRef, - HTMLAttributes, -} from "react"; +import React, { ForwardedRef, forwardRef, HTMLAttributes } from "react"; import { OverflowItem } from "./overflow-utils"; import { useOverflowContainer } from "./useOverflowContainer"; @@ -19,7 +14,6 @@ export interface OverflowContainerProps extends HTMLAttributes { PopupMenuProps?: Partial; allowDragDrop?: boolean; debugId?: string; - height: number; onMoveItem?: (fromIndex: number, toIndex: number) => void; onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void; orientation?: orientationType; @@ -32,14 +26,13 @@ const WrapContainer = React.memo( PopupMenuProps, allowDragDrop, children, - className: classNameProp, - height: heightProp, id, onMoveItem, onSwitchWrappedItemIntoView, - orientation = "horizontal", + orientation, overflowIcon, - }: OverflowContainerProps) => { + }: Omit & + Required>) => { const childElements = asReactElements(children); const { draggable, @@ -56,17 +49,6 @@ const WrapContainer = React.memo( orientation, }); - const height = orientation === "vertical" ? "100%" : `${heightProp}px`; - // TODO measure the height, if not provided - const style = { - "--overflow-container-height": `${height}`, - } as CSSProperties; - - const className = cx(`${classBase}-wrapContainer`, classNameProp, { - [`${classBase}-horizontal`]: orientation === "horizontal", - [`${classBase}-vertical`]: orientation === "vertical", - }); - const content = childElements.map((childEl, i) => { const { "data-align": align, @@ -100,6 +82,7 @@ const WrapContainer = React.memo( > ); - content.push(overflowIndicator); return ( -
+
{content} {draggable}
@@ -127,11 +109,10 @@ export const OverflowContainer = forwardRef(function OverflowContainer( allowDragDrop = false, children, className, - height = 44, id: idProp, onMoveItem, onSwitchWrappedItemIntoView, - orientation, + orientation = "horizontal", overflowIcon, overflowPosition, ...htmlAttributes @@ -143,14 +124,18 @@ export const OverflowContainer = forwardRef(function OverflowContainer( return (
{ const nonWrappedItems: OverflowItem[] = []; const wrappedItems: OverflowItem[] = []; @@ -165,11 +165,12 @@ export const highPriorityItemsHaveWrappedButShouldNotHave = ( */ export const correctForWrappedOverflowIndicator = ( container: HTMLElement, - overflowedItems: OverflowItem[] + overflowedItems: OverflowItem[], + orientation: orientationType ): Promise => new Promise((resolve) => { requestAnimationFrame(() => { - const [, o2] = getNonWrappedAndWrappedItems(container); + const [, o2] = getNonWrappedAndWrappedItems(container, orientation); const newlyOverflowed = getNewItems(overflowedItems, o2); newlyOverflowed.forEach((item) => markElementAsWrapped(container, item)); resolve(o2); @@ -185,16 +186,18 @@ export const correctForWrappedOverflowIndicator = ( export const correctForWrappedHighPriorityItems = ( container: HTMLElement, nonWrapped: OverflowItem[], - wrapped: OverflowItem[] + wrapped: OverflowItem[], + orientation: orientationType ): Promise<[OverflowItem[], OverflowItem[]]> => new Promise((resolve) => { requestAnimationFrame(() => { - const [, o2] = getNonWrappedAndWrappedItems(container); + const [, o2] = getNonWrappedAndWrappedItems(container, orientation); const highPriorityWrappedItem = getHighestPriorityItem(o2); if (highPriorityWrappedItem) { const [nonWrappedItems, wrappedItems] = switchWrappedItemIntoView( container, - highPriorityWrappedItem + highPriorityWrappedItem, + orientation ); resolve([nonWrappedItems, wrappedItems]); } else { @@ -249,19 +252,39 @@ const getOverflowIndicator = (container: HTMLElement) => container.querySelector('[data-index="overflow"]') as HTMLElement; const getOverflowedItem = (container: HTMLElement) => container.querySelector(".wrapped") as HTMLElement; -const getElementWidth = (el: HTMLElement) => - parseInt(getComputedStyle(el).getPropertyValue("width")); +const getElementSize = (el: HTMLElement, sizeProperty: "width" | "height") => { + const size = parseInt(getComputedStyle(el).getPropertyValue(sizeProperty)); + const margin = + sizeProperty === "width" + ? parseInt(getComputedStyle(el).getPropertyValue("margin-left")) + + parseInt(getComputedStyle(el).getPropertyValue("margin-right")) + : parseInt(getComputedStyle(el).getPropertyValue("margin-top")) + + parseInt(getComputedStyle(el).getPropertyValue("margin-bottom")); + + return size + margin; +}; const getAvailableSpace = ( container: HTMLElement, - overflowIndicator: HTMLElement + overflowIndicator: HTMLElement, + orientation: orientationType ) => { - const { right: containerRight } = container.getBoundingClientRect(); - const paddingRight = parseInt( - getComputedStyle(container).getPropertyValue("padding-right") - ); - const { right: indicatorRight } = overflowIndicator.getBoundingClientRect(); - return containerRight - paddingRight - indicatorRight; + if (orientation === "horizontal") { + const { right: containerRight } = container.getBoundingClientRect(); + const paddingRight = parseInt( + getComputedStyle(container).getPropertyValue("padding-right") + ); + const { right: indicatorRight } = overflowIndicator.getBoundingClientRect(); + return containerRight - paddingRight - indicatorRight; + } else { + const { bottom: containerBottom } = container.getBoundingClientRect(); + const paddingBottom = parseInt( + getComputedStyle(container).getPropertyValue("padding-bottom") + ); + const { bottom: indicatorBottom } = + overflowIndicator.getBoundingClientRect(); + return containerBottom - paddingBottom - indicatorBottom; + } }; /** @@ -270,16 +293,22 @@ const getAvailableSpace = ( indicaor were removed ? */ export const removeOverflowIndicatorIfNoLongerNeeded = ( - container: HTMLElement + container: HTMLElement, + orientation: orientationType ): boolean => { + const sizeProperty = orientation === "horizontal" ? "width" : "height"; const overflowIndicator = getOverflowIndicator(container); - const availableSpace = getAvailableSpace(container, overflowIndicator); - const indicatorWidth = getElementWidth(overflowIndicator); + const availableSpace = getAvailableSpace( + container, + overflowIndicator, + orientation + ); + const indicatorWidth = getElementSize(overflowIndicator, sizeProperty); const overflowedItem = getOverflowedItem(container); - const overflowWidth = getElementWidth(overflowedItem); + const overflowWidth = getElementSize(overflowedItem, sizeProperty); if (overflowWidth <= availableSpace + indicatorWidth) { - container.classList.remove("overflowed"); + container.classList.remove("vuuOverflowContainer-wrapContainer-overflowed"); overflowedItem.classList.remove("wrapped"); return true; } @@ -315,7 +344,8 @@ const getNonwrappedItemsByPriority = (container: HTMLElement) => */ export const switchWrappedItemIntoView = ( container: HTMLElement, - overflowItem: OverflowItem + overflowItem: OverflowItem, + orientation: orientationType ): [OverflowItem[], OverflowItem[]] => { const unwrappedItems = getNonwrappedItemsByPriority(container); const targetElement = getElementByDataIndex( @@ -325,11 +355,12 @@ export const switchWrappedItemIntoView = ( ); let pos = -1; let unwrappedItem = unwrappedItems.at(pos) as HTMLElement; - const itemWidth = getElementWidth(unwrappedItem); - const targetWidth = getElementWidth(targetElement); + const sizeProperty = orientation === "horizontal" ? "width" : "height"; + const itemWidth = getElementSize(unwrappedItem, sizeProperty); + const targetWidth = getElementSize(targetElement, sizeProperty); const overflowIndicator = getOverflowIndicator(container); let availableSpace = - getAvailableSpace(container, overflowIndicator) + itemWidth; + getAvailableSpace(container, overflowIndicator, orientation) + itemWidth; if (availableSpace >= targetWidth) { switchWrapOnElements(targetElement, unwrappedItem); } else { @@ -351,8 +382,10 @@ export const switchWrappedItemIntoView = ( item.classList.add("wrapped"); }); } - const [nonWrappedItems, wrappedItems] = - getNonWrappedAndWrappedItems(container); + const [nonWrappedItems, wrappedItems] = getNonWrappedAndWrappedItems( + container, + orientation + ); unmarkItemsWhichAreNoLongerWrapped(container, wrappedItems); return [nonWrappedItems, wrappedItems]; }; diff --git a/vuu-ui/packages/vuu-ui-controls/src/overflow-container/useOverflowContainer.ts b/vuu-ui/packages/vuu-ui-controls/src/overflow-container/useOverflowContainer.ts index ffbbd8563..e3048afc8 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/overflow-container/useOverflowContainer.ts +++ b/vuu-ui/packages/vuu-ui-controls/src/overflow-container/useOverflowContainer.ts @@ -24,10 +24,8 @@ import { import { OverflowContainerProps } from "./OverflowContainer"; export interface OverflowContainerHookProps - extends Pick< - OverflowContainerProps, - "allowDragDrop" | "onMoveItem" | "orientation" - > { + extends Pick, + Required> { itemCount: number; onSwitchWrappedItemIntoView?: (overflowItem: OverflowItem) => void; } @@ -37,7 +35,7 @@ export const useOverflowContainer = ({ itemCount, onMoveItem, onSwitchWrappedItemIntoView, - orientation = "horizontal", + orientation, }: OverflowContainerHookProps) => { const [container, setContainer] = useState(null); const wrappedItemsRef = useRef(NO_WRAPPED_ITEMS); @@ -64,7 +62,11 @@ export const useOverflowContainer = ({ "vuuOverflowContainer-wrapContainer" ); if (overflowIndicatorHasWrappedButShouldNotHave(wrapped)) { - wrapped = await correctForWrappedOverflowIndicator(container, wrapped); + wrapped = await correctForWrappedOverflowIndicator( + container, + wrapped, + orientation + ); } while ( highPriorityItemsHaveWrappedButShouldNotHave(nonWrapped, wrapped) @@ -72,11 +74,12 @@ export const useOverflowContainer = ({ [nonWrapped, wrapped] = await correctForWrappedHighPriorityItems( container, nonWrapped, - wrapped + wrapped, + orientation ); } if (wrapped.length === 1) { - if (removeOverflowIndicatorIfNoLongerNeeded(container)) { + if (removeOverflowIndicatorIfNoLongerNeeded(container, orientation)) { wrapped = NO_WRAPPED_ITEMS; } } @@ -119,7 +122,8 @@ export const useOverflowContainer = ({ // TODO do we always want to switch it into view - leave that to caller const [, wrappedItems] = switchWrappedItemIntoView( container, - options.overflowItem + options.overflowItem, + orientation ); wrappedItemsRef.current = wrappedItems; onSwitchWrappedItemIntoView?.(options.overflowItem); @@ -127,7 +131,7 @@ export const useOverflowContainer = ({ return true; }, ]; - }, [container, onSwitchWrappedItemIntoView]); + }, [container, onSwitchWrappedItemIntoView, orientation]); const resizeObserver = useMemo(() => { const { sizeProp } = MEASURES[orientation]; diff --git a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tab.css b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tab.css index 81794c69e..bd4cd0378 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tab.css +++ b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tab.css @@ -1,21 +1,21 @@ /* Class applied to root Tab element */ .vuuTab { - --saltEditableLabel-padding: 0; --saltEditableLabel-height: calc(var(--tabstrip-height) - 2px); --saltInputLegacy-minWidth: 4em; --saltEditableLabel-top: 2px; - --tab-background: var(--vuuTab-background, var(--salt-navigable-primary-background)); + --tab-background: var(--vuuTab-background, transparent); --tab-cursor: pointer; --tab-position: relative; -} -.vuuTab { + align-items: center; align-self: stretch; background: var(--tab-background); - border: none; + border-color: var(--vuuTab-borderColor, transparent); + border-style: var(--vuuTab-borderStyle, none); + border-width: var(--vuuTab-borderWidth, 0px); border-radius: var(--vuuTab-borderRadius, 0); color: var(--salt-text-primary-foreground); cursor: var(--vuuTab-cursor, var(--tab-cursor)); @@ -23,23 +23,15 @@ gap: 8px; height: var(--vuuTabHeight, var(--tab-height)); letter-spacing: var(--vuuTab-letterSpacing, var(--tab-letterSpacing, 0)); + margin: 0 var(--tab-spacing) 0 0; min-width: var(--vuuTab-minWidth, 40px); outline: none; - padding: var(--vuuTab-padding, 0 24px); + padding: var(--vuuTab-padding, 0 var(--salt-spacing-200)); position: var(--vuuTab-position, var(--tab-position)); user-select: none; width: var(--tab-width) } -/* Overrides characteristic used in saltFocusVisible */ -/* .vuuTab.saltFocusVisible:after { - inset: 2px 2px 4px 2px; -} */ - -.vuuTab { - margin: 0 var(--tab-spacing) 0 0; -} - .vuuTab-selected { background: var(--vuuTab-background-selected, var(--tab-background)); color: var(--salt-text-primary-foreground); diff --git a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.css b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.css index 14ef26e00..d006ac8e0 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.css +++ b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.css @@ -1,3 +1,3 @@ .vuuTabMenu { - top: var(--vuuTabMenu-top, -2px); + top: var(--vuuTabMenu-top, 0px); } \ No newline at end of file diff --git a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.tsx b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.tsx index 41e4a9703..db4bf1dc8 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.tsx +++ b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabMenu.tsx @@ -68,14 +68,15 @@ export const TabMenu = ({ return ( ); }; diff --git a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabsTypes.ts b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabsTypes.ts index e75eee04c..2fb658458 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabsTypes.ts +++ b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/TabsTypes.ts @@ -115,6 +115,12 @@ export interface TabstripProps extends HTMLAttributes { * An optional classname that will be added to each tab */ tabClassName?: string; + + /** + * An optional classifier, used to create a classname, intended + * for promary vs secondary bavigation. + */ + variant?: "primary" | "secondary"; } export type exitEditHandler = ( diff --git a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.css b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.css index ae4e409d0..812d0cb2c 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.css +++ b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.css @@ -1,7 +1,8 @@ /* Component class applied to the root element */ .vuuTabstrip { --vuuOverflowContainer-background: transparent; - /* --tabstrip-height: var(--vuuTabstrip-height, var(--salt-size-stackable)); */ + --vuuOverflowContainer-borderColor: var(--salt-container-primary-borderColor); + --vuuOverflowContainer-width: var(--tabstrip-width); --tabstrip-dragging-display: none; --tabstrip-display: inline-flex; --tabstrip-background: transparent; @@ -13,16 +14,14 @@ min-width: 28px; position: relative; overflow: visible; - width: var(--tabstrip-width); } /* Tabstrip orientation is horizontal */ -.vuuTabstrip-horizontal { - --vuuOverflowContainer-borderColor: var(--salt-container-primary-borderColor); +.vuuTabstrip.vuuOrientation-horizontal { --vuuOverflowContainer-borderStyle: none none solid none; --vuuOverflowContainer-borderBottomWidth: 1px; - --tabstrip-height: var(--vuuTabstrip-height, 28px); + --tabstrip-height: var(--vuuTabstrip-height, var(--overflow-wrapper-height,28px)); --tabstrip-width: var(--vuuTabstrip-width, 100%); --tab-height: var(--tabstrip-height); --tab-width: auto; @@ -35,7 +34,7 @@ } /* Tabstrip orientation is vertical */ -.vuuTabstrip-vertical { +.vuuTabstrip.vuuOrientation-vertical { --tabstrip-height: var(--vuuTabstrip-height, 100%); --tabstrip-width: var(--vuuTabstrip-width, 100px); --tab-height: 50px; @@ -79,7 +78,7 @@ line-height: var(--tabstrip-height); } -.vuuTabstrip-vertical .vuuTabstrip-inner { +.vuuTabstrip.vuuOrientation-vertical .vuuTabstrip-inner { flex-direction: column; height: auto; } diff --git a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.tsx b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.tsx index be5c25dd3..85f171c8a 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.tsx +++ b/vuu-ui/packages/vuu-ui-controls/src/tabstrip/Tabstrip.tsx @@ -30,6 +30,7 @@ export const Tabstrip = ({ showTabMenuButton, style: styleProp, tabClassName, + variant = "secondary", ...htmlAttributes }: TabstripProps) => { const rootRef = useRef(null); @@ -55,7 +56,7 @@ export const Tabstrip = ({ orientation, }); const id = useId(idProp); - const className = cx(classBase, `${classBase}-${orientation}`, classNameProp); + const className = cx(classBase, classNameProp); const style = styleProp || containerStyle ? { @@ -101,6 +102,7 @@ export const Tabstrip = ({ {...tabstripHook.navigationProps} aria-label="Create Tab" className={`${classBase}-addTabButton`} + data-embedded icon="add" data-overflow-priority="1" key="addButton" @@ -135,8 +137,7 @@ export const Tabstrip = ({ buildPackage(packageName)); diff --git a/vuu-ui/scripts/build-themes.mjs b/vuu-ui/scripts/build-themes.mjs new file mode 100644 index 000000000..8d4c22b54 --- /dev/null +++ b/vuu-ui/scripts/build-themes.mjs @@ -0,0 +1,26 @@ +import { execWait, getCommandLineArg, withArgs } from "./utils.mjs"; + +const jsonOutput = getCommandLineArg("json", false); + +export const buildAll = async () => { + const buildPackage = async (packageName) => + execWait( + `npm run --silent build${withArgs("dev", "debug")}`, + `themes/${packageName}` + ); + + // TODO determine the dependency graph/build order programatically + const packages = ["tar-theme"]; + + if (jsonOutput) { + console.log( + JSON.stringify({ + "package-list": packages, + }) + ); + } + + await Promise.all(packages.map(buildPackage)); +}; + +buildAll(); diff --git a/vuu-ui/showcase/icon512.png b/vuu-ui/showcase/icon512.png new file mode 100644 index 000000000..3f46c9d48 Binary files /dev/null and b/vuu-ui/showcase/icon512.png differ diff --git a/vuu-ui/showcase/manifest.json b/vuu-ui/showcase/manifest.json new file mode 100644 index 000000000..0f2b677a4 --- /dev/null +++ b/vuu-ui/showcase/manifest.json @@ -0,0 +1,17 @@ +{ + "lang": "en-us", + "name": "Vuu Showcase", + "short_name": "Vuu showcase", + "description": "A showcase for Vuu components, patterns and documentation", + "start_url": "/", + "background_color": "red", + "theme_color": "green", + "orientation": "any", + "display": "standalone", + "icons": [ + { + "src": "/icon512.png", + "sizes": "512x512" + } + ] +} diff --git a/vuu-ui/showcase/src/examples/Layout/Toolbar.examples.tsx b/vuu-ui/showcase/src/examples/Layout/Toolbar.examples.tsx index e9876d923..bd06bb94c 100644 --- a/vuu-ui/showcase/src/examples/Layout/Toolbar.examples.tsx +++ b/vuu-ui/showcase/src/examples/Layout/Toolbar.examples.tsx @@ -25,7 +25,6 @@ export const DefaulToolbar = () => { } > { } > { > { > { > { } > { } > { } > { } > { scrollingApiRef={scrollingAPI} width={1000} /> - + diff --git a/vuu-ui/showcase/src/examples/Table/Table.examples.tsx b/vuu-ui/showcase/src/examples/Table/Table.examples.tsx index 0bcb37474..2f2728489 100644 --- a/vuu-ui/showcase/src/examples/Table/Table.examples.tsx +++ b/vuu-ui/showcase/src/examples/Table/Table.examples.tsx @@ -153,7 +153,7 @@ export const ControlledNavigation = () => { return ( <> - + diff --git a/vuu-ui/showcase/src/examples/Layout/OverflowContainer.examples.css b/vuu-ui/showcase/src/examples/UiControls/OverflowContainer.examples.css similarity index 55% rename from vuu-ui/showcase/src/examples/Layout/OverflowContainer.examples.css rename to vuu-ui/showcase/src/examples/UiControls/OverflowContainer.examples.css index b49635ca1..dee66a7cc 100644 --- a/vuu-ui/showcase/src/examples/Layout/OverflowContainer.examples.css +++ b/vuu-ui/showcase/src/examples/UiControls/OverflowContainer.examples.css @@ -1,17 +1,13 @@ .Item { background-color: var(--item-bg, blue); color: white; - height: 32px; + height: var(--salt-size-base); } -.vuuOverflowContainer-vertical .Item { +.vuuOverflowContainer.vuuOrientation-vertical .Item { width: 100%; } [data-overflow-priority="1"].Item { background-color: pink; } - -.vuuOverflowContainer-wrapContainer { - /* overflow: visible; */ -} \ No newline at end of file diff --git a/vuu-ui/showcase/src/examples/Layout/OverflowContainer.examples.tsx b/vuu-ui/showcase/src/examples/UiControls/OverflowContainer.examples.tsx similarity index 91% rename from vuu-ui/showcase/src/examples/Layout/OverflowContainer.examples.tsx rename to vuu-ui/showcase/src/examples/UiControls/OverflowContainer.examples.tsx index 413049800..37c93b992 100644 --- a/vuu-ui/showcase/src/examples/Layout/OverflowContainer.examples.tsx +++ b/vuu-ui/showcase/src/examples/UiControls/OverflowContainer.examples.tsx @@ -19,7 +19,7 @@ export const DefaultOverflowContainer = () => { } as CSSProperties } > - +
@@ -60,7 +60,7 @@ export const WrapOverflowContainerFlexLayout = () => { style={{ flex: 1, flexDirection: "column", background: "#ccc" }} > {/* prettier-ignore */} - +
1
2
3
@@ -69,7 +69,7 @@ export const WrapOverflowContainerFlexLayout = () => {
6
{/* prettier-ignore */} - +
1
2
3
@@ -79,7 +79,7 @@ export const WrapOverflowContainerFlexLayout = () => {
7
{/* prettier-ignore */} - +
1
2
3
@@ -129,7 +129,7 @@ export const OverflowContainerHighPriorityItem = () => { style={{ flex: 1, flexDirection: "column", background: "#ccc" }} > {/* prettier-ignore */} - +
1
2
3
@@ -138,7 +138,7 @@ export const OverflowContainerHighPriorityItem = () => {
6
{/* prettier-ignore */} - +
1
2
3
@@ -147,7 +147,7 @@ export const OverflowContainerHighPriorityItem = () => {
6
{/* prettier-ignore */} - +
1
2
3
@@ -161,7 +161,7 @@ export const OverflowContainerHighPriorityItem = () => {
11
{/* prettier-ignore */} - +
1
2
3
@@ -189,11 +189,7 @@ export const TestFixtureSimpleOverflowContainer = ({ width = 600 }) => { return ( <> - +
@@ -240,9 +236,8 @@ export const SortableOverflowContainer = () => { > {items.map((item) => (
@@ -283,7 +278,7 @@ export const VerticalOverflowContainerFlexLayout = () => { style={{ background: "lightcyan", flex: 1, overflow: "hidden" }} > {/* prettier-ignore */} - +
1
2
3
diff --git a/vuu-ui/showcase/src/examples/UiControls/Tabstrip.examples.tsx b/vuu-ui/showcase/src/examples/UiControls/Tabstrip.examples.tsx index a2b789ebc..d1c219cbe 100644 --- a/vuu-ui/showcase/src/examples/UiControls/Tabstrip.examples.tsx +++ b/vuu-ui/showcase/src/examples/UiControls/Tabstrip.examples.tsx @@ -1,4 +1,9 @@ -import { ExitEditModeHandler, Tab, Tabstrip } from "@finos/vuu-ui-controls"; +import { + ExitEditModeHandler, + Tab, + Tabstrip, + TabstripProps, +} from "@finos/vuu-ui-controls"; import { moveItem } from "@finos/vuu-utils"; import { useCallback, useState } from "react"; import { FlexboxLayout, LayoutProvider } from "@finos/vuu-layout"; @@ -9,9 +14,85 @@ const SPLITTER_WIDTH = 3; let displaySequence = 1; -export const DefaultTabstripNext = ({ +export const DefaultTabstrip = ({ + activeTabIndex: activeTabIndexProp = 0, + width = 500, +}) => { + const [activeTabIndex, setActiveTabIndex] = useState(activeTabIndexProp); + const tabs = ["Home", "Transactions", "Loans", "Checks", "Liquidity"]; + return ( + + +
+ + {tabs.map((label, i) => ( + + ))} + +
+
+ + + ); +}; + +DefaultTabstrip.displaySequence = displaySequence++; + +export const OveflowingTabstrip = ({ + activeTabIndex: activeTabIndexProp = 0, + width = 350, +}) => { + const [activeTabIndex, setActiveTabIndex] = useState(activeTabIndexProp); + const tabs = ["Home", "Transactions", "Loans", "Checks", "Liquidity"]; + return ( + + +
+ + {tabs.map((label, i) => ( + + ))} + +
+
+ + + ); +}; + +OveflowingTabstrip.displaySequence = displaySequence++; + +export const OveflowingSelectedTab = ({ activeTabIndex: activeTabIndexProp = 4, - width = 700, + width = 350, }) => { const [activeTabIndex, setActiveTabIndex] = useState(activeTabIndexProp); const tabs = ["Home", "Transactions", "Loans", "Checks", "Liquidity"]; @@ -45,9 +126,9 @@ export const DefaultTabstripNext = ({ ); }; -DefaultTabstripNext.displaySequence = displaySequence++; +OveflowingSelectedTab.displaySequence = displaySequence++; -export const TabstripNextAddTab = ({ width = 700 }) => { +export const TabstripAddTab = ({ width = 700 }) => { const [activeTabIndex, setActiveTabIndex] = useState(0); const [tabs, setTabs] = useState([{ label: "Home" }]); @@ -89,9 +170,9 @@ export const TabstripNextAddTab = ({ width = 700 }) => { ); }; -TabstripNextAddTab.displaySequence = displaySequence++; +TabstripAddTab.displaySequence = displaySequence++; -export const TabstripNextRemoveTab = ({ width = 700 }) => { +export const TabstripRemoveTab = ({ width = 700 }) => { const [activeTabIndex, setActiveTabIndex] = useState(0); const [tabs, setTabs] = useState([{ label: "Home" }]); @@ -142,9 +223,9 @@ export const TabstripNextRemoveTab = ({ width = 700 }) => { ); }; -TabstripNextRemoveTab.displaySequence = displaySequence++; +TabstripRemoveTab.displaySequence = displaySequence++; -export const TabstripNextEditableLabels = ({ +export const TabstripEditableLabels = ({ activeTabIndex: activeTabIndexProp = 0, width = 700, }) => { @@ -190,17 +271,11 @@ export const TabstripNextEditableLabels = ({ ); }; -TabstripNextEditableLabels.displaySequence = displaySequence++; +TabstripEditableLabels.displaySequence = displaySequence++; -export const TabstripNextDragDrop = ({ width = 700 }) => { +export const TabstripDragDrop = ({ width = 700 }) => { const [activeTabIndex, setActiveTabIndex] = useState(0); - const [tabs, setTabs] = useState([ - "Home", - "Transactions", - "Loans", - "Checks", - "Liquidity", - ]); + const [tabs, setTabs] = useState(["Home", "Transactions", "Loans", "Checks"]); const handleDrop = useCallback((fromIndex: number, toIndex: number) => { setTabs((tabs) => moveItem(tabs, fromIndex, toIndex)); @@ -238,7 +313,83 @@ export const TabstripNextDragDrop = ({ width = 700 }) => { ); }; -TabstripNextDragDrop.displaySequence = displaySequence++; +TabstripDragDrop.displaySequence = displaySequence++; + +const TabstripBase = (props: Partial) => { + const [activeTabIndex, setActiveTabIndex] = useState(0); + const [tabs, setTabs] = useState([ + "Home", + "Transactions", + "Loans", + "Checks", + "Liquidity", + ]); + + const handleDrop = useCallback((fromIndex: number, toIndex: number) => { + setTabs((tabs) => moveItem(tabs, fromIndex, toIndex)); + }, []); + return ( + + {tabs.map((label, i) => ( + + ))} + + ); +}; + +export const TabstripVariations = () => { + return ( +
+ Primary + + + + + + + + + Secondary + + + + + + + +
+ ); +}; + +TabstripVariations.displaySequence = displaySequence++; /* const CloseTabWarningDialog = ({ diff --git a/vuu-ui/showcase/src/examples/UiControls/index.ts b/vuu-ui/showcase/src/examples/UiControls/index.ts index 430504685..b7cc4f594 100644 --- a/vuu-ui/showcase/src/examples/UiControls/index.ts +++ b/vuu-ui/showcase/src/examples/UiControls/index.ts @@ -7,6 +7,7 @@ export * as EditableLabel from "./EditableLabel.examples"; export * as InstrumentPicker from "./InstrumentPicker.examples"; export * as InstrumentSearch from "./InstrumentSearch.examples"; export * as List from "./List.examples"; +export * as OverflowContainer from "./OverflowContainer.examples"; export * as Tree from "./Tree.examples"; export * as SplitButton from "./SplitButton.examples"; export * as Tabstrip from "./Tabstrip.examples"; diff --git a/vuu-ui/showcase/src/examples/salt/Button.examples.tsx b/vuu-ui/showcase/src/examples/salt/Button.examples.tsx index 8a04048ec..d0d6adb29 100644 --- a/vuu-ui/showcase/src/examples/salt/Button.examples.tsx +++ b/vuu-ui/showcase/src/examples/salt/Button.examples.tsx @@ -50,21 +50,27 @@ export const ButtonVariations = () => { alignItems: "center", display: "grid", gap: 20, - gridTemplateColumns: "1fr 1fr 1fr 1fr", + gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr", justifyItems: "left", }} > + CTA Primary Secondary - CTA + Embedded + - + + - active + { icon="filter" variant="secondary" /> - + active + - disabled + - + disabled + - diff --git a/vuu-ui/themes/tar-theme/NunitoSans.css b/vuu-ui/themes/tar-theme/NunitoSans.css new file mode 100644 index 000000000..a046ad4a9 --- /dev/null +++ b/vuu-ui/themes/tar-theme/NunitoSans.css @@ -0,0 +1,71 @@ +/* latin */ +@font-face { + font-family: 'Nunito Sans'; + font-style: normal; + font-weight: 300; + font-stretch: 100%; + font-display: swap; + src: url(./fonts/NunitoSansv15Latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Nunito Sans'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + font-display: swap; + src: url(./fonts/NunitoSansv15Latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Nunito Sans'; + font-style: normal; + font-weight: 500; + font-stretch: 100%; + font-display: swap; + src: url(./fonts/NunitoSansv15Latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Nunito Sans'; + font-style: normal; + font-weight: 600; + font-stretch: 100%; + font-display: swap; + src: url(./fonts/NunitoSansv15Latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Nunito Sans'; + font-style: normal; + font-weight: 700; + font-stretch: 100%; + font-display: swap; + src: url(./fonts/NunitoSansv15Latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin */ +@font-face { + font-family: 'Nunito Sans'; + font-style: normal; + font-weight: 800; + font-stretch: 100%; + font-display: swap; + src: url(./fonts/NunitoSansv15Latin.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* This font contains the variation of the 'a' character, which can be applied with `font-feature-settings` as per Figma */ +@font-face { + font-family: 'Nunito Sans A-Variant'; + src: url('./fonts/NunitoSans-Regular.woff') format('opentype'); +} diff --git a/vuu-ui/themes/tar-theme/SomeTypeMono.css b/vuu-ui/themes/tar-theme/SomeTypeMono.css new file mode 100644 index 000000000..3db9d6d66 --- /dev/null +++ b/vuu-ui/themes/tar-theme/SomeTypeMono.css @@ -0,0 +1,8 @@ +@font-face { + font-family: 'Sometype Mono'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(./fonts/SomeTypeMonov1-500.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/css/characteristics/accent.css b/vuu-ui/themes/tar-theme/css/characteristics/accent.css new file mode 100644 index 000000000..df7a915aa --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/accent.css @@ -0,0 +1,5 @@ +.tar-theme { + --salt-accent-background: var(--salt-palette-accent-background); + --salt-accent-borderColor: var(--salt-palette-accent-border); + --salt-accent-foreground: var(--salt-palette-accent-foreground); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/actionable.css b/vuu-ui/themes/tar-theme/css/characteristics/actionable.css new file mode 100644 index 000000000..faefaf382 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/actionable.css @@ -0,0 +1,35 @@ +.tar-theme { + --salt-actionable-cursor-hover: pointer; + --salt-actionable-cursor-active: pointer; + --salt-actionable-cursor-disabled: not-allowed; + + /* Primary variant */ + --salt-actionable-primary-foreground: var(--salt-palette-interact-primary-foreground); + --salt-actionable-primary-foreground-hover: var(--salt-palette-interact-primary-foreground-hover); + --salt-actionable-primary-foreground-active: var(--salt-palette-interact-primary-foreground-active); + --salt-actionable-primary-foreground-disabled: var(--salt-palette-interact-primary-foreground-disabled); + --salt-actionable-primary-background: var(--salt-palette-interact-primary-background); + --salt-actionable-primary-background-hover: var(--salt-palette-interact-primary-background-hover); + --salt-actionable-primary-background-active: var(--salt-palette-interact-primary-background-active); + --salt-actionable-primary-background-disabled: var(--salt-palette-interact-primary-background-disabled); + + /* CTA variant */ + --salt-actionable-cta-foreground: var(--salt-palette-interact-cta-foreground); + --salt-actionable-cta-foreground-hover: var(--salt-palette-interact-cta-foreground-hover); + --salt-actionable-cta-foreground-active: var(--salt-palette-interact-cta-foreground-active); + --salt-actionable-cta-foreground-disabled: var(--salt-palette-interact-cta-foreground-disabled); + --salt-actionable-cta-background: var(--salt-palette-interact-cta-background); + --salt-actionable-cta-background-hover: var(--salt-palette-interact-cta-background-hover); + --salt-actionable-cta-background-active: var(--salt-palette-interact-cta-background-active); + --salt-actionable-cta-background-disabled: var(--salt-palette-interact-cta-background-disabled); + + /* Secondary variant */ + --salt-actionable-secondary-foreground: var(--salt-palette-interact-secondary-foreground); + --salt-actionable-secondary-foreground-hover: var(--salt-palette-interact-secondary-foreground-hover); + --salt-actionable-secondary-foreground-active: var(--salt-palette-interact-secondary-foreground-active); + --salt-actionable-secondary-foreground-disabled: var(--salt-palette-interact-secondary-foreground-disabled); + --salt-actionable-secondary-background: var(--salt-palette-interact-secondary-background); + --salt-actionable-secondary-background-hover: var(--salt-palette-interact-secondary-background-hover); + --salt-actionable-secondary-background-active: var(--salt-palette-interact-secondary-background-active); + --salt-actionable-secondary-background-disabled: var(--salt-palette-interact-secondary-background-disabled); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/container.css b/vuu-ui/themes/tar-theme/css/characteristics/container.css new file mode 100644 index 000000000..623bca463 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/container.css @@ -0,0 +1,13 @@ +.tar-theme { + --salt-container-borderStyle: solid; + + --salt-container-primary-background: var(--salt-palette-neutral-primary-background); + --salt-container-primary-background-disabled: var(--salt-palette-neutral-primary-background-disabled); + --salt-container-primary-borderColor: var(--salt-palette-neutral-primary-border); + --salt-container-primary-borderColor-disabled: var(--salt-palette-neutral-primary-border-disabled); + + --salt-container-secondary-background: var(--salt-palette-neutral-secondary-background); + --salt-container-secondary-background-disabled: var(--salt-palette-neutral-secondary-background-disabled); + --salt-container-secondary-borderColor: var(--salt-palette-neutral-secondary-border); + --salt-container-secondary-borderColor-disabled: var(--salt-palette-neutral-secondary-border-disabled); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/content.css b/vuu-ui/themes/tar-theme/css/characteristics/content.css new file mode 100644 index 000000000..2a8f7d5b7 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/content.css @@ -0,0 +1,12 @@ +.tar-theme { + /* Colors */ + --salt-content-primary-foreground: var(--salt-palette-neutral-primary-foreground); + --salt-content-primary-foreground-disabled: var(--salt-palette-neutral-primary-foreground-disabled); + --salt-content-secondary-foreground: var(--salt-palette-neutral-secondary-foreground); + --salt-content-secondary-foreground-disabled: var(--salt-palette-neutral-secondary-foreground-disabled); + + --salt-content-foreground-hover: var(--salt-palette-navigate-foreground-hover); + --salt-content-foreground-active: var(--salt-palette-navigate-foreground-active); + --salt-content-foreground-visited: var(--salt-palette-navigate-foreground-visited); + --salt-content-foreground-highlight: var(--salt-palette-interact-background-active); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/draggable.css b/vuu-ui/themes/tar-theme/css/characteristics/draggable.css new file mode 100644 index 000000000..dc8490a58 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/draggable.css @@ -0,0 +1,10 @@ +.tar-theme { + --salt-draggable-horizontal-cursor-hover: row-resize; + --salt-draggable-horizontal-cursor-active: row-resize; + + --salt-draggable-vertical-cursor-hover: col-resize; + --salt-draggable-vertical-cursor-active: col-resize; + + --salt-draggable-grab-cursor-hover: grab; + --salt-draggable-grab-cursor-active: grabbing; +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/editable.css b/vuu-ui/themes/tar-theme/css/characteristics/editable.css new file mode 100644 index 000000000..22db4fe86 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/editable.css @@ -0,0 +1,33 @@ +.tar-theme { + --salt-editable-cursor-hover: text; + --salt-editable-cursor-active: text; + --salt-editable-cursor-disabled: not-allowed; + --salt-editable-cursor-readonly: text; + + --salt-editable-borderStyle: solid; + --salt-editable-borderStyle-hover: solid; + --salt-editable-borderStyle-active: solid; + --salt-editable-borderStyle-disabled: solid; + --salt-editable-borderStyle-readonly: solid; + --salt-editable-borderWidth-active: 2px; + + --salt-editable-borderColor: var(--salt-palette-interact-border); + --salt-editable-borderColor-active: var(--salt-palette-interact-border-active); + --salt-editable-borderColor-disabled: var(--salt-palette-interact-border-disabled); + --salt-editable-borderColor-hover: var(--salt-palette-interact-border-hover); + --salt-editable-borderColor-readonly: var(--salt-palette-interact-border-readonly); + + --salt-editable-primary-background: var(--salt-palette-neutral-primary-background); + --salt-editable-primary-background-active: var(--salt-palette-neutral-primary-background); + --salt-editable-primary-background-disabled: var(--salt-palette-neutral-primary-background-disabled); + --salt-editable-primary-background-hover: var(--salt-palette-neutral-primary-background); + --salt-editable-primary-background-readonly: var(--salt-palette-neutral-primary-background-readonly); + + --salt-editable-secondary-background: var(--salt-palette-neutral-secondary-background); + --salt-editable-secondary-background-active: var(--salt-palette-neutral-secondary-background); + --salt-editable-secondary-background-disabled: var(--salt-palette-neutral-secondary-background-disabled); + --salt-editable-secondary-background-hover: var(--salt-palette-neutral-secondary-background); + --salt-editable-secondary-background-readonly: var(--salt-palette-neutral-secondary-background-readonly); + + --salt-editable-help-fontStyle: italic; +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/focused.css b/vuu-ui/themes/tar-theme/css/characteristics/focused.css new file mode 100644 index 000000000..1345167a0 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/focused.css @@ -0,0 +1,21 @@ +.tar-theme { + --salt-focused-outlineColor: var(--salt-palette-interact-outline); + --salt-focused-outlineStyle: dotted; + --salt-focused-outlineWidth: 2px; + --salt-focused-outlineInset: 0; + --salt-focused-outlineOffset: 0; + + --salt-focused-outline: var(--salt-focused-outlineWidth) var(--salt-focused-outlineStyle) var(--salt-focused-outlineColor); /* CSS shortcut token: not in Figma */ +} + +.saltFocusVisible:after, +.focused:focus:after, +.focused:focus-visible:after { + content: ""; + inset: var(--salt-focused-outlineInset); + outline-color: var(--salt-focused-outlineColor); + outline-offset: var(--salt-focused-outlineOffset); + outline-style: var(--salt-focused-outlineStyle); + outline-width: var(--salt-focused-outlineWidth); + position: absolute; +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/navigable.css b/vuu-ui/themes/tar-theme/css/characteristics/navigable.css new file mode 100644 index 000000000..4a963e2d1 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/navigable.css @@ -0,0 +1,21 @@ +.tar-theme { + --salt-navigable-cursor-active: pointer; + --salt-navigable-cursor-hover: pointer; + --salt-navigable-cursor-disabled: not-allowed; + --salt-navigable-cursor-edit: text; + + --salt-navigable-fontWeight: var(--salt-typography-fontWeight-regular); + --salt-navigable-fontWeight-hover: var(--salt-typography-fontWeight-regular); + --salt-navigable-fontWeight-active: var(--salt-typography-fontWeight-semiBold); + --salt-navigable-fontWeight-edit: var(--salt-typography-fontWeight-regular); + + --salt-navigable-indicator-hover: var(--salt-palette-navigate-indicator-hover); + --salt-navigable-indicator-active: var(--salt-palette-navigate-indicator-active); + + --salt-navigable-background-hover: var(--salt-palette-navigate-primary-background-hover); + + /* Link */ + --salt-navigable-textDecoration: underline; + --salt-navigable-textDecoration-hover: none; + --salt-navigable-textDecoration-selected: underline; +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/overlayable.css b/vuu-ui/themes/tar-theme/css/characteristics/overlayable.css new file mode 100644 index 000000000..2efc63218 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/overlayable.css @@ -0,0 +1,11 @@ +.tar-theme { + --salt-overlayable-shadow-scroll: var(--salt-shadow-100); + --salt-overlayable-shadow-region: var(--salt-shadow-200); + --salt-overlayable-shadow: var(--salt-shadow-200); + --salt-overlayable-shadow-hover: var(--salt-shadow-300); + --salt-overlayable-shadow-popout: var(--salt-shadow-400); + --salt-overlayable-shadow-drag: var(--salt-shadow-400); + --salt-overlayable-shadow-modal: var(--salt-shadow-500); + + --salt-overlayable-background: var(--salt-palette-neutral-backdrop); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/selectable.css b/vuu-ui/themes/tar-theme/css/characteristics/selectable.css new file mode 100644 index 000000000..3b62fb504 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/selectable.css @@ -0,0 +1,31 @@ +.tar-theme { + --salt-selectable-cursor-hover: pointer; + --salt-selectable-cursor-selected: pointer; + --salt-selectable-cursor-blurSelected: pointer; + --salt-selectable-cursor-disabled: not-allowed; + --salt-selectable-cursor-readonly: not-allowed; + + --salt-selectable-borderStyle: solid; + --salt-selectable-borderStyle-hover: solid; + --salt-selectable-borderStyle-selected: solid; + --salt-selectable-borderStyle-blurSelected: solid; + + --salt-selectable-borderColor: var(--salt-palette-interact-border); + --salt-selectable-borderColor-hover: var(--salt-palette-interact-border-hover); + --salt-selectable-borderColor-selected: var(--salt-palette-interact-border-active); + --salt-selectable-borderColor-selectedDisabled: var(--salt-palette-interact-border-activeDisabled); + --salt-selectable-borderColor-disabled: var(--salt-palette-interact-border-disabled); + --salt-selectable-borderColor-readonly: var(--salt-palette-interact-border-readonly); + + --salt-selectable-foreground: var(--salt-palette-interact-foreground); + --salt-selectable-foreground-disabled: var(--salt-palette-interact-foreground-disabled); + --salt-selectable-foreground-hover: var(--salt-palette-interact-foreground-hover); + --salt-selectable-foreground-selected: var(--salt-palette-interact-foreground-active); + --salt-selectable-foreground-selectedDisabled: var(--salt-palette-interact-foreground-activeDisabled); + --salt-selectable-background: var(--salt-palette-interact-background); + --salt-selectable-background-hover: var(--salt-palette-interact-background-hover); + --salt-selectable-background-selected: var(--salt-palette-interact-background-active); + --salt-selectable-background-blurSelected: var(--salt-palette-interact-background-blurSelected); + --salt-selectable-background-disabled: var(--salt-palette-interact-background-disabled); + --salt-selectable-background-selectedDisabled: var(--salt-palette-interact-background-activeDisabled); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/separable.css b/vuu-ui/themes/tar-theme/css/characteristics/separable.css new file mode 100644 index 000000000..4fe4734ac --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/separable.css @@ -0,0 +1,7 @@ +.tar-theme { + --salt-separable-borderStyle: solid; + + --salt-separable-primary-borderColor: var(--salt-palette-neutral-primary-separator); + --salt-separable-secondary-borderColor: var(--salt-palette-neutral-secondary-separator); + --salt-separable-tertiary-borderColor: var(--salt-palette-neutral-tertiary-separator); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/status.css b/vuu-ui/themes/tar-theme/css/characteristics/status.css new file mode 100644 index 000000000..26b748b21 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/status.css @@ -0,0 +1,23 @@ +.tar-theme { + --salt-status-info-foreground: var(--salt-palette-info-foreground); + --salt-status-success-foreground: var(--salt-palette-success-foreground); + --salt-status-warning-foreground: var(--salt-palette-warning-foreground); + --salt-status-error-foreground: var(--salt-palette-error-foreground); + --salt-status-static-foreground: var(--salt-palette-neutral-secondary-foreground); + --salt-status-negative-foreground: var(--salt-palette-negative-foreground); + --salt-status-positive-foreground: var(--salt-palette-positive-foreground); + + --salt-status-info-borderColor: var(--salt-palette-info-border); + --salt-status-success-borderColor: var(--salt-palette-success-border); + --salt-status-warning-borderColor: var(--salt-palette-warning-border); + --salt-status-error-borderColor: var(--salt-palette-error-border); + + --salt-status-info-background: var(--salt-palette-info-background); + --salt-status-success-background: var(--salt-palette-success-background); + --salt-status-warning-background: var(--salt-palette-warning-background); + --salt-status-error-background: var(--salt-palette-error-background); + + --salt-status-success-background-selected: var(--salt-palette-success-background-selected); + --salt-status-warning-background-selected: var(--salt-palette-warning-background-selected); + --salt-status-error-background-selected: var(--salt-palette-error-background-selected); +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/target.css b/vuu-ui/themes/tar-theme/css/characteristics/target.css new file mode 100644 index 000000000..931e28d56 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/target.css @@ -0,0 +1,10 @@ +.tar-theme { + --salt-target-background-hover: var(--salt-palette-interact-background-hover); + + --salt-target-borderColor-hover: var(--salt-palette-interact-border-hover); + --salt-target-borderStyle: dashed; + --salt-target-borderStyle-hover: solid; + --salt-target-borderStyle-disabled: dashed; + + --salt-target-cursor-disabled: not-allowed; +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/text.css b/vuu-ui/themes/tar-theme/css/characteristics/text.css new file mode 100644 index 000000000..ae0bd7022 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/text.css @@ -0,0 +1,208 @@ +.tar-theme { + /* Misc */ + --salt-text-letterSpacing: 0; + --salt-text-textAlign: left; + --salt-text-textAlign-embedded: center; + --salt-text-textDecoration: none; + --salt-text-textTransform: none; + + /* Action */ + --salt-text-action-letterSpacing: 0.6px; + --salt-text-action-textTransform: uppercase; + --salt-text-action-textAlign: center; + --salt-text-action-fontWeight: var(--salt-typography-fontWeight-semiBold); + + /* Body text (should be used as default) */ + --salt-text-fontFamily: var(--salt-typography-fontFamily); + --salt-text-fontWeight: var(--salt-typography-fontWeight-regular); + --salt-text-fontWeight-small: var(--salt-typography-fontWeight-light); + --salt-text-fontWeight-strong: var(--salt-typography-fontWeight-semiBold); + + /* Notation */ + --salt-text-notation-fontFamily: var(--salt-typography-fontFamily); + --salt-text-notation-fontWeight: var(--salt-typography-fontWeight-semiBold); + --salt-text-notation-fontWeight-small: var(--salt-typography-fontWeight-regular); + --salt-text-notation-fontWeight-strong: var(--salt-typography-fontWeight-bold); + + /* H1 */ + --salt-text-h1-fontFamily: var(--salt-typography-fontFamily); + --salt-text-h1-fontWeight: var(--salt-typography-fontWeight-bold); + --salt-text-h1-fontWeight-small: var(--salt-typography-fontWeight-medium); + --salt-text-h1-fontWeight-strong: var(--salt-typography-fontWeight-extraBold); + + /* H2 */ + --salt-text-h2-fontFamily: var(--salt-typography-fontFamily); + --salt-text-h2-fontWeight: var(--salt-typography-fontWeight-semiBold); + --salt-text-h2-fontWeight-small: var(--salt-typography-fontWeight-regular); + --salt-text-h2-fontWeight-strong: var(--salt-typography-fontWeight-bold); + + /* H3 */ + --salt-text-h3-fontFamily: var(--salt-typography-fontFamily); + --salt-text-h3-fontWeight: var(--salt-typography-fontWeight-semiBold); + --salt-text-h3-fontWeight-small: var(--salt-typography-fontWeight-regular); + --salt-text-h3-fontWeight-strong: var(--salt-typography-fontWeight-bold); + + /* H4 */ + --salt-text-h4-fontFamily: var(--salt-typography-fontFamily); + --salt-text-h4-fontWeight: var(--salt-typography-fontWeight-semiBold); + --salt-text-h4-fontWeight-small: var(--salt-typography-fontWeight-regular); + --salt-text-h4-fontWeight-strong: var(--salt-typography-fontWeight-bold); + + /* Label */ + --salt-text-label-fontFamily: var(--salt-typography-fontFamily); + --salt-text-label-fontWeight: var(--salt-typography-fontWeight-regular); + --salt-text-label-fontWeight-small: var(--salt-typography-fontWeight-light); + --salt-text-label-fontWeight-strong: var(--salt-typography-fontWeight-semiBold); + + /* Display text */ + --salt-text-display1-fontFamily: var(--salt-typography-fontFamily); + --salt-text-display1-fontWeight: var(--salt-typography-fontWeight-semiBold); + --salt-text-display1-fontWeight-strong: var(--salt-typography-fontWeight-bold); + --salt-text-display1-fontWeight-small: var(--salt-typography-fontWeight-regular); + + --salt-text-display2-fontFamily: var(--salt-typography-fontFamily); + --salt-text-display2-fontWeight: var(--salt-typography-fontWeight-semiBold); + --salt-text-display2-fontWeight-strong: var(--salt-typography-fontWeight-bold); + --salt-text-display2-fontWeight-small: var(--salt-typography-fontWeight-regular); + + --salt-text-display3-fontFamily: var(--salt-typography-fontFamily); + --salt-text-display3-fontWeight: var(--salt-typography-fontWeight-semiBold); + --salt-text-display3-fontWeight-strong: var(--salt-typography-fontWeight-bold); + --salt-text-display3-fontWeight-small: var(--salt-typography-fontWeight-regular); + + /* Code */ + --salt-text-code-fontFamily: var(--salt-typography-fontFamily-code); +} + +/* Sizes by density */ +.tar-density-touch { + --salt-text-h1-fontSize: 42px; + --salt-text-h1-lineHeight: 54px; + + --salt-text-h2-fontSize: 32px; + --salt-text-h2-lineHeight: 42px; + + --salt-text-h3-fontSize: 24px; + --salt-text-h3-lineHeight: 32px; + + --salt-text-h4-fontSize: 16px; + --salt-text-h4-lineHeight: 20px; + + --salt-text-label-fontSize: 14px; + --salt-text-label-lineHeight: 18px; + + --salt-text-fontSize: 16px; + --salt-text-lineHeight: 20px; + --salt-text-minHeight: 20px; + + --salt-text-display1-fontSize: 84px; + --salt-text-display1-lineHeight: 109px; + + --salt-text-display2-fontSize: 58px; + --salt-text-display2-lineHeight: 76px; + + --salt-text-display3-fontSize: 42px; + --salt-text-display3-lineHeight: 54px; + + --salt-text-notation-fontSize: 14px; + --salt-text-notation-lineHeight: 18px; +} + +.tar-density-low { + --salt-text-h1-fontSize: 32px; + --salt-text-h1-lineHeight: 42px; + + --salt-text-h2-fontSize: 24px; + --salt-text-h2-lineHeight: 32px; + + --salt-text-h3-fontSize: 18px; + --salt-text-h3-lineHeight: 24px; + + --salt-text-h4-fontSize: 14px; + --salt-text-h4-lineHeight: 18px; + + --salt-text-label-fontSize: 12px; + --salt-text-label-lineHeight: 16px; + + --salt-text-fontSize: 14px; + --salt-text-lineHeight: 18px; + --salt-text-minHeight: 18px; + + --salt-text-display1-fontSize: 68px; + --salt-text-display1-lineHeight: 88px; + + --salt-text-display2-fontSize: 46px; + --salt-text-display2-lineHeight: 60px; + + --salt-text-display3-fontSize: 32px; + --salt-text-display3-lineHeight: 42px; + + --salt-text-notation-fontSize: 12px; + --salt-text-notation-lineHeight: 16px; +} + +.tar-density-medium { + --salt-text-h1-fontSize: 24px; + --salt-text-h1-lineHeight: 32px; + + --salt-text-h2-fontSize: 18px; + --salt-text-h2-lineHeight: 24px; + + --salt-text-h3-fontSize: 14px; + --salt-text-h3-lineHeight: 18px; + + --salt-text-h4-fontSize: 12px; + --salt-text-h4-lineHeight: 16px; + + --salt-text-label-fontSize: 11px; + --salt-text-label-lineHeight: 14px; + + --salt-text-fontSize: 12px; + --salt-text-lineHeight: 16px; + --salt-text-minHeight: 16px; + + --salt-text-display1-fontSize: 54px; + --salt-text-display1-lineHeight: 70px; + + --salt-text-display2-fontSize: 36px; + --salt-text-display2-lineHeight: 47px; + + --salt-text-display3-fontSize: 24px; + --salt-text-display3-lineHeight: 32px; + + --salt-text-notation-fontSize: 10px; + --salt-text-notation-lineHeight: 13px; +} + +.tar-density-high { + --salt-text-h1-fontSize: 18px; + --salt-text-h1-lineHeight: 24px; + + --salt-text-h2-fontSize: 14px; + --salt-text-h2-lineHeight: 18px; + + --salt-text-h3-fontSize: 12px; + --salt-text-h3-lineHeight: 16px; + + --salt-text-h4-fontSize: 11px; + --salt-text-h4-lineHeight: 14px; + + --salt-text-label-fontSize: 10px; + --salt-text-label-lineHeight: 13px; + + --salt-text-fontSize: 12px; + --salt-text-lineHeight: 16px; + --salt-text-minHeight: 16px; + + --salt-text-display1-fontSize: 42px; + --salt-text-display1-lineHeight: 54px; + + --salt-text-display2-fontSize: 28px; + --salt-text-display2-lineHeight: 36px; + + --salt-text-display3-fontSize: 18px; + --salt-text-display3-lineHeight: 24px; + + --salt-text-notation-fontSize: 8px; + --salt-text-notation-lineHeight: 10px; +} diff --git a/vuu-ui/themes/tar-theme/css/characteristics/track.css b/vuu-ui/themes/tar-theme/css/characteristics/track.css new file mode 100644 index 000000000..42b95d791 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/characteristics/track.css @@ -0,0 +1,8 @@ +.tar-theme { + --salt-track-borderStyle: solid; + --salt-track-borderStyle-active: solid; + --salt-track-borderStyle-complete: solid; + --salt-track-borderStyle-incomplete: dotted; + + --salt-track-borderColor: var(--salt-palette-neutral-secondary-border); +} diff --git a/vuu-ui/themes/tar-theme/css/components/button.css b/vuu-ui/themes/tar-theme/css/components/button.css new file mode 100644 index 000000000..6765c90a6 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/button.css @@ -0,0 +1,54 @@ + +.tar-theme { + /** TODO these will need density variants */ + --saltButton-borderRadius: 2px; + --saltButton-padding: var(--salt-spacing-200); + + .saltButton { + gap: var(--salt-spacing-100); + } + + .saltButton[data-embedded="true"]{ + --saltButton-height: calc(var(--salt-size-base) - var(--salt-spacing-100)); + --saltButton-borderStyle: none; + } + + .vuuIconButton[data-embedded="true"]{ + --saltButton-width: calc(var(--salt-size-base) - var(--salt-spacing-100)); + --saltButton-minWidth: var(--saltButton-width); + + --vuu-icon-width: 12px; + } + + .saltButton-secondary { + --saltButton-borderColor: var(--tar-color-gray-40); + --saltButton-borderWidth: 1px; + --saltButton-borderStyle: solid; + } + + .saltButton-secondary:not(:disabled):hover { + --saltButton-borderColor: var(--vuuButton-borderColor, var(--salt-actionable-secondary-background-hover)); + } +} + + +.tar-theme[theme-mode="light"]{ + .saltButton-secondary { + --saltButton-borderColor: var(--tar-color-gray-40); + } + .saltButton-secondary:disabled { + --saltButton-borderColor: var(--tar-color-gray-20); + } + +} + +.tar-theme[theme-mode="dark"]{ + .saltButton-secondary { + --saltButton-borderColor: var(--tar-color-gray-35); + } + .saltButton-secondary:disabled { + --saltButton-borderColor: var(--tar-color-gray-30); + } + +} + diff --git a/vuu-ui/themes/tar-theme/css/components/checkbox.css b/vuu-ui/themes/tar-theme/css/components/checkbox.css new file mode 100644 index 000000000..fea029c25 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/checkbox.css @@ -0,0 +1,50 @@ +.tar-theme { + .saltCheckbox { + --checkbox-background: white; + --checkbox-borderColor: var(--salt-selectable-borderColor); /* --vuu-color-gray-45 */ + --vuu-icon-color: white; + --vuu-icon-left: -1px; + --vuu-icon-top: -1px; + } + + .saltCheckbox:has(.saltCheckboxIcon-checked) { + --checkbox-background: var(--salt-actionable-cta-background); /* --vuu-color-purple-10 */ + --checkbox-borderColor: var( --salt-container-primary-borderColor); /* --vuu-color-purple-10 */ + } + + .saltCheckbox:hover { + --vuu-icon-color:var(--salt-actionable-primary-background-hover); /* --vuu-color-pink-10 */ + --checkbox-background: var(--vuu-color-pink-10-fade-20); + --checkbox-borderColor: var(--salt-selectable-borderColor-hover); /* --vuu-color-pink-10 */ + } + + .saltCheckboxIcon { + background:var(--checkbox-background); + border-color: var(--checkbox-borderColor) !important; + border-radius: 3px; + border-style: solid; + border-width: 1px; + } + + .saltCheckboxIcon-checked.saltCheckboxIcon-disabled, + .saltCheckbox:hover .saltCheckboxIcon-checked.saltCheckboxIcon-disabled { + background-color: var(--salt-selectable-background-disabled); + border-color: transparent;; + } + + + .saltCheckboxIcon-checked:after { + content: ""; + background-color: var(--vuu-icon-color); + left: var(--vuu-icon-left, auto); + --vuu-icon-size: calc(var(--salt-size-icon) + 2px); + height: var(--vuu-icon-height, var(--vuu-icon-size, 12px)); + mask: var(--vuu-svg-tick) center center/var(--vuu-icon-size) var(--vuu-icon-size); + -webkit-mask: var(--vuu-svg-tick) center center/var(--vuu-icon-size) var(--vuu-icon-size); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + position: absolute; + top: var(--vuu-icon-top, auto); + width: var(--vuu-icon-width, var(--vuu-icon-size, 12px)); + } +} \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/css/components/components.css b/vuu-ui/themes/tar-theme/css/components/components.css new file mode 100644 index 000000000..248a0ca79 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/components.css @@ -0,0 +1,8 @@ +@import url(button.css); +@import url(checkbox.css); +@import url(icon.css); +@import url(input.css); +@import url(splitter.css); +@import url(switch.css); +@import url(tabstrip.css); +@import url(toggle-button.css); diff --git a/vuu-ui/themes/tar-theme/css/components/icon.css b/vuu-ui/themes/tar-theme/css/components/icon.css new file mode 100644 index 000000000..d184ba7a1 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/icon.css @@ -0,0 +1,5 @@ +.tar-theme { + .saltIcon { + display: none; + } +} \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/css/components/input.css b/vuu-ui/themes/tar-theme/css/components/input.css new file mode 100644 index 000000000..3e89014aa --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/input.css @@ -0,0 +1,18 @@ +.saltInput-activationIndicator { + display: none; +} + +.saltInput:hover { + background: inherit;; +} + +.saltInput-primary { + --saltInput-height: 24px; + border: solid 1px var(--input-borderColor, var(--salt-editable-borderColor)); + border-radius: 6px; +} + +.saltInput-focused:hover, +.saltInput-focused { + --input-borderColor: var(--vuu-color-purple-10); +} \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/css/components/splitter.css b/vuu-ui/themes/tar-theme/css/components/splitter.css new file mode 100644 index 000000000..d4f60e2fd --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/splitter.css @@ -0,0 +1,11 @@ +.tar-theme .vuuSplitter { + --splitter-background: var(--vuu-color-gray-05); + --splitter-size: 9px; + --splitter-borderColor: white; + --splitter-borderStyle: none solid none solid; + --splitter-borderWidth: 4px; +} + +.tar-theme .vuuSplitter-column { + --splitter-borderStyle: solid none solid none; +} \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/css/components/switch.css b/vuu-ui/themes/tar-theme/css/components/switch.css new file mode 100644 index 000000000..e032d64e8 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/switch.css @@ -0,0 +1,56 @@ +.saltSwitch { + --switch-color: var(--vuu-color-gray-45); + --vuu-icon-left: -1px; +} + +.saltSwitch-track { + background-color: var(--switch-color); + border: none; + border-radius: 4px; + height: 14px; + padding: 0 2px; + width: 26px; +} + +.saltSwitch:not(.saltSwitch-disabled):hover .saltSwitch-track { + --switch-color: var(--vuu-color-pink-10); +} + +.saltSwitch-thumb { + background-color: var(--vuu-color-white); + border: none; + border-radius: 3px; + height: 10px; + margin:0; + width: 10px; +} + +.saltSwitch-checked { + --switch-color: var(--vuu-color-purple-10); +} + +.saltSwitch-disabled { + --switch-color: var(--vuu-color-gray-30); +} + +.saltSwitch-checked .saltSwitch-thumb, +.saltSwitch-checked:hover .saltSwitch-thumb { + background-color: white; + transform: translateX(calc(100% + 2px)); +} + + +.saltSwitch-checked .saltSwitch-thumb:after { + background-color: var(--switch-color); + content: ""; + left: var(--vuu-icon-left, auto); + height: var(--vuu-icon-height, var(--vuu-icon-size, 12px)); + mask: var(--vuu-svg-tick) center center/var(--vuu-icon-size) var(--vuu-icon-size); + -webkit-mask: var(--vuu-svg-tick) center center/var(--vuu-icon-size) var(--vuu-icon-size); + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + position: absolute; + top: var(--vuu-icon-top, auto); + width: var(--vuu-icon-width, var(--vuu-icon-size, 12px)); + +} \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/css/components/tabstrip.css b/vuu-ui/themes/tar-theme/css/components/tabstrip.css new file mode 100644 index 000000000..1c458e3d2 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/tabstrip.css @@ -0,0 +1,13 @@ +.tar-theme { + + .vuuTabstrip { + --vuuOverflowContainer-borderColor: var(--salt-separable-primary-borderColor); + --tab-thumb-height: 3px; + } + + .vuuTabstrip-secondary { + + --vuuOverflowContainer-height: calc(var(--salt-size-base) + var(--salt-spacing-50)); + --vuuOverflowContainer-contentHeight: calc(var(--vuuOverflowContainer-height) - 1px); + } +} \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/css/components/toggle-button.css b/vuu-ui/themes/tar-theme/css/components/toggle-button.css new file mode 100644 index 000000000..f856826b0 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/components/toggle-button.css @@ -0,0 +1,52 @@ +.tar-theme { + .saltToggleButtonGroup { + --togglebutton-borderRadius: 2px; + /** TODO vary by density */ + --salt-spacing-100: 16px; + border-radius: 2px; + gap: 0; + height: var(--salt-size-base); + padding: 2px 3px; + } + + .saltToggleButtonGroup-horizontal .saltToggleButton { + height: 100%; + } + + .saltToggleButton { + border-radius: var(--togglebutton-borderRadius); + /** TODO vary by density */ + gap: 8px; + + --vuu-icon-color: var(--salt-actionable-secondary-foreground); + + &[aria-checked="true"] { + --vuu-icon-color: var(--salt-actionable-secondary-foreground-active); + } + &[aria-pressed="true"] { + --vuu-icon-color: var(--salt-actionable-secondary-foreground-active); + } + + } + + .saltToggleButton:hover:not([aria-pressed="true"], [aria-checked="true"]) { + background: var(--salt-actionable-secondary-background); + color: var(--salt-actionable-secondary-foreground); + } + + + .vuuStateButtonGroup { + + .saltToggleButton { + --togglebutton-borderRadius: 0; + } + + .saltToggleButton:first-child { + --togglebutton-borderRadius: 2px 0 0 2px; + } + .saltToggleButton:last-child { + --togglebutton-borderRadius: 0 2px 2px 0; + } + } + +} diff --git a/vuu-ui/themes/tar-theme/css/deprecated/foundations.css b/vuu-ui/themes/tar-theme/css/deprecated/foundations.css new file mode 100644 index 000000000..2ea9c1ba9 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/deprecated/foundations.css @@ -0,0 +1,103 @@ +/* +* **Deprecated:** Use duration instead +*/ +.tar-theme { + /* Delay */ + --salt-delay-instant: 100ms; + --salt-delay-perceptible: 300ms; + --salt-delay-notable: 1000ms; + --salt-delay-cutoff: 10000ms; + + /* Icon */ + --salt-size-icon-base: var(--salt-icon-size-base); + + /* Opacity */ + --salt-opacity-1: 0.15; + --salt-opacity-2: 0.25; + --salt-opacity-3: 0.4; + --salt-opacity-4: 0.7; + + /* Shadow */ + --salt-shadow-0: none; + --salt-shadow-1: 0 1px 3px 0 var(--salt-shadow-1-color); /* Use --salt-shadow-100 */ + --salt-shadow-2: 0 2px 4px 0 var(--salt-shadow-2-color); /* Use --salt-shadow-200 */ + --salt-shadow-3: 0 4px 8px 0 var(--salt-shadow-3-color); /* Use --salt-shadow-300 */ + --salt-shadow-4: 0 6px 10px 0 var(--salt-shadow-4-color); /* Use --salt-shadow-400 */ + --salt-shadow-5: 0 12px 40px 0 var(--salt-shadow-5-color); /* Use --salt-shadow-500 */ +} + +.tar-theme[data-mode="light"] { + --salt-shadow-1-color: rgba(0, 0, 0, 0.1); /* Use --salt-shadow-100-color */ + --salt-shadow-2-color: rgba(0, 0, 0, 0.1); /* Use --salt-shadow-200-color */ + --salt-shadow-3-color: rgba(0, 0, 0, 0.15); /* Use --salt-shadow-300-color */ + --salt-shadow-4-color: rgba(0, 0, 0, 0.2); /* Use --salt-shadow-400-color */ + --salt-shadow-5-color: rgba(0, 0, 0, 0.3); /* Use --salt-shadow-500-color */ +} + +.tar-theme[data-mode="dark"] { + --salt-shadow-1-color: rgba(0, 0, 0, 0.5); /* Use --salt-shadow-100-color */ + --salt-shadow-2-color: rgba(0, 0, 0, 0.5); /* Use --salt-shadow-200-color */ + --salt-shadow-3-color: rgba(0, 0, 0, 0.55); /* Use --salt-shadow-300-color */ + --salt-shadow-4-color: rgba(0, 0, 0, 0.55); /* Use --salt-shadow-400-color */ + --salt-shadow-5-color: rgba(0, 0, 0, 0.65); /* Use --salt-shadow-500-color */ +} + +.tar-density-touch, +.tar-density-low, +.tar-density-medium, +.tar-density-high { + /* Size */ + --salt-size-selection: var(--salt-size-selectable); + --salt-size-brandBar: 4px; /* Use --salt-size-accent */ + --salt-size-graphic-small: 12px; + --salt-size-graphic-medium: 24px; + --salt-size-graphic-large: 48px; + --salt-size-divider-height: var(--salt-size-separator-height); + --salt-size-divider-strokeWidth: var(--salt-size-separator-strokeWidth); + + --salt-size-detail: var(--salt-size-compact); + --salt-size-basis-unit: 4px; + + --salt-size-adornmentGap: calc(0.75 * var(--salt-size-unit)); + --salt-size-container-spacing: calc(3 * var(--salt-size-unit)); + --salt-size-separator-strokeWidth: 1px; + --salt-size-separator-height: calc(var(--salt-size-compact) + 1.5 * var(--salt-size-basis-unit)); + --salt-size-sharktooth-height: 5px; + --salt-size-sharktooth-width: 10px; + --salt-size-stackable: calc(var(--salt-size-base) + var(--salt-size-unit)); + + /* Z Index */ + --salt-zIndex-docked: 1050; +} + +.tar-density-high { + --salt-size-unit: calc(var(--salt-size-basis-unit) * 1); + --salt-size-compact: calc(var(--salt-size-basis-unit) * 1.5); + --salt-size-accent: calc(var(--salt-size-basis-unit) * 0.5); + --salt-icon-size-base: 10px; /* Use --salt-size-icon */ + --salt-icon-size-status-adornment: 6px; /* Use --salt-size-adornment */ +} + +.tar-density-medium { + --salt-size-unit: calc(var(--salt-size-basis-unit) * 2); + --salt-size-compact: calc(var(--salt-size-basis-unit) * 2); + --salt-size-accent: calc(var(--salt-size-basis-unit) * 1); + --salt-icon-size-base: 12px; /* Use --salt-size-icon */ + --salt-icon-size-status-adornment: 8px; /* Use --salt-size-adornment */ +} + +.tar-density-low { + --salt-size-unit: calc(var(--salt-size-basis-unit) * 3); + --salt-size-compact: calc(var(--salt-size-basis-unit) * 2.5); + --salt-size-accent: calc(var(--salt-size-basis-unit) * 1.5); + --salt-icon-size-base: 14px; /* Use --salt-size-icon */ + --salt-icon-size-status-adornment: 10px; /* Use --salt-size-adornment */ +} + +.tar-density-touch { + --salt-size-unit: calc(var(--salt-size-basis-unit) * 4); + --salt-size-compact: calc(var(--salt-size-basis-unit) * 3); + --salt-size-accent: calc(var(--salt-size-basis-unit) * 2); + --salt-icon-size-base: 16px; /* Use --salt-size-icon */ + --salt-icon-size-status-adornment: 12px; /* Use --salt-size-adornment */ +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/animation.css b/vuu-ui/themes/tar-theme/css/foundations/animation.css new file mode 100644 index 000000000..4e20921d9 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/animation.css @@ -0,0 +1,155 @@ +.tar-density-touch, +.tar-density-low, +.tar-density-medium, +.tar-density-high { + --salt-animation-opacity-start: 0; + --salt-animation-opacity-end: 1; + --salt-animation-scale-start: 0; + --salt-animation-scale-end: 1; + --salt-animation-transform-start: 100%; + --salt-animation-transform-end: 0; + --salt-animation-duration: var(--salt-duration-perceptible); + --salt-animation-timing-function: ease-in-out; + + /* Slide Animations */ + --salt-animation-slide-in-top: slide-in-top var(--salt-animation-duration) var(--salt-animation-timing-function); + --salt-animation-slide-in-left: slide-in-left var(--salt-animation-duration) var(--salt-animation-timing-function); + --salt-animation-slide-in-right: slide-in-right var(--salt-animation-duration) var(--salt-animation-timing-function); + --salt-animation-slide-in-bottom: slide-in-bottom var(--salt-animation-duration) var(--salt-animation-timing-function); + + --salt-animation-slide-out-top: slide-out-top var(--salt-animation-duration) var(--salt-animation-timing-function) both; + --salt-animation-slide-out-left: slide-out-left var(--salt-animation-duration) var(--salt-animation-timing-function) both; + --salt-animation-slide-out-right: slide-out-right var(--salt-animation-duration) var(--salt-animation-timing-function) both; + --salt-animation-slide-out-bottom: slide-out-bottom var(--salt-animation-duration) var(--salt-animation-timing-function) both; + + /* Fade Animations */ + --salt-animation-fade-in-back: fade-in-back var(--salt-animation-duration) var(--salt-animation-timing-function); + --salt-animation-fade-in-forward: fade-in-forward var(--salt-animation-duration) var(--salt-animation-timing-function); + --salt-animation-fade-in-center: fade-in-center var(--salt-animation-duration) var(--salt-animation-timing-function); + --salt-animation-fade-out-back: fade-out-back var(--salt-animation-duration) ease-in-out both; +} + +/*Slide keyframes */ +@keyframes slide-in-top { + 0% { + opacity: var(--salt-animation-opacity-start); + transform: translateY(var(--salt-animation-transform-start)); + } + 100% { + opacity: var(--salt-animation-opacity-end); + transform: translateY(var(--salt-animation-transform-end)); + } +} +@keyframes slide-out-top { + 0% { + opacity: var(--salt-animation-opacity-end); + transform: translateY(var(--salt-animation-transform-end)); + } + 100% { + opacity: var(--salt-animation-opacity-start); + transform: translateY(var(--salt-animation-transform-start)); + } +} +@keyframes slide-in-left { + 0% { + opacity: var(--salt-animation-opacity-start); + transform: translateX(calc(-1 * var(--salt-animation-transform-start))); + } + 100% { + opacity: var(--salt-animation-opacity-end); + transform: translateX(var(--salt-animation-transform-end)); + } +} +@keyframes slide-out-left { + 0% { + opacity: var(--salt-animation-opacity-end); + transform: translateX(var(--salt-animation-transform-end)); + } + 100% { + opacity: var(--salt-animation-opacity-start); + transform: translateX(calc(-1 * var(--salt-animation-transform-start))); + } +} +@keyframes slide-in-right { + 0% { + opacity: var(--salt-animation-opacity-start); + transform: translateX(var(--salt-animation-transform-start)); + } + 100% { + opacity: var(--salt-animation-opacity-end); + transform: translateX(var(--salt-animation-transform-end)); + } +} +@keyframes slide-out-right { + 0% { + opacity: var(--salt-animation-opacity-end); + transform: translateX(var(--salt-animation-transform-end)); + } + 100% { + opacity: var(--salt-animation-opacity-start); + transform: translateX(var(--salt-animation-transform-start)); + } +} +@keyframes slide-in-bottom { + 0% { + opacity: var(--salt-animation-opacity-start); + transform: translateY(calc(-1 * var(--salt-animation-transform-start))); + } + 100% { + opacity: var(--salt-animation-opacity-end); + transform: translateY(var(--salt-animation-transform-end)); + } +} +@keyframes slide-out-bottom { + 0% { + opacity: var(--salt-animation-opacity-end); + transform: translateY(var(--salt-animation-transform-end)); + } + 100% { + opacity: var(--salt-animation-opacity-start); + transform: translateY(calc(-1 * var(--salt-animation-transform-start))); + } +} +/* Fade keyframes */ +@keyframes fade-in-back { + 0% { + --salt-animation-scale-start: 1.4; + opacity: var(--salt-animation-opacity-start); + transform: scale(var(--salt-animation-scale-start)); + } + + 100% { + opacity: var(--salt-animation-opacity-end); + transform: scale(var(--salt-animation-scale-end)); + } +} +@keyframes fade-in-forward { + 0% { + --salt-animation-scale-start: 0.6; + opacity: var(--salt-animation-opacity-start); + transform: scale(var(--salt-animation-scale-start)); + } + + 100% { + opacity: var(--salt-animation-opacity-end); + transform: scale(var(--salt-animation-scale-end)); + } +} +@keyframes fade-in-center { + 0% { + opacity: var(--salt-animation-opacity-start); + } + + 100% { + opacity: var(--salt-animation-opacity-end); + } +} + +@keyframes fade-out-back { + 0% { + opacity: var(--salt-animation-opacity-end); + } + 100% { + opacity: var(--salt-animation-opacity-start); + } +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/color.css b/vuu-ui/themes/tar-theme/css/foundations/color.css new file mode 100644 index 000000000..8eb91c0ae --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/color.css @@ -0,0 +1,176 @@ +.tar-theme { + + --vuu-fade-light : 0.13; + + --vuu-color-black: black; + --vuu-color-white: white; + --vuu-color-white-fade-70: rgba(255,255,255,.7); + + /** text-selection */ + --vuu-color-blue-40: rgb(164, 213, 244); /* #A4D5F4 */ + +--tar-color-red-10: rgb(230,0,0); /* #E60000*/ +--tar-color-red-20: rgb(189, 0, 12); /* /* #BD000C */ +--tar-color-red-30: rgb(247, 128, 128); /* #F78080 */ +--tar-color-red-40: rgba(230, 0, 0, 0.502); /* #e6000080 */ +--tar-color-red-50: rgb(); /* */ +--tar-color-red-60: rgb(); /* */ + + --vuu-color-purple-10: rgb(109,24,189); /* #6D18BD */ + --vuu-color-purple-20-fade-40 :rgba(197, 163, 229, .4); /* #C5A3E566 */ + --vuu-color-purple-50: rgb(42, 1, 95); /* #2A015F */ + --vuu-color-purple-10-fade-light: rgba(109,24,189, var(--vuu-fade-light)); + + --vuu-color-pink-10: rgb(234, 120, 128); /* #F37880 */ + --vuu-color-pink-10-fade-20: rgba(234, 120, 128, .2); /* #F37880 */ + + --tar-color-gray-05: rgb(215, 215, 215); /* #D7D7D7 */ + --tar-color-gray-10: rgb(170, 170, 170); /* #aaa */ + --tar-color-gray-20: rgb(204, 204, 204); /* #ccc */ + --tar-color-gray-25: rgb(145, 145, 145); /* #919191*/ + --tar-color-gray-30: rgb(68, 68, 68); /* #444 */ + --tar-color-gray-35: rgb(91, 91, 91); /* #5b5b5b */ + --tar-color-gray-40: rgb(100, 100, 100); /* #646464*/ + --tar-color-gray-70: rgb(28, 28, 28); /* #1C1C1C */ + + + --vuu-color-gray-02: rgb(235, 235, 236); /* #EBEBEC */ + --vuu-color-gray-03: rgb(237, 237, 237); /* #EDEDED */ + --vuu-color-gray-05: rgb(222, 222, 222); /* #DEDEDE */ + --vuu-color-gray-07: rgb(226, 226, 227); /* #E2E2E3 */ + --vuu-color-gray-10: rgb(228, 227, 231); /* #E4E3E7 */ + --vuu-color-gray-20: rgb(245, 242, 248); /* #F5F2F8 */ + --vuu-color-gray-25: rgb(244, 244, 244) ; /* #F4F4F4 */ + --vuu-color-gray-28: rgb(249, 249, 251); /* #F9F9FB */ + --vuu-color-gray-30: rgb(214, 215, 218); /* #D6D7Da */ + --vuu-color-gray-35: rgb(155, 158, 168); /* #9B9EA8; */ + --vuu-color-gray-40: rgb(169, 170, 173); /* #A9AAAD */ + --vuu-color-gray-42: rgb(135, 139, 158); /* #878b9e */ + --vuu-color-gray-45: rgb(119, 124, 148); /* #777C94 */ + --vuu-color-gray-50: rgb(96, 100, 119); /* #606477 */ + --vuu-color-gray-80: rgb(21, 23, 27); /* #15171B */ + + +--vuu-color-green-50: rgb(102, 174, 90); /* #66AE5A */ +--vuu-color-green-60: rgb(36, 137, 19); /* #248913 */ +--vuu-color-green-60-fade-30: rgba(36, 137, 19, .3); /* #248913 */ + +--vuu-color-red-50: rgb(226, 52, 52); /* #E23434 */ + + --vuu-color-yellow-20: rgb(244, 202, 51); /* #F4CA33 */ + + + + /* Color palette will stay the same no matter of theming */ + --salt-color-white: rgb(255, 255, 255); + --salt-color-black: rgb(0, 0, 0); + + --salt-color-red-10: rgb(255, 227, 224); + --salt-color-red-20: rgb(255, 207, 201); + --salt-color-red-30: rgb(255, 187, 178); + --salt-color-red-40: rgb(255, 167, 156); + --salt-color-red-50: rgb(255, 148, 133); + --salt-color-red-100: rgb(255, 128, 111); + --salt-color-red-200: rgb(255, 108, 88); + --salt-color-red-300: rgb(255, 89, 66); + --salt-color-red-400: rgb(237, 65, 42); + --salt-color-red-500: rgb(227, 43, 22); + --salt-color-red-600: rgb(196, 32, 16); + --salt-color-red-700: rgb(166, 21, 11); + --salt-color-red-800: rgb(136, 10, 5); + --salt-color-red-900: rgb(65, 37, 34); + + --salt-color-orange-10: rgb(255, 232, 191); + --salt-color-orange-20: rgb(254, 223, 166); + --salt-color-orange-30: rgb(254, 214, 142); + --salt-color-orange-40: rgb(254, 205, 118); + --salt-color-orange-50: rgb(254, 197, 94); + --salt-color-orange-100: rgb(250, 181, 81); + --salt-color-orange-200: rgb(246, 165, 68); + --salt-color-orange-300: rgb(242, 149, 56); + --salt-color-orange-400: rgb(238, 133, 43); + --salt-color-orange-500: rgb(234, 115, 25); + --salt-color-orange-600: rgb(224, 101, 25); + --salt-color-orange-700: rgb(214, 85, 19); + --salt-color-orange-800: rgb(204, 68, 13); + --salt-color-orange-900: rgb(54, 44, 36); + + --salt-color-green-10: rgb(209, 244, 201); + --salt-color-green-20: rgb(184, 232, 182); + --salt-color-green-30: rgb(160, 221, 164); + --salt-color-green-40: rgb(136, 210, 145); + --salt-color-green-50: rgb(112, 199, 127); + --salt-color-green-100: rgb(93, 189, 116); + --salt-color-green-200: rgb(77, 180, 105); + --salt-color-green-300: rgb(60, 171, 96); + --salt-color-green-400: rgb(48, 156, 90); + --salt-color-green-500: rgb(36, 135, 75); + --salt-color-green-600: rgb(24, 114, 61); + --salt-color-green-700: rgb(12, 93, 46); + --salt-color-green-800: rgb(1, 73, 32); + --salt-color-green-900: rgb(35, 52, 43); + + --salt-color-teal-10: rgb(218, 240, 240); + --salt-color-teal-20: rgb(199, 232, 232); + --salt-color-teal-30: rgb(180, 224, 225); + --salt-color-teal-40: rgb(162, 217, 218); + --salt-color-teal-50: rgb(141, 205, 209); + --salt-color-teal-100: rgb(123, 193, 200); + --salt-color-teal-200: rgb(99, 181, 192); + --salt-color-teal-300: rgb(73, 160, 172); + --salt-color-teal-400: rgb(48, 149, 166); + --salt-color-teal-500: rgb(0, 130, 151); + --salt-color-teal-600: rgb(27, 107, 133); + --salt-color-teal-700: rgb(0, 85, 113); + --salt-color-teal-800: rgb(1, 65, 86); + --salt-color-teal-900: rgb(0, 49, 76); + + --salt-color-blue-10: rgb(203, 231, 249); + --salt-color-blue-20: rgb(183, 222, 246); + --salt-color-blue-30: rgb(164, 213, 244); + --salt-color-blue-40: rgb(144, 204, 242); + --salt-color-blue-50: rgb(125, 195, 240); + --salt-color-blue-100: rgb(100, 177, 228); + --salt-color-blue-200: rgb(75, 159, 216); + --salt-color-blue-300: rgb(51, 141, 205); + --salt-color-blue-400: rgb(46, 132, 198); + --salt-color-blue-500: rgb(38, 112, 169); + --salt-color-blue-600: rgb(21, 92, 147); + --salt-color-blue-700: rgb(0, 71, 123); + --salt-color-blue-800: rgb(39, 60, 77); + --salt-color-blue-900: rgb(35, 47, 56); + + --salt-color-purple-10: rgb(249, 224, 247); + --salt-color-purple-20: rgb(247, 212, 244); + --salt-color-purple-30: rgb(245, 201, 241); + --salt-color-purple-40: rgb(243, 189, 238); + --salt-color-purple-50: rgb(241, 178, 235); + --salt-color-purple-100: rgb(223, 156, 225); + --salt-color-purple-200: rgb(205, 135, 215); + --salt-color-purple-300: rgb(192, 116, 203); + --salt-color-purple-400: rgb(169, 97, 181); + --salt-color-purple-500: rgb(150, 78, 162); + --salt-color-purple-600: rgb(129, 60, 141); + --salt-color-purple-700: rgb(103, 46, 122); + --salt-color-purple-800: rgb(83, 37, 109); + --salt-color-purple-900: rgb(59, 16, 84); + + --salt-color-gray-10: rgb(242, 244, 246); + --salt-color-gray-20: rgb(234, 237, 239); + --salt-color-gray-30: rgb(224, 228, 233); + --salt-color-gray-40: rgb(217, 221, 227); + --salt-color-gray-50: rgb(206, 210, 217); + --salt-color-gray-60: rgb(197, 201, 208); + --salt-color-gray-70: rgb(180, 183, 190); + --salt-color-gray-80: rgb(159, 163, 170); + --salt-color-gray-90: rgb(132, 135, 142); + --salt-color-gray-100: rgb(116, 119, 127); + --salt-color-gray-200: rgb(97, 101, 110); + --salt-color-gray-300: rgb(76, 80, 91); + --salt-color-gray-400: rgb(68, 72, 79); + --salt-color-gray-500: rgb(59, 63, 70); + --salt-color-gray-600: rgb(47, 49, 54); + --salt-color-gray-700: rgb(42, 44, 47); + --salt-color-gray-800: rgb(36, 37, 38); + --salt-color-gray-900: rgb(22, 22, 22); +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/duration.css b/vuu-ui/themes/tar-theme/css/foundations/duration.css new file mode 100644 index 000000000..988d14af1 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/duration.css @@ -0,0 +1,6 @@ +.tar-theme { + --salt-duration-instant: 0ms; + --salt-duration-perceptible: 300ms; + --salt-duration-notable: 1000ms; + --salt-duration-cutoff: 10000ms; +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/fade.css b/vuu-ui/themes/tar-theme/css/foundations/fade.css new file mode 100644 index 000000000..8feb4daf9 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/fade.css @@ -0,0 +1,68 @@ +.tar-theme { + --salt-color-blue-100-fade-foreground: rgba(100, 177, 228, var(--salt-palette-opacity-disabled)); + --salt-color-blue-500-fade-foreground: rgba(38, 112, 169, var(--salt-palette-opacity-disabled)); + --salt-color-blue-600-fade-foreground: rgba(21, 92, 147, var(--salt-palette-opacity-disabled)); + --salt-color-gray-200-fade-foreground: rgba(97, 101, 110, var(--salt-palette-opacity-disabled)); + --salt-color-gray-70-fade-foreground: rgba(180, 183, 190, var(--salt-palette-opacity-disabled)); + --salt-color-gray-90-fade-foreground: rgba(132, 135, 142, var(--salt-palette-opacity-disabled)); + --salt-color-gray-900-fade-foreground: rgba(22, 22, 22, var(--salt-palette-opacity-disabled)); + --salt-color-green-300-fade-foreground: rgba(60, 171, 96, var(--salt-palette-opacity-disabled)); + --salt-color-green-400-fade-foreground: rgba(48, 156, 90, var(--salt-palette-opacity-disabled)); + --salt-color-green-500-fade-foreground: rgba(36, 135, 75, var(--salt-palette-opacity-disabled)); + --salt-color-green-700-fade-foreground: rgba(12, 93, 46, var(--salt-palette-opacity-disabled)); + --salt-color-red-300-fade-foreground: rgba(255, 89, 66, var(--salt-palette-opacity-disabled)); + --salt-color-red-500-fade-foreground: rgba(227, 43, 22, var(--salt-palette-opacity-disabled)); + --salt-color-red-700-fade-foreground: rgba(166, 21, 11, var(--salt-palette-opacity-disabled)); + --salt-color-white-fade-foreground: rgba(255, 255, 255, var(--salt-palette-opacity-disabled)); + + --salt-color-blue-500-fade-border: rgba(38, 112, 169, var(--salt-palette-opacity-disabled)); + --salt-color-gray-50-fade-border: rgba(206, 210, 217, var(--salt-palette-opacity-disabled)); + --salt-color-gray-60-fade-border: rgba(197, 201, 208, var(--salt-palette-opacity-disabled)); + --salt-color-gray-90-fade-border: rgba(132, 135, 142, var(--salt-palette-opacity-disabled)); + --salt-color-gray-200-fade-border: rgba(97, 101, 110, var(--salt-palette-opacity-disabled)); + --salt-color-gray-300-fade-border: rgba(76, 80, 91, var(--salt-palette-opacity-disabled)); + --salt-color-green-400-fade-border: rgba(48, 156, 90, var(--salt-palette-opacity-disabled)); + --salt-color-green-500-fade-border: rgba(36, 135, 75, var(--salt-palette-opacity-disabled)); + --salt-color-orange-400-fade-border: rgba(238, 133, 43, var(--salt-palette-opacity-disabled)); + --salt-color-orange-500-fade-border: rgba(234, 115, 25, var(--salt-palette-opacity-disabled)); + --salt-color-orange-600-fade-border: rgba(224, 101, 25, var(--salt-palette-opacity-disabled)); + --salt-color-orange-700-fade-border: rgba(214, 85, 19, var(--salt-palette-opacity-disabled)); + --salt-color-red-500-fade-border: rgba(227, 43, 22, var(--salt-palette-opacity-disabled)); + + --salt-color-gray-90-fade-border-readonly: rgba(132, 135, 142, var(--salt-palette-opacity-border-readonly)); + --salt-color-gray-200-fade-border-readonly: rgba(97, 101, 110, var(--salt-palette-opacity-border-readonly)); + + --salt-color-blue-30-fade-background: rgba(164, 213, 244, var(--salt-palette-opacity-disabled)); + --salt-color-blue-500-fade-background: rgba(38, 112, 169, var(--salt-palette-opacity-disabled)); + --salt-color-blue-600-fade-background: rgba(21, 92, 147, var(--salt-palette-opacity-disabled)); + --salt-color-blue-700-fade-background: rgba(0, 71, 123, var(--salt-palette-opacity-disabled)); + --salt-color-gray-20-fade-background: rgba(234, 237, 239, var(--salt-palette-opacity-disabled)); + --salt-color-gray-60-fade-background: rgba(197, 201, 208, var(--salt-palette-opacity-disabled)); + --salt-color-gray-70-fade-background: rgba(180, 183, 190, var(--salt-palette-opacity-disabled)); + --salt-color-gray-200-fade-background: rgba(97, 101, 110, var(--salt-palette-opacity-disabled)); + --salt-color-gray-300-fade-background: rgba(76, 80, 91, var(--salt-palette-opacity-disabled)); + --salt-color-gray-600-fade-background: rgba(47, 49, 54, var(--salt-palette-opacity-disabled)); + --salt-color-gray-800-fade-background: rgba(36, 37, 38, var(--salt-palette-opacity-disabled)); + --salt-color-white-fade-background: rgba(255, 255, 255, var(--salt-palette-opacity-disabled)); + + --salt-color-white-fade-background-readonly: rgba(255, 255, 255, var(--salt-palette-opacity-background-readonly)); + --salt-color-gray-20-fade-background-readonly: rgba(234, 237, 239, var(--salt-palette-opacity-background-readonly)); + --salt-color-gray-600-fade-background-readonly: rgba(47, 49, 54, var(--salt-palette-opacity-background-readonly)); + --salt-color-gray-800-fade-background-readonly: rgba(36, 37, 38, var(--salt-palette-opacity-background-readonly)); + + --salt-color-white-fade-backdrop: rgba(255, 255, 255, var(--salt-palette-opacity-backdrop)); + --salt-color-black-fade-backdrop: rgba(0, 0, 0, var(--salt-palette-opacity-backdrop)); + + --salt-color-blue-100-fade-fill: rgba(100, 177, 228, var(--salt-palette-opacity-disabled)); + --salt-color-blue-600-fade-fill: rgba(21, 92, 147, var(--salt-palette-opacity-disabled)); + + --salt-color-white-fade-separatorOpacity-primary: rgba(255, 255, 255, var(--salt-palette-opacity-primary-border)); + --salt-color-white-fade-separatorOpacity-secondary: rgba(255, 255, 255, var(--salt-palette-opacity-secondary-border)); + --salt-color-white-fade-separatorOpacity-tertiary: rgba(255, 255, 255, var(--salt-palette-opacity-tertiary-border)); + --salt-color-black-fade-separatorOpacity-primary: rgba(0, 0, 0, var(--salt-palette-opacity-primary-border)); + --salt-color-black-fade-separatorOpacity-secondary: rgba(0, 0, 0, var(--salt-palette-opacity-secondary-border)); + --salt-color-black-fade-separatorOpacity-tertiary: rgba(0, 0, 0, var(--salt-palette-opacity-tertiary-border)); + + --salt-color-black-fade-background-hover: rgba(0, 0, 0, var(--salt-opacity-8)); + --salt-color-white-fade-background-hover: rgba(255, 255, 255, var(--salt-opacity-8)); +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/opacity.css b/vuu-ui/themes/tar-theme/css/foundations/opacity.css new file mode 100644 index 000000000..52495d7bb --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/opacity.css @@ -0,0 +1,8 @@ +.tar-theme { + --salt-opacity-0: 0; + --salt-opacity-8: 0.08; + --salt-opacity-15: 0.15; + --salt-opacity-25: 0.25; + --salt-opacity-40: 0.4; + --salt-opacity-70: 0.7; +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/shadow.css b/vuu-ui/themes/tar-theme/css/foundations/shadow.css new file mode 100644 index 000000000..eef993f1c --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/shadow.css @@ -0,0 +1,23 @@ +.tar-theme[data-mode="light"] { + --salt-shadow-100-color: rgba(0, 0, 0, 0.1); + --salt-shadow-200-color: rgba(0, 0, 0, 0.1); + --salt-shadow-300-color: rgba(0, 0, 0, 0.15); + --salt-shadow-400-color: rgba(0, 0, 0, 0.2); + --salt-shadow-500-color: rgba(0, 0, 0, 0.3); +} + +.tar-theme[data-mode="dark"] { + --salt-shadow-100-color: rgba(0, 0, 0, 0.5); + --salt-shadow-200-color: rgba(0, 0, 0, 0.5); + --salt-shadow-300-color: rgba(0, 0, 0, 0.55); + --salt-shadow-400-color: rgba(0, 0, 0, 0.55); + --salt-shadow-500-color: rgba(0, 0, 0, 0.65); +} + +.tar-theme { + --salt-shadow-100: 0 1px 3px 0 var(--salt-shadow-100-color); + --salt-shadow-200: 0 2px 4px 0 var(--salt-shadow-200-color); + --salt-shadow-300: 0 4px 8px 0 var(--salt-shadow-300-color); + --salt-shadow-400: 0 6px 10px 0 var(--salt-shadow-400-color); + --salt-shadow-500: 0 12px 40px 0 var(--salt-shadow-500-color); +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/size.css b/vuu-ui/themes/tar-theme/css/foundations/size.css new file mode 100644 index 000000000..f17c1d911 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/size.css @@ -0,0 +1,51 @@ +.tar-density-high { + --salt-size-adornment: 6px; + --salt-size-bar: 2px; + --salt-size-base: 24px; + --salt-size-border: 1px; + --salt-size-icon: 10px; + --salt-size-indicator: 1px; + --salt-size-selectable: 12px; + --salt-size-bar-strong: 4px; + --salt-size-bar-small: 2px; + --salt-size-border-strong: 2px; +} + +.tar-density-medium { + --salt-size-adornment: 8px; + --salt-size-bar: 4px; + --salt-size-base: 28px; + --salt-size-border: 1px; + --salt-size-icon: 12px; + --salt-size-indicator: 2px; + --salt-size-selectable: 14px; + --salt-size-bar-strong: 8px; + --salt-size-bar-small: 2px; + --salt-size-border-strong: 2px; +} + +.tar-density-low { + --salt-size-adornment: 10px; + --salt-size-bar: 6px; + --salt-size-base: 36px; + --salt-size-border: 1px; + --salt-size-icon: 14px; + --salt-size-indicator: 3px; + --salt-size-selectable: 16px; + --salt-size-bar-strong: 12px; + --salt-size-bar-small: 2px; + --salt-size-border-strong: 2px; +} + +.tar-density-touch { + --salt-size-adornment: 12px; + --salt-size-bar: 8px; + --salt-size-base: 44px; + --salt-size-border: 1px; + --salt-size-icon: 16px; + --salt-size-indicator: 4px; + --salt-size-selectable: 18px; + --salt-size-bar-strong: 16px; + --salt-size-bar-small: 2px; + --salt-size-border-strong: 2px; +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/spacing.css b/vuu-ui/themes/tar-theme/css/foundations/spacing.css new file mode 100644 index 000000000..c7172a792 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/spacing.css @@ -0,0 +1,31 @@ +.tar-density-touch { + --salt-spacing-100: 16px; +} + +.tar-density-low { + --salt-spacing-100: 12px; +} + +.tar-density-medium { + --salt-spacing-100: 8px; +} + +.tar-density-high { + --salt-spacing-100: 4px; +} + +.tar-density-touch, +.tar-density-low, +.tar-density-medium, +.tar-density-high { + --salt-spacing-25: calc(0.25 * var(--salt-spacing-100)); + --salt-spacing-50: calc(0.5 * var(--salt-spacing-100)); + --salt-spacing-75: calc(0.75 * var(--salt-spacing-100)); + + --salt-spacing-150: calc(1.5 * var(--salt-spacing-100)); + --salt-spacing-200: calc(2 * var(--salt-spacing-100)); + --salt-spacing-250: calc(2.5 * var(--salt-spacing-100)); + --salt-spacing-300: calc(3 * var(--salt-spacing-100)); + --salt-spacing-350: calc(3.5 * var(--salt-spacing-100)); + --salt-spacing-400: calc(4 * var(--salt-spacing-100)); +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/typography.css b/vuu-ui/themes/tar-theme/css/foundations/typography.css new file mode 100644 index 000000000..8f0e00490 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/typography.css @@ -0,0 +1,11 @@ +.tar-theme { + --salt-typography-fontFamily: "Nunito Sans"; + --salt-typography-fontFamily-code: 'Sometype Mono'; + + --salt-typography-fontWeight-light: 300; + --salt-typography-fontWeight-regular: 400; + --salt-typography-fontWeight-medium: 500; + --salt-typography-fontWeight-semiBold: 600; + --salt-typography-fontWeight-bold: 700; + --salt-typography-fontWeight-extraBold: 800; +} diff --git a/vuu-ui/themes/tar-theme/css/foundations/zindex.css b/vuu-ui/themes/tar-theme/css/foundations/zindex.css new file mode 100644 index 000000000..a4cd75bba --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/foundations/zindex.css @@ -0,0 +1,14 @@ +.tar-density-touch, +.tar-density-low, +.tar-density-medium, +.tar-density-high { + --salt-zIndex-default: 1; + --salt-zIndex-popout: 1000; + --salt-zIndex-appHeader: 1100; + --salt-zIndex-drawer: 1200; + --salt-zIndex-modal: 1300; + --salt-zIndex-notification: 1400; + --salt-zIndex-dragObject: 1420; + --salt-zIndex-contextMenu: 1450; + --salt-zIndex-flyover: 1500; +} diff --git a/vuu-ui/themes/tar-theme/css/global.css b/vuu-ui/themes/tar-theme/css/global.css new file mode 100644 index 000000000..eb6db5c35 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/global.css @@ -0,0 +1,40 @@ + +.tar-theme { + color: var(--salt-content-primary-foreground); + font-family: var(--salt-typography-fontFamily); + font-size: var(--salt-text-fontSize); + letter-spacing: var(--salt-text-letterSpacing); + line-height: var(--salt-text-lineHeight); +} + +.salt-theme ::selection { + background: var(--salt-content-foreground-highlight); +} + +.tar-theme[data-mode="light"] { + color-scheme: light; +} + +.tar-theme[data-mode="dark"] { + color-scheme: dark; +} + +/* Setting every element's box-sizing to border-box ensures the declared width +of the element is never exceeded due to padding or border. */ +*, +*::before, +*::after { + box-sizing: border-box; +} + +.salt-visuallyHidden { + position: absolute; + height: 1px; + width: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} diff --git a/vuu-ui/themes/tar-theme/css/palette/accent.css b/vuu-ui/themes/tar-theme/css/palette/accent.css new file mode 100644 index 000000000..acfc0c2b8 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/accent.css @@ -0,0 +1,11 @@ +.tar-theme[data-mode="light"] { + --salt-palette-accent-background: var(--salt-color-blue-500); + --salt-palette-accent-border: var(--salt-color-blue-500); + --salt-palette-accent-foreground: var(--salt-color-white); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-accent-background: var(--salt-color-blue-500); + --salt-palette-accent-border: var(--salt-color-blue-500); + --salt-palette-accent-foreground: var(--salt-color-white); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/error.css b/vuu-ui/themes/tar-theme/css/palette/error.css new file mode 100644 index 000000000..6b51c849d --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/error.css @@ -0,0 +1,13 @@ +.tar-theme[data-mode="light"] { + --salt-palette-error-background: var(--salt-color-red-10); + --salt-palette-error-background-selected: var(--salt-color-red-20); + --salt-palette-error-border: var(--salt-color-red-500); + --salt-palette-error-foreground: var(--salt-color-red-500); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-error-background: var(--salt-color-red-900); + --salt-palette-error-background-selected: var(--salt-color-red-900); + --salt-palette-error-border: var(--salt-color-red-500); + --salt-palette-error-foreground: var(--salt-color-red-500); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/info.css b/vuu-ui/themes/tar-theme/css/palette/info.css new file mode 100644 index 000000000..844ded139 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/info.css @@ -0,0 +1,11 @@ +.tar-theme[data-mode="light"] { + --salt-palette-info-background: var(--salt-color-blue-10); + --salt-palette-info-border: var(--salt-color-blue-500); + --salt-palette-info-foreground: var(--salt-color-blue-500); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-info-background: var(--salt-color-blue-900); + --salt-palette-info-border: var(--salt-color-blue-500); + --salt-palette-info-foreground: var(--salt-color-blue-500); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/interact.css b/vuu-ui/themes/tar-theme/css/palette/interact.css new file mode 100644 index 000000000..5cfc15301 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/interact.css @@ -0,0 +1,95 @@ +.tar-theme[data-mode="light"] { + --salt-palette-interact-background: transparent; + --salt-palette-interact-background-blurSelected: var(--salt-color-gray-30); + --salt-palette-interact-background-hover: var(--vuu-color-gray-10); + --salt-palette-interact-background-active: var(--vuu-color-gray-02); + --salt-palette-interact-background-disabled: var(--vuu-color-gray-35); + --salt-palette-interact-background-activeDisabled: var(--salt-color-blue-30-fade-background); + --salt-palette-interact-border: var(--vuu-color-gray-45); + --salt-palette-interact-border-active: var(--vuu-color-purple-10); + --salt-palette-interact-border-activeDisabled: var(--salt-color-blue-600-fade-fill); + --salt-palette-interact-border-disabled: var(--salt-color-gray-200-fade-border); + --salt-palette-interact-border-hover: var(--vuu-color-pink-10); + --salt-palette-interact-border-readonly: var(--salt-color-gray-200-fade-border-readonly); + --salt-palette-interact-foreground: var(--salt-color-gray-200); + --salt-palette-interact-foreground-active: var(--vuu-color-purple-10); + --salt-palette-interact-foreground-activeDisabled: var(--salt-color-blue-600-fade-foreground); + --salt-palette-interact-foreground-disabled: var(--salt-color-gray-200-fade-foreground); + --salt-palette-interact-foreground-hover: var(--salt-color-blue-500); + --salt-palette-interact-outline: var(--vuu-color-purple-10); + + --salt-palette-interact-cta-background: var(--tar-color-red-10); + --salt-palette-interact-cta-background-active: var(--tar-color-red-20); + --salt-palette-interact-cta-background-disabled: var(--tar-color-red-30); + --salt-palette-interact-cta-background-hover: var(--tar-color-red-20); + --salt-palette-interact-cta-foreground: var(--salt-color-white); + --salt-palette-interact-cta-foreground-active: var(--salt-color-white); + --salt-palette-interact-cta-foreground-disabled: var(--vuu-color-white-fade-70); + --salt-palette-interact-cta-foreground-hover: var(--salt-color-white); + + --salt-palette-interact-primary-background: var(--tar-color-gray-40); + --salt-palette-interact-primary-background-active: var(--tar-color-gray-30); + --salt-palette-interact-primary-background-disabled: var(--tar-color-gray-20); + --salt-palette-interact-primary-background-hover: var(--tar-color-gray-30); + --salt-palette-interact-primary-foreground: var(--salt-color-white); + --salt-palette-interact-primary-foreground-active: var(--salt-color-white); + --salt-palette-interact-primary-foreground-disabled: var(--tar-color-gray-10); + --salt-palette-interact-primary-foreground-hover: var(--salt-color-white); + + --salt-palette-interact-secondary-background: var(--salt-color-white); + --salt-palette-interact-secondary-background-active: var(--tar-color-gray-30); + --salt-palette-interact-secondary-background-disabled: transparent; + --salt-palette-interact-secondary-background-hover: var(--tar-color-gray-30); + --salt-palette-interact-secondary-foreground: var(--tar-color-gray-40); + --salt-palette-interact-secondary-foreground-active: var(--salt-color-white); + --salt-palette-interact-secondary-foreground-disabled: var(--tar-color-gray-20); + --salt-palette-interact-secondary-foreground-hover: var(--salt-color-white); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-interact-background: transparent; + --salt-palette-interact-background-active: var(--salt-color-blue-700); + --salt-palette-interact-background-blurSelected: var(--salt-color-gray-600); + --salt-palette-interact-background-hover: var(--salt-color-blue-800); + --salt-palette-interact-background-disabled: transparent; + --salt-palette-interact-background-activeDisabled: var(--salt-color-blue-700-fade-background); + --salt-palette-interact-border: var(--salt-color-gray-90); + --salt-palette-interact-border-active: var(--salt-color-blue-100); + --salt-palette-interact-border-activeDisabled: var(--salt-color-blue-100-fade-fill); + --salt-palette-interact-border-disabled: var(--salt-color-gray-90-fade-border); + --salt-palette-interact-border-hover: var(--salt-color-blue-500); + --salt-palette-interact-border-readonly: var(--salt-color-gray-90-fade-border-readonly); + --salt-palette-interact-foreground: var(--salt-color-gray-90); + --salt-palette-interact-foreground-active: var(--salt-color-blue-100); + --salt-palette-interact-foreground-activeDisabled: var(--salt-color-blue-100-fade-foreground); + --salt-palette-interact-foreground-disabled: var(--salt-color-gray-90-fade-foreground); + --salt-palette-interact-foreground-hover: var(--salt-color-blue-500); + --salt-palette-interact-outline: var(--vuu-color-pink-10); + + --salt-palette-interact-cta-background: var(--tar-color-red-10); + --salt-palette-interact-cta-background-active: var(--tar-color-red-20); + --salt-palette-interact-cta-background-disabled: var(--tar-color-red-40); + --salt-palette-interact-cta-background-hover: var(--tar-color-red-20); + --salt-palette-interact-cta-foreground: var(--salt-color-white); + --salt-palette-interact-cta-foreground-active: var(--salt-color-white); + --salt-palette-interact-cta-foreground-disabled: var(--salt-color-white-fade-foreground); + --salt-palette-interact-cta-foreground-hover: var(--salt-color-white); + + --salt-palette-interact-primary-background: var(--tar-color-gray-20); + --salt-palette-interact-primary-background-active: var(--tar-color-gray-10); + --salt-palette-interact-primary-background-disabled: var(--tar-color-gray-30); + --salt-palette-interact-primary-background-hover: var(--tar-color-gray-10); + --salt-palette-interact-primary-foreground: var(--tar-color-gray-70); + --salt-palette-interact-primary-foreground-active: var(--tar-color-gray-70); + --salt-palette-interact-primary-foreground-disabled: var(--tar-color-gray-40); + --salt-palette-interact-primary-foreground-hover: var(--tar-color-gray-70); + + --salt-palette-interact-secondary-background: var(--tar-color-gray-70); + --salt-palette-interact-secondary-background-active: var(--tar-color-gray-10); + --salt-palette-interact-secondary-background-disabled: transparent; + --salt-palette-interact-secondary-background-hover: var(--tar-color-gray-10); + --salt-palette-interact-secondary-foreground: var(--tar-color-gray-10); + --salt-palette-interact-secondary-foreground-active: var(--tar-color-gray-70); + --salt-palette-interact-secondary-foreground-disabled: var(--tar-color-gray-40); + --salt-palette-interact-secondary-foreground-hover: var(--tar-color-gray-70); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/navigate.css b/vuu-ui/themes/tar-theme/css/palette/navigate.css new file mode 100644 index 000000000..0c4bfea41 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/navigate.css @@ -0,0 +1,17 @@ +.tar-theme[data-mode="light"] { + --salt-palette-navigate-primary-background-active: transparent; + --salt-palette-navigate-foreground-hover: var(--salt-color-blue-600); + --salt-palette-navigate-foreground-active: var(--salt-color-blue-700); + --salt-palette-navigate-foreground-visited: var(--salt-color-purple-800); + --salt-palette-navigate-indicator-hover: var(--salt-color-gray-90); + --salt-palette-navigate-indicator-active: var(--tar-color-red-10); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-navigate-primary-background-active: transparent; + --salt-palette-navigate-foreground-hover: var(--salt-color-blue-200); + --salt-palette-navigate-foreground-active: var(--salt-color-blue-300); + --salt-palette-navigate-foreground-visited: var(--salt-color-purple-100); + --salt-palette-navigate-indicator-hover: var(--salt-color-gray-90); + --salt-palette-navigate-indicator-active: var(--vuu-color-pink-10); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/negative.css b/vuu-ui/themes/tar-theme/css/palette/negative.css new file mode 100644 index 000000000..62711b137 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/negative.css @@ -0,0 +1,7 @@ +.tar-theme[data-mode="light"] { + --salt-palette-negative-foreground: var(--salt-color-red-700); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-negative-foreground: var(--salt-color-red-300); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/neutral.css b/vuu-ui/themes/tar-theme/css/palette/neutral.css new file mode 100644 index 000000000..cff08b527 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/neutral.css @@ -0,0 +1,41 @@ +.tar-theme[data-mode="light"] { + --salt-palette-neutral-primary-background: var(--salt-color-white); + --salt-palette-neutral-primary-background-disabled: var(--vuu-color-gray-30); + --salt-palette-neutral-primary-background-readonly: var(--salt-color-white-fade-background-readonly); + --salt-palette-neutral-primary-foreground: var(--vuu-color-gray-80); + --salt-palette-neutral-primary-foreground-disabled: var(--salt-color-gray-900-fade-foreground); + --salt-palette-neutral-primary-separator: var(--tar-color-gray-05); + --salt-palette-neutral-primary-border: var(--tar-color-gray-40); + --salt-palette-neutral-primary-border-disabled: var(--salt-color-gray-50-fade-border); + --salt-palette-neutral-secondary-background: var(--vuu-color-gray-25); + --salt-palette-neutral-secondary-background-disabled: var(--salt-color-gray-20-fade-background); + --salt-palette-neutral-secondary-background-readonly: var(--salt-color-gray-20-fade-background-readonly); + --salt-palette-neutral-secondary-border: var(--vuu-color-gray-50); + --salt-palette-neutral-secondary-border-disabled: var(--salt-color-gray-50-fade-border); + --salt-palette-neutral-secondary-foreground: var(--salt-color-gray-200); + --salt-palette-neutral-secondary-foreground-disabled: var(--salt-color-gray-200-fade-foreground); + --salt-palette-neutral-backdrop: var(--salt-color-white-fade-backdrop); + --salt-palette-neutral-secondary-separator: var(--vuu-color-gray-05); + --salt-palette-neutral-tertiary-separator: var(--vuu-color-gray-03); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-neutral-primary-background: var(--tar-color-gray-70); + --salt-palette-neutral-primary-background-disabled: var(--salt-color-gray-800-fade-background); + --salt-palette-neutral-primary-background-readonly: var(--salt-color-gray-800-fade-background-readonly); + --salt-palette-neutral-primary-border: var(--tar-color-gray-25); + --salt-palette-neutral-primary-border-disabled: var(--salt-color-gray-300-fade-border); + --salt-palette-neutral-primary-foreground: var(--salt-color-white); + --salt-palette-neutral-primary-foreground-disabled: var(--salt-color-white-fade-foreground); + --salt-palette-neutral-primary-separator: var(--tar-color-gray-30); + --salt-palette-neutral-secondary-background: var(--salt-color-gray-600); + --salt-palette-neutral-secondary-background-disabled: var(--salt-color-gray-600-fade-background); + --salt-palette-neutral-secondary-background-readonly: var(--salt-color-gray-600-fade-background-readonly); + --salt-palette-neutral-secondary-border: var(--salt-color-gray-300); + --salt-palette-neutral-secondary-border-disabled: var(--salt-color-gray-300-fade-border); + --salt-palette-neutral-secondary-foreground: var(--salt-color-gray-70); + --salt-palette-neutral-secondary-foreground-disabled: var(--salt-color-gray-70-fade-foreground); + --salt-palette-neutral-backdrop: var(--salt-color-black-fade-backdrop); + --salt-palette-neutral-secondary-separator: var(--salt-color-white-fade-separatorOpacity-secondary); + --salt-palette-neutral-tertiary-separator: var(--salt-color-white-fade-separatorOpacity-tertiary); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/opacity.css b/vuu-ui/themes/tar-theme/css/palette/opacity.css new file mode 100644 index 000000000..e43d3f6bb --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/opacity.css @@ -0,0 +1,9 @@ +.tar-theme { + --salt-palette-opacity-backdrop: var(--salt-opacity-70); + --salt-palette-opacity-disabled: var(--salt-opacity-40); + --salt-palette-opacity-background-readonly: var(--salt-opacity-0); + --salt-palette-opacity-border-readonly: var(--salt-opacity-15); + --salt-palette-opacity-primary-border: var(--salt-opacity-40); + --salt-palette-opacity-secondary-border: var(--salt-opacity-25); + --salt-palette-opacity-tertiary-border: var(--salt-opacity-15); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/positive.css b/vuu-ui/themes/tar-theme/css/palette/positive.css new file mode 100644 index 000000000..39dfdfeb8 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/positive.css @@ -0,0 +1,7 @@ +.tar-theme[data-mode="light"] { + --salt-palette-positive-foreground: var(--salt-color-green-700); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-positive-foreground: var(--salt-color-green-300); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/success.css b/vuu-ui/themes/tar-theme/css/palette/success.css new file mode 100644 index 000000000..ca282c555 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/success.css @@ -0,0 +1,13 @@ +.tar-theme[data-mode="light"] { + --salt-palette-success-background: var(--salt-color-green-10); + --salt-palette-success-background-selected: var(--salt-color-green-20); + --salt-palette-success-border: var(--salt-color-green-500); + --salt-palette-success-foreground: var(--salt-color-green-500); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-success-background: var(--salt-color-green-900); + --salt-palette-success-background-selected: var(--salt-color-green-900); + --salt-palette-success-border: var(--salt-color-green-400); + --salt-palette-success-foreground: var(--salt-color-green-400); +} diff --git a/vuu-ui/themes/tar-theme/css/palette/warning.css b/vuu-ui/themes/tar-theme/css/palette/warning.css new file mode 100644 index 000000000..20bdce97b --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/palette/warning.css @@ -0,0 +1,13 @@ +.tar-theme[data-mode="light"] { + --salt-palette-warning-background: var(--salt-color-orange-10); + --salt-palette-warning-background-selected: var(--salt-color-orange-20); + --salt-palette-warning-border: var(--salt-color-orange-700); + --salt-palette-warning-foreground: var(--salt-color-orange-700); +} + +.tar-theme[data-mode="dark"] { + --salt-palette-warning-background: var(--salt-color-orange-900); + --salt-palette-warning-background-selected: var(--salt-color-orange-900); + --salt-palette-warning-border: var(--salt-color-orange-500); + --salt-palette-warning-foreground: var(--salt-color-orange-500); +} diff --git a/vuu-ui/themes/tar-theme/css/theme.css b/vuu-ui/themes/tar-theme/css/theme.css new file mode 100644 index 000000000..a5e6d3843 --- /dev/null +++ b/vuu-ui/themes/tar-theme/css/theme.css @@ -0,0 +1,48 @@ +/** + * We're using url importing for now. When performance becomes a concern, we can always run a + * scripts to massage them into one. Or even split them to theme specific ones. + */ + +/* Foundations (base values) */ +@import url(foundations/animation.css); +@import url(foundations/color.css); +@import url(foundations/duration.css); +@import url(foundations/fade.css); +@import url(foundations/opacity.css); +@import url(foundations/shadow.css); +@import url(foundations/size.css); +@import url(foundations/spacing.css); +@import url(foundations/typography.css); +@import url(foundations/zindex.css); + +/* Intermediate palette (refined colors) */ +@import url(palette/accent.css); +@import url(palette/error.css); +@import url(palette/info.css); +@import url(palette/interact.css); +@import url(palette/navigate.css); +@import url(palette/negative.css); +@import url(palette/neutral.css); +@import url(palette/opacity.css); +@import url(palette/positive.css); +@import url(palette/success.css); +@import url(palette/warning.css); + +/* Each characteristic file references values from above foundations */ +@import url(characteristics/accent.css); +@import url(characteristics/actionable.css); +@import url(characteristics/container.css); +@import url(characteristics/draggable.css); +@import url(characteristics/target.css); +@import url(characteristics/editable.css); +@import url(characteristics/focused.css); +@import url(characteristics/navigable.css); +@import url(characteristics/overlayable.css); +@import url(characteristics/selectable.css); +@import url(characteristics/separable.css); +@import url(characteristics/status.css); +@import url(characteristics/text.css); +@import url(characteristics/content.css); +@import url(characteristics/track.css); + +@import url(deprecated/foundations.css); \ No newline at end of file diff --git a/vuu-ui/themes/tar-theme/fonts/NunitoSans-Regular.woff b/vuu-ui/themes/tar-theme/fonts/NunitoSans-Regular.woff new file mode 100644 index 000000000..841827c89 Binary files /dev/null and b/vuu-ui/themes/tar-theme/fonts/NunitoSans-Regular.woff differ diff --git a/vuu-ui/themes/tar-theme/fonts/NunitoSansv15Latin.woff2 b/vuu-ui/themes/tar-theme/fonts/NunitoSansv15Latin.woff2 new file mode 100644 index 000000000..3a597c3dc Binary files /dev/null and b/vuu-ui/themes/tar-theme/fonts/NunitoSansv15Latin.woff2 differ diff --git a/vuu-ui/themes/tar-theme/fonts/SomeTypeMonov1-500.woff2 b/vuu-ui/themes/tar-theme/fonts/SomeTypeMonov1-500.woff2 new file mode 100644 index 000000000..6e4afe852 Binary files /dev/null and b/vuu-ui/themes/tar-theme/fonts/SomeTypeMonov1-500.woff2 differ diff --git a/vuu-ui/themes/tar-theme/index.css b/vuu-ui/themes/tar-theme/index.css new file mode 100644 index 000000000..6be451256 --- /dev/null +++ b/vuu-ui/themes/tar-theme/index.css @@ -0,0 +1,5 @@ +@import url(NunitoSans.css); +@import url(SomeTypeMono.css); +@import url(css/global.css); +@import url(css/theme.css); +@import url(css/components/components.css); diff --git a/vuu-ui/themes/tar-theme/package.json b/vuu-ui/themes/tar-theme/package.json new file mode 100644 index 000000000..d83795186 --- /dev/null +++ b/vuu-ui/themes/tar-theme/package.json @@ -0,0 +1,12 @@ +{ + "name": "@vuu-themes/tar-theme", + "version": "0.0.26", + "license": "Apache-2.0", + "style": "index.css", + "files": [ + "fonts" + ], + "scripts": { + "build": "node ../../scripts/run-build.mjs" + } +} diff --git a/vuu-ui/tools/vuu-showcase/src/App.tsx b/vuu-ui/tools/vuu-showcase/src/App.tsx index d7f56c822..56f57003f 100644 --- a/vuu-ui/tools/vuu-showcase/src/App.tsx +++ b/vuu-ui/tools/vuu-showcase/src/App.tsx @@ -37,7 +37,7 @@ const sourceFromImports = ( childNodes: sourceFromImports(stories, `${id}/`, "box"), }; }); - +// LIF00219931962 export interface AppProps { stories: ExamplesModule; } @@ -50,6 +50,7 @@ const availableThemes: ThemeDescriptor[] = [ { id: "no-theme", label: "No Theme" }, { id: "salt", label: "Salt" }, { id: "vuu", label: "Vuu" }, + { id: "tar", label: "Tar" }, ]; const availableThemeModes: ThemeModeDescriptor[] = [ @@ -155,6 +156,7 @@ export const App = ({ stories }: AppProps) => { No Theme SALT VUU + TAR - Object.entries(examples) - .filter(([path]) => path !== "default") - .reduce((routes, [label, Value]) => { - const id = `${prefix}${label}`; - return typeof Value === "object" - ? routes - .concat() - .concat(createRoutes(Value, `${id}/`)) - : routes.concat(); - }, []); - -interface AppRoutesProps { - stories: ExamplesModule; -} - -export const AppRoutes = ({ stories }: AppRoutesProps) => ( - - - }> - {createRoutes(stories)} - - - -); diff --git a/vuu-ui/tools/vuu-showcase/src/Showcase.tsx b/vuu-ui/tools/vuu-showcase/src/Showcase.tsx index ca8f81d8b..7f308572c 100644 --- a/vuu-ui/tools/vuu-showcase/src/Showcase.tsx +++ b/vuu-ui/tools/vuu-showcase/src/Showcase.tsx @@ -3,9 +3,30 @@ import "./themes/vuu"; import "./Showcase.css"; -import { AppRoutes } from "./AppRoutes"; +import { BrowserRouter, Route, Routes } from "react-router-dom"; import { ExamplesModule } from "./showcase-utils"; +import { App } from "./App"; + +const createRoutes = (examples: ExamplesModule, prefix = ""): JSX.Element[] => + Object.entries(examples) + .filter(([path]) => path !== "default") + .reduce((routes, [label, Value]) => { + const id = `${prefix}${label}`; + return typeof Value === "object" + ? routes + .concat() + .concat(createRoutes(Value, `${id}/`)) + : routes.concat(); + }, []); export const Showcase = ({ exhibits }: { exhibits: ExamplesModule }) => { - return ; + return ( + + + }> + {createRoutes(exhibits)} + + + + ); }; diff --git a/vuu-ui/tools/vuu-showcase/src/ShowcaseStandalone.tsx b/vuu-ui/tools/vuu-showcase/src/ShowcaseStandalone.tsx index 59a3c53e9..1f43311ef 100644 --- a/vuu-ui/tools/vuu-showcase/src/ShowcaseStandalone.tsx +++ b/vuu-ui/tools/vuu-showcase/src/ShowcaseStandalone.tsx @@ -18,6 +18,10 @@ const asThemeMode = (input: string | undefined): ThemeMode => { } }; +const themeIsInstalled = (theme = "no-theme") => { + return ["salt", "vuu", "tar"].includes(theme); +}; + const asDensity = (input: string | undefined): Density => { if (input === "high" || input === "low" || input === "touch") { return input; @@ -58,19 +62,10 @@ export const ShowcaseStandalone = () => { }, []); useMemo(() => { - switch (theme) { - case "vuu": - import("./themes/vuu").then(() => { - setThemeReady(true); - }); - break; - case "salt": - import("./themes/salt").then(() => { - setThemeReady(true); - }); - break; - default: - // do nothing + if (themeIsInstalled(theme)) { + import(`./themes/${theme}.ts`).then(() => { + setThemeReady(true); + }); } }, [theme]); diff --git a/vuu-ui/tools/vuu-showcase/src/themes/tar.ts b/vuu-ui/tools/vuu-showcase/src/themes/tar.ts new file mode 100644 index 000000000..4fe27182e --- /dev/null +++ b/vuu-ui/tools/vuu-showcase/src/themes/tar.ts @@ -0,0 +1,2 @@ +import "@vuu-themes/tar-theme/index.css"; +import "@finos/vuu-icons/index.css";