@pingux/astro 2.143.0 → 2.144.0-alpha.1
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/lib/cjs/components/AIComponents/Response/ResponseMarkdown/MarkdownContainer.js +2 -2
- package/lib/cjs/components/Calendar/Calendar.js +3 -2
- package/lib/cjs/components/Checkbox/CheckboxBase.js +3 -1
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +2 -2
- package/lib/cjs/components/DataTable/DataTable.js +4 -4
- package/lib/cjs/components/DataTable/DataTable.stories.js +3 -3
- package/lib/cjs/components/DatePicker/DateField.js +6 -3
- package/lib/cjs/components/DatePicker/DatePicker.js +12 -3
- package/lib/cjs/components/DatePicker/DatePicker.stories.js +21 -2
- package/lib/cjs/components/GridList/GridList.stories.d.ts +4 -4
- package/lib/cjs/components/GridList/gridListAttributes.d.ts +4 -4
- package/lib/cjs/components/GridList/gridListAttributes.js +4 -4
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.js +1 -1
- package/lib/cjs/components/Image/Image.js +5 -5
- package/lib/cjs/components/ListBox/ListBox.js +3 -3
- package/lib/cjs/components/ListBox/Option.js +9 -9
- package/lib/cjs/components/MenuItem/MenuItem.js +4 -4
- package/lib/cjs/components/MultivaluesField/CondensedMultivaluesField.js +2 -2
- package/lib/cjs/components/MultivaluesField/DefaultMultivaluesField.js +2 -2
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +5 -5
- package/lib/cjs/components/NavSideBar/NavSideBarSectionHeader.js +5 -5
- package/lib/cjs/components/PopoverMenu/PopoverMenu.js +1 -1
- package/lib/cjs/components/ProgressBar/ProgressBar.js +3 -3
- package/lib/cjs/components/ProgressBar/ProgressBar.stories.js +1 -1
- package/lib/cjs/components/ProgressBar/ProgressBar.test.js +2 -2
- package/lib/cjs/components/RadioField/RadioField.js +3 -3
- package/lib/cjs/components/RockerButton/RockerButton.js +2 -2
- package/lib/cjs/components/SearchField/SearchAutoComplete.js +1 -1
- package/lib/cjs/components/SelectField/SelectField.stories.js +6 -6
- package/lib/cjs/components/Tab/Tab.js +2 -2
- package/lib/cjs/context/MenuContext/index.d.ts +1 -1
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.d.ts +1 -1
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.js +6 -6
- package/lib/cjs/hooks/useComponentToggle/useComponentToggle.test.js +6 -6
- package/lib/cjs/hooks/useField/useField.d.ts +2 -2
- package/lib/cjs/hooks/useGridList/useGridList.js +9 -9
- package/lib/cjs/hooks/useInputLoader/useInputLoader.d.ts +2 -2
- package/lib/cjs/hooks/useInputLoader/useInputLoader.js +8 -8
- package/lib/cjs/hooks/useModalState/useModalState.js +2 -2
- package/lib/cjs/hooks/useOverlayPanelState/useOverlayPanelState.js +2 -2
- package/lib/cjs/hooks/useSelectField/useSelectField.js +4 -4
- package/lib/cjs/hooks/useSliderField/useSliderField.d.ts +1 -1
- package/lib/cjs/hooks/useSliderField/useSliderField.js +3 -3
- package/lib/cjs/types/calendar.d.ts +2 -0
- package/lib/cjs/types/dataTable.d.ts +1 -1
- package/lib/cjs/types/gridList.d.ts +4 -4
- package/lib/cjs/types/listBox.d.ts +2 -2
- package/lib/cjs/types/popoverMenu.d.ts +1 -1
- package/lib/cjs/types/progressBar.d.ts +1 -1
- package/lib/cjs/types/sliderField.d.ts +1 -1
- package/lib/cjs/types/timefield.d.ts +1 -1
- package/lib/cjs/utils/designUtils/figmaLinks.d.ts +1 -1
- package/lib/cjs/utils/designUtils/figmaLinks.js +1 -1
- package/lib/components/AIComponents/Response/ResponseMarkdown/MarkdownContainer.js +2 -2
- package/lib/components/Calendar/Calendar.js +3 -2
- package/lib/components/Checkbox/CheckboxBase.js +3 -1
- package/lib/components/ComboBox/ComboBoxInput.js +2 -2
- package/lib/components/DataTable/DataTable.js +4 -4
- package/lib/components/DataTable/DataTable.stories.js +3 -3
- package/lib/components/DatePicker/DateField.js +6 -3
- package/lib/components/DatePicker/DatePicker.js +12 -3
- package/lib/components/DatePicker/DatePicker.stories.js +18 -0
- package/lib/components/GridList/gridListAttributes.js +4 -4
- package/lib/components/IconButtonToggle/IconButtonToggle.js +1 -1
- package/lib/components/Image/Image.js +5 -5
- package/lib/components/ListBox/ListBox.js +3 -3
- package/lib/components/ListBox/Option.js +9 -9
- package/lib/components/MenuItem/MenuItem.js +4 -4
- package/lib/components/MultivaluesField/CondensedMultivaluesField.js +2 -2
- package/lib/components/MultivaluesField/DefaultMultivaluesField.js +2 -2
- package/lib/components/NavBarSection/NavBarItemHeader.js +5 -5
- package/lib/components/NavSideBar/NavSideBarSectionHeader.js +5 -5
- package/lib/components/PopoverMenu/PopoverMenu.js +1 -1
- package/lib/components/ProgressBar/ProgressBar.js +3 -3
- package/lib/components/ProgressBar/ProgressBar.stories.js +1 -1
- package/lib/components/ProgressBar/ProgressBar.test.js +2 -2
- package/lib/components/RadioField/RadioField.js +3 -3
- package/lib/components/RockerButton/RockerButton.js +2 -2
- package/lib/components/SearchField/SearchAutoComplete.js +1 -1
- package/lib/components/SelectField/SelectField.stories.js +6 -6
- package/lib/components/Tab/Tab.js +2 -2
- package/lib/hooks/useComponentToggle/useComponentToggle.js +6 -6
- package/lib/hooks/useComponentToggle/useComponentToggle.test.js +6 -6
- package/lib/hooks/useGridList/useGridList.js +9 -9
- package/lib/hooks/useInputLoader/useInputLoader.js +8 -8
- package/lib/hooks/useModalState/useModalState.js +2 -2
- package/lib/hooks/useOverlayPanelState/useOverlayPanelState.js +2 -2
- package/lib/hooks/useSelectField/useSelectField.js +4 -4
- package/lib/hooks/useSliderField/useSliderField.js +3 -3
- package/lib/utils/designUtils/figmaLinks.js +1 -1
- package/package.json +1 -1
@@ -66,10 +66,10 @@ test('renders value as custom valueLabel instead of percentage', function () {
|
|
66
66
|
expect(value).not.toBeInTheDocument();
|
67
67
|
expect(valueLabel).toBeInTheDocument();
|
68
68
|
});
|
69
|
-
test('does not render value when
|
69
|
+
test('does not render value when shouldShowValueLabel is false', function () {
|
70
70
|
getComponent({
|
71
71
|
value: 25,
|
72
|
-
|
72
|
+
shouldShowValueLabel: false
|
73
73
|
});
|
74
74
|
var valueLabel = _react2.screen.queryByText('25%');
|
75
75
|
expect(valueLabel).not.toBeInTheDocument();
|
@@ -45,14 +45,14 @@ var RadioField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
45
45
|
controlProps = props.controlProps,
|
46
46
|
hasAutoFocus = props.hasAutoFocus,
|
47
47
|
helperText = props.helperText,
|
48
|
-
|
48
|
+
isRadioDisabled = props.isDisabled,
|
49
49
|
label = props.label,
|
50
50
|
status = props.status;
|
51
51
|
(0, _hooks.usePropWarning)(props, 'disabled', 'isDisabled');
|
52
52
|
var radioFieldRef = (0, _hooks.useLocalOrForwardRef)(ref);
|
53
53
|
var state = (0, _react.useContext)(RadioContext);
|
54
|
-
var
|
55
|
-
var isDisabled =
|
54
|
+
var isGroupDisabled = state.isDisabled;
|
55
|
+
var isDisabled = isRadioDisabled || isGroupDisabled;
|
56
56
|
var _useRadio = (0, _reactAria.useRadio)(_objectSpread(_objectSpread({
|
57
57
|
children: label,
|
58
58
|
autoFocus: hasAutoFocus
|
@@ -55,12 +55,12 @@ var RockerButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
55
55
|
}), state, rockerButtonRef),
|
56
56
|
rockerButtonProps = _useToggleButtonGroup.buttonProps,
|
57
57
|
isSelected = _useToggleButtonGroup.isSelected,
|
58
|
-
|
58
|
+
isRaDisabled = _useToggleButtonGroup.isDisabled,
|
59
59
|
isPressed = _useToggleButtonGroup.isPressed;
|
60
60
|
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
|
61
61
|
isHovered: isHovered,
|
62
62
|
isPressed: isPressed,
|
63
|
-
isDisabled:
|
63
|
+
isDisabled: isRaDisabled,
|
64
64
|
isSelected: isSelected
|
65
65
|
}),
|
66
66
|
classNames = _useStatusClasses.classNames;
|
@@ -162,7 +162,7 @@ var SearchAutoComplete = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
|
|
162
162
|
state: comboBoxState,
|
163
163
|
isFocusedOnHover: shouldFocusOnHover,
|
164
164
|
isSelectedOnPressUp: shouldSelectOnPressUp,
|
165
|
-
|
165
|
+
shouldShowSelectedOption: false
|
166
166
|
}, otherListBoxProps)))));
|
167
167
|
});
|
168
168
|
exports.SearchAutoComplete = SearchAutoComplete;
|
@@ -416,8 +416,8 @@ var AsyncLoading = function AsyncLoading() {
|
|
416
416
|
setDataSize = _useState10[1];
|
417
417
|
var _useState11 = (0, _react.useState)(true),
|
418
418
|
_useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
|
419
|
-
|
420
|
-
|
419
|
+
isLoading = _useState12[0],
|
420
|
+
setIsLoading = _useState12[1];
|
421
421
|
var fetchData = (0, _react.useCallback)( /*#__PURE__*/function () {
|
422
422
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(currentLimit) {
|
423
423
|
var response, json;
|
@@ -437,14 +437,14 @@ var AsyncLoading = function AsyncLoading() {
|
|
437
437
|
setData(json.body._embedded.users || []);
|
438
438
|
setDataSize(json.body.count);
|
439
439
|
}
|
440
|
-
|
440
|
+
setIsLoading(false);
|
441
441
|
_context3.next = 15;
|
442
442
|
break;
|
443
443
|
case 11:
|
444
444
|
_context3.prev = 11;
|
445
445
|
_context3.t0 = _context3["catch"](0);
|
446
446
|
console.error('Fetch error:', _context3.t0);
|
447
|
-
|
447
|
+
setIsLoading(false);
|
448
448
|
case 15:
|
449
449
|
case "end":
|
450
450
|
return _context3.stop();
|
@@ -457,7 +457,7 @@ var AsyncLoading = function AsyncLoading() {
|
|
457
457
|
}(), []);
|
458
458
|
var handleLoadMore = function handleLoadMore() {
|
459
459
|
if (limit >= dataSize) return;
|
460
|
-
|
460
|
+
setIsLoading(true);
|
461
461
|
setLimit(function (prevLimit) {
|
462
462
|
return prevLimit + _constants.LIMIT;
|
463
463
|
});
|
@@ -468,7 +468,7 @@ var AsyncLoading = function AsyncLoading() {
|
|
468
468
|
return (0, _react2.jsx)(_reactAria.OverlayProvider, null, (0, _react2.jsx)(_index.SelectField, {
|
469
469
|
label: "Pick a User",
|
470
470
|
items: data,
|
471
|
-
isLoading:
|
471
|
+
isLoading: isLoading,
|
472
472
|
onLoadMore: handleLoadMore
|
473
473
|
}, function (item) {
|
474
474
|
var user = item;
|
@@ -31,7 +31,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
31
31
|
var CollectionTab = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
32
32
|
var className = props.className,
|
33
33
|
item = props.item,
|
34
|
-
|
34
|
+
isTabsDisabled = props.isDisabled,
|
35
35
|
isRequired = props.isRequired,
|
36
36
|
orientation = props.orientation,
|
37
37
|
mode = props.mode,
|
@@ -40,7 +40,7 @@ var CollectionTab = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
40
40
|
rendered = item.rendered,
|
41
41
|
itemProps = item.props;
|
42
42
|
var state = (0, _react.useContext)(_Tabs.TabsContext);
|
43
|
-
var isDisabled =
|
43
|
+
var isDisabled = isTabsDisabled || (itemProps === null || itemProps === void 0 ? void 0 : itemProps.isDisabled) || state.disabledKeys.has(key);
|
44
44
|
var isSelected = state.selectedKey === key;
|
45
45
|
var _useFocusRing = (0, _reactAria.useFocusRing)(),
|
46
46
|
isFocusVisible = _useFocusRing.isFocusVisible,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { MutableRefObject } from 'react';
|
2
2
|
export interface MenuContextValue {
|
3
3
|
onClose?: () => void;
|
4
|
-
|
4
|
+
shouldCloseOnSelect?: boolean;
|
5
5
|
ref?: MutableRefObject<HTMLDivElement | HTMLElement | null>;
|
6
6
|
}
|
7
7
|
export declare const MenuContext: import("react").Context<MenuContextValue>;
|
@@ -21,7 +21,7 @@ interface UseComponentToggle {
|
|
21
21
|
export interface ComponentToggleProps {
|
22
22
|
ComponentToRenderIfTrue: React.ReactNode;
|
23
23
|
ComponentToRenderIfFalse: React.ReactNode;
|
24
|
-
|
24
|
+
isToggled: boolean;
|
25
25
|
onConditionChange?: (newCondition: boolean, ...args: unknown[]) => void;
|
26
26
|
}
|
27
27
|
export interface ComponentToggleResult {
|
@@ -12,21 +12,21 @@ var _index = require("../index");
|
|
12
12
|
var useComponentToggle = function useComponentToggle(props) {
|
13
13
|
var ComponentToRenderIfTrue = props.ComponentToRenderIfTrue,
|
14
14
|
ComponentToRenderIfFalse = props.ComponentToRenderIfFalse,
|
15
|
-
|
15
|
+
isToggled = props.isToggled,
|
16
16
|
onConditionChange = props.onConditionChange;
|
17
|
-
var _useProgressiveState = (0, _index.useProgressiveState)(
|
17
|
+
var _useProgressiveState = (0, _index.useProgressiveState)(isToggled, false),
|
18
18
|
_useProgressiveState2 = (0, _slicedToArray2["default"])(_useProgressiveState, 2),
|
19
|
-
|
19
|
+
isToggledState = _useProgressiveState2[0],
|
20
20
|
setIsToggled = _useProgressiveState2[1];
|
21
|
-
var RenderedComponent =
|
21
|
+
var RenderedComponent = isToggledState ? ComponentToRenderIfTrue : ComponentToRenderIfFalse;
|
22
22
|
var handleConditionChange = function handleConditionChange() {
|
23
|
-
setIsToggled(!
|
23
|
+
setIsToggled(!isToggledState);
|
24
24
|
if (onConditionChange) {
|
25
25
|
var _context;
|
26
26
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
27
27
|
args[_key] = arguments[_key];
|
28
28
|
}
|
29
|
-
onConditionChange.apply(void 0, (0, _concat["default"])(_context = [!
|
29
|
+
onConditionChange.apply(void 0, (0, _concat["default"])(_context = [!isToggledState]).call(_context, args));
|
30
30
|
}
|
31
31
|
};
|
32
32
|
return {
|
@@ -24,9 +24,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
25
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context3; _forEachInstanceProperty(_context3 = ["next", "throw", "return"]).call(_context3, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context4; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context4 = this.tryEntries).call(_context4, resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
26
26
|
var callback = jest.fn();
|
27
|
-
var
|
27
|
+
var isToggled = false;
|
28
28
|
var defaultProps = {
|
29
|
-
|
29
|
+
isToggled: isToggled,
|
30
30
|
onConditionChange: callback,
|
31
31
|
ComponentToRenderIfTrue: (0, _react3.jsx)("span", null, "true-string"),
|
32
32
|
ComponentToRenderIfFalse: (0, _react3.jsx)("span", null, "false-string")
|
@@ -34,11 +34,11 @@ var defaultProps = {
|
|
34
34
|
var TestComponent = function TestComponent() {
|
35
35
|
var _useState = (0, _react.useState)(false),
|
36
36
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
37
|
-
|
38
|
-
|
37
|
+
isToggledState = _useState2[0],
|
38
|
+
setIsToggledState = _useState2[1];
|
39
39
|
var conditionalRenderProps = {
|
40
|
-
|
41
|
-
onConditionChange:
|
40
|
+
isToggled: isToggledState,
|
41
|
+
onConditionChange: setIsToggledState,
|
42
42
|
ComponentToRenderIfTrue: (0, _react3.jsx)("span", null, "true-string"),
|
43
43
|
ComponentToRenderIfFalse: (0, _react3.jsx)("span", null, "false-string"),
|
44
44
|
onConditionChangeProp: callback
|
@@ -20,7 +20,7 @@ export interface ContainerProps extends WrapperProps {
|
|
20
20
|
export interface FieldControlInputProps extends AriaLabelingProps, DOMProps {
|
21
21
|
autoComplete?: string;
|
22
22
|
autoCorrect?: string;
|
23
|
-
|
23
|
+
hasAutoFocus?: boolean;
|
24
24
|
className?: string;
|
25
25
|
defaultSelected?: boolean;
|
26
26
|
defaultValue?: string | number;
|
@@ -79,7 +79,7 @@ export interface UseFieldProps<T> {
|
|
79
79
|
/**
|
80
80
|
* Indeterminism is presentational only. The indeterminate visual representation remains until
|
81
81
|
* this prop is set to false regardless of user interaction.
|
82
|
-
|
82
|
+
*/
|
83
83
|
isIndeterminate?: boolean;
|
84
84
|
/** Whether the input can be selected, but not changed by the user. */
|
85
85
|
isReadOnly?: boolean;
|
@@ -23,15 +23,15 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
|
|
23
23
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
24
24
|
var useGridList = function useGridList(props) {
|
25
25
|
var acceptedDragTypes = props.acceptedDragTypes,
|
26
|
-
|
27
|
-
|
26
|
+
shouldAllowDuplicateSelectionEvents = props.shouldAllowDuplicateSelectionEvents,
|
27
|
+
hasAutoFocus = props.hasAutoFocus,
|
28
28
|
children = props.children,
|
29
29
|
collection = props.collection,
|
30
30
|
defaultSelectedKeys = props.defaultSelectedKeys,
|
31
31
|
disabledBehavior = props.disabledBehavior,
|
32
32
|
disabledKeys = props.disabledKeys,
|
33
|
-
|
34
|
-
|
33
|
+
shouldDisallowEmptySelection = props.shouldDisallowEmptySelection,
|
34
|
+
shouldDisallowTypeAhead = props.shouldDisallowTypeAhead,
|
35
35
|
escapeKeyBehavior = props.escapeKeyBehavior,
|
36
36
|
filter = (0, _filter["default"])(props),
|
37
37
|
getDropOperation = props.getDropOperation,
|
@@ -100,13 +100,13 @@ var useGridList = function useGridList(props) {
|
|
100
100
|
initialSelectedKeys: initialSelectedKeys
|
101
101
|
};
|
102
102
|
var listStateOptions = {
|
103
|
-
|
103
|
+
shouldAllowDuplicateSelectionEvents: shouldAllowDuplicateSelectionEvents,
|
104
104
|
children: children,
|
105
105
|
collection: collection,
|
106
106
|
defaultSelectedKeys: defaultSelectedKeys,
|
107
107
|
disabledBehavior: disabledBehavior,
|
108
108
|
disabledKeys: disabledKeys,
|
109
|
-
disallowEmptySelection:
|
109
|
+
disallowEmptySelection: shouldDisallowEmptySelection,
|
110
110
|
filter: filter,
|
111
111
|
onSelectionChange: onSelectionChange,
|
112
112
|
selectedKeys: selectedKeys,
|
@@ -118,12 +118,12 @@ var useGridList = function useGridList(props) {
|
|
118
118
|
items: list.items
|
119
119
|
}));
|
120
120
|
var gridOptions = {
|
121
|
-
autoFocus:
|
121
|
+
autoFocus: hasAutoFocus,
|
122
122
|
defaultSelectedKeys: defaultSelectedKeys,
|
123
123
|
disabledBehavior: disabledBehavior,
|
124
124
|
disabledKeys: disabledKeys,
|
125
|
-
disallowEmptySelection:
|
126
|
-
disallowTypeAhead:
|
125
|
+
disallowEmptySelection: shouldDisallowEmptySelection,
|
126
|
+
disallowTypeAhead: shouldDisallowTypeAhead,
|
127
127
|
escapeKeyBehavior: escapeKeyBehavior,
|
128
128
|
items: list.items,
|
129
129
|
keyboardDelegate: keyboardDelegate,
|
@@ -3,7 +3,7 @@ interface UseInputLoaderProps {
|
|
3
3
|
inputValue: string;
|
4
4
|
}
|
5
5
|
interface UseInputLoaderReturn {
|
6
|
-
|
6
|
+
isLoading: boolean;
|
7
7
|
}
|
8
|
-
declare const useInputLoader: ({ loadingState, inputValue }: UseInputLoaderProps) => UseInputLoaderReturn;
|
8
|
+
declare const useInputLoader: ({ loadingState, inputValue, }: UseInputLoaderProps) => UseInputLoaderReturn;
|
9
9
|
export default useInputLoader;
|
@@ -16,16 +16,16 @@ var useInputLoader = function useInputLoader(_ref) {
|
|
16
16
|
// START - minimum delay time for loading indicator = 500ms
|
17
17
|
var _useState = (0, _react.useState)(false),
|
18
18
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
19
|
-
|
20
|
-
|
19
|
+
isLoadingState = _useState2[0],
|
20
|
+
setIsLoading = _useState2[1];
|
21
21
|
var isLoading = loadingState === _loadingStates["default"].LOADING || loadingState === _loadingStates["default"].FILTERING;
|
22
22
|
var lastInputValue = (0, _react.useRef)(inputValue);
|
23
23
|
var timeout = (0, _react.useRef)(null);
|
24
24
|
(0, _react.useEffect)(function () {
|
25
|
-
if (isLoading && !
|
25
|
+
if (isLoading && !isLoadingState) {
|
26
26
|
if (timeout.current === null) {
|
27
27
|
timeout.current = (0, _setTimeout2["default"])(function () {
|
28
|
-
|
28
|
+
setIsLoading(true);
|
29
29
|
}, 500);
|
30
30
|
}
|
31
31
|
|
@@ -33,21 +33,21 @@ var useInputLoader = function useInputLoader(_ref) {
|
|
33
33
|
if (inputValue !== lastInputValue.current) {
|
34
34
|
clearTimeout(timeout.current);
|
35
35
|
timeout.current = (0, _setTimeout2["default"])(function () {
|
36
|
-
|
36
|
+
setIsLoading(true);
|
37
37
|
}, 500);
|
38
38
|
}
|
39
39
|
} else if (!isLoading) {
|
40
40
|
// If loading is no longer happening, clear any timers and hide the loader
|
41
|
-
|
41
|
+
setIsLoading(false);
|
42
42
|
if (timeout.current) {
|
43
43
|
clearTimeout(timeout.current);
|
44
44
|
timeout.current = null;
|
45
45
|
}
|
46
46
|
}
|
47
47
|
lastInputValue.current = inputValue;
|
48
|
-
}, [isLoading,
|
48
|
+
}, [isLoading, isLoadingState, inputValue]);
|
49
49
|
return {
|
50
|
-
|
50
|
+
isLoading: isLoadingState
|
51
51
|
};
|
52
52
|
// END - minimum delay time for loading indicator = 500ms
|
53
53
|
};
|
@@ -29,8 +29,8 @@ var useModalState = function useModalState() {
|
|
29
29
|
isOpen: isOpen,
|
30
30
|
onOpenChange: onOpenChange
|
31
31
|
});
|
32
|
-
var
|
33
|
-
var isTransitioning = (0, _useMountTransition["default"])(
|
32
|
+
var isModalOpen = state.isOpen;
|
33
|
+
var isTransitioning = (0, _useMountTransition["default"])(isModalOpen, transitionDuration || 300);
|
34
34
|
var returnState = _objectSpread(_objectSpread({}, state), {}, {
|
35
35
|
isTransitioning: isTransitioning
|
36
36
|
});
|
@@ -30,8 +30,8 @@ var useOverlayPanelState = function useOverlayPanelState() {
|
|
30
30
|
isOpen: isOpen,
|
31
31
|
onOpenChange: onOpenChange
|
32
32
|
});
|
33
|
-
var
|
34
|
-
var isTransitioning = (0, _useMountTransition["default"])(
|
33
|
+
var isPanelOpen = state.isOpen;
|
34
|
+
var isTransitioning = (0, _useMountTransition["default"])(isPanelOpen, transitionDuration);
|
35
35
|
var onClose = function onClose(stateProp, triggerRef, onCloseProp) {
|
36
36
|
if (stateProp) {
|
37
37
|
stateProp.close();
|
@@ -42,8 +42,8 @@ var useSelectField = function useSelectField(props, ref) {
|
|
42
42
|
defaultText = props.defaultText,
|
43
43
|
direction = props.direction,
|
44
44
|
disabledKeys = props.disabledKeys,
|
45
|
-
|
46
|
-
|
45
|
+
hasNoEmptySelection = props.hasNoEmptySelection,
|
46
|
+
isDefaultOpen = props.isDefaultOpen,
|
47
47
|
isDisabled = props.isDisabled,
|
48
48
|
isLoading = props.isLoading,
|
49
49
|
isNotFlippable = props.isNotFlippable,
|
@@ -84,9 +84,9 @@ var useSelectField = function useSelectField(props, ref) {
|
|
84
84
|
onLoadMore: onLoadMore,
|
85
85
|
onOpenChange: onOpenChange,
|
86
86
|
onSelectionChange: onSelectionChange,
|
87
|
-
defaultOpen:
|
87
|
+
defaultOpen: isDefaultOpen,
|
88
88
|
// must match React Aria API
|
89
|
-
disallowEmptySelection:
|
89
|
+
disallowEmptySelection: hasNoEmptySelection,
|
90
90
|
// must match React Aria API
|
91
91
|
shouldFlip: shouldFlip
|
92
92
|
}, controlProps), {}, {
|
@@ -1454,7 +1454,7 @@ declare const useSliderField: (props: UseSliderFieldProps) => {
|
|
1454
1454
|
isVertical: boolean;
|
1455
1455
|
state: import("react-stately").SliderState;
|
1456
1456
|
trackRef: import("react").RefObject<Element>;
|
1457
|
-
|
1457
|
+
hasAutoFocus: boolean | undefined;
|
1458
1458
|
isDisabled: boolean | undefined;
|
1459
1459
|
name: string | undefined;
|
1460
1460
|
onBlur: (() => void) | undefined;
|
@@ -22,7 +22,7 @@ var _reactAria = require("react-aria");
|
|
22
22
|
var _reactStately = require("react-stately");
|
23
23
|
var _ariaAttributes = require("../../utils/docUtils/ariaAttributes");
|
24
24
|
var _useStatusClasses7 = _interopRequireDefault(require("../useStatusClasses"));
|
25
|
-
var _excluded = ["activeTrackProps", "
|
25
|
+
var _excluded = ["activeTrackProps", "hasAutoFocus", "className", "defaultValue", "displayValue", "formatOptions", "helperTextProps", "helpHintProps", "hintText", "isDisabled", "isDisplayValueHidden", "isMultiThumb", "label", "labelProps", "maxValue", "minValue", "name", "onBlur", "onChange", "onChangeEnd", "onFocus", "onFocusChange", "onKeyDown", "onKeyUp", "orientation", "outputProps", "size", "status", "step", "sx", "thumbProps", "trackProps", "trackRef", "value", "wrapperProps"];
|
26
26
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
27
27
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
28
28
|
var getDefaultValue = function getDefaultValue(_ref) {
|
@@ -74,7 +74,7 @@ var getLengthValuesMultiThumb = function getLengthValuesMultiThumb(minValue, max
|
|
74
74
|
exports.getLengthValuesMultiThumb = getLengthValuesMultiThumb;
|
75
75
|
var useSliderField = function useSliderField(props) {
|
76
76
|
var activeTrackProps = props.activeTrackProps,
|
77
|
-
|
77
|
+
hasAutoFocus = props.hasAutoFocus,
|
78
78
|
className = props.className,
|
79
79
|
defaultValueProp = props.defaultValue,
|
80
80
|
displayValueProp = props.displayValue,
|
@@ -157,7 +157,7 @@ var useSliderField = function useSliderField(props) {
|
|
157
157
|
}
|
158
158
|
}, [maxValue, state]);
|
159
159
|
var thumbOptions = _objectSpread(_objectSpread({}, thumbProps), {}, {
|
160
|
-
|
160
|
+
hasAutoFocus: hasAutoFocus,
|
161
161
|
isDisabled: isDisabled,
|
162
162
|
name: name,
|
163
163
|
onBlur: onBlur,
|
@@ -63,6 +63,8 @@ export interface CalendarProps extends Omit<CalendarBaseProps, 'onChange'> {
|
|
63
63
|
value?: DateValue | string;
|
64
64
|
/** Handler that is called when the value changes. */
|
65
65
|
onChange?: (value: MappedDateValue<DateValue>) => void;
|
66
|
+
/** Props object that spread into calendar element. */
|
67
|
+
calendarWrapperProps?: BoxProps;
|
66
68
|
}
|
67
69
|
export interface RangeCalendarProps extends Omit<CalendarBaseProps, 'onChange'> {
|
68
70
|
/** Prop to provide a custom default date (uncontrolled) */
|
@@ -32,7 +32,7 @@ export interface DataTableVirtualizerProps<T extends object, V> {
|
|
32
32
|
onLoadMore?: () => void;
|
33
33
|
shouldUseVirtualFocus?: boolean;
|
34
34
|
scrollToItem?: (key: Key) => void;
|
35
|
-
|
35
|
+
hasAutoFocus?: boolean;
|
36
36
|
children?: ReactNode | ((type: string, content: T | ReactNode) => V);
|
37
37
|
renderView: (type: string, content: T) => V | undefined;
|
38
38
|
domRef: RefObject<HTMLDivElement>;
|
@@ -28,15 +28,15 @@ export interface UseGridListItemProps extends SharedGridListItemProps {
|
|
28
28
|
ref: RefObject<HTMLElement>;
|
29
29
|
}
|
30
30
|
export interface UseGridListProps extends ReorderableProps {
|
31
|
-
|
32
|
-
|
31
|
+
shouldAllowDuplicateSelectionEvents?: boolean;
|
32
|
+
hasAutoFocus?: boolean | FocusStrategy;
|
33
33
|
children?: React.ReactNode;
|
34
34
|
collection: Collection<Node<object>>;
|
35
35
|
defaultSelectedKeys?: Iterable<Key> | 'all';
|
36
36
|
disabledBehavior?: DisabledBehavior;
|
37
37
|
disabledKeys?: Iterable<Key>;
|
38
|
-
|
39
|
-
|
38
|
+
shouldDisallowEmptySelection?: boolean;
|
39
|
+
shouldDisallowTypeAhead?: boolean;
|
40
40
|
escapeKeyBehavior?: 'clearSelection' | 'none';
|
41
41
|
filter?: (item: object, filterText: string) => boolean;
|
42
42
|
getKey?: (item: object) => Key;
|
@@ -33,13 +33,13 @@ export interface ListBoxProps extends AriaListBoxOptions<object> {
|
|
33
33
|
variant?: string;
|
34
34
|
children?: CollectionChildren<object>;
|
35
35
|
isCondensed?: boolean;
|
36
|
-
|
36
|
+
shouldShowSelectedOption?: boolean;
|
37
37
|
}
|
38
38
|
export interface OptionType {
|
39
39
|
item: ListBoxItemType;
|
40
40
|
hasVirtualFocus?: boolean;
|
41
41
|
isCondensed?: boolean;
|
42
|
-
|
42
|
+
shouldShowSelectedOption?: boolean;
|
43
43
|
}
|
44
44
|
export interface OptionWithCheckboxType extends StyleProps {
|
45
45
|
isSelected?: boolean;
|
@@ -12,7 +12,7 @@ export interface PopoverMenuProps {
|
|
12
12
|
isDefaultOpen?: boolean;
|
13
13
|
/** Whether the popover is prevented from closing when a selection is made. */
|
14
14
|
isNotClosedOnSelect?: boolean;
|
15
|
-
|
15
|
+
shouldCloseOnSelect?: boolean;
|
16
16
|
/**
|
17
17
|
* Whether the popover is prevented from flipping directions when insufficient space is
|
18
18
|
* available for the given `direction` placement.
|
@@ -30,7 +30,7 @@ export interface TimeFieldProps extends StyleProps, DOMAttributes {
|
|
30
30
|
/** Whether the input value is invalid. */
|
31
31
|
isInvalid?: boolean;
|
32
32
|
/** Whether the element should receive focus on render. */
|
33
|
-
|
33
|
+
hasAutoFocus?: boolean;
|
34
34
|
/** The current value (controlled). */
|
35
35
|
value?: TimeValue | string | null;
|
36
36
|
/** The default value (uncontrolled). */
|
@@ -55,7 +55,7 @@ var FIGMA_LINKS = {
|
|
55
55
|
unavailableDates: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=46454-15681&mode=design&t=PX1Q47IuuVvOafDQ-4',
|
56
56
|
minimumDate: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=46454-16197&mode=design&t=PX1Q47IuuVvOafDQ-4',
|
57
57
|
maximumDate: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=46454-16454&mode=design&t=PX1Q47IuuVvOafDQ-4',
|
58
|
-
|
58
|
+
hasAutofocus: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=46454-16768&mode=design&t=PX1Q47IuuVvOafDQ-4'
|
59
59
|
},
|
60
60
|
callout: {
|
61
61
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=45647%3A506&mode=dev',
|
@@ -25,8 +25,8 @@ var MarkdownContainer = function MarkdownContainer(props) {
|
|
25
25
|
stateIndex = _useContext.stateIndex,
|
26
26
|
delay = _useContext.delay;
|
27
27
|
var containerChildren = Children.toArray(children);
|
28
|
-
var
|
29
|
-
if (
|
28
|
+
var hasBlocks = checkContainsBlocks(containerChildren);
|
29
|
+
if (hasBlocks) {
|
30
30
|
return ___EmotionJSX(Box, others, _mapInstanceProperty(Children).call(Children, containerChildren, function (child, i) {
|
31
31
|
return /*#__PURE__*/React.cloneElement(child, {
|
32
32
|
animationIndex: i,
|
@@ -31,7 +31,8 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
31
|
hasAutoFocus = props.hasAutoFocus,
|
32
32
|
maxValue = props.maxValue,
|
33
33
|
minValue = props.minValue,
|
34
|
-
value = props.value
|
34
|
+
value = props.value,
|
35
|
+
calendarWrapperProps = props.calendarWrapperProps;
|
35
36
|
var _useLocale = useLocale(),
|
36
37
|
locale = _useLocale.locale;
|
37
38
|
var calenderRef = useLocalOrForwardRef(ref);
|
@@ -104,7 +105,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
104
105
|
fontWeight: 3,
|
105
106
|
flex: 1
|
106
107
|
}, title);
|
107
|
-
return ___EmotionJSX(Box, _extends({}, calendarProps, {
|
108
|
+
return ___EmotionJSX(Box, _extends({}, calendarProps, calendarWrapperProps, {
|
108
109
|
ref: calenderRef,
|
109
110
|
variant: "calendar.calendarContainer",
|
110
111
|
role: "group"
|
@@ -45,8 +45,10 @@ var IndeterminateCheckboxIcon = function IndeterminateCheckboxIcon(props) {
|
|
45
45
|
}));
|
46
46
|
};
|
47
47
|
IndeterminateCheckboxIcon.propTypes = {
|
48
|
+
// TODO: [Astro 3.0.0] Remove this boolean in favor of the proper naming convention - isDisabled
|
48
49
|
// eslint-disable-next-line react/boolean-prop-naming
|
49
|
-
disabled: PropTypes.bool
|
50
|
+
disabled: PropTypes.bool,
|
51
|
+
isDisabled: PropTypes.bool
|
50
52
|
};
|
51
53
|
|
52
54
|
/**
|