sag_components 1.0.228 → 1.0.231

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.
@@ -29,7 +29,9 @@ var Datepicker = function Datepicker(_ref) {
29
29
  value = _ref.value,
30
30
  disableClearable = _ref.disableClearable,
31
31
  _ref$disabled = _ref.disabled,
32
- disabled = _ref$disabled === void 0 ? false : _ref$disabled;
32
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
33
+ _ref$labelColor = _ref.labelColor,
34
+ labelColor = _ref$labelColor === void 0 ? "#1B30AA" : _ref$labelColor;
33
35
  /**
34
36
  * SAG Datepicker
35
37
  */
@@ -53,38 +55,67 @@ var Datepicker = function Datepicker(_ref) {
53
55
  if (shape === "round") {
54
56
  // round
55
57
  return {
58
+ "& .MuiInputLabel-inputRoot": {
59
+ fontFamily: "Poppins",
60
+ fontSize: "14px",
61
+ fontWidth: 400,
62
+ paddingLeft: "10px !important",
63
+ borderRadius: "12px",
64
+ width: width
65
+ //color: labelColor,
66
+ },
67
+
56
68
  "& .MuiOutlinedInput-root": {
57
69
  borderRadius: "12px",
58
70
  fontFamily: "Poppins",
59
71
  fontSize: "14px",
60
72
  fontWidth: 400,
61
73
  width: width,
74
+ //color: labelColor,
62
75
  legend: {
63
- marginLeft: "6px"
76
+ marginLeft: "10px"
77
+ },
78
+ // This matches the specificity of the default styles at https://github.com/mui-org/material-ui/blob/v4.11.3/packages/material-ui-lab/src/Autocomplete/Autocomplete.js#L90
79
+ '&[class*="MuiOutlinedInput-root"] .MuiInputLabel-input:first-of-type': {
80
+ // Default left padding is 6px
81
+ paddingLeft: "10px"
82
+ },
83
+ "& .MuiOutlinedInput-notchedOutline": {
84
+ borderColor: "#E7E7E7"
85
+ //color: labelColor,
86
+ },
87
+
88
+ "&:hover .MuiOutlinedInput-notchedOutline": {
89
+ borderColor: disabled ? "#E7E7E7" : ""
90
+ //color: labelColor,
91
+ },
92
+
93
+ "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
94
+ //borderColor: labelColor,
95
+ //color: labelColor,
64
96
  }
65
97
  },
66
- "& .MuiAutocomplete-inputRoot": {
67
- fontFamily: "Poppins",
98
+ "& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)": {
99
+ // Default transform is "translate(14px, 20px) scale(1)""
100
+ // This lines up the label with the initial cursor position in the input
101
+ // after changing its padding-left.
102
+ transform: "translate(14px, 18px) scale(1);",
68
103
  fontSize: "14px",
69
- fontWidth: 400,
70
- paddingLeft: "10px !important",
71
- borderRadius: "12px",
72
- width: width
104
+ color: disabled ? "#E7E7E7" : valueState ? labelColor : "#757575"
73
105
  },
74
106
  "& .MuiInputLabel-outlined": {
75
107
  fontFamily: "Poppins",
76
- fontSize: "14px",
108
+ paddingLeft: "10px",
109
+ color: disabled ? "#E7E7E7" : valueState ? labelColor : "#757575",
77
110
  fontWidth: 400,
78
- paddingLeft: "10px"
111
+ fontSize: "18px"
79
112
  },
80
113
  "& .MuiInputLabel-shrink": {
81
- fontFamily: "Poppins",
82
- fontSize: "14px",
83
- fontWidth: 400,
84
114
  marginLeft: "1px",
85
115
  paddingLeft: "4px",
86
116
  paddingRight: 0,
87
117
  background: "white"
118
+ //color: labelColor,
88
119
  }
89
120
  };
90
121
  } else {
@@ -111,7 +111,7 @@ var Dropdown = function Dropdown(_ref) {
111
111
  "& .MuiOutlinedInput-root": {
112
112
  borderRadius: "12px",
113
113
  legend: {
114
- marginLeft: "6px"
114
+ marginLeft: "10px"
115
115
  }
116
116
  },
117
117
  "& .MuiAutocomplete-inputRoot": {
@@ -123,27 +123,26 @@ var Dropdown = function Dropdown(_ref) {
123
123
  paddingLeft: "10px"
124
124
  },
125
125
  "& .MuiOutlinedInput-notchedOutline": {
126
- borderColor: "#E7E7E7",
127
- color: labelColor
126
+ borderColor: "#E7E7E7"
128
127
  },
129
128
  "&:hover .MuiOutlinedInput-notchedOutline": {
130
- borderColor: labelColor
129
+ borderColor: disabled ? "#E7E7E7" : ""
131
130
  },
132
131
  "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
133
- borderColor: labelColor
132
+ //borderColor: "#757575",
134
133
  }
135
134
  },
136
135
  "& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)": {
137
136
  // Default transform is "translate(14px, 20px) scale(1)""
138
137
  // This lines up the label with the initial cursor position in the input
139
138
  // after changing its padding-left.
140
- transform: "translate(14px, 17px) scale(1);",
139
+ transform: "translate(14px, 18px) scale(1);",
141
140
  fontSize: "14px",
142
- color: "#212121"
141
+ color: disabled ? "#E7E7E7" : currentInputValue && currentInputValue.length > 0 ? "#212121" : "#757575"
143
142
  },
144
143
  "& .MuiInputLabel-outlined": {
145
144
  paddingLeft: "10px",
146
- color: labelColor,
145
+ color: disabled ? "#E7E7E7" : labelColor,
147
146
  fontSize: "18px"
148
147
  },
149
148
  "& .MuiInputLabel-shrink": {
@@ -163,6 +162,7 @@ var Dropdown = function Dropdown(_ref) {
163
162
  syntheticBaseEvent: event,
164
163
  inputValue: newInputValue
165
164
  });
165
+ console.log("newInputValue", newInputValue);
166
166
  };
167
167
  var onChangeHandler = function onChangeHandler(event, newValue) {
168
168
  setCurrentOption({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.228",
3
+ "version": "1.0.231",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {