@react-spectrum/tag 3.3.9 → 3.4.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 +3 -3
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -3
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +3 -0
- package/package.json +14 -39
- package/src/index.ts +4 -3
- package/dist/Tag.main.js +0 -95
- package/dist/Tag.main.js.map +0 -1
- package/dist/Tag.mjs +0 -90
- package/dist/Tag.module.js +0 -90
- package/dist/Tag.module.js.map +0 -1
- package/dist/TagGroup.main.js +0 -269
- package/dist/TagGroup.main.js.map +0 -1
- package/dist/TagGroup.mjs +0 -264
- package/dist/TagGroup.module.js +0 -264
- package/dist/TagGroup.module.js.map +0 -1
- package/dist/ar-AE.main.js +0 -9
- package/dist/ar-AE.main.js.map +0 -1
- package/dist/ar-AE.mjs +0 -11
- package/dist/ar-AE.module.js +0 -11
- package/dist/ar-AE.module.js.map +0 -1
- package/dist/bg-BG.main.js +0 -9
- package/dist/bg-BG.main.js.map +0 -1
- package/dist/bg-BG.mjs +0 -11
- package/dist/bg-BG.module.js +0 -11
- package/dist/bg-BG.module.js.map +0 -1
- package/dist/cs-CZ.main.js +0 -9
- package/dist/cs-CZ.main.js.map +0 -1
- package/dist/cs-CZ.mjs +0 -11
- package/dist/cs-CZ.module.js +0 -11
- package/dist/cs-CZ.module.js.map +0 -1
- package/dist/da-DK.main.js +0 -9
- package/dist/da-DK.main.js.map +0 -1
- package/dist/da-DK.mjs +0 -11
- package/dist/da-DK.module.js +0 -11
- package/dist/da-DK.module.js.map +0 -1
- package/dist/de-DE.main.js +0 -9
- package/dist/de-DE.main.js.map +0 -1
- package/dist/de-DE.mjs +0 -11
- package/dist/de-DE.module.js +0 -11
- package/dist/de-DE.module.js.map +0 -1
- package/dist/el-GR.main.js +0 -9
- package/dist/el-GR.main.js.map +0 -1
- package/dist/el-GR.mjs +0 -11
- package/dist/el-GR.module.js +0 -11
- package/dist/el-GR.module.js.map +0 -1
- package/dist/en-US.main.js +0 -9
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -11
- package/dist/en-US.module.js +0 -11
- package/dist/en-US.module.js.map +0 -1
- package/dist/es-ES.main.js +0 -9
- package/dist/es-ES.main.js.map +0 -1
- package/dist/es-ES.mjs +0 -11
- package/dist/es-ES.module.js +0 -11
- package/dist/es-ES.module.js.map +0 -1
- package/dist/et-EE.main.js +0 -9
- package/dist/et-EE.main.js.map +0 -1
- package/dist/et-EE.mjs +0 -11
- package/dist/et-EE.module.js +0 -11
- package/dist/et-EE.module.js.map +0 -1
- package/dist/fi-FI.main.js +0 -9
- package/dist/fi-FI.main.js.map +0 -1
- package/dist/fi-FI.mjs +0 -11
- package/dist/fi-FI.module.js +0 -11
- package/dist/fi-FI.module.js.map +0 -1
- package/dist/fr-FR.main.js +0 -9
- package/dist/fr-FR.main.js.map +0 -1
- package/dist/fr-FR.mjs +0 -11
- package/dist/fr-FR.module.js +0 -11
- package/dist/fr-FR.module.js.map +0 -1
- package/dist/he-IL.main.js +0 -9
- package/dist/he-IL.main.js.map +0 -1
- package/dist/he-IL.mjs +0 -11
- package/dist/he-IL.module.js +0 -11
- package/dist/he-IL.module.js.map +0 -1
- package/dist/hr-HR.main.js +0 -9
- package/dist/hr-HR.main.js.map +0 -1
- package/dist/hr-HR.mjs +0 -11
- package/dist/hr-HR.module.js +0 -11
- package/dist/hr-HR.module.js.map +0 -1
- package/dist/hu-HU.main.js +0 -9
- package/dist/hu-HU.main.js.map +0 -1
- package/dist/hu-HU.mjs +0 -11
- package/dist/hu-HU.module.js +0 -11
- 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 -9
- package/dist/it-IT.main.js.map +0 -1
- package/dist/it-IT.mjs +0 -11
- package/dist/it-IT.module.js +0 -11
- package/dist/it-IT.module.js.map +0 -1
- package/dist/ja-JP.main.js +0 -9
- package/dist/ja-JP.main.js.map +0 -1
- package/dist/ja-JP.mjs +0 -11
- package/dist/ja-JP.module.js +0 -11
- package/dist/ja-JP.module.js.map +0 -1
- package/dist/ko-KR.main.js +0 -9
- package/dist/ko-KR.main.js.map +0 -1
- package/dist/ko-KR.mjs +0 -11
- package/dist/ko-KR.module.js +0 -11
- package/dist/ko-KR.module.js.map +0 -1
- package/dist/lt-LT.main.js +0 -9
- package/dist/lt-LT.main.js.map +0 -1
- package/dist/lt-LT.mjs +0 -11
- package/dist/lt-LT.module.js +0 -11
- package/dist/lt-LT.module.js.map +0 -1
- package/dist/lv-LV.main.js +0 -9
- package/dist/lv-LV.main.js.map +0 -1
- package/dist/lv-LV.mjs +0 -11
- package/dist/lv-LV.module.js +0 -11
- package/dist/lv-LV.module.js.map +0 -1
- package/dist/nb-NO.main.js +0 -9
- package/dist/nb-NO.main.js.map +0 -1
- package/dist/nb-NO.mjs +0 -11
- package/dist/nb-NO.module.js +0 -11
- package/dist/nb-NO.module.js.map +0 -1
- package/dist/nl-NL.main.js +0 -9
- package/dist/nl-NL.main.js.map +0 -1
- package/dist/nl-NL.mjs +0 -11
- package/dist/nl-NL.module.js +0 -11
- package/dist/nl-NL.module.js.map +0 -1
- package/dist/pl-PL.main.js +0 -9
- package/dist/pl-PL.main.js.map +0 -1
- package/dist/pl-PL.mjs +0 -11
- package/dist/pl-PL.module.js +0 -11
- package/dist/pl-PL.module.js.map +0 -1
- package/dist/pt-BR.main.js +0 -9
- package/dist/pt-BR.main.js.map +0 -1
- package/dist/pt-BR.mjs +0 -11
- package/dist/pt-BR.module.js +0 -11
- package/dist/pt-BR.module.js.map +0 -1
- package/dist/pt-PT.main.js +0 -9
- package/dist/pt-PT.main.js.map +0 -1
- package/dist/pt-PT.mjs +0 -11
- package/dist/pt-PT.module.js +0 -11
- package/dist/pt-PT.module.js.map +0 -1
- package/dist/ro-RO.main.js +0 -9
- package/dist/ro-RO.main.js.map +0 -1
- package/dist/ro-RO.mjs +0 -11
- package/dist/ro-RO.module.js +0 -11
- package/dist/ro-RO.module.js.map +0 -1
- package/dist/ru-RU.main.js +0 -9
- package/dist/ru-RU.main.js.map +0 -1
- package/dist/ru-RU.mjs +0 -11
- package/dist/ru-RU.module.js +0 -11
- package/dist/ru-RU.module.js.map +0 -1
- package/dist/sk-SK.main.js +0 -9
- package/dist/sk-SK.main.js.map +0 -1
- package/dist/sk-SK.mjs +0 -11
- package/dist/sk-SK.module.js +0 -11
- package/dist/sk-SK.module.js.map +0 -1
- package/dist/sl-SI.main.js +0 -9
- package/dist/sl-SI.main.js.map +0 -1
- package/dist/sl-SI.mjs +0 -11
- package/dist/sl-SI.module.js +0 -11
- package/dist/sl-SI.module.js.map +0 -1
- package/dist/sr-SP.main.js +0 -9
- package/dist/sr-SP.main.js.map +0 -1
- package/dist/sr-SP.mjs +0 -11
- package/dist/sr-SP.module.js +0 -11
- package/dist/sr-SP.module.js.map +0 -1
- package/dist/sv-SE.main.js +0 -9
- package/dist/sv-SE.main.js.map +0 -1
- package/dist/sv-SE.mjs +0 -11
- package/dist/sv-SE.module.js +0 -11
- package/dist/sv-SE.module.js.map +0 -1
- package/dist/tag.9dd3cf2c.css +0 -270
- package/dist/tag.9dd3cf2c.css.map +0 -1
- package/dist/tags_vars_css.main.js +0 -86
- package/dist/tags_vars_css.main.js.map +0 -1
- package/dist/tags_vars_css.mjs +0 -88
- package/dist/tags_vars_css.module.js +0 -88
- package/dist/tags_vars_css.module.js.map +0 -1
- package/dist/tr-TR.main.js +0 -9
- package/dist/tr-TR.main.js.map +0 -1
- package/dist/tr-TR.mjs +0 -11
- package/dist/tr-TR.module.js +0 -11
- package/dist/tr-TR.module.js.map +0 -1
- package/dist/types.d.ts +0 -20
- package/dist/types.d.ts.map +0 -1
- package/dist/uk-UA.main.js +0 -9
- package/dist/uk-UA.main.js.map +0 -1
- package/dist/uk-UA.mjs +0 -11
- package/dist/uk-UA.module.js +0 -11
- package/dist/uk-UA.module.js.map +0 -1
- package/dist/zh-CN.main.js +0 -9
- package/dist/zh-CN.main.js.map +0 -1
- package/dist/zh-CN.mjs +0 -11
- package/dist/zh-CN.module.js +0 -11
- package/dist/zh-CN.module.js.map +0 -1
- package/dist/zh-TW.main.js +0 -9
- package/dist/zh-TW.main.js.map +0 -1
- package/dist/zh-TW.mjs +0 -11
- package/dist/zh-TW.module.js +0 -11
- package/dist/zh-TW.module.js.map +0 -1
- package/src/Tag.tsx +0 -87
- package/src/TagGroup.tsx +0 -278
package/dist/import.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {TagGroup as $
|
|
2
|
-
import {Item as $
|
|
1
|
+
import {TagGroup as $423f8fcf23477fa1$re_export$TagGroup} from "@adobe/react-spectrum/TagGroup";
|
|
2
|
+
import {Item as $423f8fcf23477fa1$re_export$Item} from "react-stately/Item";
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -15,5 +15,5 @@ import {Item as $c14698d57a91452e$re_export$Item} from "@react-stately/collectio
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
export {$
|
|
18
|
+
export {$423f8fcf23477fa1$re_export$TagGroup as TagGroup, $423f8fcf23477fa1$re_export$Item as Item};
|
|
19
19
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
1
|
+
var $76Dju$adobereactspectrumTagGroup = require("@adobe/react-spectrum/TagGroup");
|
|
2
|
+
var $76Dju$reactstatelyItem = require("react-stately/Item");
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
6
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
$parcel$export(module.exports, "TagGroup", ()
|
|
10
|
-
$parcel$export(module.exports, "Item", ()
|
|
9
|
+
$parcel$export(module.exports, "TagGroup", function () { return $76Dju$adobereactspectrumTagGroup.TagGroup; });
|
|
10
|
+
$parcel$export(module.exports, "Item", function () { return $76Dju$reactstatelyItem.Item; });
|
|
11
11
|
/*
|
|
12
12
|
* Copyright 2020 Adobe. All rights reserved.
|
|
13
13
|
* 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","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from '@adobe/react-spectrum/TagGroup';\n\nexport type {SpectrumTagGroupProps} from '@adobe/react-spectrum/TagGroup';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {TagGroup as $
|
|
2
|
-
import {Item as $
|
|
1
|
+
import {TagGroup as $423f8fcf23477fa1$re_export$TagGroup} from "@adobe/react-spectrum/TagGroup";
|
|
2
|
+
import {Item as $423f8fcf23477fa1$re_export$Item} from "react-stately/Item";
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -15,5 +15,5 @@ import {Item as $c14698d57a91452e$re_export$Item} from "@react-stately/collectio
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
export {$
|
|
18
|
+
export {$423f8fcf23477fa1$re_export$TagGroup as TagGroup, $423f8fcf23477fa1$re_export$Item as Item};
|
|
19
19
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from '
|
|
1
|
+
{"mappings":";;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from '@adobe/react-spectrum/TagGroup';\n\nexport type {SpectrumTagGroupProps} from '@adobe/react-spectrum/TagGroup';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/tag",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.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,23 @@
|
|
|
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
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"@react-aria/selection": "^3.27.1",
|
|
47
|
-
"@react-aria/tag": "^3.8.0",
|
|
48
|
-
"@react-aria/utils": "^3.33.0",
|
|
49
|
-
"@react-spectrum/button": "^3.17.6",
|
|
50
|
-
"@react-spectrum/form": "^3.7.21",
|
|
51
|
-
"@react-spectrum/label": "^3.16.21",
|
|
52
|
-
"@react-spectrum/text": "^3.5.24",
|
|
53
|
-
"@react-spectrum/utils": "^3.12.11",
|
|
54
|
-
"@react-stately/collections": "^3.12.9",
|
|
55
|
-
"@react-stately/list": "^3.13.3",
|
|
56
|
-
"@react-types/shared": "^3.33.0",
|
|
57
|
-
"@swc/helpers": "^0.5.0"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
35
|
+
"@swc/helpers": "^0.5.0",
|
|
36
|
+
"react-stately": "3.46.0"
|
|
61
37
|
},
|
|
62
38
|
"peerDependencies": {
|
|
63
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
64
39
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
65
40
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
66
41
|
},
|
|
67
42
|
"publishConfig": {
|
|
68
43
|
"access": "public"
|
|
69
44
|
},
|
|
70
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
71
46
|
}
|
package/src/index.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
export {TagGroup} from '
|
|
14
|
-
|
|
15
|
-
export type {SpectrumTagGroupProps} from '
|
|
13
|
+
export {TagGroup} from '@adobe/react-spectrum/TagGroup';
|
|
14
|
+
|
|
15
|
+
export type {SpectrumTagGroupProps} from '@adobe/react-spectrum/TagGroup';
|
|
16
|
+
export {Item} from 'react-stately/Item';
|
package/dist/Tag.main.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
require("./tag.9dd3cf2c.css");
|
|
2
|
-
var $ed889f8f1f091fc8$exports = require("./tags_vars_css.main.js");
|
|
3
|
-
var $hZPqg$reactariatag = require("@react-aria/tag");
|
|
4
|
-
var $hZPqg$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
-
var $hZPqg$reactspectrumbutton = require("@react-spectrum/button");
|
|
6
|
-
var $hZPqg$reactariautils = require("@react-aria/utils");
|
|
7
|
-
var $hZPqg$react = require("react");
|
|
8
|
-
var $hZPqg$reactspectrumtext = require("@react-spectrum/text");
|
|
9
|
-
var $hZPqg$reactariafocus = require("@react-aria/focus");
|
|
10
|
-
var $hZPqg$reactariainteractions = require("@react-aria/interactions");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function $parcel$export(e, n, v, s) {
|
|
18
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
$parcel$export(module.exports, "Tag", () => $dd2c5d00108c1840$export$3288d34c523a1192);
|
|
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
|
-
function $dd2c5d00108c1840$export$3288d34c523a1192(props) {
|
|
42
|
-
const { item: item, state: state, ...otherProps } = props;
|
|
43
|
-
// @ts-ignore
|
|
44
|
-
let { styleProps: styleProps } = (0, $hZPqg$reactspectrumutils.useStyleProps)(otherProps);
|
|
45
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $hZPqg$reactariainteractions.useHover)({});
|
|
46
|
-
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $hZPqg$reactariafocus.useFocusRing)({
|
|
47
|
-
within: false
|
|
48
|
-
});
|
|
49
|
-
let ref = (0, $hZPqg$react.useRef)(null);
|
|
50
|
-
let { removeButtonProps: removeButtonProps, gridCellProps: gridCellProps, rowProps: rowProps, allowsRemoving: allowsRemoving } = (0, $hZPqg$reactariatag.useTag)({
|
|
51
|
-
...props,
|
|
52
|
-
item: item
|
|
53
|
-
}, state, ref);
|
|
54
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement("div", {
|
|
55
|
-
...(0, $hZPqg$reactariautils.mergeProps)(rowProps, hoverProps, focusProps),
|
|
56
|
-
className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag', {
|
|
57
|
-
'focus-ring': isFocusVisible,
|
|
58
|
-
'is-focused': isFocused,
|
|
59
|
-
'is-hovered': isHovered,
|
|
60
|
-
'spectrum-Tag--removable': allowsRemoving
|
|
61
|
-
}, styleProps.className),
|
|
62
|
-
ref: ref
|
|
63
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement("div", {
|
|
64
|
-
className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-cell'),
|
|
65
|
-
...gridCellProps
|
|
66
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumutils.SlotProvider), {
|
|
67
|
-
slots: {
|
|
68
|
-
icon: {
|
|
69
|
-
UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-icon'),
|
|
70
|
-
size: 'XS'
|
|
71
|
-
},
|
|
72
|
-
text: {
|
|
73
|
-
UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-content')
|
|
74
|
-
},
|
|
75
|
-
avatar: {
|
|
76
|
-
UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-avatar'),
|
|
77
|
-
size: 'avatar-size-50'
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumtext.Text), null, item.rendered) : item.rendered, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumutils.ClearSlots), null, allowsRemoving && /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement($dd2c5d00108c1840$var$TagRemoveButton, {
|
|
81
|
-
item: item,
|
|
82
|
-
...removeButtonProps,
|
|
83
|
-
UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-removeButton')
|
|
84
|
-
})))));
|
|
85
|
-
}
|
|
86
|
-
function $dd2c5d00108c1840$var$TagRemoveButton(props) {
|
|
87
|
-
let { styleProps: styleProps } = (0, $hZPqg$reactspectrumutils.useStyleProps)(props);
|
|
88
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement("span", styleProps, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumbutton.ClearButton), {
|
|
89
|
-
...props,
|
|
90
|
-
inset: true
|
|
91
|
-
}));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=Tag.main.js.map
|
package/dist/Tag.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAiBM,SAAS,0CAAO,KAA0B;IAC/C,MAAM,QACJ,IAAI,SACJ,KAAK,EACL,GAAG,YACJ,GAAG;IAEJ,aAAa;IACb,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE,CAAC;IACxC,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,kCAAW,EAAE;QAAC,QAAQ;IAAK;IACzE,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,qBAAC,iBAAiB,iBAAE,aAAa,YAAE,QAAQ,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,0BAAK,EAAE;QACxE,GAAG,KAAK;cACR;IACF,GAAG,OAAO;IAEV,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,YAAY,WAAW;QAChD,WAAW,CAAA,GAAA,oCAAS,EAChB,CAAA,GAAA,mDAAK,GACL,gBACF;YACE,cAAc;YACd,cAAc;YACd,cAAc;YACd,2BAA2B;QAC7B,GACE,WAAW,SAAS;QAExB,KAAK;qBACL,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC7B,GAAG,aAAa;qBACjB,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;gBAAsB,MAAM;YAAI;YAC5E,MAAM;gBAAC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;YAAuB;YACnE,QAAQ;gBAAC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;gBAAwB,MAAM;YAAgB;QAC9F;OACC,OAAO,KAAK,QAAQ,KAAK,yBAAW,0DAAC,CAAA,GAAA,6BAAG,SAAG,KAAK,QAAQ,IAAW,KAAK,QAAQ,gBACjF,0DAAC,CAAA,GAAA,oCAAS,SACP,gCAAkB,0DAAC;QAAgB,MAAM;QAAO,GAAG,iBAAiB;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;;AAMxH;AAEA,SAAS,sCAAgB,KAAK;IAC5B,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC,QAAS,0BACR,0DAAC,CAAA,GAAA,sCAAU;QAAG,GAAG,KAAK;QAAE,OAAA;;AAG9B","sources":["packages/@react-spectrum/tag/src/Tag.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 {AriaTagProps, useTag} from '@react-aria/tag';\nimport {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport type {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactNode, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\n\nexport interface SpectrumTagProps<T> extends AriaTagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>): ReactNode {\n const {\n item,\n state,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: false});\n let ref = useRef(null);\n let {removeButtonProps, gridCellProps, rowProps, allowsRemoving} = useTag({\n ...props,\n item\n }, state, ref);\n\n return (\n <div\n {...mergeProps(rowProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tag',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n 'spectrum-Tag--removable': allowsRemoving\n },\n styleProps.className\n )}\n ref={ref}>\n <div\n className={classNames(styles, 'spectrum-Tag-cell')}\n {...gridCellProps}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content')},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}\n }}>\n {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n <ClearSlots>\n {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}\n </ClearSlots>\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n let {styleProps} = useStyleProps(props);\n\n return (\n <span {...styleProps}>\n <ClearButton {...props} inset />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"Tag.main.js.map"}
|
package/dist/Tag.mjs
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import "./tag.9dd3cf2c.css";
|
|
2
|
-
import $X1F04$tags_vars_cssmodulejs from "./tags_vars_css.mjs";
|
|
3
|
-
import {useTag as $X1F04$useTag} from "@react-aria/tag";
|
|
4
|
-
import {useStyleProps as $X1F04$useStyleProps, classNames as $X1F04$classNames, SlotProvider as $X1F04$SlotProvider, ClearSlots as $X1F04$ClearSlots} from "@react-spectrum/utils";
|
|
5
|
-
import {ClearButton as $X1F04$ClearButton} from "@react-spectrum/button";
|
|
6
|
-
import {mergeProps as $X1F04$mergeProps} from "@react-aria/utils";
|
|
7
|
-
import $X1F04$react, {useRef as $X1F04$useRef} from "react";
|
|
8
|
-
import {Text as $X1F04$Text} from "@react-spectrum/text";
|
|
9
|
-
import {useFocusRing as $X1F04$useFocusRing} from "@react-aria/focus";
|
|
10
|
-
import {useHover as $X1F04$useHover} from "@react-aria/interactions";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function $b5f5ee35d3b6b95c$export$3288d34c523a1192(props) {
|
|
36
|
-
const { item: item, state: state, ...otherProps } = props;
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(otherProps);
|
|
39
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $X1F04$useHover)({});
|
|
40
|
-
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $X1F04$useFocusRing)({
|
|
41
|
-
within: false
|
|
42
|
-
});
|
|
43
|
-
let ref = (0, $X1F04$useRef)(null);
|
|
44
|
-
let { removeButtonProps: removeButtonProps, gridCellProps: gridCellProps, rowProps: rowProps, allowsRemoving: allowsRemoving } = (0, $X1F04$useTag)({
|
|
45
|
-
...props,
|
|
46
|
-
item: item
|
|
47
|
-
}, state, ref);
|
|
48
|
-
return /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
|
|
49
|
-
...(0, $X1F04$mergeProps)(rowProps, hoverProps, focusProps),
|
|
50
|
-
className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag', {
|
|
51
|
-
'focus-ring': isFocusVisible,
|
|
52
|
-
'is-focused': isFocused,
|
|
53
|
-
'is-hovered': isHovered,
|
|
54
|
-
'spectrum-Tag--removable': allowsRemoving
|
|
55
|
-
}, styleProps.className),
|
|
56
|
-
ref: ref
|
|
57
|
-
}, /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
|
|
58
|
-
className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-cell'),
|
|
59
|
-
...gridCellProps
|
|
60
|
-
}, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$SlotProvider), {
|
|
61
|
-
slots: {
|
|
62
|
-
icon: {
|
|
63
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-icon'),
|
|
64
|
-
size: 'XS'
|
|
65
|
-
},
|
|
66
|
-
text: {
|
|
67
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-content')
|
|
68
|
-
},
|
|
69
|
-
avatar: {
|
|
70
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-avatar'),
|
|
71
|
-
size: 'avatar-size-50'
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$Text), null, item.rendered) : item.rendered, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearSlots), null, allowsRemoving && /*#__PURE__*/ (0, $X1F04$react).createElement($b5f5ee35d3b6b95c$var$TagRemoveButton, {
|
|
75
|
-
item: item,
|
|
76
|
-
...removeButtonProps,
|
|
77
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-removeButton')
|
|
78
|
-
})))));
|
|
79
|
-
}
|
|
80
|
-
function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
|
|
81
|
-
let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(props);
|
|
82
|
-
return /*#__PURE__*/ (0, $X1F04$react).createElement("span", styleProps, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearButton), {
|
|
83
|
-
...props,
|
|
84
|
-
inset: true
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
export {$b5f5ee35d3b6b95c$export$3288d34c523a1192 as Tag};
|
|
90
|
-
//# sourceMappingURL=Tag.module.js.map
|
package/dist/Tag.module.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import "./tag.9dd3cf2c.css";
|
|
2
|
-
import $X1F04$tags_vars_cssmodulejs from "./tags_vars_css.module.js";
|
|
3
|
-
import {useTag as $X1F04$useTag} from "@react-aria/tag";
|
|
4
|
-
import {useStyleProps as $X1F04$useStyleProps, classNames as $X1F04$classNames, SlotProvider as $X1F04$SlotProvider, ClearSlots as $X1F04$ClearSlots} from "@react-spectrum/utils";
|
|
5
|
-
import {ClearButton as $X1F04$ClearButton} from "@react-spectrum/button";
|
|
6
|
-
import {mergeProps as $X1F04$mergeProps} from "@react-aria/utils";
|
|
7
|
-
import $X1F04$react, {useRef as $X1F04$useRef} from "react";
|
|
8
|
-
import {Text as $X1F04$Text} from "@react-spectrum/text";
|
|
9
|
-
import {useFocusRing as $X1F04$useFocusRing} from "@react-aria/focus";
|
|
10
|
-
import {useHover as $X1F04$useHover} from "@react-aria/interactions";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function $b5f5ee35d3b6b95c$export$3288d34c523a1192(props) {
|
|
36
|
-
const { item: item, state: state, ...otherProps } = props;
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(otherProps);
|
|
39
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $X1F04$useHover)({});
|
|
40
|
-
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $X1F04$useFocusRing)({
|
|
41
|
-
within: false
|
|
42
|
-
});
|
|
43
|
-
let ref = (0, $X1F04$useRef)(null);
|
|
44
|
-
let { removeButtonProps: removeButtonProps, gridCellProps: gridCellProps, rowProps: rowProps, allowsRemoving: allowsRemoving } = (0, $X1F04$useTag)({
|
|
45
|
-
...props,
|
|
46
|
-
item: item
|
|
47
|
-
}, state, ref);
|
|
48
|
-
return /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
|
|
49
|
-
...(0, $X1F04$mergeProps)(rowProps, hoverProps, focusProps),
|
|
50
|
-
className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag', {
|
|
51
|
-
'focus-ring': isFocusVisible,
|
|
52
|
-
'is-focused': isFocused,
|
|
53
|
-
'is-hovered': isHovered,
|
|
54
|
-
'spectrum-Tag--removable': allowsRemoving
|
|
55
|
-
}, styleProps.className),
|
|
56
|
-
ref: ref
|
|
57
|
-
}, /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
|
|
58
|
-
className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-cell'),
|
|
59
|
-
...gridCellProps
|
|
60
|
-
}, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$SlotProvider), {
|
|
61
|
-
slots: {
|
|
62
|
-
icon: {
|
|
63
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-icon'),
|
|
64
|
-
size: 'XS'
|
|
65
|
-
},
|
|
66
|
-
text: {
|
|
67
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-content')
|
|
68
|
-
},
|
|
69
|
-
avatar: {
|
|
70
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-avatar'),
|
|
71
|
-
size: 'avatar-size-50'
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$Text), null, item.rendered) : item.rendered, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearSlots), null, allowsRemoving && /*#__PURE__*/ (0, $X1F04$react).createElement($b5f5ee35d3b6b95c$var$TagRemoveButton, {
|
|
75
|
-
item: item,
|
|
76
|
-
...removeButtonProps,
|
|
77
|
-
UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-removeButton')
|
|
78
|
-
})))));
|
|
79
|
-
}
|
|
80
|
-
function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
|
|
81
|
-
let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(props);
|
|
82
|
-
return /*#__PURE__*/ (0, $X1F04$react).createElement("span", styleProps, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearButton), {
|
|
83
|
-
...props,
|
|
84
|
-
inset: true
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
export {$b5f5ee35d3b6b95c$export$3288d34c523a1192 as Tag};
|
|
90
|
-
//# sourceMappingURL=Tag.module.js.map
|
package/dist/Tag.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAiBM,SAAS,0CAAO,KAA0B;IAC/C,MAAM,QACJ,IAAI,SACJ,KAAK,EACL,GAAG,YACJ,GAAG;IAEJ,aAAa;IACb,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE,CAAC;IACxC,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAAC,QAAQ;IAAK;IACzE,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,qBAAC,iBAAiB,iBAAE,aAAa,YAAE,QAAQ,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,aAAK,EAAE;QACxE,GAAG,KAAK;cACR;IACF,GAAG,OAAO;IAEV,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,YAAY,WAAW;QAChD,WAAW,CAAA,GAAA,iBAAS,EAChB,CAAA,GAAA,sDAAK,GACL,gBACF;YACE,cAAc;YACd,cAAc;YACd,cAAc;YACd,2BAA2B;QAC7B,GACE,WAAW,SAAS;QAExB,KAAK;qBACL,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;QAC7B,GAAG,aAAa;qBACjB,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;gBAAsB,MAAM;YAAI;YAC5E,MAAM;gBAAC,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;YAAuB;YACnE,QAAQ;gBAAC,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;gBAAwB,MAAM;YAAgB;QAC9F;OACC,OAAO,KAAK,QAAQ,KAAK,yBAAW,gCAAC,CAAA,GAAA,WAAG,SAAG,KAAK,QAAQ,IAAW,KAAK,QAAQ,gBACjF,gCAAC,CAAA,GAAA,iBAAS,SACP,gCAAkB,gCAAC;QAAgB,MAAM;QAAO,GAAG,iBAAiB;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;;AAMxH;AAEA,SAAS,sCAAgB,KAAK;IAC5B,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,qBACE,gCAAC,QAAS,0BACR,gCAAC,CAAA,GAAA,kBAAU;QAAG,GAAG,KAAK;QAAE,OAAA;;AAG9B","sources":["packages/@react-spectrum/tag/src/Tag.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 {AriaTagProps, useTag} from '@react-aria/tag';\nimport {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport type {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactNode, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\n\nexport interface SpectrumTagProps<T> extends AriaTagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>): ReactNode {\n const {\n item,\n state,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: false});\n let ref = useRef(null);\n let {removeButtonProps, gridCellProps, rowProps, allowsRemoving} = useTag({\n ...props,\n item\n }, state, ref);\n\n return (\n <div\n {...mergeProps(rowProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tag',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n 'spectrum-Tag--removable': allowsRemoving\n },\n styleProps.className\n )}\n ref={ref}>\n <div\n className={classNames(styles, 'spectrum-Tag-cell')}\n {...gridCellProps}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content')},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}\n }}>\n {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n <ClearSlots>\n {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}\n </ClearSlots>\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n let {styleProps} = useStyleProps(props);\n\n return (\n <span {...styleProps}>\n <ClearButton {...props} inset />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"Tag.module.js.map"}
|