@up42/up-components 0.2.5 → 0.3.2
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/cjs/index.js +1 -1
- package/dist/cjs/types/components/Box/Box.stories.d.ts +2 -2
- package/dist/cjs/types/components/Button/Button.stories.d.ts +1 -0
- package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/cjs/types/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/cjs/types/components/EmptyState/EmptyState.d.ts +3 -3
- package/dist/cjs/types/components/EmptyState/EmptyState.stories.d.ts +3 -3
- package/dist/cjs/types/components/Form/Form.stories.d.ts +5 -0
- package/dist/cjs/types/components/FormCheckbox/FormCheckbox.d.ts +20 -8
- package/dist/cjs/types/components/FormCheckbox/FormCheckbox.stories.d.ts +3 -3
- package/dist/cjs/types/components/FormControl/FormControl.overrides.d.ts +3 -0
- package/dist/cjs/types/components/FormInput/FormInput.d.ts +14 -8
- package/dist/cjs/types/components/FormInput/FormInput.stories.d.ts +6 -3
- package/dist/cjs/types/components/FormLabel/FormLabel.d.ts +8 -0
- package/dist/cjs/types/components/FormLabel/FormLabel.test.d.ts +1 -0
- package/dist/cjs/types/components/FormRadio/FormRadio.d.ts +25 -9
- package/dist/cjs/types/components/FormRadio/FormRadio.stories.d.ts +4 -3
- package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +20 -8
- package/dist/cjs/types/components/FormSelect/FormSelect.stories.d.ts +4 -3
- package/dist/cjs/types/components/FormSwitch/FormSwitch.d.ts +15 -7
- package/dist/cjs/types/components/FormSwitch/FormSwitch.stories.d.ts +1 -1
- package/dist/cjs/types/components/Input/Input.d.ts +3 -6
- package/dist/cjs/types/components/Input/Input.overrides.d.ts +1 -0
- package/dist/cjs/types/components/PageHeader/PageHeader.d.ts +11 -0
- package/dist/cjs/types/components/PageHeader/PageHeader.stories.d.ts +9 -0
- package/dist/cjs/types/components/PageHeader/PageHeader.test.d.ts +1 -0
- package/dist/cjs/types/components/Radio/Radio.stories.d.ts +1 -1
- package/dist/cjs/types/components/Select/Select.stories.d.ts +3 -3
- package/dist/cjs/types/components/Switch/Switch.d.ts +2 -4
- package/dist/cjs/types/components/Switch/Switch.stories.d.ts +1 -2
- package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +1 -1
- package/dist/cjs/types/components/Typography/Typography.d.ts +3 -4
- package/dist/cjs/types/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/cjs/types/global/utils/types.d.ts +4 -6
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/components/Box/Box.stories.d.ts +2 -2
- package/dist/esm/types/components/Button/Button.stories.d.ts +1 -0
- package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/esm/types/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/esm/types/components/EmptyState/EmptyState.d.ts +3 -3
- package/dist/esm/types/components/EmptyState/EmptyState.stories.d.ts +3 -3
- package/dist/esm/types/components/Form/Form.stories.d.ts +5 -0
- package/dist/esm/types/components/FormCheckbox/FormCheckbox.d.ts +20 -8
- package/dist/esm/types/components/FormCheckbox/FormCheckbox.stories.d.ts +3 -3
- package/dist/esm/types/components/FormControl/FormControl.overrides.d.ts +3 -0
- package/dist/esm/types/components/FormInput/FormInput.d.ts +14 -8
- package/dist/esm/types/components/FormInput/FormInput.stories.d.ts +6 -3
- package/dist/esm/types/components/FormLabel/FormLabel.d.ts +8 -0
- package/dist/esm/types/components/FormLabel/FormLabel.test.d.ts +1 -0
- package/dist/esm/types/components/FormRadio/FormRadio.d.ts +25 -9
- package/dist/esm/types/components/FormRadio/FormRadio.stories.d.ts +4 -3
- package/dist/esm/types/components/FormSelect/FormSelect.d.ts +20 -8
- package/dist/esm/types/components/FormSelect/FormSelect.stories.d.ts +4 -3
- package/dist/esm/types/components/FormSwitch/FormSwitch.d.ts +15 -7
- package/dist/esm/types/components/FormSwitch/FormSwitch.stories.d.ts +1 -1
- package/dist/esm/types/components/Input/Input.d.ts +3 -6
- package/dist/esm/types/components/Input/Input.overrides.d.ts +1 -0
- package/dist/esm/types/components/PageHeader/PageHeader.d.ts +11 -0
- package/dist/esm/types/components/PageHeader/PageHeader.stories.d.ts +9 -0
- package/dist/esm/types/components/PageHeader/PageHeader.test.d.ts +1 -0
- package/dist/esm/types/components/Radio/Radio.stories.d.ts +1 -1
- package/dist/esm/types/components/Select/Select.stories.d.ts +3 -3
- package/dist/esm/types/components/Switch/Switch.d.ts +2 -4
- package/dist/esm/types/components/Switch/Switch.stories.d.ts +1 -2
- package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +1 -1
- package/dist/esm/types/components/Typography/Typography.d.ts +3 -4
- package/dist/esm/types/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/esm/types/global/utils/types.d.ts +4 -6
- package/dist/index.d.ts +101 -49
- package/package.json +1 -1
- package/dist/cjs/types/components/Select/Select.overrides.d.ts +0 -2
- package/dist/esm/types/components/Select/Select.overrides.d.ts +0 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type PageHeaderProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
divider?: boolean;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Documentation: https://up-components.up42.dev/?path=/story/patterns-pageheader
|
|
10
|
+
*/
|
|
11
|
+
export declare const PageHeader: ({ title, description, divider, action }: PageHeaderProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { PageHeaderProps } from './PageHeader';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: Story<PageHeaderProps>;
|
|
6
|
+
export declare const WithoutDivider: Story<PageHeaderProps>;
|
|
7
|
+
export declare const SimpleDescription: Story<PageHeaderProps>;
|
|
8
|
+
export declare const Actions: Story<PageHeaderProps>;
|
|
9
|
+
export declare const Complex: Story<PageHeaderProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Default: Story<Omit<import("@mui/material").RadioProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
4
|
+
export declare const Default: Story<Omit<import("@mui/material").RadioProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Default: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
5
|
-
export declare const Disabled: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
6
|
-
export declare const Error: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
4
|
+
export declare const Default: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
5
|
+
export declare const Disabled: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
6
|
+
export declare const Error: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { SwitchProps as MUISwitchProps } from '@mui/material';
|
|
3
3
|
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
|
-
export declare type SwitchProps = MUIGlobalOmit<MUISwitchProps
|
|
5
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
6
|
-
}>;
|
|
4
|
+
export declare type SwitchProps = MUIGlobalOmit<MUISwitchProps>;
|
|
7
5
|
export declare const Switch: (props: SwitchProps) => JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
|
-
import { SwitchProps } from './Switch';
|
|
3
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
3
|
export default _default;
|
|
5
|
-
export declare const Default: Story<SwitchProps
|
|
4
|
+
export declare const Default: Story<Omit<import("@mui/material").SwitchProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Default: Story<Omit<import("@mui/material").TabsProps<import("@library").ExtendButtonBase<import("@library").ButtonBaseTypeMap<{}, "button">>, {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
4
|
+
export declare const Default: Story<Omit<import("@mui/material").TabsProps<import("@library").ExtendButtonBase<import("@library").ButtonBaseTypeMap<{}, "button">>, {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
component?: React.ElementType;
|
|
3
|
+
export declare type TypographyProps<C extends React.ElementType = 'p'> = MUITypographyProps<C, {
|
|
4
|
+
component?: C;
|
|
6
5
|
}>;
|
|
7
|
-
export declare const Typography: ({ children, ...props }: TypographyProps) => JSX.Element;
|
|
6
|
+
export declare const Typography: <C extends React.ElementType<any>>({ children, ...props }: TypographyProps<C>) => JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { TypographyProps } from './Typography';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: Story<TypographyProps
|
|
5
|
+
export declare const Default: Story<TypographyProps<"p">>;
|
|
6
6
|
export declare const AllVariants: Story;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
+
import { BoxProps, TextFieldProps } from '@mui/material';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare type
|
|
4
|
-
export declare type
|
|
5
|
-
sx?: SxProps<Theme>;
|
|
6
|
-
ref?: React.Ref<unknown>;
|
|
7
|
-
};
|
|
3
|
+
export declare type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps & Omit<MuiProps, 'classes' | 'disableElevation' | 'disableFocusRipple' | 'disableRipple' | 'focusRipple' | 'tabIndex' | 'action' | 'centerRipple' | 'disableTouchRipple' | 'focusVisibleClassName' | 'LinkComponent' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
4
|
+
export declare type BaseProps<D extends React.ElementType = 'div', P = Record<string, unknown>> = BoxProps<D, P>;
|
|
5
|
+
export declare type FormBaseProps<C extends React.ElementType> = BaseProps<C, Pick<TextFieldProps, 'id' | 'label' | 'required' | 'error' | 'disabled' | 'focused' | 'helperText'>>;
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createTheme as e,CssBaseline as r,CircularProgress as t,Chip as o,Avatar as n,Container as i,Grid as a,Box as l,Checkbox as c,FormControl as d,FormLabel as s,FormGroup as m,FormControlLabel as f,FormHelperText as u,Radio as p,RadioGroup as g,Switch as h,Select as b,MenuItem as y,TextField as x,Link as v,SvgIcon as z,Tabs as E,Tab as k}from"@mui/material";export*from"@mui/material";import*as S from"react";import w,{useState as T}from"react";import{ThemeProvider as O,styled as C}from"@mui/material/styles";import M from"@mui/material/Button";import W from"@mui/material/Typography";import P from"@mui/material/InputAdornment";import L from"@mui/material/IconButton";import B from"@mui/icons-material/VisibilityOutlined";import F from"@mui/icons-material/VisibilityOffOutlined";import I from"@mui/icons-material/InfoOutlined";import H from"@mui/material/Table";import R from"@mui/material/TableBody";import j from"@mui/material/TableCell";import $ from"@mui/material/TableContainer";import A from"@mui/material/TableHead";import N from"@mui/material/TableRow";import q from"@mui/material/TablePagination";import V from"@mui/material/TableSortLabel";import D from"@mui/material/TableFooter";var X={animation:{speed:{normal:"0.5s",fast:"0.08s",slow:"1s"}},color:{background:{light:"#f4f5f7",dark:"#dfe1e6",indigo:"#262a59"},primary:"#262a59",secondary:"#d40fa9",info:"#262a59",error:"#e35656",success:"#aed581",indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315",border:{default:"#dfe1e6"},shadow:{default:"#121315"},text:{base:"#121315",light:"#9399a3",inverted:"#ffffff",link:{default:"#20b0c7",visited:"#1d8fa4"}}},font:{family:{heading:"'Roboto Condensed', sans-serif",text:"'Source Sans Pro', sans-serif",code:"'Source Code Pro', monospace"},lineHeight:{medium:"1rem",large:"1.5rem",xlarge:"2rem",xxlarge:"3rem"},weight:{normal:400,bold:700}},size:{border:{radius:{default:"6px",small:"4px"},width:"1px"},font:{base:"16px",heading:{default:"1.728rem",small:"1.44rem",xsmall:"1rem"},overline:{large:"1.44rem",default:"0.833rem"},body:{default:"1rem"},caption:{default:"0.833rem",large:"1.44rem"},label:{default:"0.833rem",large:"1.44rem"},minorThird10:"6.192rem",minorThird9:"5.16rem",minorThird8:"4.3rem",minorThird7:"3.583rem",minorThird6:"2.986rem",minorThird5:"2.488rem",minorThird4:"2.074rem",minorThird3:"1.728rem",minorThird2:"1.44rem",minorThird1:"1.2rem",minorThird0:"1rem",minorThirdSub1:"0.833rem",minorThirdSub2:"0.694rem",minorThirdSub3:"0.579rem",minorThirdSub4:"0.482rem",minorThirdSub5:"0.402rem",minorThirdSub6:"0.335rem"},spacingXS:"8px",spacingS:"16px",spacingM:"24px",spacingL:"32px",spacingXL:"40px",spacingXXL:"48px",spacing:{main:"24px",section:"32px",header:"24px",article:"24px",paragraph:"16px",line:"8px",scale1:"1px",scale2:"2px",scale4:"4px",scale6:"6px",scale8:"8px",scale16:"16px",scale24:"24px",scale32:"32px",scale40:"40px",scale48:"48px",scale56:"56px",scale64:"64px",scale72:"72px",scale80:"80px",scale88:"88px",scale96:"96px",scale104:"104px",scale112:"112px",scale120:"120px",scale128:"128px",scale160:"160px",scale208:"208px"}}},G=function(){return G=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},G.apply(this,arguments)};function U(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]])}return t}var _={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:X.font.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:X.size.spacing.scale8}},colorDefault:{backgroundColor:X.color.gray10,color:X.color.gray60},colorPrimary:{backgroundColor:X.color.indigo10,color:X.color.indigo80},colorSecondary:{backgroundColor:X.color.pink10,color:X.color.pink80},colorError:{backgroundColor:X.color.red10,color:X.color.error},colorInfo:{backgroundColor:X.color.indigo10,color:X.color.indigo80},colorSuccess:{backgroundColor:X.color.green10,color:X.color.green80}}},J={h1:{fontFamily:X.font.family.heading,fontSize:X.size.font.heading.default,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.xlarge},h2:{fontFamily:X.font.family.heading,fontSize:X.size.font.heading.small,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.xlarge},h3:{fontFamily:X.font.family.heading,fontSize:X.size.font.heading.xsmall,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.large},body1:{fontFamily:X.font.family.text,fontSize:X.size.font.body.default,fontWeight:X.font.weight.normal,lineHeight:X.font.lineHeight.large},body2:{fontFamily:X.font.family.text,fontSize:X.size.font.body.default,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.large},caption:{fontFamily:X.font.family.text,fontSize:X.size.font.caption.default,fontWeight:X.font.weight.normal,lineHeight:X.font.lineHeight.medium},overline:{fontFamily:X.font.family.heading,fontSize:X.size.font.overline.default,letterSpacing:"initial",fontWeight:X.font.weight.bold,color:X.color.gray60}},K={small:"".concat(X.size.spacing.scale4," ").concat(X.size.spacing.scale8),medium:"".concat(X.size.spacing.scale8," ").concat(X.size.spacing.scale16),large:"".concat(X.size.spacing.scale16," ").concat(X.size.spacing.scale32)},Q={styleOverrides:{root:{textTransform:"none",lineHeight:X.size.spacing.scale16,fontWeight:X.font.weight.bold,fontFamily:X.font.family.text},contained:{padding:K.medium},containedSizeSmall:{padding:K.small},containedSizeLarge:{padding:K.large},text:{padding:K.medium},textSizeSmall:{padding:K.small},textSizeLarge:{padding:K.large},outlined:{padding:"7px ".concat(X.size.spacing.scale16)},outlinedSizeSmall:{padding:K.small},outlinedSizeLarge:{padding:K.large},sizeSmall:{fontSize:X.size.font.label.default},sizeLarge:{fontSize:X.size.font.label.large},startIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}},endIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}}},defaultProps:{disableFocusRipple:!0},MuiIconButton:{root:{"&&:hover":{backgroundColor:"transparent"}}}},Y={styleOverrides:{root:{color:X.color.gray60,backgroundColor:X.color.background.dark},sizeSmall:{padding:"3px"}}},Z={styleOverrides:{root:{fontFamily:X.font.family.text,fontSize:X.size.font.label.default,fontWeight:X.font.weight.bold,width:X.size.spacing.scale24,height:X.size.spacing.scale24,"& .MuiSvgIcon-root":{width:X.size.spacing.scale16}},colorDefault:{backgroundColor:X.color.background.dark,"& .MuiSvgIcon-root":{color:X.color.gray60}}}},ee={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:X.color.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:X.color.primary},"&$disabled":{opacity:.5}}}},re={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:X.color.border.default,"& svg":{width:"16px",height:"16px"},"&:hover":{background:"none"}}}},te={styleOverrides:{root:{marginRight:16},colorSecondary:{color:X.color.gray0,"&$checked":{color:X.color.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:X.color.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:X.color.background.light,border:"2px solid ".concat(X.color.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:X.color.primary,border:"2px solid ".concat(X.color.primary)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},oe={styleOverrides:{outlined:{position:"relative",padding:X.size.spacing.scale8,fontSize:X.size.font.label.default,borderRadius:X.size.spacing.scale6,width:"100%","&.Mui-disabled":{backgroundColor:X.color.background.dark,color:X.color.text.light}}}},ne={styleOverrides:{root:{input:{padding:X.size.spacing.scale8,fontSize:X.size.font.label.default,height:X.size.spacing.scale16},"& .MuiInputAdornment-root":{button:{padding:"0 ".concat(X.size.spacing.scale8," 0 0"),backgroundColor:"transparent"},svg:{width:X.size.spacing.scale16,height:X.size.spacing.scale16}}}}},ie={styleOverrides:{outlined:{notchedOutline:{borderColor:X.color.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}},ae={styleOverrides:{root:{borderBottom:"1px solid ".concat(X.color.gray20)},indicator:{backgroundColor:X.color.primary}}},le={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(X.size.spacing.scale16),fontFamily:X.font.family.text,color:X.color.gray60,padding:"0 0 ".concat(X.size.spacing.scale16," 0"),"&:hover":{color:X.color.primary,opacity:1},"&$selected":{color:X.color.primary},"&:focus":{color:X.color.primary}}},defaultProps:{disableRipple:!0}},ce={styleOverrides:{root:{fontWeight:X.font.weight.normal}}},de={styleOverrides:{root:{fontWeight:X.font.weight.normal},head:{fontWeight:X.font.weight.bold}}},se={styleOverrides:{root:{borderTop:"1px solid ".concat(X.color.border.default)}}},me={styleOverrides:{root:{borderBottom:"none","& .MuiIconButton-root":{backgroundColor:"transparent"}},selectLabel:{fontWeight:X.font.weight.normal,fontSize:X.size.font.caption.default},displayedRows:{fontWeight:X.font.weight.normal,fontSize:X.size.font.caption.default}}};X.size.font.body.default,X.font.family.text,X.color.gray100,X.size.font.caption.default;var fe,ue,pe,ge,he={styleOverrides:{root:{fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.medium,fontFamily:X.font.family.text,fontSize:X.size.font.caption.default,color:X.color.text.base,marginBottom:X.size.spacing.scale8}}},be=e({typography:G({},J),palette:{background:{default:"#ffffff"},primary:{main:X.color.primary},secondary:{main:X.color.secondary},error:{main:X.color.error},info:{main:X.color.info},success:{main:X.color.success}},components:{MuiButton:Q,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:Y,MuiChip:_,MuiInput:ie,MuiTextField:ne,MuiFormLabel:he,MuiTabs:ae,MuiTab:le,MuiAvatar:Z,MuiCheckbox:ee,MuiRadio:re,MuiSwitch:te,MuiSelect:oe,MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiTable:ce,MuiTableCell:de,MuiTableRow:{styleOverrides:{root:{"&:last-child td":{borderBottom:0}}}},MuiTableFooter:se,MuiTablePagination:me,MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}},MuiFormControl:{styleOverrides:{root:{width:"100%"}}}}}),ye=function(e){return w.createElement(w.Fragment,null,w.createElement(r,null),w.createElement(O,{theme:be},e.children))},xe=C(t)(pe||(fe=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],ue=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],Object.defineProperty?Object.defineProperty(fe,"raw",{value:ue}):fe.raw=ue,pe=fe)),ve=function(e){var r=e.color,t=void 0===r?"primary":r,o=e.variant,n=void 0===o?"contained":o,i=e.size,a=void 0===i?"medium":i,l=e.loading,c=e.children,d=U(e,["color","variant","size","loading","children"]);return w.createElement(M,G({size:a,variant:n,color:t,disabled:l},d),w.createElement("span",{style:{opacity:l?0:1}},c),l&&w.createElement(xe,{size:20,color:"inherit"}))},ze=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(W,G({},t),r)},Ee=function(e){var r=e.label,t=U(e,["label"]);return w.createElement(o,G({size:"small",label:r},t))},ke=function(e){var r=e.icon,t=e.firstName,o=void 0===t?"":t,i=e.lastName,a=void 0===i?"":i,l=U(e,["icon","firstName","lastName"]),c="".concat(o.substring(0,1)).concat(a.substring(0,1)).toLocaleUpperCase(),d=c?X.color.secondary:X.color.background.dark;return w.createElement(n,G({sx:G({backgroundColor:d},l.sx)},l),c||r)},Se={small:6,medium:8,large:12,fluid:12},we=function(e){var r=e.component,t=void 0===r?"div":r,o=e.size,n=void 0===o?"large":o,l=e.children,c=U(e,["component","size","children"]),d="fluid"===n;return w.createElement(i,G({component:t,disableGutters:d,maxWidth:!d&&"lg",sx:G({display:"flex",justifyContent:"center"},c.sx)},c),w.createElement(a,{container:!0,justifyContent:"center"},w.createElement(a,{item:!0,md:Se[n]},l)))},Te=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(l,G({},t),r)},Oe=function(e){var r=U(e,[]);return w.createElement(c,G({},r))},Ce=function(e){var r=e.id,t=e.required,o=void 0===t||t,n=e.data,i=e.label,a=e.error,c=e.helperText;return w.createElement(d,null,w.createElement(s,{component:"label",error:a},i," ",o?"":w.createElement(l,{component:"span",sx:{fontWeight:X.font.weight.normal,color:X.color.text.light}},"(optional)")),w.createElement(m,null,n.map((function(e,t){var o=e.value,n=e.label;return w.createElement(f,{key:t,value:o,label:n||"",sx:{fontSize:X.size.font.base,color:X.color.text.base},control:w.createElement(Oe,{color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(t)}})})}))),a&&w.createElement(u,{sx:{marginLeft:0,marginRight:0},error:a},c))},Me=function(e){return w.createElement(p,G({},e))},We=function(e){var r=e.id,t=e.helperText,o=e.label,n=e.error,i=e.required,a=void 0===i||i,c=e.name,m=e.data;return w.createElement(d,{component:"fieldset",error:n},w.createElement(s,{component:"legend"},o," ",a?"":w.createElement(l,{component:"span",sx:{fontWeight:X.font.weight.normal,color:X.color.text.light}},"(optional)")),w.createElement(g,{"aria-label":c,name:c},m.map((function(e,t){var o=e.value,n=e.label;return w.createElement(f,{value:o,key:o,label:n||"",sx:{fontSize:X.size.font.base,color:X.color.text.base},control:w.createElement(Me,{color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(t)}})})}))),n&&w.createElement(u,{sx:{marginLeft:0,marginRight:0}},t))},Pe=function(e){return w.createElement(h,G({},e))},Le=function(e){var r=e.id,t=e.label,o=e.checked;return w.createElement(d,null,w.createElement(s,{component:"label"},t),w.createElement(f,{control:w.createElement(Pe,{id:r}),label:"".concat(o?"Active":"Inactive")}))},Be=function(e){return w.createElement(b,G({variant:"outlined"},e))},Fe=function(e){var r=e.id,t=e.required,o=void 0===t||t,n=e.options,i=e.label,a=e.error,c=e.placeholder,m=e.helperText,f=e.value;return w.createElement(d,null,w.createElement(s,{component:"label",error:a},i," ",o?"":w.createElement(l,{component:"span",sx:{fontWeight:X.font.weight.normal,color:X.color.text.light}},"(optional)")),w.createElement(Be,{id:r,placeholder:c,error:a,value:f},n.map((function(e){return w.createElement(y,{key:e.value,value:e.value},e.text)}))),a&&w.createElement(u,{sx:{marginLeft:0,marginRight:0},error:a},m))},Ie=function(e){var r=e.type,t=U(e,["type"]),o=T(!1),n=o[0],i=o[1],a=G(G({},t.InputProps),"password"===r&&{endAdornment:w.createElement(P,{position:"end"},w.createElement(L,{"aria-label":"toggle password visibility",onClick:function(){return i(!n)},edge:"end"},n?w.createElement(B,null):w.createElement(F,null)))});return w.createElement(x,G({},t,{type:n?"text":r,InputProps:a}))},He=function(e){var r=e.id,t=e.required,o=void 0===t||t,n=e.label,i=e.error,a=e.helperText,c=U(e,["id","required","label","error","helperText"]);return w.createElement(d,null,w.createElement(s,{component:"label",error:i},n," ",!o&&w.createElement(l,{component:"span",sx:{fontWeight:X.font.weight.normal,color:X.color.text.light}},"(optional)")),w.createElement(Ie,G({},c,{id:r,error:i,inputProps:{"data-testid":r}})),i&&w.createElement(u,{sx:{marginLeft:0,marginRight:0},error:i},a))};function Re(){return Re=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Re.apply(this,arguments)}var je=function(e){return S.createElement("svg",Re({viewBox:"0 0 24 24"},e),ge||(ge=S.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12.141 4.894H3.576A1.977 1.977 0 0 0 1.6 6.871v14.494c0 1.09.885 1.976 1.976 1.976h14.495a1.977 1.977 0 0 0 1.976-1.976V12.8M17.412 1.6h4.94a.99.99 0 0 1 .99.988V7.53m-10.883 4.952L23.05 1.89"})))},$e=function(e){var r,t=e.children,o=e.underline,n=void 0===o?"hover":o,i=e.toParentNavigation,a=U(e,["children","underline","toParentNavigation"]),l=null===(r=a.href)||void 0===r?void 0:r.startsWith("https"),c={underline:n};return i?w.createElement(v,G({},c,a,{onClick:function(){return e=i,void window.parent.postMessage({type:"NAVIGATION",content:e},"*");var e}}),t):w.createElement(v,G({},c,l&&{target:"_blank",rel:"noopener noreferrer"},a),t,l&&w.createElement(z,{component:je,fontSize:"inherit",sx:{marginLeft:".25em"}}))},Ae=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(E,G({},t),r)},Ne=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(k,G({},t),r)},qe=function(e){var r=e.children,t=e.value,o=void 0===t?0:t,n=e.index,i=e.id;return w.createElement(Te,{role:"tabpanel",hidden:o!==n,id:i},r)},Ve=function(e){var r=e.tabs,t=e.nameSpace,o=e.tabContentProps,n=e.tabsProps,i=T(0),a=i[0],l=i[1],c=t?"".concat(t,"-"):"";return w.createElement(w.Fragment,null,w.createElement(Ae,G({},n,{value:a,onChange:function(e,r){l(r)}}),r.map((function(e,r){return w.createElement(Ne,{key:"".concat(c,"tab-").concat(r),label:e.label,"aria-controls":"".concat(c,"panel-").concat(r)})}))),w.createElement(Te,G({},o),r.map((function(e,r){var t="".concat(c,"panel-").concat(r);return w.createElement(qe,{key:t,value:a,index:r,id:t,"aria-labelledby":"".concat(c,"tab-").concat(r)},e.content)}))))},De=function(e){var r=e.icon,t=e.title,o=e.subTitle,n=e.action,i=U(e,["icon","title","subTitle","action"]);return w.createElement(l,G({p:4,display:"flex",flexDirection:"column",alignItems:"center"},i),w.createElement(z,{component:null!=r?r:I,sx:{marginBottom:X.size.spacing.scale24,fontSize:X.size.spacing.scale104,color:X.color.gray20}}),w.createElement(ze,{variant:"h1",component:"span",mb:2},t),w.createElement(ze,{variant:"body1",color:X.color.gray60,mb:3},o),n)},Xe=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(H,G({},t),r)},Ge=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(R,G({},t),r)},Ue=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(j,G({},t),r)},_e=function(e){var r=e.children,t=U(e,["children"]);return w.createElement($,G({},t),r)},Je=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(A,G({},t),r)},Ke=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(N,G({},t),r)},Qe=function(e){var r=U(e,[]);return w.createElement(q,G({},r))},Ye=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(V,G({},t),r)},Ze=function(e){var r=e.children,t=U(e,["children"]);return w.createElement(D,G({},t),r)};export{ke as Avatar,Te as Box,ve as Button,Oe as Checkbox,Ee as Chip,we as Container,De as EmptyState,Ce as FormCheckbox,He as FormInput,We as FormRadio,Fe as FormSelect,Le as FormSwitch,Ie as Input,$e as Link,Me as Radio,Be as Select,Pe as Switch,Ne as Tab,Ve as TabGroup,Xe as Table,Ge as TableBody,Ue as TableCell,_e as TableContainer,Ze as TableFooter,Je as TableHead,Qe as TablePagination,Ke as TableRow,Ye as TableSortLabel,Ae as Tabs,ze as Typography,ye as UpComponentsProvider,be as theme,X as tokens};
|
|
1
|
+
import{createTheme as e,CssBaseline as r,CircularProgress as o,Chip as t,Avatar as n,Container as i,Grid as a,Box as l,Checkbox as c,FormLabel as d,FormControl as s,FormGroup as m,FormControlLabel as f,FormHelperText as u,Radio as p,RadioGroup as g,Switch as h,Select as b,MenuItem as y,TextField as x,Link as v,SvgIcon as E,Tabs as z,Tab as k}from"@mui/material";export*from"@mui/material";import*as w from"react";import T,{useState as S}from"react";import{ThemeProvider as C,styled as O}from"@mui/material/styles";import M from"@mui/material/Button";import F from"@mui/material/Typography";import P from"@mui/material/InputAdornment";import R from"@mui/material/IconButton";import W from"@mui/icons-material/VisibilityOutlined";import L from"@mui/icons-material/VisibilityOffOutlined";import B from"@mui/icons-material/InfoOutlined";import I from"@mui/material/Table";import H from"@mui/material/TableBody";import j from"@mui/material/TableCell";import q from"@mui/material/TableContainer";import $ from"@mui/material/TableHead";import A from"@mui/material/TableRow";import N from"@mui/material/TablePagination";import V from"@mui/material/TableSortLabel";import D from"@mui/material/TableFooter";var X={animation:{speed:{normal:"0.5s",fast:"0.08s",slow:"1s"}},color:{background:{light:"#f4f5f7",dark:"#dfe1e6",indigo:"#262a59"},primary:"#262a59",secondary:"#d40fa9",info:"#262a59",error:"#e35656",success:"#aed581",indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315",border:{default:"#dfe1e6"},shadow:{default:"#121315"},text:{base:"#121315",light:"#9399a3",inverted:"#ffffff",link:{default:"#20b0c7",visited:"#1d8fa4"}}},font:{family:{heading:"'Roboto Condensed', sans-serif",text:"'Source Sans Pro', sans-serif",code:"'Source Code Pro', monospace"},lineHeight:{medium:"1rem",large:"1.5rem",xlarge:"2rem",xxlarge:"3rem"},weight:{normal:400,bold:700}},size:{border:{radius:{default:"6px",small:"4px"},width:"1px"},font:{base:"16px",heading:{default:"1.728rem",small:"1.44rem",xsmall:"1rem"},overline:{large:"1.44rem",default:"0.833rem"},body:{default:"1rem"},caption:{default:"0.833rem",large:"1.44rem"},label:{default:"0.833rem",large:"1.44rem"},minorThird10:"6.192rem",minorThird9:"5.16rem",minorThird8:"4.3rem",minorThird7:"3.583rem",minorThird6:"2.986rem",minorThird5:"2.488rem",minorThird4:"2.074rem",minorThird3:"1.728rem",minorThird2:"1.44rem",minorThird1:"1.2rem",minorThird0:"1rem",minorThirdSub1:"0.833rem",minorThirdSub2:"0.694rem",minorThirdSub3:"0.579rem",minorThirdSub4:"0.482rem",minorThirdSub5:"0.402rem",minorThirdSub6:"0.335rem"},spacingXS:"8px",spacingS:"16px",spacingM:"24px",spacingL:"32px",spacingXL:"40px",spacingXXL:"48px",spacing:{main:"24px",section:"32px",header:"24px",article:"24px",paragraph:"16px",line:"8px",scale1:"1px",scale2:"2px",scale4:"4px",scale6:"6px",scale8:"8px",scale16:"16px",scale24:"24px",scale32:"32px",scale40:"40px",scale48:"48px",scale56:"56px",scale64:"64px",scale72:"72px",scale80:"80px",scale88:"88px",scale96:"96px",scale104:"104px",scale112:"112px",scale120:"120px",scale128:"128px",scale160:"160px",scale208:"208px"}}},G=function(){return G=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},G.apply(this,arguments)};function U(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(o[t[n]]=e[t[n]])}return o}var _={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:X.font.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:X.size.spacing.scale8}},colorDefault:{backgroundColor:X.color.gray10,color:X.color.gray60},colorPrimary:{backgroundColor:X.color.indigo10,color:X.color.indigo80},colorSecondary:{backgroundColor:X.color.pink10,color:X.color.pink80},colorError:{backgroundColor:X.color.red10,color:X.color.error},colorInfo:{backgroundColor:X.color.indigo10,color:X.color.indigo80},colorSuccess:{backgroundColor:X.color.green10,color:X.color.green80}}},J={h1:{fontFamily:X.font.family.heading,fontSize:X.size.font.heading.default,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.xlarge},h2:{fontFamily:X.font.family.heading,fontSize:X.size.font.heading.small,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.xlarge},h3:{fontFamily:X.font.family.heading,fontSize:X.size.font.heading.xsmall,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.large},body1:{fontFamily:X.font.family.text,fontSize:X.size.font.body.default,fontWeight:X.font.weight.normal,lineHeight:X.font.lineHeight.large},body2:{fontFamily:X.font.family.text,fontSize:X.size.font.body.default,fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.large},caption:{fontFamily:X.font.family.text,fontSize:X.size.font.caption.default,fontWeight:X.font.weight.normal,lineHeight:X.font.lineHeight.medium},overline:{fontFamily:X.font.family.heading,fontSize:X.size.font.overline.default,letterSpacing:"initial",fontWeight:X.font.weight.bold,color:X.color.gray60}},K={small:"".concat(X.size.spacing.scale4," ").concat(X.size.spacing.scale8),medium:"".concat(X.size.spacing.scale8," ").concat(X.size.spacing.scale16),large:"".concat(X.size.spacing.scale16," ").concat(X.size.spacing.scale32)},Q={styleOverrides:{root:{textTransform:"none",lineHeight:X.size.spacing.scale16,fontWeight:X.font.weight.bold,fontFamily:X.font.family.text},contained:{padding:K.medium,color:X.color.gray0},containedSuccess:{backgroundColor:X.color.green60},containedSizeSmall:{padding:K.small},containedSizeLarge:{padding:K.large},text:{padding:K.medium},textSizeSmall:{padding:K.small},textSizeLarge:{padding:K.large},outlined:{padding:"7px ".concat(X.size.spacing.scale16)},outlinedSizeSmall:{padding:K.small},outlinedSizeLarge:{padding:K.large},sizeSmall:{fontSize:X.size.font.label.default},sizeLarge:{fontSize:X.size.font.label.large},startIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}},endIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}}},defaultProps:{disableFocusRipple:!0},MuiIconButton:{root:{"&&:hover":{backgroundColor:"transparent"}}}},Y={styleOverrides:{root:{color:X.color.gray60,backgroundColor:X.color.background.dark},sizeSmall:{padding:"3px"}}},Z={styleOverrides:{root:{fontFamily:X.font.family.text,fontSize:X.size.font.label.default,fontWeight:X.font.weight.bold,width:X.size.spacing.scale24,height:X.size.spacing.scale24,"& .MuiSvgIcon-root":{width:X.size.spacing.scale16}},colorDefault:{backgroundColor:X.color.background.dark,"& .MuiSvgIcon-root":{color:X.color.gray60}}}},ee={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:X.color.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:X.color.primary},"&$disabled":{opacity:.5}}}},re={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:X.color.border.default,"& svg":{width:"16px",height:"16px"},"&:hover":{background:"none"}}}},oe={styleOverrides:{root:{marginRight:16},colorSecondary:{color:X.color.gray0,"&$checked":{color:X.color.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:X.color.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:X.color.background.light,border:"2px solid ".concat(X.color.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:X.color.primary,border:"2px solid ".concat(X.color.primary)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},te={styleOverrides:{root:{"& .MuiInputAdornment-root":{button:{padding:"0 ".concat(X.size.spacing.scale8," 0 0"),backgroundColor:"transparent"},svg:{width:X.size.spacing.scale16,height:X.size.spacing.scale16}}}}},ne={styleOverrides:{input:{"&.Mui-disabled":{backgroundColor:X.color.background.dark,color:X.color.text.light}}},defaultProps:{size:"small"}},ie={styleOverrides:{outlined:{notchedOutline:{borderColor:X.color.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}},ae={styleOverrides:{root:{width:"100%","& .MuiFormHelperText-root":{marginTop:X.size.spacing.scale8,marginLeft:0}}}},le={styleOverrides:{root:{fontSize:X.size.font.base,color:X.color.text.base}}},ce={styleOverrides:{root:{borderBottom:"1px solid ".concat(X.color.gray20)},indicator:{backgroundColor:X.color.primary}}},de={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(X.size.spacing.scale16),fontFamily:X.font.family.text,color:X.color.gray60,padding:"0 0 ".concat(X.size.spacing.scale16," 0"),"&:hover":{color:X.color.primary,opacity:1},"&$selected":{color:X.color.primary},"&:focus":{color:X.color.primary}}},defaultProps:{disableRipple:!0}},se={styleOverrides:{root:{fontWeight:X.font.weight.normal}}},me={styleOverrides:{root:{fontWeight:X.font.weight.normal},head:{fontWeight:X.font.weight.bold}}},fe={styleOverrides:{root:{borderTop:"1px solid ".concat(X.color.border.default)}}},ue={styleOverrides:{root:{borderBottom:"none","& .MuiIconButton-root":{backgroundColor:"transparent"}},selectLabel:{fontWeight:X.font.weight.normal,fontSize:X.size.font.caption.default},displayedRows:{fontWeight:X.font.weight.normal,fontSize:X.size.font.caption.default}}};X.size.font.body.default,X.font.family.text,X.color.gray100,X.size.font.caption.default;var pe,ge,he,be,ye={styleOverrides:{root:{fontWeight:X.font.weight.bold,lineHeight:X.font.lineHeight.medium,fontFamily:X.font.family.text,fontSize:X.size.font.caption.default,color:X.color.text.base,marginBottom:X.size.spacing.scale8}}},xe=e({typography:G({},J),palette:{background:{default:"#ffffff"},primary:{main:X.color.primary},secondary:{main:X.color.secondary},error:{main:X.color.error},info:{main:X.color.info},success:{main:X.color.success}},components:{MuiButton:Q,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:Y,MuiChip:_,MuiInput:ie,MuiInputBase:ne,MuiFormControl:ae,MuiFormControlLabel:le,MuiTextField:te,MuiFormLabel:ye,MuiTabs:ce,MuiTab:de,MuiAvatar:Z,MuiCheckbox:ee,MuiRadio:re,MuiSwitch:oe,MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiTable:se,MuiTableCell:me,MuiTableRow:{styleOverrides:{root:{"&:last-child td":{borderBottom:0}}}},MuiTableFooter:fe,MuiTablePagination:ue,MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}}}}),ve=function(e){return T.createElement(T.Fragment,null,T.createElement(r,null),T.createElement(C,{theme:xe},e.children))},Ee=O(o)(he||(pe=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],ge=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],Object.defineProperty?Object.defineProperty(pe,"raw",{value:ge}):pe.raw=ge,he=pe)),ze=function(e){var r=e.color,o=void 0===r?"primary":r,t=e.variant,n=void 0===t?"contained":t,i=e.size,a=void 0===i?"medium":i,l=e.loading,c=e.children,d=U(e,["color","variant","size","loading","children"]);return T.createElement(M,G({size:a,variant:n,color:o,disabled:l},d),T.createElement("span",{style:{opacity:l?0:1}},c),l&&T.createElement(Ee,{size:20,color:"inherit"}))},ke=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(F,G({},o),r)},we=function(e){var r=e.label,o=U(e,["label"]);return T.createElement(t,G({size:"small",label:r},o))},Te=function(e){var r=e.icon,o=e.firstName,t=void 0===o?"":o,i=e.lastName,a=void 0===i?"":i,l=U(e,["icon","firstName","lastName"]),c="".concat(t.substring(0,1)).concat(a.substring(0,1)).toLocaleUpperCase(),d=c?X.color.secondary:X.color.background.dark;return T.createElement(n,G({sx:G({backgroundColor:d},l.sx)},l),c||r)},Se={small:6,medium:8,large:12,fluid:12},Ce=function(e){var r=e.component,o=void 0===r?"div":r,t=e.size,n=void 0===t?"large":t,l=e.children,c=U(e,["component","size","children"]),d="fluid"===n;return T.createElement(i,G({component:o,disableGutters:d,maxWidth:!d&&"lg",sx:G({display:"flex",justifyContent:"center"},c.sx)},c),T.createElement(a,{container:!0,justifyContent:"center"},T.createElement(a,{item:!0,md:Se[n]},l)))},Oe=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(l,G({},o),r)},Me=function(e){var r=U(e,[]);return T.createElement(c,G({},r))},Fe=function(e){var r=e.label,o=e.htmlFor,t=e.required,n=void 0===t||t;return T.createElement(d,{component:"label",htmlFor:o},r,!n&&T.createElement(l,{ml:1,component:"span",sx:{fontWeight:X.font.weight.normal,color:X.color.text.light}},"(optional)"))},Pe=function(e){var r=e.id,o=e.label,t=e.required,n=e.component,i=void 0===n?"div":n,a=e.disabled,l=e.data,c=e.error,d=e.helperText,p=e.sx,g=U(e,["id","label","required","component","disabled","data","error","helperText","sx"]);return T.createElement(s,{component:i,error:c,disabled:a,sx:p},T.createElement(Fe,{label:o,required:t,htmlFor:r}),T.createElement(m,null,l.map((function(e,o){var t=e.value,n=e.label;return T.createElement(f,{key:o,value:t,label:n||"",control:T.createElement(Me,G({color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(o)}},g))})}))),c&&T.createElement(u,{error:c},d))},Re=T.forwardRef((function(e,r){return T.createElement(Pe,G({inputRef:r},e))})),We=function(e){return T.createElement(p,G({},e))},Le=function(e){var r=e.id,o=e.required,t=e.component,n=void 0===t?"div":t,i=e.disabled,a=e.data,l=e.label,c=e.error,d=e.sx,m=e.helperText,p=e.inputRef,h=U(e,["id","required","component","disabled","data","label","error","sx","helperText","inputRef"]);return T.createElement(s,{component:n,error:c,disabled:i,sx:d},T.createElement(Fe,{label:l,required:o,htmlFor:r}),T.createElement(g,G({},h),a.map((function(e,o){var t=e.value,n=e.label,i=e.message;return T.createElement(T.Fragment,null,T.createElement(f,{value:t,key:t,label:n||"",control:T.createElement(We,{color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(o)},inputRef:p})}),i&&T.createElement(ke,{variant:"caption",marginLeft:X.size.spacing.scale24,color:X.color.text.light,mb:1},i))}))),c&&m&&T.createElement(u,{error:c},m))},Be=T.forwardRef((function(e,r){return T.createElement(Le,G({inputRef:r},e))})),Ie=function(e){return T.createElement(h,G({},e))},He=function(e){var r=e.component,o=void 0===r?"div":r,t=e.disabled,n=e.label,i=e.error,a=e.sx,l=U(e,["component","disabled","label","error","sx"]);return T.createElement(s,{component:o,error:i,disabled:t,sx:G({mb:2},a)},T.createElement(d,{component:"label"},n),T.createElement(Ie,G({},l)))},je=T.forwardRef((function(e,r){return T.createElement(He,G({inputRef:r},e))})),qe=function(e){return T.createElement(b,G({variant:"outlined"},e))},$e=function(e){var r=e.id,o=e.required,t=e.component,n=void 0===t?"div":t,i=e.disabled,a=e.label,l=e.error,c=e.helperText,d=e.sx,m=e.options,f=U(e,["id","required","component","disabled","label","error","helperText","sx","options"]);return T.createElement(s,{component:n,error:l,disabled:i,sx:d},T.createElement(Fe,{label:a,required:o,htmlFor:r}),T.createElement(qe,G({},f,{error:l,inputProps:{id:r,"data-testid":r}}),m.map((function(e){return T.createElement(y,{key:e.value,value:e.value},e.text)}))),l&&c&&T.createElement(u,{error:l},c))},Ae=T.forwardRef((function(e,r){return T.createElement($e,G({inputRef:r},e))})),Ne=function(e){var r=e.type,o=U(e,["type"]),t=S(!1),n=t[0],i=t[1],a=G(G({},o.InputProps),"password"===r&&{endAdornment:T.createElement(P,{position:"end"},T.createElement(R,{"aria-label":"toggle password visibility",onClick:function(){return i(!n)},edge:"end"},n?T.createElement(W,null):T.createElement(L,null)))});return T.createElement(x,G({},o,{type:n?"text":r,InputProps:a}))},Ve=function(e){var r=e.id,o=e.component,t=void 0===o?"div":o,n=e.required,i=e.disabled,a=e.label,l=e.error,c=e.helperText,d=e.sx,m=U(e,["id","component","required","disabled","label","error","helperText","sx"]);return T.createElement(s,{component:t,error:l,disabled:i,sx:d},T.createElement(Fe,{label:a,required:n,htmlFor:r}),T.createElement(Ne,G({},m,{id:r,error:l,inputProps:{"data-testid":r},disabled:i,helperText:c})))},De=T.forwardRef((function(e,r){return T.createElement(Ve,G({inputRef:r},e))}));function Xe(){return Xe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},Xe.apply(this,arguments)}var Ge=function(e){return w.createElement("svg",Xe({viewBox:"0 0 24 24"},e),be||(be=w.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12.141 4.894H3.576A1.977 1.977 0 0 0 1.6 6.871v14.494c0 1.09.885 1.976 1.976 1.976h14.495a1.977 1.977 0 0 0 1.976-1.976V12.8M17.412 1.6h4.94a.99.99 0 0 1 .99.988V7.53m-10.883 4.952L23.05 1.89"})))},Ue=function(e){var r,o=e.children,t=e.underline,n=void 0===t?"hover":t,i=e.toParentNavigation,a=U(e,["children","underline","toParentNavigation"]),l=null===(r=a.href)||void 0===r?void 0:r.startsWith("https"),c={underline:n};return i?T.createElement(v,G({},c,a,{onClick:function(){return e=i,void window.parent.postMessage({type:"NAVIGATION",content:e},"*");var e}}),o):T.createElement(v,G({},c,l&&{target:"_blank",rel:"noopener noreferrer"},a),o,l&&T.createElement(E,{component:Ge,fontSize:"inherit",sx:{marginLeft:".25em"}}))},_e=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(z,G({},o),r)},Je=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(k,G({},o),r)},Ke=function(e){var r=e.children,o=e.value,t=void 0===o?0:o,n=e.index,i=e.id;return T.createElement(Oe,{role:"tabpanel",hidden:t!==n,id:i},r)},Qe=function(e){var r=e.tabs,o=e.nameSpace,t=e.tabContentProps,n=e.tabsProps,i=S(0),a=i[0],l=i[1],c=o?"".concat(o,"-"):"";return T.createElement(T.Fragment,null,T.createElement(_e,G({},n,{value:a,onChange:function(e,r){l(r)}}),r.map((function(e,r){return T.createElement(Je,{key:"".concat(c,"tab-").concat(r),label:e.label,"aria-controls":"".concat(c,"panel-").concat(r)})}))),T.createElement(Oe,G({},t),r.map((function(e,r){var o="".concat(c,"panel-").concat(r);return T.createElement(Ke,{key:o,value:a,index:r,id:o,"aria-labelledby":"".concat(c,"tab-").concat(r)},e.content)}))))},Ye=function(e){var r=e.icon,o=e.title,t=e.subTitle,n=e.action,i=U(e,["icon","title","subTitle","action"]);return T.createElement(l,G({p:4,display:"flex",flexDirection:"column",alignItems:"center"},i),T.createElement(E,{component:null!=r?r:B,sx:{marginBottom:X.size.spacing.scale24,fontSize:X.size.spacing.scale104,color:X.color.gray20}}),T.createElement(ke,{variant:"h1",component:"span",mb:2},o),T.createElement(ke,{variant:"body1",color:X.color.gray60,mb:3},t),n)},Ze=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(I,G({},o),r)},er=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(H,G({},o),r)},rr=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(j,G({},o),r)},or=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(q,G({},o),r)},tr=function(e){var r=e.children,o=U(e,["children"]);return T.createElement($,G({},o),r)},nr=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(A,G({},o),r)},ir=function(e){var r=U(e,[]);return T.createElement(N,G({},r))},ar=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(V,G({},o),r)},lr=function(e){var r=e.children,o=U(e,["children"]);return T.createElement(D,G({},o),r)};export{Te as Avatar,Oe as Box,ze as Button,Me as Checkbox,we as Chip,Ce as Container,Ye as EmptyState,Re as FormCheckbox,De as FormInput,Be as FormRadio,Ae as FormSelect,je as FormSwitch,Ne as Input,Ue as Link,We as Radio,qe as Select,Ie as Switch,Je as Tab,Qe as TabGroup,Ze as Table,er as TableBody,rr as TableCell,or as TableContainer,lr as TableFooter,tr as TableHead,ir as TablePagination,nr as TableRow,ar as TableSortLabel,_e as Tabs,ke as Typography,ve as UpComponentsProvider,xe as theme,X as tokens};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Default: Story<Omit<import("@mui/material").BoxProps<"div", {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
5
|
-
export declare const Padding: Story<Omit<import("@mui/material").BoxProps<"div", {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
4
|
+
export declare const Default: Story<Omit<import("@mui/material").BoxProps<"div", {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
5
|
+
export declare const Padding: Story<Omit<import("@mui/material").BoxProps<"div", {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Default: Story<Omit<import("@mui/material").CheckboxProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
4
|
+
export declare const Default: Story<Omit<import("@mui/material").CheckboxProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Default: Story<Omit<Omit<import("@mui/material").ChipProps<"div", {}>, "size">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
|
|
4
|
+
export declare const Default: Story<Omit<Omit<import("@mui/material").ChipProps<"div", {}>, "size">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef">>;
|
|
5
5
|
export declare const ColorVariants: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElementType, ReactNode } from 'react';
|
|
1
|
+
import React, { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { BaseProps } from '@global/utils/types';
|
|
3
|
-
export declare type EmptyStateProps = BaseProps<{
|
|
3
|
+
export declare type EmptyStateProps<C extends React.ElementType = 'div'> = BaseProps<C, {
|
|
4
4
|
/**
|
|
5
5
|
* Helpful message that conveys the purpose of the screen and the next action to populate the space
|
|
6
6
|
*/
|
|
@@ -18,4 +18,4 @@ export declare type EmptyStateProps = BaseProps<{
|
|
|
18
18
|
*/
|
|
19
19
|
action?: ReactNode;
|
|
20
20
|
}>;
|
|
21
|
-
export declare const EmptyState: ({ icon: Icon, title, subTitle, action, ...props }: EmptyStateProps
|
|
21
|
+
export declare const EmptyState: <C extends React.ElementType<any>>({ icon: Icon, title, subTitle, action, ...props }: EmptyStateProps<C>) => JSX.Element;
|
|
@@ -2,6 +2,6 @@ import { Story, Meta } from '@storybook/react';
|
|
|
2
2
|
import { EmptyStateProps } from './EmptyState';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: Story<EmptyStateProps
|
|
6
|
-
export declare const CustomIcon: Story<EmptyStateProps
|
|
7
|
-
export declare const WithAction: Story<EmptyStateProps
|
|
5
|
+
export declare const Default: Story<EmptyStateProps<"div">>;
|
|
6
|
+
export declare const CustomIcon: Story<EmptyStateProps<"div">>;
|
|
7
|
+
export declare const WithAction: Story<EmptyStateProps<"div">>;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormBaseProps } from '@global/utils/types';
|
|
3
3
|
import { CheckboxProps } from '../Checkbox/Checkbox';
|
|
4
|
-
export declare type FormCheckboxProps =
|
|
4
|
+
export declare type FormCheckboxProps<C extends React.ElementType = 'div'> = CheckboxProps & FormBaseProps<C> & {
|
|
5
5
|
data: {
|
|
6
6
|
value: string | number;
|
|
7
7
|
label?: string;
|
|
8
8
|
}[];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const FormCheckbox: (
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Documentation: https://up-components.up42.dev/?path=/story/patterns-form
|
|
12
|
+
*/
|
|
13
|
+
export declare const FormCheckbox: React.ForwardRefExoticComponent<Pick<Omit<import("@mui/material").CheckboxProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef"> & Pick<import("@mui/material").TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
component?: React.ElementType<any> | undefined;
|
|
16
|
+
ref?: React.Ref<unknown> | undefined;
|
|
17
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
18
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
19
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
20
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText"> & {
|
|
21
|
+
data: {
|
|
22
|
+
value: string | number;
|
|
23
|
+
label?: string;
|
|
24
|
+
}[];
|
|
25
|
+
}, "translate" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "data" | "form" | "label" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "disabled" | "onFocusVisible" | "sx" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText" | "inputProps" | "inputRef" | "checked" | "readOnly" | "icon" | "checkedIcon" | "edge" | "indeterminate" | "indeterminateIcon"> & React.RefAttributes<unknown>>;
|
|
@@ -3,6 +3,6 @@ import { Meta, Story } from '@storybook/react';
|
|
|
3
3
|
import { FormCheckboxProps } from './FormCheckbox';
|
|
4
4
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const Primary: Story<React.PropsWithChildren<FormCheckboxProps
|
|
7
|
-
export declare const Required: Story<React.PropsWithChildren<FormCheckboxProps
|
|
8
|
-
export declare const withError: Story<React.PropsWithChildren<FormCheckboxProps
|
|
6
|
+
export declare const Primary: Story<React.PropsWithChildren<FormCheckboxProps<"div">>>;
|
|
7
|
+
export declare const Required: Story<React.PropsWithChildren<FormCheckboxProps<"div">>>;
|
|
8
|
+
export declare const withError: Story<React.PropsWithChildren<FormCheckboxProps<"div">>>;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormBaseProps } from '@global/utils/types';
|
|
3
3
|
import { InputProps } from '../Input/Input';
|
|
4
|
-
export declare type FormInputProps =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export declare type FormInputProps<C extends React.ElementType = 'div'> = InputProps & FormBaseProps<C>;
|
|
5
|
+
/**
|
|
6
|
+
* Documentation: https://up-components.up42.dev/?path=/story/patterns-form
|
|
7
|
+
*/
|
|
8
|
+
export declare const FormInput: React.ForwardRefExoticComponent<Pick<InputProps & Pick<import("@mui/material").TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
component?: React.ElementType<any> | undefined;
|
|
11
|
+
ref?: React.Ref<unknown> | undefined;
|
|
12
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
13
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
14
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText">, "translate" | "fullWidth" | keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "slot" | "select" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "disabled" | "sx" | "key" | "autoFocus" | "name" | "type" | "value" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText" | "hiddenLabel" | "InputProps" | "autoComplete" | "FormHelperTextProps" | "InputLabelProps" | "inputProps" | "inputRef" | "SelectProps"> & React.RefAttributes<unknown>>;
|
|
@@ -2,6 +2,9 @@ import { Meta, Story } from '@storybook/react';
|
|
|
2
2
|
import { FormInputProps } from './FormInput';
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Primary: Story<FormInputProps
|
|
6
|
-
export declare const Required: Story<FormInputProps
|
|
7
|
-
export declare const
|
|
5
|
+
export declare const Primary: Story<FormInputProps<"div">>;
|
|
6
|
+
export declare const Required: Story<FormInputProps<"div">>;
|
|
7
|
+
export declare const Disabled: Story<FormInputProps<"div">>;
|
|
8
|
+
export declare const withError: Story<FormInputProps<"div">>;
|
|
9
|
+
export declare const Password: Story<FormInputProps<"div">>;
|
|
10
|
+
export declare const withComponents: Story<FormInputProps<"div">>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextFieldProps, FormLabelBaseProps } from '@mui/material';
|
|
3
|
+
export declare type FormLabelProps = {
|
|
4
|
+
label: TextFieldProps['label'];
|
|
5
|
+
required?: TextFieldProps['required'];
|
|
6
|
+
htmlFor: FormLabelBaseProps['htmlFor'];
|
|
7
|
+
};
|
|
8
|
+
export declare const FormLabel: ({ label, htmlFor, required }: FormLabelProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RadioGroupProps } from '@mui/material';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { FormBaseProps } from '@global/utils/types';
|
|
4
|
+
import { RadioProps } from '../Radio/Radio';
|
|
5
|
+
export declare type FormRadioProps<C extends React.ElementType = 'div'> = RadioGroupProps & FormBaseProps<C> & {
|
|
6
|
+
inputRef?: RadioProps['inputRef'];
|
|
5
7
|
data: {
|
|
6
8
|
value: string | number;
|
|
7
9
|
label?: string;
|
|
10
|
+
message?: string;
|
|
8
11
|
}[];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Documentation: https://up-components.up42.dev/?path=/story/patterns-form
|
|
15
|
+
*/
|
|
16
|
+
export declare const FormRadio: React.ForwardRefExoticComponent<Pick<RadioGroupProps & Pick<import("@mui/material").TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
component?: React.ElementType<any> | undefined;
|
|
19
|
+
ref?: React.Ref<unknown> | undefined;
|
|
20
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
21
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
22
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
23
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText"> & {
|
|
24
|
+
inputRef?: RadioProps['inputRef'];
|
|
25
|
+
data: {
|
|
26
|
+
value: string | number;
|
|
27
|
+
label?: string;
|
|
28
|
+
message?: string;
|
|
29
|
+
}[];
|
|
30
|
+
}, "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "className" | "style" | "classes" | "data" | "label" | "p" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "disabled" | "sx" | "key" | "name" | "value" | "row" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY" | "component" | "required" | "error" | "focused" | "helperText" | "inputRef"> & React.RefAttributes<unknown>>;
|
|
@@ -3,6 +3,7 @@ import { Meta, Story } from '@storybook/react';
|
|
|
3
3
|
import { FormRadioProps } from './FormRadio';
|
|
4
4
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const Primary: Story<React.PropsWithChildren<FormRadioProps
|
|
7
|
-
export declare const Required: Story<React.PropsWithChildren<FormRadioProps
|
|
8
|
-
export declare const withError: Story<React.PropsWithChildren<FormRadioProps
|
|
6
|
+
export declare const Primary: Story<React.PropsWithChildren<FormRadioProps<"div">>>;
|
|
7
|
+
export declare const Required: Story<React.PropsWithChildren<FormRadioProps<"div">>>;
|
|
8
|
+
export declare const withError: Story<React.PropsWithChildren<FormRadioProps<"div">>>;
|
|
9
|
+
export declare const withMessage: Story<React.PropsWithChildren<FormRadioProps<"div">>>;
|