@rovula/ui 0.0.22 → 0.0.23

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.
@@ -1,12 +1,13 @@
1
1
  import React from "react";
2
- export type TextProps = {
2
+ export type TextProps<T extends React.ElementType> = {
3
3
  variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitile1" | "subtitile2" | "subtitile3" | "subtitile4" | "subtitile5" | "subtitile6" | "body1" | "body2" | "body3" | "body4" | "small1" | "small2" | "small3" | "small4" | "small5" | "label1" | "label2" | "buttonL" | "buttonMS";
4
4
  color?: "primary" | "secondary" | "success" | "tertiary" | "info" | "warning" | "error";
5
5
  children?: React.ReactNode;
6
6
  className?: string;
7
- tag?: keyof JSX.IntrinsicElements;
7
+ tag?: T;
8
8
  style?: React.CSSProperties;
9
9
  id?: string;
10
- };
11
- declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<keyof JSX.IntrinsicElements | undefined>>;
12
- export default Text;
10
+ } & React.ComponentProps<T>;
11
+ type TextComponent<T extends React.ElementType> = React.ForwardRefExoticComponent<TextProps<T> & React.RefAttributes<HTMLElement>>;
12
+ declare const ForwardedText: TextComponent<any>;
13
+ export default ForwardedText;
@@ -1,21 +1,13 @@
1
1
  import React from "react";
2
2
  declare const meta: {
3
3
  title: string;
4
- component: React.ForwardRefExoticComponent<import("./Text").TextProps & React.RefAttributes<keyof JSX.IntrinsicElements | undefined>>;
4
+ component: React.ForwardRefExoticComponent<any>;
5
5
  tags: string[];
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
9
9
  decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react").ReactRenderer, {
10
- variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitile1" | "subtitile2" | "subtitile3" | "subtitile4" | "subtitile5" | "subtitile6" | "body1" | "body2" | "body3" | "body4" | "small1" | "small2" | "small3" | "small4" | "small5" | "label1" | "label2" | "buttonL" | "buttonMS" | undefined;
11
- color?: "primary" | "secondary" | "tertiary" | "success" | "info" | "warning" | "error" | undefined;
12
- children?: React.ReactNode;
13
- className?: string | undefined;
14
- tag?: keyof JSX.IntrinsicElements | undefined;
15
- style?: React.CSSProperties | undefined;
16
- id?: string | undefined;
17
- ref?: React.LegacyRef<keyof JSX.IntrinsicElements | undefined> | undefined;
18
- key?: React.Key | null | undefined;
10
+ [x: string]: any;
19
11
  }>) => import("react/jsx-runtime").JSX.Element)[];
20
12
  };
21
13
  export default meta;
@@ -1,5 +1,5 @@
1
- "use client";
2
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ ("");
3
3
  import { useState, useRef, useEffect } from "react";
4
4
  import { cn } from "@/utils/cn";
5
5
  const Tabs = ({ tabs = [], initialTab = 0, tabBarSize = 38, enableBorderLine = true, tabMode = "start", className, tabBarClassName, tabButtonClassName, tabButtonActiveClassName, tabContentClassName, borderSliderClassname, }) => {
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import { cn } from "@/utils/cn";
3
14
  import { forwardRef } from "react";
@@ -16,7 +27,10 @@ const textVariants = cva(["text-foreground"], {
16
27
  },
17
28
  });
18
29
  // TODO font, fontBold, elipt
19
- const Text = forwardRef(({ variant = "body1", tag: Tag = "p", children, className = "", color, style, }) => {
20
- return (_jsx(Tag, { className: cn(`typography-${variant}`, textVariants({ color }), className), style: style, children: children }));
21
- });
22
- export default Text;
30
+ const Text = (_a, ref) => {
31
+ var { variant = "body1", tag: Tag = "p", children, className = "", color, style } = _a, props = __rest(_a, ["variant", "tag", "children", "className", "color", "style"]);
32
+ return (_jsx(Tag, Object.assign({ ref: ref, className: cn(`typography-${variant}`, textVariants({ color }), className), style: style }, props, { children: children })));
33
+ };
34
+ const ForwardedText = forwardRef(Text);
35
+ ForwardedText.displayName = "Text";
36
+ export default ForwardedText;
@@ -1855,6 +1855,21 @@ body {
1855
1855
  line-height: var(--small5-line-height, 12px);
1856
1856
  font-weight: var(--small5-weight, 500);
1857
1857
  }
1858
+ .text-small6{
1859
+ font-size: var(--small5-size, 10px);
1860
+ line-height: var(--small6-line-height, 12px);
1861
+ font-weight: var(--small6-weight, 600);
1862
+ }
1863
+ .text-small7{
1864
+ font-size: var(--small7-size, 8px);
1865
+ line-height: var(--small7-line-height, 10px);
1866
+ font-weight: var(--small7-weight, 600);
1867
+ }
1868
+ .text-small8{
1869
+ font-size: var(--small8-size, 8px);
1870
+ line-height: var(--small8-line-height, 10px);
1871
+ font-weight: var(--small8-weight, 700);
1872
+ }
1858
1873
  .text-subtitile1{
1859
1874
  font-size: var(--subtitle1-size, 16px);
1860
1875
  line-height: var(--subtitle1-line-height, 24px);
@@ -2369,6 +2384,21 @@ body {
2369
2384
  line-height: var(--small5-line-height, 12px);
2370
2385
  font-weight: var(--small5-weight, 500);
2371
2386
  }
2387
+ .typography-small6{
2388
+ font-size: var(--small5-size, 10px);
2389
+ line-height: var(--small6-line-height, 12px);
2390
+ font-weight: var(--small6-weight, 600);
2391
+ }
2392
+ .typography-small7{
2393
+ font-size: var(--small7-size, 8px);
2394
+ line-height: var(--small7-line-height, 10px);
2395
+ font-weight: var(--small7-weight, 600);
2396
+ }
2397
+ .typography-small8{
2398
+ font-size: var(--small8-size, 8px);
2399
+ line-height: var(--small8-line-height, 10px);
2400
+ font-weight: var(--small8-weight, 700);
2401
+ }
2372
2402
  .typography-label1{
2373
2403
  font-size: var(--label-label1-size, 12px);
2374
2404
  line-height: var(--label-label1-line-height, 12px);