-
Notifications
You must be signed in to change notification settings - Fork 80
feat(notice): add component tokens #11042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
6c9e39d
8c92ce1
ab8dc73
2e63733
9e5dbc1
499d69a
6ff44a2
1890095
c880295
56ab464
6cfc959
943ca4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,13 @@ | |
* | ||
* These properties can be overridden using the component's tag as selector. | ||
* | ||
* @prop --calcite-notice-width: The width of the component. | ||
* @prop --calcite-notice-background: Specifies the background color of the component. | ||
* @prop --calcite-notice-close-background-focus: Specifies the background color of the component when focused. | ||
* @prop --calcite-notice-close-background-press: Specifies the background color of the component when active. | ||
* @prop --calcite-notice-close-text-color-hover: Specifies the background color of component's close button when hovered. | ||
* @prop --calcite-notice-close-text-color: Specifies the text color of component's close button. | ||
* @prop --calcite-notice-content-text-color: Specifies the content text color of the component. | ||
* @prop --calcite-notice-width: Specifies the width of the component. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we can evaluate this for removal. Not sure why we'd need this, vs. the user being able to set this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah WDYT @alisonailea? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree we could set this for removal There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DitwanP @geospatialem is there any specific process/term we need for deprecation and removal for this or just [Deprecated] note for now is enough? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the [Deprecated] note is enough. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Elijbet We have a new There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will create a follow-up PR for this. |
||
*/ | ||
|
||
// scale variables | ||
|
@@ -71,20 +77,21 @@ | |
} | ||
|
||
.container { | ||
@apply bg-foreground-1 | ||
pointer-events-none | ||
@apply pointer-events-none | ||
my-0 | ||
box-border | ||
flex | ||
w-full | ||
opacity-0; | ||
|
||
overflow: hidden; | ||
max-block-size: 0; | ||
transition-property: opacity, max-block-size; | ||
transition-duration: var(--calcite-animation-timing); | ||
text-align: start; | ||
border-inline-start: var(--calcite-border-width-md) solid; | ||
box-shadow: 0 0 0 0 transparent; | ||
background-color: var(--calcite-notice-background, var(bg-foreground-1)); | ||
} | ||
|
||
// focus styles | ||
|
@@ -109,12 +116,16 @@ | |
} | ||
|
||
@include slotted("title", "*", ".container") { | ||
@apply text-color-1 m-0 font-medium; | ||
@apply m-0 font-medium; | ||
|
||
color: var(--calcite-notice-close-text-color-hover, var(text-color-1)); | ||
} | ||
|
||
@include slotted("message", "*", ".container") { | ||
@apply text-color-2 m-0 inline font-normal; | ||
@apply m-0 inline font-normal; | ||
|
||
margin-inline-end: var(--calcite-notice-spacing-token-small); | ||
color: var(--calcite-notice-content-text-color, var(--calcite-color-text-2)); | ||
} | ||
|
||
@mixin notice-element-base() { | ||
|
@@ -146,17 +157,20 @@ | |
} | ||
|
||
.notice-close { | ||
@apply text-color-3 flex cursor-pointer items-center self-stretch border-none bg-transparent outline-none; | ||
@apply flex cursor-pointer items-center self-stretch border-none bg-transparent outline-none; | ||
@include notice-element-base; | ||
-webkit-appearance: none; | ||
|
||
color: var(--calcite-notice-close-text-color, var(text-color-3)); | ||
|
||
&:hover, | ||
&:focus { | ||
@apply bg-foreground-2 text-color-1; | ||
background-color: var(--calcite-notice-close-background-focus, var(bg-foreground-2)); | ||
color: var(--calcite-notice-close-text-color-hover, var(text-color-1)); | ||
} | ||
|
||
&:active { | ||
@apply bg-foreground-3; | ||
background-color: var(--calcite-notice-close-background-press, var(bg-foreground-3)); | ||
} | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.