@atlaskit/form
Advanced tools
Comparing version 9.0.2 to 9.0.3
@@ -20,3 +20,3 @@ "use strict"; | ||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */ | ||
var fieldWrapperStyles = (0, _react2.css)({ | ||
@@ -248,10 +248,10 @@ marginTop: "var(--ds-space-100, 8px)" | ||
}); | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react2.jsx)("div", { | ||
css: fieldWrapperStyles, | ||
"data-testid": props.testId | ||
}, props.label && /*#__PURE__*/React.createElement(_label.Label, { | ||
}, props.label && (0, _react2.jsx)(_label.Label, { | ||
htmlFor: fieldId, | ||
id: "".concat(fieldId, "-label"), | ||
testId: props.testId && "".concat(props.testId, "--label") | ||
}, props.label, props.isRequired && /*#__PURE__*/React.createElement(_requiredAsterisk.default, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Provider, { | ||
}, props.label, props.isRequired && (0, _react2.jsx)(_requiredAsterisk.default, null), props.elementAfterLabel), (0, _react2.jsx)(_fieldIdContext.FieldId.Provider, { | ||
value: fieldId | ||
@@ -258,0 +258,0 @@ }, props.children({ |
@@ -9,2 +9,4 @@ "use strict"; | ||
var _label = require("./label"); | ||
/** @jsx jsx */ | ||
var fieldSetStyles = (0, _react.css)({ | ||
@@ -27,6 +29,6 @@ marginTop: "var(--ds-space-100, 8px)" | ||
legend = _ref.legend; | ||
return /*#__PURE__*/React.createElement("fieldset", { | ||
return (0, _react.jsx)("fieldset", { | ||
css: fieldSetStyles | ||
}, legend && /*#__PURE__*/React.createElement(_label.Legend, null, legend), children); | ||
}, legend && (0, _react.jsx)(_label.Legend, null, legend), children); | ||
}; | ||
var _default = exports.default = Fieldset; |
@@ -8,2 +8,4 @@ "use strict"; | ||
var _react = require("@emotion/react"); | ||
/** @jsx jsx */ | ||
var formFooterWrapperStyles = (0, _react.css)({ | ||
@@ -31,5 +33,5 @@ display: 'flex', | ||
children = _ref.children; | ||
return /*#__PURE__*/React.createElement("footer", { | ||
return (0, _react.jsx)("footer", { | ||
css: [formFooterWrapperStyles, align === 'start' && justifyContentStyles] | ||
}, children); | ||
} |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _typography = require("@atlaskit/theme/typography"); | ||
/** @jsx jsx */ | ||
var fontFamily = (0, _constants.fontFamily)(); | ||
@@ -39,3 +41,3 @@ var formHeaderContentStyles = (0, _react.css)({ | ||
var children = _ref.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: formHeaderContentStyles | ||
@@ -46,3 +48,3 @@ }, children); | ||
var children = _ref2.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: formHeaderDescriptionStyles | ||
@@ -53,3 +55,3 @@ }, children); | ||
var children = _ref3.children; | ||
return /*#__PURE__*/React.createElement("h2", { | ||
return (0, _react.jsx)("h2", { | ||
css: [lightH700Styles, formHeaderTitleStyles] | ||
@@ -60,3 +62,3 @@ }, children); | ||
var children = _ref4.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: formHeaderWrapperStyles | ||
@@ -80,4 +82,4 @@ }, children); | ||
title = _ref5.title; | ||
return /*#__PURE__*/React.createElement(FormHeaderWrapper, null, title && /*#__PURE__*/React.createElement(FormHeaderTitle, null, title), description && /*#__PURE__*/React.createElement(FormHeaderDescription, null, description), children && /*#__PURE__*/React.createElement(FormHeaderContent, null, children)); | ||
return (0, _react.jsx)(FormHeaderWrapper, null, title && (0, _react.jsx)(FormHeaderTitle, null, title), description && (0, _react.jsx)(FormHeaderDescription, null, description), children && (0, _react.jsx)(FormHeaderContent, null, children)); | ||
}; | ||
var _default = exports.default = FormHeader; |
@@ -9,2 +9,4 @@ "use strict"; | ||
var _typography = require("@atlaskit/theme/typography"); | ||
/** @jsx jsx */ | ||
var formSectionDescriptionStyles = (0, _react.css)({ | ||
@@ -33,3 +35,3 @@ marginBlockStart: "var(--ds-space-100, 8px)" | ||
var children = _ref.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: formSectionWrapperStyles | ||
@@ -40,3 +42,3 @@ }, children); | ||
var children = _ref2.children; | ||
return /*#__PURE__*/React.createElement("h3", { | ||
return (0, _react.jsx)("h3", { | ||
css: [formSectionTitleStyles, lightH600Styles] | ||
@@ -47,3 +49,3 @@ }, children); | ||
var children = _ref3.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return (0, _react.jsx)("div", { | ||
css: formSectionDescriptionStyles | ||
@@ -67,4 +69,4 @@ }, children); | ||
title = _ref4.title; | ||
return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(FormSectionTitle, null, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children); | ||
return (0, _react.jsx)(FormSectionWrapper, null, title && (0, _react.jsx)(FormSectionTitle, null, title), description && (0, _react.jsx)(FormSectionDescription, null, description), children); | ||
}; | ||
var _default = exports.default = FormSection; |
@@ -12,2 +12,4 @@ "use strict"; | ||
var _typography = require("@atlaskit/theme/typography"); | ||
/** @jsx jsx */ | ||
var fontFamily = (0, _constants.fontFamily)(); | ||
@@ -40,6 +42,6 @@ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage | ||
testId = _ref.testId; | ||
return /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("span", { | ||
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("span", { | ||
hidden: true, | ||
id: "label--".concat(id || htmlFor) | ||
}, children), /*#__PURE__*/React.createElement("label", { | ||
}, children), (0, _react2.jsx)("label", { | ||
css: fieldsetLabelStyles, | ||
@@ -59,3 +61,3 @@ id: id, | ||
var children = _ref2.children; | ||
return /*#__PURE__*/React.createElement("legend", { | ||
return (0, _react2.jsx)("legend", { | ||
css: fieldsetLabelStyles | ||
@@ -62,0 +64,0 @@ }, children); |
@@ -15,2 +15,4 @@ "use strict"; | ||
var _fieldIdContext = require("./field-id-context"); | ||
/** @jsx jsx */ | ||
/** | ||
@@ -56,3 +58,3 @@ * API for the internal `<Message />` component. This is not public API. | ||
var children = _ref.children; | ||
return /*#__PURE__*/React.createElement("span", { | ||
return (0, _react.jsx)("span", { | ||
css: iconWrapperStyles | ||
@@ -62,7 +64,7 @@ }, children); | ||
var messageIcons = { | ||
error: /*#__PURE__*/React.createElement(_error.default, { | ||
error: (0, _react.jsx)(_error.default, { | ||
size: "small", | ||
label: "error" | ||
}), | ||
valid: /*#__PURE__*/React.createElement(_success.default, { | ||
valid: (0, _react.jsx)(_success.default, { | ||
size: "small", | ||
@@ -88,4 +90,4 @@ label: "success" | ||
*/ | ||
var content = typeof children === 'string' ? children : /*#__PURE__*/React.createElement("span", null, children); | ||
return /*#__PURE__*/React.createElement("div", { | ||
var content = typeof children === 'string' ? children : (0, _react.jsx)("span", null, children); | ||
return (0, _react.jsx)("div", { | ||
css: [lightH200Styles, messageStyles, messageAppearanceStyles[appearance]], | ||
@@ -95,3 +97,3 @@ "data-testid": testId, | ||
"aria-live": "polite" | ||
}, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content); | ||
}, icon && (0, _react.jsx)(IconWrapper, null, icon), content); | ||
}; | ||
@@ -109,4 +111,4 @@ | ||
testId = _ref3.testId; | ||
return /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Consumer, null, function (fieldId) { | ||
return /*#__PURE__*/React.createElement(Message, { | ||
return (0, _react.jsx)(_fieldIdContext.FieldId.Consumer, null, function (fieldId) { | ||
return (0, _react.jsx)(Message, { | ||
fieldId: fieldId ? "".concat(fieldId, "-helper") : undefined, | ||
@@ -128,4 +130,4 @@ testId: testId | ||
testId = _ref4.testId; | ||
return /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Consumer, null, function (fieldId) { | ||
return /*#__PURE__*/React.createElement(Message, { | ||
return (0, _react.jsx)(_fieldIdContext.FieldId.Consumer, null, function (fieldId) { | ||
return (0, _react.jsx)(Message, { | ||
appearance: "error", | ||
@@ -148,4 +150,4 @@ fieldId: fieldId ? "".concat(fieldId, "-error") : undefined, | ||
testId = _ref5.testId; | ||
return /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Consumer, null, function (fieldId) { | ||
return /*#__PURE__*/React.createElement(Message, { | ||
return (0, _react.jsx)(_fieldIdContext.FieldId.Consumer, null, function (fieldId) { | ||
return (0, _react.jsx)(Message, { | ||
appearance: "valid", | ||
@@ -152,0 +154,0 @@ fieldId: fieldId ? "".concat(fieldId, "-valid") : undefined, |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _constants = require("@atlaskit/theme/constants"); | ||
/** @jsx jsx */ | ||
var fontFamily = (0, _constants.fontFamily)(); | ||
@@ -18,3 +20,3 @@ var requiredIndicatorStyles = (0, _react.css)({ | ||
function RequiredAsterisk() { | ||
return /*#__PURE__*/React.createElement("span", { | ||
return (0, _react.jsx)("span", { | ||
css: requiredIndicatorStyles, | ||
@@ -21,0 +23,0 @@ "aria-hidden": "true", |
@@ -0,3 +1,4 @@ | ||
/** @jsx jsx */ | ||
import { useContext, useEffect, useMemo, useRef, useState } from 'react'; | ||
import { css } from '@emotion/react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import { uid } from 'react-uid'; | ||
@@ -231,10 +232,10 @@ import invariant from 'tiny-invariant'; | ||
}; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: fieldWrapperStyles, | ||
"data-testid": props.testId | ||
}, props.label && /*#__PURE__*/React.createElement(Label, { | ||
}, props.label && jsx(Label, { | ||
htmlFor: fieldId, | ||
id: `${fieldId}-label`, | ||
testId: props.testId && `${props.testId}--label` | ||
}, props.label, props.isRequired && /*#__PURE__*/React.createElement(RequiredAsterisk, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(FieldId.Provider, { | ||
}, props.label, props.isRequired && jsx(RequiredAsterisk, null), props.elementAfterLabel), jsx(FieldId.Provider, { | ||
value: fieldId | ||
@@ -241,0 +242,0 @@ }, props.children({ |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { Legend } from './label'; | ||
@@ -21,6 +23,6 @@ const fieldSetStyles = css({ | ||
}) => { | ||
return /*#__PURE__*/React.createElement("fieldset", { | ||
return jsx("fieldset", { | ||
css: fieldSetStyles | ||
}, legend && /*#__PURE__*/React.createElement(Legend, null, legend), children); | ||
}, legend && jsx(Legend, null, legend), children); | ||
}; | ||
export default Fieldset; |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
const formFooterWrapperStyles = css({ | ||
@@ -24,5 +26,5 @@ display: 'flex', | ||
}) { | ||
return /*#__PURE__*/React.createElement("footer", { | ||
return jsx("footer", { | ||
css: [formFooterWrapperStyles, align === 'start' && justifyContentStyles] | ||
}, children); | ||
} |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants'; | ||
@@ -33,3 +35,3 @@ import { h700 } from '@atlaskit/theme/typography'; | ||
}) => { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formHeaderContentStyles | ||
@@ -41,3 +43,3 @@ }, children); | ||
}) => { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formHeaderDescriptionStyles | ||
@@ -49,3 +51,3 @@ }, children); | ||
}) => { | ||
return /*#__PURE__*/React.createElement("h2", { | ||
return jsx("h2", { | ||
css: [lightH700Styles, formHeaderTitleStyles] | ||
@@ -57,3 +59,3 @@ }, children); | ||
}) => { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formHeaderWrapperStyles | ||
@@ -78,5 +80,5 @@ }, children); | ||
}) => { | ||
return /*#__PURE__*/React.createElement(FormHeaderWrapper, null, title && /*#__PURE__*/React.createElement(FormHeaderTitle, null, title), description && /*#__PURE__*/React.createElement(FormHeaderDescription, null, description), children && /*#__PURE__*/React.createElement(FormHeaderContent, null, children)); | ||
return jsx(FormHeaderWrapper, null, title && jsx(FormHeaderTitle, null, title), description && jsx(FormHeaderDescription, null, description), children && jsx(FormHeaderContent, null, children)); | ||
}; | ||
export default FormHeader; | ||
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle }; |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { h600 } from '@atlaskit/theme/typography'; | ||
@@ -27,3 +29,3 @@ const formSectionDescriptionStyles = css({ | ||
}) => { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formSectionWrapperStyles | ||
@@ -35,3 +37,3 @@ }, children); | ||
}) => { | ||
return /*#__PURE__*/React.createElement("h3", { | ||
return jsx("h3", { | ||
css: [formSectionTitleStyles, lightH600Styles] | ||
@@ -43,3 +45,3 @@ }, children); | ||
}) => { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formSectionDescriptionStyles | ||
@@ -64,4 +66,4 @@ }, children); | ||
}) => { | ||
return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(FormSectionTitle, null, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children); | ||
return jsx(FormSectionWrapper, null, title && jsx(FormSectionTitle, null, title), description && jsx(FormSectionDescription, null, description), children); | ||
}; | ||
export default FormSection; |
@@ -0,3 +1,4 @@ | ||
/** @jsx jsx */ | ||
import { Fragment } from 'react'; | ||
import { css } from '@emotion/react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import { N200 } from '@atlaskit/theme/colors'; | ||
@@ -34,6 +35,6 @@ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants'; | ||
}) => { | ||
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", { | ||
return jsx(Fragment, null, jsx("span", { | ||
hidden: true, | ||
id: `label--${id || htmlFor}` | ||
}, children), /*#__PURE__*/React.createElement("label", { | ||
}, children), jsx("label", { | ||
css: fieldsetLabelStyles, | ||
@@ -54,3 +55,3 @@ id: id, | ||
}) => { | ||
return /*#__PURE__*/React.createElement("legend", { | ||
return jsx("legend", { | ||
css: fieldsetLabelStyles | ||
@@ -57,0 +58,0 @@ }, children); |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import SuccessIcon from '@atlaskit/icon/glyph/editor/success'; | ||
@@ -50,3 +52,3 @@ import ErrorIcon from '@atlaskit/icon/glyph/error'; | ||
}) => { | ||
return /*#__PURE__*/React.createElement("span", { | ||
return jsx("span", { | ||
css: iconWrapperStyles | ||
@@ -56,7 +58,7 @@ }, children); | ||
const messageIcons = { | ||
error: /*#__PURE__*/React.createElement(ErrorIcon, { | ||
error: jsx(ErrorIcon, { | ||
size: "small", | ||
label: "error" | ||
}), | ||
valid: /*#__PURE__*/React.createElement(SuccessIcon, { | ||
valid: jsx(SuccessIcon, { | ||
size: "small", | ||
@@ -82,4 +84,4 @@ label: "success" | ||
*/ | ||
const content = typeof children === 'string' ? children : /*#__PURE__*/React.createElement("span", null, children); | ||
return /*#__PURE__*/React.createElement("div", { | ||
const content = typeof children === 'string' ? children : jsx("span", null, children); | ||
return jsx("div", { | ||
css: [lightH200Styles, messageStyles, messageAppearanceStyles[appearance]], | ||
@@ -89,3 +91,3 @@ "data-testid": testId, | ||
"aria-live": "polite" | ||
}, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content); | ||
}, icon && jsx(IconWrapper, null, icon), content); | ||
}; | ||
@@ -103,3 +105,3 @@ | ||
testId | ||
}) => /*#__PURE__*/React.createElement(FieldId.Consumer, null, fieldId => /*#__PURE__*/React.createElement(Message, { | ||
}) => jsx(FieldId.Consumer, null, fieldId => jsx(Message, { | ||
fieldId: fieldId ? `${fieldId}-helper` : undefined, | ||
@@ -119,3 +121,3 @@ testId: testId | ||
testId | ||
}) => /*#__PURE__*/React.createElement(FieldId.Consumer, null, fieldId => /*#__PURE__*/React.createElement(Message, { | ||
}) => jsx(FieldId.Consumer, null, fieldId => jsx(Message, { | ||
appearance: "error", | ||
@@ -136,3 +138,3 @@ fieldId: fieldId ? `${fieldId}-error` : undefined, | ||
testId | ||
}) => /*#__PURE__*/React.createElement(FieldId.Consumer, null, fieldId => /*#__PURE__*/React.createElement(Message, { | ||
}) => jsx(FieldId.Consumer, null, fieldId => jsx(Message, { | ||
appearance: "valid", | ||
@@ -139,0 +141,0 @@ fieldId: fieldId ? `${fieldId}-valid` : undefined, |
@@ -1,2 +0,3 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { R400 } from '@atlaskit/theme/colors'; | ||
@@ -11,3 +12,3 @@ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants'; | ||
export default function RequiredAsterisk() { | ||
return /*#__PURE__*/React.createElement("span", { | ||
return jsx("span", { | ||
css: requiredIndicatorStyles, | ||
@@ -14,0 +15,0 @@ "aria-hidden": "true", |
@@ -6,4 +6,5 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | ||
/** @jsx jsx */ | ||
import { useContext, useEffect, useMemo, useRef, useState } from 'react'; | ||
import { css } from '@emotion/react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import { uid } from 'react-uid'; | ||
@@ -241,10 +242,10 @@ import invariant from 'tiny-invariant'; | ||
}); | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: fieldWrapperStyles, | ||
"data-testid": props.testId | ||
}, props.label && /*#__PURE__*/React.createElement(Label, { | ||
}, props.label && jsx(Label, { | ||
htmlFor: fieldId, | ||
id: "".concat(fieldId, "-label"), | ||
testId: props.testId && "".concat(props.testId, "--label") | ||
}, props.label, props.isRequired && /*#__PURE__*/React.createElement(RequiredAsterisk, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(FieldId.Provider, { | ||
}, props.label, props.isRequired && jsx(RequiredAsterisk, null), props.elementAfterLabel), jsx(FieldId.Provider, { | ||
value: fieldId | ||
@@ -251,0 +252,0 @@ }, props.children({ |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { Legend } from './label'; | ||
@@ -20,6 +22,6 @@ var fieldSetStyles = css({ | ||
legend = _ref.legend; | ||
return /*#__PURE__*/React.createElement("fieldset", { | ||
return jsx("fieldset", { | ||
css: fieldSetStyles | ||
}, legend && /*#__PURE__*/React.createElement(Legend, null, legend), children); | ||
}, legend && jsx(Legend, null, legend), children); | ||
}; | ||
export default Fieldset; |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
var formFooterWrapperStyles = css({ | ||
@@ -24,5 +26,5 @@ display: 'flex', | ||
children = _ref.children; | ||
return /*#__PURE__*/React.createElement("footer", { | ||
return jsx("footer", { | ||
css: [formFooterWrapperStyles, align === 'start' && justifyContentStyles] | ||
}, children); | ||
} |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants'; | ||
@@ -32,3 +34,3 @@ import { h700 } from '@atlaskit/theme/typography'; | ||
var children = _ref.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formHeaderContentStyles | ||
@@ -39,3 +41,3 @@ }, children); | ||
var children = _ref2.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formHeaderDescriptionStyles | ||
@@ -46,3 +48,3 @@ }, children); | ||
var children = _ref3.children; | ||
return /*#__PURE__*/React.createElement("h2", { | ||
return jsx("h2", { | ||
css: [lightH700Styles, formHeaderTitleStyles] | ||
@@ -53,3 +55,3 @@ }, children); | ||
var children = _ref4.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formHeaderWrapperStyles | ||
@@ -73,5 +75,5 @@ }, children); | ||
title = _ref5.title; | ||
return /*#__PURE__*/React.createElement(FormHeaderWrapper, null, title && /*#__PURE__*/React.createElement(FormHeaderTitle, null, title), description && /*#__PURE__*/React.createElement(FormHeaderDescription, null, description), children && /*#__PURE__*/React.createElement(FormHeaderContent, null, children)); | ||
return jsx(FormHeaderWrapper, null, title && jsx(FormHeaderTitle, null, title), description && jsx(FormHeaderDescription, null, description), children && jsx(FormHeaderContent, null, children)); | ||
}; | ||
export default FormHeader; | ||
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle }; |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { h600 } from '@atlaskit/theme/typography'; | ||
@@ -26,3 +28,3 @@ var formSectionDescriptionStyles = css({ | ||
var children = _ref.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formSectionWrapperStyles | ||
@@ -33,3 +35,3 @@ }, children); | ||
var children = _ref2.children; | ||
return /*#__PURE__*/React.createElement("h3", { | ||
return jsx("h3", { | ||
css: [formSectionTitleStyles, lightH600Styles] | ||
@@ -40,3 +42,3 @@ }, children); | ||
var children = _ref3.children; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return jsx("div", { | ||
css: formSectionDescriptionStyles | ||
@@ -60,4 +62,4 @@ }, children); | ||
title = _ref4.title; | ||
return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(FormSectionTitle, null, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children); | ||
return jsx(FormSectionWrapper, null, title && jsx(FormSectionTitle, null, title), description && jsx(FormSectionDescription, null, description), children); | ||
}; | ||
export default FormSection; |
@@ -0,3 +1,4 @@ | ||
/** @jsx jsx */ | ||
import { Fragment } from 'react'; | ||
import { css } from '@emotion/react'; | ||
import { css, jsx } from '@emotion/react'; | ||
import { N200 } from '@atlaskit/theme/colors'; | ||
@@ -33,6 +34,6 @@ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants'; | ||
testId = _ref.testId; | ||
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", { | ||
return jsx(Fragment, null, jsx("span", { | ||
hidden: true, | ||
id: "label--".concat(id || htmlFor) | ||
}, children), /*#__PURE__*/React.createElement("label", { | ||
}, children), jsx("label", { | ||
css: fieldsetLabelStyles, | ||
@@ -52,3 +53,3 @@ id: id, | ||
var children = _ref2.children; | ||
return /*#__PURE__*/React.createElement("legend", { | ||
return jsx("legend", { | ||
css: fieldsetLabelStyles | ||
@@ -55,0 +56,0 @@ }, children); |
@@ -1,2 +0,4 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import SuccessIcon from '@atlaskit/icon/glyph/editor/success'; | ||
@@ -49,3 +51,3 @@ import ErrorIcon from '@atlaskit/icon/glyph/error'; | ||
var children = _ref.children; | ||
return /*#__PURE__*/React.createElement("span", { | ||
return jsx("span", { | ||
css: iconWrapperStyles | ||
@@ -55,7 +57,7 @@ }, children); | ||
var messageIcons = { | ||
error: /*#__PURE__*/React.createElement(ErrorIcon, { | ||
error: jsx(ErrorIcon, { | ||
size: "small", | ||
label: "error" | ||
}), | ||
valid: /*#__PURE__*/React.createElement(SuccessIcon, { | ||
valid: jsx(SuccessIcon, { | ||
size: "small", | ||
@@ -81,4 +83,4 @@ label: "success" | ||
*/ | ||
var content = typeof children === 'string' ? children : /*#__PURE__*/React.createElement("span", null, children); | ||
return /*#__PURE__*/React.createElement("div", { | ||
var content = typeof children === 'string' ? children : jsx("span", null, children); | ||
return jsx("div", { | ||
css: [lightH200Styles, messageStyles, messageAppearanceStyles[appearance]], | ||
@@ -88,3 +90,3 @@ "data-testid": testId, | ||
"aria-live": "polite" | ||
}, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content); | ||
}, icon && jsx(IconWrapper, null, icon), content); | ||
}; | ||
@@ -102,4 +104,4 @@ | ||
testId = _ref3.testId; | ||
return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) { | ||
return /*#__PURE__*/React.createElement(Message, { | ||
return jsx(FieldId.Consumer, null, function (fieldId) { | ||
return jsx(Message, { | ||
fieldId: fieldId ? "".concat(fieldId, "-helper") : undefined, | ||
@@ -121,4 +123,4 @@ testId: testId | ||
testId = _ref4.testId; | ||
return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) { | ||
return /*#__PURE__*/React.createElement(Message, { | ||
return jsx(FieldId.Consumer, null, function (fieldId) { | ||
return jsx(Message, { | ||
appearance: "error", | ||
@@ -141,4 +143,4 @@ fieldId: fieldId ? "".concat(fieldId, "-error") : undefined, | ||
testId = _ref5.testId; | ||
return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) { | ||
return /*#__PURE__*/React.createElement(Message, { | ||
return jsx(FieldId.Consumer, null, function (fieldId) { | ||
return jsx(Message, { | ||
appearance: "valid", | ||
@@ -145,0 +147,0 @@ fieldId: fieldId ? "".concat(fieldId, "-valid") : undefined, |
@@ -1,2 +0,3 @@ | ||
import { css } from '@emotion/react'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { R400 } from '@atlaskit/theme/colors'; | ||
@@ -11,3 +12,3 @@ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants'; | ||
export default function RequiredAsterisk() { | ||
return /*#__PURE__*/React.createElement("span", { | ||
return jsx("span", { | ||
css: requiredIndicatorStyles, | ||
@@ -14,0 +15,0 @@ "aria-hidden": "true", |
{ | ||
"name": "@atlaskit/form", | ||
"version": "9.0.2", | ||
"version": "9.0.3", | ||
"description": "A form allows users to input information.", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is too big to display
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
4008
234044