@react-spectrum/button 3.17.6 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +7 -7
- package/dist/main.js +12 -12
- package/dist/main.js.map +1 -1
- package/dist/module.js +7 -7
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +10 -0
- package/package.json +12 -35
- package/src/index.ts +11 -7
- package/dist/ActionButton.main.js +0 -93
- package/dist/ActionButton.main.js.map +0 -1
- package/dist/ActionButton.mjs +0 -88
- package/dist/ActionButton.module.js +0 -88
- package/dist/ActionButton.module.js.map +0 -1
- package/dist/Button.main.js +0 -181
- package/dist/Button.main.js.map +0 -1
- package/dist/Button.mjs +0 -176
- package/dist/Button.module.js +0 -176
- package/dist/Button.module.js.map +0 -1
- package/dist/ClearButton.main.js +0 -75
- package/dist/ClearButton.main.js.map +0 -1
- package/dist/ClearButton.mjs +0 -70
- package/dist/ClearButton.module.js +0 -70
- package/dist/ClearButton.module.js.map +0 -1
- package/dist/FieldButton.main.js +0 -70
- package/dist/FieldButton.main.js.map +0 -1
- package/dist/FieldButton.mjs +0 -65
- package/dist/FieldButton.module.js +0 -65
- package/dist/FieldButton.module.js.map +0 -1
- package/dist/LogicButton.main.js +0 -67
- package/dist/LogicButton.main.js.map +0 -1
- package/dist/LogicButton.mjs +0 -62
- package/dist/LogicButton.module.js +0 -62
- package/dist/LogicButton.module.js.map +0 -1
- package/dist/ToggleButton.main.js +0 -86
- package/dist/ToggleButton.main.js.map +0 -1
- package/dist/ToggleButton.mjs +0 -81
- package/dist/ToggleButton.module.js +0 -81
- package/dist/ToggleButton.module.js.map +0 -1
- package/dist/ar-AE.main.js +0 -6
- package/dist/ar-AE.main.js.map +0 -1
- package/dist/ar-AE.mjs +0 -8
- package/dist/ar-AE.module.js +0 -8
- package/dist/ar-AE.module.js.map +0 -1
- package/dist/bg-BG.main.js +0 -6
- package/dist/bg-BG.main.js.map +0 -1
- package/dist/bg-BG.mjs +0 -8
- package/dist/bg-BG.module.js +0 -8
- package/dist/bg-BG.module.js.map +0 -1
- package/dist/button.c18453ac.css +0 -1669
- package/dist/button.c18453ac.css.map +0 -1
- package/dist/button_vars_css.main.js +0 -125
- package/dist/button_vars_css.main.js.map +0 -1
- package/dist/button_vars_css.mjs +0 -127
- package/dist/button_vars_css.module.js +0 -127
- package/dist/button_vars_css.module.js.map +0 -1
- package/dist/cs-CZ.main.js +0 -6
- package/dist/cs-CZ.main.js.map +0 -1
- package/dist/cs-CZ.mjs +0 -8
- package/dist/cs-CZ.module.js +0 -8
- package/dist/cs-CZ.module.js.map +0 -1
- package/dist/da-DK.main.js +0 -6
- package/dist/da-DK.main.js.map +0 -1
- package/dist/da-DK.mjs +0 -8
- package/dist/da-DK.module.js +0 -8
- package/dist/da-DK.module.js.map +0 -1
- package/dist/de-DE.main.js +0 -6
- package/dist/de-DE.main.js.map +0 -1
- package/dist/de-DE.mjs +0 -8
- package/dist/de-DE.module.js +0 -8
- package/dist/de-DE.module.js.map +0 -1
- package/dist/el-GR.main.js +0 -6
- package/dist/el-GR.main.js.map +0 -1
- package/dist/el-GR.mjs +0 -8
- package/dist/el-GR.module.js +0 -8
- package/dist/el-GR.module.js.map +0 -1
- package/dist/en-US.main.js +0 -6
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -8
- package/dist/en-US.module.js +0 -8
- package/dist/en-US.module.js.map +0 -1
- package/dist/es-ES.main.js +0 -6
- package/dist/es-ES.main.js.map +0 -1
- package/dist/es-ES.mjs +0 -8
- package/dist/es-ES.module.js +0 -8
- package/dist/es-ES.module.js.map +0 -1
- package/dist/et-EE.main.js +0 -6
- package/dist/et-EE.main.js.map +0 -1
- package/dist/et-EE.mjs +0 -8
- package/dist/et-EE.module.js +0 -8
- package/dist/et-EE.module.js.map +0 -1
- package/dist/fi-FI.main.js +0 -6
- package/dist/fi-FI.main.js.map +0 -1
- package/dist/fi-FI.mjs +0 -8
- package/dist/fi-FI.module.js +0 -8
- package/dist/fi-FI.module.js.map +0 -1
- package/dist/fr-FR.main.js +0 -6
- package/dist/fr-FR.main.js.map +0 -1
- package/dist/fr-FR.mjs +0 -8
- package/dist/fr-FR.module.js +0 -8
- package/dist/fr-FR.module.js.map +0 -1
- package/dist/he-IL.main.js +0 -6
- package/dist/he-IL.main.js.map +0 -1
- package/dist/he-IL.mjs +0 -8
- package/dist/he-IL.module.js +0 -8
- package/dist/he-IL.module.js.map +0 -1
- package/dist/hr-HR.main.js +0 -6
- package/dist/hr-HR.main.js.map +0 -1
- package/dist/hr-HR.mjs +0 -8
- package/dist/hr-HR.module.js +0 -8
- package/dist/hr-HR.module.js.map +0 -1
- package/dist/hu-HU.main.js +0 -6
- package/dist/hu-HU.main.js.map +0 -1
- package/dist/hu-HU.mjs +0 -8
- package/dist/hu-HU.module.js +0 -8
- package/dist/hu-HU.module.js.map +0 -1
- package/dist/intlStrings.main.js +0 -108
- package/dist/intlStrings.main.js.map +0 -1
- package/dist/intlStrings.mjs +0 -110
- package/dist/intlStrings.module.js +0 -110
- package/dist/intlStrings.module.js.map +0 -1
- package/dist/it-IT.main.js +0 -6
- package/dist/it-IT.main.js.map +0 -1
- package/dist/it-IT.mjs +0 -8
- package/dist/it-IT.module.js +0 -8
- package/dist/it-IT.module.js.map +0 -1
- package/dist/ja-JP.main.js +0 -6
- package/dist/ja-JP.main.js.map +0 -1
- package/dist/ja-JP.mjs +0 -8
- package/dist/ja-JP.module.js +0 -8
- package/dist/ja-JP.module.js.map +0 -1
- package/dist/ko-KR.main.js +0 -6
- package/dist/ko-KR.main.js.map +0 -1
- package/dist/ko-KR.mjs +0 -8
- package/dist/ko-KR.module.js +0 -8
- package/dist/ko-KR.module.js.map +0 -1
- package/dist/lt-LT.main.js +0 -6
- package/dist/lt-LT.main.js.map +0 -1
- package/dist/lt-LT.mjs +0 -8
- package/dist/lt-LT.module.js +0 -8
- package/dist/lt-LT.module.js.map +0 -1
- package/dist/lv-LV.main.js +0 -6
- package/dist/lv-LV.main.js.map +0 -1
- package/dist/lv-LV.mjs +0 -8
- package/dist/lv-LV.module.js +0 -8
- package/dist/lv-LV.module.js.map +0 -1
- package/dist/nb-NO.main.js +0 -6
- package/dist/nb-NO.main.js.map +0 -1
- package/dist/nb-NO.mjs +0 -8
- package/dist/nb-NO.module.js +0 -8
- package/dist/nb-NO.module.js.map +0 -1
- package/dist/nl-NL.main.js +0 -6
- package/dist/nl-NL.main.js.map +0 -1
- package/dist/nl-NL.mjs +0 -8
- package/dist/nl-NL.module.js +0 -8
- package/dist/nl-NL.module.js.map +0 -1
- package/dist/pl-PL.main.js +0 -6
- package/dist/pl-PL.main.js.map +0 -1
- package/dist/pl-PL.mjs +0 -8
- package/dist/pl-PL.module.js +0 -8
- package/dist/pl-PL.module.js.map +0 -1
- package/dist/pt-BR.main.js +0 -6
- package/dist/pt-BR.main.js.map +0 -1
- package/dist/pt-BR.mjs +0 -8
- package/dist/pt-BR.module.js +0 -8
- package/dist/pt-BR.module.js.map +0 -1
- package/dist/pt-PT.main.js +0 -6
- package/dist/pt-PT.main.js.map +0 -1
- package/dist/pt-PT.mjs +0 -8
- package/dist/pt-PT.module.js +0 -8
- package/dist/pt-PT.module.js.map +0 -1
- package/dist/ro-RO.main.js +0 -6
- package/dist/ro-RO.main.js.map +0 -1
- package/dist/ro-RO.mjs +0 -8
- package/dist/ro-RO.module.js +0 -8
- package/dist/ro-RO.module.js.map +0 -1
- package/dist/ru-RU.main.js +0 -6
- package/dist/ru-RU.main.js.map +0 -1
- package/dist/ru-RU.mjs +0 -8
- package/dist/ru-RU.module.js +0 -8
- package/dist/ru-RU.module.js.map +0 -1
- package/dist/sk-SK.main.js +0 -6
- package/dist/sk-SK.main.js.map +0 -1
- package/dist/sk-SK.mjs +0 -8
- package/dist/sk-SK.module.js +0 -8
- package/dist/sk-SK.module.js.map +0 -1
- package/dist/sl-SI.main.js +0 -6
- package/dist/sl-SI.main.js.map +0 -1
- package/dist/sl-SI.mjs +0 -8
- package/dist/sl-SI.module.js +0 -8
- package/dist/sl-SI.module.js.map +0 -1
- package/dist/sr-SP.main.js +0 -6
- package/dist/sr-SP.main.js.map +0 -1
- package/dist/sr-SP.mjs +0 -8
- package/dist/sr-SP.module.js +0 -8
- package/dist/sr-SP.module.js.map +0 -1
- package/dist/sv-SE.main.js +0 -6
- package/dist/sv-SE.main.js.map +0 -1
- package/dist/sv-SE.mjs +0 -8
- package/dist/sv-SE.module.js +0 -8
- package/dist/sv-SE.module.js.map +0 -1
- package/dist/tr-TR.main.js +0 -6
- package/dist/tr-TR.main.js.map +0 -1
- package/dist/tr-TR.mjs +0 -8
- package/dist/tr-TR.module.js +0 -8
- package/dist/tr-TR.module.js.map +0 -1
- package/dist/types.d.ts +0 -44
- package/dist/types.d.ts.map +0 -1
- package/dist/uk-UA.main.js +0 -6
- package/dist/uk-UA.main.js.map +0 -1
- package/dist/uk-UA.mjs +0 -8
- package/dist/uk-UA.module.js +0 -8
- package/dist/uk-UA.module.js.map +0 -1
- package/dist/zh-CN.main.js +0 -6
- package/dist/zh-CN.main.js.map +0 -1
- package/dist/zh-CN.mjs +0 -8
- package/dist/zh-CN.module.js +0 -8
- package/dist/zh-CN.module.js.map +0 -1
- package/dist/zh-TW.main.js +0 -6
- package/dist/zh-TW.main.js.map +0 -1
- package/dist/zh-TW.mjs +0 -8
- package/dist/zh-TW.module.js +0 -8
- package/dist/zh-TW.module.js.map +0 -1
- package/src/ActionButton.tsx +0 -104
- package/src/Button.tsx +0 -207
- package/src/ClearButton.tsx +0 -81
- package/src/FieldButton.tsx +0 -81
- package/src/LogicButton.tsx +0 -64
- package/src/ToggleButton.tsx +0 -90
package/dist/import.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {Button as $
|
|
2
|
-
import {ActionButton as $
|
|
3
|
-
import {FieldButton as $
|
|
4
|
-
import {LogicButton as $
|
|
5
|
-
import {ClearButton as $
|
|
6
|
-
import {ToggleButton as $
|
|
1
|
+
import {Button as $db4d36ad4248f6fa$re_export$Button} from "@adobe/react-spectrum/Button";
|
|
2
|
+
import {ActionButton as $db4d36ad4248f6fa$re_export$ActionButton} from "@adobe/react-spectrum/ActionButton";
|
|
3
|
+
import {FieldButton as $db4d36ad4248f6fa$re_export$FieldButton} from "@adobe/react-spectrum/private/button/FieldButton";
|
|
4
|
+
import {LogicButton as $db4d36ad4248f6fa$re_export$LogicButton} from "@adobe/react-spectrum/LogicButton";
|
|
5
|
+
import {ClearButton as $db4d36ad4248f6fa$re_export$ClearButton} from "@adobe/react-spectrum/private/button/ClearButton";
|
|
6
|
+
import {ToggleButton as $db4d36ad4248f6fa$re_export$ToggleButton} from "@adobe/react-spectrum/ToggleButton";
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -24,5 +24,5 @@ import {ToggleButton as $3979c7c23b0bd270$export$d2b052e7b4be1756} from "./Toggl
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
export {$
|
|
27
|
+
export {$db4d36ad4248f6fa$re_export$Button as Button, $db4d36ad4248f6fa$re_export$ActionButton as ActionButton, $db4d36ad4248f6fa$re_export$FieldButton as FieldButton, $db4d36ad4248f6fa$re_export$LogicButton as LogicButton, $db4d36ad4248f6fa$re_export$ClearButton as ClearButton, $db4d36ad4248f6fa$re_export$ToggleButton as ToggleButton};
|
|
28
28
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
1
|
+
var $9XHx8$adobereactspectrumButton = require("@adobe/react-spectrum/Button");
|
|
2
|
+
var $9XHx8$adobereactspectrumActionButton = require("@adobe/react-spectrum/ActionButton");
|
|
3
|
+
var $9XHx8$adobereactspectrumprivatebuttonFieldButton = require("@adobe/react-spectrum/private/button/FieldButton");
|
|
4
|
+
var $9XHx8$adobereactspectrumLogicButton = require("@adobe/react-spectrum/LogicButton");
|
|
5
|
+
var $9XHx8$adobereactspectrumprivatebuttonClearButton = require("@adobe/react-spectrum/private/button/ClearButton");
|
|
6
|
+
var $9XHx8$adobereactspectrumToggleButton = require("@adobe/react-spectrum/ToggleButton");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
function $parcel$export(e, n, v, s) {
|
|
10
10
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
$parcel$export(module.exports, "Button", ()
|
|
14
|
-
$parcel$export(module.exports, "ActionButton", ()
|
|
15
|
-
$parcel$export(module.exports, "FieldButton", ()
|
|
16
|
-
$parcel$export(module.exports, "LogicButton", ()
|
|
17
|
-
$parcel$export(module.exports, "ClearButton", ()
|
|
18
|
-
$parcel$export(module.exports, "ToggleButton", ()
|
|
13
|
+
$parcel$export(module.exports, "Button", function () { return $9XHx8$adobereactspectrumButton.Button; });
|
|
14
|
+
$parcel$export(module.exports, "ActionButton", function () { return $9XHx8$adobereactspectrumActionButton.ActionButton; });
|
|
15
|
+
$parcel$export(module.exports, "FieldButton", function () { return $9XHx8$adobereactspectrumprivatebuttonFieldButton.FieldButton; });
|
|
16
|
+
$parcel$export(module.exports, "LogicButton", function () { return $9XHx8$adobereactspectrumLogicButton.LogicButton; });
|
|
17
|
+
$parcel$export(module.exports, "ClearButton", function () { return $9XHx8$adobereactspectrumprivatebuttonClearButton.ClearButton; });
|
|
18
|
+
$parcel$export(module.exports, "ToggleButton", function () { return $9XHx8$adobereactspectrumToggleButton.ToggleButton; });
|
|
19
19
|
/*
|
|
20
20
|
* Copyright 2020 Adobe. All rights reserved.
|
|
21
21
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/button/src/index.ts"],"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/// <reference types=\"css-module-types\" />\nexport {Button} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/button/src/index.ts"],"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/// <reference types=\"css-module-types\" />\nexport {Button} from '@adobe/react-spectrum/Button';\n\nexport {ActionButton} from '@adobe/react-spectrum/ActionButton';\nexport {FieldButton} from '@adobe/react-spectrum/private/button/FieldButton';\nexport {LogicButton} from '@adobe/react-spectrum/LogicButton';\nexport {ClearButton} from '@adobe/react-spectrum/private/button/ClearButton';\nexport {ToggleButton} from '@adobe/react-spectrum/ToggleButton';\nexport type {SpectrumActionButtonProps} from '@adobe/react-spectrum/ActionButton';\nexport type {SpectrumButtonProps} from '@adobe/react-spectrum/Button';\nexport type {SpectrumLogicButtonProps} from '@adobe/react-spectrum/LogicButton';\nexport type {SpectrumToggleButtonProps} from '@adobe/react-spectrum/ToggleButton';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {Button as $
|
|
2
|
-
import {ActionButton as $
|
|
3
|
-
import {FieldButton as $
|
|
4
|
-
import {LogicButton as $
|
|
5
|
-
import {ClearButton as $
|
|
6
|
-
import {ToggleButton as $
|
|
1
|
+
import {Button as $db4d36ad4248f6fa$re_export$Button} from "@adobe/react-spectrum/Button";
|
|
2
|
+
import {ActionButton as $db4d36ad4248f6fa$re_export$ActionButton} from "@adobe/react-spectrum/ActionButton";
|
|
3
|
+
import {FieldButton as $db4d36ad4248f6fa$re_export$FieldButton} from "@adobe/react-spectrum/private/button/FieldButton";
|
|
4
|
+
import {LogicButton as $db4d36ad4248f6fa$re_export$LogicButton} from "@adobe/react-spectrum/LogicButton";
|
|
5
|
+
import {ClearButton as $db4d36ad4248f6fa$re_export$ClearButton} from "@adobe/react-spectrum/private/button/ClearButton";
|
|
6
|
+
import {ToggleButton as $db4d36ad4248f6fa$re_export$ToggleButton} from "@adobe/react-spectrum/ToggleButton";
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -24,5 +24,5 @@ import {ToggleButton as $3979c7c23b0bd270$export$d2b052e7b4be1756} from "./Toggl
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
export {$
|
|
27
|
+
export {$db4d36ad4248f6fa$re_export$Button as Button, $db4d36ad4248f6fa$re_export$ActionButton as ActionButton, $db4d36ad4248f6fa$re_export$FieldButton as FieldButton, $db4d36ad4248f6fa$re_export$LogicButton as LogicButton, $db4d36ad4248f6fa$re_export$ClearButton as ClearButton, $db4d36ad4248f6fa$re_export$ToggleButton as ToggleButton};
|
|
28
28
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/button/src/index.ts"],"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/// <reference types=\"css-module-types\" />\nexport {Button} from '
|
|
1
|
+
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/button/src/index.ts"],"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/// <reference types=\"css-module-types\" />\nexport {Button} from '@adobe/react-spectrum/Button';\n\nexport {ActionButton} from '@adobe/react-spectrum/ActionButton';\nexport {FieldButton} from '@adobe/react-spectrum/private/button/FieldButton';\nexport {LogicButton} from '@adobe/react-spectrum/LogicButton';\nexport {ClearButton} from '@adobe/react-spectrum/private/button/ClearButton';\nexport {ToggleButton} from '@adobe/react-spectrum/ToggleButton';\nexport type {SpectrumActionButtonProps} from '@adobe/react-spectrum/ActionButton';\nexport type {SpectrumButtonProps} from '@adobe/react-spectrum/Button';\nexport type {SpectrumLogicButtonProps} from '@adobe/react-spectrum/LogicButton';\nexport type {SpectrumToggleButtonProps} from '@adobe/react-spectrum/ToggleButton';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Button } from '@adobe/react-spectrum/Button';
|
|
2
|
+
export { ActionButton } from '@adobe/react-spectrum/ActionButton';
|
|
3
|
+
export { FieldButton } from '@adobe/react-spectrum/private/button/FieldButton';
|
|
4
|
+
export { LogicButton } from '@adobe/react-spectrum/LogicButton';
|
|
5
|
+
export { ClearButton } from '@adobe/react-spectrum/private/button/ClearButton';
|
|
6
|
+
export { ToggleButton } from '@adobe/react-spectrum/ToggleButton';
|
|
7
|
+
export type { SpectrumActionButtonProps } from '@adobe/react-spectrum/ActionButton';
|
|
8
|
+
export type { SpectrumButtonProps } from '@adobe/react-spectrum/Button';
|
|
9
|
+
export type { SpectrumLogicButtonProps } from '@adobe/react-spectrum/LogicButton';
|
|
10
|
+
export type { SpectrumToggleButtonProps } from '@adobe/react-spectrum/ToggleButton';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/button",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,48 +24,25 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@react-aria/focus": "^3.21.4",
|
|
45
|
-
"@react-aria/i18n": "^3.12.15",
|
|
46
|
-
"@react-aria/interactions": "^3.27.0",
|
|
47
|
-
"@react-aria/utils": "^3.33.0",
|
|
48
|
-
"@react-spectrum/progress": "^3.7.22",
|
|
49
|
-
"@react-spectrum/text": "^3.5.24",
|
|
50
|
-
"@react-spectrum/utils": "^3.12.11",
|
|
51
|
-
"@react-stately/toggle": "^3.9.4",
|
|
52
|
-
"@react-types/button": "^3.15.0",
|
|
53
|
-
"@react-types/shared": "^3.33.0",
|
|
54
|
-
"@spectrum-icons/ui": "^3.6.22",
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
55
35
|
"@swc/helpers": "^0.5.0"
|
|
56
36
|
},
|
|
57
37
|
"devDependencies": {
|
|
58
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1",
|
|
59
|
-
"@react-spectrum/test-utils-internal": "3.0.0-alpha.1",
|
|
60
38
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
61
39
|
},
|
|
62
40
|
"peerDependencies": {
|
|
63
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
64
41
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
65
42
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
66
43
|
},
|
|
67
44
|
"publishConfig": {
|
|
68
45
|
"access": "public"
|
|
69
46
|
},
|
|
70
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
71
48
|
}
|
package/src/index.ts
CHANGED
|
@@ -10,10 +10,14 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
/// <reference types="css-module-types" />
|
|
13
|
-
export {Button} from '
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
13
|
+
export {Button} from '@adobe/react-spectrum/Button';
|
|
14
|
+
|
|
15
|
+
export {ActionButton} from '@adobe/react-spectrum/ActionButton';
|
|
16
|
+
export {FieldButton} from '@adobe/react-spectrum/private/button/FieldButton';
|
|
17
|
+
export {LogicButton} from '@adobe/react-spectrum/LogicButton';
|
|
18
|
+
export {ClearButton} from '@adobe/react-spectrum/private/button/ClearButton';
|
|
19
|
+
export {ToggleButton} from '@adobe/react-spectrum/ToggleButton';
|
|
20
|
+
export type {SpectrumActionButtonProps} from '@adobe/react-spectrum/ActionButton';
|
|
21
|
+
export type {SpectrumButtonProps} from '@adobe/react-spectrum/Button';
|
|
22
|
+
export type {SpectrumLogicButtonProps} from '@adobe/react-spectrum/LogicButton';
|
|
23
|
+
export type {SpectrumToggleButtonProps} from '@adobe/react-spectrum/ToggleButton';
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
require("./button.c18453ac.css");
|
|
2
|
-
var $afc5a4514aca2340$exports = require("./button_vars_css.main.js");
|
|
3
|
-
var $9HF4v$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
-
var $9HF4v$spectrumiconsuiCornerTriangle = require("@spectrum-icons/ui/CornerTriangle");
|
|
5
|
-
var $9HF4v$reactariafocus = require("@react-aria/focus");
|
|
6
|
-
var $9HF4v$reactariautils = require("@react-aria/utils");
|
|
7
|
-
var $9HF4v$react = require("react");
|
|
8
|
-
var $9HF4v$reactspectrumtext = require("@react-spectrum/text");
|
|
9
|
-
var $9HF4v$reactariabutton = require("@react-aria/button");
|
|
10
|
-
var $9HF4v$reactariainteractions = require("@react-aria/interactions");
|
|
11
|
-
var $9HF4v$reactspectrumprovider = require("@react-spectrum/provider");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function $parcel$interopDefault(a) {
|
|
15
|
-
return a && a.__esModule ? a.default : a;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function $parcel$export(e, n, v, s) {
|
|
19
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
$parcel$export(module.exports, "ActionButton", () => $65dbde0e8e7aba71$export$cfc7921d29ef7b80);
|
|
23
|
-
/*
|
|
24
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
25
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
26
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
27
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
28
|
-
*
|
|
29
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
30
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
31
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
32
|
-
* governing permissions and limitations under the License.
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const $65dbde0e8e7aba71$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).forwardRef(function ActionButton(props, ref) {
|
|
44
|
-
props = (0, $9HF4v$reactspectrumprovider.useProviderProps)(props);
|
|
45
|
-
props = (0, $9HF4v$reactspectrumutils.useSlotProps)(props, 'actionButton');
|
|
46
|
-
let textProps = (0, $9HF4v$reactspectrumutils.useSlotProps)({
|
|
47
|
-
UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-ActionButton-label')
|
|
48
|
-
}, 'text');
|
|
49
|
-
let { isQuiet: isQuiet, isDisabled: isDisabled, staticColor: staticColor, children: children, autoFocus: autoFocus, holdAffordance: // @ts-ignore (private)
|
|
50
|
-
holdAffordance, hideButtonText: // @ts-ignore (private)
|
|
51
|
-
hideButtonText, ...otherProps } = props;
|
|
52
|
-
let domRef = (0, $9HF4v$reactspectrumutils.useFocusableRef)(ref);
|
|
53
|
-
let { buttonProps: buttonProps, isPressed: isPressed } = (0, $9HF4v$reactariabutton.useButton)(props, domRef);
|
|
54
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $9HF4v$reactariainteractions.useHover)({
|
|
55
|
-
isDisabled: isDisabled
|
|
56
|
-
});
|
|
57
|
-
let { styleProps: styleProps } = (0, $9HF4v$reactspectrumutils.useStyleProps)(otherProps);
|
|
58
|
-
let isTextOnly = (0, ($parcel$interopDefault($9HF4v$react))).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).isValidElement(c));
|
|
59
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactariafocus.FocusRing), {
|
|
60
|
-
focusRingClass: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'focus-ring'),
|
|
61
|
-
autoFocus: autoFocus
|
|
62
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement("button", {
|
|
63
|
-
...styleProps,
|
|
64
|
-
...(0, $9HF4v$reactariautils.mergeProps)(buttonProps, hoverProps),
|
|
65
|
-
ref: domRef,
|
|
66
|
-
className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-ActionButton', {
|
|
67
|
-
'spectrum-ActionButton--quiet': isQuiet,
|
|
68
|
-
'spectrum-ActionButton--staticColor': !!staticColor,
|
|
69
|
-
'spectrum-ActionButton--staticWhite': staticColor === 'white',
|
|
70
|
-
'spectrum-ActionButton--staticBlack': staticColor === 'black',
|
|
71
|
-
'is-active': isPressed,
|
|
72
|
-
'is-disabled': isDisabled,
|
|
73
|
-
'is-hovered': isHovered
|
|
74
|
-
}, styleProps.className)
|
|
75
|
-
}, holdAffordance && /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, ($parcel$interopDefault($9HF4v$spectrumiconsuiCornerTriangle))), {
|
|
76
|
-
UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-ActionButton-hold')
|
|
77
|
-
}), /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactspectrumutils.ClearSlots), null, /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactspectrumutils.SlotProvider), {
|
|
78
|
-
slots: {
|
|
79
|
-
icon: {
|
|
80
|
-
size: 'S',
|
|
81
|
-
UNSAFE_className: (0, $9HF4v$reactspectrumutils.classNames)((0, ($parcel$interopDefault($afc5a4514aca2340$exports))), 'spectrum-Icon', {
|
|
82
|
-
'spectrum-ActionGroup-itemIcon': hideButtonText
|
|
83
|
-
})
|
|
84
|
-
},
|
|
85
|
-
text: {
|
|
86
|
-
...textProps
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, ($parcel$interopDefault($9HF4v$react))).createElement((0, $9HF4v$reactspectrumtext.Text), null, children) : children))));
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
//# sourceMappingURL=ActionButton.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAmBM,MAAM,0DAAe,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,aAAa,KAAgC,EAAE,GAAoC;IACvI,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,sCAAW,EAAE,OAAO;IAC5B,IAAI,YAAY,CAAA,GAAA,sCAAW,EAAE;QAAC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;IAA8B,GAAG;IAEpG,IAAI,WACF,OAAO,cACP,UAAU,eACV,WAAW,YACX,QAAQ,aACR,SAAS,kBACT,uBAAuB;IACvB,cAAc,kBACd,uBAAuB;IACvB,cAAc,EACd,GAAG,YACJ,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,eAAC,WAAW,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,gCAAQ,EAAE,OAAO;IAChD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,aAAa,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,sCAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,0DAAC,CAAA,GAAA,+BAAQ;QAAE,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAAe,WAAW;qBACtE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,WAAW;QACvC,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,yBACA;YACE,gCAAgC;YAChC,sCAAsC,CAAC,CAAC;YACxC,sCAAsC,gBAAgB;YACtD,sCAAsC,gBAAgB;YACtD,aAAa;YACb,eAAe;YACf,cAAc;QAChB,GACA,WAAW,SAAS;OAGvB,gCACC,0DAAC,CAAA,GAAA,8DAAa;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBAEvD,0DAAC,CAAA,GAAA,oCAAS,uBACR,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBACJ,MAAM;gBACN,kBAAkB,CAAA,GAAA,oCAAS,EACzB,CAAA,GAAA,mDAAK,GACL,iBACA;oBACE,iCAAiC;gBACnC;YAEJ;YACA,MAAM;gBACJ,GAAG,SAAS;YACd;QACF;OACC,OAAO,aAAa,YAAY,2BAC7B,0DAAC,CAAA,GAAA,6BAAG,SAAG,YACP;AAMhB","sources":["packages/@react-spectrum/button/src/ActionButton.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, ClearSlots, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport CornerTriangle from '@spectrum-icons/ui/CornerTriangle';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nexport const ActionButton = React.forwardRef(function ActionButton(props: SpectrumActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionButton');\n let textProps = useSlotProps({UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')}, 'text');\n\n let {\n isQuiet,\n isDisabled,\n staticColor,\n children,\n autoFocus,\n // @ts-ignore (private)\n holdAffordance,\n // @ts-ignore (private)\n hideButtonText,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {holdAffordance &&\n <CornerTriangle UNSAFE_className={classNames(styles, 'spectrum-ActionButton-hold')} />\n }\n <ClearSlots>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Icon',\n {\n 'spectrum-ActionGroup-itemIcon': hideButtonText\n }\n )\n },\n text: {\n ...textProps\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </ClearSlots>\n </button>\n </FocusRing>\n );\n});\n"],"names":[],"version":3,"file":"ActionButton.main.js.map"}
|
package/dist/ActionButton.mjs
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import "./button.c18453ac.css";
|
|
2
|
-
import $kfV1G$button_vars_cssmodulejs from "./button_vars_css.mjs";
|
|
3
|
-
import {useSlotProps as $kfV1G$useSlotProps, classNames as $kfV1G$classNames, useFocusableRef as $kfV1G$useFocusableRef, useStyleProps as $kfV1G$useStyleProps, ClearSlots as $kfV1G$ClearSlots, SlotProvider as $kfV1G$SlotProvider} from "@react-spectrum/utils";
|
|
4
|
-
import $kfV1G$spectrumiconsuiCornerTriangle from "@spectrum-icons/ui/CornerTriangle";
|
|
5
|
-
import {FocusRing as $kfV1G$FocusRing} from "@react-aria/focus";
|
|
6
|
-
import {mergeProps as $kfV1G$mergeProps} from "@react-aria/utils";
|
|
7
|
-
import $kfV1G$react from "react";
|
|
8
|
-
import {Text as $kfV1G$Text} from "@react-spectrum/text";
|
|
9
|
-
import {useButton as $kfV1G$useButton} from "@react-aria/button";
|
|
10
|
-
import {useHover as $kfV1G$useHover} from "@react-aria/interactions";
|
|
11
|
-
import {useProviderProps as $kfV1G$useProviderProps} from "@react-spectrum/provider";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function $parcel$interopDefault(a) {
|
|
15
|
-
return a && a.__esModule ? a.default : a;
|
|
16
|
-
}
|
|
17
|
-
/*
|
|
18
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
19
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
*
|
|
23
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
-
* governing permissions and limitations under the License.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const $042ad0b3a4a55b33$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $kfV1G$react).forwardRef(function ActionButton(props, ref) {
|
|
38
|
-
props = (0, $kfV1G$useProviderProps)(props);
|
|
39
|
-
props = (0, $kfV1G$useSlotProps)(props, 'actionButton');
|
|
40
|
-
let textProps = (0, $kfV1G$useSlotProps)({
|
|
41
|
-
UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-label')
|
|
42
|
-
}, 'text');
|
|
43
|
-
let { isQuiet: isQuiet, isDisabled: isDisabled, staticColor: staticColor, children: children, autoFocus: autoFocus, holdAffordance: // @ts-ignore (private)
|
|
44
|
-
holdAffordance, hideButtonText: // @ts-ignore (private)
|
|
45
|
-
hideButtonText, ...otherProps } = props;
|
|
46
|
-
let domRef = (0, $kfV1G$useFocusableRef)(ref);
|
|
47
|
-
let { buttonProps: buttonProps, isPressed: isPressed } = (0, $kfV1G$useButton)(props, domRef);
|
|
48
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $kfV1G$useHover)({
|
|
49
|
-
isDisabled: isDisabled
|
|
50
|
-
});
|
|
51
|
-
let { styleProps: styleProps } = (0, $kfV1G$useStyleProps)(otherProps);
|
|
52
|
-
let isTextOnly = (0, $kfV1G$react).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, $kfV1G$react).isValidElement(c));
|
|
53
|
-
return /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$FocusRing), {
|
|
54
|
-
focusRingClass: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'focus-ring'),
|
|
55
|
-
autoFocus: autoFocus
|
|
56
|
-
}, /*#__PURE__*/ (0, $kfV1G$react).createElement("button", {
|
|
57
|
-
...styleProps,
|
|
58
|
-
...(0, $kfV1G$mergeProps)(buttonProps, hoverProps),
|
|
59
|
-
ref: domRef,
|
|
60
|
-
className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton', {
|
|
61
|
-
'spectrum-ActionButton--quiet': isQuiet,
|
|
62
|
-
'spectrum-ActionButton--staticColor': !!staticColor,
|
|
63
|
-
'spectrum-ActionButton--staticWhite': staticColor === 'white',
|
|
64
|
-
'spectrum-ActionButton--staticBlack': staticColor === 'black',
|
|
65
|
-
'is-active': isPressed,
|
|
66
|
-
'is-disabled': isDisabled,
|
|
67
|
-
'is-hovered': isHovered
|
|
68
|
-
}, styleProps.className)
|
|
69
|
-
}, holdAffordance && /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$spectrumiconsuiCornerTriangle), {
|
|
70
|
-
UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-hold')
|
|
71
|
-
}), /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$ClearSlots), null, /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$SlotProvider), {
|
|
72
|
-
slots: {
|
|
73
|
-
icon: {
|
|
74
|
-
size: 'S',
|
|
75
|
-
UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-Icon', {
|
|
76
|
-
'spectrum-ActionGroup-itemIcon': hideButtonText
|
|
77
|
-
})
|
|
78
|
-
},
|
|
79
|
-
text: {
|
|
80
|
-
...textProps
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$Text), null, children) : children))));
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
export {$042ad0b3a4a55b33$export$cfc7921d29ef7b80 as ActionButton};
|
|
88
|
-
//# sourceMappingURL=ActionButton.module.js.map
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import "./button.c18453ac.css";
|
|
2
|
-
import $kfV1G$button_vars_cssmodulejs from "./button_vars_css.module.js";
|
|
3
|
-
import {useSlotProps as $kfV1G$useSlotProps, classNames as $kfV1G$classNames, useFocusableRef as $kfV1G$useFocusableRef, useStyleProps as $kfV1G$useStyleProps, ClearSlots as $kfV1G$ClearSlots, SlotProvider as $kfV1G$SlotProvider} from "@react-spectrum/utils";
|
|
4
|
-
import $kfV1G$spectrumiconsuiCornerTriangle from "@spectrum-icons/ui/CornerTriangle";
|
|
5
|
-
import {FocusRing as $kfV1G$FocusRing} from "@react-aria/focus";
|
|
6
|
-
import {mergeProps as $kfV1G$mergeProps} from "@react-aria/utils";
|
|
7
|
-
import $kfV1G$react from "react";
|
|
8
|
-
import {Text as $kfV1G$Text} from "@react-spectrum/text";
|
|
9
|
-
import {useButton as $kfV1G$useButton} from "@react-aria/button";
|
|
10
|
-
import {useHover as $kfV1G$useHover} from "@react-aria/interactions";
|
|
11
|
-
import {useProviderProps as $kfV1G$useProviderProps} from "@react-spectrum/provider";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function $parcel$interopDefault(a) {
|
|
15
|
-
return a && a.__esModule ? a.default : a;
|
|
16
|
-
}
|
|
17
|
-
/*
|
|
18
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
19
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
*
|
|
23
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
-
* governing permissions and limitations under the License.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const $042ad0b3a4a55b33$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $kfV1G$react).forwardRef(function ActionButton(props, ref) {
|
|
38
|
-
props = (0, $kfV1G$useProviderProps)(props);
|
|
39
|
-
props = (0, $kfV1G$useSlotProps)(props, 'actionButton');
|
|
40
|
-
let textProps = (0, $kfV1G$useSlotProps)({
|
|
41
|
-
UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-label')
|
|
42
|
-
}, 'text');
|
|
43
|
-
let { isQuiet: isQuiet, isDisabled: isDisabled, staticColor: staticColor, children: children, autoFocus: autoFocus, holdAffordance: // @ts-ignore (private)
|
|
44
|
-
holdAffordance, hideButtonText: // @ts-ignore (private)
|
|
45
|
-
hideButtonText, ...otherProps } = props;
|
|
46
|
-
let domRef = (0, $kfV1G$useFocusableRef)(ref);
|
|
47
|
-
let { buttonProps: buttonProps, isPressed: isPressed } = (0, $kfV1G$useButton)(props, domRef);
|
|
48
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $kfV1G$useHover)({
|
|
49
|
-
isDisabled: isDisabled
|
|
50
|
-
});
|
|
51
|
-
let { styleProps: styleProps } = (0, $kfV1G$useStyleProps)(otherProps);
|
|
52
|
-
let isTextOnly = (0, $kfV1G$react).Children.toArray(props.children).every((c)=>!/*#__PURE__*/ (0, $kfV1G$react).isValidElement(c));
|
|
53
|
-
return /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$FocusRing), {
|
|
54
|
-
focusRingClass: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'focus-ring'),
|
|
55
|
-
autoFocus: autoFocus
|
|
56
|
-
}, /*#__PURE__*/ (0, $kfV1G$react).createElement("button", {
|
|
57
|
-
...styleProps,
|
|
58
|
-
...(0, $kfV1G$mergeProps)(buttonProps, hoverProps),
|
|
59
|
-
ref: domRef,
|
|
60
|
-
className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton', {
|
|
61
|
-
'spectrum-ActionButton--quiet': isQuiet,
|
|
62
|
-
'spectrum-ActionButton--staticColor': !!staticColor,
|
|
63
|
-
'spectrum-ActionButton--staticWhite': staticColor === 'white',
|
|
64
|
-
'spectrum-ActionButton--staticBlack': staticColor === 'black',
|
|
65
|
-
'is-active': isPressed,
|
|
66
|
-
'is-disabled': isDisabled,
|
|
67
|
-
'is-hovered': isHovered
|
|
68
|
-
}, styleProps.className)
|
|
69
|
-
}, holdAffordance && /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$spectrumiconsuiCornerTriangle), {
|
|
70
|
-
UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-ActionButton-hold')
|
|
71
|
-
}), /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$ClearSlots), null, /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$SlotProvider), {
|
|
72
|
-
slots: {
|
|
73
|
-
icon: {
|
|
74
|
-
size: 'S',
|
|
75
|
-
UNSAFE_className: (0, $kfV1G$classNames)((0, ($parcel$interopDefault($kfV1G$button_vars_cssmodulejs))), 'spectrum-Icon', {
|
|
76
|
-
'spectrum-ActionGroup-itemIcon': hideButtonText
|
|
77
|
-
})
|
|
78
|
-
},
|
|
79
|
-
text: {
|
|
80
|
-
...textProps
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}, typeof children === 'string' || isTextOnly ? /*#__PURE__*/ (0, $kfV1G$react).createElement((0, $kfV1G$Text), null, children) : children))));
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
export {$042ad0b3a4a55b33$export$cfc7921d29ef7b80 as ActionButton};
|
|
88
|
-
//# sourceMappingURL=ActionButton.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAmBM,MAAM,0DAAe,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,aAAa,KAAgC,EAAE,GAAoC;IACvI,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC5B,IAAI,YAAY,CAAA,GAAA,mBAAW,EAAE;QAAC,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,wDAAK,GAAG;IAA8B,GAAG;IAEpG,IAAI,WACF,OAAO,cACP,UAAU,eACV,WAAW,YACX,QAAQ,aACR,SAAS,kBACT,uBAAuB;IACvB,cAAc,kBACd,uBAAuB;IACvB,cAAc,EACd,GAAG,YACJ,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,eAAC,WAAW,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE,OAAO;IAChD,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;oBAAC;IAAU;IAClD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,aAAa,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,YAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,gCAAC,CAAA,GAAA,gBAAQ;QAAE,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,wDAAK,GAAG;QAAe,WAAW;qBACtE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,CAAA,GAAA,iBAAS,EAAE,aAAa,WAAW;QACvC,KAAK;QACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,wDAAK,GACL,yBACA;YACE,gCAAgC;YAChC,sCAAsC,CAAC,CAAC;YACxC,sCAAsC,gBAAgB;YACtD,sCAAsC,gBAAgB;YACtD,aAAa;YACb,eAAe;YACf,cAAc;QAChB,GACA,WAAW,SAAS;OAGvB,gCACC,gCAAC,CAAA,GAAA,oCAAa;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,wDAAK,GAAG;sBAEvD,gCAAC,CAAA,GAAA,iBAAS,uBACR,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,MAAM;gBACJ,MAAM;gBACN,kBAAkB,CAAA,GAAA,iBAAS,EACzB,CAAA,GAAA,wDAAK,GACL,iBACA;oBACE,iCAAiC;gBACnC;YAEJ;YACA,MAAM;gBACJ,GAAG,SAAS;YACd;QACF;OACC,OAAO,aAAa,YAAY,2BAC7B,gCAAC,CAAA,GAAA,WAAG,SAAG,YACP;AAMhB","sources":["packages/@react-spectrum/button/src/ActionButton.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, ClearSlots, SlotProvider, useFocusableRef, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport CornerTriangle from '@spectrum-icons/ui/CornerTriangle';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React from 'react';\nimport {SpectrumActionButtonProps} from '@react-types/button';\nimport styles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nexport const ActionButton = React.forwardRef(function ActionButton(props: SpectrumActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n props = useProviderProps(props);\n props = useSlotProps(props, 'actionButton');\n let textProps = useSlotProps({UNSAFE_className: classNames(styles, 'spectrum-ActionButton-label')}, 'text');\n\n let {\n isQuiet,\n isDisabled,\n staticColor,\n children,\n autoFocus,\n // @ts-ignore (private)\n holdAffordance,\n // @ts-ignore (private)\n hideButtonText,\n ...otherProps\n } = props;\n\n let domRef = useFocusableRef(ref);\n let {buttonProps, isPressed} = useButton(props, domRef);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {styleProps} = useStyleProps(otherProps);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <button\n {...styleProps}\n {...mergeProps(buttonProps, hoverProps)}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-ActionButton',\n {\n 'spectrum-ActionButton--quiet': isQuiet,\n 'spectrum-ActionButton--staticColor': !!staticColor,\n 'spectrum-ActionButton--staticWhite': staticColor === 'white',\n 'spectrum-ActionButton--staticBlack': staticColor === 'black',\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n {holdAffordance &&\n <CornerTriangle UNSAFE_className={classNames(styles, 'spectrum-ActionButton-hold')} />\n }\n <ClearSlots>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(\n styles,\n 'spectrum-Icon',\n {\n 'spectrum-ActionGroup-itemIcon': hideButtonText\n }\n )\n },\n text: {\n ...textProps\n }\n }}>\n {typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children}\n </SlotProvider>\n </ClearSlots>\n </button>\n </FocusRing>\n );\n});\n"],"names":[],"version":3,"file":"ActionButton.module.js.map"}
|