diff --git a/addons/rose/.template-lintrc.js b/addons/rose/.template-lintrc.js index 0cfbd1f3b..0a5e076b8 100644 --- a/addons/rose/.template-lintrc.js +++ b/addons/rose/.template-lintrc.js @@ -15,12 +15,6 @@ module.exports = { 'no-yield-only': false, }, }, - { - files: ['addon/components/rose/dialog/index.hbs'], - rules: { - 'no-duplicate-landmark-elements': false, - }, - }, { files: ['addon/components/rose/form/actions/index.hbs'], rules: { diff --git a/addons/rose/addon/components/rose/dialog/body/index.hbs b/addons/rose/addon/components/rose/dialog/body/index.hbs deleted file mode 100644 index f7e3947da..000000000 --- a/addons/rose/addon/components/rose/dialog/body/index.hbs +++ /dev/null @@ -1,8 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 -}} - -
- {{yield}} -
\ No newline at end of file diff --git a/addons/rose/addon/components/rose/dialog/index.hbs b/addons/rose/addon/components/rose/dialog/index.hbs deleted file mode 100644 index 5935cc7ea..000000000 --- a/addons/rose/addon/components/rose/dialog/index.hbs +++ /dev/null @@ -1,99 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 -}} - -{{#if @modal}} -
- - - -{{else}} - - - -{{/if}} \ No newline at end of file diff --git a/addons/rose/addon/components/rose/dialog/index.js b/addons/rose/addon/components/rose/dialog/index.js deleted file mode 100644 index 560a17d6d..000000000 --- a/addons/rose/addon/components/rose/dialog/index.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -import Component from '@glimmer/component'; -import { generateComponentID } from '../../../utilities/component-auto-id'; -import { action } from '@ember/object'; - -export default class RoseDialogComponent extends Component { - // =attributes - - /** - * @type {string} - */ - id = generateComponentID(); - - // =methods - - /** - * Calls the passed dismiss function. This approach is convenient - * in case an external dismiss function is not passed into the component, - * a template error will not be thrown. - * @param {Function} fn - */ - @action - dismiss(fn) { - fn(); - } -} diff --git a/addons/rose/app/components/rose/dialog.js b/addons/rose/app/components/rose/dialog.js deleted file mode 100644 index d0ade205e..000000000 --- a/addons/rose/app/components/rose/dialog.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -export { default } from 'rose/components/rose/dialog'; diff --git a/addons/rose/app/components/rose/dialog/body.js b/addons/rose/app/components/rose/dialog/body.js deleted file mode 100644 index 9534c7aaa..000000000 --- a/addons/rose/app/components/rose/dialog/body.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -export { default } from 'rose/components/rose/dialog/body'; diff --git a/addons/rose/app/styles/rose/components/_index.scss b/addons/rose/app/styles/rose/components/_index.scss index 0d4a5b20b..55df4f3fa 100644 --- a/addons/rose/app/styles/rose/components/_index.scss +++ b/addons/rose/app/styles/rose/components/_index.scss @@ -9,7 +9,6 @@ @use 'card'; @use 'cards'; @use 'code-editor'; -@use 'dialog'; @use 'dropdown'; @use 'form'; @use 'frame'; diff --git a/addons/rose/app/styles/rose/components/dialog/_dialog.scss b/addons/rose/app/styles/rose/components/dialog/_dialog.scss deleted file mode 100644 index 24d8ae9bd..000000000 --- a/addons/rose/app/styles/rose/components/dialog/_dialog.scss +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -@use '../../variables/sizing'; -@use '../../utilities/type'; -@use '../../variables/media'; - -$m: sizing.rems(m); // 16 -$s: sizing.rems(s); // 12 -$xs: sizing.rems(xs); // 8 -$xxs: sizing.rems(xxs); // 4 -$xxxs: sizing.rems(xxxs); // 2 -$xxxxs: sizing.rems(xxxxs); // 1 - -.rose-dialog { - --header-color: var(--ui-gray-starker-3); - --header-icon-color: var(--header-color); - --header-background-color: var(--ui-gray-subtler-5); - --header-border-color: var(--ui-gray-subtler-2); - - border-radius: $xxxs; - background-color: var(--subtle); - box-shadow: - 0 $xs $s rgba(var(--stark-components), var(--opacity-2)), - 0 $xxs $xxs rgba(var(--stark-components), var(--opacity-3)); - - &.rose-dialog-success { - --header-color: var(--success-starker-1); - --header-icon-color: var(--success); - --header-background-color: var(--success-subtler-2); - --header-border-color: var(--success); - } - - &.rose-dialog-warning { - --header-color: var(--warning-starker-1); - --header-icon-color: var(--warning); - --header-background-color: var(--warning-subtler-2); - --header-border-color: var(--warning); - } - - &.rose-dialog-error { - --header-color: var(--failure-starker-1); - --header-icon-color: var(--failure); - --header-background-color: var(--failure-subtler-2); - --header-border-color: var(--failure); - } - - .rose-dialog-header { - display: flex; - align-items: center; - padding: ($xs + $xxxs) $m; - min-height: sizing.rems(l); - color: var(--header-color); - background-color: var(--header-background-color); - border: $xxxxs solid var(--header-border-color); - border-top-left-radius: $xxxs; - border-top-right-radius: $xxxs; - - .rose-dialog-heading { - @include type.type(m, semibold); - - flex-grow: 1; - margin: 0; - padding: 0; - color: currentcolor; - } - - .rose-dialog-dismiss { - border: $xxxxs solid var(--ui-gray-subtler-2); - border-radius: $xxxs; - color: var(--ui-gray); - background-color: transparent; - padding: 0; - margin: 0; - height: sizing.rems(l); - width: sizing.rems(l); - - &:hover { - border-color: currentcolor; - } - } - } - - .rose-dialog-body { - border-left: $xxxxs solid var(--ui-gray-subtler-2); - border-right: $xxxxs solid var(--ui-gray-subtler-2); - padding: sizing.rems(l); - } - - .rose-dialog-footer { - padding: $m; - border: $xxxxs solid var(--ui-gray-subtler-2); - border-bottom-left-radius: $xxxs; - border-bottom-right-radius: $xxxs; - background-color: var(--ui-gray-subtler-5); - - button { - margin-bottom: 0; - } - } - - &.modal { - display: flex; - flex-direction: column; - position: fixed; - left: calc(50% - 300px); - top: 5%; - max-height: 85%; - max-width: 80vw; - width: 650px; - - @media (width <= (media.width(small))) { - left: 5%; - } - - .rose-dialog-body { - overflow-y: auto; - } - } -} - -// overlay -.rose-dialog-modal-overlay { - content: ' '; - background-color: var(--black); - width: 100vw; - height: 100vh; - position: fixed; - left: 0; - top: 0; - bottom: 0; - right: 0; - opacity: 0.5; -} diff --git a/addons/rose/app/styles/rose/components/dialog/_index.scss b/addons/rose/app/styles/rose/components/dialog/_index.scss deleted file mode 100644 index 1c2a9ef81..000000000 --- a/addons/rose/app/styles/rose/components/dialog/_index.scss +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -@use 'dialog'; diff --git a/addons/rose/tests/integration/components/rose/dialog-test.js b/addons/rose/tests/integration/components/rose/dialog-test.js deleted file mode 100644 index 70bf0c1b8..000000000 --- a/addons/rose/tests/integration/components/rose/dialog-test.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find, click } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | rose/dialog', function (hooks) { - setupRenderingTest(hooks); - - test('it renders and handles dismiss actions', async function (assert) { - assert.expect(5); - this.dismiss = () => assert.ok(true, 'dismissed'); - await render(hbs` - - Dialog - Dialog - - `); - assert.ok(find('.rose-dialog')); - assert.ok(find('.rose-dialog-header')); - assert.ok(find('.rose-dialog-body')); - assert.ok(find('.rose-dialog-footer')); - await click('button'); - }); -}); diff --git a/addons/rose/tests/integration/components/rose/dialog/body-test.js b/addons/rose/tests/integration/components/rose/dialog/body-test.js deleted file mode 100644 index 84e395061..000000000 --- a/addons/rose/tests/integration/components/rose/dialog/body-test.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | rose/dialog/body', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.set('myAction', function(val) { ... }); - - await render(hbs``); - - assert.strictEqual(this.element.textContent.trim(), ''); - - // Template block usage: - await render(hbs` - - template block text - - `); - - assert.strictEqual(this.element.textContent.trim(), 'template block text'); - }); -}); diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index a9314db9f..5333d59d1 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -226,16 +226,6 @@ text-align: center; } -// Rose dialog - positioned above modal overlay -.rose-dialog { - z-index: 6000; -} - -// Overlay above everything - including notifications -.rose-dialog-modal-overlay { - z-index: 5500; -} - // Hidden secret component (app/components/hidden-secret) .hidden-secret { display: flex;