@react-spectrum/tag 3.0.0-alpha.9 → 3.0.0-beta.1

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/main.css CHANGED
@@ -1 +1 @@
1
- .spectrum-Tags_8407eb{flex-wrap:wrap;margin:0;padding:0;list-style:none;display:inline-flex}[dir=ltr] .spectrum-Tags-item_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-Tags-item_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-Tags-item_8407eb{display:-ms-grid;-ms-grid-columns:1fr auto;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-global-dimension-size-50);-webkit-user-select:none;user-select:none;transition:border-color var(--spectrum-global-animation-duration-100,130ms)ease-in-out,color var(--spectrum-global-animation-duration-100,130ms)ease-in-out,box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-in-out,background-color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;border-style:solid;outline:0;grid-template-columns:1fr auto;grid-template-areas:"icon content action";align-items:center;display:grid}.spectrum-Tags-item_8407eb.is-disabled_8407eb{pointer-events:none}.spectrum-Tags-item_8407eb .spectrum-Tag-action_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}[dir=ltr] .spectrum-Tag-icon_8407eb{margin-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] .spectrum-Tag-icon_8407eb{margin-left:var(--spectrum-global-dimension-size-100)}.spectrum-Tag-icon_8407eb{grid-area:icon}[dir=ltr] .spectrum-Tag-content_8407eb{margin-right:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tag-content_8407eb{margin-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}.spectrum-Tag-content_8407eb{height:100%;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:0;flex:auto;grid-area:content;overflow:hidden}[dir=ltr] .tags-removable_8407eb{margin-right:0}[dir=rtl] .tags-removable_8407eb{margin-left:0}.spectrum-Tags-item_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-Tags-item_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-Tags-item_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));box-shadow:0 0 0 1px var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Tags-item_8407eb.is-selected_8407eb{background-color:var(--spectrum-tag-background-color-selected,var(--spectrum-global-color-gray-700));color:var(--spectrum-tag-text-color-selected,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-tag-border-color-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-background-color-selected-hover,var(--spectrum-global-color-gray-800))}.spectrum-Tags-item_8407eb.is-selected_8407eb.focus-ring_8407eb{box-shadow:0 0 0 2px var(--spectrum-tag-border-color-selected-key-focus,var(--spectrum-alias-border-color-focus));border-color:var(--spectrum-tag-text-color-selected-key-focus,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb{border-color:var(--spectrum-tag-border-color-error-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb .spectrum-Tags-itemIcon_8407eb,.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb .spectrum-Tags-itemLabel_8407eb,.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-text-color-error-selected,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb.focus-ring_8407eb{box-shadow:0 0 0 2px var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus));border-color:var(--spectrum-tag-border-color-error-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb.is-hovered_8407eb{border-color:var(--spectrum-tag-border-color-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-invalid_8407eb{color:var(--spectrum-tag-icon-color-error,var(--spectrum-global-color-red-500));border-color:var(--spectrum-tag-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Tags-item_8407eb.is-invalid_8407eb.is-hovered_8407eb{color:var(--spectrum-tag-icon-color-error-hover,var(--spectrum-global-color-red-600));border-color:var(--spectrum-tag-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item_8407eb.is-invalid_8407eb.focus-ring_8407eb{color:var(--spectrum-tag-icon-color-error-hover,var(--spectrum-global-color-red-600));border-color:var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus));box-shadow:0 0 0 1px var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Tags-item_8407eb.is-invalid_8407eb .spectrum-Tags-itemIcon_8407eb,.spectrum-Tags-item_8407eb.is-invalid_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Tags-item_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-Tags-item_8407eb.is-disabled_8407eb .spectrum-Avatar_8407eb{opacity:var(--spectrum-avatar-small-opacity-disabled,0.3)}.spectrum-Tags-item--removable_8407eb.is-hovered_8407eb{color:var(--spectrum-tag-removable-text-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Tags-item--removable_8407eb:active{color:var(--spectrum-tag-removable-text-color-down,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb.is-hovered_8407eb{border-color:var(--spectrum-tag-removable-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb.is-hovered_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-removable-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb .spectrum-Tags-itemClearButton_8407eb.is-focused_8407eb{color:var(--spectrum-tag-icon-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb:active{border-color:var(--spectrum-tag-removable-border-color-error-down,var(--spectrum-global-color-red-700));color:var(--spectrum-tag-removable-text-color-error-down,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-focused_8407eb{color:var(--spectrum-tag-removable-text-color-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-focused_8407eb.is-invalid_8407eb{color:var(--spectrum-tag-removable-text-color-error-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb{color:var(--spectrum-tag-removable-text-color-selected,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb.is-focused_8407eb{color:var(--spectrum-tag-removable-text-color-selected-key-focus,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-removable-button-icon-color-selected,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb .spectrum-Tags-itemClearButton_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-removable-button-background-color-selected-hover,var(--spectrum-global-color-gray-600));color:var(--spectrum-tag-removable-button-icon-color-selected-hover,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb .spectrum-Tags-itemClearButton_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-Tags-item--removable_8407eb .spectrum-Tags-itemClearButton_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-Tags-item_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-background-color-selected:Highlight;--spectrum-tag-background-color-selected-hover:Highlight;--spectrum-tag-border-color:ButtonText;--spectrum-tag-border-color-disabled:GrayText;--spectrum-tag-border-color-error:ButtonText;--spectrum-tag-border-color-error-hover:ButtonText;--spectrum-tag-border-color-error-selected:HighlightText;--spectrum-tag-border-color-hover:Highlight;--spectrum-tag-border-color-key-focus:Highlight;--spectrum-tag-border-color-selected:HighlightText;--spectrum-tag-border-color-selected-key-focus:ButtonText;--spectrum-tag-icon-color-error:ButtonText;--spectrum-tag-icon-color-error-hover:ButtonText;--spectrum-tag-removable-border-color-error-down:Highlight;--spectrum-tag-removable-border-color-error-hover: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-background-color-selected-hover:Highlight;--spectrum-tag-removable-button-icon-color-hover:Highlight;--spectrum-tag-removable-button-icon-color-key-focus:Highlight;--spectrum-tag-removable-button-icon-color-selected:HighlightText;--spectrum-tag-removable-button-icon-color-selected-hover:HighlightText;--spectrum-tag-removable-text-color-down:ButtonText;--spectrum-tag-removable-text-color-error-down:Highlight;--spectrum-tag-removable-text-color-error-key-focus:Highlight;--spectrum-tag-removable-text-color-hover:ButtonText;--spectrum-tag-removable-text-color-key-focus:ButtonText;--spectrum-tag-removable-text-color-selected:HighlightText;--spectrum-tag-removable-text-color-selected-key-focus:HighlightText;--spectrum-tag-text-color:ButtonText;--spectrum-tag-text-color-disabled:GrayText;--spectrum-tag-text-color-error-selected:HighlightText;--spectrum-tag-text-color-hover:ButtonText;--spectrum-tag-text-color-key-focus:ButtonText;--spectrum-tag-text-color-selected:HighlightText;--spectrum-tag-text-color-selected-key-focus:HighlightText}}
1
+ .spectrum-Tags-item_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-Tags-item_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-Tags-item_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{flex-wrap:wrap;margin:0;padding:0;list-style:none;display:inline-flex}[dir=ltr] .spectrum-Tags-item_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-Tags-item_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-Tags-item_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-grid;-ms-grid-columns:1fr auto;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;grid-template-columns:1fr auto;grid-template-areas:"icon content action";align-items:center;display:grid;position:relative}.spectrum-Tags-item_8407eb.is-disabled_8407eb{pointer-events:none}.spectrum-Tags-item_8407eb .spectrum-Tag-action_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}[dir=ltr] .spectrum-Tag-icon_8407eb{margin-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] .spectrum-Tag-icon_8407eb{margin-left:var(--spectrum-global-dimension-size-100)}.spectrum-Tag-icon_8407eb{grid-area:icon}[dir=ltr] .spectrum-Tag-content_8407eb{margin-right:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}[dir=rtl] .spectrum-Tag-content_8407eb{margin-left:var(--spectrum-tag-padding-x,var(--spectrum-global-dimension-size-125))}.spectrum-Tag-content_8407eb{height:100%;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] .tags-removable_8407eb{margin-right:0}[dir=rtl] .tags-removable_8407eb{margin-left:0}.spectrum-Tags-item_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-Tags-item_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-Tags-item_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-Tags-item_8407eb.is-selected_8407eb{background-color:var(--spectrum-tag-background-color-selected,var(--spectrum-global-color-gray-700));color:var(--spectrum-tag-text-color-selected,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-tag-border-color-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-background-color-selected-hover,var(--spectrum-global-color-gray-800))}.spectrum-Tags-item_8407eb.is-selected_8407eb.focus-ring_8407eb{box-shadow:0 0 0 2px var(--spectrum-tag-border-color-selected-key-focus,var(--spectrum-alias-border-color-focus));border-color:var(--spectrum-tag-text-color-selected-key-focus,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb{border-color:var(--spectrum-tag-border-color-error-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb .spectrum-Tags-itemIcon_8407eb,.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb .spectrum-Tags-itemLabel_8407eb,.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-text-color-error-selected,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb.focus-ring_8407eb{box-shadow:0 0 0 2px var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus));border-color:var(--spectrum-tag-border-color-error-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-selected_8407eb.is-invalid_8407eb.is-hovered_8407eb{border-color:var(--spectrum-tag-border-color-selected,var(--spectrum-alias-border-color-transparent))}.spectrum-Tags-item_8407eb.is-invalid_8407eb{color:var(--spectrum-tag-icon-color-error,var(--spectrum-global-color-red-500));border-color:var(--spectrum-tag-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Tags-item_8407eb.is-invalid_8407eb.is-hovered_8407eb{color:var(--spectrum-tag-icon-color-error-hover,var(--spectrum-global-color-red-600));border-color:var(--spectrum-tag-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item_8407eb.is-invalid_8407eb.focus-ring_8407eb{color:var(--spectrum-tag-icon-color-error-hover,var(--spectrum-global-color-red-600));border-color:var(--spectrum-tag-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Tags-item_8407eb.is-invalid_8407eb .spectrum-Tags-itemIcon_8407eb,.spectrum-Tags-item_8407eb.is-invalid_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-border-color-error,var(--spectrum-global-color-red-500))}.spectrum-Tags-item_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-Tags-item_8407eb.is-disabled_8407eb .spectrum-Avatar_8407eb{opacity:var(--spectrum-avatar-small-opacity-disabled,.3)}.spectrum-Tags-item--removable_8407eb.is-hovered_8407eb{color:var(--spectrum-tag-removable-text-color-hover,var(--spectrum-global-color-gray-900))}.spectrum-Tags-item--removable_8407eb:active{color:var(--spectrum-tag-removable-text-color-down,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb.is-hovered_8407eb{border-color:var(--spectrum-tag-removable-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb.is-hovered_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-removable-border-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb .spectrum-Tags-itemClearButton_8407eb.is-focused_8407eb{color:var(--spectrum-tag-icon-color-error-hover,var(--spectrum-global-color-red-600))}.spectrum-Tags-item--removable_8407eb.is-invalid_8407eb:active{border-color:var(--spectrum-tag-removable-border-color-error-down,var(--spectrum-global-color-red-700));color:var(--spectrum-tag-removable-text-color-error-down,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-focused_8407eb{color:var(--spectrum-tag-removable-text-color-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-focused_8407eb.is-invalid_8407eb{color:var(--spectrum-tag-removable-text-color-error-key-focus,var(--spectrum-global-color-gray-700))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb{color:var(--spectrum-tag-removable-text-color-selected,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb.is-focused_8407eb{color:var(--spectrum-tag-removable-text-color-selected-key-focus,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb .spectrum-Tags-itemClearButton_8407eb{color:var(--spectrum-tag-removable-button-icon-color-selected,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb.is-selected_8407eb .spectrum-Tags-itemClearButton_8407eb.is-hovered_8407eb{background-color:var(--spectrum-tag-removable-button-background-color-selected-hover,var(--spectrum-global-color-gray-600));color:var(--spectrum-tag-removable-button-icon-color-selected-hover,var(--spectrum-global-color-gray-50))}.spectrum-Tags-item--removable_8407eb .spectrum-Tags-itemClearButton_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-Tags-item--removable_8407eb .spectrum-Tags-itemClearButton_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-Tags-item_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-background-color-selected:Highlight;--spectrum-tag-background-color-selected-hover:Highlight;--spectrum-tag-border-color:ButtonText;--spectrum-tag-border-color-disabled:GrayText;--spectrum-tag-border-color-error:ButtonText;--spectrum-tag-border-color-error-hover:ButtonText;--spectrum-tag-border-color-error-selected:HighlightText;--spectrum-tag-border-color-hover:Highlight;--spectrum-tag-border-color-key-focus:Highlight;--spectrum-tag-border-color-selected:HighlightText;--spectrum-tag-border-color-selected-key-focus:ButtonText;--spectrum-tag-icon-color-error:ButtonText;--spectrum-tag-icon-color-error-hover:ButtonText;--spectrum-tag-removable-border-color-error-down:Highlight;--spectrum-tag-removable-border-color-error-hover: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-background-color-selected-hover:Highlight;--spectrum-tag-removable-button-icon-color-hover:Highlight;--spectrum-tag-removable-button-icon-color-key-focus:Highlight;--spectrum-tag-removable-button-icon-color-selected:HighlightText;--spectrum-tag-removable-button-icon-color-selected-hover:HighlightText;--spectrum-tag-removable-text-color-down:ButtonText;--spectrum-tag-removable-text-color-error-down:Highlight;--spectrum-tag-removable-text-color-error-key-focus:Highlight;--spectrum-tag-removable-text-color-hover:ButtonText;--spectrum-tag-removable-text-color-key-focus:ButtonText;--spectrum-tag-removable-text-color-selected:HighlightText;--spectrum-tag-removable-text-color-selected-key-focus:HighlightText;--spectrum-tag-text-color:ButtonText;--spectrum-tag-text-color-disabled:GrayText;--spectrum-tag-text-color-error-selected:HighlightText;--spectrum-tag-text-color-hover:ButtonText;--spectrum-tag-text-color-key-focus:ButtonText;--spectrum-tag-text-color-selected:HighlightText;--spectrum-tag-text-color-selected-key-focus:HighlightText}}
package/dist/main.js CHANGED
@@ -23,21 +23,41 @@ function $parcel$interopDefault(a) {
23
23
 
24
24
  $parcel$export(module.exports, "TagGroup", () => $e7b72d8874e98cd4$export$67ea30858aaf75e3);
25
25
  $parcel$export(module.exports, "Item", () => $dTV3V$reactstatelycollections.Item);
26
-
26
+ /*
27
+ * Copyright 2020 Adobe. All rights reserved.
28
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
29
+ * you may not use this file except in compliance with the License. You may obtain a copy
30
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
31
+ *
32
+ * Unless required by applicable law or agreed to in writing, software distributed under
33
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
34
+ * OF ANY KIND, either express or implied. See the License for the specific language
35
+ * governing permissions and limitations under the License.
36
+ */ /*
37
+ * Copyright 2020 Adobe. All rights reserved.
38
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
39
+ * you may not use this file except in compliance with the License. You may obtain a copy
40
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
41
+ *
42
+ * Unless required by applicable law or agreed to in writing, software distributed under
43
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
44
+ * OF ANY KIND, either express or implied. See the License for the specific language
45
+ * governing permissions and limitations under the License.
46
+ */
27
47
 
28
48
 
29
49
 
30
50
  var $ed889f8f1f091fc8$exports = {};
31
51
 
32
- $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags", () => $ed889f8f1f091fc8$export$eb7e80013a1212da, (v) => $ed889f8f1f091fc8$export$eb7e80013a1212da = v);
33
52
  $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-item", () => $ed889f8f1f091fc8$export$950d8dc0a3751654, (v) => $ed889f8f1f091fc8$export$950d8dc0a3751654 = v);
53
+ $parcel$export($ed889f8f1f091fc8$exports, "focus-ring", () => $ed889f8f1f091fc8$export$f39a09f249340e2a, (v) => $ed889f8f1f091fc8$export$f39a09f249340e2a = v);
54
+ $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags", () => $ed889f8f1f091fc8$export$eb7e80013a1212da, (v) => $ed889f8f1f091fc8$export$eb7e80013a1212da = v);
34
55
  $parcel$export($ed889f8f1f091fc8$exports, "is-disabled", () => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf, (v) => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf = v);
35
56
  $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-action", () => $ed889f8f1f091fc8$export$c5a1243e33faa2d4, (v) => $ed889f8f1f091fc8$export$c5a1243e33faa2d4 = v);
36
57
  $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-icon", () => $ed889f8f1f091fc8$export$21f5254139e14871, (v) => $ed889f8f1f091fc8$export$21f5254139e14871 = v);
37
58
  $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-content", () => $ed889f8f1f091fc8$export$d281c967f4ee071e, (v) => $ed889f8f1f091fc8$export$d281c967f4ee071e = v);
38
59
  $parcel$export($ed889f8f1f091fc8$exports, "tags-removable", () => $ed889f8f1f091fc8$export$7427262f66a3b803, (v) => $ed889f8f1f091fc8$export$7427262f66a3b803 = v);
39
60
  $parcel$export($ed889f8f1f091fc8$exports, "is-hovered", () => $ed889f8f1f091fc8$export$b8813cd5d7824ce7, (v) => $ed889f8f1f091fc8$export$b8813cd5d7824ce7 = v);
40
- $parcel$export($ed889f8f1f091fc8$exports, "focus-ring", () => $ed889f8f1f091fc8$export$f39a09f249340e2a, (v) => $ed889f8f1f091fc8$export$f39a09f249340e2a = v);
41
61
  $parcel$export($ed889f8f1f091fc8$exports, "is-selected", () => $ed889f8f1f091fc8$export$1e0fb04f31d3c22a, (v) => $ed889f8f1f091fc8$export$1e0fb04f31d3c22a = v);
42
62
  $parcel$export($ed889f8f1f091fc8$exports, "is-invalid", () => $ed889f8f1f091fc8$export$14a30de2866685fa, (v) => $ed889f8f1f091fc8$export$14a30de2866685fa = v);
43
63
  $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-itemIcon", () => $ed889f8f1f091fc8$export$8c615c557fdf3d9c, (v) => $ed889f8f1f091fc8$export$8c615c557fdf3d9c = v);
@@ -46,15 +66,15 @@ $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-itemClearButton", () =>
46
66
  $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Avatar", () => $ed889f8f1f091fc8$export$2e049b8d031600fb, (v) => $ed889f8f1f091fc8$export$2e049b8d031600fb = v);
47
67
  $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-item--removable", () => $ed889f8f1f091fc8$export$c1666977f4e14f87, (v) => $ed889f8f1f091fc8$export$c1666977f4e14f87 = v);
48
68
  $parcel$export($ed889f8f1f091fc8$exports, "is-focused", () => $ed889f8f1f091fc8$export$e7dc768d35940237, (v) => $ed889f8f1f091fc8$export$e7dc768d35940237 = v);
49
- var $ed889f8f1f091fc8$export$eb7e80013a1212da;
50
69
  var $ed889f8f1f091fc8$export$950d8dc0a3751654;
70
+ var $ed889f8f1f091fc8$export$f39a09f249340e2a;
71
+ var $ed889f8f1f091fc8$export$eb7e80013a1212da;
51
72
  var $ed889f8f1f091fc8$export$d35bc1e505d1ebbf;
52
73
  var $ed889f8f1f091fc8$export$c5a1243e33faa2d4;
53
74
  var $ed889f8f1f091fc8$export$21f5254139e14871;
54
75
  var $ed889f8f1f091fc8$export$d281c967f4ee071e;
55
76
  var $ed889f8f1f091fc8$export$7427262f66a3b803;
56
77
  var $ed889f8f1f091fc8$export$b8813cd5d7824ce7;
57
- var $ed889f8f1f091fc8$export$f39a09f249340e2a;
58
78
  var $ed889f8f1f091fc8$export$1e0fb04f31d3c22a;
59
79
  var $ed889f8f1f091fc8$export$14a30de2866685fa;
60
80
  var $ed889f8f1f091fc8$export$8c615c557fdf3d9c;
@@ -63,15 +83,15 @@ var $ed889f8f1f091fc8$export$90881dd581d6be55;
63
83
  var $ed889f8f1f091fc8$export$2e049b8d031600fb;
64
84
  var $ed889f8f1f091fc8$export$c1666977f4e14f87;
65
85
  var $ed889f8f1f091fc8$export$e7dc768d35940237;
66
- $ed889f8f1f091fc8$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
67
86
  $ed889f8f1f091fc8$export$950d8dc0a3751654 = "spectrum-Tags-item_8407eb";
87
+ $ed889f8f1f091fc8$export$f39a09f249340e2a = "focus-ring_8407eb";
88
+ $ed889f8f1f091fc8$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
68
89
  $ed889f8f1f091fc8$export$d35bc1e505d1ebbf = "is-disabled_8407eb";
69
90
  $ed889f8f1f091fc8$export$c5a1243e33faa2d4 = "spectrum-Tag-action_8407eb";
70
91
  $ed889f8f1f091fc8$export$21f5254139e14871 = "spectrum-Tag-icon_8407eb";
71
92
  $ed889f8f1f091fc8$export$d281c967f4ee071e = "spectrum-Tag-content_8407eb";
72
93
  $ed889f8f1f091fc8$export$7427262f66a3b803 = "tags-removable_8407eb";
73
94
  $ed889f8f1f091fc8$export$b8813cd5d7824ce7 = "is-hovered_8407eb";
74
- $ed889f8f1f091fc8$export$f39a09f249340e2a = "focus-ring_8407eb";
75
95
  $ed889f8f1f091fc8$export$1e0fb04f31d3c22a = "is-selected_8407eb";
76
96
  $ed889f8f1f091fc8$export$14a30de2866685fa = "is-invalid_8407eb";
77
97
  $ed889f8f1f091fc8$export$8c615c557fdf3d9c = "spectrum-Tags-itemIcon_8407eb";
@@ -82,7 +102,17 @@ $ed889f8f1f091fc8$export$c1666977f4e14f87 = "spectrum-Tags-item--removable_8407e
82
102
  $ed889f8f1f091fc8$export$e7dc768d35940237 = "is-focused_8407eb";
83
103
 
84
104
 
85
-
105
+ /*
106
+ * Copyright 2020 Adobe. All rights reserved.
107
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
108
+ * you may not use this file except in compliance with the License. You may obtain a copy
109
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
110
+ *
111
+ * Unless required by applicable law or agreed to in writing, software distributed under
112
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
113
+ * OF ANY KIND, either express or implied. See the License for the specific language
114
+ * governing permissions and limitations under the License.
115
+ */
86
116
 
87
117
 
88
118
 
@@ -92,70 +122,65 @@ $ed889f8f1f091fc8$export$e7dc768d35940237 = "is-focused_8407eb";
92
122
 
93
123
 
94
124
  function $dd2c5d00108c1840$export$3288d34c523a1192(props) {
95
- const { children: children , isDisabled: isDisabled , isRemovable: isRemovable , item: item , state: state , onRemove: onRemove , ...otherProps } = props;
125
+ const { children: children , allowsRemoving: allowsRemoving , item: item , state: state , onRemove: onRemove , ...otherProps } = props;
96
126
  // @ts-ignore
97
- let { styleProps: styleProps } = $dTV3V$reactspectrumutils.useStyleProps(otherProps);
98
- let { hoverProps: hoverProps , isHovered: isHovered } = $dTV3V$reactariainteractions.useHover({
99
- isDisabled: isDisabled
100
- });
101
- let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $dTV3V$reactariafocus.useFocusRing({
127
+ let { styleProps: styleProps } = (0, $dTV3V$reactspectrumutils.useStyleProps)(otherProps);
128
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $dTV3V$reactariainteractions.useHover)({});
129
+ let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $dTV3V$reactariafocus.useFocusRing)({
102
130
  within: true
103
131
  });
104
- let tagRef = $dTV3V$react.useRef();
105
- let tagRowRef = $dTV3V$react.useRef();
106
- let { clearButtonProps: clearButtonProps , labelProps: labelProps , tagProps: tagProps , tagRowProps: tagRowProps } = $dTV3V$reactariatag.useTag({
132
+ let tagRef = (0, $dTV3V$react.useRef)();
133
+ let tagRowRef = (0, $dTV3V$react.useRef)();
134
+ let { clearButtonProps: clearButtonProps , labelProps: labelProps , tagProps: tagProps , tagRowProps: tagRowProps } = (0, $dTV3V$reactariatag.useTag)({
107
135
  ...props,
108
- isDisabled: isDisabled,
109
136
  isFocused: isFocused,
110
- isRemovable: isRemovable,
137
+ allowsRemoving: allowsRemoving,
111
138
  item: item,
112
139
  onRemove: onRemove,
113
140
  tagRef: tagRef,
114
141
  tagRowRef: tagRowRef
115
142
  }, state);
116
- return(/*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement("div", {
143
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
117
144
  ...tagRowProps,
118
145
  ref: tagRowRef
119
- }, /*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement("div", {
120
- ...$dTV3V$reactariautils.mergeProps(tagProps, hoverProps, focusProps),
121
- className: $dTV3V$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports)), 'spectrum-Tags-item', {
122
- 'is-disabled': isDisabled,
123
- 'focus-ring': isFocusVisible,
124
- 'is-focused': isFocused,
125
- 'not-removable': !isRemovable,
126
- 'is-hovered': isHovered
146
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
147
+ ...(0, $dTV3V$reactariautils.mergeProps)(tagProps, hoverProps, focusProps),
148
+ className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-item", {
149
+ "focus-ring": isFocusVisible,
150
+ "is-focused": isFocused,
151
+ "is-hovered": isHovered
127
152
  }, styleProps.className),
128
153
  ref: tagRef
129
- }, /*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement($dTV3V$reactspectrumutils.SlotProvider, {
154
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumutils.SlotProvider), {
130
155
  slots: {
131
156
  icon: {
132
- UNSAFE_className: $dTV3V$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports)), 'spectrum-Tag-icon'),
133
- size: 'XS'
157
+ UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-icon"),
158
+ size: "XS"
134
159
  },
135
160
  text: {
136
- UNSAFE_className: $dTV3V$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports)), 'spectrum-Tag-content', {
137
- 'tags-removable': isRemovable
161
+ UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-content", {
162
+ "tags-removable": allowsRemoving
138
163
  }),
139
164
  ...labelProps
140
165
  }
141
166
  }
142
- }, typeof children === 'string' ? /*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement($dTV3V$reactspectrumtext.Text, null, children) : children, isRemovable && /*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement($dd2c5d00108c1840$var$TagRemoveButton, {
167
+ }, typeof children === "string" ? /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumtext.Text), null, children) : children, allowsRemoving && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement($dd2c5d00108c1840$var$TagRemoveButton, {
143
168
  item: item,
144
169
  ...clearButtonProps,
145
- UNSAFE_className: $dTV3V$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports)), 'spectrum-Tag-action')
146
- })))));
170
+ UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-action")
171
+ }))));
147
172
  }
148
173
  function $dd2c5d00108c1840$var$TagRemoveButton(props) {
149
- props = $dTV3V$reactspectrumutils.useSlotProps(props, 'tagRemoveButton');
150
- let { styleProps: styleProps } = $dTV3V$reactspectrumutils.useStyleProps(props);
151
- let clearBtnRef = $dTV3V$react.useRef();
152
- return(/*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement("span", {
174
+ props = (0, $dTV3V$reactspectrumutils.useSlotProps)(props, "tagRemoveButton");
175
+ let { styleProps: styleProps } = (0, $dTV3V$reactspectrumutils.useStyleProps)(props);
176
+ let clearBtnRef = (0, $dTV3V$react.useRef)();
177
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("span", {
153
178
  ...styleProps,
154
179
  ref: clearBtnRef
155
- }, /*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement($dTV3V$reactspectrumbutton.ClearButton, {
180
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumbutton.ClearButton), {
156
181
  preventFocus: true,
157
182
  ...props
158
- })));
183
+ }));
159
184
  }
160
185
 
161
186
 
@@ -164,14 +189,14 @@ function $dd2c5d00108c1840$var$TagRemoveButton(props) {
164
189
 
165
190
 
166
191
 
167
- function $e7b72d8874e98cd4$var$TagGroup(props, ref1) {
168
- props = $dTV3V$reactspectrumprovider.useProviderProps(props);
169
- let { isDisabled: isDisabled , isRemovable: isRemovable , onRemove: onRemove , ...otherProps } = props;
170
- let domRef = $dTV3V$reactspectrumutils.useDOMRef(ref1);
171
- let { styleProps: styleProps } = $dTV3V$reactspectrumutils.useStyleProps(otherProps);
172
- let { direction: direction } = $dTV3V$reactariai18n.useLocale();
173
- let listState = $dTV3V$reactstatelylist.useListState(props);
174
- let gridCollection = $dTV3V$react.useMemo(()=>new $dTV3V$reactstatelygrid.GridCollection({
192
+ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
193
+ props = (0, $dTV3V$reactspectrumprovider.useProviderProps)(props);
194
+ let { allowsRemoving: allowsRemoving , onRemove: onRemove , ...otherProps } = props;
195
+ let domRef = (0, $dTV3V$reactspectrumutils.useDOMRef)(ref);
196
+ let { styleProps: styleProps } = (0, $dTV3V$reactspectrumutils.useStyleProps)(otherProps);
197
+ let { direction: direction } = (0, $dTV3V$reactariai18n.useLocale)();
198
+ let listState = (0, $dTV3V$reactstatelylist.useListState)(props);
199
+ let gridCollection = (0, $dTV3V$react.useMemo)(()=>new (0, $dTV3V$reactstatelygrid.GridCollection)({
175
200
  columnCount: 1,
176
201
  items: [
177
202
  ...listState.collection
@@ -180,62 +205,55 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref1) {
180
205
  {
181
206
  ...item,
182
207
  index: 0,
183
- type: 'cell'
208
+ type: "cell"
184
209
  }
185
210
  ];
186
211
  return {
187
- type: 'item',
212
+ type: "item",
188
213
  childNodes: childNodes
189
214
  };
190
215
  })
191
- })
192
- , [
216
+ }), [
193
217
  listState.collection,
194
- isRemovable
218
+ allowsRemoving
195
219
  ]);
196
- let state = $dTV3V$reactstatelygrid.useGridState({
220
+ let state = (0, $dTV3V$reactstatelygrid.useGridState)({
197
221
  ...props,
198
222
  collection: gridCollection,
199
- focusMode: 'cell'
223
+ focusMode: "cell"
200
224
  });
201
- let keyboardDelegate = new $dTV3V$reactariatag.TagKeyboardDelegate({
225
+ let keyboardDelegate = new (0, $dTV3V$reactariatag.TagKeyboardDelegate)({
202
226
  collection: state.collection,
203
- disabledKeys: state.disabledKeys,
227
+ disabledKeys: new Set(),
204
228
  ref: domRef,
205
229
  direction: direction,
206
- focusMode: 'cell'
230
+ focusMode: "cell"
207
231
  });
208
- let { gridProps: gridProps } = $dTV3V$reactariagrid.useGrid({
232
+ let { gridProps: gridProps } = (0, $dTV3V$reactariagrid.useGrid)({
209
233
  ...props,
210
234
  keyboardDelegate: keyboardDelegate
211
235
  }, state, domRef);
212
- const { tagGroupProps: tagGroupProps } = $dTV3V$reactariatag.useTagGroup(props, listState);
236
+ const { tagGroupProps: tagGroupProps } = (0, $dTV3V$reactariatag.useTagGroup)(props);
213
237
  // Don't want the grid to be focusable or accessible via keyboard
214
238
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
215
239
  let { tabIndex: tabIndex , role: role , ...otherGridProps } = gridProps;
216
- return(/*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement("div", {
217
- ...$dTV3V$reactariautils.mergeProps(styleProps, tagGroupProps, otherGridProps),
218
- className: $dTV3V$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports)), 'spectrum-Tags', {
219
- 'is-disabled': isDisabled
220
- }, styleProps.className),
221
- role: state.collection.size ? 'grid' : null,
240
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
241
+ ...(0, $dTV3V$reactariautils.mergeProps)(styleProps, tagGroupProps, otherGridProps),
242
+ className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags", styleProps.className),
243
+ role: state.collection.size ? "grid" : null,
222
244
  ref: domRef
223
245
  }, [
224
246
  ...gridCollection
225
- ].map((item)=>{
226
- var ref;
227
- return(/*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).createElement($dd2c5d00108c1840$export$3288d34c523a1192, {
247
+ ].map((item)=>/*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dd2c5d00108c1840$export$3288d34c523a1192), {
228
248
  ...item.childNodes[0].props,
229
249
  key: item.key,
230
250
  item: item,
231
251
  state: state,
232
- isDisabled: isDisabled || state.disabledKeys.has((ref = item === null || item === void 0 ? void 0 : item.childNodes[0]) === null || ref === void 0 ? void 0 : ref.key),
233
- isRemovable: isRemovable,
252
+ allowsRemoving: allowsRemoving,
234
253
  onRemove: onRemove
235
- }, item.childNodes[0].rendered));
236
- })));
254
+ }, item.childNodes[0].rendered)));
237
255
  }
238
- const $e7b72d8874e98cd4$export$67ea30858aaf75e3 = /*#__PURE__*/ ($parcel$interopDefault($dTV3V$react)).forwardRef($e7b72d8874e98cd4$var$TagGroup);
256
+ /** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */ const $e7b72d8874e98cd4$export$67ea30858aaf75e3 = /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).forwardRef($e7b72d8874e98cd4$var$TagGroup);
239
257
 
240
258
 
241
259
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAoC;AACpC,GAA6B;AAC7B,GAAqC;AACrC,GAAmC;AACnC,GAAsC;AACtC,GAAgC;AAChC,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA4B;AAC5B,GAAwC;AACxC,GAAyC;AACzC,GAA+C;AAC/C,GAAiC;AACjC,GAA+C;AAC/C,GAA4B;AAhB5B,yCAA+B,GAAG,CAAsB;AACxD,yCAAoC,GAAG,CAA2B;AAClE,yCAA6B,GAAG,CAAoB;AACpD,yCAAqC,GAAG,CAA4B;AACpE,yCAAmC,GAAG,CAA0B;AAChE,yCAAsC,GAAG,CAA6B;AACtE,yCAAgC,GAAG,CAAuB;AAC1D,yCAA4B,GAAG,CAAmB;AAClD,yCAA4B,GAAG,CAAmB;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,gBAAA,aAAa,EAAA,CAAC,GAAG,+BAAW,CAAC,KAAK,EAAE,SAAS;IAEpD,EAAiE,AAAjE,+DAAiE;IACjE,EAA6D,AAA7D,2DAA6D;IAC7D,GAAG,CAAC,CAAC,WAAA,QAAQ,SAAE,IAAI,MAAK,cAAc,CAAA,CAAC,GAAG,SAAS;IACnD,MAAM,oEACH,CAAG;WACE,gCAAU,CAAC,UAAU,EAAE,aAAa,EAAE,cAAc;QACxD,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAAa,cAAE,UAAU;QAC3B,CAAC,EACD,UAAU,CAAC,SAAS;QAGxB,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,GAAG,CAAM,QAAG,IAAI;QAC3C,GAAG,EAAE,MAAM;OACV,CAAC;WAAG,cAAc;IAAA,CAAC,CAAC,GAAG,EAAC,IAAI;;kFAC1B,yCAAG;eACE,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK;YAC5B,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,KAAK;YACZ,UAAU,EAAE,UAAU,IAAI,KAAK,CAAC,YAAY,CAAC,GAAG,QAAC,IAAI,aAAJ,IAAI,KAAJ,IAAI,CAAJ,CAAgB,GAAhB,IAAI,CAAJ,CAAgB,GAAhB,IAAI,CAAE,UAAU,CAAC,CAAC,uBAAlB,IAAI,CAAJ,CAAwB,GAAxB,IAAI,CAAJ,CAAwB,OAAH,GAAG;YACzE,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,QAAQ;WACjB,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ;;AAKtC,CAAC;AAED,KAAK,CAAC,yCAAS,iBAAG,sCAAK,CAAC,UAAU,CAAC,8BAAQ","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","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 '@react-types/tag';\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, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {GridCollection, useGridState} from '@react-stately/grid';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useMemo} from 'react';\nimport {SpectrumTagGroupProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {useGrid} from '@react-aria/grid';\nimport {useListState} from '@react-stately/list';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n isDisabled,\n isRemovable,\n onRemove,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let {direction} = useLocale();\n let listState = useListState(props);\n let gridCollection = useMemo(() => new GridCollection({\n columnCount: 1, // unused, but required for grid collections\n items: [...listState.collection].map(item => {\n let childNodes = [{\n ...item,\n index: 0,\n type: 'cell'\n }];\n\n return {\n type: 'item',\n childNodes\n };\n })\n }), [listState.collection, isRemovable]);\n let state = useGridState({\n ...props,\n collection: gridCollection,\n focusMode: 'cell'\n });\n let keyboardDelegate = new TagKeyboardDelegate({\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n ref: domRef,\n direction,\n focusMode: 'cell'\n });\n let {gridProps} = useGrid({\n ...props,\n keyboardDelegate\n }, state, domRef);\n const {tagGroupProps} = useTagGroup(props, listState);\n\n // Don't want the grid to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, role, ...otherGridProps} = gridProps;\n return (\n <div\n {...mergeProps(styleProps, tagGroupProps, otherGridProps)}\n className={\n classNames(\n styles,\n 'spectrum-Tags',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n role={state.collection.size ? 'grid' : null}\n ref={domRef}>\n {[...gridCollection].map(item => (\n <Tag\n {...item.childNodes[0].props}\n key={item.key}\n item={item}\n state={state}\n isDisabled={isDisabled || state.disabledKeys.has(item?.childNodes[0]?.key)}\n isRemovable={isRemovable}\n onRemove={onRemove}>\n {item.childNodes[0].rendered}\n </Tag>\n ))}\n </div>\n );\n}\n\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as 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\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, SlotProvider, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumTagProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n children,\n isDisabled,\n isRemovable,\n item,\n state,\n onRemove,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});\n let tagRef = useRef();\n let tagRowRef = useRef();\n let {clearButtonProps, labelProps, tagProps, tagRowProps} = useTag({\n ...props,\n isDisabled,\n isFocused,\n isRemovable,\n item,\n onRemove,\n tagRef,\n tagRowRef\n }, state);\n\n return (\n <div\n {...tagRowProps}\n ref={tagRowRef}>\n <div\n {...mergeProps(tagProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tags-item',\n {\n 'is-disabled': isDisabled,\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'not-removable': !isRemovable,\n 'is-hovered': isHovered\n },\n styleProps.className\n )}\n ref={tagRef}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': isRemovable}), ...labelProps}\n }}>\n\n {typeof children === 'string' ? <Text>{children}</Text> : children}\n {isRemovable && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n props = useSlotProps(props, 'tagRemoveButton');\n let {styleProps} = useStyleProps(props);\n let clearBtnRef = useRef();\n\n return (\n <span\n {...styleProps}\n ref={clearBtnRef}>\n <ClearButton\n preventFocus\n {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAhBA,4CAAuC;AACvC,4CAA+B;AAC/B,4CAAkC;AAClC,4CAAgC;AAChC,4CAAwC;AACxC,4CAAsC;AACtC,4CAAyC;AACzC,4CAAmC;AACnC,4CAA+B;AAC/B,4CAAgC;AAChC,4CAA+B;AAC/B,4CAA2C;AAC3C,4CAA4C;AAC5C,4CAAkD;AAClD,4CAAoC;AACpC,4CAAkD;AAClD,4CAA+B;;;AChB/B;;;;;;;;;;CAUC,GAED;;;;;;;;;AAWO,SAAS,0CAAO,KAA0B,EAAE;IACjD,MAAM,YACJ,SAAQ,kBACR,eAAc,QACd,KAAI,SACJ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AAmB,IAAI,CAAA,GAAA,uCAAkB,EAAE;QAC7C,YAAY,MAAM,UAAU;QAC5B,cAAc,IAAI;QAClB,KAAK;mBACL;QACA,WAAW;IACb;IACA,IAAI,aAAC,UAAS,EAAC,GAAG,CAAA,GAAA,4BAAO,AAAD,EAAE;QACxB,GAAG,KAAK;0BACR;IACF,GAAG,OAAO;IACV,MAAM,iBAAC,cAAa,EAAC,GAAG,CAAA,GAAA,+BAAW,AAAD,EAAE;IAEpC,iEAAiE;IACjE,6DAA6D;IAC7D,IAAI,YAAC,SAAQ,QAAE,KAAI,EAAE,GAAG,gBAAe,GAAG;IAC1C,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,YAAY,eAAe,eAAe;QACzD,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,yDAAM,OAAD,GACL,iBACA,WAAW,SAAS;QAGxB,MAAM,MAAM,UAAU,CAAC,IAAI,GAAG,SAAS,IAAI;QAC3C,KAAK;OACJ;WAAI;KAAe,CAAC,GAAG,CAAC,CAAA,qBACvB,0DAAC,CAAA,GAAA,yCAAE;YACA,GAAG,KAAK,UAAU,CAAC,EAAE,CAAC,KAAK;YAC5B,KAAK,KAAK,GAAG;YACb,MAAM;YACN,OAAO;YACP,gBAAgB;YAChB,UAAU;WACT,KAAK,UAAU,CAAC,EAAE,CAAC,QAAQ;AAKtC;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;;CD7FlC,GAED","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","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 '@react-types/tag';\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, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {GridCollection, useGridState} from '@react-stately/grid';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useMemo} from 'react';\nimport {SpectrumTagGroupProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {useGrid} from '@react-aria/grid';\nimport {useListState} from '@react-stately/list';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n allowsRemoving,\n onRemove,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let {direction} = useLocale();\n let listState = useListState(props);\n let gridCollection = useMemo(() => new GridCollection({\n columnCount: 1, // unused, but required for grid collections\n items: [...listState.collection].map(item => {\n let childNodes = [{\n ...item,\n index: 0,\n type: 'cell'\n }];\n\n return {\n type: 'item',\n childNodes\n };\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }), [listState.collection, allowsRemoving]);\n let state = useGridState({\n ...props,\n collection: gridCollection,\n focusMode: 'cell'\n });\n let keyboardDelegate = new TagKeyboardDelegate({\n collection: state.collection,\n disabledKeys: new Set(),\n ref: domRef,\n direction,\n focusMode: 'cell'\n });\n let {gridProps} = useGrid({\n ...props,\n keyboardDelegate\n }, state, domRef);\n const {tagGroupProps} = useTagGroup(props);\n\n // Don't want the grid to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, role, ...otherGridProps} = gridProps;\n return (\n <div\n {...mergeProps(styleProps, tagGroupProps, otherGridProps)}\n className={\n classNames(\n styles,\n 'spectrum-Tags',\n styleProps.className\n )\n }\n role={state.collection.size ? 'grid' : null}\n ref={domRef}>\n {[...gridCollection].map(item => (\n <Tag\n {...item.childNodes[0].props}\n key={item.key}\n item={item}\n state={state}\n allowsRemoving={allowsRemoving}\n onRemove={onRemove}>\n {item.childNodes[0].rendered}\n </Tag>\n ))}\n </div>\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","/*\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, SlotProvider, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumTagProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n children,\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 tagRef = useRef();\n let tagRowRef = useRef();\n let {clearButtonProps, labelProps, tagProps, tagRowProps} = useTag({\n ...props,\n isFocused,\n allowsRemoving,\n item,\n onRemove,\n tagRef,\n tagRowRef\n }, state);\n\n return (\n <div\n {...tagRowProps}\n ref={tagRowRef}>\n <div\n {...mergeProps(tagProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tags-item',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered\n },\n styleProps.className\n )}\n ref={tagRef}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': allowsRemoving}), ...labelProps}\n }}>\n\n {typeof children === 'string' ? <Text>{children}</Text> : children}\n {allowsRemoving && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n props = useSlotProps(props, 'tagRemoveButton');\n let {styleProps} = useStyleProps(props);\n let clearBtnRef = useRef();\n\n return (\n <span\n {...styleProps}\n ref={clearBtnRef}>\n <ClearButton\n preventFocus\n {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -20,21 +20,41 @@ function $parcel$interopDefault(a) {
20
20
  function $parcel$export(e, n, v, s) {
21
21
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
22
22
  }
23
-
23
+ /*
24
+ * Copyright 2020 Adobe. All rights reserved.
25
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
26
+ * you may not use this file except in compliance with the License. You may obtain a copy
27
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software distributed under
30
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
31
+ * OF ANY KIND, either express or implied. See the License for the specific language
32
+ * governing permissions and limitations under the License.
33
+ */ /*
34
+ * Copyright 2020 Adobe. All rights reserved.
35
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
36
+ * you may not use this file except in compliance with the License. You may obtain a copy
37
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
38
+ *
39
+ * Unless required by applicable law or agreed to in writing, software distributed under
40
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
41
+ * OF ANY KIND, either express or implied. See the License for the specific language
42
+ * governing permissions and limitations under the License.
43
+ */
24
44
 
25
45
 
26
46
 
27
47
  var $c033a7c057e84ef1$exports = {};
28
48
 
29
- $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags", () => $c033a7c057e84ef1$export$eb7e80013a1212da, (v) => $c033a7c057e84ef1$export$eb7e80013a1212da = v);
30
49
  $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-item", () => $c033a7c057e84ef1$export$950d8dc0a3751654, (v) => $c033a7c057e84ef1$export$950d8dc0a3751654 = v);
50
+ $parcel$export($c033a7c057e84ef1$exports, "focus-ring", () => $c033a7c057e84ef1$export$f39a09f249340e2a, (v) => $c033a7c057e84ef1$export$f39a09f249340e2a = v);
51
+ $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags", () => $c033a7c057e84ef1$export$eb7e80013a1212da, (v) => $c033a7c057e84ef1$export$eb7e80013a1212da = v);
31
52
  $parcel$export($c033a7c057e84ef1$exports, "is-disabled", () => $c033a7c057e84ef1$export$d35bc1e505d1ebbf, (v) => $c033a7c057e84ef1$export$d35bc1e505d1ebbf = v);
32
53
  $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag-action", () => $c033a7c057e84ef1$export$c5a1243e33faa2d4, (v) => $c033a7c057e84ef1$export$c5a1243e33faa2d4 = v);
33
54
  $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag-icon", () => $c033a7c057e84ef1$export$21f5254139e14871, (v) => $c033a7c057e84ef1$export$21f5254139e14871 = v);
34
55
  $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tag-content", () => $c033a7c057e84ef1$export$d281c967f4ee071e, (v) => $c033a7c057e84ef1$export$d281c967f4ee071e = v);
35
56
  $parcel$export($c033a7c057e84ef1$exports, "tags-removable", () => $c033a7c057e84ef1$export$7427262f66a3b803, (v) => $c033a7c057e84ef1$export$7427262f66a3b803 = v);
36
57
  $parcel$export($c033a7c057e84ef1$exports, "is-hovered", () => $c033a7c057e84ef1$export$b8813cd5d7824ce7, (v) => $c033a7c057e84ef1$export$b8813cd5d7824ce7 = v);
37
- $parcel$export($c033a7c057e84ef1$exports, "focus-ring", () => $c033a7c057e84ef1$export$f39a09f249340e2a, (v) => $c033a7c057e84ef1$export$f39a09f249340e2a = v);
38
58
  $parcel$export($c033a7c057e84ef1$exports, "is-selected", () => $c033a7c057e84ef1$export$1e0fb04f31d3c22a, (v) => $c033a7c057e84ef1$export$1e0fb04f31d3c22a = v);
39
59
  $parcel$export($c033a7c057e84ef1$exports, "is-invalid", () => $c033a7c057e84ef1$export$14a30de2866685fa, (v) => $c033a7c057e84ef1$export$14a30de2866685fa = v);
40
60
  $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-itemIcon", () => $c033a7c057e84ef1$export$8c615c557fdf3d9c, (v) => $c033a7c057e84ef1$export$8c615c557fdf3d9c = v);
@@ -43,15 +63,15 @@ $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-itemClearButton", () =>
43
63
  $parcel$export($c033a7c057e84ef1$exports, "spectrum-Avatar", () => $c033a7c057e84ef1$export$2e049b8d031600fb, (v) => $c033a7c057e84ef1$export$2e049b8d031600fb = v);
44
64
  $parcel$export($c033a7c057e84ef1$exports, "spectrum-Tags-item--removable", () => $c033a7c057e84ef1$export$c1666977f4e14f87, (v) => $c033a7c057e84ef1$export$c1666977f4e14f87 = v);
45
65
  $parcel$export($c033a7c057e84ef1$exports, "is-focused", () => $c033a7c057e84ef1$export$e7dc768d35940237, (v) => $c033a7c057e84ef1$export$e7dc768d35940237 = v);
46
- var $c033a7c057e84ef1$export$eb7e80013a1212da;
47
66
  var $c033a7c057e84ef1$export$950d8dc0a3751654;
67
+ var $c033a7c057e84ef1$export$f39a09f249340e2a;
68
+ var $c033a7c057e84ef1$export$eb7e80013a1212da;
48
69
  var $c033a7c057e84ef1$export$d35bc1e505d1ebbf;
49
70
  var $c033a7c057e84ef1$export$c5a1243e33faa2d4;
50
71
  var $c033a7c057e84ef1$export$21f5254139e14871;
51
72
  var $c033a7c057e84ef1$export$d281c967f4ee071e;
52
73
  var $c033a7c057e84ef1$export$7427262f66a3b803;
53
74
  var $c033a7c057e84ef1$export$b8813cd5d7824ce7;
54
- var $c033a7c057e84ef1$export$f39a09f249340e2a;
55
75
  var $c033a7c057e84ef1$export$1e0fb04f31d3c22a;
56
76
  var $c033a7c057e84ef1$export$14a30de2866685fa;
57
77
  var $c033a7c057e84ef1$export$8c615c557fdf3d9c;
@@ -60,15 +80,15 @@ var $c033a7c057e84ef1$export$90881dd581d6be55;
60
80
  var $c033a7c057e84ef1$export$2e049b8d031600fb;
61
81
  var $c033a7c057e84ef1$export$c1666977f4e14f87;
62
82
  var $c033a7c057e84ef1$export$e7dc768d35940237;
63
- $c033a7c057e84ef1$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
64
83
  $c033a7c057e84ef1$export$950d8dc0a3751654 = "spectrum-Tags-item_8407eb";
84
+ $c033a7c057e84ef1$export$f39a09f249340e2a = "focus-ring_8407eb";
85
+ $c033a7c057e84ef1$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
65
86
  $c033a7c057e84ef1$export$d35bc1e505d1ebbf = "is-disabled_8407eb";
66
87
  $c033a7c057e84ef1$export$c5a1243e33faa2d4 = "spectrum-Tag-action_8407eb";
67
88
  $c033a7c057e84ef1$export$21f5254139e14871 = "spectrum-Tag-icon_8407eb";
68
89
  $c033a7c057e84ef1$export$d281c967f4ee071e = "spectrum-Tag-content_8407eb";
69
90
  $c033a7c057e84ef1$export$7427262f66a3b803 = "tags-removable_8407eb";
70
91
  $c033a7c057e84ef1$export$b8813cd5d7824ce7 = "is-hovered_8407eb";
71
- $c033a7c057e84ef1$export$f39a09f249340e2a = "focus-ring_8407eb";
72
92
  $c033a7c057e84ef1$export$1e0fb04f31d3c22a = "is-selected_8407eb";
73
93
  $c033a7c057e84ef1$export$14a30de2866685fa = "is-invalid_8407eb";
74
94
  $c033a7c057e84ef1$export$8c615c557fdf3d9c = "spectrum-Tags-itemIcon_8407eb";
@@ -79,7 +99,17 @@ $c033a7c057e84ef1$export$c1666977f4e14f87 = "spectrum-Tags-item--removable_8407e
79
99
  $c033a7c057e84ef1$export$e7dc768d35940237 = "is-focused_8407eb";
80
100
 
81
101
 
82
-
102
+ /*
103
+ * Copyright 2020 Adobe. All rights reserved.
104
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
105
+ * you may not use this file except in compliance with the License. You may obtain a copy
106
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
107
+ *
108
+ * Unless required by applicable law or agreed to in writing, software distributed under
109
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
110
+ * OF ANY KIND, either express or implied. See the License for the specific language
111
+ * governing permissions and limitations under the License.
112
+ */
83
113
 
84
114
 
85
115
 
@@ -89,70 +119,65 @@ $c033a7c057e84ef1$export$e7dc768d35940237 = "is-focused_8407eb";
89
119
 
90
120
 
91
121
  function $b5f5ee35d3b6b95c$export$3288d34c523a1192(props) {
92
- const { children: children , isDisabled: isDisabled , isRemovable: isRemovable , item: item , state: state , onRemove: onRemove , ...otherProps } = props;
122
+ const { children: children , allowsRemoving: allowsRemoving , item: item , state: state , onRemove: onRemove , ...otherProps } = props;
93
123
  // @ts-ignore
94
- let { styleProps: styleProps } = $fUaQ2$useStyleProps(otherProps);
95
- let { hoverProps: hoverProps , isHovered: isHovered } = $fUaQ2$useHover({
96
- isDisabled: isDisabled
97
- });
98
- let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $fUaQ2$useFocusRing({
124
+ let { styleProps: styleProps } = (0, $fUaQ2$useStyleProps)(otherProps);
125
+ let { hoverProps: hoverProps , isHovered: isHovered } = (0, $fUaQ2$useHover)({});
126
+ let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $fUaQ2$useFocusRing)({
99
127
  within: true
100
128
  });
101
- let tagRef = $fUaQ2$useRef();
102
- let tagRowRef = $fUaQ2$useRef();
103
- let { clearButtonProps: clearButtonProps , labelProps: labelProps , tagProps: tagProps , tagRowProps: tagRowProps } = $fUaQ2$useTag({
129
+ let tagRef = (0, $fUaQ2$useRef)();
130
+ let tagRowRef = (0, $fUaQ2$useRef)();
131
+ let { clearButtonProps: clearButtonProps , labelProps: labelProps , tagProps: tagProps , tagRowProps: tagRowProps } = (0, $fUaQ2$useTag)({
104
132
  ...props,
105
- isDisabled: isDisabled,
106
133
  isFocused: isFocused,
107
- isRemovable: isRemovable,
134
+ allowsRemoving: allowsRemoving,
108
135
  item: item,
109
136
  onRemove: onRemove,
110
137
  tagRef: tagRef,
111
138
  tagRowRef: tagRowRef
112
139
  }, state);
113
- return(/*#__PURE__*/ $fUaQ2$react.createElement("div", {
140
+ return /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
114
141
  ...tagRowProps,
115
142
  ref: tagRowRef
116
- }, /*#__PURE__*/ $fUaQ2$react.createElement("div", {
117
- ...$fUaQ2$mergeProps(tagProps, hoverProps, focusProps),
118
- className: $fUaQ2$classNames((/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports)), 'spectrum-Tags-item', {
119
- 'is-disabled': isDisabled,
120
- 'focus-ring': isFocusVisible,
121
- 'is-focused': isFocused,
122
- 'not-removable': !isRemovable,
123
- 'is-hovered': isHovered
143
+ }, /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
144
+ ...(0, $fUaQ2$mergeProps)(tagProps, hoverProps, focusProps),
145
+ className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags-item", {
146
+ "focus-ring": isFocusVisible,
147
+ "is-focused": isFocused,
148
+ "is-hovered": isHovered
124
149
  }, styleProps.className),
125
150
  ref: tagRef
126
- }, /*#__PURE__*/ $fUaQ2$react.createElement($fUaQ2$SlotProvider, {
151
+ }, /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$SlotProvider), {
127
152
  slots: {
128
153
  icon: {
129
- UNSAFE_className: $fUaQ2$classNames((/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports)), 'spectrum-Tag-icon'),
130
- size: 'XS'
154
+ UNSAFE_className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tag-icon"),
155
+ size: "XS"
131
156
  },
132
157
  text: {
133
- UNSAFE_className: $fUaQ2$classNames((/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports)), 'spectrum-Tag-content', {
134
- 'tags-removable': isRemovable
158
+ UNSAFE_className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tag-content", {
159
+ "tags-removable": allowsRemoving
135
160
  }),
136
161
  ...labelProps
137
162
  }
138
163
  }
139
- }, typeof children === 'string' ? /*#__PURE__*/ $fUaQ2$react.createElement($fUaQ2$Text, null, children) : children, isRemovable && /*#__PURE__*/ $fUaQ2$react.createElement($b5f5ee35d3b6b95c$var$TagRemoveButton, {
164
+ }, typeof children === "string" ? /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$Text), null, children) : children, allowsRemoving && /*#__PURE__*/ (0, $fUaQ2$react).createElement($b5f5ee35d3b6b95c$var$TagRemoveButton, {
140
165
  item: item,
141
166
  ...clearButtonProps,
142
- UNSAFE_className: $fUaQ2$classNames((/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports)), 'spectrum-Tag-action')
143
- })))));
167
+ UNSAFE_className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tag-action")
168
+ }))));
144
169
  }
145
170
  function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
146
- props = $fUaQ2$useSlotProps(props, 'tagRemoveButton');
147
- let { styleProps: styleProps } = $fUaQ2$useStyleProps(props);
148
- let clearBtnRef = $fUaQ2$useRef();
149
- return(/*#__PURE__*/ $fUaQ2$react.createElement("span", {
171
+ props = (0, $fUaQ2$useSlotProps)(props, "tagRemoveButton");
172
+ let { styleProps: styleProps } = (0, $fUaQ2$useStyleProps)(props);
173
+ let clearBtnRef = (0, $fUaQ2$useRef)();
174
+ return /*#__PURE__*/ (0, $fUaQ2$react).createElement("span", {
150
175
  ...styleProps,
151
176
  ref: clearBtnRef
152
- }, /*#__PURE__*/ $fUaQ2$react.createElement($fUaQ2$ClearButton, {
177
+ }, /*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $fUaQ2$ClearButton), {
153
178
  preventFocus: true,
154
179
  ...props
155
- })));
180
+ }));
156
181
  }
157
182
 
158
183
 
@@ -161,14 +186,14 @@ function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
161
186
 
162
187
 
163
188
 
164
- function $880d112c7a588209$var$TagGroup(props, ref1) {
165
- props = $fUaQ2$useProviderProps(props);
166
- let { isDisabled: isDisabled , isRemovable: isRemovable , onRemove: onRemove , ...otherProps } = props;
167
- let domRef = $fUaQ2$useDOMRef(ref1);
168
- let { styleProps: styleProps } = $fUaQ2$useStyleProps(otherProps);
169
- let { direction: direction } = $fUaQ2$useLocale();
170
- let listState = $fUaQ2$useListState(props);
171
- let gridCollection = $fUaQ2$useMemo(()=>new $fUaQ2$GridCollection({
189
+ function $880d112c7a588209$var$TagGroup(props, ref) {
190
+ props = (0, $fUaQ2$useProviderProps)(props);
191
+ let { allowsRemoving: allowsRemoving , onRemove: onRemove , ...otherProps } = props;
192
+ let domRef = (0, $fUaQ2$useDOMRef)(ref);
193
+ let { styleProps: styleProps } = (0, $fUaQ2$useStyleProps)(otherProps);
194
+ let { direction: direction } = (0, $fUaQ2$useLocale)();
195
+ let listState = (0, $fUaQ2$useListState)(props);
196
+ let gridCollection = (0, $fUaQ2$useMemo)(()=>new (0, $fUaQ2$GridCollection)({
172
197
  columnCount: 1,
173
198
  items: [
174
199
  ...listState.collection
@@ -177,62 +202,55 @@ function $880d112c7a588209$var$TagGroup(props, ref1) {
177
202
  {
178
203
  ...item,
179
204
  index: 0,
180
- type: 'cell'
205
+ type: "cell"
181
206
  }
182
207
  ];
183
208
  return {
184
- type: 'item',
209
+ type: "item",
185
210
  childNodes: childNodes
186
211
  };
187
212
  })
188
- })
189
- , [
213
+ }), [
190
214
  listState.collection,
191
- isRemovable
215
+ allowsRemoving
192
216
  ]);
193
- let state = $fUaQ2$useGridState({
217
+ let state = (0, $fUaQ2$useGridState)({
194
218
  ...props,
195
219
  collection: gridCollection,
196
- focusMode: 'cell'
220
+ focusMode: "cell"
197
221
  });
198
- let keyboardDelegate = new $fUaQ2$TagKeyboardDelegate({
222
+ let keyboardDelegate = new (0, $fUaQ2$TagKeyboardDelegate)({
199
223
  collection: state.collection,
200
- disabledKeys: state.disabledKeys,
224
+ disabledKeys: new Set(),
201
225
  ref: domRef,
202
226
  direction: direction,
203
- focusMode: 'cell'
227
+ focusMode: "cell"
204
228
  });
205
- let { gridProps: gridProps } = $fUaQ2$useGrid({
229
+ let { gridProps: gridProps } = (0, $fUaQ2$useGrid)({
206
230
  ...props,
207
231
  keyboardDelegate: keyboardDelegate
208
232
  }, state, domRef);
209
- const { tagGroupProps: tagGroupProps } = $fUaQ2$useTagGroup(props, listState);
233
+ const { tagGroupProps: tagGroupProps } = (0, $fUaQ2$useTagGroup)(props);
210
234
  // Don't want the grid to be focusable or accessible via keyboard
211
235
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
212
236
  let { tabIndex: tabIndex , role: role , ...otherGridProps } = gridProps;
213
- return(/*#__PURE__*/ $fUaQ2$react.createElement("div", {
214
- ...$fUaQ2$mergeProps(styleProps, tagGroupProps, otherGridProps),
215
- className: $fUaQ2$classNames((/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports)), 'spectrum-Tags', {
216
- 'is-disabled': isDisabled
217
- }, styleProps.className),
218
- role: state.collection.size ? 'grid' : null,
237
+ return /*#__PURE__*/ (0, $fUaQ2$react).createElement("div", {
238
+ ...(0, $fUaQ2$mergeProps)(styleProps, tagGroupProps, otherGridProps),
239
+ className: (0, $fUaQ2$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($c033a7c057e84ef1$exports))), "spectrum-Tags", styleProps.className),
240
+ role: state.collection.size ? "grid" : null,
219
241
  ref: domRef
220
242
  }, [
221
243
  ...gridCollection
222
- ].map((item)=>{
223
- var ref;
224
- return(/*#__PURE__*/ $fUaQ2$react.createElement($b5f5ee35d3b6b95c$export$3288d34c523a1192, {
244
+ ].map((item)=>/*#__PURE__*/ (0, $fUaQ2$react).createElement((0, $b5f5ee35d3b6b95c$export$3288d34c523a1192), {
225
245
  ...item.childNodes[0].props,
226
246
  key: item.key,
227
247
  item: item,
228
248
  state: state,
229
- isDisabled: isDisabled || state.disabledKeys.has((ref = item === null || item === void 0 ? void 0 : item.childNodes[0]) === null || ref === void 0 ? void 0 : ref.key),
230
- isRemovable: isRemovable,
249
+ allowsRemoving: allowsRemoving,
231
250
  onRemove: onRemove
232
- }, item.childNodes[0].rendered));
233
- })));
251
+ }, item.childNodes[0].rendered)));
234
252
  }
235
- const $880d112c7a588209$export$67ea30858aaf75e3 = /*#__PURE__*/ $fUaQ2$react.forwardRef($880d112c7a588209$var$TagGroup);
253
+ /** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */ const $880d112c7a588209$export$67ea30858aaf75e3 = /*#__PURE__*/ (0, $fUaQ2$react).forwardRef($880d112c7a588209$var$TagGroup);
236
254
 
237
255
 
238
256
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAA+B;AAC/B,GAAoC;AACpC,GAA6B;AAC7B,GAAqC;AACrC,GAAmC;AACnC,GAAsC;AACtC,GAAgC;AAChC,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAC7B,GAA4B;AAC5B,GAAwC;AACxC,GAAyC;AACzC,GAA+C;AAC/C,GAAiC;AACjC,GAA+C;AAC/C,GAA4B;AAhB5B,yCAA+B,GAAG,CAAsB;AACxD,yCAAoC,GAAG,CAA2B;AAClE,yCAA6B,GAAG,CAAoB;AACpD,yCAAqC,GAAG,CAA4B;AACpE,yCAAmC,GAAG,CAA0B;AAChE,yCAAsC,GAAG,CAA6B;AACt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/@react-spectrum/tag/src/TagGroup.tsx","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 '@react-types/tag';\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, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {GridCollection, useGridState} from '@react-stately/grid';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useMemo} from 'react';\nimport {SpectrumTagGroupProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {useGrid} from '@react-aria/grid';\nimport {useListState} from '@react-stately/list';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n isDisabled,\n isRemovable,\n onRemove,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let {direction} = useLocale();\n let listState = useListState(props);\n let gridCollection = useMemo(() => new GridCollection({\n columnCount: 1, // unused, but required for grid collections\n items: [...listState.collection].map(item => {\n let childNodes = [{\n ...item,\n index: 0,\n type: 'cell'\n }];\n\n return {\n type: 'item',\n childNodes\n };\n })\n }), [listState.collection, isRemovable]);\n let state = useGridState({\n ...props,\n collection: gridCollection,\n focusMode: 'cell'\n });\n let keyboardDelegate = new TagKeyboardDelegate({\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n ref: domRef,\n direction,\n focusMode: 'cell'\n });\n let {gridProps} = useGrid({\n ...props,\n keyboardDelegate\n }, state, domRef);\n const {tagGroupProps} = useTagGroup(props, listState);\n\n // Don't want the grid to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, role, ...otherGridProps} = gridProps;\n return (\n <div\n {...mergeProps(styleProps, tagGroupProps, otherGridProps)}\n className={\n classNames(\n styles,\n 'spectrum-Tags',\n {\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }\n role={state.collection.size ? 'grid' : null}\n ref={domRef}>\n {[...gridCollection].map(item => (\n <Tag\n {...item.childNodes[0].props}\n key={item.key}\n item={item}\n state={state}\n isDisabled={isDisabled || state.disabledKeys.has(item?.childNodes[0]?.key)}\n isRemovable={isRemovable}\n onRemove={onRemove}>\n {item.childNodes[0].rendered}\n </Tag>\n ))}\n </div>\n );\n}\n\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as 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\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, SlotProvider, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumTagProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n children,\n isDisabled,\n isRemovable,\n item,\n state,\n onRemove,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});\n let tagRef = useRef();\n let tagRowRef = useRef();\n let {clearButtonProps, labelProps, tagProps, tagRowProps} = useTag({\n ...props,\n isDisabled,\n isFocused,\n isRemovable,\n item,\n onRemove,\n tagRef,\n tagRowRef\n }, state);\n\n return (\n <div\n {...tagRowProps}\n ref={tagRowRef}>\n <div\n {...mergeProps(tagProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tags-item',\n {\n 'is-disabled': isDisabled,\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'not-removable': !isRemovable,\n 'is-hovered': isHovered\n },\n styleProps.className\n )}\n ref={tagRef}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': isRemovable}), ...labelProps}\n }}>\n\n {typeof children === 'string' ? <Text>{children}</Text> : children}\n {isRemovable && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n props = useSlotProps(props, 'tagRemoveButton');\n let {styleProps} = useStyleProps(props);\n let clearBtnRef = useRef();\n\n return (\n <span\n {...styleProps}\n ref={clearBtnRef}>\n <ClearButton\n preventFocus\n {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAhBA,4CAAuC;AACvC,4CAA+B;AAC/B,4CAAkC;AAClC,4CAAgC;AAChC,4CAAwC;AACxC,4CAAsC;AACtC,4CAAyC;AACzC,4CAAmC;AACnC,4CAA+B;AAC/B,4CAAgC;AAChC,4CAA+B;AAC/B,4CAA2C;AAC3C,4CAA4C;AAC5C,4CAAkD;AAClD,4CAAoC;AACpC,4CAAkD;AAClD,4CAA+B;;;AChB/B;;;;;;;;;;CAUC,GAED;;;;;;;;;AAWO,SAAS,0CAAO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ACvB,GAAG,KAAK;QACR,YAAY;QACZ,WAAW;IACb;IACA,IAAI,mBAAmB,IAAI,CAAA,GAAA,0BAAkB,EAAE;QAC7C,YAAY,MAAM,UAAU;QAC5B,cAAc,IAAI;QAClB,KAAK;mBACL;QACA,WAAW;IACb;IACA,IAAI,aAAC,UAAS,EAAC,GAAG,CAAA,GAAA,cAAO,AAAD,EAAE;QACxB,GAAG,KAAK;0BACR;IACF,GAAG,OAAO;IACV,MAAM,iBAAC,cAAa,EAAC,GAAG,CAAA,GAAA,kBAAW,AAAD,EAAE;IAEpC,iEAAiE;IACjE,6DAA6D;IAC7D,IAAI,YAAC,SAAQ,QAAE,KAAI,EAAE,GAAG,gBAAe,GAAG;IAC1C,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,YAAY,eAAe,eAAe;QACzD,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,yDAAM,OAAD,GACL,iBACA,WAAW,SAAS;QAGxB,MAAM,MAAM,UAAU,CAAC,IAAI,GAAG,SAAS,IAAI;QAC3C,KAAK;OACJ;WAAI;KAAe,CAAC,GAAG,CAAC,CAAA,qBACvB,gCAAC,CAAA,GAAA,yCAAE;YACA,GAAG,KAAK,UAAU,CAAC,EAAE,CAAC,KAAK;YAC5B,KAAK,KAAK,GAAG;YACb,MAAM;YACN,OAAO;YACP,gBAAgB;YAChB,UAAU;WACT,KAAK,UAAU,CAAC,EAAE,CAAC,QAAQ;AAKtC;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC;;CD7FlC,GAED","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","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 '@react-types/tag';\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, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {GridCollection, useGridState} from '@react-stately/grid';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactElement, useMemo} from 'react';\nimport {SpectrumTagGroupProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {TagKeyboardDelegate, useTagGroup} from '@react-aria/tag';\nimport {useGrid} from '@react-aria/grid';\nimport {useListState} from '@react-stately/list';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n allowsRemoving,\n onRemove,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n let {direction} = useLocale();\n let listState = useListState(props);\n let gridCollection = useMemo(() => new GridCollection({\n columnCount: 1, // unused, but required for grid collections\n items: [...listState.collection].map(item => {\n let childNodes = [{\n ...item,\n index: 0,\n type: 'cell'\n }];\n\n return {\n type: 'item',\n childNodes\n };\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }), [listState.collection, allowsRemoving]);\n let state = useGridState({\n ...props,\n collection: gridCollection,\n focusMode: 'cell'\n });\n let keyboardDelegate = new TagKeyboardDelegate({\n collection: state.collection,\n disabledKeys: new Set(),\n ref: domRef,\n direction,\n focusMode: 'cell'\n });\n let {gridProps} = useGrid({\n ...props,\n keyboardDelegate\n }, state, domRef);\n const {tagGroupProps} = useTagGroup(props);\n\n // Don't want the grid to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, role, ...otherGridProps} = gridProps;\n return (\n <div\n {...mergeProps(styleProps, tagGroupProps, otherGridProps)}\n className={\n classNames(\n styles,\n 'spectrum-Tags',\n styleProps.className\n )\n }\n role={state.collection.size ? 'grid' : null}\n ref={domRef}>\n {[...gridCollection].map(item => (\n <Tag\n {...item.childNodes[0].props}\n key={item.key}\n item={item}\n state={state}\n allowsRemoving={allowsRemoving}\n onRemove={onRemove}>\n {item.childNodes[0].rendered}\n </Tag>\n ))}\n </div>\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","/*\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, SlotProvider, useSlotProps, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport {SpectrumTagProps} from '@react-types/tag';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useTag} from '@react-aria/tag';\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n children,\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 tagRef = useRef();\n let tagRowRef = useRef();\n let {clearButtonProps, labelProps, tagProps, tagRowProps} = useTag({\n ...props,\n isFocused,\n allowsRemoving,\n item,\n onRemove,\n tagRef,\n tagRowRef\n }, state);\n\n return (\n <div\n {...tagRowProps}\n ref={tagRowRef}>\n <div\n {...mergeProps(tagProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tags-item',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered\n },\n styleProps.className\n )}\n ref={tagRef}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': allowsRemoving}), ...labelProps}\n }}>\n\n {typeof children === 'string' ? <Text>{children}</Text> : children}\n {allowsRemoving && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n props = useSlotProps(props, 'tagRemoveButton');\n let {styleProps} = useStyleProps(props);\n let clearBtnRef = useRef();\n\n return (\n <span\n {...styleProps}\n ref={clearBtnRef}>\n <ClearButton\n preventFocus\n {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { DOMRef } from "@react-types/shared";
2
2
  import { ReactElement } from "react";
3
3
  import { SpectrumTagGroupProps } from "@react-types/tag";
4
+ /** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */
4
5
  export const TagGroup: <T>(props: SpectrumTagGroupProps<T> & {
5
6
  ref?: DOMRef<HTMLDivElement>;
6
7
  }) => ReactElement;
@@ -1 +1 @@
1
- {"mappings":";;;AC0GA,OAAA,MAAM;UAAuF,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;AC7FtI,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAChD,YAAY,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,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 '@react-types/tag';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;ACsGA,8IAA8I;AAC9I,OAAA,MAAM;UAAuF,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;AC1FtI,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAChD,YAAY,EAAC,qBAAqB,EAAC,MAAM,kBAAkB,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 '@react-types/tag';\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-alpha.9",
3
+ "version": "3.0.0-beta.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -31,22 +31,22 @@
31
31
  "url": "https://github.com/adobe/react-spectrum"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.6.2",
35
- "@react-aria/focus": "^3.8.0",
36
- "@react-aria/grid": "^3.4.1",
37
- "@react-aria/i18n": "^3.6.0",
38
- "@react-aria/interactions": "^3.11.0",
39
- "@react-aria/tag": "3.0.0-alpha.9",
40
- "@react-aria/utils": "^3.13.3",
41
- "@react-spectrum/button": "^3.9.1",
42
- "@react-spectrum/text": "^3.3.1",
43
- "@react-spectrum/utils": "^3.7.3",
44
- "@react-stately/collections": "^3.4.3",
45
- "@react-stately/grid": "^3.3.1",
46
- "@react-stately/list": "^3.5.3",
47
- "@react-types/shared": "^3.14.1",
48
- "@react-types/tag": "3.0.0-alpha.7",
49
- "@spectrum-icons/workflow": "^4.0.2"
34
+ "@react-aria/focus": "^3.10.1",
35
+ "@react-aria/grid": "^3.5.2",
36
+ "@react-aria/i18n": "^3.6.3",
37
+ "@react-aria/interactions": "^3.13.1",
38
+ "@react-aria/tag": "3.0.0-beta.1",
39
+ "@react-aria/utils": "^3.14.2",
40
+ "@react-spectrum/button": "^3.11.1",
41
+ "@react-spectrum/text": "^3.3.4",
42
+ "@react-spectrum/utils": "^3.8.1",
43
+ "@react-stately/collections": "^3.5.1",
44
+ "@react-stately/grid": "^3.4.2",
45
+ "@react-stately/list": "^3.6.1",
46
+ "@react-types/shared": "^3.16.0",
47
+ "@react-types/tag": "3.0.0-beta.1",
48
+ "@spectrum-icons/workflow": "^4.0.5",
49
+ "@swc/helpers": "^0.4.14"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "b03ef51e6317547dd0a840f151e59d039b1e1fd3"
61
+ "gitHead": "5480d76bd815e239366f92852c76b6831ad2a4fd"
62
62
  }
package/src/Tag.tsx CHANGED
@@ -24,8 +24,7 @@ import {useTag} from '@react-aria/tag';
24
24
  export function Tag<T>(props: SpectrumTagProps<T>) {
25
25
  const {
26
26
  children,
27
- isDisabled,
28
- isRemovable,
27
+ allowsRemoving,
29
28
  item,
30
29
  state,
31
30
  onRemove,
@@ -34,15 +33,14 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
34
33
 
35
34
  // @ts-ignore
36
35
  let {styleProps} = useStyleProps(otherProps);
37
- let {hoverProps, isHovered} = useHover({isDisabled});
36
+ let {hoverProps, isHovered} = useHover({});
38
37
  let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});
39
38
  let tagRef = useRef();
40
39
  let tagRowRef = useRef();
41
40
  let {clearButtonProps, labelProps, tagProps, tagRowProps} = useTag({
42
41
  ...props,
43
- isDisabled,
44
42
  isFocused,
45
- isRemovable,
43
+ allowsRemoving,
46
44
  item,
47
45
  onRemove,
48
46
  tagRef,
@@ -59,10 +57,8 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
59
57
  styles,
60
58
  'spectrum-Tags-item',
61
59
  {
62
- 'is-disabled': isDisabled,
63
60
  'focus-ring': isFocusVisible,
64
61
  'is-focused': isFocused,
65
- 'not-removable': !isRemovable,
66
62
  'is-hovered': isHovered
67
63
  },
68
64
  styleProps.className
@@ -71,11 +67,11 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
71
67
  <SlotProvider
72
68
  slots={{
73
69
  icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},
74
- text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': isRemovable}), ...labelProps}
70
+ text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content', {'tags-removable': allowsRemoving}), ...labelProps}
75
71
  }}>
76
72
 
77
73
  {typeof children === 'string' ? <Text>{children}</Text> : children}
78
- {isRemovable && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}
74
+ {allowsRemoving && <TagRemoveButton item={item} {...clearButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-action')} />}
79
75
  </SlotProvider>
80
76
  </div>
81
77
  </div>
package/src/TagGroup.tsx CHANGED
@@ -28,8 +28,7 @@ import {useProviderProps} from '@react-spectrum/provider';
28
28
  function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {
29
29
  props = useProviderProps(props);
30
30
  let {
31
- isDisabled,
32
- isRemovable,
31
+ allowsRemoving,
33
32
  onRemove,
34
33
  ...otherProps
35
34
  } = props;
@@ -51,7 +50,8 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
51
50
  childNodes
52
51
  };
53
52
  })
54
- }), [listState.collection, isRemovable]);
53
+ // eslint-disable-next-line react-hooks/exhaustive-deps
54
+ }), [listState.collection, allowsRemoving]);
55
55
  let state = useGridState({
56
56
  ...props,
57
57
  collection: gridCollection,
@@ -59,7 +59,7 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
59
59
  });
60
60
  let keyboardDelegate = new TagKeyboardDelegate({
61
61
  collection: state.collection,
62
- disabledKeys: state.disabledKeys,
62
+ disabledKeys: new Set(),
63
63
  ref: domRef,
64
64
  direction,
65
65
  focusMode: 'cell'
@@ -68,7 +68,7 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
68
68
  ...props,
69
69
  keyboardDelegate
70
70
  }, state, domRef);
71
- const {tagGroupProps} = useTagGroup(props, listState);
71
+ const {tagGroupProps} = useTagGroup(props);
72
72
 
73
73
  // Don't want the grid to be focusable or accessible via keyboard
74
74
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -80,9 +80,6 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
80
80
  classNames(
81
81
  styles,
82
82
  'spectrum-Tags',
83
- {
84
- 'is-disabled': isDisabled
85
- },
86
83
  styleProps.className
87
84
  )
88
85
  }
@@ -94,8 +91,7 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
94
91
  key={item.key}
95
92
  item={item}
96
93
  state={state}
97
- isDisabled={isDisabled || state.disabledKeys.has(item?.childNodes[0]?.key)}
98
- isRemovable={isRemovable}
94
+ allowsRemoving={allowsRemoving}
99
95
  onRemove={onRemove}>
100
96
  {item.childNodes[0].rendered}
101
97
  </Tag>
@@ -104,5 +100,6 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
104
100
  );
105
101
  }
106
102
 
103
+ /** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */
107
104
  const _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
108
105
  export {_TagGroup as TagGroup};