1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00
bitwarden-browser/libs/components/tailwind.config.base.js
Shane Melton 3d0e0d261e
[PM-6825] Browser Refresh - Initial List Items (#9199)
* [PM-6825] Add temporary vault page header

* [PM-6825] Expose cipherViews$ observable

* [PM-6825] Refactor getAllDecryptedForUrl to expose filter functionality for reuse

* [PM-6825] Introduce VaultPopupItemsService

* [PM-6825] Introduce initial VaultListItem and VaultListItemsContainer components

* [PM-6825] Add VaultListItems to VaultV2 component

* [PM-6825] Introduce autofill-vault-list-items.component to encapsulate autofill logic

* [PM-6825] Add temporary Vault icon

* [PM-6825] Add empty and no results states to Vault tab

* [PM-6825] Add unit tests for vault popup items service

* [PM-6825] Negate noFilteredResults placeholder

* [PM-6825] Cleanup new Vault components

* [PM-6825] Move new components into its own module

* [PM-6825] Fix missing button type

* [PM-6825] Add booleanAttribute to showAutofill input

* [PM-6825] Replace empty refresh BehaviorSubject with Subject

* [PM-6825] Combine *ngIfs for vault list items container

* [PM-6825] Use popup-section-header component

* [PM-6825] Use small variant for icon buttons

* [PM-6825] Use anchor tag for vault items

* [PM-6825] Consolidate vault-list-items-container to include list item component functionality directly

* [PM-6825] Add Tailwind classes to new Vault icon

* [PM-6825] Remove temporary header comment

* [PM-6825] Fix auto fill suggestion font size and padding

* [PM-6825] Use tailwind for vault icon styling

* [PM-6825] Add libs/angular to tailwind.config content

* [PM-6825] Cleanup missing i18n

* [PM-6825] Make VaultV2 standalone and cleanup Browser App module

* [PM-6825] Use explicit type annotation

* [PM-6825] Use property binding instead of interpolation
2024-05-21 17:05:02 -04:00

130 lines
3.6 KiB
JavaScript

/* eslint-disable */
const colors = require("tailwindcss/colors");
const plugin = require("tailwindcss/plugin");
function rgba(color) {
return "rgb(var(" + color + ") / <alpha-value>)";
}
module.exports = {
prefix: "tw-",
content: [
"./src/**/*.{html,ts}",
"../../libs/components/src/**/*.{html,ts}",
"../../libs/auth/src/**/*.{html,ts}",
],
safelist: [],
corePlugins: { preflight: false },
theme: {
colors: {
transparent: {
DEFAULT: colors.transparent,
hover: "var(--color-transparent-hover)",
},
current: colors.current,
black: colors.black,
primary: {
// Can only be used behind the extension refresh flag
100: rgba("--color-primary-100"),
300: rgba("--color-primary-300"),
// Can only be used behind the extension refresh flag
500: rgba("--color-primary-500"),
600: rgba("--color-primary-600"),
700: rgba("--color-primary-700"),
},
secondary: {
100: rgba("--color-secondary-100"),
300: rgba("--color-secondary-300"),
600: rgba("--color-secondary-600"),
700: rgba("--color-secondary-700"),
},
success: {
600: rgba("--color-success-600"),
700: rgba("--color-success-700"),
},
danger: {
600: rgba("--color-danger-600"),
700: rgba("--color-danger-700"),
},
warning: {
600: rgba("--color-warning-600"),
700: rgba("--color-warning-700"),
},
info: {
600: rgba("--color-info-600"),
700: rgba("--color-info-700"),
},
text: {
main: rgba("--color-text-main"),
muted: rgba("--color-text-muted"),
contrast: rgba("--color-text-contrast"),
alt2: rgba("--color-text-alt2"),
code: rgba("--color-text-code"),
headers: rgba("--color-text-headers"),
},
background: {
DEFAULT: rgba("--color-background"),
alt: rgba("--color-background-alt"),
alt2: rgba("--color-background-alt2"),
alt3: rgba("--color-background-alt3"),
alt4: rgba("--color-background-alt4"),
},
},
textColor: {
main: rgba("--color-text-main"),
muted: rgba("--color-text-muted"),
contrast: rgba("--color-text-contrast"),
headers: rgba("--color-text-headers"),
alt2: rgba("--color-text-alt2"),
code: rgba("--color-text-code"),
success: rgba("--color-success-600"),
danger: rgba("--color-danger-600"),
warning: rgba("--color-warning-600"),
info: rgba("--color-info-600"),
primary: {
300: rgba("--color-primary-300"),
600: rgba("--color-primary-600"),
700: rgba("--color-primary-700"),
},
},
ringOffsetColor: ({ theme }) => ({
DEFAULT: theme("colors.background"),
...theme("colors"),
}),
extend: {
width: {
"50vw": "50vw",
"75vw": "75vw",
},
minWidth: {
52: "13rem",
},
maxWidth: ({ theme }) => ({
...theme("width"),
"90vw": "90vw",
}),
},
},
plugins: [
plugin(function ({ matchUtilities, theme, addUtilities, addComponents, e, config }) {
matchUtilities(
{
"mask-image": (value) => ({
"-webkit-mask-image": value,
"mask-image": value,
}),
"mask-position": (value) => ({
"-webkit-mask-position": value,
"mask-position": value,
}),
"mask-repeat": (value) => ({
"-webkit-mask-repeat": value,
"mask-repeat": value,
}),
},
{},
);
}),
],
};