@rarui/components 1.17.0 → 1.18.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,18 @@
2
2
 
3
3
  `@rarui/components` components is a component library built with [Lit](https://lit.dev/).
4
4
 
5
+ ## 2024-08-28 `1.18.0`
6
+
7
+ #### 🎉 New features
8
+
9
+ - Added new stylization `ThemeProvider` component. ([#128](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/128) by [@junior](https://git.rarolabs.com.br/junior))
10
+ - Added new input `Input` component. ([#128](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/128) by [@junior](https://git.rarolabs.com.br/junior))
11
+ - Adding `verticalAlign` and `whiteSpace` property to the component `Box`.
12
+
13
+ #### 🐛 Bug fixes
14
+
15
+ - Fixed `Button` component width issue by adjusting host display styles. ([#128](https://git.rarolabs.com.br/frontend/rarui/-/merge_requests/128) by [@junior](https://git.rarolabs.com.br/junior))
16
+
5
17
  ## 2025-07-03 `1.17.0`
6
18
 
7
19
  #### 🎉 New features
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.16.0",
2
+ "version": "1.17.0",
3
3
  "tags": [
4
4
  {
5
5
  "name": "rarui-avatar",
@@ -2990,6 +2990,199 @@
2990
2990
  }
2991
2991
  ]
2992
2992
  },
2993
+ {
2994
+ "name": "rarui-input",
2995
+ "description": "## Rarui Input\n---\nInput component allows users to enter and edit text.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/input/input) for more details.",
2996
+ "attributes": [
2997
+ {
2998
+ "name": "appearance",
2999
+ "description": "Determines the visual style of the input, affecting its border\n\n- error\n- success",
3000
+ "type": "string",
3001
+ "values": [
3002
+ {
3003
+ "name": "error"
3004
+ },
3005
+ {
3006
+ "name": "success"
3007
+ }
3008
+ ]
3009
+ },
3010
+ {
3011
+ "name": "border",
3012
+ "default": true,
3013
+ "description": "Determines if the input have borders or not.",
3014
+ "type": "boolean"
3015
+ },
3016
+ {
3017
+ "name": "size",
3018
+ "default": "medium",
3019
+ "description": "Specifies the size of the input, controlling its dimensions.\n\n- large\n- medium\n- small",
3020
+ "type": "string",
3021
+ "values": [
3022
+ {
3023
+ "name": "large"
3024
+ },
3025
+ {
3026
+ "name": "medium",
3027
+ "description": "(default)"
3028
+ },
3029
+ {
3030
+ "name": "small"
3031
+ }
3032
+ ]
3033
+ },
3034
+ {
3035
+ "name": "divider",
3036
+ "default": true,
3037
+ "description": "Places a divider between the input and the leading components",
3038
+ "type": "boolean"
3039
+ },
3040
+ {
3041
+ "name": "value",
3042
+ "description": "The value of the input element.",
3043
+ "type": "string"
3044
+ },
3045
+ {
3046
+ "name": "placeholder",
3047
+ "description": "Placeholder text for the input element.",
3048
+ "type": "string"
3049
+ },
3050
+ {
3051
+ "name": "disabled",
3052
+ "default": false,
3053
+ "description": "Whether the input is disabled.",
3054
+ "type": "boolean"
3055
+ }
3056
+ ]
3057
+ },
3058
+ {
3059
+ "name": "rarui-input-password",
3060
+ "attributes": [
3061
+ {
3062
+ "name": "value",
3063
+ "description": "The value of the password input element.",
3064
+ "type": "string"
3065
+ },
3066
+ {
3067
+ "name": "placeholder",
3068
+ "description": "Placeholder text for the password input element.",
3069
+ "type": "string"
3070
+ },
3071
+ {
3072
+ "name": "appearance",
3073
+ "description": "Determines the visual style of the input, affecting its border\n\n- error\n- success",
3074
+ "type": "string",
3075
+ "values": [
3076
+ {
3077
+ "name": "error"
3078
+ },
3079
+ {
3080
+ "name": "success"
3081
+ }
3082
+ ]
3083
+ },
3084
+ {
3085
+ "name": "border",
3086
+ "default": true,
3087
+ "description": "Determines if the input have borders or not.",
3088
+ "type": "boolean"
3089
+ },
3090
+ {
3091
+ "name": "size",
3092
+ "default": "medium",
3093
+ "description": "Specifies the size of the input, controlling its dimensions.\n\n- large\n- medium\n- small",
3094
+ "type": "string",
3095
+ "values": [
3096
+ {
3097
+ "name": "large"
3098
+ },
3099
+ {
3100
+ "name": "medium",
3101
+ "description": "(default)"
3102
+ },
3103
+ {
3104
+ "name": "small"
3105
+ }
3106
+ ]
3107
+ },
3108
+ {
3109
+ "name": "divider",
3110
+ "default": true,
3111
+ "description": "Places a divider between the input and the leading components",
3112
+ "type": "boolean"
3113
+ },
3114
+ {
3115
+ "name": "disabled",
3116
+ "default": false,
3117
+ "description": "Whether the input is disabled.",
3118
+ "type": "boolean"
3119
+ }
3120
+ ]
3121
+ },
3122
+ {
3123
+ "name": "rarui-input-search",
3124
+ "attributes": [
3125
+ {
3126
+ "name": "value",
3127
+ "description": "The value of the search input element.",
3128
+ "type": "string"
3129
+ },
3130
+ {
3131
+ "name": "placeholder",
3132
+ "description": "Placeholder text for the search input element.",
3133
+ "type": "string"
3134
+ },
3135
+ {
3136
+ "name": "appearance",
3137
+ "description": "Determines the visual style of the input, affecting its border\n\n- error\n- success",
3138
+ "type": "string",
3139
+ "values": [
3140
+ {
3141
+ "name": "error"
3142
+ },
3143
+ {
3144
+ "name": "success"
3145
+ }
3146
+ ]
3147
+ },
3148
+ {
3149
+ "name": "border",
3150
+ "default": true,
3151
+ "description": "Determines if the input have borders or not.",
3152
+ "type": "boolean"
3153
+ },
3154
+ {
3155
+ "name": "size",
3156
+ "default": "medium",
3157
+ "description": "Specifies the size of the input, controlling its dimensions.\n\n- large\n- medium\n- small",
3158
+ "type": "string",
3159
+ "values": [
3160
+ {
3161
+ "name": "large"
3162
+ },
3163
+ {
3164
+ "name": "medium",
3165
+ "description": "(default)"
3166
+ },
3167
+ {
3168
+ "name": "small"
3169
+ }
3170
+ ]
3171
+ },
3172
+ {
3173
+ "name": "divider",
3174
+ "default": true,
3175
+ "description": "Places a divider between the input and the leading components",
3176
+ "type": "boolean"
3177
+ },
3178
+ {
3179
+ "name": "disabled",
3180
+ "default": false,
3181
+ "description": "Whether the input is disabled.",
3182
+ "type": "boolean"
3183
+ }
3184
+ ]
3185
+ },
2993
3186
  {
2994
3187
  "name": "rarui-radio-button",
2995
3188
  "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-web-components/input/radiobutton) for more details.",
@@ -5860,6 +6053,60 @@
5860
6053
  "description": "The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency.\n\n\n**Initial value**: `1.0`",
5861
6054
  "values": []
5862
6055
  },
6056
+ {
6057
+ "name": "vertical-align",
6058
+ "description": "The **`vertical-align`** CSS property sets vertical alignment of an inline, inline-block or table-cell box.\n\n\n**Initial value**: `baseline`\n\nThis property supports responsive values. You can pass a single value like `\"baseline\"`.\n\n Or an object like:\n \n ```\n{\n \"xs\": \"baseline\",\n \"md\": \"bottom\",\n \"lg\": \"middle\",\n \"xl\": \"sub\"\n}\n```\n\n- baseline\n- bottom\n- middle\n- sub\n- super\n- text-bottom\n- text-top\n- top",
6059
+ "values": [
6060
+ {
6061
+ "name": "baseline"
6062
+ },
6063
+ {
6064
+ "name": "bottom"
6065
+ },
6066
+ {
6067
+ "name": "middle"
6068
+ },
6069
+ {
6070
+ "name": "sub"
6071
+ },
6072
+ {
6073
+ "name": "super"
6074
+ },
6075
+ {
6076
+ "name": "text-bottom"
6077
+ },
6078
+ {
6079
+ "name": "text-top"
6080
+ },
6081
+ {
6082
+ "name": "top"
6083
+ }
6084
+ ]
6085
+ },
6086
+ {
6087
+ "name": "white-space",
6088
+ "description": "The **`white-space`** CSS property sets how white space inside an element is handled.\n\n\n**Initial value**: `normal`\n\nThis property supports responsive values. You can pass a single value like `\"break-spaces\"`.\n\n Or an object like:\n \n ```\n{\n \"xs\": \"break-spaces\",\n \"md\": \"normal\",\n \"lg\": \"nowrap\",\n \"xl\": \"pre\"\n}\n```\n\n- break-spaces\n- normal\n- nowrap\n- pre\n- pre-line\n- pre-wrap",
6089
+ "values": [
6090
+ {
6091
+ "name": "break-spaces"
6092
+ },
6093
+ {
6094
+ "name": "normal"
6095
+ },
6096
+ {
6097
+ "name": "nowrap"
6098
+ },
6099
+ {
6100
+ "name": "pre"
6101
+ },
6102
+ {
6103
+ "name": "pre-line"
6104
+ },
6105
+ {
6106
+ "name": "pre-wrap"
6107
+ }
6108
+ ]
6109
+ },
5863
6110
  {
5864
6111
  "name": "border-width-x",
5865
6112
  "description": "The borderWidthX shorthand property defines the width of the element's border on the left and right.\n\nThis property supports responsive values. You can pass a single value like `\"$1\"`.\n\n Or an object like:\n \n ```\n{\n \"xs\": \"$1\",\n \"md\": \"$2\",\n \"lg\": \"$3\",\n \"xl\": \"$4\"\n}\n```\n\n- $1\n- $2\n- $3\n- $4\n- $5\n- $none",
@@ -7080,6 +7327,27 @@
7080
7327
  }
7081
7328
  ]
7082
7329
  },
7330
+ {
7331
+ "name": "rarui-theme-provider",
7332
+ "description": "## Rarui ThemeProvider\n---\nThemeProvider component provides global theme management for the application.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/stylization/theme-provider) for more details.",
7333
+ "attributes": [
7334
+ {
7335
+ "name": "theme",
7336
+ "default": "base",
7337
+ "description": "Theme to apply globally to the application.\n\n- base\n- dark",
7338
+ "type": "string",
7339
+ "values": [
7340
+ {
7341
+ "name": "base",
7342
+ "description": "(default)"
7343
+ },
7344
+ {
7345
+ "name": "dark"
7346
+ }
7347
+ ]
7348
+ }
7349
+ ]
7350
+ },
7083
7351
  {
7084
7352
  "name": "rarui-banner",
7085
7353
  "description": "## Rarui Banner\n---\nBanner messages are displayed to the user at the top of the window/screen.\n\nSee [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/surface/banner) for more details.",
package/dist/index.d.ts CHANGED
@@ -16804,6 +16804,130 @@ declare const iconButtonStyles: {
16804
16804
 
16805
16805
  type IconButtonVariants = NonNullable<RecipeVariants<typeof iconButtonStyles.iconButton>>;
16806
16806
 
16807
+ declare const styles$6: {
16808
+ container: RuntimeFn<{
16809
+ /**
16810
+ * Determines the visual style of the input, affecting its border
16811
+ */
16812
+ appearance: {
16813
+ success: {
16814
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16815
+ ":hover": {
16816
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16817
+ };
16818
+ ":focus": {
16819
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16820
+ };
16821
+ };
16822
+ error: {
16823
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16824
+ ":hover": {
16825
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16826
+ };
16827
+ ":focus": {
16828
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16829
+ };
16830
+ };
16831
+ };
16832
+ /**
16833
+ * Determines if the input have borders or not.
16834
+ * @default true
16835
+ */
16836
+ border: {
16837
+ true: {
16838
+ borderWidth: `var(--${string})` | `var(--${string}, ${string})`;
16839
+ };
16840
+ false: {
16841
+ borderWidth: number;
16842
+ };
16843
+ };
16844
+ size: {
16845
+ large: {
16846
+ height: "3rem";
16847
+ };
16848
+ medium: {
16849
+ height: "2.5rem";
16850
+ };
16851
+ small: {
16852
+ height: "2rem";
16853
+ };
16854
+ };
16855
+ }>;
16856
+ input: RuntimeFn<{
16857
+ /**
16858
+ * Places a divider between the input and the leading components
16859
+ * @default true
16860
+ */
16861
+ divider: {
16862
+ false: {};
16863
+ };
16864
+ /**
16865
+ * Specifies the size of the input, controlling its dimensions.
16866
+ * @default medium
16867
+ */
16868
+ size: {
16869
+ large: {
16870
+ fontSize: `var(--${string})` | `var(--${string}, ${string})`;
16871
+ lineHeight: `var(--${string})` | `var(--${string}, ${string})`;
16872
+ };
16873
+ medium: {
16874
+ fontSize: `var(--${string})` | `var(--${string}, ${string})`;
16875
+ lineHeight: `var(--${string})` | `var(--${string}, ${string})`;
16876
+ };
16877
+ small: {
16878
+ fontSize: `var(--${string})` | `var(--${string}, ${string})`;
16879
+ lineHeight: `var(--${string})` | `var(--${string}, ${string})`;
16880
+ padding: `0 var(--${string})` | `0 var(--${string}, ${string})`;
16881
+ };
16882
+ };
16883
+ }>;
16884
+ leading: RuntimeFn<{
16885
+ position: {
16886
+ start: {
16887
+ borderRightWidth: `var(--${string})` | `var(--${string}, ${string})`;
16888
+ };
16889
+ end: {
16890
+ borderLeftWidth: `var(--${string})` | `var(--${string}, ${string})`;
16891
+ };
16892
+ };
16893
+ divider: {
16894
+ true: {
16895
+ borderStyle: "solid";
16896
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16897
+ };
16898
+ false: {
16899
+ borderRightWidth: number;
16900
+ borderLeftWidth: number;
16901
+ };
16902
+ };
16903
+ appearance: {
16904
+ success: {
16905
+ color: `var(--${string})` | `var(--${string}, ${string})`;
16906
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})`;
16907
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16908
+ };
16909
+ error: {
16910
+ color: `var(--${string})` | `var(--${string}, ${string})`;
16911
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})`;
16912
+ borderColor: `var(--${string})` | `var(--${string}, ${string})`;
16913
+ };
16914
+ };
16915
+ size: {
16916
+ large: {
16917
+ padding: `0 var(--${string})` | `0 var(--${string}, ${string})`;
16918
+ };
16919
+ medium: {
16920
+ padding: `0 var(--${string})` | `0 var(--${string}, ${string})`;
16921
+ };
16922
+ small: {
16923
+ padding: `0 var(--${string})` | `0 var(--${string}, ${string})`;
16924
+ };
16925
+ };
16926
+ }>;
16927
+ };
16928
+
16929
+ type InputVariants = NonNullable<RecipeVariants<typeof styles$6.container> & RecipeVariants<typeof styles$6.input>>;
16930
+
16807
16931
  declare const styles$5: {
16808
16932
  label: RuntimeFn<{
16809
16933
  /**
@@ -17701,6 +17825,8 @@ interface ChipTyping extends ChipSprinkle {
17701
17825
  }
17702
17826
  type ChipProps = ChipTyping & ChipVariants;
17703
17827
 
17828
+ type InputProps = InputVariants;
17829
+
17704
17830
  interface DropdownTyping {
17705
17831
  /**
17706
17832
  * A common feature of select dropdowns is that the dropdown matches the width of the reference regardless of its contents.
@@ -18452,6 +18578,51 @@ declare class RaruiIconButton extends LitElement {
18452
18578
  render(): TemplateResult<1>;
18453
18579
  }
18454
18580
 
18581
+ declare global {
18582
+ interface HTMLElementTagNameMap {
18583
+ "rarui-input": RaruiInput;
18584
+ }
18585
+ }
18586
+ /**
18587
+ * ## Rarui Input
18588
+ * ---
18589
+ * Input component allows users to enter and edit text.
18590
+ *
18591
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components-web-components/input/input) for more details.
18592
+ */
18593
+ type InputProperties = Partial<InputProps> & {
18594
+ /**
18595
+ * The value of the input element.
18596
+ */
18597
+ value?: string;
18598
+ /**
18599
+ * Placeholder text for the input element.
18600
+ */
18601
+ placeholder?: string;
18602
+ /**
18603
+ * Whether the input is disabled.
18604
+ * @default false
18605
+ */
18606
+ disabled?: boolean;
18607
+ };
18608
+
18609
+ declare class RaruiInput extends LitElement {
18610
+ size: InputProperties["size"];
18611
+ appearance?: InputProperties["appearance"];
18612
+ border: InputProperties["border"];
18613
+ divider: InputProperties["divider"];
18614
+ disabled: InputProperties["disabled"];
18615
+ value: string;
18616
+ placeholder?: string;
18617
+ static styles: CSSResult;
18618
+ render(): TemplateResult<1>;
18619
+ private _focusInput;
18620
+ private _onInput;
18621
+ private _onChange;
18622
+ private _onFocus;
18623
+ private _onBlur;
18624
+ }
18625
+
18455
18626
  declare global {
18456
18627
  interface HTMLElementTagNameMap {
18457
18628
  "rarui-radio-button": RaruiRadioButton;
@@ -18762,3 +18933,22 @@ declare class RaruiModalHeader extends LitElement {
18762
18933
  private handleClose;
18763
18934
  render(): TemplateResult<1>;
18764
18935
  }
18936
+
18937
+ declare global {
18938
+ interface HTMLElementTagNameMap {
18939
+ "rarui-theme-provider": RaruiThemeProvider;
18940
+ }
18941
+ }
18942
+ type Theme = "dark" | "base";
18943
+
18944
+ declare class RaruiThemeProvider extends LitElement {
18945
+ theme: Theme;
18946
+ private previousTheme?;
18947
+ protected createRenderRoot(): this;
18948
+ static styles: CSSResult;
18949
+ connectedCallback(): void;
18950
+ updated(changedProperties: Map<string, unknown>): void;
18951
+ disconnectedCallback(): void;
18952
+ private applyTheme;
18953
+ render(): TemplateResult<1>;
18954
+ }