From ba824e9718d7bc63a9ea7d67128c301db2fc250b Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Thu, 15 Sep 2022 10:20:30 +0200 Subject: [PATCH 1/9] [EC-556] feat: convert button into component --- .../{button.directive.spec.ts => button.component.spec.ts} | 0 .../button/{button.directive.ts => button.component.ts} | 7 ++++--- libs/components/src/button/button.module.ts | 6 +++--- libs/components/src/button/button.stories.ts | 6 +++--- libs/components/src/button/index.ts | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) rename libs/components/src/button/{button.directive.spec.ts => button.component.spec.ts} (100%) rename libs/components/src/button/{button.directive.ts => button.component.ts} (92%) diff --git a/libs/components/src/button/button.directive.spec.ts b/libs/components/src/button/button.component.spec.ts similarity index 100% rename from libs/components/src/button/button.directive.spec.ts rename to libs/components/src/button/button.component.spec.ts diff --git a/libs/components/src/button/button.directive.ts b/libs/components/src/button/button.component.ts similarity index 92% rename from libs/components/src/button/button.directive.ts rename to libs/components/src/button/button.component.ts index 59e7b4269f77..cdf6c5afa5a8 100644 --- a/libs/components/src/button/button.directive.ts +++ b/libs/components/src/button/button.component.ts @@ -1,4 +1,4 @@ -import { Input, HostBinding, Directive } from "@angular/core"; +import { Input, HostBinding, Component } from "@angular/core"; export type ButtonTypes = "primary" | "secondary" | "danger"; @@ -38,10 +38,11 @@ const buttonStyles: Record = { ], }; -@Directive({ +@Component({ selector: "button[bitButton], a[bitButton]", + template: "", }) -export class ButtonDirective { +export class ButtonComponent { @HostBinding("class") get classList() { return [ "tw-font-semibold", diff --git a/libs/components/src/button/button.module.ts b/libs/components/src/button/button.module.ts index c9c3822abfac..448e7c9dcf64 100644 --- a/libs/components/src/button/button.module.ts +++ b/libs/components/src/button/button.module.ts @@ -1,11 +1,11 @@ import { CommonModule } from "@angular/common"; import { NgModule } from "@angular/core"; -import { ButtonDirective } from "./button.directive"; +import { ButtonComponent } from "./button.component"; @NgModule({ imports: [CommonModule], - exports: [ButtonDirective], - declarations: [ButtonDirective], + exports: [ButtonComponent], + declarations: [ButtonComponent], }) export class ButtonModule {} diff --git a/libs/components/src/button/button.stories.ts b/libs/components/src/button/button.stories.ts index 35a7dbfe8296..c32d3fd8a4b4 100644 --- a/libs/components/src/button/button.stories.ts +++ b/libs/components/src/button/button.stories.ts @@ -1,10 +1,10 @@ import { Meta, Story } from "@storybook/angular"; -import { ButtonDirective } from "./button.directive"; +import { ButtonComponent } from "./button.component"; export default { title: "Component Library/Button", - component: ButtonDirective, + component: ButtonComponent, args: { buttonType: "primary", }, @@ -16,7 +16,7 @@ export default { }, } as Meta; -const Template: Story = (args: ButtonDirective) => ({ +const Template: Story = (args: ButtonComponent) => ({ props: args, template: ` diff --git a/libs/components/src/button/index.ts b/libs/components/src/button/index.ts index 1bdd62ddbcf6..ff86120cb113 100644 --- a/libs/components/src/button/index.ts +++ b/libs/components/src/button/index.ts @@ -1,2 +1,2 @@ -export * from "./button.directive"; +export * from "./button.component"; export * from "./button.module"; From b14b7d90a74b12c3d2f988f02fa036a0482509f2 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Thu, 15 Sep 2022 11:49:05 +0200 Subject: [PATCH 2/9] [EC-556] feat: implement loading state --- .../src/button/button.component.html | 8 +++ .../src/button/button.component.spec.ts | 49 ++++++++++++++++++- .../components/src/button/button.component.ts | 13 +++-- libs/components/src/button/button.stories.ts | 25 +++++++--- 4 files changed, 80 insertions(+), 15 deletions(-) create mode 100644 libs/components/src/button/button.component.html diff --git a/libs/components/src/button/button.component.html b/libs/components/src/button/button.component.html new file mode 100644 index 000000000000..4875c159e926 --- /dev/null +++ b/libs/components/src/button/button.component.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/libs/components/src/button/button.component.spec.ts b/libs/components/src/button/button.component.spec.ts index a7c3024e4801..46d9c48fab0c 100644 --- a/libs/components/src/button/button.component.spec.ts +++ b/libs/components/src/button/button.component.spec.ts @@ -60,16 +60,61 @@ describe("Button", () => { expect(buttonDebugElement.nativeElement.classList.contains("tw-block")).toBe(false); expect(linkDebugElement.nativeElement.classList.contains("tw-block")).toBe(false); }); + + it("should not be disabled when loading and disabled are false", () => { + testAppComponent.loading = false; + testAppComponent.disabled = false; + fixture.detectChanges(); + + expect(buttonDebugElement.attributes["loading"]).toBeFalsy(); + expect(linkDebugElement.attributes["loading"]).toBeFalsy(); + expect(buttonDebugElement.nativeElement.disabled).toBeFalsy(); + }); + + it("should be disabled when disabled is true", () => { + testAppComponent.disabled = true; + fixture.detectChanges(); + + expect(buttonDebugElement.nativeElement.disabled).toBeTruthy(); + // Anchor tags cannot be disabled. + }); + + it("should be disabled when loading is true", () => { + testAppComponent.loading = true; + fixture.detectChanges(); + + expect(buttonDebugElement.nativeElement.disabled).toBeTruthy(); + }); }); @Component({ selector: "test-app", template: ` - - Link + + + Link + `, }) class TestApp { buttonType: string; block: boolean; + disabled: boolean; + loading: boolean; } diff --git a/libs/components/src/button/button.component.ts b/libs/components/src/button/button.component.ts index cdf6c5afa5a8..b5f8ae74491e 100644 --- a/libs/components/src/button/button.component.ts +++ b/libs/components/src/button/button.component.ts @@ -40,7 +40,7 @@ const buttonStyles: Record = { @Component({ selector: "button[bitButton], a[bitButton]", - template: "", + templateUrl: "button.component.html", }) export class ButtonComponent { @HostBinding("class") get classList() { @@ -64,9 +64,12 @@ export class ButtonComponent { .concat(buttonStyles[this.buttonType ?? "secondary"]); } - @Input() - buttonType: ButtonTypes = null; + @HostBinding("attr.disabled") get disabledAttr() { + return this.disabled || this.loading ? true : null; + } - @Input() - block = false; + @Input() buttonType: ButtonTypes = null; + @Input() block = false; + @Input() loading = false; + @Input() disabled = false; } diff --git a/libs/components/src/button/button.stories.ts b/libs/components/src/button/button.stories.ts index c32d3fd8a4b4..33f964d678d3 100644 --- a/libs/components/src/button/button.stories.ts +++ b/libs/components/src/button/button.stories.ts @@ -7,6 +7,8 @@ export default { component: ButtonComponent, args: { buttonType: "primary", + disabled: false, + loading: false, }, parameters: { design: { @@ -19,8 +21,8 @@ export default { const Template: Story = (args: ButtonComponent) => ({ props: args, template: ` - - Link + + Link `, }); @@ -39,16 +41,23 @@ Danger.args = { buttonType: "danger", }; -const DisabledTemplate: Story = (args) => ({ +const AllStylesTemplate: Story = (args) => ({ props: args, template: ` - - - + + + `, }); -export const Disabled = DisabledTemplate.bind({}); +export const Disabled = AllStylesTemplate.bind({}); Disabled.args = { - size: "small", + disabled: true, + loading: false, +}; + +export const Loading = AllStylesTemplate.bind({}); +Loading.args = { + disabled: false, + loading: true, }; From de182ce0985fad98e492613f5677ec5b9d49db20 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Thu, 15 Sep 2022 11:50:31 +0200 Subject: [PATCH 3/9] [EC-556] feat: remove loading from submit button --- .../src/submit-button/submit-button.component.html | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libs/components/src/submit-button/submit-button.component.html b/libs/components/src/submit-button/submit-button.component.html index f3c097b2f342..efb78074cdf6 100644 --- a/libs/components/src/submit-button/submit-button.component.html +++ b/libs/components/src/submit-button/submit-button.component.html @@ -1,10 +1,3 @@ - From 0137674771eab365a6cf48c711b65f69dff92446 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Fri, 16 Sep 2022 14:48:49 +0200 Subject: [PATCH 4/9] [EC-556] fix: add missing import --- libs/components/src/button/button.stories.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/components/src/button/button.stories.ts b/libs/components/src/button/button.stories.ts index 442258eff0ed..668e456cb05b 100644 --- a/libs/components/src/button/button.stories.ts +++ b/libs/components/src/button/button.stories.ts @@ -62,7 +62,7 @@ Loading.args = { loading: true, }; -const BlockTemplate: Story = (args: ButtonDirective) => ({ +const BlockTemplate: Story = (args: ButtonComponent) => ({ props: args, template: ` From a594a202abc87e9c037fbc21d50083ddd04d48d4 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Mon, 19 Sep 2022 10:13:25 +0200 Subject: [PATCH 5/9] [EC-556] fix: disabling button using regular attribute --- .../src/button/button.component.spec.ts | 8 +++++ .../components/src/button/button.component.ts | 6 ++-- libs/components/src/button/button.stories.ts | 30 ++++++++++++++++--- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/libs/components/src/button/button.component.spec.ts b/libs/components/src/button/button.component.spec.ts index 46d9c48fab0c..48aa8928e90d 100644 --- a/libs/components/src/button/button.component.spec.ts +++ b/libs/components/src/button/button.component.spec.ts @@ -8,6 +8,7 @@ describe("Button", () => { let fixture: ComponentFixture; let testAppComponent: TestApp; let buttonDebugElement: DebugElement; + let disabledButtonDebugElement: DebugElement; let linkDebugElement: DebugElement; beforeEach(waitForAsync(() => { @@ -20,6 +21,7 @@ describe("Button", () => { fixture = TestBed.createComponent(TestApp); testAppComponent = fixture.debugElement.componentInstance; buttonDebugElement = fixture.debugElement.query(By.css("button")); + disabledButtonDebugElement = fixture.debugElement.query(By.css("button#disabled")); linkDebugElement = fixture.debugElement.query(By.css("a")); })); @@ -79,6 +81,10 @@ describe("Button", () => { // Anchor tags cannot be disabled. }); + it("should be disabled when attribute disabled is true", () => { + expect(disabledButtonDebugElement.nativeElement.disabled).toBeTruthy(); + }); + it("should be disabled when loading is true", () => { testAppComponent.loading = true; fixture.detectChanges(); @@ -110,6 +116,8 @@ describe("Button", () => { > Link + + `, }) class TestApp { diff --git a/libs/components/src/button/button.component.ts b/libs/components/src/button/button.component.ts index 5247dfb8c26d..eeba83b81566 100644 --- a/libs/components/src/button/button.component.ts +++ b/libs/components/src/button/button.component.ts @@ -66,8 +66,10 @@ export class ButtonComponent { .concat(buttonStyles[this.buttonType ?? "secondary"]); } - @HostBinding("attr.disabled") get disabledAttr() { - return this.disabled || this.loading ? true : null; + @HostBinding("attr.disabled") + get disabledAttr() { + const disabled = this.disabled != null && this.disabled !== false; + return disabled || this.loading ? true : null; } @Input() buttonType: ButtonTypes = null; diff --git a/libs/components/src/button/button.stories.ts b/libs/components/src/button/button.stories.ts index 668e456cb05b..681178c8af14 100644 --- a/libs/components/src/button/button.stories.ts +++ b/libs/components/src/button/button.stories.ts @@ -50,16 +50,38 @@ const AllStylesTemplate: Story = (args) => ({ `, }); +export const Loading = AllStylesTemplate.bind({}); +Loading.args = { + disabled: false, + loading: true, +}; + export const Disabled = AllStylesTemplate.bind({}); Disabled.args = { disabled: true, loading: false, }; -export const Loading = AllStylesTemplate.bind({}); -Loading.args = { - disabled: false, - loading: true, +const DisabledWithAttributeTemplate: Story = (args) => ({ + props: args, + template: ` + + + + + + + + + + + `, +}); + +export const DisabledWithAttribute = DisabledWithAttributeTemplate.bind({}); +DisabledWithAttribute.args = { + disabled: true, + loading: false, }; const BlockTemplate: Story = (args: ButtonComponent) => ({ From 7b541be2d5d74ef111bf29a5835840f6e8921e78 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Mon, 19 Sep 2022 15:34:40 +0200 Subject: [PATCH 6/9] [EC-556] fix: missing loading input in story templates --- libs/components/src/button/button.stories.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/components/src/button/button.stories.ts b/libs/components/src/button/button.stories.ts index 681178c8af14..4b9b88d48b16 100644 --- a/libs/components/src/button/button.stories.ts +++ b/libs/components/src/button/button.stories.ts @@ -21,8 +21,8 @@ export default { const Template: Story = (args: ButtonComponent) => ({ props: args, template: ` - - Link + + Link `, }); From 2e2375b17653cc2101ba2bc60f16b65d0dcc1485 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Tue, 20 Sep 2022 14:46:51 +0200 Subject: [PATCH 7/9] [EC-556] feat: remove and replace submit button --- .../register-form.component.html | 6 ++- .../trial-initiation/billing.component.html | 2 +- .../settings/account.component.html | 4 +- ...nroll-master-password-reset.component.html | 4 +- .../pages/breach-report.component.html | 4 +- .../exposed-passwords-report.component.html | 4 +- .../app/settings/change-kdf.component.html | 4 +- .../settings/change-password.component.html | 4 +- .../emergency-access-add-edit.component.html | 4 +- .../organization-plans.component.html | 6 +-- .../src/app/settings/premium.component.html | 8 ++-- .../settings/two-factor-setup.component.html | 9 +++- apps/web/src/app/shared/shared.module.ts | 3 -- .../organizations/manage/scim.component.html | 10 ++++- libs/components/src/index.ts | 1 - libs/components/src/submit-button/index.ts | 1 - .../submit-button.component.html | 10 ----- .../submit-button/submit-button.component.ts | 19 -------- .../src/submit-button/submit-button.module.ts | 13 ------ .../submit-button/submit-button.stories.ts | 45 ------------------- 20 files changed, 41 insertions(+), 120 deletions(-) delete mode 100644 libs/components/src/submit-button/index.ts delete mode 100644 libs/components/src/submit-button/submit-button.component.html delete mode 100644 libs/components/src/submit-button/submit-button.component.ts delete mode 100644 libs/components/src/submit-button/submit-button.module.ts delete mode 100644 libs/components/src/submit-button/submit-button.stories.ts diff --git a/apps/web/src/app/accounts/register-form/register-form.component.html b/apps/web/src/app/accounts/register-form/register-form.component.html index 56364086ff94..615ee3303e91 100644 --- a/apps/web/src/app/accounts/register-form/register-form.component.html +++ b/apps/web/src/app/accounts/register-form/register-form.component.html @@ -114,7 +114,9 @@
- {{ "createAccount" | i18n }} + - {{ "logIn" | i18n }} +
diff --git a/apps/web/src/app/accounts/trial-initiation/billing.component.html b/apps/web/src/app/accounts/trial-initiation/billing.component.html index 4486d0672dd7..2f8b7247409f 100644 --- a/apps/web/src/app/accounts/trial-initiation/billing.component.html +++ b/apps/web/src/app/accounts/trial-initiation/billing.component.html @@ -40,7 +40,7 @@

{{ "paymentType" | i18n }}

- {{ "startTrial" | i18n }} +
diff --git a/apps/web/src/app/organizations/settings/account.component.html b/apps/web/src/app/organizations/settings/account.component.html index 73a2f7872e7d..7a2db14a1727 100644 --- a/apps/web/src/app/organizations/settings/account.component.html +++ b/apps/web/src/app/organizations/settings/account.component.html @@ -66,9 +66,9 @@

{{ "myOrganization" | i18n }}

- +
diff --git a/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html b/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html index f72602ac911b..e55d3cc0d59d 100644 --- a/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html +++ b/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html @@ -32,9 +32,9 @@
- +

{{ "reportError" | i18n }}...

diff --git a/apps/web/src/app/reports/pages/exposed-passwords-report.component.html b/apps/web/src/app/reports/pages/exposed-passwords-report.component.html index 2c5547efc7cf..928549b436c1 100644 --- a/apps/web/src/app/reports/pages/exposed-passwords-report.component.html +++ b/apps/web/src/app/reports/pages/exposed-passwords-report.component.html @@ -2,9 +2,9 @@

{{ "exposedPasswordsReport" | i18n }}

{{ "exposedPasswordsReportDesc" | i18n }}

- +
{{ "noExposedPasswords" | i18n }} diff --git a/apps/web/src/app/settings/change-kdf.component.html b/apps/web/src/app/settings/change-kdf.component.html index b06cf01d060c..18d668cfbb83 100644 --- a/apps/web/src/app/settings/change-kdf.component.html +++ b/apps/web/src/app/settings/change-kdf.component.html @@ -71,7 +71,7 @@

{{ "encKeySettings" | i18n }}

- + diff --git a/apps/web/src/app/settings/change-password.component.html b/apps/web/src/app/settings/change-password.component.html index 6f36236a7ae5..b4c5013fad6a 100644 --- a/apps/web/src/app/settings/change-password.component.html +++ b/apps/web/src/app/settings/change-password.component.html @@ -100,7 +100,7 @@

{{ "changeMasterPassword" | i18n }}

- + diff --git a/apps/web/src/app/settings/emergency-access-add-edit.component.html b/apps/web/src/app/settings/emergency-access-add-edit.component.html index e7198e190304..fceb94915827 100644 --- a/apps/web/src/app/settings/emergency-access-add-edit.component.html +++ b/apps/web/src/app/settings/emergency-access-add-edit.component.html @@ -100,9 +100,9 @@

- {{ - "submit" | i18n - }} + diff --git a/apps/web/src/app/settings/premium.component.html b/apps/web/src/app/settings/premium.component.html index 63995b457acd..3a2ea45a79db 100644 --- a/apps/web/src/app/settings/premium.component.html +++ b/apps/web/src/app/settings/premium.component.html @@ -68,9 +68,9 @@

{{ "goPremium" | i18n }}

"licenseFileDesc" | i18n: "bitwarden_premium_license.json" }}
- +
@@ -118,7 +118,7 @@

{{ "paymentInformation" | i18n }}

{{ "paymentChargedAnnually" | i18n }} - + diff --git a/apps/web/src/app/settings/two-factor-setup.component.html b/apps/web/src/app/settings/two-factor-setup.component.html index 698e7fd9c07d..b21fca894555 100644 --- a/apps/web/src/app/settings/two-factor-setup.component.html +++ b/apps/web/src/app/settings/two-factor-setup.component.html @@ -77,9 +77,14 @@

{{ "deviceVerificationDesc" | i18n }} - + diff --git a/apps/web/src/app/shared/shared.module.ts b/apps/web/src/app/shared/shared.module.ts index 342948bb515e..c0a076e545ee 100644 --- a/apps/web/src/app/shared/shared.module.ts +++ b/apps/web/src/app/shared/shared.module.ts @@ -12,7 +12,6 @@ import { ButtonModule, CalloutModule, FormFieldModule, - SubmitButtonModule, MenuModule, IconModule, } from "@bitwarden/components"; @@ -44,7 +43,6 @@ import "./locales"; ButtonModule, MenuModule, FormFieldModule, - SubmitButtonModule, IconModule, ], exports: [ @@ -63,7 +61,6 @@ import "./locales"; ButtonModule, MenuModule, FormFieldModule, - SubmitButtonModule, IconModule, ], providers: [DatePipe], diff --git a/bitwarden_license/bit-web/src/app/organizations/manage/scim.component.html b/bitwarden_license/bit-web/src/app/organizations/manage/scim.component.html index 54fe44e073cb..9b191d1f6c98 100644 --- a/bitwarden_license/bit-web/src/app/organizations/manage/scim.component.html +++ b/bitwarden_license/bit-web/src/app/organizations/manage/scim.component.html @@ -81,7 +81,13 @@

{{ "scim" | i18n }}

{{ "scimApiKeyHelperText" | i18n }} - + diff --git a/libs/components/src/index.ts b/libs/components/src/index.ts index 1f1ae6a8d2b3..264c655d80f7 100644 --- a/libs/components/src/index.ts +++ b/libs/components/src/index.ts @@ -7,7 +7,6 @@ export * from "./icon"; export * from "./icon-button"; export * from "./menu"; export * from "./dialog"; -export * from "./submit-button"; export * from "./link"; export * from "./tabs"; export * from "./toggle-group"; diff --git a/libs/components/src/submit-button/index.ts b/libs/components/src/submit-button/index.ts deleted file mode 100644 index ae7d96d2c1a6..000000000000 --- a/libs/components/src/submit-button/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./submit-button.module"; diff --git a/libs/components/src/submit-button/submit-button.component.html b/libs/components/src/submit-button/submit-button.component.html deleted file mode 100644 index fb256fa502e5..000000000000 --- a/libs/components/src/submit-button/submit-button.component.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/libs/components/src/submit-button/submit-button.component.ts b/libs/components/src/submit-button/submit-button.component.ts deleted file mode 100644 index 27408349da7c..000000000000 --- a/libs/components/src/submit-button/submit-button.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, HostBinding, Input } from "@angular/core"; - -import { ButtonTypes } from "../button"; - -@Component({ - selector: "bit-submit-button", - templateUrl: "./submit-button.component.html", -}) -export class SubmitButtonComponent { - @Input() buttonType: ButtonTypes = "primary"; - @Input() disabled = false; - @Input() loading: boolean; - - @Input() block?: boolean; - - @HostBinding("class") get classList() { - return this.block == null || this.block === false ? [] : ["tw-w-full", "tw-block"]; - } -} diff --git a/libs/components/src/submit-button/submit-button.module.ts b/libs/components/src/submit-button/submit-button.module.ts deleted file mode 100644 index c7ab7567e64f..000000000000 --- a/libs/components/src/submit-button/submit-button.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { CommonModule } from "@angular/common"; -import { NgModule } from "@angular/core"; - -import { ButtonModule } from "../button"; - -import { SubmitButtonComponent } from "./submit-button.component"; - -@NgModule({ - imports: [CommonModule, ButtonModule], - exports: [SubmitButtonComponent], - declarations: [SubmitButtonComponent], -}) -export class SubmitButtonModule {} diff --git a/libs/components/src/submit-button/submit-button.stories.ts b/libs/components/src/submit-button/submit-button.stories.ts deleted file mode 100644 index cf19b1c8e4b6..000000000000 --- a/libs/components/src/submit-button/submit-button.stories.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Meta, moduleMetadata, Story } from "@storybook/angular"; - -import { SubmitButtonComponent } from "./submit-button.component"; -import { SubmitButtonModule } from "./submit-button.module"; - -export default { - title: "Component Library/Submit Button", - component: SubmitButtonComponent, - decorators: [ - moduleMetadata({ - imports: [SubmitButtonModule], - }), - ], - args: { - buttonType: "primary", - loading: false, - block: false, - }, - parameters: { - design: { - type: "figma", - url: "https://www.figma.com/file/Zt3YSeb6E6lebAffrNLa0h/Tailwind-Component-Library?node-id=1881%3A16733", - }, - }, -} as Meta; - -const Template: Story = (args: SubmitButtonComponent) => ({ - props: args, - template: ` - Submit - `, -}); - -export const Primary = Template.bind({}); -Primary.args = {}; - -export const Loading = Template.bind({}); -Loading.args = { - loading: true, -}; - -export const Disabled = Template.bind({}); -Disabled.args = { - disabled: true, -}; From 0eb26d6acdfbcb052299fa6cb703e8c3466c77fa Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Mon, 26 Sep 2022 09:50:48 -0400 Subject: [PATCH 8/9] Fix packaging on Build Web workflow (#3613) (cherry picked from commit 67c447d54ce0f08b99e2efc63b28cafac3411486) --- .github/workflows/build-web.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index fdd534d1dc9d..b2499f190a12 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -117,15 +117,11 @@ jobs: working-directory: apps/web run: npm run ${{ matrix.npm_command }} - - name: Package ${{ matrix.name }} artifact - working-directory: apps/web - run: zip -r web-$_VERSION-${{ matrix.name }}.zip build - - name: Upload ${{ matrix.name }} artifact uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0 with: name: web-${{ env._VERSION }}-${{ matrix.name }}.zip - path: apps/web/web-${{ env._VERSION }}-${{ matrix.name }}.zip + path: apps/web/build if-no-files-found: error build-commercial-selfhost-image: From 86e03cc8c0a7c37a8b971a80d45528c2616f75c8 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Mon, 26 Sep 2022 17:46:27 +0200 Subject: [PATCH 9/9] [EC-556] fix: replaced buttons should be primary --- .../accounts/register-form/register-form.component.html | 6 ++++-- .../app/accounts/trial-initiation/billing.component.html | 4 +++- .../src/app/organizations/settings/account.component.html | 2 +- .../users/enroll-master-password-reset.component.html | 2 +- .../src/app/reports/pages/breach-report.component.html | 2 +- .../reports/pages/exposed-passwords-report.component.html | 2 +- apps/web/src/app/settings/change-kdf.component.html | 2 +- apps/web/src/app/settings/change-password.component.html | 2 +- .../app/settings/emergency-access-add-edit.component.html | 8 +++++++- .../src/app/settings/organization-plans.component.html | 8 +++++++- apps/web/src/app/settings/premium.component.html | 2 +- apps/web/src/app/settings/two-factor-setup.component.html | 1 + .../src/app/organizations/manage/scim.component.html | 2 +- 13 files changed, 30 insertions(+), 13 deletions(-) diff --git a/apps/web/src/app/accounts/register-form/register-form.component.html b/apps/web/src/app/accounts/register-form/register-form.component.html index 615ee3303e91..d9456d5a6e91 100644 --- a/apps/web/src/app/accounts/register-form/register-form.component.html +++ b/apps/web/src/app/accounts/register-form/register-form.component.html @@ -114,7 +114,7 @@ diff --git a/apps/web/src/app/accounts/trial-initiation/billing.component.html b/apps/web/src/app/accounts/trial-initiation/billing.component.html index 2f8b7247409f..0eb203f72ca0 100644 --- a/apps/web/src/app/accounts/trial-initiation/billing.component.html +++ b/apps/web/src/app/accounts/trial-initiation/billing.component.html @@ -40,7 +40,9 @@

{{ "paymentType" | i18n }}

- +
diff --git a/apps/web/src/app/organizations/settings/account.component.html b/apps/web/src/app/organizations/settings/account.component.html index 7a2db14a1727..1f2e145ae7a4 100644 --- a/apps/web/src/app/organizations/settings/account.component.html +++ b/apps/web/src/app/organizations/settings/account.component.html @@ -66,7 +66,7 @@

{{ "myOrganization" | i18n }}

- diff --git a/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html b/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html index 11325622c4c0..4d24e66764e8 100644 --- a/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html +++ b/apps/web/src/app/organizations/users/enroll-master-password-reset.component.html @@ -32,7 +32,7 @@

{{ "breachCheckUsernameEmail" | i18n }} - diff --git a/apps/web/src/app/reports/pages/exposed-passwords-report.component.html b/apps/web/src/app/reports/pages/exposed-passwords-report.component.html index 928549b436c1..0fce002310be 100644 --- a/apps/web/src/app/reports/pages/exposed-passwords-report.component.html +++ b/apps/web/src/app/reports/pages/exposed-passwords-report.component.html @@ -2,7 +2,7 @@

{{ "exposedPasswordsReport" | i18n }}

{{ "exposedPasswordsReportDesc" | i18n }}

-
diff --git a/apps/web/src/app/settings/change-kdf.component.html b/apps/web/src/app/settings/change-kdf.component.html index 18d668cfbb83..1b3b62a03fbb 100644 --- a/apps/web/src/app/settings/change-kdf.component.html +++ b/apps/web/src/app/settings/change-kdf.component.html @@ -71,7 +71,7 @@

{{ "encKeySettings" | i18n }}

- diff --git a/apps/web/src/app/settings/change-password.component.html b/apps/web/src/app/settings/change-password.component.html index b4c5013fad6a..e74881db0257 100644 --- a/apps/web/src/app/settings/change-password.component.html +++ b/apps/web/src/app/settings/change-password.component.html @@ -100,7 +100,7 @@

{{ "changeMasterPassword" | i18n }}

- diff --git a/apps/web/src/app/settings/emergency-access-add-edit.component.html b/apps/web/src/app/settings/emergency-access-add-edit.component.html index f6cdb2803428..b438cee937cc 100644 --- a/apps/web/src/app/settings/emergency-access-add-edit.component.html +++ b/apps/web/src/app/settings/emergency-access-add-edit.component.html @@ -100,7 +100,13 @@

-
- diff --git a/apps/web/src/app/settings/two-factor-setup.component.html b/apps/web/src/app/settings/two-factor-setup.component.html index b21fca894555..b846fdb98164 100644 --- a/apps/web/src/app/settings/two-factor-setup.component.html +++ b/apps/web/src/app/settings/two-factor-setup.component.html @@ -79,6 +79,7 @@