@react-spectrum/tag 3.0.0-nightly.2168 → 3.0.0-nightly.2175
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 +26 -6
- package/dist/main.css +1 -1
- package/dist/main.js +25 -5
- package/dist/main.js.map +1 -1
- package/dist/module.js +26 -6
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/TagGroup.tsx +47 -21
package/dist/import.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {ActionButton as $fUaQ2$ActionButton, ClearButton as $fUaQ2$ClearButton}
|
|
|
4
4
|
import {TagKeyboardDelegate as $fUaQ2$TagKeyboardDelegate, useTagGroup as $fUaQ2$useTagGroup, useTag as $fUaQ2$useTag} from "@react-aria/tag";
|
|
5
5
|
import {useDOMRef as $fUaQ2$useDOMRef, classNames as $fUaQ2$classNames, useStyleProps as $fUaQ2$useStyleProps, SlotProvider as $fUaQ2$SlotProvider, ClearSlots as $fUaQ2$ClearSlots} from "@react-spectrum/utils";
|
|
6
6
|
import {Field as $fUaQ2$Field} from "@react-spectrum/label";
|
|
7
|
-
import {FocusScope as $fUaQ2$FocusScope, useFocusRing as $fUaQ2$useFocusRing} from "@react-aria/focus";
|
|
7
|
+
import {FocusScope as $fUaQ2$FocusScope, FocusRing as $fUaQ2$FocusRing, useFocusRing as $fUaQ2$useFocusRing} from "@react-aria/focus";
|
|
8
8
|
import {useListState as $fUaQ2$useListState, ListCollection as $fUaQ2$ListCollection} from "@react-stately/list";
|
|
9
9
|
import {useProviderProps as $fUaQ2$useProviderProps, Provider as $fUaQ2$Provider} from "@react-spectrum/provider";
|
|
10
10
|
import $fUaQ2$react, {useRef as $fUaQ2$useRef, useState as $fUaQ2$useState, useMemo as $fUaQ2$useMemo, useCallback as $fUaQ2$useCallback, useEffect as $fUaQ2$useEffect} from "react";
|
|
@@ -50,7 +50,8 @@ var $4f97095b36611c9c$exports = {};
|
|
|
50
50
|
$4f97095b36611c9c$exports = {
|
|
51
51
|
"actions": `الإجراءات`,
|
|
52
52
|
"hideButtonLabel": `إظهار أقل`,
|
|
53
|
-
"showAllButtonLabel": (args, formatter)=>`عرض الكل (${formatter.number(args.tagCount)})
|
|
53
|
+
"showAllButtonLabel": (args, formatter)=>`عرض الكل (${formatter.number(args.tagCount)})`,
|
|
54
|
+
"noTags": `None`
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
|
|
@@ -98,7 +99,8 @@ var $edf02907a7caaf96$exports = {};
|
|
|
98
99
|
$edf02907a7caaf96$exports = {
|
|
99
100
|
"showAllButtonLabel": (args, formatter)=>`Show all (${formatter.number(args.tagCount)})`,
|
|
100
101
|
"hideButtonLabel": `Show less`,
|
|
101
|
-
"actions": `Actions
|
|
102
|
+
"actions": `Actions`,
|
|
103
|
+
"noTags": `None`
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
|
|
@@ -365,6 +367,7 @@ $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag", () => $c033a7c057e84ef
|
|
|
365
367
|
$parcel$export($c033a7c057e84ef1$exports, "focus-ring", () => $c033a7c057e84ef1$export$f39a09f249340e2a, (v) => $c033a7c057e84ef1$export$f39a09f249340e2a = v);
|
|
366
368
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags", () => $c033a7c057e84ef1$export$eb7e80013a1212da, (v) => $c033a7c057e84ef1$export$eb7e80013a1212da = v);
|
|
367
369
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-container", () => $c033a7c057e84ef1$export$3300169c5d27fe96, (v) => $c033a7c057e84ef1$export$3300169c5d27fe96 = v);
|
|
370
|
+
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-container--empty", () => $c033a7c057e84ef1$export$a5e59d283417e02b, (v) => $c033a7c057e84ef1$export$a5e59d283417e02b = v);
|
|
368
371
|
$parcel$export($c033a7c057e84ef1$exports, "is-disabled", () => $c033a7c057e84ef1$export$d35bc1e505d1ebbf, (v) => $c033a7c057e84ef1$export$d35bc1e505d1ebbf = v);
|
|
369
372
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag-removeButton", () => $c033a7c057e84ef1$export$23a76b996f0a6c1, (v) => $c033a7c057e84ef1$export$23a76b996f0a6c1 = v);
|
|
370
373
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag-cell", () => $c033a7c057e84ef1$export$9c4fd4d7faada408, (v) => $c033a7c057e84ef1$export$9c4fd4d7faada408 = v);
|
|
@@ -376,12 +379,14 @@ $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-actions", () => $c033a7
|
|
|
376
379
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-actionButton", () => $c033a7c057e84ef1$export$e6882f8db018e3bd, (v) => $c033a7c057e84ef1$export$e6882f8db018e3bd = v);
|
|
377
380
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-fieldWrapper", () => $c033a7c057e84ef1$export$c9b7ca327d69b2b5, (v) => $c033a7c057e84ef1$export$c9b7ca327d69b2b5 = v);
|
|
378
381
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-fieldWrapper--positionSide", () => $c033a7c057e84ef1$export$a7c11d4acc244e09, (v) => $c033a7c057e84ef1$export$a7c11d4acc244e09 = v);
|
|
382
|
+
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-empty-state", () => $c033a7c057e84ef1$export$cd48f925394bb16, (v) => $c033a7c057e84ef1$export$cd48f925394bb16 = v);
|
|
379
383
|
$parcel$export($c033a7c057e84ef1$exports, "is-hovered", () => $c033a7c057e84ef1$export$b8813cd5d7824ce7, (v) => $c033a7c057e84ef1$export$b8813cd5d7824ce7 = v);
|
|
380
384
|
$parcel$export($c033a7c057e84ef1$exports, "is-focused", () => $c033a7c057e84ef1$export$e7dc768d35940237, (v) => $c033a7c057e84ef1$export$e7dc768d35940237 = v);
|
|
381
385
|
var $c033a7c057e84ef1$export$6174bd1d20b4c022;
|
|
382
386
|
var $c033a7c057e84ef1$export$f39a09f249340e2a;
|
|
383
387
|
var $c033a7c057e84ef1$export$eb7e80013a1212da;
|
|
384
388
|
var $c033a7c057e84ef1$export$3300169c5d27fe96;
|
|
389
|
+
var $c033a7c057e84ef1$export$a5e59d283417e02b;
|
|
385
390
|
var $c033a7c057e84ef1$export$d35bc1e505d1ebbf;
|
|
386
391
|
var $c033a7c057e84ef1$export$23a76b996f0a6c1;
|
|
387
392
|
var $c033a7c057e84ef1$export$9c4fd4d7faada408;
|
|
@@ -393,12 +398,14 @@ var $c033a7c057e84ef1$export$8afaa02110915bbb;
|
|
|
393
398
|
var $c033a7c057e84ef1$export$e6882f8db018e3bd;
|
|
394
399
|
var $c033a7c057e84ef1$export$c9b7ca327d69b2b5;
|
|
395
400
|
var $c033a7c057e84ef1$export$a7c11d4acc244e09;
|
|
401
|
+
var $c033a7c057e84ef1$export$cd48f925394bb16;
|
|
396
402
|
var $c033a7c057e84ef1$export$b8813cd5d7824ce7;
|
|
397
403
|
var $c033a7c057e84ef1$export$e7dc768d35940237;
|
|
398
404
|
$c033a7c057e84ef1$export$6174bd1d20b4c022 = "spectrum-Tag_8407eb";
|
|
399
405
|
$c033a7c057e84ef1$export$f39a09f249340e2a = "focus-ring_8407eb";
|
|
400
406
|
$c033a7c057e84ef1$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
|
|
401
407
|
$c033a7c057e84ef1$export$3300169c5d27fe96 = "spectrum-Tags-container_8407eb";
|
|
408
|
+
$c033a7c057e84ef1$export$a5e59d283417e02b = "spectrum-Tags-container--empty_8407eb";
|
|
402
409
|
$c033a7c057e84ef1$export$d35bc1e505d1ebbf = "is-disabled_8407eb";
|
|
403
410
|
$c033a7c057e84ef1$export$23a76b996f0a6c1 = "spectrum-Tag-removeButton_8407eb";
|
|
404
411
|
$c033a7c057e84ef1$export$9c4fd4d7faada408 = "spectrum-Tag-cell_8407eb";
|
|
@@ -410,6 +417,7 @@ $c033a7c057e84ef1$export$8afaa02110915bbb = "spectrum-Tags-actions_8407eb";
|
|
|
410
417
|
$c033a7c057e84ef1$export$e6882f8db018e3bd = "spectrum-Tags-actionButton_8407eb";
|
|
411
418
|
$c033a7c057e84ef1$export$c9b7ca327d69b2b5 = "spectrum-Tags-fieldWrapper_8407eb";
|
|
412
419
|
$c033a7c057e84ef1$export$a7c11d4acc244e09 = "spectrum-Tags-fieldWrapper--positionSide_8407eb";
|
|
420
|
+
$c033a7c057e84ef1$export$cd48f925394bb16 = "spectrum-Tags-empty-state_8407eb";
|
|
413
421
|
$c033a7c057e84ef1$export$b8813cd5d7824ce7 = "is-hovered_8407eb";
|
|
414
422
|
$c033a7c057e84ef1$export$e7dc768d35940237 = "is-focused_8407eb";
|
|
415
423
|
|
|
@@ -493,7 +501,7 @@ function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
|
|
|
493
501
|
function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
494
502
|
props = (0, $fUaQ2$useProviderProps)(props);
|
|
495
503
|
props = (0, $fUaQ2$useFormProps)(props);
|
|
496
|
-
let { allowsRemoving: allowsRemoving , onRemove: onRemove , maxRows: maxRows , children: children , actionLabel: actionLabel , onAction: onAction , labelPosition: labelPosition } = props;
|
|
504
|
+
let { allowsRemoving: allowsRemoving , onRemove: onRemove , maxRows: maxRows , children: children , actionLabel: actionLabel , onAction: onAction , labelPosition: labelPosition , renderEmptyState: renderEmptyState = ()=>stringFormatter.format("noTags") } = props;
|
|
497
505
|
let domRef = (0, $fUaQ2$useDOMRef)(ref);
|
|
498
506
|
let containerRef = (0, $fUaQ2$useRef)(null);
|
|
499
507
|
let tagsRef = (0, $fUaQ2$useRef)(null);
|
|
@@ -537,6 +545,11 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
537
545
|
let buttons = [
|
|
538
546
|
...currContainerRef.parentElement.querySelectorAll("button")
|
|
539
547
|
];
|
|
548
|
+
if (tags.length === 0 || buttons.length === 0) return {
|
|
549
|
+
visibleTagCount: 0,
|
|
550
|
+
showCollapseButton: false,
|
|
551
|
+
maxHeight: undefined
|
|
552
|
+
};
|
|
540
553
|
let currY = -Infinity;
|
|
541
554
|
let rowCount = 0;
|
|
542
555
|
let index = 0;
|
|
@@ -613,6 +626,7 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
613
626
|
setIsCollapsed((prevCollapsed)=>!prevCollapsed);
|
|
614
627
|
};
|
|
615
628
|
let showActions = tagState.showCollapseButton || actionLabel && onAction;
|
|
629
|
+
let isEmpty = state.collection.size === 0;
|
|
616
630
|
return /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$FocusScope), null, /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$Field), {
|
|
617
631
|
...props,
|
|
618
632
|
labelProps: labelProps,
|
|
@@ -630,7 +644,11 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
630
644
|
overflow: "hidden"
|
|
631
645
|
} : undefined,
|
|
632
646
|
ref: containerRef,
|
|
633
|
-
className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags-container"
|
|
647
|
+
className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags-container", {
|
|
648
|
+
"spectrum-Tags-container--empty": isEmpty
|
|
649
|
+
})
|
|
650
|
+
}, /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$FocusRing), {
|
|
651
|
+
focusRingClass: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "focus-ring")
|
|
634
652
|
}, /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
|
|
635
653
|
ref: tagsRef,
|
|
636
654
|
...gridProps,
|
|
@@ -642,7 +660,9 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
642
660
|
state: state,
|
|
643
661
|
allowsRemoving: allowsRemoving,
|
|
644
662
|
onRemove: onRemove
|
|
645
|
-
}, item.rendered))
|
|
663
|
+
}, item.rendered)), isEmpty && /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
|
|
664
|
+
className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags-empty-state")
|
|
665
|
+
}, renderEmptyState()))), showActions && !isEmpty && /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$Provider), {
|
|
646
666
|
isDisabled: false
|
|
647
667
|
}, /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
|
|
648
668
|
role: "group",
|
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{font-synthesis:weight}.spectrum-Tag_8407eb{--spectrum-focus-ring-border-radius:var(--spectrum-textfield-border-radius,var(--spectrum-alias-border-radius-regular));--spectrum-focus-ring-gap:var(--spectrum-alias-input-focusring-gap);--spectrum-focus-ring-size:var(--spectrum-alias-input-focusring-size);--spectrum-focus-ring-border-size:0px;--spectrum-focus-ring-color:var(--spectrum-high-contrast-focus-ring-color,var(--spectrum-alias-focus-ring-color,var(--spectrum-alias-focus-color)))}.spectrum-Tag_8407eb:after{border-radius:calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));content:"";margin:calc(-1*var(--spectrum-focus-ring-border-size));pointer-events:none;transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out,margin var(--spectrum-global-animation-duration-100,.13s)ease-out;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.spectrum-Tag_8407eb.focus-ring_8407eb:after{margin:calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size));box-shadow:0 0 0 var(--spectrum-focus-ring-size)var(--spectrum-focus-ring-color)}.spectrum-Tags_8407eb{display:inline}[dir=ltr] .spectrum-Tags-container_8407eb{margin-left:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2*-1)}[dir=rtl] .spectrum-Tags-container_8407eb{margin-right:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2*-1)}[dir=ltr] .spectrum-Tags-container_8407eb{margin-right:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2)}[dir=rtl] .spectrum-Tags-container_8407eb{margin-left:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2)}[dir=ltr] .spectrum-Tag_8407eb{padding-left:calc(var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125)) - var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin)))}[dir=rtl] .spectrum-Tag_8407eb{padding-right:calc(var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125)) - var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin)))}.spectrum-Tag_8407eb{--spectrum-focus-ring-border-radius:var(--spectrum-tag-border-radius,var(--spectrum-alias-border-radius-regular));--spectrum-focus-ring-border-size:var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin));display:-ms-inline-grid;box-sizing:border-box;margin:calc(var(--spectrum-taggroup-tag-gap-y,var(--spectrum-global-dimension-size-100))/2)calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2);height:var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300));max-width:100%;border-width:var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin));border-radius:var(--spectrum-tag-border-radius,var(--spectrum-alias-border-radius-regular));-webkit-user-select:none;user-select:none;transition:border-color var(--spectrum-global-animation-duration-100,.13s)ease-in-out,color var(--spectrum-global-animation-duration-100,.13s)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-in-out,background-color var(--spectrum-global-animation-duration-100,.13s)ease-in-out;border-style:solid;outline:none;align-items:center;display:inline-grid;position:relative}.spectrum-Tag_8407eb.is-disabled_8407eb{pointer-events:none}.spectrum-Tag_8407eb .spectrum-Tag-removeButton_8407eb{height:calc(var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300)) - 2*var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin)));width:var(--spectrum-global-dimension-size-300);grid-area:action}.spectrum-Tag_8407eb .spectrum-Tag-cell_8407eb{text-overflow:ellipsis;display:-ms-grid;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto;grid-template-areas:"decoration content action";align-items:center;display:grid;overflow:hidden}[dir=ltr] .spectrum-Tag_8407eb .spectrum-Tag-icon_8407eb{margin-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] .spectrum-Tag_8407eb .spectrum-Tag-icon_8407eb{margin-left:var(--spectrum-global-dimension-size-100)}.spectrum-Tag_8407eb .spectrum-Tag-icon_8407eb{grid-area:decoration}[dir=ltr] .spectrum-Tag_8407eb .spectrum-Tag-avatar_8407eb{margin-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] .spectrum-Tag_8407eb .spectrum-Tag-avatar_8407eb{margin-left:var(--spectrum-global-dimension-size-100)}.spectrum-Tag_8407eb .spectrum-Tag-avatar_8407eb{grid-area:decoration}[dir=ltr] .spectrum-Tag_8407eb .spectrum-Tag-content_8407eb{margin-right:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tag_8407eb .spectrum-Tag-content_8407eb{margin-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}.spectrum-Tag_8407eb .spectrum-Tag-content_8407eb{line-height:calc(var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300)) - var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin))*2);font-size:var(--spectrum-tag-text-size,var(--spectrum-global-dimension-font-size-75));cursor:default;white-space:nowrap;text-overflow:ellipsis;outline:none;flex:auto;grid-area:content;overflow:hidden}[dir=ltr] .spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-content_8407eb{margin-right:0}[dir=rtl] .spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-content_8407eb{margin-left:0}.spectrum-Tags-actions_8407eb{display:inline}.spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb{height:var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300));font-size:var(--spectrum-tag-text-size,var(--spectrum-global-dimension-font-size-75));margin:calc(var(--spectrum-taggroup-tag-gap-y,var(--spectrum-global-dimension-size-100))/2)calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2);display:inline}[dir=ltr] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span{padding-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span,[dir=ltr] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span{padding-right:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span{padding-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}.spectrum-Tags-fieldWrapper_8407eb.spectrum-Tags-fieldWrapper_8407eb{width:unset}.spectrum-Tags-fieldWrapper_8407eb.spectrum-Tags-fieldWrapper_8407eb:not(.spectrum-Tags-fieldWrapper--positionSide_8407eb){display:-ms-grid;display:grid}.spectrum-Tag_8407eb{color:var(--spectrum-tag-text-color,var(--spectrum-global-color-gray-700));background-color:var(--spectrum-tag-background-color,var(--spectrum-global-color-gray-75));border-color:var(--spectrum-tag-border-color,var(--spectrum-global-color-gray-600))}.spectrum-Tag_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-background-color-hover,var(--spectrum-global-color-gray-75));color:var(--spectrum-tag-text-color-hover,var(--spectrum-global-color-gray-900));border-color:var(--spectrum-tag-border-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Tag_8407eb.focus-ring_8407eb{background-color:var(--spectrum-tag-background-color-key-focus,var(--spectrum-global-color-gray-75));color:var(--spectrum-tag-text-color-key-focus,var(--spectrum-global-color-gray-900));border-color:var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Tag_8407eb.focus-ring_8407eb:after{box-shadow:0 0 0 var(--spectrum-focus-ring-border-size)var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Tag_8407eb.is-disabled_8407eb{color:var(--spectrum-tag-text-color-disabled,var(--spectrum-global-color-gray-500));background-color:var(--spectrum-tag-background-color-disabled,var(--spectrum-global-color-gray-200));border-color:var(--spectrum-tag-border-color-disabled,var(--spectrum-global-color-gray-200))}.spectrum-Tag_8407eb.is-disabled_8407eb .spectrum-Tag-avatar_8407eb{opacity:var(--spectrum-avatar-small-opacity-disabled,.3)}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb.is-hovered_8407eb{color:var(--spectrum-tag-removable-text-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb:active{color:var(--spectrum-tag-removable-text-color-down,var(--spectrum-global-color-gray-700))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb.is-focused_8407eb{color:var(--spectrum-tag-removable-text-color-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-removeButton_8407eb.is-focused_8407eb{border:2px solid var(--spectrum-tag-removable-border-color-key-focus,var(--spectrum-alias-border-color-focus));border-radius:var(--spectrum-alias-border-radius-regular,var(--spectrum-global-dimension-size-50));background-color:var(--spectrum-tag-removable-button-background-color-key-focus,var(--spectrum-global-color-gray-600));color:var(--spectrum-tag-removable-button-icon-color-key-focus,var(--spectrum-global-color-gray-900))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-removeButton_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-removable-button-background-color-hover,var(--spectrum-global-color-gray-300));color:var(--spectrum-tag-removable-button-icon-color-hover,var(--spectrum-global-color-gray-900))}@media (forced-colors:active){.spectrum-Tag_8407eb{forced-color-adjust:none;--spectrum-tag-background-color:ButtonFace;--spectrum-tag-background-color-disabled:ButtonFace;--spectrum-tag-background-color-hover:ButtonFace;--spectrum-tag-background-color-key-focus:ButtonFace;--spectrum-tag-border-color:ButtonText;--spectrum-tag-border-color-disabled:GrayText;--spectrum-tag-border-color-hover:Highlight;--spectrum-tag-border-color-key-focus:Highlight;--spectrum-tag-removable-border-color-key-focus:Highlight;--spectrum-tag-removable-button-background-color-hover:ButtonFace;--spectrum-tag-removable-button-background-color-key-focus:ButtonFace;--spectrum-tag-removable-button-icon-color-hover:Highlight;--spectrum-tag-removable-button-icon-color-key-focus:Highlight;--spectrum-tag-removable-text-color-down:ButtonText;--spectrum-tag-removable-text-color-hover:ButtonText;--spectrum-tag-removable-text-color-key-focus:ButtonText;--spectrum-tag-text-color:ButtonText;--spectrum-tag-text-color-disabled:GrayText;--spectrum-tag-text-color-hover:ButtonText;--spectrum-tag-text-color-key-focus:ButtonText}}
|
|
1
|
+
:root{font-synthesis:weight}.spectrum-Tag_8407eb{--spectrum-focus-ring-border-radius:var(--spectrum-textfield-border-radius,var(--spectrum-alias-border-radius-regular));--spectrum-focus-ring-gap:var(--spectrum-alias-input-focusring-gap);--spectrum-focus-ring-size:var(--spectrum-alias-input-focusring-size);--spectrum-focus-ring-border-size:0px;--spectrum-focus-ring-color:var(--spectrum-high-contrast-focus-ring-color,var(--spectrum-alias-focus-ring-color,var(--spectrum-alias-focus-color)))}.spectrum-Tag_8407eb:after{border-radius:calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));content:"";margin:calc(-1*var(--spectrum-focus-ring-border-size));pointer-events:none;transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out,margin var(--spectrum-global-animation-duration-100,.13s)ease-out;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.spectrum-Tag_8407eb.focus-ring_8407eb:after{margin:calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size));box-shadow:0 0 0 var(--spectrum-focus-ring-size)var(--spectrum-focus-ring-color)}.spectrum-Tags_8407eb{display:inline}.spectrum-Tags_8407eb:focus-visible{outline:none}.spectrum-Tags_8407eb.focus-ring_8407eb{box-shadow:0 0 0 2px var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus));outline:none;display:block}[dir=ltr] .spectrum-Tags-container_8407eb:not(.spectrum-Tags-container--empty_8407eb){margin-left:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2*-1)}[dir=rtl] .spectrum-Tags-container_8407eb:not(.spectrum-Tags-container--empty_8407eb){margin-right:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2*-1)}[dir=ltr] .spectrum-Tags-container_8407eb:not(.spectrum-Tags-container--empty_8407eb){margin-right:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2)}[dir=rtl] .spectrum-Tags-container_8407eb:not(.spectrum-Tags-container--empty_8407eb){margin-left:calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2)}[dir=ltr] .spectrum-Tag_8407eb{padding-left:calc(var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125)) - var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin)))}[dir=rtl] .spectrum-Tag_8407eb{padding-right:calc(var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125)) - var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin)))}.spectrum-Tag_8407eb{--spectrum-focus-ring-border-radius:var(--spectrum-tag-border-radius,var(--spectrum-alias-border-radius-regular));--spectrum-focus-ring-border-size:var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin));display:-ms-inline-grid;box-sizing:border-box;margin:calc(var(--spectrum-taggroup-tag-gap-y,var(--spectrum-global-dimension-size-100))/2)calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2);height:var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300));max-width:100%;border-width:var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin));border-radius:var(--spectrum-tag-border-radius,var(--spectrum-alias-border-radius-regular));-webkit-user-select:none;user-select:none;transition:border-color var(--spectrum-global-animation-duration-100,.13s)ease-in-out,color var(--spectrum-global-animation-duration-100,.13s)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-in-out,background-color var(--spectrum-global-animation-duration-100,.13s)ease-in-out;border-style:solid;outline:none;align-items:center;display:inline-grid;position:relative}.spectrum-Tag_8407eb.is-disabled_8407eb{pointer-events:none}.spectrum-Tag_8407eb .spectrum-Tag-removeButton_8407eb{height:calc(var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300)) - 2*var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin)));width:var(--spectrum-global-dimension-size-300);grid-area:action}.spectrum-Tag_8407eb .spectrum-Tag-cell_8407eb{text-overflow:ellipsis;display:-ms-grid;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto;grid-template-areas:"decoration content action";align-items:center;display:grid;overflow:hidden}[dir=ltr] .spectrum-Tag_8407eb .spectrum-Tag-icon_8407eb{margin-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] .spectrum-Tag_8407eb .spectrum-Tag-icon_8407eb{margin-left:var(--spectrum-global-dimension-size-100)}.spectrum-Tag_8407eb .spectrum-Tag-icon_8407eb{grid-area:decoration}[dir=ltr] .spectrum-Tag_8407eb .spectrum-Tag-avatar_8407eb{margin-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] .spectrum-Tag_8407eb .spectrum-Tag-avatar_8407eb{margin-left:var(--spectrum-global-dimension-size-100)}.spectrum-Tag_8407eb .spectrum-Tag-avatar_8407eb{grid-area:decoration}[dir=ltr] .spectrum-Tag_8407eb .spectrum-Tag-content_8407eb{margin-right:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tag_8407eb .spectrum-Tag-content_8407eb{margin-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}.spectrum-Tag_8407eb .spectrum-Tag-content_8407eb{line-height:calc(var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300)) - var(--spectrum-tag-border-size,var(--spectrum-alias-border-size-thin))*2);font-size:var(--spectrum-tag-text-size,var(--spectrum-global-dimension-font-size-75));cursor:default;white-space:nowrap;text-overflow:ellipsis;outline:none;flex:auto;grid-area:content;overflow:hidden}[dir=ltr] .spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-content_8407eb{margin-right:0}[dir=rtl] .spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-content_8407eb{margin-left:0}.spectrum-Tags-actions_8407eb{display:inline}.spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb{height:var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300));font-size:var(--spectrum-tag-text-size,var(--spectrum-global-dimension-font-size-75));margin:calc(var(--spectrum-taggroup-tag-gap-y,var(--spectrum-global-dimension-size-100))/2)calc(var(--spectrum-taggroup-tag-gap-x,var(--spectrum-global-dimension-size-100))/2);display:inline}[dir=ltr] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span{padding-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span,[dir=ltr] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span{padding-right:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tags-actions_8407eb .spectrum-Tags-actionButton_8407eb.spectrum-Tags-actionButton_8407eb>span{padding-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}.spectrum-Tags-fieldWrapper_8407eb.spectrum-Tags-fieldWrapper_8407eb{width:unset}.spectrum-Tags-fieldWrapper_8407eb.spectrum-Tags-fieldWrapper_8407eb:not(.spectrum-Tags-fieldWrapper--positionSide_8407eb){display:-ms-grid;display:grid}.spectrum-Tags-empty-state_8407eb{min-height:var(--spectrum-tag-height,var(--spectrum-global-dimension-size-300))}.spectrum-Tag_8407eb{color:var(--spectrum-tag-text-color,var(--spectrum-global-color-gray-700));background-color:var(--spectrum-tag-background-color,var(--spectrum-global-color-gray-75));border-color:var(--spectrum-tag-border-color,var(--spectrum-global-color-gray-600))}.spectrum-Tag_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-background-color-hover,var(--spectrum-global-color-gray-75));color:var(--spectrum-tag-text-color-hover,var(--spectrum-global-color-gray-900));border-color:var(--spectrum-tag-border-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Tag_8407eb.focus-ring_8407eb{background-color:var(--spectrum-tag-background-color-key-focus,var(--spectrum-global-color-gray-75));color:var(--spectrum-tag-text-color-key-focus,var(--spectrum-global-color-gray-900));border-color:var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Tag_8407eb.focus-ring_8407eb:after{box-shadow:0 0 0 var(--spectrum-focus-ring-border-size)var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Tag_8407eb.is-disabled_8407eb{color:var(--spectrum-tag-text-color-disabled,var(--spectrum-global-color-gray-500));background-color:var(--spectrum-tag-background-color-disabled,var(--spectrum-global-color-gray-200));border-color:var(--spectrum-tag-border-color-disabled,var(--spectrum-global-color-gray-200))}.spectrum-Tag_8407eb.is-disabled_8407eb .spectrum-Tag-avatar_8407eb{opacity:var(--spectrum-avatar-small-opacity-disabled,.3)}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb.is-hovered_8407eb{color:var(--spectrum-tag-removable-text-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb:active{color:var(--spectrum-tag-removable-text-color-down,var(--spectrum-global-color-gray-700))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb.is-focused_8407eb{color:var(--spectrum-tag-removable-text-color-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-removeButton_8407eb.is-focused_8407eb{border:2px solid var(--spectrum-tag-removable-border-color-key-focus,var(--spectrum-alias-border-color-focus));border-radius:var(--spectrum-alias-border-radius-regular,var(--spectrum-global-dimension-size-50));background-color:var(--spectrum-tag-removable-button-background-color-key-focus,var(--spectrum-global-color-gray-600));color:var(--spectrum-tag-removable-button-icon-color-key-focus,var(--spectrum-global-color-gray-900))}.spectrum-Tag_8407eb.spectrum-Tag--removable_8407eb .spectrum-Tag-removeButton_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-removable-button-background-color-hover,var(--spectrum-global-color-gray-300));color:var(--spectrum-tag-removable-button-icon-color-hover,var(--spectrum-global-color-gray-900))}@media (forced-colors:active){.spectrum-Tag_8407eb{forced-color-adjust:none;--spectrum-tag-background-color:ButtonFace;--spectrum-tag-background-color-disabled:ButtonFace;--spectrum-tag-background-color-hover:ButtonFace;--spectrum-tag-background-color-key-focus:ButtonFace;--spectrum-tag-border-color:ButtonText;--spectrum-tag-border-color-disabled:GrayText;--spectrum-tag-border-color-hover:Highlight;--spectrum-tag-border-color-key-focus:Highlight;--spectrum-tag-removable-border-color-key-focus:Highlight;--spectrum-tag-removable-button-background-color-hover:ButtonFace;--spectrum-tag-removable-button-background-color-key-focus:ButtonFace;--spectrum-tag-removable-button-icon-color-hover:Highlight;--spectrum-tag-removable-button-icon-color-key-focus:Highlight;--spectrum-tag-removable-text-color-down:ButtonText;--spectrum-tag-removable-text-color-hover:ButtonText;--spectrum-tag-removable-text-color-key-focus:ButtonText;--spectrum-tag-text-color:ButtonText;--spectrum-tag-text-color-disabled:GrayText;--spectrum-tag-text-color-hover:ButtonText;--spectrum-tag-text-color-key-focus:ButtonText}}
|
package/dist/main.js
CHANGED
|
@@ -53,7 +53,8 @@ var $e4833c69a6a8a469$exports = {};
|
|
|
53
53
|
$e4833c69a6a8a469$exports = {
|
|
54
54
|
"actions": `الإجراءات`,
|
|
55
55
|
"hideButtonLabel": `إظهار أقل`,
|
|
56
|
-
"showAllButtonLabel": (args, formatter)=>`عرض الكل (${formatter.number(args.tagCount)})
|
|
56
|
+
"showAllButtonLabel": (args, formatter)=>`عرض الكل (${formatter.number(args.tagCount)})`,
|
|
57
|
+
"noTags": `None`
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
|
|
@@ -101,7 +102,8 @@ var $a5d4273001869f16$exports = {};
|
|
|
101
102
|
$a5d4273001869f16$exports = {
|
|
102
103
|
"showAllButtonLabel": (args, formatter)=>`Show all (${formatter.number(args.tagCount)})`,
|
|
103
104
|
"hideButtonLabel": `Show less`,
|
|
104
|
-
"actions": `Actions
|
|
105
|
+
"actions": `Actions`,
|
|
106
|
+
"noTags": `None`
|
|
105
107
|
};
|
|
106
108
|
|
|
107
109
|
|
|
@@ -368,6 +370,7 @@ $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag", () => $ed889f8f1f091fc
|
|
|
368
370
|
$parcel$export($ed889f8f1f091fc8$exports, "focus-ring", () => $ed889f8f1f091fc8$export$f39a09f249340e2a, (v) => $ed889f8f1f091fc8$export$f39a09f249340e2a = v);
|
|
369
371
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags", () => $ed889f8f1f091fc8$export$eb7e80013a1212da, (v) => $ed889f8f1f091fc8$export$eb7e80013a1212da = v);
|
|
370
372
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-container", () => $ed889f8f1f091fc8$export$3300169c5d27fe96, (v) => $ed889f8f1f091fc8$export$3300169c5d27fe96 = v);
|
|
373
|
+
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-container--empty", () => $ed889f8f1f091fc8$export$a5e59d283417e02b, (v) => $ed889f8f1f091fc8$export$a5e59d283417e02b = v);
|
|
371
374
|
$parcel$export($ed889f8f1f091fc8$exports, "is-disabled", () => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf, (v) => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf = v);
|
|
372
375
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-removeButton", () => $ed889f8f1f091fc8$export$23a76b996f0a6c1, (v) => $ed889f8f1f091fc8$export$23a76b996f0a6c1 = v);
|
|
373
376
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-cell", () => $ed889f8f1f091fc8$export$9c4fd4d7faada408, (v) => $ed889f8f1f091fc8$export$9c4fd4d7faada408 = v);
|
|
@@ -379,12 +382,14 @@ $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-actions", () => $ed889f
|
|
|
379
382
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-actionButton", () => $ed889f8f1f091fc8$export$e6882f8db018e3bd, (v) => $ed889f8f1f091fc8$export$e6882f8db018e3bd = v);
|
|
380
383
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-fieldWrapper", () => $ed889f8f1f091fc8$export$c9b7ca327d69b2b5, (v) => $ed889f8f1f091fc8$export$c9b7ca327d69b2b5 = v);
|
|
381
384
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-fieldWrapper--positionSide", () => $ed889f8f1f091fc8$export$a7c11d4acc244e09, (v) => $ed889f8f1f091fc8$export$a7c11d4acc244e09 = v);
|
|
385
|
+
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-empty-state", () => $ed889f8f1f091fc8$export$cd48f925394bb16, (v) => $ed889f8f1f091fc8$export$cd48f925394bb16 = v);
|
|
382
386
|
$parcel$export($ed889f8f1f091fc8$exports, "is-hovered", () => $ed889f8f1f091fc8$export$b8813cd5d7824ce7, (v) => $ed889f8f1f091fc8$export$b8813cd5d7824ce7 = v);
|
|
383
387
|
$parcel$export($ed889f8f1f091fc8$exports, "is-focused", () => $ed889f8f1f091fc8$export$e7dc768d35940237, (v) => $ed889f8f1f091fc8$export$e7dc768d35940237 = v);
|
|
384
388
|
var $ed889f8f1f091fc8$export$6174bd1d20b4c022;
|
|
385
389
|
var $ed889f8f1f091fc8$export$f39a09f249340e2a;
|
|
386
390
|
var $ed889f8f1f091fc8$export$eb7e80013a1212da;
|
|
387
391
|
var $ed889f8f1f091fc8$export$3300169c5d27fe96;
|
|
392
|
+
var $ed889f8f1f091fc8$export$a5e59d283417e02b;
|
|
388
393
|
var $ed889f8f1f091fc8$export$d35bc1e505d1ebbf;
|
|
389
394
|
var $ed889f8f1f091fc8$export$23a76b996f0a6c1;
|
|
390
395
|
var $ed889f8f1f091fc8$export$9c4fd4d7faada408;
|
|
@@ -396,12 +401,14 @@ var $ed889f8f1f091fc8$export$8afaa02110915bbb;
|
|
|
396
401
|
var $ed889f8f1f091fc8$export$e6882f8db018e3bd;
|
|
397
402
|
var $ed889f8f1f091fc8$export$c9b7ca327d69b2b5;
|
|
398
403
|
var $ed889f8f1f091fc8$export$a7c11d4acc244e09;
|
|
404
|
+
var $ed889f8f1f091fc8$export$cd48f925394bb16;
|
|
399
405
|
var $ed889f8f1f091fc8$export$b8813cd5d7824ce7;
|
|
400
406
|
var $ed889f8f1f091fc8$export$e7dc768d35940237;
|
|
401
407
|
$ed889f8f1f091fc8$export$6174bd1d20b4c022 = "spectrum-Tag_8407eb";
|
|
402
408
|
$ed889f8f1f091fc8$export$f39a09f249340e2a = "focus-ring_8407eb";
|
|
403
409
|
$ed889f8f1f091fc8$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
|
|
404
410
|
$ed889f8f1f091fc8$export$3300169c5d27fe96 = "spectrum-Tags-container_8407eb";
|
|
411
|
+
$ed889f8f1f091fc8$export$a5e59d283417e02b = "spectrum-Tags-container--empty_8407eb";
|
|
405
412
|
$ed889f8f1f091fc8$export$d35bc1e505d1ebbf = "is-disabled_8407eb";
|
|
406
413
|
$ed889f8f1f091fc8$export$23a76b996f0a6c1 = "spectrum-Tag-removeButton_8407eb";
|
|
407
414
|
$ed889f8f1f091fc8$export$9c4fd4d7faada408 = "spectrum-Tag-cell_8407eb";
|
|
@@ -413,6 +420,7 @@ $ed889f8f1f091fc8$export$8afaa02110915bbb = "spectrum-Tags-actions_8407eb";
|
|
|
413
420
|
$ed889f8f1f091fc8$export$e6882f8db018e3bd = "spectrum-Tags-actionButton_8407eb";
|
|
414
421
|
$ed889f8f1f091fc8$export$c9b7ca327d69b2b5 = "spectrum-Tags-fieldWrapper_8407eb";
|
|
415
422
|
$ed889f8f1f091fc8$export$a7c11d4acc244e09 = "spectrum-Tags-fieldWrapper--positionSide_8407eb";
|
|
423
|
+
$ed889f8f1f091fc8$export$cd48f925394bb16 = "spectrum-Tags-empty-state_8407eb";
|
|
416
424
|
$ed889f8f1f091fc8$export$b8813cd5d7824ce7 = "is-hovered_8407eb";
|
|
417
425
|
$ed889f8f1f091fc8$export$e7dc768d35940237 = "is-focused_8407eb";
|
|
418
426
|
|
|
@@ -496,7 +504,7 @@ function $dd2c5d00108c1840$var$TagRemoveButton(props) {
|
|
|
496
504
|
function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
497
505
|
props = (0, $dTV3V$reactspectrumprovider.useProviderProps)(props);
|
|
498
506
|
props = (0, $dTV3V$reactspectrumform.useFormProps)(props);
|
|
499
|
-
let { allowsRemoving: allowsRemoving , onRemove: onRemove , maxRows: maxRows , children: children , actionLabel: actionLabel , onAction: onAction , labelPosition: labelPosition } = props;
|
|
507
|
+
let { allowsRemoving: allowsRemoving , onRemove: onRemove , maxRows: maxRows , children: children , actionLabel: actionLabel , onAction: onAction , labelPosition: labelPosition , renderEmptyState: renderEmptyState = ()=>stringFormatter.format("noTags") } = props;
|
|
500
508
|
let domRef = (0, $dTV3V$reactspectrumutils.useDOMRef)(ref);
|
|
501
509
|
let containerRef = (0, $dTV3V$react.useRef)(null);
|
|
502
510
|
let tagsRef = (0, $dTV3V$react.useRef)(null);
|
|
@@ -540,6 +548,11 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
540
548
|
let buttons = [
|
|
541
549
|
...currContainerRef.parentElement.querySelectorAll("button")
|
|
542
550
|
];
|
|
551
|
+
if (tags.length === 0 || buttons.length === 0) return {
|
|
552
|
+
visibleTagCount: 0,
|
|
553
|
+
showCollapseButton: false,
|
|
554
|
+
maxHeight: undefined
|
|
555
|
+
};
|
|
543
556
|
let currY = -Infinity;
|
|
544
557
|
let rowCount = 0;
|
|
545
558
|
let index = 0;
|
|
@@ -616,6 +629,7 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
616
629
|
setIsCollapsed((prevCollapsed)=>!prevCollapsed);
|
|
617
630
|
};
|
|
618
631
|
let showActions = tagState.showCollapseButton || actionLabel && onAction;
|
|
632
|
+
let isEmpty = state.collection.size === 0;
|
|
619
633
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactariafocus.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumlabel.Field), {
|
|
620
634
|
...props,
|
|
621
635
|
labelProps: labelProps,
|
|
@@ -633,7 +647,11 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
633
647
|
overflow: "hidden"
|
|
634
648
|
} : undefined,
|
|
635
649
|
ref: containerRef,
|
|
636
|
-
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-container"
|
|
650
|
+
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-container", {
|
|
651
|
+
"spectrum-Tags-container--empty": isEmpty
|
|
652
|
+
})
|
|
653
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactariafocus.FocusRing), {
|
|
654
|
+
focusRingClass: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "focus-ring")
|
|
637
655
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
638
656
|
ref: tagsRef,
|
|
639
657
|
...gridProps,
|
|
@@ -645,7 +663,9 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
645
663
|
state: state,
|
|
646
664
|
allowsRemoving: allowsRemoving,
|
|
647
665
|
onRemove: onRemove
|
|
648
|
-
}, item.rendered))
|
|
666
|
+
}, item.rendered)), isEmpty && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
667
|
+
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-empty-state")
|
|
668
|
+
}, renderEmptyState()))), showActions && !isEmpty && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumprovider.Provider), {
|
|
649
669
|
isDisabled: false
|
|
650
670
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
651
671
|
role: "group",
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;AEZA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,mBAAmB,CAAC,SAAS,CAAC;IAC9B,sBAAsB,CAAC,M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ACT,KAAK,QAAQ,KAInB,6BACC,0DAAC,CAAA,GAAA,qCAAQ,AAAD;QAAE,YAAY,KAAK;qBACzB,0DAAC;QACC,MAAK;QACL,IAAI;QACJ,cAAY,gBAAgB,MAAM,CAAC;QACnC,mBAAiB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC;QAC/C,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OAC7B,SAAS,kBAAkB,kBAC1B,0DAAC,CAAA,GAAA,uCAAY,AAAD;QACV,SAAA,IAAO;QACP,SAAS;QACT,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC,cACC,gBAAgB,MAAM,CAAC,sBAAsB;QAAC,UAAU,MAAM,UAAU,CAAC,IAAI;IAAA,KAC7E,gBAAgB,MAAM,CAAC,kBAAkB,GAI9C,eAAe,0BACd,0DAAC,CAAA,GAAA,uCAAW;QACV,SAAA,IAAO;QACP,SAAS;YAAM,OAAA,qBAAA,sBAAA,KAAA,IAAA;;QACf,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC;AAUrB;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;;CD3NlC,GAED","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/intl/*.js","packages/@react-spectrum/tag/intl/ar-AE.json","packages/@react-spectrum/tag/intl/bg-BG.json","packages/@react-spectrum/tag/intl/cs-CZ.json","packages/@react-spectrum/tag/intl/da-DK.json","packages/@react-spectrum/tag/intl/de-DE.json","packages/@react-spectrum/tag/intl/el-GR.json","packages/@react-spectrum/tag/intl/en-US.json","packages/@react-spectrum/tag/intl/es-ES.json","packages/@react-spectrum/tag/intl/et-EE.json","packages/@react-spectrum/tag/intl/fi-FI.json","packages/@react-spectrum/tag/intl/fr-FR.json","packages/@react-spectrum/tag/intl/he-IL.json","packages/@react-spectrum/tag/intl/hr-HR.json","packages/@react-spectrum/tag/intl/hu-HU.json","packages/@react-spectrum/tag/intl/it-IT.json","packages/@react-spectrum/tag/intl/ja-JP.json","packages/@react-spectrum/tag/intl/ko-KR.json","packages/@react-spectrum/tag/intl/lt-LT.json","packages/@react-spectrum/tag/intl/lv-LV.json","packages/@react-spectrum/tag/intl/nb-NO.json","packages/@react-spectrum/tag/intl/nl-NL.json","packages/@react-spectrum/tag/intl/pl-PL.json","packages/@react-spectrum/tag/intl/pt-BR.json","packages/@react-spectrum/tag/intl/pt-PT.json","packages/@react-spectrum/tag/intl/ro-RO.json","packages/@react-spectrum/tag/intl/ru-RU.json","packages/@react-spectrum/tag/intl/sk-SK.json","packages/@react-spectrum/tag/intl/sl-SI.json","packages/@react-spectrum/tag/intl/sr-SP.json","packages/@react-spectrum/tag/intl/sv-SE.json","packages/@react-spectrum/tag/intl/tr-TR.json","packages/@react-spectrum/tag/intl/uk-UA.json","packages/@react-spectrum/tag/intl/zh-CN.json","packages/@react-spectrum/tag/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/tags/vars.css","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\nexport {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaTagGroupProps, TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListCollection, useListState} from '@react-stately/list';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'keyboardDelegate'>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {\n /** The label to display on the action button. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void\n}\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n allowsRemoving,\n onRemove,\n maxRows,\n children,\n actionLabel,\n onAction,\n labelPosition\n } = props;\n let domRef = useDOMRef(ref);\n let containerRef = useRef(null);\n let tagsRef = useRef(null);\n let {direction} = useLocale();\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let [isCollapsed, setIsCollapsed] = useState(maxRows != null);\n let state = useListState(props);\n let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false, maxHeight: undefined});\n let keyboardDelegate = useMemo(() => (\n isCollapsed\n ? new TagKeyboardDelegate(new ListCollection([...state.collection].slice(0, tagState.visibleTagCount)), direction)\n : new TagKeyboardDelegate(new ListCollection([...state.collection]), direction)\n ), [direction, isCollapsed, state.collection, tagState.visibleTagCount]) as TagKeyboardDelegate<T>;\n // Remove onAction from props so it doesn't make it into useGridList.\n delete props.onAction;\n let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);\n let actionsId = useId();\n\n let updateVisibleTagCount = useCallback(() => {\n if (maxRows > 0) {\n let computeVisibleTagCount = () => {\n // Refs can be null at runtime.\n let currContainerRef: HTMLDivElement | null = containerRef.current;\n let currTagsRef: HTMLDivElement | null = tagsRef.current;\n if (!currContainerRef || !currTagsRef) {\n return;\n }\n\n let tags = [...currTagsRef.children];\n let buttons = [...currContainerRef.parentElement.querySelectorAll('button')];\n let currY = -Infinity;\n let rowCount = 0;\n let index = 0;\n let tagWidths: number[] = [];\n // Count rows and show tags until we hit the maxRows.\n for (let tag of tags) {\n let {width, y} = tag.getBoundingClientRect();\n\n if (y !== currY) {\n currY = y;\n rowCount++;\n }\n\n if (rowCount > maxRows) {\n break;\n }\n tagWidths.push(width);\n index++;\n }\n\n // Remove tags until there is space for the collapse button and action button (if present) on the last row.\n let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);\n buttonsWidth += parseInt(window.getComputedStyle(buttons[buttons.length - 1]).marginRight, 10) * 2;\n let end = direction === 'ltr' ? 'right' : 'left';\n let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];\n let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];\n lastTagEnd += parseInt(window.getComputedStyle(tags[index - 1]).marginRight, 10);\n let availableWidth = containerEnd - lastTagEnd;\n\n while (availableWidth < buttonsWidth && index < state.collection.size && index > 0) {\n availableWidth += tagWidths.pop();\n index--;\n }\n let tagStyle = window.getComputedStyle(tags[0]);\n let maxHeight = (parseInt(tagStyle.height, 10) + parseInt(tagStyle.marginTop, 10) * 2) * maxRows;\n return {\n visibleTagCount: index,\n showCollapseButton: index < state.collection.size,\n maxHeight\n };\n };\n\n setTagState(function *() {\n // Update to show all items.\n yield {visibleTagCount: state.collection.size, showCollapseButton: true, maxHeight: undefined};\n\n // Measure, and update to show the items until maxRows is reached.\n yield computeVisibleTagCount();\n });\n }\n }, [maxRows, setTagState, direction, state.collection.size]);\n\n useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(updateVisibleTagCount, [children]);\n\n useEffect(() => {\n // Recalculate visible tags when fonts are loaded.\n document.fonts?.ready.then(() => updateVisibleTagCount());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n let visibleTags = [...state.collection];\n if (maxRows != null && isCollapsed) {\n visibleTags = visibleTags.slice(0, tagState.visibleTagCount);\n }\n\n let handlePressCollapse = () => {\n // Prevents button from losing focus if focusedKey got collapsed.\n state.selectionManager.setFocusedKey(null);\n setIsCollapsed(prevCollapsed => !prevCollapsed);\n };\n\n let showActions = tagState.showCollapseButton || (actionLabel && onAction);\n\n return (\n <FocusScope>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon\n ref={domRef}\n elementType=\"span\"\n wrapperClassName={\n classNames(\n styles,\n 'spectrum-Tags-fieldWrapper',\n {\n 'spectrum-Tags-fieldWrapper--positionSide': labelPosition === 'side'\n }\n )\n }>\n <div\n style={maxRows != null && tagState.showCollapseButton && isCollapsed ? {maxHeight: tagState.maxHeight, overflow: 'hidden'} : undefined}\n ref={containerRef}\n className={classNames(styles, 'spectrum-Tags-container')}>\n <div\n ref={tagsRef}\n {...gridProps}\n className={classNames(styles, 'spectrum-Tags')}>\n {visibleTags.map(item => (\n <Tag\n {...item.props}\n key={item.key}\n item={item}\n state={state}\n allowsRemoving={allowsRemoving}\n onRemove={onRemove}>\n {item.rendered}\n </Tag>\n ))}\n </div>\n {showActions &&\n <Provider isDisabled={false}>\n <div\n role=\"group\"\n id={actionsId}\n aria-label={stringFormatter.format('actions')}\n aria-labelledby={`${gridProps.id} ${actionsId}`}\n className={classNames(styles, 'spectrum-Tags-actions')}>\n {tagState.showCollapseButton &&\n <ActionButton\n isQuiet\n onPress={handlePressCollapse}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {isCollapsed ?\n stringFormatter.format('showAllButtonLabel', {tagCount: state.collection.size}) :\n stringFormatter.format('hideButtonLabel')\n }\n </ActionButton>\n }\n {actionLabel && onAction &&\n <ActionButton\n isQuiet\n onPress={() => onAction?.()}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {actionLabel}\n </ActionButton>\n }\n </div>\n </Provider>\n }\n </div>\n </Field>\n </FocusScope>\n );\n}\n\n/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as TagGroup};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"actions\": \"الإجراءات\",\n \"hideButtonLabel\": \"إظهار أقل\",\n \"showAllButtonLabel\": \"عرض الكل ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показване на по-малко\",\n \"showAllButtonLabel\": \"Показване на всички ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akce\",\n \"hideButtonLabel\": \"Zobrazit méně\",\n \"showAllButtonLabel\": \"Zobrazit vše ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Aktionen\",\n \"hideButtonLabel\": \"Weniger zeigen\",\n \"showAllButtonLabel\": \"Alle anzeigen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ενέργειες\",\n \"hideButtonLabel\": \"Εμφάνιση λιγότερων\",\n \"showAllButtonLabel\": \"Εμφάνιση όλων ({tagCount, number})\"\n}\n","{\n \"showAllButtonLabel\": \"Show all ({tagCount, number})\",\n \"hideButtonLabel\": \"Show less\",\n \"actions\": \"Actions\"\n}\n","{\n \"actions\": \"Acciones\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar todo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toimingud\",\n \"hideButtonLabel\": \"Kuva vähem\",\n \"showAllButtonLabel\": \"Kuva kõik ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toiminnot\",\n \"hideButtonLabel\": \"Näytä vähemmän\",\n \"showAllButtonLabel\": \"Näytä kaikki ({tagCount, number})\"\n}\n","{\n \"actions\": \"Actions\",\n \"hideButtonLabel\": \"Afficher moins\",\n \"showAllButtonLabel\": \"Tout afficher ({tagCount, number})\"\n}\n","{\n \"actions\": \"פעולות\",\n \"hideButtonLabel\": \"הצג פחות\",\n \"showAllButtonLabel\": \"הצג הכל ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Műveletek\",\n \"hideButtonLabel\": \"Mutass kevesebbet\",\n \"showAllButtonLabel\": \"Az összes megjelenítése ({tagCount, number})\"\n}\n","{\n \"actions\": \"Azioni\",\n \"hideButtonLabel\": \"Mostra meno\",\n \"showAllButtonLabel\": \"Mostra tutto ({tagCount, number})\"\n}\n","{\n \"actions\": \"アクション\",\n \"hideButtonLabel\": \"表示を減らす\",\n \"showAllButtonLabel\": \"すべての ({tagCount, number}) を表示\"\n}\n","{\n \"actions\": \"액션\",\n \"hideButtonLabel\": \"간단히 표시\",\n \"showAllButtonLabel\": \"모두 표시 ({tagCount, number})\"\n}\n","{\n \"actions\": \"Veiksmai\",\n \"hideButtonLabel\": \"Rodyti mažiau\",\n \"showAllButtonLabel\": \"Rodyti viską ({tagCount, number})\"\n}\n","{\n \"actions\": \"Darbības\",\n \"hideButtonLabel\": \"Rādīt mazāk\",\n \"showAllButtonLabel\": \"Rādīt visu ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acties\",\n \"hideButtonLabel\": \"Minder weergeven\",\n \"showAllButtonLabel\": \"Alles tonen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Działania\",\n \"hideButtonLabel\": \"Wyświetl mniej\",\n \"showAllButtonLabel\": \"Pokaż wszystko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acțiuni\",\n \"hideButtonLabel\": \"Se afișează mai puțin\",\n \"showAllButtonLabel\": \"Se afișează tot ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показать меньше\",\n \"showAllButtonLabel\": \"Показать все ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akcie\",\n \"hideButtonLabel\": \"Zobraziť menej\",\n \"showAllButtonLabel\": \"Zobraziť všetko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Dejanja\",\n \"hideButtonLabel\": \"Prikaži manj\",\n \"showAllButtonLabel\": \"Prikaž vse ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Åtgärder\",\n \"hideButtonLabel\": \"Visa mindre\",\n \"showAllButtonLabel\": \"Visa alla ({tagCount, number})\"\n}\n","{\n \"actions\": \"Eylemler\",\n \"hideButtonLabel\": \"Daha az göster\",\n \"showAllButtonLabel\": \"Tümünü göster ({tagCount, number})\"\n}\n","{\n \"actions\": \"Дії\",\n \"hideButtonLabel\": \"Показувати менше\",\n \"showAllButtonLabel\": \"Показати всі ({tagCount, number})\"\n}\n","{\n \"actions\": \"操作\",\n \"hideButtonLabel\": \"显示更少\",\n \"showAllButtonLabel\": \"全部显示 ({tagCount, number})\"\n}\n","{\n \"actions\": \"動作\",\n \"hideButtonLabel\": \"顯示較少\",\n \"showAllButtonLabel\": \"顯示全部 ({tagCount, number})\"\n}\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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, 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, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {TagProps} from '@react-types/tag';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport interface SpectrumTagProps<T> extends TagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n allowsRemoving,\n item,\n state,\n onRemove,\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: true});\n let ref = useRef();\n let {removeButtonProps, labelProps, gridCellProps, rowProps} = useTag({\n ...props,\n allowsRemoving,\n item,\n onRemove\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'), ...labelProps},\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} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;AEZA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,mBAAmB,CAAC,SAAS,CAAC;IAC9B,sBAAsB,CAAC,MAAM,YAAc,CAAC,UAAU,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;IAC1F,UAAU,CAAC,IAAI,CAAC;AAClB;;ADJA;;AEAA,4BAAiB;IAAG,WAAW,CAAC,QAAQ,CAAC;IACvC,mBAAmB,CAAC,qBAAqB,CAAC;IAC1C,sBAAsB,CAAC,MAAM,YAAc,CAAC,qBAAqB,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AACvG;;;;ACHA,4BAAiB;IAAG,WAAW,CAAC,IAAI,CAAC;IACnC,mBAAmB,CAAC,aAAa,CAAC;IAClC,sBAAsB,CAAC,MAAM,YAAc,CAAC,cAAc,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AAChG;;;;ACHA,4BAAiB;IAAG,WAAW,CAAC,UAAU,CAAC;I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M,AAAD,GAAG;OAChC,uBAKR,eAAe,CAAC,yBACf,0DAAC,CAAA,GAAA,qCAAQ,AAAD;QAAE,YAAY,KAAK;qBACzB,0DAAC;QACC,MAAK;QACL,IAAI;QACJ,cAAY,gBAAgB,MAAM,CAAC;QACnC,mBAAiB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC;QAC/C,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OAC7B,SAAS,kBAAkB,kBAC1B,0DAAC,CAAA,GAAA,uCAAY,AAAD;QACV,SAAA,IAAO;QACP,SAAS;QACT,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC,cACC,gBAAgB,MAAM,CAAC,sBAAsB;QAAC,UAAU,MAAM,UAAU,CAAC,IAAI;IAAA,KAC7E,gBAAgB,MAAM,CAAC,kBAAkB,GAI9C,eAAe,0BACd,0DAAC,CAAA,GAAA,uCAAW;QACV,SAAA,IAAO;QACP,SAAS;YAAM,OAAA,qBAAA,sBAAA,KAAA,IAAA;;QACf,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC;AAUrB;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;;CDrPlC,GAED","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/intl/*.js","packages/@react-spectrum/tag/intl/ar-AE.json","packages/@react-spectrum/tag/intl/bg-BG.json","packages/@react-spectrum/tag/intl/cs-CZ.json","packages/@react-spectrum/tag/intl/da-DK.json","packages/@react-spectrum/tag/intl/de-DE.json","packages/@react-spectrum/tag/intl/el-GR.json","packages/@react-spectrum/tag/intl/en-US.json","packages/@react-spectrum/tag/intl/es-ES.json","packages/@react-spectrum/tag/intl/et-EE.json","packages/@react-spectrum/tag/intl/fi-FI.json","packages/@react-spectrum/tag/intl/fr-FR.json","packages/@react-spectrum/tag/intl/he-IL.json","packages/@react-spectrum/tag/intl/hr-HR.json","packages/@react-spectrum/tag/intl/hu-HU.json","packages/@react-spectrum/tag/intl/it-IT.json","packages/@react-spectrum/tag/intl/ja-JP.json","packages/@react-spectrum/tag/intl/ko-KR.json","packages/@react-spectrum/tag/intl/lt-LT.json","packages/@react-spectrum/tag/intl/lv-LV.json","packages/@react-spectrum/tag/intl/nb-NO.json","packages/@react-spectrum/tag/intl/nl-NL.json","packages/@react-spectrum/tag/intl/pl-PL.json","packages/@react-spectrum/tag/intl/pt-BR.json","packages/@react-spectrum/tag/intl/pt-PT.json","packages/@react-spectrum/tag/intl/ro-RO.json","packages/@react-spectrum/tag/intl/ru-RU.json","packages/@react-spectrum/tag/intl/sk-SK.json","packages/@react-spectrum/tag/intl/sl-SI.json","packages/@react-spectrum/tag/intl/sr-SP.json","packages/@react-spectrum/tag/intl/sv-SE.json","packages/@react-spectrum/tag/intl/tr-TR.json","packages/@react-spectrum/tag/intl/uk-UA.json","packages/@react-spectrum/tag/intl/zh-CN.json","packages/@react-spectrum/tag/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/tags/vars.css","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\nexport {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaTagGroupProps, TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing, FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListCollection, useListState} from '@react-stately/list';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'keyboardDelegate'>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {\n /** The label to display on the action button. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Sets what the TagGroup should render when there are no tags to display. */\n renderEmptyState?: () => JSX.Element\n}\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n allowsRemoving,\n onRemove,\n maxRows,\n children,\n actionLabel,\n onAction,\n labelPosition,\n renderEmptyState = () => stringFormatter.format('noTags')\n } = props;\n let domRef = useDOMRef(ref);\n let containerRef = useRef(null);\n let tagsRef = useRef(null);\n let {direction} = useLocale();\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let [isCollapsed, setIsCollapsed] = useState(maxRows != null);\n let state = useListState(props);\n let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false, maxHeight: undefined});\n let keyboardDelegate = useMemo(() => (\n isCollapsed\n ? new TagKeyboardDelegate(new ListCollection([...state.collection].slice(0, tagState.visibleTagCount)), direction)\n : new TagKeyboardDelegate(new ListCollection([...state.collection]), direction)\n ), [direction, isCollapsed, state.collection, tagState.visibleTagCount]) as TagKeyboardDelegate<T>;\n // Remove onAction from props so it doesn't make it into useGridList.\n delete props.onAction;\n let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);\n let actionsId = useId();\n\n let updateVisibleTagCount = useCallback(() => {\n if (maxRows > 0) {\n let computeVisibleTagCount = () => {\n // Refs can be null at runtime.\n let currContainerRef: HTMLDivElement | null = containerRef.current;\n let currTagsRef: HTMLDivElement | null = tagsRef.current;\n if (!currContainerRef || !currTagsRef) {\n return;\n }\n\n let tags = [...currTagsRef.children];\n let buttons = [...currContainerRef.parentElement.querySelectorAll('button')];\n if (tags.length === 0 || buttons.length === 0) {\n return {\n visibleTagCount: 0,\n showCollapseButton: false,\n maxHeight: undefined\n };\n }\n let currY = -Infinity;\n let rowCount = 0;\n let index = 0;\n let tagWidths: number[] = [];\n // Count rows and show tags until we hit the maxRows.\n for (let tag of tags) {\n let {width, y} = tag.getBoundingClientRect();\n\n if (y !== currY) {\n currY = y;\n rowCount++;\n }\n\n if (rowCount > maxRows) {\n break;\n }\n tagWidths.push(width);\n index++;\n }\n\n // Remove tags until there is space for the collapse button and action button (if present) on the last row.\n let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);\n buttonsWidth += parseInt(window.getComputedStyle(buttons[buttons.length - 1]).marginRight, 10) * 2;\n let end = direction === 'ltr' ? 'right' : 'left';\n let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];\n let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];\n lastTagEnd += parseInt(window.getComputedStyle(tags[index - 1]).marginRight, 10);\n let availableWidth = containerEnd - lastTagEnd;\n\n while (availableWidth < buttonsWidth && index < state.collection.size && index > 0) {\n availableWidth += tagWidths.pop();\n index--;\n }\n let tagStyle = window.getComputedStyle(tags[0]);\n let maxHeight = (parseInt(tagStyle.height, 10) + parseInt(tagStyle.marginTop, 10) * 2) * maxRows;\n return {\n visibleTagCount: index,\n showCollapseButton: index < state.collection.size,\n maxHeight\n };\n };\n\n setTagState(function *() {\n // Update to show all items.\n yield {visibleTagCount: state.collection.size, showCollapseButton: true, maxHeight: undefined};\n\n // Measure, and update to show the items until maxRows is reached.\n yield computeVisibleTagCount();\n });\n }\n }, [maxRows, setTagState, direction, state.collection.size]);\n\n useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(updateVisibleTagCount, [children]);\n\n useEffect(() => {\n // Recalculate visible tags when fonts are loaded.\n document.fonts?.ready.then(() => updateVisibleTagCount());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n let visibleTags = [...state.collection];\n if (maxRows != null && isCollapsed) {\n visibleTags = visibleTags.slice(0, tagState.visibleTagCount);\n }\n\n let handlePressCollapse = () => {\n // Prevents button from losing focus if focusedKey got collapsed.\n state.selectionManager.setFocusedKey(null);\n setIsCollapsed(prevCollapsed => !prevCollapsed);\n };\n\n let showActions = tagState.showCollapseButton || (actionLabel && onAction);\n let isEmpty = state.collection.size === 0;\n\n return (\n <FocusScope>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon\n ref={domRef}\n elementType=\"span\"\n wrapperClassName={\n classNames(\n styles,\n 'spectrum-Tags-fieldWrapper',\n {\n 'spectrum-Tags-fieldWrapper--positionSide': labelPosition === 'side'\n }\n )\n }>\n <div\n style={maxRows != null && tagState.showCollapseButton && isCollapsed ? {maxHeight: tagState.maxHeight, overflow: 'hidden'} : undefined}\n ref={containerRef}\n className={\n classNames(\n styles,\n 'spectrum-Tags-container',\n {\n 'spectrum-Tags-container--empty': isEmpty\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n ref={tagsRef}\n {...gridProps}\n className={classNames(styles, 'spectrum-Tags')}>\n {visibleTags.map(item => (\n <Tag\n {...item.props}\n key={item.key}\n item={item}\n state={state}\n allowsRemoving={allowsRemoving}\n onRemove={onRemove}>\n {item.rendered}\n </Tag>\n ))}\n {isEmpty && (\n <div className={classNames(styles, 'spectrum-Tags-empty-state')}>\n {renderEmptyState()}\n </div>\n )}\n </div>\n </FocusRing>\n {showActions && !isEmpty &&\n <Provider isDisabled={false}>\n <div\n role=\"group\"\n id={actionsId}\n aria-label={stringFormatter.format('actions')}\n aria-labelledby={`${gridProps.id} ${actionsId}`}\n className={classNames(styles, 'spectrum-Tags-actions')}>\n {tagState.showCollapseButton &&\n <ActionButton\n isQuiet\n onPress={handlePressCollapse}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {isCollapsed ?\n stringFormatter.format('showAllButtonLabel', {tagCount: state.collection.size}) :\n stringFormatter.format('hideButtonLabel')\n }\n </ActionButton>\n }\n {actionLabel && onAction &&\n <ActionButton\n isQuiet\n onPress={() => onAction?.()}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {actionLabel}\n </ActionButton>\n }\n </div>\n </Provider>\n }\n </div>\n </Field>\n </FocusScope>\n );\n}\n\n/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as TagGroup};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"actions\": \"الإجراءات\",\n \"hideButtonLabel\": \"إظهار أقل\",\n \"showAllButtonLabel\": \"عرض الكل ({tagCount, number})\",\n \"noTags\": \"None\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показване на по-малко\",\n \"showAllButtonLabel\": \"Показване на всички ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akce\",\n \"hideButtonLabel\": \"Zobrazit méně\",\n \"showAllButtonLabel\": \"Zobrazit vše ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Aktionen\",\n \"hideButtonLabel\": \"Weniger zeigen\",\n \"showAllButtonLabel\": \"Alle anzeigen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ενέργειες\",\n \"hideButtonLabel\": \"Εμφάνιση λιγότερων\",\n \"showAllButtonLabel\": \"Εμφάνιση όλων ({tagCount, number})\"\n}\n","{\n \"showAllButtonLabel\": \"Show all ({tagCount, number})\",\n \"hideButtonLabel\": \"Show less\",\n \"actions\": \"Actions\",\n \"noTags\": \"None\"\n}\n","{\n \"actions\": \"Acciones\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar todo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toimingud\",\n \"hideButtonLabel\": \"Kuva vähem\",\n \"showAllButtonLabel\": \"Kuva kõik ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toiminnot\",\n \"hideButtonLabel\": \"Näytä vähemmän\",\n \"showAllButtonLabel\": \"Näytä kaikki ({tagCount, number})\"\n}\n","{\n \"actions\": \"Actions\",\n \"hideButtonLabel\": \"Afficher moins\",\n \"showAllButtonLabel\": \"Tout afficher ({tagCount, number})\"\n}\n","{\n \"actions\": \"פעולות\",\n \"hideButtonLabel\": \"הצג פחות\",\n \"showAllButtonLabel\": \"הצג הכל ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Műveletek\",\n \"hideButtonLabel\": \"Mutass kevesebbet\",\n \"showAllButtonLabel\": \"Az összes megjelenítése ({tagCount, number})\"\n}\n","{\n \"actions\": \"Azioni\",\n \"hideButtonLabel\": \"Mostra meno\",\n \"showAllButtonLabel\": \"Mostra tutto ({tagCount, number})\"\n}\n","{\n \"actions\": \"アクション\",\n \"hideButtonLabel\": \"表示を減らす\",\n \"showAllButtonLabel\": \"すべての ({tagCount, number}) を表示\"\n}\n","{\n \"actions\": \"액션\",\n \"hideButtonLabel\": \"간단히 표시\",\n \"showAllButtonLabel\": \"모두 표시 ({tagCount, number})\"\n}\n","{\n \"actions\": \"Veiksmai\",\n \"hideButtonLabel\": \"Rodyti mažiau\",\n \"showAllButtonLabel\": \"Rodyti viską ({tagCount, number})\"\n}\n","{\n \"actions\": \"Darbības\",\n \"hideButtonLabel\": \"Rādīt mazāk\",\n \"showAllButtonLabel\": \"Rādīt visu ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acties\",\n \"hideButtonLabel\": \"Minder weergeven\",\n \"showAllButtonLabel\": \"Alles tonen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Działania\",\n \"hideButtonLabel\": \"Wyświetl mniej\",\n \"showAllButtonLabel\": \"Pokaż wszystko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acțiuni\",\n \"hideButtonLabel\": \"Se afișează mai puțin\",\n \"showAllButtonLabel\": \"Se afișează tot ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показать меньше\",\n \"showAllButtonLabel\": \"Показать все ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akcie\",\n \"hideButtonLabel\": \"Zobraziť menej\",\n \"showAllButtonLabel\": \"Zobraziť všetko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Dejanja\",\n \"hideButtonLabel\": \"Prikaži manj\",\n \"showAllButtonLabel\": \"Prikaž vse ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Åtgärder\",\n \"hideButtonLabel\": \"Visa mindre\",\n \"showAllButtonLabel\": \"Visa alla ({tagCount, number})\"\n}\n","{\n \"actions\": \"Eylemler\",\n \"hideButtonLabel\": \"Daha az göster\",\n \"showAllButtonLabel\": \"Tümünü göster ({tagCount, number})\"\n}\n","{\n \"actions\": \"Дії\",\n \"hideButtonLabel\": \"Показувати менше\",\n \"showAllButtonLabel\": \"Показати всі ({tagCount, number})\"\n}\n","{\n \"actions\": \"操作\",\n \"hideButtonLabel\": \"显示更少\",\n \"showAllButtonLabel\": \"全部显示 ({tagCount, number})\"\n}\n","{\n \"actions\": \"動作\",\n \"hideButtonLabel\": \"顯示較少\",\n \"showAllButtonLabel\": \"顯示全部 ({tagCount, number})\"\n}\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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, 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, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {TagProps} from '@react-types/tag';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport interface SpectrumTagProps<T> extends TagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n allowsRemoving,\n item,\n state,\n onRemove,\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: true});\n let ref = useRef();\n let {removeButtonProps, labelProps, gridCellProps, rowProps} = useTag({\n ...props,\n allowsRemoving,\n item,\n onRemove\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'), ...labelProps},\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} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -4,7 +4,7 @@ import {ActionButton as $fUaQ2$ActionButton, ClearButton as $fUaQ2$ClearButton}
|
|
|
4
4
|
import {TagKeyboardDelegate as $fUaQ2$TagKeyboardDelegate, useTagGroup as $fUaQ2$useTagGroup, useTag as $fUaQ2$useTag} from "@react-aria/tag";
|
|
5
5
|
import {useDOMRef as $fUaQ2$useDOMRef, classNames as $fUaQ2$classNames, useStyleProps as $fUaQ2$useStyleProps, SlotProvider as $fUaQ2$SlotProvider, ClearSlots as $fUaQ2$ClearSlots} from "@react-spectrum/utils";
|
|
6
6
|
import {Field as $fUaQ2$Field} from "@react-spectrum/label";
|
|
7
|
-
import {FocusScope as $fUaQ2$FocusScope, useFocusRing as $fUaQ2$useFocusRing} from "@react-aria/focus";
|
|
7
|
+
import {FocusScope as $fUaQ2$FocusScope, FocusRing as $fUaQ2$FocusRing, useFocusRing as $fUaQ2$useFocusRing} from "@react-aria/focus";
|
|
8
8
|
import {useListState as $fUaQ2$useListState, ListCollection as $fUaQ2$ListCollection} from "@react-stately/list";
|
|
9
9
|
import {useProviderProps as $fUaQ2$useProviderProps, Provider as $fUaQ2$Provider} from "@react-spectrum/provider";
|
|
10
10
|
import $fUaQ2$react, {useRef as $fUaQ2$useRef, useState as $fUaQ2$useState, useMemo as $fUaQ2$useMemo, useCallback as $fUaQ2$useCallback, useEffect as $fUaQ2$useEffect} from "react";
|
|
@@ -50,7 +50,8 @@ var $4f97095b36611c9c$exports = {};
|
|
|
50
50
|
$4f97095b36611c9c$exports = {
|
|
51
51
|
"actions": `الإجراءات`,
|
|
52
52
|
"hideButtonLabel": `إظهار أقل`,
|
|
53
|
-
"showAllButtonLabel": (args, formatter)=>`عرض الكل (${formatter.number(args.tagCount)})
|
|
53
|
+
"showAllButtonLabel": (args, formatter)=>`عرض الكل (${formatter.number(args.tagCount)})`,
|
|
54
|
+
"noTags": `None`
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
|
|
@@ -98,7 +99,8 @@ var $edf02907a7caaf96$exports = {};
|
|
|
98
99
|
$edf02907a7caaf96$exports = {
|
|
99
100
|
"showAllButtonLabel": (args, formatter)=>`Show all (${formatter.number(args.tagCount)})`,
|
|
100
101
|
"hideButtonLabel": `Show less`,
|
|
101
|
-
"actions": `Actions
|
|
102
|
+
"actions": `Actions`,
|
|
103
|
+
"noTags": `None`
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
|
|
@@ -365,6 +367,7 @@ $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag", () => $c033a7c057e84ef
|
|
|
365
367
|
$parcel$export($c033a7c057e84ef1$exports, "focus-ring", () => $c033a7c057e84ef1$export$f39a09f249340e2a, (v) => $c033a7c057e84ef1$export$f39a09f249340e2a = v);
|
|
366
368
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags", () => $c033a7c057e84ef1$export$eb7e80013a1212da, (v) => $c033a7c057e84ef1$export$eb7e80013a1212da = v);
|
|
367
369
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-container", () => $c033a7c057e84ef1$export$3300169c5d27fe96, (v) => $c033a7c057e84ef1$export$3300169c5d27fe96 = v);
|
|
370
|
+
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-container--empty", () => $c033a7c057e84ef1$export$a5e59d283417e02b, (v) => $c033a7c057e84ef1$export$a5e59d283417e02b = v);
|
|
368
371
|
$parcel$export($c033a7c057e84ef1$exports, "is-disabled", () => $c033a7c057e84ef1$export$d35bc1e505d1ebbf, (v) => $c033a7c057e84ef1$export$d35bc1e505d1ebbf = v);
|
|
369
372
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag-removeButton", () => $c033a7c057e84ef1$export$23a76b996f0a6c1, (v) => $c033a7c057e84ef1$export$23a76b996f0a6c1 = v);
|
|
370
373
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag-cell", () => $c033a7c057e84ef1$export$9c4fd4d7faada408, (v) => $c033a7c057e84ef1$export$9c4fd4d7faada408 = v);
|
|
@@ -376,12 +379,14 @@ $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-actions", () => $c033a7
|
|
|
376
379
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-actionButton", () => $c033a7c057e84ef1$export$e6882f8db018e3bd, (v) => $c033a7c057e84ef1$export$e6882f8db018e3bd = v);
|
|
377
380
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-fieldWrapper", () => $c033a7c057e84ef1$export$c9b7ca327d69b2b5, (v) => $c033a7c057e84ef1$export$c9b7ca327d69b2b5 = v);
|
|
378
381
|
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-fieldWrapper--positionSide", () => $c033a7c057e84ef1$export$a7c11d4acc244e09, (v) => $c033a7c057e84ef1$export$a7c11d4acc244e09 = v);
|
|
382
|
+
$parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-empty-state", () => $c033a7c057e84ef1$export$cd48f925394bb16, (v) => $c033a7c057e84ef1$export$cd48f925394bb16 = v);
|
|
379
383
|
$parcel$export($c033a7c057e84ef1$exports, "is-hovered", () => $c033a7c057e84ef1$export$b8813cd5d7824ce7, (v) => $c033a7c057e84ef1$export$b8813cd5d7824ce7 = v);
|
|
380
384
|
$parcel$export($c033a7c057e84ef1$exports, "is-focused", () => $c033a7c057e84ef1$export$e7dc768d35940237, (v) => $c033a7c057e84ef1$export$e7dc768d35940237 = v);
|
|
381
385
|
var $c033a7c057e84ef1$export$6174bd1d20b4c022;
|
|
382
386
|
var $c033a7c057e84ef1$export$f39a09f249340e2a;
|
|
383
387
|
var $c033a7c057e84ef1$export$eb7e80013a1212da;
|
|
384
388
|
var $c033a7c057e84ef1$export$3300169c5d27fe96;
|
|
389
|
+
var $c033a7c057e84ef1$export$a5e59d283417e02b;
|
|
385
390
|
var $c033a7c057e84ef1$export$d35bc1e505d1ebbf;
|
|
386
391
|
var $c033a7c057e84ef1$export$23a76b996f0a6c1;
|
|
387
392
|
var $c033a7c057e84ef1$export$9c4fd4d7faada408;
|
|
@@ -393,12 +398,14 @@ var $c033a7c057e84ef1$export$8afaa02110915bbb;
|
|
|
393
398
|
var $c033a7c057e84ef1$export$e6882f8db018e3bd;
|
|
394
399
|
var $c033a7c057e84ef1$export$c9b7ca327d69b2b5;
|
|
395
400
|
var $c033a7c057e84ef1$export$a7c11d4acc244e09;
|
|
401
|
+
var $c033a7c057e84ef1$export$cd48f925394bb16;
|
|
396
402
|
var $c033a7c057e84ef1$export$b8813cd5d7824ce7;
|
|
397
403
|
var $c033a7c057e84ef1$export$e7dc768d35940237;
|
|
398
404
|
$c033a7c057e84ef1$export$6174bd1d20b4c022 = "spectrum-Tag_8407eb";
|
|
399
405
|
$c033a7c057e84ef1$export$f39a09f249340e2a = "focus-ring_8407eb";
|
|
400
406
|
$c033a7c057e84ef1$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
|
|
401
407
|
$c033a7c057e84ef1$export$3300169c5d27fe96 = "spectrum-Tags-container_8407eb";
|
|
408
|
+
$c033a7c057e84ef1$export$a5e59d283417e02b = "spectrum-Tags-container--empty_8407eb";
|
|
402
409
|
$c033a7c057e84ef1$export$d35bc1e505d1ebbf = "is-disabled_8407eb";
|
|
403
410
|
$c033a7c057e84ef1$export$23a76b996f0a6c1 = "spectrum-Tag-removeButton_8407eb";
|
|
404
411
|
$c033a7c057e84ef1$export$9c4fd4d7faada408 = "spectrum-Tag-cell_8407eb";
|
|
@@ -410,6 +417,7 @@ $c033a7c057e84ef1$export$8afaa02110915bbb = "spectrum-Tags-actions_8407eb";
|
|
|
410
417
|
$c033a7c057e84ef1$export$e6882f8db018e3bd = "spectrum-Tags-actionButton_8407eb";
|
|
411
418
|
$c033a7c057e84ef1$export$c9b7ca327d69b2b5 = "spectrum-Tags-fieldWrapper_8407eb";
|
|
412
419
|
$c033a7c057e84ef1$export$a7c11d4acc244e09 = "spectrum-Tags-fieldWrapper--positionSide_8407eb";
|
|
420
|
+
$c033a7c057e84ef1$export$cd48f925394bb16 = "spectrum-Tags-empty-state_8407eb";
|
|
413
421
|
$c033a7c057e84ef1$export$b8813cd5d7824ce7 = "is-hovered_8407eb";
|
|
414
422
|
$c033a7c057e84ef1$export$e7dc768d35940237 = "is-focused_8407eb";
|
|
415
423
|
|
|
@@ -493,7 +501,7 @@ function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
|
|
|
493
501
|
function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
494
502
|
props = (0, $fUaQ2$useProviderProps)(props);
|
|
495
503
|
props = (0, $fUaQ2$useFormProps)(props);
|
|
496
|
-
let { allowsRemoving: allowsRemoving , onRemove: onRemove , maxRows: maxRows , children: children , actionLabel: actionLabel , onAction: onAction , labelPosition: labelPosition } = props;
|
|
504
|
+
let { allowsRemoving: allowsRemoving , onRemove: onRemove , maxRows: maxRows , children: children , actionLabel: actionLabel , onAction: onAction , labelPosition: labelPosition , renderEmptyState: renderEmptyState = ()=>stringFormatter.format("noTags") } = props;
|
|
497
505
|
let domRef = (0, $fUaQ2$useDOMRef)(ref);
|
|
498
506
|
let containerRef = (0, $fUaQ2$useRef)(null);
|
|
499
507
|
let tagsRef = (0, $fUaQ2$useRef)(null);
|
|
@@ -537,6 +545,11 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
537
545
|
let buttons = [
|
|
538
546
|
...currContainerRef.parentElement.querySelectorAll("button")
|
|
539
547
|
];
|
|
548
|
+
if (tags.length === 0 || buttons.length === 0) return {
|
|
549
|
+
visibleTagCount: 0,
|
|
550
|
+
showCollapseButton: false,
|
|
551
|
+
maxHeight: undefined
|
|
552
|
+
};
|
|
540
553
|
let currY = -Infinity;
|
|
541
554
|
let rowCount = 0;
|
|
542
555
|
let index = 0;
|
|
@@ -613,6 +626,7 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
613
626
|
setIsCollapsed((prevCollapsed)=>!prevCollapsed);
|
|
614
627
|
};
|
|
615
628
|
let showActions = tagState.showCollapseButton || actionLabel && onAction;
|
|
629
|
+
let isEmpty = state.collection.size === 0;
|
|
616
630
|
return /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$FocusScope), null, /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$Field), {
|
|
617
631
|
...props,
|
|
618
632
|
labelProps: labelProps,
|
|
@@ -630,7 +644,11 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
630
644
|
overflow: "hidden"
|
|
631
645
|
} : undefined,
|
|
632
646
|
ref: containerRef,
|
|
633
|
-
className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags-container"
|
|
647
|
+
className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags-container", {
|
|
648
|
+
"spectrum-Tags-container--empty": isEmpty
|
|
649
|
+
})
|
|
650
|
+
}, /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$FocusRing), {
|
|
651
|
+
focusRingClass: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "focus-ring")
|
|
634
652
|
}, /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
|
|
635
653
|
ref: tagsRef,
|
|
636
654
|
...gridProps,
|
|
@@ -642,7 +660,9 @@ function $880d112c7a588209$var$TagGroup(props, ref) {
|
|
|
642
660
|
state: state,
|
|
643
661
|
allowsRemoving: allowsRemoving,
|
|
644
662
|
onRemove: onRemove
|
|
645
|
-
}, item.rendered))
|
|
663
|
+
}, item.rendered)), isEmpty && /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
|
|
664
|
+
className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags-empty-state")
|
|
665
|
+
}, renderEmptyState()))), showActions && !isEmpty && /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$Provider), {
|
|
646
666
|
isDisabled: false
|
|
647
667
|
}, /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
|
|
648
668
|
role: "group",
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;AEZA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,mBAAmB,C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;YACP,gBAAgB;YAChB,UAAU;WACT,KAAK,QAAQ,KAInB,6BACC,gCAAC,CAAA,GAAA,eAAQ,AAAD;QAAE,YAAY,KAAK;qBACzB,gCAAC;QACC,MAAK;QACL,IAAI;QACJ,cAAY,gBAAgB,MAAM,CAAC;QACnC,mBAAiB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC;QAC/C,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OAC7B,SAAS,kBAAkB,kBAC1B,gCAAC,CAAA,GAAA,mBAAY,AAAD;QACV,SAAA,IAAO;QACP,SAAS;QACT,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC,cACC,gBAAgB,MAAM,CAAC,sBAAsB;QAAC,UAAU,MAAM,UAAU,CAAC,IAAI;IAAA,KAC7E,gBAAgB,MAAM,CAAC,kBAAkB,GAI9C,eAAe,0BACd,gCAAC,CAAA,GAAA,mBAAW;QACV,SAAA,IAAO;QACP,SAAS;YAAM,OAAA,qBAAA,sBAAA,KAAA,IAAA;;QACf,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC;AAUrB;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;;CD3NlC,GAED","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/intl/*.js","packages/@react-spectrum/tag/intl/ar-AE.json","packages/@react-spectrum/tag/intl/bg-BG.json","packages/@react-spectrum/tag/intl/cs-CZ.json","packages/@react-spectrum/tag/intl/da-DK.json","packages/@react-spectrum/tag/intl/de-DE.json","packages/@react-spectrum/tag/intl/el-GR.json","packages/@react-spectrum/tag/intl/en-US.json","packages/@react-spectrum/tag/intl/es-ES.json","packages/@react-spectrum/tag/intl/et-EE.json","packages/@react-spectrum/tag/intl/fi-FI.json","packages/@react-spectrum/tag/intl/fr-FR.json","packages/@react-spectrum/tag/intl/he-IL.json","packages/@react-spectrum/tag/intl/hr-HR.json","packages/@react-spectrum/tag/intl/hu-HU.json","packages/@react-spectrum/tag/intl/it-IT.json","packages/@react-spectrum/tag/intl/ja-JP.json","packages/@react-spectrum/tag/intl/ko-KR.json","packages/@react-spectrum/tag/intl/lt-LT.json","packages/@react-spectrum/tag/intl/lv-LV.json","packages/@react-spectrum/tag/intl/nb-NO.json","packages/@react-spectrum/tag/intl/nl-NL.json","packages/@react-spectrum/tag/intl/pl-PL.json","packages/@react-spectrum/tag/intl/pt-BR.json","packages/@react-spectrum/tag/intl/pt-PT.json","packages/@react-spectrum/tag/intl/ro-RO.json","packages/@react-spectrum/tag/intl/ru-RU.json","packages/@react-spectrum/tag/intl/sk-SK.json","packages/@react-spectrum/tag/intl/sl-SI.json","packages/@react-spectrum/tag/intl/sr-SP.json","packages/@react-spectrum/tag/intl/sv-SE.json","packages/@react-spectrum/tag/intl/tr-TR.json","packages/@react-spectrum/tag/intl/uk-UA.json","packages/@react-spectrum/tag/intl/zh-CN.json","packages/@react-spectrum/tag/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/tags/vars.css","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\nexport {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaTagGroupProps, TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListCollection, useListState} from '@react-stately/list';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'keyboardDelegate'>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {\n /** The label to display on the action button. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void\n}\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n allowsRemoving,\n onRemove,\n maxRows,\n children,\n actionLabel,\n onAction,\n labelPosition\n } = props;\n let domRef = useDOMRef(ref);\n let containerRef = useRef(null);\n let tagsRef = useRef(null);\n let {direction} = useLocale();\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let [isCollapsed, setIsCollapsed] = useState(maxRows != null);\n let state = useListState(props);\n let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false, maxHeight: undefined});\n let keyboardDelegate = useMemo(() => (\n isCollapsed\n ? new TagKeyboardDelegate(new ListCollection([...state.collection].slice(0, tagState.visibleTagCount)), direction)\n : new TagKeyboardDelegate(new ListCollection([...state.collection]), direction)\n ), [direction, isCollapsed, state.collection, tagState.visibleTagCount]) as TagKeyboardDelegate<T>;\n // Remove onAction from props so it doesn't make it into useGridList.\n delete props.onAction;\n let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);\n let actionsId = useId();\n\n let updateVisibleTagCount = useCallback(() => {\n if (maxRows > 0) {\n let computeVisibleTagCount = () => {\n // Refs can be null at runtime.\n let currContainerRef: HTMLDivElement | null = containerRef.current;\n let currTagsRef: HTMLDivElement | null = tagsRef.current;\n if (!currContainerRef || !currTagsRef) {\n return;\n }\n\n let tags = [...currTagsRef.children];\n let buttons = [...currContainerRef.parentElement.querySelectorAll('button')];\n let currY = -Infinity;\n let rowCount = 0;\n let index = 0;\n let tagWidths: number[] = [];\n // Count rows and show tags until we hit the maxRows.\n for (let tag of tags) {\n let {width, y} = tag.getBoundingClientRect();\n\n if (y !== currY) {\n currY = y;\n rowCount++;\n }\n\n if (rowCount > maxRows) {\n break;\n }\n tagWidths.push(width);\n index++;\n }\n\n // Remove tags until there is space for the collapse button and action button (if present) on the last row.\n let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);\n buttonsWidth += parseInt(window.getComputedStyle(buttons[buttons.length - 1]).marginRight, 10) * 2;\n let end = direction === 'ltr' ? 'right' : 'left';\n let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];\n let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];\n lastTagEnd += parseInt(window.getComputedStyle(tags[index - 1]).marginRight, 10);\n let availableWidth = containerEnd - lastTagEnd;\n\n while (availableWidth < buttonsWidth && index < state.collection.size && index > 0) {\n availableWidth += tagWidths.pop();\n index--;\n }\n let tagStyle = window.getComputedStyle(tags[0]);\n let maxHeight = (parseInt(tagStyle.height, 10) + parseInt(tagStyle.marginTop, 10) * 2) * maxRows;\n return {\n visibleTagCount: index,\n showCollapseButton: index < state.collection.size,\n maxHeight\n };\n };\n\n setTagState(function *() {\n // Update to show all items.\n yield {visibleTagCount: state.collection.size, showCollapseButton: true, maxHeight: undefined};\n\n // Measure, and update to show the items until maxRows is reached.\n yield computeVisibleTagCount();\n });\n }\n }, [maxRows, setTagState, direction, state.collection.size]);\n\n useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(updateVisibleTagCount, [children]);\n\n useEffect(() => {\n // Recalculate visible tags when fonts are loaded.\n document.fonts?.ready.then(() => updateVisibleTagCount());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n let visibleTags = [...state.collection];\n if (maxRows != null && isCollapsed) {\n visibleTags = visibleTags.slice(0, tagState.visibleTagCount);\n }\n\n let handlePressCollapse = () => {\n // Prevents button from losing focus if focusedKey got collapsed.\n state.selectionManager.setFocusedKey(null);\n setIsCollapsed(prevCollapsed => !prevCollapsed);\n };\n\n let showActions = tagState.showCollapseButton || (actionLabel && onAction);\n\n return (\n <FocusScope>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon\n ref={domRef}\n elementType=\"span\"\n wrapperClassName={\n classNames(\n styles,\n 'spectrum-Tags-fieldWrapper',\n {\n 'spectrum-Tags-fieldWrapper--positionSide': labelPosition === 'side'\n }\n )\n }>\n <div\n style={maxRows != null && tagState.showCollapseButton && isCollapsed ? {maxHeight: tagState.maxHeight, overflow: 'hidden'} : undefined}\n ref={containerRef}\n className={classNames(styles, 'spectrum-Tags-container')}>\n <div\n ref={tagsRef}\n {...gridProps}\n className={classNames(styles, 'spectrum-Tags')}>\n {visibleTags.map(item => (\n <Tag\n {...item.props}\n key={item.key}\n item={item}\n state={state}\n allowsRemoving={allowsRemoving}\n onRemove={onRemove}>\n {item.rendered}\n </Tag>\n ))}\n </div>\n {showActions &&\n <Provider isDisabled={false}>\n <div\n role=\"group\"\n id={actionsId}\n aria-label={stringFormatter.format('actions')}\n aria-labelledby={`${gridProps.id} ${actionsId}`}\n className={classNames(styles, 'spectrum-Tags-actions')}>\n {tagState.showCollapseButton &&\n <ActionButton\n isQuiet\n onPress={handlePressCollapse}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {isCollapsed ?\n stringFormatter.format('showAllButtonLabel', {tagCount: state.collection.size}) :\n stringFormatter.format('hideButtonLabel')\n }\n </ActionButton>\n }\n {actionLabel && onAction &&\n <ActionButton\n isQuiet\n onPress={() => onAction?.()}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {actionLabel}\n </ActionButton>\n }\n </div>\n </Provider>\n }\n </div>\n </Field>\n </FocusScope>\n );\n}\n\n/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as TagGroup};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"actions\": \"الإجراءات\",\n \"hideButtonLabel\": \"إظهار أقل\",\n \"showAllButtonLabel\": \"عرض الكل ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показване на по-малко\",\n \"showAllButtonLabel\": \"Показване на всички ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akce\",\n \"hideButtonLabel\": \"Zobrazit méně\",\n \"showAllButtonLabel\": \"Zobrazit vše ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Aktionen\",\n \"hideButtonLabel\": \"Weniger zeigen\",\n \"showAllButtonLabel\": \"Alle anzeigen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ενέργειες\",\n \"hideButtonLabel\": \"Εμφάνιση λιγότερων\",\n \"showAllButtonLabel\": \"Εμφάνιση όλων ({tagCount, number})\"\n}\n","{\n \"showAllButtonLabel\": \"Show all ({tagCount, number})\",\n \"hideButtonLabel\": \"Show less\",\n \"actions\": \"Actions\"\n}\n","{\n \"actions\": \"Acciones\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar todo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toimingud\",\n \"hideButtonLabel\": \"Kuva vähem\",\n \"showAllButtonLabel\": \"Kuva kõik ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toiminnot\",\n \"hideButtonLabel\": \"Näytä vähemmän\",\n \"showAllButtonLabel\": \"Näytä kaikki ({tagCount, number})\"\n}\n","{\n \"actions\": \"Actions\",\n \"hideButtonLabel\": \"Afficher moins\",\n \"showAllButtonLabel\": \"Tout afficher ({tagCount, number})\"\n}\n","{\n \"actions\": \"פעולות\",\n \"hideButtonLabel\": \"הצג פחות\",\n \"showAllButtonLabel\": \"הצג הכל ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Műveletek\",\n \"hideButtonLabel\": \"Mutass kevesebbet\",\n \"showAllButtonLabel\": \"Az összes megjelenítése ({tagCount, number})\"\n}\n","{\n \"actions\": \"Azioni\",\n \"hideButtonLabel\": \"Mostra meno\",\n \"showAllButtonLabel\": \"Mostra tutto ({tagCount, number})\"\n}\n","{\n \"actions\": \"アクション\",\n \"hideButtonLabel\": \"表示を減らす\",\n \"showAllButtonLabel\": \"すべての ({tagCount, number}) を表示\"\n}\n","{\n \"actions\": \"액션\",\n \"hideButtonLabel\": \"간단히 표시\",\n \"showAllButtonLabel\": \"모두 표시 ({tagCount, number})\"\n}\n","{\n \"actions\": \"Veiksmai\",\n \"hideButtonLabel\": \"Rodyti mažiau\",\n \"showAllButtonLabel\": \"Rodyti viską ({tagCount, number})\"\n}\n","{\n \"actions\": \"Darbības\",\n \"hideButtonLabel\": \"Rādīt mazāk\",\n \"showAllButtonLabel\": \"Rādīt visu ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acties\",\n \"hideButtonLabel\": \"Minder weergeven\",\n \"showAllButtonLabel\": \"Alles tonen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Działania\",\n \"hideButtonLabel\": \"Wyświetl mniej\",\n \"showAllButtonLabel\": \"Pokaż wszystko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acțiuni\",\n \"hideButtonLabel\": \"Se afișează mai puțin\",\n \"showAllButtonLabel\": \"Se afișează tot ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показать меньше\",\n \"showAllButtonLabel\": \"Показать все ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akcie\",\n \"hideButtonLabel\": \"Zobraziť menej\",\n \"showAllButtonLabel\": \"Zobraziť všetko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Dejanja\",\n \"hideButtonLabel\": \"Prikaži manj\",\n \"showAllButtonLabel\": \"Prikaž vse ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Åtgärder\",\n \"hideButtonLabel\": \"Visa mindre\",\n \"showAllButtonLabel\": \"Visa alla ({tagCount, number})\"\n}\n","{\n \"actions\": \"Eylemler\",\n \"hideButtonLabel\": \"Daha az göster\",\n \"showAllButtonLabel\": \"Tümünü göster ({tagCount, number})\"\n}\n","{\n \"actions\": \"Дії\",\n \"hideButtonLabel\": \"Показувати менше\",\n \"showAllButtonLabel\": \"Показати всі ({tagCount, number})\"\n}\n","{\n \"actions\": \"操作\",\n \"hideButtonLabel\": \"显示更少\",\n \"showAllButtonLabel\": \"全部显示 ({tagCount, number})\"\n}\n","{\n \"actions\": \"動作\",\n \"hideButtonLabel\": \"顯示較少\",\n \"showAllButtonLabel\": \"顯示全部 ({tagCount, number})\"\n}\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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, 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, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {TagProps} from '@react-types/tag';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport interface SpectrumTagProps<T> extends TagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n allowsRemoving,\n item,\n state,\n onRemove,\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: true});\n let ref = useRef();\n let {removeButtonProps, labelProps, gridCellProps, rowProps} = useTag({\n ...props,\n allowsRemoving,\n item,\n onRemove\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'), ...labelProps},\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} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;AEZA,4BAAiB;IAAG,WAAW,CAAC,SAAS,CAAC;IACxC,mBAAmB,CAAC,SAAS,CAAC;IAC9B,sBAAsB,CAAC,MAAM,YAAc,CAAC,UAAU,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;IAC1F,UAAU,CAAC,IAAI,CAAC;AAClB;;ADJA;;AEAA,4BAAiB;IAAG,WAAW,CAAC,QAAQ,CAAC;IACvC,mBAAmB,CAAC,qBAAqB,CAAC;IAC1C,sBAAsB,CAAC,MAAM,YAAc,CAAC,qBAAqB,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AACvG;;;;ACHA,4BAAiB;IAAG,WAAW,CAAC,IAAI,CAAC;IACnC,mBAAmB,CAAC,aAAa,CAAC;IAClC,sBAAsB,CAAC,MAAM,YAAc,CAAC,cAAc,EAAE,UAAU,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AAChG;;;;ACHA,4BAAiB;IAAG,WAA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AAA,gEAAM,AAAD,GAAG;OAChC,uBAKR,eAAe,CAAC,yBACf,gCAAC,CAAA,GAAA,eAAQ,AAAD;QAAE,YAAY,KAAK;qBACzB,gCAAC;QACC,MAAK;QACL,IAAI;QACJ,cAAY,gBAAgB,MAAM,CAAC;QACnC,mBAAiB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC;QAC/C,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OAC7B,SAAS,kBAAkB,kBAC1B,gCAAC,CAAA,GAAA,mBAAY,AAAD;QACV,SAAA,IAAO;QACP,SAAS;QACT,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC,cACC,gBAAgB,MAAM,CAAC,sBAAsB;QAAC,UAAU,MAAM,UAAU,CAAC,IAAI;IAAA,KAC7E,gBAAgB,MAAM,CAAC,kBAAkB,GAI9C,eAAe,0BACd,gCAAC,CAAA,GAAA,mBAAW;QACV,SAAA,IAAO;QACP,SAAS;YAAM,OAAA,qBAAA,sBAAA,KAAA,IAAA;;QACf,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAM,AAAD,GAAG;OACpC;AAUrB;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;;CDrPlC,GAED","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/intl/*.js","packages/@react-spectrum/tag/intl/ar-AE.json","packages/@react-spectrum/tag/intl/bg-BG.json","packages/@react-spectrum/tag/intl/cs-CZ.json","packages/@react-spectrum/tag/intl/da-DK.json","packages/@react-spectrum/tag/intl/de-DE.json","packages/@react-spectrum/tag/intl/el-GR.json","packages/@react-spectrum/tag/intl/en-US.json","packages/@react-spectrum/tag/intl/es-ES.json","packages/@react-spectrum/tag/intl/et-EE.json","packages/@react-spectrum/tag/intl/fi-FI.json","packages/@react-spectrum/tag/intl/fr-FR.json","packages/@react-spectrum/tag/intl/he-IL.json","packages/@react-spectrum/tag/intl/hr-HR.json","packages/@react-spectrum/tag/intl/hu-HU.json","packages/@react-spectrum/tag/intl/it-IT.json","packages/@react-spectrum/tag/intl/ja-JP.json","packages/@react-spectrum/tag/intl/ko-KR.json","packages/@react-spectrum/tag/intl/lt-LT.json","packages/@react-spectrum/tag/intl/lv-LV.json","packages/@react-spectrum/tag/intl/nb-NO.json","packages/@react-spectrum/tag/intl/nl-NL.json","packages/@react-spectrum/tag/intl/pl-PL.json","packages/@react-spectrum/tag/intl/pt-BR.json","packages/@react-spectrum/tag/intl/pt-PT.json","packages/@react-spectrum/tag/intl/ro-RO.json","packages/@react-spectrum/tag/intl/ru-RU.json","packages/@react-spectrum/tag/intl/sk-SK.json","packages/@react-spectrum/tag/intl/sl-SI.json","packages/@react-spectrum/tag/intl/sr-SP.json","packages/@react-spectrum/tag/intl/sv-SE.json","packages/@react-spectrum/tag/intl/tr-TR.json","packages/@react-spectrum/tag/intl/uk-UA.json","packages/@react-spectrum/tag/intl/zh-CN.json","packages/@react-spectrum/tag/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/tags/vars.css","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\nexport {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaTagGroupProps, TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing, FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListCollection, useListState} from '@react-stately/list';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'keyboardDelegate'>, StyleProps, SpectrumLabelableProps, Omit<SpectrumHelpTextProps, 'showErrorIcon'> {\n /** The label to display on the action button. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Sets what the TagGroup should render when there are no tags to display. */\n renderEmptyState?: () => JSX.Element\n}\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n allowsRemoving,\n onRemove,\n maxRows,\n children,\n actionLabel,\n onAction,\n labelPosition,\n renderEmptyState = () => stringFormatter.format('noTags')\n } = props;\n let domRef = useDOMRef(ref);\n let containerRef = useRef(null);\n let tagsRef = useRef(null);\n let {direction} = useLocale();\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let [isCollapsed, setIsCollapsed] = useState(maxRows != null);\n let state = useListState(props);\n let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false, maxHeight: undefined});\n let keyboardDelegate = useMemo(() => (\n isCollapsed\n ? new TagKeyboardDelegate(new ListCollection([...state.collection].slice(0, tagState.visibleTagCount)), direction)\n : new TagKeyboardDelegate(new ListCollection([...state.collection]), direction)\n ), [direction, isCollapsed, state.collection, tagState.visibleTagCount]) as TagKeyboardDelegate<T>;\n // Remove onAction from props so it doesn't make it into useGridList.\n delete props.onAction;\n let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);\n let actionsId = useId();\n\n let updateVisibleTagCount = useCallback(() => {\n if (maxRows > 0) {\n let computeVisibleTagCount = () => {\n // Refs can be null at runtime.\n let currContainerRef: HTMLDivElement | null = containerRef.current;\n let currTagsRef: HTMLDivElement | null = tagsRef.current;\n if (!currContainerRef || !currTagsRef) {\n return;\n }\n\n let tags = [...currTagsRef.children];\n let buttons = [...currContainerRef.parentElement.querySelectorAll('button')];\n if (tags.length === 0 || buttons.length === 0) {\n return {\n visibleTagCount: 0,\n showCollapseButton: false,\n maxHeight: undefined\n };\n }\n let currY = -Infinity;\n let rowCount = 0;\n let index = 0;\n let tagWidths: number[] = [];\n // Count rows and show tags until we hit the maxRows.\n for (let tag of tags) {\n let {width, y} = tag.getBoundingClientRect();\n\n if (y !== currY) {\n currY = y;\n rowCount++;\n }\n\n if (rowCount > maxRows) {\n break;\n }\n tagWidths.push(width);\n index++;\n }\n\n // Remove tags until there is space for the collapse button and action button (if present) on the last row.\n let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);\n buttonsWidth += parseInt(window.getComputedStyle(buttons[buttons.length - 1]).marginRight, 10) * 2;\n let end = direction === 'ltr' ? 'right' : 'left';\n let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];\n let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];\n lastTagEnd += parseInt(window.getComputedStyle(tags[index - 1]).marginRight, 10);\n let availableWidth = containerEnd - lastTagEnd;\n\n while (availableWidth < buttonsWidth && index < state.collection.size && index > 0) {\n availableWidth += tagWidths.pop();\n index--;\n }\n let tagStyle = window.getComputedStyle(tags[0]);\n let maxHeight = (parseInt(tagStyle.height, 10) + parseInt(tagStyle.marginTop, 10) * 2) * maxRows;\n return {\n visibleTagCount: index,\n showCollapseButton: index < state.collection.size,\n maxHeight\n };\n };\n\n setTagState(function *() {\n // Update to show all items.\n yield {visibleTagCount: state.collection.size, showCollapseButton: true, maxHeight: undefined};\n\n // Measure, and update to show the items until maxRows is reached.\n yield computeVisibleTagCount();\n });\n }\n }, [maxRows, setTagState, direction, state.collection.size]);\n\n useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(updateVisibleTagCount, [children]);\n\n useEffect(() => {\n // Recalculate visible tags when fonts are loaded.\n document.fonts?.ready.then(() => updateVisibleTagCount());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n let visibleTags = [...state.collection];\n if (maxRows != null && isCollapsed) {\n visibleTags = visibleTags.slice(0, tagState.visibleTagCount);\n }\n\n let handlePressCollapse = () => {\n // Prevents button from losing focus if focusedKey got collapsed.\n state.selectionManager.setFocusedKey(null);\n setIsCollapsed(prevCollapsed => !prevCollapsed);\n };\n\n let showActions = tagState.showCollapseButton || (actionLabel && onAction);\n let isEmpty = state.collection.size === 0;\n\n return (\n <FocusScope>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon\n ref={domRef}\n elementType=\"span\"\n wrapperClassName={\n classNames(\n styles,\n 'spectrum-Tags-fieldWrapper',\n {\n 'spectrum-Tags-fieldWrapper--positionSide': labelPosition === 'side'\n }\n )\n }>\n <div\n style={maxRows != null && tagState.showCollapseButton && isCollapsed ? {maxHeight: tagState.maxHeight, overflow: 'hidden'} : undefined}\n ref={containerRef}\n className={\n classNames(\n styles,\n 'spectrum-Tags-container',\n {\n 'spectrum-Tags-container--empty': isEmpty\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n ref={tagsRef}\n {...gridProps}\n className={classNames(styles, 'spectrum-Tags')}>\n {visibleTags.map(item => (\n <Tag\n {...item.props}\n key={item.key}\n item={item}\n state={state}\n allowsRemoving={allowsRemoving}\n onRemove={onRemove}>\n {item.rendered}\n </Tag>\n ))}\n {isEmpty && (\n <div className={classNames(styles, 'spectrum-Tags-empty-state')}>\n {renderEmptyState()}\n </div>\n )}\n </div>\n </FocusRing>\n {showActions && !isEmpty &&\n <Provider isDisabled={false}>\n <div\n role=\"group\"\n id={actionsId}\n aria-label={stringFormatter.format('actions')}\n aria-labelledby={`${gridProps.id} ${actionsId}`}\n className={classNames(styles, 'spectrum-Tags-actions')}>\n {tagState.showCollapseButton &&\n <ActionButton\n isQuiet\n onPress={handlePressCollapse}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {isCollapsed ?\n stringFormatter.format('showAllButtonLabel', {tagCount: state.collection.size}) :\n stringFormatter.format('hideButtonLabel')\n }\n </ActionButton>\n }\n {actionLabel && onAction &&\n <ActionButton\n isQuiet\n onPress={() => onAction?.()}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {actionLabel}\n </ActionButton>\n }\n </div>\n </Provider>\n }\n </div>\n </Field>\n </FocusScope>\n );\n}\n\n/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as TagGroup};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"actions\": \"الإجراءات\",\n \"hideButtonLabel\": \"إظهار أقل\",\n \"showAllButtonLabel\": \"عرض الكل ({tagCount, number})\",\n \"noTags\": \"None\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показване на по-малко\",\n \"showAllButtonLabel\": \"Показване на всички ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akce\",\n \"hideButtonLabel\": \"Zobrazit méně\",\n \"showAllButtonLabel\": \"Zobrazit vše ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Aktionen\",\n \"hideButtonLabel\": \"Weniger zeigen\",\n \"showAllButtonLabel\": \"Alle anzeigen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ενέργειες\",\n \"hideButtonLabel\": \"Εμφάνιση λιγότερων\",\n \"showAllButtonLabel\": \"Εμφάνιση όλων ({tagCount, number})\"\n}\n","{\n \"showAllButtonLabel\": \"Show all ({tagCount, number})\",\n \"hideButtonLabel\": \"Show less\",\n \"actions\": \"Actions\",\n \"noTags\": \"None\"\n}\n","{\n \"actions\": \"Acciones\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar todo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toimingud\",\n \"hideButtonLabel\": \"Kuva vähem\",\n \"showAllButtonLabel\": \"Kuva kõik ({tagCount, number})\"\n}\n","{\n \"actions\": \"Toiminnot\",\n \"hideButtonLabel\": \"Näytä vähemmän\",\n \"showAllButtonLabel\": \"Näytä kaikki ({tagCount, number})\"\n}\n","{\n \"actions\": \"Actions\",\n \"hideButtonLabel\": \"Afficher moins\",\n \"showAllButtonLabel\": \"Tout afficher ({tagCount, number})\"\n}\n","{\n \"actions\": \"פעולות\",\n \"hideButtonLabel\": \"הצג פחות\",\n \"showAllButtonLabel\": \"הצג הכל ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Műveletek\",\n \"hideButtonLabel\": \"Mutass kevesebbet\",\n \"showAllButtonLabel\": \"Az összes megjelenítése ({tagCount, number})\"\n}\n","{\n \"actions\": \"Azioni\",\n \"hideButtonLabel\": \"Mostra meno\",\n \"showAllButtonLabel\": \"Mostra tutto ({tagCount, number})\"\n}\n","{\n \"actions\": \"アクション\",\n \"hideButtonLabel\": \"表示を減らす\",\n \"showAllButtonLabel\": \"すべての ({tagCount, number}) を表示\"\n}\n","{\n \"actions\": \"액션\",\n \"hideButtonLabel\": \"간단히 표시\",\n \"showAllButtonLabel\": \"모두 표시 ({tagCount, number})\"\n}\n","{\n \"actions\": \"Veiksmai\",\n \"hideButtonLabel\": \"Rodyti mažiau\",\n \"showAllButtonLabel\": \"Rodyti viską ({tagCount, number})\"\n}\n","{\n \"actions\": \"Darbības\",\n \"hideButtonLabel\": \"Rādīt mazāk\",\n \"showAllButtonLabel\": \"Rādīt visu ({tagCount, number})\"\n}\n","{\n \"actions\": \"Handlinger\",\n \"hideButtonLabel\": \"Vis mindre\",\n \"showAllButtonLabel\": \"Vis alle ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acties\",\n \"hideButtonLabel\": \"Minder weergeven\",\n \"showAllButtonLabel\": \"Alles tonen ({tagCount, number})\"\n}\n","{\n \"actions\": \"Działania\",\n \"hideButtonLabel\": \"Wyświetl mniej\",\n \"showAllButtonLabel\": \"Pokaż wszystko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Ações\",\n \"hideButtonLabel\": \"Mostrar menos\",\n \"showAllButtonLabel\": \"Mostrar tudo ({tagCount, number})\"\n}\n","{\n \"actions\": \"Acțiuni\",\n \"hideButtonLabel\": \"Se afișează mai puțin\",\n \"showAllButtonLabel\": \"Se afișează tot ({tagCount, number})\"\n}\n","{\n \"actions\": \"Действия\",\n \"hideButtonLabel\": \"Показать меньше\",\n \"showAllButtonLabel\": \"Показать все ({tagCount, number})\"\n}\n","{\n \"actions\": \"Akcie\",\n \"hideButtonLabel\": \"Zobraziť menej\",\n \"showAllButtonLabel\": \"Zobraziť všetko ({tagCount, number})\"\n}\n","{\n \"actions\": \"Dejanja\",\n \"hideButtonLabel\": \"Prikaži manj\",\n \"showAllButtonLabel\": \"Prikaž vse ({tagCount, number})\"\n}\n","{\n \"actions\": \"Radnje\",\n \"hideButtonLabel\": \"Prikaži manje\",\n \"showAllButtonLabel\": \"Prikaži sve ({tagCount, number})\"\n}\n","{\n \"actions\": \"Åtgärder\",\n \"hideButtonLabel\": \"Visa mindre\",\n \"showAllButtonLabel\": \"Visa alla ({tagCount, number})\"\n}\n","{\n \"actions\": \"Eylemler\",\n \"hideButtonLabel\": \"Daha az göster\",\n \"showAllButtonLabel\": \"Tümünü göster ({tagCount, number})\"\n}\n","{\n \"actions\": \"Дії\",\n \"hideButtonLabel\": \"Показувати менше\",\n \"showAllButtonLabel\": \"Показати всі ({tagCount, number})\"\n}\n","{\n \"actions\": \"操作\",\n \"hideButtonLabel\": \"显示更少\",\n \"showAllButtonLabel\": \"全部显示 ({tagCount, number})\"\n}\n","{\n \"actions\": \"動作\",\n \"hideButtonLabel\": \"顯示較少\",\n \"showAllButtonLabel\": \"顯示全部 ({tagCount, number})\"\n}\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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, 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, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {TagProps} from '@react-types/tag';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport interface SpectrumTagProps<T> extends TagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n allowsRemoving,\n item,\n state,\n onRemove,\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: true});\n let ref = useRef();\n let {removeButtonProps, labelProps, gridCellProps, rowProps} = useTag({\n ...props,\n allowsRemoving,\n item,\n onRemove\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'), ...labelProps},\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} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'ke
|
|
|
6
6
|
actionLabel?: string;
|
|
7
7
|
/** Handler that is called when the action button is pressed. */
|
|
8
8
|
onAction?: () => void;
|
|
9
|
+
/** Sets what the TagGroup should render when there are no tags to display. */
|
|
10
|
+
renderEmptyState?: () => JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */
|
|
11
13
|
export const TagGroup: <T>(props: SpectrumTagGroupProps<T> & {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AC6BA,uCAAuC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAAE,UAAU,EAAE,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,EAAE,eAAe,CAAC;IAChL,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;
|
|
1
|
+
{"mappings":";;;AC6BA,uCAAuC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAAE,UAAU,EAAE,sBAAsB,EAAE,IAAI,CAAC,qBAAqB,EAAE,eAAe,CAAC;IAChL,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,IAAI,OAAO,CAAA;CACrC;AA0ND,8IAA8I;AAC9I,OAAA,MAAM;UAAuF,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;AClPtI,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC","sources":["packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/Tag.tsx","packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/src/packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/index.ts"],"sourcesContent":[null,null,null,"/*\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 './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/tag",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.2175+0b384e61a",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/focus": "3.0.0-nightly.
|
|
40
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
41
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
42
|
-
"@react-aria/tag": "3.0.0-nightly.
|
|
43
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
44
|
-
"@react-spectrum/button": "3.0.0-nightly.
|
|
45
|
-
"@react-spectrum/form": "3.0.0-nightly.
|
|
46
|
-
"@react-spectrum/label": "3.12.1-nightly.
|
|
47
|
-
"@react-spectrum/text": "3.4.2-nightly.
|
|
48
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
49
|
-
"@react-stately/collections": "3.0.0-nightly.
|
|
50
|
-
"@react-stately/list": "3.8.1-nightly.
|
|
51
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
52
|
-
"@react-types/tag": "3.0.0-nightly.
|
|
39
|
+
"@react-aria/focus": "3.0.0-nightly.2175+0b384e61a",
|
|
40
|
+
"@react-aria/i18n": "3.0.0-nightly.2175+0b384e61a",
|
|
41
|
+
"@react-aria/interactions": "3.0.0-nightly.2175+0b384e61a",
|
|
42
|
+
"@react-aria/tag": "3.0.0-nightly.2175+0b384e61a",
|
|
43
|
+
"@react-aria/utils": "3.0.0-nightly.2175+0b384e61a",
|
|
44
|
+
"@react-spectrum/button": "3.0.0-nightly.2175+0b384e61a",
|
|
45
|
+
"@react-spectrum/form": "3.0.0-nightly.2175+0b384e61a",
|
|
46
|
+
"@react-spectrum/label": "3.12.1-nightly.3877+0b384e61a",
|
|
47
|
+
"@react-spectrum/text": "3.4.2-nightly.3877+0b384e61a",
|
|
48
|
+
"@react-spectrum/utils": "3.0.0-nightly.2175+0b384e61a",
|
|
49
|
+
"@react-stately/collections": "3.0.0-nightly.2175+0b384e61a",
|
|
50
|
+
"@react-stately/list": "3.8.1-nightly.3877+0b384e61a",
|
|
51
|
+
"@react-types/shared": "3.0.0-nightly.2175+0b384e61a",
|
|
52
|
+
"@react-types/tag": "3.0.0-nightly.2175+0b384e61a",
|
|
53
53
|
"@swc/helpers": "^0.4.14"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
56
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.2175+0b384e61a"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@react-spectrum/provider": "^3.0.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "0b384e61ad6d7eaa647f764cbc78038855fbde6b"
|
|
66
66
|
}
|
package/src/TagGroup.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import {AriaTagGroupProps, TagKeyboardDelegate, useTagGroup} from '@react-aria/t
|
|
|
15
15
|
import {classNames, useDOMRef} from '@react-spectrum/utils';
|
|
16
16
|
import {DOMRef, SpectrumHelpTextProps, SpectrumLabelableProps, StyleProps} from '@react-types/shared';
|
|
17
17
|
import {Field} from '@react-spectrum/label';
|
|
18
|
-
import {FocusScope} from '@react-aria/focus';
|
|
18
|
+
import {FocusRing, FocusScope} from '@react-aria/focus';
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
import intlMessages from '../intl/*.json';
|
|
21
21
|
import {ListCollection, useListState} from '@react-stately/list';
|
|
@@ -31,7 +31,9 @@ export interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'ke
|
|
|
31
31
|
/** The label to display on the action button. */
|
|
32
32
|
actionLabel?: string,
|
|
33
33
|
/** Handler that is called when the action button is pressed. */
|
|
34
|
-
onAction?: () => void
|
|
34
|
+
onAction?: () => void,
|
|
35
|
+
/** Sets what the TagGroup should render when there are no tags to display. */
|
|
36
|
+
renderEmptyState?: () => JSX.Element
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {
|
|
@@ -44,7 +46,8 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
|
|
|
44
46
|
children,
|
|
45
47
|
actionLabel,
|
|
46
48
|
onAction,
|
|
47
|
-
labelPosition
|
|
49
|
+
labelPosition,
|
|
50
|
+
renderEmptyState = () => stringFormatter.format('noTags')
|
|
48
51
|
} = props;
|
|
49
52
|
let domRef = useDOMRef(ref);
|
|
50
53
|
let containerRef = useRef(null);
|
|
@@ -76,6 +79,13 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
|
|
|
76
79
|
|
|
77
80
|
let tags = [...currTagsRef.children];
|
|
78
81
|
let buttons = [...currContainerRef.parentElement.querySelectorAll('button')];
|
|
82
|
+
if (tags.length === 0 || buttons.length === 0) {
|
|
83
|
+
return {
|
|
84
|
+
visibleTagCount: 0,
|
|
85
|
+
showCollapseButton: false,
|
|
86
|
+
maxHeight: undefined
|
|
87
|
+
};
|
|
88
|
+
}
|
|
79
89
|
let currY = -Infinity;
|
|
80
90
|
let rowCount = 0;
|
|
81
91
|
let index = 0;
|
|
@@ -150,6 +160,7 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
|
|
|
150
160
|
};
|
|
151
161
|
|
|
152
162
|
let showActions = tagState.showCollapseButton || (actionLabel && onAction);
|
|
163
|
+
let isEmpty = state.collection.size === 0;
|
|
153
164
|
|
|
154
165
|
return (
|
|
155
166
|
<FocusScope>
|
|
@@ -173,24 +184,39 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
|
|
|
173
184
|
<div
|
|
174
185
|
style={maxRows != null && tagState.showCollapseButton && isCollapsed ? {maxHeight: tagState.maxHeight, overflow: 'hidden'} : undefined}
|
|
175
186
|
ref={containerRef}
|
|
176
|
-
className={
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
187
|
+
className={
|
|
188
|
+
classNames(
|
|
189
|
+
styles,
|
|
190
|
+
'spectrum-Tags-container',
|
|
191
|
+
{
|
|
192
|
+
'spectrum-Tags-container--empty': isEmpty
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
}>
|
|
196
|
+
<FocusRing focusRingClass={classNames(styles, 'focus-ring')}>
|
|
197
|
+
<div
|
|
198
|
+
ref={tagsRef}
|
|
199
|
+
{...gridProps}
|
|
200
|
+
className={classNames(styles, 'spectrum-Tags')}>
|
|
201
|
+
{visibleTags.map(item => (
|
|
202
|
+
<Tag
|
|
203
|
+
{...item.props}
|
|
204
|
+
key={item.key}
|
|
205
|
+
item={item}
|
|
206
|
+
state={state}
|
|
207
|
+
allowsRemoving={allowsRemoving}
|
|
208
|
+
onRemove={onRemove}>
|
|
209
|
+
{item.rendered}
|
|
210
|
+
</Tag>
|
|
211
|
+
))}
|
|
212
|
+
{isEmpty && (
|
|
213
|
+
<div className={classNames(styles, 'spectrum-Tags-empty-state')}>
|
|
214
|
+
{renderEmptyState()}
|
|
215
|
+
</div>
|
|
216
|
+
)}
|
|
217
|
+
</div>
|
|
218
|
+
</FocusRing>
|
|
219
|
+
{showActions && !isEmpty &&
|
|
194
220
|
<Provider isDisabled={false}>
|
|
195
221
|
<div
|
|
196
222
|
role="group"
|