@uncinc/uncinc-react-kitchen-sink 2.16.5 → 2.16.6

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.
@@ -23,7 +23,7 @@ var GenericFormElement = function GenericFormElement(props) {
23
23
  descriptionAboveInput = _props$descriptionAbo === void 0 ? false : _props$descriptionAbo;
24
24
  return /*#__PURE__*/React.createElement("div", {
25
25
  className: error ? "FormElement ".concat(className, " error") : "FormElement ".concat(className)
26
- }, title && /*#__PURE__*/React.createElement("label", {
26
+ }, title && !includeFieldSet && /*#__PURE__*/React.createElement("label", {
27
27
  htmlFor: fieldName
28
28
  }, title, !required && displayRequiredIndicator === 'optional' && /*#__PURE__*/React.createElement("span", {
29
29
  className: "FormElement__optional ".concat(className, "__optional")
@@ -39,7 +39,11 @@ var GenericFormElement = function GenericFormElement(props) {
39
39
  }, includeFieldSet && /*#__PURE__*/React.createElement("fieldset", {
40
40
  "aria-describedby": "".concat(errorId, " ").concat(descriptionId),
41
41
  "aria-invalid": Boolean(error && touched)
42
- }, children), !includeFieldSet && /*#__PURE__*/React.createElement(React.Fragment, null, children)), description && !descriptionAboveInput && /*#__PURE__*/React.createElement(WysiwygField, {
42
+ }, title && /*#__PURE__*/React.createElement("legend", null, title, !required && displayRequiredIndicator === 'optional' && /*#__PURE__*/React.createElement("span", {
43
+ className: "FormElement__optional ".concat(className, "__optional")
44
+ }, t(['form.optional', ' - optioneel'])), required && displayRequiredIndicator === 'required' && /*#__PURE__*/React.createElement("span", {
45
+ className: "FormElement__required ".concat(className, "__required")
46
+ }, t(['form.required', ' - vereist']))), children), !includeFieldSet && children), description && !descriptionAboveInput && /*#__PURE__*/React.createElement(WysiwygField, {
43
47
  id: descriptionId,
44
48
  property: "schema:text",
45
49
  html: description,
@@ -3,7 +3,8 @@
3
3
  flex-direction: column;
4
4
  margin-bottom: 3rem;
5
5
 
6
- label {
6
+ label,
7
+ legend {
7
8
  font-size: 1.8rem;
8
9
  font-weight: 600;
9
10
  line-height: 1.89;
package/dist/index.d.ts CHANGED
@@ -77,6 +77,7 @@ export { default as useOnScreen } from "./hooks/useOnScreen";
77
77
  export { default as usePrevious } from "./hooks/usePrevious";
78
78
  export { default as useScrollPosition } from "./hooks/useScrollPosition";
79
79
  export { default as useWindowDimensions } from "./hooks/useWindowDimensions";
80
+ export { default as useTrapFocus } from "./hooks/useTrapFocus";
80
81
  export { default as useCookieStore } from "./hooks/useCookieStore";
81
82
  export { default as gtm } from "./helpers/gtm";
82
83
  export { default as useValueForCurrentViewPort } from "./helpers/useValueForCurrentViewPort";
package/dist/index.js CHANGED
@@ -90,6 +90,7 @@ export { default as useOnScreen } from './hooks/useOnScreen';
90
90
  export { default as usePrevious } from './hooks/usePrevious';
91
91
  export { default as useScrollPosition } from './hooks/useScrollPosition';
92
92
  export { default as useWindowDimensions } from './hooks/useWindowDimensions';
93
+ export { default as useTrapFocus } from './hooks/useTrapFocus';
93
94
  export { default as useCookieStore } from './hooks/useCookieStore';
94
95
 
95
96
  // Helpers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinc/uncinc-react-kitchen-sink",
3
- "version": "2.16.5",
3
+ "version": "2.16.6",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",