@mantine/core 6.0.0-alpha.5 → 6.0.0-alpha.6
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/cjs/Anchor/Anchor.js +2 -2
- package/cjs/Anchor/Anchor.js.map +1 -1
- package/cjs/Anchor/Anchor.styles.js +2 -2
- package/cjs/Anchor/Anchor.styles.js.map +1 -1
- package/cjs/Autocomplete/Autocomplete.js +4 -10
- package/cjs/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/ColorInput/ColorInput.js +4 -10
- package/cjs/ColorInput/ColorInput.js.map +1 -1
- package/cjs/ColorInput/EyeDropperIcon.js.map +1 -1
- package/cjs/Input/InputLabel/InputLabel.js +11 -3
- package/cjs/Input/InputLabel/InputLabel.js.map +1 -1
- package/cjs/Input/use-input-props.js +24 -23
- package/cjs/Input/use-input-props.js.map +1 -1
- package/cjs/ModalBase/ModalBase.js.map +1 -1
- package/cjs/MultiSelect/MultiSelect.js +12 -12
- package/cjs/MultiSelect/MultiSelect.js.map +1 -1
- package/cjs/Notification/Notification.styles.js +1 -0
- package/cjs/Notification/Notification.styles.js.map +1 -1
- package/cjs/Pagination/Pagination.context.js +11 -0
- package/cjs/Pagination/Pagination.context.js.map +1 -0
- package/cjs/Pagination/Pagination.icons.js +81 -0
- package/cjs/Pagination/Pagination.icons.js.map +1 -0
- package/cjs/Pagination/Pagination.js +93 -98
- package/cjs/Pagination/Pagination.js.map +1 -1
- package/cjs/Pagination/PaginationControl/PaginationControl.js +64 -0
- package/cjs/Pagination/PaginationControl/PaginationControl.js.map +1 -0
- package/cjs/Pagination/PaginationControl/PaginationControl.styles.js +54 -0
- package/cjs/Pagination/PaginationControl/PaginationControl.styles.js.map +1 -0
- package/cjs/Pagination/PaginationDots/PaginationDots.js +67 -0
- package/cjs/Pagination/PaginationDots/PaginationDots.js.map +1 -0
- package/cjs/Pagination/PaginationDots/PaginationDots.styles.js +20 -0
- package/cjs/Pagination/PaginationDots/PaginationDots.styles.js.map +1 -0
- package/cjs/Pagination/PaginationEdges/PaginationEdges.js +92 -0
- package/cjs/Pagination/PaginationEdges/PaginationEdges.js.map +1 -0
- package/cjs/Pagination/PaginationItems/PaginationItems.js +53 -0
- package/cjs/Pagination/PaginationItems/PaginationItems.js.map +1 -0
- package/cjs/Pagination/PaginationRoot/PaginationRoot.js +81 -0
- package/cjs/Pagination/PaginationRoot/PaginationRoot.js.map +1 -0
- package/cjs/PasswordInput/PasswordInput.styles.js +3 -0
- package/cjs/PasswordInput/PasswordInput.styles.js.map +1 -1
- package/cjs/Popover/Popover.context.js.map +1 -1
- package/cjs/Popover/Popover.js +4 -11
- package/cjs/Popover/Popover.js.map +1 -1
- package/cjs/Popover/PopoverDropdown/PopoverDropdown.js +10 -8
- package/cjs/Popover/PopoverDropdown/PopoverDropdown.js.map +1 -1
- package/cjs/Select/Select.js +4 -10
- package/cjs/Select/Select.js.map +1 -1
- package/cjs/Select/SelectPopover/SelectPopover.js +2 -4
- package/cjs/Select/SelectPopover/SelectPopover.js.map +1 -1
- package/cjs/Table/Table.styles.js +5 -2
- package/cjs/Table/Table.styles.js.map +1 -1
- package/cjs/Text/Text.js.map +1 -1
- package/cjs/Text/Text.styles.js +11 -2
- package/cjs/Text/Text.styles.js.map +1 -1
- package/cjs/Tooltip/Tooltip.js +12 -13
- package/cjs/Tooltip/Tooltip.js.map +1 -1
- package/cjs/TransferList/RenderList/RenderList.js +19 -14
- package/cjs/TransferList/RenderList/RenderList.js.map +1 -1
- package/esm/Anchor/Anchor.js +2 -2
- package/esm/Anchor/Anchor.js.map +1 -1
- package/esm/Anchor/Anchor.styles.js +2 -2
- package/esm/Anchor/Anchor.styles.js.map +1 -1
- package/esm/Autocomplete/Autocomplete.js +4 -10
- package/esm/Autocomplete/Autocomplete.js.map +1 -1
- package/esm/ColorInput/ColorInput.js +4 -10
- package/esm/ColorInput/ColorInput.js.map +1 -1
- package/esm/ColorInput/EyeDropperIcon.js.map +1 -1
- package/esm/Input/InputLabel/InputLabel.js +11 -3
- package/esm/Input/InputLabel/InputLabel.js.map +1 -1
- package/esm/Input/use-input-props.js +24 -23
- package/esm/Input/use-input-props.js.map +1 -1
- package/esm/ModalBase/ModalBase.js.map +1 -1
- package/esm/MultiSelect/MultiSelect.js +12 -12
- package/esm/MultiSelect/MultiSelect.js.map +1 -1
- package/esm/Notification/Notification.styles.js +1 -0
- package/esm/Notification/Notification.styles.js.map +1 -1
- package/esm/Pagination/Pagination.context.js +6 -0
- package/esm/Pagination/Pagination.context.js.map +1 -0
- package/esm/Pagination/Pagination.icons.js +68 -0
- package/esm/Pagination/Pagination.icons.js.map +1 -0
- package/esm/Pagination/Pagination.js +95 -100
- package/esm/Pagination/Pagination.js.map +1 -1
- package/esm/Pagination/PaginationControl/PaginationControl.js +56 -0
- package/esm/Pagination/PaginationControl/PaginationControl.js.map +1 -0
- package/esm/Pagination/PaginationControl/PaginationControl.styles.js +50 -0
- package/esm/Pagination/PaginationControl/PaginationControl.styles.js.map +1 -0
- package/esm/Pagination/PaginationDots/PaginationDots.js +59 -0
- package/esm/Pagination/PaginationDots/PaginationDots.js.map +1 -0
- package/esm/Pagination/PaginationDots/PaginationDots.styles.js +16 -0
- package/esm/Pagination/PaginationDots/PaginationDots.styles.js.map +1 -0
- package/esm/Pagination/PaginationEdges/PaginationEdges.js +80 -0
- package/esm/Pagination/PaginationEdges/PaginationEdges.js.map +1 -0
- package/esm/Pagination/PaginationItems/PaginationItems.js +45 -0
- package/esm/Pagination/PaginationItems/PaginationItems.js.map +1 -0
- package/esm/Pagination/PaginationRoot/PaginationRoot.js +73 -0
- package/esm/Pagination/PaginationRoot/PaginationRoot.js.map +1 -0
- package/esm/PasswordInput/PasswordInput.styles.js +3 -0
- package/esm/PasswordInput/PasswordInput.styles.js.map +1 -1
- package/esm/Popover/Popover.context.js.map +1 -1
- package/esm/Popover/Popover.js +4 -11
- package/esm/Popover/Popover.js.map +1 -1
- package/esm/Popover/PopoverDropdown/PopoverDropdown.js +10 -8
- package/esm/Popover/PopoverDropdown/PopoverDropdown.js.map +1 -1
- package/esm/Select/Select.js +4 -10
- package/esm/Select/Select.js.map +1 -1
- package/esm/Select/SelectPopover/SelectPopover.js +2 -4
- package/esm/Select/SelectPopover/SelectPopover.js.map +1 -1
- package/esm/Table/Table.styles.js +5 -2
- package/esm/Table/Table.styles.js.map +1 -1
- package/esm/Text/Text.js.map +1 -1
- package/esm/Text/Text.styles.js +11 -2
- package/esm/Text/Text.styles.js.map +1 -1
- package/esm/Tooltip/Tooltip.js +12 -13
- package/esm/Tooltip/Tooltip.js.map +1 -1
- package/esm/TransferList/RenderList/RenderList.js +19 -14
- package/esm/TransferList/RenderList/RenderList.js.map +1 -1
- package/lib/Anchor/Anchor.d.ts.map +1 -1
- package/lib/Anchor/Anchor.styles.d.ts +5 -1
- package/lib/Anchor/Anchor.styles.d.ts.map +1 -1
- package/lib/Anchor/index.d.ts +1 -0
- package/lib/Anchor/index.d.ts.map +1 -1
- package/lib/AppShell/HorizontalSection/HorizontalSection.d.ts +1 -1
- package/lib/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/lib/ColorInput/ColorInput.d.ts +3 -7
- package/lib/ColorInput/ColorInput.d.ts.map +1 -1
- package/lib/ColorInput/EyeDropperIcon.d.ts +1 -1
- package/lib/Input/InputLabel/InputLabel.d.ts.map +1 -1
- package/lib/Input/use-input-props.d.ts +39 -6
- package/lib/Input/use-input-props.d.ts.map +1 -1
- package/lib/ModalBase/ModalBase.d.ts +0 -2
- package/lib/ModalBase/ModalBase.d.ts.map +1 -1
- package/lib/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/lib/Notification/Notification.styles.d.ts.map +1 -1
- package/lib/Pagination/Pagination.context.d.ts +30 -0
- package/lib/Pagination/Pagination.context.d.ts.map +1 -0
- package/lib/Pagination/Pagination.d.ts +55 -36
- package/lib/Pagination/Pagination.d.ts.map +1 -1
- package/lib/Pagination/Pagination.icons.d.ts +16 -0
- package/lib/Pagination/Pagination.icons.d.ts.map +1 -0
- package/lib/Pagination/PaginationControl/PaginationControl.d.ts +12 -0
- package/lib/Pagination/PaginationControl/PaginationControl.d.ts.map +1 -0
- package/lib/Pagination/PaginationControl/PaginationControl.styles.d.ts +22 -0
- package/lib/Pagination/PaginationControl/PaginationControl.styles.d.ts.map +1 -0
- package/lib/Pagination/PaginationDots/PaginationDots.d.ts +11 -0
- package/lib/Pagination/PaginationDots/PaginationDots.d.ts.map +1 -0
- package/lib/Pagination/PaginationDots/PaginationDots.styles.d.ts +9 -0
- package/lib/Pagination/PaginationDots/PaginationDots.styles.d.ts.map +1 -0
- package/lib/Pagination/PaginationEdges/PaginationEdges.d.ts +48 -0
- package/lib/Pagination/PaginationEdges/PaginationEdges.d.ts.map +1 -0
- package/lib/Pagination/PaginationItems/PaginationItems.d.ts +11 -0
- package/lib/Pagination/PaginationItems/PaginationItems.d.ts.map +1 -0
- package/lib/Pagination/PaginationRoot/PaginationRoot.d.ts +47 -0
- package/lib/Pagination/PaginationRoot/PaginationRoot.d.ts.map +1 -0
- package/lib/Pagination/index.d.ts +4 -2
- package/lib/Pagination/index.d.ts.map +1 -1
- package/lib/PasswordInput/PasswordInput.styles.d.ts.map +1 -1
- package/lib/Popover/Popover.context.d.ts +2 -4
- package/lib/Popover/Popover.context.d.ts.map +1 -1
- package/lib/Popover/Popover.d.ts +3 -7
- package/lib/Popover/Popover.d.ts.map +1 -1
- package/lib/Popover/PopoverDropdown/PopoverDropdown.d.ts.map +1 -1
- package/lib/ScrollArea/ScrollArea.d.ts +1 -1
- package/lib/Select/Select.d.ts +4 -8
- package/lib/Select/Select.d.ts.map +1 -1
- package/lib/Select/SelectPopover/SelectPopover.d.ts +3 -4
- package/lib/Select/SelectPopover/SelectPopover.d.ts.map +1 -1
- package/lib/Select/SelectScrollArea/SelectScrollArea.d.ts +1 -1
- package/lib/Table/Table.styles.d.ts.map +1 -1
- package/lib/Text/Text.d.ts +1 -1
- package/lib/Text/Text.d.ts.map +1 -1
- package/lib/Text/Text.styles.d.ts +1 -1
- package/lib/Text/Text.styles.d.ts.map +1 -1
- package/lib/Tooltip/Tooltip.d.ts +3 -5
- package/lib/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/TransferList/RenderList/RenderList.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var Pagination_context = require('../Pagination.context.js');
|
|
7
|
+
var PaginationControl = require('../PaginationControl/PaginationControl.js');
|
|
8
|
+
var PaginationDots = require('../PaginationDots/PaginationDots.js');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
|
|
14
|
+
var __defProp = Object.defineProperty;
|
|
15
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
16
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
18
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
+
var __spreadValues = (a, b) => {
|
|
20
|
+
for (var prop in b || (b = {}))
|
|
21
|
+
if (__hasOwnProp.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
if (__getOwnPropSymbols)
|
|
24
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
+
if (__propIsEnum.call(b, prop))
|
|
26
|
+
__defNormalProp(a, prop, b[prop]);
|
|
27
|
+
}
|
|
28
|
+
return a;
|
|
29
|
+
};
|
|
30
|
+
function PaginationItems({ dotsIcon }) {
|
|
31
|
+
const ctx = Pagination_context.usePaginationContext();
|
|
32
|
+
const items = ctx.range.map((page, index) => {
|
|
33
|
+
var _a;
|
|
34
|
+
if (page === "dots") {
|
|
35
|
+
return /* @__PURE__ */ React__default.createElement(PaginationDots.PaginationDots, {
|
|
36
|
+
icon: dotsIcon,
|
|
37
|
+
key: index
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return /* @__PURE__ */ React__default.createElement(PaginationControl.PaginationControl, __spreadValues({
|
|
41
|
+
key: index,
|
|
42
|
+
active: page === ctx.active,
|
|
43
|
+
"aria-current": page === ctx.active ? "page" : void 0,
|
|
44
|
+
onClick: () => ctx.onChange(page),
|
|
45
|
+
disabled: ctx.disabled
|
|
46
|
+
}, (_a = ctx.getItemProps) == null ? void 0 : _a.call(ctx, page)), page);
|
|
47
|
+
});
|
|
48
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, items);
|
|
49
|
+
}
|
|
50
|
+
PaginationItems.displayName = "@mantine/core/PaginationItems";
|
|
51
|
+
|
|
52
|
+
exports.PaginationItems = PaginationItems;
|
|
53
|
+
//# sourceMappingURL=PaginationItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationItems.js","sources":["../../../src/Pagination/PaginationItems/PaginationItems.tsx"],"sourcesContent":["import React from 'react';\nimport { usePaginationContext } from '../Pagination.context';\nimport { PaginationControl } from '../PaginationControl/PaginationControl';\nimport { PaginationDots } from '../PaginationDots/PaginationDots';\nimport { PaginationIcon } from '../Pagination.icons';\n\nexport interface PaginationItemsProps {\n /** Dots icon component */\n dotsIcon?: PaginationIcon;\n}\n\nexport function PaginationItems({ dotsIcon }: PaginationItemsProps) {\n const ctx = usePaginationContext();\n\n const items = ctx.range.map((page, index) => {\n if (page === 'dots') {\n return <PaginationDots icon={dotsIcon} key={index} />;\n }\n\n return (\n <PaginationControl\n key={index}\n active={page === ctx.active}\n aria-current={page === ctx.active ? 'page' : undefined}\n onClick={() => ctx.onChange(page)}\n disabled={ctx.disabled}\n {...ctx.getItemProps?.(page)}\n >\n {page}\n </PaginationControl>\n );\n });\n return <>{items}</>;\n}\n\nPaginationItems.displayName = '@mantine/core/PaginationItems';\n"],"names":["usePaginationContext","React","PaginationDots","PaginationControl"],"mappings":";;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,KAAK;AACL,EAAE,OAAO,CAAC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ineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var styles = require('@mantine/styles');
|
|
7
|
+
var hooks = require('@mantine/hooks');
|
|
8
|
+
var utils = require('@mantine/utils');
|
|
9
|
+
var Pagination_context = require('../Pagination.context.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
+
|
|
15
|
+
const defaultProps = {
|
|
16
|
+
siblings: 1,
|
|
17
|
+
boundaries: 1
|
|
18
|
+
};
|
|
19
|
+
function PaginationRoot(props) {
|
|
20
|
+
const {
|
|
21
|
+
total,
|
|
22
|
+
value,
|
|
23
|
+
defaultValue,
|
|
24
|
+
onChange,
|
|
25
|
+
disabled,
|
|
26
|
+
children,
|
|
27
|
+
siblings,
|
|
28
|
+
boundaries,
|
|
29
|
+
color,
|
|
30
|
+
radius,
|
|
31
|
+
onNextPage,
|
|
32
|
+
onPreviousPage,
|
|
33
|
+
onFirstPage,
|
|
34
|
+
onLastPage,
|
|
35
|
+
getItemProps,
|
|
36
|
+
classNames,
|
|
37
|
+
styles: styles$1,
|
|
38
|
+
unstyled,
|
|
39
|
+
variant,
|
|
40
|
+
size
|
|
41
|
+
} = styles.useComponentDefaultProps("PaginationRoot", defaultProps, props);
|
|
42
|
+
const { range, setPage, next, previous, active, first, last } = hooks.usePagination({
|
|
43
|
+
page: value,
|
|
44
|
+
initialPage: defaultValue,
|
|
45
|
+
onChange,
|
|
46
|
+
total,
|
|
47
|
+
siblings,
|
|
48
|
+
boundaries
|
|
49
|
+
});
|
|
50
|
+
const handleNextPage = utils.createEventHandler(onNextPage, next);
|
|
51
|
+
const handlePreviousPage = utils.createEventHandler(onPreviousPage, previous);
|
|
52
|
+
const handleFirstPage = utils.createEventHandler(onFirstPage, first);
|
|
53
|
+
const handleLastPage = utils.createEventHandler(onLastPage, last);
|
|
54
|
+
return /* @__PURE__ */ React__default.createElement(Pagination_context.PaginationProvider, {
|
|
55
|
+
value: {
|
|
56
|
+
total,
|
|
57
|
+
range,
|
|
58
|
+
active,
|
|
59
|
+
disabled,
|
|
60
|
+
color,
|
|
61
|
+
radius,
|
|
62
|
+
getItemProps,
|
|
63
|
+
onChange: setPage,
|
|
64
|
+
onNext: handleNextPage,
|
|
65
|
+
onPrevious: handlePreviousPage,
|
|
66
|
+
onFirst: handleFirstPage,
|
|
67
|
+
onLast: handleLastPage,
|
|
68
|
+
stylesApi: {
|
|
69
|
+
name: "Pagination",
|
|
70
|
+
classNames,
|
|
71
|
+
styles: styles$1,
|
|
72
|
+
unstyled,
|
|
73
|
+
variant,
|
|
74
|
+
size
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, children);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
exports.PaginationRoot = PaginationRoot;
|
|
81
|
+
//# sourceMappingURL=PaginationRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationRoot.js","sources":["../../../src/Pagination/PaginationRoot/PaginationRoot.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\nimport React from 'react';\nimport {\n MantineColor,\n MantineNumberSize,\n useComponentDefaultProps,\n ClassNames,\n Styles,\n} from '@mantine/styles';\nimport { usePagination } from '@mantine/hooks';\nimport { createEventHandler } from '@mantine/utils';\nimport { PaginationProvider } from '../Pagination.context';\nimport type { PaginationControlStylesNames } from '../PaginationControl/PaginationControl';\nimport type { PaginationDotsStylesNames } from '../PaginationDots/PaginationDots';\n\nexport type PaginationStylesNames = PaginationControlStylesNames | PaginationDotsStylesNames;\n\nexport interface PaginationRootSettings {\n classNames?: ClassNames<PaginationStylesNames>;\n styles?: Styles<PaginationStylesNames>;\n unstyled?: boolean;\n variant?: string;\n\n /** Controls height and min-width */\n size?: MantineNumberSize;\n\n /** Total number of pages, must be an integer */\n total: number;\n\n /** Active page for controlled component, must be an integer in [0, total] interval */\n value?: number;\n\n /** Active page for uncontrolled component, must be an integer in [0, total] interval */\n defaultValue?: number;\n\n /** Called when page changes */\n onChange?(value: number): void;\n\n /** Determines whether all controls should be disabled, false by default */\n disabled?: boolean;\n\n /** Number of siblings displayed on the left/right side of selected page, 1 by default */\n siblings?: number;\n\n /** Number of elements visible on the left/right edges, 1 by default */\n boundaries?: number;\n\n /** Key of theme.colors, active item color, theme.primaryColor by default */\n color?: MantineColor;\n\n /** Key of theme.radius, border-radius of items and controls, theme.defaultRadius by default */\n radius?: MantineNumberSize;\n\n /** Called when next page control is clicked */\n onNextPage?(): void;\n\n /** Called when previous page control is clicked */\n onPreviousPage?(): void;\n\n /** Called when first page control is clicked */\n onFirstPage?(): void;\n\n /** Called when last page control is clicked */\n onLastPage?(): void;\n\n /** Add additional props to items */\n getItemProps?(page: number): Record<string, any>;\n}\n\nexport interface PaginationRootProps extends PaginationRootSettings {\n /** Pagination content */\n children?: React.ReactNode;\n}\n\nconst defaultProps: Partial<PaginationRootProps> = {\n siblings: 1,\n boundaries: 1,\n};\n\nexport function PaginationRoot(props: PaginationRootProps) {\n const {\n total,\n value,\n defaultValue,\n onChange,\n disabled,\n children,\n siblings,\n boundaries,\n color,\n radius,\n onNextPage,\n onPreviousPage,\n onFirstPage,\n onLastPage,\n getItemProps,\n classNames,\n styles,\n unstyled,\n variant,\n size,\n } = useComponentDefaultProps('PaginationRoot', defaultProps, props);\n\n const { range, setPage, next, previous, active, first, last } = usePagination({\n page: value,\n initialPage: defaultValue,\n onChange,\n total,\n siblings,\n boundaries,\n });\n\n const handleNextPage = createEventHandler(onNextPage, next);\n const handlePreviousPage = createEventHandler(onPreviousPage, previous);\n const handleFirstPage = createEventHandler(onFirstPage, first);\n const handleLastPage = createEventHandler(onLastPage, last);\n\n return (\n <PaginationProvider\n value={{\n total,\n range,\n active,\n disabled,\n color,\n radius,\n getItemProps,\n onChange: setPage,\n onNext: handleNextPage,\n onPrevious: handlePreviousPage,\n onFirst: handleFirstPage,\n onLast: handleLastPage,\n stylesApi: {\n name: 'Pagination',\n classNames,\n styles,\n unstyled,\n variant,\n size,\n },\n }}\n >\n {children}\n </PaginationProvider>\n );\n}\n"],"names":["styles","useComponentDefaultProps","usePagination","createEventHandler","React","PaginationProvider"],"mappings":";;;;;;;;;;;;;;AAOA,MAAM,YAAY,GAAG;AACrB,EAAE,QAAQ,EAAE,CAAC;AACb,EAAE,UAAU,EAAE,CAAC;AACf,CAAC,CAAC;AACK,SAAS,cAAc,CAAC,KAAK,EAAE;AACtC,EAAE,MAAM;AACR,IAAI,KAAK;AACT,IAAI,KAAK;AACT,IAAI,YAAY;AAChB,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,KAAK;AACT,IAAI,MAAM;AACV,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,IAAI,UAAU;AACd,YAAIA,QAAM;AACV,IAAI,QAAQ;AACZ,IAAI,OAAO;AACX,IAAI,IAAI;AACR,GAAG,GAAGC,+BAAwB,CAAC,gBAAgB,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AACtE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAGC,mBAAa,CAAC;AAChF,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,WAAW,EAAE,YAAY;AAC7B,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,cAAc,GAAGC,wBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC9D,EAAE,MAAM,kBAAkB,GAAGA,wBAAkB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAC1E,EAAE,MAAM,eAAe,GAAGA,wBAAkB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACjE,EAAE,MAAM,cAAc,GAAGA,wBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC9D,EAAE,uBAAuBC,cAAK,CAAC,aAAa,CAACC,qCAAkB,EAAE;AACjE,IAAI,KAAK,EAAE;AACX,MAAM,KAAK;AACX,MAAM,KAAK;AACX,MAAM,MAAM;AACZ,MAAM,QAAQ;AACd,MAAM,KAAK;AACX,MAAM,MAAM;AACZ,MAAM,YAAY;AAClB,MAAM,QAAQ,EAAE,OAAO;AACvB,MAAM,MAAM,EAAE,cAAc;AAC5B,MAAM,UAAU,EAAE,kBAAkB;AACpC,MAAM,OAAO,EAAE,eAAe;AAC9B,MAAM,MAAM,EAAE,cAAc;AAC5B,MAAM,SAAS,EAAE;AACjB,QAAQ,IAAI,EAAE,YAAY;AAC1B,QAAQ,UAAU;AAClB,gBAAQL,QAAM;AACd,QAAQ,QAAQ;AAChB,QAAQ,OAAO;AACf,QAAQ,IAAI;AACZ,OAAO;AACP,KAAK;AACL,GAAG,EAAE,QAAQ,CAAC,CAAC;AACf;;;;"}
|
|
@@ -43,6 +43,9 @@ var useStyles = styles.createStyles((theme, { rightSectionWidth }, { size }) =>
|
|
|
43
43
|
height: `calc(${styles.getSize({ size, sizes: Input_styles.sizes })} - ${styles.rem(2)})`,
|
|
44
44
|
lineHeight: `calc(${styles.getSize({ size, sizes: Input_styles.sizes })} - ${styles.rem(4)})`,
|
|
45
45
|
color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black,
|
|
46
|
+
"&::-ms-revel, &::-ms-clear": {
|
|
47
|
+
display: "none"
|
|
48
|
+
},
|
|
46
49
|
"&:focus": {
|
|
47
50
|
outline: 0
|
|
48
51
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.styles.js","sources":["../../src/PasswordInput/PasswordInput.styles.ts"],"sourcesContent":["import { createStyles, rem, getSize } from '@mantine/styles';\nimport { INPUT_SIZES } from '../Input';\n\nexport interface PasswordInputStylesParams {\n rightSectionWidth: number | string;\n}\n\nexport default createStyles(\n (theme, { rightSectionWidth }: PasswordInputStylesParams, { size }) => ({\n visibilityToggle: {},\n\n input: {\n position: 'relative',\n overflow: 'hidden',\n },\n\n innerInput: {\n ...theme.fn.fontStyles(),\n ...theme.fn.cover(0),\n backgroundColor: 'transparent',\n border: `${rem(1)} solid transparent`,\n borderLeftWidth: 0,\n borderRightWidth: 0,\n boxSizing: 'border-box',\n display: 'block',\n width: `calc(100% - ${rem(rightSectionWidth)})`,\n paddingLeft: `calc(${getSize({ size, sizes: INPUT_SIZES })} / 3)`,\n fontSize: getSize({ size, sizes: theme.fontSizes }),\n height: `calc(${getSize({ size, sizes: INPUT_SIZES })} - ${rem(2)})`,\n lineHeight: `calc(${getSize({ size, sizes: INPUT_SIZES })} - ${rem(4)})`,\n color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black,\n\n '&:focus': {\n outline: 0,\n },\n\n '&:disabled': {\n cursor: 'not-allowed',\n },\n\n '&::placeholder': {\n ...theme.fn.placeholderStyles(),\n opacity: 1,\n },\n\n '&[data-invalid]': {\n color: theme.fn.variant({ variant: 'filled', color: 'red' }).background,\n\n '&::placeholder': {\n opacity: 1,\n color: theme.fn.variant({ variant: 'filled', color: 'red' }).background,\n },\n },\n\n '&[data-with-icon]': {\n paddingLeft: getSize({ size, sizes: INPUT_SIZES }),\n },\n },\n })\n);\n"],"names":["createStyles","rem","getSize","INPUT_SIZES"],"mappings":";;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,I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AI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK;AAC5E,IAAI,SAAS,EAAE;AACf,MAAM,OAAO,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,MAAM,MAAM,EAAE,aAAa;AAC3B,KAAK;AACL,IAAI,gBAAgB,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAAE;AACtF,MAAM,OAAO,EAAE,CAAC;AAChB,KAAK,CAAC;AACN,IAAI,iBAAiB,EAAE;AACvB,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU;AAC7E,MAAM,gBAAgB,EAAE;AACxB,QAAQ,OAAO,EAAE,CAAC;AAClB,QAAQ,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU;AAC/E,OAAO;AACP,KAAK;AACL,IAAI,mBAAmB,EAAE;AACzB,MAAM,WAAW,EAAEC,cAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAEC,kBAAW,EAAE,CAAC;AACxD,KAAK;AACL,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"PasswordInput.styles.js","sources":["../../src/PasswordInput/PasswordInput.styles.ts"],"sourcesContent":["import { createStyles, rem, getSize } from '@mantine/styles';\nimport { INPUT_SIZES } from '../Input';\n\nexport interface PasswordInputStylesParams {\n rightSectionWidth: number | string;\n}\n\nexport default createStyles(\n (theme, { rightSectionWidth }: PasswordInputStylesParams, { size }) => ({\n visibilityToggle: {},\n\n input: {\n position: 'relative',\n overflow: 'hidden',\n },\n\n innerInput: {\n ...theme.fn.fontStyles(),\n ...theme.fn.cover(0),\n backgroundColor: 'transparent',\n border: `${rem(1)} solid transparent`,\n borderLeftWidth: 0,\n borderRightWidth: 0,\n boxSizing: 'border-box',\n display: 'block',\n width: `calc(100% - ${rem(rightSectionWidth)})`,\n paddingLeft: `calc(${getSize({ size, sizes: INPUT_SIZES })} / 3)`,\n fontSize: getSize({ size, sizes: theme.fontSizes }),\n height: `calc(${getSize({ size, sizes: INPUT_SIZES })} - ${rem(2)})`,\n lineHeight: `calc(${getSize({ size, sizes: INPUT_SIZES })} - ${rem(4)})`,\n color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black,\n\n '&::-ms-revel, &::-ms-clear': {\n display: 'none',\n },\n\n '&:focus': {\n outline: 0,\n },\n\n '&:disabled': {\n cursor: 'not-allowed',\n },\n\n '&::placeholder': {\n ...theme.fn.placeholderStyles(),\n opacity: 1,\n },\n\n '&[data-invalid]': {\n color: theme.fn.variant({ variant: 'filled', color: 'red' }).background,\n\n '&::placeholder': {\n opacity: 1,\n color: theme.fn.variant({ variant: 'filled', color: 'red' }).background,\n },\n },\n\n '&[data-with-icon]': {\n paddingLeft: getSize({ size, sizes: INPUT_SIZES }),\n },\n },\n })\n);\n"],"names":["createStyles","rem","getSize","INPUT_SIZES"],"mappings":";;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EA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;AACL,IAAI,gBAAgB,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAAE;AACtF,MAAM,OAAO,EAAE,CAAC;AAChB,KAAK,CAAC;AACN,IAAI,iBAAiB,EAAE;AACvB,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU;AAC7E,MAAM,gBAAgB,EAAE;AACxB,QAAQ,OAAO,EAAE,CAAC;AAClB,QAAQ,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU;AAC/E,OAAO;AACP,KAAK;AACL,IAAI,mBAAmB,EAAE;AACzB,MAAM,WAAW,EAAEC,cAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAEC,kBAAW,EAAE,CAAC;AACxD,KAAK;AACL,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.context.js","sources":["../../src/Popover/Popover.context.ts"],"sourcesContent":["import { ReferenceType } from '@floating-ui/react';\nimport { createSafeContext } from '@mantine/utils';\nimport { MantineNumberSize, MantineShadow, ClassNames, Styles } from '@mantine/styles';\nimport { FloatingPosition, ArrowPosition } from '../Floating';\nimport {
|
|
1
|
+
{"version":3,"file":"Popover.context.js","sources":["../../src/Popover/Popover.context.ts"],"sourcesContent":["import { ReferenceType } from '@floating-ui/react';\nimport { createSafeContext } from '@mantine/utils';\nimport { MantineNumberSize, MantineShadow, ClassNames, Styles } from '@mantine/styles';\nimport { FloatingPosition, ArrowPosition } from '../Floating';\nimport { TransitionOverride } from '../Transition';\nimport { POPOVER_ERRORS } from './Popover.errors';\nimport { PopoverWidth, PopoverStylesNames, PopoverStylesParams } from './Popover.types';\n\ninterface PopoverContext {\n x: number;\n y: number;\n arrowX: number;\n arrowY: number;\n arrowRef: React.RefObject<HTMLDivElement>;\n opened: boolean;\n transitionProps?: TransitionOverride;\n reference: (node: ReferenceType) => void;\n floating: (node: HTMLElement) => void;\n width?: PopoverWidth;\n withArrow: boolean;\n arrowSize: number;\n arrowOffset: number;\n arrowRadius: number;\n arrowPosition: ArrowPosition;\n trapFocus: boolean;\n placement: FloatingPosition;\n withinPortal: boolean;\n closeOnEscape: boolean;\n zIndex: React.CSSProperties['zIndex'];\n radius?: MantineNumberSize;\n shadow?: MantineShadow;\n onClose?(): void;\n getDropdownId(): string;\n getTargetId(): string;\n controlled: boolean;\n onToggle(): void;\n withRoles: boolean;\n targetProps: Record<string, any>;\n disabled: boolean;\n returnFocus: boolean;\n classNames: ClassNames<PopoverStylesNames>;\n styles: Styles<PopoverStylesNames, PopoverStylesParams>;\n unstyled: boolean;\n __staticSelector: string;\n variant: string;\n keepMounted: boolean;\n}\n\nexport const [PopoverContextProvider, usePopoverContext] = createSafeContext<PopoverContext>(\n POPOVER_ERRORS.context\n);\n"],"names":["createSafeContext","POPOVER_ERRORS"],"mappings":";;;;;;;AAEY,MAAC,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,GAAGA,uBAAiB,CAACC,6BAAc,CAAC,OAAO;;;;;"}
|
package/cjs/Popover/Popover.js
CHANGED
|
@@ -34,8 +34,7 @@ const defaultProps = {
|
|
|
34
34
|
position: "bottom",
|
|
35
35
|
offset: 8,
|
|
36
36
|
positionDependencies: [],
|
|
37
|
-
transition: "fade",
|
|
38
|
-
transitionDuration: 150,
|
|
37
|
+
transitionProps: { transition: "fade", duration: 150 },
|
|
39
38
|
middlewares: { flip: true, shift: true, inline: false },
|
|
40
39
|
arrowSize: 7,
|
|
41
40
|
arrowOffset: 5,
|
|
@@ -62,8 +61,7 @@ function Popover(props) {
|
|
|
62
61
|
onPositionChange,
|
|
63
62
|
positionDependencies,
|
|
64
63
|
opened,
|
|
65
|
-
|
|
66
|
-
transitionDuration,
|
|
64
|
+
transitionProps,
|
|
67
65
|
width,
|
|
68
66
|
middlewares,
|
|
69
67
|
withArrow,
|
|
@@ -87,7 +85,6 @@ function Popover(props) {
|
|
|
87
85
|
shadow,
|
|
88
86
|
id,
|
|
89
87
|
defaultOpened,
|
|
90
|
-
exitTransitionDuration,
|
|
91
88
|
__staticSelector,
|
|
92
89
|
withRoles,
|
|
93
90
|
disabled,
|
|
@@ -101,8 +98,7 @@ function Popover(props) {
|
|
|
101
98
|
"onPositionChange",
|
|
102
99
|
"positionDependencies",
|
|
103
100
|
"opened",
|
|
104
|
-
"
|
|
105
|
-
"transitionDuration",
|
|
101
|
+
"transitionProps",
|
|
106
102
|
"width",
|
|
107
103
|
"middlewares",
|
|
108
104
|
"withArrow",
|
|
@@ -126,7 +122,6 @@ function Popover(props) {
|
|
|
126
122
|
"shadow",
|
|
127
123
|
"id",
|
|
128
124
|
"defaultOpened",
|
|
129
|
-
"exitTransitionDuration",
|
|
130
125
|
"__staticSelector",
|
|
131
126
|
"withRoles",
|
|
132
127
|
"disabled",
|
|
@@ -178,9 +173,7 @@ function Popover(props) {
|
|
|
178
173
|
arrowY: (_g = (_f = (_e = popover.floating) == null ? void 0 : _e.middlewareData) == null ? void 0 : _f.arrow) == null ? void 0 : _g.y,
|
|
179
174
|
opened: popover.opened,
|
|
180
175
|
arrowRef,
|
|
181
|
-
|
|
182
|
-
transitionDuration,
|
|
183
|
-
exitTransitionDuration,
|
|
176
|
+
transitionProps,
|
|
184
177
|
width,
|
|
185
178
|
withArrow,
|
|
186
179
|
arrowSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n\nimport React, { useRef, useState, useCallback } from 'react';\nimport { useId, useClickOutside } from '@mantine/hooks';\nimport {\n useMantineTheme,\n ClassNames,\n Styles,\n MantineNumberSize,\n MantineShadow,\n getDefaultZIndex,\n useComponentDefaultProps,\n} from '@mantine/styles';\nimport { MantineTransition } from '../Transition';\nimport { getFloatingPosition, FloatingPosition, ArrowPosition } from '../Floating';\nimport { usePopover } from './use-popover';\nimport { PopoverContextProvider } from './Popover.context';\nimport {\n PopoverWidth,\n PopoverMiddlewares,\n PopoverStylesNames,\n PopoverStylesParams,\n} from './Popover.types';\nimport { PopoverTarget } from './PopoverTarget/PopoverTarget';\nimport { PopoverDropdown } from './PopoverDropdown/PopoverDropdown';\n\nexport interface PopoverBaseProps {\n /** Dropdown position relative to target */\n position?: FloatingPosition;\n\n /** Space between target element and dropdown */\n offset?: number;\n\n /** Called when dropdown position changes */\n onPositionChange?(position: FloatingPosition): void;\n\n /** useEffect dependencies to force update dropdown position */\n positionDependencies?: any[];\n\n /** Called when dropdown closes */\n onClose?(): void;\n\n /** Called when dropdown opens */\n onOpen?(): void;\n\n /** If set dropdown will not be unmounted from the DOM when it is hidden, display: none styles will be added instead */\n keepMounted?: boolean;\n\n /** One of premade transitions ot transition object */\n transition?: MantineTransition;\n\n /** Transition duration in ms */\n transitionDuration?: number;\n\n /** Exit transition duration in ms */\n exitTransitionDuration?: number;\n\n /** Dropdown width, or 'target' to make dropdown width the same as target element */\n width?: PopoverWidth;\n\n /** Floating ui middlewares to configure position handling */\n middlewares?: PopoverMiddlewares;\n\n /** Determines whether component should have an arrow */\n withArrow?: boolean;\n\n /** Arrow size */\n arrowSize?: number;\n\n /** Arrow offset */\n arrowOffset?: number;\n\n /** Arrow border-radius */\n arrowRadius?: number;\n\n /** Arrow position **/\n arrowPosition?: ArrowPosition;\n\n /** Determines whether dropdown should be rendered within Portal, defaults to false */\n withinPortal?: boolean;\n\n /** Dropdown z-index */\n zIndex?: React.CSSProperties['zIndex'];\n\n /** Key of theme.radius or any valid CSS value to set border-radius, theme.defaultRadius by default */\n radius?: MantineNumberSize;\n\n /** Key of theme.shadow or any other valid css box-shadow value */\n shadow?: MantineShadow;\n\n /** If set, popover dropdown will not render */\n disabled?: boolean;\n\n /** Determines whether focus should be automatically returned to control when dropdown closes, false by default */\n returnFocus?: boolean;\n}\n\nexport interface PopoverProps extends PopoverBaseProps {\n /** Popover.Target and Popover.Dropdown components */\n children: React.ReactNode;\n\n /** Initial opened state for uncontrolled component */\n defaultOpened?: boolean;\n\n /** Controls dropdown opened state */\n opened?: boolean;\n\n /** Called with current state when dropdown opens or closes */\n onChange?(opened: boolean): void;\n\n /** Determines whether dropdown should be closed on outside clicks, default to true */\n closeOnClickOutside?: boolean;\n\n /** Events that trigger outside clicks */\n clickOutsideEvents?: string[];\n\n /** Determines whether focus should be trapped within dropdown, default to false */\n trapFocus?: boolean;\n\n /** Determines whether dropdown should be closed when Escape key is pressed, defaults to true */\n closeOnEscape?: boolean;\n\n /** id base to create accessibility connections */\n id?: string;\n\n /** Determines whether dropdown and target element should have accessible roles, defaults to true */\n withRoles?: boolean;\n\n variant?: string;\n unstyled?: boolean;\n classNames?: ClassNames<PopoverStylesNames>;\n styles?: Styles<PopoverStylesNames, PopoverStylesParams>;\n __staticSelector?: string;\n}\n\nconst defaultProps: Partial<PopoverProps> = {\n position: 'bottom',\n offset: 8,\n positionDependencies: [],\n transition: 'fade',\n transitionDuration: 150,\n middlewares: { flip: true, shift: true, inline: false },\n arrowSize: 7,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: 'side',\n closeOnClickOutside: true,\n withinPortal: false,\n closeOnEscape: true,\n trapFocus: false,\n withRoles: true,\n returnFocus: false,\n clickOutsideEvents: ['mousedown', 'touchstart'],\n zIndex: getDefaultZIndex('popover'),\n __staticSelector: 'Popover',\n width: 'max-content',\n};\n\nexport function Popover(props: PopoverProps) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n const {\n children,\n position,\n offset,\n onPositionChange,\n positionDependencies,\n opened,\n transition,\n transitionDuration,\n width,\n middlewares,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n unstyled,\n classNames,\n styles,\n closeOnClickOutside,\n withinPortal,\n closeOnEscape,\n clickOutsideEvents,\n trapFocus,\n onClose,\n onOpen,\n onChange,\n zIndex,\n radius,\n shadow,\n id,\n defaultOpened,\n exitTransitionDuration,\n __staticSelector,\n withRoles,\n disabled,\n returnFocus,\n variant,\n keepMounted,\n ...others\n } = useComponentDefaultProps('Popover', defaultProps, props);\n\n const [targetNode, setTargetNode] = useState<HTMLElement>(null);\n const [dropdownNode, setDropdownNode] = useState<HTMLElement>(null);\n\n const uid = useId(id);\n const theme = useMantineTheme();\n const popover = usePopover({\n middlewares,\n width,\n position: getFloatingPosition(theme.dir, position),\n offset: offset + (withArrow ? arrowSize / 2 : 0),\n arrowRef,\n arrowOffset,\n onPositionChange,\n positionDependencies,\n opened,\n defaultOpened,\n onChange,\n onOpen,\n onClose,\n });\n\n useClickOutside(() => closeOnClickOutside && popover.onClose(), clickOutsideEvents, [\n targetNode,\n dropdownNode,\n ]);\n\n const reference = useCallback(\n (node: HTMLElement) => {\n setTargetNode(node);\n popover.floating.reference(node);\n },\n [popover.floating.reference]\n );\n\n const floating = useCallback(\n (node: HTMLElement) => {\n setDropdownNode(node);\n popover.floating.floating(node);\n },\n [popover.floating.floating]\n );\n\n return (\n <PopoverContextProvider\n value={{\n returnFocus,\n disabled,\n controlled: popover.controlled,\n reference,\n floating,\n x: popover.floating.x,\n y: popover.floating.y,\n arrowX: popover.floating?.middlewareData?.arrow?.x,\n arrowY: popover.floating?.middlewareData?.arrow?.y,\n opened: popover.opened,\n arrowRef,\n transition,\n transitionDuration,\n exitTransitionDuration,\n width,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n placement: popover.floating.placement,\n trapFocus,\n withinPortal,\n zIndex,\n radius,\n shadow,\n closeOnEscape,\n onClose: popover.onClose,\n onToggle: popover.onToggle,\n getTargetId: () => `${uid}-target`,\n getDropdownId: () => `${uid}-dropdown`,\n withRoles,\n targetProps: others,\n __staticSelector,\n classNames,\n styles,\n unstyled,\n variant,\n keepMounted,\n }}\n >\n {children}\n </PopoverContextProvider>\n );\n}\n\nPopover.Target = PopoverTarget;\nPopover.Dropdown = PopoverDropdown;\nPopover.displayName = '@mantine/core/Popover';\n"],"names":["getDefaultZIndex","useRef","useComponentDefaultProps","styles","useState","useId","useMantineTheme","usePopover","getFloatingPosition","useClickOutside","useCallback","React","PopoverContextProvider","PopoverTarget","PopoverDropdown"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,SAAS,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK;AACrC,EAAE,IAAI,MAAM,GAAG,EAAE,CAAC;AAClB,EAAE,KAAK,IAAI,IAAI,IAAI,MAAM;AACzB,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACpE,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAClC,EAAE,IAAI,MAAM,IAAI,IAAI,IAAI,mBAAmB;AAC3C,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;AAClD,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;AACtE,QAAQ,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AACpC,KAAK;AACL,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAaF,MAAM,YAAY,GAAG;AACrB,EAAE,QAAQ,EAAE,QAAQ;A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,CAAC,SAAS;AAC3C,MAAM,SAAS;AACf,MAAM,YAAY;AAClB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,MAAM,aAAa;AACnB,MAAM,OAAO,EAAE,OAAO,CAAC,OAAO;AAC9B,MAAM,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAChC,MAAM,WAAW,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;AACxC,MAAM,aAAa,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC;AAC5C,MAAM,SAAS;AACf,MAAM,WAAW,EAAE,MAAM;AACzB,MAAM,gBAAgB;AACtB,MAAM,UAAU;AAChB,cAAMT,QAAM;AACZ,MAAM,QAAQ;AACd,MAAM,OAAO;AACb,MAAM,WAAW;AACjB,KAAK;AACL,GAAG,EAAE,QAAQ,CAAC,CAAC;AACf,CAAC;AACD,OAAO,CAAC,MAAM,GAAGU,2BAAa,CAAC;AAC/B,OAAO,CAAC,QAAQ,GAAGC,+BAAe,CAAC;AACnC,OAAO,CAAC,WAAW,GAAG,uBAAuB;;;;"}
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n\nimport React, { useRef, useState, useCallback } from 'react';\nimport { useId, useClickOutside } from '@mantine/hooks';\nimport {\n useMantineTheme,\n ClassNames,\n Styles,\n MantineNumberSize,\n MantineShadow,\n getDefaultZIndex,\n useComponentDefaultProps,\n} from '@mantine/styles';\nimport { TransitionOverride } from '../Transition';\nimport { getFloatingPosition, FloatingPosition, ArrowPosition } from '../Floating';\nimport { usePopover } from './use-popover';\nimport { PopoverContextProvider } from './Popover.context';\nimport {\n PopoverWidth,\n PopoverMiddlewares,\n PopoverStylesNames,\n PopoverStylesParams,\n} from './Popover.types';\nimport { PopoverTarget } from './PopoverTarget/PopoverTarget';\nimport { PopoverDropdown } from './PopoverDropdown/PopoverDropdown';\n\nexport interface PopoverBaseProps {\n /** Dropdown position relative to target */\n position?: FloatingPosition;\n\n /** Space between target element and dropdown */\n offset?: number;\n\n /** Called when dropdown position changes */\n onPositionChange?(position: FloatingPosition): void;\n\n /** useEffect dependencies to force update dropdown position */\n positionDependencies?: any[];\n\n /** Called when dropdown closes */\n onClose?(): void;\n\n /** Called when dropdown opens */\n onOpen?(): void;\n\n /** If set dropdown will not be unmounted from the DOM when it is hidden, display: none styles will be added instead */\n keepMounted?: boolean;\n\n /** Props added to Transition component that used to animate dropdown presence, use to configure duration and animation type, { duration: 150, transition: 'fade' } by default */\n transitionProps?: TransitionOverride;\n\n /** Dropdown width, or 'target' to make dropdown width the same as target element */\n width?: PopoverWidth;\n\n /** Floating ui middlewares to configure position handling */\n middlewares?: PopoverMiddlewares;\n\n /** Determines whether component should have an arrow */\n withArrow?: boolean;\n\n /** Arrow size */\n arrowSize?: number;\n\n /** Arrow offset */\n arrowOffset?: number;\n\n /** Arrow border-radius */\n arrowRadius?: number;\n\n /** Arrow position **/\n arrowPosition?: ArrowPosition;\n\n /** Determines whether dropdown should be rendered within Portal, defaults to false */\n withinPortal?: boolean;\n\n /** Dropdown z-index */\n zIndex?: React.CSSProperties['zIndex'];\n\n /** Key of theme.radius or any valid CSS value to set border-radius, theme.defaultRadius by default */\n radius?: MantineNumberSize;\n\n /** Key of theme.shadow or any other valid css box-shadow value */\n shadow?: MantineShadow;\n\n /** If set, popover dropdown will not render */\n disabled?: boolean;\n\n /** Determines whether focus should be automatically returned to control when dropdown closes, false by default */\n returnFocus?: boolean;\n}\n\nexport interface PopoverProps extends PopoverBaseProps {\n /** Popover.Target and Popover.Dropdown components */\n children: React.ReactNode;\n\n /** Initial opened state for uncontrolled component */\n defaultOpened?: boolean;\n\n /** Controls dropdown opened state */\n opened?: boolean;\n\n /** Called with current state when dropdown opens or closes */\n onChange?(opened: boolean): void;\n\n /** Determines whether dropdown should be closed on outside clicks, default to true */\n closeOnClickOutside?: boolean;\n\n /** Events that trigger outside clicks */\n clickOutsideEvents?: string[];\n\n /** Determines whether focus should be trapped within dropdown, default to false */\n trapFocus?: boolean;\n\n /** Determines whether dropdown should be closed when Escape key is pressed, defaults to true */\n closeOnEscape?: boolean;\n\n /** id base to create accessibility connections */\n id?: string;\n\n /** Determines whether dropdown and target element should have accessible roles, defaults to true */\n withRoles?: boolean;\n\n variant?: string;\n unstyled?: boolean;\n classNames?: ClassNames<PopoverStylesNames>;\n styles?: Styles<PopoverStylesNames, PopoverStylesParams>;\n __staticSelector?: string;\n}\n\nconst defaultProps: Partial<PopoverProps> = {\n position: 'bottom',\n offset: 8,\n positionDependencies: [],\n transitionProps: { transition: 'fade', duration: 150 },\n middlewares: { flip: true, shift: true, inline: false },\n arrowSize: 7,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: 'side',\n closeOnClickOutside: true,\n withinPortal: false,\n closeOnEscape: true,\n trapFocus: false,\n withRoles: true,\n returnFocus: false,\n clickOutsideEvents: ['mousedown', 'touchstart'],\n zIndex: getDefaultZIndex('popover'),\n __staticSelector: 'Popover',\n width: 'max-content',\n};\n\nexport function Popover(props: PopoverProps) {\n const arrowRef = useRef<HTMLDivElement | null>(null);\n const {\n children,\n position,\n offset,\n onPositionChange,\n positionDependencies,\n opened,\n transitionProps,\n width,\n middlewares,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n unstyled,\n classNames,\n styles,\n closeOnClickOutside,\n withinPortal,\n closeOnEscape,\n clickOutsideEvents,\n trapFocus,\n onClose,\n onOpen,\n onChange,\n zIndex,\n radius,\n shadow,\n id,\n defaultOpened,\n __staticSelector,\n withRoles,\n disabled,\n returnFocus,\n variant,\n keepMounted,\n ...others\n } = useComponentDefaultProps('Popover', defaultProps, props);\n\n const [targetNode, setTargetNode] = useState<HTMLElement>(null);\n const [dropdownNode, setDropdownNode] = useState<HTMLElement>(null);\n\n const uid = useId(id);\n const theme = useMantineTheme();\n const popover = usePopover({\n middlewares,\n width,\n position: getFloatingPosition(theme.dir, position),\n offset: offset + (withArrow ? arrowSize / 2 : 0),\n arrowRef,\n arrowOffset,\n onPositionChange,\n positionDependencies,\n opened,\n defaultOpened,\n onChange,\n onOpen,\n onClose,\n });\n\n useClickOutside(() => closeOnClickOutside && popover.onClose(), clickOutsideEvents, [\n targetNode,\n dropdownNode,\n ]);\n\n const reference = useCallback(\n (node: HTMLElement) => {\n setTargetNode(node);\n popover.floating.reference(node);\n },\n [popover.floating.reference]\n );\n\n const floating = useCallback(\n (node: HTMLElement) => {\n setDropdownNode(node);\n popover.floating.floating(node);\n },\n [popover.floating.floating]\n );\n\n return (\n <PopoverContextProvider\n value={{\n returnFocus,\n disabled,\n controlled: popover.controlled,\n reference,\n floating,\n x: popover.floating.x,\n y: popover.floating.y,\n arrowX: popover.floating?.middlewareData?.arrow?.x,\n arrowY: popover.floating?.middlewareData?.arrow?.y,\n opened: popover.opened,\n arrowRef,\n transitionProps,\n width,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n placement: popover.floating.placement,\n trapFocus,\n withinPortal,\n zIndex,\n radius,\n shadow,\n closeOnEscape,\n onClose: popover.onClose,\n onToggle: popover.onToggle,\n getTargetId: () => `${uid}-target`,\n getDropdownId: () => `${uid}-dropdown`,\n withRoles,\n targetProps: others,\n __staticSelector,\n classNames,\n styles,\n unstyled,\n variant,\n keepMounted,\n }}\n >\n {children}\n </PopoverContextProvider>\n );\n}\n\nPopover.Target = PopoverTarget;\nPopover.Dropdown = PopoverDropdown;\nPopover.displayName = '@mantine/core/Popover';\n"],"names":["getDefaultZIndex","useRef","useComponentDefaultProps","styles","useState","useId","useMantineTheme","usePopover","getFloatingPosition","useClickOutside","useCallback","React","PopoverContextProvider","PopoverTarget","PopoverDropdown"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,C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AAK;AACL,GAAG,EAAE,QAAQ,CAAC,CAAC;AACf,CAAC;AACD,OAAO,CAAC,MAAM,GAAGU,2BAAa,CAAC;AAC/B,OAAO,CAAC,QAAQ,GAAGC,+BAAe,CAAC;AACnC,OAAO,CAAC,WAAW,GAAG,uBAAuB;;;;"}
|
|
@@ -51,6 +51,7 @@ var __objRest = (source, exclude) => {
|
|
|
51
51
|
};
|
|
52
52
|
const defaultProps = {};
|
|
53
53
|
function PopoverDropdown(props) {
|
|
54
|
+
var _b;
|
|
54
55
|
const _a = styles.useComponentDefaultProps("PopoverDropdown", defaultProps, props), { style, className, children, onKeyDownCapture } = _a, others = __objRest(_a, ["style", "className", "children", "onKeyDownCapture"]);
|
|
55
56
|
const ctx = Popover_context.usePopoverContext();
|
|
56
57
|
const { classes, cx } = PopoverDropdown_styles['default']({ radius: ctx.radius, shadow: ctx.shadow }, {
|
|
@@ -74,14 +75,15 @@ function PopoverDropdown(props) {
|
|
|
74
75
|
}
|
|
75
76
|
return /* @__PURE__ */ React__default.createElement(OptionalPortal.OptionalPortal, {
|
|
76
77
|
withinPortal: ctx.withinPortal
|
|
77
|
-
}, /* @__PURE__ */ React__default.createElement(Transition.Transition, {
|
|
78
|
-
mounted: ctx.opened
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
}, /* @__PURE__ */ React__default.createElement(Transition.Transition, __spreadProps(__spreadValues({
|
|
79
|
+
mounted: ctx.opened
|
|
80
|
+
}, ctx.transitionProps), {
|
|
81
|
+
transition: ctx.transitionProps.transition || "fade",
|
|
82
|
+
duration: (_b = ctx.transitionProps.duration) != null ? _b : 150,
|
|
81
83
|
keepMounted: ctx.keepMounted,
|
|
82
|
-
exitDuration: typeof ctx.
|
|
83
|
-
}, (transitionStyles) => {
|
|
84
|
-
var _a2,
|
|
84
|
+
exitDuration: typeof ctx.transitionProps.exitDuration === "number" ? ctx.transitionProps.exitDuration : ctx.transitionProps.duration
|
|
85
|
+
}), (transitionStyles) => {
|
|
86
|
+
var _a2, _b2;
|
|
85
87
|
return /* @__PURE__ */ React__default.createElement(FocusTrap.FocusTrap, {
|
|
86
88
|
active: ctx.trapFocus
|
|
87
89
|
}, /* @__PURE__ */ React__default.createElement(Box.Box, __spreadValues(__spreadProps(__spreadValues({}, accessibleProps), {
|
|
@@ -91,7 +93,7 @@ function PopoverDropdown(props) {
|
|
|
91
93
|
style: __spreadProps(__spreadValues(__spreadValues({}, style), transitionStyles), {
|
|
92
94
|
zIndex: ctx.zIndex,
|
|
93
95
|
top: (_a2 = ctx.y) != null ? _a2 : 0,
|
|
94
|
-
left: (
|
|
96
|
+
left: (_b2 = ctx.x) != null ? _b2 : 0,
|
|
95
97
|
width: ctx.width === "target" ? void 0 : styles.rem(ctx.width)
|
|
96
98
|
}),
|
|
97
99
|
className: cx(classes.dropdown, className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverDropdown.js","sources":["../../../src/Popover/PopoverDropdown/PopoverDropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { DefaultProps, useComponentDefaultProps, rem } from '@mantine/styles';\nimport { closeOnEscape } from '@mantine/utils';\nimport { useFocusReturn } from '@mantine/hooks';\nimport { FloatingArrow } from '../../Floating';\nimport { Box } from '../../Box';\nimport { Transition } from '../../Transition';\nimport { FocusTrap } from '../../FocusTrap';\nimport { OptionalPortal } from '../../Portal';\nimport { usePopoverContext } from '../Popover.context';\nimport useStyles from './PopoverDropdown.styles';\n\nexport interface PopoverDropdownProps extends DefaultProps, React.ComponentPropsWithoutRef<'div'> {\n /** Dropdown content */\n children?: React.ReactNode;\n}\n\nconst defaultProps: Partial<PopoverDropdownProps> = {};\n\nexport function PopoverDropdown(props: PopoverDropdownProps) {\n const { style, className, children, onKeyDownCapture, ...others } = useComponentDefaultProps(\n 'PopoverDropdown',\n defaultProps,\n props\n );\n\n const ctx = usePopoverContext();\n const { classes, cx } = useStyles(\n { radius: ctx.radius, shadow: ctx.shadow },\n {\n name: ctx.__staticSelector,\n classNames: ctx.classNames,\n styles: ctx.styles,\n unstyled: ctx.unstyled,\n variant: ctx.variant,\n }\n );\n\n const returnFocus = useFocusReturn({\n opened: ctx.opened,\n shouldReturnFocus: ctx.returnFocus,\n });\n\n const accessibleProps = ctx.withRoles\n ? {\n 'aria-labelledby': ctx.getTargetId(),\n id: ctx.getDropdownId(),\n role: 'dialog',\n }\n : {};\n\n if (ctx.disabled) {\n return null;\n }\n\n return (\n <OptionalPortal withinPortal={ctx.withinPortal}>\n <Transition\n mounted={ctx.opened}\n transition={ctx.transition}\n duration={ctx.
|
|
1
|
+
{"version":3,"file":"PopoverDropdown.js","sources":["../../../src/Popover/PopoverDropdown/PopoverDropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { DefaultProps, useComponentDefaultProps, rem } from '@mantine/styles';\nimport { closeOnEscape } from '@mantine/utils';\nimport { useFocusReturn } from '@mantine/hooks';\nimport { FloatingArrow } from '../../Floating';\nimport { Box } from '../../Box';\nimport { Transition } from '../../Transition';\nimport { FocusTrap } from '../../FocusTrap';\nimport { OptionalPortal } from '../../Portal';\nimport { usePopoverContext } from '../Popover.context';\nimport useStyles from './PopoverDropdown.styles';\n\nexport interface PopoverDropdownProps extends DefaultProps, React.ComponentPropsWithoutRef<'div'> {\n /** Dropdown content */\n children?: React.ReactNode;\n}\n\nconst defaultProps: Partial<PopoverDropdownProps> = {};\n\nexport function PopoverDropdown(props: PopoverDropdownProps) {\n const { style, className, children, onKeyDownCapture, ...others } = useComponentDefaultProps(\n 'PopoverDropdown',\n defaultProps,\n props\n );\n\n const ctx = usePopoverContext();\n const { classes, cx } = useStyles(\n { radius: ctx.radius, shadow: ctx.shadow },\n {\n name: ctx.__staticSelector,\n classNames: ctx.classNames,\n styles: ctx.styles,\n unstyled: ctx.unstyled,\n variant: ctx.variant,\n }\n );\n\n const returnFocus = useFocusReturn({\n opened: ctx.opened,\n shouldReturnFocus: ctx.returnFocus,\n });\n\n const accessibleProps = ctx.withRoles\n ? {\n 'aria-labelledby': ctx.getTargetId(),\n id: ctx.getDropdownId(),\n role: 'dialog',\n }\n : {};\n\n if (ctx.disabled) {\n return null;\n }\n\n return (\n <OptionalPortal withinPortal={ctx.withinPortal}>\n <Transition\n mounted={ctx.opened}\n {...ctx.transitionProps}\n transition={ctx.transitionProps.transition || 'fade'}\n duration={ctx.transitionProps.duration ?? 150}\n keepMounted={ctx.keepMounted}\n exitDuration={\n typeof ctx.transitionProps.exitDuration === 'number'\n ? ctx.transitionProps.exitDuration\n : ctx.transitionProps.duration\n }\n >\n {(transitionStyles) => (\n <FocusTrap active={ctx.trapFocus}>\n <Box\n {...accessibleProps}\n tabIndex={-1}\n key={ctx.placement}\n ref={ctx.floating}\n style={{\n ...style,\n ...transitionStyles,\n zIndex: ctx.zIndex,\n top: ctx.y ?? 0,\n left: ctx.x ?? 0,\n width: ctx.width === 'target' ? undefined : rem(ctx.width),\n }}\n className={cx(classes.dropdown, className)}\n onKeyDownCapture={closeOnEscape(ctx.onClose, {\n active: ctx.closeOnEscape,\n onTrigger: returnFocus,\n onKeyDown: onKeyDownCapture,\n })}\n data-position={ctx.placement}\n {...others}\n >\n {children}\n\n <FloatingArrow\n ref={ctx.arrowRef}\n arrowX={ctx.arrowX}\n arrowY={ctx.arrowY}\n visible={ctx.withArrow}\n withBorder\n position={ctx.placement}\n arrowSize={ctx.arrowSize}\n arrowRadius={ctx.arrowRadius}\n arrowOffset={ctx.arrowOffset}\n arrowPosition={ctx.arrowPosition}\n className={classes.arrow}\n />\n </Box>\n </FocusTrap>\n )}\n </Transition>\n </OptionalPortal>\n );\n}\n\nPopoverDropdown.displayName = '@mantine/core/PopoverDropdown';\n"],"names":["useComponentDefaultProps","usePopoverContext","useStyles","useFocusReturn","React","OptionalPortal","Transition","FocusTrap","Box","rem","closeOnEscape","FloatingArrow"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,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,CAAC,aAAa;AACjC,QAAQ,SAAS,EAAE,WAAW;AAC9B,QAAQ,SAAS,EAAE,gBAAgB;AACnC,OAAO,CAAC;AACR,MAAM,eAAe,EAAE,GAAG,CAAC,SAAS;AACpC,KAAK,CAAC,EAAE,MAAM,CAAC,EAAE,QAAQ,kBAAkBN,cAAK,CAAC,aAAa,CAACO,2BAAa,EAAE;AAC9E,MAAM,GAAG,EAAE,GAAG,CAAC,QAAQ;AACvB,MAAM,MAAM,EAAE,GAAG,CAAC,MAAM;AACxB,MAAM,MAAM,EAAE,GAAG,CAAC,MAAM;AACxB,MAAM,OAAO,EAAE,GAAG,CAAC,SAAS;AAC5B,MAAM,UAAU,EAAE,IAAI;AACtB,MAAM,QAAQ,EAAE,GAAG,CAAC,SAAS;AAC7B,MAAM,SAAS,EAAE,GAAG,CAAC,SAAS;AAC9B,MAAM,WAAW,EAAE,GAAG,CAAC,WAAW;AAClC,MAAM,WAAW,EAAE,GAAG,CAAC,WAAW;AAClC,MAAM,aAAa,EAAE,GAAG,CAAC,aAAa;AACtC,MAAM,SAAS,EAAE,OAAO,CAAC,KAAK;AAC9B,KAAK,CAAC,CAAC,CAAC,CAAC;AACT,GAAG,CAAC,CAAC,CAAC;AACN,CAAC;AACD,eAAe,CAAC,WAAW,GAAG,+BAA+B;;;;"}
|
package/cjs/Select/Select.js
CHANGED
|
@@ -62,8 +62,7 @@ const defaultProps = {
|
|
|
62
62
|
size: "sm",
|
|
63
63
|
shadow: "sm",
|
|
64
64
|
itemComponent: DefaultItem.DefaultItem,
|
|
65
|
-
transition: "fade",
|
|
66
|
-
transitionDuration: 0,
|
|
65
|
+
transitionProps: { transition: "fade", duration: 0 },
|
|
67
66
|
initiallyOpened: false,
|
|
68
67
|
filter: defaultFilter,
|
|
69
68
|
maxDropdownHeight: 220,
|
|
@@ -93,10 +92,8 @@ const Select = React.forwardRef((props, ref) => {
|
|
|
93
92
|
onKeyDown,
|
|
94
93
|
onBlur,
|
|
95
94
|
onFocus,
|
|
96
|
-
|
|
97
|
-
transitionDuration,
|
|
95
|
+
transitionProps,
|
|
98
96
|
initiallyOpened,
|
|
99
|
-
transitionTimingFunction,
|
|
100
97
|
unstyled,
|
|
101
98
|
classNames,
|
|
102
99
|
styles,
|
|
@@ -144,10 +141,8 @@ const Select = React.forwardRef((props, ref) => {
|
|
|
144
141
|
"onKeyDown",
|
|
145
142
|
"onBlur",
|
|
146
143
|
"onFocus",
|
|
147
|
-
"
|
|
148
|
-
"transitionDuration",
|
|
144
|
+
"transitionProps",
|
|
149
145
|
"initiallyOpened",
|
|
150
|
-
"transitionTimingFunction",
|
|
151
146
|
"unstyled",
|
|
152
147
|
"classNames",
|
|
153
148
|
"styles",
|
|
@@ -452,8 +447,7 @@ const Select = React.forwardRef((props, ref) => {
|
|
|
452
447
|
__staticSelector: "Select"
|
|
453
448
|
}), /* @__PURE__ */ React__default.createElement(SelectPopover.SelectPopover, {
|
|
454
449
|
opened: shouldShowDropdown,
|
|
455
|
-
|
|
456
|
-
transitionDuration,
|
|
450
|
+
transitionProps,
|
|
457
451
|
shadow: "sm",
|
|
458
452
|
withinPortal,
|
|
459
453
|
__staticSelector: "Select",
|