1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

523 Commits

Author SHA1 Message Date
Vicki League
6811ea4c0b [CL-707] Migrate CL codebase to signals (#15340) 2025-07-16 08:39:37 -04:00
Jared Snider
b2c2bb4c55 CL-765 - AnonLayoutWrapperComponents - make hideIcon reset properly. (#15610) 2025-07-14 16:56:10 -04:00
Vicki League
2f1ab48c37 [CL-750][CL-751][CL-752] Fix nav item truncation, clickable area, and shield logo (#15522) 2025-07-10 17:02:42 -04:00
Vicki League
8c3c5ab861 [CL-759] Remove browser style overrides for checkbox (#15552) 2025-07-10 09:14:46 -04:00
Bryan Cunningham
682f1f83d9 [CL-295] Use aria-disabled on buttons (#15009)
* Use aria-disabled for button disabled state

* remove import from testing story

* use aria-disabled attr on bitLink button

* remove unnecessary story attrs

* remove disabled attr if on button element

* create caprture click util

* use caprture click util and fix tests

* fix lint errors

* fix event type

* combine click capture and attr modification

* fix lint error. Commit spec changes left out of last commit in error

* inject element ref

* move aria-disabled styles to common

* move disabled logic into util

* fix broken async actions stories

* fix broken tests asserting disabled attr

* have test check for string true vlalue

* fix Signal type

* fix form-field story import

* remove injector left in error

* aria-disable icon buttons

* update form component css selector to look for aria-disabled buttons

* use correct types. pass nativeElement directly

* add JSDoc comment for util function

---------

Co-authored-by: Will Martin <contact@willmartian.com>
2025-07-08 16:13:25 -04:00
Bryan Cunningham
a6ae7d23f7 [CL-686] updated hover states (#15463) 2025-07-07 11:28:38 -04:00
Bryan Cunningham
b4d87007ba [CL-718] nav updates (#15226)
* add basic new nav item styling

* update alt-3 bg color

* add x padding to item

* remove copy left in error

* style app switcher to match nav items

* adding new button hover colors

* add new logo lockups

* use new logos in web vault

* fix color and svg fills

* use set height for nav items

* optimize SVGs

* move if logic

* use rem for icon size

* move shield logo

* use shield svg for collapsed icon

* remove unused eslint disable directive

* run prettier

* remove variables

* update logo hover styles

* use more standard flow control syntax

* update admin console logo svg

* add new hover variables

* use class instead of fill

* use variable for logo hover

* remove unnecessary container

* use hover variable for nav switcher

* use correct variables for fill colors

* update hover state to use variable left in error

* give icon width to preserve text alignment

* remove tree story as functionality no longer supported

* remove nested styles helper

* remove obsolete afterContentInit

* remove tree example from layout story

* remove tree example from secondary layout story

* remove tree example from kitchen sink story

* Fix interaction test

* remove remaining references to tree variant
2025-07-03 16:12:56 -04:00
Vicki League
3e4b82d725 [CL-748] Support nondismissable dialogs and simple dialogs (#15464) 2025-07-03 15:23:21 -04:00
Bryan Cunningham
913c3ddbec [CL-620] add padding to increase checkbox clickable area (#15331)
* add padding to increaase checkbox clickable area

* fix checkbox story imports

* enlarge click area of checkbox w/out label

* apply disabled states to before

* WIP

* revert experimental changes

* add negative margin to account for extra padding

* Remove margin from checkbox and apply in form control

* Remove margin from radio as it's applied in form control

* add back line height removed in error
2025-07-03 12:14:10 -04:00
Nick Krantz
ab4af7deed [PM-22179] Redirect user to /setup-extension (#15375)
* add end user feature flag

* add initial setup extension component and route

* redirect users from registration completion to the setup extension page

* add `hideIcon` to anon layout for web
- matches implementation on the browser.

* integrate with anon layout for extension wrapper

* add initial loading state

* conditionally redirect the user upon initialization

* redirect the user to the vault if the extension is installed

* add initial copy for setup-extension page

* add confirmation dialog for skipping the extension installation

* add success state for setup extension page

* only show loggedin toast when end user activation is not enabled.

* add image alt

* lower threshold for polling extension

* close the dialog when linking to the vault

* update party colors

* use the platform specific registration service to to only forward the web registrations to `/setup-extension`

* call `super` rather than `/vault` directly, it could change in the future
2025-07-03 06:14:25 -05:00
Bryan Cunningham
023b057f3e [CL-124] Add validator stories (#15400)
* adding validation stories

* add one story for all validations

* fix form field story import

* move validation docs

* fix maxValue default value

* add play function to submit form
2025-07-02 14:08:05 -04:00
Jason Ng
f9d0e6fe4a [CL-572] adding new colors for icons, update icon docs (#15367)
* adding new colors for icons, update icon docs, remove art from colors mdx
2025-06-30 15:10:01 -04:00
Jared Snider
64eb9b56d7 feat(anon-layout): [Auth/PM-17737] AnonLayout - Consolidate and extend max width control (#15362)
* PM-17737 - feat(anon-layout-width) - consolidate width setting to control title, subtitle, and content together for a unified UX. Removes all titleAreaMaxWidth usages and the titleAreaMaxWidth property entirely.

* PM-17737 - AnonLayout - consolidate stories into playground (w/ the exception of default icon story b/c I can't figure how to omit the icon conditionally).

* PM-17737 - AnonLayoutStories - show secondary content by default

* PM-17737 - Per PR feedback, adjust maxWidthClass logic to remove string concatenation as it can result in tailwind classes not being compiled and available at run time.

* PM-17737 - Per PR feedback, refactor stories to use configuration to generate all the scenarios so we can still track them via snapshots

* PM-17737 - Fix anon layout mdx reference

* PM-17737 - Make AnonLayoutMaxWidths singular

* PM-17737 - When inside of a max width container, the icon container needs explicit width to be able to scale viewbox icons that don't have defined heights / widths
2025-06-30 13:47:31 -04:00
Vicki League
a2fd4a3779 [PM-16291] Prevent parent components from closing when esc key is pressed on select and menu (#15214) 2025-06-30 11:03:24 -04:00
Vicki League
04ddea5bf3 [CL-473] Adjust popup page max width and scroll containers (#14853) 2025-06-30 09:39:39 -04:00
Vicki League
34a338930a [CL-613] Support non-card primary content in anon-layout (#15273) 2025-06-26 17:09:25 -04:00
Shane Melton
e8f53fe9b7 [PM-22756] Send minimizeOnCopy message during copy on Desktop platform (#15232)
* [PM-22756] Send minimizeOnCopy message during copy on Desktop platform

* [PM-22756] Introduce optional CopyClickListener pattern

* [PM-22756] Introduce CopyService that wraps PlatformUtilsService.copyToClipboard to allow scoped implementations

* [PM-22756] Introduce DesktopVaultCopyService that sends the minimizeOnCopy message

* [PM-22756] Remove leftover onCopy method

* [PM-22756] Fix failing tests

* [PM-22756] Revert CopyService solution

* [PM-22756] Cleanup

* [PM-22756] Update test

* [PM-22756] Cleanup leftover test changes
2025-06-18 14:44:21 -07:00
Vicki League
df4aae2fb2 [CL-700] Move auth-owned layout components to UIF ownership (#15093) 2025-06-17 13:33:01 -04:00
Will Martin
b8a1856fc6 [CL-696] un-revert "various drawer improvements" + bug fix (#14887)
* Revert "Revert "[CL-622][CL-562][CL-621][CL-632] various drawer improvements …"

This reverts commit 4b32d1f9dd.

* fix virtual scroll: add .cdk-virtual-scrollable to scroll viewport target

* remove references to main el

* use directives instead of querySelector (#14950)

* remove references to main el

* wip

* banish querySelector to the shadow realm

* revert apps/ files

* Add virtual scrolling docs

Co-authored-by: Vicki League <vleague@bitwarden.com>

* add jsdoc

* run eslint

* fix skip links bug

* Update libs/components/src/layout/layout.component.ts

Co-authored-by: Vicki League <vleague@bitwarden.com>

* update tab handler

* only run on tab

* fix lint

* fix virtual scroll issue due to Angular 19 upgrade (#15193)

thanks Vicki

---------

Co-authored-by: Vicki League <vleague@bitwarden.com>
2025-06-17 11:05:14 -04:00
Bryan Cunningham
f76e80f3cd [CL-688] Callout UI updates (#15152)
* refresh callout ui

* fix callout padding

* Use more descriptive example text

* position icon. Change padding back
2025-06-13 14:12:45 -04:00
Vicki League
0e1d48179d [PM-13196] Hide decorative chip select icons from screenreaders (#14990) 2025-06-12 16:27:26 -04:00
Bryan Cunningham
8b42edf9dc [CL-687] Updated dark mode color variables (#15123)
* updated dark mode color variables

* update light versions to match
2025-06-11 11:54:15 -04:00
Bryan Cunningham
3e4c37b8b3 [CL-194] add vertical stepper to CL (#14528)
* Copy Vertical stepper into CL

* remove unused input

* add docs around vertical step usage

* use signal inputs

* add vertical step story

* enhance documentation

* WIP

* Rename to Stepper

* adds horizontal stepper

* updated view logic

* add resizeobserver directive

* add basic responsizeness to stepper

* add comment about stateChanged method

* update responsive logic

* reformat with prettier

* remove obsolete applyBorder input

* fix step type mismatch

* fix incorrect step import

* fix borken disabled logic

* fix class logic

* move tabpanel out of tablist. correctly increment ids

* make map private

* use accordion attributes for vertical stepper

* barrel export directive

* fixing types

* remove now obsolete step-content

* reimplement constructors to fix storybook not rendering

* move padding to different container

* move map and observer into directive

* remove useless test for now

* add comment about constructor implementation

* add template variable for disabled state

* fix typo

* simplify resize observer directive logic

* add jsdoc description

* use typography directive

* use the variable for step disabled

* Update libs/components/src/stepper/stepper.mdx

Co-authored-by: Vicki League <vleague@bitwarden.com>

---------

Co-authored-by: Will Martin <contact@willmartian.com>
Co-authored-by: Vicki League <vleague@bitwarden.com>
2025-06-06 14:04:01 -04:00
Oscar Hinton
e8e2181252 Migrate remaining components to standalone in libs/components (#15053)
Migrates the remaining non standalone components from libs/components. Also resolved some linting ignores and applying strict typescript.
2025-06-05 09:52:53 +02:00
Will Martin
a17cc0b265 [CL-640] update bit-simple-dialog styles (#14916) 2025-06-04 15:21:17 -04:00
Nick Krantz
65f4ff6909 [PM-21791] Nudge UI Bug Fixes (#15010)
* remove margin bottom from empty vault nudge

* update page title to vault options

* show badge on import of vault settings

* add margin between no items title and icon

* add mock to test

* add comment for destroying vault settings page

* fix logic for manage/create collection

* account for deleted ciphers when showing the import nudge

* refactor name of vault import nudge
2025-06-04 08:07:44 -05:00
Addison Beck
26caeb3083 Implement and extend tsconfig.base across projects (#14554)
* Implement and extend tsconfig.base across projects

* fixup! Merge remote-tracking branch 'origin/main' into rename-tsconfig

* fix: import tsconfig.base from components

* fix: skip typechecking node modules

* fixing tests

* fix the tests for real

* undo accidentally change
2025-06-02 20:38:17 +00:00
Oscar Hinton
26fb7effd3 Remove standalone true from platform and UIF (#15032)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 20:03:04 +02:00
Oscar Hinton
2fbc4c1578 [CL-525] Upgrade angular to v19 (#14815)
Upgrade Angular to v19 using the update guide.

- Add `standalone: false` to any missed component in stories or tests.
- Update jest.config to follow the new best practices.
2025-06-02 13:13:31 -04:00
Bryan Cunningham
c215fac818 [CL-703] Use logical css properties in CL components (#14951)
* update usage of margin-right with margin-inline-end

* update usage of margin-left with margin-inline-start

* update usage of paddiing-right with padding-inline-end

* update usage of paddiing-left with padding-inline-start

* update usage of radius to use logical properties
2025-06-02 12:05:30 -04:00
Bryan Cunningham
5eb8d7b181 [CL-208][CL-339] Enhance Storybook docs pages (#14838)
* rearrange button docs

* Enhance avatar docs

* Enhance badge  docs

* Enhance banner docs

* add util to format args for snippets

* update banner snippets

* WIP

* bind boolean args so they work correctly in Storybook

* simplify button stories

* Update callout docs

* use title component for checkbox docs

* use title and description  component for chip select docs

* update color password story docs

* update disclosure docs

* add import to icon docs

* updated icon-button docs

* update link docs

* Update prgress docs

* updated search field docs

* remove html type definitions

* add import for progress

* updated toast docs

* remove example from docs. format args for snippet

* Update badges docs

* handle array arg values correctly

* Update badges list docs

* fix dupe key error from taost story

* remove unnecessary typeof check

* remove banner usage example

* add breadcrumbs import statement and jsdoc

* add color password import statement

* fixing type mismaches

* fix typos

* Add missing generics to format function

* fix typo

* update callout icon spacing to match Figma

* add back max width container
2025-05-30 12:38:40 -04:00
Will Martin
ec27abfb81 [UIF] add missing directive import to virtual scroll table (#14846) 2025-05-19 15:15:15 -04:00
Vicki League
4b32d1f9dd Revert "[CL-622][CL-562][CL-621][CL-632] various drawer improvements (#14120)" (#14827)
This reverts commit a0429d7d09.
2025-05-16 16:02:03 -04:00
Oscar Hinton
c8629b92d3 [CL-694] Remove unused imports (#14795)
* Remove unused imports

* Remove more unused imports
2025-05-16 17:11:18 +02:00
Vicki League
07659184ad [CL-627] Allow menu to open above trigger without blocking trigger (#14675) 2025-05-16 09:17:42 -04:00
Oscar Hinton
ac49e594c1 Add standalone false to all non migrated (#14797)
Adds standalone: false to all components since Angular is changing the default to true and we'd rather not have the angular PR change 300+ files.
2025-05-15 10:44:07 -04:00
Will Martin
a0429d7d09 [CL-622][CL-562][CL-621][CL-632] various drawer improvements (#14120)
- add focus trap to drawers
- add config to open existing dialogs as drawers
- make drawer take up fill width/height on smaller screens
2025-05-15 10:32:52 -04:00
Oscar Hinton
13f97236f2 [CL-659] Replace CL non tw css classes with data attributes (#14421)
The component library currently uses classes to determine fvw target, default content and main content. This replaces them with data attributes which avoids the css class linter from detecting them as invalid classes.
2025-05-14 20:14:27 +02:00
Patrick-Pimentel-Bitwarden
0b0397c3f0 fix(enums-eslint): Enum Rule for ESLint (#14650)
* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums.

* fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums.

* fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion.

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places.

* fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
2025-05-13 10:07:38 -04:00
Bryan Cunningham
4d15f2d43c [PM-16057] use Roboto as primary font (#14553)
* swap to using roboto variable font
2025-05-12 09:00:01 -04:00
Daniel James Smith
26ecf3191c Fix angular performance issue on color-password.component (#14560)
* Fix performance issue, by using track $index instead of character as it can contain duplicate characters

* Migrate component to use Angular signal inputs

* Make file ts-strict compliant

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-05-08 17:19:09 -04:00
Oscar Hinton
78dafe2265 Cleanup migrated components (#14625)
Cleans up migrated components by removing unnecessary old behaviour.

- Removes ng-template and ViewChild used by the old Modal Service.
- Remove aria-dismiss used by old Modals.
- Remove aria-haspopup and aria-expanded on bitMenuTriggerFor since it's handled by the directive.
2025-05-08 09:16:11 -07:00
Vicki League
8ecb32f30f [CL-333] Icon Refresh Feature Branch (#14298)
* [CL-571] Update icons to new fileset and metaphors (#14163)

* [CL-518] Convert icons docs to stories (#14299)

* [CL-574] Update inline autofill icons (#14379)

---------

Co-authored-by: William Martin <contact@willmartian.com>
2025-05-07 17:07:14 -04:00
Vicki League
a408990a3c [CL-248] Update Storybook intro docs (#14253)
* [CL-248] Update Storybook intro docs

* add common edge cases

* more updates
2025-05-05 13:28:13 -04:00
Will Martin
c61bb3dc70 [PM-21121] fix(select): update selected item when items input changes (#14609) 2025-05-05 13:25:28 -04:00
Nick Krantz
de6b58c10a [PM-20110] Disabled copy buttons on vault (#14549)
* export BitIconButtonComponent from component library

* manually update the disabled state of the icon button for copy cipher field directive

* add tests for `CopyCipherFieldDirective`
2025-05-01 12:44:08 -05:00
renovate[bot]
f39e37002b [deps] Autofill: Update prettier to v3.5.3 (#14480)
* [deps] Autofill: Update prettier to v3.5.3

* prettier formatting updates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
2025-04-29 16:40:58 -04:00
Bryan Cunningham
116751d4ca add small button variant (#14326)
* adds small button size variant

* makes small icon button same size as small button

* testing small button for extension header

* remove extension changes

* update popout layout story

* revert change to small icon button padding

* add whitespace to see if error resolves

* default buttonType to primary

* default buttonType to secondary

* add comment around why nonNullButtonSize value exists

* add comment to  property about using the non null version

* Update apps/browser/src/platform/popup/layout/popup-layout.stories.ts

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* updated input syntax when using static values

* remove nonNull value coersion

* allow changing of size input in Story

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2025-04-24 15:34:29 -04:00
Oscar Hinton
490a46e9b6 [PM-19923] Update autofocus directive to be more aggressive in focusing (#14368)
* Update autofocus directive to be more aggressive in focusing

* Handle checkVisibility not existing (safari < 17.4)

* Tweak phrasing

* Change approach
2025-04-22 11:46:35 -05:00
Bryan Cunningham
cbab354c0e Hide bit-icon component from screen readers by default (#14295)
* adds aria-hidden to bit-icon when no aria-label provided

* add ariaLabel to logo svg usages

* add ariaLabel documentation

* default ariaLable value to undefined

* add logo label to translations

* adds i18n pipe to component

* Add binding to example docs
2025-04-18 10:38:19 -04:00