fis-component 0.1.23 → 0.1.24

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,7 +1,12 @@
1
1
  import type { StoryObj } from "@storybook/react";
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import("react").ForwardRefExoticComponent<import(".").FISTextPropsI & import("react").RefAttributes<any>>;
4
+ component: {
5
+ <T extends React.ElementType = "p">(props: import(".").FISTextPropsI<T> & {
6
+ ref?: React.ComponentPropsWithRef<T>["ref"];
7
+ }): React.ReactElement | null;
8
+ displayName?: string;
9
+ };
5
10
  tags: string[];
6
11
  parameters: {
7
12
  controls: {
@@ -1,10 +1,18 @@
1
1
  import { ThemeType } from "../../styles/design-system";
2
2
  import React from "react";
3
- export interface FISTextPropsI extends React.HTMLAttributes<HTMLElement> {
4
- variant?: keyof ThemeType;
5
- tag?: keyof JSX.IntrinsicElements;
3
+ import { FISTextVariant } from "./styles";
4
+ export interface FISTextOwnPropsI<T extends React.ElementType = "p"> {
5
+ variant?: FISTextVariant;
6
+ tag?: T;
6
7
  color?: keyof ThemeType;
7
- as?: keyof JSX.IntrinsicElements;
8
+ as?: T;
8
9
  }
9
- declare const FISText: React.ForwardRefExoticComponent<FISTextPropsI & React.RefAttributes<any>>;
10
+ export type FISTextPropsI<T extends React.ElementType = "p"> = FISTextOwnPropsI<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof FISTextOwnPropsI<T>>;
11
+ type FISTextComponent = {
12
+ <T extends React.ElementType = "p">(props: FISTextPropsI<T> & {
13
+ ref?: React.ComponentPropsWithRef<T>["ref"];
14
+ }): React.ReactElement | null;
15
+ displayName?: string;
16
+ };
17
+ declare const FISText: FISTextComponent;
10
18
  export default FISText;
@@ -1,4 +1,6 @@
1
+ import { ThemeType } from "../../styles/design-system";
2
+ export type FISTextVariant = Extract<keyof ThemeType, `${"Emphasis" | "Title" | "Label" | "Subheading" | "Paragraph" | "Link"}/${string}` | "_Guide/Flow-Line/Label">;
1
3
  export declare const TextSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
2
- $variant?: string;
4
+ $variant?: FISTextVariant;
3
5
  $color?: string;
4
6
  }>> & string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ComponentPropsWithoutRef, ReactNode, Ref, ForwardedRef, CSSProperties, JSX as JSX$1, FC, DetailedHTMLProps, HTMLAttributes, ReactElement, ComponentType } from 'react';
2
+ import React__default, { ComponentPropsWithoutRef, ReactNode, Ref, ForwardedRef, CSSProperties, JSX, FC, DetailedHTMLProps, HTMLAttributes, ReactElement, ComponentType } from 'react';
3
3
  import { DefaultTheme } from 'styled-components';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { TooltipProps as TooltipProps$1, DropdownProps, MenuProps as MenuProps$1, CollapseProps, Table, TableProps as TableProps$1, PaginationProps as PaginationProps$1 } from 'antd';
@@ -3872,13 +3872,13 @@ interface InputFieldProps extends Omit<ComponentPropsWithoutRef<"input">, "onCli
3872
3872
  /**Control the style type of component: "prefix" | "dropdown" */
3873
3873
  typePrefix?: InputTypePrefix;
3874
3874
  /**Prefix for filter value*/
3875
- iconPrefix?: string | JSX$1.Element;
3875
+ iconPrefix?: string | JSX.Element;
3876
3876
  /**iconSuffix for filter value*/
3877
- iconSuffix?: string | JSX$1.Element;
3877
+ iconSuffix?: string | JSX.Element;
3878
3878
  /**labelSuffix for filter value*/
3879
- labelSuffix?: string | JSX$1.Element;
3879
+ labelSuffix?: string | JSX.Element;
3880
3880
  /**labelPrefix for filter value*/
3881
- labelPrefix?: string | JSX$1.Element;
3881
+ labelPrefix?: string | JSX.Element;
3882
3882
  /**negative for current field*/
3883
3883
  negative?: boolean;
3884
3884
  /**actived for current field*/
@@ -4504,9 +4504,9 @@ interface SelectFieldProps extends Omit<ComponentPropsWithoutRef<"input">, "onCl
4504
4504
  /**Control the size of the component*/
4505
4505
  size?: SelectSize;
4506
4506
  /**Prefix for filter value*/
4507
- iconPrefix?: string | JSX$1.Element;
4507
+ iconPrefix?: string | JSX.Element;
4508
4508
  /**iconSuffix for filter value*/
4509
- iconSuffix?: string | JSX$1.Element;
4509
+ iconSuffix?: string | JSX.Element;
4510
4510
  /**actived for current field*/
4511
4511
  actived?: boolean;
4512
4512
  /**active-dropdown for current field*/
@@ -4729,13 +4729,22 @@ interface PaginationProps extends PaginationProps$1 {
4729
4729
  }
4730
4730
  declare const FISPagination: React__default.FC<PaginationProps>;
4731
4731
 
4732
- interface FISTextPropsI extends React__default.HTMLAttributes<HTMLElement> {
4733
- variant?: keyof ThemeType$2;
4734
- tag?: keyof JSX.IntrinsicElements;
4732
+ type FISTextVariant = Extract<keyof ThemeType$2, `${"Emphasis" | "Title" | "Label" | "Subheading" | "Paragraph" | "Link"}/${string}` | "_Guide/Flow-Line/Label">;
4733
+
4734
+ interface FISTextOwnPropsI<T extends React__default.ElementType = "p"> {
4735
+ variant?: FISTextVariant;
4736
+ tag?: T;
4735
4737
  color?: keyof ThemeType$2;
4736
- as?: keyof JSX.IntrinsicElements;
4738
+ as?: T;
4737
4739
  }
4738
- declare const FISText: React__default.ForwardRefExoticComponent<FISTextPropsI & React__default.RefAttributes<any>>;
4740
+ type FISTextPropsI<T extends React__default.ElementType = "p"> = FISTextOwnPropsI<T> & Omit<React__default.ComponentPropsWithoutRef<T>, keyof FISTextOwnPropsI<T>>;
4741
+ type FISTextComponent = {
4742
+ <T extends React__default.ElementType = "p">(props: FISTextPropsI<T> & {
4743
+ ref?: React__default.ComponentPropsWithRef<T>["ref"];
4744
+ }): React__default.ReactElement | null;
4745
+ displayName?: string;
4746
+ };
4747
+ declare const FISText: FISTextComponent;
4739
4748
 
4740
4749
  export { FISAlertBanner, FISApiSelect, FISAvatar, FISBadge, FISBreadcrumb, FISButton, FISButtonGroup, FISCheckbox, FISCheckboxGroup, FISChipButton, FISCollapse, FISCombobox, FISDateRange, FISDivider, FISIconButton, FISInputArea, FISInputDate, FISInputField, FISInputLabel, FISInputStepper, FISInputText, FISInputTime, FISLinkButton, FISMenuItem, FISMenuSection, FISMenuSelect, FISMenuSelectDropdown, FISPagination, FISProgressCircular, FISProgressLinear, FISRadio, RadioGroup as FISRadioGroup, FISSegmented, FISSelect, FISSelectItem, FISSorter, FISSplitButton, FISSwitch, FISTab, FISTable, FISTableCell, FISTableHeaderCell, FISText, FISThemeProvider, FISToast, FISTooltip, SegmentedPanelItem, TabPanelItem, useNotification, useToast };
4741
4750
  export type { ApiSelectProps, ApiSelectRef, FISMenuData, FISMenuSelectDropdownProps, PaginationProps as FISPaginationProps, TableProps as FISTableProps, FISTableRef, FetchAll, FetchAllParams, FetchPage, FetchPageParams, FetchPageResult, ThemeType$2 as ThemeType };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "homepage": "https://vietdiemtran.github.io/fis-component/",
3
3
  "name": "fis-component",
4
- "version": "0.1.23",
4
+ "version": "0.1.24",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -109,4 +109,4 @@
109
109
  "lodash": "^4.17.23",
110
110
  "react-popper": "^2.3.0"
111
111
  }
112
- }
112
+ }