@arquimedes.co/eureka-forms 3.0.44-test → 3.0.45-mui9

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.
Files changed (52) hide show
  1. package/dist/@Types/FormStep.d.ts +4 -2
  2. package/dist/@Types/GenericFormSteps.d.ts +1 -1
  3. package/dist/App/AppHooks.js +13 -13
  4. package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +7 -5
  5. package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +5 -3
  6. package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +7 -5
  7. package/dist/FormSteps/@StoryDecorators/FormStepDecorator.d.ts +9 -0
  8. package/dist/FormSteps/@StoryDecorators/FormStepDecorator.js +86 -0
  9. package/dist/FormSteps/AYFStepMapper.js +2 -2
  10. package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.js +3 -3
  11. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.js +7 -5
  12. package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +1 -1
  13. package/dist/FormSteps/StepFunctions.js +1 -1
  14. package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +1 -0
  15. package/dist/Shared/ErkCheckbox/ErkCheckBox.js +2 -2
  16. package/dist/Shared/ErkDatePicker/ErkDatePicker.js +41 -35
  17. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.d.ts +4 -1
  18. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.js +38 -25
  19. package/dist/Shared/ErkMenuItem.d.ts +1 -1
  20. package/dist/Shared/ErkSelect/ErkSelect.d.ts +2 -2
  21. package/dist/Shared/ErkTextField/ErkTextField.d.ts +17 -2
  22. package/dist/Shared/ErkTextField/ErkTextField.js +3 -3
  23. package/dist/Shared/ErkTimePicker/ErkTimePicker.js +1 -1
  24. package/dist/Shared/Rating/Ratings/ScaleRating.js +1 -1
  25. package/dist/States/GlobalSlice.d.ts +8 -26
  26. package/dist/States/GlobalSlice.js +3 -2
  27. package/dist/States/SiteSlice.d.ts +8 -33
  28. package/dist/States/SiteSlice.js +11 -9
  29. package/dist/States/WidthStatsSlice.d.ts +5 -1
  30. package/dist/Utils/DraftFunctions.js +1 -1
  31. package/dist/index.css +7 -0
  32. package/dist/main.d.ts +1 -1
  33. package/dist/main.js +1 -1
  34. package/package.json +34 -33
  35. package/dist/Shared/ErkButton/ErkButton.stories.d.ts +0 -16
  36. package/dist/Shared/ErkButton/ErkButton.stories.js +0 -28
  37. package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +0 -13
  38. package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.js +0 -34
  39. package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +0 -23
  40. package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +0 -98
  41. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.stories.d.ts +0 -36
  42. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.stories.js +0 -274
  43. package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +0 -21
  44. package/dist/Shared/ErkSelect/ErkSelect.stories.js +0 -87
  45. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.d.ts +0 -26
  46. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +0 -159
  47. package/dist/Shared/ErkTextField/ErkTextField.stories.d.ts +0 -24
  48. package/dist/Shared/ErkTextField/ErkTextField.stories.js +0 -99
  49. package/dist/Shared/Navbar/Navbar.stories.d.ts +0 -13
  50. package/dist/Shared/Navbar/Navbar.stories.js +0 -13
  51. package/dist/Shared/Rating/Rating.stories.d.ts +0 -15
  52. package/dist/Shared/Rating/Rating.stories.js +0 -47
@@ -1,4 +1,4 @@
1
- import { OutlinedTextFieldProps as MuiTextFieldProps } from '@mui/material';
1
+ import { InputProps, OutlinedTextFieldProps as MuiTextFieldProps } from '@mui/material';
2
2
  import React, { CSSProperties } from 'react';
3
3
  interface StyleProps extends Pick<CSSProperties, 'textAlign' | 'fontSize' | 'padding' | 'fontWeight' | 'backgroundColor' | 'borderRadius'> {
4
4
  readOnly?: boolean;
@@ -11,7 +11,20 @@ declare module '@mui/material/TextField' {
11
11
  export declare const StyledTextField: import("@emotion/styled").StyledComponent<{
12
12
  variant?: import("@mui/material").TextFieldVariants | undefined;
13
13
  } & Omit<import("@mui/material").FilledTextFieldProps | MuiTextFieldProps | import("@mui/material").StandardTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & Omit<ErkTextFieldProps, "onChange"> & StyleProps, {}, {}>;
14
- export type ErkTextFieldSlotProps = Omit<ErkTextFieldProps, 'value' | 'onChange' | 'fullWidth'>;
14
+ /** Slot props type for passing ErkTextField props through MUI date picker slotProps.textField */
15
+ export interface ErkTextFieldSlotProps {
16
+ size?: 'small' | 'medium';
17
+ error?: boolean;
18
+ disabled?: boolean;
19
+ readOnly?: boolean;
20
+ helperText?: React.ReactNode;
21
+ labelMargin?: number;
22
+ fullWidth?: boolean;
23
+ placeholder?: string;
24
+ InputProps?: {
25
+ readOnly?: boolean;
26
+ };
27
+ }
15
28
  export interface ErkTextFieldProps extends Omit<MuiTextFieldProps, 'variant' | 'onChange' | 'ref'>, StyleProps {
16
29
  /** The value of the textfield */
17
30
  value?: string | number;
@@ -24,6 +37,8 @@ export interface ErkTextFieldProps extends Omit<MuiTextFieldProps, 'variant' | '
24
37
  errorBorder?: boolean;
25
38
  /** labelMargin */
26
39
  labelMargin?: number;
40
+ /** Props applied to the Input component (for passing min, max, etc.) */
41
+ inputProps?: Partial<InputProps>;
27
42
  }
28
43
  /**
29
44
  * Generic textfield with apps designs. Is class due to the use in the react-hook-forms library
@@ -94,7 +94,7 @@ export const StyledTextField = styled(MuiTextField, {
94
94
  color: theme.palette.text.primary + 'a0',
95
95
  },
96
96
  }));
97
- function CustomTextfield({ onChange, value = '', IconComponent, size = 'small', fullWidth = true, ...others }) {
97
+ function CustomTextfield({ onChange, value = '', IconComponent, size = 'small', fullWidth = true, inputProps: externalInputProps, ...others }) {
98
98
  const { readOnly, disabled, maxLength } = others;
99
99
  const { palette } = useTheme();
100
100
  const handleChange = useCallback((event) => {
@@ -102,7 +102,7 @@ function CustomTextfield({ onChange, value = '', IconComponent, size = 'small',
102
102
  }, [onChange]);
103
103
  const inputProps = useMemo(() => {
104
104
  const mergedInputProps = {
105
- ...others.inputProps,
105
+ ...externalInputProps,
106
106
  spellCheck: true,
107
107
  endAdornment: IconComponent,
108
108
  readOnly: !!readOnly,
@@ -112,7 +112,7 @@ function CustomTextfield({ onChange, value = '', IconComponent, size = 'small',
112
112
  mergedInputProps.inputProps = { maxLength };
113
113
  }
114
114
  return mergedInputProps;
115
- }, [others.inputProps, IconComponent, readOnly, disabled, maxLength]);
115
+ }, [externalInputProps, IconComponent, readOnly, disabled, maxLength]);
116
116
  const length = maxLength ? value.toString()?.length : null;
117
117
  const helperText = others.helperText ?? (others.error === false && !others.readOnly ? ' ' : undefined);
118
118
  return (_jsxs("div", { style: {
@@ -48,7 +48,7 @@ function CustomSelect({ value, onChange, label, error, required, pickDays, helpe
48
48
  paddingTop: error && helperText ? '0px' : '30px',
49
49
  }, children: [error && helperText && (_jsx("div", { className: styles.errorMessage, style: {
50
50
  color: palette.error.main,
51
- }, children: helperText })), pickDays && (_jsx("div", { className: styles.numberPickerContainer, children: _jsx(StyledTextField, { label: "D\u00EDas", type: "number", labelMargin: 0, value: (value?.days ?? minDays) + '', onChange: (event) => handleChange({ ...value, days: parseInt(event.target.value) }), inputProps: { min: minDays, max: maxDays } }) })), pickHours && (_jsx("div", { className: styles.numberPickerContainer, children: _jsx(StyledTextField, { label: "Horas", type: "number", labelMargin: 0, value: (value?.hours ?? minHours) + '', onChange: (event) => handleChange({ ...value, hours: parseInt(event.target.value) }), inputProps: { min: minHours, max: maxHours } }) })), pickMinutes && (_jsx("div", { className: styles.numberPickerContainer, children: _jsx(StyledTextField, { type: "number", label: "Minutos", labelMargin: 0, inputProps: { min: minMinutes, max: maxMinutes }, value: (value?.minutes ?? minMinutes) + '', onChange: (event) => handleChange({ ...value, minutes: parseInt(event.target.value) }) }) })), working === undefined && (_jsxs("div", { className: styles.workingContainer, children: ["H\u00E1biles:", _jsx(ErkToggle, { checked: !!value?.working, disabled: working !== undefined, onChange: (working) => {
51
+ }, children: helperText })), pickDays && (_jsx("div", { className: styles.numberPickerContainer, children: _jsx(StyledTextField, { label: "D\u00EDas", type: "number", labelMargin: 0, value: (value?.days ?? minDays) + '', onChange: (event) => handleChange({ ...value, days: parseInt(event.target.value) }), slotProps: { htmlInput: { min: minDays, max: maxDays } } }) })), pickHours && (_jsx("div", { className: styles.numberPickerContainer, children: _jsx(StyledTextField, { label: "Horas", type: "number", labelMargin: 0, value: (value?.hours ?? minHours) + '', onChange: (event) => handleChange({ ...value, hours: parseInt(event.target.value) }), slotProps: { htmlInput: { min: minHours, max: maxHours } } }) })), pickMinutes && (_jsx("div", { className: styles.numberPickerContainer, children: _jsx(StyledTextField, { type: "number", label: "Minutos", labelMargin: 0, slotProps: { htmlInput: { min: minMinutes, max: maxMinutes } }, value: (value?.minutes ?? minMinutes) + '', onChange: (event) => handleChange({ ...value, minutes: parseInt(event.target.value) }) }) })), working === undefined && (_jsxs("div", { className: styles.workingContainer, children: ["H\u00E1biles:", _jsx(ErkToggle, { checked: !!value?.working, disabled: working !== undefined, onChange: (working) => {
52
52
  handleChange({
53
53
  ...value,
54
54
  working,
@@ -20,7 +20,7 @@ function ScaleRating({ value, inputRef, disabled, onChange, isMobile }) {
20
20
  return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx(StyledRating, { value: value, onChange: (_event, newValue) => {
21
21
  if (!disabled)
22
22
  onChange(newValue);
23
- }, disabled: disabled, size: "large", defaultValue: 0, getLabelText: (value) => value + '/5', max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
23
+ }, disabled: disabled, size: "large", defaultValue: 0, getLabelText: (value) => value + '/5', max: 5, slots: { icon: isMobile ? SmallIconContainer : IconContainer } })] }));
24
24
  }
25
25
  function IconContainer({ value, ...other }) {
26
26
  return (_jsx("span", { className: 'icon' + value, ...other, children: _jsx(StarIcon, { style: { fontSize: 60 } }) }));
@@ -1,5 +1,5 @@
1
1
  import { FormStyle } from '../@Types/Form';
2
- import type { PayloadAction } from '@reduxjs/toolkit';
2
+ import { type Reducer } from '@reduxjs/toolkit';
3
3
  import { SiteState } from './SiteSlice';
4
4
  import { EurekaDraft } from '../@Types/Draft/Draft';
5
5
  import { CountryCode } from 'libphonenumber-js';
@@ -21,30 +21,12 @@ export interface GlobalState {
21
21
  internal: boolean;
22
22
  loaded: boolean;
23
23
  }
24
- export declare const GlobalSlice: import("@reduxjs/toolkit").Slice<GlobalState, {
25
- reset: (state: import("immer").WritableDraft<GlobalState>, action: PayloadAction<Omit<GlobalState, "loaded"> & SiteState>) => {
26
- loaded: true;
27
- editable: boolean;
28
- partial: boolean;
29
- formStyle: FormStyle;
30
- postview: boolean;
31
- preview: boolean;
32
- idOrganization: string;
33
- idCurrentAgent?: string;
34
- apiKey?: string;
35
- countryCode: CountryCode;
36
- confirmation: {
37
- confirmationMessage: EurekaDraft;
38
- showLink: boolean;
39
- };
40
- internal: boolean;
41
- dependencies: import("../Form/Form").DependencyStore;
42
- values: import("./SiteSlice").ValuesStore;
43
- idCurrentSection: string | null;
44
- previousSections: string[];
45
- nextSections: string[];
46
- focusStep?: string;
47
- };
48
- }, "global", "global", import("@reduxjs/toolkit").SliceSelectors<GlobalState>>;
24
+ interface GlobalSliceAPI {
25
+ reducer: Reducer<GlobalState>;
26
+ getInitialState(): GlobalState;
27
+ name: string;
28
+ reducerPath: string;
29
+ }
49
30
  export declare const reset: import("@reduxjs/toolkit").ActionCreatorWithPayload<Omit<GlobalState, "loaded"> & SiteState, "global/reset">;
31
+ export declare const GlobalSlice: GlobalSliceAPI;
50
32
  export default GlobalSlice;
@@ -16,7 +16,7 @@ const initialState = {
16
16
  internal: false,
17
17
  loaded: false,
18
18
  };
19
- export const GlobalSlice = createSlice({
19
+ const _GlobalSlice = createSlice({
20
20
  name: 'global',
21
21
  initialState,
22
22
  reducers: {
@@ -25,5 +25,6 @@ export const GlobalSlice = createSlice({
25
25
  },
26
26
  },
27
27
  });
28
- export const { reset } = GlobalSlice.actions;
28
+ export const { reset } = _GlobalSlice.actions;
29
+ export const GlobalSlice = _GlobalSlice;
29
30
  export default GlobalSlice;
@@ -3,7 +3,7 @@ import { GBaseStep } from '../@Types/GenericFormSteps';
3
3
  import { FormStep } from '../@Types/FormStep';
4
4
  import { CustomStep } from '../FormSteps/CustomStep';
5
5
  import { CBRFormStep } from '../@Types/CBRFormStep';
6
- import type { PayloadAction } from '@reduxjs/toolkit';
6
+ import { type Reducer } from '@reduxjs/toolkit';
7
7
  import { FieldValues } from 'react-hook-form';
8
8
  import { Form } from '../@Types';
9
9
  export interface SiteState {
@@ -14,42 +14,16 @@ export interface SiteState {
14
14
  nextSections: string[];
15
15
  focusStep?: string;
16
16
  }
17
+ interface SiteSliceAPI {
18
+ reducer: Reducer<SiteState>;
19
+ getInitialState(): SiteState;
20
+ name: string;
21
+ reducerPath: string;
22
+ }
17
23
  export interface ValuesStore {
18
24
  global: Record<string, any>;
19
25
  sections: Record<string, Record<string, any>>;
20
26
  }
21
- export declare const SiteSlice: import("@reduxjs/toolkit").Slice<SiteState, {
22
- setStepDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { step: { id, type, idSection }, value, }, }: PayloadAction<{
23
- step: GBaseStep;
24
- value: StepDependency["value"];
25
- }>) => void;
26
- clearDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { id, idSection } }: PayloadAction<GBaseStep>) => void;
27
- setEmptyDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { step: { id }, empty, }, }: PayloadAction<{
28
- step: GBaseStep;
29
- empty: StepDependency["empty"];
30
- }>) => void;
31
- addStepsDependencies: (state: import("immer").WritableDraft<SiteState>, { payload: { steps, customSteps, allSteps }, }: PayloadAction<{
32
- steps: Record<string, FormStep | CBRFormStep>;
33
- customSteps: Record<string, CustomStep>;
34
- allSteps: Record<string, FormStep | CBRFormStep>;
35
- }>) => void;
36
- handlePrevious: (state: import("immer").WritableDraft<SiteState>, { payload: { values, form } }: PayloadAction<{
37
- values: Record<string, any>;
38
- form: Form;
39
- }>) => void;
40
- handleNext: (state: import("immer").WritableDraft<SiteState>, { payload: { values, form } }: PayloadAction<{
41
- values: Record<string, any>;
42
- form: Form;
43
- }>) => void;
44
- updateNestedValues: (state: import("immer").WritableDraft<SiteState>, { payload: { key, values } }: PayloadAction<{
45
- key: string;
46
- values: Record<string, any>;
47
- }>) => void;
48
- focusStep: (state: import("immer").WritableDraft<SiteState>, { payload }: PayloadAction<{
49
- step: FormStep;
50
- values: FieldValues;
51
- } | undefined>) => void;
52
- }, "site", "site", import("@reduxjs/toolkit").SliceSelectors<SiteState>>;
53
27
  export declare const focusStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
54
28
  step: FormStep;
55
29
  values: FieldValues;
@@ -73,5 +47,6 @@ export declare const focusStep: import("@reduxjs/toolkit").ActionCreatorWithOpti
73
47
  key: string;
74
48
  values: Record<string, any>;
75
49
  }, "site/updateNestedValues">;
50
+ export declare const SiteSlice: SiteSliceAPI;
76
51
  export default SiteSlice;
77
52
  export declare function addPagedValues(steps: Record<string, FormStep>, values: Record<string, any>, original: Record<string, any>, path?: string): void;
@@ -13,13 +13,12 @@ const initialState = {
13
13
  previousSections: [],
14
14
  nextSections: [],
15
15
  };
16
- export const SiteSlice = createSlice({
16
+ const _SiteSlice = createSlice({
17
17
  name: 'site',
18
18
  initialState,
19
19
  reducers: {
20
20
  setStepDependency: (state, { payload: { step: { id, type, idSection }, value, }, }) => {
21
21
  const old = state.dependencies[id];
22
- // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
23
22
  if (old && (old.type !== type || old.value !== value)) {
24
23
  state.dependencies[id] = {
25
24
  ...state.dependencies[id],
@@ -118,17 +117,20 @@ export const SiteSlice = createSlice({
118
117
  },
119
118
  },
120
119
  extraReducers: (builder) => {
121
- builder.addCase(reset, (state, action) => {
120
+ builder.addCase(reset, (_state, action) => {
122
121
  const payload = action.payload;
123
- state.previousSections = payload.previousSections;
124
- state.idCurrentSection = payload.idCurrentSection;
125
- state.nextSections = payload.nextSections;
126
- state.values = payload.values;
127
- state.dependencies = payload.dependencies;
122
+ return {
123
+ previousSections: payload.previousSections,
124
+ idCurrentSection: payload.idCurrentSection,
125
+ nextSections: payload.nextSections,
126
+ values: payload.values,
127
+ dependencies: payload.dependencies,
128
+ };
128
129
  });
129
130
  },
130
131
  });
131
- export const { focusStep, clearDependency, setStepDependency, addStepsDependencies, setEmptyDependency, handlePrevious, handleNext, updateNestedValues, } = SiteSlice.actions;
132
+ export const { focusStep, clearDependency, setStepDependency, addStepsDependencies, setEmptyDependency, handlePrevious, handleNext, updateNestedValues, } = _SiteSlice.actions;
133
+ export const SiteSlice = _SiteSlice;
132
134
  export default SiteSlice;
133
135
  export function addPagedValues(steps, values, original, path = '') {
134
136
  for (const step of Object.values(steps)) {
@@ -1,7 +1,11 @@
1
1
  import { WidthStats } from '../Form/Form';
2
2
  import type { PayloadAction } from '@reduxjs/toolkit';
3
3
  export declare const WidthStatsSlice: import("@reduxjs/toolkit").Slice<WidthStats, {
4
- updateWidthStats: (state: import("immer").WritableDraft<WidthStats>, { payload }: PayloadAction<WidthStats>) => WidthStats;
4
+ updateWidthStats: (state: {
5
+ currentBreakPoint: number;
6
+ isResponsive: boolean;
7
+ isMobile: boolean;
8
+ }, { payload }: PayloadAction<WidthStats>) => WidthStats;
5
9
  }, "widthStats", "widthStats", import("@reduxjs/toolkit").SliceSelectors<WidthStats>>;
6
10
  export declare const updateWidthStats: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidthStats, "widthStats/updateWidthStats">;
7
11
  export default WidthStatsSlice;
@@ -319,7 +319,7 @@ export function isList(blockType) {
319
319
  */
320
320
  export function getEntityText(entityMap, entityKey, blockText) {
321
321
  const entity = entityMap[entityKey];
322
- if (entity && entity.type === DraftEntityTypes.EUREKA) {
322
+ if (entity?.type === DraftEntityTypes.EUREKA) {
323
323
  return blockText;
324
324
  }
325
325
  return '';
package/dist/index.css CHANGED
@@ -4,6 +4,13 @@ body {
4
4
  font-family: 'Nunito', sans-serif;
5
5
  }
6
6
 
7
+ .hidden-input {
8
+ height: 0;
9
+ width: 0;
10
+ padding: 0;
11
+ border-width: 0;
12
+ }
13
+
7
14
  .ErkIcon {
8
15
  width: 1em;
9
16
  height: 1em;
package/dist/main.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import './Init.ts';
1
+ import './Init';
2
2
  import './index.css';
3
3
  import './Utils/MuiClassnameSetup';
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import './Init.ts';
2
+ import './Init';
3
3
  import ReactDOM from 'react-dom/client';
4
4
  import styles from './index.module.css';
5
5
  import App from './App/App';
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version":"3.0.44-test",
4
+ "version":"3.0.45-mui9",
5
5
  "scripts": {
6
6
  "watch": "tsgo --noEmit --watch --project tsconfig.app.json",
7
7
  "start": "vite",
8
- "build": "tsc -b && vite build",
8
+ "build": "tsc --noEmit -p tsconfig.app.json && vite build",
9
9
  "format": "prettier --write ./src",
10
10
  "lint": "eslint ./src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
11
11
  "preview": "vite preview",
12
12
  "test": "vitest",
13
- "tsc-build": "tsc --p tsconfig.app.json --noEmit false --outDir ./dist --composite false --declaration true --allowImportingTsExtensions false",
13
+ "tsc-build": "tsc --p tsconfig.app.json --noEmit false --outDir ./dist --composite false --declaration true --allowImportingTsExtensions false --rootDir ./src",
14
14
  "cypress": "DISPLAY=:0 cypress open",
15
15
  "storybook": "storybook dev -p 6006",
16
16
  "build-storybook": "storybook build"
17
17
  },
18
18
  "dependencies": {
19
- "@reduxjs/toolkit": "2.11.0",
20
- "axios": "1.12.2",
19
+ "@reduxjs/toolkit": "2.11.2",
20
+ "axios": "1.16.0",
21
21
  "date-fns": "4.1.0",
22
22
  "draft-js": "0.11.7",
23
23
  "i18n-iso-countries": "7.14.0",
24
- "libphonenumber-js": "1.12.31",
25
- "logrocket": "10.1.1",
26
- "nanoid": "5.1.6",
24
+ "libphonenumber-js": "1.12.42",
25
+ "logrocket": "12.1.1",
26
+ "nanoid": "5.1.11",
27
27
  "react-draft-wysiwyg": "1.15.0",
28
28
  "react-google-recaptcha": "3.1.0",
29
- "react-hook-form": "7.68.0",
30
- "react-international-phone": "4.6.1",
29
+ "react-hook-form": "7.75.0",
30
+ "react-international-phone": "4.8.0",
31
31
  "react-redux": "9.2.0",
32
- "typescript": "5.9.3"
32
+ "typescript": "6.0.3"
33
33
  },
34
34
  "eslintConfig": {},
35
35
  "browserslist": {
@@ -49,25 +49,26 @@
49
49
  "@eslint/eslintrc": "3.3.3",
50
50
  "@eslint/js": "9.39.1",
51
51
  "@faker-js/faker": "10.1.0",
52
- "@mui/material": "7.3.6",
53
- "@mui/x-data-grid-pro": "8.21.0",
54
- "@mui/x-date-pickers": "8.21.0",
55
- "@mui/x-date-pickers-pro": "8.21.0",
56
- "@storybook/addon-docs": "^9.1.16",
57
- "@storybook/addon-onboarding": "^9.1.16",
58
- "@storybook/addon-themes": "^9.1.16",
59
- "@storybook/react-vite": "^9.1.16",
52
+ "@mui/material": "9.0.1",
53
+ "@mui/x-data-grid-pro": "9.3.0",
54
+ "@mui/x-date-pickers": "9.3.0",
55
+ "@mui/x-date-pickers-pro": "9.3.0",
56
+ "@storybook/addon-docs": "^10.4.0",
57
+ "@storybook/addon-onboarding": "^10.4.0",
58
+ "@storybook/addon-themes": "^10.4.0",
59
+ "@storybook/react-vite": "^10.4.0",
60
60
  "@testing-library/dom": "10.4.1",
61
61
  "@testing-library/jest-dom": "6.9.1",
62
62
  "@testing-library/react": "16.3.0",
63
63
  "@testing-library/user-event": "14.6.1",
64
64
  "@types/draft-js": "0.11.20",
65
- "@types/react": "19.2.7",
65
+ "@types/react": "19.2.14",
66
66
  "@types/react-dom": "19.2.3",
67
67
  "@types/react-draft-wysiwyg": "1.13.9",
68
68
  "@types/react-google-recaptcha": "2.1.9",
69
- "@typescript-eslint/eslint-plugin": "8.48.1",
70
- "@typescript-eslint/parser": "8.48.1",
69
+ "@typescript-eslint/eslint-plugin": "8.59.2",
70
+ "@typescript-eslint/parser": "8.59.2",
71
+ "@typescript/native-preview": "^7.0.0-dev.20260515.1",
71
72
  "@vitejs/plugin-react": "^5.1.1",
72
73
  "babel-plugin-react-compiler": "^1.0.0",
73
74
  "css-loader": "7.1.2",
@@ -78,25 +79,25 @@
78
79
  "eslint-plugin-react": "7.37.5",
79
80
  "eslint-plugin-react-hooks": "7.0.1",
80
81
  "eslint-plugin-react-refresh": "0.4.24",
81
- "eslint-plugin-storybook": "9.1.16",
82
- "globals": "16.4.0",
82
+ "eslint-plugin-storybook": "10.4.0",
83
+ "globals": "17.6.0",
83
84
  "identity-obj-proxy": "3.0.0",
84
85
  "jsdom": "27.2.0",
85
- "prettier": "3.7.4",
86
- "react": "19.2.1",
87
- "react-dom": "19.2.1",
86
+ "prettier": "3.8.3",
87
+ "react": "19.2.6",
88
+ "react-dom": "19.2.6",
88
89
  "react-refresh": "0.18.0",
89
- "storybook": "^9.1.16",
90
+ "storybook": "^10.4.0",
90
91
  "style-loader": "4.0.0",
91
- "vite": "7.1.9",
92
- "vite-plugin-svgr": "4.5.0",
93
- "vitest": "3.2.4"
92
+ "vite": "8.0.10",
93
+ "vite-plugin-svgr": "5.2.0",
94
+ "vitest": "4.1.5"
94
95
  },
95
96
  "peerDependencies": {
96
97
  "@emotion/react": "11.x.x",
97
98
  "@emotion/styled": "11.x.x",
98
- "@mui/material": "7.3.6",
99
- "@mui/x-date-pickers": "8.21.0",
99
+ "@mui/material": "9.0.0",
100
+ "@mui/x-date-pickers": "9.0.4",
100
101
  "react": "18 || 19",
101
102
  "react-dom": "18 || 19"
102
103
  },
@@ -1,16 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import ErkButton from './ErkButton';
3
- declare const meta: {
4
- component: typeof ErkButton;
5
- tags: string[];
6
- args: {
7
- text: string;
8
- disabled: false;
9
- onClick: import("vitest").Mock<(...args: any[]) => any>;
10
- };
11
- };
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
- export declare const Default: Story;
15
- export declare const Disabled: Story;
16
- export declare const DifferentColors: Story;
@@ -1,28 +0,0 @@
1
- import { fn } from 'storybook/test';
2
- import ErkButton from './ErkButton';
3
- const meta = {
4
- component: ErkButton,
5
- tags: ['autodocs'],
6
- args: {
7
- text: 'Label',
8
- disabled: false,
9
- onClick: fn(),
10
- },
11
- };
12
- export default meta;
13
- export const Default = {
14
- args: {
15
- text: 'Label',
16
- },
17
- };
18
- export const Disabled = {
19
- args: {
20
- text: 'Label',
21
- disabled: true,
22
- },
23
- };
24
- export const DifferentColors = {
25
- args: {
26
- text: 'Label',
27
- },
28
- };
@@ -1,13 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import ErkCheckBox from './ErkCheckBox';
3
- declare const meta: {
4
- component: typeof ErkCheckBox;
5
- tags: string[];
6
- };
7
- export default meta;
8
- type Story = StoryObj<typeof meta>;
9
- export declare const Uncheked: Story;
10
- export declare const Checked: Story;
11
- export declare const Error: Story;
12
- export declare const Disabled: Story;
13
- export declare const ErrorColor: Story;
@@ -1,34 +0,0 @@
1
- import ErkCheckBox from './ErkCheckBox';
2
- const meta = {
3
- component: ErkCheckBox,
4
- tags: ['autodocs'],
5
- };
6
- export default meta;
7
- export const Uncheked = {
8
- args: {
9
- checked: false,
10
- },
11
- };
12
- export const Checked = {
13
- args: {
14
- checked: true,
15
- },
16
- };
17
- export const Error = {
18
- args: {
19
- checked: false,
20
- error: true,
21
- },
22
- };
23
- export const Disabled = {
24
- args: {
25
- checked: false,
26
- disabled: true,
27
- },
28
- };
29
- export const ErrorColor = {
30
- args: {
31
- checked: false,
32
- error: true,
33
- },
34
- };
@@ -1,23 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import ErkDatePicker from './ErkDatePicker';
3
- declare const meta: {
4
- component: typeof ErkDatePicker;
5
- tags: string[];
6
- args: {
7
- readOnly: false;
8
- };
9
- parameters: {
10
- date: Date;
11
- };
12
- };
13
- export default meta;
14
- type Story = StoryObj<typeof meta>;
15
- export declare const Empty: Story;
16
- export declare const Default: Story;
17
- export declare const ValueAndLabel: Story;
18
- export declare const Full: Story;
19
- export declare const FullDateTime: Story;
20
- export declare const Error: Story;
21
- export declare const Menu: Story;
22
- export declare const DateTimeDateMenu: Story;
23
- export declare const DateTimeTimeMenu: Story;
@@ -1,98 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import ErkDatePicker from './ErkDatePicker';
3
- import { useArgs } from 'storybook/internal/preview-api';
4
- const meta = {
5
- component: ErkDatePicker,
6
- tags: ['autodocs'],
7
- args: {
8
- readOnly: false,
9
- },
10
- parameters: {
11
- date: new Date('07-21-2021'),
12
- },
13
- };
14
- export default meta;
15
- export const Empty = {
16
- args: {
17
- value: null,
18
- },
19
- };
20
- export const Default = {
21
- args: {
22
- label: 'Label',
23
- value: new Date('07-21-2021'),
24
- },
25
- };
26
- export const ValueAndLabel = {
27
- args: {
28
- label: 'Label',
29
- value: null,
30
- },
31
- render: function Component(args) {
32
- const [, setArgs] = useArgs();
33
- const onValueChange = (value) => {
34
- args.onChange?.(value);
35
- setArgs({ value });
36
- };
37
- return _jsx(ErkDatePicker, { ...args, onChange: onValueChange });
38
- },
39
- };
40
- export const Full = {
41
- args: {
42
- label: 'Label',
43
- value: null,
44
- helperText: 'Helper text',
45
- },
46
- };
47
- export const FullDateTime = {
48
- args: {
49
- label: 'Label',
50
- value: null,
51
- helperText: 'Helper text',
52
- pickTime: true,
53
- },
54
- };
55
- export const Error = {
56
- args: {
57
- label: 'Label',
58
- value: null,
59
- helperText: 'Helper text',
60
- error: true,
61
- },
62
- };
63
- export const Menu = {
64
- args: {
65
- label: 'Label',
66
- value: null,
67
- },
68
- play: async ({ canvas, userEvent }) => {
69
- const selector = canvas.getByTestId('date-picker');
70
- await userEvent.click(selector);
71
- },
72
- };
73
- export const DateTimeDateMenu = {
74
- args: {
75
- label: 'Label',
76
- value: null,
77
- pickTime: true,
78
- },
79
- play: async ({ canvas, userEvent }) => {
80
- const selector = canvas.getByTestId('date-picker');
81
- await userEvent.click(selector);
82
- },
83
- };
84
- export const DateTimeTimeMenu = {
85
- args: {
86
- label: 'Label',
87
- value: null,
88
- pickTime: true,
89
- },
90
- play: async ({ canvas, userEvent }) => {
91
- const selector = canvas.getByTestId('date-picker');
92
- await userEvent.click(selector);
93
- const time = canvas.getByText('12', {
94
- selector: 'h3',
95
- });
96
- await userEvent.click(time);
97
- },
98
- };