@arquimedes.co/eureka-forms 3.0.66 → 3.0.68-test

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 (141) hide show
  1. package/README +1 -33
  2. package/dist/@Types/FormStep.d.ts +2 -7
  3. package/dist/@Types/FormStep.js +1 -2
  4. package/dist/App/App.stories.d.ts +0 -10
  5. package/dist/App/App.stories.js +0 -189
  6. package/dist/App/AppHooks.js +0 -8
  7. package/dist/App/AppHooks.test.js +0 -8
  8. package/dist/Form/Form.js +6 -7
  9. package/dist/Form/FormFunctions.d.ts +0 -17
  10. package/dist/Form/FormFunctions.js +0 -22
  11. package/dist/Form/FormFunctions.test.js +1 -28
  12. package/dist/FormSteps/CheckBoxStep/CheckBoxStep.mobileLabel.test.js +12 -20
  13. package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +13 -6
  14. package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +13 -2
  15. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +1 -3
  16. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +21 -10
  17. package/dist/FormSteps/Step.js +0 -16
  18. package/dist/FormSteps/StepFunctions.js +0 -14
  19. package/dist/FormSteps/StepFunctions.test.js +0 -54
  20. package/dist/FormSteps/StepHooks.d.ts +0 -14
  21. package/dist/FormSteps/StepHooks.js +8 -39
  22. package/dist/Shared/ErkDatePicker/ErkDatePicker.js +12 -4
  23. package/dist/Shared/ErkDatePicker/ErkDatePicker.locale.test.js +39 -0
  24. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.d.ts +3 -2
  25. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.js +16 -11
  26. package/dist/Shared/ErkSelect/ErkSelect.js +9 -1
  27. package/dist/Shared/ErkSelect/ErkSelect.test.d.ts +2 -0
  28. package/dist/Shared/ErkSelect/ErkSelect.test.js +53 -0
  29. package/dist/Shared/ErkTimePicker/ErkTimePicker.js +8 -1
  30. package/dist/Shared/ErkTimePicker/ErkTimePicker.test.d.ts +2 -0
  31. package/dist/Shared/ErkTimePicker/ErkTimePicker.test.js +24 -0
  32. package/dist/Utils/AxiosWidget.js +1 -9
  33. package/dist/Utils/LocaleUtils.d.ts +1 -0
  34. package/dist/Utils/LocaleUtils.js +10 -3
  35. package/dist/constants/FormStepTypes.d.ts +1 -5
  36. package/dist/constants/FormStepTypes.js +0 -4
  37. package/dist/index.lib.d.ts +2 -4
  38. package/dist/index.lib.js +1 -3
  39. package/package.json +1 -2
  40. package/dist/@Types/AvailabilityFormStep.d.ts +0 -48
  41. package/dist/@Types/AvailabilityFormStep.js +0 -24
  42. package/dist/@Types/BankAccountFormStep.d.ts +0 -67
  43. package/dist/@Types/BankAccountFormStep.js +0 -14
  44. package/dist/@Types/BookingFormStep.d.ts +0 -187
  45. package/dist/@Types/BookingFormStep.js +0 -44
  46. package/dist/@Types/CalendarFormStep.d.ts +0 -209
  47. package/dist/@Types/CalendarFormStep.js +0 -55
  48. package/dist/@Types/CommunicationChannelFormStep.d.ts +0 -51
  49. package/dist/@Types/CommunicationChannelFormStep.js +0 -15
  50. package/dist/@Types/ConsentFormStep.d.ts +0 -36
  51. package/dist/@Types/ConsentFormStep.js +0 -8
  52. package/dist/@Types/EntityFormFormStep.d.ts +0 -66
  53. package/dist/@Types/EntityFormFormStep.js +0 -20
  54. package/dist/@Types/EventFormStep.d.ts +0 -52
  55. package/dist/@Types/EventFormStep.js +0 -13
  56. package/dist/@Types/ExternalReferenceFormStep.d.ts +0 -74
  57. package/dist/@Types/ExternalReferenceFormStep.js +0 -20
  58. package/dist/@Types/LocationFormStep.d.ts +0 -159
  59. package/dist/@Types/LocationFormStep.js +0 -46
  60. package/dist/@Types/NumericFormSteps.d.ts +0 -108
  61. package/dist/@Types/NumericFormSteps.js +0 -20
  62. package/dist/@Types/PredefinedSelectorFormStep.d.ts +0 -51
  63. package/dist/@Types/PredefinedSelectorFormStep.js +0 -39
  64. package/dist/@Types/StepRef.d.ts +0 -135
  65. package/dist/@Types/StepRef.js +0 -49
  66. package/dist/FormSteps/AvailabilityStep/AvailabilityStep.d.ts +0 -7
  67. package/dist/FormSteps/AvailabilityStep/AvailabilityStep.js +0 -14
  68. package/dist/FormSteps/AvailabilityStep/MaterialAvailabilityStep/MaterialAvailabilityStep.d.ts +0 -8
  69. package/dist/FormSteps/AvailabilityStep/MaterialAvailabilityStep/MaterialAvailabilityStep.js +0 -32
  70. package/dist/FormSteps/BookingStep/BookingStep.d.ts +0 -17
  71. package/dist/FormSteps/BookingStep/BookingStep.js +0 -14
  72. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.d.ts +0 -7
  73. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.js +0 -32
  74. package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.lateClassifiers.test.js +0 -70
  75. package/dist/FormSteps/EntityValueStep/entityValueDependencyValue.d.ts +0 -12
  76. package/dist/FormSteps/EntityValueStep/entityValueDependencyValue.js +0 -35
  77. package/dist/FormSteps/EntityValueStep/entityValueDependencyValue.test.d.ts +0 -1
  78. package/dist/FormSteps/EntityValueStep/entityValueDependencyValue.test.js +0 -31
  79. package/dist/FormSteps/EntityValueStep/entityValuePickerWatchedSteps.d.ts +0 -27
  80. package/dist/FormSteps/EntityValueStep/entityValuePickerWatchedSteps.js +0 -64
  81. package/dist/FormSteps/EntityValueStep/entityValuePickerWatchedSteps.test.d.ts +0 -1
  82. package/dist/FormSteps/EntityValueStep/entityValuePickerWatchedSteps.test.js +0 -95
  83. package/dist/FormSteps/LocationStep/LocationStep.d.ts +0 -10
  84. package/dist/FormSteps/LocationStep/LocationStep.js +0 -14
  85. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.d.ts +0 -3
  86. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.js +0 -54
  87. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.module.css +0 -18
  88. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.d.ts +0 -3
  89. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.js +0 -170
  90. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.module.css +0 -96
  91. package/dist/FormSteps/NumberStep/NumberStep.d.ts +0 -10
  92. package/dist/FormSteps/NumberStep/NumberStep.js +0 -14
  93. package/dist/FormSteps/StepHooks.test.d.ts +0 -1
  94. package/dist/FormSteps/StepHooks.test.js +0 -92
  95. package/dist/Icons/AddIcon.d.ts +0 -3
  96. package/dist/Icons/AddIcon.js +0 -7
  97. package/dist/Icons/EditIcon.d.ts +0 -3
  98. package/dist/Icons/EditIcon.js +0 -7
  99. package/dist/Icons/RemoveIcon.d.ts +0 -3
  100. package/dist/Icons/RemoveIcon.js +0 -7
  101. package/dist/Icons/ViewDayIcon.d.ts +0 -3
  102. package/dist/Icons/ViewDayIcon.js +0 -7
  103. package/dist/Icons/ViewWeekIcon.d.ts +0 -3
  104. package/dist/Icons/ViewWeekIcon.js +0 -7
  105. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.d.ts +0 -19
  106. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.js +0 -80
  107. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.module.css +0 -88
  108. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.d.ts +0 -29
  109. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.js +0 -139
  110. package/dist/Shared/ErkAvailabilityPicker/ErkAvailabilityPicker.d.ts +0 -25
  111. package/dist/Shared/ErkAvailabilityPicker/ErkAvailabilityPicker.js +0 -112
  112. package/dist/Shared/ErkAvailabilityPicker/ErkAvailabilityPicker.module.css +0 -88
  113. package/dist/Shared/ErkAvailabilityPicker/ErkAvailabilityPicker.test.d.ts +0 -1
  114. package/dist/Shared/ErkAvailabilityPicker/ErkAvailabilityPicker.test.js +0 -73
  115. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.d.ts +0 -31
  116. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.js +0 -228
  117. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.module.css +0 -608
  118. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.d.ts +0 -28
  119. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.js +0 -117
  120. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.test.d.ts +0 -1
  121. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.test.js +0 -49
  122. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.test.d.ts +0 -1
  123. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.test.js +0 -107
  124. package/dist/Shared/ErkIconButton/ErkIconButton.d.ts +0 -17
  125. package/dist/Shared/ErkIconButton/ErkIconButton.js +0 -11
  126. package/dist/Shared/ErkIconButton/ErkIconButton.module.css +0 -41
  127. package/dist/Shared/ErkLocationField/ErkLocationField.d.ts +0 -24
  128. package/dist/Shared/ErkLocationField/ErkLocationField.js +0 -128
  129. package/dist/Shared/ErkLocationField/ErkLocationField.module.css +0 -164
  130. package/dist/Shared/ErkLocationField/ErkLocationField.test.d.ts +0 -1
  131. package/dist/Shared/ErkLocationField/ErkLocationField.test.js +0 -82
  132. package/dist/Shared/ErkLocationField/addressFields.d.ts +0 -12
  133. package/dist/Shared/ErkLocationField/addressFields.js +0 -34
  134. package/dist/Shared/ErkLocationField/locationRestrictions.d.ts +0 -6
  135. package/dist/Shared/ErkLocationField/locationRestrictions.js +0 -51
  136. package/dist/Shared/ErkLocationInput/ErkLocationInput.d.ts +0 -15
  137. package/dist/Shared/ErkLocationInput/ErkLocationInput.js +0 -502
  138. package/dist/Shared/ErkLocationInput/ErkLocationInput.module.css +0 -128
  139. package/dist/Shared/ErkNumberField/ErkNumberField.d.ts +0 -42
  140. package/dist/Shared/ErkNumberField/ErkNumberField.js +0 -169
  141. /package/dist/{FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.lateClassifiers.test.d.ts → Shared/ErkDatePicker/ErkDatePicker.locale.test.d.ts} +0 -0
@@ -1,169 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { NumberField as BaseNumberField } from '@base-ui/react/number-field';
4
- import { FormControl, FormHelperText, InputAdornment, InputLabel, OutlinedInput, styled, useTheme, } from '@mui/material';
5
- import { alpha } from '@mui/material/styles';
6
- import AddIcon from '../../Icons/AddIcon';
7
- import RemoveIcon from '../../Icons/RemoveIcon';
8
- // ---------------------------------------------------------------------------
9
- // Styled FormControl shell — same conventions as ErkTextField / ErkSelect
10
- // ---------------------------------------------------------------------------
11
- const StyledFormControl = styled(FormControl)(({ theme, size }) => ({
12
- '& .Erk-MuiOutlinedInput-root': {
13
- borderRadius: 10,
14
- backgroundColor: theme.palette.stepBackgroundColor.default,
15
- minHeight: size === 'small' ? 31 : size === 'medium' ? 40 : undefined,
16
- '&.Mui-focused .Erk-MuiOutlinedInput-notchedOutline': {
17
- borderColor: theme.palette.primary.main,
18
- borderWidth: 2,
19
- },
20
- // ErkNF-readOnly is set manually via className — Mui-readOnly is unreliable here
21
- '&:hover:not(.ErkNF-readOnly) .Erk-MuiOutlinedInput-notchedOutline': {
22
- borderColor: theme.palette.primary.main,
23
- },
24
- '&.ErkNF-readOnly.Mui-focused .Erk-MuiOutlinedInput-notchedOutline': {
25
- borderColor: theme.palette.outline.main,
26
- borderWidth: 1,
27
- },
28
- '&.ErkNF-readOnly': {
29
- cursor: 'default',
30
- '& input': { cursor: 'default' },
31
- },
32
- '& .Erk-MuiOutlinedInput-notchedOutline': {
33
- borderRadius: 10,
34
- borderColor: theme.palette.outline.main,
35
- '& legend': { fontSize: '0.75rem' },
36
- },
37
- },
38
- '& .Erk-MuiOutlinedInput-root.Mui-error .Erk-MuiOutlinedInput-notchedOutline': {
39
- borderColor: theme.palette.error.main,
40
- },
41
- '& .Erk-MuiOutlinedInput-root.Mui-error.Mui-focused .Erk-MuiOutlinedInput-notchedOutline': {
42
- borderWidth: 2,
43
- },
44
- '& .Erk-MuiFormLabel-root': {
45
- color: alpha(theme.palette.text.primary, 0.54),
46
- },
47
- '& label.Mui-focused': { color: theme.palette.primary.main },
48
- '& label.Mui-error': { color: theme.palette.error.main },
49
- '& .Erk-MuiFormLabel-root:not(.Erk-MuiInputLabel-shrink)': {
50
- fontSize: '1rem',
51
- transform: `translate(12px, ${size === 'small' ? 5 : 9}px) scale(1)`,
52
- },
53
- '& .Erk-MuiFormHelperText-root': {
54
- color: theme.palette.helperText.primary,
55
- minHeight: 20,
56
- overflow: 'hidden',
57
- textOverflow: 'ellipsis',
58
- },
59
- '& .Erk-MuiFormHelperText-root.Mui-error': { color: theme.palette.error.main },
60
- '& input': {
61
- fontSize: '1rem',
62
- padding: '6px 12px',
63
- lineHeight: size === 'small' ? '1.188em' : '1.75em',
64
- height: size === 'small' ? '1.188em' : '1.75em',
65
- color: theme.palette.text.primary,
66
- MozAppearance: 'textfield',
67
- '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
68
- WebkitAppearance: 'none',
69
- margin: 0,
70
- },
71
- },
72
- }));
73
- // ---------------------------------------------------------------------------
74
- // SSR label-shrink hint — muiName='Input' lets FormControl know an input
75
- // exists so it can compute the initial shrink state before hydration.
76
- // ---------------------------------------------------------------------------
77
- function SSRInitialFilled(_props) {
78
- return null;
79
- }
80
- SSRInitialFilled.muiName = 'Input';
81
- function SpinnerBtn({ children, style, ...rest }) {
82
- const theme = useTheme();
83
- const [hovered, setHovered] = React.useState(false);
84
- const [active, setActive] = React.useState(false);
85
- return (_jsx("button", { type: "button", tabIndex: -1, ...rest, onMouseEnter: (e) => {
86
- setHovered(true);
87
- rest.onMouseEnter?.(e);
88
- }, onMouseLeave: (e) => {
89
- setHovered(false);
90
- setActive(false);
91
- rest.onMouseLeave?.(e);
92
- }, onMouseDown: (e) => {
93
- setActive(true);
94
- rest.onMouseDown?.(e);
95
- }, onMouseUp: (e) => {
96
- setActive(false);
97
- rest.onMouseUp?.(e);
98
- }, style: {
99
- display: 'inline-flex',
100
- alignItems: 'center',
101
- justifyContent: 'center',
102
- width: 22,
103
- height: 22,
104
- minWidth: 22,
105
- padding: 0,
106
- border: 'none',
107
- borderRadius: 4,
108
- background: active
109
- ? alpha(theme.palette.primary.main, 0.16)
110
- : hovered
111
- ? alpha(theme.palette.primary.main, 0.08)
112
- : 'transparent',
113
- cursor: rest.disabled ? 'default' : 'pointer',
114
- color: hovered && !rest.disabled ? theme.palette.primary.main : alpha(theme.palette.text.primary, 0.6),
115
- flexShrink: 0,
116
- transition: 'color 0.15s, background-color 0.15s',
117
- opacity: rest.disabled ? 0.35 : 1,
118
- pointerEvents: rest.disabled ? 'none' : undefined,
119
- ...style,
120
- }, children: children }));
121
- }
122
- // ---------------------------------------------------------------------------
123
- // Implementation
124
- // ---------------------------------------------------------------------------
125
- function CustomErkNumberField({ value, onChange, label, min, max, step = 1, decimals, required, error, errorBorder, helperText, disabled, readOnly, placeholder, size = 'small', fullWidth = true, suffix, spinner = true, inputRef, }) {
126
- const theme = useTheme();
127
- const id = React.useId();
128
- // Rounds to max decimals on spinner click / arrow key / wheel scrub.
129
- // Typing restriction is handled separately inside slotProps.input.onChange.
130
- const handleValueChange = (num) => {
131
- if (num === null || decimals === undefined) {
132
- onChange?.(num);
133
- return;
134
- }
135
- const factor = Math.pow(10, decimals);
136
- onChange?.(Math.round(num * factor) / factor);
137
- };
138
- return (_jsxs(BaseNumberField.Root, { value: value ?? null, onValueChange: handleValueChange, min: min, max: max, step: step, format: decimals !== undefined ? { minimumFractionDigits: 0, maximumFractionDigits: decimals } : undefined, disabled: disabled, readOnly: readOnly, ref: inputRef, render: (rootProps, rootState) => (_jsx(StyledFormControl, { ref: rootProps.ref, size: size, disabled: rootState.disabled, required: required, error: error && !!errorBorder, variant: "outlined", fullWidth: fullWidth, children: rootProps.children })), children: [_jsx(SSRInitialFilled, { value: value ?? undefined }), label && (_jsx(InputLabel, { htmlFor: id, size: size === 'small' ? 'small' : undefined, disabled: disabled, children: label })), _jsx(BaseNumberField.Input, { id: id, render: (inputProps, inputState) => {
139
- return (_jsx(OutlinedInput, { label: label, className: readOnly ? 'ErkNF-readOnly' : undefined, inputRef: inputProps.ref, value: inputState.inputValue, onBlur: inputProps.onBlur, onChange: inputProps.onChange, onKeyUp: inputProps.onKeyUp, onKeyDown: inputProps.onKeyDown, onFocus: inputProps.onFocus, placeholder: placeholder, slotProps: {
140
- input: {
141
- ...inputProps, // Base UI handlers + ref + aria attrs
142
- },
143
- }, endAdornment: suffix || spinner ? (_jsxs(InputAdornment, { position: "end", sx: { gap: '2px', mr: '2px', alignItems: 'center' }, children: [suffix && (_jsx("span", { style: {
144
- fontSize: 13,
145
- fontWeight: 600,
146
- color: theme.palette.primary.main,
147
- userSelect: 'none',
148
- whiteSpace: 'nowrap',
149
- marginRight: spinner ? 2 : 4,
150
- }, children: suffix })), spinner && (_jsxs(_Fragment, { children: [_jsx(BaseNumberField.Decrement, { render: (decProps) => {
151
- const { disabled: baseDisabled, ...restDec } = decProps;
152
- return (_jsx(SpinnerBtn, { ...restDec, disabled: !!readOnly || !!baseDisabled, children: _jsx(RemoveIcon, { size: 14 }) }));
153
- } }), _jsx(BaseNumberField.Increment, { render: (incProps) => {
154
- const { disabled: baseDisabled, ...restInc } = incProps;
155
- return (_jsx(SpinnerBtn, { ...restInc, disabled: !!readOnly || !!baseDisabled, children: _jsx(AddIcon, { size: 14 }) }));
156
- } })] }))] })) : undefined, sx: { pr: suffix || spinner ? 0 : undefined } }));
157
- } }), helperText && _jsx(FormHelperText, { error: error && !!errorBorder, children: helperText })] }));
158
- }
159
- /**
160
- * Pure number input built on Base UI NumberField + MUI styling.
161
- * No form-step system dependency.
162
- * Class wrapper for react-hook-form ref compatibility.
163
- */
164
- class ErkNumberField extends React.Component {
165
- render() {
166
- return _jsx(CustomErkNumberField, { ...this.props });
167
- }
168
- }
169
- export default ErkNumberField;