@northlight/ui 2.12.5 → 2.13.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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@chakra-ui/react'), require('react'), require('chakra-react-select'), require('ramda'), require('@react-aria/focus'), require('react-hook-form'), require('@chakra-ui/system'), require('@northlight/tokens'), require('@northlight/icons'), require('@react-aria/checkbox'), require('@react-aria/radio'), require('@react-aria/utils'), require('@react-stately/radio'), require('@react-stately/checkbox'), require('@react-aria/datepicker'), require('@react-stately/datepicker'), require('@internationalized/date'), require('@react-aria/button'), require('@react-aria/i18n'), require('@react-stately/calendar'), require('@react-aria/calendar'), require('react-router-dom'), require('@chakra-ui/clickable'), require('framer-motion'), require('@dnd-kit/core'), require('@dnd-kit/utilities'), require('@dnd-kit/sortable'), require('@dnd-kit/modifiers'), require('react-window'), require('react-virtualized-auto-sizer'), require('react-avatar-editor'), require('@chakra-ui/theme-tools'), require('react-number-format'), require('react-input-mask')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@chakra-ui/react', 'react', 'chakra-react-select', 'ramda', '@react-aria/focus', 'react-hook-form', '@chakra-ui/system', '@northlight/tokens', '@northlight/icons', '@react-aria/checkbox', '@react-aria/radio', '@react-aria/utils', '@react-stately/radio', '@react-stately/checkbox', '@react-aria/datepicker', '@react-stately/datepicker', '@internationalized/date', '@react-aria/button', '@react-aria/i18n', '@react-stately/calendar', '@react-aria/calendar', 'react-router-dom', '@chakra-ui/clickable', 'framer-motion', '@dnd-kit/core', '@dnd-kit/utilities', '@dnd-kit/sortable', '@dnd-kit/modifiers', 'react-window', 'react-virtualized-auto-sizer', 'react-avatar-editor', '@chakra-ui/theme-tools', 'react-number-format', 'react-input-mask'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.northlight = {}, global.react, global.React, global.chakraReactSelect, global.ramda, global.focus, global.reactHookForm, global.system, global.tokens, global.icons, global.checkbox$1, global.radio$1, global.utils, global.radio, global.checkbox, global.datepicker, global.datepicker$1, global.date, global.button, global.i18n, global.calendar$1, global.calendar, global.reactRouterDom, global.clickable, global.framerMotion, global.core, global.utilities, global.sortable, global.modifiers, global.reactWindow, global.AutoSizer, global.AvatarEditor, global.themeTools, global.reactNumberFormat, global.InputMask));
5
- })(this, (function (exports, react, React, chakraReactSelect, ramda, focus, reactHookForm, system, tokens, icons, checkbox$1, radio$1, utils, radio, checkbox, datepicker, datepicker$1, date, button, i18n, calendar$1, calendar, reactRouterDom, clickable, framerMotion, core, utilities, sortable, modifiers, reactWindow, AutoSizer, AvatarEditor, themeTools, reactNumberFormat, InputMask) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@chakra-ui/react'), require('react'), require('chakra-react-select'), require('ramda'), require('@react-aria/focus'), require('react-hook-form'), require('@chakra-ui/system'), require('@northlight/tokens'), require('@northlight/icons'), require('@hookform/resolvers/joi'), require('@react-aria/checkbox'), require('@react-aria/radio'), require('@react-aria/utils'), require('@react-stately/radio'), require('@react-stately/checkbox'), require('@react-aria/datepicker'), require('@react-stately/datepicker'), require('@internationalized/date'), require('@react-aria/button'), require('@react-aria/i18n'), require('@react-stately/calendar'), require('@react-aria/calendar'), require('react-router-dom'), require('@chakra-ui/clickable'), require('framer-motion'), require('@dnd-kit/core'), require('@dnd-kit/utilities'), require('@dnd-kit/sortable'), require('@dnd-kit/modifiers'), require('react-window'), require('react-virtualized-auto-sizer'), require('react-avatar-editor'), require('@chakra-ui/theme-tools'), require('react-number-format'), require('react-input-mask')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@chakra-ui/react', 'react', 'chakra-react-select', 'ramda', '@react-aria/focus', 'react-hook-form', '@chakra-ui/system', '@northlight/tokens', '@northlight/icons', '@hookform/resolvers/joi', '@react-aria/checkbox', '@react-aria/radio', '@react-aria/utils', '@react-stately/radio', '@react-stately/checkbox', '@react-aria/datepicker', '@react-stately/datepicker', '@internationalized/date', '@react-aria/button', '@react-aria/i18n', '@react-stately/calendar', '@react-aria/calendar', 'react-router-dom', '@chakra-ui/clickable', 'framer-motion', '@dnd-kit/core', '@dnd-kit/utilities', '@dnd-kit/sortable', '@dnd-kit/modifiers', 'react-window', 'react-virtualized-auto-sizer', 'react-avatar-editor', '@chakra-ui/theme-tools', 'react-number-format', 'react-input-mask'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.northlight = {}, global.react, global.React, global.chakraReactSelect, global.ramda, global.focus, global.reactHookForm, global.system, global.tokens, global.icons, global.joi, global.checkbox$1, global.radio$1, global.utils, global.radio, global.checkbox, global.datepicker, global.datepicker$1, global.date, global.button, global.i18n, global.calendar$1, global.calendar, global.reactRouterDom, global.clickable, global.framerMotion, global.core, global.utilities, global.sortable, global.modifiers, global.reactWindow, global.AutoSizer, global.AvatarEditor, global.themeTools, global.reactNumberFormat, global.InputMask));
5
+ })(this, (function (exports, react, React, chakraReactSelect, ramda, focus, reactHookForm, system, tokens, icons, joi, checkbox$1, radio$1, utils, radio, checkbox, datepicker, datepicker$1, date, button, i18n, calendar$1, calendar, reactRouterDom, clickable, framerMotion, core, utilities, sortable, modifiers, reactWindow, AutoSizer, AvatarEditor, themeTools, reactNumberFormat, InputMask) { 'use strict';
6
6
 
7
7
  var __defProp$2b = Object.defineProperty;
8
8
  var __getOwnPropSymbols$2b = Object.getOwnPropertySymbols;
@@ -1911,7 +1911,8 @@
1911
1911
  methods = void 0,
1912
1912
  enableReinitialize = false,
1913
1913
  shouldTrim = true,
1914
- innerFormStyle = {}
1914
+ innerFormStyle = {},
1915
+ joiSchema
1915
1916
  } = _b, rest = __objRest$19(_b, [
1916
1917
  "initialValues",
1917
1918
  "onSubmit",
@@ -1921,15 +1922,23 @@
1921
1922
  "methods",
1922
1923
  "enableReinitialize",
1923
1924
  "shouldTrim",
1924
- "innerFormStyle"
1925
+ "innerFormStyle",
1926
+ "joiSchema"
1925
1927
  ]);
1926
1928
  const customResolver = (values, _context, _options) => ({
1927
1929
  values,
1928
1930
  errors: validate(values)
1929
1931
  });
1932
+ const getResolver = () => {
1933
+ if (validate)
1934
+ return customResolver;
1935
+ if (joiSchema)
1936
+ return joi.joiResolver(joiSchema);
1937
+ return void 0;
1938
+ };
1930
1939
  const newMethods = methods || reactHookForm.useForm(__spreadValues$1G({
1931
1940
  defaultValues: initialValues,
1932
- resolver: validate ? customResolver : void 0
1941
+ resolver: getResolver()
1933
1942
  }, formSettings));
1934
1943
  React.useImperativeHandle(ref, ramda.always(newMethods), []);
1935
1944
  if (enableReinitialize) {
@@ -5743,7 +5752,7 @@
5743
5752
  } = _b, props = __objRest$G(_b, [
5744
5753
  "children"
5745
5754
  ]);
5746
- return props.selectProps.leftIcon ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$X({}, props), /* @__PURE__ */ React.createElement(react.HStack, { w: "full", pl: "2" }, /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.leftIcon }), /* @__PURE__ */ React.createElement(react.HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$X({}, props), children);
5755
+ return props.selectProps.leftComponent ? /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$X({}, props), /* @__PURE__ */ React.createElement(react.HStack, { w: "full", pl: "2" }, props.selectProps.leftComponent, /* @__PURE__ */ React.createElement(react.HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraReactSelect.chakraComponents.Control, __spreadValues$X({}, props), children);
5747
5756
  }
5748
5757
  };
5749
5758
  }
@@ -13391,6 +13400,10 @@
13391
13400
  enumerable: true,
13392
13401
  get: function () { return react.WrapItem; }
13393
13402
  });
13403
+ Object.defineProperty(exports, 'keyframes', {
13404
+ enumerable: true,
13405
+ get: function () { return react.keyframes; }
13406
+ });
13394
13407
  Object.defineProperty(exports, 'useBoolean', {
13395
13408
  enumerable: true,
13396
13409
  get: function () { return react.useBoolean; }