fone-design-system_v2 1.0.228 → 1.0.229
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/components/FieldShell/FieldShell.d.ts +9 -0
- package/dist/components/FieldShell/index.d.ts +3 -0
- package/dist/components/ShadowGenerator/ShadowGenerator.d.ts +14 -0
- package/dist/components/ShadowGenerator/index.d.ts +2 -0
- package/dist/components/Upload/FileUpload.d.ts +13 -0
- package/dist/components/Upload/FontPicker.d.ts +12 -0
- package/dist/components/Upload/FontUpload.d.ts +12 -0
- package/dist/components/Upload/FontUpload.types.d.ts +25 -0
- package/dist/components/Upload/FontUploadDialog.d.ts +11 -0
- package/dist/components/Upload/SvgUpload.d.ts +10 -0
- package/dist/components/Upload/index.d.ts +8 -0
- package/dist/components/Upload/sanitizeSvg.d.ts +1 -0
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +4 -0
- package/dist/components/VisuallyHiddenInput/index.d.ts +2 -0
- package/dist/fone-design-system.es.js +23924 -22514
- package/dist/fone-design-system.umd.js +211 -211
- package/dist/index.d.ts +3 -0
- package/dist/theme/foundations.d.ts +1 -1
- package/dist/theme/types/mui/theme.d.ts +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Box } from '../Box';
|
|
3
|
+
export interface FieldShellProps extends React.ComponentProps<typeof Box> {
|
|
4
|
+
fullWidth?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const FieldShell: ({ fullWidth, disabled, error, sx, children, ...rest }: FieldShellProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default FieldShell;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface ShadowGeneratorProps {
|
|
2
|
+
value?: string;
|
|
3
|
+
onChange?: ({ value, offsetX, offsetY, blur, spread, opacity, colorHex, }: {
|
|
4
|
+
value: string;
|
|
5
|
+
offsetX: number;
|
|
6
|
+
offsetY: number;
|
|
7
|
+
blur: number;
|
|
8
|
+
spread: number;
|
|
9
|
+
opacity: number;
|
|
10
|
+
colorHex: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ShadowGenerator: ({ value, onChange }: ShadowGeneratorProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default ShadowGenerator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button/Button';
|
|
2
|
+
export interface FileUploadProps extends Omit<ButtonProps, "onChange"> {
|
|
3
|
+
buttonChildren?: React.ReactNode;
|
|
4
|
+
accept?: "svg" | "png" | "jpg" | string;
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
8
|
+
onClear?: () => void;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
imgValue?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const FileUpload: ({ buttonChildren, accept, multiple, value, onChange, onClear: onClearProp, fullWidth, imgValue, ...buttonProps }: FileUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default FileUpload;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FontPickerOption } from './FontUpload.types';
|
|
2
|
+
interface FontPickerProps {
|
|
3
|
+
fullWidth?: boolean;
|
|
4
|
+
options: FontPickerOption[];
|
|
5
|
+
value: Array<string | number>;
|
|
6
|
+
onChange: (value: Array<string | number>) => void;
|
|
7
|
+
onAdd: () => void;
|
|
8
|
+
selectionMode?: "cascader" | "family-only" | "weight-only";
|
|
9
|
+
expandAllMenus?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const FontPicker: ({ fullWidth, options, value, onChange, onAdd, selectionMode, expandAllMenus, }: FontPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default FontPicker;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FontFamilyOption, FontUploadValue } from './FontUpload.types';
|
|
2
|
+
export interface FontUploadProps {
|
|
3
|
+
fullWidth?: boolean;
|
|
4
|
+
options: FontFamilyOption[];
|
|
5
|
+
value?: FontUploadValue;
|
|
6
|
+
defaultValue?: FontUploadValue;
|
|
7
|
+
onChange?: (value: FontUploadValue) => void;
|
|
8
|
+
selectionMode?: "cascader" | "family-only" | "weight-only";
|
|
9
|
+
expandAllMenus?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const FontUpload: ({ fullWidth, options: initialOptions, value, defaultValue, onChange, selectionMode, expandAllMenus, }: FontUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default FontUpload;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type FontFamilyOption = {
|
|
2
|
+
id: string;
|
|
3
|
+
family: string;
|
|
4
|
+
variants: string[];
|
|
5
|
+
};
|
|
6
|
+
export type FontPickerOption = {
|
|
7
|
+
value: string | number;
|
|
8
|
+
label: string;
|
|
9
|
+
children?: FontPickerOption[];
|
|
10
|
+
disableCheckbox?: boolean;
|
|
11
|
+
hideCheckbox?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type FontUploadValue = {
|
|
14
|
+
fontFamily: string[];
|
|
15
|
+
fontWeight?: string[];
|
|
16
|
+
};
|
|
17
|
+
export type DraftVariantRow = {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
export type UploadedFontVariant = {
|
|
22
|
+
name: string;
|
|
23
|
+
file: File;
|
|
24
|
+
};
|
|
25
|
+
export declare const normalizeId: (value: string) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UploadedFontVariant } from './FontUpload.types';
|
|
2
|
+
interface FontUploadDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSave: (value: {
|
|
6
|
+
family: string;
|
|
7
|
+
variants: UploadedFontVariant[];
|
|
8
|
+
}) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const FontUploadDialog: ({ open, onClose, onSave }: FontUploadDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default FontUploadDialog;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FileUploadProps } from './FileUpload';
|
|
3
|
+
export interface SvgUploadProps extends Omit<FileUploadProps, "accept" | "value" | "onChange"> {
|
|
4
|
+
accept?: never;
|
|
5
|
+
viewTypes?: Array<"filename" | "icon" | "preview">;
|
|
6
|
+
value?: string | File;
|
|
7
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
8
|
+
}
|
|
9
|
+
declare const SvgUpload: ({ value, viewTypes, buttonChildren, onChange, ...rest }: SvgUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default SvgUpload;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as FileUpload, FileUploadProps } from './FileUpload';
|
|
2
|
+
import { default as FontPicker } from './FontPicker';
|
|
3
|
+
import { default as FontUpload, FontUploadProps } from './FontUpload';
|
|
4
|
+
import { FontPickerOption, FontUploadValue } from './FontUpload.types';
|
|
5
|
+
import { default as SvgUpload, SvgUploadProps } from './SvgUpload';
|
|
6
|
+
export { FileUpload, FontPicker, FontUpload, SvgUpload };
|
|
7
|
+
export type { FileUploadProps, FontUploadProps, FontPickerOption, FontUploadValue, SvgUploadProps, };
|
|
8
|
+
export * from './sanitizeSvg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sanitizeSvg: (raw: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type VisuallyHiddenInputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
3
|
+
declare const VisuallyHiddenInput: React.ForwardRefExoticComponent<VisuallyHiddenInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export default VisuallyHiddenInput;
|