@aurodesignsystem-dev/auro-alert 0.0.0-pr124.0 → 0.0.0-pr124.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/demo/api.md CHANGED
@@ -16,13 +16,13 @@ Shows an inline message that gives feedback about a user action, such as an erro
16
16
 
17
17
  ### Properties and attributes
18
18
 
19
- | Properties | Attributes | Modifiers | Type | Default | Relevant when | Description |
20
- | -------------- | -------------- | --------- | -------------------------------------------------- | ------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | hidden | hidden | | boolean | | | Hides the alert both visually and from screen readers. |
22
- | hiddenAudible | hiddenAudible | | boolean | | | Hides the alert from screen readers while keeping it visible. |
23
- | hiddenVisually | hiddenVisually | | boolean | | | Hides the alert visually while keeping it available to screen readers. |
24
- | noIcon | noIcon | | boolean | | `type` | Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. |
25
- | type | type | | `information` \| `error` \| `success` \| `warning` | | | Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. |
19
+ | Properties | Attributes | Modifiers | Type | Default | Relevant when | Description |
20
+ | -------------- | -------------- | --------- | -------------------------------------------------- | ------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | hidden | hidden | | boolean | | | Hides the alert both visually and from screen readers. |
22
+ | hiddenAudible | hiddenAudible | | boolean | | | Hides the alert from screen readers while keeping it visible. |
23
+ | hiddenVisually | hiddenVisually | | boolean | | | Hides the alert visually while keeping it available to screen readers. |
24
+ | noIcon | noIcon | | boolean | | `type` | Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. |
25
+ | type | type | | `information` \| `error` \| `success` \| `warning` | | | Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically. |
26
26
 
27
27
  ### Methods
28
28
 
@@ -42,6 +42,15 @@ Shows an inline message that gives feedback about a user action, such as an erro
42
42
  | ------------- | -------------------------------------------------------- |
43
43
  | alert | The outer container that holds the icon and the message. |
44
44
  | alert-content | The area next to the icon that holds the alert message. |
45
+
46
+ ### CSS custom properties
47
+
48
+ | Name | Description |
49
+ | ------------------------------- | ------------------------------ |
50
+ | --ds-auro-alert-border-color | Color of the alert's border. |
51
+ | --ds-auro-alert-container-color | Background color of the alert. |
52
+ | --ds-auro-alert-icon-color | Color of the alert's icon. |
53
+ | --ds-auro-alert-text-color | Color of the alert's text. |
45
54
  <!-- AURO-GENERATED-CONTENT:END -->
46
55
 
47
56
  ## Basic
@@ -153,7 +162,7 @@ Use the `noIcon` attribute to remove the icon from the alert UI when the `type`
153
162
 
154
163
  ### Type
155
164
 
156
- Use the `type` attribute to apply an icon and border color that match the alert’s purpose. It supports the following values: `error`, `information`, `success`, and `warning`.
165
+ Use the `type` attribute to apply an icon and border color that match the alert’s purpose. It supports the following values: `error`, `information`, `success`, and `warning`. The `error`, `success`, and `warning` types use `role="alert"`, so screen readers announce them right away. The `information` type doesn't use it, so screen readers don't announce it automatically.
157
166
 
158
167
  <div class="exampleWrapper">
159
168
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/type.html) -->
package/demo/api.min.js CHANGED
@@ -268,6 +268,11 @@ var tokensCss = i$3`:host{--ds-auro-alert-border-color: var(--ds-basic-color-sta
268
268
  * @slot - Provide text for the alert. If using multiple lines, separate each line with `<p>` tags.
269
269
  * @csspart alert - The outer container that holds the icon and the message.
270
270
  * @csspart alert-content - The area next to the icon that holds the alert message.
271
+ *
272
+ * @cssprop --ds-auro-alert-border-color - Color of the alert's border.
273
+ * @cssprop --ds-auro-alert-container-color - Background color of the alert.
274
+ * @cssprop --ds-auro-alert-icon-color - Color of the alert's icon.
275
+ * @cssprop --ds-auro-alert-text-color - Color of the alert's text.
271
276
  */
272
277
  class AuroAlert extends AuroElement {
273
278
  constructor() {
@@ -339,7 +344,7 @@ class AuroAlert extends AuroElement {
339
344
  },
340
345
 
341
346
  /**
342
- * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color.
347
+ * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
343
348
  * @type {'information' | 'error' | 'success' | 'warning'}
344
349
  */
345
350
  type: {
package/demo/index.min.js CHANGED
@@ -268,6 +268,11 @@ var tokensCss = i$3`:host{--ds-auro-alert-border-color: var(--ds-basic-color-sta
268
268
  * @slot - Provide text for the alert. If using multiple lines, separate each line with `<p>` tags.
269
269
  * @csspart alert - The outer container that holds the icon and the message.
270
270
  * @csspart alert-content - The area next to the icon that holds the alert message.
271
+ *
272
+ * @cssprop --ds-auro-alert-border-color - Color of the alert's border.
273
+ * @cssprop --ds-auro-alert-container-color - Background color of the alert.
274
+ * @cssprop --ds-auro-alert-icon-color - Color of the alert's icon.
275
+ * @cssprop --ds-auro-alert-text-color - Color of the alert's text.
271
276
  */
272
277
  class AuroAlert extends AuroElement {
273
278
  constructor() {
@@ -339,7 +344,7 @@ class AuroAlert extends AuroElement {
339
344
  },
340
345
 
341
346
  /**
342
- * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color.
347
+ * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
343
348
  * @type {'information' | 'error' | 'success' | 'warning'}
344
349
  */
345
350
  type: {
package/dist/index.d.ts CHANGED
@@ -85,7 +85,7 @@ export type AuroAlertProps = {
85
85
  hiddenVisually?: AuroAlert["hiddenVisually"];
86
86
  /** Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. */
87
87
  noIcon?: AuroAlert["noIcon"];
88
- /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. */
88
+ /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically. */
89
89
  type?: AuroAlert["type"];
90
90
  };
91
91
 
@@ -98,7 +98,7 @@ export type AuroAlertSolidJsProps = {
98
98
  "prop:hiddenVisually"?: AuroAlert["hiddenVisually"];
99
99
  /** Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. */
100
100
  "prop:noIcon"?: AuroAlert["noIcon"];
101
- /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. */
101
+ /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically. */
102
102
  "prop:type"?: AuroAlert["type"];
103
103
 
104
104
  /** Set the innerHTML of the element */
@@ -130,7 +130,7 @@ export type CustomElements = {
130
130
  * - `hiddenAudible`: Hides the alert from screen readers while keeping it visible.
131
131
  * - `hiddenVisually`: Hides the alert visually while keeping it available to screen readers.
132
132
  * - `noIcon`: Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon.
133
- * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color.
133
+ * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
134
134
  *
135
135
  * ## Slots
136
136
  *
@@ -144,6 +144,15 @@ export type CustomElements = {
144
144
  *
145
145
  * - `register(name?: string = "auro-alert") => void`: Registers the element with the browser under a tag name.
146
146
  *
147
+ * ## CSS Custom Properties
148
+ *
149
+ * CSS variables available for styling the component.
150
+ *
151
+ * - `--ds-auro-alert-border-color`: Color of the alert's border. (default: `undefined`)
152
+ * - `--ds-auro-alert-container-color`: Background color of the alert. (default: `undefined`)
153
+ * - `--ds-auro-alert-icon-color`: Color of the alert's icon. (default: `undefined`)
154
+ * - `--ds-auro-alert-text-color`: Color of the alert's text. (default: `undefined`)
155
+ *
147
156
  * ## CSS Parts
148
157
  *
149
158
  * Custom selectors for styling elements within the component.
@@ -177,7 +186,7 @@ export type CustomElementsSolidJs = {
177
186
  * - `hiddenAudible`: Hides the alert from screen readers while keeping it visible.
178
187
  * - `hiddenVisually`: Hides the alert visually while keeping it available to screen readers.
179
188
  * - `noIcon`: Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon.
180
- * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color.
189
+ * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
181
190
  *
182
191
  * ## Slots
183
192
  *
@@ -191,6 +200,15 @@ export type CustomElementsSolidJs = {
191
200
  *
192
201
  * - `register(name?: string = "auro-alert") => void`: Registers the element with the browser under a tag name.
193
202
  *
203
+ * ## CSS Custom Properties
204
+ *
205
+ * CSS variables available for styling the component.
206
+ *
207
+ * - `--ds-auro-alert-border-color`: Color of the alert's border. (default: `undefined`)
208
+ * - `--ds-auro-alert-container-color`: Background color of the alert. (default: `undefined`)
209
+ * - `--ds-auro-alert-icon-color`: Color of the alert's icon. (default: `undefined`)
210
+ * - `--ds-auro-alert-text-color`: Color of the alert's text. (default: `undefined`)
211
+ *
194
212
  * ## CSS Parts
195
213
  *
196
214
  * Custom selectors for styling elements within the component.
@@ -203,7 +221,16 @@ export type CustomElementsSolidJs = {
203
221
  >;
204
222
  };
205
223
 
206
- export type CustomCssProperties = {};
224
+ export type CustomCssProperties = {
225
+ /** Color of the alert's border. */
226
+ "--ds-auro-alert-border-color"?: string;
227
+ /** Background color of the alert. */
228
+ "--ds-auro-alert-container-color"?: string;
229
+ /** Color of the alert's icon. */
230
+ "--ds-auro-alert-icon-color"?: string;
231
+ /** Color of the alert's text. */
232
+ "--ds-auro-alert-text-color"?: string;
233
+ };
207
234
 
208
235
  declare module "react" {
209
236
  namespace JSX {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "================================================================================"
9
9
  ],
10
10
  "name": "@aurodesignsystem-dev/auro-alert",
11
- "version": "0.0.0-pr124.0",
11
+ "version": "0.0.0-pr124.1",
12
12
  "description": "auro-alert HTML custom element",
13
13
  "repository": {
14
14
  "type": "git",