@me1a/ui 1.0.7 → 1.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@me1a/ui",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -11,7 +11,7 @@
11
11
  "scripts": {
12
12
  "format": "prettier --write --parser typescript '**/*.{ts,tsx}'",
13
13
  "lint": "eslint . --ext .ts,.tsx --ignore-path .gitignore --fix",
14
- "build": "tsc && vite build",
14
+ "build": "rollup -c",
15
15
  "storybook": "storybook dev -p 6006",
16
16
  "build-storybook": "storybook build"
17
17
  },
@@ -23,14 +23,16 @@
23
23
  "@mui/icons-material": "^6.1.5",
24
24
  "@mui/material": "^6.1.5",
25
25
  "highlight.js": "^11.8.0",
26
- "react": "^18.3.1",
27
- "react-dom": "^18.3.1",
28
26
  "react-hook-form": "^7.51.3",
29
27
  "react-quill": "^2.0.0",
30
28
  "storybook": "^8.0.9"
31
29
  },
32
30
  "devDependencies": {
33
31
  "@chromatic-com/storybook": "^1.3.3",
32
+ "@rollup/plugin-commonjs": "^28.0.1",
33
+ "@rollup/plugin-json": "^6.1.0",
34
+ "@rollup/plugin-node-resolve": "^15.3.0",
35
+ "@rollup/plugin-typescript": "^12.1.1",
34
36
  "@storybook/addon-essentials": "^8.0.9",
35
37
  "@storybook/addon-interactions": "^8.0.9",
36
38
  "@storybook/addon-links": "^8.0.9",
@@ -49,8 +51,16 @@
49
51
  "eslint-plugin-react-hooks": "^4.6.0",
50
52
  "eslint-plugin-storybook": "^0.8.0",
51
53
  "prettier": "^3.2.5",
54
+ "rollup": "^4.24.4",
55
+ "rollup-plugin-dts": "^6.1.1",
56
+ "rollup-plugin-postcss": "^4.0.2",
57
+ "rollup-plugin-strip": "^1.2.2",
52
58
  "typescript": "^5.4.5",
53
59
  "vite": "^5.2.10",
54
60
  "vite-plugin-dts": "^3.9.0"
61
+ },
62
+ "peerDependencies": {
63
+ "react": "18.3.1",
64
+ "react-dom": "18.3.1"
55
65
  }
56
66
  }
@@ -1,3 +0,0 @@
1
- import { EditorProps } from './types';
2
-
3
- export default function Editor({ id, error, simple, helperText, sx, ...other }: EditorProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './types';
2
- export { default as Editor } from './editor';
@@ -1,4 +0,0 @@
1
- export declare const StyledEditor: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<import('@mui/material').Theme> & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
3
- }, keyof import('@mui/system').BoxOwnProps<import('@mui/material').Theme>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
4
- export declare const StyledEditorToolbar: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,7 +0,0 @@
1
- export declare const formats: string[];
2
- type EditorToolbarProps = {
3
- id: string;
4
- isSimple?: boolean;
5
- };
6
- export default function Toolbar({ id, isSimple, ...other }: EditorToolbarProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,9 +0,0 @@
1
- import { ReactQuillProps } from 'react-quill';
2
- import { Theme, SxProps } from '@mui/material/styles';
3
-
4
- export interface EditorProps extends ReactQuillProps {
5
- error?: boolean;
6
- simple?: boolean;
7
- helperText?: React.ReactNode;
8
- sx?: SxProps<Theme>;
9
- }
@@ -1,9 +0,0 @@
1
- import { UseFormReturn } from 'react-hook-form';
2
-
3
- type Props = {
4
- children: React.ReactNode;
5
- methods: UseFormReturn;
6
- onSubmit?: VoidFunction;
7
- };
8
- export default function FormProvider({ children, onSubmit, methods }: Props): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- export * from './rhf-select';
2
- export * from './rhf-checkbox';
3
- export { default as RHFSwitch } from './rhf-switch';
4
- export { default as RHFEditor } from './rhf-editor';
5
- export { default as RHFSlider } from './rhf-slider';
6
- export { default as RHFTextField } from './rhf-text-field';
7
- export { default as RHFRadioGroup } from './rhf-radio-group';
8
- export { default as FormProvider } from './form-provider';
9
- export * from 'react-hook-form';
@@ -1,12 +0,0 @@
1
- import { AutocompleteProps } from '@mui/material/Autocomplete';
2
-
3
- interface Props<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined> extends AutocompleteProps<T, Multiple, DisableClearable, FreeSolo> {
4
- name: string;
5
- label?: string;
6
- placeholder?: string;
7
- helperText?: React.ReactNode;
8
- optionKey?: string;
9
- optionLabel?: string;
10
- }
11
- export default function RHFAutocomplete<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined>({ name, label, placeholder, optionKey, options, optionLabel, helperText, ...other }: Omit<Props<T, Multiple, DisableClearable, FreeSolo>, "renderInput">): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,20 +0,0 @@
1
- import { FormControlLabelProps } from '@mui/material/FormControlLabel';
2
-
3
- interface RHFCheckboxProps extends Omit<FormControlLabelProps, "control"> {
4
- name: string;
5
- helperText?: React.ReactNode;
6
- }
7
- export declare function RHFCheckbox({ name, helperText, ...other }: RHFCheckboxProps): import("react/jsx-runtime").JSX.Element;
8
- interface RHFMultiCheckboxProps extends Omit<FormControlLabelProps, "control" | "label"> {
9
- name: string;
10
- options: {
11
- label: string;
12
- value: number | string;
13
- }[];
14
- row?: boolean;
15
- label?: string;
16
- spacing?: number;
17
- helperText?: React.ReactNode;
18
- }
19
- export declare function RHFMultiCheckbox({ row, name, label, options, spacing, helperText, sx, ...other }: RHFMultiCheckboxProps): import("react/jsx-runtime").JSX.Element;
20
- export {};
@@ -1,8 +0,0 @@
1
- import { EditorProps } from '../editor';
2
-
3
- interface Props extends EditorProps {
4
- name: string;
5
- label?: string;
6
- }
7
- export default function RHFEditor({ name, label, helperText, ...other }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,14 +0,0 @@
1
- import { RadioGroupProps } from '@mui/material/RadioGroup';
2
-
3
- type Props = RadioGroupProps & {
4
- name: string;
5
- options: {
6
- label: string;
7
- value: any;
8
- }[];
9
- label?: string;
10
- spacing?: number;
11
- helperText?: React.ReactNode;
12
- };
13
- export default function RHFRadioGroup({ row, name, label, options, spacing, helperText, ...other }: Props): import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,12 +0,0 @@
1
- import { Theme, SxProps } from '@mui/material/styles';
2
- import { TextFieldProps } from '@mui/material/TextField';
3
-
4
- type RHFSelectProps = TextFieldProps & {
5
- name: string;
6
- native?: boolean;
7
- maxHeight?: boolean | number;
8
- children: React.ReactNode;
9
- PaperPropsSx?: SxProps<Theme>;
10
- };
11
- export declare function RHFSelect({ name, native, maxHeight, helperText, children, PaperPropsSx, ...other }: RHFSelectProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,8 +0,0 @@
1
- import { SliderProps } from '@mui/material/Slider';
2
-
3
- type Props = SliderProps & {
4
- name: string;
5
- helperText?: React.ReactNode;
6
- };
7
- export default function RHFSlider({ name, helperText, ...other }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { FormControlLabelProps } from '@mui/material/FormControlLabel';
2
-
3
- interface Props extends Omit<FormControlLabelProps, "control"> {
4
- name: string;
5
- helperText?: React.ReactNode;
6
- }
7
- export default function RHFSwitch({ name, helperText, ...other }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,7 +0,0 @@
1
- import { TextFieldProps } from '@mui/material/TextField';
2
-
3
- type Props = TextFieldProps & {
4
- name: string;
5
- };
6
- export default function RHFTextField({ name, helperText, type, ...other }: Props): import("react/jsx-runtime").JSX.Element;
7
- export {};
package/dist/style.css DELETED
@@ -1,7 +0,0 @@
1
- /*!
2
- Theme: Tomorrow Night
3
- Author: Chris Kempson (http://chriskempson.com)
4
- License: ~ MIT (or more permissive) [via base16-schemes-source]
5
- Maintainer: @highlightjs/core-team
6
- Version: 2021.09.0
7
- */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#ccc;background:#2d2d2d}.hljs::selection,.hljs ::selection{background-color:#515151;color:#ccc}.hljs-comment{color:#999}.hljs-tag{color:#b4b7b4}.hljs-subst,.hljs-punctuation,.hljs-operator{color:#ccc}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-variable,.hljs-template-variable,.hljs-selector-tag,.hljs-name,.hljs-deletion{color:#f2777a}.hljs-symbol,.hljs-number,.hljs-link,.hljs-attr,.hljs-variable.constant_,.hljs-literal{color:#f99157}.hljs-title,.hljs-class .hljs-title,.hljs-title.class_{color:#fc6}.hljs-strong{font-weight:700;color:#fc6}.hljs-code,.hljs-addition,.hljs-title.class_.inherited__,.hljs-string{color:#9c9}.hljs-built_in,.hljs-doctag,.hljs-quote,.hljs-keyword.hljs-atrule,.hljs-regexp{color:#6cc}.hljs-function .hljs-title,.hljs-attribute,.ruby .hljs-property,.hljs-title.function_,.hljs-section{color:#69c}.hljs-type,.hljs-template-tag,.diff .hljs-meta,.hljs-keyword{color:#c9c}.hljs-emphasis{color:#c9c;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#a3685a}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
@@ -1,6 +0,0 @@
1
-
2
- declare global {
3
- interface Window {
4
- hljs: any;
5
- }
6
- }