@majoo-ui/react 1.57.14 → 1.57.15
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/index.esm.js +38 -7
- package/index.umd.js +40 -10
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, useEffect, createContext, useContext, useRef,
|
|
2
|
+
import React__default, { useState, useEffect, createContext, useContext, useRef, cloneElement, useCallback, createElement as createElement$2, forwardRef, useLayoutEffect, useReducer, useMemo, memo } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { createStitches, styled as styled$1 } from '@stitches/react';
|
|
5
5
|
import { foundations } from '@majoo-ui/core';
|
|
@@ -16,6 +16,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
16
16
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
17
17
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
18
18
|
import NumberFormat from 'react-number-format';
|
|
19
|
+
import { Controller } from 'react-hook-form';
|
|
19
20
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
20
21
|
import Downshift, { useMultipleSelection, useCombobox } from 'downshift';
|
|
21
22
|
import InfiniteScroll from 'react-infinite-scroller';
|
|
@@ -7001,7 +7002,7 @@ InputRightElement.propTypes = {
|
|
|
7001
7002
|
};
|
|
7002
7003
|
InputRightElement.name = 'InputRightElement';
|
|
7003
7004
|
|
|
7004
|
-
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled"];
|
|
7005
|
+
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name"];
|
|
7005
7006
|
var _jsxFileName$F = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputNumber/InputNumber.js";
|
|
7006
7007
|
const StyledInput = styled(NumberFormat, {
|
|
7007
7008
|
// Reset
|
|
@@ -7182,10 +7183,40 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
7182
7183
|
size,
|
|
7183
7184
|
isInvalid,
|
|
7184
7185
|
readOnly,
|
|
7185
|
-
disabled
|
|
7186
|
+
disabled,
|
|
7187
|
+
control,
|
|
7188
|
+
name
|
|
7186
7189
|
} = _ref,
|
|
7187
7190
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
7188
|
-
return /*#__PURE__*/React__default.createElement(
|
|
7191
|
+
return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
|
|
7192
|
+
condition: Boolean(control),
|
|
7193
|
+
wrapper: child => /*#__PURE__*/React__default.createElement(Controller, {
|
|
7194
|
+
control: control,
|
|
7195
|
+
name: name,
|
|
7196
|
+
render: ({
|
|
7197
|
+
field: {
|
|
7198
|
+
name: controlName,
|
|
7199
|
+
ref: controlRef
|
|
7200
|
+
}
|
|
7201
|
+
}) => /*#__PURE__*/cloneElement(child, {
|
|
7202
|
+
ref,
|
|
7203
|
+
getInputRef: controlRef,
|
|
7204
|
+
name: controlName
|
|
7205
|
+
}),
|
|
7206
|
+
__self: undefined,
|
|
7207
|
+
__source: {
|
|
7208
|
+
fileName: _jsxFileName$F,
|
|
7209
|
+
lineNumber: 199,
|
|
7210
|
+
columnNumber: 9
|
|
7211
|
+
}
|
|
7212
|
+
}),
|
|
7213
|
+
__self: undefined,
|
|
7214
|
+
__source: {
|
|
7215
|
+
fileName: _jsxFileName$F,
|
|
7216
|
+
lineNumber: 196,
|
|
7217
|
+
columnNumber: 5
|
|
7218
|
+
}
|
|
7219
|
+
}, /*#__PURE__*/React__default.createElement(StyledInput, _extends({
|
|
7189
7220
|
ref: ref,
|
|
7190
7221
|
placeholder: placeholder,
|
|
7191
7222
|
value: value,
|
|
@@ -7198,10 +7229,10 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
7198
7229
|
__self: undefined,
|
|
7199
7230
|
__source: {
|
|
7200
7231
|
fileName: _jsxFileName$F,
|
|
7201
|
-
lineNumber:
|
|
7202
|
-
columnNumber:
|
|
7232
|
+
lineNumber: 208,
|
|
7233
|
+
columnNumber: 7
|
|
7203
7234
|
}
|
|
7204
|
-
}));
|
|
7235
|
+
})));
|
|
7205
7236
|
});
|
|
7206
7237
|
InputNumber.propTypes = {
|
|
7207
7238
|
placeholder: PropTypes.string,
|
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@stitches/react'), require('@majoo-ui/core'), require('@majoo-ui/icons'), require('react-transition-group'), require('react/jsx-runtime'), require('@majoo-ui/helpers'), require('react-i18next'), require('moment'), require('@radix-ui/react-avatar'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-progress'), require('@radix-ui/react-label'), require('@radix-ui/react-checkbox'), require('@radix-ui/react-radio-group'), require('react-number-format'), require('@radix-ui/react-switch'), require('downshift'), require('react-infinite-scroller'), require('lodash.debounce'), require('@floating-ui/react'), require('otp-input-react'), require('@radix-ui/react-slider'), require('@radix-ui/react-tabs'), require('@radix-ui/react-separator'), require('@radix-ui/react-toggle-group'), require('@radix-ui/react-dialog'), require('@radix-ui/react-accordion'), require('dayzed'), require('react-table'), require('react-dom'), require('@radix-ui/react-alert-dialog'), require('@radix-ui/react-dropdown-menu'), require('@radix-ui/react-aspect-ratio'), require('react-color/lib/components/common'), require('react-color/lib/helpers/color'), require('react-step-wizard'), require('@react-google-maps/api'), require('superagent'), require('recharts'), require('draft-js'), require('react-draft-wysiwyg'), require('react-contextmenu'), require('react-loading-skeleton'), require('react-loading-skeleton/dist/skeleton.css'), require('react-ui-scrollspy'), require('react-image-crop'), require('browser-image-compression'), require('react-table-sticky')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', '@stitches/react', '@majoo-ui/core', '@majoo-ui/icons', 'react-transition-group', 'react/jsx-runtime', '@majoo-ui/helpers', 'react-i18next', 'moment', '@radix-ui/react-avatar', '@radix-ui/react-tooltip', '@radix-ui/react-progress', '@radix-ui/react-label', '@radix-ui/react-checkbox', '@radix-ui/react-radio-group', 'react-number-format', '@radix-ui/react-switch', 'downshift', 'react-infinite-scroller', 'lodash.debounce', '@floating-ui/react', 'otp-input-react', '@radix-ui/react-slider', '@radix-ui/react-tabs', '@radix-ui/react-separator', '@radix-ui/react-toggle-group', '@radix-ui/react-dialog', '@radix-ui/react-accordion', 'dayzed', 'react-table', 'react-dom', '@radix-ui/react-alert-dialog', '@radix-ui/react-dropdown-menu', '@radix-ui/react-aspect-ratio', 'react-color/lib/components/common', 'react-color/lib/helpers/color', 'react-step-wizard', '@react-google-maps/api', 'superagent', 'recharts', 'draft-js', 'react-draft-wysiwyg', 'react-contextmenu', 'react-loading-skeleton', 'react-loading-skeleton/dist/skeleton.css', 'react-ui-scrollspy', 'react-image-crop', 'browser-image-compression', 'react-table-sticky'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.PropTypes, global.react, global.core, global.icons, global.reactTransitionGroup, global.jsxRuntime, global.helpers, global.reactI18next, global.moment, global.AvatarPrimitive, global.TooltipPrimitive, global.ProgressPrimitive, global.LabelPrimitive, global.CheckboxPrimitive, global.RadioGroupPrimitive, global.NumberFormat, global.SwitchPrimitive, global.Downshift, global.InfiniteScroll, global.debounce, global.react$1, global.OTPInput, global.SliderPrimitive, global.TabsPrimitive, global.SeparatorPrimitive, global.ToggleGroupPrimitive, global.DialogPrimitive, global.AccordionPrimitive, global.dayzed, global.reactTable, global.ReactDOM, global.ADialog, global.DropdownMenuPrimitive, global.AspectRatioPrimitive, global.common, global.color, global.StepWizard$1, global.api, global.request, global.recharts, global.draftJs, global.reactDraftWysiwyg, global.reactContextmenu, global.ReactSkeleton, null, global.ScrollSpy, global.ReactCrop, global.imageCompressionComponent, global.reactTableSticky));
|
|
5
|
-
})(this, (function (exports, React, PropTypes, react, core, icons, reactTransitionGroup, jsxRuntime, helpers, reactI18next, moment, AvatarPrimitive, TooltipPrimitive, ProgressPrimitive, LabelPrimitive, CheckboxPrimitive, RadioGroupPrimitive, NumberFormat, SwitchPrimitive, Downshift, InfiniteScroll, debounce, react$1, OTPInput, SliderPrimitive, TabsPrimitive, SeparatorPrimitive, ToggleGroupPrimitive, DialogPrimitive, AccordionPrimitive, dayzed, reactTable, ReactDOM, ADialog, DropdownMenuPrimitive, AspectRatioPrimitive, common, color, StepWizard$1, api, request, recharts, draftJs, reactDraftWysiwyg, reactContextmenu, ReactSkeleton, skeleton_css, ScrollSpy, ReactCrop, imageCompressionComponent, reactTableSticky) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@stitches/react'), require('@majoo-ui/core'), require('@majoo-ui/icons'), require('react-transition-group'), require('react/jsx-runtime'), require('@majoo-ui/helpers'), require('react-i18next'), require('moment'), require('@radix-ui/react-avatar'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-progress'), require('@radix-ui/react-label'), require('@radix-ui/react-checkbox'), require('@radix-ui/react-radio-group'), require('react-number-format'), require('react-hook-form'), require('@radix-ui/react-switch'), require('downshift'), require('react-infinite-scroller'), require('lodash.debounce'), require('@floating-ui/react'), require('otp-input-react'), require('@radix-ui/react-slider'), require('@radix-ui/react-tabs'), require('@radix-ui/react-separator'), require('@radix-ui/react-toggle-group'), require('@radix-ui/react-dialog'), require('@radix-ui/react-accordion'), require('dayzed'), require('react-table'), require('react-dom'), require('@radix-ui/react-alert-dialog'), require('@radix-ui/react-dropdown-menu'), require('@radix-ui/react-aspect-ratio'), require('react-color/lib/components/common'), require('react-color/lib/helpers/color'), require('react-step-wizard'), require('@react-google-maps/api'), require('superagent'), require('recharts'), require('draft-js'), require('react-draft-wysiwyg'), require('react-contextmenu'), require('react-loading-skeleton'), require('react-loading-skeleton/dist/skeleton.css'), require('react-ui-scrollspy'), require('react-image-crop'), require('browser-image-compression'), require('react-table-sticky')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', '@stitches/react', '@majoo-ui/core', '@majoo-ui/icons', 'react-transition-group', 'react/jsx-runtime', '@majoo-ui/helpers', 'react-i18next', 'moment', '@radix-ui/react-avatar', '@radix-ui/react-tooltip', '@radix-ui/react-progress', '@radix-ui/react-label', '@radix-ui/react-checkbox', '@radix-ui/react-radio-group', 'react-number-format', 'react-hook-form', '@radix-ui/react-switch', 'downshift', 'react-infinite-scroller', 'lodash.debounce', '@floating-ui/react', 'otp-input-react', '@radix-ui/react-slider', '@radix-ui/react-tabs', '@radix-ui/react-separator', '@radix-ui/react-toggle-group', '@radix-ui/react-dialog', '@radix-ui/react-accordion', 'dayzed', 'react-table', 'react-dom', '@radix-ui/react-alert-dialog', '@radix-ui/react-dropdown-menu', '@radix-ui/react-aspect-ratio', 'react-color/lib/components/common', 'react-color/lib/helpers/color', 'react-step-wizard', '@react-google-maps/api', 'superagent', 'recharts', 'draft-js', 'react-draft-wysiwyg', 'react-contextmenu', 'react-loading-skeleton', 'react-loading-skeleton/dist/skeleton.css', 'react-ui-scrollspy', 'react-image-crop', 'browser-image-compression', 'react-table-sticky'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.PropTypes, global.react, global.core, global.icons, global.reactTransitionGroup, global.jsxRuntime, global.helpers, global.reactI18next, global.moment, global.AvatarPrimitive, global.TooltipPrimitive, global.ProgressPrimitive, global.LabelPrimitive, global.CheckboxPrimitive, global.RadioGroupPrimitive, global.NumberFormat, global.reactHookForm, global.SwitchPrimitive, global.Downshift, global.InfiniteScroll, global.debounce, global.react$1, global.OTPInput, global.SliderPrimitive, global.TabsPrimitive, global.SeparatorPrimitive, global.ToggleGroupPrimitive, global.DialogPrimitive, global.AccordionPrimitive, global.dayzed, global.reactTable, global.ReactDOM, global.ADialog, global.DropdownMenuPrimitive, global.AspectRatioPrimitive, global.common, global.color, global.StepWizard$1, global.api, global.request, global.recharts, global.draftJs, global.reactDraftWysiwyg, global.reactContextmenu, global.ReactSkeleton, null, global.ScrollSpy, global.ReactCrop, global.imageCompressionComponent, global.reactTableSticky));
|
|
5
|
+
})(this, (function (exports, React, PropTypes, react, core, icons, reactTransitionGroup, jsxRuntime, helpers, reactI18next, moment, AvatarPrimitive, TooltipPrimitive, ProgressPrimitive, LabelPrimitive, CheckboxPrimitive, RadioGroupPrimitive, NumberFormat, reactHookForm, SwitchPrimitive, Downshift, InfiniteScroll, debounce, react$1, OTPInput, SliderPrimitive, TabsPrimitive, SeparatorPrimitive, ToggleGroupPrimitive, DialogPrimitive, AccordionPrimitive, dayzed, reactTable, ReactDOM, ADialog, DropdownMenuPrimitive, AspectRatioPrimitive, common, color, StepWizard$1, api, request, recharts, draftJs, reactDraftWysiwyg, reactContextmenu, ReactSkeleton, skeleton_css, ScrollSpy, ReactCrop, imageCompressionComponent, reactTableSticky) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -7085,7 +7085,7 @@
|
|
|
7085
7085
|
};
|
|
7086
7086
|
InputRightElement.name = 'InputRightElement';
|
|
7087
7087
|
|
|
7088
|
-
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled"];
|
|
7088
|
+
const _excluded$i = ["placeholder", "value", "size", "isInvalid", "readOnly", "disabled", "control", "name"];
|
|
7089
7089
|
var _jsxFileName$F = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputNumber/InputNumber.js";
|
|
7090
7090
|
const StyledInput = styled(NumberFormat__default["default"], {
|
|
7091
7091
|
// Reset
|
|
@@ -7266,10 +7266,40 @@
|
|
|
7266
7266
|
size,
|
|
7267
7267
|
isInvalid,
|
|
7268
7268
|
readOnly,
|
|
7269
|
-
disabled
|
|
7269
|
+
disabled,
|
|
7270
|
+
control,
|
|
7271
|
+
name
|
|
7270
7272
|
} = _ref,
|
|
7271
7273
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
7272
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
7274
|
+
return /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
|
|
7275
|
+
condition: Boolean(control),
|
|
7276
|
+
wrapper: child => /*#__PURE__*/React__default["default"].createElement(reactHookForm.Controller, {
|
|
7277
|
+
control: control,
|
|
7278
|
+
name: name,
|
|
7279
|
+
render: ({
|
|
7280
|
+
field: {
|
|
7281
|
+
name: controlName,
|
|
7282
|
+
ref: controlRef
|
|
7283
|
+
}
|
|
7284
|
+
}) => /*#__PURE__*/React.cloneElement(child, {
|
|
7285
|
+
ref,
|
|
7286
|
+
getInputRef: controlRef,
|
|
7287
|
+
name: controlName
|
|
7288
|
+
}),
|
|
7289
|
+
__self: undefined,
|
|
7290
|
+
__source: {
|
|
7291
|
+
fileName: _jsxFileName$F,
|
|
7292
|
+
lineNumber: 199,
|
|
7293
|
+
columnNumber: 9
|
|
7294
|
+
}
|
|
7295
|
+
}),
|
|
7296
|
+
__self: undefined,
|
|
7297
|
+
__source: {
|
|
7298
|
+
fileName: _jsxFileName$F,
|
|
7299
|
+
lineNumber: 196,
|
|
7300
|
+
columnNumber: 5
|
|
7301
|
+
}
|
|
7302
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledInput, _extends({
|
|
7273
7303
|
ref: ref,
|
|
7274
7304
|
placeholder: placeholder,
|
|
7275
7305
|
value: value,
|
|
@@ -7282,10 +7312,10 @@
|
|
|
7282
7312
|
__self: undefined,
|
|
7283
7313
|
__source: {
|
|
7284
7314
|
fileName: _jsxFileName$F,
|
|
7285
|
-
lineNumber:
|
|
7286
|
-
columnNumber:
|
|
7315
|
+
lineNumber: 208,
|
|
7316
|
+
columnNumber: 7
|
|
7287
7317
|
}
|
|
7288
|
-
}));
|
|
7318
|
+
})));
|
|
7289
7319
|
});
|
|
7290
7320
|
InputNumber.propTypes = {
|
|
7291
7321
|
placeholder: PropTypes__default["default"].string,
|