Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Replace bootstrap tooltips with floating-ui (#13147)

Damian Legawiec67be5aa1ac6b
diff --git a/admin/.claude/settings.local.json b/admin/.claude/settings.local.json
new file mode 100644
index 0000000000..61ba67fcf7
--- /dev/null
+++ b/admin/.claude/settings.local.json
@@ -0,0 +1,10 @@
+{
+ "permissions": {
+ "allow": [
+ "Bash(find:*)",
+ "Bash(bundle exec rake:*)"
+ ],
+ "deny": [],
+ "ask": []
+ }
+}
\ No newline at end of file
diff --git a/admin/app/assets/stylesheets/spree/admin/application.scss b/admin/app/assets/stylesheets/spree/admin/application.scss
index b53d9dbba8..63d953d707 100644
--- a/admin/app/assets/stylesheets/spree/admin/application.scss
+++ b/admin/app/assets/stylesheets/spree/admin/application.scss
@@ -10,6 +10,7 @@
@import 'components/dropdowns';
@import 'components/main';
@import 'components/buttons';
+@import 'components/tooltips';
@import 'components/filters';
@import 'components/navigation';
@import 'components/modals'; // old bootstrap modals
diff --git a/admin/app/assets/stylesheets/spree/admin/components/_tooltips.scss b/admin/app/assets/stylesheets/spree/admin/components/_tooltips.scss
new file mode 100644
index 0000000000..84639f683f
--- /dev/null
+++ b/admin/app/assets/stylesheets/spree/admin/components/_tooltips.scss
@@ -0,0 +1,19 @@
+.tooltip-container {
+ position: absolute;
+ display: none;
+ opacity: 1 !important; // Ensure fully opaque
+ pointer-events: none;
+ z-index: $zindex-tooltip;
+ background-color: $tooltip-bg;
+ color: $tooltip-color;
+ border: 1px solid $border-color;
+ box-shadow: $box-shadow-xs;
+ border-radius: $tooltip-border-radius;
+ padding: $tooltip-padding-y $tooltip-padding-x;
+ font-size: $tooltip-font-size;
+ max-width: $tooltip-max-width;
+ white-space: normal;
+ overflow-wrap: anywhere;
+ word-break: break-word;
+ text-wrap: wrap;
+}
\ No newline at end of file
diff --git a/admin/app/helpers/spree/admin/base_helper.rb b/admin/app/helpers/spree/admin/base_helper.rb
index 4d4fec33aa..59537f352c 100644
--- a/admin/app/helpers/spree/admin/base_helper.rb
+++ b/admin/app/helpers/spree/admin/base_helper.rb
@@ -259,16 +259,16 @@ module Spree
# @option options [String] :title the title of the button
# @return [String] the button
def clipboard_button(options = {})
- options[:class] ||= 'btn btn-clipboard with-tip'
+ options[:class] ||= 'btn btn-clipboard'
options[:type] ||= 'button'
options[:data] ||= {}
options[:data][:action] = 'clipboard#copy'
options[:data][:clipboard_target] = 'button'
- options[:data][:title] = Spree.t('admin.copy_to_clipboard')
+ options[:data][:controller] = 'tooltip'
options[:aria_label] ||= Spree.t('admin.copy_to_clipboard') # screen-reader label
content_tag(:button, options) do
- icon('copy', class: 'mr-0 font-size-sm')
+ icon('copy', class: 'mr-0 font-size-sm') + tooltip(Spree.t('admin.copy_to_clipboard'))
end
end
@@ -331,7 +331,20 @@ module Spree
# @param time [Time] the time to format
# @return [String] the local time ago
def spree_time_ago(time, options = {})
- local_time_ago(time, options)
+ options[:data] ||= {}
+ options[:data][:controller] = 'tooltip'
+
+ # Generate the time ago element with tooltip
+ content_tag(:span, options) do
+ tooltip_text = strip_tags(spree_time(time))
+ local_time_ago(time, class: '', title: nil) + tooltip(tooltip_text)
+ end
+ end
+
+ def tooltip(text)
+ content_tag(:span, role: 'tooltip', data: { tooltip_target: 'tooltip' }, class: 'tooltip-container') do
+ text
+ end
end
end
end
diff --git a/admin/app/helpers/spree/admin/bulk_operations_helper.rb b/admin/app/helpers/spree/admin/bulk_operations_helper.rb
index 92ccadda64..253796f16a 100644
--- a/admin/app/helpers/spree/admin/bulk_operations_helper.rb
+++ b/admin/app/helpers/spree/admin/bulk_operations_helper.rb
@@ -50,18 +50,23 @@ module Spree
options[:data][:url] ||= options[:url]
options[:class] ||= 'btn btn-light'
+ tooltip_text = nil
if options[:icon]
if options[:only_icon]
- options[:title] = text
+ tooltip_text = options[:title] || text
text = icon(options[:icon], class: 'mr-0')
- options[:class] += ' with-tip'
+ options[:data][:controller] = 'tooltip'
+ options.delete(:title)
else
text = icon(options[:icon]) + ' ' + text
end
end
+ link_content = text
+ link_content += tooltip(tooltip_text) if tooltip_text
+
content_tag :span, data: { toggle: 'modal', target: '#bulk-modal' } do
- link_to text, path, options
+ link_to link_content, path, options
end
end
diff --git a/admin/app/helpers/spree/admin/navigation_helper.rb b/admin/app/helpers/spree/admin/navigation_helper.rb
index 5848679be4..a349117122 100644
--- a/admin/app/helpers/spree/admin/navigation_helper.rb
+++ b/admin/app/helpers/spree/admin/navigation_helper.rb
@@ -107,17 +107,27 @@ module Spree
# @param options [Hash] the options for the link
# @return [String] the link with the icon
def link_to_with_icon(icon_name, text, url, options = {})
- options[:class] ||= (options[:class].to_s + " with-tip").strip
- options[:title] ||= text if options[:no_text]
no_text = options[:no_text]
- label = options[:no_text] ? '' : content_tag(:span, text)
+ tooltip_text = options[:title] || (no_text ? text : nil)
options.delete(:no_text)
+ options.delete(:title) if tooltip_text
+
+ if tooltip_text
+ options[:data] ||= {}
+ options[:data][:controller] = 'tooltip'
+ end
+
+ label = no_text ? '' : content_tag(:span, text)
if icon_name
icon = icon(icon_name, class: "icon icon-#{icon_name} #{text.blank? || no_text ? 'mr-0' : ''}")
text = "#{icon} #{label}"
end
- link_to(text.html_safe, url, options)
+
+ link_content = text.html_safe
+ link_content += tooltip(tooltip_text) if tooltip_text
+
+ link_to(link_content, url, options)
end
def link_to_export_modal
@@ -134,17 +144,27 @@ module Spree
# @param options [Hash] the options for the link
# @return [String] the active link with the icon
def active_link_to_with_icon(icon_name, text, url, options = {})
- options[:class] = (options[:class].to_s + " with-tip").strip
- options[:title] = text if options[:no_text]
no_text = options[:no_text]
- label = options[:no_text] ? '' : content_tag(:span, text)
+ tooltip_text = options[:title] || (no_text ? text : nil)
options.delete(:no_text)
+ options.delete(:title) if tooltip_text
+
+ if tooltip_text
+ options[:data] ||= {}
+ options[:data][:controller] = 'tooltip'
+ end
+
+ label = no_text ? '' : content_tag(:span, text)
if icon_name
icon = icon(icon_name, class: "icon icon-#{icon_name}")
text = "#{icon} #{label}"
end
- active_link_to(text.html_safe, url, options)
+
+ link_content = text.html_safe
+ link_content += tooltip(tooltip_text) if tooltip_text
+
+ active_link_to(link_content, url, options)
end
# renders a button with an icon (optional)
@@ -275,9 +295,11 @@ module Spree
# @param placement [String] the placement of the help bubble
# @param css [String] the css class of the help bubble
# @return [String] the help bubble with the icon
- def help_bubble(text = '', placement = 'bottom', css: nil)
- css ||= 'text-muted opacity-75 cursor-default'
- content_tag :small, icon('info-square-rounded', class: css), data: { placement: placement }, class: "with-tip #{css}", title: text
+ def help_bubble(text = '', placement = 'top', css: nil)
+ css ||= 'text-xs text-muted cursor-default opacity-75'
+ content_tag :span, data: { controller: 'tooltip', tooltip_placement_value: placement } do
+ icon('info-square-rounded', class: css) + tooltip(text)
+ end
end
def render_breadcrumb_icon
diff --git a/admin/app/javascript/spree/admin/application.js b/admin/app/javascript/spree/admin/application.js
index 306621513a..7b967b3a0e 100644
--- a/admin/app/javascript/spree/admin/application.js
+++ b/admin/app/javascript/spree/admin/application.js
@@ -80,6 +80,7 @@ import StickyController from 'spree/admin/controllers/sticky_controller'
import SortableTree from 'spree/admin/controllers/sortable_tree_controller'
import StockTransferController from 'spree/admin/controllers/stock_transfer_controller'
import StoreFormController from 'spree/admin/controllers/store_form_controller'
+import TooltipController from 'spree/admin/controllers/tooltip_controller'
import UnitSystemController from 'spree/admin/controllers/unit_system_controller'
import VariantsFormController from 'spree/admin/controllers/variants_form_controller'
import AddressAutocompleteController from 'spree/core/controllers/address_autocomplete_controller'
@@ -138,6 +139,7 @@ application.register('sortable-tree', SortableTree)
application.register('stock-transfer', StockTransferController)
application.register('store-form', StoreFormController)
application.register('tabs', Tabs)
+application.register('tooltip', TooltipController)
application.register('textarea-autogrow', TextareaAutogrow)
application.register('unit-system', UnitSystemController)
application.register('variants-form', VariantsFormController)
diff --git a/admin/app/javascript/spree/admin/controllers/stock_transfer_controller.js b/admin/app/javascript/spree/admin/controllers/stock_transfer_controller.js
index 5204115e79..05aafb4d83 100644
--- a/admin/app/javascript/spree/admin/controllers/stock_transfer_controller.js
+++ b/admin/app/javascript/spree/admin/controllers/stock_transfer_controller.js
@@ -21,18 +21,19 @@ export default class extends NestedForm {
}
updateDestinationLocation({ target: { value } }) {
- const variantAddButtonTooltip = this.newVariantAddButtonTarget.querySelector('.with-tip')
+ const tooltipController = this.newVariantAddButtonTarget.querySelector('[data-controller*="tooltip"]')
if (value != '') {
this.newVariantAddButtonTarget.removeAttribute('disabled')
- this.variantAddButtonTooltipTitle = variantAddButtonTooltip.getAttribute('data-original-title')
- variantAddButtonTooltip.setAttribute('data-original-title', '')
+ // Enable tooltip by showing it when appropriate
+ if (tooltipController) {
+ // The Stimulus tooltip controller will handle visibility automatically
+ }
} else {
this.newVariantAddButtonTarget.setAttribute('disabled', '')
- if (this.variantAddButtonTooltipTitle)
- variantAddButtonTooltip.setAttribute('data-original-title', this.variantAddButtonTooltipTitle)
+ // The Stimulus tooltip controller will handle disabled state automatically
}
this.destinationInputTargets.forEach((input) => {
diff --git a/admin/app/javascript/spree/admin/controllers/tooltip_controller.js b/admin/app/javascript/spree/admin/controllers/tooltip_controller.js
new file mode 100644
index 0000000000..977cee37ee
--- /dev/null
+++ b/admin/app/javascript/spree/admin/controllers/tooltip_controller.js
@@ -0,0 +1,136 @@
+import {
+ autoUpdate,
+ computePosition,
+ flip,
+ offset,
+ shift,
+} from "@floating-ui/dom"
+import { Controller } from "@hotwired/stimulus"
+
+export default class extends Controller {
+ static targets = ["tooltip"]
+ static values = {
+ placement: { type: String, default: "top" },
+ offset: { type: Number, default: 10 },
+ crossAxis: { type: Number, default: 0 },
+ alignmentAxis: { type: Number, default: null },
+ }
+
+ connect() {
+ this._cleanup = null
+ this.boundUpdate = this.update.bind(this)
+ this._originalWidth = null
+ this._isShown = false
+ this.startAutoUpdate()
+ this.addEventListeners()
+ this.prepareTooltip()
+ }
+
+ disconnect() {
+ this.removeEventListeners()
+ this.stopAutoUpdate()
+ this.resetTooltip()
+ }
+
+ addEventListeners() {
+ this.element.addEventListener("mouseenter", this.show)
+ this.element.addEventListener("mouseleave", this.hide)
+ }
+
+ removeEventListeners() {
+ this.element.removeEventListener("mouseenter", this.show)
+ this.element.removeEventListener("mouseleave", this.hide)
+ }
+
+ prepareTooltip() {
+ // Ensure tooltip is rendered offscreen but measurable
+ if (this.tooltipTarget) {
+ // Save original display
+ this._originalDisplay = this.tooltipTarget.style.display
+ // Temporarily show tooltip offscreen to measure size
+ this.tooltipTarget.style.visibility = "hidden"
+ this.tooltipTarget.style.display = "block"
+ this.tooltipTarget.style.left = "-9999px"
+ this.tooltipTarget.style.top = "-9999px"
+ // Force reflow and measure
+ this._originalWidth = this.tooltipTarget.offsetWidth + 10
+ // Height is now dynamic, so we do not set or store it
+ this.tooltipTarget.style.width = `${this._originalWidth}px`
+ this.tooltipTarget.style.height = "" // Remove any fixed height
+ // Hide again
+ this.tooltipTarget.style.display = "none"
+ this.tooltipTarget.style.visibility = ""
+ this.tooltipTarget.style.left = ""
+ this.tooltipTarget.style.top = ""
+ }
+ }
+
+ resetTooltip() {
+ if (this.tooltipTarget) {
+ this.tooltipTarget.style.width = ""
+ this.tooltipTarget.style.height = ""
+ this.tooltipTarget.style.display = this._originalDisplay || ""
+ }
+ }
+
+ show = () => {
+ if (!this._isShown) {
+ this.tooltipTarget.style.display = "block"
+ this.tooltipTarget.style.visibility = "visible"
+ // Set explicit width, but let height be dynamic
+ if (this._originalWidth) {
+ this.tooltipTarget.style.width = `${this._originalWidth}px`
+ this.tooltipTarget.style.height = ""
+ }
+ this.update() // Ensure immediate update when shown
+ this._isShown = true
+ }
+ }
+
+ hide = () => {
+ if (this._isShown) {
+ this.tooltipTarget.style.display = "none"
+ this.tooltipTarget.style.visibility = ""
+ // Keep width set to prevent flicker if quickly re-hovered
+ this._isShown = false
+ }
+ }
+
+ startAutoUpdate() {
+ if (!this._cleanup) {
+ this._cleanup = autoUpdate(
+ this.element,
+ this.tooltipTarget,
+ this.boundUpdate,
+ )
+ }
+ }
+
+ stopAutoUpdate() {
+ if (this._cleanup) {
+ this._cleanup()
+ this._cleanup = null
+ }
+ }
+
+ update() {
+ // Update position even if not visible, to ensure correct positioning when shown
+ computePosition(this.element, this.tooltipTarget, {
+ placement: this.placementValue,
+ middleware: [
+ offset({
+ mainAxis: this.offsetValue,
+ crossAxis: this.crossAxisValue,
+ alignmentAxis: this.alignmentAxisValue,
+ }),
+ flip(),
+ shift({ padding: 5 }),
+ ],
+ }).then(({ x, y }) => {
+ Object.assign(this.tooltipTarget.style, {
+ left: `${x}px`,
+ top: `${y}px`,
+ })
+ })
+ }
+}
\ No newline at end of file
diff --git a/admin/app/javascript/spree/admin/helpers/bootstrap.js b/admin/app/javascript/spree/admin/helpers/bootstrap.js
index 7721e5201b..445cb88ccc 100644
--- a/admin/app/javascript/spree/admin/helpers/bootstrap.js
+++ b/admin/app/javascript/spree/admin/helpers/bootstrap.js
@@ -4,11 +4,11 @@ import { lockScroll, unlockScroll } from 'spree/core/helpers/scroll_lock'
const initTooltips = () => {
- $('.with-tip, .trix-button, .uppy-Dashboard-close, time').each(function() {
+ $('.with-tip, .trix-button, .uppy-Dashboard-close').each(function() {
$(this).tooltip()
})
- $('.with-tip, .trix-button, .uppy-Dashboard-close, time').on('show.bs.tooltip', function(event) {
+ $('.with-tip, .trix-button, .uppy-Dashboard-close').on('show.bs.tooltip', function(event) {
if (('ontouchstart' in window)) {
event.preventDefault()
}
@@ -16,7 +16,7 @@ const initTooltips = () => {
}
const removeTooltips = () => {
- $('.with-tip, .trix-button, .uppy-Dashboard-close, time').each(function() {
+ $('.with-tip, .trix-button, .uppy-Dashboard-close').each(function() {
$(this).tooltip('dispose')
})
}
diff --git a/admin/app/views/spree/admin/classifications/_classification.html.erb b/admin/app/views/spree/admin/classifications/_classification.html.erb
index 14bebd1790..bf59eb43a6 100644
--- a/admin/app/views/spree/admin/classifications/_classification.html.erb
+++ b/admin/app/views/spree/admin/classifications/_classification.html.erb
@@ -1,13 +1,13 @@
<div class="row mx-0 hover-light rounded" id="<%= spree_dom_id(classification) %>" data-sortable-update-url="<%= spree.admin_taxon_classification_path(classification.taxon_id, classification, format: :turbo_stream) %>">
<% if classification.taxon.manual_sort_order? %>
<div class="col-1 text-center align-self-center">
- <span class="rounded p-2 hover-gray with-tip move-handle cursor-grab">
+ <span class="rounded p-2 hover-gray move-handle cursor-grab">
<%= icon('grip-vertical', class: 'mr-0') %>
</span>
</div>
<% end %>
- <div class="<%= classification.taxon.manual_sort_order? ? 'col-6' : 'col-7' %>">
+ <div class="<%= classification.taxon.manual_sort_order? ? 'col-5' : 'col-6' %>">
<%= link_to spree.edit_admin_product_path(classification.product), data: { 'turbo-frame': '_top' }, class: "d-flex align-items-center text-dark hover-none #{classification.taxon.manual_sort_order? ? 'py-3' : 'p-3'}" do %>
<%= render 'spree/admin/shared/product_image', object: classification.product %>
<span class="ml-3">
@@ -30,9 +30,10 @@
<% end %>
</div>
- <div class="col-1 text-center align-self-center">
- <%= button_to spree.admin_taxon_classification_path(classification.taxon_id, classification), class: 'btn btn-danger btn-sm with-tip', method: :delete, data: { turbo_confirm: Spree.t(:are_you_sure) } do %>
+ <div class="col-2 text-center align-self-center">
+ <%= button_to spree.admin_taxon_classification_path(classification.taxon_id, classification), class: 'btn btn-danger btn-sm', method: :delete, data: { controller: 'tooltip', turbo_confirm: Spree.t(:are_you_sure) } do %>
<%= icon 'trash', class: 'mr-0', style: 'pointer-events: none' %>
+ <%= tooltip(Spree.t('actions.destroy')) %>
<% end if classification.taxon.manual? && can?(:delete, classification) %>
</div>
</div>
\ No newline at end of file
diff --git a/admin/app/views/spree/admin/coupon_codes/_filters.html.erb b/admin/app/views/spree/admin/coupon_codes/_filters.html.erb
index 18247fc64f..26a340cf2e 100644
--- a/admin/app/views/spree/admin/coupon_codes/_filters.html.erb
+++ b/admin/app/views/spree/admin/coupon_codes/_filters.html.erb
@@ -27,10 +27,13 @@
</div>
</div>
- <%= link_to spree.admin_promotion_coupon_codes_path(@promotion, format: :csv), class: 'btn btn-light bg-transparent with-tip', title: 'Download coupons as a CSV file' do %>
- <%= icon 'download' %>
- <%= Spree.t(:download) %>
- <% end %>
+ <div data-controller="tooltip">
+ <%= link_to spree.admin_promotion_coupon_codes_path(@promotion, format: :csv), class: 'btn btn-light bg-transparent' do %>
+ <%= icon 'download' %>
+ <%= Spree.t(:download) %>
+ <% end %>
+ <%= tooltip(Spree.t('admin.export_coupons')) %>
+ </div>
</div>
<%= render "spree/admin/shared/filter_badge_template" %>
diff --git a/admin/app/views/spree/admin/dashboard/getting_started.html.erb b/admin/app/views/spree/admin/dashboard/getting_started.html.erb
index 9afb2094a7..442076e5fb 100644
--- a/admin/app/views/spree/admin/dashboard/getting_started.html.erb
+++ b/admin/app/views/spree/admin/dashboard/getting_started.html.erb
@@ -1,4 +1,4 @@
-<div class="row pt-3">
+<div class="row pt-4">
<div class="col-lg-8 offset-lg-2 mb-4">
<h2 class="page-header-title">
<%= Spree.t('admin.getting_started') %>
diff --git a/admin/app/views/spree/admin/exports/_export.html.erb b/admin/app/views/spree/admin/exports/_export.html.erb
index 19592b0e99..2494ed1f41 100644
--- a/admin/app/views/spree/admin/exports/_export.html.erb
+++ b/admin/app/views/spree/admin/exports/_export.html.erb
@@ -29,7 +29,7 @@
<td>
<%= export.attachment.filename if export.done? %>
</td>
- <td class="w-15"><%= spree_time_ago(export.created_at, class: 'with-tip') %></td>
+ <td class="w-15"><%= spree_time_ago(export.created_at) %></td>
<td>
<%= number_to_human_size(export.attachment.byte_size) if export.done? %>
</td>
diff --git a/admin/app/views/spree/admin/metafields/edit.html.erb b/admin/app/views/spree/admin/metafields/edit.html.erb
index 26f42f147f..b84ab4ffef 100644
--- a/admin/app/views/spree/admin/metafields/edit.html.erb
+++ b/admin/app/views/spree/admin/metafields/edit.html.erb
@@ -16,7 +16,10 @@
<% end %>
<% if metafield_definition.display_on == 'back_end' %>
- <%= icon('eye-off', title: Spree.t("admin.display_on_options.#{metafield_definition.display_on}"), class: 'with-tip text-muted') %>
+ <span data-controller="tooltip">
+ <%= icon('eye-off', class: 'text-muted') %>
+ <%= tooltip(Spree.t("admin.display_on_options.#{metafield_definition.display_on}")) %>
+ </span>
<% end %>
</div>
<%= render "spree/admin/metafields/types/#{metafield_form.object.type.demodulize.underscore}", f: metafield_form %>
diff --git a/admin/app/views/spree/admin/orders/_header.html.erb b/admin/app/views/spree/admin/orders/_header.html.erb
index ca4a348bbb..56a374ead7 100644
--- a/admin/app/views/spree/admin/orders/_header.html.erb
+++ b/admin/app/views/spree/admin/orders/_header.html.erb
@@ -9,9 +9,9 @@
<%= order_payment_state(@order) %>
<%= order_shipment_state(@order) %>
<% if @order.completed? %>
- <span class="text-muted font-size-sm font-weight-normal with-tip">
+ <span class="text-muted font-size-sm font-weight-normal">
<%= I18n.t('activerecord.attributes.spree/order.completed_at') %>
- <%= spree_time(@order.completed_at) %>
+ <%= spree_time_ago(@order.completed_at) %>
</span>
<% end %>
<% end %>
diff --git a/admin/app/views/spree/admin/orders/_order.html.erb b/admin/app/views/spree/admin/orders/_order.html.erb
index 1461461cbb..8632b92cd4 100644
--- a/admin/app/views/spree/admin/orders/_order.html.erb
+++ b/admin/app/views/spree/admin/orders/_order.html.erb
@@ -3,7 +3,7 @@
<%= link_to order.number, spree.edit_admin_order_path(order), class: 'font-weight-bolder d-block p-2 px-3 text-decoration-none', data: { 'turbo-frame': '_top', row_link_target: :link } %>
</td>
<td class="w-15 cursor-pointer" data-action="click->row-link#openLink">
- <%= spree_time_ago(order.completed? ? order.completed_at : order.created_at, format: '%b %e, %Y %l:%M%P', class: 'with-tip') %>
+ <%= spree_time_ago(order.completed? ? order.completed_at : order.created_at, format: '%b %e, %Y %l:%M%P') %>
</td>
<td class="d-customer w-15 cursor-pointer" data-action="click->row-link#openLink">
<%= render 'spree/admin/orders/customer_summary', order: order %>
diff --git a/admin/app/views/spree/admin/orders/_payments.html.erb b/admin/app/views/spree/admin/orders/_payments.html.erb
index ea3110bb79..5b2ad17095 100644
--- a/admin/app/views/spree/admin/orders/_payments.html.erb
+++ b/admin/app/views/spree/admin/orders/_payments.html.erb
@@ -18,7 +18,7 @@
<%= link_to_with_icon 'plus', Spree.t(:new_payment), spree.new_admin_order_payment_path(@order), class: 'btn btn-primary' %>
<% if spree.respond_to?(:checkout_state_url) %>
- <%= link_to_with_icon 'send', Spree.t('admin.send_payment_link'), spree.admin_order_payment_links_path(@order), data: { turbo_method: :post }, class: 'btn btn-light with-tip', title: Spree.t(:send_payment_link_title) %>
+ <%= link_to_with_icon 'send', Spree.t('admin.send_payment_link'), spree.admin_order_payment_links_path(@order), data: { turbo_method: :post }, class: 'btn btn-light', title: Spree.t(:send_payment_link_title) %>
<div data-controller="clipboard" data-clipboard-success-content-value="<%= Spree.t('admin.copied') %>">
<input type="hidden" value="<%= spree.checkout_state_url(@order.token, :payment, host: current_store.url_or_custom_domain) %>" readonly data-clipboard-target="source">
diff --git a/admin/app/views/spree/admin/orders/_shipment.html.erb b/admin/app/views/spree/admin/orders/_shipment.html.erb
index 7ece84c1cf..d8cf66b207 100644
--- a/admin/app/views/spree/admin/orders/_shipment.html.erb
+++ b/admin/app/views/spree/admin/orders/_shipment.html.erb
@@ -6,7 +6,7 @@
<strong class="shipment-number"><%= shipment.number %></strong>
<% if shipment.shipped_at.present? %>
<small class="text-muted">
- <%= spree_time_ago(shipment.shipped_at, class: 'with-tip') %>
+ <%= spree_time_ago(shipment.shipped_at) %>
</small>
<% end %>
</div>
@@ -55,7 +55,7 @@
</div>
<% if( (can? :update, shipment) and !shipment.shipped? && !order.canceled? && !shipment.canceled?) %>
- <%= link_to_with_icon 'edit', Spree.t(:edit), spree.edit_admin_order_shipment_path(order, shipment), class: 'with-tip btn btn-sm btn-light', no_text: true %>
+ <%= link_to_with_icon 'edit', Spree.t(:edit), spree.edit_admin_order_shipment_path(order, shipment), class: 'btn btn-sm btn-light', no_text: true %>
<% end %>
<% end %>
@@ -76,9 +76,9 @@
<% if can?(:update, shipment) && (!order.canceled? && !shipment.canceled?) %>
<% if shipment.tracking.present? %>
- <%= link_to_with_icon 'edit', Spree.t(:edit), spree.edit_admin_order_shipment_path(order, shipment), class: 'btn btn-light btn-sm with-tip', no_text: true, title: Spree.t(:edit) %>
+ <%= link_to_with_icon 'edit', Spree.t(:edit), spree.edit_admin_order_shipment_path(order, shipment), class: 'btn btn-light btn-sm', no_text: true, title: Spree.t(:edit) %>
<% else %>
- <%= link_to_with_icon 'plus', Spree.t(:add_one), spree.edit_admin_order_shipment_path(order, shipment), class: 'btn btn-light btn-sm with-tip', no_text: true, title: Spree.t(:add_one) %>
+ <%= link_to_with_icon 'plus', Spree.t(:add_one), spree.edit_admin_order_shipment_path(order, shipment), class: 'btn btn-light btn-sm', no_text: true, title: Spree.t(:add_one) %>
<% end %>
<% end %>
<% end %>
@@ -89,9 +89,10 @@
<% if shipment.tracked? %>
<%= link_to_with_icon 'send.svg', Spree.t(:ship), spree.ship_admin_order_shipment_path(order, shipment), class: 'ml-auto btn btn-primary mb-0', data: {turbo_method: :post, turbo_confirm: Spree.t(:are_you_sure)} %>
<% elsif !shipment.digital? %>
- <span class="ship-tooltip with-tip ship ml-auto btn btn-primary disabled mb-0" data-toggle="tooltip" data-placement="left" title="Before marking shipment as shipped please provide tracking details">
+ <span class="ship ml-auto btn btn-primary disabled mb-0" data-controller="tooltip" data-tooltip-placement-value="left">
<%= icon 'send' %>
<%= Spree.t(:ship) %>
+ <%= tooltip(Spree.t('admin.shipment.please_provide_tracking_details')) %>
</span>
<% else %>
<span class="text-muted w-100">
diff --git a/admin/app/views/spree/admin/orders/_shipment_manifest_item.html.erb b/admin/app/views/spree/admin/orders/_shipment_manifest_item.html.erb
index 3f3667ec2b..f0685fc5d6 100644
--- a/admin/app/views/spree/admin/orders/_shipment_manifest_item.html.erb
+++ b/admin/app/views/spree/admin/orders/_shipment_manifest_item.html.erb
@@ -11,7 +11,7 @@
</span>
<% if can?(:split, shipment) %>
<span class="d-flex align-items-center justify-content-end">
- <%= link_to_with_icon 'arrows-split', Spree.t(:split), spree.split_admin_order_shipment_path(@order, shipment, variant_id: item.variant), class: "btn btn-sm btn-light with-tip", no_text: true, data: { test_id: :split_item } %>
+ <%= link_to_with_icon 'arrows-split', Spree.t(:split), spree.split_admin_order_shipment_path(@order, shipment, variant_id: item.variant), class: "btn btn-sm btn-light", no_text: true, data: { test_id: :split_item } %>
</span>
<% end %>
<% end %>
diff --git a/admin/app/views/spree/admin/orders/return_authorizations/show.html.erb b/admin/app/views/spree/admin/orders/return_authorizations/show.html.erb
index 055ba09588..9e30a74915 100644
--- a/admin/app/views/spree/admin/orders/return_authorizations/show.html.erb
+++ b/admin/app/views/spree/admin/orders/return_authorizations/show.html.erb
@@ -8,7 +8,7 @@
</span>
<%= spree_time(
@return_authorization.created_at,
- class: "badge badge-light with-tip",
+ class: "badge badge-light",
) %>
</div>
<% end %>
diff --git a/admin/app/views/spree/admin/page_builder/_header.html.erb b/admin/app/views/spree/admin/page_builder/_header.html.erb
index e45672b374..592cf345f2 100644
--- a/admin/app/views/spree/admin/page_builder/_header.html.erb
+++ b/admin/app/views/spree/admin/page_builder/_header.html.erb
@@ -1,8 +1,11 @@
<header id="page-builder-header" class="fixed-top">
<nav class="navbar navbar-expand-lg">
- <%= link_to spree.admin_themes_path, class: 'btn hover-gray with-tip px-2', title: Spree.t('admin.back_to_dashboard') do %>
- <%= icon('x', class: 'mr-0') %>
- <% end %>
+ <div data-controller="tooltip">
+ <%= link_to spree.admin_themes_path, class: 'btn hover-gray px-2' do %>
+ <%= icon('x', class: 'mr-0') %>
+ <% end %>
+ <%= tooltip(Spree.t('admin.back_to_dashboard')) %>
+ </div>
<% if @page.custom? %>
<div class="px-3">
<span class="text-muted mr-1"><%= I18n.t('activerecord.models.spree/page.one') %>:</span>
@@ -32,8 +35,8 @@
<ul class="nav nav-pills" role="tablist">
<li class="nav-item" role="presentation">
- <button class="nav-link active with-tip"
- title="Page sections"
+ <button class="nav-link active"
+ data-controller="tooltip"
data-toggle="tab"
data-target="#sections"
type="button"
@@ -43,11 +46,12 @@
data-trigger="hover"
id="sidebar-icon-page">
<%= icon 'section', class: 'mr-0' %>
+ <%= tooltip("Page sections") %>
</button>
</li>
<li class="nav-item" role="presentation">
- <button class="nav-link with-tip"
- title="<%= Spree.t(:theme) %>"
+ <button class="nav-link"
+ data-controller="tooltip"
data-toggle="tab"
data-target="#colors"
type="button"
@@ -57,11 +61,12 @@
data-trigger="hover"
id="sidebar-icon-colors">
<%= icon 'palette', class: 'mr-0' %>
+ <%= tooltip(Spree.t(:theme)) %>
</button>
</li>
<li class="nav-item" role="presentation">
- <button class="nav-link with-tip"
- title="Fonts"
+ <button class="nav-link"
+ data-controller="tooltip"
type="button"
data-toggle="tab"
data-target="#fonts"
@@ -72,6 +77,7 @@
data-trigger="hover"
id="sidebar-icon-fonts">
<%= icon 'typography', class: 'mr-0' %>
+ <%= tooltip("Fonts") %>
</button>
</li>
</ul>
@@ -79,23 +85,25 @@
<ul class="nav nav-pills ml-auto" role="tablist">
<li class="nav-item" role="presentation">
- <button class="nav-link with-tip" type="button"
- title="Mobile"
+ <button class="nav-link" type="button"
+ data-controller="tooltip"
data-trigger="hover"
data-action="click->page-builder#setResponsiveBreakpoint"
data-page-builder-target="mobileButton"
data-page-builder-breakpoint-param="mobile">
<%= icon 'device-mobile', class: 'mr-0' %>
+ <%= tooltip("Mobile") %>
</button>
</li>
<li class="nav-item" role="presentation">
- <button class="nav-link active with-tip" type="button"
- title="Desktop"
+ <button class="nav-link active" type="button"
+ data-controller="tooltip"
data-action="click->page-builder#setResponsiveBreakpoint"
data-page-builder-breakpoint-param="desktop"
data-trigger="hover"
data-page-builder-target="desktopButton">
<%= icon 'device-laptop', class: 'mr-0' %>
+ <%= tooltip("Desktop") %>
</button>
</li>
</ul>
diff --git a/admin/app/views/spree/admin/pages/_table_row.html.erb b/admin/app/views/spree/admin/pages/_table_row.html.erb
index 285a0e519a..da275dbd33 100644
--- a/admin/app/views/spree/admin/pages/_table_row.html.erb
+++ b/admin/app/views/spree/admin/pages/_table_row.html.erb
@@ -3,10 +3,10 @@
<%= link_to page.name, spree.edit_admin_theme_path(current_store.default_theme, page_id: page.id), data: { row_link_target: :link, turbo_frame: '_top', turbo_prefetch: false } %>
</td>
<td data-action="click->row-link#openLink" class="w-15">
- <%= spree_time_ago(page.created_at, class: 'with-tip') %>
+ <%= spree_time_ago(page.created_at) %>
</td>
<td data-action="click->row-link#openLink" class="w-15">
- <%= spree_time_ago(page.updated_at, class: 'with-tip') %>
+ <%= spree_time_ago(page.updated_at) %>
</td>
<td class="w-10 text-right">
<div class="dropdown">
diff --git a/admin/app/views/spree/admin/payment_methods/_payment_method.html.erb b/admin/app/views/spree/admin/payment_methods/_payment_method.html.erb
index a214ffc69c..a25d64d7e0 100644
--- a/admin/app/views/spree/admin/payment_methods/_payment_method.html.erb
+++ b/admin/app/views/spree/admin/payment_methods/_payment_method.html.erb
@@ -6,7 +6,10 @@
<div class="d-flex align-items-center">
<div class="bg-light rounded" style="width: 95px; height: 60px;">
<% if payment_method_icon_tag(payment_method.payment_icon_name).present? %>
- <%= payment_method_icon_tag(payment_method.payment_icon_name, height: 60, class: 'with-tip', title: payment_method.name) %>
+ <span data-controller="tooltip">
+ <%= payment_method_icon_tag(payment_method.payment_icon_name, height: 60, title: payment_method.name) %>
+ <%= tooltip(payment_method.name) %>
+ </span>
<% end %>
</div>
diff --git a/admin/app/views/spree/admin/reports/new.html.erb b/admin/app/views/spree/admin/reports/new.html.erb
index c63640c9ad..dbe045f380 100644
--- a/admin/app/views/spree/admin/reports/new.html.erb
+++ b/admin/app/views/spree/admin/reports/new.html.erb
@@ -9,9 +9,10 @@
<%= f.hidden_field :date_from %>
<%= f.hidden_field :date_to %>
<%= f.hidden_field :currency %>
- <button class="btn btn-primary with-tip" title="Export report as CSV file">
+ <button class="btn btn-primary" data-controller="tooltip">
<%= icon('table-export') %>
<%= Spree.t(:export) %>
+ <%= tooltip(Spree.t('admin.export_report')) %>
</button>
<% end %>
<% end if can?(:create, Spree::Export) %>
diff --git a/admin/app/views/spree/admin/return_authorizations/_table_row.html.erb b/admin/app/views/spree/admin/return_authorizations/_table_row.html.erb
index 099eaa72d6..e230d44cc4 100644
--- a/admin/app/views/spree/admin/return_authorizations/_table_row.html.erb
+++ b/admin/app/views/spree/admin/return_authorizations/_table_row.html.erb
@@ -27,7 +27,7 @@
} %>
</td>
<td data-action="click->row-link#openLink">
- <%= link_to spree_time_ago(return_authorization.created_at, class: "with-tip"),
+ <%= link_to spree_time_ago(return_authorization.created_at),
return_url,
class: "text-dark" %>
</td>
diff --git a/admin/app/views/spree/admin/shared/_content_header.html.erb b/admin/app/views/spree/admin/shared/_content_header.html.erb
index 68fb520e29..b7589c3897 100644
--- a/admin/app/views/spree/admin/shared/_content_header.html.erb
+++ b/admin/app/views/spree/admin/shared/_content_header.html.erb
@@ -2,7 +2,10 @@
<% show_record_subtitle = record && record.persisted? && record.has_attribute?(:updated_at) %>
<% content_for(:page_subtitle) do %>
- <%= spree_time record.updated_at, class: 'badge badge-light with-tip', title: 'Last update' %>
+ <span class="badge badge-light" data-controller="tooltip">
+ <%= spree_time record.updated_at %>
+ <%= tooltip(Spree.t(:updated_at)) %>
+ </span>
<% end if show_record_subtitle && !content_for(:page_subtitle) %>
<% if content_for?(:page_title) %>
diff --git a/admin/app/views/spree/admin/shared/_header.html.erb b/admin/app/views/spree/admin/shared/_header.html.erb
index 971e5a8a90..b8b467a512 100644
--- a/admin/app/views/spree/admin/shared/_header.html.erb
+++ b/admin/app/views/spree/admin/shared/_header.html.erb
@@ -11,8 +11,9 @@
</div>
<% if settings_active? %>
- <%= link_to spree.admin_path, class: 'store-dropdown text-decoration-none px-2 justify-content-start with-tip', title: Spree.t('admin.back_to_dashboard'), data: { admin_target: 'close' } do %>
+ <%= link_to spree.admin_path, class: 'store-dropdown text-decoration-none px-2 justify-content-start', data: { admin_target: 'close', controller: 'tooltip', tooltip_placement_value: 'bottom', tooltip_offset_value: -10 } do %>
<%= icon 'x', class: 'mx-2' %>
+ <%= tooltip(Spree.t('admin.back_to_dashboard')) %>
<kbd>ESC</kbd>
<% end %>
<% else %>
diff --git a/admin/app/views/spree/admin/shared/_user.html.erb b/admin/app/views/spree/admin/shared/_user.html.erb
index b9654d2ccc..c629f9cfa3 100644
--- a/admin/app/views/spree/admin/shared/_user.html.erb
+++ b/admin/app/views/spree/admin/shared/_user.html.erb
@@ -10,8 +10,9 @@
<br />
<% end %>
<% unless defined?(current_vendor) && current_vendor %>
- <span class="text-muted with-tip" title="<%= user.email %>">
+ <span class="text-muted" data-controller="tooltip">
<%= user.email %>
+ <%= tooltip(user.email) %>
</span>
<%= clipboard_component(user.email) %>
<% end %>
diff --git a/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erb b/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erb
index 59e4c51fd8..b11efa5d1e 100644
--- a/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erb
+++ b/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erb
@@ -54,7 +54,10 @@
<%= icon 'history' %>
<%= Spree.t('admin.audit_log') %>
- <span class="badge ml-auto with-tip rounded-pill" title="This feature is part of the Enterprise Edition.">Enterprise</span>
+ <span class="badge ml-auto rounded-pill" data-controller="tooltip">
+ Enterprise
+ <%= tooltip("This feature is part of the Enterprise Edition.") %>
+ </span>
<% end %>
</li>
<% end %>
diff --git a/admin/app/views/spree/admin/shared/sidebar/_vendors_nav.html.erb b/admin/app/views/spree/admin/shared/sidebar/_vendors_nav.html.erb
index d6be5551d4..9d95a93cbc 100644
--- a/admin/app/views/spree/admin/shared/sidebar/_vendors_nav.html.erb
+++ b/admin/app/views/spree/admin/shared/sidebar/_vendors_nav.html.erb
@@ -3,11 +3,14 @@
<%= render_admin_partials(:vendors_nav_partials) %>
<% else %>
<li class="nav-item">
- <%= external_link_to nil, 'https://spreecommerce.org/pricing', class: 'nav-link d-flex align-items-center w-100' do %>
+ <%= external_link_to nil, 'https://spreecommerce.org/pricing', class: 'nav-link d-flex align-items-center w-100', data: { controller: 'tooltip' } do %>
<%= icon 'heart-handshake' %>
<%= Spree.t(:vendors) %>
- <span class="badge ml-auto with-tip rounded-pill" title="This feature is part of the Enterprise Edition.">Enterprise</span>
+ <span class="badge ml-auto rounded-pill">
+ Enterprise
+ </span>
+ <%= tooltip('This feature is part of the Enterprise Edition.') %>
<% end %>
</li>
<% end %>
diff --git a/admin/app/views/spree/admin/stock_transfers/new.html.erb b/admin/app/views/spree/admin/stock_transfers/new.html.erb
index 8ac07aca7f..a9cf0bbef4 100644
--- a/admin/app/views/spree/admin/stock_transfers/new.html.erb
+++ b/admin/app/views/spree/admin/stock_transfers/new.html.erb
@@ -53,10 +53,11 @@
</h5>
<span data-toggle="modal" data-target="#stock_transfer_modal">
<%= button_tag type: 'button', class: 'btn btn-light btn-sm', disabled: @stock_transfer.destination_location_id.blank?, data: { stock_transfer_target: :newVariantAddButton } do %>
- <%= content_tag(:span, class: 'with-tip', title: Spree.t('admin.stock_transfers.add_products_tip'), data: { toggle: 'tooltip', placement: 'top' }) do %>
+ <span data-controller="tooltip">
<%= icon('plus', class: 'icon icon-plus') %>
<%= Spree.t(:add_products) %>
- <% end %>
+ <%= tooltip(Spree.t('admin.stock_transfers.add_products_tip')) %>
+ </span>
<% end %>
</span>
</div>
diff --git a/admin/app/views/spree/admin/taxons/_rule_form.html.erb b/admin/app/views/spree/admin/taxons/_rule_form.html.erb
index a74a2f5074..c578d8d11a 100644
--- a/admin/app/views/spree/admin/taxons/_rule_form.html.erb
+++ b/admin/app/views/spree/admin/taxons/_rule_form.html.erb
@@ -15,9 +15,10 @@
<%= render "spree/admin/taxons/rule_forms/#{rf.object.type.demodulize.underscore}", rule_form: rf %>
</div>
<div class="col-lg-1 mb-3 d-flex align-items-center justify-content-center">
- <button type="button" data-action="nested-form#remove" class="btn btn-sm btn-danger px-2 with-tip" title="Remove condition">
+ <button type="button" data-action="nested-form#remove" class="btn btn-sm btn-danger px-2" data-controller="tooltip" aria-label="<%= Spree.t(:remove_condition) %>">
<%= icon('x', class: 'mr-0') %>
<span class="d-lg-none"><%= Spree.t(:remove_condition) %></span>
+ <%= tooltip(Spree.t(:remove_condition)) %>
</button>
<%= rf.hidden_field :_destroy if rf.object.persisted? %>
</div>
diff --git a/admin/app/views/spree/admin/themes/_theme.html.erb b/admin/app/views/spree/admin/themes/_theme.html.erb
index a4ee89f98e..4bd603256d 100644
--- a/admin/app/views/spree/admin/themes/_theme.html.erb
+++ b/admin/app/views/spree/admin/themes/_theme.html.erb
@@ -10,7 +10,7 @@
<p class="mb-0 mt-1">
<span class="text-muted">
<%= Spree.t(:updated_at) %>:
- <%= spree_time_ago(theme.updated_at, class: 'with-tip') %>
+ <%= spree_time_ago(theme.updated_at) %>
</span>
</p>
</div>
diff --git a/admin/app/views/spree/admin/users/_last_order.html.erb b/admin/app/views/spree/admin/users/_last_order.html.erb
index 0edd1a16eb..ebd78d952e 100644
--- a/admin/app/views/spree/admin/users/_last_order.html.erb
+++ b/admin/app/views/spree/admin/users/_last_order.html.erb
@@ -16,8 +16,9 @@
<%= order_payment_state(@last_order, class: 'ml-2') %>
<%= order_shipment_state(@last_order, class: 'ml-2') %>
</p>
- <span class="text-muted">
- <%= spree_time_ago(@last_order.completed_at, class: 'with-tip') %>
+ <span class="text-muted" data-controller="tooltip">
+ <%= spree_time_ago(@last_order.completed_at) %>
+ <%= tooltip(spree_time(@last_order.completed_at)) %>
</span>
</div>
<div class="col-lg-3 text-lg-right font-weight-bold">
diff --git a/admin/config/importmap.rb b/admin/config/importmap.rb
index 01aea1be7c..de05e4f63f 100644
--- a/admin/config/importmap.rb
+++ b/admin/config/importmap.rb
@@ -137,6 +137,12 @@ pin '@simonwep/pickr',
to: '@simonwep--pickr.js',
preload: ['application-spree-admin'] # @1.9.1
+# floating-ui
+pin "@floating-ui/dom", to: "@floating-ui--dom.js", preload: ['application-spree-admin'] # @1.7.4
+pin "@floating-ui/core", to: "@floating-ui--core.js", preload: ['application-spree-admin'] # @1.7.3
+pin "@floating-ui/utils", to: "@floating-ui--utils.js", preload: ['application-spree-admin'] # @0.2.10
+pin "@floating-ui/utils/dom", to: "@floating-ui--utils--dom.js", preload: ['application-spree-admin'] # @0.2.10
+
pin_all_from Spree::Admin::Engine.root.join('app/javascript/spree/admin/controllers'),
under: 'spree/admin/controllers',
to: 'spree/admin/controllers',
diff --git a/admin/config/locales/en.yml b/admin/config/locales/en.yml
index facca60d33..71c07633cc 100644
--- a/admin/config/locales/en.yml
+++ b/admin/config/locales/en.yml
@@ -75,8 +75,10 @@ en:
errors: Errors
execution_time: Execution Time
export_all: Export all records (can be slow for large datasets)
+ export_coupons: Export coupons as CSV file
export_created: Your export was started. You will receive an email with a download link when it is ready!
export_only_filtered_records: Export only filtered records, matching the search criteria
+ export_report: Export report as CSV file
filters: Filters
getting_started: Getting started
gift_card_batches:
@@ -208,6 +210,8 @@ en:
response_code: Response Code
selected: selected
send_payment_link: Send Payment Link
+ shipment:
+ please_provide_tracking_details: Before marking shipment as shipped please provide tracking details
shipment_transfer:
wrong_destination: Wrong destination
stock_transfers:
diff --git a/admin/spec/features/spree/admin/getting_started_spec.rb b/admin/spec/features/spree/admin/getting_started_spec.rb
index 9779d8a0dd..b41724cfca 100644
--- a/admin/spec/features/spree/admin/getting_started_spec.rb
+++ b/admin/spec/features/spree/admin/getting_started_spec.rb
@@ -36,10 +36,12 @@ RSpec.feature 'Getting Started' do
scenario 'Retailer adds and updates the customer support email' do
click_on 'Set customer support email'
- click_on 'Edit'
+ within '#set_customer_support_email' do
+ click_on 'Edit'
- fill_in 'Customer Support Email', with: '[email protected]'
- click_on 'Save'
+ fill_in 'Customer Support Email', with: '[email protected]'
+ click_on 'Save'
+ end
expect(page).to have_content("Store \"#{store.name}\" has been successfully updated!")
end
diff --git a/admin/vendor/javascript/@floating-ui--core.js b/admin/vendor/javascript/@floating-ui--core.js
new file mode 100644
index 0000000000..3181315c4c
--- /dev/null
+++ b/admin/vendor/javascript/@floating-ui--core.js
@@ -0,0 +1,4 @@
+// @floating-ui/[email protected] downloaded from https://ga.jspm.io/npm:@floating-ui/[email protected]/dist/floating-ui.core.mjs
+
+import{getSideAxis as t,getAlignmentAxis as e,getAxisLength as n,getSide as o,getAlignment as s,evaluate as i,getPaddingObject as c,rectToClientRect as r,min as a,clamp as l,getOppositeAlignmentPlacement as f,placements as m,getAlignmentSides as u,getOppositePlacement as d,getExpandedPlacements as g,getOppositeAxisPlacements as p,sides as h,max as y,getOppositeAxis as w}from"@floating-ui/utils";export{rectToClientRect}from"@floating-ui/utils";function x(i,c,r){let{reference:a,floating:l}=i;const f=t(c);const m=e(c);const u=n(m);const d=o(c);const g=f==="y";const p=a.x+a.width/2-l.width/2;const h=a.y+a.height/2-l.height/2;const y=a[u]/2-l[u]/2;let w;switch(d){case"top":w={x:p,y:a.y-l.height};break;case"bottom":w={x:p,y:a.y+a.height};break;case"right":w={x:a.x+a.width,y:h};break;case"left":w={x:a.x-l.width,y:h};break;default:w={x:a.x,y:a.y}}switch(s(c)){case"start":w[m]-=y*(r&&g?-1:1);break;case"end":w[m]+=y*(r&&g?-1:1);break}return w}const v=async(t,e,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:c}=n;const r=i.filter(Boolean);const a=await(c.isRTL==null?void 0:c.isRTL(e));let l=await c.getElementRects({reference:t,floating:e,strategy:s});let{x:f,y:m}=x(l,o,a);let u=o;let d={};let g=0;for(let n=0;n<r.length;n++){const{name:i,fn:p}=r[n];const{x:h,y:y,data:w,reset:v}=await p({x:f,y:m,initialPlacement:o,placement:u,strategy:s,middlewareData:d,rects:l,platform:c,elements:{reference:t,floating:e}});f=h!=null?h:f;m=y!=null?y:m;d={...d,[i]:{...d[i],...w}};if(v&&g<=50){g++;if(typeof v==="object"){v.placement&&(u=v.placement);v.rects&&(l=v.rects===true?await c.getElementRects({reference:t,floating:e,strategy:s}):v.rects);({x:f,y:m}=x(l,u,a))}n=-1}}return{x:f,y:m,placement:u,strategy:s,middlewareData:d}};async function b(t,e){var n;e===void 0&&(e={});const{x:o,y:s,platform:a,rects:l,elements:f,strategy:m}=t;const{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:p=false,padding:h=0}=i(e,t);const y=c(h);const w=g==="floating"?"reference":"floating";const x=f[p?w:g];const v=r(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(f.floating)),boundary:u,rootBoundary:d,strategy:m}));const b=g==="floating"?{x:o,y:s,width:l.floating.width,height:l.floating.height}:l.reference;const A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f.floating));const R=await(a.isElement==null?void 0:a.isElement(A))&&await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1};const D=r(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:b,offsetParent:A,strategy:m}):b);return{top:(v.top-D.top+y.top)/R.y,bottom:(D.bottom-v.bottom+y.bottom)/R.y,left:(v.left-D.left+y.left)/R.x,right:(D.right-v.right+y.right)/R.x}}const A=t=>({name:"arrow",options:t,async fn(o){const{x:r,y:f,placement:m,rects:u,platform:d,elements:g,middlewareData:p}=o;const{element:h,padding:y=0}=i(t,o)||{};if(h==null)return{};const w=c(y);const x={x:r,y:f};const v=e(m);const b=n(v);const A=await d.getDimensions(h);const R=v==="y";const D=R?"top":"left";const P=R?"bottom":"right";const T=R?"clientHeight":"clientWidth";const E=u.reference[b]+u.reference[v]-x[v]-u.floating[b];const O=x[v]-u.reference[v];const k=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h));let L=k?k[T]:0;L&&await(d.isElement==null?void 0:d.isElement(k))||(L=g.floating[T]||u.floating[b]);const C=E/2-O/2;const B=L/2-A[b]/2-1;const H=a(w[D],B);const S=a(w[P],B);const F=H;const V=L-A[b]-S;const W=L/2-A[b]/2+C;const j=l(F,W,V);const z=!p.arrow&&s(m)!=null&&W!==j&&u.reference[b]/2-(W<F?H:S)-A[b]/2<0;const q=z?W<F?W-F:W-V:0;return{[v]:x[v]+q,data:{[v]:j,centerOffset:W-j-q,...z&&{alignmentOffset:q}},reset:z}}});function R(t,e,n){const i=t?[...n.filter((e=>s(e)===t)),...n.filter((e=>s(e)!==t))]:n.filter((t=>o(t)===t));return i.filter((n=>!t||(s(n)===t||!!e&&f(n)!==n)))}const D=function(t){t===void 0&&(t={});return{name:"autoPlacement",options:t,async fn(e){var n,c,r;const{rects:a,middlewareData:l,placement:f,platform:d,elements:g}=e;const{crossAxis:p=false,alignment:h,allowedPlacements:y=m,autoAlignment:w=true,...x}=i(t,e);const v=h!==void 0||y===m?R(h||null,w,y):y;const A=await b(e,x);const D=((n=l.autoPlacement)==null?void 0:n.index)||0;const P=v[D];if(P==null)return{};const T=u(P,a,await(d.isRTL==null?void 0:d.isRTL(g.floating)));if(f!==P)return{reset:{placement:v[0]}};const E=[A[o(P)],A[T[0]],A[T[1]]];const O=[...((c=l.autoPlacement)==null?void 0:c.overflows)||[],{placement:P,overflows:E}];const k=v[D+1];if(k)return{data:{index:D+1,overflows:O},reset:{placement:k}};const L=O.map((t=>{const e=s(t.placement);return[t.placement,e&&p?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1]));const C=L.filter((t=>t[2].slice(0,s(t[0])?2:3).every((t=>t<=0))));const B=((r=C[0])==null?void 0:r[0])||L[0][0];return B!==f?{data:{index:D+1,overflows:O},reset:{placement:B}}:{}}}};const P=function(e){e===void 0&&(e={});return{name:"flip",options:e,async fn(n){var s,c;const{placement:r,middlewareData:a,rects:l,initialPlacement:f,platform:m,elements:h}=n;const{mainAxis:y=true,crossAxis:w=true,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:R=true,...D}=i(e,n);if((s=a.arrow)!=null&&s.alignmentOffset)return{};const P=o(r);const T=t(f);const E=o(f)===f;const O=await(m.isRTL==null?void 0:m.isRTL(h.floating));const k=x||(E||!R?[d(f)]:g(f));const L=A!=="none";!x&&L&&k.push(...p(f,R,A,O));const C=[f,...k];const B=await b(n,D);const H=[];let S=((c=a.flip)==null?void 0:c.overflows)||[];y&&H.push(B[P]);if(w){const t=u(r,l,O);H.push(B[t[0]],B[t[1]])}S=[...S,{placement:r,overflows:H}];if(!H.every((t=>t<=0))){var F,V;const e=(((F=a.flip)==null?void 0:F.index)||0)+1;const n=C[e];if(n){const o=w==="alignment"&&T!==t(n);if(!o||S.every((e=>t(e.placement)!==T||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:n}}}let o=(V=S.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])==null?void 0:V.placement;if(!o)switch(v){case"bestFit":{var W;const e=(W=S.filter((e=>{if(L){const n=t(e.placement);return n===T||n==="y"}return true})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])==null?void 0:W[0];e&&(o=e);break}case"initialPlacement":o=f;break}if(r!==o)return{reset:{placement:o}}}return{}}}};function T(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function E(t){return h.some((e=>t[e]>=0))}const O=function(t){t===void 0&&(t={});return{name:"hide",options:t,async fn(e){const{rects:n}=e;const{strategy:o="referenceHidden",...s}=i(t,e);switch(o){case"referenceHidden":{const t=await b(e,{...s,elementContext:"reference"});const o=T(t,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:E(o)}}}case"escaped":{const t=await b(e,{...s,altBoundary:true});const o=T(t,n.floating);return{data:{escapedOffsets:o,escaped:E(o)}}}default:return{}}}}};function k(t){const e=a(...t.map((t=>t.left)));const n=a(...t.map((t=>t.top)));const o=y(...t.map((t=>t.right)));const s=y(...t.map((t=>t.bottom)));return{x:e,y:n,width:o-e,height:s-n}}function L(t){const e=t.slice().sort(((t,e)=>t.y-e.y));const n=[];let o=null;for(let t=0;t<e.length;t++){const s=e[t];!o||s.y-o.y>o.height/2?n.push([s]):n[n.length-1].push(s);o=s}return n.map((t=>r(k(t))))}const C=function(e){e===void 0&&(e={});return{name:"inline",options:e,async fn(n){const{placement:s,elements:l,rects:f,platform:m,strategy:u}=n;const{padding:d=2,x:g,y:p}=i(e,n);const h=Array.from(await(m.getClientRects==null?void 0:m.getClientRects(l.reference))||[]);const w=L(h);const x=r(k(h));const v=c(d);function b(){if(w.length===2&&w[0].left>w[1].right&&g!=null&&p!=null)return w.find((t=>g>t.left-v.left&&g<t.right+v.right&&p>t.top-v.top&&p<t.bottom+v.bottom))||x;if(w.length>=2){if(t(s)==="y"){const t=w[0];const e=w[w.length-1];const n=o(s)==="top";const i=t.top;const c=e.bottom;const r=n?t.left:e.left;const a=n?t.right:e.right;const l=a-r;const f=c-i;return{top:i,bottom:c,left:r,right:a,width:l,height:f,x:r,y:i}}const e=o(s)==="left";const n=y(...w.map((t=>t.right)));const i=a(...w.map((t=>t.left)));const c=w.filter((t=>e?t.left===i:t.right===n));const r=c[0].top;const l=c[c.length-1].bottom;const f=i;const m=n;const u=m-f;const d=l-r;return{top:r,bottom:l,left:f,right:m,width:u,height:d,x:f,y:r}}return x}const A=await m.getElementRects({reference:{getBoundingClientRect:b},floating:l.floating,strategy:u});return f.reference.x!==A.reference.x||f.reference.y!==A.reference.y||f.reference.width!==A.reference.width||f.reference.height!==A.reference.height?{reset:{rects:A}}:{}}}};const B=new Set(["left","top"]);async function H(e,n){const{placement:c,platform:r,elements:a}=e;const l=await(r.isRTL==null?void 0:r.isRTL(a.floating));const f=o(c);const m=s(c);const u=t(c)==="y";const d=B.has(f)?-1:1;const g=l&&u?-1:1;const p=i(n,e);let{mainAxis:h,crossAxis:y,alignmentAxis:w}=typeof p==="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};m&&typeof w==="number"&&(y=m==="end"?w*-1:w);return u?{x:y*g,y:h*d}:{x:h*d,y:y*g}}const S=function(t){t===void 0&&(t=0);return{name:"offset",options:t,async fn(e){var n,o;const{x:s,y:i,placement:c,middlewareData:r}=e;const a=await H(e,t);return c===((n=r.offset)==null?void 0:n.placement)&&(o=r.arrow)!=null&&o.alignmentOffset?{}:{x:s+a.x,y:i+a.y,data:{...a,placement:c}}}}};const F=function(e){e===void 0&&(e={});return{name:"shift",options:e,async fn(n){const{x:s,y:c,placement:r}=n;const{mainAxis:a=true,crossAxis:f=false,limiter:m={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...u}=i(e,n);const d={x:s,y:c};const g=await b(n,u);const p=t(o(r));const h=w(p);let y=d[h];let x=d[p];if(a){const t=h==="y"?"top":"left";const e=h==="y"?"bottom":"right";const n=y+g[t];const o=y-g[e];y=l(n,y,o)}if(f){const t=p==="y"?"top":"left";const e=p==="y"?"bottom":"right";const n=x+g[t];const o=x-g[e];x=l(n,x,o)}const v=m.fn({...n,[h]:y,[p]:x});return{...v,data:{x:v.x-s,y:v.y-c,enabled:{[h]:a,[p]:f}}}}}};const V=function(e){e===void 0&&(e={});return{options:e,fn(n){const{x:s,y:c,placement:r,rects:a,middlewareData:l}=n;const{offset:f=0,mainAxis:m=true,crossAxis:u=true}=i(e,n);const d={x:s,y:c};const g=t(r);const p=w(g);let h=d[p];let y=d[g];const x=i(f,n);const v=typeof x==="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(m){const t=p==="y"?"height":"width";const e=a.reference[p]-a.floating[t]+v.mainAxis;const n=a.reference[p]+a.reference[t]-v.mainAxis;h<e?h=e:h>n&&(h=n)}if(u){var b,A;const t=p==="y"?"width":"height";const e=B.has(o(r));const n=a.reference[g]-a.floating[t]+(e&&((b=l.offset)==null?void 0:b[g])||0)+(e?0:v.crossAxis);const s=a.reference[g]+a.reference[t]+(e?0:((A=l.offset)==null?void 0:A[g])||0)-(e?v.crossAxis:0);y<n?y=n:y>s&&(y=s)}return{[p]:h,[g]:y}}}};const W=function(e){e===void 0&&(e={});return{name:"size",options:e,async fn(n){var c,r;const{placement:l,rects:f,platform:m,elements:u}=n;const{apply:d=()=>{},...g}=i(e,n);const p=await b(n,g);const h=o(l);const w=s(l);const x=t(l)==="y";const{width:v,height:A}=f.floating;let R;let D;if(h==="top"||h==="bottom"){R=h;D=w===(await(m.isRTL==null?void 0:m.isRTL(u.floating))?"start":"end")?"left":"right"}else{D=h;R=w==="end"?"top":"bottom"}const P=A-p.top-p.bottom;const T=v-p.left-p.right;const E=a(A-p[R],P);const O=a(v-p[D],T);const k=!n.middlewareData.shift;let L=E;let C=O;(c=n.middlewareData.shift)!=null&&c.enabled.x&&(C=T);(r=n.middlewareData.shift)!=null&&r.enabled.y&&(L=P);if(k&&!w){const t=y(p.left,0);const e=y(p.right,0);const n=y(p.top,0);const o=y(p.bottom,0);x?C=v-2*(t!==0||e!==0?t+e:y(p.left,p.right)):L=A-2*(n!==0||o!==0?n+o:y(p.top,p.bottom))}await d({...n,availableWidth:C,availableHeight:L});const B=await m.getDimensions(u.floating);return v!==B.width||A!==B.height?{reset:{rects:true}}:{}}}};export{A as arrow,D as autoPlacement,v as computePosition,b as detectOverflow,P as flip,O as hide,C as inline,V as limitShift,S as offset,F as shift,W as size};
+
diff --git a/admin/vendor/javascript/@floating-ui--dom.js b/admin/vendor/javascript/@floating-ui--dom.js
new file mode 100644
index 0000000000..229fc00547
--- /dev/null
+++ b/admin/vendor/javascript/@floating-ui--dom.js
@@ -0,0 +1,12 @@
+// @floating-ui/[email protected] downloaded from https://ga.jspm.io/npm:@floating-ui/[email protected]/dist/floating-ui.dom.mjs
+
+import{rectToClientRect as t,detectOverflow as e,offset as n,autoPlacement as o,shift as i,flip as s,size as c,hide as r,arrow as l,inline as f,limitShift as u,computePosition as h}from"@floating-ui/core";import{round as a,createCoords as d,max as g,min as p,floor as m}from"@floating-ui/utils";import{getComputedStyle as y,isHTMLElement as x,isElement as w,getWindow as v,isWebKit as b,getFrameElement as R,getNodeScroll as L,getDocumentElement as T,isTopLayer as C,getNodeName as F,isOverflowElement as W,getParentNode as E,isLastTraversableNode as O,getOverflowAncestors as S,isContainingBlock as H,isTableElement as z,getContainingBlock as A}from"@floating-ui/utils/dom";export{getOverflowAncestors}from"@floating-ui/utils/dom";function B(t){const e=y(t);let n=parseFloat(e.width)||0;let o=parseFloat(e.height)||0;const i=x(t);const s=i?t.offsetWidth:n;const c=i?t.offsetHeight:o;const r=a(n)!==s||a(o)!==c;if(r){n=s;o=c}return{width:n,height:o,$:r}}function D(t){return w(t)?t:t.contextElement}function P(t){const e=D(t);if(!x(e))return d(1);const n=e.getBoundingClientRect();const{width:o,height:i,$:s}=B(e);let c=(s?a(n.width):n.width)/o;let r=(s?a(n.height):n.height)/i;c&&Number.isFinite(c)||(c=1);r&&Number.isFinite(r)||(r=1);return{x:c,y:r}}const V=d(0);function M(t){const e=v(t);return b()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:V}function I(t,e,n){e===void 0&&(e=false);return!(!n||e&&n!==v(t))&&e}function q(e,n,o,i){n===void 0&&(n=false);o===void 0&&(o=false);const s=e.getBoundingClientRect();const c=D(e);let r=d(1);n&&(i?w(i)&&(r=P(i)):r=P(e));const l=I(c,o,i)?M(c):d(0);let f=(s.left+l.x)/r.x;let u=(s.top+l.y)/r.y;let h=s.width/r.x;let a=s.height/r.y;if(c){const t=v(c);const e=i&&w(i)?v(i):i;let n=t;let o=R(n);while(o&&i&&e!==n){const t=P(o);const e=o.getBoundingClientRect();const i=y(o);const s=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x;const c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;f*=t.x;u*=t.y;h*=t.x;a*=t.y;f+=s;u+=c;n=v(o);o=R(n)}}return t({width:h,height:a,x:f,y:u})}function N(t,e){const n=L(t).scrollLeft;return e?e.left+n:q(T(t)).left+n}function $(t,e){const n=t.getBoundingClientRect();const o=n.left+e.scrollLeft-N(t,n);const i=n.top+e.scrollTop;return{x:o,y:i}}function _(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed";const c=T(o);const r=!!e&&C(e.floating);if(o===c||r&&s)return n;let l={scrollLeft:0,scrollTop:0};let f=d(1);const u=d(0);const h=x(o);if(h||!h&&!s){(F(o)!=="body"||W(c))&&(l=L(o));if(x(o)){const t=q(o);f=P(o);u.x=t.x+o.clientLeft;u.y=t.y+o.clientTop}}const a=!c||h||s?d(0):$(c,l);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+a.x,y:n.y*f.y-l.scrollTop*f.y+u.y+a.y}}function j(t){return Array.from(t.getClientRects())}function k(t){const e=T(t);const n=L(t);const o=t.ownerDocument.body;const i=g(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth);const s=g(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+N(t);const r=-n.scrollTop;y(o).direction==="rtl"&&(c+=g(e.clientWidth,o.clientWidth)-i);return{width:i,height:s,x:c,y:r}}const G=25;function J(t,e){const n=v(t);const o=T(t);const i=n.visualViewport;let s=o.clientWidth;let c=o.clientHeight;let r=0;let l=0;if(i){s=i.width;c=i.height;const t=b();if(!t||t&&e==="fixed"){r=i.offsetLeft;l=i.offsetTop}}const f=N(o);if(f<=0){const t=o.ownerDocument;const e=t.body;const n=getComputedStyle(e);const i=t.compatMode==="CSS1Compat"&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0;const c=Math.abs(o.clientWidth-e.clientWidth-i);c<=G&&(s-=c)}else f<=G&&(s+=f);return{width:s,height:c,x:r,y:l}}const K=new Set(["absolute","fixed"]);function Q(t,e){const n=q(t,true,e==="fixed");const o=n.top+t.clientTop;const i=n.left+t.clientLeft;const s=x(t)?P(t):d(1);const c=t.clientWidth*s.x;const r=t.clientHeight*s.y;const l=i*s.x;const f=o*s.y;return{width:c,height:r,x:l,y:f}}function U(e,n,o){let i;if(n==="viewport")i=J(e,o);else if(n==="document")i=k(T(e));else if(w(n))i=Q(n,o);else{const t=M(e);i={x:n.x-t.x,y:n.y-t.y,width:n.width,height:n.height}}return t(i)}function X(t,e){const n=E(t);return!(n===e||!w(n)||O(n))&&(y(n).position==="fixed"||X(n,e))}function Y(t,e){const n=e.get(t);if(n)return n;let o=S(t,[],false).filter((t=>w(t)&&F(t)!=="body"));let i=null;const s=y(t).position==="fixed";let c=s?E(t):t;while(w(c)&&!O(c)){const e=y(c);const n=H(c);n||e.position!=="fixed"||(i=null);const r=s?!n&&!i:!n&&e.position==="static"&&!!i&&K.has(i.position)||W(c)&&!n&&X(t,c);r?o=o.filter((t=>t!==c)):i=e;c=E(c)}e.set(t,o);return o}function Z(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=n==="clippingAncestors"?C(e)?[]:Y(e,this._c):[].concat(n);const c=[...s,o];const r=c[0];const l=c.reduce(((t,n)=>{const o=U(e,n,i);t.top=g(o.top,t.top);t.right=p(o.right,t.right);t.bottom=p(o.bottom,t.bottom);t.left=g(o.left,t.left);return t}),U(e,r,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tt(t){const{width:e,height:n}=B(t);return{width:e,height:n}}function et(t,e,n){const o=x(e);const i=T(e);const s=n==="fixed";const c=q(t,true,s,e);let r={scrollLeft:0,scrollTop:0};const l=d(0);function f(){l.x=N(i)}if(o||!o&&!s){(F(e)!=="body"||W(i))&&(r=L(e));if(o){const t=q(e,true,s,e);l.x=t.x+e.clientLeft;l.y=t.y+e.clientTop}else i&&f()}s&&!o&&i&&f();const u=!i||o||s?d(0):$(i,r);const h=c.left+r.scrollLeft-l.x-u.x;const a=c.top+r.scrollTop-l.y-u.y;return{x:h,y:a,width:c.width,height:c.height}}function nt(t){return y(t).position==="static"}function ot(t,e){if(!x(t)||y(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;T(t)===n&&(n=n.ownerDocument.body);return n}function it(t,e){const n=v(t);if(C(t))return n;if(!x(t)){let e=E(t);while(e&&!O(e)){if(w(e)&&!nt(e))return e;e=E(e)}return n}let o=ot(t,e);while(o&&z(o)&&nt(o))o=ot(o,e);return o&&O(o)&&nt(o)&&!H(o)?n:o||A(t)||n}const st=async function(t){const e=this.getOffsetParent||it;const n=this.getDimensions;const o=await n(t.floating);return{reference:et(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ct(t){return y(t).direction==="rtl"}const rt={convertOffsetParentRelativeRectToViewportRelativeRect:_,getDocumentElement:T,getClippingRect:Z,getOffsetParent:it,getElementRects:st,getClientRects:j,getDimensions:tt,getScale:P,isElement:w,isRTL:ct};function lt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ft(t,e){let n=null;let o;const i=T(t);function s(){var t;clearTimeout(o);(t=n)==null||t.disconnect();n=null}function c(r,l){r===void 0&&(r=false);l===void 0&&(l=1);s();const f=t.getBoundingClientRect();const{left:u,top:h,width:a,height:d}=f;r||e();if(!a||!d)return;const y=m(h);const x=m(i.clientWidth-(u+a));const w=m(i.clientHeight-(h+d));const v=m(u);const b=-y+"px "+-x+"px "+-w+"px "+-v+"px";const R={rootMargin:b,threshold:g(0,p(1,l))||1};let L=true;function T(e){const n=e[0].intersectionRatio;if(n!==l){if(!L)return c();n?c(false,n):o=setTimeout((()=>{c(false,1e-7)}),1e3)}n!==1||lt(f,t.getBoundingClientRect())||c();L=false}try{n=new IntersectionObserver(T,{...R,root:i.ownerDocument})}catch(t){n=new IntersectionObserver(T,R)}n.observe(t)}c(true);return s}
+/**
+ * Automatically updates the position of the floating element when necessary.
+ * Should only be called when the floating element is mounted on the DOM or
+ * visible on the screen.
+ * @returns cleanup function that should be invoked when the floating element is
+ * removed from the DOM or hidden from the screen.
+ * @see https://floating-ui.com/docs/autoUpdate
+ */function ut(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=true,ancestorResize:s=true,elementResize:c=typeof ResizeObserver==="function",layoutShift:r=typeof IntersectionObserver==="function",animationFrame:l=false}=o;const f=D(t);const u=i||s?[...f?S(f):[],...S(e)]:[];u.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:true});s&&t.addEventListener("resize",n)}));const h=f&&r?ft(f,n):null;let a=-1;let d=null;if(c){d=new ResizeObserver((t=>{let[o]=t;if(o&&o.target===f&&d){d.unobserve(e);cancelAnimationFrame(a);a=requestAnimationFrame((()=>{var t;(t=d)==null||t.observe(e)}))}n()}));f&&!l&&d.observe(f);d.observe(e)}let g;let p=l?q(t):null;l&&m();function m(){const e=q(t);p&&!lt(p,e)&&n();p=e;g=requestAnimationFrame(m)}n();return()=>{var t;u.forEach((t=>{i&&t.removeEventListener("scroll",n);s&&t.removeEventListener("resize",n)}));h==null||h();(t=d)==null||t.disconnect();d=null;l&&cancelAnimationFrame(g)}}const ht=e;const at=n;const dt=o;const gt=i;const pt=s;const mt=c;const yt=r;const xt=l;const wt=f;const vt=u;const bt=(t,e,n)=>{const o=new Map;const i={platform:rt,...n};const s={...i.platform,_c:o};return h(t,e,{...i,platform:s})};export{xt as arrow,dt as autoPlacement,ut as autoUpdate,bt as computePosition,ht as detectOverflow,pt as flip,yt as hide,wt as inline,vt as limitShift,at as offset,rt as platform,gt as shift,mt as size};
+
diff --git a/admin/vendor/javascript/@floating-ui--utils--dom.js b/admin/vendor/javascript/@floating-ui--utils--dom.js
new file mode 100644
index 0000000000..3f5078f72c
--- /dev/null
+++ b/admin/vendor/javascript/@floating-ui--utils--dom.js
@@ -0,0 +1,4 @@
+// @floating-ui/utils/[email protected] downloaded from https://ga.jspm.io/npm:@floating-ui/[email protected]/dist/floating-ui.utils.dom.mjs
+
+function n(){return typeof window!=="undefined"}function t(n){return r(n)?(n.nodeName||"").toLowerCase():"#document"}function e(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function o(n){var t;return(t=(r(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function r(t){return!!n()&&(t instanceof Node||t instanceof e(t).Node)}function c(t){return!!n()&&(t instanceof Element||t instanceof e(t).Element)}function u(t){return!!n()&&(t instanceof HTMLElement||t instanceof e(t).HTMLElement)}function l(t){return!(!n()||typeof ShadowRoot==="undefined")&&(t instanceof ShadowRoot||t instanceof e(t).ShadowRoot)}const i=new Set(["inline","contents"]);function s(n){const{overflow:t,overflowX:e,overflowY:o,display:r}=C(n);return/auto|scroll|overlay|hidden|clip/.test(t+o+e)&&!i.has(r)}const a=new Set(["table","td","th"]);function f(n){return a.has(t(n))}const d=[":popover-open",":modal"];function p(n){return d.some((t=>{try{return n.matches(t)}catch(n){return false}}))}const m=["transform","translate","scale","rotate","perspective"];const w=["transform","translate","scale","rotate","perspective","filter"];const h=["paint","layout","strict","content"];function v(n){const t=S();const e=c(n)?C(n):n;return m.some((n=>!!e[n]&&e[n]!=="none"))||!!e.containerType&&e.containerType!=="normal"||!t&&!!e.backdropFilter&&e.backdropFilter!=="none"||!t&&!!e.filter&&e.filter!=="none"||w.some((n=>(e.willChange||"").includes(n)))||h.some((n=>(e.contain||"").includes(n)))}function y(n){let t=L(n);while(u(t)&&!T(t)){if(v(t))return t;if(p(t))return null;t=L(t)}return null}function S(){return!(typeof CSS==="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const b=new Set(["html","body","#document"]);function T(n){return b.has(t(n))}function C(n){return e(n).getComputedStyle(n)}function E(n){return c(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function L(n){if(t(n)==="html")return n;const e=n.assignedSlot||n.parentNode||l(n)&&n.host||o(n);return l(e)?e.host:e}function D(n){const t=L(n);return T(t)?n.ownerDocument?n.ownerDocument.body:n.body:u(t)&&s(t)?t:D(t)}function g(n,t,o){var r;t===void 0&&(t=[]);o===void 0&&(o=true);const c=D(n);const u=c===((r=n.ownerDocument)==null?void 0:r.body);const l=e(c);if(u){const n=k(l);return t.concat(l,l.visualViewport||[],s(c)?c:[],n&&o?g(n):[])}return t.concat(c,g(c,[],o))}function k(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}export{C as getComputedStyle,y as getContainingBlock,o as getDocumentElement,k as getFrameElement,D as getNearestOverflowAncestor,t as getNodeName,E as getNodeScroll,g as getOverflowAncestors,L as getParentNode,e as getWindow,v as isContainingBlock,c as isElement,u as isHTMLElement,T as isLastTraversableNode,r as isNode,s as isOverflowElement,l as isShadowRoot,f as isTableElement,p as isTopLayer,S as isWebKit};
+
diff --git a/admin/vendor/javascript/@floating-ui--utils.js b/admin/vendor/javascript/@floating-ui--utils.js
new file mode 100644
index 0000000000..6cc04e2960
--- /dev/null
+++ b/admin/vendor/javascript/@floating-ui--utils.js
@@ -0,0 +1,4 @@
+// @floating-ui/[email protected] downloaded from https://ga.jspm.io/npm:@floating-ui/[email protected]/dist/floating-ui.utils.mjs
+
+const t=["top","right","bottom","left"];const n=["start","end"];const o=t.reduce(((t,o)=>t.concat(o,o+"-"+n[0],o+"-"+n[1])),[]);const r=Math.min;const e=Math.max;const c=Math.round;const i=Math.floor;const u=t=>({x:t,y:t});const f={left:"right",right:"left",bottom:"top",top:"bottom"};const s={start:"end",end:"start"};function a(t,n,o){return e(t,r(n,o))}function h(t,n){return typeof t==="function"?t(n):t}function l(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function g(t){return t==="x"?"y":"x"}function m(t){return t==="y"?"height":"width"}const b=new Set(["top","bottom"]);function d(t){return b.has(l(t))?"y":"x"}function x(t){return g(d(t))}function y(t,n,o){o===void 0&&(o=false);const r=p(t);const e=x(t);const c=m(e);let i=e==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";n.reference[c]>n.floating[c]&&(i=A(i));return[i,A(i)]}function w(t){const n=A(t);return[M(t),n,M(n)]}function M(t){return t.replace(/start|end/g,(t=>s[t]))}const v=["left","right"];const S=["right","left"];const j=["top","bottom"];const k=["bottom","top"];function q(t,n,o){switch(t){case"top":case"bottom":return o?n?S:v:n?v:S;case"left":case"right":return n?j:k;default:return[]}}function z(t,n,o,r){const e=p(t);let c=q(l(t),o==="start",r);if(e){c=c.map((t=>t+"-"+e));n&&(c=c.concat(c.map(M)))}return c}function A(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function B(t){return{top:0,right:0,bottom:0,left:0,...t}}function C(t){return typeof t!=="number"?B(t):{top:t,right:t,bottom:t,left:t}}function D(t){const{x:n,y:o,width:r,height:e}=t;return{width:r,height:e,top:o,left:n,right:n+r,bottom:o+e,x:n,y:o}}export{n as alignments,a as clamp,u as createCoords,h as evaluate,B as expandPaddingObject,i as floor,p as getAlignment,x as getAlignmentAxis,y as getAlignmentSides,m as getAxisLength,w as getExpandedPlacements,M as getOppositeAlignmentPlacement,g as getOppositeAxis,z as getOppositeAxisPlacements,A as getOppositePlacement,C as getPaddingObject,l as getSide,d as getSideAxis,e as max,r as min,o as placements,D as rectToClientRect,c as round,t as sides};
+