@doist/reactist 17.6.0 → 17.8.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/reactist.cjs.development.js +39 -16
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/new-components/badge/badge.js +9 -7
- package/es/new-components/badge/badge.js.map +1 -1
- package/es/new-components/badge/badge.module.css.js +1 -1
- package/es/new-components/modal/modal.js +5 -3
- package/es/new-components/modal/modal.js.map +1 -1
- package/es/new-components/text-field/text-field.js +25 -5
- package/es/new-components/text-field/text-field.js.map +1 -1
- package/es/new-components/text-field/text-field.module.css.js +1 -1
- package/lib/new-components/badge/badge.d.ts +3 -4
- package/lib/new-components/badge/badge.js +1 -1
- package/lib/new-components/badge/badge.js.map +1 -1
- package/lib/new-components/badge/badge.module.css.js +1 -1
- package/lib/new-components/modal/modal-stories-components.d.ts +13 -3
- package/lib/new-components/modal/modal.d.ts +24 -1
- package/lib/new-components/modal/modal.js +1 -1
- package/lib/new-components/modal/modal.js.map +1 -1
- package/lib/new-components/password-field/password-field.d.ts +1 -1
- package/lib/new-components/text-field/text-field.d.ts +2 -1
- package/lib/new-components/text-field/text-field.js +1 -1
- package/lib/new-components/text-field/text-field.js.map +1 -1
- package/lib/new-components/text-field/text-field.module.css.js +1 -1
- package/package.json +18 -4
- package/styles/badge.css +1 -1
- package/styles/badge.module.css.css +1 -1
- package/styles/password-field.css +1 -1
- package/styles/reactist.css +2 -2
- package/styles/text-field.css +1 -1
- package/styles/text-field.module.css.css +1 -1
- package/lib/new-components/deprecated-modal/modal-stories-components.d.ts +0 -35
|
@@ -11,6 +11,7 @@ var flattenChildren = _interopDefault(require('react-keyed-flatten-children'));
|
|
|
11
11
|
var tooltip = require('ariakit/tooltip');
|
|
12
12
|
var portal = require('ariakit/portal');
|
|
13
13
|
var ariakitUtils = require('ariakit-utils');
|
|
14
|
+
var useCallbackRef = require('use-callback-ref');
|
|
14
15
|
var FocusLock = _interopDefault(require('react-focus-lock'));
|
|
15
16
|
var ariaHidden = require('aria-hidden');
|
|
16
17
|
var dialog = require('ariakit/dialog');
|
|
@@ -1713,7 +1714,7 @@ function PasswordHiddenIcon(props) {
|
|
|
1713
1714
|
|
|
1714
1715
|
var modules_3f03ead6 = {"inputWrapper":"_66b448b3"};
|
|
1715
1716
|
|
|
1716
|
-
var modules_aaf25250 = {"inputWrapper":"
|
|
1717
|
+
var modules_aaf25250 = {"inputWrapper":"fb09cd05","bordered":"f65f40dd","error":"_29118bf0","startIcon":"a40eb111"};
|
|
1717
1718
|
|
|
1718
1719
|
const _excluded$j = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
|
|
1719
1720
|
const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
|
|
@@ -1946,7 +1947,7 @@ function TextArea(_ref) {
|
|
|
1946
1947
|
}, /*#__PURE__*/React.createElement("textarea", _objectSpread2(_objectSpread2({}, props), extraProps))));
|
|
1947
1948
|
}
|
|
1948
1949
|
|
|
1949
|
-
const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby"];
|
|
1950
|
+
const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startIcon"];
|
|
1950
1951
|
const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
1951
1952
|
let {
|
|
1952
1953
|
variant = 'default',
|
|
@@ -1960,10 +1961,20 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1960
1961
|
type = 'text',
|
|
1961
1962
|
maxWidth,
|
|
1962
1963
|
hidden,
|
|
1963
|
-
'aria-describedby': ariaDescribedBy
|
|
1964
|
+
'aria-describedby': ariaDescribedBy,
|
|
1965
|
+
startIcon
|
|
1964
1966
|
} = _ref,
|
|
1965
1967
|
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
1966
1968
|
|
|
1969
|
+
const internalRef = React.useRef(null);
|
|
1970
|
+
const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
1971
|
+
|
|
1972
|
+
function focusOnIconClick() {
|
|
1973
|
+
var _internalRef$current;
|
|
1974
|
+
|
|
1975
|
+
(_internalRef$current = internalRef.current) == null ? void 0 : _internalRef$current.focus();
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1967
1978
|
return /*#__PURE__*/React.createElement(BaseField, {
|
|
1968
1979
|
variant: variant,
|
|
1969
1980
|
id: id,
|
|
@@ -1977,10 +1988,19 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1977
1988
|
hidden: hidden,
|
|
1978
1989
|
"aria-describedby": ariaDescribedBy
|
|
1979
1990
|
}, extraProps => /*#__PURE__*/React.createElement(Box, {
|
|
1991
|
+
display: "flex",
|
|
1992
|
+
alignItems: "center",
|
|
1980
1993
|
className: [modules_aaf25250.inputWrapper, tone === 'error' ? modules_aaf25250.error : null, variant === 'bordered' ? modules_aaf25250.bordered : null]
|
|
1981
|
-
}, /*#__PURE__*/React.createElement(
|
|
1994
|
+
}, startIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
1995
|
+
display: "flex",
|
|
1996
|
+
className: modules_aaf25250.startIcon,
|
|
1997
|
+
onClick: focusOnIconClick,
|
|
1998
|
+
marginRight: "-xsmall",
|
|
1999
|
+
marginLeft: "small",
|
|
2000
|
+
"aria-hidden": true
|
|
2001
|
+
}, startIcon) : null, /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
|
|
1982
2002
|
type: type,
|
|
1983
|
-
ref:
|
|
2003
|
+
ref: combinedRef
|
|
1984
2004
|
}))));
|
|
1985
2005
|
});
|
|
1986
2006
|
|
|
@@ -2045,26 +2065,27 @@ function Avatar(_ref) {
|
|
|
2045
2065
|
|
|
2046
2066
|
Avatar.displayName = 'Avatar';
|
|
2047
2067
|
|
|
2048
|
-
var modules_33c7c985 = {"badge":"
|
|
2049
|
-
|
|
2050
|
-
const _excluded$p = ["variant", "children"];
|
|
2068
|
+
var modules_33c7c985 = {"badge":"_1eb9b834","badge-neutral":"e02d9b99","badge-positive":"_0243fb89","badge-color":"_85c0ffa3"};
|
|
2051
2069
|
|
|
2052
|
-
|
|
2070
|
+
const _excluded$p = ["variant", "children", "exceptionallySetClassName"];
|
|
2071
|
+
const Badge = /*#__PURE__*/polymorphicComponent(function Badge(_ref, ref) {
|
|
2053
2072
|
let {
|
|
2054
2073
|
variant = 'neutral',
|
|
2055
|
-
children
|
|
2074
|
+
children,
|
|
2075
|
+
exceptionallySetClassName
|
|
2056
2076
|
} = _ref,
|
|
2057
2077
|
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
2058
2078
|
|
|
2059
|
-
const variantClassName = modules_33c7c985["badge-" + variant];
|
|
2060
2079
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
2061
|
-
|
|
2080
|
+
ref: ref,
|
|
2081
|
+
display: "inline",
|
|
2082
|
+
className: [modules_33c7c985.badge, modules_33c7c985["badge-" + variant], exceptionallySetClassName]
|
|
2062
2083
|
}), children);
|
|
2063
|
-
}
|
|
2084
|
+
});
|
|
2064
2085
|
|
|
2065
2086
|
var modules_8f59d13b = {"overlay":"_868392ae","fadein":"_63d7ee15","fitContent":"b8548bf2","container":"_31956461","full":"_1007df83","large":"_10c275aa","medium":"_0ac526b4","small":"_30f38fdb","xlarge":"_54868e8b","expand":"c0bc68bc","buttonContainer":"_6527332a","headerContent":"_4750dc1b"};
|
|
2066
2087
|
|
|
2067
|
-
const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children"],
|
|
2088
|
+
const _excluded$q = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement"],
|
|
2068
2089
|
_excluded2$1 = ["children", "button", "withDivider", "exceptionallySetClassName"],
|
|
2069
2090
|
_excluded3 = ["exceptionallySetClassName", "children"],
|
|
2070
2091
|
_excluded4 = ["exceptionallySetClassName", "withDivider"],
|
|
@@ -2099,7 +2120,8 @@ function Modal(_ref) {
|
|
|
2099
2120
|
autoFocus = true,
|
|
2100
2121
|
hideOnEscape = true,
|
|
2101
2122
|
hideOnInteractOutside = true,
|
|
2102
|
-
children
|
|
2123
|
+
children,
|
|
2124
|
+
portalElement
|
|
2103
2125
|
} = _ref,
|
|
2104
2126
|
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
2105
2127
|
|
|
@@ -2145,7 +2167,8 @@ function Modal(_ref) {
|
|
|
2145
2167
|
return /*#__PURE__*/React.createElement(portal.Portal // @ts-expect-error `portalRef` doesn't accept MutableRefObject initialized as null
|
|
2146
2168
|
, {
|
|
2147
2169
|
// @ts-expect-error `portalRef` doesn't accept MutableRefObject initialized as null
|
|
2148
|
-
portalRef: portalRef
|
|
2170
|
+
portalRef: portalRef,
|
|
2171
|
+
portalElement: portalElement
|
|
2149
2172
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
2150
2173
|
"data-testid": "modal-overlay",
|
|
2151
2174
|
"data-overlay": true,
|