@rarui/components 1.30.3 → 1.31.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/CHANGELOG.md +29 -0
- package/custom-elements.json +50 -5
- package/dist/index.d.ts +49 -14
- package/dist/index.js +100 -70
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
`@rarui/components` components is a component library built with [Lit](https://lit.dev/).
|
|
4
4
|
|
|
5
|
+
## 2025-11-26 `1.31.1`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- **IconButton `as` Property**: Added `as` property to IconButton component allowing it to render as either `button` (default) or `a` elements. When `as="a"` is used, the component accepts `href` and `target` properties for link behavior while maintaining the same visual styling and click event handling. Form-related functionality (submit/reset) is only active when `as="button"`. Also added `PassThroughAttributesMixin` for data-* attribute support and improved property bindings with `reflect: true` for better debugging. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
10
|
+
- **RadioButton Screen Reader Group Announcement**: Enhanced RadioButton component with ARIA group position attributes (`aria-setsize`, `aria-posinset`) for proper screen reader announcements. Radio buttons now correctly announce their position within the group (e.g., "option 1 of 4" instead of "option 1 of 1"). Includes automatic group detection via MutationObserver for dynamic DOM updates. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
11
|
+
|
|
12
|
+
#### 🐛 Bug fixes
|
|
13
|
+
|
|
14
|
+
- **Select Keyboard Navigation**: Fixed Select component keyboard navigation where Enter key on options was not closing the menu. Moved `@keydown` handler from dropdown to trigger element only, preventing option events from propagating and triggering menu toggle. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
15
|
+
- **Checkbox Readonly Focus Ring**: Fixed Checkbox component showing focus ring when in readonly state. Added `:focus-within:not(:read-only)` CSS selector to prevent focus ring, set `tabindex="-1"` to make readonly checkboxes non-focusable, and added `aria-readonly` attribute for screen readers. Updated hover overlay styles to exclude readonly state. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
16
|
+
- **Select Clear Button Keyboard Navigation**: Fixed Select multiple clear options button not working with Space key. Added `stopPropagation()` for Space/Enter keyboard events on the clear button to prevent the events from bubbling up to parent trigger's keydown handler which was opening the menu instead of clearing options. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
17
|
+
|
|
18
|
+
#### 💡 Others
|
|
19
|
+
|
|
20
|
+
- **Toggle Property Binding Improvements**: Enhanced Toggle component property bindings following Lit best practices. Added `reflect: true` to all visual and state properties (size, error, selected, disabled, required) for better CSS styling support and debugging visibility. Removed unnecessary boolean converters as Lit handles boolean attributes automatically. Added explicit default values for `selected` and `disabled` properties for consistency. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
21
|
+
- **RadioButton Property Binding Improvements**: Enhanced RadioButton component property bindings following Lit best practices. Added `reflect: true` to all visual and state properties (disabled, size, error, selected, required, readonly) for better CSS styling support and debugging visibility. Removed unnecessary boolean converters and optional types on properties with default values. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
22
|
+
- **Screen Reader Improvements**: Added `aria-hidden="true"` to decorative text elements (Toggle label, Checkbox label, RadioButton label) to prevent duplicate screen reader announcements. Labels are now properly announced via `aria-label` on input elements only. ([#150](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/150) by [@junior](https://git.rarolabs.com.br/junior))
|
|
23
|
+
|
|
24
|
+
## 2025-11-25 `1.31.0`
|
|
25
|
+
|
|
26
|
+
#### 🎉 New features
|
|
27
|
+
|
|
28
|
+
- **Banner Tonal Property**: Added `tonal` property to Banner component enabling subdued color variants for all appearance types. When enabled, displays softer, less vibrant versions of appearance colors for a more subtle presentation. ([#149](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/149) by [@junior](https://git.rarolabs.com.br/junior))
|
|
29
|
+
|
|
30
|
+
#### 💡 Others
|
|
31
|
+
|
|
32
|
+
- **Banner Property Binding Improvements**: Enhanced Banner component property bindings following Lit best practices. Added `reflect: true` to all visual properties (appearance, floating, closable, tonal) for better CSS styling support and debugging visibility. Removed unnecessary boolean converters as Lit handles boolean attributes automatically. Added default value `"brand"` to `appearance` property for consistency with React implementation. ([#149](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/149) by [@junior](https://git.rarolabs.com.br/junior))
|
|
33
|
+
|
|
5
34
|
## 2025-11-14 `1.30.3`
|
|
6
35
|
|
|
7
36
|
#### 🐛 Bug fixes
|
package/custom-elements.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.31.0",
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
5
|
"name": "rarui-avatar",
|
|
@@ -3212,9 +3212,24 @@
|
|
|
3212
3212
|
"type": "boolean",
|
|
3213
3213
|
"default": false
|
|
3214
3214
|
},
|
|
3215
|
+
{
|
|
3216
|
+
"name": "as",
|
|
3217
|
+
"description": "Defines the HTML element type to render.\n\n- a\n- button\n\n@default button",
|
|
3218
|
+
"type": "string",
|
|
3219
|
+
"values": [
|
|
3220
|
+
{
|
|
3221
|
+
"name": "a"
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
"name": "button",
|
|
3225
|
+
"description": "(default)"
|
|
3226
|
+
}
|
|
3227
|
+
],
|
|
3228
|
+
"default": "button"
|
|
3229
|
+
},
|
|
3215
3230
|
{
|
|
3216
3231
|
"name": "type",
|
|
3217
|
-
"description": "Defines the native button type.\n\n- button\n- reset\n- submit\n\n@default button",
|
|
3232
|
+
"description": "Defines the native button type. Only applies when as=\"button\".\n\n- button\n- reset\n- submit\n\n@default button",
|
|
3218
3233
|
"type": "string",
|
|
3219
3234
|
"values": [
|
|
3220
3235
|
{
|
|
@@ -3232,18 +3247,42 @@
|
|
|
3232
3247
|
},
|
|
3233
3248
|
{
|
|
3234
3249
|
"name": "name",
|
|
3235
|
-
"description": "The name of the button for form submission.",
|
|
3250
|
+
"description": "The name of the button for form submission. Only applies when as=\"button\".",
|
|
3236
3251
|
"type": "string"
|
|
3237
3252
|
},
|
|
3238
3253
|
{
|
|
3239
3254
|
"name": "value",
|
|
3240
|
-
"description": "The value of the button for form submission.",
|
|
3255
|
+
"description": "The value of the button for form submission. Only applies when as=\"button\".",
|
|
3241
3256
|
"type": "string"
|
|
3242
3257
|
},
|
|
3243
3258
|
{
|
|
3244
3259
|
"name": "form",
|
|
3245
|
-
"description": "Associates the button with a form element by ID.",
|
|
3260
|
+
"description": "Associates the button with a form element by ID. Only applies when as=\"button\".",
|
|
3261
|
+
"type": "string"
|
|
3262
|
+
},
|
|
3263
|
+
{
|
|
3264
|
+
"name": "href",
|
|
3265
|
+
"description": "The URL to navigate to. Only applies when as=\"a\".",
|
|
3246
3266
|
"type": "string"
|
|
3267
|
+
},
|
|
3268
|
+
{
|
|
3269
|
+
"name": "target",
|
|
3270
|
+
"description": "Specifies where to open the linked document. Only applies when as=\"a\".\n\n- _blank\n- _parent\n- _self\n- _top",
|
|
3271
|
+
"type": "string",
|
|
3272
|
+
"values": [
|
|
3273
|
+
{
|
|
3274
|
+
"name": "_blank"
|
|
3275
|
+
},
|
|
3276
|
+
{
|
|
3277
|
+
"name": "_parent"
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
"name": "_self"
|
|
3281
|
+
},
|
|
3282
|
+
{
|
|
3283
|
+
"name": "_top"
|
|
3284
|
+
}
|
|
3285
|
+
]
|
|
3247
3286
|
}
|
|
3248
3287
|
]
|
|
3249
3288
|
},
|
|
@@ -9112,6 +9151,12 @@
|
|
|
9112
9151
|
"type": "boolean",
|
|
9113
9152
|
"default": false
|
|
9114
9153
|
},
|
|
9154
|
+
{
|
|
9155
|
+
"name": "tonal",
|
|
9156
|
+
"description": "Enables subdued color variants for the banner. When true, uses softer, less vibrant versions of the appearance colors for a more subtle presentation.",
|
|
9157
|
+
"type": "boolean",
|
|
9158
|
+
"default": false
|
|
9159
|
+
},
|
|
9115
9160
|
{
|
|
9116
9161
|
"name": "closable",
|
|
9117
9162
|
"description": "If `true`, display the closing button in the upper right corner of the banner.\nWhen clicked, it fires the `close` event that can be listened to externally.",
|
package/dist/index.d.ts
CHANGED
|
@@ -17305,6 +17305,13 @@ declare const bannerStyles: {
|
|
|
17305
17305
|
borderRadius: `var(--${string})` | `var(--${string}, ${string})`;
|
|
17306
17306
|
};
|
|
17307
17307
|
};
|
|
17308
|
+
/**
|
|
17309
|
+
* Enables subdued color variants for the banner. When true, uses softer, less vibrant versions of the appearance colors for a more subtle presentation.
|
|
17310
|
+
* @default false
|
|
17311
|
+
*/
|
|
17312
|
+
tonal: {
|
|
17313
|
+
true: {};
|
|
17314
|
+
};
|
|
17308
17315
|
}>;
|
|
17309
17316
|
};
|
|
17310
17317
|
|
|
@@ -19363,26 +19370,44 @@ declare global {
|
|
|
19363
19370
|
*/
|
|
19364
19371
|
type IconButtonManifestProperties = IconButtonProps & {
|
|
19365
19372
|
/**
|
|
19366
|
-
* Defines the
|
|
19373
|
+
* Defines the HTML element type to render.
|
|
19374
|
+
* @default button
|
|
19375
|
+
*/
|
|
19376
|
+
as?: "button" | "a";
|
|
19377
|
+
/**
|
|
19378
|
+
* Defines the native button type. Only applies when as="button".
|
|
19367
19379
|
* @default button
|
|
19368
19380
|
*/
|
|
19369
19381
|
type?: "button" | "submit" | "reset";
|
|
19370
19382
|
/**
|
|
19371
|
-
* The name of the button for form submission.
|
|
19383
|
+
* The name of the button for form submission. Only applies when as="button".
|
|
19372
19384
|
*/
|
|
19373
19385
|
name?: string;
|
|
19374
19386
|
/**
|
|
19375
|
-
* The value of the button for form submission.
|
|
19387
|
+
* The value of the button for form submission. Only applies when as="button".
|
|
19376
19388
|
*/
|
|
19377
19389
|
value?: string;
|
|
19378
19390
|
/**
|
|
19379
|
-
* Associates the button with a form element by ID.
|
|
19391
|
+
* Associates the button with a form element by ID. Only applies when as="button".
|
|
19380
19392
|
*/
|
|
19381
19393
|
form?: string;
|
|
19394
|
+
/**
|
|
19395
|
+
* The URL to navigate to. Only applies when as="a".
|
|
19396
|
+
*/
|
|
19397
|
+
href?: string;
|
|
19398
|
+
/**
|
|
19399
|
+
* Specifies where to open the linked document. Only applies when as="a".
|
|
19400
|
+
*/
|
|
19401
|
+
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
19382
19402
|
};
|
|
19383
19403
|
type IconButtonProperties = WebComponentProperties<IconButtonManifestProperties>;
|
|
19384
19404
|
|
|
19385
19405
|
declare const RaruiIconButton_base: (new (...args: any[]) => {
|
|
19406
|
+
getPassThroughAttributes(allowedPrefixes?: string[], excludedAttributes?: string[]): Record<string, string>;
|
|
19407
|
+
isManagedAttribute(attrName: string, additionalManagedAttrs?: string[]): boolean;
|
|
19408
|
+
getDataAttributes(excludedAttributes?: string[]): Record<string, string>;
|
|
19409
|
+
getDataAndAriaAttributes(excludedAttributes?: string[]): Record<string, string>;
|
|
19410
|
+
}) & (new (...args: any[]) => {
|
|
19386
19411
|
ariaLabel: string | null;
|
|
19387
19412
|
ariaLabelledBy: string | null;
|
|
19388
19413
|
ariaDescribedBy: string | null;
|
|
@@ -19394,20 +19419,24 @@ declare class RaruiIconButton extends RaruiIconButton_base {
|
|
|
19394
19419
|
serializable?: boolean;
|
|
19395
19420
|
slotAssignment?: SlotAssignmentMode;
|
|
19396
19421
|
};
|
|
19422
|
+
type: IconButtonProperties["type"];
|
|
19397
19423
|
size: IconButtonProperties["size"];
|
|
19398
19424
|
variant: IconButtonProperties["variant"];
|
|
19399
19425
|
appearance: IconButtonProperties["appearance"];
|
|
19400
19426
|
disabled: IconButtonProperties["disabled"];
|
|
19401
19427
|
rounded: IconButtonProperties["rounded"];
|
|
19402
|
-
type: IconButtonProperties["type"];
|
|
19403
19428
|
name: IconButtonProperties["name"];
|
|
19404
19429
|
value: IconButtonProperties["value"];
|
|
19405
19430
|
form: IconButtonProperties["form"];
|
|
19431
|
+
as: IconButtonProperties["as"];
|
|
19432
|
+
href: IconButtonProperties["href"];
|
|
19433
|
+
target: IconButtonProperties["target"];
|
|
19406
19434
|
ariaPressed: "true" | "false" | "mixed" | null;
|
|
19407
19435
|
ariaExpanded: "true" | "false" | null;
|
|
19408
19436
|
static styles: CSSResult;
|
|
19409
|
-
private
|
|
19437
|
+
private renderContent;
|
|
19410
19438
|
render(): TemplateResult<1>;
|
|
19439
|
+
private _handleClick;
|
|
19411
19440
|
}
|
|
19412
19441
|
|
|
19413
19442
|
declare global {
|
|
@@ -19574,17 +19603,20 @@ declare const RaruiRadioButton_base: (new (...args: any[]) => {
|
|
|
19574
19603
|
}) & typeof LitElement;
|
|
19575
19604
|
declare class RaruiRadioButton extends RaruiRadioButton_base {
|
|
19576
19605
|
id: string;
|
|
19577
|
-
disabled:
|
|
19606
|
+
disabled: RadioButtonProperties["disabled"];
|
|
19578
19607
|
name?: string;
|
|
19579
19608
|
label?: RadioButtonProperties["label"];
|
|
19580
|
-
size
|
|
19581
|
-
error
|
|
19582
|
-
selected
|
|
19609
|
+
size: RadioButtonProperties["size"];
|
|
19610
|
+
error: RadioButtonProperties["error"];
|
|
19611
|
+
selected: RadioButtonProperties["selected"];
|
|
19583
19612
|
value: RadioButtonProperties["value"];
|
|
19584
19613
|
form: RadioButtonProperties["form"];
|
|
19585
19614
|
required: RadioButtonProperties["required"];
|
|
19586
19615
|
readonly: RadioButtonProperties["readonly"];
|
|
19587
19616
|
private _internals;
|
|
19617
|
+
private _groupSize;
|
|
19618
|
+
private _positionInGroup;
|
|
19619
|
+
private _groupObserver?;
|
|
19588
19620
|
static formAssociated: boolean;
|
|
19589
19621
|
constructor();
|
|
19590
19622
|
connectedCallback(): void;
|
|
@@ -19595,6 +19627,8 @@ declare class RaruiRadioButton extends RaruiRadioButton_base {
|
|
|
19595
19627
|
private _onChange;
|
|
19596
19628
|
private _handleRadioGroupChange;
|
|
19597
19629
|
private _notifyRadioGroupSelection;
|
|
19630
|
+
private _updateGroupInfo;
|
|
19631
|
+
private _setupGroupObserver;
|
|
19598
19632
|
focus(): void;
|
|
19599
19633
|
blur(): void;
|
|
19600
19634
|
formResetCallback(): void;
|
|
@@ -19925,10 +19959,10 @@ declare class RaruiToggle extends RaruiToggle_base {
|
|
|
19925
19959
|
};
|
|
19926
19960
|
name: ToggleProperties["name"];
|
|
19927
19961
|
label: ToggleProperties["label"];
|
|
19928
|
-
size
|
|
19962
|
+
size: ToggleProperties["size"];
|
|
19929
19963
|
error: ToggleProperties["error"];
|
|
19930
|
-
selected
|
|
19931
|
-
disabled
|
|
19964
|
+
selected: ToggleProperties["selected"];
|
|
19965
|
+
disabled: ToggleProperties["disabled"];
|
|
19932
19966
|
value: ToggleProperties["value"];
|
|
19933
19967
|
form: ToggleProperties["form"];
|
|
19934
19968
|
required: ToggleProperties["required"];
|
|
@@ -20556,9 +20590,10 @@ declare const RaruiBanner_base: (new (...args: any[]) => {
|
|
|
20556
20590
|
ariaDescribedBy: string | null;
|
|
20557
20591
|
}) & typeof LitElement;
|
|
20558
20592
|
declare class RaruiBanner extends RaruiBanner_base {
|
|
20559
|
-
appearance
|
|
20593
|
+
appearance: BannerProperties["appearance"];
|
|
20560
20594
|
floating: BannerProperties["floating"];
|
|
20561
20595
|
closable: BannerProperties["closable"];
|
|
20596
|
+
tonal: BannerProperties["tonal"];
|
|
20562
20597
|
static styles: CSSResult;
|
|
20563
20598
|
private handleClose;
|
|
20564
20599
|
render(): TemplateResult<1>;
|