@rarui/components 1.30.0 → 1.30.2

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/custom-elements.json +10 -3
  3. package/dist/index.d.ts +56 -3
  4. package/dist/index.js +31 -25
  5. package/package.json +1 -1
  6. package/src/exhibition/Avatar/README.md +0 -15
  7. package/src/exhibition/Badge/README.md +0 -15
  8. package/src/exhibition/Divider/README.md +0 -15
  9. package/src/exhibition/Icon/README.md +0 -15
  10. package/src/exhibition/Label/README.md +0 -15
  11. package/src/exhibition/Stepper/README.md +0 -15
  12. package/src/exhibition/Text/README.md +0 -15
  13. package/src/exhibition/Title/README.md +0 -15
  14. package/src/exhibition/Tooltip/README.md +0 -15
  15. package/src/feedback/Progress/README.md +0 -15
  16. package/src/feedback/Skeleton/README.md +0 -15
  17. package/src/feedback/Status/README.md +0 -15
  18. package/src/input/Button/README.md +0 -15
  19. package/src/input/Checkbox/README.md +0 -15
  20. package/src/input/Chip/README.md +0 -15
  21. package/src/input/Dropdown/README.md +0 -15
  22. package/src/input/IconButton/README.md +0 -15
  23. package/src/input/Input/README.md +0 -44
  24. package/src/input/RadioButton/README.md +0 -15
  25. package/src/input/Select/README.md +0 -13
  26. package/src/input/Textarea/README.md +0 -15
  27. package/src/input/Toggle/README.md +0 -15
  28. package/src/layout/Box/README.md +0 -15
  29. package/src/layout/Sidebar/README.md +0 -109
  30. package/src/navigation/Breadcrumb/README.md +0 -56
  31. package/src/navigation/Link/README.md +0 -15
  32. package/src/navigation/Pagination/README.md +0 -15
  33. package/src/navigation/SideNavigation/README.md +0 -87
  34. package/src/navigation/Tabs/README.md +0 -9
  35. package/src/stylization/ThemeProvider/README.md +0 -56
  36. package/src/surface/Accordion/README.md +0 -93
  37. package/src/surface/Banner/README.md +0 -15
  38. package/src/surface/Card/README.md +0 -15
  39. package/src/surface/Modal/README.md +0 -15
  40. package/src/types/README.md +0 -73
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  `@rarui/components` components is a component library built with [Lit](https://lit.dev/).
4
4
 
5
+ ## 2025-11-06 `1.30.2`
6
+
7
+ #### 🎉 New features
8
+
9
+ - **KeyboardNavigationMixin**: Added standardized keyboard navigation mixin for consistent keyboard interaction patterns across web components. Implements WAI-ARIA keyboard patterns (Enter/Space activation, Arrow navigation, Escape close) through reusable mixin architecture with `KeyboardNavigationBehavior` interface. ([#147](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/147) by [@junior](https://git.rarolabs.com.br/junior))
10
+
11
+ #### 🐛 Bug fixes
12
+
13
+ - **RadioButton Form Integration**: Fixed RadioButton component not sending form value when loaded with default selected state. Added proper form value initialization in `connectedCallback()` and reactive form value updates when `selected` property changes via `updated()` lifecycle method. ([#147](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/147) by [@junior](https://git.rarolabs.com.br/junior))
14
+ - **Select Keyboard Navigation**: Fixed Select component not opening dropdown with Enter/Space key navigation. Implemented proper keyboard event handling using new KeyboardNavigationMixin with support for Enter/Space (toggle), Arrow keys (open), and Escape (close) following accessibility standards. ([#147](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/147) by [@junior](https://git.rarolabs.com.br/junior))
15
+ - **Banner Event Handling**: Enhanced Banner component event handling and accessibility improvements with better focus management and semantic interaction patterns. ([#147](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/147) by [@junior](https://git.rarolabs.com.br/junior))
16
+
17
+ ## 2025-10-20 `1.30.1`
18
+
19
+ #### 🎉 New features
20
+
21
+ - **BreadcrumbItem Disabled Property**: Added `disabled` property to BreadcrumbItem component allowing items to be marked as non-interactive. Disabled items prevent clicks, display with disabled styling, and include proper accessibility attributes (`aria-disabled`, `disabled` for buttons) for screen reader compatibility. ([#145](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/145) by [@junior](https://git.rarolabs.com.br/junior))
22
+
23
+ #### 🐛 Bug fixes
24
+
25
+ - **Breadcrumb Property Binding Optimization**: Fixed BreadcrumbItem boolean property bindings following Lit best practices. Replaced incorrect `.active=${value}` property binding with `?active=${value}` boolean attribute binding for optimal performance. Removed unnecessary boolean converter and added `reflect: true` to `active` property for CSS styling support and better debugging visibility. ([#145](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/145) by [@junior](https://git.rarolabs.com.br/junior))
26
+
27
+ #### 💡 Others
28
+
29
+ - **Lit Binding Standards Compliance**: Comprehensive review of Breadcrumb and BreadcrumbItem components ensuring full compliance with Lit binding best practices. Implemented proper boolean attribute binding (`?attribute`), added reflection for CSS-dependent properties, improved type safety, and enhanced accessibility with semantic HTML attributes. ([#145](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/145) by [@junior](https://git.rarolabs.com.br/junior))
30
+
5
31
  ## 2025-10-16 `1.30.0`
6
32
 
7
33
  #### 🎉 New features
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.29.0",
2
+ "version": "1.30.1",
3
3
  "tags": [
4
4
  {
5
5
  "name": "rarui-avatar",
@@ -8551,14 +8551,21 @@
8551
8551
  },
8552
8552
  {
8553
8553
  "name": "active",
8554
- "description": "Indicates whether the breadcrumb item is currently active.\nAn active item is typically styled differently to show that it represents the current page.",
8555
- "type": "boolean"
8554
+ "description": "Indica se o item está ativo (representa a página atual).\nReflete no HTML para styling CSS.",
8555
+ "type": "boolean",
8556
+ "default": false
8556
8557
  },
8557
8558
  {
8558
8559
  "name": "href",
8559
8560
  "description": "URL de destino quando o item for um link.",
8560
8561
  "type": "string"
8561
8562
  },
8563
+ {
8564
+ "name": "disabled",
8565
+ "description": "Indica se o item está desabilitado e não pode ser clicado.\nReflete no HTML para styling CSS.",
8566
+ "type": "boolean",
8567
+ "default": false
8568
+ },
8562
8569
  {
8563
8570
  "name": "as",
8564
8571
  "description": "Tipo de elemento a ser renderizado.\n\n- a\n- button\n\n@default button",
package/dist/index.d.ts CHANGED
@@ -19588,6 +19588,7 @@ declare class RaruiRadioButton extends RaruiRadioButton_base {
19588
19588
  static formAssociated: boolean;
19589
19589
  constructor();
19590
19590
  connectedCallback(): void;
19591
+ updated(changedProperties: Map<string | number | symbol, unknown>): void;
19591
19592
  disconnectedCallback(): void;
19592
19593
  static styles: CSSResult;
19593
19594
  render(): TemplateResult<1>;
@@ -19599,6 +19600,38 @@ declare class RaruiRadioButton extends RaruiRadioButton_base {
19599
19600
  formResetCallback(): void;
19600
19601
  }
19601
19602
 
19603
+ /**
19604
+ * Interface for keyboard navigation behavior
19605
+ */
19606
+ interface KeyboardNavigationBehavior {
19607
+ /**
19608
+ * Called when Enter or Space key is pressed
19609
+ */
19610
+ handleActivation?(): void;
19611
+ /**
19612
+ * Called when arrow keys are pressed
19613
+ * @param key - The arrow key pressed ('ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight')
19614
+ */
19615
+ handleArrowNavigation?(key: string): void;
19616
+ /**
19617
+ * Called when Escape key is pressed
19618
+ */
19619
+ handleEscape?(): void;
19620
+ /**
19621
+ * Called when Home key is pressed
19622
+ */
19623
+ handleHome?(): void;
19624
+ /**
19625
+ * Called when End key is pressed
19626
+ */
19627
+ handleEnd?(): void;
19628
+ /**
19629
+ * Called when Tab key is pressed
19630
+ * @param event - The keyboard event (in case you need to prevent default)
19631
+ */
19632
+ handleTab?(event: KeyboardEvent): void;
19633
+ }
19634
+
19602
19635
  declare global {
19603
19636
  interface HTMLElementTagNameMap {
19604
19637
  "rarui-select": RaruiSelect;
@@ -19654,6 +19687,8 @@ type SelectManifestProperties = Omit<SelectProps, "onChange" | "portalId" | "opt
19654
19687
  type SelectProperties = WebComponentProperties<SelectManifestProperties>;
19655
19688
 
19656
19689
  declare const RaruiSelect_base: (new (...args: any[]) => {
19690
+ handleKeydown(event: KeyboardEvent): void;
19691
+ }) & (new (...args: any[]) => {
19657
19692
  ariaLabel: string | null;
19658
19693
  ariaLabelledBy: string | null;
19659
19694
  ariaDescribedBy: string | null;
@@ -19661,7 +19696,7 @@ declare const RaruiSelect_base: (new (...args: any[]) => {
19661
19696
  cssProps: Record<string, any>;
19662
19697
  sprinkleAttrs: Record<string, any>;
19663
19698
  }) & typeof LitElement;
19664
- declare class RaruiSelect extends RaruiSelect_base {
19699
+ declare class RaruiSelect extends RaruiSelect_base implements KeyboardNavigationBehavior {
19665
19700
  static shadowRootOptions: {
19666
19701
  delegatesFocus: boolean;
19667
19702
  mode: ShadowRootMode;
@@ -19717,6 +19752,9 @@ declare class RaruiSelect extends RaruiSelect_base {
19717
19752
  private _handleOptionUnmount;
19718
19753
  private _updateContext;
19719
19754
  private handleSelectClick;
19755
+ handleActivation(): void;
19756
+ handleArrowNavigation(key: string): void;
19757
+ handleEscape(): void;
19720
19758
  render(): TemplateResult<1>;
19721
19759
  private _renderTrigger;
19722
19760
  private _renderPlaceholder;
@@ -20022,6 +20060,18 @@ type BreadcrumbItemManifestProperties = BreadcrumbItemProps & {
20022
20060
  * URL de destino quando o item for um link.
20023
20061
  */
20024
20062
  href?: string;
20063
+ /**
20064
+ * Indica se o item está ativo (representa a página atual).
20065
+ * Reflete no HTML para styling CSS.
20066
+ * @default false
20067
+ */
20068
+ active?: boolean;
20069
+ /**
20070
+ * Indica se o item está desabilitado e não pode ser clicado.
20071
+ * Reflete no HTML para styling CSS.
20072
+ * @default false
20073
+ */
20074
+ disabled?: boolean;
20025
20075
  /**
20026
20076
  * Tipo de elemento a ser renderizado.
20027
20077
  * @default "button"
@@ -20049,8 +20099,11 @@ declare class RaruiBreadcrumbItem extends RaruiBreadcrumbItem_base {
20049
20099
  };
20050
20100
  name?: BreadcrumbItemProperties["name"];
20051
20101
  href?: BreadcrumbItemProperties["href"];
20052
- active?: BreadcrumbItemProperties["active"];
20053
- as?: BreadcrumbItemProperties["as"];
20102
+ /** Active state - reflects to CSS for styling */
20103
+ active: BreadcrumbItemProperties["active"];
20104
+ /** Disabled state - reflects to CSS for styling */
20105
+ disabled: BreadcrumbItemProperties["disabled"];
20106
+ as: BreadcrumbItemProperties["as"];
20054
20107
  static styles: CSSResult;
20055
20108
  private handleClick;
20056
20109
  render(): TemplateResult<1>;