@rarui/components 1.8.0-rc.1 → 1.9.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/dist/index.d.ts CHANGED
@@ -16151,18 +16151,29 @@ interface DividerSprinkle {
16151
16151
  size?: string | Conditions<string>;
16152
16152
  /**
16153
16153
  * The **`type`** shorthand CSS property sets the line style for all four sides of an element's.
16154
+ * @default solid
16154
16155
  */
16155
16156
  type?: AddDollar<DividerBorderStyle> | Conditions<AddDollar<DividerBorderStyle>>;
16156
16157
  /**
16157
16158
  * The **`thickness`** shorthand CSS property sets the width of an element's.
16159
+ * @default $1
16158
16160
  */
16159
16161
  thickness?: AddDollar<keyof typeof dividerBorderWidthProperties> | Conditions<AddDollar<keyof typeof dividerBorderWidthProperties>>;
16160
16162
  /**
16161
16163
  * The **`color`** CSS property sets an element's color.
16164
+ * @default $divider
16162
16165
  */
16163
16166
  color?: AddDollar<keyof typeof borderColorProperties> | Conditions<AddDollar<keyof typeof borderColorProperties>>;
16164
16167
  }
16165
16168
 
16169
+ type IconDynamicProperties = Pick<StandardLonghandProperties, "cursor">;
16170
+ interface IconSprinkle extends IconDynamicProperties {
16171
+ /**
16172
+ * The color property sets the icon.
16173
+ */
16174
+ color?: AddDollar<keyof typeof colorProperties> | Conditions<AddDollar<keyof typeof colorProperties>>;
16175
+ }
16176
+
16166
16177
  declare const textLineHeightProperties: {
16167
16178
  xxs: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16168
16179
  xs: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
@@ -16337,7 +16348,7 @@ declare const badgeStyles: {
16337
16348
  };
16338
16349
  /**
16339
16350
  * Specifies the size of the badge, controlling its dimensions.
16340
- * @defaiult medium
16351
+ * @default medium
16341
16352
  */
16342
16353
  size: {
16343
16354
  large: {
@@ -16365,7 +16376,7 @@ declare const badgeStyles: {
16365
16376
  };
16366
16377
  /**
16367
16378
  * Defines the visual variant of the badge, affecting its background style.
16368
- * @defaiult solid
16379
+ * @default solid
16369
16380
  */
16370
16381
  variant: {
16371
16382
  solid: {};
@@ -16395,6 +16406,7 @@ declare const buttonStyles: {
16395
16406
  /**
16396
16407
  * Defines the appearance variants for the button component.
16397
16408
  * Each appearance variant corresponds to a specific background color, border color, and text color.
16409
+ * @default brand
16398
16410
  */
16399
16411
  appearance: {
16400
16412
  brand: {
@@ -16430,7 +16442,7 @@ declare const buttonStyles: {
16430
16442
  };
16431
16443
  /**
16432
16444
  * Defines the size of the button component.
16433
- * @default "large"
16445
+ * @default large
16434
16446
  */
16435
16447
  size: {
16436
16448
  large: {
@@ -16454,6 +16466,7 @@ declare const buttonStyles: {
16454
16466
  };
16455
16467
  /**
16456
16468
  * Defines the visual variant of the badge, affecting its background style, border and text.
16469
+ * @default solid
16457
16470
  */
16458
16471
  variant: {
16459
16472
  solid: {
@@ -16546,6 +16559,112 @@ declare const checkboxStyles: {
16546
16559
 
16547
16560
  type CheckboxVariants = NonNullable<RecipeVariants<typeof checkboxStyles.checkbox>>;
16548
16561
 
16562
+ declare const iconButtonStyles: {
16563
+ iconButton: RuntimeFn<{
16564
+ /**
16565
+ * Determines the visual style of the icon button, influencing its color scheme and appearance.
16566
+ * @default brand
16567
+ */
16568
+ appearance: {
16569
+ brand: {
16570
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16571
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16572
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16573
+ };
16574
+ danger: {
16575
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16576
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16577
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16578
+ };
16579
+ success: {
16580
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16581
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16582
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16583
+ };
16584
+ warning: {
16585
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16586
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16587
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16588
+ };
16589
+ neutral: {
16590
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16591
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16592
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16593
+ };
16594
+ inverted: {
16595
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16596
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16597
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16598
+ };
16599
+ };
16600
+ /**
16601
+ * Defines the size of the icon button component.
16602
+ * @default medium
16603
+ */
16604
+ size: {
16605
+ large: {
16606
+ height: "3rem";
16607
+ width: "3rem";
16608
+ fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16609
+ };
16610
+ medium: {
16611
+ height: "2.5rem";
16612
+ width: "2.5rem";
16613
+ fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16614
+ };
16615
+ small: {
16616
+ height: "2rem";
16617
+ width: "2rem";
16618
+ fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16619
+ };
16620
+ };
16621
+ variant: {
16622
+ /**
16623
+ * Defines the visual variant of the icon button, affecting its background style, border and text.
16624
+ * @default solid
16625
+ */
16626
+ solid: {
16627
+ selectors: {
16628
+ "&:hover:after": {
16629
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16630
+ };
16631
+ "&:active:after": {
16632
+ borderColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16633
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16634
+ };
16635
+ };
16636
+ };
16637
+ outlined: {
16638
+ backgroundColor: "transparent";
16639
+ };
16640
+ ghost: {
16641
+ backgroundColor: "transparent";
16642
+ borderColor: "transparent";
16643
+ };
16644
+ tonal: {
16645
+ borderColor: "transparent";
16646
+ };
16647
+ };
16648
+ /**
16649
+ * Defines if the button should have rounded edges.
16650
+ *
16651
+ * - `true`: The button will be rendered with completely rounded edges, useful for circular -shaped icons.
16652
+ * - `false` (default): The button will have standard edges or defined by the component style.
16653
+ * @default false
16654
+ */
16655
+ rounded: {
16656
+ true: {
16657
+ borderRadius: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16658
+ ":after": {
16659
+ borderRadius: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
16660
+ };
16661
+ };
16662
+ };
16663
+ }>;
16664
+ };
16665
+
16666
+ type IconButtonVariants = NonNullable<RecipeVariants<typeof iconButtonStyles.iconButton>>;
16667
+
16549
16668
  declare const progressStyles: {
16550
16669
  progress: string;
16551
16670
  bar: string;
@@ -16694,6 +16813,7 @@ declare const styles: {
16694
16813
  tooltip: RuntimeFn<{
16695
16814
  /**
16696
16815
  * Specifies whether the color scheme should be inverted
16816
+ * @default false
16697
16817
  */
16698
16818
  inverted: {
16699
16819
  true: {
@@ -16707,6 +16827,7 @@ declare const styles: {
16707
16827
  };
16708
16828
  /**
16709
16829
  * Specifies the padding for the tooltip
16830
+ * @default base
16710
16831
  */
16711
16832
  padding: {
16712
16833
  base: {
@@ -16781,10 +16902,13 @@ type AvatarProps = AvatarTypings & AvatarVariants;
16781
16902
  interface DividerProps extends DividerSprinkle {
16782
16903
  /**
16783
16904
  * The direction of the Divider.
16905
+ * @default horizontal
16784
16906
  */
16785
16907
  direction?: "vertical" | "horizontal";
16786
16908
  }
16787
16909
 
16910
+ type IconProps = IconSprinkle;
16911
+
16788
16912
  interface TitleProps extends TitleSprinkle {
16789
16913
  /**
16790
16914
  * Type of html tag to create for the title.
@@ -16885,6 +17009,15 @@ interface CheckboxTyping {
16885
17009
  }
16886
17010
  type CheckboxProps = CheckboxTyping & CheckboxVariants;
16887
17011
 
17012
+ interface IconButtonTyping {
17013
+ /**
17014
+ * Disables the button, disallowing user interaction.
17015
+ * @default false
17016
+ */
17017
+ disabled?: boolean;
17018
+ }
17019
+ type IconButtonProps = IconButtonTyping & IconButtonVariants;
17020
+
16888
17021
  interface RadioButtonTyping {
16889
17022
  /**
16890
17023
  * Sets radio state to activated or deactivated.
@@ -16985,6 +17118,42 @@ declare class RaruiDivider extends LitElement {
16985
17118
  render(): TemplateResult<1>;
16986
17119
  }
16987
17120
 
17121
+ type IconName = "add-circle-filled" | "add-circle-outlined" | "alarm-filled" | "alarm-outlined" | "alternate-email" | "archive-all-filled" | "archive-all-outlined" | "archive-filled" | "archive-in-filled" | "archive-in-outlined" | "archive-outlined" | "arrow-alt-down" | "arrow-alt-left" | "arrow-alt-right" | "arrow-alt-up" | "arrow-circle-down-filled" | "arrow-circle-down-outlined" | "arrow-circle-up-filled" | "arrow-circle-up-outlined" | "arrow-circled-down-circle-outlined" | "arrow-circled-down-filled" | "arrow-circled-up-circle-outlined" | "arrow-direction-down-up" | "arrow-direction-left-right" | "arrow-direction-right-left" | "arrow-direction-up-down" | "arrow-directions" | "arrow-down" | "arrow-down-left" | "arrow-down-right" | "arrow-first-page" | "arrow-last-page" | "arrow-left" | "arrow-line-down" | "arrow-line-left" | "arrow-line-long-down" | "arrow-line-long-left" | "arrow-line-long-right" | "arrow-line-long-up" | "arrow-line-right" | "arrow-line-up" | "arrow-right" | "arrow-subdirectory-left" | "arrow-subdirectory-right" | "arrow-trending-down" | "arrow-trending-up" | "arrow-up" | "arrow-up-left" | "arrow-up-right" | "attachment" | "backspace" | "backspace-outlined" | "barley" | "barley-off" | "bolt-circle-filled" | "bolt-circle-outlined" | "bookmark-filled" | "bookmark-outlined" | "calendar-date-range-filled" | "calendar-date-range-outlined" | "calendar-event-filled" | "calendar-event-outlined" | "calendar-filled" | "calendar-outlined" | "camera-filled" | "camera-outlined" | "camera-shutter-filled" | "camera-shutter-outlined" | "cancel-circle-filled" | "cancel-circle-outlined" | "car-filled" | "car-outlined" | "chart-bars-filled" | "chart-bars-outlined" | "chat-bubble-filled" | "chat-bubble-outlined" | "chat-message-filled" | "chat-message-outlined" | "check" | "check-circle-filled" | "check-circle-outlined" | "check-small" | "chevron-big-down" | "chevron-big-left" | "chevron-big-right" | "chevron-big-up" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "clock-filled" | "clock-outlined" | "close" | "cloud-filled" | "cloud-outlined" | "contact-support-filled" | "contact-support-outlined" | "content-copy-filled" | "content-copy-outlined" | "content-paste-filled" | "content-paste-outlined" | "conversation-filled" | "conversation-outlined" | "copyright-filled" | "copyright-outlined" | "credit-card-filled" | "credit-card-outlined" | "danger-filled" | "danger-outlined" | "dashboard-filled" | "dashboard-outlined" | "document-filled" | "document-outlined" | "document-text-filled" | "document-text-outlined" | "download-filled" | "download-outlined" | "eco-filled" | "eco-outlined" | "edit-filled" | "edit-outlined" | "euro-symbol" | "exit-fullscreen" | "eye-filled" | "eye-off-filled" | "eye-off-outlined" | "eye-outlined" | "facebook-filled" | "facebook-outlined" | "file-copy-filled" | "file-copy-outlined" | "filter-alt-filled" | "filter-alt-outlined" | "filter-list" | "fingerprint" | "flag-filled" | "flag-outlined" | "flag-tour-filled" | "flag-tour-outlined" | "flower-filled" | "flower-outlined" | "folder-filled" | "folder-list-filled" | "folder-list-outlined" | "folder-open" | "folder-outlined" | "fruit-apple-filled" | "fruit-apple-outlined" | "fullscreen-filled" | "fullscreen-outlined" | "google" | "google-play" | "headphones-filled" | "headphones-outlined" | "heart-filled" | "heart-outlined" | "help-filled" | "help-outlined" | "history" | "home-filled" | "home-outlined" | "image-filled" | "image-outlined" | "info-circle-filled" | "info-circle-outlined" | "instagram" | "instagram-outlined" | "label-filled" | "label-important-filled" | "label-important-outlined" | "label-outlined" | "language" | "lightbulb-filled" | "lightbulb-outlined" | "link" | "linkedin-filled" | "linkedin-outlined" | "loader" | "loading" | "lock-filled" | "lock-open-filled" | "lock-open-outlined" | "lock-outlined" | "login" | "logout" | "mail-filled" | "mail-open-filled" | "mail-open-outlined" | "mail-outlined" | "menu" | "menu-large" | "microphone-filled" | "microphone-outlined" | "minus" | "money-filled" | "money-outlined" | "mood-bad" | "mood-bad-outlined" | "mood-filled" | "mood-outlined" | "more-horiz" | "more-vert" | "music-note-filled" | "music-note-outlined" | "notification-filled" | "notification-outlined" | "open-in-new" | "package" | "package-outlined" | "pause-filled" | "pause-outlined" | "pets-filled" | "pets-outlined" | "phone-call-filled" | "phone-call-outlined" | "phone-filled" | "phone-outlined" | "pin-filled" | "pin-outlined" | "play-arrow-filled" | "play-arrow-outlined" | "play-circle-filled" | "play-circle-outlined" | "plus" | "power-settings-new" | "printer-filled" | "printer-outlined" | "push-pin-filled" | "push-pin-outlined" | "receipt-filled" | "receipt-outlined" | "recycle" | "redeem" | "redo" | "refresh" | "refresh-alt" | "remove" | "remove-circle-filled" | "remove-circle-outlined" | "repeat" | "reply" | "save-alt" | "screen-outlined" | "search" | "send-filled" | "send-outlined" | "sentiment-dissatisfied-filled" | "sentiment-dissatisfied-outlined" | "sentiment-neutral-filled" | "sentiment-neutral-outlined" | "sentiment-satisfied-filled" | "sentiment-satisfied-outlined" | "sentiment-very-dissatisfied-filled" | "sentiment-very-dissatisfied-outlined" | "sentiment-very-satisfied-filled" | "sentiment-very-satisfied-outlined" | "settings-filled" | "settings-outlined" | "share-filled" | "share-outlined" | "shopping-bag-filled" | "shopping-bag-outlined" | "shopping-cart-add" | "shopping-cart-filled" | "shopping-cart-outlined" | "sprout" | "sprout-outline-outlined" | "star-filled" | "star-outlined" | "stay-primary-portrait" | "storefront" | "tag-filled" | "tag-outlined" | "textsms-filled" | "textsms-outlined" | "thumb-down-filled" | "thumb-down-outlined" | "thumb-up-filled" | "thumb-up-outlined" | "tiktok" | "toc" | "trash-filled" | "trash-outlined" | "truck-filled" | "truck-outlined" | "tune" | "twitter" | "undo" | "upload-filled" | "upload-outlined" | "user-circle-filled" | "user-circle-outlined" | "user-filled" | "user-outlined" | "user-square-filled" | "user-square-outlined" | "users-filled" | "users-outlined" | "view-grid-filled" | "view-grid-outlined" | "view-list-filled" | "view-list-outlined" | "warning-bubble-filled" | "warning-bubble-outlined" | "warning-filled" | "warning-outlined" | "whatsapp-filled" | "whatsapp-outlined" | "work-filled" | "work-outlined" | "wysiwyg-filled" | "youtube-filled" | "youtube-outlined" | "zoom-in" | "zoom-out";
17122
+
17123
+ declare global {
17124
+ interface HTMLElementTagNameMap {
17125
+ "rarui-icon": RaruiIcon;
17126
+ }
17127
+ }
17128
+ /**
17129
+ * ## Rarui Icon
17130
+ * ---
17131
+ * Iconography used in the system based on Google's Material Design.
17132
+ *
17133
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components/exhibition/icon) for more details.
17134
+ */
17135
+ type Sizes = "small" | "medium" | "large";
17136
+ type IconProperties = IconProps & {
17137
+ /**
17138
+ * Name of the icon to be rendered (must be in the @rarui/icons package).
17139
+ */
17140
+ name: IconName;
17141
+ /**
17142
+ * Icon size, can be 'small' |'medium' |'large' or a number.
17143
+ * @default medium
17144
+ */
17145
+ size?: Sizes | number;
17146
+ };
17147
+
17148
+ declare class RaruiIcon extends LitElement {
17149
+ sprinkleAttrs: Record<string, string>;
17150
+ name: IconProperties["name"];
17151
+ size: Sizes | string;
17152
+ static styles: CSSResult;
17153
+ private getSvgWithSize;
17154
+ render(): TemplateResult<1> | null;
17155
+ }
17156
+
16988
17157
  declare global {
16989
17158
  interface HTMLElementTagNameMap {
16990
17159
  "rarui-text": RaruiText;
@@ -17050,13 +17219,13 @@ declare global {
17050
17219
  }
17051
17220
  }
17052
17221
  /**
17053
- * ## Rarui Tooltip
17222
+ * ## Rarui Tootip
17054
17223
  * ---
17055
- * A Divider is a thin line used to separate or group content in lists and layouts.
17224
+ * Tooltips are informative, specific, and action-oriented text labels that provide contextual support
17056
17225
  *
17057
- * See [a complete document](https://rarui.rarolabs.com.br/docs/components/exhibition/divider) for more details.
17226
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components/exhibition/tooltip) for more details.
17058
17227
  */
17059
- type TooltipProperties = Partial<TooltipProps> & {
17228
+ type TooltipProperties = Partial<Omit<TooltipProps, "visible" | "onVisibility" | "portalId">> & {
17060
17229
  /**
17061
17230
  * Position of the popover.
17062
17231
  * @default bottom
@@ -17078,10 +17247,10 @@ type TooltipProperties = Partial<TooltipProps> & {
17078
17247
  };
17079
17248
 
17080
17249
  declare class RaruiTooltip extends LitElement {
17250
+ arrow: TooltipProperties["arrow"];
17081
17251
  padding: TooltipProperties["padding"];
17082
17252
  offset: TooltipProperties["offset"];
17083
17253
  inverted: TooltipProperties["inverted"];
17084
- arrow: TooltipProperties["arrow"];
17085
17254
  enabledDismiss: TooltipProperties["enabledDismiss"];
17086
17255
  enabledClick: TooltipProperties["enabledClick"];
17087
17256
  enabledHover: TooltipProperties["enabledHover"];
@@ -17168,18 +17337,18 @@ type ButtonProperties = Partial<ButtonProps> & {
17168
17337
  /**
17169
17338
  * Defines the native button type.
17170
17339
  * Can be 'button', 'submit', or 'reset'.
17171
- * @default 'button'
17340
+ * @default button
17172
17341
  */
17173
17342
  type?: "button" | "submit" | "reset";
17174
17343
  };
17175
17344
 
17176
17345
  declare class RaruiButton extends LitElement {
17177
- full: ButtonProperties["full"];
17178
- size: ButtonProperties["size"];
17179
17346
  type: ButtonProperties["type"];
17347
+ size: ButtonProperties["size"];
17180
17348
  variant: ButtonProperties["variant"];
17181
- disabled: ButtonProperties["disabled"];
17182
17349
  appearance: ButtonProperties["appearance"];
17350
+ disabled: ButtonProperties["disabled"];
17351
+ full: ButtonProperties["full"];
17183
17352
  static styles: CSSResult;
17184
17353
  render(): TemplateResult<1>;
17185
17354
  }
@@ -17209,6 +17378,30 @@ declare class RaruiCheckbox extends LitElement {
17209
17378
  private _onChange;
17210
17379
  }
17211
17380
 
17381
+ declare global {
17382
+ interface HTMLElementTagNameMap {
17383
+ "rarui-icon-button": RaruiIconButton;
17384
+ }
17385
+ }
17386
+ /**
17387
+ * ## Rarui Icon Button
17388
+ * ---
17389
+ * Button allows the user to perform actions, such as sending a file, advancing a form, sharing a document, or making a comment.
17390
+ *
17391
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components/input/button) for more details.
17392
+ */
17393
+ type IconButtonProperties = Partial<IconButtonProps>;
17394
+
17395
+ declare class RaruiIconButton extends LitElement {
17396
+ size: IconButtonProperties["size"];
17397
+ variant: IconButtonProperties["variant"];
17398
+ appearance: IconButtonProperties["appearance"];
17399
+ disabled: IconButtonProperties["disabled"];
17400
+ rounded: IconButtonProperties["rounded"];
17401
+ static styles: CSSResult;
17402
+ render(): TemplateResult<1>;
17403
+ }
17404
+
17212
17405
  declare global {
17213
17406
  interface HTMLElementTagNameMap {
17214
17407
  "rarui-radio-button": RaruiRadioButton;