@rarui/components 1.5.0 → 1.6.0

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  `@rarui/components` components is a component library built with [Stencil](https://stenciljs.com/docs/introduction).
4
4
 
5
+ ## 2025-05-29 `1.6.0`
6
+
7
+ #### 🎉 New features
8
+
9
+ - Added new input `RadioButton` component. ([#113](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/113) by [@junior](https://git.rarolabs.com.br/junior))
10
+ - Added new input `Textarea` component. ([#113](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/112) by [@junior](https://git.rarolabs.com.br/junior))
11
+
5
12
  ## 2025-05-28 `1.5.0`
6
13
 
7
14
  #### 🎉 New features
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.0",
2
+ "version": "1.5.0",
3
3
  "tags": [
4
4
  {
5
5
  "name": "rarui-avatar",
@@ -1072,6 +1072,79 @@
1072
1072
  }
1073
1073
  ]
1074
1074
  },
1075
+ {
1076
+ "name": "rarui-radio-button",
1077
+ "description": "## Rarui Radio Button\n---\nRadio Button allows users to select one option from a set. They are a selection control that usually appears when users are asked to make decisions or select an option from a set of choices.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components/input/radiobutton) for more details.",
1078
+ "attributes": [
1079
+ {
1080
+ "name": "selected",
1081
+ "description": "Sets radio state to activated or deactivated.",
1082
+ "type": "boolean"
1083
+ },
1084
+ {
1085
+ "name": "label",
1086
+ "description": "Text to be rendered inside the component.",
1087
+ "type": "string"
1088
+ },
1089
+ {
1090
+ "name": "size",
1091
+ "description": "Specifies the size of the radiobutton\n\n- large\n- small",
1092
+ "type": "string",
1093
+ "values": [
1094
+ {
1095
+ "name": "large"
1096
+ },
1097
+ {
1098
+ "name": "small"
1099
+ }
1100
+ ]
1101
+ },
1102
+ {
1103
+ "name": "error",
1104
+ "description": "Specifies whether the radiobutton is in error state",
1105
+ "type": "boolean"
1106
+ },
1107
+ {
1108
+ "name": "id",
1109
+ "description": "Defines a unique identifier (ID) which must be unique in the whole document.\nIts purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).",
1110
+ "type": "string"
1111
+ },
1112
+ {
1113
+ "name": "disabled",
1114
+ "description": "Disables the radio button, disallowing user interaction.",
1115
+ "type": "boolean"
1116
+ }
1117
+ ]
1118
+ },
1119
+ {
1120
+ "name": "rarui-textarea",
1121
+ "description": "## Rarui Radio Button\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/input/textarea) for more details.",
1122
+ "attributes": [
1123
+ {
1124
+ "name": "lines",
1125
+ "description": "Number of lines to be rendered for the user to input text",
1126
+ "type": "number"
1127
+ },
1128
+ {
1129
+ "name": "appearance",
1130
+ "description": "Determines the visual style of the textarea, affecting its border\n\n- error\n- success",
1131
+ "type": "string",
1132
+ "values": [
1133
+ {
1134
+ "name": "error"
1135
+ },
1136
+ {
1137
+ "name": "success"
1138
+ }
1139
+ ]
1140
+ },
1141
+ {
1142
+ "name": "disabled",
1143
+ "description": "Disables the Textarea, disallowing user interaction.",
1144
+ "type": "boolean"
1145
+ }
1146
+ ]
1147
+ },
1075
1148
  {
1076
1149
  "name": "rarui-box",
1077
1150
  "description": "## Rarui Box\n---\nA low-level `utility` component that provides stylized system accessories to allow for custom styling with theme reconfection.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components/layout/box) for more details.",
package/dist/index.d.ts CHANGED
@@ -16588,6 +16588,109 @@ declare const checkboxStyles: {
16588
16588
 
16589
16589
  type CheckboxVariants = NonNullable<RecipeVariants<typeof checkboxStyles.checkbox>>;
16590
16590
 
16591
+ declare const styles$3: {
16592
+ radioButton: RuntimeFn<{
16593
+ /**
16594
+ * Specifies the size of the radiobutton
16595
+ */
16596
+ size: {
16597
+ small: {
16598
+ width: "1.25rem";
16599
+ height: "1.25rem";
16600
+ ":before": {
16601
+ width: "2rem";
16602
+ height: "2rem";
16603
+ };
16604
+ ":after": {
16605
+ width: ".5rem";
16606
+ height: ".5rem";
16607
+ };
16608
+ };
16609
+ large: {
16610
+ width: "1.5rem";
16611
+ height: "1.5rem";
16612
+ ":before": {
16613
+ width: "2.75rem";
16614
+ height: "2.75rem";
16615
+ };
16616
+ ":after": {
16617
+ width: ".75rem";
16618
+ height: ".75rem";
16619
+ };
16620
+ };
16621
+ };
16622
+ /**
16623
+ * Specifies whether the radiobutton is in error state
16624
+ */
16625
+ error: {
16626
+ true: {
16627
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16628
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16629
+ selectors: {
16630
+ "&:has(input:disabled)": {
16631
+ opacity: "50%";
16632
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16633
+ };
16634
+ "&:has(input:checked)": {
16635
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16636
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16637
+ };
16638
+ "&:has(input:checked):after": {
16639
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16640
+ };
16641
+ "&:hover:before": {
16642
+ opacity: number;
16643
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16644
+ };
16645
+ "&:active:before": {
16646
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16647
+ };
16648
+ };
16649
+ };
16650
+ };
16651
+ }>;
16652
+ input: string;
16653
+ container: string;
16654
+ };
16655
+
16656
+ type RadioButtonVariants = NonNullable<RecipeVariants<typeof styles$3.radioButton>>;
16657
+
16658
+ declare const textareaStyles: {
16659
+ textarea: RuntimeFn<{
16660
+ /**
16661
+ * Determines the visual style of the textarea, affecting its border
16662
+ */
16663
+ appearance: {
16664
+ success: {
16665
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16666
+ ":hover": {
16667
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16668
+ };
16669
+ ":focus": {
16670
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16671
+ };
16672
+ ":disabled": {
16673
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16674
+ };
16675
+ };
16676
+ error: {
16677
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16678
+ ":hover": {
16679
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16680
+ };
16681
+ ":focus": {
16682
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16683
+ };
16684
+ ":disabled": {
16685
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16686
+ };
16687
+ };
16688
+ };
16689
+ }>;
16690
+ };
16691
+
16692
+ type TextareaVariants = NonNullable<RecipeVariants<typeof textareaStyles.textarea>>;
16693
+
16591
16694
  declare const cardStyles: {
16592
16695
  card: RuntimeFn<{
16593
16696
  /**
@@ -16682,6 +16785,26 @@ interface CheckboxTyping {
16682
16785
  }
16683
16786
  type CheckboxProps = CheckboxTyping & CheckboxVariants;
16684
16787
 
16788
+ interface RadioButtonTyping {
16789
+ /**
16790
+ * Sets radio state to activated or deactivated.
16791
+ */
16792
+ selected?: boolean;
16793
+ /**
16794
+ * Text to be rendered inside the component.
16795
+ */
16796
+ label?: string;
16797
+ }
16798
+ type RadioButtonProps = RadioButtonTyping & RadioButtonVariants;
16799
+
16800
+ interface TextareaProps extends TextareaVariants {
16801
+ /**
16802
+ * Number of lines to be rendered for the user to input text
16803
+ * @default 2
16804
+ */
16805
+ lines?: number;
16806
+ }
16807
+
16685
16808
  type CardProps = CardVariants & CardSprinkle;
16686
16809
 
16687
16810
  interface CardHeaderProps {
@@ -16858,6 +16981,74 @@ declare class RaruiCheckbox extends LitElement {
16858
16981
  private _onChange;
16859
16982
  }
16860
16983
 
16984
+ declare global {
16985
+ interface HTMLElementTagNameMap {
16986
+ "rarui-radio-button": RaruiRadioButton;
16987
+ }
16988
+ }
16989
+ /**
16990
+ * ## Rarui Radio Button
16991
+ * ---
16992
+ * Radio Button allows users to select one option from a set. They are a selection control that usually appears when users are asked to make decisions or select an option from a set of choices.
16993
+ *
16994
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components/input/radiobutton) for more details.
16995
+ */
16996
+ type RadioButtonProperties = Partial<RadioButtonProps> & {
16997
+ /**
16998
+ * Defines a unique identifier (ID) which must be unique in the whole document.
16999
+ * Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).
17000
+ */
17001
+ id?: string;
17002
+ /**
17003
+ * Disables the radio button, disallowing user interaction.
17004
+ * @default false
17005
+ */
17006
+ disabled?: boolean;
17007
+ };
17008
+
17009
+ declare class RaruiRadioButton extends LitElement {
17010
+ id: string;
17011
+ disabled: boolean;
17012
+ name?: string;
17013
+ label?: RadioButtonProperties["label"];
17014
+ size?: RadioButtonProperties["size"];
17015
+ error?: RadioButtonProperties["error"];
17016
+ selected?: RadioButtonProperties["selected"];
17017
+ static styles: CSSResult;
17018
+ render(): TemplateResult<1>;
17019
+ private _onChange;
17020
+ }
17021
+
17022
+ declare global {
17023
+ interface HTMLElementTagNameMap {
17024
+ "rarui-textarea": RaruiTextarea;
17025
+ }
17026
+ }
17027
+ /**
17028
+ * ## Rarui Radio Button
17029
+ * ---
17030
+ * Expanded text area for long text entries. Allows you to enter large blocks of text, such as comments or detailed descriptions.
17031
+ *
17032
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components/input/textarea) for more details.
17033
+ */
17034
+ type TextareaProperties = Partial<TextareaProps> & {
17035
+ /**
17036
+ * Disables the Textarea, disallowing user interaction.
17037
+ * @default false
17038
+ */
17039
+ disabled?: boolean;
17040
+ };
17041
+
17042
+ declare class RaruiTextarea extends LitElement {
17043
+ disabled: boolean;
17044
+ value?: string;
17045
+ appearance?: TextareaProperties["appearance"];
17046
+ lines?: TextareaProperties["lines"];
17047
+ static styles: CSSResult;
17048
+ render(): TemplateResult<1>;
17049
+ private _onChange;
17050
+ }
17051
+
16861
17052
  declare global {
16862
17053
  interface HTMLElementTagNameMap {
16863
17054
  "rarui-card-header": RaruiCardHeader;