@react-spectrum/actionbar 3.4.4-nightly.4555 → 3.4.4-nightly.4558
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionBar.main.js +132 -0
- package/dist/ActionBar.main.js.map +1 -0
- package/dist/ActionBar.mjs +127 -0
- package/dist/ActionBar.module.js +127 -0
- package/dist/ActionBar.module.js.map +1 -0
- package/dist/ActionBarContainer.main.js +52 -0
- package/dist/ActionBarContainer.main.js.map +1 -0
- package/dist/ActionBarContainer.mjs +47 -0
- package/dist/ActionBarContainer.module.js +47 -0
- package/dist/ActionBarContainer.module.js.map +1 -0
- package/dist/{main.css → actionbar.6c2bbcbf.css} +1 -1
- package/dist/{main.css.map → actionbar.6c2bbcbf.css.map} +1 -1
- package/dist/actionbar_css.main.js +38 -0
- package/dist/actionbar_css.main.js.map +1 -0
- package/dist/actionbar_css.mjs +40 -0
- package/dist/actionbar_css.module.js +40 -0
- package/dist/actionbar_css.module.js.map +1 -0
- package/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/import.mjs +2 -297
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/main.js +4 -295
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -297
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +17 -17
- package/dist/module.css +0 -83
- package/dist/module.css.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
var $b1ba52ca91e22687$exports = require("./intlStrings.main.js");
|
|
2
|
+
require("./actionbar.6c2bbcbf.css");
|
|
3
|
+
var $ff24c7bbe0c168db$exports = require("./actionbar_css.main.js");
|
|
4
|
+
var $643e7$reactspectrumbutton = require("@react-spectrum/button");
|
|
5
|
+
var $643e7$reactspectrumactiongroup = require("@react-spectrum/actiongroup");
|
|
6
|
+
var $643e7$reactarialiveannouncer = require("@react-aria/live-announcer");
|
|
7
|
+
var $643e7$reactspectrumutils = require("@react-spectrum/utils");
|
|
8
|
+
var $643e7$spectrumiconsuiCrossLarge = require("@spectrum-icons/ui/CrossLarge");
|
|
9
|
+
var $643e7$reactariautils = require("@react-aria/utils");
|
|
10
|
+
var $643e7$reactariafocus = require("@react-aria/focus");
|
|
11
|
+
var $643e7$reactspectrumoverlays = require("@react-spectrum/overlays");
|
|
12
|
+
var $643e7$react = require("react");
|
|
13
|
+
var $643e7$reactspectrumtext = require("@react-spectrum/text");
|
|
14
|
+
var $643e7$reactariainteractions = require("@react-aria/interactions");
|
|
15
|
+
var $643e7$reactariai18n = require("@react-aria/i18n");
|
|
16
|
+
var $643e7$reactspectrumprovider = require("@react-spectrum/provider");
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
function $parcel$interopDefault(a) {
|
|
20
|
+
return a && a.__esModule ? a.default : a;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function $parcel$export(e, n, v, s) {
|
|
24
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
$parcel$export(module.exports, "ActionBar", () => $7b5467653feb1153$export$e213cebad6250b4a);
|
|
28
|
+
/*
|
|
29
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
30
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
31
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
32
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
33
|
+
*
|
|
34
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
35
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
36
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
37
|
+
* governing permissions and limitations under the License.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
function $7b5467653feb1153$var$ActionBar(props, ref) {
|
|
54
|
+
let isOpen = props.selectedItemCount !== 0;
|
|
55
|
+
let domRef = (0, $643e7$reactspectrumutils.useDOMRef)(ref);
|
|
56
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumoverlays.OpenTransition), {
|
|
57
|
+
nodeRef: domRef,
|
|
58
|
+
in: isOpen,
|
|
59
|
+
mountOnEnter: true,
|
|
60
|
+
unmountOnExit: true
|
|
61
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement($7b5467653feb1153$var$ActionBarInnerWithRef, {
|
|
62
|
+
...props,
|
|
63
|
+
ref: domRef
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
function $7b5467653feb1153$var$ActionBarInner(props, ref) {
|
|
67
|
+
props = (0, $643e7$reactspectrumprovider.useProviderProps)(props);
|
|
68
|
+
let { children: children, isEmphasized: isEmphasized, onAction: onAction, onClearSelection: onClearSelection, selectedItemCount: selectedItemCount, isOpen: isOpen, items: items } = props;
|
|
69
|
+
let { styleProps: styleProps } = (0, $643e7$reactspectrumutils.useStyleProps)(props);
|
|
70
|
+
let stringFormatter = (0, $643e7$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b1ba52ca91e22687$exports))), "@react-spectrum/actionbar");
|
|
71
|
+
// Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.
|
|
72
|
+
let [lastCount, setLastCount] = (0, $643e7$react.useState)(selectedItemCount);
|
|
73
|
+
if ((selectedItemCount === "all" || selectedItemCount > 0) && selectedItemCount !== lastCount) setLastCount(selectedItemCount);
|
|
74
|
+
let { keyboardProps: keyboardProps } = (0, $643e7$reactariainteractions.useKeyboard)({
|
|
75
|
+
onKeyDown (e) {
|
|
76
|
+
if (e.key === "Escape") {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
onClearSelection();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
// Announce "actions available" on mount.
|
|
83
|
+
let isInitial = (0, $643e7$react.useRef)(true);
|
|
84
|
+
(0, $643e7$react.useEffect)(()=>{
|
|
85
|
+
if (isInitial.current) {
|
|
86
|
+
isInitial.current = false;
|
|
87
|
+
(0, $643e7$reactarialiveannouncer.announce)(stringFormatter.format("actionsAvailable"));
|
|
88
|
+
}
|
|
89
|
+
}, [
|
|
90
|
+
stringFormatter
|
|
91
|
+
]);
|
|
92
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactariafocus.FocusScope), {
|
|
93
|
+
restoreFocus: true
|
|
94
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement("div", {
|
|
95
|
+
...(0, $643e7$reactariautils.filterDOMProps)(props),
|
|
96
|
+
...styleProps,
|
|
97
|
+
...keyboardProps,
|
|
98
|
+
ref: ref,
|
|
99
|
+
className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), "react-spectrum-ActionBar", {
|
|
100
|
+
"react-spectrum-ActionBar--emphasized": isEmphasized,
|
|
101
|
+
"is-open": isOpen
|
|
102
|
+
}, styleProps.className)
|
|
103
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement("div", {
|
|
104
|
+
className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), "react-spectrum-ActionBar-bar")
|
|
105
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumactiongroup.ActionGroup), {
|
|
106
|
+
items: items,
|
|
107
|
+
"aria-label": stringFormatter.format("actions"),
|
|
108
|
+
isQuiet: true,
|
|
109
|
+
staticColor: isEmphasized ? "white" : undefined,
|
|
110
|
+
overflowMode: "collapse",
|
|
111
|
+
buttonLabelBehavior: "collapse",
|
|
112
|
+
onAction: onAction,
|
|
113
|
+
UNSAFE_className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), "react-spectrum-ActionBar-actionGroup")
|
|
114
|
+
}, children), /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumbutton.ActionButton), {
|
|
115
|
+
gridArea: (0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))).clear,
|
|
116
|
+
"aria-label": stringFormatter.format("clearSelection"),
|
|
117
|
+
onPress: ()=>onClearSelection(),
|
|
118
|
+
isQuiet: true,
|
|
119
|
+
staticColor: isEmphasized ? "white" : undefined
|
|
120
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, ($parcel$interopDefault($643e7$spectrumiconsuiCrossLarge))), null)), /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumtext.Text), {
|
|
121
|
+
UNSAFE_className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), "react-spectrum-ActionBar-selectedCount")
|
|
122
|
+
}, lastCount === "all" ? stringFormatter.format("selectedAll") : stringFormatter.format("selected", {
|
|
123
|
+
count: lastCount
|
|
124
|
+
})))));
|
|
125
|
+
}
|
|
126
|
+
const $7b5467653feb1153$var$ActionBarInnerWithRef = /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).forwardRef($7b5467653feb1153$var$ActionBarInner);
|
|
127
|
+
/**
|
|
128
|
+
* Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.
|
|
129
|
+
*/ const $7b5467653feb1153$export$e213cebad6250b4a = /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).forwardRef($7b5467653feb1153$var$ActionBar);
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
//# sourceMappingURL=ActionBar.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAqBD,SAAS,gCAA4B,KAAgC,EAAE,GAA2B;IAChG,IAAI,SAAS,MAAM,iBAAiB,KAAK;IACzC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC,CAAA,GAAA,2CAAa;QACZ,SAAS;QACT,IAAI;QACJ,cAAA;QACA,eAAA;qBACA,0DAAC;QAAuB,GAAG,KAAK;QAAE,KAAK;;AAG7C;AAMA,SAAS,qCAAkB,KAA6B,EAAE,GAAwB;IAChF,QAAQ,CAAA,GAAA,6CAAe,EAAE;IAEzB,IAAI,YACF,QAAQ,gBACR,YAAY,YACZ,QAAQ,oBACR,gBAAgB,qBAChB,iBAAiB,UACjB,MAAM,SACN,KAAK,EACN,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,mHAAmH;IACnH,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,qBAAO,EAAE;IACzC,IAAI,AAAC,CAAA,sBAAsB,SAAS,oBAAoB,CAAA,KAAM,sBAAsB,WAClF,aAAa;IAGf,IAAI,iBAAC,aAAa,EAAC,GAAG,CAAA,GAAA,wCAAU,EAAE;QAChC,WAAU,CAAC;YACT,IAAI,EAAE,GAAG,KAAK,UAAU;gBACtB,EAAE,cAAc;gBAChB;YACF;QACF;IACF;IAEA,yCAAyC;IACzC,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,UAAU,OAAO,EAAE;YACrB,UAAU,OAAO,GAAG;YACpB,CAAA,GAAA,sCAAO,EAAE,gBAAgB,MAAM,CAAC;QAClC;IACF,GAAG;QAAC;KAAgB;IAEpB,qBACE,0DAAC,CAAA,GAAA,gCAAS;QAAE,cAAA;qBACV,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACb,GAAG,aAAa;QACjB,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,4BAA4B;YAC1B,wCAAwC;YACxC,WAAW;QACb,GACA,WAAW,SAAS;qBAEtB,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACjC,0DAAC,CAAA,GAAA,2CAAU;QACT,OAAO;QACP,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAA;QACA,aAAa,eAAe,UAAU;QACtC,cAAa;QACb,qBAAoB;QACpB,UAAU;QACV,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACpC,yBAEH,0DAAC,CAAA,GAAA,uCAAW;QACV,UAAU,CAAA,GAAA,mDAAK,EAAE,KAAK;QACtB,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS,IAAM;QACf,SAAA;QACA,aAAa,eAAe,UAAU;qBACtC,0DAAC,CAAA,GAAA,0DAAS,yBAEZ,0DAAC,CAAA,GAAA,6BAAG;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACxC,cAAc,QACX,gBAAgB,MAAM,CAAC,iBACvB,gBAAgB,MAAM,CAAC,YAAY;QAAC,OAAO;IAAS;AAMpE;AAEA,MAAM,4DAAwB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;AAE/C;;CAEC,GACD,MAAM,0DAAa,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/actionbar/src/ActionBar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {ActionGroup} from '@react-spectrum/actiongroup';\nimport {announce} from '@react-aria/live-announcer';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossLarge from '@spectrum-icons/ui/CrossLarge';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {OpenTransition} from '@react-spectrum/overlays';\nimport React, {ReactElement, Ref, useEffect, useRef, useState} from 'react';\nimport {SpectrumActionBarProps} from '@react-types/actionbar';\nimport styles from './actionbar.css';\nimport {Text} from '@react-spectrum/text';\nimport {useKeyboard} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionBar<T extends object>(props: SpectrumActionBarProps<T>, ref: DOMRef<HTMLDivElement>) {\n let isOpen = props.selectedItemCount !== 0;\n let domRef = useDOMRef(ref);\n\n return (\n <OpenTransition\n nodeRef={domRef}\n in={isOpen}\n mountOnEnter\n unmountOnExit>\n <ActionBarInnerWithRef {...props} ref={domRef} />\n </OpenTransition>\n );\n}\n\ninterface ActionBarInnerProps<T> extends SpectrumActionBarProps<T> {\n isOpen?: boolean\n}\n\nfunction ActionBarInner<T>(props: ActionBarInnerProps<T>, ref: Ref<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n children,\n isEmphasized,\n onAction,\n onClearSelection,\n selectedItemCount,\n isOpen,\n items\n } = props;\n\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/actionbar');\n\n // Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.\n let [lastCount, setLastCount] = useState(selectedItemCount);\n if ((selectedItemCount === 'all' || selectedItemCount > 0) && selectedItemCount !== lastCount) {\n setLastCount(selectedItemCount);\n }\n\n let {keyboardProps} = useKeyboard({\n onKeyDown(e) {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClearSelection();\n }\n }\n });\n\n // Announce \"actions available\" on mount.\n let isInitial = useRef(true);\n useEffect(() => {\n if (isInitial.current) {\n isInitial.current = false;\n announce(stringFormatter.format('actionsAvailable'));\n }\n }, [stringFormatter]);\n\n return (\n <FocusScope restoreFocus>\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n {...keyboardProps}\n ref={ref}\n className={classNames(\n styles,\n 'react-spectrum-ActionBar', {\n 'react-spectrum-ActionBar--emphasized': isEmphasized,\n 'is-open': isOpen\n },\n styleProps.className\n )}>\n <div className={classNames(styles, 'react-spectrum-ActionBar-bar')}>\n <ActionGroup\n items={items}\n aria-label={stringFormatter.format('actions')}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}\n overflowMode=\"collapse\"\n buttonLabelBehavior=\"collapse\"\n onAction={onAction}\n UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-actionGroup')}>\n {children}\n </ActionGroup>\n <ActionButton\n gridArea={styles.clear}\n aria-label={stringFormatter.format('clearSelection')}\n onPress={() => onClearSelection()}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}>\n <CrossLarge />\n </ActionButton>\n <Text UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-selectedCount')}>\n {lastCount === 'all'\n ? stringFormatter.format('selectedAll')\n : stringFormatter.format('selected', {count: lastCount})}\n </Text>\n </div>\n </div>\n </FocusScope>\n );\n}\n\nconst ActionBarInnerWithRef = React.forwardRef(ActionBarInner) as <T>(props: ActionBarInnerProps<T> & {ref?: Ref<HTMLDivElement>}) => ReactElement;\n\n/**\n * Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.\n */\nconst _ActionBar = React.forwardRef(ActionBar) as <T>(props: SpectrumActionBarProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ActionBar as ActionBar};\n"],"names":[],"version":3,"file":"ActionBar.main.js.map"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import $c4Nes$intlStringsmodulejs from "./intlStrings.mjs";
|
|
2
|
+
import "./actionbar.6c2bbcbf.css";
|
|
3
|
+
import $c4Nes$actionbar_cssmodulejs from "./actionbar_css.mjs";
|
|
4
|
+
import {ActionButton as $c4Nes$ActionButton} from "@react-spectrum/button";
|
|
5
|
+
import {ActionGroup as $c4Nes$ActionGroup} from "@react-spectrum/actiongroup";
|
|
6
|
+
import {announce as $c4Nes$announce} from "@react-aria/live-announcer";
|
|
7
|
+
import {useDOMRef as $c4Nes$useDOMRef, useStyleProps as $c4Nes$useStyleProps, classNames as $c4Nes$classNames} from "@react-spectrum/utils";
|
|
8
|
+
import $c4Nes$spectrumiconsuiCrossLarge from "@spectrum-icons/ui/CrossLarge";
|
|
9
|
+
import {filterDOMProps as $c4Nes$filterDOMProps} from "@react-aria/utils";
|
|
10
|
+
import {FocusScope as $c4Nes$FocusScope} from "@react-aria/focus";
|
|
11
|
+
import {OpenTransition as $c4Nes$OpenTransition} from "@react-spectrum/overlays";
|
|
12
|
+
import $c4Nes$react, {useState as $c4Nes$useState, useRef as $c4Nes$useRef, useEffect as $c4Nes$useEffect} from "react";
|
|
13
|
+
import {Text as $c4Nes$Text} from "@react-spectrum/text";
|
|
14
|
+
import {useKeyboard as $c4Nes$useKeyboard} from "@react-aria/interactions";
|
|
15
|
+
import {useLocalizedStringFormatter as $c4Nes$useLocalizedStringFormatter} from "@react-aria/i18n";
|
|
16
|
+
import {useProviderProps as $c4Nes$useProviderProps} from "@react-spectrum/provider";
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
function $parcel$interopDefault(a) {
|
|
20
|
+
return a && a.__esModule ? a.default : a;
|
|
21
|
+
}
|
|
22
|
+
/*
|
|
23
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
24
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
25
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
26
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
27
|
+
*
|
|
28
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
29
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
30
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
31
|
+
* governing permissions and limitations under the License.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
function $a4e665fbd087d71e$var$ActionBar(props, ref) {
|
|
48
|
+
let isOpen = props.selectedItemCount !== 0;
|
|
49
|
+
let domRef = (0, $c4Nes$useDOMRef)(ref);
|
|
50
|
+
return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$OpenTransition), {
|
|
51
|
+
nodeRef: domRef,
|
|
52
|
+
in: isOpen,
|
|
53
|
+
mountOnEnter: true,
|
|
54
|
+
unmountOnExit: true
|
|
55
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement($a4e665fbd087d71e$var$ActionBarInnerWithRef, {
|
|
56
|
+
...props,
|
|
57
|
+
ref: domRef
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
function $a4e665fbd087d71e$var$ActionBarInner(props, ref) {
|
|
61
|
+
props = (0, $c4Nes$useProviderProps)(props);
|
|
62
|
+
let { children: children, isEmphasized: isEmphasized, onAction: onAction, onClearSelection: onClearSelection, selectedItemCount: selectedItemCount, isOpen: isOpen, items: items } = props;
|
|
63
|
+
let { styleProps: styleProps } = (0, $c4Nes$useStyleProps)(props);
|
|
64
|
+
let stringFormatter = (0, $c4Nes$useLocalizedStringFormatter)((0, ($parcel$interopDefault($c4Nes$intlStringsmodulejs))), "@react-spectrum/actionbar");
|
|
65
|
+
// Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.
|
|
66
|
+
let [lastCount, setLastCount] = (0, $c4Nes$useState)(selectedItemCount);
|
|
67
|
+
if ((selectedItemCount === "all" || selectedItemCount > 0) && selectedItemCount !== lastCount) setLastCount(selectedItemCount);
|
|
68
|
+
let { keyboardProps: keyboardProps } = (0, $c4Nes$useKeyboard)({
|
|
69
|
+
onKeyDown (e) {
|
|
70
|
+
if (e.key === "Escape") {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
onClearSelection();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
// Announce "actions available" on mount.
|
|
77
|
+
let isInitial = (0, $c4Nes$useRef)(true);
|
|
78
|
+
(0, $c4Nes$useEffect)(()=>{
|
|
79
|
+
if (isInitial.current) {
|
|
80
|
+
isInitial.current = false;
|
|
81
|
+
(0, $c4Nes$announce)(stringFormatter.format("actionsAvailable"));
|
|
82
|
+
}
|
|
83
|
+
}, [
|
|
84
|
+
stringFormatter
|
|
85
|
+
]);
|
|
86
|
+
return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$FocusScope), {
|
|
87
|
+
restoreFocus: true
|
|
88
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
|
|
89
|
+
...(0, $c4Nes$filterDOMProps)(props),
|
|
90
|
+
...styleProps,
|
|
91
|
+
...keyboardProps,
|
|
92
|
+
ref: ref,
|
|
93
|
+
className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar", {
|
|
94
|
+
"react-spectrum-ActionBar--emphasized": isEmphasized,
|
|
95
|
+
"is-open": isOpen
|
|
96
|
+
}, styleProps.className)
|
|
97
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
|
|
98
|
+
className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar-bar")
|
|
99
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionGroup), {
|
|
100
|
+
items: items,
|
|
101
|
+
"aria-label": stringFormatter.format("actions"),
|
|
102
|
+
isQuiet: true,
|
|
103
|
+
staticColor: isEmphasized ? "white" : undefined,
|
|
104
|
+
overflowMode: "collapse",
|
|
105
|
+
buttonLabelBehavior: "collapse",
|
|
106
|
+
onAction: onAction,
|
|
107
|
+
UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar-actionGroup")
|
|
108
|
+
}, children), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionButton), {
|
|
109
|
+
gridArea: (0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))).clear,
|
|
110
|
+
"aria-label": stringFormatter.format("clearSelection"),
|
|
111
|
+
onPress: ()=>onClearSelection(),
|
|
112
|
+
isQuiet: true,
|
|
113
|
+
staticColor: isEmphasized ? "white" : undefined
|
|
114
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$spectrumiconsuiCrossLarge), null)), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$Text), {
|
|
115
|
+
UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar-selectedCount")
|
|
116
|
+
}, lastCount === "all" ? stringFormatter.format("selectedAll") : stringFormatter.format("selected", {
|
|
117
|
+
count: lastCount
|
|
118
|
+
})))));
|
|
119
|
+
}
|
|
120
|
+
const $a4e665fbd087d71e$var$ActionBarInnerWithRef = /*#__PURE__*/ (0, $c4Nes$react).forwardRef($a4e665fbd087d71e$var$ActionBarInner);
|
|
121
|
+
/**
|
|
122
|
+
* Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.
|
|
123
|
+
*/ const $a4e665fbd087d71e$export$e213cebad6250b4a = /*#__PURE__*/ (0, $c4Nes$react).forwardRef($a4e665fbd087d71e$var$ActionBar);
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
export {$a4e665fbd087d71e$export$e213cebad6250b4a as ActionBar};
|
|
127
|
+
//# sourceMappingURL=ActionBar.mjs.map
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import $c4Nes$intlStringsmodulejs from "./intlStrings.module.js";
|
|
2
|
+
import "./actionbar.6c2bbcbf.css";
|
|
3
|
+
import $c4Nes$actionbar_cssmodulejs from "./actionbar_css.module.js";
|
|
4
|
+
import {ActionButton as $c4Nes$ActionButton} from "@react-spectrum/button";
|
|
5
|
+
import {ActionGroup as $c4Nes$ActionGroup} from "@react-spectrum/actiongroup";
|
|
6
|
+
import {announce as $c4Nes$announce} from "@react-aria/live-announcer";
|
|
7
|
+
import {useDOMRef as $c4Nes$useDOMRef, useStyleProps as $c4Nes$useStyleProps, classNames as $c4Nes$classNames} from "@react-spectrum/utils";
|
|
8
|
+
import $c4Nes$spectrumiconsuiCrossLarge from "@spectrum-icons/ui/CrossLarge";
|
|
9
|
+
import {filterDOMProps as $c4Nes$filterDOMProps} from "@react-aria/utils";
|
|
10
|
+
import {FocusScope as $c4Nes$FocusScope} from "@react-aria/focus";
|
|
11
|
+
import {OpenTransition as $c4Nes$OpenTransition} from "@react-spectrum/overlays";
|
|
12
|
+
import $c4Nes$react, {useState as $c4Nes$useState, useRef as $c4Nes$useRef, useEffect as $c4Nes$useEffect} from "react";
|
|
13
|
+
import {Text as $c4Nes$Text} from "@react-spectrum/text";
|
|
14
|
+
import {useKeyboard as $c4Nes$useKeyboard} from "@react-aria/interactions";
|
|
15
|
+
import {useLocalizedStringFormatter as $c4Nes$useLocalizedStringFormatter} from "@react-aria/i18n";
|
|
16
|
+
import {useProviderProps as $c4Nes$useProviderProps} from "@react-spectrum/provider";
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
function $parcel$interopDefault(a) {
|
|
20
|
+
return a && a.__esModule ? a.default : a;
|
|
21
|
+
}
|
|
22
|
+
/*
|
|
23
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
24
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
25
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
26
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
27
|
+
*
|
|
28
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
29
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
30
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
31
|
+
* governing permissions and limitations under the License.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
function $a4e665fbd087d71e$var$ActionBar(props, ref) {
|
|
48
|
+
let isOpen = props.selectedItemCount !== 0;
|
|
49
|
+
let domRef = (0, $c4Nes$useDOMRef)(ref);
|
|
50
|
+
return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$OpenTransition), {
|
|
51
|
+
nodeRef: domRef,
|
|
52
|
+
in: isOpen,
|
|
53
|
+
mountOnEnter: true,
|
|
54
|
+
unmountOnExit: true
|
|
55
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement($a4e665fbd087d71e$var$ActionBarInnerWithRef, {
|
|
56
|
+
...props,
|
|
57
|
+
ref: domRef
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
function $a4e665fbd087d71e$var$ActionBarInner(props, ref) {
|
|
61
|
+
props = (0, $c4Nes$useProviderProps)(props);
|
|
62
|
+
let { children: children, isEmphasized: isEmphasized, onAction: onAction, onClearSelection: onClearSelection, selectedItemCount: selectedItemCount, isOpen: isOpen, items: items } = props;
|
|
63
|
+
let { styleProps: styleProps } = (0, $c4Nes$useStyleProps)(props);
|
|
64
|
+
let stringFormatter = (0, $c4Nes$useLocalizedStringFormatter)((0, ($parcel$interopDefault($c4Nes$intlStringsmodulejs))), "@react-spectrum/actionbar");
|
|
65
|
+
// Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.
|
|
66
|
+
let [lastCount, setLastCount] = (0, $c4Nes$useState)(selectedItemCount);
|
|
67
|
+
if ((selectedItemCount === "all" || selectedItemCount > 0) && selectedItemCount !== lastCount) setLastCount(selectedItemCount);
|
|
68
|
+
let { keyboardProps: keyboardProps } = (0, $c4Nes$useKeyboard)({
|
|
69
|
+
onKeyDown (e) {
|
|
70
|
+
if (e.key === "Escape") {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
onClearSelection();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
// Announce "actions available" on mount.
|
|
77
|
+
let isInitial = (0, $c4Nes$useRef)(true);
|
|
78
|
+
(0, $c4Nes$useEffect)(()=>{
|
|
79
|
+
if (isInitial.current) {
|
|
80
|
+
isInitial.current = false;
|
|
81
|
+
(0, $c4Nes$announce)(stringFormatter.format("actionsAvailable"));
|
|
82
|
+
}
|
|
83
|
+
}, [
|
|
84
|
+
stringFormatter
|
|
85
|
+
]);
|
|
86
|
+
return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$FocusScope), {
|
|
87
|
+
restoreFocus: true
|
|
88
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
|
|
89
|
+
...(0, $c4Nes$filterDOMProps)(props),
|
|
90
|
+
...styleProps,
|
|
91
|
+
...keyboardProps,
|
|
92
|
+
ref: ref,
|
|
93
|
+
className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar", {
|
|
94
|
+
"react-spectrum-ActionBar--emphasized": isEmphasized,
|
|
95
|
+
"is-open": isOpen
|
|
96
|
+
}, styleProps.className)
|
|
97
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
|
|
98
|
+
className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar-bar")
|
|
99
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionGroup), {
|
|
100
|
+
items: items,
|
|
101
|
+
"aria-label": stringFormatter.format("actions"),
|
|
102
|
+
isQuiet: true,
|
|
103
|
+
staticColor: isEmphasized ? "white" : undefined,
|
|
104
|
+
overflowMode: "collapse",
|
|
105
|
+
buttonLabelBehavior: "collapse",
|
|
106
|
+
onAction: onAction,
|
|
107
|
+
UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar-actionGroup")
|
|
108
|
+
}, children), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionButton), {
|
|
109
|
+
gridArea: (0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))).clear,
|
|
110
|
+
"aria-label": stringFormatter.format("clearSelection"),
|
|
111
|
+
onPress: ()=>onClearSelection(),
|
|
112
|
+
isQuiet: true,
|
|
113
|
+
staticColor: isEmphasized ? "white" : undefined
|
|
114
|
+
}, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$spectrumiconsuiCrossLarge), null)), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$Text), {
|
|
115
|
+
UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), "react-spectrum-ActionBar-selectedCount")
|
|
116
|
+
}, lastCount === "all" ? stringFormatter.format("selectedAll") : stringFormatter.format("selected", {
|
|
117
|
+
count: lastCount
|
|
118
|
+
})))));
|
|
119
|
+
}
|
|
120
|
+
const $a4e665fbd087d71e$var$ActionBarInnerWithRef = /*#__PURE__*/ (0, $c4Nes$react).forwardRef($a4e665fbd087d71e$var$ActionBarInner);
|
|
121
|
+
/**
|
|
122
|
+
* Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.
|
|
123
|
+
*/ const $a4e665fbd087d71e$export$e213cebad6250b4a = /*#__PURE__*/ (0, $c4Nes$react).forwardRef($a4e665fbd087d71e$var$ActionBar);
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
export {$a4e665fbd087d71e$export$e213cebad6250b4a as ActionBar};
|
|
127
|
+
//# sourceMappingURL=ActionBar.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAqBD,SAAS,gCAA4B,KAAgC,EAAE,GAA2B;IAChG,IAAI,SAAS,MAAM,iBAAiB,KAAK;IACzC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,qBAAa;QACZ,SAAS;QACT,IAAI;QACJ,cAAA;QACA,eAAA;qBACA,gCAAC;QAAuB,GAAG,KAAK;QAAE,KAAK;;AAG7C;AAMA,SAAS,qCAAkB,KAA6B,EAAE,GAAwB;IAChF,QAAQ,CAAA,GAAA,uBAAe,EAAE;IAEzB,IAAI,YACF,QAAQ,gBACR,YAAY,YACZ,QAAQ,oBACR,gBAAgB,qBAChB,iBAAiB,UACjB,MAAM,SACN,KAAK,EACN,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAEhE,mHAAmH;IACnH,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,eAAO,EAAE;IACzC,IAAI,AAAC,CAAA,sBAAsB,SAAS,oBAAoB,CAAA,KAAM,sBAAsB,WAClF,aAAa;IAGf,IAAI,iBAAC,aAAa,EAAC,GAAG,CAAA,GAAA,kBAAU,EAAE;QAChC,WAAU,CAAC;YACT,IAAI,EAAE,GAAG,KAAK,UAAU;gBACtB,EAAE,cAAc;gBAChB;YACF;QACF;IACF;IAEA,yCAAyC;IACzC,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,UAAU,OAAO,EAAE;YACrB,UAAU,OAAO,GAAG;YACpB,CAAA,GAAA,eAAO,EAAE,gBAAgB,MAAM,CAAC;QAClC;IACF,GAAG;QAAC;KAAgB;IAEpB,qBACE,gCAAC,CAAA,GAAA,iBAAS;QAAE,cAAA;qBACV,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACb,GAAG,aAAa;QACjB,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,sDAAK,GACL,4BAA4B;YAC1B,wCAAwC;YACxC,WAAW;QACb,GACA,WAAW,SAAS;qBAEtB,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;qBACjC,gCAAC,CAAA,GAAA,kBAAU;QACT,OAAO;QACP,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAA;QACA,aAAa,eAAe,UAAU;QACtC,cAAa;QACb,qBAAoB;QACpB,UAAU;QACV,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;OACpC,yBAEH,gCAAC,CAAA,GAAA,mBAAW;QACV,UAAU,CAAA,GAAA,sDAAK,EAAE,KAAK;QACtB,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS,IAAM;QACf,SAAA;QACA,aAAa,eAAe,UAAU;qBACtC,gCAAC,CAAA,GAAA,gCAAS,yBAEZ,gCAAC,CAAA,GAAA,WAAG;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;OACxC,cAAc,QACX,gBAAgB,MAAM,CAAC,iBACvB,gBAAgB,MAAM,CAAC,YAAY;QAAC,OAAO;IAAS;AAMpE;AAEA,MAAM,4DAAwB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;AAE/C;;CAEC,GACD,MAAM,0DAAa,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/actionbar/src/ActionBar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {ActionGroup} from '@react-spectrum/actiongroup';\nimport {announce} from '@react-aria/live-announcer';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossLarge from '@spectrum-icons/ui/CrossLarge';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {OpenTransition} from '@react-spectrum/overlays';\nimport React, {ReactElement, Ref, useEffect, useRef, useState} from 'react';\nimport {SpectrumActionBarProps} from '@react-types/actionbar';\nimport styles from './actionbar.css';\nimport {Text} from '@react-spectrum/text';\nimport {useKeyboard} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionBar<T extends object>(props: SpectrumActionBarProps<T>, ref: DOMRef<HTMLDivElement>) {\n let isOpen = props.selectedItemCount !== 0;\n let domRef = useDOMRef(ref);\n\n return (\n <OpenTransition\n nodeRef={domRef}\n in={isOpen}\n mountOnEnter\n unmountOnExit>\n <ActionBarInnerWithRef {...props} ref={domRef} />\n </OpenTransition>\n );\n}\n\ninterface ActionBarInnerProps<T> extends SpectrumActionBarProps<T> {\n isOpen?: boolean\n}\n\nfunction ActionBarInner<T>(props: ActionBarInnerProps<T>, ref: Ref<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n children,\n isEmphasized,\n onAction,\n onClearSelection,\n selectedItemCount,\n isOpen,\n items\n } = props;\n\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/actionbar');\n\n // Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.\n let [lastCount, setLastCount] = useState(selectedItemCount);\n if ((selectedItemCount === 'all' || selectedItemCount > 0) && selectedItemCount !== lastCount) {\n setLastCount(selectedItemCount);\n }\n\n let {keyboardProps} = useKeyboard({\n onKeyDown(e) {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClearSelection();\n }\n }\n });\n\n // Announce \"actions available\" on mount.\n let isInitial = useRef(true);\n useEffect(() => {\n if (isInitial.current) {\n isInitial.current = false;\n announce(stringFormatter.format('actionsAvailable'));\n }\n }, [stringFormatter]);\n\n return (\n <FocusScope restoreFocus>\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n {...keyboardProps}\n ref={ref}\n className={classNames(\n styles,\n 'react-spectrum-ActionBar', {\n 'react-spectrum-ActionBar--emphasized': isEmphasized,\n 'is-open': isOpen\n },\n styleProps.className\n )}>\n <div className={classNames(styles, 'react-spectrum-ActionBar-bar')}>\n <ActionGroup\n items={items}\n aria-label={stringFormatter.format('actions')}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}\n overflowMode=\"collapse\"\n buttonLabelBehavior=\"collapse\"\n onAction={onAction}\n UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-actionGroup')}>\n {children}\n </ActionGroup>\n <ActionButton\n gridArea={styles.clear}\n aria-label={stringFormatter.format('clearSelection')}\n onPress={() => onClearSelection()}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}>\n <CrossLarge />\n </ActionButton>\n <Text UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-selectedCount')}>\n {lastCount === 'all'\n ? stringFormatter.format('selectedAll')\n : stringFormatter.format('selected', {count: lastCount})}\n </Text>\n </div>\n </div>\n </FocusScope>\n );\n}\n\nconst ActionBarInnerWithRef = React.forwardRef(ActionBarInner) as <T>(props: ActionBarInnerProps<T> & {ref?: Ref<HTMLDivElement>}) => ReactElement;\n\n/**\n * Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.\n */\nconst _ActionBar = React.forwardRef(ActionBar) as <T>(props: SpectrumActionBarProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ActionBar as ActionBar};\n"],"names":[],"version":3,"file":"ActionBar.module.js.map"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
require("./actionbar.6c2bbcbf.css");
|
|
2
|
+
var $ff24c7bbe0c168db$exports = require("./actionbar_css.main.js");
|
|
3
|
+
var $hZJeg$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
+
var $hZJeg$reactariautils = require("@react-aria/utils");
|
|
5
|
+
var $hZJeg$react = require("react");
|
|
6
|
+
var $hZJeg$reactspectrumprovider = require("@react-spectrum/provider");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$export(e, n, v, s) {
|
|
14
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$parcel$export(module.exports, "ActionBarContainer", () => $961b22d2b8bd2da1$export$ac2eb07f267e434c);
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
function $961b22d2b8bd2da1$var$ActionBarContainer(props, ref) {
|
|
34
|
+
// Grabs specific props from the closest Provider (see https://react-spectrum.adobe.com/react-spectrum/Provider.html#property-groups). Remove if your component doesn't support any of the listed props.
|
|
35
|
+
props = (0, $hZJeg$reactspectrumprovider.useProviderProps)(props);
|
|
36
|
+
let { children: children } = props;
|
|
37
|
+
let { styleProps: styleProps } = (0, $hZJeg$reactspectrumutils.useStyleProps)(props);
|
|
38
|
+
let domRef = (0, $hZJeg$reactspectrumutils.useDOMRef)(ref);
|
|
39
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($hZJeg$react))).createElement("div", {
|
|
40
|
+
...(0, $hZJeg$reactariautils.filterDOMProps)(props),
|
|
41
|
+
...styleProps,
|
|
42
|
+
ref: domRef,
|
|
43
|
+
className: (0, $hZJeg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), "ActionBarContainer", styleProps.className)
|
|
44
|
+
}, children);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* ActionBarContainer wraps around an ActionBar and a component that supports selection. It handles
|
|
48
|
+
* the ActionBar's position with respect to its linked component.
|
|
49
|
+
*/ const $961b22d2b8bd2da1$export$ac2eb07f267e434c = /*#__PURE__*/ (0, ($parcel$interopDefault($hZJeg$react))).forwardRef($961b22d2b8bd2da1$var$ActionBarContainer);
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=ActionBarContainer.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,SAAS,yCAAmB,KAAsC,EAAE,GAA2B;IAC7F,wMAAwM;IACxM,QAAQ,CAAA,GAAA,6CAAe,EAAE;IAEzB,IAAI,YAAC,QAAQ,EAAC,GAAG;IACjB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG,sBAAsB,WAAW,SAAS;OACvE;AAGP;AAEA;;;CAGC,GACD,MAAM,0DAAsB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/actionbar/src/ActionBarContainer.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionBarContainerProps} from '@react-types/actionbar';\nimport styles from './actionbar.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionBarContainer(props: SpectrumActionBarContainerProps, ref: DOMRef<HTMLDivElement>) {\n // Grabs specific props from the closest Provider (see https://react-spectrum.adobe.com/react-spectrum/Provider.html#property-groups). Remove if your component doesn't support any of the listed props.\n props = useProviderProps(props);\n\n let {children} = props;\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'ActionBarContainer', styleProps.className)}>\n {children}\n </div>\n );\n}\n\n/**\n * ActionBarContainer wraps around an ActionBar and a component that supports selection. It handles\n * the ActionBar's position with respect to its linked component.\n */\nconst _ActionBarContainer = React.forwardRef(ActionBarContainer);\nexport {_ActionBarContainer as ActionBarContainer};\n"],"names":[],"version":3,"file":"ActionBarContainer.main.js.map"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import "./actionbar.6c2bbcbf.css";
|
|
2
|
+
import $cNmre$actionbar_cssmodulejs from "./actionbar_css.mjs";
|
|
3
|
+
import {useStyleProps as $cNmre$useStyleProps, useDOMRef as $cNmre$useDOMRef, classNames as $cNmre$classNames} from "@react-spectrum/utils";
|
|
4
|
+
import {filterDOMProps as $cNmre$filterDOMProps} from "@react-aria/utils";
|
|
5
|
+
import $cNmre$react from "react";
|
|
6
|
+
import {useProviderProps as $cNmre$useProviderProps} from "@react-spectrum/provider";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function $2f6c8b20aa071c6d$var$ActionBarContainer(props, ref) {
|
|
28
|
+
// Grabs specific props from the closest Provider (see https://react-spectrum.adobe.com/react-spectrum/Provider.html#property-groups). Remove if your component doesn't support any of the listed props.
|
|
29
|
+
props = (0, $cNmre$useProviderProps)(props);
|
|
30
|
+
let { children: children } = props;
|
|
31
|
+
let { styleProps: styleProps } = (0, $cNmre$useStyleProps)(props);
|
|
32
|
+
let domRef = (0, $cNmre$useDOMRef)(ref);
|
|
33
|
+
return /*#__PURE__*/ (0, $cNmre$react).createElement("div", {
|
|
34
|
+
...(0, $cNmre$filterDOMProps)(props),
|
|
35
|
+
...styleProps,
|
|
36
|
+
ref: domRef,
|
|
37
|
+
className: (0, $cNmre$classNames)((0, ($parcel$interopDefault($cNmre$actionbar_cssmodulejs))), "ActionBarContainer", styleProps.className)
|
|
38
|
+
}, children);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* ActionBarContainer wraps around an ActionBar and a component that supports selection. It handles
|
|
42
|
+
* the ActionBar's position with respect to its linked component.
|
|
43
|
+
*/ const $2f6c8b20aa071c6d$export$ac2eb07f267e434c = /*#__PURE__*/ (0, $cNmre$react).forwardRef($2f6c8b20aa071c6d$var$ActionBarContainer);
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
export {$2f6c8b20aa071c6d$export$ac2eb07f267e434c as ActionBarContainer};
|
|
47
|
+
//# sourceMappingURL=ActionBarContainer.mjs.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import "./actionbar.6c2bbcbf.css";
|
|
2
|
+
import $cNmre$actionbar_cssmodulejs from "./actionbar_css.module.js";
|
|
3
|
+
import {useStyleProps as $cNmre$useStyleProps, useDOMRef as $cNmre$useDOMRef, classNames as $cNmre$classNames} from "@react-spectrum/utils";
|
|
4
|
+
import {filterDOMProps as $cNmre$filterDOMProps} from "@react-aria/utils";
|
|
5
|
+
import $cNmre$react from "react";
|
|
6
|
+
import {useProviderProps as $cNmre$useProviderProps} from "@react-spectrum/provider";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
/*
|
|
13
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
14
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
16
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
20
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
21
|
+
* governing permissions and limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function $2f6c8b20aa071c6d$var$ActionBarContainer(props, ref) {
|
|
28
|
+
// Grabs specific props from the closest Provider (see https://react-spectrum.adobe.com/react-spectrum/Provider.html#property-groups). Remove if your component doesn't support any of the listed props.
|
|
29
|
+
props = (0, $cNmre$useProviderProps)(props);
|
|
30
|
+
let { children: children } = props;
|
|
31
|
+
let { styleProps: styleProps } = (0, $cNmre$useStyleProps)(props);
|
|
32
|
+
let domRef = (0, $cNmre$useDOMRef)(ref);
|
|
33
|
+
return /*#__PURE__*/ (0, $cNmre$react).createElement("div", {
|
|
34
|
+
...(0, $cNmre$filterDOMProps)(props),
|
|
35
|
+
...styleProps,
|
|
36
|
+
ref: domRef,
|
|
37
|
+
className: (0, $cNmre$classNames)((0, ($parcel$interopDefault($cNmre$actionbar_cssmodulejs))), "ActionBarContainer", styleProps.className)
|
|
38
|
+
}, children);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* ActionBarContainer wraps around an ActionBar and a component that supports selection. It handles
|
|
42
|
+
* the ActionBar's position with respect to its linked component.
|
|
43
|
+
*/ const $2f6c8b20aa071c6d$export$ac2eb07f267e434c = /*#__PURE__*/ (0, $cNmre$react).forwardRef($2f6c8b20aa071c6d$var$ActionBarContainer);
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
export {$2f6c8b20aa071c6d$export$ac2eb07f267e434c as ActionBarContainer};
|
|
47
|
+
//# sourceMappingURL=ActionBarContainer.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUD,SAAS,yCAAmB,KAAsC,EAAE,GAA2B;IAC7F,wMAAwM;IACxM,QAAQ,CAAA,GAAA,uBAAe,EAAE;IAEzB,IAAI,YAAC,QAAQ,EAAC,GAAG;IACjB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG,sBAAsB,WAAW,SAAS;OACvE;AAGP;AAEA;;;CAGC,GACD,MAAM,0DAAsB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/actionbar/src/ActionBarContainer.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionBarContainerProps} from '@react-types/actionbar';\nimport styles from './actionbar.css';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction ActionBarContainer(props: SpectrumActionBarContainerProps, ref: DOMRef<HTMLDivElement>) {\n // Grabs specific props from the closest Provider (see https://react-spectrum.adobe.com/react-spectrum/Provider.html#property-groups). Remove if your component doesn't support any of the listed props.\n props = useProviderProps(props);\n\n let {children} = props;\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n ref={domRef}\n className={classNames(styles, 'ActionBarContainer', styleProps.className)}>\n {children}\n </div>\n );\n}\n\n/**\n * ActionBarContainer wraps around an ActionBar and a component that supports selection. It handles\n * the ActionBar's position with respect to its linked component.\n */\nconst _ActionBarContainer = React.forwardRef(ActionBarContainer);\nexport {_ActionBarContainer as ActionBarContainer};\n"],"names":[],"version":3,"file":"ActionBarContainer.module.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAAA;;;;;;AAKE;;;;;AAKA;;;;AAKF;;;;;;;;AAYE;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;AAIA;;;;;;;AAOA;;;;;;;;AAOA;;;;;AAMF;EAEI","sources":["packages/@react-spectrum/actionbar/src/actionbar.css"],"sourcesContent":[".ActionBarContainer {\n display: flex;\n flex-direction: column;\n position: relative;\n\n & > :not(.react-spectrum-ActionBar) {\n flex: 1;\n min-height: 0;\n }\n\n & > .react-spectrum-ActionBar {\n flex: 0 0 auto;\n }\n}\n\n.react-spectrum-ActionBar {\n transition: height var(--spectrum-global-animation-duration-100) ease-in-out,\n opacity var(--spectrum-global-animation-duration-100) ease-in-out;\n\n /* Take up no space when not open */\n block-size: 0;\n opacity: 0;\n width: 100%;\n\n /* Clip anything outside of us, whether we're open or not. This makes the animation smooth */\n overflow: hidden;\n\n &.is-open {\n height: calc(var(--spectrum-global-dimension-size-600) + var(--spectrum-global-dimension-size-100) * 2);\n opacity: 1;\n transition-delay: 0ms;\n }\n\n .react-spectrum-ActionBar-bar {\n display: grid;\n grid-template-areas: \"clear selected . actiongroup\";\n grid-template-columns: auto max-content minmax(var(--spectrum-global-dimension-size-300), 1fr) auto;\n align-items: center;\n isolation: isolate;\n justify-content: space-between;\n padding: var(--spectrum-global-dimension-size-100);\n\n position: absolute;\n bottom: var(--spectrum-global-dimension-size-100);\n left: var(--spectrum-global-dimension-size-100);\n right: var(--spectrum-global-dimension-size-100);\n max-width: 960px;\n margin: 0 auto;\n\n background: var(--spectrum-global-color-gray-50);\n border-radius: var(--spectrum-popover-border-radius);\n border-style: solid;\n border-width: var(--spectrum-popover-border-size);\n border-color: var(--spectrum-popover-border-color);\n box-shadow: 0 2px 8px var(--spectrum-alias-dropshadow-color);\n\n transform: translateY(var(--spectrum-overlay-positive-transform-distance));\n transition: transform var(--spectrum-global-animation-duration-100) ease-in-out;\n }\n\n &.is-open .react-spectrum-ActionBar-bar {\n transform: translateY(0);\n }\n\n &.react-spectrum-ActionBar--emphasized .react-spectrum-ActionBar-bar {\n background: var(--spectrum-global-color-static-blue-700);\n color: white;\n box-shadow: 0 2px 6px var(--spectrum-alias-dropshadow-color);\n border: none;\n }\n\n .react-spectrum-ActionBar-selectedCount {\n grid-area: selected;\n padding: 0 var(--spectrum-global-dimension-size-50);\n user-select: none;\n cursor: default;\n }\n\n .react-spectrum-ActionBar-actionGroup {\n grid-area: actiongroup;\n min-width: 0;\n }\n}\n@media (forced-colors: active) {\n .react-spectrum-ActionBar {\n &.react-spectrum-ActionBar--emphasized .react-spectrum-ActionBar-bar {\n\n border: 1px solid transparent;\n }\n }\n}\n"],"names":[],"version":3,"file":"
|
|
1
|
+
{"mappings":"AAAA;;;;;;AAKE;;;;;AAKA;;;;AAKF;;;;;;;;AAYE;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;;;;AAIA;;;;;;;AAOA;;;;;;;;AAOA;;;;;AAMF;EAEI","sources":["packages/@react-spectrum/actionbar/src/actionbar.css"],"sourcesContent":[".ActionBarContainer {\n display: flex;\n flex-direction: column;\n position: relative;\n\n & > :not(.react-spectrum-ActionBar) {\n flex: 1;\n min-height: 0;\n }\n\n & > .react-spectrum-ActionBar {\n flex: 0 0 auto;\n }\n}\n\n.react-spectrum-ActionBar {\n transition: height var(--spectrum-global-animation-duration-100) ease-in-out,\n opacity var(--spectrum-global-animation-duration-100) ease-in-out;\n\n /* Take up no space when not open */\n block-size: 0;\n opacity: 0;\n width: 100%;\n\n /* Clip anything outside of us, whether we're open or not. This makes the animation smooth */\n overflow: hidden;\n\n &.is-open {\n height: calc(var(--spectrum-global-dimension-size-600) + var(--spectrum-global-dimension-size-100) * 2);\n opacity: 1;\n transition-delay: 0ms;\n }\n\n .react-spectrum-ActionBar-bar {\n display: grid;\n grid-template-areas: \"clear selected . actiongroup\";\n grid-template-columns: auto max-content minmax(var(--spectrum-global-dimension-size-300), 1fr) auto;\n align-items: center;\n isolation: isolate;\n justify-content: space-between;\n padding: var(--spectrum-global-dimension-size-100);\n\n position: absolute;\n bottom: var(--spectrum-global-dimension-size-100);\n left: var(--spectrum-global-dimension-size-100);\n right: var(--spectrum-global-dimension-size-100);\n max-width: 960px;\n margin: 0 auto;\n\n background: var(--spectrum-global-color-gray-50);\n border-radius: var(--spectrum-popover-border-radius);\n border-style: solid;\n border-width: var(--spectrum-popover-border-size);\n border-color: var(--spectrum-popover-border-color);\n box-shadow: 0 2px 8px var(--spectrum-alias-dropshadow-color);\n\n transform: translateY(var(--spectrum-overlay-positive-transform-distance));\n transition: transform var(--spectrum-global-animation-duration-100) ease-in-out;\n }\n\n &.is-open .react-spectrum-ActionBar-bar {\n transform: translateY(0);\n }\n\n &.react-spectrum-ActionBar--emphasized .react-spectrum-ActionBar-bar {\n background: var(--spectrum-global-color-static-blue-700);\n color: white;\n box-shadow: 0 2px 6px var(--spectrum-alias-dropshadow-color);\n border: none;\n }\n\n .react-spectrum-ActionBar-selectedCount {\n grid-area: selected;\n padding: 0 var(--spectrum-global-dimension-size-50);\n user-select: none;\n cursor: default;\n }\n\n .react-spectrum-ActionBar-actionGroup {\n grid-area: actiongroup;\n min-width: 0;\n }\n}\n@media (forced-colors: active) {\n .react-spectrum-ActionBar {\n &.react-spectrum-ActionBar--emphasized .react-spectrum-ActionBar-bar {\n\n border: 1px solid transparent;\n }\n }\n}\n"],"names":[],"version":3,"file":"actionbar.6c2bbcbf.css.map"}
|