@northlight/ui 2.12.4 → 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.
- package/dist/es/northlight.d.ts +33 -4
- package/dist/es/northlight.js +27 -6
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +33 -9
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +4 -2
package/dist/umd/northlight.cjs
CHANGED
|
@@ -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:
|
|
1941
|
+
resolver: getResolver()
|
|
1933
1942
|
}, formSettings));
|
|
1934
1943
|
React.useImperativeHandle(ref, ramda.always(newMethods), []);
|
|
1935
1944
|
if (enableReinitialize) {
|
|
@@ -4303,7 +4312,7 @@
|
|
|
4303
4312
|
start: date.startOfMonth(thisDay),
|
|
4304
4313
|
end: date.endOfMonth(thisDay)
|
|
4305
4314
|
},
|
|
4306
|
-
label: "This
|
|
4315
|
+
label: "This Month"
|
|
4307
4316
|
};
|
|
4308
4317
|
const lastMonth = {
|
|
4309
4318
|
value: {
|
|
@@ -4380,6 +4389,16 @@
|
|
|
4380
4389
|
},
|
|
4381
4390
|
label: "Last Fiscal Year"
|
|
4382
4391
|
};
|
|
4392
|
+
const yearToDate = {
|
|
4393
|
+
value: {
|
|
4394
|
+
start: startOfMonthWithDays(
|
|
4395
|
+
date.startOfYear(thisDay),
|
|
4396
|
+
{ months: fiscalStartMonth, days: fiscalStartDay }
|
|
4397
|
+
),
|
|
4398
|
+
end: thisDay
|
|
4399
|
+
},
|
|
4400
|
+
label: "Year to Date"
|
|
4401
|
+
};
|
|
4383
4402
|
const F1 = {
|
|
4384
4403
|
value: {
|
|
4385
4404
|
start: startOfMonthWithDays(
|
|
@@ -4440,6 +4459,7 @@
|
|
|
4440
4459
|
thisMonth,
|
|
4441
4460
|
lastMonth,
|
|
4442
4461
|
thisYear,
|
|
4462
|
+
yearToDate,
|
|
4443
4463
|
lastYear,
|
|
4444
4464
|
nextMonth,
|
|
4445
4465
|
nextThreeMonths,
|
|
@@ -5732,7 +5752,7 @@
|
|
|
5732
5752
|
} = _b, props = __objRest$G(_b, [
|
|
5733
5753
|
"children"
|
|
5734
5754
|
]);
|
|
5735
|
-
return props.selectProps.
|
|
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);
|
|
5736
5756
|
}
|
|
5737
5757
|
};
|
|
5738
5758
|
}
|
|
@@ -13380,6 +13400,10 @@
|
|
|
13380
13400
|
enumerable: true,
|
|
13381
13401
|
get: function () { return react.WrapItem; }
|
|
13382
13402
|
});
|
|
13403
|
+
Object.defineProperty(exports, 'keyframes', {
|
|
13404
|
+
enumerable: true,
|
|
13405
|
+
get: function () { return react.keyframes; }
|
|
13406
|
+
});
|
|
13383
13407
|
Object.defineProperty(exports, 'useBoolean', {
|
|
13384
13408
|
enumerable: true,
|
|
13385
13409
|
get: function () { return react.useBoolean; }
|