@spark-web/field 2.0.1 → 3.0.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.
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var react = require('react');
|
|
6
|
-
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
7
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
6
|
var css = require('@emotion/css');
|
|
9
7
|
var a11y = require('@spark-web/a11y');
|
|
10
8
|
var box = require('@spark-web/box');
|
|
@@ -27,8 +25,6 @@ function useFieldContext() {
|
|
|
27
25
|
return ctx;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
var _excluded = ["children"];
|
|
31
|
-
|
|
32
28
|
/**
|
|
33
29
|
* Using a [context](https://reactjs.org/docs/context.html), the field
|
|
34
30
|
* component connects the label, description, and message to the input element.
|
|
@@ -177,8 +173,7 @@ var FieldMessage = function FieldMessage(_ref3) {
|
|
|
177
173
|
};
|
|
178
174
|
|
|
179
175
|
function IndicatorContainer(_ref4) {
|
|
180
|
-
var children = _ref4.children
|
|
181
|
-
props = _objectWithoutProperties(_ref4, _excluded);
|
|
176
|
+
var children = _ref4.children;
|
|
182
177
|
|
|
183
178
|
var _useTheme = theme.useTheme(),
|
|
184
179
|
typography = _useTheme.typography,
|
|
@@ -195,16 +190,15 @@ function IndicatorContainer(_ref4) {
|
|
|
195
190
|
height: tablet.capHeight
|
|
196
191
|
}
|
|
197
192
|
});
|
|
198
|
-
return /*#__PURE__*/jsxRuntime.jsx(box.Box,
|
|
193
|
+
return /*#__PURE__*/jsxRuntime.jsx(box.Box, {
|
|
199
194
|
display: "flex",
|
|
200
195
|
alignItems: "center",
|
|
201
196
|
"aria-hidden": true,
|
|
202
197
|
cursor: "default",
|
|
203
198
|
flexShrink: 0,
|
|
204
|
-
className: css.css(responsiveStyles)
|
|
205
|
-
}, props), {}, {
|
|
199
|
+
className: css.css(responsiveStyles),
|
|
206
200
|
children: children
|
|
207
|
-
})
|
|
201
|
+
});
|
|
208
202
|
}
|
|
209
203
|
|
|
210
204
|
exports.Field = Field;
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var react = require('react');
|
|
6
|
-
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
7
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
6
|
var css = require('@emotion/css');
|
|
9
7
|
var a11y = require('@spark-web/a11y');
|
|
10
8
|
var box = require('@spark-web/box');
|
|
@@ -27,8 +25,6 @@ function useFieldContext() {
|
|
|
27
25
|
return ctx;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
var _excluded = ["children"];
|
|
31
|
-
|
|
32
28
|
/**
|
|
33
29
|
* Using a [context](https://reactjs.org/docs/context.html), the field
|
|
34
30
|
* component connects the label, description, and message to the input element.
|
|
@@ -177,8 +173,7 @@ var FieldMessage = function FieldMessage(_ref3) {
|
|
|
177
173
|
};
|
|
178
174
|
|
|
179
175
|
function IndicatorContainer(_ref4) {
|
|
180
|
-
var children = _ref4.children
|
|
181
|
-
props = _objectWithoutProperties(_ref4, _excluded);
|
|
176
|
+
var children = _ref4.children;
|
|
182
177
|
|
|
183
178
|
var _useTheme = theme.useTheme(),
|
|
184
179
|
typography = _useTheme.typography,
|
|
@@ -195,16 +190,15 @@ function IndicatorContainer(_ref4) {
|
|
|
195
190
|
height: tablet.capHeight
|
|
196
191
|
}
|
|
197
192
|
});
|
|
198
|
-
return /*#__PURE__*/jsxRuntime.jsx(box.Box,
|
|
193
|
+
return /*#__PURE__*/jsxRuntime.jsx(box.Box, {
|
|
199
194
|
display: "flex",
|
|
200
195
|
alignItems: "center",
|
|
201
196
|
"aria-hidden": true,
|
|
202
197
|
cursor: "default",
|
|
203
198
|
flexShrink: 0,
|
|
204
|
-
className: css.css(responsiveStyles)
|
|
205
|
-
}, props), {}, {
|
|
199
|
+
className: css.css(responsiveStyles),
|
|
206
200
|
children: children
|
|
207
|
-
})
|
|
201
|
+
});
|
|
208
202
|
}
|
|
209
203
|
|
|
210
204
|
exports.Field = Field;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { createContext, useContext, forwardRef, Fragment } from 'react';
|
|
2
|
-
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
|
|
3
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
2
|
import { css } from '@emotion/css';
|
|
5
3
|
import { mergeIds, useId, composeId, VisuallyHidden } from '@spark-web/a11y';
|
|
6
4
|
import { Box } from '@spark-web/box';
|
|
@@ -23,8 +21,6 @@ function useFieldContext() {
|
|
|
23
21
|
return ctx;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
var _excluded = ["children"];
|
|
27
|
-
|
|
28
24
|
/**
|
|
29
25
|
* Using a [context](https://reactjs.org/docs/context.html), the field
|
|
30
26
|
* component connects the label, description, and message to the input element.
|
|
@@ -173,8 +169,7 @@ var FieldMessage = function FieldMessage(_ref3) {
|
|
|
173
169
|
};
|
|
174
170
|
|
|
175
171
|
function IndicatorContainer(_ref4) {
|
|
176
|
-
var children = _ref4.children
|
|
177
|
-
props = _objectWithoutProperties(_ref4, _excluded);
|
|
172
|
+
var children = _ref4.children;
|
|
178
173
|
|
|
179
174
|
var _useTheme = useTheme(),
|
|
180
175
|
typography = _useTheme.typography,
|
|
@@ -191,16 +186,15 @@ function IndicatorContainer(_ref4) {
|
|
|
191
186
|
height: tablet.capHeight
|
|
192
187
|
}
|
|
193
188
|
});
|
|
194
|
-
return /*#__PURE__*/jsx(Box,
|
|
189
|
+
return /*#__PURE__*/jsx(Box, {
|
|
195
190
|
display: "flex",
|
|
196
191
|
alignItems: "center",
|
|
197
192
|
"aria-hidden": true,
|
|
198
193
|
cursor: "default",
|
|
199
194
|
flexShrink: 0,
|
|
200
|
-
className: css(responsiveStyles)
|
|
201
|
-
}, props), {}, {
|
|
195
|
+
className: css(responsiveStyles),
|
|
202
196
|
children: children
|
|
203
|
-
})
|
|
197
|
+
});
|
|
204
198
|
}
|
|
205
199
|
|
|
206
200
|
export { Field, FieldContextProvider, FieldMessage, useFieldContext, useFieldIds };
|