@scenid/react-formulator 1.0.0 → 1.0.1

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/dist/index.cjs.js CHANGED
@@ -84114,12 +84114,21 @@ var useStyles = styles$o.makeStyles(function (theme) {
84114
84114
  borderRadius: 0
84115
84115
  },
84116
84116
  spanSolitaryToCard: {
84117
- margin: theme.spacing(2) * -1
84117
+ margin: theme.spacing(2) * -1,
84118
+ padding: theme.spacing(2)
84118
84119
  },
84119
84120
  spanBannerToCard: {
84121
+ marginTop: theme.spacing(1),
84120
84122
  marginRight: theme.spacing(2) * -1,
84121
- marginBottom: theme.spacing(0.5) * -1,
84122
- marginLeft: theme.spacing(2) * -1
84123
+ marginBottom: theme.spacing(0.5),
84124
+ marginLeft: theme.spacing(2) * -1,
84125
+ padding: theme.spacing(2),
84126
+ '&.clickable': {
84127
+ paddingTop: theme.spacing(1.5),
84128
+ paddingRight: theme.spacing(2),
84129
+ paddingBottom: theme.spacing(1.5),
84130
+ paddingLeft: theme.spacing(2)
84131
+ }
84123
84132
  },
84124
84133
  checked: {
84125
84134
  backgroundColor: colorManipulator.alpha(theme.palette.primary.main, 0.12)
@@ -84164,13 +84173,15 @@ var FormPrimaryToggle = function FormPrimaryToggle(_ref) {
84164
84173
  };
84165
84174
 
84166
84175
  var handleToggleChange = function handleToggleChange() {
84167
- var newValue = Boolean(!value);
84168
- onChange({
84169
- target: {
84170
- name: name,
84171
- value: newValue
84172
- }
84173
- });
84176
+ if (!readOnly) {
84177
+ var newValue = Boolean(!value);
84178
+ onChange({
84179
+ target: {
84180
+ name: name,
84181
+ value: newValue
84182
+ }
84183
+ });
84184
+ }
84174
84185
  };
84175
84186
 
84176
84187
  var checked = isChecked(value, defaultValue);
@@ -84184,8 +84195,7 @@ var FormPrimaryToggle = function FormPrimaryToggle(_ref) {
84184
84195
  display: "flex",
84185
84196
  flexDirection: "row",
84186
84197
  justifyContent: readOnly ? 'flex-start' : 'space-between',
84187
- alignItems: "center",
84188
- padding: 2
84198
+ alignItems: "center"
84189
84199
  }, readOnly && checked && /*#__PURE__*/React__default["default"].createElement(_Box__default["default"], {
84190
84200
  mr: 2,
84191
84201
  mb: -0.5
package/dist/index.esm.js CHANGED
@@ -84044,12 +84044,21 @@ var useStyles = makeStyles$1(function (theme) {
84044
84044
  borderRadius: 0
84045
84045
  },
84046
84046
  spanSolitaryToCard: {
84047
- margin: theme.spacing(2) * -1
84047
+ margin: theme.spacing(2) * -1,
84048
+ padding: theme.spacing(2)
84048
84049
  },
84049
84050
  spanBannerToCard: {
84051
+ marginTop: theme.spacing(1),
84050
84052
  marginRight: theme.spacing(2) * -1,
84051
- marginBottom: theme.spacing(0.5) * -1,
84052
- marginLeft: theme.spacing(2) * -1
84053
+ marginBottom: theme.spacing(0.5),
84054
+ marginLeft: theme.spacing(2) * -1,
84055
+ padding: theme.spacing(2),
84056
+ '&.clickable': {
84057
+ paddingTop: theme.spacing(1.5),
84058
+ paddingRight: theme.spacing(2),
84059
+ paddingBottom: theme.spacing(1.5),
84060
+ paddingLeft: theme.spacing(2)
84061
+ }
84053
84062
  },
84054
84063
  checked: {
84055
84064
  backgroundColor: alpha$2(theme.palette.primary.main, 0.12)
@@ -84094,13 +84103,15 @@ var FormPrimaryToggle = function FormPrimaryToggle(_ref) {
84094
84103
  };
84095
84104
 
84096
84105
  var handleToggleChange = function handleToggleChange() {
84097
- var newValue = Boolean(!value);
84098
- onChange({
84099
- target: {
84100
- name: name,
84101
- value: newValue
84102
- }
84103
- });
84106
+ if (!readOnly) {
84107
+ var newValue = Boolean(!value);
84108
+ onChange({
84109
+ target: {
84110
+ name: name,
84111
+ value: newValue
84112
+ }
84113
+ });
84114
+ }
84104
84115
  };
84105
84116
 
84106
84117
  var checked = isChecked(value, defaultValue);
@@ -84114,8 +84125,7 @@ var FormPrimaryToggle = function FormPrimaryToggle(_ref) {
84114
84125
  display: "flex",
84115
84126
  flexDirection: "row",
84116
84127
  justifyContent: readOnly ? 'flex-start' : 'space-between',
84117
- alignItems: "center",
84118
- padding: 2
84128
+ alignItems: "center"
84119
84129
  }, readOnly && checked && /*#__PURE__*/React__default.createElement(_Box, {
84120
84130
  mr: 2,
84121
84131
  mb: -0.5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scenid/react-formulator",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "repository": "https://dennykoch@bitbucket.org/scenid/react-formulator.git",