@spothero/ui 21.2.0 → 21.3.0
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.
|
@@ -20,6 +20,7 @@ const FormControl = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
20
20
|
errorMessage,
|
|
21
21
|
isFieldset,
|
|
22
22
|
isOptional,
|
|
23
|
+
customRequiredText,
|
|
23
24
|
...props
|
|
24
25
|
} = _ref;
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement(_react2.FormControl, (0, _extends2.default)({}, props, {
|
|
@@ -33,7 +34,12 @@ const FormControl = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
33
34
|
fontSize: "sm",
|
|
34
35
|
htmlFor: inputId,
|
|
35
36
|
as: isFieldset ? 'legend' : 'label',
|
|
36
|
-
requiredIndicator:
|
|
37
|
+
requiredIndicator: props?.isRequired && customRequiredText ? /*#__PURE__*/_react.default.createElement(_react2.Text, {
|
|
38
|
+
marginLeft: 1,
|
|
39
|
+
as: "span",
|
|
40
|
+
variant: "caption",
|
|
41
|
+
color: "text.secondary.light"
|
|
42
|
+
}, customRequiredText) : null,
|
|
37
43
|
optionalIndicator: isOptional && !props?.isRequired ? /*#__PURE__*/_react.default.createElement(_react2.Text, {
|
|
38
44
|
marginLeft: 1,
|
|
39
45
|
as: "span",
|
|
@@ -58,7 +64,8 @@ FormControl.propTypes = {
|
|
|
58
64
|
children: _propTypes.default.element,
|
|
59
65
|
isFieldset: _propTypes.default.bool,
|
|
60
66
|
isOptional: _propTypes.default.bool,
|
|
61
|
-
isRequired: _propTypes.default.bool
|
|
67
|
+
isRequired: _propTypes.default.bool,
|
|
68
|
+
customRequiredText: _propTypes.default.string
|
|
62
69
|
};
|
|
63
70
|
var _default = FormControl;
|
|
64
71
|
exports.default = _default;
|
|
@@ -21,6 +21,7 @@ const Input = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
21
21
|
isDisabled,
|
|
22
22
|
isRequired,
|
|
23
23
|
isOptional,
|
|
24
|
+
customRequiredText,
|
|
24
25
|
...props
|
|
25
26
|
} = _ref;
|
|
26
27
|
const classes = (0, _classnames.default)({
|
|
@@ -34,7 +35,8 @@ const Input = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
34
35
|
errorMessage: errorMessage,
|
|
35
36
|
helperText: helperText,
|
|
36
37
|
label: label,
|
|
37
|
-
inputId: props.id
|
|
38
|
+
inputId: props.id,
|
|
39
|
+
customRequiredText: customRequiredText
|
|
38
40
|
}, /*#__PURE__*/_react.default.createElement(_react2.Input, (0, _extends2.default)({
|
|
39
41
|
ref: ref,
|
|
40
42
|
className: classes
|
package/dist/components/index.js
CHANGED
|
@@ -80,7 +80,8 @@ var _exportNames = {
|
|
|
80
80
|
BasicInput: true,
|
|
81
81
|
useControllableState: true,
|
|
82
82
|
usePrefersReducedMotion: true,
|
|
83
|
-
keyframes: true
|
|
83
|
+
keyframes: true,
|
|
84
|
+
BoxProps: true
|
|
84
85
|
};
|
|
85
86
|
Object.defineProperty(exports, "Alert", {
|
|
86
87
|
enumerable: true,
|
|
@@ -118,6 +119,12 @@ Object.defineProperty(exports, "Box", {
|
|
|
118
119
|
return _react.Box;
|
|
119
120
|
}
|
|
120
121
|
});
|
|
122
|
+
Object.defineProperty(exports, "BoxProps", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function () {
|
|
125
|
+
return _react.BoxProps;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
121
128
|
Object.defineProperty(exports, "Breadcrumb", {
|
|
122
129
|
enumerable: true,
|
|
123
130
|
get: function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spothero/ui",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.3.0",
|
|
4
4
|
"description": "SpotHero's React component UI library.",
|
|
5
5
|
"main": "./dist/components/index.js",
|
|
6
6
|
"exports": "./dist/components/index.js",
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
"moment-timezone": "0.5.40",
|
|
84
84
|
"msw": "0.27.0",
|
|
85
85
|
"prop-types": "15.7.2",
|
|
86
|
-
"push-dir": "0.4.1",
|
|
87
86
|
"react": "18.2.0",
|
|
88
87
|
"react-dom": "18.2.0",
|
|
89
88
|
"react-hot-loader": "4.12.21",
|
|
@@ -95,14 +94,14 @@
|
|
|
95
94
|
"webpack-merge": "5.1.4",
|
|
96
95
|
"css-loader": "5.1.3",
|
|
97
96
|
"sass-loader": "10.2.1",
|
|
98
|
-
"@spothero/babel-preset-spothero": "5.0.0",
|
|
99
97
|
"@spothero/browserslist-config": "4.0.0",
|
|
100
98
|
"@spothero/core": "7.0.0",
|
|
99
|
+
"@spothero/babel-preset-spothero": "5.0.0",
|
|
101
100
|
"@spothero/eslint-config": "6.0.0",
|
|
102
|
-
"@spothero/icons": "8.0.
|
|
103
|
-
"@spothero/npm-publisher": "7.0.0",
|
|
101
|
+
"@spothero/icons": "8.0.1",
|
|
104
102
|
"@spothero/prettier-config": "4.0.0",
|
|
105
|
-
"@spothero/stylelint-config": "6.0.0"
|
|
103
|
+
"@spothero/stylelint-config": "6.0.0",
|
|
104
|
+
"@spothero/npm-publisher": "7.0.0"
|
|
106
105
|
},
|
|
107
106
|
"dependencies": {
|
|
108
107
|
"@chakra-ui/react": "1.8.8",
|
|
@@ -139,8 +138,8 @@
|
|
|
139
138
|
"test:unit:watch": "DEBUG_PRINT_LIMIT=-1 pnpm run test:template -- --watch",
|
|
140
139
|
"build:v2": "BABEL_ENV=production babel src -d dist",
|
|
141
140
|
"build": "pnpm run clean && pnpm run build:v2",
|
|
142
|
-
"build:storybook": "NODE_OPTIONS=--openssl-legacy-provider build-storybook -o ./docs/v2",
|
|
143
141
|
"release": "npm-release",
|
|
144
|
-
"
|
|
142
|
+
"build-storybook": "NODE_OPTIONS=--openssl-legacy-provider build-storybook -o ./docs/v2",
|
|
143
|
+
"publish-storybook": "pnpm run build:storybook"
|
|
145
144
|
}
|
|
146
145
|
}
|