@rarui/components 1.2.0 → 1.4.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
@@ -12474,6 +12474,109 @@ type RuntimeFn<Variants extends VariantGroups> = ((options?: Resolve<VariantSele
12474
12474
  };
12475
12475
  type RecipeVariants<RecipeFn extends RuntimeFn<VariantGroups>> = Resolve<Parameters<RecipeFn>[0]>;
12476
12476
 
12477
+ interface Conditions<T> {
12478
+ xs?: T;
12479
+ md?: T;
12480
+ lg?: T;
12481
+ xl?: T;
12482
+ }
12483
+ type AddDollar<T extends string> = `$${T}`;
12484
+ declare const borderColorProperties: {
12485
+ transparent: string;
12486
+ brand: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12487
+ "brand-alt": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12488
+ disabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12489
+ divider: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12490
+ error: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12491
+ info: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12492
+ invert: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12493
+ "invert-disabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12494
+ primary: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12495
+ secondary: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12496
+ subdued: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12497
+ success: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12498
+ warning: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12499
+ };
12500
+
12501
+ declare const dividerBorderWidthProperties: {
12502
+ "1": string;
12503
+ "2": string;
12504
+ };
12505
+
12506
+ type DividerBorderStyle = "solid" | "dashed";
12507
+ interface DividerSprinkle {
12508
+ /**
12509
+ * The **`size`** CSS property sets an element's area.
12510
+ * @default 100%
12511
+ */
12512
+ size?: string | Conditions<string>;
12513
+ /**
12514
+ * The **`type`** shorthand CSS property sets the line style for all four sides of an element's.
12515
+ */
12516
+ type?: AddDollar<DividerBorderStyle> | Conditions<AddDollar<DividerBorderStyle>>;
12517
+ /**
12518
+ * The **`thickness`** shorthand CSS property sets the width of an element's.
12519
+ */
12520
+ thickness?: AddDollar<keyof typeof dividerBorderWidthProperties> | Conditions<AddDollar<keyof typeof dividerBorderWidthProperties>>;
12521
+ /**
12522
+ * The **`color`** CSS property sets an element's color.
12523
+ */
12524
+ color?: AddDollar<keyof typeof borderColorProperties> | Conditions<AddDollar<keyof typeof borderColorProperties>>;
12525
+ }
12526
+
12527
+ declare const avatarStyles: {
12528
+ container: string;
12529
+ avatar: RuntimeFn<{
12530
+ /**
12531
+ * Specifies the size of the Avatar component.
12532
+ * @default medium
12533
+ */
12534
+ size: {
12535
+ small: {
12536
+ width: "20px";
12537
+ height: "20px";
12538
+ fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12539
+ };
12540
+ medium: {
12541
+ width: "30px";
12542
+ height: "30px";
12543
+ fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12544
+ };
12545
+ large: {
12546
+ width: "40px";
12547
+ height: "40px";
12548
+ fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12549
+ borderWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12550
+ };
12551
+ xLarge: {
12552
+ width: "60px";
12553
+ height: "60px";
12554
+ fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12555
+ borderWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
12556
+ };
12557
+ };
12558
+ }>;
12559
+ badge: RuntimeFn<{
12560
+ size: {
12561
+ small: {
12562
+ left: "18px";
12563
+ };
12564
+ medium: {
12565
+ left: "24px";
12566
+ };
12567
+ large: {
12568
+ top: "-4px";
12569
+ left: "30px";
12570
+ };
12571
+ xLarge: {
12572
+ left: "44px";
12573
+ };
12574
+ };
12575
+ }>;
12576
+ };
12577
+
12578
+ type AvatarVariants = NonNullable<RecipeVariants<typeof avatarStyles.avatar>>;
12579
+
12477
12580
  declare const badgeStyles: {
12478
12581
  badge: RuntimeFn<{
12479
12582
  /**
@@ -12564,6 +12667,42 @@ type BadgeVariants = NonNullable<RecipeVariants<typeof badgeStyles.badge>>;
12564
12667
 
12565
12668
  type BadgeProps = BadgeVariants;
12566
12669
 
12670
+ interface AvatarTypings {
12671
+ /**
12672
+ * Renders a Badge component along with the Avatar. The badge prop accepts an object of type Badge, representing the Badge component.
12673
+ * @TJS-type Badge
12674
+ */
12675
+ badge?: BadgeProps;
12676
+ }
12677
+ type AvatarProps = AvatarTypings & AvatarVariants;
12678
+
12679
+ interface DividerProps extends DividerSprinkle {
12680
+ /**
12681
+ * The direction of the Divider.
12682
+ */
12683
+ direction?: "vertical" | "horizontal";
12684
+ }
12685
+
12686
+ declare global {
12687
+ interface HTMLElementTagNameMap {
12688
+ "rarui-avatar": RaruiAvatar;
12689
+ }
12690
+ }
12691
+ /**
12692
+ * ## Rarui Avatar
12693
+ * ---
12694
+ * The Avatar component is normally used to display circular photos of the user's profile.
12695
+ *
12696
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components/exhibition/avatar) for more details.
12697
+ */
12698
+ type AvatarProperties = Pick<AvatarProps, "size">;
12699
+
12700
+ declare class RaruiAvatar extends LitElement {
12701
+ size?: AvatarProperties["size"];
12702
+ static styles: CSSResult;
12703
+ render(): TemplateResult<1>;
12704
+ }
12705
+
12567
12706
  declare global {
12568
12707
  interface HTMLElementTagNameMap {
12569
12708
  "rarui-badge": RaruiBagde;
@@ -12576,7 +12715,7 @@ declare global {
12576
12715
  *
12577
12716
  * See [a complete document](https://rarui.rarolabs.com.br/docs/components/exhibition/badge) for more details.
12578
12717
  */
12579
- type BadgeProperties = BadgeProps;
12718
+ type BadgeProperties = Partial<BadgeProps>;
12580
12719
 
12581
12720
  declare class RaruiBagde extends LitElement {
12582
12721
  variant?: BadgeProperties["variant"];
@@ -12585,3 +12724,28 @@ declare class RaruiBagde extends LitElement {
12585
12724
  static styles: CSSResult;
12586
12725
  render(): TemplateResult<1>;
12587
12726
  }
12727
+
12728
+ declare global {
12729
+ interface HTMLElementTagNameMap {
12730
+ "rarui-divider": RaruiDivider;
12731
+ }
12732
+ }
12733
+ /**
12734
+ * ## Rarui Divider
12735
+ * ---
12736
+ * A Divider is a thin line used to separate or group content in lists and layouts.
12737
+ *
12738
+ * See [a complete document](https://rarui.rarolabs.com.br/docs/components/exhibition/divider) for more details.
12739
+ */
12740
+ type DividerProperties = Partial<DividerProps>;
12741
+
12742
+ declare class RaruiDivider extends LitElement {
12743
+ sprinkleAttrs: Record<string, string>;
12744
+ direction?: DividerProperties["direction"];
12745
+ type?: DividerProperties["type"];
12746
+ thickness?: DividerProperties["thickness"];
12747
+ color?: DividerProperties["color"];
12748
+ size?: DividerProperties["size"];
12749
+ static styles: CSSResult;
12750
+ render(): TemplateResult<1>;
12751
+ }