@rarui/components 1.26.0 → 1.27.0-rc.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.
- package/CHANGELOG.md +33 -0
- package/custom-elements.json +254 -3
- package/dist/index.d.ts +135 -59
- package/dist/index.js +384 -372
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
`@rarui/components` components is a component library built with [Lit](https://lit.dev/).
|
|
4
4
|
|
|
5
|
+
## 2025-09-26 `1.28.0`
|
|
6
|
+
|
|
7
|
+
- **PassThroughAttributesMixin**: Introduced mixin for managing pass-through attributes (data-_, aria-_) to internal elements, providing consistent attribute filtering and avoiding conflicts with component-managed attributes. Includes convenience methods `getDataAttributes()`, `getDataAndAriaAttributes()`, and configurable exclusion patterns. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
8
|
+
|
|
9
|
+
#### 💡 Others
|
|
10
|
+
|
|
11
|
+
- **Lit Binding Best Practices**: Comprehensive review and improvement of property binding patterns across Link, Button, Input, Password, and Search components following Lit best practices. Added `reflect: true` to all visual properties for better CSS styling and debugging, removed unnecessary boolean converters, and applied consistent mixin usage for ARIA properties and pass-through attributes. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
12
|
+
|
|
13
|
+
#### 🎉 New features
|
|
14
|
+
|
|
15
|
+
## 2025-09-25 `1.27.0`
|
|
16
|
+
|
|
17
|
+
#### 🎉 New features
|
|
18
|
+
|
|
19
|
+
- **SprinkleAttributesMixin**: Introduced new mixin that replaces `@AddSprinkleAttributes` decorator, providing cleaner implementation with automatic HTML attribute parsing, responsive value support for CSS properties, and optional `cssProps` for programmatic usage. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
20
|
+
- **AriaAttributesMixin**: Created mixin that eliminates ARIA properties duplication across all components, automatically providing `ariaLabel`, `ariaLabelledBy`, and `ariaDescribedBy` with proper reflection. Applied to 15+ components: Avatar, Button, Badge, Checkbox, Select, Modal, Card, Sidebar, Dropdown, Chip, Title, Text, Icon, Search, Password, and others. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
21
|
+
- **BaseComponentMixin**: Introduced combined mixin that includes both SprinkleAttributesMixin and AriaAttributesMixin for complete component foundation with automatic CSS properties and ARIA support. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
22
|
+
- **SpreadAttributesDirective**: Centralized reusable directive for spreading HTML attributes to DOM elements, moved from individual components to shared utils structure for better maintainability. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
23
|
+
|
|
24
|
+
#### 🐛 Bug fixes
|
|
25
|
+
|
|
26
|
+
- **Select Dropdown Auto-Close**: Fixed Select component to automatically close dropdown after selecting an option in single-select mode. Corrected property binding from `?visible` to `.visible` for proper Dropdown communication and added proper timing for UI updates. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
27
|
+
- **Dropdown Property Reflection**: Improved Dropdown component by adding `reflect: true` to visual and configuration properties (position, strategy, offset, open, enabled-\*) for better CSS styling support, debugging visibility, and accessibility. Removed unnecessary boolean converters following Lit best practices. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
28
|
+
- **Modal Property Reflection**: Enhanced Modal component with `reflect: true` on all visual properties (open, padding, max-width, portal-id) for improved debugging and CSS styling capabilities. Optimized event dispatching to only trigger `rarui-modal-open-changed` when `open` property actually changes. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
29
|
+
|
|
30
|
+
#### 💡 Others
|
|
31
|
+
|
|
32
|
+
- **Enhanced Dropdown Events**: Improved Dropdown component's `dropdown-visibility-change` event to include specific reason information ("click-outside", "escape-key", "click-open", "click-close") instead of generic reasons, enabling better component communication and more precise interaction handling. Updated Select component to properly respond to specific dismissal reasons. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
33
|
+
|
|
34
|
+
- **Utils Structure Cleanup**: Removed unused utility files and mixins, keeping only essential mixins for better maintainability and reduced bundle size. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
35
|
+
- **Divider Width Fix**: Fixed host element width behavior to respect user-provided size values, using fit-content for fixed sizes and proper percentage handling for values like "50%". ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
36
|
+
- **Code Duplication Reduction**: Eliminated 9+ lines of duplicated ARIA property declarations per component, reducing codebase size and improving maintainability across all web components. ([#139](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/139) by [@junior](https://git.rarolabs.com.br/junior))
|
|
37
|
+
|
|
5
38
|
## 2025-09-25 `1.26.0`
|
|
6
39
|
|
|
7
40
|
#### 🛠 Breaking changes
|
package/custom-elements.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.27.0-rc.2",
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
5
|
"name": "rarui-avatar",
|
|
@@ -3354,7 +3354,7 @@
|
|
|
3354
3354
|
},
|
|
3355
3355
|
{
|
|
3356
3356
|
"name": "name",
|
|
3357
|
-
"description": "The name of the input for form submission
|
|
3357
|
+
"description": "The name of the input for form submission.\n\n(Required)",
|
|
3358
3358
|
"type": "string"
|
|
3359
3359
|
},
|
|
3360
3360
|
{
|
|
@@ -3465,7 +3465,7 @@
|
|
|
3465
3465
|
},
|
|
3466
3466
|
{
|
|
3467
3467
|
"name": "name",
|
|
3468
|
-
"description": "The name of the input for form submission
|
|
3468
|
+
"description": "The name of the input for form submission.\n\n(Required)",
|
|
3469
3469
|
"type": "string"
|
|
3470
3470
|
},
|
|
3471
3471
|
{
|
|
@@ -3628,6 +3628,257 @@
|
|
|
3628
3628
|
}
|
|
3629
3629
|
]
|
|
3630
3630
|
},
|
|
3631
|
+
{
|
|
3632
|
+
"name": "rarui-select",
|
|
3633
|
+
"description": "## Rarui Select\n---\nSelect component for choosing options from a dropdown menu with support for single and multiple selection.\n\nFeatures:\n- **Single Selection**: Choose one option from the list using rarui-select-option elements\n- **Multiple Selection**: Choose multiple options with checkboxes using rarui-select-option elements\n- **Slot-based Content**: Use rarui-select-option elements as children for flexible content\n- **Accessibility**: Full keyboard navigation with ESC key support\n- **Controlled Behavior**: Uses internal web components (Dropdown, Checkbox, Text, Box, Chip, Icon)\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/input/select) for more details.",
|
|
3634
|
+
"attributes": [
|
|
3635
|
+
{
|
|
3636
|
+
"name": "open",
|
|
3637
|
+
"description": "If true, the Select component is shown.",
|
|
3638
|
+
"type": "boolean"
|
|
3639
|
+
},
|
|
3640
|
+
{
|
|
3641
|
+
"name": "disabled",
|
|
3642
|
+
"description": "Disables the select component, disallowing user interaction.",
|
|
3643
|
+
"type": "boolean",
|
|
3644
|
+
"default": false
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
"name": "multiple",
|
|
3648
|
+
"description": "Enables multiple selection mode.",
|
|
3649
|
+
"type": "boolean",
|
|
3650
|
+
"default": false
|
|
3651
|
+
},
|
|
3652
|
+
{
|
|
3653
|
+
"name": "size",
|
|
3654
|
+
"description": "Specifies the size of the badge, controlling its dimensions.\n\n- large\n- medium\n- small",
|
|
3655
|
+
"type": "string",
|
|
3656
|
+
"values": [
|
|
3657
|
+
{
|
|
3658
|
+
"name": "large"
|
|
3659
|
+
},
|
|
3660
|
+
{
|
|
3661
|
+
"name": "medium"
|
|
3662
|
+
},
|
|
3663
|
+
{
|
|
3664
|
+
"name": "small"
|
|
3665
|
+
}
|
|
3666
|
+
]
|
|
3667
|
+
},
|
|
3668
|
+
{
|
|
3669
|
+
"name": "appearance",
|
|
3670
|
+
"description": "Determines the visual style of the input, affecting its border\n\n- error\n- success",
|
|
3671
|
+
"type": "string",
|
|
3672
|
+
"values": [
|
|
3673
|
+
{
|
|
3674
|
+
"name": "error"
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
"name": "success"
|
|
3678
|
+
}
|
|
3679
|
+
]
|
|
3680
|
+
},
|
|
3681
|
+
{
|
|
3682
|
+
"name": "max-height",
|
|
3683
|
+
"description": "The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. It is also possible to pass a specific value.\n\n\n**Initial value**: `none`\n\nThis property supports responsive values. You can pass a single value like `\"fit-content\"`.\n\n Or an object like:\n \n ```\n{\n \"xs\": \"fit-content\",\n \"md\": \"intrinsic\",\n \"lg\": \"max-content\",\n \"xl\": \"min-content\"\n}\n```\n\n- fit-content\n- intrinsic\n- max-content\n- min-content\n- none\n- stretch",
|
|
3684
|
+
"values": [
|
|
3685
|
+
{
|
|
3686
|
+
"name": "fit-content"
|
|
3687
|
+
},
|
|
3688
|
+
{
|
|
3689
|
+
"name": "intrinsic"
|
|
3690
|
+
},
|
|
3691
|
+
{
|
|
3692
|
+
"name": "max-content"
|
|
3693
|
+
},
|
|
3694
|
+
{
|
|
3695
|
+
"name": "min-content"
|
|
3696
|
+
},
|
|
3697
|
+
{
|
|
3698
|
+
"name": "none"
|
|
3699
|
+
},
|
|
3700
|
+
{
|
|
3701
|
+
"name": "stretch"
|
|
3702
|
+
}
|
|
3703
|
+
]
|
|
3704
|
+
},
|
|
3705
|
+
{
|
|
3706
|
+
"name": "z-index",
|
|
3707
|
+
"description": "The zIndex property specifies the stack order of the box.\n\nThis property supports responsive values. You can pass a single value like `\"$100\"`.\n\n Or an object like:\n \n ```\n{\n \"xs\": \"$100\",\n \"md\": \"$200\",\n \"lg\": \"$300\",\n \"xl\": \"$400\"\n}\n```\n\n- $100\n- $200\n- $300\n- $400\n- $500\n- $600\n- $700\n- $800\n- $900",
|
|
3708
|
+
"values": [
|
|
3709
|
+
{
|
|
3710
|
+
"name": "$100"
|
|
3711
|
+
},
|
|
3712
|
+
{
|
|
3713
|
+
"name": "$200"
|
|
3714
|
+
},
|
|
3715
|
+
{
|
|
3716
|
+
"name": "$300"
|
|
3717
|
+
},
|
|
3718
|
+
{
|
|
3719
|
+
"name": "$400"
|
|
3720
|
+
},
|
|
3721
|
+
{
|
|
3722
|
+
"name": "$500"
|
|
3723
|
+
},
|
|
3724
|
+
{
|
|
3725
|
+
"name": "$600"
|
|
3726
|
+
},
|
|
3727
|
+
{
|
|
3728
|
+
"name": "$700"
|
|
3729
|
+
},
|
|
3730
|
+
{
|
|
3731
|
+
"name": "$800"
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
"name": "$900"
|
|
3735
|
+
}
|
|
3736
|
+
]
|
|
3737
|
+
},
|
|
3738
|
+
{
|
|
3739
|
+
"name": "value",
|
|
3740
|
+
"description": "Default selected values for the Select component.\nThis should be an array of SelectOptionProps objects representing the selected options.",
|
|
3741
|
+
"values": []
|
|
3742
|
+
},
|
|
3743
|
+
{
|
|
3744
|
+
"name": "enabled-flip",
|
|
3745
|
+
"description": "Determines whether the select box should enable flipping the options' dropdown when there is not enough space to display it in its default direction.\nThis can help ensure the dropdown is always visible on the screen.\n\n@default true",
|
|
3746
|
+
"type": "boolean",
|
|
3747
|
+
"default": true
|
|
3748
|
+
},
|
|
3749
|
+
{
|
|
3750
|
+
"name": "placeholder",
|
|
3751
|
+
"description": "Placeholder text displayed when no option is selected.",
|
|
3752
|
+
"type": "string"
|
|
3753
|
+
},
|
|
3754
|
+
{
|
|
3755
|
+
"name": "default-value",
|
|
3756
|
+
"description": "Specifies the default selected value(s) for the select box.\nThis can be a selectOption for single selection or an array of selectOption for multiple selections.",
|
|
3757
|
+
"values": []
|
|
3758
|
+
},
|
|
3759
|
+
{
|
|
3760
|
+
"name": "position",
|
|
3761
|
+
"description": "Position of the dropdown relative to the trigger.\n\n- bottom\n- bottom-end\n- bottom-start\n- left\n- left-end\n- left-start\n- right\n- right-end\n- right-start\n- top\n- top-end\n- top-start\n\n@default bottom-start",
|
|
3762
|
+
"type": "string",
|
|
3763
|
+
"values": [
|
|
3764
|
+
{
|
|
3765
|
+
"name": "bottom"
|
|
3766
|
+
},
|
|
3767
|
+
{
|
|
3768
|
+
"name": "bottom-end"
|
|
3769
|
+
},
|
|
3770
|
+
{
|
|
3771
|
+
"name": "bottom-start",
|
|
3772
|
+
"description": "(default)"
|
|
3773
|
+
},
|
|
3774
|
+
{
|
|
3775
|
+
"name": "left"
|
|
3776
|
+
},
|
|
3777
|
+
{
|
|
3778
|
+
"name": "left-end"
|
|
3779
|
+
},
|
|
3780
|
+
{
|
|
3781
|
+
"name": "left-start"
|
|
3782
|
+
},
|
|
3783
|
+
{
|
|
3784
|
+
"name": "right"
|
|
3785
|
+
},
|
|
3786
|
+
{
|
|
3787
|
+
"name": "right-end"
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
"name": "right-start"
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"name": "top"
|
|
3794
|
+
},
|
|
3795
|
+
{
|
|
3796
|
+
"name": "top-end"
|
|
3797
|
+
},
|
|
3798
|
+
{
|
|
3799
|
+
"name": "top-start"
|
|
3800
|
+
}
|
|
3801
|
+
],
|
|
3802
|
+
"default": "bottom-start"
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
"name": "strategy",
|
|
3806
|
+
"description": "CSS positioning strategy used for the dropdown.\n\n- `\"fixed\"` (default) positions the dropdown relative to the viewport,\n so it stays in the same place even when the page is scrolled.\n- `\"absolute\"` positions the dropdown relative to the nearest positioned ancestor,\n which can be useful when you want the dropdown to move with page content.\n\nUse `\"fixed\"` for dropdowns that should remain visible on scroll,\nand `\"absolute\"` when dropdowns need to be positioned within scrollable containers.\n\n- absolute\n- fixed\n\n@default fixed",
|
|
3807
|
+
"type": "string",
|
|
3808
|
+
"values": [
|
|
3809
|
+
{
|
|
3810
|
+
"name": "absolute"
|
|
3811
|
+
},
|
|
3812
|
+
{
|
|
3813
|
+
"name": "fixed",
|
|
3814
|
+
"description": "(default)"
|
|
3815
|
+
}
|
|
3816
|
+
],
|
|
3817
|
+
"default": "fixed"
|
|
3818
|
+
},
|
|
3819
|
+
{
|
|
3820
|
+
"name": "name",
|
|
3821
|
+
"description": "The name of the select for form submission.",
|
|
3822
|
+
"type": "string"
|
|
3823
|
+
},
|
|
3824
|
+
{
|
|
3825
|
+
"name": "form",
|
|
3826
|
+
"description": "Associates the select with a form element by ID.",
|
|
3827
|
+
"type": "string"
|
|
3828
|
+
},
|
|
3829
|
+
{
|
|
3830
|
+
"name": "required",
|
|
3831
|
+
"description": "Whether the select is required for form validation.",
|
|
3832
|
+
"type": "boolean",
|
|
3833
|
+
"default": false
|
|
3834
|
+
}
|
|
3835
|
+
]
|
|
3836
|
+
},
|
|
3837
|
+
{
|
|
3838
|
+
"name": "rarui-select-select-opt-group",
|
|
3839
|
+
"description": "## Rarui Select OptGroup\n---\nGroup component for organizing related options within rarui-select.\n\nFeatures:\n- **Visual Grouping**: Groups related options with an optional label\n- **Accessibility**: Proper ARIA group semantics\n- **Disabled State**: Can disable entire groups of options\n- **Flexible Content**: Contains rarui-select-option elements\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/input/select) for more details.",
|
|
3840
|
+
"attributes": [
|
|
3841
|
+
{
|
|
3842
|
+
"name": "label",
|
|
3843
|
+
"description": "The label for the option group. Displayed as a header for the group.",
|
|
3844
|
+
"type": "string"
|
|
3845
|
+
},
|
|
3846
|
+
{
|
|
3847
|
+
"name": "disabled",
|
|
3848
|
+
"description": "Whether this option group is disabled, preventing selection of all options within.",
|
|
3849
|
+
"type": "boolean",
|
|
3850
|
+
"default": false
|
|
3851
|
+
}
|
|
3852
|
+
]
|
|
3853
|
+
},
|
|
3854
|
+
{
|
|
3855
|
+
"name": "rarui-select-select-option",
|
|
3856
|
+
"description": "## Rarui Select Option\n---\nIndividual option component for use within rarui-select.\n\nFeatures:\n- **Flexible Content**: Support for both label attribute and slot content\n- **Selection State**: Automatic handling of selected state\n- **Accessibility**: Full ARIA support and keyboard navigation\n- **Parent Integration**: Automatically detects parent select configuration\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/input/select) for more details.",
|
|
3857
|
+
"attributes": [
|
|
3858
|
+
{
|
|
3859
|
+
"name": "value",
|
|
3860
|
+
"description": "The value of the option that will be submitted with forms.\n\n(Required)",
|
|
3861
|
+
"type": "string"
|
|
3862
|
+
},
|
|
3863
|
+
{
|
|
3864
|
+
"name": "label",
|
|
3865
|
+
"description": "The label text for the option. If not provided, will use slot content.",
|
|
3866
|
+
"type": "string"
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
"name": "selected",
|
|
3870
|
+
"description": "Whether this option is currently selected.",
|
|
3871
|
+
"type": "boolean",
|
|
3872
|
+
"default": false
|
|
3873
|
+
},
|
|
3874
|
+
{
|
|
3875
|
+
"name": "disabled",
|
|
3876
|
+
"description": "Whether this option is disabled and cannot be selected.",
|
|
3877
|
+
"type": "boolean",
|
|
3878
|
+
"default": false
|
|
3879
|
+
}
|
|
3880
|
+
]
|
|
3881
|
+
},
|
|
3631
3882
|
{
|
|
3632
3883
|
"name": "rarui-textarea",
|
|
3633
3884
|
"description": "## Rarui Textarea\n---\nExpanded text area for long text entries. Allows you to enter large blocks of text, such as comments or detailed descriptions.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/input/textarea) for more details.",
|