@rarui/components 1.30.1 → 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 +13 -1
  2. package/custom-elements.json +1 -1
  3. package/dist/index.d.ts +39 -1
  4. package/dist/index.js +7 -7
  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,7 +2,19 @@
2
2
 
3
3
  `@rarui/components` components is a component library built with [Lit](https://lit.dev/).
4
4
 
5
- ## 2025-10-20 `1.31.0`
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`
6
18
 
7
19
  #### 🎉 New features
8
20
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.30.0",
2
+ "version": "1.30.1",
3
3
  "tags": [
4
4
  {
5
5
  "name": "rarui-avatar",
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;
package/dist/index.js CHANGED
@@ -459,7 +459,7 @@ const po=Symbol.for(""),mo=r=>{if(r?.r===po)return r?._$litStatic$},wo=r=>({_$li
459
459
  </button>
460
460
  `}};Xa.shadowRootOptions={...er.shadowRootOptions,delegatesFocus:!0},Xa.styles=t`
461
461
  ${e(".rarui-chip__1rk47pp0 {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: fit-content;\n box-sizing: border-box;\n position: relative;\n border-style: solid;\n transition: all 150ms ease;\n overflow: hidden;\n gap: var(--rarui-spacing-3xs);\n font-weight: var(--rarui-fontWeight-medium);\n font-family: var(--rarui-fontFamily-body);\n border-width: var(--rarui-shape-border-width-1);\n border-radius: var(--rarui-shape-border-radius-2xs);\n border-color: var(--rarui-colors-border-subdued);\n background-color: var(--rarui-colors-surface-primary);\n color: var(--rarui-colors-content-primary);\n}\n.rarui-chip__1rk47pp0:focus-within {\n outline: none;\n box-shadow: var(--rarui-elevation-focus-ring);\n}\n.rarui-chip__1rk47pp0:hover {\n background-color: var(--rarui-colors-surface-brand-hover);\n border-color: var(--rarui-colors-border-brand);\n}\n.rarui-chip__1rk47pp0:active {\n background-color: var(--rarui-colors-surface-brand-press);\n}\n.rarui-chip__1rk47pp0:disabled {\n background: var(--rarui-colors-surface-disabled);\n border-color: var(--rarui-colors-border-disabled);\n color: var(--rarui-colors-content-disabled);\n cursor: not-allowed;\n box-shadow: none;\n}\n.rarui-chip_pill_true__1rk47pp1 {\n border-radius: var(--rarui-shape-border-radius-pill);\n}\n.rarui-chip_selected_true__1rk47pp2 {\n border-color: var(--rarui-colors-surface-brand);\n background-color: var(--rarui-colors-surface-brand);\n color: var(--rarui-colors-content-on-brand);\n}\n.rarui-chip_selected_true__1rk47pp2:hover {\n background-color: var(--rarui-colors-surface-brand);\n}\n.rarui-chip_size_medium__1rk47pp3 {\n line-height: var(--rarui-lineHeight-button-m);\n font-size: var(--rarui-fontSize-button-m);\n height: 2rem;\n}\n.rarui-chip_size_small__1rk47pp4 {\n line-height: var(--rarui-lineHeight-button-s);\n font-size: var(--rarui-fontSize-button-s);\n height: 1.5rem;\n}\n.rarui-chip_textOverflow_true__1rk47pp5 {\n min-width: auto;\n width: 100%;\n}\n.rarui-chip_content__1rk47pp6 {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--rarui-spacing-3xs);\n}\n.rarui-chip_content_textOverflow_true__1rk47pp7 {\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n display: block;\n overflow: hidden;\n}\n.rarui-chip_close__1rk47pp8 {\n transition: all 150ms ease;\n color: var(--rarui-colors-content-secondary);\n border-radius: var(--rarui-shape-border-radius-pill);\n}\n.rarui-chip_close__1rk47pp8:focus-within {\n outline: none;\n box-shadow: var(--rarui-elevation-focus-ring);\n}\n.rarui-chip_close__1rk47pp8:hover {\n color: var(--rarui-colors-content-primary);\n}\n.rarui-chip_close__1rk47pp8[aria-disabled='true'] {\n color: var(--rarui-colors-content-disabled);\n box-shadow: none;\n}\n.rarui-chip_overlay__1rk47pp9 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n.rarui-chip__1rk47pp0 .rarui-chip_size_medium__1rk47pp3:hover .rarui-chip_overlay__1rk47pp9 {\n border-color: var(--rarui-colors-surface-hover);\n}\n.rarui-chip__1rk47pp0 .rarui-chip_size_medium__1rk47pp3:active .rarui-chip_overlay__1rk47pp9 {\n opacity: 1;\n background-color: var(--rarui-colors-surface-press);\n border-color: var(--rarui-colors-surface-press);\n}\n.rarui-chip__1rk47pp0 .rarui-chip_size_medium__1rk47pp3:disabled .rarui-chip_overlay__1rk47pp9 {\n opacity: 0;\n}\n@media screen and (min-width: 0px) {\n .rarui-chip_textTransform-xs__1rk47ppe {\n text-transform: var(--textTransform-xs__1rk47ppa);\n }\n .rarui-chip_padding-medium-xs__1rk47ppi {\n padding: 0 var(--rarui-spacing-xs);\n }\n .rarui-chip_padding-small-xs__1rk47ppm {\n padding: 0 var(--rarui-spacing-4xs);\n }\n}\n@media screen and (min-width: 768px) {\n .rarui-chip_textTransform-md__1rk47ppf {\n text-transform: var(--textTransform-md__1rk47ppb);\n }\n .rarui-chip_padding-medium-md__1rk47ppj {\n padding: 0 var(--rarui-spacing-xs);\n }\n .rarui-chip_padding-small-md__1rk47ppn {\n padding: 0 var(--rarui-spacing-4xs);\n }\n}\n@media screen and (min-width: 1200px) {\n .rarui-chip_textTransform-lg__1rk47ppg {\n text-transform: var(--textTransform-lg__1rk47ppc);\n }\n .rarui-chip_padding-medium-lg__1rk47ppk {\n padding: 0 var(--rarui-spacing-xs);\n }\n .rarui-chip_padding-small-lg__1rk47ppo {\n padding: 0 var(--rarui-spacing-4xs);\n }\n}\n@media screen and (min-width: 1400px) {\n .rarui-chip_textTransform-xl__1rk47pph {\n text-transform: var(--textTransform-xl__1rk47ppd);\n }\n .rarui-chip_padding-medium-xl__1rk47ppl {\n padding: 0 var(--rarui-spacing-xs);\n }\n .rarui-chip_padding-small-xl__1rk47ppp {\n padding: 0 var(--rarui-spacing-4xs);\n }\n}")}
462
- `,r([fr({type:String})],Xa.prototype,"padding",void 0),r([fr({type:String})],Xa.prototype,"size",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"closeable",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"pill",void 0),r([fr({type:String,attribute:"text-transform"})],Xa.prototype,"textTransform",void 0),r([fr({type:Boolean,attribute:"text-overflow"})],Xa.prototype,"textOverflow",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"selected",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"disabled",void 0),r([fr({type:String})],Xa.prototype,"type",void 0),r([fr({type:String})],Xa.prototype,"name",void 0),r([fr({type:String})],Xa.prototype,"value",void 0),r([fr({type:String})],Xa.prototype,"form",void 0),r([fr({type:String,reflect:!0,attribute:"aria-pressed"})],Xa.prototype,"ariaPressed",void 0),Xa=r([_r("rarui-chip")],Xa);var Ya=".rarui-dropdown__1b7gjg50 {\n width: fit-content;\n display: flex;\n flex-direction: column;\n border-style: solid;\n box-sizing: border-box;\n gap: var(--rarui-spacing-3xs);\n z-index: var(--rarui-zIndex-800);\n border-radius: var(--rarui-shape-border-radius-2xs);\n padding: var(--rarui-spacing-3xs);\n box-shadow: var(--rarui-elevation-bottom-2);\n border-width: var(--rarui-shape-border-width-1);\n border-color: var(--rarui-colors-border-subdued);\n background-color: var(--rarui-colors-surface-primary);\n}\n.rarui-dropdown_padding_base__1b7gjg51 {\n padding: var(--rarui-spacing-3xs);\n}\n.rarui-dropdown_padding_none__1b7gjg52 {\n padding: 0;\n}\n.rarui-dropdown_item__1b7gjg53 {\n display: flex;\n justify-content: space-between;\n cursor: pointer;\n background-color: transparent;\n border: none;\n width: 100%;\n box-sizing: border-box;\n transition: all 150ms ease;\n border-radius: var(--rarui-shape-border-radius-2xs);\n gap: var(--rarui-spacing-3xs);\n padding: var(--rarui-spacing-3xs);\n color: var(--rarui-colors-content-primary);\n font-weight: var(--rarui-fontWeight-medium);\n font-size: var(--rarui-fontSize-button-s);\n font-family: var(--rarui-fontFamily-button);\n text-decoration: none;\n}\n.rarui-dropdown_item__1b7gjg53:focus-within {\n outline: none;\n box-shadow: var(--rarui-elevation-focus-ring);\n}\n.rarui-dropdown_item__1b7gjg53:hover {\n background-color: var(--rarui-colors-surface-hover);\n}\n.rarui-dropdown_item__1b7gjg53:active {\n background-color: var(--rarui-colors-surface-press);\n}\n.rarui-dropdown_item__1b7gjg53:disabled {\n color: var(--rarui-colors-content-disabled);\n}\n.rarui-dropdown_item_selected_true__1b7gjg54 {\n background-color: var(--rarui-colors-surface-brand-subdued);\n}\n.rarui-dropdown_item_selected_true__1b7gjg54:hover {\n background-color: var(--rarui-colors-surface-brand-subdued);\n}\n@media screen and (min-width: 0px) {\n .rarui-dropdown_width-xs__1b7gjg59 {\n width: var(--width-xs__1b7gjg55);\n }\n .rarui-dropdown_maxWidth-xs__1b7gjg5h {\n max-width: var(--maxWidth-xs__1b7gjg5d);\n }\n .rarui-dropdown_zIndex-100-xs__1b7gjg5l {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-xs__1b7gjg5p {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-xs__1b7gjg5t {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-xs__1b7gjg5x {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-xs__1b7gjg511 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-xs__1b7gjg515 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-xs__1b7gjg519 {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-xs__1b7gjg51d {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-xs__1b7gjg51h {\n z-index: var(--rarui-zIndex-900);\n }\n}\n@media screen and (min-width: 768px) {\n .rarui-dropdown_width-md__1b7gjg5a {\n width: var(--width-md__1b7gjg56);\n }\n .rarui-dropdown_maxWidth-md__1b7gjg5i {\n max-width: var(--maxWidth-md__1b7gjg5e);\n }\n .rarui-dropdown_zIndex-100-md__1b7gjg5m {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-md__1b7gjg5q {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-md__1b7gjg5u {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-md__1b7gjg5y {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-md__1b7gjg512 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-md__1b7gjg516 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-md__1b7gjg51a {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-md__1b7gjg51e {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-md__1b7gjg51i {\n z-index: var(--rarui-zIndex-900);\n }\n}\n@media screen and (min-width: 1200px) {\n .rarui-dropdown_width-lg__1b7gjg5b {\n width: var(--width-lg__1b7gjg57);\n }\n .rarui-dropdown_maxWidth-lg__1b7gjg5j {\n max-width: var(--maxWidth-lg__1b7gjg5f);\n }\n .rarui-dropdown_zIndex-100-lg__1b7gjg5n {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-lg__1b7gjg5r {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-lg__1b7gjg5v {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-lg__1b7gjg5z {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-lg__1b7gjg513 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-lg__1b7gjg517 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-lg__1b7gjg51b {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-lg__1b7gjg51f {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-lg__1b7gjg51j {\n z-index: var(--rarui-zIndex-900);\n }\n}\n@media screen and (min-width: 1400px) {\n .rarui-dropdown_width-xl__1b7gjg5c {\n width: var(--width-xl__1b7gjg58);\n }\n .rarui-dropdown_maxWidth-xl__1b7gjg5k {\n max-width: var(--maxWidth-xl__1b7gjg5g);\n }\n .rarui-dropdown_zIndex-100-xl__1b7gjg5o {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-xl__1b7gjg5s {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-xl__1b7gjg5w {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-xl__1b7gjg510 {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-xl__1b7gjg514 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-xl__1b7gjg518 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-xl__1b7gjg51c {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-xl__1b7gjg51g {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-xl__1b7gjg51k {\n z-index: var(--rarui-zIndex-900);\n }\n}";let Ka=class extends(yr(kr(er))){constructor(){super(...arguments),this.offset=10,this.position="bottom-start",this.strategy="fixed",this.enabledClick=!0,this.enabledDismiss=!0,this.open=this.visible??!1,this._hasVisibleAttribute=!1,this.updatePositionDebounceId=null,this.handleClickOutside=r=>{if(!this.enabledDismiss||!this.open)return;const i=r.composedPath();i.includes(this)||i.includes(this.floating)||this.closeDropdown("click-outside")},this.handleKeyDown=r=>{"Escape"===r.key&&this.open&&this.enabledDismiss&&(r.preventDefault(),r.stopPropagation(),this.closeDropdown("escape-key"))},this.handleClick=()=>{if(this.enabledClick){const r=!this.open;if(this._hasVisibleAttribute){const i=r?"click-open":"click-close";this.dispatchEvent(new CustomEvent("dropdown-visibility-change",{detail:{visible:r,reason:i},bubbles:!0,composed:!0}))}else this.open=r}},this.handleReferenceKeydown=r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),this.handleClick())}}set visible(r){const i=this._visible;this._visible=r,this.requestUpdate("visible",i),this._hasVisibleAttribute=void 0!==r,void 0!==r&&(this.open=r)}get visible(){return this._visible}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside,!0),document.addEventListener("keydown",this.handleKeyDown,!0),this.updateComplete.then((()=>{this._hasVisibleAttribute=void 0!==this._visible}))}attributeChangedCallback(r,i,o){super.attributeChangedCallback(r,i,o)}disconnectedCallback(){super.disconnectedCallback(),this.cleanupAutoUpdate&&this.cleanupAutoUpdate(),document.removeEventListener("click",this.handleClickOutside,!0),document.removeEventListener("keydown",this.handleKeyDown,!0)}updated(r){r.has("open")&&(this._hasVisibleAttribute||this.dispatchEvent(new CustomEvent("dropdown-visibility-change",{detail:{visible:this.open,reason:"programmatic"},bubbles:!0,composed:!0})),this.open&&this.scheduleUpdatePosition()),r.has("visible")&&this._hasVisibleAttribute&&void 0!==this._visible&&(this.open=this._visible)}scheduleUpdatePosition(){this.updatePositionDebounceId&&cancelAnimationFrame(this.updatePositionDebounceId),this.updatePositionDebounceId=requestAnimationFrame((()=>{this.updatePosition()}))}closeDropdown(r="close"){this._hasVisibleAttribute?this.dispatchEvent(new CustomEvent("dropdown-visibility-change",{detail:{visible:!1,reason:r},bubbles:!0,composed:!0})):this.open=!1}async updatePosition(){await this.updateComplete,this.reference instanceof HTMLElement&&this.floating instanceof HTMLElement&&(this.cleanupAutoUpdate?.(),this.cleanupAutoUpdate=La(this.reference,this.floating,(()=>this.computePosition()),{animationFrame:!0}),await this.computePosition())}getMiddleware(){return[ja(this.offset),Ha(),this.enabledFlip&&$a({crossAxis:this?.position?.includes("-"),fallbackAxisSideDirection:"end",padding:5}),this.matchReferenceWidth&&Ia({apply({rects:r,elements:i}){Object.assign(i.floating.style,{width:`${r.reference.width}px`})}})].filter(Boolean)}async computePosition(){if(!(this.reference instanceof HTMLElement&&this.floating instanceof HTMLElement))return;const r=this.getMiddleware(),{x:i,y:o}=await Ma(this.reference,this.floating,{placement:this.position,middleware:r,strategy:this.strategy});Object.assign(this.floating.style,{position:this.strategy,left:`${i}px`,top:`${o}px`})}render(){const{className:r,style:i}=Xi.sprinkle(this.sprinkleAttrs);return console.log("this._hasVisibleAttribute",this._hasVisibleAttribute),O`
462
+ `,r([fr({type:String})],Xa.prototype,"padding",void 0),r([fr({type:String})],Xa.prototype,"size",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"closeable",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"pill",void 0),r([fr({type:String,attribute:"text-transform"})],Xa.prototype,"textTransform",void 0),r([fr({type:Boolean,attribute:"text-overflow"})],Xa.prototype,"textOverflow",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"selected",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],Xa.prototype,"disabled",void 0),r([fr({type:String})],Xa.prototype,"type",void 0),r([fr({type:String})],Xa.prototype,"name",void 0),r([fr({type:String})],Xa.prototype,"value",void 0),r([fr({type:String})],Xa.prototype,"form",void 0),r([fr({type:String,reflect:!0,attribute:"aria-pressed"})],Xa.prototype,"ariaPressed",void 0),Xa=r([_r("rarui-chip")],Xa);var Ya=".rarui-dropdown__1b7gjg50 {\n width: fit-content;\n display: flex;\n flex-direction: column;\n border-style: solid;\n box-sizing: border-box;\n gap: var(--rarui-spacing-3xs);\n z-index: var(--rarui-zIndex-800);\n border-radius: var(--rarui-shape-border-radius-2xs);\n padding: var(--rarui-spacing-3xs);\n box-shadow: var(--rarui-elevation-bottom-2);\n border-width: var(--rarui-shape-border-width-1);\n border-color: var(--rarui-colors-border-subdued);\n background-color: var(--rarui-colors-surface-primary);\n}\n.rarui-dropdown_padding_base__1b7gjg51 {\n padding: var(--rarui-spacing-3xs);\n}\n.rarui-dropdown_padding_none__1b7gjg52 {\n padding: 0;\n}\n.rarui-dropdown_item__1b7gjg53 {\n display: flex;\n justify-content: space-between;\n cursor: pointer;\n background-color: transparent;\n border: none;\n width: 100%;\n box-sizing: border-box;\n transition: all 150ms ease;\n border-radius: var(--rarui-shape-border-radius-2xs);\n gap: var(--rarui-spacing-3xs);\n padding: var(--rarui-spacing-3xs);\n color: var(--rarui-colors-content-primary);\n font-weight: var(--rarui-fontWeight-medium);\n font-size: var(--rarui-fontSize-button-s);\n font-family: var(--rarui-fontFamily-button);\n text-decoration: none;\n}\n.rarui-dropdown_item__1b7gjg53:focus-within {\n outline: none;\n box-shadow: var(--rarui-elevation-focus-ring);\n}\n.rarui-dropdown_item__1b7gjg53:hover {\n background-color: var(--rarui-colors-surface-hover);\n}\n.rarui-dropdown_item__1b7gjg53:active {\n background-color: var(--rarui-colors-surface-press);\n}\n.rarui-dropdown_item__1b7gjg53:disabled {\n color: var(--rarui-colors-content-disabled);\n}\n.rarui-dropdown_item_selected_true__1b7gjg54 {\n background-color: var(--rarui-colors-surface-brand-subdued);\n}\n.rarui-dropdown_item_selected_true__1b7gjg54:hover {\n background-color: var(--rarui-colors-surface-brand-subdued);\n}\n@media screen and (min-width: 0px) {\n .rarui-dropdown_width-xs__1b7gjg59 {\n width: var(--width-xs__1b7gjg55);\n }\n .rarui-dropdown_maxWidth-xs__1b7gjg5h {\n max-width: var(--maxWidth-xs__1b7gjg5d);\n }\n .rarui-dropdown_zIndex-100-xs__1b7gjg5l {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-xs__1b7gjg5p {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-xs__1b7gjg5t {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-xs__1b7gjg5x {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-xs__1b7gjg511 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-xs__1b7gjg515 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-xs__1b7gjg519 {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-xs__1b7gjg51d {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-xs__1b7gjg51h {\n z-index: var(--rarui-zIndex-900);\n }\n}\n@media screen and (min-width: 768px) {\n .rarui-dropdown_width-md__1b7gjg5a {\n width: var(--width-md__1b7gjg56);\n }\n .rarui-dropdown_maxWidth-md__1b7gjg5i {\n max-width: var(--maxWidth-md__1b7gjg5e);\n }\n .rarui-dropdown_zIndex-100-md__1b7gjg5m {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-md__1b7gjg5q {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-md__1b7gjg5u {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-md__1b7gjg5y {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-md__1b7gjg512 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-md__1b7gjg516 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-md__1b7gjg51a {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-md__1b7gjg51e {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-md__1b7gjg51i {\n z-index: var(--rarui-zIndex-900);\n }\n}\n@media screen and (min-width: 1200px) {\n .rarui-dropdown_width-lg__1b7gjg5b {\n width: var(--width-lg__1b7gjg57);\n }\n .rarui-dropdown_maxWidth-lg__1b7gjg5j {\n max-width: var(--maxWidth-lg__1b7gjg5f);\n }\n .rarui-dropdown_zIndex-100-lg__1b7gjg5n {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-lg__1b7gjg5r {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-lg__1b7gjg5v {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-lg__1b7gjg5z {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-lg__1b7gjg513 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-lg__1b7gjg517 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-lg__1b7gjg51b {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-lg__1b7gjg51f {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-lg__1b7gjg51j {\n z-index: var(--rarui-zIndex-900);\n }\n}\n@media screen and (min-width: 1400px) {\n .rarui-dropdown_width-xl__1b7gjg5c {\n width: var(--width-xl__1b7gjg58);\n }\n .rarui-dropdown_maxWidth-xl__1b7gjg5k {\n max-width: var(--maxWidth-xl__1b7gjg5g);\n }\n .rarui-dropdown_zIndex-100-xl__1b7gjg5o {\n z-index: var(--rarui-zIndex-100);\n }\n .rarui-dropdown_zIndex-200-xl__1b7gjg5s {\n z-index: var(--rarui-zIndex-200);\n }\n .rarui-dropdown_zIndex-300-xl__1b7gjg5w {\n z-index: var(--rarui-zIndex-300);\n }\n .rarui-dropdown_zIndex-400-xl__1b7gjg510 {\n z-index: var(--rarui-zIndex-400);\n }\n .rarui-dropdown_zIndex-500-xl__1b7gjg514 {\n z-index: var(--rarui-zIndex-500);\n }\n .rarui-dropdown_zIndex-600-xl__1b7gjg518 {\n z-index: var(--rarui-zIndex-600);\n }\n .rarui-dropdown_zIndex-700-xl__1b7gjg51c {\n z-index: var(--rarui-zIndex-700);\n }\n .rarui-dropdown_zIndex-800-xl__1b7gjg51g {\n z-index: var(--rarui-zIndex-800);\n }\n .rarui-dropdown_zIndex-900-xl__1b7gjg51k {\n z-index: var(--rarui-zIndex-900);\n }\n}";let Ka=class extends(yr(kr(er))){constructor(){super(...arguments),this.offset=10,this.position="bottom-start",this.strategy="fixed",this.enabledClick=!0,this.enabledDismiss=!0,this.open=this.visible??!1,this._hasVisibleAttribute=!1,this.updatePositionDebounceId=null,this.handleClickOutside=r=>{if(!this.enabledDismiss||!this.open)return;const i=r.composedPath();i.includes(this)||i.includes(this.floating)||this.closeDropdown("click-outside")},this.handleKeyDown=r=>{"Escape"===r.key&&this.open&&this.enabledDismiss&&(r.preventDefault(),r.stopPropagation(),this.closeDropdown("escape-key"))},this.handleClick=()=>{if(this.enabledClick){const r=!this.open;if(this._hasVisibleAttribute){const i=r?"click-open":"click-close";this.dispatchEvent(new CustomEvent("dropdown-visibility-change",{detail:{visible:r,reason:i},bubbles:!0,composed:!0}))}else this.open=r}},this.handleReferenceKeydown=r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),this.handleClick())}}set visible(r){const i=this._visible;this._visible=r,this.requestUpdate("visible",i),this._hasVisibleAttribute=void 0!==r,void 0!==r&&(this.open=r)}get visible(){return this._visible}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside,!0),document.addEventListener("keydown",this.handleKeyDown,!0),this.updateComplete.then((()=>{this._hasVisibleAttribute=void 0!==this._visible}))}attributeChangedCallback(r,i,o){super.attributeChangedCallback(r,i,o)}disconnectedCallback(){super.disconnectedCallback(),this.cleanupAutoUpdate&&this.cleanupAutoUpdate(),document.removeEventListener("click",this.handleClickOutside,!0),document.removeEventListener("keydown",this.handleKeyDown,!0)}updated(r){r.has("open")&&(this._hasVisibleAttribute||this.dispatchEvent(new CustomEvent("dropdown-visibility-change",{detail:{visible:this.open,reason:"programmatic"},bubbles:!0,composed:!0})),this.open&&this.scheduleUpdatePosition()),r.has("visible")&&this._hasVisibleAttribute&&void 0!==this._visible&&(this.open=this._visible)}scheduleUpdatePosition(){this.updatePositionDebounceId&&cancelAnimationFrame(this.updatePositionDebounceId),this.updatePositionDebounceId=requestAnimationFrame((()=>{this.updatePosition()}))}closeDropdown(r="close"){this._hasVisibleAttribute?this.dispatchEvent(new CustomEvent("dropdown-visibility-change",{detail:{visible:!1,reason:r},bubbles:!0,composed:!0})):this.open=!1}async updatePosition(){await this.updateComplete,this.reference instanceof HTMLElement&&this.floating instanceof HTMLElement&&(this.cleanupAutoUpdate?.(),this.cleanupAutoUpdate=La(this.reference,this.floating,(()=>this.computePosition()),{animationFrame:!0}),await this.computePosition())}getMiddleware(){return[ja(this.offset),Ha(),this.enabledFlip&&$a({crossAxis:this?.position?.includes("-"),fallbackAxisSideDirection:"end",padding:5}),this.matchReferenceWidth&&Ia({apply({rects:r,elements:i}){Object.assign(i.floating.style,{width:`${r.reference.width}px`})}})].filter(Boolean)}async computePosition(){if(!(this.reference instanceof HTMLElement&&this.floating instanceof HTMLElement))return;const r=this.getMiddleware(),{x:i,y:o}=await Ma(this.reference,this.floating,{placement:this.position,middleware:r,strategy:this.strategy});Object.assign(this.floating.style,{position:this.strategy,left:`${i}px`,top:`${o}px`})}render(){const{className:r,style:i}=Xi.sprinkle(this.sprinkleAttrs);return O`
463
463
  <div
464
464
  id="reference"
465
465
  role="button"
@@ -674,7 +674,7 @@ const po=Symbol.for(""),mo=r=>{if(r?.r===po)return r?._$litStatic$},wo=r=>({_$li
674
674
  </div>
675
675
  `}_focusInput(){this.disabled||this.shadowRoot?.querySelector("input")?.focus()}_onInput(r){const i=r.target;this.value=i.value,this.dispatchEvent(new CustomEvent("input-search-change",{detail:{value:i.value,originalEvent:r},bubbles:!0,composed:!0}))}_onSearch(r){const i=r.target;this.dispatchEvent(new CustomEvent("input-search-submit",{detail:{value:i.value,originalEvent:r},bubbles:!0,composed:!0}))}focus(){this.shadowRoot?.querySelector("input")?.focus()}blur(){this.shadowRoot?.querySelector("input")?.blur()}formResetCallback(){this.value="",this._internals.setFormValue("")}};an.shadowRootOptions={...er.shadowRootOptions,delegatesFocus:!0},an.formAssociated=!0,an.styles=t`
676
676
  ${e(Qa)}
677
- `,r([fr({type:String,reflect:!0})],an.prototype,"size",void 0),r([fr({type:String,reflect:!0})],an.prototype,"appearance",void 0),r([fr({type:Boolean,reflect:!0})],an.prototype,"border",void 0),r([fr({type:Boolean,reflect:!0})],an.prototype,"divider",void 0),r([fr({type:Boolean,reflect:!0})],an.prototype,"disabled",void 0),r([fr({type:String})],an.prototype,"value",null),r([fr({type:String})],an.prototype,"placeholder",void 0),r([fr({type:String})],an.prototype,"name",void 0),r([fr({type:String})],an.prototype,"form",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],an.prototype,"required",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],an.prototype,"readonly",void 0),r([fr({type:String})],an.prototype,"autocomplete",void 0),r([fr({type:Number})],an.prototype,"minlength",void 0),r([fr({type:Number})],an.prototype,"maxlength",void 0),r([fr({type:String})],an.prototype,"pattern",void 0),r([fr({type:String,reflect:!0,attribute:"aria-invalid"})],an.prototype,"ariaInvalid",void 0),an=r([_r("rarui-input-search")],an);let nn=class extends(yr(er)){constructor(){super(),this.id="",this.disabled=!1,this.size="large",this.error=!1,this.selected=!1,this.required=!1,this.readonly=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),document.addEventListener("radio-button-selected",this._handleRadioGroupChange.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("radio-button-selected",this._handleRadioGroupChange.bind(this))}render(){const r=this.id||this.name;return O`
677
+ `,r([fr({type:String,reflect:!0})],an.prototype,"size",void 0),r([fr({type:String,reflect:!0})],an.prototype,"appearance",void 0),r([fr({type:Boolean,reflect:!0})],an.prototype,"border",void 0),r([fr({type:Boolean,reflect:!0})],an.prototype,"divider",void 0),r([fr({type:Boolean,reflect:!0})],an.prototype,"disabled",void 0),r([fr({type:String})],an.prototype,"value",null),r([fr({type:String})],an.prototype,"placeholder",void 0),r([fr({type:String})],an.prototype,"name",void 0),r([fr({type:String})],an.prototype,"form",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],an.prototype,"required",void 0),r([fr({type:Boolean,converter:r=>"false"!==r})],an.prototype,"readonly",void 0),r([fr({type:String})],an.prototype,"autocomplete",void 0),r([fr({type:Number})],an.prototype,"minlength",void 0),r([fr({type:Number})],an.prototype,"maxlength",void 0),r([fr({type:String})],an.prototype,"pattern",void 0),r([fr({type:String,reflect:!0,attribute:"aria-invalid"})],an.prototype,"ariaInvalid",void 0),an=r([_r("rarui-input-search")],an);let nn=class extends(yr(er)){constructor(){super(),this.id="",this.disabled=!1,this.size="large",this.error=!1,this.selected=!1,this.required=!1,this.readonly=!1,this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),document.addEventListener("radio-button-selected",this._handleRadioGroupChange.bind(this)),this.selected&&this._internals.setFormValue(this.value||"on")}updated(r){super.updated(r),r.has("selected")&&(this.selected?this._internals.setFormValue(this.value||"on"):this._internals.setFormValue(null))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("radio-button-selected",this._handleRadioGroupChange.bind(this))}render(){const r=this.id||this.name;return O`
678
678
  <label
679
679
  for="${so(r)}"
680
680
  class=${mi.classnames.container}
@@ -737,7 +737,7 @@ let en=class{constructor(r,i,o,a){if(this.subscribe=!1,this.provided=!1,this.val
737
737
  * @license
738
738
  * Copyright 2017 Google LLC
739
739
  * SPDX-License-Identifier: BSD-3-Clause
740
- */const un=Symbol("select-context");let fn=class extends(yr(kr(er))){constructor(){super(),this.size="medium",this.disabled=!1,this.multiple=!1,this.open=!1,this.enabledFlip=!0,this.position="bottom-start",this.strategy="fixed",this.required=!1,this.ariaInvalid=null,this.selectedOptions=[],this.menuOpen=!1,this.childOptions=[],this._selectContext={multiple:this.multiple||!1,size:this.size||"medium",disabled:this.disabled||!1,selectedValues:[],onOptionSelect:this._handleContextOptionSelect.bind(this),onOptionMount:this._handleOptionMount.bind(this),onOptionUnmount:this._handleOptionUnmount.bind(this)},this._internals=this.attachInternals()}get value(){return this._value}set value(r){const i=this._value;this._value=r,this._updateSelectedOptions(),this.requestUpdate("value",i)}get defaultValue(){return this._defaultValue}set defaultValue(r){const i=this._defaultValue;this._defaultValue=r,this._value||this._updateSelectedOptions(),this.requestUpdate("defaultValue",i)}connectedCallback(){super.connectedCallback(),this._updateSelectedOptions(),this.menuOpen=this.open||!1,document.addEventListener("rarui-label-click",this._handleLabelClick.bind(this)),this.addEventListener("option-select",this._handleOptionSelect.bind(this)),this._setupMutationObserver(),setTimeout((()=>{this._syncSelectedOptionsFromChildren(),this._updateContext()}),0)}_setupMutationObserver(){this._observer=new MutationObserver((r=>{let i=!1;r.forEach((r=>{if("childList"===r.type)i=!0;else if("attributes"===r.type){"RARUI-SELECT-OPTION"===r.target.tagName&&(i=!0)}})),i&&(this._syncSelectedOptionsFromChildren(),this._updateContext())})),this._observer.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["selected","disabled","value"]})}_syncSelectedOptionsFromChildren(){const r=this.querySelectorAll("rarui-select-option"),i=[];if(r.forEach((r=>{r.selected&&i.push({value:r.value||"",label:r.label||r.textContent?.trim()||""})})),JSON.stringify(i)!==JSON.stringify(this.selectedOptions)){const r=this.selectedOptions;this.selectedOptions=i,this._updateFormValue(),this.requestUpdate("selectedOptions",r)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("rarui-label-click",this._handleLabelClick.bind(this)),this.removeEventListener("option-select",this._handleOptionSelect.bind(this)),this._observer&&(this._observer.disconnect(),this._observer=void 0)}_updateSelectedOptions(){const r=this._value||this._defaultValue;if(!r){const r=this.selectedOptions;return this.selectedOptions=[],this._updateFormValue(),void this.requestUpdate("selectedOptions",r)}let i;i=Array.isArray(r)?r:[r];if(!(JSON.stringify(this.selectedOptions)===JSON.stringify(i))){const r=this.selectedOptions;this.selectedOptions=i,this._updateFormValue(),this.requestUpdate("selectedOptions",r)}}handleSelect(r){if(this.disabled)return;let i;if(this.multiple){i=this.selectedOptions.some((i=>i.value===r.value))?this.selectedOptions.filter((i=>i.value!==r.value)):[...this.selectedOptions,r]}else i=[r],this.menuOpen=!1;const o=this.selectedOptions;this.selectedOptions=i,this.requestUpdate("selectedOptions",o),this._value=this.multiple?i:i[0],this._updateFormValue(),this.requestUpdate();const a=new CustomEvent("rarui-select-change",{detail:{value:this.multiple?i:i[0],selectedOptions:i}});this.dispatchEvent(a)}handleRemoveOption(r,i){if(i.preventDefault(),i.stopPropagation(),this.disabled)return;const o=this.selectedOptions.filter((i=>i.value!==r.value)),a=this.selectedOptions;this.selectedOptions=o,this.requestUpdate("selectedOptions",a),this._updateContext(),this._value=o,this._updateFormValue();const n=new CustomEvent("rarui-select-change",{detail:{value:o,selectedOptions:o}});this.dispatchEvent(n)}renderHiddenFormInputs(){return this.name&&this.selectedOptions.length?this.multiple?this.selectedOptions.map((r=>O`
740
+ */const un=Symbol("select-context");let fn=class extends(function(r){return class extends r{handleKeydown(r){const i=this;switch(r.key){case"Enter":case" ":i.handleActivation&&(r.preventDefault(),i.handleActivation());break;case"ArrowDown":case"ArrowUp":case"ArrowLeft":case"ArrowRight":i.handleArrowNavigation&&(r.preventDefault(),i.handleArrowNavigation(r.key));break;case"Escape":i.handleEscape&&(r.preventDefault(),i.handleEscape());break;case"Home":i.handleHome&&(r.preventDefault(),i.handleHome());break;case"End":i.handleEnd&&(r.preventDefault(),i.handleEnd());break;case"Tab":i.handleTab&&i.handleTab(r)}}}}(yr(kr(er)))){constructor(){super(),this.size="medium",this.disabled=!1,this.multiple=!1,this.open=!1,this.enabledFlip=!0,this.position="bottom-start",this.strategy="fixed",this.required=!1,this.ariaInvalid=null,this.selectedOptions=[],this.menuOpen=!1,this.childOptions=[],this._selectContext={multiple:this.multiple||!1,size:this.size||"medium",disabled:this.disabled||!1,selectedValues:[],onOptionSelect:this._handleContextOptionSelect.bind(this),onOptionMount:this._handleOptionMount.bind(this),onOptionUnmount:this._handleOptionUnmount.bind(this)},this._internals=this.attachInternals()}get value(){return this._value}set value(r){const i=this._value;this._value=r,this._updateSelectedOptions(),this.requestUpdate("value",i)}get defaultValue(){return this._defaultValue}set defaultValue(r){const i=this._defaultValue;this._defaultValue=r,this._value||this._updateSelectedOptions(),this.requestUpdate("defaultValue",i)}connectedCallback(){super.connectedCallback(),this._updateSelectedOptions(),this.menuOpen=this.open||!1,document.addEventListener("rarui-label-click",this._handleLabelClick.bind(this)),this.addEventListener("option-select",this._handleOptionSelect.bind(this)),this._setupMutationObserver(),setTimeout((()=>{this._syncSelectedOptionsFromChildren(),this._updateContext()}),0)}_setupMutationObserver(){this._observer=new MutationObserver((r=>{let i=!1;r.forEach((r=>{if("childList"===r.type)i=!0;else if("attributes"===r.type){"RARUI-SELECT-OPTION"===r.target.tagName&&(i=!0)}})),i&&(this._syncSelectedOptionsFromChildren(),this._updateContext())})),this._observer.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["selected","disabled","value"]})}_syncSelectedOptionsFromChildren(){const r=this.querySelectorAll("rarui-select-option"),i=[];if(r.forEach((r=>{r.selected&&i.push({value:r.value||"",label:r.label||r.textContent?.trim()||""})})),JSON.stringify(i)!==JSON.stringify(this.selectedOptions)){const r=this.selectedOptions;this.selectedOptions=i,this._updateFormValue(),this.requestUpdate("selectedOptions",r)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("rarui-label-click",this._handleLabelClick.bind(this)),this.removeEventListener("option-select",this._handleOptionSelect.bind(this)),this._observer&&(this._observer.disconnect(),this._observer=void 0)}_updateSelectedOptions(){const r=this._value||this._defaultValue;if(!r){const r=this.selectedOptions;return this.selectedOptions=[],this._updateFormValue(),void this.requestUpdate("selectedOptions",r)}let i;i=Array.isArray(r)?r:[r];if(!(JSON.stringify(this.selectedOptions)===JSON.stringify(i))){const r=this.selectedOptions;this.selectedOptions=i,this._updateFormValue(),this.requestUpdate("selectedOptions",r)}}handleSelect(r){if(this.disabled)return;let i;if(this.multiple){i=this.selectedOptions.some((i=>i.value===r.value))?this.selectedOptions.filter((i=>i.value!==r.value)):[...this.selectedOptions,r]}else i=[r],this.menuOpen=!1;const o=this.selectedOptions;this.selectedOptions=i,this.requestUpdate("selectedOptions",o),this._value=this.multiple?i:i[0],this._updateFormValue(),this.requestUpdate();const a=new CustomEvent("rarui-select-change",{detail:{value:this.multiple?i:i[0],selectedOptions:i}});this.dispatchEvent(a)}handleRemoveOption(r,i){if(i.preventDefault(),i.stopPropagation(),this.disabled)return;const o=this.selectedOptions.filter((i=>i.value!==r.value)),a=this.selectedOptions;this.selectedOptions=o,this.requestUpdate("selectedOptions",a),this._updateContext(),this._value=o,this._updateFormValue();const n=new CustomEvent("rarui-select-change",{detail:{value:o,selectedOptions:o}});this.dispatchEvent(n)}renderHiddenFormInputs(){return this.name&&this.selectedOptions.length?this.multiple?this.selectedOptions.map((r=>O`
741
741
  <input
742
742
  type="hidden"
743
743
  name="${so(this.name)}"
@@ -751,7 +751,7 @@ let en=class{constructor(r,i,o,a){if(this.subscribe=!1,this.provided=!1,this.val
751
751
  value="${this.selectedOptions[0]?.value||""}"
752
752
  form="${so(this.form)}"
753
753
  />
754
- `:F}handleResetOptions(r){if(r.preventDefault(),r.stopPropagation(),this.disabled)return;const i=this.selectedOptions;this.selectedOptions=[],this.requestUpdate("selectedOptions",i),this._updateContext(),this._value=[];const o=new CustomEvent("rarui-select-change",{detail:{value:[],selectedOptions:[]}});this.dispatchEvent(o)}handleDropdownOpenChange(r){const{visible:i,reason:o}=r.detail;i||!this.menuOpen||"click-outside"!==o&&"escape-key"!==o||(this.menuOpen=!1)}_handleOptionSelect(r){r.stopPropagation();const{value:i,label:o}=r.detail,a={value:i,label:o};this.handleSelect(a);const n=r.target;n&&"RARUI-SELECT-OPTION"===n.tagName&&(n.selected=this.selectedOptions.some((r=>r.value===a.value)))}_handleContextOptionSelect(r,i,o){const a={value:r,label:i};this.handleSelect(a),this._updateContext()}_handleOptionMount(r){this.childOptions.push(r),this._updateContext()}_handleOptionUnmount(r){const i=this.childOptions.indexOf(r);i>-1&&this.childOptions.splice(i,1),this._updateContext()}_updateContext(){this._selectContext={...this._selectContext,multiple:this.multiple||!1,size:this.size||"medium",disabled:this.disabled||!1,selectedValues:this.selectedOptions.map((r=>r.value))},this.requestUpdate()}handleSelectClick(){this.disabled||(this.menuOpen=!this.menuOpen)}render(){const{className:r,style:i}=Wi.sprinkle({maxHeight:this.maxHeight,...this.sprinkleAttrs});return O`
754
+ `:F}handleResetOptions(r){if(r.preventDefault(),r.stopPropagation(),this.disabled)return;const i=this.selectedOptions;this.selectedOptions=[],this.requestUpdate("selectedOptions",i),this._updateContext(),this._value=[];const o=new CustomEvent("rarui-select-change",{detail:{value:[],selectedOptions:[]}});this.dispatchEvent(o)}handleDropdownOpenChange(r){const{visible:i,reason:o}=r.detail;i||!this.menuOpen||"click-outside"!==o&&"escape-key"!==o||(this.menuOpen=!1)}_handleOptionSelect(r){r.stopPropagation();const{value:i,label:o}=r.detail,a={value:i,label:o};this.handleSelect(a);const n=r.target;n&&"RARUI-SELECT-OPTION"===n.tagName&&(n.selected=this.selectedOptions.some((r=>r.value===a.value)))}_handleContextOptionSelect(r,i,o){const a={value:r,label:i};this.handleSelect(a),this._updateContext()}_handleOptionMount(r){this.childOptions.push(r),this._updateContext()}_handleOptionUnmount(r){const i=this.childOptions.indexOf(r);i>-1&&this.childOptions.splice(i,1),this._updateContext()}_updateContext(){this._selectContext={...this._selectContext,multiple:this.multiple||!1,size:this.size||"medium",disabled:this.disabled||!1,selectedValues:this.selectedOptions.map((r=>r.value))},this.requestUpdate()}handleSelectClick(){this.disabled||(this.menuOpen=!this.menuOpen)}handleActivation(){this.disabled||(this.menuOpen=!this.menuOpen)}handleArrowNavigation(r){this.disabled||"ArrowDown"!==r&&"ArrowUp"!==r||this.menuOpen||(this.menuOpen=!0)}handleEscape(){this.menuOpen&&!this.disabled&&(this.menuOpen=!1)}render(){const{className:r,style:i}=Wi.sprinkle({maxHeight:this.maxHeight,...this.sprinkleAttrs});return O`
755
755
  <rarui-dropdown
756
756
  .visible=${this.menuOpen}
757
757
  ?enabled-click=${!1}
@@ -763,6 +763,7 @@ let en=class{constructor(r,i,o,a){if(this.subscribe=!1,this.provided=!1,this.val
763
763
  width="100%"
764
764
  z-index=${so(this.zIndex)}
765
765
  @dropdown-visibility-change=${this.handleDropdownOpenChange}
766
+ @keydown=${this.handleKeydown}
766
767
  >
767
768
  ${this._renderTrigger()} ${this._renderContent(r,i)}
768
769
  </rarui-dropdown>
@@ -778,7 +779,6 @@ let en=class{constructor(r,i,o,a){if(this.subscribe=!1,this.provided=!1,this.val
778
779
  aria-expanded="${this.menuOpen?"true":"false"}"
779
780
  aria-required="${this.required?"true":"false"}"
780
781
  @click=${this.handleSelectClick}
781
- @keydown=${()=>{}}
782
782
  @focus=${()=>{}}
783
783
  tabindex="0"
784
784
  role="button"
@@ -893,7 +893,7 @@ let en=class{constructor(r,i,o,a){if(this.subscribe=!1,this.provided=!1,this.val
893
893
  * @license
894
894
  * Copyright 2022 Google LLC
895
895
  * SPDX-License-Identifier: BSD-3-Clause
896
- */({context:un})],fn.prototype,"_selectContext",void 0),fn=r([_r("rarui-select")],fn);let ln=class extends(yr(er)){constructor(){super(...arguments),this.value="",this.selected=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.selectContext?.onOptionMount&&this.selectContext.onOptionMount(this)}disconnectedCallback(){super.disconnectedCallback(),this.selectContext?.onOptionUnmount&&this.selectContext.onOptionUnmount(this)}_handleClick(){this.disabled||this.selectContext?.disabled||(console.log("option clicked",this.value),this.selectContext?.onOptionSelect&&this.selectContext.onOptionSelect(this.value,this.label||this.textContent?.trim()||"",!this.selected))}_handleKeyDown(r){"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),this._handleClick())}render(){const r=this.label||this.textContent?.trim()||"",i=this.selectContext?.multiple||!1,o=this.selectContext?.size||"medium",a=this.selectContext?.selectedValues?.includes(this.value)||!1,n=this.disabled||this.selectContext?.disabled||!1;return O`
896
+ */({context:un})],fn.prototype,"_selectContext",void 0),fn=r([_r("rarui-select")],fn);let ln=class extends(yr(er)){constructor(){super(...arguments),this.value="",this.selected=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.selectContext?.onOptionMount&&this.selectContext.onOptionMount(this)}disconnectedCallback(){super.disconnectedCallback(),this.selectContext?.onOptionUnmount&&this.selectContext.onOptionUnmount(this)}_handleClick(){this.disabled||this.selectContext?.disabled||this.selectContext?.onOptionSelect&&this.selectContext.onOptionSelect(this.value,this.label||this.textContent?.trim()||"",!this.selected)}_handleKeyDown(r){"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),this._handleClick())}render(){const r=this.label||this.textContent?.trim()||"",i=this.selectContext?.multiple||!1,o=this.selectContext?.size||"medium",a=this.selectContext?.selectedValues?.includes(this.value)||!1,n=this.disabled||this.selectContext?.disabled||!1;return O`
897
897
  <rarui-dropdown-item
898
898
  ?selected=${a&&!i}
899
899
  ?disabled=${n}
@@ -1531,7 +1531,7 @@ const Rn=(r,i)=>{const o=r._$AN;if(void 0===o)return!1;for(const r of o)r._$AO?.
1531
1531
  :host([selected="false"]) {
1532
1532
  display: none;
1533
1533
  }
1534
- `,r([fr({type:String})],Xn.prototype,"padding",void 0),r([fr({type:Boolean,reflect:!0,converter:r=>"false"!==r})],Xn.prototype,"selected",void 0),Xn=r([_r("rarui-accordion-body")],Xn);const Yn={brand:"neutral",info:"neutral",neutral:"neutral"};let Kn=class extends(yr(er)){constructor(){super(...arguments),this.floating=!1,this.closable=!1,this.handleClose=()=>{this.dispatchEvent(new CustomEvent("close",{bubbles:!0}))}}render(){return O`
1534
+ `,r([fr({type:String})],Xn.prototype,"padding",void 0),r([fr({type:Boolean,reflect:!0,converter:r=>"false"!==r})],Xn.prototype,"selected",void 0),Xn=r([_r("rarui-accordion-body")],Xn);const Yn={brand:"neutral",info:"neutral",neutral:"neutral"};let Kn=class extends(yr(er)){constructor(){super(...arguments),this.floating=!1,this.closable=!1,this.handleClose=()=>{this.dispatchEvent(new CustomEvent("rarui-banner-close",{bubbles:!0}))}}render(){return O`
1535
1535
  <div
1536
1536
  class="${Ai.classnames.banner({appearance:this.appearance,floating:this.floating})}"
1537
1537
  role="banner"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rarui/components",
3
- "version": "1.30.1",
3
+ "version": "1.30.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,15 +0,0 @@
1
- # `@rarui/avatar`
2
-
3
- The Avatar component is typically used to display user profile pictures.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/avatar
9
- # or
10
- $ npm install @rarui/avatar
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/text`
2
-
3
- Text is a basic component that allows us to write blocks of text and give it formatting to use within other components, sections and pages of our application or website.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/text
9
- # or
10
- $ npm install @rarui/text
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/divider`
2
-
3
- A Divider is a thin line used to separate or group content into lists and layouts.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/divider
9
- # or
10
- $ npm install @rarui/divider
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/icon`
2
-
3
- Icons are used to visually communicate core parts of the product and available actions. They can act as wayfinding tools to help merchants more easily understand where they are in the product, and common interaction patterns that are available.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/icon
9
- # or
10
- $ npm install @rarui/icon
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/label`
2
-
3
- The label component allows us to name elements within a form.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/label
9
- # or
10
- $ npm install @rarui/label
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/stepper`
2
-
3
- The Stepper component facilitates the sequential navigation of multi-step forms by visually representing each step's progression.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/stepper
9
- # or
10
- $ npm install @rarui/stepper
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/text`
2
-
3
- Text is a basic component that allows us to write blocks of text and give it formatting to use within other components, sections and pages of our application or website.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/text
9
- # or
10
- $ npm install @rarui/text
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/title`
2
-
3
- Tilte is a basic component that allows you to give titles and more hierarchy to blocks of text for sections or header components.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/title
9
- # or
10
- $ npm install @rarui/title
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/tooltip`
2
-
3
- Tooltip are informative, specific, and action -oriented text labels that provide contextual support.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/tooltip
9
- # or
10
- $ npm install @rarui/tooltip
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/progress`
2
-
3
- Progress indicators express an unspecified waiting time or display the duration of a process.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/progress
9
- # or
10
- $ npm install @rarui/progress
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/skeleton`
2
-
3
- The Skeleton component allows us to visually communicate the loading of other components.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/skeleton
9
- # or
10
- $ npm install @rarui/skeleton
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/status`
2
-
3
- Status are used to indicate the current state of a process.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/status
9
- # or
10
- $ npm install @rarui/status
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/button`
2
-
3
- The Button component allows us to initiate actions, make state or page changes.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/button
9
- # or
10
- $ npm install @rarui/button
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/checkbox`
2
-
3
- The Checkbox allows users to select one or more items from a set and can be used to enable or disable an option.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/checkbox
9
- # or
10
- $ npm install @rarui/checkbox
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/chip`
2
-
3
- Chip is a small component used to make selections, filter content, or trigger actions.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/chip
9
- # or
10
- $ npm install @rarui/chip
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/dropdown`
2
-
3
- Dropdown are informative, specific, and action -oriented text labels that provide contextual support.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/dropdown
9
- # or
10
- $ npm install @rarui/dropdown
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/icon-button`
2
-
3
- The IconButton component allows us to initiate actions, make state or page changes.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/icon-button
9
- # or
10
- $ npm install @rarui/icon-button
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,44 +0,0 @@
1
- # `@rarui/input`
2
-
3
- The Input component provides text input functionality with support for leading elements, different sizes, appearances, and specialized variants like password and search inputs.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/input
9
- # or
10
- $ npm install @rarui/input
11
- ```
12
-
13
- ## Usage
14
-
15
- ### Basic Input
16
- ```html
17
- <rarui-input placeholder="Digite seu nome"></rarui-input>
18
- ```
19
-
20
- ### Input with Leading Elements
21
- ```html
22
- <rarui-input placeholder="Digite seu nome">
23
- <rarui-icon slot="leading-start" name="user_filled"></rarui-icon>
24
- <rarui-icon slot="leading-end" name="check"></rarui-icon>
25
- </rarui-input>
26
- ```
27
-
28
- ### Password Input
29
- ```html
30
- <rarui-input-password placeholder="Digite sua senha"></rarui-input-password>
31
- ```
32
-
33
- ### Search Input
34
- ```html
35
- <rarui-input-search placeholder="Buscar..."></rarui-input-search>
36
- ```
37
-
38
- ## Components
39
-
40
- - `rarui-input` - Base input component with slot support
41
- - `rarui-input-password` - Password input with show/hide toggle
42
- - `rarui-input-search` - Search input with built-in search icon
43
-
44
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/radio-button`
2
-
3
- The Radio Button allows users to select an option from a set. They are a selection control that usually appears when users are asked to make decisions or select an option from options.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/radio-button
9
- # or
10
- $ npm install @rarui/radio-button
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,13 +0,0 @@
1
- # Select
2
-
3
- Select component for choosing options from a dropdown menu with support for single and multiple selection.
4
-
5
- ## Features
6
-
7
- - **Single Selection**: Choose one option from the list
8
- - **Multiple Selection**: Choose multiple options with checkboxes
9
- - **Custom Content**: Support for slot-based custom content and filtering
10
- - **Accessibility**: Full keyboard navigation with ESC key support
11
- - **Controlled Behavior**: Uses internal web components (Dropdown, Checkbox, Text, Box, Chip, Icon)
12
-
13
- See [complete documentation](https://rarui.rarolabs.com.br/docs/components-web-components/input/select) for more details.
@@ -1,15 +0,0 @@
1
- # `@rarui/textarea`
2
-
3
- Textarea is a basic component that allows us to write blocks of text and give it formatting to use within other components, sections and pages of our application or website.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/textarea
9
- # or
10
- $ npm install @rarui/textarea
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/toggle`
2
-
3
- Toggle switches enable or disable the state of a single item.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/toggle
9
- # or
10
- $ npm install @rarui/toggle
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/box`
2
-
3
- A low-level utility component that accepts styled system props to enable custom theme-aware styling
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/box
9
- # or
10
- $ npm install @rarui/box
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,109 +0,0 @@
1
- # Rarui Sidebar
2
-
3
- A sidebar component that slides in from the left or right side of the screen, with intelligent positioning for responsive behavior.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @rarui/sidebar
9
- # or
10
- yarn add @rarui/sidebar
11
- ```
12
-
13
- ## Usage
14
-
15
- ```html
16
- <rarui-sidebar open="true" position="right" max-width="375px" padding="$small">
17
- <div>Your sidebar content here</div>
18
- </rarui-sidebar>
19
- ```
20
-
21
- ## Features
22
-
23
- - ✨ **Floating-UI Integration**: Intelligent positioning with automatic viewport adjustments using floating-ui
24
- - 📱 **Responsive**: Adapts to different screen sizes automatically
25
- - 🎭 **CSS Transitions**: Smooth slide animations with proper transition support
26
- - ♿ **Accessible**: Full keyboard navigation and screen reader support
27
- - 🎯 **Position Control**: Left or right positioning options
28
- - 🔒 **Focus Management**: Automatic focus trapping and restoration
29
- - 🎨 **Themeable**: Works with Rarui design tokens
30
-
31
- ## Properties
32
-
33
- | Property | Type | Default | Description |
34
- |----------|------|---------|-------------|
35
- | `open` | `boolean` | `false` | Whether the sidebar is open or not |
36
- | `position` | `'left' \| 'right'` | `'right'` | The position of the sidebar |
37
- | `max-width` | `string` | `'375px'` | Maximum width of the sidebar |
38
- | `padding` | `string` | `'$small'` | Padding inside the sidebar |
39
- | `portal-id` | `string` | - | ID of the portal element for rendering |
40
-
41
- > **Note**: Properties inherit from `SidebarProps` and are automatically converted from camelCase to kebab-case for web component attributes (e.g., `maxWidth` → `max-width`, `portalId` → `portal-id`).
42
-
43
- ## Events
44
-
45
- | Event | Detail | Description |
46
- |-------|--------|-------------|
47
- | `sidebar-open-changed` | `{ open: boolean }` | Dispatched when the sidebar open state changes |
48
-
49
- ## Examples
50
-
51
- ### Basic Sidebar
52
-
53
- ```html
54
- <rarui-sidebar open="true">
55
- <div>Basic sidebar content</div>
56
- </rarui-sidebar>
57
- ```
58
-
59
- ### Left Positioned Sidebar
60
-
61
- ```html
62
- <rarui-sidebar open="true" position="left" max-width="300px">
63
- <nav>
64
- <ul>
65
- <li>Home</li>
66
- <li>About</li>
67
- <li>Contact</li>
68
- </ul>
69
- </nav>
70
- </rarui-sidebar>
71
- ```
72
-
73
- ### Custom Width and Padding
74
-
75
- ```html
76
- <rarui-sidebar open="true" max-width="500px" padding="$large">
77
- <div>Wide sidebar with custom padding</div>
78
- </rarui-sidebar>
79
- ```
80
-
81
- ## Differences from React Version
82
-
83
- ### Enhanced Features
84
- - **Floating-UI Integration**: Unlike the React version that uses basic floating-ui hooks, the web component version uses advanced virtual references for optimal sidebar positioning
85
- - **Smooth Transitions**: Always renders allowing CSS transitions to work properly
86
- - **Automatic Viewport Adaptation**: Content automatically adjusts to viewport constraints using floating-ui middleware
87
- - **Better Performance**: Native web APIs with optimized floating-ui integration
88
-
89
- ### Positioning Intelligence
90
- The web component version provides superior positioning capabilities:
91
- - Virtual reference system optimized for sidebar edges
92
- - Responsive width adjustments via floating-ui size middleware
93
- - Intelligent overflow prevention with shift middleware
94
- - Automatic repositioning on viewport changes
95
-
96
- ## Browser Support
97
-
98
- This component works in all modern browsers that support:
99
- - Web Components
100
- - ES2017+ features
101
- - CSS Custom Properties
102
-
103
- ## Development
104
-
105
- Built with:
106
- - **LitElement** for the component base
107
- - **Floating-UI** for advanced positioning with virtual references
108
- - **TypeScript** for type safety
109
- - **Rarui Design System** for styling
@@ -1,56 +0,0 @@
1
- # Breadcrumb
2
-
3
- O componente Breadcrumb permite a navegação hierárquica através de uma estrutura de páginas, indicando a localização atual do usuário e fornecendo links para as páginas anteriores.
4
-
5
- ## Quando usar
6
-
7
- - Para mostrar a localização atual do usuário na hierarquia do site
8
- - Para permitir navegação rápida para níveis anteriores da estrutura
9
- - Em sistemas com estrutura hierárquica profunda (mais de 3 níveis)
10
-
11
- ## Estrutura
12
-
13
- O componente é formado por:
14
-
15
- - `rarui-breadcrumb`: Container principal que gerencia a lógica de truncamento
16
- - `rarui-breadcrumb-item`: Item individual do breadcrumb
17
-
18
- ## Uso básico
19
-
20
- ```html
21
- <rarui-breadcrumb>
22
- <rarui-breadcrumb-item href="/">Home</rarui-breadcrumb-item>
23
- <rarui-breadcrumb-item href="/category">Category</rarui-breadcrumb-item>
24
- <rarui-breadcrumb-item href="/subcategory">Subcategory</rarui-breadcrumb-item>
25
- <rarui-breadcrumb-item active>Current Page</rarui-breadcrumb-item>
26
- </rarui-breadcrumb>
27
- ```
28
-
29
- ## Com truncamento
30
-
31
- ```html
32
- <rarui-breadcrumb items-after-truncate="2">
33
- <rarui-breadcrumb-item href="/">Home</rarui-breadcrumb-item>
34
- <rarui-breadcrumb-item href="/level1">Level 1</rarui-breadcrumb-item>
35
- <rarui-breadcrumb-item href="/level2">Level 2</rarui-breadcrumb-item>
36
- <rarui-breadcrumb-item href="/level3">Level 3</rarui-breadcrumb-item>
37
- <rarui-breadcrumb-item href="/level4">Level 4</rarui-breadcrumb-item>
38
- <rarui-breadcrumb-item active>Current</rarui-breadcrumb-item>
39
- </rarui-breadcrumb>
40
- ```
41
-
42
- ## Com ícones
43
-
44
- ```html
45
- <rarui-breadcrumb>
46
- <rarui-breadcrumb-item href="/">
47
- <rarui-icon slot="icon" name="home"></rarui-icon>
48
- Home
49
- </rarui-breadcrumb-item>
50
- <rarui-breadcrumb-item href="/dashboard">
51
- <rarui-icon slot="icon" name="dashboard"></rarui-icon>
52
- Dashboard
53
- </rarui-breadcrumb-item>
54
- <rarui-breadcrumb-item active>Settings</rarui-breadcrumb-item>
55
- </rarui-breadcrumb>
56
- ```
@@ -1,15 +0,0 @@
1
- # `@rarui/link`
2
-
3
- The Link component allows us to navigate to external addresses.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/link
9
- # or
10
- $ npm install @rarui/link
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/pagination`
2
-
3
- The pagination component allows the user to select a specific page in a page range.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/pagination
9
- # or
10
- $ npm install @rarui/pagination
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,87 +0,0 @@
1
- # `@rarui/side-navigation`
2
-
3
- The SideNavigation component provides collapsible navigation functionality with support for nested items, leading elements, and active states.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/side-navigation
9
- # or
10
- $ npm install @rarui/side-navigation
11
- ```
12
-
13
- ## Usage
14
-
15
- ### Basic SideNavigation
16
- ```html
17
- <rarui-side-navigation name="Dashboard" description="Main dashboard">
18
- <rarui-side-navigation-item>Reports</rarui-side-navigation-item>
19
- <rarui-side-navigation-item>Analytics</rarui-side-navigation-item>
20
- </rarui-side-navigation>
21
- ```
22
-
23
- ### SideNavigation with Leading Elements
24
- ```html
25
- <rarui-side-navigation name="Settings" description="System configuration">
26
- <!-- Custom icon at start -->
27
- <rarui-icon slot="leading-start" name="folder-outlined" size="medium"></rarui-icon>
28
-
29
- <!-- Custom icon at end (replaces default arrow) -->
30
- <rarui-icon slot="leading-end" name="chevron-down" size="medium"></rarui-icon>
31
-
32
- <!-- Nested items -->
33
- <rarui-side-navigation-item>Profile</rarui-side-navigation-item>
34
- <rarui-side-navigation-item>Permissions</rarui-side-navigation-item>
35
- </rarui-side-navigation>
36
- ```
37
-
38
- ### Active State
39
- ```html
40
- <rarui-side-navigation name="Dashboard" active>
41
- <rarui-side-navigation-item active>Current Page</rarui-side-navigation-item>
42
- <rarui-side-navigation-item>Other Page</rarui-side-navigation-item>
43
- </rarui-side-navigation>
44
- ```
45
-
46
- ### Multi-level Navigation
47
- ```html
48
- <rarui-side-navigation name="Administration">
49
- <rarui-side-navigation-item level="0">Users</rarui-side-navigation-item>
50
- <rarui-side-navigation-item level="1">Permissions</rarui-side-navigation-item>
51
- <rarui-side-navigation-item level="1">Roles</rarui-side-navigation-item>
52
- </rarui-side-navigation>
53
- ```
54
-
55
- ## Components
56
-
57
- - `rarui-side-navigation` - Main navigation component with collapsible content
58
- - `rarui-side-navigation-item` - Individual navigation items with support for nesting levels
59
-
60
- ## Slots
61
-
62
- ### rarui-side-navigation
63
- - **Default slot**: Content for nested navigation items
64
- - **leading-start**: Content to display at the start (e.g., icons)
65
- - **leading-end**: Content to display at the end (e.g., custom icons)
66
-
67
- ### rarui-side-navigation-item
68
- - **Default slot**: Content for the navigation item
69
-
70
- ## Behavior
71
-
72
- ### Arrow Icon
73
- - Navigation items **always display an arrow icon** by default
74
- - The arrow rotates between up/down states when toggling
75
- - Use `leading-end` slot to provide a custom icon that replaces the default arrow
76
- - Arrow shows `arrow-up` when expanded, `arrow-down` when collapsed
77
-
78
- ### Boolean Attributes
79
- - Use `active` instead of `active="true"` for cleaner HTML
80
- - Use `disabled` instead of `disabled="true"`
81
- - Supports string values like `active="false"` for dynamic binding
82
-
83
- ## Events
84
-
85
- - `toggle` - Fired when the navigation item is toggled (opened/closed)
86
-
87
- View docs [here]().
@@ -1,9 +0,0 @@
1
- # `@rarui/tabs`
2
-
3
- Tabs are used to switch between different display modes or pages.
4
-
5
- ## Installation
6
-
7
- ## Usage
8
-
9
- View docs [here]().
@@ -1,56 +0,0 @@
1
- # ThemeProvider Web Component
2
-
3
- Componente para gerenciamento global de temas na aplicação.
4
-
5
- ## Instalação
6
-
7
- ```bash
8
- npm install @rarui/theme-provider
9
- ```
10
-
11
- ## Uso Básico
12
-
13
- ```html
14
- <rarui-theme-provider theme="dark">
15
- <rarui-button>Botão com tema aplicado</rarui-button>
16
- </rarui-theme-provider>
17
- ```
18
-
19
- ## API Global
20
-
21
- ```javascript
22
- // Alternar tema
23
- window.raruiTheme.setTheme('dark');
24
-
25
- // Obter tema atual
26
- const currentTheme = window.raruiTheme.getTheme();
27
-
28
- // Escutar mudanças de tema
29
- const unsubscribe = window.raruiTheme.subscribe((theme) => {
30
- console.log('Tema mudou para:', theme);
31
- });
32
-
33
- // Evento global
34
- document.addEventListener('rarui-theme-change', (event) => {
35
- console.log('Novo tema:', event.detail.theme);
36
- });
37
- ```
38
-
39
- ## Utilitários
40
-
41
- ```javascript
42
- import { toggleTheme, isDarkTheme, onThemeChange } from '@rarui/theme-provider';
43
-
44
- // Alternar entre temas
45
- toggleTheme();
46
-
47
- // Verificar se está no tema escuro
48
- if (isDarkTheme()) {
49
- console.log('Tema escuro ativo');
50
- }
51
-
52
- // Escutar mudanças
53
- const unsubscribe = onThemeChange((theme) => {
54
- console.log('Tema atual:', theme);
55
- });
56
- ```
@@ -1,93 +0,0 @@
1
- # Accordion
2
-
3
- The Accordion component displays a list of expandable sections that users can toggle open or closed. It provides an organized way to present large amounts of content in a compact format.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- yarn add @rarui/accordion
9
- ```
10
-
11
- ## Usage
12
-
13
- ```html
14
- <rarui-accordion selected-default="item-1">
15
- <rarui-accordion-item index="item-1">
16
- <rarui-accordion-header title="First Item" size="medium">
17
- </rarui-accordion-header>
18
- <rarui-accordion-body padding="base">
19
- Content of the first accordion item.
20
- </rarui-accordion-body>
21
- </rarui-accordion-item>
22
-
23
- <rarui-accordion-item index="item-2">
24
- <rarui-accordion-header title="Second Item" subtitle="With subtitle">
25
- </rarui-accordion-header>
26
- <rarui-accordion-body>
27
- Content of the second accordion item.
28
- </rarui-accordion-body>
29
- </rarui-accordion-item>
30
- </rarui-accordion>
31
- ```
32
-
33
- ## Custom Content
34
-
35
- ```html
36
- <rarui-accordion>
37
- <rarui-accordion-item index="custom">
38
- <rarui-accordion-header>
39
- <my-icon slot="icon"></my-icon>
40
- Custom header content
41
- </rarui-accordion-header>
42
- <rarui-accordion-body>
43
- Custom body content
44
- </rarui-accordion-body>
45
- </rarui-accordion-item>
46
- </rarui-accordion>
47
- ```
48
-
49
- ## API
50
-
51
- ### rarui-accordion
52
-
53
- | Property | Type | Default | Description |
54
- |----------|------|---------|-------------|
55
- | `selected-default` | `string` | `""` | Index of the item that should be open by default |
56
- | `disabled` | `boolean` | `false` | Disables the entire accordion |
57
-
58
- ### rarui-accordion-item
59
-
60
- | Property | Type | Default | Description |
61
- |----------|------|---------|-------------|
62
- | `index` | `string` | `""` | Unique identifier for this item |
63
-
64
- ### rarui-accordion-header
65
-
66
- | Property | Type | Default | Description |
67
- |----------|------|---------|-------------|
68
- | `title` | `string` | `""` | Main title text |
69
- | `subtitle` | `string` | `""` | Secondary subtitle text |
70
- | `size` | `"small" \| "medium" \| "large"` | `"medium"` | Size variant |
71
- | `no-icon-toggle` | `boolean` | `false` | Hide the toggle arrow icon |
72
- | `disabled` | `boolean` | `false` | Disable this specific header |
73
-
74
- #### Slots
75
- - `icon` - Custom icon element
76
- - `default` - Custom header content (when not using title/subtitle)
77
-
78
- ### rarui-accordion-body
79
-
80
- | Property | Type | Default | Description |
81
- |----------|------|---------|-------------|
82
- | `padding` | `"none" \| "base"` | `"base"` | Internal padding of the body |
83
-
84
- #### Slots
85
- - `default` - Body content
86
-
87
- ## Events
88
-
89
- ### rarui-accordion
90
-
91
- | Event | Detail | Description |
92
- |-------|--------|-------------|
93
- | `accordion-change` | `{ selected: string }` | Fired when an item is expanded or collapsed |
@@ -1,15 +0,0 @@
1
- # `@rarui/banner`
2
-
3
- The Banner component is used to display general messages for the user
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/banner
9
- # or
10
- $ npm install @rarui/banner
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/checkbox`
2
-
3
- The Card component contains textual content, images, and actions about a topic.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/checkbox
9
- # or
10
- $ npm install @rarui/checkbox
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,15 +0,0 @@
1
- # `@rarui/modal`
2
-
3
- The modal component provides a base for popovers, suspended forms, tutorials, or any other content above the UI main surface.
4
-
5
- ## Installation
6
-
7
- ```sh
8
- $ yarn add @rarui/modal
9
- # or
10
- $ npm install @rarui/modal
11
- ```
12
-
13
- ## Usage
14
-
15
- View docs [here]().
@@ -1,73 +0,0 @@
1
- # Web Components Type Utilities
2
-
3
- Shared TypeScript utilities for Rarui Web Components that automatically convert React component props to web component attributes with camelCase to kebab-case conversion.
4
-
5
- ## Installation
6
-
7
- This package is part of the Rarui monorepo and is used internally by web components.
8
-
9
- ```typescript
10
- import { WebComponentProperties } from "@rarui/web-components-types";
11
- ```
12
-
13
- ## Usage
14
-
15
- ### Basic Usage
16
-
17
- ```typescript
18
- import { SidebarProps } from "@rarui/typings";
19
- import { WebComponentProperties } from "@rarui/web-components-types";
20
-
21
- export type SidebarProperties = WebComponentProperties<
22
- SidebarProps,
23
- "onRemove" // Exclude callback properties
24
- >;
25
- ```
26
-
27
- ### Available Types
28
-
29
- #### `WebComponentProperties<TReactProps, TExclude>`
30
- Main utility for creating web component properties from React props.
31
-
32
- - Converts camelCase to kebab-case
33
- - Excludes common React props (`children`, `className`, `style`, `ref`, `key`)
34
- - Allows additional exclusions
35
-
36
- #### `ExtendedWebComponentProperties<TReactProps, TExclude>`
37
- Extended version that also automatically excludes all callback properties (`onXxx`).
38
-
39
- #### `CamelToKebab<T>` and `CamelToKebabKeys<T>`
40
- Low-level utilities for string and object key conversion.
41
-
42
- ### Conversion Examples
43
-
44
- | React Prop (camelCase) | Web Component Attribute (kebab-case) |
45
- |----------------------|-----------------------------------|
46
- | `maxWidth` | `max-width` |
47
- | `portalId` | `portal-id` |
48
- | `backgroundColor` | `background-color` |
49
- | `onRemove` | excluded (callback) |
50
- | `children` | excluded (React-only) |
51
-
52
- ### Implementation Pattern
53
-
54
- ```typescript
55
- // 1. Define types
56
- export type ComponentProperties = WebComponentProperties<
57
- ReactComponentProps,
58
- "specificCallbackToExclude"
59
- >;
60
-
61
- // 2. Use in component
62
- @property({ type: String, attribute: "max-width" })
63
- maxWidth: ComponentProperties["max-width"] = "375px";
64
- ```
65
-
66
- ## Features
67
-
68
- - ✅ **Type Safety**: Full TypeScript support with IntelliSense
69
- - ✅ **Automatic Conversion**: camelCase → kebab-case
70
- - ✅ **Smart Exclusions**: Removes React-only properties
71
- - ✅ **Callback Handling**: Option to exclude callback properties
72
- - ✅ **Inheritance**: Inherit all properties from React components
73
- - ✅ **Extensible**: Easy to add custom exclusions