@dartech/arsenal-ui 1.3.26 → 1.3.28

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/index.js CHANGED
@@ -38,8 +38,6 @@ import { format, isMatch, isValid, parse } from 'date-fns';
38
38
  import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
39
39
  import { TimePicker } from '@mui/x-date-pickers/TimePicker';
40
40
  import Chip from '@mui/material/Chip';
41
- import InputLabel from '@mui/material/InputLabel';
42
- import AddIcon from '@mui/icons-material/Add';
43
41
  import Grid from '@mui/material/Unstable_Grid2/Grid2';
44
42
  import { toString, parse as parse$1 } from 'duration-fns';
45
43
  import Pagination from '@mui/material/Pagination';
@@ -73,6 +71,7 @@ import StepContent from '@mui/material/StepContent';
73
71
  import StepConnector from '@mui/material/StepConnector';
74
72
  import Select from '@mui/material/Select';
75
73
  import CloseIcon from '@mui/icons-material/Close';
74
+ import InputLabel from '@mui/material/InputLabel';
76
75
  import classnames from 'classnames';
77
76
  import { toast } from 'react-toastify';
78
77
  import CssBaseline from '@mui/material/CssBaseline';
@@ -257,7 +256,16 @@ const ControlInput = _a => {
257
256
  type: "text",
258
257
  inputRef: ref,
259
258
  name: name,
260
- label: label,
259
+ label: required ? jsxs(Fragment, {
260
+ children: [label, " ", jsx("span", {
261
+ children: "*"
262
+ })]
263
+ }) : label,
264
+ sx: {
265
+ '.MuiInputLabel-root span': {
266
+ color: '#D6331F'
267
+ }
268
+ },
261
269
  error: !!error,
262
270
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
263
271
  disabled: disabled,
@@ -363,7 +371,16 @@ const ControlDebouncedInput = _a => {
363
371
  type: "text",
364
372
  inputRef: ref,
365
373
  name: name,
366
- label: label,
374
+ label: required ? jsxs(Fragment, {
375
+ children: [label, " ", jsx("span", {
376
+ children: "*"
377
+ })]
378
+ }) : label,
379
+ sx: {
380
+ '.MuiInputLabel-root span': {
381
+ color: '#D6331F'
382
+ }
383
+ },
367
384
  error: !!error,
368
385
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
369
386
  disabled: disabled,
@@ -441,7 +458,16 @@ const ControlSelect = _a => {
441
458
  type: "text",
442
459
  inputRef: ref,
443
460
  name: name,
444
- label: label,
461
+ label: required ? jsxs(Fragment, {
462
+ children: [label, " ", jsx("span", {
463
+ children: "*"
464
+ })]
465
+ }) : label,
466
+ sx: {
467
+ '.MuiInputLabel-root span': {
468
+ color: '#D6331F'
469
+ }
470
+ },
445
471
  error: !!error,
446
472
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
447
473
  disabled: disabled,
@@ -735,7 +761,16 @@ const ControlAutocomplete = _a => {
735
761
  return jsx(TextField, Object.assign({}, params, {
736
762
  variant: "outlined",
737
763
  name: name,
738
- label: label,
764
+ label: required ? jsxs(Fragment, {
765
+ children: [label, " ", jsx("span", {
766
+ children: "*"
767
+ })]
768
+ }) : label,
769
+ sx: {
770
+ '.MuiInputLabel-root span': {
771
+ color: '#D6331F'
772
+ }
773
+ },
739
774
  error: !!error,
740
775
  inputRef: ref,
741
776
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message)
@@ -888,7 +923,16 @@ function ControlQueryAutocomplete(_a) {
888
923
  },
889
924
  renderOption: renderOption,
890
925
  renderInput: params => jsx(TextField, Object.assign({}, params, {
891
- label: label,
926
+ label: required ? jsxs(Fragment, {
927
+ children: [label, " ", jsx("span", {
928
+ children: "*"
929
+ })]
930
+ }) : label,
931
+ sx: {
932
+ '.MuiInputLabel-root span': {
933
+ color: '#D6331F'
934
+ }
935
+ },
892
936
  variant: "outlined",
893
937
  error: !!error,
894
938
  inputRef: ref,
@@ -1058,7 +1102,14 @@ const ControlAceEditor = /*#__PURE__*/forwardRef((_a, ref) => {
1058
1102
  marginRight: 10
1059
1103
  }
1060
1104
  }, {
1061
- children: label
1105
+ children: required ? jsxs(Fragment, {
1106
+ children: [label, " ", jsx(Box, Object.assign({
1107
+ component: "span",
1108
+ color: "#D6331F"
1109
+ }, {
1110
+ children: "*"
1111
+ }))]
1112
+ }) : label
1062
1113
  }))
1063
1114
  }), jsxs(Fragment, {
1064
1115
  children: [jsx(CodeMirror, Object.assign({
@@ -1834,7 +1885,16 @@ const ControlNumberInput = _a => {
1834
1885
  type: "text",
1835
1886
  inputRef: ref,
1836
1887
  name: name,
1837
- label: label,
1888
+ label: required ? jsxs(Fragment, {
1889
+ children: [label, " ", jsx("span", {
1890
+ children: "*"
1891
+ })]
1892
+ }) : label,
1893
+ sx: {
1894
+ '.MuiInputLabel-root span': {
1895
+ color: '#D6331F'
1896
+ }
1897
+ },
1838
1898
  error: !!error,
1839
1899
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
1840
1900
  disabled: disabled,
@@ -1942,7 +2002,11 @@ const ControlDate = ({
1942
2002
  onChange(isValid(date) ? format(date, _format) : date);
1943
2003
  };
1944
2004
  return jsx(DatePicker, {
1945
- label: label,
2005
+ label: required ? jsxs(Fragment, {
2006
+ children: [label, " ", jsx("span", {
2007
+ children: "*"
2008
+ })]
2009
+ }) : label,
1946
2010
  inputRef: ref,
1947
2011
  inputFormat: _format,
1948
2012
  value: value || null,
@@ -1950,6 +2014,11 @@ const ControlDate = ({
1950
2014
  renderInput: props => jsx(TextField, Object.assign({}, props, {
1951
2015
  fullWidth: true,
1952
2016
  size: "small",
2017
+ sx: {
2018
+ '.MuiInputLabel-root span': {
2019
+ color: '#D6331F'
2020
+ }
2021
+ },
1953
2022
  variant: "outlined",
1954
2023
  name: name,
1955
2024
  error: !!error,
@@ -1998,13 +2067,22 @@ const ControlDateTime = ({
1998
2067
  mask: "",
1999
2068
  ampm: false,
2000
2069
  inputRef: ref,
2001
- label: label,
2070
+ label: required ? jsxs(Fragment, {
2071
+ children: [label, " ", jsx("span", {
2072
+ children: "*"
2073
+ })]
2074
+ }) : label,
2002
2075
  value: value || null,
2003
2076
  inputFormat: _format,
2004
2077
  onChange: handleChange,
2005
2078
  renderInput: props => jsx(TextField, Object.assign({}, props, {
2006
2079
  fullWidth: true,
2007
2080
  size: "small",
2081
+ sx: {
2082
+ '.MuiInputLabel-root span': {
2083
+ color: '#D6331F'
2084
+ }
2085
+ },
2008
2086
  variant: "outlined",
2009
2087
  name: name,
2010
2088
  error: !!error,
@@ -2063,7 +2141,11 @@ const ControlTime = ({
2063
2141
  return jsx(TimePicker, {
2064
2142
  mask: "",
2065
2143
  inputRef: ref,
2066
- label: label,
2144
+ label: required ? jsxs(Fragment, {
2145
+ children: [label, " ", jsx("span", {
2146
+ children: "*"
2147
+ })]
2148
+ }) : label,
2067
2149
  ampm: false,
2068
2150
  value: fieldValue,
2069
2151
  inputFormat: _format,
@@ -2071,6 +2153,11 @@ const ControlTime = ({
2071
2153
  renderInput: props => jsx(TextField, Object.assign({}, props, {
2072
2154
  fullWidth: true,
2073
2155
  size: "small",
2156
+ sx: {
2157
+ '.MuiInputLabel-root span': {
2158
+ color: '#D6331F'
2159
+ }
2160
+ },
2074
2161
  variant: "outlined",
2075
2162
  name: name,
2076
2163
  error: !!error,
@@ -2132,9 +2219,18 @@ const ControlArrayInput = ({
2132
2219
  }
2133
2220
  }, [handleAdd]);
2134
2221
  return jsxs(Fragment, {
2135
- children: [jsx(InputLabel, {
2136
- children: label
2137
- }), jsx(Box, Object.assign({
2222
+ children: [jsx(Typography, Object.assign({
2223
+ variant: "subtitle1"
2224
+ }, {
2225
+ children: required ? jsxs(Fragment, {
2226
+ children: [label, " ", jsx(Box, Object.assign({
2227
+ component: "span",
2228
+ color: "#D6331F"
2229
+ }, {
2230
+ children: "*"
2231
+ }))]
2232
+ }) : label
2233
+ })), jsx(Box, Object.assign({
2138
2234
  display: "flex",
2139
2235
  flexWrap: "wrap"
2140
2236
  }, {
@@ -2168,7 +2264,11 @@ const ControlArrayInput = ({
2168
2264
  onClick: handleAdd,
2169
2265
  disabled: !!((_c = errors[name]) === null || _c === void 0 ? void 0 : _c.message)
2170
2266
  }, {
2171
- children: jsx(AddIcon, {})
2267
+ children: jsx(SvgIcon, {
2268
+ children: jsx("path", {
2269
+ d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
2270
+ })
2271
+ })
2172
2272
  }))
2173
2273
  }
2174
2274
  })]
@@ -2225,7 +2325,14 @@ const ControlPeriodInput = ({
2225
2325
  }))), jsx(Typography, Object.assign({
2226
2326
  variant: "subtitle1"
2227
2327
  }, {
2228
- children: _label
2328
+ children: required ? jsxs(Fragment, {
2329
+ children: [_label, " ", jsx(Box, Object.assign({
2330
+ component: "span",
2331
+ color: "#D6331F"
2332
+ }, {
2333
+ children: "*"
2334
+ }))]
2335
+ }) : _label
2229
2336
  })), error && jsx(FormHelperText, Object.assign({
2230
2337
  error: true
2231
2338
  }, {
@@ -3030,9 +3137,6 @@ const StepperView = ({
3030
3137
  return jsxs(Stepper, Object.assign({
3031
3138
  nonLinear: true,
3032
3139
  orientation: "vertical",
3033
- sx: {
3034
- padding: 12
3035
- },
3036
3140
  connector: jsx(StepConnector, {
3037
3141
  sx: {
3038
3142
  marginLeft: 4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.26",
3
+ "version": "1.3.28",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  format: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PropertyUnion } from '../../../interfaces';
2
3
  type PropertyItemProps = {
3
4
  property: PropertyUnion;