diff --git a/addons/rose/addon/components/rose/button/index.hbs b/addons/rose/addon/components/rose/button/index.hbs deleted file mode 100644 index 1a5d49547..000000000 --- a/addons/rose/addon/components/rose/button/index.hbs +++ /dev/null @@ -1,33 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 -}} - - \ No newline at end of file diff --git a/addons/rose/app/components/rose/button.js b/addons/rose/app/components/rose/button.js deleted file mode 100644 index 2aacbd08c..000000000 --- a/addons/rose/app/components/rose/button.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -export { default } from 'rose/components/rose/button'; diff --git a/addons/rose/app/styles/rose/components/_button.scss b/addons/rose/app/styles/rose/components/_button.scss deleted file mode 100644 index 448c19e59..000000000 --- a/addons/rose/app/styles/rose/components/_button.scss +++ /dev/null @@ -1,153 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -@use '../utilities/button'; -@use '../utilities/type' as typography; -@use '../variables/sizing'; - -$size-xs: sizing.rems(xs); // 8 -$size-xxs: sizing.rems(xxs); // 4 -$size-xxxs: sizing.rems(xxxs); // 2 -$size-xxxxs: sizing.rems(xxxxs); // 1 - -@include button.button-style( - 'primary', - ( - color: var(--white), - background-color: var(--info), - border-color: var(--info-starker-2), - box-shadow: 0 $size-xxs $size-xxs - rgba(var(--stark-components), var(--opacity-2)), - text-shadow: 0 $size-xxxxs $size-xxxxs - rgba(var(--black-components), var(--opacity-2)), - ), - ( - background-color: var(--info-subtler-1), - box-shadow: ( - 0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)), - 0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)), - ), - ), - ( - background-color: var(--info-starker-1), - box-shadow: none, - ), - ( - opacity: var(--opacity-1), - box-shadow: none, - ) -); - -@include button.button-style( - 'secondary', - ( - color: var(--ui-gray-starker-3), - background-color: var(--ui-gray-subtler-5), - border-color: var(--ui-gray-subtler-2), - box-shadow: 0 $size-xxs $size-xxs - rgba(var(--stark-components), var(--opacity-2)), - ), - ( - color: var(--ui-gray-starker-4), - background-color: var(--subtle), - border-color: var(--ui-gray-starker-1), - box-shadow: ( - 0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)), - 0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)), - ), - ), - ( - color: var(--ui-gray-starker-4), - background-color: var(--ui-gray-subtler-3), - border-color: var(--ui-gray-starker-1), - box-shadow: none, - ), - ( - opacity: var(--opacity-1), - box-shadow: none, - ) -); - -@include button.button-style( - 'warning', - ( - color: var(--failure), - background-color: var(--subtle), - border-color: var(--failure), - box-shadow: 0 $size-xxs $size-xxs - rgba(var(--stark-components), var(--opacity-2)), - ), - ( - color: var(--white), - border-color: var(--failure-starker-1), - background-color: var(--failure), - box-shadow: ( - 0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)), - 0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)), - ), - text-shadow: 0 $size-xxxxs $size-xxxxs - rgba(var(--black-components), var(--opacity-2)), - ), - ( - color: var(--white), - border-color: var(--ui-gray-starker-2), - background-color: var(--failure-starker-1), - box-shadow: ( - 0 $size-xxs $size-xxs rgba(var(--stark-components), var(--opacity-3)), - 0 $size-xxs $size-xs rgba(var(--stark-components), var(--opacity-4)), - ), - text-shadow: 0 $size-xxxxs $size-xxxxs - rgba(var(--black-components), var(--opacity-2)), - ), - ( - border-color: var(--ui-gray-subtler-2), - opacity: var(--opacity-1), - box-shadow: none, - ) -); - -@include button.button-style( - 'ghost', - ( - color: var(--info), - border-color: transparent, - background-color: var(--subtle), - ), - ( - background-color: var(--ui-gray-subtler-5), - ), - ( - background-color: var(--ui-gray-subtler-4), - ), - ( - opacity: var(--opacity-1), - ) -); - -.rose-button-inline-link-action { - @include typography.type(m, semibold); - - color: var(--info); - border: 0; - background: none; - margin: 0; - padding: 0; - display: inline; - - &:not(:disabled) { - &:disabled { - cursor: not-allowed; - opacity: var(--opacity-1); - } - - &:hover { - text-decoration: underline; - } - - &:active { - color: var(--info-starker-1); - } - } -} diff --git a/addons/rose/app/styles/rose/components/_index.scss b/addons/rose/app/styles/rose/components/_index.scss index 55df4f3fa..4b3eecfb5 100644 --- a/addons/rose/app/styles/rose/components/_index.scss +++ b/addons/rose/app/styles/rose/components/_index.scss @@ -5,7 +5,6 @@ // This list is sorted in ascending order to improve readability -@use 'button'; @use 'card'; @use 'cards'; @use 'code-editor'; diff --git a/addons/rose/app/styles/rose/components/dropdown/_index.scss b/addons/rose/app/styles/rose/components/dropdown/_index.scss index 985de15d3..b67dca9f3 100644 --- a/addons/rose/app/styles/rose/components/dropdown/_index.scss +++ b/addons/rose/app/styles/rose/components/dropdown/_index.scss @@ -4,7 +4,6 @@ */ @use 'dropdown'; -@use 'button'; @use 'link'; @use 'item'; @use 'section'; diff --git a/addons/rose/app/styles/rose/utilities/_button.scss b/addons/rose/app/styles/rose/utilities/_button.scss deleted file mode 100644 index 26561c6ee..000000000 --- a/addons/rose/app/styles/rose/utilities/_button.scss +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -@use 'sass:map'; -@use 'type' as typography; -@use '../variables/sizing'; - -@mixin button { - @include typography.type(button, semibold); - - display: inline-block; - margin-bottom: sizing.rems(l); - margin-right: sizing.rems(xs); - padding: sizing.rems(off-xs) sizing.rems(l); - border-radius: sizing.rems(xxxs); - border: sizing.rems(xxxxs) solid; - background: none; - - .rose-button-wrapper { - display: flex; - flex-direction: row; - } - - &.has-icon-left .hds-icon:first-child { - margin-left: -(sizing.rems(xs)); - margin-right: sizing.rems(xxs); - } - - &.has-icon-right .hds-icon:last-child { - margin-left: sizing.rems(xxs); - margin-right: -(sizing.rems(xs)); - } - - &.has-icon-only { - padding-right: sizing.rems(s); - padding-left: sizing.rems(s); - - .rose-button-body { - position: absolute; - top: -1000px; - left: -1000px; - width: 1px; - height: 1px; - opacity: 0; - } - } -} - -@mixin button-style($name, $default, $hover: &, $active: &, $disabled: &) { - .rose-button-#{$name} { - @include button; - - border-color: map.get($default, border-color); - color: map.get($default, color); - background-color: map.get($default, background-color); - @if map.get($default, 'box-shadow') { - box-shadow: map.get($default, 'box-shadow'); - } - @if map.get($default, 'text-shadow') { - text-shadow: map.get($default, 'text-shadow'); - } - - &:not(:disabled) { - @if $hover { - &:hover { - @if map.get($hover, 'border-color') { - border-color: map.get($hover, 'border-color'); - } - @if map.get($hover, 'color') { - color: map.get($hover, 'color'); - } - @if map.get($hover, 'background-color') { - background-color: map.get($hover, 'background-color'); - } - @if map.get($hover, 'box-shadow') { - box-shadow: map.get($hover, 'box-shadow'); - } - @if map.get($hover, 'text-shadow') { - text-shadow: map.get($hover, 'text-shadow'); - } - } - } - @if $active { - &:active { - @if map.get($active, 'border-color') { - border-color: map.get($active, 'border-color'); - } - @if map.get($active, 'color') { - color: map.get($active, 'color'); - } - @if map.get($active, 'background-color') { - background-color: map.get($active, 'background-color'); - } - @if map.get($active, 'box-shadow') { - box-shadow: map.get($active, 'box-shadow'); - } - @if map.get($active, 'text-shadow') { - text-shadow: map.get($active, 'text-shadow'); - } - } - } - } - - @if $disabled { - &:disabled { - cursor: not-allowed; - @if map.get($disabled, 'border-color') { - border-color: map.get($disabled, 'border-color'); - } - @if map.get($disabled, 'opacity') { - opacity: map.get($disabled, 'opacity'); - } - @if map.get($disabled, 'box-shadow') { - box-shadow: map.get($disabled, 'box-shadow'); - } - } - } - } -} diff --git a/addons/rose/app/styles/rose/utilities/_index.scss b/addons/rose/app/styles/rose/utilities/_index.scss deleted file mode 100644 index cfaaccd7b..000000000 --- a/addons/rose/app/styles/rose/utilities/_index.scss +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -@forward 'button'; diff --git a/addons/rose/tests/dummy/app/templates/index.hbs b/addons/rose/tests/dummy/app/templates/index.hbs index 8b94b049a..32f474886 100644 --- a/addons/rose/tests/dummy/app/templates/index.hbs +++ b/addons/rose/tests/dummy/app/templates/index.hbs @@ -4,33 +4,16 @@ }} - - Clear something - + - - Clear something - - - Clear something - + + - - Refresh - + \ No newline at end of file diff --git a/addons/rose/tests/dummy/app/templates/playground.hbs b/addons/rose/tests/dummy/app/templates/playground.hbs deleted file mode 100644 index 58be7d4d6..000000000 --- a/addons/rose/tests/dummy/app/templates/playground.hbs +++ /dev/null @@ -1,75 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 -}} - - - - - - - - - - Menu item - Menu item - Button menu item - - - - - - Menu item - Menu item - Button menu item - - - - - - - - - - - - - Item Name - Item Name - Item Name - Item Name - - - - - - - - Key - Value - - - Key - Value - - - Key - Value - - - - - - - footer content - - - - - - \ No newline at end of file diff --git a/addons/rose/tests/integration/components/rose/button-test.js b/addons/rose/tests/integration/components/rose/button-test.js deleted file mode 100644 index c8e1ebaf2..000000000 --- a/addons/rose/tests/integration/components/rose/button-test.js +++ /dev/null @@ -1,52 +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 } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | rose/button', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - await render(hbs`Button`); - assert.strictEqual(this.element.textContent.trim(), 'Button'); - }); - - test('it is type="button" by default', async function (assert) { - await render(hbs`Button`); - assert.strictEqual(find('button').type, 'button'); - }); - - test('it is type="submit" when @onSubmit={{true}}', async function (assert) { - await render(hbs``); - assert.strictEqual(find('button').type, 'submit'); - }); - - test('it is disabled when @disabled={{true}}', async function (assert) { - await render(hbs``); - assert.true(find('button').disabled); - }); - - test('it adds a style class', async function (assert) { - await render(hbs``); - assert.ok(find('.rose-button-primary')); - await render(hbs``); - assert.ok(find('.rose-button-secondary')); - }); - - test('it supports left and right icons', async function (assert) { - await render(hbs``); - assert.dom('.has-icon-left .hds-icon').isVisible(); - await render(hbs``); - assert.dom('.has-icon-right .hds-icon').isVisible(); - }); - - test('it supports an icon-only type', async function (assert) { - await render(hbs``); - assert.dom('.has-icon-only .hds-icon').isVisible(); - }); -}); diff --git a/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js b/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js index f36800e43..968b19e52 100644 --- a/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js +++ b/ui/admin/tests/acceptance/host-catalogs/host-sets/update-test.js @@ -297,7 +297,7 @@ module('Acceptance | host-catalogs | host sets | update', function (hooks) { instances.hostSet.authorized_actions = instances.hostSet.authorized_actions.filter((item) => item !== 'update'); await visit(urls.hostSet); - assert.notOk(find('.rose-layout-page-actions .rose-button-secondary')); + assert.notOk(find('.rose-layout-page-actions .hds-button-secondary')); }); test('can cancel changes to existing host-set', async function (assert) { diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 3a1698ae8..8a4e6b7fb 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -386,10 +386,6 @@ } } } - - .rose-button-ghost { - margin-bottom: 0; - } } .credential-name,